canopy-ui 0.7.0 → 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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "canopy-ui",
3
- "version": "0.7.0",
3
+ "version": "0.9.0",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -0,0 +1,580 @@
1
+ [
2
+ {
3
+ "canopy": {
4
+ "event": "chat.stream_start",
5
+ "data": {
6
+ "message_id": "m1",
7
+ "turn_index": 4
8
+ }
9
+ },
10
+ "agui": [
11
+ {
12
+ "metadata": {
13
+ "canopy": {
14
+ "turn_index": 4
15
+ }
16
+ },
17
+ "type": "TEXT_MESSAGE_START",
18
+ "messageId": "m1",
19
+ "role": "assistant"
20
+ }
21
+ ]
22
+ },
23
+ {
24
+ "canopy": {
25
+ "event": "chat.delta",
26
+ "data": {
27
+ "message_id": "m1",
28
+ "text": "hello"
29
+ }
30
+ },
31
+ "agui": [
32
+ {
33
+ "type": "TEXT_MESSAGE_CONTENT",
34
+ "messageId": "m1",
35
+ "delta": "hello"
36
+ }
37
+ ]
38
+ },
39
+ {
40
+ "canopy": {
41
+ "event": "chat.stream_complete",
42
+ "data": {
43
+ "message_id": "m1",
44
+ "plaintext": "hello"
45
+ }
46
+ },
47
+ "agui": [
48
+ {
49
+ "metadata": {
50
+ "canopy": {
51
+ "plaintext": "hello"
52
+ }
53
+ },
54
+ "type": "TEXT_MESSAGE_END",
55
+ "messageId": "m1"
56
+ }
57
+ ]
58
+ },
59
+ {
60
+ "canopy": {
61
+ "event": "chat.user_message",
62
+ "data": {
63
+ "message_id": "u1",
64
+ "turn_index": 3,
65
+ "plaintext": "hi there"
66
+ }
67
+ },
68
+ "agui": [
69
+ {
70
+ "metadata": {
71
+ "canopy": {
72
+ "turn_index": 3
73
+ }
74
+ },
75
+ "type": "TEXT_MESSAGE_CHUNK",
76
+ "messageId": "u1",
77
+ "role": "user",
78
+ "delta": "hi there"
79
+ }
80
+ ]
81
+ },
82
+ {
83
+ "canopy": {
84
+ "event": "chat.tool_use",
85
+ "data": {
86
+ "tool_message_id": "t9",
87
+ "parent_message_id": "m1",
88
+ "turn_index": 5,
89
+ "block": {
90
+ "name": "list_insights",
91
+ "input": {
92
+ "limit": 5
93
+ }
94
+ }
95
+ }
96
+ },
97
+ "agui": [
98
+ {
99
+ "metadata": {
100
+ "canopy": {
101
+ "turn_index": 5,
102
+ "block": {
103
+ "name": "list_insights",
104
+ "input": {
105
+ "limit": 5
106
+ }
107
+ }
108
+ }
109
+ },
110
+ "type": "TOOL_CALL_START",
111
+ "toolCallId": "t9",
112
+ "toolCallName": "list_insights",
113
+ "parentMessageId": "m1"
114
+ },
115
+ {
116
+ "type": "TOOL_CALL_ARGS",
117
+ "toolCallId": "t9",
118
+ "delta": "{\"limit\": 5}"
119
+ },
120
+ {
121
+ "type": "TOOL_CALL_END",
122
+ "toolCallId": "t9"
123
+ }
124
+ ]
125
+ },
126
+ {
127
+ "canopy": {
128
+ "event": "chat.tool_result",
129
+ "data": {
130
+ "tool_message_id": "t9",
131
+ "parent_message_id": "m1",
132
+ "turn_index": 6,
133
+ "block": {
134
+ "type": "tool_result",
135
+ "tool_use_id": "toolu_01ABC",
136
+ "content": "[]"
137
+ }
138
+ }
139
+ },
140
+ "agui": [
141
+ {
142
+ "metadata": {
143
+ "canopy": {
144
+ "turn_index": 6,
145
+ "parent_message_id": "m1",
146
+ "block": {
147
+ "type": "tool_result",
148
+ "tool_use_id": "toolu_01ABC",
149
+ "content": "[]"
150
+ }
151
+ }
152
+ },
153
+ "type": "TOOL_CALL_RESULT",
154
+ "messageId": "t9",
155
+ "toolCallId": "t9",
156
+ "content": "[]"
157
+ }
158
+ ]
159
+ },
160
+ {
161
+ "canopy": {
162
+ "event": "session.title_updated",
163
+ "data": {
164
+ "title": "Insights triage"
165
+ }
166
+ },
167
+ "agui": [
168
+ {
169
+ "type": "STATE_DELTA",
170
+ "delta": [
171
+ {
172
+ "op": "replace",
173
+ "path": "/title",
174
+ "value": "Insights triage"
175
+ }
176
+ ]
177
+ }
178
+ ]
179
+ },
180
+ {
181
+ "canopy": {
182
+ "event": "draft.updated",
183
+ "data": {
184
+ "id": "d1",
185
+ "body": "x",
186
+ "version": 2
187
+ }
188
+ },
189
+ "agui": [
190
+ {
191
+ "type": "CUSTOM",
192
+ "name": "canopy.draft.updated",
193
+ "value": {
194
+ "id": "d1",
195
+ "body": "x",
196
+ "version": 2
197
+ }
198
+ }
199
+ ]
200
+ },
201
+ {
202
+ "canopy": {
203
+ "event": "presence.joined",
204
+ "data": {
205
+ "user_id": 7
206
+ }
207
+ },
208
+ "agui": [
209
+ {
210
+ "type": "CUSTOM",
211
+ "name": "canopy.presence.joined",
212
+ "value": {
213
+ "user_id": 7
214
+ }
215
+ }
216
+ ]
217
+ },
218
+ {
219
+ "canopy": {
220
+ "event": "presence.left",
221
+ "data": {
222
+ "user_id": 7
223
+ }
224
+ },
225
+ "agui": [
226
+ {
227
+ "type": "CUSTOM",
228
+ "name": "canopy.presence.left",
229
+ "value": {
230
+ "user_id": 7
231
+ }
232
+ }
233
+ ]
234
+ },
235
+ {
236
+ "canopy": {
237
+ "event": "session.state",
238
+ "data": {
239
+ "messages": [
240
+ {
241
+ "id": "41",
242
+ "turn_index": 0,
243
+ "role": "user",
244
+ "content": {},
245
+ "plaintext": "what is stale?",
246
+ "status": "complete",
247
+ "error_detail": null,
248
+ "started_at": null,
249
+ "completed_at": null,
250
+ "created_at": "2026-09-18T12:00:00+00:00"
251
+ },
252
+ {
253
+ "id": "42",
254
+ "turn_index": 1,
255
+ "role": "assistant",
256
+ "content": {},
257
+ "plaintext": "Three insights are.",
258
+ "status": "complete",
259
+ "error_detail": null,
260
+ "started_at": null,
261
+ "completed_at": null,
262
+ "created_at": "2026-09-18T12:00:05+00:00"
263
+ }
264
+ ],
265
+ "active_draft": null,
266
+ "participants": [
267
+ {
268
+ "user_id": 7,
269
+ "role": "editor"
270
+ }
271
+ ],
272
+ "presence_user_ids": [
273
+ 7
274
+ ],
275
+ "current_user_id": 7,
276
+ "menu": null
277
+ }
278
+ },
279
+ "agui": [
280
+ {
281
+ "metadata": {
282
+ "canopy": {
283
+ "frame": {
284
+ "event": "session.state",
285
+ "data": {
286
+ "messages": [
287
+ {
288
+ "id": "41",
289
+ "turn_index": 0,
290
+ "role": "user",
291
+ "content": {},
292
+ "plaintext": "what is stale?",
293
+ "status": "complete",
294
+ "error_detail": null,
295
+ "started_at": null,
296
+ "completed_at": null,
297
+ "created_at": "2026-09-18T12:00:00+00:00"
298
+ },
299
+ {
300
+ "id": "42",
301
+ "turn_index": 1,
302
+ "role": "assistant",
303
+ "content": {},
304
+ "plaintext": "Three insights are.",
305
+ "status": "complete",
306
+ "error_detail": null,
307
+ "started_at": null,
308
+ "completed_at": null,
309
+ "created_at": "2026-09-18T12:00:05+00:00"
310
+ }
311
+ ],
312
+ "active_draft": null,
313
+ "participants": [
314
+ {
315
+ "user_id": 7,
316
+ "role": "editor"
317
+ }
318
+ ],
319
+ "presence_user_ids": [
320
+ 7
321
+ ],
322
+ "current_user_id": 7,
323
+ "menu": null
324
+ }
325
+ }
326
+ }
327
+ },
328
+ "type": "MESSAGES_SNAPSHOT",
329
+ "messages": [
330
+ {
331
+ "id": "41",
332
+ "role": "user",
333
+ "content": "what is stale?"
334
+ },
335
+ {
336
+ "id": "42",
337
+ "role": "assistant",
338
+ "content": "Three insights are."
339
+ }
340
+ ]
341
+ }
342
+ ]
343
+ },
344
+ {
345
+ "canopy": {
346
+ "event": "session.page_action",
347
+ "data": {
348
+ "id": "9f1c",
349
+ "name": "scrollToRow",
350
+ "args": {
351
+ "id": 4471
352
+ }
353
+ }
354
+ },
355
+ "agui": [
356
+ {
357
+ "type": "CUSTOM",
358
+ "name": "canopy.session.page_action",
359
+ "value": {
360
+ "id": "9f1c",
361
+ "name": "scrollToRow",
362
+ "args": {
363
+ "id": 4471
364
+ }
365
+ }
366
+ }
367
+ ]
368
+ },
369
+ {
370
+ "canopy": {
371
+ "event": "session.stop",
372
+ "data": {
373
+ "state": "failed"
374
+ }
375
+ },
376
+ "agui": [
377
+ {
378
+ "type": "CUSTOM",
379
+ "name": "canopy.session.stop",
380
+ "value": {
381
+ "state": "failed"
382
+ }
383
+ }
384
+ ]
385
+ },
386
+ {
387
+ "canopy": {
388
+ "event": "session.activity",
389
+ "data": {
390
+ "state": "working"
391
+ }
392
+ },
393
+ "agui": [
394
+ {
395
+ "type": "ACTIVITY_SNAPSHOT",
396
+ "messageId": "t1",
397
+ "activityType": "canopy.session",
398
+ "content": {
399
+ "state": "working"
400
+ },
401
+ "replace": true
402
+ }
403
+ ]
404
+ },
405
+ {
406
+ "canopy": {
407
+ "event": "session.menu",
408
+ "data": {
409
+ "menu": {
410
+ "source": "hook",
411
+ "question": "Proceed?",
412
+ "observed_at": 1758196800,
413
+ "options": [
414
+ {
415
+ "label": "Yes"
416
+ },
417
+ {
418
+ "label": "No"
419
+ }
420
+ ]
421
+ }
422
+ }
423
+ },
424
+ "agui": [
425
+ {
426
+ "type": "CUSTOM",
427
+ "name": "canopy.menu",
428
+ "value": {
429
+ "source": "hook",
430
+ "question": "Proceed?",
431
+ "observed_at": 1758196800,
432
+ "options": [
433
+ {
434
+ "label": "Yes"
435
+ },
436
+ {
437
+ "label": "No"
438
+ }
439
+ ]
440
+ }
441
+ }
442
+ ]
443
+ },
444
+ {
445
+ "canopy": {
446
+ "event": "session.error",
447
+ "data": {
448
+ "code": "draft_conflict",
449
+ "message": "stale version"
450
+ }
451
+ },
452
+ "agui": [
453
+ {
454
+ "type": "RUN_ERROR",
455
+ "message": "stale version",
456
+ "code": "draft_conflict"
457
+ }
458
+ ]
459
+ },
460
+ {
461
+ "canopy": {
462
+ "event": "chat.stream_cancelled",
463
+ "data": {
464
+ "message_id": "m1",
465
+ "partial_len": 12
466
+ }
467
+ },
468
+ "agui": [
469
+ {
470
+ "type": "CUSTOM",
471
+ "name": "canopy.chat.stream_cancelled",
472
+ "value": {
473
+ "message_id": "m1",
474
+ "partial_len": 12
475
+ }
476
+ }
477
+ ]
478
+ },
479
+ {
480
+ "canopy": {
481
+ "event": "chat.stream_error",
482
+ "data": {
483
+ "message_id": "m1",
484
+ "detail": "runner went away"
485
+ }
486
+ },
487
+ "agui": [
488
+ {
489
+ "metadata": {
490
+ "canopy": {
491
+ "frame": {
492
+ "event": "chat.stream_error",
493
+ "data": {
494
+ "message_id": "m1",
495
+ "detail": "runner went away"
496
+ }
497
+ }
498
+ }
499
+ },
500
+ "type": "RUN_ERROR",
501
+ "message": "runner went away",
502
+ "code": "stream_error"
503
+ }
504
+ ]
505
+ },
506
+ {
507
+ "canopy": {
508
+ "event": "draft.committed",
509
+ "data": {
510
+ "draft_id": "d1",
511
+ "user_message_id": "u2"
512
+ }
513
+ },
514
+ "agui": [
515
+ {
516
+ "type": "CUSTOM",
517
+ "name": "canopy.draft.committed",
518
+ "value": {
519
+ "draft_id": "d1",
520
+ "user_message_id": "u2"
521
+ }
522
+ }
523
+ ]
524
+ },
525
+ {
526
+ "canopy": {
527
+ "event": "draft.discarded",
528
+ "data": {
529
+ "draft_id": "d1"
530
+ }
531
+ },
532
+ "agui": [
533
+ {
534
+ "type": "CUSTOM",
535
+ "name": "canopy.draft.discarded",
536
+ "value": {
537
+ "draft_id": "d1"
538
+ }
539
+ }
540
+ ]
541
+ },
542
+ {
543
+ "canopy": {
544
+ "event": "draft.lock_changed",
545
+ "data": {
546
+ "draft_id": "d1",
547
+ "holder_user_id": 7,
548
+ "expires_at": "2026-09-18T12:01:00+00:00"
549
+ }
550
+ },
551
+ "agui": [
552
+ {
553
+ "type": "CUSTOM",
554
+ "name": "canopy.draft.lock_changed",
555
+ "value": {
556
+ "draft_id": "d1",
557
+ "holder_user_id": 7,
558
+ "expires_at": "2026-09-18T12:01:00+00:00"
559
+ }
560
+ }
561
+ ]
562
+ },
563
+ {
564
+ "canopy": {
565
+ "event": "page.invalidate",
566
+ "data": {
567
+ "uri": "item://"
568
+ }
569
+ },
570
+ "agui": [
571
+ {
572
+ "type": "CUSTOM",
573
+ "name": "canopy.page.invalidate",
574
+ "value": {
575
+ "uri": "item://"
576
+ }
577
+ }
578
+ ]
579
+ }
580
+ ]