@opencode/protocol 2.2.7 → 2.3.1
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/client.d.ts +1 -0
- package/dist/client.js +31 -0
- package/dist/errors.d.ts +15 -3
- package/dist/errors.js +12 -2
- package/dist/groups/agent.d.ts +18 -0
- package/dist/groups/automation.d.ts +459 -0
- package/dist/groups/automation.js +55 -0
- package/dist/groups/blob.d.ts +7 -0
- package/dist/groups/blob.js +16 -0
- package/dist/groups/event.d.ts +254 -1
- package/dist/groups/experimental.d.ts +410 -557
- package/dist/groups/experimental.js +3 -2
- package/dist/groups/generate.d.ts +95 -2
- package/dist/groups/generate.js +19 -1
- package/dist/groups/job.d.ts +14 -2
- package/dist/groups/job.js +1 -1
- package/dist/groups/message.d.ts +5 -0
- package/dist/groups/model.d.ts +2 -0
- package/dist/groups/provider.d.ts +36 -0
- package/dist/groups/session.d.ts +80 -0
- package/dist/groups/session.js +3 -1
- package/package.json +2 -2
- package/dist/groups/schedule.d.ts +0 -675
- package/dist/groups/schedule.js +0 -51
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Automation } from "@opencode/schema/automation";
|
|
2
|
+
import { Session } from "@opencode/schema/session";
|
|
3
|
+
import { Schema } from "effect";
|
|
4
|
+
import { HttpApiEndpoint, HttpApiSchema, OpenApi } from "effect/http-api";
|
|
5
|
+
import { AutomationNotFoundError, ForbiddenError, InvalidRequestError, SessionNotFoundError } from "../errors.js";
|
|
6
|
+
const EXPERIMENTAL = "Experimental: needs experimental.automations in the config of the automation's directory and may change without compatibility guarantees.";
|
|
7
|
+
const errors = [AutomationNotFoundError, ForbiddenError];
|
|
8
|
+
const params = { automationID: Automation.ID };
|
|
9
|
+
const annotations = (identifier, summary, description) => OpenApi.annotations({
|
|
10
|
+
identifier: `experimental.automation.${identifier}`,
|
|
11
|
+
summary,
|
|
12
|
+
description: `${description} ${EXPERIMENTAL}`,
|
|
13
|
+
// The routes share the `server.experimental` group with the persistent PTY prototype; tag them on their own.
|
|
14
|
+
transform: (operation) => ({ ...operation, tags: ["experimental"] }),
|
|
15
|
+
});
|
|
16
|
+
export const CreatePayload = Automation.CreateInput.annotate({ identifier: "Automation.CreatePayload" });
|
|
17
|
+
export const ListQuery = Schema.Struct({
|
|
18
|
+
sessionID: Session.ID.pipe(Schema.optional).annotate({ description: "Only automations created by this Session." }),
|
|
19
|
+
directory: Schema.String.pipe(Schema.optional).annotate({
|
|
20
|
+
description: "Only automations in the project that owns this directory.",
|
|
21
|
+
}),
|
|
22
|
+
}).annotate({ identifier: "Automation.ListQuery" });
|
|
23
|
+
/** Lives in the `server.experimental` group (see `groups/experimental.ts`). */
|
|
24
|
+
export const AutomationEndpoints = [
|
|
25
|
+
HttpApiEndpoint.post("automation.create", "/api/experimental/automation", {
|
|
26
|
+
payload: CreatePayload,
|
|
27
|
+
success: Schema.Struct({ data: Automation.Info }),
|
|
28
|
+
error: [InvalidRequestError, SessionNotFoundError, ForbiddenError],
|
|
29
|
+
}).annotateMerge(annotations("create", "Create automation", "Create an automation that sends a prompt or runs a Code Mode program at a time, every interval, or on a cron. Creating an MCP event watch requires the automation_create tool in a local session; a session ID over HTTP is not a watch authorization.")),
|
|
30
|
+
HttpApiEndpoint.get("automation.list", "/api/experimental/automation", {
|
|
31
|
+
query: ListQuery,
|
|
32
|
+
success: Schema.Struct({ data: Schema.Array(Automation.Info) }),
|
|
33
|
+
error: [SessionNotFoundError, ForbiddenError, InvalidRequestError],
|
|
34
|
+
}).annotateMerge(annotations("list", "List automations", "List automations, oldest first.")),
|
|
35
|
+
HttpApiEndpoint.get("automation.get", "/api/experimental/automation/:automationID", {
|
|
36
|
+
params,
|
|
37
|
+
success: Schema.Struct({ data: Automation.Info }),
|
|
38
|
+
error: errors,
|
|
39
|
+
}).annotateMerge(annotations("get", "Get automation", "Read one automation.")),
|
|
40
|
+
HttpApiEndpoint.post("automation.pause", "/api/experimental/automation/:automationID/pause", {
|
|
41
|
+
params,
|
|
42
|
+
success: Schema.Struct({ data: Automation.Info }),
|
|
43
|
+
error: errors,
|
|
44
|
+
}).annotateMerge(annotations("pause", "Pause automation", "Stop an automation from running until it is resumed.")),
|
|
45
|
+
HttpApiEndpoint.post("automation.resume", "/api/experimental/automation/:automationID/resume", {
|
|
46
|
+
params,
|
|
47
|
+
success: Schema.Struct({ data: Automation.Info }),
|
|
48
|
+
error: errors,
|
|
49
|
+
}).annotateMerge(annotations("resume", "Resume automation", "Resume a paused automation. A missed `at` runs once; repeating timers resume at their next slot. Event watches request replay from their saved cursor.")),
|
|
50
|
+
HttpApiEndpoint.delete("automation.delete", "/api/experimental/automation/:automationID", {
|
|
51
|
+
params,
|
|
52
|
+
success: HttpApiSchema.NoContent,
|
|
53
|
+
error: errors,
|
|
54
|
+
}).annotateMerge(annotations("delete", "Delete automation", "Delete an automation.")),
|
|
55
|
+
];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { HttpApiEndpoint } from "effect/http-api";
|
|
3
|
+
import { BlobNotFoundError } from "../errors.js";
|
|
4
|
+
/** Lives in the `server.experimental` group (see `groups/experimental.ts`). */
|
|
5
|
+
export declare const BlobGetEndpoint: HttpApiEndpoint.HttpApiEndpoint<"blob.get", "GET", "/api/experimental/blob/:id", Schema.toCodecStringTree<Schema.Struct<{
|
|
6
|
+
id: Schema.brand<Schema.String, "Blob.ID">;
|
|
7
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Uint8Array>, Schema.toCodecJson<typeof BlobNotFoundError>, never, never>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BlobStore } from "@opencode/schema/blob-store";
|
|
2
|
+
import { Schema } from "effect";
|
|
3
|
+
import { HttpApiEndpoint, HttpApiSchema, OpenApi } from "effect/http-api";
|
|
4
|
+
import { BlobNotFoundError } from "../errors.js";
|
|
5
|
+
/** Lives in the `server.experimental` group (see `groups/experimental.ts`). */
|
|
6
|
+
export const BlobGetEndpoint = HttpApiEndpoint.get("blob.get", "/api/experimental/blob/:id", {
|
|
7
|
+
params: { id: BlobStore.ID },
|
|
8
|
+
success: Schema.Uint8Array.pipe(HttpApiSchema.asUint8Array()),
|
|
9
|
+
error: [BlobNotFoundError],
|
|
10
|
+
}).annotateMerge(OpenApi.annotations({
|
|
11
|
+
identifier: "experimental.blob.get",
|
|
12
|
+
summary: "Read a blob",
|
|
13
|
+
description: "Stream a stored blob's bytes, such as a generated video, with single byte Range, ETag and 304 Not Modified support. Blobs are deleted 7 days after they're written. Experimental: may change without compatibility guarantees.",
|
|
14
|
+
// The route shares the `server.experimental` group with the persistent PTY prototype; tag it on its own.
|
|
15
|
+
transform: (operation) => ({ ...operation, tags: ["experimental"] }),
|
|
16
|
+
}));
|
package/dist/groups/event.d.ts
CHANGED
|
@@ -49,7 +49,7 @@ export declare const makeEventGroup: <const Definitions extends ReadonlyArray<De
|
|
|
49
49
|
readonly data: {};
|
|
50
50
|
}[]])[number]>, never, never, never>, false>;
|
|
51
51
|
export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpApiEndpoint.HttpApiEndpoint<"event.subscribe", "GET", "/api/event", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
52
|
-
readonly types: Schema.optional<Schema.ArrayEnsure<Schema.Union<readonly [Schema.Literals<readonly ("agent.updated" | "artifact.updated" | "command.updated" | "config.updated" | "credential.switched" | "credential.updated" | "filesystem.changed" | "form.cancelled" | "form.created" | "form.replied" | "installation.update-available" | "installation.updated" | "integration.updated" | "location.shutdown" | "mcp.resources.changed" | "mcp.status.changed" | "model.updated" | "models-dev.refreshed" | "permission.asked" | "permission.replied" | "persistent-pty.added" | "persistent-pty.removed" | "persistent-pty.updated" | "plugin.updated" | "project.updated" | "provider.updated" | "pty.created" | "pty.deleted" | "pty.exited" | "pty.updated" | "reference.updated" | "session.agent.selected" | "session.archived" | "session.compaction.delta" | "session.compaction.ended" | "session.compaction.failed" | "session.compaction.started" | "session.created" | "session.deleted" | "session.execution.failed" | "session.execution.interrupted" | "session.execution.started" | "session.execution.succeeded" | "session.forked" | "session.idle" | "session.inbox.cancelled" | "session.inbox.delivered" | "session.inbox.delivery.changed" | "session.inbox.enqueued" | "session.instructions.updated" | "session.metadata.updated" | "session.model.selected" | "session.moved" | "session.permissions" | "session.reasoning.delta" | "session.reasoning.ended" | "session.reasoning.started" | "session.renamed" | "session.retry.scheduled" | "session.revert.cleared" | "session.revert.committed" | "session.revert.staged" | "session.shell.ended" | "session.shell.started" | "session.skill.activated" | "session.status" | "session.step.ended" | "session.step.failed" | "session.step.started" | "session.step.streamed" | "session.synthetic" | "session.text.delta" | "session.text.ended" | "session.text.started" | "session.tool.called" | "session.tool.failed" | "session.tool.input.delta" | "session.tool.input.ended" | "session.tool.input.started" | "session.tool.progress" | "session.tool.success" | "session.unarchived" | "session.usage.updated" | "session.viewed" | "shell.created" | "shell.deleted" | "shell.exited" | "skill.updated" | "tui.command.execute" | "tui.prompt.append" | "tui.session.select" | "tui.toast.show" | "vcs.branch.updated" | "websearch.updated" | "worktree.resolved" | "worktree.updated")[]>, Schema.TemplateLiteral<readonly ["rpc.", Schema.String]>]>>>;
|
|
52
|
+
readonly types: Schema.optional<Schema.ArrayEnsure<Schema.Union<readonly [Schema.Literals<readonly ("agent.updated" | "artifact.updated" | "command.updated" | "config.updated" | "credential.switched" | "credential.updated" | "experimental.mcp.event" | "filesystem.changed" | "form.cancelled" | "form.created" | "form.replied" | "installation.update-available" | "installation.updated" | "integration.updated" | "location.shutdown" | "mcp.resources.changed" | "mcp.status.changed" | "model.updated" | "models-dev.refreshed" | "permission.asked" | "permission.replied" | "persistent-pty.added" | "persistent-pty.removed" | "persistent-pty.updated" | "plugin.updated" | "project.updated" | "provider.updated" | "pty.created" | "pty.deleted" | "pty.exited" | "pty.updated" | "reference.updated" | "session.agent.selected" | "session.archived" | "session.compaction.delta" | "session.compaction.ended" | "session.compaction.failed" | "session.compaction.started" | "session.created" | "session.deleted" | "session.execution.failed" | "session.execution.interrupted" | "session.execution.started" | "session.execution.succeeded" | "session.forked" | "session.idle" | "session.inbox.cancelled" | "session.inbox.delivered" | "session.inbox.delivery.changed" | "session.inbox.enqueued" | "session.instructions.updated" | "session.metadata.updated" | "session.model.selected" | "session.moved" | "session.permissions" | "session.reasoning.delta" | "session.reasoning.ended" | "session.reasoning.started" | "session.renamed" | "session.retry.scheduled" | "session.revert.cleared" | "session.revert.committed" | "session.revert.staged" | "session.shell.ended" | "session.shell.started" | "session.skill.activated" | "session.status" | "session.step.ended" | "session.step.failed" | "session.step.first-token" | "session.step.started" | "session.step.streamed" | "session.synthetic" | "session.text.delta" | "session.text.ended" | "session.text.started" | "session.tool.called" | "session.tool.failed" | "session.tool.input.delta" | "session.tool.input.ended" | "session.tool.input.started" | "session.tool.progress" | "session.tool.success" | "session.unarchived" | "session.usage.updated" | "session.viewed" | "shell.created" | "shell.deleted" | "shell.exited" | "skill.updated" | "tui.command.execute" | "tui.prompt.append" | "tui.session.select" | "tui.toast.show" | "vcs.branch.updated" | "websearch.updated" | "worktree.resolved" | "worktree.updated")[]>, Schema.TemplateLiteral<readonly ["rpc.", Schema.String]>]>>>;
|
|
53
53
|
}>>, never, never, HttpApiSchema.StreamSse<HttpApiSchema.SseEventFromData<Schema.Union<readonly [Schema.Struct<{
|
|
54
54
|
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
55
55
|
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
@@ -2596,6 +2596,62 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
|
|
|
2596
2596
|
readonly snapshot: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Snapshot.ID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Snapshot.ID">>, never, never>;
|
|
2597
2597
|
readonly started: Schema.Int;
|
|
2598
2598
|
}>;
|
|
2599
|
+
}, Schema.Struct<{
|
|
2600
|
+
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
2601
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
2602
|
+
};
|
|
2603
|
+
readonly created: Schema.Finite;
|
|
2604
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
2605
|
+
readonly type: Schema.Literal<"session.step.first-token">;
|
|
2606
|
+
readonly durable: Schema.Struct<{
|
|
2607
|
+
readonly aggregateID: Schema.String;
|
|
2608
|
+
readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
|
|
2609
|
+
readonly version: Schema.decodeTo<Schema.toType<Schema.brand<Schema.Int, "Event.Version">>, Schema.Literal<number>, never, never>;
|
|
2610
|
+
}>;
|
|
2611
|
+
readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
2612
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
2613
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
2614
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
2615
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
2616
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
2617
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
2618
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
2619
|
+
}>, never, never>;
|
|
2620
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
2621
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
2622
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
2623
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
2624
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
2625
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
2626
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
2627
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
2628
|
+
}>, never, never>;
|
|
2629
|
+
}>>, never, never>;
|
|
2630
|
+
readonly data: Schema.Struct<{
|
|
2631
|
+
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
2632
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
2633
|
+
};
|
|
2634
|
+
readonly assistantMessageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
2635
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
2636
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
2637
|
+
};
|
|
2638
|
+
}>;
|
|
2639
|
+
}> & {
|
|
2640
|
+
type: "session.step.first-token";
|
|
2641
|
+
durability: "durable";
|
|
2642
|
+
durable: {
|
|
2643
|
+
readonly version: number;
|
|
2644
|
+
readonly aggregate: string;
|
|
2645
|
+
};
|
|
2646
|
+
data: Schema.Struct<{
|
|
2647
|
+
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
2648
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
2649
|
+
};
|
|
2650
|
+
readonly assistantMessageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
2651
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
2652
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
2653
|
+
};
|
|
2654
|
+
}>;
|
|
2599
2655
|
}, Schema.Struct<{
|
|
2600
2656
|
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
2601
2657
|
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
@@ -6428,6 +6484,56 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
|
|
|
6428
6484
|
data: Schema.Struct<{
|
|
6429
6485
|
readonly server: Schema.String;
|
|
6430
6486
|
}>;
|
|
6487
|
+
}, Schema.Struct<{
|
|
6488
|
+
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
6489
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
6490
|
+
};
|
|
6491
|
+
readonly created: Schema.Finite;
|
|
6492
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
6493
|
+
readonly type: Schema.Literal<"experimental.mcp.event">;
|
|
6494
|
+
readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
6495
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
6496
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
6497
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
6498
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
6499
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
6500
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
6501
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
6502
|
+
}>, never, never>;
|
|
6503
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
6504
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
6505
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
6506
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
6507
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
6508
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
6509
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
6510
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
6511
|
+
}>, never, never>;
|
|
6512
|
+
}>>, never, never>;
|
|
6513
|
+
readonly data: Schema.Struct<{
|
|
6514
|
+
readonly id: Schema.String;
|
|
6515
|
+
readonly server: Schema.String;
|
|
6516
|
+
readonly name: Schema.String;
|
|
6517
|
+
readonly eventId: Schema.String;
|
|
6518
|
+
readonly timestamp: Schema.String;
|
|
6519
|
+
readonly data: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
6520
|
+
readonly cursor: Schema.NullOr<Schema.String>;
|
|
6521
|
+
readonly truncated: Schema.optional<Schema.Boolean>;
|
|
6522
|
+
}>;
|
|
6523
|
+
}> & {
|
|
6524
|
+
type: "experimental.mcp.event";
|
|
6525
|
+
durability: "ephemeral";
|
|
6526
|
+
durable: undefined;
|
|
6527
|
+
data: Schema.Struct<{
|
|
6528
|
+
readonly id: Schema.String;
|
|
6529
|
+
readonly server: Schema.String;
|
|
6530
|
+
readonly name: Schema.String;
|
|
6531
|
+
readonly eventId: Schema.String;
|
|
6532
|
+
readonly timestamp: Schema.String;
|
|
6533
|
+
readonly data: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
6534
|
+
readonly cursor: Schema.NullOr<Schema.String>;
|
|
6535
|
+
readonly truncated: Schema.optional<Schema.Boolean>;
|
|
6536
|
+
}>;
|
|
6431
6537
|
}, Schema.Struct<{
|
|
6432
6538
|
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
6433
6539
|
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
@@ -7402,6 +7508,26 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
|
|
|
7402
7508
|
readonly snapshot?: (string & import("effect/Brand").Brand<"Snapshot.ID">) | undefined;
|
|
7403
7509
|
readonly files?: readonly (string & import("effect/Brand").Brand<"RelativePath">)[] | undefined;
|
|
7404
7510
|
};
|
|
7511
|
+
} | {
|
|
7512
|
+
readonly id: string & import("effect/Brand").Brand<"Event.ID">;
|
|
7513
|
+
readonly created: number;
|
|
7514
|
+
readonly metadata?: {
|
|
7515
|
+
readonly [x: string]: unknown;
|
|
7516
|
+
} | undefined;
|
|
7517
|
+
readonly type: "session.step.first-token";
|
|
7518
|
+
readonly durable: {
|
|
7519
|
+
readonly aggregateID: string;
|
|
7520
|
+
readonly seq: number & import("effect/Brand").Brand<"Event.Seq">;
|
|
7521
|
+
readonly version: number & import("effect/Brand").Brand<"Event.Version">;
|
|
7522
|
+
};
|
|
7523
|
+
readonly location?: {
|
|
7524
|
+
readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
|
|
7525
|
+
readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
|
|
7526
|
+
} | undefined;
|
|
7527
|
+
readonly data: {
|
|
7528
|
+
readonly sessionID: string & import("effect/Brand").Brand<"SessionID">;
|
|
7529
|
+
readonly assistantMessageID: string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
7530
|
+
};
|
|
7405
7531
|
} | {
|
|
7406
7532
|
readonly id: string & import("effect/Brand").Brand<"Event.ID">;
|
|
7407
7533
|
readonly created: number;
|
|
@@ -7830,6 +7956,27 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
|
|
|
7830
7956
|
readonly integrationID: string & import("effect/Brand").Brand<"Integration.ID">;
|
|
7831
7957
|
readonly credentialID: string & import("effect/Brand").Brand<"Credential.ID">;
|
|
7832
7958
|
};
|
|
7959
|
+
} | {
|
|
7960
|
+
readonly id: string & import("effect/Brand").Brand<"Event.ID">;
|
|
7961
|
+
readonly created: number;
|
|
7962
|
+
readonly metadata?: {
|
|
7963
|
+
readonly [x: string]: unknown;
|
|
7964
|
+
} | undefined;
|
|
7965
|
+
readonly type: "experimental.mcp.event";
|
|
7966
|
+
readonly location?: {
|
|
7967
|
+
readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
|
|
7968
|
+
readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
|
|
7969
|
+
} | undefined;
|
|
7970
|
+
readonly data: {
|
|
7971
|
+
readonly id: string;
|
|
7972
|
+
readonly server: string;
|
|
7973
|
+
readonly name: string;
|
|
7974
|
+
readonly eventId: string;
|
|
7975
|
+
readonly timestamp: string;
|
|
7976
|
+
readonly data: Schema.Json;
|
|
7977
|
+
readonly cursor: string | null;
|
|
7978
|
+
readonly truncated?: boolean | undefined;
|
|
7979
|
+
};
|
|
7833
7980
|
} | {
|
|
7834
7981
|
readonly id: string & import("effect/Brand").Brand<"Event.ID">;
|
|
7835
7982
|
readonly created: number;
|
|
@@ -11360,6 +11507,62 @@ export declare const OpenCodeEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
11360
11507
|
readonly snapshot: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Snapshot.ID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Snapshot.ID">>, never, never>;
|
|
11361
11508
|
readonly started: Schema.Int;
|
|
11362
11509
|
}>;
|
|
11510
|
+
}, Schema.Struct<{
|
|
11511
|
+
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
11512
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
11513
|
+
};
|
|
11514
|
+
readonly created: Schema.Finite;
|
|
11515
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
11516
|
+
readonly type: Schema.Literal<"session.step.first-token">;
|
|
11517
|
+
readonly durable: Schema.Struct<{
|
|
11518
|
+
readonly aggregateID: Schema.String;
|
|
11519
|
+
readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
|
|
11520
|
+
readonly version: Schema.decodeTo<Schema.toType<Schema.brand<Schema.Int, "Event.Version">>, Schema.Literal<number>, never, never>;
|
|
11521
|
+
}>;
|
|
11522
|
+
readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
11523
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
11524
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
11525
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
11526
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
11527
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
11528
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
11529
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
11530
|
+
}>, never, never>;
|
|
11531
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
11532
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
11533
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
11534
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
11535
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
11536
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
11537
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
11538
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
11539
|
+
}>, never, never>;
|
|
11540
|
+
}>>, never, never>;
|
|
11541
|
+
readonly data: Schema.Struct<{
|
|
11542
|
+
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
11543
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
11544
|
+
};
|
|
11545
|
+
readonly assistantMessageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
11546
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
11547
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
11548
|
+
};
|
|
11549
|
+
}>;
|
|
11550
|
+
}> & {
|
|
11551
|
+
type: "session.step.first-token";
|
|
11552
|
+
durability: "durable";
|
|
11553
|
+
durable: {
|
|
11554
|
+
readonly version: number;
|
|
11555
|
+
readonly aggregate: string;
|
|
11556
|
+
};
|
|
11557
|
+
data: Schema.Struct<{
|
|
11558
|
+
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
11559
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
11560
|
+
};
|
|
11561
|
+
readonly assistantMessageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
11562
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
11563
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
11564
|
+
};
|
|
11565
|
+
}>;
|
|
11363
11566
|
}, Schema.Struct<{
|
|
11364
11567
|
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
11365
11568
|
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
@@ -15192,6 +15395,56 @@ export declare const OpenCodeEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
15192
15395
|
data: Schema.Struct<{
|
|
15193
15396
|
readonly server: Schema.String;
|
|
15194
15397
|
}>;
|
|
15398
|
+
}, Schema.Struct<{
|
|
15399
|
+
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
15400
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
15401
|
+
};
|
|
15402
|
+
readonly created: Schema.Finite;
|
|
15403
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
15404
|
+
readonly type: Schema.Literal<"experimental.mcp.event">;
|
|
15405
|
+
readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
15406
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
15407
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
15408
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
15409
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
15410
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
15411
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
15412
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
15413
|
+
}>, never, never>;
|
|
15414
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
15415
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
15416
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
15417
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
15418
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
15419
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
15420
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
15421
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
15422
|
+
}>, never, never>;
|
|
15423
|
+
}>>, never, never>;
|
|
15424
|
+
readonly data: Schema.Struct<{
|
|
15425
|
+
readonly id: Schema.String;
|
|
15426
|
+
readonly server: Schema.String;
|
|
15427
|
+
readonly name: Schema.String;
|
|
15428
|
+
readonly eventId: Schema.String;
|
|
15429
|
+
readonly timestamp: Schema.String;
|
|
15430
|
+
readonly data: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
15431
|
+
readonly cursor: Schema.NullOr<Schema.String>;
|
|
15432
|
+
readonly truncated: Schema.optional<Schema.Boolean>;
|
|
15433
|
+
}>;
|
|
15434
|
+
}> & {
|
|
15435
|
+
type: "experimental.mcp.event";
|
|
15436
|
+
durability: "ephemeral";
|
|
15437
|
+
durable: undefined;
|
|
15438
|
+
data: Schema.Struct<{
|
|
15439
|
+
readonly id: Schema.String;
|
|
15440
|
+
readonly server: Schema.String;
|
|
15441
|
+
readonly name: Schema.String;
|
|
15442
|
+
readonly eventId: Schema.String;
|
|
15443
|
+
readonly timestamp: Schema.String;
|
|
15444
|
+
readonly data: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
15445
|
+
readonly cursor: Schema.NullOr<Schema.String>;
|
|
15446
|
+
readonly truncated: Schema.optional<Schema.Boolean>;
|
|
15447
|
+
}>;
|
|
15195
15448
|
}, Schema.Struct<{
|
|
15196
15449
|
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
15197
15450
|
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|