@design.estate/dees-catalog 4.12.0 → 6.0.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 (37) hide show
  1. package/dist_bundle/bundle.js +2719 -1261
  2. package/dist_ts_web/00_commitinfo_data.js +2 -2
  3. package/dist_ts_web/elements/00group-harness/dees-harness-chat/dees-harness-chat.d.ts +23 -4
  4. package/dist_ts_web/elements/00group-harness/dees-harness-chat/dees-harness-chat.demo.js +290 -78
  5. package/dist_ts_web/elements/00group-harness/dees-harness-chat/dees-harness-chat.js +419 -42
  6. package/dist_ts_web/elements/00group-harness/dees-harness-message/dees-harness-message.js +44 -3
  7. package/dist_ts_web/elements/00group-harness/dees-harness-reasoning/dees-harness-reasoning.js +5 -7
  8. package/dist_ts_web/elements/00group-harness/dees-harness-session-list/dees-harness-session-list.js +5 -2
  9. package/dist_ts_web/elements/00group-harness/dees-harness-session-sidebar/dees-harness-session-sidebar.d.ts +54 -0
  10. package/dist_ts_web/elements/00group-harness/dees-harness-session-sidebar/dees-harness-session-sidebar.demo.d.ts +1 -0
  11. package/dist_ts_web/elements/00group-harness/dees-harness-session-sidebar/dees-harness-session-sidebar.demo.js +56 -0
  12. package/dist_ts_web/elements/00group-harness/dees-harness-session-sidebar/dees-harness-session-sidebar.js +870 -0
  13. package/dist_ts_web/elements/00group-harness/dees-harness-session-sidebar/index.d.ts +1 -0
  14. package/dist_ts_web/elements/00group-harness/dees-harness-session-sidebar/index.js +2 -0
  15. package/dist_ts_web/elements/00group-harness/dees-harness-tool-card/dees-harness-tool-card.d.ts +5 -0
  16. package/dist_ts_web/elements/00group-harness/dees-harness-tool-card/dees-harness-tool-card.js +87 -3
  17. package/dist_ts_web/elements/00group-harness/harness.markdown.js +3 -1
  18. package/dist_ts_web/elements/00group-harness/harness.styles.js +48 -1
  19. package/dist_ts_web/elements/00group-harness/index.d.ts +1 -0
  20. package/dist_ts_web/elements/00group-harness/index.js +2 -1
  21. package/dist_ts_web/elements/00group-harness/interfaces.d.ts +41 -0
  22. package/package.json +1 -1
  23. package/readme.md +13 -5
  24. package/ts_web/00_commitinfo_data.ts +1 -1
  25. package/ts_web/elements/00group-harness/dees-harness-chat/dees-harness-chat.demo.ts +277 -79
  26. package/ts_web/elements/00group-harness/dees-harness-chat/dees-harness-chat.ts +367 -36
  27. package/ts_web/elements/00group-harness/dees-harness-message/dees-harness-message.ts +43 -2
  28. package/ts_web/elements/00group-harness/dees-harness-reasoning/dees-harness-reasoning.ts +4 -6
  29. package/ts_web/elements/00group-harness/dees-harness-session-list/dees-harness-session-list.ts +4 -1
  30. package/ts_web/elements/00group-harness/dees-harness-session-sidebar/dees-harness-session-sidebar.demo.ts +67 -0
  31. package/ts_web/elements/00group-harness/dees-harness-session-sidebar/dees-harness-session-sidebar.ts +802 -0
  32. package/ts_web/elements/00group-harness/dees-harness-session-sidebar/index.ts +1 -0
  33. package/ts_web/elements/00group-harness/dees-harness-tool-card/dees-harness-tool-card.ts +79 -1
  34. package/ts_web/elements/00group-harness/harness.markdown.ts +2 -0
  35. package/ts_web/elements/00group-harness/harness.styles.ts +47 -0
  36. package/ts_web/elements/00group-harness/index.ts +1 -0
  37. package/ts_web/elements/00group-harness/interfaces.ts +48 -0
@@ -0,0 +1 @@
1
+ export * from './dees-harness-session-sidebar.js';
@@ -69,6 +69,9 @@ export class DeesHarnessToolCard extends DeesElement {
69
69
  @state()
70
70
  accessor returnFlash: boolean = false;
71
71
 
72
+ @state()
73
+ accessor outcomeScanTone: 'success' | 'error' | null = null;
74
+
72
75
  private bodyResizeObserver: ResizeObserver | null = null;
73
76
  private observedBodyInner: Element | null = null;
74
77
  private fullscreenPortal: HTMLElementTagNameMap['dees-harness-tool-fullscreen'] | null = null;
@@ -332,6 +335,30 @@ export class DeesHarnessToolCard extends DeesElement {
332
335
  transform-origin: center;
333
336
  }
334
337
 
338
+ .harness-card.outcomeScan {
339
+ --harness-outcome-scan-color: var(--dees-color-accent-success);
340
+ }
341
+
342
+ .harness-card.outcomeScan-error {
343
+ --harness-outcome-scan-color: var(--dees-color-accent-error);
344
+ }
345
+
346
+ .harness-card.outcomeScan::after {
347
+ content: '';
348
+ position: absolute;
349
+ inset: 0;
350
+ pointer-events: none;
351
+ background: linear-gradient(
352
+ 105deg,
353
+ transparent 40%,
354
+ color-mix(in srgb, var(--harness-outcome-scan-color) 3%, transparent) 45%,
355
+ color-mix(in srgb, var(--harness-outcome-scan-color) 14%, transparent) 50%,
356
+ color-mix(in srgb, var(--harness-outcome-scan-color) 3%, transparent) 55%,
357
+ transparent 60%
358
+ ) 100% 0 / 250% 100% no-repeat;
359
+ animation: harness-tool-outcome-scan 0.48s linear 0.08s both;
360
+ }
361
+
335
362
  @keyframes harness-card-return-flash {
336
363
  0%, 100% {
337
364
  transform: scale(1);
@@ -341,10 +368,20 @@ export class DeesHarnessToolCard extends DeesElement {
341
368
  }
342
369
  }
343
370
 
371
+ @keyframes harness-tool-outcome-scan {
372
+ from { background-position: 100% 0; }
373
+ to { background-position: 0 0; }
374
+ }
375
+
344
376
  @media (prefers-reduced-motion: reduce) {
345
377
  .harness-card.returnFlash {
346
378
  animation: none;
347
379
  }
380
+
381
+ .harness-card.outcomeScan::after {
382
+ animation: none;
383
+ opacity: 0;
384
+ }
348
385
  }
349
386
  `,
350
387
  ];
@@ -376,10 +413,12 @@ export class DeesHarnessToolCard extends DeesElement {
376
413
  const statusTone = call.isError ? 'error' : call.status === 'completed' ? 'success' : call.status;
377
414
  const duration = harnessFormatDuration(call.startedAt, call.finishedAt);
378
415
  return html`
379
- <div class="harness-card status-${call.isError ? 'error' : call.status} ${descriptor.destructive ? 'destructive' : ''} ${this.returnFlash ? 'returnFlash' : ''}"
416
+ <div class="harness-card status-${call.isError ? 'error' : call.status} ${descriptor.destructive ? 'destructive' : ''} ${this.returnFlash ? 'returnFlash' : ''} ${this.outcomeScanTone ? `outcomeScan outcomeScan-${this.outcomeScanTone}` : ''}"
380
417
  @animationend=${(event: AnimationEvent) => {
381
418
  if (event.animationName === 'harness-card-return-flash') {
382
419
  this.endReturnFlash();
420
+ } else if (event.animationName === 'harness-tool-outcome-scan') {
421
+ this.endOutcomeScan();
383
422
  }
384
423
  }}
385
424
  >
@@ -444,6 +483,7 @@ export class DeesHarnessToolCard extends DeesElement {
444
483
  };
445
484
 
446
485
  private flashFallbackTimeout: ReturnType<typeof setTimeout> | null = null;
486
+ private outcomeScanFallbackTimeout: ReturnType<typeof setTimeout> | null = null;
447
487
 
448
488
  private readonly closeFullscreen = (): void => {
449
489
  const portal = this.fullscreenPortal;
@@ -480,8 +520,42 @@ export class DeesHarnessToolCard extends DeesElement {
480
520
  }));
481
521
  }
482
522
 
523
+ private startOutcomeScan(toneArg: 'success' | 'error'): void {
524
+ if (this.outcomeScanFallbackTimeout) clearTimeout(this.outcomeScanFallbackTimeout);
525
+ this.outcomeScanTone = toneArg;
526
+ this.outcomeScanFallbackTimeout = setTimeout(() => this.endOutcomeScan(), 750);
527
+ }
528
+
529
+ private endOutcomeScan(): void {
530
+ if (this.outcomeScanFallbackTimeout) {
531
+ clearTimeout(this.outcomeScanFallbackTimeout);
532
+ this.outcomeScanFallbackTimeout = null;
533
+ }
534
+ this.outcomeScanTone = null;
535
+ }
536
+
537
+ public willUpdate(changedProperties: Map<PropertyKey, unknown>): void {
538
+ super.willUpdate(changedProperties);
539
+ const previousCall = changedProperties.get('call') as IHarnessToolCall | undefined;
540
+ if (!previousCall || previousCall.id !== this.call.id) return;
541
+ const wasActive = previousCall.status === 'pending' || previousCall.status === 'running';
542
+ const outcomeTone = this.call.status === 'error' || this.call.isError
543
+ ? 'error'
544
+ : this.call.status === 'completed'
545
+ ? 'success'
546
+ : null;
547
+ if (wasActive && outcomeTone) {
548
+ this.startOutcomeScan(outcomeTone);
549
+ } else if (!outcomeTone && this.outcomeScanTone) {
550
+ this.endOutcomeScan();
551
+ }
552
+ }
553
+
483
554
  public updated(changedProperties: Map<PropertyKey, unknown>): void {
484
555
  super.updated(changedProperties);
556
+ if (changedProperties.has('call') && this.fullscreenPortal) {
557
+ this.fullscreenPortal.call = this.enrichedCall;
558
+ }
485
559
  if (this.uncapped) return;
486
560
  const bodyInner = this.shadowRoot?.querySelector('.bodyInner') ?? null;
487
561
  if (bodyInner === this.observedBodyInner) return;
@@ -505,6 +579,10 @@ export class DeesHarnessToolCard extends DeesElement {
505
579
  clearTimeout(this.flashFallbackTimeout);
506
580
  this.flashFallbackTimeout = null;
507
581
  }
582
+ if (this.outcomeScanFallbackTimeout) {
583
+ clearTimeout(this.outcomeScanFallbackTimeout);
584
+ this.outcomeScanFallbackTimeout = null;
585
+ }
508
586
  this.fullscreenPortal?.remove();
509
587
  this.fullscreenPortal = null;
510
588
  this.bodyResizeObserver?.disconnect();
@@ -127,12 +127,14 @@ export const markdownStyles: CSSResult = css`
127
127
  .markdown-body table {
128
128
  margin: var(--dees-spacing-sm) 0;
129
129
  border-collapse: collapse;
130
+ color: var(--dees-color-text-primary);
130
131
  font-size: 0.95em;
131
132
  }
132
133
  .markdown-body th,
133
134
  .markdown-body td {
134
135
  padding: 4px 10px;
135
136
  border: 1px solid var(--dees-color-border-default);
137
+ color: var(--dees-color-text-primary);
136
138
  text-align: left;
137
139
  }
138
140
  .markdown-body th {
@@ -7,6 +7,7 @@ import { css, type CSSResult } from '@design.estate/dees-element';
7
7
  */
8
8
  export const harnessCardStyles: CSSResult = css`
9
9
  .harness-card {
10
+ position: relative;
10
11
  border: 1px solid var(--dees-color-border-subtle);
11
12
  border-left: 2px solid var(--dees-color-border-default);
12
13
  border-radius: var(--dees-radius-lg);
@@ -18,6 +19,29 @@ export const harnessCardStyles: CSSResult = css`
18
19
  .harness-card.status-pending {
19
20
  border-left-color: var(--dees-color-accent-primary);
20
21
  }
22
+ .harness-card.status-running::before,
23
+ .harness-card.status-pending::before,
24
+ .harness-card.outcomeScan::before {
25
+ content: '';
26
+ position: absolute;
27
+ inset: 0;
28
+ pointer-events: none;
29
+ background:
30
+ linear-gradient(
31
+ 105deg,
32
+ transparent 40%,
33
+ color-mix(in srgb, var(--dees-color-accent-primary) 6%, transparent) 45%,
34
+ color-mix(in srgb, var(--dees-color-accent-primary) 20%, transparent) 50%,
35
+ color-mix(in srgb, var(--dees-color-accent-primary) 6%, transparent) 55%,
36
+ transparent 60%
37
+ ) 100% 0 / 250% 100% no-repeat;
38
+ animation: harness-card-running-scan 2s linear infinite;
39
+ opacity: 1;
40
+ transition: opacity 0.18s var(--dees-ease-out);
41
+ }
42
+ .harness-card.outcomeScan::before {
43
+ opacity: 0;
44
+ }
21
45
  .harness-card.status-completed {
22
46
  border-left-color: var(--dees-color-accent-success);
23
47
  }
@@ -27,6 +51,29 @@ export const harnessCardStyles: CSSResult = css`
27
51
  .harness-card.destructive {
28
52
  border-left-color: var(--dees-color-accent-error);
29
53
  }
54
+
55
+ @keyframes harness-card-running-scan {
56
+ from { background-position: 100% 0; }
57
+ to { background-position: 0 0; }
58
+ }
59
+
60
+ @media (prefers-reduced-motion: reduce) {
61
+ .harness-card.status-running,
62
+ .harness-card.status-pending {
63
+ background: color-mix(
64
+ in srgb,
65
+ var(--dees-color-accent-primary) 8%,
66
+ var(--dees-color-bg-secondary)
67
+ );
68
+ }
69
+ .harness-card.status-running::before,
70
+ .harness-card.status-pending::before,
71
+ .harness-card.outcomeScan::before {
72
+ animation: none;
73
+ opacity: 0;
74
+ transition: none;
75
+ }
76
+ }
30
77
  `;
31
78
 
32
79
  export const harnessPillStyles: CSSResult = css`
@@ -17,6 +17,7 @@ export * from './dees-harness-question-card/index.js';
17
17
  export * from './dees-harness-message-list/index.js';
18
18
  export * from './dees-harness-reasoning/index.js';
19
19
  export * from './dees-harness-session-list/index.js';
20
+ export * from './dees-harness-session-sidebar/index.js';
20
21
  export * from './dees-terminal-view/index.js';
21
22
  export * from './dees-harness-status/index.js';
22
23
  export * from './dees-harness-todos/index.js';
@@ -43,6 +43,54 @@ export interface IHarnessUsage {
43
43
  cacheWriteTokens?: number;
44
44
  }
45
45
 
46
+ /** Session-level token facts. Unknown metrics stay undefined. */
47
+ export interface IHarnessSessionMetrics {
48
+ /** Cumulative token usage across the complete session. */
49
+ lifetimeUsedTokens?: number;
50
+ /** Number of completed context compactions. */
51
+ compactionCount?: number;
52
+ /** Context-token total immediately before the newest compaction. */
53
+ tokensBeforeLatestCompaction?: number;
54
+ /** Context window of the model that produced currentContextTokens. */
55
+ maxContextTokens?: number;
56
+ /** Current active context-token total. */
57
+ currentContextTokens?: number;
58
+ }
59
+
60
+ export type THarnessScratchpadUpdater = 'user' | 'intelligence';
61
+
62
+ export interface IHarnessScratchpad {
63
+ /** Stable session-scoped identity; a changed id resets local editor state. */
64
+ id: string;
65
+ text: string;
66
+ /** Monotonic persistence revision used for optimistic concurrency. */
67
+ revision: number;
68
+ updatedAt?: number;
69
+ updatedBy?: THarnessScratchpadUpdater;
70
+ }
71
+
72
+ export interface IHarnessScratchpadSaveDetail {
73
+ text: string;
74
+ expectedRevision: number;
75
+ }
76
+
77
+ export type THarnessIntelligenceStatus = 'running' | 'completed' | 'error';
78
+
79
+ export interface IHarnessIntelligenceExchange {
80
+ id: string;
81
+ question: string;
82
+ status: THarnessIntelligenceStatus;
83
+ answer?: string;
84
+ error?: string;
85
+ model?: string;
86
+ createdAt: number;
87
+ completedAt?: number;
88
+ }
89
+
90
+ export interface IHarnessSessionIntelligenceAskDetail {
91
+ question: string;
92
+ }
93
+
46
94
  export interface IHarnessMessage {
47
95
  /** stable id — used as the keyed-repeat key; never reuse across messages */
48
96
  id: string;