@otto-code/protocol 0.8.18 → 0.9.0

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.
Files changed (40) hide show
  1. package/dist/agent-labels.d.ts +13 -0
  2. package/dist/agent-labels.js +26 -1
  3. package/dist/agent-profiles.d.ts +1 -1
  4. package/dist/agent-profiles.js +3 -3
  5. package/dist/architectural-views/rpc-schemas.d.ts +342 -0
  6. package/dist/architectural-views/rpc-schemas.js +171 -0
  7. package/dist/artifacts/rpc-schemas.d.ts +360 -2
  8. package/dist/artifacts/rpc-schemas.js +75 -1
  9. package/dist/artifacts/types.d.ts +71 -0
  10. package/dist/artifacts/types.js +27 -0
  11. package/dist/binary-frames/terminal.d.ts +1 -1
  12. package/dist/daemon-config.d.ts +66 -0
  13. package/dist/daemon-config.js +76 -3
  14. package/dist/generated/validation/ws-outbound.aot.js +70170 -56553
  15. package/dist/git-hosting.d.ts +56 -0
  16. package/dist/git-hosting.js +50 -0
  17. package/dist/kanban.d.ts +4 -0
  18. package/dist/kanban.js +4 -0
  19. package/dist/messages.d.ts +12186 -1217
  20. package/dist/messages.js +642 -33
  21. package/dist/model-tiers.js +2 -0
  22. package/dist/project-knowledge.d.ts +172 -0
  23. package/dist/project-knowledge.js +77 -0
  24. package/dist/provider-config.js +1 -1
  25. package/dist/provider-icon-names.js +1 -0
  26. package/dist/schedule/rpc-schemas.d.ts +212 -0
  27. package/dist/schedule/rpc-schemas.js +2 -0
  28. package/dist/schedule/types.d.ts +110 -0
  29. package/dist/schedule/types.js +27 -0
  30. package/dist/search/text-match.d.ts +16 -0
  31. package/dist/search/text-match.js +31 -2
  32. package/dist/validation/ws-outbound-schema-metadata.d.ts +2481 -104
  33. package/dist/workflow.d.ts +3060 -0
  34. package/dist/{orchestration.js → workflow.js} +461 -29
  35. package/dist/workspace-labels.d.ts +9 -0
  36. package/dist/workspace-labels.js +19 -0
  37. package/package.json +1 -1
  38. package/dist/orchestration.d.ts +0 -1148
  39. package/dist/project-links.d.ts +0 -102
  40. package/dist/project-links.js +0 -62
@@ -11,6 +11,19 @@ export declare const ORCHESTRATION_POLICIES: readonly ["deterministic", "autonom
11
11
  export type OrchestrationPolicy = (typeof ORCHESTRATION_POLICIES)[number];
12
12
  export declare function getOrchestrationPolicyFromLabels(labels: Record<string, unknown> | null | undefined): OrchestrationPolicy | null;
13
13
  export declare const ORCHESTRATION_RUN_ID_LABEL = "otto.orchestration-run-id";
14
+ /**
15
+ * Returns the durable orchestration run a daemon-stamped agent belongs to.
16
+ * Labels are untrusted at this boundary, so malformed or blank values never
17
+ * acquire run authority.
18
+ */
19
+ export declare function getOrchestrationRunIdFromLabels(labels: Record<string, unknown> | null | undefined): string | null;
20
+ export declare const SCHEDULE_ID_LABEL = "otto.schedule-id";
21
+ export declare const SCHEDULE_RUN_ID_LABEL = "otto.schedule-run";
22
+ export interface ScheduleRunSource {
23
+ scheduleId: string;
24
+ runId: string;
25
+ }
26
+ export declare function getScheduleRunSourceFromLabels(labels: Record<string, unknown> | null | undefined): ScheduleRunSource | null;
14
27
  export declare const ORCHESTRATION_OUTPUT_FIELDS_LABEL = "otto.orchestration-output-fields";
15
28
  export interface OrchestrationOutputField {
16
29
  key: string;
@@ -20,7 +20,7 @@ export function isDelegatedAgent(agent) {
20
20
  // otto-tool catalog reads the policy label to enforce the tool binary:
21
21
  // "deterministic" - the daemon does all linking; the node gets NO orchestration
22
22
  // tools (spawning/steering agents, runs), NO preview/dev-server tools, and NO
23
- // browser tools. "autonomous" - full otto toolset EXCEPT start_run
23
+ // browser tools. "autonomous" - full otto toolset EXCEPT start_workflow
24
24
  // (orchestrations never nest orchestrations).
25
25
  export const ORCHESTRATION_POLICY_LABEL = "otto.orchestration-policy";
26
26
  export const ORCHESTRATION_POLICIES = ["deterministic", "autonomous"];
@@ -31,6 +31,31 @@ export function getOrchestrationPolicyFromLabels(labels) {
31
31
  // First-class run attribution for orchestration children (parentage rides
32
32
  // PARENT_AGENT_ID_LABEL; this ties the child to the run record itself).
33
33
  export const ORCHESTRATION_RUN_ID_LABEL = "otto.orchestration-run-id";
34
+ /**
35
+ * Returns the durable orchestration run a daemon-stamped agent belongs to.
36
+ * Labels are untrusted at this boundary, so malformed or blank values never
37
+ * acquire run authority.
38
+ */
39
+ export function getOrchestrationRunIdFromLabels(labels) {
40
+ const value = labels?.[ORCHESTRATION_RUN_ID_LABEL];
41
+ return typeof value === "string" && value.trim().length > 0 ? value.trim() : null;
42
+ }
43
+ // First-class provenance for an internal agent spawned by a Schedule run.
44
+ // Both values are required: an artifact must never claim a Schedule source
45
+ // when a malformed label would leave it unable to identify the exact run.
46
+ export const SCHEDULE_ID_LABEL = "otto.schedule-id";
47
+ export const SCHEDULE_RUN_ID_LABEL = "otto.schedule-run";
48
+ export function getScheduleRunSourceFromLabels(labels) {
49
+ const scheduleId = labels?.[SCHEDULE_ID_LABEL];
50
+ const runId = labels?.[SCHEDULE_RUN_ID_LABEL];
51
+ if (typeof scheduleId !== "string" ||
52
+ scheduleId.trim().length === 0 ||
53
+ typeof runId !== "string" ||
54
+ runId.trim().length === 0) {
55
+ return null;
56
+ }
57
+ return { scheduleId: scheduleId.trim(), runId: runId.trim() };
58
+ }
34
59
  // The node's declared output fields, JSON-encoded, stamped on the spawned
35
60
  // agent. The otto-tool catalog reads it to register that agent's submit_output
36
61
  // tool - which is why this rides a label rather than a spawn option: the
@@ -52,7 +52,7 @@ export interface ProfileSelectionSummary {
52
52
  * deciding agent can pick the right teammate from the list alone.
53
53
  */
54
54
  export declare function summarizeProfileForSelection(personality: Pick<AgentPersonality, "roles">): ProfileSelectionSummary;
55
- export declare const OTTO_WORK_VOCABULARY_DIRECTIVE = "Otto work vocabulary: a suggested task is deferred work for the user and does not start work; a chat is an active Otto chat session; a child chat is created by another chat; a Personality is a reusable provider, model, mode, effort, and behavior template; an orchestration coordinates multiple chats; a schedule starts a background chat when due; a heartbeat sends a reminder or prompt and does not start a chat. Use suggest_task for concrete work to preserve for later, create_chat to start one chat now, and start_orchestration only for managed multi-chat coordination. Use list_agent_profiles, optionally filtered by roles, before choosing a Personality. Never substitute a harness-native agent-spawn tool for suggest_task, and when a user names an Otto tool exactly, use that exact Otto tool.";
55
+ export declare const OTTO_WORK_VOCABULARY_DIRECTIVE = "Otto work vocabulary: a suggested task is deferred work for the user and does not start work; a chat is an active Otto chat session; a child chat is created by another chat; a Personality is a reusable provider, model, mode, effort, and behavior template; a Workflow coordinates multiple chats; a schedule starts a background chat when due; a heartbeat sends a reminder or prompt and does not start a chat. Use suggest_task for concrete work to preserve for later, create_chat to start one chat now, and start_workflow only for managed multi-chat coordination. Use list_agent_profiles, optionally filtered by roles, before choosing a Personality. Never substitute a harness-native agent-spawn tool for suggest_task, and when a user names an Otto tool exactly, use that exact Otto tool.";
56
56
  export declare const ORCHESTRATOR_METHOD_DIRECTIVE: string;
57
57
  /**
58
58
  * The in-context "role directive" injected into a personality's system prompt at
@@ -139,10 +139,10 @@ export function summarizeProfileForSelection(personality) {
139
139
  // chat, a suggested task, or an orchestration by the task's actual needs rather than
140
140
  // treating orchestration as the default. Kept here as one exported constant so
141
141
  // the wording is testable and shared. See projects/agent-orchestration/agent-orchestration.md.
142
- export const OTTO_WORK_VOCABULARY_DIRECTIVE = "Otto work vocabulary: a suggested task is deferred work for the user and does not start work; a chat is an active Otto chat session; a child chat is created by another chat; a Personality is a reusable provider, model, mode, effort, and behavior template; an orchestration coordinates multiple chats; a schedule starts a background chat when due; a heartbeat sends a reminder or prompt and does not start a chat. Use suggest_task for concrete work to preserve for later, create_chat to start one chat now, and start_orchestration only for managed multi-chat coordination. Use list_agent_profiles, optionally filtered by roles, before choosing a Personality. Never substitute a harness-native agent-spawn tool for suggest_task, and when a user names an Otto tool exactly, use that exact Otto tool.";
142
+ export const OTTO_WORK_VOCABULARY_DIRECTIVE = "Otto work vocabulary: a suggested task is deferred work for the user and does not start work; a chat is an active Otto chat session; a child chat is created by another chat; a Personality is a reusable provider, model, mode, effort, and behavior template; a Workflow coordinates multiple chats; a schedule starts a background chat when due; a heartbeat sends a reminder or prompt and does not start a chat. Use suggest_task for concrete work to preserve for later, create_chat to start one chat now, and start_workflow only for managed multi-chat coordination. Use list_agent_profiles, optionally filtered by roles, before choosing a Personality. Never substitute a harness-native agent-spawn tool for suggest_task, and when a user names an Otto tool exactly, use that exact Otto tool.";
143
143
  export const ORCHESTRATOR_METHOD_DIRECTIVE = "You are the orchestrator - the team's sole conductor. Choose tools because the task needs their specific capability, never because a tool is available or named. " +
144
- "Do a small, self-contained task directly. Use create_chat only for an independently executable piece of active work that benefits from its own chat. Use suggest_task only to preserve a concrete, out-of-scope follow-up for later. Use start_orchestration only when the active work needs a declared multi-chat plan with daemon-managed fan-out, gathering, judging, loops, or approval gates. " +
145
- "For work that genuinely needs orchestration: (1) if the shape is unclear, dispatch research and planning chats; (2) declare the plan with start_orchestration - phases typed research/plan/implement/design/verify/gate/deliver, fanning out where several angles help and attaching a judger to grade them, looping until enough pass; (3) put a gate before irreversible or costly steps so the user approves; (4) synthesize the passing results into the deliverable. " +
144
+ "Do a small, self-contained task directly. Use create_chat only for an independently executable piece of active work that benefits from its own chat. Use suggest_task only to preserve a concrete, out-of-scope follow-up for later. Use start_workflow only when the active work needs a declared multi-chat Workflow with daemon-managed fan-out, gathering, judging, loops, or approval gates. " +
145
+ "For work that genuinely needs a Workflow: (1) if the shape is unclear, dispatch research and planning chats; (2) declare the Workflow with start_workflow - phases typed research/plan/implement/design/verify/gate/deliver, fanning out where several angles help and attaching a judger to grade them, looping until enough pass; (3) put a gate before irreversible or costly steps so the user approves; (4) synthesize the passing results into the deliverable. " +
146
146
  "Every phase maps to a teammate's role; if the active team lacks a role a phase needs, say so plainly and stop rather than papering over the gap.";
147
147
  /**
148
148
  * The in-context "role directive" injected into a personality's system prompt at
@@ -0,0 +1,342 @@
1
+ import { z } from "zod";
2
+ export declare const ArchitecturalViewIdSchema: z.ZodString;
3
+ export declare const ArchitecturalViewKnowledgeReferenceSchema: z.ZodObject<{
4
+ kind: z.ZodEnum<{
5
+ record: "record";
6
+ root: "root";
7
+ }>;
8
+ id: z.ZodString;
9
+ }, z.core.$strip>;
10
+ export declare const ArchitecturalViewsDeliverRequestSchema: z.ZodObject<{
11
+ type: z.ZodLiteral<"architectural-views.deliver.request">;
12
+ workspaceId: z.ZodString;
13
+ viewId: z.ZodString;
14
+ title: z.ZodString;
15
+ knowledgeReferences: z.ZodArray<z.ZodObject<{
16
+ kind: z.ZodEnum<{
17
+ record: "record";
18
+ root: "root";
19
+ }>;
20
+ id: z.ZodString;
21
+ }, z.core.$strip>>;
22
+ sourcePath: z.ZodString;
23
+ quality: z.ZodOptional<z.ZodEnum<{
24
+ standard: "standard";
25
+ showcase: "showcase";
26
+ }>>;
27
+ requestId: z.ZodString;
28
+ }, z.core.$strip>;
29
+ export declare const ArchitecturalViewsDeliverResponseSchema: z.ZodObject<{
30
+ type: z.ZodLiteral<"architectural-views.deliver.response">;
31
+ payload: z.ZodObject<{
32
+ requestId: z.ZodString;
33
+ success: z.ZodBoolean;
34
+ viewId: z.ZodString;
35
+ storeLocation: z.ZodNullable<z.ZodEnum<{
36
+ repository: "repository";
37
+ host: "host";
38
+ }>>;
39
+ htmlPath: z.ZodNullable<z.ZodString>;
40
+ error: z.ZodNullable<z.ZodString>;
41
+ }, z.core.$strip>;
42
+ }, z.core.$strip>;
43
+ export declare const ArchitecturalViewSummarySchema: z.ZodObject<{
44
+ id: z.ZodString;
45
+ title: z.ZodString;
46
+ knowledgeReferences: z.ZodArray<z.ZodObject<{
47
+ kind: z.ZodEnum<{
48
+ record: "record";
49
+ root: "root";
50
+ }>;
51
+ id: z.ZodString;
52
+ }, z.core.$strip>>;
53
+ storeLocation: z.ZodEnum<{
54
+ repository: "repository";
55
+ host: "host";
56
+ }>;
57
+ htmlPath: z.ZodString;
58
+ renderedAt: z.ZodString;
59
+ sourceStatus: z.ZodOptional<z.ZodEnum<{
60
+ unknown: "unknown";
61
+ stale: "stale";
62
+ current: "current";
63
+ }>>;
64
+ }, z.core.$strip>;
65
+ export declare const ArchitecturalViewDraftSchema: z.ZodObject<{
66
+ id: z.ZodString;
67
+ viewId: z.ZodString;
68
+ title: z.ZodString;
69
+ knowledgeReferences: z.ZodArray<z.ZodObject<{
70
+ kind: z.ZodEnum<{
71
+ record: "record";
72
+ root: "root";
73
+ }>;
74
+ id: z.ZodString;
75
+ }, z.core.$strip>>;
76
+ baseSpecificationSha256: z.ZodNullable<z.ZodString>;
77
+ authoringAgentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
78
+ createdAt: z.ZodString;
79
+ updatedAt: z.ZodString;
80
+ }, z.core.$strip>;
81
+ export declare const ArchitecturalViewsDraftCreateRequestSchema: z.ZodObject<{
82
+ type: z.ZodLiteral<"architectural-views.draft.create.request">;
83
+ workspaceId: z.ZodString;
84
+ viewId: z.ZodString;
85
+ draftId: z.ZodString;
86
+ title: z.ZodString;
87
+ knowledgeReferences: z.ZodArray<z.ZodObject<{
88
+ kind: z.ZodEnum<{
89
+ record: "record";
90
+ root: "root";
91
+ }>;
92
+ id: z.ZodString;
93
+ }, z.core.$strip>>;
94
+ sourcePath: z.ZodOptional<z.ZodString>;
95
+ quality: z.ZodOptional<z.ZodEnum<{
96
+ standard: "standard";
97
+ showcase: "showcase";
98
+ }>>;
99
+ requestId: z.ZodString;
100
+ }, z.core.$strip>;
101
+ export declare const ArchitecturalViewsDraftCreateResponseSchema: z.ZodObject<{
102
+ type: z.ZodLiteral<"architectural-views.draft.create.response">;
103
+ payload: z.ZodObject<{
104
+ requestId: z.ZodString;
105
+ success: z.ZodBoolean;
106
+ draft: z.ZodNullable<z.ZodObject<{
107
+ id: z.ZodString;
108
+ viewId: z.ZodString;
109
+ title: z.ZodString;
110
+ knowledgeReferences: z.ZodArray<z.ZodObject<{
111
+ kind: z.ZodEnum<{
112
+ record: "record";
113
+ root: "root";
114
+ }>;
115
+ id: z.ZodString;
116
+ }, z.core.$strip>>;
117
+ baseSpecificationSha256: z.ZodNullable<z.ZodString>;
118
+ authoringAgentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
119
+ createdAt: z.ZodString;
120
+ updatedAt: z.ZodString;
121
+ }, z.core.$strip>>;
122
+ error: z.ZodNullable<z.ZodString>;
123
+ }, z.core.$strip>;
124
+ }, z.core.$strip>;
125
+ export declare const ArchitecturalViewsDraftUpdateRequestSchema: z.ZodObject<{
126
+ type: z.ZodLiteral<"architectural-views.draft.update.request">;
127
+ workspaceId: z.ZodString;
128
+ viewId: z.ZodString;
129
+ draftId: z.ZodString;
130
+ sourcePath: z.ZodString;
131
+ quality: z.ZodOptional<z.ZodEnum<{
132
+ standard: "standard";
133
+ showcase: "showcase";
134
+ }>>;
135
+ requestId: z.ZodString;
136
+ }, z.core.$strip>;
137
+ export declare const ArchitecturalViewsDraftUpdateResponseSchema: z.ZodObject<{
138
+ type: z.ZodLiteral<"architectural-views.draft.update.response">;
139
+ payload: z.ZodObject<{
140
+ requestId: z.ZodString;
141
+ success: z.ZodBoolean;
142
+ draft: z.ZodNullable<z.ZodObject<{
143
+ id: z.ZodString;
144
+ viewId: z.ZodString;
145
+ title: z.ZodString;
146
+ knowledgeReferences: z.ZodArray<z.ZodObject<{
147
+ kind: z.ZodEnum<{
148
+ record: "record";
149
+ root: "root";
150
+ }>;
151
+ id: z.ZodString;
152
+ }, z.core.$strip>>;
153
+ baseSpecificationSha256: z.ZodNullable<z.ZodString>;
154
+ authoringAgentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
155
+ createdAt: z.ZodString;
156
+ updatedAt: z.ZodString;
157
+ }, z.core.$strip>>;
158
+ error: z.ZodNullable<z.ZodString>;
159
+ }, z.core.$strip>;
160
+ }, z.core.$strip>;
161
+ export declare const ArchitecturalViewsDraftPublishRequestSchema: z.ZodObject<{
162
+ type: z.ZodLiteral<"architectural-views.draft.publish.request">;
163
+ workspaceId: z.ZodString;
164
+ viewId: z.ZodString;
165
+ draftId: z.ZodString;
166
+ requestId: z.ZodString;
167
+ }, z.core.$strip>;
168
+ export declare const ArchitecturalViewsDraftPublishResponseSchema: z.ZodObject<{
169
+ type: z.ZodLiteral<"architectural-views.draft.publish.response">;
170
+ payload: z.ZodObject<{
171
+ requestId: z.ZodString;
172
+ success: z.ZodBoolean;
173
+ view: z.ZodNullable<z.ZodObject<{
174
+ id: z.ZodString;
175
+ title: z.ZodString;
176
+ knowledgeReferences: z.ZodArray<z.ZodObject<{
177
+ kind: z.ZodEnum<{
178
+ record: "record";
179
+ root: "root";
180
+ }>;
181
+ id: z.ZodString;
182
+ }, z.core.$strip>>;
183
+ storeLocation: z.ZodEnum<{
184
+ repository: "repository";
185
+ host: "host";
186
+ }>;
187
+ htmlPath: z.ZodString;
188
+ renderedAt: z.ZodString;
189
+ sourceStatus: z.ZodOptional<z.ZodEnum<{
190
+ unknown: "unknown";
191
+ stale: "stale";
192
+ current: "current";
193
+ }>>;
194
+ }, z.core.$strip>>;
195
+ error: z.ZodNullable<z.ZodString>;
196
+ }, z.core.$strip>;
197
+ }, z.core.$strip>;
198
+ export declare const ArchitecturalViewsDraftDiscardRequestSchema: z.ZodObject<{
199
+ type: z.ZodLiteral<"architectural-views.draft.discard.request">;
200
+ workspaceId: z.ZodString;
201
+ viewId: z.ZodString;
202
+ draftId: z.ZodString;
203
+ requestId: z.ZodString;
204
+ }, z.core.$strip>;
205
+ export declare const ArchitecturalViewsDraftDiscardResponseSchema: z.ZodObject<{
206
+ type: z.ZodLiteral<"architectural-views.draft.discard.response">;
207
+ payload: z.ZodObject<{
208
+ requestId: z.ZodString;
209
+ success: z.ZodBoolean;
210
+ error: z.ZodNullable<z.ZodString>;
211
+ }, z.core.$strip>;
212
+ }, z.core.$strip>;
213
+ export declare const ArchitecturalViewsDraftGetContentRequestSchema: z.ZodObject<{
214
+ type: z.ZodLiteral<"architectural-views.draft.get-content.request">;
215
+ workspaceId: z.ZodString;
216
+ viewId: z.ZodString;
217
+ draftId: z.ZodString;
218
+ requestId: z.ZodString;
219
+ }, z.core.$strip>;
220
+ export declare const ArchitecturalViewsDraftGetContentResponseSchema: z.ZodObject<{
221
+ type: z.ZodLiteral<"architectural-views.draft.get-content.response">;
222
+ payload: z.ZodObject<{
223
+ requestId: z.ZodString;
224
+ success: z.ZodBoolean;
225
+ draft: z.ZodNullable<z.ZodObject<{
226
+ id: z.ZodString;
227
+ viewId: z.ZodString;
228
+ title: z.ZodString;
229
+ knowledgeReferences: z.ZodArray<z.ZodObject<{
230
+ kind: z.ZodEnum<{
231
+ record: "record";
232
+ root: "root";
233
+ }>;
234
+ id: z.ZodString;
235
+ }, z.core.$strip>>;
236
+ baseSpecificationSha256: z.ZodNullable<z.ZodString>;
237
+ authoringAgentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
238
+ createdAt: z.ZodString;
239
+ updatedAt: z.ZodString;
240
+ }, z.core.$strip>>;
241
+ html: z.ZodNullable<z.ZodString>;
242
+ error: z.ZodNullable<z.ZodString>;
243
+ }, z.core.$strip>;
244
+ }, z.core.$strip>;
245
+ export declare const ArchitecturalViewsListRequestSchema: z.ZodObject<{
246
+ type: z.ZodLiteral<"architectural-views.list.request">;
247
+ workspaceId: z.ZodString;
248
+ knowledgeReference: z.ZodOptional<z.ZodObject<{
249
+ kind: z.ZodEnum<{
250
+ record: "record";
251
+ root: "root";
252
+ }>;
253
+ id: z.ZodString;
254
+ }, z.core.$strip>>;
255
+ requestId: z.ZodString;
256
+ }, z.core.$strip>;
257
+ export declare const ArchitecturalViewsListResponseSchema: z.ZodObject<{
258
+ type: z.ZodLiteral<"architectural-views.list.response">;
259
+ payload: z.ZodObject<{
260
+ requestId: z.ZodString;
261
+ success: z.ZodBoolean;
262
+ views: z.ZodArray<z.ZodObject<{
263
+ id: z.ZodString;
264
+ title: z.ZodString;
265
+ knowledgeReferences: z.ZodArray<z.ZodObject<{
266
+ kind: z.ZodEnum<{
267
+ record: "record";
268
+ root: "root";
269
+ }>;
270
+ id: z.ZodString;
271
+ }, z.core.$strip>>;
272
+ storeLocation: z.ZodEnum<{
273
+ repository: "repository";
274
+ host: "host";
275
+ }>;
276
+ htmlPath: z.ZodString;
277
+ renderedAt: z.ZodString;
278
+ sourceStatus: z.ZodOptional<z.ZodEnum<{
279
+ unknown: "unknown";
280
+ stale: "stale";
281
+ current: "current";
282
+ }>>;
283
+ }, z.core.$strip>>;
284
+ error: z.ZodNullable<z.ZodString>;
285
+ }, z.core.$strip>;
286
+ }, z.core.$strip>;
287
+ export declare const ArchitecturalViewsGetContentRequestSchema: z.ZodObject<{
288
+ type: z.ZodLiteral<"architectural-views.get-content.request">;
289
+ workspaceId: z.ZodString;
290
+ viewId: z.ZodString;
291
+ requestId: z.ZodString;
292
+ }, z.core.$strip>;
293
+ export declare const ArchitecturalViewsGetContentResponseSchema: z.ZodObject<{
294
+ type: z.ZodLiteral<"architectural-views.get-content.response">;
295
+ payload: z.ZodObject<{
296
+ requestId: z.ZodString;
297
+ success: z.ZodBoolean;
298
+ view: z.ZodNullable<z.ZodObject<{
299
+ id: z.ZodString;
300
+ title: z.ZodString;
301
+ knowledgeReferences: z.ZodArray<z.ZodObject<{
302
+ kind: z.ZodEnum<{
303
+ record: "record";
304
+ root: "root";
305
+ }>;
306
+ id: z.ZodString;
307
+ }, z.core.$strip>>;
308
+ storeLocation: z.ZodEnum<{
309
+ repository: "repository";
310
+ host: "host";
311
+ }>;
312
+ htmlPath: z.ZodString;
313
+ renderedAt: z.ZodString;
314
+ sourceStatus: z.ZodOptional<z.ZodEnum<{
315
+ unknown: "unknown";
316
+ stale: "stale";
317
+ current: "current";
318
+ }>>;
319
+ }, z.core.$strip>>;
320
+ html: z.ZodNullable<z.ZodString>;
321
+ error: z.ZodNullable<z.ZodString>;
322
+ }, z.core.$strip>;
323
+ }, z.core.$strip>;
324
+ /** A daemon-routed UI intent emitted only after an agent explicitly asks to show a view. */
325
+ export declare const ArchitecturalViewsOpenNotificationSchema: z.ZodObject<{
326
+ type: z.ZodLiteral<"architectural-views.open.notification">;
327
+ payload: z.ZodObject<{
328
+ workspaceId: z.ZodString;
329
+ agentId: z.ZodString;
330
+ viewId: z.ZodString;
331
+ }, z.core.$strip>;
332
+ }, z.core.$strip>;
333
+ export type ArchitecturalViewsDeliverRequest = z.infer<typeof ArchitecturalViewsDeliverRequestSchema>;
334
+ export type ArchitecturalViewsDeliverResponse = z.infer<typeof ArchitecturalViewsDeliverResponseSchema>;
335
+ export type ArchitecturalViewsListRequest = z.infer<typeof ArchitecturalViewsListRequestSchema>;
336
+ export type ArchitecturalViewsListResponse = z.infer<typeof ArchitecturalViewsListResponseSchema>;
337
+ export type ArchitecturalViewsGetContentRequest = z.infer<typeof ArchitecturalViewsGetContentRequestSchema>;
338
+ export type ArchitecturalViewsGetContentResponse = z.infer<typeof ArchitecturalViewsGetContentResponseSchema>;
339
+ export type ArchitecturalViewsOpenNotification = z.infer<typeof ArchitecturalViewsOpenNotificationSchema>;
340
+ export type ArchitecturalViewsDraftGetContentRequest = z.infer<typeof ArchitecturalViewsDraftGetContentRequestSchema>;
341
+ export type ArchitecturalViewsDraftGetContentResponse = z.infer<typeof ArchitecturalViewsDraftGetContentResponseSchema>;
342
+ //# sourceMappingURL=rpc-schemas.d.ts.map
@@ -0,0 +1,171 @@
1
+ import { z } from "zod";
2
+ export const ArchitecturalViewIdSchema = z.string().regex(/^[a-z][a-z0-9-]*$/);
3
+ export const ArchitecturalViewKnowledgeReferenceSchema = z.object({
4
+ kind: z.enum(["root", "record"]),
5
+ id: z.string().min(1),
6
+ });
7
+ export const ArchitecturalViewsDeliverRequestSchema = z.object({
8
+ type: z.literal("architectural-views.deliver.request"),
9
+ workspaceId: z.string(),
10
+ viewId: ArchitecturalViewIdSchema,
11
+ title: z.string().min(1),
12
+ knowledgeReferences: z.array(ArchitecturalViewKnowledgeReferenceSchema).min(1),
13
+ sourcePath: z.string().min(1),
14
+ quality: z.enum(["standard", "showcase"]).optional(),
15
+ requestId: z.string(),
16
+ });
17
+ export const ArchitecturalViewsDeliverResponseSchema = z.object({
18
+ type: z.literal("architectural-views.deliver.response"),
19
+ payload: z.object({
20
+ requestId: z.string(),
21
+ success: z.boolean(),
22
+ viewId: ArchitecturalViewIdSchema,
23
+ storeLocation: z.enum(["repository", "host"]).nullable(),
24
+ htmlPath: z.string().nullable(),
25
+ error: z.string().nullable(),
26
+ }),
27
+ });
28
+ export const ArchitecturalViewSummarySchema = z.object({
29
+ id: ArchitecturalViewIdSchema,
30
+ title: z.string(),
31
+ knowledgeReferences: z.array(ArchitecturalViewKnowledgeReferenceSchema),
32
+ storeLocation: z.enum(["repository", "host"]),
33
+ htmlPath: z.string(),
34
+ renderedAt: z.string(),
35
+ // COMPAT(architecturalViewSourceStatus): added in v0.9.0, remove after 2027-02-28.
36
+ sourceStatus: z.enum(["current", "stale", "unknown"]).optional(),
37
+ });
38
+ export const ArchitecturalViewDraftSchema = z.object({
39
+ id: ArchitecturalViewIdSchema,
40
+ viewId: ArchitecturalViewIdSchema,
41
+ title: z.string(),
42
+ knowledgeReferences: z.array(ArchitecturalViewKnowledgeReferenceSchema),
43
+ baseSpecificationSha256: z.string().nullable(),
44
+ // COMPAT(architecturalViewDraftAuthoring): added in v0.9.0, remove after 2027-02-28.
45
+ authoringAgentId: z.string().nullable().optional(),
46
+ createdAt: z.string(),
47
+ updatedAt: z.string(),
48
+ });
49
+ export const ArchitecturalViewsDraftCreateRequestSchema = z.object({
50
+ type: z.literal("architectural-views.draft.create.request"),
51
+ workspaceId: z.string(),
52
+ viewId: ArchitecturalViewIdSchema,
53
+ draftId: ArchitecturalViewIdSchema,
54
+ title: z.string().min(1),
55
+ knowledgeReferences: z.array(ArchitecturalViewKnowledgeReferenceSchema).min(1),
56
+ sourcePath: z.string().min(1).optional(),
57
+ quality: z.enum(["standard", "showcase"]).optional(),
58
+ requestId: z.string(),
59
+ });
60
+ export const ArchitecturalViewsDraftCreateResponseSchema = z.object({
61
+ type: z.literal("architectural-views.draft.create.response"),
62
+ payload: z.object({
63
+ requestId: z.string(),
64
+ success: z.boolean(),
65
+ draft: ArchitecturalViewDraftSchema.nullable(),
66
+ error: z.string().nullable(),
67
+ }),
68
+ });
69
+ export const ArchitecturalViewsDraftUpdateRequestSchema = z.object({
70
+ type: z.literal("architectural-views.draft.update.request"),
71
+ workspaceId: z.string(),
72
+ viewId: ArchitecturalViewIdSchema,
73
+ draftId: ArchitecturalViewIdSchema,
74
+ sourcePath: z.string().min(1),
75
+ quality: z.enum(["standard", "showcase"]).optional(),
76
+ requestId: z.string(),
77
+ });
78
+ export const ArchitecturalViewsDraftUpdateResponseSchema = z.object({
79
+ type: z.literal("architectural-views.draft.update.response"),
80
+ payload: z.object({
81
+ requestId: z.string(),
82
+ success: z.boolean(),
83
+ draft: ArchitecturalViewDraftSchema.nullable(),
84
+ error: z.string().nullable(),
85
+ }),
86
+ });
87
+ export const ArchitecturalViewsDraftPublishRequestSchema = z.object({
88
+ type: z.literal("architectural-views.draft.publish.request"),
89
+ workspaceId: z.string(),
90
+ viewId: ArchitecturalViewIdSchema,
91
+ draftId: ArchitecturalViewIdSchema,
92
+ requestId: z.string(),
93
+ });
94
+ export const ArchitecturalViewsDraftPublishResponseSchema = z.object({
95
+ type: z.literal("architectural-views.draft.publish.response"),
96
+ payload: z.object({
97
+ requestId: z.string(),
98
+ success: z.boolean(),
99
+ view: ArchitecturalViewSummarySchema.nullable(),
100
+ error: z.string().nullable(),
101
+ }),
102
+ });
103
+ export const ArchitecturalViewsDraftDiscardRequestSchema = z.object({
104
+ type: z.literal("architectural-views.draft.discard.request"),
105
+ workspaceId: z.string(),
106
+ viewId: ArchitecturalViewIdSchema,
107
+ draftId: ArchitecturalViewIdSchema,
108
+ requestId: z.string(),
109
+ });
110
+ export const ArchitecturalViewsDraftDiscardResponseSchema = z.object({
111
+ type: z.literal("architectural-views.draft.discard.response"),
112
+ payload: z.object({ requestId: z.string(), success: z.boolean(), error: z.string().nullable() }),
113
+ });
114
+ export const ArchitecturalViewsDraftGetContentRequestSchema = z.object({
115
+ type: z.literal("architectural-views.draft.get-content.request"),
116
+ workspaceId: z.string(),
117
+ viewId: ArchitecturalViewIdSchema,
118
+ draftId: ArchitecturalViewIdSchema,
119
+ requestId: z.string(),
120
+ });
121
+ export const ArchitecturalViewsDraftGetContentResponseSchema = z.object({
122
+ type: z.literal("architectural-views.draft.get-content.response"),
123
+ payload: z.object({
124
+ requestId: z.string(),
125
+ success: z.boolean(),
126
+ draft: ArchitecturalViewDraftSchema.nullable(),
127
+ html: z.string().nullable(),
128
+ error: z.string().nullable(),
129
+ }),
130
+ });
131
+ export const ArchitecturalViewsListRequestSchema = z.object({
132
+ type: z.literal("architectural-views.list.request"),
133
+ workspaceId: z.string(),
134
+ knowledgeReference: ArchitecturalViewKnowledgeReferenceSchema.optional(),
135
+ requestId: z.string(),
136
+ });
137
+ export const ArchitecturalViewsListResponseSchema = z.object({
138
+ type: z.literal("architectural-views.list.response"),
139
+ payload: z.object({
140
+ requestId: z.string(),
141
+ success: z.boolean(),
142
+ views: z.array(ArchitecturalViewSummarySchema),
143
+ error: z.string().nullable(),
144
+ }),
145
+ });
146
+ export const ArchitecturalViewsGetContentRequestSchema = z.object({
147
+ type: z.literal("architectural-views.get-content.request"),
148
+ workspaceId: z.string(),
149
+ viewId: ArchitecturalViewIdSchema,
150
+ requestId: z.string(),
151
+ });
152
+ export const ArchitecturalViewsGetContentResponseSchema = z.object({
153
+ type: z.literal("architectural-views.get-content.response"),
154
+ payload: z.object({
155
+ requestId: z.string(),
156
+ success: z.boolean(),
157
+ view: ArchitecturalViewSummarySchema.nullable(),
158
+ html: z.string().nullable(),
159
+ error: z.string().nullable(),
160
+ }),
161
+ });
162
+ /** A daemon-routed UI intent emitted only after an agent explicitly asks to show a view. */
163
+ export const ArchitecturalViewsOpenNotificationSchema = z.object({
164
+ type: z.literal("architectural-views.open.notification"),
165
+ payload: z.object({
166
+ workspaceId: z.string(),
167
+ agentId: z.string(),
168
+ viewId: ArchitecturalViewIdSchema,
169
+ }),
170
+ });
171
+ //# sourceMappingURL=rpc-schemas.js.map