shuvcode 2.3.1-shuv.3 → 2.3.2-shuv.1
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/client/client.d.ts +2 -1
- package/client/generated/client.d.ts +2 -1
- package/client/generated/client.js +7 -0
- package/client/generated/types.d.ts +85 -51
- package/client/index.js +1 -1
- package/client/media.d.ts +2 -1
- package/package.json +13 -13
package/client/client.d.ts
CHANGED
|
@@ -115,6 +115,7 @@ export declare function make(options: ClientOptions): {
|
|
|
115
115
|
};
|
|
116
116
|
job: {
|
|
117
117
|
list: (input?: import("./index.js").ExperimentalJobListInput, requestOptions?: OpenCode.RequestOptions) => Promise<import("./index.js").JobInfo[]>;
|
|
118
|
+
cancel: (input: import("./index.js").ExperimentalJobCancelInput, requestOptions?: OpenCode.RequestOptions) => Promise<void>;
|
|
118
119
|
};
|
|
119
120
|
migration: {
|
|
120
121
|
v1: {
|
|
@@ -362,6 +363,6 @@ export declare function make(options: ClientOptions): {
|
|
|
362
363
|
call: (input: import("./index.js").RpcCallInput, requestOptions?: OpenCode.RequestOptions) => Promise<import("./index.js").RpcOutput>;
|
|
363
364
|
};
|
|
364
365
|
event: {
|
|
365
|
-
subscribe<Type extends Exclude<"agent.updated" | "artifact.updated" | "command.updated" | "config.updated" | "credential.switched" | "credential.updated" | "experimental.mcp.event" | "filesystem.changed" | "form.cancelled" | "form.created" | "form.replied" | "installation.update-available" | "installation.updated" | "integration.updated" | "location.shutdown" | "mcp.resources.changed" | "mcp.status.changed" | "model.updated" | "models-dev.refreshed" | "permission.asked" | "permission.cancelled" | "permission.replied" | "persistent-pty.added" | "persistent-pty.removed" | "persistent-pty.updated" | "plugin.updated" | "project.updated" | "provider.updated" | "pty.created" | "pty.deleted" | "pty.exited" | "pty.updated" | "reference.updated" | "server.connected" | "session.agent.selected" | "session.archived" | "session.compaction.delta" | "session.compaction.ended" | "session.compaction.failed" | "session.compaction.started" | "session.created" | "session.deleted" | "session.execution.failed" | "session.execution.interrupted" | "session.execution.started" | "session.execution.succeeded" | "session.forked" | "session.idle" | "session.inbox.cancelled" | "session.inbox.delivered" | "session.inbox.delivery.changed" | "session.inbox.enqueued" | "session.instructions.updated" | "session.metadata.updated" | "session.model.selected" | "session.moved" | "session.permissions" | "session.reasoning.delta" | "session.reasoning.ended" | "session.reasoning.started" | "session.renamed" | "session.retry.scheduled" | "session.revert.cleared" | "session.revert.committed" | "session.revert.staged" | "session.shell.ended" | "session.shell.started" | "session.skill.activated" | "session.status" | "session.step.ended" | "session.step.failed" | "session.step.first-token" | "session.step.started" | "session.step.streamed" | "session.synthetic" | "session.text.delta" | "session.text.ended" | "session.text.started" | "session.tool.called" | "session.tool.failed" | "session.tool.input.delta" | "session.tool.input.ended" | "session.tool.input.started" | "session.tool.progress" | "session.tool.subagent.prepared" | "session.tool.success" | "session.unarchived" | "session.usage.updated" | "session.viewed" | "shell.created" | "shell.deleted" | "shell.exited" | "skill.updated" | "tui.command.execute" | "tui.prompt.append" | "tui.session.select" | "tui.toast.show" | "vcs.branch.updated" | "websearch.updated" | "worktree.resolved" | "worktree.updated" | `rpc.${string}`, "server.connected"> = "agent.updated" | "artifact.updated" | "command.updated" | "config.updated" | "credential.switched" | "credential.updated" | "experimental.mcp.event" | "filesystem.changed" | "form.cancelled" | "form.created" | "form.replied" | "installation.update-available" | "installation.updated" | "integration.updated" | "location.shutdown" | "mcp.resources.changed" | "mcp.status.changed" | "model.updated" | "models-dev.refreshed" | "permission.asked" | "permission.cancelled" | "permission.replied" | "persistent-pty.added" | "persistent-pty.removed" | "persistent-pty.updated" | "plugin.updated" | "project.updated" | "provider.updated" | "pty.created" | "pty.deleted" | "pty.exited" | "pty.updated" | "reference.updated" | "session.agent.selected" | "session.archived" | "session.compaction.delta" | "session.compaction.ended" | "session.compaction.failed" | "session.compaction.started" | "session.created" | "session.deleted" | "session.execution.failed" | "session.execution.interrupted" | "session.execution.started" | "session.execution.succeeded" | "session.forked" | "session.idle" | "session.inbox.cancelled" | "session.inbox.delivered" | "session.inbox.delivery.changed" | "session.inbox.enqueued" | "session.instructions.updated" | "session.metadata.updated" | "session.model.selected" | "session.moved" | "session.permissions" | "session.reasoning.delta" | "session.reasoning.ended" | "session.reasoning.started" | "session.renamed" | "session.retry.scheduled" | "session.revert.cleared" | "session.revert.committed" | "session.revert.staged" | "session.shell.ended" | "session.shell.started" | "session.skill.activated" | "session.status" | "session.step.ended" | "session.step.failed" | "session.step.first-token" | "session.step.started" | "session.step.streamed" | "session.synthetic" | "session.text.delta" | "session.text.ended" | "session.text.started" | "session.tool.called" | "session.tool.failed" | "session.tool.input.delta" | "session.tool.input.ended" | "session.tool.input.started" | "session.tool.progress" | "session.tool.subagent.prepared" | "session.tool.success" | "session.unarchived" | "session.usage.updated" | "session.viewed" | "shell.created" | "shell.deleted" | "shell.exited" | "skill.updated" | "tui.command.execute" | "tui.prompt.append" | "tui.session.select" | "tui.toast.show" | "vcs.branch.updated" | "websearch.updated" | "worktree.resolved" | "worktree.updated" | `rpc.${string}`>(options?: SharedEvents.SubscribeOptions<Type> | undefined): AsyncIterable<([Extract<Type, "agent.updated">] extends [never] ? never : import("./index.js").AgentUpdated) | ([Extract<Type, "artifact.updated">] extends [never] ? never : import("./index.js").ArtifactUpdated) | ([Extract<Type, "command.updated">] extends [never] ? never : import("./index.js").CommandUpdated) | ([Extract<Type, "config.updated">] extends [never] ? never : import("./index.js").ConfigUpdated) | ([Extract<Type, "credential.switched">] extends [never] ? never : import("./index.js").CredentialSwitched) | ([Extract<Type, "credential.updated">] extends [never] ? never : import("./index.js").CredentialUpdated) | ([Extract<Type, "experimental.mcp.event">] extends [never] ? never : import("./index.js").ExperimentalMcpEvent) | ([Extract<Type, "filesystem.changed">] extends [never] ? never : import("./index.js").FilesystemChanged) | ([Extract<Type, "form.cancelled">] extends [never] ? never : import("./index.js").FormCancelled) | ([Extract<Type, "form.created">] extends [never] ? never : import("./index.js").FormCreated) | ([Extract<Type, "form.replied">] extends [never] ? never : import("./index.js").FormReplied) | ([Extract<Type, "installation.update-available">] extends [never] ? never : import("./index.js").InstallationUpdateAvailable) | ([Extract<Type, "installation.updated">] extends [never] ? never : import("./index.js").InstallationUpdated) | ([Extract<Type, "integration.updated">] extends [never] ? never : import("./index.js").IntegrationUpdated) | ([Extract<Type, "location.shutdown">] extends [never] ? never : import("./index.js").LocationShutdown) | ([Extract<Type, "mcp.resources.changed">] extends [never] ? never : import("./index.js").McpResourcesChanged) | ([Extract<Type, "mcp.status.changed">] extends [never] ? never : import("./index.js").McpStatusChanged) | ([Extract<Type, "model.updated">] extends [never] ? never : import("./index.js").ModelUpdated) | ([Extract<Type, "models-dev.refreshed">] extends [never] ? never : import("./index.js").ModelsDevRefreshed) | ([Extract<Type, "permission.asked">] extends [never] ? never : import("./index.js").PermissionAsked) | ([Extract<Type, "permission.cancelled">] extends [never] ? never : import("./index.js").PermissionCancelled) | ([Extract<Type, "permission.replied">] extends [never] ? never : import("./index.js").PermissionReplied) | ([Extract<Type, "persistent-pty.added">] extends [never] ? never : import("./index.js").PersistentPtyAdded) | ([Extract<Type, "persistent-pty.removed">] extends [never] ? never : import("./index.js").PersistentPtyRemoved) | ([Extract<Type, "persistent-pty.updated">] extends [never] ? never : import("./index.js").PersistentPtyUpdated) | ([Extract<Type, "plugin.updated">] extends [never] ? never : import("./index.js").PluginUpdated) | ([Extract<Type, "project.updated">] extends [never] ? never : import("./index.js").ProjectUpdated) | ([Extract<Type, "provider.updated">] extends [never] ? never : import("./index.js").ProviderUpdated) | ([Extract<Type, "pty.created">] extends [never] ? never : import("./index.js").PtyCreated) | ([Extract<Type, "pty.deleted">] extends [never] ? never : import("./index.js").PtyDeleted) | ([Extract<Type, "pty.exited">] extends [never] ? never : import("./index.js").PtyExited) | ([Extract<Type, "pty.updated">] extends [never] ? never : import("./index.js").PtyUpdated) | ([Extract<Type, "reference.updated">] extends [never] ? never : import("./index.js").ReferenceUpdated) | ([Extract<Type, "session.agent.selected">] extends [never] ? never : import("./index.js").SessionAgentSelected) | ([Extract<Type, "session.archived">] extends [never] ? never : import("./index.js").SessionArchived) | ([Extract<Type, "session.compaction.delta">] extends [never] ? never : import("./index.js").SessionCompactionDelta) | ([Extract<Type, "session.compaction.ended">] extends [never] ? never : import("./index.js").SessionCompactionEnded) | ([Extract<Type, "session.compaction.failed">] extends [never] ? never : import("./index.js").SessionCompactionFailed) | ([Extract<Type, "session.compaction.started">] extends [never] ? never : import("./index.js").SessionCompactionStarted) | ([Extract<Type, "session.created">] extends [never] ? never : import("./index.js").SessionCreated) | ([Extract<Type, "session.deleted">] extends [never] ? never : import("./index.js").SessionDeleted) | ([Extract<Type, "session.execution.failed">] extends [never] ? never : import("./index.js").SessionExecutionFailed) | ([Extract<Type, "session.execution.interrupted">] extends [never] ? never : import("./index.js").SessionExecutionInterrupted) | ([Extract<Type, "session.execution.started">] extends [never] ? never : import("./index.js").SessionExecutionStarted) | ([Extract<Type, "session.execution.succeeded">] extends [never] ? never : import("./index.js").SessionExecutionSucceeded) | ([Extract<Type, "session.forked">] extends [never] ? never : import("./index.js").SessionForked) | ([Extract<Type, "session.idle">] extends [never] ? never : import("./index.js").SessionIdle) | ([Extract<Type, "session.inbox.cancelled">] extends [never] ? never : import("./index.js").SessionInboxCancelled) | ([Extract<Type, "session.inbox.delivered">] extends [never] ? never : import("./index.js").SessionInboxDelivered) | ([Extract<Type, "session.inbox.delivery.changed">] extends [never] ? never : import("./index.js").SessionInboxDeliveryChanged) | ([Extract<Type, "session.inbox.enqueued">] extends [never] ? never : import("./index.js").SessionInboxEnqueued) | ([Extract<Type, "session.instructions.updated">] extends [never] ? never : import("./index.js").SessionInstructionsUpdated) | ([Extract<Type, "session.metadata.updated">] extends [never] ? never : import("./index.js").SessionMetadataUpdated) | ([Extract<Type, "session.model.selected">] extends [never] ? never : import("./index.js").SessionModelSelected) | ([Extract<Type, "session.moved">] extends [never] ? never : import("./index.js").SessionMoved) | ([Extract<Type, "session.permissions">] extends [never] ? never : import("./index.js").SessionPermissions) | ([Extract<Type, "session.reasoning.delta">] extends [never] ? never : import("./index.js").SessionReasoningDelta) | ([Extract<Type, "session.reasoning.ended">] extends [never] ? never : import("./index.js").SessionReasoningEnded) | ([Extract<Type, "session.reasoning.started">] extends [never] ? never : import("./index.js").SessionReasoningStarted) | ([Extract<Type, "session.renamed">] extends [never] ? never : import("./index.js").SessionRenamed) | ([Extract<Type, "session.retry.scheduled">] extends [never] ? never : import("./index.js").SessionRetryScheduled) | ([Extract<Type, "session.revert.cleared">] extends [never] ? never : import("./index.js").SessionRevertCleared) | ([Extract<Type, "session.revert.committed">] extends [never] ? never : import("./index.js").SessionRevertCommitted) | ([Extract<Type, "session.revert.staged">] extends [never] ? never : import("./index.js").SessionRevertStaged) | ([Extract<Type, "session.shell.ended">] extends [never] ? never : import("./index.js").SessionShellEnded) | ([Extract<Type, "session.shell.started">] extends [never] ? never : import("./index.js").SessionShellStarted) | ([Extract<Type, "session.skill.activated">] extends [never] ? never : import("./index.js").SessionSkillActivated) | ([Extract<Type, "session.status">] extends [never] ? never : import("./index.js").SessionStatusUpdated) | ([Extract<Type, "session.step.ended">] extends [never] ? never : import("./index.js").SessionStepEnded) | ([Extract<Type, "session.step.failed">] extends [never] ? never : import("./index.js").SessionStepFailed) | ([Extract<Type, "session.step.first-token">] extends [never] ? never : import("./index.js").SessionStepFirstToken) | ([Extract<Type, "session.step.started">] extends [never] ? never : import("./index.js").SessionStepStarted) | ([Extract<Type, "session.step.streamed">] extends [never] ? never : import("./index.js").SessionStepStreamed) | ([Extract<Type, "session.synthetic">] extends [never] ? never : import("./index.js").SessionSynthetic) | ([Extract<Type, "session.text.delta">] extends [never] ? never : import("./index.js").SessionTextDelta) | ([Extract<Type, "session.text.ended">] extends [never] ? never : import("./index.js").SessionTextEnded) | ([Extract<Type, "session.text.started">] extends [never] ? never : import("./index.js").SessionTextStarted) | ([Extract<Type, "session.tool.called">] extends [never] ? never : import("./index.js").SessionToolCalled) | ([Extract<Type, "session.tool.failed">] extends [never] ? never : import("./index.js").SessionToolFailed) | ([Extract<Type, "session.tool.input.delta">] extends [never] ? never : import("./index.js").SessionToolInputDelta) | ([Extract<Type, "session.tool.input.ended">] extends [never] ? never : import("./index.js").SessionToolInputEnded) | ([Extract<Type, "session.tool.input.started">] extends [never] ? never : import("./index.js").SessionToolInputStarted) | ([Extract<Type, "session.tool.progress">] extends [never] ? never : import("./index.js").SessionToolProgress) | ([Extract<Type, "session.tool.subagent.prepared">] extends [never] ? never : import("./index.js").SessionToolSubagentPrepared) | ([Extract<Type, "session.tool.success">] extends [never] ? never : import("./index.js").SessionToolSuccess) | ([Extract<Type, "session.unarchived">] extends [never] ? never : import("./index.js").SessionUnarchived) | ([Extract<Type, "session.usage.updated">] extends [never] ? never : import("./index.js").SessionUsageUpdated) | ([Extract<Type, "session.viewed">] extends [never] ? never : import("./index.js").SessionViewed) | ([Extract<Type, "shell.created">] extends [never] ? never : import("./index.js").ShellCreated) | ([Extract<Type, "shell.deleted">] extends [never] ? never : import("./index.js").ShellDeleted) | ([Extract<Type, "shell.exited">] extends [never] ? never : import("./index.js").ShellExited) | ([Extract<Type, "skill.updated">] extends [never] ? never : import("./index.js").SkillUpdated) | ([Extract<Type, "tui.command.execute">] extends [never] ? never : import("./index.js").TuiCommandExecute) | ([Extract<Type, "tui.prompt.append">] extends [never] ? never : import("./index.js").TuiPromptAppend) | ([Extract<Type, "tui.session.select">] extends [never] ? never : import("./index.js").TuiSessionSelect) | ([Extract<Type, "tui.toast.show">] extends [never] ? never : import("./index.js").TuiToastShow) | ([Extract<Type, `rpc.${string}`>] extends [never] ? never : import("./index.js").V2EventRpc) | (["server.connected" | Extract<Type, "server.connected">] extends [never] ? never : import("./index.js").V2EventServerConnected) | ([Extract<Type, "vcs.branch.updated">] extends [never] ? never : import("./index.js").VcsBranchUpdated) | ([Extract<Type, "websearch.updated">] extends [never] ? never : import("./index.js").WebsearchUpdated) | ([Extract<Type, "worktree.resolved">] extends [never] ? never : import("./index.js").WorktreeResolved) | ([Extract<Type, "worktree.updated">] extends [never] ? never : import("./index.js").WorktreeUpdated)>;
|
|
366
|
+
subscribe<Type extends Exclude<"agent.updated" | "artifact.updated" | "command.updated" | "config.updated" | "credential.switched" | "credential.updated" | "experimental.job.updated" | "experimental.mcp.event" | "filesystem.changed" | "form.cancelled" | "form.created" | "form.replied" | "installation.update-available" | "installation.updated" | "integration.updated" | "location.shutdown" | "mcp.resources.changed" | "mcp.status.changed" | "model.updated" | "models-dev.refreshed" | "permission.asked" | "permission.cancelled" | "permission.replied" | "persistent-pty.added" | "persistent-pty.removed" | "persistent-pty.updated" | "plugin.updated" | "project.updated" | "provider.updated" | "pty.created" | "pty.deleted" | "pty.exited" | "pty.updated" | "reference.updated" | "server.connected" | "session.agent.selected" | "session.archived" | "session.compaction.delta" | "session.compaction.ended" | "session.compaction.failed" | "session.compaction.started" | "session.created" | "session.deleted" | "session.execution.failed" | "session.execution.interrupted" | "session.execution.started" | "session.execution.succeeded" | "session.forked" | "session.idle" | "session.inbox.cancelled" | "session.inbox.delivered" | "session.inbox.delivery.changed" | "session.inbox.enqueued" | "session.instructions.updated" | "session.metadata.updated" | "session.model.selected" | "session.moved" | "session.permissions" | "session.reasoning.delta" | "session.reasoning.ended" | "session.reasoning.started" | "session.renamed" | "session.retry.scheduled" | "session.revert.cleared" | "session.revert.committed" | "session.revert.staged" | "session.shell.ended" | "session.shell.started" | "session.skill.activated" | "session.status" | "session.step.ended" | "session.step.failed" | "session.step.first-token" | "session.step.started" | "session.step.streamed" | "session.synthetic" | "session.text.delta" | "session.text.ended" | "session.text.started" | "session.tool.called" | "session.tool.failed" | "session.tool.input.delta" | "session.tool.input.ended" | "session.tool.input.started" | "session.tool.progress" | "session.tool.subagent.prepared" | "session.tool.success" | "session.unarchived" | "session.usage.updated" | "session.viewed" | "shell.created" | "shell.deleted" | "shell.exited" | "skill.updated" | "tui.command.execute" | "tui.prompt.append" | "tui.session.select" | "tui.toast.show" | "vcs.branch.updated" | "websearch.updated" | "worktree.resolved" | "worktree.updated" | `rpc.${string}`, "server.connected"> = "agent.updated" | "artifact.updated" | "command.updated" | "config.updated" | "credential.switched" | "credential.updated" | "experimental.job.updated" | "experimental.mcp.event" | "filesystem.changed" | "form.cancelled" | "form.created" | "form.replied" | "installation.update-available" | "installation.updated" | "integration.updated" | "location.shutdown" | "mcp.resources.changed" | "mcp.status.changed" | "model.updated" | "models-dev.refreshed" | "permission.asked" | "permission.cancelled" | "permission.replied" | "persistent-pty.added" | "persistent-pty.removed" | "persistent-pty.updated" | "plugin.updated" | "project.updated" | "provider.updated" | "pty.created" | "pty.deleted" | "pty.exited" | "pty.updated" | "reference.updated" | "session.agent.selected" | "session.archived" | "session.compaction.delta" | "session.compaction.ended" | "session.compaction.failed" | "session.compaction.started" | "session.created" | "session.deleted" | "session.execution.failed" | "session.execution.interrupted" | "session.execution.started" | "session.execution.succeeded" | "session.forked" | "session.idle" | "session.inbox.cancelled" | "session.inbox.delivered" | "session.inbox.delivery.changed" | "session.inbox.enqueued" | "session.instructions.updated" | "session.metadata.updated" | "session.model.selected" | "session.moved" | "session.permissions" | "session.reasoning.delta" | "session.reasoning.ended" | "session.reasoning.started" | "session.renamed" | "session.retry.scheduled" | "session.revert.cleared" | "session.revert.committed" | "session.revert.staged" | "session.shell.ended" | "session.shell.started" | "session.skill.activated" | "session.status" | "session.step.ended" | "session.step.failed" | "session.step.first-token" | "session.step.started" | "session.step.streamed" | "session.synthetic" | "session.text.delta" | "session.text.ended" | "session.text.started" | "session.tool.called" | "session.tool.failed" | "session.tool.input.delta" | "session.tool.input.ended" | "session.tool.input.started" | "session.tool.progress" | "session.tool.subagent.prepared" | "session.tool.success" | "session.unarchived" | "session.usage.updated" | "session.viewed" | "shell.created" | "shell.deleted" | "shell.exited" | "skill.updated" | "tui.command.execute" | "tui.prompt.append" | "tui.session.select" | "tui.toast.show" | "vcs.branch.updated" | "websearch.updated" | "worktree.resolved" | "worktree.updated" | `rpc.${string}`>(options?: SharedEvents.SubscribeOptions<Type> | undefined): AsyncIterable<([Extract<Type, "agent.updated">] extends [never] ? never : import("./index.js").AgentUpdated) | ([Extract<Type, "artifact.updated">] extends [never] ? never : import("./index.js").ArtifactUpdated) | ([Extract<Type, "command.updated">] extends [never] ? never : import("./index.js").CommandUpdated) | ([Extract<Type, "config.updated">] extends [never] ? never : import("./index.js").ConfigUpdated) | ([Extract<Type, "credential.switched">] extends [never] ? never : import("./index.js").CredentialSwitched) | ([Extract<Type, "credential.updated">] extends [never] ? never : import("./index.js").CredentialUpdated) | ([Extract<Type, "experimental.job.updated">] extends [never] ? never : import("./index.js").ExperimentalJobUpdated) | ([Extract<Type, "experimental.mcp.event">] extends [never] ? never : import("./index.js").ExperimentalMcpEvent) | ([Extract<Type, "filesystem.changed">] extends [never] ? never : import("./index.js").FilesystemChanged) | ([Extract<Type, "form.cancelled">] extends [never] ? never : import("./index.js").FormCancelled) | ([Extract<Type, "form.created">] extends [never] ? never : import("./index.js").FormCreated) | ([Extract<Type, "form.replied">] extends [never] ? never : import("./index.js").FormReplied) | ([Extract<Type, "installation.update-available">] extends [never] ? never : import("./index.js").InstallationUpdateAvailable) | ([Extract<Type, "installation.updated">] extends [never] ? never : import("./index.js").InstallationUpdated) | ([Extract<Type, "integration.updated">] extends [never] ? never : import("./index.js").IntegrationUpdated) | ([Extract<Type, "location.shutdown">] extends [never] ? never : import("./index.js").LocationShutdown) | ([Extract<Type, "mcp.resources.changed">] extends [never] ? never : import("./index.js").McpResourcesChanged) | ([Extract<Type, "mcp.status.changed">] extends [never] ? never : import("./index.js").McpStatusChanged) | ([Extract<Type, "model.updated">] extends [never] ? never : import("./index.js").ModelUpdated) | ([Extract<Type, "models-dev.refreshed">] extends [never] ? never : import("./index.js").ModelsDevRefreshed) | ([Extract<Type, "permission.asked">] extends [never] ? never : import("./index.js").PermissionAsked) | ([Extract<Type, "permission.cancelled">] extends [never] ? never : import("./index.js").PermissionCancelled) | ([Extract<Type, "permission.replied">] extends [never] ? never : import("./index.js").PermissionReplied) | ([Extract<Type, "persistent-pty.added">] extends [never] ? never : import("./index.js").PersistentPtyAdded) | ([Extract<Type, "persistent-pty.removed">] extends [never] ? never : import("./index.js").PersistentPtyRemoved) | ([Extract<Type, "persistent-pty.updated">] extends [never] ? never : import("./index.js").PersistentPtyUpdated) | ([Extract<Type, "plugin.updated">] extends [never] ? never : import("./index.js").PluginUpdated) | ([Extract<Type, "project.updated">] extends [never] ? never : import("./index.js").ProjectUpdated) | ([Extract<Type, "provider.updated">] extends [never] ? never : import("./index.js").ProviderUpdated) | ([Extract<Type, "pty.created">] extends [never] ? never : import("./index.js").PtyCreated) | ([Extract<Type, "pty.deleted">] extends [never] ? never : import("./index.js").PtyDeleted) | ([Extract<Type, "pty.exited">] extends [never] ? never : import("./index.js").PtyExited) | ([Extract<Type, "pty.updated">] extends [never] ? never : import("./index.js").PtyUpdated) | ([Extract<Type, "reference.updated">] extends [never] ? never : import("./index.js").ReferenceUpdated) | ([Extract<Type, "session.agent.selected">] extends [never] ? never : import("./index.js").SessionAgentSelected) | ([Extract<Type, "session.archived">] extends [never] ? never : import("./index.js").SessionArchived) | ([Extract<Type, "session.compaction.delta">] extends [never] ? never : import("./index.js").SessionCompactionDelta) | ([Extract<Type, "session.compaction.ended">] extends [never] ? never : import("./index.js").SessionCompactionEnded) | ([Extract<Type, "session.compaction.failed">] extends [never] ? never : import("./index.js").SessionCompactionFailed) | ([Extract<Type, "session.compaction.started">] extends [never] ? never : import("./index.js").SessionCompactionStarted) | ([Extract<Type, "session.created">] extends [never] ? never : import("./index.js").SessionCreated) | ([Extract<Type, "session.deleted">] extends [never] ? never : import("./index.js").SessionDeleted) | ([Extract<Type, "session.execution.failed">] extends [never] ? never : import("./index.js").SessionExecutionFailed) | ([Extract<Type, "session.execution.interrupted">] extends [never] ? never : import("./index.js").SessionExecutionInterrupted) | ([Extract<Type, "session.execution.started">] extends [never] ? never : import("./index.js").SessionExecutionStarted) | ([Extract<Type, "session.execution.succeeded">] extends [never] ? never : import("./index.js").SessionExecutionSucceeded) | ([Extract<Type, "session.forked">] extends [never] ? never : import("./index.js").SessionForked) | ([Extract<Type, "session.idle">] extends [never] ? never : import("./index.js").SessionIdle) | ([Extract<Type, "session.inbox.cancelled">] extends [never] ? never : import("./index.js").SessionInboxCancelled) | ([Extract<Type, "session.inbox.delivered">] extends [never] ? never : import("./index.js").SessionInboxDelivered) | ([Extract<Type, "session.inbox.delivery.changed">] extends [never] ? never : import("./index.js").SessionInboxDeliveryChanged) | ([Extract<Type, "session.inbox.enqueued">] extends [never] ? never : import("./index.js").SessionInboxEnqueued) | ([Extract<Type, "session.instructions.updated">] extends [never] ? never : import("./index.js").SessionInstructionsUpdated) | ([Extract<Type, "session.metadata.updated">] extends [never] ? never : import("./index.js").SessionMetadataUpdated) | ([Extract<Type, "session.model.selected">] extends [never] ? never : import("./index.js").SessionModelSelected) | ([Extract<Type, "session.moved">] extends [never] ? never : import("./index.js").SessionMoved) | ([Extract<Type, "session.permissions">] extends [never] ? never : import("./index.js").SessionPermissions) | ([Extract<Type, "session.reasoning.delta">] extends [never] ? never : import("./index.js").SessionReasoningDelta) | ([Extract<Type, "session.reasoning.ended">] extends [never] ? never : import("./index.js").SessionReasoningEnded) | ([Extract<Type, "session.reasoning.started">] extends [never] ? never : import("./index.js").SessionReasoningStarted) | ([Extract<Type, "session.renamed">] extends [never] ? never : import("./index.js").SessionRenamed) | ([Extract<Type, "session.retry.scheduled">] extends [never] ? never : import("./index.js").SessionRetryScheduled) | ([Extract<Type, "session.revert.cleared">] extends [never] ? never : import("./index.js").SessionRevertCleared) | ([Extract<Type, "session.revert.committed">] extends [never] ? never : import("./index.js").SessionRevertCommitted) | ([Extract<Type, "session.revert.staged">] extends [never] ? never : import("./index.js").SessionRevertStaged) | ([Extract<Type, "session.shell.ended">] extends [never] ? never : import("./index.js").SessionShellEnded) | ([Extract<Type, "session.shell.started">] extends [never] ? never : import("./index.js").SessionShellStarted) | ([Extract<Type, "session.skill.activated">] extends [never] ? never : import("./index.js").SessionSkillActivated) | ([Extract<Type, "session.status">] extends [never] ? never : import("./index.js").SessionStatusUpdated) | ([Extract<Type, "session.step.ended">] extends [never] ? never : import("./index.js").SessionStepEnded) | ([Extract<Type, "session.step.failed">] extends [never] ? never : import("./index.js").SessionStepFailed) | ([Extract<Type, "session.step.first-token">] extends [never] ? never : import("./index.js").SessionStepFirstToken) | ([Extract<Type, "session.step.started">] extends [never] ? never : import("./index.js").SessionStepStarted) | ([Extract<Type, "session.step.streamed">] extends [never] ? never : import("./index.js").SessionStepStreamed) | ([Extract<Type, "session.synthetic">] extends [never] ? never : import("./index.js").SessionSynthetic) | ([Extract<Type, "session.text.delta">] extends [never] ? never : import("./index.js").SessionTextDelta) | ([Extract<Type, "session.text.ended">] extends [never] ? never : import("./index.js").SessionTextEnded) | ([Extract<Type, "session.text.started">] extends [never] ? never : import("./index.js").SessionTextStarted) | ([Extract<Type, "session.tool.called">] extends [never] ? never : import("./index.js").SessionToolCalled) | ([Extract<Type, "session.tool.failed">] extends [never] ? never : import("./index.js").SessionToolFailed) | ([Extract<Type, "session.tool.input.delta">] extends [never] ? never : import("./index.js").SessionToolInputDelta) | ([Extract<Type, "session.tool.input.ended">] extends [never] ? never : import("./index.js").SessionToolInputEnded) | ([Extract<Type, "session.tool.input.started">] extends [never] ? never : import("./index.js").SessionToolInputStarted) | ([Extract<Type, "session.tool.progress">] extends [never] ? never : import("./index.js").SessionToolProgress) | ([Extract<Type, "session.tool.subagent.prepared">] extends [never] ? never : import("./index.js").SessionToolSubagentPrepared) | ([Extract<Type, "session.tool.success">] extends [never] ? never : import("./index.js").SessionToolSuccess) | ([Extract<Type, "session.unarchived">] extends [never] ? never : import("./index.js").SessionUnarchived) | ([Extract<Type, "session.usage.updated">] extends [never] ? never : import("./index.js").SessionUsageUpdated) | ([Extract<Type, "session.viewed">] extends [never] ? never : import("./index.js").SessionViewed) | ([Extract<Type, "shell.created">] extends [never] ? never : import("./index.js").ShellCreated) | ([Extract<Type, "shell.deleted">] extends [never] ? never : import("./index.js").ShellDeleted) | ([Extract<Type, "shell.exited">] extends [never] ? never : import("./index.js").ShellExited) | ([Extract<Type, "skill.updated">] extends [never] ? never : import("./index.js").SkillUpdated) | ([Extract<Type, "tui.command.execute">] extends [never] ? never : import("./index.js").TuiCommandExecute) | ([Extract<Type, "tui.prompt.append">] extends [never] ? never : import("./index.js").TuiPromptAppend) | ([Extract<Type, "tui.session.select">] extends [never] ? never : import("./index.js").TuiSessionSelect) | ([Extract<Type, "tui.toast.show">] extends [never] ? never : import("./index.js").TuiToastShow) | ([Extract<Type, `rpc.${string}`>] extends [never] ? never : import("./index.js").V2EventRpc) | (["server.connected" | Extract<Type, "server.connected">] extends [never] ? never : import("./index.js").V2EventServerConnected) | ([Extract<Type, "vcs.branch.updated">] extends [never] ? never : import("./index.js").VcsBranchUpdated) | ([Extract<Type, "websearch.updated">] extends [never] ? never : import("./index.js").WebsearchUpdated) | ([Extract<Type, "worktree.resolved">] extends [never] ? never : import("./index.js").WorktreeResolved) | ([Extract<Type, "worktree.updated">] extends [never] ? never : import("./index.js").WorktreeUpdated)>;
|
|
366
367
|
};
|
|
367
368
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ServerConnectInput, LocationGetInput, AgentListInput, AgentListOutput, AgentGetInput, AgentGetOutput, PluginListInput, PluginListOutput, PluginGuiInput, PluginGuiOutput, PluginCheckInput, PluginCheckOutput, PluginUpdateInput, SessionListInput, SessionCreateInput, SessionGetInput, SessionRemoveInput, SessionForkInput, SessionSwitchAgentInput, SessionSwitchModelInput, SessionUpdateInput, SessionMoveInput, SessionPromptInput, SessionCommandInput, SessionSyntheticInput, SessionShellInput, SessionCompactInput, SessionRevertStageInput, SessionRevertClearInput, SessionRevertCommitInput, SessionContextInput, SessionDiffInput, SessionInboxListInput, SessionInboxCancelInput, SessionInboxUpdateInput, SessionGenerateInput, SessionInterruptInput, SessionBackgroundInput, SessionMessageGetInput, SessionFormListInput, SessionFormCreateInput, SessionFormGetInput, SessionFormReplyInput, SessionFormCancelInput, SessionEnvironmentInput, SessionViewInput, ExperimentalSessionStatsInput, ExperimentalSessionImportInput, ExperimentalSessionExportInput, ExperimentalSessionSkillInput, ExperimentalSessionWaitInput, ExperimentalSessionInstructionsEntryListInput, ExperimentalSessionInstructionsEntryPutInput, ExperimentalSessionInstructionsEntryRemoveInput, ExperimentalSessionLogInput, ExperimentalSessionLogOutput, MessageListInput, ModelListInput, ModelListOutput, ModelDefaultInput, ModelDefaultOutput, ExperimentalGenerateTextInput, ExperimentalGenerateImageInput, ExperimentalGenerateVideoCreateInput, ExperimentalGenerateVideoGetInput, ExperimentalGenerateDecisionsInput, ExperimentalVoiceSessionInput, ProviderListInput, ProviderListOutput, ProviderGetInput, ProviderGetOutput, IntegrationListInput, IntegrationListOutput, IntegrationGetInput, IntegrationGetOutput, IntegrationConnectKeyInput, IntegrationConnectExternalInput, IntegrationOauthConnectInput, IntegrationOauthConnectOutput, IntegrationOauthStatusInput, IntegrationOauthStatusOutput, IntegrationOauthCompleteInput, IntegrationOauthCancelInput, IntegrationCommandConnectInput, IntegrationCommandConnectOutput, IntegrationCommandStatusInput, IntegrationCommandStatusOutput, IntegrationCommandCancelInput, ExperimentalIntegrationWellknownAddInput, McpListInput, McpListOutput, McpResourceCatalogInput, McpResourceCatalogOutput, ExperimentalMcpAddInput, ExperimentalMcpRemoveInput, ExperimentalMcpConnectInput, ExperimentalMcpDisconnectInput, ExperimentalMcpClientTokenInput, ExperimentalMcpClientTokenOutput, CredentialCreateInput, CredentialUpdateInput, CredentialActivateInput, CredentialRemoveInput, ProjectListInput, ProjectListOutput, ProjectUpdateInput, FormListInput, FormListOutput, PermissionRequestListInput, PermissionRequestListOutput, PermissionSavedListInput, PermissionSavedUpdateInput, PermissionSavedRemoveInput, PermissionCreateInput, PermissionListInput, PermissionGetInput, PermissionReplyInput, FileReadInput, FileReadOutput, FileListInput, FileListOutput, FileFindInput, FileFindOutput, ExperimentalFileWriteInput, ExperimentalFileWriteOutput, ExperimentalFileWatchInput, ExperimentalFileUnwatchInput, CommandListInput, CommandListOutput, SkillListInput, SkillListOutput, RpcCallInput, EventSubscribeInput, EventSubscribeOutput, PtyListInput, PtyListOutput, PtyCreateInput, PtyCreateOutput, PtyGetInput, PtyGetOutput, PtyUpdateInput, PtyUpdateOutput, PtyRemoveInput, PtyConnectTokenInput, PtyConnectTokenOutput, ExperimentalPersistentPtyReadInput, ExperimentalPersistentPtyListInput, ExperimentalPersistentPtyCreateInput, ExperimentalPersistentPtyHandoffOutput, ExperimentalPersistentPtyGetInput, ExperimentalPersistentPtyUpdateInput, ExperimentalPersistentPtySnapshotInput, ExperimentalPersistentPtyRemoveInput, ExperimentalPersistentPtyConnectTokenInput, ExperimentalMediaGetInput, ExperimentalMediaGetOutput, ExperimentalBlobGetInput, ExperimentalBlobGetOutput, ExperimentalAutomationCreateInput, ExperimentalAutomationListInput, ExperimentalAutomationGetInput, ExperimentalAutomationPauseInput, ExperimentalAutomationResumeInput, ExperimentalAutomationDeleteInput, ExperimentalArtifactsProvidersInput, ExperimentalArtifactsProvidersOutput, ExperimentalArtifactsListInput, ExperimentalArtifactsListOutput, ExperimentalArtifactsCreateInput, ExperimentalArtifactsCreateOutput, ExperimentalArtifactsGetInput, ExperimentalArtifactsGetOutput, ExperimentalArtifactsUpdateInput, ExperimentalArtifactsUpdateOutput, ExperimentalArtifactsDeleteInput, ExperimentalArtifactsViewInput, ExperimentalArtifactsViewOutput, ExperimentalJobListInput, ShellListInput, ShellListOutput, ShellCreateInput, ShellCreateOutput, ShellGetInput, ShellGetOutput, ShellOutputInput, ShellOutputOutput, ShellRemoveInput, ReferenceListInput, ReferenceListOutput, WorktreeListInput, WorktreeCreateInput, WorktreeRemoveInput, WorktreeRefreshInput, VcsInitInput, VcsGetInput, VcsGetOutput, VcsBaseInput, VcsBaseOutput, VcsStatusInput, VcsStatusOutput, VcsBranchListInput, VcsBranchListOutput, VcsDiffInput, VcsDiffOutput, DebugHeapDumpInput, DebugHeapDumpOutput, DebugLocationListOutput, DebugLocationEvictInput, ExperimentalMigrationV1StatusOutput, WebsearchProvidersInput, WebsearchProvidersOutput, WebsearchQueryInput, WebsearchQueryOutput, ExperimentalUsageLimitsInput, ExperimentalUsageLimitsOutput, ConfigGetInput, ConfigGetOutput, ConfigShellsOutput, ExperimentalConfigUpdateInput } from "./types.js";
|
|
1
|
+
import type { ServerConnectInput, LocationGetInput, AgentListInput, AgentListOutput, AgentGetInput, AgentGetOutput, PluginListInput, PluginListOutput, PluginGuiInput, PluginGuiOutput, PluginCheckInput, PluginCheckOutput, PluginUpdateInput, SessionListInput, SessionCreateInput, SessionGetInput, SessionRemoveInput, SessionForkInput, SessionSwitchAgentInput, SessionSwitchModelInput, SessionUpdateInput, SessionMoveInput, SessionPromptInput, SessionCommandInput, SessionSyntheticInput, SessionShellInput, SessionCompactInput, SessionRevertStageInput, SessionRevertClearInput, SessionRevertCommitInput, SessionContextInput, SessionDiffInput, SessionInboxListInput, SessionInboxCancelInput, SessionInboxUpdateInput, SessionGenerateInput, SessionInterruptInput, SessionBackgroundInput, SessionMessageGetInput, SessionFormListInput, SessionFormCreateInput, SessionFormGetInput, SessionFormReplyInput, SessionFormCancelInput, SessionEnvironmentInput, SessionViewInput, ExperimentalSessionStatsInput, ExperimentalSessionImportInput, ExperimentalSessionExportInput, ExperimentalSessionSkillInput, ExperimentalSessionWaitInput, ExperimentalSessionInstructionsEntryListInput, ExperimentalSessionInstructionsEntryPutInput, ExperimentalSessionInstructionsEntryRemoveInput, ExperimentalSessionLogInput, ExperimentalSessionLogOutput, MessageListInput, ModelListInput, ModelListOutput, ModelDefaultInput, ModelDefaultOutput, ExperimentalGenerateTextInput, ExperimentalGenerateImageInput, ExperimentalGenerateVideoCreateInput, ExperimentalGenerateVideoGetInput, ExperimentalGenerateDecisionsInput, ExperimentalVoiceSessionInput, ProviderListInput, ProviderListOutput, ProviderGetInput, ProviderGetOutput, IntegrationListInput, IntegrationListOutput, IntegrationGetInput, IntegrationGetOutput, IntegrationConnectKeyInput, IntegrationConnectExternalInput, IntegrationOauthConnectInput, IntegrationOauthConnectOutput, IntegrationOauthStatusInput, IntegrationOauthStatusOutput, IntegrationOauthCompleteInput, IntegrationOauthCancelInput, IntegrationCommandConnectInput, IntegrationCommandConnectOutput, IntegrationCommandStatusInput, IntegrationCommandStatusOutput, IntegrationCommandCancelInput, ExperimentalIntegrationWellknownAddInput, McpListInput, McpListOutput, McpResourceCatalogInput, McpResourceCatalogOutput, ExperimentalMcpAddInput, ExperimentalMcpRemoveInput, ExperimentalMcpConnectInput, ExperimentalMcpDisconnectInput, ExperimentalMcpClientTokenInput, ExperimentalMcpClientTokenOutput, CredentialCreateInput, CredentialUpdateInput, CredentialActivateInput, CredentialRemoveInput, ProjectListInput, ProjectListOutput, ProjectUpdateInput, FormListInput, FormListOutput, PermissionRequestListInput, PermissionRequestListOutput, PermissionSavedListInput, PermissionSavedUpdateInput, PermissionSavedRemoveInput, PermissionCreateInput, PermissionListInput, PermissionGetInput, PermissionReplyInput, FileReadInput, FileReadOutput, FileListInput, FileListOutput, FileFindInput, FileFindOutput, ExperimentalFileWriteInput, ExperimentalFileWriteOutput, ExperimentalFileWatchInput, ExperimentalFileUnwatchInput, CommandListInput, CommandListOutput, SkillListInput, SkillListOutput, RpcCallInput, EventSubscribeInput, EventSubscribeOutput, PtyListInput, PtyListOutput, PtyCreateInput, PtyCreateOutput, PtyGetInput, PtyGetOutput, PtyUpdateInput, PtyUpdateOutput, PtyRemoveInput, PtyConnectTokenInput, PtyConnectTokenOutput, ExperimentalPersistentPtyReadInput, ExperimentalPersistentPtyListInput, ExperimentalPersistentPtyCreateInput, ExperimentalPersistentPtyHandoffOutput, ExperimentalPersistentPtyGetInput, ExperimentalPersistentPtyUpdateInput, ExperimentalPersistentPtySnapshotInput, ExperimentalPersistentPtyRemoveInput, ExperimentalPersistentPtyConnectTokenInput, ExperimentalMediaGetInput, ExperimentalMediaGetOutput, ExperimentalBlobGetInput, ExperimentalBlobGetOutput, ExperimentalAutomationCreateInput, ExperimentalAutomationListInput, ExperimentalAutomationGetInput, ExperimentalAutomationPauseInput, ExperimentalAutomationResumeInput, ExperimentalAutomationDeleteInput, ExperimentalArtifactsProvidersInput, ExperimentalArtifactsProvidersOutput, ExperimentalArtifactsListInput, ExperimentalArtifactsListOutput, ExperimentalArtifactsCreateInput, ExperimentalArtifactsCreateOutput, ExperimentalArtifactsGetInput, ExperimentalArtifactsGetOutput, ExperimentalArtifactsUpdateInput, ExperimentalArtifactsUpdateOutput, ExperimentalArtifactsDeleteInput, ExperimentalArtifactsViewInput, ExperimentalArtifactsViewOutput, ExperimentalJobListInput, ExperimentalJobCancelInput, ShellListInput, ShellListOutput, ShellCreateInput, ShellCreateOutput, ShellGetInput, ShellGetOutput, ShellOutputInput, ShellOutputOutput, ShellRemoveInput, ReferenceListInput, ReferenceListOutput, WorktreeListInput, WorktreeCreateInput, WorktreeRemoveInput, WorktreeRefreshInput, VcsInitInput, VcsGetInput, VcsGetOutput, VcsBaseInput, VcsBaseOutput, VcsStatusInput, VcsStatusOutput, VcsBranchListInput, VcsBranchListOutput, VcsDiffInput, VcsDiffOutput, DebugHeapDumpInput, DebugHeapDumpOutput, DebugLocationListOutput, DebugLocationEvictInput, ExperimentalMigrationV1StatusOutput, WebsearchProvidersInput, WebsearchProvidersOutput, WebsearchQueryInput, WebsearchQueryOutput, ExperimentalUsageLimitsInput, ExperimentalUsageLimitsOutput, ConfigGetInput, ConfigGetOutput, ConfigShellsOutput, ExperimentalConfigUpdateInput } from "./types.js";
|
|
2
2
|
export interface ClientOptions {
|
|
3
3
|
readonly baseUrl: string;
|
|
4
4
|
readonly fetch?: typeof globalThis.fetch;
|
|
@@ -122,6 +122,7 @@ export declare function make(options: ClientOptions): {
|
|
|
122
122
|
};
|
|
123
123
|
job: {
|
|
124
124
|
list: (input?: ExperimentalJobListInput, requestOptions?: RequestOptions) => Promise<import("./types.js").JobInfo[]>;
|
|
125
|
+
cancel: (input: ExperimentalJobCancelInput, requestOptions?: RequestOptions) => Promise<void>;
|
|
125
126
|
};
|
|
126
127
|
migration: {
|
|
127
128
|
v1: {
|
|
@@ -1026,6 +1026,13 @@ export function make(options) {
|
|
|
1026
1026
|
declaredStatuses: [400, 401, 404],
|
|
1027
1027
|
empty: false,
|
|
1028
1028
|
}, requestOptions).then((value) => value.data),
|
|
1029
|
+
cancel: (input, requestOptions) => request({
|
|
1030
|
+
method: "POST",
|
|
1031
|
+
path: `/api/experimental/job/${encodeURIComponent(input.id)}/cancel`,
|
|
1032
|
+
successStatus: 204,
|
|
1033
|
+
declaredStatuses: [400, 401],
|
|
1034
|
+
empty: true,
|
|
1035
|
+
}, requestOptions),
|
|
1029
1036
|
},
|
|
1030
1037
|
migration: {
|
|
1031
1038
|
v1: {
|
|
@@ -435,6 +435,11 @@ export type RpcOutput = {
|
|
|
435
435
|
};
|
|
436
436
|
export type PermissionReply = "once" | "always" | "reject";
|
|
437
437
|
export type PtyID = string;
|
|
438
|
+
export type JobStatus = "running" | "completed" | "error" | "cancelled";
|
|
439
|
+
export type JobTime = {
|
|
440
|
+
started: number;
|
|
441
|
+
completed?: number;
|
|
442
|
+
};
|
|
438
443
|
export type FormMetadata1 = {
|
|
439
444
|
[x: string]: any;
|
|
440
445
|
};
|
|
@@ -501,11 +506,6 @@ export type ArtifactTime = {
|
|
|
501
506
|
created: number;
|
|
502
507
|
updated: number;
|
|
503
508
|
};
|
|
504
|
-
export type JobStatus = "running" | "completed" | "error" | "cancelled";
|
|
505
|
-
export type JobTime = {
|
|
506
|
-
started: number;
|
|
507
|
-
completed?: number;
|
|
508
|
-
};
|
|
509
509
|
export type ReferenceGitSource = {
|
|
510
510
|
type: "git";
|
|
511
511
|
repository: string;
|
|
@@ -1043,7 +1043,6 @@ export type BlobInfo = {
|
|
|
1043
1043
|
id: BlobID;
|
|
1044
1044
|
mime: string;
|
|
1045
1045
|
bytes: number;
|
|
1046
|
-
expiresAt: number;
|
|
1047
1046
|
};
|
|
1048
1047
|
export type GenerateVideoError = {
|
|
1049
1048
|
id: GenerateVideoID;
|
|
@@ -1209,6 +1208,54 @@ export type PersistentPtyReadResult = {
|
|
|
1209
1208
|
};
|
|
1210
1209
|
};
|
|
1211
1210
|
};
|
|
1211
|
+
export type JobShell = {
|
|
1212
|
+
kind: "shell";
|
|
1213
|
+
id: string;
|
|
1214
|
+
sessionID: SessionID;
|
|
1215
|
+
status: JobStatus;
|
|
1216
|
+
title?: string;
|
|
1217
|
+
time: JobTime;
|
|
1218
|
+
shellID: string;
|
|
1219
|
+
command: string;
|
|
1220
|
+
};
|
|
1221
|
+
export type JobSubagent = {
|
|
1222
|
+
kind: "subagent";
|
|
1223
|
+
id: string;
|
|
1224
|
+
sessionID: SessionID;
|
|
1225
|
+
status: JobStatus;
|
|
1226
|
+
title?: string;
|
|
1227
|
+
time: JobTime;
|
|
1228
|
+
childSessionID: SessionID;
|
|
1229
|
+
agent: string;
|
|
1230
|
+
description: string;
|
|
1231
|
+
};
|
|
1232
|
+
export type JobImage = {
|
|
1233
|
+
kind: "image";
|
|
1234
|
+
id: string;
|
|
1235
|
+
sessionID: SessionID;
|
|
1236
|
+
status: JobStatus;
|
|
1237
|
+
title?: string;
|
|
1238
|
+
time: JobTime;
|
|
1239
|
+
path: string;
|
|
1240
|
+
model: string;
|
|
1241
|
+
};
|
|
1242
|
+
export type JobVideo = {
|
|
1243
|
+
kind: "video";
|
|
1244
|
+
id: string;
|
|
1245
|
+
sessionID: SessionID;
|
|
1246
|
+
status: JobStatus;
|
|
1247
|
+
title?: string;
|
|
1248
|
+
time: JobTime;
|
|
1249
|
+
path: string;
|
|
1250
|
+
};
|
|
1251
|
+
export type JobCodeMode = {
|
|
1252
|
+
kind: "codemode";
|
|
1253
|
+
id: string;
|
|
1254
|
+
sessionID: SessionID;
|
|
1255
|
+
status: JobStatus;
|
|
1256
|
+
title?: string;
|
|
1257
|
+
time: JobTime;
|
|
1258
|
+
};
|
|
1212
1259
|
export type FormStringField1 = {
|
|
1213
1260
|
key: string;
|
|
1214
1261
|
title?: string;
|
|
@@ -1297,45 +1344,6 @@ export type ArtifactInfo = {
|
|
|
1297
1344
|
url: string;
|
|
1298
1345
|
time: ArtifactTime;
|
|
1299
1346
|
};
|
|
1300
|
-
export type JobShell = {
|
|
1301
|
-
kind: "shell";
|
|
1302
|
-
id: string;
|
|
1303
|
-
sessionID: SessionID;
|
|
1304
|
-
status: JobStatus;
|
|
1305
|
-
title?: string;
|
|
1306
|
-
time: JobTime;
|
|
1307
|
-
shellID: string;
|
|
1308
|
-
command: string;
|
|
1309
|
-
};
|
|
1310
|
-
export type JobSubagent = {
|
|
1311
|
-
kind: "subagent";
|
|
1312
|
-
id: string;
|
|
1313
|
-
sessionID: SessionID;
|
|
1314
|
-
status: JobStatus;
|
|
1315
|
-
title?: string;
|
|
1316
|
-
time: JobTime;
|
|
1317
|
-
childSessionID: SessionID;
|
|
1318
|
-
agent: string;
|
|
1319
|
-
description: string;
|
|
1320
|
-
};
|
|
1321
|
-
export type JobImage = {
|
|
1322
|
-
kind: "image";
|
|
1323
|
-
id: string;
|
|
1324
|
-
sessionID: SessionID;
|
|
1325
|
-
status: JobStatus;
|
|
1326
|
-
title?: string;
|
|
1327
|
-
time: JobTime;
|
|
1328
|
-
path: string;
|
|
1329
|
-
model: string;
|
|
1330
|
-
};
|
|
1331
|
-
export type JobCodeMode = {
|
|
1332
|
-
kind: "codemode";
|
|
1333
|
-
id: string;
|
|
1334
|
-
sessionID: SessionID;
|
|
1335
|
-
status: JobStatus;
|
|
1336
|
-
title?: string;
|
|
1337
|
-
time: JobTime;
|
|
1338
|
-
};
|
|
1339
1347
|
export type VcsInfo = {
|
|
1340
1348
|
provider?: string;
|
|
1341
1349
|
branch: VcsBranch;
|
|
@@ -3188,6 +3196,7 @@ export type PersistentPtySnapshot = {
|
|
|
3188
3196
|
y: number;
|
|
3189
3197
|
};
|
|
3190
3198
|
};
|
|
3199
|
+
export type JobInfo = JobShell | JobSubagent | JobImage | JobVideo | JobCodeMode;
|
|
3191
3200
|
export type FormField1 = FormStringField1 | FormNumberField1 | FormIntegerField1 | FormBooleanField1 | FormMultiselectField1 | FormExternalField;
|
|
3192
3201
|
export type FormReplied = {
|
|
3193
3202
|
id: EventID;
|
|
@@ -3210,7 +3219,6 @@ export type ArtifactContent = {
|
|
|
3210
3219
|
[x: string]: string;
|
|
3211
3220
|
};
|
|
3212
3221
|
};
|
|
3213
|
-
export type JobInfo = JobShell | JobSubagent | JobImage | JobCodeMode;
|
|
3214
3222
|
export type SessionInboxMove = {
|
|
3215
3223
|
id: SessionMessageID;
|
|
3216
3224
|
sessionID: SessionID;
|
|
@@ -3649,10 +3657,20 @@ export type ConfigEntry = {
|
|
|
3649
3657
|
media_blob?: boolean;
|
|
3650
3658
|
automations?: boolean;
|
|
3651
3659
|
artifacts?: boolean;
|
|
3652
|
-
video_generate?: boolean
|
|
3660
|
+
video_generate?: boolean | {
|
|
3661
|
+
model?: string | {
|
|
3662
|
+
providerID: string;
|
|
3663
|
+
model: string;
|
|
3664
|
+
variant?: string;
|
|
3665
|
+
};
|
|
3666
|
+
};
|
|
3653
3667
|
console_watches?: boolean;
|
|
3654
3668
|
mcp_events?: boolean;
|
|
3669
|
+
recommended_api?: boolean;
|
|
3655
3670
|
full_codemode?: boolean;
|
|
3671
|
+
machines?: boolean;
|
|
3672
|
+
home_memory?: boolean;
|
|
3673
|
+
sqlite_fts?: boolean;
|
|
3656
3674
|
schedules?: boolean;
|
|
3657
3675
|
part_rows?: boolean;
|
|
3658
3676
|
image_generate?: boolean | {
|
|
@@ -3760,6 +3778,18 @@ export type CredentialEntry = {
|
|
|
3760
3778
|
active: boolean;
|
|
3761
3779
|
value: CredentialValue;
|
|
3762
3780
|
};
|
|
3781
|
+
export type ExperimentalJobUpdated = {
|
|
3782
|
+
id: EventID;
|
|
3783
|
+
created: number;
|
|
3784
|
+
metadata?: {
|
|
3785
|
+
[x: string]: any;
|
|
3786
|
+
};
|
|
3787
|
+
type: "experimental.job.updated";
|
|
3788
|
+
location?: LocationRef;
|
|
3789
|
+
data: {
|
|
3790
|
+
info: JobInfo;
|
|
3791
|
+
};
|
|
3792
|
+
};
|
|
3763
3793
|
export type FormFields1 = [FormField1, ...Array<FormField1>];
|
|
3764
3794
|
export type AgentInfo = {
|
|
3765
3795
|
id: AgentID;
|
|
@@ -3951,7 +3981,7 @@ export type IntegrationInfo = {
|
|
|
3951
3981
|
connections: Array<ConnectionInfo>;
|
|
3952
3982
|
};
|
|
3953
3983
|
export type SessionEventDurable = SessionCreated | SessionAgentSelected | SessionModelSelected | SessionMoved | SessionRenamed | SessionMetadataUpdated | SessionPermissions | SessionViewed | SessionArchived | SessionUnarchived | SessionDeleted | SessionForked | SessionInboxDelivered | SessionInboxEnqueued | SessionInboxCancelled | SessionInboxDeliveryChanged | SessionExecutionStarted | SessionExecutionSucceeded | SessionExecutionFailed | SessionExecutionInterrupted | SessionInstructionsUpdated | SessionSynthetic | SessionSkillActivated | SessionShellStarted | SessionShellEnded | SessionStepStarted | SessionStepFirstToken | SessionStepStreamed | SessionStepEnded | SessionStepFailed | SessionTextStarted | SessionTextEnded | SessionReasoningStarted | SessionReasoningEnded | SessionToolInputStarted | SessionToolInputEnded | SessionToolCalled | SessionToolSubagentPrepared | SessionToolSuccess | SessionToolFailed | SessionRetryScheduled | SessionCompactionStarted | SessionCompactionEnded | SessionCompactionFailed | SessionRevertStaged | SessionRevertCleared | SessionRevertCommitted | SessionUsageRecorded | SessionMessageContentUpdated;
|
|
3954
|
-
export type V2Event = LocationShutdown | ModelsDevRefreshed | CredentialUpdated | CredentialSwitched | IntegrationUpdated | ProviderUpdated | ModelUpdated | AgentUpdated | SessionCreated | SessionAgentSelected | SessionModelSelected | SessionMoved | SessionRenamed | SessionMetadataUpdated | SessionPermissions | SessionViewed | SessionArchived | SessionUnarchived | SessionUsageUpdated | SessionDeleted | SessionForked | SessionInboxDelivered | SessionInboxEnqueued | SessionInboxCancelled | SessionInboxDeliveryChanged | SessionExecutionStarted | SessionExecutionSucceeded | SessionExecutionFailed | SessionExecutionInterrupted | SessionInstructionsUpdated | SessionSynthetic | SessionSkillActivated | SessionShellStarted | SessionShellEnded | SessionStepStarted | SessionStepFirstToken | SessionStepStreamed | SessionStepEnded | SessionStepFailed | SessionTextStarted | SessionTextDelta | SessionTextEnded | SessionReasoningStarted | SessionReasoningDelta | SessionReasoningEnded | SessionToolInputStarted | SessionToolInputDelta | SessionToolInputEnded | SessionToolCalled | SessionToolSubagentPrepared | SessionToolProgress | SessionToolSuccess | SessionToolFailed | SessionRetryScheduled | SessionCompactionStarted | SessionCompactionDelta | SessionCompactionEnded | SessionCompactionFailed | SessionRevertStaged | SessionRevertCleared | SessionRevertCommitted | FilesystemChanged | ReferenceUpdated | PermissionAsked | PermissionReplied | PermissionCancelled | PluginUpdated | ProjectUpdated | WorktreeUpdated | WorktreeResolved | CommandUpdated | ConfigUpdated | SkillUpdated | PtyCreated | PtyUpdated | PtyExited | PtyDeleted | PersistentPtyAdded | PersistentPtyRemoved | PersistentPtyUpdated | ShellCreated | ShellExited | ShellDeleted | FormCreated | FormReplied | FormCancelled | WebsearchUpdated | ArtifactUpdated | SessionStatusUpdated | SessionIdle | TuiPromptAppend | TuiCommandExecute | TuiToastShow | TuiSessionSelect | InstallationUpdated | InstallationUpdateAvailable | VcsBranchUpdated | McpStatusChanged | McpResourcesChanged | ExperimentalMcpEvent | V2EventRpc | V2EventServerConnected;
|
|
3984
|
+
export type V2Event = LocationShutdown | ModelsDevRefreshed | CredentialUpdated | CredentialSwitched | IntegrationUpdated | ProviderUpdated | ModelUpdated | AgentUpdated | SessionCreated | SessionAgentSelected | SessionModelSelected | SessionMoved | SessionRenamed | SessionMetadataUpdated | SessionPermissions | SessionViewed | SessionArchived | SessionUnarchived | SessionUsageUpdated | SessionDeleted | SessionForked | SessionInboxDelivered | SessionInboxEnqueued | SessionInboxCancelled | SessionInboxDeliveryChanged | SessionExecutionStarted | SessionExecutionSucceeded | SessionExecutionFailed | SessionExecutionInterrupted | SessionInstructionsUpdated | SessionSynthetic | SessionSkillActivated | SessionShellStarted | SessionShellEnded | SessionStepStarted | SessionStepFirstToken | SessionStepStreamed | SessionStepEnded | SessionStepFailed | SessionTextStarted | SessionTextDelta | SessionTextEnded | SessionReasoningStarted | SessionReasoningDelta | SessionReasoningEnded | SessionToolInputStarted | SessionToolInputDelta | SessionToolInputEnded | SessionToolCalled | SessionToolSubagentPrepared | SessionToolProgress | SessionToolSuccess | SessionToolFailed | SessionRetryScheduled | SessionCompactionStarted | SessionCompactionDelta | SessionCompactionEnded | SessionCompactionFailed | SessionRevertStaged | SessionRevertCleared | SessionRevertCommitted | FilesystemChanged | ReferenceUpdated | PermissionAsked | PermissionReplied | PermissionCancelled | PluginUpdated | ProjectUpdated | WorktreeUpdated | WorktreeResolved | CommandUpdated | ConfigUpdated | SkillUpdated | PtyCreated | PtyUpdated | PtyExited | PtyDeleted | PersistentPtyAdded | PersistentPtyRemoved | PersistentPtyUpdated | ShellCreated | ShellExited | ShellDeleted | ExperimentalJobUpdated | FormCreated | FormReplied | FormCancelled | WebsearchUpdated | ArtifactUpdated | SessionStatusUpdated | SessionIdle | TuiPromptAppend | TuiCommandExecute | TuiToastShow | TuiSessionSelect | InstallationUpdated | InstallationUpdateAvailable | VcsBranchUpdated | McpStatusChanged | McpResourcesChanged | ExperimentalMcpEvent | V2EventRpc | V2EventServerConnected;
|
|
3955
3985
|
export type SessionLogItem = SessionEventDurable | EventLogSynced;
|
|
3956
3986
|
export type InvalidRequestError = {
|
|
3957
3987
|
readonly _tag: "InvalidRequestError";
|
|
@@ -5497,7 +5527,7 @@ export type ExperimentalFileWriteInput = {
|
|
|
5497
5527
|
readonly directory?: string | undefined;
|
|
5498
5528
|
} | undefined;
|
|
5499
5529
|
readonly path: string;
|
|
5500
|
-
readonly payload: globalThis.Uint8Array;
|
|
5530
|
+
readonly payload: globalThis.Uint8Array | globalThis.Blob;
|
|
5501
5531
|
};
|
|
5502
5532
|
export type ExperimentalFileWriteOutput = {
|
|
5503
5533
|
location: LocationPublicRef;
|
|
@@ -5545,7 +5575,7 @@ export type RpcCallInput = {
|
|
|
5545
5575
|
};
|
|
5546
5576
|
export type RpcCallOutput = RpcOutput;
|
|
5547
5577
|
export type EventSubscribeInput = {
|
|
5548
|
-
readonly types?: ReadonlyArray<"location.shutdown" | "models-dev.refreshed" | "credential.updated" | "credential.switched" | "integration.updated" | "provider.updated" | "model.updated" | "agent.updated" | "session.created" | "session.agent.selected" | "session.model.selected" | "session.moved" | "session.renamed" | "session.metadata.updated" | "session.permissions" | "session.viewed" | "session.archived" | "session.unarchived" | "session.usage.updated" | "session.deleted" | "session.forked" | "session.inbox.delivered" | "session.inbox.enqueued" | "session.inbox.cancelled" | "session.inbox.delivery.changed" | "session.execution.started" | "session.execution.succeeded" | "session.execution.failed" | "session.execution.interrupted" | "session.instructions.updated" | "session.synthetic" | "session.skill.activated" | "session.shell.started" | "session.shell.ended" | "session.step.started" | "session.step.first-token" | "session.step.streamed" | "session.step.ended" | "session.step.failed" | "session.text.started" | "session.text.delta" | "session.text.ended" | "session.reasoning.started" | "session.reasoning.delta" | "session.reasoning.ended" | "session.tool.input.started" | "session.tool.input.delta" | "session.tool.input.ended" | "session.tool.called" | "session.tool.subagent.prepared" | "session.tool.progress" | "session.tool.success" | "session.tool.failed" | "session.retry.scheduled" | "session.compaction.started" | "session.compaction.delta" | "session.compaction.ended" | "session.compaction.failed" | "session.revert.staged" | "session.revert.cleared" | "session.revert.committed" | "filesystem.changed" | "reference.updated" | "permission.asked" | "permission.replied" | "permission.cancelled" | "plugin.updated" | "project.updated" | "worktree.updated" | "worktree.resolved" | "command.updated" | "config.updated" | "skill.updated" | "pty.created" | "pty.updated" | "pty.exited" | "pty.deleted" | "persistent-pty.added" | "persistent-pty.removed" | "persistent-pty.updated" | "shell.created" | "shell.exited" | "shell.deleted" | "form.created" | "form.replied" | "form.cancelled" | "websearch.updated" | "artifact.updated" | "session.status" | "session.idle" | "tui.prompt.append" | "tui.command.execute" | "tui.toast.show" | "tui.session.select" | "installation.updated" | "installation.update-available" | "vcs.branch.updated" | "mcp.status.changed" | "mcp.resources.changed" | "experimental.mcp.event" | `${"rpc."}${string}`> | undefined;
|
|
5578
|
+
readonly types?: ReadonlyArray<"location.shutdown" | "models-dev.refreshed" | "credential.updated" | "credential.switched" | "integration.updated" | "provider.updated" | "model.updated" | "agent.updated" | "session.created" | "session.agent.selected" | "session.model.selected" | "session.moved" | "session.renamed" | "session.metadata.updated" | "session.permissions" | "session.viewed" | "session.archived" | "session.unarchived" | "session.usage.updated" | "session.deleted" | "session.forked" | "session.inbox.delivered" | "session.inbox.enqueued" | "session.inbox.cancelled" | "session.inbox.delivery.changed" | "session.execution.started" | "session.execution.succeeded" | "session.execution.failed" | "session.execution.interrupted" | "session.instructions.updated" | "session.synthetic" | "session.skill.activated" | "session.shell.started" | "session.shell.ended" | "session.step.started" | "session.step.first-token" | "session.step.streamed" | "session.step.ended" | "session.step.failed" | "session.text.started" | "session.text.delta" | "session.text.ended" | "session.reasoning.started" | "session.reasoning.delta" | "session.reasoning.ended" | "session.tool.input.started" | "session.tool.input.delta" | "session.tool.input.ended" | "session.tool.called" | "session.tool.subagent.prepared" | "session.tool.progress" | "session.tool.success" | "session.tool.failed" | "session.retry.scheduled" | "session.compaction.started" | "session.compaction.delta" | "session.compaction.ended" | "session.compaction.failed" | "session.revert.staged" | "session.revert.cleared" | "session.revert.committed" | "filesystem.changed" | "reference.updated" | "permission.asked" | "permission.replied" | "permission.cancelled" | "plugin.updated" | "project.updated" | "worktree.updated" | "worktree.resolved" | "command.updated" | "config.updated" | "skill.updated" | "pty.created" | "pty.updated" | "pty.exited" | "pty.deleted" | "persistent-pty.added" | "persistent-pty.removed" | "persistent-pty.updated" | "shell.created" | "shell.exited" | "shell.deleted" | "experimental.job.updated" | "form.created" | "form.replied" | "form.cancelled" | "websearch.updated" | "artifact.updated" | "session.status" | "session.idle" | "tui.prompt.append" | "tui.command.execute" | "tui.toast.show" | "tui.session.select" | "installation.updated" | "installation.update-available" | "vcs.branch.updated" | "mcp.status.changed" | "mcp.resources.changed" | "experimental.mcp.event" | `${"rpc."}${string}`> | undefined;
|
|
5549
5579
|
};
|
|
5550
5580
|
export type EventSubscribeOutput = V2Event;
|
|
5551
5581
|
export type PtyListInput = {
|
|
@@ -5845,13 +5875,17 @@ export type ExperimentalArtifactsViewInput = {
|
|
|
5845
5875
|
export type ExperimentalArtifactsViewOutput = globalThis.Uint8Array;
|
|
5846
5876
|
export type ExperimentalJobListInput = {
|
|
5847
5877
|
readonly sessionID?: string | undefined;
|
|
5848
|
-
readonly kind?: ("shell" | "subagent" | "image" | "codemode") | undefined;
|
|
5878
|
+
readonly kind?: ("shell" | "subagent" | "image" | "video" | "codemode") | undefined;
|
|
5849
5879
|
readonly status?: ("running" | "completed" | "error" | "cancelled") | undefined;
|
|
5850
5880
|
readonly descendants?: boolean | undefined;
|
|
5851
5881
|
};
|
|
5852
5882
|
export type ExperimentalJobListOutput = {
|
|
5853
5883
|
data: Array<JobInfo>;
|
|
5854
5884
|
}["data"];
|
|
5885
|
+
export type ExperimentalJobCancelInput = {
|
|
5886
|
+
readonly id: string;
|
|
5887
|
+
};
|
|
5888
|
+
export type ExperimentalJobCancelOutput = void;
|
|
5855
5889
|
export type ShellListInput = {
|
|
5856
5890
|
readonly location?: {
|
|
5857
5891
|
readonly directory?: string | undefined;
|
package/client/index.js
CHANGED
|
@@ -9,4 +9,4 @@ var k=Object.defineProperty;var L=(n)=>n;function F(n,a){this[n]=L.bind(null,a)}
|
|
|
9
9
|
`).flatMap((S)=>S.startsWith("data:")?[S.slice(5).trimStart()]:[]).join(`
|
|
10
10
|
`);if(g!=="")try{yield JSON.parse(g)}catch(S){throw new m("MalformedResponse",{cause:S})}b=d.indexOf(`
|
|
11
11
|
|
|
12
|
-
`)}if(u.done)return}}finally{try{await I.cancel()}catch{}I.releaseLock()}}}),s={server:{info:(e)=>o({method:"GET",path:"/api/info",successStatus:200,declaredStatuses:[400,401],empty:!1},e),pair:(e)=>o({method:"POST",path:"/api/pair",successStatus:200,declaredStatuses:[400,401],empty:!1},e),connect:(e,t)=>o({method:"GET",path:`/auth/connect/${encodeURIComponent(e.code)}`,successStatus:200,declaredStatuses:[400,401],empty:!1},t)},location:{get:(e,t)=>o({method:"GET",path:"/api/location",query:{location:e?.location},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t),reload:(e)=>o({method:"POST",path:"/api/location/reload",successStatus:204,declaredStatuses:[400,401,503],empty:!0},e)},agent:{list:(e,t)=>o({method:"GET",path:"/api/agent",query:{location:e?.location},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t),get:(e,t)=>o({method:"GET",path:`/api/agent/${encodeURIComponent(e.agentID)}`,query:{location:e.location},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t)},plugin:{list:(e,t)=>o({method:"GET",path:"/api/plugin",query:{location:e?.location},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t),gui:(e,t)=>o({method:"GET",path:"/api/plugin/gui",query:{location:e.location,id:e.id},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t),check:(e,t)=>o({method:"POST",path:"/api/plugin/check",query:{location:e?.location},body:{target:e?.target},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t),update:(e,t)=>o({method:"POST",path:"/api/plugin/update",query:{location:e.location},body:{targets:e.targets},successStatus:204,declaredStatuses:[400,401,404,503],empty:!0},t)},session:{list:(e,t)=>o({method:"GET",path:"/api/session",query:{limit:e?.limit,order:e?.order,search:e?.search,parentID:e?.parentID,archived:e?.archived,directory:e?.directory,project:e?.project,subpath:e?.subpath,cursor:e?.cursor},successStatus:200,declaredStatuses:[400,401],empty:!1},t),create:(e,t)=>o({method:"POST",path:"/api/session",body:{id:e?.id,parentID:e?.parentID,title:e?.title,agent:e?.agent,model:e?.model,location:e?.location,metadata:e?.metadata,permissions:e?.permissions},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t).then((r)=>r.data),active:(e)=>o({method:"GET",path:"/api/session/active",successStatus:200,declaredStatuses:[400,401],empty:!1},e).then((t)=>t.data),get:(e,t)=>o({method:"GET",path:`/api/session/${encodeURIComponent(e.sessionID)}`,successStatus:200,declaredStatuses:[400,401,404],empty:!1},t).then((r)=>r.data),remove:(e,t)=>o({method:"DELETE",path:`/api/session/${encodeURIComponent(e.sessionID)}`,successStatus:204,declaredStatuses:[400,401,404],empty:!0},t),fork:(e,t)=>o({method:"POST",path:`/api/session/${encodeURIComponent(e.sessionID)}/fork`,body:{before:e.before},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t).then((r)=>r.data),switchAgent:(e,t)=>o({method:"POST",path:`/api/session/${encodeURIComponent(e.sessionID)}/agent`,body:{agent:e.agent},successStatus:204,declaredStatuses:[400,401,404],empty:!0},t),switchModel:(e,t)=>o({method:"POST",path:`/api/session/${encodeURIComponent(e.sessionID)}/model`,body:{model:e.model},successStatus:204,declaredStatuses:[400,401,404],empty:!0},t),update:(e,t)=>o({method:"PATCH",path:`/api/session/${encodeURIComponent(e.sessionID)}`,body:{title:e.title,metadata:e.metadata,permissions:e.permissions,archived:e.archived},successStatus:204,declaredStatuses:[400,401,404],empty:!0},t),move:(e,t)=>o({method:"POST",path:`/api/session/${encodeURIComponent(e.sessionID)}/move`,body:{directory:e.directory,delivery:e.delivery},successStatus:204,declaredStatuses:[400,401,404],empty:!0},t),prompt:(e,t)=>o({method:"POST",path:`/api/session/${encodeURIComponent(e.sessionID)}/prompt`,body:{id:e.id,text:e.text,files:e.files,agents:e.agents,skills:e.skills,metadata:e.metadata,delivery:e.delivery,resume:e.resume},successStatus:200,declaredStatuses:[400,401,404,409],empty:!1},t).then((r)=>r.data),command:(e,t)=>o({method:"POST",path:`/api/session/${encodeURIComponent(e.sessionID)}/command`,body:{name:e.name,text:e.text,files:e.files,agents:e.agents,skills:e.skills,delivery:e.delivery},successStatus:204,declaredStatuses:[400,401,404,500],empty:!0},t),synthetic:(e,t)=>o({method:"POST",path:`/api/session/${encodeURIComponent(e.sessionID)}/synthetic`,body:{id:e.id,text:e.text,description:e.description,metadata:e.metadata,delivery:e.delivery,resume:e.resume},successStatus:200,declaredStatuses:[400,401,404,409],empty:!1},t).then((r)=>r.data),shell:(e,t)=>o({method:"POST",path:`/api/session/${encodeURIComponent(e.sessionID)}/shell`,body:{id:e.id,command:e.command},successStatus:204,declaredStatuses:[400,401,404],empty:!0},t),compact:(e,t)=>o({method:"POST",path:`/api/session/${encodeURIComponent(e.sessionID)}/compact`,body:{id:e.id,delivery:e.delivery},successStatus:200,declaredStatuses:[400,401,404,409],empty:!1},t).then((r)=>r.data),revert:{stage:(e,t)=>o({method:"POST",path:`/api/session/${encodeURIComponent(e.sessionID)}/revert/stage`,body:{messageID:e.messageID,files:e.files},successStatus:200,declaredStatuses:[400,401,404,409,500],empty:!1},t).then((r)=>r.data),clear:(e,t)=>o({method:"DELETE",path:`/api/session/${encodeURIComponent(e.sessionID)}/revert`,successStatus:204,declaredStatuses:[400,401,404,409,500],empty:!0},t),commit:(e,t)=>o({method:"POST",path:`/api/session/${encodeURIComponent(e.sessionID)}/revert/commit`,successStatus:204,declaredStatuses:[400,401,404,409],empty:!0},t)},context:(e,t)=>o({method:"GET",path:`/api/session/${encodeURIComponent(e.sessionID)}/context`,successStatus:200,declaredStatuses:[400,401,404,500],empty:!1},t).then((r)=>r.data),diff:(e,t)=>o({method:"GET",path:`/api/session/${encodeURIComponent(e.sessionID)}/diff`,query:{from:e.from,to:e.to,context:e.context},successStatus:200,declaredStatuses:[400,401,404,500],empty:!1},t).then((r)=>r.data),inbox:{list:(e,t)=>o({method:"GET",path:`/api/session/${encodeURIComponent(e.sessionID)}/inbox`,successStatus:200,declaredStatuses:[400,401,404],empty:!1},t).then((r)=>r.data),cancel:(e,t)=>o({method:"DELETE",path:`/api/session/${encodeURIComponent(e.sessionID)}/inbox/${encodeURIComponent(e.inboxID)}`,successStatus:204,declaredStatuses:[400,401,404],empty:!0},t),update:(e,t)=>o({method:"PATCH",path:`/api/session/${encodeURIComponent(e.sessionID)}/inbox/${encodeURIComponent(e.inboxID)}`,body:{delivery:e.delivery},successStatus:204,declaredStatuses:[400,401,404,409],empty:!0},t)},generate:(e,t)=>o({method:"POST",path:`/api/session/${encodeURIComponent(e.sessionID)}/generate`,body:{prompt:e.prompt},successStatus:200,declaredStatuses:[400,401,404,503],empty:!1},t).then((r)=>r.data),interrupt:(e,t)=>o({method:"POST",path:`/api/session/${encodeURIComponent(e.sessionID)}/interrupt`,query:{resume:e.resume},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t),background:(e,t)=>o({method:"POST",path:`/api/session/${encodeURIComponent(e.sessionID)}/background`,successStatus:204,declaredStatuses:[400,401,404],empty:!0},t),message:{get:(e,t)=>o({method:"GET",path:`/api/session/${encodeURIComponent(e.sessionID)}/message/${encodeURIComponent(e.messageID)}`,successStatus:200,declaredStatuses:[400,401,404],empty:!1},t).then((r)=>r.data)},form:{list:(e,t)=>o({method:"GET",path:`/api/session/${encodeURIComponent(e.sessionID)}/form`,successStatus:200,declaredStatuses:[400,401,404],empty:!1},t).then((r)=>r.data),create:(e,t)=>o({method:"POST",path:`/api/session/${encodeURIComponent(e.sessionID)}/form`,body:{id:e.id,title:e.title,metadata:e.metadata,fields:e.fields},successStatus:200,declaredStatuses:[400,401,404,409],empty:!1},t).then((r)=>r.data),get:(e,t)=>o({method:"GET",path:`/api/session/${encodeURIComponent(e.sessionID)}/form/${encodeURIComponent(e.formID)}`,successStatus:200,declaredStatuses:[400,401,404],empty:!1},t).then((r)=>r.data),reply:(e,t)=>o({method:"POST",path:`/api/session/${encodeURIComponent(e.sessionID)}/form/${encodeURIComponent(e.formID)}/reply`,body:{answer:e.answer},successStatus:204,declaredStatuses:[400,401,404,409],empty:!0},t),cancel:(e,t)=>o({method:"DELETE",path:`/api/session/${encodeURIComponent(e.sessionID)}/form/${encodeURIComponent(e.formID)}`,query:{message:e.message},successStatus:204,declaredStatuses:[400,401,404,409],empty:!0},t)},environment:(e,t)=>o({method:"PUT",path:`/api/session/${encodeURIComponent(e.sessionID)}/environment`,body:{variables:e.variables},successStatus:204,declaredStatuses:[400,401,404],empty:!0},t),view:(e,t)=>o({method:"POST",path:`/api/session/${encodeURIComponent(e.sessionID)}/view`,body:{idle:e.idle},successStatus:204,declaredStatuses:[400,401,404],empty:!0},t)},experimental:{session:{stats:(e,t)=>o({method:"GET",path:"/api/experimental/session/stats",query:{from:e?.from,to:e?.to,project:e?.project,timezone:e?.timezone,tools:e?.tools},successStatus:200,declaredStatuses:[400,401],empty:!1},t).then((r)=>r.data),import:(e,t)=>o({method:"POST",path:"/api/experimental/session/import",body:{info:e.info,messages:e.messages,location:e.location},successStatus:200,declaredStatuses:[400,401,404,409],empty:!1},t).then((r)=>r.data),export:(e,t)=>o({method:"GET",path:`/api/experimental/session/${encodeURIComponent(e.sessionID)}/export`,query:{sanitize:e.sanitize},successStatus:200,declaredStatuses:[400,401,404,500],empty:!1},t).then((r)=>r.data),skill:(e,t)=>o({method:"POST",path:`/api/experimental/session/${encodeURIComponent(e.sessionID)}/skill`,body:{id:e.id,resume:e.resume},successStatus:204,declaredStatuses:[400,401,404],empty:!0},t),wait:(e,t)=>o({method:"POST",path:`/api/experimental/session/${encodeURIComponent(e.sessionID)}/wait`,successStatus:204,declaredStatuses:[400,401,404,503],empty:!0},t),instructions:{entry:{list:(e,t)=>o({method:"GET",path:`/api/experimental/session/${encodeURIComponent(e.sessionID)}/instructions/entries`,successStatus:200,declaredStatuses:[400,401,404],empty:!1},t).then((r)=>r.data),put:(e,t)=>o({method:"PUT",path:`/api/experimental/session/${encodeURIComponent(e.sessionID)}/instructions/entries/${encodeURIComponent(e.key)}`,body:{value:e.value},successStatus:204,declaredStatuses:[400,401,404,413],empty:!0},t),remove:(e,t)=>o({method:"DELETE",path:`/api/experimental/session/${encodeURIComponent(e.sessionID)}/instructions/entries/${encodeURIComponent(e.key)}`,successStatus:204,declaredStatuses:[400,401,404],empty:!0},t)}},log:(e,t)=>l({method:"GET",path:`/api/experimental/session/${encodeURIComponent(e.sessionID)}/log`,query:{after:e.after,follow:e.follow},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t)},generate:{text:(e,t)=>o({method:"POST",path:"/api/experimental/generate/text",body:{prompt:e.prompt,model:e.model},successStatus:200,declaredStatuses:[400,401,404,422,502,503],empty:!1},t).then((r)=>r.data),image:(e,t)=>o({method:"POST",path:"/api/experimental/generate/image",body:{model:e.model,prompt:e.prompt,images:e.images,n:e.n,aspect:e.aspect,resolution:e.resolution},successStatus:200,declaredStatuses:[400,401,404,422,502,503],empty:!1},t).then((r)=>r.data),video:{create:(e,t)=>o({method:"POST",path:"/api/experimental/generate/video",body:{model:e.model,prompt:e.prompt,start:e.start,end:e.end,references:e.references,duration:e.duration,aspect:e.aspect,resolution:e.resolution,sound:e.sound},successStatus:200,declaredStatuses:[400,401,403,404,422,502,503],empty:!1},t).then((r)=>r.data),get:(e,t)=>o({method:"GET",path:`/api/experimental/generate/video/${encodeURIComponent(e.id)}`,successStatus:200,declaredStatuses:[400,401,403,404],empty:!1},t).then((r)=>r.data)},decisions:(e,t)=>o({method:"POST",path:"/api/experimental/generate/decisions",body:{model:e.model,input:e.input,questions:e.questions},successStatus:200,declaredStatuses:[400,401,404,422,502,503],empty:!1},t).then((r)=>r.data)},voice:{models:(e)=>o({method:"GET",path:"/api/experimental/voice/models",successStatus:200,declaredStatuses:[400,401,404,503],empty:!1},e).then((t)=>t.data),session:(e,t)=>o({method:"POST",path:"/api/experimental/voice/session",body:{model:e.model,session:e.session,transport:e.transport},successStatus:200,declaredStatuses:[400,401,404,503],empty:!1},t).then((r)=>r.data)},integration:{wellknown:{add:(e,t)=>o({method:"POST",path:"/api/experimental/integration/wellknown",query:{location:e.location},body:{url:e.url},successStatus:204,declaredStatuses:[400,401,404],empty:!0},t)}},mcp:{add:(e,t)=>o({method:"PUT",path:`/api/experimental/mcp/${encodeURIComponent(e.server)}`,query:{location:e.location},body:{config:e.config},successStatus:204,declaredStatuses:[400,401,404],empty:!0},t),remove:(e,t)=>o({method:"DELETE",path:`/api/experimental/mcp/${encodeURIComponent(e.server)}`,query:{location:e.location},successStatus:204,declaredStatuses:[400,401,404],empty:!0},t),connect:(e,t)=>o({method:"POST",path:`/api/experimental/mcp/${encodeURIComponent(e.server)}/connect`,query:{location:e.location},successStatus:204,declaredStatuses:[400,401,404],empty:!0},t),disconnect:(e,t)=>o({method:"POST",path:`/api/experimental/mcp/${encodeURIComponent(e.server)}/disconnect`,query:{location:e.location},successStatus:204,declaredStatuses:[400,401,404],empty:!0},t),client:{token:(e,t)=>o({method:"POST",path:"/api/experimental/client-mcp/token",query:{location:e.location,name:e.name},headers:{"x-opencode-ticket":e["x-opencode-ticket"]},successStatus:200,declaredStatuses:[400,401,403,404],empty:!1},t)}},file:{write:(e,t)=>o({method:"POST",path:"/api/experimental/fs/write",query:{location:e.location,path:e.path},body:e.payload,successStatus:200,declaredStatuses:[400,401,404],empty:!1,binaryBody:!0},t),watch:(e,t)=>o({method:"POST",path:"/api/experimental/fs/watch",query:{location:e.location},body:{path:e.path},successStatus:204,declaredStatuses:[400,401,404,503],empty:!0},t),unwatch:(e,t)=>o({method:"DELETE",path:"/api/experimental/fs/watch",query:{location:e.location},body:{path:e.path},successStatus:204,declaredStatuses:[400,401,404],empty:!0},t)},persistentPty:{read:(e,t)=>o({method:"GET",path:`/api/experimental/session/${encodeURIComponent(e.sessionID)}/terminal/read`,query:{lines:e.lines},successStatus:200,declaredStatuses:[400,401,503],empty:!1},t).then((r)=>r.data),list:(e,t)=>o({method:"GET",path:`/api/experimental/session/${encodeURIComponent(e.sessionID)}/terminal`,successStatus:200,declaredStatuses:[400,401,503],empty:!1},t).then((r)=>r.data),create:(e,t)=>o({method:"POST",path:`/api/experimental/session/${encodeURIComponent(e.sessionID)}/terminal`,body:{command:e.command,args:e.args,cwd:e.cwd,title:e.title,env:e.env,size:e.size},successStatus:200,declaredStatuses:[400,401,503],empty:!1},t).then((r)=>r.data),shutdown:(e)=>o({method:"POST",path:"/api/experimental/persistent-pty/shutdown",successStatus:204,declaredStatuses:[400,401,503],empty:!0},e),handoff:(e)=>o({method:"POST",path:"/api/experimental/persistent-pty/handoff",successStatus:200,declaredStatuses:[400,401,503],empty:!1},e),get:(e,t)=>o({method:"GET",path:`/api/experimental/persistent-pty/${encodeURIComponent(e.ptyID)}`,successStatus:200,declaredStatuses:[400,401,404,503],empty:!1},t).then((r)=>r.data),update:(e,t)=>o({method:"PUT",path:`/api/experimental/persistent-pty/${encodeURIComponent(e.ptyID)}`,body:{attachmentID:e.attachmentID,size:e.size,title:e.title},successStatus:200,declaredStatuses:[400,401,404,501,503],empty:!1},t).then((r)=>r.data),snapshot:(e,t)=>o({method:"GET",path:`/api/experimental/persistent-pty/${encodeURIComponent(e.ptyID)}/snapshot`,successStatus:200,declaredStatuses:[400,401,404,503],empty:!1},t).then((r)=>r.data),remove:(e,t)=>o({method:"DELETE",path:`/api/experimental/persistent-pty/${encodeURIComponent(e.ptyID)}`,successStatus:204,declaredStatuses:[400,401,404,503],empty:!0},t),connectToken:(e,t)=>o({method:"POST",path:`/api/experimental/persistent-pty/${encodeURIComponent(e.ptyID)}/connect-token`,headers:{"x-opencode-ticket":e["x-opencode-ticket"]},successStatus:200,declaredStatuses:[400,401,403,404,503],empty:!1},t).then((r)=>r.data)},media:{get:(e,t)=>o({method:"GET",path:`/api/experimental/media/${encodeURIComponent(e.hash)}`,successStatus:200,declaredStatuses:[400,401,404],empty:!1,binary:!0},t)},blob:{get:(e,t)=>o({method:"GET",path:`/api/experimental/blob/${encodeURIComponent(e.id)}`,successStatus:200,declaredStatuses:[400,401,404],empty:!1,binary:!0},t)},automation:{create:(e,t)=>o({method:"POST",path:"/api/experimental/automation",body:{sessionID:e.sessionID,directory:e.directory,name:e.name,trigger:e.trigger,action:e.action,expires:e.expires},successStatus:200,declaredStatuses:[400,401,403,404],empty:!1},t).then((r)=>r.data),list:(e,t)=>o({method:"GET",path:"/api/experimental/automation",query:{sessionID:e?.sessionID,directory:e?.directory},successStatus:200,declaredStatuses:[400,401,403,404],empty:!1},t).then((r)=>r.data),get:(e,t)=>o({method:"GET",path:`/api/experimental/automation/${encodeURIComponent(e.automationID)}`,successStatus:200,declaredStatuses:[400,401,403,404],empty:!1},t).then((r)=>r.data),pause:(e,t)=>o({method:"POST",path:`/api/experimental/automation/${encodeURIComponent(e.automationID)}/pause`,successStatus:200,declaredStatuses:[400,401,403,404],empty:!1},t).then((r)=>r.data),resume:(e,t)=>o({method:"POST",path:`/api/experimental/automation/${encodeURIComponent(e.automationID)}/resume`,successStatus:200,declaredStatuses:[400,401,403,404],empty:!1},t).then((r)=>r.data),delete:(e,t)=>o({method:"DELETE",path:`/api/experimental/automation/${encodeURIComponent(e.automationID)}`,successStatus:204,declaredStatuses:[400,401,403,404],empty:!0},t)},artifacts:{providers:(e,t)=>o({method:"GET",path:"/api/experimental/artifacts/providers",query:{location:e?.location},successStatus:200,declaredStatuses:[400,401,403,404,503],empty:!1},t),list:(e,t)=>o({method:"GET",path:"/api/experimental/artifacts",query:{location:e?.location,sessionID:e?.sessionID,provider:e?.provider},successStatus:200,declaredStatuses:[400,401,403,404,503],empty:!1},t),create:(e,t)=>o({method:"POST",path:"/api/experimental/artifacts",query:{location:e.location},body:{title:e.title,files:e.files,entry:e.entry,provider:e.provider,sessionID:e.sessionID},successStatus:200,declaredStatuses:[400,401,403,404,503],empty:!1},t),get:(e,t)=>o({method:"GET",path:`/api/experimental/artifacts/${encodeURIComponent(e.artifactID)}`,query:{location:e.location},successStatus:200,declaredStatuses:[400,401,403,404,503],empty:!1},t),update:(e,t)=>o({method:"PATCH",path:`/api/experimental/artifacts/${encodeURIComponent(e.artifactID)}`,query:{location:e.location},body:{title:e.title,files:e.files,entry:e.entry,sessionID:e.sessionID},successStatus:200,declaredStatuses:[400,401,403,404,503],empty:!1},t),delete:(e,t)=>o({method:"DELETE",path:`/api/experimental/artifacts/${encodeURIComponent(e.artifactID)}`,query:{location:e.location},successStatus:204,declaredStatuses:[400,401,403,404,503],empty:!0},t),view:(e,t)=>o({method:"GET",path:`/api/experimental/artifacts/${encodeURIComponent(e.artifactID)}/view/${v(e.path)}`,query:{location:e.location},successStatus:200,declaredStatuses:[400,401,403,404,503],empty:!1,binary:!0},t)},job:{list:(e,t)=>o({method:"GET",path:"/api/experimental/job",query:{sessionID:e?.sessionID,kind:e?.kind,status:e?.status,descendants:e?.descendants},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t).then((r)=>r.data)},migration:{v1:{status:(e)=>o({method:"GET",path:"/api/experimental/migration/v1",successStatus:200,declaredStatuses:[400,401],empty:!1},e)}},usage:{limits:(e,t)=>o({method:"GET",path:"/api/experimental/usage/limits",query:{location:e?.location},successStatus:200,declaredStatuses:[400,401,404,503],empty:!1},t)},config:{update:(e,t)=>o({method:"PATCH",path:"/api/experimental/config",body:{shell:e.shell},successStatus:204,declaredStatuses:[400,401,404],empty:!0},t)}},message:{list:(e,t)=>o({method:"GET",path:`/api/session/${encodeURIComponent(e.sessionID)}/message`,query:{limit:e.limit,order:e.order,cursor:e.cursor,type:e.type},successStatus:200,declaredStatuses:[400,401,404,500],empty:!1},t)},model:{list:(e,t)=>o({method:"GET",path:"/api/model",query:{location:e?.location,types:e?.types},successStatus:200,declaredStatuses:[400,401,404,503],empty:!1},t),default:(e,t)=>o({method:"GET",path:"/api/model/default",query:{location:e?.location},successStatus:200,declaredStatuses:[400,401,404,503],empty:!1},t)},provider:{list:(e,t)=>o({method:"GET",path:"/api/provider",query:{location:e?.location},successStatus:200,declaredStatuses:[400,401,404,503],empty:!1},t),get:(e,t)=>o({method:"GET",path:`/api/provider/${encodeURIComponent(e.providerID)}`,query:{location:e.location},successStatus:200,declaredStatuses:[400,401,404,503],empty:!1},t)},integration:{list:(e,t)=>o({method:"GET",path:"/api/integration",query:{location:e?.location},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t),get:(e,t)=>o({method:"GET",path:`/api/integration/${encodeURIComponent(e.integrationID)}`,query:{location:e.location},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t),connect:{key:(e,t)=>o({method:"POST",path:`/api/integration/${encodeURIComponent(e.integrationID)}/connect/key`,query:{location:e.location},body:{key:e.key,answer:e.answer,label:e.label},successStatus:204,declaredStatuses:[400,401,404],empty:!0},t),external:(e,t)=>o({method:"POST",path:`/api/integration/${encodeURIComponent(e.integrationID)}/connect/external`,query:{location:e.location},body:{methodID:e.methodID,answer:e.answer,label:e.label},successStatus:204,declaredStatuses:[400,401,404],empty:!0},t)},oauth:{connect:(e,t)=>o({method:"POST",path:`/api/integration/${encodeURIComponent(e.integrationID)}/connect/oauth`,query:{location:e.location},body:{methodID:e.methodID,answer:e.answer,label:e.label},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t),status:(e,t)=>o({method:"GET",path:`/api/integration/${encodeURIComponent(e.integrationID)}/connect/oauth/${encodeURIComponent(e.attemptID)}`,query:{location:e.location},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t),complete:(e,t)=>o({method:"POST",path:`/api/integration/${encodeURIComponent(e.integrationID)}/connect/oauth/${encodeURIComponent(e.attemptID)}/complete`,query:{location:e.location},body:{code:e.code},successStatus:204,declaredStatuses:[400,401,404],empty:!0},t),cancel:(e,t)=>o({method:"DELETE",path:`/api/integration/${encodeURIComponent(e.integrationID)}/connect/oauth/${encodeURIComponent(e.attemptID)}`,query:{location:e.location},successStatus:204,declaredStatuses:[400,401,404],empty:!0},t)},command:{connect:(e,t)=>o({method:"POST",path:`/api/integration/${encodeURIComponent(e.integrationID)}/connect/command`,query:{location:e.location},body:{methodID:e.methodID,label:e.label},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t),status:(e,t)=>o({method:"GET",path:`/api/integration/${encodeURIComponent(e.integrationID)}/connect/command/${encodeURIComponent(e.attemptID)}`,query:{location:e.location},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t),cancel:(e,t)=>o({method:"DELETE",path:`/api/integration/${encodeURIComponent(e.integrationID)}/connect/command/${encodeURIComponent(e.attemptID)}`,query:{location:e.location},successStatus:204,declaredStatuses:[400,401,404],empty:!0},t)}},mcp:{list:(e,t)=>o({method:"GET",path:"/api/mcp",query:{location:e?.location},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t),resource:{catalog:(e,t)=>o({method:"GET",path:"/api/mcp/resource",query:{location:e?.location},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t)}},credential:{list:(e)=>o({method:"GET",path:"/api/credential",successStatus:200,declaredStatuses:[400,401],empty:!1},e).then((t)=>t.data),create:(e,t)=>o({method:"POST",path:"/api/credential",body:{id:e.id,integrationID:e.integrationID,label:e.label,value:e.value,activate:e.activate},successStatus:200,declaredStatuses:[400,401,409],empty:!1},t).then((r)=>r.data),update:(e,t)=>o({method:"PATCH",path:`/api/credential/${encodeURIComponent(e.credentialID)}`,body:{label:e.label},successStatus:204,declaredStatuses:[400,401],empty:!0},t),activate:(e,t)=>o({method:"POST",path:`/api/credential/${encodeURIComponent(e.credentialID)}/activate`,successStatus:204,declaredStatuses:[400,401],empty:!0},t),remove:(e,t)=>o({method:"DELETE",path:`/api/credential/${encodeURIComponent(e.credentialID)}`,successStatus:204,declaredStatuses:[400,401],empty:!0},t)},project:{list:(e,t)=>o({method:"GET",path:"/api/project",query:{archived:e?.archived},successStatus:200,declaredStatuses:[400,401],empty:!1},t),update:(e,t)=>o({method:"PATCH",path:`/api/project/${encodeURIComponent(e.projectID)}`,body:{canonical:e.canonical,name:e.name,icon:e.icon,commands:e.commands},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t)},form:{list:(e,t)=>o({method:"GET",path:"/api/form",query:{location:e?.location},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t)},permission:{request:{list:(e,t)=>o({method:"GET",path:"/api/permission/request",query:{location:e?.location},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t)},saved:{list:(e,t)=>o({method:"GET",path:"/api/permission/saved",query:{projectID:e?.projectID},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t).then((r)=>r.data),update:(e,t)=>o({method:"PATCH",path:`/api/permission/saved/${encodeURIComponent(e.id)}`,body:{action:e.action,resource:e.resource},successStatus:200,declaredStatuses:[400,401,404,409],empty:!1},t).then((r)=>r.data),remove:(e,t)=>o({method:"DELETE",path:`/api/permission/saved/${encodeURIComponent(e.id)}`,successStatus:204,declaredStatuses:[400,401],empty:!0},t)},create:(e,t)=>o({method:"POST",path:`/api/session/${encodeURIComponent(e.sessionID)}/permission`,body:{id:e.id,action:e.action,resources:e.resources,save:e.save,metadata:e.metadata,source:e.source,agent:e.agent},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t).then((r)=>r.data),list:(e,t)=>o({method:"GET",path:`/api/session/${encodeURIComponent(e.sessionID)}/permission`,successStatus:200,declaredStatuses:[400,401,404],empty:!1},t).then((r)=>r.data),get:(e,t)=>o({method:"GET",path:`/api/session/${encodeURIComponent(e.sessionID)}/permission/${encodeURIComponent(e.requestID)}`,successStatus:200,declaredStatuses:[400,401,404],empty:!1},t).then((r)=>r.data),reply:(e,t)=>o({method:"POST",path:`/api/session/${encodeURIComponent(e.sessionID)}/permission/${encodeURIComponent(e.requestID)}/reply`,body:{decision:e.decision,message:e.message},successStatus:204,declaredStatuses:[400,401,404],empty:!0},t)},file:{read:(e,t)=>o({method:"GET",path:`/api/fs/read/${v(e.path)}`,query:{location:e.location},successStatus:200,declaredStatuses:[400,401,404],empty:!1,binary:!0},t),list:(e,t)=>o({method:"GET",path:"/api/fs/list",query:{location:e?.location,path:e?.path},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t),find:(e,t)=>o({method:"GET",path:"/api/fs/find",query:{location:e.location,query:e.query,type:e.type,limit:e.limit},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t)},command:{list:(e,t)=>o({method:"GET",path:"/api/command",query:{location:e?.location},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t)},skill:{list:(e,t)=>o({method:"GET",path:"/api/skill",query:{location:e?.location},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t)},rpc:{call:(e,t)=>o({method:"POST",path:`/api/rpc/${encodeURIComponent(e.rpcID)}/${encodeURIComponent(e.method)}`,query:{location:e.location},body:{input:e.input},successStatus:200,declaredStatuses:[400,401,404,500],empty:!1},t)},event:{subscribe:(e,t)=>l({method:"GET",path:"/api/event",query:{types:e?.types},successStatus:200,declaredStatuses:[400,401],empty:!1},t)},pty:{list:(e,t)=>o({method:"GET",path:"/api/pty",query:{location:e?.location},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t),create:(e,t)=>o({method:"POST",path:"/api/pty",query:{location:e?.location},body:{command:e?.command,args:e?.args,cwd:e?.cwd,title:e?.title,env:e?.env},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t),get:(e,t)=>o({method:"GET",path:`/api/pty/${encodeURIComponent(e.ptyID)}`,query:{location:e.location},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t),update:(e,t)=>o({method:"PUT",path:`/api/pty/${encodeURIComponent(e.ptyID)}`,query:{location:e.location},body:{title:e.title,size:e.size},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t),remove:(e,t)=>o({method:"DELETE",path:`/api/pty/${encodeURIComponent(e.ptyID)}`,query:{location:e.location},successStatus:204,declaredStatuses:[400,401,404],empty:!0},t),connect:{token:(e,t)=>o({method:"POST",path:`/api/pty/${encodeURIComponent(e.ptyID)}/connect-token`,query:{location:e.location},headers:{"x-opencode-ticket":e["x-opencode-ticket"]},successStatus:200,declaredStatuses:[400,401,403,404],empty:!1},t)}},shell:{list:(e,t)=>o({method:"GET",path:"/api/shell",query:{location:e?.location},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t),create:(e,t)=>o({method:"POST",path:"/api/shell",query:{location:e.location},body:{command:e.command,cwd:e.cwd,timeout:e.timeout,metadata:e.metadata},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t),get:(e,t)=>o({method:"GET",path:`/api/shell/${encodeURIComponent(e.id)}`,query:{location:e.location},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t),output:(e,t)=>o({method:"GET",path:`/api/shell/${encodeURIComponent(e.id)}/output`,query:{location:e.location,cursor:e.cursor,limit:e.limit},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t),remove:(e,t)=>o({method:"DELETE",path:`/api/shell/${encodeURIComponent(e.id)}`,query:{location:e.location},successStatus:204,declaredStatuses:[400,401,404],empty:!0},t)},reference:{list:(e,t)=>o({method:"GET",path:"/api/reference",query:{location:e?.location},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t)},worktree:{list:(e,t)=>o({method:"GET",path:"/api/worktree",query:{projectID:e.projectID},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t),create:(e,t)=>o({method:"POST",path:"/api/worktree",body:{projectID:e.projectID,from:e.from,branch:e.branch,directory:e.directory,name:e.name},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t),remove:(e,t)=>o({method:"DELETE",path:"/api/worktree",body:{projectID:e.projectID,directory:e.directory,force:e.force},successStatus:204,declaredStatuses:[400,401,404],empty:!0},t),refresh:(e,t)=>o({method:"POST",path:"/api/worktree/refresh",body:{projectID:e.projectID},successStatus:204,declaredStatuses:[400,401,404],empty:!0},t)},vcs:{init:(e,t)=>o({method:"POST",path:"/api/vcs/init",query:{location:e?.location,provider:e?.provider},successStatus:204,declaredStatuses:[400,401,404,409,501,503],empty:!0},t),get:(e,t)=>o({method:"GET",path:"/api/vcs",query:{location:e?.location},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t),base:(e,t)=>o({method:"GET",path:"/api/vcs/base",query:{location:e?.location},successStatus:200,declaredStatuses:[400,401,404,503],empty:!1},t),status:(e,t)=>o({method:"GET",path:"/api/vcs/status",query:{location:e?.location},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t),branch:{list:(e,t)=>o({method:"GET",path:"/api/vcs/branch",query:{location:e?.location,search:e?.search,limit:e?.limit},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t)},diff:(e,t)=>o({method:"GET",path:"/api/vcs/diff",query:{location:e.location,mode:e.mode,base:e.base,context:e.context,untracked:e.untracked},successStatus:200,declaredStatuses:[400,401,404,503],empty:!1},t)},debug:{heapDump:(e,t)=>o({method:"POST",path:"/api/debug/heap-dump",query:{directory:e?.directory},successStatus:200,declaredStatuses:[400,401,500],empty:!1},t),location:{list:(e)=>o({method:"GET",path:"/api/debug/location",successStatus:200,declaredStatuses:[400,401],empty:!1},e),evict:(e,t)=>o({method:"DELETE",path:"/api/debug/location",query:{location:e?.location},successStatus:204,declaredStatuses:[400,401],empty:!0},t)}},websearch:{providers:(e,t)=>o({method:"GET",path:"/api/websearch/provider",query:{location:e?.location},successStatus:200,declaredStatuses:[400,401,404,503],empty:!1},t),query:(e,t)=>o({method:"POST",path:"/api/websearch",query:{location:e.location},body:{query:e.query,providerID:e.providerID},successStatus:200,declaredStatuses:[400,401,404,503],empty:!1},t)},config:{get:(e,t)=>o({method:"GET",path:"/api/config",query:{location:e?.location},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t),shells:(e)=>o({method:"GET",path:"/api/config/shell",successStatus:200,declaredStatuses:[400,401,404],empty:!1},e)}};return{...s,session:{...s.session,stats:s.experimental.session.stats,import:s.experimental.session.import,export:s.experimental.session.export,skill:s.experimental.session.skill,wait:s.experimental.session.wait,instructions:{entry:{list:s.experimental.session.instructions.entry.list,put:s.experimental.session.instructions.entry.put,remove:s.experimental.session.instructions.entry.remove}},log:s.experimental.session.log},generate:{text:s.experimental.generate.text,image:s.experimental.generate.image,decisions:s.experimental.generate.decisions},voice:{models:s.experimental.voice.models,session:s.experimental.voice.session},integration:{...s.integration,wellknown:{add:s.experimental.integration.wellknown.add}},mcp:{...s.mcp,add:s.experimental.mcp.add,remove:s.experimental.mcp.remove,connect:s.experimental.mcp.connect,disconnect:s.experimental.mcp.disconnect,client:{token:s.experimental.mcp.client.token}},file:{...s.file,write:s.experimental.file.write,watch:s.experimental.file.watch,unwatch:s.experimental.file.unwatch},migration:{v1:{status:s.experimental.migration.v1.status}},usage:{limits:s.experimental.usage.limits},config:{...s.config,update:s.experimental.config.update}}}function v(n){return n.split("/").map(encodeURIComponent).join("/")}function E(n,a,i){if(i===void 0)return;if(i===null){n.append(a,"null");return}if(Array.isArray(i)){for(let c of i)E(n,a,c);return}if(typeof i==="object"){for(let[c,y]of Object.entries(i))E(n,`${a}[${c}]`,y);return}n.append(a,String(i))}async function R(n){if(!O(n,"application/json")&&!n.headers.get("content-type")?.includes("+json")){try{await n.body?.cancel()}catch{}throw new m("UnsupportedContentType",{detail:n.headers.get("content-type")})}let a;try{a=await n.text()}catch(i){throw new m("Transport",{cause:i})}if(a==="")throw new m("MalformedResponse");try{return JSON.parse(a)}catch(i){throw new m("MalformedResponse",{cause:i})}}function G(n){let a=Object.assign(Error(n.message??n.data?.message),n);if(n._tag)a.name=n._tag;return a}function O(n,a){return n.headers.get("content-type")?.split(";",1)[0]?.trim().toLowerCase()===a}var Y=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="InvalidRequestError",X=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="UnauthorizedError",Z=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="LocationNotFoundError",ee=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="ServiceUnavailableError",te=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="AgentNotFoundError",ne=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="PluginNotFoundError",oe=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="InvalidCursorError",re=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="SessionNotFoundError",se=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="MessageNotFoundError",ae=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="ConflictError",ie=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="CommandNotFoundError",de=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="CommandExecutionError",pe=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="SessionBusyError",le=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="UnknownError",ue=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="FormNotFoundError",ye=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="FormInvalidAnswerError",ce=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="FormAlreadySettledError",me=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="SkillNotFoundError",ge=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="InstructionEntryValueTooLargeError",Ie=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="ProviderNotFoundError",xe=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="ModelNotFoundError",Se=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="UnsupportedModelError",fe=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="ProviderRequestError",be=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="ForbiddenError",he=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="VideoNotFoundError",Ee=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="IntegrationNotFoundError",De=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="IntegrationAttemptNotFoundError",ve=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="IntegrationMethodNotFoundError",Re=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="McpServerNotFoundError",Oe=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="ProjectNotFoundError",Pe=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="PermissionSavedNotFoundError",Ce=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="PermissionNotFoundError",Ae=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="FileNotFoundError",C=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="RpcError",A=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="RpcInternalError",Me=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="PtyNotFoundError",qe=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="PtyFeatureUnsupportedError",ke=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="BlobNotFoundError",Le=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="AutomationNotFoundError",Fe=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="ArtifactNotFoundError",Te=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="ShellNotFoundError",Ue=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="WorktreeError",we=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="VcsInitNotSupportedError";function N(n){let a,i=4096;function c(o){if(o.connected=void 0,o.controller.abort(),a===o)a=void 0}async function y(o){let l,s={};try{if(o.controller.signal.aborted)return;l=n(o.controller.signal,()=>{o.subscribers.forEach((e)=>e.activity?.())})[Symbol.asyncIterator]();while(!o.controller.signal.aborted){let e=await l.next();if(e.done||o.controller.signal.aborted)break;if(e.value.type==="server.connected")o.connected=e.value;o.subscribers.forEach((t)=>t.push(e.value))}}catch(e){s={error:e}}finally{c(o);try{await l?.return?.()}catch(e){if(!("error"in s))s={error:e}}o.subscribers.forEach((e)=>e.finish(s))}}return{subscribe(o){return{[Symbol.asyncIterator](){let l=[],s=[],e=!1,t,r,I=o?.types?.length?new Set(o.types):void 0,x=(p)=>!I||p.type==="server.connected"||I.has(p.type);function d(p,g=!0){if(t=p,g)s.length=0;if(o?.signal?.removeEventListener("abort",u),r?.subscribers.delete(f)&&!r.subscribers.size)c(r);l.splice(0).forEach((S)=>{if("error"in p)S.reject(p.error);else S.resolve({done:!0,value:void 0})})}function u(){d({})}let f={activity:o?.onActivity,finish(p){d(p,!1)},push(p){if(t)return;if(!x(p))return;let g=l.shift();if(g){g.resolve({done:!1,value:p});return}if(s.length===4096){d({error:Error("Event subscriber exceeded its 4096-event capacity")});return}s.push(p)}};function b(){if(t)return;let p=!a;if(r=a??{controller:new AbortController,subscribers:new Set},a=r,r.subscribers.add(f),r.connected)f.push(r.connected);if(p)y(r)}return{next(){let p=s.shift();if(p)return Promise.resolve({done:!1,value:p});if(t){if("error"in t)return Promise.reject(t.error);return Promise.resolve({done:!0,value:void 0})}if(o?.signal?.aborted)return u(),Promise.resolve({done:!0,value:void 0});let g=Promise.withResolvers();if(l.push(g),!e)e=!0,o?.signal?.addEventListener("abort",u,{once:!0}),b();return g.promise},return(){return d({}),Promise.resolve({done:!0,value:void 0})}}}}}}}function q(n,a){return(i)=>{let c=(y,o)=>{if(!Object.hasOwn(i.events,y))throw Error(`Unknown RPC event: ${i.id}.${y}`);let l=V(i,y);return{[Symbol.asyncIterator](){let s=new AbortController,e=o?.signal?AbortSignal.any([s.signal,o.signal]):s.signal,t=async function*(){try{for await(let r of a.subscribe({signal:e})){if(e.aborted)return;if(r.type!==l)continue;yield r}}catch(r){if(!e.aborted)throw r}finally{s.abort()}}();return{next:()=>t.next(),return:()=>(s.abort(),t.return())}}}};return Object.assign(Object.fromEntries(Object.keys(i.methods).map((y)=>[y,async(o,l)=>{try{return(await n.rpc.call({rpcID:i.id,method:y,input:o,location:l?.location},{signal:l?.signal,headers:l?.headers})).output}catch(s){if(!C(s)&&!A(s))throw s;throw s.data===void 0?{type:s.type,message:s.message}:{type:s.type,message:s.message,data:s.data}}}])),{events:{subscribe:c,on:(y,o,l)=>{let s=new AbortController,e=l?.signal?AbortSignal.any([s.signal,l.signal]):s.signal,t=c(y,{signal:e});return(async()=>{for await(let r of t)await o(r)})().catch((r)=>console.error(r)),()=>s.abort()}}})}}function V(n,a){return`rpc.${n.id}.${a}`}function _(n){let a=w(n),i=N((c,y)=>a.event.subscribe(void 0,{signal:c,onActivity:y}));return{...a,rpc:Object.assign(q(a,i),a.rpc),event:i}}function j(n){return n.flatMap((a)=>a.type==="document"?a.experimental?.diagnostics??[]:[])}function W(n){let a=n.line===void 0?"":`:${n.line}:${n.column??1}`;return`${n.source}${a} (${n.path}): ${n.message}`}var J=/^media:([0-9a-f]{64})$/;function B(n){if(!n)return;return J.exec(n)?.[1]}function z(n){return{...n,message:{...n.message,list:(a,i)=>n.message.list(a,D(i))},session:{...n.session,message:{...n.session.message,get:(a,i)=>n.session.message.get(a,D(i))},inbox:{...n.session.inbox,list:(a,i)=>n.session.inbox.list(a,D(i))}}}}function D(n){if(n?.mediaRefs===!1)return n;let a=new Headers(n?.headers);return a.set("X-OpenCode-Capabilities","experimental-media-uri"),{...n,headers:a}}export{m as ClientError,h as OpenCode,j as configDiagnostics,W as formatConfigDiagnostic,te as isAgentNotFoundError,Fe as isArtifactNotFoundError,Le as isAutomationNotFoundError,ke as isBlobNotFoundError,de as isCommandExecutionError,ie as isCommandNotFoundError,ae as isConflictError,Ae as isFileNotFoundError,be as isForbiddenError,ce as isFormAlreadySettledError,ye as isFormInvalidAnswerError,ue as isFormNotFoundError,ge as isInstructionEntryValueTooLargeError,De as isIntegrationAttemptNotFoundError,ve as isIntegrationMethodNotFoundError,Ee as isIntegrationNotFoundError,oe as isInvalidCursorError,Y as isInvalidRequestError,Z as isLocationNotFoundError,Re as isMcpServerNotFoundError,se as isMessageNotFoundError,xe as isModelNotFoundError,Ce as isPermissionNotFoundError,Pe as isPermissionSavedNotFoundError,ne as isPluginNotFoundError,Oe as isProjectNotFoundError,Ie as isProviderNotFoundError,fe as isProviderRequestError,qe as isPtyFeatureUnsupportedError,Me as isPtyNotFoundError,C as isRpcError,A as isRpcInternalError,ee as isServiceUnavailableError,pe as isSessionBusyError,re as isSessionNotFoundError,Te as isShellNotFoundError,me as isSkillNotFoundError,X as isUnauthorizedError,le as isUnknownError,Se as isUnsupportedModelError,we as isVcsInitNotSupportedError,he as isVideoNotFoundError,Ue as isWorktreeError,B as mediaHashFromUri,z as withMediaRefs};
|
|
12
|
+
`)}if(u.done)return}}finally{try{await I.cancel()}catch{}I.releaseLock()}}}),s={server:{info:(e)=>o({method:"GET",path:"/api/info",successStatus:200,declaredStatuses:[400,401],empty:!1},e),pair:(e)=>o({method:"POST",path:"/api/pair",successStatus:200,declaredStatuses:[400,401],empty:!1},e),connect:(e,t)=>o({method:"GET",path:`/auth/connect/${encodeURIComponent(e.code)}`,successStatus:200,declaredStatuses:[400,401],empty:!1},t)},location:{get:(e,t)=>o({method:"GET",path:"/api/location",query:{location:e?.location},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t),reload:(e)=>o({method:"POST",path:"/api/location/reload",successStatus:204,declaredStatuses:[400,401,503],empty:!0},e)},agent:{list:(e,t)=>o({method:"GET",path:"/api/agent",query:{location:e?.location},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t),get:(e,t)=>o({method:"GET",path:`/api/agent/${encodeURIComponent(e.agentID)}`,query:{location:e.location},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t)},plugin:{list:(e,t)=>o({method:"GET",path:"/api/plugin",query:{location:e?.location},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t),gui:(e,t)=>o({method:"GET",path:"/api/plugin/gui",query:{location:e.location,id:e.id},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t),check:(e,t)=>o({method:"POST",path:"/api/plugin/check",query:{location:e?.location},body:{target:e?.target},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t),update:(e,t)=>o({method:"POST",path:"/api/plugin/update",query:{location:e.location},body:{targets:e.targets},successStatus:204,declaredStatuses:[400,401,404,503],empty:!0},t)},session:{list:(e,t)=>o({method:"GET",path:"/api/session",query:{limit:e?.limit,order:e?.order,search:e?.search,parentID:e?.parentID,archived:e?.archived,directory:e?.directory,project:e?.project,subpath:e?.subpath,cursor:e?.cursor},successStatus:200,declaredStatuses:[400,401],empty:!1},t),create:(e,t)=>o({method:"POST",path:"/api/session",body:{id:e?.id,parentID:e?.parentID,title:e?.title,agent:e?.agent,model:e?.model,location:e?.location,metadata:e?.metadata,permissions:e?.permissions},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t).then((r)=>r.data),active:(e)=>o({method:"GET",path:"/api/session/active",successStatus:200,declaredStatuses:[400,401],empty:!1},e).then((t)=>t.data),get:(e,t)=>o({method:"GET",path:`/api/session/${encodeURIComponent(e.sessionID)}`,successStatus:200,declaredStatuses:[400,401,404],empty:!1},t).then((r)=>r.data),remove:(e,t)=>o({method:"DELETE",path:`/api/session/${encodeURIComponent(e.sessionID)}`,successStatus:204,declaredStatuses:[400,401,404],empty:!0},t),fork:(e,t)=>o({method:"POST",path:`/api/session/${encodeURIComponent(e.sessionID)}/fork`,body:{before:e.before},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t).then((r)=>r.data),switchAgent:(e,t)=>o({method:"POST",path:`/api/session/${encodeURIComponent(e.sessionID)}/agent`,body:{agent:e.agent},successStatus:204,declaredStatuses:[400,401,404],empty:!0},t),switchModel:(e,t)=>o({method:"POST",path:`/api/session/${encodeURIComponent(e.sessionID)}/model`,body:{model:e.model},successStatus:204,declaredStatuses:[400,401,404],empty:!0},t),update:(e,t)=>o({method:"PATCH",path:`/api/session/${encodeURIComponent(e.sessionID)}`,body:{title:e.title,metadata:e.metadata,permissions:e.permissions,archived:e.archived},successStatus:204,declaredStatuses:[400,401,404],empty:!0},t),move:(e,t)=>o({method:"POST",path:`/api/session/${encodeURIComponent(e.sessionID)}/move`,body:{directory:e.directory,delivery:e.delivery},successStatus:204,declaredStatuses:[400,401,404],empty:!0},t),prompt:(e,t)=>o({method:"POST",path:`/api/session/${encodeURIComponent(e.sessionID)}/prompt`,body:{id:e.id,text:e.text,files:e.files,agents:e.agents,skills:e.skills,metadata:e.metadata,delivery:e.delivery,resume:e.resume},successStatus:200,declaredStatuses:[400,401,404,409],empty:!1},t).then((r)=>r.data),command:(e,t)=>o({method:"POST",path:`/api/session/${encodeURIComponent(e.sessionID)}/command`,body:{name:e.name,text:e.text,files:e.files,agents:e.agents,skills:e.skills,delivery:e.delivery},successStatus:204,declaredStatuses:[400,401,404,500],empty:!0},t),synthetic:(e,t)=>o({method:"POST",path:`/api/session/${encodeURIComponent(e.sessionID)}/synthetic`,body:{id:e.id,text:e.text,description:e.description,metadata:e.metadata,delivery:e.delivery,resume:e.resume},successStatus:200,declaredStatuses:[400,401,404,409],empty:!1},t).then((r)=>r.data),shell:(e,t)=>o({method:"POST",path:`/api/session/${encodeURIComponent(e.sessionID)}/shell`,body:{id:e.id,command:e.command},successStatus:204,declaredStatuses:[400,401,404],empty:!0},t),compact:(e,t)=>o({method:"POST",path:`/api/session/${encodeURIComponent(e.sessionID)}/compact`,body:{id:e.id,delivery:e.delivery},successStatus:200,declaredStatuses:[400,401,404,409],empty:!1},t).then((r)=>r.data),revert:{stage:(e,t)=>o({method:"POST",path:`/api/session/${encodeURIComponent(e.sessionID)}/revert/stage`,body:{messageID:e.messageID,files:e.files},successStatus:200,declaredStatuses:[400,401,404,409,500],empty:!1},t).then((r)=>r.data),clear:(e,t)=>o({method:"DELETE",path:`/api/session/${encodeURIComponent(e.sessionID)}/revert`,successStatus:204,declaredStatuses:[400,401,404,409,500],empty:!0},t),commit:(e,t)=>o({method:"POST",path:`/api/session/${encodeURIComponent(e.sessionID)}/revert/commit`,successStatus:204,declaredStatuses:[400,401,404,409],empty:!0},t)},context:(e,t)=>o({method:"GET",path:`/api/session/${encodeURIComponent(e.sessionID)}/context`,successStatus:200,declaredStatuses:[400,401,404,500],empty:!1},t).then((r)=>r.data),diff:(e,t)=>o({method:"GET",path:`/api/session/${encodeURIComponent(e.sessionID)}/diff`,query:{from:e.from,to:e.to,context:e.context},successStatus:200,declaredStatuses:[400,401,404,500],empty:!1},t).then((r)=>r.data),inbox:{list:(e,t)=>o({method:"GET",path:`/api/session/${encodeURIComponent(e.sessionID)}/inbox`,successStatus:200,declaredStatuses:[400,401,404],empty:!1},t).then((r)=>r.data),cancel:(e,t)=>o({method:"DELETE",path:`/api/session/${encodeURIComponent(e.sessionID)}/inbox/${encodeURIComponent(e.inboxID)}`,successStatus:204,declaredStatuses:[400,401,404],empty:!0},t),update:(e,t)=>o({method:"PATCH",path:`/api/session/${encodeURIComponent(e.sessionID)}/inbox/${encodeURIComponent(e.inboxID)}`,body:{delivery:e.delivery},successStatus:204,declaredStatuses:[400,401,404,409],empty:!0},t)},generate:(e,t)=>o({method:"POST",path:`/api/session/${encodeURIComponent(e.sessionID)}/generate`,body:{prompt:e.prompt},successStatus:200,declaredStatuses:[400,401,404,503],empty:!1},t).then((r)=>r.data),interrupt:(e,t)=>o({method:"POST",path:`/api/session/${encodeURIComponent(e.sessionID)}/interrupt`,query:{resume:e.resume},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t),background:(e,t)=>o({method:"POST",path:`/api/session/${encodeURIComponent(e.sessionID)}/background`,successStatus:204,declaredStatuses:[400,401,404],empty:!0},t),message:{get:(e,t)=>o({method:"GET",path:`/api/session/${encodeURIComponent(e.sessionID)}/message/${encodeURIComponent(e.messageID)}`,successStatus:200,declaredStatuses:[400,401,404],empty:!1},t).then((r)=>r.data)},form:{list:(e,t)=>o({method:"GET",path:`/api/session/${encodeURIComponent(e.sessionID)}/form`,successStatus:200,declaredStatuses:[400,401,404],empty:!1},t).then((r)=>r.data),create:(e,t)=>o({method:"POST",path:`/api/session/${encodeURIComponent(e.sessionID)}/form`,body:{id:e.id,title:e.title,metadata:e.metadata,fields:e.fields},successStatus:200,declaredStatuses:[400,401,404,409],empty:!1},t).then((r)=>r.data),get:(e,t)=>o({method:"GET",path:`/api/session/${encodeURIComponent(e.sessionID)}/form/${encodeURIComponent(e.formID)}`,successStatus:200,declaredStatuses:[400,401,404],empty:!1},t).then((r)=>r.data),reply:(e,t)=>o({method:"POST",path:`/api/session/${encodeURIComponent(e.sessionID)}/form/${encodeURIComponent(e.formID)}/reply`,body:{answer:e.answer},successStatus:204,declaredStatuses:[400,401,404,409],empty:!0},t),cancel:(e,t)=>o({method:"DELETE",path:`/api/session/${encodeURIComponent(e.sessionID)}/form/${encodeURIComponent(e.formID)}`,query:{message:e.message},successStatus:204,declaredStatuses:[400,401,404,409],empty:!0},t)},environment:(e,t)=>o({method:"PUT",path:`/api/session/${encodeURIComponent(e.sessionID)}/environment`,body:{variables:e.variables},successStatus:204,declaredStatuses:[400,401,404],empty:!0},t),view:(e,t)=>o({method:"POST",path:`/api/session/${encodeURIComponent(e.sessionID)}/view`,body:{idle:e.idle},successStatus:204,declaredStatuses:[400,401,404],empty:!0},t)},experimental:{session:{stats:(e,t)=>o({method:"GET",path:"/api/experimental/session/stats",query:{from:e?.from,to:e?.to,project:e?.project,timezone:e?.timezone,tools:e?.tools},successStatus:200,declaredStatuses:[400,401],empty:!1},t).then((r)=>r.data),import:(e,t)=>o({method:"POST",path:"/api/experimental/session/import",body:{info:e.info,messages:e.messages,location:e.location},successStatus:200,declaredStatuses:[400,401,404,409],empty:!1},t).then((r)=>r.data),export:(e,t)=>o({method:"GET",path:`/api/experimental/session/${encodeURIComponent(e.sessionID)}/export`,query:{sanitize:e.sanitize},successStatus:200,declaredStatuses:[400,401,404,500],empty:!1},t).then((r)=>r.data),skill:(e,t)=>o({method:"POST",path:`/api/experimental/session/${encodeURIComponent(e.sessionID)}/skill`,body:{id:e.id,resume:e.resume},successStatus:204,declaredStatuses:[400,401,404],empty:!0},t),wait:(e,t)=>o({method:"POST",path:`/api/experimental/session/${encodeURIComponent(e.sessionID)}/wait`,successStatus:204,declaredStatuses:[400,401,404,503],empty:!0},t),instructions:{entry:{list:(e,t)=>o({method:"GET",path:`/api/experimental/session/${encodeURIComponent(e.sessionID)}/instructions/entries`,successStatus:200,declaredStatuses:[400,401,404],empty:!1},t).then((r)=>r.data),put:(e,t)=>o({method:"PUT",path:`/api/experimental/session/${encodeURIComponent(e.sessionID)}/instructions/entries/${encodeURIComponent(e.key)}`,body:{value:e.value},successStatus:204,declaredStatuses:[400,401,404,413],empty:!0},t),remove:(e,t)=>o({method:"DELETE",path:`/api/experimental/session/${encodeURIComponent(e.sessionID)}/instructions/entries/${encodeURIComponent(e.key)}`,successStatus:204,declaredStatuses:[400,401,404],empty:!0},t)}},log:(e,t)=>l({method:"GET",path:`/api/experimental/session/${encodeURIComponent(e.sessionID)}/log`,query:{after:e.after,follow:e.follow},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t)},generate:{text:(e,t)=>o({method:"POST",path:"/api/experimental/generate/text",body:{prompt:e.prompt,model:e.model},successStatus:200,declaredStatuses:[400,401,404,422,502,503],empty:!1},t).then((r)=>r.data),image:(e,t)=>o({method:"POST",path:"/api/experimental/generate/image",body:{model:e.model,prompt:e.prompt,images:e.images,n:e.n,aspect:e.aspect,resolution:e.resolution},successStatus:200,declaredStatuses:[400,401,404,422,502,503],empty:!1},t).then((r)=>r.data),video:{create:(e,t)=>o({method:"POST",path:"/api/experimental/generate/video",body:{model:e.model,prompt:e.prompt,start:e.start,end:e.end,references:e.references,duration:e.duration,aspect:e.aspect,resolution:e.resolution,sound:e.sound},successStatus:200,declaredStatuses:[400,401,403,404,422,502,503],empty:!1},t).then((r)=>r.data),get:(e,t)=>o({method:"GET",path:`/api/experimental/generate/video/${encodeURIComponent(e.id)}`,successStatus:200,declaredStatuses:[400,401,403,404],empty:!1},t).then((r)=>r.data)},decisions:(e,t)=>o({method:"POST",path:"/api/experimental/generate/decisions",body:{model:e.model,input:e.input,questions:e.questions},successStatus:200,declaredStatuses:[400,401,404,422,502,503],empty:!1},t).then((r)=>r.data)},voice:{models:(e)=>o({method:"GET",path:"/api/experimental/voice/models",successStatus:200,declaredStatuses:[400,401,404,503],empty:!1},e).then((t)=>t.data),session:(e,t)=>o({method:"POST",path:"/api/experimental/voice/session",body:{model:e.model,session:e.session,transport:e.transport},successStatus:200,declaredStatuses:[400,401,404,503],empty:!1},t).then((r)=>r.data)},integration:{wellknown:{add:(e,t)=>o({method:"POST",path:"/api/experimental/integration/wellknown",query:{location:e.location},body:{url:e.url},successStatus:204,declaredStatuses:[400,401,404],empty:!0},t)}},mcp:{add:(e,t)=>o({method:"PUT",path:`/api/experimental/mcp/${encodeURIComponent(e.server)}`,query:{location:e.location},body:{config:e.config},successStatus:204,declaredStatuses:[400,401,404],empty:!0},t),remove:(e,t)=>o({method:"DELETE",path:`/api/experimental/mcp/${encodeURIComponent(e.server)}`,query:{location:e.location},successStatus:204,declaredStatuses:[400,401,404],empty:!0},t),connect:(e,t)=>o({method:"POST",path:`/api/experimental/mcp/${encodeURIComponent(e.server)}/connect`,query:{location:e.location},successStatus:204,declaredStatuses:[400,401,404],empty:!0},t),disconnect:(e,t)=>o({method:"POST",path:`/api/experimental/mcp/${encodeURIComponent(e.server)}/disconnect`,query:{location:e.location},successStatus:204,declaredStatuses:[400,401,404],empty:!0},t),client:{token:(e,t)=>o({method:"POST",path:"/api/experimental/client-mcp/token",query:{location:e.location,name:e.name},headers:{"x-opencode-ticket":e["x-opencode-ticket"]},successStatus:200,declaredStatuses:[400,401,403,404],empty:!1},t)}},file:{write:(e,t)=>o({method:"POST",path:"/api/experimental/fs/write",query:{location:e.location,path:e.path},body:e.payload,successStatus:200,declaredStatuses:[400,401,404],empty:!1,binaryBody:!0},t),watch:(e,t)=>o({method:"POST",path:"/api/experimental/fs/watch",query:{location:e.location},body:{path:e.path},successStatus:204,declaredStatuses:[400,401,404,503],empty:!0},t),unwatch:(e,t)=>o({method:"DELETE",path:"/api/experimental/fs/watch",query:{location:e.location},body:{path:e.path},successStatus:204,declaredStatuses:[400,401,404],empty:!0},t)},persistentPty:{read:(e,t)=>o({method:"GET",path:`/api/experimental/session/${encodeURIComponent(e.sessionID)}/terminal/read`,query:{lines:e.lines},successStatus:200,declaredStatuses:[400,401,503],empty:!1},t).then((r)=>r.data),list:(e,t)=>o({method:"GET",path:`/api/experimental/session/${encodeURIComponent(e.sessionID)}/terminal`,successStatus:200,declaredStatuses:[400,401,503],empty:!1},t).then((r)=>r.data),create:(e,t)=>o({method:"POST",path:`/api/experimental/session/${encodeURIComponent(e.sessionID)}/terminal`,body:{command:e.command,args:e.args,cwd:e.cwd,title:e.title,env:e.env,size:e.size},successStatus:200,declaredStatuses:[400,401,503],empty:!1},t).then((r)=>r.data),shutdown:(e)=>o({method:"POST",path:"/api/experimental/persistent-pty/shutdown",successStatus:204,declaredStatuses:[400,401,503],empty:!0},e),handoff:(e)=>o({method:"POST",path:"/api/experimental/persistent-pty/handoff",successStatus:200,declaredStatuses:[400,401,503],empty:!1},e),get:(e,t)=>o({method:"GET",path:`/api/experimental/persistent-pty/${encodeURIComponent(e.ptyID)}`,successStatus:200,declaredStatuses:[400,401,404,503],empty:!1},t).then((r)=>r.data),update:(e,t)=>o({method:"PUT",path:`/api/experimental/persistent-pty/${encodeURIComponent(e.ptyID)}`,body:{attachmentID:e.attachmentID,size:e.size,title:e.title},successStatus:200,declaredStatuses:[400,401,404,501,503],empty:!1},t).then((r)=>r.data),snapshot:(e,t)=>o({method:"GET",path:`/api/experimental/persistent-pty/${encodeURIComponent(e.ptyID)}/snapshot`,successStatus:200,declaredStatuses:[400,401,404,503],empty:!1},t).then((r)=>r.data),remove:(e,t)=>o({method:"DELETE",path:`/api/experimental/persistent-pty/${encodeURIComponent(e.ptyID)}`,successStatus:204,declaredStatuses:[400,401,404,503],empty:!0},t),connectToken:(e,t)=>o({method:"POST",path:`/api/experimental/persistent-pty/${encodeURIComponent(e.ptyID)}/connect-token`,headers:{"x-opencode-ticket":e["x-opencode-ticket"]},successStatus:200,declaredStatuses:[400,401,403,404,503],empty:!1},t).then((r)=>r.data)},media:{get:(e,t)=>o({method:"GET",path:`/api/experimental/media/${encodeURIComponent(e.hash)}`,successStatus:200,declaredStatuses:[400,401,404],empty:!1,binary:!0},t)},blob:{get:(e,t)=>o({method:"GET",path:`/api/experimental/blob/${encodeURIComponent(e.id)}`,successStatus:200,declaredStatuses:[400,401,404],empty:!1,binary:!0},t)},automation:{create:(e,t)=>o({method:"POST",path:"/api/experimental/automation",body:{sessionID:e.sessionID,directory:e.directory,name:e.name,trigger:e.trigger,action:e.action,expires:e.expires},successStatus:200,declaredStatuses:[400,401,403,404],empty:!1},t).then((r)=>r.data),list:(e,t)=>o({method:"GET",path:"/api/experimental/automation",query:{sessionID:e?.sessionID,directory:e?.directory},successStatus:200,declaredStatuses:[400,401,403,404],empty:!1},t).then((r)=>r.data),get:(e,t)=>o({method:"GET",path:`/api/experimental/automation/${encodeURIComponent(e.automationID)}`,successStatus:200,declaredStatuses:[400,401,403,404],empty:!1},t).then((r)=>r.data),pause:(e,t)=>o({method:"POST",path:`/api/experimental/automation/${encodeURIComponent(e.automationID)}/pause`,successStatus:200,declaredStatuses:[400,401,403,404],empty:!1},t).then((r)=>r.data),resume:(e,t)=>o({method:"POST",path:`/api/experimental/automation/${encodeURIComponent(e.automationID)}/resume`,successStatus:200,declaredStatuses:[400,401,403,404],empty:!1},t).then((r)=>r.data),delete:(e,t)=>o({method:"DELETE",path:`/api/experimental/automation/${encodeURIComponent(e.automationID)}`,successStatus:204,declaredStatuses:[400,401,403,404],empty:!0},t)},artifacts:{providers:(e,t)=>o({method:"GET",path:"/api/experimental/artifacts/providers",query:{location:e?.location},successStatus:200,declaredStatuses:[400,401,403,404,503],empty:!1},t),list:(e,t)=>o({method:"GET",path:"/api/experimental/artifacts",query:{location:e?.location,sessionID:e?.sessionID,provider:e?.provider},successStatus:200,declaredStatuses:[400,401,403,404,503],empty:!1},t),create:(e,t)=>o({method:"POST",path:"/api/experimental/artifacts",query:{location:e.location},body:{title:e.title,files:e.files,entry:e.entry,provider:e.provider,sessionID:e.sessionID},successStatus:200,declaredStatuses:[400,401,403,404,503],empty:!1},t),get:(e,t)=>o({method:"GET",path:`/api/experimental/artifacts/${encodeURIComponent(e.artifactID)}`,query:{location:e.location},successStatus:200,declaredStatuses:[400,401,403,404,503],empty:!1},t),update:(e,t)=>o({method:"PATCH",path:`/api/experimental/artifacts/${encodeURIComponent(e.artifactID)}`,query:{location:e.location},body:{title:e.title,files:e.files,entry:e.entry,sessionID:e.sessionID},successStatus:200,declaredStatuses:[400,401,403,404,503],empty:!1},t),delete:(e,t)=>o({method:"DELETE",path:`/api/experimental/artifacts/${encodeURIComponent(e.artifactID)}`,query:{location:e.location},successStatus:204,declaredStatuses:[400,401,403,404,503],empty:!0},t),view:(e,t)=>o({method:"GET",path:`/api/experimental/artifacts/${encodeURIComponent(e.artifactID)}/view/${v(e.path)}`,query:{location:e.location},successStatus:200,declaredStatuses:[400,401,403,404,503],empty:!1,binary:!0},t)},job:{list:(e,t)=>o({method:"GET",path:"/api/experimental/job",query:{sessionID:e?.sessionID,kind:e?.kind,status:e?.status,descendants:e?.descendants},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t).then((r)=>r.data),cancel:(e,t)=>o({method:"POST",path:`/api/experimental/job/${encodeURIComponent(e.id)}/cancel`,successStatus:204,declaredStatuses:[400,401],empty:!0},t)},migration:{v1:{status:(e)=>o({method:"GET",path:"/api/experimental/migration/v1",successStatus:200,declaredStatuses:[400,401],empty:!1},e)}},usage:{limits:(e,t)=>o({method:"GET",path:"/api/experimental/usage/limits",query:{location:e?.location},successStatus:200,declaredStatuses:[400,401,404,503],empty:!1},t)},config:{update:(e,t)=>o({method:"PATCH",path:"/api/experimental/config",body:{shell:e.shell},successStatus:204,declaredStatuses:[400,401,404],empty:!0},t)}},message:{list:(e,t)=>o({method:"GET",path:`/api/session/${encodeURIComponent(e.sessionID)}/message`,query:{limit:e.limit,order:e.order,cursor:e.cursor,type:e.type},successStatus:200,declaredStatuses:[400,401,404,500],empty:!1},t)},model:{list:(e,t)=>o({method:"GET",path:"/api/model",query:{location:e?.location,types:e?.types},successStatus:200,declaredStatuses:[400,401,404,503],empty:!1},t),default:(e,t)=>o({method:"GET",path:"/api/model/default",query:{location:e?.location},successStatus:200,declaredStatuses:[400,401,404,503],empty:!1},t)},provider:{list:(e,t)=>o({method:"GET",path:"/api/provider",query:{location:e?.location},successStatus:200,declaredStatuses:[400,401,404,503],empty:!1},t),get:(e,t)=>o({method:"GET",path:`/api/provider/${encodeURIComponent(e.providerID)}`,query:{location:e.location},successStatus:200,declaredStatuses:[400,401,404,503],empty:!1},t)},integration:{list:(e,t)=>o({method:"GET",path:"/api/integration",query:{location:e?.location},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t),get:(e,t)=>o({method:"GET",path:`/api/integration/${encodeURIComponent(e.integrationID)}`,query:{location:e.location},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t),connect:{key:(e,t)=>o({method:"POST",path:`/api/integration/${encodeURIComponent(e.integrationID)}/connect/key`,query:{location:e.location},body:{key:e.key,answer:e.answer,label:e.label},successStatus:204,declaredStatuses:[400,401,404],empty:!0},t),external:(e,t)=>o({method:"POST",path:`/api/integration/${encodeURIComponent(e.integrationID)}/connect/external`,query:{location:e.location},body:{methodID:e.methodID,answer:e.answer,label:e.label},successStatus:204,declaredStatuses:[400,401,404],empty:!0},t)},oauth:{connect:(e,t)=>o({method:"POST",path:`/api/integration/${encodeURIComponent(e.integrationID)}/connect/oauth`,query:{location:e.location},body:{methodID:e.methodID,answer:e.answer,label:e.label},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t),status:(e,t)=>o({method:"GET",path:`/api/integration/${encodeURIComponent(e.integrationID)}/connect/oauth/${encodeURIComponent(e.attemptID)}`,query:{location:e.location},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t),complete:(e,t)=>o({method:"POST",path:`/api/integration/${encodeURIComponent(e.integrationID)}/connect/oauth/${encodeURIComponent(e.attemptID)}/complete`,query:{location:e.location},body:{code:e.code},successStatus:204,declaredStatuses:[400,401,404],empty:!0},t),cancel:(e,t)=>o({method:"DELETE",path:`/api/integration/${encodeURIComponent(e.integrationID)}/connect/oauth/${encodeURIComponent(e.attemptID)}`,query:{location:e.location},successStatus:204,declaredStatuses:[400,401,404],empty:!0},t)},command:{connect:(e,t)=>o({method:"POST",path:`/api/integration/${encodeURIComponent(e.integrationID)}/connect/command`,query:{location:e.location},body:{methodID:e.methodID,label:e.label},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t),status:(e,t)=>o({method:"GET",path:`/api/integration/${encodeURIComponent(e.integrationID)}/connect/command/${encodeURIComponent(e.attemptID)}`,query:{location:e.location},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t),cancel:(e,t)=>o({method:"DELETE",path:`/api/integration/${encodeURIComponent(e.integrationID)}/connect/command/${encodeURIComponent(e.attemptID)}`,query:{location:e.location},successStatus:204,declaredStatuses:[400,401,404],empty:!0},t)}},mcp:{list:(e,t)=>o({method:"GET",path:"/api/mcp",query:{location:e?.location},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t),resource:{catalog:(e,t)=>o({method:"GET",path:"/api/mcp/resource",query:{location:e?.location},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t)}},credential:{list:(e)=>o({method:"GET",path:"/api/credential",successStatus:200,declaredStatuses:[400,401],empty:!1},e).then((t)=>t.data),create:(e,t)=>o({method:"POST",path:"/api/credential",body:{id:e.id,integrationID:e.integrationID,label:e.label,value:e.value,activate:e.activate},successStatus:200,declaredStatuses:[400,401,409],empty:!1},t).then((r)=>r.data),update:(e,t)=>o({method:"PATCH",path:`/api/credential/${encodeURIComponent(e.credentialID)}`,body:{label:e.label},successStatus:204,declaredStatuses:[400,401],empty:!0},t),activate:(e,t)=>o({method:"POST",path:`/api/credential/${encodeURIComponent(e.credentialID)}/activate`,successStatus:204,declaredStatuses:[400,401],empty:!0},t),remove:(e,t)=>o({method:"DELETE",path:`/api/credential/${encodeURIComponent(e.credentialID)}`,successStatus:204,declaredStatuses:[400,401],empty:!0},t)},project:{list:(e,t)=>o({method:"GET",path:"/api/project",query:{archived:e?.archived},successStatus:200,declaredStatuses:[400,401],empty:!1},t),update:(e,t)=>o({method:"PATCH",path:`/api/project/${encodeURIComponent(e.projectID)}`,body:{canonical:e.canonical,name:e.name,icon:e.icon,commands:e.commands},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t)},form:{list:(e,t)=>o({method:"GET",path:"/api/form",query:{location:e?.location},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t)},permission:{request:{list:(e,t)=>o({method:"GET",path:"/api/permission/request",query:{location:e?.location},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t)},saved:{list:(e,t)=>o({method:"GET",path:"/api/permission/saved",query:{projectID:e?.projectID},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t).then((r)=>r.data),update:(e,t)=>o({method:"PATCH",path:`/api/permission/saved/${encodeURIComponent(e.id)}`,body:{action:e.action,resource:e.resource},successStatus:200,declaredStatuses:[400,401,404,409],empty:!1},t).then((r)=>r.data),remove:(e,t)=>o({method:"DELETE",path:`/api/permission/saved/${encodeURIComponent(e.id)}`,successStatus:204,declaredStatuses:[400,401],empty:!0},t)},create:(e,t)=>o({method:"POST",path:`/api/session/${encodeURIComponent(e.sessionID)}/permission`,body:{id:e.id,action:e.action,resources:e.resources,save:e.save,metadata:e.metadata,source:e.source,agent:e.agent},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t).then((r)=>r.data),list:(e,t)=>o({method:"GET",path:`/api/session/${encodeURIComponent(e.sessionID)}/permission`,successStatus:200,declaredStatuses:[400,401,404],empty:!1},t).then((r)=>r.data),get:(e,t)=>o({method:"GET",path:`/api/session/${encodeURIComponent(e.sessionID)}/permission/${encodeURIComponent(e.requestID)}`,successStatus:200,declaredStatuses:[400,401,404],empty:!1},t).then((r)=>r.data),reply:(e,t)=>o({method:"POST",path:`/api/session/${encodeURIComponent(e.sessionID)}/permission/${encodeURIComponent(e.requestID)}/reply`,body:{decision:e.decision,message:e.message},successStatus:204,declaredStatuses:[400,401,404],empty:!0},t)},file:{read:(e,t)=>o({method:"GET",path:`/api/fs/read/${v(e.path)}`,query:{location:e.location},successStatus:200,declaredStatuses:[400,401,404],empty:!1,binary:!0},t),list:(e,t)=>o({method:"GET",path:"/api/fs/list",query:{location:e?.location,path:e?.path},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t),find:(e,t)=>o({method:"GET",path:"/api/fs/find",query:{location:e.location,query:e.query,type:e.type,limit:e.limit},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t)},command:{list:(e,t)=>o({method:"GET",path:"/api/command",query:{location:e?.location},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t)},skill:{list:(e,t)=>o({method:"GET",path:"/api/skill",query:{location:e?.location},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t)},rpc:{call:(e,t)=>o({method:"POST",path:`/api/rpc/${encodeURIComponent(e.rpcID)}/${encodeURIComponent(e.method)}`,query:{location:e.location},body:{input:e.input},successStatus:200,declaredStatuses:[400,401,404,500],empty:!1},t)},event:{subscribe:(e,t)=>l({method:"GET",path:"/api/event",query:{types:e?.types},successStatus:200,declaredStatuses:[400,401],empty:!1},t)},pty:{list:(e,t)=>o({method:"GET",path:"/api/pty",query:{location:e?.location},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t),create:(e,t)=>o({method:"POST",path:"/api/pty",query:{location:e?.location},body:{command:e?.command,args:e?.args,cwd:e?.cwd,title:e?.title,env:e?.env},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t),get:(e,t)=>o({method:"GET",path:`/api/pty/${encodeURIComponent(e.ptyID)}`,query:{location:e.location},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t),update:(e,t)=>o({method:"PUT",path:`/api/pty/${encodeURIComponent(e.ptyID)}`,query:{location:e.location},body:{title:e.title,size:e.size},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t),remove:(e,t)=>o({method:"DELETE",path:`/api/pty/${encodeURIComponent(e.ptyID)}`,query:{location:e.location},successStatus:204,declaredStatuses:[400,401,404],empty:!0},t),connect:{token:(e,t)=>o({method:"POST",path:`/api/pty/${encodeURIComponent(e.ptyID)}/connect-token`,query:{location:e.location},headers:{"x-opencode-ticket":e["x-opencode-ticket"]},successStatus:200,declaredStatuses:[400,401,403,404],empty:!1},t)}},shell:{list:(e,t)=>o({method:"GET",path:"/api/shell",query:{location:e?.location},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t),create:(e,t)=>o({method:"POST",path:"/api/shell",query:{location:e.location},body:{command:e.command,cwd:e.cwd,timeout:e.timeout,metadata:e.metadata},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t),get:(e,t)=>o({method:"GET",path:`/api/shell/${encodeURIComponent(e.id)}`,query:{location:e.location},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t),output:(e,t)=>o({method:"GET",path:`/api/shell/${encodeURIComponent(e.id)}/output`,query:{location:e.location,cursor:e.cursor,limit:e.limit},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t),remove:(e,t)=>o({method:"DELETE",path:`/api/shell/${encodeURIComponent(e.id)}`,query:{location:e.location},successStatus:204,declaredStatuses:[400,401,404],empty:!0},t)},reference:{list:(e,t)=>o({method:"GET",path:"/api/reference",query:{location:e?.location},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t)},worktree:{list:(e,t)=>o({method:"GET",path:"/api/worktree",query:{projectID:e.projectID},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t),create:(e,t)=>o({method:"POST",path:"/api/worktree",body:{projectID:e.projectID,from:e.from,branch:e.branch,directory:e.directory,name:e.name},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t),remove:(e,t)=>o({method:"DELETE",path:"/api/worktree",body:{projectID:e.projectID,directory:e.directory,force:e.force},successStatus:204,declaredStatuses:[400,401,404],empty:!0},t),refresh:(e,t)=>o({method:"POST",path:"/api/worktree/refresh",body:{projectID:e.projectID},successStatus:204,declaredStatuses:[400,401,404],empty:!0},t)},vcs:{init:(e,t)=>o({method:"POST",path:"/api/vcs/init",query:{location:e?.location,provider:e?.provider},successStatus:204,declaredStatuses:[400,401,404,409,501,503],empty:!0},t),get:(e,t)=>o({method:"GET",path:"/api/vcs",query:{location:e?.location},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t),base:(e,t)=>o({method:"GET",path:"/api/vcs/base",query:{location:e?.location},successStatus:200,declaredStatuses:[400,401,404,503],empty:!1},t),status:(e,t)=>o({method:"GET",path:"/api/vcs/status",query:{location:e?.location},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t),branch:{list:(e,t)=>o({method:"GET",path:"/api/vcs/branch",query:{location:e?.location,search:e?.search,limit:e?.limit},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t)},diff:(e,t)=>o({method:"GET",path:"/api/vcs/diff",query:{location:e.location,mode:e.mode,base:e.base,context:e.context,untracked:e.untracked},successStatus:200,declaredStatuses:[400,401,404,503],empty:!1},t)},debug:{heapDump:(e,t)=>o({method:"POST",path:"/api/debug/heap-dump",query:{directory:e?.directory},successStatus:200,declaredStatuses:[400,401,500],empty:!1},t),location:{list:(e)=>o({method:"GET",path:"/api/debug/location",successStatus:200,declaredStatuses:[400,401],empty:!1},e),evict:(e,t)=>o({method:"DELETE",path:"/api/debug/location",query:{location:e?.location},successStatus:204,declaredStatuses:[400,401],empty:!0},t)}},websearch:{providers:(e,t)=>o({method:"GET",path:"/api/websearch/provider",query:{location:e?.location},successStatus:200,declaredStatuses:[400,401,404,503],empty:!1},t),query:(e,t)=>o({method:"POST",path:"/api/websearch",query:{location:e.location},body:{query:e.query,providerID:e.providerID},successStatus:200,declaredStatuses:[400,401,404,503],empty:!1},t)},config:{get:(e,t)=>o({method:"GET",path:"/api/config",query:{location:e?.location},successStatus:200,declaredStatuses:[400,401,404],empty:!1},t),shells:(e)=>o({method:"GET",path:"/api/config/shell",successStatus:200,declaredStatuses:[400,401,404],empty:!1},e)}};return{...s,session:{...s.session,stats:s.experimental.session.stats,import:s.experimental.session.import,export:s.experimental.session.export,skill:s.experimental.session.skill,wait:s.experimental.session.wait,instructions:{entry:{list:s.experimental.session.instructions.entry.list,put:s.experimental.session.instructions.entry.put,remove:s.experimental.session.instructions.entry.remove}},log:s.experimental.session.log},generate:{text:s.experimental.generate.text,image:s.experimental.generate.image,decisions:s.experimental.generate.decisions},voice:{models:s.experimental.voice.models,session:s.experimental.voice.session},integration:{...s.integration,wellknown:{add:s.experimental.integration.wellknown.add}},mcp:{...s.mcp,add:s.experimental.mcp.add,remove:s.experimental.mcp.remove,connect:s.experimental.mcp.connect,disconnect:s.experimental.mcp.disconnect,client:{token:s.experimental.mcp.client.token}},file:{...s.file,write:s.experimental.file.write,watch:s.experimental.file.watch,unwatch:s.experimental.file.unwatch},migration:{v1:{status:s.experimental.migration.v1.status}},usage:{limits:s.experimental.usage.limits},config:{...s.config,update:s.experimental.config.update}}}function v(n){return n.split("/").map(encodeURIComponent).join("/")}function E(n,a,i){if(i===void 0)return;if(i===null){n.append(a,"null");return}if(Array.isArray(i)){for(let c of i)E(n,a,c);return}if(typeof i==="object"){for(let[c,y]of Object.entries(i))E(n,`${a}[${c}]`,y);return}n.append(a,String(i))}async function R(n){if(!O(n,"application/json")&&!n.headers.get("content-type")?.includes("+json")){try{await n.body?.cancel()}catch{}throw new m("UnsupportedContentType",{detail:n.headers.get("content-type")})}let a;try{a=await n.text()}catch(i){throw new m("Transport",{cause:i})}if(a==="")throw new m("MalformedResponse");try{return JSON.parse(a)}catch(i){throw new m("MalformedResponse",{cause:i})}}function G(n){let a=Object.assign(Error(n.message??n.data?.message),n);if(n._tag)a.name=n._tag;return a}function O(n,a){return n.headers.get("content-type")?.split(";",1)[0]?.trim().toLowerCase()===a}var Y=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="InvalidRequestError",X=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="UnauthorizedError",Z=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="LocationNotFoundError",ee=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="ServiceUnavailableError",te=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="AgentNotFoundError",ne=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="PluginNotFoundError",oe=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="InvalidCursorError",re=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="SessionNotFoundError",se=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="MessageNotFoundError",ae=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="ConflictError",ie=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="CommandNotFoundError",de=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="CommandExecutionError",pe=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="SessionBusyError",le=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="UnknownError",ue=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="FormNotFoundError",ye=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="FormInvalidAnswerError",ce=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="FormAlreadySettledError",me=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="SkillNotFoundError",ge=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="InstructionEntryValueTooLargeError",Ie=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="ProviderNotFoundError",xe=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="ModelNotFoundError",Se=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="UnsupportedModelError",fe=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="ProviderRequestError",be=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="ForbiddenError",he=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="VideoNotFoundError",Ee=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="IntegrationNotFoundError",De=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="IntegrationAttemptNotFoundError",ve=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="IntegrationMethodNotFoundError",Re=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="McpServerNotFoundError",Oe=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="ProjectNotFoundError",Pe=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="PermissionSavedNotFoundError",Ce=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="PermissionNotFoundError",Ae=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="FileNotFoundError",C=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="RpcError",A=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="RpcInternalError",Me=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="PtyNotFoundError",qe=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="PtyFeatureUnsupportedError",ke=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="BlobNotFoundError",Le=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="AutomationNotFoundError",Fe=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="ArtifactNotFoundError",Te=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="ShellNotFoundError",Ue=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="WorktreeError",we=(n)=>typeof n==="object"&&n!==null&&("_tag"in n)&&n._tag==="VcsInitNotSupportedError";function N(n){let a,i=4096;function c(o){if(o.connected=void 0,o.controller.abort(),a===o)a=void 0}async function y(o){let l,s={};try{if(o.controller.signal.aborted)return;l=n(o.controller.signal,()=>{o.subscribers.forEach((e)=>e.activity?.())})[Symbol.asyncIterator]();while(!o.controller.signal.aborted){let e=await l.next();if(e.done||o.controller.signal.aborted)break;if(e.value.type==="server.connected")o.connected=e.value;o.subscribers.forEach((t)=>t.push(e.value))}}catch(e){s={error:e}}finally{c(o);try{await l?.return?.()}catch(e){if(!("error"in s))s={error:e}}o.subscribers.forEach((e)=>e.finish(s))}}return{subscribe(o){return{[Symbol.asyncIterator](){let l=[],s=[],e=!1,t,r,I=o?.types?.length?new Set(o.types):void 0,x=(p)=>!I||p.type==="server.connected"||I.has(p.type);function d(p,g=!0){if(t=p,g)s.length=0;if(o?.signal?.removeEventListener("abort",u),r?.subscribers.delete(f)&&!r.subscribers.size)c(r);l.splice(0).forEach((S)=>{if("error"in p)S.reject(p.error);else S.resolve({done:!0,value:void 0})})}function u(){d({})}let f={activity:o?.onActivity,finish(p){d(p,!1)},push(p){if(t)return;if(!x(p))return;let g=l.shift();if(g){g.resolve({done:!1,value:p});return}if(s.length===4096){d({error:Error("Event subscriber exceeded its 4096-event capacity")});return}s.push(p)}};function b(){if(t)return;let p=!a;if(r=a??{controller:new AbortController,subscribers:new Set},a=r,r.subscribers.add(f),r.connected)f.push(r.connected);if(p)y(r)}return{next(){let p=s.shift();if(p)return Promise.resolve({done:!1,value:p});if(t){if("error"in t)return Promise.reject(t.error);return Promise.resolve({done:!0,value:void 0})}if(o?.signal?.aborted)return u(),Promise.resolve({done:!0,value:void 0});let g=Promise.withResolvers();if(l.push(g),!e)e=!0,o?.signal?.addEventListener("abort",u,{once:!0}),b();return g.promise},return(){return d({}),Promise.resolve({done:!0,value:void 0})}}}}}}}function q(n,a){return(i)=>{let c=(y,o)=>{if(!Object.hasOwn(i.events,y))throw Error(`Unknown RPC event: ${i.id}.${y}`);let l=V(i,y);return{[Symbol.asyncIterator](){let s=new AbortController,e=o?.signal?AbortSignal.any([s.signal,o.signal]):s.signal,t=async function*(){try{for await(let r of a.subscribe({signal:e})){if(e.aborted)return;if(r.type!==l)continue;yield r}}catch(r){if(!e.aborted)throw r}finally{s.abort()}}();return{next:()=>t.next(),return:()=>(s.abort(),t.return())}}}};return Object.assign(Object.fromEntries(Object.keys(i.methods).map((y)=>[y,async(o,l)=>{try{return(await n.rpc.call({rpcID:i.id,method:y,input:o,location:l?.location},{signal:l?.signal,headers:l?.headers})).output}catch(s){if(!C(s)&&!A(s))throw s;throw s.data===void 0?{type:s.type,message:s.message}:{type:s.type,message:s.message,data:s.data}}}])),{events:{subscribe:c,on:(y,o,l)=>{let s=new AbortController,e=l?.signal?AbortSignal.any([s.signal,l.signal]):s.signal,t=c(y,{signal:e});return(async()=>{for await(let r of t)await o(r)})().catch((r)=>console.error(r)),()=>s.abort()}}})}}function V(n,a){return`rpc.${n.id}.${a}`}function _(n){let a=w(n),i=N((c,y)=>a.event.subscribe(void 0,{signal:c,onActivity:y}));return{...a,rpc:Object.assign(q(a,i),a.rpc),event:i}}function j(n){return n.flatMap((a)=>a.type==="document"?a.experimental?.diagnostics??[]:[])}function W(n){let a=n.line===void 0?"":`:${n.line}:${n.column??1}`;return`${n.source}${a} (${n.path}): ${n.message}`}var J=/^media:([0-9a-f]{64})$/;function B(n){if(!n)return;return J.exec(n)?.[1]}function z(n){return{...n,message:{...n.message,list:(a,i)=>n.message.list(a,D(i))},session:{...n.session,message:{...n.session.message,get:(a,i)=>n.session.message.get(a,D(i))},inbox:{...n.session.inbox,list:(a,i)=>n.session.inbox.list(a,D(i))}}}}function D(n){if(n?.mediaRefs===!1)return n;let a=new Headers(n?.headers);return a.set("X-OpenCode-Capabilities","experimental-media-uri"),{...n,headers:a}}export{m as ClientError,h as OpenCode,j as configDiagnostics,W as formatConfigDiagnostic,te as isAgentNotFoundError,Fe as isArtifactNotFoundError,Le as isAutomationNotFoundError,ke as isBlobNotFoundError,de as isCommandExecutionError,ie as isCommandNotFoundError,ae as isConflictError,Ae as isFileNotFoundError,be as isForbiddenError,ce as isFormAlreadySettledError,ye as isFormInvalidAnswerError,ue as isFormNotFoundError,ge as isInstructionEntryValueTooLargeError,De as isIntegrationAttemptNotFoundError,ve as isIntegrationMethodNotFoundError,Ee as isIntegrationNotFoundError,oe as isInvalidCursorError,Y as isInvalidRequestError,Z as isLocationNotFoundError,Re as isMcpServerNotFoundError,se as isMessageNotFoundError,xe as isModelNotFoundError,Ce as isPermissionNotFoundError,Pe as isPermissionSavedNotFoundError,ne as isPluginNotFoundError,Oe as isProjectNotFoundError,Ie as isProviderNotFoundError,fe as isProviderRequestError,qe as isPtyFeatureUnsupportedError,Me as isPtyNotFoundError,C as isRpcError,A as isRpcInternalError,ee as isServiceUnavailableError,pe as isSessionBusyError,re as isSessionNotFoundError,Te as isShellNotFoundError,me as isSkillNotFoundError,X as isUnauthorizedError,le as isUnknownError,Se as isUnsupportedModelError,we as isVcsInitNotSupportedError,he as isVideoNotFoundError,Ue as isWorktreeError,B as mediaHashFromUri,z as withMediaRefs};
|
package/client/media.d.ts
CHANGED
|
@@ -125,6 +125,7 @@ export declare function withMediaRefs(api: ReturnType<typeof make>): {
|
|
|
125
125
|
};
|
|
126
126
|
job: {
|
|
127
127
|
list: (input?: import("./index.js").ExperimentalJobListInput, requestOptions?: RequestOptions) => Promise<import("./index.js").JobInfo[]>;
|
|
128
|
+
cancel: (input: import("./index.js").ExperimentalJobCancelInput, requestOptions?: RequestOptions) => Promise<void>;
|
|
128
129
|
};
|
|
129
130
|
migration: {
|
|
130
131
|
v1: {
|
|
@@ -306,7 +307,7 @@ export declare function withMediaRefs(api: ReturnType<typeof make>): {
|
|
|
306
307
|
call: (input: import("./index.js").RpcCallInput, requestOptions?: RequestOptions) => Promise<import("./index.js").RpcOutput>;
|
|
307
308
|
};
|
|
308
309
|
event: {
|
|
309
|
-
subscribe<Type extends Exclude<"agent.updated" | "artifact.updated" | "command.updated" | "config.updated" | "credential.switched" | "credential.updated" | "experimental.mcp.event" | "filesystem.changed" | "form.cancelled" | "form.created" | "form.replied" | "installation.update-available" | "installation.updated" | "integration.updated" | "location.shutdown" | "mcp.resources.changed" | "mcp.status.changed" | "model.updated" | "models-dev.refreshed" | "permission.asked" | "permission.cancelled" | "permission.replied" | "persistent-pty.added" | "persistent-pty.removed" | "persistent-pty.updated" | "plugin.updated" | "project.updated" | "provider.updated" | "pty.created" | "pty.deleted" | "pty.exited" | "pty.updated" | "reference.updated" | "server.connected" | "session.agent.selected" | "session.archived" | "session.compaction.delta" | "session.compaction.ended" | "session.compaction.failed" | "session.compaction.started" | "session.created" | "session.deleted" | "session.execution.failed" | "session.execution.interrupted" | "session.execution.started" | "session.execution.succeeded" | "session.forked" | "session.idle" | "session.inbox.cancelled" | "session.inbox.delivered" | "session.inbox.delivery.changed" | "session.inbox.enqueued" | "session.instructions.updated" | "session.metadata.updated" | "session.model.selected" | "session.moved" | "session.permissions" | "session.reasoning.delta" | "session.reasoning.ended" | "session.reasoning.started" | "session.renamed" | "session.retry.scheduled" | "session.revert.cleared" | "session.revert.committed" | "session.revert.staged" | "session.shell.ended" | "session.shell.started" | "session.skill.activated" | "session.status" | "session.step.ended" | "session.step.failed" | "session.step.first-token" | "session.step.started" | "session.step.streamed" | "session.synthetic" | "session.text.delta" | "session.text.ended" | "session.text.started" | "session.tool.called" | "session.tool.failed" | "session.tool.input.delta" | "session.tool.input.ended" | "session.tool.input.started" | "session.tool.progress" | "session.tool.subagent.prepared" | "session.tool.success" | "session.unarchived" | "session.usage.updated" | "session.viewed" | "shell.created" | "shell.deleted" | "shell.exited" | "skill.updated" | "tui.command.execute" | "tui.prompt.append" | "tui.session.select" | "tui.toast.show" | "vcs.branch.updated" | "websearch.updated" | "worktree.resolved" | "worktree.updated" | `rpc.${string}`, "server.connected"> = "agent.updated" | "artifact.updated" | "command.updated" | "config.updated" | "credential.switched" | "credential.updated" | "experimental.mcp.event" | "filesystem.changed" | "form.cancelled" | "form.created" | "form.replied" | "installation.update-available" | "installation.updated" | "integration.updated" | "location.shutdown" | "mcp.resources.changed" | "mcp.status.changed" | "model.updated" | "models-dev.refreshed" | "permission.asked" | "permission.cancelled" | "permission.replied" | "persistent-pty.added" | "persistent-pty.removed" | "persistent-pty.updated" | "plugin.updated" | "project.updated" | "provider.updated" | "pty.created" | "pty.deleted" | "pty.exited" | "pty.updated" | "reference.updated" | "session.agent.selected" | "session.archived" | "session.compaction.delta" | "session.compaction.ended" | "session.compaction.failed" | "session.compaction.started" | "session.created" | "session.deleted" | "session.execution.failed" | "session.execution.interrupted" | "session.execution.started" | "session.execution.succeeded" | "session.forked" | "session.idle" | "session.inbox.cancelled" | "session.inbox.delivered" | "session.inbox.delivery.changed" | "session.inbox.enqueued" | "session.instructions.updated" | "session.metadata.updated" | "session.model.selected" | "session.moved" | "session.permissions" | "session.reasoning.delta" | "session.reasoning.ended" | "session.reasoning.started" | "session.renamed" | "session.retry.scheduled" | "session.revert.cleared" | "session.revert.committed" | "session.revert.staged" | "session.shell.ended" | "session.shell.started" | "session.skill.activated" | "session.status" | "session.step.ended" | "session.step.failed" | "session.step.first-token" | "session.step.started" | "session.step.streamed" | "session.synthetic" | "session.text.delta" | "session.text.ended" | "session.text.started" | "session.tool.called" | "session.tool.failed" | "session.tool.input.delta" | "session.tool.input.ended" | "session.tool.input.started" | "session.tool.progress" | "session.tool.subagent.prepared" | "session.tool.success" | "session.unarchived" | "session.usage.updated" | "session.viewed" | "shell.created" | "shell.deleted" | "shell.exited" | "skill.updated" | "tui.command.execute" | "tui.prompt.append" | "tui.session.select" | "tui.toast.show" | "vcs.branch.updated" | "websearch.updated" | "worktree.resolved" | "worktree.updated" | `rpc.${string}`>(options?: import("./api.js").SubscribeOptions<Type> | undefined): AsyncIterable<([Extract<Type, "agent.updated">] extends [never] ? never : import("./index.js").AgentUpdated) | ([Extract<Type, "artifact.updated">] extends [never] ? never : import("./index.js").ArtifactUpdated) | ([Extract<Type, "command.updated">] extends [never] ? never : import("./index.js").CommandUpdated) | ([Extract<Type, "config.updated">] extends [never] ? never : import("./index.js").ConfigUpdated) | ([Extract<Type, "credential.switched">] extends [never] ? never : import("./index.js").CredentialSwitched) | ([Extract<Type, "credential.updated">] extends [never] ? never : import("./index.js").CredentialUpdated) | ([Extract<Type, "experimental.mcp.event">] extends [never] ? never : import("./index.js").ExperimentalMcpEvent) | ([Extract<Type, "filesystem.changed">] extends [never] ? never : import("./index.js").FilesystemChanged) | ([Extract<Type, "form.cancelled">] extends [never] ? never : import("./index.js").FormCancelled) | ([Extract<Type, "form.created">] extends [never] ? never : import("./index.js").FormCreated) | ([Extract<Type, "form.replied">] extends [never] ? never : import("./index.js").FormReplied) | ([Extract<Type, "installation.update-available">] extends [never] ? never : import("./index.js").InstallationUpdateAvailable) | ([Extract<Type, "installation.updated">] extends [never] ? never : import("./index.js").InstallationUpdated) | ([Extract<Type, "integration.updated">] extends [never] ? never : import("./index.js").IntegrationUpdated) | ([Extract<Type, "location.shutdown">] extends [never] ? never : import("./index.js").LocationShutdown) | ([Extract<Type, "mcp.resources.changed">] extends [never] ? never : import("./index.js").McpResourcesChanged) | ([Extract<Type, "mcp.status.changed">] extends [never] ? never : import("./index.js").McpStatusChanged) | ([Extract<Type, "model.updated">] extends [never] ? never : import("./index.js").ModelUpdated) | ([Extract<Type, "models-dev.refreshed">] extends [never] ? never : import("./index.js").ModelsDevRefreshed) | ([Extract<Type, "permission.asked">] extends [never] ? never : import("./index.js").PermissionAsked) | ([Extract<Type, "permission.cancelled">] extends [never] ? never : import("./index.js").PermissionCancelled) | ([Extract<Type, "permission.replied">] extends [never] ? never : import("./index.js").PermissionReplied) | ([Extract<Type, "persistent-pty.added">] extends [never] ? never : import("./index.js").PersistentPtyAdded) | ([Extract<Type, "persistent-pty.removed">] extends [never] ? never : import("./index.js").PersistentPtyRemoved) | ([Extract<Type, "persistent-pty.updated">] extends [never] ? never : import("./index.js").PersistentPtyUpdated) | ([Extract<Type, "plugin.updated">] extends [never] ? never : import("./index.js").PluginUpdated) | ([Extract<Type, "project.updated">] extends [never] ? never : import("./index.js").ProjectUpdated) | ([Extract<Type, "provider.updated">] extends [never] ? never : import("./index.js").ProviderUpdated) | ([Extract<Type, "pty.created">] extends [never] ? never : import("./index.js").PtyCreated) | ([Extract<Type, "pty.deleted">] extends [never] ? never : import("./index.js").PtyDeleted) | ([Extract<Type, "pty.exited">] extends [never] ? never : import("./index.js").PtyExited) | ([Extract<Type, "pty.updated">] extends [never] ? never : import("./index.js").PtyUpdated) | ([Extract<Type, "reference.updated">] extends [never] ? never : import("./index.js").ReferenceUpdated) | ([Extract<Type, "session.agent.selected">] extends [never] ? never : import("./index.js").SessionAgentSelected) | ([Extract<Type, "session.archived">] extends [never] ? never : import("./index.js").SessionArchived) | ([Extract<Type, "session.compaction.delta">] extends [never] ? never : import("./index.js").SessionCompactionDelta) | ([Extract<Type, "session.compaction.ended">] extends [never] ? never : import("./index.js").SessionCompactionEnded) | ([Extract<Type, "session.compaction.failed">] extends [never] ? never : import("./index.js").SessionCompactionFailed) | ([Extract<Type, "session.compaction.started">] extends [never] ? never : import("./index.js").SessionCompactionStarted) | ([Extract<Type, "session.created">] extends [never] ? never : import("./index.js").SessionCreated) | ([Extract<Type, "session.deleted">] extends [never] ? never : import("./index.js").SessionDeleted) | ([Extract<Type, "session.execution.failed">] extends [never] ? never : import("./index.js").SessionExecutionFailed) | ([Extract<Type, "session.execution.interrupted">] extends [never] ? never : import("./index.js").SessionExecutionInterrupted) | ([Extract<Type, "session.execution.started">] extends [never] ? never : import("./index.js").SessionExecutionStarted) | ([Extract<Type, "session.execution.succeeded">] extends [never] ? never : import("./index.js").SessionExecutionSucceeded) | ([Extract<Type, "session.forked">] extends [never] ? never : import("./index.js").SessionForked) | ([Extract<Type, "session.idle">] extends [never] ? never : import("./index.js").SessionIdle) | ([Extract<Type, "session.inbox.cancelled">] extends [never] ? never : import("./index.js").SessionInboxCancelled) | ([Extract<Type, "session.inbox.delivered">] extends [never] ? never : import("./index.js").SessionInboxDelivered) | ([Extract<Type, "session.inbox.delivery.changed">] extends [never] ? never : import("./index.js").SessionInboxDeliveryChanged) | ([Extract<Type, "session.inbox.enqueued">] extends [never] ? never : import("./index.js").SessionInboxEnqueued) | ([Extract<Type, "session.instructions.updated">] extends [never] ? never : import("./index.js").SessionInstructionsUpdated) | ([Extract<Type, "session.metadata.updated">] extends [never] ? never : import("./index.js").SessionMetadataUpdated) | ([Extract<Type, "session.model.selected">] extends [never] ? never : import("./index.js").SessionModelSelected) | ([Extract<Type, "session.moved">] extends [never] ? never : import("./index.js").SessionMoved) | ([Extract<Type, "session.permissions">] extends [never] ? never : import("./index.js").SessionPermissions) | ([Extract<Type, "session.reasoning.delta">] extends [never] ? never : import("./index.js").SessionReasoningDelta) | ([Extract<Type, "session.reasoning.ended">] extends [never] ? never : import("./index.js").SessionReasoningEnded) | ([Extract<Type, "session.reasoning.started">] extends [never] ? never : import("./index.js").SessionReasoningStarted) | ([Extract<Type, "session.renamed">] extends [never] ? never : import("./index.js").SessionRenamed) | ([Extract<Type, "session.retry.scheduled">] extends [never] ? never : import("./index.js").SessionRetryScheduled) | ([Extract<Type, "session.revert.cleared">] extends [never] ? never : import("./index.js").SessionRevertCleared) | ([Extract<Type, "session.revert.committed">] extends [never] ? never : import("./index.js").SessionRevertCommitted) | ([Extract<Type, "session.revert.staged">] extends [never] ? never : import("./index.js").SessionRevertStaged) | ([Extract<Type, "session.shell.ended">] extends [never] ? never : import("./index.js").SessionShellEnded) | ([Extract<Type, "session.shell.started">] extends [never] ? never : import("./index.js").SessionShellStarted) | ([Extract<Type, "session.skill.activated">] extends [never] ? never : import("./index.js").SessionSkillActivated) | ([Extract<Type, "session.status">] extends [never] ? never : import("./index.js").SessionStatusUpdated) | ([Extract<Type, "session.step.ended">] extends [never] ? never : import("./index.js").SessionStepEnded) | ([Extract<Type, "session.step.failed">] extends [never] ? never : import("./index.js").SessionStepFailed) | ([Extract<Type, "session.step.first-token">] extends [never] ? never : import("./index.js").SessionStepFirstToken) | ([Extract<Type, "session.step.started">] extends [never] ? never : import("./index.js").SessionStepStarted) | ([Extract<Type, "session.step.streamed">] extends [never] ? never : import("./index.js").SessionStepStreamed) | ([Extract<Type, "session.synthetic">] extends [never] ? never : import("./index.js").SessionSynthetic) | ([Extract<Type, "session.text.delta">] extends [never] ? never : import("./index.js").SessionTextDelta) | ([Extract<Type, "session.text.ended">] extends [never] ? never : import("./index.js").SessionTextEnded) | ([Extract<Type, "session.text.started">] extends [never] ? never : import("./index.js").SessionTextStarted) | ([Extract<Type, "session.tool.called">] extends [never] ? never : import("./index.js").SessionToolCalled) | ([Extract<Type, "session.tool.failed">] extends [never] ? never : import("./index.js").SessionToolFailed) | ([Extract<Type, "session.tool.input.delta">] extends [never] ? never : import("./index.js").SessionToolInputDelta) | ([Extract<Type, "session.tool.input.ended">] extends [never] ? never : import("./index.js").SessionToolInputEnded) | ([Extract<Type, "session.tool.input.started">] extends [never] ? never : import("./index.js").SessionToolInputStarted) | ([Extract<Type, "session.tool.progress">] extends [never] ? never : import("./index.js").SessionToolProgress) | ([Extract<Type, "session.tool.subagent.prepared">] extends [never] ? never : import("./index.js").SessionToolSubagentPrepared) | ([Extract<Type, "session.tool.success">] extends [never] ? never : import("./index.js").SessionToolSuccess) | ([Extract<Type, "session.unarchived">] extends [never] ? never : import("./index.js").SessionUnarchived) | ([Extract<Type, "session.usage.updated">] extends [never] ? never : import("./index.js").SessionUsageUpdated) | ([Extract<Type, "session.viewed">] extends [never] ? never : import("./index.js").SessionViewed) | ([Extract<Type, "shell.created">] extends [never] ? never : import("./index.js").ShellCreated) | ([Extract<Type, "shell.deleted">] extends [never] ? never : import("./index.js").ShellDeleted) | ([Extract<Type, "shell.exited">] extends [never] ? never : import("./index.js").ShellExited) | ([Extract<Type, "skill.updated">] extends [never] ? never : import("./index.js").SkillUpdated) | ([Extract<Type, "tui.command.execute">] extends [never] ? never : import("./index.js").TuiCommandExecute) | ([Extract<Type, "tui.prompt.append">] extends [never] ? never : import("./index.js").TuiPromptAppend) | ([Extract<Type, "tui.session.select">] extends [never] ? never : import("./index.js").TuiSessionSelect) | ([Extract<Type, "tui.toast.show">] extends [never] ? never : import("./index.js").TuiToastShow) | ([Extract<Type, `rpc.${string}`>] extends [never] ? never : import("./index.js").V2EventRpc) | (["server.connected" | Extract<Type, "server.connected">] extends [never] ? never : import("./index.js").V2EventServerConnected) | ([Extract<Type, "vcs.branch.updated">] extends [never] ? never : import("./index.js").VcsBranchUpdated) | ([Extract<Type, "websearch.updated">] extends [never] ? never : import("./index.js").WebsearchUpdated) | ([Extract<Type, "worktree.resolved">] extends [never] ? never : import("./index.js").WorktreeResolved) | ([Extract<Type, "worktree.updated">] extends [never] ? never : import("./index.js").WorktreeUpdated)>;
|
|
310
|
+
subscribe<Type extends Exclude<"agent.updated" | "artifact.updated" | "command.updated" | "config.updated" | "credential.switched" | "credential.updated" | "experimental.job.updated" | "experimental.mcp.event" | "filesystem.changed" | "form.cancelled" | "form.created" | "form.replied" | "installation.update-available" | "installation.updated" | "integration.updated" | "location.shutdown" | "mcp.resources.changed" | "mcp.status.changed" | "model.updated" | "models-dev.refreshed" | "permission.asked" | "permission.cancelled" | "permission.replied" | "persistent-pty.added" | "persistent-pty.removed" | "persistent-pty.updated" | "plugin.updated" | "project.updated" | "provider.updated" | "pty.created" | "pty.deleted" | "pty.exited" | "pty.updated" | "reference.updated" | "server.connected" | "session.agent.selected" | "session.archived" | "session.compaction.delta" | "session.compaction.ended" | "session.compaction.failed" | "session.compaction.started" | "session.created" | "session.deleted" | "session.execution.failed" | "session.execution.interrupted" | "session.execution.started" | "session.execution.succeeded" | "session.forked" | "session.idle" | "session.inbox.cancelled" | "session.inbox.delivered" | "session.inbox.delivery.changed" | "session.inbox.enqueued" | "session.instructions.updated" | "session.metadata.updated" | "session.model.selected" | "session.moved" | "session.permissions" | "session.reasoning.delta" | "session.reasoning.ended" | "session.reasoning.started" | "session.renamed" | "session.retry.scheduled" | "session.revert.cleared" | "session.revert.committed" | "session.revert.staged" | "session.shell.ended" | "session.shell.started" | "session.skill.activated" | "session.status" | "session.step.ended" | "session.step.failed" | "session.step.first-token" | "session.step.started" | "session.step.streamed" | "session.synthetic" | "session.text.delta" | "session.text.ended" | "session.text.started" | "session.tool.called" | "session.tool.failed" | "session.tool.input.delta" | "session.tool.input.ended" | "session.tool.input.started" | "session.tool.progress" | "session.tool.subagent.prepared" | "session.tool.success" | "session.unarchived" | "session.usage.updated" | "session.viewed" | "shell.created" | "shell.deleted" | "shell.exited" | "skill.updated" | "tui.command.execute" | "tui.prompt.append" | "tui.session.select" | "tui.toast.show" | "vcs.branch.updated" | "websearch.updated" | "worktree.resolved" | "worktree.updated" | `rpc.${string}`, "server.connected"> = "agent.updated" | "artifact.updated" | "command.updated" | "config.updated" | "credential.switched" | "credential.updated" | "experimental.job.updated" | "experimental.mcp.event" | "filesystem.changed" | "form.cancelled" | "form.created" | "form.replied" | "installation.update-available" | "installation.updated" | "integration.updated" | "location.shutdown" | "mcp.resources.changed" | "mcp.status.changed" | "model.updated" | "models-dev.refreshed" | "permission.asked" | "permission.cancelled" | "permission.replied" | "persistent-pty.added" | "persistent-pty.removed" | "persistent-pty.updated" | "plugin.updated" | "project.updated" | "provider.updated" | "pty.created" | "pty.deleted" | "pty.exited" | "pty.updated" | "reference.updated" | "session.agent.selected" | "session.archived" | "session.compaction.delta" | "session.compaction.ended" | "session.compaction.failed" | "session.compaction.started" | "session.created" | "session.deleted" | "session.execution.failed" | "session.execution.interrupted" | "session.execution.started" | "session.execution.succeeded" | "session.forked" | "session.idle" | "session.inbox.cancelled" | "session.inbox.delivered" | "session.inbox.delivery.changed" | "session.inbox.enqueued" | "session.instructions.updated" | "session.metadata.updated" | "session.model.selected" | "session.moved" | "session.permissions" | "session.reasoning.delta" | "session.reasoning.ended" | "session.reasoning.started" | "session.renamed" | "session.retry.scheduled" | "session.revert.cleared" | "session.revert.committed" | "session.revert.staged" | "session.shell.ended" | "session.shell.started" | "session.skill.activated" | "session.status" | "session.step.ended" | "session.step.failed" | "session.step.first-token" | "session.step.started" | "session.step.streamed" | "session.synthetic" | "session.text.delta" | "session.text.ended" | "session.text.started" | "session.tool.called" | "session.tool.failed" | "session.tool.input.delta" | "session.tool.input.ended" | "session.tool.input.started" | "session.tool.progress" | "session.tool.subagent.prepared" | "session.tool.success" | "session.unarchived" | "session.usage.updated" | "session.viewed" | "shell.created" | "shell.deleted" | "shell.exited" | "skill.updated" | "tui.command.execute" | "tui.prompt.append" | "tui.session.select" | "tui.toast.show" | "vcs.branch.updated" | "websearch.updated" | "worktree.resolved" | "worktree.updated" | `rpc.${string}`>(options?: import("./api.js").SubscribeOptions<Type> | undefined): AsyncIterable<([Extract<Type, "agent.updated">] extends [never] ? never : import("./index.js").AgentUpdated) | ([Extract<Type, "artifact.updated">] extends [never] ? never : import("./index.js").ArtifactUpdated) | ([Extract<Type, "command.updated">] extends [never] ? never : import("./index.js").CommandUpdated) | ([Extract<Type, "config.updated">] extends [never] ? never : import("./index.js").ConfigUpdated) | ([Extract<Type, "credential.switched">] extends [never] ? never : import("./index.js").CredentialSwitched) | ([Extract<Type, "credential.updated">] extends [never] ? never : import("./index.js").CredentialUpdated) | ([Extract<Type, "experimental.job.updated">] extends [never] ? never : import("./index.js").ExperimentalJobUpdated) | ([Extract<Type, "experimental.mcp.event">] extends [never] ? never : import("./index.js").ExperimentalMcpEvent) | ([Extract<Type, "filesystem.changed">] extends [never] ? never : import("./index.js").FilesystemChanged) | ([Extract<Type, "form.cancelled">] extends [never] ? never : import("./index.js").FormCancelled) | ([Extract<Type, "form.created">] extends [never] ? never : import("./index.js").FormCreated) | ([Extract<Type, "form.replied">] extends [never] ? never : import("./index.js").FormReplied) | ([Extract<Type, "installation.update-available">] extends [never] ? never : import("./index.js").InstallationUpdateAvailable) | ([Extract<Type, "installation.updated">] extends [never] ? never : import("./index.js").InstallationUpdated) | ([Extract<Type, "integration.updated">] extends [never] ? never : import("./index.js").IntegrationUpdated) | ([Extract<Type, "location.shutdown">] extends [never] ? never : import("./index.js").LocationShutdown) | ([Extract<Type, "mcp.resources.changed">] extends [never] ? never : import("./index.js").McpResourcesChanged) | ([Extract<Type, "mcp.status.changed">] extends [never] ? never : import("./index.js").McpStatusChanged) | ([Extract<Type, "model.updated">] extends [never] ? never : import("./index.js").ModelUpdated) | ([Extract<Type, "models-dev.refreshed">] extends [never] ? never : import("./index.js").ModelsDevRefreshed) | ([Extract<Type, "permission.asked">] extends [never] ? never : import("./index.js").PermissionAsked) | ([Extract<Type, "permission.cancelled">] extends [never] ? never : import("./index.js").PermissionCancelled) | ([Extract<Type, "permission.replied">] extends [never] ? never : import("./index.js").PermissionReplied) | ([Extract<Type, "persistent-pty.added">] extends [never] ? never : import("./index.js").PersistentPtyAdded) | ([Extract<Type, "persistent-pty.removed">] extends [never] ? never : import("./index.js").PersistentPtyRemoved) | ([Extract<Type, "persistent-pty.updated">] extends [never] ? never : import("./index.js").PersistentPtyUpdated) | ([Extract<Type, "plugin.updated">] extends [never] ? never : import("./index.js").PluginUpdated) | ([Extract<Type, "project.updated">] extends [never] ? never : import("./index.js").ProjectUpdated) | ([Extract<Type, "provider.updated">] extends [never] ? never : import("./index.js").ProviderUpdated) | ([Extract<Type, "pty.created">] extends [never] ? never : import("./index.js").PtyCreated) | ([Extract<Type, "pty.deleted">] extends [never] ? never : import("./index.js").PtyDeleted) | ([Extract<Type, "pty.exited">] extends [never] ? never : import("./index.js").PtyExited) | ([Extract<Type, "pty.updated">] extends [never] ? never : import("./index.js").PtyUpdated) | ([Extract<Type, "reference.updated">] extends [never] ? never : import("./index.js").ReferenceUpdated) | ([Extract<Type, "session.agent.selected">] extends [never] ? never : import("./index.js").SessionAgentSelected) | ([Extract<Type, "session.archived">] extends [never] ? never : import("./index.js").SessionArchived) | ([Extract<Type, "session.compaction.delta">] extends [never] ? never : import("./index.js").SessionCompactionDelta) | ([Extract<Type, "session.compaction.ended">] extends [never] ? never : import("./index.js").SessionCompactionEnded) | ([Extract<Type, "session.compaction.failed">] extends [never] ? never : import("./index.js").SessionCompactionFailed) | ([Extract<Type, "session.compaction.started">] extends [never] ? never : import("./index.js").SessionCompactionStarted) | ([Extract<Type, "session.created">] extends [never] ? never : import("./index.js").SessionCreated) | ([Extract<Type, "session.deleted">] extends [never] ? never : import("./index.js").SessionDeleted) | ([Extract<Type, "session.execution.failed">] extends [never] ? never : import("./index.js").SessionExecutionFailed) | ([Extract<Type, "session.execution.interrupted">] extends [never] ? never : import("./index.js").SessionExecutionInterrupted) | ([Extract<Type, "session.execution.started">] extends [never] ? never : import("./index.js").SessionExecutionStarted) | ([Extract<Type, "session.execution.succeeded">] extends [never] ? never : import("./index.js").SessionExecutionSucceeded) | ([Extract<Type, "session.forked">] extends [never] ? never : import("./index.js").SessionForked) | ([Extract<Type, "session.idle">] extends [never] ? never : import("./index.js").SessionIdle) | ([Extract<Type, "session.inbox.cancelled">] extends [never] ? never : import("./index.js").SessionInboxCancelled) | ([Extract<Type, "session.inbox.delivered">] extends [never] ? never : import("./index.js").SessionInboxDelivered) | ([Extract<Type, "session.inbox.delivery.changed">] extends [never] ? never : import("./index.js").SessionInboxDeliveryChanged) | ([Extract<Type, "session.inbox.enqueued">] extends [never] ? never : import("./index.js").SessionInboxEnqueued) | ([Extract<Type, "session.instructions.updated">] extends [never] ? never : import("./index.js").SessionInstructionsUpdated) | ([Extract<Type, "session.metadata.updated">] extends [never] ? never : import("./index.js").SessionMetadataUpdated) | ([Extract<Type, "session.model.selected">] extends [never] ? never : import("./index.js").SessionModelSelected) | ([Extract<Type, "session.moved">] extends [never] ? never : import("./index.js").SessionMoved) | ([Extract<Type, "session.permissions">] extends [never] ? never : import("./index.js").SessionPermissions) | ([Extract<Type, "session.reasoning.delta">] extends [never] ? never : import("./index.js").SessionReasoningDelta) | ([Extract<Type, "session.reasoning.ended">] extends [never] ? never : import("./index.js").SessionReasoningEnded) | ([Extract<Type, "session.reasoning.started">] extends [never] ? never : import("./index.js").SessionReasoningStarted) | ([Extract<Type, "session.renamed">] extends [never] ? never : import("./index.js").SessionRenamed) | ([Extract<Type, "session.retry.scheduled">] extends [never] ? never : import("./index.js").SessionRetryScheduled) | ([Extract<Type, "session.revert.cleared">] extends [never] ? never : import("./index.js").SessionRevertCleared) | ([Extract<Type, "session.revert.committed">] extends [never] ? never : import("./index.js").SessionRevertCommitted) | ([Extract<Type, "session.revert.staged">] extends [never] ? never : import("./index.js").SessionRevertStaged) | ([Extract<Type, "session.shell.ended">] extends [never] ? never : import("./index.js").SessionShellEnded) | ([Extract<Type, "session.shell.started">] extends [never] ? never : import("./index.js").SessionShellStarted) | ([Extract<Type, "session.skill.activated">] extends [never] ? never : import("./index.js").SessionSkillActivated) | ([Extract<Type, "session.status">] extends [never] ? never : import("./index.js").SessionStatusUpdated) | ([Extract<Type, "session.step.ended">] extends [never] ? never : import("./index.js").SessionStepEnded) | ([Extract<Type, "session.step.failed">] extends [never] ? never : import("./index.js").SessionStepFailed) | ([Extract<Type, "session.step.first-token">] extends [never] ? never : import("./index.js").SessionStepFirstToken) | ([Extract<Type, "session.step.started">] extends [never] ? never : import("./index.js").SessionStepStarted) | ([Extract<Type, "session.step.streamed">] extends [never] ? never : import("./index.js").SessionStepStreamed) | ([Extract<Type, "session.synthetic">] extends [never] ? never : import("./index.js").SessionSynthetic) | ([Extract<Type, "session.text.delta">] extends [never] ? never : import("./index.js").SessionTextDelta) | ([Extract<Type, "session.text.ended">] extends [never] ? never : import("./index.js").SessionTextEnded) | ([Extract<Type, "session.text.started">] extends [never] ? never : import("./index.js").SessionTextStarted) | ([Extract<Type, "session.tool.called">] extends [never] ? never : import("./index.js").SessionToolCalled) | ([Extract<Type, "session.tool.failed">] extends [never] ? never : import("./index.js").SessionToolFailed) | ([Extract<Type, "session.tool.input.delta">] extends [never] ? never : import("./index.js").SessionToolInputDelta) | ([Extract<Type, "session.tool.input.ended">] extends [never] ? never : import("./index.js").SessionToolInputEnded) | ([Extract<Type, "session.tool.input.started">] extends [never] ? never : import("./index.js").SessionToolInputStarted) | ([Extract<Type, "session.tool.progress">] extends [never] ? never : import("./index.js").SessionToolProgress) | ([Extract<Type, "session.tool.subagent.prepared">] extends [never] ? never : import("./index.js").SessionToolSubagentPrepared) | ([Extract<Type, "session.tool.success">] extends [never] ? never : import("./index.js").SessionToolSuccess) | ([Extract<Type, "session.unarchived">] extends [never] ? never : import("./index.js").SessionUnarchived) | ([Extract<Type, "session.usage.updated">] extends [never] ? never : import("./index.js").SessionUsageUpdated) | ([Extract<Type, "session.viewed">] extends [never] ? never : import("./index.js").SessionViewed) | ([Extract<Type, "shell.created">] extends [never] ? never : import("./index.js").ShellCreated) | ([Extract<Type, "shell.deleted">] extends [never] ? never : import("./index.js").ShellDeleted) | ([Extract<Type, "shell.exited">] extends [never] ? never : import("./index.js").ShellExited) | ([Extract<Type, "skill.updated">] extends [never] ? never : import("./index.js").SkillUpdated) | ([Extract<Type, "tui.command.execute">] extends [never] ? never : import("./index.js").TuiCommandExecute) | ([Extract<Type, "tui.prompt.append">] extends [never] ? never : import("./index.js").TuiPromptAppend) | ([Extract<Type, "tui.session.select">] extends [never] ? never : import("./index.js").TuiSessionSelect) | ([Extract<Type, "tui.toast.show">] extends [never] ? never : import("./index.js").TuiToastShow) | ([Extract<Type, `rpc.${string}`>] extends [never] ? never : import("./index.js").V2EventRpc) | (["server.connected" | Extract<Type, "server.connected">] extends [never] ? never : import("./index.js").V2EventServerConnected) | ([Extract<Type, "vcs.branch.updated">] extends [never] ? never : import("./index.js").VcsBranchUpdated) | ([Extract<Type, "websearch.updated">] extends [never] ? never : import("./index.js").WebsearchUpdated) | ([Extract<Type, "worktree.resolved">] extends [never] ? never : import("./index.js").WorktreeResolved) | ([Extract<Type, "worktree.updated">] extends [never] ? never : import("./index.js").WorktreeUpdated)>;
|
|
310
311
|
};
|
|
311
312
|
message: {
|
|
312
313
|
list: (input: MessageListInput, options?: MediaRequestOptions) => Promise<import("./index.js").SessionMessagesResponse>;
|
package/package.json
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"import": "./client/index.js"
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
|
-
"version": "2.3.
|
|
17
|
+
"version": "2.3.2-shuv.1",
|
|
18
18
|
"license": "MIT",
|
|
19
19
|
"repository": {
|
|
20
20
|
"type": "git",
|
|
@@ -30,17 +30,17 @@
|
|
|
30
30
|
"x64"
|
|
31
31
|
],
|
|
32
32
|
"optionalDependencies": {
|
|
33
|
-
"shuvcode-
|
|
34
|
-
"shuvcode-
|
|
35
|
-
"shuvcode-
|
|
36
|
-
"shuvcode-
|
|
37
|
-
"shuvcode-linux-x64-baseline
|
|
38
|
-
"shuvcode-
|
|
39
|
-
"shuvcode-
|
|
40
|
-
"shuvcode-
|
|
41
|
-
"shuvcode-
|
|
42
|
-
"shuvcode-
|
|
43
|
-
"shuvcode-
|
|
44
|
-
"shuvcode-
|
|
33
|
+
"shuvcode-linux-arm64-musl": "2.3.2-shuv.1",
|
|
34
|
+
"shuvcode-linux-x64-musl": "2.3.2-shuv.1",
|
|
35
|
+
"shuvcode-darwin-x64-baseline": "2.3.2-shuv.1",
|
|
36
|
+
"shuvcode-linux-arm64": "2.3.2-shuv.1",
|
|
37
|
+
"shuvcode-linux-x64-baseline": "2.3.2-shuv.1",
|
|
38
|
+
"shuvcode-windows-arm64": "2.3.2-shuv.1",
|
|
39
|
+
"shuvcode-darwin-arm64": "2.3.2-shuv.1",
|
|
40
|
+
"shuvcode-linux-x64": "2.3.2-shuv.1",
|
|
41
|
+
"shuvcode-windows-x64-baseline": "2.3.2-shuv.1",
|
|
42
|
+
"shuvcode-linux-x64-baseline-musl": "2.3.2-shuv.1",
|
|
43
|
+
"shuvcode-darwin-x64": "2.3.2-shuv.1",
|
|
44
|
+
"shuvcode-windows-x64": "2.3.2-shuv.1"
|
|
45
45
|
}
|
|
46
46
|
}
|