@kortix/sdk 0.13.46 → 0.13.47
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 +18 -13
- package/dist/browser/session-sync/server-transcript-mirror.d.ts +1 -1
- package/dist/browser/session-sync/server-transcript-mirror.d.ts.map +1 -1
- package/dist/browser/session-sync/session-sync-registry.d.ts +1 -1
- package/dist/browser/session-sync/session-sync-registry.d.ts.map +1 -1
- package/dist/browser/stores/opencode-pending-store.d.ts +1 -1
- package/dist/browser/stores/opencode-pending-store.d.ts.map +1 -1
- package/dist/browser/stores/sync-store/reconcile-parts.d.ts +1 -1
- package/dist/browser/stores/sync-store/reconcile-parts.d.ts.map +1 -1
- package/dist/browser/stores/sync-store/types.d.ts +1 -1
- package/dist/browser/stores/sync-store/types.d.ts.map +1 -1
- package/dist/browser/stores/sync-store.d.ts +1 -1
- package/dist/browser/stores/sync-store.d.ts.map +1 -1
- package/dist/core/agents/composer-agents.d.ts +1 -1
- package/dist/core/agents/composer-agents.d.ts.map +1 -1
- package/dist/core/client/kortix.d.ts +117 -59
- package/dist/core/client/kortix.d.ts.map +1 -1
- package/dist/core/client/kortix.js +59 -14
- package/dist/core/client/kortix.js.map +1 -1
- package/dist/core/models/composer-model.d.ts +1 -1
- package/dist/core/models/composer-model.d.ts.map +1 -1
- package/dist/core/models/model-flatten.d.ts +8 -1
- package/dist/core/models/model-flatten.d.ts.map +1 -1
- package/dist/core/models/model-flatten.js +2 -0
- package/dist/core/models/model-flatten.js.map +1 -1
- package/dist/core/models/model-key.d.ts +11 -0
- package/dist/core/models/model-key.d.ts.map +1 -1
- package/dist/core/models/model-key.js +20 -0
- package/dist/core/models/model-key.js.map +1 -1
- package/dist/core/models/provider-selection.d.ts +1 -1
- package/dist/core/models/provider-selection.d.ts.map +1 -1
- package/dist/core/rest/platform-client/host-boundary.d.ts +14 -19
- package/dist/core/rest/platform-client/host-boundary.d.ts.map +1 -1
- package/dist/core/rest/platform-client/host-boundary.js +7 -38
- package/dist/core/rest/platform-client/host-boundary.js.map +1 -1
- package/dist/core/rest/projects-client/agent-config.d.ts +8 -0
- package/dist/core/rest/projects-client/agent-config.d.ts.map +1 -1
- package/dist/core/rest/projects-client/agent-config.js.map +1 -1
- package/dist/core/rest/projects-client/audit-filter.d.ts +6 -0
- package/dist/core/rest/projects-client/audit-filter.d.ts.map +1 -0
- package/dist/core/rest/projects-client/audit-filter.js +11 -0
- package/dist/core/rest/projects-client/audit-filter.js.map +1 -0
- package/dist/core/rest/projects-client/audit.d.ts +2 -18
- package/dist/core/rest/projects-client/audit.d.ts.map +1 -1
- package/dist/core/rest/projects-client/audit.js +30 -108
- package/dist/core/rest/projects-client/audit.js.map +1 -1
- package/dist/core/rest/projects-client/connectors.d.ts +4 -3
- package/dist/core/rest/projects-client/connectors.d.ts.map +1 -1
- package/dist/core/rest/projects-client/connectors.js.map +1 -1
- package/dist/core/rest/projects-client/iam-roles.d.ts +5 -0
- package/dist/core/rest/projects-client/iam-roles.d.ts.map +1 -1
- package/dist/core/rest/projects-client/iam-roles.js +9 -0
- package/dist/core/rest/projects-client/iam-roles.js.map +1 -1
- package/dist/core/rest/projects-client/projects.d.ts +8 -5
- package/dist/core/rest/projects-client/projects.d.ts.map +1 -1
- package/dist/core/rest/projects-client/projects.js +0 -1
- package/dist/core/rest/projects-client/projects.js.map +1 -1
- package/dist/core/rest/projects-client/secrets.d.ts +17 -8
- package/dist/core/rest/projects-client/secrets.d.ts.map +1 -1
- package/dist/core/rest/projects-client/secrets.js.map +1 -1
- package/dist/core/rest/projects-client/sessions.d.ts +4 -1
- package/dist/core/rest/projects-client/sessions.d.ts.map +1 -1
- package/dist/core/rest/projects-client/sessions.js.map +1 -1
- package/dist/core/rest/projects-client/triggers.d.ts +12 -0
- package/dist/core/rest/projects-client/triggers.d.ts.map +1 -1
- package/dist/core/rest/projects-client/triggers.js.map +1 -1
- package/dist/core/runtime/client.d.ts +12 -11
- package/dist/core/runtime/client.d.ts.map +1 -1
- package/dist/core/runtime/client.js +9 -4
- package/dist/core/runtime/client.js.map +1 -1
- package/dist/core/runtime/runtime-rest-client.d.ts +436 -0
- package/dist/core/runtime/runtime-rest-client.d.ts.map +1 -0
- package/dist/core/runtime/runtime-rest-client.js +291 -0
- package/dist/core/runtime/runtime-rest-client.js.map +1 -0
- package/dist/core/runtime/runtime-types.d.ts +1174 -0
- package/dist/core/runtime/runtime-types.d.ts.map +1 -0
- package/dist/core/runtime/runtime-types.js +2 -0
- package/dist/core/runtime/runtime-types.js.map +1 -0
- package/dist/core/runtime/transcript-types.d.ts +564 -0
- package/dist/core/runtime/transcript-types.d.ts.map +1 -0
- package/dist/core/runtime/transcript-types.js +57 -0
- package/dist/core/runtime/transcript-types.js.map +1 -0
- package/dist/core/session/health.d.ts +2 -1
- package/dist/core/session/health.d.ts.map +1 -1
- package/dist/core/session/health.js.map +1 -1
- package/dist/core/session/index.d.ts +2 -0
- package/dist/core/session/index.d.ts.map +1 -1
- package/dist/core/session/index.js +1 -0
- package/dist/core/session/index.js.map +1 -1
- package/dist/core/session/runtime-sessions.d.ts +26 -0
- package/dist/core/session/runtime-sessions.d.ts.map +1 -0
- package/dist/core/session/runtime-sessions.js +39 -0
- package/dist/core/session/runtime-sessions.js.map +1 -0
- package/dist/core/session/runtime-verbs.d.ts +55 -0
- package/dist/core/session/runtime-verbs.d.ts.map +1 -0
- package/dist/core/session/runtime-verbs.js +124 -0
- package/dist/core/session/runtime-verbs.js.map +1 -0
- package/dist/core/session/wire-message-id.d.ts +55 -12
- package/dist/core/session/wire-message-id.d.ts.map +1 -1
- package/dist/core/session/wire-message-id.js +62 -12
- package/dist/core/session/wire-message-id.js.map +1 -1
- package/dist/core/session-sync/session-sync-controller.d.ts +1 -1
- package/dist/core/session-sync/session-sync-controller.d.ts.map +1 -1
- package/dist/core/stream/event-stream.d.ts +10 -5
- package/dist/core/stream/event-stream.d.ts.map +1 -1
- package/dist/core/stream/event-stream.js +5 -1
- package/dist/core/stream/event-stream.js.map +1 -1
- package/dist/core/turns/classify.d.ts +31 -2
- package/dist/core/turns/classify.d.ts.map +1 -1
- package/dist/core/turns/classify.js +94 -0
- package/dist/core/turns/classify.js.map +1 -1
- package/dist/core/turns/index.d.ts +1 -0
- package/dist/core/turns/index.d.ts.map +1 -1
- package/dist/core/turns/index.js +1 -0
- package/dist/core/turns/index.js.map +1 -1
- package/dist/core/turns/parts.d.ts +2 -1
- package/dist/core/turns/parts.d.ts.map +1 -1
- package/dist/core/turns/parts.js +53 -49
- package/dist/core/turns/parts.js.map +1 -1
- package/dist/core/turns/segments/narration.d.ts.map +1 -1
- package/dist/core/turns/segments/narration.js +40 -130
- package/dist/core/turns/segments/narration.js.map +1 -1
- package/dist/core/turns/tool-kind.d.ts +15 -0
- package/dist/core/turns/tool-kind.d.ts.map +1 -0
- package/dist/core/turns/tool-kind.js +115 -0
- package/dist/core/turns/tool-kind.js.map +1 -0
- package/dist/core/turns/tool-registry.d.ts +6 -7
- package/dist/core/turns/tool-registry.d.ts.map +1 -1
- package/dist/core/turns/tool-registry.js +78 -73
- package/dist/core/turns/tool-registry.js.map +1 -1
- package/dist/core/turns/tools/tool-meta.d.ts +1 -0
- package/dist/core/turns/tools/tool-meta.d.ts.map +1 -1
- package/dist/core/turns/tools/tool-meta.js +7 -6
- package/dist/core/turns/tools/tool-meta.js.map +1 -1
- package/dist/core/turns/view-model.d.ts.map +1 -1
- package/dist/core/turns/view-model.js +19 -12
- package/dist/core/turns/view-model.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/kortix.esm.min.js +42 -41
- package/dist/kortix.global.js +42 -41
- package/dist/node/app-viewer.js +1 -1
- package/dist/node/app-viewer.js.map +1 -1
- package/dist/node/auth.js +1 -1
- package/dist/node/auth.js.map +1 -1
- package/dist/node/scoped-client.d.ts +20 -0
- package/dist/node/scoped-client.d.ts.map +1 -0
- package/dist/node/scoped-client.js +170 -0
- package/dist/node/scoped-client.js.map +1 -0
- package/dist/node/server.d.ts +2 -21
- package/dist/node/server.d.ts.map +1 -1
- package/dist/node/server.js +2 -170
- package/dist/node/server.js.map +1 -1
- package/dist/react/index.d.ts +1 -0
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +1 -0
- package/dist/react/index.js.map +1 -1
- package/dist/react/sign-in-with-kortix.d.ts +8 -8
- package/dist/react/use-feature-flag.d.ts +2 -2
- package/dist/react/use-feature-flag.d.ts.map +1 -1
- package/dist/react/use-feature-flag.js +3 -2
- package/dist/react/use-feature-flag.js.map +1 -1
- package/dist/react/use-kortix-master.d.ts +1 -1
- package/dist/react/use-opencode-config.d.ts +7 -1
- package/dist/react/use-opencode-config.d.ts.map +1 -1
- package/dist/react/use-opencode-config.js +9 -1
- package/dist/react/use-opencode-config.js.map +1 -1
- package/dist/react/use-opencode-events/diagnostics.d.ts +1 -1
- package/dist/react/use-opencode-events/diagnostics.d.ts.map +1 -1
- package/dist/react/use-opencode-events/handle-event.d.ts +4 -6
- package/dist/react/use-opencode-events/handle-event.d.ts.map +1 -1
- package/dist/react/use-opencode-events/handle-event.js +43 -594
- package/dist/react/use-opencode-events/handle-event.js.map +1 -1
- package/dist/react/use-opencode-events/handle-interaction-event.d.ts +4 -0
- package/dist/react/use-opencode-events/handle-interaction-event.d.ts.map +1 -0
- package/dist/react/use-opencode-events/handle-interaction-event.js +42 -0
- package/dist/react/use-opencode-events/handle-interaction-event.js.map +1 -0
- package/dist/react/use-opencode-events/handle-message-event.d.ts +4 -0
- package/dist/react/use-opencode-events/handle-message-event.d.ts.map +1 -0
- package/dist/react/use-opencode-events/handle-message-event.js +33 -0
- package/dist/react/use-opencode-events/handle-message-event.js.map +1 -0
- package/dist/react/use-opencode-events/handle-session-event.d.ts +5 -0
- package/dist/react/use-opencode-events/handle-session-event.d.ts.map +1 -0
- package/dist/react/use-opencode-events/handle-session-event.js +243 -0
- package/dist/react/use-opencode-events/handle-session-event.js.map +1 -0
- package/dist/react/use-opencode-events/handle-workspace-event.d.ts +4 -0
- package/dist/react/use-opencode-events/handle-workspace-event.d.ts.map +1 -0
- package/dist/react/use-opencode-events/handle-workspace-event.js +113 -0
- package/dist/react/use-opencode-events/handle-workspace-event.js.map +1 -0
- package/dist/react/use-opencode-events/handler-context.d.ts +29 -0
- package/dist/react/use-opencode-events/handler-context.d.ts.map +1 -0
- package/dist/react/use-opencode-events/handler-context.js +2 -0
- package/dist/react/use-opencode-events/handler-context.js.map +1 -0
- package/dist/react/use-opencode-events/hydrate-core.d.ts +23 -0
- package/dist/react/use-opencode-events/hydrate-core.d.ts.map +1 -0
- package/dist/react/use-opencode-events/hydrate-core.js +126 -0
- package/dist/react/use-opencode-events/hydrate-core.js.map +1 -0
- package/dist/react/use-opencode-events/index.d.ts.map +1 -1
- package/dist/react/use-opencode-events/index.js +25 -143
- package/dist/react/use-opencode-events/index.js.map +1 -1
- package/dist/react/use-opencode-events/use-event-stream-refs.d.ts +1 -1
- package/dist/react/use-opencode-events/use-event-stream-refs.d.ts.map +1 -1
- package/dist/react/use-opencode-local.d.ts +1 -1
- package/dist/react/use-opencode-local.d.ts.map +1 -1
- package/dist/react/use-opencode-sessions/agents.d.ts +1 -1
- package/dist/react/use-opencode-sessions/agents.d.ts.map +1 -1
- package/dist/react/use-opencode-sessions/commands.d.ts +4 -1
- package/dist/react/use-opencode-sessions/commands.d.ts.map +1 -1
- package/dist/react/use-opencode-sessions/commands.js +6 -1
- package/dist/react/use-opencode-sessions/commands.js.map +1 -1
- package/dist/react/use-opencode-sessions/keys.d.ts +1 -1
- package/dist/react/use-opencode-sessions/keys.d.ts.map +1 -1
- package/dist/react/use-opencode-sessions/mcp.d.ts +1 -1
- package/dist/react/use-opencode-sessions/mcp.d.ts.map +1 -1
- package/dist/react/use-opencode-sessions/messages.d.ts.map +1 -1
- package/dist/react/use-opencode-sessions/messages.js +8 -2
- package/dist/react/use-opencode-sessions/messages.js.map +1 -1
- package/dist/react/use-opencode-sessions/parts.d.ts +2 -2
- package/dist/react/use-opencode-sessions/parts.d.ts.map +1 -1
- package/dist/react/use-opencode-sessions/projects.d.ts +1 -1
- package/dist/react/use-opencode-sessions/projects.d.ts.map +1 -1
- package/dist/react/use-opencode-sessions/providers.d.ts +1 -1
- package/dist/react/use-opencode-sessions/sessions.d.ts +3 -3
- package/dist/react/use-opencode-sessions/sessions.d.ts.map +1 -1
- package/dist/react/use-opencode-sessions/sharing.d.ts +1 -1
- package/dist/react/use-opencode-sessions/sharing.d.ts.map +1 -1
- package/dist/react/use-opencode-sessions/vcs.d.ts +1 -1
- package/dist/react/use-opencode-sessions/vcs.d.ts.map +1 -1
- package/dist/react/use-project-gateway.d.ts +28 -0
- package/dist/react/use-project-gateway.d.ts.map +1 -0
- package/dist/react/use-project-gateway.js +120 -0
- package/dist/react/use-project-gateway.js.map +1 -0
- package/dist/react/use-project-secrets.d.ts +6 -6
- package/dist/react/use-session-sync.d.ts +4 -5
- package/dist/react/use-session-sync.d.ts.map +1 -1
- package/dist/react/use-session-working.d.ts +1 -1
- package/dist/react/use-session-working.d.ts.map +1 -1
- package/dist/react/use-session.d.ts +18 -8
- package/dist/react/use-session.d.ts.map +1 -1
- package/dist/react/use-session.js +56 -11
- package/dist/react/use-session.js.map +1 -1
- package/dist/react/use-teams-installations.d.ts +14 -0
- package/dist/react/use-teams-installations.d.ts.map +1 -1
- package/dist/react/use-teams-installations.js.map +1 -1
- package/dist/react/use-visible-agents.d.ts +1 -1
- package/dist/react/use-visible-agents.d.ts.map +1 -1
- package/dist/transcript.d.ts +1 -1
- package/dist/transcript.d.ts.map +1 -1
- package/dist/workspace-search/client.d.ts +20 -0
- package/dist/workspace-search/client.d.ts.map +1 -0
- package/dist/workspace-search/client.js +235 -0
- package/dist/workspace-search/client.js.map +1 -0
- package/dist/workspace-search/core.d.ts.map +1 -1
- package/dist/workspace-search/core.js +9 -2
- package/dist/workspace-search/core.js.map +1 -1
- package/dist/workspace-search/index.d.ts +3 -0
- package/dist/workspace-search/index.d.ts.map +1 -0
- package/dist/workspace-search/index.js +3 -0
- package/dist/workspace-search/index.js.map +1 -0
- package/package.json +7 -5
- package/dist/core/runtime/opencode-v2-event-aliases.d.ts +0 -184
- package/dist/core/runtime/opencode-v2-event-aliases.d.ts.map +0 -1
- package/dist/core/runtime/opencode-v2-event-aliases.js +0 -2
- package/dist/core/runtime/opencode-v2-event-aliases.js.map +0 -1
|
@@ -0,0 +1,1174 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The types of the runtime surfaces this SDK still reads through the
|
|
3
|
+
* session runtime's REST compatibility routes (sessions, agents, commands,
|
|
4
|
+
* config, providers, MCP, projects, worktrees, pty) and of the runtime event
|
|
5
|
+
* stream.
|
|
6
|
+
*
|
|
7
|
+
* The declarations below the aliases are copied from `@opencode-ai/sdk`
|
|
8
|
+
* 1.18.23 and frozen: this package no longer depends on that one, so an
|
|
9
|
+
* OpenCode upgrade cannot change what it publishes. They go when the
|
|
10
|
+
* compatibility routes do.
|
|
11
|
+
*
|
|
12
|
+
* The transcript is Kortix's own format (`transcript-types.ts`,
|
|
13
|
+
* `kortix.transcript.v1`). The names this SDK published for it before v1 are
|
|
14
|
+
* the aliases right below.
|
|
15
|
+
*/
|
|
16
|
+
import type { KortixAbortedError, KortixAgentPart, KortixApiError, KortixAssistantMessageInfo, KortixCompactionPart, KortixContentFilterError, KortixContextOverflowError, KortixFileDiff, KortixFilePart, KortixFilePartSource, KortixFilePartSourceText, KortixMessageInfo, KortixOutputLengthError, KortixPart, KortixPatchPart, KortixProviderAuthError, KortixReasoningPart, KortixRetryPart, KortixSessionStatus, KortixSnapshotPart, KortixStepFinishPart, KortixStepStartPart, KortixStructuredOutputError, KortixSubtaskPart, KortixTextPart, KortixTodo, KortixToolPart, KortixToolState, KortixToolStateCompleted, KortixToolStateError, KortixToolStatePending, KortixToolStateRunning, KortixUnknownError, KortixUserMessageInfo, RuntimePermissionRequest, RuntimeQuestion, RuntimeQuestionAnswer, RuntimeQuestionOption, RuntimeQuestionRequest, RuntimeToolRef } from './transcript-types.js';
|
|
17
|
+
/** A message's `info`: the user or assistant half of `{ info, parts }`. */
|
|
18
|
+
export type Message = KortixMessageInfo;
|
|
19
|
+
export type UserMessage = KortixUserMessageInfo;
|
|
20
|
+
export type AssistantMessage = KortixAssistantMessageInfo;
|
|
21
|
+
export type Part = KortixPart;
|
|
22
|
+
export type TextPart = KortixTextPart;
|
|
23
|
+
export type SubtaskPart = KortixSubtaskPart;
|
|
24
|
+
export type ReasoningPart = KortixReasoningPart;
|
|
25
|
+
export type FilePart = KortixFilePart;
|
|
26
|
+
export type FilePartSource = KortixFilePartSource;
|
|
27
|
+
export type FilePartSourceText = KortixFilePartSourceText;
|
|
28
|
+
export type ToolPart = KortixToolPart;
|
|
29
|
+
export type ToolState = KortixToolState;
|
|
30
|
+
export type ToolStatePending = KortixToolStatePending;
|
|
31
|
+
export type ToolStateRunning = KortixToolStateRunning;
|
|
32
|
+
export type ToolStateCompleted = KortixToolStateCompleted;
|
|
33
|
+
export type ToolStateError = KortixToolStateError;
|
|
34
|
+
export type StepStartPart = KortixStepStartPart;
|
|
35
|
+
export type StepFinishPart = KortixStepFinishPart;
|
|
36
|
+
export type SnapshotPart = KortixSnapshotPart;
|
|
37
|
+
export type PatchPart = KortixPatchPart;
|
|
38
|
+
export type AgentPart = KortixAgentPart;
|
|
39
|
+
export type RetryPart = KortixRetryPart;
|
|
40
|
+
export type CompactionPart = KortixCompactionPart;
|
|
41
|
+
export type SnapshotFileDiff = KortixFileDiff;
|
|
42
|
+
export type SessionStatus = KortixSessionStatus;
|
|
43
|
+
export type PermissionRequest = RuntimePermissionRequest;
|
|
44
|
+
export type QuestionRequest = RuntimeQuestionRequest;
|
|
45
|
+
export type QuestionInfo = RuntimeQuestion;
|
|
46
|
+
export type QuestionOption = RuntimeQuestionOption;
|
|
47
|
+
export type QuestionAnswer = RuntimeQuestionAnswer;
|
|
48
|
+
export type QuestionTool = RuntimeToolRef;
|
|
49
|
+
export type Todo = KortixTodo;
|
|
50
|
+
export type ProviderAuthError = KortixProviderAuthError;
|
|
51
|
+
export type UnknownError = KortixUnknownError;
|
|
52
|
+
export type MessageOutputLengthError = KortixOutputLengthError;
|
|
53
|
+
export type MessageAbortedError = KortixAbortedError;
|
|
54
|
+
export type StructuredOutputError = KortixStructuredOutputError;
|
|
55
|
+
export type ContextOverflowError = KortixContextOverflowError;
|
|
56
|
+
export type ContentFilterError = KortixContentFilterError;
|
|
57
|
+
/** Not exported: `ApiError` is this SDK's HTTP error class. */
|
|
58
|
+
type ApiError = KortixApiError;
|
|
59
|
+
/**
|
|
60
|
+
* An event the session runtime streams: the Kortix session events
|
|
61
|
+
* (`KortixSessionEvent`) and the harness events this SDK handles (session
|
|
62
|
+
* tree, diffs, pty, lsp, vcs, worktrees). `id` is the stream position.
|
|
63
|
+
*/
|
|
64
|
+
export type Event = EventServerInstanceDisposed | EventSessionCreated | EventSessionUpdated | EventSessionDeleted | EventMessageUpdated | EventMessageRemoved | EventMessagePartUpdated | EventMessagePartRemoved | EventSessionNextRevertStaged | EventSessionNextRevertCleared | EventSessionNextRevertCommitted | EventMessagePartDelta | EventSessionDiff | EventSessionError | EventInstallationUpdated | EventInstallationUpdateAvailable | EventFileEdited | EventPtyCreated | EventPtyUpdated | EventPtyExited | EventPtyDeleted | EventTodoUpdated | EventLspUpdated | EventPermissionAsked | EventPermissionReplied | EventMcpToolsChanged | EventProjectUpdated | EventSessionStatus | EventSessionIdle | EventQuestionAsked | EventQuestionReplied | EventQuestionRejected | EventSessionCompacted | EventVcsBranchUpdated | EventWorktreeReady | EventWorktreeFailed | EventServerConnected;
|
|
65
|
+
export type OAuth = {
|
|
66
|
+
type: "oauth";
|
|
67
|
+
refresh: string;
|
|
68
|
+
access: string;
|
|
69
|
+
expires: number;
|
|
70
|
+
accountId?: string;
|
|
71
|
+
enterpriseUrl?: string;
|
|
72
|
+
};
|
|
73
|
+
export type ApiAuth = {
|
|
74
|
+
type: "api";
|
|
75
|
+
key: string;
|
|
76
|
+
metadata?: {
|
|
77
|
+
[key: string]: string;
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
export type WellKnownAuth = {
|
|
81
|
+
type: "wellknown";
|
|
82
|
+
key: string;
|
|
83
|
+
token: string;
|
|
84
|
+
};
|
|
85
|
+
export type Auth = OAuth | ApiAuth | WellKnownAuth;
|
|
86
|
+
export type PermissionAction = "allow" | "deny" | "ask";
|
|
87
|
+
export type PermissionRule = {
|
|
88
|
+
permission: string;
|
|
89
|
+
pattern: string;
|
|
90
|
+
action: PermissionAction;
|
|
91
|
+
};
|
|
92
|
+
export type PermissionRuleset = Array<PermissionRule>;
|
|
93
|
+
export type Session = {
|
|
94
|
+
id: string;
|
|
95
|
+
slug: string;
|
|
96
|
+
projectID: string;
|
|
97
|
+
workspaceID?: string;
|
|
98
|
+
directory: string;
|
|
99
|
+
path?: string;
|
|
100
|
+
parentID?: string;
|
|
101
|
+
summary?: {
|
|
102
|
+
additions: number;
|
|
103
|
+
deletions: number;
|
|
104
|
+
files: number;
|
|
105
|
+
diffs?: Array<SnapshotFileDiff>;
|
|
106
|
+
};
|
|
107
|
+
cost?: number;
|
|
108
|
+
tokens?: {
|
|
109
|
+
input: number;
|
|
110
|
+
output: number;
|
|
111
|
+
reasoning: number;
|
|
112
|
+
cache: {
|
|
113
|
+
read: number;
|
|
114
|
+
write: number;
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
share?: {
|
|
118
|
+
url: string;
|
|
119
|
+
};
|
|
120
|
+
title: string;
|
|
121
|
+
agent?: string;
|
|
122
|
+
model?: {
|
|
123
|
+
id: string;
|
|
124
|
+
providerID: string;
|
|
125
|
+
variant?: string;
|
|
126
|
+
};
|
|
127
|
+
version: string;
|
|
128
|
+
metadata?: {
|
|
129
|
+
[key: string]: unknown;
|
|
130
|
+
};
|
|
131
|
+
time: {
|
|
132
|
+
created: number;
|
|
133
|
+
updated: number;
|
|
134
|
+
compacting?: number;
|
|
135
|
+
archived?: number;
|
|
136
|
+
};
|
|
137
|
+
permission?: PermissionRuleset;
|
|
138
|
+
revert?: {
|
|
139
|
+
messageID: string;
|
|
140
|
+
partID?: string;
|
|
141
|
+
snapshot?: string;
|
|
142
|
+
diff?: string;
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
export type OutputFormatText = {
|
|
146
|
+
type: "text";
|
|
147
|
+
};
|
|
148
|
+
export type JsonSchema = {
|
|
149
|
+
[key: string]: unknown;
|
|
150
|
+
};
|
|
151
|
+
export type OutputFormatJsonSchema = {
|
|
152
|
+
type: "json_schema";
|
|
153
|
+
schema: JsonSchema;
|
|
154
|
+
retryCount?: number;
|
|
155
|
+
};
|
|
156
|
+
export type OutputFormat = OutputFormatText | OutputFormatJsonSchema;
|
|
157
|
+
export type Pty = {
|
|
158
|
+
id: string;
|
|
159
|
+
title: string;
|
|
160
|
+
command: string;
|
|
161
|
+
args: Array<string>;
|
|
162
|
+
cwd: string;
|
|
163
|
+
status: "running" | "exited";
|
|
164
|
+
pid: number;
|
|
165
|
+
exitCode?: number;
|
|
166
|
+
};
|
|
167
|
+
/**
|
|
168
|
+
* Log level
|
|
169
|
+
*/
|
|
170
|
+
export type LogLevel = "DEBUG" | "INFO" | "WARN" | "ERROR";
|
|
171
|
+
/**
|
|
172
|
+
* Server configuration for opencode serve and web commands
|
|
173
|
+
*/
|
|
174
|
+
export type ServerConfig = {
|
|
175
|
+
port?: number;
|
|
176
|
+
hostname?: string;
|
|
177
|
+
mdns?: boolean;
|
|
178
|
+
mdnsDomain?: string;
|
|
179
|
+
cors?: Array<string>;
|
|
180
|
+
};
|
|
181
|
+
export type PermissionActionConfig = "ask" | "allow" | "deny";
|
|
182
|
+
export type PermissionObjectConfig = {
|
|
183
|
+
[key: string]: PermissionActionConfig;
|
|
184
|
+
};
|
|
185
|
+
export type PermissionRuleConfig = PermissionActionConfig | PermissionObjectConfig;
|
|
186
|
+
export type PermissionConfig = PermissionActionConfig | {
|
|
187
|
+
read?: PermissionRuleConfig;
|
|
188
|
+
edit?: PermissionRuleConfig;
|
|
189
|
+
glob?: PermissionRuleConfig;
|
|
190
|
+
grep?: PermissionRuleConfig;
|
|
191
|
+
list?: PermissionRuleConfig;
|
|
192
|
+
bash?: PermissionRuleConfig;
|
|
193
|
+
task?: PermissionRuleConfig;
|
|
194
|
+
external_directory?: PermissionRuleConfig;
|
|
195
|
+
todowrite?: PermissionActionConfig;
|
|
196
|
+
question?: PermissionActionConfig;
|
|
197
|
+
webfetch?: PermissionActionConfig;
|
|
198
|
+
websearch?: PermissionActionConfig;
|
|
199
|
+
lsp?: PermissionRuleConfig;
|
|
200
|
+
doom_loop?: PermissionActionConfig;
|
|
201
|
+
skill?: PermissionRuleConfig;
|
|
202
|
+
[key: string]: PermissionRuleConfig | PermissionActionConfig | undefined;
|
|
203
|
+
};
|
|
204
|
+
export type AgentConfig = {
|
|
205
|
+
model?: string;
|
|
206
|
+
variant?: string;
|
|
207
|
+
temperature?: number;
|
|
208
|
+
top_p?: number;
|
|
209
|
+
prompt?: string;
|
|
210
|
+
tools?: {
|
|
211
|
+
[key: string]: boolean;
|
|
212
|
+
};
|
|
213
|
+
disable?: boolean;
|
|
214
|
+
description?: string;
|
|
215
|
+
mode?: "subagent" | "primary" | "all";
|
|
216
|
+
hidden?: boolean;
|
|
217
|
+
options?: {
|
|
218
|
+
[key: string]: unknown;
|
|
219
|
+
};
|
|
220
|
+
/**
|
|
221
|
+
* Hex color code (e.g., #FF5733) or theme color (e.g., primary)
|
|
222
|
+
*/
|
|
223
|
+
color?: string | "primary" | "secondary" | "accent" | "success" | "warning" | "error" | "info";
|
|
224
|
+
steps?: number;
|
|
225
|
+
maxSteps?: number;
|
|
226
|
+
permission?: PermissionConfig;
|
|
227
|
+
[key: string]: unknown | string | number | {
|
|
228
|
+
[key: string]: boolean;
|
|
229
|
+
} | boolean | "subagent" | "primary" | "all" | {
|
|
230
|
+
[key: string]: unknown;
|
|
231
|
+
} | string | "primary" | "secondary" | "accent" | "success" | "warning" | "error" | "info" | number | PermissionConfig | undefined;
|
|
232
|
+
};
|
|
233
|
+
export type ProviderConfig = {
|
|
234
|
+
api?: string;
|
|
235
|
+
name?: string;
|
|
236
|
+
env?: Array<string>;
|
|
237
|
+
id?: string;
|
|
238
|
+
npm?: string;
|
|
239
|
+
whitelist?: Array<string>;
|
|
240
|
+
blacklist?: Array<string>;
|
|
241
|
+
options?: {
|
|
242
|
+
apiKey?: string;
|
|
243
|
+
baseURL?: string;
|
|
244
|
+
enterpriseUrl?: string;
|
|
245
|
+
setCacheKey?: boolean;
|
|
246
|
+
/**
|
|
247
|
+
* Timeout in milliseconds for full requests to this provider. Set to false to disable timeout.
|
|
248
|
+
*/
|
|
249
|
+
timeout?: number | false;
|
|
250
|
+
/**
|
|
251
|
+
* Timeout in milliseconds to wait for response headers. Provider integrations may set defaults. Set to false to disable timeout.
|
|
252
|
+
*/
|
|
253
|
+
headerTimeout?: number | false;
|
|
254
|
+
chunkTimeout?: number;
|
|
255
|
+
[key: string]: unknown | string | boolean | number | false | number | false | number | undefined;
|
|
256
|
+
};
|
|
257
|
+
models?: {
|
|
258
|
+
[key: string]: {
|
|
259
|
+
id?: string;
|
|
260
|
+
name?: string;
|
|
261
|
+
family?: string;
|
|
262
|
+
release_date?: string;
|
|
263
|
+
attachment?: boolean;
|
|
264
|
+
reasoning?: boolean;
|
|
265
|
+
temperature?: boolean;
|
|
266
|
+
tool_call?: boolean;
|
|
267
|
+
interleaved?: boolean | "reasoning" | "reasoning_content" | "reasoning_text" | string | {
|
|
268
|
+
field: "reasoning" | "reasoning_content" | "reasoning_text" | string;
|
|
269
|
+
};
|
|
270
|
+
cost?: {
|
|
271
|
+
input: number;
|
|
272
|
+
output: number;
|
|
273
|
+
cache_read?: number;
|
|
274
|
+
cache_write?: number;
|
|
275
|
+
context_over_200k?: {
|
|
276
|
+
input: number;
|
|
277
|
+
output: number;
|
|
278
|
+
cache_read?: number;
|
|
279
|
+
cache_write?: number;
|
|
280
|
+
};
|
|
281
|
+
};
|
|
282
|
+
limit?: {
|
|
283
|
+
context: number;
|
|
284
|
+
input?: number;
|
|
285
|
+
output: number;
|
|
286
|
+
};
|
|
287
|
+
modalities?: {
|
|
288
|
+
input?: Array<"text" | "audio" | "image" | "video" | "pdf">;
|
|
289
|
+
output?: Array<"text" | "audio" | "image" | "video" | "pdf">;
|
|
290
|
+
};
|
|
291
|
+
experimental?: boolean;
|
|
292
|
+
status?: "alpha" | "beta" | "deprecated" | "active";
|
|
293
|
+
provider?: {
|
|
294
|
+
npm?: string;
|
|
295
|
+
api?: string;
|
|
296
|
+
};
|
|
297
|
+
options?: {
|
|
298
|
+
[key: string]: unknown;
|
|
299
|
+
};
|
|
300
|
+
headers?: {
|
|
301
|
+
[key: string]: string;
|
|
302
|
+
};
|
|
303
|
+
/**
|
|
304
|
+
* Variant-specific configuration
|
|
305
|
+
*/
|
|
306
|
+
variants?: {
|
|
307
|
+
[key: string]: {
|
|
308
|
+
disabled?: boolean;
|
|
309
|
+
[key: string]: unknown | boolean | undefined;
|
|
310
|
+
};
|
|
311
|
+
};
|
|
312
|
+
};
|
|
313
|
+
};
|
|
314
|
+
};
|
|
315
|
+
export type McpLocalConfig = {
|
|
316
|
+
/**
|
|
317
|
+
* Type of MCP server connection
|
|
318
|
+
*/
|
|
319
|
+
type: "local";
|
|
320
|
+
/**
|
|
321
|
+
* Command and arguments to run the MCP server
|
|
322
|
+
*/
|
|
323
|
+
command: Array<string>;
|
|
324
|
+
cwd?: string;
|
|
325
|
+
environment?: {
|
|
326
|
+
[key: string]: string;
|
|
327
|
+
};
|
|
328
|
+
enabled?: boolean;
|
|
329
|
+
timeout?: number;
|
|
330
|
+
};
|
|
331
|
+
export type McpOAuthConfig = {
|
|
332
|
+
clientId?: string;
|
|
333
|
+
clientSecret?: string;
|
|
334
|
+
scope?: string;
|
|
335
|
+
callbackPort?: number;
|
|
336
|
+
redirectUri?: string;
|
|
337
|
+
};
|
|
338
|
+
export type McpRemoteConfig = {
|
|
339
|
+
/**
|
|
340
|
+
* Type of MCP server connection
|
|
341
|
+
*/
|
|
342
|
+
type: "remote";
|
|
343
|
+
/**
|
|
344
|
+
* URL of the remote MCP server
|
|
345
|
+
*/
|
|
346
|
+
url: string;
|
|
347
|
+
enabled?: boolean;
|
|
348
|
+
headers?: {
|
|
349
|
+
[key: string]: string;
|
|
350
|
+
};
|
|
351
|
+
/**
|
|
352
|
+
* OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection.
|
|
353
|
+
*/
|
|
354
|
+
oauth?: McpOAuthConfig | false;
|
|
355
|
+
timeout?: number;
|
|
356
|
+
};
|
|
357
|
+
/**
|
|
358
|
+
* @deprecated Always uses stretch layout.
|
|
359
|
+
*/
|
|
360
|
+
export type LayoutConfig = "auto" | "stretch";
|
|
361
|
+
export type ImageAttachmentConfig = {
|
|
362
|
+
auto_resize?: boolean;
|
|
363
|
+
max_width?: number;
|
|
364
|
+
max_height?: number;
|
|
365
|
+
max_base64_bytes?: number;
|
|
366
|
+
};
|
|
367
|
+
export type AttachmentConfig = {
|
|
368
|
+
image?: ImageAttachmentConfig;
|
|
369
|
+
};
|
|
370
|
+
export type Config = {
|
|
371
|
+
$schema?: string;
|
|
372
|
+
shell?: string;
|
|
373
|
+
logLevel?: LogLevel;
|
|
374
|
+
server?: ServerConfig;
|
|
375
|
+
command?: {
|
|
376
|
+
[key: string]: {
|
|
377
|
+
template: string;
|
|
378
|
+
description?: string;
|
|
379
|
+
agent?: string;
|
|
380
|
+
model?: string;
|
|
381
|
+
variant?: string;
|
|
382
|
+
subtask?: boolean;
|
|
383
|
+
};
|
|
384
|
+
};
|
|
385
|
+
skills?: {
|
|
386
|
+
paths?: Array<string>;
|
|
387
|
+
urls?: Array<string>;
|
|
388
|
+
};
|
|
389
|
+
references?: {
|
|
390
|
+
[key: string]: string | ConfigV2ReferenceGit | ConfigV2ReferenceLocal;
|
|
391
|
+
};
|
|
392
|
+
reference?: {
|
|
393
|
+
[key: string]: string | ConfigV2ReferenceGit | ConfigV2ReferenceLocal;
|
|
394
|
+
};
|
|
395
|
+
watcher?: {
|
|
396
|
+
ignore?: Array<string>;
|
|
397
|
+
};
|
|
398
|
+
snapshot?: boolean;
|
|
399
|
+
plugin?: Array<string | [
|
|
400
|
+
string,
|
|
401
|
+
{
|
|
402
|
+
[key: string]: unknown;
|
|
403
|
+
}
|
|
404
|
+
]>;
|
|
405
|
+
share?: "manual" | "auto" | "disabled";
|
|
406
|
+
autoshare?: boolean;
|
|
407
|
+
/**
|
|
408
|
+
* Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications
|
|
409
|
+
*/
|
|
410
|
+
autoupdate?: boolean | "notify";
|
|
411
|
+
disabled_providers?: Array<string>;
|
|
412
|
+
enabled_providers?: Array<string>;
|
|
413
|
+
model?: string;
|
|
414
|
+
small_model?: string;
|
|
415
|
+
default_agent?: string;
|
|
416
|
+
subagent_depth?: number;
|
|
417
|
+
username?: string;
|
|
418
|
+
mode?: {
|
|
419
|
+
build?: AgentConfig;
|
|
420
|
+
plan?: AgentConfig;
|
|
421
|
+
[key: string]: AgentConfig | undefined;
|
|
422
|
+
};
|
|
423
|
+
agent?: {
|
|
424
|
+
plan?: AgentConfig;
|
|
425
|
+
build?: AgentConfig;
|
|
426
|
+
general?: AgentConfig;
|
|
427
|
+
explore?: AgentConfig;
|
|
428
|
+
title?: AgentConfig;
|
|
429
|
+
summary?: AgentConfig;
|
|
430
|
+
compaction?: AgentConfig;
|
|
431
|
+
[key: string]: AgentConfig | undefined;
|
|
432
|
+
};
|
|
433
|
+
provider?: {
|
|
434
|
+
[key: string]: ProviderConfig;
|
|
435
|
+
};
|
|
436
|
+
mcp?: {
|
|
437
|
+
[key: string]: McpLocalConfig | McpRemoteConfig | {
|
|
438
|
+
enabled: boolean;
|
|
439
|
+
};
|
|
440
|
+
};
|
|
441
|
+
/**
|
|
442
|
+
* Enable or configure formatters. Omit or set to false to disable, true to enable built-ins, or an object to enable built-ins with overrides.
|
|
443
|
+
*/
|
|
444
|
+
formatter?: boolean | {
|
|
445
|
+
[key: string]: {
|
|
446
|
+
disabled?: boolean;
|
|
447
|
+
command?: Array<string>;
|
|
448
|
+
environment?: {
|
|
449
|
+
[key: string]: string;
|
|
450
|
+
};
|
|
451
|
+
extensions?: Array<string>;
|
|
452
|
+
};
|
|
453
|
+
};
|
|
454
|
+
/**
|
|
455
|
+
* Enable or configure LSP servers. Omit or set to false to disable, true to enable built-ins, or an object to enable built-ins with overrides.
|
|
456
|
+
*/
|
|
457
|
+
lsp?: boolean | {
|
|
458
|
+
[key: string]: {
|
|
459
|
+
disabled: true;
|
|
460
|
+
} | {
|
|
461
|
+
command: Array<string>;
|
|
462
|
+
extensions?: Array<string>;
|
|
463
|
+
disabled?: boolean;
|
|
464
|
+
env?: {
|
|
465
|
+
[key: string]: string;
|
|
466
|
+
};
|
|
467
|
+
initialization?: {
|
|
468
|
+
[key: string]: unknown;
|
|
469
|
+
};
|
|
470
|
+
};
|
|
471
|
+
};
|
|
472
|
+
instructions?: Array<string>;
|
|
473
|
+
layout?: LayoutConfig;
|
|
474
|
+
permission?: PermissionConfig;
|
|
475
|
+
tools?: {
|
|
476
|
+
[key: string]: boolean;
|
|
477
|
+
};
|
|
478
|
+
attachment?: AttachmentConfig;
|
|
479
|
+
enterprise?: {
|
|
480
|
+
url?: string;
|
|
481
|
+
};
|
|
482
|
+
tool_output?: {
|
|
483
|
+
max_lines?: number;
|
|
484
|
+
max_bytes?: number;
|
|
485
|
+
};
|
|
486
|
+
compaction?: {
|
|
487
|
+
auto?: boolean;
|
|
488
|
+
prune?: boolean;
|
|
489
|
+
tail_turns?: number;
|
|
490
|
+
preserve_recent_tokens?: number;
|
|
491
|
+
reserved?: number;
|
|
492
|
+
};
|
|
493
|
+
experimental?: {
|
|
494
|
+
disable_paste_summary?: boolean;
|
|
495
|
+
batch_tool?: boolean;
|
|
496
|
+
openTelemetry?: boolean;
|
|
497
|
+
primary_tools?: Array<string>;
|
|
498
|
+
continue_loop_on_deny?: boolean;
|
|
499
|
+
mcp_timeout?: number;
|
|
500
|
+
policies?: Array<ConfigV2ExperimentalPolicy>;
|
|
501
|
+
};
|
|
502
|
+
};
|
|
503
|
+
export type Model = {
|
|
504
|
+
id: string;
|
|
505
|
+
providerID: string;
|
|
506
|
+
api: {
|
|
507
|
+
id: string;
|
|
508
|
+
url: string;
|
|
509
|
+
npm: string;
|
|
510
|
+
};
|
|
511
|
+
name: string;
|
|
512
|
+
family?: string;
|
|
513
|
+
capabilities: {
|
|
514
|
+
temperature: boolean;
|
|
515
|
+
reasoning: boolean;
|
|
516
|
+
attachment: boolean;
|
|
517
|
+
toolcall: boolean;
|
|
518
|
+
input: {
|
|
519
|
+
text: boolean;
|
|
520
|
+
audio: boolean;
|
|
521
|
+
image: boolean;
|
|
522
|
+
video: boolean;
|
|
523
|
+
pdf: boolean;
|
|
524
|
+
};
|
|
525
|
+
output: {
|
|
526
|
+
text: boolean;
|
|
527
|
+
audio: boolean;
|
|
528
|
+
image: boolean;
|
|
529
|
+
video: boolean;
|
|
530
|
+
pdf: boolean;
|
|
531
|
+
};
|
|
532
|
+
interleaved: boolean | {
|
|
533
|
+
field: "reasoning" | "reasoning_content" | "reasoning_text" | string;
|
|
534
|
+
};
|
|
535
|
+
};
|
|
536
|
+
cost: {
|
|
537
|
+
input: number;
|
|
538
|
+
output: number;
|
|
539
|
+
cache: {
|
|
540
|
+
read: number;
|
|
541
|
+
write: number;
|
|
542
|
+
};
|
|
543
|
+
tiers?: Array<{
|
|
544
|
+
input: number;
|
|
545
|
+
output: number;
|
|
546
|
+
cache: {
|
|
547
|
+
read: number;
|
|
548
|
+
write: number;
|
|
549
|
+
};
|
|
550
|
+
tier: {
|
|
551
|
+
type: "context";
|
|
552
|
+
size: number;
|
|
553
|
+
};
|
|
554
|
+
}>;
|
|
555
|
+
experimentalOver200K?: {
|
|
556
|
+
input: number;
|
|
557
|
+
output: number;
|
|
558
|
+
cache: {
|
|
559
|
+
read: number;
|
|
560
|
+
write: number;
|
|
561
|
+
};
|
|
562
|
+
};
|
|
563
|
+
};
|
|
564
|
+
limit: {
|
|
565
|
+
context: number;
|
|
566
|
+
input?: number;
|
|
567
|
+
output: number;
|
|
568
|
+
};
|
|
569
|
+
status: "alpha" | "beta" | "deprecated" | "active";
|
|
570
|
+
options: {
|
|
571
|
+
[key: string]: unknown;
|
|
572
|
+
};
|
|
573
|
+
headers: {
|
|
574
|
+
[key: string]: string;
|
|
575
|
+
};
|
|
576
|
+
release_date: string;
|
|
577
|
+
variants?: {
|
|
578
|
+
[key: string]: {
|
|
579
|
+
[key: string]: unknown;
|
|
580
|
+
};
|
|
581
|
+
};
|
|
582
|
+
};
|
|
583
|
+
export type Provider = {
|
|
584
|
+
id: string;
|
|
585
|
+
name: string;
|
|
586
|
+
source: "env" | "config" | "custom" | "api";
|
|
587
|
+
env: Array<string>;
|
|
588
|
+
key?: string;
|
|
589
|
+
options: {
|
|
590
|
+
[key: string]: unknown;
|
|
591
|
+
};
|
|
592
|
+
models: {
|
|
593
|
+
[key: string]: Model;
|
|
594
|
+
};
|
|
595
|
+
};
|
|
596
|
+
export type ToolListItem = {
|
|
597
|
+
id: string;
|
|
598
|
+
description: string;
|
|
599
|
+
parameters: unknown;
|
|
600
|
+
};
|
|
601
|
+
export type ToolList = Array<ToolListItem>;
|
|
602
|
+
export type ToolIds = Array<string>;
|
|
603
|
+
export type WorktreeCreateInput = {
|
|
604
|
+
name?: string;
|
|
605
|
+
/**
|
|
606
|
+
* Additional startup script to run after the project's start command
|
|
607
|
+
*/
|
|
608
|
+
startCommand?: string;
|
|
609
|
+
};
|
|
610
|
+
export type Worktree = {
|
|
611
|
+
name: string;
|
|
612
|
+
branch?: string;
|
|
613
|
+
directory: string;
|
|
614
|
+
};
|
|
615
|
+
export type WorktreeRemoveInput = {
|
|
616
|
+
directory: string;
|
|
617
|
+
};
|
|
618
|
+
export type WorktreeResetInput = {
|
|
619
|
+
directory: string;
|
|
620
|
+
};
|
|
621
|
+
export type FileNode = {
|
|
622
|
+
name: string;
|
|
623
|
+
path: string;
|
|
624
|
+
absolute: string;
|
|
625
|
+
type: "file" | "directory";
|
|
626
|
+
ignored: boolean;
|
|
627
|
+
};
|
|
628
|
+
export type FileContent = {
|
|
629
|
+
type: "text" | "binary";
|
|
630
|
+
content: string;
|
|
631
|
+
diff?: string;
|
|
632
|
+
patch?: {
|
|
633
|
+
oldFileName: string;
|
|
634
|
+
newFileName: string;
|
|
635
|
+
oldHeader?: string;
|
|
636
|
+
newHeader?: string;
|
|
637
|
+
hunks: Array<{
|
|
638
|
+
oldStart: number;
|
|
639
|
+
oldLines: number;
|
|
640
|
+
newStart: number;
|
|
641
|
+
newLines: number;
|
|
642
|
+
lines: Array<string>;
|
|
643
|
+
}>;
|
|
644
|
+
index?: string;
|
|
645
|
+
};
|
|
646
|
+
encoding?: "base64";
|
|
647
|
+
mimeType?: string;
|
|
648
|
+
};
|
|
649
|
+
export type Path = {
|
|
650
|
+
home: string;
|
|
651
|
+
state: string;
|
|
652
|
+
config: string;
|
|
653
|
+
worktree: string;
|
|
654
|
+
directory: string;
|
|
655
|
+
};
|
|
656
|
+
export type VcsFileDiff = {
|
|
657
|
+
file: string;
|
|
658
|
+
patch?: string;
|
|
659
|
+
additions: number;
|
|
660
|
+
deletions: number;
|
|
661
|
+
status?: "added" | "deleted" | "modified";
|
|
662
|
+
};
|
|
663
|
+
export type Command = {
|
|
664
|
+
name: string;
|
|
665
|
+
description?: string;
|
|
666
|
+
agent?: string;
|
|
667
|
+
model?: string;
|
|
668
|
+
source?: "command" | "mcp" | "skill";
|
|
669
|
+
template: string;
|
|
670
|
+
subtask?: boolean;
|
|
671
|
+
hints: Array<string>;
|
|
672
|
+
};
|
|
673
|
+
export type Agent = {
|
|
674
|
+
name: string;
|
|
675
|
+
description?: string;
|
|
676
|
+
mode: "subagent" | "primary" | "all";
|
|
677
|
+
native?: boolean;
|
|
678
|
+
hidden?: boolean;
|
|
679
|
+
topP?: number;
|
|
680
|
+
temperature?: number;
|
|
681
|
+
color?: string;
|
|
682
|
+
permission: PermissionRuleset;
|
|
683
|
+
model?: {
|
|
684
|
+
modelID: string;
|
|
685
|
+
providerID: string;
|
|
686
|
+
};
|
|
687
|
+
variant?: string;
|
|
688
|
+
prompt?: string;
|
|
689
|
+
options: {
|
|
690
|
+
[key: string]: unknown;
|
|
691
|
+
};
|
|
692
|
+
steps?: number;
|
|
693
|
+
};
|
|
694
|
+
export type McpStatusConnected = {
|
|
695
|
+
status: "connected";
|
|
696
|
+
};
|
|
697
|
+
export type McpStatusDisabled = {
|
|
698
|
+
status: "disabled";
|
|
699
|
+
};
|
|
700
|
+
export type McpStatusFailed = {
|
|
701
|
+
status: "failed";
|
|
702
|
+
error: string;
|
|
703
|
+
};
|
|
704
|
+
export type McpStatusNeedsAuth = {
|
|
705
|
+
status: "needs_auth";
|
|
706
|
+
};
|
|
707
|
+
export type McpStatusNeedsClientRegistration = {
|
|
708
|
+
status: "needs_client_registration";
|
|
709
|
+
error: string;
|
|
710
|
+
};
|
|
711
|
+
export type McpStatus = McpStatusConnected | McpStatusDisabled | McpStatusFailed | McpStatusNeedsAuth | McpStatusNeedsClientRegistration;
|
|
712
|
+
export type Project = {
|
|
713
|
+
id: string;
|
|
714
|
+
worktree: string;
|
|
715
|
+
vcs?: ProjectVcs;
|
|
716
|
+
name?: string;
|
|
717
|
+
icon?: ProjectIcon;
|
|
718
|
+
commands?: ProjectCommands;
|
|
719
|
+
time: ProjectTime;
|
|
720
|
+
sandboxes: Array<string>;
|
|
721
|
+
};
|
|
722
|
+
export type ProviderAuthMethod = {
|
|
723
|
+
type: "oauth" | "api";
|
|
724
|
+
label: string;
|
|
725
|
+
prompts?: Array<{
|
|
726
|
+
type: "text";
|
|
727
|
+
key: string;
|
|
728
|
+
message: string;
|
|
729
|
+
placeholder?: string;
|
|
730
|
+
when?: {
|
|
731
|
+
key: string;
|
|
732
|
+
op: "eq" | "neq";
|
|
733
|
+
value: string;
|
|
734
|
+
};
|
|
735
|
+
} | {
|
|
736
|
+
type: "select";
|
|
737
|
+
key: string;
|
|
738
|
+
message: string;
|
|
739
|
+
options: Array<{
|
|
740
|
+
label: string;
|
|
741
|
+
value: string;
|
|
742
|
+
hint?: string;
|
|
743
|
+
}>;
|
|
744
|
+
when?: {
|
|
745
|
+
key: string;
|
|
746
|
+
op: "eq" | "neq";
|
|
747
|
+
value: string;
|
|
748
|
+
};
|
|
749
|
+
}>;
|
|
750
|
+
};
|
|
751
|
+
export type ProviderAuthAuthorization = {
|
|
752
|
+
url: string;
|
|
753
|
+
method: "auto" | "code";
|
|
754
|
+
instructions: string;
|
|
755
|
+
};
|
|
756
|
+
export type TextPartInput = {
|
|
757
|
+
id?: string;
|
|
758
|
+
type: "text";
|
|
759
|
+
text: string;
|
|
760
|
+
synthetic?: boolean;
|
|
761
|
+
ignored?: boolean;
|
|
762
|
+
time?: {
|
|
763
|
+
start: number;
|
|
764
|
+
end?: number;
|
|
765
|
+
};
|
|
766
|
+
metadata?: {
|
|
767
|
+
[key: string]: unknown;
|
|
768
|
+
};
|
|
769
|
+
};
|
|
770
|
+
export type FilePartInput = {
|
|
771
|
+
id?: string;
|
|
772
|
+
type: "file";
|
|
773
|
+
mime: string;
|
|
774
|
+
filename?: string;
|
|
775
|
+
url: string;
|
|
776
|
+
source?: FilePartSource;
|
|
777
|
+
};
|
|
778
|
+
export type AgentPartInput = {
|
|
779
|
+
id?: string;
|
|
780
|
+
type: "agent";
|
|
781
|
+
name: string;
|
|
782
|
+
source?: {
|
|
783
|
+
value: string;
|
|
784
|
+
start: number;
|
|
785
|
+
end: number;
|
|
786
|
+
};
|
|
787
|
+
};
|
|
788
|
+
export type SubtaskPartInput = {
|
|
789
|
+
id?: string;
|
|
790
|
+
type: "subtask";
|
|
791
|
+
prompt: string;
|
|
792
|
+
description: string;
|
|
793
|
+
agent: string;
|
|
794
|
+
model?: {
|
|
795
|
+
providerID: string;
|
|
796
|
+
modelID: string;
|
|
797
|
+
};
|
|
798
|
+
command?: string;
|
|
799
|
+
};
|
|
800
|
+
export type FileDiff = {
|
|
801
|
+
path: string;
|
|
802
|
+
status: "added" | "modified" | "deleted";
|
|
803
|
+
additions: number;
|
|
804
|
+
deletions: number;
|
|
805
|
+
patch: string;
|
|
806
|
+
};
|
|
807
|
+
export type RevertState = {
|
|
808
|
+
messageID: string;
|
|
809
|
+
partID?: string;
|
|
810
|
+
snapshot?: string;
|
|
811
|
+
diff?: string;
|
|
812
|
+
files?: Array<FileDiff>;
|
|
813
|
+
};
|
|
814
|
+
export type ProjectVcs = "git";
|
|
815
|
+
export type ProjectIcon = {
|
|
816
|
+
url?: string;
|
|
817
|
+
override?: string;
|
|
818
|
+
color?: string;
|
|
819
|
+
};
|
|
820
|
+
export type ProjectCommands = {
|
|
821
|
+
/**
|
|
822
|
+
* Startup script to run when creating a new workspace (worktree)
|
|
823
|
+
*/
|
|
824
|
+
start?: string;
|
|
825
|
+
};
|
|
826
|
+
export type ProjectTime = {
|
|
827
|
+
created: number;
|
|
828
|
+
updated: number;
|
|
829
|
+
initialized?: number;
|
|
830
|
+
};
|
|
831
|
+
export type EventServerInstanceDisposed = {
|
|
832
|
+
id: string;
|
|
833
|
+
type: "server.instance.disposed";
|
|
834
|
+
properties: {
|
|
835
|
+
directory: string;
|
|
836
|
+
};
|
|
837
|
+
};
|
|
838
|
+
export type ConfigV2ReferenceGit = {
|
|
839
|
+
repository: string;
|
|
840
|
+
branch?: string;
|
|
841
|
+
description?: string;
|
|
842
|
+
hidden?: boolean;
|
|
843
|
+
};
|
|
844
|
+
export type ConfigV2ReferenceLocal = {
|
|
845
|
+
path: string;
|
|
846
|
+
description?: string;
|
|
847
|
+
hidden?: boolean;
|
|
848
|
+
};
|
|
849
|
+
export type PolicyEffect = "allow" | "deny";
|
|
850
|
+
export type ConfigV2ExperimentalPolicy = {
|
|
851
|
+
action: "provider.use";
|
|
852
|
+
effect: PolicyEffect;
|
|
853
|
+
resource: string;
|
|
854
|
+
};
|
|
855
|
+
export type EventSessionCreated = {
|
|
856
|
+
id: string;
|
|
857
|
+
type: "session.created";
|
|
858
|
+
properties: {
|
|
859
|
+
sessionID: string;
|
|
860
|
+
info: Session;
|
|
861
|
+
};
|
|
862
|
+
};
|
|
863
|
+
export type EventSessionUpdated = {
|
|
864
|
+
id: string;
|
|
865
|
+
type: "session.updated";
|
|
866
|
+
properties: {
|
|
867
|
+
sessionID: string;
|
|
868
|
+
info: Session;
|
|
869
|
+
};
|
|
870
|
+
};
|
|
871
|
+
export type EventSessionDeleted = {
|
|
872
|
+
id: string;
|
|
873
|
+
type: "session.deleted";
|
|
874
|
+
properties: {
|
|
875
|
+
sessionID: string;
|
|
876
|
+
info: Session;
|
|
877
|
+
};
|
|
878
|
+
};
|
|
879
|
+
export type EventMessageUpdated = {
|
|
880
|
+
id: string;
|
|
881
|
+
type: "message.updated";
|
|
882
|
+
properties: {
|
|
883
|
+
sessionID: string;
|
|
884
|
+
info: Message;
|
|
885
|
+
};
|
|
886
|
+
};
|
|
887
|
+
export type EventMessageRemoved = {
|
|
888
|
+
id: string;
|
|
889
|
+
type: "message.removed";
|
|
890
|
+
properties: {
|
|
891
|
+
sessionID: string;
|
|
892
|
+
messageID: string;
|
|
893
|
+
};
|
|
894
|
+
};
|
|
895
|
+
export type EventMessagePartUpdated = {
|
|
896
|
+
id: string;
|
|
897
|
+
type: "message.part.updated";
|
|
898
|
+
properties: {
|
|
899
|
+
sessionID: string;
|
|
900
|
+
part: Part;
|
|
901
|
+
time: number;
|
|
902
|
+
};
|
|
903
|
+
};
|
|
904
|
+
export type EventMessagePartRemoved = {
|
|
905
|
+
id: string;
|
|
906
|
+
type: "message.part.removed";
|
|
907
|
+
properties: {
|
|
908
|
+
sessionID: string;
|
|
909
|
+
messageID: string;
|
|
910
|
+
partID: string;
|
|
911
|
+
};
|
|
912
|
+
};
|
|
913
|
+
export type EventSessionNextRevertStaged = {
|
|
914
|
+
id: string;
|
|
915
|
+
type: "session.next.revert.staged";
|
|
916
|
+
properties: {
|
|
917
|
+
timestamp: number;
|
|
918
|
+
sessionID: string;
|
|
919
|
+
revert: RevertState;
|
|
920
|
+
};
|
|
921
|
+
};
|
|
922
|
+
export type EventSessionNextRevertCleared = {
|
|
923
|
+
id: string;
|
|
924
|
+
type: "session.next.revert.cleared";
|
|
925
|
+
properties: {
|
|
926
|
+
timestamp: number;
|
|
927
|
+
sessionID: string;
|
|
928
|
+
};
|
|
929
|
+
};
|
|
930
|
+
export type EventSessionNextRevertCommitted = {
|
|
931
|
+
id: string;
|
|
932
|
+
type: "session.next.revert.committed";
|
|
933
|
+
properties: {
|
|
934
|
+
timestamp: number;
|
|
935
|
+
sessionID: string;
|
|
936
|
+
messageID: string;
|
|
937
|
+
};
|
|
938
|
+
};
|
|
939
|
+
export type EventMessagePartDelta = {
|
|
940
|
+
id: string;
|
|
941
|
+
type: "message.part.delta";
|
|
942
|
+
properties: {
|
|
943
|
+
sessionID: string;
|
|
944
|
+
messageID: string;
|
|
945
|
+
partID: string;
|
|
946
|
+
field: string;
|
|
947
|
+
delta: string;
|
|
948
|
+
};
|
|
949
|
+
};
|
|
950
|
+
export type EventSessionDiff = {
|
|
951
|
+
id: string;
|
|
952
|
+
type: "session.diff";
|
|
953
|
+
properties: {
|
|
954
|
+
sessionID: string;
|
|
955
|
+
diff: Array<SnapshotFileDiff>;
|
|
956
|
+
};
|
|
957
|
+
};
|
|
958
|
+
export type EventSessionError = {
|
|
959
|
+
id: string;
|
|
960
|
+
type: "session.error";
|
|
961
|
+
properties: {
|
|
962
|
+
sessionID?: string;
|
|
963
|
+
error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageAbortedError | StructuredOutputError | ContextOverflowError | ContentFilterError | ApiError;
|
|
964
|
+
};
|
|
965
|
+
};
|
|
966
|
+
export type EventInstallationUpdated = {
|
|
967
|
+
id: string;
|
|
968
|
+
type: "installation.updated";
|
|
969
|
+
properties: {
|
|
970
|
+
version: string;
|
|
971
|
+
};
|
|
972
|
+
};
|
|
973
|
+
export type EventInstallationUpdateAvailable = {
|
|
974
|
+
id: string;
|
|
975
|
+
type: "installation.update-available";
|
|
976
|
+
properties: {
|
|
977
|
+
version: string;
|
|
978
|
+
};
|
|
979
|
+
};
|
|
980
|
+
export type EventFileEdited = {
|
|
981
|
+
id: string;
|
|
982
|
+
type: "file.edited";
|
|
983
|
+
properties: {
|
|
984
|
+
file: string;
|
|
985
|
+
};
|
|
986
|
+
};
|
|
987
|
+
export type EventPtyCreated = {
|
|
988
|
+
id: string;
|
|
989
|
+
type: "pty.created";
|
|
990
|
+
properties: {
|
|
991
|
+
info: Pty;
|
|
992
|
+
};
|
|
993
|
+
};
|
|
994
|
+
export type EventPtyUpdated = {
|
|
995
|
+
id: string;
|
|
996
|
+
type: "pty.updated";
|
|
997
|
+
properties: {
|
|
998
|
+
info: Pty;
|
|
999
|
+
};
|
|
1000
|
+
};
|
|
1001
|
+
export type EventPtyExited = {
|
|
1002
|
+
id: string;
|
|
1003
|
+
type: "pty.exited";
|
|
1004
|
+
properties: {
|
|
1005
|
+
id: string;
|
|
1006
|
+
exitCode: number;
|
|
1007
|
+
};
|
|
1008
|
+
};
|
|
1009
|
+
export type EventPtyDeleted = {
|
|
1010
|
+
id: string;
|
|
1011
|
+
type: "pty.deleted";
|
|
1012
|
+
properties: {
|
|
1013
|
+
id: string;
|
|
1014
|
+
};
|
|
1015
|
+
};
|
|
1016
|
+
export type EventTodoUpdated = {
|
|
1017
|
+
id: string;
|
|
1018
|
+
type: "todo.updated";
|
|
1019
|
+
properties: {
|
|
1020
|
+
sessionID: string;
|
|
1021
|
+
todos: Array<Todo>;
|
|
1022
|
+
};
|
|
1023
|
+
};
|
|
1024
|
+
export type EventLspUpdated = {
|
|
1025
|
+
id: string;
|
|
1026
|
+
type: "lsp.updated";
|
|
1027
|
+
properties: {
|
|
1028
|
+
[key: string]: unknown;
|
|
1029
|
+
};
|
|
1030
|
+
};
|
|
1031
|
+
export type EventPermissionAsked = {
|
|
1032
|
+
id: string;
|
|
1033
|
+
type: "permission.asked";
|
|
1034
|
+
properties: {
|
|
1035
|
+
id: string;
|
|
1036
|
+
sessionID: string;
|
|
1037
|
+
permission: string;
|
|
1038
|
+
patterns: Array<string>;
|
|
1039
|
+
metadata: {
|
|
1040
|
+
[key: string]: unknown;
|
|
1041
|
+
};
|
|
1042
|
+
always: Array<string>;
|
|
1043
|
+
tool?: {
|
|
1044
|
+
messageID: string;
|
|
1045
|
+
callID: string;
|
|
1046
|
+
};
|
|
1047
|
+
};
|
|
1048
|
+
};
|
|
1049
|
+
export type EventPermissionReplied = {
|
|
1050
|
+
id: string;
|
|
1051
|
+
type: "permission.replied";
|
|
1052
|
+
properties: {
|
|
1053
|
+
sessionID: string;
|
|
1054
|
+
requestID: string;
|
|
1055
|
+
reply: "once" | "always" | "reject";
|
|
1056
|
+
};
|
|
1057
|
+
};
|
|
1058
|
+
export type EventMcpToolsChanged = {
|
|
1059
|
+
id: string;
|
|
1060
|
+
type: "mcp.tools.changed";
|
|
1061
|
+
properties: {
|
|
1062
|
+
server: string;
|
|
1063
|
+
};
|
|
1064
|
+
};
|
|
1065
|
+
export type EventProjectUpdated = {
|
|
1066
|
+
id: string;
|
|
1067
|
+
type: "project.updated";
|
|
1068
|
+
properties: {
|
|
1069
|
+
id: string;
|
|
1070
|
+
worktree: string;
|
|
1071
|
+
vcs?: ProjectVcs;
|
|
1072
|
+
name?: string;
|
|
1073
|
+
icon?: ProjectIcon;
|
|
1074
|
+
commands?: ProjectCommands;
|
|
1075
|
+
time: ProjectTime;
|
|
1076
|
+
sandboxes: Array<string>;
|
|
1077
|
+
};
|
|
1078
|
+
};
|
|
1079
|
+
export type EventSessionStatus = {
|
|
1080
|
+
id: string;
|
|
1081
|
+
type: "session.status";
|
|
1082
|
+
properties: {
|
|
1083
|
+
sessionID: string;
|
|
1084
|
+
status: SessionStatus;
|
|
1085
|
+
};
|
|
1086
|
+
};
|
|
1087
|
+
export type EventSessionIdle = {
|
|
1088
|
+
id: string;
|
|
1089
|
+
type: "session.idle";
|
|
1090
|
+
properties: {
|
|
1091
|
+
sessionID: string;
|
|
1092
|
+
};
|
|
1093
|
+
};
|
|
1094
|
+
export type EventQuestionAsked = {
|
|
1095
|
+
id: string;
|
|
1096
|
+
type: "question.asked";
|
|
1097
|
+
properties: {
|
|
1098
|
+
id: string;
|
|
1099
|
+
sessionID: string;
|
|
1100
|
+
/**
|
|
1101
|
+
* Questions to ask
|
|
1102
|
+
*/
|
|
1103
|
+
questions: Array<QuestionInfo>;
|
|
1104
|
+
tool?: QuestionTool;
|
|
1105
|
+
};
|
|
1106
|
+
};
|
|
1107
|
+
export type EventQuestionReplied = {
|
|
1108
|
+
id: string;
|
|
1109
|
+
type: "question.replied";
|
|
1110
|
+
properties: {
|
|
1111
|
+
sessionID: string;
|
|
1112
|
+
requestID: string;
|
|
1113
|
+
answers: Array<QuestionAnswer>;
|
|
1114
|
+
};
|
|
1115
|
+
};
|
|
1116
|
+
export type EventQuestionRejected = {
|
|
1117
|
+
id: string;
|
|
1118
|
+
type: "question.rejected";
|
|
1119
|
+
properties: {
|
|
1120
|
+
sessionID: string;
|
|
1121
|
+
requestID: string;
|
|
1122
|
+
};
|
|
1123
|
+
};
|
|
1124
|
+
export type EventSessionCompacted = {
|
|
1125
|
+
id: string;
|
|
1126
|
+
type: "session.compacted";
|
|
1127
|
+
properties: {
|
|
1128
|
+
sessionID: string;
|
|
1129
|
+
};
|
|
1130
|
+
};
|
|
1131
|
+
export type EventVcsBranchUpdated = {
|
|
1132
|
+
id: string;
|
|
1133
|
+
type: "vcs.branch.updated";
|
|
1134
|
+
properties: {
|
|
1135
|
+
branch?: string;
|
|
1136
|
+
};
|
|
1137
|
+
};
|
|
1138
|
+
export type EventWorktreeReady = {
|
|
1139
|
+
id: string;
|
|
1140
|
+
type: "worktree.ready";
|
|
1141
|
+
properties: {
|
|
1142
|
+
name: string;
|
|
1143
|
+
branch?: string;
|
|
1144
|
+
};
|
|
1145
|
+
};
|
|
1146
|
+
export type EventWorktreeFailed = {
|
|
1147
|
+
id: string;
|
|
1148
|
+
type: "worktree.failed";
|
|
1149
|
+
properties: {
|
|
1150
|
+
message: string;
|
|
1151
|
+
};
|
|
1152
|
+
};
|
|
1153
|
+
export type EventServerConnected = {
|
|
1154
|
+
id: string;
|
|
1155
|
+
type: "server.connected";
|
|
1156
|
+
properties: {
|
|
1157
|
+
[key: string]: unknown;
|
|
1158
|
+
};
|
|
1159
|
+
};
|
|
1160
|
+
export type ProviderListResponses = {
|
|
1161
|
+
/**
|
|
1162
|
+
* List of providers
|
|
1163
|
+
*/
|
|
1164
|
+
200: {
|
|
1165
|
+
all: Array<Provider>;
|
|
1166
|
+
default: {
|
|
1167
|
+
[key: string]: string;
|
|
1168
|
+
};
|
|
1169
|
+
connected: Array<string>;
|
|
1170
|
+
};
|
|
1171
|
+
};
|
|
1172
|
+
export type ProviderListResponse = ProviderListResponses[keyof ProviderListResponses];
|
|
1173
|
+
export {};
|
|
1174
|
+
//# sourceMappingURL=runtime-types.d.ts.map
|