create-cogitator-app 0.7.1 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // <define:__COGITATOR_EXAMPLES__>
4
- var define_COGITATOR_EXAMPLES_default = [{ name: "a2a/a2a-server", title: "A2A Server", entry: "a2a/01-a2a-server.ts", files: ["_shared/setup.ts", "a2a/01-a2a-server.ts"], dependencies: { "@cogitator-ai/a2a": "^0.8.6", "@cogitator-ai/core": "^0.39.1", dotenv: "^18.0.5", express: "^5.2.1" }, devDependencies: { "@types/express": "^5.0.6", tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "a2a/a2a-client", title: "A2A Client", entry: "a2a/02-a2a-client.ts", files: ["_shared/setup.ts", "a2a/02-a2a-client.ts"], dependencies: { "@cogitator-ai/a2a": "^0.8.6", "@cogitator-ai/core": "^0.39.1", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "advanced/self-modifying", title: "Self-Modifying Agent", entry: "advanced/01-self-modifying.ts", files: ["_shared/setup.ts", "advanced/01-self-modifying.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", "@cogitator-ai/self-modifying": "^19.4.6", dotenv: "^18.0.5", zod: "^4.6.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "advanced/neuro-symbolic", title: "Neuro-Symbolic Reasoning", entry: "advanced/02-neuro-symbolic.ts", files: ["_shared/setup.ts", "advanced/02-neuro-symbolic.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", "@cogitator-ai/neuro-symbolic": "^17.0.26", "@cogitator-ai/types": "^0.41.1", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "advanced/wasm-tools", title: "WASM-Sandboxed Tools", entry: "advanced/03-wasm-tools.ts", files: ["_shared/setup.ts", "advanced/03-wasm-tools.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", "@cogitator-ai/wasm-tools": "^0.7.20", dotenv: "^18.0.5", zod: "^4.6.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "browser/web-scraping", title: "Web Scraping with Browser Agent", entry: "browser/01-web-scraping.ts", files: ["_shared/setup.ts", "browser/01-web-scraping.ts"], dependencies: { "@cogitator-ai/browser": "^0.4.16", "@cogitator-ai/core": "^0.39.1", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "browser/form-automation", title: "Form Automation with Browser Agent", entry: "browser/02-form-automation.ts", files: ["_shared/setup.ts", "browser/02-form-automation.ts"], dependencies: { "@cogitator-ai/browser": "^0.4.16", "@cogitator-ai/core": "^0.39.1", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "browser/stealth-agent", title: "Stealth Browser Agent", entry: "browser/03-stealth-agent.ts", files: ["_shared/setup.ts", "browser/03-stealth-agent.ts"], dependencies: { "@cogitator-ai/browser": "^0.4.16", "@cogitator-ai/core": "^0.39.1", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "browser/bitcoin-price-scraper", title: "Bitcoin Price Scraper (Binance)", entry: "browser/04-bitcoin-price-scraper.ts", files: ["_shared/setup.ts", "browser/04-bitcoin-price-scraper.ts"], dependencies: { "@cogitator-ai/browser": "^0.4.16", "@cogitator-ai/core": "^0.39.1", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "channels/telegram-assistant", title: "Telegram assistant", entry: "channels/01-telegram-assistant.ts", files: ["channels/01-telegram-assistant.ts", "channels/cogitator.yml", "channels/webchat-client.html"], dependencies: { "@cogitator-ai/channels": "^0.11.2", "@cogitator-ai/core": "^0.39.1", dotenv: "^18.0.5", grammy: "^1.46.0", zod: "^4.6.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["GOOGLE_API_KEY", "OWNER_TG_ID", "TG_TOKEN"], runtime: "node" }, { name: "channels/super-assistant", title: "Super assistant", entry: "channels/02-super-assistant.ts", files: ["channels/02-super-assistant.ts", "channels/cogitator.yml", "channels/webchat-client.html"], dependencies: { "@cogitator-ai/channels": "^0.11.2", "better-sqlite3": "^13.0.3", dotenv: "^18.0.5", grammy: "^1.46.0" }, devDependencies: { tsx: "^4.23.15" }, env: ["OWNER_TG_ID", "TG_TOKEN"], runtime: "node" }, { name: "channels/webchat-bot", title: "Webchat bot", entry: "channels/03-webchat-bot.ts", files: ["channels/03-webchat-bot.ts", "channels/cogitator.yml", "channels/webchat-client.html"], dependencies: { "@cogitator-ai/channels": "^0.11.2", "@cogitator-ai/core": "^0.39.1", dotenv: "^18.0.5", ws: "^8.22.0", zod: "^4.6.5" }, devDependencies: { "@types/ws": "^8.18.2", tsx: "^4.23.15" }, env: ["GOOGLE_API_KEY", "WEBCHAT_PORT", "WEBCHAT_TOKEN"], runtime: "node" }, { name: "channels/social-publisher", title: "Social publisher", entry: "channels/04-social-publisher.ts", files: ["channels/04-social-publisher.ts", "channels/cogitator.yml", "channels/webchat-client.html"], dependencies: { "@cogitator-ai/channels": "^0.11.2", "@cogitator-ai/types": "^0.41.1", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["BLUESKY_APP_PASSWORD", "BLUESKY_HANDLE", "PUBLISH", "THREADS_ACCESS_TOKEN"], runtime: "node" }, { name: "channels/social-bot", title: "Social bot", entry: "channels/05-social-bot.ts", files: ["channels/05-social-bot.ts", "channels/cogitator.yml", "channels/webchat-client.html"], dependencies: { "@cogitator-ai/channels": "^0.11.2", "@cogitator-ai/core": "^0.39.1", "@cogitator-ai/types": "^0.41.1", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["BLUESKY_APP_PASSWORD", "BLUESKY_HANDLE", "GOOGLE_API_KEY", "THREADS_ACCESS_TOKEN"], runtime: "node" }, { name: "core/basic-agent", title: "Basic Agent with Custom Tools", entry: "core/01-basic-agent.ts", files: ["_shared/setup.ts", "core/01-basic-agent.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", dotenv: "^18.0.5", zod: "^4.6.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "core/built-in-tools", title: "Built-in Tools", entry: "core/02-built-in-tools.ts", files: ["_shared/setup.ts", "core/02-built-in-tools.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "core/tool-caching", title: "Tool Caching with withCache", entry: "core/03-tool-caching.ts", files: ["_shared/setup.ts", "core/03-tool-caching.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", dotenv: "^18.0.5", zod: "^4.6.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "core/context-manager", title: "Context Manager", entry: "core/04-context-manager.ts", files: ["_shared/setup.ts", "core/04-context-manager.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", "@cogitator-ai/types": "^0.41.1", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "core/tree-of-thought", title: "Tree of Thought", entry: "core/05-tree-of-thought.ts", files: ["_shared/setup.ts", "core/05-tree-of-thought.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "core/reflection", title: "Reflection", entry: "core/06-reflection.ts", files: ["_shared/setup.ts", "core/06-reflection.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", dotenv: "^18.0.5", zod: "^4.6.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "core/agent-optimizer", title: "Agent Optimizer", entry: "core/07-agent-optimizer.ts", files: ["_shared/setup.ts", "core/07-agent-optimizer.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", dotenv: "^18.0.5", zod: "^4.6.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "core/time-travel", title: "Time Travel", entry: "core/08-time-travel.ts", files: ["_shared/setup.ts", "core/08-time-travel.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", dotenv: "^18.0.5", zod: "^4.6.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "core/cost-routing", title: "Cost-Aware Routing", entry: "core/09-cost-routing.ts", files: ["_shared/setup.ts", "core/09-cost-routing.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "core/constitutional-ai", title: "Constitutional AI", entry: "core/10-constitutional-ai.ts", files: ["_shared/setup.ts", "core/10-constitutional-ai.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", dotenv: "^18.0.5", zod: "^4.6.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "core/prompt-injection", title: "Prompt Injection Detection", entry: "core/11-prompt-injection.ts", files: ["_shared/setup.ts", "core/11-prompt-injection.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "core/causal-reasoning", title: "Causal Reasoning", entry: "core/12-causal-reasoning.ts", files: ["_shared/setup.ts", "core/12-causal-reasoning.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "core/model-registry", title: "Model Registry", entry: "core/13-model-registry.ts", files: ["_shared/setup.ts", "core/13-model-registry.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", "@cogitator-ai/models": "^18.4.1", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "core/approvals", title: "Approvals: pause before a sensitive tool, resume later", entry: "core/14-approvals.ts", files: ["_shared/setup.ts", "core/14-approvals.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", dotenv: "^18.0.5", zod: "^4.6.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "core/handoffs", title: "Handoffs: a triage agent passes the conversation on", entry: "core/15-handoffs.ts", files: ["_shared/setup.ts", "core/15-handoffs.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", dotenv: "^18.0.5", zod: "^4.6.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "core/decisions", title: "Decision models: typed answers with probabilities", entry: "core/16-decisions.ts", files: ["_shared/setup.ts", "core/16-decisions.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "device-tools/screenshot", title: "Screenshot", entry: "device-tools/01-screenshot.ts", files: ["device-tools/01-screenshot.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", zod: "^4.6.5" }, devDependencies: { tsx: "^4.23.15" }, env: [], runtime: "node" }, { name: "device-tools/clipboard", title: "Clipboard", entry: "device-tools/02-clipboard.ts", files: ["device-tools/02-clipboard.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", zod: "^4.6.5" }, devDependencies: { tsx: "^4.23.15" }, env: [], runtime: "node" }, { name: "device-tools/notify", title: "Notify", entry: "device-tools/03-notify.ts", files: ["device-tools/03-notify.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", zod: "^4.6.5" }, devDependencies: { tsx: "^4.23.15" }, env: [], runtime: "node" }, { name: "device-tools/open-url", title: "Open url", entry: "device-tools/04-open-url.ts", files: ["device-tools/04-open-url.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", zod: "^4.6.5" }, devDependencies: { tsx: "^4.23.15" }, env: [], runtime: "node" }, { name: "device-tools/shell-exec", title: "Shell exec", entry: "device-tools/05-shell-exec.ts", files: ["device-tools/05-shell-exec.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", zod: "^4.6.5" }, devDependencies: { tsx: "^4.23.15" }, env: [], runtime: "node" }, { name: "evals/basic-eval", title: "Basic Evaluation", entry: "evals/01-basic-eval.ts", files: ["_shared/setup.ts", "evals/01-basic-eval.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", "@cogitator-ai/evals": "^0.6.1", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "evals/llm-judge", title: "LLM-as-Judge Evaluation", entry: "evals/02-llm-judge.ts", files: ["_shared/setup.ts", "evals/02-llm-judge.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", "@cogitator-ai/evals": "^0.6.1", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "evals/ab-comparison", title: "A/B Comparison", entry: "evals/03-ab-comparison.ts", files: ["_shared/setup.ts", "evals/03-ab-comparison.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", "@cogitator-ai/evals": "^0.6.1", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "infrastructure/redis-memory", title: "Redis Memory: Persistent Conversations", entry: "infrastructure/01-redis-memory.ts", files: ["_shared/setup.ts", "infrastructure/01-redis-memory.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", "@cogitator-ai/memory": "^0.12.6", dotenv: "^18.0.5", ioredis: "^5.0.0 || ^6.0.0" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY", "REDIS_URL"], runtime: "node" }, { name: "infrastructure/postgres-memory", title: "PostgreSQL Memory: Long-Term Persistence", entry: "infrastructure/02-postgres-memory.ts", files: ["_shared/setup.ts", "infrastructure/02-postgres-memory.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", "@cogitator-ai/memory": "^0.12.6", dotenv: "^18.0.5", pg: "^8.23.1" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "DATABASE_URL", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "infrastructure/worker-queue", title: "Worker Queue: Distributed Agent Execution", entry: "infrastructure/03-worker-queue.ts", files: ["_shared/setup.ts", "infrastructure/03-worker-queue.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", "@cogitator-ai/worker": "^0.9.6", dotenv: "^18.0.5", ioredis: "^5.0.0 || ^6.0.0" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY", "REDIS_URL"], runtime: "node" }, { name: "infrastructure/deploy-docker", title: "Deploy: Docker Deployment Planning", entry: "infrastructure/04-deploy-docker.ts", files: ["_shared/setup.ts", "infrastructure/04-deploy-docker.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", "@cogitator-ai/deploy": "^0.6.5", dotenv: "^18.0.5", pg: "^8.23.1" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "infrastructure/sandbox-execution", title: "Sandbox Execution: Docker, WASM & Native", entry: "infrastructure/05-sandbox-execution.ts", files: ["_shared/setup.ts", "infrastructure/05-sandbox-execution.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", "@cogitator-ai/sandbox": "^0.5.15", "@extism/extism": "^2.0.0-rc13", dockerode: "^4.0.0 || ^5.0.0", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "integrations/express-server", title: "Express Server Integration", entry: "integrations/01-express-server.ts", files: ["_shared/arithmetic.ts", "_shared/setup.ts", "integrations/01-express-server.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", "@cogitator-ai/express": "^0.8.6", dotenv: "^18.0.5", express: "^5.2.1", zod: "^4.6.5" }, devDependencies: { "@types/express": "^5.0.6", tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "integrations/fastify-server", title: "Fastify Server Integration", entry: "integrations/02-fastify-server.ts", files: ["_shared/arithmetic.ts", "_shared/setup.ts", "integrations/02-fastify-server.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", "@cogitator-ai/fastify": "^0.7.6", dotenv: "^18.0.5", fastify: "^5.12.5", zod: "^4.6.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "integrations/hono-server", title: "Hono Server Integration", entry: "integrations/03-hono-server.ts", files: ["_shared/setup.ts", "integrations/03-hono-server.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", "@cogitator-ai/hono": "^0.7.6", "@hono/node-server": "^2.1.3", dotenv: "^18.0.5", hono: "^4.13.12" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "integrations/koa-server", title: "Koa Server Integration", entry: "integrations/04-koa-server.ts", files: ["_shared/setup.ts", "integrations/04-koa-server.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", "@cogitator-ai/koa": "^0.7.6", "@koa/router": "^15.7.0", dotenv: "^18.0.5", koa: "^3.2.1" }, devDependencies: { "@types/koa": "^3.0.3", tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "integrations/nextjs-handler", title: "Nextjs handler", entry: "integrations/05-nextjs-handler.ts", files: ["integrations/05-nextjs-handler.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", "@cogitator-ai/next": "^0.8.6", next: "^14.0.0 || ^15.0.0 || ^16.0.0", react: "^18.2.0 || ^19.0.0", zod: "^4.6.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["GOOGLE_API_KEY"], runtime: "node" }, { name: "integrations/openai-compat", title: "OpenAI-Compatible Server", entry: "integrations/06-openai-compat.ts", files: ["_shared/setup.ts", "integrations/06-openai-compat.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", "@cogitator-ai/openai-compat": "^21.2.6", "@cogitator-ai/types": "^0.41.1", dotenv: "^18.0.5", openai: "^7.25.0", zod: "^4.6.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "integrations/ai-sdk-adapter", title: "Vercel AI SDK Adapter", entry: "integrations/07-ai-sdk-adapter.ts", files: ["_shared/setup.ts", "integrations/07-ai-sdk-adapter.ts"], dependencies: { "@cogitator-ai/ai-sdk": "^0.6.1", "@cogitator-ai/core": "^0.39.1", "@cogitator-ai/types": "^0.41.1", ai: "^7.0.127", dotenv: "^18.0.5", zod: "^4.6.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "integrations/tetsu-server", title: "Tetsu Server on Bun: an app with its own MCP server and agent", entry: "integrations/08-tetsu-server.ts", files: ["_shared/setup.ts", "integrations/08-tetsu-server.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", "@cogitator-ai/mcp": "^19.3.6", "@cogitator-ai/tetsu": "^0.5.6", "@cogitator-ai/types": "^0.41.1", "@tetsujs/core": "^0.6.1", "@tetsujs/openapi": "^0.6.1", "@tetsujs/sse": "^0.6.1", dotenv: "^18.0.5", zod: "^4.6.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "bun" }, { name: "mcp/mcp-client", title: "MCP Client: Filesystem Server", entry: "mcp/01-mcp-client.ts", files: ["_shared/setup.ts", "mcp/01-mcp-client.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", "@cogitator-ai/mcp": "^19.3.6", "@cogitator-ai/types": "^0.41.1", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "mcp/mcp-server", title: "MCP Server: Expose Cogitator Tools over HTTP", entry: "mcp/02-mcp-server.ts", files: ["_shared/setup.ts", "mcp/02-mcp-server.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", "@cogitator-ai/mcp": "^19.3.6", "@cogitator-ai/types": "^0.41.1", dotenv: "^18.0.5", zod: "^4.6.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "mcp/per-user-mcp", title: "An Agent on Your Own MCP Server, per User", entry: "mcp/03-per-user-mcp.ts", files: ["_shared/setup.ts", "mcp/03-per-user-mcp.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", "@cogitator-ai/mcp": "^19.3.6", "@cogitator-ai/types": "^0.41.1", dotenv: "^18.0.5", zod: "^4.6.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "mcp/agent-as-mcp-server", title: "A Cogitator Agent as an MCP Server", entry: "mcp/04-agent-as-mcp-server.ts", files: ["_shared/setup.ts", "mcp/04-agent-as-mcp-server.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", "@cogitator-ai/mcp": "^19.3.6", "@cogitator-ai/types": "^0.41.1", dotenv: "^18.0.5", zod: "^4.6.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "memory/basic-memory", title: "Basic Memory: Threads & Multi-Turn Conversations", entry: "memory/01-basic-memory.ts", files: ["_shared/setup.ts", "memory/01-basic-memory.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", "@cogitator-ai/memory": "^0.12.6", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "memory/context-builder", title: "Context Builder: Token-Aware Context Windows", entry: "memory/02-context-builder.ts", files: ["_shared/setup.ts", "memory/02-context-builder.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", "@cogitator-ai/memory": "^0.12.6", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "memory/semantic-search", title: "Semantic Search: Hybrid BM25 + Vector Search", entry: "memory/03-semantic-search.ts", files: ["_shared/setup.ts", "memory/03-semantic-search.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", "@cogitator-ai/memory": "^0.12.6", "@qdrant/js-client-rest": "^1.10.0", dotenv: "^18.0.5", pg: "^8.23.1" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "memory/knowledge-graph", title: "Knowledge Graph: Entity Extraction & Graph Traversal", entry: "memory/04-knowledge-graph.ts", files: ["_shared/setup.ts", "memory/04-knowledge-graph.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", "@cogitator-ai/memory": "^0.12.6", "@cogitator-ai/types": "^0.41.1", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "rag/basic-retrieval", title: "Basic RAG Retrieval", entry: "rag/01-basic-retrieval.ts", files: ["_shared/setup.ts", "rag/01-basic-retrieval.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", "@cogitator-ai/memory": "^0.12.6", "@cogitator-ai/rag": "^0.7.1", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "rag/chunking-strategies", title: "Chunking Strategies Comparison", entry: "rag/02-chunking-strategies.ts", files: ["_shared/setup.ts", "rag/02-chunking-strategies.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", "@cogitator-ai/memory": "^0.12.6", "@cogitator-ai/rag": "^0.7.1", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "rag/agent-with-rag", title: "Agent with RAG Tools", entry: "rag/03-agent-with-rag.ts", files: ["_shared/setup.ts", "rag/03-agent-with-rag.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", "@cogitator-ai/memory": "^0.12.6", "@cogitator-ai/rag": "^0.7.1", "@qdrant/js-client-rest": "^1.10.0", "better-sqlite3": "^13.0.3", dotenv: "^18.0.5", ioredis: "^5.0.0 || ^6.0.0", mongodb: "^6.0.0 || ^7.0.0", pg: "^8.23.1" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "swarms/debate-swarm", title: "Debate Swarm", entry: "swarms/01-debate-swarm.ts", files: ["_shared/setup.ts", "swarms/01-debate-swarm.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", "@cogitator-ai/swarms": "^0.12.6", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "swarms/pipeline-swarm", title: "Pipeline Swarm", entry: "swarms/02-pipeline-swarm.ts", files: ["_shared/setup.ts", "swarms/02-pipeline-swarm.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", "@cogitator-ai/swarms": "^0.12.6", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "swarms/hierarchical-swarm", title: "Hierarchical Swarm", entry: "swarms/03-hierarchical-swarm.ts", files: ["_shared/setup.ts", "swarms/03-hierarchical-swarm.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", "@cogitator-ai/swarms": "^0.12.6", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "swarms/negotiation-swarm", title: "Negotiation Swarm", entry: "swarms/04-negotiation-swarm.ts", files: ["_shared/setup.ts", "swarms/04-negotiation-swarm.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", "@cogitator-ai/swarms": "^0.12.6", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "voice/pipeline", title: "Voice Pipeline", entry: "voice/01-pipeline.ts", files: ["_shared/setup.ts", "voice/01-pipeline.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", "@cogitator-ai/voice": "^0.5.6", dotenv: "^18.0.5", openai: "^7.25.0" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "voice/realtime", title: "Realtime Voice Session", entry: "voice/02-realtime.ts", files: ["_shared/setup.ts", "voice/02-realtime.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", "@cogitator-ai/voice": "^0.5.6", dotenv: "^18.0.5", openai: "^7.25.0" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "voice/voice-agent", title: "Voice Agent (WebSocket Server)", entry: "voice/03-voice-agent.ts", files: ["_shared/setup.ts", "voice/03-voice-agent.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", "@cogitator-ai/voice": "^0.5.6", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "DEEPGRAM_API_KEY", "ELEVENLABS_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "voice/realtime-voice-agent", title: "Realtime Voice Agent (Gemini Live over WebSocket)", entry: "voice/04-realtime-voice-agent.ts", files: ["_shared/setup.ts", "voice/04-realtime-voice-agent.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", "@cogitator-ai/voice": "^0.5.6", dotenv: "^18.0.5", ws: "^8.22.0" }, devDependencies: { "@types/ws": "^8.18.2", tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "workflows/basic-workflow", title: "Basic Workflow: Code Review Pipeline", entry: "workflows/01-basic-workflow.ts", files: ["_shared/setup.ts", "workflows/01-basic-workflow.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", "@cogitator-ai/workflows": "^0.12.6", dotenv: "^18.0.5", zod: "^4.6.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "workflows/human-in-loop", title: "Human-in-the-Loop: Content Publishing Workflow", entry: "workflows/02-human-in-loop.ts", files: ["_shared/setup.ts", "workflows/02-human-in-loop.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", "@cogitator-ai/workflows": "^0.12.6", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "workflows/map-reduce", title: "Map-Reduce: Parallel Document Analysis", entry: "workflows/03-map-reduce.ts", files: ["_shared/setup.ts", "workflows/03-map-reduce.ts"], dependencies: { "@cogitator-ai/core": "^0.39.1", "@cogitator-ai/workflows": "^0.12.6", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }];
4
+ var define_COGITATOR_EXAMPLES_default = [{ name: "a2a/a2a-server", title: "A2A Server", entry: "a2a/01-a2a-server.ts", files: ["_shared/setup.ts", "a2a/01-a2a-server.ts"], dependencies: { "@cogitator-ai/a2a": "^0.8.7", "@cogitator-ai/core": "^0.40.0", dotenv: "^18.0.5", express: "^5.2.1" }, devDependencies: { "@types/express": "^5.0.6", tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "a2a/a2a-client", title: "A2A Client", entry: "a2a/02-a2a-client.ts", files: ["_shared/setup.ts", "a2a/02-a2a-client.ts"], dependencies: { "@cogitator-ai/a2a": "^0.8.7", "@cogitator-ai/core": "^0.40.0", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "advanced/self-modifying", title: "Self-Modifying Agent", entry: "advanced/01-self-modifying.ts", files: ["_shared/setup.ts", "advanced/01-self-modifying.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", "@cogitator-ai/self-modifying": "^19.4.7", dotenv: "^18.0.5", zod: "^4.6.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "advanced/neuro-symbolic", title: "Neuro-Symbolic Reasoning", entry: "advanced/02-neuro-symbolic.ts", files: ["_shared/setup.ts", "advanced/02-neuro-symbolic.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", "@cogitator-ai/neuro-symbolic": "^17.0.27", "@cogitator-ai/types": "^0.42.0", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "advanced/wasm-tools", title: "WASM-Sandboxed Tools", entry: "advanced/03-wasm-tools.ts", files: ["_shared/setup.ts", "advanced/03-wasm-tools.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", "@cogitator-ai/wasm-tools": "^0.7.21", dotenv: "^18.0.5", zod: "^4.6.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "browser/web-scraping", title: "Web Scraping with Browser Agent", entry: "browser/01-web-scraping.ts", files: ["_shared/setup.ts", "browser/01-web-scraping.ts"], dependencies: { "@cogitator-ai/browser": "^0.4.17", "@cogitator-ai/core": "^0.40.0", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "browser/form-automation", title: "Form Automation with Browser Agent", entry: "browser/02-form-automation.ts", files: ["_shared/setup.ts", "browser/02-form-automation.ts"], dependencies: { "@cogitator-ai/browser": "^0.4.17", "@cogitator-ai/core": "^0.40.0", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "browser/stealth-agent", title: "Stealth Browser Agent", entry: "browser/03-stealth-agent.ts", files: ["_shared/setup.ts", "browser/03-stealth-agent.ts"], dependencies: { "@cogitator-ai/browser": "^0.4.17", "@cogitator-ai/core": "^0.40.0", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "browser/bitcoin-price-scraper", title: "Bitcoin Price Scraper (Binance)", entry: "browser/04-bitcoin-price-scraper.ts", files: ["_shared/setup.ts", "browser/04-bitcoin-price-scraper.ts"], dependencies: { "@cogitator-ai/browser": "^0.4.17", "@cogitator-ai/core": "^0.40.0", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "channels/telegram-assistant", title: "Telegram assistant", entry: "channels/01-telegram-assistant.ts", files: ["channels/01-telegram-assistant.ts", "channels/cogitator.yml", "channels/webchat-client.html"], dependencies: { "@cogitator-ai/channels": "^0.11.3", "@cogitator-ai/core": "^0.40.0", dotenv: "^18.0.5", grammy: "^1.46.0", zod: "^4.6.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["GOOGLE_API_KEY", "OWNER_TG_ID", "TG_TOKEN"], runtime: "node" }, { name: "channels/super-assistant", title: "Super assistant", entry: "channels/02-super-assistant.ts", files: ["channels/02-super-assistant.ts", "channels/cogitator.yml", "channels/webchat-client.html"], dependencies: { "@cogitator-ai/channels": "^0.11.3", "better-sqlite3": "^13.0.3", dotenv: "^18.0.5", grammy: "^1.46.0" }, devDependencies: { tsx: "^4.23.15" }, env: ["OWNER_TG_ID", "TG_TOKEN"], runtime: "node" }, { name: "channels/webchat-bot", title: "Webchat bot", entry: "channels/03-webchat-bot.ts", files: ["channels/03-webchat-bot.ts", "channels/cogitator.yml", "channels/webchat-client.html"], dependencies: { "@cogitator-ai/channels": "^0.11.3", "@cogitator-ai/core": "^0.40.0", dotenv: "^18.0.5", ws: "^8.22.0", zod: "^4.6.5" }, devDependencies: { "@types/ws": "^8.18.2", tsx: "^4.23.15" }, env: ["GOOGLE_API_KEY", "WEBCHAT_PORT", "WEBCHAT_TOKEN"], runtime: "node" }, { name: "channels/social-publisher", title: "Social publisher", entry: "channels/04-social-publisher.ts", files: ["channels/04-social-publisher.ts", "channels/cogitator.yml", "channels/webchat-client.html"], dependencies: { "@cogitator-ai/channels": "^0.11.3", "@cogitator-ai/types": "^0.42.0", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["BLUESKY_APP_PASSWORD", "BLUESKY_HANDLE", "PUBLISH", "THREADS_ACCESS_TOKEN"], runtime: "node" }, { name: "channels/social-bot", title: "Social bot", entry: "channels/05-social-bot.ts", files: ["channels/05-social-bot.ts", "channels/cogitator.yml", "channels/webchat-client.html"], dependencies: { "@cogitator-ai/channels": "^0.11.3", "@cogitator-ai/core": "^0.40.0", "@cogitator-ai/types": "^0.42.0", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["BLUESKY_APP_PASSWORD", "BLUESKY_HANDLE", "GOOGLE_API_KEY", "THREADS_ACCESS_TOKEN"], runtime: "node" }, { name: "core/basic-agent", title: "Basic Agent with Custom Tools", entry: "core/01-basic-agent.ts", files: ["_shared/setup.ts", "core/01-basic-agent.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", dotenv: "^18.0.5", zod: "^4.6.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "core/built-in-tools", title: "Built-in Tools", entry: "core/02-built-in-tools.ts", files: ["_shared/setup.ts", "core/02-built-in-tools.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "core/tool-caching", title: "Tool Caching with withCache", entry: "core/03-tool-caching.ts", files: ["_shared/setup.ts", "core/03-tool-caching.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", dotenv: "^18.0.5", zod: "^4.6.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "core/context-manager", title: "Context Manager", entry: "core/04-context-manager.ts", files: ["_shared/setup.ts", "core/04-context-manager.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", "@cogitator-ai/types": "^0.42.0", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "core/tree-of-thought", title: "Tree of Thought", entry: "core/05-tree-of-thought.ts", files: ["_shared/setup.ts", "core/05-tree-of-thought.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "core/reflection", title: "Reflection", entry: "core/06-reflection.ts", files: ["_shared/setup.ts", "core/06-reflection.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", dotenv: "^18.0.5", zod: "^4.6.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "core/agent-optimizer", title: "Agent Optimizer", entry: "core/07-agent-optimizer.ts", files: ["_shared/setup.ts", "core/07-agent-optimizer.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", dotenv: "^18.0.5", zod: "^4.6.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "core/time-travel", title: "Time Travel", entry: "core/08-time-travel.ts", files: ["_shared/setup.ts", "core/08-time-travel.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", dotenv: "^18.0.5", zod: "^4.6.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "core/cost-routing", title: "Cost-Aware Routing", entry: "core/09-cost-routing.ts", files: ["_shared/setup.ts", "core/09-cost-routing.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "core/constitutional-ai", title: "Constitutional AI", entry: "core/10-constitutional-ai.ts", files: ["_shared/setup.ts", "core/10-constitutional-ai.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", dotenv: "^18.0.5", zod: "^4.6.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "core/prompt-injection", title: "Prompt Injection Detection", entry: "core/11-prompt-injection.ts", files: ["_shared/setup.ts", "core/11-prompt-injection.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "core/causal-reasoning", title: "Causal Reasoning", entry: "core/12-causal-reasoning.ts", files: ["_shared/setup.ts", "core/12-causal-reasoning.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "core/model-registry", title: "Model Registry", entry: "core/13-model-registry.ts", files: ["_shared/setup.ts", "core/13-model-registry.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", "@cogitator-ai/models": "^18.5.0", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "core/approvals", title: "Approvals: pause before a sensitive tool, resume later", entry: "core/14-approvals.ts", files: ["_shared/setup.ts", "core/14-approvals.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", dotenv: "^18.0.5", zod: "^4.6.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "core/handoffs", title: "Handoffs: a triage agent passes the conversation on", entry: "core/15-handoffs.ts", files: ["_shared/setup.ts", "core/15-handoffs.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", dotenv: "^18.0.5", zod: "^4.6.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "core/decisions", title: "Decision models: typed answers with probabilities", entry: "core/16-decisions.ts", files: ["_shared/setup.ts", "core/16-decisions.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "core/provider-surface", title: "Provider surface: pricing, server profiles, error kinds", entry: "core/17-provider-surface.ts", files: ["_shared/setup.ts", "core/17-provider-surface.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_MODEL", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "device-tools/screenshot", title: "Screenshot", entry: "device-tools/01-screenshot.ts", files: ["device-tools/01-screenshot.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", zod: "^4.6.5" }, devDependencies: { tsx: "^4.23.15" }, env: [], runtime: "node" }, { name: "device-tools/clipboard", title: "Clipboard", entry: "device-tools/02-clipboard.ts", files: ["device-tools/02-clipboard.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", zod: "^4.6.5" }, devDependencies: { tsx: "^4.23.15" }, env: [], runtime: "node" }, { name: "device-tools/notify", title: "Notify", entry: "device-tools/03-notify.ts", files: ["device-tools/03-notify.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", zod: "^4.6.5" }, devDependencies: { tsx: "^4.23.15" }, env: [], runtime: "node" }, { name: "device-tools/open-url", title: "Open url", entry: "device-tools/04-open-url.ts", files: ["device-tools/04-open-url.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", zod: "^4.6.5" }, devDependencies: { tsx: "^4.23.15" }, env: [], runtime: "node" }, { name: "device-tools/shell-exec", title: "Shell exec", entry: "device-tools/05-shell-exec.ts", files: ["device-tools/05-shell-exec.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", zod: "^4.6.5" }, devDependencies: { tsx: "^4.23.15" }, env: [], runtime: "node" }, { name: "evals/basic-eval", title: "Basic Evaluation", entry: "evals/01-basic-eval.ts", files: ["_shared/setup.ts", "evals/01-basic-eval.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", "@cogitator-ai/evals": "^0.6.1", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "evals/llm-judge", title: "LLM-as-Judge Evaluation", entry: "evals/02-llm-judge.ts", files: ["_shared/setup.ts", "evals/02-llm-judge.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", "@cogitator-ai/evals": "^0.6.1", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "evals/ab-comparison", title: "A/B Comparison", entry: "evals/03-ab-comparison.ts", files: ["_shared/setup.ts", "evals/03-ab-comparison.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", "@cogitator-ai/evals": "^0.6.1", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "infrastructure/redis-memory", title: "Redis Memory: Persistent Conversations", entry: "infrastructure/01-redis-memory.ts", files: ["_shared/setup.ts", "infrastructure/01-redis-memory.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", "@cogitator-ai/memory": "^0.12.7", dotenv: "^18.0.5", ioredis: "^5.0.0 || ^6.0.0" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY", "REDIS_URL"], runtime: "node" }, { name: "infrastructure/postgres-memory", title: "PostgreSQL Memory: Long-Term Persistence", entry: "infrastructure/02-postgres-memory.ts", files: ["_shared/setup.ts", "infrastructure/02-postgres-memory.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", "@cogitator-ai/memory": "^0.12.7", dotenv: "^18.0.5", pg: "^8.23.1" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "DATABASE_URL", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "infrastructure/worker-queue", title: "Worker Queue: Distributed Agent Execution", entry: "infrastructure/03-worker-queue.ts", files: ["_shared/setup.ts", "infrastructure/03-worker-queue.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", "@cogitator-ai/worker": "^0.9.7", dotenv: "^18.0.5", ioredis: "^5.0.0 || ^6.0.0" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY", "REDIS_URL"], runtime: "node" }, { name: "infrastructure/deploy-docker", title: "Deploy: Docker Deployment Planning", entry: "infrastructure/04-deploy-docker.ts", files: ["_shared/setup.ts", "infrastructure/04-deploy-docker.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", "@cogitator-ai/deploy": "^0.6.6", dotenv: "^18.0.5", pg: "^8.23.1" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "infrastructure/sandbox-execution", title: "Sandbox Execution: Docker, WASM & Native", entry: "infrastructure/05-sandbox-execution.ts", files: ["_shared/setup.ts", "infrastructure/05-sandbox-execution.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", "@cogitator-ai/sandbox": "^0.5.16", "@extism/extism": "^2.0.0-rc13", dockerode: "^4.0.0 || ^5.0.0", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "integrations/express-server", title: "Express Server Integration", entry: "integrations/01-express-server.ts", files: ["_shared/arithmetic.ts", "_shared/setup.ts", "integrations/01-express-server.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", "@cogitator-ai/express": "^0.8.7", dotenv: "^18.0.5", express: "^5.2.1", zod: "^4.6.5" }, devDependencies: { "@types/express": "^5.0.6", tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "integrations/fastify-server", title: "Fastify Server Integration", entry: "integrations/02-fastify-server.ts", files: ["_shared/arithmetic.ts", "_shared/setup.ts", "integrations/02-fastify-server.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", "@cogitator-ai/fastify": "^0.7.7", dotenv: "^18.0.5", fastify: "^5.12.5", zod: "^4.6.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "integrations/hono-server", title: "Hono Server Integration", entry: "integrations/03-hono-server.ts", files: ["_shared/setup.ts", "integrations/03-hono-server.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", "@cogitator-ai/hono": "^0.7.7", "@hono/node-server": "^2.1.3", dotenv: "^18.0.5", hono: "^4.13.12" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "integrations/koa-server", title: "Koa Server Integration", entry: "integrations/04-koa-server.ts", files: ["_shared/setup.ts", "integrations/04-koa-server.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", "@cogitator-ai/koa": "^0.7.7", "@koa/router": "^15.7.0", dotenv: "^18.0.5", koa: "^3.2.1" }, devDependencies: { "@types/koa": "^3.0.3", tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "integrations/nextjs-handler", title: "Nextjs handler", entry: "integrations/05-nextjs-handler.ts", files: ["integrations/05-nextjs-handler.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", "@cogitator-ai/next": "^0.8.7", next: "^14.0.0 || ^15.0.0 || ^16.0.0", react: "^18.2.0 || ^19.0.0", zod: "^4.6.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["GOOGLE_API_KEY"], runtime: "node" }, { name: "integrations/openai-compat", title: "OpenAI-Compatible Server", entry: "integrations/06-openai-compat.ts", files: ["_shared/setup.ts", "integrations/06-openai-compat.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", "@cogitator-ai/openai-compat": "^21.2.7", "@cogitator-ai/types": "^0.42.0", dotenv: "^18.0.5", openai: "^7.25.0", zod: "^4.6.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "integrations/ai-sdk-adapter", title: "Vercel AI SDK Adapter", entry: "integrations/07-ai-sdk-adapter.ts", files: ["_shared/setup.ts", "integrations/07-ai-sdk-adapter.ts"], dependencies: { "@cogitator-ai/ai-sdk": "^0.6.1", "@cogitator-ai/core": "^0.40.0", "@cogitator-ai/types": "^0.42.0", ai: "^7.0.127", dotenv: "^18.0.5", zod: "^4.6.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "integrations/tetsu-server", title: "Tetsu Server on Bun: an app with its own MCP server and agent", entry: "integrations/08-tetsu-server.ts", files: ["_shared/setup.ts", "integrations/08-tetsu-server.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", "@cogitator-ai/mcp": "^19.3.7", "@cogitator-ai/tetsu": "^0.5.7", "@cogitator-ai/types": "^0.42.0", "@tetsujs/core": "^0.6.1", "@tetsujs/openapi": "^0.6.1", "@tetsujs/sse": "^0.6.1", dotenv: "^18.0.5", zod: "^4.6.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "bun" }, { name: "mcp/mcp-client", title: "MCP Client: Filesystem Server", entry: "mcp/01-mcp-client.ts", files: ["_shared/setup.ts", "mcp/01-mcp-client.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", "@cogitator-ai/mcp": "^19.3.7", "@cogitator-ai/types": "^0.42.0", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "mcp/mcp-server", title: "MCP Server: Expose Cogitator Tools over HTTP", entry: "mcp/02-mcp-server.ts", files: ["_shared/setup.ts", "mcp/02-mcp-server.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", "@cogitator-ai/mcp": "^19.3.7", "@cogitator-ai/types": "^0.42.0", dotenv: "^18.0.5", zod: "^4.6.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "mcp/per-user-mcp", title: "An Agent on Your Own MCP Server, per User", entry: "mcp/03-per-user-mcp.ts", files: ["_shared/setup.ts", "mcp/03-per-user-mcp.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", "@cogitator-ai/mcp": "^19.3.7", "@cogitator-ai/types": "^0.42.0", dotenv: "^18.0.5", zod: "^4.6.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "mcp/agent-as-mcp-server", title: "A Cogitator Agent as an MCP Server", entry: "mcp/04-agent-as-mcp-server.ts", files: ["_shared/setup.ts", "mcp/04-agent-as-mcp-server.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", "@cogitator-ai/mcp": "^19.3.7", "@cogitator-ai/types": "^0.42.0", dotenv: "^18.0.5", zod: "^4.6.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "memory/basic-memory", title: "Basic Memory: Threads & Multi-Turn Conversations", entry: "memory/01-basic-memory.ts", files: ["_shared/setup.ts", "memory/01-basic-memory.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", "@cogitator-ai/memory": "^0.12.7", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "memory/context-builder", title: "Context Builder: Token-Aware Context Windows", entry: "memory/02-context-builder.ts", files: ["_shared/setup.ts", "memory/02-context-builder.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", "@cogitator-ai/memory": "^0.12.7", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "memory/semantic-search", title: "Semantic Search: Hybrid BM25 + Vector Search", entry: "memory/03-semantic-search.ts", files: ["_shared/setup.ts", "memory/03-semantic-search.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", "@cogitator-ai/memory": "^0.12.7", "@qdrant/js-client-rest": "^1.10.0", dotenv: "^18.0.5", pg: "^8.23.1" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "memory/knowledge-graph", title: "Knowledge Graph: Entity Extraction & Graph Traversal", entry: "memory/04-knowledge-graph.ts", files: ["_shared/setup.ts", "memory/04-knowledge-graph.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", "@cogitator-ai/memory": "^0.12.7", "@cogitator-ai/types": "^0.42.0", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "rag/basic-retrieval", title: "Basic RAG Retrieval", entry: "rag/01-basic-retrieval.ts", files: ["_shared/setup.ts", "rag/01-basic-retrieval.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", "@cogitator-ai/memory": "^0.12.7", "@cogitator-ai/rag": "^0.7.2", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "rag/chunking-strategies", title: "Chunking Strategies Comparison", entry: "rag/02-chunking-strategies.ts", files: ["_shared/setup.ts", "rag/02-chunking-strategies.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", "@cogitator-ai/memory": "^0.12.7", "@cogitator-ai/rag": "^0.7.2", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "rag/agent-with-rag", title: "Agent with RAG Tools", entry: "rag/03-agent-with-rag.ts", files: ["_shared/setup.ts", "rag/03-agent-with-rag.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", "@cogitator-ai/memory": "^0.12.7", "@cogitator-ai/rag": "^0.7.2", "@qdrant/js-client-rest": "^1.10.0", "better-sqlite3": "^13.0.3", dotenv: "^18.0.5", ioredis: "^5.0.0 || ^6.0.0", mongodb: "^6.0.0 || ^7.0.0", pg: "^8.23.1" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "swarms/debate-swarm", title: "Debate Swarm", entry: "swarms/01-debate-swarm.ts", files: ["_shared/setup.ts", "swarms/01-debate-swarm.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", "@cogitator-ai/swarms": "^0.12.7", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "swarms/pipeline-swarm", title: "Pipeline Swarm", entry: "swarms/02-pipeline-swarm.ts", files: ["_shared/setup.ts", "swarms/02-pipeline-swarm.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", "@cogitator-ai/swarms": "^0.12.7", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "swarms/hierarchical-swarm", title: "Hierarchical Swarm", entry: "swarms/03-hierarchical-swarm.ts", files: ["_shared/setup.ts", "swarms/03-hierarchical-swarm.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", "@cogitator-ai/swarms": "^0.12.7", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "swarms/negotiation-swarm", title: "Negotiation Swarm", entry: "swarms/04-negotiation-swarm.ts", files: ["_shared/setup.ts", "swarms/04-negotiation-swarm.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", "@cogitator-ai/swarms": "^0.12.7", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "voice/pipeline", title: "Voice Pipeline", entry: "voice/01-pipeline.ts", files: ["_shared/setup.ts", "voice/01-pipeline.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", "@cogitator-ai/voice": "^0.5.7", dotenv: "^18.0.5", openai: "^7.25.0" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "voice/realtime", title: "Realtime Voice Session", entry: "voice/02-realtime.ts", files: ["_shared/setup.ts", "voice/02-realtime.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", "@cogitator-ai/voice": "^0.5.7", dotenv: "^18.0.5", openai: "^7.25.0" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "voice/voice-agent", title: "Voice Agent (WebSocket Server)", entry: "voice/03-voice-agent.ts", files: ["_shared/setup.ts", "voice/03-voice-agent.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", "@cogitator-ai/voice": "^0.5.7", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "DEEPGRAM_API_KEY", "ELEVENLABS_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "voice/realtime-voice-agent", title: "Realtime Voice Agent (Gemini Live over WebSocket)", entry: "voice/04-realtime-voice-agent.ts", files: ["_shared/setup.ts", "voice/04-realtime-voice-agent.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", "@cogitator-ai/voice": "^0.5.7", dotenv: "^18.0.5", ws: "^8.22.0" }, devDependencies: { "@types/ws": "^8.18.2", tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "workflows/basic-workflow", title: "Basic Workflow: Code Review Pipeline", entry: "workflows/01-basic-workflow.ts", files: ["_shared/setup.ts", "workflows/01-basic-workflow.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", "@cogitator-ai/workflows": "^0.12.7", dotenv: "^18.0.5", zod: "^4.6.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "workflows/human-in-loop", title: "Human-in-the-Loop: Content Publishing Workflow", entry: "workflows/02-human-in-loop.ts", files: ["_shared/setup.ts", "workflows/02-human-in-loop.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", "@cogitator-ai/workflows": "^0.12.7", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }, { name: "workflows/map-reduce", title: "Map-Reduce: Parallel Document Analysis", entry: "workflows/03-map-reduce.ts", files: ["_shared/setup.ts", "workflows/03-map-reduce.ts"], dependencies: { "@cogitator-ai/core": "^0.40.0", "@cogitator-ai/workflows": "^0.12.7", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_API_KEY", "OPENROUTER_API_KEY"], runtime: "node" }];
5
5
 
6
6
  // <define:__COGITATOR_VERSIONS__>
7
- var define_COGITATOR_VERSIONS_default = { "@cogitator-ai/a2a": "0.8.6", "@cogitator-ai/ai-sdk": "0.6.1", "@cogitator-ai/browser": "0.4.16", "@cogitator-ai/channels": "0.11.2", "@cogitator-ai/cli": "0.7.4", "@cogitator-ai/config": "0.14.2", "@cogitator-ai/core": "0.39.1", "@cogitator-ai/deploy": "0.6.5", "@cogitator-ai/evals": "0.6.1", "@cogitator-ai/express": "0.8.6", "@cogitator-ai/fastify": "0.7.6", "@cogitator-ai/hono": "0.7.6", "@cogitator-ai/koa": "0.7.6", "@cogitator-ai/mcp": "19.3.6", "@cogitator-ai/memory": "0.12.6", "@cogitator-ai/models": "18.4.1", "@cogitator-ai/neuro-symbolic": "17.0.26", "@cogitator-ai/next": "0.8.6", "@cogitator-ai/openai-compat": "21.2.6", "@cogitator-ai/rag": "0.7.1", "@cogitator-ai/redis": "0.5.3", "@cogitator-ai/sandbox": "0.5.15", "@cogitator-ai/self-modifying": "19.4.6", "@cogitator-ai/server-shared": "0.5.6", "@cogitator-ai/studio": "0.1.6", "@cogitator-ai/swarms": "0.12.6", "@cogitator-ai/test-utils": "0.2.20", "@cogitator-ai/tetsu": "0.5.6", "@cogitator-ai/types": "0.41.1", "@cogitator-ai/voice": "0.5.6", "@cogitator-ai/wasm-tools": "0.7.20", "@cogitator-ai/worker": "0.9.6", "@cogitator-ai/workflows": "0.12.6" };
7
+ var define_COGITATOR_VERSIONS_default = { "@cogitator-ai/a2a": "0.8.7", "@cogitator-ai/ai-sdk": "0.6.1", "@cogitator-ai/browser": "0.4.17", "@cogitator-ai/channels": "0.11.3", "@cogitator-ai/cli": "0.8.1", "@cogitator-ai/config": "0.15.0", "@cogitator-ai/core": "0.40.0", "@cogitator-ai/deploy": "0.6.6", "@cogitator-ai/evals": "0.6.1", "@cogitator-ai/express": "0.8.7", "@cogitator-ai/fastify": "0.7.7", "@cogitator-ai/hono": "0.7.7", "@cogitator-ai/koa": "0.7.7", "@cogitator-ai/mcp": "19.3.7", "@cogitator-ai/memory": "0.12.7", "@cogitator-ai/models": "18.5.0", "@cogitator-ai/neuro-symbolic": "17.0.27", "@cogitator-ai/next": "0.8.7", "@cogitator-ai/openai-compat": "21.2.7", "@cogitator-ai/rag": "0.7.2", "@cogitator-ai/redis": "0.5.3", "@cogitator-ai/sandbox": "0.5.16", "@cogitator-ai/self-modifying": "19.4.7", "@cogitator-ai/server-shared": "0.5.7", "@cogitator-ai/studio": "0.1.7", "@cogitator-ai/swarms": "0.12.7", "@cogitator-ai/test-utils": "0.3.0", "@cogitator-ai/tetsu": "0.5.7", "@cogitator-ai/types": "0.42.0", "@cogitator-ai/voice": "0.5.7", "@cogitator-ai/wasm-tools": "0.7.21", "@cogitator-ai/worker": "0.9.7", "@cogitator-ai/workflows": "0.12.7" };
8
8
 
9
9
  // src/cli/main.ts
10
10
  import { relative as relative2 } from "path";
11
- import * as p2 from "@clack/prompts";
11
+ import * as p3 from "@clack/prompts";
12
12
  import pc2 from "picocolors";
13
13
 
14
14
  // src/kit/providers.ts
@@ -329,19 +329,12 @@ function describeKeyCheck(envKey, check) {
329
329
  }
330
330
 
331
331
  // src/kit/ollama.ts
332
+ import { resolveOllamaHost } from "@cogitator-ai/config";
332
333
  function isRecord(value) {
333
334
  return typeof value === "object" && value !== null && !Array.isArray(value);
334
335
  }
335
- function trimTrailingSlashes(value) {
336
- let end = value.length;
337
- while (end > 0 && value[end - 1] === "/") end--;
338
- return value.slice(0, end);
339
- }
340
336
  function resolveOllamaUrl(env = process.env) {
341
- const raw = env.OLLAMA_BASE_URL?.trim() || env.OLLAMA_HOST?.trim();
342
- if (!raw) return DEFAULT_OLLAMA_URL;
343
- const withScheme = /^https?:\/\//i.test(raw) ? raw : `http://${raw}`;
344
- return trimTrailingSlashes(withScheme);
337
+ return resolveOllamaHost(env.OLLAMA_BASE_URL) ?? DEFAULT_OLLAMA_URL;
345
338
  }
346
339
  async function listOllamaModels(baseUrl, timeoutMs = 2e3) {
347
340
  try {
@@ -549,16 +542,18 @@ function installErrorCode(output, exitCode) {
549
542
  }
550
543
  return /\bYN0001:/.test(output) ? "YN0001" : `EXIT_${exitCode}`;
551
544
  }
545
+ function yarnMajor(packageManagerSpec) {
546
+ const major = /^yarn@(\d+)/.exec(packageManagerSpec ?? "")?.[1];
547
+ return major === void 0 ? void 0 : Number.parseInt(major, 10);
548
+ }
552
549
  function ciInstallCommand(pm, packageManagerSpec) {
553
550
  switch (pm) {
554
551
  case "pnpm":
555
552
  return "pnpm install --frozen-lockfile";
556
553
  case "npm":
557
554
  return "npm ci";
558
- case "yarn": {
559
- const major = Number.parseInt(/^yarn@(\d+)/.exec(packageManagerSpec ?? "")?.[1] ?? "1", 10);
560
- return major >= 2 ? "yarn install --immutable" : "yarn install --frozen-lockfile";
561
- }
555
+ case "yarn":
556
+ return (yarnMajor(packageManagerSpec) ?? 1) >= 2 ? "yarn install --immutable" : "yarn install --frozen-lockfile";
562
557
  case "bun":
563
558
  return "bun install --frozen-lockfile";
564
559
  }
@@ -640,7 +635,7 @@ function yamlString(value) {
640
635
 
641
636
  // src/kit/versions.ts
642
637
  function scaffolderVersion() {
643
- return false ? "0.0.0" : "0.7.1";
638
+ return false ? "0.0.0" : "0.8.1";
644
639
  }
645
640
  function workspaceVersions() {
646
641
  return typeof define_COGITATOR_VERSIONS_default === "undefined" ? {} : define_COGITATOR_VERSIONS_default;
@@ -658,6 +653,8 @@ var VERSIONS = {
658
653
  typesNode: "^24.19.1",
659
654
  tsx: "^4.23.15",
660
655
  vitest: "^5.0.3",
656
+ /** A peer vitest requires and Yarn, unlike npm, pnpm and Bun, does not install by itself. */
657
+ vite: "^8.3.4",
661
658
  biome: "^2.5.15",
662
659
  express: "^5.2.1",
663
660
  typesExpress: "^5.0.6",
@@ -766,6 +763,24 @@ function emitPnpmWorkspace(project) {
766
763
  if (project.spec.packageManager !== "pnpm") return;
767
764
  project.file("pnpm-workspace.yaml", pnpmWorkspaceYaml([...project.nativeBuilds, "esbuild"]));
768
765
  }
766
+ var YARNRC_YML = "nodeLinker: node-modules\n";
767
+ var YARN_GITIGNORE = [
768
+ ".yarn/*",
769
+ "!.yarn/patches",
770
+ "!.yarn/plugins",
771
+ "!.yarn/releases",
772
+ "!.yarn/sdks",
773
+ "!.yarn/versions",
774
+ ".pnp.*"
775
+ ];
776
+ function wantsYarnrc(pm, packageManagerSpec) {
777
+ return pm === "yarn" && yarnMajor(packageManagerSpec) !== 1;
778
+ }
779
+ function emitYarnrc(project) {
780
+ if (!wantsYarnrc(project.spec.packageManager, project.packageManagerSpec)) return;
781
+ project.file(".yarnrc.yml", YARNRC_YML);
782
+ project.ignore(...YARN_GITIGNORE);
783
+ }
769
784
  function envExampleLine(variable) {
770
785
  const value = variable.secret ? "" : variable.example ?? "";
771
786
  const assignment = `${variable.name}=${value}`;
@@ -828,8 +843,11 @@ function emitEnvModule(project) {
828
843
  `
829
844
  );
830
845
  }
846
+ function composeLiteral(value) {
847
+ return value.replaceAll("$", "$$$$");
848
+ }
831
849
  function yamlList(items) {
832
- return `[${items.map((item) => JSON.stringify(item)).join(", ")}]`;
850
+ return `[${items.map((item) => JSON.stringify(composeLiteral(item))).join(", ")}]`;
833
851
  }
834
852
  function composeService(service) {
835
853
  const lines = [` ${service.name}:`, ` image: ${service.image}`];
@@ -839,7 +857,9 @@ function composeService(service) {
839
857
  if (service.environment) {
840
858
  lines.push(
841
859
  " environment:",
842
- ...Object.entries(service.environment).map(([k, v]) => ` ${k}: ${yamlString(v)}`)
860
+ ...Object.entries(service.environment).map(
861
+ ([k, v]) => ` ${k}: ${yamlString(composeLiteral(v))}`
862
+ )
843
863
  );
844
864
  }
845
865
  if (service.volumes?.length) {
@@ -1647,7 +1667,7 @@ var baseFeature = {
1647
1667
  apply(project) {
1648
1668
  const { spec } = project;
1649
1669
  const bun = runsOnBun(spec);
1650
- project.dependency("@cogitator-ai/core", cogitatorVersion("@cogitator-ai/core")).dependency("@cogitator-ai/config", cogitatorVersion("@cogitator-ai/config")).dependency("zod", VERSIONS.zod).devDependency("@cogitator-ai/cli", cogitatorVersion("@cogitator-ai/cli")).devDependency("@cogitator-ai/test-utils", cogitatorVersion("@cogitator-ai/test-utils")).devDependency("@biomejs/biome", VERSIONS.biome).devDependency("tsx", VERSIONS.tsx).devDependency("vitest", VERSIONS.vitest);
1670
+ project.dependency("@cogitator-ai/core", cogitatorVersion("@cogitator-ai/core")).dependency("@cogitator-ai/config", cogitatorVersion("@cogitator-ai/config")).dependency("zod", VERSIONS.zod).devDependency("@cogitator-ai/cli", cogitatorVersion("@cogitator-ai/cli")).devDependency("@cogitator-ai/test-utils", cogitatorVersion("@cogitator-ai/test-utils")).devDependency("@biomejs/biome", VERSIONS.biome).devDependency("tsx", VERSIONS.tsx).devDependency("vitest", VERSIONS.vitest).devDependency("vite", VERSIONS.vite);
1651
1671
  if (bun) {
1652
1672
  project.devDependency("@types/bun", VERSIONS.typesBun);
1653
1673
  } else {
@@ -4909,6 +4929,9 @@ var swarmsFeature = {
4909
4929
  };
4910
4930
 
4911
4931
  // src/kit/features/provider.ts
4932
+ function shellWord(value) {
4933
+ return /^[\w.:/@+-]+$/.test(value) ? value : `'${value.replaceAll("'", `'\\''`)}'`;
4934
+ }
4912
4935
  var providerFeature = {
4913
4936
  id: "provider",
4914
4937
  applies: () => true,
@@ -4938,8 +4961,13 @@ var providerFeature = {
4938
4961
  image: IMAGES.ollama,
4939
4962
  dependsOn: { ollama: "service_healthy" },
4940
4963
  environment: { OLLAMA_HOST: "http://ollama:11434" },
4941
- entrypoint: ["/bin/sh", "-c", models.map((model) => `ollama pull ${model}`).join(" && ")],
4942
- restart: "no"
4964
+ entrypoint: [
4965
+ "/bin/sh",
4966
+ "-c",
4967
+ models.map((model) => `ollama pull ${shellWord(model)}`).join(" && ")
4968
+ ],
4969
+ restart: "no",
4970
+ oneShot: true
4943
4971
  });
4944
4972
  }
4945
4973
  project.section(
@@ -5793,13 +5821,18 @@ function nextSteps(project, state) {
5793
5821
  steps.push({ command: "cp .env.example .env", note: `then set ${info.envKey} in .env` });
5794
5822
  }
5795
5823
  if (spec.provider === "ollama" && !state.modelReady) {
5796
- steps.push({
5797
- command: `ollama pull ${bareModel(spec)}`,
5798
- note: spec.compose ? "or let `docker compose up -d` pull it into the Ollama container" : "download the model the agents use"
5799
- });
5824
+ steps.push(
5825
+ spec.compose && state.modelPulling ? {
5826
+ command: "docker compose logs -f ollama-pull",
5827
+ note: `the Ollama container is pulling ${bareModel(spec)}, wait for it to finish`
5828
+ } : {
5829
+ command: `ollama pull ${bareModel(spec)}`,
5830
+ note: spec.compose ? "or let `docker compose up -d` pull it into the Ollama container" : "download the model the agents use"
5831
+ }
5832
+ );
5800
5833
  }
5801
5834
  const services = backingServices(project);
5802
- if (spec.compose && services.length > 0) {
5835
+ if (spec.compose && services.length > 0 && !state.servicesStarted) {
5803
5836
  steps.push({ command: "docker compose up -d", note: `starts ${services.join(", ")}` });
5804
5837
  }
5805
5838
  steps.push(...project.nextSteps);
@@ -6055,6 +6088,7 @@ function planProject(input, options = {}) {
6055
6088
  emitCompose(project);
6056
6089
  emitCogitatorYml(project);
6057
6090
  emitPnpmWorkspace(project);
6091
+ emitYarnrc(project);
6058
6092
  emitGitignore(project);
6059
6093
  emitAgentsMd(project);
6060
6094
  emitReadme(project);
@@ -6077,6 +6111,7 @@ function planProject(input, options = {}) {
6077
6111
  scripts: Object.fromEntries(project.scripts),
6078
6112
  env: [...project.env.values()],
6079
6113
  services: spec.compose ? [...project.services.keys()] : [],
6114
+ oneShotServices: spec.compose ? [...project.services.values()].filter((service) => service.oneShot).map((s) => s.name) : [],
6080
6115
  warnings: [...project.warnings],
6081
6116
  command,
6082
6117
  nextSteps: (state) => nextSteps(project, state)
@@ -6281,6 +6316,7 @@ async function installDependencies(directory, pm, inherit) {
6281
6316
  const result = await runCommand(invocation.command, invocation.args, {
6282
6317
  cwd: directory,
6283
6318
  inherit,
6319
+ ...pm === "yarn" && { env: { ...process.env, YARN_ENABLE_IMMUTABLE_INSTALLS: "false" } },
6284
6320
  ...!invocation.fromPath && { shell: false }
6285
6321
  });
6286
6322
  if (result.code !== 0) {
@@ -6303,34 +6339,34 @@ function assertEmptyDirectory(directory) {
6303
6339
  }
6304
6340
  }
6305
6341
  async function scaffold(spec, options) {
6306
- const log2 = options.log ?? silentLogger;
6342
+ const log3 = options.log ?? silentLogger;
6307
6343
  const directory = resolve(options.directory);
6308
6344
  const plan = planProject(spec, options);
6309
6345
  assertEmptyDirectory(directory);
6310
- log2.start("Writing project files");
6346
+ log3.start("Writing project files");
6311
6347
  await mkdir(directory, { recursive: true });
6312
6348
  await writeFiles(directory, plan.files);
6313
- log2.done(`Wrote ${plan.files.length} files`);
6349
+ log3.done(`Wrote ${plan.files.length} files`);
6314
6350
  let install = { status: "skipped", reason: "install was turned off" };
6315
6351
  if (options.install !== false) {
6316
- log2.start(`Installing dependencies with ${plan.spec.packageManager}`);
6352
+ log3.start(`Installing dependencies with ${plan.spec.packageManager}`);
6317
6353
  install = await installDependencies(
6318
6354
  directory,
6319
6355
  plan.spec.packageManager,
6320
6356
  options.inheritOutput ?? false
6321
6357
  );
6322
- if (install.status === "done") log2.done("Installed dependencies");
6358
+ if (install.status === "done") log3.done("Installed dependencies");
6323
6359
  else
6324
- log2.fail(
6360
+ log3.fail(
6325
6361
  `Could not install dependencies, run "${installCommand(plan.spec.packageManager)}" yourself`
6326
6362
  );
6327
6363
  }
6328
6364
  let format = { status: "skipped", reason: "dependencies are not installed" };
6329
6365
  if (install.status === "done") {
6330
- log2.start("Formatting the code");
6366
+ log3.start("Formatting the code");
6331
6367
  format = await formatProject(directory);
6332
- if (format.status === "done") log2.done("Formatted the code");
6333
- else if (format.status === "failed") log2.warn(format.error.message);
6368
+ if (format.status === "done") log3.done("Formatted the code");
6369
+ else if (format.status === "failed") log3.warn(format.error.message);
6334
6370
  }
6335
6371
  await writeLock(
6336
6372
  directory,
@@ -6338,11 +6374,11 @@ async function scaffold(spec, options) {
6338
6374
  );
6339
6375
  let git = { status: "skipped", reason: "git was turned off" };
6340
6376
  if (options.git !== false) {
6341
- log2.start("Creating a git repository");
6377
+ log3.start("Creating a git repository");
6342
6378
  git = await initGit(directory);
6343
- if (git.status === "done") log2.done("Created a git repository with the first commit");
6344
- else if (git.status === "skipped") log2.done(`Skipped git: ${git.reason}`);
6345
- else log2.fail(git.error.message);
6379
+ if (git.status === "done") log3.done("Created a git repository with the first commit");
6380
+ else if (git.status === "skipped") log3.done(`Skipped git: ${git.reason}`);
6381
+ else log3.fail(git.error.message);
6346
6382
  }
6347
6383
  const parentWorkspace = enclosingWorkspace(directory);
6348
6384
  return {
@@ -6684,13 +6720,22 @@ function planExample(example, options) {
6684
6720
  include: ["src"]
6685
6721
  };
6686
6722
  const secrets = Object.entries(options.secrets ?? {}).filter(([, value]) => value !== "");
6723
+ const yarnrc = wantsYarnrc(pm, void 0);
6687
6724
  const files = [
6688
6725
  { path: "package.json", content: JSON.stringify(manifest, null, 2) + "\n" },
6689
6726
  { path: "tsconfig.json", content: JSON.stringify(tsconfig2, null, 2) + "\n" },
6690
6727
  { path: "README.md", content: readme },
6691
6728
  {
6692
6729
  path: ".gitignore",
6693
- content: ["node_modules/", "dist/", ".env", "*.log", ".DS_Store", ""].join("\n")
6730
+ content: [
6731
+ "node_modules/",
6732
+ "dist/",
6733
+ ".env",
6734
+ "*.log",
6735
+ ".DS_Store",
6736
+ ...yarnrc ? YARN_GITIGNORE : [],
6737
+ ""
6738
+ ].join("\n")
6694
6739
  },
6695
6740
  ...env.length > 0 ? [{ path: ".env.example", content: envExample }] : [],
6696
6741
  ...secrets.length > 0 ? [
@@ -6705,7 +6750,8 @@ function planExample(example, options) {
6705
6750
  path: "pnpm-workspace.yaml",
6706
6751
  content: pnpmWorkspaceYaml(native)
6707
6752
  }
6708
- ] : []
6753
+ ] : [],
6754
+ ...yarnrc ? [{ path: ".yarnrc.yml", content: YARNRC_YML }] : []
6709
6755
  ];
6710
6756
  return { example, ref, files, remoteFiles: example.files, command, scripts };
6711
6757
  }
@@ -6867,20 +6913,20 @@ import { existsSync as existsSync5, readFileSync as readFileSync3 } from "fs";
6867
6913
  import { mkdir as mkdir3, readdir, rm } from "fs/promises";
6868
6914
  import { join as join6, relative, resolve as resolve2 } from "path";
6869
6915
  async function finish2(directory, packageManager, options) {
6870
- const log2 = options.log ?? silentLogger;
6916
+ const log3 = options.log ?? silentLogger;
6871
6917
  let install = { status: "skipped", reason: "install was turned off" };
6872
6918
  if (options.install !== false) {
6873
- log2.start(`Installing dependencies with ${packageManager}`);
6919
+ log3.start(`Installing dependencies with ${packageManager}`);
6874
6920
  install = await installDependencies(directory, packageManager, options.inheritOutput ?? false);
6875
- if (install.status === "done") log2.done("Installed dependencies");
6921
+ if (install.status === "done") log3.done("Installed dependencies");
6876
6922
  else
6877
- log2.fail(`Could not install dependencies, run "${installCommand(packageManager)}" yourself`);
6923
+ log3.fail(`Could not install dependencies, run "${installCommand(packageManager)}" yourself`);
6878
6924
  }
6879
6925
  let git = { status: "skipped", reason: "git was turned off" };
6880
6926
  if (options.git !== false) {
6881
6927
  git = await initGit(directory);
6882
- if (git.status === "done") log2.done("Created a git repository with the first commit");
6883
- else if (git.status === "failed") log2.fail(git.error.message);
6928
+ if (git.status === "done") log3.done("Created a git repository with the first commit");
6929
+ else if (git.status === "failed") log3.fail(git.error.message);
6884
6930
  }
6885
6931
  return { install, git };
6886
6932
  }
@@ -6905,15 +6951,15 @@ function resolveExample(argument, options) {
6905
6951
  });
6906
6952
  }
6907
6953
  async function createFromExample(plan, options) {
6908
- const log2 = options.log ?? silentLogger;
6954
+ const log3 = options.log ?? silentLogger;
6909
6955
  const directory = resolve2(options.directory);
6910
6956
  assertEmptyDirectory(directory);
6911
- log2.start(`Downloading the ${plan.example.name} example from ${plan.ref}`);
6957
+ log3.start(`Downloading the ${plan.example.name} example from ${plan.ref}`);
6912
6958
  const fetched = await fetchExampleFiles(plan, options.fetch);
6913
6959
  await mkdir3(directory, { recursive: true });
6914
6960
  const files = [...plan.files, ...fetched];
6915
6961
  await writeFiles(directory, files);
6916
- log2.done(`Wrote ${files.length} files`);
6962
+ log3.done(`Wrote ${files.length} files`);
6917
6963
  const { install, git } = await finish2(directory, options.packageManager, options);
6918
6964
  return {
6919
6965
  directory,
@@ -6933,11 +6979,11 @@ async function createFromExample(plan, options) {
6933
6979
  };
6934
6980
  }
6935
6981
  async function createFromTemplate(template, options) {
6936
- const log2 = options.log ?? silentLogger;
6982
+ const log3 = options.log ?? silentLogger;
6937
6983
  const directory = resolve2(options.directory);
6938
6984
  assertEmptyDirectory(directory);
6939
6985
  const existed = existsSync5(directory);
6940
- log2.start(`Downloading ${describeTemplate(template)}`);
6986
+ log3.start(`Downloading ${describeTemplate(template)}`);
6941
6987
  let downloaded;
6942
6988
  let prepared;
6943
6989
  try {
@@ -6947,7 +6993,7 @@ async function createFromTemplate(template, options) {
6947
6993
  });
6948
6994
  prepared = prepareTemplate(directory, { name: options.name });
6949
6995
  } catch (error) {
6950
- log2.fail(`Could not use ${describeTemplate(template)}`);
6996
+ log3.fail(`Could not use ${describeTemplate(template)}`);
6951
6997
  if (existed) {
6952
6998
  for (const entry of await readdir(directory)) {
6953
6999
  await rm(join6(directory, entry), { recursive: true, force: true });
@@ -6957,7 +7003,7 @@ async function createFromTemplate(template, options) {
6957
7003
  }
6958
7004
  throw error;
6959
7005
  }
6960
- log2.done(`Wrote ${downloaded.files.length} files`);
7006
+ log3.done(`Wrote ${downloaded.files.length} files`);
6961
7007
  const packageManager = prepared.packageManager ?? options.packageManager;
6962
7008
  const notes = [
6963
7009
  ...prepared.packageManager && prepared.packageManager !== options.packageManager ? [
@@ -7538,10 +7584,10 @@ async function askMissing(args) {
7538
7584
  }
7539
7585
  const provider = next.provider;
7540
7586
  if (next.model === void 0) {
7541
- const spinner3 = p.spinner();
7542
- spinner3.start("Looking up models");
7587
+ const spinner4 = p.spinner();
7588
+ spinner4.start("Looking up models");
7543
7589
  const { choices, source } = await modelChoices(provider);
7544
- spinner3.stop(
7590
+ spinner4.stop(
7545
7591
  source === "ollama" ? "Found the models in your Ollama" : source === "suggested" ? "Ollama is not running, so here are good small models to pull" : `Found the current ${providerInfo(provider).label} models`
7546
7592
  );
7547
7593
  const picked = answer(
@@ -7662,6 +7708,94 @@ async function askStack(args) {
7662
7708
  return result;
7663
7709
  }
7664
7710
 
7711
+ // src/cli/services.ts
7712
+ import * as p2 from "@clack/prompts";
7713
+
7714
+ // src/kit/services.ts
7715
+ var SERVICES_WAIT_SECONDS = 180;
7716
+ var START_TIMEOUT_MS = 15 * 6e4;
7717
+ async function dockerComposeAvailable(cwd) {
7718
+ try {
7719
+ const compose = await runCommand("docker", ["compose", "version"], { cwd, timeoutMs: 1e4 });
7720
+ if (compose.code !== 0) return false;
7721
+ const daemon = await runCommand("docker", ["info", "--format", "{{.ServerVersion}}"], {
7722
+ cwd,
7723
+ timeoutMs: 15e3
7724
+ });
7725
+ return daemon.code === 0;
7726
+ } catch {
7727
+ return false;
7728
+ }
7729
+ }
7730
+ function longRunningServices(plan) {
7731
+ return plan.services.filter((name) => !plan.oneShotServices.includes(name));
7732
+ }
7733
+ async function composeUp(directory, args) {
7734
+ const started = Date.now();
7735
+ try {
7736
+ const result = await runCommand("docker", ["compose", "up", "--detach", ...args], {
7737
+ cwd: directory,
7738
+ timeoutMs: START_TIMEOUT_MS
7739
+ });
7740
+ if (result.code === 0) return { status: "done" };
7741
+ const reason = Date.now() - started >= START_TIMEOUT_MS ? `did not finish within ${START_TIMEOUT_MS / 6e4} minutes` : `exited with ${result.code}`;
7742
+ return {
7743
+ status: "failed",
7744
+ error: new Error(`docker compose up ${reason}:
7745
+ ${tail(result.output)}`)
7746
+ };
7747
+ } catch (error) {
7748
+ return { status: "failed", error: error instanceof Error ? error : new Error(String(error)) };
7749
+ }
7750
+ }
7751
+ async function startServices(directory, plan) {
7752
+ if (plan.services.length === 0)
7753
+ return { status: "skipped", reason: "the project has no compose services" };
7754
+ const longRunning = longRunningServices(plan);
7755
+ if (longRunning.length > 0) {
7756
+ const started = await composeUp(directory, [
7757
+ "--wait",
7758
+ "--wait-timeout",
7759
+ String(SERVICES_WAIT_SECONDS),
7760
+ ...longRunning
7761
+ ]);
7762
+ if (started.status !== "done") return started;
7763
+ }
7764
+ const oneShot = plan.services.filter((name) => plan.oneShotServices.includes(name));
7765
+ return oneShot.length > 0 ? composeUp(directory, oneShot) : { status: "done" };
7766
+ }
7767
+
7768
+ // src/cli/services.ts
7769
+ var OLLAMA_SERVICES = /* @__PURE__ */ new Set(["ollama", "ollama-pull"]);
7770
+ async function servicesToStart(plan, ollamaUrl = resolveOllamaUrl()) {
7771
+ if (!plan.services.includes("ollama")) return plan;
7772
+ if (await listOllamaModels(ollamaUrl) === void 0) return plan;
7773
+ return {
7774
+ services: plan.services.filter((name) => !OLLAMA_SERVICES.has(name)),
7775
+ oneShotServices: plan.oneShotServices.filter((name) => !OLLAMA_SERVICES.has(name))
7776
+ };
7777
+ }
7778
+ async function offerServices(directory, plan) {
7779
+ const names = longRunningServices(plan);
7780
+ if (names.length === 0 || !await dockerComposeAvailable(directory)) return false;
7781
+ const list = names.join(", ");
7782
+ const start = await p2.confirm({
7783
+ message: `Start ${list} with docker compose now?`,
7784
+ initialValue: true
7785
+ });
7786
+ if (p2.isCancel(start) || !start) return false;
7787
+ const spinner4 = p2.spinner();
7788
+ spinner4.start(`Starting ${list} (the first start pulls the images)`);
7789
+ const started = await startServices(directory, plan);
7790
+ if (started.status === "done") {
7791
+ spinner4.stop(`Started ${list}`);
7792
+ return true;
7793
+ }
7794
+ spinner4.error('Not every service started, run "docker compose up -d" once the cause is fixed');
7795
+ if (started.status === "failed") p2.log.warn(started.error.message);
7796
+ return false;
7797
+ }
7798
+
7665
7799
  // src/cli/main.ts
7666
7800
  var defaultIo = {
7667
7801
  stdout: (text2) => process.stdout.write(text2),
@@ -7673,12 +7807,12 @@ function banner(version) {
7673
7807
  `;
7674
7808
  }
7675
7809
  function clackLogger() {
7676
- const spinner3 = p2.spinner();
7810
+ const spinner4 = p3.spinner();
7677
7811
  return {
7678
- start: (message) => spinner3.start(message),
7679
- done: (message) => spinner3.stop(message),
7680
- fail: (message) => spinner3.error(message),
7681
- warn: (message) => p2.log.warn(message)
7812
+ start: (message) => spinner4.start(message),
7813
+ done: (message) => spinner4.stop(message),
7814
+ fail: (message) => spinner4.error(message),
7815
+ warn: (message) => p3.log.warn(message)
7682
7816
  };
7683
7817
  }
7684
7818
  function stepJson(step) {
@@ -7746,40 +7880,40 @@ async function prepareOllama(plan, interactive) {
7746
7880
  const installed = await listOllamaModels(baseUrl);
7747
7881
  if (!installed) {
7748
7882
  if (interactive)
7749
- p2.log.warn(
7883
+ p3.log.warn(
7750
7884
  `Ollama is not running at ${baseUrl}. Start it and pull ${model} before the first run.`
7751
7885
  );
7752
7886
  return false;
7753
7887
  }
7754
7888
  if (hasOllamaModel(installed, model)) return true;
7755
7889
  if (!interactive) return false;
7756
- const pull = await p2.confirm({
7890
+ const pull = await p3.confirm({
7757
7891
  message: `${model} is not in your Ollama yet. Pull it now?`,
7758
7892
  initialValue: true
7759
7893
  });
7760
- if (p2.isCancel(pull) || !pull) return false;
7761
- const spinner3 = p2.spinner();
7762
- spinner3.start(`Pulling ${model}`);
7894
+ if (p3.isCancel(pull) || !pull) return false;
7895
+ const spinner4 = p3.spinner();
7896
+ spinner4.start(`Pulling ${model}`);
7763
7897
  try {
7764
7898
  await pullOllamaModel(
7765
7899
  baseUrl,
7766
7900
  model,
7767
- (status) => spinner3.message(`Pulling ${model}: ${status}`)
7901
+ (status) => spinner4.message(`Pulling ${model}: ${status}`)
7768
7902
  );
7769
- spinner3.stop(`Pulled ${model}`);
7903
+ spinner4.stop(`Pulled ${model}`);
7770
7904
  return true;
7771
7905
  } catch (error) {
7772
- spinner3.error(error instanceof Error ? error.message : `Could not pull ${model}`);
7906
+ spinner4.error(error instanceof Error ? error.message : `Could not pull ${model}`);
7773
7907
  return false;
7774
7908
  }
7775
7909
  }
7776
- function outro2(result, args, modelReady) {
7910
+ function outro2(result, args, state) {
7777
7911
  const directory = relative2(process.cwd(), result.directory);
7778
7912
  const steps = result.plan.nextSteps({
7779
7913
  directory: directory || void 0,
7780
7914
  installed: result.install.status === "done",
7781
7915
  keyWritten: args.apiKey !== void 0,
7782
- modelReady
7916
+ ...state
7783
7917
  });
7784
7918
  return [
7785
7919
  `${pc2.green("Your project is ready.")} Next:`,
@@ -7836,8 +7970,8 @@ async function run(argv, io = defaultIo, deps = {}) {
7836
7970
  ` : exampleList());
7837
7971
  return 0;
7838
7972
  }
7839
- const interactive = isInteractive(args);
7840
7973
  const env = deps.env ?? process.env;
7974
+ const interactive = isInteractive(args, env, deps.stdin ?? process.stdin);
7841
7975
  const telemetry = telemetryDisabledReason({
7842
7976
  flag: args.telemetry,
7843
7977
  dryRun: args.dryRun,
@@ -7858,7 +7992,7 @@ async function run(argv, io = defaultIo, deps = {}) {
7858
7992
  return 0;
7859
7993
  } catch (error) {
7860
7994
  if (error instanceof CancelledError) {
7861
- p2.cancel("Cancelled, nothing was created.");
7995
+ p3.cancel("Cancelled, nothing was created.");
7862
7996
  return 1;
7863
7997
  }
7864
7998
  await report(telemetry, deps, payloadFor(void 0, { step: "create", error }, kind));
@@ -7870,7 +8004,7 @@ async function run(argv, io = defaultIo, deps = {}) {
7870
8004
  try {
7871
8005
  if (interactive) {
7872
8006
  io.stderr(banner(version));
7873
- p2.intro(pc2.cyan("Let's build something with agents"));
8007
+ p3.intro(pc2.cyan("Let's build something with agents"));
7874
8008
  args = await askMissing(args);
7875
8009
  }
7876
8010
  const { path: directory, name } = resolveDirectory(args.directory ?? DEFAULT_DIRECTORY);
@@ -7902,7 +8036,11 @@ async function run(argv, io = defaultIo, deps = {}) {
7902
8036
  });
7903
8037
  reported = true;
7904
8038
  await report(telemetry, deps, payloadFor(result.plan.spec, installFailure(result)));
7905
- const modelReady = result.plan.spec.provider === "ollama" ? await prepareOllama(result.plan, interactive) : true;
8039
+ const services = interactive ? await servicesToStart(result.plan) : void 0;
8040
+ const servicesStarted = services !== void 0 && await offerServices(result.directory, services);
8041
+ const pullingInCompose = servicesStarted && services.services.includes("ollama");
8042
+ const modelReady = result.plan.spec.provider === "ollama" ? await prepareOllama(result.plan, interactive && !pullingInCompose) : true;
8043
+ const setup = { modelReady, servicesStarted, modelPulling: pullingInCompose && !modelReady };
7906
8044
  const key = envKey ? args.apiKey ?? process.env[envKey] : void 0;
7907
8045
  const provider = result.plan.spec.provider;
7908
8046
  let keyCheck;
@@ -7932,20 +8070,20 @@ async function run(argv, io = defaultIo, deps = {}) {
7932
8070
  );
7933
8071
  return 0;
7934
8072
  }
7935
- if (keyCheck) p2.log.info(keyCheck);
8073
+ if (keyCheck) p3.log.info(keyCheck);
7936
8074
  if (result.parentWorkspace) {
7937
- p2.log.info(
8075
+ p3.log.info(
7938
8076
  `The project is inside the workspace at ${result.parentWorkspace}. Add ${relative2(result.parentWorkspace, result.directory)} to its workspace packages to share one install.`
7939
8077
  );
7940
8078
  }
7941
- for (const warning of result.plan.warnings) p2.log.warn(warning);
7942
- if (interactive) p2.outro(outro2(result, args, modelReady));
7943
- else io.stderr(`${outro2(result, args, modelReady)}
8079
+ for (const warning of result.plan.warnings) p3.log.warn(warning);
8080
+ if (interactive) p3.outro(outro2(result, args, setup));
8081
+ else io.stderr(`${outro2(result, args, setup)}
7944
8082
  `);
7945
8083
  return 0;
7946
8084
  } catch (error) {
7947
8085
  if (error instanceof CancelledError) {
7948
- p2.cancel("Cancelled, nothing was created.");
8086
+ p3.cancel("Cancelled, nothing was created.");
7949
8087
  return 1;
7950
8088
  }
7951
8089
  if (resolvedSpec && !reported)
@@ -7984,7 +8122,7 @@ async function runStarter(args, interactive, io, deps) {
7984
8122
  }
7985
8123
  if (interactive) {
7986
8124
  io.stderr(banner(scaffolderVersion()));
7987
- p2.intro(pc2.cyan("Let's build something with agents"));
8125
+ p3.intro(pc2.cyan("Let's build something with agents"));
7988
8126
  }
7989
8127
  const directoryArg = args.directory ?? (interactive ? await askDirectory() : DEFAULT_DIRECTORY);
7990
8128
  const { path: directory, name } = resolveDirectory(directoryArg);
@@ -8069,8 +8207,8 @@ async function runStarter(args, interactive, io, deps) {
8069
8207
  );
8070
8208
  return result;
8071
8209
  }
8072
- for (const note of result.notes) p2.log.info(note);
8073
- if (interactive) p2.outro(starterOutro(result));
8210
+ for (const note of result.notes) p3.log.info(note);
8211
+ if (interactive) p3.outro(starterOutro(result));
8074
8212
  else io.stderr(`${starterOutro(result)}
8075
8213
  `);
8076
8214
  return result;