@opencode/protocol 0.0.0-dev-19602 → 0.0.0-dev-19610
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/groups/session.d.ts
CHANGED
|
@@ -3468,7 +3468,7 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
|
|
|
3468
3468
|
};
|
|
3469
3469
|
readonly timeCreated: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
3470
3470
|
}>;
|
|
3471
|
-
}>>, Schema.toCodecJson<typeof ConflictError | typeof SessionNotFoundError>, I, HttpApiMiddleware.Requires<I>> | HttpApiEndpoint.HttpApiEndpoint<"session.wait", "POST", "/api/session/:sessionID/wait", Schema.toCodecStringTree<Schema.Struct<{
|
|
3471
|
+
}>>, Schema.toCodecJson<typeof ConflictError | typeof SessionNotFoundError>, I, HttpApiMiddleware.Requires<I>> | HttpApiEndpoint.HttpApiEndpoint<"session.wait", "POST", "/api/experimental/session/:sessionID/wait", Schema.toCodecStringTree<Schema.Struct<{
|
|
3472
3472
|
sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
3473
3473
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
3474
3474
|
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
@@ -9898,7 +9898,7 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
|
|
|
9898
9898
|
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
9899
9899
|
};
|
|
9900
9900
|
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
9901
|
-
|
|
9901
|
+
resume: Schema.optional<Schema.decodeTo<Schema.Boolean, Schema.Literals<readonly ["true", "false"]>, never, never>>;
|
|
9902
9902
|
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
9903
9903
|
readonly interrupted: Schema.Boolean;
|
|
9904
9904
|
}>>, Schema.toCodecJson<typeof SessionNotFoundError>, I, HttpApiMiddleware.Requires<I>> | HttpApiEndpoint.HttpApiEndpoint<"session.background", "POST", "/api/session/:sessionID/background", Schema.toCodecStringTree<Schema.Struct<{
|
|
@@ -10605,7 +10605,7 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
|
|
|
10605
10605
|
readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
10606
10606
|
}>;
|
|
10607
10607
|
}>]>;
|
|
10608
|
-
}>>, Schema.toCodecJson<typeof SessionNotFoundError | typeof MessageNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"session.environment", "PUT", "/api/session/:sessionID/environment", Schema.toCodecStringTree<Schema.Struct<{
|
|
10608
|
+
}>>, Schema.toCodecJson<typeof SessionNotFoundError | typeof MessageNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"session.environment", "PUT", "/api/experimental/session/:sessionID/environment", Schema.toCodecStringTree<Schema.Struct<{
|
|
10609
10609
|
sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
10610
10610
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
10611
10611
|
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
@@ -10618,6 +10618,6 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
|
|
|
10618
10618
|
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
10619
10619
|
};
|
|
10620
10620
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
10621
|
-
readonly idle: Schema.
|
|
10621
|
+
readonly idle: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
10622
10622
|
}>>, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof SessionNotFoundError>, never, never>, false>;
|
|
10623
10623
|
export {};
|
package/dist/groups/session.js
CHANGED
|
@@ -5,7 +5,7 @@ import { Session } from "@opencode/schema/session";
|
|
|
5
5
|
import { SessionStats } from "@opencode/schema/session-stats";
|
|
6
6
|
import { InstructionEntry } from "@opencode/schema/instruction-entry";
|
|
7
7
|
import { Project } from "@opencode/schema/project";
|
|
8
|
-
import { AbsolutePath, NonNegativeInt, PositiveInt, RelativePath, statics } from "@opencode/schema/schema";
|
|
8
|
+
import { AbsolutePath, DateTimeUtcFromMillis, NonNegativeInt, PositiveInt, RelativePath, statics, } from "@opencode/schema/schema";
|
|
9
9
|
import { Event } from "@opencode/schema/event";
|
|
10
10
|
import { Context, Effect, Encoding, Result, Schema, SchemaGetter, Struct } from "effect";
|
|
11
11
|
import { HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware, HttpApiSchema, OpenApi } from "effect/unstable/httpapi";
|
|
@@ -362,14 +362,14 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
|
|
|
362
362
|
summary: "Compact session",
|
|
363
363
|
description: "Durably admit a session compaction request. Steers by default: it runs at the next step boundary instead of waiting behind queued prompts.",
|
|
364
364
|
})))
|
|
365
|
-
.add(HttpApiEndpoint.post("session.wait", "/api/session/:sessionID/wait", {
|
|
365
|
+
.add(HttpApiEndpoint.post("session.wait", "/api/experimental/session/:sessionID/wait", {
|
|
366
366
|
params: { sessionID: Session.ID },
|
|
367
367
|
success: HttpApiSchema.NoContent,
|
|
368
368
|
error: [SessionNotFoundError, ServiceUnavailableError],
|
|
369
369
|
})
|
|
370
370
|
.middleware(sessionLocationMiddleware)
|
|
371
371
|
.annotateMerge(OpenApi.annotations({
|
|
372
|
-
identifier: "session.wait",
|
|
372
|
+
identifier: "experimental.session.wait",
|
|
373
373
|
summary: "Wait for session",
|
|
374
374
|
description: "Wait for a session agent loop to become idle.",
|
|
375
375
|
})))
|
|
@@ -529,7 +529,7 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
|
|
|
529
529
|
})))
|
|
530
530
|
.add(HttpApiEndpoint.post("session.interrupt", "/api/session/:sessionID/interrupt", {
|
|
531
531
|
params: { sessionID: Session.ID },
|
|
532
|
-
query: {
|
|
532
|
+
query: { resume: BooleanFromString.pipe(Schema.optional) },
|
|
533
533
|
success: Schema.Struct({
|
|
534
534
|
interrupted: Schema.Boolean.annotate({
|
|
535
535
|
description: "Whether an active execution owned by this OpenCode process was interrupted.",
|
|
@@ -541,7 +541,7 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
|
|
|
541
541
|
.annotateMerge(OpenApi.annotations({
|
|
542
542
|
identifier: "session.interrupt",
|
|
543
543
|
summary: "Interrupt session execution",
|
|
544
|
-
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
|
|
544
|
+
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 resume=true, execution resumes pending steering input and next-in-line control items (manual compaction, moves) while queued prompts remain parked.",
|
|
545
545
|
})))
|
|
546
546
|
.add(HttpApiEndpoint.post("session.background", "/api/session/:sessionID/background", {
|
|
547
547
|
params: { sessionID: Session.ID },
|
|
@@ -563,19 +563,19 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
|
|
|
563
563
|
summary: "Get session message",
|
|
564
564
|
description: "Retrieve one projected message owned by the Session.",
|
|
565
565
|
})))
|
|
566
|
-
.add(HttpApiEndpoint.put("session.environment", "/api/session/:sessionID/environment", {
|
|
566
|
+
.add(HttpApiEndpoint.put("session.environment", "/api/experimental/session/:sessionID/environment", {
|
|
567
567
|
params: { sessionID: Session.ID },
|
|
568
568
|
payload: Schema.Struct({ variables: Schema.Record(Schema.String, Schema.String) }),
|
|
569
569
|
success: HttpApiSchema.NoContent,
|
|
570
570
|
error: SessionNotFoundError,
|
|
571
571
|
}).annotateMerge(OpenApi.annotations({
|
|
572
|
-
identifier: "session.environment",
|
|
572
|
+
identifier: "experimental.session.environment",
|
|
573
573
|
summary: "Set session environment",
|
|
574
574
|
description: "Replace the process environment used by local shell commands for this session.",
|
|
575
575
|
})))
|
|
576
576
|
.add(HttpApiEndpoint.post("session.view", "/api/session/:sessionID/view", {
|
|
577
577
|
params: { sessionID: Session.ID },
|
|
578
|
-
payload: Schema.Struct({ idle:
|
|
578
|
+
payload: Schema.Struct({ idle: DateTimeUtcFromMillis }),
|
|
579
579
|
success: HttpApiSchema.NoContent,
|
|
580
580
|
error: SessionNotFoundError,
|
|
581
581
|
}).annotateMerge(OpenApi.annotations({
|
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-19610",
|
|
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-19610",
|
|
36
36
|
"effect": "4.0.0-rc.112"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|