@2lab.ai/ui 0.0.0-stage → 0.1.1
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/README.md +54 -2
- package/dist/agent-inbox.js +1061 -0
- package/dist/agent-inbox.js.map +1 -0
- package/dist/agent-queue.js +1610 -0
- package/dist/agent-queue.js.map +1 -0
- package/dist/agent-run.js +859 -0
- package/dist/agent-run.js.map +1 -0
- package/dist/ai-answer.js +687 -0
- package/dist/ai-answer.js.map +1 -0
- package/dist/components/agent-inbox/agent-inbox.d.ts +158 -0
- package/dist/components/agent-inbox/index.d.ts +2 -0
- package/dist/components/agent-inbox/styles.d.ts +6 -0
- package/dist/components/agent-queue/agent-queue.d.ts +41 -0
- package/dist/components/agent-queue/index.d.ts +6 -0
- package/dist/components/agent-queue/logic.d.ts +261 -0
- package/dist/components/agent-queue/strings.d.ts +473 -0
- package/dist/components/agent-queue/styles.d.ts +8 -0
- package/dist/components/agent-run/agent-run.d.ts +273 -0
- package/dist/components/agent-run/index.d.ts +2 -0
- package/dist/components/agent-run/styles.d.ts +6 -0
- package/dist/components/ai-answer/ai-answer.d.ts +92 -0
- package/dist/components/ai-answer/index.d.ts +2 -0
- package/dist/components/ai-answer/styles.d.ts +2 -0
- package/dist/components/context-window/context-window.d.ts +156 -0
- package/dist/components/context-window/index.d.ts +2 -0
- package/dist/components/context-window/styles.d.ts +2 -0
- package/dist/components/memory-panel/index.d.ts +2 -0
- package/dist/components/memory-panel/memory-panel.d.ts +101 -0
- package/dist/components/memory-panel/styles.d.ts +2 -0
- package/dist/components/model-picker/index.d.ts +2 -0
- package/dist/components/model-picker/model-picker.d.ts +136 -0
- package/dist/components/model-picker/morph.d.ts +9 -0
- package/dist/components/model-picker/styles.d.ts +6 -0
- package/dist/context-window.js +384 -0
- package/dist/context-window.js.map +1 -0
- package/dist/core/element.d.ts +39 -0
- package/dist/core/format.d.ts +14 -0
- package/dist/core/html.d.ts +10 -0
- package/dist/core/tokens.d.ts +14 -0
- package/dist/format-BBGWXPzk.js +51 -0
- package/dist/format-BBGWXPzk.js.map +1 -0
- package/dist/html-DZWnrdcg.js +167 -0
- package/dist/html-DZWnrdcg.js.map +1 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +116 -0
- package/dist/index.js.map +1 -0
- package/dist/memory-panel.js +1255 -0
- package/dist/memory-panel.js.map +1 -0
- package/dist/model-picker.js +858 -0
- package/dist/model-picker.js.map +1 -0
- package/dist/tokens.css +4 -0
- package/package.json +75 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-run.js","sources":["../src/components/agent-run/styles.ts","../src/components/agent-run/agent-run.ts"],"sourcesContent":["/**\n * Ported from the soma-work dashboard session panel (.prd/affectui/re-agent-run.md): SESSION CHIP (D18), PLAN (D1–D7),\n * 입력 필요 approval cards (D8–D17) and 세부 (D19). Every colour is a token or a color-mix of tokens, so light and dark\n * follow the host tokens; the screen is one container (two columns from 760px), each approval card is its own.\n */\nexport const styles = `\n:host { --ar-wait-text: color-mix(in srgb, var(--st-wait) 74%, var(--text)); }\n.ar { --ar-pad: 16px; container: ar / inline-size; position: relative; overflow: hidden; overflow: clip; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); color: var(--text); font-size: 13px; line-height: 1.45; }\n\n/* ── Head: title · subtitle · status pill · started + live elapsed · Stop ── */\n.ar-head { padding: 14px var(--ar-pad) 12px; }\n.ar-title { margin: 0; font-size: 15px; font-weight: 650; line-height: 22px; letter-spacing: -0.005em; color: var(--text); overflow-wrap: anywhere; }\n.ar-title:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; border-radius: 4px; }\n.ar-sub { margin: 2px 0 0; font-size: 12px; line-height: 17px; color: var(--text-secondary); overflow-wrap: anywhere; }\n.ps-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; min-width: 0; margin-top: 10px; font-size: 12.5px; color: var(--text-secondary); }\n.ps-chip { --ag-c: var(--text-tertiary); --ag-t: var(--ag-c); display: inline-flex; align-items: center; gap: 5px; min-width: 0; height: 24px; padding: 0 10px 0 8px; border-radius: 99px; background: color-mix(in srgb, var(--ag-c) 13%, transparent); white-space: nowrap; }\n.ps-chip.is-running { --ag-c: var(--st-run); }\n.ps-chip.is-waiting { --ag-c: var(--st-wait); --ag-t: var(--ar-wait-text); }\n.ps-chip.is-done { --ag-c: var(--st-done); }\n.ps-chip.is-failed { --ag-c: var(--st-fail); --ag-t: var(--st-fail-text); }\n.ps-label { font-size: 11px; font-weight: 700; letter-spacing: 0.02em; color: var(--text-tertiary); }\n.ps-icon { display: inline-grid; place-items: center; width: 14px; height: 14px; color: var(--ag-c); }\n.ps-icon svg { width: 12px; height: 12px; }\n.ps-icon .ar-spin { width: 10px; height: 10px; }\n.ps-word { font-weight: 650; color: var(--ag-t); }\n.ps-time { display: inline-flex; align-items: center; gap: 5px; min-width: 0; font-variant-numeric: tabular-nums; white-space: nowrap; }\n.ps-clock { display: inline-grid; flex: none; color: var(--text-tertiary); }\n.ps-clock svg { width: 13px; height: 13px; }\n.ps-dot { color: var(--text-tertiary); }\n.ps-actions { display: inline-flex; flex: none; align-items: center; gap: 6px; margin-left: auto; }\n.ar-stop { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 30px; padding: 3px 12px; border: 1px solid var(--ib-card-border); border-radius: 8px; background: var(--ib-card); color: var(--st-fail-text); font-size: 12.5px; font-weight: 500; white-space: nowrap; transition: border-color 150ms ease, transform var(--dur-press) var(--ease-out); }\n.ar-stop:disabled { cursor: not-allowed; opacity: 0.5; }\n.ar-stop:active:not(:disabled) { transform: scale(0.97); }\n\n/* ── Bands: one column (plan → needs input → details); from 760px two — plan + details | side ── */\n.ar-body { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; border-top: 1px solid var(--border); }\n.ar-band { min-width: 0; padding: 10px var(--ar-pad) 12px; }\n.ar-band + .ar-band { border-top: 1px solid var(--border); }\n.ar-sec-h { margin: 0 0 6px; font-size: 12px; font-weight: 700; line-height: 18px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-secondary); }\n@container ar (min-width: 760px) {\n .ar-head, .ar-body { --ar-pad: 20px; }\n .ar-head { padding-top: 16px; padding-bottom: 14px; }\n .ar-band { padding-top: 14px; padding-bottom: 14px; }\n .ar-body[data-side] { grid-template-columns: minmax(0, 1fr) minmax(340px, 440px); grid-template-rows: auto 1fr; }\n .ar-body[data-side] > .ar-band { border-top: 0; }\n .ar-body[data-side] > .ar-plan { grid-area: 1 / 1; }\n .ar-body[data-side=\"needs\"] > .ar-needs { grid-area: 1 / 2 / 3 / 3; align-self: stretch; border-left: 1px solid var(--border); }\n .ar-body[data-side=\"needs\"] > .ar-details { grid-area: 2 / 1; }\n .ar-body[data-side=\"needs\"] > .ar-plan ~ .ar-details { border-top: 1px solid var(--border); }\n .ar-body[data-side=\"details\"] > .ar-details { grid-area: 1 / 2 / 3 / 3; align-self: stretch; border-left: 1px solid var(--border); }\n}\n\n/* ── PLAN: a marker per step (check · spinner · ring · ✕ · dash) on one rail, time on the right, phase foot ── */\n.pl-list { position: relative; margin: 0; padding: 0; list-style: none; }\n.pl-empty { margin: 0; padding: 2px 0 4px; font-size: 12px; color: var(--text-tertiary); }\n.pl-step { position: relative; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; column-gap: 10px; align-items: start; padding: 5px 0; font-size: 12.5px; line-height: 18px; }\n.pl-marker { position: relative; z-index: 1; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 1px var(--ib-card-border); color: var(--text-secondary); }\n.pl-step[data-step=\"done\"] .pl-marker { background: var(--ib-pill); box-shadow: none; color: var(--text); }\n.pl-step[data-step=\"running\"] .pl-marker { box-shadow: none; color: var(--st-run); }\n.pl-step[data-step=\"failed\"] .pl-marker { background: color-mix(in srgb, var(--st-fail) 16%, var(--surface)); box-shadow: none; color: var(--st-fail-text); }\n.pl-step[data-step=\"skipped\"] .pl-marker { box-shadow: none; border: 1px dashed var(--text-tertiary); color: var(--text-tertiary); }\n.pl-marker svg { width: 10px; height: 10px; }\n.pl-marker .ar-spin { width: 11px; height: 11px; }\n.pl-step.pl-pop .pl-marker > * { animation: pl-pop var(--dur-move) var(--ease-out) both; }\n@keyframes pl-pop { from { opacity: 0; transform: scale(0.6); } }\n.pl-list > .pl-step:not(:last-child)::before { content: \"\"; position: absolute; left: 8.5px; top: 25px; bottom: -3px; width: 1px; background: var(--ib-card-border); }\n.pl-list > .pl-step[data-step=\"done\"]:not(:last-child)::after { content: \"\"; position: absolute; left: 8.5px; top: 25px; bottom: -3px; width: 1px; background: var(--text-tertiary); transform-origin: top; }\n.pl-list > .pl-step.pl-pop[data-step=\"done\"]:not(:last-child)::after { animation: pl-rail 560ms var(--ease-out) both; }\n@keyframes pl-rail { from { transform: scaleY(0); } }\n.pl-main { min-width: 0; }\n.pl-line { display: block; overflow-wrap: anywhere; }\n.pl-ref { margin-right: 6px; font-size: 11px; color: var(--text-tertiary); font-variant-numeric: tabular-nums; }\n.pl-text { color: var(--text-secondary); }\n.pl-step[data-step=\"running\"] .pl-text { font-weight: 600; color: var(--text); }\n.pl-step[data-step=\"failed\"] .pl-text { color: var(--text); }\n.pl-step[data-step=\"skipped\"] .pl-text { color: var(--text-tertiary); }\n.pl-chip { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 6px; background: var(--ib-pill); color: var(--text-secondary); font-size: 11px; font-weight: 400; line-height: 16px; white-space: nowrap; font-variant-numeric: tabular-nums; vertical-align: 1px; }\n.pl-sub { display: block; margin-top: 1px; overflow: hidden; font-size: 12px; color: var(--text-tertiary); text-overflow: ellipsis; white-space: nowrap; }\n.pl-step[data-step=\"failed\"] .pl-sub { color: var(--st-fail-text); white-space: normal; overflow-wrap: anywhere; }\n.pl-aside { min-height: 18px; font-size: 12px; color: var(--text-tertiary); font-variant-numeric: tabular-nums; white-space: nowrap; }\n.pl-step[data-step=\"running\"] .pl-aside { color: var(--text); }\n.pl-fold { padding: 0 0 0 28px; }\n.pl-fold-btn { min-height: 28px; padding: 4px 0; border: 0; background: none; color: var(--accent); font-size: 11.5px; font-weight: 600; }\n.pl-fold-btn:hover { text-decoration: underline; }\n.pl-foot { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; gap: 8px; margin: 6px calc(-1 * var(--ar-pad)) -12px; padding: 8px var(--ar-pad) 10px; border-top: 1px solid var(--border); background: var(--surface); font-size: 12.5px; color: var(--text-secondary); }\n.pl-foot-st { display: inline-flex; align-items: center; gap: 7px; min-width: 0; color: var(--text); font-variant-numeric: tabular-nums; }\n.pl-foot-icon { display: inline-grid; place-items: center; width: 14px; height: 14px; color: var(--text-tertiary); }\n.pl-foot[data-phase=\"running\"] .pl-foot-icon { color: var(--st-run); }\n.pl-foot[data-phase=\"done\"] .pl-foot-icon { color: var(--st-done); }\n.pl-foot[data-phase=\"failed\"] .pl-foot-icon { color: var(--st-fail-text); }\n.pl-foot-icon svg { width: 12px; height: 12px; }\n.pl-foot-icon .ar-spin { width: 11px; height: 11px; }\n.pl-foot-time { margin-left: auto; font-variant-numeric: tabular-nums; white-space: nowrap; }\n@container ar (min-width: 760px) { .pl-foot { margin-bottom: -14px; } }\n\n/* ── 입력 필요 / Needs input: a head with the count, then cards in a tray ── */\n.ar-needs { padding-top: 4px; }\n.ar-needs-head { display: flex; align-items: center; gap: 8px; margin: 0; padding: 8px 0; font-size: 13px; font-weight: 650; line-height: 18px; color: var(--text); }\n.ar-needs-head:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; border-radius: 6px; }\n.pn-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: color-mix(in srgb, var(--st-wait) 24%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--st-wait) 55%, transparent); color: var(--text); font-size: 11px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }\n.pn-count.is-pop { animation: pn-pop var(--dur-move) var(--ease-out) both; }\n@keyframes pn-pop { from { opacity: 0; transform: scale(0.6); } }\n.ap-list { display: flex; flex-direction: column; gap: 10px; }\n.ap-card { container: ap / inline-size; position: relative; padding: 4px; border: 1px solid var(--ib-card-border); border-radius: 14px; background: var(--ib-col); color: var(--ib-text); }\n.ap-card:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; }\n.ap-label { padding: 4px 8px 6px; overflow: hidden; font-size: 12px; line-height: 16px; color: var(--ib-muted); white-space: nowrap; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }\n.ap-body { padding: 14px; border-radius: 11px; background: var(--ib-card); box-shadow: 0 0 0 1px var(--ib-card-border); }\n.ap-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 10px; }\n.ap-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--ib-pill); color: var(--ib-text); }\n.ap-icon svg { width: 16px; height: 16px; }\n.ap-titles { min-width: 0; padding-top: 1px; }\n.ap-title { overflow: hidden; font-size: 14px; font-weight: 600; line-height: 20px; color: var(--ib-text); white-space: nowrap; text-overflow: ellipsis; }\n.ap-question .ap-title { overflow: visible; white-space: pre-line; overflow-wrap: anywhere; }\n.ap-desc { margin-top: 1px; overflow: hidden; font-size: 13px; line-height: 18px; color: var(--ib-text-2); white-space: nowrap; text-overflow: ellipsis; }\n.ap-qbody { margin-top: 4px; font-size: 13px; line-height: 18px; color: var(--ib-text-2); white-space: pre-line; overflow-wrap: anywhere; }\n.ap-pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; margin-top: 1px; padding: 0 9px 0 8px; border-radius: 999px; background: var(--ib-pill); color: var(--ib-text-2); font-size: 12px; font-weight: 500; line-height: 1; white-space: nowrap; }\n.ap-pill::before { content: \"\"; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.8; }\n.ap-pill[data-kind=\"rule\"] { background: color-mix(in srgb, var(--st-fail) 14%, transparent); color: var(--st-fail-text); }\n.ap-pill[data-kind=\"question\"] { background: color-mix(in srgb, var(--st-wait) 16%, transparent); color: var(--ar-wait-text); }\n.ap-details { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; max-height: 320px; overflow: auto; margin: 12px 0 0; padding: 10px 12px; border-radius: 9px; background: var(--ib-col); box-shadow: inset 0 0 0 1px var(--ib-card-border); font-size: 12.5px; line-height: 18px; }\n.ap-detail { display: contents; }\n.ap-detail dt { color: var(--ib-muted); }\n.ap-detail dd { min-width: 0; margin: 0; color: var(--ib-text); font-family: var(--mono); font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }\n.ap-raw { max-height: 320px; overflow: auto; margin: 12px 0 0; padding: 10px 12px; border-radius: 9px; background: var(--ib-col); box-shadow: inset 0 0 0 1px var(--ib-card-border); color: var(--ib-text); font-family: var(--mono); font-size: 12px; line-height: 18px; white-space: pre-wrap; overflow-wrap: anywhere; }\n.ap-truncated { margin: 4px 0 0; font-size: 11.5px; color: var(--ib-muted); }\n.ap-rules { display: flex; flex-direction: column; gap: 3px; margin: 10px 0 0; font-size: 12px; line-height: 17px; color: var(--ib-text); overflow-wrap: anywhere; }\n.ap-rules-label { font-weight: 600; color: var(--ib-text-2); }\n.ap-rule code { padding: 1px 5px; border-radius: 4px; background: color-mix(in srgb, var(--orange) 14%, transparent); color: var(--orange); font-family: var(--mono); font-size: 0.95em; }\n.ap-alts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }\n.ap-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 8px; }\n.ap-expires { font-size: 12.5px; color: var(--ib-muted); font-variant-numeric: tabular-nums; white-space: nowrap; transition: color var(--dur-fade) linear; }\n.ap-expires.is-low { color: var(--ar-wait-text); }\n.ap-actions { display: flex; flex: 0 0 auto; gap: 4px; margin-left: auto; }\n.ap-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 34px; padding: 0 12px; border: 0; border-radius: 10px; font-size: 13px; font-weight: 500; line-height: 1; white-space: nowrap; transition: background-color 150ms ease, opacity 150ms ease, transform var(--dur-press) var(--ease-out); }\n.ap-ghost { min-height: 28px; padding: 0 10px; border-radius: 8px; background: transparent; color: var(--ib-text-2); font-size: 12.5px; box-shadow: inset 0 0 0 1px var(--ib-card-border); }\n.ap-quiet { background: transparent; color: var(--ib-text); box-shadow: inset 0 0 0 1px var(--ib-card-border); }\n.ap-primary { background: var(--ib-text); color: var(--ib-card); }\n.ap-btn:disabled, .ap-choice:disabled { cursor: not-allowed; opacity: 0.5; }\n.ap-btn.is-busy, .ap-choice.is-busy { opacity: 1; cursor: progress; }\n.ap-btn:active:not(:disabled), .ap-choice:active:not(:disabled) { transform: scale(0.97); }\n.ap-kbd { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-right: -4px; padding: 0 5px; border-radius: 6px; background: color-mix(in srgb, currentColor 12%, transparent); font-size: 11px; font-weight: 500; opacity: 0.8; }\n.ap-btn:disabled .ap-kbd, .ap-choice:disabled .ap-kbd { display: none; }\n.ap-choices { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }\n.ap-choice { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; min-height: 36px; padding: 8px 12px; border: 0; border-radius: 10px; background: transparent; color: var(--ib-text); box-shadow: inset 0 0 0 1px var(--ib-card-border); font-size: 13px; line-height: 18px; text-align: left; transition: background-color 150ms ease, opacity 150ms ease, transform var(--dur-press) var(--ease-out); }\n.ap-rec { padding-right: 52px; background: var(--ib-text); color: var(--ib-card); box-shadow: none; font-weight: 500; }\n.ap-rec .ap-kbd { position: absolute; top: 8px; right: 8px; margin: 0; background: color-mix(in srgb, currentColor 14%, transparent); }\n.ap-choice-label { overflow-wrap: anywhere; }\n.ap-choice-label .ar-spin { margin-right: 6px; }\n.ap-choice-tag { margin-left: 8px; padding: 1px 6px; border-radius: 6px; background: color-mix(in srgb, currentColor 14%, transparent); font-size: 11px; font-weight: 500; white-space: nowrap; }\n.ap-choice-desc { font-size: 12px; font-weight: 400; opacity: 0.75; overflow-wrap: anywhere; }\n.ap-lock { margin: 8px 0 0; font-size: 12px; color: var(--ib-muted); overflow-wrap: anywhere; }\n.ap-note { margin: 8px 0 0; font-size: 12px; color: var(--st-fail-text); overflow-wrap: anywhere; }\n.ap-resolved { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 12px; border-radius: 11px; background: var(--ib-card); box-shadow: 0 0 0 1px var(--ib-card-border); }\n.ap-resolved.is-enter { animation: ap-in var(--dur-move) var(--ease-out) both; }\n@keyframes ap-in { from { opacity: 0; transform: translateY(4px); } }\n.ap-mark { display: grid; flex: none; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: color-mix(in srgb, var(--st-done) 16%, transparent); color: var(--st-done); font-size: 12px; font-weight: 700; }\n.ap-mark svg { width: 12px; height: 12px; }\n.ap-resolved[data-decision=\"deny\"] .ap-mark, .ap-resolved[data-decision=\"explain\"] .ap-mark { background: var(--ib-pill); color: var(--ib-text-2); }\n.ap-row-title { flex: 1 1 auto; min-width: 0; overflow: hidden; font-size: 13.5px; font-weight: 500; color: var(--ib-text); white-space: nowrap; text-overflow: ellipsis; }\n.ap-row-status { flex: 0 1 auto; min-width: 0; overflow: hidden; font-size: 12.5px; color: var(--ib-muted); white-space: nowrap; text-overflow: ellipsis; }\n/* An answered question keeps its whole answer readable: the answer goes on a second line under the question. */\n.ap-resolved[data-decision=\"answer\"] { display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 10px; row-gap: 1px; }\n.ap-resolved[data-decision=\"answer\"] .ap-row-status { grid-column: 2; white-space: normal; overflow-wrap: anywhere; }\n@container ap (max-width: 379px) {\n .ap-actions { flex: 1 1 100%; margin-left: 0; }\n .ap-actions .ap-btn { flex: 1 1 0; min-width: 0; }\n .ap-kbd { display: none; }\n .ap-rec { padding-right: 12px; }\n}\n@container ap (max-width: 319px) {\n .ap-body { padding: 12px; }\n .ap-pill-word { display: none; }\n}\n\n/* ── 세부 / Details: label left, value right ── */\n.pi-details { display: grid; gap: 7px; margin: 0; }\n.pi-details > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; min-width: 0; }\n.pi-details dt { flex: 0 1 auto; min-width: 0; font-size: 12px; color: var(--text-tertiary); }\n.pi-details dd { min-width: 0; margin: 0; font-size: 12.5px; font-weight: 600; color: var(--text); text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }\n\n/* ── Spinner ── */\n.ar-spin { display: inline-block; flex: none; width: 12px; height: 12px; border: 2px solid var(--ib-pill); border-top-color: var(--st-run); border-right-color: var(--st-run); border-radius: 50%; vertical-align: -1px; animation: ar-spin 0.9s linear infinite; }\n.ap-btn .ar-spin, .ap-choice .ar-spin, .ar-stop .ar-spin { width: 11px; height: 11px; border-width: 1.5px; border-color: color-mix(in srgb, currentColor 25%, transparent); border-top-color: currentColor; border-right-color: currentColor; }\n@keyframes ar-spin { to { transform: rotate(360deg); } }\n\n/* Key hints only with a hover pointer; quiet hovers; 44px answers on touch. */\n@media (hover: none) {\n .ap-kbd { display: none; }\n .ap-rec { padding-right: 12px; }\n}\n@media (hover: hover) and (pointer: fine) {\n .ap-ghost:not(:disabled):hover, .ap-quiet:not(:disabled):hover, .ap-choice:not(.ap-rec):not(:disabled):hover { background: var(--ib-pill); }\n .ap-primary:not(:disabled):hover, .ap-rec:not(:disabled):hover { opacity: 0.88; }\n .ar-stop:not(:disabled):hover { border-color: var(--st-fail); }\n}\n@media (pointer: coarse) {\n .ap-btn, .ap-choice, .ar-stop, .pl-fold-btn { min-height: 44px; }\n}\n`;\n","import { define, UiElement } from '../../core/element';\nimport { fmtClock, fmtDuration } from '../../core/format';\nimport { esc, escAttr } from '../../core/html';\nimport { styles } from './styles';\n\n/** The run's phase (the head chip). `running` and `waiting` are live: the elapsed clock ticks and Stop shows. */\nexport type AgentRunStatus = 'running' | 'waiting' | 'idle' | 'done' | 'failed' | 'stopped';\nexport type AgentRunStepStatus = 'pending' | 'running' | 'done' | 'failed' | 'skipped';\nexport type AgentRunDecision = 'approve' | 'deny' | 'explain' | 'approve_disable_rule';\n\nexport interface AgentRunStep {\n id: string;\n label: string;\n status: AgentRunStepStatus;\n /** Short reference shown before the label, e.g. `#T3`. */\n ref?: string;\n /** Second line: what the step is doing now, or why it failed. */\n detail?: string;\n /** Epoch ms. A running step ticks from here; a finished one shows endedAt − startedAt. */\n startedAt?: number;\n endedAt?: number;\n /** Tool calls made while the step ran (chip; never shown on a pending step). */\n toolCalls?: number;\n}\n\nexport interface AgentRunRule {\n id: string;\n label: string;\n description?: string;\n}\n\n/** One tool-permission request waiting on the person. */\nexport interface AgentRunApproval {\n id: string;\n /** Tool name (`Bash`, `gmail.send`). */\n tool: string;\n /** Card title. Default: `<tool> approval` / `<tool> 실행 승인`. */\n title?: string;\n /** One line under the title (e.g. the tool input's `description`). */\n summary?: string;\n /** The tool input as label → value rows. Non-string values are shown as pretty JSON. */\n fields?: Array<[label: string, value: unknown]>;\n /** The tool input as raw text, when it is not a key/value object (shown in a `<pre>`). */\n raw?: string;\n /** `raw` was cut by the host. */\n truncated?: boolean;\n /** Matched dangerous-command rules (drive the risk pill). */\n rules?: AgentRunRule[];\n /** Epoch ms the request was made (label line). */\n requestedAt?: number;\n /** Epoch ms the request expires (live countdown). */\n expiresAt?: number;\n /** Offer \"Approve & disable rule\". */\n canDisableRule?: boolean;\n /** Default `true`. `false` disables the answers; a string disables them and says why. */\n canAnswer?: boolean | string;\n /** The answer the host sent: the card becomes one resolved row. */\n answered?: AgentRunDecision;\n /** Why the last answer failed (the answers unlock again). */\n error?: string;\n}\n\nexport interface AgentRunChoice {\n id: string;\n label: string;\n description?: string;\n /** The recommended choice goes first, as the card's one primary (⌘/Ctrl+Enter). */\n recommended?: boolean;\n}\n\n/** A single-choice question from the agent. */\nexport interface AgentRunQuestion {\n id: string;\n title: string;\n body?: string;\n choices: AgentRunChoice[];\n canAnswer?: boolean | string;\n /** Id of the choice the host sent: the card becomes one resolved row. */\n answered?: string;\n error?: string;\n}\n\n/** A details value: text, or a duration — live (`addMs + now − since`, ticking in place) when `since` is set, else `addMs`. */\nexport type AgentRunDetailValue = string | number | { since?: number; addMs?: number };\n\nexport interface AgentRunData {\n title: string;\n subtitle?: string;\n status: AgentRunStatus;\n /** Epoch ms this run (or turn) started: `Started 6:56 PM · 9m 22s`, live while running / waiting. */\n startedAt?: number;\n /** Epoch ms it ended: a finished run shows its run time instead of a clock. */\n endedAt?: number;\n /** Accumulated active time, shown as `Active …` when there is no start time. */\n activeMs?: number;\n plan?: { steps: AgentRunStep[] };\n approvals?: AgentRunApproval[];\n questions?: AgentRunQuestion[];\n details?: Array<[label: string, value: AgentRunDetailValue]>;\n /** `true` shows Stop while the run is live; a string shows it disabled with that reason. */\n canStop?: boolean | string;\n /** A stop request is in flight (Stop disabled, aria-busy). */\n stopping?: boolean;\n}\n\nexport interface AgentRunApproveDetail {\n id: string;\n decision: AgentRunDecision;\n}\nexport interface AgentRunAnswerDetail {\n questionId: string;\n choiceId: string;\n}\n\nconst STRINGS = {\n en: {\n chip: 'Run',\n status: {\n running: 'Running',\n waiting: 'Needs input',\n idle: 'Idle',\n done: 'Done',\n failed: 'Failed',\n stopped: 'Stopped',\n } as Record<AgentRunStatus, string>,\n statusSay: (w: string) => `Status: ${w}`,\n started: (t: string) => `Started ${t}`,\n liveTitle: 'This run: started · elapsed',\n ranTitle: 'Started · run time',\n active: 'Active',\n activeTitle: 'Active time',\n stop: 'Stop',\n stopLabel: 'Stop — stop the run',\n plan: 'Plan',\n planSteps: 'Plan steps',\n noSteps: 'No steps yet',\n stepSr: {\n pending: 'pending',\n running: 'in progress',\n done: 'done',\n failed: 'failed',\n skipped: 'skipped',\n } as Record<AgentRunStepStatus, string>,\n calls: (n: number) => (n === 1 ? '1 tool call' : `${n} tool calls`),\n foldShow: (n: number) => `Show ${n} more completed`,\n foldHide: 'Hide completed',\n phase: { running: 'Running', done: 'Done', failed: 'Failed', idle: 'Idle' } as Record<\n AgentRunPlanPhase['phase'],\n string\n >,\n stepDone: (l: string) => `Step done: ${l}`,\n stepFailed: (l: string) => `Step failed: ${l}`,\n needs: 'Needs input',\n apTitle: (tool: string) => `${tool} approval`,\n requested: (t: string) => `requested ${t}`,\n risk: 'Risk',\n riskWord: ' rules',\n toolPill: 'Tool approval',\n questionPill: 'Question',\n rules: (n: number) => (n > 1 ? 'Matched dangerous-command rules' : 'Matched dangerous-command rule'),\n truncated: 'Showing the beginning only',\n btn: { explain: 'Explain', approve_disable_rule: 'Approve & disable rule', deny: 'Deny', approve: 'Approve' },\n expiresIn: (c: string) => `Expires in ${c}`,\n expired: 'Expired',\n expiresAt: (t: string) => `Expires at ${t}`,\n answered: {\n approve: 'Approved',\n deny: 'Denied',\n explain: 'Explanation requested',\n approve_disable_rule: 'Approved · rule disabled',\n } as Record<AgentRunDecision, string>,\n sent: {\n approve: 'Approval sent',\n deny: 'Denial sent',\n explain: 'Explanation requested',\n approve_disable_rule: 'Approval sent · rule disabled',\n } as Record<AgentRunDecision, string>,\n arrived: (tool: string) => `Approval request — ${tool}`,\n recommended: 'Recommended',\n asked: (title: string) => `Question — ${title}`,\n answeredQ: 'Answered',\n answerSent: (label: string) => `Answer sent — ${label}`,\n details: 'Details',\n },\n ko: {\n chip: '세션',\n status: {\n running: '실행 중',\n waiting: '입력 대기',\n idle: '대기',\n done: '완료',\n failed: '실패',\n stopped: '중단',\n } as Record<AgentRunStatus, string>,\n statusSay: (w: string) => `상태: ${w}`,\n started: (t: string) => `시작 ${t}`,\n liveTitle: '이번 턴 시작 · 경과',\n ranTitle: '시작 · 실행 시간',\n active: '활성',\n activeTitle: '활성 시간',\n stop: 'Stop',\n stopLabel: 'Stop — 세션 중지',\n plan: '계획',\n planSteps: '계획 단계',\n noSteps: '아직 작업 목록이 없습니다',\n stepSr: {\n pending: '대기',\n running: '진행 중',\n done: '완료',\n failed: '실패',\n skipped: '건너뜀',\n } as Record<AgentRunStepStatus, string>,\n calls: (n: number) => `툴 ${n}회`,\n foldShow: (n: number) => `완료 ${n}개 더 보기`,\n foldHide: '완료 숨기기',\n phase: { running: '실행 중', done: '완료', failed: '실패', idle: '대기' } as Record<\n AgentRunPlanPhase['phase'],\n string\n >,\n stepDone: (l: string) => `단계 완료: ${l}`,\n stepFailed: (l: string) => `단계 실패: ${l}`,\n needs: '입력 필요',\n apTitle: (tool: string) => `${tool} 실행 승인`,\n requested: (t: string) => `${t} 요청`,\n risk: '위험',\n riskWord: ' 규칙',\n toolPill: '도구 승인',\n questionPill: '질문',\n rules: (n: number) => (n > 1 ? 'Matched dangerous-command rules' : 'Matched dangerous-command rule'),\n truncated: '앞부분만 표시합니다',\n btn: { explain: 'Explain', approve_disable_rule: 'Approve & disable rule', deny: 'Deny', approve: 'Approve' },\n expiresIn: (c: string) => `만료까지 ${c}`,\n expired: '만료됨',\n expiresAt: (t: string) => `${t}에 만료`,\n answered: {\n approve: '승인함',\n deny: '거부함',\n explain: '설명 요청함',\n approve_disable_rule: '승인함 · 규칙 끔',\n } as Record<AgentRunDecision, string>,\n sent: {\n approve: '승인을 보냈습니다',\n deny: '거부를 보냈습니다',\n explain: '설명을 요청했습니다',\n approve_disable_rule: '승인을 보냈습니다 · 규칙 끔',\n } as Record<AgentRunDecision, string>,\n arrived: (tool: string) => `승인 요청 — ${tool}`,\n recommended: '추천',\n asked: (title: string) => `질문 — ${title}`,\n answeredQ: '답함',\n answerSent: (label: string) => `답을 보냈습니다 — ${label}`,\n details: '세부',\n },\n};\ntype Strings = (typeof STRINGS)['en'];\ntype Lang = keyof typeof STRINGS;\n\nconst ICON = {\n check:\n '<svg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M3.5 8.5l3 3 6-7\"/></svg>',\n cross:\n '<svg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" aria-hidden=\"true\"><path d=\"M4.5 4.5l7 7M11.5 4.5l-7 7\"/></svg>',\n stop: '<svg viewBox=\"0 0 16 16\" fill=\"currentColor\" aria-hidden=\"true\"><rect x=\"4.5\" y=\"4.5\" width=\"7\" height=\"7\" rx=\"1.2\"/></svg>',\n clock:\n '<svg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.6\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><circle cx=\"8\" cy=\"8\" r=\"5.5\"/><path d=\"M8 5v3.2l2 1.3\"/></svg>',\n dot: '<svg viewBox=\"0 0 16 16\" fill=\"currentColor\" aria-hidden=\"true\"><circle cx=\"8\" cy=\"8\" r=\"3\"/></svg>',\n dash: '<svg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" aria-hidden=\"true\"><path d=\"M5 8h6\"/></svg>',\n spin: '<span class=\"ar-spin\" aria-hidden=\"true\"></span>',\n lock: '<svg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><rect x=\"3.5\" y=\"7\" width=\"9\" height=\"6.5\" rx=\"1.5\"/><path d=\"M5.5 7V5a2.5 2.5 0 0 1 5 0v2\"/></svg>',\n ask: '<svg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><circle cx=\"8\" cy=\"8\" r=\"6\"/><path d=\"M6.3 6.3a1.8 1.8 0 0 1 3.4.7c0 1.2-1.7 1.5-1.7 2.6M8 11.3v.1\"/></svg>',\n};\n\nconst STATUS_ICON: Record<AgentRunStatus, string> = {\n running: ICON.spin,\n waiting: ICON.clock,\n idle: ICON.dot,\n done: ICON.check,\n failed: ICON.cross,\n stopped: ICON.stop,\n};\n\nconst LIVE: ReadonlySet<AgentRunStatus> = new Set(['running', 'waiting']);\nconst FOLD_LIMIT = 3;\n\nconst num = (v: unknown): number => {\n const n = Number(v);\n return Number.isFinite(n) && n > 0 ? n : 0;\n};\n\n// ── Pure helpers ────────────────────────────────────────────────────────────\n\nexport interface AgentRunPlanPhase {\n /** From the steps alone: any running → running; else any failed → failed; all done/skipped → done; else idle. */\n phase: 'running' | 'done' | 'failed' | 'idle';\n done: number;\n total: number;\n /** Earliest start (the running clock counts from here), 0 when unknown. */\n since: number;\n /** Last end − first start once the plan is finished, 0 when the steps do not carry both. */\n tookMs: number;\n}\n\n/** The plan footer: phase, done/total and the time — since the first start while running, the total once finished. */\nexport function runPlanPhase(steps: AgentRunStep[]): AgentRunPlanPhase {\n let done = 0;\n let finished = 0;\n let running = false;\n let failed = false;\n let first = 0;\n let last = 0;\n for (const s of steps) {\n if (s.status === 'done') done++;\n if (s.status === 'done' || s.status === 'skipped') finished++;\n if (s.status === 'running') running = true;\n if (s.status === 'failed') failed = true;\n const st = num(s.startedAt);\n if (st && (!first || st < first)) first = st;\n const en = num(s.endedAt);\n if (en > last) last = en;\n }\n const total = steps.length;\n const phase = running ? 'running' : failed ? 'failed' : total > 0 && finished === total ? 'done' : 'idle';\n const tookMs = (phase === 'done' || phase === 'failed') && first && last > first ? last - first : 0;\n return { phase, done, total, since: phase === 'running' ? first : 0, tookMs };\n}\n\n/** Indexes of the done steps folded away: every done step but the last `limit` (earliest first). */\nexport function runFoldedSteps(steps: AgentRunStep[], limit = FOLD_LIMIT): number[] {\n const doneAt: number[] = [];\n steps.forEach((s, i) => {\n if (s.status === 'done') doneAt.push(i);\n });\n return doneAt.slice(0, Math.max(0, doneAt.length - limit));\n}\n\n/**\n * A tool input as approval-card rows. A JSON object becomes label → value rows (its string `description` becomes\n * the summary); anything else — cut, not JSON, not an object — returns null so the host shows it as `raw`.\n */\nexport function runApprovalFields(\n input: string,\n truncated = false,\n): { summary: string; fields: Array<[string, string]> } | null {\n if (truncated) return null;\n let obj: unknown;\n try {\n obj = JSON.parse(input);\n } catch {\n return null;\n }\n if (!obj || typeof obj !== 'object' || Array.isArray(obj)) return null;\n const rec = obj as Record<string, unknown>;\n const summary = typeof rec.description === 'string' ? rec.description : '';\n const fields = Object.keys(rec)\n .filter((k) => !(k === 'description' && summary))\n .map((k): [string, string] => [k, runFieldText(rec[k])]);\n return { summary, fields };\n}\n\n/** A field value as text: strings as they are, anything else as pretty JSON. */\nexport function runFieldText(v: unknown): string {\n if (typeof v === 'string') return v;\n const s = JSON.stringify(v, null, 2);\n return s === undefined ? String(v) : s;\n}\n\n/** The recommended choice first, the rest in their order. */\nexport function runChoiceOrder(choices: AgentRunChoice[]): AgentRunChoice[] {\n const rec = choices.find((c) => c.recommended);\n return rec ? [rec, ...choices.filter((c) => c !== rec)] : choices.slice();\n}\n\n/**\n * A question card's identity: its whole meaning serialized (id, text and every choice's id, label, description,\n * recommendation). A question rewritten in place is another card, so a focused choice is never rebound to it.\n */\nexport function runQuestionKey(q: AgentRunQuestion): string {\n return `q|${JSON.stringify([\n q.id,\n q.title,\n q.body ?? '',\n (q.choices ?? []).map((c) => [c.id, c.label, c.description ?? '', !!c.recommended]),\n ])}`;\n}\n\n/** Things still waiting on the person: unanswered approvals + unanswered questions. */\nexport function runNeedsCount(d: Pick<AgentRunData, 'approvals' | 'questions'>): number {\n return (d.approvals ?? []).filter((a) => !a.answered).length + (d.questions ?? []).filter((q) => !q.answered).length;\n}\n\n/** Time of day: `6:56 PM` (en) / `오후 06:56` (ko). */\nexport function runTimeOfDay(ts: number, lang: Lang = 'en'): string {\n if (!num(ts)) return '';\n return lang === 'ko'\n ? new Date(ts).toLocaleTimeString('ko-KR', { hour: '2-digit', minute: '2-digit' })\n : new Date(ts).toLocaleTimeString('en-US', { hour: 'numeric', minute: '2-digit' });\n}\n\nconst answerable = (v: boolean | string | undefined) => v === undefined || v === true;\nconst lockReason = (v: boolean | string | undefined) => (typeof v === 'string' ? v : '');\nconst approvalKey = (id: string) => `ap|${id}`;\n\n/**\n * A DOM-safe, injective form of an identity string: [A-Za-z0-9] stay, every other UTF-16 unit becomes\n * `_<base36 code>-`. Focus is restored by `data-key`, so a key must be exact (no hashing — two identities never\n * share one) and plain enough for any selector engine.\n */\nexport function runDomKey(identity: string): string {\n return identity.replace(/[^A-Za-z0-9]/g, (ch) => `_${ch.charCodeAt(0).toString(36)}-`);\n}\n/** The data-key of a card or answer: its identity parts, serialized (so `a|b` + `c` never equals `a` + `b|c`). */\nconst domKey = (...parts: string[]) => runDomKey(JSON.stringify(parts));\n\nconst KBD_APPROVE =\n typeof navigator !== 'undefined' && /Mac|iPhone|iPad|iPod/.test(String(navigator.platform || navigator.userAgent))\n ? '⌘↵'\n : 'Ctrl ↵';\n\ninterface ApSeen {\n answered: string;\n error: string;\n}\n\n/**\n * `<ui-agent-run>` — one autonomous run as a screen: the head (status, started time with a live elapsed clock,\n * Stop), the plan (a marker per step on one rail, the current step bold, per-step time and tool calls, a phase\n * footer), \"Needs input\" (approval cards and question cards answered in place) and the details list.\n */\nexport class UiAgentRun extends UiElement<AgentRunData> {\n static override styles = [styles];\n static get observedAttributes() {\n return ['lang'];\n }\n\n readonly #live: HTMLElement;\n #timer: ReturnType<typeof setInterval> | 0 = 0;\n #expanded = false;\n /** Answers this element emitted and the host has not settled yet (key → decision / choice id). */\n #sent = new Map<string, string>();\n #stopSent = false;\n // What the last data said, to announce and animate only what changed.\n #seen: AgentRunData | undefined;\n #prevStatus: AgentRunStatus | '' = '';\n #prevSteps: Map<string, AgentRunStepStatus> | null = null;\n #prevAps: Map<string, ApSeen> | null = null;\n #prevQs: Map<string, ApSeen> | null = null;\n #prevCount = 0;\n #pop = new Set<string>();\n #enter = new Set<string>();\n #badgePop = false;\n\n constructor() {\n super();\n this.#live = document.createElement('div');\n this.#live.className = 'sr-only';\n this.#live.setAttribute('role', 'status');\n this.#live.setAttribute('aria-live', 'polite');\n this.root.append(this.#live);\n this.root.addEventListener('click', (e) => this.#onClick(e));\n this.root.addEventListener('keydown', (e) => this.#onKeydown(e as KeyboardEvent));\n }\n\n attributeChangedCallback(): void {\n this.requestRender();\n }\n\n override disconnectedCallback(): void {\n this.#stopTimer();\n }\n\n get #lang(): Lang {\n return this.getAttribute('lang') === 'ko' ? 'ko' : 'en';\n }\n\n get #t(): Strings {\n return STRINGS[this.#lang];\n }\n\n // ── Intent ────────────────────────────────────────────────────────────────\n\n #onClick(e: Event): void {\n const btn = (e.target as Element | null)?.closest?.('button') as HTMLButtonElement | null;\n if (!btn || btn.disabled) return;\n const card = btn.closest<HTMLElement>('.ap-card');\n if (btn.dataset.decision && card?.dataset.id !== undefined) {\n this.#approve(card.dataset.id, btn.dataset.decision as AgentRunDecision);\n } else if (btn.dataset.choice !== undefined && card?.dataset.id !== undefined) {\n this.#answer(card.dataset.id, btn.dataset.choice);\n } else if (btn.classList.contains('ar-stop')) {\n this.#stop();\n } else if (btn.classList.contains('pl-fold-btn')) {\n this.#expanded = !this.#expanded;\n this.requestRender();\n }\n }\n\n /** ⌘/Ctrl+Enter anywhere in a card answers with its primary; Esc denies only from one of the card's buttons. */\n #onKeydown(e: KeyboardEvent): void {\n if (e.defaultPrevented) return;\n const target = e.target as Element | null;\n const card = target?.closest?.('.ap-card') as HTMLElement | null;\n if (!card || !target) return;\n let btn: HTMLButtonElement | null = null;\n if (e.key === 'Enter' && (e.metaKey || e.ctrlKey)) {\n btn = card.querySelector<HTMLButtonElement>(card.dataset.kind === 'question' ? '.ap-rec' : '.ap-approve');\n } else if (e.key === 'Escape' && card.dataset.kind === 'perm') {\n const from = target.closest('button');\n if (from && card.contains(from)) btn = card.querySelector<HTMLButtonElement>('.ap-deny');\n }\n if (!btn || btn.disabled) return;\n e.preventDefault();\n e.stopPropagation();\n btn.click();\n }\n\n #approve(id: string, decision: AgentRunDecision): void {\n const a = this.data?.approvals?.find((x) => x.id === id);\n const key = approvalKey(id);\n if (!a || a.answered || !answerable(a.canAnswer) || this.#sent.has(key)) return;\n if (decision === 'approve_disable_rule' && !a.canDisableRule) return;\n if (this.emit<AgentRunApproveDetail>('ui-approve', { id, decision })) {\n this.#sent.set(key, decision);\n this.requestRender();\n }\n }\n\n #answer(questionId: string, choiceId: string): void {\n const q = this.data?.questions?.find((x) => x.id === questionId);\n const key = `q|${questionId}`;\n if (!q || q.answered || !answerable(q.canAnswer) || this.#sent.has(key)) return;\n if (!q.choices?.some((c) => c.id === choiceId)) return;\n if (this.emit<AgentRunAnswerDetail>('ui-answer', { questionId, choiceId })) {\n this.#sent.set(key, choiceId);\n this.requestRender();\n }\n }\n\n #stop(): void {\n const d = this.data;\n if (!d || d.canStop !== true || d.stopping || this.#stopSent || !LIVE.has(d.status)) return;\n if (this.emit('ui-stop', {})) {\n this.#stopSent = true;\n this.requestRender();\n }\n }\n\n /**\n * Keyboard landing (the dashboard's panel opening): focus the first unanswered card — the card, not a button, so\n * Esc still reaches the page and ⌘/Ctrl+Enter is a deliberate second step. Returns false when nothing waits.\n */\n focusNeeds(): boolean {\n if (this.data) this.renderNow();\n const card = this.$<HTMLElement>('.ap-card:not(.is-resolved)');\n card?.focus();\n return !!card;\n }\n\n // ── Render cycle ──────────────────────────────────────────────────────────\n\n protected override update(): void {\n const d = this.data;\n if (d && d !== this.#seen) this.#observe(d);\n const active = this.root.activeElement as HTMLElement | null;\n const cardKey = (active?.closest?.('.ap-card') as HTMLElement | null)?.dataset.key ?? '';\n const fromNeeds = !!active?.closest?.('.ar-needs');\n super.update();\n this.#pop.clear();\n this.#enter.clear();\n this.#badgePop = false;\n if (active && !this.root.activeElement) this.#safeFocus(cardKey, fromNeeds);\n }\n\n /**\n * Focus whose node left the page lands where it answers nothing: its own card (now a resolved row), else the\n * \"Needs input\" head, else the title — never a decision button (a following ⌘↵ must not answer another request).\n */\n #safeFocus(cardKey: string, fromNeeds: boolean): void {\n const card = cardKey ? this.$$('.ap-card').find((c) => c.dataset.key === cardKey) : undefined;\n const to = card ?? (fromNeeds ? this.$<HTMLElement>('.ar-needs-head') : null) ?? this.$<HTMLElement>('.ar-title');\n to?.focus({ preventScroll: true });\n }\n\n /** Compare new data with the last: settle sent answers, collect what to announce and what to animate. */\n #observe(d: AgentRunData): void {\n const t = this.#t;\n const first = this.#seen === undefined;\n const said: string[] = [];\n if (!first && this.#prevStatus !== d.status) said.push(t.statusSay(t.status[d.status] ?? d.status));\n this.#prevStatus = d.status;\n this.#stopSent = false;\n\n const steps = d.plan?.steps ?? [];\n const prevSteps = this.#prevSteps;\n const nowSteps = new Map<string, AgentRunStepStatus>();\n for (const s of steps) {\n nowSteps.set(s.id, s.status);\n const was = prevSteps?.get(s.id);\n if (!was || was === s.status) continue;\n this.#pop.add(s.id);\n if (s.status === 'done') said.push(t.stepDone(s.label));\n else if (s.status === 'failed') said.push(t.stepFailed(s.label));\n }\n // An empty list is a baseline as well: the next list's steps are new, not changed.\n this.#prevSteps = nowSteps;\n\n const aps = d.approvals ?? [];\n const nowAps = new Map<string, ApSeen>();\n for (const a of aps) {\n const was = this.#prevAps?.get(a.id);\n const seen = { answered: a.answered ?? '', error: a.error ?? '' };\n nowAps.set(a.id, seen);\n if (this.#prevAps && !was && !a.answered) said.push(t.arrived(a.tool));\n if (was && a.answered && was.answered !== a.answered) {\n said.push(`${t.sent[a.answered] ?? a.answered} — ${a.tool}`);\n this.#enter.add(approvalKey(a.id));\n }\n if (a.error && (!was || was.error !== a.error) && !first) said.push(a.error);\n if (a.answered || a.error) this.#sent.delete(approvalKey(a.id));\n }\n this.#prevAps = nowAps;\n\n const qs = d.questions ?? [];\n const nowQs = new Map<string, ApSeen>();\n for (const q of qs) {\n const was = this.#prevQs?.get(q.id);\n nowQs.set(q.id, { answered: q.answered ?? '', error: q.error ?? '' });\n if (this.#prevQs && !was && !q.answered) said.push(t.asked(q.title));\n if (was && q.answered && was.answered !== q.answered) {\n const c = q.choices?.find((x) => x.id === q.answered);\n said.push(t.answerSent(c?.label ?? q.answered));\n this.#enter.add(`q|${q.id}`);\n }\n if (q.error && (!was || was.error !== q.error) && !first) said.push(q.error);\n if (q.answered || q.error) this.#sent.delete(`q|${q.id}`);\n }\n this.#prevQs = nowQs;\n\n for (const key of Array.from(this.#sent.keys())) {\n const id = key.slice(key.indexOf('|') + 1);\n const gone = key.startsWith('ap|') ? !nowAps.has(id) : !nowQs.has(id);\n if (gone) this.#sent.delete(key);\n }\n\n const count = runNeedsCount(d);\n this.#badgePop = count > this.#prevCount;\n this.#prevCount = count;\n this.#seen = d;\n if (said.length) this.#live.textContent = said.join('. ');\n }\n\n protected override updated(): void {\n this.#tick();\n const live = !!this.$('[data-since], [data-until]');\n if (live && !this.#timer && this.isConnected) this.#timer = setInterval(() => this.#tick(), 1000);\n else if (!live) this.#stopTimer();\n }\n\n #stopTimer(): void {\n if (this.#timer) clearInterval(this.#timer);\n this.#timer = 0;\n }\n\n /** 1 Hz: every clock is a text node filled from its data-* attributes — the markup never carries `now`. */\n #tick(): void {\n const now = Date.now();\n const t = this.#t;\n for (const el of this.$$('[data-since]')) {\n const since = Number(el.dataset.since) || now;\n const txt = fmtDuration(now - since + (Number(el.dataset.add) || 0));\n if (el.textContent !== txt) el.textContent = txt;\n }\n for (const el of this.$$('[data-until]')) {\n const left = (Number(el.dataset.until) || 0) - now;\n const txt = left > 0 ? t.expiresIn(fmtClock(left)) : t.expired;\n if (el.textContent !== txt) el.textContent = txt;\n el.classList.toggle('is-low', left <= 60_000);\n }\n }\n\n protected render(): string {\n const d = this.data;\n if (!d) return '';\n const t = this.#t;\n const plan = d.plan ? this.#plan(d.plan.steps ?? [], t) : '';\n const needs = this.#needs(d, t);\n const details = this.#details(d, t);\n // Wide: the plan (+ details) on the left, the side column on the right — Needs input when there is any.\n const bands = [plan, needs, details].filter(Boolean).length;\n const side = bands > 1 ? (needs ? 'needs' : 'details') : '';\n return `<section class=\"ar\" aria-labelledby=\"ar-title\" data-status=\"${escAttr(d.status)}\">\n${this.#head(d, t)}${bands ? `<div class=\"ar-body\"${side ? ` data-side=\"${side}\"` : ''}>${plan}${needs}${details}</div>` : ''}\n</section>`;\n }\n\n #head(d: AgentRunData, t: Strings): string {\n const st: AgentRunStatus = STATUS_ICON[d.status] ? d.status : 'idle';\n const live = LIVE.has(st);\n const start = num(d.startedAt);\n const end = num(d.endedAt);\n let time = '';\n if (live && start) {\n time = `<span class=\"ps-time\" title=\"${escAttr(t.liveTitle)}\"><span class=\"ps-clock\">${ICON.clock}</span>${esc(\n t.started(runTimeOfDay(start, this.#lang)),\n )}<span class=\"ps-dot\" aria-hidden=\"true\">·</span><span class=\"ps-tick\" data-since=\"${start}\"></span></span>`;\n } else if (start && end > start) {\n time = `<span class=\"ps-time\" title=\"${escAttr(t.ranTitle)}\"><span class=\"ps-clock\">${ICON.clock}</span>${esc(\n t.started(runTimeOfDay(start, this.#lang)),\n )}<span class=\"ps-dot\" aria-hidden=\"true\">·</span>${esc(fmtDuration(end - start))}</span>`;\n } else if (num(d.activeMs)) {\n time = `<span class=\"ps-time\" title=\"${escAttr(t.activeTitle)}\">${esc(t.active)} ${esc(fmtDuration(num(d.activeMs)))}</span>`;\n }\n let stop = '';\n if (live && d.canStop !== undefined && d.canStop !== false) {\n const why = lockReason(d.canStop);\n const busy = !!d.stopping || this.#stopSent;\n stop = `<span class=\"ps-actions\"><button type=\"button\" class=\"ar-stop\" data-key=\"ar-stop\" aria-label=\"${escAttr(\n t.stopLabel,\n )}\"${why || busy ? ' disabled' : ''}${busy ? ' aria-busy=\"true\"' : ''}${why ? ` title=\"${escAttr(why)}\"` : ''}>${\n busy ? ICON.spin : ''\n }${esc(t.stop)}</button></span>`;\n }\n return `<header class=\"ar-head\">\n<h2 class=\"ar-title\" id=\"ar-title\" tabindex=\"-1\" data-key=\"ar-title\">${esc(d.title)}</h2>${\n d.subtitle ? `<p class=\"ar-sub\">${esc(d.subtitle)}</p>` : ''\n }\n<div class=\"ps-row\"><span class=\"ps-chip is-${st}\"><span class=\"ps-label\">${esc(t.chip)}</span><span class=\"ps-icon\" aria-hidden=\"true\">${\n STATUS_ICON[st]\n }</span><span class=\"ps-word\">${esc(t.status[st])}</span></span>${time}${stop}</div>\n</header>`;\n }\n\n // ── Plan ──────────────────────────────────────────────────────────────────\n\n #plan(steps: AgentRunStep[], t: Strings): string {\n const head = `<h3 class=\"ar-sec-h\" id=\"ar-plan-h\">${esc(t.plan)}</h3>`;\n if (!steps.length)\n return `<section class=\"ar-band ar-plan\" aria-labelledby=\"ar-plan-h\">${head}<p class=\"pl-empty\">${esc(t.noSteps)}</p></section>`;\n const fold = runFoldedSteps(steps);\n const hidden = new Set(this.#expanded ? [] : fold);\n let rows = '';\n steps.forEach((s, i) => {\n if (fold.length && i === fold[0]) {\n rows += `<li class=\"pl-fold\"><button type=\"button\" class=\"pl-fold-btn\" data-key=\"pl-fold\" aria-expanded=\"${\n this.#expanded\n }\">${esc(this.#expanded ? t.foldHide : t.foldShow(fold.length))}</button></li>`;\n }\n if (!hidden.has(i)) rows += this.#step(s, t);\n });\n return `<section class=\"ar-band ar-plan\" aria-labelledby=\"ar-plan-h\">${head}<ol class=\"pl-list\" aria-label=\"${escAttr(\n t.planSteps,\n )}\">${rows}</ol>${this.#foot(steps, t)}</section>`;\n }\n\n #step(s: AgentRunStep, t: Strings): string {\n const st: AgentRunStepStatus = t.stepSr[s.status] ? s.status : 'pending';\n const marker =\n st === 'done'\n ? ICON.check\n : st === 'running'\n ? ICON.spin\n : st === 'failed'\n ? ICON.cross\n : st === 'skipped'\n ? ICON.dash\n : '';\n const calls =\n st !== 'pending' && s.toolCalls !== undefined\n ? `<span class=\"pl-chip\">${esc(t.calls(Math.round(num(s.toolCalls))))}</span>`\n : '';\n const start = num(s.startedAt);\n const end = num(s.endedAt);\n let aside = '';\n if (st === 'running' && start) aside = `<span data-since=\"${start}\"></span>`;\n else if (st !== 'running' && start && end > start) aside = esc(fmtDuration(end - start));\n const times = [start ? runTimeOfDay(start, this.#lang) : '', end ? runTimeOfDay(end, this.#lang) : '']\n .filter(Boolean)\n .join(' → ');\n return `<li class=\"pl-step${this.#pop.has(s.id) ? ' pl-pop' : ''}\" data-step=\"${st}\"${\n st === 'running' ? ' aria-current=\"step\"' : ''\n }${times ? ` title=\"${escAttr(times)}\"` : ''}><span class=\"pl-marker\" aria-hidden=\"true\">${marker}</span><span class=\"pl-main\"><span class=\"pl-line\">${\n s.ref ? `<span class=\"pl-ref\">${esc(s.ref)}</span>` : ''\n }<span class=\"pl-text\">${esc(s.label)}</span>${calls}</span>${\n s.detail ? `<span class=\"pl-sub\" title=\"${escAttr(s.detail)}\">${esc(s.detail)}</span>` : ''\n }<span class=\"sr-only\">, ${esc(t.stepSr[st])}</span></span><span class=\"pl-aside\">${aside}</span></li>`;\n }\n\n #foot(steps: AgentRunStep[], t: Strings): string {\n const p = runPlanPhase(steps);\n const icon =\n p.phase === 'running'\n ? ICON.spin\n : p.phase === 'done'\n ? ICON.check\n : p.phase === 'failed'\n ? ICON.cross\n : ICON.dot;\n const time =\n p.phase === 'running' && p.since\n ? `<span data-since=\"${p.since}\"></span>`\n : p.tookMs\n ? esc(fmtDuration(p.tookMs))\n : '';\n return `<div class=\"pl-foot\" data-phase=\"${p.phase}\"><span class=\"pl-foot-st\"><span class=\"pl-foot-icon\" aria-hidden=\"true\">${icon}</span>${esc(\n t.phase[p.phase],\n )} · ${p.done}/${p.total}</span>${time ? `<span class=\"pl-foot-time\" aria-hidden=\"true\">${time}</span>` : ''}</div>`;\n }\n\n // ── Needs input ───────────────────────────────────────────────────────────\n\n #needs(d: AgentRunData, t: Strings): string {\n const aps = d.approvals ?? [];\n const qs = (d.questions ?? []).filter((q) => q && Array.isArray(q.choices));\n if (!aps.length && !qs.length) return '';\n const n = runNeedsCount({ approvals: aps, questions: qs });\n const cards =\n aps.map((a, i) => this.#approval(a, i, t)).join('') + qs.map((q, i) => this.#question(q, i, t)).join('');\n return `<section class=\"ar-band ar-needs\" aria-labelledby=\"ar-needs-h\"><h3 class=\"ar-needs-head\" id=\"ar-needs-h\" tabindex=\"-1\" data-key=\"ar-needs-head\">${esc(\n t.needs,\n )}${n ? `<span class=\"pn-count${this.#badgePop ? ' is-pop' : ''}\">${n}</span>` : ''}</h3><div class=\"ap-list\">${cards}</div></section>`;\n }\n\n #resolved(r: {\n key: string;\n enterKey: string;\n kind: 'perm' | 'question';\n id: string;\n titleId: string;\n title: string;\n status: string;\n mark: string;\n decision: string;\n }): string {\n return `<div class=\"ap-card is-resolved\" role=\"group\" tabindex=\"-1\" data-kind=\"${r.kind}\" data-id=\"${escAttr(\n r.id,\n )}\" data-key=\"${r.key}\" aria-labelledby=\"${r.titleId}\"><div class=\"ap-resolved${\n this.#enter.has(r.enterKey) ? ' is-enter' : ''\n }\" data-decision=\"${escAttr(r.decision)}\"><span class=\"ap-mark\" aria-hidden=\"true\">${r.mark}</span><span class=\"ap-row-title\" id=\"${\n r.titleId\n }\">${esc(r.title)}</span><span class=\"ap-row-status\">${esc(r.status)}</span></div></div>`;\n }\n\n #approval(a: AgentRunApproval, i: number, t: Strings): string {\n const key = approvalKey(a.id);\n const dk = domKey('ap', a.id);\n const tool = a.tool || 'tool';\n const title = a.title || t.apTitle(tool);\n const ids = { t: `ar-ap${i}-t`, d: `ar-ap${i}-d`, x: `ar-ap${i}-x` };\n if (a.answered) {\n const mark = a.answered === 'deny' ? ICON.cross : a.answered === 'explain' ? '?' : ICON.check;\n return this.#resolved({\n key: dk,\n enterKey: key,\n kind: 'perm',\n id: a.id,\n titleId: ids.t,\n title,\n status: t.answered[a.answered] ?? a.answered,\n mark,\n decision: a.answered,\n });\n }\n const why = lockReason(a.canAnswer);\n const sending = this.#sent.get(key) ?? '';\n const off = !answerable(a.canAnswer) || !!sending;\n const rules = a.rules ?? [];\n const pill = rules.length\n ? `<span class=\"ap-pill\" data-kind=\"rule\">${esc(t.risk)}<span class=\"ap-pill-word\">${esc(t.riskWord)}</span> ${rules.length}</span>`\n : `<span class=\"ap-pill\" data-kind=\"tool\">${esc(t.toolPill)}</span>`;\n let body = '';\n if (a.fields?.length) {\n body = `<dl class=\"ap-details\">${a.fields\n .map(([k, v]) => `<div class=\"ap-detail\"><dt>${esc(k)}</dt><dd>${esc(runFieldText(v))}</dd></div>`)\n .join('')}</dl>`;\n } else if (a.raw !== undefined && a.raw !== '') {\n body = `<pre class=\"ap-raw\">${esc(a.raw)}</pre>${a.truncated ? `<p class=\"ap-truncated\">${esc(t.truncated)}</p>` : ''}`;\n }\n const rulesHtml = rules.length\n ? `<div class=\"ap-rules\"><span class=\"ap-rules-label\">${esc(t.rules(rules.length))}</span>${rules\n .map(\n (r) =>\n `<span class=\"ap-rule\"><code>${esc(r.id)}</code> — ${esc(r.label)}${r.description ? `: ${esc(r.description)}` : ''}</span>`,\n )\n .join('')}</div>`\n : '';\n const btn = (decision: AgentRunDecision, cls: string, extra = '', kbd = '') => {\n const busy = sending === decision;\n return `<button type=\"button\" class=\"ap-btn ${cls}${busy ? ' is-busy' : ''}\" data-decision=\"${decision}\" data-key=\"${domKey('ap', a.id, decision)}\"${off ? ' disabled' : ''}${busy ? ' aria-busy=\"true\"' : ''}${why ? ` title=\"${escAttr(why)}\"` : ''}${extra}>${\n busy ? ICON.spin : ''\n }${esc(t.btn[decision])}${kbd ? `<span class=\"ap-kbd\" aria-hidden=\"true\">${esc(kbd)}</span>` : ''}</button>`;\n };\n const alts = btn('explain', 'ap-ghost') + (a.canDisableRule ? btn('approve_disable_rule', 'ap-ghost') : '');\n const main =\n btn('deny', 'ap-quiet ap-deny', ' aria-keyshortcuts=\"Escape\"', 'Esc') +\n btn('approve', 'ap-primary ap-approve', ' aria-keyshortcuts=\"Meta+Enter Control+Enter\"', KBD_APPROVE);\n const until = num(a.expiresAt);\n const expires = until\n ? `<span class=\"ap-expires\" data-until=\"${until}\" aria-hidden=\"true\"></span><span class=\"sr-only\" id=\"${ids.x}\">${esc(\n t.expiresAt(runTimeOfDay(until, this.#lang)),\n )}</span>`\n : '';\n const described = [a.summary ? ids.d : '', until ? ids.x : ''].filter(Boolean).join(' ');\n const label = `${esc(tool)}${num(a.requestedAt) ? ` · ${esc(t.requested(runTimeOfDay(num(a.requestedAt), this.#lang)))}` : ''}`;\n return `<div class=\"ap-card\" role=\"group\" tabindex=\"-1\" data-kind=\"perm\" data-id=\"${escAttr(a.id)}\" data-key=\"${dk}\" aria-labelledby=\"${ids.t}\"${described ? ` aria-describedby=\"${described}\"` : ''}><div class=\"ap-label\">${label}</div><div class=\"ap-body\"><div class=\"ap-head\"><span class=\"ap-icon\" aria-hidden=\"true\">${\n ICON.lock\n }</span><div class=\"ap-titles\"><div class=\"ap-title\" id=\"${ids.t}\">${esc(title)}</div>${\n a.summary ? `<div class=\"ap-desc\" id=\"${ids.d}\" title=\"${escAttr(a.summary)}\">${esc(a.summary)}</div>` : ''\n }</div>${pill}</div>${body}${rulesHtml}<div class=\"ap-alts\">${alts}</div><div class=\"ap-foot\">${expires}<div class=\"ap-actions\">${main}</div></div>${\n why ? `<p class=\"ap-lock\">${esc(why)}</p>` : ''\n }${a.error ? `<p class=\"ap-note\">${esc(a.error)}</p>` : ''}</div></div>`;\n }\n\n #question(q: AgentRunQuestion, i: number, t: Strings): string {\n const meaning = runQuestionKey(q);\n const dk = domKey('q', meaning);\n const titleId = `ar-q${i}-t`;\n if (q.answered) {\n const c = q.choices.find((x) => x.id === q.answered);\n return this.#resolved({\n key: dk,\n enterKey: `q|${q.id}`,\n kind: 'question',\n id: q.id,\n titleId,\n title: q.title,\n status: `${t.answeredQ} · ${c?.label ?? q.answered}`,\n mark: ICON.check,\n decision: 'answer',\n });\n }\n const why = lockReason(q.canAnswer);\n const sending = this.#sent.get(`q|${q.id}`) ?? '';\n const off = !answerable(q.canAnswer) || !!sending;\n const ordered = runChoiceOrder(q.choices);\n const recId = ordered[0]?.recommended ? ordered[0].id : '';\n const choices = ordered\n .map((c) => {\n const rec = c.id === recId;\n const busy = sending === c.id;\n return `<button type=\"button\" class=\"ap-choice${rec ? ' ap-rec' : ''}${busy ? ' is-busy' : ''}\" data-choice=\"${escAttr(\n c.id,\n )}\" data-key=\"${domKey('q', meaning, c.id)}\"${off ? ' disabled' : ''}${busy ? ' aria-busy=\"true\"' : ''}${\n why ? ` title=\"${escAttr(why)}\"` : ''\n }${rec ? ' aria-keyshortcuts=\"Meta+Enter Control+Enter\"' : ''}><span class=\"ap-choice-label\">${busy ? ICON.spin : ''}${esc(\n c.label,\n )}${rec ? `<span class=\"ap-choice-tag\">${esc(t.recommended)}</span>` : ''}</span>${\n c.description ? `<span class=\"ap-choice-desc\">${esc(c.description)}</span>` : ''\n }${rec ? `<span class=\"ap-kbd\" aria-hidden=\"true\">${esc(KBD_APPROVE)}</span>` : ''}</button>`;\n })\n .join('');\n return `<div class=\"ap-card ap-question\" role=\"group\" tabindex=\"-1\" data-kind=\"question\" data-id=\"${escAttr(q.id)}\" data-key=\"${dk}\" aria-labelledby=\"${titleId}\"><div class=\"ap-body\"><div class=\"ap-head\"><span class=\"ap-icon\" aria-hidden=\"true\">${\n ICON.ask\n }</span><div class=\"ap-titles\"><div class=\"ap-title\" id=\"${titleId}\">${esc(q.title)}</div>${\n q.body ? `<div class=\"ap-qbody\">${esc(q.body)}</div>` : ''\n }</div><span class=\"ap-pill\" data-kind=\"question\">${esc(t.questionPill)}</span></div><div class=\"ap-choices\">${choices}</div>${\n why ? `<p class=\"ap-lock\">${esc(why)}</p>` : ''\n }${q.error ? `<p class=\"ap-note\">${esc(q.error)}</p>` : ''}</div></div>`;\n }\n\n // ── Details ───────────────────────────────────────────────────────────────\n\n #details(d: AgentRunData, t: Strings): string {\n const rows = (d.details ?? [])\n .filter((r) => Array.isArray(r) && r[1] !== undefined && r[1] !== null && r[1] !== '')\n .map(([label, v]) => {\n const value =\n typeof v !== 'object'\n ? esc(String(v))\n : num(v.since)\n ? `<span data-since=\"${num(v.since)}\" data-add=\"${num(v.addMs)}\"></span>`\n : esc(fmtDuration(num(v.addMs)));\n return `<div><dt>${esc(label)}</dt><dd>${value}</dd></div>`;\n })\n .join('');\n if (!rows) return '';\n return `<section class=\"ar-band ar-details\" aria-labelledby=\"ar-det-h\"><h3 class=\"ar-sec-h\" id=\"ar-det-h\">${esc(\n t.details,\n )}</h3><dl class=\"pi-details\">${rows}</dl></section>`;\n }\n}\n\ndefine('ui-agent-run', UiAgentRun);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'ui-agent-run': UiAgentRun;\n }\n}\n"],"names":[],"mappings":";;AAKO,MAAM,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;A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