@camerontaylor/paseo-protocol 0.11.1-fork.1 → 0.11.1-fork.2
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/agent-types.d.ts +10 -0
- package/dist/client-capabilities.d.ts +3 -0
- package/dist/client-capabilities.js +13 -0
- package/dist/companion-stream.d.ts +75 -0
- package/dist/companion-stream.js +49 -0
- package/dist/generated/validation/ws-outbound.aot.js +72804 -57575
- package/dist/messages.d.ts +24024 -5260
- package/dist/messages.js +382 -4
- package/dist/validation/ws-outbound-schema-metadata.d.ts +3755 -83
- package/package.json +1 -1
package/dist/messages.js
CHANGED
|
@@ -6,6 +6,7 @@ export { PluginIdSchema, PluginRequirementsSchema, DirectoryPluginSourceSchema,
|
|
|
6
6
|
import { TerminalProfileSchema } from "./terminal-profile.js";
|
|
7
7
|
export { TerminalProfileSchema } from "./terminal-profile.js";
|
|
8
8
|
import { z } from "zod";
|
|
9
|
+
import { CompanionEntrySchema } from "./companion-stream.js";
|
|
9
10
|
import { TerminalActivitySchema } from "./terminal-activity.js";
|
|
10
11
|
import { CLIENT_CAPS } from "./client-capabilities.js";
|
|
11
12
|
import { AGENT_LIFECYCLE_STATUSES } from "./agent-lifecycle.js";
|
|
@@ -646,6 +647,15 @@ const AgentActiveTurnPayloadSchema = z.object({
|
|
|
646
647
|
turnId: z.string(),
|
|
647
648
|
startedAt: z.string().nullable(),
|
|
648
649
|
});
|
|
650
|
+
export const AgentArtifactSchema = z.object({
|
|
651
|
+
path: z.string(),
|
|
652
|
+
name: z.string(),
|
|
653
|
+
kind: z.enum(["html", "markdown", "image", "svg", "pdf", "diff"]),
|
|
654
|
+
mimeType: z.string(),
|
|
655
|
+
size: z.number().int().nonnegative(),
|
|
656
|
+
createdAt: z.string(),
|
|
657
|
+
updatedAt: z.string(),
|
|
658
|
+
});
|
|
649
659
|
export const AgentSnapshotPayloadSchema = z.object({
|
|
650
660
|
id: z.string(),
|
|
651
661
|
provider: AgentProviderSchema,
|
|
@@ -675,6 +685,8 @@ export const AgentSnapshotPayloadSchema = z.object({
|
|
|
675
685
|
attentionTimestamp: z.string().nullable().optional(),
|
|
676
686
|
archivedAt: z.string().nullable().optional(),
|
|
677
687
|
providerUnavailable: z.boolean().optional(),
|
|
688
|
+
artifacts: z.array(AgentArtifactSchema).optional(),
|
|
689
|
+
companionEntries: z.array(CompanionEntrySchema).optional(),
|
|
678
690
|
});
|
|
679
691
|
export const AgentListItemPayloadSchema = z.object({
|
|
680
692
|
id: z.string(),
|
|
@@ -711,16 +723,50 @@ export const RecentProviderSessionDescriptorPayloadSchema = z.object({
|
|
|
711
723
|
// ============================================================================
|
|
712
724
|
export const VoiceAudioChunkMessageSchema = z.object({
|
|
713
725
|
type: z.literal("voice_audio_chunk"),
|
|
726
|
+
/** Voice attachment identity. Absent in legacy clients without attachments. */
|
|
727
|
+
attachmentId: z.string().optional(),
|
|
728
|
+
/** Transport generation handed out by the host for this attachment. */
|
|
729
|
+
generation: z.string().optional(),
|
|
714
730
|
audio: z.string(), // base64 encoded
|
|
715
731
|
format: z.string(),
|
|
716
732
|
isLast: z.boolean(),
|
|
717
733
|
});
|
|
718
734
|
export const AbortRequestMessageSchema = z.object({
|
|
719
735
|
type: z.literal("abort_request"),
|
|
736
|
+
attachmentId: z.string().optional(),
|
|
737
|
+
generation: z.string().optional(),
|
|
720
738
|
});
|
|
721
739
|
export const AudioPlayedMessageSchema = z.object({
|
|
722
740
|
type: z.literal("audio_played"),
|
|
741
|
+
attachmentId: z.string().optional(),
|
|
742
|
+
generation: z.string().optional(),
|
|
723
743
|
id: z.string(),
|
|
744
|
+
/** Set when the client failed to play the clip; the speech caller sees the failure. */
|
|
745
|
+
error: z.string().optional(),
|
|
746
|
+
});
|
|
747
|
+
export const VoiceInputReceiptsReadRequestSchema = z.object({
|
|
748
|
+
type: z.literal("voice.input.receipts.read.request"),
|
|
749
|
+
requestId: z.string(),
|
|
750
|
+
agentId: z.string(),
|
|
751
|
+
attachmentId: z.string(),
|
|
752
|
+
generation: z.string(),
|
|
753
|
+
after: z.string().optional(),
|
|
754
|
+
limit: z.number().int().min(1).max(100).optional(),
|
|
755
|
+
});
|
|
756
|
+
export const VoiceInputReceiptsReadResponseSchema = z.object({
|
|
757
|
+
type: z.literal("voice.input.receipts.read.response"),
|
|
758
|
+
payload: z.object({
|
|
759
|
+
requestId: z.string(),
|
|
760
|
+
agentId: z.string(),
|
|
761
|
+
attachmentId: z.string(),
|
|
762
|
+
items: z.array(z.object({
|
|
763
|
+
messageId: z.string(),
|
|
764
|
+
state: z.enum(["queued", "submitted", "removed", "unknown"]),
|
|
765
|
+
createdAt: z.string(),
|
|
766
|
+
})),
|
|
767
|
+
nextCursor: z.string().nullable(),
|
|
768
|
+
error: z.string().nullable(),
|
|
769
|
+
}),
|
|
724
770
|
});
|
|
725
771
|
const AgentDirectoryFilterSchema = z.object({
|
|
726
772
|
labels: z.record(z.string(), z.string()).optional(),
|
|
@@ -753,6 +799,49 @@ export const UpdateAgentRequestMessageSchema = z.object({
|
|
|
753
799
|
labels: z.record(z.string(), z.string()).optional(),
|
|
754
800
|
requestId: z.string(),
|
|
755
801
|
});
|
|
802
|
+
// COMPAT(companionStreamPortV1): added in v0.11.0-beta.3-fork, remove after 2027-04-01.
|
|
803
|
+
// Ported from the source fork's flat `update_companion_entry_request`; renamed to the
|
|
804
|
+
// dotted namespace so the two contracts stay distinct on the wire.
|
|
805
|
+
export const AgentCompanionUpdateEntryRequestMessageSchema = z.object({
|
|
806
|
+
type: z.literal("agent.companion.update_entry.request"),
|
|
807
|
+
agentId: z.string(),
|
|
808
|
+
entryId: z.string().optional(),
|
|
809
|
+
action: z.enum(["update_status", "add_pin", "remove_pin", "add_q_and_a"]),
|
|
810
|
+
status: z.enum(["open", "reviewed", "done"]).optional(),
|
|
811
|
+
text: z.string().optional(),
|
|
812
|
+
answerText: z.string().optional(),
|
|
813
|
+
sourceId: z.string().optional(),
|
|
814
|
+
requestId: z.string(),
|
|
815
|
+
});
|
|
816
|
+
export const AgentCompanionUpdateEntryResponseMessageSchema = z.object({
|
|
817
|
+
type: z.literal("agent.companion.update_entry.response"),
|
|
818
|
+
payload: z.object({
|
|
819
|
+
requestId: z.string(),
|
|
820
|
+
agentId: z.string(),
|
|
821
|
+
accepted: z.boolean(),
|
|
822
|
+
error: z.string().nullable(),
|
|
823
|
+
}),
|
|
824
|
+
});
|
|
825
|
+
export const AgentArtifactsScanRequestMessageSchema = z.object({
|
|
826
|
+
type: z.literal("agent.artifacts.scan.request"),
|
|
827
|
+
agentId: z.string(),
|
|
828
|
+
requestId: z.string(),
|
|
829
|
+
/** Overrides the daemon's default retention ceiling for this scan. */
|
|
830
|
+
limit: z.number().int().positive().optional(),
|
|
831
|
+
});
|
|
832
|
+
export const AgentArtifactsScanResponseMessageSchema = z.object({
|
|
833
|
+
type: z.literal("agent.artifacts.scan.response"),
|
|
834
|
+
payload: z.object({
|
|
835
|
+
requestId: z.string(),
|
|
836
|
+
agentId: z.string(),
|
|
837
|
+
accepted: z.boolean(),
|
|
838
|
+
error: z.string().nullable(),
|
|
839
|
+
/** Files newly recorded or refreshed by this scan. */
|
|
840
|
+
addedOrUpdated: z.number().int().nonnegative(),
|
|
841
|
+
/** Size of the agent's artifact list after the scan. */
|
|
842
|
+
total: z.number().int().nonnegative(),
|
|
843
|
+
}),
|
|
844
|
+
});
|
|
756
845
|
// The daemon accepts only image bytes chosen or acquired by the client. It must
|
|
757
846
|
// never fetch a user-provided URL on the host's network.
|
|
758
847
|
export const ProjectIconSourceSchema = z.discriminatedUnion("type", [
|
|
@@ -846,6 +935,10 @@ export const WorkspaceRecoveryRestoreRequestSchema = z.object({
|
|
|
846
935
|
});
|
|
847
936
|
export const SetVoiceModeMessageSchema = z.object({
|
|
848
937
|
type: z.literal("set_voice_mode"),
|
|
938
|
+
/** Voice attachment identity; the host binds its generation to it. */
|
|
939
|
+
attachmentId: z.string().optional(),
|
|
940
|
+
/** Supplied when an existing attachment reclaims itself after a reconnect. */
|
|
941
|
+
generation: z.string().optional(),
|
|
849
942
|
enabled: z.boolean(),
|
|
850
943
|
agentId: z.string().optional(),
|
|
851
944
|
requestId: z.string().optional(),
|
|
@@ -905,16 +998,15 @@ export const ExternalResourceAttachmentMetadataSchema = z.object({
|
|
|
905
998
|
title: z.string(),
|
|
906
999
|
url: z.string(),
|
|
907
1000
|
});
|
|
908
|
-
export const
|
|
909
|
-
.object({
|
|
1001
|
+
export const TextAttachmentWireSchema = z.object({
|
|
910
1002
|
type: z.literal("text"),
|
|
911
1003
|
mimeType: z.literal("text/plain"),
|
|
912
1004
|
contextKind: z.string().optional(),
|
|
913
1005
|
title: z.string().nullable().optional(),
|
|
914
1006
|
text: z.string(),
|
|
915
1007
|
externalResource: ExternalResourceAttachmentMetadataSchema.optional(),
|
|
916
|
-
})
|
|
917
|
-
|
|
1008
|
+
});
|
|
1009
|
+
export const TextAttachmentSchema = TextAttachmentWireSchema.transform(({ contextKind, ...attachment }) => ({
|
|
918
1010
|
...attachment,
|
|
919
1011
|
...(contextKind === "chat_history" ? { contextKind } : {}),
|
|
920
1012
|
}));
|
|
@@ -960,6 +1052,20 @@ export const AgentAttachmentSchema = z.discriminatedUnion("type", [
|
|
|
960
1052
|
ReviewAttachmentSchema,
|
|
961
1053
|
UploadedFileAttachmentSchema,
|
|
962
1054
|
]);
|
|
1055
|
+
/**
|
|
1056
|
+
* Same shape as AgentAttachmentSchema without the text-attachment transform, so
|
|
1057
|
+
* attachments can appear in outbound messages. Message schemas stay pure — see
|
|
1058
|
+
* docs/protocol-validation.md.
|
|
1059
|
+
*/
|
|
1060
|
+
export const AgentAttachmentWireSchema = z.discriminatedUnion("type", [
|
|
1061
|
+
ForgeChangeRequestAttachmentSchema,
|
|
1062
|
+
ForgeIssueAttachmentSchema,
|
|
1063
|
+
GitHubPrAttachmentSchema,
|
|
1064
|
+
GitHubIssueAttachmentSchema,
|
|
1065
|
+
TextAttachmentWireSchema,
|
|
1066
|
+
ReviewAttachmentSchema,
|
|
1067
|
+
UploadedFileAttachmentSchema,
|
|
1068
|
+
]);
|
|
963
1069
|
function normalizeAgentAttachments(input) {
|
|
964
1070
|
if (!Array.isArray(input)) {
|
|
965
1071
|
return [];
|
|
@@ -1811,6 +1917,9 @@ export const SetVoiceModeResponseMessageSchema = z.object({
|
|
|
1811
1917
|
reasonCode: z.string().optional(),
|
|
1812
1918
|
retryable: z.boolean().optional(),
|
|
1813
1919
|
missingModelIds: z.array(z.string()).optional(),
|
|
1920
|
+
/** Echoed attachment identity plus the host's fresh transport generation. */
|
|
1921
|
+
attachmentId: z.string().optional(),
|
|
1922
|
+
generation: z.string().optional(),
|
|
1814
1923
|
}),
|
|
1815
1924
|
});
|
|
1816
1925
|
export const AgentPermissionResponseMessageSchema = z.object({
|
|
@@ -2094,6 +2203,220 @@ export const ForgeSearchKindSchema = z.enum([
|
|
|
2094
2203
|
"pr",
|
|
2095
2204
|
]);
|
|
2096
2205
|
export const GitHubSearchKindSchema = ForgeSearchKindSchema;
|
|
2206
|
+
// ---------------------------------------------------------------------------
|
|
2207
|
+
// Durable agent message queue. Removal group: Queue (TM-02).
|
|
2208
|
+
//
|
|
2209
|
+
// Admission through these RPCs is opt-in. `send_agent_message_request` without
|
|
2210
|
+
// queue intent keeps the legacy receipt-backed interrupt path and never reaches
|
|
2211
|
+
// the queue, so every message in this block is new to an old daemon: gate a
|
|
2212
|
+
// client on `server_info.features.durableAgentQueueV1` before sending any of it,
|
|
2213
|
+
// and never send the new `intent` values to a daemon that lacks the flag. The
|
|
2214
|
+
// daemon only broadcasts `agent.queue.update` to clients advertising
|
|
2215
|
+
// CLIENT_CAPS.durableAgentQueue, so an old client never sees an unknown event.
|
|
2216
|
+
// ---------------------------------------------------------------------------
|
|
2217
|
+
/**
|
|
2218
|
+
* How the daemon delivers a queued item. `queue` waits for a free agent;
|
|
2219
|
+
* `steer_strict` asks the provider to steer the running turn and never
|
|
2220
|
+
* interrupts or replaces it. Both values postdate every released daemon, which
|
|
2221
|
+
* is why the feature flag gates the whole block.
|
|
2222
|
+
*/
|
|
2223
|
+
export const QueuedAgentDeliveryIntentSchema = z.enum(["queue", "steer_strict"]);
|
|
2224
|
+
/**
|
|
2225
|
+
* Where a queued item stands in the claim/dispatch/receipt/removal cycle.
|
|
2226
|
+
*
|
|
2227
|
+
* - `pending`: accepted and never handed to a provider; safe to resume.
|
|
2228
|
+
* - `dispatching`: claimed, dispatch in flight.
|
|
2229
|
+
* - `uncertain`: the provider may or may not have accepted it. Visible for
|
|
2230
|
+
* reconciliation; the daemon never resends it on its own.
|
|
2231
|
+
* - `failed`: repeated known failures (see the daemon's attempt limit). Visible
|
|
2232
|
+
* with an explicit retry or discard.
|
|
2233
|
+
*/
|
|
2234
|
+
export const QueuedAgentMessageDeliveryStateSchema = z.enum([
|
|
2235
|
+
"pending",
|
|
2236
|
+
"dispatching",
|
|
2237
|
+
"uncertain",
|
|
2238
|
+
"failed",
|
|
2239
|
+
]);
|
|
2240
|
+
/**
|
|
2241
|
+
* Queued images are described, never shipped. The bytes live on the daemon, so a
|
|
2242
|
+
* queue holding a photo does not push megabytes of base64 at every connected
|
|
2243
|
+
* client on every queue change.
|
|
2244
|
+
*/
|
|
2245
|
+
export const QueuedAgentMessageImageSchema = z.object({
|
|
2246
|
+
id: z.string(),
|
|
2247
|
+
mimeType: z.string(),
|
|
2248
|
+
fileName: z.string().nullable().optional(),
|
|
2249
|
+
byteSize: z.number().int().nonnegative().optional(),
|
|
2250
|
+
});
|
|
2251
|
+
/**
|
|
2252
|
+
* The composer-side view of an attachment, kept alongside the agent-side one so
|
|
2253
|
+
* any device can pull a queued message back into its composer with the same
|
|
2254
|
+
* pills the author saw. Images are excluded: their bytes are stored separately
|
|
2255
|
+
* and fetched with agent.queue.get_item_images.request.
|
|
2256
|
+
*/
|
|
2257
|
+
export const QueuedComposerAttachmentSchema = z.discriminatedUnion("kind", [
|
|
2258
|
+
z.object({ kind: z.literal("file"), attachment: UploadedFileAttachmentSchema }),
|
|
2259
|
+
z.object({
|
|
2260
|
+
kind: z.literal("workspace_file"),
|
|
2261
|
+
path: z.string(),
|
|
2262
|
+
selection: z.discriminatedUnion("kind", [
|
|
2263
|
+
z.object({ kind: z.literal("whole_file") }),
|
|
2264
|
+
z.object({
|
|
2265
|
+
kind: z.literal("line_range"),
|
|
2266
|
+
startLine: z.number().int().positive(),
|
|
2267
|
+
endLine: z.number().int().positive(),
|
|
2268
|
+
}),
|
|
2269
|
+
]),
|
|
2270
|
+
}),
|
|
2271
|
+
z.object({ kind: z.literal("forge_issue"), item: ForgeSearchItemSchema }),
|
|
2272
|
+
z.object({ kind: z.literal("forge_change_request"), item: ForgeSearchItemSchema }),
|
|
2273
|
+
z.object({ kind: z.literal("github_issue"), item: ForgeSearchItemSchema }),
|
|
2274
|
+
z.object({ kind: z.literal("github_pr"), item: ForgeSearchItemSchema }),
|
|
2275
|
+
]);
|
|
2276
|
+
export const QueuedAgentMessageSchema = z.object({
|
|
2277
|
+
id: z.string(),
|
|
2278
|
+
text: z.string(),
|
|
2279
|
+
/** Set when the item was admitted as spoken input rather than typed or tool-created. */
|
|
2280
|
+
origin: z.literal("voice").optional(),
|
|
2281
|
+
intent: QueuedAgentDeliveryIntentSchema,
|
|
2282
|
+
deliveryState: QueuedAgentMessageDeliveryStateSchema,
|
|
2283
|
+
attempts: z.number().int().nonnegative(),
|
|
2284
|
+
lastError: z.string().nullable().optional(),
|
|
2285
|
+
attachments: z.array(AgentAttachmentWireSchema).optional(),
|
|
2286
|
+
composerAttachments: z.array(QueuedComposerAttachmentSchema).optional(),
|
|
2287
|
+
images: z.array(QueuedAgentMessageImageSchema).optional(),
|
|
2288
|
+
createdAt: z.string(),
|
|
2289
|
+
});
|
|
2290
|
+
export const AgentQueueSnapshotSchema = z.object({
|
|
2291
|
+
agentId: z.string(),
|
|
2292
|
+
/** Increments on every mutation so clients can drop a stale broadcast. */
|
|
2293
|
+
revision: z.number().int().nonnegative(),
|
|
2294
|
+
items: z.array(QueuedAgentMessageSchema),
|
|
2295
|
+
});
|
|
2296
|
+
export const AgentQueueEnqueueRequestSchema = z.object({
|
|
2297
|
+
type: z.literal("agent.queue.enqueue.request"),
|
|
2298
|
+
requestId: z.string(),
|
|
2299
|
+
agentId: z.string(),
|
|
2300
|
+
/** Client-generated so the optimistic local item and the stored item share an id. */
|
|
2301
|
+
itemId: z.string(),
|
|
2302
|
+
text: z.string(),
|
|
2303
|
+
intent: QueuedAgentDeliveryIntentSchema,
|
|
2304
|
+
images: z.array(ImageAttachmentSchema).optional(),
|
|
2305
|
+
attachments: z.array(AgentAttachmentWireSchema).optional(),
|
|
2306
|
+
composerAttachments: z.array(QueuedComposerAttachmentSchema).optional(),
|
|
2307
|
+
});
|
|
2308
|
+
/**
|
|
2309
|
+
* The revision the client last saw. A stale device is rejected with
|
|
2310
|
+
* `queue_revision_conflict` instead of overwriting another device's edit, so
|
|
2311
|
+
* edits, reorders and deletions are governed by queue revisions.
|
|
2312
|
+
*/
|
|
2313
|
+
export const AgentQueueMutationRequestSchema = z.object({
|
|
2314
|
+
type: z.string(),
|
|
2315
|
+
requestId: z.string(),
|
|
2316
|
+
agentId: z.string(),
|
|
2317
|
+
expectedRevision: z.number().int().nonnegative(),
|
|
2318
|
+
});
|
|
2319
|
+
export const AgentQueueUpdateRequestSchema = AgentQueueMutationRequestSchema.extend({
|
|
2320
|
+
type: z.literal("agent.queue.update.request"),
|
|
2321
|
+
itemId: z.string(),
|
|
2322
|
+
text: z.string(),
|
|
2323
|
+
images: z.array(ImageAttachmentSchema).optional(),
|
|
2324
|
+
attachments: z.array(AgentAttachmentWireSchema).optional(),
|
|
2325
|
+
composerAttachments: z.array(QueuedComposerAttachmentSchema).optional(),
|
|
2326
|
+
});
|
|
2327
|
+
export const AgentQueueReorderRequestSchema = AgentQueueMutationRequestSchema.extend({
|
|
2328
|
+
type: z.literal("agent.queue.reorder.request"),
|
|
2329
|
+
/** Full id list in the desired order. Unknown ids are ignored, omitted ids keep their relative order at the end. */
|
|
2330
|
+
itemIds: z.array(z.string()),
|
|
2331
|
+
});
|
|
2332
|
+
export const AgentQueueDeleteRequestSchema = AgentQueueMutationRequestSchema.extend({
|
|
2333
|
+
type: z.literal("agent.queue.delete.request"),
|
|
2334
|
+
itemId: z.string(),
|
|
2335
|
+
});
|
|
2336
|
+
/** Returns a failed or uncertain item to the drain loop after an explicit user decision. */
|
|
2337
|
+
export const AgentQueueRetryRequestSchema = AgentQueueMutationRequestSchema.extend({
|
|
2338
|
+
type: z.literal("agent.queue.retry.request"),
|
|
2339
|
+
itemId: z.string(),
|
|
2340
|
+
});
|
|
2341
|
+
/**
|
|
2342
|
+
* Attempts delivery of one item now instead of waiting for the queue to reach
|
|
2343
|
+
* the head. The response carries the queue after the attempt, so a client can
|
|
2344
|
+
* tell a delivered item from one the admission fence refused.
|
|
2345
|
+
*/
|
|
2346
|
+
export const AgentQueueSendNowRequestSchema = AgentQueueMutationRequestSchema.extend({
|
|
2347
|
+
type: z.literal("agent.queue.send_now.request"),
|
|
2348
|
+
itemId: z.string(),
|
|
2349
|
+
});
|
|
2350
|
+
export const AgentQueueListRequestSchema = z.object({
|
|
2351
|
+
type: z.literal("agent.queue.list.request"),
|
|
2352
|
+
requestId: z.string(),
|
|
2353
|
+
agentId: z.string(),
|
|
2354
|
+
});
|
|
2355
|
+
/**
|
|
2356
|
+
* Fetches the image bytes of one queued item. A device that did not queue the
|
|
2357
|
+
* item has no local copy, so editing it there would otherwise drop the images.
|
|
2358
|
+
*/
|
|
2359
|
+
export const AgentQueueGetItemImagesRequestSchema = z.object({
|
|
2360
|
+
type: z.literal("agent.queue.get_item_images.request"),
|
|
2361
|
+
requestId: z.string(),
|
|
2362
|
+
agentId: z.string(),
|
|
2363
|
+
itemId: z.string(),
|
|
2364
|
+
});
|
|
2365
|
+
export const AgentQueueGetItemImagesResponseSchema = z.object({
|
|
2366
|
+
type: z.literal("agent.queue.get_item_images.response"),
|
|
2367
|
+
payload: z.object({
|
|
2368
|
+
requestId: z.string(),
|
|
2369
|
+
agentId: z.string(),
|
|
2370
|
+
itemId: z.string(),
|
|
2371
|
+
images: z.array(z.object({
|
|
2372
|
+
id: z.string(),
|
|
2373
|
+
mimeType: z.string(),
|
|
2374
|
+
fileName: z.string().nullable().optional(),
|
|
2375
|
+
data: z.string(),
|
|
2376
|
+
})),
|
|
2377
|
+
error: z.string().nullable(),
|
|
2378
|
+
}),
|
|
2379
|
+
});
|
|
2380
|
+
export const AgentQueueResponsePayloadSchema = z.object({
|
|
2381
|
+
requestId: z.string(),
|
|
2382
|
+
agentId: z.string(),
|
|
2383
|
+
queue: AgentQueueSnapshotSchema.nullable(),
|
|
2384
|
+
/** Machine-readable on mutation failures, e.g. `queue_revision_conflict`. */
|
|
2385
|
+
error: z.string().nullable(),
|
|
2386
|
+
});
|
|
2387
|
+
export const AgentQueueEnqueueResponseSchema = z.object({
|
|
2388
|
+
type: z.literal("agent.queue.enqueue.response"),
|
|
2389
|
+
payload: AgentQueueResponsePayloadSchema,
|
|
2390
|
+
});
|
|
2391
|
+
export const AgentQueueUpdateResponseSchema = z.object({
|
|
2392
|
+
type: z.literal("agent.queue.update.response"),
|
|
2393
|
+
payload: AgentQueueResponsePayloadSchema,
|
|
2394
|
+
});
|
|
2395
|
+
export const AgentQueueReorderResponseSchema = z.object({
|
|
2396
|
+
type: z.literal("agent.queue.reorder.response"),
|
|
2397
|
+
payload: AgentQueueResponsePayloadSchema,
|
|
2398
|
+
});
|
|
2399
|
+
export const AgentQueueDeleteResponseSchema = z.object({
|
|
2400
|
+
type: z.literal("agent.queue.delete.response"),
|
|
2401
|
+
payload: AgentQueueResponsePayloadSchema,
|
|
2402
|
+
});
|
|
2403
|
+
export const AgentQueueRetryResponseSchema = z.object({
|
|
2404
|
+
type: z.literal("agent.queue.retry.response"),
|
|
2405
|
+
payload: AgentQueueResponsePayloadSchema,
|
|
2406
|
+
});
|
|
2407
|
+
export const AgentQueueSendNowResponseSchema = z.object({
|
|
2408
|
+
type: z.literal("agent.queue.send_now.response"),
|
|
2409
|
+
payload: AgentQueueResponsePayloadSchema,
|
|
2410
|
+
});
|
|
2411
|
+
export const AgentQueueListResponseSchema = z.object({
|
|
2412
|
+
type: z.literal("agent.queue.list.response"),
|
|
2413
|
+
payload: AgentQueueResponsePayloadSchema,
|
|
2414
|
+
});
|
|
2415
|
+
/** Unsolicited full-queue broadcast, only to clients advertising CLIENT_CAPS.durableAgentQueue. */
|
|
2416
|
+
export const AgentQueueUpdateMessageSchema = z.object({
|
|
2417
|
+
type: z.literal("agent.queue.update"),
|
|
2418
|
+
payload: AgentQueueSnapshotSchema,
|
|
2419
|
+
});
|
|
2097
2420
|
export const ForgeSearchRequestSchema = z.object({
|
|
2098
2421
|
type: z.literal("forge.search.request"),
|
|
2099
2422
|
cwd: z.string(),
|
|
@@ -2693,6 +3016,10 @@ export const SessionEventSubscriptionSchema = z.enum([
|
|
|
2693
3016
|
"script_status_update",
|
|
2694
3017
|
"workspace_setup_progress",
|
|
2695
3018
|
"agent.provider_subagents.update",
|
|
3019
|
+
// COMPAT(durableAgentQueue): fork addition (TM-02). Only sent by clients that
|
|
3020
|
+
// saw features.durableAgentQueueV1; an old daemon parsing this enum rejects
|
|
3021
|
+
// the subscription request, which is why the client gates before subscribing.
|
|
3022
|
+
"agent.queue.update",
|
|
2696
3023
|
"terminal_attention_required",
|
|
2697
3024
|
"status.server_info",
|
|
2698
3025
|
"status.daemon_config_changed",
|
|
@@ -2752,6 +3079,8 @@ export const SessionInboundMessageSchema = z.discriminatedUnion("type", [
|
|
|
2752
3079
|
ArchiveAgentRequestMessageSchema,
|
|
2753
3080
|
CloseItemsRequestMessageSchema,
|
|
2754
3081
|
UpdateAgentRequestMessageSchema,
|
|
3082
|
+
AgentCompanionUpdateEntryRequestMessageSchema,
|
|
3083
|
+
AgentArtifactsScanRequestMessageSchema,
|
|
2755
3084
|
ProjectRenameRequestSchema,
|
|
2756
3085
|
ProjectIconSetRequestSchema,
|
|
2757
3086
|
ProjectRemoveRequestSchema,
|
|
@@ -2765,6 +3094,7 @@ export const SessionInboundMessageSchema = z.discriminatedUnion("type", [
|
|
|
2765
3094
|
WorkspaceRecoveryInspectRequestSchema,
|
|
2766
3095
|
WorkspaceRecoveryRestoreRequestSchema,
|
|
2767
3096
|
SetVoiceModeMessageSchema,
|
|
3097
|
+
VoiceInputReceiptsReadRequestSchema,
|
|
2768
3098
|
SendAgentMessageRequestSchema,
|
|
2769
3099
|
WaitForFinishRequestSchema,
|
|
2770
3100
|
DaemonGetStatusRequestSchema,
|
|
@@ -2829,6 +3159,14 @@ export const SessionInboundMessageSchema = z.discriminatedUnion("type", [
|
|
|
2829
3159
|
SideConversationAskRequestMessageSchema,
|
|
2830
3160
|
SideConversationTimelineGetRequestMessageSchema,
|
|
2831
3161
|
SideConversationListRequestMessageSchema,
|
|
3162
|
+
AgentQueueEnqueueRequestSchema,
|
|
3163
|
+
AgentQueueUpdateRequestSchema,
|
|
3164
|
+
AgentQueueReorderRequestSchema,
|
|
3165
|
+
AgentQueueDeleteRequestSchema,
|
|
3166
|
+
AgentQueueRetryRequestSchema,
|
|
3167
|
+
AgentQueueSendNowRequestSchema,
|
|
3168
|
+
AgentQueueListRequestSchema,
|
|
3169
|
+
AgentQueueGetItemImagesRequestSchema,
|
|
2832
3170
|
SetAgentTimelineSubscriptionRequestMessageSchema,
|
|
2833
3171
|
AgentForkContextRequestMessageSchema,
|
|
2834
3172
|
SetAgentModeRequestMessageSchema,
|
|
@@ -2970,6 +3308,8 @@ export const AudioOutputMessageSchema = z.object({
|
|
|
2970
3308
|
audio: z.string(), // base64 encoded
|
|
2971
3309
|
format: z.string(),
|
|
2972
3310
|
id: z.string(),
|
|
3311
|
+
attachmentId: z.string().optional(),
|
|
3312
|
+
generation: z.string().optional(),
|
|
2973
3313
|
isVoiceMode: z.boolean(), // Mode when audio was generated (for drift protection)
|
|
2974
3314
|
groupId: z.string().optional(), // Logical utterance id
|
|
2975
3315
|
chunkIndex: z.number().int().nonnegative().optional(),
|
|
@@ -2983,6 +3323,11 @@ export const TranscriptionResultMessageSchema = z.object({
|
|
|
2983
3323
|
language: z.string().optional(),
|
|
2984
3324
|
duration: z.number().optional(),
|
|
2985
3325
|
requestId: z.string(), // Echoed back from request for tracking
|
|
3326
|
+
attachmentId: z.string().optional(),
|
|
3327
|
+
generation: z.string().optional(),
|
|
3328
|
+
/** Queue item id of the admitted utterance; present only when it was queued. */
|
|
3329
|
+
messageId: z.string().optional(),
|
|
3330
|
+
queued: z.boolean().optional(),
|
|
2986
3331
|
avgLogprob: z.number().optional(),
|
|
2987
3332
|
isLowConfidence: z.boolean().optional(),
|
|
2988
3333
|
byteLength: z.number().optional(),
|
|
@@ -2994,6 +3339,13 @@ export const VoiceInputStateMessageSchema = z.object({
|
|
|
2994
3339
|
type: z.literal("voice_input_state"),
|
|
2995
3340
|
payload: z.object({
|
|
2996
3341
|
isSpeaking: z.boolean(),
|
|
3342
|
+
/** Input problem text, e.g. a transcript that could not be queued. */
|
|
3343
|
+
error: z.string().optional(),
|
|
3344
|
+
attachmentId: z.string().optional(),
|
|
3345
|
+
generation: z.string().optional(),
|
|
3346
|
+
// "nothing_recognized" | "timed_out" | "failed". A string so later hosts can add
|
|
3347
|
+
// values that older clients ignore instead of rejecting the message.
|
|
3348
|
+
recognitionIssue: z.string().optional(),
|
|
2997
3349
|
}),
|
|
2998
3350
|
});
|
|
2999
3351
|
export const DictationStreamAckMessageSchema = z.object({
|
|
@@ -3177,6 +3529,15 @@ export const ServerInfoStatusPayloadSchema = z
|
|
|
3177
3529
|
agentTimelinePromptIndex: z.boolean().optional(),
|
|
3178
3530
|
// COMPAT(agentHistorySearch): added in v0.3.0, remove gate after 2027-02-07.
|
|
3179
3531
|
agentHistorySearch: z.boolean().optional(),
|
|
3532
|
+
// COMPAT(durableAgentQueue): fork addition (TM-02). Gates the whole
|
|
3533
|
+
// agent.queue.* block, including the delivery-intent enum that no
|
|
3534
|
+
// released daemon understands. Remove the gate after 2027-10-01 once
|
|
3535
|
+
// the supported daemon floor is past every 0.11.x host.
|
|
3536
|
+
durableAgentQueueV1: z.boolean().optional(),
|
|
3537
|
+
// COMPAT(durableVoiceInputV1): fork addition (TM-04). Gates voice
|
|
3538
|
+
// attachment admission into the durable agent queue; an old daemon
|
|
3539
|
+
// never answers voice.input.receipts.read requests.
|
|
3540
|
+
durableVoiceInputV1: z.boolean().optional(),
|
|
3180
3541
|
// COMPAT(checkoutRefresh): added in v0.1.86, remove gate after 2026-11-29.
|
|
3181
3542
|
checkoutRefresh: z.boolean().optional(),
|
|
3182
3543
|
// COMPAT(workspaceMultiplicity): added in v0.1.97, drop the gate when floor >= v0.1.97
|
|
@@ -3191,6 +3552,11 @@ export const ServerInfoStatusPayloadSchema = z
|
|
|
3191
3552
|
workspaceRecovery: z.boolean().optional(),
|
|
3192
3553
|
// COMPAT(workspaceFileEditing): added in v0.2.0, remove after 2027-01-18 once daemon floor >= v0.2.0.
|
|
3193
3554
|
workspaceFileEditing: z.boolean().optional(),
|
|
3555
|
+
// COMPAT(companionStreamPortV1): added in v0.11.0-beta.3-fork, remove after 2027-04-01.
|
|
3556
|
+
// Deliberately not the source fork's `companionStream`/`artifactFeed` flags: a client
|
|
3557
|
+
// that saw those names would expect the source's flat companion RPC, which this
|
|
3558
|
+
// daemon does not accept.
|
|
3559
|
+
companionStreamPortV1: z.boolean().optional(),
|
|
3194
3560
|
// COMPAT(providerUsageList): added in v0.1.98, drop the gate when daemon floor >= v0.1.98.
|
|
3195
3561
|
providerUsageList: z.boolean().optional(),
|
|
3196
3562
|
// COMPAT(agentDetach): added in v0.1.98, remove gate after 2026-12-19 once daemon floor >= v0.1.98.
|
|
@@ -6119,6 +6485,8 @@ export const AgentSkillsImportLegacySelectionResponseSchema = z.object({
|
|
|
6119
6485
|
}),
|
|
6120
6486
|
});
|
|
6121
6487
|
export const SessionOutboundMessageSchema = z.discriminatedUnion("type", [
|
|
6488
|
+
AgentCompanionUpdateEntryResponseMessageSchema,
|
|
6489
|
+
AgentArtifactsScanResponseMessageSchema,
|
|
6122
6490
|
BrowserHostRegisterResponseSchema,
|
|
6123
6491
|
SubscriptionReleaseResponseSchema,
|
|
6124
6492
|
SessionEventsSetSubscriptionResponseSchema,
|
|
@@ -6209,6 +6577,15 @@ export const SessionOutboundMessageSchema = z.discriminatedUnion("type", [
|
|
|
6209
6577
|
SideConversationUpdateMessageSchema,
|
|
6210
6578
|
SideConversationListResponseMessageSchema,
|
|
6211
6579
|
SideConversationRemovedMessageSchema,
|
|
6580
|
+
AgentQueueEnqueueResponseSchema,
|
|
6581
|
+
AgentQueueUpdateResponseSchema,
|
|
6582
|
+
AgentQueueReorderResponseSchema,
|
|
6583
|
+
AgentQueueDeleteResponseSchema,
|
|
6584
|
+
AgentQueueRetryResponseSchema,
|
|
6585
|
+
AgentQueueSendNowResponseSchema,
|
|
6586
|
+
AgentQueueListResponseSchema,
|
|
6587
|
+
AgentQueueGetItemImagesResponseSchema,
|
|
6588
|
+
AgentQueueUpdateMessageSchema,
|
|
6212
6589
|
SetAgentTimelineSubscriptionResponseMessageSchema,
|
|
6213
6590
|
AgentAttentionRequiredMessageSchema,
|
|
6214
6591
|
AgentForkContextResponseMessageSchema,
|
|
@@ -6223,6 +6600,7 @@ export const SessionOutboundMessageSchema = z.discriminatedUnion("type", [
|
|
|
6223
6600
|
WorkspaceMarkUnreadResponseSchema,
|
|
6224
6601
|
SendAgentMessageResponseMessageSchema,
|
|
6225
6602
|
SetVoiceModeResponseMessageSchema,
|
|
6603
|
+
VoiceInputReceiptsReadResponseSchema,
|
|
6226
6604
|
DaemonGetStatusResponseSchema,
|
|
6227
6605
|
DaemonGetPairingOfferResponseSchema,
|
|
6228
6606
|
DaemonConfigReloadResponseSchema,
|