@design.estate/dees-catalog 24.0.2 → 24.2.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/dist_bundle/bundle.js +3782 -2669
- package/dist_bundle/bundle.js.map +1 -1
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{addon-fit-XY7VCF6W.js → addon-fit-RDDY6CA4.js} +2 -2
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{addon-search-OQXRIIMV.js → addon-search-UT4OBXLU.js} +2 -2
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{addon-serialize-BV6MHBIQ.js → addon-serialize-U4KTWHZ2.js} +2 -2
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{addon-web-links-IYKN5JS7.js → addon-web-links-QMZRXLUR.js} +2 -2
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-BTYTET7H.js → chunk-347GWLFZ.js} +3 -3
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-MV6OSXZD.js → chunk-AR2XNHGF.js} +2 -1
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-NFVJ3L3L.js → chunk-LFHMAQWF.js} +2 -2
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-4DJP4JAJ.js → chunk-OPVBP4HP.js} +3 -3
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-FUMEXHR4.js → chunk-SSD44HAU.js} +33 -3
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-FUMEXHR4.js.map → chunk-SSD44HAU.js.map} +1 -1
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-K2UNUD5D.js → chunk-YUJKYSDX.js} +19 -19
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{de-XE2K545Z.js → de-5P7JLMRS.js} +32 -3
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{de-XE2K545Z.js.map → de-5P7JLMRS.js.map} +1 -1
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-modal-IIOB2SYP.js → dees-modal-PC4PYTOT.js} +4 -4
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-workspace-terminal-EEY5WEF4.js → dees-workspace-terminal-GFHNW2QR.js} +5 -5
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dist-2OQWGHFH.js → dist-2U2U7ROC.js} +3 -3
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dist-CRWOBKHW.js → dist-4S4PAFPC.js} +3 -3
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dist-J3O6DO5O.js → dist-5P27Y36A.js} +3 -3
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dist-IIHC67RE.js → dist-6GIZONLS.js} +3 -3
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dist-ERBPCUJB.js → dist-CRHDJ3CC.js} +4 -4
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dist-3OMAY2ID.js → dist-OASEKGFQ.js} +3 -3
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dist-FJCH275Q.js → dist-UJJOGV5H.js} +4 -4
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{echarts-Z2APN5DY.js → echarts-QMOTMVTN.js} +2 -2
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{highlightjs-2VS4UD5C.js → highlightjs-CH6EL3U4.js} +2 -2
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{lightweight-charts.production-BYPU2BNH.js → lightweight-charts.production-VKUEJKDY.js} +2 -2
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{xterm-44R3YQOT.js → xterm-KAKUMKDA.js} +2 -2
- package/dist_ts_web/00_commitinfo_data.js +1 -1
- package/dist_ts_web/elements/00group-dataview/dees-table/dees-table.d.ts +12 -2
- package/dist_ts_web/elements/00group-dataview/dees-table/dees-table.demo.js +18 -1
- package/dist_ts_web/elements/00group-dataview/dees-table/dees-table.js +54 -10
- package/dist_ts_web/elements/00group-dataview/dees-table/styles.js +8 -1
- package/dist_ts_web/elements/00group-dataview/dees-table/types.d.ts +8 -0
- package/dist_ts_web/elements/00group-harness/dees-harness-chat/dees-harness-chat.d.ts +7 -1
- package/dist_ts_web/elements/00group-harness/dees-harness-chat/dees-harness-chat.js +17 -2
- package/dist_ts_web/elements/00group-harness/dees-harness-elicitation-card/dees-harness-elicitation-card.d.ts +79 -0
- package/dist_ts_web/elements/00group-harness/dees-harness-elicitation-card/dees-harness-elicitation-card.demo.d.ts +1 -0
- package/dist_ts_web/elements/00group-harness/dees-harness-elicitation-card/dees-harness-elicitation-card.demo.js +87 -0
- package/dist_ts_web/elements/00group-harness/dees-harness-elicitation-card/dees-harness-elicitation-card.js +995 -0
- package/dist_ts_web/elements/00group-harness/dees-harness-elicitation-card/index.d.ts +1 -0
- package/dist_ts_web/elements/00group-harness/dees-harness-elicitation-card/index.js +2 -0
- package/dist_ts_web/elements/00group-harness/dees-harness-message-list/dees-harness-message-list.d.ts +14 -1
- package/dist_ts_web/elements/00group-harness/dees-harness-message-list/dees-harness-message-list.js +60 -5
- package/dist_ts_web/elements/00group-harness/dees-harness-session-list/dees-harness-session-list.d.ts +9 -1
- package/dist_ts_web/elements/00group-harness/dees-harness-session-list/dees-harness-session-list.demo.js +25 -3
- package/dist_ts_web/elements/00group-harness/dees-harness-session-list/dees-harness-session-list.js +57 -5
- package/dist_ts_web/elements/00group-harness/index.d.ts +1 -0
- package/dist_ts_web/elements/00group-harness/index.js +2 -1
- package/dist_ts_web/elements/00group-harness/interfaces.d.ts +141 -0
- package/dist_ts_web/i18n/de.d.ts +116 -0
- package/dist_ts_web/i18n/de.js +30 -1
- package/dist_ts_web/i18n/messages.d.ts +116 -0
- package/dist_ts_web/i18n/messages.js +31 -1
- package/package.json +2 -2
- package/readme.md +46 -5
- package/ts_web/00_commitinfo_data.ts +1 -1
- package/ts_web/elements/00group-dataview/dees-table/dees-table.demo.ts +20 -0
- package/ts_web/elements/00group-dataview/dees-table/dees-table.ts +50 -9
- package/ts_web/elements/00group-dataview/dees-table/styles.ts +7 -0
- package/ts_web/elements/00group-dataview/dees-table/types.ts +8 -0
- package/ts_web/elements/00group-harness/dees-harness-chat/dees-harness-chat.ts +11 -0
- package/ts_web/elements/00group-harness/dees-harness-elicitation-card/dees-harness-elicitation-card.demo.ts +100 -0
- package/ts_web/elements/00group-harness/dees-harness-elicitation-card/dees-harness-elicitation-card.ts +997 -0
- package/ts_web/elements/00group-harness/dees-harness-elicitation-card/index.ts +1 -0
- package/ts_web/elements/00group-harness/dees-harness-message-list/dees-harness-message-list.ts +62 -2
- package/ts_web/elements/00group-harness/dees-harness-session-list/dees-harness-session-list.demo.ts +24 -2
- package/ts_web/elements/00group-harness/dees-harness-session-list/dees-harness-session-list.ts +57 -4
- package/ts_web/elements/00group-harness/index.ts +1 -0
- package/ts_web/elements/00group-harness/interfaces.ts +172 -0
- package/ts_web/i18n/de.ts +29 -0
- package/ts_web/i18n/messages.ts +30 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{addon-fit-XY7VCF6W.js.map → addon-fit-RDDY6CA4.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{addon-search-OQXRIIMV.js.map → addon-search-UT4OBXLU.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{addon-serialize-BV6MHBIQ.js.map → addon-serialize-U4KTWHZ2.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{addon-web-links-IYKN5JS7.js.map → addon-web-links-QMZRXLUR.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-BTYTET7H.js.map → chunk-347GWLFZ.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-MV6OSXZD.js.map → chunk-AR2XNHGF.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-NFVJ3L3L.js.map → chunk-LFHMAQWF.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-4DJP4JAJ.js.map → chunk-OPVBP4HP.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-K2UNUD5D.js.map → chunk-YUJKYSDX.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-modal-IIOB2SYP.js.map → dees-modal-PC4PYTOT.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-workspace-terminal-EEY5WEF4.js.map → dees-workspace-terminal-GFHNW2QR.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dist-2OQWGHFH.js.map → dist-2U2U7ROC.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dist-CRWOBKHW.js.map → dist-4S4PAFPC.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dist-J3O6DO5O.js.map → dist-5P27Y36A.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dist-IIHC67RE.js.map → dist-6GIZONLS.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dist-3OMAY2ID.js.map → dist-CRHDJ3CC.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dist-ERBPCUJB.js.map → dist-OASEKGFQ.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dist-FJCH275Q.js.map → dist-UJJOGV5H.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{echarts-Z2APN5DY.js.map → echarts-QMOTMVTN.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{highlightjs-2VS4UD5C.js.map → highlightjs-CH6EL3U4.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{lightweight-charts.production-BYPU2BNH.js.map → lightweight-charts.production-VKUEJKDY.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{xterm-44R3YQOT.js.map → xterm-KAKUMKDA.js.map} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@design.estate/dees-catalog",
|
|
3
|
-
"version": "24.0
|
|
3
|
+
"version": "24.2.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript.",
|
|
6
6
|
"main": "dist_ts_web/index.js",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"@design.estate/wcctools": "^7.1.4",
|
|
66
66
|
"@git.zone/tsrepo": "^1.1.1",
|
|
67
67
|
"@push.rocks/projectinfo": "^5.1.0",
|
|
68
|
-
"@types/node": "26.6.
|
|
68
|
+
"@types/node": "26.6.6",
|
|
69
69
|
"@types/qrcode": "^1.5.6"
|
|
70
70
|
},
|
|
71
71
|
"files": [
|
package/readme.md
CHANGED
|
@@ -409,6 +409,7 @@ task guide and examples deliberately; the generated table does not replace them.
|
|
|
409
409
|
| `dees-harness-composer` | harness | [DeesHarnessComposer](#deesharnesscomposer) | [Source](ts_web/elements/00group-harness/dees-harness-composer/dees-harness-composer.ts) |
|
|
410
410
|
| `dees-harness-content-blocks` | harness | [DeesHarnessContentBlocks](#deesharnesscontentblocks) | [Source](ts_web/elements/00group-harness/dees-harness-content-blocks/dees-harness-content-blocks.ts) |
|
|
411
411
|
| `dees-harness-conversation-picker` | harness | [DeesHarnessConversationPicker](#deesharnessconversationpicker) | [Source](ts_web/elements/00group-harness/dees-harness-conversation-picker/dees-harness-conversation-picker.ts) |
|
|
412
|
+
| `dees-harness-elicitation-card` | harness | [DeesHarnessElicitationCard](#deesharnesselicitationcard) | [Source](ts_web/elements/00group-harness/dees-harness-elicitation-card/dees-harness-elicitation-card.ts) |
|
|
412
413
|
| `dees-harness-message` | harness | [DeesHarnessMessage](#deesharnessmessage) | [Source](ts_web/elements/00group-harness/dees-harness-message/dees-harness-message.ts) |
|
|
413
414
|
| `dees-harness-message-list` | harness | [DeesHarnessMessageList](#deesharnessmessagelist) | [Source](ts_web/elements/00group-harness/dees-harness-message-list/dees-harness-message-list.ts) |
|
|
414
415
|
| `dees-harness-overflow-text` | harness | [DeesHarnessOverflowText](#deesharnessoverflowtext) | [Source](ts_web/elements/00group-harness/dees-harness-overflow-text.ts) |
|
|
@@ -3757,6 +3758,7 @@ html`<dees-table
|
|
|
3757
3758
|
- The search field is readable and writable from outside in every mode: `searchQuery` reports what it shows, `setSearchQuery(text, { emit })` writes it, and `clearSearch({ emit })` empties it. A written query runs the search exactly as a typed one does once its debounce elapses — `searchRequest` in server mode, `filterChange` otherwise — and drops a keystroke still waiting out that debounce. Pass `{ emit: false }` to write the field alone, for a host that answers the query itself — a `server` mode table restoring a query it has already run. In `table` and `data` mode the table filters the rows from `filterText`, so a withheld query shows in the field while the rows still answer the previous one until something else runs the search, a mode change included. Column filters are a separate control and stay untouched. `focusSearch()` awaits the table's own render, puts the caret in the field and answers whether there is one. `inputSearchQuery(text, { composing })` takes a query as a field delivers it while the reader types: it writes the field and runs the search once 200 ms pass without another keystroke, and waits for an IME composition to end. After the table's first render, the bubbling `searchChange` event (`ITableSearchChangeDetail`: `{ query, mode }`) follows every change of the query or of `searchMode`, from typing, code or the filter bubble alike. [`dees-table-search`](#deestablesearch) puts the same field outside the table.
|
|
3758
3759
|
- Native header buttons sort and expose `aria-sort`. Shift-click builds a multi-column sort; the header context menu controls sort priority. `sortBy` and `sortChange` expose the descriptors.
|
|
3759
3760
|
- A value shown beneath another column's cell sorts from that column's header. Give it a hidden column whose `sortUnder` names the column it shows under — `{ key: 'source', header: 'Source', hidden: true, sortUnder: 'period' }`, with the source rendered beneath each period — and the named column's header menu offers "Sort by Source", ascending or descending, and "Remove from sort" once it sorts. Both columns must be sortable. It sorts alone, like the menu's other single sorts: a cascade of more than one column is replaced only after the reader confirms. While it sorts, the header shows its name after its own, then its arrow and, in a cascade, its place; `aria-sort` follows it while it leads. The name takes the room the header has and gives way to an ellipsis, so it never widens the column. A click on the header still sorts by the column's own value, and `sortBy` and `sortChange` name the hidden column by its key, as any other.
|
|
3761
|
+
- A long text or a row of chips wraps with `wrap` on its column — `{ key: 'summary', header: 'Summary', wrap: true }`. The table then fits its container instead of asking for every column's one-line width: the other columns keep their line, the wrapping column takes the room they leave and wraps within it, and the rows grow. When the container changes its width, the rows wrap anew. A wrapping column stays at least 20ch wide; only when that does not fit does the table scroll sideways. It holds under `virtualized` as well: a wider value in a later window takes its room from the wrapping column.
|
|
3760
3762
|
- `selectionMode` accepts `none`, `single`, or `multi`. Use a stable `rowKey` to retain selection and editing through fresh data arrays. `showSelectionCheckbox` includes select-all for visible rows.
|
|
3761
3763
|
- Header, footer and empty-state actions are bar actions: one renderer draws them and [`dees-tile`'s actions](#deestile), so a table's actions and a tile's look and behave alike, and actions that do not fit beside the heading or the count wrap onto further lines at the end. [Where actions go](#where-actions-go) says which to use.
|
|
3762
3764
|
- `info` puts a standing explanation of the list behind an info button (ⓘ, "About this list") at the end of the footer, after the footer actions, opened in the speech bubble; see [the tile's footer info](#deestile), which works the same way.
|
|
@@ -6336,7 +6338,7 @@ chat.refreshMessages();
|
|
|
6336
6338
|
chat.refreshMessages([]);
|
|
6337
6339
|
```
|
|
6338
6340
|
|
|
6339
|
-
Key props: `messages`, `permissions`, `questions`, `status`, `transcriptKey`, `hasEarlierMessages`/`loadingEarlier`, `usage`, `todos`/`todosAuthoritative`/`showTodosPanel`, `sessionMetrics`, `scratchpad`/`scratchpadBusy`/`scratchpadError`, `attachedResources`, `workers`/`selectedWorkerId`/`workersHeading`/`workerQuestionCounts`, `sessionIntelligenceEnabled`/`intelligenceExchanges`/`intelligenceBusy`/`intelligenceError`/`intelligenceAvailabilityStatus`/`intelligenceUnavailableReason`/`intelligenceAvailabilityAction`/`intelligenceHeading`, `showSessionSidebar`, `heading`, `subheading`, `toolbarActions`, `showToolbar`, `busy`, `busyDeliveryModes`, `queuedCount`, `disabled`, `inputLocked`, `abortEnabled`, `abortDisabledReason`, `commands`, `starterPrompts`, `account`/`accountOptions`/`accountNote`, `model`/`modelOptions`, `reasoningEffort`/`effortOptions`, `mode`/`modeOptions`, `menuActions`, `setupItems`, `composerPlacement`, `emptyTitle`/`emptyText`, `groupWork`, `markdownWhileStreaming`, `toolRegistry`, `showRoles`, `showTimestamps`, `sessionDetailsOpen`, `sessionDetailsWidth`. `toolbarActions` accepts `IHarnessChatToolbarAction[]`; each action has `id`, human-readable `label`, `iconName`, `action`, and optional `tooltip`/`disabled`, and renders immediately before the session-details toggle. `disabled: true` makes only that toolbar action inert and prevents its callback without changing the chat-level `disabled` state. `markdownWhileStreaming` defaults to `true`; setting it to `false` keeps active outer and nested subtask markdown as plain text, then performs the final markdown parse when `message-end` arrives. `commands` is forwarded unchanged to the controlled composer. `starterPrompts` (`IHarnessStarterPrompt[]`, each `{ label, prompt? }`) shows as buttons under the empty transcript's text while the composer accepts input; choosing one puts its `prompt` (else its `label`) into the composer, focused and unsent, and emits `harness-input` as typing would. Account options use human-readable `label` values and opaque stable `value` identifiers. The status line renders inside the transcript column (it never pushes between the session panel and the composer), and both the toolbar and the docked composer cast a subtle shadow over the scrolling messages.
|
|
6341
|
+
Key props: `messages`, `permissions`, `questions`, `elicitations`, `status`, `transcriptKey`, `hasEarlierMessages`/`loadingEarlier`, `usage`, `todos`/`todosAuthoritative`/`showTodosPanel`, `sessionMetrics`, `scratchpad`/`scratchpadBusy`/`scratchpadError`, `attachedResources`, `workers`/`selectedWorkerId`/`workersHeading`/`workerQuestionCounts`, `sessionIntelligenceEnabled`/`intelligenceExchanges`/`intelligenceBusy`/`intelligenceError`/`intelligenceAvailabilityStatus`/`intelligenceUnavailableReason`/`intelligenceAvailabilityAction`/`intelligenceHeading`, `showSessionSidebar`, `heading`, `subheading`, `toolbarActions`, `showToolbar`, `busy`, `busyDeliveryModes`, `queuedCount`, `disabled`, `inputLocked`, `abortEnabled`, `abortDisabledReason`, `commands`, `starterPrompts`, `account`/`accountOptions`/`accountNote`, `model`/`modelOptions`, `reasoningEffort`/`effortOptions`, `mode`/`modeOptions`, `menuActions`, `setupItems`, `composerPlacement`, `emptyTitle`/`emptyText`, `groupWork`, `markdownWhileStreaming`, `toolRegistry`, `showRoles`, `showTimestamps`, `sessionDetailsOpen`, `sessionDetailsWidth`. `toolbarActions` accepts `IHarnessChatToolbarAction[]`; each action has `id`, human-readable `label`, `iconName`, `action`, and optional `tooltip`/`disabled`, and renders immediately before the session-details toggle. `disabled: true` makes only that toolbar action inert and prevents its callback without changing the chat-level `disabled` state. `markdownWhileStreaming` defaults to `true`; setting it to `false` keeps active outer and nested subtask markdown as plain text, then performs the final markdown parse when `message-end` arrives. `commands` is forwarded unchanged to the controlled composer. `starterPrompts` (`IHarnessStarterPrompt[]`, each `{ label, prompt? }`) shows as buttons under the empty transcript's text while the composer accepts input; choosing one puts its `prompt` (else its `label`) into the composer, focused and unsent, and emits `harness-input` as typing would. Account options use human-readable `label` values and opaque stable `value` identifiers. The status line renders inside the transcript column (it never pushes between the session panel and the composer), and both the toolbar and the docked composer cast a subtle shadow over the scrolling messages.
|
|
6340
6342
|
|
|
6341
6343
|
`showRoles` defaults to `false` on the chat: the bubble's side says who speaks, and each message keeps its role as visually hidden text for screen readers; set it to show the "User"/"Assistant" label over every message. `showTimestamps` (default `true`) keeps each message's and tool row's clock time. `sessionDetailsOpen` (reflected, default `true`) is whether the session details panel shows beside the transcript in a wide chat; the reader's toggle sets it and emits `harness-session-details-toggle` (`IHarnessSessionDetailsToggleDetail`, `{ open }`, bubbling and composed), so a host can remember the choice and set it back, and setting it emits nothing. A narrow chat keeps the panel as a drawer the reader opens over the transcript, whatever it says. The earlier private `desktopSessionSidebarVisible` still works as a deprecated alias. In a wide chat the panel slides in and out (its content keeps its width while the outer width travels; at once under reduced motion), and its edge is a `dees-resize-handle`: `sessionDetailsWidth` (reflected, default 260) is its width, drawn within 220 px and as much as leaves the conversation 360 px (560 px at most); the reader's settled size sets it and emits `harness-session-details-resize` (`IHarnessSessionDetailsResizeDetail`, `{ width }`), and setting it emits nothing.
|
|
6342
6344
|
|
|
@@ -6344,7 +6346,7 @@ Light-DOM content assigned to `slot="composer-status"` renders between the trans
|
|
|
6344
6346
|
|
|
6345
6347
|
After mutating canonical message objects in place, call `refreshMessages(ids?)`. Pass IDs for targeted content corrections, omit them after structural mutations, and pass an empty array for a no-op. `DeesHarnessChat.refreshMessages(ids?)` uses the list semantics and, except for `[]`, also recomputes transcript-derived sidebar state. The list and individual message components expose the corresponding `refreshMessages(ids?)` and `refreshMessage()` methods.
|
|
6346
6348
|
|
|
6347
|
-
A **session side panel** shows Tasks, Workers, Tools & Subagents, Tokens, Session Scratchpad, Attached Resources, and Session Intelligence next to the transcript. Its sections form a single-open accordion: opening one collapses the others, clicking the open heading collapses all, and each expanded section owns its scrolling while every heading remains visible. Collapsed sections retain their region wrapper but omit the content subtree until expansion; sidebar-owned scratchpad and intelligence drafts survive that lazy remount. Tools & Subagents separates active calls from terminal history and derives both directly from top-level tool messages still present in the host's retained transcript window; evicted calls are not cached. Ordinary tool activity rows open `DeesHarnessToolFullscreen` over the canonical call and follow in-place updates through `refreshMessages()`; subagent rows first emit `harness-subtask-open`. The inspector closes when the call is evicted, the session changes, or the sidebar disconnects, then restores the row's focus. An unhandled subagent request opens the same fullscreen inspector. Long activity labels use an ellipsis while descriptions use the 40px right-edge fade and reveal behavior. Session Intelligence keeps its exchange history scrollable above a docked, chat-style question composer. Set `.todos` explicitly, or leave it empty and the chat derives tasks from the newest todo tool call in `messages`; `showTodosPanel={false}` hides only that section. Unknown token metrics remain absent. The toolbar controls the session panel; host-owned navigation controls belong outside the chat component. In narrow containers the session panel becomes an accessible overlay; when the toolbar is disabled, an inline Session details control keeps it reachable. `showSessionSidebar={false}` disables the complete panel. Methods: `applyDelta()`, `refreshMessages(ids?)`, `focusComposer()`, `clearComposer()`, `scrollToBottom()`, `openSessionSidebar(section?)`, `openModelSelector()`, `openAttachmentPicker()`, `focusPendingPermission()`, `showQuestionPersonResults(questionId, results)`, and `rejectQuestionResponse(questionId, rejection?)`. Section names use the exported `THarnessSessionSidebarSection` union. Capability launchers return false when their target is unavailable or locked, so command palettes can remain outside the shadow DOM. Events (also from children, all composed): `harness-send`, `harness-command`, `harness-starter-prompt`, `harness-abort`, `harness-held-resend`, `harness-held-discard`, `harness-input`, `harness-attachments-change`, `harness-attachment-error`, `harness-account-change`, `harness-model-change`, `harness-mode-change`, `harness-permission-response`, `harness-permission-link`, `harness-question-response`, `harness-question-link`, `harness-subtask-open`, `harness-scratchpad-input`, `harness-scratchpad-save`, `harness-attached-resource-open`, `harness-worker-open`, `harness-session-intelligence-ask`, `harness-session-intelligence-availability-action`. When a call settles into History, the History heading hands over rather than sliding through the rows: it fades out where it stood, the rows travel while it is gone, and it fades back in at its new place (nothing moves under reduced motion).
|
|
6349
|
+
A **session side panel** shows Tasks, Workers, Tools & Subagents, Tokens, Session Scratchpad, Attached Resources, and Session Intelligence next to the transcript. Its sections form a single-open accordion: opening one collapses the others, clicking the open heading collapses all, and each expanded section owns its scrolling while every heading remains visible. Collapsed sections retain their region wrapper but omit the content subtree until expansion; sidebar-owned scratchpad and intelligence drafts survive that lazy remount. Tools & Subagents separates active calls from terminal history and derives both directly from top-level tool messages still present in the host's retained transcript window; evicted calls are not cached. Ordinary tool activity rows open `DeesHarnessToolFullscreen` over the canonical call and follow in-place updates through `refreshMessages()`; subagent rows first emit `harness-subtask-open`. The inspector closes when the call is evicted, the session changes, or the sidebar disconnects, then restores the row's focus. An unhandled subagent request opens the same fullscreen inspector. Long activity labels use an ellipsis while descriptions use the 40px right-edge fade and reveal behavior. Session Intelligence keeps its exchange history scrollable above a docked, chat-style question composer. Set `.todos` explicitly, or leave it empty and the chat derives tasks from the newest todo tool call in `messages`; `showTodosPanel={false}` hides only that section. Unknown token metrics remain absent. The toolbar controls the session panel; host-owned navigation controls belong outside the chat component. In narrow containers the session panel becomes an accessible overlay; when the toolbar is disabled, an inline Session details control keeps it reachable. `showSessionSidebar={false}` disables the complete panel. Methods: `applyDelta()`, `refreshMessages(ids?)`, `focusComposer()`, `clearComposer()`, `scrollToBottom()`, `openSessionSidebar(section?)`, `openModelSelector()`, `openAttachmentPicker()`, `focusPendingPermission()`, `showQuestionPersonResults(questionId, results)`, and `rejectQuestionResponse(questionId, rejection?)`. Section names use the exported `THarnessSessionSidebarSection` union. Capability launchers return false when their target is unavailable or locked, so command palettes can remain outside the shadow DOM. Events (also from children, all composed): `harness-send`, `harness-command`, `harness-starter-prompt`, `harness-abort`, `harness-held-resend`, `harness-held-discard`, `harness-input`, `harness-attachments-change`, `harness-attachment-error`, `harness-account-change`, `harness-model-change`, `harness-mode-change`, `harness-permission-response`, `harness-permission-link`, `harness-question-response`, `harness-question-link`, `harness-elicitation-response`, `harness-subtask-open`, `harness-scratchpad-input`, `harness-scratchpad-save`, `harness-attached-resource-open`, `harness-worker-open`, `harness-session-intelligence-ask`, `harness-session-intelligence-availability-action`. When a call settles into History, the History heading hands over rather than sliding through the rows: it fades out where it stood, the rows travel while it is gone, and it fades back in at its new place (nothing moves under reduced motion).
|
|
6348
6350
|
|
|
6349
6351
|
A new session can open on its composer: set `composerPlacement` (`THarnessChatComposerPlacement`) to `'centered'` and, while the transcript is empty (no messages, permission requests or questions, and no earlier messages), the composer stands in the middle of the conversation with the empty transcript's question right above it ("What should we work on?" and "Describe a task or ask a question.", or the host's `emptyTitle` and `emptyText`, which the chat forwards to its list) and the setup strip under it. When the first row arrives it glides down to the dock (at once under reduced motion); it is the same element throughout, so a draft, the focus and the prompt history stay. Only the host knows that a session is new, since an existing one whose history has not arrived yet looks empty too: set the placement on the same signal as `setupItems`, and set it back to `'docked'` (the default) once the session has started.
|
|
6350
6352
|
|
|
@@ -6356,7 +6358,7 @@ History paging adds the composed child event `harness-load-earlier`.
|
|
|
6356
6358
|
|
|
6357
6359
|
#### `DeesHarnessMessageList`
|
|
6358
6360
|
|
|
6359
|
-
Scrollable streaming-safe log. Up to 40 canonical entries (`messages` + `permissions` + `questions`) keep keyed full-timeline DOM; larger inputs activate a measured variable-height window with 800px overscan and return to full rendering when they shrink. Rows outside that overscanned window are unmounted, except focused rows, both endpoints of an active selection, and fullscreen-owned cards, which remain mounted until the interaction ends; threshold-mode changes are likewise deferred while protected DOM is active. `applyDelta()` targets a mounted message or mutates its offscreen backing model. Markdown output, disclosures, reasoning expansion, question drafts, permission choices, diff layout, terminal scroll state, and live nested-transcript state restore from retained data after an actual eviction. Hosts may pass a stable mutable `IHarnessTranscriptViewState` through `viewState`; it must contain `messages`, `permissions`, and `questions` maps. The list creates entries for current canonical IDs, deletes records for removed IDs, and session-keys and prunes live nested-subtask records. Without that prop, equivalent state remains list-local. Set `transcriptKey` to the stable identity of the displayed transcript so reused components reset scroll-local state between chats. When `hasEarlierMessages` is true, an intentional upward gesture reaching the top emits one bubbling, composed `harness-load-earlier` event. Set `loadingEarlier` while handling it; the next `true` to `false` transition rearms the event. Initial rendering, anchor restoration, and other component-owned scrolling never emit it.
|
|
6361
|
+
Scrollable streaming-safe log. Up to 40 canonical entries (`messages` + `permissions` + `questions` + `elicitations`) keep keyed full-timeline DOM; larger inputs activate a measured variable-height window with 800px overscan and return to full rendering when they shrink. Rows outside that overscanned window are unmounted, except focused rows, both endpoints of an active selection, and fullscreen-owned cards, which remain mounted until the interaction ends, and elicitation cards, which remain mounted while the host keeps their request, since what the owner entered lives in the card alone; threshold-mode changes are likewise deferred while protected DOM is active. `applyDelta()` targets a mounted message or mutates its offscreen backing model. Markdown output, disclosures, reasoning expansion, question drafts, permission choices, diff layout, terminal scroll state, and live nested-transcript state restore from retained data after an actual eviction. Hosts may pass a stable mutable `IHarnessTranscriptViewState` through `viewState`; it must contain `messages`, `permissions`, and `questions` maps. The list creates entries for current canonical IDs, deletes records for removed IDs, and session-keys and prunes live nested-subtask records. Without that prop, equivalent state remains list-local. Set `transcriptKey` to the stable identity of the displayed transcript so reused components reset scroll-local state between chats. When `hasEarlierMessages` is true, an intentional upward gesture reaching the top emits one bubbling, composed `harness-load-earlier` event. Set `loadingEarlier` while handling it; the next `true` to `false` transition rearms the event. Initial rendering, anchor restoration, and other component-owned scrolling never emit it.
|
|
6360
6362
|
|
|
6361
6363
|
`refreshMessages(ids?)` reconciles in-place host mutations without replacing canonical objects. With IDs, it refreshes only matching message rows that are currently mounted; matching offscreen rows remain unmounted and use the mutated canonical objects when later mounted. With IDs omitted, it rebuilds structural transcript state and refreshes all mounted rows. Either way a message whose `pending` changed moves between the queue and the transcript. `[]` is a no-op. `focusPendingPermission()` scrolls to the first unanswered permission and focuses its first response action, returning false when no request is pending.
|
|
6362
6364
|
|
|
@@ -6366,7 +6368,7 @@ Set `groupWork` and each run of a turn's work folds into one line, a [DeesHarnes
|
|
|
6366
6368
|
|
|
6367
6369
|
The empty transcript shows `emptyTitle` and `emptyText` (else the catalog's "No messages yet" and "Start a conversation to see it here.") and the starter prompts in a box that is the stable CSS part `empty`, a grid that centres them; a host can place them through `::part(empty)`.
|
|
6368
6370
|
|
|
6369
|
-
A `role: 'user'` message with `pending` set has not been taken in by the session yet, and waits in a queue under the working indicator instead of in the transcript: a thin rule either side of a centred "Pending" label in caption size and muted text, then the waiting messages in the order they were sent, each in its ordinary bubble with a line that says where it stands (see `DeesHarnessMessage`), all on the status line's measure. `pending` is a `THarnessPendingState`: `'steering'` (handed to the running turn, read at its next step), `'queued'` (confirmed to wait for the next turn), `'uncertain'` (delivery attempted but unconfirmed), or `'held'` (not sent: the run was stopped before the session took it in). A held message offers **Resend** and **Discard**, which emit `harness-held-resend` and `harness-held-discard` with `{ messageId }` (`IHarnessHeldMessageDetail`), bubbling and composed out of the list and the chat; the host sends it again (setting `'queued'` or `'steering'`) or removes it. Nothing held is ever sent on its own. `heldActions` (`THarnessHeldAction[]`: `'resend'`, `'discard'`) on the message states which of the two a held or uncertain message offers; set `heldActions: ['discard']` on an uncertain message to let the reader drop it without offering a resend that could deliver it twice (see `DeesHarnessMessage`). Without a status line the queue sits directly under the transcript, still under its divider. It is never virtualized: it is the bottom that auto-follow keeps in view. A message joining the queue arrives like a row, and the divider arrives with the first. When the host clears `pending` on the same `id` — by passing the message again without it, or by mutating the shared object and calling `refreshMessages([id])` — the message glides from its slot to its place in the transcript in one motion on `--dees-transition-slow` with `--dees-ease-standard`, while the working indicator, the divider and the rest of the queue travel with it; what waited below it stays where it is (the slot keeps showing the state line the message waited with while it closes, so it gives that line's space back too, and under a followed bottom the transcript settles down by it), and the divider closes its space and blends out with the last message to leave. Its place is chronological like any message's, by `order` or `createdAt`, so a host that delivers queued prompts when the running turn ends stamps them then, and they land at the tail rather than among that turn's output. Taking a message up keeps a pinned transcript pinned and an unpinned reader's anchor still, virtualized or not. Once the message has landed it sweeps its acceptance scan, never over the glide (see `DeesHarnessMessage`). A message taken up while it still arrives in the queue finishes arriving first. Under reduced motion the message is simply in its place, with neither glide nor sweep; a browser without keyword size interpolation places it at once and sweeps; where the list is not rendered — hidden, or skipped by `content-visibility` — or cannot tell (no `Element.checkVisibility`), it is simply in its place. A message the host removes from the queue just goes. The composer's `queuedCount` stays host-driven. Subagent rows have no body at all: activating one opens its thread in the fullscreen view, exactly like opening it from the sidebar, and the transcript stays where it was. The docked composer is a card on the same measure, floating on the chat's own surface, so the prompt lines up with the messages above it. The status line under the transcript sits on that measure too, so the working indicator starts where the messages start rather than at the pane edge. Set the custom property on the chat or the list to widen or disable the column; it is read when rows are measured, so change it at mount rather than while a virtualized transcript is scrolled. Nothing opens or closes on its own: a reader's disclosure is kept in the retained view state and survives status changes, eviction and remounting. Auto-follow responds to streamed growth but does not repeatedly repin while a disclosure shrinks. Permission requests and questions behave as before. Props: `messages`, `permissions`/`permissionsBusy`, `questions`, `status`, `viewState`, `transcriptKey`, `hasEarlierMessages`, `loadingEarlier`, `autoFollow`, `hideScrollbar`, `fadeScrollEdges`, `showRoles`, `showTimestamps`, `markdownWhileStreaming` (default `true`), `emptyTitle`/`emptyText` (+ `slot="empty"`), `starterPrompts`. `starterPrompts` (`IHarnessStarterPrompt[]`) renders as buttons under the empty transcript's text; choosing one emits the bubbling, composed `harness-starter-prompt` with `IHarnessStarterPromptDetail` `{ prompt }` (its `prompt`, else its `label`) and sends nothing. They belong to the default empty content, so content assigned to `slot="empty"` replaces them. Native browser find and selection cover the mounted window; hosts that require complete-history search or copy should operate on their canonical `messages`, `permissions`, and `questions` models.
|
|
6371
|
+
A `role: 'user'` message with `pending` set has not been taken in by the session yet, and waits in a queue under the working indicator instead of in the transcript: a thin rule either side of a centred "Pending" label in caption size and muted text, then the waiting messages in the order they were sent, each in its ordinary bubble with a line that says where it stands (see `DeesHarnessMessage`), all on the status line's measure. `pending` is a `THarnessPendingState`: `'steering'` (handed to the running turn, read at its next step), `'queued'` (confirmed to wait for the next turn), `'uncertain'` (delivery attempted but unconfirmed), or `'held'` (not sent: the run was stopped before the session took it in). A held message offers **Resend** and **Discard**, which emit `harness-held-resend` and `harness-held-discard` with `{ messageId }` (`IHarnessHeldMessageDetail`), bubbling and composed out of the list and the chat; the host sends it again (setting `'queued'` or `'steering'`) or removes it. Nothing held is ever sent on its own. `heldActions` (`THarnessHeldAction[]`: `'resend'`, `'discard'`) on the message states which of the two a held or uncertain message offers; set `heldActions: ['discard']` on an uncertain message to let the reader drop it without offering a resend that could deliver it twice (see `DeesHarnessMessage`). Without a status line the queue sits directly under the transcript, still under its divider. It is never virtualized: it is the bottom that auto-follow keeps in view. A message joining the queue arrives like a row, and the divider arrives with the first. When the host clears `pending` on the same `id` — by passing the message again without it, or by mutating the shared object and calling `refreshMessages([id])` — the message glides from its slot to its place in the transcript in one motion on `--dees-transition-slow` with `--dees-ease-standard`, while the working indicator, the divider and the rest of the queue travel with it; what waited below it stays where it is (the slot keeps showing the state line the message waited with while it closes, so it gives that line's space back too, and under a followed bottom the transcript settles down by it), and the divider closes its space and blends out with the last message to leave. Its place is chronological like any message's, by `order` or `createdAt`, so a host that delivers queued prompts when the running turn ends stamps them then, and they land at the tail rather than among that turn's output. Taking a message up keeps a pinned transcript pinned and an unpinned reader's anchor still, virtualized or not. Once the message has landed it sweeps its acceptance scan, never over the glide (see `DeesHarnessMessage`). A message taken up while it still arrives in the queue finishes arriving first. Under reduced motion the message is simply in its place, with neither glide nor sweep; a browser without keyword size interpolation places it at once and sweeps; where the list is not rendered — hidden, or skipped by `content-visibility` — or cannot tell (no `Element.checkVisibility`), it is simply in its place. A message the host removes from the queue just goes. The composer's `queuedCount` stays host-driven. Subagent rows have no body at all: activating one opens its thread in the fullscreen view, exactly like opening it from the sidebar, and the transcript stays where it was. The docked composer is a card on the same measure, floating on the chat's own surface, so the prompt lines up with the messages above it. The status line under the transcript sits on that measure too, so the working indicator starts where the messages start rather than at the pane edge. Set the custom property on the chat or the list to widen or disable the column; it is read when rows are measured, so change it at mount rather than while a virtualized transcript is scrolled. Nothing opens or closes on its own: a reader's disclosure is kept in the retained view state and survives status changes, eviction and remounting. Auto-follow responds to streamed growth but does not repeatedly repin while a disclosure shrinks. Permission requests and questions behave as before. Props: `messages`, `permissions`/`permissionsBusy`, `questions`, `elicitations`, `status`, `viewState`, `transcriptKey`, `hasEarlierMessages`, `loadingEarlier`, `autoFollow`, `hideScrollbar`, `fadeScrollEdges`, `showRoles`, `showTimestamps`, `markdownWhileStreaming` (default `true`), `emptyTitle`/`emptyText` (+ `slot="empty"`), `starterPrompts`. `starterPrompts` (`IHarnessStarterPrompt[]`) renders as buttons under the empty transcript's text; choosing one emits the bubbling, composed `harness-starter-prompt` with `IHarnessStarterPromptDetail` `{ prompt }` (its `prompt`, else its `label`) and sends nothing. They belong to the default empty content, so content assigned to `slot="empty"` replaces them. Native browser find and selection cover the mounted window; hosts that require complete-history search or copy should operate on their canonical `messages`, `permissions`, and `questions` models.
|
|
6370
6372
|
|
|
6371
6373
|
#### `DeesHarnessMessage`
|
|
6372
6374
|
|
|
@@ -6568,6 +6570,40 @@ chat.addEventListener('harness-question-response', async (event) => {
|
|
|
6568
6570
|
});
|
|
6569
6571
|
```
|
|
6570
6572
|
|
|
6573
|
+
#### `DeesHarnessElicitationCard`
|
|
6574
|
+
|
|
6575
|
+
What an MCP server of a session asks the owner for (MCP elicitation), as one card per request: `IHarnessElicitationRequest` is a union on `mode` with a shared `id`, `serverName`, `message`, `createdAt` and optional `refusals`. The card shows who asks ("crm asks") and the server's `message` as plain text: no markdown, no link, its lines kept.
|
|
6576
|
+
|
|
6577
|
+
- `mode: 'form'` carries `fields` (`THarnessElicitationField[]`), MCP's flat primitive subset in five kinds: `text` (`format` `email` | `uri` | `date` | `date-time`, `minLength`/`maxLength` counted in characters, that is Unicode code points as the server counts them, never UTF-16 units), `number` (`integer`, inclusive `minimum`/`maximum`; typed with the decimal separator of the provided `I18n`'s locale, `.` without one, its digits never grouped: `1,000` in English or `1.000` in German says "Enter a number." and is never read as another number), `boolean` (Yes or No), `choice` and `choices` (`options` of `{ value, label }`; `choices` with `minItems`/`maxItems`). Each field has `name`, `title?`, `description?`, `required` and `default?`. Send waits while a required field is empty or a value does not fit, and says why under the field; it answers with the values typed (numbers as numbers, Yes or No as booleans, several choices as a list in the order listed), an empty optional field absent.
|
|
6578
|
+
- `mode: 'url'` carries `url`. The card shows it as text, whole and exactly, every character that would not show (a control, one that turns text around, a zero-width one, a space other than U+0020) as its code point ("U+202E"). It never links, opens, fetches or prefetches it: Mark as done answers `accept` without content once the owner has visited it.
|
|
6579
|
+
- `mode: 'unsupported'` carries the host's `reason`: the card offers Decline and Cancel only, no accept at all.
|
|
6580
|
+
|
|
6581
|
+
Every card answers with the bubbling, composed `harness-elicitation-response` (`IHarnessElicitationResponseDetail`, `{ requestId, action: 'accept' | 'decline' | 'cancel', content? }`); only an accepted form carries `content` (`THarnessElicitationContent`). What the owner types stays in the card alone until then: never in `request` or `elicitations`, an attribute, a reflected property or any other event — the typing events of its fields (input, key and paste events) stop at the card. Keep `content` out of logs, journals, transcripts and error text. An answered card shows how it was answered, never what was entered, and takes no other answer until the host changes the request; a fresh copy of the same request changes nothing. Where the host refuses the answer, it sets `refusals` (`IHarnessElicitationRefusal[]`, `{ field?, reason }`, never a value) on the request: the card asks again with the values kept, says each reason under the field it names and the others over the form. Each refusal is a new `refusals` array, also one that reads as the last (the host refused the same way again): that array takes an answer again; handing over the array of the refusal already answered does not. Another request `id`, the host removing the request and the card leaving the page forget what was entered, so a request added again under the same id starts from its defaults. `busy` (the chat's `disabled`) holds every answer back.
|
|
6582
|
+
|
|
6583
|
+
Elicitations flow through `dees-harness-chat`'s and `dees-harness-message-list`'s `elicitations` property: each pins to the end of the transcript while the host keeps it, and the list keeps its card mounted however far the reader scrolls. The host removes the request once answered.
|
|
6584
|
+
|
|
6585
|
+
```ts
|
|
6586
|
+
chat.elicitations = [{
|
|
6587
|
+
id: 'elicitation-4',
|
|
6588
|
+
mode: 'form',
|
|
6589
|
+
serverName: 'crm',
|
|
6590
|
+
message: 'Create the contact for the new supplier.',
|
|
6591
|
+
createdAt: Date.now(),
|
|
6592
|
+
fields: [
|
|
6593
|
+
{ kind: 'text', name: 'email', title: 'Email', required: true, format: 'email' },
|
|
6594
|
+
{ kind: 'number', name: 'seats', title: 'Seats', required: true, integer: true, minimum: 1, default: 5 },
|
|
6595
|
+
{ kind: 'choice', name: 'region', title: 'Region', required: true, options: [{ value: 'eu', label: 'Europe' }, { value: 'us', label: 'United States' }] },
|
|
6596
|
+
],
|
|
6597
|
+
}];
|
|
6598
|
+
chat.addEventListener('harness-elicitation-response', async (event) => {
|
|
6599
|
+
const { requestId, action, content } = event.detail; // content only with accept of a form
|
|
6600
|
+
const result = await answerElicitation(requestId, action, content); // never into history or logs
|
|
6601
|
+
chat.elicitations = result.ok
|
|
6602
|
+
? chat.elicitations.filter((request) => request.id !== requestId)
|
|
6603
|
+
: chat.elicitations.map((request) => request.id === requestId ? { ...request, refusals: result.refusals } : request);
|
|
6604
|
+
});
|
|
6605
|
+
```
|
|
6606
|
+
|
|
6571
6607
|
#### `DeesHarnessComposer`
|
|
6572
6608
|
|
|
6573
6609
|
An `uncertain` pending prompt says “Delivery unconfirmed”: the host has attempted dispatch but cannot confirm whether the harness took it. Keep that prompt with `pendingActionAvailable: false` until the host reconciles the outcome; it cannot be resent or withdrawn meanwhile. A host that can forget the prompt sets `heldActions: ['discard']` on it, and the message offers Discard alone (`harness-held-discard`) and says that a resend could deliver it twice. Consecutive assistant messages containing only reasoning share the first row's role, model, and time range while each message keeps its own collapsible reasoning trace and stable ID. User messages, tool calls, model changes, or assistant text break the run.
|
|
@@ -6853,10 +6889,12 @@ Search covers resource ID, kind, title, and preview, and matches sessions and re
|
|
|
6853
6889
|
|
|
6854
6890
|
#### `DeesHarnessSessionList`
|
|
6855
6891
|
|
|
6856
|
-
A plain, read-only list of sessions from any harness, fed by the host and never arranged by hand. Each `IHarnessSessionRow` is `{ id, harness, state, name, excerpt?, tickets?, updatedAt }`, where `harness` is `claude`, `codex`, `flex`, `opencode` or any other id, and `state` is `needs_input`, `working`, `completed` or `failed`. Rows fall into fixed groups in that order of urgency — Needs input, Working, Failed, Completed — each with its count, newest first. Completed shows its newest `completedLimit` rows (default 3) behind a "… N more" control; the selected row stays visible even when it is folded.
|
|
6892
|
+
A plain, read-only list of sessions from any harness, fed by the host and never arranged by hand. Each `IHarnessSessionRow` is `{ id, harness, state, name, excerpt?, tickets?, updatedAt, nativeWait?, interrupted? }`, where `harness` is `claude`, `codex`, `flex`, `opencode` or any other id, and `state` is `needs_input`, `working`, `completed` or `failed`. Rows fall into fixed groups in that order of urgency — Needs input, Working, Failed, Completed — each with its count, newest first. Completed shows its newest `completedLimit` rows (default 3) behind a "… N more" control; the selected row stays visible even when it is folded.
|
|
6857
6893
|
|
|
6858
6894
|
One line per row: the harness glyph is the status mark (needs input in the warning colour on a tinted tile with a bold name, still; working pulses slowly; failed is red; completed is muted and still), then the name, the first ticket as a chip ("+N" when there are more, every key in its title), and the age. The latest `excerpt` joins the line only when the list's own container is at least 720px wide; it measures itself with a container query, not the window. Every row of every group shares one set of columns, so names, excerpts, chips and ages each start on one edge; in the wide layout the name column is as wide as the longest name, up to `--dees-harness-session-name-max` (default `20rem`), and a longer name ends in an ellipsis with its full text in the tooltip. Each mark is named for assistive technology, for example "Codex · working". Under `prefers-reduced-motion` the marks keep their colours and stop moving. A harness the list does not know renders a generic bot glyph and its id. The glyphs are Lucide icons, not product logos.
|
|
6859
6895
|
|
|
6896
|
+
Two optional fields add a note after the name, each in one group only. `nativeWait` (`IHarnessSessionRowNativeWait`, `{ reason }`) says that a session waits on something only its native client can answer, so no host can answer it in its place: a `needs_input` row says where, in the attention colour — "Approve in Codex" (`approval`), "Reply in Codex" (`user_input`), "Answer in Claude Code" (`native_prompt`), "Waiting in Codex" (`unrecognized`, `THarnessSessionRowNativeWaitReason`), naming the harness as its indicator does. `interrupted: true` makes a `completed` row say "Interrupted", muted. Every other state ignores both, and a row without them renders exactly as before. The name gives way to the note and ends in an ellipsis first; the note is part of the row's button, so its accessible name includes it.
|
|
6897
|
+
|
|
6860
6898
|
The list emits `harness-session-row-select` (`IHarnessSessionRowEventDetail`, `{ row }`) and `harness-session-ticket-select` (`IHarnessSessionTicketEventDetail`, `{ row, ticket }`, the first ticket); both bubble and are composed. Right-click on a row, or ContextMenu or Shift+F10 on a focused one, emits `harness-session-row-context` (`IHarnessSessionRowContextDetail`, `{ row, clientX, clientY, source, originalEvent }`): the list prevents the browser menu and the host opens its own, at the pointer or, for the keyboard (`source: 'keyboard'`), just under the row. `DeesContextmenu.openContextMenuWithOptions` takes a `MouseEvent`, so a keyboard request opens it with `new MouseEvent('contextmenu', { clientX, clientY })` and `ownerElement` set to the row's focus target. Keyboard: one tab stop; ArrowUp, ArrowDown, Home and End move between rows and the "more" control, ArrowRight and ArrowLeft between a row and its ticket chip, Enter or Space activates. A row that changes state keeps focus as it moves to its new group. `focusList()` moves focus into the list: to the row last used, else the selected row, else the first. Other properties: `selectedSessionId`, `loading`, and `emptyText`.
|
|
6861
6899
|
|
|
6862
6900
|
While `loading` is set the list is `aria-busy`. The first load — `loading` with no rows — draws five placeholder rows under a placeholder group header, on the same columns and heights as the rows that replace them, so nothing moves when the feed answers. They appear only once the load has taken 200 ms, so a quick load never flashes them, and shimmer gently (still under `prefers-reduced-motion`). After `DeesHarnessSessionList.stillLoadingAfter` (10 000 ms) the list says "Still loading sessions…" and the placeholders hold still. Assistive technology hears one status, "Loading sessions…" and later the still-loading line; the placeholders are hidden from it. Rows already on show stay while more load: the skeleton never replaces them.
|
|
@@ -6869,6 +6907,9 @@ list.rows = [
|
|
|
6869
6907
|
{ id: 's-1', harness: 'codex', state: 'needs_input', name: 'Release 22.0.0', updatedAt: Date.now(),
|
|
6870
6908
|
tickets: [{ key: 'AGL-136', url: 'https://board.example/AGL-136' }] },
|
|
6871
6909
|
{ id: 's-2', harness: 'claude', state: 'working', name: 'Session feed', excerpt: 'Mapping thread states…', updatedAt: Date.now() },
|
|
6910
|
+
// waits on an approval in Codex's own app: "Approve in Codex"
|
|
6911
|
+
{ id: 's-3', harness: 'codex', state: 'needs_input', name: 'Rotate keys', nativeWait: { reason: 'approval' }, updatedAt: Date.now() },
|
|
6912
|
+
{ id: 's-4', harness: 'claude', state: 'completed', name: 'Draft guide', interrupted: true, updatedAt: Date.now() },
|
|
6872
6913
|
];
|
|
6873
6914
|
list.addEventListener('harness-session-row-select', (event) => {
|
|
6874
6915
|
list.selectedSessionId = (event as CustomEvent<IHarnessSessionRowEventDetail>).detail.row.id;
|
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@design.estate/dees-catalog',
|
|
6
|
-
version: '24.0
|
|
6
|
+
version: '24.2.0',
|
|
7
7
|
description: 'A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript.'
|
|
8
8
|
}
|
|
@@ -54,6 +54,19 @@ const demoMovements: IDemoMovement[] = [
|
|
|
54
54
|
{ id: 'm7', booked: '2026-08-12', payee: 'Telekom', account: 'sparkasse', month: '2026-08', amount: -39.95, private: false },
|
|
55
55
|
];
|
|
56
56
|
const accountNames: Record<string, string> = { sparkasse: 'Sparkasse', n26: 'N26' };
|
|
57
|
+
|
|
58
|
+
/** A support ticket, for the wrapping example: the summary wraps, the columns beside it keep their line. */
|
|
59
|
+
interface IDemoTicket { id: string; opened: string; summary: string; owner: string; }
|
|
60
|
+
const demoTickets: IDemoTicket[] = [
|
|
61
|
+
{ id: 't1', opened: '2026-09-29', summary: 'Invoices from the Hamburg office arrive twice since the mail gateway moved, and the second copy is booked as a new document', owner: 'Finance' },
|
|
62
|
+
{ id: 't2', opened: '2026-09-24', summary: 'Scanner in the hallway stops after forty pages', owner: 'Facilities' },
|
|
63
|
+
{ id: 't3', opened: '2026-09-18', summary: 'Single sign-on asks new colleagues to choose an organization they do not belong to, and a wrong choice cannot be undone without an administrator', owner: 'Platform' },
|
|
64
|
+
];
|
|
65
|
+
const ticketColumns: Column<IDemoTicket>[] = [
|
|
66
|
+
{ key: 'opened', header: 'Opened' },
|
|
67
|
+
{ key: 'summary', header: 'Summary', wrap: true },
|
|
68
|
+
{ key: 'owner', header: 'Owner' },
|
|
69
|
+
];
|
|
57
70
|
const euro = new Intl.NumberFormat('en-US', { style: 'currency', currency: 'EUR' });
|
|
58
71
|
const movementColumns: Column<IDemoMovement>[] = [
|
|
59
72
|
{ key: 'booked', header: 'Booked' },
|
|
@@ -389,6 +402,13 @@ export class DeesDemoTableWorkspace extends DeesElement {
|
|
|
389
402
|
.displayFunction=${(person: { name: string; email: string; team: string }) => ({ name: person.name, Email: person.email, Team: person.team })}
|
|
390
403
|
.data=${[{ name: 'Alex Morgan', email: 'alex@example.com', team: 'Design' }, { name: 'Sam Rivera', email: 'sam@example.com', team: 'Engineering' }, { name: 'Jamie Chen', email: 'jamie@example.com', team: 'Product' }]}></dees-table>
|
|
391
404
|
</section>
|
|
405
|
+
<section class="example">
|
|
406
|
+
<p class="caption">A wrapping column fits the table to its container: the columns beside it keep their one line,
|
|
407
|
+
it takes the room they leave and wraps within it, and the rows grow. Narrow the window to watch it. Only when a
|
|
408
|
+
wrapping column would fall below 20ch does the table scroll sideways.</p>
|
|
409
|
+
<dees-table heading1="Support tickets" heading2="A wrapping column" dataName="tickets"
|
|
410
|
+
.columns=${ticketColumns} .data=${demoTickets} .rowKey=${'id'}></dees-table>
|
|
411
|
+
</section>
|
|
392
412
|
<section class="example">
|
|
393
413
|
<p class="caption">Rows can offer different actions: an e-invoice can be validated and shows its XML source from the
|
|
394
414
|
"…" menu, a PDF cannot. Each action keeps its place in the actions column, and a row leaves the place of an action
|
|
@@ -688,6 +688,8 @@ export class DeesTable<T> extends DeesElement {
|
|
|
688
688
|
* width, in the windows shown since the widths were frozen.
|
|
689
689
|
*/
|
|
690
690
|
private __columnContentWidths?: number[];
|
|
691
|
+
/** The container's width the column widths were measured at, for a table that fits it. */
|
|
692
|
+
private __columnsFittedTo?: number;
|
|
691
693
|
private __virtualSettleFrame?: number;
|
|
692
694
|
/** Currently rendered range [start, end). Triggers re-render when changed. */
|
|
693
695
|
@state()
|
|
@@ -1032,7 +1034,8 @@ export class DeesTable<T> extends DeesElement {
|
|
|
1032
1034
|
${this.loading && viewData.length && showRows ? html`<div class="refreshBar" aria-hidden="true"></div>` : ''}
|
|
1033
1035
|
<div class="tableScrollFrame">
|
|
1034
1036
|
<div class="tableScroll">
|
|
1035
|
-
<table
|
|
1037
|
+
<table class=${effectiveColumns.some((col) => col.wrap && !col.hidden) ? 'wrapsCells' : ''}
|
|
1038
|
+
aria-label=${this.label || this.heading1 || this.__dataNames?.other || this.t('table.data')}>
|
|
1036
1039
|
<thead>
|
|
1037
1040
|
${this.renderHeaderRows(effectiveColumns)}
|
|
1038
1041
|
</thead>
|
|
@@ -1097,6 +1100,7 @@ export class DeesTable<T> extends DeesElement {
|
|
|
1097
1100
|
const isFlashing = flashToken !== undefined;
|
|
1098
1101
|
const useFlashBorder = isFlashing && !!col.flashBorder;
|
|
1099
1102
|
const cellClasses = [
|
|
1103
|
+
col.wrap ? 'wrapCell' : '',
|
|
1100
1104
|
isEditable ? 'editable' : '',
|
|
1101
1105
|
isFocused && !isEditing ? 'focused' : '',
|
|
1102
1106
|
isEditing ? 'editingCell' : '',
|
|
@@ -1213,6 +1217,7 @@ export class DeesTable<T> extends DeesElement {
|
|
|
1213
1217
|
const ariaSort = this.getAriaSort(col, underColumns);
|
|
1214
1218
|
return html`
|
|
1215
1219
|
<th
|
|
1220
|
+
class=${col.wrap ? 'wrapCell' : ''}
|
|
1216
1221
|
role="columnheader"
|
|
1217
1222
|
scope="col"
|
|
1218
1223
|
aria-sort=${ariaSort}
|
|
@@ -1447,6 +1452,7 @@ export class DeesTable<T> extends DeesElement {
|
|
|
1447
1452
|
|
|
1448
1453
|
// Track resize of the real table so we can mirror its width and column widths.
|
|
1449
1454
|
this.__floatingResizeObserver = new ResizeObserver(() => {
|
|
1455
|
+
this.__refitWrappingColumns();
|
|
1450
1456
|
this.__syncViewportWidth();
|
|
1451
1457
|
this.__syncScrollport();
|
|
1452
1458
|
this.__syncPinnedActions();
|
|
@@ -1754,8 +1760,10 @@ export class DeesTable<T> extends DeesElement {
|
|
|
1754
1760
|
* A column that needs more than it has takes the room the columns were
|
|
1755
1761
|
* stretched by to fill the table's container, shared out in proportion to
|
|
1756
1762
|
* what each needs as the browser shares it; the table grows wider than its
|
|
1757
|
-
* container only once the columns need more than it holds.
|
|
1758
|
-
*
|
|
1763
|
+
* container only once the columns need more than it holds. A wrapping column
|
|
1764
|
+
* needs no more than it has: it gives the columns beside it the room they
|
|
1765
|
+
* need, down to what it can narrow to. Returns whether a column's width
|
|
1766
|
+
* changed.
|
|
1759
1767
|
*/
|
|
1760
1768
|
private __growColumnWidths(): boolean {
|
|
1761
1769
|
const table = this.__realTableEl;
|
|
@@ -1764,6 +1772,7 @@ export class DeesTable<T> extends DeesElement {
|
|
|
1764
1772
|
const cells = Array.from(headerRow.cells).filter(
|
|
1765
1773
|
(cell) => !cell.classList.contains('actionsCol') && !cell.classList.contains('selectionCol')
|
|
1766
1774
|
);
|
|
1775
|
+
const wrapping = cells.map((cell) => cell.classList.contains('wrapCell'));
|
|
1767
1776
|
const frozen = cells.map((cell) => parseFloat(cell.style.width) || 0);
|
|
1768
1777
|
table.style.tableLayout = 'auto';
|
|
1769
1778
|
table.style.minWidth = '0';
|
|
@@ -1771,25 +1780,56 @@ export class DeesTable<T> extends DeesElement {
|
|
|
1771
1780
|
const natural = cells.map((cell) => parseFloat(getComputedStyle(cell).width) || 0);
|
|
1772
1781
|
const naturalTotal = natural.reduce((sum, width) => sum + width, 0);
|
|
1773
1782
|
const naturalTableWidth = parseFloat(getComputedStyle(table).width) || 0;
|
|
1783
|
+
let narrowest: number[] = [];
|
|
1784
|
+
if (wrapping.includes(true)) {
|
|
1785
|
+
table.style.width = 'min-content';
|
|
1786
|
+
narrowest = cells.map((cell) => parseFloat(getComputedStyle(cell).width) || 0);
|
|
1787
|
+
table.style.width = '';
|
|
1788
|
+
}
|
|
1774
1789
|
table.style.minWidth = '';
|
|
1775
1790
|
// The data columns' room: the width the container stretches the table to,
|
|
1776
1791
|
// less what the other columns and the table's edges take.
|
|
1777
1792
|
const room = (parseFloat(getComputedStyle(table).width) || 0) - (naturalTableWidth - naturalTotal);
|
|
1778
1793
|
const before = this.__columnContentWidths?.length === cells.length ? this.__columnContentWidths : [];
|
|
1779
|
-
const needed = natural.map((width, index) => Math.max(before[index] ?? 0, width));
|
|
1794
|
+
const needed = natural.map((width, index) => (wrapping[index] ? width : Math.max(before[index] ?? 0, width)));
|
|
1780
1795
|
this.__columnContentWidths = needed;
|
|
1781
1796
|
const neededTotal = needed.reduce((sum, width) => sum + width, 0);
|
|
1782
|
-
|
|
1797
|
+
// What the columns on one line leave the wrapping ones, shared as they share the room now.
|
|
1798
|
+
const leftToWrap = room - needed.reduce((sum, width, index) => sum + (wrapping[index] ? 0 : width), 0);
|
|
1799
|
+
const wrappingTotal = frozen.reduce((sum, width, index) => sum + (wrapping[index] ? width : 0), 0);
|
|
1800
|
+
const widths = !needed.some((width, index) => !wrapping[index] && width > frozen[index] + 0.5)
|
|
1783
1801
|
? frozen
|
|
1784
|
-
:
|
|
1785
|
-
? needed
|
|
1786
|
-
|
|
1787
|
-
|
|
1802
|
+
: wrapping.includes(true)
|
|
1803
|
+
? needed.map((width, index) => (wrapping[index]
|
|
1804
|
+
? Math.max(narrowest[index], Math.floor(leftToWrap * frozen[index] / wrappingTotal))
|
|
1805
|
+
: width))
|
|
1806
|
+
: neededTotal >= room
|
|
1807
|
+
? needed
|
|
1808
|
+
// whole pixels of the room left, so the shares never add up past it
|
|
1809
|
+
: needed.map((width) => width + Math.floor((room - neededTotal) * width / neededTotal));
|
|
1788
1810
|
cells.forEach((cell, index) => { cell.style.width = `${widths[index]}px`; });
|
|
1789
1811
|
table.style.tableLayout = 'fixed';
|
|
1790
1812
|
return widths.some((width, index) => Math.abs(width - frozen[index]) > 0.5);
|
|
1791
1813
|
}
|
|
1792
1814
|
|
|
1815
|
+
/**
|
|
1816
|
+
* A table with a wrapping column fits its container, so widths frozen at one
|
|
1817
|
+
* width hold for that width only: when the container's width changes, the
|
|
1818
|
+
* columns are measured again and the rows wrap anew.
|
|
1819
|
+
*/
|
|
1820
|
+
private __refitWrappingColumns(): void {
|
|
1821
|
+
const table = this.__realTableEl;
|
|
1822
|
+
if (!table?.classList.contains('wrapsCells')) return;
|
|
1823
|
+
if (table.parentElement?.clientWidth === this.__columnsFittedTo) return;
|
|
1824
|
+
void this.determineColumnWidths().then(() => {
|
|
1825
|
+
if (!this.fixedHeight) this.__syncFloatingHeader();
|
|
1826
|
+
if (!this.virtualized) return;
|
|
1827
|
+
this.__rowHeights.clear();
|
|
1828
|
+
this.__virtualColumnsCheckedFor = undefined;
|
|
1829
|
+
this.__scheduleVirtualSettle();
|
|
1830
|
+
});
|
|
1831
|
+
}
|
|
1832
|
+
|
|
1793
1833
|
/** Settles the window on the next frame: at most one range change per frame. */
|
|
1794
1834
|
private __scheduleVirtualSettle(): void {
|
|
1795
1835
|
if (this.__virtualSettleFrame !== undefined) return;
|
|
@@ -2584,6 +2624,7 @@ export class DeesTable<T> extends DeesElement {
|
|
|
2584
2624
|
table.style.tableLayout = '';
|
|
2585
2625
|
dataCells.forEach((cell) => { cell.style.width = ''; });
|
|
2586
2626
|
this.__columnContentWidths = undefined;
|
|
2627
|
+
this.__columnsFittedTo = table.parentElement?.clientWidth;
|
|
2587
2628
|
|
|
2588
2629
|
// An empty table has no widths worth keeping: its header and empty state
|
|
2589
2630
|
// stretch across the container. It stays in automatic layout until a data
|
|
@@ -214,6 +214,13 @@ export const tableStyles: CSSResult[] = [
|
|
|
214
214
|
.floatingHeader table { margin: 0; }
|
|
215
215
|
.floatingHeader th { pointer-events: auto; }
|
|
216
216
|
table { width: max-content; min-width: 100%; caption-side: bottom; font-size: inherit; border-collapse: separate; border-spacing: 0; }
|
|
217
|
+
/* With a wrapping column the table fits its container: automatic layout gives every column its
|
|
218
|
+
minimum, which for a cell that stays on one line is that line, and hands what is left to the
|
|
219
|
+
columns that can use it, the wrapping ones. Scoped to the data rows: the empty state wraps. */
|
|
220
|
+
table.wrapsCells { width: 100%; }
|
|
221
|
+
table.wrapsCells th, table.wrapsCells tr[data-row-idx] > td { white-space: nowrap; }
|
|
222
|
+
table.wrapsCells tr[data-row-idx] > td.wrapCell { white-space: normal; overflow-wrap: anywhere; }
|
|
223
|
+
table.wrapsCells tr[data-row-idx] > td.wrapCell .innerCellContainer { min-width: 20ch; }
|
|
217
224
|
th, td { box-sizing: border-box; padding: 6px 16px; text-align: start; vertical-align: middle; }
|
|
218
225
|
th { height: var(--table-header-height); background: var(--table-head-surface); color: var(--dees-color-text-secondary); font-size: 12px; font-weight: 500; border-bottom: var(--dees-line-width-hairline) solid var(--dees-color-border-subtle); }
|
|
219
226
|
td { height: 40px; position: relative; color: var(--dees-color-text-primary); border-bottom: var(--dees-line-width-hairline) solid var(--dees-color-border-subtle); font-size: 13px; }
|
|
@@ -114,6 +114,14 @@ export interface Column<T = any> {
|
|
|
114
114
|
header?: string | TemplateResult;
|
|
115
115
|
/** Explicit display alignment. Values and formatted strings are never inferred. */
|
|
116
116
|
align?: 'start' | 'center' | 'end';
|
|
117
|
+
/**
|
|
118
|
+
* Whether the column's cells wrap, for a long text or a row of chips. A table with a wrapping
|
|
119
|
+
* column fits its container instead of asking for every column's one-line width: the other
|
|
120
|
+
* columns keep their one line, the wrapping ones take the room that leaves and wrap within it,
|
|
121
|
+
* and rows grow with them. Each stays at least 20ch wide; only when that does not fit does the
|
|
122
|
+
* table scroll sideways, as any table does. Without it (the default) a cell stays on one line.
|
|
123
|
+
*/
|
|
124
|
+
wrap?: boolean;
|
|
117
125
|
value?: (row: T) => any;
|
|
118
126
|
renderer?: (value: any, row: T, ctx: { rowIndex: number; colIndex: number; column: Column<T> }) => TemplateResult | string;
|
|
119
127
|
/** Whether this column can be sorted by clicking its header. Defaults to `true`; set to `false` to disable. */
|
|
@@ -22,6 +22,7 @@ import type {
|
|
|
22
22
|
IHarnessComposerHistoryEntry,
|
|
23
23
|
IHarnessComposerOption,
|
|
24
24
|
IHarnessMessage,
|
|
25
|
+
IHarnessElicitationRequest,
|
|
25
26
|
IHarnessPermissionRequest,
|
|
26
27
|
IHarnessQuestionPersonResult,
|
|
27
28
|
IHarnessQuestionRejection,
|
|
@@ -135,6 +136,14 @@ export class DeesHarnessChat extends DeesElement {
|
|
|
135
136
|
@property({ attribute: false })
|
|
136
137
|
accessor questions: IHarnessQuestionRequest[] = [];
|
|
137
138
|
|
|
139
|
+
/**
|
|
140
|
+
* what MCP servers of the session ask the owner for: one `dees-harness-elicitation-card` each,
|
|
141
|
+
* pinned to the end of the transcript while the host keeps it; it answers with
|
|
142
|
+
* `harness-elicitation-response`
|
|
143
|
+
*/
|
|
144
|
+
@property({ attribute: false })
|
|
145
|
+
accessor elicitations: IHarnessElicitationRequest[] = [];
|
|
146
|
+
|
|
138
147
|
@property({ attribute: false })
|
|
139
148
|
accessor status: IHarnessStatus = { type: 'idle' };
|
|
140
149
|
|
|
@@ -1029,6 +1038,7 @@ export class DeesHarnessChat extends DeesElement {
|
|
|
1029
1038
|
.permissions=${this.permissions}
|
|
1030
1039
|
.permissionsBusy=${this.disabled}
|
|
1031
1040
|
.questions=${this.questions}
|
|
1041
|
+
.elicitations=${this.elicitations}
|
|
1032
1042
|
.status=${this.status}
|
|
1033
1043
|
.transcriptKey=${this.transcriptKey}
|
|
1034
1044
|
.hasEarlierMessages=${this.hasEarlierMessages}
|
|
@@ -1150,6 +1160,7 @@ export class DeesHarnessChat extends DeesElement {
|
|
|
1150
1160
|
&& !this.messages.length
|
|
1151
1161
|
&& !this.permissions.length
|
|
1152
1162
|
&& !this.questions.length
|
|
1163
|
+
&& !this.elicitations.length
|
|
1153
1164
|
&& !this.hasEarlierMessages
|
|
1154
1165
|
&& !this.loadingEarlier;
|
|
1155
1166
|
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { html } from '@design.estate/dees-element';
|
|
2
|
+
import { demoPage, demoSection, demoOutput, showDemoResult } from '../../../demos/templates.js';
|
|
3
|
+
import type { IHarnessElicitationRequest, IHarnessElicitationResponseDetail } from '../interfaces.js';
|
|
4
|
+
|
|
5
|
+
type TElicitationCard = HTMLElementTagNameMap['dees-harness-elicitation-card'];
|
|
6
|
+
|
|
7
|
+
/** The address the demo's host turns down, so the card asks again with what was entered kept. */
|
|
8
|
+
const TAKEN_EMAIL = 'taken@example.com';
|
|
9
|
+
|
|
10
|
+
const minute = 60_000;
|
|
11
|
+
|
|
12
|
+
const signUp = (): IHarnessElicitationRequest => ({
|
|
13
|
+
id: 'e-form',
|
|
14
|
+
mode: 'form',
|
|
15
|
+
serverName: 'crm',
|
|
16
|
+
message: 'Create the contact for the new supplier. I need a few details first.',
|
|
17
|
+
createdAt: Date.now() - minute,
|
|
18
|
+
fields: [
|
|
19
|
+
{ kind: 'text', name: 'name', title: 'Contact name', required: true, minLength: 2, maxLength: 40 },
|
|
20
|
+
{ kind: 'text', name: 'email', title: 'Email', description: `"${TAKEN_EMAIL}" is refused by this demo's host.`, required: true, format: 'email' },
|
|
21
|
+
{ kind: 'text', name: 'since', title: 'Customer since', required: false, format: 'date' },
|
|
22
|
+
{ kind: 'number', name: 'seats', title: 'Seats', required: true, integer: true, minimum: 1, maximum: 500, default: 5 },
|
|
23
|
+
{ kind: 'number', name: 'discount', title: 'Discount (%)', required: false, integer: false, minimum: 0, maximum: 30 },
|
|
24
|
+
{ kind: 'boolean', name: 'newsletter', title: 'Send the newsletter', required: true },
|
|
25
|
+
{
|
|
26
|
+
kind: 'choice', name: 'region', title: 'Region', required: true, default: 'eu',
|
|
27
|
+
options: [{ value: 'eu', label: 'Europe' }, { value: 'us', label: 'United States' }, { value: 'apac', label: 'Asia-Pacific' }],
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
kind: 'choices', name: 'channels', title: 'Channels', description: 'Choose one or two.', required: true, minItems: 1, maxItems: 2,
|
|
31
|
+
options: [{ value: 'mail', label: 'Mail' }, { value: 'phone', label: 'Phone' }, { value: 'chat', label: 'Chat' }],
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
const visits: IHarnessElicitationRequest[] = [
|
|
37
|
+
{
|
|
38
|
+
id: 'e-url',
|
|
39
|
+
mode: 'url',
|
|
40
|
+
serverName: 'github',
|
|
41
|
+
message: 'Authorize the GitHub app for this workspace, then come back here.',
|
|
42
|
+
createdAt: Date.now() - 2 * minute,
|
|
43
|
+
url: 'https://github.com/login/oauth/authorize?client_id=Iv1.8a61f9b3a7aba766&state=7f3c2a',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
id: 'e-url-hidden',
|
|
47
|
+
mode: 'url',
|
|
48
|
+
serverName: 'unknown-tools',
|
|
49
|
+
message: 'Confirm your account at the address below.',
|
|
50
|
+
createdAt: Date.now() - 3 * minute,
|
|
51
|
+
// a right-to-left override and a zero-width space would make this read as another address
|
|
52
|
+
url: 'https://accounts.example.com\u200B.evil.example/\u202Egnp.nigol',
|
|
53
|
+
},
|
|
54
|
+
];
|
|
55
|
+
|
|
56
|
+
const unsupported: IHarnessElicitationRequest = {
|
|
57
|
+
id: 'e-unsupported',
|
|
58
|
+
mode: 'unsupported',
|
|
59
|
+
serverName: 'deploy',
|
|
60
|
+
message: 'Fill in the release checklist.',
|
|
61
|
+
createdAt: Date.now() - 4 * minute,
|
|
62
|
+
reason: 'The form\'s field "checklist" asks for a nested object, which this app cannot show.',
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
/** The host answers as AGL would: it refuses a taken address at its field, and otherwise takes the answer. */
|
|
66
|
+
const answer = (eventArg: CustomEvent<IHarnessElicitationResponseDetail>) => {
|
|
67
|
+
const card = eventArg.target as TElicitationCard;
|
|
68
|
+
const { detail } = eventArg;
|
|
69
|
+
showDemoResult(eventArg.currentTarget as Element, detail);
|
|
70
|
+
if (detail.action === 'accept' && detail.content?.email === TAKEN_EMAIL) {
|
|
71
|
+
setTimeout(() => {
|
|
72
|
+
card.request = { ...card.request!, refusals: [{ field: 'email', reason: 'The server already has a contact with this address.' }] };
|
|
73
|
+
}, 400);
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
export const demoFunc = () => demoPage(
|
|
78
|
+
'Elicitation card',
|
|
79
|
+
'An MCP server of a session asks the owner for input: a form, a visit to an address, or a request the app cannot collect. What the owner enters stays in the card until the answer.',
|
|
80
|
+
html`
|
|
81
|
+
${demoSection('A form', `Every field kind: text with lengths and formats, whole and decimal numbers, a yes or no, a single choice and several. Send waits while a required field is empty or a value does not fit; it sends the values typed. Enter "${TAKEN_EMAIL}" to see the host refuse the answer at its field: the card asks again and keeps what was entered.`, html`
|
|
82
|
+
<div class="dees-demo-stack" @harness-elicitation-response=${answer}>
|
|
83
|
+
<dees-harness-elicitation-card .request=${signUp()}></dees-harness-elicitation-card>
|
|
84
|
+
</div>
|
|
85
|
+
${demoOutput()}
|
|
86
|
+
`)}
|
|
87
|
+
${demoSection('Visit an address', 'The address is text, shown exactly and never opened or loaded: the owner visits it, then marks it as done. A character that would not show, such as one that turns the text around or one of zero width, shows by its code point.', html`
|
|
88
|
+
<div class="dees-demo-stack" @harness-elicitation-response=${answer}>
|
|
89
|
+
${visits.map((request) => html`<dees-harness-elicitation-card .request=${request}></dees-harness-elicitation-card>`)}
|
|
90
|
+
</div>
|
|
91
|
+
${demoOutput()}
|
|
92
|
+
`)}
|
|
93
|
+
${demoSection('A request the app cannot collect', 'The host\'s reason, and Decline and Cancel only: nothing to accept, and nothing declines it on the owner\'s behalf.', html`
|
|
94
|
+
<div class="dees-demo-stack" @harness-elicitation-response=${answer}>
|
|
95
|
+
<dees-harness-elicitation-card .request=${unsupported}></dees-harness-elicitation-card>
|
|
96
|
+
</div>
|
|
97
|
+
${demoOutput()}
|
|
98
|
+
`)}
|
|
99
|
+
`,
|
|
100
|
+
);
|