@tencent-ai/agent-sdk 0.0.33 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +70 -7
- package/cli/CHANGELOG.md +2418 -0
- package/cli/LICENSE.txt +19 -0
- package/cli/README.md +26 -0
- package/cli/bin/codebuddy +39 -0
- package/cli/dist/codebuddy.js +20 -0
- package/cli/package.json +44 -0
- package/cli/product.cloudhosted.json +242 -0
- package/cli/product.internal.json +244 -0
- package/cli/product.ioa.json +467 -0
- package/cli/product.json +948 -0
- package/cli/product.selfhosted.json +196 -0
- package/cli/vendor/ripgrep/COPYING +3 -0
- package/cli/vendor/ripgrep/arm64-darwin/rg +0 -0
- package/cli/vendor/ripgrep/arm64-darwin/ripgrep.node +0 -0
- package/cli/vendor/ripgrep/arm64-linux/rg +0 -0
- package/cli/vendor/ripgrep/arm64-linux/ripgrep.node +0 -0
- package/cli/vendor/ripgrep/x64-darwin/rg +0 -0
- package/cli/vendor/ripgrep/x64-darwin/ripgrep.node +0 -0
- package/cli/vendor/ripgrep/x64-linux/rg +0 -0
- package/cli/vendor/ripgrep/x64-linux/ripgrep.node +0 -0
- package/cli/vendor/ripgrep/x64-win32/rg.exe +0 -0
- package/cli/vendor/ripgrep/x64-win32/ripgrep.node +0 -0
- package/lib/errors.d.ts +10 -0
- package/lib/errors.d.ts.map +1 -0
- package/lib/errors.js +17 -0
- package/lib/errors.js.map +1 -0
- package/lib/index.d.ts +36 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +40 -0
- package/lib/index.js.map +1 -0
- package/lib/package.spec.js +3 -2
- package/lib/package.spec.js.map +1 -1
- package/lib/query.d.ts +46 -0
- package/lib/query.d.ts.map +1 -0
- package/lib/query.js +270 -0
- package/lib/query.js.map +1 -0
- package/lib/session.d.ts +53 -0
- package/lib/session.d.ts.map +1 -0
- package/lib/session.js +163 -0
- package/lib/session.js.map +1 -0
- package/lib/transport/index.d.ts +104 -0
- package/lib/transport/index.d.ts.map +1 -0
- package/lib/transport/index.js +20 -0
- package/lib/transport/index.js.map +1 -0
- package/lib/transport/process-transport.d.ts +65 -0
- package/lib/transport/process-transport.d.ts.map +1 -0
- package/lib/transport/process-transport.js +380 -0
- package/lib/transport/process-transport.js.map +1 -0
- package/lib/types.d.ts +603 -0
- package/lib/types.d.ts.map +1 -0
- package/lib/types.js +58 -0
- package/lib/types.js.map +1 -0
- package/lib/utils/cli-resolver.d.ts +36 -0
- package/lib/utils/cli-resolver.d.ts.map +1 -0
- package/lib/utils/cli-resolver.js +123 -0
- package/lib/utils/cli-resolver.js.map +1 -0
- package/lib/utils/env-utils.d.ts +9 -0
- package/lib/utils/env-utils.d.ts.map +1 -0
- package/lib/utils/env-utils.js +19 -0
- package/lib/utils/env-utils.js.map +1 -0
- package/lib/utils/index.d.ts +8 -0
- package/lib/utils/index.d.ts.map +1 -0
- package/lib/utils/index.js +17 -0
- package/lib/utils/index.js.map +1 -0
- package/lib/utils/process.d.ts +8 -0
- package/lib/utils/process.d.ts.map +1 -0
- package/lib/utils/process.js +16 -0
- package/lib/utils/process.js.map +1 -0
- package/lib/utils/stream.d.ts +24 -0
- package/lib/utils/stream.d.ts.map +1 -0
- package/lib/utils/stream.js +85 -0
- package/lib/utils/stream.js.map +1 -0
- package/package.json +21 -17
- package/dist/952.agent-sdk.js +0 -1
- package/dist/agent-sdk.js +0 -7
- package/lib/common/application-utils.d.ts +0 -5
- package/lib/common/application-utils.d.ts.map +0 -1
- package/lib/common/application-utils.js +0 -23
- package/lib/common/application-utils.js.map +0 -1
- package/lib/common/component-registry.d.ts +0 -10
- package/lib/common/component-registry.d.ts.map +0 -1
- package/lib/common/component-registry.js +0 -50
- package/lib/common/component-registry.js.map +0 -1
- package/lib/common/index.d.ts +0 -5
- package/lib/common/index.d.ts.map +0 -1
- package/lib/common/index.js +0 -21
- package/lib/common/index.js.map +0 -1
- package/lib/common/services/agent.d.ts +0 -12
- package/lib/common/services/agent.d.ts.map +0 -1
- package/lib/common/services/agent.js +0 -28
- package/lib/common/services/agent.js.map +0 -1
- package/lib/common/services/auth.d.ts +0 -59
- package/lib/common/services/auth.d.ts.map +0 -1
- package/lib/common/services/auth.js +0 -91
- package/lib/common/services/auth.js.map +0 -1
- package/lib/common/services/codebase.d.ts +0 -44
- package/lib/common/services/codebase.d.ts.map +0 -1
- package/lib/common/services/codebase.js +0 -87
- package/lib/common/services/codebase.js.map +0 -1
- package/lib/common/services/event.d.ts +0 -8
- package/lib/common/services/event.d.ts.map +0 -1
- package/lib/common/services/event.js +0 -18
- package/lib/common/services/event.js.map +0 -1
- package/lib/common/services/filepath.d.ts +0 -7
- package/lib/common/services/filepath.d.ts.map +0 -1
- package/lib/common/services/filepath.js +0 -16
- package/lib/common/services/filepath.js.map +0 -1
- package/lib/common/services/http.d.ts +0 -5
- package/lib/common/services/http.d.ts.map +0 -1
- package/lib/common/services/http.js +0 -12
- package/lib/common/services/http.js.map +0 -1
- package/lib/common/services/index.d.ts +0 -10
- package/lib/common/services/index.d.ts.map +0 -1
- package/lib/common/services/index.js +0 -26
- package/lib/common/services/index.js.map +0 -1
- package/lib/common/services/logger.d.ts +0 -7
- package/lib/common/services/logger.d.ts.map +0 -1
- package/lib/common/services/logger.js +0 -17
- package/lib/common/services/logger.js.map +0 -1
- package/lib/common/services/product.d.ts +0 -12
- package/lib/common/services/product.d.ts.map +0 -1
- package/lib/common/services/product.js +0 -29
- package/lib/common/services/product.js.map +0 -1
- package/lib/common/services/storage.d.ts +0 -7
- package/lib/common/services/storage.d.ts.map +0 -1
- package/lib/common/services/storage.js +0 -17
- package/lib/common/services/storage.js.map +0 -1
- package/lib/common/services/tracing.d.ts +0 -10
- package/lib/common/services/tracing.d.ts.map +0 -1
- package/lib/common/services/tracing.js +0 -29
- package/lib/common/services/tracing.js.map +0 -1
- package/lib/common/types/agents/agent.d.ts +0 -49
- package/lib/common/types/agents/agent.d.ts.map +0 -1
- package/lib/common/types/agents/agent.js +0 -9
- package/lib/common/types/agents/agent.js.map +0 -1
- package/lib/common/types/agents/ai.d.ts +0 -96
- package/lib/common/types/agents/ai.d.ts.map +0 -1
- package/lib/common/types/agents/ai.js +0 -3
- package/lib/common/types/agents/ai.js.map +0 -1
- package/lib/common/types/agents/completion.d.ts +0 -192
- package/lib/common/types/agents/completion.d.ts.map +0 -1
- package/lib/common/types/agents/completion.js +0 -4
- package/lib/common/types/agents/completion.js.map +0 -1
- package/lib/common/types/agents/conversation-manager.d.ts +0 -256
- package/lib/common/types/agents/conversation-manager.d.ts.map +0 -1
- package/lib/common/types/agents/conversation-manager.js +0 -3
- package/lib/common/types/agents/conversation-manager.js.map +0 -1
- package/lib/common/types/agents/craft-history.d.ts +0 -111
- package/lib/common/types/agents/craft-history.d.ts.map +0 -1
- package/lib/common/types/agents/craft-history.js +0 -3
- package/lib/common/types/agents/craft-history.js.map +0 -1
- package/lib/common/types/agents/craft.d.ts +0 -17
- package/lib/common/types/agents/craft.d.ts.map +0 -1
- package/lib/common/types/agents/craft.js +0 -3
- package/lib/common/types/agents/craft.js.map +0 -1
- package/lib/common/types/agents/file-tree.d.ts +0 -169
- package/lib/common/types/agents/file-tree.d.ts.map +0 -1
- package/lib/common/types/agents/file-tree.js +0 -17
- package/lib/common/types/agents/file-tree.js.map +0 -1
- package/lib/common/types/agents/index.d.ts +0 -10
- package/lib/common/types/agents/index.d.ts.map +0 -1
- package/lib/common/types/agents/index.js +0 -26
- package/lib/common/types/agents/index.js.map +0 -1
- package/lib/common/types/agents/run.d.ts +0 -133
- package/lib/common/types/agents/run.d.ts.map +0 -1
- package/lib/common/types/agents/run.js +0 -27
- package/lib/common/types/agents/run.js.map +0 -1
- package/lib/common/types/agents/tools.d.ts +0 -343
- package/lib/common/types/agents/tools.d.ts.map +0 -1
- package/lib/common/types/agents/tools.js +0 -67
- package/lib/common/types/agents/tools.js.map +0 -1
- package/lib/common/types/agents/user-reference.d.ts +0 -78
- package/lib/common/types/agents/user-reference.d.ts.map +0 -1
- package/lib/common/types/agents/user-reference.js +0 -3
- package/lib/common/types/agents/user-reference.js.map +0 -1
- package/lib/common/types/auth.d.ts +0 -73
- package/lib/common/types/auth.d.ts.map +0 -1
- package/lib/common/types/auth.js +0 -3
- package/lib/common/types/auth.js.map +0 -1
- package/lib/common/types/client-info.d.ts +0 -47
- package/lib/common/types/client-info.d.ts.map +0 -1
- package/lib/common/types/client-info.js +0 -3
- package/lib/common/types/client-info.js.map +0 -1
- package/lib/common/types/codebase.d.ts +0 -69
- package/lib/common/types/codebase.d.ts.map +0 -1
- package/lib/common/types/codebase.js +0 -3
- package/lib/common/types/codebase.js.map +0 -1
- package/lib/common/types/event/activity.d.ts +0 -5
- package/lib/common/types/event/activity.d.ts.map +0 -1
- package/lib/common/types/event/activity.js +0 -3
- package/lib/common/types/event/activity.js.map +0 -1
- package/lib/common/types/event/authentication.d.ts +0 -14
- package/lib/common/types/event/authentication.d.ts.map +0 -1
- package/lib/common/types/event/authentication.js +0 -9
- package/lib/common/types/event/authentication.js.map +0 -1
- package/lib/common/types/event/chat.d.ts +0 -48
- package/lib/common/types/event/chat.d.ts.map +0 -1
- package/lib/common/types/event/chat.js +0 -3
- package/lib/common/types/event/chat.js.map +0 -1
- package/lib/common/types/event/check-point.d.ts +0 -13
- package/lib/common/types/event/check-point.d.ts.map +0 -1
- package/lib/common/types/event/check-point.js +0 -3
- package/lib/common/types/event/check-point.js.map +0 -1
- package/lib/common/types/event/code.d.ts +0 -22
- package/lib/common/types/event/code.d.ts.map +0 -1
- package/lib/common/types/event/code.js +0 -14
- package/lib/common/types/event/code.js.map +0 -1
- package/lib/common/types/event/commit-message.d.ts +0 -25
- package/lib/common/types/event/commit-message.d.ts.map +0 -1
- package/lib/common/types/event/commit-message.js +0 -3
- package/lib/common/types/event/commit-message.js.map +0 -1
- package/lib/common/types/event/completion.d.ts +0 -313
- package/lib/common/types/event/completion.d.ts.map +0 -1
- package/lib/common/types/event/completion.js +0 -38
- package/lib/common/types/event/completion.js.map +0 -1
- package/lib/common/types/event/craft.d.ts +0 -256
- package/lib/common/types/event/craft.d.ts.map +0 -1
- package/lib/common/types/event/craft.js +0 -3
- package/lib/common/types/event/craft.js.map +0 -1
- package/lib/common/types/event/document.d.ts +0 -42
- package/lib/common/types/event/document.d.ts.map +0 -1
- package/lib/common/types/event/document.js +0 -3
- package/lib/common/types/event/document.js.map +0 -1
- package/lib/common/types/event/element.d.ts +0 -11
- package/lib/common/types/event/element.d.ts.map +0 -1
- package/lib/common/types/event/element.js +0 -3
- package/lib/common/types/event/element.js.map +0 -1
- package/lib/common/types/event/events.d.ts +0 -131
- package/lib/common/types/event/events.d.ts.map +0 -1
- package/lib/common/types/event/events.js +0 -88
- package/lib/common/types/event/events.js.map +0 -1
- package/lib/common/types/event/ide-event.d.ts +0 -44
- package/lib/common/types/event/ide-event.d.ts.map +0 -1
- package/lib/common/types/event/ide-event.js +0 -15
- package/lib/common/types/event/ide-event.js.map +0 -1
- package/lib/common/types/event/index.d.ts +0 -14
- package/lib/common/types/event/index.d.ts.map +0 -1
- package/lib/common/types/event/index.js +0 -30
- package/lib/common/types/event/index.js.map +0 -1
- package/lib/common/types/event/legacy-completion.d.ts +0 -196
- package/lib/common/types/event/legacy-completion.d.ts.map +0 -1
- package/lib/common/types/event/legacy-completion.js +0 -38
- package/lib/common/types/event/legacy-completion.js.map +0 -1
- package/lib/common/types/event/mcp.d.ts +0 -20
- package/lib/common/types/event/mcp.d.ts.map +0 -1
- package/lib/common/types/event/mcp.js +0 -3
- package/lib/common/types/event/mcp.js.map +0 -1
- package/lib/common/types/event/plugin-status.d.ts +0 -7
- package/lib/common/types/event/plugin-status.d.ts.map +0 -1
- package/lib/common/types/event/plugin-status.js +0 -3
- package/lib/common/types/event/plugin-status.js.map +0 -1
- package/lib/common/types/event/protocol.d.ts +0 -117
- package/lib/common/types/event/protocol.d.ts.map +0 -1
- package/lib/common/types/event/protocol.js +0 -5
- package/lib/common/types/event/protocol.js.map +0 -1
- package/lib/common/types/filepath.d.ts +0 -35
- package/lib/common/types/filepath.d.ts.map +0 -1
- package/lib/common/types/filepath.js +0 -3
- package/lib/common/types/filepath.js.map +0 -1
- package/lib/common/types/http.d.ts +0 -3
- package/lib/common/types/http.d.ts.map +0 -1
- package/lib/common/types/http.js +0 -3
- package/lib/common/types/http.js.map +0 -1
- package/lib/common/types/index.d.ts +0 -13
- package/lib/common/types/index.d.ts.map +0 -1
- package/lib/common/types/index.js +0 -29
- package/lib/common/types/index.js.map +0 -1
- package/lib/common/types/local-storage.d.ts +0 -26
- package/lib/common/types/local-storage.d.ts.map +0 -1
- package/lib/common/types/local-storage.js +0 -5
- package/lib/common/types/local-storage.js.map +0 -1
- package/lib/common/types/logger.d.ts +0 -10
- package/lib/common/types/logger.d.ts.map +0 -1
- package/lib/common/types/logger.js +0 -3
- package/lib/common/types/logger.js.map +0 -1
- package/lib/common/types/product/activities.d.ts +0 -5
- package/lib/common/types/product/activities.d.ts.map +0 -1
- package/lib/common/types/product/activities.js +0 -3
- package/lib/common/types/product/activities.js.map +0 -1
- package/lib/common/types/product/agent-tools.d.ts +0 -5
- package/lib/common/types/product/agent-tools.d.ts.map +0 -1
- package/lib/common/types/product/agent-tools.js +0 -3
- package/lib/common/types/product/agent-tools.js.map +0 -1
- package/lib/common/types/product/agent.d.ts +0 -45
- package/lib/common/types/product/agent.d.ts.map +0 -1
- package/lib/common/types/product/agent.js +0 -10
- package/lib/common/types/product/agent.js.map +0 -1
- package/lib/common/types/product/authentication.d.ts +0 -76
- package/lib/common/types/product/authentication.d.ts.map +0 -1
- package/lib/common/types/product/authentication.js +0 -28
- package/lib/common/types/product/authentication.js.map +0 -1
- package/lib/common/types/product/codebase.d.ts +0 -40
- package/lib/common/types/product/codebase.d.ts.map +0 -1
- package/lib/common/types/product/codebase.js +0 -3
- package/lib/common/types/product/codebase.js.map +0 -1
- package/lib/common/types/product/command.d.ts +0 -24
- package/lib/common/types/product/command.d.ts.map +0 -1
- package/lib/common/types/product/command.js +0 -3
- package/lib/common/types/product/command.js.map +0 -1
- package/lib/common/types/product/commit-message.d.ts +0 -7
- package/lib/common/types/product/commit-message.d.ts.map +0 -1
- package/lib/common/types/product/commit-message.js +0 -3
- package/lib/common/types/product/commit-message.js.map +0 -1
- package/lib/common/types/product/completion.d.ts +0 -35
- package/lib/common/types/product/completion.d.ts.map +0 -1
- package/lib/common/types/product/completion.js +0 -3
- package/lib/common/types/product/completion.js.map +0 -1
- package/lib/common/types/product/config.d.ts +0 -6
- package/lib/common/types/product/config.d.ts.map +0 -1
- package/lib/common/types/product/config.js +0 -3
- package/lib/common/types/product/config.js.map +0 -1
- package/lib/common/types/product/features.d.ts +0 -193
- package/lib/common/types/product/features.d.ts.map +0 -1
- package/lib/common/types/product/features.js +0 -198
- package/lib/common/types/product/features.js.map +0 -1
- package/lib/common/types/product/index.d.ts +0 -24
- package/lib/common/types/product/index.d.ts.map +0 -1
- package/lib/common/types/product/index.js +0 -40
- package/lib/common/types/product/index.js.map +0 -1
- package/lib/common/types/product/inline-chat.d.ts +0 -15
- package/lib/common/types/product/inline-chat.d.ts.map +0 -1
- package/lib/common/types/product/inline-chat.js +0 -3
- package/lib/common/types/product/inline-chat.js.map +0 -1
- package/lib/common/types/product/instruction.d.ts +0 -10
- package/lib/common/types/product/instruction.d.ts.map +0 -1
- package/lib/common/types/product/instruction.js +0 -8
- package/lib/common/types/product/instruction.js.map +0 -1
- package/lib/common/types/product/knowledge-base.d.ts +0 -16
- package/lib/common/types/product/knowledge-base.d.ts.map +0 -1
- package/lib/common/types/product/knowledge-base.js +0 -3
- package/lib/common/types/product/knowledge-base.js.map +0 -1
- package/lib/common/types/product/language-model.d.ts +0 -42
- package/lib/common/types/product/language-model.d.ts.map +0 -1
- package/lib/common/types/product/language-model.js +0 -3
- package/lib/common/types/product/language-model.js.map +0 -1
- package/lib/common/types/product/links.d.ts +0 -20
- package/lib/common/types/product/links.d.ts.map +0 -1
- package/lib/common/types/product/links.js +0 -3
- package/lib/common/types/product/links.js.map +0 -1
- package/lib/common/types/product/log.d.ts +0 -39
- package/lib/common/types/product/log.d.ts.map +0 -1
- package/lib/common/types/product/log.js +0 -12
- package/lib/common/types/product/log.js.map +0 -1
- package/lib/common/types/product/product-provider.d.ts +0 -12
- package/lib/common/types/product/product-provider.d.ts.map +0 -1
- package/lib/common/types/product/product-provider.js +0 -5
- package/lib/common/types/product/product-provider.js.map +0 -1
- package/lib/common/types/product/product.d.ts +0 -203
- package/lib/common/types/product/product.d.ts.map +0 -1
- package/lib/common/types/product/product.js +0 -19
- package/lib/common/types/product/product.js.map +0 -1
- package/lib/common/types/product/prompt-template.d.ts +0 -6
- package/lib/common/types/product/prompt-template.d.ts.map +0 -1
- package/lib/common/types/product/prompt-template.js +0 -3
- package/lib/common/types/product/prompt-template.js.map +0 -1
- package/lib/common/types/product/remote-agent.d.ts +0 -20
- package/lib/common/types/product/remote-agent.d.ts.map +0 -1
- package/lib/common/types/product/remote-agent.js +0 -3
- package/lib/common/types/product/remote-agent.js.map +0 -1
- package/lib/common/types/product/replacement.d.ts +0 -38
- package/lib/common/types/product/replacement.d.ts.map +0 -1
- package/lib/common/types/product/replacement.js +0 -18
- package/lib/common/types/product/replacement.js.map +0 -1
- package/lib/common/types/product/telemetry.d.ts +0 -22
- package/lib/common/types/product/telemetry.d.ts.map +0 -1
- package/lib/common/types/product/telemetry.js +0 -3
- package/lib/common/types/product/telemetry.js.map +0 -1
- package/lib/common/types/product/updates.d.ts +0 -17
- package/lib/common/types/product/updates.d.ts.map +0 -1
- package/lib/common/types/product/updates.js +0 -8
- package/lib/common/types/product/updates.js.map +0 -1
- package/lib/common/types/protocol.d.ts +0 -31
- package/lib/common/types/protocol.d.ts.map +0 -1
- package/lib/common/types/protocol.js +0 -10
- package/lib/common/types/protocol.js.map +0 -1
- package/lib/common/types/tracing.d.ts +0 -74
- package/lib/common/types/tracing.d.ts.map +0 -1
- package/lib/common/types/tracing.js +0 -3
- package/lib/common/types/tracing.js.map +0 -1
- package/lib/common/utils.d.ts +0 -3
- package/lib/common/utils.d.ts.map +0 -1
- package/lib/common/utils.js +0 -10
- package/lib/common/utils.js.map +0 -1
package/lib/types.d.ts
ADDED
|
@@ -0,0 +1,603 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Genie Agent SDK Types
|
|
3
|
+
*
|
|
4
|
+
* Compatible with Claude Code Agent SDK interface.
|
|
5
|
+
*/
|
|
6
|
+
export declare const HOOK_EVENTS: readonly ["PreToolUse", "PostToolUse", "PostToolUseFailure", "Notification", "UserPromptSubmit", "SessionStart", "SessionEnd", "Stop", "SubagentStart", "SubagentStop", "PreCompact", "PermissionRequest"];
|
|
7
|
+
export declare const EXIT_REASONS: readonly ["user_exit", "interrupt", "error", "end_turn", "max_turns", "max_budget_usd"];
|
|
8
|
+
export type PermissionMode = 'default' | 'acceptEdits' | 'bypassPermissions' | 'plan' | 'delegate' | 'dontAsk';
|
|
9
|
+
export type PermissionBehavior = 'allow' | 'deny' | 'ask';
|
|
10
|
+
export type PermissionUpdate = {
|
|
11
|
+
type: 'addRules';
|
|
12
|
+
rules: PermissionRuleValue[];
|
|
13
|
+
behavior: PermissionBehavior;
|
|
14
|
+
destination: PermissionUpdateDestination;
|
|
15
|
+
} | {
|
|
16
|
+
type: 'replaceRules';
|
|
17
|
+
rules: PermissionRuleValue[];
|
|
18
|
+
behavior: PermissionBehavior;
|
|
19
|
+
destination: PermissionUpdateDestination;
|
|
20
|
+
} | {
|
|
21
|
+
type: 'removeRules';
|
|
22
|
+
rules: PermissionRuleValue[];
|
|
23
|
+
behavior: PermissionBehavior;
|
|
24
|
+
destination: PermissionUpdateDestination;
|
|
25
|
+
} | {
|
|
26
|
+
type: 'setMode';
|
|
27
|
+
mode: PermissionMode;
|
|
28
|
+
destination: PermissionUpdateDestination;
|
|
29
|
+
} | {
|
|
30
|
+
type: 'addDirectories';
|
|
31
|
+
directories: string[];
|
|
32
|
+
destination: PermissionUpdateDestination;
|
|
33
|
+
} | {
|
|
34
|
+
type: 'removeDirectories';
|
|
35
|
+
directories: string[];
|
|
36
|
+
destination: PermissionUpdateDestination;
|
|
37
|
+
};
|
|
38
|
+
export type PermissionUpdateDestination = 'userSettings' | 'projectSettings' | 'localSettings' | 'session' | 'cliArg';
|
|
39
|
+
export type PermissionRuleValue = {
|
|
40
|
+
toolName: string;
|
|
41
|
+
ruleContent?: string;
|
|
42
|
+
};
|
|
43
|
+
export type PermissionResult = {
|
|
44
|
+
behavior: 'allow';
|
|
45
|
+
updatedInput: Record<string, unknown>;
|
|
46
|
+
updatedPermissions?: PermissionUpdate[];
|
|
47
|
+
toolUseID?: string;
|
|
48
|
+
} | {
|
|
49
|
+
behavior: 'deny';
|
|
50
|
+
message: string;
|
|
51
|
+
interrupt?: boolean;
|
|
52
|
+
toolUseID?: string;
|
|
53
|
+
};
|
|
54
|
+
export type CanUseTool = (toolName: string, input: Record<string, unknown>, options: {
|
|
55
|
+
signal: AbortSignal;
|
|
56
|
+
suggestions?: PermissionUpdate[];
|
|
57
|
+
blockedPath?: string;
|
|
58
|
+
decisionReason?: string;
|
|
59
|
+
toolUseID: string;
|
|
60
|
+
agentID?: string;
|
|
61
|
+
}) => Promise<PermissionResult>;
|
|
62
|
+
export type HookEvent = (typeof HOOK_EVENTS)[number];
|
|
63
|
+
export type ExitReason = (typeof EXIT_REASONS)[number];
|
|
64
|
+
export type HookCallback = (input: HookInput, toolUseID: string | undefined, options: {
|
|
65
|
+
signal: AbortSignal;
|
|
66
|
+
}) => Promise<HookJSONOutput>;
|
|
67
|
+
export interface HookCallbackMatcher {
|
|
68
|
+
matcher?: string;
|
|
69
|
+
hooks: HookCallback[];
|
|
70
|
+
timeout?: number;
|
|
71
|
+
}
|
|
72
|
+
export type BaseHookInput = {
|
|
73
|
+
session_id: string;
|
|
74
|
+
transcript_path: string;
|
|
75
|
+
cwd: string;
|
|
76
|
+
permission_mode?: string;
|
|
77
|
+
};
|
|
78
|
+
export type PreToolUseHookInput = BaseHookInput & {
|
|
79
|
+
hook_event_name: 'PreToolUse';
|
|
80
|
+
tool_name: string;
|
|
81
|
+
tool_input: unknown;
|
|
82
|
+
tool_use_id: string;
|
|
83
|
+
};
|
|
84
|
+
export type PostToolUseHookInput = BaseHookInput & {
|
|
85
|
+
hook_event_name: 'PostToolUse';
|
|
86
|
+
tool_name: string;
|
|
87
|
+
tool_input: unknown;
|
|
88
|
+
tool_response: unknown;
|
|
89
|
+
tool_use_id: string;
|
|
90
|
+
};
|
|
91
|
+
export type PostToolUseFailureHookInput = BaseHookInput & {
|
|
92
|
+
hook_event_name: 'PostToolUseFailure';
|
|
93
|
+
tool_name: string;
|
|
94
|
+
tool_input: unknown;
|
|
95
|
+
tool_use_id: string;
|
|
96
|
+
error: string;
|
|
97
|
+
is_interrupt?: boolean;
|
|
98
|
+
};
|
|
99
|
+
export type NotificationHookInput = BaseHookInput & {
|
|
100
|
+
hook_event_name: 'Notification';
|
|
101
|
+
message: string;
|
|
102
|
+
title?: string;
|
|
103
|
+
notification_type: string;
|
|
104
|
+
};
|
|
105
|
+
export type UserPromptSubmitHookInput = BaseHookInput & {
|
|
106
|
+
hook_event_name: 'UserPromptSubmit';
|
|
107
|
+
prompt: string;
|
|
108
|
+
};
|
|
109
|
+
export type SessionStartHookInput = BaseHookInput & {
|
|
110
|
+
hook_event_name: 'SessionStart';
|
|
111
|
+
source: 'startup' | 'resume' | 'clear' | 'compact';
|
|
112
|
+
};
|
|
113
|
+
export type SessionEndHookInput = BaseHookInput & {
|
|
114
|
+
hook_event_name: 'SessionEnd';
|
|
115
|
+
reason: ExitReason;
|
|
116
|
+
};
|
|
117
|
+
export type StopHookInput = BaseHookInput & {
|
|
118
|
+
hook_event_name: 'Stop';
|
|
119
|
+
stop_hook_active: boolean;
|
|
120
|
+
};
|
|
121
|
+
export type SubagentStartHookInput = BaseHookInput & {
|
|
122
|
+
hook_event_name: 'SubagentStart';
|
|
123
|
+
agent_id: string;
|
|
124
|
+
agent_type: string;
|
|
125
|
+
};
|
|
126
|
+
export type SubagentStopHookInput = BaseHookInput & {
|
|
127
|
+
hook_event_name: 'SubagentStop';
|
|
128
|
+
stop_hook_active: boolean;
|
|
129
|
+
agent_id: string;
|
|
130
|
+
agent_transcript_path: string;
|
|
131
|
+
};
|
|
132
|
+
export type PreCompactHookInput = BaseHookInput & {
|
|
133
|
+
hook_event_name: 'PreCompact';
|
|
134
|
+
trigger: 'manual' | 'auto';
|
|
135
|
+
custom_instructions: string | null;
|
|
136
|
+
};
|
|
137
|
+
export type PermissionRequestHookInput = BaseHookInput & {
|
|
138
|
+
hook_event_name: 'PermissionRequest';
|
|
139
|
+
tool_name: string;
|
|
140
|
+
tool_input: unknown;
|
|
141
|
+
permission_suggestions?: PermissionUpdate[];
|
|
142
|
+
};
|
|
143
|
+
export type HookInput = PreToolUseHookInput | PostToolUseHookInput | PostToolUseFailureHookInput | NotificationHookInput | UserPromptSubmitHookInput | SessionStartHookInput | SessionEndHookInput | StopHookInput | SubagentStartHookInput | SubagentStopHookInput | PreCompactHookInput | PermissionRequestHookInput;
|
|
144
|
+
export type AsyncHookJSONOutput = {
|
|
145
|
+
async: true;
|
|
146
|
+
asyncTimeout?: number;
|
|
147
|
+
};
|
|
148
|
+
export type SyncHookJSONOutput = {
|
|
149
|
+
continue?: boolean;
|
|
150
|
+
suppressOutput?: boolean;
|
|
151
|
+
stopReason?: string;
|
|
152
|
+
decision?: 'approve' | 'block';
|
|
153
|
+
systemMessage?: string;
|
|
154
|
+
reason?: string;
|
|
155
|
+
hookSpecificOutput?: Record<string, unknown>;
|
|
156
|
+
};
|
|
157
|
+
export type HookJSONOutput = AsyncHookJSONOutput | SyncHookJSONOutput;
|
|
158
|
+
export type OutputFormatType = 'json_schema';
|
|
159
|
+
export type JsonSchemaOutputFormat = {
|
|
160
|
+
type: 'json_schema';
|
|
161
|
+
schema: Record<string, unknown>;
|
|
162
|
+
};
|
|
163
|
+
export type OutputFormat = JsonSchemaOutputFormat;
|
|
164
|
+
export type McpStdioServerConfig = {
|
|
165
|
+
type?: 'stdio';
|
|
166
|
+
command: string;
|
|
167
|
+
args?: string[];
|
|
168
|
+
env?: Record<string, string>;
|
|
169
|
+
};
|
|
170
|
+
export type McpSSEServerConfig = {
|
|
171
|
+
type: 'sse';
|
|
172
|
+
url: string;
|
|
173
|
+
headers?: Record<string, string>;
|
|
174
|
+
};
|
|
175
|
+
export type McpHttpServerConfig = {
|
|
176
|
+
type: 'http';
|
|
177
|
+
url: string;
|
|
178
|
+
headers?: Record<string, string>;
|
|
179
|
+
};
|
|
180
|
+
export type McpServerConfig = McpStdioServerConfig | McpSSEServerConfig | McpHttpServerConfig;
|
|
181
|
+
export type AgentDefinition = {
|
|
182
|
+
description: string;
|
|
183
|
+
tools?: string[];
|
|
184
|
+
disallowedTools?: string[];
|
|
185
|
+
prompt: string;
|
|
186
|
+
model?: string;
|
|
187
|
+
};
|
|
188
|
+
export type SandboxSettings = {
|
|
189
|
+
enabled?: boolean;
|
|
190
|
+
autoAllowBashIfSandboxed?: boolean;
|
|
191
|
+
network?: {
|
|
192
|
+
allowLocalBinding?: boolean;
|
|
193
|
+
allowUnixSockets?: string[];
|
|
194
|
+
};
|
|
195
|
+
};
|
|
196
|
+
export type SlashCommand = {
|
|
197
|
+
name: string;
|
|
198
|
+
description: string;
|
|
199
|
+
argumentHint: string;
|
|
200
|
+
};
|
|
201
|
+
export type ModelInfo = {
|
|
202
|
+
value: string;
|
|
203
|
+
displayName: string;
|
|
204
|
+
description: string;
|
|
205
|
+
};
|
|
206
|
+
export type AccountInfo = {
|
|
207
|
+
email?: string;
|
|
208
|
+
organization?: string;
|
|
209
|
+
subscriptionType?: string;
|
|
210
|
+
tokenSource?: string;
|
|
211
|
+
apiKeySource?: string;
|
|
212
|
+
};
|
|
213
|
+
export type McpServerStatus = {
|
|
214
|
+
name: string;
|
|
215
|
+
status: 'connected' | 'failed' | 'needs-auth' | 'pending';
|
|
216
|
+
serverInfo?: {
|
|
217
|
+
name: string;
|
|
218
|
+
version: string;
|
|
219
|
+
};
|
|
220
|
+
};
|
|
221
|
+
export interface TextContentBlock {
|
|
222
|
+
type: 'text';
|
|
223
|
+
text: string;
|
|
224
|
+
}
|
|
225
|
+
export interface ToolUseContentBlock {
|
|
226
|
+
type: 'tool_use';
|
|
227
|
+
id: string;
|
|
228
|
+
name: string;
|
|
229
|
+
input: Record<string, unknown>;
|
|
230
|
+
}
|
|
231
|
+
export interface ToolResultContentBlock {
|
|
232
|
+
type: 'tool_result';
|
|
233
|
+
tool_use_id: string;
|
|
234
|
+
content?: string | ContentBlock[];
|
|
235
|
+
is_error?: boolean;
|
|
236
|
+
}
|
|
237
|
+
export type ContentBlock = TextContentBlock | ToolUseContentBlock | ToolResultContentBlock;
|
|
238
|
+
export interface Usage {
|
|
239
|
+
input_tokens: number;
|
|
240
|
+
output_tokens: number;
|
|
241
|
+
cache_read_input_tokens?: number | null;
|
|
242
|
+
cache_creation_input_tokens?: number | null;
|
|
243
|
+
}
|
|
244
|
+
export type StopReason = 'end_turn' | 'max_tokens' | 'stop_sequence' | 'tool_use' | 'pause_turn' | 'refusal';
|
|
245
|
+
export interface MessageStartEvent {
|
|
246
|
+
type: 'message_start';
|
|
247
|
+
message: {
|
|
248
|
+
id: string;
|
|
249
|
+
type: 'message';
|
|
250
|
+
role: 'assistant';
|
|
251
|
+
model: string;
|
|
252
|
+
content: ContentBlock[];
|
|
253
|
+
stop_reason: StopReason | null;
|
|
254
|
+
stop_sequence: string | null;
|
|
255
|
+
usage: Usage;
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
export interface ContentBlockStartEvent {
|
|
259
|
+
type: 'content_block_start';
|
|
260
|
+
index: number;
|
|
261
|
+
content_block: {
|
|
262
|
+
type: 'text';
|
|
263
|
+
text: string;
|
|
264
|
+
} | {
|
|
265
|
+
type: 'tool_use';
|
|
266
|
+
id: string;
|
|
267
|
+
name: string;
|
|
268
|
+
input: Record<string, unknown>;
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
export interface ContentBlockDeltaEvent {
|
|
272
|
+
type: 'content_block_delta';
|
|
273
|
+
index: number;
|
|
274
|
+
delta: {
|
|
275
|
+
type: 'text_delta';
|
|
276
|
+
text: string;
|
|
277
|
+
} | {
|
|
278
|
+
type: 'input_json_delta';
|
|
279
|
+
partial_json: string;
|
|
280
|
+
};
|
|
281
|
+
}
|
|
282
|
+
export interface ContentBlockStopEvent {
|
|
283
|
+
type: 'content_block_stop';
|
|
284
|
+
index: number;
|
|
285
|
+
}
|
|
286
|
+
export interface MessageDeltaEvent {
|
|
287
|
+
type: 'message_delta';
|
|
288
|
+
delta: {
|
|
289
|
+
stop_reason: StopReason | null;
|
|
290
|
+
stop_sequence: string | null;
|
|
291
|
+
};
|
|
292
|
+
usage?: {
|
|
293
|
+
input_tokens: number;
|
|
294
|
+
output_tokens: number;
|
|
295
|
+
};
|
|
296
|
+
}
|
|
297
|
+
export interface MessageStopEvent {
|
|
298
|
+
type: 'message_stop';
|
|
299
|
+
}
|
|
300
|
+
export type RawMessageStreamEvent = MessageStartEvent | ContentBlockStartEvent | ContentBlockDeltaEvent | ContentBlockStopEvent | MessageDeltaEvent | MessageStopEvent;
|
|
301
|
+
export type PermissionDenial = {
|
|
302
|
+
tool_name: string;
|
|
303
|
+
tool_use_id: string;
|
|
304
|
+
tool_input: Record<string, unknown>;
|
|
305
|
+
};
|
|
306
|
+
export type SystemMessage = {
|
|
307
|
+
type: 'system';
|
|
308
|
+
subtype: 'init';
|
|
309
|
+
uuid: string;
|
|
310
|
+
session_id: string;
|
|
311
|
+
apiKeySource?: string;
|
|
312
|
+
cwd?: string;
|
|
313
|
+
tools: string[];
|
|
314
|
+
mcp_servers?: Array<{
|
|
315
|
+
name: string;
|
|
316
|
+
status: string;
|
|
317
|
+
}>;
|
|
318
|
+
model: string;
|
|
319
|
+
permissionMode: PermissionMode;
|
|
320
|
+
slash_commands?: string[];
|
|
321
|
+
output_style?: string;
|
|
322
|
+
claude_code_version?: string;
|
|
323
|
+
skills?: string[];
|
|
324
|
+
plugins?: Array<{
|
|
325
|
+
name: string;
|
|
326
|
+
path: string;
|
|
327
|
+
}>;
|
|
328
|
+
};
|
|
329
|
+
export type UserMessage = {
|
|
330
|
+
type: 'user';
|
|
331
|
+
uuid?: string;
|
|
332
|
+
session_id: string;
|
|
333
|
+
message: {
|
|
334
|
+
role: 'user';
|
|
335
|
+
content: string | ContentBlock[];
|
|
336
|
+
};
|
|
337
|
+
parent_tool_use_id: string | null;
|
|
338
|
+
isSynthetic?: boolean;
|
|
339
|
+
tool_use_result?: unknown;
|
|
340
|
+
};
|
|
341
|
+
export type AssistantMessage = {
|
|
342
|
+
type: 'assistant';
|
|
343
|
+
uuid: string;
|
|
344
|
+
session_id: string;
|
|
345
|
+
message: {
|
|
346
|
+
id: string;
|
|
347
|
+
type: 'message';
|
|
348
|
+
role: 'assistant';
|
|
349
|
+
model: string;
|
|
350
|
+
content: ContentBlock[];
|
|
351
|
+
stop_reason: StopReason | null;
|
|
352
|
+
stop_sequence: string | null;
|
|
353
|
+
usage: Usage;
|
|
354
|
+
};
|
|
355
|
+
parent_tool_use_id: string | null;
|
|
356
|
+
error?: string;
|
|
357
|
+
};
|
|
358
|
+
export type PartialAssistantMessage = {
|
|
359
|
+
type: 'stream_event';
|
|
360
|
+
event: RawMessageStreamEvent;
|
|
361
|
+
parent_tool_use_id: string | null;
|
|
362
|
+
uuid: string;
|
|
363
|
+
session_id: string;
|
|
364
|
+
};
|
|
365
|
+
export type ResultMessage = {
|
|
366
|
+
type: 'result';
|
|
367
|
+
subtype: 'success';
|
|
368
|
+
uuid: string;
|
|
369
|
+
session_id: string;
|
|
370
|
+
duration_ms: number;
|
|
371
|
+
duration_api_ms: number;
|
|
372
|
+
is_error: boolean;
|
|
373
|
+
num_turns: number;
|
|
374
|
+
result: string;
|
|
375
|
+
total_cost_usd: number;
|
|
376
|
+
usage: Usage;
|
|
377
|
+
permission_denials: PermissionDenial[];
|
|
378
|
+
structured_output?: unknown;
|
|
379
|
+
} | {
|
|
380
|
+
type: 'result';
|
|
381
|
+
subtype: 'error_during_execution' | 'error_max_turns' | 'error_max_budget_usd';
|
|
382
|
+
uuid: string;
|
|
383
|
+
session_id: string;
|
|
384
|
+
duration_ms: number;
|
|
385
|
+
duration_api_ms: number;
|
|
386
|
+
is_error: boolean;
|
|
387
|
+
num_turns: number;
|
|
388
|
+
total_cost_usd: number;
|
|
389
|
+
usage: Usage;
|
|
390
|
+
permission_denials: PermissionDenial[];
|
|
391
|
+
errors?: string[];
|
|
392
|
+
};
|
|
393
|
+
export type CompactBoundaryMessage = {
|
|
394
|
+
type: 'system';
|
|
395
|
+
subtype: 'compact_boundary';
|
|
396
|
+
uuid: string;
|
|
397
|
+
session_id: string;
|
|
398
|
+
compact_metadata: {
|
|
399
|
+
trigger: 'manual' | 'auto';
|
|
400
|
+
pre_tokens: number;
|
|
401
|
+
};
|
|
402
|
+
};
|
|
403
|
+
export type StatusMessage = {
|
|
404
|
+
type: 'system';
|
|
405
|
+
subtype: 'status';
|
|
406
|
+
status: 'compacting' | null;
|
|
407
|
+
uuid: string;
|
|
408
|
+
session_id: string;
|
|
409
|
+
};
|
|
410
|
+
export type ToolProgressMessage = {
|
|
411
|
+
type: 'tool_progress';
|
|
412
|
+
tool_use_id: string;
|
|
413
|
+
tool_name: string;
|
|
414
|
+
parent_tool_use_id: string | null;
|
|
415
|
+
elapsed_time_seconds: number;
|
|
416
|
+
uuid: string;
|
|
417
|
+
session_id: string;
|
|
418
|
+
};
|
|
419
|
+
export type Message = SystemMessage | UserMessage | AssistantMessage | PartialAssistantMessage | ResultMessage | CompactBoundaryMessage | StatusMessage | ToolProgressMessage;
|
|
420
|
+
export interface Query extends AsyncGenerator<Message, void> {
|
|
421
|
+
interrupt(): Promise<void>;
|
|
422
|
+
setPermissionMode(mode: PermissionMode): Promise<void>;
|
|
423
|
+
setModel(model?: string): Promise<void>;
|
|
424
|
+
setMaxThinkingTokens(maxThinkingTokens: number | null): Promise<void>;
|
|
425
|
+
supportedCommands(): Promise<SlashCommand[]>;
|
|
426
|
+
supportedModels(): Promise<ModelInfo[]>;
|
|
427
|
+
mcpServerStatus(): Promise<McpServerStatus[]>;
|
|
428
|
+
accountInfo(): Promise<AccountInfo>;
|
|
429
|
+
streamInput(stream: AsyncIterable<UserMessage>): Promise<void>;
|
|
430
|
+
}
|
|
431
|
+
export type SettingSource = 'user' | 'project' | 'local';
|
|
432
|
+
export type Options = {
|
|
433
|
+
/** Controller for cancelling the query */
|
|
434
|
+
abortController?: AbortController;
|
|
435
|
+
/** Additional directories Claude can access */
|
|
436
|
+
additionalDirectories?: string[];
|
|
437
|
+
/** Custom subagent definitions */
|
|
438
|
+
agents?: Record<string, AgentDefinition>;
|
|
439
|
+
/** List of allowed tool names */
|
|
440
|
+
allowedTools?: string[];
|
|
441
|
+
/** Custom permission handler */
|
|
442
|
+
canUseTool?: CanUseTool;
|
|
443
|
+
/** Continue the most recent conversation */
|
|
444
|
+
continue?: boolean;
|
|
445
|
+
/** Current working directory */
|
|
446
|
+
cwd?: string;
|
|
447
|
+
/** List of disallowed tool names */
|
|
448
|
+
disallowedTools?: string[];
|
|
449
|
+
/** Tool configuration */
|
|
450
|
+
tools?: string[] | {
|
|
451
|
+
type: 'preset';
|
|
452
|
+
preset: 'claude_code';
|
|
453
|
+
};
|
|
454
|
+
/** Environment variables */
|
|
455
|
+
env?: Record<string, string | undefined>;
|
|
456
|
+
/** JavaScript runtime */
|
|
457
|
+
executable?: 'bun' | 'deno' | 'node';
|
|
458
|
+
/** Additional runtime arguments */
|
|
459
|
+
executableArgs?: string[];
|
|
460
|
+
/** Additional CLI arguments */
|
|
461
|
+
extraArgs?: Record<string, string | null>;
|
|
462
|
+
/** Fallback model */
|
|
463
|
+
fallbackModel?: string;
|
|
464
|
+
/** Enable file checkpointing */
|
|
465
|
+
enableFileCheckpointing?: boolean;
|
|
466
|
+
/** Fork session when resuming */
|
|
467
|
+
forkSession?: boolean;
|
|
468
|
+
/** Hook callbacks */
|
|
469
|
+
hooks?: Partial<Record<HookEvent, HookCallbackMatcher[]>>;
|
|
470
|
+
/** Include partial/streaming messages */
|
|
471
|
+
includePartialMessages?: boolean;
|
|
472
|
+
/** Disable session persistence */
|
|
473
|
+
persistSession?: boolean;
|
|
474
|
+
/** Maximum thinking tokens */
|
|
475
|
+
maxThinkingTokens?: number;
|
|
476
|
+
/** Maximum conversation turns */
|
|
477
|
+
maxTurns?: number;
|
|
478
|
+
/** Maximum budget in USD */
|
|
479
|
+
maxBudgetUsd?: number;
|
|
480
|
+
/** MCP server configurations */
|
|
481
|
+
mcpServers?: Record<string, McpServerConfig>;
|
|
482
|
+
/** Model to use */
|
|
483
|
+
model?: string;
|
|
484
|
+
/** Output format configuration */
|
|
485
|
+
outputFormat?: OutputFormat;
|
|
486
|
+
/** Path to CLI executable */
|
|
487
|
+
pathToClaudeCodeExecutable?: string;
|
|
488
|
+
/** Permission mode */
|
|
489
|
+
permissionMode?: PermissionMode;
|
|
490
|
+
/** Require explicit flag for bypassPermissions */
|
|
491
|
+
allowDangerouslySkipPermissions?: boolean;
|
|
492
|
+
/** MCP tool name for permission prompts */
|
|
493
|
+
permissionPromptToolName?: string;
|
|
494
|
+
/** Session ID to resume */
|
|
495
|
+
resume?: string;
|
|
496
|
+
/** Resume at specific message ID */
|
|
497
|
+
resumeSessionAt?: string;
|
|
498
|
+
/** Sandbox settings */
|
|
499
|
+
sandbox?: SandboxSettings;
|
|
500
|
+
/** Settings sources to load */
|
|
501
|
+
settingSources?: SettingSource[];
|
|
502
|
+
/** Stderr callback */
|
|
503
|
+
stderr?: (data: string) => void;
|
|
504
|
+
/** Strict MCP config validation */
|
|
505
|
+
strictMcpConfig?: boolean;
|
|
506
|
+
/** System prompt configuration */
|
|
507
|
+
systemPrompt?: string | {
|
|
508
|
+
type: 'preset';
|
|
509
|
+
preset: 'claude_code';
|
|
510
|
+
append?: string;
|
|
511
|
+
};
|
|
512
|
+
};
|
|
513
|
+
export type SessionOptions = {
|
|
514
|
+
/** Model to use */
|
|
515
|
+
model: string;
|
|
516
|
+
/** Path to CLI executable */
|
|
517
|
+
pathToClaudeCodeExecutable?: string;
|
|
518
|
+
/** Executable to use */
|
|
519
|
+
executable?: 'node' | 'bun';
|
|
520
|
+
/** Arguments to pass to executable */
|
|
521
|
+
executableArgs?: string[];
|
|
522
|
+
/** Environment variables */
|
|
523
|
+
env?: Record<string, string | undefined>;
|
|
524
|
+
};
|
|
525
|
+
export interface Session {
|
|
526
|
+
readonly sessionId: string;
|
|
527
|
+
send(message: string | UserMessage): Promise<void>;
|
|
528
|
+
receive(): AsyncGenerator<Message, void>;
|
|
529
|
+
close(): void;
|
|
530
|
+
[Symbol.asyncDispose](): Promise<void>;
|
|
531
|
+
}
|
|
532
|
+
export interface ControlInitializeRequest {
|
|
533
|
+
subtype: 'initialize';
|
|
534
|
+
hooks?: Partial<Record<HookEvent, Array<{
|
|
535
|
+
matcher?: string;
|
|
536
|
+
hookCallbackIds: string[];
|
|
537
|
+
timeout?: number;
|
|
538
|
+
}>>>;
|
|
539
|
+
sdkMcpServers?: string[];
|
|
540
|
+
jsonSchema?: Record<string, unknown>;
|
|
541
|
+
systemPrompt?: string;
|
|
542
|
+
appendSystemPrompt?: string;
|
|
543
|
+
agents?: Record<string, unknown>;
|
|
544
|
+
}
|
|
545
|
+
export interface ControlInterruptRequest {
|
|
546
|
+
subtype: 'interrupt';
|
|
547
|
+
session_id?: string;
|
|
548
|
+
reason?: string;
|
|
549
|
+
}
|
|
550
|
+
export interface ControlSetPermissionModeRequest {
|
|
551
|
+
subtype: 'set_permission_mode';
|
|
552
|
+
session_id?: string;
|
|
553
|
+
mode: PermissionMode;
|
|
554
|
+
}
|
|
555
|
+
export interface ControlSetModelRequest {
|
|
556
|
+
subtype: 'set_model';
|
|
557
|
+
model?: string;
|
|
558
|
+
}
|
|
559
|
+
export interface ControlSetMaxThinkingTokensRequest {
|
|
560
|
+
subtype: 'set_max_thinking_tokens';
|
|
561
|
+
max_thinking_tokens: number | null;
|
|
562
|
+
}
|
|
563
|
+
export interface ControlHookCallbackRequest {
|
|
564
|
+
subtype: 'hook_callback';
|
|
565
|
+
callback_id: string;
|
|
566
|
+
input: HookInput;
|
|
567
|
+
tool_use_id?: string;
|
|
568
|
+
}
|
|
569
|
+
export interface ControlPermissionRequest {
|
|
570
|
+
subtype: 'can_use_tool';
|
|
571
|
+
tool_name: string;
|
|
572
|
+
input: Record<string, unknown>;
|
|
573
|
+
permission_suggestions?: unknown[];
|
|
574
|
+
blocked_path?: string;
|
|
575
|
+
decision_reason?: string;
|
|
576
|
+
tool_use_id: string;
|
|
577
|
+
agent_id?: string;
|
|
578
|
+
}
|
|
579
|
+
export type ControlRequestPayload = ControlInitializeRequest | ControlInterruptRequest | ControlSetPermissionModeRequest | ControlSetModelRequest | ControlSetMaxThinkingTokensRequest | ControlHookCallbackRequest | ControlPermissionRequest;
|
|
580
|
+
export interface ControlRequest {
|
|
581
|
+
type: 'control_request';
|
|
582
|
+
request_id: string;
|
|
583
|
+
request: ControlRequestPayload;
|
|
584
|
+
}
|
|
585
|
+
export interface ControlResponse {
|
|
586
|
+
subtype: 'success';
|
|
587
|
+
request_id: string;
|
|
588
|
+
response?: Record<string, unknown>;
|
|
589
|
+
}
|
|
590
|
+
export interface ControlErrorResponse {
|
|
591
|
+
subtype: 'error';
|
|
592
|
+
request_id: string;
|
|
593
|
+
error: string;
|
|
594
|
+
}
|
|
595
|
+
export interface ControlResponseMessage {
|
|
596
|
+
type: 'control_response';
|
|
597
|
+
response: ControlResponse | ControlErrorResponse;
|
|
598
|
+
}
|
|
599
|
+
export type ControlSignalMessage = ControlRequest | ControlResponseMessage;
|
|
600
|
+
export declare function isControlRequest(message: unknown): message is ControlRequest;
|
|
601
|
+
export declare function isControlResponse(message: unknown): message is ControlResponseMessage;
|
|
602
|
+
export declare function isMessage(message: unknown): message is Message;
|
|
603
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types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AsB,CAMrF;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,IAAI,OAAO,CAa9D"}
|
package/lib/types.js
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Genie Agent SDK Types
|
|
4
|
+
*
|
|
5
|
+
* Compatible with Claude Code Agent SDK interface.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.EXIT_REASONS = exports.HOOK_EVENTS = void 0;
|
|
9
|
+
exports.isControlRequest = isControlRequest;
|
|
10
|
+
exports.isControlResponse = isControlResponse;
|
|
11
|
+
exports.isMessage = isMessage;
|
|
12
|
+
// ============= Constants =============
|
|
13
|
+
exports.HOOK_EVENTS = [
|
|
14
|
+
'PreToolUse',
|
|
15
|
+
'PostToolUse',
|
|
16
|
+
'PostToolUseFailure',
|
|
17
|
+
'Notification',
|
|
18
|
+
'UserPromptSubmit',
|
|
19
|
+
'SessionStart',
|
|
20
|
+
'SessionEnd',
|
|
21
|
+
'Stop',
|
|
22
|
+
'SubagentStart',
|
|
23
|
+
'SubagentStop',
|
|
24
|
+
'PreCompact',
|
|
25
|
+
'PermissionRequest',
|
|
26
|
+
];
|
|
27
|
+
exports.EXIT_REASONS = [
|
|
28
|
+
'user_exit',
|
|
29
|
+
'interrupt',
|
|
30
|
+
'error',
|
|
31
|
+
'end_turn',
|
|
32
|
+
'max_turns',
|
|
33
|
+
'max_budget_usd',
|
|
34
|
+
];
|
|
35
|
+
// ============= Type Guards =============
|
|
36
|
+
function isControlRequest(message) {
|
|
37
|
+
return (typeof message === 'object' &&
|
|
38
|
+
message !== null &&
|
|
39
|
+
message.type === 'control_request');
|
|
40
|
+
}
|
|
41
|
+
function isControlResponse(message) {
|
|
42
|
+
return (typeof message === 'object' &&
|
|
43
|
+
message !== null &&
|
|
44
|
+
message.type === 'control_response');
|
|
45
|
+
}
|
|
46
|
+
function isMessage(message) {
|
|
47
|
+
if (typeof message !== 'object' || message === null) {
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
const type = message.type;
|
|
51
|
+
return (type === 'system' ||
|
|
52
|
+
type === 'user' ||
|
|
53
|
+
type === 'assistant' ||
|
|
54
|
+
type === 'stream_event' ||
|
|
55
|
+
type === 'result' ||
|
|
56
|
+
type === 'tool_progress');
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=types.js.map
|
package/lib/types.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AA0wBH,4CAMC;AAED,8CAMC;AAED,8BAaC;AAryBD,wCAAwC;AAE3B,QAAA,WAAW,GAAG;IACvB,YAAY;IACZ,aAAa;IACb,oBAAoB;IACpB,cAAc;IACd,kBAAkB;IAClB,cAAc;IACd,YAAY;IACZ,MAAM;IACN,eAAe;IACf,cAAc;IACd,YAAY;IACZ,mBAAmB;CACb,CAAC;AAEE,QAAA,YAAY,GAAG;IACxB,WAAW;IACX,WAAW;IACX,OAAO;IACP,UAAU;IACV,WAAW;IACX,gBAAgB;CACV,CAAC;AA8uBX,0CAA0C;AAE1C,SAAgB,gBAAgB,CAAC,OAAgB;IAC7C,OAAO,CACH,OAAO,OAAO,KAAK,QAAQ;QAC3B,OAAO,KAAK,IAAI;QACf,OAA0B,CAAC,IAAI,KAAK,iBAAiB,CACzD,CAAC;AACN,CAAC;AAED,SAAgB,iBAAiB,CAAC,OAAgB;IAC9C,OAAO,CACH,OAAO,OAAO,KAAK,QAAQ;QAC3B,OAAO,KAAK,IAAI;QACf,OAAkC,CAAC,IAAI,KAAK,kBAAkB,CAClE,CAAC;AACN,CAAC;AAED,SAAgB,SAAS,CAAC,OAAgB;IACtC,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;QAClD,OAAO,KAAK,CAAC;IACjB,CAAC;IACD,MAAM,IAAI,GAAI,OAA6B,CAAC,IAAI,CAAC;IACjD,OAAO,CACH,IAAI,KAAK,QAAQ;QACjB,IAAI,KAAK,MAAM;QACf,IAAI,KAAK,WAAW;QACpB,IAAI,KAAK,cAAc;QACvB,IAAI,KAAK,QAAQ;QACjB,IAAI,KAAK,eAAe,CAC3B,CAAC;AACN,CAAC"}
|