indusagi 0.12.32 → 0.12.34
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/CHANGELOG.md +340 -0
- package/CREDITS.md +22 -0
- package/NOTICE +17 -0
- package/README.md +47 -388
- package/dist/agent.js +27512 -0
- package/dist/ai.js +19758 -0
- package/dist/capabilities.js +2663 -0
- package/dist/cli.js +11653 -0
- package/dist/connectors-saas.js +3289 -0
- package/dist/index.js +16533 -0
- package/dist/interop.js +3181 -0
- package/dist/knowledge/guides/authoring-an-agent.md +53 -0
- package/dist/knowledge/guides/choosing-tools.md +49 -0
- package/dist/knowledge/guides/model-selection.md +51 -0
- package/dist/knowledge/guides/writing-system-prompts.md +53 -0
- package/dist/knowledge/index.ts +19 -0
- package/dist/knowledge/loader.ts +200 -0
- package/dist/knowledge/manifest.json +29 -0
- package/dist/llmgateway.js +3209 -0
- package/dist/mcp.js +1732 -0
- package/dist/memory.js +0 -0
- package/dist/react-host/index.js +101 -0
- package/dist/react-host/ink.js +97 -0
- package/dist/react-host/jsx-runtime.js +95 -0
- package/dist/react-ink.js +3821 -0
- package/dist/runtime.js +4387 -0
- package/dist/shell-app.js +12222 -0
- package/dist/smithy.js +7932 -0
- package/dist/swarm.js +8717 -0
- package/dist/tracing.js +724 -0
- package/dist/tui.js +2213 -0
- package/dist/types/capabilities/backends/index.d.ts +10 -0
- package/dist/types/capabilities/backends/node-backends.d.ts +28 -0
- package/dist/types/capabilities/capabilities.test.d.ts +14 -0
- package/dist/types/capabilities/files/diff.d.ts +49 -0
- package/dist/types/capabilities/files/edit.d.ts +21 -0
- package/dist/types/capabilities/files/ls.d.ts +16 -0
- package/dist/types/capabilities/files/read.d.ts +15 -0
- package/dist/types/capabilities/files/write.d.ts +16 -0
- package/dist/types/capabilities/index.d.ts +29 -0
- package/dist/types/capabilities/kernel/backends.d.ts +119 -0
- package/dist/types/capabilities/kernel/context.d.ts +48 -0
- package/dist/types/capabilities/kernel/index.d.ts +24 -0
- package/dist/types/capabilities/kernel/output.d.ts +40 -0
- package/dist/types/capabilities/kernel/registry.d.ts +61 -0
- package/dist/types/capabilities/kernel/spec.d.ts +113 -0
- package/dist/types/capabilities/planning/todo.d.ts +62 -0
- package/dist/types/capabilities/registry.d.ts +44 -0
- package/dist/types/capabilities/search/find.d.ts +33 -0
- package/dist/types/capabilities/search/grep.d.ts +30 -0
- package/dist/types/capabilities/shell/bash.d.ts +18 -0
- package/dist/types/capabilities/shell/process.d.ts +33 -0
- package/dist/types/capabilities/web/webfetch.d.ts +25 -0
- package/dist/types/capabilities/web/websearch.d.ts +23 -0
- package/dist/types/connectors-saas/connectors-saas.test.d.ts +12 -0
- package/dist/types/connectors-saas/index.d.ts +16 -0
- package/dist/types/connectors-saas/saas/adapter/composio-backend.d.ts +60 -0
- package/dist/types/connectors-saas/saas/control/connect.d.ts +114 -0
- package/dist/types/connectors-saas/saas/control/tools.d.ts +67 -0
- package/dist/types/connectors-saas/saas/core/builder.d.ts +86 -0
- package/dist/types/connectors-saas/saas/core/cache.d.ts +53 -0
- package/dist/types/connectors-saas/saas/core/index.d.ts +14 -0
- package/dist/types/connectors-saas/saas/core/port.d.ts +157 -0
- package/dist/types/connectors-saas/saas/core/scope-planner.d.ts +74 -0
- package/dist/types/connectors-saas/saas/gateway.d.ts +133 -0
- package/dist/types/connectors-saas/saas/render/format.d.ts +54 -0
- package/dist/types/connectors-saas/saas/render/index.d.ts +19 -0
- package/dist/types/connectors-saas/saas/render/summarizers.d.ts +58 -0
- package/dist/types/facade/agent.d.ts +1 -0
- package/dist/types/facade/ai.d.ts +1 -0
- package/dist/types/facade/bot/actions/bash.d.ts +56 -0
- package/dist/types/facade/bot/actions/composio/accounts.d.ts +22 -0
- package/dist/types/facade/bot/actions/composio/client.d.ts +39 -0
- package/dist/types/facade/bot/actions/composio/connect.d.ts +19 -0
- package/dist/types/facade/bot/actions/composio/enable.d.ts +25 -0
- package/dist/types/facade/bot/actions/composio/execute.d.ts +26 -0
- package/dist/types/facade/bot/actions/composio/helpers.d.ts +16 -0
- package/dist/types/facade/bot/actions/composio/index.d.ts +9 -0
- package/dist/types/facade/bot/actions/composio/provider.d.ts +8 -0
- package/dist/types/facade/bot/actions/composio/toolkits.d.ts +22 -0
- package/dist/types/facade/bot/actions/composio/tools.d.ts +28 -0
- package/dist/types/facade/bot/actions/composio/types.d.ts +137 -0
- package/dist/types/facade/bot/actions/crew/activity-tracker.d.ts +65 -0
- package/dist/types/facade/bot/actions/crew/cleanup.d.ts +50 -0
- package/dist/types/facade/bot/actions/crew/fs-lock.d.ts +11 -0
- package/dist/types/facade/bot/actions/crew/index.d.ts +11 -0
- package/dist/types/facade/bot/actions/crew/mailbox.d.ts +20 -0
- package/dist/types/facade/bot/actions/crew/model-policy.d.ts +22 -0
- package/dist/types/facade/bot/actions/crew/names.d.ts +27 -0
- package/dist/types/facade/bot/actions/crew/protocol.d.ts +74 -0
- package/dist/types/facade/bot/actions/crew/task-store.d.ts +88 -0
- package/dist/types/facade/bot/actions/crew/team-attach-claim.d.ts +35 -0
- package/dist/types/facade/bot/actions/crew/team-config.d.ts +54 -0
- package/dist/types/facade/bot/actions/crew/worktree.d.ts +39 -0
- package/dist/types/facade/bot/actions/edit-diff.d.ts +66 -0
- package/dist/types/facade/bot/actions/edit.d.ts +41 -0
- package/dist/types/facade/bot/actions/find.d.ts +25 -0
- package/dist/types/facade/bot/actions/grep.d.ts +43 -0
- package/dist/types/facade/bot/actions/index.d.ts +300 -0
- package/dist/types/facade/bot/actions/kit/hook-runner.d.ts +12 -0
- package/dist/types/facade/bot/actions/kit/image-resize.d.ts +19 -0
- package/dist/types/facade/bot/actions/kit/mime.d.ts +1 -0
- package/dist/types/facade/bot/actions/kit/shell.d.ts +12 -0
- package/dist/types/facade/bot/actions/ls.d.ts +41 -0
- package/dist/types/facade/bot/actions/path-utils.d.ts +8 -0
- package/dist/types/facade/bot/actions/process-controller.d.ts +14 -0
- package/dist/types/facade/bot/actions/process-manager.d.ts +59 -0
- package/dist/types/facade/bot/actions/process-types.d.ts +73 -0
- package/dist/types/facade/bot/actions/process.d.ts +37 -0
- package/dist/types/facade/bot/actions/read.d.ts +36 -0
- package/dist/types/facade/bot/actions/registry.d.ts +20 -0
- package/dist/types/facade/bot/actions/todo-store.d.ts +76 -0
- package/dist/types/facade/bot/actions/todo-types.d.ts +72 -0
- package/dist/types/facade/bot/actions/todo.d.ts +76 -0
- package/dist/types/facade/bot/actions/truncate.d.ts +78 -0
- package/dist/types/facade/bot/actions/webfetch.d.ts +35 -0
- package/dist/types/facade/bot/actions/websearch.d.ts +34 -0
- package/dist/types/facade/bot/actions/write.d.ts +30 -0
- package/dist/types/facade/bot/agent-loop.d.ts +20 -0
- package/dist/types/facade/bot/agent.d.ts +132 -0
- package/dist/types/facade/bot/error-handler.d.ts +7 -0
- package/dist/types/facade/bot/event-bus.d.ts +8 -0
- package/dist/types/facade/bot/index.d.ts +7 -0
- package/dist/types/facade/bot/messages.d.ts +83 -0
- package/dist/types/facade/bot/proxy.d.ts +70 -0
- package/dist/types/facade/bot/session-manager.d.ts +409 -0
- package/dist/types/facade/bot/state-manager.d.ts +21 -0
- package/dist/types/facade/bot/telemetry.d.ts +6 -0
- package/dist/types/facade/bot/types.d.ts +207 -0
- package/dist/types/facade/mcp-core/client-pool.d.ts +105 -0
- package/dist/types/facade/mcp-core/client.d.ts +157 -0
- package/dist/types/facade/mcp-core/config.d.ts +60 -0
- package/dist/types/facade/mcp-core/errors.d.ts +103 -0
- package/dist/types/facade/mcp-core/index.d.ts +55 -0
- package/dist/types/facade/mcp-core/schema-converter.d.ts +67 -0
- package/dist/types/facade/mcp-core/server.d.ts +110 -0
- package/dist/types/facade/mcp-core/tool-factory.d.ts +62 -0
- package/dist/types/facade/mcp-core/types.d.ts +288 -0
- package/dist/types/facade/mcp.d.ts +1 -0
- package/dist/types/facade/memory.d.ts +1 -0
- package/dist/types/facade/ml/adapters/amazon-bedrock.d.ts +32 -0
- package/dist/types/facade/ml/adapters/anthropic.d.ts +61 -0
- package/dist/types/facade/ml/adapters/azure-openai-responses.d.ts +14 -0
- package/dist/types/facade/ml/adapters/google-shared.d.ts +99 -0
- package/dist/types/facade/ml/adapters/google-vertex.d.ts +14 -0
- package/dist/types/facade/ml/adapters/google.d.ts +15 -0
- package/dist/types/facade/ml/adapters/kimi.d.ts +21 -0
- package/dist/types/facade/ml/adapters/mock.d.ts +9 -0
- package/dist/types/facade/ml/adapters/nvidia.d.ts +12 -0
- package/dist/types/facade/ml/adapters/openai-codex-responses.d.ts +8 -0
- package/dist/types/facade/ml/adapters/openai-completions.d.ts +24 -0
- package/dist/types/facade/ml/adapters/openai-responses-shared.d.ts +25 -0
- package/dist/types/facade/ml/adapters/openai-responses.d.ts +12 -0
- package/dist/types/facade/ml/adapters/openai-scaffold.d.ts +3 -0
- package/dist/types/facade/ml/adapters/register-builtins.d.ts +2 -0
- package/dist/types/facade/ml/adapters/simple-options.d.ts +26 -0
- package/dist/types/facade/ml/adapters/transform-messages.d.ts +23 -0
- package/dist/types/facade/ml/api-registry.d.ts +49 -0
- package/dist/types/facade/ml/cli.d.ts +2 -0
- package/dist/types/facade/ml/env-api-keys.d.ts +19 -0
- package/dist/types/facade/ml/index.d.ts +27 -0
- package/dist/types/facade/ml/kit/auth/anthropic.d.ts +17 -0
- package/dist/types/facade/ml/kit/auth/github-copilot.d.ts +22 -0
- package/dist/types/facade/ml/kit/auth/index.d.ts +50 -0
- package/dist/types/facade/ml/kit/auth/kimi.d.ts +23 -0
- package/dist/types/facade/ml/kit/auth/oauth-page.d.ts +2 -0
- package/dist/types/facade/ml/kit/auth/openai-codex.d.ts +36 -0
- package/dist/types/facade/ml/kit/auth/pkce.d.ts +12 -0
- package/dist/types/facade/ml/kit/auth/types.d.ts +67 -0
- package/dist/types/facade/ml/kit/base-stream-handler.d.ts +30 -0
- package/dist/types/facade/ml/kit/event-stream.d.ts +63 -0
- package/dist/types/facade/ml/kit/index.d.ts +14 -0
- package/dist/types/facade/ml/kit/json-parse.d.ts +23 -0
- package/dist/types/facade/ml/kit/message-transform.d.ts +32 -0
- package/dist/types/facade/ml/kit/output-factory.d.ts +8 -0
- package/dist/types/facade/ml/kit/overflow.d.ts +9 -0
- package/dist/types/facade/ml/kit/provider-adapter.d.ts +56 -0
- package/dist/types/facade/ml/kit/provider-client-builder.d.ts +36 -0
- package/dist/types/facade/ml/kit/provider-consolidation.d.ts +3 -0
- package/dist/types/facade/ml/kit/provider-constants.d.ts +34 -0
- package/dist/types/facade/ml/kit/provider-errors.d.ts +52 -0
- package/dist/types/facade/ml/kit/sanitize-unicode.d.ts +2 -0
- package/dist/types/facade/ml/kit/stream-event-helper.d.ts +38 -0
- package/dist/types/facade/ml/kit/stream-handler-types.d.ts +46 -0
- package/dist/types/facade/ml/kit/streaming-state-manager.d.ts +42 -0
- package/dist/types/facade/ml/kit/tool-converter.d.ts +49 -0
- package/dist/types/facade/ml/kit/typebox-helpers.d.ts +24 -0
- package/dist/types/facade/ml/kit/validation.d.ts +26 -0
- package/dist/types/facade/ml/models.d.ts +41 -0
- package/dist/types/facade/ml/models.generated.d.ts +12261 -0
- package/dist/types/facade/ml/stream.d.ts +27 -0
- package/dist/types/facade/ml/types.d.ts +269 -0
- package/dist/types/index.d.ts +16 -0
- package/dist/types/interop/index.d.ts +12 -0
- package/dist/types/interop/interop.test.d.ts +19 -0
- package/dist/types/interop/protocol-bridge/bridge.d.ts +52 -0
- package/dist/types/interop/protocol-bridge/contract.d.ts +249 -0
- package/dist/types/interop/protocol-bridge/endpoint.d.ts +124 -0
- package/dist/types/interop/protocol-bridge/fleet.d.ts +92 -0
- package/dist/types/interop/protocol-bridge/host.d.ts +61 -0
- package/dist/types/interop/protocol-bridge/index.d.ts +16 -0
- package/dist/types/interop/protocol-bridge/schema.d.ts +29 -0
- package/dist/types/llmgateway/catalog/cards.d.ts +18 -0
- package/dist/types/llmgateway/catalog/cost.d.ts +15 -0
- package/dist/types/llmgateway/catalog/index.d.ts +7 -0
- package/dist/types/llmgateway/catalog/query.d.ts +40 -0
- package/dist/types/llmgateway/connectors/anthropic.d.ts +35 -0
- package/dist/types/llmgateway/connectors/azure-openai.d.ts +33 -0
- package/dist/types/llmgateway/connectors/bedrock.d.ts +113 -0
- package/dist/types/llmgateway/connectors/google-vertex.d.ts +38 -0
- package/dist/types/llmgateway/connectors/google.d.ts +40 -0
- package/dist/types/llmgateway/connectors/index.d.ts +26 -0
- package/dist/types/llmgateway/connectors/kimi.d.ts +28 -0
- package/dist/types/llmgateway/connectors/mock.d.ts +37 -0
- package/dist/types/llmgateway/connectors/nvidia.d.ts +27 -0
- package/dist/types/llmgateway/connectors/ollama.d.ts +45 -0
- package/dist/types/llmgateway/connectors/openai-chat.d.ts +25 -0
- package/dist/types/llmgateway/connectors/openai-responses.d.ts +49 -0
- package/dist/types/llmgateway/contract/connector.d.ts +32 -0
- package/dist/types/llmgateway/contract/conversation.d.ts +86 -0
- package/dist/types/llmgateway/contract/emission.d.ts +55 -0
- package/dist/types/llmgateway/contract/errors.d.ts +27 -0
- package/dist/types/llmgateway/contract/index.d.ts +13 -0
- package/dist/types/llmgateway/contract/model-card.d.ts +42 -0
- package/dist/types/llmgateway/contract/options.d.ts +31 -0
- package/dist/types/llmgateway/contract/reply.d.ts +33 -0
- package/dist/types/llmgateway/conversion/index.d.ts +10 -0
- package/dist/types/llmgateway/conversion/mappers.d.ts +65 -0
- package/dist/types/llmgateway/conversion/openai-compatible.d.ts +46 -0
- package/dist/types/llmgateway/conversion/reduce.d.ts +20 -0
- package/dist/types/llmgateway/credentials/oauth.d.ts +73 -0
- package/dist/types/llmgateway/credentials/pkce.d.ts +52 -0
- package/dist/types/llmgateway/credentials/secrets.d.ts +74 -0
- package/dist/types/llmgateway/gateway.d.ts +34 -0
- package/dist/types/llmgateway/gateway.test.d.ts +14 -0
- package/dist/types/llmgateway/index.d.ts +11 -0
- package/dist/types/llmgateway/streaming/channel.d.ts +24 -0
- package/dist/types/llmgateway/streaming/index.d.ts +10 -0
- package/dist/types/llmgateway/streaming/ndjson.d.ts +17 -0
- package/dist/types/llmgateway/streaming/sse.d.ts +31 -0
- package/dist/types/react-host/index.d.ts +9 -0
- package/dist/types/react-host/ink.d.ts +5 -0
- package/dist/types/react-host/jsx-runtime.d.ts +4 -0
- package/dist/types/react-host/loader.d.ts +3 -0
- package/dist/types/react-ink/components/ChangelogBlock.d.ts +8 -0
- package/dist/types/react-ink/components/DisplayBlockView.d.ts +8 -0
- package/dist/types/react-ink/components/Footer.d.ts +11 -0
- package/dist/types/react-ink/components/MessageList.d.ts +14 -0
- package/dist/types/react-ink/components/MessageRow.d.ts +13 -0
- package/dist/types/react-ink/components/StatusLine.d.ts +9 -0
- package/dist/types/react-ink/components/TaskPanel.d.ts +11 -0
- package/dist/types/react-ink/components/ToolEventBlock.d.ts +24 -0
- package/dist/types/react-ink/components/dialogs/DialogFrame.d.ts +8 -0
- package/dist/types/react-ink/components/dialogs/LoginDialog.d.ts +14 -0
- package/dist/types/react-ink/components/dialogs/ModelDialog.d.ts +9 -0
- package/dist/types/react-ink/components/dialogs/OAuthDialog.d.ts +9 -0
- package/dist/types/react-ink/components/dialogs/ScopedModelsDialog.d.ts +9 -0
- package/dist/types/react-ink/components/dialogs/SelectableDialog.d.ts +22 -0
- package/dist/types/react-ink/components/dialogs/SessionDialog.d.ts +13 -0
- package/dist/types/react-ink/components/dialogs/SettingsDialog.d.ts +14 -0
- package/dist/types/react-ink/components/dialogs/StartupSessionPicker.d.ts +9 -0
- package/dist/types/react-ink/components/dialogs/ThemeDialog.d.ts +26 -0
- package/dist/types/react-ink/components/dialogs/TreeDialog.d.ts +8 -0
- package/dist/types/react-ink/components/dialogs/UserMessageDialog.d.ts +8 -0
- package/dist/types/react-ink/components/messages/AssistantMessage.d.ts +12 -0
- package/dist/types/react-ink/components/messages/BashMessage.d.ts +8 -0
- package/dist/types/react-ink/components/messages/BranchSummaryMessage.d.ts +8 -0
- package/dist/types/react-ink/components/messages/CompactionMessage.d.ts +8 -0
- package/dist/types/react-ink/components/messages/CustomMessage.d.ts +9 -0
- package/dist/types/react-ink/components/messages/SkillInvocationMessage.d.ts +7 -0
- package/dist/types/react-ink/components/messages/ToolCallMessage.d.ts +8 -0
- package/dist/types/react-ink/components/messages/ToolResultBlock.d.ts +12 -0
- package/dist/types/react-ink/components/messages/UserMessage.d.ts +9 -0
- package/dist/types/react-ink/diff/Diff.d.ts +22 -0
- package/dist/types/react-ink/diff/diff.test.d.ts +1 -0
- package/dist/types/react-ink/diff/structured.d.ts +41 -0
- package/dist/types/react-ink/diff/word-diff.d.ts +27 -0
- package/dist/types/react-ink/index.d.ts +42 -0
- package/dist/types/react-ink/markdown/Markdown.d.ts +23 -0
- package/dist/types/react-ink/markdown/MarkdownTable.d.ts +19 -0
- package/dist/types/react-ink/markdown/StreamingMarkdown.d.ts +34 -0
- package/dist/types/react-ink/markdown/format-token.d.ts +39 -0
- package/dist/types/react-ink/markdown/highlight.d.ts +31 -0
- package/dist/types/react-ink/theme-adapter.d.ts +66 -0
- package/dist/types/react-ink/types.d.ts +133 -0
- package/dist/types/react-ink/utils/message-groups.d.ts +25 -0
- package/dist/types/react-ink/utils/selection-dialog.d.ts +2 -0
- package/dist/types/react-ink/utils/session-browser.d.ts +27 -0
- package/dist/types/react-ink/utils/tool-display.d.ts +37 -0
- package/dist/types/runtime/cadence/cadence.test.d.ts +6 -0
- package/dist/types/runtime/cadence/fold.d.ts +48 -0
- package/dist/types/runtime/cadence/index.d.ts +12 -0
- package/dist/types/runtime/cadence/reducer.d.ts +44 -0
- package/dist/types/runtime/conductor/agent.d.ts +71 -0
- package/dist/types/runtime/conductor/index.d.ts +11 -0
- package/dist/types/runtime/contract/config.d.ts +44 -0
- package/dist/types/runtime/contract/effect.d.ts +41 -0
- package/dist/types/runtime/contract/errors.d.ts +22 -0
- package/dist/types/runtime/contract/events.d.ts +63 -0
- package/dist/types/runtime/contract/index.d.ts +18 -0
- package/dist/types/runtime/contract/run-state.d.ts +57 -0
- package/dist/types/runtime/contract/session.d.ts +42 -0
- package/dist/types/runtime/contract/signal.d.ts +49 -0
- package/dist/types/runtime/contract/tools.d.ts +45 -0
- package/dist/types/runtime/dispatch/index.d.ts +9 -0
- package/dist/types/runtime/dispatch/scheduler.d.ts +53 -0
- package/dist/types/runtime/index.d.ts +22 -0
- package/dist/types/runtime/ledger/accumulator.d.ts +44 -0
- package/dist/types/runtime/ledger/bus.d.ts +50 -0
- package/dist/types/runtime/ledger/index.d.ts +11 -0
- package/dist/types/runtime/memory/compactor.d.ts +56 -0
- package/dist/types/runtime/memory/estimate.d.ts +21 -0
- package/dist/types/runtime/memory/index.d.ts +8 -0
- package/dist/types/runtime/runtime.test.d.ts +15 -0
- package/dist/types/runtime/store/dag.d.ts +72 -0
- package/dist/types/runtime/store/hash.d.ts +18 -0
- package/dist/types/runtime/store/index.d.ts +12 -0
- package/dist/types/runtime/store/persist.d.ts +49 -0
- package/dist/types/runtime/turn/driver.d.ts +32 -0
- package/dist/types/runtime/turn/index.d.ts +8 -0
- package/dist/types/runtime/wire/index.d.ts +10 -0
- package/dist/types/runtime/wire/projectors.d.ts +53 -0
- package/dist/types/shell-app/auth-cli/index.d.ts +9 -0
- package/dist/types/shell-app/auth-cli/oauth-cli.d.ts +73 -0
- package/dist/types/shell-app/boot/context.d.ts +108 -0
- package/dist/types/shell-app/boot/index.d.ts +13 -0
- package/dist/types/shell-app/boot/pipeline.d.ts +66 -0
- package/dist/types/shell-app/boot/stages.d.ts +77 -0
- package/dist/types/shell-app/cli.d.ts +75 -0
- package/dist/types/shell-app/config/index.d.ts +11 -0
- package/dist/types/shell-app/config/locator.d.ts +85 -0
- package/dist/types/shell-app/config/settings.d.ts +91 -0
- package/dist/types/shell-app/index.d.ts +26 -0
- package/dist/types/shell-app/invocation/flags.d.ts +89 -0
- package/dist/types/shell-app/invocation/parse.d.ts +89 -0
- package/dist/types/shell-app/locate/brand.d.ts +71 -0
- package/dist/types/shell-app/locate/index.d.ts +12 -0
- package/dist/types/shell-app/locate/locator.d.ts +122 -0
- package/dist/types/shell-app/runners/contract.d.ts +116 -0
- package/dist/types/shell-app/runners/index.d.ts +15 -0
- package/dist/types/shell-app/runners/one-shot.d.ts +21 -0
- package/dist/types/shell-app/runners/registry.d.ts +34 -0
- package/dist/types/shell-app/runners/repl.d.ts +51 -0
- package/dist/types/shell-app/runners/wire.d.ts +34 -0
- package/dist/types/shell-app/shell-app.test.d.ts +14 -0
- package/dist/types/shell-app/upgrade/index.d.ts +9 -0
- package/dist/types/shell-app/upgrade/upgrades.d.ts +62 -0
- package/dist/types/smithy/config/flag-reader.d.ts +128 -0
- package/dist/types/smithy/config/index.d.ts +9 -0
- package/dist/types/smithy/forge.d.ts +135 -0
- package/dist/types/smithy/index.d.ts +36 -0
- package/dist/types/smithy/knowledge/index.d.ts +10 -0
- package/dist/types/smithy/knowledge/loader.d.ts +64 -0
- package/dist/types/smithy/persona/blueprint.d.ts +75 -0
- package/dist/types/smithy/persona/define-agent.d.ts +51 -0
- package/dist/types/smithy/persona/index.d.ts +14 -0
- package/dist/types/smithy/persona/profiles.d.ts +44 -0
- package/dist/types/smithy/runtime/index.d.ts +9 -0
- package/dist/types/smithy/runtime/tool-ledger.d.ts +130 -0
- package/dist/types/smithy/smithy.test.d.ts +20 -0
- package/dist/types/smithy/ui/index.d.ts +11 -0
- package/dist/types/smithy/ui/transcript.d.ts +183 -0
- package/dist/types/swarm/coordinator.d.ts +192 -0
- package/dist/types/swarm/index.d.ts +33 -0
- package/dist/types/swarm/isolation/index.d.ts +14 -0
- package/dist/types/swarm/isolation/runner.d.ts +61 -0
- package/dist/types/swarm/isolation/worktree.d.ts +142 -0
- package/dist/types/swarm/kernel/faults.d.ts +52 -0
- package/dist/types/swarm/kernel/ids.d.ts +25 -0
- package/dist/types/swarm/kernel/index.d.ts +26 -0
- package/dist/types/swarm/kernel/json-cell.d.ts +113 -0
- package/dist/types/swarm/kernel/jsonl-log.d.ts +81 -0
- package/dist/types/swarm/postbox/channel.d.ts +88 -0
- package/dist/types/swarm/postbox/codecs.d.ts +253 -0
- package/dist/types/swarm/postbox/index.d.ts +16 -0
- package/dist/types/swarm/roster/index.d.ts +16 -0
- package/dist/types/swarm/roster/manifest.d.ts +185 -0
- package/dist/types/swarm/swarm.test.d.ts +24 -0
- package/dist/types/swarm/telemetry/activity.d.ts +143 -0
- package/dist/types/swarm/workboard/board.d.ts +174 -0
- package/dist/types/swarm/workboard/dep-graph.d.ts +77 -0
- package/dist/types/swarm/workboard/index.d.ts +12 -0
- package/dist/types/tracing/adapter/index.d.ts +12 -0
- package/dist/types/tracing/adapter/runtime-trace.d.ts +54 -0
- package/dist/types/tracing/channel/index.d.ts +9 -0
- package/dist/types/tracing/channel/signal.d.ts +93 -0
- package/dist/types/tracing/index.d.ts +25 -0
- package/dist/types/tracing/recorder/index.d.ts +12 -0
- package/dist/types/tracing/recorder/recorder.d.ts +75 -0
- package/dist/types/tracing/recorder/sampling.d.ts +55 -0
- package/dist/types/tracing/redaction/index.d.ts +8 -0
- package/dist/types/tracing/redaction/secret-scrubber.d.ts +95 -0
- package/dist/types/tracing/registry/hub.d.ts +57 -0
- package/dist/types/tracing/registry/index.d.ts +7 -0
- package/dist/types/tracing/signal/handle.d.ts +73 -0
- package/dist/types/tracing/signal/index.d.ts +12 -0
- package/dist/types/tracing/signal/segment.d.ts +124 -0
- package/dist/types/tracing/sinks/base.d.ts +51 -0
- package/dist/types/tracing/sinks/console.d.ts +44 -0
- package/dist/types/tracing/sinks/file.d.ts +47 -0
- package/dist/types/tracing/sinks/index.d.ts +16 -0
- package/dist/types/tracing/sinks/stream.d.ts +46 -0
- package/dist/types/tracing/tracing.test.d.ts +7 -0
- package/dist/types/ui/autocomplete.d.ts +59 -0
- package/dist/types/ui/contracts.d.ts +38 -0
- package/dist/types/ui/editor-component.d.ts +100 -0
- package/dist/types/ui/fuzzy.d.ts +29 -0
- package/dist/types/ui/index.d.ts +8 -0
- package/dist/types/ui/keybindings.d.ts +62 -0
- package/dist/types/ui/keys.d.ts +171 -0
- package/dist/types/ui/theme-types.d.ts +36 -0
- package/dist/types/ui/utils.d.ts +101 -0
- package/dist/types/ui-bridge/InteractiveApp.d.ts +38 -0
- package/dist/types/ui-bridge/adapter.d.ts +90 -0
- package/dist/types/ui-bridge/index.d.ts +37 -0
- package/package.json +120 -107
- package/LICENSE +0 -8
- package/LICENSE-THIRD-PARTY.txt +0 -30
- package/local-dist-new/IndusForge/examples/research-agent.d.ts +0 -3
- package/local-dist-new/IndusForge/examples/research-agent.d.ts.map +0 -1
- package/local-dist-new/IndusForge/examples/research-agent.js +0 -18
- package/local-dist-new/IndusForge/examples/research-agent.js.map +0 -1
- package/local-dist-new/IndusForge/examples/review-agent.d.ts +0 -3
- package/local-dist-new/IndusForge/examples/review-agent.d.ts.map +0 -1
- package/local-dist-new/IndusForge/examples/review-agent.js +0 -18
- package/local-dist-new/IndusForge/examples/review-agent.js.map +0 -1
- package/local-dist-new/IndusForge/examples/terminal-builder-agent.d.ts +0 -3
- package/local-dist-new/IndusForge/examples/terminal-builder-agent.d.ts.map +0 -1
- package/local-dist-new/IndusForge/examples/terminal-builder-agent.js +0 -18
- package/local-dist-new/IndusForge/examples/terminal-builder-agent.js.map +0 -1
- package/local-dist-new/IndusForge/terminal-chat.d.ts +0 -2
- package/local-dist-new/IndusForge/terminal-chat.d.ts.map +0 -1
- package/local-dist-new/IndusForge/terminal-chat.js +0 -557
- package/local-dist-new/IndusForge/terminal-chat.js.map +0 -1
- package/local-dist-new/agent.d.ts +0 -6
- package/local-dist-new/agent.d.ts.map +0 -1
- package/local-dist-new/agent.js +0 -6
- package/local-dist-new/agent.js.map +0 -1
- package/local-dist-new/ai.d.ts +0 -6
- package/local-dist-new/ai.d.ts.map +0 -1
- package/local-dist-new/ai.js +0 -6
- package/local-dist-new/ai.js.map +0 -1
- package/local-dist-new/bot/actions/bash.d.ts +0 -56
- package/local-dist-new/bot/actions/bash.d.ts.map +0 -1
- package/local-dist-new/bot/actions/bash.js +0 -275
- package/local-dist-new/bot/actions/bash.js.map +0 -1
- package/local-dist-new/bot/actions/composio/accounts.d.ts +0 -23
- package/local-dist-new/bot/actions/composio/accounts.d.ts.map +0 -1
- package/local-dist-new/bot/actions/composio/accounts.js +0 -40
- package/local-dist-new/bot/actions/composio/accounts.js.map +0 -1
- package/local-dist-new/bot/actions/composio/client.d.ts +0 -40
- package/local-dist-new/bot/actions/composio/client.d.ts.map +0 -1
- package/local-dist-new/bot/actions/composio/client.js +0 -361
- package/local-dist-new/bot/actions/composio/client.js.map +0 -1
- package/local-dist-new/bot/actions/composio/connect.d.ts +0 -20
- package/local-dist-new/bot/actions/composio/connect.d.ts.map +0 -1
- package/local-dist-new/bot/actions/composio/connect.js +0 -41
- package/local-dist-new/bot/actions/composio/connect.js.map +0 -1
- package/local-dist-new/bot/actions/composio/enable.d.ts +0 -26
- package/local-dist-new/bot/actions/composio/enable.d.ts.map +0 -1
- package/local-dist-new/bot/actions/composio/enable.js +0 -66
- package/local-dist-new/bot/actions/composio/enable.js.map +0 -1
- package/local-dist-new/bot/actions/composio/execute.d.ts +0 -27
- package/local-dist-new/bot/actions/composio/execute.d.ts.map +0 -1
- package/local-dist-new/bot/actions/composio/execute.js +0 -46
- package/local-dist-new/bot/actions/composio/execute.js.map +0 -1
- package/local-dist-new/bot/actions/composio/helpers.d.ts +0 -17
- package/local-dist-new/bot/actions/composio/helpers.d.ts.map +0 -1
- package/local-dist-new/bot/actions/composio/helpers.js +0 -533
- package/local-dist-new/bot/actions/composio/helpers.js.map +0 -1
- package/local-dist-new/bot/actions/composio/index.d.ts +0 -10
- package/local-dist-new/bot/actions/composio/index.d.ts.map +0 -1
- package/local-dist-new/bot/actions/composio/index.js +0 -9
- package/local-dist-new/bot/actions/composio/index.js.map +0 -1
- package/local-dist-new/bot/actions/composio/provider.d.ts +0 -9
- package/local-dist-new/bot/actions/composio/provider.d.ts.map +0 -1
- package/local-dist-new/bot/actions/composio/provider.js +0 -54
- package/local-dist-new/bot/actions/composio/provider.js.map +0 -1
- package/local-dist-new/bot/actions/composio/toolkits.d.ts +0 -23
- package/local-dist-new/bot/actions/composio/toolkits.d.ts.map +0 -1
- package/local-dist-new/bot/actions/composio/toolkits.js +0 -40
- package/local-dist-new/bot/actions/composio/toolkits.js.map +0 -1
- package/local-dist-new/bot/actions/composio/tools.d.ts +0 -29
- package/local-dist-new/bot/actions/composio/tools.d.ts.map +0 -1
- package/local-dist-new/bot/actions/composio/tools.js +0 -72
- package/local-dist-new/bot/actions/composio/tools.js.map +0 -1
- package/local-dist-new/bot/actions/composio/types.d.ts +0 -138
- package/local-dist-new/bot/actions/composio/types.d.ts.map +0 -1
- package/local-dist-new/bot/actions/composio/types.js +0 -2
- package/local-dist-new/bot/actions/composio/types.js.map +0 -1
- package/local-dist-new/bot/actions/crew/activity-tracker.d.ts +0 -66
- package/local-dist-new/bot/actions/crew/activity-tracker.d.ts.map +0 -1
- package/local-dist-new/bot/actions/crew/activity-tracker.js +0 -480
- package/local-dist-new/bot/actions/crew/activity-tracker.js.map +0 -1
- package/local-dist-new/bot/actions/crew/cleanup.d.ts +0 -51
- package/local-dist-new/bot/actions/crew/cleanup.d.ts.map +0 -1
- package/local-dist-new/bot/actions/crew/cleanup.js +0 -219
- package/local-dist-new/bot/actions/crew/cleanup.js.map +0 -1
- package/local-dist-new/bot/actions/crew/fs-lock.d.ts +0 -12
- package/local-dist-new/bot/actions/crew/fs-lock.d.ts.map +0 -1
- package/local-dist-new/bot/actions/crew/fs-lock.js +0 -74
- package/local-dist-new/bot/actions/crew/fs-lock.js.map +0 -1
- package/local-dist-new/bot/actions/crew/index.d.ts +0 -12
- package/local-dist-new/bot/actions/crew/index.d.ts.map +0 -1
- package/local-dist-new/bot/actions/crew/index.js +0 -12
- package/local-dist-new/bot/actions/crew/index.js.map +0 -1
- package/local-dist-new/bot/actions/crew/mailbox.d.ts +0 -21
- package/local-dist-new/bot/actions/crew/mailbox.d.ts.map +0 -1
- package/local-dist-new/bot/actions/crew/mailbox.js +0 -106
- package/local-dist-new/bot/actions/crew/mailbox.js.map +0 -1
- package/local-dist-new/bot/actions/crew/model-policy.d.ts +0 -23
- package/local-dist-new/bot/actions/crew/model-policy.d.ts.map +0 -1
- package/local-dist-new/bot/actions/crew/model-policy.js +0 -113
- package/local-dist-new/bot/actions/crew/model-policy.js.map +0 -1
- package/local-dist-new/bot/actions/crew/names.d.ts +0 -28
- package/local-dist-new/bot/actions/crew/names.d.ts.map +0 -1
- package/local-dist-new/bot/actions/crew/names.js +0 -109
- package/local-dist-new/bot/actions/crew/names.js.map +0 -1
- package/local-dist-new/bot/actions/crew/protocol.d.ts +0 -75
- package/local-dist-new/bot/actions/crew/protocol.d.ts.map +0 -1
- package/local-dist-new/bot/actions/crew/protocol.js +0 -205
- package/local-dist-new/bot/actions/crew/protocol.js.map +0 -1
- package/local-dist-new/bot/actions/crew/task-store.d.ts +0 -89
- package/local-dist-new/bot/actions/crew/task-store.d.ts.map +0 -1
- package/local-dist-new/bot/actions/crew/task-store.js +0 -445
- package/local-dist-new/bot/actions/crew/task-store.js.map +0 -1
- package/local-dist-new/bot/actions/crew/team-attach-claim.d.ts +0 -36
- package/local-dist-new/bot/actions/crew/team-attach-claim.d.ts.map +0 -1
- package/local-dist-new/bot/actions/crew/team-attach-claim.js +0 -144
- package/local-dist-new/bot/actions/crew/team-attach-claim.js.map +0 -1
- package/local-dist-new/bot/actions/crew/team-config.d.ts +0 -55
- package/local-dist-new/bot/actions/crew/team-config.d.ts.map +0 -1
- package/local-dist-new/bot/actions/crew/team-config.js +0 -252
- package/local-dist-new/bot/actions/crew/team-config.js.map +0 -1
- package/local-dist-new/bot/actions/crew/worktree.d.ts +0 -40
- package/local-dist-new/bot/actions/crew/worktree.d.ts.map +0 -1
- package/local-dist-new/bot/actions/crew/worktree.js +0 -213
- package/local-dist-new/bot/actions/crew/worktree.js.map +0 -1
- package/local-dist-new/bot/actions/edit-diff.d.ts +0 -63
- package/local-dist-new/bot/actions/edit-diff.d.ts.map +0 -1
- package/local-dist-new/bot/actions/edit-diff.js +0 -255
- package/local-dist-new/bot/actions/edit-diff.js.map +0 -1
- package/local-dist-new/bot/actions/edit.d.ts +0 -42
- package/local-dist-new/bot/actions/edit.d.ts.map +0 -1
- package/local-dist-new/bot/actions/edit.js +0 -176
- package/local-dist-new/bot/actions/edit.js.map +0 -1
- package/local-dist-new/bot/actions/find.d.ts +0 -26
- package/local-dist-new/bot/actions/find.d.ts.map +0 -1
- package/local-dist-new/bot/actions/find.js +0 -170
- package/local-dist-new/bot/actions/find.js.map +0 -1
- package/local-dist-new/bot/actions/grep.d.ts +0 -43
- package/local-dist-new/bot/actions/grep.d.ts.map +0 -1
- package/local-dist-new/bot/actions/grep.js +0 -218
- package/local-dist-new/bot/actions/grep.js.map +0 -1
- package/local-dist-new/bot/actions/index.d.ts +0 -301
- package/local-dist-new/bot/actions/index.d.ts.map +0 -1
- package/local-dist-new/bot/actions/index.js +0 -255
- package/local-dist-new/bot/actions/index.js.map +0 -1
- package/local-dist-new/bot/actions/kit/hook-runner.d.ts +0 -13
- package/local-dist-new/bot/actions/kit/hook-runner.d.ts.map +0 -1
- package/local-dist-new/bot/actions/kit/hook-runner.js +0 -33
- package/local-dist-new/bot/actions/kit/hook-runner.js.map +0 -1
- package/local-dist-new/bot/actions/kit/image-resize.d.ts +0 -20
- package/local-dist-new/bot/actions/kit/image-resize.d.ts.map +0 -1
- package/local-dist-new/bot/actions/kit/image-resize.js +0 -93
- package/local-dist-new/bot/actions/kit/image-resize.js.map +0 -1
- package/local-dist-new/bot/actions/kit/mime.d.ts +0 -2
- package/local-dist-new/bot/actions/kit/mime.d.ts.map +0 -1
- package/local-dist-new/bot/actions/kit/mime.js +0 -65
- package/local-dist-new/bot/actions/kit/mime.js.map +0 -1
- package/local-dist-new/bot/actions/kit/shell.d.ts +0 -13
- package/local-dist-new/bot/actions/kit/shell.d.ts.map +0 -1
- package/local-dist-new/bot/actions/kit/shell.js +0 -103
- package/local-dist-new/bot/actions/kit/shell.js.map +0 -1
- package/local-dist-new/bot/actions/ls.d.ts +0 -41
- package/local-dist-new/bot/actions/ls.d.ts.map +0 -1
- package/local-dist-new/bot/actions/ls.js +0 -174
- package/local-dist-new/bot/actions/ls.js.map +0 -1
- package/local-dist-new/bot/actions/path-utils.d.ts +0 -8
- package/local-dist-new/bot/actions/path-utils.d.ts.map +0 -1
- package/local-dist-new/bot/actions/path-utils.js +0 -75
- package/local-dist-new/bot/actions/path-utils.js.map +0 -1
- package/local-dist-new/bot/actions/process-controller.d.ts +0 -15
- package/local-dist-new/bot/actions/process-controller.d.ts.map +0 -1
- package/local-dist-new/bot/actions/process-controller.js +0 -39
- package/local-dist-new/bot/actions/process-controller.js.map +0 -1
- package/local-dist-new/bot/actions/process-manager.d.ts +0 -60
- package/local-dist-new/bot/actions/process-manager.d.ts.map +0 -1
- package/local-dist-new/bot/actions/process-manager.js +0 -485
- package/local-dist-new/bot/actions/process-manager.js.map +0 -1
- package/local-dist-new/bot/actions/process-types.d.ts +0 -74
- package/local-dist-new/bot/actions/process-types.d.ts.map +0 -1
- package/local-dist-new/bot/actions/process-types.js +0 -7
- package/local-dist-new/bot/actions/process-types.js.map +0 -1
- package/local-dist-new/bot/actions/process.d.ts +0 -38
- package/local-dist-new/bot/actions/process.d.ts.map +0 -1
- package/local-dist-new/bot/actions/process.js +0 -360
- package/local-dist-new/bot/actions/process.js.map +0 -1
- package/local-dist-new/bot/actions/read.d.ts +0 -37
- package/local-dist-new/bot/actions/read.d.ts.map +0 -1
- package/local-dist-new/bot/actions/read.js +0 -190
- package/local-dist-new/bot/actions/read.js.map +0 -1
- package/local-dist-new/bot/actions/registry.d.ts +0 -21
- package/local-dist-new/bot/actions/registry.d.ts.map +0 -1
- package/local-dist-new/bot/actions/registry.js +0 -23
- package/local-dist-new/bot/actions/registry.js.map +0 -1
- package/local-dist-new/bot/actions/todo-store.d.ts +0 -77
- package/local-dist-new/bot/actions/todo-store.d.ts.map +0 -1
- package/local-dist-new/bot/actions/todo-store.js +0 -137
- package/local-dist-new/bot/actions/todo-store.js.map +0 -1
- package/local-dist-new/bot/actions/todo-types.d.ts +0 -73
- package/local-dist-new/bot/actions/todo-types.d.ts.map +0 -1
- package/local-dist-new/bot/actions/todo-types.js +0 -8
- package/local-dist-new/bot/actions/todo-types.js.map +0 -1
- package/local-dist-new/bot/actions/todo.d.ts +0 -77
- package/local-dist-new/bot/actions/todo.d.ts.map +0 -1
- package/local-dist-new/bot/actions/todo.js +0 -122
- package/local-dist-new/bot/actions/todo.js.map +0 -1
- package/local-dist-new/bot/actions/truncate.d.ts +0 -73
- package/local-dist-new/bot/actions/truncate.d.ts.map +0 -1
- package/local-dist-new/bot/actions/truncate.js +0 -221
- package/local-dist-new/bot/actions/truncate.js.map +0 -1
- package/local-dist-new/bot/actions/webfetch.d.ts +0 -36
- package/local-dist-new/bot/actions/webfetch.d.ts.map +0 -1
- package/local-dist-new/bot/actions/webfetch.js +0 -247
- package/local-dist-new/bot/actions/webfetch.js.map +0 -1
- package/local-dist-new/bot/actions/websearch.d.ts +0 -35
- package/local-dist-new/bot/actions/websearch.d.ts.map +0 -1
- package/local-dist-new/bot/actions/websearch.js +0 -132
- package/local-dist-new/bot/actions/websearch.js.map +0 -1
- package/local-dist-new/bot/actions/write.d.ts +0 -31
- package/local-dist-new/bot/actions/write.d.ts.map +0 -1
- package/local-dist-new/bot/actions/write.js +0 -139
- package/local-dist-new/bot/actions/write.js.map +0 -1
- package/local-dist-new/bot/agent-loop.d.ts +0 -15
- package/local-dist-new/bot/agent-loop.d.ts.map +0 -1
- package/local-dist-new/bot/agent-loop.js +0 -293
- package/local-dist-new/bot/agent-loop.js.map +0 -1
- package/local-dist-new/bot/agent.d.ts +0 -122
- package/local-dist-new/bot/agent.d.ts.map +0 -1
- package/local-dist-new/bot/agent.js +0 -393
- package/local-dist-new/bot/agent.js.map +0 -1
- package/local-dist-new/bot/error-handler.d.ts +0 -8
- package/local-dist-new/bot/error-handler.d.ts.map +0 -1
- package/local-dist-new/bot/error-handler.js +0 -8
- package/local-dist-new/bot/error-handler.js.map +0 -1
- package/local-dist-new/bot/event-bus.d.ts +0 -9
- package/local-dist-new/bot/event-bus.d.ts.map +0 -1
- package/local-dist-new/bot/event-bus.js +0 -15
- package/local-dist-new/bot/event-bus.js.map +0 -1
- package/local-dist-new/bot/index.d.ts +0 -8
- package/local-dist-new/bot/index.d.ts.map +0 -1
- package/local-dist-new/bot/index.js +0 -8
- package/local-dist-new/bot/index.js.map +0 -1
- package/local-dist-new/bot/messages.d.ts +0 -77
- package/local-dist-new/bot/messages.d.ts.map +0 -1
- package/local-dist-new/bot/messages.js +0 -116
- package/local-dist-new/bot/messages.js.map +0 -1
- package/local-dist-new/bot/proxy.d.ts +0 -66
- package/local-dist-new/bot/proxy.d.ts.map +0 -1
- package/local-dist-new/bot/proxy.js +0 -228
- package/local-dist-new/bot/proxy.js.map +0 -1
- package/local-dist-new/bot/session-manager.d.ts +0 -448
- package/local-dist-new/bot/session-manager.d.ts.map +0 -1
- package/local-dist-new/bot/session-manager.js +0 -1232
- package/local-dist-new/bot/session-manager.js.map +0 -1
- package/local-dist-new/bot/state-manager.d.ts +0 -22
- package/local-dist-new/bot/state-manager.d.ts.map +0 -1
- package/local-dist-new/bot/state-manager.js +0 -60
- package/local-dist-new/bot/state-manager.js.map +0 -1
- package/local-dist-new/bot/telemetry.d.ts +0 -7
- package/local-dist-new/bot/telemetry.d.ts.map +0 -1
- package/local-dist-new/bot/telemetry.js +0 -18
- package/local-dist-new/bot/telemetry.js.map +0 -1
- package/local-dist-new/bot/types.d.ts +0 -205
- package/local-dist-new/bot/types.d.ts.map +0 -1
- package/local-dist-new/bot/types.js +0 -60
- package/local-dist-new/bot/types.js.map +0 -1
- package/local-dist-new/cli.d.ts +0 -3
- package/local-dist-new/cli.d.ts.map +0 -1
- package/local-dist-new/cli.js +0 -3
- package/local-dist-new/cli.js.map +0 -1
- package/local-dist-new/index.d.ts +0 -7
- package/local-dist-new/index.d.ts.map +0 -1
- package/local-dist-new/index.js +0 -7
- package/local-dist-new/index.js.map +0 -1
- package/local-dist-new/mcp/client-pool.d.ts +0 -106
- package/local-dist-new/mcp/client-pool.d.ts.map +0 -1
- package/local-dist-new/mcp/client-pool.js +0 -234
- package/local-dist-new/mcp/client-pool.js.map +0 -1
- package/local-dist-new/mcp/client.d.ts +0 -158
- package/local-dist-new/mcp/client.d.ts.map +0 -1
- package/local-dist-new/mcp/client.js +0 -611
- package/local-dist-new/mcp/client.js.map +0 -1
- package/local-dist-new/mcp/config.d.ts +0 -61
- package/local-dist-new/mcp/config.d.ts.map +0 -1
- package/local-dist-new/mcp/config.js +0 -250
- package/local-dist-new/mcp/config.js.map +0 -1
- package/local-dist-new/mcp/errors.d.ts +0 -104
- package/local-dist-new/mcp/errors.d.ts.map +0 -1
- package/local-dist-new/mcp/errors.js +0 -146
- package/local-dist-new/mcp/errors.js.map +0 -1
- package/local-dist-new/mcp/index.d.ts +0 -56
- package/local-dist-new/mcp/index.d.ts.map +0 -1
- package/local-dist-new/mcp/index.js +0 -83
- package/local-dist-new/mcp/index.js.map +0 -1
- package/local-dist-new/mcp/schema-converter.d.ts +0 -68
- package/local-dist-new/mcp/schema-converter.d.ts.map +0 -1
- package/local-dist-new/mcp/schema-converter.js +0 -230
- package/local-dist-new/mcp/schema-converter.js.map +0 -1
- package/local-dist-new/mcp/server.d.ts +0 -111
- package/local-dist-new/mcp/server.d.ts.map +0 -1
- package/local-dist-new/mcp/server.js +0 -305
- package/local-dist-new/mcp/server.js.map +0 -1
- package/local-dist-new/mcp/tool-factory.d.ts +0 -63
- package/local-dist-new/mcp/tool-factory.d.ts.map +0 -1
- package/local-dist-new/mcp/tool-factory.js +0 -228
- package/local-dist-new/mcp/tool-factory.js.map +0 -1
- package/local-dist-new/mcp/types.d.ts +0 -289
- package/local-dist-new/mcp/types.d.ts.map +0 -1
- package/local-dist-new/mcp/types.js +0 -8
- package/local-dist-new/mcp/types.js.map +0 -1
- package/local-dist-new/mcp.d.ts +0 -2
- package/local-dist-new/mcp.d.ts.map +0 -1
- package/local-dist-new/mcp.js +0 -2
- package/local-dist-new/mcp.js.map +0 -1
- package/local-dist-new/ml/adapters/amazon-bedrock.d.ts +0 -33
- package/local-dist-new/ml/adapters/amazon-bedrock.d.ts.map +0 -1
- package/local-dist-new/ml/adapters/amazon-bedrock.js +0 -610
- package/local-dist-new/ml/adapters/amazon-bedrock.js.map +0 -1
- package/local-dist-new/ml/adapters/anthropic.d.ts +0 -62
- package/local-dist-new/ml/adapters/anthropic.d.ts.map +0 -1
- package/local-dist-new/ml/adapters/anthropic.js +0 -682
- package/local-dist-new/ml/adapters/anthropic.js.map +0 -1
- package/local-dist-new/ml/adapters/azure-openai-responses.d.ts +0 -15
- package/local-dist-new/ml/adapters/azure-openai-responses.d.ts.map +0 -1
- package/local-dist-new/ml/adapters/azure-openai-responses.js +0 -233
- package/local-dist-new/ml/adapters/azure-openai-responses.js.map +0 -1
- package/local-dist-new/ml/adapters/google-shared.d.ts +0 -60
- package/local-dist-new/ml/adapters/google-shared.d.ts.map +0 -1
- package/local-dist-new/ml/adapters/google-shared.js +0 -316
- package/local-dist-new/ml/adapters/google-shared.js.map +0 -1
- package/local-dist-new/ml/adapters/google-vertex.d.ts +0 -15
- package/local-dist-new/ml/adapters/google-vertex.d.ts.map +0 -1
- package/local-dist-new/ml/adapters/google-vertex.js +0 -396
- package/local-dist-new/ml/adapters/google-vertex.js.map +0 -1
- package/local-dist-new/ml/adapters/google.d.ts +0 -16
- package/local-dist-new/ml/adapters/google.d.ts.map +0 -1
- package/local-dist-new/ml/adapters/google.js +0 -381
- package/local-dist-new/ml/adapters/google.js.map +0 -1
- package/local-dist-new/ml/adapters/kimi.d.ts +0 -22
- package/local-dist-new/ml/adapters/kimi.d.ts.map +0 -1
- package/local-dist-new/ml/adapters/kimi.js +0 -249
- package/local-dist-new/ml/adapters/kimi.js.map +0 -1
- package/local-dist-new/ml/adapters/mock.d.ts +0 -10
- package/local-dist-new/ml/adapters/mock.d.ts.map +0 -1
- package/local-dist-new/ml/adapters/mock.js +0 -64
- package/local-dist-new/ml/adapters/mock.js.map +0 -1
- package/local-dist-new/ml/adapters/nvidia.d.ts +0 -14
- package/local-dist-new/ml/adapters/nvidia.d.ts.map +0 -1
- package/local-dist-new/ml/adapters/nvidia.js +0 -377
- package/local-dist-new/ml/adapters/nvidia.js.map +0 -1
- package/local-dist-new/ml/adapters/openai-codex-responses.d.ts +0 -9
- package/local-dist-new/ml/adapters/openai-codex-responses.d.ts.map +0 -1
- package/local-dist-new/ml/adapters/openai-codex-responses.js +0 -397
- package/local-dist-new/ml/adapters/openai-codex-responses.js.map +0 -1
- package/local-dist-new/ml/adapters/openai-completions.d.ts +0 -25
- package/local-dist-new/ml/adapters/openai-completions.d.ts.map +0 -1
- package/local-dist-new/ml/adapters/openai-completions.js +0 -831
- package/local-dist-new/ml/adapters/openai-completions.js.map +0 -1
- package/local-dist-new/ml/adapters/openai-responses-shared.d.ts +0 -26
- package/local-dist-new/ml/adapters/openai-responses-shared.d.ts.map +0 -1
- package/local-dist-new/ml/adapters/openai-responses-shared.js +0 -461
- package/local-dist-new/ml/adapters/openai-responses-shared.js.map +0 -1
- package/local-dist-new/ml/adapters/openai-responses.d.ts +0 -13
- package/local-dist-new/ml/adapters/openai-responses.d.ts.map +0 -1
- package/local-dist-new/ml/adapters/openai-responses.js +0 -209
- package/local-dist-new/ml/adapters/openai-responses.js.map +0 -1
- package/local-dist-new/ml/adapters/openai-scaffold.d.ts +0 -4
- package/local-dist-new/ml/adapters/openai-scaffold.d.ts.map +0 -1
- package/local-dist-new/ml/adapters/openai-scaffold.js +0 -33
- package/local-dist-new/ml/adapters/openai-scaffold.js.map +0 -1
- package/local-dist-new/ml/adapters/register-builtins.d.ts +0 -3
- package/local-dist-new/ml/adapters/register-builtins.d.ts.map +0 -1
- package/local-dist-new/ml/adapters/register-builtins.js +0 -143
- package/local-dist-new/ml/adapters/register-builtins.js.map +0 -1
- package/local-dist-new/ml/adapters/simple-options.d.ts +0 -27
- package/local-dist-new/ml/adapters/simple-options.d.ts.map +0 -1
- package/local-dist-new/ml/adapters/simple-options.js +0 -96
- package/local-dist-new/ml/adapters/simple-options.js.map +0 -1
- package/local-dist-new/ml/adapters/transform-messages.d.ts +0 -22
- package/local-dist-new/ml/adapters/transform-messages.d.ts.map +0 -1
- package/local-dist-new/ml/adapters/transform-messages.js +0 -147
- package/local-dist-new/ml/adapters/transform-messages.js.map +0 -1
- package/local-dist-new/ml/api-registry.d.ts +0 -50
- package/local-dist-new/ml/api-registry.d.ts.map +0 -1
- package/local-dist-new/ml/api-registry.js +0 -121
- package/local-dist-new/ml/api-registry.js.map +0 -1
- package/local-dist-new/ml/cli.d.ts +0 -3
- package/local-dist-new/ml/cli.d.ts.map +0 -1
- package/local-dist-new/ml/cli.js +0 -117
- package/local-dist-new/ml/cli.js.map +0 -1
- package/local-dist-new/ml/env-api-keys.d.ts +0 -18
- package/local-dist-new/ml/env-api-keys.d.ts.map +0 -1
- package/local-dist-new/ml/env-api-keys.js +0 -122
- package/local-dist-new/ml/env-api-keys.js.map +0 -1
- package/local-dist-new/ml/index.d.ts +0 -28
- package/local-dist-new/ml/index.d.ts.map +0 -1
- package/local-dist-new/ml/index.js +0 -28
- package/local-dist-new/ml/index.js.map +0 -1
- package/local-dist-new/ml/kit/auth/anthropic.d.ts +0 -18
- package/local-dist-new/ml/kit/auth/anthropic.d.ts.map +0 -1
- package/local-dist-new/ml/kit/auth/anthropic.js +0 -152
- package/local-dist-new/ml/kit/auth/anthropic.js.map +0 -1
- package/local-dist-new/ml/kit/auth/github-copilot.d.ts +0 -23
- package/local-dist-new/ml/kit/auth/github-copilot.d.ts.map +0 -1
- package/local-dist-new/ml/kit/auth/github-copilot.js +0 -275
- package/local-dist-new/ml/kit/auth/github-copilot.js.map +0 -1
- package/local-dist-new/ml/kit/auth/index.d.ts +0 -50
- package/local-dist-new/ml/kit/auth/index.d.ts.map +0 -1
- package/local-dist-new/ml/kit/auth/index.js +0 -112
- package/local-dist-new/ml/kit/auth/index.js.map +0 -1
- package/local-dist-new/ml/kit/auth/kimi.d.ts +0 -24
- package/local-dist-new/ml/kit/auth/kimi.d.ts.map +0 -1
- package/local-dist-new/ml/kit/auth/kimi.js +0 -30
- package/local-dist-new/ml/kit/auth/kimi.js.map +0 -1
- package/local-dist-new/ml/kit/auth/oauth-page.d.ts +0 -3
- package/local-dist-new/ml/kit/auth/oauth-page.d.ts.map +0 -1
- package/local-dist-new/ml/kit/auth/oauth-page.js +0 -105
- package/local-dist-new/ml/kit/auth/oauth-page.js.map +0 -1
- package/local-dist-new/ml/kit/auth/openai-codex.d.ts +0 -34
- package/local-dist-new/ml/kit/auth/openai-codex.d.ts.map +0 -1
- package/local-dist-new/ml/kit/auth/openai-codex.js +0 -373
- package/local-dist-new/ml/kit/auth/openai-codex.js.map +0 -1
- package/local-dist-new/ml/kit/auth/pkce.d.ts +0 -13
- package/local-dist-new/ml/kit/auth/pkce.d.ts.map +0 -1
- package/local-dist-new/ml/kit/auth/pkce.js +0 -31
- package/local-dist-new/ml/kit/auth/pkce.js.map +0 -1
- package/local-dist-new/ml/kit/auth/types.d.ts +0 -72
- package/local-dist-new/ml/kit/auth/types.d.ts.map +0 -1
- package/local-dist-new/ml/kit/auth/types.js +0 -11
- package/local-dist-new/ml/kit/auth/types.js.map +0 -1
- package/local-dist-new/ml/kit/base-stream-handler.d.ts +0 -16
- package/local-dist-new/ml/kit/base-stream-handler.d.ts.map +0 -1
- package/local-dist-new/ml/kit/base-stream-handler.js +0 -25
- package/local-dist-new/ml/kit/base-stream-handler.js.map +0 -1
- package/local-dist-new/ml/kit/event-stream.d.ts +0 -45
- package/local-dist-new/ml/kit/event-stream.d.ts.map +0 -1
- package/local-dist-new/ml/kit/event-stream.js +0 -178
- package/local-dist-new/ml/kit/event-stream.js.map +0 -1
- package/local-dist-new/ml/kit/index.d.ts +0 -15
- package/local-dist-new/ml/kit/index.d.ts.map +0 -1
- package/local-dist-new/ml/kit/index.js +0 -15
- package/local-dist-new/ml/kit/index.js.map +0 -1
- package/local-dist-new/ml/kit/json-parse.d.ts +0 -21
- package/local-dist-new/ml/kit/json-parse.d.ts.map +0 -1
- package/local-dist-new/ml/kit/json-parse.js +0 -44
- package/local-dist-new/ml/kit/json-parse.js.map +0 -1
- package/local-dist-new/ml/kit/message-transform.d.ts +0 -29
- package/local-dist-new/ml/kit/message-transform.d.ts.map +0 -1
- package/local-dist-new/ml/kit/message-transform.js +0 -55
- package/local-dist-new/ml/kit/message-transform.js.map +0 -1
- package/local-dist-new/ml/kit/output-factory.d.ts +0 -3
- package/local-dist-new/ml/kit/output-factory.d.ts.map +0 -1
- package/local-dist-new/ml/kit/output-factory.js +0 -23
- package/local-dist-new/ml/kit/output-factory.js.map +0 -1
- package/local-dist-new/ml/kit/overflow.d.ts +0 -10
- package/local-dist-new/ml/kit/overflow.d.ts.map +0 -1
- package/local-dist-new/ml/kit/overflow.js +0 -76
- package/local-dist-new/ml/kit/overflow.js.map +0 -1
- package/local-dist-new/ml/kit/provider-adapter.d.ts +0 -57
- package/local-dist-new/ml/kit/provider-adapter.d.ts.map +0 -1
- package/local-dist-new/ml/kit/provider-adapter.js +0 -37
- package/local-dist-new/ml/kit/provider-adapter.js.map +0 -1
- package/local-dist-new/ml/kit/provider-client-builder.d.ts +0 -37
- package/local-dist-new/ml/kit/provider-client-builder.d.ts.map +0 -1
- package/local-dist-new/ml/kit/provider-client-builder.js +0 -50
- package/local-dist-new/ml/kit/provider-client-builder.js.map +0 -1
- package/local-dist-new/ml/kit/provider-consolidation.d.ts +0 -4
- package/local-dist-new/ml/kit/provider-consolidation.d.ts.map +0 -1
- package/local-dist-new/ml/kit/provider-consolidation.js +0 -33
- package/local-dist-new/ml/kit/provider-consolidation.js.map +0 -1
- package/local-dist-new/ml/kit/provider-constants.d.ts +0 -35
- package/local-dist-new/ml/kit/provider-constants.d.ts.map +0 -1
- package/local-dist-new/ml/kit/provider-constants.js +0 -35
- package/local-dist-new/ml/kit/provider-constants.js.map +0 -1
- package/local-dist-new/ml/kit/provider-errors.d.ts +0 -46
- package/local-dist-new/ml/kit/provider-errors.d.ts.map +0 -1
- package/local-dist-new/ml/kit/provider-errors.js +0 -103
- package/local-dist-new/ml/kit/provider-errors.js.map +0 -1
- package/local-dist-new/ml/kit/sanitize-unicode.d.ts +0 -3
- package/local-dist-new/ml/kit/sanitize-unicode.d.ts.map +0 -1
- package/local-dist-new/ml/kit/sanitize-unicode.js +0 -60
- package/local-dist-new/ml/kit/sanitize-unicode.js.map +0 -1
- package/local-dist-new/ml/kit/stream-event-helper.d.ts +0 -28
- package/local-dist-new/ml/kit/stream-event-helper.d.ts.map +0 -1
- package/local-dist-new/ml/kit/stream-event-helper.js +0 -52
- package/local-dist-new/ml/kit/stream-event-helper.js.map +0 -1
- package/local-dist-new/ml/kit/stream-handler-types.d.ts +0 -43
- package/local-dist-new/ml/kit/stream-handler-types.d.ts.map +0 -1
- package/local-dist-new/ml/kit/stream-handler-types.js +0 -23
- package/local-dist-new/ml/kit/stream-handler-types.js.map +0 -1
- package/local-dist-new/ml/kit/streaming-state-manager.d.ts +0 -50
- package/local-dist-new/ml/kit/streaming-state-manager.d.ts.map +0 -1
- package/local-dist-new/ml/kit/streaming-state-manager.js +0 -67
- package/local-dist-new/ml/kit/streaming-state-manager.js.map +0 -1
- package/local-dist-new/ml/kit/tool-converter.d.ts +0 -50
- package/local-dist-new/ml/kit/tool-converter.d.ts.map +0 -1
- package/local-dist-new/ml/kit/tool-converter.js +0 -54
- package/local-dist-new/ml/kit/tool-converter.js.map +0 -1
- package/local-dist-new/ml/kit/typebox-helpers.d.ts +0 -24
- package/local-dist-new/ml/kit/typebox-helpers.d.ts.map +0 -1
- package/local-dist-new/ml/kit/typebox-helpers.js +0 -46
- package/local-dist-new/ml/kit/typebox-helpers.js.map +0 -1
- package/local-dist-new/ml/kit/validation.d.ts +0 -24
- package/local-dist-new/ml/kit/validation.d.ts.map +0 -1
- package/local-dist-new/ml/kit/validation.js +0 -119
- package/local-dist-new/ml/kit/validation.js.map +0 -1
- package/local-dist-new/ml/models.d.ts +0 -41
- package/local-dist-new/ml/models.d.ts.map +0 -1
- package/local-dist-new/ml/models.generated.d.ts +0 -12245
- package/local-dist-new/ml/models.generated.d.ts.map +0 -1
- package/local-dist-new/ml/models.generated.js +0 -12080
- package/local-dist-new/ml/models.generated.js.map +0 -1
- package/local-dist-new/ml/models.js +0 -126
- package/local-dist-new/ml/models.js.map +0 -1
- package/local-dist-new/ml/stream.d.ts +0 -12
- package/local-dist-new/ml/stream.d.ts.map +0 -1
- package/local-dist-new/ml/stream.js +0 -54
- package/local-dist-new/ml/stream.js.map +0 -1
- package/local-dist-new/ml/types.d.ts +0 -270
- package/local-dist-new/ml/types.d.ts.map +0 -1
- package/local-dist-new/ml/types.js +0 -169
- package/local-dist-new/ml/types.js.map +0 -1
- package/local-dist-new/observability.d.ts +0 -2
- package/local-dist-new/observability.d.ts.map +0 -1
- package/local-dist-new/observability.js +0 -2
- package/local-dist-new/observability.js.map +0 -1
- package/local-dist-new/react-host/index.d.ts +0 -10
- package/local-dist-new/react-host/index.d.ts.map +0 -1
- package/local-dist-new/react-host/index.js +0 -9
- package/local-dist-new/react-host/index.js.map +0 -1
- package/local-dist-new/react-host/ink.d.ts +0 -6
- package/local-dist-new/react-host/ink.d.ts.map +0 -1
- package/local-dist-new/react-host/ink.js +0 -7
- package/local-dist-new/react-host/ink.js.map +0 -1
- package/local-dist-new/react-host/jsx-runtime.d.ts +0 -5
- package/local-dist-new/react-host/jsx-runtime.d.ts.map +0 -1
- package/local-dist-new/react-host/jsx-runtime.js +0 -6
- package/local-dist-new/react-host/jsx-runtime.js.map +0 -1
- package/local-dist-new/react-host/loader.d.ts +0 -4
- package/local-dist-new/react-host/loader.d.ts.map +0 -1
- package/local-dist-new/react-host/loader.js +0 -108
- package/local-dist-new/react-host/loader.js.map +0 -1
- package/local-dist-new/react-ink/components/ChangelogBlock.d.ts +0 -9
- package/local-dist-new/react-ink/components/ChangelogBlock.d.ts.map +0 -1
- package/local-dist-new/react-ink/components/ChangelogBlock.js +0 -58
- package/local-dist-new/react-ink/components/ChangelogBlock.js.map +0 -1
- package/local-dist-new/react-ink/components/DisplayBlockView.d.ts +0 -9
- package/local-dist-new/react-ink/components/DisplayBlockView.d.ts.map +0 -1
- package/local-dist-new/react-ink/components/DisplayBlockView.js +0 -11
- package/local-dist-new/react-ink/components/DisplayBlockView.js.map +0 -1
- package/local-dist-new/react-ink/components/Footer.d.ts +0 -12
- package/local-dist-new/react-ink/components/Footer.d.ts.map +0 -1
- package/local-dist-new/react-ink/components/Footer.js +0 -113
- package/local-dist-new/react-ink/components/Footer.js.map +0 -1
- package/local-dist-new/react-ink/components/MessageList.d.ts +0 -15
- package/local-dist-new/react-ink/components/MessageList.d.ts.map +0 -1
- package/local-dist-new/react-ink/components/MessageList.js +0 -43
- package/local-dist-new/react-ink/components/MessageList.js.map +0 -1
- package/local-dist-new/react-ink/components/MessageRow.d.ts +0 -14
- package/local-dist-new/react-ink/components/MessageRow.d.ts.map +0 -1
- package/local-dist-new/react-ink/components/MessageRow.js +0 -35
- package/local-dist-new/react-ink/components/MessageRow.js.map +0 -1
- package/local-dist-new/react-ink/components/StatusLine.d.ts +0 -10
- package/local-dist-new/react-ink/components/StatusLine.d.ts.map +0 -1
- package/local-dist-new/react-ink/components/StatusLine.js +0 -39
- package/local-dist-new/react-ink/components/StatusLine.js.map +0 -1
- package/local-dist-new/react-ink/components/TaskPanel.d.ts +0 -12
- package/local-dist-new/react-ink/components/TaskPanel.d.ts.map +0 -1
- package/local-dist-new/react-ink/components/TaskPanel.js +0 -23
- package/local-dist-new/react-ink/components/TaskPanel.js.map +0 -1
- package/local-dist-new/react-ink/components/ToolEventBlock.d.ts +0 -18
- package/local-dist-new/react-ink/components/ToolEventBlock.d.ts.map +0 -1
- package/local-dist-new/react-ink/components/ToolEventBlock.js +0 -61
- package/local-dist-new/react-ink/components/ToolEventBlock.js.map +0 -1
- package/local-dist-new/react-ink/components/dialogs/DialogFrame.d.ts +0 -9
- package/local-dist-new/react-ink/components/dialogs/DialogFrame.d.ts.map +0 -1
- package/local-dist-new/react-ink/components/dialogs/DialogFrame.js +0 -6
- package/local-dist-new/react-ink/components/dialogs/DialogFrame.js.map +0 -1
- package/local-dist-new/react-ink/components/dialogs/LoginDialog.d.ts +0 -15
- package/local-dist-new/react-ink/components/dialogs/LoginDialog.d.ts.map +0 -1
- package/local-dist-new/react-ink/components/dialogs/LoginDialog.js +0 -10
- package/local-dist-new/react-ink/components/dialogs/LoginDialog.js.map +0 -1
- package/local-dist-new/react-ink/components/dialogs/ModelDialog.d.ts +0 -10
- package/local-dist-new/react-ink/components/dialogs/ModelDialog.d.ts.map +0 -1
- package/local-dist-new/react-ink/components/dialogs/ModelDialog.js +0 -64
- package/local-dist-new/react-ink/components/dialogs/ModelDialog.js.map +0 -1
- package/local-dist-new/react-ink/components/dialogs/OAuthDialog.d.ts +0 -10
- package/local-dist-new/react-ink/components/dialogs/OAuthDialog.d.ts.map +0 -1
- package/local-dist-new/react-ink/components/dialogs/OAuthDialog.js +0 -24
- package/local-dist-new/react-ink/components/dialogs/OAuthDialog.js.map +0 -1
- package/local-dist-new/react-ink/components/dialogs/ScopedModelsDialog.d.ts +0 -10
- package/local-dist-new/react-ink/components/dialogs/ScopedModelsDialog.d.ts.map +0 -1
- package/local-dist-new/react-ink/components/dialogs/ScopedModelsDialog.js +0 -95
- package/local-dist-new/react-ink/components/dialogs/ScopedModelsDialog.js.map +0 -1
- package/local-dist-new/react-ink/components/dialogs/SelectableDialog.d.ts +0 -17
- package/local-dist-new/react-ink/components/dialogs/SelectableDialog.d.ts.map +0 -1
- package/local-dist-new/react-ink/components/dialogs/SelectableDialog.js +0 -66
- package/local-dist-new/react-ink/components/dialogs/SelectableDialog.js.map +0 -1
- package/local-dist-new/react-ink/components/dialogs/SessionDialog.d.ts +0 -14
- package/local-dist-new/react-ink/components/dialogs/SessionDialog.d.ts.map +0 -1
- package/local-dist-new/react-ink/components/dialogs/SessionDialog.js +0 -201
- package/local-dist-new/react-ink/components/dialogs/SessionDialog.js.map +0 -1
- package/local-dist-new/react-ink/components/dialogs/SettingsDialog.d.ts +0 -15
- package/local-dist-new/react-ink/components/dialogs/SettingsDialog.d.ts.map +0 -1
- package/local-dist-new/react-ink/components/dialogs/SettingsDialog.js +0 -79
- package/local-dist-new/react-ink/components/dialogs/SettingsDialog.js.map +0 -1
- package/local-dist-new/react-ink/components/dialogs/StartupSessionPicker.d.ts +0 -10
- package/local-dist-new/react-ink/components/dialogs/StartupSessionPicker.d.ts.map +0 -1
- package/local-dist-new/react-ink/components/dialogs/StartupSessionPicker.js +0 -100
- package/local-dist-new/react-ink/components/dialogs/StartupSessionPicker.js.map +0 -1
- package/local-dist-new/react-ink/components/dialogs/ThemeDialog.d.ts +0 -8
- package/local-dist-new/react-ink/components/dialogs/ThemeDialog.d.ts.map +0 -1
- package/local-dist-new/react-ink/components/dialogs/ThemeDialog.js +0 -7
- package/local-dist-new/react-ink/components/dialogs/ThemeDialog.js.map +0 -1
- package/local-dist-new/react-ink/components/dialogs/TreeDialog.d.ts +0 -9
- package/local-dist-new/react-ink/components/dialogs/TreeDialog.d.ts.map +0 -1
- package/local-dist-new/react-ink/components/dialogs/TreeDialog.js +0 -7
- package/local-dist-new/react-ink/components/dialogs/TreeDialog.js.map +0 -1
- package/local-dist-new/react-ink/components/dialogs/UserMessageDialog.d.ts +0 -9
- package/local-dist-new/react-ink/components/dialogs/UserMessageDialog.d.ts.map +0 -1
- package/local-dist-new/react-ink/components/dialogs/UserMessageDialog.js +0 -7
- package/local-dist-new/react-ink/components/dialogs/UserMessageDialog.js.map +0 -1
- package/local-dist-new/react-ink/components/messages/AssistantMessage.d.ts +0 -13
- package/local-dist-new/react-ink/components/messages/AssistantMessage.d.ts.map +0 -1
- package/local-dist-new/react-ink/components/messages/AssistantMessage.js +0 -20
- package/local-dist-new/react-ink/components/messages/AssistantMessage.js.map +0 -1
- package/local-dist-new/react-ink/components/messages/BashMessage.d.ts +0 -9
- package/local-dist-new/react-ink/components/messages/BashMessage.d.ts.map +0 -1
- package/local-dist-new/react-ink/components/messages/BashMessage.js +0 -11
- package/local-dist-new/react-ink/components/messages/BashMessage.js.map +0 -1
- package/local-dist-new/react-ink/components/messages/BranchSummaryMessage.d.ts +0 -9
- package/local-dist-new/react-ink/components/messages/BranchSummaryMessage.d.ts.map +0 -1
- package/local-dist-new/react-ink/components/messages/BranchSummaryMessage.js +0 -6
- package/local-dist-new/react-ink/components/messages/BranchSummaryMessage.js.map +0 -1
- package/local-dist-new/react-ink/components/messages/CompactionMessage.d.ts +0 -9
- package/local-dist-new/react-ink/components/messages/CompactionMessage.d.ts.map +0 -1
- package/local-dist-new/react-ink/components/messages/CompactionMessage.js +0 -6
- package/local-dist-new/react-ink/components/messages/CompactionMessage.js.map +0 -1
- package/local-dist-new/react-ink/components/messages/CustomMessage.d.ts +0 -10
- package/local-dist-new/react-ink/components/messages/CustomMessage.d.ts.map +0 -1
- package/local-dist-new/react-ink/components/messages/CustomMessage.js +0 -9
- package/local-dist-new/react-ink/components/messages/CustomMessage.js.map +0 -1
- package/local-dist-new/react-ink/components/messages/SkillInvocationMessage.d.ts +0 -8
- package/local-dist-new/react-ink/components/messages/SkillInvocationMessage.d.ts.map +0 -1
- package/local-dist-new/react-ink/components/messages/SkillInvocationMessage.js +0 -10
- package/local-dist-new/react-ink/components/messages/SkillInvocationMessage.js.map +0 -1
- package/local-dist-new/react-ink/components/messages/ToolCallMessage.d.ts +0 -9
- package/local-dist-new/react-ink/components/messages/ToolCallMessage.d.ts.map +0 -1
- package/local-dist-new/react-ink/components/messages/ToolCallMessage.js +0 -8
- package/local-dist-new/react-ink/components/messages/ToolCallMessage.js.map +0 -1
- package/local-dist-new/react-ink/components/messages/ToolResultBlock.d.ts +0 -13
- package/local-dist-new/react-ink/components/messages/ToolResultBlock.d.ts.map +0 -1
- package/local-dist-new/react-ink/components/messages/ToolResultBlock.js +0 -8
- package/local-dist-new/react-ink/components/messages/ToolResultBlock.js.map +0 -1
- package/local-dist-new/react-ink/components/messages/UserMessage.d.ts +0 -10
- package/local-dist-new/react-ink/components/messages/UserMessage.d.ts.map +0 -1
- package/local-dist-new/react-ink/components/messages/UserMessage.js +0 -9
- package/local-dist-new/react-ink/components/messages/UserMessage.js.map +0 -1
- package/local-dist-new/react-ink/index.d.ts +0 -35
- package/local-dist-new/react-ink/index.d.ts.map +0 -1
- package/local-dist-new/react-ink/index.js +0 -35
- package/local-dist-new/react-ink/index.js.map +0 -1
- package/local-dist-new/react-ink/theme-adapter.d.ts +0 -10
- package/local-dist-new/react-ink/theme-adapter.d.ts.map +0 -1
- package/local-dist-new/react-ink/theme-adapter.js +0 -44
- package/local-dist-new/react-ink/theme-adapter.js.map +0 -1
- package/local-dist-new/react-ink/types.d.ts +0 -134
- package/local-dist-new/react-ink/types.d.ts.map +0 -1
- package/local-dist-new/react-ink/types.js +0 -2
- package/local-dist-new/react-ink/types.js.map +0 -1
- package/local-dist-new/react-ink/utils/message-groups.d.ts +0 -26
- package/local-dist-new/react-ink/utils/message-groups.d.ts.map +0 -1
- package/local-dist-new/react-ink/utils/message-groups.js +0 -240
- package/local-dist-new/react-ink/utils/message-groups.js.map +0 -1
- package/local-dist-new/react-ink/utils/selection-dialog.d.ts +0 -3
- package/local-dist-new/react-ink/utils/selection-dialog.d.ts.map +0 -1
- package/local-dist-new/react-ink/utils/selection-dialog.js +0 -18
- package/local-dist-new/react-ink/utils/selection-dialog.js.map +0 -1
- package/local-dist-new/react-ink/utils/session-browser.d.ts +0 -28
- package/local-dist-new/react-ink/utils/session-browser.d.ts.map +0 -1
- package/local-dist-new/react-ink/utils/session-browser.js +0 -191
- package/local-dist-new/react-ink/utils/session-browser.js.map +0 -1
- package/local-dist-new/react-ink/utils/tool-display.d.ts +0 -22
- package/local-dist-new/react-ink/utils/tool-display.d.ts.map +0 -1
- package/local-dist-new/react-ink/utils/tool-display.js +0 -349
- package/local-dist-new/react-ink/utils/tool-display.js.map +0 -1
- package/local-dist-new/react-ink.d.ts +0 -3
- package/local-dist-new/react-ink.d.ts.map +0 -1
- package/local-dist-new/react-ink.js +0 -2
- package/local-dist-new/react-ink.js.map +0 -1
- package/local-dist-new/tui.d.ts +0 -9
- package/local-dist-new/tui.d.ts.map +0 -1
- package/local-dist-new/tui.js +0 -8
- package/local-dist-new/tui.js.map +0 -1
- package/local-dist-new/ui/autocomplete.d.ts +0 -60
- package/local-dist-new/ui/autocomplete.d.ts.map +0 -1
- package/local-dist-new/ui/autocomplete.js +0 -393
- package/local-dist-new/ui/autocomplete.js.map +0 -1
- package/local-dist-new/ui/contracts.d.ts +0 -39
- package/local-dist-new/ui/contracts.d.ts.map +0 -1
- package/local-dist-new/ui/contracts.js +0 -2
- package/local-dist-new/ui/contracts.js.map +0 -1
- package/local-dist-new/ui/editor-component.d.ts +0 -101
- package/local-dist-new/ui/editor-component.d.ts.map +0 -1
- package/local-dist-new/ui/editor-component.js +0 -2
- package/local-dist-new/ui/editor-component.js.map +0 -1
- package/local-dist-new/ui/fuzzy.d.ts +0 -26
- package/local-dist-new/ui/fuzzy.d.ts.map +0 -1
- package/local-dist-new/ui/fuzzy.js +0 -177
- package/local-dist-new/ui/fuzzy.js.map +0 -1
- package/local-dist-new/ui/index.d.ts +0 -9
- package/local-dist-new/ui/index.d.ts.map +0 -1
- package/local-dist-new/ui/index.js +0 -6
- package/local-dist-new/ui/index.js.map +0 -1
- package/local-dist-new/ui/keybindings.d.ts +0 -52
- package/local-dist-new/ui/keybindings.d.ts.map +0 -1
- package/local-dist-new/ui/keybindings.js +0 -193
- package/local-dist-new/ui/keybindings.js.map +0 -1
- package/local-dist-new/ui/keys.d.ts +0 -168
- package/local-dist-new/ui/keys.d.ts.map +0 -1
- package/local-dist-new/ui/keys.js +0 -1093
- package/local-dist-new/ui/keys.js.map +0 -1
- package/local-dist-new/ui/theme-types.d.ts +0 -37
- package/local-dist-new/ui/theme-types.d.ts.map +0 -1
- package/local-dist-new/ui/theme-types.js +0 -2
- package/local-dist-new/ui/theme-types.js.map +0 -1
- package/local-dist-new/ui/utils.d.ts +0 -97
- package/local-dist-new/ui/utils.d.ts.map +0 -1
- package/local-dist-new/ui/utils.js +0 -860
- package/local-dist-new/ui/utils.js.map +0 -1
- package/observe.d.ts +0 -1
- package/observe.js +0 -1
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
export type TeamsStyle = string;
|
|
2
|
-
export interface TeamMember {
|
|
3
|
-
name: string;
|
|
4
|
-
role: "lead" | "worker";
|
|
5
|
-
addedAt: string;
|
|
6
|
-
status: "online" | "offline";
|
|
7
|
-
lastSeenAt?: string;
|
|
8
|
-
/** Optional: teammate session file path (useful for debugging) */
|
|
9
|
-
sessionFile?: string;
|
|
10
|
-
/** Optional: teammate working directory */
|
|
11
|
-
cwd?: string;
|
|
12
|
-
/** Freeform metadata for future use */
|
|
13
|
-
meta?: Record<string, unknown>;
|
|
14
|
-
}
|
|
15
|
-
export type TeamHooksFailureAction = "warn" | "followup" | "reopen" | "reopen_followup";
|
|
16
|
-
export type TeamHooksFollowupOwnerPolicy = "member" | "lead" | "none";
|
|
17
|
-
export interface TeamHooksPolicy {
|
|
18
|
-
failureAction?: TeamHooksFailureAction;
|
|
19
|
-
maxReopensPerTask?: number;
|
|
20
|
-
followupOwner?: TeamHooksFollowupOwnerPolicy;
|
|
21
|
-
}
|
|
22
|
-
export interface TeamConfig {
|
|
23
|
-
version: 1;
|
|
24
|
-
teamId: string;
|
|
25
|
-
/** Task list namespace identifier (Claude-style: often teamName or parentSessionId) */
|
|
26
|
-
taskListId: string;
|
|
27
|
-
/** Internal leader agent id (mailbox name, member name, etc.) */
|
|
28
|
-
leadName: string;
|
|
29
|
-
/** Optional UI/UX style. If omitted, treat as "normal". */
|
|
30
|
-
style?: TeamsStyle;
|
|
31
|
-
/** Optional per-team hooks policy override (env remains fallback). */
|
|
32
|
-
hooks?: TeamHooksPolicy;
|
|
33
|
-
createdAt: string;
|
|
34
|
-
updatedAt: string;
|
|
35
|
-
members: TeamMember[];
|
|
36
|
-
}
|
|
37
|
-
export declare function getTeamConfigPath(teamDir: string): string;
|
|
38
|
-
export declare function loadTeamConfig(teamDir: string): Promise<TeamConfig | null>;
|
|
39
|
-
export declare function ensureTeamConfig(teamDir: string, init: {
|
|
40
|
-
teamId: string;
|
|
41
|
-
taskListId: string;
|
|
42
|
-
leadName: string;
|
|
43
|
-
style?: TeamsStyle;
|
|
44
|
-
}): Promise<TeamConfig>;
|
|
45
|
-
export declare function setTeamStyle(teamDir: string, style: TeamsStyle): Promise<TeamConfig | null>;
|
|
46
|
-
export declare function updateTeamHooksPolicy(teamDir: string, updater: (current: TeamHooksPolicy) => TeamHooksPolicy | undefined): Promise<TeamConfig | null>;
|
|
47
|
-
export declare function upsertMember(teamDir: string, member: Omit<TeamMember, "name" | "addedAt"> & {
|
|
48
|
-
name: string;
|
|
49
|
-
addedAt?: string;
|
|
50
|
-
}): Promise<TeamConfig>;
|
|
51
|
-
export declare function setMemberStatus(teamDir: string, memberName: string, status: "online" | "offline", extra?: {
|
|
52
|
-
lastSeenAt?: string;
|
|
53
|
-
meta?: Record<string, unknown>;
|
|
54
|
-
}): Promise<TeamConfig | null>;
|
|
55
|
-
//# sourceMappingURL=team-config.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"team-config.d.ts","sourceRoot":"","sources":["../../../../app/bot/actions/crew/team-config.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC;AAUhC,MAAM,WAAW,UAAU;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,GAAG,QAAQ,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kEAAkE;IAClE,WAAW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qCrB;AAED,wBAAsB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAmBjG;AAED,wBAAsB,qBAAqB,CAC1C,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,eAAe,GAAG,SAAS,GAChE,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAoB5B;AAED,wBAAsB,YAAY,CACjC,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,IAAI,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,GAC/E,OAAO,CAAC,UAAU,CAAC,CAmDrB;AAED,wBAAsB,eAAe,CACpC,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,QAAQ,GAAG,SAAS,EAC5B,KAAK,CAAC,EAAE;IAAE,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,GAC7D,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAiC5B"}
|
|
@@ -1,252 +0,0 @@
|
|
|
1
|
-
import * as fs from "node:fs";
|
|
2
|
-
import * as path from "node:path";
|
|
3
|
-
import { withLock } from "./fs-lock.js";
|
|
4
|
-
import { sanitizeName } from "./names.js";
|
|
5
|
-
function normalizeTeamsStyleId(raw) {
|
|
6
|
-
if (typeof raw !== "string")
|
|
7
|
-
return null;
|
|
8
|
-
const trimmed = raw.trim();
|
|
9
|
-
if (!trimmed)
|
|
10
|
-
return null;
|
|
11
|
-
const sanitized = sanitizeName(trimmed).toLowerCase();
|
|
12
|
-
return sanitized ? sanitized : null;
|
|
13
|
-
}
|
|
14
|
-
export function getTeamConfigPath(teamDir) {
|
|
15
|
-
return path.join(teamDir, "config.json");
|
|
16
|
-
}
|
|
17
|
-
async function ensureDir(p) {
|
|
18
|
-
await fs.promises.mkdir(p, { recursive: true });
|
|
19
|
-
}
|
|
20
|
-
function isRecord(v) {
|
|
21
|
-
return typeof v === "object" && v !== null;
|
|
22
|
-
}
|
|
23
|
-
function coerceStyle(v) {
|
|
24
|
-
return normalizeTeamsStyleId(v) ?? undefined;
|
|
25
|
-
}
|
|
26
|
-
function isTeamHooksFailureAction(v) {
|
|
27
|
-
return v === "warn" || v === "followup" || v === "reopen" || v === "reopen_followup";
|
|
28
|
-
}
|
|
29
|
-
function isTeamHooksFollowupOwnerPolicy(v) {
|
|
30
|
-
return v === "member" || v === "lead" || v === "none";
|
|
31
|
-
}
|
|
32
|
-
function coerceNonNegativeInt(v) {
|
|
33
|
-
if (typeof v !== "number" || !Number.isFinite(v) || v < 0)
|
|
34
|
-
return undefined;
|
|
35
|
-
return Math.floor(v);
|
|
36
|
-
}
|
|
37
|
-
function coerceHooksPolicy(v) {
|
|
38
|
-
if (!isRecord(v))
|
|
39
|
-
return undefined;
|
|
40
|
-
const failureAction = isTeamHooksFailureAction(v.failureAction) ? v.failureAction : undefined;
|
|
41
|
-
const maxReopensPerTask = coerceNonNegativeInt(v.maxReopensPerTask);
|
|
42
|
-
const followupOwner = isTeamHooksFollowupOwnerPolicy(v.followupOwner) ? v.followupOwner : undefined;
|
|
43
|
-
if (!failureAction && maxReopensPerTask === undefined && !followupOwner)
|
|
44
|
-
return undefined;
|
|
45
|
-
return { failureAction, maxReopensPerTask, followupOwner };
|
|
46
|
-
}
|
|
47
|
-
async function readJson(file) {
|
|
48
|
-
try {
|
|
49
|
-
const raw = await fs.promises.readFile(file, "utf8");
|
|
50
|
-
const parsed = JSON.parse(raw);
|
|
51
|
-
return parsed;
|
|
52
|
-
}
|
|
53
|
-
catch {
|
|
54
|
-
return null;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
async function writeJsonAtomic(file, data) {
|
|
58
|
-
await ensureDir(path.dirname(file));
|
|
59
|
-
const tmp = `${file}.tmp.${process.pid}.${Date.now()}`;
|
|
60
|
-
await fs.promises.writeFile(tmp, JSON.stringify(data, null, 2) + "\n", "utf8");
|
|
61
|
-
await fs.promises.rename(tmp, file);
|
|
62
|
-
}
|
|
63
|
-
function coerceMember(obj) {
|
|
64
|
-
if (!isRecord(obj))
|
|
65
|
-
return null;
|
|
66
|
-
if (typeof obj.name !== "string")
|
|
67
|
-
return null;
|
|
68
|
-
if (obj.role !== "lead" && obj.role !== "worker")
|
|
69
|
-
return null;
|
|
70
|
-
if (obj.status !== "online" && obj.status !== "offline")
|
|
71
|
-
return null;
|
|
72
|
-
if (typeof obj.addedAt !== "string")
|
|
73
|
-
return null;
|
|
74
|
-
return {
|
|
75
|
-
name: sanitizeName(obj.name),
|
|
76
|
-
role: obj.role,
|
|
77
|
-
status: obj.status,
|
|
78
|
-
addedAt: obj.addedAt,
|
|
79
|
-
lastSeenAt: typeof obj.lastSeenAt === "string" ? obj.lastSeenAt : undefined,
|
|
80
|
-
sessionFile: typeof obj.sessionFile === "string" ? obj.sessionFile : undefined,
|
|
81
|
-
cwd: typeof obj.cwd === "string" ? obj.cwd : undefined,
|
|
82
|
-
meta: isRecord(obj.meta) ? obj.meta : undefined,
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
function coerceConfig(obj) {
|
|
86
|
-
if (!isRecord(obj))
|
|
87
|
-
return null;
|
|
88
|
-
if (obj.version !== 1)
|
|
89
|
-
return null;
|
|
90
|
-
if (typeof obj.teamId !== "string")
|
|
91
|
-
return null;
|
|
92
|
-
if (typeof obj.taskListId !== "string")
|
|
93
|
-
return null;
|
|
94
|
-
if (typeof obj.leadName !== "string")
|
|
95
|
-
return null;
|
|
96
|
-
if (typeof obj.createdAt !== "string")
|
|
97
|
-
return null;
|
|
98
|
-
if (typeof obj.updatedAt !== "string")
|
|
99
|
-
return null;
|
|
100
|
-
if (!Array.isArray(obj.members))
|
|
101
|
-
return null;
|
|
102
|
-
const style = coerceStyle(obj.style);
|
|
103
|
-
const hooks = coerceHooksPolicy(obj.hooks);
|
|
104
|
-
const members = obj.members.map(coerceMember).filter((m) => m !== null);
|
|
105
|
-
return {
|
|
106
|
-
version: 1,
|
|
107
|
-
teamId: obj.teamId,
|
|
108
|
-
taskListId: obj.taskListId,
|
|
109
|
-
leadName: sanitizeName(obj.leadName),
|
|
110
|
-
style,
|
|
111
|
-
hooks,
|
|
112
|
-
createdAt: obj.createdAt,
|
|
113
|
-
updatedAt: obj.updatedAt,
|
|
114
|
-
members,
|
|
115
|
-
};
|
|
116
|
-
}
|
|
117
|
-
export async function loadTeamConfig(teamDir) {
|
|
118
|
-
const file = getTeamConfigPath(teamDir);
|
|
119
|
-
const obj = await readJson(file);
|
|
120
|
-
return coerceConfig(obj);
|
|
121
|
-
}
|
|
122
|
-
export async function ensureTeamConfig(teamDir, init) {
|
|
123
|
-
const file = getTeamConfigPath(teamDir);
|
|
124
|
-
const lock = `${file}.lock`;
|
|
125
|
-
await ensureDir(teamDir);
|
|
126
|
-
return await withLock(lock, async () => {
|
|
127
|
-
const existing = coerceConfig(await readJson(file));
|
|
128
|
-
if (existing)
|
|
129
|
-
return existing;
|
|
130
|
-
const now = new Date().toISOString();
|
|
131
|
-
const cfg = {
|
|
132
|
-
version: 1,
|
|
133
|
-
teamId: init.teamId,
|
|
134
|
-
taskListId: init.taskListId,
|
|
135
|
-
leadName: sanitizeName(init.leadName),
|
|
136
|
-
style: init.style ?? "normal",
|
|
137
|
-
createdAt: now,
|
|
138
|
-
updatedAt: now,
|
|
139
|
-
members: [
|
|
140
|
-
{
|
|
141
|
-
name: sanitizeName(init.leadName),
|
|
142
|
-
role: "lead",
|
|
143
|
-
addedAt: now,
|
|
144
|
-
status: "online",
|
|
145
|
-
lastSeenAt: now,
|
|
146
|
-
},
|
|
147
|
-
],
|
|
148
|
-
};
|
|
149
|
-
await writeJsonAtomic(file, cfg);
|
|
150
|
-
return cfg;
|
|
151
|
-
}, { label: "team-config:ensure" });
|
|
152
|
-
}
|
|
153
|
-
export async function setTeamStyle(teamDir, style) {
|
|
154
|
-
const file = getTeamConfigPath(teamDir);
|
|
155
|
-
const lock = `${file}.lock`;
|
|
156
|
-
await ensureDir(teamDir);
|
|
157
|
-
return await withLock(lock, async () => {
|
|
158
|
-
const existing = coerceConfig(await readJson(file));
|
|
159
|
-
if (!existing)
|
|
160
|
-
return null;
|
|
161
|
-
const now = new Date().toISOString();
|
|
162
|
-
const updated = { ...existing, style, updatedAt: now };
|
|
163
|
-
await writeJsonAtomic(file, updated);
|
|
164
|
-
return updated;
|
|
165
|
-
}, { label: `team-config:style:${style}` });
|
|
166
|
-
}
|
|
167
|
-
export async function updateTeamHooksPolicy(teamDir, updater) {
|
|
168
|
-
const file = getTeamConfigPath(teamDir);
|
|
169
|
-
const lock = `${file}.lock`;
|
|
170
|
-
await ensureDir(teamDir);
|
|
171
|
-
return await withLock(lock, async () => {
|
|
172
|
-
const existing = coerceConfig(await readJson(file));
|
|
173
|
-
if (!existing)
|
|
174
|
-
return null;
|
|
175
|
-
const nextHooks = coerceHooksPolicy(updater(existing.hooks ?? {}));
|
|
176
|
-
const now = new Date().toISOString();
|
|
177
|
-
const updated = { ...existing, hooks: nextHooks, updatedAt: now };
|
|
178
|
-
await writeJsonAtomic(file, updated);
|
|
179
|
-
return updated;
|
|
180
|
-
}, { label: "team-config:hooks-policy" });
|
|
181
|
-
}
|
|
182
|
-
export async function upsertMember(teamDir, member) {
|
|
183
|
-
const file = getTeamConfigPath(teamDir);
|
|
184
|
-
const lock = `${file}.lock`;
|
|
185
|
-
await ensureDir(teamDir);
|
|
186
|
-
return await withLock(lock, async () => {
|
|
187
|
-
const existing = coerceConfig(await readJson(file));
|
|
188
|
-
if (!existing) {
|
|
189
|
-
throw new Error(`Team config missing. Call ensureTeamConfig() first. path=${file}`);
|
|
190
|
-
}
|
|
191
|
-
const now = new Date().toISOString();
|
|
192
|
-
const name = sanitizeName(member.name);
|
|
193
|
-
const idx = existing.members.findIndex((m) => m.name === name);
|
|
194
|
-
const prev = idx >= 0 ? existing.members[idx] : undefined;
|
|
195
|
-
if (idx >= 0 && !prev) {
|
|
196
|
-
throw new Error(`Team config corrupted: member index out of range. idx=${idx}`);
|
|
197
|
-
}
|
|
198
|
-
const nextMember = {
|
|
199
|
-
name,
|
|
200
|
-
role: member.role,
|
|
201
|
-
status: member.status,
|
|
202
|
-
addedAt: prev ? prev.addedAt : member.addedAt ?? now,
|
|
203
|
-
lastSeenAt: member.lastSeenAt ?? now,
|
|
204
|
-
sessionFile: member.sessionFile,
|
|
205
|
-
cwd: member.cwd,
|
|
206
|
-
meta: member.meta,
|
|
207
|
-
};
|
|
208
|
-
const members = existing.members.slice();
|
|
209
|
-
if (prev) {
|
|
210
|
-
members[idx] = { ...prev, ...nextMember, addedAt: prev.addedAt };
|
|
211
|
-
}
|
|
212
|
-
else {
|
|
213
|
-
members.push(nextMember);
|
|
214
|
-
}
|
|
215
|
-
const updated = {
|
|
216
|
-
...existing,
|
|
217
|
-
updatedAt: now,
|
|
218
|
-
members,
|
|
219
|
-
};
|
|
220
|
-
await writeJsonAtomic(file, updated);
|
|
221
|
-
return updated;
|
|
222
|
-
}, { label: `team-config:upsert:${member.name}` });
|
|
223
|
-
}
|
|
224
|
-
export async function setMemberStatus(teamDir, memberName, status, extra) {
|
|
225
|
-
const file = getTeamConfigPath(teamDir);
|
|
226
|
-
const lock = `${file}.lock`;
|
|
227
|
-
await ensureDir(teamDir);
|
|
228
|
-
return await withLock(lock, async () => {
|
|
229
|
-
const existing = coerceConfig(await readJson(file));
|
|
230
|
-
if (!existing)
|
|
231
|
-
return null;
|
|
232
|
-
const name = sanitizeName(memberName);
|
|
233
|
-
const idx = existing.members.findIndex((m) => m.name === name);
|
|
234
|
-
if (idx < 0)
|
|
235
|
-
return existing;
|
|
236
|
-
const now = new Date().toISOString();
|
|
237
|
-
const members = existing.members.slice();
|
|
238
|
-
const prev = members[idx];
|
|
239
|
-
if (!prev)
|
|
240
|
-
return existing;
|
|
241
|
-
members[idx] = {
|
|
242
|
-
...prev,
|
|
243
|
-
status,
|
|
244
|
-
lastSeenAt: extra?.lastSeenAt ?? now,
|
|
245
|
-
meta: extra?.meta ? { ...(prev.meta ?? {}), ...extra.meta } : prev.meta,
|
|
246
|
-
};
|
|
247
|
-
const updated = { ...existing, updatedAt: now, members };
|
|
248
|
-
await writeJsonAtomic(file, updated);
|
|
249
|
-
return updated;
|
|
250
|
-
}, { label: `team-config:status:${memberName}` });
|
|
251
|
-
}
|
|
252
|
-
//# sourceMappingURL=team-config.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"team-config.js","sourceRoot":"","sources":["../../../../app/bot/actions/crew/team-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAI1C,SAAS,qBAAqB,CAAC,GAAY;IAC1C,IAAI,OAAO,GAAG,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC;IACzC,MAAM,OAAO,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC;IAC3B,IAAI,CAAC,OAAO;QAAE,OAAO,IAAI,CAAC;IAC1B,MAAM,SAAS,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE,CAAC;IACtD,OAAO,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC;AACrC,CAAC;AAyCD,MAAM,UAAU,iBAAiB,CAAC,OAAe;IAChD,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;AAC1C,CAAC;AAED,KAAK,UAAU,SAAS,CAAC,CAAS;IACjC,MAAM,EAAE,CAAC,QAAQ,CAAC,KAAK,CA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,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;QAC/D,IAAI,GAAG,GAAG,CAAC;YAAE,OAAO,QAAQ,CAAC;QAE7B,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;QACrC,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;QACzC,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;QAC1B,IAAI,CAAC,IAAI;YAAE,OAAO,QAAQ,CAAC;QAC3B,OAAO,CAAC,GAAG,CAAC,GAAG;YACd,GAAG,IAAI;YACP,MAAM;YACN,UAAU,EAAE,KAAK,EAAE,UAAU,IAAI,GAAG;YACpC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC,EAAE,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI;SACvE,CAAC;QAEF,MAAM,OAAO,GAAe,EAAE,GAAG,QAAQ,EAAE,SAAS,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;QACrE,MAAM,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACrC,OAAO,OAAO,CAAC;IAChB,CAAC,EACD,EAAE,KAAK,EAAE,sBAAsB,UAAU,EAAE,EAAE,CAC7C,CAAC;AACH,CAAC"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
export type WorktreeCleanupResult = {
|
|
2
|
-
removedWorktrees: string[];
|
|
3
|
-
removedBranches: string[];
|
|
4
|
-
warnings: string[];
|
|
5
|
-
};
|
|
6
|
-
export type WorktreeResult = {
|
|
7
|
-
cwd: string;
|
|
8
|
-
warnings: string[];
|
|
9
|
-
mode: "worktree" | "shared";
|
|
10
|
-
};
|
|
11
|
-
/**
|
|
12
|
-
* Ensure a per-teammate git worktree exists, returning the cwd to use for that teammate.
|
|
13
|
-
*
|
|
14
|
-
* Behavior:
|
|
15
|
-
* - If not in a git repo, falls back to shared cwd with a warning.
|
|
16
|
-
* - If git repo is dirty, still creates a worktree but warns that uncommitted changes are not included.
|
|
17
|
-
*/
|
|
18
|
-
export declare function ensureWorktreeCwd(opts: {
|
|
19
|
-
leaderCwd: string;
|
|
20
|
-
teamDir: string;
|
|
21
|
-
teamId: string;
|
|
22
|
-
agentName: string;
|
|
23
|
-
}): Promise<WorktreeResult>;
|
|
24
|
-
/**
|
|
25
|
-
* Remove all git worktrees under `<teamDir>/worktrees/` and their associated branches.
|
|
26
|
-
*
|
|
27
|
-
* Steps for each worktree:
|
|
28
|
-
* 1. `git worktree remove --force <path>` (removes the worktree checkout)
|
|
29
|
-
* 2. `git branch -D <branch>` (removes the local branch)
|
|
30
|
-
* 3. Falls back to filesystem removal if git commands fail
|
|
31
|
-
*
|
|
32
|
-
* Also runs `git worktree prune` to clean up stale worktree bookkeeping.
|
|
33
|
-
*/
|
|
34
|
-
export declare function cleanupWorktrees(opts: {
|
|
35
|
-
teamDir: string;
|
|
36
|
-
teamId: string;
|
|
37
|
-
/** A directory known to be in the git repo (e.g. leaderCwd). */
|
|
38
|
-
repoCwd?: string;
|
|
39
|
-
}): Promise<WorktreeCleanupResult>;
|
|
40
|
-
//# sourceMappingURL=worktree.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"worktree.d.ts","sourceRoot":"","sources":["../../../../app/bot/actions/crew/worktree.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,qBAAqB,GAAG;IACnC,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,QAAQ,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AA2BF,MAAM,MAAM,cAAc,GAAG;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,IAAI,EAAE,UAAU,GAAG,QAAQ,CAAC;CAC5B,CAAC;AAEF;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CAAC,IAAI,EAAE;IAC7C,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CAClB,GAAG,OAAO,CAAC,cAAc,CAAC,CAsD1B;AA6BD;;;;;;;;;GASG;AACH,wBAAsB,gBAAgB,CAAC,IAAI,EAAE;IAC5C,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CA6FjC"}
|
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
import * as fs from "node:fs";
|
|
2
|
-
import * as path from "node:path";
|
|
3
|
-
import { execFile } from "node:child_process";
|
|
4
|
-
import { sanitizeName } from "./names.js";
|
|
5
|
-
async function execGit(args, opts) {
|
|
6
|
-
return await new Promise((resolve, reject) => {
|
|
7
|
-
execFile("git", args, { cwd: opts.cwd, timeout: opts.timeoutMs ?? 30_000, maxBuffer: 10 * 1024 * 1024 }, (err, stdout, stderr) => {
|
|
8
|
-
if (err) {
|
|
9
|
-
const msg = [
|
|
10
|
-
`git ${args.join(" ")} failed`,
|
|
11
|
-
`cwd=${opts.cwd}`,
|
|
12
|
-
stderr ? `stderr=${String(stderr).trim()}` : "",
|
|
13
|
-
err instanceof Error ? `error=${err.message}` : `error=${String(err)}`,
|
|
14
|
-
]
|
|
15
|
-
.filter(Boolean)
|
|
16
|
-
.join("\n");
|
|
17
|
-
reject(new Error(msg));
|
|
18
|
-
return;
|
|
19
|
-
}
|
|
20
|
-
resolve({ stdout: String(stdout), stderr: String(stderr) });
|
|
21
|
-
});
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Ensure a per-teammate git worktree exists, returning the cwd to use for that teammate.
|
|
26
|
-
*
|
|
27
|
-
* Behavior:
|
|
28
|
-
* - If not in a git repo, falls back to shared cwd with a warning.
|
|
29
|
-
* - If git repo is dirty, still creates a worktree but warns that uncommitted changes are not included.
|
|
30
|
-
*/
|
|
31
|
-
export async function ensureWorktreeCwd(opts) {
|
|
32
|
-
const warnings = [];
|
|
33
|
-
let repoRoot;
|
|
34
|
-
try {
|
|
35
|
-
repoRoot = (await execGit(["rev-parse", "--show-toplevel"], { cwd: opts.leaderCwd })).stdout.trim();
|
|
36
|
-
if (!repoRoot)
|
|
37
|
-
throw new Error("empty git toplevel");
|
|
38
|
-
}
|
|
39
|
-
catch {
|
|
40
|
-
warnings.push("Not a git repository (or git unavailable). Using shared workspace instead of worktree.");
|
|
41
|
-
return { cwd: opts.leaderCwd, warnings, mode: "shared" };
|
|
42
|
-
}
|
|
43
|
-
try {
|
|
44
|
-
const status = (await execGit(["status", "--porcelain"], { cwd: repoRoot })).stdout;
|
|
45
|
-
if (status.trim().length) {
|
|
46
|
-
warnings.push("Git working directory is not clean. Worktree will be created from current HEAD and will NOT include your uncommitted changes.");
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
catch {
|
|
50
|
-
// ignore status errors
|
|
51
|
-
}
|
|
52
|
-
const safeAgent = sanitizeName(opts.agentName);
|
|
53
|
-
const shortTeam = sanitizeName(opts.teamId).slice(0, 12) || "team";
|
|
54
|
-
const branch = `indusagi-teams/${shortTeam}/${safeAgent}`;
|
|
55
|
-
const worktreesDir = path.join(opts.teamDir, "worktrees");
|
|
56
|
-
const worktreePath = path.join(worktreesDir, safeAgent);
|
|
57
|
-
await fs.promises.mkdir(worktreesDir, { recursive: true });
|
|
58
|
-
// Reuse if it already exists.
|
|
59
|
-
if (fs.existsSync(worktreePath)) {
|
|
60
|
-
return { cwd: worktreePath, warnings, mode: "worktree" };
|
|
61
|
-
}
|
|
62
|
-
try {
|
|
63
|
-
// Create worktree + new branch from HEAD
|
|
64
|
-
await execGit(["worktree", "add", "-b", branch, worktreePath, "HEAD"], { cwd: repoRoot, timeoutMs: 120_000 });
|
|
65
|
-
return { cwd: worktreePath, warnings, mode: "worktree" };
|
|
66
|
-
}
|
|
67
|
-
catch (err) {
|
|
68
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
69
|
-
// If the branch already exists (e.g. previous run), try adding worktree using the existing branch.
|
|
70
|
-
if (msg.includes("already exists") || msg.includes("is already checked out")) {
|
|
71
|
-
try {
|
|
72
|
-
await execGit(["worktree", "add", worktreePath, branch], { cwd: repoRoot, timeoutMs: 120_000 });
|
|
73
|
-
return { cwd: worktreePath, warnings, mode: "worktree" };
|
|
74
|
-
}
|
|
75
|
-
catch {
|
|
76
|
-
// fall through
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
warnings.push(`Failed to create git worktree (${branch}). Using shared workspace instead.`);
|
|
80
|
-
return { cwd: opts.leaderCwd, warnings, mode: "shared" };
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Find the git repo root from a directory that may be inside a worktree.
|
|
85
|
-
* Returns null if not a git repo.
|
|
86
|
-
*/
|
|
87
|
-
async function findRepoRoot(cwd) {
|
|
88
|
-
try {
|
|
89
|
-
// --show-superproject-working-tree returns empty if not a worktree subproject.
|
|
90
|
-
// Use the commondir approach: worktrees share a common git dir with the main repo.
|
|
91
|
-
const commonDir = (await execGit(["rev-parse", "--git-common-dir"], { cwd })).stdout.trim();
|
|
92
|
-
if (commonDir && !path.isAbsolute(commonDir)) {
|
|
93
|
-
// Relative to the .git dir of the worktree — resolve upward.
|
|
94
|
-
const gitDir = (await execGit(["rev-parse", "--git-dir"], { cwd })).stdout.trim();
|
|
95
|
-
const absCommon = path.resolve(cwd, gitDir, commonDir);
|
|
96
|
-
// The common dir is the .git directory of the main repo. Its parent is the repo root.
|
|
97
|
-
return path.dirname(absCommon);
|
|
98
|
-
}
|
|
99
|
-
if (commonDir && path.isAbsolute(commonDir)) {
|
|
100
|
-
return path.dirname(commonDir);
|
|
101
|
-
}
|
|
102
|
-
// Fallback: plain repo
|
|
103
|
-
const toplevel = (await execGit(["rev-parse", "--show-toplevel"], { cwd })).stdout.trim();
|
|
104
|
-
return toplevel || null;
|
|
105
|
-
}
|
|
106
|
-
catch {
|
|
107
|
-
return null;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
111
|
-
* Remove all git worktrees under `<teamDir>/worktrees/` and their associated branches.
|
|
112
|
-
*
|
|
113
|
-
* Steps for each worktree:
|
|
114
|
-
* 1. `git worktree remove --force <path>` (removes the worktree checkout)
|
|
115
|
-
* 2. `git branch -D <branch>` (removes the local branch)
|
|
116
|
-
* 3. Falls back to filesystem removal if git commands fail
|
|
117
|
-
*
|
|
118
|
-
* Also runs `git worktree prune` to clean up stale worktree bookkeeping.
|
|
119
|
-
*/
|
|
120
|
-
export async function cleanupWorktrees(opts) {
|
|
121
|
-
const removedWorktrees = [];
|
|
122
|
-
const removedBranches = [];
|
|
123
|
-
const warnings = [];
|
|
124
|
-
const worktreesDir = path.join(opts.teamDir, "worktrees");
|
|
125
|
-
let entries;
|
|
126
|
-
try {
|
|
127
|
-
entries = await fs.promises.readdir(worktreesDir);
|
|
128
|
-
}
|
|
129
|
-
catch {
|
|
130
|
-
// No worktrees directory — nothing to do.
|
|
131
|
-
return { removedWorktrees, removedBranches, warnings };
|
|
132
|
-
}
|
|
133
|
-
if (entries.length === 0) {
|
|
134
|
-
return { removedWorktrees, removedBranches, warnings };
|
|
135
|
-
}
|
|
136
|
-
// Find the repo root. Prefer deriving from the worktree paths themselves (they belong
|
|
137
|
-
// to the repo that created them), only fall back to repoCwd when none resolve.
|
|
138
|
-
// This avoids cross-repo issues when cleanup targets a team created from a different repo.
|
|
139
|
-
let repoRoot = null;
|
|
140
|
-
for (const entry of entries) {
|
|
141
|
-
const candidate = path.join(worktreesDir, entry);
|
|
142
|
-
repoRoot = await findRepoRoot(candidate);
|
|
143
|
-
if (repoRoot)
|
|
144
|
-
break;
|
|
145
|
-
}
|
|
146
|
-
if (!repoRoot && opts.repoCwd) {
|
|
147
|
-
repoRoot = await findRepoRoot(opts.repoCwd);
|
|
148
|
-
}
|
|
149
|
-
const shortTeam = sanitizeName(opts.teamId).slice(0, 12) || "team";
|
|
150
|
-
for (const entry of entries) {
|
|
151
|
-
const worktreePath = path.join(worktreesDir, entry);
|
|
152
|
-
const safeAgent = sanitizeName(entry);
|
|
153
|
-
const branch = `indusagi-teams/${shortTeam}/${safeAgent}`;
|
|
154
|
-
// 1. Remove worktree via git
|
|
155
|
-
if (repoRoot) {
|
|
156
|
-
try {
|
|
157
|
-
await execGit(["worktree", "remove", "--force", worktreePath], { cwd: repoRoot, timeoutMs: 30_000 });
|
|
158
|
-
removedWorktrees.push(worktreePath);
|
|
159
|
-
}
|
|
160
|
-
catch {
|
|
161
|
-
// Git removal failed — try filesystem fallback below.
|
|
162
|
-
try {
|
|
163
|
-
await fs.promises.rm(worktreePath, { recursive: true, force: true });
|
|
164
|
-
removedWorktrees.push(worktreePath);
|
|
165
|
-
}
|
|
166
|
-
catch (fsErr) {
|
|
167
|
-
const msg = fsErr instanceof Error ? fsErr.message : String(fsErr);
|
|
168
|
-
warnings.push(`Failed to remove worktree ${worktreePath}: ${msg}`);
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
// 2. Remove the associated branch
|
|
172
|
-
try {
|
|
173
|
-
await execGit(["branch", "-D", branch], { cwd: repoRoot });
|
|
174
|
-
removedBranches.push(branch);
|
|
175
|
-
}
|
|
176
|
-
catch {
|
|
177
|
-
// Branch may not exist (shared workspace fallback) — that's fine.
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
else {
|
|
181
|
-
// No repo root — just delete the directory.
|
|
182
|
-
try {
|
|
183
|
-
await fs.promises.rm(worktreePath, { recursive: true, force: true });
|
|
184
|
-
removedWorktrees.push(worktreePath);
|
|
185
|
-
}
|
|
186
|
-
catch (fsErr) {
|
|
187
|
-
const msg = fsErr instanceof Error ? fsErr.message : String(fsErr);
|
|
188
|
-
warnings.push(`Failed to remove worktree directory ${worktreePath}: ${msg}`);
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
// 3. Prune stale worktree bookkeeping entries
|
|
193
|
-
if (repoRoot) {
|
|
194
|
-
try {
|
|
195
|
-
await execGit(["worktree", "prune"], { cwd: repoRoot });
|
|
196
|
-
}
|
|
197
|
-
catch {
|
|
198
|
-
warnings.push("git worktree prune failed (non-fatal)");
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
// 4. Remove the now-empty worktrees directory itself
|
|
202
|
-
try {
|
|
203
|
-
const remaining = await fs.promises.readdir(worktreesDir);
|
|
204
|
-
if (remaining.length === 0) {
|
|
205
|
-
await fs.promises.rmdir(worktreesDir);
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
catch {
|
|
209
|
-
// ignore — best effort
|
|
210
|
-
}
|
|
211
|
-
return { removedWorktrees, removedBranches, warnings };
|
|
212
|
-
}
|
|
213
|
-
//# sourceMappingURL=worktree.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"worktree.js","sourceRoot":"","sources":["../../../../app/bot/actions/crew/worktree.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAQ1C,KAAK,UAAU,OAAO,CAAC,IAAc,EAAE,IAAyC;IAC/E,OAAO,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAC5C,QAAQ,CACP,KAAK,EACL,IAAI,EACJ,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,CAAC,SAA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,CAAC,CAAC;YACrC,CAAC;YAAC,OAAO,KAAc,EAAE,CAAC;gBACzB,MAAM,GAAG,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;gBACnE,QAAQ,CAAC,IAAI,CAAC,uCAAuC,YAAY,KAAK,GAAG,EAAE,CAAC,CAAC;YAC9E,CAAC;QACF,CAAC;IACF,CAAC;IAED,8CAA8C;IAC9C,IAAI,QAAQ,EAAE,CAAC;QACd,IAAI,CAAC;YACJ,MAAM,OAAO,CAAC,CAAC,UAAU,EAAE,OAAO,CAAC,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;QACzD,CAAC;QAAC,MAAM,CAAC;YACR,QAAQ,CAAC,IAAI,CAAC,uCAAuC,CAAC,CAAC;QACxD,CAAC;IACF,CAAC;IAED,qDAAqD;IACrD,IAAI,CAAC;QACJ,MAAM,SAAS,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;QAC1D,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC5B,MAAM,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QACvC,CAAC;IACF,CAAC;IAAC,MAAM,CAAC;QACR,uBAAuB;IACxB,CAAC;IAED,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,QAAQ,EAAE,CAAC;AACxD,CAAC"}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared diff computation utilities for edit tool.
|
|
3
|
-
* Simplified version for indusvx agent framework.
|
|
4
|
-
*/
|
|
5
|
-
export declare function detectLineEnding(content: string): "\r\n" | "\n";
|
|
6
|
-
export declare function normalizeToLF(text: string): string;
|
|
7
|
-
export declare function restoreLineEndings(text: string, ending: "\r\n" | "\n"): string;
|
|
8
|
-
/**
|
|
9
|
-
* Normalize text for fuzzy matching. Applies progressive transformations:
|
|
10
|
-
* - Strip trailing whitespace from each line
|
|
11
|
-
* - Normalize smart quotes to ASCII equivalents
|
|
12
|
-
* - Normalize Unicode dashes/hyphens to ASCII hyphen
|
|
13
|
-
* - Normalize special Unicode spaces to regular space
|
|
14
|
-
*/
|
|
15
|
-
export declare function normalizeForFuzzyMatch(text: string): string;
|
|
16
|
-
export interface FuzzyMatchResult {
|
|
17
|
-
/** Whether a match was found */
|
|
18
|
-
found: boolean;
|
|
19
|
-
/** The index where match starts (in the content that should be used for replacement) */
|
|
20
|
-
index: number;
|
|
21
|
-
/** Length of matched text */
|
|
22
|
-
matchLength: number;
|
|
23
|
-
/** Whether fuzzy matching was used (false = exact match) */
|
|
24
|
-
usedFuzzyMatch: boolean;
|
|
25
|
-
/**
|
|
26
|
-
* The content to use for replacement operations.
|
|
27
|
-
* When exact match: original content. When fuzzy match: normalized content.
|
|
28
|
-
*/
|
|
29
|
-
contentForReplacement: string;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Find oldText in content, trying exact match first, then fuzzy match.
|
|
33
|
-
* When fuzzy matching is used, the returned contentForReplacement is the
|
|
34
|
-
* fuzzy-normalized version of content (trailing whitespace stripped,
|
|
35
|
-
* Unicode quotes/dashes normalized to ASCII).
|
|
36
|
-
*/
|
|
37
|
-
export declare function fuzzyFindText(content: string, oldText: string): FuzzyMatchResult;
|
|
38
|
-
/** Strip UTF-8 BOM if present, return both BOM (if any) and text without it */
|
|
39
|
-
export declare function stripBom(content: string): {
|
|
40
|
-
bom: string;
|
|
41
|
-
text: string;
|
|
42
|
-
};
|
|
43
|
-
/**
|
|
44
|
-
* Simple line-by-line diff without using external diff library.
|
|
45
|
-
* Returns both diff string and first changed line number (in the new file).
|
|
46
|
-
*/
|
|
47
|
-
export declare function generateDiffString(oldContent: string, newContent: string, contextLines?: number): {
|
|
48
|
-
diff: string;
|
|
49
|
-
firstChangedLine: number | undefined;
|
|
50
|
-
};
|
|
51
|
-
export interface EditDiffResult {
|
|
52
|
-
diff: string;
|
|
53
|
-
firstChangedLine: number | undefined;
|
|
54
|
-
}
|
|
55
|
-
export interface EditDiffError {
|
|
56
|
-
error: string;
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Compute the diff for an edit operation without applying it.
|
|
60
|
-
* Used for preview rendering in TUI before tool executes.
|
|
61
|
-
*/
|
|
62
|
-
export declare function computeEditDiff(path: string, oldText: string, newText: string, cwd: string): Promise<EditDiffResult | EditDiffError>;
|
|
63
|
-
//# sourceMappingURL=edit-diff.d.ts.map
|