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/lib.js CHANGED
@@ -1,8 +1,8 @@
1
1
  // <define:__COGITATOR_EXAMPLES__>
2
- 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" }];
2
+ 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" }];
3
3
 
4
4
  // <define:__COGITATOR_VERSIONS__>
5
- 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" };
5
+ 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" };
6
6
 
7
7
  // src/kit/scaffold.ts
8
8
  import { createHash } from "crypto";
@@ -248,16 +248,18 @@ function installErrorCode(output, exitCode) {
248
248
  }
249
249
  return /\bYN0001:/.test(output) ? "YN0001" : `EXIT_${exitCode}`;
250
250
  }
251
+ function yarnMajor(packageManagerSpec) {
252
+ const major = /^yarn@(\d+)/.exec(packageManagerSpec ?? "")?.[1];
253
+ return major === void 0 ? void 0 : Number.parseInt(major, 10);
254
+ }
251
255
  function ciInstallCommand(pm, packageManagerSpec) {
252
256
  switch (pm) {
253
257
  case "pnpm":
254
258
  return "pnpm install --frozen-lockfile";
255
259
  case "npm":
256
260
  return "npm ci";
257
- case "yarn": {
258
- const major = Number.parseInt(/^yarn@(\d+)/.exec(packageManagerSpec ?? "")?.[1] ?? "1", 10);
259
- return major >= 2 ? "yarn install --immutable" : "yarn install --frozen-lockfile";
260
- }
261
+ case "yarn":
262
+ return (yarnMajor(packageManagerSpec) ?? 1) >= 2 ? "yarn install --immutable" : "yarn install --frozen-lockfile";
261
263
  case "bun":
262
264
  return "bun install --frozen-lockfile";
263
265
  }
@@ -518,7 +520,7 @@ function yamlString(value) {
518
520
 
519
521
  // src/kit/versions.ts
520
522
  function scaffolderVersion() {
521
- return false ? "0.0.0" : "0.7.1";
523
+ return false ? "0.0.0" : "0.8.1";
522
524
  }
523
525
  function workspaceVersions() {
524
526
  return typeof define_COGITATOR_VERSIONS_default === "undefined" ? {} : define_COGITATOR_VERSIONS_default;
@@ -539,6 +541,8 @@ var VERSIONS = {
539
541
  typesNode: "^24.19.1",
540
542
  tsx: "^4.23.15",
541
543
  vitest: "^5.0.3",
544
+ /** A peer vitest requires and Yarn, unlike npm, pnpm and Bun, does not install by itself. */
545
+ vite: "^8.3.4",
542
546
  biome: "^2.5.15",
543
547
  express: "^5.2.1",
544
548
  typesExpress: "^5.0.6",
@@ -647,6 +651,24 @@ function emitPnpmWorkspace(project) {
647
651
  if (project.spec.packageManager !== "pnpm") return;
648
652
  project.file("pnpm-workspace.yaml", pnpmWorkspaceYaml([...project.nativeBuilds, "esbuild"]));
649
653
  }
654
+ var YARNRC_YML = "nodeLinker: node-modules\n";
655
+ var YARN_GITIGNORE = [
656
+ ".yarn/*",
657
+ "!.yarn/patches",
658
+ "!.yarn/plugins",
659
+ "!.yarn/releases",
660
+ "!.yarn/sdks",
661
+ "!.yarn/versions",
662
+ ".pnp.*"
663
+ ];
664
+ function wantsYarnrc(pm, packageManagerSpec) {
665
+ return pm === "yarn" && yarnMajor(packageManagerSpec) !== 1;
666
+ }
667
+ function emitYarnrc(project) {
668
+ if (!wantsYarnrc(project.spec.packageManager, project.packageManagerSpec)) return;
669
+ project.file(".yarnrc.yml", YARNRC_YML);
670
+ project.ignore(...YARN_GITIGNORE);
671
+ }
650
672
  function envExampleLine(variable) {
651
673
  const value = variable.secret ? "" : variable.example ?? "";
652
674
  const assignment = `${variable.name}=${value}`;
@@ -709,8 +731,11 @@ function emitEnvModule(project) {
709
731
  `
710
732
  );
711
733
  }
734
+ function composeLiteral(value) {
735
+ return value.replaceAll("$", "$$$$");
736
+ }
712
737
  function yamlList(items) {
713
- return `[${items.map((item) => JSON.stringify(item)).join(", ")}]`;
738
+ return `[${items.map((item) => JSON.stringify(composeLiteral(item))).join(", ")}]`;
714
739
  }
715
740
  function composeService(service) {
716
741
  const lines2 = [` ${service.name}:`, ` image: ${service.image}`];
@@ -720,7 +745,9 @@ function composeService(service) {
720
745
  if (service.environment) {
721
746
  lines2.push(
722
747
  " environment:",
723
- ...Object.entries(service.environment).map(([k, v]) => ` ${k}: ${yamlString(v)}`)
748
+ ...Object.entries(service.environment).map(
749
+ ([k, v]) => ` ${k}: ${yamlString(composeLiteral(v))}`
750
+ )
724
751
  );
725
752
  }
726
753
  if (service.volumes?.length) {
@@ -1528,7 +1555,7 @@ var baseFeature = {
1528
1555
  apply(project) {
1529
1556
  const { spec } = project;
1530
1557
  const bun = runsOnBun(spec);
1531
- 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);
1558
+ 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);
1532
1559
  if (bun) {
1533
1560
  project.devDependency("@types/bun", VERSIONS.typesBun);
1534
1561
  } else {
@@ -4790,6 +4817,9 @@ var swarmsFeature = {
4790
4817
  };
4791
4818
 
4792
4819
  // src/kit/features/provider.ts
4820
+ function shellWord(value) {
4821
+ return /^[\w.:/@+-]+$/.test(value) ? value : `'${value.replaceAll("'", `'\\''`)}'`;
4822
+ }
4793
4823
  var providerFeature = {
4794
4824
  id: "provider",
4795
4825
  applies: () => true,
@@ -4819,8 +4849,13 @@ var providerFeature = {
4819
4849
  image: IMAGES.ollama,
4820
4850
  dependsOn: { ollama: "service_healthy" },
4821
4851
  environment: { OLLAMA_HOST: "http://ollama:11434" },
4822
- entrypoint: ["/bin/sh", "-c", models.map((model) => `ollama pull ${model}`).join(" && ")],
4823
- restart: "no"
4852
+ entrypoint: [
4853
+ "/bin/sh",
4854
+ "-c",
4855
+ models.map((model) => `ollama pull ${shellWord(model)}`).join(" && ")
4856
+ ],
4857
+ restart: "no",
4858
+ oneShot: true
4824
4859
  });
4825
4860
  }
4826
4861
  project.section(
@@ -5674,13 +5709,18 @@ function nextSteps(project, state) {
5674
5709
  steps.push({ command: "cp .env.example .env", note: `then set ${info.envKey} in .env` });
5675
5710
  }
5676
5711
  if (spec.provider === "ollama" && !state.modelReady) {
5677
- steps.push({
5678
- command: `ollama pull ${bareModel(spec)}`,
5679
- note: spec.compose ? "or let `docker compose up -d` pull it into the Ollama container" : "download the model the agents use"
5680
- });
5712
+ steps.push(
5713
+ spec.compose && state.modelPulling ? {
5714
+ command: "docker compose logs -f ollama-pull",
5715
+ note: `the Ollama container is pulling ${bareModel(spec)}, wait for it to finish`
5716
+ } : {
5717
+ command: `ollama pull ${bareModel(spec)}`,
5718
+ note: spec.compose ? "or let `docker compose up -d` pull it into the Ollama container" : "download the model the agents use"
5719
+ }
5720
+ );
5681
5721
  }
5682
5722
  const services = backingServices(project);
5683
- if (spec.compose && services.length > 0) {
5723
+ if (spec.compose && services.length > 0 && !state.servicesStarted) {
5684
5724
  steps.push({ command: "docker compose up -d", note: `starts ${services.join(", ")}` });
5685
5725
  }
5686
5726
  steps.push(...project.nextSteps);
@@ -5937,6 +5977,7 @@ function planProject(input, options = {}) {
5937
5977
  emitCompose(project);
5938
5978
  emitCogitatorYml(project);
5939
5979
  emitPnpmWorkspace(project);
5980
+ emitYarnrc(project);
5940
5981
  emitGitignore(project);
5941
5982
  emitAgentsMd(project);
5942
5983
  emitReadme(project);
@@ -5959,6 +6000,7 @@ function planProject(input, options = {}) {
5959
6000
  scripts: Object.fromEntries(project.scripts),
5960
6001
  env: [...project.env.values()],
5961
6002
  services: spec.compose ? [...project.services.keys()] : [],
6003
+ oneShotServices: spec.compose ? [...project.services.values()].filter((service) => service.oneShot).map((s) => s.name) : [],
5962
6004
  warnings: [...project.warnings],
5963
6005
  command,
5964
6006
  nextSteps: (state) => nextSteps(project, state)
@@ -6166,6 +6208,7 @@ async function installDependencies(directory, pm, inherit) {
6166
6208
  const result = await runCommand(invocation.command, invocation.args, {
6167
6209
  cwd: directory,
6168
6210
  inherit,
6211
+ ...pm === "yarn" && { env: { ...process.env, YARN_ENABLE_IMMUTABLE_INSTALLS: "false" } },
6169
6212
  ...!invocation.fromPath && { shell: false }
6170
6213
  });
6171
6214
  if (result.code !== 0) {
@@ -6188,34 +6231,34 @@ function assertEmptyDirectory(directory) {
6188
6231
  }
6189
6232
  }
6190
6233
  async function scaffold(spec, options) {
6191
- const log2 = options.log ?? silentLogger;
6234
+ const log3 = options.log ?? silentLogger;
6192
6235
  const directory = resolve(options.directory);
6193
6236
  const plan = planProject(spec, options);
6194
6237
  assertEmptyDirectory(directory);
6195
- log2.start("Writing project files");
6238
+ log3.start("Writing project files");
6196
6239
  await mkdir(directory, { recursive: true });
6197
6240
  await writeFiles(directory, plan.files);
6198
- log2.done(`Wrote ${plan.files.length} files`);
6241
+ log3.done(`Wrote ${plan.files.length} files`);
6199
6242
  let install = { status: "skipped", reason: "install was turned off" };
6200
6243
  if (options.install !== false) {
6201
- log2.start(`Installing dependencies with ${plan.spec.packageManager}`);
6244
+ log3.start(`Installing dependencies with ${plan.spec.packageManager}`);
6202
6245
  install = await installDependencies(
6203
6246
  directory,
6204
6247
  plan.spec.packageManager,
6205
6248
  options.inheritOutput ?? false
6206
6249
  );
6207
- if (install.status === "done") log2.done("Installed dependencies");
6250
+ if (install.status === "done") log3.done("Installed dependencies");
6208
6251
  else
6209
- log2.fail(
6252
+ log3.fail(
6210
6253
  `Could not install dependencies, run "${installCommand(plan.spec.packageManager)}" yourself`
6211
6254
  );
6212
6255
  }
6213
6256
  let format = { status: "skipped", reason: "dependencies are not installed" };
6214
6257
  if (install.status === "done") {
6215
- log2.start("Formatting the code");
6258
+ log3.start("Formatting the code");
6216
6259
  format = await formatProject(directory);
6217
- if (format.status === "done") log2.done("Formatted the code");
6218
- else if (format.status === "failed") log2.warn(format.error.message);
6260
+ if (format.status === "done") log3.done("Formatted the code");
6261
+ else if (format.status === "failed") log3.warn(format.error.message);
6219
6262
  }
6220
6263
  await writeLock(
6221
6264
  directory,
@@ -6223,11 +6266,11 @@ async function scaffold(spec, options) {
6223
6266
  );
6224
6267
  let git = { status: "skipped", reason: "git was turned off" };
6225
6268
  if (options.git !== false) {
6226
- log2.start("Creating a git repository");
6269
+ log3.start("Creating a git repository");
6227
6270
  git = await initGit(directory);
6228
- if (git.status === "done") log2.done("Created a git repository with the first commit");
6229
- else if (git.status === "skipped") log2.done(`Skipped git: ${git.reason}`);
6230
- else log2.fail(git.error.message);
6271
+ if (git.status === "done") log3.done("Created a git repository with the first commit");
6272
+ else if (git.status === "skipped") log3.done(`Skipped git: ${git.reason}`);
6273
+ else log3.fail(git.error.message);
6231
6274
  }
6232
6275
  const parentWorkspace = enclosingWorkspace(directory);
6233
6276
  return {
@@ -6756,7 +6799,7 @@ function planAdd(directory, changes) {
6756
6799
  }
6757
6800
  var FORMATTED = /\.(?:[cm]?[jt]sx?|json|css)$/;
6758
6801
  async function addToProject(directory, changes, options = {}) {
6759
- const log2 = options.log ?? silentLogger;
6802
+ const log3 = options.log ?? silentLogger;
6760
6803
  const plan = planAdd(directory, changes);
6761
6804
  const skipped = (reason) => ({ status: "skipped", reason });
6762
6805
  if (plan.upToDate) {
@@ -6769,7 +6812,7 @@ async function addToProject(directory, changes, options = {}) {
6769
6812
  };
6770
6813
  }
6771
6814
  if (plan.conflicts.length > 0) throw new AddConflictError(plan.conflicts);
6772
- log2.start("Updating project files");
6815
+ log3.start("Updating project files");
6773
6816
  const written = [];
6774
6817
  const deleted = [];
6775
6818
  for (const change of plan.changes) {
@@ -6783,24 +6826,24 @@ async function addToProject(directory, changes, options = {}) {
6783
6826
  written.push(change.path);
6784
6827
  }
6785
6828
  }
6786
- log2.done(`Updated ${written.length + deleted.length} files`);
6829
+ log3.done(`Updated ${written.length + deleted.length} files`);
6787
6830
  const dependenciesChanged = changesDependencies(plan);
6788
6831
  let install = dependenciesChanged ? skipped("install was turned off") : skipped("the dependencies did not change");
6789
6832
  if (dependenciesChanged && options.install !== false) {
6790
- log2.start(`Installing the dependencies with ${plan.to.packageManager}`);
6833
+ log3.start(`Installing the dependencies with ${plan.to.packageManager}`);
6791
6834
  install = await installDependencies(
6792
6835
  plan.directory,
6793
6836
  plan.to.packageManager,
6794
6837
  options.inheritOutput ?? false
6795
6838
  );
6796
- if (install.status === "done") log2.done("Installed the dependencies");
6797
- else log2.fail("Could not install the dependencies");
6839
+ if (install.status === "done") log3.done("Installed the dependencies");
6840
+ else log3.fail("Could not install the dependencies");
6798
6841
  }
6799
6842
  const format = await formatProject(
6800
6843
  plan.directory,
6801
6844
  written.filter((path) => FORMATTED.test(path))
6802
6845
  );
6803
- if (format.status === "failed") log2.warn(format.error.message);
6846
+ if (format.status === "failed") log3.warn(format.error.message);
6804
6847
  await updateLock(plan.directory, [...written, ...deleted]);
6805
6848
  return { plan, written, deleted, install, format };
6806
6849
  }
@@ -7007,13 +7050,22 @@ function planExample(example, options) {
7007
7050
  include: ["src"]
7008
7051
  };
7009
7052
  const secrets = Object.entries(options.secrets ?? {}).filter(([, value]) => value !== "");
7053
+ const yarnrc = wantsYarnrc(pm, void 0);
7010
7054
  const files = [
7011
7055
  { path: "package.json", content: JSON.stringify(manifest, null, 2) + "\n" },
7012
7056
  { path: "tsconfig.json", content: JSON.stringify(tsconfig2, null, 2) + "\n" },
7013
7057
  { path: "README.md", content: readme },
7014
7058
  {
7015
7059
  path: ".gitignore",
7016
- content: ["node_modules/", "dist/", ".env", "*.log", ".DS_Store", ""].join("\n")
7060
+ content: [
7061
+ "node_modules/",
7062
+ "dist/",
7063
+ ".env",
7064
+ "*.log",
7065
+ ".DS_Store",
7066
+ ...yarnrc ? YARN_GITIGNORE : [],
7067
+ ""
7068
+ ].join("\n")
7017
7069
  },
7018
7070
  ...env.length > 0 ? [{ path: ".env.example", content: envExample }] : [],
7019
7071
  ...secrets.length > 0 ? [
@@ -7028,7 +7080,8 @@ function planExample(example, options) {
7028
7080
  path: "pnpm-workspace.yaml",
7029
7081
  content: pnpmWorkspaceYaml(native)
7030
7082
  }
7031
- ] : []
7083
+ ] : [],
7084
+ ...yarnrc ? [{ path: ".yarnrc.yml", content: YARNRC_YML }] : []
7032
7085
  ];
7033
7086
  return { example, ref, files, remoteFiles: example.files, command, scripts };
7034
7087
  }
@@ -7190,20 +7243,20 @@ import { existsSync as existsSync5, readFileSync as readFileSync4 } from "fs";
7190
7243
  import { mkdir as mkdir4, readdir, rm as rm2 } from "fs/promises";
7191
7244
  import { join as join6, relative, resolve as resolve3 } from "path";
7192
7245
  async function finish2(directory, packageManager, options) {
7193
- const log2 = options.log ?? silentLogger;
7246
+ const log3 = options.log ?? silentLogger;
7194
7247
  let install = { status: "skipped", reason: "install was turned off" };
7195
7248
  if (options.install !== false) {
7196
- log2.start(`Installing dependencies with ${packageManager}`);
7249
+ log3.start(`Installing dependencies with ${packageManager}`);
7197
7250
  install = await installDependencies(directory, packageManager, options.inheritOutput ?? false);
7198
- if (install.status === "done") log2.done("Installed dependencies");
7251
+ if (install.status === "done") log3.done("Installed dependencies");
7199
7252
  else
7200
- log2.fail(`Could not install dependencies, run "${installCommand(packageManager)}" yourself`);
7253
+ log3.fail(`Could not install dependencies, run "${installCommand(packageManager)}" yourself`);
7201
7254
  }
7202
7255
  let git = { status: "skipped", reason: "git was turned off" };
7203
7256
  if (options.git !== false) {
7204
7257
  git = await initGit(directory);
7205
- if (git.status === "done") log2.done("Created a git repository with the first commit");
7206
- else if (git.status === "failed") log2.fail(git.error.message);
7258
+ if (git.status === "done") log3.done("Created a git repository with the first commit");
7259
+ else if (git.status === "failed") log3.fail(git.error.message);
7207
7260
  }
7208
7261
  return { install, git };
7209
7262
  }
@@ -7228,15 +7281,15 @@ function resolveExample(argument, options) {
7228
7281
  });
7229
7282
  }
7230
7283
  async function createFromExample(plan, options) {
7231
- const log2 = options.log ?? silentLogger;
7284
+ const log3 = options.log ?? silentLogger;
7232
7285
  const directory = resolve3(options.directory);
7233
7286
  assertEmptyDirectory(directory);
7234
- log2.start(`Downloading the ${plan.example.name} example from ${plan.ref}`);
7287
+ log3.start(`Downloading the ${plan.example.name} example from ${plan.ref}`);
7235
7288
  const fetched = await fetchExampleFiles(plan, options.fetch);
7236
7289
  await mkdir4(directory, { recursive: true });
7237
7290
  const files = [...plan.files, ...fetched];
7238
7291
  await writeFiles(directory, files);
7239
- log2.done(`Wrote ${files.length} files`);
7292
+ log3.done(`Wrote ${files.length} files`);
7240
7293
  const { install, git } = await finish2(directory, options.packageManager, options);
7241
7294
  return {
7242
7295
  directory,
@@ -7256,11 +7309,11 @@ async function createFromExample(plan, options) {
7256
7309
  };
7257
7310
  }
7258
7311
  async function createFromTemplate(template, options) {
7259
- const log2 = options.log ?? silentLogger;
7312
+ const log3 = options.log ?? silentLogger;
7260
7313
  const directory = resolve3(options.directory);
7261
7314
  assertEmptyDirectory(directory);
7262
7315
  const existed = existsSync5(directory);
7263
- log2.start(`Downloading ${describeTemplate(template)}`);
7316
+ log3.start(`Downloading ${describeTemplate(template)}`);
7264
7317
  let downloaded;
7265
7318
  let prepared;
7266
7319
  try {
@@ -7270,7 +7323,7 @@ async function createFromTemplate(template, options) {
7270
7323
  });
7271
7324
  prepared = prepareTemplate(directory, { name: options.name });
7272
7325
  } catch (error) {
7273
- log2.fail(`Could not use ${describeTemplate(template)}`);
7326
+ log3.fail(`Could not use ${describeTemplate(template)}`);
7274
7327
  if (existed) {
7275
7328
  for (const entry of await readdir(directory)) {
7276
7329
  await rm2(join6(directory, entry), { recursive: true, force: true });
@@ -7280,7 +7333,7 @@ async function createFromTemplate(template, options) {
7280
7333
  }
7281
7334
  throw error;
7282
7335
  }
7283
- log2.done(`Wrote ${downloaded.files.length} files`);
7336
+ log3.done(`Wrote ${downloaded.files.length} files`);
7284
7337
  const packageManager = prepared.packageManager ?? options.packageManager;
7285
7338
  const notes = [
7286
7339
  ...prepared.packageManager && prepared.packageManager !== options.packageManager ? [
@@ -7311,96 +7364,70 @@ async function createFromTemplate(template, options) {
7311
7364
  };
7312
7365
  }
7313
7366
 
7314
- // src/kit/catalog.ts
7315
- var APP_CHOICES = [
7316
- { value: "script", label: "Script", hint: "an agent you run from the terminal" },
7317
- { value: "server", label: "HTTP server", hint: "agents behind a REST, SSE and WebSocket API" },
7318
- { value: "next", label: "Next.js app", hint: "a streaming chat UI with server-side agents" },
7319
- {
7320
- value: "channels",
7321
- label: "Messaging bot",
7322
- hint: "Telegram, Discord, Slack, WebChat, Bluesky or Threads"
7323
- },
7324
- { value: "worker", label: "Queue worker", hint: "agents run as BullMQ jobs on Redis" }
7325
- ];
7326
- var SERVER_CHOICES = [
7327
- { value: "hono", label: "Hono", hint: "small and fast, runs on Node" },
7328
- { value: "express", label: "Express", hint: "the classic, with Swagger UI" },
7329
- { value: "fastify", label: "Fastify", hint: "schema-first and fast" },
7330
- { value: "koa", label: "Koa", hint: "minimal middleware stack" },
7331
- { value: "tetsu", label: "Tetsu", hint: "Bun-native controller with OpenAPI, needs Bun" }
7332
- ];
7333
- var MEMORY_CHOICES = [
7334
- { value: "sqlite", label: "SQLite", hint: "a local file, no setup" },
7335
- { value: "memory", label: "In-memory", hint: "forgotten on restart" },
7336
- { value: "postgres", label: "Postgres", hint: "with pgvector, runs in Docker" },
7337
- { value: "redis", label: "Redis", hint: "runs in Docker" },
7338
- { value: "mongodb", label: "MongoDB", hint: "runs in Docker" },
7339
- { value: "none", label: "None", hint: "every run starts from scratch" }
7340
- ];
7341
- var VECTOR_STORE_CHOICES = [
7342
- { value: "memory", label: "In-memory", hint: "re-indexed on start" },
7343
- { value: "postgres", label: "Postgres pgvector", hint: "runs in Docker" },
7344
- { value: "qdrant", label: "Qdrant", hint: "runs in Docker" }
7345
- ];
7346
- var FEATURE_CHOICES = [
7347
- {
7348
- value: "harness",
7349
- label: "Assistant harness",
7350
- hint: "workspace file tools, approvals, core facts, scheduler"
7351
- },
7352
- { value: "mcp", label: "MCP", hint: "tools from MCP servers, agents served over MCP" },
7353
- { value: "rag", label: "RAG", hint: "answers grounded in your docs/ folder" },
7354
- { value: "workflows", label: "Workflows", hint: "a multi-step DAG pipeline" },
7355
- {
7356
- value: "durable",
7357
- label: "Durable workflows",
7358
- hint: "sagas, approvals, recovery after a crash"
7359
- },
7360
- { value: "swarms", label: "Swarms", hint: "a team of agents with a supervisor" },
7361
- { value: "evals", label: "Evals", hint: "a dataset, metrics and `pnpm eval`" },
7362
- { value: "otel", label: "OpenTelemetry", hint: "traces to any OTLP collector" },
7363
- { value: "langfuse", label: "Langfuse", hint: "traces and costs in Langfuse" },
7364
- { value: "voice", label: "Realtime voice", hint: "a WebSocket voice agent" },
7365
- { value: "sandbox", label: "Sandbox", hint: "run code in Docker or WASM isolation" },
7366
- { value: "a2a", label: "A2A", hint: "expose agents over the Agent-to-Agent protocol" }
7367
- ];
7368
- var DEPLOY_CHOICES = [
7369
- { value: "docker", label: "Docker", hint: "a production Dockerfile and compose file" },
7370
- { value: "fly", label: "Fly.io", hint: "Dockerfile and fly.toml" },
7371
- { value: "none", label: "None", hint: "decide later with `cogitator deploy`" }
7372
- ];
7373
- var CHANNEL_CHOICES = [
7374
- { value: "webchat", label: "WebChat", hint: "a local WebSocket chat, no setup" },
7375
- { value: "telegram", label: "Telegram", hint: "needs a bot token from @BotFather" },
7376
- { value: "discord", label: "Discord", hint: "needs a bot token" },
7377
- { value: "slack", label: "Slack", hint: "needs a bot token and signing secret" },
7378
- { value: "bluesky", label: "Bluesky", hint: "mentions, replies and DMs; needs an app password" },
7379
- { value: "threads", label: "Threads", hint: "replies and mentions; needs a long-lived token" }
7380
- ];
7381
- var CODING_AGENT_CHOICES = [
7382
- { value: "claude", label: "Claude Code", hint: ".mcp.json and a skill in .claude/skills" },
7383
- { value: "cursor", label: "Cursor", hint: ".cursor/mcp.json and a skill in .cursor/skills" },
7384
- { value: "codex", label: "Codex", hint: ".codex/config.toml and a skill in .agents/skills" }
7385
- ];
7367
+ // src/kit/services.ts
7368
+ var SERVICES_WAIT_SECONDS = 180;
7369
+ var START_TIMEOUT_MS = 15 * 6e4;
7370
+ async function dockerComposeAvailable(cwd) {
7371
+ try {
7372
+ const compose = await runCommand("docker", ["compose", "version"], { cwd, timeoutMs: 1e4 });
7373
+ if (compose.code !== 0) return false;
7374
+ const daemon = await runCommand("docker", ["info", "--format", "{{.ServerVersion}}"], {
7375
+ cwd,
7376
+ timeoutMs: 15e3
7377
+ });
7378
+ return daemon.code === 0;
7379
+ } catch {
7380
+ return false;
7381
+ }
7382
+ }
7383
+ function longRunningServices(plan) {
7384
+ return plan.services.filter((name) => !plan.oneShotServices.includes(name));
7385
+ }
7386
+ async function composeUp(directory, args) {
7387
+ const started = Date.now();
7388
+ try {
7389
+ const result = await runCommand("docker", ["compose", "up", "--detach", ...args], {
7390
+ cwd: directory,
7391
+ timeoutMs: START_TIMEOUT_MS
7392
+ });
7393
+ if (result.code === 0) return { status: "done" };
7394
+ const reason = Date.now() - started >= START_TIMEOUT_MS ? `did not finish within ${START_TIMEOUT_MS / 6e4} minutes` : `exited with ${result.code}`;
7395
+ return {
7396
+ status: "failed",
7397
+ error: new Error(`docker compose up ${reason}:
7398
+ ${tail(result.output)}`)
7399
+ };
7400
+ } catch (error) {
7401
+ return { status: "failed", error: error instanceof Error ? error : new Error(String(error)) };
7402
+ }
7403
+ }
7404
+ async function startServices(directory, plan) {
7405
+ if (plan.services.length === 0)
7406
+ return { status: "skipped", reason: "the project has no compose services" };
7407
+ const longRunning = longRunningServices(plan);
7408
+ if (longRunning.length > 0) {
7409
+ const started = await composeUp(directory, [
7410
+ "--wait",
7411
+ "--wait-timeout",
7412
+ String(SERVICES_WAIT_SECONDS),
7413
+ ...longRunning
7414
+ ]);
7415
+ if (started.status !== "done") return started;
7416
+ }
7417
+ const oneShot = plan.services.filter((name) => plan.oneShotServices.includes(name));
7418
+ return oneShot.length > 0 ? composeUp(directory, oneShot) : { status: "done" };
7419
+ }
7386
7420
 
7387
- // src/kit/models.ts
7388
- import { BUILTIN_MODELS, ModelRegistry } from "@cogitator-ai/models";
7421
+ // src/cli/services.ts
7422
+ import * as p from "@clack/prompts";
7389
7423
 
7390
7424
  // src/kit/ollama.ts
7425
+ import { resolveOllamaHost } from "@cogitator-ai/config";
7391
7426
  function isRecord(value) {
7392
7427
  return typeof value === "object" && value !== null && !Array.isArray(value);
7393
7428
  }
7394
- function trimTrailingSlashes(value) {
7395
- let end = value.length;
7396
- while (end > 0 && value[end - 1] === "/") end--;
7397
- return value.slice(0, end);
7398
- }
7399
7429
  function resolveOllamaUrl(env = process.env) {
7400
- const raw = env.OLLAMA_BASE_URL?.trim() || env.OLLAMA_HOST?.trim();
7401
- if (!raw) return DEFAULT_OLLAMA_URL;
7402
- const withScheme = /^https?:\/\//i.test(raw) ? raw : `http://${raw}`;
7403
- return trimTrailingSlashes(withScheme);
7430
+ return resolveOllamaHost(env.OLLAMA_BASE_URL) ?? DEFAULT_OLLAMA_URL;
7404
7431
  }
7405
7432
  async function listOllamaModels(baseUrl, timeoutMs = 2e3) {
7406
7433
  try {
@@ -7475,7 +7502,112 @@ async function pullOllamaModel(baseUrl, model, onStatus) {
7475
7502
  }
7476
7503
  }
7477
7504
 
7505
+ // src/cli/services.ts
7506
+ var OLLAMA_SERVICES = /* @__PURE__ */ new Set(["ollama", "ollama-pull"]);
7507
+ async function servicesToStart(plan, ollamaUrl = resolveOllamaUrl()) {
7508
+ if (!plan.services.includes("ollama")) return plan;
7509
+ if (await listOllamaModels(ollamaUrl) === void 0) return plan;
7510
+ return {
7511
+ services: plan.services.filter((name) => !OLLAMA_SERVICES.has(name)),
7512
+ oneShotServices: plan.oneShotServices.filter((name) => !OLLAMA_SERVICES.has(name))
7513
+ };
7514
+ }
7515
+ async function offerServices(directory, plan) {
7516
+ const names = longRunningServices(plan);
7517
+ if (names.length === 0 || !await dockerComposeAvailable(directory)) return false;
7518
+ const list = names.join(", ");
7519
+ const start = await p.confirm({
7520
+ message: `Start ${list} with docker compose now?`,
7521
+ initialValue: true
7522
+ });
7523
+ if (p.isCancel(start) || !start) return false;
7524
+ const spinner4 = p.spinner();
7525
+ spinner4.start(`Starting ${list} (the first start pulls the images)`);
7526
+ const started = await startServices(directory, plan);
7527
+ if (started.status === "done") {
7528
+ spinner4.stop(`Started ${list}`);
7529
+ return true;
7530
+ }
7531
+ spinner4.error('Not every service started, run "docker compose up -d" once the cause is fixed');
7532
+ if (started.status === "failed") p.log.warn(started.error.message);
7533
+ return false;
7534
+ }
7535
+
7536
+ // src/kit/catalog.ts
7537
+ var APP_CHOICES = [
7538
+ { value: "script", label: "Script", hint: "an agent you run from the terminal" },
7539
+ { value: "server", label: "HTTP server", hint: "agents behind a REST, SSE and WebSocket API" },
7540
+ { value: "next", label: "Next.js app", hint: "a streaming chat UI with server-side agents" },
7541
+ {
7542
+ value: "channels",
7543
+ label: "Messaging bot",
7544
+ hint: "Telegram, Discord, Slack, WebChat, Bluesky or Threads"
7545
+ },
7546
+ { value: "worker", label: "Queue worker", hint: "agents run as BullMQ jobs on Redis" }
7547
+ ];
7548
+ var SERVER_CHOICES = [
7549
+ { value: "hono", label: "Hono", hint: "small and fast, runs on Node" },
7550
+ { value: "express", label: "Express", hint: "the classic, with Swagger UI" },
7551
+ { value: "fastify", label: "Fastify", hint: "schema-first and fast" },
7552
+ { value: "koa", label: "Koa", hint: "minimal middleware stack" },
7553
+ { value: "tetsu", label: "Tetsu", hint: "Bun-native controller with OpenAPI, needs Bun" }
7554
+ ];
7555
+ var MEMORY_CHOICES = [
7556
+ { value: "sqlite", label: "SQLite", hint: "a local file, no setup" },
7557
+ { value: "memory", label: "In-memory", hint: "forgotten on restart" },
7558
+ { value: "postgres", label: "Postgres", hint: "with pgvector, runs in Docker" },
7559
+ { value: "redis", label: "Redis", hint: "runs in Docker" },
7560
+ { value: "mongodb", label: "MongoDB", hint: "runs in Docker" },
7561
+ { value: "none", label: "None", hint: "every run starts from scratch" }
7562
+ ];
7563
+ var VECTOR_STORE_CHOICES = [
7564
+ { value: "memory", label: "In-memory", hint: "re-indexed on start" },
7565
+ { value: "postgres", label: "Postgres pgvector", hint: "runs in Docker" },
7566
+ { value: "qdrant", label: "Qdrant", hint: "runs in Docker" }
7567
+ ];
7568
+ var FEATURE_CHOICES = [
7569
+ {
7570
+ value: "harness",
7571
+ label: "Assistant harness",
7572
+ hint: "workspace file tools, approvals, core facts, scheduler"
7573
+ },
7574
+ { value: "mcp", label: "MCP", hint: "tools from MCP servers, agents served over MCP" },
7575
+ { value: "rag", label: "RAG", hint: "answers grounded in your docs/ folder" },
7576
+ { value: "workflows", label: "Workflows", hint: "a multi-step DAG pipeline" },
7577
+ {
7578
+ value: "durable",
7579
+ label: "Durable workflows",
7580
+ hint: "sagas, approvals, recovery after a crash"
7581
+ },
7582
+ { value: "swarms", label: "Swarms", hint: "a team of agents with a supervisor" },
7583
+ { value: "evals", label: "Evals", hint: "a dataset, metrics and `pnpm eval`" },
7584
+ { value: "otel", label: "OpenTelemetry", hint: "traces to any OTLP collector" },
7585
+ { value: "langfuse", label: "Langfuse", hint: "traces and costs in Langfuse" },
7586
+ { value: "voice", label: "Realtime voice", hint: "a WebSocket voice agent" },
7587
+ { value: "sandbox", label: "Sandbox", hint: "run code in Docker or WASM isolation" },
7588
+ { value: "a2a", label: "A2A", hint: "expose agents over the Agent-to-Agent protocol" }
7589
+ ];
7590
+ var DEPLOY_CHOICES = [
7591
+ { value: "docker", label: "Docker", hint: "a production Dockerfile and compose file" },
7592
+ { value: "fly", label: "Fly.io", hint: "Dockerfile and fly.toml" },
7593
+ { value: "none", label: "None", hint: "decide later with `cogitator deploy`" }
7594
+ ];
7595
+ var CHANNEL_CHOICES = [
7596
+ { value: "webchat", label: "WebChat", hint: "a local WebSocket chat, no setup" },
7597
+ { value: "telegram", label: "Telegram", hint: "needs a bot token from @BotFather" },
7598
+ { value: "discord", label: "Discord", hint: "needs a bot token" },
7599
+ { value: "slack", label: "Slack", hint: "needs a bot token and signing secret" },
7600
+ { value: "bluesky", label: "Bluesky", hint: "mentions, replies and DMs; needs an app password" },
7601
+ { value: "threads", label: "Threads", hint: "replies and mentions; needs a long-lived token" }
7602
+ ];
7603
+ var CODING_AGENT_CHOICES = [
7604
+ { value: "claude", label: "Claude Code", hint: ".mcp.json and a skill in .claude/skills" },
7605
+ { value: "cursor", label: "Cursor", hint: ".cursor/mcp.json and a skill in .cursor/skills" },
7606
+ { value: "codex", label: "Codex", hint: ".codex/config.toml and a skill in .agents/skills" }
7607
+ ];
7608
+
7478
7609
  // src/kit/models.ts
7610
+ import { BUILTIN_MODELS, ModelRegistry } from "@cogitator-ai/models";
7479
7611
  var MAX_CHOICES = 8;
7480
7612
  var CATALOG_TIMEOUT_MS = 4e3;
7481
7613
  function formatPrice(perMillion) {
@@ -7754,7 +7886,7 @@ async function sendTelemetry(payload, options = {}) {
7754
7886
 
7755
7887
  // src/cli/main.ts
7756
7888
  import { relative as relative2 } from "path";
7757
- import * as p2 from "@clack/prompts";
7889
+ import * as p3 from "@clack/prompts";
7758
7890
  import pc2 from "picocolors";
7759
7891
 
7760
7892
  // src/cli/args.ts
@@ -8027,7 +8159,7 @@ function exampleList() {
8027
8159
  import { existsSync as existsSync7 } from "fs";
8028
8160
  import { homedir as homedir2 } from "os";
8029
8161
  import { join as join8 } from "path";
8030
- import * as p from "@clack/prompts";
8162
+ import * as p2 from "@clack/prompts";
8031
8163
 
8032
8164
  // src/cli/resolve.ts
8033
8165
  import { basename as basename2, resolve as resolve4 } from "path";
@@ -8077,7 +8209,7 @@ var CancelledError = class extends Error {
8077
8209
  }
8078
8210
  };
8079
8211
  function answer(value) {
8080
- if (p.isCancel(value)) throw new CancelledError();
8212
+ if (p2.isCancel(value)) throw new CancelledError();
8081
8213
  return value;
8082
8214
  }
8083
8215
  var CUSTOM = "__custom__";
@@ -8094,7 +8226,7 @@ function detectCodingAgents(home = homedir2()) {
8094
8226
  }
8095
8227
  async function askDirectory() {
8096
8228
  return answer(
8097
- await p.text({
8229
+ await p2.text({
8098
8230
  message: "Where should the project go?",
8099
8231
  placeholder: `./${DEFAULT_DIRECTORY}`,
8100
8232
  defaultValue: DEFAULT_DIRECTORY,
@@ -8107,7 +8239,7 @@ async function askMissing(args) {
8107
8239
  if (next.directory === void 0) next.directory = await askDirectory();
8108
8240
  if (next.preset === void 0 && next.app === void 0) {
8109
8241
  const choice = answer(
8110
- await p.select({
8242
+ await p2.select({
8111
8243
  message: "What do you want to build?",
8112
8244
  options: [
8113
8245
  ...PRESETS.map((preset) => ({
@@ -8131,7 +8263,7 @@ async function askMissing(args) {
8131
8263
  const presetProvider = PRESETS.find((preset) => preset.id === next.preset)?.spec.provider;
8132
8264
  if (next.provider === void 0) {
8133
8265
  next.provider = answer(
8134
- await p.select({
8266
+ await p2.select({
8135
8267
  message: "Which model provider?",
8136
8268
  options: PROVIDERS.map((id) => ({
8137
8269
  value: id,
@@ -8144,14 +8276,14 @@ async function askMissing(args) {
8144
8276
  }
8145
8277
  const provider = next.provider;
8146
8278
  if (next.model === void 0) {
8147
- const spinner3 = p.spinner();
8148
- spinner3.start("Looking up models");
8279
+ const spinner4 = p2.spinner();
8280
+ spinner4.start("Looking up models");
8149
8281
  const { choices, source } = await modelChoices(provider);
8150
- spinner3.stop(
8282
+ spinner4.stop(
8151
8283
  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`
8152
8284
  );
8153
8285
  const picked = answer(
8154
- await p.select({
8286
+ await p2.select({
8155
8287
  message: "Which model?",
8156
8288
  options: [...choices, { value: OTHER_MODEL, label: "Another model", hint: "type its id" }],
8157
8289
  initialValue: choices[0]?.value,
@@ -8159,7 +8291,7 @@ async function askMissing(args) {
8159
8291
  })
8160
8292
  );
8161
8293
  next.model = picked === OTHER_MODEL ? answer(
8162
- await p.text({
8294
+ await p2.text({
8163
8295
  message: `Model id at ${providerInfo(provider).label}`,
8164
8296
  validate: (value) => value?.trim() ? void 0 : "Type a model id"
8165
8297
  })
@@ -8170,7 +8302,7 @@ async function askMissing(args) {
8170
8302
  const fromShell = process.env[envKey]?.trim();
8171
8303
  if (fromShell) {
8172
8304
  const copy = answer(
8173
- await p.confirm({
8305
+ await p2.confirm({
8174
8306
  message: `Copy ${envKey} from your shell into the project's .env?`,
8175
8307
  initialValue: true
8176
8308
  })
@@ -8178,7 +8310,7 @@ async function askMissing(args) {
8178
8310
  if (copy) next.apiKey = fromShell;
8179
8311
  } else {
8180
8312
  const key = answer(
8181
- await p.password({
8313
+ await p2.password({
8182
8314
  message: `${envKey} (leave empty to add it to .env later)`,
8183
8315
  mask: "*"
8184
8316
  })
@@ -8189,7 +8321,7 @@ async function askMissing(args) {
8189
8321
  if (next.codingAgents === void 0) {
8190
8322
  const detected = detectCodingAgents();
8191
8323
  next.codingAgents = answer(
8192
- await p.multiselect({
8324
+ await p2.multiselect({
8193
8325
  message: "Set the project up for your coding agent? (AGENTS.md is always written)",
8194
8326
  options: CODING_AGENT_CHOICES,
8195
8327
  initialValues: detected,
@@ -8201,7 +8333,7 @@ async function askMissing(args) {
8201
8333
  }
8202
8334
  async function askStack(args) {
8203
8335
  const app = args.app ?? answer(
8204
- await p.select({
8336
+ await p2.select({
8205
8337
  message: "Which kind of app?",
8206
8338
  options: APP_CHOICES,
8207
8339
  initialValue: "script"
@@ -8210,7 +8342,7 @@ async function askStack(args) {
8210
8342
  const result = { app };
8211
8343
  if (app === "server" && args.server === void 0) {
8212
8344
  result.server = answer(
8213
- await p.select({
8345
+ await p2.select({
8214
8346
  message: "Which server framework?",
8215
8347
  options: SERVER_CHOICES,
8216
8348
  initialValue: "hono"
@@ -8219,7 +8351,7 @@ async function askStack(args) {
8219
8351
  }
8220
8352
  if (app === "channels" && args.channels === void 0) {
8221
8353
  result.channels = answer(
8222
- await p.multiselect({
8354
+ await p2.multiselect({
8223
8355
  message: "Which channels?",
8224
8356
  options: CHANNEL_CHOICES,
8225
8357
  initialValues: ["webchat"],
@@ -8229,7 +8361,7 @@ async function askStack(args) {
8229
8361
  }
8230
8362
  if (args.memory === void 0) {
8231
8363
  result.memory = answer(
8232
- await p.select({
8364
+ await p2.select({
8233
8365
  message: "Where should conversations be stored?",
8234
8366
  options: MEMORY_CHOICES,
8235
8367
  initialValue: "sqlite"
@@ -8238,7 +8370,7 @@ async function askStack(args) {
8238
8370
  }
8239
8371
  if (args.features === void 0) {
8240
8372
  const features = answer(
8241
- await p.multiselect({
8373
+ await p2.multiselect({
8242
8374
  message: "Which features? (space to toggle)",
8243
8375
  options: FEATURE_CHOICES,
8244
8376
  required: false
@@ -8248,7 +8380,7 @@ async function askStack(args) {
8248
8380
  result.features = features;
8249
8381
  if (features.includes("rag") && args.vectorStore === void 0) {
8250
8382
  result.vectorStore = answer(
8251
- await p.select({
8383
+ await p2.select({
8252
8384
  message: "Where should RAG keep its vectors?",
8253
8385
  options: VECTOR_STORE_CHOICES,
8254
8386
  initialValue: "memory"
@@ -8258,7 +8390,7 @@ async function askStack(args) {
8258
8390
  }
8259
8391
  if (args.deploy === void 0) {
8260
8392
  result.deploy = answer(
8261
- await p.select({
8393
+ await p2.select({
8262
8394
  message: "How will you deploy it?",
8263
8395
  options: DEPLOY_CHOICES,
8264
8396
  initialValue: "docker"
@@ -8279,12 +8411,12 @@ function banner(version) {
8279
8411
  `;
8280
8412
  }
8281
8413
  function clackLogger() {
8282
- const spinner3 = p2.spinner();
8414
+ const spinner4 = p3.spinner();
8283
8415
  return {
8284
- start: (message) => spinner3.start(message),
8285
- done: (message) => spinner3.stop(message),
8286
- fail: (message) => spinner3.error(message),
8287
- warn: (message) => p2.log.warn(message)
8416
+ start: (message) => spinner4.start(message),
8417
+ done: (message) => spinner4.stop(message),
8418
+ fail: (message) => spinner4.error(message),
8419
+ warn: (message) => p3.log.warn(message)
8288
8420
  };
8289
8421
  }
8290
8422
  function stepJson(step) {
@@ -8352,40 +8484,40 @@ async function prepareOllama(plan, interactive) {
8352
8484
  const installed = await listOllamaModels(baseUrl);
8353
8485
  if (!installed) {
8354
8486
  if (interactive)
8355
- p2.log.warn(
8487
+ p3.log.warn(
8356
8488
  `Ollama is not running at ${baseUrl}. Start it and pull ${model} before the first run.`
8357
8489
  );
8358
8490
  return false;
8359
8491
  }
8360
8492
  if (hasOllamaModel(installed, model)) return true;
8361
8493
  if (!interactive) return false;
8362
- const pull = await p2.confirm({
8494
+ const pull = await p3.confirm({
8363
8495
  message: `${model} is not in your Ollama yet. Pull it now?`,
8364
8496
  initialValue: true
8365
8497
  });
8366
- if (p2.isCancel(pull) || !pull) return false;
8367
- const spinner3 = p2.spinner();
8368
- spinner3.start(`Pulling ${model}`);
8498
+ if (p3.isCancel(pull) || !pull) return false;
8499
+ const spinner4 = p3.spinner();
8500
+ spinner4.start(`Pulling ${model}`);
8369
8501
  try {
8370
8502
  await pullOllamaModel(
8371
8503
  baseUrl,
8372
8504
  model,
8373
- (status) => spinner3.message(`Pulling ${model}: ${status}`)
8505
+ (status) => spinner4.message(`Pulling ${model}: ${status}`)
8374
8506
  );
8375
- spinner3.stop(`Pulled ${model}`);
8507
+ spinner4.stop(`Pulled ${model}`);
8376
8508
  return true;
8377
8509
  } catch (error) {
8378
- spinner3.error(error instanceof Error ? error.message : `Could not pull ${model}`);
8510
+ spinner4.error(error instanceof Error ? error.message : `Could not pull ${model}`);
8379
8511
  return false;
8380
8512
  }
8381
8513
  }
8382
- function outro2(result, args, modelReady) {
8514
+ function outro2(result, args, state) {
8383
8515
  const directory = relative2(process.cwd(), result.directory);
8384
8516
  const steps = result.plan.nextSteps({
8385
8517
  directory: directory || void 0,
8386
8518
  installed: result.install.status === "done",
8387
8519
  keyWritten: args.apiKey !== void 0,
8388
- modelReady
8520
+ ...state
8389
8521
  });
8390
8522
  return [
8391
8523
  `${pc2.green("Your project is ready.")} Next:`,
@@ -8442,8 +8574,8 @@ async function run(argv, io = defaultIo, deps = {}) {
8442
8574
  ` : exampleList());
8443
8575
  return 0;
8444
8576
  }
8445
- const interactive = isInteractive(args);
8446
8577
  const env = deps.env ?? process.env;
8578
+ const interactive = isInteractive(args, env, deps.stdin ?? process.stdin);
8447
8579
  const telemetry = telemetryDisabledReason({
8448
8580
  flag: args.telemetry,
8449
8581
  dryRun: args.dryRun,
@@ -8464,7 +8596,7 @@ async function run(argv, io = defaultIo, deps = {}) {
8464
8596
  return 0;
8465
8597
  } catch (error) {
8466
8598
  if (error instanceof CancelledError) {
8467
- p2.cancel("Cancelled, nothing was created.");
8599
+ p3.cancel("Cancelled, nothing was created.");
8468
8600
  return 1;
8469
8601
  }
8470
8602
  await report(telemetry, deps, payloadFor(void 0, { step: "create", error }, kind));
@@ -8476,7 +8608,7 @@ async function run(argv, io = defaultIo, deps = {}) {
8476
8608
  try {
8477
8609
  if (interactive) {
8478
8610
  io.stderr(banner(version));
8479
- p2.intro(pc2.cyan("Let's build something with agents"));
8611
+ p3.intro(pc2.cyan("Let's build something with agents"));
8480
8612
  args = await askMissing(args);
8481
8613
  }
8482
8614
  const { path: directory, name } = resolveDirectory(args.directory ?? DEFAULT_DIRECTORY);
@@ -8508,7 +8640,11 @@ async function run(argv, io = defaultIo, deps = {}) {
8508
8640
  });
8509
8641
  reported = true;
8510
8642
  await report(telemetry, deps, payloadFor(result.plan.spec, installFailure(result)));
8511
- const modelReady = result.plan.spec.provider === "ollama" ? await prepareOllama(result.plan, interactive) : true;
8643
+ const services = interactive ? await servicesToStart(result.plan) : void 0;
8644
+ const servicesStarted = services !== void 0 && await offerServices(result.directory, services);
8645
+ const pullingInCompose = servicesStarted && services.services.includes("ollama");
8646
+ const modelReady = result.plan.spec.provider === "ollama" ? await prepareOllama(result.plan, interactive && !pullingInCompose) : true;
8647
+ const setup = { modelReady, servicesStarted, modelPulling: pullingInCompose && !modelReady };
8512
8648
  const key = envKey ? args.apiKey ?? process.env[envKey] : void 0;
8513
8649
  const provider = result.plan.spec.provider;
8514
8650
  let keyCheck;
@@ -8538,20 +8674,20 @@ async function run(argv, io = defaultIo, deps = {}) {
8538
8674
  );
8539
8675
  return 0;
8540
8676
  }
8541
- if (keyCheck) p2.log.info(keyCheck);
8677
+ if (keyCheck) p3.log.info(keyCheck);
8542
8678
  if (result.parentWorkspace) {
8543
- p2.log.info(
8679
+ p3.log.info(
8544
8680
  `The project is inside the workspace at ${result.parentWorkspace}. Add ${relative2(result.parentWorkspace, result.directory)} to its workspace packages to share one install.`
8545
8681
  );
8546
8682
  }
8547
- for (const warning of result.plan.warnings) p2.log.warn(warning);
8548
- if (interactive) p2.outro(outro2(result, args, modelReady));
8549
- else io.stderr(`${outro2(result, args, modelReady)}
8683
+ for (const warning of result.plan.warnings) p3.log.warn(warning);
8684
+ if (interactive) p3.outro(outro2(result, args, setup));
8685
+ else io.stderr(`${outro2(result, args, setup)}
8550
8686
  `);
8551
8687
  return 0;
8552
8688
  } catch (error) {
8553
8689
  if (error instanceof CancelledError) {
8554
- p2.cancel("Cancelled, nothing was created.");
8690
+ p3.cancel("Cancelled, nothing was created.");
8555
8691
  return 1;
8556
8692
  }
8557
8693
  if (resolvedSpec && !reported)
@@ -8590,7 +8726,7 @@ async function runStarter(args, interactive, io, deps) {
8590
8726
  }
8591
8727
  if (interactive) {
8592
8728
  io.stderr(banner(scaffolderVersion()));
8593
- p2.intro(pc2.cyan("Let's build something with agents"));
8729
+ p3.intro(pc2.cyan("Let's build something with agents"));
8594
8730
  }
8595
8731
  const directoryArg = args.directory ?? (interactive ? await askDirectory() : DEFAULT_DIRECTORY);
8596
8732
  const { path: directory, name } = resolveDirectory(directoryArg);
@@ -8675,8 +8811,8 @@ async function runStarter(args, interactive, io, deps) {
8675
8811
  );
8676
8812
  return result;
8677
8813
  }
8678
- for (const note of result.notes) p2.log.info(note);
8679
- if (interactive) p2.outro(starterOutro(result));
8814
+ for (const note of result.notes) p3.log.info(note);
8815
+ if (interactive) p3.outro(starterOutro(result));
8680
8816
  else io.stderr(`${starterOutro(result)}
8681
8817
  `);
8682
8818
  return result;
@@ -8753,6 +8889,7 @@ export {
8753
8889
  describeTemplate,
8754
8890
  detectPackageManager,
8755
8891
  detectPackageManagerSpec,
8892
+ dockerComposeAvailable,
8756
8893
  downloadTemplate,
8757
8894
  exampleFileUrl,
8758
8895
  exampleRef,
@@ -8768,9 +8905,11 @@ export {
8768
8905
  installCommand,
8769
8906
  installErrorCode,
8770
8907
  installFailure,
8908
+ isInteractive,
8771
8909
  knownCogitatorVersions,
8772
8910
  listOllamaModels,
8773
8911
  modelChoices,
8912
+ offerServices,
8774
8913
  ollamaModelChoices,
8775
8914
  parseExampleArgument,
8776
8915
  parseSpec,
@@ -8792,7 +8931,9 @@ export {
8792
8931
  scaffold,
8793
8932
  scaffolderVersion,
8794
8933
  sendTelemetry,
8934
+ servicesToStart,
8795
8935
  silentLogger,
8936
+ startServices,
8796
8937
  telemetryDisabledReason,
8797
8938
  telemetryErrorCode,
8798
8939
  telemetryWebsiteId,