Multiplayer agent harness for work.
Redesign admin pages without comparison scaffolding (#1311)
Regan Bell9c252137596e
diff --git a/plugins/admin/public/admin-components.css b/plugins/admin/public/admin-components.cssnew file mode 100644index 000000000..b9e86dfe4--- /dev/null+++ b/plugins/admin/public/admin-components.css@@ -0,0 +1,1904 @@+:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) {+ --control-height: 32px;+ --control-radius: 6px;+ --control-font: 13px;+ --section-font: 14px;+ --section-gap: 24px;+ --control-gap: 8px;+ font-size: var(--control-font);+ line-height: 1.4;+}++:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) .admin-inner {+ max-width: 960px;+ margin-inline: auto;+}++:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) .shell-title {+ font-size: 22px;+ font-weight: 500;+ line-height: 1.4;+ letter-spacing: -0.025em;+}++:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) .shellbar {+ margin-bottom: 16px;+}++:where(html body[data-admin-kit="true"])+ :is(#app-view #main, dialog)+ button:not(+ :where(+ .viewlink,+ .link,+ .danger-link,+ .icon,+ .icon-button,+ .project-icon-button,+ .policy-rule .rowbtn,+ .seg,+ .shell-tab,+ .dd-item,+ .model-chip button,+ .emoji-picker-grid button,+ .ovmenu button,+ .dd-btn+ )+ ) {+ min-height: var(--control-height);+ padding: 6px 12px;+ border: 1px solid var(--border);+ border-radius: var(--control-radius);+ background: var(--surface);+ color: var(--text);+ font-size: var(--control-font);+ font-weight: 500;+ line-height: 18px;+ box-shadow: none;+}++:where(html body[data-admin-kit="true"])+ :is(#app-view #main, dialog)+ button:not(:where(.viewlink, .link, .danger-link, .icon, .policy-rule .rowbtn, .model-chip button)):hover:not(+ :disabled+ ) {+ background: var(--subtle);+}++:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) button.primary {+ background: var(--cta);+ border-color: var(--cta);+ color: var(--cta-foreground);+}++:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) button.primary:hover:not(:disabled) {+ background: var(--cta-hover);+ border-color: var(--cta-hover);+ color: var(--cta-foreground);+}++:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) button.danger {+ color: var(--danger);+}++:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) button:disabled {+ cursor: not-allowed;+ opacity: 0.45;+}++:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) button.primary:disabled {+ background: var(--subtle);+ border-color: var(--border);+ color: var(--muted);+ opacity: 1;+}++:where(html body[data-admin-kit="true"])+ :is(#app-view #main, dialog)+ input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):not([type="color"]):not(+ :where(.admin-search input)+ ),+:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) select,+:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) textarea,+:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) .dd > .dd-btn {+ min-height: var(--control-height);+ padding: 6px 10px;+ border: 1px solid var(--border);+ border-radius: var(--control-radius);+ background: var(--surface);+ color: var(--text);+ font-size: var(--control-font);+ font-weight: 400;+ line-height: 18px;+ box-shadow: none;+}++:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) textarea {+ min-height: 90px;+ resize: vertical;+}++:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) input:disabled,+:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) select:disabled,+:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) textarea:disabled,+:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) .dd > .dd-btn:disabled {+ background: var(--subtle);+ color: var(--muted);+ cursor: not-allowed;+}++:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) input[aria-invalid="true"],+:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) textarea[aria-invalid="true"] {+ border-color: var(--danger);+}++:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) input:focus-visible,+:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) select:focus-visible,+:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) textarea:focus-visible,+:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) button:focus-visible {+ outline: 2px solid var(--cta);+ outline-offset: 2px;+}++:where(html body[data-admin-kit="true"])+ :is(#app-view #main, dialog)+ label:not(:where(.posture-choice, .setting-toggle, .screening-compare, .switch)) {+ font-size: var(--control-font);+ font-weight: 400;+ line-height: 1.4;+ color: var(--text);+ margin-bottom: 4px;+}++:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) .card > .head h2,+:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) .parity-subsection > .head h2,+:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) .spec-demo > .head h2 {+ margin: 0;+ font-size: var(--section-font);+ font-weight: 500;+ line-height: 1.5;+}++:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) .card > .head p,+:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) .parity-subsection > .head p,+:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) .hint,+:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) .field-hint {+ font-size: var(--control-font);+ font-weight: 400;+ line-height: 1.5;+ color: var(--muted);+}++:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) .card > .head p,+:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) .parity-subsection > .head p {+ margin: 4px 0 0;+ max-width: 70ch;+}++:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) .card,+:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) .card.setting-row {+ padding-block: var(--section-gap);+}++:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) .card > .foot,+:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) .parity-subsection > .foot {+ gap: var(--control-gap);+ align-items: center;+ flex-wrap: wrap;+}++:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) .card > .foot:has(> .primary),+:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) .parity-subsection > .foot:has(> .primary) {+ display: flex;+ justify-content: flex-end;+}++:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) .foot > .status {+ order: -1;+ font-size: var(--control-font);+}++:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) .viewlink,+:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) .link,+:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) .danger-link {+ font-size: var(--control-font);+ font-weight: 400;+ line-height: 1.4;+}++:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) .badge {+ display: inline-flex;+ align-items: center;+ padding: 3px 9px;+ border-radius: 999px;+ border-color: color-mix(in srgb, currentColor 14%, transparent);+ background: color-mix(in srgb, currentColor 7%, transparent);+ font-size: 12px;+ font-weight: 400;+ line-height: 1.4;+}++:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) .credential-row {+ padding: 12px 0;+ gap: 12px;+ align-items: center;+ border-color: var(--border);+}++:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) .credential-title strong,+:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) .credential-main > strong {+ font-size: var(--control-font);+ font-weight: 500;+}++:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) .credential-actions {+ display: flex;+ flex-wrap: wrap;+ gap: var(--control-gap);+}++:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) .tablewrap {+ width: 100%;+ max-width: 100%;+ overflow-x: auto;+ overscroll-behavior-x: contain;+}++:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) table {+ width: 100%;+ border-collapse: collapse;+ font-size: var(--control-font);+}++:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) th {+ padding: 10px 12px;+ text-align: left;+ font-size: 12px;+ font-weight: 400;+ line-height: 1.4;+ color: var(--muted);+ background: transparent;+ border-bottom: 1px solid var(--border);+}++:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) td {+ padding: 12px;+ font-size: var(--control-font);+ line-height: 1.4;+ border-bottom: 1px solid var(--border);+}++:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) .empty {+ padding: 16px 0;+ color: var(--muted);+ font-size: var(--control-font);+ text-align: left;+}++:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) .posture-choice {+ display: flex;+ align-items: flex-start;+ gap: 10px;+ padding: 10px 12px;+ border: 1px solid var(--border);+ border-radius: var(--control-radius);+ font-size: var(--control-font);+}++:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) .posture-choice:has(input:checked) {+ border-color: var(--border);+ background: color-mix(in srgb, var(--text) 2%, transparent);+}++:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) .posture-choice:hover {+ background: var(--subtle);+}++:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) .posture-choice strong {+ display: block;+ color: var(--text);+ font-size: var(--control-font);+ font-weight: 500;+}++:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) .posture-choice small {+ display: block;+ margin-top: 4px;+ color: var(--muted);+ font-size: var(--control-font);+ line-height: 1.4;+}++:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) input[type="radio"] {+ appearance: none;+ display: inline-grid;+ place-content: center;+ flex: 0 0 16px;+ width: 16px;+ height: 16px;+ min-height: 0;+ margin: 1px 0 0;+ padding: 0;+ border: 1.5px solid var(--muted);+ border-radius: 50%;+ background: transparent;+}++:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) input[type="radio"]::before {+ content: "";+ width: 8px;+ height: 8px;+ border-radius: 50%;+ background: var(--cta);+ transform: scale(0);+}++:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) input[type="radio"]:checked {+ border-color: var(--cta);+}++:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) input[type="radio"]:checked::before {+ transform: scale(1);+}++:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) input[type="checkbox"] {+ accent-color: var(--cta);+}++:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) .setting-toggle input:checked + .setting-switch {+ border-color: var(--cta);+ background: var(--cta);+}++:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) .model-chip {+ display: inline-flex;+ align-items: center;+ gap: 6px;+ border: 1px solid var(--border);+ border-radius: var(--control-radius);+ padding: 4px 8px;+ background: var(--subtle);+ font-size: var(--control-font);+}++:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) .model-chip button {+ display: inline-flex;+ align-items: center;+ justify-content: center;+ width: 20px;+ height: 20px;+ min-height: 0;+ padding: 0;+ border: 0;+ background: transparent;+ color: var(--muted);+}++#view-design {+ padding-top: 8px;+}+#view-design > .hint {+ margin-bottom: 32px;+ overflow-wrap: anywhere;+}+#view-design .spec-demo {+ min-width: 0;+ width: 100%;+}+#view-design .spec-demo.stack > label {+ margin-top: 16px;+}+#view-design .spec-demo.stack > label:first-child {+ margin-top: 0;+}+#view-design .spec-demo.stack > label + input,+#view-design .spec-demo.stack > label + textarea,+#view-design .spec-demo.stack > label + .dd {+ margin-top: 4px;+}+#view-design .spec-demo .card {+ width: 100%;+ margin: 0;+}+#view-design .spec-demo .credential-row {+ width: 100%;+}+#view-design .spec-demo .tablewrap {+ max-width: 100%;+ overflow-x: auto;+}+#view-design .spec-demo .dd {+ width: 100%;+}+#view-design .spec-demo .dd-btn {+ width: 100%;+}+#view-design .spec-demo .choice-stack {+ width: 100%;+}+#view-design .spec-demo .setting-toggle {+ display: flex;+ align-items: center;+ gap: 8px;+}+#view-design .spec-demo .card {+ border: 0;+ border-block: 1px solid var(--border);+ border-radius: 0;+ box-shadow: none;+}+#view-design .spec-demo .card > .head,+#view-design .spec-demo .card > .body,+#view-design .spec-demo .card > .foot {+ padding: 0;+ border: 0;+}+#view-design .spec-demo .card > .body,+#view-design .spec-demo .card > .foot {+ margin-top: 16px;+}+@media (max-width: 600px) {+ #view-design .spec {+ grid-template-columns: minmax(0, 1fr);+ }+ #view-design .credential-row {+ flex-wrap: wrap;+ }+}++:where(html body[data-admin-kit="true"])+ :is(#app-view #main, dialog)+ input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):not([type="color"]),+:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) select,+:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) .dd > .dd-btn {+ height: var(--control-height);+}++:where(html body[data-admin-kit="true"]) :is(#app-view #main, dialog) .icon-button {+ width: var(--control-height);+ height: var(--control-height);+ border-radius: var(--control-radius);+}++body.design-view {+ background: var(--bg);+}++:where(html body[data-admin-kit="true"]) :is(.review-dialog-head, .project-dialog-head) h2 {+ font-size: 14px;+ font-weight: 500;+ line-height: 1.5;+}++:where(html body[data-admin-kit="true"]) :is(.review-dialog-head, .project-dialog-head) p {+ font-size: 13px;+ color: var(--muted);+ line-height: 1.5;+}++:where(html body[data-admin-kit="true"]) :is(.review-dialog-foot, .project-dialog-actions) {+ gap: 8px;+}++:where(html body[data-admin-kit="true"]) dialog .review-dialog-confirm.danger {+ background: var(--danger);+ border-color: var(--danger);+ color: var(--cta-foreground);+}++:where(html body[data-admin-kit="true"]) dialog .review-dialog-confirm.danger:hover:not(:disabled) {+ background: var(--danger);+ border-color: var(--danger);+ color: var(--cta-foreground);+ filter: brightness(0.9);+}++.credential-slug {+ color: var(--muted);+ font-size: 12px;+ font-weight: 400;+ overflow-wrap: anywhere;+}++dialog.credential-dialog {+ width: min(900px, calc(100vw - 32px));+ padding: 24px;+}+.credential-dialog .sc-form-head {+ display: none;+}+.credential-dialog #sc-editor {+ border-top: 0 !important;+ padding: 20px 0 0 !important;+}+.credential-dialog .project-dialog-actions {+ position: sticky;+ bottom: -24px;+ margin: 20px -24px -24px;+ padding: 16px 24px;+ border-top: 1px solid var(--border);+ background: var(--bg);+ flex-wrap: wrap;+}+.credential-dialog .project-dialog-actions .status {+ flex: 1;+ min-width: 120px;+}+@media (max-width: 650px) {+ dialog.credential-dialog {+ padding: 16px;+ }+ .credential-dialog .project-dialog-actions {+ bottom: -16px;+ margin: 16px -16px -16px;+ padding: 12px 16px;+ }+}++#app-view:is(.history-view, .slack-view, .judgments-view, .errors-view, .deployments-view, .crons-view) .admin-main {+ padding-top: 28px;+}++#app-view:is(.history-view, .slack-view, .judgments-view, .errors-view, .deployments-view, .crons-view) .admin-inner {+ max-width: 960px;+ margin-inline: auto;+}++#app-view:is(.history-view, .slack-view, .judgments-view, .errors-view, .deployments-view, .crons-view) #shellbar {+ flex-wrap: wrap;+ gap: 12px;+ margin-bottom: 24px;+ overflow: visible;+ white-space: normal;+}++#app-view:is(.history-view, .slack-view, .judgments-view, .errors-view, .deployments-view, .crons-view) .shell-title {+ font-size: 22px;+ font-weight: 500;+ line-height: 1.4;+}++#app-view:is(.history-view, .slack-view, .judgments-view, .errors-view, .deployments-view, .crons-view)+ #shellbar+ .back {+ flex-basis: 100%;+ justify-content: flex-start;+ min-height: 24px;+ padding: 0;+ border: 0;+ border-radius: 0;+ background: transparent;+ color: var(--muted);+ font-size: 13px;+ font-weight: 400;+ text-decoration: none;+}++#app-view:is(.history-view, .slack-view, .judgments-view, .errors-view, .deployments-view, .crons-view)+ #shellbar+ .back:hover {+ color: var(--text);+}++#app-view:is(.history-view, .slack-view, .judgments-view, .errors-view, .deployments-view, .crons-view)+ :is(.seg, .shell-tab) {+ min-height: 32px;+ padding: 6px 12px;+ border: 1px solid transparent;+ border-radius: 6px;+ background: transparent;+ color: var(--muted);+ font-size: 13px;+ font-weight: 400;+}++#app-view:is(.history-view, .slack-view, .judgments-view, .errors-view, .deployments-view, .crons-view)+ :is(.seg.active, .shell-tab.active) {+ color: var(--text);+ background: var(--subtle);+ border-color: color-mix(in srgb, var(--border) 60%, transparent);+}++#app-view:is(.history-view, .slack-view, .judgments-view, .errors-view, .deployments-view, .crons-view)+ :is(.seg, .shell-tab):hover {+ color: var(--text);+ background: var(--subtle);+}++#app-view:is(.history-view, .slack-view, .judgments-view, .errors-view, .deployments-view, .crons-view)+ #view-data+ > .card {+ margin: 0 0 12px;+ padding: 0;+ border: 0;+ border-radius: 0;+ background: transparent;+ box-shadow: none;+}++#app-view:is(.history-view, .slack-view, .judgments-view, .errors-view, .deployments-view, .crons-view)+ #view-data+ > .card+ > :is(.body, .head) {+ padding: 0;+ background: transparent;+ border: 0;+}++#app-view:is(.history-view, .slack-view, .judgments-view, .errors-view, .deployments-view, .crons-view)+ #view-data+ > .card+ > .head {+ margin-bottom: 8px;+}++#app-view:is(.history-view, .slack-view, .judgments-view, .errors-view, .deployments-view, .crons-view) .dense-list {+ border-top: 1px solid var(--border);+}++#app-view:is(.history-view, .slack-view, .judgments-view, .errors-view, .deployments-view, .crons-view) .dense-row {+ display: grid;+ grid-template-columns: minmax(120px, 180px) minmax(0, 1fr) 112px;+ gap: 12px;+ align-items: center;+ min-height: 32px;+ padding: 5px 0;+ border: 0;+ border-bottom: 1px solid color-mix(in srgb, var(--border) 65%, transparent);+}++#app-view:is(.history-view, .slack-view, .judgments-view, .errors-view, .deployments-view, .crons-view) .dense-name {+ grid-column: 1;+ grid-row: 1;+ max-width: none;+ font-size: 13px;+ font-weight: 400;+ line-height: 1.5;+}++#app-view:is(.history-view, .slack-view, .judgments-view, .errors-view, .deployments-view, .crons-view) .dense-preview {+ grid-column: 2;+ grid-row: 1;+ font-size: 13px;+ line-height: 1.5;+}++#app-view:is(.history-view, .slack-view, .judgments-view, .errors-view, .deployments-view, .crons-view)+ .dense-preview:empty {+ display: none;+}++#app-view:is(.history-view, .slack-view, .judgments-view, .errors-view, .deployments-view, .crons-view) .dense-time {+ grid-column: 3;+ grid-row: 1;+ align-self: center;+ line-height: 1.6;+}++#app-view:is(.history-view, .slack-view, .judgments-view, .errors-view, .deployments-view, .crons-view) .dense-tag {+ padding: 0;+ background: transparent;+ font-size: 12px;+ font-weight: 400;+}++#app-view:is(.history-view, .slack-view, .judgments-view, .errors-view, .deployments-view, .crons-view)+ :is(.dense-row, .back, .seg, .shell-tab):focus-visible {+ outline: 2px solid var(--cta);+ outline-offset: 3px;+}+@media (max-width: 640px) {+ #app-view:is(.history-view, .slack-view, .judgments-view, .errors-view, .deployments-view, .crons-view) #shellbar {+ gap: 10px;+ }++ #app-view:is(.history-view, .slack-view, .judgments-view, .errors-view, .deployments-view, .crons-view) .shell-sort {+ flex-basis: 100%;+ flex-wrap: wrap;+ }++ #app-view:is(.history-view, .slack-view, .judgments-view, .errors-view, .deployments-view, .crons-view)+ .shell-spacer {+ display: none;+ }++ #app-view:is(.history-view, .slack-view, .judgments-view, .errors-view, .deployments-view, .crons-view) .dense-row {+ grid-template-columns: minmax(0, 1fr) auto;+ gap: 2px 8px;+ padding: 5px 0;+ min-height: 44px;+ }++ #app-view:is(.history-view, .slack-view, .judgments-view, .errors-view, .deployments-view, .crons-view)+ .dense-preview {+ grid-column: 1 / -1;+ grid-row: 2;+ }++ #app-view:is(.history-view, .slack-view, .judgments-view, .errors-view, .deployments-view, .crons-view) .dense-time {+ grid-column: 2;+ grid-row: 1;+ margin-left: 0;+ }+}++#app-view.history-view #view-data > .card:not(:last-child) {+ margin-bottom: 32px;+}++#app-view.slack-view .shell-search {+ flex: 0 1 320px;+ min-width: 0;+}+#app-view.slack-view .shell-search input {+ width: 100%;+ min-width: 0;+ max-width: none;+}+#app-view.slack-view .dense-row {+ grid-template-columns: minmax(180px, 280px) minmax(0, 1fr) 112px;+}+#app-view.slack-view #shellbar:has(.sm-channel-heading) {+ position: sticky;+ top: var(--header-total-h);+ display: grid;+ grid-template-columns: minmax(0, 1fr) minmax(180px, 280px);+ gap: 12px 24px;+ max-width: 840px;+ margin: 0 auto 20px;+ padding: 12px 0 16px;+ border-bottom: 1px solid var(--border);+ background: var(--bg);+}+#app-view.slack-view .sm-toolbar {+ grid-column: 1 / -1;+ display: flex;+ align-items: center;+ gap: 16px;+ min-width: 0;+}+#app-view.slack-view #shellbar .sm-toolbar .back {+ flex: none;+ margin-right: auto;+}+#app-view.slack-view .sm-toolbar a {+ padding: 0;+ color: var(--muted);+ font-size: 12px;+ font-weight: 400;+ text-decoration: none;+}+#app-view.slack-view .sm-toolbar a:hover {+ color: var(--text);+ text-decoration: underline;+ text-underline-offset: 3px;+}+#app-view.slack-view .sm-channel-heading {+ display: grid;+ gap: 2px;+ min-width: 0;+}+#app-view.slack-view .sm-channel-heading .shell-title {+ overflow-wrap: anywhere;+}+#app-view.slack-view .sm-channel-heading .shell-context {+ font-size: 11px;+ line-height: 1.4;+ overflow-wrap: anywhere;+}+#app-view.slack-view .sm-stream {+ width: 100%;+ max-width: 840px;+ margin-inline: auto;+}+#app-view.judgments-view .sm-stream {+ max-width: none;+}+#app-view:is(.slack-view, .judgments-view) .sm-msg {+ margin: 16px 0 0;+ padding: 8px 10px;+ gap: 12px;+ border: 0;+ border-radius: 6px;+ scroll-margin-block: 190px 32px;+}+#app-view:is(.slack-view, .judgments-view) .sm-msg.sm-cont {+ margin-top: 0;+ padding-top: 4px;+ padding-bottom: 4px;+}+#app-view:is(.slack-view, .judgments-view) .sm-msg.sm-reply {+ margin-left: 0;+ border-left: 0;+}+#app-view:is(.slack-view, .judgments-view) .sm-gutter {+ flex-basis: 28px;+ width: 28px;+}+#app-view:is(.slack-view, .judgments-view) .sm-avatar {+ width: 28px;+ height: 28px;+ border: 1px solid var(--border);+ border-radius: 8px;+ background: var(--subtle);+ color: var(--text);+ font-size: 12px;+ font-weight: 500;+}+#app-view:is(.slack-view, .judgments-view) .sm-author {+ font-size: 13px;+ font-weight: 500;+}+#app-view:is(.slack-view, .judgments-view) .sm-text {+ font-size: 13px;+ line-height: 1.6;+ overflow-wrap: anywhere;+}+#app-view:is(.slack-view, .judgments-view) .sm-head {+ flex-wrap: wrap;+ gap: 4px 8px;+ margin-bottom: 6px;+}+#app-view:is(.slack-view, .judgments-view) .sm-when {+ margin-left: auto;+ font-size: 11px;+ font-variant-numeric: tabular-nums;+}+#app-view:is(.slack-view, .judgments-view) .sm-tag {+ font-size: 11px;+ font-weight: 400;+ color: var(--muted);+}+#app-view:is(.slack-view, .judgments-view) .sm-text a {+ color: var(--text);+ text-decoration: underline;+ text-decoration-color: var(--border);+ text-underline-offset: 3px;+}+#app-view:is(.slack-view, .judgments-view) .sm-text a:hover {+ text-decoration-color: currentColor;+}+#app-view:is(.slack-view, .judgments-view) .sm-text blockquote {+ margin: 6px 0;+ padding: 2px 0 2px 12px;+ border-left: 2px solid var(--border);+ color: var(--muted);+}+#app-view:is(.slack-view, .judgments-view) .sm-day {+ display: flex;+ align-items: center;+ gap: 16px;+ margin: 16px 0 0;+ padding: 0;+ border: 0;+ font-size: 11px;+ font-weight: 400;+}+#app-view:is(.slack-view, .judgments-view) .sm-day::before,+#app-view:is(.slack-view, .judgments-view) .sm-day::after {+ content: "";+ height: 1px;+ flex: 1;+ background: var(--border);+}+@media (max-width: 900px) {+ #app-view.slack-view #shellbar:has(.sm-channel-heading) {+ position: static;+ }+}+@media (max-width: 640px) {+ #app-view.slack-view #shellbar:has(.sm-channel-heading) {+ grid-template-columns: minmax(0, 1fr);+ gap: 12px;+ }+ #app-view.slack-view .sm-toolbar {+ flex-wrap: wrap;+ gap: 8px 12px;+ }+ #app-view.slack-view .shell-search {+ flex-basis: 100%;+ }+ #app-view.slack-view .dense-row {+ grid-template-columns: minmax(0, 1fr) auto;+ }+ #app-view:is(.slack-view, .judgments-view) .sm-msg {+ gap: 8px;+ padding-inline: 0;+ }+}++#app-view.judgments-view #shellbar .judgment-filters {+ flex-basis: 100%;+ flex-wrap: wrap;+ order: 1;+}++#app-view.judgments-view .dense-preview .badges {+ flex-wrap: nowrap;+ min-width: 0;+ gap: 8px;+}+#app-view.judgments-view .judgment-reason {+ display: block;+ min-width: 0;+ overflow: hidden;+ text-overflow: ellipsis;+ white-space: nowrap;+ padding: 0;+ border: 0;+ border-radius: 0;+ background: transparent;+ color: var(--muted);+ font-size: 13px;+ font-weight: 400;+}+#app-view.judgments-view .dense-preview :is(.badge, .dense-time) {+ flex-shrink: 0;+}+#app-view.judgments-view .judg-split {+ gap: 24px;+ margin: 0 0 24px;+}+#app-view.judgments-view :is(.judg-mirror, .judg-prompt) {+ border-radius: 8px;+ padding: 12px;+ background: transparent;+}+#app-view.judgments-view .judg-pane-title {+ margin-bottom: 12px;+ font-size: 13px;+ font-weight: 400;+}+#app-view.judgments-view .judg-decision {+ max-width: none;+ padding: 16px 0;+ border: 0;+ border-top: 1px solid var(--border);+ border-radius: 0;+ background: transparent;+ font-size: 13px;+ line-height: 1.6;+}+#app-view.errors-view #main .errors-table table {+ min-width: 800px;+}+#app-view.errors-view #main .errors-table :is(th, td) {+ padding: 7px 10px;+ vertical-align: top;+ font-size: 13px;+ line-height: 1.4;+}+#app-view.errors-view #main .errors-table th {+ font-size: 12px;+}+#app-view.errors-view #main .errors-table :is(th, td):first-child {+ width: 88px;+ padding-left: 0;+}+#app-view.errors-view #main .errors-table th:nth-child(2) {+ width: 120px;+}+#app-view.errors-view #main .errors-table th:nth-child(3) {+ width: auto;+}+#app-view.errors-view #main .errors-all th:nth-child(4) {+ width: 112px;+}+#app-view.errors-view #main .errors-table :is(th, td):nth-last-child(2) {+ width: 100px;+ white-space: nowrap;+}+#app-view.errors-view #main .errors-table :is(th, td):last-child {+ width: 144px;+ padding-right: 0;+ white-space: nowrap;+ text-align: right;+ color: var(--muted);+}+#app-view.errors-view #main .errors-table td.mono {+ font-size: 12px;+ color: var(--muted);+}+#app-view.errors-view .error-message summary {+ display: block;+ list-style: none;+}+#app-view.errors-view .error-message summary::-webkit-details-marker {+ display: none;+}+#app-view.errors-view .error-message:not([open]) .error-preview {+ display: -webkit-box;+ -webkit-box-orient: vertical;+ -webkit-line-clamp: 2;+ overflow: hidden;+}+#app-view.errors-view .error-message summary:hover {+ color: var(--muted);+}+#app-view.errors-view .error-message summary:focus-visible {+ outline: 2px solid var(--cta);+ outline-offset: 3px;+}++#app-view.judgments-view .dense-row {+ grid-template-columns: minmax(120px, 180px) minmax(0, 1fr) 144px;+}+@media (max-width: 640px) {+ #app-view.judgments-view .dense-row {+ grid-template-columns: minmax(0, 1fr) auto;+ }+}++#app-view #main .two-way-toggle {+ display: inline-flex;+ gap: 2px;+ min-width: 0;+ max-width: 100%;+ margin: 0;+ padding: 3px;+ border: 0;+ border-radius: 999px;+ background: var(--subtle);+}+#app-view #main .two-way-toggle legend,+#app-view #main .two-way-toggle input[type="radio"] {+ position: absolute;+ width: 1px;+ height: 1px;+ min-height: 0;+ padding: 0;+ margin: -1px;+ overflow: hidden;+ clip-path: inset(50%);+ white-space: nowrap;+ border: 0;+}+#app-view #main .two-way-toggle label {+ position: relative;+ display: flex;+ margin: 0;+ min-width: 0;+ flex: 1 1 auto;+ font-size: 13px;+ font-weight: 400;+ line-height: 18px;+ color: var(--muted);+ cursor: pointer;+}+#app-view #main .two-way-toggle label > span {+ display: flex;+ align-items: center;+ justify-content: center;+ width: 100%;+ min-height: 28px;+ padding: 5px 14px;+ border: 0;+ border-radius: 999px;+ white-space: nowrap;+}+#app-view #main .two-way-toggle input:checked + span {+ color: var(--cta-foreground);+ background: var(--cta);+ box-shadow: none;+}+#app-view #main .two-way-toggle input:focus-visible + span {+ outline: 2px solid var(--cta);+ outline-offset: 2px;+}+#app-view #main .two-way-toggle label:hover > input:not(:disabled):not(:checked) + span {+ color: var(--text);+ background: color-mix(in srgb, var(--text) 4%, transparent);+}+#app-view #main .two-way-toggle:disabled {+ opacity: 0.45;+}+#app-view #main .two-way-toggle:disabled label {+ cursor: not-allowed;+}++:where(html body[data-subview="metrics"]) #app-view #main #view-data > .card {+ margin: 24px 0 0;+ padding: 20px 0 0;+ border: 0;+ border-top: 1px solid var(--border);+ border-radius: 0;+ background: transparent;+ box-shadow: none;+}+:where(html body[data-subview="metrics"]) #app-view #main #view-data > .card > .head {+ margin: 0 0 12px;+ padding: 0;+ border: 0;+}+:where(html body[data-subview="metrics"]) #app-view #main #view-data > .card > .body {+ padding: 0;+ min-width: 0;+}+:where(html body:is([data-subview="metrics"], [data-subview="design-system"])) #app-view #main .statline {+ margin: 0 0 16px;+ padding: 0;+ border: 0;+ border-radius: 0;+ background: transparent;+ color: var(--muted);+ font-size: 13px;+ line-height: 1.6;+}+:where(html body[data-subview="metrics"]) #app-view #main .primaryline {+ font-size: 13px;+ font-weight: 400;+ line-height: 1.4;+}+:where(html body[data-subview="metrics"]) #app-view #main .subline {+ margin-top: 3px;+ color: var(--muted);+ font-size: 12px;+ font-weight: 400;+ line-height: 1.4;+}+:where(html body[data-subview="metrics"]) #app-view #main :is(th, td) {+ padding: 9px 10px;+ vertical-align: middle;+}+:where(html body[data-subview="metrics"]) #app-view #main :is(th, td):first-child {+ padding-left: 0;+}+:where(html body[data-subview="metrics"]) #app-view #main :is(th, td):last-child {+ padding-right: 0;+}+:where(html body[data-subview="metrics"]) #app-view #main .num {+ text-align: right;+ font-variant-numeric: tabular-nums;+ white-space: nowrap;+}+:where(html body[data-subview="metrics"]) #app-view #main th:not(:first-child) {+ text-align: right;+}+:where(html body[data-subview="metrics"]) #app-view #main .spark {+ margin-left: auto;+ color: var(--muted);+}+:where(html body[data-subview="metrics"]) #app-view #main .dist {+ gap: 8px;+ max-width: 640px;+}+:where(html body[data-subview="metrics"]) #app-view #main .dist-row {+ font-size: 13px;+}+:where(html body[data-subview="metrics"]) #app-view #main .dist-track {+ height: 8px;+ background: var(--subtle);+ border-radius: 999px;+ overflow: hidden;+}+:where(html body[data-subview="metrics"]) #app-view #main .dist-bar {+ background: var(--cta);+ border-radius: 999px;+}+:where(html body[data-subview="metrics"]) #app-view #main .shellbar:has(.back) {+ flex-wrap: wrap;+ gap: 8px 12px;+}+:where(html body[data-subview="metrics"]) #app-view #main .shellbar .back {+ flex-basis: 100%;+ min-height: 24px;+ padding: 0;+ border: 0;+ background: transparent;+ color: var(--muted);+ text-align: left;+ font-weight: 400;+}+@media (max-width: 640px) {+ :where(html body[data-subview="metrics"]) #app-view #main table {+ min-width: 620px;+ }+ :where(html body[data-subview="metrics"]) #app-view #main .shell-context {+ flex-basis: 100%;+ white-space: normal;+ }+}++:where(html body:is([data-subview="audit"], [data-subview="egress"])) #app-view #main #view-data > .card {+ margin: 0;+ padding: 0;+ border: 0;+ border-radius: 0;+ background: transparent;+ box-shadow: none;+}++:where(html body:is([data-subview="audit"], [data-subview="egress"])) #app-view #main #view-data > .card > .body {+ padding: 0;+ min-width: 0;+}++:where(html body:is([data-subview="audit"], [data-subview="egress"])) #app-view #main .tablewrap {+ border: 0;+ border-radius: 0;+}++:where(html body:is([data-subview="audit"], [data-subview="egress"])) #app-view #main th,+:where(html body:is([data-subview="audit"], [data-subview="egress"])) #app-view #main td {+ padding: 10px 12px;+ vertical-align: top;+}++:where(html body:is([data-subview="audit"], [data-subview="egress"])) #app-view #main th:first-child,+:where(html body:is([data-subview="audit"], [data-subview="egress"])) #app-view #main td:first-child {+ padding-left: 0;+}++:where(html body:is([data-subview="audit"], [data-subview="egress"])) #app-view #main th:last-child,+:where(html body:is([data-subview="audit"], [data-subview="egress"])) #app-view #main td:last-child {+ padding-right: 0;+}++:where(html body:is([data-subview="audit"], [data-subview="egress"])) #app-view #main .num {+ text-align: right;+ white-space: nowrap;+ font-variant-numeric: tabular-nums;+}++:where(html body:is([data-subview="audit"], [data-subview="egress"])) #app-view #main th:last-child {+ text-align: right;+}++:where(html body:is([data-subview="audit"], [data-subview="egress"])) #app-view #main .subline,+:where(html body:is([data-subview="audit"], [data-subview="egress"])) #app-view #main .mono {+ font-size: 13px;+ line-height: 1.4;+}++:where(html body:is([data-subview="audit"], [data-subview="egress"])) #app-view #main .shellbar {+ flex-wrap: wrap;+ gap: 12px 20px;+}++:where(html body:is([data-subview="audit"], [data-subview="egress"])) #app-view #main .shell-stats {+ flex-wrap: wrap;+ gap: 8px 16px;+}++:where(html body:is([data-subview="audit"], [data-subview="egress"])) #app-view #main .shell-stats .kpi {+ padding: 0;+ border: 0;+ border-radius: 0;+ background: transparent;+}++:where(html body:is([data-subview="audit"], [data-subview="egress"])) #app-view #main .shell-stats .kpi .n {+ font-size: 13px;+ font-weight: 500;+}++:where(html body:is([data-subview="audit"], [data-subview="egress"])) #app-view #main .shell-stats .kpi .k {+ font-size: 12px;+ font-weight: 400;+}++@media (max-width: 640px) {+ :where(html body:is([data-subview="audit"], [data-subview="egress"])) #app-view #main table {+ min-width: 660px;+ }+ :where(html body:is([data-subview="audit"], [data-subview="egress"])) #app-view #main .shell-stats {+ flex-basis: 100%;+ margin: 0;+ justify-content: flex-start;+ }+}++#app-view #main .admin-search {+ position: relative;+ width: 320px;+ max-width: 100%;+ min-width: 0;+}+#app-view #main .admin-search input {+ width: 100%;+ min-width: 0;+ max-width: none;+ height: 32px;+ padding: 6px 32px;+ border: 1px solid var(--border);+ border-radius: 6px;+ background: transparent;+ color: var(--text);+ font-size: 13px;+ font-weight: 400;+ line-height: 18px;+ box-shadow: none;+}+#app-view #main .admin-search input:focus {+ background: transparent;+ border-color: var(--cta);+}+#app-view #main .admin-search input::placeholder {+ color: var(--muted);+ opacity: 1;+}+#app-view #main .admin-search input::-webkit-search-cancel-button {+ -webkit-appearance: none;+}+#app-view #main .admin-search-icon {+ position: absolute;+ left: 10px;+ top: 8px;+ width: 16px;+ height: 16px;+ color: var(--muted);+ pointer-events: none;+}+#app-view #main .admin-search-icon svg {+ display: block;+ width: 100%;+ height: 100%;+}+#app-view #main .admin-search-clear {+ position: absolute;+ right: 4px;+ top: 4px;+ display: grid;+ place-items: center;+ width: 24px;+ height: 24px;+ min-height: 24px;+ padding: 0;+ border: 0;+ border-radius: 4px;+ background: transparent;+ color: var(--muted);+ font-size: 18px;+ line-height: 1;+}+#app-view #main .admin-search:has(input:placeholder-shown) .admin-search-clear {+ display: none;+}+#app-view #main .admin-search:has(input:disabled) {+ opacity: 0.5;+}++:where(html body:is([data-subview="skills"], [data-subview="files"], [data-subview="design-system"]))+ #app-view+ #main+ #view-data+ .card {+ margin: 0 0 24px;+ padding: 0;+ border: 0;+ border-radius: 0;+ background: transparent;+ box-shadow: none;+}++:where(html body:is([data-subview="skills"], [data-subview="design-system"])) #app-view #main #view-data .card > .head {+ margin: 0 0 12px;+ padding: 0;+ border: 0;+}++:where(html body:is([data-subview="skills"], [data-subview="files"], [data-subview="design-system"]))+ #app-view+ #main+ #view-data+ .card+ > .body {+ padding: 0;+ min-width: 0;+}++:where(html body:is([data-subview="skills"], [data-subview="design-system"])) #app-view #main #view-data .card .card {+ margin-top: 24px;+}++:where(html body:is([data-subview="skills"], [data-subview="design-system"])) #app-view #main .primaryline,+:where(html body:is([data-subview="skills"], [data-subview="design-system"])) #app-view #main .pack-name strong {+ font-size: 13px;+ font-weight: 400;+ line-height: 1.4;+}++:where(html body:is([data-subview="skills"], [data-subview="design-system"])) #app-view #main .subline {+ font-size: 12px;+ line-height: 1.4;+ color: var(--muted);+}++:where(html body:is([data-subview="skills"], [data-subview="design-system"])) #app-view #main .tablewrap {+ border: 0;+ border-radius: 0;+}++:where(html body:is([data-subview="skills"], [data-subview="design-system"])) #app-view #main th,+:where(html body:is([data-subview="skills"], [data-subview="design-system"])) #app-view #main td {+ padding: 10px 12px;+ vertical-align: middle;+}++:where(html body:is([data-subview="skills"], [data-subview="design-system"])) #app-view #main th:first-child,+:where(html body:is([data-subview="skills"], [data-subview="design-system"])) #app-view #main td:first-child {+ padding-left: 0;+}++:where(html body:is([data-subview="skills"], [data-subview="design-system"])) #app-view #main th:last-child,+:where(html body:is([data-subview="skills"], [data-subview="design-system"])) #app-view #main td:last-child {+ padding-right: 0;+}++:where(html body:is([data-subview="skills"], [data-subview="design-system"])) #app-view #main .num {+ text-align: right;+ font-variant-numeric: tabular-nums;+}++:where(html body:is([data-subview="skills"], [data-subview="design-system"])) #app-view #main .pack-register {+ display: flex;+ flex-wrap: wrap;+ gap: 8px;+ margin-bottom: 12px;+}++:where(html body:is([data-subview="skills"], [data-subview="design-system"])) #app-view #main .pack-register > input {+ flex: 1 1 320px;+ min-width: 0;+}++:where(html body:is([data-subview="skills"], [data-subview="design-system"])) #app-view #main .pack-register .linkish {+ min-height: 32px;+ padding: 4px 8px;+ border: 0;+ background: transparent;+ color: var(--muted);+ font-weight: 400;+}++:where(html body:is([data-subview="skills"], [data-subview="design-system"])) #app-view #main .pack-adv:not(.hidden) {+ display: grid;+ grid-template-columns: repeat(3, minmax(0, 1fr)) auto;+ gap: 8px;+ margin-bottom: 16px;+}++:where(html body:is([data-subview="skills"], [data-subview="design-system"])) #app-view #main .pack-adv input,+:where(html body:is([data-subview="skills"], [data-subview="design-system"])) #app-view #main .pack-adv .dd {+ width: 100%;+ min-width: 0;+}++:where(html body:is([data-subview="skills"], [data-subview="files"], [data-subview="design-system"]))+ #app-view+ #main+ .dense-row {+ min-height: 32px;+ padding: 5px 0;+ gap: 12px;+}++:where(html body:is([data-subview="skills"], [data-subview="files"], [data-subview="design-system"]))+ #app-view+ #main+ .dense-name {+ font-size: 13px;+ font-weight: 400;+ line-height: 1.4;+}++:where(html body:is([data-subview="skills"], [data-subview="files"], [data-subview="design-system"]))+ #app-view+ #main+ .dense-preview {+ font-size: 13px;+ line-height: 1.4;+}++:where(html body:is([data-subview="skills"], [data-subview="files"], [data-subview="design-system"]))+ #app-view+ #main+ .dense-tag {+ padding: 0;+ background: transparent;+ font-size: 12px;+}++:where(html body:is([data-subview="skills"], [data-subview="design-system"])) #app-view #main .skillbody {+ padding: 16px;+ border: 0;+ border-radius: 6px;+ background: var(--subtle);+ overflow-wrap: anywhere;+}++:where(html body:is([data-subview="skills"], [data-subview="files"], [data-subview="design-system"]))+ #app-view+ #main+ .shellbar {+ flex-wrap: wrap;+ gap: 8px 16px;+}++:where(html body:is([data-subview="skills"], [data-subview="files"], [data-subview="design-system"]))+ #app-view+ #main+ .shellbar+ .back {+ flex-basis: 100%;+ min-height: 24px;+ padding: 0;+ border: 0;+ background: transparent;+ color: var(--muted);+ text-align: left;+}++:where(html body:is([data-subview="skills"], [data-subview="design-system"])) #app-view #main .ovwrap > button {+ width: 32px;+ padding: 0;+}++@media (max-width: 640px) {+ :where(html body:is([data-subview="skills"], [data-subview="design-system"])) #app-view #main .pack-register > input {+ flex-basis: 100%;+ }+ :where(html body:is([data-subview="skills"], [data-subview="design-system"])) #app-view #main .pack-adv:not(.hidden) {+ grid-template-columns: minmax(0, 1fr);+ }+ :where(html body:is([data-subview="skills"], [data-subview="design-system"])) #app-view #main table {+ min-width: 620px;+ }+ :where(html body:is([data-subview="skills"], [data-subview="files"], [data-subview="design-system"]))+ #app-view+ #main+ .shell-search {+ flex-basis: 100%;+ max-width: none;+ }+ :where(html body:is([data-subview="skills"], [data-subview="files"], [data-subview="design-system"]))+ #app-view+ #main+ .dense-row {+ min-height: 44px;+ }+}++:where(html body:is([data-subview="files"], [data-subview="design-system"])) #app-view #main .file-upload {+ margin: 0 0 16px;+ padding: 0 0 16px;+ border: 0;+ border-bottom: 1px solid var(--border);+ border-radius: 0;+ background: transparent;+}++:where(html body:is([data-subview="files"], [data-subview="design-system"])) #app-view #main .file-upload.dragging {+ background: var(--subtle);+ outline: 1px dashed var(--brand);+ outline-offset: 6px;+}++:where(html body:is([data-subview="files"], [data-subview="design-system"])) #app-view #main .file-upload-main strong {+ font-weight: 500;+}++:where(html body:is([data-subview="files"], [data-subview="design-system"])) #app-view #main .file-thumb {+ width: 30px;+ height: 24px;+ border: 0;+ border-radius: 4px;+ font-weight: 400;+}++@media (max-width: 640px) {+ :where(html body:is([data-subview="files"], [data-subview="design-system"])) #app-view #main .dense-row {+ flex-wrap: wrap;+ gap: 4px 8px;+ padding: 8px 0;+ }++ :where(html body:is([data-subview="files"], [data-subview="design-system"])) #app-view #main .dense-name {+ max-width: calc(100% - 38px);+ }++ :where(html body:is([data-subview="files"], [data-subview="design-system"])) #app-view #main .dense-time {+ flex-basis: 100%;+ margin-left: 0;+ }+}++#app-view:is(.deployments-view, .crons-view) .shell-search {+ flex: 0 1 320px;+ min-width: 0;+}+#app-view:is(.deployments-view, .crons-view) .dense-row {+ grid-template-columns: minmax(180px, 280px) minmax(0, 1fr) 144px;+}+@media (max-width: 640px) {+ #app-view:is(.deployments-view, .crons-view) .shell-search {+ flex-basis: 100%;+ }+ #app-view:is(.deployments-view, .crons-view) .dense-row {+ grid-template-columns: minmax(0, 1fr) auto;+ }+}++#app-view.crons-view .dense-time {+ white-space: normal;+ text-align: right;+}+#app-view.crons-view .factlist {+ font-size: 13px;+ gap: 10px 20px;+}+#app-view.crons-view .prompt-body {+ font-size: 13px;+ line-height: 1.6;+}++#view-design .design-layouts {+ display: grid;+ grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);+ gap: 16px;+}+#view-design .design-layout-frame {+ display: grid;+ grid-template-columns: 64px minmax(0, 1fr);+ border: 1px solid var(--border);+ border-radius: 6px;+ overflow: hidden;+ font-size: 11px;+}+#view-design .design-layout-nav {+ padding: 12px 8px;+ background: var(--subtle);+ color: var(--muted);+}+#view-design .design-layout-main {+ padding: 18px;+ background: color-mix(in srgb, var(--brand) 5%, var(--bg));+}+#view-design .design-layout-content {+ background: var(--bg);+ padding: 12px;+ min-width: 0;+}+#view-design .design-layout-title {+ display: flex;+ flex-wrap: wrap;+ justify-content: space-between;+ gap: 8px;+}+#view-design .design-layout-title span {+ color: var(--muted);+}+#view-design .design-layout-section {+ margin-top: 16px;+ padding-bottom: 12px;+ border-bottom: 1px solid var(--border);+}+#view-design .design-layout-lines {+ padding-top: 12px;+ overflow: hidden;+ color: var(--muted);+}+#view-design .design-layout-frame.mobile {+ display: block;+}+#view-design .design-layout-frame.mobile .design-layout-main {+ padding: 14px;+}+#view-design .design-rules {+ padding-left: 18px;+ margin: 0;+}+#view-design .design-rules li + li {+ margin-top: 8px;+}+#view-design .design-page-links p {+ margin: 4px 0 16px;+ color: var(--muted);+}+#view-design .design-open-section {+ padding-top: 20px;+ border-top: 1px solid var(--border);+}+#view-design .design-open-section h3 {+ margin: 0;+ font-size: 14px;+ font-weight: 500;+}+#view-design .design-open-section > p {+ margin: 4px 0 12px;+}+@media (max-width: 640px) {+ #view-design .design-layouts {+ grid-template-columns: minmax(0, 1fr);+ }+}++#view-design .design-contents {+ display: flex;+ flex-wrap: wrap;+ gap: 8px 16px;+ margin: 16px 0 28px;+ font-size: 13px;+}+#view-design .design-group {+ scroll-margin-top: 80px;+}++#app-view #main #shellbar:has(.shell-back-row) {+ flex-wrap: wrap;+}+#app-view #main #shellbar .shell-back-row {+ display: flex;+ flex: 0 0 100%;+}+#app-view #main #shellbar .shell-back-row:empty {+ display: none;+}++#app-view #main {+ --table-body-size: 13px;+ --table-meta-size: 12px;+ --table-line-height: 1.4;+}+#app-view #main table :is(th, td) {+ padding: 7px 12px;+ line-height: var(--table-line-height);+ vertical-align: middle;+}+#app-view #main table th {+ font-size: var(--table-meta-size);+ font-weight: 400;+ color: var(--muted);+ background: transparent;+}+#app-view #main table td {+ font-size: var(--table-body-size);+ font-weight: 400;+ border-bottom: 1px solid var(--border);+}+#app-view #main table :is(th, td):first-child {+ padding-left: 0;+}+#app-view #main table :is(th, td):last-child {+ padding-right: 0;+}++#app-view #main :is(table .primaryline, table .pack-name strong, table .mono, .dense-name, .credential-title strong) {+ font-size: var(--table-body-size);+ font-weight: 400;+ line-height: var(--table-line-height);+}++#app-view #main :is(table .subline, .credential-main .hint, .dense-time, .dense-tag) {+ font-size: var(--table-meta-size);+ font-weight: 400;+ line-height: var(--table-line-height);+}+#app-view #main :is(table .subline, .dense-time, .dense-preview) {+ color: var(--muted);+}+#app-view #main .dense-preview {+ font-size: var(--table-body-size);+ font-weight: 400;+ line-height: var(--table-line-height);+}+#app-view #main .dense-row {+ min-height: 32px;+ padding-top: 5px;+ padding-bottom: 5px;+}+#app-view #main table .num {+ font-size: var(--table-meta-size);+ font-variant-numeric: tabular-nums;+}+@media (max-width: 640px) {+ #app-view #main .dense-row {+ min-height: 44px;+ }+}++#app-view #main #shellbar .file-upload {+ margin: 0;+ padding: 0;+ border: 0;+ background: transparent;+}+#app-view #main .upload-button {+ display: inline-flex;+ align-items: center;+ justify-content: center;+ gap: 6px;+ white-space: nowrap;+}+#app-view #main .upload-button svg {+ flex-shrink: 0;+}++#who {+ gap: 16px;+}+#who .account-identity {+ display: flex;+ flex-direction: column;+ align-items: flex-end;+ min-width: 0;+ gap: 0;+ line-height: 1.15;+}+#who #who-name {+ display: block;+ order: -1;+ max-width: 220px;+ font-size: 13px;+ font-weight: 400;+}+#who #org-tag {+ display: block;+ max-width: 220px;+ font-size: 11px;+}+#who #org-tag::before {+ content: "Organization ";+}+#who #signout {+ display: inline-flex;+ align-items: center;+ justify-content: center;+ min-height: 32px;+ padding: 6px 10px;+ border: 1px solid var(--border);+ border-radius: 6px;+ background: transparent;+ color: var(--muted);+ font-size: 12px;+ font-weight: 400;+ line-height: 1.3;+ text-decoration: none;+ white-space: nowrap;+}+#who #signout:hover {+ color: var(--text);+ background: var(--subtle);+}+#who #signout:focus-visible {+ outline: 2px solid var(--cta);+ outline-offset: 2px;+}+@media (max-width: 560px) {+ #who {+ gap: 8px;+ }+ #who :is(#who-name, #org-tag) {+ max-width: 28vw;+ }+ #who #signout {+ min-height: 44px;+ }+}++#app-view #main .file-scope-index .dense-row {+ display: grid;+ grid-template-columns: minmax(0, 1fr) 110px minmax(144px, 1fr);+ gap: 12px;+}+#app-view #main .file-scope-index .dense-name {+ max-width: none;+ min-width: 0;+}+#app-view #main .file-scope-index .dense-preview {+ font-variant-numeric: tabular-nums;+}+#app-view #main .file-scope-index .dense-time {+ margin-left: 0;+ text-align: right;+}+@media (max-width: 640px) {+ #app-view #main .file-scope-index .dense-row {+ grid-template-columns: minmax(0, 1fr) 76px;+ gap: 4px 12px;+ }+ #app-view #main .file-scope-index .dense-time {+ grid-column: 1 / -1;+ text-align: left;+ }+}diff --git a/plugins/admin/public/index.html b/plugins/admin/public/index.htmlindex 353ddced2..7148da539 100644--- a/plugins/admin/public/index.html+++ b/plugins/admin/public/index.html@@ -8,12 +8,12 @@<style>:root {color-scheme: light;- --bg: #fbfbfa;+ --bg: #ffffff;--surface: #ffffff;--subtle: #f4f5f4;--text: #18181b;--muted: #667085;- --border: #e4e7ec;+ --border: #e5e5e5;--ink: #101828;--danger: #b42318;--ok: #16723a;@@ -42,6 +42,7 @@--bg: oklch(0.165 0.022 250);--surface: oklch(0.205 0.024 250);--subtle: oklch(0.245 0.024 250);+ --sidebar-active: oklch(0.245 0.024 250);--text: oklch(0.975 0.005 250);--muted: oklch(0.72 0.021 250);--border: oklch(0.275 0.024 250);@@ -63,6 +64,7 @@}html {min-height: 100%;+ scrollbar-gutter: stable;overflow-x: hidden;background: var(--bg);}@@ -101,7 +103,7 @@margin: 0;padding: var(--header-safe-top) max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));border-bottom: 1px solid color-mix(in srgb, var(--border) 68%, transparent);- background: color-mix(in srgb, var(--bg) 94%, var(--subtle));+ background: var(--bg);}body:has(#app-view:not(.hidden)) header {margin-left: var(--sidebar-w);@@ -174,9 +176,36 @@letter-spacing: 0;line-height: 1;}- .header-home {+ .header-home,+ #app-view #main #shellbar .back {+ display: inline-flex;+ align-items: center;flex: 0 0 auto;+ gap: 6px;margin-right: auto;+ width: fit-content;+ min-height: 0;+ line-height: 1.4;+ border-radius: 0;+ box-shadow: none;+ padding: 0;+ border: 0;+ background: transparent;+ color: var(--muted);+ font-size: 13px;+ font-weight: 400;+ text-decoration: none;+ white-space: nowrap;+ }+ .header-home:hover,+ #app-view #main #shellbar .back:hover {+ color: var(--text);+ }+ .header-home:focus-visible,+ #app-view #main #shellbar .back:focus-visible {+ outline: 2px solid var(--text);+ outline-offset: 4px;+ border-radius: 2px;}.header-controls {display: flex;@@ -211,6 +240,9 @@accent-color: var(--ink);cursor: pointer;}+ .account-identity {+ display: contents;+ }.who {display: flex;align-items: center;@@ -324,7 +356,6 @@outline: 2px solid var(--text);outline-offset: 2px;}-h1 {font-size: 24px;line-height: 1.2;@@ -337,7 +368,6 @@margin: 0 0 28px;max-width: 62ch;}-.admin-app {display: grid;grid-template-columns: var(--sidebar-w) minmax(0, 1fr);@@ -365,8 +395,8 @@padding: 28px 28px 40px;}.admin-inner {- width: min(var(--maxw), 100%);- margin: 0 auto;+ width: 100%;+ margin: 0;}.history-view .admin-main {padding-top: 20px;@@ -475,7 +505,6 @@padding: 5px 10px;font-size: 13px;}-nav.tabs {display: flex;flex: 1 1 auto;@@ -484,6 +513,7 @@min-height: 0;overflow-x: hidden;overflow-y: auto;+ overscroll-behavior-y: contain;scrollbar-width: none;max-width: 100%;padding: 0;@@ -501,8 +531,8 @@width: 100%;border: none;background: none;- padding: 6px 11px 6px 38px;- color: var(--muted);+ padding: 5px 5px 5px 6px;+ color: var(--text);border-radius: var(--radius);cursor: pointer;font: inherit;@@ -520,9 +550,9 @@}.tab.active {color: var(--text);- background: color-mix(in srgb, var(--text) 4%, transparent);+ background: color-mix(in srgb, var(--text) 2.5%, transparent);box-shadow: none;- font-weight: 500;+ font-weight: 400;}.tab:disabled {color: color-mix(in srgb, var(--muted) 45%, transparent);@@ -537,9 +567,9 @@}.tab-section {flex: 0 0 auto;- padding: 12px 11px 6px 9px;+ padding: 12px 6px 6px 19px;color: var(--muted);- font-size: 11px;+ font-size: 12.5px;font-weight: 400;}nav.tabs .tab-section {@@ -551,12 +581,11 @@border-top: 0;}nav.tabs .tab:last-child {- margin-top: auto;- padding-top: 12px;- border-top: 1px solid var(--border);- border-radius: 0;+ margin-top: 0;+ padding-top: 5px;+ border-top: 0;+ border-radius: var(--radius);}-section.card {margin: 0 0 22px;padding: 18px;@@ -638,7 +667,6 @@padding: 16px 0 0;border: none;}-label {display: block;font-size: 12px;@@ -647,6 +675,7 @@margin: 0 0 6px;}input[type="text"],+ input[type="url"],input[type="email"],input[type="date"],input:not([type]),@@ -771,7 +800,6 @@.danger-link:hover {background: none;}-button {font: inherit;cursor: pointer;@@ -800,9 +828,6 @@background: var(--cta-hover);border-color: var(--cta-hover);}- button.dirty::after {- content: " *";- }.link {border: none;background: none;@@ -844,7 +869,6 @@.icon-button:hover {color: var(--text);}-.scopepick {position: relative;}@@ -910,7 +934,6 @@color: var(--muted);font-size: 13px;}-table {width: 100%;border-collapse: collapse;@@ -1028,7 +1051,6 @@.history-volume-cell {white-space: nowrap;}-.badge {display: inline-block;font-size: 11px;@@ -1048,6 +1070,16 @@border-color: rgba(22, 114, 58, 0.35);background: rgba(22, 114, 58, 0.07);}+ .badge.ok {+ display: inline-flex;+ align-items: center;+ padding: 2px 8px;+ border-color: color-mix(in srgb, var(--ok) 16%, transparent);+ background: color-mix(in srgb, var(--ok) 6%, transparent);+ font-size: 12px;+ font-weight: 500;+ line-height: 1.4;+ }.badge.err {color: var(--danger);border-color: rgba(180, 35, 24, 0.35);@@ -1270,7 +1302,6 @@color: var(--danger);border-color: var(--danger);}-.pack-register {display: flex;align-items: center;@@ -1356,7 +1387,6 @@.ovmenu button.danger {color: var(--danger);}-.statline {display: inline-flex;flex-wrap: wrap;@@ -1454,7 +1484,6 @@padding-top: 6px;padding-bottom: 6px;}-.status {font-size: 13px;}@@ -1546,7 +1575,6 @@gap: 10px;flex-wrap: wrap;}-.pager {display: flex;align-items: center;@@ -1572,14 +1600,12 @@.hidden {display: none !important;}-tr.openable {cursor: pointer;}tr.openable:hover td {background: var(--subtle);}-tr.monologue-row td {background-color: color-mix(in srgb, var(--trigger) 3%, transparent);}@@ -1729,7 +1755,6 @@color: var(--muted);font-size: 12px;}-.sm-stream {max-width: var(--readw);display: flex;@@ -2009,7 +2034,6 @@.prompt-toggle:hover {color: var(--text);}-.back {border: none;background: none;@@ -2027,7 +2051,6 @@.detail {max-width: var(--readw);}-.viewer {margin: 14px 0 0;max-width: var(--readw);@@ -2036,7 +2059,6 @@border-radius: 8px;background: var(--surface);}-.vhead {display: flex;align-items: flex-start;@@ -2124,7 +2146,6 @@margin-left: auto;text-align: right;}-.entry.collapsed > pre,.entry.collapsed > .message-body {display: none;@@ -2319,7 +2340,6 @@display: block;margin: 2px 0 6px 18px;}-.tool-line-entry > .tool-entry > .who {display: none;}@@ -2329,7 +2349,6 @@.context-turn {margin: 0 0 2px 18px;}-.context-turn.cache-miss {border-left: 3px solid var(--danger);padding-left: 10px;@@ -2597,7 +2616,6 @@.inline-context.collapsed {display: none;}-.context-page-head {display: flex;align-items: baseline;@@ -2632,7 +2650,6 @@.context-page .context-stack {height: 36px;}-.context-page.context-turn {margin: 0;}@@ -2672,7 +2689,6 @@color: var(--muted);font-size: 13px;}-body.context-fullpage header {position: static;}@@ -2825,7 +2841,6 @@.pathcrumb {word-break: break-all;}-.field-hint {color: var(--muted);font-size: 12px;@@ -3031,7 +3046,6 @@display: block;color: var(--muted);}-body[data-subview="models"] #view-governance section.card:not(.sv-models),body[data-subview="credentials"] #view-governance section.card:not(.sv-credentials),body[data-subview="customize"] #view-governance section.card:not(.sv-customize),@@ -3137,11 +3151,8 @@background: var(--subtle);}.admin-app .dd-item.sel {- font-weight: 600;- }- .admin-app .dd-item.sel::after {- content: " ✓";- color: var(--accent, #4a7dff);+ background: var(--subtle);+ font-weight: 400;}.admin-app .dd-item.dis {color: var(--muted);@@ -3643,7 +3654,7 @@font-size: 12px;}.governance-view .shellbar {- display: none;+ display: flex;}.governance-capability {display: flex;@@ -3870,7 +3881,6 @@.review-dialog-confirm.danger:hover {background: #912018;}-@media (max-width: 1180px) {.governance-layout {grid-template-columns: 1fr;@@ -3893,7 +3903,6 @@border-bottom-color: var(--ink);}}-@media (max-width: 900px) {header.top {padding-right: max(14px, env(safe-area-inset-right));@@ -3986,7 +3995,6 @@grid-template-columns: 1fr;}}-@media (max-width: 640px) {#view-governance .setting-row {grid-template-columns: 1fr;@@ -4005,7 +4013,6 @@text-align: left;}}-@media (max-width: 560px) {header.top {gap: 10px;@@ -4137,7 +4144,6 @@display: none;}}-@media (max-width: 400px) {header.top {gap: 8px;@@ -4164,17 +4170,16 @@padding: 0 2px;}}-:root {- --subtle: #eeeeea;- --text: #1c1c1a;- --muted: #6f6f68;+ --subtle: #f5f5f5;+ --text: #171717;+ --muted: #737373;--ink: #1c1c1a;--danger: #b91c1c;--ok: #1a7f37;--warn: #b45309;- --bg: #fbfbfa;- --border: #e4e7ec;+ --bg: #ffffff;+ --border: #e5e5e5;--radius: 8px;--header-h: 56px;--sidebar-w: 280px;@@ -4198,15 +4203,11 @@margin-left: var(--sidebar-w);padding: var(--header-safe-top) max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));border-bottom-color: color-mix(in srgb, var(--border) 68%, transparent);- background: color-mix(in srgb, var(--bg) 94%, var(--subtle));+ background: var(--bg);}body:has(#app-view.hidden) header.top {display: none;}- .header-home {- flex: 0 0 auto;- margin-right: auto;- }.who {margin-left: auto;}@@ -4220,6 +4221,17 @@padding: calc(10px + var(--header-safe-top)) 4px 10px 8px;background: color-mix(in srgb, var(--subtle) 42%, var(--bg));}+ @media (min-width: 901px) {+ .admin-sidebar .tab {+ width: calc(100% - 13px);+ margin-left: 13px;+ line-height: 21px;+ transition: background 0.12s ease;+ }+ .admin-sidebar nav.tabs {+ padding-right: 6px;+ }+ }.brand {gap: 7.5px;min-height: 51px;@@ -4274,9 +4286,9 @@}.tab {min-height: 0;- padding: 6px 11px 6px 38px;+ padding: 5px 5px 5px 6px;border-radius: var(--radius);- color: var(--muted);+ color: var(--text);font-size: 14px;font-weight: 400;}@@ -4286,18 +4298,18 @@}.tab.active {color: var(--text);- background: color-mix(in srgb, var(--text) 4%, transparent);+ background: color-mix(in srgb, var(--text) 2.5%, transparent);box-shadow: none;- font-weight: 500;+ font-weight: 400;}.tab-top {- color: var(--muted);+ color: var(--text);font-weight: 400;}.tab-section {- padding: 12px 11px 6px 9px;+ padding: 12px 6px 6px 19px;color: var(--muted);- font-size: 11px;+ font-size: 12.5px;font-weight: 400;letter-spacing: 0;}@@ -4318,10 +4330,10 @@border-top: 0;}nav.tabs .tab:last-child {- margin-top: auto;- padding-top: 12px;- border-top: 1px solid var(--border);- border-radius: 0;+ margin-top: 0;+ padding-top: 5px;+ border-top: 0;+ border-radius: var(--radius);}.admin-main {grid-column: 2;@@ -4329,9 +4341,50 @@max-width: none;padding: 28px 28px 40px;}+ .admin-main .shellbar {+ position: static;+ min-height: 32px;+ margin-bottom: 8px;+ padding: 0;+ }+ .admin-main .shell-title {+ font-size: 22px;+ font-weight: 600;+ letter-spacing: -0.025em;+ }+ .admin-main input[type="text"],+ .admin-main input[type="url"],+ .admin-main textarea,+ .admin-main select,+ .admin-main .dd > button {+ background: transparent;+ border-color: var(--border);+ border-radius: 10px;+ box-shadow: none;+ }+ .admin-main label,+ .admin-main .hint,+ .admin-main .viewlink,+ .admin-main input,+ .admin-main textarea,+ .admin-main .dd > button {+ font-size: 13px;+ line-height: 1.4;+ }+ .admin-main label,+ .admin-main .hint,+ .admin-main .viewlink {+ color: var(--muted);+ }+ .admin-main label {+ margin-bottom: 4px;+ }+ .admin-main section.card:not(.setting-row) {+ box-shadow: none;+ }.admin-inner {- width: min(var(--maxw), 100%);- margin: 0 auto;+ width: 100%;+ margin: 0;}#view-governance > .governance-overview,#view-governance .governance-sections,@@ -4354,7 +4407,7 @@display: block;min-height: 0;margin: 0;- padding: 16px 12px;+ padding: 20px 0;border: 0;border-bottom: 1px solid color-mix(in srgb, var(--border) 65%, transparent);border-radius: 0;@@ -4394,14 +4447,14 @@#view-governance .setting-row > .head h2 {margin: 0;font-size: 14px;- font-weight: 600;+ font-weight: 500;}#view-governance .card > .head p,#view-governance .setting-row > .head p {- margin: 2px 0 8px;+ margin: 4px 0 8px;color: var(--muted);- font-size: 12.5px;- line-height: 1.5;+ font-size: 13px;+ line-height: 1.4;}#view-governance .card > .body,#view-governance .setting-row > .body {@@ -4435,9 +4488,6 @@font-size: 12.5px;font-weight: 500;}- #view-governance [data-save]:disabled {- display: none;- }#view-governance .parity-subsection {padding: 4px 0;border: 0;@@ -4456,26 +4506,38 @@display: none;}.choice-stack {- display: flex;- flex-direction: column;- gap: 6px;- max-width: 640px;- margin-top: 8px;+ display: grid;+ grid-template-columns: repeat(2, minmax(0, 1fr));+ gap: 8px;+ max-width: none;+ margin-top: 6px;}.posture-choice {display: flex;align-items: flex-start;gap: 8px;margin: 0;- padding: 8px 10px;- border: 1px solid var(--border);+ padding: 7px 10px;+ border: 1px solid transparent;border-radius: 8px;color: var(--text);cursor: pointer;+ line-height: 1.4;+ transition: background 120ms ease;+ }+ .posture-choice:hover {+ background: color-mix(in srgb, var(--text) 6%, transparent);+ }+ .posture-choice:focus-within {+ outline: 2px solid var(--muted);+ outline-offset: 1px;}.posture-choice:has(input:checked) {- border-color: var(--border);- background: var(--subtle);+ border-color: transparent;+ background: color-mix(in srgb, var(--text) 4%, transparent);+ }+ .posture-choice:has(input:checked):hover {+ background: color-mix(in srgb, var(--text) 8%, transparent);}.posture-choice input {width: auto;@@ -4486,73 +4548,498 @@display: block;}.posture-choice strong {+ color: var(--text);font-size: 13px;font-weight: 600;}.posture-choice small {- margin-top: 2px;+ margin-top: 0;color: var(--muted);- font-size: 11.5px;+ font-size: 13px;font-weight: 400;line-height: 1.4;}- .policy-rules {+ #card-security-posture .choice-stack {display: grid;+ grid-template-columns: repeat(3, minmax(0, 1fr));gap: 8px;+ max-width: none;}- .policy-rule {- display: grid;- grid-template-columns: 180px minmax(240px, 1fr) minmax(150px, 0.55fr) 34px;- gap: 8px;- align-items: center;+ #card-security-posture .posture-choice,+ #card-sharing-posture .posture-choice,+ #card-external-slack .posture-choice {+ padding: 14px 16px;+ border-color: var(--border);+ background: transparent;}- .policy-rule.hidden {- display: none;+ #card-security-posture .posture-choice:has(input:checked),+ #card-sharing-posture .posture-choice:has(input:checked),+ #card-external-slack .posture-choice:has(input:checked) {+ border-color: var(--muted);+ background: transparent;}- .policy-rule input,- .policy-rule select {+ #card-security-posture .posture-choice:hover,+ #card-sharing-posture .posture-choice:hover,+ #card-external-slack .posture-choice:hover {+ background: color-mix(in srgb, var(--text) 2%, transparent);+ }+ @media (max-width: 1100px) {+ #card-security-posture .choice-stack {+ grid-template-columns: 1fr;+ gap: 4px;+ }+ #card-security-posture .posture-choice > span {+ display: flex;+ flex-wrap: wrap;+ column-gap: 8px;+ }+ }+ #view-governance .governance-field-grid {+ display: grid;+ grid-template-columns: 1fr;+ gap: 12px;+ max-width: 720px;+ }+ .governance-field-grid .dd,+ .governance-field-grid select {width: 100%;}- .policy-rule .policy-pattern {- font-family: ui-monospace, SFMono-Regular, Menlo, monospace;+ .governance-prompt {+ margin-top: 12px;+ border-top: 1px solid var(--border);}- .policy-rule .rowbtn {- min-width: 34px;- padding: 6px 8px;+ #auto-flagger-rubric {+ width: 100%;+ min-height: 140px;+ max-height: 360px;+ resize: vertical;}- .policy-actions {+ .governance-secondary-actions {display: flex;flex-wrap: wrap;+ align-items: center;gap: 8px;- margin-top: 10px;+ margin-top: 8px;}- #policy-test-open {- margin-left: auto;+ #view-governance :is(.card, .parity-subsection) > .foot:has([data-save]),+ #view-governance :is(.card, .parity-subsection) > .foot:has(#governance-org-ambient-save) {+ min-height: 32px;+ margin-top: 12px;+ gap: 10px;}- .policy-test-dialog {- width: min(540px, calc(100vw - 32px));+ #view-governance :is(.card, .parity-subsection) > .foot [data-save],+ #view-governance :is(.card, .parity-subsection) > .foot #governance-org-ambient-save,+ #view-governance :is(.card, .parity-subsection) > .foot #sc-save {+ flex: 0 0 auto;+ min-width: 76px;+ min-height: 32px;+ margin: 0;}- .policy-test-dialog input {- width: 100%;- margin-top: 6px;+ @media (max-width: 600px) {+ .choice-stack {+ grid-template-columns: 1fr;+ }+ #view-governance .governance-field-grid {+ grid-template-columns: 1fr;+ gap: 8px;+ }}- .policy-test-dialog .policy-result {- margin-top: 14px;++ body:is(+ [data-subview="governance"],+ [data-subview="models"],+ [data-subview="credentials"],+ [data-subview="connectors"],+ [data-subview="customize"]+ )+ .shell-title {+ font-weight: 500;}- #governance-org-ambient {- width: min(520px, 100%);- max-width: 520px;+ #view-governance {+ color: var(--text);+ font-size: 13px;+ font-weight: 400;+ line-height: 1.4;}- #governance-org-ambient + .dd {- width: min(520px, 100%);+ #view-governance label,+ #view-governance input,+ #view-governance textarea,+ #view-governance select,+ #view-governance .dd > button,+ #view-governance .posture-choice {+ color: var(--text);+ font-weight: 400;}- #governance-org-ambient + .dd .dd-btn {- width: 100%;+ #view-governance .card > .head h2,+ #view-governance .posture-choice strong,+ #view-governance summary,+ #view-governance button {+ font-weight: 500;}- #governance-org-ambient-save:disabled {- display: none;+ #view-governance .card > .head p,+ #view-governance .body p,+ #view-governance .hint,+ #view-governance .posture-choice small,+ #view-governance .viewlink,+ #view-governance summary span {+ color: var(--muted);+ font-size: 13px;+ font-weight: 400;+ line-height: 1.4;}- #card-egress.egress-disabled .egress-editor,+ #view-governance p strong,+ #view-governance p b {+ color: inherit;+ font-weight: 400;+ }+ #view-governance :is(.card, .parity-subsection) > .foot [data-save]:disabled,+ #view-governance :is(.card, .parity-subsection) > .foot #governance-org-ambient-save:disabled,+ #view-governance :is(.card, .parity-subsection) > .foot #sc-save:disabled {+ color: color-mix(in srgb, var(--text) 32%, var(--bg));+ background: color-mix(in srgb, var(--text) 3%, var(--bg));+ border: 1px solid color-mix(in srgb, var(--text) 8%, var(--bg));+ box-shadow: none;+ opacity: 1;+ cursor: not-allowed;+ transform: none;+ }++ body:is(+ [data-subview="governance"],+ [data-subview="models"],+ [data-subview="credentials"],+ [data-subview="connectors"],+ [data-subview="customize"],+ [data-subview="users"]+ )+ .admin-inner {+ max-width: 960px;+ margin-inline: auto;+ }++ body:is(+ [data-subview="governance"],+ [data-subview="models"],+ [data-subview="credentials"],+ [data-subview="connectors"],+ [data-subview="customize"]+ )+ .shellbar {+ margin-bottom: 16px;+ }+ #view-governance section.card,+ #view-governance section.card.setting-row {+ display: grid;+ grid-template-columns: minmax(240px, 1fr) minmax(260px, 1fr);+ column-gap: 40px;+ row-gap: 0;+ padding: 20px 0;+ align-items: start;+ }+ #view-governance section.card.hidden,+ #view-governance section.card.reference-omitted {+ display: none;+ }+ #view-governance .card > .head {+ grid-column: 1;+ margin: 0;+ }+ #view-governance .card > .head h2 {+ font-size: 14px;+ font-weight: 400;+ line-height: 1.5;+ }+ #view-governance .card > .head p {+ display: block;+ margin: 4px 0 0;+ line-height: 1.5;+ }+ #view-governance .card > .body {+ grid-column: 2;+ min-width: 0;+ }+ #view-governance :is(.card, .parity-subsection) > .foot {+ grid-column: 2;+ justify-content: flex-end;+ }+ #view-governance :is(.card, .parity-subsection) > .foot[hidden] {+ display: none;+ }+ .screening-test-options {+ border-top: 1px solid var(--border);+ }+ .screening-test-fields {+ display: grid;+ grid-template-columns: minmax(0, 1fr) auto;+ align-items: center;+ gap: 12px;+ padding: 4px 0 12px;+ }+ .screening-test-fields input[type="number"] {+ width: 100%;+ }+ #view-governance .screening-compare {+ grid-column: 1 / -1;+ display: flex;+ gap: 8px;+ align-items: center;+ margin: 0;+ }+ #view-governance .screening-compare input {+ flex: 0 0 18px;+ width: 18px;+ height: 18px;+ margin: 0;+ accent-color: var(--cta);+ cursor: pointer;+ }+ #view-governance #auto-flagger-window {+ width: 76px;+ min-width: 76px;+ text-align: center;+ font-variant-numeric: tabular-nums;+ appearance: textfield;+ -moz-appearance: textfield;+ }+ #auto-flagger-window::-webkit-inner-spin-button,+ #auto-flagger-window::-webkit-outer-spin-button {+ -webkit-appearance: none;+ margin: 0;+ }+ #auto-flagger-window-range {+ color: var(--muted);+ font-size: 12px;+ white-space: nowrap;+ }+ #auto-flagger-test {+ grid-column: 1 / -1;+ justify-self: end;+ }+ #view-governance :is(.card, .parity-subsection) > .foot [data-save],+ #view-governance :is(.card, .parity-subsection) > .foot #governance-org-ambient-save,+ #view-governance :is(.card, .parity-subsection) > .foot #sc-save {+ order: 1;+ font-weight: 400;+ }+ #card-security-posture .body > .dd,+ #card-sharing-posture .body > .dd {+ width: 180px;+ margin-left: auto;+ }+ #view-governance #sharing-posture-effective {+ margin: 0 0 8px;+ text-align: right;+ font-size: 12px;+ }+ #view-governance .audience-toggle {+ display: flex;+ align-items: center;+ justify-content: flex-end;+ gap: 8px;+ min-height: 34px;+ }+ #view-governance .audience-toggle input {+ width: 16px;+ height: 16px;+ margin: 0;+ }+ #view-governance #card-command-policy > .body,+ #view-governance #card-egress > .body,+ #view-governance #card-ambient-policy > .body {+ grid-column: 1 / -1;+ margin-top: 12px;+ }+ #view-governance .governance-secondary-actions {+ font-size: 12px;+ }+ @media (max-width: 1100px) {+ #view-governance section.card,+ #view-governance section.card.setting-row {+ column-gap: 24px;+ grid-template-columns: minmax(180px, 1fr) minmax(220px, 1fr);+ }+ }+ @media (max-width: 650px) {+ #view-governance section.card,+ #view-governance section.card.setting-row {+ grid-template-columns: 1fr;+ }+ #view-governance .card > .body {+ grid-column: 1;+ margin-top: 12px;+ }+ #view-governance :is(.card, .parity-subsection) > .foot {+ grid-column: 1;+ }+ #card-security-posture .body > .dd,+ #card-sharing-posture .body > .dd {+ width: 100%;+ margin-left: 0;+ }+ #view-governance #sharing-posture-effective {+ text-align: left;+ }+ #view-governance .audience-toggle {+ justify-content: flex-start;+ }+ }+ .posture-help {+ margin-top: 8px;+ font-size: 13px;+ }+ .posture-help dl {+ margin: 12px 0 0;+ }+ .posture-help dt {+ font-weight: 500;+ }+ .posture-help dd {+ margin: 4px 0 12px;+ color: var(--muted);+ }+ .screening-count {+ display: flex;+ align-items: center;+ gap: 6px;+ }+ .screening-count input {+ min-width: 64px;+ }+ #view-governance .governance-prompt {+ padding-top: 12px;+ margin-top: 12px;+ }+ #view-governance .screening-test-options {+ padding-top: 12px;+ margin-top: 12px;+ }+ #view-governance .screening-test-options h3 {+ margin: 0 0 4px;+ font-size: 13px;+ font-weight: 500;+ }+ #view-governance .screening-test-help {+ margin: 0 0 12px;+ }+ #view-governance .posture-help dl {+ margin-top: 12px;+ }+ #view-governance .posture-help dd:last-child {+ margin-bottom: 0;+ }+ #view-governance #card-security-posture .choice-stack,+ #view-governance #card-sharing-posture .choice-stack,+ #view-governance #card-external-slack .choice-stack,+ #view-governance #card-governance-org-ambient .choice-stack {+ display: flex;+ flex-direction: column;+ gap: 4px;+ margin: 0;+ }+ #view-governance #card-security-posture .posture-choice,+ #view-governance #card-sharing-posture .posture-choice,+ #view-governance #card-external-slack .posture-choice,+ #view-governance #card-governance-org-ambient .posture-choice {+ padding: 10px 12px;+ border: 1px solid color-mix(in srgb, var(--text) 9%, var(--bg));+ }+ #view-governance #card-security-posture .posture-choice > span,+ #view-governance #card-sharing-posture .posture-choice > span,+ #view-governance #card-external-slack .posture-choice > span,+ #view-governance #card-governance-org-ambient .posture-choice > span {+ display: block;+ }+ #view-governance #card-security-posture .posture-choice:has(input:checked),+ #view-governance #card-sharing-posture .posture-choice:has(input:checked),+ #view-governance #card-external-slack .posture-choice:has(input:checked),+ #view-governance #card-governance-org-ambient .posture-choice:has(input:checked) {+ background: color-mix(in srgb, var(--text) 2%, transparent);+ }+ #view-governance #card-security-posture .posture-choice:hover,+ #view-governance #card-sharing-posture .posture-choice:hover,+ #view-governance #card-external-slack .posture-choice:hover,+ #view-governance #card-governance-org-ambient .posture-choice:hover {+ background: color-mix(in srgb, var(--text) 4%, transparent);+ }+ #view-governance #card-governance-org-ambient > .head {+ display: block;+ }+ #view-governance #card-governance-org-ambient .head .viewlink {+ display: block;+ margin: 8px 0 0;+ padding: 0;+ }+ .policy-rules {+ display: grid;+ gap: 8px;+ }+ .policy-rule {+ display: grid;+ grid-template-columns: 180px minmax(240px, 1fr) minmax(150px, 0.55fr) 34px;+ gap: 8px;+ align-items: center;+ }+ .policy-rule.hidden {+ display: none;+ }+ .policy-rule input,+ .policy-rule select {+ width: 100%;+ }+ .policy-rule .policy-pattern {+ font-family: ui-monospace, SFMono-Regular, Menlo, monospace;+ }+ #view-governance .policy-rule .rowbtn {+ display: inline-flex;+ align-items: center;+ justify-content: center;+ justify-self: center;+ width: 16px;+ height: 16px;+ min-width: 0;+ min-height: 0;+ padding: 0;+ border: 0;+ background: transparent;+ box-shadow: none;+ color: var(--muted);+ }+ #view-governance .policy-rule .rowbtn:hover {+ border: 0;+ background: transparent;+ box-shadow: none;+ color: var(--danger);+ }+ .policy-actions {+ display: flex;+ flex-wrap: wrap;+ gap: 8px;+ margin-top: 10px;+ }+ #policy-test-open {+ margin-left: auto;+ }+ .policy-test-dialog {+ width: min(540px, calc(100vw - 32px));+ }+ .policy-test-dialog input {+ width: 100%;+ margin-top: 6px;+ }+ .policy-test-dialog .policy-result {+ margin-top: 14px;+ }+ #governance-org-ambient {+ width: min(520px, 100%);+ max-width: 520px;+ }+ #governance-org-ambient + .dd {+ width: min(520px, 100%);+ }+ #governance-org-ambient + .dd .dd-btn {+ width: 100%;+ }+ #card-egress.egress-disabled .egress-editor,#card-egress.egress-disabled .egress-actions {opacity: 0.45;}@@ -4568,6 +5055,246 @@.egress-empty-state > .hint {margin: 0;}++ body:is(+ [data-subview="governance"],+ [data-subview="models"],+ [data-subview="credentials"],+ [data-subview="connectors"],+ [data-subview="customize"]+ )+ #view-governance+ input:not([type="radio"]):not([type="checkbox"]),+ body:is(+ [data-subview="governance"],+ [data-subview="models"],+ [data-subview="credentials"],+ [data-subview="connectors"],+ [data-subview="customize"]+ )+ #view-governance+ select,+ body:is(+ [data-subview="governance"],+ [data-subview="models"],+ [data-subview="credentials"],+ [data-subview="connectors"],+ [data-subview="customize"]+ )+ #view-governance+ textarea,+ body:is(+ [data-subview="governance"],+ [data-subview="models"],+ [data-subview="credentials"],+ [data-subview="connectors"],+ [data-subview="customize"]+ )+ #view-governance+ .dd+ > button {+ border-radius: 6px;+ }+ #view-governance input[type="radio"] {+ appearance: none;+ -webkit-appearance: none;+ display: inline-grid;+ place-content: center;+ flex: 0 0 16px;+ width: 16px;+ height: 16px;+ padding: 0;+ border: 1.5px solid color-mix(in srgb, var(--text) 38%, var(--bg));+ border-radius: 50%;+ background: transparent;+ cursor: pointer;+ }+ #view-governance input[type="radio"]::before {+ content: "";+ width: 8px;+ height: 8px;+ border-radius: 50%;+ background: var(--cta);+ transform: scale(0);+ }+ #view-governance input[type="radio"]:checked {+ border-color: var(--cta);+ }+ #view-governance input[type="radio"]:checked::before {+ transform: scale(1);+ }+ #view-governance input[type="radio"]:focus-visible {+ outline: 2px solid var(--cta);+ outline-offset: 3px;+ }+ #view-governance input[type="radio"]:disabled {+ opacity: 0.45;+ cursor: default;+ }+ #view-governance #internal-member-overrides {+ overflow-x: hidden;+ overflow-y: auto;+ white-space: pre-wrap;+ overflow-wrap: anywhere;+ }++ body[data-subview="credentials"] #view-governance section.card.sv-credentials {+ display: block;+ }+ body[data-subview="credentials"] #view-governance .sv-credentials > .head {+ display: grid;+ grid-template-columns: minmax(0, 1fr) auto;+ align-items: baseline;+ gap: 4px 16px;+ }++ body[data-subview="credentials"] #view-governance .sv-credentials > .head h2 {+ grid-column: 1;+ grid-row: 1;+ }+ body[data-subview="credentials"] #view-governance .sv-credentials > .head p {+ grid-column: 1 / -1;+ grid-row: 2;+ margin: 0;+ }++ body[data-subview="credentials"] #view-governance #card-service-credentials > .head p {+ max-width: 70%;+ }+ @media (max-width: 650px) {+ body[data-subview="credentials"] #view-governance #card-service-credentials > .head p {+ max-width: 100%;+ }+ }++ body[data-subview="credentials"] #view-governance .sv-credentials > .head .viewlink {+ grid-column: 2;+ grid-row: 1;+ margin: 0;+ padding: 0;+ }+ body[data-subview="credentials"] #view-governance .sv-credentials > .body {+ margin-top: 16px;+ }+ body[data-subview="credentials"] #view-governance .credential-main {+ flex: 1;+ }+ body[data-subview="credentials"] #view-governance .credential-row {+ padding: 12px 0;+ align-items: center;+ border-color: color-mix(in srgb, var(--text) 8%, var(--bg));+ }+ body[data-subview="credentials"] #view-governance .credential-title strong,+ body[data-subview="credentials"] #view-governance .keychain-summary strong {+ font-size: 13px;+ font-weight: 500;+ }+ body[data-subview="credentials"] #view-governance .credential-main > .hint {+ margin: 4px 0 0;+ }+ body[data-subview="credentials"] #view-governance .credential-badges {+ margin-top: 6px;+ }+ body[data-subview="credentials"] #view-governance .badge {+ font-size: 12px;+ font-weight: 400;+ line-height: 1.4;+ padding: 2px 7px;+ }++ body[data-subview="credentials"] #view-governance .badge:is(.info, .ok, .muted) {+ color: var(--muted);+ border-color: color-mix(in srgb, var(--text) 9%, var(--bg));+ background: color-mix(in srgb, var(--text) 2%, transparent);+ }++ body[data-subview="credentials"] #view-governance .credential-actions button {+ min-height: 32px;+ padding: 5px 12px;+ border-radius: 6px;+ border-color: var(--border);+ background: transparent;+ color: var(--text);+ font-size: 13px;+ font-weight: 400;+ }++ body[data-subview="credentials"] #view-governance .credential-actions button:hover {+ background: color-mix(in srgb, var(--text) 4%, transparent);+ }++ body[data-subview="credentials"] #view-governance .credential-actions button.danger:hover {+ color: var(--danger);+ }+ body[data-subview="credentials"] #view-governance .keychain-summary {+ color: var(--muted);+ font-size: 13px;+ }+ body[data-subview="credentials"] #view-governance .keychain-summary strong {+ color: var(--text);+ }+ body[data-subview="credentials"] #view-governance .editor-grid {+ grid-template-columns: minmax(0, 1fr);+ }+ body[data-subview="credentials"] #view-governance .editor-panel {+ padding: 16px 0 0;+ border: 0;+ border-top: 1px solid var(--border);+ border-radius: 0;+ background: transparent;+ }+ body[data-subview="credentials"] #view-governance .sc-semantics strong,+ body[data-subview="credentials"] #view-governance .sc-semantics span,+ body[data-subview="credentials"] #view-governance .capability-summary dt,+ body[data-subview="credentials"] #view-governance .capability-summary dd {+ font-size: 13px;+ font-weight: 400;+ line-height: 1.4;+ }+ body[data-subview="credentials"] #view-governance input[type="checkbox"] {+ min-width: 18px;+ height: 18px;+ accent-color: var(--cta);+ }+ #view-governance .model-runtime-fields {+ display: grid;+ gap: 12px;+ }+ #view-governance .model-runtime-fields label {+ margin: 0 0 4px;+ }+ #view-governance .model-runtime-fields .dd,+ #view-governance .model-runtime-fields select {+ width: 100%;+ max-width: none;+ }+ #view-governance #base-fast-mode-control {+ margin-top: 16px;+ }+ #view-governance .setting-toggle input:checked + .setting-switch {+ border-color: var(--cta);+ background: var(--cta);+ }+ #view-governance .setting-toggle input:focus-visible + .setting-switch {+ outline-color: var(--cta);+ }+ #view-governance #base-fast-mode-control strong,+ #view-governance #base-fast-mode-control small {+ font-size: 13px;+ font-weight: 400;+ line-height: 1.4;+ }+ #view-governance #base-fast-mode-control .setting-copy {+ display: flex;+ flex-wrap: wrap;+ align-items: baseline;+ column-gap: 8px;+ row-gap: 0;+ }+ #view-governance #base-fast-mode-control small {+ color: var(--muted);+ margin: 0;+ }.model-list {display: flex;flex-wrap: wrap;@@ -4588,12 +5315,16 @@background: var(--subtle);font-size: 13px;}- .model-chip button {+ #view-governance .model-chip button {display: inline-flex;align-items: center;justify-content: center;+ flex: 0 0 22px;width: 22px;height: 22px;+ min-width: 22px;+ min-height: 22px;+ margin: 0;padding: 0;border: 0;border-radius: 999px;@@ -4602,7 +5333,7 @@font-size: 16px;line-height: 1;}- .model-chip button:hover {+ #view-governance .model-chip button:hover {background: color-mix(in srgb, var(--text) 8%, transparent);color: var(--text);}@@ -4611,7 +5342,7 @@align-items: flex-end;gap: 8px;max-width: 520px;- margin-top: 14px;+ margin: 0 0 14px;}.model-add-field {flex: 1 1 auto;@@ -4666,31 +5397,249 @@margin-left: 0;}}- #view-connectors {- overflow: hidden;- border: 1px solid var(--border);- border-radius: var(--radius);- background: var(--surface);- box-shadow: var(--shadow);+ #view-connectors {+ overflow: hidden;+ border: 1px solid var(--border);+ border-radius: var(--radius);+ background: var(--surface);+ box-shadow: var(--shadow);+ }+ #view-connectors section.card {+ margin: 0;+ padding: 12px 16px;+ border: 0;+ border-bottom: 1px solid var(--subtle);+ border-radius: 0;+ background: transparent;+ }+ #view-connectors section.card:last-child {+ border-bottom: 0;+ }+ body[data-subview="connectors"] .shellbar {+ display: none;+ }+ #slack-installation-create {+ color: #2563b8;+ text-decoration: underline;+ text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);+ text-underline-offset: 0.2em;+ }+ :where(html.dark) #slack-installation-create {+ color: #4c8edb;+ }+ #slack-installation-create:is(:hover, :focus-visible) {+ text-decoration-color: currentColor;+ }+ #slack-installation-create:focus-visible {+ outline: 2px solid currentColor;+ outline-offset: 3px;+ border-radius: 2px;+ }+ .connector-dm-tip {+ margin: 0 0 10px;+ color: var(--muted);+ font-size: 12.5px;+ }+ .connector-dm-tip p {+ margin: 0;+ }+ body[data-subview="connectors"] .shellbar {+ display: flex;+ }+ #view-connectors {+ overflow: visible;+ border: 0;+ border-radius: 0;+ background: transparent;+ box-shadow: none;+ }+ #view-connectors section.card {+ padding: 24px 0;+ border-bottom: 1px solid var(--border);+ }+ #view-connectors section.card:last-child {+ border-bottom: 0;+ }+ #view-connectors .card > .head {+ margin: 0 0 16px;+ padding: 0;+ border: 0;+ }+ #view-connectors .card > .head h2 {+ font-size: 14px;+ font-weight: 500;+ }+ #view-connectors .card > .head p,+ #view-connectors .hint,+ .connector-dm-tip {+ color: var(--muted);+ font-size: 13px;+ font-weight: 400;+ line-height: 1.4;+ }+ .admin-notice {+ display: flex;+ align-items: flex-start;+ gap: 10px;+ padding: 14px 16px;+ border: 1px solid color-mix(in srgb, #7095c0 20%, white);+ border-radius: 8px;+ background: color-mix(in srgb, #7095c0 6%, white);+ color: var(--cta);+ font-size: 13px;+ font-weight: 400;+ line-height: 1.4;+ overflow-wrap: anywhere;+ }+ .admin-notice--warning {+ border-color: #f2dfa2;+ background: #fffbeb;+ color: #854d0e;+ }+ .admin-notice::before {+ content: "";+ display: block;+ flex: 0 0 18px;+ width: 18px;+ height: 18px;+ margin-top: 1px;+ border-radius: 0;+ color: inherit;+ background: currentColor;+ mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5M12 8h.01'/%3E%3C/svg%3E")+ center / contain no-repeat;+ }+ .admin-notice > div,+ .admin-notice > p {+ flex: 1;+ min-width: 0;+ }+ .admin-notice p,+ .admin-notice span,+ .admin-notice strong {+ margin: 0;+ color: inherit;+ font-size: inherit;+ line-height: inherit;+ }+ .admin-notice strong {+ display: block;+ margin-bottom: 4px;+ font-weight: 600;+ }+ .connector-dm-tip {+ margin-bottom: 16px;+ }+ #view-connectors .card > .head p {+ margin: 4px 0 0;+ max-width: 70ch;+ }+ #view-connectors .card > .foot {+ flex-wrap: wrap;+ gap: 10px;+ }+ #view-connectors .credential-title strong {+ font-size: 13px;+ font-weight: 500;+ }+ #view-connectors .credential-row {+ padding: 12px 0;+ border-color: color-mix(in srgb, var(--text) 8%, var(--bg));+ }+ #view-governance .sv-customize > .head {+ row-gap: 0;+ }+ #view-governance .sv-customize .body label:not(.setting-toggle) {+ margin-bottom: 4px;+ font-size: 13px;+ font-weight: 400;+ }++ #view-governance .sv-customize .body input:not([type="checkbox"]):not([type="radio"]) {+ max-width: none !important;+ min-height: 34px;+ padding: 7px 10px;+ background: transparent;+ font: inherit;+ }+ #view-governance .sv-customize .setting-toggle {+ align-items: flex-start;+ }+ #view-governance .sv-customize .setting-switch {+ margin-top: 1px;+ }+ #view-governance .sv-customize .setting-copy strong,+ #view-governance .sv-customize .setting-copy small {+ font-size: 13px;+ font-weight: 400;+ line-height: 1.4;+ }+ #view-governance .sv-customize .setting-copy small {+ margin-top: 4px;+ }+ #view-governance .parity-subsection {+ display: block;+ min-height: 0;+ padding: 16px 0;+ border-top: 1px solid var(--border);+ }+ #view-governance .parity-subsection:first-child {+ padding-top: 0;+ border-top: 0;+ }+ #view-governance .parity-subsection:last-child {+ padding-bottom: 0;+ }+ #view-governance :is(.card, .parity-subsection) > .foot .status {+ font-size: 12px;+ line-height: 1.4;}- #view-connectors section.card {+ .soul-preview-label {+ display: none;+ }+ .soul-preview-label {+ display: block;+ margin-bottom: 4px;+ }+ #card-soul.is-editing .soul-preview-body {+ display: none;+ }+ #view-governance #card-soul .soul-preview,+ #view-governance .soul-workbench textarea {+ width: 100%;+ min-height: 140px;+ max-height: 360px;margin: 0;- padding: 12px 16px;- border: 0;- border-bottom: 1px solid var(--subtle);- border-radius: 0;+ overflow: auto;+ padding: 7px 10px;+ border: 1px solid var(--border);+ border-radius: 6px;background: transparent;+ color: var(--text);+ font: inherit;+ white-space: pre-wrap;+ overflow-wrap: anywhere;}- #view-connectors section.card:last-child {- border-bottom: 0;+ #view-governance .soul-meta {+ font-size: 12px;+ line-height: 1.4;}- body[data-subview="connectors"] .shellbar {- display: none;+ #view-governance .soul-diff {+ grid-template-columns: 1fr;+ gap: 12px;}- .connector-dm-tip {- margin: 0 0 10px;- color: var(--muted);- font-size: 12.5px;+ #view-governance .soul-diff h3,+ #view-governance .soul-history h3 {+ margin: 0 0 4px;+ color: var(--text);+ font-size: 13px;+ font-weight: 400;+ }+ #view-governance .soul-diff pre {+ padding: 7px 10px;+ border-radius: 6px;+ background: transparent;+ font: inherit;}#card-soul:not(.is-editing) .soul-workbench {display: none;@@ -4761,7 +5710,6 @@max(14px, env(safe-area-inset-left));}}-body.design-view {background: var(--surface);}@@ -4850,6 +5798,314 @@}}+ #view-data .users-layout section.card {+ margin: 0;+ padding: 24px 0;+ border: 0;+ border-bottom: 1px solid var(--border);+ border-radius: 0;+ background: transparent;+ box-shadow: none;+ }+ #view-data .users-layout > section.card:last-child {+ border-bottom: 0;+ }+ #view-data .users-layout .card > .head {+ margin: 0 0 16px;+ padding: 0;+ border: 0;+ }+ #view-data .users-layout .card > .head h2 {+ margin: 0;+ font-size: 14px;+ font-weight: 500;+ }+ #view-data .users-layout .card > .head p {+ max-width: 70ch;+ margin: 4px 0 0;+ color: var(--muted);+ font-size: 13px;+ line-height: 1.4;+ }+ #view-data .users-layout .card > .body {+ padding: 0;+ min-width: 0;+ }+ #view-data .users-layout .users-setting {+ display: grid;+ grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);+ gap: 32px;+ }+ #view-data .users-layout .users-setting > .head {+ margin: 0;+ }+ #view-data .users-layout .users-roster > .head {+ display: grid;+ grid-template-columns: minmax(0, 1fr) auto;+ column-gap: 16px;+ }+ #view-data .users-layout .users-roster > .head p {+ grid-column: 1;+ }+ #view-data .users-layout .users-roster > .head button {+ grid-column: 2;+ grid-row: 1 / 3;+ align-self: start;+ }+ #view-data .users-layout .status:empty {+ display: none;+ }+ #view-data .users-layout .empty {+ padding: 12px 0;+ text-align: left;+ }+ #view-data .users-layout .grant-form .grow {+ min-width: min(220px, 100%);+ }+ body:has(.users-layout) .shell-search input {+ width: 240px;+ max-width: 100%;+ padding: 7px 10px;+ border: 1px solid var(--border);+ border-radius: 6px;+ background: transparent;+ color: var(--text);+ font: inherit;+ font-size: 13px;+ }+ @media (max-width: 720px) {+ #view-data .users-layout .users-setting {+ grid-template-columns: minmax(0, 1fr);+ gap: 16px;+ }+ #view-data .users-layout .users-roster > .head {+ display: flex;+ flex-direction: column;+ gap: 8px;+ align-items: flex-start;+ }+ }+ #app-view #shellbar .judgment-filters .shell-tab {+ border: 1px solid var(--border);+ border-radius: 999px;+ padding: 6px 14px;+ background: transparent;+ color: var(--muted);+ }+ #app-view #shellbar .judgment-filters .shell-tab:hover {+ background: var(--subtle);+ color: var(--text);+ }+ #app-view #shellbar .judgment-filters .shell-tab.active,+ #app-view #shellbar .judgment-filters .shell-tab.active:hover {+ border-color: #0a2540;+ background: #0a2540;+ color: #fff;+ }++ #app-view #shellbar.logs-shell {+ flex-wrap: wrap;+ gap: 12px;+ overflow: visible;+ }+ #app-view #shellbar.logs-shell .log-counts,+ #app-view #shellbar.logs-shell .shell-tabs {+ display: flex;+ flex-wrap: wrap;+ align-items: center;+ gap: 6px;+ min-width: 0;+ }+ #app-view #shellbar.logs-shell .log-counts:empty {+ display: none;+ }+ #app-view #shellbar.logs-shell .shell-tab {+ display: inline-flex;+ align-items: center;+ justify-content: center;+ gap: 6px;+ min-height: 32px;+ box-sizing: border-box;+ padding: 6px 14px;+ border: 1px solid var(--border);+ border-radius: 999px;+ background: transparent;+ color: var(--muted);+ font-size: 12.5px;+ font-weight: 500;+ line-height: 18px;+ white-space: nowrap;+ }+ #app-view #shellbar.logs-shell .log-count {+ padding: 0;+ border: 0;+ border-radius: 0;+ background: transparent;+ color: var(--muted);+ font-size: 13px;+ font-weight: 400;+ line-height: 18px;+ white-space: nowrap;+ font-variant-numeric: tabular-nums;+ }+ #app-view #shellbar.logs-shell .log-counts {+ gap: 6px 16px;+ }+ #app-view #shellbar.logs-shell .shell-tab:hover {+ background: var(--subtle);+ color: var(--text);+ }+ #app-view #shellbar.logs-shell .shell-tab.active,+ #app-view #shellbar.logs-shell .shell-tab.active:hover {+ background: #0a2540;+ border-color: #0a2540;+ color: #fff;+ }+ @media (max-width: 720px) {+ #app-view #shellbar.logs-shell .log-counts {+ flex: 1 0 100%;+ order: 1;+ }+ #app-view #shellbar.logs-shell .shell-spacer {+ display: none;+ }+ }++ #view-data .memory-notebooks {+ padding-top: 8px;+ }+ #view-data .memory-notebooks .memory-columns,+ #view-data .memory-notebooks .dense-row {+ display: grid;+ grid-template-columns: minmax(0, 1fr) 100px 180px;+ align-items: center;+ gap: 24px;+ padding: 12px 0;+ border-bottom: 1px solid var(--border);+ background: transparent;+ font-size: 13px;+ line-height: 1.4;+ }+ #view-data .memory-notebooks .memory-columns {+ color: var(--muted);+ font-size: 12px;+ }+ #view-data .memory-notebooks .memory-columns > :not(:first-child) {+ text-align: right;+ }+ #view-data .memory-notebooks .dense-name {+ min-width: 0;+ max-width: none;+ font-weight: 500;+ }+ #view-data .memory-notebooks .dense-preview,+ #view-data .memory-notebooks .dense-time {+ text-align: right;+ font-variant-numeric: tabular-nums;+ }+ #view-data .memory-notebooks .dense-row {+ border-top: 0;+ }+ #view-data .memory-notebooks .dense-row:hover {+ background: var(--subtle);+ }+ #view-data .memory-notebooks .dense-row:focus-visible {+ outline: 2px solid var(--cta);+ outline-offset: 2px;+ }+ #view-data section.memory-editor {+ margin: 0;+ padding: 24px 0;+ border: 0;+ border-radius: 0;+ background: transparent;+ box-shadow: none;+ }+ #view-data .memory-editor > .head {+ margin: 0 0 24px;+ padding: 0;+ border: 0;+ }+ #view-data .memory-editor h2 {+ font-size: 14px;+ font-weight: 500;+ }+ #view-data .memory-editor .head p {+ margin: 4px 0 0;+ font-size: 13px;+ color: var(--muted);+ }+ #view-data .memory-editor > .body {+ padding: 0;+ }+ #view-data .memory-editor label {+ display: block;+ margin-bottom: 4px;+ font-size: 13px;+ }+ #view-data .memory-editor textarea {+ width: 100%;+ box-sizing: border-box;+ padding: 12px;+ border-radius: 6px;+ line-height: 1.6;+ resize: vertical;+ }+ #view-data .memory-editor .foot {+ display: flex;+ justify-content: flex-end;+ align-items: center;+ gap: 12px;+ border: 0;+ padding: 12px 0 0;+ }+ #view-data .memory-editor .status {+ order: -1;+ margin-right: auto;+ }+ #view-data .memory-editor button.primary {+ min-height: 32px;+ padding: 6px 14px;+ border: 1px solid #0a2540;+ border-radius: 6px;+ background: #0a2540;+ color: white;+ font-size: 13px;+ }+ @media (max-width: 720px) {+ #view-data .memory-notebooks .memory-columns,+ #view-data .memory-notebooks .dense-row {+ grid-template-columns: minmax(0, 1fr) 65px 110px;+ gap: 10px;+ }+ #view-data .memory-notebooks .dense-name {+ white-space: normal;+ overflow-wrap: anywhere;+ }+ #view-data .memory-notebooks .dense-time {+ white-space: normal;+ }+ }+ @media (min-width: 901px) {+ nav.tabs .tab.tab-footer:last-child {+ margin-top: auto;+ padding-top: 12px;+ border-top: 1px solid var(--border);+ border-radius: 0;+ }+ }+ nav.tabs .tab {+ border-radius: 8px;+ transition: background 0.12s ease;+ }+ nav.tabs .tab:not(:disabled):hover,+ nav.tabs .tab.active {+ color: var(--text);+ background: color-mix(in srgb, var(--text) 4%, transparent);+ box-shadow: none;+ font-weight: 400;+ }+#card-slack-installation > .head {border: 0;padding-bottom: 6px;@@ -4982,14 +6238,30 @@}}</style>+ <style data-admin-components></style></head><body><header class="top">- <a class="header-button header-home" href="/" id="home-link">← Back to home</a>+ <a class="header-home" href="/" id="home-link">+ <svg+ width="15"+ height="15"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+ aria-hidden="true"+ >+ <path d="m12 19-7-7 7-7M5 12h14" />+ </svg>+ <span>Back to home</span>+ </a><div class="header-controls" id="header-controls" aria-label="Page controls"></div><div class="who hidden" id="who">- <span id="org-tag"></span><span class="pill" id="who-name"></span- ><button class="link" id="signout">Sign out</button>+ <span class="account-identity"><span id="org-tag"></span><span class="pill" id="who-name"></span></span>+ <button class="link" id="signout" type="button">Sign out</button></div></header>@@ -5319,7 +6591,7 @@</div><div id="view-governance">- <aside class="environment-notice hidden" id="environment-notice" role="status">+ <aside class="environment-notice admin-notice hidden" id="environment-notice" role="status"><div><strong id="environment-notice-title"></strong><p id="environment-notice-detail"></p>@@ -5369,6 +6641,7 @@<section class="card sv-governance setting-row hidden" id="card-security-posture"><div class="head"><h2>Security posture</h2>+ <p>Choose how the agent screens external content and when it requires your approval.</p></div><div class="body"><select id="security-posture" data-choice-state hidden>@@ -5425,37 +6698,56 @@</p></div><div class="body">- <label for="auto-flagger-harness">Harness</label>- <select id="auto-flagger-harness" style="max-width: 360px"></select>- <label for="auto-flagger-model">Model</label>- <select id="auto-flagger-model" style="max-width: 440px"></select>- <label for="auto-flagger-rubric">Quarantine prompt (classification rubric)</label>- <textarea id="auto-flagger-rubric" rows="10" maxlength="20000" style="width: 100%"></textarea>+ <div class="screening-details">+ <div class="governance-field-grid">+ <div>+ <label for="auto-flagger-harness">Harness</label>+ <select id="auto-flagger-harness"></select>+ </div>+ <div>+ <label for="auto-flagger-model">Model</label>+ <select id="auto-flagger-model"></select>+ </div>+ </div>+ <div class="governance-prompt">+ <label for="auto-flagger-rubric">Quarantine prompt (classification rubric)</label>+ <textarea id="auto-flagger-rubric" rows="6" maxlength="20000"></textarea>+ </div>+ <div class="screening-test-options">+ <h3>Test Auto flagger</h3>+ <p class="screening-test-help">+ Try the model and prompt above on recent screenings without applying changes.+ </p>+ <div class="screening-test-fields">+ <label for="auto-flagger-window">Recent screenings to test</label>+ <div class="screening-count">+ <input+ id="auto-flagger-window"+ type="number"+ inputmode="numeric"+ min="1"+ max="500"+ step="1"+ value="100"+ aria-describedby="auto-flagger-window-range"+ />+ <span id="auto-flagger-window-range">1–500</span>+ </div>+ <label+ class="screening-compare"+ title="Also replay the configuration in effect today, so the flag rates are comparable"+ >+ <input type="checkbox" id="auto-flagger-compare" />Compare with the currently applied+ configuration+ </label>+ <button id="auto-flagger-test" type="button">Run test</button>+ </div>+ </div>+ </div></div><div class="foot">- <button class="primary" data-save="auto-flagger">Apply</button>- <button id="auto-flagger-test" type="button">Test</button>- <label- for="auto-flagger-window"- style="display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 13px"- >on the last- <input- id="auto-flagger-window"- type="number"- min="1"- max="500"- step="1"- value="100"- style="width: 78px"- />- screenings</label- >- <label- style="display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 13px"- title="Also replay the configuration in effect today, so the flag rates are comparable"- ><input type="checkbox" id="auto-flagger-compare" /> compare with current</label- ><button id="auto-flagger-reset" type="button">Restore default</button>+ <button class="primary" data-save="auto-flagger">Apply</button><span class="status" id="st-auto-flagger"></span></div><div class="foot" id="auto-flagger-test-result" hidden>@@ -5513,7 +6805,12 @@durable revision; restoring an older revision creates a new one.</p></div>- <div class="body"><p class="soul-preview" id="soul-preview">No saved instructions</p></div>+ <div class="body soul-preview-body">+ <div class="soul-preview-label" id="soul-preview-label">Standing instructions</div>+ <p class="soul-preview" id="soul-preview" aria-labelledby="soul-preview-label">+ No saved instructions+ </p>+ </div><div class="body soul-workbench"><label for="soul">Standing instructions</label><textarea id="soul" maxlength="100000" placeholder="No scope-specific instructions"></textarea>@@ -5644,7 +6941,11 @@<h2>Egress policy</h2></div><div class="body">- <div class="governance-capability" id="egress-capability" role="status">+ <div+ class="governance-capability admin-notice admin-notice--warning"+ id="egress-capability"+ role="status"+ ><div><strong>Agent computer egress policy unavailable</strong><span@@ -5805,18 +7106,27 @@<h2>Models & browsing</h2><p>The models, browser runtime, and organization context available on future turns.</p></div>- <section class="card sv-models setting-row hidden" id="card-base-model">+ <section class="card sv-models hidden" id="card-base-model"><div class="head"><h2>Default runtime</h2>+ <p>The harness, model, and reasoning level used across your organization unless overridden.</p></div><div class="body">- <label for="base-harness">Harness</label>- <select id="base-harness" style="max-width: 360px"></select>- <label for="base-model">Model</label>- <select id="base-model" style="max-width: 360px"></select>- <label for="base-effort">Reasoning level</label>- <select id="base-effort" style="max-width: 360px"></select>- <label class="setting-toggle" id="base-fast-mode-control" style="display: none; margin-top: 10px">+ <div class="model-runtime-fields">+ <div>+ <label for="base-harness">Harness</label>+ <select id="base-harness"></select>+ </div>+ <div>+ <label for="base-model">Model</label>+ <select id="base-model"></select>+ </div>+ <div>+ <label for="base-effort">Reasoning level</label>+ <select id="base-effort"></select>+ </div>+ </div>+ <label class="setting-toggle" id="base-fast-mode-control" style="display: none"><input type="checkbox" id="base-fast-mode" /><span class="setting-switch" aria-hidden="true"></span><span class="setting-copy"@@ -5834,9 +7144,6 @@<h2>Enabled models</h2></div><div class="body">- <div id="webui-models-list" class="model-list">- <p id="webui-models-empty" class="hint">No additional models enabled.</p>- </div><div class="model-add-row"><div class="model-add-field"><label for="webui-models-add">Add a model</label>@@ -5846,6 +7153,9 @@</div><button type="button" id="webui-models-add-button" disabled>+ Add model</button></div>+ <div id="webui-models-list" class="model-list">+ <p id="webui-models-empty" class="hint">No additional models enabled.</p>+ </div></div><div class="foot"><button class="primary" data-save="webui-models">Save</button@@ -6412,7 +7722,7 @@</div><div class="review-dialog-body"><dl class="review-dialog-facts" id="governance-review-facts"></dl>- <p class="review-dialog-warning" id="governance-review-warning"></p>+ <p class="review-dialog-warning admin-notice" id="governance-review-warning"></p></div><div class="review-dialog-foot"><button type="button" id="governance-review-cancel">Cancel</button@@ -6489,9 +7799,18 @@anthropic: "Anthropic Messages",};const SECTIONS = [- { views: ["governance", "models", "credentials", "connectors", "customize", "users"] },- { label: "Logs", views: ["history", "slack", "judgments", "errors", "audit", "egress", "metrics"] },- { label: "Artifacts", views: ["files", "skills", "memory", "deployments", "crons", "retention"] },+ {+ views: ["governance", "models", "credentials", "connectors", "customize", "users"],+ },+ {+ label: "Logs",+ views: ["history", "slack", "judgments", "errors", "audit", "egress", "metrics"],+ },+ {+ label: "Artifacts",+ views: ["files", "skills", "memory", "deployments", "crons", "retention"],+ },+ { views: ["design-system"] },];const VIEWS = [...SECTIONS.flatMap((s) => s.views), "onboarding", "user", "ackemoji", "keychain"];@@ -6540,7 +7859,7 @@governanceAmbient.className = "card sv-governance hidden";governanceAmbient.id = "card-governance-org-ambient";governanceAmbient.innerHTML =- '<div class="head"><h2>Ambient reply policy</h2><button type="button" class="viewlink" data-viewlink="judgments">View judgment log ›</button><p>@-mentions are always answered. Each ambient decision is recorded in the judgments log.</p></div><div class="body"><select id="governance-org-ambient"><option value="on">Agent judges all messages and replies when useful</option><option value="off">Agent does not read messages or reply unless @-mentioned</option></select></div><div class="foot"><button type="button" class="primary" id="governance-org-ambient-save" disabled>Apply</button><span class="status" id="st-governance-org-ambient"></span></div>';+ '<div class="head"><h2>Ambient reply policy</h2><p>@-mentions are always answered. Each ambient decision is recorded in the judgments log.</p><button type="button" class="viewlink" data-viewlink="judgments">View judgment log ›</button></div><div class="body"><select id="governance-org-ambient" data-choice-state hidden><option value="on">Agent judges all messages and replies when useful</option><option value="off">Agent does not read messages or reply unless @-mentioned</option></select><div class="choice-stack"><label class="posture-choice"><input type="radio" name="ambient-reply-choice" value="on" data-choice-for="governance-org-ambient"><span><strong>Reply when useful</strong><small>Agent judges all messages and replies when useful</small></span></label><label class="posture-choice"><input type="radio" name="ambient-reply-choice" value="off" data-choice-for="governance-org-ambient"><span><strong>Only when mentioned</strong><small>Agent does not read messages or reply unless @-mentioned</small></span></label></div></div><div class="foot"><button type="button" class="primary" id="governance-org-ambient-save" disabled>Apply</button><span class="status" id="st-governance-org-ambient"></span></div>';$("card-command-policy").after(governanceAmbient);const keychains = document.createElement("section");@@ -6576,13 +7895,15 @@].forEach((card) => content.appendChild(card));const connectorView = $("view-connectors");- const connectorTip = document.createElement("p");- connectorTip.className = "connector-dm-tip hidden";+ const connectorTip = document.createElement("aside");+ connectorTip.className = "connector-dm-tip admin-notice hidden";connectorTip.id = "connector-dm-tip";- connectorTip.textContent =+ connectorTip.setAttribute("role", "note");+ connectorTip.appendChild(document.createElement("p"));+ connectorTip.querySelector("p").textContent ="Tip: the easiest way to change these settings is to ask " +($("brand-product").textContent || "Agent") +- " in a DM — it can make the edit for you and confirm what changed.";+ " in a DM. It can make the edit for you and confirm what changed.";connectorView.before(connectorTip);const builtIns = document.createElement("section");builtIns.className = "card";@@ -6596,6 +7917,45 @@});}prepareParityCards();+ const scAddButton = $("sc-add");+ const scStatusHome = $("st-service-credentials").parentElement;+ const dialog = document.createElement("dialog");+ dialog.id = "sc-dialog";+ dialog.className = "custom-provider-dialog credential-dialog";+ dialog.setAttribute("aria-labelledby", "sc-dialog-title");+ dialog.setAttribute("aria-describedby", "sc-dialog-description");+ dialog.innerHTML =+ '<div class="project-dialog-head"><div><h2 id="sc-dialog-title">Add credential</h2><p id="sc-dialog-description">Connect a service securely, then choose what the agent can access.</p></div><button class="project-icon-button" type="button" id="sc-dialog-close" aria-label="Close credential dialog">×</button></div><div class="project-dialog-actions" id="sc-dialog-actions"></div>';+ $("card-service-credentials").appendChild(dialog);+ dialog.insertBefore($("sc-editor"), $("sc-dialog-actions"));+ $("sc-dialog-actions").append($("sc-reset"), $("sc-save"));+ const dismiss = () => {+ if (!$("st-service-credentials").classList.contains("saving")) resetScForm();+ };+ $("sc-dialog-close").onclick = dismiss;+ dialog.addEventListener("cancel", (event) => {+ event.preventDefault();+ dismiss();+ });+ dialog.addEventListener("click", (event) => {+ const rect = dialog.getBoundingClientRect();+ if (+ event.target === dialog &&+ (event.clientX < rect.left ||+ event.clientX > rect.right ||+ event.clientY < rect.top ||+ event.clientY > rect.bottom)+ )+ dismiss();+ });+ function openScDialog() {+ const dialog = $("sc-dialog");+ $("sc-dialog-title").textContent = scEditing ? "Edit credential" : "Add credential";+ setStatus("st-service-credentials", "", "");+ $("sc-dialog-actions").prepend($("st-service-credentials"));+ if (!dialog.open) dialog.showModal();+ }+let governanceOrgAmbientSaved = "on";document.querySelectorAll("[data-choice-for]").forEach((input) => {input.onchange = () => {@@ -6657,7 +8017,7 @@slack: "Slack",judgments: "Judgments",ackemoji: "Ack emoji",- design: "Design library",+ "design-system": "Design system",};const SCOPED = new Set(["governance",@@ -7043,28 +8403,15 @@function fileUploadBox() {const box = document.createElement("div");box.className = "file-upload";- const main = document.createElement("div");- main.className = "file-upload-main";- const glyph = document.createElement("span");- glyph.className = "file-upload-icon";- glyph.textContent = "⇧";- const label = document.createElement("span");- label.append(- "Upload to ",- (() => {- const s = document.createElement("strong");- s.textContent = scopeTitle(scope);- return s;- })(),- );- main.append(glyph, label);const actions = document.createElement("div");actions.className = "file-upload-actions";const status = document.createElement("span");status.className = "status muted";const button = document.createElement("button");button.type = "button";- button.textContent = "Upload";+ button.className = "primary upload-button";+ button.innerHTML =+ '<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 16V3m-5 5 5-5 5 5M4 15v5a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-5"/></svg><span>Upload</span>';const input = document.createElement("input");input.type = "file";input.multiple = true;@@ -7138,7 +8485,7 @@upload(e.dataTransfer.files || []);};actions.append(status, button, input);- box.append(main, actions);+ box.append(actions);return box;}function fmtDuration(start, end) {@@ -7223,6 +8570,8 @@return showView("signin-view", "Sign in through the portal to continue.");}$("org-tag").textContent = me.data.org;+ $("org-tag").title = "Organization: " + me.data.org;+ $("who-name").title = "Signed in as " + me.data.principal;orgId = me.data.org;$("who-name").textContent = me.data.principal;if (me.data.isAdmin === false) {@@ -7285,6 +8634,7 @@s.views.forEach((v) => {const b = document.createElement("button");b.className = "tab" + (s.label ? "" : " tab-top") + (v === view ? " active" : "");+ if (v === "design-system") b.classList.add("tab-footer");b.type = "button";b.appendChild(document.createTextNode(VIEW_TITLE[v] || v[0].toUpperCase() + v.slice(1)));if (v === view) b.setAttribute("aria-current", "page");@@ -7369,7 +8719,7 @@const slackStep = ["setup", "install", "connected"].includes(p.get("slack"));const raw = p.get("setup") === "slack" || slackStep ? "connectors" : p.get("view") || fromPath;- const v = raw === "skill-packs" ? "skills" : raw;+ const v = raw === "skill-packs" ? "skills" : raw === "design" ? "design-system" : raw;const session = pathSession || p.get("session") || null;const kindRaw = p.get("kind");const normalizedHistoryKind = ["conversation", "cron", "background"].includes(kindRaw)@@ -7416,10 +8766,38 @@page = st.page || 1;historyKind = st.historyKind || "conversation";$("app-view").classList.toggle("history-view", view === "history");+ $("app-view").classList.toggle("slack-view", view === "slack");+ $("app-view").classList.toggle("judgments-view", view === "judgments");+ $("app-view").classList.toggle("errors-view", view === "errors");+ $("app-view").classList.toggle("deployments-view", view === "deployments");+ $("app-view").classList.toggle("crons-view", view === "crons");$("app-view").classList.toggle("governance-view", isGovLike(view));- document.body.dataset.subview = isGovLike(view) ? view : view === "connectors" ? "connectors" : "";+ document.body.dataset.subview = view;+ document.body.dataset.adminKit = [+ "crons",+ "deployments",+ "files",+ "skills",+ "memory",+ "audit",+ "egress",+ "metrics",+ "history",+ "slack",+ "judgments",+ "errors",+ "governance",+ "models",+ "credentials",+ "connectors",+ "customize",+ "users",+ "design-system",+ ].includes(view)+ ? "true"+ : "false";document.body.classList.toggle("context-fullpage", view === "history" && !!st.session && st.turn != null);- document.body.classList.toggle("design-view", view === "design");+ document.body.classList.toggle("design-view", view === "design-system");if (!isGovLike(view) && view !== "connectors" && view !== "onboarding" && !scopeDir) void loadScopeDirectory();defaultShell();renderTabs();@@ -7427,17 +8805,17 @@$("view-onboarding").classList.toggle("hidden", view !== "onboarding");$("connector-dm-tip").classList.toggle("hidden", view !== "connectors");$("view-connectors").classList.toggle("hidden", view !== "connectors");- $("view-design").classList.toggle("hidden", view !== "design");+ $("view-design").classList.toggle("hidden", view !== "design-system");$("view-data").classList.toggle("hidden",- view === "onboarding" || isGovLike(view) || view === "connectors" || view === "design",+ view === "onboarding" || isGovLike(view) || view === "connectors" || view === "design-system",);if (view === "onboarding") return void loadOnboarding();if (isGovLike(view)) {return void loadScope();}if (view === "connectors") return void loadConnectors();- if (view === "design") return void renderDesignLibrary();+ if (view === "design-system") return void renderDesignLibrary();if (view === "user") return void showUserDetail(st.principal);if (view === "slack") return void renderSlackMirror(st);if (view === "judgments") return void renderAmbientJudgments(st);@@ -7671,13 +9049,33 @@function pageShell(opts = {}) {const bar = $("shellbar");bar.textContent = "";+ const logView = ["history", "slack", "judgments", "errors", "audit", "egress", "metrics", "memory"].includes(+ view,+ );+ bar.classList.toggle("logs-shell", logView);+ const counts = document.createElement("div");+ counts.className = "log-counts";+ const countText = (label, value) => {+ const count = document.createElement("span");+ count.className = "log-count";+ const number = Number(value);+ const noun = number === 1 ? label.replace(/s$/, "") : label;+ count.textContent =+ (Number.isFinite(number) ? number.toLocaleString() : String(value)) + " " + noun.toLowerCase();+ return count;+ };if (opts.back) {const b = document.createElement("button");b.type = "button";b.className = "back";- b.textContent = opts.back.label;+ const label = document.createElement("span");+ label.textContent = opts.back.label.replace(/^←\s*/, "");+ b.append($("home-link").querySelector("svg").cloneNode(true), label);b.onclick = opts.back.onClick;- bar.appendChild(b);+ const row = document.createElement("div");+ row.className = "shell-back-row";+ row.appendChild(b);+ bar.appendChild(row);}if (opts.title) {const h = document.createElement("h1");@@ -7685,6 +9083,7 @@h.textContent = opts.title;bar.appendChild(h);}+ if (logView) bar.appendChild(counts);if (opts.context) {const c = opts.contextGo ? navLink(opts.context, opts.contextGo) : document.createElement("span");c.classList.add("shell-context");@@ -7693,40 +9092,79 @@}if (opts.tabs && opts.tabs.length) {const wrap = document.createElement("div");- wrap.className = "shell-tabs";+ wrap.className = "shell-tabs" + (view === "judgments" ? " judgment-filters" : "");opts.tabs.forEach((tab) => {const b = document.createElement("button");b.type = "button";b.className = "shell-tab" + (tab.active ? " active" : "");- b.textContent = tab.count != null ? tab.label + " " + Number(tab.count).toLocaleString() : tab.label;+ b.setAttribute("aria-pressed", String(!!tab.active));+ if (logView) b.textContent = tab.label;+ else b.textContent = tab.count != null ? tab.label + " " + Number(tab.count).toLocaleString() : tab.label;b.onclick = tab.onClick;wrap.appendChild(b);});+ if (logView) {+ const active = opts.tabs.find((tab) => tab.active);+ if (active?.count != null) {+ const noun =+ view === "judgments" ? "judgments" : active.label === "Background" ? "background runs" : active.label;+ counts.appendChild(countText(noun, active.count));+ }+ }bar.appendChild(wrap);} else if (opts.count != null && opts.count !== "") {const c = document.createElement("span");c.className = "shell-count";c.textContent = String(opts.count);- bar.appendChild(c);+ if (logView) {+ const match = String(opts.count).match(/^([\d,.]+\+?)\s*(.*)$/);+ counts.appendChild(match ? countText(match[2] || "records", match[1].replaceAll(",", "")) : c);+ } else bar.appendChild(c);+ }+ if (logView && opts.stats?.length) {+ opts.stats.forEach(([value, label]) => counts.appendChild(countText(label, value)));}const spacer = document.createElement("span");spacer.className = "shell-spacer";bar.appendChild(spacer);- if (opts.stats && opts.stats.length) bar.appendChild(kpis(opts.stats, "shell-stats"));+ if (!logView && opts.stats && opts.stats.length) bar.appendChild(kpis(opts.stats, "shell-stats"));if (opts.search) {- const w = document.createElement("div");- w.className = "shell-search";- const i = document.createElement("input");- i.type = "search";- i.placeholder = opts.search.placeholder || "Search…";- i.spellcheck = false;- i.setAttribute("autocapitalize", "none");- i.oninput = () => opts.search.onInput(i.value);- w.appendChild(i);- bar.appendChild(w);+ bar.appendChild(searchField(opts.search));}(opts.actions || []).forEach((n) => bar.appendChild(n));}+ function searchField({ placeholder = "Search…", onInput = () => {}, value = "", disabled = false }) {+ const wrap = document.createElement("div");+ wrap.className = "shell-search admin-search";+ const input = document.createElement("input");+ input.type = "search";+ input.placeholder = placeholder;+ input.setAttribute("aria-label", placeholder.replace(/[…]+$/, ""));+ input.spellcheck = false;+ input.setAttribute("autocapitalize", "none");+ input.value = value;+ input.disabled = disabled;+ input.oninput = () => onInput(input.value);+ wrap.appendChild(input);+ const icon = document.createElement("span");+ icon.className = "admin-search-icon";+ icon.setAttribute("aria-hidden", "true");+ icon.innerHTML =+ '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7"><circle cx="10.5" cy="10.5" r="6.5"/><path d="m16 16 4.5 4.5"/></svg>';+ const clear = document.createElement("button");+ clear.type = "button";+ clear.className = "icon-button admin-search-clear";+ clear.setAttribute("aria-label", "Clear search");+ clear.textContent = "×";+ clear.disabled = disabled;+ clear.onclick = () => {+ input.value = "";+ onInput("");+ input.focus();+ };+ wrap.append(icon, clear);+ return wrap;+ }function renderTranscriptHeaderControls(onChange) {const controls = $("header-controls");controls.textContent = "";@@ -7772,6 +9210,7 @@}function defaultShell(extras = {}) {+ extras = { actions: view === "credentials" ? [scAddButton] : [], ...extras };const title = VIEW_TITLE[view] || titleCase(view);if (SCOPED.has(view) && !orgWideView()) {pageShell({@@ -8266,6 +9705,9 @@$("org-ambient").checked = r.data.orgAmbient !== false;governanceOrgAmbientSaved = r.data.orgAmbient === false ? "off" : "on";$("governance-org-ambient").value = governanceOrgAmbientSaved;+ document.querySelectorAll('[data-choice-for="governance-org-ambient"]').forEach((input) => {+ input.checked = input.value === governanceOrgAmbientSaved;+ });$("governance-org-ambient-save").disabled = true;}const showHeaderPinDefault = scope.startsWith("org:") && "channelHeaderPinDefault" in r.data;@@ -8377,7 +9819,8 @@label.textContent = modelLabel(id);const x = document.createElement("button");x.type = "button";- x.textContent = "×";+ x.innerHTML =+ '<svg width="12" height="12" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" aria-hidden="true"><path d="m4 4 8 8M12 4l-8 8" /></svg>';x.setAttribute("aria-label", "Remove " + id);x.onclick = () => {webuiModelIds = webuiModelIds.filter((v) => v !== id);@@ -8787,7 +10230,10 @@title.className = "credential-title";const name = document.createElement("strong");name.textContent = c.name || c.slug;- title.append(name, badge(c.slug, "muted"));+ const slug = document.createElement("span");+ slug.className = "credential-slug";+ slug.textContent = c.slug;+ title.append(name, slug);const orgWide = (c.grantees || []).some((g) => g.startsWith("org:"));const who = orgWide ? "Organization-wide" : plural((c.grantees || []).length, "principal");const meta = document.createElement("div");@@ -8835,7 +10281,7 @@}function loadScForm(c) {$("sc-editor").classList.remove("hidden");- $("sc-add").classList.add("hidden");+ scAddButton.classList.add("hidden");$("sc-save").classList.remove("hidden");$("sc-reset").classList.remove("hidden");scEditing = c.slug;@@ -8876,11 +10322,16 @@syncScPeople();captureScForm();renderServiceCreds(serviceCredList);- $("card-service-credentials").scrollIntoView({ behavior: "smooth", block: "nearest" });+ openScDialog();+ $("sc-name").focus();}function resetScForm() {+ const dialog = $("sc-dialog");+ const wasOpen = dialog.open;+ if (wasOpen) dialog.close();+ scStatusHome.appendChild($("st-service-credentials"));$("sc-editor").classList.add("hidden");- $("sc-add").classList.remove("hidden");+ scAddButton.classList.remove("hidden");$("sc-save").classList.add("hidden");$("sc-reset").classList.add("hidden");scEditing = null;@@ -8913,6 +10364,7 @@syncScPeople();captureScForm();if (serviceCredList.length) renderServiceCreds(serviceCredList);+ if (wasOpen) scAddButton.focus();}function syncScDelivery() {const env = $("sc-delivery").value === "env";@@ -9275,15 +10727,18 @@setStatus("st-service-credentials", message, "err");}}- $("sc-add").onclick = () => {+ scAddButton.onclick = () => {resetScForm();$("sc-editor").classList.remove("hidden");- $("sc-add").classList.add("hidden");+ scAddButton.classList.add("hidden");$("sc-save").classList.remove("hidden");$("sc-reset").classList.remove("hidden");+ openScDialog();$("sc-name").focus();};- $("sc-reset").onclick = resetScForm;+ $("sc-reset").onclick = () => {+ if (!$("st-service-credentials").classList.contains("saving")) resetScForm();+ };$("sc-save").onclick = async () => {const body = serviceCredentialBody();const invalid = validateServiceCredential(body);@@ -9967,17 +11422,46 @@const DESIGN_TOKENS = [["--bg", "Page behind every surface"],["--surface", "Cards, dialogs, table bodies"],- ["--subtle", "Zebra rows, inset wells"],+ ["--subtle", "Quiet control and inset backgrounds"],["--border", "Every hairline and divider"],["--text", "Primary copy"],["--muted", "Secondary copy and hints"],- ["--ink", "Primary button fill"],+ ["--cta", "Primary actions and selected controls"],["--ok", "Confirmed and healthy"],["--warn", "Needs attention"],["--danger", "Destructive and failed"],["--trigger", "Automation and triggers"],];+ let twoWayToggleId = 0;+ function twoWayToggle({ label, options, value, onChange, disabled = false }) {+ if (options.length !== 2 || options[0].value === options[1].value)+ throw new Error("A two-way toggle needs two distinct options.");+ const group = document.createElement("fieldset");+ group.className = "two-way-toggle";+ group.disabled = disabled;+ const legend = document.createElement("legend");+ legend.textContent = label;+ group.appendChild(legend);+ const name = "two-way-toggle-" + ++twoWayToggleId;+ options.forEach((option) => {+ const choice = document.createElement("label");+ const input = document.createElement("input");+ input.type = "radio";+ input.name = name;+ input.value = option.value;+ input.checked = option.value === value;+ input.onchange = () => {+ if (input.checked) onChange(option.value);+ };+ const text = document.createElement("span");+ text.textContent = option.label;+ choice.append(input, text);+ group.appendChild(choice);+ });+ return group;+ }+function designSpec(label, note, demo, stack) {return ('<div class="spec"><div class="spec-label">' +@@ -10013,186 +11497,339 @@).join("");root.innerHTML = [- '<p class="lead">Every control below is rendered from the same stylesheet the rest of this surface uses, so ' +- "this page drifts only when the design does. Copy the class names, not the markup screenshots.</p>",-- designSection(- "Colour",- "Semantic tokens, not raw hex. Reach for the meaning, and light and dark stay consistent.",- [designSpec("Palette", "Declared on :root", '<div class="swatches">' + swatches + "</div>")],- ),-- designSection("Typography", "One sans stack for the product, one serif for the brand lockup.", [- designSpec(- "Scale",- "Sizes are set per component, not by a global step scale",- '<div class="type-row"><h2 style="margin: 0">Section heading</h2></div>' +- '<div class="type-row"><p class="lead" style="margin: 0">Lead paragraph, used once at the top of a page</p></div>' +- '<div class="type-row"><p style="margin: 0">Body copy at the default size</p></div>' +- '<div class="type-row"><p class="hint" style="margin: 0">Hint text for secondary guidance</p></div>' +- '<div class="type-row"><span class="mono">mono for identifiers and payloads</span></div>',- true,- ),- designSpec(- "Brand lockup",- "--brand-font, serif, reserved for the wordmark",- '<span class="brand-name" style="font-family: var(--brand-font); font-size: 19px">QM ' +- '<span class="brand-suffix">(admin)</span></span>',- ),- ]),-- designSection("Actions", "One primary per view. Everything else is secondary or a link.", [- designSpec(- "Buttons",- "button, .primary, .danger",- '<button class="primary" type="button">Save changes</button>' +- '<button type="button">Secondary</button>' +- '<button class="danger" type="button">Remove</button>' +- '<button type="button" disabled>Disabled</button>',- ),- designSpec(- "Dirty state",- "button.dirty marks unsaved edits with a trailing asterisk",- '<button class="primary dirty" type="button">Apply</button>',- ),- designSpec(- "Links",- ".link for navigation, .danger-link for destructive text actions",- '<button class="link" type="button">Inline link</button>' +- '<button class="danger-link" type="button">Revoke access</button>',- ),- ]),-- designSection("Status and labels", "Short, factual, colour-coded by meaning.", [- designSpec(- "Badges",- ".badge with ok, warn, err, info, muted, accent, admin",- '<span class="badge ok">Healthy</span><span class="badge warn">Degraded</span>' +- '<span class="badge err">Failed</span><span class="badge info">Queued</span>' +- '<span class="badge muted">Inactive</span><span class="badge accent">Beta</span>' +- '<span class="badge admin">Admin</span>',- ),- designSpec(- "Pills",- ".pill for counts and scope chips",- '<span class="pill">org:acme</span><span class="pill">12</span>',- ),+ '<p class="lead">Components and page patterns from the redesigned admin portal, including Skills, Files, Sessions, Metrics, Audit, and Egress. Examples use fictional data and do not save changes.</p>',+ designSection("Foundations", "One palette, a small type scale, and consistent spacing.", [designSpec(- "Save status",- ".status beside the control it reports on",- '<span class="status ok">Saved</span><span class="status err">Save failed</span>' +- '<span class="status muted">No changes</span><span class="status dirty">Unsaved</span>',+ "Semantic colors",+ "Shared theme tokens · light and dark",+ '<div class="swatches">' + swatches + "</div>",),designSpec(- "Chips",- ".meta-chip and .identity-chip carry one fact each",- '<span class="meta-chip">web</span><span class="meta-chip danger">quarantined</span>' +- '<span class="identity-chip">[email protected]</span>',- ),- ]),-- designSection("Surfaces", "Flat. Borders and spacing carry the hierarchy, never a shadow.", [- designSpec(- "Card",- "section.card with head, body, foot",- '<section class="card" style="margin: 0; width: 100%"><div class="head"><h2>Card heading</h2>' +- "<p>One sentence saying what this card controls.</p></div>" +- '<div class="body"><p style="margin: 0">Body content.</p></div>' +- '<div class="foot"><button class="primary" type="button">Apply</button>' +- '<span class="status muted">Idle</span></div></section>',- true,- ),- designSpec(- "Note",- ".notebox for a standing caveat",- '<p class="notebox" style="margin: 0">Changes here apply to every scope that inherits from this organization.</p>',- true,- ),- designSpec(- "Empty state",- ".empty says what is missing and what to do",- '<div class="empty">No credentials yet. Add one to let the agent reach this provider.</div>',+ "Type & spacing",+ "22px page title · 14px section title · 13px controls and copy",+ '<div class="shell-title">Page title</div><div class="head"><h2>Section title</h2><p>Descriptions explain the setting.</p></div><label>Field label</label><p class="hint">4px label gap · 8px action gap · 24px section spacing</p>',true,),]),-- designSection("Forms", "Label above, hint below, status next to the button that writes.", [+ designSection(+ "Page layout",+ "Start with the shared shell. Align titles, sections, and rows to the same content edge; use whitespace and dividers instead of enclosing cards.",+ [+ designSpec(+ "Desktop and mobile",+ "Authored layout diagrams · .admin-main → .admin-inner → .shellbar",+ '<div class="design-layouts"><div class="design-layout-frame"><div class="design-layout-nav">Sidebar<br>Independent scroll</div><div class="design-layout-main"><div class="design-layout-content"><div class="design-layout-title">Title <span>Search / action</span></div><div class="design-layout-section">Open section<br><small>Heading + description</small></div><div class="design-layout-lines">Compact rows<br>────────────────<br>Compact rows</div></div></div></div><div class="design-layout-frame mobile"><div class="design-layout-nav">Horizontal navigation</div><div class="design-layout-main"><div class="design-layout-content"><div class="design-layout-title">Title</div><div class="design-layout-section">Full-width search</div><div class="design-layout-lines">Stacked content<br>────────────<br>Local table scroll</div></div></div></div></div>',+ true,+ ),+ designSpec(+ "Width and page padding",+ "Current New CSS · index.html and admin-components.css",+ '<div class="tablewrap"><table><thead><tr><th>Rule</th><th>Desktop</th><th>Small screens</th></tr></thead><tbody><tr><td>Navigation</td><td>280px sidebar; independent scroll</td><td>Horizontal navigation at ≤900px</td></tr><tr><td>Content width</td><td>960px maximum, centered; fluid below that</td><td>Available width; min-width: 0</td></tr><tr><td>Main padding</td><td>28px top and sides</td><td>At ≤900px: 18px top, 14px sides with safe-area insets</td></tr><tr><td>Bottom clearance</td><td colspan="2">110px for the fixed Original / New switch</td></tr><tr><td>Page heading</td><td colspan="2">22px / 500 weight; shared shell spacing 16px (activity pages use 24px)</td></tr><tr><td>Sections</td><td colspan="2">24px between artifact sections; 12px from section heading to content</td></tr><tr><td>Controls</td><td colspan="2">32px height · 6px radius · 8px gap · 4px label gap</td></tr></tbody></table></div>',+ true,+ ),+ designSpec(+ "Choose a page pattern",+ "Live references · preserve the selected organization",+ '<div class="design-page-links"><a data-design-view="governance">Governance / Models</a><p>Descriptions beside settings, 40px column gap; stack on small screens. Keep Apply right-aligned with status on its left.</p><a data-design-view="skills">Skills</a><p>Open installed-skill and skill-pack sections; compact tables and an inline registration form.</p><a data-design-view="files">Files</a><p>Search in the header, flat upload toolbar, then scopes or files with metadata.</p><a data-design-view="history">Sessions</a><p>Two-way sort toggle, named environments, and a separately titled conversation list.</p><a data-design-view="metrics">Metrics</a><p>Quiet summary metrics followed by ruled report sections.</p><a data-design-view="audit">Audit</a> · <a data-design-view="egress">Egress</a><p>Filters above plain tables; headers stay transparent and regular-weight.</p></div>',+ true,+ ),+ designSpec(+ "Responsive behavior",+ "Page-level rules",+ '<ul class="design-rules"><li>At ≤900px, the sidebar becomes horizontal navigation.</li><li>At ≤640px, Skills and Files search uses the full row; dense rows allow more height and Files metadata wraps below the name.</li><li>Wide tables scroll inside .tablewrap. Never force the entire document wider than the viewport.</li><li>Keep all actions and metadata available on mobile. Use wrapping or local scrolling rather than hiding content.</li><li>Sidebar scrolling is contained; reaching its end must not scroll the main page.</li></ul>',+ true,+ ),+ ],+ ),+ designSection(+ "Artifact and reporting patterns",+ "Compositions from the recent redesigns. Shared helpers render the lists; the form and report examples are local demonstrations.",+ [+ designSpec(+ "Scope list",+ "denseList() · shared Skills / Files row styles · Enter or click selects a demo row",+ '<div id="design-scope-list"></div><p class="hint" id="design-scope-status" role="status">Choose a scope to try the row interaction.</p>',+ true,+ ),+ designSpec(+ "File list and upload toolbar",+ "denseList() + fileThumb() · .file-upload · visual upload example, no network requests",+ '<div class="file-upload"><div class="file-upload-actions"><button type="button" class="primary upload-button" id="design-upload"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 16V3m-5 5 5-5 5 5M4 15v5a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-5"/></svg><span>Upload</span></button></div></div><div id="design-file-list"></div><p class="hint" id="design-file-status" role="status">File names, thumbnails, sizes, and dates stay visible.</p>',+ true,+ ),+ designSpec(+ "Skill-pack registration",+ ".pack-register · shared Skills styles · local form demonstration",+ '<div class="pack-register"><input type="url" aria-label="Example skill repository" placeholder="https://github.com/example/skills"/><button type="button" id="design-register">Register</button><button type="button" class="linkish" id="design-advanced" aria-expanded="false" aria-controls="design-pack-advanced">Advanced</button></div><div class="pack-adv hidden" id="design-pack-advanced"><div><label for="design-pack-name">Name</label><input id="design-pack-name" type="text" placeholder="Team skills"/></div><div><label for="design-pack-ref">Ref</label><input id="design-pack-ref" type="text" placeholder="main"/></div><div><label for="design-pack-path">Path</label><input id="design-pack-path" type="text" placeholder="skills/"/></div></div><p class="hint" id="design-pack-status" role="status">Registration is a local demonstration.</p>',+ true,+ ),+ designSpec(+ "Open report section",+ "Authored Metrics / Audit / Egress composition · statline() + shared table controls",+ '<section class="design-open-section"><h3>Activity summary</h3><p class="hint">Keep descriptions beside the section they explain.</p><div id="design-metrics-summary"></div><div class="tablewrap"><table><thead><tr><th>Scope</th><th>Requests</th><th>Status</th></tr></thead><tbody><tr><td>Example team</td><td>128</td><td><span class="badge ok">Healthy</span></td></tr><tr><td>Research</td><td>24</td><td><span class="badge muted">Idle</span></td></tr></tbody></table></div></section>',+ true,+ ),+ ],+ ),+ designSection("Actions", "32px controls with a 6px radius. Primary actions use the dark blue accent.", [designSpec(- "Text input",- "input, select, textarea share one border and radius",- '<label style="display: block; width: 100%">Display name<input type="text" value="Acme" style="width: 100%" /></label>' +- '<p class="field-hint" style="margin: 0">Shown to everyone in the organization.</p>',- true,+ "Buttons",+ "button · .primary · .danger",+ '<button type="button" class="primary">Apply</button><button type="button">Add item</button><button type="button" class="danger">Delete</button><button type="button" disabled>Disabled</button><button type="button" class="primary" disabled>Apply</button>',),designSpec(- "Select",- "Native control, styled to match",- "<select><option>Organization</option><option>Team</option><option>Personal</option></select>",+ "Quiet actions",+ ".viewlink · .icon-button",+ '<button type="button" class="viewlink">View history ›</button><button type="button" class="icon-button" aria-label="Remove example">×</button>',),designSpec(- "Toggle row",- ".setting-toggle with .setting-switch",- '<label class="setting-toggle"><input type="checkbox" checked />' +- '<span class="setting-switch" aria-hidden="true"></span> Require approval for shell commands</label>',+ "Save feedback",+ ".foot · .status · native input events",+ '<section class="card"><div class="head"><h2>Example setting</h2><p>Edit the name to try unsaved and saved states.</p></div><div class="body"><label for="design-name">Display name</label><input id="design-name" type="text" value="Acme" /></div><div class="foot"><span class="status" id="design-status" role="status">No changes</span><button class="primary" type="button" id="design-apply" disabled>Apply</button></div></section>',true,),]),-- designSection("Navigation", "The sidebar owns primary navigation; these move within a page.", [+ designSection(+ "Two-way toggle",+ "Choose one of two mutually exclusive options. Tab to focus; use arrow keys to switch.",+ [+ designSpec(+ "Segmented choice",+ "twoWayToggle({ label, options, value, onChange, disabled }) · shared radio group",+ '<div id="design-two-way-toggle"></div><p class="hint" id="design-two-way-status" role="status">Selected: Human activity</p>',+ true,+ ),+ designSpec(+ "Disabled",+ "The same component with disabled: true",+ '<div id="design-two-way-disabled"></div>',+ ),+ ],+ ),+ designSection(+ "Search",+ "A transparent background, subtle border, search icon, and clear action. Focus uses the shared dark blue accent.",+ [+ designSpec(+ "Search field",+ "searchField() · shared with Slack and page toolbar searches",+ '<div id="design-search"></div><p class="hint" id="design-search-status" role="status">Type to try the search field, then clear it.</p>',+ true,+ ),+ designSpec(+ "Populated and disabled",+ "The same component with value and disabled options",+ '<div id="design-search-filled"></div><div id="design-search-disabled"></div>',+ true,+ ),+ ],+ ),+ designSection("Fields", "Shared sizing, labels, hints, focus rings, validation, and disabled states.", [designSpec(- "Page tabs",- ".shell-tabs with .shell-tab",- '<div class="shell-tabs"><button class="shell-tab active" type="button">Conversations</button>' +- '<button class="shell-tab" type="button">Runs</button>' +- '<button class="shell-tab" type="button">Deliveries</button></div>',+ "Text fields",+ "input · label · .hint",+ '<label for="design-text">Client ID</label><input id="design-text" type="text" placeholder="Enter a client ID" aria-describedby="design-text-hint" /><p class="hint" id="design-text-hint">A label stays visible when the field has a value.</p><label for="design-number">Limit</label><input id="design-number" type="number" value="10" /><label for="design-disabled">Inherited value</label><input id="design-disabled" type="text" disabled value="Organization default" /><label for="design-invalid">Required value</label><input id="design-invalid" type="text" aria-invalid="true" aria-describedby="design-error" /><p class="status err" id="design-error">Enter a value to continue.</p>',true,),designSpec(- "Segmented",- ".segmented with .seg for mutually exclusive modes",- '<div class="segmented"><button class="seg active" type="button">Rendered</button>' +- '<button class="seg" type="button">Raw</button></div>',+ "Dropdown",+ "select → shared .dd accessible dropdown",+ '<label for="design-select">Scope</label><select id="design-select"><option>Organization</option><option>Team</option><option>Personal</option></select>',true,),- ]),-- designSection("Data", "Dense by default. Numbers right-aligned, identifiers in mono.", [designSpec(- "Table",- "table inside .tablewrap",- '<div class="tablewrap" style="width: 100%"><table><thead><tr><th>Principal</th><th>Scope</th>' +- "<th>Status</th></tr></thead><tbody>" +- '<tr><td><span class="mono">[email protected]</span></td><td>org:acme</td><td><span class="badge ok">Active</span></td></tr>' +- '<tr><td><span class="mono">[email protected]</span></td><td>team:eng</td><td><span class="badge muted">Invited</span></td></tr>' +- "</tbody></table></div>",+ "Multiline",+ "textarea · same field border and label",+ '<label for="design-notes">Instructions</label><textarea id="design-notes" rows="3" placeholder="Write instructions…"></textarea>',true,),designSpec(- "Metrics",- ".kpis with .kpi for headline numbers",- '<div class="kpis" style="width: 100%">' +- '<div class="kpi"><div class="n">1,284</div><div class="k">Turns</div></div>' +- '<div class="kpi"><div class="n">37</div><div class="k">Sessions</div></div>' +- '<div class="kpi"><div class="n">2.1s</div><div class="k">Median latency</div></div></div>',+ "Choices",+ ".choice-stack · .posture-choice",+ '<div class="choice-stack"><label class="posture-choice"><input type="radio" name="design-choice" checked /><span><strong>Automatic</strong><small>Review activity when needed.</small></span></label><label class="posture-choice"><input type="radio" name="design-choice" /><span><strong>Always review</strong><small>Review every request.</small></span></label></div>',true,),designSpec(- "Distribution",- ".dist rows for a share-of-total breakdown",- '<div class="dist" style="width: 100%">' +- '<div class="dist-row"><span class="dist-label">Slack</span>' +- '<span class="dist-track"><span class="dist-bar" style="width: 68%"></span></span>' +- '<span class="dist-count">68%</span></div>' +- '<div class="dist-row"><span class="dist-label">Web</span>' +- '<span class="dist-track"><span class="dist-bar" style="width: 27%"></span></span>' +- '<span class="dist-count">27%</span></div>' +- '<div class="dist-row"><span class="dist-label">Cron</span>' +- '<span class="dist-track"><span class="dist-bar" style="width: 5%"></span></span>' +- '<span class="dist-count">5%</span></div></div>',+ "Switch & checkbox",+ ".setting-toggle · .setting-switch · input[type=checkbox]",+ '<label class="setting-toggle"><input type="checkbox" checked /><span class="setting-switch" aria-hidden="true"></span><span>Enable feature</span></label><label><input type="checkbox" /> Include optional details</label>',true,),]),+ designSection(+ "Sections & lists",+ "Open sections separated by rules, with the same headings, descriptions, and row actions.",+ [+ designSpec(+ "Settings section",+ ".card > .head / .body / .foot",+ '<section class="card"><div class="head"><h2>Section title</h2><p>Explain what the setting changes.</p></div><div class="body"><label for="design-section-field">Setting label</label><input id="design-section-field" type="text" value="Default value" /></div><div class="foot"><span class="status">No changes</span><button class="primary" type="button" disabled>Apply</button></div></section>',+ true,+ ),+ designSpec(+ "List row",+ ".credential-row · .credential-title · .credential-actions",+ '<div class="credential-row"><div class="credential-main"><div class="credential-title"><strong>Example service</strong><span class="credential-slug">example</span></div><p class="hint">Available to the organization</p></div><div class="credential-actions"><button type="button">Edit</button><button type="button" class="danger">Delete</button></div></div>',+ true,+ ),+ designSpec(+ "Model chip",+ ".model-chip · removable item",+ '<div class="model-chip"><span>Example model</span><button type="button" id="design-remove-chip" aria-label="Remove example model">×</button></div><span class="hint" id="design-chip-status" role="status"></span>',+ ),+ designSpec(+ "Badges & feedback",+ ".badge · .status · semantic colors",+ '<span class="badge muted">Inherited</span><span class="badge ok">Enabled</span><span class="badge warn">Needs review</span><span class="badge err">Failed</span><span class="status ok">Saved</span><span class="status err">Save failed</span>',+ ),+ designSpec(+ "Empty state",+ ".empty",+ '<div class="empty">No items yet. Add an item to get started.</div>',+ true,+ ),+ ],+ ),+ designSection(+ "Dialogs",+ "The same controls in a focused, keyboard-accessible dialog. Escape closes it and returns focus.",+ [+ designSpec(+ "Review dialog",+ "dialog.review-dialog · shared fields and actions",+ '<button type="button" id="design-dialog-open">Open example dialog</button><dialog class="review-dialog" id="design-dialog" aria-labelledby="design-dialog-title"><div class="review-dialog-head"><h2 id="design-dialog-title">Example dialog</h2><p>Try the shared controls without changing any settings.</p></div><div class="review-dialog-body"><label for="design-dialog-field">Display name</label><input id="design-dialog-field" type="text" value="Example" /></div><div class="review-dialog-foot"><button type="button" id="design-dialog-close">Cancel</button><button type="button" class="primary" id="design-dialog-done">Done</button></div></dialog>',+ ),+ ],+ ),+ designSection(+ "Tables",+ "13px cells, quiet headers, consistent padding, and scrolling inside the table on small screens.",+ [+ designSpec(+ "Data table",+ ".tablewrap > table · th · td",+ '<div class="tablewrap"><table><thead><tr><th>Name</th><th>Access</th><th>Status</th><th>Actions</th></tr></thead><tbody><tr><td>Alex Example</td><td>Organization</td><td><span class="badge ok">Active</span></td><td><button type="button">Edit</button></td></tr><tr><td>Sam Example</td><td>Team</td><td><span class="badge muted">Invited</span></td><td><button type="button" disabled>Edit</button></td></tr></tbody></table></div>',+ true,+ ),+ ],+ ),].join("");+ const contents = document.createElement("nav");+ contents.className = "design-contents";+ contents.setAttribute("aria-label", "Design system sections");+ root.querySelectorAll(".design-group").forEach((section) => {+ const title = section.querySelector("h2").textContent;+ section.id = "design-group-" + title.toLowerCase().replace(/[^a-z0-9]+/g, "-");+ const link = document.createElement("a");+ link.href = "#" + section.id;+ link.textContent = title;+ contents.appendChild(link);+ });+ root.querySelector(".lead").after(contents);+ root.querySelectorAll(".design-page-links a").forEach((link) => {+ link.href = stateToUrl({ view: link.dataset.designView, scope });+ });+ $("design-scope-list").appendChild(+ denseList(+ [+ { name: "Example team", preview: "12 skills", time: "5 mins ago" },+ { name: "Research", preview: "4 skills", time: "Yesterday" },+ ],+ (item) => item,+ (item) => {+ $("design-scope-status").textContent = "Selected: " + item.name;+ },+ "No skills yet.",+ ),+ );+ $("design-file-list").appendChild(+ denseList(+ [+ { name: "Research brief.pdf", size: "240 KB", date: "Today" },+ { name: "Project notes.md", size: "8 KB", date: "Yesterday" },+ ],+ (item) => ({+ name: item.name,+ icon: fileThumb(item),+ preview: "Example team",+ time: item.size + " · " + item.date,+ }),+ (item) => {+ $("design-file-status").textContent = "Selected: " + item.name + " (demo only)";+ },+ "No documents saved yet.",+ ),+ );+ $("design-upload").onclick = () => {+ $("design-file-status").textContent =+ "On Files, this opens the file picker. This example does not upload files.";+ };+ $("design-register").onclick = () => {+ $("design-pack-status").textContent = "Example registered locally. No repository was fetched.";+ };+ $("design-advanced").onclick = () => {+ const expanded = $("design-advanced").getAttribute("aria-expanded") !== "true";+ $("design-advanced").setAttribute("aria-expanded", String(expanded));+ $("design-pack-advanced").classList.toggle("hidden", !expanded);+ };+ $("design-metrics-summary").appendChild(statline(["152 requests", "2 scopes", "Last 24 hours"]));+ $("design-search").appendChild(+ searchField({+ placeholder: "Search messages…",+ onInput: (value) => {+ $("design-search-status").textContent = value+ ? "Search query: " + value+ : "Type to try the search field, then clear it.";+ },+ }),+ );+ $("design-search-filled").appendChild(+ searchField({ placeholder: "Search messages…", value: "Product updates" }),+ );+ $("design-search-disabled").appendChild(searchField({ placeholder: "Search unavailable", disabled: true }));+ const toggleOptions = [+ { value: "human", label: "Human activity" },+ { value: "all", label: "All activity" },+ ];+ $("design-two-way-toggle").appendChild(+ twoWayToggle({+ label: "Example activity sort",+ options: toggleOptions,+ value: "human",+ onChange: (value) => {+ $("design-two-way-status").textContent =+ "Selected: " + toggleOptions.find((option) => option.value === value).label;+ },+ }),+ );+ $("design-two-way-disabled").appendChild(+ twoWayToggle({+ label: "Disabled activity sort",+ options: toggleOptions,+ value: "human",+ disabled: true,+ onChange: () => {},+ }),+ );+ let savedName = "Acme";+ $("design-name").oninput = () => {+ const dirty = $("design-name").value !== savedName;+ $("design-apply").disabled = !dirty;+ $("design-status").textContent = dirty ? "Unsaved changes" : "No changes";+ };+ $("design-apply").onclick = () => {+ savedName = $("design-name").value;+ $("design-apply").disabled = true;+ $("design-status").textContent = "Saved in this example";+ };+ $("design-remove-chip").onclick = () => {+ $("design-remove-chip").closest(".model-chip").remove();+ $("design-chip-status").textContent = "Example model removed";+ };+ $("design-dialog-open").onclick = () => $("design-dialog").showModal();+ $("design-dialog-close").onclick = () => $("design-dialog").close();+ $("design-dialog-done").onclick = () => $("design-dialog").close();+ initCustomDropdowns(root);designLibraryRendered = true;}@@ -10275,7 +11912,10 @@title.className = "credential-title";const name = document.createElement("strong");name.textContent = connectorName(c.provider);- title.append(name, badge(c.provider, "muted"));+ const slug = document.createElement("span");+ slug.className = "credential-slug";+ slug.textContent = c.provider;+ title.append(name, slug);const meta = document.createElement("div");meta.className = "hint";meta.textContent = c.inherited@@ -10678,7 +12318,8 @@const del = document.createElement("button");del.type = "button";del.className = "rowbtn danger";- del.textContent = "×";+ del.innerHTML =+ '<svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" aria-hidden="true"><path d="m4 4 8 8M12 4l-8 8" /></svg>';del.title = "Remove this command policy rule";del.setAttribute("aria-label", "Remove command policy rule");del.onclick = () => {@@ -11765,6 +13406,7 @@function renderMetrics(root, d) {const phaseSel = urlToState().phase;if (phaseSel) return renderPhaseDrill(root, d, phaseSel);+ defaultShell({ count: plural(d.throughput?.total ?? 0, "run") });renderCacheHealth(root, d);const phases = d.phases || [];root.appendChild(@@ -11978,29 +13620,23 @@const total = d.total ?? errors.length;const limit = d.limit || ERRORS_PAGE_SIZE;const offset = d.offset || 0;- defaultShell({ count: plural(total, "error"), context: "Newest first" });+ defaultShell({ count: plural(total, "error") });const rows = errors.map((e) => {const scopeTarget = /^(personal|channel|team|org|group):.+/.test(e.scopeLabel || "") ? e.scopeLabel : null;const fullText = e.message || "(no message)";const previewText = firstLine(fullText, 160);- const expandable = previewText !== fullText;- const message = document.createElement(expandable ? "details" : "div");+ const message = document.createElement("details");message.className = "error-message";- if (expandable) {- const summary = document.createElement("summary");- const preview = document.createElement("span");- preview.className = "error-preview";- preview.textContent = previewText;- const full = document.createElement("span");- full.className = "error-full";- full.textContent = fullText;- summary.append(preview, full);- message.append(summary);- } else {- message.textContent = fullText;- }+ const summary = document.createElement("summary");+ const preview = document.createElement("span");+ preview.className = "error-preview";+ preview.textContent = previewText;+ const full = document.createElement("span");+ full.className = "error-full";+ full.textContent = fullText;+ summary.append(preview, full);+ message.append(summary);return [- timeCell(e.ts),{ text: e.category || "uncategorized" },{ text: e.code || "—", cls: "mono" },nodeCell(message),@@ -12016,10 +13652,11 @@navLink("View session", { view: "history", scope: scopeTarget || scope, session: e.sessionId }),): { text: "—" },+ timeCell(e.ts),];});const content = table(- ["Time", "Category", "Code", "Message", ...(all ? ["Scope"] : []), "Session"],+ ["Category", "Code", "Message", ...(all ? ["Scope"] : []), "Session", "Time"],rows,all ? "No errors recorded." : "No errors recorded for this scope.",);@@ -12135,10 +13772,10 @@defaultShell({stats: [[String(d.total ?? recs.length), "Calls"],- [String(d.denied ?? 0), "Denied"],+ [String(d.denied ?? 0), "denied requests"],[String(d.hosts ?? 0), "Hosts"],- [String(bs.broker ?? 0), "Broker"],- [String(bs.firewall ?? 0), "Firewall"],+ [String(bs.broker ?? 0), "broker requests"],+ [String(bs.firewall ?? 0), "firewall requests"],],});const rows = recs.map((r) => [@@ -12651,7 +14288,7 @@(a, b) => (b.lastAccessAt || b.createdAt || 0) - (a.lastAccessAt || a.createdAt || 0),);const deployments = orgOwnView() ? allDeps.filter((dep) => scopeKind(dep.ownerScopeId) === "org") : allDeps;- const count = deployments.length ? plural(deployments.length, "app") : "";+ const count = plural(deployments.length, "app");const previewOf = (dep) =>[titleCase(dep.status || "unknown"),@@ -12887,7 +14524,7 @@},placeholder: index ? "Search all skills…" : "Search skills…",});- const card = bareDataCard(tableWrap);+ const card = dataCard("Installed skills", "", tableWrap);if (scopeWrap) card.querySelector(".body").prepend(scopeWrap);root.appendChild(card);root.appendChild(detail);@@ -13289,7 +14926,9 @@];});box.appendChild(table(["Pack", "Skills", "Trust", "Status", ""], rows, "No packs yet. Register one above."));- root.appendChild(bareDataCard(box));+ root.appendChild(+ dataCard("Skill packs", "Register a repository, then choose which skills to import into each scope.", box),+ );root.appendChild(detail);}@@ -13812,6 +15451,7 @@const ta = document.createElement("textarea");ta.id = "memory-text";ta.spellcheck = false;+ ta.setAttribute("aria-label", "Notebook contents");ta.value = memDraft !== null && memDraftScope === scope ? memDraft : server;ta.style.minHeight = "340px";ta.style.fontFamily = "ui-monospace, SFMono-Regular, Menlo, monospace";@@ -13850,9 +15490,19 @@};foot.append(save, st);wrap.append(ta, foot);- root.appendChild(bareDataCard(wrap));+ const label = document.createElement("label");+ label.htmlFor = "memory-text";+ label.textContent = "Notebook contents";+ wrap.prepend(label);+ st.setAttribute("role", "status");+ const card = dataCard("Notebook", "What the agent remembers in this scope. Changes apply when you save.", wrap);+ card.classList.add("memory-editor");+ root.appendChild(card);}function renderMemoryIndex(root, d) {+ let query = "";+ const list = document.createElement("div");+ list.className = "memory-notebooks";const scopes = (d.scopes || []).filter((s) => s.hasMemory || scopeKind(s.scopeId) === "org");const written = scopes.filter((s) => s.hasMemory);const hasTimestamps = written.some((s) => s.updatedAt);@@ -13869,25 +15519,46 @@);pageShell({title: VIEW_TITLE.memory,- count: written.length ? plural(written.length, "notebook") : "",+ count: plural(written.length, "notebook"),+ search: {+ placeholder: "Search notebooks…",+ onInput: (value) => {+ query = value.trim().toLowerCase();+ draw();+ },+ },context: written.length && !hasTimestamps ? "sorted by size (this backend keeps no edit history)" : "",});- const t = denseList(- scopes,- (s) => ({- name: scopeKind(s.scopeId) === "org" ? "org" : s.label || shortName(s.scopeId),- preview: s.hasMemory ? fmtBytes(s.bytes || 0) : "empty",- time: s.updatedAt ? relTime(s.updatedAt) : "Never",- href: stateToUrl(- scopeKind(s.scopeId) === "org"- ? { view: "memory", scope: s.scopeId, mem: "edit" }- : { view: "memory", scope: s.scopeId },- ),- }),- openScope,- "No notebooks yet. The agent hasn't remembered anything.",- );- root.appendChild(bareDataCard(t));+ const draw = () => {+ const visible = scopes.filter(+ (s) => !query || [s.label, shortName(s.scopeId), s.scopeId].join(" ").toLowerCase().includes(query),+ );+ const t = denseList(+ visible,+ (s) => ({+ name: scopeKind(s.scopeId) === "org" ? "org" : s.label || shortName(s.scopeId),+ preview: s.hasMemory ? fmtBytes(s.bytes || 0) : "empty",+ time: s.updatedAt ? relTime(s.updatedAt) : "Never",+ href: stateToUrl(+ scopeKind(s.scopeId) === "org"+ ? { view: "memory", scope: s.scopeId, mem: "edit" }+ : { view: "memory", scope: s.scopeId },+ ),+ }),+ openScope,+ query ? "No notebooks match your search." : "No notebooks yet. The agent hasn't remembered anything.",+ );+ const headings = document.createElement("div");+ headings.className = "memory-columns";+ for (const text of ["Notebook", "Size", "Last updated"]) {+ const label = document.createElement("span");+ label.textContent = text;+ headings.appendChild(label);+ }+ list.replaceChildren(headings, t);+ };+ draw();+ root.appendChild(list);}function renderRetention(root, d) {const a = d.active || {};@@ -14244,6 +15915,10 @@drawLists();}function renderUsers(root, d) {+ const layout = document.createElement("div");+ layout.className = "users-layout";+ root.appendChild(layout);+ root = layout;const users = d.users || [];const grants = d.grants || [];const externalUsers = d.externalUsers || [];@@ -14277,6 +15952,8 @@f.className = "f" + (cls ? " " + cls : "");const l = document.createElement("label");l.textContent = labelText;+ control.id = "users-" + labelText.toLowerCase().replaceAll(" ", "-");+ l.htmlFor = control.id;f.append(l, control);return f;};@@ -14314,6 +15991,7 @@st.id = "st-users";st.style.margin = "10px 0 0";formCard.querySelector(".body").appendChild(st);+ formCard.classList.add("users-setting");root.appendChild(formCard);const impForm = document.createElement("div");@@ -14388,6 +16066,7 @@impSt.id = "st-imp";impSt.style.margin = "10px 0 0";impCard.querySelector(".body").append(impDatalist, impSt);+ impCard.classList.add("users-setting");root.appendChild(impCard);const inviteEmail = d.inviteEmail || {};@@ -14483,7 +16162,7 @@const lists = document.createElement("div");lists.className = "list-root";- root.appendChild(lists);+ root.prepend(lists);const orgAdminCount = grants.filter((g) => g.role === "org_admin").length;const matches = (parts) => parts.join(" ").toLowerCase().includes(filterVal.trim().toLowerCase());const drawLists = () => {@@ -14561,7 +16240,7 @@"Everyone who has used the agent — click a row for their activity, artifacts, and config.",roster,);- lists.appendChild(usersCard);+ lists.prepend(usersCard);const external = actionTable(["Email", "Role", "Expires", "Invited by", "Status", ""],@@ -14587,7 +16266,8 @@"Outside collaborators invited by email until an expiry date. Org members do not need an external invite.",external,);- externalCard.querySelector(".head h2").append(" ", addBtn);+ externalCard.classList.add("users-roster");+ externalCard.querySelector(".head").appendChild(addBtn);externalCard.querySelector(".body").prepend(invite);externalCard.querySelector(".body").appendChild(externalSt);lists.appendChild(externalCard);@@ -15100,29 +16780,23 @@const sortLabel = document.createElement("span");sortLabel.className = "shell-sort-label";sortLabel.textContent = "Sort:";- const seg = document.createElement("div");- seg.className = "segmented";- const sortOpt = (value, label) => {- const b = document.createElement("button");- b.type = "button";- b.className = "seg" + (scopeSort === value ? " active" : "");- b.textContent = label;- b.onclick = () => {- if (scopeSort !== value) {- scopeSort = value;- renderScopeIndex();- }- };- seg.appendChild(b);- };- sortOpt("human", "Human activity");- sortOpt("all", "All activity");+ const seg = twoWayToggle({+ label: "Sort sessions",+ options: [+ { value: "human", label: "Human activity" },+ { value: "all", label: "All activity" },+ ],+ value: scopeSort,+ onChange: (value) => {+ scopeSort = value;+ renderScopeIndex();+ $("shellbar").querySelector(".two-way-toggle input:checked")?.focus({ preventScroll: true });+ },+ });sortControl.append(sortLabel, seg);pageShell({title: VIEW_TITLE.history,- count: activeRows.length- ? activeRows.length + (activeRows.length === 1 ? " active scope" : " active scopes")- : "",+ count: plural(activeRows.length, "active scope"),actions: [sortControl],});const activityTime = (s) => (scopeSort === "human" ? s.lastConversationActivity || 0 : s.lastActivity || 0);@@ -15181,7 +16855,7 @@(s) => selectScope(s.scopeId),rows.length ? "No conversations yet." : "No scopes yet. Nobody has talked to the agent.",);- root.appendChild(bareDataCard(t));+ root.appendChild(dataCard("Conversations by person or channel", "", t));if (quietRows.length) {const quiet = document.createElement("details");quiet.className = "history-quiet";@@ -15932,20 +17606,14 @@return r;}- function slackContainerMeta(id) {+ function slackContainerLabel(id) {const c = (slackContainers || []).find((x) => x.container === id) || {};const nm = c.name || null;const kind = c.kind || (nm ? "channel" : "");- if (kind === "channel") return { icon: "#", name: nm || id, label: "#" + (nm || id) };- if (kind === "dm") return { icon: "@", name: nm || id, label: nm || id };- if (kind === "group") {- const g = nm || ((c.members || []).length ? c.members.length + " people" : id);- return { icon: "@", name: g, label: g };- }- return nm ? { icon: "#", name: nm, label: "#" + nm } : { icon: "#", name: id, label: id };- }- function slackContainerLabel(id) {- return slackContainerMeta(id).label;+ if (kind === "channel") return "#" + (nm || id);+ if (kind === "dm") return nm || id;+ if (kind === "group") return nm || ((c.members || []).length ? c.members.length + " people" : id);+ return nm ? "#" + nm : id;}function slackContainerScope(id) {@@ -16106,15 +17774,9 @@function slackUnescape(s) {return s.replace(/</g, "<").replace(/>/g, ">").replace(/&/g, "&");}- function slackHashHue(s) {- let h = 0;- for (let i = 0; i < s.length; i++) h = (h * 31 + s.charCodeAt(i)) >>> 0;- return h % 360;- }function slackAvatar(m) {const av = document.createElement("span");av.className = "sm-avatar";- av.style.background = "hsl(" + slackHashHue(m.authorId || m.authorName || "?") + " 52% 42%)";av.textContent = (slackAuthorLabel(m).trim()[0] || "?").toUpperCase();return av;}@@ -16154,7 +17816,7 @@function slackAppendMrkdwn(raw, parent) {const text = slackUnescape(raw);- const re = /\*([^*\n]+)\*|(?<!\w)_([^_\n]+)_(?!\w)|~([^~\n]+)~/g;+ const re = /\*([^*\n]+)\*|(?<!\w)_([^_\n]+)_(?!\w)|~([^~\n]+)~|(https?:\/\/[^\s<>]+)/g;let last = 0,m;while ((m = re.exec(text))) {@@ -16166,9 +17828,18 @@} else if (m[2] != null) {el = document.createElement("em");el.textContent = m[2];- } else {+ } else if (m[3] != null) {el = document.createElement("s");el.textContent = m[3];+ } else {+ let url = m[4].replace(/[.,;!?]+$/, "");+ while (url.endsWith(")") && (url.match(/\)/g) || []).length > (url.match(/\(/g) || []).length)+ url = url.slice(0, -1);+ el = slackEntityNode(url);+ parent.appendChild(el);+ parent.appendChild(document.createTextNode(m[4].slice(url.length)));+ last = re.lastIndex;+ continue;}parent.appendChild(el);last = re.lastIndex;@@ -16206,7 +17877,21 @@pre.appendChild(code);frag.appendChild(pre);} else {- slackParseInline(part, frag, mentions);+ let quote = null;+ part.split("\n").forEach((line, lineIndex) => {+ const quoted = /^(?:>|>) ?/.test(line);+ if (quoted) {+ if (!quote) {+ quote = document.createElement("blockquote");+ frag.appendChild(quote);+ } else quote.appendChild(document.createTextNode("\n"));+ slackParseInline(line.replace(/^(?:>|>) ?/, ""), quote, mentions);+ } else {+ if (lineIndex && !quote) frag.appendChild(document.createTextNode("\n"));+ quote = null;+ slackParseInline(line, frag, mentions);+ }+ });}});return frag;@@ -16272,7 +17957,7 @@if (m.sub && m.sub !== m.ts) {const t = document.createElement("span");t.className = "sm-tag";- t.textContent = "↳ thread";+ t.textContent = "Thread reply";t.title = "Reply in the thread rooted at " + m.sub;head.appendChild(t);}@@ -16284,7 +17969,10 @@}const when = document.createElement("span");when.className = "sm-when";- when.textContent = relTime(m.createdAt);+ when.textContent =+ view === "slack" && !opts.onOpen+ ? new Date(m.createdAt).toLocaleTimeString([], { hour: "numeric", minute: "2-digit" })+ : relTime(m.createdAt);when.title = fmtTime(m.createdAt) + " · ts " + m.ts;head.appendChild(when);body.appendChild(head);@@ -16369,18 +18057,19 @@const containers = slackContainers || [];pageShell({title: "Slack",- count: slackContainersTruncated ? containers.length.toLocaleString() + "+" : containers.length,+ count:+ (slackContainersTruncated ? containers.length.toLocaleString() + "+" : containers.length) ++ " conversations",search: slackSearchBox(null),});root.appendChild(denseList(containers,(c) => {- const meta = slackContainerMeta(c.container);return {- icon: meta.icon,- name: meta.name,- preview: `${Number(c.messageCount).toLocaleString()} mirrored · ${(c.members || []).length} members`,+ icon: null,+ name: slackContainerLabel(c.container),+ preview: `${Number(c.messageCount).toLocaleString()} mirrored · ${plural((c.members || []).length, "member")}`,time: relTime(c.updatedAt),href: stateToUrl({ view: "slack", container: c.container }),};@@ -16410,6 +18099,15 @@...(scopeGo ? [navLink("Governance →", { view: "governance", scope: scopeGo, session: null })] : []),],});+ const bar = $("shellbar");+ const toolbar = document.createElement("div");+ toolbar.className = "sm-toolbar";+ toolbar.append(bar.querySelector(".back"), ...bar.querySelectorAll(".link"));+ const heading = document.createElement("div");+ heading.className = "sm-channel-heading";+ heading.append(bar.querySelector(".shell-title"), bar.querySelector(".shell-context"));+ bar.querySelector(".shell-spacer")?.remove();+ bar.prepend(toolbar, heading);const loading = document.createElement("div");loading.className = "loadingline";loading.textContent = "Loading messages...";@@ -16439,16 +18137,13 @@const stateNow = urlToState();if (view !== "slack" || stateNow.container !== container) return;root.textContent = "";- const rawFeed = document.createElement("div");- rawFeed.className = "sm-rawfeed";const rawLink = document.createElement("a");rawLink.href = "/api/slack-mirror/messages?container=" + encodeURIComponent(container);rawLink.target = "_blank";rawLink.rel = "noopener";rawLink.textContent = "Raw feed ↗";rawLink.title = "Open the raw mirrored JSON rows for this container in a new tab";- rawFeed.appendChild(rawLink);- root.appendChild(rawFeed);+ $("shellbar").querySelector(".sm-toolbar").appendChild(rawLink);const stream = document.createElement("div");stream.className = "sm-stream";const dayOf = (m) => new Date(m.createdAt).toDateString();@@ -16636,7 +18331,7 @@prev.className = "badges";prev.appendChild(judgmentBadge(j.decision));const txt = document.createElement("span");- txt.className = "pill";+ txt.className = "pill judgment-reason";txt.textContent = j.reason || (j.decision === "fastlane" ? "@mention, routed past the judge" : "None");prev.appendChild(txt);if (j.latencyMs != null) {@@ -18161,6 +19856,7 @@let scopeWrap = null;if (index) {scopeWrap = document.createElement("div");+ scopeWrap.className = "file-scope-index";scopeWrap.appendChild(scopeIndexList(all, {latestOf: (f) => f.createdAt || 0,@@ -18178,6 +19874,7 @@}const fileWrap = document.createElement("div");fileWrap.append(list, ...(searchWrap ? [searchWrap] : []), noMatch);+ const uploadBox = fileUploadBox();wireScopeSearch({key: "files",indexWrap: scopeWrap,@@ -18197,11 +19894,11 @@},}),title: index ? VIEW_TITLE.files : shortName(scope),- count: files.length ? plural(files.length, "file") + (capped ? ", newest shown" : "") : "",+ actions: [uploadBox],+ count: files.length ? plural(files.length, "file") : "",},placeholder: index ? "Search all files…" : "Search files…",});- root.appendChild(fileUploadBox());const card = bareDataCard(fileWrap);if (scopeWrap) card.querySelector(".body").prepend(scopeWrap);root.appendChild(card);diff --git a/plugins/admin/src/index.ts b/plugins/admin/src/index.tsindex 0f563d30e..b7fb9dcf2 100644--- a/plugins/admin/src/index.ts+++ b/plugins/admin/src/index.ts@@ -28,12 +28,17 @@ function signedHeaders(method: string, corePath: string, rawBody: string): Recorreturn signedRequestHeaders(CORE_SIGNING_SECRET, method, corePath, rawBody, { "content-type": "application/json" });}-const BASE_HTML = readFileSync(- join(dirname(fileURLToPath(import.meta.url)), "../public/index.html"),- "utf8",-).replaceAll("__ADMIN_BASE__", () => ADMIN_BASE_PATH);+const BASE_HTML = readFileSync(join(dirname(fileURLToPath(import.meta.url)), "../public/index.html"), "utf8")+ .replaceAll("__ADMIN_BASE__", () => ADMIN_BASE_PATH)+ .replace(+ "<style data-admin-components></style>",+ () =>+ "<style data-admin-components>" ++ readFileSync(join(dirname(fileURLToPath(import.meta.url)), "../public/admin-components.css"), "utf8") ++ "</style>",+ );const BRAND_MARK = readFileSync(join(dirname(fileURLToPath(import.meta.url)), "../public/brand-mark.svg"));-const ADMIN_SCRIPT = BASE_HTML.match(/<script>([\s\S]*?)<\/script>/)?.[1] ?? "";+const ADMIN_SCRIPT = BASE_HTML.match(/<script>([\s\S]*?)<\/script>/i)?.[1] ?? "";const ADMIN_CSP = ["default-src 'self'",`script-src 'sha256-${createHash("sha256").update(ADMIN_SCRIPT).digest("base64")}'`,diff --git a/plugins/admin/test/branding.test.ts b/plugins/admin/test/branding.test.tsindex 7dccbeeb9..51b37717a 100644--- a/plugins/admin/test/branding.test.ts+++ b/plugins/admin/test/branding.test.ts@@ -1,4 +1,5 @@import { test } from "node:test";+import { createHash } from "node:crypto";import assert from "node:assert/strict";import { readFileSync } from "node:fs";import { createServer, type IncomingMessage } from "node:http";@@ -90,3 +91,15 @@ test("the brand icon is a CSS variable the org can point at its own image", () =assert.match(shell, /id="branding-mark-url"/, "the admin form can set it");assert.match(shell, /markUrl: \$\("branding-mark-url"\)\.value\.trim\(\)/, "and saves it with the rest of branding");});++test("design system routes embed the shared component library and retain the script CSP", async () => {+ const response = await fetch(base + "/design-system");+ assert.equal(response.status, 200);+ const html = await response.text();+ const css = readFileSync(new URL("../public/admin-components.css", import.meta.url), "utf8");+ assert.ok(html.includes("<style data-admin-components>" + css + "</style>"));+ const script = html.match(/<script>([\s\S]*?)<\/script>/i)?.[1];+ assert.ok(script);+ const hash = createHash("sha256").update(script).digest("base64");+ assert.ok(response.headers.get("content-security-policy")?.includes("sha256-" + hash));+});diff --git a/plugins/admin/test/default-view.test.ts b/plugins/admin/test/default-view.test.tsindex 9b655fada..1a930f51e 100644--- a/plugins/admin/test/default-view.test.ts+++ b/plugins/admin/test/default-view.test.ts@@ -1,6 +1,7 @@import assert from "node:assert/strict";import { readFileSync } from "node:fs";import test from "node:test";+import vm from "node:vm";const html = readFileSync(new URL("../public/index.html", import.meta.url), "utf8");@@ -33,7 +34,7 @@ test("admin shell uses the QM identity with org-injectable branding", () => {assert.match(html, /<title>QM Admin<\/title>/);assert.match(html, /<meta name="brand-self-label" content="QM" \/>/);assert.match(html, /<header class="top">/);- assert.match(html, /id="home-link">← Back to home<\/a>/);+ assert.match(html, /id="home-link">[\s\S]*?<span>Back to home<\/span>\s*<\/a>/);assert.match(html, /<span class="brand-mark" aria-hidden="true"><\/span>/);assert.match(html,@@ -46,10 +47,15 @@ test("admin shell uses the QM identity with org-injectable branding", () => {});test("admin shell groups control, logs, and artifacts like the reorganization", () => {- assert.match(- html,- /const SECTIONS = \[\s*\{ views: \["governance", "models", "credentials", "connectors", "customize", "users"\] \},\s*\{ label: "Logs", views: \["history", "slack", "judgments", "errors", "audit", "egress", "metrics"\] \},\s*\{ label: "Artifacts", views: \["files", "skills", "memory", "deployments", "crons", "retention"\] \},\s*\];/,- );+ const sections = html.match(/const SECTIONS = (\[[\s\S]*?\n {6}\]);/)?.[1];+ assert.ok(sections);+ const actual = JSON.parse(JSON.stringify(vm.runInNewContext(sections)));+ assert.deepEqual(actual, [+ { views: ["governance", "models", "credentials", "connectors", "customize", "users"] },+ { label: "Logs", views: ["history", "slack", "judgments", "errors", "audit", "egress", "metrics"] },+ { label: "Artifacts", views: ["files", "skills", "memory", "deployments", "crons", "retention"] },+ { views: ["design-system"] },+ ]);assert.match(html, /history: "Sessions"/);assert.match(html,@@ -226,7 +232,7 @@ test("control-plane pages use the shared web UI canvas without redundant page inassert.match(html, /id="slack-token-editor"/);assert.match(html, /id="soul-preview"/);assert.match(html, /body\[data-subview="connectors"\] \.shellbar/);- assert.match(html, /connectorTip\.className = "connector-dm-tip hidden"/);+ assert.match(html, /connectorTip\.className = "connector-dm-tip admin-notice hidden"/);assert.doesNotMatch(html, /First match wins/);assert.doesNotMatch(html, /direct mutations blocked/);assert.doesNotMatch(html, /The org setting is a minimum/);@@ -238,7 +244,6 @@ test("governance renders simple settings as compact rows with contextual actions"card-security-posture","card-sharing-posture","card-external-slack",- "card-base-model","card-people-directory","card-turn-wall-clock",]) {@@ -431,7 +436,7 @@ test("governance SOUL workbench shows draft diff, history, and conflict-safe res});test("the hidden utility hides an element whose component rule is declared later", () => {- assert.match(html, /<aside class="environment-notice hidden" id="environment-notice"/);+ assert.match(html, /<aside class="environment-notice admin-notice hidden" id="environment-notice"/);assert.match(html, /notice\.classList\.toggle\("hidden", !attachment\)/);assert.equal(resolvedDisplay(["environment-notice"]), "flex");assert.equal(resolvedDisplay(["environment-notice", "hidden"]), "none");@@ -547,7 +552,7 @@ test("governance follows the neutral web UI interaction palette", () => {assert.match(html, /\.viewlink \{[\s\S]*?color: var\(--muted\)/);assert.match(html,- /\.posture-choice:has\(input:checked\) \{\s*border-color: var\(--border\);\s*background: var\(--subtle\)/,+ /\.posture-choice:has\(input:checked\) \{\s*border-color: transparent;\s*background: color-mix\(in srgb, var\(--text\) 4%, transparent\)/,);});diff --git a/plugins/admin/test/errors-view.test.ts b/plugins/admin/test/errors-view.test.tsindex 79e72d661..24d69f7d5 100644--- a/plugins/admin/test/errors-view.test.ts+++ b/plugins/admin/test/errors-view.test.ts@@ -59,39 +59,53 @@ test("error rows preserve full text and link to the owning scope and session", (const result = render(true, [{ ts: 123, category: "turn", code: "failed", message, scopeLabel: "personal:alice", sessionId: "session-1" },]);- assert.deepEqual(result.headers, ["Time", "Category", "Code", "Message", "Scope", "Session"]);- const details = result.rows[0][3].node;+ assert.deepEqual(result.headers, ["Category", "Code", "Message", "Scope", "Session", "Time"]);+ const details = result.rows[0][2].node;assert.equal(details.tag, "details");const [preview, full] = details.children[0].children;assert.equal(preview.textContent, message.split("\n")[0]);assert.equal(full.tag, "span");assert.equal(full.textContent, message);assert.equal(full.innerHTML, undefined);- assert.deepEqual(result.rows[0][4].node.target, { view: "errors", scope: "personal:alice" });- assert.deepEqual(result.rows[0][5].node.target, { view: "history", scope: "personal:alice", session: "session-1" });+ assert.deepEqual(result.rows[0][3].node.target, { view: "errors", scope: "personal:alice" });+ assert.deepEqual(result.rows[0][4].node.target, { view: "history", scope: "personal:alice", session: "session-1" });});test("scope errors omit the scope column and errors without sessions have no session link", () => {const result = render(false, [{ ts: 123, scopeLabel: "org:acme", message: "failure" }]);assert.equal(result.headers.includes("Scope"), false);- assert.deepEqual(result.rows[0].at(-1), { text: "—" });+ assert.deepEqual(result.rows[0].at(-2), { text: "—" });assert.equal(render(false, []).empty, "No errors recorded for this scope.");assert.equal(render(true, []).empty, "No errors recorded.");});test("system attribution stays readable without creating an invalid scope link", () => {const result = render(true, [{ ts: 123, scopeLabel: "runs:reaper", message: "requeued", sessionId: "s1" }]);- assert.deepEqual(result.rows[0][4], { text: "runs:reaper" });- assert.deepEqual(result.rows[0][5].node.target, { view: "history", scope: "org:acme", session: "s1" });+ assert.deepEqual(result.rows[0][3], { text: "runs:reaper" });+ assert.deepEqual(result.rows[0][4].node.target, { view: "history", scope: "org:acme", session: "s1" });});-test("short messages have no disclosure and long messages retain their full text", () => {- const short = render(true, [{ message: "Timed out" }]).rows[0][3].node;- assert.equal(short.tag, "div");- assert.equal(short.textContent, "Timed out");- assert.equal(short.children.length, 0);+test("short and long messages retain an expandable full value", () => {+ const short = render(true, [{ message: "Timed out" }]).rows[0][2].node;+ assert.equal(short.tag, "details");+ assert.equal(short.children[0].children[1].textContent, "Timed out");const message = "x".repeat(200);- const long = render(true, [{ message }]).rows[0][3].node;+ const long = render(true, [{ message }]).rows[0][2].node;assert.equal(long.tag, "details");assert.equal(long.children[0].children[1].textContent, message);});++test("compact messages retain an expandable full value even below the character limit", () => {+ const message = "A message that may wrap beyond two lines in a narrow column.";+ const details = render(true, [{ message }]).rows[0][2].node;+ assert.equal(details.tag, "details");+ assert.equal(details.children[0].children[1].textContent, message);+});++test("compact errors place timestamps last for org and scoped tables", () => {+ for (const all of [true, false]) {+ const result = render(all, [{ ts: 123, message: "Failed" }]);+ assert.deepEqual(result.headers, ["Category", "Code", "Message", ...(all ? ["Scope"] : []), "Session", "Time"]);+ assert.equal(result.rows[0].at(-1), 123);+ }+});diff --git a/plugins/admin/test/history-urls.test.ts b/plugins/admin/test/history-urls.test.tsindex f6de940bb..0a3389921 100644--- a/plugins/admin/test/history-urls.test.ts+++ b/plugins/admin/test/history-urls.test.ts@@ -26,7 +26,7 @@ function routerAt(pathname: string, search = "", base = "/admin") {);return factory(base,- new Set(["history", "files", "memory", "live", "audit", "errors", "skills", "crons", "deployments"]),+ new Function(`${html.match(/const SCOPED = new Set\(\[[\s\S]*?\]\);/)?.[0]}; return SCOPED;`)(),["connectors","history",@@ -196,3 +196,57 @@ test("Slack setup links select connectors and preserve the guide through canonicassert.equal(stateToUrl({ view: "connectors" }), "/admin/connectors");assert.equal(stateToUrl({ view: "files", setup: "slack" }), "/admin/files");});++test("navigation drops retired design parameters while retaining route state", () => {+ const { stateToUrl } = routerAt("/admin/history", "?variant=original");+ assert.equal(+ stateToUrl({ view: "history", scope: SCOPE, session: "sess-1", turn: 4 }),+ "/admin/history/s/sess-1?turn=4",+ );+ assert.equal(stateToUrl({ view: "files", scope: SCOPE }), `/admin/files?scope=${SCOPE_ENC}`);+});++for (const base of ["", "/admin", "/control"]) {+ test(`catalog live links use the configured base (${base || "root"})`, () => {+ const root = { innerHTML: "" };+ const helpers = html.slice(+ html.indexOf(" function designSpec("),+ html.indexOf(" let designLibraryRendered"),+ );+ const start = html.indexOf(' const root = $("view-design");');+ const end = html.indexOf(' const contents = document.createElement("nav");', start);+ assert.ok(start >= 0 && end > start);+ new Function("$", "DESIGN_TOKENS", helpers + html.slice(start, end))(() => root, []);+ const section = root.innerHTML.match(/<div class="design-page-links">([\s\S]*?)<\/div>/)?.[1];+ assert.ok(section);+ const links = [...section.matchAll(/<a data-design-view="([^"]+)">/g)].map((match) => ({+ dataset: { designView: match[1] },+ href: "",+ }));+ assert.deepEqual(+ links.map((link) => link.dataset.designView),+ ["governance", "skills", "files", "history", "metrics", "audit", "egress"],+ );+ const bindStart = html.indexOf(' root.querySelectorAll(".design-page-links a")');+ const bindEnd = html.indexOf(" });", bindStart) + " });".length;+ assert.ok(bindStart >= 0 && bindEnd > bindStart);+ const { stateToUrl } = routerAt(`${base}/design-system`, "", base);+ new Function("root", "stateToUrl", "scope", html.slice(bindStart, bindEnd))(+ { querySelectorAll: () => links },+ stateToUrl,+ SCOPE,+ );+ assert.deepEqual(+ links.map((link) => link.href),+ [+ `${base}/governance?scope=${SCOPE_ENC}`,+ `${base}/skills?scope=${SCOPE_ENC}`,+ `${base}/files?scope=${SCOPE_ENC}`,+ `${base}/history/scopes/${SCOPE_ENC}`,+ `${base}/metrics?scope=${SCOPE_ENC}`,+ `${base}/audit?scope=${SCOPE_ENC}`,+ `${base}/egress?scope=${SCOPE_ENC}`,+ ],+ );+ });+}diff --git a/plugins/admin/test/slack-rendering.test.ts b/plugins/admin/test/slack-rendering.test.tsnew file mode 100644index 000000000..1445c4c2f--- /dev/null+++ b/plugins/admin/test/slack-rendering.test.ts@@ -0,0 +1,99 @@+import assert from "node:assert/strict";+import { readFileSync } from "node:fs";+import test from "node:test";+import vm from "node:vm";++const html = readFileSync(new URL("../public/index.html", import.meta.url), "utf8");+const source = html.slice(+ html.indexOf(" function slackUnescape("),+ html.indexOf(" function slackAuthorLabel("),+);++class RenderNode {+ children: RenderNode[] = [];+ value = "";+ href?: string;+ target?: string;+ rel?: string;+ tag: string;+ constructor(tag: string) {+ this.tag = tag;+ }+ appendChild(node: RenderNode) {+ this.children.push(node);+ return node;+ }+ set textContent(value: string) {+ this.value = value;+ this.children = [];+ }+ get textContent(): string {+ return this.value + this.children.map((node) => node.textContent).join("");+ }+ find(tag: string): RenderNode[] {+ return [...(this.tag === tag ? [this] : []), ...this.children.flatMap((node) => node.find(tag))];+ }+}++function render(text: string) {+ const context = vm.createContext({+ SLACK_EMOJI: { wave: "👋" },+ document: {+ createElement: (tag: string) => new RenderNode(tag),+ createDocumentFragment: () => new RenderNode("fragment"),+ createTextNode: (value: string) => {+ const node = new RenderNode("text");+ node.textContent = value;+ return node;+ },+ },+ text,+ });+ vm.runInContext(source, context);+ return vm.runInContext('slackParseText(text, { UEXAMPLE: "Alex" })', context) as RenderNode;+}++test("Slack messages format quotes, safe links, and mentions without dropping prose", () => {+ const result = render(+ "Before\n> First quoted line\n> Second quoted line\nAfter <@UEXAMPLE> :wave:\nhttps://example.com/report.",+ );+ assert.equal(result.find("blockquote").length, 1);+ assert.equal(result.find("blockquote")[0].textContent, "First quoted line\nSecond quoted line");+ assert.match(result.textContent, /^Before/);+ assert.match(result.textContent, /After @Alex 👋\nhttps:\/\/example.com\/report\.$/);+ const [link] = result.find("a");+ assert.equal(link.href, "https://example.com/report");+ assert.equal(link.target, "_blank");+ assert.equal(link.rel, "noopener");+});++test("Slack message content cannot create executable elements or unsafe links", () => {+ const result = render(+ "<javascript:alert(1)|unsafe> <img src=x onerror=alert(1)> <script>\n```\n> quoted code https://example.com\n```\n`https://example.com/inline`",+ );+ assert.equal(result.find("a").length, 0);+ assert.equal(result.find("script").length, 0);+ assert.equal(result.find("img").length, 0);+ assert.equal(result.find("blockquote").length, 0);+ assert.equal(result.find("pre")[0].textContent, "> quoted code https://example.com");+ assert.equal(result.find("code")[1].textContent, "https://example.com/inline");+ assert.match(result.textContent, /unsafe/);+});++test("Slack links exclude surrounding punctuation and preserve parentheses inside a URL", () => {+ const result = render("See (https://example.com/report). Also https://example.com/wiki/Example_(topic).");+ assert.deepEqual(+ result.find("a").map((node) => node.href),+ ["https://example.com/report", "https://example.com/wiki/Example_(topic)"],+ );+ assert.equal(result.textContent, "See (https://example.com/report). Also https://example.com/wiki/Example_(topic).");+});++test("Slack inline markup preserves emphasis, named links, and prose", () => {+ const result = render("Before *bold* _italic_ ~removed~ <https://example.com|Named link> after");+ assert.equal(result.find("strong")[0].textContent, "bold");+ assert.equal(result.find("em")[0].textContent, "italic");+ assert.equal(result.find("s")[0].textContent, "removed");+ assert.equal(result.find("a")[0].textContent, "Named link");+ assert.equal(result.textContent, "Before bold italic removed Named link after");+});diff --git a/plugins/admin/test/user-invite-placement.test.ts b/plugins/admin/test/user-invite-placement.test.tsindex 1c434df14..48be0ffcb 100644--- a/plugins/admin/test/user-invite-placement.test.ts+++ b/plugins/admin/test/user-invite-placement.test.ts@@ -18,7 +18,7 @@ class Container {}}-test("external invitation controls and feedback belong to External users, not the activity roster", () => {+test("external invitation controls stay in External users", () => {const start = html.indexOf("const usersCard = dataCard(");const end = html.indexOf("\n };\n drawLists();", start);assert.ok(start >= 0 && end > start);@@ -32,7 +32,10 @@ test("external invitation controls and feedback belong to External users, not thconst body = new Container();body.append(content);cards.set(title, { heading, body });- return { querySelector: (selector: string) => (selector === ".head h2" ? heading : body) };+ return {+ classList: { add() {} },+ querySelector: (selector: string) => (selector === ".head h2" || selector === ".head" ? heading : body),+ };},actionTable: () => ({}),lists: new Container(),