create-cogitator-app 0.6.0 → 0.7.0

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,14 +1,14 @@
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.3", "@cogitator-ai/core": "^0.37.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"], 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.3", "@cogitator-ai/core": "^0.37.0", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_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.37.0", "@cogitator-ai/self-modifying": "^19.4.3", 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"], 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.37.0", "@cogitator-ai/neuro-symbolic": "^17.0.23", "@cogitator-ai/types": "^0.39.0", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_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.37.0", "@cogitator-ai/wasm-tools": "^0.7.17", 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"], 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.13", "@cogitator-ai/core": "^0.37.0", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_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.13", "@cogitator-ai/core": "^0.37.0", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_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.13", "@cogitator-ai/core": "^0.37.0", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_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.13", "@cogitator-ai/core": "^0.37.0", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_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.9.3", "@cogitator-ai/core": "^0.37.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.9.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.9.3", "@cogitator-ai/core": "^0.37.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: "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.37.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"], 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.37.0", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_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.37.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"], 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.37.0", "@cogitator-ai/types": "^0.39.0", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_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.37.0", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_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.37.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"], 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.37.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"], 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.37.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"], 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.37.0", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_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.37.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"], 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.37.0", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_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.37.0", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_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.37.0", "@cogitator-ai/models": "^18.3.0", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_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.37.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"], 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.37.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"], 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.37.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.37.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.37.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.37.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.37.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.37.0", "@cogitator-ai/evals": "^0.6.0", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_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.37.0", "@cogitator-ai/evals": "^0.6.0", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_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.37.0", "@cogitator-ai/evals": "^0.6.0", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_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.37.0", "@cogitator-ai/memory": "^0.12.3", 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", "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.37.0", "@cogitator-ai/memory": "^0.12.3", 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"], 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.37.0", "@cogitator-ai/worker": "^0.9.3", 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", "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.37.0", "@cogitator-ai/deploy": "^0.6.2", 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"], 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.37.0", "@cogitator-ai/sandbox": "^0.5.12", "@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"], 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.37.0", "@cogitator-ai/express": "^0.8.3", 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"], 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.37.0", "@cogitator-ai/fastify": "^0.7.3", 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"], 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.37.0", "@cogitator-ai/hono": "^0.7.3", "@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"], 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.37.0", "@cogitator-ai/koa": "^0.7.3", "@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"], 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.37.0", "@cogitator-ai/next": "^0.8.3", 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.37.0", "@cogitator-ai/openai-compat": "^21.2.3", "@cogitator-ai/types": "^0.39.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"], 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.0", "@cogitator-ai/core": "^0.37.0", "@cogitator-ai/types": "^0.39.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"], 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.37.0", "@cogitator-ai/mcp": "^19.3.3", "@cogitator-ai/tetsu": "^0.5.3", "@cogitator-ai/types": "^0.39.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"], 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.37.0", "@cogitator-ai/mcp": "^19.3.3", "@cogitator-ai/types": "^0.39.0", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_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.37.0", "@cogitator-ai/mcp": "^19.3.3", "@cogitator-ai/types": "^0.39.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"], 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.37.0", "@cogitator-ai/mcp": "^19.3.3", "@cogitator-ai/types": "^0.39.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"], 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.37.0", "@cogitator-ai/mcp": "^19.3.3", "@cogitator-ai/types": "^0.39.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"], 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.37.0", "@cogitator-ai/memory": "^0.12.3", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_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.37.0", "@cogitator-ai/memory": "^0.12.3", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_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.37.0", "@cogitator-ai/memory": "^0.12.3", "@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"], 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.37.0", "@cogitator-ai/memory": "^0.12.3", "@cogitator-ai/types": "^0.39.0", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_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.37.0", "@cogitator-ai/memory": "^0.12.3", "@cogitator-ai/rag": "^0.6.3", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_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.37.0", "@cogitator-ai/memory": "^0.12.3", "@cogitator-ai/rag": "^0.6.3", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_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.37.0", "@cogitator-ai/memory": "^0.12.3", "@cogitator-ai/rag": "^0.6.3", "@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"], 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.37.0", "@cogitator-ai/swarms": "^0.12.3", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_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.37.0", "@cogitator-ai/swarms": "^0.12.3", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_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.37.0", "@cogitator-ai/swarms": "^0.12.3", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_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.37.0", "@cogitator-ai/swarms": "^0.12.3", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_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.37.0", "@cogitator-ai/voice": "^0.5.3", 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"], 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.37.0", "@cogitator-ai/voice": "^0.5.3", 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"], 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.37.0", "@cogitator-ai/voice": "^0.5.3", 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"], 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.37.0", "@cogitator-ai/voice": "^0.5.3", 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"], 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.37.0", "@cogitator-ai/workflows": "^0.12.3", 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"], 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.37.0", "@cogitator-ai/workflows": "^0.12.3", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_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.37.0", "@cogitator-ai/workflows": "^0.12.3", dotenv: "^18.0.5" }, devDependencies: { tsx: "^4.23.15" }, env: ["ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "OLLAMA_URL", "OPENAI_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.4", "@cogitator-ai/core": "^0.38.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.4", "@cogitator-ai/core": "^0.38.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.38.0", "@cogitator-ai/self-modifying": "^19.4.4", 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.38.0", "@cogitator-ai/neuro-symbolic": "^17.0.24", "@cogitator-ai/types": "^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/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.38.0", "@cogitator-ai/wasm-tools": "^0.7.18", 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.14", "@cogitator-ai/core": "^0.38.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.14", "@cogitator-ai/core": "^0.38.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.14", "@cogitator-ai/core": "^0.38.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.14", "@cogitator-ai/core": "^0.38.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.10.0", "@cogitator-ai/core": "^0.38.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.10.0", "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.10.0", "@cogitator-ai/core": "^0.38.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.10.0", "@cogitator-ai/types": "^0.40.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.10.0", "@cogitator-ai/core": "^0.38.0", "@cogitator-ai/types": "^0.40.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.38.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.38.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.38.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.38.0", "@cogitator-ai/types": "^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/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.38.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.38.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.38.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.38.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.38.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.38.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.38.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.38.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.38.0", "@cogitator-ai/models": "^18.4.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.38.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.38.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.38.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: "device-tools/screenshot", title: "Screenshot", entry: "device-tools/01-screenshot.ts", files: ["device-tools/01-screenshot.ts"], dependencies: { "@cogitator-ai/core": "^0.38.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.38.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.38.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.38.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.38.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.38.0", "@cogitator-ai/evals": "^0.6.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: "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.38.0", "@cogitator-ai/evals": "^0.6.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: "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.38.0", "@cogitator-ai/evals": "^0.6.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: "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.38.0", "@cogitator-ai/memory": "^0.12.4", 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.38.0", "@cogitator-ai/memory": "^0.12.4", 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.38.0", "@cogitator-ai/worker": "^0.9.4", 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.38.0", "@cogitator-ai/deploy": "^0.6.3", 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.38.0", "@cogitator-ai/sandbox": "^0.5.13", "@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.38.0", "@cogitator-ai/express": "^0.8.4", 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.38.0", "@cogitator-ai/fastify": "^0.7.4", 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.38.0", "@cogitator-ai/hono": "^0.7.4", "@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.38.0", "@cogitator-ai/koa": "^0.7.4", "@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.38.0", "@cogitator-ai/next": "^0.8.4", 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.38.0", "@cogitator-ai/openai-compat": "^21.2.4", "@cogitator-ai/types": "^0.40.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.0", "@cogitator-ai/core": "^0.38.0", "@cogitator-ai/types": "^0.40.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.38.0", "@cogitator-ai/mcp": "^19.3.4", "@cogitator-ai/tetsu": "^0.5.4", "@cogitator-ai/types": "^0.40.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.38.0", "@cogitator-ai/mcp": "^19.3.4", "@cogitator-ai/types": "^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: "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.38.0", "@cogitator-ai/mcp": "^19.3.4", "@cogitator-ai/types": "^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: "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.38.0", "@cogitator-ai/mcp": "^19.3.4", "@cogitator-ai/types": "^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: "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.38.0", "@cogitator-ai/mcp": "^19.3.4", "@cogitator-ai/types": "^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: "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.38.0", "@cogitator-ai/memory": "^0.12.4", 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.38.0", "@cogitator-ai/memory": "^0.12.4", 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.38.0", "@cogitator-ai/memory": "^0.12.4", "@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.38.0", "@cogitator-ai/memory": "^0.12.4", "@cogitator-ai/types": "^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: "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.38.0", "@cogitator-ai/memory": "^0.12.4", "@cogitator-ai/rag": "^0.6.4", 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.38.0", "@cogitator-ai/memory": "^0.12.4", "@cogitator-ai/rag": "^0.6.4", 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.38.0", "@cogitator-ai/memory": "^0.12.4", "@cogitator-ai/rag": "^0.6.4", "@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.38.0", "@cogitator-ai/swarms": "^0.12.4", 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.38.0", "@cogitator-ai/swarms": "^0.12.4", 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.38.0", "@cogitator-ai/swarms": "^0.12.4", 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.38.0", "@cogitator-ai/swarms": "^0.12.4", 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.38.0", "@cogitator-ai/voice": "^0.5.4", 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.38.0", "@cogitator-ai/voice": "^0.5.4", 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.38.0", "@cogitator-ai/voice": "^0.5.4", 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.38.0", "@cogitator-ai/voice": "^0.5.4", 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.38.0", "@cogitator-ai/workflows": "^0.12.4", 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.38.0", "@cogitator-ai/workflows": "^0.12.4", 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.38.0", "@cogitator-ai/workflows": "^0.12.4", 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.3", "@cogitator-ai/ai-sdk": "0.6.0", "@cogitator-ai/browser": "0.4.13", "@cogitator-ai/channels": "0.9.3", "@cogitator-ai/cli": "0.6.3", "@cogitator-ai/config": "0.13.0", "@cogitator-ai/core": "0.37.0", "@cogitator-ai/deploy": "0.6.2", "@cogitator-ai/evals": "0.6.0", "@cogitator-ai/express": "0.8.3", "@cogitator-ai/fastify": "0.7.3", "@cogitator-ai/hono": "0.7.3", "@cogitator-ai/koa": "0.7.3", "@cogitator-ai/mcp": "19.3.3", "@cogitator-ai/memory": "0.12.3", "@cogitator-ai/models": "18.3.0", "@cogitator-ai/neuro-symbolic": "17.0.23", "@cogitator-ai/next": "0.8.3", "@cogitator-ai/openai-compat": "21.2.3", "@cogitator-ai/rag": "0.6.3", "@cogitator-ai/redis": "0.5.2", "@cogitator-ai/sandbox": "0.5.12", "@cogitator-ai/self-modifying": "19.4.3", "@cogitator-ai/server-shared": "0.5.3", "@cogitator-ai/studio": "0.1.2", "@cogitator-ai/swarms": "0.12.3", "@cogitator-ai/test-utils": "0.2.17", "@cogitator-ai/tetsu": "0.5.3", "@cogitator-ai/types": "0.39.0", "@cogitator-ai/voice": "0.5.3", "@cogitator-ai/wasm-tools": "0.7.17", "@cogitator-ai/worker": "0.9.3", "@cogitator-ai/workflows": "0.12.3" };
5
+ var define_COGITATOR_VERSIONS_default = { "@cogitator-ai/a2a": "0.8.4", "@cogitator-ai/ai-sdk": "0.6.0", "@cogitator-ai/browser": "0.4.14", "@cogitator-ai/channels": "0.10.0", "@cogitator-ai/cli": "0.7.0", "@cogitator-ai/config": "0.14.0", "@cogitator-ai/core": "0.38.0", "@cogitator-ai/deploy": "0.6.3", "@cogitator-ai/evals": "0.6.0", "@cogitator-ai/express": "0.8.4", "@cogitator-ai/fastify": "0.7.4", "@cogitator-ai/hono": "0.7.4", "@cogitator-ai/koa": "0.7.4", "@cogitator-ai/mcp": "19.3.4", "@cogitator-ai/memory": "0.12.4", "@cogitator-ai/models": "18.4.0", "@cogitator-ai/neuro-symbolic": "17.0.24", "@cogitator-ai/next": "0.8.4", "@cogitator-ai/openai-compat": "21.2.4", "@cogitator-ai/rag": "0.6.4", "@cogitator-ai/redis": "0.5.2", "@cogitator-ai/sandbox": "0.5.13", "@cogitator-ai/self-modifying": "19.4.4", "@cogitator-ai/server-shared": "0.5.4", "@cogitator-ai/studio": "0.1.4", "@cogitator-ai/swarms": "0.12.4", "@cogitator-ai/test-utils": "0.2.18", "@cogitator-ai/tetsu": "0.5.4", "@cogitator-ai/types": "0.40.0", "@cogitator-ai/voice": "0.5.4", "@cogitator-ai/wasm-tools": "0.7.18", "@cogitator-ai/worker": "0.9.4", "@cogitator-ai/workflows": "0.12.4" };
6
6
 
7
7
  // src/kit/scaffold.ts
8
8
  import { createHash } from "crypto";
9
- import { existsSync, readFileSync, readdirSync } from "fs";
9
+ import { existsSync as existsSync2, readFileSync, readdirSync } from "fs";
10
10
  import { chmod, mkdir, readFile, writeFile } from "fs/promises";
11
- import { dirname as dirname2, join as join2, resolve } from "path";
11
+ import { dirname as dirname3, join as join3, resolve } from "path";
12
12
 
13
13
  // src/kit/errors.ts
14
14
  var CodedError = class extends Error {
@@ -23,6 +23,10 @@ function constantCase(name) {
23
23
  return name.replace(/([a-z0-9])([A-Z])/g, "$1_$2").toUpperCase();
24
24
  }
25
25
 
26
+ // src/kit/package-manager.ts
27
+ import { existsSync } from "fs";
28
+ import { basename, dirname, join } from "path";
29
+
26
30
  // src/kit/spec.ts
27
31
  import { z } from "zod";
28
32
  var PROVIDERS = ["ollama", "openai", "anthropic", "google"];
@@ -47,7 +51,7 @@ var FEATURES = [
47
51
  var DEPLOY_TARGETS = ["none", "docker", "fly"];
48
52
  var CODING_AGENTS = ["claude", "cursor", "codex"];
49
53
  var PACKAGE_MANAGERS = ["pnpm", "npm", "yarn", "bun"];
50
- var CHANNELS = ["telegram", "discord", "slack", "webchat"];
54
+ var CHANNELS = ["telegram", "discord", "slack", "webchat", "bluesky", "threads"];
51
55
  var PACKAGE_NAME = /^[a-z0-9][a-z0-9._-]*$/;
52
56
  var MAX_NAME_LENGTH = 214;
53
57
  function validateProjectName(name) {
@@ -133,6 +137,17 @@ function execCommand(pm, bin) {
133
137
  if (pm === "bun") return `bunx ${bin}`;
134
138
  return `${pm} exec ${bin}`;
135
139
  }
140
+ function launchingPackageManager(pm, env) {
141
+ const execPath = env.npm_execpath;
142
+ if (!execPath || env.npm_config_user_agent?.split("/")[0] !== pm) return void 0;
143
+ const path = pm === "npm" && basename(execPath) === "npx-cli.js" ? join(dirname(execPath), "npm-cli.js") : execPath;
144
+ return existsSync(path) ? path : void 0;
145
+ }
146
+ function packageManagerInvocation(pm, args, env = process.env) {
147
+ const launcher = launchingPackageManager(pm, env);
148
+ if (!launcher) return { command: pm, args, fromPath: true };
149
+ return /\.[cm]?js$/.test(launcher) ? { command: process.execPath, args: [launcher, ...args], fromPath: false } : { command: launcher, args, fromPath: false };
150
+ }
136
151
  function installCommand(pm) {
137
152
  return `${pm} install`;
138
153
  }
@@ -335,7 +350,7 @@ function compatibilityIssues(spec) {
335
350
  if (spec.app === "channels" && spec.channels.length === 0) {
336
351
  issues.push({
337
352
  message: "A messaging bot needs at least one channel",
338
- fix: "pass --channels webchat, telegram, discord or slack"
353
+ fix: "pass --channels webchat, telegram, discord, slack, bluesky or threads"
339
354
  });
340
355
  }
341
356
  if (spec.app !== "channels" && spec.channels.length > 0) {
@@ -503,7 +518,7 @@ function yamlString(value) {
503
518
 
504
519
  // src/kit/versions.ts
505
520
  function scaffolderVersion() {
506
- return false ? "0.0.0" : "0.6.0";
521
+ return false ? "0.0.0" : "0.7.0";
507
522
  }
508
523
  function workspaceVersions() {
509
524
  return typeof define_COGITATOR_VERSIONS_default === "undefined" ? {} : define_COGITATOR_VERSIONS_default;
@@ -559,6 +574,7 @@ var VERSIONS = {
559
574
  discord: "^14.27.0",
560
575
  slackBolt: "^5.1.0",
561
576
  ws: "^8.22.0",
577
+ atprotoApi: "^0.24.0",
562
578
  langfuse: "^3.39.2",
563
579
  modelContextProtocol: "^1.32.1"
564
580
  };
@@ -618,7 +634,7 @@ function emitPackageJson(project, extras) {
618
634
  };
619
635
  project.file("package.json", JSON.stringify(pkg, null, 2) + "\n");
620
636
  }
621
- var SKIPPED_BUILDS = ["cpu-features", "protobufjs", "ssh2"];
637
+ var SKIPPED_BUILDS = ["better-sqlite3", "cpu-features", "protobufjs", "ssh2"];
622
638
  function pnpmWorkspaceYaml(nativeBuilds) {
623
639
  const allowed = new Set(nativeBuilds);
624
640
  const entries = [
@@ -1570,7 +1586,7 @@ function emitAssistant(project) {
1570
1586
  // src/kit/features/deploy.ts
1571
1587
  import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from "fs";
1572
1588
  import { tmpdir } from "os";
1573
- import { dirname, join } from "path";
1589
+ import { dirname as dirname2, join as join2 } from "path";
1574
1590
  import { ArtifactGenerator, ProjectAnalyzer } from "@cogitator-ai/deploy";
1575
1591
  var ROOT_ARTIFACTS = {
1576
1592
  Dockerfile: "Dockerfile",
@@ -1580,14 +1596,14 @@ var ROOT_ARTIFACTS = {
1580
1596
  function emitDeployArtifacts(project) {
1581
1597
  const { spec } = project;
1582
1598
  if (spec.deploy === "none") return;
1583
- const dir = mkdtempSync(join(tmpdir(), "cogitator-deploy-plan-"));
1599
+ const dir = mkdtempSync(join2(tmpdir(), "cogitator-deploy-plan-"));
1584
1600
  try {
1585
1601
  for (const file of project.files.values()) {
1586
- const target = join(dir, file.path);
1587
- mkdirSync(dirname(target), { recursive: true });
1602
+ const target = join2(dir, file.path);
1603
+ mkdirSync(dirname2(target), { recursive: true });
1588
1604
  writeFileSync(target, file.content);
1589
1605
  }
1590
- writeFileSync(join(dir, LOCKFILES[spec.packageManager]), "");
1606
+ writeFileSync(join2(dir, LOCKFILES[spec.packageManager]), "");
1591
1607
  const analysis = new ProjectAnalyzer().analyze(dir, { target: spec.deploy }, { env: {} });
1592
1608
  const { files } = new ArtifactGenerator().generate(analysis.deployConfig, analysis);
1593
1609
  for (const artifact of files) {
@@ -1856,6 +1872,7 @@ function startupStatements(project) {
1856
1872
 
1857
1873
  // src/kit/features/app-channels.ts
1858
1874
  var WEBCHAT_PORT = 18789;
1875
+ var TOKENS_PATH = ".cogitator/tokens.json";
1859
1876
  var CHANNEL_SETUP = {
1860
1877
  telegram: {
1861
1878
  factory: "telegramChannel",
@@ -1906,6 +1923,48 @@ var CHANNEL_SETUP = {
1906
1923
  expression: `webchatChannel({ port: Number(env.WEBCHAT_PORT ?? ${WEBCHAT_PORT}) })`,
1907
1924
  packages: [["ws", VERSIONS.ws]],
1908
1925
  env: []
1926
+ },
1927
+ bluesky: {
1928
+ factory: "blueskyChannel",
1929
+ imports: ["FileTokenStore"],
1930
+ expression: code`
1931
+ blueskyChannel({
1932
+ identifier: env.BLUESKY_HANDLE,
1933
+ appPassword: env.BLUESKY_APP_PASSWORD,
1934
+ store: new FileTokenStore({ path: '${TOKENS_PATH}' }),
1935
+ })
1936
+ `,
1937
+ packages: [["@atproto/api", VERSIONS.atprotoApi]],
1938
+ env: [
1939
+ {
1940
+ name: "BLUESKY_HANDLE",
1941
+ description: "Bluesky handle of the bot account, such as yourbot.bsky.social",
1942
+ required: true
1943
+ },
1944
+ {
1945
+ name: "BLUESKY_APP_PASSWORD",
1946
+ description: "Bluesky app password (Settings, Privacy and security, App passwords), with direct messages allowed",
1947
+ required: true
1948
+ }
1949
+ ]
1950
+ },
1951
+ threads: {
1952
+ factory: "threadsChannel",
1953
+ imports: ["FileTokenStore"],
1954
+ expression: code`
1955
+ threadsChannel({
1956
+ accessToken: env.THREADS_ACCESS_TOKEN,
1957
+ store: new FileTokenStore({ path: '${TOKENS_PATH}' }),
1958
+ })
1959
+ `,
1960
+ packages: [],
1961
+ env: [
1962
+ {
1963
+ name: "THREADS_ACCESS_TOKEN",
1964
+ description: "Threads long-lived access token; it is renewed automatically and kept in .cogitator/tokens.json",
1965
+ required: true
1966
+ }
1967
+ ]
1909
1968
  }
1910
1969
  };
1911
1970
  var appChannelsFeature = {
@@ -1919,6 +1978,9 @@ var appChannelsFeature = {
1919
1978
  for (const [name, version] of setup.packages) project.dependency(name, version);
1920
1979
  for (const variable of setup.env) project.envVar({ ...variable, secret: true });
1921
1980
  }
1981
+ if (spec.channels.some((channel) => CHANNEL_SETUP[channel].imports?.includes("FileTokenStore"))) {
1982
+ project.ignore(TOKENS_PATH);
1983
+ }
1922
1984
  if (spec.channels.includes("webchat")) {
1923
1985
  project.envVar({
1924
1986
  name: "WEBCHAT_PORT",
@@ -1942,7 +2004,7 @@ var appChannelsFeature = {
1942
2004
  project.file(
1943
2005
  "src/gateway.ts",
1944
2006
  code`
1945
- import { Gateway, ${channels.map((c) => c.factory).join(", ")} } from '@cogitator-ai/channels';
2007
+ import { Gateway, ${[...new Set(channels.flatMap((c) => [c.factory, ...c.imports ?? []]))].join(", ")} } from '@cogitator-ai/channels';
1946
2008
  import { agents, cogitator } from './cogitator.js';
1947
2009
  import { loadEnv } from './env.js';
1948
2010
  ${startupImports(project)}
@@ -5532,7 +5594,7 @@ var PRESETS = [
5532
5594
  {
5533
5595
  id: "channels",
5534
5596
  label: "Messaging bot",
5535
- hint: "one assistant on Telegram, Discord, Slack or WebChat",
5597
+ hint: "one assistant on Telegram, Discord, Slack, WebChat, Bluesky or Threads",
5536
5598
  spec: { app: "channels", channels: ["webchat"], memory: "sqlite", features: [] }
5537
5599
  },
5538
5600
  {
@@ -5914,7 +5976,7 @@ function runCommand(command, args, options) {
5914
5976
  cwd: options.cwd,
5915
5977
  env: options.env ?? process.env,
5916
5978
  stdio: options.inherit ? "inherit" : ["ignore", "pipe", "pipe"],
5917
- shell: process.platform === "win32",
5979
+ shell: options.shell ?? process.platform === "win32",
5918
5980
  timeout: options.timeoutMs
5919
5981
  });
5920
5982
  let output = "";
@@ -5951,8 +6013,8 @@ function failure(error) {
5951
6013
  }
5952
6014
  async function writeFiles(directory, files) {
5953
6015
  for (const file of files) {
5954
- const target = join2(directory, file.path);
5955
- await mkdir(dirname2(target), { recursive: true });
6016
+ const target = join3(directory, file.path);
6017
+ await mkdir(dirname3(target), { recursive: true });
5956
6018
  await writeFile(
5957
6019
  target,
5958
6020
  file.content,
@@ -5967,15 +6029,15 @@ async function saveLock(directory, files) {
5967
6029
  generator: `create-cogitator-app@${scaffolderVersion()}`,
5968
6030
  files: Object.fromEntries(Object.entries(files).sort(([a], [b]) => a.localeCompare(b)))
5969
6031
  };
5970
- await mkdir(join2(directory, dirname2(LOCK_PATH)), { recursive: true });
5971
- await writeFile(join2(directory, LOCK_PATH), JSON.stringify(lock, null, 2) + "\n");
6032
+ await mkdir(join3(directory, dirname3(LOCK_PATH)), { recursive: true });
6033
+ await writeFile(join3(directory, LOCK_PATH), JSON.stringify(lock, null, 2) + "\n");
5972
6034
  }
5973
6035
  async function hashFiles(directory, paths) {
5974
6036
  const hashes = /* @__PURE__ */ new Map();
5975
6037
  for (const path of paths) {
5976
6038
  if (UNTRACKED.has(path) || path === LOCK_PATH) continue;
5977
- const full = join2(directory, path);
5978
- hashes.set(path, existsSync(full) ? hashContent(await readFile(full, "utf-8")) : void 0);
6039
+ const full = join3(directory, path);
6040
+ hashes.set(path, existsSync2(full) ? hashContent(await readFile(full, "utf-8")) : void 0);
5979
6041
  }
5980
6042
  return hashes;
5981
6043
  }
@@ -5993,8 +6055,8 @@ async function updateLock(directory, paths) {
5993
6055
  await saveLock(directory, files);
5994
6056
  }
5995
6057
  function readLock(directory) {
5996
- const path = join2(directory, LOCK_PATH);
5997
- if (!existsSync(path)) return void 0;
6058
+ const path = join3(directory, LOCK_PATH);
6059
+ if (!existsSync2(path)) return void 0;
5998
6060
  const parsed = JSON.parse(readFileSync(path, "utf-8"));
5999
6061
  if (typeof parsed !== "object" || parsed === null || !("files" in parsed) || typeof parsed.files !== "object" || parsed.files === null) {
6000
6062
  throw new Error(`${LOCK_PATH} is not a scaffold lock`);
@@ -6008,8 +6070,8 @@ function readLock(directory) {
6008
6070
  }
6009
6071
  function biomeBinary(directory) {
6010
6072
  const name = process.platform === "win32" ? "biome.cmd" : "biome";
6011
- const path = join2(directory, "node_modules", ".bin", name);
6012
- return existsSync(path) ? path : void 0;
6073
+ const path = join3(directory, "node_modules", ".bin", name);
6074
+ return existsSync2(path) ? path : void 0;
6013
6075
  }
6014
6076
  async function formatProject(directory, paths = ["."]) {
6015
6077
  const biome = biomeBinary(directory);
@@ -6027,7 +6089,7 @@ ${tail(result.output)}`));
6027
6089
  }
6028
6090
  async function enclosingGitRepo(directory) {
6029
6091
  let dir = resolve(directory);
6030
- while (!existsSync(dir)) dir = dirname2(dir);
6092
+ while (!existsSync2(dir)) dir = dirname3(dir);
6031
6093
  try {
6032
6094
  const result = await runCommand("git", ["rev-parse", "--show-toplevel"], { cwd: dir });
6033
6095
  return result.code === 0 ? result.output.trim() : void 0;
@@ -6036,11 +6098,11 @@ async function enclosingGitRepo(directory) {
6036
6098
  }
6037
6099
  }
6038
6100
  function enclosingWorkspace(directory) {
6039
- let dir = dirname2(resolve(directory));
6101
+ let dir = dirname3(resolve(directory));
6040
6102
  for (; ; ) {
6041
- if (existsSync(join2(dir, "pnpm-workspace.yaml"))) return dir;
6042
- const manifest = join2(dir, "package.json");
6043
- if (existsSync(manifest)) {
6103
+ if (existsSync2(join3(dir, "pnpm-workspace.yaml"))) return dir;
6104
+ const manifest = join3(dir, "package.json");
6105
+ if (existsSync2(manifest)) {
6044
6106
  try {
6045
6107
  const parsed = JSON.parse(readFileSync(manifest, "utf-8"));
6046
6108
  if (typeof parsed === "object" && parsed !== null && "workspaces" in parsed) return dir;
@@ -6048,7 +6110,7 @@ function enclosingWorkspace(directory) {
6048
6110
  return void 0;
6049
6111
  }
6050
6112
  }
6051
- const parent = dirname2(dir);
6113
+ const parent = dirname3(dir);
6052
6114
  if (parent === dir) return void 0;
6053
6115
  dir = parent;
6054
6116
  }
@@ -6091,7 +6153,8 @@ ${tail(commit.output)}`));
6091
6153
  return { status: "done" };
6092
6154
  }
6093
6155
  async function installDependencies(directory, pm, inherit) {
6094
- if (!await hasCommand(pm, directory)) {
6156
+ const invocation = packageManagerInvocation(pm, ["install"]);
6157
+ if (invocation.fromPath && !await hasCommand(pm, directory)) {
6095
6158
  return failure(
6096
6159
  new CodedError(
6097
6160
  "PM_NOT_FOUND",
@@ -6100,7 +6163,11 @@ async function installDependencies(directory, pm, inherit) {
6100
6163
  );
6101
6164
  }
6102
6165
  try {
6103
- const result = await runCommand(pm, ["install"], { cwd: directory, inherit });
6166
+ const result = await runCommand(invocation.command, invocation.args, {
6167
+ cwd: directory,
6168
+ inherit,
6169
+ ...!invocation.fromPath && { shell: false }
6170
+ });
6104
6171
  if (result.code !== 0) {
6105
6172
  return failure(
6106
6173
  new CodedError(
@@ -6116,7 +6183,7 @@ ${tail(result.output)}`
6116
6183
  }
6117
6184
  }
6118
6185
  function assertEmptyDirectory(directory) {
6119
- if (existsSync(directory) && readdirSync(directory).length > 0) {
6186
+ if (existsSync2(directory) && readdirSync(directory).length > 0) {
6120
6187
  throw new CodedError("DIRECTORY_NOT_EMPTY", `${directory} already exists and is not empty`);
6121
6188
  }
6122
6189
  }
@@ -6175,9 +6242,9 @@ async function scaffold(spec, options) {
6175
6242
  }
6176
6243
 
6177
6244
  // src/kit/add.ts
6178
- import { existsSync as existsSync2, readFileSync as readFileSync2 } from "fs";
6245
+ import { existsSync as existsSync3, readFileSync as readFileSync2 } from "fs";
6179
6246
  import { mkdir as mkdir2, rm, writeFile as writeFile2 } from "fs/promises";
6180
- import { dirname as dirname3, join as join3, resolve as resolve2 } from "path";
6247
+ import { dirname as dirname4, join as join4, resolve as resolve2 } from "path";
6181
6248
  import { parseDocument as parseDocument2 } from "yaml";
6182
6249
 
6183
6250
  // src/kit/diff.ts
@@ -6403,8 +6470,8 @@ var AddConflictError = class extends Error {
6403
6470
  }
6404
6471
  };
6405
6472
  function readProject(directory) {
6406
- const manifestPath = join3(directory, "package.json");
6407
- if (!existsSync2(manifestPath)) {
6473
+ const manifestPath = join4(directory, "package.json");
6474
+ if (!existsSync3(manifestPath)) {
6408
6475
  throw new NotAScaffoldedProjectError(
6409
6476
  `There is no package.json in ${directory}: run cogitator add in the root of the project`
6410
6477
  );
@@ -6605,8 +6672,8 @@ function decide(inputs) {
6605
6672
  return structuredDecision(inputs) ?? textDecision(inputs);
6606
6673
  }
6607
6674
  function readText(directory, path) {
6608
- const full = join3(directory, path);
6609
- return existsSync2(full) ? readFileSync2(full, "utf-8") : void 0;
6675
+ const full = join4(directory, path);
6676
+ return existsSync3(full) ? readFileSync2(full, "utf-8") : void 0;
6610
6677
  }
6611
6678
  function fileMap(plan) {
6612
6679
  return new Map(
@@ -6706,12 +6773,12 @@ async function addToProject(directory, changes, options = {}) {
6706
6773
  const written = [];
6707
6774
  const deleted = [];
6708
6775
  for (const change of plan.changes) {
6709
- const target = join3(plan.directory, change.path);
6776
+ const target = join4(plan.directory, change.path);
6710
6777
  if (change.kind === "delete") {
6711
6778
  await rm(target, { force: true });
6712
6779
  deleted.push(change.path);
6713
6780
  } else {
6714
- await mkdir2(dirname3(target), { recursive: true });
6781
+ await mkdir2(dirname4(target), { recursive: true });
6715
6782
  await writeFile2(target, change.content ?? "");
6716
6783
  written.push(change.path);
6717
6784
  }
@@ -6823,6 +6890,18 @@ var KNOWN_ENV = {
6823
6890
  OWNER_TG_ID: { description: "Your Telegram user id, the owner of the bot" },
6824
6891
  WEBCHAT_TOKEN: { description: "Token WebChat clients authenticate with" },
6825
6892
  WEBCHAT_PORT: { description: "Port of the WebChat server", example: "8080" },
6893
+ OPENROUTER_API_KEY: {
6894
+ description: "OpenRouter API key, for decision models and models of every provider (https://openrouter.ai/keys)"
6895
+ },
6896
+ BLUESKY_HANDLE: {
6897
+ description: "Bluesky handle of the bot account",
6898
+ example: "yourbot.bsky.social"
6899
+ },
6900
+ BLUESKY_APP_PASSWORD: {
6901
+ description: "Bluesky app password (Settings, Privacy and security, App passwords)"
6902
+ },
6903
+ THREADS_ACCESS_TOKEN: { description: "Threads long-lived access token, renewed automatically" },
6904
+ PUBLISH: { description: "Set to 1 to publish for real instead of a dry run", example: "0" },
6826
6905
  DEEPGRAM_API_KEY: { description: "Deepgram API key for speech to text" },
6827
6906
  ELEVENLABS_API_KEY: { description: "ElevenLabs API key for text to speech" }
6828
6907
  };
@@ -6976,9 +7055,9 @@ async function fetchExampleFiles(plan, fetchImpl = fetch) {
6976
7055
  }
6977
7056
 
6978
7057
  // src/kit/remote.ts
6979
- import { existsSync as existsSync3, readFileSync as readFileSync3, readdirSync as readdirSync2, writeFileSync as writeFileSync2 } from "fs";
7058
+ import { existsSync as existsSync4, readFileSync as readFileSync3, readdirSync as readdirSync2, writeFileSync as writeFileSync2 } from "fs";
6980
7059
  import { mkdir as mkdir3 } from "fs/promises";
6981
- import { join as join4 } from "path";
7060
+ import { join as join5 } from "path";
6982
7061
  import { Readable } from "stream";
6983
7062
  import { pipeline } from "stream/promises";
6984
7063
  import { x as extract } from "tar";
@@ -7065,9 +7144,9 @@ async function downloadTemplate(template, directory, options = {}) {
7065
7144
  return { files: files.sort(), skipped: skipped.sort() };
7066
7145
  }
7067
7146
  function prepareTemplate(directory, options) {
7068
- const lockfile = PACKAGE_MANAGERS.find((pm) => existsSync3(join4(directory, LOCKFILES[pm])));
7069
- const manifestPath = join4(directory, "package.json");
7070
- if (!existsSync3(manifestPath)) {
7147
+ const lockfile = PACKAGE_MANAGERS.find((pm) => existsSync4(join5(directory, LOCKFILES[pm])));
7148
+ const manifestPath = join5(directory, "package.json");
7149
+ if (!existsSync4(manifestPath)) {
7071
7150
  throw new CodedError(
7072
7151
  "TEMPLATE_NO_MANIFEST",
7073
7152
  `The template has no package.json at its root (it has ${readdirSync2(directory).slice(0, 8).join(", ")}): point --template at the project directory`
@@ -7107,9 +7186,9 @@ function prepareTemplate(directory, options) {
7107
7186
  }
7108
7187
 
7109
7188
  // src/kit/starter.ts
7110
- import { existsSync as existsSync4, readFileSync as readFileSync4 } from "fs";
7189
+ import { existsSync as existsSync5, readFileSync as readFileSync4 } from "fs";
7111
7190
  import { mkdir as mkdir4, readdir, rm as rm2 } from "fs/promises";
7112
- import { join as join5, relative, resolve as resolve3 } from "path";
7191
+ import { join as join6, relative, resolve as resolve3 } from "path";
7113
7192
  async function finish2(directory, packageManager, options) {
7114
7193
  const log2 = options.log ?? silentLogger;
7115
7194
  let install = { status: "skipped", reason: "install was turned off" };
@@ -7180,7 +7259,7 @@ async function createFromTemplate(template, options) {
7180
7259
  const log2 = options.log ?? silentLogger;
7181
7260
  const directory = resolve3(options.directory);
7182
7261
  assertEmptyDirectory(directory);
7183
- const existed = existsSync4(directory);
7262
+ const existed = existsSync5(directory);
7184
7263
  log2.start(`Downloading ${describeTemplate(template)}`);
7185
7264
  let downloaded;
7186
7265
  let prepared;
@@ -7194,7 +7273,7 @@ async function createFromTemplate(template, options) {
7194
7273
  log2.fail(`Could not use ${describeTemplate(template)}`);
7195
7274
  if (existed) {
7196
7275
  for (const entry of await readdir(directory)) {
7197
- await rm2(join5(directory, entry), { recursive: true, force: true });
7276
+ await rm2(join6(directory, entry), { recursive: true, force: true });
7198
7277
  }
7199
7278
  } else {
7200
7279
  await rm2(directory, { recursive: true, force: true });
@@ -7213,7 +7292,7 @@ async function createFromTemplate(template, options) {
7213
7292
  ...downloaded.skipped.length > 0 ? [`Left out links and special files: ${downloaded.skipped.join(", ")}`] : []
7214
7293
  ];
7215
7294
  const { install, git } = await finish2(directory, packageManager, options);
7216
- const manifest = JSON.parse(readFileSync4(join5(directory, "package.json"), "utf-8"));
7295
+ const manifest = JSON.parse(readFileSync4(join6(directory, "package.json"), "utf-8"));
7217
7296
  return {
7218
7297
  directory,
7219
7298
  source: describeTemplate(template),
@@ -7226,7 +7305,7 @@ async function createFromTemplate(template, options) {
7226
7305
  packageManager,
7227
7306
  manifest.scripts ?? {},
7228
7307
  install.status === "done",
7229
- existsSync4(join5(directory, ".env.example"))
7308
+ existsSync5(join6(directory, ".env.example"))
7230
7309
  ),
7231
7310
  notes
7232
7311
  };
@@ -7237,7 +7316,11 @@ var APP_CHOICES = [
7237
7316
  { value: "script", label: "Script", hint: "an agent you run from the terminal" },
7238
7317
  { value: "server", label: "HTTP server", hint: "agents behind a REST, SSE and WebSocket API" },
7239
7318
  { value: "next", label: "Next.js app", hint: "a streaming chat UI with server-side agents" },
7240
- { value: "channels", label: "Messaging bot", hint: "Telegram, Discord, Slack or WebChat" },
7319
+ {
7320
+ value: "channels",
7321
+ label: "Messaging bot",
7322
+ hint: "Telegram, Discord, Slack, WebChat, Bluesky or Threads"
7323
+ },
7241
7324
  { value: "worker", label: "Queue worker", hint: "agents run as BullMQ jobs on Redis" }
7242
7325
  ];
7243
7326
  var SERVER_CHOICES = [
@@ -7291,7 +7374,9 @@ var CHANNEL_CHOICES = [
7291
7374
  { value: "webchat", label: "WebChat", hint: "a local WebSocket chat, no setup" },
7292
7375
  { value: "telegram", label: "Telegram", hint: "needs a bot token from @BotFather" },
7293
7376
  { value: "discord", label: "Discord", hint: "needs a bot token" },
7294
- { value: "slack", label: "Slack", hint: "needs a bot token and signing secret" }
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" }
7295
7380
  ];
7296
7381
  var CODING_AGENT_CHOICES = [
7297
7382
  { value: "claude", label: "Claude Code", hint: ".mcp.json and a skill in .claude/skills" },
@@ -7529,9 +7614,10 @@ function describeKeyCheck(envKey, check) {
7529
7614
  }
7530
7615
 
7531
7616
  // src/kit/telemetry.ts
7532
- import { existsSync as existsSync5, mkdirSync as mkdirSync2, writeFileSync as writeFileSync3 } from "fs";
7617
+ import { existsSync as existsSync6, mkdirSync as mkdirSync2, writeFileSync as writeFileSync3 } from "fs";
7533
7618
  import { homedir } from "os";
7534
- import { join as join6 } from "path";
7619
+ import { join as join7 } from "path";
7620
+ import { z as z2 } from "zod";
7535
7621
  var TELEMETRY_HOST = "https://analytics.el1fe.com";
7536
7622
  var TELEMETRY_DOCS = "https://cogitator.app/docs/getting-started/telemetry";
7537
7623
  var SEND_TIMEOUT_MS = 1500;
@@ -7551,6 +7637,20 @@ var PAYLOAD_FIELDS = [
7551
7637
  "failedStep",
7552
7638
  "errorCode"
7553
7639
  ];
7640
+ var VALUE = z2.string().regex(/^[\w.,-]{0,100}$/);
7641
+ var PAYLOAD_SCHEMA = z2.strictObject({
7642
+ version: VALUE,
7643
+ preset: VALUE,
7644
+ provider: VALUE,
7645
+ memory: VALUE,
7646
+ features: VALUE,
7647
+ packageManager: VALUE,
7648
+ node: VALUE,
7649
+ os: VALUE,
7650
+ outcome: z2.enum(["success", "failure"]),
7651
+ failedStep: z2.enum(["none", "create", "install"]),
7652
+ errorCode: VALUE
7653
+ });
7554
7654
  var SAFE_CODE = /^[A-Z][A-Z0-9_]{1,63}$/;
7555
7655
  function telemetryErrorCode(error) {
7556
7656
  let kind;
@@ -7597,12 +7697,12 @@ function telemetryDisabledReason(options) {
7597
7697
  return void 0;
7598
7698
  }
7599
7699
  function configDir(env) {
7600
- if (process.platform === "win32" && env.APPDATA) return join6(env.APPDATA, "cogitator");
7601
- return join6(env.XDG_CONFIG_HOME || join6(homedir(), ".config"), "cogitator");
7700
+ if (process.platform === "win32" && env.APPDATA) return join7(env.APPDATA, "cogitator");
7701
+ return join7(env.XDG_CONFIG_HOME || join7(homedir(), ".config"), "cogitator");
7602
7702
  }
7603
7703
  function firstRunNotice(env = process.env) {
7604
- const marker = join6(configDir(env), "telemetry-notice");
7605
- if (existsSync5(marker)) return void 0;
7704
+ const marker = join7(configDir(env), "telemetry-notice");
7705
+ if (existsSync6(marker)) return void 0;
7606
7706
  try {
7607
7707
  mkdirSync2(configDir(env), { recursive: true });
7608
7708
  writeFileSync3(marker, `${(/* @__PURE__ */ new Date()).toISOString()}
@@ -7623,14 +7723,17 @@ function telemetryUserAgent(payload) {
7623
7723
  async function sendTelemetry(payload, options = {}) {
7624
7724
  const website = options.websiteId ?? telemetryWebsiteId();
7625
7725
  if (!website) return false;
7726
+ const parsed = PAYLOAD_SCHEMA.safeParse(payload);
7727
+ if (!parsed.success) return false;
7728
+ const data = parsed.data;
7626
7729
  const body = {
7627
7730
  type: "event",
7628
7731
  payload: {
7629
7732
  website,
7630
7733
  hostname: "create-cogitator-app",
7631
- url: `/scaffold/${payload.preset}`,
7734
+ url: `/scaffold/${data.preset}`,
7632
7735
  name: "scaffold",
7633
- data: payload
7736
+ data
7634
7737
  }
7635
7738
  };
7636
7739
  try {
@@ -7638,7 +7741,7 @@ async function sendTelemetry(payload, options = {}) {
7638
7741
  method: "POST",
7639
7742
  headers: {
7640
7743
  "content-type": "application/json",
7641
- "user-agent": telemetryUserAgent(payload)
7744
+ "user-agent": telemetryUserAgent(data)
7642
7745
  },
7643
7746
  body: JSON.stringify(body),
7644
7747
  signal: AbortSignal.timeout(options.timeoutMs ?? SEND_TIMEOUT_MS)
@@ -7921,16 +8024,16 @@ function exampleList() {
7921
8024
  }
7922
8025
 
7923
8026
  // src/cli/interactive.ts
7924
- import { existsSync as existsSync6 } from "fs";
8027
+ import { existsSync as existsSync7 } from "fs";
7925
8028
  import { homedir as homedir2 } from "os";
7926
- import { join as join7 } from "path";
8029
+ import { join as join8 } from "path";
7927
8030
  import * as p from "@clack/prompts";
7928
8031
 
7929
8032
  // src/cli/resolve.ts
7930
- import { basename, resolve as resolve4 } from "path";
8033
+ import { basename as basename2, resolve as resolve4 } from "path";
7931
8034
  var DEFAULT_DIRECTORY = "my-agents";
7932
8035
  function projectNameFromDirectory(directory, cwd = process.cwd()) {
7933
- return basename(resolve4(cwd, directory.trim()));
8036
+ return basename2(resolve4(cwd, directory.trim()));
7934
8037
  }
7935
8038
  function resolveDirectory(directory, cwd = process.cwd()) {
7936
8039
  const name = projectNameFromDirectory(directory, cwd);
@@ -7986,7 +8089,7 @@ function detectCodingAgents(home = homedir2()) {
7986
8089
  codex: ".codex"
7987
8090
  };
7988
8091
  return CODING_AGENT_CHOICES.map((choice) => choice.value).filter(
7989
- (agent) => existsSync6(join7(home, markers[agent]))
8092
+ (agent) => existsSync7(join8(home, markers[agent]))
7990
8093
  );
7991
8094
  }
7992
8095
  async function askDirectory() {