@opencode/client 2.0.7 → 2.0.9
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/dist/chunks/pty-handoff-1tbj6z39.js +81 -0
- package/dist/chunks/pty-handoff-4tveyqeh.js +34 -0
- package/dist/chunks/pty-handoff-65kht65h.js +62 -0
- package/dist/chunks/pty-handoff-6mptkzbc.js +0 -0
- package/dist/chunks/pty-handoff-9rqn6x4v.js +16 -0
- package/dist/chunks/pty-handoff-atpwm825.js +1638 -0
- package/dist/chunks/pty-handoff-bssvn03b.js +594 -0
- package/dist/chunks/pty-handoff-frbwqjmf.js +145 -0
- package/dist/chunks/pty-handoff-m2eywc8w.js +0 -0
- package/dist/chunks/pty-handoff-n3c99vt5.js +11 -0
- package/dist/chunks/pty-handoff-nqd0dnpk.js +112 -0
- package/dist/chunks/pty-handoff-qav6mfdz.js +0 -0
- package/dist/chunks/pty-handoff-radw39tv.js +1402 -0
- package/dist/chunks/pty-handoff-sxt88q69.js +12 -0
- package/dist/chunks/pty-handoff-t1xa31vm.js +39 -0
- package/dist/chunks/pty-handoff-txckps9j.js +57 -0
- package/dist/chunks/pty-handoff-vgxtr9hm.js +30 -0
- package/dist/chunks/pty-handoff-vmytr4q8.js +4 -0
- package/dist/chunks/pty-handoff-vyas3vgt.js +0 -0
- package/dist/chunks/pty-handoff-xgnj2w4v.js +20 -0
- package/dist/chunks/pty-handoff-y2etg5bs.js +9 -0
- package/dist/chunks/pty-handoff-ydhz1zrh.js +238 -0
- package/dist/chunks/pty-handoff-yepdgb80.js +44 -0
- package/dist/chunks/pty-handoff-zadn5mwr.js +52 -0
- package/dist/contract.js +12 -1
- package/dist/effect/client.d.ts +4 -4
- package/dist/effect/client.js +15 -29
- package/dist/effect/generated/client-error.js +6 -5
- package/dist/effect/generated/client.d.ts +4 -4
- package/dist/effect/generated/client.js +8 -582
- package/dist/effect/generated/index.js +12 -2
- package/dist/effect/index.js +75 -30
- package/dist/effect/rpc.js +11 -49
- package/dist/effect/service.js +238 -245
- package/dist/promise/client.js +14 -13
- package/dist/promise/generated/client-error.js +6 -8
- package/dist/promise/generated/client.js +7 -1396
- package/dist/promise/generated/index.js +75 -3
- package/dist/promise/generated/types.d.ts +91 -89
- package/dist/promise/generated/types.js +66 -34
- package/dist/promise/index.js +79 -2
- package/dist/promise/rpc.js +7 -86
- package/dist/promise/service.js +230 -227
- package/dist/pty-handoff.js +14 -121
- package/dist/rpc-runtime.js +14 -32
- package/dist/service-contender.js +10 -56
- package/dist/service-timing.d.ts +0 -1
- package/dist/service-timing.js +9 -18
- package/dist/service-version.js +6 -9
- package/dist/service.js +1 -0
- package/dist/shared-events.js +8 -137
- package/dist/solid/connection.js +10 -246
- package/dist/solid/data.js +18 -1769
- package/dist/solid/index.js +32 -3
- package/dist/solid/pty.js +8 -41
- package/package.json +4 -4
|
@@ -1,3 +1,75 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import"../../chunks/pty-handoff-vyas3vgt.js";
|
|
2
|
+
import {
|
|
3
|
+
exports_client4
|
|
4
|
+
} from "../../chunks/pty-handoff-radw39tv.js";
|
|
5
|
+
import {
|
|
6
|
+
isInvalidRequestError2,
|
|
7
|
+
isUnauthorizedError2,
|
|
8
|
+
isServiceUnavailableError2,
|
|
9
|
+
isAgentNotFoundError2,
|
|
10
|
+
isInvalidCursorError2,
|
|
11
|
+
isSessionNotFoundError2,
|
|
12
|
+
isConflictError2,
|
|
13
|
+
isUnknownError2,
|
|
14
|
+
isMessageNotFoundError2,
|
|
15
|
+
isCommandNotFoundError2,
|
|
16
|
+
isCommandExecutionError2,
|
|
17
|
+
isSkillNotFoundError2,
|
|
18
|
+
isSessionBusyError2,
|
|
19
|
+
isInstructionEntryValueTooLargeError2,
|
|
20
|
+
isFormNotFoundError2,
|
|
21
|
+
isFormInvalidAnswerError2,
|
|
22
|
+
isFormAlreadySettledError2,
|
|
23
|
+
isProviderNotFoundError2,
|
|
24
|
+
isIntegrationNotFoundError2,
|
|
25
|
+
isIntegrationAttemptNotFoundError2,
|
|
26
|
+
isIntegrationMethodNotFoundError2,
|
|
27
|
+
isMcpServerNotFoundError2,
|
|
28
|
+
isProjectNotFoundError2,
|
|
29
|
+
isPermissionNotFoundError2,
|
|
30
|
+
isFileNotFoundError2,
|
|
31
|
+
isRpcError2,
|
|
32
|
+
isRpcInternalError2,
|
|
33
|
+
isPtyNotFoundError2,
|
|
34
|
+
isForbiddenError2,
|
|
35
|
+
isShellNotFoundError2,
|
|
36
|
+
isWorktreeError2
|
|
37
|
+
} from "../../chunks/pty-handoff-4tveyqeh.js";
|
|
38
|
+
import {
|
|
39
|
+
ClientError3
|
|
40
|
+
} from "../../chunks/pty-handoff-n3c99vt5.js";
|
|
41
|
+
export {
|
|
42
|
+
ClientError3 as ClientError,
|
|
43
|
+
exports_client4 as OpenCode,
|
|
44
|
+
isAgentNotFoundError2 as isAgentNotFoundError,
|
|
45
|
+
isCommandExecutionError2 as isCommandExecutionError,
|
|
46
|
+
isCommandNotFoundError2 as isCommandNotFoundError,
|
|
47
|
+
isConflictError2 as isConflictError,
|
|
48
|
+
isFileNotFoundError2 as isFileNotFoundError,
|
|
49
|
+
isForbiddenError2 as isForbiddenError,
|
|
50
|
+
isFormAlreadySettledError2 as isFormAlreadySettledError,
|
|
51
|
+
isFormInvalidAnswerError2 as isFormInvalidAnswerError,
|
|
52
|
+
isFormNotFoundError2 as isFormNotFoundError,
|
|
53
|
+
isInstructionEntryValueTooLargeError2 as isInstructionEntryValueTooLargeError,
|
|
54
|
+
isIntegrationAttemptNotFoundError2 as isIntegrationAttemptNotFoundError,
|
|
55
|
+
isIntegrationMethodNotFoundError2 as isIntegrationMethodNotFoundError,
|
|
56
|
+
isIntegrationNotFoundError2 as isIntegrationNotFoundError,
|
|
57
|
+
isInvalidCursorError2 as isInvalidCursorError,
|
|
58
|
+
isInvalidRequestError2 as isInvalidRequestError,
|
|
59
|
+
isMcpServerNotFoundError2 as isMcpServerNotFoundError,
|
|
60
|
+
isMessageNotFoundError2 as isMessageNotFoundError,
|
|
61
|
+
isPermissionNotFoundError2 as isPermissionNotFoundError,
|
|
62
|
+
isProjectNotFoundError2 as isProjectNotFoundError,
|
|
63
|
+
isProviderNotFoundError2 as isProviderNotFoundError,
|
|
64
|
+
isPtyNotFoundError2 as isPtyNotFoundError,
|
|
65
|
+
isRpcError2 as isRpcError,
|
|
66
|
+
isRpcInternalError2 as isRpcInternalError,
|
|
67
|
+
isServiceUnavailableError2 as isServiceUnavailableError,
|
|
68
|
+
isSessionBusyError2 as isSessionBusyError,
|
|
69
|
+
isSessionNotFoundError2 as isSessionNotFoundError,
|
|
70
|
+
isShellNotFoundError2 as isShellNotFoundError,
|
|
71
|
+
isSkillNotFoundError2 as isSkillNotFoundError,
|
|
72
|
+
isUnauthorizedError2 as isUnauthorizedError,
|
|
73
|
+
isUnknownError2 as isUnknownError,
|
|
74
|
+
isWorktreeError2 as isWorktreeError
|
|
75
|
+
};
|
|
@@ -25,9 +25,12 @@ export type ModelRef = {
|
|
|
25
25
|
providerID: string;
|
|
26
26
|
variant?: string;
|
|
27
27
|
};
|
|
28
|
-
export type
|
|
29
|
-
|
|
28
|
+
export type ProviderCompaction = {
|
|
29
|
+
type: "summary";
|
|
30
|
+
} | {
|
|
31
|
+
type: "native";
|
|
30
32
|
};
|
|
33
|
+
export type ProviderTransport = "http" | "websocket";
|
|
31
34
|
export type AgentColor = string;
|
|
32
35
|
export type PermissionEffect = "allow" | "deny" | "ask";
|
|
33
36
|
export type PluginSource = {
|
|
@@ -342,30 +345,11 @@ export type FormExternalField = {
|
|
|
342
345
|
export type FormValue = string | number | "Infinity" | "-Infinity" | "NaN" | boolean | Array<string>;
|
|
343
346
|
export type ModelReasoningField = "reasoning" | "reasoning_content" | "reasoning_text" | (string & {});
|
|
344
347
|
export type ModelMaxTokensField = "max_completion_tokens" | "max_tokens";
|
|
345
|
-
export type ProviderCompaction = {
|
|
346
|
-
mode: "local";
|
|
347
|
-
} | {
|
|
348
|
-
mode: "provider";
|
|
349
|
-
threshold?: number;
|
|
350
|
-
};
|
|
351
|
-
export type ProviderTransport = "http" | "websocket";
|
|
352
348
|
export type ModelCapabilities = {
|
|
353
349
|
tools: boolean;
|
|
354
350
|
input: Array<string>;
|
|
355
351
|
output: Array<string>;
|
|
356
352
|
};
|
|
357
|
-
export type ModelVariant = {
|
|
358
|
-
id: string;
|
|
359
|
-
settings?: {
|
|
360
|
-
[x: string]: any;
|
|
361
|
-
};
|
|
362
|
-
headers?: {
|
|
363
|
-
[x: string]: string;
|
|
364
|
-
};
|
|
365
|
-
body?: {
|
|
366
|
-
[x: string]: any;
|
|
367
|
-
};
|
|
368
|
-
};
|
|
369
353
|
export type MoneyUSDPerMillionTokens = number;
|
|
370
354
|
export type GenerateTextResponse = {
|
|
371
355
|
data: {
|
|
@@ -739,14 +723,31 @@ export type V2EventServerConnected = {
|
|
|
739
723
|
type: "server.connected";
|
|
740
724
|
data: {};
|
|
741
725
|
};
|
|
742
|
-
export type
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
726
|
+
export type ModelSettings = {
|
|
727
|
+
compaction?: ProviderCompaction;
|
|
728
|
+
} & {
|
|
729
|
+
[x: string]: any;
|
|
730
|
+
};
|
|
731
|
+
export type ConfigModelSettings = {
|
|
732
|
+
compaction?: ProviderCompaction;
|
|
733
|
+
} & {
|
|
734
|
+
[x: string]: JsonValue | null;
|
|
735
|
+
};
|
|
736
|
+
export type ProviderSettings = {
|
|
737
|
+
timeout?: number | false;
|
|
738
|
+
chunkTimeout?: number;
|
|
739
|
+
compaction?: ProviderCompaction;
|
|
740
|
+
transport?: ProviderTransport;
|
|
741
|
+
} & {
|
|
742
|
+
[x: string]: any;
|
|
743
|
+
};
|
|
744
|
+
export type ConfigProviderSettings = {
|
|
745
|
+
timeout?: number | false;
|
|
746
|
+
chunkTimeout?: number;
|
|
747
|
+
compaction?: ProviderCompaction;
|
|
748
|
+
transport?: ProviderTransport;
|
|
749
|
+
} & {
|
|
750
|
+
[x: string]: JsonValue | null;
|
|
750
751
|
};
|
|
751
752
|
export type PermissionRule = {
|
|
752
753
|
action: string;
|
|
@@ -2160,25 +2161,6 @@ export type ModelCompatibility = {
|
|
|
2160
2161
|
requireAssistantAfterTool?: boolean;
|
|
2161
2162
|
supportsPromptCacheKey?: boolean;
|
|
2162
2163
|
};
|
|
2163
|
-
export type ProviderInfo = {
|
|
2164
|
-
id: string;
|
|
2165
|
-
canonical?: string;
|
|
2166
|
-
integrationID?: string;
|
|
2167
|
-
name: string;
|
|
2168
|
-
activation: "auto" | "enabled" | "disabled";
|
|
2169
|
-
package: string;
|
|
2170
|
-
compaction?: ProviderCompaction;
|
|
2171
|
-
transport?: ProviderTransport;
|
|
2172
|
-
settings?: {
|
|
2173
|
-
[x: string]: any;
|
|
2174
|
-
};
|
|
2175
|
-
headers?: {
|
|
2176
|
-
[x: string]: string;
|
|
2177
|
-
};
|
|
2178
|
-
body?: {
|
|
2179
|
-
[x: string]: any;
|
|
2180
|
-
};
|
|
2181
|
-
};
|
|
2182
2164
|
export type ModelCost = {
|
|
2183
2165
|
tier?: {
|
|
2184
2166
|
type: "context";
|
|
@@ -2420,6 +2402,40 @@ export type SessionInboxMove = {
|
|
|
2420
2402
|
delivery: SessionInboxDelivery;
|
|
2421
2403
|
payload: SessionInboxMovePayload;
|
|
2422
2404
|
};
|
|
2405
|
+
export type ModelVariant = {
|
|
2406
|
+
id: string;
|
|
2407
|
+
settings?: ModelSettings;
|
|
2408
|
+
headers?: {
|
|
2409
|
+
[x: string]: string;
|
|
2410
|
+
};
|
|
2411
|
+
body?: {
|
|
2412
|
+
[x: string]: any;
|
|
2413
|
+
};
|
|
2414
|
+
};
|
|
2415
|
+
export type ProviderRequest = {
|
|
2416
|
+
settings: ProviderSettings;
|
|
2417
|
+
headers: {
|
|
2418
|
+
[x: string]: string;
|
|
2419
|
+
};
|
|
2420
|
+
body: {
|
|
2421
|
+
[x: string]: any;
|
|
2422
|
+
};
|
|
2423
|
+
};
|
|
2424
|
+
export type ProviderInfo = {
|
|
2425
|
+
id: string;
|
|
2426
|
+
canonical?: string;
|
|
2427
|
+
integrationID?: string;
|
|
2428
|
+
name: string;
|
|
2429
|
+
activation: "auto" | "enabled" | "disabled";
|
|
2430
|
+
package: string;
|
|
2431
|
+
settings?: ProviderSettings;
|
|
2432
|
+
headers?: {
|
|
2433
|
+
[x: string]: string;
|
|
2434
|
+
};
|
|
2435
|
+
body?: {
|
|
2436
|
+
[x: string]: any;
|
|
2437
|
+
};
|
|
2438
|
+
};
|
|
2423
2439
|
export type PermissionRuleset = Array<PermissionRule>;
|
|
2424
2440
|
export type SessionRevertStaged = {
|
|
2425
2441
|
id: string;
|
|
@@ -2657,6 +2673,28 @@ export type FormState = {
|
|
|
2657
2673
|
} | {
|
|
2658
2674
|
status: "cancelled";
|
|
2659
2675
|
};
|
|
2676
|
+
export type FormField1 = FormStringField1 | FormNumberField1 | FormIntegerField1 | FormBooleanField1 | FormMultiselectField1 | FormExternalField;
|
|
2677
|
+
export type FormReplied = {
|
|
2678
|
+
id: string;
|
|
2679
|
+
created: number;
|
|
2680
|
+
metadata?: {
|
|
2681
|
+
[x: string]: any;
|
|
2682
|
+
};
|
|
2683
|
+
type: "form.replied";
|
|
2684
|
+
location?: LocationRef;
|
|
2685
|
+
data: {
|
|
2686
|
+
id: string;
|
|
2687
|
+
sessionID: string;
|
|
2688
|
+
answer: FormAnswer1;
|
|
2689
|
+
};
|
|
2690
|
+
};
|
|
2691
|
+
export type ReferenceInfo = {
|
|
2692
|
+
name: string;
|
|
2693
|
+
path: string;
|
|
2694
|
+
description?: string;
|
|
2695
|
+
hidden?: boolean;
|
|
2696
|
+
source: ReferenceSource;
|
|
2697
|
+
};
|
|
2660
2698
|
export type ModelInfo = {
|
|
2661
2699
|
id: string;
|
|
2662
2700
|
modelID: string;
|
|
@@ -2666,11 +2704,7 @@ export type ModelInfo = {
|
|
|
2666
2704
|
name: string;
|
|
2667
2705
|
compatibility?: ModelCompatibility;
|
|
2668
2706
|
package?: string;
|
|
2669
|
-
|
|
2670
|
-
transport?: ProviderTransport;
|
|
2671
|
-
settings?: {
|
|
2672
|
-
[x: string]: any;
|
|
2673
|
-
};
|
|
2707
|
+
settings?: ModelSettings;
|
|
2674
2708
|
headers?: {
|
|
2675
2709
|
[x: string]: string;
|
|
2676
2710
|
};
|
|
@@ -2691,28 +2725,6 @@ export type ModelInfo = {
|
|
|
2691
2725
|
output: number;
|
|
2692
2726
|
};
|
|
2693
2727
|
};
|
|
2694
|
-
export type FormField1 = FormStringField1 | FormNumberField1 | FormIntegerField1 | FormBooleanField1 | FormMultiselectField1 | FormExternalField;
|
|
2695
|
-
export type FormReplied = {
|
|
2696
|
-
id: string;
|
|
2697
|
-
created: number;
|
|
2698
|
-
metadata?: {
|
|
2699
|
-
[x: string]: any;
|
|
2700
|
-
};
|
|
2701
|
-
type: "form.replied";
|
|
2702
|
-
location?: LocationRef;
|
|
2703
|
-
data: {
|
|
2704
|
-
id: string;
|
|
2705
|
-
sessionID: string;
|
|
2706
|
-
answer: FormAnswer1;
|
|
2707
|
-
};
|
|
2708
|
-
};
|
|
2709
|
-
export type ReferenceInfo = {
|
|
2710
|
-
name: string;
|
|
2711
|
-
path: string;
|
|
2712
|
-
description?: string;
|
|
2713
|
-
hidden?: boolean;
|
|
2714
|
-
source: ReferenceSource;
|
|
2715
|
-
};
|
|
2716
2728
|
export type AgentInfo = {
|
|
2717
2729
|
id: string;
|
|
2718
2730
|
name: string;
|
|
@@ -2983,15 +2995,11 @@ export type ConfigEntry = {
|
|
|
2983
2995
|
};
|
|
2984
2996
|
providers?: {
|
|
2985
2997
|
[x: string]: {
|
|
2986
|
-
compaction?: ProviderCompaction;
|
|
2987
|
-
transport?: ProviderTransport;
|
|
2988
2998
|
canonical?: string;
|
|
2989
2999
|
name?: string;
|
|
2990
3000
|
env?: Array<string>;
|
|
2991
3001
|
package?: string;
|
|
2992
|
-
settings?:
|
|
2993
|
-
[x: string]: JsonValue;
|
|
2994
|
-
};
|
|
3002
|
+
settings?: ConfigProviderSettings;
|
|
2995
3003
|
headers?: {
|
|
2996
3004
|
[x: string]: string;
|
|
2997
3005
|
};
|
|
@@ -3000,16 +3008,12 @@ export type ConfigEntry = {
|
|
|
3000
3008
|
};
|
|
3001
3009
|
models?: {
|
|
3002
3010
|
[x: string]: {
|
|
3003
|
-
compaction?: ProviderCompaction;
|
|
3004
|
-
transport?: ProviderTransport;
|
|
3005
3011
|
modelID?: string;
|
|
3006
3012
|
family?: string;
|
|
3007
3013
|
name?: string;
|
|
3008
3014
|
compatibility?: ModelCompatibility;
|
|
3009
3015
|
package?: string;
|
|
3010
|
-
settings?:
|
|
3011
|
-
[x: string]: JsonValue;
|
|
3012
|
-
};
|
|
3016
|
+
settings?: ConfigModelSettings;
|
|
3013
3017
|
headers?: {
|
|
3014
3018
|
[x: string]: string;
|
|
3015
3019
|
};
|
|
@@ -3019,9 +3023,7 @@ export type ConfigEntry = {
|
|
|
3019
3023
|
capabilities?: ModelCapabilities;
|
|
3020
3024
|
variants?: Array<{
|
|
3021
3025
|
id: string;
|
|
3022
|
-
settings?:
|
|
3023
|
-
[x: string]: JsonValue;
|
|
3024
|
-
};
|
|
3026
|
+
settings?: ConfigModelSettings;
|
|
3025
3027
|
headers?: {
|
|
3026
3028
|
[x: string]: string;
|
|
3027
3029
|
};
|
|
@@ -3066,7 +3068,7 @@ export type ConfigEntry = {
|
|
|
3066
3068
|
portable_shell_scanner?: boolean;
|
|
3067
3069
|
subagent_depth?: number;
|
|
3068
3070
|
policies?: Array<{
|
|
3069
|
-
action: "provider.use";
|
|
3071
|
+
action: "provider.use" | "permission";
|
|
3070
3072
|
resource: string;
|
|
3071
3073
|
effect: "allow" | "deny";
|
|
3072
3074
|
}>;
|
|
@@ -1,34 +1,66 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
export
|
|
1
|
+
import {
|
|
2
|
+
isInvalidRequestError2,
|
|
3
|
+
isUnauthorizedError2,
|
|
4
|
+
isServiceUnavailableError2,
|
|
5
|
+
isAgentNotFoundError2,
|
|
6
|
+
isInvalidCursorError2,
|
|
7
|
+
isSessionNotFoundError2,
|
|
8
|
+
isConflictError2,
|
|
9
|
+
isUnknownError2,
|
|
10
|
+
isMessageNotFoundError2,
|
|
11
|
+
isCommandNotFoundError2,
|
|
12
|
+
isCommandExecutionError2,
|
|
13
|
+
isSkillNotFoundError2,
|
|
14
|
+
isSessionBusyError2,
|
|
15
|
+
isInstructionEntryValueTooLargeError2,
|
|
16
|
+
isFormNotFoundError2,
|
|
17
|
+
isFormInvalidAnswerError2,
|
|
18
|
+
isFormAlreadySettledError2,
|
|
19
|
+
isProviderNotFoundError2,
|
|
20
|
+
isIntegrationNotFoundError2,
|
|
21
|
+
isIntegrationAttemptNotFoundError2,
|
|
22
|
+
isIntegrationMethodNotFoundError2,
|
|
23
|
+
isMcpServerNotFoundError2,
|
|
24
|
+
isProjectNotFoundError2,
|
|
25
|
+
isPermissionNotFoundError2,
|
|
26
|
+
isFileNotFoundError2,
|
|
27
|
+
isRpcError2,
|
|
28
|
+
isRpcInternalError2,
|
|
29
|
+
isPtyNotFoundError2,
|
|
30
|
+
isForbiddenError2,
|
|
31
|
+
isShellNotFoundError2,
|
|
32
|
+
isWorktreeError2
|
|
33
|
+
} from "../../chunks/pty-handoff-4tveyqeh.js";
|
|
34
|
+
export {
|
|
35
|
+
isAgentNotFoundError2 as isAgentNotFoundError,
|
|
36
|
+
isCommandExecutionError2 as isCommandExecutionError,
|
|
37
|
+
isCommandNotFoundError2 as isCommandNotFoundError,
|
|
38
|
+
isConflictError2 as isConflictError,
|
|
39
|
+
isFileNotFoundError2 as isFileNotFoundError,
|
|
40
|
+
isForbiddenError2 as isForbiddenError,
|
|
41
|
+
isFormAlreadySettledError2 as isFormAlreadySettledError,
|
|
42
|
+
isFormInvalidAnswerError2 as isFormInvalidAnswerError,
|
|
43
|
+
isFormNotFoundError2 as isFormNotFoundError,
|
|
44
|
+
isInstructionEntryValueTooLargeError2 as isInstructionEntryValueTooLargeError,
|
|
45
|
+
isIntegrationAttemptNotFoundError2 as isIntegrationAttemptNotFoundError,
|
|
46
|
+
isIntegrationMethodNotFoundError2 as isIntegrationMethodNotFoundError,
|
|
47
|
+
isIntegrationNotFoundError2 as isIntegrationNotFoundError,
|
|
48
|
+
isInvalidCursorError2 as isInvalidCursorError,
|
|
49
|
+
isInvalidRequestError2 as isInvalidRequestError,
|
|
50
|
+
isMcpServerNotFoundError2 as isMcpServerNotFoundError,
|
|
51
|
+
isMessageNotFoundError2 as isMessageNotFoundError,
|
|
52
|
+
isPermissionNotFoundError2 as isPermissionNotFoundError,
|
|
53
|
+
isProjectNotFoundError2 as isProjectNotFoundError,
|
|
54
|
+
isProviderNotFoundError2 as isProviderNotFoundError,
|
|
55
|
+
isPtyNotFoundError2 as isPtyNotFoundError,
|
|
56
|
+
isRpcError2 as isRpcError,
|
|
57
|
+
isRpcInternalError2 as isRpcInternalError,
|
|
58
|
+
isServiceUnavailableError2 as isServiceUnavailableError,
|
|
59
|
+
isSessionBusyError2 as isSessionBusyError,
|
|
60
|
+
isSessionNotFoundError2 as isSessionNotFoundError,
|
|
61
|
+
isShellNotFoundError2 as isShellNotFoundError,
|
|
62
|
+
isSkillNotFoundError2 as isSkillNotFoundError,
|
|
63
|
+
isUnauthorizedError2 as isUnauthorizedError,
|
|
64
|
+
isUnknownError2 as isUnknownError,
|
|
65
|
+
isWorktreeError2 as isWorktreeError
|
|
66
|
+
};
|
package/dist/promise/index.js
CHANGED
|
@@ -1,2 +1,79 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import"../chunks/pty-handoff-m2eywc8w.js";
|
|
2
|
+
import {
|
|
3
|
+
exports_client3
|
|
4
|
+
} from "../chunks/pty-handoff-vgxtr9hm.js";
|
|
5
|
+
import"../chunks/pty-handoff-1tbj6z39.js";
|
|
6
|
+
import"../chunks/pty-handoff-vyas3vgt.js";
|
|
7
|
+
import"../chunks/pty-handoff-radw39tv.js";
|
|
8
|
+
import {
|
|
9
|
+
isInvalidRequestError2,
|
|
10
|
+
isUnauthorizedError2,
|
|
11
|
+
isServiceUnavailableError2,
|
|
12
|
+
isAgentNotFoundError2,
|
|
13
|
+
isInvalidCursorError2,
|
|
14
|
+
isSessionNotFoundError2,
|
|
15
|
+
isConflictError2,
|
|
16
|
+
isUnknownError2,
|
|
17
|
+
isMessageNotFoundError2,
|
|
18
|
+
isCommandNotFoundError2,
|
|
19
|
+
isCommandExecutionError2,
|
|
20
|
+
isSkillNotFoundError2,
|
|
21
|
+
isSessionBusyError2,
|
|
22
|
+
isInstructionEntryValueTooLargeError2,
|
|
23
|
+
isFormNotFoundError2,
|
|
24
|
+
isFormInvalidAnswerError2,
|
|
25
|
+
isFormAlreadySettledError2,
|
|
26
|
+
isProviderNotFoundError2,
|
|
27
|
+
isIntegrationNotFoundError2,
|
|
28
|
+
isIntegrationAttemptNotFoundError2,
|
|
29
|
+
isIntegrationMethodNotFoundError2,
|
|
30
|
+
isMcpServerNotFoundError2,
|
|
31
|
+
isProjectNotFoundError2,
|
|
32
|
+
isPermissionNotFoundError2,
|
|
33
|
+
isFileNotFoundError2,
|
|
34
|
+
isRpcError2,
|
|
35
|
+
isRpcInternalError2,
|
|
36
|
+
isPtyNotFoundError2,
|
|
37
|
+
isForbiddenError2,
|
|
38
|
+
isShellNotFoundError2,
|
|
39
|
+
isWorktreeError2
|
|
40
|
+
} from "../chunks/pty-handoff-4tveyqeh.js";
|
|
41
|
+
import {
|
|
42
|
+
ClientError3
|
|
43
|
+
} from "../chunks/pty-handoff-n3c99vt5.js";
|
|
44
|
+
import"../chunks/pty-handoff-frbwqjmf.js";
|
|
45
|
+
export {
|
|
46
|
+
ClientError3 as ClientError,
|
|
47
|
+
exports_client3 as OpenCode,
|
|
48
|
+
isAgentNotFoundError2 as isAgentNotFoundError,
|
|
49
|
+
isCommandExecutionError2 as isCommandExecutionError,
|
|
50
|
+
isCommandNotFoundError2 as isCommandNotFoundError,
|
|
51
|
+
isConflictError2 as isConflictError,
|
|
52
|
+
isFileNotFoundError2 as isFileNotFoundError,
|
|
53
|
+
isForbiddenError2 as isForbiddenError,
|
|
54
|
+
isFormAlreadySettledError2 as isFormAlreadySettledError,
|
|
55
|
+
isFormInvalidAnswerError2 as isFormInvalidAnswerError,
|
|
56
|
+
isFormNotFoundError2 as isFormNotFoundError,
|
|
57
|
+
isInstructionEntryValueTooLargeError2 as isInstructionEntryValueTooLargeError,
|
|
58
|
+
isIntegrationAttemptNotFoundError2 as isIntegrationAttemptNotFoundError,
|
|
59
|
+
isIntegrationMethodNotFoundError2 as isIntegrationMethodNotFoundError,
|
|
60
|
+
isIntegrationNotFoundError2 as isIntegrationNotFoundError,
|
|
61
|
+
isInvalidCursorError2 as isInvalidCursorError,
|
|
62
|
+
isInvalidRequestError2 as isInvalidRequestError,
|
|
63
|
+
isMcpServerNotFoundError2 as isMcpServerNotFoundError,
|
|
64
|
+
isMessageNotFoundError2 as isMessageNotFoundError,
|
|
65
|
+
isPermissionNotFoundError2 as isPermissionNotFoundError,
|
|
66
|
+
isProjectNotFoundError2 as isProjectNotFoundError,
|
|
67
|
+
isProviderNotFoundError2 as isProviderNotFoundError,
|
|
68
|
+
isPtyNotFoundError2 as isPtyNotFoundError,
|
|
69
|
+
isRpcError2 as isRpcError,
|
|
70
|
+
isRpcInternalError2 as isRpcInternalError,
|
|
71
|
+
isServiceUnavailableError2 as isServiceUnavailableError,
|
|
72
|
+
isSessionBusyError2 as isSessionBusyError,
|
|
73
|
+
isSessionNotFoundError2 as isSessionNotFoundError,
|
|
74
|
+
isShellNotFoundError2 as isShellNotFoundError,
|
|
75
|
+
isSkillNotFoundError2 as isSkillNotFoundError,
|
|
76
|
+
isUnauthorizedError2 as isUnauthorizedError,
|
|
77
|
+
isUnknownError2 as isUnknownError,
|
|
78
|
+
isWorktreeError2 as isWorktreeError
|
|
79
|
+
};
|
package/dist/promise/rpc.js
CHANGED
|
@@ -1,86 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
return {
|
|
9
|
-
[Symbol.asyncIterator]() {
|
|
10
|
-
const controller = new AbortController();
|
|
11
|
-
const signal = options?.signal ? AbortSignal.any([controller.signal, options.signal]) : controller.signal;
|
|
12
|
-
const iterator = (async function* () {
|
|
13
|
-
try {
|
|
14
|
-
for await (const published of events.subscribe({ signal })) {
|
|
15
|
-
if (signal.aborted)
|
|
16
|
-
return;
|
|
17
|
-
if (published.type !== type)
|
|
18
|
-
continue;
|
|
19
|
-
// SAFETY: The exact RPC type was selected above; Promise contracts require no client-side transform.
|
|
20
|
-
// oxlint-disable-next-line typescript-eslint/no-unsafe-type-assertion
|
|
21
|
-
yield published;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
catch (error) {
|
|
25
|
-
if (!signal.aborted)
|
|
26
|
-
throw error;
|
|
27
|
-
}
|
|
28
|
-
finally {
|
|
29
|
-
controller.abort();
|
|
30
|
-
}
|
|
31
|
-
})();
|
|
32
|
-
return {
|
|
33
|
-
next: () => iterator.next(),
|
|
34
|
-
return: () => {
|
|
35
|
-
// Interrupt a pending source read before closing the generator.
|
|
36
|
-
controller.abort();
|
|
37
|
-
return iterator.return();
|
|
38
|
-
},
|
|
39
|
-
};
|
|
40
|
-
},
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
// SAFETY: Every runtime key comes from this definition's method and event maps, which define RpcClient's mapped keys.
|
|
44
|
-
// oxlint-disable-next-line typescript-eslint/no-unsafe-type-assertion
|
|
45
|
-
return Object.assign(Object.fromEntries(Object.keys(definition.methods).map((name) => [
|
|
46
|
-
name,
|
|
47
|
-
async (input, options) => {
|
|
48
|
-
try {
|
|
49
|
-
const result = await raw.rpc.call({
|
|
50
|
-
rpcID: definition.id,
|
|
51
|
-
method: name,
|
|
52
|
-
// SAFETY: The method schema defines the accepted input; this assertion bridges it to the generic JSON transport.
|
|
53
|
-
// oxlint-disable-next-line typescript-eslint/no-unsafe-type-assertion
|
|
54
|
-
input: input,
|
|
55
|
-
location: options?.location,
|
|
56
|
-
}, { signal: options?.signal, headers: options?.headers });
|
|
57
|
-
return result.output;
|
|
58
|
-
}
|
|
59
|
-
catch (error) {
|
|
60
|
-
if (!isRpcError(error) && !isRpcInternalError(error))
|
|
61
|
-
throw error;
|
|
62
|
-
throw error.data === undefined
|
|
63
|
-
? { type: error.type, message: error.message }
|
|
64
|
-
: { type: error.type, message: error.message, data: error.data };
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
])), {
|
|
68
|
-
events: {
|
|
69
|
-
subscribe,
|
|
70
|
-
on: (name, handler, options) => {
|
|
71
|
-
const controller = new AbortController();
|
|
72
|
-
const signal = options?.signal ? AbortSignal.any([controller.signal, options.signal]) : controller.signal;
|
|
73
|
-
const source = subscribe(name, { signal });
|
|
74
|
-
void (async () => {
|
|
75
|
-
for await (const event of source)
|
|
76
|
-
await handler(event);
|
|
77
|
-
})().catch((error) => console.error(error));
|
|
78
|
-
return () => controller.abort();
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
-
});
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
function eventType(definition, name) {
|
|
85
|
-
return `rpc.${definition.id}.${name}`;
|
|
86
|
-
}
|
|
1
|
+
import {
|
|
2
|
+
makeRpc2
|
|
3
|
+
} from "../chunks/pty-handoff-1tbj6z39.js";
|
|
4
|
+
import"../chunks/pty-handoff-4tveyqeh.js";
|
|
5
|
+
export {
|
|
6
|
+
makeRpc2 as makeRpc
|
|
7
|
+
};
|