@opencode/client 2.2.1 → 2.2.3
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/{mcp-yn2a71yh.js → contract-0e3ghr9a.js} +4 -2
- package/dist/chunks/{mcp-8ye1ye6f.js → contract-2ny4vxct.js} +2 -2
- package/dist/chunks/{mcp-15p82y03.js → contract-9j12j8xw.js} +5 -5
- package/dist/chunks/{mcp-0e9xp5b3.js → contract-bhbt909k.js} +9 -9
- package/dist/chunks/{mcp-csehnca4.js → contract-fh77hmr5.js} +76 -8
- package/dist/chunks/{mcp-qhd5h5hk.js → contract-gcmv0c13.js} +2 -2
- package/dist/chunks/{mcp-gecjxyvt.js → contract-gecjxyvt.js} +1 -1
- package/dist/chunks/{mcp-6v8v0sqq.js → contract-gmh1mc73.js} +4 -4
- package/dist/chunks/{mcp-4z60zgnr.js → contract-gxr0nf8c.js} +8 -6
- package/dist/chunks/{mcp-kdshn947.js → contract-kdshn947.js} +1 -1
- package/dist/chunks/contract-mwrzahmf.js +38 -0
- package/dist/chunks/{mcp-ryy6kscr.js → contract-ryy6kscr.js} +1 -1
- package/dist/chunks/{mcp-gne7h7mq.js → contract-v1h0xkyr.js} +42 -1
- package/dist/contract.js +1 -1
- package/dist/effect/api/api.d.ts +3 -1
- package/dist/effect/client.d.ts +88 -4
- package/dist/effect/client.js +8 -8
- package/dist/effect/generated/client-error.js +1 -1
- package/dist/effect/generated/client.d.ts +88 -4
- package/dist/effect/generated/client.js +5 -5
- package/dist/effect/generated/index.js +4 -4
- package/dist/effect/index.js +8 -8
- package/dist/effect/rpc.js +4 -4
- package/dist/effect/service.js +6 -6
- package/dist/promise/client.js +7 -7
- package/dist/promise/generated/client-error.js +1 -1
- package/dist/promise/generated/client.js +2 -2
- package/dist/promise/generated/index.js +8 -8
- package/dist/promise/generated/types.d.ts +62 -7
- package/dist/promise/generated/types.js +1 -1
- package/dist/promise/index.d.ts +1 -0
- package/dist/promise/index.js +17 -11
- package/dist/promise/media.d.ts +356 -0
- package/dist/promise/media.js +8 -0
- package/dist/promise/rpc.js +2 -2
- package/dist/promise/service.js +6 -6
- package/dist/pty-handoff.js +4 -4
- package/dist/rpc-runtime.js +1 -1
- package/dist/service-contender.js +1 -1
- package/dist/service-probe.js +3 -3
- package/dist/service-timing.js +1 -1
- package/dist/service-version.js +1 -1
- package/dist/service.js +1 -1
- package/dist/shared-events.js +1 -1
- package/dist/solid/connection.js +1 -1
- package/dist/solid/data.d.ts +2 -0
- package/dist/solid/data.js +10 -9
- package/dist/solid/index.js +20 -13
- package/dist/solid/pty.d.ts +66 -0
- package/dist/solid/pty.js +8 -2
- package/dist/solid/retention.js +1 -1
- package/dist/solid/usage.js +1 -1
- package/package.json +7 -7
- /package/dist/chunks/{mcp-60xe5cbf.js → contract-60xe5cbf.js} +0 -0
- /package/dist/chunks/{mcp-6mptkzbc.js → contract-6mptkzbc.js} +0 -0
- /package/dist/chunks/{mcp-6mq2wh8y.js → contract-6mq2wh8y.js} +0 -0
- /package/dist/chunks/{mcp-m2eywc8w.js → contract-6r38tsk5.js} +0 -0
- /package/dist/chunks/{mcp-8s2anffy.js → contract-8s2anffy.js} +0 -0
- /package/dist/chunks/{mcp-9rqn6x4v.js → contract-9rqn6x4v.js} +0 -0
- /package/dist/chunks/{mcp-cvg5j6d1.js → contract-cvg5j6d1.js} +0 -0
- /package/dist/chunks/{mcp-nwcpakzx.js → contract-nwcpakzx.js} +0 -0
- /package/dist/chunks/{mcp-qav6mfdz.js → contract-qav6mfdz.js} +0 -0
- /package/dist/chunks/{mcp-sxt88q69.js → contract-sxt88q69.js} +0 -0
- /package/dist/chunks/{mcp-ve4aws36.js → contract-ve4aws36.js} +0 -0
- /package/dist/chunks/{mcp-vyas3vgt.js → contract-vyas3vgt.js} +0 -0
- /package/dist/chunks/{mcp-xgnj2w4v.js → contract-xgnj2w4v.js} +0 -0
- /package/dist/chunks/{mcp-y2etg5bs.js → contract-y2etg5bs.js} +0 -0
- /package/dist/chunks/{mcp-ydhz1zrh.js → contract-ydhz1zrh.js} +0 -0
|
@@ -478,12 +478,23 @@ export type ScheduleWhenCron = {
|
|
|
478
478
|
cron: string;
|
|
479
479
|
tz?: string;
|
|
480
480
|
};
|
|
481
|
+
export type ScheduleConditionShell = {
|
|
482
|
+
type: "shell";
|
|
483
|
+
run: string;
|
|
484
|
+
is?: string;
|
|
485
|
+
matches?: string;
|
|
486
|
+
changes?: boolean;
|
|
487
|
+
};
|
|
488
|
+
export type ScheduleConditionCode = {
|
|
489
|
+
type: "code";
|
|
490
|
+
code: string;
|
|
491
|
+
};
|
|
481
492
|
export type ScheduleActionPrompt = {
|
|
482
493
|
type: "prompt";
|
|
483
494
|
prompt: string;
|
|
484
495
|
};
|
|
485
496
|
export type ScheduleStatus = "active" | "paused" | "done";
|
|
486
|
-
export type ScheduleOutcome = "fired" | "late" | "skipped" | "disabled" | "failed";
|
|
497
|
+
export type ScheduleOutcome = "fired" | "late" | "checked" | "expired" | "skipped" | "disabled" | "failed";
|
|
487
498
|
export type ReferenceGitSource = {
|
|
488
499
|
type: "git";
|
|
489
500
|
repository: string;
|
|
@@ -1217,6 +1228,7 @@ export type ScheduleWhenEvery = {
|
|
|
1217
1228
|
every: ScheduleDuration;
|
|
1218
1229
|
tz?: string;
|
|
1219
1230
|
};
|
|
1231
|
+
export type ScheduleCondition = ScheduleConditionShell | ScheduleConditionCode;
|
|
1220
1232
|
export type ScheduleAction = ScheduleActionPrompt;
|
|
1221
1233
|
export type VcsInfo = {
|
|
1222
1234
|
provider?: string;
|
|
@@ -3075,6 +3087,7 @@ export type SessionInfo = {
|
|
|
3075
3087
|
time: {
|
|
3076
3088
|
created: number;
|
|
3077
3089
|
updated: number;
|
|
3090
|
+
busy?: number;
|
|
3078
3091
|
idle?: number;
|
|
3079
3092
|
viewed?: number;
|
|
3080
3093
|
archived?: number;
|
|
@@ -3153,7 +3166,7 @@ export type ConfigEntry = {
|
|
|
3153
3166
|
timezone?: string;
|
|
3154
3167
|
permissions?: PermissionRuleset;
|
|
3155
3168
|
policies?: Array<{
|
|
3156
|
-
action: "provider.use" | "tool.use" | "integration.use";
|
|
3169
|
+
action: "provider.use" | "tool.use" | "integration.connect" | "integration.use" | "mcp.use" | "skill.use" | "plugin.use";
|
|
3157
3170
|
resource: string;
|
|
3158
3171
|
effect: "allow" | "deny";
|
|
3159
3172
|
}>;
|
|
@@ -3410,7 +3423,7 @@ export type ConfigEntry = {
|
|
|
3410
3423
|
subagent_depth?: number;
|
|
3411
3424
|
location_idle_timeout?: string | false;
|
|
3412
3425
|
policies?: Array<{
|
|
3413
|
-
action: "provider.use" | "tool.use" | "integration.use";
|
|
3426
|
+
action: "provider.use" | "tool.use" | "integration.connect" | "integration.use" | "mcp.use" | "skill.use" | "plugin.use";
|
|
3414
3427
|
resource: string;
|
|
3415
3428
|
effect: "allow" | "deny";
|
|
3416
3429
|
}>;
|
|
@@ -3499,13 +3512,15 @@ export type CredentialEntry = {
|
|
|
3499
3512
|
active: boolean;
|
|
3500
3513
|
value: CredentialValue;
|
|
3501
3514
|
};
|
|
3502
|
-
export type
|
|
3515
|
+
export type FormFields1 = [FormField1, ...Array<FormField1>];
|
|
3503
3516
|
export type ScheduleInfo = {
|
|
3504
3517
|
id: ScheduleID;
|
|
3505
3518
|
sessionID?: SessionID;
|
|
3506
3519
|
name?: string;
|
|
3507
3520
|
when: ScheduleWhen;
|
|
3508
3521
|
tz: string;
|
|
3522
|
+
if?: ScheduleCondition;
|
|
3523
|
+
until?: ScheduleCondition;
|
|
3509
3524
|
action: ScheduleAction;
|
|
3510
3525
|
status: ScheduleStatus;
|
|
3511
3526
|
nextDueAt?: number;
|
|
@@ -3514,6 +3529,7 @@ export type ScheduleInfo = {
|
|
|
3514
3529
|
runCount: number;
|
|
3515
3530
|
lastFiredAt?: number;
|
|
3516
3531
|
lastOutcome?: ScheduleOutcome;
|
|
3532
|
+
lastOutput?: string;
|
|
3517
3533
|
time: {
|
|
3518
3534
|
created: number;
|
|
3519
3535
|
updated: number;
|
|
@@ -3627,7 +3643,7 @@ export type FormInfo1 = {
|
|
|
3627
3643
|
sessionID: string;
|
|
3628
3644
|
title: string;
|
|
3629
3645
|
metadata?: FormMetadata1;
|
|
3630
|
-
fields:
|
|
3646
|
+
fields: FormFields1;
|
|
3631
3647
|
};
|
|
3632
3648
|
export type SessionMessageInfo = SessionMessageAgentSelected | SessionMessageModelSelected | SessionMessageLocationSwitched | SessionMessageUser | SessionMessageSynthetic | SessionMessageSystem | SessionMessageSkill | SessionMessageShell | SessionMessageAssistant | SessionMessageCompaction | SessionMessageIdle;
|
|
3633
3649
|
export type IntegrationMethod = IntegrationOAuthMethod | IntegrationCommandMethod | IntegrationKeyMethod | IntegrationExternalMethod | IntegrationEnvMethod;
|
|
@@ -4101,6 +4117,12 @@ export type SessionPromptInput = {
|
|
|
4101
4117
|
readonly text: string;
|
|
4102
4118
|
readonly files?: ReadonlyArray<{
|
|
4103
4119
|
readonly uri: string;
|
|
4120
|
+
readonly source?: {
|
|
4121
|
+
readonly type: "inline";
|
|
4122
|
+
} | {
|
|
4123
|
+
readonly type: "uri";
|
|
4124
|
+
readonly uri: string;
|
|
4125
|
+
};
|
|
4104
4126
|
readonly name?: string;
|
|
4105
4127
|
readonly description?: string;
|
|
4106
4128
|
readonly mention?: {
|
|
@@ -4140,6 +4162,12 @@ export type SessionCommandInput = {
|
|
|
4140
4162
|
readonly text: string;
|
|
4141
4163
|
readonly files?: ReadonlyArray<{
|
|
4142
4164
|
readonly uri: string;
|
|
4165
|
+
readonly source?: {
|
|
4166
|
+
readonly type: "inline";
|
|
4167
|
+
} | {
|
|
4168
|
+
readonly type: "uri";
|
|
4169
|
+
readonly uri: string;
|
|
4170
|
+
};
|
|
4143
4171
|
readonly name?: string;
|
|
4144
4172
|
readonly description?: string;
|
|
4145
4173
|
readonly mention?: {
|
|
@@ -4551,6 +4579,7 @@ export type ExperimentalSessionImportInput = {
|
|
|
4551
4579
|
readonly time: {
|
|
4552
4580
|
readonly created: number;
|
|
4553
4581
|
readonly updated: number;
|
|
4582
|
+
readonly busy?: number;
|
|
4554
4583
|
readonly idle?: number;
|
|
4555
4584
|
readonly viewed?: number;
|
|
4556
4585
|
readonly archived?: number;
|
|
@@ -5348,7 +5377,7 @@ export type ExperimentalMediaGetOutput = globalThis.Uint8Array;
|
|
|
5348
5377
|
export type ExperimentalScheduleCreateInput = {
|
|
5349
5378
|
readonly sessionID: string;
|
|
5350
5379
|
readonly name?: string | undefined;
|
|
5351
|
-
readonly when
|
|
5380
|
+
readonly when?: ({
|
|
5352
5381
|
readonly in: string;
|
|
5353
5382
|
readonly at?: never;
|
|
5354
5383
|
readonly every?: never;
|
|
@@ -5372,7 +5401,33 @@ export type ExperimentalScheduleCreateInput = {
|
|
|
5372
5401
|
readonly at?: never;
|
|
5373
5402
|
readonly every?: never;
|
|
5374
5403
|
readonly tz?: string;
|
|
5375
|
-
};
|
|
5404
|
+
}) | undefined;
|
|
5405
|
+
readonly if?: ({
|
|
5406
|
+
readonly run: string;
|
|
5407
|
+
readonly is?: string;
|
|
5408
|
+
readonly matches?: string;
|
|
5409
|
+
readonly changes?: boolean;
|
|
5410
|
+
readonly code?: never;
|
|
5411
|
+
} | {
|
|
5412
|
+
readonly code: string;
|
|
5413
|
+
readonly run?: never;
|
|
5414
|
+
readonly is?: never;
|
|
5415
|
+
readonly matches?: never;
|
|
5416
|
+
readonly changes?: never;
|
|
5417
|
+
}) | undefined;
|
|
5418
|
+
readonly until?: ({
|
|
5419
|
+
readonly run: string;
|
|
5420
|
+
readonly is?: string;
|
|
5421
|
+
readonly matches?: string;
|
|
5422
|
+
readonly changes?: boolean;
|
|
5423
|
+
readonly code?: never;
|
|
5424
|
+
} | {
|
|
5425
|
+
readonly code: string;
|
|
5426
|
+
readonly run?: never;
|
|
5427
|
+
readonly is?: never;
|
|
5428
|
+
readonly matches?: never;
|
|
5429
|
+
readonly changes?: never;
|
|
5430
|
+
}) | undefined;
|
|
5376
5431
|
readonly ends?: {
|
|
5377
5432
|
readonly after?: string;
|
|
5378
5433
|
readonly at?: string;
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
isShellNotFoundError2,
|
|
39
39
|
isWorktreeError2,
|
|
40
40
|
isVcsInitNotSupportedError2
|
|
41
|
-
} from "../../chunks/
|
|
41
|
+
} from "../../chunks/contract-cvg5j6d1.js";
|
|
42
42
|
export {
|
|
43
43
|
isAgentNotFoundError2 as isAgentNotFoundError,
|
|
44
44
|
isCommandExecutionError2 as isCommandExecutionError,
|
package/dist/promise/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { OpenCode } from "./client.js";
|
|
2
2
|
export * from "./generated/index.js";
|
|
3
3
|
export { OpenCode } from "./client.js";
|
|
4
|
+
export { mediaHashFromUri, withMediaRefs, type MediaRequestOptions } from "./media.js";
|
|
4
5
|
export type { AgentApi, CommandApi, ConfigApi, EventApi, IntegrationApi, ModelApi, PluginApi, ProviderApi, ReferenceApi, RpcApi, RpcCallOptions, RpcClient, RpcEventPayload, WebSearchApi, SessionApi, SkillApi, } from "./api.js";
|
|
5
6
|
export type { EventSubscribeOutput as OpenCodeEvent } from "./generated/types.js";
|
|
6
7
|
export type { MediaFileAttachment as PromptMediaFileAttachment, Attachment as PromptAttachment, } from "@opencode/schema/prompt";
|
package/dist/promise/index.js
CHANGED
|
@@ -1,9 +1,18 @@
|
|
|
1
|
-
import"../chunks/
|
|
1
|
+
import"../chunks/contract-6r38tsk5.js";
|
|
2
|
+
import {
|
|
3
|
+
mediaHashFromUri2,
|
|
4
|
+
withMediaRefs2
|
|
5
|
+
} from "../chunks/contract-mwrzahmf.js";
|
|
2
6
|
import {
|
|
3
7
|
exports_client3
|
|
4
|
-
} from "../chunks/
|
|
5
|
-
import"../chunks/
|
|
6
|
-
import"../chunks/
|
|
8
|
+
} from "../chunks/contract-gmh1mc73.js";
|
|
9
|
+
import"../chunks/contract-vyas3vgt.js";
|
|
10
|
+
import"../chunks/contract-0e3ghr9a.js";
|
|
11
|
+
import {
|
|
12
|
+
ClientError3
|
|
13
|
+
} from "../chunks/contract-nwcpakzx.js";
|
|
14
|
+
import"../chunks/contract-gecjxyvt.js";
|
|
15
|
+
import"../chunks/contract-kdshn947.js";
|
|
7
16
|
import {
|
|
8
17
|
isInvalidRequestError2,
|
|
9
18
|
isUnauthorizedError2,
|
|
@@ -44,12 +53,7 @@ import {
|
|
|
44
53
|
isShellNotFoundError2,
|
|
45
54
|
isWorktreeError2,
|
|
46
55
|
isVcsInitNotSupportedError2
|
|
47
|
-
} from "../chunks/
|
|
48
|
-
import"../chunks/mcp-yn2a71yh.js";
|
|
49
|
-
import {
|
|
50
|
-
ClientError3
|
|
51
|
-
} from "../chunks/mcp-nwcpakzx.js";
|
|
52
|
-
import"../chunks/mcp-gecjxyvt.js";
|
|
56
|
+
} from "../chunks/contract-cvg5j6d1.js";
|
|
53
57
|
export {
|
|
54
58
|
ClientError3 as ClientError,
|
|
55
59
|
exports_client3 as OpenCode,
|
|
@@ -91,5 +95,7 @@ export {
|
|
|
91
95
|
isUnknownError2 as isUnknownError,
|
|
92
96
|
isUnsupportedModelError2 as isUnsupportedModelError,
|
|
93
97
|
isVcsInitNotSupportedError2 as isVcsInitNotSupportedError,
|
|
94
|
-
isWorktreeError2 as isWorktreeError
|
|
98
|
+
isWorktreeError2 as isWorktreeError,
|
|
99
|
+
mediaHashFromUri2 as mediaHashFromUri,
|
|
100
|
+
withMediaRefs2 as withMediaRefs
|
|
95
101
|
};
|