@opencode/client 2.0.31 → 2.1.0
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/{contract-2ny4vxct.js → rpc-runtime-2ny4vxct.js} +2 -2
- package/dist/chunks/{contract-csw6v8a4.js → rpc-runtime-3d7b8k62.js} +4 -4
- package/dist/chunks/{contract-m77rqa4a.js → rpc-runtime-61wt4y9h.js} +22 -17
- package/dist/chunks/{contract-1y4a697q.js → rpc-runtime-6vp15eh6.js} +1 -1
- package/dist/chunks/{contract-j4tgja9b.js → rpc-runtime-91bd4p6h.js} +1 -1
- package/dist/chunks/{contract-vt9jbch8.js → rpc-runtime-ezt8t3fk.js} +2 -1
- package/dist/chunks/{contract-frbwqjmf.js → rpc-runtime-frbwqjmf.js} +1 -1
- package/dist/chunks/{contract-qfk0hgz0.js → rpc-runtime-nv358xrg.js} +27 -3
- package/dist/chunks/{contract-9swsjjg0.js → rpc-runtime-q4y9w4td.js} +24 -5
- package/dist/chunks/{contract-t1xa31vm.js → rpc-runtime-t1xa31vm.js} +1 -1
- package/dist/chunks/{contract-4yh01835.js → rpc-runtime-tjkwftgd.js} +5 -5
- package/dist/chunks/{contract-w1w809zr.js → rpc-runtime-w1w809zr.js} +2 -2
- package/dist/contract.js +1 -1
- package/dist/effect/api/api.d.ts +91 -29
- package/dist/effect/client.d.ts +1389 -1361
- package/dist/effect/client.js +8 -8
- package/dist/effect/generated/client-error.js +1 -1
- package/dist/effect/generated/client.d.ts +1279 -1251
- package/dist/effect/generated/client.js +3 -3
- package/dist/effect/generated/index.js +4 -4
- package/dist/effect/index.js +8 -8
- package/dist/effect/rpc.js +2 -2
- package/dist/effect/service.js +6 -6
- package/dist/promise/client.d.ts +13 -7
- package/dist/promise/client.js +7 -7
- package/dist/promise/generated/client-error.js +1 -1
- package/dist/promise/generated/client.d.ts +8 -2
- package/dist/promise/generated/client.js +2 -2
- package/dist/promise/generated/index.js +6 -4
- package/dist/promise/generated/types.d.ts +286 -1429
- package/dist/promise/generated/types.js +3 -1
- package/dist/promise/index.js +10 -8
- package/dist/promise/rpc.js +2 -2
- package/dist/promise/service.js +6 -6
- package/dist/pty-handoff.js +1 -1
- package/dist/rpc-runtime.d.ts +5 -5
- package/dist/rpc-runtime.js +1 -1
- package/dist/service-contender.js +1 -1
- package/dist/service-probe.d.ts +5 -5
- 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.js +9 -9
- package/dist/solid/index.js +12 -12
- package/dist/solid/pty.js +1 -1
- package/dist/solid/usage.js +1 -1
- package/package.json +6 -6
- /package/dist/chunks/{contract-6mptkzbc.js → rpc-runtime-6mptkzbc.js} +0 -0
- /package/dist/chunks/{contract-7f0py9js.js → rpc-runtime-7f0py9js.js} +0 -0
- /package/dist/chunks/{contract-8s2anffy.js → rpc-runtime-8s2anffy.js} +0 -0
- /package/dist/chunks/{contract-9rqn6x4v.js → rpc-runtime-9rqn6x4v.js} +0 -0
- /package/dist/chunks/{contract-gne7h7mq.js → rpc-runtime-gne7h7mq.js} +0 -0
- /package/dist/chunks/{contract-js54wxgp.js → rpc-runtime-js54wxgp.js} +0 -0
- /package/dist/chunks/{contract-m2eywc8w.js → rpc-runtime-m2eywc8w.js} +0 -0
- /package/dist/chunks/{contract-qav6mfdz.js → rpc-runtime-qav6mfdz.js} +0 -0
- /package/dist/chunks/{contract-sxt88q69.js → rpc-runtime-sxt88q69.js} +0 -0
- /package/dist/chunks/{contract-ve4aws36.js → rpc-runtime-ve4aws36.js} +0 -0
- /package/dist/chunks/{contract-vmytr4q8.js → rpc-runtime-vmytr4q8.js} +0 -0
- /package/dist/chunks/{contract-vyas3vgt.js → rpc-runtime-vyas3vgt.js} +0 -0
- /package/dist/chunks/{contract-xgnj2w4v.js → rpc-runtime-xgnj2w4v.js} +0 -0
- /package/dist/chunks/{contract-ydhz1zrh.js → rpc-runtime-ydhz1zrh.js} +0 -0
package/dist/effect/api/api.d.ts
CHANGED
|
@@ -6,7 +6,6 @@ import type { Session } from "@opencode/schema/session";
|
|
|
6
6
|
import type { AbsolutePath } from "@opencode/schema/schema";
|
|
7
7
|
import type { Project } from "@opencode/schema/project";
|
|
8
8
|
import type { RelativePath } from "@opencode/schema/schema";
|
|
9
|
-
import type { SessionsCursor } from "@opencode/protocol/groups/session";
|
|
10
9
|
import type { Money } from "@opencode/schema/money";
|
|
11
10
|
import type { Model } from "@opencode/schema/model";
|
|
12
11
|
import type { DateTime } from "effect";
|
|
@@ -25,8 +24,8 @@ import type { Workspace } from "@opencode/schema/workspace";
|
|
|
25
24
|
import type { Instruction } from "@opencode/schema/instruction";
|
|
26
25
|
import type { Snapshot } from "@opencode/schema/snapshot";
|
|
27
26
|
import type { Shell } from "@opencode/schema/shell";
|
|
28
|
-
import type { Provider } from "@opencode/schema/provider";
|
|
29
27
|
import type { Form } from "@opencode/schema/form";
|
|
28
|
+
import type { Provider } from "@opencode/schema/provider";
|
|
30
29
|
import type { Integration } from "@opencode/schema/integration";
|
|
31
30
|
import type { Mcp } from "@opencode/schema/mcp";
|
|
32
31
|
import type { Credential } from "@opencode/schema/credential";
|
|
@@ -147,16 +146,17 @@ export type SessionListInput = {
|
|
|
147
146
|
readonly order?: "asc" | "desc" | undefined;
|
|
148
147
|
readonly search?: string | undefined;
|
|
149
148
|
readonly parentID?: Session.ID | null | undefined;
|
|
149
|
+
readonly archived?: boolean | undefined;
|
|
150
150
|
readonly directory?: AbsolutePath | undefined;
|
|
151
151
|
readonly project?: Project.ID | undefined;
|
|
152
152
|
readonly subpath?: RelativePath | undefined;
|
|
153
|
-
readonly cursor?:
|
|
153
|
+
readonly cursor?: Session.ListCursor | undefined;
|
|
154
154
|
};
|
|
155
155
|
export type SessionListOutput = {
|
|
156
156
|
readonly data: ReadonlyArray<Session.Info>;
|
|
157
157
|
readonly cursor: {
|
|
158
|
-
readonly previous?:
|
|
159
|
-
readonly next?:
|
|
158
|
+
readonly previous?: Session.ListCursor | undefined;
|
|
159
|
+
readonly next?: Session.ListCursor | undefined;
|
|
160
160
|
};
|
|
161
161
|
};
|
|
162
162
|
export type SessionListOperation<E = never> = (input?: SessionListInput) => Effect.Effect<SessionListOutput, E>;
|
|
@@ -302,6 +302,7 @@ export type SessionUpdateInput = {
|
|
|
302
302
|
readonly title?: string | undefined;
|
|
303
303
|
readonly metadata?: Session.Metadata | undefined;
|
|
304
304
|
readonly permissions?: Permission.Ruleset | undefined;
|
|
305
|
+
readonly archived?: boolean | undefined;
|
|
305
306
|
};
|
|
306
307
|
export type SessionUpdateOutput = void;
|
|
307
308
|
export type SessionUpdateOperation<E = never> = (input: SessionUpdateInput) => Effect.Effect<SessionUpdateOutput, E>;
|
|
@@ -636,6 +637,44 @@ export type SessionLogOutput = ({
|
|
|
636
637
|
readonly sessionID: Session.ID;
|
|
637
638
|
readonly idle: number;
|
|
638
639
|
};
|
|
640
|
+
} | {
|
|
641
|
+
readonly id: Event.ID;
|
|
642
|
+
readonly created: number;
|
|
643
|
+
readonly metadata?: {
|
|
644
|
+
readonly [x: string]: unknown;
|
|
645
|
+
} | undefined;
|
|
646
|
+
readonly type: "session.archived";
|
|
647
|
+
readonly durable: {
|
|
648
|
+
readonly aggregateID: string;
|
|
649
|
+
readonly seq: Event.Seq;
|
|
650
|
+
readonly version: Event.Version;
|
|
651
|
+
};
|
|
652
|
+
readonly location?: {
|
|
653
|
+
readonly directory: AbsolutePath;
|
|
654
|
+
readonly workspaceID?: Workspace.ID | undefined;
|
|
655
|
+
} | undefined;
|
|
656
|
+
readonly data: {
|
|
657
|
+
readonly sessionID: Session.ID;
|
|
658
|
+
};
|
|
659
|
+
} | {
|
|
660
|
+
readonly id: Event.ID;
|
|
661
|
+
readonly created: number;
|
|
662
|
+
readonly metadata?: {
|
|
663
|
+
readonly [x: string]: unknown;
|
|
664
|
+
} | undefined;
|
|
665
|
+
readonly type: "session.unarchived";
|
|
666
|
+
readonly durable: {
|
|
667
|
+
readonly aggregateID: string;
|
|
668
|
+
readonly seq: Event.Seq;
|
|
669
|
+
readonly version: Event.Version;
|
|
670
|
+
};
|
|
671
|
+
readonly location?: {
|
|
672
|
+
readonly directory: AbsolutePath;
|
|
673
|
+
readonly workspaceID?: Workspace.ID | undefined;
|
|
674
|
+
} | undefined;
|
|
675
|
+
readonly data: {
|
|
676
|
+
readonly sessionID: Session.ID;
|
|
677
|
+
};
|
|
639
678
|
} | {
|
|
640
679
|
readonly id: Event.ID;
|
|
641
680
|
readonly created: number;
|
|
@@ -1027,7 +1066,7 @@ export type SessionLogOutput = ({
|
|
|
1027
1066
|
readonly assistantMessageID: SessionMessage.ID;
|
|
1028
1067
|
readonly finish: "stop" | "length" | "tool-calls" | "content-filter" | "error" | "unknown";
|
|
1029
1068
|
readonly rawFinish?: string | undefined;
|
|
1030
|
-
readonly
|
|
1069
|
+
readonly native?: SessionMessage.Native | undefined;
|
|
1031
1070
|
readonly cost: Money.USD;
|
|
1032
1071
|
readonly tokens: {
|
|
1033
1072
|
readonly input: number;
|
|
@@ -1070,7 +1109,7 @@ export type SessionLogOutput = ({
|
|
|
1070
1109
|
};
|
|
1071
1110
|
readonly finish?: "content-filter" | undefined;
|
|
1072
1111
|
readonly rawFinish?: string | undefined;
|
|
1073
|
-
readonly
|
|
1112
|
+
readonly native?: SessionMessage.Native | undefined;
|
|
1074
1113
|
readonly cost?: Money.USD | undefined;
|
|
1075
1114
|
readonly tokens?: {
|
|
1076
1115
|
readonly input: number;
|
|
@@ -1126,7 +1165,7 @@ export type SessionLogOutput = ({
|
|
|
1126
1165
|
readonly assistantMessageID: SessionMessage.ID;
|
|
1127
1166
|
readonly ordinal: number;
|
|
1128
1167
|
readonly text: string;
|
|
1129
|
-
readonly
|
|
1168
|
+
readonly native?: SessionMessage.Native | undefined;
|
|
1130
1169
|
};
|
|
1131
1170
|
} | {
|
|
1132
1171
|
readonly id: Event.ID;
|
|
@@ -1148,7 +1187,7 @@ export type SessionLogOutput = ({
|
|
|
1148
1187
|
readonly sessionID: Session.ID;
|
|
1149
1188
|
readonly assistantMessageID: SessionMessage.ID;
|
|
1150
1189
|
readonly ordinal: number;
|
|
1151
|
-
readonly
|
|
1190
|
+
readonly native?: SessionMessage.Native | undefined;
|
|
1152
1191
|
};
|
|
1153
1192
|
} | {
|
|
1154
1193
|
readonly id: Event.ID;
|
|
@@ -1171,7 +1210,7 @@ export type SessionLogOutput = ({
|
|
|
1171
1210
|
readonly assistantMessageID: SessionMessage.ID;
|
|
1172
1211
|
readonly ordinal: number;
|
|
1173
1212
|
readonly text: string;
|
|
1174
|
-
readonly
|
|
1213
|
+
readonly native?: SessionMessage.Native | undefined;
|
|
1175
1214
|
};
|
|
1176
1215
|
} | {
|
|
1177
1216
|
readonly id: Event.ID;
|
|
@@ -1241,7 +1280,7 @@ export type SessionLogOutput = ({
|
|
|
1241
1280
|
readonly [x: string]: unknown;
|
|
1242
1281
|
};
|
|
1243
1282
|
readonly executed: boolean;
|
|
1244
|
-
readonly
|
|
1283
|
+
readonly native?: SessionMessage.Native | undefined;
|
|
1245
1284
|
};
|
|
1246
1285
|
} | {
|
|
1247
1286
|
readonly id: Event.ID;
|
|
@@ -1287,7 +1326,7 @@ export type SessionLogOutput = ({
|
|
|
1287
1326
|
readonly [x: string]: Schema.Json;
|
|
1288
1327
|
} | undefined;
|
|
1289
1328
|
readonly executed: boolean;
|
|
1290
|
-
readonly
|
|
1329
|
+
readonly native?: SessionMessage.Native | undefined;
|
|
1291
1330
|
};
|
|
1292
1331
|
} | {
|
|
1293
1332
|
readonly id: Event.ID;
|
|
@@ -1341,7 +1380,7 @@ export type SessionLogOutput = ({
|
|
|
1341
1380
|
readonly [x: string]: Schema.Json;
|
|
1342
1381
|
} | undefined;
|
|
1343
1382
|
readonly executed: boolean;
|
|
1344
|
-
readonly
|
|
1383
|
+
readonly native?: SessionMessage.Native | undefined;
|
|
1345
1384
|
};
|
|
1346
1385
|
} | {
|
|
1347
1386
|
readonly id: Event.ID;
|
|
@@ -1392,7 +1431,6 @@ export type SessionLogOutput = ({
|
|
|
1392
1431
|
readonly data: {
|
|
1393
1432
|
readonly sessionID: Session.ID;
|
|
1394
1433
|
readonly reason: "auto" | "manual";
|
|
1395
|
-
readonly recent: string;
|
|
1396
1434
|
readonly inputID?: SessionMessage.ID | undefined;
|
|
1397
1435
|
};
|
|
1398
1436
|
} | {
|
|
@@ -1415,21 +1453,8 @@ export type SessionLogOutput = ({
|
|
|
1415
1453
|
readonly sessionID: Session.ID;
|
|
1416
1454
|
readonly reason: "auto" | "manual";
|
|
1417
1455
|
readonly model?: Model.Ref | undefined;
|
|
1418
|
-
readonly
|
|
1419
|
-
readonly providerContext?: {
|
|
1420
|
-
readonly version: 1;
|
|
1421
|
-
readonly provenance: {
|
|
1422
|
-
readonly providerID: Provider.ID;
|
|
1423
|
-
readonly provider: string;
|
|
1424
|
-
readonly modelID: string;
|
|
1425
|
-
readonly route: string;
|
|
1426
|
-
readonly protocol: string;
|
|
1427
|
-
readonly endpoint: string;
|
|
1428
|
-
};
|
|
1429
|
-
readonly messages: Schema.Json;
|
|
1430
|
-
} | undefined;
|
|
1456
|
+
readonly native?: SessionMessage.Native | undefined;
|
|
1431
1457
|
readonly text: string;
|
|
1432
|
-
readonly recent: string;
|
|
1433
1458
|
readonly cost?: Money.USD | undefined;
|
|
1434
1459
|
readonly tokens?: {
|
|
1435
1460
|
readonly input: number;
|
|
@@ -1721,7 +1746,7 @@ export type MessageListInput = {
|
|
|
1721
1746
|
readonly limit?: number | undefined;
|
|
1722
1747
|
readonly order?: "asc" | "desc" | undefined;
|
|
1723
1748
|
readonly cursor?: string | undefined;
|
|
1724
|
-
readonly type?: "agent-switched" | "model-switched" | "location-switched" | "user" | "synthetic" | "system" | "skill" | "shell" | "assistant" | "compaction" | undefined;
|
|
1749
|
+
readonly type?: "agent-switched" | "model-switched" | "location-switched" | "user" | "synthetic" | "system" | "skill" | "shell" | "assistant" | "compaction" | "idle" | undefined;
|
|
1725
1750
|
};
|
|
1726
1751
|
export type MessageListOutput = {
|
|
1727
1752
|
readonly data: ReadonlyArray<SessionMessage.Info>;
|
|
@@ -1769,6 +1794,34 @@ export type GenerateTextOperation<E = never> = (input: GenerateTextInput) => Eff
|
|
|
1769
1794
|
export interface GenerateApi<E = never> {
|
|
1770
1795
|
readonly text: GenerateTextOperation<E>;
|
|
1771
1796
|
}
|
|
1797
|
+
export type VoiceSessionInput = {
|
|
1798
|
+
readonly model: string;
|
|
1799
|
+
readonly session?: {
|
|
1800
|
+
readonly [x: string]: unknown;
|
|
1801
|
+
} | undefined;
|
|
1802
|
+
readonly transport: {
|
|
1803
|
+
readonly type: "webrtc";
|
|
1804
|
+
readonly sdp: string;
|
|
1805
|
+
readonly dcid?: number | undefined;
|
|
1806
|
+
} | {
|
|
1807
|
+
readonly type: "websocket";
|
|
1808
|
+
};
|
|
1809
|
+
};
|
|
1810
|
+
export type VoiceSessionOutput = {
|
|
1811
|
+
readonly transport: {
|
|
1812
|
+
readonly type: "webrtc";
|
|
1813
|
+
readonly sdp: string;
|
|
1814
|
+
} | {
|
|
1815
|
+
readonly type: "websocket";
|
|
1816
|
+
readonly url: string;
|
|
1817
|
+
readonly token: string;
|
|
1818
|
+
readonly expiresAt: number;
|
|
1819
|
+
};
|
|
1820
|
+
};
|
|
1821
|
+
export type VoiceSessionOperation<E = never> = (input: VoiceSessionInput) => Effect.Effect<VoiceSessionOutput, E>;
|
|
1822
|
+
export interface VoiceApi<E = never> {
|
|
1823
|
+
readonly session: VoiceSessionOperation<E>;
|
|
1824
|
+
}
|
|
1772
1825
|
export type ProviderListInput = {
|
|
1773
1826
|
readonly location?: {
|
|
1774
1827
|
readonly directory?: string | undefined;
|
|
@@ -2089,6 +2142,13 @@ export type PermissionSavedListInput = {
|
|
|
2089
2142
|
};
|
|
2090
2143
|
export type PermissionSavedListOutput = ReadonlyArray<PermissionSaved.Info>;
|
|
2091
2144
|
export type PermissionSavedListOperation<E = never> = (input?: PermissionSavedListInput) => Effect.Effect<PermissionSavedListOutput, E>;
|
|
2145
|
+
export type PermissionSavedUpdateInput = {
|
|
2146
|
+
readonly id: PermissionSaved.ID;
|
|
2147
|
+
readonly action?: string | undefined;
|
|
2148
|
+
readonly resource?: string | undefined;
|
|
2149
|
+
};
|
|
2150
|
+
export type PermissionSavedUpdateOutput = PermissionSaved.Info;
|
|
2151
|
+
export type PermissionSavedUpdateOperation<E = never> = (input: PermissionSavedUpdateInput) => Effect.Effect<PermissionSavedUpdateOutput, E>;
|
|
2092
2152
|
export type PermissionSavedRemoveInput = {
|
|
2093
2153
|
readonly id: PermissionSaved.ID;
|
|
2094
2154
|
};
|
|
@@ -2136,6 +2196,7 @@ export interface PermissionApi<E = never> {
|
|
|
2136
2196
|
};
|
|
2137
2197
|
readonly saved: {
|
|
2138
2198
|
readonly list: PermissionSavedListOperation<E>;
|
|
2199
|
+
readonly update: PermissionSavedUpdateOperation<E>;
|
|
2139
2200
|
readonly remove: PermissionSavedRemoveOperation<E>;
|
|
2140
2201
|
};
|
|
2141
2202
|
readonly create: PermissionCreateOperation<E>;
|
|
@@ -2781,6 +2842,7 @@ export interface AppApi<E = never> {
|
|
|
2781
2842
|
readonly message: MessageApi<E>;
|
|
2782
2843
|
readonly model: ModelApi<E>;
|
|
2783
2844
|
readonly generate: GenerateApi<E>;
|
|
2845
|
+
readonly voice: VoiceApi<E>;
|
|
2784
2846
|
readonly provider: ProviderApi<E>;
|
|
2785
2847
|
readonly integration: IntegrationApi<E>;
|
|
2786
2848
|
readonly mcp: McpApi<E>;
|