@design.estate/dees-catalog 21.50.0 → 21.51.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.
Files changed (34) hide show
  1. package/dist_bundle/bundle.js +198 -74
  2. package/dist_bundle/bundle.js.map +1 -1
  3. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-5CIKWTZS.js → chunk-BDM5QXSP.js} +2 -2
  4. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-UPDBEHU2.js → chunk-MBTYK6OF.js} +5 -2
  5. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-UPDBEHU2.js.map → chunk-MBTYK6OF.js.map} +1 -1
  6. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-QTYZW5MS.js → chunk-Y5OEUCXR.js} +3 -3
  7. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{de-E2CUVVOP.js → de-VWHISDLM.js} +5 -2
  8. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{de-E2CUVVOP.js.map → de-VWHISDLM.js.map} +1 -1
  9. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-modal-KFHL5PON.js → dees-modal-3GPKOPGS.js} +3 -3
  10. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-workspace-terminal-3LVVC4NB.js → dees-workspace-terminal-SC2OYJI3.js} +4 -4
  11. package/dist_ts_web/00_commitinfo_data.js +1 -1
  12. package/dist_ts_web/elements/00group-harness/dees-harness-chat/dees-harness-chat.d.ts +5 -1
  13. package/dist_ts_web/elements/00group-harness/dees-harness-chat/dees-harness-chat.js +23 -2
  14. package/dist_ts_web/elements/00group-harness/dees-harness-session-sidebar/dees-harness-session-sidebar.d.ts +14 -2
  15. package/dist_ts_web/elements/00group-harness/dees-harness-session-sidebar/dees-harness-session-sidebar.demo.js +37 -2
  16. package/dist_ts_web/elements/00group-harness/dees-harness-session-sidebar/dees-harness-session-sidebar.js +94 -2
  17. package/dist_ts_web/elements/00group-harness/interfaces.d.ts +4 -0
  18. package/dist_ts_web/i18n/de.d.ts +12 -0
  19. package/dist_ts_web/i18n/de.js +4 -1
  20. package/dist_ts_web/i18n/messages.d.ts +12 -0
  21. package/dist_ts_web/i18n/messages.js +4 -1
  22. package/package.json +1 -1
  23. package/readme.md +6 -4
  24. package/ts_web/00_commitinfo_data.ts +1 -1
  25. package/ts_web/elements/00group-harness/dees-harness-chat/dees-harness-chat.ts +12 -0
  26. package/ts_web/elements/00group-harness/dees-harness-session-sidebar/dees-harness-session-sidebar.demo.ts +38 -1
  27. package/ts_web/elements/00group-harness/dees-harness-session-sidebar/dees-harness-session-sidebar.ts +97 -1
  28. package/ts_web/elements/00group-harness/interfaces.ts +5 -0
  29. package/ts_web/i18n/de.ts +3 -0
  30. package/ts_web/i18n/messages.ts +3 -0
  31. /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-5CIKWTZS.js.map → chunk-BDM5QXSP.js.map} +0 -0
  32. /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-QTYZW5MS.js.map → chunk-Y5OEUCXR.js.map} +0 -0
  33. /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-modal-KFHL5PON.js.map → dees-modal-3GPKOPGS.js.map} +0 -0
  34. /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-workspace-terminal-3LVVC4NB.js.map → dees-workspace-terminal-SC2OYJI3.js.map} +0 -0
package/readme.md CHANGED
@@ -5875,13 +5875,13 @@ chat.refreshMessages();
5875
5875
  chat.refreshMessages([]);
5876
5876
  ```
5877
5877
 
5878
- Key props: `messages`, `permissions`, `questions`, `status`, `transcriptKey`, `hasEarlierMessages`/`loadingEarlier`, `usage`, `todos`/`todosAuthoritative`/`showTodosPanel`, `sessionMetrics`, `scratchpad`/`scratchpadBusy`/`scratchpadError`, `attachedResources`, `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`, `markdownWhileStreaming`, `toolRegistry`. `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.
5878
+ Key props: `messages`, `permissions`, `questions`, `status`, `transcriptKey`, `hasEarlierMessages`/`loadingEarlier`, `usage`, `todos`/`todosAuthoritative`/`showTodosPanel`, `sessionMetrics`, `scratchpad`/`scratchpadBusy`/`scratchpadError`, `attachedResources`, `workers`/`selectedWorkerId`, `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`, `markdownWhileStreaming`, `toolRegistry`. `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.
5879
5879
 
5880
5880
  Light-DOM content assigned to `slot="composer-status"` renders between the transcript and composer, outside the transcript scroller. `inputLocked` keeps the controlled draft readable, focusable, and copyable while blocking every mutation control and canceling queued or in-flight attachment ingestion. It does not disable Stop or the More options menu of `menuActions`. While busy, Stop remains visible; `abortEnabled=${false}` disables it, suppresses `harness-abort`, and exposes `abortDisabledReason` as its explanation.
5881
5881
 
5882
5882
  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.
5883
5883
 
5884
- A **session side panel** shows Tasks, 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-session-intelligence-ask`, `harness-session-intelligence-availability-action`.
5884
+ 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`.
5885
5885
 
5886
5886
  Set `.todosAuthoritative=${true}` when an empty host-owned task list must suppress transcript-derived fallback. A changed `transcriptKey` also clears the previous session's unsent Session Intelligence question while preserving the existing scratchpad revision handling.
5887
5887
 
@@ -6155,7 +6155,7 @@ Token usage chip (`in · out · total`, `compact` shows the total only); cache r
6155
6155
 
6156
6156
  #### `DeesHarnessSessionSidebar`
6157
6157
 
6158
- Generic session-detail panel that composes Tasks, Tools & Subagents, Tokens, Session Scratchpad, and Session Intelligence sections. Headings stay fixed in a single-open accordion; Session Intelligence splits its expanded body into independently scrolling history and a docked question composer. Set `.toolMessages` to top-level tool messages from the currently retained transcript window and `.toolRegistry` for matching labels/icons; active subagents use authoritative child status, and removed messages disappear without a second history cache. The host also supplies `IHarnessSessionMetrics`, `IHarnessScratchpad`, and `IHarnessIntelligenceExchange[]`; the component never loads or persists data itself. Context percentage and its progress bar render only when both `currentContextTokens` and a positive `maxContextTokens` are present.
6158
+ Generic session-detail panel that composes Tasks, Workers, Tools & Subagents, Tokens, Session Scratchpad, Attached Resources, and Session Intelligence sections. Headings stay fixed in a single-open accordion; Session Intelligence splits its expanded body into independently scrolling history and a docked question composer. Set `.toolMessages` to top-level tool messages from the currently retained transcript window and `.toolRegistry` for matching labels/icons; active subagents use authoritative child status, and removed messages disappear without a second history cache. The host also supplies `IHarnessSessionMetrics`, `IHarnessScratchpad`, and `IHarnessIntelligenceExchange[]`; the component never loads or persists data itself. Context percentage and its progress bar render only when both `currentContextTokens` and a positive `maxContextTokens` are present.
6159
6159
 
6160
6160
  Token facts are optional in `IHarnessSessionMetrics` (bind `.metrics` here or
6161
6161
  `.sessionMetrics` on `dees-harness-chat`). Unknown counts stay undefined; zero is
@@ -6209,7 +6209,9 @@ Direct sidebar hosts can set `intelligenceAvailabilityStatus`, `intelligenceUnav
6209
6209
 
6210
6210
  Set `attachedResources` (`IHarnessResourceMeta[]`) to show the terminals, browsers and other host resources attached to the session, between Session Scratchpad and Session Intelligence. `undefined`, the default, leaves the section out; an empty array shows it with "No resources attached." Each row shows the resource's icon, title and state over its kind and preview, and is one button that emits `harness-attached-resource-open` with `{ resource }` (`IHarnessAttachedResourceOpenDetail`), bubbling and composed; the host opens the resource. `DeesHarnessChat` forwards `attachedResources`, and a defined value keeps its session panel available.
6211
6211
 
6212
- `openSection(section)` expands and focuses an available section and returns false when that section has no current content. Its argument is the exported `THarnessSessionSidebarSection` union: `'tasks' | 'activity' | 'metrics' | 'scratchpad' | 'resources' | 'intelligence'`.
6212
+ Set `workers` (`IHarnessSessionMeta[]`) to list the sessions this session runs, such as a driver's workers, right after Tasks. `undefined`, the default, leaves the section out; an empty array shows it with "No workers." The panel opens on Workers when there are workers and no tasks. Each row shows the worker's icon (else its harness's, else a bot), title and `statusLabel`, coloured by `state`, over its harness name and preview, and is one button that emits `harness-worker-open` with `{ worker }` (`IHarnessWorkerOpenDetail`), bubbling and composed; the host opens the worker. `selectedWorkerId` marks the row of the worker the host shows with `aria-current="true"`. `DeesHarnessChat` forwards `workers` and `selectedWorkerId`, and a defined `workers` keeps its session panel available.
6213
+
6214
+ `openSection(section)` expands and focuses an available section and returns false when that section has no current content. Its argument is the exported `THarnessSessionSidebarSection` union: `'tasks' | 'workers' | 'activity' | 'metrics' | 'scratchpad' | 'resources' | 'intelligence'`.
6213
6215
 
6214
6216
  #### `DeesHarnessSidebar`
6215
6217
 
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@design.estate/dees-catalog',
6
- version: '21.50.0',
6
+ version: '21.51.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
  }
@@ -28,6 +28,7 @@ import type {
28
28
  IHarnessIntelligenceAvailabilityAction,
29
29
  IHarnessIntelligenceExchange,
30
30
  IHarnessScratchpad,
31
+ IHarnessSessionMeta,
31
32
  IHarnessSessionMetrics,
32
33
  IHarnessStarterPrompt,
33
34
  IHarnessStarterPromptDetail,
@@ -162,6 +163,14 @@ export class DeesHarnessChat extends DeesElement {
162
163
  @property({ attribute: false })
163
164
  accessor attachedResources: IHarnessResourceMeta[] | undefined = undefined;
164
165
 
166
+ /** The sessions this session runs, forwarded to the session sidebar; `undefined` leaves the section out. */
167
+ @property({ attribute: false })
168
+ accessor workers: IHarnessSessionMeta[] | undefined = undefined;
169
+
170
+ /** Forwarded to the session sidebar; see `DeesHarnessSessionSidebar.selectedWorkerId`. */
171
+ @property({ reflect: true })
172
+ accessor selectedWorkerId: string = '';
173
+
165
174
  @property({ type: Boolean, reflect: true })
166
175
  accessor sessionIntelligenceEnabled: boolean = false;
167
176
 
@@ -722,6 +731,7 @@ export class DeesHarnessChat extends DeesElement {
722
731
  || Object.values(this.sessionMetrics).some((value) => value !== undefined)
723
732
  || this.scratchpad !== undefined
724
733
  || this.attachedResources !== undefined
734
+ || this.workers !== undefined
725
735
  || this.sessionIntelligenceEnabled
726
736
  );
727
737
  }
@@ -869,6 +879,8 @@ export class DeesHarnessChat extends DeesElement {
869
879
  .scratchpadBusy=${this.scratchpadBusy}
870
880
  .scratchpadError=${this.scratchpadError}
871
881
  .attachedResources=${this.attachedResources}
882
+ .workers=${this.workers}
883
+ .selectedWorkerId=${this.selectedWorkerId}
872
884
  .intelligenceEnabled=${this.sessionIntelligenceEnabled}
873
885
  .intelligenceAvailabilityStatus=${this.intelligenceAvailabilityStatus}
874
886
  .intelligenceUnavailableReason=${this.intelligenceUnavailableReason}
@@ -6,6 +6,7 @@ import type {
6
6
  IHarnessIntelligenceExchange,
7
7
  IHarnessResourceMeta,
8
8
  IHarnessScratchpad,
9
+ IHarnessSessionMeta,
9
10
  IHarnessSessionMetrics,
10
11
  IHarnessTodoItem,
11
12
  } from '../interfaces.js';
@@ -62,6 +63,33 @@ const attachedResources: IHarnessResourceMeta[] = [
62
63
  },
63
64
  ];
64
65
 
66
+ const workers: IHarnessSessionMeta[] = [
67
+ {
68
+ id: 'worker-checkout',
69
+ title: 'checkout-cache',
70
+ state: 'working',
71
+ statusLabel: 'Working',
72
+ harness: { id: 'claude', name: 'Claude Code' },
73
+ preview: 'SHOP-41 · Cache keys use the route manifest hash',
74
+ },
75
+ {
76
+ id: 'worker-release',
77
+ title: 'release-notes',
78
+ state: 'attention',
79
+ statusLabel: 'Needs input',
80
+ harness: { id: 'codex', name: 'Codex' },
81
+ preview: 'SHOP-44 · Which version goes out first?',
82
+ },
83
+ {
84
+ id: 'worker-audit',
85
+ title: 'license-audit',
86
+ state: 'finished',
87
+ statusLabel: 'Stopped',
88
+ harness: { id: 'claude', name: 'Claude Code' },
89
+ preview: 'SHOP-39',
90
+ },
91
+ ];
92
+
65
93
  const draftScratchpad: IHarnessScratchpad = {
66
94
  id: 'draft',
67
95
  text: '',
@@ -89,7 +117,7 @@ const showEvent = (event: CustomEvent) => {
89
117
  });
90
118
  };
91
119
 
92
- export const demoFunc = () => demoPage('Session details', 'Tasks, context usage, scratchpad, attached resources and session intelligence alongside a conversation.', html`
120
+ export const demoFunc = () => demoPage('Session details', 'Tasks, workers, context usage, scratchpad, attached resources and session intelligence alongside a conversation.', html`
93
121
  <style>
94
122
  .harnessSessionSidebarDemos {
95
123
  display: flex;
@@ -129,6 +157,15 @@ export const demoFunc = () => demoPage('Session details', 'Tasks, context usage,
129
157
  @harness-scratchpad-input=${showEvent}
130
158
  ></dees-harness-session-sidebar>
131
159
  </div>
160
+ <div class="harnessSessionSidebarDemo">
161
+ <dees-harness-session-sidebar
162
+ .showTasks=${false}
163
+ .workers=${workers}
164
+ selectedWorkerId="worker-release"
165
+ .scratchpad=${scratchpad}
166
+ @harness-worker-open=${showEvent}
167
+ ></dees-harness-session-sidebar>
168
+ </div>
132
169
  <div class="harnessSessionSidebarDemo">
133
170
  <dees-harness-session-sidebar
134
171
  .showTasks=${false}
@@ -27,10 +27,12 @@ import type {
27
27
  IHarnessScratchpadSaveDetail,
28
28
  IHarnessSessionIntelligenceAskDetail,
29
29
  IHarnessSessionIntelligenceAvailabilityActionDetail,
30
+ IHarnessSessionMeta,
30
31
  IHarnessSessionMetrics,
31
32
  IHarnessSubtaskOpenDetail,
32
33
  IHarnessTodoItem,
33
34
  IHarnessToolCall,
35
+ IHarnessWorkerOpenDetail,
34
36
  THarnessIntelligenceAvailabilityStatus,
35
37
  } from '../interfaces.js';
36
38
  import {
@@ -49,7 +51,7 @@ import '../../00group-utility/dees-icon/dees-icon.js';
49
51
  const { repeat } = directives;
50
52
 
51
53
  export type THarnessSessionSidebarSection =
52
- 'tasks' | 'activity' | 'metrics' | 'scratchpad' | 'resources' | 'intelligence';
54
+ 'tasks' | 'workers' | 'activity' | 'metrics' | 'scratchpad' | 'resources' | 'intelligence';
53
55
 
54
56
  interface IToolActivityEntry {
55
57
  key: string;
@@ -109,6 +111,18 @@ export class DeesHarnessSessionSidebar extends DeesElement {
109
111
  @property({ attribute: false })
110
112
  accessor attachedResources: IHarnessResourceMeta[] | undefined = undefined;
111
113
 
114
+ /**
115
+ * The sessions this session runs, such as a driver's workers, in the order the host wants them
116
+ * read. `undefined` leaves the section out; an empty list shows it with its empty state. A row
117
+ * emits `harness-worker-open`; the host opens the worker.
118
+ */
119
+ @property({ attribute: false })
120
+ accessor workers: IHarnessSessionMeta[] | undefined = undefined;
121
+
122
+ /** The id of the worker the host shows; its row is marked current. Empty while none is shown. */
123
+ @property({ reflect: true })
124
+ accessor selectedWorkerId: string = '';
125
+
112
126
  @property({ type: Boolean, reflect: true })
113
127
  accessor intelligenceEnabled: boolean = false;
114
128
 
@@ -512,6 +526,25 @@ export class DeesHarnessSessionSidebar extends DeesElement {
512
526
  white-space: nowrap;
513
527
  }
514
528
 
529
+ .workerItem[aria-current='true'] {
530
+ background: var(--dees-color-fill-secondary);
531
+ }
532
+
533
+ .workerItem.state-working .resourceIcon,
534
+ .workerItem.state-working .resourceState {
535
+ color: var(--dees-color-accent-primary);
536
+ }
537
+
538
+ .workerItem.state-attention .resourceIcon,
539
+ .workerItem.state-attention .resourceState {
540
+ color: var(--dees-color-text-warning);
541
+ }
542
+
543
+ .workerItem.state-error .resourceIcon,
544
+ .workerItem.state-error .resourceState {
545
+ color: var(--dees-color-text-error);
546
+ }
547
+
515
548
  .activityMeta {
516
549
  margin-top: var(--dees-spacing-2xs);
517
550
  color: var(--dees-color-text-muted);
@@ -864,6 +897,7 @@ export class DeesHarnessSessionSidebar extends DeesElement {
864
897
  return html`
865
898
  <div class="sidebar">
866
899
  ${this.showTasks ? this.renderTasks() : ''}
900
+ ${this.workers ? this.renderWorkers() : ''}
867
901
  ${this.toolActivityEntries.length ? this.renderToolActivity() : ''}
868
902
  ${this.hasMetrics ? this.renderMetrics() : ''}
869
903
  ${this.scratchpad ? this.renderScratchpad() : ''}
@@ -893,6 +927,7 @@ export class DeesHarnessSessionSidebar extends DeesElement {
893
927
  private get availableSections(): THarnessSessionSidebarSection[] {
894
928
  return [
895
929
  ...(this.showTasks ? ['tasks' as const] : []),
930
+ ...(this.workers ? ['workers' as const] : []),
896
931
  ...(this.toolActivityEntries.length ? ['activity' as const] : []),
897
932
  ...(this.hasMetrics ? ['metrics' as const] : []),
898
933
  ...(this.scratchpad ? ['scratchpad' as const] : []),
@@ -903,6 +938,7 @@ export class DeesHarnessSessionSidebar extends DeesElement {
903
938
 
904
939
  private get defaultExpandedSection(): THarnessSessionSidebarSection | undefined {
905
940
  if (this.showTasks && this.todos.length > 0) return 'tasks';
941
+ if (this.workers?.length) return 'workers';
906
942
  if (this.toolActivityEntries.length) return 'activity';
907
943
  if (this.hasMetrics) return 'metrics';
908
944
  if (this.scratchpad) return 'scratchpad';
@@ -1254,6 +1290,66 @@ export class DeesHarnessSessionSidebar extends DeesElement {
1254
1290
  );
1255
1291
  }
1256
1292
 
1293
+ private renderWorkers(): TemplateResult {
1294
+ const workers = this.workers ?? [];
1295
+ return this.renderSection(
1296
+ 'workers',
1297
+ this.t('sidebar.workers'),
1298
+ 'lucide:Users',
1299
+ workers.length
1300
+ ? html`
1301
+ <div class="resourceList">
1302
+ ${repeat(
1303
+ workers,
1304
+ (worker) => worker.id,
1305
+ (worker) => this.renderWorker(worker),
1306
+ )}
1307
+ </div>
1308
+ `
1309
+ : html`<div class="empty">${this.t('sidebar.noWorkers')}</div>`,
1310
+ workers.length ? this.t.format.number(workers.length) : '',
1311
+ );
1312
+ }
1313
+
1314
+ /** One worker: its harness, name and state over what it works on, as one button that opens it. */
1315
+ private renderWorker(workerArg: IHarnessSessionMeta): TemplateResult {
1316
+ const title = workerArg.title || workerArg.id;
1317
+ const meta = [workerArg.harness?.name, workerArg.preview?.trim()].filter(Boolean).join(' · ');
1318
+ const current = this.selectedWorkerId !== '' && this.selectedWorkerId === workerArg.id;
1319
+ return html`
1320
+ <button
1321
+ class=${`resourceItem workerItem state-${workerArg.state ?? 'normal'}`}
1322
+ type="button"
1323
+ data-worker-id=${workerArg.id}
1324
+ aria-current=${current ? 'true' : 'false'}
1325
+ aria-label=${this.t('sidebar.openWorker', { title })}
1326
+ @click=${() => this.openWorker(workerArg)}
1327
+ >
1328
+ <span class="resourceIcon">
1329
+ <dees-icon icon=${workerArg.icon || workerArg.harness?.icon || 'lucide:Bot'} iconSize="13"></dees-icon>
1330
+ </span>
1331
+ <span class="resourceCopy">
1332
+ <span class="resourceTitleRow">
1333
+ <span class="resourceTitle" title=${title}>${title}</span>
1334
+ ${workerArg.statusLabel ? html`<span class="resourceState">${workerArg.statusLabel}</span>` : ''}
1335
+ </span>
1336
+ ${meta
1337
+ ? html`<dees-harness-overflow-text class="resourceMeta" title=${meta}>${meta}</dees-harness-overflow-text>`
1338
+ : ''}
1339
+ </span>
1340
+ </button>
1341
+ `;
1342
+ }
1343
+
1344
+ private openWorker(workerArg: IHarnessSessionMeta): void {
1345
+ const detail: IHarnessWorkerOpenDetail = { worker: workerArg };
1346
+ this.dispatchEvent(new CustomEvent('harness-worker-open', {
1347
+ detail,
1348
+ bubbles: true,
1349
+ composed: true,
1350
+ }));
1351
+ }
1352
+
1257
1353
  private renderAttachedResources(): TemplateResult {
1258
1354
  const resources = this.attachedResources ?? [];
1259
1355
  return this.renderSection(
@@ -788,6 +788,11 @@ export interface IHarnessAttachedResourceOpenDetail<TState extends string = stri
788
788
  resource: IHarnessResourceMeta<TState>;
789
789
  }
790
790
 
791
+ /** Detail of `harness-worker-open`, fired by a row of the session sidebar's workers. */
792
+ export interface IHarnessWorkerOpenDetail {
793
+ worker: IHarnessSessionMeta;
794
+ }
795
+
791
796
  /**
792
797
  * Attaching is an explicit choice, never an accident of reordering: a drag only attaches when it
793
798
  * is released on the centre of a row, and the edges of that same row stay positional. Keyboard
package/ts_web/i18n/de.ts CHANGED
@@ -1232,6 +1232,9 @@ export default dcMessages.translation('de', {
1232
1232
  'sidebar.attachedResources': 'Angehängte Ressourcen',
1233
1233
  'sidebar.noAttachedResources': 'Keine Ressourcen angehängt.',
1234
1234
  'sidebar.openResource': '{title} öffnen',
1235
+ 'sidebar.workers': 'Worker',
1236
+ 'sidebar.noWorkers': 'Keine Worker.',
1237
+ 'sidebar.openWorker': '{title} öffnen',
1235
1238
  'sidebar.intelligence': 'Sitzungsassistent',
1236
1239
  'sidebar.checking': 'Verfügbarkeit von {heading} wird geprüft …',
1237
1240
  'sidebar.unavailable': '{heading} ist nicht verfügbar.',
@@ -1286,6 +1286,9 @@ export const dcMessages = plugins.smarti18n.defineCatalog({
1286
1286
  'sidebar.attachedResources': { message: 'Attached Resources', description: 'The section of the resources attached to the session, such as terminals and browsers.' },
1287
1287
  'sidebar.noAttachedResources': { message: 'No resources attached.', description: 'Said in that section while nothing is attached to the session.' },
1288
1288
  'sidebar.openResource': { message: 'Open {title}', description: 'An attached resource\'s row (its name); {title} is the resource\'s name.' },
1289
+ 'sidebar.workers': { message: 'Workers', description: 'The section of the sessions this session runs, such as a driver\'s workers.' },
1290
+ 'sidebar.noWorkers': { message: 'No workers.', description: 'Said in that section while the session runs none.' },
1291
+ 'sidebar.openWorker': { message: 'Open {title}', description: 'A worker\'s row (its name); {title} is the worker\'s name.' },
1289
1292
  'sidebar.intelligence': { message: 'Session Intelligence', description: 'The name of the section that answers questions about the session, while the host names none.' },
1290
1293
  'sidebar.checking': { message: 'Checking {heading} availability…', description: 'Said while it is checked whether that section can answer; {heading} is its name.' },
1291
1294
  'sidebar.unavailable': { message: '{heading} is unavailable.', description: 'Said when that section cannot answer.' },