overai 1.4.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/README.md +248 -0
- package/dist/agent/context.d.ts +74 -0
- package/dist/agent/context.js +140 -0
- package/dist/agent/enhanced.d.ts +98 -0
- package/dist/agent/enhanced.js +293 -0
- package/dist/agent/handoff.d.ts +82 -0
- package/dist/agent/handoff.js +124 -0
- package/dist/agent/image.d.ts +57 -0
- package/dist/agent/image.js +116 -0
- package/dist/agent/index.d.ts +19 -0
- package/dist/agent/index.js +38 -0
- package/dist/agent/prompt-expander.d.ts +43 -0
- package/dist/agent/prompt-expander.js +99 -0
- package/dist/agent/proxy.d.ts +26 -0
- package/dist/agent/proxy.js +173 -0
- package/dist/agent/query-rewriter.d.ts +41 -0
- package/dist/agent/query-rewriter.js +94 -0
- package/dist/agent/research.d.ts +55 -0
- package/dist/agent/research.js +134 -0
- package/dist/agent/router.d.ts +141 -0
- package/dist/agent/router.js +209 -0
- package/dist/agent/simple.d.ts +289 -0
- package/dist/agent/simple.js +696 -0
- package/dist/agent/types.d.ts +56 -0
- package/dist/agent/types.js +165 -0
- package/dist/ai/agent-loop.d.ts +177 -0
- package/dist/ai/agent-loop.js +313 -0
- package/dist/ai/devtools.d.ts +74 -0
- package/dist/ai/devtools.js +216 -0
- package/dist/ai/embed.d.ts +71 -0
- package/dist/ai/embed.js +154 -0
- package/dist/ai/generate-image.d.ts +66 -0
- package/dist/ai/generate-image.js +138 -0
- package/dist/ai/generate-object.d.ts +132 -0
- package/dist/ai/generate-object.js +206 -0
- package/dist/ai/generate-text.d.ts +201 -0
- package/dist/ai/generate-text.js +253 -0
- package/dist/ai/index.d.ts +27 -0
- package/dist/ai/index.js +140 -0
- package/dist/ai/mcp.d.ts +181 -0
- package/dist/ai/mcp.js +234 -0
- package/dist/ai/middleware.d.ts +110 -0
- package/dist/ai/middleware.js +186 -0
- package/dist/ai/models.d.ts +67 -0
- package/dist/ai/models.js +249 -0
- package/dist/ai/multimodal.d.ts +125 -0
- package/dist/ai/multimodal.js +270 -0
- package/dist/ai/nextjs.d.ts +122 -0
- package/dist/ai/nextjs.js +218 -0
- package/dist/ai/server.d.ts +126 -0
- package/dist/ai/server.js +336 -0
- package/dist/ai/speech.d.ts +135 -0
- package/dist/ai/speech.js +296 -0
- package/dist/ai/telemetry.d.ts +162 -0
- package/dist/ai/telemetry.js +311 -0
- package/dist/ai/tool-approval.d.ts +225 -0
- package/dist/ai/tool-approval.js +407 -0
- package/dist/ai/tools.d.ts +93 -0
- package/dist/ai/tools.js +89 -0
- package/dist/ai/types.d.ts +47 -0
- package/dist/ai/types.js +5 -0
- package/dist/ai/ui-message.d.ts +218 -0
- package/dist/ai/ui-message.js +291 -0
- package/dist/auto/index.d.ts +62 -0
- package/dist/auto/index.js +163 -0
- package/dist/cache/index.d.ts +78 -0
- package/dist/cache/index.js +235 -0
- package/dist/cli/commands/agent.d.ts +30 -0
- package/dist/cli/commands/agent.js +151 -0
- package/dist/cli/commands/agents.d.ts +24 -0
- package/dist/cli/commands/agents.js +166 -0
- package/dist/cli/commands/approval.d.ts +10 -0
- package/dist/cli/commands/approval.js +253 -0
- package/dist/cli/commands/auto.d.ts +12 -0
- package/dist/cli/commands/auto.js +109 -0
- package/dist/cli/commands/autonomy.d.ts +5 -0
- package/dist/cli/commands/autonomy.js +152 -0
- package/dist/cli/commands/benchmark.d.ts +19 -0
- package/dist/cli/commands/benchmark.js +484 -0
- package/dist/cli/commands/cache.d.ts +9 -0
- package/dist/cli/commands/cache.js +143 -0
- package/dist/cli/commands/chat.d.ts +14 -0
- package/dist/cli/commands/chat.js +127 -0
- package/dist/cli/commands/checkpoints.d.ts +5 -0
- package/dist/cli/commands/checkpoints.js +236 -0
- package/dist/cli/commands/context.d.ts +11 -0
- package/dist/cli/commands/context.js +182 -0
- package/dist/cli/commands/cost.d.ts +5 -0
- package/dist/cli/commands/cost.js +146 -0
- package/dist/cli/commands/db.d.ts +9 -0
- package/dist/cli/commands/db.js +149 -0
- package/dist/cli/commands/embed.d.ts +20 -0
- package/dist/cli/commands/embed.js +375 -0
- package/dist/cli/commands/eval.d.ts +17 -0
- package/dist/cli/commands/eval.js +247 -0
- package/dist/cli/commands/external-agents.d.ts +5 -0
- package/dist/cli/commands/external-agents.js +170 -0
- package/dist/cli/commands/fast-context.d.ts +5 -0
- package/dist/cli/commands/fast-context.js +126 -0
- package/dist/cli/commands/flow.d.ts +5 -0
- package/dist/cli/commands/flow.js +141 -0
- package/dist/cli/commands/git.d.ts +5 -0
- package/dist/cli/commands/git.js +178 -0
- package/dist/cli/commands/graph-rag.d.ts +9 -0
- package/dist/cli/commands/graph-rag.js +131 -0
- package/dist/cli/commands/guardrail.d.ts +11 -0
- package/dist/cli/commands/guardrail.js +156 -0
- package/dist/cli/commands/handoff.d.ts +9 -0
- package/dist/cli/commands/handoff.js +133 -0
- package/dist/cli/commands/help.d.ts +8 -0
- package/dist/cli/commands/help.js +139 -0
- package/dist/cli/commands/image.d.ts +13 -0
- package/dist/cli/commands/image.js +192 -0
- package/dist/cli/commands/interactive.d.ts +6 -0
- package/dist/cli/commands/interactive.js +79 -0
- package/dist/cli/commands/jobs.d.ts +5 -0
- package/dist/cli/commands/jobs.js +282 -0
- package/dist/cli/commands/knowledge.d.ts +9 -0
- package/dist/cli/commands/knowledge.js +226 -0
- package/dist/cli/commands/llm.d.ts +21 -0
- package/dist/cli/commands/llm.js +748 -0
- package/dist/cli/commands/mcp.d.ts +9 -0
- package/dist/cli/commands/mcp.js +243 -0
- package/dist/cli/commands/memory.d.ts +10 -0
- package/dist/cli/commands/memory.js +198 -0
- package/dist/cli/commands/n8n.d.ts +5 -0
- package/dist/cli/commands/n8n.js +137 -0
- package/dist/cli/commands/observability.d.ts +16 -0
- package/dist/cli/commands/observability.js +335 -0
- package/dist/cli/commands/planning.d.ts +9 -0
- package/dist/cli/commands/planning.js +167 -0
- package/dist/cli/commands/prompt-expand.d.ts +11 -0
- package/dist/cli/commands/prompt-expand.js +100 -0
- package/dist/cli/commands/providers.d.ts +17 -0
- package/dist/cli/commands/providers.js +386 -0
- package/dist/cli/commands/query-rewrite.d.ts +12 -0
- package/dist/cli/commands/query-rewrite.js +102 -0
- package/dist/cli/commands/repo-map.d.ts +5 -0
- package/dist/cli/commands/repo-map.js +151 -0
- package/dist/cli/commands/reranker.d.ts +10 -0
- package/dist/cli/commands/reranker.js +144 -0
- package/dist/cli/commands/research.d.ts +12 -0
- package/dist/cli/commands/research.js +108 -0
- package/dist/cli/commands/router.d.ts +11 -0
- package/dist/cli/commands/router.js +142 -0
- package/dist/cli/commands/run.d.ts +14 -0
- package/dist/cli/commands/run.js +111 -0
- package/dist/cli/commands/sandbox.d.ts +5 -0
- package/dist/cli/commands/sandbox.js +135 -0
- package/dist/cli/commands/scheduler.d.ts +5 -0
- package/dist/cli/commands/scheduler.js +260 -0
- package/dist/cli/commands/session.d.ts +9 -0
- package/dist/cli/commands/session.js +238 -0
- package/dist/cli/commands/skills.d.ts +9 -0
- package/dist/cli/commands/skills.js +256 -0
- package/dist/cli/commands/telemetry.d.ts +9 -0
- package/dist/cli/commands/telemetry.js +146 -0
- package/dist/cli/commands/tools.d.ts +19 -0
- package/dist/cli/commands/tools.js +576 -0
- package/dist/cli/commands/vector.d.ts +10 -0
- package/dist/cli/commands/vector.js +171 -0
- package/dist/cli/commands/version.d.ts +8 -0
- package/dist/cli/commands/version.js +40 -0
- package/dist/cli/commands/voice.d.ts +10 -0
- package/dist/cli/commands/voice.js +162 -0
- package/dist/cli/commands/workflow.d.ts +13 -0
- package/dist/cli/commands/workflow.js +184 -0
- package/dist/cli/config/index.d.ts +6 -0
- package/dist/cli/config/index.js +22 -0
- package/dist/cli/config/load.d.ts +20 -0
- package/dist/cli/config/load.js +229 -0
- package/dist/cli/config/resolve.d.ts +28 -0
- package/dist/cli/config/resolve.js +70 -0
- package/dist/cli/config/schema.d.ts +15 -0
- package/dist/cli/config/schema.js +65 -0
- package/dist/cli/features/autonomy-mode.d.ts +98 -0
- package/dist/cli/features/autonomy-mode.js +266 -0
- package/dist/cli/features/background-jobs.d.ts +155 -0
- package/dist/cli/features/background-jobs.js +416 -0
- package/dist/cli/features/checkpoints.d.ts +126 -0
- package/dist/cli/features/checkpoints.js +288 -0
- package/dist/cli/features/cost-tracker.d.ts +101 -0
- package/dist/cli/features/cost-tracker.js +212 -0
- package/dist/cli/features/external-agents.d.ts +117 -0
- package/dist/cli/features/external-agents.js +296 -0
- package/dist/cli/features/fast-context.d.ts +126 -0
- package/dist/cli/features/fast-context.js +310 -0
- package/dist/cli/features/flow-display.d.ts +100 -0
- package/dist/cli/features/flow-display.js +254 -0
- package/dist/cli/features/git-integration.d.ts +138 -0
- package/dist/cli/features/git-integration.js +374 -0
- package/dist/cli/features/index.d.ts +17 -0
- package/dist/cli/features/index.js +102 -0
- package/dist/cli/features/interactive-tui.d.ts +114 -0
- package/dist/cli/features/interactive-tui.js +326 -0
- package/dist/cli/features/n8n-integration.d.ts +111 -0
- package/dist/cli/features/n8n-integration.js +299 -0
- package/dist/cli/features/repo-map.d.ts +101 -0
- package/dist/cli/features/repo-map.js +350 -0
- package/dist/cli/features/sandbox-executor.d.ts +89 -0
- package/dist/cli/features/sandbox-executor.js +314 -0
- package/dist/cli/features/scheduler.d.ts +111 -0
- package/dist/cli/features/scheduler.js +298 -0
- package/dist/cli/features/slash-commands.d.ts +77 -0
- package/dist/cli/features/slash-commands.js +316 -0
- package/dist/cli/index.d.ts +24 -0
- package/dist/cli/index.js +214 -0
- package/dist/cli/output/errors.d.ts +23 -0
- package/dist/cli/output/errors.js +36 -0
- package/dist/cli/output/json.d.ts +27 -0
- package/dist/cli/output/json.js +31 -0
- package/dist/cli/output/pretty.d.ts +13 -0
- package/dist/cli/output/pretty.js +31 -0
- package/dist/cli/runtime/env.d.ts +12 -0
- package/dist/cli/runtime/env.js +55 -0
- package/dist/cli/runtime/exit.d.ts +11 -0
- package/dist/cli/runtime/exit.js +49 -0
- package/dist/cli/runtime/index.d.ts +6 -0
- package/dist/cli/runtime/index.js +22 -0
- package/dist/cli/runtime/lazy.d.ts +18 -0
- package/dist/cli/runtime/lazy.js +85 -0
- package/dist/cli/spec/cli-spec.d.ts +87 -0
- package/dist/cli/spec/cli-spec.js +551 -0
- package/dist/cli/spec/index.d.ts +4 -0
- package/dist/cli/spec/index.js +20 -0
- package/dist/db/index.d.ts +6 -0
- package/dist/db/index.js +75 -0
- package/dist/db/types.d.ts +42 -0
- package/dist/db/types.js +2 -0
- package/dist/eval/index.d.ts +61 -0
- package/dist/eval/index.js +157 -0
- package/dist/events/index.d.ts +84 -0
- package/dist/events/index.js +153 -0
- package/dist/guardrails/index.d.ts +82 -0
- package/dist/guardrails/index.js +202 -0
- package/dist/guardrails/llm-guardrail.d.ts +46 -0
- package/dist/guardrails/llm-guardrail.js +112 -0
- package/dist/index.d.ts +92 -0
- package/dist/index.js +608 -0
- package/dist/integrations/computer-use.d.ts +182 -0
- package/dist/integrations/computer-use.js +356 -0
- package/dist/integrations/index.d.ts +7 -0
- package/dist/integrations/index.js +26 -0
- package/dist/integrations/observability/base.d.ts +123 -0
- package/dist/integrations/observability/base.js +183 -0
- package/dist/integrations/observability/index.d.ts +8 -0
- package/dist/integrations/observability/index.js +29 -0
- package/dist/integrations/observability/langfuse.d.ts +32 -0
- package/dist/integrations/observability/langfuse.js +174 -0
- package/dist/integrations/postgres.d.ts +162 -0
- package/dist/integrations/postgres.js +396 -0
- package/dist/integrations/slack.d.ts +145 -0
- package/dist/integrations/slack.js +270 -0
- package/dist/integrations/vector/base.d.ts +110 -0
- package/dist/integrations/vector/base.js +158 -0
- package/dist/integrations/vector/chroma.d.ts +25 -0
- package/dist/integrations/vector/chroma.js +143 -0
- package/dist/integrations/vector/index.d.ts +14 -0
- package/dist/integrations/vector/index.js +37 -0
- package/dist/integrations/vector/pinecone.d.ts +28 -0
- package/dist/integrations/vector/pinecone.js +172 -0
- package/dist/integrations/vector/qdrant.d.ts +25 -0
- package/dist/integrations/vector/qdrant.js +146 -0
- package/dist/integrations/vector/weaviate.d.ts +30 -0
- package/dist/integrations/vector/weaviate.js +206 -0
- package/dist/integrations/voice/base.d.ts +76 -0
- package/dist/integrations/voice/base.js +168 -0
- package/dist/integrations/voice/index.d.ts +6 -0
- package/dist/integrations/voice/index.js +26 -0
- package/dist/knowledge/chunking.d.ts +55 -0
- package/dist/knowledge/chunking.js +158 -0
- package/dist/knowledge/graph-rag.d.ts +125 -0
- package/dist/knowledge/graph-rag.js +289 -0
- package/dist/knowledge/index.d.ts +24 -0
- package/dist/knowledge/index.js +47 -0
- package/dist/knowledge/knowledge.d.ts +0 -0
- package/dist/knowledge/knowledge.js +1 -0
- package/dist/knowledge/rag.d.ts +80 -0
- package/dist/knowledge/rag.js +147 -0
- package/dist/knowledge/reranker.d.ts +86 -0
- package/dist/knowledge/reranker.js +196 -0
- package/dist/llm/backend-resolver.d.ts +77 -0
- package/dist/llm/backend-resolver.js +242 -0
- package/dist/llm/embeddings.d.ts +66 -0
- package/dist/llm/embeddings.js +294 -0
- package/dist/llm/index.d.ts +29 -0
- package/dist/llm/index.js +33 -0
- package/dist/llm/llm.d.ts +0 -0
- package/dist/llm/llm.js +1 -0
- package/dist/llm/openai.d.ts +39 -0
- package/dist/llm/openai.js +302 -0
- package/dist/llm/providers/ai-sdk/adapter.d.ts +121 -0
- package/dist/llm/providers/ai-sdk/adapter.js +399 -0
- package/dist/llm/providers/ai-sdk/backend.d.ts +49 -0
- package/dist/llm/providers/ai-sdk/backend.js +421 -0
- package/dist/llm/providers/ai-sdk/index.d.ts +69 -0
- package/dist/llm/providers/ai-sdk/index.js +200 -0
- package/dist/llm/providers/ai-sdk/middleware.d.ts +60 -0
- package/dist/llm/providers/ai-sdk/middleware.js +262 -0
- package/dist/llm/providers/ai-sdk/provider-map.d.ts +75 -0
- package/dist/llm/providers/ai-sdk/provider-map.js +258 -0
- package/dist/llm/providers/ai-sdk/types.d.ts +217 -0
- package/dist/llm/providers/ai-sdk/types.js +222 -0
- package/dist/llm/providers/anthropic.d.ts +33 -0
- package/dist/llm/providers/anthropic.js +291 -0
- package/dist/llm/providers/base.d.ts +25 -0
- package/dist/llm/providers/base.js +43 -0
- package/dist/llm/providers/google.d.ts +27 -0
- package/dist/llm/providers/google.js +275 -0
- package/dist/llm/providers/index.d.ts +107 -0
- package/dist/llm/providers/index.js +216 -0
- package/dist/llm/providers/openai.d.ts +18 -0
- package/dist/llm/providers/openai.js +203 -0
- package/dist/llm/providers/registry.d.ts +159 -0
- package/dist/llm/providers/registry.js +279 -0
- package/dist/llm/providers/types.d.ts +94 -0
- package/dist/llm/providers/types.js +5 -0
- package/dist/main.d.ts +0 -0
- package/dist/main.js +1 -0
- package/dist/memory/auto-memory.d.ts +136 -0
- package/dist/memory/auto-memory.js +301 -0
- package/dist/memory/file-memory.d.ts +88 -0
- package/dist/memory/file-memory.js +287 -0
- package/dist/memory/index.d.ts +26 -0
- package/dist/memory/index.js +41 -0
- package/dist/memory/memory.d.ts +92 -0
- package/dist/memory/memory.js +170 -0
- package/dist/observability/adapters/console.d.ts +33 -0
- package/dist/observability/adapters/console.js +71 -0
- package/dist/observability/adapters/external/arize.d.ts +20 -0
- package/dist/observability/adapters/external/arize.js +22 -0
- package/dist/observability/adapters/external/axiom.d.ts +20 -0
- package/dist/observability/adapters/external/axiom.js +22 -0
- package/dist/observability/adapters/external/braintrust.d.ts +20 -0
- package/dist/observability/adapters/external/braintrust.js +22 -0
- package/dist/observability/adapters/external/helicone.d.ts +20 -0
- package/dist/observability/adapters/external/helicone.js +22 -0
- package/dist/observability/adapters/external/laminar.d.ts +20 -0
- package/dist/observability/adapters/external/laminar.js +22 -0
- package/dist/observability/adapters/external/langfuse.d.ts +28 -0
- package/dist/observability/adapters/external/langfuse.js +186 -0
- package/dist/observability/adapters/external/langsmith.d.ts +21 -0
- package/dist/observability/adapters/external/langsmith.js +83 -0
- package/dist/observability/adapters/external/langwatch.d.ts +20 -0
- package/dist/observability/adapters/external/langwatch.js +22 -0
- package/dist/observability/adapters/external/maxim.d.ts +20 -0
- package/dist/observability/adapters/external/maxim.js +22 -0
- package/dist/observability/adapters/external/patronus.d.ts +20 -0
- package/dist/observability/adapters/external/patronus.js +22 -0
- package/dist/observability/adapters/external/scorecard.d.ts +20 -0
- package/dist/observability/adapters/external/scorecard.js +22 -0
- package/dist/observability/adapters/external/signoz.d.ts +20 -0
- package/dist/observability/adapters/external/signoz.js +22 -0
- package/dist/observability/adapters/external/traceloop.d.ts +20 -0
- package/dist/observability/adapters/external/traceloop.js +22 -0
- package/dist/observability/adapters/external/weave.d.ts +20 -0
- package/dist/observability/adapters/external/weave.js +22 -0
- package/dist/observability/adapters/index.d.ts +19 -0
- package/dist/observability/adapters/index.js +289 -0
- package/dist/observability/adapters/memory.d.ts +41 -0
- package/dist/observability/adapters/memory.js +190 -0
- package/dist/observability/adapters/noop.d.ts +25 -0
- package/dist/observability/adapters/noop.js +64 -0
- package/dist/observability/index.d.ts +47 -0
- package/dist/observability/index.js +115 -0
- package/dist/observability/types.d.ts +165 -0
- package/dist/observability/types.js +165 -0
- package/dist/planning/index.d.ts +253 -0
- package/dist/planning/index.js +475 -0
- package/dist/process/index.d.ts +25 -0
- package/dist/process/index.js +37 -0
- package/dist/process/process.d.ts +0 -0
- package/dist/process/process.js +1 -0
- package/dist/session/index.d.ts +111 -0
- package/dist/session/index.js +250 -0
- package/dist/skills/index.d.ts +70 -0
- package/dist/skills/index.js +233 -0
- package/dist/task/index.d.ts +25 -0
- package/dist/task/index.js +32 -0
- package/dist/task/task.d.ts +0 -0
- package/dist/task/task.js +1 -0
- package/dist/telemetry/index.d.ts +175 -0
- package/dist/telemetry/index.js +287 -0
- package/dist/tools/arxivTools.d.ts +32 -0
- package/dist/tools/arxivTools.js +81 -0
- package/dist/tools/base.d.ts +97 -0
- package/dist/tools/base.js +147 -0
- package/dist/tools/builtins/airweave.d.ts +32 -0
- package/dist/tools/builtins/airweave.js +119 -0
- package/dist/tools/builtins/bedrock-agentcore.d.ts +62 -0
- package/dist/tools/builtins/bedrock-agentcore.js +233 -0
- package/dist/tools/builtins/code-execution.d.ts +36 -0
- package/dist/tools/builtins/code-execution.js +136 -0
- package/dist/tools/builtins/code-mode.d.ts +54 -0
- package/dist/tools/builtins/code-mode.js +167 -0
- package/dist/tools/builtins/custom.d.ts +42 -0
- package/dist/tools/builtins/custom.js +195 -0
- package/dist/tools/builtins/exa.d.ts +53 -0
- package/dist/tools/builtins/exa.js +112 -0
- package/dist/tools/builtins/firecrawl.d.ts +56 -0
- package/dist/tools/builtins/firecrawl.js +158 -0
- package/dist/tools/builtins/index.d.ts +45 -0
- package/dist/tools/builtins/index.js +180 -0
- package/dist/tools/builtins/parallel.d.ts +30 -0
- package/dist/tools/builtins/parallel.js +113 -0
- package/dist/tools/builtins/perplexity.d.ts +32 -0
- package/dist/tools/builtins/perplexity.js +113 -0
- package/dist/tools/builtins/superagent.d.ts +66 -0
- package/dist/tools/builtins/superagent.js +187 -0
- package/dist/tools/builtins/tavily.d.ts +99 -0
- package/dist/tools/builtins/tavily.js +285 -0
- package/dist/tools/builtins/valyu.d.ts +65 -0
- package/dist/tools/builtins/valyu.js +193 -0
- package/dist/tools/decorator.d.ts +91 -0
- package/dist/tools/decorator.js +165 -0
- package/dist/tools/index.d.ts +8 -0
- package/dist/tools/index.js +36 -0
- package/dist/tools/mcpSse.d.ts +43 -0
- package/dist/tools/mcpSse.js +110 -0
- package/dist/tools/registry/index.d.ts +9 -0
- package/dist/tools/registry/index.js +28 -0
- package/dist/tools/registry/middleware.d.ts +43 -0
- package/dist/tools/registry/middleware.js +220 -0
- package/dist/tools/registry/registry.d.ts +92 -0
- package/dist/tools/registry/registry.js +280 -0
- package/dist/tools/registry/types.d.ts +217 -0
- package/dist/tools/registry/types.js +49 -0
- package/dist/tools/test.d.ts +0 -0
- package/dist/tools/test.js +1 -0
- package/dist/tools/tools.d.ts +74 -0
- package/dist/tools/tools.js +133 -0
- package/dist/utils/logger.d.ts +25 -0
- package/dist/utils/logger.js +149 -0
- package/dist/utils/pretty-logger.d.ts +21 -0
- package/dist/utils/pretty-logger.js +248 -0
- package/dist/workflows/index.d.ts +118 -0
- package/dist/workflows/index.js +247 -0
- package/dist/workflows/loop.d.ts +0 -0
- package/dist/workflows/loop.js +1 -0
- package/dist/workflows/yaml-parser.d.ts +48 -0
- package/dist/workflows/yaml-parser.js +304 -0
- package/package.json +119 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OverAI CLI Specification - TypeScript Runtime
|
|
3
|
+
* Parsed and validated spec from cli-spec.v1.yaml
|
|
4
|
+
*/
|
|
5
|
+
export declare const CLI_SPEC_VERSION = "1.0.0";
|
|
6
|
+
export interface CommandArg {
|
|
7
|
+
name: string;
|
|
8
|
+
type: 'string' | 'integer' | 'boolean';
|
|
9
|
+
required: boolean;
|
|
10
|
+
position?: number;
|
|
11
|
+
description?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface CommandFlag {
|
|
14
|
+
name: string;
|
|
15
|
+
short?: string;
|
|
16
|
+
type: 'string' | 'integer' | 'boolean';
|
|
17
|
+
default?: string | number | boolean;
|
|
18
|
+
enum?: string[];
|
|
19
|
+
description?: string;
|
|
20
|
+
required?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface Subcommand {
|
|
23
|
+
description: string;
|
|
24
|
+
args?: CommandArg[];
|
|
25
|
+
flags?: CommandFlag[];
|
|
26
|
+
}
|
|
27
|
+
export interface Command {
|
|
28
|
+
description: string;
|
|
29
|
+
args?: CommandArg[];
|
|
30
|
+
flags?: CommandFlag[];
|
|
31
|
+
subcommands?: Record<string, Subcommand>;
|
|
32
|
+
}
|
|
33
|
+
export declare const COMMANDS: Record<string, Command>;
|
|
34
|
+
export declare const GLOBAL_FLAGS: CommandFlag[];
|
|
35
|
+
export declare const EXIT_CODES: {
|
|
36
|
+
readonly SUCCESS: 0;
|
|
37
|
+
readonly RUNTIME_ERROR: 1;
|
|
38
|
+
readonly INVALID_ARGUMENTS: 2;
|
|
39
|
+
readonly CONFIG_ERROR: 3;
|
|
40
|
+
readonly NETWORK_ERROR: 4;
|
|
41
|
+
readonly AUTH_ERROR: 5;
|
|
42
|
+
};
|
|
43
|
+
export type ExitCode = typeof EXIT_CODES[keyof typeof EXIT_CODES];
|
|
44
|
+
export interface SuccessOutput<T = unknown> {
|
|
45
|
+
success: true;
|
|
46
|
+
data: T;
|
|
47
|
+
meta?: {
|
|
48
|
+
duration_ms?: number;
|
|
49
|
+
model?: string;
|
|
50
|
+
tokens?: {
|
|
51
|
+
input?: number;
|
|
52
|
+
output?: number;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
export interface ErrorOutput {
|
|
57
|
+
success: false;
|
|
58
|
+
error: {
|
|
59
|
+
code: string;
|
|
60
|
+
message: string;
|
|
61
|
+
details?: Record<string, unknown>;
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
export type CLIOutput<T = unknown> = SuccessOutput<T> | ErrorOutput;
|
|
65
|
+
export declare const ENV_VARS: {
|
|
66
|
+
readonly PRAISONAI_MODEL: "PRAISONAI_MODEL";
|
|
67
|
+
readonly PRAISONAI_PROFILE: "PRAISONAI_PROFILE";
|
|
68
|
+
readonly PRAISONAI_VERBOSE: "PRAISONAI_VERBOSE";
|
|
69
|
+
readonly PRAISONAI_CONFIG: "PRAISONAI_CONFIG";
|
|
70
|
+
readonly OPENAI_API_KEY: "OPENAI_API_KEY";
|
|
71
|
+
readonly ANTHROPIC_API_KEY: "ANTHROPIC_API_KEY";
|
|
72
|
+
readonly GOOGLE_API_KEY: "GOOGLE_API_KEY";
|
|
73
|
+
};
|
|
74
|
+
export declare const CONFIG_FILES: readonly [".praisonai.yaml", ".praisonai.json"];
|
|
75
|
+
export interface ConfigSchema {
|
|
76
|
+
model?: string;
|
|
77
|
+
verbose?: boolean;
|
|
78
|
+
stream?: boolean;
|
|
79
|
+
profiles?: Record<string, {
|
|
80
|
+
model?: string;
|
|
81
|
+
verbose?: boolean;
|
|
82
|
+
stream?: boolean;
|
|
83
|
+
}>;
|
|
84
|
+
}
|
|
85
|
+
export declare function validateCommand(command: string): command is keyof typeof COMMANDS;
|
|
86
|
+
export declare function getCommandSpec(command: string): Command | undefined;
|
|
87
|
+
export declare function getAllFlags(command: string): CommandFlag[];
|
|
@@ -0,0 +1,551 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* OverAI CLI Specification - TypeScript Runtime
|
|
4
|
+
* Parsed and validated spec from cli-spec.v1.yaml
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.CONFIG_FILES = exports.ENV_VARS = exports.EXIT_CODES = exports.GLOBAL_FLAGS = exports.COMMANDS = exports.CLI_SPEC_VERSION = void 0;
|
|
8
|
+
exports.validateCommand = validateCommand;
|
|
9
|
+
exports.getCommandSpec = getCommandSpec;
|
|
10
|
+
exports.getAllFlags = getAllFlags;
|
|
11
|
+
exports.CLI_SPEC_VERSION = '1.0.0';
|
|
12
|
+
exports.COMMANDS = {
|
|
13
|
+
chat: {
|
|
14
|
+
description: 'Chat with an AI agent',
|
|
15
|
+
args: [
|
|
16
|
+
{ name: 'prompt', type: 'string', required: true, position: 0 }
|
|
17
|
+
],
|
|
18
|
+
flags: [
|
|
19
|
+
{ name: 'model', short: 'm', type: 'string', description: 'Model to use (e.g., openai/gpt-4o-mini)' },
|
|
20
|
+
{ name: 'stream', short: 's', type: 'boolean', default: false, description: 'Enable streaming output' },
|
|
21
|
+
{ name: 'session', type: 'string', description: 'Session ID for conversation continuity' }
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
run: {
|
|
25
|
+
description: 'Run an agent with a task',
|
|
26
|
+
args: [
|
|
27
|
+
{ name: 'task', type: 'string', required: true, position: 0 }
|
|
28
|
+
],
|
|
29
|
+
flags: [
|
|
30
|
+
{ name: 'agent', short: 'a', type: 'string', description: 'Agent configuration file or name' },
|
|
31
|
+
{ name: 'tools', short: 't', type: 'string', description: 'Comma-separated list of tools' }
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
workflow: {
|
|
35
|
+
description: 'Execute a multi-agent workflow',
|
|
36
|
+
args: [
|
|
37
|
+
{ name: 'file', type: 'string', required: true, position: 0, description: 'Workflow YAML file path' }
|
|
38
|
+
],
|
|
39
|
+
flags: [
|
|
40
|
+
{ name: 'parallel', type: 'boolean', default: false, description: 'Run workflow steps in parallel where possible' }
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
eval: {
|
|
44
|
+
description: 'Evaluate agent performance',
|
|
45
|
+
subcommands: {
|
|
46
|
+
accuracy: {
|
|
47
|
+
description: 'Run accuracy evaluation',
|
|
48
|
+
flags: [
|
|
49
|
+
{ name: 'input', type: 'string', required: true },
|
|
50
|
+
{ name: 'expected', type: 'string', required: true },
|
|
51
|
+
{ name: 'iterations', type: 'integer', default: 1 }
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
performance: {
|
|
55
|
+
description: 'Run performance benchmark',
|
|
56
|
+
flags: [
|
|
57
|
+
{ name: 'iterations', type: 'integer', default: 10 },
|
|
58
|
+
{ name: 'warmup', type: 'integer', default: 2 }
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
reliability: {
|
|
62
|
+
description: 'Run reliability check',
|
|
63
|
+
flags: [
|
|
64
|
+
{ name: 'expected-tools', type: 'string', description: 'Comma-separated expected tool calls' }
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
providers: {
|
|
70
|
+
description: 'List available LLM providers',
|
|
71
|
+
flags: []
|
|
72
|
+
},
|
|
73
|
+
llm: {
|
|
74
|
+
description: 'AI SDK provider management and testing',
|
|
75
|
+
subcommands: {
|
|
76
|
+
providers: { description: 'List available AI SDK providers' },
|
|
77
|
+
test: {
|
|
78
|
+
description: 'Test connectivity to a provider',
|
|
79
|
+
args: [{ name: 'provider', type: 'string', required: false, position: 0 }]
|
|
80
|
+
},
|
|
81
|
+
validate: {
|
|
82
|
+
description: 'Validate provider configuration',
|
|
83
|
+
args: [{ name: 'provider', type: 'string', required: false, position: 0 }]
|
|
84
|
+
},
|
|
85
|
+
run: {
|
|
86
|
+
description: 'Run a prompt with a specific model',
|
|
87
|
+
args: [{ name: 'prompt', type: 'string', required: true, position: 0 }]
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
flags: [
|
|
91
|
+
{ name: 'model', short: 'm', type: 'string', description: 'Model to use (provider/model format)' },
|
|
92
|
+
{ name: 'stream', short: 's', type: 'boolean', default: false, description: 'Enable streaming output' },
|
|
93
|
+
{ name: 'timeout', type: 'integer', description: 'Request timeout in milliseconds' },
|
|
94
|
+
{ name: 'provider', short: 'p', type: 'string', description: 'Provider ID' }
|
|
95
|
+
]
|
|
96
|
+
},
|
|
97
|
+
tools: {
|
|
98
|
+
description: 'List or manage tools',
|
|
99
|
+
subcommands: {
|
|
100
|
+
list: {
|
|
101
|
+
description: 'List available tools'
|
|
102
|
+
},
|
|
103
|
+
info: {
|
|
104
|
+
description: 'Show tool information',
|
|
105
|
+
args: [
|
|
106
|
+
{ name: 'name', type: 'string', required: true, position: 0 }
|
|
107
|
+
]
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
memory: {
|
|
112
|
+
description: 'Manage agent memory',
|
|
113
|
+
subcommands: {
|
|
114
|
+
list: { description: 'List all memories' },
|
|
115
|
+
add: { description: 'Add a new memory', args: [{ name: 'content', type: 'string', required: true, position: 0 }] },
|
|
116
|
+
search: { description: 'Search memories', args: [{ name: 'query', type: 'string', required: true, position: 0 }] },
|
|
117
|
+
clear: { description: 'Clear all memories' }
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
session: {
|
|
121
|
+
description: 'Manage agent sessions',
|
|
122
|
+
subcommands: {
|
|
123
|
+
list: { description: 'List all sessions' },
|
|
124
|
+
create: { description: 'Create a new session', args: [{ name: 'id', type: 'string', required: false, position: 0 }] },
|
|
125
|
+
get: { description: 'Get session details', args: [{ name: 'id', type: 'string', required: true, position: 0 }] },
|
|
126
|
+
delete: { description: 'Delete a session', args: [{ name: 'id', type: 'string', required: true, position: 0 }] },
|
|
127
|
+
export: { description: 'Export session data', args: [{ name: 'id', type: 'string', required: true, position: 0 }] }
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
knowledge: {
|
|
131
|
+
description: 'Manage knowledge base',
|
|
132
|
+
subcommands: {
|
|
133
|
+
add: { description: 'Add knowledge from file or text', args: [{ name: 'source', type: 'string', required: true, position: 0 }] },
|
|
134
|
+
search: { description: 'Search knowledge base', args: [{ name: 'query', type: 'string', required: true, position: 0 }] },
|
|
135
|
+
list: { description: 'List all knowledge entries' }
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
skills: {
|
|
139
|
+
description: 'Manage agent skills',
|
|
140
|
+
subcommands: {
|
|
141
|
+
list: { description: 'List loaded skills' },
|
|
142
|
+
discover: { description: 'Discover skills in directory', args: [{ name: 'path', type: 'string', required: false, position: 0 }] },
|
|
143
|
+
validate: { description: 'Validate a skill', args: [{ name: 'path', type: 'string', required: true, position: 0 }] },
|
|
144
|
+
info: { description: 'Show skill information', args: [{ name: 'name', type: 'string', required: true, position: 0 }] }
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
mcp: {
|
|
148
|
+
description: 'Model Context Protocol management',
|
|
149
|
+
subcommands: {
|
|
150
|
+
list: { description: 'List registered MCP servers' },
|
|
151
|
+
add: { description: 'Add an MCP server', args: [{ name: 'name', type: 'string', required: true, position: 0 }] },
|
|
152
|
+
remove: { description: 'Remove an MCP server', args: [{ name: 'name', type: 'string', required: true, position: 0 }] },
|
|
153
|
+
start: { description: 'Start an MCP server', args: [{ name: 'name', type: 'string', required: true, position: 0 }] },
|
|
154
|
+
stop: { description: 'Stop an MCP server', args: [{ name: 'name', type: 'string', required: true, position: 0 }] }
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
auto: {
|
|
158
|
+
description: 'Auto-generate agents from topic',
|
|
159
|
+
args: [{ name: 'topic', type: 'string', required: true, position: 0 }],
|
|
160
|
+
flags: [
|
|
161
|
+
{ name: 'pattern', type: 'string', description: 'Agent pattern (sequential, parallel, routing)' },
|
|
162
|
+
{ name: 'agents', type: 'integer', description: 'Number of agents to generate' }
|
|
163
|
+
]
|
|
164
|
+
},
|
|
165
|
+
image: {
|
|
166
|
+
description: 'Image generation and analysis',
|
|
167
|
+
subcommands: {
|
|
168
|
+
generate: { description: 'Generate image from text', args: [{ name: 'prompt', type: 'string', required: true, position: 0 }] },
|
|
169
|
+
analyze: { description: 'Analyze an image', args: [{ name: 'url', type: 'string', required: true, position: 0 }] }
|
|
170
|
+
},
|
|
171
|
+
flags: [
|
|
172
|
+
{ name: 'size', type: 'string', description: 'Image size' },
|
|
173
|
+
{ name: 'quality', type: 'string', description: 'Image quality' },
|
|
174
|
+
{ name: 'style', type: 'string', description: 'Image style' }
|
|
175
|
+
]
|
|
176
|
+
},
|
|
177
|
+
research: {
|
|
178
|
+
description: 'Deep research on a topic',
|
|
179
|
+
args: [{ name: 'query', type: 'string', required: true, position: 0 }],
|
|
180
|
+
flags: [
|
|
181
|
+
{ name: 'depth', type: 'integer', description: 'Research depth (iterations)' },
|
|
182
|
+
{ name: 'max-sources', type: 'integer', description: 'Maximum sources to use' }
|
|
183
|
+
]
|
|
184
|
+
},
|
|
185
|
+
guardrail: {
|
|
186
|
+
description: 'Content validation and safety',
|
|
187
|
+
subcommands: {
|
|
188
|
+
check: { description: 'Check content against guardrails', args: [{ name: 'content', type: 'string', required: true, position: 0 }] }
|
|
189
|
+
},
|
|
190
|
+
flags: [
|
|
191
|
+
{ name: 'criteria', type: 'string', description: 'Custom validation criteria' }
|
|
192
|
+
]
|
|
193
|
+
},
|
|
194
|
+
telemetry: {
|
|
195
|
+
description: 'Usage monitoring and analytics',
|
|
196
|
+
subcommands: {
|
|
197
|
+
status: { description: 'Show telemetry status' },
|
|
198
|
+
enable: { description: 'Enable telemetry' },
|
|
199
|
+
disable: { description: 'Disable telemetry' },
|
|
200
|
+
clear: { description: 'Clear telemetry data' },
|
|
201
|
+
export: { description: 'Export telemetry data' }
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
approval: {
|
|
205
|
+
description: 'Tool approval management (AI SDK v6 parity)',
|
|
206
|
+
subcommands: {
|
|
207
|
+
status: { description: 'Show approval status' },
|
|
208
|
+
pending: { description: 'List pending approval requests' },
|
|
209
|
+
approve: { description: 'Approve a pending request', args: [{ name: 'id', type: 'string', required: true, position: 0 }] },
|
|
210
|
+
deny: { description: 'Deny a pending request', args: [{ name: 'id', type: 'string', required: true, position: 0 }] },
|
|
211
|
+
cancel: { description: 'Cancel a pending request', args: [{ name: 'id', type: 'string', required: true, position: 0 }] },
|
|
212
|
+
'cancel-all': { description: 'Cancel all pending requests' },
|
|
213
|
+
'auto-approve': { description: 'Auto-approve a tool', args: [{ name: 'tool', type: 'string', required: true, position: 0 }] },
|
|
214
|
+
'auto-deny': { description: 'Auto-deny a tool', args: [{ name: 'tool', type: 'string', required: true, position: 0 }] },
|
|
215
|
+
interactive: { description: 'Start interactive approval mode' }
|
|
216
|
+
},
|
|
217
|
+
flags: [
|
|
218
|
+
{ name: 'timeout', type: 'integer', description: 'Approval timeout in ms' }
|
|
219
|
+
]
|
|
220
|
+
},
|
|
221
|
+
planning: {
|
|
222
|
+
description: 'Task planning and todo management',
|
|
223
|
+
subcommands: {
|
|
224
|
+
create: { description: 'Create a new plan', args: [{ name: 'name', type: 'string', required: true, position: 0 }] },
|
|
225
|
+
todo: { description: 'Manage todo items' }
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
'query-rewrite': {
|
|
229
|
+
description: 'Rewrite queries for better search results',
|
|
230
|
+
args: [{ name: 'query', type: 'string', required: true, position: 0 }],
|
|
231
|
+
flags: [
|
|
232
|
+
{ name: 'strategy', type: 'string', description: 'Rewrite strategy (expand, simplify, decompose, rephrase, auto)' }
|
|
233
|
+
]
|
|
234
|
+
},
|
|
235
|
+
'prompt-expand': {
|
|
236
|
+
description: 'Expand prompts with more detail',
|
|
237
|
+
args: [{ name: 'prompt', type: 'string', required: true, position: 0 }],
|
|
238
|
+
flags: [
|
|
239
|
+
{ name: 'strategy', type: 'string', description: 'Expand strategy (detail, context, examples, constraints, auto)' }
|
|
240
|
+
]
|
|
241
|
+
},
|
|
242
|
+
router: {
|
|
243
|
+
description: 'Route requests to appropriate agents',
|
|
244
|
+
subcommands: {
|
|
245
|
+
analyze: { description: 'Analyze input and suggest routing', args: [{ name: 'input', type: 'string', required: true, position: 0 }] }
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
context: {
|
|
249
|
+
description: 'Manage conversation context',
|
|
250
|
+
subcommands: {
|
|
251
|
+
chat: { description: 'Chat with context management', args: [{ name: 'message', type: 'string', required: true, position: 0 }] },
|
|
252
|
+
summarize: { description: 'Summarize context', args: [{ name: 'text', type: 'string', required: true, position: 0 }] }
|
|
253
|
+
},
|
|
254
|
+
flags: [
|
|
255
|
+
{ name: 'max-messages', type: 'integer', description: 'Maximum messages in context' }
|
|
256
|
+
]
|
|
257
|
+
},
|
|
258
|
+
handoff: {
|
|
259
|
+
description: 'Agent handoff management',
|
|
260
|
+
subcommands: {
|
|
261
|
+
info: { description: 'Show handoff feature information' }
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
vector: {
|
|
265
|
+
description: 'Vector store management',
|
|
266
|
+
subcommands: {
|
|
267
|
+
info: { description: 'Show vector store information' },
|
|
268
|
+
providers: { description: 'List available vector store providers' }
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
observability: {
|
|
272
|
+
description: 'Monitoring and tracing',
|
|
273
|
+
subcommands: {
|
|
274
|
+
info: { description: 'Show observability information' },
|
|
275
|
+
providers: { description: 'List available observability providers' }
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
voice: {
|
|
279
|
+
description: 'Text-to-speech and speech-to-text',
|
|
280
|
+
subcommands: {
|
|
281
|
+
info: { description: 'Show voice feature information' },
|
|
282
|
+
providers: { description: 'List available voice providers' }
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
reranker: {
|
|
286
|
+
description: 'Document reranking',
|
|
287
|
+
subcommands: {
|
|
288
|
+
info: { description: 'Show reranker information' },
|
|
289
|
+
providers: { description: 'List available reranker providers' }
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
'graph-rag': {
|
|
293
|
+
description: 'Graph-based retrieval augmented generation',
|
|
294
|
+
subcommands: {
|
|
295
|
+
info: { description: 'Show Graph RAG information' }
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
cache: {
|
|
299
|
+
description: 'Caching management',
|
|
300
|
+
subcommands: {
|
|
301
|
+
info: { description: 'Show cache information' },
|
|
302
|
+
providers: { description: 'List available cache providers' }
|
|
303
|
+
}
|
|
304
|
+
},
|
|
305
|
+
db: {
|
|
306
|
+
description: 'Database adapter management',
|
|
307
|
+
subcommands: {
|
|
308
|
+
info: { description: 'Show database adapter information' },
|
|
309
|
+
adapters: { description: 'List available database adapters' }
|
|
310
|
+
}
|
|
311
|
+
},
|
|
312
|
+
scheduler: {
|
|
313
|
+
description: 'Agent task scheduling',
|
|
314
|
+
subcommands: {
|
|
315
|
+
create: { description: 'Create a scheduled task', args: [{ name: 'name', type: 'string', required: true, position: 0 }] },
|
|
316
|
+
list: { description: 'List all scheduled tasks' },
|
|
317
|
+
run: { description: 'Run a task immediately', args: [{ name: 'id', type: 'string', required: true, position: 0 }] },
|
|
318
|
+
remove: { description: 'Remove a scheduled task', args: [{ name: 'id', type: 'string', required: true, position: 0 }] },
|
|
319
|
+
enable: { description: 'Enable a task', args: [{ name: 'id', type: 'string', required: true, position: 0 }] },
|
|
320
|
+
disable: { description: 'Disable a task', args: [{ name: 'id', type: 'string', required: true, position: 0 }] },
|
|
321
|
+
patterns: { description: 'Show common cron patterns' }
|
|
322
|
+
},
|
|
323
|
+
flags: [
|
|
324
|
+
{ name: 'cron', type: 'string', description: 'Cron expression' },
|
|
325
|
+
{ name: 'interval', type: 'integer', description: 'Interval in seconds' }
|
|
326
|
+
]
|
|
327
|
+
},
|
|
328
|
+
jobs: {
|
|
329
|
+
description: 'Background job queue management',
|
|
330
|
+
subcommands: {
|
|
331
|
+
add: { description: 'Add a new job', args: [{ name: 'name', type: 'string', required: true, position: 0 }] },
|
|
332
|
+
list: { description: 'List all jobs' },
|
|
333
|
+
get: { description: 'Get job details', args: [{ name: 'id', type: 'string', required: true, position: 0 }] },
|
|
334
|
+
cancel: { description: 'Cancel a pending job', args: [{ name: 'id', type: 'string', required: true, position: 0 }] },
|
|
335
|
+
retry: { description: 'Retry a failed job', args: [{ name: 'id', type: 'string', required: true, position: 0 }] },
|
|
336
|
+
process: { description: 'Process a job immediately', args: [{ name: 'id', type: 'string', required: true, position: 0 }] },
|
|
337
|
+
stats: { description: 'Show queue statistics' },
|
|
338
|
+
cleanup: { description: 'Clean up old jobs' }
|
|
339
|
+
},
|
|
340
|
+
flags: [
|
|
341
|
+
{ name: 'storage', type: 'string', description: 'Path to job storage file' },
|
|
342
|
+
{ name: 'priority', type: 'string', description: 'Job priority (low, normal, high, critical)' },
|
|
343
|
+
{ name: 'status', type: 'string', description: 'Filter by status' }
|
|
344
|
+
]
|
|
345
|
+
},
|
|
346
|
+
checkpoints: {
|
|
347
|
+
description: 'Session state checkpointing',
|
|
348
|
+
subcommands: {
|
|
349
|
+
create: { description: 'Create a checkpoint', args: [{ name: 'name', type: 'string', required: false, position: 0 }] },
|
|
350
|
+
list: { description: 'List all checkpoints' },
|
|
351
|
+
get: { description: 'Get checkpoint details', args: [{ name: 'id', type: 'string', required: true, position: 0 }] },
|
|
352
|
+
restore: { description: 'Restore from checkpoint', args: [{ name: 'id', type: 'string', required: false, position: 0 }] },
|
|
353
|
+
delete: { description: 'Delete a checkpoint', args: [{ name: 'id', type: 'string', required: true, position: 0 }] },
|
|
354
|
+
export: { description: 'Export checkpoint as JSON', args: [{ name: 'id', type: 'string', required: true, position: 0 }] },
|
|
355
|
+
import: { description: 'Import checkpoint from JSON', args: [{ name: 'json', type: 'string', required: true, position: 0 }] }
|
|
356
|
+
},
|
|
357
|
+
flags: [
|
|
358
|
+
{ name: 'storage', type: 'string', description: 'Path to checkpoint storage' },
|
|
359
|
+
{ name: 'state', type: 'string', description: 'JSON state to save' }
|
|
360
|
+
]
|
|
361
|
+
},
|
|
362
|
+
'fast-context': {
|
|
363
|
+
description: 'Fast context retrieval',
|
|
364
|
+
subcommands: {
|
|
365
|
+
query: { description: 'Query for relevant context', args: [{ name: 'query', type: 'string', required: true, position: 0 }] },
|
|
366
|
+
stats: { description: 'Show cache statistics' },
|
|
367
|
+
clear: { description: 'Clear cache and sources' }
|
|
368
|
+
},
|
|
369
|
+
flags: [
|
|
370
|
+
{ name: 'max-tokens', type: 'integer', description: 'Maximum tokens in context' },
|
|
371
|
+
{ name: 'sources', type: 'string', description: 'Comma-separated source texts' }
|
|
372
|
+
]
|
|
373
|
+
},
|
|
374
|
+
autonomy: {
|
|
375
|
+
description: 'Autonomy mode management',
|
|
376
|
+
subcommands: {
|
|
377
|
+
status: { description: 'Show current autonomy status' },
|
|
378
|
+
set: { description: 'Set autonomy mode', args: [{ name: 'mode', type: 'string', required: true, position: 0 }] },
|
|
379
|
+
policies: { description: 'Show policies for a mode', args: [{ name: 'mode', type: 'string', required: false, position: 0 }] },
|
|
380
|
+
reset: { description: 'Reset autonomy state' }
|
|
381
|
+
}
|
|
382
|
+
},
|
|
383
|
+
sandbox: {
|
|
384
|
+
description: 'Safe command execution',
|
|
385
|
+
subcommands: {
|
|
386
|
+
exec: { description: 'Execute a command in sandbox', args: [{ name: 'command', type: 'string', required: true, position: 0 }] },
|
|
387
|
+
check: { description: 'Check if command is allowed', args: [{ name: 'command', type: 'string', required: true, position: 0 }] },
|
|
388
|
+
mode: { description: 'List available sandbox modes' }
|
|
389
|
+
},
|
|
390
|
+
flags: [
|
|
391
|
+
{ name: 'mode', type: 'string', description: 'Sandbox mode (disabled, basic, strict, network-isolated)' },
|
|
392
|
+
{ name: 'timeout', type: 'integer', description: 'Execution timeout in ms' }
|
|
393
|
+
]
|
|
394
|
+
},
|
|
395
|
+
'repo-map': {
|
|
396
|
+
description: 'Repository structure visualization',
|
|
397
|
+
subcommands: {
|
|
398
|
+
tree: { description: 'Show repository tree', args: [{ name: 'path', type: 'string', required: false, position: 0 }] },
|
|
399
|
+
symbols: { description: 'Extract code symbols', args: [{ name: 'path', type: 'string', required: false, position: 0 }] }
|
|
400
|
+
},
|
|
401
|
+
flags: [
|
|
402
|
+
{ name: 'depth', type: 'integer', description: 'Maximum directory depth' },
|
|
403
|
+
{ name: 'symbols', type: 'boolean', description: 'Include symbols in tree' }
|
|
404
|
+
]
|
|
405
|
+
},
|
|
406
|
+
git: {
|
|
407
|
+
description: 'Git integration (read-only)',
|
|
408
|
+
subcommands: {
|
|
409
|
+
status: { description: 'Show repository status' },
|
|
410
|
+
diff: { description: 'Show changes' },
|
|
411
|
+
log: { description: 'Show recent commits' },
|
|
412
|
+
branches: { description: 'List branches' },
|
|
413
|
+
stash: { description: 'List stashes' }
|
|
414
|
+
},
|
|
415
|
+
flags: [
|
|
416
|
+
{ name: 'cwd', type: 'string', description: 'Working directory' },
|
|
417
|
+
{ name: 'staged', type: 'boolean', description: 'Show staged changes only' },
|
|
418
|
+
{ name: 'limit', type: 'integer', description: 'Number of commits to show' }
|
|
419
|
+
]
|
|
420
|
+
},
|
|
421
|
+
n8n: {
|
|
422
|
+
description: 'N8N workflow integration',
|
|
423
|
+
subcommands: {
|
|
424
|
+
trigger: { description: 'Trigger an N8N webhook', args: [{ name: 'webhookId', type: 'string', required: true, position: 0 }] },
|
|
425
|
+
export: { description: 'Export workflow to N8N format', args: [{ name: 'name', type: 'string', required: false, position: 0 }] }
|
|
426
|
+
},
|
|
427
|
+
flags: [
|
|
428
|
+
{ name: 'base-url', type: 'string', description: 'N8N base URL' },
|
|
429
|
+
{ name: 'api-key', type: 'string', description: 'N8N API key' },
|
|
430
|
+
{ name: 'steps', type: 'string', description: 'Workflow steps' }
|
|
431
|
+
]
|
|
432
|
+
},
|
|
433
|
+
'external-agents': {
|
|
434
|
+
description: 'External AI CLI tool integration',
|
|
435
|
+
subcommands: {
|
|
436
|
+
list: { description: 'List all external agents' },
|
|
437
|
+
check: { description: 'Check agent availability', args: [{ name: 'name', type: 'string', required: true, position: 0 }] },
|
|
438
|
+
run: { description: 'Run with external agent', args: [{ name: 'name', type: 'string', required: true, position: 0 }] }
|
|
439
|
+
},
|
|
440
|
+
flags: [
|
|
441
|
+
{ name: 'cwd', type: 'string', description: 'Working directory' }
|
|
442
|
+
]
|
|
443
|
+
},
|
|
444
|
+
flow: {
|
|
445
|
+
description: 'Workflow flow visualization',
|
|
446
|
+
subcommands: {
|
|
447
|
+
show: { description: 'Display workflow as text', args: [{ name: 'steps', type: 'string', required: false, position: 0 }] },
|
|
448
|
+
dot: { description: 'Export as DOT format', args: [{ name: 'steps', type: 'string', required: false, position: 0 }] }
|
|
449
|
+
},
|
|
450
|
+
flags: [
|
|
451
|
+
{ name: 'steps', type: 'string', description: 'Steps as JSON or comma-separated' },
|
|
452
|
+
{ name: 'boxes', type: 'boolean', description: 'Display as ASCII boxes' },
|
|
453
|
+
{ name: 'compact', type: 'boolean', description: 'Compact display mode' }
|
|
454
|
+
]
|
|
455
|
+
},
|
|
456
|
+
cost: {
|
|
457
|
+
description: 'Token usage and cost tracking',
|
|
458
|
+
subcommands: {
|
|
459
|
+
summary: { description: 'Show cost summary' },
|
|
460
|
+
add: { description: 'Add token usage', args: [{ name: 'model', type: 'string', required: true, position: 0 }] },
|
|
461
|
+
reset: { description: 'Reset cost tracker' },
|
|
462
|
+
pricing: { description: 'Show model pricing', args: [{ name: 'model', type: 'string', required: false, position: 0 }] }
|
|
463
|
+
}
|
|
464
|
+
},
|
|
465
|
+
interactive: {
|
|
466
|
+
description: 'Interactive TUI mode',
|
|
467
|
+
flags: [
|
|
468
|
+
{ name: 'model', short: 'm', type: 'string', description: 'Model to use' },
|
|
469
|
+
{ name: 'prompt', type: 'string', description: 'Custom prompt string' },
|
|
470
|
+
{ name: 'history', type: 'string', description: 'Path to history file' }
|
|
471
|
+
]
|
|
472
|
+
},
|
|
473
|
+
version: {
|
|
474
|
+
description: 'Show CLI version',
|
|
475
|
+
flags: []
|
|
476
|
+
},
|
|
477
|
+
help: {
|
|
478
|
+
description: 'Show help information',
|
|
479
|
+
args: [
|
|
480
|
+
{ name: 'command', type: 'string', required: false, position: 0 }
|
|
481
|
+
]
|
|
482
|
+
},
|
|
483
|
+
embed: {
|
|
484
|
+
description: 'Generate embeddings using AI SDK',
|
|
485
|
+
subcommands: {
|
|
486
|
+
text: { description: 'Embed text(s)', args: [{ name: 'text', type: 'string', required: true, position: 0 }] },
|
|
487
|
+
file: { description: 'Embed file contents', args: [{ name: 'path', type: 'string', required: true, position: 0 }] },
|
|
488
|
+
query: { description: 'Query similar texts', args: [{ name: 'query', type: 'string', required: true, position: 0 }] },
|
|
489
|
+
models: { description: 'List available embedding models' }
|
|
490
|
+
},
|
|
491
|
+
flags: [
|
|
492
|
+
{ name: 'model', short: 'm', type: 'string', description: 'Embedding model to use' },
|
|
493
|
+
{ name: 'provider', type: 'string', description: 'Provider (openai, google, cohere)' },
|
|
494
|
+
{ name: 'backend', type: 'string', description: 'Backend (ai-sdk, native, auto)' },
|
|
495
|
+
{ name: 'save', type: 'string', description: 'Save embeddings to file' },
|
|
496
|
+
{ name: 'file', type: 'string', description: 'Embeddings file for query' }
|
|
497
|
+
]
|
|
498
|
+
},
|
|
499
|
+
benchmark: {
|
|
500
|
+
description: 'Run performance benchmarks',
|
|
501
|
+
subcommands: {
|
|
502
|
+
run: { description: 'Run all benchmarks' },
|
|
503
|
+
import: { description: 'Benchmark import time' },
|
|
504
|
+
memory: { description: 'Benchmark memory usage' },
|
|
505
|
+
latency: { description: 'Benchmark first-call latency' },
|
|
506
|
+
streaming: { description: 'Benchmark streaming throughput' },
|
|
507
|
+
embedding: { description: 'Benchmark embedding throughput' }
|
|
508
|
+
},
|
|
509
|
+
flags: [
|
|
510
|
+
{ name: 'iterations', type: 'integer', description: 'Number of iterations' },
|
|
511
|
+
{ name: 'backend', type: 'string', description: 'Backend to test (ai-sdk, native, both)' },
|
|
512
|
+
{ name: 'real', type: 'boolean', description: 'Use real API calls (requires keys)' }
|
|
513
|
+
]
|
|
514
|
+
}
|
|
515
|
+
};
|
|
516
|
+
exports.GLOBAL_FLAGS = [
|
|
517
|
+
{ name: 'verbose', short: 'v', type: 'boolean', default: false, description: 'Enable verbose output' },
|
|
518
|
+
{ name: 'config', short: 'c', type: 'string', description: 'Path to config file' },
|
|
519
|
+
{ name: 'profile', short: 'p', type: 'string', description: 'Profile name to use' },
|
|
520
|
+
{ name: 'output', short: 'o', type: 'string', enum: ['json', 'text', 'pretty'], default: 'pretty', description: 'Output format' },
|
|
521
|
+
{ name: 'json', type: 'boolean', default: false, description: 'Shorthand for --output json' }
|
|
522
|
+
];
|
|
523
|
+
exports.EXIT_CODES = {
|
|
524
|
+
SUCCESS: 0,
|
|
525
|
+
RUNTIME_ERROR: 1,
|
|
526
|
+
INVALID_ARGUMENTS: 2,
|
|
527
|
+
CONFIG_ERROR: 3,
|
|
528
|
+
NETWORK_ERROR: 4,
|
|
529
|
+
AUTH_ERROR: 5
|
|
530
|
+
};
|
|
531
|
+
exports.ENV_VARS = {
|
|
532
|
+
PRAISONAI_MODEL: 'PRAISONAI_MODEL',
|
|
533
|
+
PRAISONAI_PROFILE: 'PRAISONAI_PROFILE',
|
|
534
|
+
PRAISONAI_VERBOSE: 'PRAISONAI_VERBOSE',
|
|
535
|
+
PRAISONAI_CONFIG: 'PRAISONAI_CONFIG',
|
|
536
|
+
OPENAI_API_KEY: 'OPENAI_API_KEY',
|
|
537
|
+
ANTHROPIC_API_KEY: 'ANTHROPIC_API_KEY',
|
|
538
|
+
GOOGLE_API_KEY: 'GOOGLE_API_KEY'
|
|
539
|
+
};
|
|
540
|
+
exports.CONFIG_FILES = ['.praisonai.yaml', '.praisonai.json'];
|
|
541
|
+
function validateCommand(command) {
|
|
542
|
+
return command in exports.COMMANDS;
|
|
543
|
+
}
|
|
544
|
+
function getCommandSpec(command) {
|
|
545
|
+
return exports.COMMANDS[command];
|
|
546
|
+
}
|
|
547
|
+
function getAllFlags(command) {
|
|
548
|
+
const cmdSpec = exports.COMMANDS[command];
|
|
549
|
+
const cmdFlags = cmdSpec?.flags || [];
|
|
550
|
+
return [...exports.GLOBAL_FLAGS, ...cmdFlags];
|
|
551
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* CLI Spec exports
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
17
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
18
|
+
};
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
__exportStar(require("./cli-spec"), exports);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DbAdapter, DbConfig } from './types';
|
|
2
|
+
export * from './types';
|
|
3
|
+
export declare function createDbAdapter(config: DbConfig | string): DbAdapter;
|
|
4
|
+
export declare function getDefaultDbAdapter(): DbAdapter | undefined;
|
|
5
|
+
export declare function setDefaultDbAdapter(adapter: DbAdapter): void;
|
|
6
|
+
export declare function db(connectionString?: string): DbAdapter;
|