This repository has been archived on 2026-11-17. You can view files and clone it, but cannot push or open issues or pull requests.
gitgram-ai/aitimemachine/test-integration.sh
caelum0x 49b183818c Unify gitgram + aitimemachine into the monorepo (de-submodule) and merge vendored engines
Convert gitgram/ and aitimemachine/ from embedded git repos (which showed as
opaque submodule gitlinks on GitHub) into fully-tracked first-party content.

AITM now merges its 7 vendored repos as first-party engines:
- memory: beads (Go task DAG) + context7 (docs SDK), unified into saved_contexts
- git: vendored C git (bundled binary) + gitnexus (in-process code intelligence)
- agentic: a2a (@a2a-js/sdk) + pal (AITM-managed Python subprocess)

Includes the full session's product build: Gitgram web/mobile/backend features,
AITM website/CLI/MCP, the unified memory layer, engine build tooling
(scripts/build-engines.sh, Dockerfile, CI), docs (README, ENGINES.md, ARCHITECTURE.md),
and extensive test suites.

Build artifacts, node_modules, external/, and gemini-cli are gitignored.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 14:14:09 +03:00

85 lines
1.9 KiB
Bash
Executable File

#!/bin/bash
echo "=== Testing AI Time Machine Integration ==="
echo ""
# Test 1: CLI JSON output
echo "1. Testing CLI JSON output..."
OUTPUT=$(node lib/cli-v2.js list --json 2>/dev/null)
if [ $? -eq 0 ]; then
COUNT=$(echo "$OUTPUT" | jq 'length' 2>/dev/null)
if [ $? -eq 0 ]; then
echo " ✅ CLI returns valid JSON with $COUNT checkpoints"
else
echo " ❌ CLI output is not valid JSON"
exit 1
fi
else
echo " ❌ CLI command failed"
exit 1
fi
# Test 2: API Server
echo ""
echo "2. Testing API Server..."
node lib/api-server.js > /dev/null 2>&1 &
API_PID=$!
sleep 3
# Check if server is running
if ! kill -0 $API_PID 2>/dev/null; then
echo " ❌ API server failed to start"
exit 1
fi
# Test health endpoint
HEALTH=$(curl -s http://localhost:3001/health)
if echo "$HEALTH" | jq -e '.status == "ok"' > /dev/null 2>&1; then
echo " ✅ API server health check passed"
else
echo " ❌ API server health check failed"
kill $API_PID 2>/dev/null
exit 1
fi
# Test checkpoints endpoint
CHECKPOINTS=$(curl -s http://localhost:3001/api/checkpoints)
CP_COUNT=$(echo "$CHECKPOINTS" | jq '.checkpoints | length' 2>/dev/null)
if [ $? -eq 0 ]; then
echo " ✅ API returns $CP_COUNT checkpoints"
else
echo " ❌ API checkpoints endpoint failed"
kill $API_PID 2>/dev/null
exit 1
fi
kill $API_PID 2>/dev/null
# Test 3: VSCode Extension
echo ""
echo "3. Testing VSCode Extension..."
if [ -f "extensions/vscode/out/extension.js" ]; then
echo " ✅ Extension compiled successfully"
else
echo " ❌ Extension not compiled"
exit 1
fi
# Test 4: Website
echo ""
echo "4. Testing Website..."
if [ -d "website/.next" ]; then
echo " ✅ Website built successfully"
else
echo " ❌ Website not built"
exit 1
fi
echo ""
echo "=== All Tests Passed! ==="
echo ""
echo "To run:"
echo " API: node lib/api-server.js"
echo " Website: cd website && npm run dev"
echo " Extension: Open extensions/vscode in VSCode, press F5"