@zeyos/zx 5.5.0 → 5.6.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/CHANGELOG.md +56 -0
- package/dist/types/components/agent-thread/agent-thread.d.ts +583 -0
- package/dist/types/components/approval-card/approval-card.d.ts +596 -0
- package/dist/types/components/avatar/avatar.d.ts +91 -4
- package/dist/types/components/block-view/block-view.d.ts +205 -0
- package/dist/types/components/composer/composer.d.ts +736 -0
- package/dist/types/components/run-status/run-status.d.ts +393 -0
- package/dist/types/components/run-trace/run-trace.d.ts +624 -0
- package/dist/types/components/source-list/source-list.d.ts +177 -0
- package/dist/types/core/messages.d.ts +135 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/types/internal/agent-model.d.ts +587 -0
- package/dist/types/internal/highlight.d.ts +24 -0
- package/dist/types/internal/presence-loop.d.ts +148 -0
- package/dist/zx-zeyos.esm.js +4648 -4513
- package/dist/zx-zeyos.esm.min.js +2 -2
- package/dist/zx.css +1927 -1
- package/dist/zx.esm.js +15769 -9194
- package/dist/zx.esm.min.js +27 -8
- package/dist/zx.global.js +15769 -9194
- package/dist/zx.global.min.js +27 -8
- package/dist/zx.min.css +1 -1
- package/docs/api.json +1166 -5
- package/docs/llms.md +455 -2
- package/docs/llms.txt +10 -1
- package/package.json +1 -1
- package/src/components/agent-thread/agent-thread.css +417 -0
- package/src/components/agent-thread/agent-thread.js +1365 -0
- package/src/components/approval-card/approval-card.css +289 -0
- package/src/components/approval-card/approval-card.js +1377 -0
- package/src/components/avatar/avatar.css +56 -1
- package/src/components/avatar/avatar.js +148 -26
- package/src/components/block-view/block-view.css +300 -0
- package/src/components/block-view/block-view.js +523 -0
- package/src/components/composer/composer.css +403 -0
- package/src/components/composer/composer.js +1441 -0
- package/src/components/run-status/run-status.css +208 -0
- package/src/components/run-status/run-status.js +782 -0
- package/src/components/run-trace/run-trace.css +443 -0
- package/src/components/run-trace/run-trace.js +1209 -0
- package/src/components/source-list/source-list.css +208 -0
- package/src/components/source-list/source-list.js +355 -0
- package/src/core/messages.js +143 -0
- package/src/index.js +8 -0
- package/src/internal/agent-model.js +488 -0
- package/src/internal/highlight.js +104 -0
- package/src/internal/presence-loop.js +343 -0
- package/styles/zx.css +7 -0
package/docs/api.json
CHANGED
|
@@ -360,6 +360,240 @@
|
|
|
360
360
|
}
|
|
361
361
|
]
|
|
362
362
|
},
|
|
363
|
+
"AgentThread": {
|
|
364
|
+
"options": [
|
|
365
|
+
{
|
|
366
|
+
"name": "items",
|
|
367
|
+
"type": "ThreadItem[]",
|
|
368
|
+
"default": "[]",
|
|
369
|
+
"description": "The conversation, oldest first."
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
"name": "authors",
|
|
373
|
+
"type": "Record<string, Author>",
|
|
374
|
+
"default": "{}",
|
|
375
|
+
"description": "Who wrote the items and took the steps, by key. An item without an `author` is the person's own (`user`) or the first agent's (anything else)."
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
"name": "me",
|
|
379
|
+
"type": "string",
|
|
380
|
+
"default": "'me'",
|
|
381
|
+
"description": "Author key of the person reading; their items read as \"You\"."
|
|
382
|
+
},
|
|
383
|
+
{
|
|
384
|
+
"name": "label",
|
|
385
|
+
"type": "string|null",
|
|
386
|
+
"default": "null",
|
|
387
|
+
"description": "Accessible name of the feed; \"Conversation\" when null."
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
"name": "headingLevel",
|
|
391
|
+
"type": "2|3|4|5",
|
|
392
|
+
"default": "3",
|
|
393
|
+
"description": "Heading level inside answers and cards."
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
"name": "emptyState",
|
|
397
|
+
"type": "EmptyStateOptions|null",
|
|
398
|
+
"default": "null",
|
|
399
|
+
"description": "Shown while there are no items."
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
"name": "followOutput",
|
|
403
|
+
"type": "boolean",
|
|
404
|
+
"default": "true",
|
|
405
|
+
"description": "Keep the end in view while new output arrives, as long as the reader is at the end; otherwise offer \"Jump to latest\" and leave them where they are."
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
"name": "scroller",
|
|
409
|
+
"type": "Element|null",
|
|
410
|
+
"default": "null",
|
|
411
|
+
"description": "The element that scrolls; the nearest scrolling ancestor (or the thread itself) when null."
|
|
412
|
+
},
|
|
413
|
+
{
|
|
414
|
+
"name": "answerActions",
|
|
415
|
+
"type": "AnswerAction[]",
|
|
416
|
+
"default": "['copy','regenerate','branch']",
|
|
417
|
+
"description": "Actions under each finished answer; `regenerate` only under the latest one."
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
"name": "icons",
|
|
421
|
+
"type": "Partial<Record<'regenerate'|'branch'|'rateUp'|'rateDown'|'edit', string>>",
|
|
422
|
+
"default": null,
|
|
423
|
+
"description": "Glyph names for the answer and message actions."
|
|
424
|
+
},
|
|
425
|
+
{
|
|
426
|
+
"name": "userActions",
|
|
427
|
+
"type": "Array<'edit'|'copy'>",
|
|
428
|
+
"default": "[]",
|
|
429
|
+
"description": "Actions on the person's own messages, shown while the message is pointed at or holds focus (always on a touch screen): `edit` asks the application to put the message back in the composer, `copy` copies its text."
|
|
430
|
+
},
|
|
431
|
+
{
|
|
432
|
+
"name": "traceIcons",
|
|
433
|
+
"type": "Record<string, string>",
|
|
434
|
+
"default": "{}",
|
|
435
|
+
"description": "Glyph names for trace step kinds, handed to every `RunTrace` the thread draws."
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
"name": "sourceIcons",
|
|
439
|
+
"type": "Record<string, string>",
|
|
440
|
+
"default": "{}",
|
|
441
|
+
"description": "Glyph names for source kinds, handed to every `SourceList` the thread draws."
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
"name": "now",
|
|
445
|
+
"type": "(() => Date)|null",
|
|
446
|
+
"default": "null",
|
|
447
|
+
"description": "The clock \"today\" is measured against in cards and traces, for an application whose world runs on fixed dates; the real clock when null."
|
|
448
|
+
},
|
|
449
|
+
{
|
|
450
|
+
"name": "formatTime",
|
|
451
|
+
"type": "((at: string) => string)|null",
|
|
452
|
+
"default": "null",
|
|
453
|
+
"description": "Formats an item's `at`; the local clock time when null."
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
"name": "locale",
|
|
457
|
+
"type": "string",
|
|
458
|
+
"default": null,
|
|
459
|
+
"description": "Locale for times."
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
"name": "msg",
|
|
463
|
+
"type": "Record<string, string>|Record<string, Record<string, string>>",
|
|
464
|
+
"default": null,
|
|
465
|
+
"description": "Localized messages."
|
|
466
|
+
}
|
|
467
|
+
],
|
|
468
|
+
"events": [
|
|
469
|
+
{
|
|
470
|
+
"name": "action",
|
|
471
|
+
"payload": "{item: ThreadItem, action: string, value?: unknown}",
|
|
472
|
+
"description": "Answer action listener."
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
"name": "approve",
|
|
476
|
+
"payload": "{item: ThreadItem, values: Record<string, unknown>}",
|
|
477
|
+
"description": "Approval listener."
|
|
478
|
+
},
|
|
479
|
+
{
|
|
480
|
+
"name": "edit",
|
|
481
|
+
"payload": "{item: ThreadItem, values: Record<string, unknown>}",
|
|
482
|
+
"description": "Edit listener."
|
|
483
|
+
},
|
|
484
|
+
{
|
|
485
|
+
"name": "reject",
|
|
486
|
+
"payload": "{item: ThreadItem, reason: string}",
|
|
487
|
+
"description": "Rejection listener."
|
|
488
|
+
},
|
|
489
|
+
{
|
|
490
|
+
"name": "cite",
|
|
491
|
+
"payload": "{item: ThreadItem, n: number, source: Source|null}",
|
|
492
|
+
"description": "Citation listener."
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
"name": "artifact",
|
|
496
|
+
"payload": "{item: ThreadItem, id: string}",
|
|
497
|
+
"description": "Artifact listener."
|
|
498
|
+
},
|
|
499
|
+
{
|
|
500
|
+
"name": "reveal",
|
|
501
|
+
"payload": "{target: string}",
|
|
502
|
+
"description": "Reveal listener."
|
|
503
|
+
},
|
|
504
|
+
{
|
|
505
|
+
"name": "open",
|
|
506
|
+
"payload": "{item: ThreadItem, ref: import('../../internal/agent-model.js').ItemRef}",
|
|
507
|
+
"description": "Link listener."
|
|
508
|
+
}
|
|
509
|
+
],
|
|
510
|
+
"methods": [
|
|
511
|
+
{
|
|
512
|
+
"name": "register",
|
|
513
|
+
"signature": "register(type, render)",
|
|
514
|
+
"returns": "typeof AgentThread",
|
|
515
|
+
"description": "Registers how items of another type are drawn — an application's own, or a surface. A built-in type cannot be replaced."
|
|
516
|
+
},
|
|
517
|
+
{
|
|
518
|
+
"name": "has",
|
|
519
|
+
"signature": "has(type)",
|
|
520
|
+
"returns": "boolean",
|
|
521
|
+
"description": "Reports whether a type has a registered renderer."
|
|
522
|
+
},
|
|
523
|
+
{
|
|
524
|
+
"name": "setItems",
|
|
525
|
+
"signature": "setItems(items)",
|
|
526
|
+
"returns": "this",
|
|
527
|
+
"description": "Replaces the conversation."
|
|
528
|
+
},
|
|
529
|
+
{
|
|
530
|
+
"name": "upsert",
|
|
531
|
+
"signature": "upsert(item)",
|
|
532
|
+
"returns": "this",
|
|
533
|
+
"description": "Adds an item, or replaces the item with the same id where it stands."
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
"name": "patch",
|
|
537
|
+
"signature": "patch(id, partial)",
|
|
538
|
+
"returns": "this",
|
|
539
|
+
"description": "Changes part of an item. The common changes are made in place — an answer finishing or stopping, a trace's steps, an approval's status — so focus and selection inside the item survive; anything else redraws the item."
|
|
540
|
+
},
|
|
541
|
+
{
|
|
542
|
+
"name": "appendText",
|
|
543
|
+
"signature": "appendText(id, text)",
|
|
544
|
+
"returns": "this",
|
|
545
|
+
"description": "Streams text into an answer, creating it when the id is new. Only the answer's last paragraph is redrawn."
|
|
546
|
+
},
|
|
547
|
+
{
|
|
548
|
+
"name": "appendBlock",
|
|
549
|
+
"signature": "appendBlock(id, block)",
|
|
550
|
+
"returns": "this",
|
|
551
|
+
"description": "Adds a whole block to an answer — a figures block, a table, code — after what it already shows, without redrawing the rest of the answer. Creates the answer when the id is new."
|
|
552
|
+
},
|
|
553
|
+
{
|
|
554
|
+
"name": "announce",
|
|
555
|
+
"signature": "announce(text)",
|
|
556
|
+
"returns": "this",
|
|
557
|
+
"description": "Says something through the thread's polite status — an outcome the thread cannot see itself, such as \"Reminders sent\". Said once; the same words said twice are heard twice."
|
|
558
|
+
},
|
|
559
|
+
{
|
|
560
|
+
"name": "remove",
|
|
561
|
+
"signature": "remove(id)",
|
|
562
|
+
"returns": "this",
|
|
563
|
+
"description": "Removes an item."
|
|
564
|
+
},
|
|
565
|
+
{
|
|
566
|
+
"name": "get",
|
|
567
|
+
"signature": "get(id)",
|
|
568
|
+
"returns": "ThreadItem|null",
|
|
569
|
+
"description": "An item as it stands, an answer's streamed text included."
|
|
570
|
+
},
|
|
571
|
+
{
|
|
572
|
+
"name": "getComponent",
|
|
573
|
+
"signature": "getComponent(id)",
|
|
574
|
+
"returns": "Component|null",
|
|
575
|
+
"description": "The main component drawn for an item: an answer's BlockView, a trace's RunTrace, an approval's ApprovalCard."
|
|
576
|
+
},
|
|
577
|
+
{
|
|
578
|
+
"name": "reveal",
|
|
579
|
+
"signature": "reveal(target)",
|
|
580
|
+
"returns": "boolean",
|
|
581
|
+
"description": "Brings something into view and moves focus to it: `item:<id>` an item, `step:<id>` a trace step (in whichever trace holds it), `source:<n>` a source of the latest answer that has one."
|
|
582
|
+
},
|
|
583
|
+
{
|
|
584
|
+
"name": "setArtifactState",
|
|
585
|
+
"signature": "setArtifactState(id, state)",
|
|
586
|
+
"returns": "this",
|
|
587
|
+
"description": "Reflects whether an artifact is open somewhere — an inspector, a drawer — on every card that names it, in every answer. See `BlockView#setArtifactState()`."
|
|
588
|
+
},
|
|
589
|
+
{
|
|
590
|
+
"name": "scrollToEnd",
|
|
591
|
+
"signature": "scrollToEnd()",
|
|
592
|
+
"returns": "this",
|
|
593
|
+
"description": "Scrolls to the end of the conversation."
|
|
594
|
+
}
|
|
595
|
+
]
|
|
596
|
+
},
|
|
363
597
|
"Alert": {
|
|
364
598
|
"options": [
|
|
365
599
|
{
|
|
@@ -819,6 +1053,173 @@
|
|
|
819
1053
|
"events": [],
|
|
820
1054
|
"methods": []
|
|
821
1055
|
},
|
|
1056
|
+
"ApprovalCard": {
|
|
1057
|
+
"options": [
|
|
1058
|
+
{
|
|
1059
|
+
"name": "title",
|
|
1060
|
+
"type": "string",
|
|
1061
|
+
"default": "''",
|
|
1062
|
+
"description": "What the agent wants to do, as a question: \"Send 3 payment reminders?\"."
|
|
1063
|
+
},
|
|
1064
|
+
{
|
|
1065
|
+
"name": "description",
|
|
1066
|
+
"type": "string",
|
|
1067
|
+
"default": "''",
|
|
1068
|
+
"description": "One line under the title: what follows from approving."
|
|
1069
|
+
},
|
|
1070
|
+
{
|
|
1071
|
+
"name": "icon",
|
|
1072
|
+
"type": "string|null",
|
|
1073
|
+
"default": "null",
|
|
1074
|
+
"description": "Icon name for the tile beside the title; none when null."
|
|
1075
|
+
},
|
|
1076
|
+
{
|
|
1077
|
+
"name": "tone",
|
|
1078
|
+
"type": "ApprovalTone",
|
|
1079
|
+
"default": "'blue'",
|
|
1080
|
+
"description": "Categorical tone of the icon tile."
|
|
1081
|
+
},
|
|
1082
|
+
{
|
|
1083
|
+
"name": "headingLevel",
|
|
1084
|
+
"type": "2|3|4|5|6",
|
|
1085
|
+
"default": "3",
|
|
1086
|
+
"description": "Element level of the title heading."
|
|
1087
|
+
},
|
|
1088
|
+
{
|
|
1089
|
+
"name": "status",
|
|
1090
|
+
"type": "ApprovalStatus",
|
|
1091
|
+
"default": "'pending'",
|
|
1092
|
+
"description": "Where the request stands."
|
|
1093
|
+
},
|
|
1094
|
+
{
|
|
1095
|
+
"name": "details",
|
|
1096
|
+
"type": "Node|Block[]|null",
|
|
1097
|
+
"default": "null",
|
|
1098
|
+
"description": "What will happen — recipients, amounts, records — as a node the application built, or as blocks. Model text in blocks is drawn as text only."
|
|
1099
|
+
},
|
|
1100
|
+
{
|
|
1101
|
+
"name": "preview",
|
|
1102
|
+
"type": "ApprovalPreview|null",
|
|
1103
|
+
"default": "null",
|
|
1104
|
+
"description": "What the request produces, behind a disclosure."
|
|
1105
|
+
},
|
|
1106
|
+
{
|
|
1107
|
+
"name": "fields",
|
|
1108
|
+
"type": "Record<string, FieldOptions>|null",
|
|
1109
|
+
"default": "null",
|
|
1110
|
+
"description": "The Edit form, keyed by value name. No fields, no Edit."
|
|
1111
|
+
},
|
|
1112
|
+
{
|
|
1113
|
+
"name": "values",
|
|
1114
|
+
"type": "Record<string, unknown>",
|
|
1115
|
+
"default": "{}",
|
|
1116
|
+
"description": "The values the request carries; the Edit form starts from them and `approve` reports them."
|
|
1117
|
+
},
|
|
1118
|
+
{
|
|
1119
|
+
"name": "confirmText",
|
|
1120
|
+
"type": "string|null",
|
|
1121
|
+
"default": "null",
|
|
1122
|
+
"description": "Text the person must type before Approve goes through, for an action that cannot be undone. Decided by the application from the tool the action triggers, never taken from model output."
|
|
1123
|
+
},
|
|
1124
|
+
{
|
|
1125
|
+
"name": "reason",
|
|
1126
|
+
"type": "ApprovalReasonMode",
|
|
1127
|
+
"default": "'optional'",
|
|
1128
|
+
"description": "Whether Reject asks why."
|
|
1129
|
+
},
|
|
1130
|
+
{
|
|
1131
|
+
"name": "edited",
|
|
1132
|
+
"type": "boolean",
|
|
1133
|
+
"default": "false",
|
|
1134
|
+
"description": "Whether the values were already edited, for a request restored from a record. Without `editedKeys` every field is listed under \"Edited by you\"."
|
|
1135
|
+
},
|
|
1136
|
+
{
|
|
1137
|
+
"name": "editedKeys",
|
|
1138
|
+
"type": "string[]|null",
|
|
1139
|
+
"default": "null",
|
|
1140
|
+
"description": "Which values were edited: only these fields are listed under \"Edited by you\", in field order. A non-empty list implies `edited`; null lists every field of an edited request."
|
|
1141
|
+
},
|
|
1142
|
+
{
|
|
1143
|
+
"name": "rejectReason",
|
|
1144
|
+
"type": "string|null",
|
|
1145
|
+
"default": "null",
|
|
1146
|
+
"description": "The reason a rejected request was given, for a request restored from a record."
|
|
1147
|
+
},
|
|
1148
|
+
{
|
|
1149
|
+
"name": "answeredBy",
|
|
1150
|
+
"type": "string|null",
|
|
1151
|
+
"default": "null",
|
|
1152
|
+
"description": "Who answers, as the verdict names them; the message `approvalCard.you` (\"you\") when null."
|
|
1153
|
+
},
|
|
1154
|
+
{
|
|
1155
|
+
"name": "answeredAt",
|
|
1156
|
+
"type": "string|Date|null",
|
|
1157
|
+
"default": "null",
|
|
1158
|
+
"description": "When an answered request was answered: a local ISO date-time or a Date. An answer given on the card takes the time it was given."
|
|
1159
|
+
},
|
|
1160
|
+
{
|
|
1161
|
+
"name": "now",
|
|
1162
|
+
"type": "(() => Date)|null",
|
|
1163
|
+
"default": "null",
|
|
1164
|
+
"description": "The clock: decides whether `answeredAt` is today (the time alone) or another day (date and time), and gives the time of an answer recorded without an explicit `at`. Real time when null."
|
|
1165
|
+
},
|
|
1166
|
+
{
|
|
1167
|
+
"name": "keys",
|
|
1168
|
+
"type": "boolean",
|
|
1169
|
+
"default": "true",
|
|
1170
|
+
"description": "Whether A, E, and R act while focus is inside the pending card. `handleKey()` works either way."
|
|
1171
|
+
},
|
|
1172
|
+
{
|
|
1173
|
+
"name": "msg",
|
|
1174
|
+
"type": "Record<string, string>|Record<string, Record<string, string>>",
|
|
1175
|
+
"default": null,
|
|
1176
|
+
"description": "Localized messages."
|
|
1177
|
+
}
|
|
1178
|
+
],
|
|
1179
|
+
"events": [
|
|
1180
|
+
{
|
|
1181
|
+
"name": "approve",
|
|
1182
|
+
"payload": "{values: Record<string, unknown>}",
|
|
1183
|
+
"description": "Approve listener."
|
|
1184
|
+
},
|
|
1185
|
+
{
|
|
1186
|
+
"name": "edit",
|
|
1187
|
+
"payload": "{values, changed, editedKeys}",
|
|
1188
|
+
"description": "Edit listener."
|
|
1189
|
+
},
|
|
1190
|
+
{
|
|
1191
|
+
"name": "reject",
|
|
1192
|
+
"payload": "{reason: string}",
|
|
1193
|
+
"description": "Reject listener."
|
|
1194
|
+
}
|
|
1195
|
+
],
|
|
1196
|
+
"methods": [
|
|
1197
|
+
{
|
|
1198
|
+
"name": "update",
|
|
1199
|
+
"signature": "update([partial])",
|
|
1200
|
+
"returns": "this",
|
|
1201
|
+
"description": "Changes the request in place — the agent revised it, or the record it is drawn from changed — and redraws only what changed. Focus stays where it was; when the element that held it is gone (the Edit button, the preview toggle), the card takes it. Of the card's dialogs only one the change makes meaningless closes: the Edit form when `fields` change, the Reject dialog when `reason` changes, the typed confirmation when `confirmText` changes. An open Edit form stays open over new `values` and saves what the person typed. Emits nothing. `edited` and `editedKeys` follow the options' rules: `edited: true` alone keeps the fields already listed (every field, on a card that was not edited); `edited: false` alone clears the list; a non-empty `editedKeys` marks the card edited."
|
|
1202
|
+
},
|
|
1203
|
+
{
|
|
1204
|
+
"name": "setStatus",
|
|
1205
|
+
"signature": "setStatus(status, [answer])",
|
|
1206
|
+
"returns": "this",
|
|
1207
|
+
"description": "Settles the request from outside: an answer the application received elsewhere, a request that timed out, or a prevented answer the application has now carried out. Emits nothing."
|
|
1208
|
+
},
|
|
1209
|
+
{
|
|
1210
|
+
"name": "focus",
|
|
1211
|
+
"signature": "focus([options])",
|
|
1212
|
+
"returns": "this",
|
|
1213
|
+
"description": "Moves focus to the card, so a thread can bring the reader to a request when a run starts waiting on it."
|
|
1214
|
+
},
|
|
1215
|
+
{
|
|
1216
|
+
"name": "handleKey",
|
|
1217
|
+
"signature": "handleKey(event)",
|
|
1218
|
+
"returns": "boolean",
|
|
1219
|
+
"description": "Answers a key: A approves, E edits, R rejects. Acts only while the request is pending, never from a text control or with a modifier held, and never while one of the card's dialogs is open. The card calls it for keys inside itself; an application may forward keys from elsewhere."
|
|
1220
|
+
}
|
|
1221
|
+
]
|
|
1222
|
+
},
|
|
822
1223
|
"Aspect": {
|
|
823
1224
|
"options": [
|
|
824
1225
|
{
|
|
@@ -940,13 +1341,43 @@
|
|
|
940
1341
|
"name": "status",
|
|
941
1342
|
"type": "'online'|'away'|'busy'|'offline'|null",
|
|
942
1343
|
"default": "null",
|
|
943
|
-
"description": "Optional presence state."
|
|
1344
|
+
"description": "Optional presence state of a person. An agent's `activity` takes its place: when both are given, only the activity is drawn and named."
|
|
944
1345
|
},
|
|
945
1346
|
{
|
|
946
1347
|
"name": "statusLabel",
|
|
947
1348
|
"type": "string|null",
|
|
948
1349
|
"default": "null",
|
|
949
1350
|
"description": "Text alternative for the presence state."
|
|
1351
|
+
},
|
|
1352
|
+
{
|
|
1353
|
+
"name": "activity",
|
|
1354
|
+
"type": "AgentActivity|null",
|
|
1355
|
+
"default": "null",
|
|
1356
|
+
"description": "What an agent is doing: `'idle'`, `'thinking'`, `'working'`, `'needs-you'`, `'blocked'` or `'offline'`. Drawn as a dot whose shape and tone differ per activity (a square for blocked, a hollow ring for idle, a dashed ring for offline); its word joins the accessible name and the dot's tooltip. Wins over `status`."
|
|
1357
|
+
},
|
|
1358
|
+
{
|
|
1359
|
+
"name": "activityLabel",
|
|
1360
|
+
"type": "string|null",
|
|
1361
|
+
"default": "null",
|
|
1362
|
+
"description": "The activity's word, when the default (\"Working\", \"Needs you\", …) is not the one to show."
|
|
1363
|
+
},
|
|
1364
|
+
{
|
|
1365
|
+
"name": "animate",
|
|
1366
|
+
"type": "boolean",
|
|
1367
|
+
"default": "false",
|
|
1368
|
+
"description": "Moves the avatar with its activity — idle breathes, thinking sways, working bobs, needs-you leans and blinks — in the one animation loop every animated avatar on the page shares. Motion is never the only signal, stops off screen and while the page is hidden, and returns the avatar to rest under reduced motion (the system's, or a `data-zx-motion=\"reduced\"` region). While it is on, the root's `transform` belongs to the loop."
|
|
1369
|
+
},
|
|
1370
|
+
{
|
|
1371
|
+
"name": "phase",
|
|
1372
|
+
"type": "number|null",
|
|
1373
|
+
"default": "null",
|
|
1374
|
+
"description": "Where in its activity's cycle the avatar moves, as a fraction from 0 up to 1 (whole turns wrap): two avatars of the same agent on one screen — a roster and an inspector — at different phases never move in step, and 0.5 puts them half a cycle apart. `null` derives the phase from the name (or the initials), so the same agent always moves the same way."
|
|
1375
|
+
},
|
|
1376
|
+
{
|
|
1377
|
+
"name": "msg",
|
|
1378
|
+
"type": "Record<string, string>|Record<string, Record<string, string>>",
|
|
1379
|
+
"default": null,
|
|
1380
|
+
"description": "Localized messages: the activity words, `agent.activity.<activity>`."
|
|
950
1381
|
}
|
|
951
1382
|
],
|
|
952
1383
|
"events": [],
|
|
@@ -955,7 +1386,7 @@
|
|
|
955
1386
|
"name": "set",
|
|
956
1387
|
"signature": "set(values)",
|
|
957
1388
|
"returns": "this",
|
|
958
|
-
"description": "Replaces avatar identity and presentation values."
|
|
1389
|
+
"description": "Replaces avatar identity and presentation values: any option but `msg`, `phase` included, so an animated avatar can be moved out of step with another of the same agent while it runs."
|
|
959
1390
|
},
|
|
960
1391
|
{
|
|
961
1392
|
"name": "setStatus",
|
|
@@ -963,6 +1394,12 @@
|
|
|
963
1394
|
"returns": "this",
|
|
964
1395
|
"description": "Sets the presence state and its text alternative."
|
|
965
1396
|
},
|
|
1397
|
+
{
|
|
1398
|
+
"name": "setActivity",
|
|
1399
|
+
"signature": "setActivity(activity, [label])",
|
|
1400
|
+
"returns": "this",
|
|
1401
|
+
"description": "Sets what an agent is doing and, optionally, the word for it. `null` clears the activity, and a person's `status` shows again if one is set."
|
|
1402
|
+
},
|
|
966
1403
|
{
|
|
967
1404
|
"name": "hasImage",
|
|
968
1405
|
"signature": "hasImage()",
|
|
@@ -1103,6 +1540,107 @@
|
|
|
1103
1540
|
],
|
|
1104
1541
|
"methods": []
|
|
1105
1542
|
},
|
|
1543
|
+
"BlockView": {
|
|
1544
|
+
"options": [
|
|
1545
|
+
{
|
|
1546
|
+
"name": "blocks",
|
|
1547
|
+
"type": "Block[]",
|
|
1548
|
+
"default": "[]",
|
|
1549
|
+
"description": "The answer's blocks. Model text is data: every string reaches the page as text, through the inline grammar of `**bold**`, `` `code` `` and `[n]` citations."
|
|
1550
|
+
},
|
|
1551
|
+
{
|
|
1552
|
+
"name": "headingLevel",
|
|
1553
|
+
"type": "2|3|4|5",
|
|
1554
|
+
"default": "3",
|
|
1555
|
+
"description": "Element level of a `heading` block of level 2; a level-3 heading goes one deeper. Set it one below the heading that names the answer."
|
|
1556
|
+
},
|
|
1557
|
+
{
|
|
1558
|
+
"name": "size",
|
|
1559
|
+
"type": "'sm'|'md'",
|
|
1560
|
+
"default": "'sm'",
|
|
1561
|
+
"description": "Prose size: `'sm'` sets the answer at the interface size, for a conversation; `'md'` at the reading size, for a document."
|
|
1562
|
+
},
|
|
1563
|
+
{
|
|
1564
|
+
"name": "streaming",
|
|
1565
|
+
"type": "boolean",
|
|
1566
|
+
"default": "false",
|
|
1567
|
+
"description": "Whether more is still being written. The last block stays open to `appendText()`, and the root is busy until `end()` or `stop()`."
|
|
1568
|
+
},
|
|
1569
|
+
{
|
|
1570
|
+
"name": "sources",
|
|
1571
|
+
"type": "Source[]|null",
|
|
1572
|
+
"default": "null",
|
|
1573
|
+
"description": "The sources citations point at; their titles name the citation buttons."
|
|
1574
|
+
},
|
|
1575
|
+
{
|
|
1576
|
+
"name": "msg",
|
|
1577
|
+
"type": "Record<string, string>|Record<string, Record<string, string>>",
|
|
1578
|
+
"default": null,
|
|
1579
|
+
"description": "Localized messages."
|
|
1580
|
+
}
|
|
1581
|
+
],
|
|
1582
|
+
"events": [
|
|
1583
|
+
{
|
|
1584
|
+
"name": "cite",
|
|
1585
|
+
"payload": "{n: number, source: Source|null}",
|
|
1586
|
+
"description": "Citation listener."
|
|
1587
|
+
},
|
|
1588
|
+
{
|
|
1589
|
+
"name": "artifact",
|
|
1590
|
+
"payload": "{id: string}",
|
|
1591
|
+
"description": "Artifact listener."
|
|
1592
|
+
},
|
|
1593
|
+
{
|
|
1594
|
+
"name": "end",
|
|
1595
|
+
"payload": "Record<string, never>",
|
|
1596
|
+
"description": "End-of-stream listener."
|
|
1597
|
+
}
|
|
1598
|
+
],
|
|
1599
|
+
"methods": [
|
|
1600
|
+
{
|
|
1601
|
+
"name": "setBlocks",
|
|
1602
|
+
"signature": "setBlocks(blocks, [options])",
|
|
1603
|
+
"returns": "this",
|
|
1604
|
+
"description": "Replaces every block, clearing a stopped state."
|
|
1605
|
+
},
|
|
1606
|
+
{
|
|
1607
|
+
"name": "append",
|
|
1608
|
+
"signature": "append(block)",
|
|
1609
|
+
"returns": "this",
|
|
1610
|
+
"description": "Adds a block after the last one. The blocks before it are left as they are."
|
|
1611
|
+
},
|
|
1612
|
+
{
|
|
1613
|
+
"name": "appendText",
|
|
1614
|
+
"signature": "appendText(text)",
|
|
1615
|
+
"returns": "this",
|
|
1616
|
+
"description": "Streams text into the answer. It continues the last paragraph, or opens one when the answer ends in anything else; a blank line in the text starts a new paragraph. Only the last paragraph is redrawn, so a marker split across two calls (`**bo` … `ld**`) resolves as soon as its close arrives."
|
|
1617
|
+
},
|
|
1618
|
+
{
|
|
1619
|
+
"name": "end",
|
|
1620
|
+
"signature": "end()",
|
|
1621
|
+
"returns": "this",
|
|
1622
|
+
"description": "Marks the answer finished."
|
|
1623
|
+
},
|
|
1624
|
+
{
|
|
1625
|
+
"name": "stop",
|
|
1626
|
+
"signature": "stop()",
|
|
1627
|
+
"returns": "this",
|
|
1628
|
+
"description": "Marks the answer stopped where it is, with a line saying so."
|
|
1629
|
+
},
|
|
1630
|
+
{
|
|
1631
|
+
"name": "setSources",
|
|
1632
|
+
"signature": "setSources(sources)",
|
|
1633
|
+
"returns": "this",
|
|
1634
|
+
"description": "Sets the sources citations point at."
|
|
1635
|
+
},
|
|
1636
|
+
{
|
|
1637
|
+
"name": "setArtifactState",
|
|
1638
|
+
"signature": "setArtifactState(id, state)",
|
|
1639
|
+
"returns": "this",
|
|
1640
|
+
"description": "Says whether an artifact's card has its artifact open somewhere — an inspector, a drawer — so the card reads as pressed and names what it controls. The application owns the open state; the card only reflects it."
|
|
1641
|
+
}
|
|
1642
|
+
]
|
|
1643
|
+
},
|
|
1106
1644
|
"Breadcrumb": {
|
|
1107
1645
|
"options": [
|
|
1108
1646
|
{
|
|
@@ -2457,10 +2995,279 @@
|
|
|
2457
2995
|
],
|
|
2458
2996
|
"methods": [
|
|
2459
2997
|
{
|
|
2460
|
-
"name": "setValue",
|
|
2461
|
-
"signature": "setValue(value, [options])",
|
|
2998
|
+
"name": "setValue",
|
|
2999
|
+
"signature": "setValue(value, [options])",
|
|
3000
|
+
"returns": "this",
|
|
3001
|
+
"description": "Replaces the editor text."
|
|
3002
|
+
}
|
|
3003
|
+
]
|
|
3004
|
+
},
|
|
3005
|
+
"Composer": {
|
|
3006
|
+
"options": [
|
|
3007
|
+
{
|
|
3008
|
+
"name": "label",
|
|
3009
|
+
"type": "string|null",
|
|
3010
|
+
"default": "null",
|
|
3011
|
+
"description": "Accessible name of the text and of the group around it. Omitted resolves `composer.label`, English `Message`."
|
|
3012
|
+
},
|
|
3013
|
+
{
|
|
3014
|
+
"name": "placeholder",
|
|
3015
|
+
"type": "string",
|
|
3016
|
+
"default": "''",
|
|
3017
|
+
"description": "Placeholder of the text."
|
|
3018
|
+
},
|
|
3019
|
+
{
|
|
3020
|
+
"name": "value",
|
|
3021
|
+
"type": "string",
|
|
3022
|
+
"default": "''",
|
|
3023
|
+
"description": "Initial text. Without it, a saved draft is restored."
|
|
3024
|
+
},
|
|
3025
|
+
{
|
|
3026
|
+
"name": "submitKey",
|
|
3027
|
+
"type": "'enter'|'mod+enter'",
|
|
3028
|
+
"default": "'enter'",
|
|
3029
|
+
"description": "`'enter'`: Enter sends and Shift+Enter breaks the line. `'mod+enter'`: Cmd+Enter (Ctrl+Enter elsewhere) sends and Enter breaks the line."
|
|
3030
|
+
},
|
|
3031
|
+
{
|
|
3032
|
+
"name": "busy",
|
|
3033
|
+
"type": "boolean",
|
|
3034
|
+
"default": "false",
|
|
3035
|
+
"description": "Whether an agent is working: Send becomes Stop."
|
|
3036
|
+
},
|
|
3037
|
+
{
|
|
3038
|
+
"name": "disabled",
|
|
3039
|
+
"type": "boolean",
|
|
3040
|
+
"default": "false",
|
|
3041
|
+
"description": "Whether the composer takes no input."
|
|
3042
|
+
},
|
|
3043
|
+
{
|
|
3044
|
+
"name": "attachments",
|
|
3045
|
+
"type": "boolean",
|
|
3046
|
+
"default": "false",
|
|
3047
|
+
"description": "Whether files can be attached: an Attach button, paste, and drop."
|
|
3048
|
+
},
|
|
3049
|
+
{
|
|
3050
|
+
"name": "accept",
|
|
3051
|
+
"type": "string",
|
|
3052
|
+
"default": "''",
|
|
3053
|
+
"description": "File types accepted, in the `<input type=\"file\">` syntax (`'image/*,.pdf'`). Empty accepts every file."
|
|
3054
|
+
},
|
|
3055
|
+
{
|
|
3056
|
+
"name": "maxFiles",
|
|
3057
|
+
"type": "number",
|
|
3058
|
+
"default": "10",
|
|
3059
|
+
"description": "Most files one message carries."
|
|
3060
|
+
},
|
|
3061
|
+
{
|
|
3062
|
+
"name": "mentions",
|
|
3063
|
+
"type": "MentionSource|null",
|
|
3064
|
+
"default": "null",
|
|
3065
|
+
"description": "Enables `@` mentions."
|
|
3066
|
+
},
|
|
3067
|
+
{
|
|
3068
|
+
"name": "commands",
|
|
3069
|
+
"type": "LauncherItem[]|null",
|
|
3070
|
+
"default": "null",
|
|
3071
|
+
"description": "Commands opened by `/` on an empty text, in a Launcher; an item with `items` opens a page of further commands."
|
|
3072
|
+
},
|
|
3073
|
+
{
|
|
3074
|
+
"name": "context",
|
|
3075
|
+
"type": "ContextChip[]",
|
|
3076
|
+
"default": "[]",
|
|
3077
|
+
"description": "Initial context chips."
|
|
3078
|
+
},
|
|
3079
|
+
{
|
|
3080
|
+
"name": "hint",
|
|
3081
|
+
"type": "string",
|
|
3082
|
+
"default": "''",
|
|
3083
|
+
"description": "Quiet text in the bar beside Send."
|
|
3084
|
+
},
|
|
3085
|
+
{
|
|
3086
|
+
"name": "note",
|
|
3087
|
+
"type": "string",
|
|
3088
|
+
"default": "''",
|
|
3089
|
+
"description": "Quiet line under the composer."
|
|
3090
|
+
},
|
|
3091
|
+
{
|
|
3092
|
+
"name": "draftKey",
|
|
3093
|
+
"type": "string|null",
|
|
3094
|
+
"default": "null",
|
|
3095
|
+
"description": "Key the unsent text is kept under (through `storage()`), restored on create and cleared on send."
|
|
3096
|
+
},
|
|
3097
|
+
{
|
|
3098
|
+
"name": "minRows",
|
|
3099
|
+
"type": "number",
|
|
3100
|
+
"default": "1",
|
|
3101
|
+
"description": "Rows the text never shrinks below, even when empty. Capped at `maxRows`."
|
|
3102
|
+
},
|
|
3103
|
+
{
|
|
3104
|
+
"name": "maxRows",
|
|
3105
|
+
"type": "number",
|
|
3106
|
+
"default": "10",
|
|
3107
|
+
"description": "Rows the text grows to before it scrolls."
|
|
3108
|
+
},
|
|
3109
|
+
{
|
|
3110
|
+
"name": "icons",
|
|
3111
|
+
"type": "{attach?: string, commands?: string}",
|
|
3112
|
+
"default": "{}",
|
|
3113
|
+
"description": "Glyph names for the Attach and Commands buttons (a paperclip, a book) where the application registered its own."
|
|
3114
|
+
},
|
|
3115
|
+
{
|
|
3116
|
+
"name": "tools",
|
|
3117
|
+
"type": "ComposerTool[]",
|
|
3118
|
+
"default": "[]",
|
|
3119
|
+
"description": "Further icon buttons in the bar, after Attach and Commands. An entry without `id`, `label` or `icon` is left out, as is a repeated id."
|
|
3120
|
+
},
|
|
3121
|
+
{
|
|
3122
|
+
"name": "sendLabel",
|
|
3123
|
+
"type": "string|null",
|
|
3124
|
+
"default": "null",
|
|
3125
|
+
"description": "Visible text beside the Send glyph (`'Start task'`), which is then also its accessible name; while busy the button reads `composer.stop`. Null keeps Send icon-only. In a composer narrower than 24rem the text is visually hidden and stays the name."
|
|
3126
|
+
},
|
|
3127
|
+
{
|
|
3128
|
+
"name": "msg",
|
|
3129
|
+
"type": "Record<string, string>|Record<string, Record<string, string>>",
|
|
3130
|
+
"default": null,
|
|
3131
|
+
"description": "Localized messages."
|
|
3132
|
+
}
|
|
3133
|
+
],
|
|
3134
|
+
"events": [
|
|
3135
|
+
{
|
|
3136
|
+
"name": "send",
|
|
3137
|
+
"payload": "{text, files, mentions, context}",
|
|
3138
|
+
"description": "Preventable send listener."
|
|
3139
|
+
},
|
|
3140
|
+
{
|
|
3141
|
+
"name": "stop",
|
|
3142
|
+
"payload": "Record<string, never>",
|
|
3143
|
+
"description": "Stop listener."
|
|
3144
|
+
},
|
|
3145
|
+
{
|
|
3146
|
+
"name": "input",
|
|
3147
|
+
"payload": "{text: string}",
|
|
3148
|
+
"description": "Text listener."
|
|
3149
|
+
},
|
|
3150
|
+
{
|
|
3151
|
+
"name": "attach",
|
|
3152
|
+
"payload": "{files: File[]}",
|
|
3153
|
+
"description": "Preventable attach listener."
|
|
3154
|
+
},
|
|
3155
|
+
{
|
|
3156
|
+
"name": "remove",
|
|
3157
|
+
"payload": "{kind, id, file, chip}",
|
|
3158
|
+
"description": "Chip removal listener."
|
|
3159
|
+
},
|
|
3160
|
+
{
|
|
3161
|
+
"name": "mention",
|
|
3162
|
+
"payload": "{item: MentionItem}",
|
|
3163
|
+
"description": "Mention listener."
|
|
3164
|
+
},
|
|
3165
|
+
{
|
|
3166
|
+
"name": "command",
|
|
3167
|
+
"payload": "{item: LauncherItem}",
|
|
3168
|
+
"description": "Command listener."
|
|
3169
|
+
},
|
|
3170
|
+
{
|
|
3171
|
+
"name": "tool",
|
|
3172
|
+
"payload": "{id, tool}",
|
|
3173
|
+
"description": "Tool listener."
|
|
3174
|
+
},
|
|
3175
|
+
{
|
|
3176
|
+
"name": "historyprevious",
|
|
3177
|
+
"payload": "Record<string, never>",
|
|
3178
|
+
"description": "Listener for ArrowUp on an empty text."
|
|
3179
|
+
}
|
|
3180
|
+
],
|
|
3181
|
+
"methods": [
|
|
3182
|
+
{
|
|
3183
|
+
"name": "focus",
|
|
3184
|
+
"signature": "focus()",
|
|
3185
|
+
"returns": "this",
|
|
3186
|
+
"description": "Focuses the text."
|
|
3187
|
+
},
|
|
3188
|
+
{
|
|
3189
|
+
"name": "setValue",
|
|
3190
|
+
"signature": "setValue(text)",
|
|
3191
|
+
"returns": "this",
|
|
3192
|
+
"description": "Replaces the text, keeps the draft in step, and puts the caret at the end. Emits nothing."
|
|
3193
|
+
},
|
|
3194
|
+
{
|
|
3195
|
+
"name": "insertText",
|
|
3196
|
+
"signature": "insertText(text)",
|
|
3197
|
+
"returns": "this",
|
|
3198
|
+
"description": "Types text at the caret, replacing any selection, as if the person had typed it: the draft follows, and text ending in the mention trigger (`'@'`) opens the suggestions. Emits `input`. Use it for a button that starts a mention or inserts a snippet."
|
|
3199
|
+
},
|
|
3200
|
+
{
|
|
3201
|
+
"name": "clear",
|
|
3202
|
+
"signature": "clear()",
|
|
3203
|
+
"returns": "this",
|
|
3204
|
+
"description": "Empties the text, the attachments and the draft. Context chips stay. Emits nothing."
|
|
3205
|
+
},
|
|
3206
|
+
{
|
|
3207
|
+
"name": "setBusy",
|
|
3208
|
+
"signature": "setBusy(busy)",
|
|
3209
|
+
"returns": "this",
|
|
3210
|
+
"description": "Shows Stop in place of Send while an agent works; Escape in the text then emits `stop`."
|
|
3211
|
+
},
|
|
3212
|
+
{
|
|
3213
|
+
"name": "setHint",
|
|
3214
|
+
"signature": "setHint(text)",
|
|
3215
|
+
"returns": "this",
|
|
3216
|
+
"description": "Changes the quiet text in the bar beside Send — what Enter does now, or why sending waits. An empty text hides it."
|
|
3217
|
+
},
|
|
3218
|
+
{
|
|
3219
|
+
"name": "setNote",
|
|
3220
|
+
"signature": "setNote(text)",
|
|
3221
|
+
"returns": "this",
|
|
3222
|
+
"description": "Changes the line under the composer, which also describes the text box. An empty text hides it."
|
|
3223
|
+
},
|
|
3224
|
+
{
|
|
3225
|
+
"name": "setDisabled",
|
|
3226
|
+
"signature": "setDisabled(disabled)",
|
|
3227
|
+
"returns": "this",
|
|
3228
|
+
"description": "Turns input on or off."
|
|
3229
|
+
},
|
|
3230
|
+
{
|
|
3231
|
+
"name": "update",
|
|
3232
|
+
"signature": "update([partial])",
|
|
3233
|
+
"returns": "this",
|
|
3234
|
+
"description": "Changes the composer in place: the text, its caret and selection, the focus, the attachments, the context chips and the draft all stay. This is how a placeholder follows the model picked beside the composer. Keys left out (or `undefined`) are kept; other keys are ignored. Emits nothing."
|
|
3235
|
+
},
|
|
3236
|
+
{
|
|
3237
|
+
"name": "setTools",
|
|
3238
|
+
"signature": "setTools(tools)",
|
|
3239
|
+
"returns": "this",
|
|
3240
|
+
"description": "Replaces the bar's extra tools. A tool that held the focus keeps it when a tool with the same id is still there (and enabled); otherwise the focus moves to the text. Emits nothing."
|
|
3241
|
+
},
|
|
3242
|
+
{
|
|
3243
|
+
"name": "setToolPressed",
|
|
3244
|
+
"signature": "setToolPressed(id, pressed)",
|
|
3245
|
+
"returns": "this",
|
|
3246
|
+
"description": "Presses or releases a tool, which makes it a toggle if it was a plain button. Emits nothing."
|
|
3247
|
+
},
|
|
3248
|
+
{
|
|
3249
|
+
"name": "addFiles",
|
|
3250
|
+
"signature": "addFiles(files)",
|
|
3251
|
+
"returns": "this",
|
|
3252
|
+
"description": "Attaches files, as far as `accept` and `maxFiles` allow. Emits `attach` with the files taken."
|
|
3253
|
+
},
|
|
3254
|
+
{
|
|
3255
|
+
"name": "addContext",
|
|
3256
|
+
"signature": "addContext(chip)",
|
|
3257
|
+
"returns": "this",
|
|
3258
|
+
"description": "Adds a context chip, or replaces the chip with the same id. Emits nothing."
|
|
3259
|
+
},
|
|
3260
|
+
{
|
|
3261
|
+
"name": "removeContext",
|
|
3262
|
+
"signature": "removeContext(id)",
|
|
2462
3263
|
"returns": "this",
|
|
2463
|
-
"description": "
|
|
3264
|
+
"description": "Removes a context chip. Emits nothing."
|
|
3265
|
+
},
|
|
3266
|
+
{
|
|
3267
|
+
"name": "destroy",
|
|
3268
|
+
"signature": "destroy()",
|
|
3269
|
+
"returns": "void",
|
|
3270
|
+
"description": "Removes what the composer drew and the launcher it opened, and stops listening."
|
|
2464
3271
|
}
|
|
2465
3272
|
]
|
|
2466
3273
|
},
|
|
@@ -8587,6 +9394,299 @@
|
|
|
8587
9394
|
}
|
|
8588
9395
|
]
|
|
8589
9396
|
},
|
|
9397
|
+
"RenderBlocks": {
|
|
9398
|
+
"options": [
|
|
9399
|
+
{
|
|
9400
|
+
"name": "headingLevel",
|
|
9401
|
+
"type": "2|3|4|5",
|
|
9402
|
+
"default": "3",
|
|
9403
|
+
"description": "Element level of a level-2 `heading` block."
|
|
9404
|
+
},
|
|
9405
|
+
{
|
|
9406
|
+
"name": "msg",
|
|
9407
|
+
"type": "(key: string, ...args: unknown[]) => string",
|
|
9408
|
+
"default": null,
|
|
9409
|
+
"description": "Message lookup for the few words the blocks add (code copy, artifact kinds)."
|
|
9410
|
+
}
|
|
9411
|
+
],
|
|
9412
|
+
"events": [],
|
|
9413
|
+
"methods": []
|
|
9414
|
+
},
|
|
9415
|
+
"RunStatus": {
|
|
9416
|
+
"options": [
|
|
9417
|
+
{
|
|
9418
|
+
"name": "state",
|
|
9419
|
+
"type": "RunState",
|
|
9420
|
+
"default": "'queued'",
|
|
9421
|
+
"description": "Where the run stands. Also the root's `data-state`. A `blocked` run is not over: it shows since when it is blocked, never a finished time."
|
|
9422
|
+
},
|
|
9423
|
+
{
|
|
9424
|
+
"name": "summary",
|
|
9425
|
+
"type": "string",
|
|
9426
|
+
"default": "''",
|
|
9427
|
+
"description": "One sentence on what is happening: \"Step 3 of 6 needs your approval.\" Text only."
|
|
9428
|
+
},
|
|
9429
|
+
{
|
|
9430
|
+
"name": "steps",
|
|
9431
|
+
"type": "RunSteps|null",
|
|
9432
|
+
"default": "null",
|
|
9433
|
+
"description": "Steps done out of the total, drawn as a progressbar."
|
|
9434
|
+
},
|
|
9435
|
+
{
|
|
9436
|
+
"name": "started",
|
|
9437
|
+
"type": "RunTime|null",
|
|
9438
|
+
"default": "null",
|
|
9439
|
+
"description": "When the run started."
|
|
9440
|
+
},
|
|
9441
|
+
{
|
|
9442
|
+
"name": "finished",
|
|
9443
|
+
"type": "RunTime|null",
|
|
9444
|
+
"default": "null",
|
|
9445
|
+
"description": "When it finished, failed, or was stopped. Shown once the run is over."
|
|
9446
|
+
},
|
|
9447
|
+
{
|
|
9448
|
+
"name": "workMs",
|
|
9449
|
+
"type": "number|null",
|
|
9450
|
+
"default": "null",
|
|
9451
|
+
"description": "How long the agent has worked, in milliseconds. Waiting for a person is not work. The row shows only when this is a number."
|
|
9452
|
+
},
|
|
9453
|
+
{
|
|
9454
|
+
"name": "waitingSince",
|
|
9455
|
+
"type": "RunTime|null",
|
|
9456
|
+
"default": "null",
|
|
9457
|
+
"description": "Since when the run has waited for a person, or been blocked. Shown as \"Waiting since\" while the state is `waiting` and \"Blocked since\" while it is `blocked`."
|
|
9458
|
+
},
|
|
9459
|
+
{
|
|
9460
|
+
"name": "tokens",
|
|
9461
|
+
"type": "RunTokens|null",
|
|
9462
|
+
"default": "null",
|
|
9463
|
+
"description": "Input and output tokens as `[in, out]`, or the total as one number."
|
|
9464
|
+
},
|
|
9465
|
+
{
|
|
9466
|
+
"name": "tokenBudget",
|
|
9467
|
+
"type": "number|null",
|
|
9468
|
+
"default": "null",
|
|
9469
|
+
"description": "The most tokens the run may use. With a budget the tokens are a meter, read in compact figures (\"22.8K of 60K tokens\"), that turns to the warning tone from 80% and to the danger tone at 100%. Without one they stay text."
|
|
9470
|
+
},
|
|
9471
|
+
{
|
|
9472
|
+
"name": "cost",
|
|
9473
|
+
"type": "RunCost|null",
|
|
9474
|
+
"default": "null",
|
|
9475
|
+
"description": "What the run has cost, against its budget."
|
|
9476
|
+
},
|
|
9477
|
+
{
|
|
9478
|
+
"name": "model",
|
|
9479
|
+
"type": "string|null",
|
|
9480
|
+
"default": "null",
|
|
9481
|
+
"description": "The model the agent runs on."
|
|
9482
|
+
},
|
|
9483
|
+
{
|
|
9484
|
+
"name": "actions",
|
|
9485
|
+
"type": "RunStatusAction[]",
|
|
9486
|
+
"default": "[]",
|
|
9487
|
+
"description": "Buttons under the summary."
|
|
9488
|
+
},
|
|
9489
|
+
{
|
|
9490
|
+
"name": "ticking",
|
|
9491
|
+
"type": "boolean",
|
|
9492
|
+
"default": "true",
|
|
9493
|
+
"description": "While the state is `running`, the working time counts on once a second from `workMs` and the moment of the last `update()`. One interval, which sleeps while the page is hidden."
|
|
9494
|
+
},
|
|
9495
|
+
{
|
|
9496
|
+
"name": "compact",
|
|
9497
|
+
"type": "boolean|'icon'",
|
|
9498
|
+
"default": "false",
|
|
9499
|
+
"description": "Draws only the state: `true` as a pill of glyph and word for a narrow header, `'icon'` as the glyph alone, its word visually hidden but still the accessible text, and shown as the pill's tooltip."
|
|
9500
|
+
},
|
|
9501
|
+
{
|
|
9502
|
+
"name": "now",
|
|
9503
|
+
"type": "(() => Date)|null",
|
|
9504
|
+
"default": "null",
|
|
9505
|
+
"description": "The clock: what decides whether a time is today (a time on another day shows its date too) and what the working time counts against while `ticking`. Null is real time. Fixed at construction."
|
|
9506
|
+
},
|
|
9507
|
+
{
|
|
9508
|
+
"name": "locale",
|
|
9509
|
+
"type": "string",
|
|
9510
|
+
"default": null,
|
|
9511
|
+
"description": "BCP 47 tag for numbers and amounts; defaults to the active language."
|
|
9512
|
+
},
|
|
9513
|
+
{
|
|
9514
|
+
"name": "msg",
|
|
9515
|
+
"type": "Record<string, string>|Record<string, Record<string, string>>",
|
|
9516
|
+
"default": null,
|
|
9517
|
+
"description": "Localized messages: the state words (`agent.status.*`) and the `runStatus.*` labels."
|
|
9518
|
+
}
|
|
9519
|
+
],
|
|
9520
|
+
"events": [
|
|
9521
|
+
{
|
|
9522
|
+
"name": "action",
|
|
9523
|
+
"payload": "{index: number, action: RunStatusAction}",
|
|
9524
|
+
"description": "Action listener."
|
|
9525
|
+
}
|
|
9526
|
+
],
|
|
9527
|
+
"methods": [
|
|
9528
|
+
{
|
|
9529
|
+
"name": "update",
|
|
9530
|
+
"signature": "update(values)",
|
|
9531
|
+
"returns": "this",
|
|
9532
|
+
"description": "Merges new values and redraws. The working time carries on from where it stood unless the update brings a new `workMs`. Focus inside the panel stays where it was: an action row that did not change is kept as it is, and otherwise focus moves to the action at the same index (or the nearest one left), or to the panel itself when no action is left."
|
|
9533
|
+
},
|
|
9534
|
+
{
|
|
9535
|
+
"name": "destroy",
|
|
9536
|
+
"signature": "destroy()",
|
|
9537
|
+
"returns": "void",
|
|
9538
|
+
"description": "Stops the clock, removes what the component drew, and restores an enhanced target."
|
|
9539
|
+
}
|
|
9540
|
+
]
|
|
9541
|
+
},
|
|
9542
|
+
"RunTrace": {
|
|
9543
|
+
"options": [
|
|
9544
|
+
{
|
|
9545
|
+
"name": "steps",
|
|
9546
|
+
"type": "TraceStep[]",
|
|
9547
|
+
"default": "[]",
|
|
9548
|
+
"description": "The steps the run took, in the order they started. A step with `retryOf` is drawn under the step it repeats. Model text is data: every string reaches the page as text."
|
|
9549
|
+
},
|
|
9550
|
+
{
|
|
9551
|
+
"name": "open",
|
|
9552
|
+
"type": "boolean",
|
|
9553
|
+
"default": "false",
|
|
9554
|
+
"description": "Whether the step list starts open under its summary."
|
|
9555
|
+
},
|
|
9556
|
+
{
|
|
9557
|
+
"name": "label",
|
|
9558
|
+
"type": "string|null",
|
|
9559
|
+
"default": "null",
|
|
9560
|
+
"description": "Text the summary reads instead of the computed \"Worked for …\" line — a plan's title, \"Plan · 5 of 6 done\". Any state but done still follows it as a word (\"· Running\"). `setLabel()` changes it."
|
|
9561
|
+
},
|
|
9562
|
+
{
|
|
9563
|
+
"name": "authors",
|
|
9564
|
+
"type": "Record<string, Author>",
|
|
9565
|
+
"default": "{}",
|
|
9566
|
+
"description": "Who the `actor` and `to` keys of the steps name; a hand-off draws both authors' avatars, round for a `person` and rounded squares otherwise. A key with no entry is shown as written."
|
|
9567
|
+
},
|
|
9568
|
+
{
|
|
9569
|
+
"name": "showArguments",
|
|
9570
|
+
"type": "boolean",
|
|
9571
|
+
"default": "true",
|
|
9572
|
+
"description": "Whether a step's disclosure shows the arguments its call was made with."
|
|
9573
|
+
},
|
|
9574
|
+
{
|
|
9575
|
+
"name": "maxResult",
|
|
9576
|
+
"type": "number",
|
|
9577
|
+
"default": "4000",
|
|
9578
|
+
"description": "Characters of a result shown before it is cut, with a \"Show all\" button for the rest. Zero or a non-finite value shows every result whole."
|
|
9579
|
+
},
|
|
9580
|
+
{
|
|
9581
|
+
"name": "summary",
|
|
9582
|
+
"type": "boolean",
|
|
9583
|
+
"default": "true",
|
|
9584
|
+
"description": "Whether the steps fold into a summary line. Without it the list always shows — for a run panel whose state is already told beside it."
|
|
9585
|
+
},
|
|
9586
|
+
{
|
|
9587
|
+
"name": "kindIcons",
|
|
9588
|
+
"type": "boolean|null",
|
|
9589
|
+
"default": "null",
|
|
9590
|
+
"description": "Whether each step leads with its kind's glyph. Without them a step shows only its status. `null` decides by the steps: a plan, where every step is a `task`, shows none; anything else shows them."
|
|
9591
|
+
},
|
|
9592
|
+
{
|
|
9593
|
+
"name": "selectable",
|
|
9594
|
+
"type": "boolean",
|
|
9595
|
+
"default": "false",
|
|
9596
|
+
"description": "Whether every step can be chosen: a row with nothing to open becomes a button, and a disclosure also reports the step as it opens. Both emit `select`."
|
|
9597
|
+
},
|
|
9598
|
+
{
|
|
9599
|
+
"name": "ticking",
|
|
9600
|
+
"type": "boolean",
|
|
9601
|
+
"default": "false",
|
|
9602
|
+
"description": "Whether a running step that has `at` shows how long it has run, counting once a second. One interval serves the whole trace; it runs only while such a step is on screen in the open list, and sleeps while the page is hidden."
|
|
9603
|
+
},
|
|
9604
|
+
{
|
|
9605
|
+
"name": "now",
|
|
9606
|
+
"type": "(() => Date)|null",
|
|
9607
|
+
"default": "null",
|
|
9608
|
+
"description": "The clock `ticking` counts against, for an application whose world is fixed on another date; real time when null."
|
|
9609
|
+
},
|
|
9610
|
+
{
|
|
9611
|
+
"name": "formatTime",
|
|
9612
|
+
"type": "((at: string) => string)|null",
|
|
9613
|
+
"default": "null",
|
|
9614
|
+
"description": "Writes a step's `at` for its meta line; \"10:31:05\" (the local ISO time as given) when null."
|
|
9615
|
+
},
|
|
9616
|
+
{
|
|
9617
|
+
"name": "icons",
|
|
9618
|
+
"type": "Partial<Record<TraceKind, string>>",
|
|
9619
|
+
"default": "{}",
|
|
9620
|
+
"description": "Icon names per step kind, over the built-in `STEP_ICONS`."
|
|
9621
|
+
},
|
|
9622
|
+
{
|
|
9623
|
+
"name": "msg",
|
|
9624
|
+
"type": "Record<string, string>|Record<string, Record<string, string>>",
|
|
9625
|
+
"default": null,
|
|
9626
|
+
"description": "Localized messages: the `runTrace.*` keys and the `agent.status.*` words."
|
|
9627
|
+
}
|
|
9628
|
+
],
|
|
9629
|
+
"events": [
|
|
9630
|
+
{
|
|
9631
|
+
"name": "toggle",
|
|
9632
|
+
"payload": "{id: string|null, open: boolean}",
|
|
9633
|
+
"description": "Disclosure listener."
|
|
9634
|
+
},
|
|
9635
|
+
{
|
|
9636
|
+
"name": "reveal",
|
|
9637
|
+
"payload": "{id: string}",
|
|
9638
|
+
"description": "Reveal listener."
|
|
9639
|
+
},
|
|
9640
|
+
{
|
|
9641
|
+
"name": "select",
|
|
9642
|
+
"payload": "{id: string}",
|
|
9643
|
+
"description": "Selection listener (`selectable` traces)."
|
|
9644
|
+
},
|
|
9645
|
+
{
|
|
9646
|
+
"name": "open",
|
|
9647
|
+
"payload": "{step: TraceStep, ref: ItemRef}",
|
|
9648
|
+
"description": "Listener for a step's links."
|
|
9649
|
+
}
|
|
9650
|
+
],
|
|
9651
|
+
"methods": [
|
|
9652
|
+
{
|
|
9653
|
+
"name": "setLabel",
|
|
9654
|
+
"signature": "setLabel(label)",
|
|
9655
|
+
"returns": "this",
|
|
9656
|
+
"description": "Sets the text the summary reads instead of the computed line; null or an empty string goes back to \"Worked for …\". Any state but done still follows it as a word."
|
|
9657
|
+
},
|
|
9658
|
+
{
|
|
9659
|
+
"name": "setSteps",
|
|
9660
|
+
"signature": "setSteps(steps)",
|
|
9661
|
+
"returns": "this",
|
|
9662
|
+
"description": "Replaces every step. Open steps stay open, and focus on a step's row stays on that step."
|
|
9663
|
+
},
|
|
9664
|
+
{
|
|
9665
|
+
"name": "upsert",
|
|
9666
|
+
"signature": "upsert(step)",
|
|
9667
|
+
"returns": "this",
|
|
9668
|
+
"description": "Adds a step, or replaces the step with the same `id`. A replaced step is redrawn on its own, keeping its place, its open state, and the retries under it; a new step is appended, under the step it repeats when it has `retryOf`."
|
|
9669
|
+
},
|
|
9670
|
+
{
|
|
9671
|
+
"name": "expand",
|
|
9672
|
+
"signature": "expand([id])",
|
|
9673
|
+
"returns": "this",
|
|
9674
|
+
"description": "Opens the step list, and the disclosure of the step `id` when one is given."
|
|
9675
|
+
},
|
|
9676
|
+
{
|
|
9677
|
+
"name": "collapse",
|
|
9678
|
+
"signature": "collapse([id])",
|
|
9679
|
+
"returns": "this",
|
|
9680
|
+
"description": "Closes the step list, or only the disclosure of the step `id` when one is given."
|
|
9681
|
+
},
|
|
9682
|
+
{
|
|
9683
|
+
"name": "reveal",
|
|
9684
|
+
"signature": "reveal(id)",
|
|
9685
|
+
"returns": "this",
|
|
9686
|
+
"description": "Shows one step: opens the list and the step, scrolls it into view, puts focus on its row, and marks it with `data-state=\"revealed\"` for two seconds. Under reduced motion the scroll jumps. An unknown id does nothing."
|
|
9687
|
+
}
|
|
9688
|
+
]
|
|
9689
|
+
},
|
|
8590
9690
|
"Search": {
|
|
8591
9691
|
"options": [
|
|
8592
9692
|
{
|
|
@@ -9564,6 +10664,67 @@
|
|
|
9564
10664
|
}
|
|
9565
10665
|
]
|
|
9566
10666
|
},
|
|
10667
|
+
"SourceList": {
|
|
10668
|
+
"options": [
|
|
10669
|
+
{
|
|
10670
|
+
"name": "sources",
|
|
10671
|
+
"type": "Source[]",
|
|
10672
|
+
"default": "[]",
|
|
10673
|
+
"description": "The sources, in the order an answer's `[n]` citations number them. Model text is data: every string reaches the page as text."
|
|
10674
|
+
},
|
|
10675
|
+
{
|
|
10676
|
+
"name": "label",
|
|
10677
|
+
"type": "string",
|
|
10678
|
+
"default": "'Sources'",
|
|
10679
|
+
"description": "The visible label the list is named by. Empty hides it and names the list with the `sourceList.label` message instead."
|
|
10680
|
+
},
|
|
10681
|
+
{
|
|
10682
|
+
"name": "layout",
|
|
10683
|
+
"type": "'chips'|'list'",
|
|
10684
|
+
"default": "'chips'",
|
|
10685
|
+
"description": "`'chips'` wraps short chips beside the label; `'list'` gives each source a full-width row with its title and site."
|
|
10686
|
+
},
|
|
10687
|
+
{
|
|
10688
|
+
"name": "numbered",
|
|
10689
|
+
"type": "boolean",
|
|
10690
|
+
"default": "true",
|
|
10691
|
+
"description": "Whether each source shows its number."
|
|
10692
|
+
},
|
|
10693
|
+
{
|
|
10694
|
+
"name": "icons",
|
|
10695
|
+
"type": "Partial<Record<SourceKind, string>>",
|
|
10696
|
+
"default": "{}",
|
|
10697
|
+
"description": "Icon names per source kind, over the built-in `SOURCE_ICONS`."
|
|
10698
|
+
},
|
|
10699
|
+
{
|
|
10700
|
+
"name": "msg",
|
|
10701
|
+
"type": "Record<string, string>|Record<string, Record<string, string>>",
|
|
10702
|
+
"default": null,
|
|
10703
|
+
"description": "Localized messages."
|
|
10704
|
+
}
|
|
10705
|
+
],
|
|
10706
|
+
"events": [
|
|
10707
|
+
{
|
|
10708
|
+
"name": "select",
|
|
10709
|
+
"payload": "{source: Source, n: number}",
|
|
10710
|
+
"description": "Activation listener; `preventDefault()` keeps a web source from opening."
|
|
10711
|
+
}
|
|
10712
|
+
],
|
|
10713
|
+
"methods": [
|
|
10714
|
+
{
|
|
10715
|
+
"name": "setSources",
|
|
10716
|
+
"signature": "setSources(sources)",
|
|
10717
|
+
"returns": "this",
|
|
10718
|
+
"description": "Replaces every source. Focus on a source stays on the source with the same `id`."
|
|
10719
|
+
},
|
|
10720
|
+
{
|
|
10721
|
+
"name": "highlight",
|
|
10722
|
+
"signature": "highlight(n)",
|
|
10723
|
+
"returns": "this",
|
|
10724
|
+
"description": "Points at one source, as a citation `[n]` in the answer does: scrolls it into view, puts focus on it, and marks it with `data-state=\"highlighted\"` for two seconds. A number is the source's position, from 1; a string is its `id`. Anything else does nothing."
|
|
10725
|
+
}
|
|
10726
|
+
]
|
|
10727
|
+
},
|
|
9567
10728
|
"Spinner": {
|
|
9568
10729
|
"options": [
|
|
9569
10730
|
{
|