@otto-code/protocol 0.8.10 → 0.8.13

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 (83) hide show
  1. package/dist/agent-labels.d.ts +3 -0
  2. package/dist/agent-labels.js +10 -0
  3. package/dist/agent-personalities.d.ts +4 -3
  4. package/dist/agent-personalities.js +13 -20
  5. package/dist/agent-queue.d.ts +87 -0
  6. package/dist/agent-queue.js +106 -0
  7. package/dist/agent-types.d.ts +24 -4
  8. package/dist/binary-frames/terminal.d.ts +4 -0
  9. package/dist/binary-frames/terminal.js +1 -0
  10. package/dist/brain.d.ts +2412 -0
  11. package/dist/brain.js +1100 -0
  12. package/dist/chat/rpc-schemas.js +1 -0
  13. package/dist/chat/types.js +1 -0
  14. package/dist/client-capabilities.d.ts +3 -0
  15. package/dist/client-capabilities.js +14 -0
  16. package/dist/code-intelligence.d.ts +917 -0
  17. package/dist/code-intelligence.js +699 -0
  18. package/dist/communications.d.ts +1106 -0
  19. package/dist/communications.js +384 -0
  20. package/dist/context.d.ts +787 -0
  21. package/dist/context.js +295 -0
  22. package/dist/daemon-config.d.ts +383 -0
  23. package/dist/daemon-config.js +401 -0
  24. package/dist/file-operations.d.ts +380 -0
  25. package/dist/file-operations.js +282 -0
  26. package/dist/generated/validation/ws-outbound.aot.js +67260 -57392
  27. package/dist/git-hosting.d.ts +117 -0
  28. package/dist/git-hosting.js +109 -0
  29. package/dist/git-operations.d.ts +255 -0
  30. package/dist/git-operations.js +221 -0
  31. package/dist/integration-authorization.d.ts +195 -0
  32. package/dist/integration-authorization.js +125 -0
  33. package/dist/kanban.d.ts +341 -0
  34. package/dist/kanban.js +273 -0
  35. package/dist/loop/rpc-schemas.d.ts +6 -6
  36. package/dist/loop/rpc-schemas.js +1 -0
  37. package/dist/meetings.d.ts +95 -0
  38. package/dist/meetings.js +57 -0
  39. package/dist/messages.d.ts +11175 -11039
  40. package/dist/messages.js +4756 -8700
  41. package/dist/orchestration.d.ts +726 -0
  42. package/dist/orchestration.js +232 -0
  43. package/dist/personality-schemas.d.ts +221 -0
  44. package/dist/personality-schemas.js +340 -0
  45. package/dist/preview.d.ts +140 -0
  46. package/dist/preview.js +98 -0
  47. package/dist/project-knowledge.d.ts +740 -0
  48. package/dist/project-knowledge.js +229 -0
  49. package/dist/project-links.d.ts +102 -0
  50. package/dist/project-links.js +62 -0
  51. package/dist/provider-config.d.ts +87 -2
  52. package/dist/provider-config.js +110 -0
  53. package/dist/provider-manifest.js +7 -0
  54. package/dist/provider-snapshot-codec.d.ts +18 -0
  55. package/dist/provider-snapshot-codec.js +71 -0
  56. package/dist/refine.d.ts +93 -0
  57. package/dist/refine.js +78 -0
  58. package/dist/schedule/rpc-schemas.d.ts +55 -111
  59. package/dist/schedule/types.d.ts +16 -37
  60. package/dist/schedule/types.js +1 -11
  61. package/dist/search/text-match.d.ts +55 -0
  62. package/dist/search/text-match.js +262 -0
  63. package/dist/speech.d.ts +180 -0
  64. package/dist/speech.js +177 -0
  65. package/dist/storage.d.ts +79 -0
  66. package/dist/storage.js +107 -0
  67. package/dist/suggested-tasks.d.ts +106 -0
  68. package/dist/suggested-tasks.js +81 -0
  69. package/dist/terminal-compatibility.d.ts +55 -0
  70. package/dist/terminal-compatibility.js +35 -0
  71. package/dist/terminal-input-mode.d.ts +4 -0
  72. package/dist/terminal-input-mode.js +35 -6
  73. package/dist/terminal-key-input.js +15 -6
  74. package/dist/terminal-profiles.d.ts +35 -0
  75. package/dist/terminal-profiles.js +246 -4
  76. package/dist/tool-call-display.d.ts +2 -2
  77. package/dist/tool-call-display.js +6 -6
  78. package/dist/usage-stats.d.ts +255 -0
  79. package/dist/usage-stats.js +162 -0
  80. package/dist/validation/ws-outbound-schema-metadata.d.ts +1906 -266
  81. package/dist/worktree-ops.d.ts +81 -0
  82. package/dist/worktree-ops.js +88 -0
  83. package/package.json +1 -1
@@ -0,0 +1,341 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Provider-agnostic Kanban wire model.
4
+ *
5
+ * Neither the client nor the daemon controller references a provider's native
6
+ * identifiers (GraphQL node ids, single-select option ids, Jira quick filters)
7
+ * in these shapes. `id`/`status` are opaque strings chosen by the provider;
8
+ * `rawProviderId` carries the provider's native identifier for deep links and
9
+ * later provider-specific features. The first provider is GitHub Projects v2;
10
+ * Jira is next, and it must slot into the same shapes without edits here.
11
+ */
12
+ export declare const KanbanCardSchema: z.ZodObject<{
13
+ id: z.ZodString;
14
+ title: z.ZodString;
15
+ body: z.ZodOptional<z.ZodString>;
16
+ url: z.ZodOptional<z.ZodString>;
17
+ status: z.ZodString;
18
+ assignees: z.ZodArray<z.ZodString>;
19
+ rawProviderId: z.ZodString;
20
+ }, z.core.$strict>;
21
+ export declare const KanbanColumnSchema: z.ZodObject<{
22
+ id: z.ZodString;
23
+ name: z.ZodString;
24
+ cards: z.ZodArray<z.ZodObject<{
25
+ id: z.ZodString;
26
+ title: z.ZodString;
27
+ body: z.ZodOptional<z.ZodString>;
28
+ url: z.ZodOptional<z.ZodString>;
29
+ status: z.ZodString;
30
+ assignees: z.ZodArray<z.ZodString>;
31
+ rawProviderId: z.ZodString;
32
+ }, z.core.$strict>>;
33
+ }, z.core.$strict>;
34
+ export declare const KanbanBoardSchema: z.ZodObject<{
35
+ id: z.ZodString;
36
+ title: z.ZodString;
37
+ columns: z.ZodArray<z.ZodObject<{
38
+ id: z.ZodString;
39
+ name: z.ZodString;
40
+ cards: z.ZodArray<z.ZodObject<{
41
+ id: z.ZodString;
42
+ title: z.ZodString;
43
+ body: z.ZodOptional<z.ZodString>;
44
+ url: z.ZodOptional<z.ZodString>;
45
+ status: z.ZodString;
46
+ assignees: z.ZodArray<z.ZodString>;
47
+ rawProviderId: z.ZodString;
48
+ }, z.core.$strict>>;
49
+ }, z.core.$strict>>;
50
+ }, z.core.$strict>;
51
+ export declare const KanbanBoardRefSchema: z.ZodObject<{
52
+ providerId: z.ZodString;
53
+ boardId: z.ZodString;
54
+ title: z.ZodString;
55
+ }, z.core.$strict>;
56
+ export type KanbanCard = z.infer<typeof KanbanCardSchema>;
57
+ export type KanbanColumn = z.infer<typeof KanbanColumnSchema>;
58
+ export type KanbanBoard = z.infer<typeof KanbanBoardSchema>;
59
+ export type KanbanBoardRef = z.infer<typeof KanbanBoardRefSchema>;
60
+ export declare const KanbanErrorSchema: z.ZodNullable<z.ZodString>;
61
+ /**
62
+ * One command in a remediation route, as argv - never a shell string.
63
+ *
64
+ * The daemon resolves the exact command (including any host flag), so the
65
+ * client only ever displays it, copies it, or runs it on explicit consent.
66
+ */
67
+ export declare const KanbanRemediationStepSchema: z.ZodObject<{
68
+ command: z.ZodString;
69
+ args: z.ZodArray<z.ZodString>;
70
+ display: z.ZodString;
71
+ }, z.core.$strict>;
72
+ /**
73
+ * A daemon-resolved recovery route for a failed Kanban call.
74
+ *
75
+ * Provider-neutral by construction: `reason` is an opaque key the client may
76
+ * localize and must tolerate not knowing (it falls back to `error`), and the
77
+ * steps are already-resolved argv. This exists because a provider's own error
78
+ * text can be actively misleading in Otto: GitHub tells the user to edit a
79
+ * personal access token, but the credential Otto sends is the gh CLI's OAuth
80
+ * token, which that page does not list. The daemon replaces that guidance
81
+ * rather than passing it through.
82
+ */
83
+ export declare const KanbanRemediationSchema: z.ZodObject<{
84
+ reason: z.ZodString;
85
+ missingScopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
86
+ steps: z.ZodArray<z.ZodObject<{
87
+ command: z.ZodString;
88
+ args: z.ZodArray<z.ZodString>;
89
+ display: z.ZodString;
90
+ }, z.core.$strict>>;
91
+ url: z.ZodOptional<z.ZodString>;
92
+ }, z.core.$strict>;
93
+ /** The gh CLI credential is missing the Projects v2 scopes. */
94
+ export declare const KANBAN_REMEDIATION_GITHUB_SCOPES = "github-missing-scopes";
95
+ export type KanbanRemediationStep = z.infer<typeof KanbanRemediationStepSchema>;
96
+ export type KanbanRemediation = z.infer<typeof KanbanRemediationSchema>;
97
+ export declare const KanbanBoardsListRequestSchema: z.ZodObject<{
98
+ type: z.ZodLiteral<"kanban.boards.list.request">;
99
+ providerId: z.ZodString;
100
+ projectId: z.ZodOptional<z.ZodString>;
101
+ projectKey: z.ZodOptional<z.ZodString>;
102
+ requestId: z.ZodString;
103
+ }, z.core.$strict>;
104
+ export declare const KanbanBoardsListResponseSchema: z.ZodObject<{
105
+ type: z.ZodLiteral<"kanban.boards.list.response">;
106
+ payload: z.ZodObject<{
107
+ providerId: z.ZodString;
108
+ boards: z.ZodArray<z.ZodObject<{
109
+ providerId: z.ZodString;
110
+ boardId: z.ZodString;
111
+ title: z.ZodString;
112
+ }, z.core.$strict>>;
113
+ error: z.ZodNullable<z.ZodString>;
114
+ remediation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
115
+ reason: z.ZodString;
116
+ missingScopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
117
+ steps: z.ZodArray<z.ZodObject<{
118
+ command: z.ZodString;
119
+ args: z.ZodArray<z.ZodString>;
120
+ display: z.ZodString;
121
+ }, z.core.$strict>>;
122
+ url: z.ZodOptional<z.ZodString>;
123
+ }, z.core.$strict>>>;
124
+ requestId: z.ZodString;
125
+ }, z.core.$strip>;
126
+ }, z.core.$strict>;
127
+ export declare const KanbanBoardGetRequestSchema: z.ZodObject<{
128
+ type: z.ZodLiteral<"kanban.board.get.request">;
129
+ providerId: z.ZodString;
130
+ boardId: z.ZodString;
131
+ requestId: z.ZodString;
132
+ }, z.core.$strict>;
133
+ export declare const KanbanBoardGetResponseSchema: z.ZodObject<{
134
+ type: z.ZodLiteral<"kanban.board.get.response">;
135
+ payload: z.ZodObject<{
136
+ providerId: z.ZodString;
137
+ board: z.ZodNullable<z.ZodObject<{
138
+ id: z.ZodString;
139
+ title: z.ZodString;
140
+ columns: z.ZodArray<z.ZodObject<{
141
+ id: z.ZodString;
142
+ name: z.ZodString;
143
+ cards: z.ZodArray<z.ZodObject<{
144
+ id: z.ZodString;
145
+ title: z.ZodString;
146
+ body: z.ZodOptional<z.ZodString>;
147
+ url: z.ZodOptional<z.ZodString>;
148
+ status: z.ZodString;
149
+ assignees: z.ZodArray<z.ZodString>;
150
+ rawProviderId: z.ZodString;
151
+ }, z.core.$strict>>;
152
+ }, z.core.$strict>>;
153
+ }, z.core.$strict>>;
154
+ error: z.ZodNullable<z.ZodString>;
155
+ remediation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
156
+ reason: z.ZodString;
157
+ missingScopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
158
+ steps: z.ZodArray<z.ZodObject<{
159
+ command: z.ZodString;
160
+ args: z.ZodArray<z.ZodString>;
161
+ display: z.ZodString;
162
+ }, z.core.$strict>>;
163
+ url: z.ZodOptional<z.ZodString>;
164
+ }, z.core.$strict>>>;
165
+ requestId: z.ZodString;
166
+ }, z.core.$strip>;
167
+ }, z.core.$strict>;
168
+ export declare const KanbanCardMoveRequestSchema: z.ZodObject<{
169
+ type: z.ZodLiteral<"kanban.card.move.request">;
170
+ providerId: z.ZodString;
171
+ boardId: z.ZodString;
172
+ cardId: z.ZodString;
173
+ targetColumnId: z.ZodString;
174
+ requestId: z.ZodString;
175
+ }, z.core.$strict>;
176
+ export declare const KanbanCardMoveResponseSchema: z.ZodObject<{
177
+ type: z.ZodLiteral<"kanban.card.move.response">;
178
+ payload: z.ZodObject<{
179
+ providerId: z.ZodString;
180
+ boardId: z.ZodString;
181
+ cardId: z.ZodString;
182
+ targetColumnId: z.ZodString;
183
+ error: z.ZodNullable<z.ZodString>;
184
+ remediation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
185
+ reason: z.ZodString;
186
+ missingScopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
187
+ steps: z.ZodArray<z.ZodObject<{
188
+ command: z.ZodString;
189
+ args: z.ZodArray<z.ZodString>;
190
+ display: z.ZodString;
191
+ }, z.core.$strict>>;
192
+ url: z.ZodOptional<z.ZodString>;
193
+ }, z.core.$strict>>>;
194
+ requestId: z.ZodString;
195
+ }, z.core.$strip>;
196
+ }, z.core.$strict>;
197
+ export declare const KanbanCardCreateRequestSchema: z.ZodObject<{
198
+ type: z.ZodLiteral<"kanban.card.create.request">;
199
+ providerId: z.ZodString;
200
+ boardId: z.ZodString;
201
+ columnId: z.ZodOptional<z.ZodString>;
202
+ title: z.ZodString;
203
+ body: z.ZodOptional<z.ZodString>;
204
+ requestId: z.ZodString;
205
+ }, z.core.$strict>;
206
+ export declare const KanbanCardCreateResponseSchema: z.ZodObject<{
207
+ type: z.ZodLiteral<"kanban.card.create.response">;
208
+ payload: z.ZodObject<{
209
+ providerId: z.ZodString;
210
+ boardId: z.ZodString;
211
+ columnId: z.ZodString;
212
+ card: z.ZodNullable<z.ZodObject<{
213
+ id: z.ZodString;
214
+ title: z.ZodString;
215
+ body: z.ZodOptional<z.ZodString>;
216
+ url: z.ZodOptional<z.ZodString>;
217
+ status: z.ZodString;
218
+ assignees: z.ZodArray<z.ZodString>;
219
+ rawProviderId: z.ZodString;
220
+ }, z.core.$strict>>;
221
+ error: z.ZodNullable<z.ZodString>;
222
+ remediation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
223
+ reason: z.ZodString;
224
+ missingScopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
225
+ steps: z.ZodArray<z.ZodObject<{
226
+ command: z.ZodString;
227
+ args: z.ZodArray<z.ZodString>;
228
+ display: z.ZodString;
229
+ }, z.core.$strict>>;
230
+ url: z.ZodOptional<z.ZodString>;
231
+ }, z.core.$strict>>>;
232
+ requestId: z.ZodString;
233
+ }, z.core.$strip>;
234
+ }, z.core.$strict>;
235
+ export declare const KanbanTaskLinkRequestSchema: z.ZodObject<{
236
+ type: z.ZodLiteral<"kanban.task.link.request">;
237
+ providerId: z.ZodString;
238
+ boardId: z.ZodString;
239
+ externalId: z.ZodString;
240
+ columnId: z.ZodOptional<z.ZodString>;
241
+ requestId: z.ZodString;
242
+ }, z.core.$strict>;
243
+ export declare const KanbanTaskLinkResponseSchema: z.ZodObject<{
244
+ type: z.ZodLiteral<"kanban.task.link.response">;
245
+ payload: z.ZodObject<{
246
+ providerId: z.ZodString;
247
+ boardId: z.ZodString;
248
+ columnId: z.ZodString;
249
+ card: z.ZodNullable<z.ZodObject<{
250
+ id: z.ZodString;
251
+ title: z.ZodString;
252
+ body: z.ZodOptional<z.ZodString>;
253
+ url: z.ZodOptional<z.ZodString>;
254
+ status: z.ZodString;
255
+ assignees: z.ZodArray<z.ZodString>;
256
+ rawProviderId: z.ZodString;
257
+ }, z.core.$strict>>;
258
+ error: z.ZodNullable<z.ZodString>;
259
+ remediation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
260
+ reason: z.ZodString;
261
+ missingScopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
262
+ steps: z.ZodArray<z.ZodObject<{
263
+ command: z.ZodString;
264
+ args: z.ZodArray<z.ZodString>;
265
+ display: z.ZodString;
266
+ }, z.core.$strict>>;
267
+ url: z.ZodOptional<z.ZodString>;
268
+ }, z.core.$strict>>>;
269
+ requestId: z.ZodString;
270
+ }, z.core.$strip>;
271
+ }, z.core.$strict>;
272
+ export type KanbanBoardsListRequest = z.infer<typeof KanbanBoardsListRequestSchema>;
273
+ export type KanbanBoardsListResponse = z.infer<typeof KanbanBoardsListResponseSchema>;
274
+ export type KanbanBoardGetRequest = z.infer<typeof KanbanBoardGetRequestSchema>;
275
+ export type KanbanBoardGetResponse = z.infer<typeof KanbanBoardGetResponseSchema>;
276
+ export type KanbanCardMoveRequest = z.infer<typeof KanbanCardMoveRequestSchema>;
277
+ export type KanbanCardMoveResponse = z.infer<typeof KanbanCardMoveResponseSchema>;
278
+ export type KanbanCardCreateRequest = z.infer<typeof KanbanCardCreateRequestSchema>;
279
+ export type KanbanCardCreateResponse = z.infer<typeof KanbanCardCreateResponseSchema>;
280
+ export type KanbanTaskLinkRequest = z.infer<typeof KanbanTaskLinkRequestSchema>;
281
+ export type KanbanTaskLinkResponse = z.infer<typeof KanbanTaskLinkResponseSchema>;
282
+ /**
283
+ * The one "this project has no board yet" message. The app matches on it to
284
+ * render the watermark state with a link into project settings, so it is part
285
+ * of the contract rather than incidental copy. Lives with the wire model (not
286
+ * the daemon) so the app can compare against it without depending on the
287
+ * server package.
288
+ */
289
+ export declare const KANBAN_NOT_CONFIGURED = "No kanban board is configured for this project.";
290
+ export declare const ProjectKanbanTargetSchema: z.ZodObject<{
291
+ adapter: z.ZodEnum<{
292
+ github: "github";
293
+ jira: "jira";
294
+ }>;
295
+ boardId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
296
+ }, z.core.$loose>;
297
+ export type ProjectKanbanTarget = z.infer<typeof ProjectKanbanTargetSchema>;
298
+ export declare const KanbanProjectTargetSetRequestSchema: z.ZodObject<{
299
+ type: z.ZodLiteral<"kanban.project.target.set.request">;
300
+ projectId: z.ZodString;
301
+ target: z.ZodNullable<z.ZodObject<{
302
+ adapter: z.ZodEnum<{
303
+ github: "github";
304
+ jira: "jira";
305
+ }>;
306
+ boardId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
307
+ }, z.core.$loose>>;
308
+ requestId: z.ZodString;
309
+ }, z.core.$strip>;
310
+ export declare const KanbanProjectTargetSetResponsePayloadSchema: z.ZodObject<{
311
+ requestId: z.ZodString;
312
+ projectId: z.ZodString;
313
+ accepted: z.ZodBoolean;
314
+ target: z.ZodNullable<z.ZodObject<{
315
+ adapter: z.ZodEnum<{
316
+ github: "github";
317
+ jira: "jira";
318
+ }>;
319
+ boardId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
320
+ }, z.core.$loose>>;
321
+ error: z.ZodNullable<z.ZodString>;
322
+ }, z.core.$strip>;
323
+ export declare const KanbanProjectTargetSetResponseSchema: z.ZodObject<{
324
+ type: z.ZodLiteral<"kanban.project.target.set.response">;
325
+ payload: z.ZodObject<{
326
+ requestId: z.ZodString;
327
+ projectId: z.ZodString;
328
+ accepted: z.ZodBoolean;
329
+ target: z.ZodNullable<z.ZodObject<{
330
+ adapter: z.ZodEnum<{
331
+ github: "github";
332
+ jira: "jira";
333
+ }>;
334
+ boardId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
335
+ }, z.core.$loose>>;
336
+ error: z.ZodNullable<z.ZodString>;
337
+ }, z.core.$strip>;
338
+ }, z.core.$strip>;
339
+ export type KanbanProjectTargetSetResponse = z.infer<typeof KanbanProjectTargetSetResponseSchema>;
340
+ export type KanbanProjectTargetSetRequest = z.infer<typeof KanbanProjectTargetSetRequestSchema>;
341
+ //# sourceMappingURL=kanban.d.ts.map
package/dist/kanban.js ADDED
@@ -0,0 +1,273 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Provider-agnostic Kanban wire model.
4
+ *
5
+ * Neither the client nor the daemon controller references a provider's native
6
+ * identifiers (GraphQL node ids, single-select option ids, Jira quick filters)
7
+ * in these shapes. `id`/`status` are opaque strings chosen by the provider;
8
+ * `rawProviderId` carries the provider's native identifier for deep links and
9
+ * later provider-specific features. The first provider is GitHub Projects v2;
10
+ * Jira is next, and it must slot into the same shapes without edits here.
11
+ */
12
+ export const KanbanCardSchema = z
13
+ .object({
14
+ /** Agnostic unique id, generated or mapped by the provider. */
15
+ id: z.string().min(1),
16
+ /** Task headline. */
17
+ title: z.string(),
18
+ /** Rich-text or Markdown task description. */
19
+ body: z.string().optional(),
20
+ /** External reference link for deep-linking. */
21
+ url: z.string().url().optional(),
22
+ /** Clear-text column key/name (e.g. "To Do", "In Progress"). */
23
+ status: z.string(),
24
+ /** List of user handles. */
25
+ assignees: z.array(z.string()),
26
+ /** The underlying provider's system identifier. */
27
+ rawProviderId: z.string(),
28
+ })
29
+ .strict();
30
+ export const KanbanColumnSchema = z
31
+ .object({
32
+ /** Agnostic unique id for the state (provider option id, Jira quick filter, ...). */
33
+ id: z.string().min(1),
34
+ /** Human-readable title ("To Do", "Done"). */
35
+ name: z.string().min(1),
36
+ /** Ordered list of items sitting within this column. */
37
+ cards: z.array(KanbanCardSchema),
38
+ })
39
+ .strict();
40
+ export const KanbanBoardSchema = z
41
+ .object({
42
+ id: z.string().min(1),
43
+ title: z.string().min(1),
44
+ columns: z.array(KanbanColumnSchema),
45
+ })
46
+ .strict();
47
+ export const KanbanBoardRefSchema = z
48
+ .object({
49
+ providerId: z.string().min(1),
50
+ boardId: z.string().min(1),
51
+ title: z.string().min(1),
52
+ })
53
+ .strict();
54
+ // ── Session RPCs (dotted namespaces, see docs/rpc-namespacing.md) ───────────
55
+ export const KanbanErrorSchema = z.string().nullable();
56
+ /**
57
+ * One command in a remediation route, as argv - never a shell string.
58
+ *
59
+ * The daemon resolves the exact command (including any host flag), so the
60
+ * client only ever displays it, copies it, or runs it on explicit consent.
61
+ */
62
+ export const KanbanRemediationStepSchema = z
63
+ .object({
64
+ command: z.string().min(1),
65
+ args: z.array(z.string()),
66
+ /** The literal text shown in the confirm dialog and copied to the clipboard. */
67
+ display: z.string().min(1),
68
+ })
69
+ .strict();
70
+ /**
71
+ * A daemon-resolved recovery route for a failed Kanban call.
72
+ *
73
+ * Provider-neutral by construction: `reason` is an opaque key the client may
74
+ * localize and must tolerate not knowing (it falls back to `error`), and the
75
+ * steps are already-resolved argv. This exists because a provider's own error
76
+ * text can be actively misleading in Otto: GitHub tells the user to edit a
77
+ * personal access token, but the credential Otto sends is the gh CLI's OAuth
78
+ * token, which that page does not list. The daemon replaces that guidance
79
+ * rather than passing it through.
80
+ */
81
+ export const KanbanRemediationSchema = z
82
+ .object({
83
+ reason: z.string().min(1),
84
+ /** The scopes or permissions the credential lacks, when the provider can name them. */
85
+ missingScopes: z.array(z.string()).optional(),
86
+ steps: z.array(KanbanRemediationStepSchema),
87
+ /** Documentation link for the manual route. */
88
+ url: z.string().url().optional(),
89
+ })
90
+ .strict();
91
+ /** The gh CLI credential is missing the Projects v2 scopes. */
92
+ export const KANBAN_REMEDIATION_GITHUB_SCOPES = "github-missing-scopes";
93
+ export const KanbanBoardsListRequestSchema = z
94
+ .object({
95
+ type: z.literal("kanban.boards.list.request"),
96
+ /** The provider that owns the board ("memory", "github", ...). */
97
+ providerId: z.string().min(1),
98
+ /**
99
+ * Project scoping. COMPAT(kanbanProjectScoping): added in v0.8.11, drop the
100
+ * optionals after 2027-02-28. The (host, project) pair determines which
101
+ * tracking board the daemon serves: it resolves the project's kanban target
102
+ * (adapter + board identifier) from the project record and fills the
103
+ * provider's list context. serverId is implicit in the connection.
104
+ * Absent on clients that predate project scoping; the daemon answers those
105
+ * with a "no project" error rather than guessing.
106
+ */
107
+ projectId: z.string().min(1).optional(),
108
+ projectKey: z.string().min(1).optional(),
109
+ requestId: z.string(),
110
+ })
111
+ .strict();
112
+ export const KanbanBoardsListResponseSchema = z
113
+ .object({
114
+ type: z.literal("kanban.boards.list.response"),
115
+ payload: z.object({
116
+ providerId: z.string().min(1),
117
+ boards: z.array(KanbanBoardRefSchema),
118
+ error: KanbanErrorSchema,
119
+ // COMPAT(kanbanRemediation): added in v0.8.12, drop the optional gate when
120
+ // floor >= v0.8.12. Present only when the daemon can name a recovery route
121
+ // for `error`; older daemons omit it and the client shows `error` alone.
122
+ remediation: KanbanRemediationSchema.nullable().optional(),
123
+ requestId: z.string(),
124
+ }),
125
+ })
126
+ .strict();
127
+ export const KanbanBoardGetRequestSchema = z
128
+ .object({
129
+ type: z.literal("kanban.board.get.request"),
130
+ providerId: z.string().min(1),
131
+ boardId: z.string().min(1),
132
+ requestId: z.string(),
133
+ })
134
+ .strict();
135
+ export const KanbanBoardGetResponseSchema = z
136
+ .object({
137
+ type: z.literal("kanban.board.get.response"),
138
+ payload: z.object({
139
+ providerId: z.string().min(1),
140
+ board: KanbanBoardSchema.nullable(),
141
+ error: KanbanErrorSchema,
142
+ // COMPAT(kanbanRemediation): added in v0.8.12, drop the optional gate when
143
+ // floor >= v0.8.12. Present only when the daemon can name a recovery route
144
+ // for `error`; older daemons omit it and the client shows `error` alone.
145
+ remediation: KanbanRemediationSchema.nullable().optional(),
146
+ requestId: z.string(),
147
+ }),
148
+ })
149
+ .strict();
150
+ export const KanbanCardMoveRequestSchema = z
151
+ .object({
152
+ type: z.literal("kanban.card.move.request"),
153
+ providerId: z.string().min(1),
154
+ boardId: z.string().min(1),
155
+ cardId: z.string().min(1),
156
+ targetColumnId: z.string().min(1),
157
+ requestId: z.string(),
158
+ })
159
+ .strict();
160
+ export const KanbanCardMoveResponseSchema = z
161
+ .object({
162
+ type: z.literal("kanban.card.move.response"),
163
+ payload: z.object({
164
+ providerId: z.string().min(1),
165
+ boardId: z.string().min(1),
166
+ cardId: z.string().min(1),
167
+ targetColumnId: z.string().min(1),
168
+ error: KanbanErrorSchema,
169
+ // COMPAT(kanbanRemediation): added in v0.8.12, drop the optional gate when
170
+ // floor >= v0.8.12. Present only when the daemon can name a recovery route
171
+ // for `error`; older daemons omit it and the client shows `error` alone.
172
+ remediation: KanbanRemediationSchema.nullable().optional(),
173
+ requestId: z.string(),
174
+ }),
175
+ })
176
+ .strict();
177
+ export const KanbanCardCreateRequestSchema = z
178
+ .object({
179
+ type: z.literal("kanban.card.create.request"),
180
+ providerId: z.string().min(1),
181
+ boardId: z.string().min(1),
182
+ columnId: z.string().min(1).optional(),
183
+ title: z.string().trim().min(1),
184
+ body: z.string().optional(),
185
+ requestId: z.string(),
186
+ })
187
+ .strict();
188
+ export const KanbanCardCreateResponseSchema = z
189
+ .object({
190
+ type: z.literal("kanban.card.create.response"),
191
+ payload: z.object({
192
+ providerId: z.string().min(1),
193
+ boardId: z.string().min(1),
194
+ columnId: z.string().min(1),
195
+ card: KanbanCardSchema.nullable(),
196
+ error: KanbanErrorSchema,
197
+ // COMPAT(kanbanRemediation): added in v0.8.12, drop the optional gate when
198
+ // floor >= v0.8.12. Present only when the daemon can name a recovery route
199
+ // for `error`; older daemons omit it and the client shows `error` alone.
200
+ remediation: KanbanRemediationSchema.nullable().optional(),
201
+ requestId: z.string(),
202
+ }),
203
+ })
204
+ .strict();
205
+ export const KanbanTaskLinkRequestSchema = z
206
+ .object({
207
+ type: z.literal("kanban.task.link.request"),
208
+ providerId: z.string().min(1),
209
+ boardId: z.string().min(1),
210
+ /** The provider's native id of the external work object (issue/PR id). */
211
+ externalId: z.string().min(1),
212
+ columnId: z.string().min(1).optional(),
213
+ requestId: z.string(),
214
+ })
215
+ .strict();
216
+ export const KanbanTaskLinkResponseSchema = z
217
+ .object({
218
+ type: z.literal("kanban.task.link.response"),
219
+ payload: z.object({
220
+ providerId: z.string().min(1),
221
+ boardId: z.string().min(1),
222
+ columnId: z.string().min(1),
223
+ card: KanbanCardSchema.nullable(),
224
+ error: KanbanErrorSchema,
225
+ // COMPAT(kanbanRemediation): added in v0.8.12, drop the optional gate when
226
+ // floor >= v0.8.12. Present only when the daemon can name a recovery route
227
+ // for `error`; older daemons omit it and the client shows `error` alone.
228
+ remediation: KanbanRemediationSchema.nullable().optional(),
229
+ requestId: z.string(),
230
+ }),
231
+ })
232
+ .strict();
233
+ /**
234
+ * The one "this project has no board yet" message. The app matches on it to
235
+ * render the watermark state with a link into project settings, so it is part
236
+ * of the contract rather than incidental copy. Lives with the wire model (not
237
+ * the daemon) so the app can compare against it without depending on the
238
+ * server package.
239
+ */
240
+ export const KANBAN_NOT_CONFIGURED = "No kanban board is configured for this project.";
241
+ // Which tracking board a project shows on the Kanban screen. A pointer, never a
242
+ // credential: `boardId` is equivalent to a URL, so it rides in the clear and
243
+ // lives in the project record next to the display name. Credentials stay
244
+ // host-scoped (the gh CLI for GitHub, the Atlassian account for Jira).
245
+ // A null `boardId` on the github adapter means "derive the boards from this
246
+ // project's git remote"; jira always needs an explicit board id.
247
+ export const ProjectKanbanTargetSchema = z
248
+ .object({
249
+ adapter: z.enum(["github", "jira"]),
250
+ boardId: z.string().nullable().optional(),
251
+ })
252
+ .passthrough();
253
+ export const KanbanProjectTargetSetRequestSchema = z.object({
254
+ type: z.literal("kanban.project.target.set.request"),
255
+ projectId: z.string().min(1),
256
+ // Null clears the target and returns the project to "no board configured".
257
+ target: ProjectKanbanTargetSchema.nullable(),
258
+ requestId: z.string(),
259
+ });
260
+ export const KanbanProjectTargetSetResponsePayloadSchema = z.object({
261
+ requestId: z.string(),
262
+ projectId: z.string(),
263
+ accepted: z.boolean(),
264
+ // The normalized target the daemon actually stored: a pasted board URL comes
265
+ // back as the parsed id, so the settings form can show what was saved.
266
+ target: ProjectKanbanTargetSchema.nullable(),
267
+ error: z.string().nullable(),
268
+ });
269
+ export const KanbanProjectTargetSetResponseSchema = z.object({
270
+ type: z.literal("kanban.project.target.set.response"),
271
+ payload: KanbanProjectTargetSetResponsePayloadSchema,
272
+ });
273
+ //# sourceMappingURL=kanban.js.map
@@ -44,9 +44,9 @@ export declare const LoopIterationRecordSchema: z.ZodObject<{
44
44
  stopped: "stopped";
45
45
  }>;
46
46
  workerOutcome: z.ZodNullable<z.ZodEnum<{
47
+ completed: "completed";
47
48
  failed: "failed";
48
49
  canceled: "canceled";
49
- completed: "completed";
50
50
  }>>;
51
51
  failureReason: z.ZodNullable<z.ZodString>;
52
52
  verifyChecks: z.ZodArray<z.ZodObject<{
@@ -109,9 +109,9 @@ export declare const LoopRecordSchema: z.ZodObject<{
109
109
  stopped: "stopped";
110
110
  }>;
111
111
  workerOutcome: z.ZodNullable<z.ZodEnum<{
112
+ completed: "completed";
112
113
  failed: "failed";
113
114
  canceled: "canceled";
114
- completed: "completed";
115
115
  }>>;
116
116
  failureReason: z.ZodNullable<z.ZodString>;
117
117
  verifyChecks: z.ZodArray<z.ZodObject<{
@@ -254,9 +254,9 @@ export declare const LoopRunResponseSchema: z.ZodObject<{
254
254
  stopped: "stopped";
255
255
  }>;
256
256
  workerOutcome: z.ZodNullable<z.ZodEnum<{
257
+ completed: "completed";
257
258
  failed: "failed";
258
259
  canceled: "canceled";
259
- completed: "completed";
260
260
  }>>;
261
261
  failureReason: z.ZodNullable<z.ZodString>;
262
262
  verifyChecks: z.ZodArray<z.ZodObject<{
@@ -368,9 +368,9 @@ export declare const LoopInspectResponseSchema: z.ZodObject<{
368
368
  stopped: "stopped";
369
369
  }>;
370
370
  workerOutcome: z.ZodNullable<z.ZodEnum<{
371
+ completed: "completed";
371
372
  failed: "failed";
372
373
  canceled: "canceled";
373
- completed: "completed";
374
374
  }>>;
375
375
  failureReason: z.ZodNullable<z.ZodString>;
376
376
  verifyChecks: z.ZodArray<z.ZodObject<{
@@ -461,9 +461,9 @@ export declare const LoopLogsResponseSchema: z.ZodObject<{
461
461
  stopped: "stopped";
462
462
  }>;
463
463
  workerOutcome: z.ZodNullable<z.ZodEnum<{
464
+ completed: "completed";
464
465
  failed: "failed";
465
466
  canceled: "canceled";
466
- completed: "completed";
467
467
  }>>;
468
468
  failureReason: z.ZodNullable<z.ZodString>;
469
469
  verifyChecks: z.ZodArray<z.ZodObject<{
@@ -571,9 +571,9 @@ export declare const LoopStopResponseSchema: z.ZodObject<{
571
571
  stopped: "stopped";
572
572
  }>;
573
573
  workerOutcome: z.ZodNullable<z.ZodEnum<{
574
+ completed: "completed";
574
575
  failed: "failed";
575
576
  canceled: "canceled";
576
- completed: "completed";
577
577
  }>>;
578
578
  failureReason: z.ZodNullable<z.ZodString>;
579
579
  verifyChecks: z.ZodArray<z.ZodObject<{
@@ -1,5 +1,6 @@
1
1
  import { z } from "zod";
2
2
  import { AgentProviderSchema } from "../provider-manifest.js";
3
+ // COMPAT(agentLoops): retained after the v0.3.0 feature removal; remove after 2027-02-09 when mixed-version peers no longer send legacy messages.
3
4
  export const LoopLogEntrySchema = z.object({
4
5
  seq: z.number().int().positive(),
5
6
  timestamp: z.string(),