indusagi 0.13.5 → 0.13.7
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/LICENSE +661 -0
- package/README.md +7 -1
- package/dist/cli.js +114 -23
- package/package.json +56 -45
- package/dist/agent.js +0 -28713
- package/dist/ai.js +0 -19964
- package/dist/capabilities.js +0 -2730
- package/dist/connectors-saas.js +0 -3355
- package/dist/index.js +0 -16644
- package/dist/interop.js +0 -3247
- package/dist/knowledge/guides/authoring-an-agent.md +0 -53
- package/dist/knowledge/guides/choosing-tools.md +0 -49
- package/dist/knowledge/guides/model-selection.md +0 -51
- package/dist/knowledge/guides/writing-system-prompts.md +0 -53
- package/dist/knowledge/index.ts +0 -19
- package/dist/knowledge/loader.ts +0 -200
- package/dist/knowledge/manifest.json +0 -29
- package/dist/llmgateway.js +0 -3243
- package/dist/mcp.js +0 -1639
- package/dist/memory.js +0 -0
- package/dist/react-host/index.js +0 -101
- package/dist/react-host/ink.js +0 -97
- package/dist/react-host/jsx-runtime.js +0 -95
- package/dist/react-ink.js +0 -3834
- package/dist/runtime.js +0 -4421
- package/dist/shell-app.js +0 -12333
- package/dist/smithy.js +0 -8033
- package/dist/swarm.js +0 -8818
- package/dist/tracing.js +0 -724
- package/dist/tui.js +0 -2213
- package/dist/types/capabilities/backends/index.d.ts +0 -10
- package/dist/types/capabilities/backends/node-backends.d.ts +0 -30
- package/dist/types/capabilities/capabilities.test.d.ts +0 -14
- package/dist/types/capabilities/files/diff.d.ts +0 -49
- package/dist/types/capabilities/files/edit.d.ts +0 -21
- package/dist/types/capabilities/files/ls.d.ts +0 -16
- package/dist/types/capabilities/files/read-state-gate.d.ts +0 -69
- package/dist/types/capabilities/files/read-state-gate.test.d.ts +0 -14
- package/dist/types/capabilities/files/read.d.ts +0 -15
- package/dist/types/capabilities/files/write.d.ts +0 -16
- package/dist/types/capabilities/index.d.ts +0 -29
- package/dist/types/capabilities/kernel/backends.d.ts +0 -119
- package/dist/types/capabilities/kernel/context.d.ts +0 -52
- package/dist/types/capabilities/kernel/index.d.ts +0 -24
- package/dist/types/capabilities/kernel/output.d.ts +0 -40
- package/dist/types/capabilities/kernel/registry.d.ts +0 -61
- package/dist/types/capabilities/kernel/spec.d.ts +0 -168
- package/dist/types/capabilities/planning/todo.d.ts +0 -62
- package/dist/types/capabilities/registry.d.ts +0 -44
- package/dist/types/capabilities/search/find.d.ts +0 -33
- package/dist/types/capabilities/search/grep.d.ts +0 -30
- package/dist/types/capabilities/shell/bash.d.ts +0 -18
- package/dist/types/capabilities/shell/process.d.ts +0 -33
- package/dist/types/capabilities/web/webfetch.d.ts +0 -25
- package/dist/types/capabilities/web/websearch.d.ts +0 -23
- package/dist/types/connectors-saas/connectors-saas.test.d.ts +0 -12
- package/dist/types/connectors-saas/index.d.ts +0 -16
- package/dist/types/connectors-saas/saas/adapter/composio-backend.d.ts +0 -60
- package/dist/types/connectors-saas/saas/control/connect.d.ts +0 -114
- package/dist/types/connectors-saas/saas/control/tools.d.ts +0 -67
- package/dist/types/connectors-saas/saas/core/builder.d.ts +0 -86
- package/dist/types/connectors-saas/saas/core/cache.d.ts +0 -53
- package/dist/types/connectors-saas/saas/core/index.d.ts +0 -14
- package/dist/types/connectors-saas/saas/core/port.d.ts +0 -157
- package/dist/types/connectors-saas/saas/core/scope-planner.d.ts +0 -74
- package/dist/types/connectors-saas/saas/gateway.d.ts +0 -133
- package/dist/types/connectors-saas/saas/render/format.d.ts +0 -54
- package/dist/types/connectors-saas/saas/render/index.d.ts +0 -19
- package/dist/types/connectors-saas/saas/render/summarizers.d.ts +0 -58
- package/dist/types/facade/agent.d.ts +0 -1
- package/dist/types/facade/ai.d.ts +0 -1
- package/dist/types/facade/bot/actions/bash.d.ts +0 -71
- package/dist/types/facade/bot/actions/bash.test.d.ts +0 -1
- package/dist/types/facade/bot/actions/checkpoint.d.ts +0 -49
- package/dist/types/facade/bot/actions/checkpoint.test.d.ts +0 -1
- package/dist/types/facade/bot/actions/composio/accounts.d.ts +0 -22
- package/dist/types/facade/bot/actions/composio/client.d.ts +0 -39
- package/dist/types/facade/bot/actions/composio/connect.d.ts +0 -19
- package/dist/types/facade/bot/actions/composio/enable.d.ts +0 -25
- package/dist/types/facade/bot/actions/composio/execute.d.ts +0 -26
- package/dist/types/facade/bot/actions/composio/helpers.d.ts +0 -16
- package/dist/types/facade/bot/actions/composio/index.d.ts +0 -9
- package/dist/types/facade/bot/actions/composio/provider.d.ts +0 -8
- package/dist/types/facade/bot/actions/composio/toolkits.d.ts +0 -22
- package/dist/types/facade/bot/actions/composio/tools.d.ts +0 -28
- package/dist/types/facade/bot/actions/composio/types.d.ts +0 -137
- package/dist/types/facade/bot/actions/crew/activity-tracker.d.ts +0 -65
- package/dist/types/facade/bot/actions/crew/cleanup.d.ts +0 -50
- package/dist/types/facade/bot/actions/crew/fs-lock.d.ts +0 -11
- package/dist/types/facade/bot/actions/crew/index.d.ts +0 -11
- package/dist/types/facade/bot/actions/crew/mailbox.d.ts +0 -20
- package/dist/types/facade/bot/actions/crew/model-policy.d.ts +0 -22
- package/dist/types/facade/bot/actions/crew/names.d.ts +0 -27
- package/dist/types/facade/bot/actions/crew/protocol.d.ts +0 -74
- package/dist/types/facade/bot/actions/crew/task-store.d.ts +0 -88
- package/dist/types/facade/bot/actions/crew/team-attach-claim.d.ts +0 -35
- package/dist/types/facade/bot/actions/crew/team-config.d.ts +0 -54
- package/dist/types/facade/bot/actions/crew/worktree.d.ts +0 -39
- package/dist/types/facade/bot/actions/edit-diff.d.ts +0 -66
- package/dist/types/facade/bot/actions/edit-utils.d.ts +0 -86
- package/dist/types/facade/bot/actions/edit.d.ts +0 -59
- package/dist/types/facade/bot/actions/edit.test.d.ts +0 -1
- package/dist/types/facade/bot/actions/find.d.ts +0 -27
- package/dist/types/facade/bot/actions/find.test.d.ts +0 -1
- package/dist/types/facade/bot/actions/grep.d.ts +0 -53
- package/dist/types/facade/bot/actions/grep.test.d.ts +0 -1
- package/dist/types/facade/bot/actions/index.d.ts +0 -316
- package/dist/types/facade/bot/actions/kit/hook-runner.d.ts +0 -12
- package/dist/types/facade/bot/actions/kit/image-resize.d.ts +0 -19
- package/dist/types/facade/bot/actions/kit/mime.d.ts +0 -1
- package/dist/types/facade/bot/actions/kit/shell.d.ts +0 -12
- package/dist/types/facade/bot/actions/ls.d.ts +0 -41
- package/dist/types/facade/bot/actions/path-utils.d.ts +0 -8
- package/dist/types/facade/bot/actions/process-controller.d.ts +0 -14
- package/dist/types/facade/bot/actions/process-manager.d.ts +0 -59
- package/dist/types/facade/bot/actions/process-types.d.ts +0 -73
- package/dist/types/facade/bot/actions/process.d.ts +0 -37
- package/dist/types/facade/bot/actions/read-state.d.ts +0 -83
- package/dist/types/facade/bot/actions/read-state.test.d.ts +0 -1
- package/dist/types/facade/bot/actions/read.d.ts +0 -43
- package/dist/types/facade/bot/actions/read.test.d.ts +0 -1
- package/dist/types/facade/bot/actions/registry.d.ts +0 -20
- package/dist/types/facade/bot/actions/sandbox-backend.d.ts +0 -99
- package/dist/types/facade/bot/actions/sandbox-backend.test.d.ts +0 -1
- package/dist/types/facade/bot/actions/todo-store.d.ts +0 -76
- package/dist/types/facade/bot/actions/todo-types.d.ts +0 -72
- package/dist/types/facade/bot/actions/todo.d.ts +0 -76
- package/dist/types/facade/bot/actions/truncate.d.ts +0 -78
- package/dist/types/facade/bot/actions/webfetch.d.ts +0 -35
- package/dist/types/facade/bot/actions/websearch.d.ts +0 -37
- package/dist/types/facade/bot/actions/websearch.test.d.ts +0 -1
- package/dist/types/facade/bot/actions/write.d.ts +0 -45
- package/dist/types/facade/bot/agent-loop.d.ts +0 -30
- package/dist/types/facade/bot/agent-loop.test.d.ts +0 -1
- package/dist/types/facade/bot/agent.d.ts +0 -140
- package/dist/types/facade/bot/error-handler.d.ts +0 -7
- package/dist/types/facade/bot/event-bus.d.ts +0 -8
- package/dist/types/facade/bot/index.d.ts +0 -7
- package/dist/types/facade/bot/messages.d.ts +0 -83
- package/dist/types/facade/bot/permission-gate.test.d.ts +0 -1
- package/dist/types/facade/bot/proxy.d.ts +0 -70
- package/dist/types/facade/bot/session-manager.d.ts +0 -409
- package/dist/types/facade/bot/state-manager.d.ts +0 -21
- package/dist/types/facade/bot/telemetry.d.ts +0 -6
- package/dist/types/facade/bot/types.d.ts +0 -267
- package/dist/types/facade/mcp-core/client-pool.d.ts +0 -105
- package/dist/types/facade/mcp-core/client.d.ts +0 -213
- package/dist/types/facade/mcp-core/client.test.d.ts +0 -18
- package/dist/types/facade/mcp-core/config.d.ts +0 -60
- package/dist/types/facade/mcp-core/errors.d.ts +0 -103
- package/dist/types/facade/mcp-core/index.d.ts +0 -55
- package/dist/types/facade/mcp-core/schema-converter.d.ts +0 -67
- package/dist/types/facade/mcp-core/server.d.ts +0 -110
- package/dist/types/facade/mcp-core/tool-factory.d.ts +0 -62
- package/dist/types/facade/mcp-core/types.d.ts +0 -298
- package/dist/types/facade/mcp.d.ts +0 -1
- package/dist/types/facade/memory.d.ts +0 -1
- package/dist/types/facade/ml/adapters/amazon-bedrock.d.ts +0 -32
- package/dist/types/facade/ml/adapters/anthropic-retry.test.d.ts +0 -1
- package/dist/types/facade/ml/adapters/anthropic.d.ts +0 -78
- package/dist/types/facade/ml/adapters/azure-openai-responses.d.ts +0 -14
- package/dist/types/facade/ml/adapters/google-shared.d.ts +0 -99
- package/dist/types/facade/ml/adapters/google-vertex.d.ts +0 -14
- package/dist/types/facade/ml/adapters/google.d.ts +0 -15
- package/dist/types/facade/ml/adapters/kimi.d.ts +0 -21
- package/dist/types/facade/ml/adapters/mock.d.ts +0 -9
- package/dist/types/facade/ml/adapters/nvidia.d.ts +0 -12
- package/dist/types/facade/ml/adapters/openai-codex-responses.d.ts +0 -8
- package/dist/types/facade/ml/adapters/openai-completions.d.ts +0 -24
- package/dist/types/facade/ml/adapters/openai-responses-shared.d.ts +0 -25
- package/dist/types/facade/ml/adapters/openai-responses.d.ts +0 -12
- package/dist/types/facade/ml/adapters/openai-scaffold.d.ts +0 -3
- package/dist/types/facade/ml/adapters/register-builtins.d.ts +0 -2
- package/dist/types/facade/ml/adapters/simple-options.d.ts +0 -39
- package/dist/types/facade/ml/adapters/simple-options.test.d.ts +0 -1
- package/dist/types/facade/ml/adapters/transform-messages.d.ts +0 -23
- package/dist/types/facade/ml/api-registry.d.ts +0 -49
- package/dist/types/facade/ml/cli.d.ts +0 -2
- package/dist/types/facade/ml/env-api-keys.d.ts +0 -19
- package/dist/types/facade/ml/index.d.ts +0 -27
- package/dist/types/facade/ml/kit/auth/anthropic.d.ts +0 -17
- package/dist/types/facade/ml/kit/auth/github-copilot.d.ts +0 -22
- package/dist/types/facade/ml/kit/auth/index.d.ts +0 -50
- package/dist/types/facade/ml/kit/auth/kimi.d.ts +0 -23
- package/dist/types/facade/ml/kit/auth/oauth-page.d.ts +0 -2
- package/dist/types/facade/ml/kit/auth/openai-codex.d.ts +0 -36
- package/dist/types/facade/ml/kit/auth/pkce.d.ts +0 -12
- package/dist/types/facade/ml/kit/auth/types.d.ts +0 -67
- package/dist/types/facade/ml/kit/base-stream-handler.d.ts +0 -30
- package/dist/types/facade/ml/kit/event-stream.d.ts +0 -63
- package/dist/types/facade/ml/kit/index.d.ts +0 -14
- package/dist/types/facade/ml/kit/json-parse.d.ts +0 -23
- package/dist/types/facade/ml/kit/message-transform.d.ts +0 -32
- package/dist/types/facade/ml/kit/output-factory.d.ts +0 -8
- package/dist/types/facade/ml/kit/overflow.d.ts +0 -9
- package/dist/types/facade/ml/kit/provider-adapter.d.ts +0 -56
- package/dist/types/facade/ml/kit/provider-client-builder.d.ts +0 -36
- package/dist/types/facade/ml/kit/provider-consolidation.d.ts +0 -3
- package/dist/types/facade/ml/kit/provider-constants.d.ts +0 -34
- package/dist/types/facade/ml/kit/provider-errors.d.ts +0 -52
- package/dist/types/facade/ml/kit/sanitize-unicode.d.ts +0 -2
- package/dist/types/facade/ml/kit/stream-event-helper.d.ts +0 -38
- package/dist/types/facade/ml/kit/stream-handler-types.d.ts +0 -46
- package/dist/types/facade/ml/kit/streaming-state-manager.d.ts +0 -42
- package/dist/types/facade/ml/kit/tool-converter.d.ts +0 -49
- package/dist/types/facade/ml/kit/typebox-helpers.d.ts +0 -24
- package/dist/types/facade/ml/kit/validation.d.ts +0 -26
- package/dist/types/facade/ml/models.d.ts +0 -41
- package/dist/types/facade/ml/models.generated.d.ts +0 -12405
- package/dist/types/facade/ml/stream.d.ts +0 -27
- package/dist/types/facade/ml/types.d.ts +0 -269
- package/dist/types/index.d.ts +0 -16
- package/dist/types/interop/index.d.ts +0 -12
- package/dist/types/interop/interop.test.d.ts +0 -19
- package/dist/types/interop/protocol-bridge/bridge.d.ts +0 -52
- package/dist/types/interop/protocol-bridge/contract.d.ts +0 -249
- package/dist/types/interop/protocol-bridge/endpoint.d.ts +0 -124
- package/dist/types/interop/protocol-bridge/fleet.d.ts +0 -92
- package/dist/types/interop/protocol-bridge/host.d.ts +0 -61
- package/dist/types/interop/protocol-bridge/index.d.ts +0 -16
- package/dist/types/interop/protocol-bridge/schema.d.ts +0 -29
- package/dist/types/llmgateway/catalog/cards.d.ts +0 -18
- package/dist/types/llmgateway/catalog/cost.d.ts +0 -15
- package/dist/types/llmgateway/catalog/index.d.ts +0 -7
- package/dist/types/llmgateway/catalog/query.d.ts +0 -40
- package/dist/types/llmgateway/connectors/anthropic.d.ts +0 -35
- package/dist/types/llmgateway/connectors/azure-openai.d.ts +0 -33
- package/dist/types/llmgateway/connectors/bedrock.d.ts +0 -113
- package/dist/types/llmgateway/connectors/google-vertex.d.ts +0 -38
- package/dist/types/llmgateway/connectors/google.d.ts +0 -40
- package/dist/types/llmgateway/connectors/index.d.ts +0 -26
- package/dist/types/llmgateway/connectors/kimi.d.ts +0 -28
- package/dist/types/llmgateway/connectors/mock.d.ts +0 -37
- package/dist/types/llmgateway/connectors/nvidia.d.ts +0 -27
- package/dist/types/llmgateway/connectors/ollama.d.ts +0 -45
- package/dist/types/llmgateway/connectors/openai-chat.d.ts +0 -25
- package/dist/types/llmgateway/connectors/openai-responses.d.ts +0 -49
- package/dist/types/llmgateway/contract/connector.d.ts +0 -32
- package/dist/types/llmgateway/contract/conversation.d.ts +0 -86
- package/dist/types/llmgateway/contract/emission.d.ts +0 -55
- package/dist/types/llmgateway/contract/errors.d.ts +0 -27
- package/dist/types/llmgateway/contract/index.d.ts +0 -13
- package/dist/types/llmgateway/contract/model-card.d.ts +0 -42
- package/dist/types/llmgateway/contract/options.d.ts +0 -31
- package/dist/types/llmgateway/contract/reply.d.ts +0 -33
- package/dist/types/llmgateway/conversion/index.d.ts +0 -10
- package/dist/types/llmgateway/conversion/mappers.d.ts +0 -65
- package/dist/types/llmgateway/conversion/openai-compatible.d.ts +0 -46
- package/dist/types/llmgateway/conversion/reduce.d.ts +0 -20
- package/dist/types/llmgateway/credentials/oauth.d.ts +0 -73
- package/dist/types/llmgateway/credentials/pkce.d.ts +0 -52
- package/dist/types/llmgateway/credentials/secrets.d.ts +0 -74
- package/dist/types/llmgateway/gateway.d.ts +0 -34
- package/dist/types/llmgateway/gateway.test.d.ts +0 -14
- package/dist/types/llmgateway/index.d.ts +0 -11
- package/dist/types/llmgateway/streaming/channel.d.ts +0 -24
- package/dist/types/llmgateway/streaming/index.d.ts +0 -10
- package/dist/types/llmgateway/streaming/ndjson.d.ts +0 -17
- package/dist/types/llmgateway/streaming/sse.d.ts +0 -31
- package/dist/types/react-host/index.d.ts +0 -9
- package/dist/types/react-host/ink.d.ts +0 -5
- package/dist/types/react-host/jsx-runtime.d.ts +0 -4
- package/dist/types/react-host/loader.d.ts +0 -3
- package/dist/types/react-ink/components/ChangelogBlock.d.ts +0 -8
- package/dist/types/react-ink/components/DisplayBlockView.d.ts +0 -8
- package/dist/types/react-ink/components/Footer.d.ts +0 -11
- package/dist/types/react-ink/components/MessageList.d.ts +0 -14
- package/dist/types/react-ink/components/MessageRow.d.ts +0 -13
- package/dist/types/react-ink/components/StatusLine.d.ts +0 -18
- package/dist/types/react-ink/components/TaskPanel.d.ts +0 -11
- package/dist/types/react-ink/components/ToolEventBlock.d.ts +0 -48
- package/dist/types/react-ink/components/ToolEventBlock.test.d.ts +0 -1
- package/dist/types/react-ink/components/dialogs/DialogFrame.d.ts +0 -8
- package/dist/types/react-ink/components/dialogs/LoginDialog.d.ts +0 -14
- package/dist/types/react-ink/components/dialogs/ModelDialog.d.ts +0 -9
- package/dist/types/react-ink/components/dialogs/OAuthDialog.d.ts +0 -9
- package/dist/types/react-ink/components/dialogs/ScopedModelsDialog.d.ts +0 -9
- package/dist/types/react-ink/components/dialogs/SelectableDialog.d.ts +0 -22
- package/dist/types/react-ink/components/dialogs/SessionDialog.d.ts +0 -13
- package/dist/types/react-ink/components/dialogs/SettingsDialog.d.ts +0 -14
- package/dist/types/react-ink/components/dialogs/StartupSessionPicker.d.ts +0 -9
- package/dist/types/react-ink/components/dialogs/ThemeDialog.d.ts +0 -26
- package/dist/types/react-ink/components/dialogs/TreeDialog.d.ts +0 -8
- package/dist/types/react-ink/components/dialogs/UserMessageDialog.d.ts +0 -8
- package/dist/types/react-ink/components/messages/AssistantMessage.d.ts +0 -12
- package/dist/types/react-ink/components/messages/BashMessage.d.ts +0 -8
- package/dist/types/react-ink/components/messages/BranchSummaryMessage.d.ts +0 -8
- package/dist/types/react-ink/components/messages/CompactionMessage.d.ts +0 -8
- package/dist/types/react-ink/components/messages/CustomMessage.d.ts +0 -9
- package/dist/types/react-ink/components/messages/SkillInvocationMessage.d.ts +0 -7
- package/dist/types/react-ink/components/messages/ToolCallMessage.d.ts +0 -8
- package/dist/types/react-ink/components/messages/ToolResultBlock.d.ts +0 -12
- package/dist/types/react-ink/components/messages/UserMessage.d.ts +0 -9
- package/dist/types/react-ink/diff/Diff.d.ts +0 -22
- package/dist/types/react-ink/diff/diff.test.d.ts +0 -1
- package/dist/types/react-ink/diff/structured.d.ts +0 -41
- package/dist/types/react-ink/diff/word-diff.d.ts +0 -27
- package/dist/types/react-ink/index.d.ts +0 -42
- package/dist/types/react-ink/markdown/Markdown.d.ts +0 -23
- package/dist/types/react-ink/markdown/MarkdownTable.d.ts +0 -19
- package/dist/types/react-ink/markdown/StreamingMarkdown.d.ts +0 -34
- package/dist/types/react-ink/markdown/format-token.d.ts +0 -39
- package/dist/types/react-ink/markdown/highlight.d.ts +0 -31
- package/dist/types/react-ink/theme-adapter.d.ts +0 -66
- package/dist/types/react-ink/types.d.ts +0 -133
- package/dist/types/react-ink/utils/message-groups.d.ts +0 -25
- package/dist/types/react-ink/utils/selection-dialog.d.ts +0 -2
- package/dist/types/react-ink/utils/session-browser.d.ts +0 -27
- package/dist/types/react-ink/utils/tool-display.d.ts +0 -37
- package/dist/types/runtime/cadence/cadence.test.d.ts +0 -6
- package/dist/types/runtime/cadence/fold.d.ts +0 -48
- package/dist/types/runtime/cadence/index.d.ts +0 -12
- package/dist/types/runtime/cadence/reducer.d.ts +0 -44
- package/dist/types/runtime/conductor/agent.d.ts +0 -71
- package/dist/types/runtime/conductor/index.d.ts +0 -11
- package/dist/types/runtime/contract/config.d.ts +0 -44
- package/dist/types/runtime/contract/effect.d.ts +0 -41
- package/dist/types/runtime/contract/errors.d.ts +0 -22
- package/dist/types/runtime/contract/events.d.ts +0 -63
- package/dist/types/runtime/contract/index.d.ts +0 -18
- package/dist/types/runtime/contract/run-state.d.ts +0 -57
- package/dist/types/runtime/contract/session.d.ts +0 -42
- package/dist/types/runtime/contract/signal.d.ts +0 -49
- package/dist/types/runtime/contract/tools.d.ts +0 -45
- package/dist/types/runtime/dispatch/index.d.ts +0 -9
- package/dist/types/runtime/dispatch/scheduler.d.ts +0 -53
- package/dist/types/runtime/index.d.ts +0 -22
- package/dist/types/runtime/ledger/accumulator.d.ts +0 -44
- package/dist/types/runtime/ledger/bus.d.ts +0 -50
- package/dist/types/runtime/ledger/index.d.ts +0 -11
- package/dist/types/runtime/memory/compactor.d.ts +0 -56
- package/dist/types/runtime/memory/estimate.d.ts +0 -21
- package/dist/types/runtime/memory/index.d.ts +0 -8
- package/dist/types/runtime/runtime.test.d.ts +0 -15
- package/dist/types/runtime/store/dag.d.ts +0 -72
- package/dist/types/runtime/store/hash.d.ts +0 -18
- package/dist/types/runtime/store/index.d.ts +0 -12
- package/dist/types/runtime/store/persist.d.ts +0 -49
- package/dist/types/runtime/turn/driver.d.ts +0 -32
- package/dist/types/runtime/turn/index.d.ts +0 -8
- package/dist/types/runtime/wire/index.d.ts +0 -10
- package/dist/types/runtime/wire/projectors.d.ts +0 -53
- package/dist/types/shell-app/auth-cli/index.d.ts +0 -9
- package/dist/types/shell-app/auth-cli/oauth-cli.d.ts +0 -73
- package/dist/types/shell-app/boot/context.d.ts +0 -108
- package/dist/types/shell-app/boot/index.d.ts +0 -13
- package/dist/types/shell-app/boot/pipeline.d.ts +0 -66
- package/dist/types/shell-app/boot/stages.d.ts +0 -77
- package/dist/types/shell-app/cli.d.ts +0 -75
- package/dist/types/shell-app/config/index.d.ts +0 -11
- package/dist/types/shell-app/config/locator.d.ts +0 -85
- package/dist/types/shell-app/config/settings.d.ts +0 -91
- package/dist/types/shell-app/index.d.ts +0 -26
- package/dist/types/shell-app/invocation/flags.d.ts +0 -89
- package/dist/types/shell-app/invocation/parse.d.ts +0 -89
- package/dist/types/shell-app/locate/brand.d.ts +0 -71
- package/dist/types/shell-app/locate/index.d.ts +0 -12
- package/dist/types/shell-app/locate/locator.d.ts +0 -122
- package/dist/types/shell-app/runners/contract.d.ts +0 -116
- package/dist/types/shell-app/runners/index.d.ts +0 -15
- package/dist/types/shell-app/runners/one-shot.d.ts +0 -21
- package/dist/types/shell-app/runners/registry.d.ts +0 -34
- package/dist/types/shell-app/runners/repl.d.ts +0 -51
- package/dist/types/shell-app/runners/wire.d.ts +0 -34
- package/dist/types/shell-app/shell-app.test.d.ts +0 -14
- package/dist/types/shell-app/upgrade/index.d.ts +0 -9
- package/dist/types/shell-app/upgrade/upgrades.d.ts +0 -62
- package/dist/types/smithy/config/flag-reader.d.ts +0 -128
- package/dist/types/smithy/config/index.d.ts +0 -9
- package/dist/types/smithy/forge.d.ts +0 -135
- package/dist/types/smithy/index.d.ts +0 -36
- package/dist/types/smithy/knowledge/index.d.ts +0 -10
- package/dist/types/smithy/knowledge/loader.d.ts +0 -64
- package/dist/types/smithy/persona/blueprint.d.ts +0 -75
- package/dist/types/smithy/persona/define-agent.d.ts +0 -51
- package/dist/types/smithy/persona/index.d.ts +0 -14
- package/dist/types/smithy/persona/profiles.d.ts +0 -44
- package/dist/types/smithy/runtime/index.d.ts +0 -9
- package/dist/types/smithy/runtime/tool-ledger.d.ts +0 -130
- package/dist/types/smithy/smithy.test.d.ts +0 -20
- package/dist/types/smithy/ui/index.d.ts +0 -11
- package/dist/types/smithy/ui/transcript.d.ts +0 -183
- package/dist/types/swarm/coordinator.d.ts +0 -192
- package/dist/types/swarm/index.d.ts +0 -33
- package/dist/types/swarm/isolation/index.d.ts +0 -14
- package/dist/types/swarm/isolation/runner.d.ts +0 -61
- package/dist/types/swarm/isolation/worktree.d.ts +0 -142
- package/dist/types/swarm/kernel/faults.d.ts +0 -52
- package/dist/types/swarm/kernel/ids.d.ts +0 -25
- package/dist/types/swarm/kernel/index.d.ts +0 -26
- package/dist/types/swarm/kernel/json-cell.d.ts +0 -113
- package/dist/types/swarm/kernel/jsonl-log.d.ts +0 -81
- package/dist/types/swarm/postbox/channel.d.ts +0 -88
- package/dist/types/swarm/postbox/codecs.d.ts +0 -253
- package/dist/types/swarm/postbox/index.d.ts +0 -16
- package/dist/types/swarm/roster/index.d.ts +0 -16
- package/dist/types/swarm/roster/manifest.d.ts +0 -185
- package/dist/types/swarm/swarm.test.d.ts +0 -24
- package/dist/types/swarm/telemetry/activity.d.ts +0 -143
- package/dist/types/swarm/workboard/board.d.ts +0 -174
- package/dist/types/swarm/workboard/dep-graph.d.ts +0 -77
- package/dist/types/swarm/workboard/index.d.ts +0 -12
- package/dist/types/tracing/adapter/index.d.ts +0 -12
- package/dist/types/tracing/adapter/runtime-trace.d.ts +0 -54
- package/dist/types/tracing/channel/index.d.ts +0 -9
- package/dist/types/tracing/channel/signal.d.ts +0 -93
- package/dist/types/tracing/index.d.ts +0 -25
- package/dist/types/tracing/recorder/index.d.ts +0 -12
- package/dist/types/tracing/recorder/recorder.d.ts +0 -75
- package/dist/types/tracing/recorder/sampling.d.ts +0 -55
- package/dist/types/tracing/redaction/index.d.ts +0 -8
- package/dist/types/tracing/redaction/secret-scrubber.d.ts +0 -95
- package/dist/types/tracing/registry/hub.d.ts +0 -57
- package/dist/types/tracing/registry/index.d.ts +0 -7
- package/dist/types/tracing/signal/handle.d.ts +0 -73
- package/dist/types/tracing/signal/index.d.ts +0 -12
- package/dist/types/tracing/signal/segment.d.ts +0 -124
- package/dist/types/tracing/sinks/base.d.ts +0 -51
- package/dist/types/tracing/sinks/console.d.ts +0 -44
- package/dist/types/tracing/sinks/file.d.ts +0 -47
- package/dist/types/tracing/sinks/index.d.ts +0 -16
- package/dist/types/tracing/sinks/stream.d.ts +0 -46
- package/dist/types/tracing/tracing.test.d.ts +0 -7
- package/dist/types/ui/autocomplete.d.ts +0 -59
- package/dist/types/ui/contracts.d.ts +0 -38
- package/dist/types/ui/editor-component.d.ts +0 -100
- package/dist/types/ui/fuzzy.d.ts +0 -29
- package/dist/types/ui/index.d.ts +0 -8
- package/dist/types/ui/keybindings.d.ts +0 -62
- package/dist/types/ui/keys.d.ts +0 -171
- package/dist/types/ui/theme-types.d.ts +0 -36
- package/dist/types/ui/utils.d.ts +0 -101
- package/dist/types/ui-bridge/InteractiveApp.d.ts +0 -38
- package/dist/types/ui-bridge/adapter.d.ts +0 -90
- package/dist/types/ui-bridge/index.d.ts +0 -37
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { type WorktreeCleanupResult } from "./worktree.js";
|
|
2
|
-
export type CleanupResult = {
|
|
3
|
-
teamDir: string;
|
|
4
|
-
worktreeResult: WorktreeCleanupResult;
|
|
5
|
-
warnings: string[];
|
|
6
|
-
};
|
|
7
|
-
export declare function assertTeamDirWithinTeamsRoot(teamsRootDir: string, teamDir: string): {
|
|
8
|
-
teamsRootAbs: string;
|
|
9
|
-
teamDirAbs: string;
|
|
10
|
-
};
|
|
11
|
-
/**
|
|
12
|
-
* Recursively delete the given teamDir, including proper git worktree + branch removal.
|
|
13
|
-
*
|
|
14
|
-
* Steps:
|
|
15
|
-
* 1. Remove git worktrees and branches via `cleanupWorktrees`
|
|
16
|
-
* 2. Delete the team directory recursively
|
|
17
|
-
*
|
|
18
|
-
* Idempotent — safe to call multiple times.
|
|
19
|
-
*/
|
|
20
|
-
export declare function cleanupTeamDir(teamsRootDir: string, teamDir: string, opts?: {
|
|
21
|
-
teamId?: string;
|
|
22
|
-
repoCwd?: string;
|
|
23
|
-
}): Promise<CleanupResult>;
|
|
24
|
-
/**
|
|
25
|
-
* Garbage-collect stale team directories that have no active workers and are older
|
|
26
|
-
* than the given threshold.
|
|
27
|
-
*
|
|
28
|
-
* A team directory is considered stale when:
|
|
29
|
-
* - Its config.json `createdAt` (or directory mtime) is older than `maxAgeMs`
|
|
30
|
-
* - It has no in_progress tasks
|
|
31
|
-
* - It has no online members
|
|
32
|
-
*
|
|
33
|
-
* Returns a summary of what was cleaned up.
|
|
34
|
-
*/
|
|
35
|
-
export declare function gcStaleTeamDirs(opts: {
|
|
36
|
-
teamsRootDir: string;
|
|
37
|
-
maxAgeMs: number;
|
|
38
|
-
repoCwd?: string;
|
|
39
|
-
dryRun?: boolean;
|
|
40
|
-
/** Team IDs to skip (e.g. the current session's team). */
|
|
41
|
-
excludeTeamIds?: ReadonlySet<string>;
|
|
42
|
-
}): Promise<{
|
|
43
|
-
scanned: number;
|
|
44
|
-
removed: string[];
|
|
45
|
-
skipped: Array<{
|
|
46
|
-
teamId: string;
|
|
47
|
-
reason: string;
|
|
48
|
-
}>;
|
|
49
|
-
warnings: string[];
|
|
50
|
-
}>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export interface LockOptions {
|
|
2
|
-
/** How long to wait to acquire the lock before failing. */
|
|
3
|
-
timeoutMs?: number;
|
|
4
|
-
/** If lock file is older than this, consider it stale and remove it. */
|
|
5
|
-
staleMs?: number;
|
|
6
|
-
/** Poll interval while waiting for lock. */
|
|
7
|
-
pollMs?: number;
|
|
8
|
-
/** Optional label to help debugging (written into lock file). */
|
|
9
|
-
label?: string;
|
|
10
|
-
}
|
|
11
|
-
export declare function withLock<T>(lockFilePath: string, fn: () => Promise<T>, opts?: LockOptions): Promise<T>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export * from "./activity-tracker.js";
|
|
2
|
-
export * from "./cleanup.js";
|
|
3
|
-
export * from "./fs-lock.js";
|
|
4
|
-
export * from "./mailbox.js";
|
|
5
|
-
export * from "./model-policy.js";
|
|
6
|
-
export * from "./names.js";
|
|
7
|
-
export * from "./protocol.js";
|
|
8
|
-
export * from "./task-store.js";
|
|
9
|
-
export * from "./team-attach-claim.js";
|
|
10
|
-
export * from "./team-config.js";
|
|
11
|
-
export * from "./worktree.js";
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export interface MailboxMessage {
|
|
2
|
-
from: string;
|
|
3
|
-
text: string;
|
|
4
|
-
timestamp: string;
|
|
5
|
-
read: boolean;
|
|
6
|
-
color?: string;
|
|
7
|
-
/** When true, the recipient should deliver this message as a steering interrupt
|
|
8
|
-
* even if the agent is mid-turn, rather than queueing for the next idle window. */
|
|
9
|
-
urgent?: boolean;
|
|
10
|
-
}
|
|
11
|
-
export declare function getInboxPath(teamDir: string, namespace: string, agentName: string): string;
|
|
12
|
-
/** Append a message to an agent's inbox. */
|
|
13
|
-
export declare function writeToMailbox(teamDir: string, namespace: string, recipient: string, msg: Omit<MailboxMessage, "read"> & {
|
|
14
|
-
read?: boolean;
|
|
15
|
-
}): Promise<void>;
|
|
16
|
-
/**
|
|
17
|
-
* Read unread messages and mark them as read in a single locked transaction.
|
|
18
|
-
* This is the worker/leader poll primitive.
|
|
19
|
-
*/
|
|
20
|
-
export declare function popUnreadMessages(teamDir: string, namespace: string, agentName: string): Promise<MailboxMessage[]>;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export declare function isDeprecatedTeammateModelId(modelId: string): boolean;
|
|
2
|
-
export type TeammateModelSource = "override" | "inherit_leader" | "default";
|
|
3
|
-
export interface ResolvedTeammateModel {
|
|
4
|
-
source: TeammateModelSource;
|
|
5
|
-
provider?: string;
|
|
6
|
-
modelId?: string;
|
|
7
|
-
warnings: string[];
|
|
8
|
-
}
|
|
9
|
-
export type ResolveTeammateModelResult = {
|
|
10
|
-
ok: true;
|
|
11
|
-
value: ResolvedTeammateModel;
|
|
12
|
-
} | {
|
|
13
|
-
ok: false;
|
|
14
|
-
error: string;
|
|
15
|
-
reason: "invalid_override" | "deprecated_override";
|
|
16
|
-
};
|
|
17
|
-
export declare function formatProviderModel(provider: string | undefined, modelId: string | undefined): string | null;
|
|
18
|
-
export declare function resolveTeammateModelSelection(input: {
|
|
19
|
-
modelOverride?: string;
|
|
20
|
-
leaderProvider?: string;
|
|
21
|
-
leaderModelId?: string;
|
|
22
|
-
}): ResolveTeammateModelResult;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared name sanitization.
|
|
3
|
-
*
|
|
4
|
-
* Must be stable across leader/worker/mailbox so file paths and mailbox ids match.
|
|
5
|
-
*/
|
|
6
|
-
export declare function sanitizeName(name: string): string;
|
|
7
|
-
/** Pool of person names for auto-generated comrades (soviet style). */
|
|
8
|
-
export declare const COMRADE_NAME_POOL: readonly string[];
|
|
9
|
-
/** Pool of pirate-ish names for auto-generated mateys (pirate style). */
|
|
10
|
-
export declare const PIRATE_NAME_POOL: readonly string[];
|
|
11
|
-
/**
|
|
12
|
-
* Pick `count` names from the pool that aren't already taken.
|
|
13
|
-
* Falls back to `<name>-2`, `<name>-3` etc. if pool is exhausted.
|
|
14
|
-
*/
|
|
15
|
-
export declare function pickNamesFromPool(opts: {
|
|
16
|
-
pool: readonly string[];
|
|
17
|
-
count: number;
|
|
18
|
-
taken: ReadonlySet<string>;
|
|
19
|
-
fallbackBase: string;
|
|
20
|
-
}): string[];
|
|
21
|
-
export declare function pickComradeNames(count: number, taken: ReadonlySet<string>): string[];
|
|
22
|
-
export declare function pickPirateNames(count: number, taken: ReadonlySet<string>): string[];
|
|
23
|
-
/**
|
|
24
|
-
* Deterministic default names for normal style.
|
|
25
|
-
* Produces agent1, agent2, ... skipping taken.
|
|
26
|
-
*/
|
|
27
|
-
export declare function pickAgentNames(count: number, taken: ReadonlySet<string>): string[];
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import type { TeamTask } from "./task-store.js";
|
|
2
|
-
export declare const TEAM_MAILBOX_NS = "team";
|
|
3
|
-
export declare function taskAssignmentPayload(task: TeamTask, assignedBy: string): {
|
|
4
|
-
type: "task_assignment";
|
|
5
|
-
taskId: string;
|
|
6
|
-
subject: string;
|
|
7
|
-
description: string;
|
|
8
|
-
assignedBy: string;
|
|
9
|
-
timestamp: string;
|
|
10
|
-
};
|
|
11
|
-
export declare function isIdleNotification(text: string): {
|
|
12
|
-
from: string;
|
|
13
|
-
timestamp?: string;
|
|
14
|
-
completedTaskId?: string;
|
|
15
|
-
completedStatus?: string;
|
|
16
|
-
failureReason?: string;
|
|
17
|
-
} | null;
|
|
18
|
-
export declare function isShutdownApproved(text: string): {
|
|
19
|
-
from: string;
|
|
20
|
-
requestId: string;
|
|
21
|
-
timestamp?: string;
|
|
22
|
-
} | null;
|
|
23
|
-
export declare function isShutdownRejected(text: string): {
|
|
24
|
-
from: string;
|
|
25
|
-
requestId: string;
|
|
26
|
-
reason: string;
|
|
27
|
-
timestamp?: string;
|
|
28
|
-
} | null;
|
|
29
|
-
export declare function isPlanApprovalRequest(text: string): {
|
|
30
|
-
requestId: string;
|
|
31
|
-
from: string;
|
|
32
|
-
plan: string;
|
|
33
|
-
taskId?: string;
|
|
34
|
-
timestamp?: string;
|
|
35
|
-
} | null;
|
|
36
|
-
export declare function isPeerDmSent(text: string): {
|
|
37
|
-
from: string;
|
|
38
|
-
to: string;
|
|
39
|
-
summary: string;
|
|
40
|
-
timestamp?: string;
|
|
41
|
-
} | null;
|
|
42
|
-
export declare function isTaskAssignmentMessage(text: string): {
|
|
43
|
-
taskId: string;
|
|
44
|
-
subject?: string;
|
|
45
|
-
description?: string;
|
|
46
|
-
assignedBy?: string;
|
|
47
|
-
} | null;
|
|
48
|
-
export declare function isShutdownRequestMessage(text: string): {
|
|
49
|
-
requestId: string;
|
|
50
|
-
from?: string;
|
|
51
|
-
reason?: string;
|
|
52
|
-
timestamp?: string;
|
|
53
|
-
} | null;
|
|
54
|
-
export declare function isSetSessionNameMessage(text: string): {
|
|
55
|
-
name: string;
|
|
56
|
-
} | null;
|
|
57
|
-
export declare function isAbortRequestMessage(text: string): {
|
|
58
|
-
requestId: string;
|
|
59
|
-
from?: string;
|
|
60
|
-
taskId?: string;
|
|
61
|
-
reason?: string;
|
|
62
|
-
timestamp?: string;
|
|
63
|
-
} | null;
|
|
64
|
-
export declare function isPlanApprovedMessage(text: string): {
|
|
65
|
-
requestId: string;
|
|
66
|
-
from: string;
|
|
67
|
-
timestamp: string;
|
|
68
|
-
} | null;
|
|
69
|
-
export declare function isPlanRejectedMessage(text: string): {
|
|
70
|
-
requestId: string;
|
|
71
|
-
from: string;
|
|
72
|
-
feedback: string;
|
|
73
|
-
timestamp: string;
|
|
74
|
-
} | null;
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
export type TaskStatus = "pending" | "in_progress" | "completed";
|
|
2
|
-
export interface TeamTask {
|
|
3
|
-
id: string;
|
|
4
|
-
subject: string;
|
|
5
|
-
description: string;
|
|
6
|
-
owner?: string;
|
|
7
|
-
status: TaskStatus;
|
|
8
|
-
blocks: string[];
|
|
9
|
-
blockedBy: string[];
|
|
10
|
-
metadata?: Record<string, unknown>;
|
|
11
|
-
createdAt: string;
|
|
12
|
-
updatedAt: string;
|
|
13
|
-
}
|
|
14
|
-
export declare function getTaskListDir(teamDir: string, taskListId: string): string;
|
|
15
|
-
export declare function shortTaskId(id: string): string;
|
|
16
|
-
export declare function formatTaskLine(t: TeamTask, opts?: {
|
|
17
|
-
blocked?: boolean;
|
|
18
|
-
}): string;
|
|
19
|
-
export declare function listTasks(teamDir: string, taskListId: string): Promise<TeamTask[]>;
|
|
20
|
-
export declare function getTask(teamDir: string, taskListId: string, taskId: string): Promise<TeamTask | null>;
|
|
21
|
-
export declare function createTask(teamDir: string, taskListId: string, input: {
|
|
22
|
-
subject: string;
|
|
23
|
-
description: string;
|
|
24
|
-
owner?: string;
|
|
25
|
-
}): Promise<TeamTask>;
|
|
26
|
-
export declare function updateTask(teamDir: string, taskListId: string, taskId: string, updater: (current: TeamTask) => TeamTask): Promise<TeamTask | null>;
|
|
27
|
-
export declare function isTaskBlocked(teamDir: string, taskListId: string, task: TeamTask): Promise<boolean>;
|
|
28
|
-
export declare function agentHasActiveTask(teamDir: string, taskListId: string, agentName: string): Promise<boolean>;
|
|
29
|
-
/**
|
|
30
|
-
* Claim a specific task (owner must be empty).
|
|
31
|
-
* Returns the updated task if claim succeeded, otherwise null.
|
|
32
|
-
*/
|
|
33
|
-
export declare function claimTask(teamDir: string, taskListId: string, taskId: string, agentName: string, opts?: {
|
|
34
|
-
checkAgentBusy?: boolean;
|
|
35
|
-
}): Promise<TeamTask | null>;
|
|
36
|
-
/**
|
|
37
|
-
* Start an assigned task (owner matches), marking it in_progress.
|
|
38
|
-
*/
|
|
39
|
-
export declare function startAssignedTask(teamDir: string, taskListId: string, taskId: string, agentName: string): Promise<TeamTask | null>;
|
|
40
|
-
export declare function completeTask(teamDir: string, taskListId: string, taskId: string, agentName: string, result?: string): Promise<TeamTask | null>;
|
|
41
|
-
export declare function unassignTask(teamDir: string, taskListId: string, taskId: string, agentName: string, reason?: string, extraMetadata?: Record<string, unknown>): Promise<TeamTask | null>;
|
|
42
|
-
/** Reset all non-completed tasks owned by agent back to pending + unowned. */
|
|
43
|
-
export declare function unassignTasksForAgent(teamDir: string, taskListId: string, agentName: string, reason?: string): Promise<number>;
|
|
44
|
-
/**
|
|
45
|
-
* Find and claim the first available task:
|
|
46
|
-
* - pending
|
|
47
|
-
* - unowned
|
|
48
|
-
* - unblocked
|
|
49
|
-
*/
|
|
50
|
-
export declare function claimNextAvailableTask(teamDir: string, taskListId: string, agentName: string, opts?: {
|
|
51
|
-
checkAgentBusy?: boolean;
|
|
52
|
-
}): Promise<TeamTask | null>;
|
|
53
|
-
export type TaskDependencyOpResult = {
|
|
54
|
-
ok: true;
|
|
55
|
-
task: TeamTask;
|
|
56
|
-
dependency: TeamTask;
|
|
57
|
-
} | {
|
|
58
|
-
ok: false;
|
|
59
|
-
error: string;
|
|
60
|
-
};
|
|
61
|
-
/**
|
|
62
|
-
* Add a dependency edge: taskId is blockedBy depId (and depId blocks taskId).
|
|
63
|
-
*/
|
|
64
|
-
export declare function addTaskDependency(teamDir: string, taskListId: string, taskId: string, depId: string): Promise<TaskDependencyOpResult>;
|
|
65
|
-
/**
|
|
66
|
-
* Remove dependency edge: taskId no longer blockedBy depId (and depId no longer blocks taskId).
|
|
67
|
-
*/
|
|
68
|
-
export declare function removeTaskDependency(teamDir: string, taskListId: string, taskId: string, depId: string): Promise<TaskDependencyOpResult>;
|
|
69
|
-
export type TaskClearMode = "completed" | "all";
|
|
70
|
-
export interface ClearTasksResult {
|
|
71
|
-
mode: TaskClearMode;
|
|
72
|
-
taskListId: string;
|
|
73
|
-
taskListDir: string;
|
|
74
|
-
deletedTaskIds: string[];
|
|
75
|
-
skippedTaskIds: string[];
|
|
76
|
-
errors: Array<{
|
|
77
|
-
file: string;
|
|
78
|
-
error: string;
|
|
79
|
-
}>;
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Delete task JSON files from the task list directory.
|
|
83
|
-
*
|
|
84
|
-
* Safety properties:
|
|
85
|
-
* - Only deletes `*.json` files inside `<teamDir>/tasks/<taskListId>/`.
|
|
86
|
-
* - Refuses to operate if the resolved task list directory is not within `teamDir`.
|
|
87
|
-
*/
|
|
88
|
-
export declare function clearTasks(teamDir: string, taskListId: string, mode?: TaskClearMode): Promise<ClearTasksResult>;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
export declare const TEAM_ATTACH_CLAIM_FILE = ".attach-claim.json";
|
|
2
|
-
export declare const TEAM_ATTACH_CLAIM_STALE_MS = 30000;
|
|
3
|
-
export interface TeamAttachClaim {
|
|
4
|
-
holderSessionId: string;
|
|
5
|
-
claimedAt: string;
|
|
6
|
-
heartbeatAt: string;
|
|
7
|
-
pid: number;
|
|
8
|
-
}
|
|
9
|
-
export declare function assessAttachClaimFreshness(claim: TeamAttachClaim, nowMs?: number, staleMs?: number): {
|
|
10
|
-
isStale: boolean;
|
|
11
|
-
ageMs: number;
|
|
12
|
-
};
|
|
13
|
-
export declare function readTeamAttachClaim(teamDir: string): Promise<TeamAttachClaim | null>;
|
|
14
|
-
export type AcquireTeamAttachClaimResult = {
|
|
15
|
-
ok: true;
|
|
16
|
-
claim: TeamAttachClaim;
|
|
17
|
-
replacedClaim?: TeamAttachClaim;
|
|
18
|
-
} | {
|
|
19
|
-
ok: false;
|
|
20
|
-
reason: "claimed_by_other";
|
|
21
|
-
claim: TeamAttachClaim;
|
|
22
|
-
};
|
|
23
|
-
export declare function acquireTeamAttachClaim(teamDir: string, holderSessionId: string, opts?: {
|
|
24
|
-
force?: boolean;
|
|
25
|
-
staleMs?: number;
|
|
26
|
-
nowMs?: number;
|
|
27
|
-
}): Promise<AcquireTeamAttachClaimResult>;
|
|
28
|
-
export type TeamAttachClaimHeartbeatResult = "updated" | "not_owner" | "missing";
|
|
29
|
-
export declare function heartbeatTeamAttachClaim(teamDir: string, holderSessionId: string, opts?: {
|
|
30
|
-
nowMs?: number;
|
|
31
|
-
}): Promise<TeamAttachClaimHeartbeatResult>;
|
|
32
|
-
export type TeamAttachClaimReleaseResult = "released" | "not_owner" | "none";
|
|
33
|
-
export declare function releaseTeamAttachClaim(teamDir: string, holderSessionId: string, opts?: {
|
|
34
|
-
force?: boolean;
|
|
35
|
-
}): Promise<TeamAttachClaimReleaseResult>;
|
|
@@ -1,54 +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>;
|
|
@@ -1,39 +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>;
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Support code for the edit tool. Four concerns live here: sniffing whether a
|
|
3
|
-
* file uses LF or CRLF endings, stripping a leading byte-order mark, matching a
|
|
4
|
-
* target span tolerantly (exact first, then a normalized fallback), and emitting
|
|
5
|
-
* a line-oriented diff. The diff is computed with an LCS routine written in this
|
|
6
|
-
* file, so the module pulls in no third-party diffing dependency.
|
|
7
|
-
*/
|
|
8
|
-
export declare function detectLineEnding(content: string): "\r\n" | "\n";
|
|
9
|
-
export declare function normalizeToLF(text: string): string;
|
|
10
|
-
export declare function restoreLineEndings(text: string, ending: "\r\n" | "\n"): string;
|
|
11
|
-
/**
|
|
12
|
-
* Reduce text to a single canonical shape so inputs that differ only cosmetically
|
|
13
|
-
* compare as identical. Transformations run one after another: drop trailing
|
|
14
|
-
* blanks on every line, fold curly quotes to ASCII quotes, fold the dash family to
|
|
15
|
-
* "-", and fold any non-ASCII blank to an ordinary space.
|
|
16
|
-
*/
|
|
17
|
-
export declare function normalizeForFuzzyMatch(text: string): string;
|
|
18
|
-
export interface FuzzyMatchResult {
|
|
19
|
-
/** Whether the lookup turned up the requested text at all. */
|
|
20
|
-
found: boolean;
|
|
21
|
-
/** Position at which the match starts, relative to contentForReplacement. */
|
|
22
|
-
index: number;
|
|
23
|
-
/** Length, in characters, of the matched region. */
|
|
24
|
-
matchLength: number;
|
|
25
|
-
/** Set when the hit only landed after normalization rather than as a literal match. */
|
|
26
|
-
usedFuzzyMatch: boolean;
|
|
27
|
-
/**
|
|
28
|
-
* The precise string the caller is meant to edit into. For a literal hit this
|
|
29
|
-
* equals the original input; for a normalized hit it is the canonicalized
|
|
30
|
-
* form, because that is what index and matchLength are measured against.
|
|
31
|
-
*/
|
|
32
|
-
contentForReplacement: string;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Find oldText within content, trying a literal match first and only resorting
|
|
36
|
-
* to a normalized comparison when that misses. For a normalized hit,
|
|
37
|
-
* contentForReplacement carries the canonicalized text (trailing spaces gone,
|
|
38
|
-
* quotes/dashes/spaces mapped), and that is what index and matchLength index into.
|
|
39
|
-
*/
|
|
40
|
-
export declare function fuzzyFindText(content: string, oldText: string): FuzzyMatchResult;
|
|
41
|
-
/** Spot a leading UTF-8 byte-order mark and split it off from the rest of the text. */
|
|
42
|
-
export declare function stripBom(content: string): {
|
|
43
|
-
bom: string;
|
|
44
|
-
text: string;
|
|
45
|
-
};
|
|
46
|
-
/**
|
|
47
|
-
* Build a line-by-line diff backed solely by the in-house LCS routine (no diff
|
|
48
|
-
* library). Returns the formatted diff alongside the 1-based line number of the
|
|
49
|
-
* earliest change in the updated text.
|
|
50
|
-
*/
|
|
51
|
-
export declare function generateDiffString(oldContent: string, newContent: string, contextLines?: number): {
|
|
52
|
-
diff: string;
|
|
53
|
-
firstChangedLine: number | undefined;
|
|
54
|
-
};
|
|
55
|
-
export interface EditDiffResult {
|
|
56
|
-
diff: string;
|
|
57
|
-
firstChangedLine: number | undefined;
|
|
58
|
-
}
|
|
59
|
-
export interface EditDiffError {
|
|
60
|
-
error: string;
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Determine what an edit would alter without writing anything to disk.
|
|
64
|
-
* Backs the preview the UI renders before the edit tool actually runs.
|
|
65
|
-
*/
|
|
66
|
-
export declare function computeEditDiff(path: string, oldText: string, newText: string, cwd: string): Promise<EditDiffResult | EditDiffError>;
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Precision helpers for the edit tool. None of these change the default
|
|
3
|
-
* behaviour of an edit — they kick in only on the recovery / preservation
|
|
4
|
-
* paths:
|
|
5
|
-
*
|
|
6
|
-
* - {@link preserveQuoteStyle} re-applies a file's curly-quote typography to
|
|
7
|
-
* replacement text when the match was found only after folding curly quotes
|
|
8
|
-
* to straight ones, so an edit doesn't quietly downgrade `"` → `“`.
|
|
9
|
-
* - {@link desanitizeMatchString} repairs the handful of tag tokens an API
|
|
10
|
-
* transport may mangle (`<o>` → `<output>`, `\n\nH:` → `\n\nHuman:`, …) so a
|
|
11
|
-
* snippet that lost its angle-bracket words can still be located. It is only
|
|
12
|
-
* ever used as a *fallback* (try the literal text first) because several of
|
|
13
|
-
* the rules collide with ordinary code.
|
|
14
|
-
* - {@link findSimilarFile} and {@link suggestPathUnderCwd} build the "did you
|
|
15
|
-
* mean …?" hint when a path doesn't resolve.
|
|
16
|
-
* - {@link replaceAllLiteral} swaps every non-overlapping literal occurrence of
|
|
17
|
-
* a needle, used for the `replaceAll` edit mode.
|
|
18
|
-
*
|
|
19
|
-
* Everything here is pure / node-fs only and carries no dependency on the rest
|
|
20
|
-
* of the edit pipeline.
|
|
21
|
-
*/
|
|
22
|
-
export declare const LEFT_SINGLE_CURLY_QUOTE = "\u2018";
|
|
23
|
-
export declare const RIGHT_SINGLE_CURLY_QUOTE = "\u2019";
|
|
24
|
-
export declare const LEFT_DOUBLE_CURLY_QUOTE = "\u201C";
|
|
25
|
-
export declare const RIGHT_DOUBLE_CURLY_QUOTE = "\u201D";
|
|
26
|
-
/**
|
|
27
|
-
* When `oldText` only matched the file after curly quotes were folded to
|
|
28
|
-
* straight quotes, re-apply the file's curly typography to `newString` so the
|
|
29
|
-
* edit preserves the original quote style. A no-op when `oldString` already
|
|
30
|
-
* equals the matched text (no folding happened) or when the matched text holds
|
|
31
|
-
* no curly quotes.
|
|
32
|
-
*
|
|
33
|
-
* @param oldString The text the model supplied (straight quotes).
|
|
34
|
-
* @param actualOldString The text actually located in the file (may be curly).
|
|
35
|
-
* @param newString The replacement text the model supplied (straight quotes).
|
|
36
|
-
*/
|
|
37
|
-
export declare function preserveQuoteStyle(oldString: string, actualOldString: string, newString: string): string;
|
|
38
|
-
/**
|
|
39
|
-
* Tag tokens an API transport sometimes mangles, mapped back to their full
|
|
40
|
-
* form. Several of these (`<n>`, `\n\nH:`) appear in ordinary source, so the
|
|
41
|
-
* table must only ever be consulted as a *fallback* after a literal match
|
|
42
|
-
* misses — never preemptively.
|
|
43
|
-
*/
|
|
44
|
-
export declare const DESANITIZATIONS: Record<string, string>;
|
|
45
|
-
/**
|
|
46
|
-
* Expand any mangled tag tokens in `matchString`, reporting which replacements
|
|
47
|
-
* fired so the caller can mirror them onto the replacement text.
|
|
48
|
-
*/
|
|
49
|
-
export declare function desanitizeMatchString(matchString: string): {
|
|
50
|
-
result: string;
|
|
51
|
-
appliedReplacements: Array<{
|
|
52
|
-
from: string;
|
|
53
|
-
to: string;
|
|
54
|
-
}>;
|
|
55
|
-
};
|
|
56
|
-
/**
|
|
57
|
-
* Look in `filePath`'s directory for a file that shares its base name but has a
|
|
58
|
-
* different extension (e.g. `foo.ts` when `foo.js` was requested). Returns the
|
|
59
|
-
* sibling's bare filename, or `undefined` when there is no such neighbour.
|
|
60
|
-
*/
|
|
61
|
-
export declare function findSimilarFile(filePath: string): string | undefined;
|
|
62
|
-
/**
|
|
63
|
-
* Marker embedded in file-not-found messages that carry a cwd note. A UI
|
|
64
|
-
* renderer can key off this to collapse the long message into a short
|
|
65
|
-
* "File not found" badge.
|
|
66
|
-
*/
|
|
67
|
-
export declare const FILE_NOT_FOUND_CWD_NOTE = "Note: your current working directory is";
|
|
68
|
-
/**
|
|
69
|
-
* Suggest a corrected path under `cwd` when an absolute path doesn't resolve.
|
|
70
|
-
* Catches the "dropped repo folder" pattern: the model builds an absolute path
|
|
71
|
-
* that sits beside the repo rather than inside it.
|
|
72
|
-
*
|
|
73
|
-
* cwd = /Users/x/src/currentRepo
|
|
74
|
-
* requestedPath = /Users/x/src/foobar (missing)
|
|
75
|
-
* returns /Users/x/src/currentRepo/foobar (when it exists)
|
|
76
|
-
*
|
|
77
|
-
* @param requestedPath The absolute path that was not found.
|
|
78
|
-
* @param cwd The working directory to re-root the suggestion under.
|
|
79
|
-
*/
|
|
80
|
-
export declare function suggestPathUnderCwd(requestedPath: string, cwd: string): Promise<string | undefined>;
|
|
81
|
-
/**
|
|
82
|
-
* Replace every non-overlapping literal occurrence of `needle` in `haystack`
|
|
83
|
-
* with `value`. Ported verbatim from the kernel `edit` capability so the
|
|
84
|
-
* `replaceAll` edit mode shares one definition of "replace all".
|
|
85
|
-
*/
|
|
86
|
-
export declare function replaceAllLiteral(haystack: string, needle: string, value: string): string;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import type { AgentTool } from "../types.js";
|
|
2
|
-
import { fuzzyFindText } from "./edit-diff.js";
|
|
3
|
-
import { type CheckpointHandle } from "./checkpoint.js";
|
|
4
|
-
import { type ReadStateHandle } from "./read-state.js";
|
|
5
|
-
export interface MatchingStrategy {
|
|
6
|
-
find(content: string, oldText: string): ReturnType<typeof fuzzyFindText>;
|
|
7
|
-
}
|
|
8
|
-
declare const editSchema: import("@sinclair/typebox").TObject<{
|
|
9
|
-
path: import("@sinclair/typebox").TString;
|
|
10
|
-
oldText: import("@sinclair/typebox").TString;
|
|
11
|
-
newText: import("@sinclair/typebox").TString;
|
|
12
|
-
replaceAll: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
13
|
-
}>;
|
|
14
|
-
export interface EditToolDetails {
|
|
15
|
-
/** Formatted diff showing what changed. */
|
|
16
|
-
diff: string;
|
|
17
|
-
/** First changed line (1-based) in the new file; handy for positioning the cursor there. */
|
|
18
|
-
firstChangedLine?: number;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Pluggable filesystem callbacks for the edit tool. Override them to direct
|
|
22
|
-
* edits at an alternate backend, for instance an SSH or remote-mount layer.
|
|
23
|
-
*/
|
|
24
|
-
export interface EditOperations {
|
|
25
|
-
/** Read a file's raw bytes. */
|
|
26
|
-
readFile: (absolutePath: string) => Promise<Buffer>;
|
|
27
|
-
/** Write replacement text to a file. */
|
|
28
|
-
writeFile: (absolutePath: string, content: string) => Promise<void>;
|
|
29
|
-
/** Verify the file is both readable and writable, raising if not. */
|
|
30
|
-
access: (absolutePath: string) => Promise<void>;
|
|
31
|
-
}
|
|
32
|
-
export interface EditToolOptions {
|
|
33
|
-
/** Swap out the filesystem callbacks; the local disk is used by default. */
|
|
34
|
-
operations?: EditOperations;
|
|
35
|
-
matchingStrategy?: MatchingStrategy;
|
|
36
|
-
/**
|
|
37
|
-
* Optional read-before-edit gate store. When present, the edit is refused
|
|
38
|
-
* unless the file was read this session and has not drifted on disk since.
|
|
39
|
-
* Absent → no gate (no-op), preserving the prior behaviour exactly.
|
|
40
|
-
*/
|
|
41
|
-
readState?: ReadStateHandle;
|
|
42
|
-
/**
|
|
43
|
-
* Optional file-checkpoint sink. When present, the file's ORIGINAL
|
|
44
|
-
* pre-edit on-disk content is captured exactly once before the edit is
|
|
45
|
-
* applied, so a later rewind can roll the working tree back. The edit tool
|
|
46
|
-
* only ever targets an existing file, so the snapshot is its old bytes (never
|
|
47
|
-
* `null`). Absent → no snapshot (no-op).
|
|
48
|
-
*/
|
|
49
|
-
checkpoint?: CheckpointHandle;
|
|
50
|
-
}
|
|
51
|
-
export declare function createEditTool(cwd: string, options?: EditToolOptions): AgentTool<typeof editSchema>;
|
|
52
|
-
/** Ready-to-use edit tool bound to the current working directory. */
|
|
53
|
-
export declare const editTool: AgentTool<import("@sinclair/typebox").TObject<{
|
|
54
|
-
path: import("@sinclair/typebox").TString;
|
|
55
|
-
oldText: import("@sinclair/typebox").TString;
|
|
56
|
-
newText: import("@sinclair/typebox").TString;
|
|
57
|
-
replaceAll: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
58
|
-
}>, any>;
|
|
59
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|