@opencode-ai/protocol 0.0.0-next-17364 → 0.0.0-next-17366

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.
@@ -0,0 +1,444 @@
1
+ import { Effect, Schema } from "effect";
2
+ import { Rpc, RpcGroup } from "effect/unstable/rpc";
3
+ const JsonRpcID = Schema.Union([Schema.String, Schema.Number, Schema.Null]);
4
+ const decodeJson = Schema.decodeUnknownSync(Schema.Json);
5
+ export var JsonRpc;
6
+ (function (JsonRpc) {
7
+ JsonRpc.RequestFields = {
8
+ jsonrpc: Schema.Literal("2.0"),
9
+ id: Schema.optional(JsonRpcID),
10
+ };
11
+ JsonRpc.Request = Schema.Struct({
12
+ ...JsonRpc.RequestFields,
13
+ method: Schema.String,
14
+ params: Schema.optional(Schema.Json),
15
+ });
16
+ JsonRpc.ErrorObject = Schema.Struct({
17
+ code: Schema.Number,
18
+ message: Schema.String,
19
+ data: Schema.optional(Schema.Json),
20
+ });
21
+ JsonRpc.Response = Schema.Struct({
22
+ jsonrpc: Schema.Literal("2.0"),
23
+ id: JsonRpcID,
24
+ result: Schema.optional(Schema.Json),
25
+ error: Schema.optional(JsonRpc.ErrorObject),
26
+ });
27
+ JsonRpc.decodeRequest = Schema.decodeUnknownSync(JsonRpc.Request);
28
+ function success(id, result) {
29
+ if (id === undefined)
30
+ return undefined;
31
+ return { jsonrpc: "2.0", id, result: decodeJson(result) };
32
+ }
33
+ JsonRpc.success = success;
34
+ function failure(id, error) {
35
+ return {
36
+ jsonrpc: "2.0",
37
+ id: id ?? null,
38
+ error: {
39
+ code: -32000,
40
+ message: error instanceof Error ? error.message : String(error),
41
+ },
42
+ };
43
+ }
44
+ JsonRpc.failure = failure;
45
+ })(JsonRpc || (JsonRpc = {}));
46
+ export var Handshake;
47
+ (function (Handshake) {
48
+ Handshake.ProtocolVersion = Schema.Literal(1);
49
+ Handshake.Capability = Schema.NonEmptyString;
50
+ Handshake.EndpointRole = Schema.Literals(["ui", "backend"]);
51
+ Handshake.Identity = Schema.Struct({
52
+ name: Schema.NonEmptyString,
53
+ version: Schema.NonEmptyString,
54
+ });
55
+ Handshake.Params = Schema.Struct({
56
+ client: Handshake.Identity,
57
+ expectedRole: Handshake.EndpointRole,
58
+ offeredVersions: Schema.Array(Schema.Int.check(Schema.isGreaterThan(0))).check(Schema.isMinLength(1), Schema.isUnique()),
59
+ requiredCapabilities: Schema.Array(Handshake.Capability).check(Schema.isUnique()),
60
+ optionalCapabilities: Schema.Array(Handshake.Capability).check(Schema.isUnique()),
61
+ });
62
+ Handshake.Response = Schema.Struct({
63
+ protocolVersion: Handshake.ProtocolVersion,
64
+ role: Handshake.EndpointRole,
65
+ server: Handshake.Identity,
66
+ capabilities: Schema.Array(Handshake.Capability),
67
+ });
68
+ Handshake.Request = Schema.Struct({
69
+ ...JsonRpc.RequestFields,
70
+ method: Schema.Literal("simulation.handshake"),
71
+ params: Handshake.Params,
72
+ });
73
+ class RoleMismatchError extends Schema.TaggedErrorClass()("SimulationHandshake.RoleMismatchError", {
74
+ expected: Handshake.EndpointRole,
75
+ actual: Handshake.EndpointRole,
76
+ message: Schema.String,
77
+ }) {
78
+ }
79
+ Handshake.RoleMismatchError = RoleMismatchError;
80
+ class UnsupportedProtocolError extends Schema.TaggedErrorClass()("SimulationHandshake.UnsupportedProtocolError", {
81
+ offered: Schema.Array(Schema.Number),
82
+ supported: Schema.Array(Handshake.ProtocolVersion),
83
+ message: Schema.String,
84
+ }) {
85
+ }
86
+ Handshake.UnsupportedProtocolError = UnsupportedProtocolError;
87
+ class MissingCapabilityError extends Schema.TaggedErrorClass()("SimulationHandshake.MissingCapabilityError", {
88
+ missing: Schema.Array(Handshake.Capability),
89
+ message: Schema.String,
90
+ }) {
91
+ }
92
+ Handshake.MissingCapabilityError = MissingCapabilityError;
93
+ function dispatch(action, params) {
94
+ return Effect.gen(function* () {
95
+ if (params.expectedRole !== action.role) {
96
+ return yield* Effect.fail(new RoleMismatchError({
97
+ expected: params.expectedRole,
98
+ actual: action.role,
99
+ message: `Expected simulation endpoint role ${params.expectedRole}, received ${action.role}`,
100
+ }));
101
+ }
102
+ if (!params.offeredVersions.includes(1)) {
103
+ return yield* Effect.fail(new UnsupportedProtocolError({
104
+ offered: params.offeredVersions,
105
+ supported: [1],
106
+ message: "No mutually supported simulation protocol version",
107
+ }));
108
+ }
109
+ const installed = new Set(action.capabilities);
110
+ const missing = params.requiredCapabilities.filter((capability) => !installed.has(capability));
111
+ if (missing.length > 0) {
112
+ return yield* Effect.fail(new MissingCapabilityError({
113
+ missing,
114
+ message: `Simulation endpoint is missing required capabilities: ${missing.join(", ")}`,
115
+ }));
116
+ }
117
+ return {
118
+ protocolVersion: 1,
119
+ role: action.role,
120
+ server: action.server,
121
+ capabilities: Array.from(installed),
122
+ };
123
+ });
124
+ }
125
+ Handshake.dispatch = dispatch;
126
+ })(Handshake || (Handshake = {}));
127
+ export var Frontend;
128
+ (function (Frontend) {
129
+ Frontend.Capabilities = [
130
+ "ui.type",
131
+ "ui.press",
132
+ "ui.enter",
133
+ "ui.arrow",
134
+ "ui.focus",
135
+ "ui.click",
136
+ "ui.click.semantic",
137
+ "ui.resize",
138
+ "ui.matches",
139
+ "ui.screenshot",
140
+ "ui.state",
141
+ "ui.snapshot",
142
+ "ui.capture",
143
+ "ui.recording.finish",
144
+ ];
145
+ Frontend.KeyModifiers = Schema.Struct({
146
+ ctrl: Schema.optional(Schema.Boolean),
147
+ shift: Schema.optional(Schema.Boolean),
148
+ meta: Schema.optional(Schema.Boolean),
149
+ super: Schema.optional(Schema.Boolean),
150
+ hyper: Schema.optional(Schema.Boolean),
151
+ });
152
+ Frontend.SemanticClickTarget = Schema.Struct({
153
+ id: Schema.NonEmptyString,
154
+ instance: Schema.optionalKey(Schema.NonEmptyString),
155
+ element: Schema.Number.check(Schema.isInt(), Schema.isGreaterThan(0)),
156
+ });
157
+ Frontend.Action = Schema.Union([
158
+ Schema.Struct({ type: Schema.Literal("ui.type"), text: Schema.String }),
159
+ Schema.Struct({ type: Schema.Literal("ui.press"), key: Schema.String, modifiers: Schema.optional(Frontend.KeyModifiers) }),
160
+ Schema.Struct({ type: Schema.Literal("ui.enter") }),
161
+ Schema.Struct({ type: Schema.Literal("ui.arrow"), direction: Schema.Literals(["up", "down", "left", "right"]) }),
162
+ Schema.Struct({ type: Schema.Literal("ui.focus"), target: Schema.Number }),
163
+ Schema.Struct({
164
+ type: Schema.Literal("ui.click"),
165
+ target: Schema.Number,
166
+ x: Schema.Number,
167
+ y: Schema.Number,
168
+ semantic: Schema.optionalKey(Frontend.SemanticClickTarget),
169
+ }),
170
+ Schema.Struct({ type: Schema.Literal("ui.resize"), cols: Schema.Number, rows: Schema.Number }),
171
+ ]);
172
+ Frontend.Element = Schema.Struct({
173
+ id: Schema.String,
174
+ num: Schema.Number,
175
+ x: Schema.Number,
176
+ y: Schema.Number,
177
+ width: Schema.Number,
178
+ height: Schema.Number,
179
+ focusable: Schema.Boolean,
180
+ focused: Schema.Boolean,
181
+ clickable: Schema.Boolean,
182
+ editor: Schema.Boolean,
183
+ });
184
+ Frontend.State = Schema.Struct({
185
+ focused: Schema.Struct({
186
+ renderable: Schema.optional(Schema.Number),
187
+ editor: Schema.Boolean,
188
+ }),
189
+ elements: Schema.Array(Frontend.Element),
190
+ });
191
+ Frontend.SemanticNode = Schema.Struct({
192
+ id: Schema.NonEmptyString,
193
+ instance: Schema.optionalKey(Schema.NonEmptyString),
194
+ parent: Schema.optionalKey(Schema.NonEmptyString),
195
+ role: Schema.NonEmptyString,
196
+ label: Schema.optionalKey(Schema.NonEmptyString),
197
+ element: Schema.Number.check(Schema.isInt(), Schema.isGreaterThan(0)),
198
+ focused: Schema.optionalKey(Schema.Boolean),
199
+ selected: Schema.optionalKey(Schema.Boolean),
200
+ expanded: Schema.optionalKey(Schema.Boolean),
201
+ disabled: Schema.optionalKey(Schema.Boolean),
202
+ });
203
+ Frontend.SemanticSnapshot = Schema.Struct({
204
+ format: Schema.Literal("opencode-ui-snapshot-v1"),
205
+ nodes: Schema.Array(Frontend.SemanticNode).check(Schema.makeFilter((nodes) => {
206
+ const ids = new Set(nodes.map((node) => node.id));
207
+ if (ids.size !== nodes.length)
208
+ return "semantic node ids must be unique";
209
+ if (new Set(nodes.map((node) => node.element)).size !== nodes.length)
210
+ return "semantic node elements must be unique";
211
+ if (nodes.some((node) => node.parent !== undefined && !ids.has(node.parent)))
212
+ return "semantic node parents must reference another node";
213
+ const parents = new Map(nodes.map((node) => [node.id, node.parent]));
214
+ for (const node of nodes) {
215
+ const visited = new Set();
216
+ let current = node.id;
217
+ while (current !== undefined) {
218
+ if (visited.has(current))
219
+ return "semantic node hierarchy must be acyclic";
220
+ visited.add(current);
221
+ current = parents.get(current);
222
+ }
223
+ }
224
+ return undefined;
225
+ })),
226
+ });
227
+ Frontend.Screenshot = Schema.String;
228
+ Frontend.Color = Schema.Tuple([Schema.Number, Schema.Number, Schema.Number, Schema.Number]);
229
+ Frontend.CapturedFrame = Schema.Struct({
230
+ cols: Schema.Number,
231
+ rows: Schema.Number,
232
+ cursor: Schema.Tuple([Schema.Number, Schema.Number]),
233
+ lines: Schema.Array(Schema.Struct({
234
+ spans: Schema.Array(Schema.Struct({
235
+ text: Schema.String,
236
+ fg: Frontend.Color,
237
+ bg: Frontend.Color,
238
+ attributes: Schema.Number,
239
+ width: Schema.Number,
240
+ })),
241
+ })),
242
+ });
243
+ Frontend.RecordingFinish = Schema.String;
244
+ Frontend.Matches = Schema.Boolean;
245
+ Frontend.ScreenshotParams = Schema.Struct({ name: Schema.optional(Schema.String) });
246
+ Frontend.TypeParams = Schema.Struct({ text: Schema.String });
247
+ Frontend.MatchesParams = Schema.Struct({ text: Schema.String });
248
+ Frontend.PressParams = Schema.Struct({ key: Schema.String, modifiers: Schema.optional(Frontend.KeyModifiers) });
249
+ Frontend.pressParams = (key, modifiers) => ({
250
+ key,
251
+ ...(modifiers === undefined ? {} : { modifiers }),
252
+ });
253
+ Frontend.ArrowParams = Schema.Struct({ direction: Schema.Literals(["up", "down", "left", "right"]) });
254
+ Frontend.FocusParams = Schema.Struct({ target: Schema.Number });
255
+ Frontend.ClickParams = Schema.Struct({
256
+ target: Schema.Number,
257
+ x: Schema.Number,
258
+ y: Schema.Number,
259
+ semantic: Schema.optionalKey(Frontend.SemanticClickTarget),
260
+ });
261
+ Frontend.ResizeParams = Schema.Struct({ cols: Schema.Number, rows: Schema.Number });
262
+ Frontend.Request = Schema.Union([
263
+ Handshake.Request,
264
+ Schema.Struct({ ...JsonRpc.RequestFields, method: Schema.Literal("ui.type"), params: Frontend.TypeParams }),
265
+ Schema.Struct({ ...JsonRpc.RequestFields, method: Schema.Literal("ui.press"), params: Frontend.PressParams }),
266
+ Schema.Struct({ ...JsonRpc.RequestFields, method: Schema.Literal("ui.arrow"), params: Frontend.ArrowParams }),
267
+ Schema.Struct({ ...JsonRpc.RequestFields, method: Schema.Literal("ui.focus"), params: Frontend.FocusParams }),
268
+ Schema.Struct({ ...JsonRpc.RequestFields, method: Schema.Literal("ui.click"), params: Frontend.ClickParams }),
269
+ Schema.Struct({ ...JsonRpc.RequestFields, method: Schema.Literal("ui.resize"), params: Frontend.ResizeParams }),
270
+ Schema.Struct({ ...JsonRpc.RequestFields, method: Schema.Literal("ui.matches"), params: Frontend.MatchesParams }),
271
+ Schema.Struct({
272
+ ...JsonRpc.RequestFields,
273
+ method: Schema.Literal("ui.screenshot"),
274
+ params: Schema.optional(Frontend.ScreenshotParams),
275
+ }),
276
+ Schema.Struct({
277
+ ...JsonRpc.RequestFields,
278
+ method: Schema.Literals(["ui.enter", "ui.state", "ui.snapshot", "ui.recording.finish"]),
279
+ }),
280
+ Schema.Struct({ ...JsonRpc.RequestFields, method: Schema.Literal("ui.capture") }),
281
+ ]);
282
+ Frontend.decodeRequest = Schema.decodeUnknownSync(Frontend.Request);
283
+ Frontend.decodeRequestEffect = Schema.decodeUnknownEffect(Schema.fromJsonString(Frontend.Request));
284
+ })(Frontend || (Frontend = {}));
285
+ export var Backend;
286
+ (function (Backend) {
287
+ Backend.Capabilities = [
288
+ "llm.attach",
289
+ "llm.chunk",
290
+ "llm.finish",
291
+ "llm.disconnect",
292
+ "llm.pending",
293
+ "llm.request",
294
+ "llm.tool-input-delta",
295
+ "tool.attach",
296
+ "tool.update",
297
+ "tool.finish",
298
+ "tool.fail",
299
+ "tool.invocation",
300
+ "tool.cancel",
301
+ ];
302
+ Backend.Item = Schema.Union([
303
+ Schema.Struct({ type: Schema.Literal("textDelta"), text: Schema.String }),
304
+ Schema.Struct({ type: Schema.Literal("reasoningDelta"), text: Schema.String }),
305
+ Schema.Struct({
306
+ type: Schema.Literal("toolInputStart"),
307
+ index: Schema.Number,
308
+ id: Schema.String,
309
+ name: Schema.String,
310
+ }),
311
+ Schema.Struct({
312
+ type: Schema.Literal("toolInputDelta"),
313
+ index: Schema.Number,
314
+ text: Schema.String,
315
+ }),
316
+ Schema.Struct({
317
+ type: Schema.Literal("toolCall"),
318
+ index: Schema.Number,
319
+ id: Schema.String,
320
+ name: Schema.String,
321
+ input: Schema.Json,
322
+ }),
323
+ Schema.Struct({ type: Schema.Literal("raw"), chunk: Schema.Json }),
324
+ ]);
325
+ Backend.FinishReason = Schema.Literals(["stop", "tool-calls", "length", "content-filter"]);
326
+ Backend.ToolContent = Schema.Union([
327
+ Schema.Struct({ type: Schema.Literal("text"), text: Schema.String }),
328
+ Schema.Struct({
329
+ type: Schema.Literal("file"),
330
+ data: Schema.String,
331
+ mime: Schema.NonEmptyString,
332
+ name: Schema.optionalKey(Schema.String),
333
+ }),
334
+ ]);
335
+ const ToolName = Schema.NonEmptyString.check(Schema.makeFilter((name) => /^[A-Za-z][A-Za-z0-9_-]{0,63}$/.test(name) ? undefined : "simulated tool names must be provider-safe"));
336
+ const ToolNamespace = Schema.NonEmptyString.check(Schema.makeFilter((namespace) => namespace.split(".").every((segment) => /^[A-Za-z][A-Za-z0-9_-]{0,63}$/.test(segment))
337
+ ? undefined
338
+ : "simulated tool namespaces must contain provider-safe segments"));
339
+ Backend.ToolRegistration = Schema.Struct({
340
+ name: ToolName,
341
+ description: Schema.String,
342
+ inputSchema: Schema.Record(Schema.String, Schema.Json),
343
+ outputSchema: Schema.optionalKey(Schema.Record(Schema.String, Schema.Json)),
344
+ permission: Schema.optionalKey(Schema.NonEmptyString),
345
+ options: Schema.optionalKey(Schema.Struct({
346
+ namespace: Schema.optionalKey(ToolNamespace),
347
+ codemode: Schema.optionalKey(Schema.Boolean),
348
+ })),
349
+ });
350
+ Backend.ToolAttachParams = Schema.Struct({
351
+ tools: Schema.Array(Backend.ToolRegistration).check(Schema.makeFilter((tools) => {
352
+ const names = tools.map(exposedToolName);
353
+ if (names.some((name) => !/^[A-Za-z][A-Za-z0-9_-]{0,63}$/.test(name)))
354
+ return "simulated tool names including namespaces must be provider-safe";
355
+ if (new Set(names).size !== names.length)
356
+ return "simulated tool registrations must have unique exposed names";
357
+ if (tools.some((tool) => tool.name === "execute" && tool.options?.namespace === undefined && tool.options?.codemode === false))
358
+ return 'direct simulated tool name "execute" is reserved';
359
+ return undefined;
360
+ })),
361
+ });
362
+ function exposedToolName(registration) {
363
+ return registration.options?.namespace === undefined
364
+ ? registration.name
365
+ : `${registration.options.namespace.replaceAll(".", "_")}_${registration.name}`;
366
+ }
367
+ Backend.exposedToolName = exposedToolName;
368
+ Backend.ToolProgress = Schema.Record(Schema.String, Schema.Json);
369
+ Backend.ToolOutput = Schema.Struct({
370
+ structured: Schema.Json,
371
+ content: Schema.Array(Backend.ToolContent),
372
+ });
373
+ Backend.ToolUpdateParams = Schema.Struct({
374
+ id: Schema.String,
375
+ sequence: Schema.Int.check(Schema.isGreaterThanOrEqualTo(0)),
376
+ update: Backend.ToolProgress,
377
+ });
378
+ Backend.ToolFinishParams = Schema.Struct({ id: Schema.String, output: Backend.ToolOutput });
379
+ Backend.ToolFailParams = Schema.Struct({ id: Schema.String, message: Schema.String });
380
+ Backend.ToolInvocation = Schema.Struct({
381
+ id: Schema.String,
382
+ name: Schema.String,
383
+ input: Schema.Json,
384
+ context: Schema.Struct({
385
+ sessionID: Schema.String,
386
+ agent: Schema.String,
387
+ messageID: Schema.String,
388
+ id: Schema.String,
389
+ }),
390
+ });
391
+ Backend.ToolCancellation = Schema.Struct({
392
+ id: Schema.String,
393
+ reason: Schema.Literal("interrupted"),
394
+ });
395
+ Backend.Attached = Schema.Struct({ attached: Schema.Literal(true) });
396
+ Backend.Ok = Schema.Struct({ ok: Schema.Literal(true) });
397
+ Backend.ChunkParams = Schema.Struct({ id: Schema.String, items: Schema.Array(Backend.Item) });
398
+ Backend.FinishParams = Schema.Struct({
399
+ id: Schema.String,
400
+ reason: Backend.FinishReason.pipe(Schema.withDecodingDefault(Effect.succeed("stop"))),
401
+ });
402
+ Backend.FinishPayload = Schema.Struct({
403
+ id: Schema.String,
404
+ reason: Schema.optionalKey(Backend.FinishReason),
405
+ });
406
+ Backend.DisconnectParams = Schema.Struct({ id: Schema.String });
407
+ Backend.Request = Schema.Union([
408
+ Handshake.Request,
409
+ Schema.Struct({ ...JsonRpc.RequestFields, method: Schema.Literal("llm.chunk"), params: Backend.ChunkParams }),
410
+ Schema.Struct({ ...JsonRpc.RequestFields, method: Schema.Literal("llm.finish"), params: Backend.FinishParams }),
411
+ Schema.Struct({ ...JsonRpc.RequestFields, method: Schema.Literal("llm.disconnect"), params: Backend.DisconnectParams }),
412
+ Schema.Struct({ ...JsonRpc.RequestFields, method: Schema.Literal("tool.attach"), params: Backend.ToolAttachParams }),
413
+ Schema.Struct({ ...JsonRpc.RequestFields, method: Schema.Literal("tool.update"), params: Backend.ToolUpdateParams }),
414
+ Schema.Struct({ ...JsonRpc.RequestFields, method: Schema.Literal("tool.finish"), params: Backend.ToolFinishParams }),
415
+ Schema.Struct({ ...JsonRpc.RequestFields, method: Schema.Literal("tool.fail"), params: Backend.ToolFailParams }),
416
+ Schema.Struct({
417
+ ...JsonRpc.RequestFields,
418
+ method: Schema.Literals(["llm.attach", "llm.pending"]),
419
+ }),
420
+ ]);
421
+ Backend.decodeRequest = Schema.decodeUnknownSync(Backend.Request);
422
+ Backend.decodeRequestEffect = Schema.decodeUnknownEffect(Schema.fromJsonString(Backend.Request));
423
+ Backend.ProviderInvocation = Schema.Struct({ id: Schema.String, url: Schema.String, body: Schema.Json });
424
+ Backend.Pending = Schema.Struct({ invocations: Schema.Array(Backend.ProviderInvocation) });
425
+ Backend.NetworkLogEntry = Schema.Struct({
426
+ time: Schema.Number,
427
+ method: Schema.String,
428
+ url: Schema.String,
429
+ matched: Schema.Boolean,
430
+ });
431
+ })(Backend || (Backend = {}));
432
+ export class SimulationRequestError extends Schema.TaggedErrorClass()("SimulationRequestError", {
433
+ method: Schema.String,
434
+ code: Schema.Number,
435
+ message: Schema.String,
436
+ data: Schema.optionalKey(Schema.Json),
437
+ }) {
438
+ }
439
+ const request = (tag, options) => Rpc.make(tag, { ...options, error: SimulationRequestError });
440
+ export const UiRpcs = RpcGroup.make(request("simulation.handshake", { payload: Handshake.Params, success: Handshake.Response }), request("ui.state", { success: Frontend.State }), request("ui.snapshot", { success: Frontend.SemanticSnapshot }), request("ui.capture", { success: Frontend.CapturedFrame }), request("ui.matches", { payload: Frontend.MatchesParams, success: Frontend.Matches }), request("ui.screenshot", {
441
+ payload: Schema.UndefinedOr(Frontend.ScreenshotParams),
442
+ success: Frontend.Screenshot,
443
+ }), request("ui.recording.finish", { success: Frontend.RecordingFinish }), request("ui.type", { payload: Frontend.TypeParams, success: Frontend.State }), request("ui.press", { payload: Frontend.PressParams, success: Frontend.State }), request("ui.enter", { success: Frontend.State }), request("ui.arrow", { payload: Frontend.ArrowParams, success: Frontend.State }), request("ui.focus", { payload: Frontend.FocusParams, success: Frontend.State }), request("ui.click", { payload: Frontend.ClickParams, success: Frontend.State }), request("ui.resize", { payload: Frontend.ResizeParams, success: Frontend.State }));
444
+ export const BackendRpcs = RpcGroup.make(request("simulation.handshake", { payload: Handshake.Params, success: Handshake.Response }), request("llm.attach", { success: Backend.Attached }), request("llm.pending", { success: Backend.Pending }), request("llm.chunk", { payload: Backend.ChunkParams, success: Backend.Ok }), request("llm.finish", { payload: Backend.FinishPayload, success: Backend.Ok }), request("llm.disconnect", { payload: Backend.DisconnectParams, success: Backend.Ok }), request("tool.attach", { payload: Backend.ToolAttachParams, success: Backend.Attached }), request("tool.update", { payload: Backend.ToolUpdateParams, success: Backend.Ok }), request("tool.finish", { payload: Backend.ToolFinishParams, success: Backend.Ok }), request("tool.fail", { payload: Backend.ToolFailParams, success: Backend.Ok }));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@opencode-ai/protocol",
4
- "version": "0.0.0-next-17364",
4
+ "version": "0.0.0-next-17366",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -16,6 +16,10 @@
16
16
  "dist"
17
17
  ],
18
18
  "exports": {
19
+ "./simulation": {
20
+ "import": "./dist/simulation.js",
21
+ "types": "./dist/simulation.d.ts"
22
+ },
19
23
  "./*": {
20
24
  "import": "./dist/*.js",
21
25
  "types": "./dist/*.d.ts"
@@ -28,7 +32,7 @@
28
32
  "typecheck": "tsgo --noEmit"
29
33
  },
30
34
  "dependencies": {
31
- "@opencode-ai/schema": "0.0.0-next-17364",
35
+ "@opencode-ai/schema": "0.0.0-next-17366",
32
36
  "effect": "4.0.0-beta.101"
33
37
  },
34
38
  "devDependencies": {