@chipschat/protocol 1.0.0 → 1.0.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.
Files changed (86) hide show
  1. package/dist/generated/types.d.ts +2 -2
  2. package/dist/generated/types.d.ts.map +1 -1
  3. package/dist/src/context.js +1 -1
  4. package/dist/src/context.js.map +1 -1
  5. package/dist/src/frames.d.ts +5 -2
  6. package/dist/src/frames.d.ts.map +1 -1
  7. package/dist/src/frames.js +5 -1
  8. package/dist/src/frames.js.map +1 -1
  9. package/dist/src/index.d.ts +6 -2
  10. package/dist/src/index.d.ts.map +1 -1
  11. package/dist/src/index.js +4 -2
  12. package/dist/src/index.js.map +1 -1
  13. package/dist/src/join.d.ts +27 -1
  14. package/dist/src/join.d.ts.map +1 -1
  15. package/dist/src/join.js +56 -1
  16. package/dist/src/join.js.map +1 -1
  17. package/dist/src/push.d.ts +80 -0
  18. package/dist/src/push.d.ts.map +1 -0
  19. package/dist/src/push.js +55 -0
  20. package/dist/src/push.js.map +1 -0
  21. package/dist/src/read-marks.d.ts +24 -0
  22. package/dist/src/read-marks.d.ts.map +1 -0
  23. package/dist/src/read-marks.js +28 -0
  24. package/dist/src/read-marks.js.map +1 -0
  25. package/dist/src/room-note.d.ts +13 -7
  26. package/dist/src/room-note.d.ts.map +1 -1
  27. package/dist/src/room-note.js +22 -11
  28. package/dist/src/room-note.js.map +1 -1
  29. package/fixtures/frames/read.json +7 -0
  30. package/generated/agent-connect.json +2 -2
  31. package/generated/schema/agent.attached.json +1 -1
  32. package/generated/schema/message.new.json +1 -1
  33. package/generated/types.ts +2 -2
  34. package/package.json +2 -1
  35. package/dist/envelope.d.ts +0 -54
  36. package/dist/envelope.d.ts.map +0 -1
  37. package/dist/envelope.js +0 -48
  38. package/dist/envelope.js.map +0 -1
  39. package/dist/events/agent-to-chips.d.ts +0 -27
  40. package/dist/events/agent-to-chips.d.ts.map +0 -1
  41. package/dist/events/agent-to-chips.js +0 -392
  42. package/dist/events/agent-to-chips.js.map +0 -1
  43. package/dist/events/catalogue.d.ts +0 -48
  44. package/dist/events/catalogue.d.ts.map +0 -1
  45. package/dist/events/catalogue.js +0 -67
  46. package/dist/events/catalogue.js.map +0 -1
  47. package/dist/events/chips-to-agent.d.ts +0 -24
  48. package/dist/events/chips-to-agent.d.ts.map +0 -1
  49. package/dist/events/chips-to-agent.js +0 -324
  50. package/dist/events/chips-to-agent.js.map +0 -1
  51. package/dist/events/chips-to-harness.d.ts +0 -24
  52. package/dist/events/chips-to-harness.d.ts.map +0 -1
  53. package/dist/events/chips-to-harness.js +0 -324
  54. package/dist/events/chips-to-harness.js.map +0 -1
  55. package/dist/events/harness-to-chips.d.ts +0 -27
  56. package/dist/events/harness-to-chips.d.ts.map +0 -1
  57. package/dist/events/harness-to-chips.js +0 -390
  58. package/dist/events/harness-to-chips.js.map +0 -1
  59. package/dist/events/index.d.ts +0 -6
  60. package/dist/events/index.d.ts.map +0 -1
  61. package/dist/events/index.js +0 -5
  62. package/dist/events/index.js.map +0 -1
  63. package/dist/events/workspace.d.ts +0 -19
  64. package/dist/events/workspace.d.ts.map +0 -1
  65. package/dist/events/workspace.js +0 -79
  66. package/dist/events/workspace.js.map +0 -1
  67. package/dist/frames.d.ts +0 -175
  68. package/dist/frames.d.ts.map +0 -1
  69. package/dist/frames.js +0 -161
  70. package/dist/frames.js.map +0 -1
  71. package/dist/ids/index.d.ts +0 -3
  72. package/dist/ids/index.d.ts.map +0 -1
  73. package/dist/ids/index.js +0 -2
  74. package/dist/ids/index.js.map +0 -1
  75. package/dist/ids/ulid.d.ts +0 -83
  76. package/dist/ids/ulid.d.ts.map +0 -1
  77. package/dist/ids/ulid.js +0 -199
  78. package/dist/ids/ulid.js.map +0 -1
  79. package/dist/index.d.ts +0 -18
  80. package/dist/index.d.ts.map +0 -1
  81. package/dist/index.js +0 -13
  82. package/dist/index.js.map +0 -1
  83. package/dist/primitives.d.ts +0 -194
  84. package/dist/primitives.d.ts.map +0 -1
  85. package/dist/primitives.js +0 -193
  86. package/dist/primitives.js.map +0 -1
@@ -1,392 +0,0 @@
1
- /**
2
- * Events an agent sends to Chips.
3
- *
4
- * The interface is progressive (blueprint, Connect): the minimum is three events — a run
5
- * started, a message, a run completed. Every extra event upgrades what the person sees. Send
6
- * step logs and you get receipts; send approval requests and you get approval cards; send
7
- * context usage and you get the context ring.
8
- */
9
- import { z } from "zod";
10
- import { defineEvent } from "../envelope.js";
11
- import { action, approverRef, attachment, autonomyLevel, cost, id, isoTimestamp, preview, riskClass, source, } from "../primitives.js";
12
- const plannedStep = z
13
- .object({
14
- step_id: z
15
- .string()
16
- .min(1)
17
- .max(120)
18
- .describe("Stable for the life of the run, so updates land on the right row."),
19
- title: z.string().min(1).max(300).describe("What this step will do."),
20
- })
21
- .describe("One step of a plan, shown as a hollow dot until it completes.");
22
- export const runStarted = defineEvent({
23
- type: "run.started",
24
- direction: "agent_to_chips",
25
- summary: "An agent has begun a unit of work, optionally with the plan it intends to follow.",
26
- requiresRun: true,
27
- payload: z.object({
28
- goal: z
29
- .string()
30
- .min(1)
31
- .max(4000)
32
- .describe("What the run is for, in the person's words where possible."),
33
- plan: z
34
- .array(plannedStep)
35
- .max(64)
36
- .optional()
37
- .describe("The steps the agent expects to take. The run panel draws one hollow dot each."),
38
- session_ref: z
39
- .string()
40
- .max(500)
41
- .optional()
42
- .describe("A pointer back to the harness's own transcript, so a person can jump to it."),
43
- }),
44
- });
45
- export const runStatus = defineEvent({
46
- type: "run.status",
47
- direction: "agent_to_chips",
48
- summary: "What the agent is doing right now. This is the agent's typing indicator.",
49
- requiresRun: true,
50
- payload: z.object({
51
- phase: z.string().min(1).max(120).describe("A short machine-ish label, for example `reading`."),
52
- verb_phrase: z
53
- .string()
54
- .min(1)
55
- .max(200)
56
- .describe('What to show under the agent\'s name, for example "Reading PO #4471…".'),
57
- progress: z
58
- .number()
59
- .min(0)
60
- .max(1)
61
- .optional()
62
- .describe("Fraction complete, when the agent knows."),
63
- estimate_seconds: z
64
- .int()
65
- .nonnegative()
66
- .optional()
67
- .describe("Seconds remaining, when the agent knows."),
68
- }),
69
- });
70
- export const runPlan = defineEvent({
71
- type: "run.plan",
72
- direction: "agent_to_chips",
73
- summary: "The plan changed. Replaces the steps not yet done; the ones already done or failed keep their place.",
74
- requiresRun: true,
75
- payload: z.object({
76
- plan: z
77
- .array(plannedStep)
78
- .min(1)
79
- .max(64)
80
- .describe("The steps still to come, in order. Steps already done or failed stay ahead of these; a step still to do that is not here is dropped."),
81
- reason: z
82
- .string()
83
- .max(1000)
84
- .optional()
85
- .describe("Why the plan changed, in a sentence: a steer, a surprise, a shortcut."),
86
- }),
87
- });
88
- export const stepLog = defineEvent({
89
- type: "step.log",
90
- direction: "agent_to_chips",
91
- summary: "One tool call or reasoning step, for the receipt and the run timeline.",
92
- requiresRun: true,
93
- payload: z.object({
94
- step_id: z
95
- .string()
96
- .min(1)
97
- .max(120)
98
- .describe("Stable across the started and done events for one step."),
99
- status: z.enum(["started", "done", "failed"]).describe("Where this step got to."),
100
- title: z
101
- .string()
102
- .max(300)
103
- .optional()
104
- .describe("What the step is, when it was not in the plan."),
105
- tool: z.string().max(120).optional().describe("The tool called, for example `drive.read`."),
106
- summary: z.string().max(2000).optional().describe("One line for the receipt."),
107
- sources: z.array(source).max(32).optional().describe("Where the information came from."),
108
- duration_ms: z.int().nonnegative().optional().describe("How long the step took."),
109
- error: z.string().max(2000).optional().describe("Why it failed, when it did."),
110
- }),
111
- });
112
- export const messagePost = defineEvent({
113
- type: "message.post",
114
- direction: "agent_to_chips",
115
- summary: "An agent says something in a conversation, with any attachments.",
116
- requiresRun: false,
117
- payload: z.object({
118
- text: z.string().max(64_000).describe("Markdown, with mentions."),
119
- attachments: z
120
- .array(attachment)
121
- .max(20)
122
- .optional()
123
- .describe("Photos, video, voice notes, files, as the upload described them."),
124
- upload_ids: z
125
- .array(id("attachment"))
126
- .max(20)
127
- .optional()
128
- .describe("Uploads to attach, by the id `POST /v1/uploads` gave. Chips fills in `attachments` from what it stored."),
129
- reply_to: id("message").optional().describe("The message being answered, when it is a reply."),
130
- }),
131
- });
132
- export const approvalRequest = defineEvent({
133
- type: "approval.request",
134
- direction: "agent_to_chips",
135
- summary: "The thing a group chat cannot do: an action, a preview, a risk class, who may answer, and an audit record.",
136
- requiresRun: true,
137
- payload: z.object({
138
- approval_id: id("approval").describe("Minted by the agent, so a retry after a reconnect is the same ask."),
139
- step_id: z.string().min(1).max(120).optional().describe("The plan step this ask belongs to."),
140
- action,
141
- preview: preview
142
- .optional()
143
- .describe("What the approver sees. Omit only when the action speaks for itself."),
144
- risk: z
145
- .array(riskClass)
146
- .max(8)
147
- .describe("Risk classes. The policy engine matches rules against these."),
148
- sources: z
149
- .array(source)
150
- .max(32)
151
- .optional()
152
- .describe("Where the agent got what it is about to act on."),
153
- expires_in: z
154
- .int()
155
- .positive()
156
- .max(604_800)
157
- .describe("Seconds until the approval expires. Every approval has an expiry and a fallback."),
158
- fallback: z
159
- .enum(["deny", "allow"])
160
- .default("deny")
161
- .describe("What happens on expiry. Denying is the default, and the safe one."),
162
- approvers: z
163
- .array(approverRef)
164
- .max(16)
165
- .optional()
166
- .describe("Who may answer. Chips resolves roles."),
167
- editable: z
168
- .boolean()
169
- .default(false)
170
- .describe("Whether the approver may change the input before allowing."),
171
- resume_token: z
172
- .string()
173
- .max(500)
174
- .optional()
175
- .describe("Lets a paused command-line run continue hours later. Approvals outlive processes."),
176
- }),
177
- });
178
- const questionOption = z
179
- .object({
180
- value: z.string().min(1).max(120).describe("What comes back in `question.answered`."),
181
- label: z.string().min(1).max(200).describe("What the person taps."),
182
- description: z.string().max(500).optional().describe("What choosing it means."),
183
- })
184
- .describe("One tappable option.");
185
- const question = z
186
- .object({
187
- question_id: z
188
- .string()
189
- .min(1)
190
- .max(120)
191
- .describe("Stable, so answers land on the right question."),
192
- prompt: z.string().min(1).max(2000).describe("What is being asked."),
193
- options: z.array(questionOption).min(2).max(4).describe("Two to four options."),
194
- multi_select: z
195
- .boolean()
196
- .default(false)
197
- .describe("Whether more than one option may be chosen."),
198
- allow_free_text: z.boolean().default(false).describe("Whether the person may type instead."),
199
- default_value: z
200
- .string()
201
- .max(120)
202
- .optional()
203
- .describe("What the agent will take if nobody answers. Its presence lowers the notification tier."),
204
- })
205
- .describe("One question, with its options.");
206
- export const questionAsk = defineEvent({
207
- type: "question.ask",
208
- direction: "agent_to_chips",
209
- summary: "One to four questions with tappable options, a default, and a timeout.",
210
- requiresRun: true,
211
- payload: z.object({
212
- ask_id: id("question").describe("Minted by the agent, so a retry is the same ask."),
213
- questions: z.array(question).min(1).max(4).describe("One to four questions."),
214
- timeout_seconds: z
215
- .int()
216
- .positive()
217
- .max(604_800)
218
- .optional()
219
- .describe("How long to wait for an answer."),
220
- on_no_answer: z
221
- .enum(["use_default", "cancel", "continue"])
222
- .default("use_default")
223
- .describe("What the agent will do if the timeout passes."),
224
- }),
225
- });
226
- export const artifactCreate = defineEvent({
227
- type: "artifact.create",
228
- direction: "agent_to_chips",
229
- summary: "A file, document, code, image or table the agent produced, with a version.",
230
- requiresRun: false,
231
- payload: z.object({
232
- artifact_id: id("attachment").describe("Content-addressed, like every attachment."),
233
- kind: z.enum(["file", "document", "code", "image", "table"]).describe("How to render it."),
234
- title: z.string().min(1).max(300).describe("What to call it."),
235
- version: z.int().positive().default(1).describe("Bumped when the agent revises it."),
236
- attachment: attachment.optional().describe("The bytes, when the artifact is a file."),
237
- body: z.string().max(1_000_000).optional().describe("The content, when the artifact is text."),
238
- language: z.string().max(60).optional().describe("For code, the language to highlight."),
239
- }),
240
- });
241
- export const checkpoint = defineEvent({
242
- type: "checkpoint",
243
- direction: "agent_to_chips",
244
- summary: "A milestone reached and what is next. Compaction is a checkpoint. FYI tier.",
245
- requiresRun: true,
246
- payload: z.object({
247
- label: z.string().min(1).max(300).describe("The milestone reached."),
248
- next: z.string().max(300).optional().describe("What the agent will do next."),
249
- compacted: z
250
- .boolean()
251
- .default(false)
252
- .describe("True when the agent just compacted its context."),
253
- }),
254
- });
255
- export const handoff = defineEvent({
256
- type: "handoff",
257
- direction: "agent_to_chips",
258
- summary: "Passing work to a person or another agent, with a context summary and what is still open.",
259
- requiresRun: false,
260
- payload: z.object({
261
- to: z.string().min(1).max(120).describe("The participant id receiving the work."),
262
- context_summary: z.string().min(1).max(20_000).describe("What the recipient needs to know."),
263
- open_items: z.array(z.string().max(500)).max(50).optional().describe("What is still undone."),
264
- reason: z.string().max(1000).optional().describe("Why the work is moving."),
265
- }),
266
- });
267
- export const task = defineEvent({
268
- type: "task",
269
- direction: "agent_to_chips",
270
- summary: "Route work to another agent. From a lead this becomes a lane: one object, two views, never a copy.",
271
- requiresRun: false,
272
- payload: z.object({
273
- task_id: id("lane").describe("The lane this task opens."),
274
- to: z
275
- .string()
276
- .min(1)
277
- .max(120)
278
- .describe("The specialist's participant id, or a label for an ephemeral child."),
279
- child: z
280
- .object({
281
- label: z
282
- .string()
283
- .min(1)
284
- .max(120)
285
- .describe("A name for a transient participant Chips will mint."),
286
- })
287
- .optional()
288
- .describe("Names an ephemeral child, which inherits owner, autonomy and budget from the lead."),
289
- on_behalf_of: z.string().min(1).max(120).describe("The person the work is ultimately for."),
290
- origin: id("message").optional().describe("The message that caused this routing."),
291
- goal: z.string().min(1).max(4000).describe("What the specialist is being asked to do."),
292
- constraints: z
293
- .array(z.string().max(500))
294
- .max(20)
295
- .optional()
296
- .describe("Bounds on how to do it."),
297
- deadline: isoTimestamp.optional().describe("When it is needed by."),
298
- autonomy: autonomyLevel
299
- .optional()
300
- .describe("The level for this lane. Never above the lead's own."),
301
- attachments: z.array(attachment).max(20).optional().describe("Anything the specialist needs."),
302
- link_to: id("conversation")
303
- .optional()
304
- .describe("The lead's conversation, where the route card appears."),
305
- }),
306
- });
307
- export const usage = defineEvent({
308
- type: "usage",
309
- direction: "agent_to_chips",
310
- summary: "Tokens and cost for a step, a run or a lane. Cost rolls up the trail and is always an estimate.",
311
- requiresRun: true,
312
- payload: z.object({
313
- scope: z.enum(["step", "run", "lane"]).describe("What the numbers cover."),
314
- model: z.string().min(1).max(120).describe("The model that did the work."),
315
- input_tokens: z.int().nonnegative().describe("Tokens in."),
316
- output_tokens: z.int().nonnegative().describe("Tokens out."),
317
- cost: cost.optional().describe("The estimated cost, when the agent can compute one."),
318
- }),
319
- });
320
- export const contextUsage = defineEvent({
321
- type: "context.usage",
322
- direction: "agent_to_chips",
323
- summary: "How full the agent's context is. Drives the context ring; context stays per agent, never rolled up.",
324
- requiresRun: true,
325
- payload: z.object({
326
- used_tokens: z.int().nonnegative().describe("Tokens currently held."),
327
- limit_tokens: z.int().positive().describe("The window size."),
328
- model: z.string().min(1).max(120).describe("The model whose window this is."),
329
- compacted: z.boolean().default(false).describe("True when the agent just compacted."),
330
- }),
331
- });
332
- export const approvalExecuted = defineEvent({
333
- type: "approval.executed",
334
- direction: "agent_to_chips",
335
- summary: "What happened after a yes. The card changes from `approved` to `sent`, or to `failed`.",
336
- requiresRun: true,
337
- payload: z.object({
338
- approval_id: id("approval"),
339
- outcome: z
340
- .enum(["executed", "failed", "skipped"])
341
- .describe("Whether the action actually happened."),
342
- detail: z.string().max(4000).optional().describe("What was sent, or why it failed."),
343
- }),
344
- });
345
- export const runCompleted = defineEvent({
346
- type: "run.completed",
347
- direction: "agent_to_chips",
348
- summary: "The run is done. Posts a summary card and moves the status pill to Done.",
349
- requiresRun: true,
350
- payload: z.object({
351
- summary: z.string().min(1).max(20_000).describe("The outcome, in the product voice."),
352
- changed: z.array(z.string().max(500)).max(50).optional().describe("What changed in the world."),
353
- follow_ups: z
354
- .array(z.string().max(500))
355
- .max(50)
356
- .optional()
357
- .describe("What is worth doing next."),
358
- cost: cost.optional().describe("The run's estimated cost."),
359
- }),
360
- });
361
- export const runFailed = defineEvent({
362
- type: "run.failed",
363
- direction: "agent_to_chips",
364
- summary: "The run stopped without finishing. Says what was left undone, so a person can pick it up.",
365
- requiresRun: true,
366
- payload: z.object({
367
- error: z.string().min(1).max(4000).describe("What went wrong."),
368
- left_undone: z.array(z.string().max(500)).max(50).optional().describe("What did not get done."),
369
- retryable: z.boolean().default(false).describe("Whether running it again might work."),
370
- cost: cost.optional().describe("What was spent before it failed."),
371
- }),
372
- });
373
- /** Every event an agent may send, in the order the reference lists them. */
374
- export const AGENT_TO_CHIPS = [
375
- runStarted,
376
- runStatus,
377
- runPlan,
378
- stepLog,
379
- messagePost,
380
- approvalRequest,
381
- questionAsk,
382
- artifactCreate,
383
- checkpoint,
384
- handoff,
385
- task,
386
- usage,
387
- contextUsage,
388
- approvalExecuted,
389
- runCompleted,
390
- runFailed,
391
- ];
392
- //# sourceMappingURL=agent-to-chips.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"agent-to-chips.js","sourceRoot":"","sources":["../../src/events/agent-to-chips.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EACL,MAAM,EACN,WAAW,EACX,UAAU,EACV,aAAa,EACb,IAAI,EACJ,EAAE,EACF,YAAY,EACZ,OAAO,EACP,SAAS,EACT,MAAM,GACP,MAAM,kBAAkB,CAAC;AAE1B,MAAM,WAAW,GAAG,CAAC;KAClB,MAAM,CAAC;IACN,OAAO,EAAE,CAAC;SACP,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,GAAG,CAAC;SACR,QAAQ,CAAC,mEAAmE,CAAC;IAChF,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,yBAAyB,CAAC;CACtE,CAAC;KACD,QAAQ,CAAC,+DAA+D,CAAC,CAAC;AAE7E,MAAM,CAAC,MAAM,UAAU,GAAG,WAAW,CAAC;IACpC,IAAI,EAAE,aAAa;IACnB,SAAS,EAA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;IACP,WAAW;IACX,eAAe;IACf,WAAW;IACX,cAAc;IACd,UAAU;IACV,OAAO;IACP,IAAI;IACJ,KAAK;IACL,YAAY;IACZ,gBAAgB;IAChB,YAAY;IACZ,SAAS;CACD,CAAC"}
@@ -1,48 +0,0 @@
1
- /**
2
- * The catalogue is the single list of every Agent Connect event. The schemas, the generated
3
- * JSON Schema, the generated types, the reference pages and the fixture tests are all reads
4
- * of this one array, so an event cannot exist in one of them and not the others.
5
- */
6
- import type { z } from "zod";
7
- import { type EventDefinition } from "../envelope.js";
8
- import { AGENT_TO_CHIPS } from "./agent-to-chips.js";
9
- import { CHIPS_TO_AGENT } from "./chips-to-agent.js";
10
- import { WORKSPACE_EVENTS } from "./workspace.js";
11
- /** Every event in the log: Agent Connect in both directions, then Chips' own (ADR 0018). */
12
- export declare const EVENTS: readonly EventDefinition[];
13
- /** Every event type, as a plain list of strings. */
14
- export declare const EVENT_TYPES: readonly string[];
15
- export type AgentToChipsType = (typeof AGENT_TO_CHIPS)[number]["type"];
16
- export type ChipsToAgentType = (typeof CHIPS_TO_AGENT)[number]["type"];
17
- export type WorkspaceEventType = (typeof WORKSPACE_EVENTS)[number]["type"];
18
- export type EventType = AgentToChipsType | ChipsToAgentType | WorkspaceEventType;
19
- /** The definition for one event type, or undefined when nothing declares it. */
20
- export declare function eventDefinition(type: string): EventDefinition | undefined;
21
- export declare function schemaFor(type: string): z.ZodObject | undefined;
22
- /** Every schema, keyed by event type. Used by the generators. */
23
- export declare const EVENT_SCHEMAS: ReadonlyMap<string, z.ZodObject>;
24
- export declare class UnknownEventTypeError extends Error {
25
- readonly type: string;
26
- readonly name = "UnknownEventTypeError";
27
- constructor(type: string);
28
- }
29
- export interface ParseFailure {
30
- readonly type: "unknown_type" | "invalid";
31
- readonly message: string;
32
- readonly issues?: readonly {
33
- path: string;
34
- message: string;
35
- }[];
36
- }
37
- /**
38
- * Validate one event from the wire. This is the edge: everything inside trusts the result and
39
- * does not re-validate (technical-plan 6.1).
40
- */
41
- export declare function parseEvent(input: unknown): {
42
- ok: true;
43
- value: Record<string, unknown>;
44
- } | {
45
- ok: false;
46
- error: ParseFailure;
47
- };
48
- //# sourceMappingURL=catalogue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"catalogue.d.ts","sourceRoot":"","sources":["../../src/events/catalogue.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,EAAE,KAAK,eAAe,EAAe,MAAM,gBAAgB,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,4FAA4F;AAC5F,eAAO,MAAM,MAAM,EAAE,SAAS,eAAe,EAI5C,CAAC;AAEF,oDAAoD;AACpD,eAAO,MAAM,WAAW,EAAE,SAAS,MAAM,EAAsC,CAAC;AAEhF,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;AACvE,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;AACvE,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;AAC3E,MAAM,MAAM,SAAS,GAAG,gBAAgB,GAAG,gBAAgB,GAAG,kBAAkB,CAAC;AAIjF,gFAAgF;AAChF,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS,CAEzE;AAOD,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,CAAC,SAAS,GAAG,SAAS,CAE/D;AAED,iEAAiE;AACjE,eAAO,MAAM,aAAa,EAAE,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC,SAAS,CAAW,CAAC;AAEvE,qBAAa,qBAAsB,SAAQ,KAAK;IAElC,QAAQ,CAAC,IAAI,EAAE,MAAM;IADjC,SAAkB,IAAI,2BAA2B;gBAC5B,IAAI,EAAE,MAAM;CAGlC;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,cAAc,GAAG,SAAS,CAAC;IAC1C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAChE;AAED;;;GAGG;AACH,wBAAgB,UAAU,CACxB,KAAK,EAAE,OAAO,GACb;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,YAAY,CAAA;CAAE,CA0BnF"}
@@ -1,67 +0,0 @@
1
- /**
2
- * The catalogue is the single list of every Agent Connect event. The schemas, the generated
3
- * JSON Schema, the generated types, the reference pages and the fixture tests are all reads
4
- * of this one array, so an event cannot exist in one of them and not the others.
5
- */
6
- import { eventSchema } from "../envelope.js";
7
- import { AGENT_TO_CHIPS } from "./agent-to-chips.js";
8
- import { CHIPS_TO_AGENT } from "./chips-to-agent.js";
9
- import { WORKSPACE_EVENTS } from "./workspace.js";
10
- /** Every event in the log: Agent Connect in both directions, then Chips' own (ADR 0018). */
11
- export const EVENTS = [
12
- ...AGENT_TO_CHIPS,
13
- ...CHIPS_TO_AGENT,
14
- ...WORKSPACE_EVENTS,
15
- ];
16
- /** Every event type, as a plain list of strings. */
17
- export const EVENT_TYPES = EVENTS.map((event) => event.type);
18
- const byType = new Map(EVENTS.map((event) => [event.type, event]));
19
- /** The definition for one event type, or undefined when nothing declares it. */
20
- export function eventDefinition(type) {
21
- return byType.get(type);
22
- }
23
- /** The full schema — envelope plus payload — for one event type. */
24
- const schemas = new Map(EVENTS.map((event) => [event.type, eventSchema(event)]));
25
- export function schemaFor(type) {
26
- return schemas.get(type);
27
- }
28
- /** Every schema, keyed by event type. Used by the generators. */
29
- export const EVENT_SCHEMAS = schemas;
30
- export class UnknownEventTypeError extends Error {
31
- type;
32
- name = "UnknownEventTypeError";
33
- constructor(type) {
34
- super(`no schema is declared for event type ${JSON.stringify(type)}`);
35
- this.type = type;
36
- }
37
- }
38
- /**
39
- * Validate one event from the wire. This is the edge: everything inside trusts the result and
40
- * does not re-validate (technical-plan 6.1).
41
- */
42
- export function parseEvent(input) {
43
- const type = input?.type;
44
- if (typeof type !== "string") {
45
- return { ok: false, error: { type: "unknown_type", message: "event has no `type`" } };
46
- }
47
- const schema = schemas.get(type);
48
- if (schema === undefined) {
49
- return { ok: false, error: { type: "unknown_type", message: `unknown event type ${type}` } };
50
- }
51
- const parsed = schema.safeParse(input);
52
- if (!parsed.success) {
53
- return {
54
- ok: false,
55
- error: {
56
- type: "invalid",
57
- message: `${type} is not valid`,
58
- issues: parsed.error.issues.map((issue) => ({
59
- path: issue.path.join(".") || "(root)",
60
- message: issue.message,
61
- })),
62
- },
63
- };
64
- }
65
- return { ok: true, value: parsed.data };
66
- }
67
- //# sourceMappingURL=catalogue.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"catalogue.js","sourceRoot":"","sources":["../../src/events/catalogue.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAwB,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,4FAA4F;AAC5F,MAAM,CAAC,MAAM,MAAM,GAA+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,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,qBAAqB,EAAE,EAAE,CAAC;IACxF,CAAC;IAED,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACjC,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACzB,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,sBAAsB,IAAI,EAAE,EAAE,EAAE,CAAC;IAC/F,CAAC;IAED,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IACvC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACpB,OAAO;YACL,EAAE,EAAE,KAAK;YACT,KAAK,EAAE;gBACL,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE,GAAG,IAAI,eAAe;gBAC/B,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;oBAC1C,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,QAAQ;oBACtC,OAAO,EAAE,KAAK,CAAC,OAAO;iBACvB,CAAC,CAAC;aACJ;SACF,CAAC;IACJ,CAAC;IACD,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,IAA+B,EAAE,CAAC;AACrE,CAAC"}
@@ -1,24 +0,0 @@
1
- /**
2
- * Events Chips sends to an agent.
3
- *
4
- * The harness keeps its own loop, memory and tools. What it gains is structured asks and a
5
- * stable multi-user story: it sees a sender id and a role, and treats Chips as one trusted
6
- * account (blueprint, Connect).
7
- */
8
- export declare const hello: import("../envelope.js").EventDefinition<"hello">;
9
- export declare const messageNew: import("../envelope.js").EventDefinition<"message.new">;
10
- export declare const runRequested: import("../envelope.js").EventDefinition<"run.requested">;
11
- export declare const approvalResolved: import("../envelope.js").EventDefinition<"approval.resolved">;
12
- export declare const questionAnswered: import("../envelope.js").EventDefinition<"question.answered">;
13
- export declare const runSteer: import("../envelope.js").EventDefinition<"run.steer">;
14
- export declare const runPause: import("../envelope.js").EventDefinition<"run.pause">;
15
- export declare const runResume: import("../envelope.js").EventDefinition<"run.resume">;
16
- export declare const runCancel: import("../envelope.js").EventDefinition<"run.cancel">;
17
- export declare const policyUpdated: import("../envelope.js").EventDefinition<"policy.updated">;
18
- export declare const budgetWarning: import("../envelope.js").EventDefinition<"budget.warning">;
19
- export declare const laneUpdated: import("../envelope.js").EventDefinition<"lane.updated">;
20
- export declare const feedback: import("../envelope.js").EventDefinition<"feedback">;
21
- export declare const receipt: import("../envelope.js").EventDefinition<"receipt">;
22
- /** Every event Chips may send, in the order the reference lists them. */
23
- export declare const CHIPS_TO_AGENT: readonly [import("../envelope.js").EventDefinition<"hello">, import("../envelope.js").EventDefinition<"message.new">, import("../envelope.js").EventDefinition<"run.requested">, import("../envelope.js").EventDefinition<"approval.resolved">, import("../envelope.js").EventDefinition<"question.answered">, import("../envelope.js").EventDefinition<"run.steer">, import("../envelope.js").EventDefinition<"run.pause">, import("../envelope.js").EventDefinition<"run.resume">, import("../envelope.js").EventDefinition<"run.cancel">, import("../envelope.js").EventDefinition<"policy.updated">, import("../envelope.js").EventDefinition<"budget.warning">, import("../envelope.js").EventDefinition<"lane.updated">, import("../envelope.js").EventDefinition<"feedback">, import("../envelope.js").EventDefinition<"receipt">];
24
- //# sourceMappingURL=chips-to-agent.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chips-to-agent.d.ts","sourceRoot":"","sources":["../../src/events/chips-to-agent.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAkCH,eAAO,MAAM,KAAK,mDA8BhB,CAAC;AAEH,eAAO,MAAM,UAAU,yDAuBrB,CAAC;AAEH,eAAO,MAAM,YAAY,2DA6BvB,CAAC;AAEH,eAAO,MAAM,gBAAgB,+DAiC3B,CAAC;AAEH,eAAO,MAAM,gBAAgB,+DA+B3B,CAAC;AAEH,eAAO,MAAM,QAAQ,uDAYnB,CAAC;AAEH,eAAO,MAAM,QAAQ,uDAcnB,CAAC;AAEH,eAAO,MAAM,SAAS,wDAiBpB,CAAC;AAEH,eAAO,MAAM,SAAS,wDAepB,CAAC;AAEH,eAAO,MAAM,aAAa,4DA0BxB,CAAC;AAEH,eAAO,MAAM,aAAa,4DAYxB,CAAC;AAEH,eAAO,MAAM,WAAW,0DAsBtB,CAAC;AAEH,eAAO,MAAM,QAAQ,sDAgBnB,CAAC;AAEH,eAAO,MAAM,OAAO,qDAWlB,CAAC;AAEH,yEAAyE;AACzE,eAAO,MAAM,cAAc,2yBAejB,CAAC"}