@opencode/client 0.0.0-dev-70 → 0.0.0-dev-80

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.
Files changed (65) hide show
  1. package/dist/chunks/{contract-2ny4vxct.js → service-2ny4vxct.js} +2 -2
  2. package/dist/chunks/service-2sr9xw1p.js +30 -0
  3. package/dist/chunks/{contract-ctxmvs8y.js → service-4ggcc7pd.js} +28 -11
  4. package/dist/chunks/{contract-kd24eskk.js → service-61gake65.js} +17 -17
  5. package/dist/chunks/{contract-y2etg5bs.js → service-7f0py9js.js} +2 -2
  6. package/dist/chunks/{contract-w2eqyd95.js → service-87tppfgj.js} +2 -2
  7. package/dist/chunks/{contract-4x4a6tah.js → service-8we1dz3p.js} +4 -1
  8. package/dist/chunks/{contract-1gqkvw7r.js → service-ab9bm97w.js} +1 -1
  9. package/dist/chunks/{contract-9j12j8xw.js → service-anregfhs.js} +5 -5
  10. package/dist/chunks/{contract-s76jdhwt.js → service-cyxwqteg.js} +1 -1
  11. package/dist/chunks/{contract-gecjxyvt.js → service-gecjxyvt.js} +1 -1
  12. package/dist/chunks/{contract-nwcpakzx.js → service-js54wxgp.js} +2 -2
  13. package/dist/chunks/{contract-ryy6kscr.js → service-ryy6kscr.js} +1 -1
  14. package/dist/chunks/{contract-rb7z442v.js → service-wcsbjfhx.js} +44 -21
  15. package/dist/contract.js +1 -1
  16. package/dist/effect/api/api.d.ts +20 -0
  17. package/dist/effect/client.d.ts +3 -1
  18. package/dist/effect/client.js +12 -12
  19. package/dist/effect/generated/client-error.js +3 -3
  20. package/dist/effect/generated/client.d.ts +4 -2
  21. package/dist/effect/generated/client.js +5 -5
  22. package/dist/effect/generated/index.js +8 -8
  23. package/dist/effect/index.js +12 -12
  24. package/dist/effect/rpc.js +4 -4
  25. package/dist/effect/service.js +6 -6
  26. package/dist/promise/client.d.ts +2 -0
  27. package/dist/promise/client.js +11 -11
  28. package/dist/promise/generated/client-error.js +3 -3
  29. package/dist/promise/generated/client.d.ts +3 -1
  30. package/dist/promise/generated/client.js +4 -4
  31. package/dist/promise/generated/index.js +15 -9
  32. package/dist/promise/generated/types.d.ts +150 -0
  33. package/dist/promise/generated/types.js +7 -1
  34. package/dist/promise/index.js +19 -13
  35. package/dist/promise/rpc.js +2 -2
  36. package/dist/promise/service.js +6 -6
  37. package/dist/pty-handoff.js +4 -4
  38. package/dist/rpc-runtime.js +1 -1
  39. package/dist/service-contender.js +1 -1
  40. package/dist/service-probe.js +3 -3
  41. package/dist/service-timing.js +1 -1
  42. package/dist/service-version.js +1 -1
  43. package/dist/service.js +1 -1
  44. package/dist/shared-events.js +1 -1
  45. package/dist/solid/connection.js +1 -1
  46. package/dist/solid/data.js +9 -9
  47. package/dist/solid/index.js +13 -13
  48. package/dist/solid/pty.js +1 -1
  49. package/dist/solid/retention.js +1 -1
  50. package/dist/solid/usage.js +1 -1
  51. package/package.json +4 -4
  52. package/dist/chunks/contract-r6a5t1f9.js +0 -30
  53. /package/dist/chunks/{contract-6mptkzbc.js → service-6mptkzbc.js} +0 -0
  54. /package/dist/chunks/{contract-6mq2wh8y.js → service-6mq2wh8y.js} +0 -0
  55. /package/dist/chunks/{contract-8s2anffy.js → service-8s2anffy.js} +0 -0
  56. /package/dist/chunks/{contract-9rqn6x4v.js → service-9rqn6x4v.js} +0 -0
  57. /package/dist/chunks/{contract-gne7h7mq.js → service-gne7h7mq.js} +0 -0
  58. /package/dist/chunks/{contract-m2eywc8w.js → service-m2eywc8w.js} +0 -0
  59. /package/dist/chunks/{contract-qav6mfdz.js → service-qav6mfdz.js} +0 -0
  60. /package/dist/chunks/{contract-sxt88q69.js → service-sxt88q69.js} +0 -0
  61. /package/dist/chunks/{contract-ve4aws36.js → service-ve4aws36.js} +0 -0
  62. /package/dist/chunks/{contract-vmytr4q8.js → service-vmytr4q8.js} +0 -0
  63. /package/dist/chunks/{contract-vyas3vgt.js → service-vyas3vgt.js} +0 -0
  64. /package/dist/chunks/{contract-xgnj2w4v.js → service-xgnj2w4v.js} +0 -0
  65. /package/dist/chunks/{contract-ydhz1zrh.js → service-ydhz1zrh.js} +0 -0
@@ -1,12 +1,12 @@
1
- import"../../chunks/contract-6mptkzbc.js";
1
+ import"../../chunks/service-6mptkzbc.js";
2
2
  import {
3
- exports_client2
4
- } from "../../chunks/contract-ctxmvs8y.js";
3
+ exports_client4
4
+ } from "../../chunks/service-4ggcc7pd.js";
5
5
  import {
6
- ClientError2
7
- } from "../../chunks/contract-y2etg5bs.js";
8
- import"../../chunks/contract-vmytr4q8.js";
6
+ ClientError3
7
+ } from "../../chunks/service-7f0py9js.js";
8
+ import"../../chunks/service-vmytr4q8.js";
9
9
  export {
10
- ClientError2 as ClientError,
11
- exports_client2 as OpenCode
10
+ ClientError3 as ClientError,
11
+ exports_client4 as OpenCode
12
12
  };
@@ -1,15 +1,15 @@
1
1
  import {
2
- ClientError2
3
- } from "../chunks/contract-y2etg5bs.js";
4
- import"../chunks/contract-vmytr4q8.js";
5
- import"../chunks/contract-ctxmvs8y.js";
6
- import"../chunks/contract-6mptkzbc.js";
7
- import"../chunks/contract-gecjxyvt.js";
8
- import"../chunks/contract-ryy6kscr.js";
9
- import"../chunks/contract-9j12j8xw.js";
2
+ ClientError3
3
+ } from "../chunks/service-7f0py9js.js";
4
+ import"../chunks/service-vmytr4q8.js";
5
+ import"../chunks/service-4ggcc7pd.js";
6
+ import"../chunks/service-6mptkzbc.js";
7
+ import"../chunks/service-gecjxyvt.js";
8
+ import"../chunks/service-ryy6kscr.js";
9
+ import"../chunks/service-anregfhs.js";
10
10
  import {
11
- exports_client
12
- } from "../chunks/contract-kd24eskk.js";
11
+ exports_client3
12
+ } from "../chunks/service-61gake65.js";
13
13
 
14
14
  // src/effect/index.ts
15
15
  import { Agent } from "@opencode/schema/agent";
@@ -43,7 +43,7 @@ import { PromptInput } from "@opencode/schema/prompt-input";
43
43
  export {
44
44
  AbsolutePath,
45
45
  Agent,
46
- ClientError2 as ClientError,
46
+ ClientError3 as ClientError,
47
47
  Command,
48
48
  Config,
49
49
  Credential,
@@ -54,7 +54,7 @@ export {
54
54
  Integration,
55
55
  Location,
56
56
  Model,
57
- exports_client as OpenCode,
57
+ exports_client3 as OpenCode,
58
58
  Permission,
59
59
  PermissionSaved,
60
60
  Project,
@@ -1,11 +1,11 @@
1
1
  import {
2
- make4,
2
+ make5,
3
3
  aborted2,
4
4
  exports_rpc
5
- } from "../chunks/contract-9j12j8xw.js";
6
- import"../chunks/contract-ryy6kscr.js";
5
+ } from "../chunks/service-anregfhs.js";
6
+ import"../chunks/service-ryy6kscr.js";
7
7
  export {
8
8
  exports_rpc as RpcClientRuntime,
9
9
  aborted2 as aborted,
10
- make4 as make
10
+ make5 as make
11
11
  };
@@ -1,28 +1,28 @@
1
1
  import {
2
2
  spawnServiceContender2,
3
3
  contenderPool2
4
- } from "../chunks/contract-ve4aws36.js";
4
+ } from "../chunks/service-ve4aws36.js";
5
5
  import {
6
6
  defaultEnsureTiming2,
7
7
  ensureTiming2
8
- } from "../chunks/contract-xgnj2w4v.js";
8
+ } from "../chunks/service-xgnj2w4v.js";
9
9
  import {
10
10
  matchesVersion2
11
- } from "../chunks/contract-sxt88q69.js";
11
+ } from "../chunks/service-sxt88q69.js";
12
12
  import {
13
13
  decide2,
14
14
  fallback2,
15
15
  same2,
16
16
  probeResult2,
17
17
  headers2
18
- } from "../chunks/contract-2ny4vxct.js";
18
+ } from "../chunks/service-2ny4vxct.js";
19
19
  import {
20
20
  prepare2,
21
21
  environment2,
22
22
  complete2,
23
23
  clear2
24
- } from "../chunks/contract-w2eqyd95.js";
25
- import"../chunks/contract-qav6mfdz.js";
24
+ } from "../chunks/service-87tppfgj.js";
25
+ import"../chunks/service-qav6mfdz.js";
26
26
 
27
27
  // src/effect/service.ts
28
28
  import { Effect, FileSystem, Option, Schedule, Schema } from "effect";
@@ -95,6 +95,8 @@ export declare function make(options: ClientOptions): {
95
95
  text: (input: import("./index.js").GenerateTextInput, requestOptions?: OpenCode.RequestOptions) => Promise<{
96
96
  text: string;
97
97
  }>;
98
+ image: (input: import("./index.js").GenerateImageInput, requestOptions?: OpenCode.RequestOptions) => Promise<import("./index.js").GenerateImageResult>;
99
+ decisions: (input: import("./index.js").GenerateDecisionsInput, requestOptions?: OpenCode.RequestOptions) => Promise<import("./index.js").GenerateDecisionResult>;
98
100
  };
99
101
  voice: {
100
102
  models: (requestOptions?: OpenCode.RequestOptions) => Promise<{
@@ -1,14 +1,14 @@
1
1
  import {
2
- make5,
3
- exports_client3
4
- } from "../chunks/contract-r6a5t1f9.js";
5
- import"../chunks/contract-vyas3vgt.js";
6
- import"../chunks/contract-rb7z442v.js";
7
- import"../chunks/contract-nwcpakzx.js";
8
- import"../chunks/contract-1gqkvw7r.js";
9
- import"../chunks/contract-4x4a6tah.js";
10
- import"../chunks/contract-gecjxyvt.js";
2
+ make2,
3
+ exports_client
4
+ } from "../chunks/service-2sr9xw1p.js";
5
+ import"../chunks/service-ab9bm97w.js";
6
+ import"../chunks/service-vyas3vgt.js";
7
+ import"../chunks/service-wcsbjfhx.js";
8
+ import"../chunks/service-8we1dz3p.js";
9
+ import"../chunks/service-js54wxgp.js";
10
+ import"../chunks/service-gecjxyvt.js";
11
11
  export {
12
- exports_client3 as OpenCode,
13
- make5 as make
12
+ exports_client as OpenCode,
13
+ make2 as make
14
14
  };
@@ -1,6 +1,6 @@
1
1
  import {
2
- ClientError3
3
- } from "../../chunks/contract-nwcpakzx.js";
2
+ ClientError2
3
+ } from "../../chunks/service-js54wxgp.js";
4
4
  export {
5
- ClientError3 as ClientError
5
+ ClientError2 as ClientError
6
6
  };
@@ -1,4 +1,4 @@
1
- import type { ServerConnectInput, LocationGetInput, AgentListInput, AgentListOutput, AgentGetInput, AgentGetOutput, PluginListInput, PluginListOutput, PluginGuiInput, PluginGuiOutput, PluginCheckInput, PluginCheckOutput, PluginUpdateInput, SessionListInput, SessionStatsInput, SessionCreateInput, SessionImportInput, SessionExportInput, SessionGetInput, SessionRemoveInput, SessionForkInput, SessionSwitchAgentInput, SessionSwitchModelInput, SessionUpdateInput, SessionMoveInput, SessionPromptInput, SessionCommandInput, SessionSkillInput, SessionSyntheticInput, SessionShellInput, SessionCompactInput, SessionWaitInput, SessionRevertStageInput, SessionRevertClearInput, SessionRevertCommitInput, SessionContextInput, SessionDiffInput, SessionInboxListInput, SessionInboxCancelInput, SessionInboxUpdateInput, SessionInstructionsEntryListInput, SessionInstructionsEntryPutInput, SessionInstructionsEntryRemoveInput, SessionGenerateInput, SessionLogInput, SessionLogOutput, SessionInterruptInput, SessionBackgroundInput, SessionMessageGetInput, SessionFormListInput, SessionFormCreateInput, SessionFormGetInput, SessionFormReplyInput, SessionFormCancelInput, SessionEnvironmentInput, SessionViewInput, MessageListInput, ModelListInput, ModelListOutput, ModelDefaultInput, ModelDefaultOutput, GenerateTextInput, VoiceSessionInput, ProviderListInput, ProviderListOutput, ProviderGetInput, ProviderGetOutput, IntegrationListInput, IntegrationListOutput, IntegrationGetInput, IntegrationGetOutput, IntegrationWellknownAddInput, IntegrationConnectKeyInput, IntegrationConnectExternalInput, IntegrationOauthConnectInput, IntegrationOauthConnectOutput, IntegrationOauthStatusInput, IntegrationOauthStatusOutput, IntegrationOauthCompleteInput, IntegrationOauthCancelInput, IntegrationCommandConnectInput, IntegrationCommandConnectOutput, IntegrationCommandStatusInput, IntegrationCommandStatusOutput, IntegrationCommandCancelInput, McpListInput, McpListOutput, McpAddInput, McpRemoveInput, McpConnectInput, McpDisconnectInput, McpResourceCatalogInput, McpResourceCatalogOutput, McpClientTokenInput, McpClientTokenOutput, CredentialCreateInput, CredentialUpdateInput, CredentialActivateInput, CredentialRemoveInput, ProjectListInput, ProjectListOutput, ProjectUpdateInput, FormListInput, FormListOutput, PermissionRequestListInput, PermissionRequestListOutput, PermissionSavedListInput, PermissionSavedUpdateInput, PermissionSavedRemoveInput, PermissionCreateInput, PermissionListInput, PermissionGetInput, PermissionReplyInput, FileReadInput, FileReadOutput, FileListInput, FileListOutput, FileFindInput, FileFindOutput, FileWriteInput, FileWriteOutput, FileWatchInput, FileUnwatchInput, 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, 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, MigrationV1StatusOutput, WebsearchProvidersInput, WebsearchProvidersOutput, WebsearchQueryInput, WebsearchQueryOutput, UsageLimitsInput, UsageLimitsOutput, ConfigGetInput, ConfigGetOutput, ConfigShellsOutput, ConfigUpdateInput } from "./types.js";
1
+ import type { ServerConnectInput, LocationGetInput, AgentListInput, AgentListOutput, AgentGetInput, AgentGetOutput, PluginListInput, PluginListOutput, PluginGuiInput, PluginGuiOutput, PluginCheckInput, PluginCheckOutput, PluginUpdateInput, SessionListInput, SessionStatsInput, SessionCreateInput, SessionImportInput, SessionExportInput, SessionGetInput, SessionRemoveInput, SessionForkInput, SessionSwitchAgentInput, SessionSwitchModelInput, SessionUpdateInput, SessionMoveInput, SessionPromptInput, SessionCommandInput, SessionSkillInput, SessionSyntheticInput, SessionShellInput, SessionCompactInput, SessionWaitInput, SessionRevertStageInput, SessionRevertClearInput, SessionRevertCommitInput, SessionContextInput, SessionDiffInput, SessionInboxListInput, SessionInboxCancelInput, SessionInboxUpdateInput, SessionInstructionsEntryListInput, SessionInstructionsEntryPutInput, SessionInstructionsEntryRemoveInput, SessionGenerateInput, SessionLogInput, SessionLogOutput, SessionInterruptInput, SessionBackgroundInput, SessionMessageGetInput, SessionFormListInput, SessionFormCreateInput, SessionFormGetInput, SessionFormReplyInput, SessionFormCancelInput, SessionEnvironmentInput, SessionViewInput, MessageListInput, ModelListInput, ModelListOutput, ModelDefaultInput, ModelDefaultOutput, GenerateTextInput, GenerateImageInput, GenerateDecisionsInput, VoiceSessionInput, ProviderListInput, ProviderListOutput, ProviderGetInput, ProviderGetOutput, IntegrationListInput, IntegrationListOutput, IntegrationGetInput, IntegrationGetOutput, IntegrationWellknownAddInput, IntegrationConnectKeyInput, IntegrationConnectExternalInput, IntegrationOauthConnectInput, IntegrationOauthConnectOutput, IntegrationOauthStatusInput, IntegrationOauthStatusOutput, IntegrationOauthCompleteInput, IntegrationOauthCancelInput, IntegrationCommandConnectInput, IntegrationCommandConnectOutput, IntegrationCommandStatusInput, IntegrationCommandStatusOutput, IntegrationCommandCancelInput, McpListInput, McpListOutput, McpAddInput, McpRemoveInput, McpConnectInput, McpDisconnectInput, McpResourceCatalogInput, McpResourceCatalogOutput, McpClientTokenInput, McpClientTokenOutput, CredentialCreateInput, CredentialUpdateInput, CredentialActivateInput, CredentialRemoveInput, ProjectListInput, ProjectListOutput, ProjectUpdateInput, FormListInput, FormListOutput, PermissionRequestListInput, PermissionRequestListOutput, PermissionSavedListInput, PermissionSavedUpdateInput, PermissionSavedRemoveInput, PermissionCreateInput, PermissionListInput, PermissionGetInput, PermissionReplyInput, FileReadInput, FileReadOutput, FileListInput, FileListOutput, FileFindInput, FileFindOutput, FileWriteInput, FileWriteOutput, FileWatchInput, FileUnwatchInput, 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, 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, MigrationV1StatusOutput, WebsearchProvidersInput, WebsearchProvidersOutput, WebsearchQueryInput, WebsearchQueryOutput, UsageLimitsInput, UsageLimitsOutput, ConfigGetInput, ConfigGetOutput, ConfigShellsOutput, ConfigUpdateInput } from "./types.js";
2
2
  export interface ClientOptions {
3
3
  readonly baseUrl: string;
4
4
  readonly fetch?: typeof globalThis.fetch;
@@ -102,6 +102,8 @@ export declare function make(options: ClientOptions): {
102
102
  text: (input: GenerateTextInput, requestOptions?: RequestOptions) => Promise<{
103
103
  text: string;
104
104
  }>;
105
+ image: (input: GenerateImageInput, requestOptions?: RequestOptions) => Promise<import("./types.js").GenerateImageResult>;
106
+ decisions: (input: GenerateDecisionsInput, requestOptions?: RequestOptions) => Promise<import("./types.js").GenerateDecisionResult>;
105
107
  };
106
108
  voice: {
107
109
  models: (requestOptions?: RequestOptions) => Promise<{
@@ -1,7 +1,7 @@
1
1
  import {
2
- make6
3
- } from "../../chunks/contract-rb7z442v.js";
4
- import"../../chunks/contract-nwcpakzx.js";
2
+ make3
3
+ } from "../../chunks/service-wcsbjfhx.js";
4
+ import"../../chunks/service-js54wxgp.js";
5
5
  export {
6
- make6 as make
6
+ make3 as make
7
7
  };
@@ -1,10 +1,7 @@
1
- import"../../chunks/contract-vyas3vgt.js";
1
+ import"../../chunks/service-vyas3vgt.js";
2
2
  import {
3
- exports_client4
4
- } from "../../chunks/contract-rb7z442v.js";
5
- import {
6
- ClientError3
7
- } from "../../chunks/contract-nwcpakzx.js";
3
+ exports_client2
4
+ } from "../../chunks/service-wcsbjfhx.js";
8
5
  import {
9
6
  isInvalidRequestError2,
10
7
  isUnauthorizedError2,
@@ -26,6 +23,9 @@ import {
26
23
  isFormInvalidAnswerError2,
27
24
  isFormAlreadySettledError2,
28
25
  isProviderNotFoundError2,
26
+ isModelNotFoundError2,
27
+ isUnsupportedModelError2,
28
+ isProviderRequestError2,
29
29
  isIntegrationNotFoundError2,
30
30
  isIntegrationAttemptNotFoundError2,
31
31
  isIntegrationMethodNotFoundError2,
@@ -41,10 +41,13 @@ import {
41
41
  isShellNotFoundError2,
42
42
  isWorktreeError2,
43
43
  isVcsInitNotSupportedError2
44
- } from "../../chunks/contract-4x4a6tah.js";
44
+ } from "../../chunks/service-8we1dz3p.js";
45
+ import {
46
+ ClientError2
47
+ } from "../../chunks/service-js54wxgp.js";
45
48
  export {
46
- ClientError3 as ClientError,
47
- exports_client4 as OpenCode,
49
+ ClientError2 as ClientError,
50
+ exports_client2 as OpenCode,
48
51
  isAgentNotFoundError2 as isAgentNotFoundError,
49
52
  isCommandExecutionError2 as isCommandExecutionError,
50
53
  isCommandNotFoundError2 as isCommandNotFoundError,
@@ -63,11 +66,13 @@ export {
63
66
  isLocationNotFoundError2 as isLocationNotFoundError,
64
67
  isMcpServerNotFoundError2 as isMcpServerNotFoundError,
65
68
  isMessageNotFoundError2 as isMessageNotFoundError,
69
+ isModelNotFoundError2 as isModelNotFoundError,
66
70
  isPermissionNotFoundError2 as isPermissionNotFoundError,
67
71
  isPermissionSavedNotFoundError2 as isPermissionSavedNotFoundError,
68
72
  isPluginNotFoundError2 as isPluginNotFoundError,
69
73
  isProjectNotFoundError2 as isProjectNotFoundError,
70
74
  isProviderNotFoundError2 as isProviderNotFoundError,
75
+ isProviderRequestError2 as isProviderRequestError,
71
76
  isPtyNotFoundError2 as isPtyNotFoundError,
72
77
  isRpcError2 as isRpcError,
73
78
  isRpcInternalError2 as isRpcInternalError,
@@ -78,6 +83,7 @@ export {
78
83
  isSkillNotFoundError2 as isSkillNotFoundError,
79
84
  isUnauthorizedError2 as isUnauthorizedError,
80
85
  isUnknownError2 as isUnknownError,
86
+ isUnsupportedModelError2 as isUnsupportedModelError,
81
87
  isVcsInitNotSupportedError2 as isVcsInitNotSupportedError,
82
88
  isWorktreeError2 as isWorktreeError
83
89
  };
@@ -240,6 +240,7 @@ export type ModelType = "chat" | "decision" | "image" | (string & {});
240
240
  export type ModelReasoningField = "reasoning" | "reasoning_content" | "reasoning_text" | (string & {});
241
241
  export type ModelMaxTokensField = "max_completion_tokens" | "max_tokens";
242
242
  export type ModelCacheFormat = "anthropic" | "alibaba";
243
+ export type ModelMediaInput = "assets" | "state" | "root";
243
244
  export type ModelCapabilities = {
244
245
  tools: boolean;
245
246
  input: Array<string>;
@@ -252,6 +253,36 @@ export type GenerateTextResponse = {
252
253
  text: string;
253
254
  };
254
255
  };
256
+ export type GenerateUsage = {
257
+ input?: number;
258
+ output?: number;
259
+ };
260
+ export type GenerateNative = {
261
+ [x: string]: JsonValue;
262
+ };
263
+ export type GeneratePredicateAnswer = {
264
+ type: "predicate";
265
+ name: string;
266
+ probability: number;
267
+ };
268
+ export type GenerateChoiceValue = string | boolean;
269
+ export type GenerateScoreAnswer = {
270
+ type: "score";
271
+ name: string;
272
+ score: number;
273
+ probabilities: Array<{
274
+ value: number;
275
+ label: string;
276
+ probability: number;
277
+ }>;
278
+ confidence: number;
279
+ };
280
+ export type GenerateErrorAnswer = {
281
+ type: "error";
282
+ name: string;
283
+ reason: string;
284
+ message?: string;
285
+ };
255
286
  export type VoiceTransportType = "webrtc" | "websocket";
256
287
  export type VoiceWebRTCTransport = {
257
288
  type: "webrtc";
@@ -616,6 +647,12 @@ export type SessionStatsTools = {
616
647
  totals: SessionStatsToolTotals;
617
648
  usage: Array<SessionStatsToolUsage>;
618
649
  };
650
+ export type GenerateImageOutput2 = {
651
+ type: "image";
652
+ data: PromptBase64;
653
+ mime: string;
654
+ name?: string;
655
+ };
619
656
  export type PromptFileAttachment = {
620
657
  data: PromptBase64;
621
658
  mime: string;
@@ -891,6 +928,7 @@ export type ModelCompatibility = {
891
928
  cacheFormat?: ModelCacheFormat;
892
929
  supportsThinkingBlockBinding?: boolean;
893
930
  supportsEffortUpdates?: boolean;
931
+ mediaInput?: ModelMediaInput;
894
932
  };
895
933
  export type ProviderCompatibility = {
896
934
  reasoningField?: ModelReasoningField;
@@ -901,6 +939,7 @@ export type ProviderCompatibility = {
901
939
  supportsPromptCacheKey?: boolean;
902
940
  streamUsage?: boolean;
903
941
  cacheFormat?: ModelCacheFormat;
942
+ mediaInput?: ModelMediaInput;
904
943
  };
905
944
  export type ModelCost = {
906
945
  tier?: {
@@ -914,6 +953,16 @@ export type ModelCost = {
914
953
  write: MoneyUSDPerMillionTokens;
915
954
  };
916
955
  };
956
+ export type GenerateChoiceAnswer = {
957
+ type: "choice";
958
+ name: string;
959
+ choice: GenerateChoiceValue;
960
+ probabilities: Array<{
961
+ value: GenerateChoiceValue;
962
+ probability: number;
963
+ }>;
964
+ confidence: number;
965
+ };
917
966
  export type VoiceModel = {
918
967
  model: string;
919
968
  provider: string;
@@ -1280,6 +1329,12 @@ export type UsageLimitsBudget = {
1280
1329
  shared: boolean;
1281
1330
  resetsAt: number;
1282
1331
  };
1332
+ export type GenerateImageResult = {
1333
+ images: Array<GenerateImageOutput2>;
1334
+ cost?: MoneyUSD;
1335
+ tokens?: GenerateUsage;
1336
+ native?: GenerateNative;
1337
+ };
1283
1338
  export type SessionMessageUser = {
1284
1339
  id: SessionMessageID;
1285
1340
  metadata?: {
@@ -2786,6 +2841,7 @@ export type FormState = {
2786
2841
  status: "cancelled";
2787
2842
  message?: string;
2788
2843
  };
2844
+ export type GenerateDecisionAnswer = GeneratePredicateAnswer | GenerateChoiceAnswer | GenerateScoreAnswer | GenerateErrorAnswer;
2789
2845
  export type VoiceModelsResponse = {
2790
2846
  data: {
2791
2847
  models: Array<VoiceModel>;
@@ -3291,6 +3347,9 @@ export type UsageLimitsInfo = {
3291
3347
  go?: UsageLimitsGo;
3292
3348
  budgets: Array<UsageLimitsBudget>;
3293
3349
  };
3350
+ export type GenerateImageResponse = {
3351
+ data: GenerateImageResult;
3352
+ };
3294
3353
  export type SessionInboxUser = {
3295
3354
  id: SessionMessageID;
3296
3355
  sessionID: SessionID;
@@ -3345,6 +3404,12 @@ export type SessionMessageAssistantTool1 = {
3345
3404
  };
3346
3405
  };
3347
3406
  export type FormFields = [FormField, ...Array<FormField>];
3407
+ export type GenerateDecisionResult = {
3408
+ answers: Array<GenerateDecisionAnswer>;
3409
+ cost?: MoneyUSD;
3410
+ tokens?: GenerateUsage;
3411
+ native?: GenerateNative;
3412
+ };
3348
3413
  export type CredentialEntry = {
3349
3414
  id: CredentialID;
3350
3415
  integrationID: IntegrationID;
@@ -3484,6 +3549,9 @@ export type IntegrationExternalMethod = {
3484
3549
  label: string;
3485
3550
  form?: FormFields;
3486
3551
  };
3552
+ export type GenerateDecisionsResponse = {
3553
+ data: GenerateDecisionResult;
3554
+ };
3487
3555
  export type FormInfo1 = {
3488
3556
  id: FormID;
3489
3557
  sessionID: string;
@@ -3670,6 +3738,30 @@ export type ProviderNotFoundError = {
3670
3738
  readonly message: string;
3671
3739
  };
3672
3740
  export declare const isProviderNotFoundError: (value: unknown) => value is ProviderNotFoundError;
3741
+ export type ModelNotFoundError = {
3742
+ readonly _tag: "ModelNotFoundError";
3743
+ readonly providerID: string;
3744
+ readonly modelID: string;
3745
+ readonly message: string;
3746
+ };
3747
+ export declare const isModelNotFoundError: (value: unknown) => value is ModelNotFoundError;
3748
+ export type UnsupportedModelError = {
3749
+ readonly _tag: "UnsupportedModelError";
3750
+ readonly providerID: string;
3751
+ readonly modelID: string;
3752
+ readonly capability: string;
3753
+ readonly message: string;
3754
+ };
3755
+ export declare const isUnsupportedModelError: (value: unknown) => value is UnsupportedModelError;
3756
+ export type ProviderRequestError = {
3757
+ readonly _tag: "ProviderRequestError";
3758
+ readonly providerID: string;
3759
+ readonly reason: "authentication" | "rate_limit" | "content_filter" | "invalid_request" | "overloaded" | "provider";
3760
+ readonly message: string;
3761
+ readonly status?: number | undefined;
3762
+ readonly retryAfterMs?: number | undefined;
3763
+ };
3764
+ export declare const isProviderRequestError: (value: unknown) => value is ProviderRequestError;
3673
3765
  export type IntegrationNotFoundError = {
3674
3766
  readonly _tag: "IntegrationNotFoundError";
3675
3767
  readonly integrationID: string;
@@ -4498,6 +4590,64 @@ export type GenerateTextInput = {
4498
4590
  } | null | undefined;
4499
4591
  };
4500
4592
  export type GenerateTextOutput = GenerateTextResponse["data"];
4593
+ export type GenerateImageInput = {
4594
+ readonly model: {
4595
+ readonly id: string;
4596
+ readonly providerID: string;
4597
+ readonly variant?: string;
4598
+ };
4599
+ readonly prompt: string;
4600
+ readonly images?: ReadonlyArray<{
4601
+ readonly data: string;
4602
+ readonly mime: string;
4603
+ readonly name?: string;
4604
+ }> | undefined;
4605
+ readonly n?: number | undefined;
4606
+ readonly aspect?: `${number}${":"}${number}` | undefined;
4607
+ readonly resolution?: ("1K" | "2K" | "4K" | (string & {})) | undefined;
4608
+ };
4609
+ export type GenerateImageOutput = GenerateImageResponse["data"];
4610
+ export type GenerateDecisionsInput = {
4611
+ readonly model: {
4612
+ readonly id: string;
4613
+ readonly providerID: string;
4614
+ readonly variant?: string;
4615
+ };
4616
+ readonly input: ReadonlyArray<{
4617
+ readonly type: "text";
4618
+ readonly text: string;
4619
+ } | {
4620
+ readonly type: "json";
4621
+ readonly value: JsonValue;
4622
+ } | {
4623
+ readonly type: "file";
4624
+ readonly data: string;
4625
+ readonly mime: string;
4626
+ readonly name?: string;
4627
+ }>;
4628
+ readonly questions: ReadonlyArray<{
4629
+ readonly type: "predicate";
4630
+ readonly name: string;
4631
+ readonly instructions: string;
4632
+ } | {
4633
+ readonly type: "choice";
4634
+ readonly name: string;
4635
+ readonly instructions: string;
4636
+ readonly choices: ReadonlyArray<{
4637
+ readonly value: string | boolean;
4638
+ readonly description?: string;
4639
+ }>;
4640
+ } | {
4641
+ readonly type: "score";
4642
+ readonly name: string;
4643
+ readonly instructions: string;
4644
+ readonly levels: ReadonlyArray<{
4645
+ readonly label: string;
4646
+ readonly description?: string;
4647
+ }>;
4648
+ }>;
4649
+ };
4650
+ export type GenerateDecisionsOutput = GenerateDecisionsResponse["data"];
4501
4651
  export type VoiceModelsOutput = VoiceModelsResponse["data"];
4502
4652
  export type VoiceSessionInput = {
4503
4653
  readonly model: string;
@@ -19,6 +19,9 @@ import {
19
19
  isFormInvalidAnswerError2,
20
20
  isFormAlreadySettledError2,
21
21
  isProviderNotFoundError2,
22
+ isModelNotFoundError2,
23
+ isUnsupportedModelError2,
24
+ isProviderRequestError2,
22
25
  isIntegrationNotFoundError2,
23
26
  isIntegrationAttemptNotFoundError2,
24
27
  isIntegrationMethodNotFoundError2,
@@ -34,7 +37,7 @@ import {
34
37
  isShellNotFoundError2,
35
38
  isWorktreeError2,
36
39
  isVcsInitNotSupportedError2
37
- } from "../../chunks/contract-4x4a6tah.js";
40
+ } from "../../chunks/service-8we1dz3p.js";
38
41
  export {
39
42
  isAgentNotFoundError2 as isAgentNotFoundError,
40
43
  isCommandExecutionError2 as isCommandExecutionError,
@@ -54,11 +57,13 @@ export {
54
57
  isLocationNotFoundError2 as isLocationNotFoundError,
55
58
  isMcpServerNotFoundError2 as isMcpServerNotFoundError,
56
59
  isMessageNotFoundError2 as isMessageNotFoundError,
60
+ isModelNotFoundError2 as isModelNotFoundError,
57
61
  isPermissionNotFoundError2 as isPermissionNotFoundError,
58
62
  isPermissionSavedNotFoundError2 as isPermissionSavedNotFoundError,
59
63
  isPluginNotFoundError2 as isPluginNotFoundError,
60
64
  isProjectNotFoundError2 as isProjectNotFoundError,
61
65
  isProviderNotFoundError2 as isProviderNotFoundError,
66
+ isProviderRequestError2 as isProviderRequestError,
62
67
  isPtyNotFoundError2 as isPtyNotFoundError,
63
68
  isRpcError2 as isRpcError,
64
69
  isRpcInternalError2 as isRpcInternalError,
@@ -69,6 +74,7 @@ export {
69
74
  isSkillNotFoundError2 as isSkillNotFoundError,
70
75
  isUnauthorizedError2 as isUnauthorizedError,
71
76
  isUnknownError2 as isUnknownError,
77
+ isUnsupportedModelError2 as isUnsupportedModelError,
72
78
  isVcsInitNotSupportedError2 as isVcsInitNotSupportedError,
73
79
  isWorktreeError2 as isWorktreeError
74
80
  };
@@ -1,13 +1,10 @@
1
- import"../chunks/contract-m2eywc8w.js";
1
+ import"../chunks/service-m2eywc8w.js";
2
2
  import {
3
- exports_client3
4
- } from "../chunks/contract-r6a5t1f9.js";
5
- import"../chunks/contract-vyas3vgt.js";
6
- import"../chunks/contract-rb7z442v.js";
7
- import {
8
- ClientError3
9
- } from "../chunks/contract-nwcpakzx.js";
10
- import"../chunks/contract-1gqkvw7r.js";
3
+ exports_client
4
+ } from "../chunks/service-2sr9xw1p.js";
5
+ import"../chunks/service-ab9bm97w.js";
6
+ import"../chunks/service-vyas3vgt.js";
7
+ import"../chunks/service-wcsbjfhx.js";
11
8
  import {
12
9
  isInvalidRequestError2,
13
10
  isUnauthorizedError2,
@@ -29,6 +26,9 @@ import {
29
26
  isFormInvalidAnswerError2,
30
27
  isFormAlreadySettledError2,
31
28
  isProviderNotFoundError2,
29
+ isModelNotFoundError2,
30
+ isUnsupportedModelError2,
31
+ isProviderRequestError2,
32
32
  isIntegrationNotFoundError2,
33
33
  isIntegrationAttemptNotFoundError2,
34
34
  isIntegrationMethodNotFoundError2,
@@ -44,11 +44,14 @@ import {
44
44
  isShellNotFoundError2,
45
45
  isWorktreeError2,
46
46
  isVcsInitNotSupportedError2
47
- } from "../chunks/contract-4x4a6tah.js";
48
- import"../chunks/contract-gecjxyvt.js";
47
+ } from "../chunks/service-8we1dz3p.js";
48
+ import {
49
+ ClientError2
50
+ } from "../chunks/service-js54wxgp.js";
51
+ import"../chunks/service-gecjxyvt.js";
49
52
  export {
50
- ClientError3 as ClientError,
51
- exports_client3 as OpenCode,
53
+ ClientError2 as ClientError,
54
+ exports_client as OpenCode,
52
55
  isAgentNotFoundError2 as isAgentNotFoundError,
53
56
  isCommandExecutionError2 as isCommandExecutionError,
54
57
  isCommandNotFoundError2 as isCommandNotFoundError,
@@ -67,11 +70,13 @@ export {
67
70
  isLocationNotFoundError2 as isLocationNotFoundError,
68
71
  isMcpServerNotFoundError2 as isMcpServerNotFoundError,
69
72
  isMessageNotFoundError2 as isMessageNotFoundError,
73
+ isModelNotFoundError2 as isModelNotFoundError,
70
74
  isPermissionNotFoundError2 as isPermissionNotFoundError,
71
75
  isPermissionSavedNotFoundError2 as isPermissionSavedNotFoundError,
72
76
  isPluginNotFoundError2 as isPluginNotFoundError,
73
77
  isProjectNotFoundError2 as isProjectNotFoundError,
74
78
  isProviderNotFoundError2 as isProviderNotFoundError,
79
+ isProviderRequestError2 as isProviderRequestError,
75
80
  isPtyNotFoundError2 as isPtyNotFoundError,
76
81
  isRpcError2 as isRpcError,
77
82
  isRpcInternalError2 as isRpcInternalError,
@@ -82,6 +87,7 @@ export {
82
87
  isSkillNotFoundError2 as isSkillNotFoundError,
83
88
  isUnauthorizedError2 as isUnauthorizedError,
84
89
  isUnknownError2 as isUnknownError,
90
+ isUnsupportedModelError2 as isUnsupportedModelError,
85
91
  isVcsInitNotSupportedError2 as isVcsInitNotSupportedError,
86
92
  isWorktreeError2 as isWorktreeError
87
93
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  makeRpc2
3
- } from "../chunks/contract-1gqkvw7r.js";
4
- import"../chunks/contract-4x4a6tah.js";
3
+ } from "../chunks/service-ab9bm97w.js";
4
+ import"../chunks/service-8we1dz3p.js";
5
5
  export {
6
6
  makeRpc2 as makeRpc
7
7
  };
@@ -1,28 +1,28 @@
1
1
  import {
2
2
  spawnServiceContender2,
3
3
  contenderPool2
4
- } from "../chunks/contract-ve4aws36.js";
4
+ } from "../chunks/service-ve4aws36.js";
5
5
  import {
6
6
  defaultEnsureTiming2,
7
7
  ensureTiming2
8
- } from "../chunks/contract-xgnj2w4v.js";
8
+ } from "../chunks/service-xgnj2w4v.js";
9
9
  import {
10
10
  matchesVersion2
11
- } from "../chunks/contract-sxt88q69.js";
11
+ } from "../chunks/service-sxt88q69.js";
12
12
  import {
13
13
  decide2,
14
14
  fallback2,
15
15
  same2,
16
16
  probeResult2,
17
17
  headers2
18
- } from "../chunks/contract-2ny4vxct.js";
18
+ } from "../chunks/service-2ny4vxct.js";
19
19
  import {
20
20
  prepare2,
21
21
  environment2,
22
22
  complete2,
23
23
  clear2
24
- } from "../chunks/contract-w2eqyd95.js";
25
- import"../chunks/contract-qav6mfdz.js";
24
+ } from "../chunks/service-87tppfgj.js";
25
+ import"../chunks/service-qav6mfdz.js";
26
26
 
27
27
  // src/promise/service.ts
28
28
  import { readFile, rm } from "node:fs/promises";