@opencode/protocol 0.0.0-dev-19551 → 0.0.0-dev-19553
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/api.d.ts +1 -2
- package/dist/api.js +0 -2
- package/dist/client.d.ts +0 -1
- package/dist/client.js +0 -1
- package/dist/groups/agent.js +2 -2
- package/dist/groups/command.js +1 -1
- package/dist/groups/config.js +4 -4
- package/dist/groups/credential.js +3 -3
- package/dist/groups/debug.js +2 -2
- package/dist/groups/event.js +1 -1
- package/dist/groups/form.js +7 -7
- package/dist/groups/fs.js +3 -3
- package/dist/groups/generate.js +1 -1
- package/dist/groups/integration.js +11 -11
- package/dist/groups/location.js +1 -1
- package/dist/groups/mcp.js +6 -6
- package/dist/groups/message.js +1 -1
- package/dist/groups/migration.js +1 -1
- package/dist/groups/model.js +2 -2
- package/dist/groups/permission.js +8 -8
- package/dist/groups/persistent-pty.js +1 -1
- package/dist/groups/plugin.js +4 -4
- package/dist/groups/project.js +2 -2
- package/dist/groups/provider.js +2 -2
- package/dist/groups/pty.js +7 -7
- package/dist/groups/reference.js +1 -1
- package/dist/groups/rpc.js +1 -1
- package/dist/groups/server.d.ts +9 -1
- package/dist/groups/server.js +11 -5
- package/dist/groups/session.js +39 -39
- package/dist/groups/shell.js +6 -6
- package/dist/groups/skill.js +1 -1
- package/dist/groups/vcs.js +5 -5
- package/dist/groups/websearch.js +2 -2
- package/dist/groups/workspace.js +2 -2
- package/dist/groups/worktree.js +4 -4
- package/package.json +2 -2
- package/dist/groups/health.d.ts +0 -15
- package/dist/groups/health.js +0 -20
package/dist/groups/pty.js
CHANGED
|
@@ -21,7 +21,7 @@ export const PtyGroup = HttpApiGroup.make("server.pty")
|
|
|
21
21
|
})
|
|
22
22
|
.annotateMerge(locationQueryOpenApi)
|
|
23
23
|
.annotateMerge(OpenApi.annotations({
|
|
24
|
-
identifier: "
|
|
24
|
+
identifier: "pty.list",
|
|
25
25
|
summary: "List PTY sessions",
|
|
26
26
|
description: "List PTY sessions for a location, including exited sessions retained until removal.",
|
|
27
27
|
})))
|
|
@@ -32,7 +32,7 @@ export const PtyGroup = HttpApiGroup.make("server.pty")
|
|
|
32
32
|
})
|
|
33
33
|
.annotateMerge(locationQueryOpenApi)
|
|
34
34
|
.annotateMerge(OpenApi.annotations({
|
|
35
|
-
identifier: "
|
|
35
|
+
identifier: "pty.create",
|
|
36
36
|
summary: "Create PTY session",
|
|
37
37
|
description: "Create a pseudo-terminal session for a location.",
|
|
38
38
|
})))
|
|
@@ -44,7 +44,7 @@ export const PtyGroup = HttpApiGroup.make("server.pty")
|
|
|
44
44
|
})
|
|
45
45
|
.annotateMerge(locationQueryOpenApi)
|
|
46
46
|
.annotateMerge(OpenApi.annotations({
|
|
47
|
-
identifier: "
|
|
47
|
+
identifier: "pty.get",
|
|
48
48
|
summary: "Get PTY session",
|
|
49
49
|
description: "Get one PTY session, including its exit code once exited.",
|
|
50
50
|
})))
|
|
@@ -57,7 +57,7 @@ export const PtyGroup = HttpApiGroup.make("server.pty")
|
|
|
57
57
|
})
|
|
58
58
|
.annotateMerge(locationQueryOpenApi)
|
|
59
59
|
.annotateMerge(OpenApi.annotations({
|
|
60
|
-
identifier: "
|
|
60
|
+
identifier: "pty.update",
|
|
61
61
|
summary: "Update PTY session",
|
|
62
62
|
description: "Update the title or viewport size of one PTY session.",
|
|
63
63
|
})))
|
|
@@ -69,7 +69,7 @@ export const PtyGroup = HttpApiGroup.make("server.pty")
|
|
|
69
69
|
})
|
|
70
70
|
.annotateMerge(locationQueryOpenApi)
|
|
71
71
|
.annotateMerge(OpenApi.annotations({
|
|
72
|
-
identifier: "
|
|
72
|
+
identifier: "pty.remove",
|
|
73
73
|
summary: "Remove PTY session",
|
|
74
74
|
description: "Terminate and remove one PTY session.",
|
|
75
75
|
})))
|
|
@@ -82,7 +82,7 @@ export const PtyGroup = HttpApiGroup.make("server.pty")
|
|
|
82
82
|
})
|
|
83
83
|
.annotateMerge(locationQueryOpenApi)
|
|
84
84
|
.annotateMerge(OpenApi.annotations({
|
|
85
|
-
identifier: "
|
|
85
|
+
identifier: "pty.connect.token",
|
|
86
86
|
summary: "Create PTY WebSocket token",
|
|
87
87
|
description: "Create a short-lived single-use ticket for opening a PTY WebSocket connection.",
|
|
88
88
|
})))
|
|
@@ -94,7 +94,7 @@ HttpApiEndpoint.get("pty.connect", "/api/pty/:ptyID/connect", {
|
|
|
94
94
|
success: Schema.Boolean,
|
|
95
95
|
error: [ForbiddenError, PtyNotFoundError],
|
|
96
96
|
}).annotateMerge(OpenApi.annotations({
|
|
97
|
-
identifier: "
|
|
97
|
+
identifier: "pty.connect",
|
|
98
98
|
summary: "Connect to PTY session",
|
|
99
99
|
description: "Establish a WebSocket connection streaming PTY output and accepting terminal input.",
|
|
100
100
|
transform: (operation) => ({
|
package/dist/groups/reference.js
CHANGED
|
@@ -10,7 +10,7 @@ export const ReferenceGroup = HttpApiGroup.make("server.reference")
|
|
|
10
10
|
})
|
|
11
11
|
.annotateMerge(locationQueryOpenApi)
|
|
12
12
|
.annotateMerge(OpenApi.annotations({
|
|
13
|
-
identifier: "
|
|
13
|
+
identifier: "reference.list",
|
|
14
14
|
summary: "List references",
|
|
15
15
|
description: "List references available in the requested location.",
|
|
16
16
|
})))
|
package/dist/groups/rpc.js
CHANGED
|
@@ -17,7 +17,7 @@ export const RpcGroup = HttpApiGroup.make("server.rpc")
|
|
|
17
17
|
})
|
|
18
18
|
.annotateMerge(locationQueryOpenApi)
|
|
19
19
|
.annotateMerge(OpenApi.annotations({
|
|
20
|
-
identifier: "
|
|
20
|
+
identifier: "rpc.call",
|
|
21
21
|
summary: "Call a plugin RPC",
|
|
22
22
|
description: "Dispatch a method to the currently registered RPC at the requested location.",
|
|
23
23
|
})))
|
package/dist/groups/server.d.ts
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const ServerStatus: Schema.Struct<{
|
|
4
|
+
readonly version: Schema.String;
|
|
5
|
+
readonly pid: Schema.Int;
|
|
6
|
+
readonly urls: Schema.$Array<Schema.String>;
|
|
7
|
+
}>;
|
|
8
|
+
export type ServerStatus = typeof ServerStatus.Type;
|
|
9
|
+
export declare const ServerGroup: HttpApiGroup.HttpApiGroup<"server.server", HttpApiEndpoint.HttpApiEndpoint<"server.status", "GET", "/api/status", never, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
10
|
+
readonly version: Schema.String;
|
|
11
|
+
readonly pid: Schema.Int;
|
|
4
12
|
readonly urls: Schema.$Array<Schema.String>;
|
|
5
13
|
}>>, never, never, never>, false>;
|
package/dist/groups/server.js
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/unstable/httpapi";
|
|
3
|
+
export const ServerStatus = Schema.Struct({
|
|
4
|
+
version: Schema.String,
|
|
5
|
+
// 0 means the runtime has no OS process identity (e.g. workerd).
|
|
6
|
+
pid: Schema.Int.check(Schema.isGreaterThanOrEqualTo(0)),
|
|
7
|
+
urls: Schema.Array(Schema.String),
|
|
8
|
+
}).annotate({ identifier: "ServerStatus" });
|
|
3
9
|
export const ServerGroup = HttpApiGroup.make("server.server")
|
|
4
|
-
.add(HttpApiEndpoint.get("server.
|
|
5
|
-
success:
|
|
10
|
+
.add(HttpApiEndpoint.get("server.status", "/api/status", {
|
|
11
|
+
success: ServerStatus,
|
|
6
12
|
}).annotateMerge(OpenApi.annotations({
|
|
7
|
-
identifier: "
|
|
8
|
-
summary: "Get server
|
|
9
|
-
description: "Return the
|
|
13
|
+
identifier: "server.status",
|
|
14
|
+
summary: "Get server status",
|
|
15
|
+
description: "Return the server identity, connection URLs, and readiness status.",
|
|
10
16
|
})))
|
|
11
17
|
.annotateMerge(OpenApi.annotations({ title: "server" }));
|
package/dist/groups/session.js
CHANGED
|
@@ -104,7 +104,7 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
|
|
|
104
104
|
}).annotate({ identifier: "SessionsResponse" }),
|
|
105
105
|
error: [InvalidCursorError, InvalidRequestError],
|
|
106
106
|
}).annotateMerge(OpenApi.annotations({
|
|
107
|
-
identifier: "
|
|
107
|
+
identifier: "session.list",
|
|
108
108
|
summary: "List sessions",
|
|
109
109
|
description: "Retrieve sessions in the requested order. Items keep that order across pages; use cursor.next or cursor.previous to move through the ordered list.",
|
|
110
110
|
})))
|
|
@@ -119,7 +119,7 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
|
|
|
119
119
|
success: Schema.Struct({ data: SessionStats.Info }),
|
|
120
120
|
error: InvalidRequestError,
|
|
121
121
|
}).annotateMerge(OpenApi.annotations({
|
|
122
|
-
identifier: "
|
|
122
|
+
identifier: "session.stats",
|
|
123
123
|
summary: "Get session statistics",
|
|
124
124
|
description: "Aggregate local session activity, usage, and tool reliability for a time range.",
|
|
125
125
|
})))
|
|
@@ -135,7 +135,7 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
|
|
|
135
135
|
}),
|
|
136
136
|
success: Schema.Struct({ data: Session.Info }),
|
|
137
137
|
}).annotateMerge(OpenApi.annotations({
|
|
138
|
-
identifier: "
|
|
138
|
+
identifier: "session.create",
|
|
139
139
|
summary: "Create session",
|
|
140
140
|
description: "Create a session at the requested location.",
|
|
141
141
|
})))
|
|
@@ -147,7 +147,7 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
|
|
|
147
147
|
success: Schema.Struct({ data: Session.Info }),
|
|
148
148
|
error: [ConflictError, SessionNotFoundError],
|
|
149
149
|
}).annotateMerge(OpenApi.annotations({
|
|
150
|
-
identifier: "
|
|
150
|
+
identifier: "session.import",
|
|
151
151
|
summary: "Import session",
|
|
152
152
|
description: "Import a projected session transcript at the requested location. If parentID is supplied, the parent session must already exist; import parents before children.",
|
|
153
153
|
})))
|
|
@@ -157,14 +157,14 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
|
|
|
157
157
|
success: Schema.Struct({ data: SessionTransfer.Data }),
|
|
158
158
|
error: [SessionNotFoundError, UnknownError],
|
|
159
159
|
}).annotateMerge(OpenApi.annotations({
|
|
160
|
-
identifier: "
|
|
160
|
+
identifier: "session.export",
|
|
161
161
|
summary: "Export session",
|
|
162
162
|
description: "Export a complete projected session transcript.",
|
|
163
163
|
})))
|
|
164
164
|
.add(HttpApiEndpoint.get("session.active", "/api/session/active", {
|
|
165
165
|
success: Schema.Struct({ data: Schema.Record(Session.ID, SessionActive) }),
|
|
166
166
|
}).annotateMerge(OpenApi.annotations({
|
|
167
|
-
identifier: "
|
|
167
|
+
identifier: "session.active",
|
|
168
168
|
summary: "List active sessions",
|
|
169
169
|
description: "Retrieve foreground Session drains currently owned by this OpenCode process. Sessions absent from the result are inactive.",
|
|
170
170
|
})))
|
|
@@ -173,7 +173,7 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
|
|
|
173
173
|
success: Schema.Struct({ data: Session.Info }),
|
|
174
174
|
error: SessionNotFoundError,
|
|
175
175
|
}).annotateMerge(OpenApi.annotations({
|
|
176
|
-
identifier: "
|
|
176
|
+
identifier: "session.get",
|
|
177
177
|
summary: "Get session",
|
|
178
178
|
description: "Retrieve a session by ID.",
|
|
179
179
|
})))
|
|
@@ -182,7 +182,7 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
|
|
|
182
182
|
success: HttpApiSchema.NoContent,
|
|
183
183
|
error: SessionNotFoundError,
|
|
184
184
|
}).annotateMerge(OpenApi.annotations({
|
|
185
|
-
identifier: "
|
|
185
|
+
identifier: "session.remove",
|
|
186
186
|
summary: "Delete session",
|
|
187
187
|
description: "Delete a session and its child sessions.",
|
|
188
188
|
})))
|
|
@@ -194,7 +194,7 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
|
|
|
194
194
|
})
|
|
195
195
|
.middleware(sessionLocationMiddleware)
|
|
196
196
|
.annotateMerge(OpenApi.annotations({
|
|
197
|
-
identifier: "
|
|
197
|
+
identifier: "session.fork",
|
|
198
198
|
summary: "Fork session",
|
|
199
199
|
description: "Create a child session by copying projected history through or before a message boundary.",
|
|
200
200
|
})))
|
|
@@ -206,7 +206,7 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
|
|
|
206
206
|
})
|
|
207
207
|
.middleware(sessionLocationMiddleware)
|
|
208
208
|
.annotateMerge(OpenApi.annotations({
|
|
209
|
-
identifier: "
|
|
209
|
+
identifier: "session.switchAgent",
|
|
210
210
|
summary: "Switch session agent",
|
|
211
211
|
description: "Switch the agent used by subsequent provider turns.",
|
|
212
212
|
})))
|
|
@@ -218,7 +218,7 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
|
|
|
218
218
|
})
|
|
219
219
|
.middleware(sessionLocationMiddleware)
|
|
220
220
|
.annotateMerge(OpenApi.annotations({
|
|
221
|
-
identifier: "
|
|
221
|
+
identifier: "session.switchModel",
|
|
222
222
|
summary: "Switch session model",
|
|
223
223
|
description: "Switch the model used by subsequent provider turns.",
|
|
224
224
|
})))
|
|
@@ -230,7 +230,7 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
|
|
|
230
230
|
})
|
|
231
231
|
.middleware(sessionLocationMiddleware)
|
|
232
232
|
.annotateMerge(OpenApi.annotations({
|
|
233
|
-
identifier: "
|
|
233
|
+
identifier: "session.rename",
|
|
234
234
|
summary: "Rename session",
|
|
235
235
|
description: "Update the session title.",
|
|
236
236
|
})))
|
|
@@ -240,7 +240,7 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
|
|
|
240
240
|
success: HttpApiSchema.NoContent,
|
|
241
241
|
error: [SessionNotFoundError, InvalidRequestError],
|
|
242
242
|
}).annotateMerge(OpenApi.annotations({
|
|
243
|
-
identifier: "
|
|
243
|
+
identifier: "session.move",
|
|
244
244
|
summary: "Move session",
|
|
245
245
|
description: "Move a session to another project directory, optionally transferring local changes.",
|
|
246
246
|
})))
|
|
@@ -258,7 +258,7 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
|
|
|
258
258
|
})
|
|
259
259
|
.middleware(sessionLocationMiddleware)
|
|
260
260
|
.annotateMerge(OpenApi.annotations({
|
|
261
|
-
identifier: "
|
|
261
|
+
identifier: "session.prompt",
|
|
262
262
|
summary: "Send message",
|
|
263
263
|
description: "Durably admit one session input and schedule agent-loop execution unless resume is false.",
|
|
264
264
|
})))
|
|
@@ -274,7 +274,7 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
|
|
|
274
274
|
})
|
|
275
275
|
.middleware(sessionLocationMiddleware)
|
|
276
276
|
.annotateMerge(OpenApi.annotations({
|
|
277
|
-
identifier: "
|
|
277
|
+
identifier: "session.command",
|
|
278
278
|
summary: "Run command",
|
|
279
279
|
description: "Execute a slash command callback immediately.",
|
|
280
280
|
})))
|
|
@@ -290,7 +290,7 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
|
|
|
290
290
|
})
|
|
291
291
|
.middleware(sessionLocationMiddleware)
|
|
292
292
|
.annotateMerge(OpenApi.annotations({
|
|
293
|
-
identifier: "
|
|
293
|
+
identifier: "session.skill",
|
|
294
294
|
summary: "Activate skill",
|
|
295
295
|
description: "Activate a skill for a session by appending a skill message and resuming execution.",
|
|
296
296
|
})))
|
|
@@ -309,7 +309,7 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
|
|
|
309
309
|
})
|
|
310
310
|
.middleware(sessionLocationMiddleware)
|
|
311
311
|
.annotateMerge(OpenApi.annotations({
|
|
312
|
-
identifier: "
|
|
312
|
+
identifier: "session.synthetic",
|
|
313
313
|
summary: "Add synthetic message",
|
|
314
314
|
description: "Durably admit synthetic session input and schedule execution unless resume is false.",
|
|
315
315
|
})))
|
|
@@ -324,7 +324,7 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
|
|
|
324
324
|
})
|
|
325
325
|
.middleware(sessionLocationMiddleware)
|
|
326
326
|
.annotateMerge(OpenApi.annotations({
|
|
327
|
-
identifier: "
|
|
327
|
+
identifier: "session.shell",
|
|
328
328
|
summary: "Run shell command",
|
|
329
329
|
description: "Execute one shell command in the session's working directory. Emits a shell.started event before execution and a shell.ended event with the merged output after.",
|
|
330
330
|
})))
|
|
@@ -339,7 +339,7 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
|
|
|
339
339
|
})
|
|
340
340
|
.middleware(sessionLocationMiddleware)
|
|
341
341
|
.annotateMerge(OpenApi.annotations({
|
|
342
|
-
identifier: "
|
|
342
|
+
identifier: "session.compact",
|
|
343
343
|
summary: "Compact session",
|
|
344
344
|
description: "Durably admit a session compaction request. Steers by default: it runs at the next step boundary instead of waiting behind queued prompts.",
|
|
345
345
|
})))
|
|
@@ -350,7 +350,7 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
|
|
|
350
350
|
})
|
|
351
351
|
.middleware(sessionLocationMiddleware)
|
|
352
352
|
.annotateMerge(OpenApi.annotations({
|
|
353
|
-
identifier: "
|
|
353
|
+
identifier: "session.wait",
|
|
354
354
|
summary: "Wait for session",
|
|
355
355
|
description: "Wait for a session agent loop to become idle.",
|
|
356
356
|
})))
|
|
@@ -362,7 +362,7 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
|
|
|
362
362
|
})
|
|
363
363
|
.middleware(sessionLocationMiddleware)
|
|
364
364
|
.annotateMerge(OpenApi.annotations({
|
|
365
|
-
identifier: "
|
|
365
|
+
identifier: "session.revert.stage",
|
|
366
366
|
summary: "Stage session revert",
|
|
367
367
|
description: "Stage or move a reversible session boundary and optionally apply its file changes.",
|
|
368
368
|
})))
|
|
@@ -372,20 +372,20 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
|
|
|
372
372
|
error: [SessionNotFoundError, SessionBusyError, UnknownError],
|
|
373
373
|
})
|
|
374
374
|
.middleware(sessionLocationMiddleware)
|
|
375
|
-
.annotateMerge(OpenApi.annotations({ identifier: "
|
|
375
|
+
.annotateMerge(OpenApi.annotations({ identifier: "session.revert.clear", summary: "Clear staged revert" })))
|
|
376
376
|
.add(HttpApiEndpoint.post("session.revert.commit", "/api/session/:sessionID/revert/commit", {
|
|
377
377
|
params: { sessionID: Session.ID },
|
|
378
378
|
success: HttpApiSchema.NoContent,
|
|
379
379
|
error: [SessionNotFoundError, SessionBusyError],
|
|
380
380
|
})
|
|
381
381
|
.middleware(sessionLocationMiddleware)
|
|
382
|
-
.annotateMerge(OpenApi.annotations({ identifier: "
|
|
382
|
+
.annotateMerge(OpenApi.annotations({ identifier: "session.revert.commit", summary: "Commit staged revert" })))
|
|
383
383
|
.add(HttpApiEndpoint.get("session.context", "/api/session/:sessionID/context", {
|
|
384
384
|
params: { sessionID: Session.ID },
|
|
385
385
|
success: Schema.Struct({ data: Schema.Array(SessionMessage.Info) }),
|
|
386
386
|
error: [SessionNotFoundError, UnknownError],
|
|
387
387
|
}).annotateMerge(OpenApi.annotations({
|
|
388
|
-
identifier: "
|
|
388
|
+
identifier: "session.context",
|
|
389
389
|
summary: "Get session context",
|
|
390
390
|
description: "Retrieve the active context messages for a session (all messages after the last compaction).",
|
|
391
391
|
})))
|
|
@@ -405,7 +405,7 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
|
|
|
405
405
|
success: Schema.Struct({ data: Schema.Array(FileDiff.Info) }),
|
|
406
406
|
error: [InvalidRequestError, MessageNotFoundError, SessionNotFoundError, UnknownError],
|
|
407
407
|
}).annotateMerge(OpenApi.annotations({
|
|
408
|
-
identifier: "
|
|
408
|
+
identifier: "session.diff",
|
|
409
409
|
summary: "Diff session turns",
|
|
410
410
|
description: "Structured per-file diffs of the files a turn changed. A turn runs from the first prompt after the session was last idle until its next idle marker, so prompts steered in while it was busy belong to the same turn; `to` extends the range through a later turn. Compares the range's first recorded snapshot with its last; a step still running in the active session compares against the working copy. Ranges that span a location change are rejected. In sessions without any idle marker, a prompt's turn spans until the next user message.",
|
|
411
411
|
})))
|
|
@@ -414,7 +414,7 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
|
|
|
414
414
|
success: Schema.Struct({ data: Schema.Array(SessionInbox.Info) }),
|
|
415
415
|
error: SessionNotFoundError,
|
|
416
416
|
}).annotateMerge(OpenApi.annotations({
|
|
417
|
-
identifier: "
|
|
417
|
+
identifier: "session.inbox.list",
|
|
418
418
|
summary: "List session inbox",
|
|
419
419
|
description: "List durable enqueued session work not yet delivered, ordered by enqueue sequence. Includes user, synthetic, compaction, and move items.",
|
|
420
420
|
})))
|
|
@@ -423,7 +423,7 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
|
|
|
423
423
|
success: HttpApiSchema.NoContent,
|
|
424
424
|
error: [ConflictError, SessionNotFoundError],
|
|
425
425
|
}).annotateMerge(OpenApi.annotations({
|
|
426
|
-
identifier: "
|
|
426
|
+
identifier: "session.inbox.cancel",
|
|
427
427
|
summary: "Cancel inbox input",
|
|
428
428
|
description: "Cancel an inbox item that has not yet been delivered.",
|
|
429
429
|
})))
|
|
@@ -432,7 +432,7 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
|
|
|
432
432
|
success: HttpApiSchema.NoContent,
|
|
433
433
|
error: [ConflictError, SessionNotFoundError],
|
|
434
434
|
}).annotateMerge(OpenApi.annotations({
|
|
435
|
-
identifier: "
|
|
435
|
+
identifier: "session.inbox.steer",
|
|
436
436
|
summary: "Steer queued item",
|
|
437
437
|
description: "Change a queued inbox item to steer delivery and wake session execution.",
|
|
438
438
|
})))
|
|
@@ -441,7 +441,7 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
|
|
|
441
441
|
success: HttpApiSchema.NoContent,
|
|
442
442
|
error: [ConflictError, SessionNotFoundError],
|
|
443
443
|
}).annotateMerge(OpenApi.annotations({
|
|
444
|
-
identifier: "
|
|
444
|
+
identifier: "session.inbox.queue",
|
|
445
445
|
summary: "Queue steered item",
|
|
446
446
|
description: "Change a steered inbox item to queued delivery.",
|
|
447
447
|
})))
|
|
@@ -452,7 +452,7 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
|
|
|
452
452
|
})
|
|
453
453
|
.middleware(sessionLocationMiddleware)
|
|
454
454
|
.annotateMerge(OpenApi.annotations({
|
|
455
|
-
identifier: "
|
|
455
|
+
identifier: "session.instructions.entry.list",
|
|
456
456
|
summary: "List instruction entries",
|
|
457
457
|
description: "List API-managed instruction entries attached to the session.",
|
|
458
458
|
})))
|
|
@@ -464,7 +464,7 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
|
|
|
464
464
|
})
|
|
465
465
|
.middleware(sessionLocationMiddleware)
|
|
466
466
|
.annotateMerge(OpenApi.annotations({
|
|
467
|
-
identifier: "
|
|
467
|
+
identifier: "session.instructions.entry.put",
|
|
468
468
|
summary: "Put instruction entry",
|
|
469
469
|
description: "Attach or replace one durable instruction entry. Changes announce as updates at the next step boundary.",
|
|
470
470
|
})))
|
|
@@ -475,7 +475,7 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
|
|
|
475
475
|
})
|
|
476
476
|
.middleware(sessionLocationMiddleware)
|
|
477
477
|
.annotateMerge(OpenApi.annotations({
|
|
478
|
-
identifier: "
|
|
478
|
+
identifier: "session.instructions.entry.remove",
|
|
479
479
|
summary: "Remove instruction entry",
|
|
480
480
|
description: "Remove one instruction entry; the removal is announced to the model at the next step boundary.",
|
|
481
481
|
})))
|
|
@@ -489,7 +489,7 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
|
|
|
489
489
|
})
|
|
490
490
|
.middleware(sessionLocationMiddleware)
|
|
491
491
|
.annotateMerge(OpenApi.annotations({
|
|
492
|
-
identifier: "
|
|
492
|
+
identifier: "session.generate",
|
|
493
493
|
summary: "Generate text from session context",
|
|
494
494
|
description: "Generate transient text from the current session context without mutating session history.",
|
|
495
495
|
})))
|
|
@@ -504,7 +504,7 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
|
|
|
504
504
|
}),
|
|
505
505
|
error: SessionNotFoundError,
|
|
506
506
|
}).annotateMerge(OpenApi.annotations({
|
|
507
|
-
identifier: "
|
|
507
|
+
identifier: "session.log",
|
|
508
508
|
summary: "Read the session log",
|
|
509
509
|
description: "Experimental durable session event log. Reads events after an exclusive aggregate sequence and continues with live events when follow=true.",
|
|
510
510
|
})))
|
|
@@ -520,7 +520,7 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
|
|
|
520
520
|
})
|
|
521
521
|
.middleware(sessionLocationMiddleware)
|
|
522
522
|
.annotateMerge(OpenApi.annotations({
|
|
523
|
-
identifier: "
|
|
523
|
+
identifier: "session.interrupt",
|
|
524
524
|
summary: "Interrupt session execution",
|
|
525
525
|
description: "Interrupt active execution owned by this OpenCode process. Returns interrupted=true when an active execution was interrupted and false for the idle no-op. When continue=true, execution resumes pending steering input and next-in-line control items (manual compaction, moves) while queued prompts remain parked.",
|
|
526
526
|
})))
|
|
@@ -531,7 +531,7 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
|
|
|
531
531
|
})
|
|
532
532
|
.middleware(sessionLocationMiddleware)
|
|
533
533
|
.annotateMerge(OpenApi.annotations({
|
|
534
|
-
identifier: "
|
|
534
|
+
identifier: "session.background",
|
|
535
535
|
summary: "Background blocking session tools",
|
|
536
536
|
description: "Move active foreground backgroundable tools for this session into background observation. Idle requests are a no-op.",
|
|
537
537
|
})))
|
|
@@ -540,7 +540,7 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
|
|
|
540
540
|
success: Schema.Struct({ data: SessionMessage.Info }),
|
|
541
541
|
error: [SessionNotFoundError, MessageNotFoundError],
|
|
542
542
|
}).annotateMerge(OpenApi.annotations({
|
|
543
|
-
identifier: "
|
|
543
|
+
identifier: "session.message",
|
|
544
544
|
summary: "Get session message",
|
|
545
545
|
description: "Retrieve one projected message owned by the Session.",
|
|
546
546
|
})))
|
|
@@ -550,7 +550,7 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
|
|
|
550
550
|
success: HttpApiSchema.NoContent,
|
|
551
551
|
error: SessionNotFoundError,
|
|
552
552
|
}).annotateMerge(OpenApi.annotations({
|
|
553
|
-
identifier: "
|
|
553
|
+
identifier: "session.environment",
|
|
554
554
|
summary: "Set session environment",
|
|
555
555
|
description: "Replace the process environment used by local shell commands for this session.",
|
|
556
556
|
})))
|
|
@@ -560,7 +560,7 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
|
|
|
560
560
|
success: HttpApiSchema.NoContent,
|
|
561
561
|
error: SessionNotFoundError,
|
|
562
562
|
}).annotateMerge(OpenApi.annotations({
|
|
563
|
-
identifier: "
|
|
563
|
+
identifier: "session.view",
|
|
564
564
|
summary: "View session",
|
|
565
565
|
description: "Mark the idle transition observed by the viewer as viewed.",
|
|
566
566
|
})))
|
package/dist/groups/shell.js
CHANGED
|
@@ -15,7 +15,7 @@ export const ShellGroup = HttpApiGroup.make("server.shell")
|
|
|
15
15
|
})
|
|
16
16
|
.annotateMerge(locationQueryOpenApi)
|
|
17
17
|
.annotateMerge(OpenApi.annotations({
|
|
18
|
-
identifier: "
|
|
18
|
+
identifier: "shell.list",
|
|
19
19
|
summary: "List running shell commands",
|
|
20
20
|
description: "List currently running shell commands for a location. Exited commands are not included.",
|
|
21
21
|
})))
|
|
@@ -26,7 +26,7 @@ export const ShellGroup = HttpApiGroup.make("server.shell")
|
|
|
26
26
|
})
|
|
27
27
|
.annotateMerge(locationQueryOpenApi)
|
|
28
28
|
.annotateMerge(OpenApi.annotations({
|
|
29
|
-
identifier: "
|
|
29
|
+
identifier: "shell.create",
|
|
30
30
|
summary: "Run shell command",
|
|
31
31
|
description: "Spawn one non-interactive shell command for a location. Combined stdout/stderr is captured to a file pageable via output.",
|
|
32
32
|
})))
|
|
@@ -38,7 +38,7 @@ export const ShellGroup = HttpApiGroup.make("server.shell")
|
|
|
38
38
|
})
|
|
39
39
|
.annotateMerge(locationQueryOpenApi)
|
|
40
40
|
.annotateMerge(OpenApi.annotations({
|
|
41
|
-
identifier: "
|
|
41
|
+
identifier: "shell.get",
|
|
42
42
|
summary: "Get shell command",
|
|
43
43
|
description: "Get one shell command, including its status and exit code once exited.",
|
|
44
44
|
})))
|
|
@@ -51,7 +51,7 @@ export const ShellGroup = HttpApiGroup.make("server.shell")
|
|
|
51
51
|
})
|
|
52
52
|
.annotateMerge(locationQueryOpenApi)
|
|
53
53
|
.annotateMerge(OpenApi.annotations({
|
|
54
|
-
identifier: "
|
|
54
|
+
identifier: "shell.timeout",
|
|
55
55
|
summary: "Update shell timeout",
|
|
56
56
|
description: "Replace a running shell command's timeout from now, or clear it with zero.",
|
|
57
57
|
})))
|
|
@@ -63,7 +63,7 @@ export const ShellGroup = HttpApiGroup.make("server.shell")
|
|
|
63
63
|
})
|
|
64
64
|
.annotateMerge(locationQueryOpenApi)
|
|
65
65
|
.annotateMerge(OpenApi.annotations({
|
|
66
|
-
identifier: "
|
|
66
|
+
identifier: "shell.output",
|
|
67
67
|
summary: "Read shell output",
|
|
68
68
|
description: "Page through captured combined output by absolute byte cursor.",
|
|
69
69
|
})))
|
|
@@ -75,7 +75,7 @@ export const ShellGroup = HttpApiGroup.make("server.shell")
|
|
|
75
75
|
})
|
|
76
76
|
.annotateMerge(locationQueryOpenApi)
|
|
77
77
|
.annotateMerge(OpenApi.annotations({
|
|
78
|
-
identifier: "
|
|
78
|
+
identifier: "shell.remove",
|
|
79
79
|
summary: "Remove shell command",
|
|
80
80
|
description: "Terminate and remove one shell command and its retained output.",
|
|
81
81
|
})))
|
package/dist/groups/skill.js
CHANGED
|
@@ -10,7 +10,7 @@ export const SkillGroup = HttpApiGroup.make("server.skill")
|
|
|
10
10
|
})
|
|
11
11
|
.annotateMerge(locationQueryOpenApi)
|
|
12
12
|
.annotateMerge(OpenApi.annotations({
|
|
13
|
-
identifier: "
|
|
13
|
+
identifier: "skill.list",
|
|
14
14
|
summary: "List skills",
|
|
15
15
|
description: "Retrieve currently registered skills.",
|
|
16
16
|
})))
|
package/dist/groups/vcs.js
CHANGED
|
@@ -24,7 +24,7 @@ export const VcsGroup = HttpApiGroup.make("server.vcs")
|
|
|
24
24
|
})
|
|
25
25
|
.annotateMerge(locationQueryOpenApi)
|
|
26
26
|
.annotateMerge(OpenApi.annotations({
|
|
27
|
-
identifier: "
|
|
27
|
+
identifier: "vcs.get",
|
|
28
28
|
summary: "VCS info",
|
|
29
29
|
description: "Get current and default branch information for the requested location.",
|
|
30
30
|
})))
|
|
@@ -35,7 +35,7 @@ export const VcsGroup = HttpApiGroup.make("server.vcs")
|
|
|
35
35
|
})
|
|
36
36
|
.annotateMerge(locationQueryOpenApi)
|
|
37
37
|
.annotateMerge(OpenApi.annotations({
|
|
38
|
-
identifier: "
|
|
38
|
+
identifier: "vcs.base",
|
|
39
39
|
summary: "VCS review base",
|
|
40
40
|
description: "Infer a local review base from named branch creation history, or the repository default only when currently on that branch. Returns null before the first commit or when the provider lacks base metadata; ambiguous Git history requires an explicit base on diff requests.",
|
|
41
41
|
})))
|
|
@@ -45,7 +45,7 @@ export const VcsGroup = HttpApiGroup.make("server.vcs")
|
|
|
45
45
|
})
|
|
46
46
|
.annotateMerge(locationQueryOpenApi)
|
|
47
47
|
.annotateMerge(OpenApi.annotations({
|
|
48
|
-
identifier: "
|
|
48
|
+
identifier: "vcs.status",
|
|
49
49
|
summary: "VCS status",
|
|
50
50
|
description: "List uncommitted working-copy changes relative to the requested location.",
|
|
51
51
|
})))
|
|
@@ -55,7 +55,7 @@ export const VcsGroup = HttpApiGroup.make("server.vcs")
|
|
|
55
55
|
})
|
|
56
56
|
.annotateMerge(locationQueryOpenApi)
|
|
57
57
|
.annotateMerge(OpenApi.annotations({
|
|
58
|
-
identifier: "
|
|
58
|
+
identifier: "vcs.branches",
|
|
59
59
|
summary: "VCS branches",
|
|
60
60
|
description: "List local and remote branches available at the requested location.",
|
|
61
61
|
})))
|
|
@@ -66,7 +66,7 @@ export const VcsGroup = HttpApiGroup.make("server.vcs")
|
|
|
66
66
|
})
|
|
67
67
|
.annotateMerge(locationQueryOpenApi)
|
|
68
68
|
.annotateMerge(OpenApi.annotations({
|
|
69
|
-
identifier: "
|
|
69
|
+
identifier: "vcs.diff",
|
|
70
70
|
summary: "VCS diff",
|
|
71
71
|
description: "Diff HEAD to the working copy (working), the base merge-base to the working copy (branch), or the base merge-base to HEAD (committed). Omitting base preserves repository-default comparison; supplying it overrides the comparison without saving it.",
|
|
72
72
|
})))
|
package/dist/groups/websearch.js
CHANGED
|
@@ -12,7 +12,7 @@ export const WebSearchGroup = HttpApiGroup.make("server.websearch")
|
|
|
12
12
|
})
|
|
13
13
|
.annotateMerge(locationQueryOpenApi)
|
|
14
14
|
.annotateMerge(OpenApi.annotations({
|
|
15
|
-
identifier: "
|
|
15
|
+
identifier: "websearch.providers",
|
|
16
16
|
summary: "List web search providers",
|
|
17
17
|
description: "Return the registered web search providers.",
|
|
18
18
|
})))
|
|
@@ -24,7 +24,7 @@ export const WebSearchGroup = HttpApiGroup.make("server.websearch")
|
|
|
24
24
|
})
|
|
25
25
|
.annotateMerge(locationQueryOpenApi)
|
|
26
26
|
.annotateMerge(OpenApi.annotations({
|
|
27
|
-
identifier: "
|
|
27
|
+
identifier: "websearch.query",
|
|
28
28
|
summary: "Search the web",
|
|
29
29
|
description: "Run one web search through the selected provider. Specify a provider to override the configured default.",
|
|
30
30
|
})))
|
package/dist/groups/workspace.js
CHANGED
|
@@ -11,7 +11,7 @@ export const WorkspaceGroup = HttpApiGroup.make("server.workspace")
|
|
|
11
11
|
success: Schema.Struct({ data: Workspace.ID }),
|
|
12
12
|
error: [ConflictError, ProviderNotFoundError],
|
|
13
13
|
}).annotateMerge(OpenApi.annotations({
|
|
14
|
-
identifier: "
|
|
14
|
+
identifier: "workspace.create",
|
|
15
15
|
summary: "Create workspace",
|
|
16
16
|
description: "Create a logical workspace. A caller-supplied ID is idempotent when retried with the same provider; reusing it with another provider returns a conflict.",
|
|
17
17
|
})))
|
|
@@ -20,7 +20,7 @@ export const WorkspaceGroup = HttpApiGroup.make("server.workspace")
|
|
|
20
20
|
success: Workspace.DestroyResult,
|
|
21
21
|
error: UnknownError,
|
|
22
22
|
}).annotateMerge(OpenApi.annotations({
|
|
23
|
-
identifier: "
|
|
23
|
+
identifier: "workspace.destroy",
|
|
24
24
|
summary: "Destroy workspace",
|
|
25
25
|
description: "Make a workspace not exist. This operation is idempotent: an already-missing workspace succeeds with `destroyed: false`, while a workspace removed by this request returns `destroyed: true`.",
|
|
26
26
|
})))
|
package/dist/groups/worktree.js
CHANGED
|
@@ -19,7 +19,7 @@ export const WorktreeGroup = HttpApiGroup.make("server.worktree")
|
|
|
19
19
|
})
|
|
20
20
|
.annotateMerge(locationQueryOpenApi)
|
|
21
21
|
.annotateMerge(OpenApi.annotations({
|
|
22
|
-
identifier: "
|
|
22
|
+
identifier: "worktree.list",
|
|
23
23
|
summary: "List worktrees",
|
|
24
24
|
description: "Discover worktrees through the requested location's strategies and return its project's inventory.",
|
|
25
25
|
})))
|
|
@@ -31,7 +31,7 @@ export const WorktreeGroup = HttpApiGroup.make("server.worktree")
|
|
|
31
31
|
})
|
|
32
32
|
.annotateMerge(locationQueryOpenApi)
|
|
33
33
|
.annotateMerge(OpenApi.annotations({
|
|
34
|
-
identifier: "
|
|
34
|
+
identifier: "worktree.create",
|
|
35
35
|
summary: "Create worktree",
|
|
36
36
|
description: "Create a local worktree using the location's registered strategy and directory defaults, then run the project's setup script.",
|
|
37
37
|
})))
|
|
@@ -43,7 +43,7 @@ export const WorktreeGroup = HttpApiGroup.make("server.worktree")
|
|
|
43
43
|
})
|
|
44
44
|
.annotateMerge(locationQueryOpenApi)
|
|
45
45
|
.annotateMerge(OpenApi.annotations({
|
|
46
|
-
identifier: "
|
|
46
|
+
identifier: "worktree.remove",
|
|
47
47
|
summary: "Remove worktree",
|
|
48
48
|
description: "Remove a managed worktree from the requested location's project using its recorded strategy.",
|
|
49
49
|
})))
|
|
@@ -54,7 +54,7 @@ export const WorktreeGroup = HttpApiGroup.make("server.worktree")
|
|
|
54
54
|
})
|
|
55
55
|
.annotateMerge(locationQueryOpenApi)
|
|
56
56
|
.annotateMerge(OpenApi.annotations({
|
|
57
|
-
identifier: "
|
|
57
|
+
identifier: "worktree.refresh",
|
|
58
58
|
summary: "Refresh worktrees",
|
|
59
59
|
description: "Discover worktrees from the requested location and reconcile the shared project inventory.",
|
|
60
60
|
})))
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@opencode/protocol",
|
|
4
|
-
"version": "0.0.0-dev-
|
|
4
|
+
"version": "0.0.0-dev-19553",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"typecheck": "tsgo --noEmit"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@opencode/schema": "0.0.0-dev-
|
|
35
|
+
"@opencode/schema": "0.0.0-dev-19553",
|
|
36
36
|
"effect": "4.0.0-rc.112"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|