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,138 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Git Integration - Git operations for CLI
|
|
3
|
+
* Safe, read-focused operations with optional write capabilities
|
|
4
|
+
*/
|
|
5
|
+
export interface GitConfig {
|
|
6
|
+
cwd?: string;
|
|
7
|
+
safe?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface GitStatus {
|
|
10
|
+
branch: string;
|
|
11
|
+
ahead: number;
|
|
12
|
+
behind: number;
|
|
13
|
+
staged: string[];
|
|
14
|
+
modified: string[];
|
|
15
|
+
untracked: string[];
|
|
16
|
+
deleted: string[];
|
|
17
|
+
conflicts: string[];
|
|
18
|
+
}
|
|
19
|
+
export interface GitCommit {
|
|
20
|
+
hash: string;
|
|
21
|
+
shortHash: string;
|
|
22
|
+
author: string;
|
|
23
|
+
email: string;
|
|
24
|
+
date: Date;
|
|
25
|
+
message: string;
|
|
26
|
+
}
|
|
27
|
+
export interface GitDiff {
|
|
28
|
+
files: GitDiffFile[];
|
|
29
|
+
summary: string;
|
|
30
|
+
}
|
|
31
|
+
export interface GitDiffFile {
|
|
32
|
+
path: string;
|
|
33
|
+
status: 'added' | 'modified' | 'deleted' | 'renamed';
|
|
34
|
+
additions: number;
|
|
35
|
+
deletions: number;
|
|
36
|
+
diff?: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Git Manager class
|
|
40
|
+
*/
|
|
41
|
+
export declare class GitManager {
|
|
42
|
+
private cwd;
|
|
43
|
+
private safe;
|
|
44
|
+
constructor(config?: GitConfig);
|
|
45
|
+
/**
|
|
46
|
+
* Execute a git command
|
|
47
|
+
*/
|
|
48
|
+
private exec;
|
|
49
|
+
/**
|
|
50
|
+
* Check if directory is a git repository
|
|
51
|
+
*/
|
|
52
|
+
isRepo(): Promise<boolean>;
|
|
53
|
+
/**
|
|
54
|
+
* Get current branch name
|
|
55
|
+
*/
|
|
56
|
+
getBranch(): Promise<string>;
|
|
57
|
+
/**
|
|
58
|
+
* Get repository status
|
|
59
|
+
*/
|
|
60
|
+
getStatus(): Promise<GitStatus>;
|
|
61
|
+
/**
|
|
62
|
+
* Get diff (staged or unstaged)
|
|
63
|
+
*/
|
|
64
|
+
getDiff(staged?: boolean): Promise<GitDiff>;
|
|
65
|
+
/**
|
|
66
|
+
* Get recent commits
|
|
67
|
+
*/
|
|
68
|
+
getLog(limit?: number): Promise<GitCommit[]>;
|
|
69
|
+
/**
|
|
70
|
+
* Get list of branches
|
|
71
|
+
*/
|
|
72
|
+
getBranches(): Promise<{
|
|
73
|
+
name: string;
|
|
74
|
+
current: boolean;
|
|
75
|
+
}[]>;
|
|
76
|
+
/**
|
|
77
|
+
* Stage files (requires safe=false)
|
|
78
|
+
*/
|
|
79
|
+
add(files?: string[]): Promise<void>;
|
|
80
|
+
/**
|
|
81
|
+
* Commit staged changes (requires safe=false)
|
|
82
|
+
*/
|
|
83
|
+
commit(message: string): Promise<string>;
|
|
84
|
+
/**
|
|
85
|
+
* Stash changes (requires safe=false)
|
|
86
|
+
*/
|
|
87
|
+
stash(message?: string): Promise<void>;
|
|
88
|
+
/**
|
|
89
|
+
* Pop stash (requires safe=false)
|
|
90
|
+
*/
|
|
91
|
+
stashPop(): Promise<void>;
|
|
92
|
+
/**
|
|
93
|
+
* Get stash list
|
|
94
|
+
*/
|
|
95
|
+
getStashList(): Promise<string[]>;
|
|
96
|
+
/**
|
|
97
|
+
* Get file content at a specific commit
|
|
98
|
+
*/
|
|
99
|
+
show(ref: string, path: string): Promise<string>;
|
|
100
|
+
/**
|
|
101
|
+
* Get blame for a file
|
|
102
|
+
*/
|
|
103
|
+
blame(path: string): Promise<string>;
|
|
104
|
+
/**
|
|
105
|
+
* Generate commit message from staged changes
|
|
106
|
+
*/
|
|
107
|
+
generateCommitMessage(): Promise<string>;
|
|
108
|
+
/**
|
|
109
|
+
* Get formatted status string
|
|
110
|
+
*/
|
|
111
|
+
getStatusString(): Promise<string>;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Create a git manager instance
|
|
115
|
+
*/
|
|
116
|
+
export declare function createGitManager(config?: GitConfig): GitManager;
|
|
117
|
+
/**
|
|
118
|
+
* Diff viewer with syntax highlighting (text-based)
|
|
119
|
+
*/
|
|
120
|
+
export declare class DiffViewer {
|
|
121
|
+
private diff;
|
|
122
|
+
constructor(diff: string);
|
|
123
|
+
/**
|
|
124
|
+
* Get formatted diff with markers
|
|
125
|
+
*/
|
|
126
|
+
format(): string;
|
|
127
|
+
/**
|
|
128
|
+
* Get summary statistics
|
|
129
|
+
*/
|
|
130
|
+
getStats(): {
|
|
131
|
+
additions: number;
|
|
132
|
+
deletions: number;
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Create a diff viewer
|
|
137
|
+
*/
|
|
138
|
+
export declare function createDiffViewer(diff: string): DiffViewer;
|
|
@@ -0,0 +1,374 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Git Integration - Git operations for CLI
|
|
4
|
+
* Safe, read-focused operations with optional write capabilities
|
|
5
|
+
*/
|
|
6
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(o, k2, desc);
|
|
13
|
+
}) : (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
o[k2] = m[k];
|
|
16
|
+
}));
|
|
17
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
18
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
19
|
+
}) : function(o, v) {
|
|
20
|
+
o["default"] = v;
|
|
21
|
+
});
|
|
22
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
23
|
+
var ownKeys = function(o) {
|
|
24
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
25
|
+
var ar = [];
|
|
26
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
27
|
+
return ar;
|
|
28
|
+
};
|
|
29
|
+
return ownKeys(o);
|
|
30
|
+
};
|
|
31
|
+
return function (mod) {
|
|
32
|
+
if (mod && mod.__esModule) return mod;
|
|
33
|
+
var result = {};
|
|
34
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
35
|
+
__setModuleDefault(result, mod);
|
|
36
|
+
return result;
|
|
37
|
+
};
|
|
38
|
+
})();
|
|
39
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
+
exports.DiffViewer = exports.GitManager = void 0;
|
|
41
|
+
exports.createGitManager = createGitManager;
|
|
42
|
+
exports.createDiffViewer = createDiffViewer;
|
|
43
|
+
/**
|
|
44
|
+
* Git Manager class
|
|
45
|
+
*/
|
|
46
|
+
class GitManager {
|
|
47
|
+
constructor(config = {}) {
|
|
48
|
+
this.cwd = config.cwd || process.cwd();
|
|
49
|
+
this.safe = config.safe ?? true;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Execute a git command
|
|
53
|
+
*/
|
|
54
|
+
async exec(args) {
|
|
55
|
+
const { spawn } = await Promise.resolve().then(() => __importStar(require('child_process')));
|
|
56
|
+
return new Promise((resolve, reject) => {
|
|
57
|
+
const proc = spawn('git', args, {
|
|
58
|
+
cwd: this.cwd,
|
|
59
|
+
stdio: ['pipe', 'pipe', 'pipe']
|
|
60
|
+
});
|
|
61
|
+
let stdout = '';
|
|
62
|
+
let stderr = '';
|
|
63
|
+
proc.stdout?.on('data', (data) => {
|
|
64
|
+
stdout += data.toString();
|
|
65
|
+
});
|
|
66
|
+
proc.stderr?.on('data', (data) => {
|
|
67
|
+
stderr += data.toString();
|
|
68
|
+
});
|
|
69
|
+
proc.on('close', (code) => {
|
|
70
|
+
if (code === 0) {
|
|
71
|
+
resolve(stdout.trim());
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
reject(new Error(stderr || `Git command failed with code ${code}`));
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
proc.on('error', reject);
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Check if directory is a git repository
|
|
82
|
+
*/
|
|
83
|
+
async isRepo() {
|
|
84
|
+
try {
|
|
85
|
+
await this.exec(['rev-parse', '--git-dir']);
|
|
86
|
+
return true;
|
|
87
|
+
}
|
|
88
|
+
catch {
|
|
89
|
+
return false;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Get current branch name
|
|
94
|
+
*/
|
|
95
|
+
async getBranch() {
|
|
96
|
+
return this.exec(['rev-parse', '--abbrev-ref', 'HEAD']);
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Get repository status
|
|
100
|
+
*/
|
|
101
|
+
async getStatus() {
|
|
102
|
+
const branch = await this.getBranch();
|
|
103
|
+
const porcelain = await this.exec(['status', '--porcelain', '-b']);
|
|
104
|
+
const lines = porcelain.split('\n');
|
|
105
|
+
const status = {
|
|
106
|
+
branch,
|
|
107
|
+
ahead: 0,
|
|
108
|
+
behind: 0,
|
|
109
|
+
staged: [],
|
|
110
|
+
modified: [],
|
|
111
|
+
untracked: [],
|
|
112
|
+
deleted: [],
|
|
113
|
+
conflicts: []
|
|
114
|
+
};
|
|
115
|
+
// Parse branch line for ahead/behind
|
|
116
|
+
const branchLine = lines[0];
|
|
117
|
+
const aheadMatch = branchLine.match(/ahead (\d+)/);
|
|
118
|
+
const behindMatch = branchLine.match(/behind (\d+)/);
|
|
119
|
+
if (aheadMatch)
|
|
120
|
+
status.ahead = parseInt(aheadMatch[1]);
|
|
121
|
+
if (behindMatch)
|
|
122
|
+
status.behind = parseInt(behindMatch[1]);
|
|
123
|
+
// Parse file status
|
|
124
|
+
for (const line of lines.slice(1)) {
|
|
125
|
+
if (!line)
|
|
126
|
+
continue;
|
|
127
|
+
const indexStatus = line[0];
|
|
128
|
+
const workStatus = line[1];
|
|
129
|
+
const file = line.slice(3);
|
|
130
|
+
if (indexStatus === 'U' || workStatus === 'U') {
|
|
131
|
+
status.conflicts.push(file);
|
|
132
|
+
}
|
|
133
|
+
else if (indexStatus === '?' && workStatus === '?') {
|
|
134
|
+
status.untracked.push(file);
|
|
135
|
+
}
|
|
136
|
+
else if (indexStatus === 'D' || workStatus === 'D') {
|
|
137
|
+
status.deleted.push(file);
|
|
138
|
+
}
|
|
139
|
+
else if (indexStatus !== ' ') {
|
|
140
|
+
status.staged.push(file);
|
|
141
|
+
}
|
|
142
|
+
else if (workStatus === 'M') {
|
|
143
|
+
status.modified.push(file);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
return status;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Get diff (staged or unstaged)
|
|
150
|
+
*/
|
|
151
|
+
async getDiff(staged = false) {
|
|
152
|
+
const args = ['diff', '--stat'];
|
|
153
|
+
if (staged)
|
|
154
|
+
args.push('--staged');
|
|
155
|
+
const stat = await this.exec(args);
|
|
156
|
+
const files = [];
|
|
157
|
+
const lines = stat.split('\n');
|
|
158
|
+
for (const line of lines) {
|
|
159
|
+
const match = line.match(/^\s*(.+?)\s*\|\s*(\d+)\s*([+-]*)/);
|
|
160
|
+
if (match) {
|
|
161
|
+
const [, path, changes, indicators] = match;
|
|
162
|
+
const additions = (indicators.match(/\+/g) || []).length;
|
|
163
|
+
const deletions = (indicators.match(/-/g) || []).length;
|
|
164
|
+
files.push({
|
|
165
|
+
path: path.trim(),
|
|
166
|
+
status: 'modified',
|
|
167
|
+
additions,
|
|
168
|
+
deletions
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
// Get full diff for summary
|
|
173
|
+
const fullDiffArgs = ['diff'];
|
|
174
|
+
if (staged)
|
|
175
|
+
fullDiffArgs.push('--staged');
|
|
176
|
+
const fullDiff = await this.exec(fullDiffArgs);
|
|
177
|
+
return {
|
|
178
|
+
files,
|
|
179
|
+
summary: fullDiff
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Get recent commits
|
|
184
|
+
*/
|
|
185
|
+
async getLog(limit = 10) {
|
|
186
|
+
const format = '%H|%h|%an|%ae|%aI|%s';
|
|
187
|
+
const output = await this.exec(['log', `-${limit}`, `--format=${format}`]);
|
|
188
|
+
return output.split('\n').filter(Boolean).map(line => {
|
|
189
|
+
const [hash, shortHash, author, email, date, message] = line.split('|');
|
|
190
|
+
return {
|
|
191
|
+
hash,
|
|
192
|
+
shortHash,
|
|
193
|
+
author,
|
|
194
|
+
email,
|
|
195
|
+
date: new Date(date),
|
|
196
|
+
message
|
|
197
|
+
};
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Get list of branches
|
|
202
|
+
*/
|
|
203
|
+
async getBranches() {
|
|
204
|
+
const output = await this.exec(['branch', '--list']);
|
|
205
|
+
return output.split('\n').filter(Boolean).map(line => ({
|
|
206
|
+
name: line.replace(/^\*?\s*/, '').trim(),
|
|
207
|
+
current: line.startsWith('*')
|
|
208
|
+
}));
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Stage files (requires safe=false)
|
|
212
|
+
*/
|
|
213
|
+
async add(files = ['.']) {
|
|
214
|
+
if (this.safe) {
|
|
215
|
+
throw new Error('Write operations disabled in safe mode');
|
|
216
|
+
}
|
|
217
|
+
await this.exec(['add', ...files]);
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Commit staged changes (requires safe=false)
|
|
221
|
+
*/
|
|
222
|
+
async commit(message) {
|
|
223
|
+
if (this.safe) {
|
|
224
|
+
throw new Error('Write operations disabled in safe mode');
|
|
225
|
+
}
|
|
226
|
+
return this.exec(['commit', '-m', message]);
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Stash changes (requires safe=false)
|
|
230
|
+
*/
|
|
231
|
+
async stash(message) {
|
|
232
|
+
if (this.safe) {
|
|
233
|
+
throw new Error('Write operations disabled in safe mode');
|
|
234
|
+
}
|
|
235
|
+
const args = ['stash', 'push'];
|
|
236
|
+
if (message)
|
|
237
|
+
args.push('-m', message);
|
|
238
|
+
await this.exec(args);
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* Pop stash (requires safe=false)
|
|
242
|
+
*/
|
|
243
|
+
async stashPop() {
|
|
244
|
+
if (this.safe) {
|
|
245
|
+
throw new Error('Write operations disabled in safe mode');
|
|
246
|
+
}
|
|
247
|
+
await this.exec(['stash', 'pop']);
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Get stash list
|
|
251
|
+
*/
|
|
252
|
+
async getStashList() {
|
|
253
|
+
const output = await this.exec(['stash', 'list']);
|
|
254
|
+
return output.split('\n').filter(Boolean);
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* Get file content at a specific commit
|
|
258
|
+
*/
|
|
259
|
+
async show(ref, path) {
|
|
260
|
+
return this.exec(['show', `${ref}:${path}`]);
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* Get blame for a file
|
|
264
|
+
*/
|
|
265
|
+
async blame(path) {
|
|
266
|
+
return this.exec(['blame', path]);
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* Generate commit message from staged changes
|
|
270
|
+
*/
|
|
271
|
+
async generateCommitMessage() {
|
|
272
|
+
const diff = await this.getDiff(true);
|
|
273
|
+
if (diff.files.length === 0) {
|
|
274
|
+
return 'No staged changes';
|
|
275
|
+
}
|
|
276
|
+
const fileList = diff.files.map(f => f.path).join(', ');
|
|
277
|
+
const totalAdditions = diff.files.reduce((sum, f) => sum + f.additions, 0);
|
|
278
|
+
const totalDeletions = diff.files.reduce((sum, f) => sum + f.deletions, 0);
|
|
279
|
+
// Simple template-based message
|
|
280
|
+
if (diff.files.length === 1) {
|
|
281
|
+
return `Update ${diff.files[0].path}`;
|
|
282
|
+
}
|
|
283
|
+
return `Update ${diff.files.length} files (+${totalAdditions}/-${totalDeletions})`;
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* Get formatted status string
|
|
287
|
+
*/
|
|
288
|
+
async getStatusString() {
|
|
289
|
+
const status = await this.getStatus();
|
|
290
|
+
const lines = [];
|
|
291
|
+
lines.push(`Branch: ${status.branch}`);
|
|
292
|
+
if (status.ahead > 0)
|
|
293
|
+
lines.push(` ↑ ${status.ahead} ahead`);
|
|
294
|
+
if (status.behind > 0)
|
|
295
|
+
lines.push(` ↓ ${status.behind} behind`);
|
|
296
|
+
if (status.staged.length > 0) {
|
|
297
|
+
lines.push(`\nStaged (${status.staged.length}):`);
|
|
298
|
+
status.staged.forEach(f => lines.push(` + ${f}`));
|
|
299
|
+
}
|
|
300
|
+
if (status.modified.length > 0) {
|
|
301
|
+
lines.push(`\nModified (${status.modified.length}):`);
|
|
302
|
+
status.modified.forEach(f => lines.push(` M ${f}`));
|
|
303
|
+
}
|
|
304
|
+
if (status.untracked.length > 0) {
|
|
305
|
+
lines.push(`\nUntracked (${status.untracked.length}):`);
|
|
306
|
+
status.untracked.forEach(f => lines.push(` ? ${f}`));
|
|
307
|
+
}
|
|
308
|
+
if (status.deleted.length > 0) {
|
|
309
|
+
lines.push(`\nDeleted (${status.deleted.length}):`);
|
|
310
|
+
status.deleted.forEach(f => lines.push(` - ${f}`));
|
|
311
|
+
}
|
|
312
|
+
if (status.conflicts.length > 0) {
|
|
313
|
+
lines.push(`\nConflicts (${status.conflicts.length}):`);
|
|
314
|
+
status.conflicts.forEach(f => lines.push(` ! ${f}`));
|
|
315
|
+
}
|
|
316
|
+
return lines.join('\n');
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
exports.GitManager = GitManager;
|
|
320
|
+
/**
|
|
321
|
+
* Create a git manager instance
|
|
322
|
+
*/
|
|
323
|
+
function createGitManager(config) {
|
|
324
|
+
return new GitManager(config);
|
|
325
|
+
}
|
|
326
|
+
/**
|
|
327
|
+
* Diff viewer with syntax highlighting (text-based)
|
|
328
|
+
*/
|
|
329
|
+
class DiffViewer {
|
|
330
|
+
constructor(diff) {
|
|
331
|
+
this.diff = diff;
|
|
332
|
+
}
|
|
333
|
+
/**
|
|
334
|
+
* Get formatted diff with markers
|
|
335
|
+
*/
|
|
336
|
+
format() {
|
|
337
|
+
const lines = this.diff.split('\n');
|
|
338
|
+
return lines.map(line => {
|
|
339
|
+
if (line.startsWith('+') && !line.startsWith('+++')) {
|
|
340
|
+
return `[+] ${line}`;
|
|
341
|
+
}
|
|
342
|
+
if (line.startsWith('-') && !line.startsWith('---')) {
|
|
343
|
+
return `[-] ${line}`;
|
|
344
|
+
}
|
|
345
|
+
if (line.startsWith('@@')) {
|
|
346
|
+
return `[~] ${line}`;
|
|
347
|
+
}
|
|
348
|
+
return ` ${line}`;
|
|
349
|
+
}).join('\n');
|
|
350
|
+
}
|
|
351
|
+
/**
|
|
352
|
+
* Get summary statistics
|
|
353
|
+
*/
|
|
354
|
+
getStats() {
|
|
355
|
+
let additions = 0;
|
|
356
|
+
let deletions = 0;
|
|
357
|
+
for (const line of this.diff.split('\n')) {
|
|
358
|
+
if (line.startsWith('+') && !line.startsWith('+++')) {
|
|
359
|
+
additions++;
|
|
360
|
+
}
|
|
361
|
+
if (line.startsWith('-') && !line.startsWith('---')) {
|
|
362
|
+
deletions++;
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
return { additions, deletions };
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
exports.DiffViewer = DiffViewer;
|
|
369
|
+
/**
|
|
370
|
+
* Create a diff viewer
|
|
371
|
+
*/
|
|
372
|
+
function createDiffViewer(diff) {
|
|
373
|
+
return new DiffViewer(diff);
|
|
374
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI Features - Lazy-loaded feature modules
|
|
3
|
+
*/
|
|
4
|
+
export { SlashCommandHandler, createSlashCommandHandler, registerCommand, parseSlashCommand, executeSlashCommand, isSlashCommand, getRegistry, type SlashCommand, type SlashCommandContext, type SlashCommandResult, type CostTracker as SlashCostTracker } from './slash-commands';
|
|
5
|
+
export { CostTracker, createCostTracker, estimateTokens, formatCost, MODEL_PRICING, type ModelPricing, type TokenUsage, type RequestStats, type SessionStats } from './cost-tracker';
|
|
6
|
+
export { InteractiveTUI, createInteractiveTUI, StatusDisplay, createStatusDisplay, HistoryManager, createHistoryManager, type TUIConfig, type TUIState } from './interactive-tui';
|
|
7
|
+
export { RepoMap, createRepoMap, getRepoTree, DEFAULT_IGNORE_PATTERNS, type RepoMapConfig, type FileInfo, type SymbolInfo, type RepoMapResult } from './repo-map';
|
|
8
|
+
export { GitManager, createGitManager, DiffViewer, createDiffViewer, type GitConfig, type GitStatus, type GitCommit, type GitDiff, type GitDiffFile } from './git-integration';
|
|
9
|
+
export { SandboxExecutor, createSandboxExecutor, sandboxExec, CommandValidator, DEFAULT_BLOCKED_COMMANDS, DEFAULT_BLOCKED_PATHS, type SandboxMode, type SandboxConfig, type ExecutionResult } from './sandbox-executor';
|
|
10
|
+
export { AutonomyManager, createAutonomyManager, cliApprovalPrompt, MODE_POLICIES, type AutonomyMode, type ActionType, type ApprovalPolicy, type AutonomyConfig, type ActionRequest, type ActionDecision } from './autonomy-mode';
|
|
11
|
+
export { Scheduler, createScheduler, cronExpressions, type ScheduleConfig, type ScheduledTask, type SchedulerStats } from './scheduler';
|
|
12
|
+
export { JobQueue, createJobQueue, MemoryJobStorage, FileJobStorage, createFileJobStorage, type Job, type JobStatus, type JobPriority, type JobQueueConfig, type JobStorageAdapter, type JobHandler, type JobContext } from './background-jobs';
|
|
13
|
+
export { CheckpointManager, createCheckpointManager, MemoryCheckpointStorage, FileCheckpointStorage, createFileCheckpointStorage, type CheckpointData, type CheckpointConfig, type CheckpointStorage } from './checkpoints';
|
|
14
|
+
export { FlowDisplay, createFlowDisplay, renderWorkflow, type FlowNode, type FlowGraph, type FlowDisplayConfig } from './flow-display';
|
|
15
|
+
export { BaseExternalAgent, ClaudeCodeAgent, GeminiCliAgent, CodexCliAgent, AiderAgent, GenericExternalAgent, getExternalAgentRegistry, createExternalAgent, externalAgentAsTool, type ExternalAgentConfig, type ExternalAgentResult } from './external-agents';
|
|
16
|
+
export { N8NIntegration, createN8NIntegration, triggerN8NWebhook, type N8NConfig, type N8NWebhookPayload, type N8NWorkflow, type N8NWorkflowNode } from './n8n-integration';
|
|
17
|
+
export { FastContext, createFastContext, getQuickContext, type FastContextConfig, type ContextSource, type FastContextResult } from './fast-context';
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* CLI Features - Lazy-loaded feature modules
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.FlowDisplay = exports.createFileCheckpointStorage = exports.FileCheckpointStorage = exports.MemoryCheckpointStorage = exports.createCheckpointManager = exports.CheckpointManager = exports.createFileJobStorage = exports.FileJobStorage = exports.MemoryJobStorage = exports.createJobQueue = exports.JobQueue = exports.cronExpressions = exports.createScheduler = exports.Scheduler = exports.MODE_POLICIES = exports.cliApprovalPrompt = exports.createAutonomyManager = exports.AutonomyManager = exports.DEFAULT_BLOCKED_PATHS = exports.DEFAULT_BLOCKED_COMMANDS = exports.CommandValidator = exports.sandboxExec = exports.createSandboxExecutor = exports.SandboxExecutor = exports.createDiffViewer = exports.DiffViewer = exports.createGitManager = exports.GitManager = exports.DEFAULT_IGNORE_PATTERNS = exports.getRepoTree = exports.createRepoMap = exports.RepoMap = exports.createHistoryManager = exports.HistoryManager = exports.createStatusDisplay = exports.StatusDisplay = exports.createInteractiveTUI = exports.InteractiveTUI = exports.MODEL_PRICING = exports.formatCost = exports.estimateTokens = exports.createCostTracker = exports.CostTracker = exports.getRegistry = exports.isSlashCommand = exports.executeSlashCommand = exports.parseSlashCommand = exports.registerCommand = exports.createSlashCommandHandler = exports.SlashCommandHandler = void 0;
|
|
7
|
+
exports.getQuickContext = exports.createFastContext = exports.FastContext = exports.triggerN8NWebhook = exports.createN8NIntegration = exports.N8NIntegration = exports.externalAgentAsTool = exports.createExternalAgent = exports.getExternalAgentRegistry = exports.GenericExternalAgent = exports.AiderAgent = exports.CodexCliAgent = exports.GeminiCliAgent = exports.ClaudeCodeAgent = exports.BaseExternalAgent = exports.renderWorkflow = exports.createFlowDisplay = void 0;
|
|
8
|
+
// Slash Commands
|
|
9
|
+
var slash_commands_1 = require("./slash-commands");
|
|
10
|
+
Object.defineProperty(exports, "SlashCommandHandler", { enumerable: true, get: function () { return slash_commands_1.SlashCommandHandler; } });
|
|
11
|
+
Object.defineProperty(exports, "createSlashCommandHandler", { enumerable: true, get: function () { return slash_commands_1.createSlashCommandHandler; } });
|
|
12
|
+
Object.defineProperty(exports, "registerCommand", { enumerable: true, get: function () { return slash_commands_1.registerCommand; } });
|
|
13
|
+
Object.defineProperty(exports, "parseSlashCommand", { enumerable: true, get: function () { return slash_commands_1.parseSlashCommand; } });
|
|
14
|
+
Object.defineProperty(exports, "executeSlashCommand", { enumerable: true, get: function () { return slash_commands_1.executeSlashCommand; } });
|
|
15
|
+
Object.defineProperty(exports, "isSlashCommand", { enumerable: true, get: function () { return slash_commands_1.isSlashCommand; } });
|
|
16
|
+
Object.defineProperty(exports, "getRegistry", { enumerable: true, get: function () { return slash_commands_1.getRegistry; } });
|
|
17
|
+
// Cost Tracker
|
|
18
|
+
var cost_tracker_1 = require("./cost-tracker");
|
|
19
|
+
Object.defineProperty(exports, "CostTracker", { enumerable: true, get: function () { return cost_tracker_1.CostTracker; } });
|
|
20
|
+
Object.defineProperty(exports, "createCostTracker", { enumerable: true, get: function () { return cost_tracker_1.createCostTracker; } });
|
|
21
|
+
Object.defineProperty(exports, "estimateTokens", { enumerable: true, get: function () { return cost_tracker_1.estimateTokens; } });
|
|
22
|
+
Object.defineProperty(exports, "formatCost", { enumerable: true, get: function () { return cost_tracker_1.formatCost; } });
|
|
23
|
+
Object.defineProperty(exports, "MODEL_PRICING", { enumerable: true, get: function () { return cost_tracker_1.MODEL_PRICING; } });
|
|
24
|
+
// Interactive TUI
|
|
25
|
+
var interactive_tui_1 = require("./interactive-tui");
|
|
26
|
+
Object.defineProperty(exports, "InteractiveTUI", { enumerable: true, get: function () { return interactive_tui_1.InteractiveTUI; } });
|
|
27
|
+
Object.defineProperty(exports, "createInteractiveTUI", { enumerable: true, get: function () { return interactive_tui_1.createInteractiveTUI; } });
|
|
28
|
+
Object.defineProperty(exports, "StatusDisplay", { enumerable: true, get: function () { return interactive_tui_1.StatusDisplay; } });
|
|
29
|
+
Object.defineProperty(exports, "createStatusDisplay", { enumerable: true, get: function () { return interactive_tui_1.createStatusDisplay; } });
|
|
30
|
+
Object.defineProperty(exports, "HistoryManager", { enumerable: true, get: function () { return interactive_tui_1.HistoryManager; } });
|
|
31
|
+
Object.defineProperty(exports, "createHistoryManager", { enumerable: true, get: function () { return interactive_tui_1.createHistoryManager; } });
|
|
32
|
+
// Repo Map
|
|
33
|
+
var repo_map_1 = require("./repo-map");
|
|
34
|
+
Object.defineProperty(exports, "RepoMap", { enumerable: true, get: function () { return repo_map_1.RepoMap; } });
|
|
35
|
+
Object.defineProperty(exports, "createRepoMap", { enumerable: true, get: function () { return repo_map_1.createRepoMap; } });
|
|
36
|
+
Object.defineProperty(exports, "getRepoTree", { enumerable: true, get: function () { return repo_map_1.getRepoTree; } });
|
|
37
|
+
Object.defineProperty(exports, "DEFAULT_IGNORE_PATTERNS", { enumerable: true, get: function () { return repo_map_1.DEFAULT_IGNORE_PATTERNS; } });
|
|
38
|
+
// Git Integration
|
|
39
|
+
var git_integration_1 = require("./git-integration");
|
|
40
|
+
Object.defineProperty(exports, "GitManager", { enumerable: true, get: function () { return git_integration_1.GitManager; } });
|
|
41
|
+
Object.defineProperty(exports, "createGitManager", { enumerable: true, get: function () { return git_integration_1.createGitManager; } });
|
|
42
|
+
Object.defineProperty(exports, "DiffViewer", { enumerable: true, get: function () { return git_integration_1.DiffViewer; } });
|
|
43
|
+
Object.defineProperty(exports, "createDiffViewer", { enumerable: true, get: function () { return git_integration_1.createDiffViewer; } });
|
|
44
|
+
// Sandbox Executor
|
|
45
|
+
var sandbox_executor_1 = require("./sandbox-executor");
|
|
46
|
+
Object.defineProperty(exports, "SandboxExecutor", { enumerable: true, get: function () { return sandbox_executor_1.SandboxExecutor; } });
|
|
47
|
+
Object.defineProperty(exports, "createSandboxExecutor", { enumerable: true, get: function () { return sandbox_executor_1.createSandboxExecutor; } });
|
|
48
|
+
Object.defineProperty(exports, "sandboxExec", { enumerable: true, get: function () { return sandbox_executor_1.sandboxExec; } });
|
|
49
|
+
Object.defineProperty(exports, "CommandValidator", { enumerable: true, get: function () { return sandbox_executor_1.CommandValidator; } });
|
|
50
|
+
Object.defineProperty(exports, "DEFAULT_BLOCKED_COMMANDS", { enumerable: true, get: function () { return sandbox_executor_1.DEFAULT_BLOCKED_COMMANDS; } });
|
|
51
|
+
Object.defineProperty(exports, "DEFAULT_BLOCKED_PATHS", { enumerable: true, get: function () { return sandbox_executor_1.DEFAULT_BLOCKED_PATHS; } });
|
|
52
|
+
// Autonomy Mode
|
|
53
|
+
var autonomy_mode_1 = require("./autonomy-mode");
|
|
54
|
+
Object.defineProperty(exports, "AutonomyManager", { enumerable: true, get: function () { return autonomy_mode_1.AutonomyManager; } });
|
|
55
|
+
Object.defineProperty(exports, "createAutonomyManager", { enumerable: true, get: function () { return autonomy_mode_1.createAutonomyManager; } });
|
|
56
|
+
Object.defineProperty(exports, "cliApprovalPrompt", { enumerable: true, get: function () { return autonomy_mode_1.cliApprovalPrompt; } });
|
|
57
|
+
Object.defineProperty(exports, "MODE_POLICIES", { enumerable: true, get: function () { return autonomy_mode_1.MODE_POLICIES; } });
|
|
58
|
+
// Scheduler
|
|
59
|
+
var scheduler_1 = require("./scheduler");
|
|
60
|
+
Object.defineProperty(exports, "Scheduler", { enumerable: true, get: function () { return scheduler_1.Scheduler; } });
|
|
61
|
+
Object.defineProperty(exports, "createScheduler", { enumerable: true, get: function () { return scheduler_1.createScheduler; } });
|
|
62
|
+
Object.defineProperty(exports, "cronExpressions", { enumerable: true, get: function () { return scheduler_1.cronExpressions; } });
|
|
63
|
+
// Background Jobs
|
|
64
|
+
var background_jobs_1 = require("./background-jobs");
|
|
65
|
+
Object.defineProperty(exports, "JobQueue", { enumerable: true, get: function () { return background_jobs_1.JobQueue; } });
|
|
66
|
+
Object.defineProperty(exports, "createJobQueue", { enumerable: true, get: function () { return background_jobs_1.createJobQueue; } });
|
|
67
|
+
Object.defineProperty(exports, "MemoryJobStorage", { enumerable: true, get: function () { return background_jobs_1.MemoryJobStorage; } });
|
|
68
|
+
Object.defineProperty(exports, "FileJobStorage", { enumerable: true, get: function () { return background_jobs_1.FileJobStorage; } });
|
|
69
|
+
Object.defineProperty(exports, "createFileJobStorage", { enumerable: true, get: function () { return background_jobs_1.createFileJobStorage; } });
|
|
70
|
+
// Checkpoints
|
|
71
|
+
var checkpoints_1 = require("./checkpoints");
|
|
72
|
+
Object.defineProperty(exports, "CheckpointManager", { enumerable: true, get: function () { return checkpoints_1.CheckpointManager; } });
|
|
73
|
+
Object.defineProperty(exports, "createCheckpointManager", { enumerable: true, get: function () { return checkpoints_1.createCheckpointManager; } });
|
|
74
|
+
Object.defineProperty(exports, "MemoryCheckpointStorage", { enumerable: true, get: function () { return checkpoints_1.MemoryCheckpointStorage; } });
|
|
75
|
+
Object.defineProperty(exports, "FileCheckpointStorage", { enumerable: true, get: function () { return checkpoints_1.FileCheckpointStorage; } });
|
|
76
|
+
Object.defineProperty(exports, "createFileCheckpointStorage", { enumerable: true, get: function () { return checkpoints_1.createFileCheckpointStorage; } });
|
|
77
|
+
// Flow Display
|
|
78
|
+
var flow_display_1 = require("./flow-display");
|
|
79
|
+
Object.defineProperty(exports, "FlowDisplay", { enumerable: true, get: function () { return flow_display_1.FlowDisplay; } });
|
|
80
|
+
Object.defineProperty(exports, "createFlowDisplay", { enumerable: true, get: function () { return flow_display_1.createFlowDisplay; } });
|
|
81
|
+
Object.defineProperty(exports, "renderWorkflow", { enumerable: true, get: function () { return flow_display_1.renderWorkflow; } });
|
|
82
|
+
// External Agents
|
|
83
|
+
var external_agents_1 = require("./external-agents");
|
|
84
|
+
Object.defineProperty(exports, "BaseExternalAgent", { enumerable: true, get: function () { return external_agents_1.BaseExternalAgent; } });
|
|
85
|
+
Object.defineProperty(exports, "ClaudeCodeAgent", { enumerable: true, get: function () { return external_agents_1.ClaudeCodeAgent; } });
|
|
86
|
+
Object.defineProperty(exports, "GeminiCliAgent", { enumerable: true, get: function () { return external_agents_1.GeminiCliAgent; } });
|
|
87
|
+
Object.defineProperty(exports, "CodexCliAgent", { enumerable: true, get: function () { return external_agents_1.CodexCliAgent; } });
|
|
88
|
+
Object.defineProperty(exports, "AiderAgent", { enumerable: true, get: function () { return external_agents_1.AiderAgent; } });
|
|
89
|
+
Object.defineProperty(exports, "GenericExternalAgent", { enumerable: true, get: function () { return external_agents_1.GenericExternalAgent; } });
|
|
90
|
+
Object.defineProperty(exports, "getExternalAgentRegistry", { enumerable: true, get: function () { return external_agents_1.getExternalAgentRegistry; } });
|
|
91
|
+
Object.defineProperty(exports, "createExternalAgent", { enumerable: true, get: function () { return external_agents_1.createExternalAgent; } });
|
|
92
|
+
Object.defineProperty(exports, "externalAgentAsTool", { enumerable: true, get: function () { return external_agents_1.externalAgentAsTool; } });
|
|
93
|
+
// N8N Integration
|
|
94
|
+
var n8n_integration_1 = require("./n8n-integration");
|
|
95
|
+
Object.defineProperty(exports, "N8NIntegration", { enumerable: true, get: function () { return n8n_integration_1.N8NIntegration; } });
|
|
96
|
+
Object.defineProperty(exports, "createN8NIntegration", { enumerable: true, get: function () { return n8n_integration_1.createN8NIntegration; } });
|
|
97
|
+
Object.defineProperty(exports, "triggerN8NWebhook", { enumerable: true, get: function () { return n8n_integration_1.triggerN8NWebhook; } });
|
|
98
|
+
// Fast Context
|
|
99
|
+
var fast_context_1 = require("./fast-context");
|
|
100
|
+
Object.defineProperty(exports, "FastContext", { enumerable: true, get: function () { return fast_context_1.FastContext; } });
|
|
101
|
+
Object.defineProperty(exports, "createFastContext", { enumerable: true, get: function () { return fast_context_1.createFastContext; } });
|
|
102
|
+
Object.defineProperty(exports, "getQuickContext", { enumerable: true, get: function () { return fast_context_1.getQuickContext; } });
|