@opencode/protocol 0.0.0-dev-1315 → 0.0.0-dev-1317
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/event.d.ts +425 -1
- package/dist/groups/experimental.d.ts +3 -1
- package/dist/groups/job.d.ts +4 -2
- package/dist/groups/job.js +10 -1
- package/package.json +2 -2
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" | "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]>]>>>;
|
|
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.job.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">;
|
|
@@ -5586,6 +5586,182 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
|
|
|
5586
5586
|
ascending: (id?: string) => string & import("effect/Brand").Brand<"Shell.ID">;
|
|
5587
5587
|
};
|
|
5588
5588
|
}>;
|
|
5589
|
+
}, Schema.Struct<{
|
|
5590
|
+
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
5591
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
5592
|
+
};
|
|
5593
|
+
readonly created: Schema.Finite;
|
|
5594
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
5595
|
+
readonly type: Schema.Literal<"experimental.job.updated">;
|
|
5596
|
+
readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
5597
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
5598
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
5599
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
5600
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
5601
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
5602
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
5603
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
5604
|
+
}>, never, never>;
|
|
5605
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
5606
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
5607
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
5608
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
5609
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
5610
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
5611
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
5612
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
5613
|
+
}>, never, never>;
|
|
5614
|
+
}>>, never, never>;
|
|
5615
|
+
readonly data: Schema.Struct<{
|
|
5616
|
+
readonly info: Schema.Union<readonly [Schema.Struct<{
|
|
5617
|
+
readonly id: Schema.String;
|
|
5618
|
+
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
5619
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
5620
|
+
};
|
|
5621
|
+
readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
|
|
5622
|
+
readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
5623
|
+
readonly time: Schema.Struct<{
|
|
5624
|
+
readonly started: Schema.Finite;
|
|
5625
|
+
readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
|
|
5626
|
+
}>;
|
|
5627
|
+
readonly kind: Schema.tag<"shell">;
|
|
5628
|
+
readonly shellID: Schema.String;
|
|
5629
|
+
readonly command: Schema.String;
|
|
5630
|
+
}>, Schema.Struct<{
|
|
5631
|
+
readonly id: Schema.String;
|
|
5632
|
+
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
5633
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
5634
|
+
};
|
|
5635
|
+
readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
|
|
5636
|
+
readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
5637
|
+
readonly time: Schema.Struct<{
|
|
5638
|
+
readonly started: Schema.Finite;
|
|
5639
|
+
readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
|
|
5640
|
+
}>;
|
|
5641
|
+
readonly kind: Schema.tag<"subagent">;
|
|
5642
|
+
readonly childSessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
5643
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
5644
|
+
};
|
|
5645
|
+
readonly agent: Schema.String;
|
|
5646
|
+
readonly description: Schema.String;
|
|
5647
|
+
}>, Schema.Struct<{
|
|
5648
|
+
readonly id: Schema.String;
|
|
5649
|
+
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
5650
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
5651
|
+
};
|
|
5652
|
+
readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
|
|
5653
|
+
readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
5654
|
+
readonly time: Schema.Struct<{
|
|
5655
|
+
readonly started: Schema.Finite;
|
|
5656
|
+
readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
|
|
5657
|
+
}>;
|
|
5658
|
+
readonly kind: Schema.tag<"image">;
|
|
5659
|
+
readonly path: Schema.String;
|
|
5660
|
+
readonly model: Schema.String;
|
|
5661
|
+
}>, Schema.Struct<{
|
|
5662
|
+
readonly id: Schema.String;
|
|
5663
|
+
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
5664
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
5665
|
+
};
|
|
5666
|
+
readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
|
|
5667
|
+
readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
5668
|
+
readonly time: Schema.Struct<{
|
|
5669
|
+
readonly started: Schema.Finite;
|
|
5670
|
+
readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
|
|
5671
|
+
}>;
|
|
5672
|
+
readonly kind: Schema.tag<"video">;
|
|
5673
|
+
readonly path: Schema.String;
|
|
5674
|
+
}>, Schema.Struct<{
|
|
5675
|
+
readonly id: Schema.String;
|
|
5676
|
+
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
5677
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
5678
|
+
};
|
|
5679
|
+
readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
|
|
5680
|
+
readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
5681
|
+
readonly time: Schema.Struct<{
|
|
5682
|
+
readonly started: Schema.Finite;
|
|
5683
|
+
readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
|
|
5684
|
+
}>;
|
|
5685
|
+
readonly kind: Schema.tag<"codemode">;
|
|
5686
|
+
}>]>;
|
|
5687
|
+
}>;
|
|
5688
|
+
}> & {
|
|
5689
|
+
type: "experimental.job.updated";
|
|
5690
|
+
durability: "ephemeral";
|
|
5691
|
+
durable: undefined;
|
|
5692
|
+
data: Schema.Struct<{
|
|
5693
|
+
readonly info: Schema.Union<readonly [Schema.Struct<{
|
|
5694
|
+
readonly id: Schema.String;
|
|
5695
|
+
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
5696
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
5697
|
+
};
|
|
5698
|
+
readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
|
|
5699
|
+
readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
5700
|
+
readonly time: Schema.Struct<{
|
|
5701
|
+
readonly started: Schema.Finite;
|
|
5702
|
+
readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
|
|
5703
|
+
}>;
|
|
5704
|
+
readonly kind: Schema.tag<"shell">;
|
|
5705
|
+
readonly shellID: Schema.String;
|
|
5706
|
+
readonly command: Schema.String;
|
|
5707
|
+
}>, Schema.Struct<{
|
|
5708
|
+
readonly id: Schema.String;
|
|
5709
|
+
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
5710
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
5711
|
+
};
|
|
5712
|
+
readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
|
|
5713
|
+
readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
5714
|
+
readonly time: Schema.Struct<{
|
|
5715
|
+
readonly started: Schema.Finite;
|
|
5716
|
+
readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
|
|
5717
|
+
}>;
|
|
5718
|
+
readonly kind: Schema.tag<"subagent">;
|
|
5719
|
+
readonly childSessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
5720
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
5721
|
+
};
|
|
5722
|
+
readonly agent: Schema.String;
|
|
5723
|
+
readonly description: Schema.String;
|
|
5724
|
+
}>, Schema.Struct<{
|
|
5725
|
+
readonly id: Schema.String;
|
|
5726
|
+
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
5727
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
5728
|
+
};
|
|
5729
|
+
readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
|
|
5730
|
+
readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
5731
|
+
readonly time: Schema.Struct<{
|
|
5732
|
+
readonly started: Schema.Finite;
|
|
5733
|
+
readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
|
|
5734
|
+
}>;
|
|
5735
|
+
readonly kind: Schema.tag<"image">;
|
|
5736
|
+
readonly path: Schema.String;
|
|
5737
|
+
readonly model: Schema.String;
|
|
5738
|
+
}>, Schema.Struct<{
|
|
5739
|
+
readonly id: Schema.String;
|
|
5740
|
+
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
5741
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
5742
|
+
};
|
|
5743
|
+
readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
|
|
5744
|
+
readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
5745
|
+
readonly time: Schema.Struct<{
|
|
5746
|
+
readonly started: Schema.Finite;
|
|
5747
|
+
readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
|
|
5748
|
+
}>;
|
|
5749
|
+
readonly kind: Schema.tag<"video">;
|
|
5750
|
+
readonly path: Schema.String;
|
|
5751
|
+
}>, Schema.Struct<{
|
|
5752
|
+
readonly id: Schema.String;
|
|
5753
|
+
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
5754
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
5755
|
+
};
|
|
5756
|
+
readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
|
|
5757
|
+
readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
5758
|
+
readonly time: Schema.Struct<{
|
|
5759
|
+
readonly started: Schema.Finite;
|
|
5760
|
+
readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
|
|
5761
|
+
}>;
|
|
5762
|
+
readonly kind: Schema.tag<"codemode">;
|
|
5763
|
+
}>]>;
|
|
5764
|
+
}>;
|
|
5589
5765
|
}, Schema.Struct<{
|
|
5590
5766
|
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
5591
5767
|
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
@@ -7956,6 +8132,78 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
|
|
|
7956
8132
|
readonly integrationID: string & import("effect/Brand").Brand<"Integration.ID">;
|
|
7957
8133
|
readonly credentialID: string & import("effect/Brand").Brand<"Credential.ID">;
|
|
7958
8134
|
};
|
|
8135
|
+
} | {
|
|
8136
|
+
readonly id: string & import("effect/Brand").Brand<"Event.ID">;
|
|
8137
|
+
readonly created: number;
|
|
8138
|
+
readonly metadata?: {
|
|
8139
|
+
readonly [x: string]: unknown;
|
|
8140
|
+
} | undefined;
|
|
8141
|
+
readonly type: "experimental.job.updated";
|
|
8142
|
+
readonly location?: {
|
|
8143
|
+
readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
|
|
8144
|
+
readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
|
|
8145
|
+
} | undefined;
|
|
8146
|
+
readonly data: {
|
|
8147
|
+
readonly info: {
|
|
8148
|
+
readonly id: string;
|
|
8149
|
+
readonly sessionID: string & import("effect/Brand").Brand<"SessionID">;
|
|
8150
|
+
readonly status: "cancelled" | "completed" | "error" | "running";
|
|
8151
|
+
readonly title?: string | undefined;
|
|
8152
|
+
readonly time: {
|
|
8153
|
+
readonly started: number;
|
|
8154
|
+
readonly completed?: number | undefined;
|
|
8155
|
+
};
|
|
8156
|
+
readonly kind: "shell";
|
|
8157
|
+
readonly shellID: string;
|
|
8158
|
+
readonly command: string;
|
|
8159
|
+
} | {
|
|
8160
|
+
readonly id: string;
|
|
8161
|
+
readonly sessionID: string & import("effect/Brand").Brand<"SessionID">;
|
|
8162
|
+
readonly status: "cancelled" | "completed" | "error" | "running";
|
|
8163
|
+
readonly title?: string | undefined;
|
|
8164
|
+
readonly time: {
|
|
8165
|
+
readonly started: number;
|
|
8166
|
+
readonly completed?: number | undefined;
|
|
8167
|
+
};
|
|
8168
|
+
readonly kind: "subagent";
|
|
8169
|
+
readonly childSessionID: string & import("effect/Brand").Brand<"SessionID">;
|
|
8170
|
+
readonly agent: string;
|
|
8171
|
+
readonly description: string;
|
|
8172
|
+
} | {
|
|
8173
|
+
readonly id: string;
|
|
8174
|
+
readonly sessionID: string & import("effect/Brand").Brand<"SessionID">;
|
|
8175
|
+
readonly status: "cancelled" | "completed" | "error" | "running";
|
|
8176
|
+
readonly title?: string | undefined;
|
|
8177
|
+
readonly time: {
|
|
8178
|
+
readonly started: number;
|
|
8179
|
+
readonly completed?: number | undefined;
|
|
8180
|
+
};
|
|
8181
|
+
readonly kind: "image";
|
|
8182
|
+
readonly path: string;
|
|
8183
|
+
readonly model: string;
|
|
8184
|
+
} | {
|
|
8185
|
+
readonly id: string;
|
|
8186
|
+
readonly sessionID: string & import("effect/Brand").Brand<"SessionID">;
|
|
8187
|
+
readonly status: "cancelled" | "completed" | "error" | "running";
|
|
8188
|
+
readonly title?: string | undefined;
|
|
8189
|
+
readonly time: {
|
|
8190
|
+
readonly started: number;
|
|
8191
|
+
readonly completed?: number | undefined;
|
|
8192
|
+
};
|
|
8193
|
+
readonly kind: "video";
|
|
8194
|
+
readonly path: string;
|
|
8195
|
+
} | {
|
|
8196
|
+
readonly id: string;
|
|
8197
|
+
readonly sessionID: string & import("effect/Brand").Brand<"SessionID">;
|
|
8198
|
+
readonly status: "cancelled" | "completed" | "error" | "running";
|
|
8199
|
+
readonly title?: string | undefined;
|
|
8200
|
+
readonly time: {
|
|
8201
|
+
readonly started: number;
|
|
8202
|
+
readonly completed?: number | undefined;
|
|
8203
|
+
};
|
|
8204
|
+
readonly kind: "codemode";
|
|
8205
|
+
};
|
|
8206
|
+
};
|
|
7959
8207
|
} | {
|
|
7960
8208
|
readonly id: string & import("effect/Brand").Brand<"Event.ID">;
|
|
7961
8209
|
readonly created: number;
|
|
@@ -14497,6 +14745,182 @@ export declare const OpenCodeEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
14497
14745
|
ascending: (id?: string) => string & import("effect/Brand").Brand<"Shell.ID">;
|
|
14498
14746
|
};
|
|
14499
14747
|
}>;
|
|
14748
|
+
}, Schema.Struct<{
|
|
14749
|
+
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
14750
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
14751
|
+
};
|
|
14752
|
+
readonly created: Schema.Finite;
|
|
14753
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
14754
|
+
readonly type: Schema.Literal<"experimental.job.updated">;
|
|
14755
|
+
readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
14756
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
14757
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
14758
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
14759
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
14760
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
14761
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
14762
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
14763
|
+
}>, never, never>;
|
|
14764
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
14765
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
14766
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
14767
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
14768
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
14769
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
14770
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
14771
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
14772
|
+
}>, never, never>;
|
|
14773
|
+
}>>, never, never>;
|
|
14774
|
+
readonly data: Schema.Struct<{
|
|
14775
|
+
readonly info: Schema.Union<readonly [Schema.Struct<{
|
|
14776
|
+
readonly id: Schema.String;
|
|
14777
|
+
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
14778
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
14779
|
+
};
|
|
14780
|
+
readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
|
|
14781
|
+
readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
14782
|
+
readonly time: Schema.Struct<{
|
|
14783
|
+
readonly started: Schema.Finite;
|
|
14784
|
+
readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
|
|
14785
|
+
}>;
|
|
14786
|
+
readonly kind: Schema.tag<"shell">;
|
|
14787
|
+
readonly shellID: Schema.String;
|
|
14788
|
+
readonly command: Schema.String;
|
|
14789
|
+
}>, Schema.Struct<{
|
|
14790
|
+
readonly id: Schema.String;
|
|
14791
|
+
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
14792
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
14793
|
+
};
|
|
14794
|
+
readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
|
|
14795
|
+
readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
14796
|
+
readonly time: Schema.Struct<{
|
|
14797
|
+
readonly started: Schema.Finite;
|
|
14798
|
+
readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
|
|
14799
|
+
}>;
|
|
14800
|
+
readonly kind: Schema.tag<"subagent">;
|
|
14801
|
+
readonly childSessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
14802
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
14803
|
+
};
|
|
14804
|
+
readonly agent: Schema.String;
|
|
14805
|
+
readonly description: Schema.String;
|
|
14806
|
+
}>, Schema.Struct<{
|
|
14807
|
+
readonly id: Schema.String;
|
|
14808
|
+
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
14809
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
14810
|
+
};
|
|
14811
|
+
readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
|
|
14812
|
+
readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
14813
|
+
readonly time: Schema.Struct<{
|
|
14814
|
+
readonly started: Schema.Finite;
|
|
14815
|
+
readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
|
|
14816
|
+
}>;
|
|
14817
|
+
readonly kind: Schema.tag<"image">;
|
|
14818
|
+
readonly path: Schema.String;
|
|
14819
|
+
readonly model: Schema.String;
|
|
14820
|
+
}>, Schema.Struct<{
|
|
14821
|
+
readonly id: Schema.String;
|
|
14822
|
+
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
14823
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
14824
|
+
};
|
|
14825
|
+
readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
|
|
14826
|
+
readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
14827
|
+
readonly time: Schema.Struct<{
|
|
14828
|
+
readonly started: Schema.Finite;
|
|
14829
|
+
readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
|
|
14830
|
+
}>;
|
|
14831
|
+
readonly kind: Schema.tag<"video">;
|
|
14832
|
+
readonly path: Schema.String;
|
|
14833
|
+
}>, Schema.Struct<{
|
|
14834
|
+
readonly id: Schema.String;
|
|
14835
|
+
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
14836
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
14837
|
+
};
|
|
14838
|
+
readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
|
|
14839
|
+
readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
14840
|
+
readonly time: Schema.Struct<{
|
|
14841
|
+
readonly started: Schema.Finite;
|
|
14842
|
+
readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
|
|
14843
|
+
}>;
|
|
14844
|
+
readonly kind: Schema.tag<"codemode">;
|
|
14845
|
+
}>]>;
|
|
14846
|
+
}>;
|
|
14847
|
+
}> & {
|
|
14848
|
+
type: "experimental.job.updated";
|
|
14849
|
+
durability: "ephemeral";
|
|
14850
|
+
durable: undefined;
|
|
14851
|
+
data: Schema.Struct<{
|
|
14852
|
+
readonly info: Schema.Union<readonly [Schema.Struct<{
|
|
14853
|
+
readonly id: Schema.String;
|
|
14854
|
+
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
14855
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
14856
|
+
};
|
|
14857
|
+
readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
|
|
14858
|
+
readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
14859
|
+
readonly time: Schema.Struct<{
|
|
14860
|
+
readonly started: Schema.Finite;
|
|
14861
|
+
readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
|
|
14862
|
+
}>;
|
|
14863
|
+
readonly kind: Schema.tag<"shell">;
|
|
14864
|
+
readonly shellID: Schema.String;
|
|
14865
|
+
readonly command: Schema.String;
|
|
14866
|
+
}>, Schema.Struct<{
|
|
14867
|
+
readonly id: Schema.String;
|
|
14868
|
+
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
14869
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
14870
|
+
};
|
|
14871
|
+
readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
|
|
14872
|
+
readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
14873
|
+
readonly time: Schema.Struct<{
|
|
14874
|
+
readonly started: Schema.Finite;
|
|
14875
|
+
readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
|
|
14876
|
+
}>;
|
|
14877
|
+
readonly kind: Schema.tag<"subagent">;
|
|
14878
|
+
readonly childSessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
14879
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
14880
|
+
};
|
|
14881
|
+
readonly agent: Schema.String;
|
|
14882
|
+
readonly description: Schema.String;
|
|
14883
|
+
}>, Schema.Struct<{
|
|
14884
|
+
readonly id: Schema.String;
|
|
14885
|
+
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
14886
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
14887
|
+
};
|
|
14888
|
+
readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
|
|
14889
|
+
readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
14890
|
+
readonly time: Schema.Struct<{
|
|
14891
|
+
readonly started: Schema.Finite;
|
|
14892
|
+
readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
|
|
14893
|
+
}>;
|
|
14894
|
+
readonly kind: Schema.tag<"image">;
|
|
14895
|
+
readonly path: Schema.String;
|
|
14896
|
+
readonly model: Schema.String;
|
|
14897
|
+
}>, Schema.Struct<{
|
|
14898
|
+
readonly id: Schema.String;
|
|
14899
|
+
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
14900
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
14901
|
+
};
|
|
14902
|
+
readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
|
|
14903
|
+
readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
14904
|
+
readonly time: Schema.Struct<{
|
|
14905
|
+
readonly started: Schema.Finite;
|
|
14906
|
+
readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
|
|
14907
|
+
}>;
|
|
14908
|
+
readonly kind: Schema.tag<"video">;
|
|
14909
|
+
readonly path: Schema.String;
|
|
14910
|
+
}>, Schema.Struct<{
|
|
14911
|
+
readonly id: Schema.String;
|
|
14912
|
+
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
14913
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
14914
|
+
};
|
|
14915
|
+
readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
|
|
14916
|
+
readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
14917
|
+
readonly time: Schema.Struct<{
|
|
14918
|
+
readonly started: Schema.Finite;
|
|
14919
|
+
readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
|
|
14920
|
+
}>;
|
|
14921
|
+
readonly kind: Schema.tag<"codemode">;
|
|
14922
|
+
}>]>;
|
|
14923
|
+
}>;
|
|
14500
14924
|
}, Schema.Struct<{
|
|
14501
14925
|
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
14502
14926
|
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
@@ -564,7 +564,9 @@ export declare const ExperimentalGroup: import("effect/http-api/HttpApiGroup").H
|
|
|
564
564
|
id: import("effect/Schema").brand<import("effect/Schema").String, "Blob.ID"> & {
|
|
565
565
|
create: () => string & import("effect/Brand").Brand<"Blob.ID">;
|
|
566
566
|
};
|
|
567
|
-
}>>, never, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Uint8Array>, import("effect/Schema").toCodecJson<typeof import("../errors.js").BlobNotFoundError>, never, never> | import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"job.
|
|
567
|
+
}>>, never, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Uint8Array>, import("effect/Schema").toCodecJson<typeof import("../errors.js").BlobNotFoundError>, never, never> | import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"job.cancel", "POST", "/api/experimental/job/:id/cancel", import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
|
|
568
|
+
id: import("effect/Schema").String;
|
|
569
|
+
}>>, never, never, never, import("effect/Schema").toCodecJson<import("effect/http-api/HttpApiSchema").NoContent>, never, never, never> | import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"job.list", "GET", "/api/experimental/job", never, import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
|
|
568
570
|
readonly sessionID: import("effect/Schema").optional<import("effect/Schema").brand<import("effect/Schema").String, "SessionID"> & {
|
|
569
571
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
570
572
|
}>;
|
package/dist/groups/job.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { HttpApiEndpoint } from "effect/http-api";
|
|
2
|
+
import { HttpApiEndpoint, HttpApiSchema } from "effect/http-api";
|
|
3
3
|
import { InvalidRequestError, SessionNotFoundError } from "../errors.js";
|
|
4
4
|
export declare const ListQuery: Schema.Struct<{
|
|
5
5
|
readonly sessionID: Schema.optional<Schema.brand<Schema.String, "SessionID"> & {
|
|
@@ -90,4 +90,6 @@ export declare const JobEndpoints: readonly [HttpApiEndpoint.HttpApiEndpoint<"jo
|
|
|
90
90
|
}>;
|
|
91
91
|
readonly kind: Schema.tag<"codemode">;
|
|
92
92
|
}>]>>;
|
|
93
|
-
}>>, Schema.toCodecJson<typeof InvalidRequestError | typeof SessionNotFoundError>, never, never
|
|
93
|
+
}>>, Schema.toCodecJson<typeof InvalidRequestError | typeof SessionNotFoundError>, never, never>, HttpApiEndpoint.HttpApiEndpoint<"job.cancel", "POST", "/api/experimental/job/:id/cancel", Schema.toCodecStringTree<Schema.Struct<{
|
|
94
|
+
id: Schema.String;
|
|
95
|
+
}>>, never, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, never, never, never>];
|
package/dist/groups/job.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Job } from "@opencode/schema/job";
|
|
2
2
|
import { Session } from "@opencode/schema/session";
|
|
3
3
|
import { Schema, SchemaGetter } from "effect";
|
|
4
|
-
import { HttpApiEndpoint, OpenApi } from "effect/http-api";
|
|
4
|
+
import { HttpApiEndpoint, HttpApiSchema, OpenApi } from "effect/http-api";
|
|
5
5
|
import { InvalidRequestError, SessionNotFoundError } from "../errors.js";
|
|
6
6
|
const BooleanFromString = Schema.Literals(["true", "false"]).pipe(Schema.decodeTo(Schema.Boolean, {
|
|
7
7
|
decode: SchemaGetter.transform((value) => value === "true"),
|
|
@@ -33,4 +33,13 @@ export const JobEndpoints = [
|
|
|
33
33
|
description: "List active and unconsumed background jobs, optionally filtered by owning session, descendants, or kind. Experimental: may change without compatibility guarantees.",
|
|
34
34
|
transform: (operation) => ({ ...operation, tags: ["experimental"] }),
|
|
35
35
|
})),
|
|
36
|
+
HttpApiEndpoint.post("job.cancel", "/api/experimental/job/:id/cancel", {
|
|
37
|
+
params: { id: Schema.String },
|
|
38
|
+
success: HttpApiSchema.NoContent,
|
|
39
|
+
}).annotateMerge(OpenApi.annotations({
|
|
40
|
+
identifier: "experimental.job.cancel",
|
|
41
|
+
summary: "Cancel background job",
|
|
42
|
+
description: "Cancel a running background job, interrupting the work it started. Cancelling a job that already finished does nothing. Experimental: may change without compatibility guarantees.",
|
|
43
|
+
transform: (operation) => ({ ...operation, tags: ["experimental"] }),
|
|
44
|
+
})),
|
|
36
45
|
];
|
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-1317",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"typecheck:tsc": "tsc --noEmit"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@opencode/schema": "0.0.0-dev-
|
|
38
|
+
"@opencode/schema": "0.0.0-dev-1317",
|
|
39
39
|
"effect": "4.1.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|