dsh-charter 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +61 -1
- package/CHANGELOG.zh.md +51 -1
- package/CONTRIBUTING.md +12 -2
- package/CONTRIBUTING.zh.md +9 -2
- package/README.md +50 -20
- package/README.zh.md +39 -17
- package/docs/README.md +7 -3
- package/docs/README.zh.md +5 -3
- package/docs/assets/charter-pane.zh.png +0 -0
- package/docs/design/charter-dependency-graph-v1.zh.md +1101 -0
- package/docs/design/charter-design-v1.md +7 -3
- package/docs/design/charter-design-v1.zh.md +14 -1
- package/docs/design/charter-workspace-v2.zh.md +20 -3
- package/docs/design/version-roadmap.md +9 -9
- package/docs/design/version-roadmap.zh.md +18 -14
- package/docs/release-notes/0.2.0.md +7 -7
- package/docs/release-notes/0.2.1.md +58 -0
- package/docs/release-notes/0.2.2.md +60 -0
- package/docs/release-notes/README.md +1 -2
- package/docs/releasing.md +12 -7
- package/docs/releasing.zh.md +10 -7
- package/docs/user-guide.md +48 -22
- package/docs/user-guide.zh.md +43 -18
- package/docs/verification.md +40 -28
- package/docs/verification.zh.md +31 -24
- package/lib/client/DependencyGraph.d.ts +19 -0
- package/lib/client/locales.d.ts +97 -19
- package/lib/client/relation-graph.d.ts +135 -0
- package/lib/client/store.d.ts +5 -0
- package/lib/client.js +2552 -496
- package/lib/core/change-set.d.ts +7 -0
- package/lib/core/dependencies.d.ts +29 -0
- package/lib/core.js +1 -1
- package/lib/{fork-D5HVDV1i.js → fork-KSL6sovw.js} +70 -1
- package/lib/host/domain.d.ts +50 -0
- package/lib/host/service.d.ts +18 -1
- package/lib/host/types.d.ts +37 -1
- package/lib/index.js +2 -2
- package/lib/remote/service.d.ts +8 -1
- package/lib/remote/wire.d.ts +161 -3
- package/lib/remote.js +155 -4
- package/lib/{service-C3A59BG5.js → service-MsIACddZ.js} +186 -5
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -3,7 +3,7 @@ window.__ModuleLoader__.load({
|
|
|
3
3
|
factory: (require) => {
|
|
4
4
|
var module = { exports: {} };
|
|
5
5
|
var exports = module.exports;
|
|
6
|
-
const __charterCss = ".charter-root {\n --charter-border: var(--dsw-alias-border-l2, #7f7f7f38);\n --charter-border-soft: var(--dsw-alias-border-l1, #7f7f7f24);\n --charter-surface: var(--dsw-alias-bg-layer-1, #7f7f7f0e);\n --charter-surface-2: var(--dsw-alias-bg-layer-2, #7f7f7f16);\n --charter-brand: var(--dsw-alias-brand-primary, #3978d4);\n --charter-brand-fill: var(--dsw-alias-button-primary-fill, #3978d4);\n --charter-brand-fill-hover: var(--dsw-alias-button-primary-hover, var(--charter-brand-fill));\n --charter-brand-label: var(--dsw-alias-label-primary-foreground, #fff);\n --charter-danger: var(--dsw-alias-state-error-primary, #d14343);\n --charter-warn: var(--dsw-alias-state-warn-primary, #b7791f);\n --charter-success: var(--dsw-alias-state-success-primary, #2f8a5b);\n --charter-radius: 10px;\n --charter-ease: var(--ds-ease-in-out, ease-in-out);\n --charter-duration: var(--ds-transition-duration, .18s);\n box-sizing: border-box;\n width: 100%;\n min-height: 100%;\n color: var(--dsw-alias-label-primary, inherit);\n background: var(--dsw-alias-bg-base, transparent);\n font-family: var(--dsw-font-family, inherit);\n font-size: var(--dsh-content-font-size, 13px);\n line-height: 1.5;\n overflow-x: hidden;\n container-type: inline-size;\n}\n\n.charter-root *, .charter-root :before, .charter-root :after {\n box-sizing: border-box;\n}\n\n.charter-shell {\n width: 100%;\n max-width: 1100px;\n margin: 0 auto;\n padding: clamp(20px, 3.5vw, 34px) clamp(16px, 3.5vw, 40px) clamp(72px, 12vh, 120px);\n}\n\n.charter-pagehead {\n border: 1px solid color-mix(in srgb, var(--charter-brand) 18%, var(--charter-border));\n background: radial-gradient(130% 190% at 0% 0%, color-mix(in srgb, var(--charter-brand) 9%, transparent), transparent 58%),\n var(--charter-surface);\n border-radius: 12px;\n justify-content: space-between;\n align-items: flex-start;\n gap: 20px;\n margin-bottom: 14px;\n padding: 18px 20px;\n display: flex;\n}\n\n.charter-heading {\n align-items: flex-start;\n gap: 14px;\n min-width: 0;\n display: flex;\n}\n\n.charter-heading__copy {\n min-width: 0;\n}\n\n.charter-mark {\n width: 44px;\n height: 44px;\n filter: drop-shadow(0 4px 10px color-mix(in srgb, var(--charter-brand) 22%, transparent));\n flex: none;\n margin-top: 1px;\n display: block;\n}\n\n.charter-mark svg {\n width: 100%;\n height: 100%;\n display: block;\n}\n\n.charter-eyebrow, .charter-kicker {\n color: var(--dsw-alias-label-secondary, #777);\n letter-spacing: .075em;\n text-transform: uppercase;\n font-size: 10.5px;\n font-weight: 650;\n line-height: 1.4;\n display: block;\n}\n\n.charter-pagehead h2 {\n letter-spacing: -.025em;\n margin: 0;\n font-size: 26px;\n font-weight: 600;\n line-height: 1.15;\n}\n\n.charter-subtitle {\n max-width: 58ch;\n color: var(--dsw-alias-label-secondary, #777);\n margin: 7px 0 0;\n font-size: 13px;\n line-height: 1.5;\n}\n\n.charter-headside {\n flex: none;\n justify-items: end;\n gap: 9px;\n min-width: 190px;\n display: grid;\n}\n\n.charter-chips {\n flex-wrap: wrap;\n justify-content: flex-end;\n gap: 5px;\n display: flex;\n}\n\n.charter-meter {\n width: min(230px, 30vw);\n color: var(--dsw-alias-label-secondary, #777);\n font-variant-numeric: tabular-nums;\n text-align: right;\n gap: 4px;\n font-size: 10.5px;\n display: grid;\n}\n\n.charter-meter__track {\n background: color-mix(in srgb, var(--dsw-alias-label-secondary, #777) 16%, transparent);\n border-radius: 999px;\n width: 100%;\n height: 3px;\n display: block;\n overflow: hidden;\n}\n\n.charter-meter__fill {\n border-radius: inherit;\n background: var(--charter-brand);\n height: 100%;\n transition: width var(--charter-duration) var(--charter-ease), background-color var(--charter-duration) var(--charter-ease);\n display: block;\n}\n\n.charter-meter.is-warn {\n color: var(--charter-warn);\n}\n\n.charter-meter.is-warn .charter-meter__fill {\n background: var(--charter-warn);\n}\n\n.charter-meter.is-over {\n color: var(--charter-danger);\n font-weight: 600;\n}\n\n.charter-meter.is-over .charter-meter__fill {\n background: var(--charter-danger);\n}\n\n.charter-card {\n border: 1px solid var(--charter-border);\n border-radius: var(--charter-radius);\n background: var(--charter-surface);\n min-width: 0;\n margin-bottom: 12px;\n padding: 14px 16px;\n}\n\n.charter-cardhead {\n justify-content: space-between;\n align-items: flex-start;\n gap: 12px;\n min-width: 0;\n display: flex;\n}\n\n.charter-cardtitle {\n min-width: 0;\n}\n\n.charter-cardtitle h3 {\n margin: 2px 0 0;\n font-size: 14px;\n font-weight: 600;\n line-height: 1.45;\n}\n\n.charter-cardtools {\n flex: none;\n align-items: center;\n gap: 8px;\n display: flex;\n}\n\n.charter-count {\n border: 1px solid var(--charter-border);\n min-width: 22px;\n height: 22px;\n color: var(--dsw-alias-label-secondary, #777);\n background: var(--charter-surface-2);\n font-variant-numeric: tabular-nums;\n border-radius: 999px;\n justify-content: center;\n align-items: center;\n padding: 0 7px;\n font-size: 11px;\n font-weight: 600;\n display: inline-flex;\n}\n\n.charter-objective h3 {\n max-width: 68ch;\n font-size: 15px;\n font-weight: 550;\n line-height: 1.55;\n}\n\n.charter-original {\n max-width: 72ch;\n color: var(--dsw-alias-label-secondary, #777);\n margin: 8px 0 0;\n font-size: 11.5px;\n line-height: 1.5;\n}\n\n.charter-copy {\n max-width: 72ch;\n color: var(--dsw-alias-label-secondary, #777);\n margin: 8px 0 0;\n font-size: 12px;\n line-height: 1.55;\n}\n\n.charter-source {\n border: 1px solid var(--charter-border-soft);\n color: var(--dsw-alias-label-secondary, #777);\n background: var(--charter-surface-2);\n border-radius: 999px;\n margin-top: 6px;\n padding: 1px 7px;\n font-size: 10.5px;\n display: inline-block;\n}\n\n.charter-columns {\n grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);\n align-items: start;\n gap: 12px;\n display: grid;\n}\n\n.charter-columns > .charter-card {\n margin-bottom: 0;\n}\n\n.charter-tag {\n color: var(--dsw-alias-label-secondary, #777);\n background: var(--charter-surface-2);\n white-space: nowrap;\n border: 1px solid #0000;\n border-radius: 999px;\n align-items: center;\n gap: 4px;\n padding: 1px 7px;\n font-size: 10.5px;\n line-height: 1.6;\n display: inline-flex;\n}\n\n.charter-tag--info {\n border-color: color-mix(in srgb, var(--charter-brand) 28%, transparent);\n color: var(--charter-brand);\n background: color-mix(in srgb, var(--charter-brand) 8%, transparent);\n}\n\n.charter-tag--success {\n border-color: color-mix(in srgb, var(--charter-success) 26%, transparent);\n color: var(--charter-success);\n background: color-mix(in srgb, var(--charter-success) 8%, transparent);\n}\n\n.charter-tag--warning {\n border-color: color-mix(in srgb, var(--charter-warn) 28%, transparent);\n color: var(--charter-warn);\n background: color-mix(in srgb, var(--charter-warn) 8%, transparent);\n}\n\n.charter-tag--danger {\n border-color: color-mix(in srgb, var(--charter-danger) 28%, transparent);\n color: var(--charter-danger);\n background: color-mix(in srgb, var(--charter-danger) 8%, transparent);\n}\n\n.charter-notice {\n border: 1px solid var(--charter-border);\n color: var(--dsw-alias-label-secondary, #777);\n background: var(--charter-surface-2);\n border-radius: 8px;\n margin-bottom: 12px;\n padding: 8px 11px;\n font-size: 12px;\n line-height: 1.5;\n}\n\n.charter-notice--warning {\n border-color: color-mix(in srgb, var(--charter-warn) 30%, var(--charter-border));\n background: color-mix(in srgb, var(--charter-warn) 7%, var(--charter-surface));\n}\n\n.charter-notice--danger {\n border-color: color-mix(in srgb, var(--charter-danger) 32%, var(--charter-border));\n color: var(--charter-danger);\n background: color-mix(in srgb, var(--charter-danger) 7%, var(--charter-surface));\n}\n\n.charter-list {\n flex-direction: column;\n margin-top: 8px;\n display: flex;\n}\n\n.charter-item {\n transition: background-color var(--charter-duration) var(--charter-ease);\n border-radius: 7px;\n flex-direction: column;\n gap: 2px;\n margin: 0 -6px;\n padding: 9px 6px;\n display: flex;\n position: relative;\n}\n\n.charter-item + .charter-item {\n border-top: 1px solid var(--charter-border-soft);\n}\n\n.charter-item:hover {\n background: var(--dsw-alias-interactive-bg-hover, #7f7f7f14);\n}\n\n.charter-item:focus-visible {\n outline: 2px solid var(--charter-brand);\n outline-offset: -2px;\n}\n\n.charter-item__hint {\n color: var(--dsw-alias-label-tertiary, #999);\n font-size: 10.5px;\n line-height: 1.45;\n}\n\n.charter-item--inactive {\n opacity: .72;\n}\n\n.charter-item__main {\n align-items: flex-start;\n gap: 8px;\n min-width: 0;\n display: flex;\n}\n\n.charter-item__copy {\n flex: 1;\n gap: 3px;\n min-width: 0;\n display: grid;\n}\n\n.charter-item__text {\n overflow-wrap: anywhere;\n color: var(--dsw-alias-label-primary, inherit);\n font-size: 12.5px;\n line-height: 1.55;\n}\n\n.charter-item__meta {\n flex-wrap: wrap;\n align-items: center;\n gap: 4px;\n display: flex;\n}\n\n.charter-item__bytes {\n color: var(--dsw-alias-label-tertiary, #999);\n font-variant-numeric: tabular-nums;\n white-space: nowrap;\n font-size: 10px;\n}\n\n.charter-item__actions {\n z-index: 2;\n border: 1px solid var(--charter-border-soft);\n background: color-mix(in srgb, var(--dsw-alias-bg-base, #fff) 92%, transparent);\n box-shadow: 0 2px 8px color-mix(in srgb, var(--dsw-alias-label-primary, #000) 7%, transparent);\n backdrop-filter: blur(5px);\n opacity: 0;\n pointer-events: none;\n transition: opacity var(--charter-duration) var(--charter-ease);\n border-radius: 7px;\n flex-wrap: nowrap;\n gap: 1px;\n padding: 2px 4px;\n display: flex;\n position: absolute;\n top: 4px;\n right: 4px;\n}\n\n.charter-item:hover .charter-item__actions, .charter-item:focus-within .charter-item__actions {\n opacity: 1;\n pointer-events: auto;\n}\n\n.charter-state-mark {\n background: var(--dsw-alias-label-tertiary, #999);\n border-radius: 50%;\n flex: none;\n width: 7px;\n height: 7px;\n margin-top: 6px;\n display: block;\n}\n\n.charter-state-mark--done {\n background: var(--charter-success);\n}\n\n.charter-state-mark--warning {\n background: var(--charter-warn);\n}\n\n.charter-state-mark--ongoing {\n background: var(--charter-brand);\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--charter-brand) 14%, transparent);\n}\n\n.charter-progress {\n color: var(--dsw-alias-label-secondary, #777);\n align-items: center;\n gap: 6px;\n margin: 5px 0 0 15px;\n font-size: 10.5px;\n display: flex;\n}\n\n.charter-progress select {\n border: 1px solid var(--charter-border);\n height: auto;\n min-height: 23px;\n color: var(--dsw-alias-label-primary, inherit);\n background: var(--charter-surface-2);\n font: inherit;\n border-radius: 5px;\n padding: 0 5px;\n font-size: 10.5px;\n}\n\n.charter-empty {\n border: 1px dashed var(--charter-border);\n color: var(--dsw-alias-label-tertiary, #999);\n text-align: center;\n border-radius: 7px;\n margin: 4px 0;\n padding: 12px 10px;\n font-size: 11.5px;\n}\n\n.charter-add {\n border: 1px solid var(--charter-border);\n background: var(--charter-surface-2);\n transition: border-color var(--charter-duration) var(--charter-ease), box-shadow var(--charter-duration) var(--charter-ease);\n border-radius: 8px;\n gap: 3px;\n margin-top: 9px;\n padding: 7px 8px;\n display: grid;\n}\n\n.charter-add:focus-within {\n border-color: color-mix(in srgb, var(--charter-brand) 55%, var(--charter-border));\n box-shadow: 0 0 0 1px color-mix(in srgb, var(--charter-brand) 32%, transparent);\n}\n\n.charter-add.is-over {\n border-color: color-mix(in srgb, var(--charter-danger) 55%, var(--charter-border));\n}\n\n.charter-add textarea {\n width: 100%;\n min-height: 34px;\n color: inherit;\n font: inherit;\n resize: vertical;\n background: none;\n border: 0;\n outline: 0;\n padding: 2px 3px;\n font-size: 12.5px;\n line-height: 1.5;\n}\n\n.charter-add textarea::placeholder {\n color: var(--dsw-alias-label-tertiary, #999);\n}\n\n.charter-add__foot {\n justify-content: space-between;\n align-items: center;\n gap: 8px;\n display: flex;\n}\n\n.charter-budget {\n color: var(--dsw-alias-label-tertiary, #999);\n font-variant-numeric: tabular-nums;\n white-space: nowrap;\n font-size: 10.5px;\n line-height: 1.4;\n}\n\n.charter-budget.is-over {\n color: var(--charter-danger);\n font-weight: 600;\n}\n\n.charter-button {\n min-height: 27px;\n color: var(--dsw-alias-label-secondary, #777);\n font: inherit;\n white-space: nowrap;\n cursor: pointer;\n transition: color var(--charter-duration) var(--charter-ease), background-color var(--charter-duration) var(--charter-ease), border-color var(--charter-duration) var(--charter-ease);\n background: none;\n border: 1px solid #0000;\n border-radius: 7px;\n padding: 3px 9px;\n font-size: 11.5px;\n font-weight: 550;\n line-height: 1.4;\n}\n\n.charter-button:hover:not(:disabled) {\n color: var(--dsw-alias-label-primary, inherit);\n background: var(--dsw-alias-interactive-bg-hover, #7f7f7f1a);\n}\n\n.charter-button:focus-visible, .charter-progress select:focus-visible, .charter-bootstrap textarea:focus-visible, .charter-editor__input:focus-visible, .charter-editor__reason:focus-visible {\n outline: 2px solid var(--charter-brand);\n outline-offset: 1px;\n}\n\n.charter-button:disabled {\n cursor: not-allowed;\n opacity: .42;\n}\n\n.charter-button--outline {\n border-color: var(--charter-border);\n background: var(--charter-surface-2);\n}\n\n.charter-button--primary {\n color: var(--charter-brand-label);\n background: var(--charter-brand-fill);\n border-color: #0000;\n}\n\n.charter-button--primary:hover:not(:disabled) {\n color: var(--charter-brand-label);\n background: var(--charter-brand-fill-hover);\n}\n\n.charter-button--primary:disabled {\n border-color: var(--charter-border);\n color: var(--dsw-alias-label-tertiary, #999);\n background: var(--charter-surface-2);\n opacity: 1;\n}\n\n.charter-inlineeditor {\n border-top: 1px solid var(--charter-border-soft);\n margin-top: 12px;\n padding-top: 12px;\n}\n\n.charter-editor__input, .charter-editor__reason {\n border: 1px solid var(--charter-border);\n width: 100%;\n color: inherit;\n background: var(--dsw-alias-bg-base, transparent);\n font: inherit;\n resize: vertical;\n border-radius: 8px;\n outline: 0;\n padding: 8px 10px;\n font-size: 12.5px;\n line-height: 1.55;\n}\n\n.charter-editor__input {\n min-height: 74px;\n}\n\n.charter-editor__reason {\n min-height: 34px;\n margin-top: 6px;\n}\n\n.charter-editor__actions {\n justify-content: flex-end;\n align-items: center;\n gap: 7px;\n margin-top: 8px;\n display: flex;\n}\n\n.charter-editor__actions .charter-budget {\n margin-right: auto;\n}\n\n.charter-editor__hint {\n color: var(--dsw-alias-label-tertiary, #999);\n margin-top: 5px;\n font-size: 10.5px;\n display: block;\n}\n\n.charter-bootstrap {\n border-color: color-mix(in srgb, var(--charter-brand) 36%, var(--charter-border));\n background: linear-gradient(180deg, color-mix(in srgb, var(--charter-brand) 5%, var(--charter-surface)), var(--charter-surface));\n}\n\n.charter-bootstrap__field, .charter-bootstrap__group {\n gap: 6px;\n margin-top: 12px;\n display: grid;\n}\n\n.charter-bootstrap__field > span:first-child, .charter-bootstrap__group > .charter-kicker {\n color: var(--dsw-alias-label-primary, inherit);\n letter-spacing: 0;\n text-transform: none;\n font-size: 11px;\n font-weight: 600;\n}\n\n.charter-bootstrap textarea {\n border: 1px solid var(--charter-border);\n width: 100%;\n min-height: 46px;\n color: inherit;\n background: var(--dsw-alias-bg-base, transparent);\n font: inherit;\n resize: vertical;\n border-radius: 8px;\n outline: 0;\n padding: 7px 9px;\n font-size: 12px;\n line-height: 1.5;\n}\n\n.charter-bootstrap__item {\n transition: background-color var(--charter-duration) var(--charter-ease);\n border-radius: 7px;\n align-items: flex-start;\n gap: 8px;\n padding: 5px 6px;\n display: flex;\n}\n\n.charter-bootstrap__item:hover {\n background: var(--dsw-alias-interactive-bg-hover, #7f7f7f12);\n}\n\n.charter-bootstrap__item input[type=\"checkbox\"] {\n accent-color: var(--charter-brand);\n flex: none;\n margin-top: 9px;\n}\n\n.charter-draftfield {\n flex: 1;\n gap: 2px;\n min-width: 0;\n display: grid;\n}\n\n.charter-draftfield .charter-budget {\n text-align: right;\n}\n\n.charter-bootstrap__actions {\n border-top: 1px solid var(--charter-border-soft);\n justify-content: flex-end;\n gap: 7px;\n margin-top: 12px;\n padding-top: 10px;\n display: flex;\n}\n\n.charter-empty-state {\n border: 1px dashed var(--charter-border);\n border-radius: var(--charter-radius);\n background: var(--charter-surface);\n gap: 3px;\n margin-bottom: 12px;\n padding: 14px 16px;\n display: grid;\n}\n\n.charter-empty-state h3 {\n margin: 0;\n font-size: 14px;\n font-weight: 600;\n}\n\n.charter-empty-state p {\n max-width: 68ch;\n color: var(--dsw-alias-label-secondary, #777);\n margin: 0;\n font-size: 12px;\n line-height: 1.5;\n}\n\n.charter-centered {\n min-height: 260px;\n color: var(--dsw-alias-label-secondary, #777);\n text-align: center;\n justify-content: center;\n align-items: center;\n gap: 9px;\n display: flex;\n}\n\n.charter-centered .charter-button {\n border-color: var(--charter-border);\n}\n\n.charter-preview {\n margin-top: 12px;\n}\n\n.charter-preview__meta {\n justify-content: space-between;\n align-items: center;\n gap: 10px;\n margin-bottom: 8px;\n display: flex;\n}\n\n.charter-preview__toolbar {\n flex-wrap: wrap;\n align-items: center;\n gap: 5px;\n margin: 0 0 8px;\n display: flex;\n}\n\n.charter-preview__view {\n border: 1px solid var(--charter-border);\n min-height: 26px;\n color: var(--dsw-alias-label-secondary, #777);\n font: inherit;\n cursor: pointer;\n background: none;\n border-radius: 6px;\n padding: 3px 8px;\n font-size: 10.5px;\n}\n\n.charter-preview__view:hover {\n color: var(--dsw-alias-label-primary, inherit);\n background: var(--dsw-alias-interactive-bg-hover, #7f7f7f14);\n}\n\n.charter-preview__view.is-active {\n color: var(--charter-brand);\n border-color: color-mix(in srgb, var(--charter-brand) 45%, var(--charter-border));\n background: color-mix(in srgb, var(--charter-brand) 8%, transparent);\n font-weight: 600;\n}\n\n.charter-preview__view:disabled {\n opacity: .45;\n cursor: default;\n}\n\n.charter-preview pre {\n border: 1px solid var(--charter-border-soft);\n max-height: 300px;\n color: var(--dsw-alias-label-primary, inherit);\n background: var(--charter-surface-2);\n font-family: var(--ds-font-family-code, ui-monospace, SFMono-Regular, Menlo, monospace);\n white-space: pre-wrap;\n overflow-wrap: anywhere;\n border-radius: 8px;\n margin: 0;\n padding: 10px 12px;\n font-size: 11.5px;\n line-height: 1.55;\n overflow: auto;\n}\n\n.charter-actionbar {\n z-index: 4;\n border: 1px solid var(--charter-border);\n border-radius: var(--charter-radius);\n background: color-mix(in srgb, var(--dsw-alias-bg-base, #fff) 88%, transparent);\n backdrop-filter: blur(8px);\n box-shadow: 0 2px 10px color-mix(in srgb, var(--dsw-alias-label-primary, #000) 4%, transparent);\n justify-content: space-between;\n align-items: center;\n gap: 14px;\n margin: 0 0 12px;\n padding: 8px 11px;\n display: flex;\n position: sticky;\n top: 0;\n}\n\n.charter-actionbar__status {\n min-width: 0;\n color: var(--dsw-alias-label-secondary, #777);\n align-items: center;\n gap: 8px;\n font-size: 11.5px;\n display: flex;\n}\n\n.charter-actionbar__status strong {\n color: var(--dsw-alias-label-primary, inherit);\n font-weight: 550;\n display: block;\n}\n\n.charter-actionbar__message {\n max-width: 46ch;\n color: var(--dsw-alias-label-secondary, #777);\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 10.5px;\n display: block;\n overflow: hidden;\n}\n\n.charter-actionbar__actions {\n flex: none;\n align-items: center;\n gap: 5px;\n display: flex;\n}\n\n.charter-dot {\n background: var(--dsw-alias-label-tertiary, #999);\n border-radius: 50%;\n flex: none;\n width: 7px;\n height: 7px;\n display: block;\n}\n\n.charter-dot.is-staged {\n background: var(--charter-brand);\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--charter-brand) 13%, transparent);\n}\n\n.charter-body {\n grid-template-columns: 172px minmax(0, 1fr);\n align-items: start;\n gap: 18px;\n display: grid;\n}\n\n.charter-nav {\n border: 1px solid var(--charter-border);\n border-radius: var(--charter-radius);\n background: var(--charter-surface);\n gap: 2px;\n padding: 6px;\n display: grid;\n position: sticky;\n top: 60px;\n}\n\n.charter-nav__label {\n color: var(--dsw-alias-label-tertiary, #999);\n letter-spacing: .08em;\n text-transform: uppercase;\n padding: 3px 8px 5px;\n font-size: 10px;\n font-weight: 650;\n}\n\n.charter-nav__item {\n width: 100%;\n min-height: 30px;\n color: var(--dsw-alias-label-secondary, #777);\n font: inherit;\n text-align: left;\n cursor: pointer;\n transition: color var(--charter-duration) var(--charter-ease), background-color var(--charter-duration) var(--charter-ease);\n background: none;\n border: 0;\n border-radius: 7px;\n align-items: center;\n gap: 6px;\n padding: 5px 8px;\n font-size: 12.5px;\n display: flex;\n position: relative;\n}\n\n.charter-nav__item:hover {\n color: var(--dsw-alias-label-primary, inherit);\n background: var(--dsw-alias-interactive-bg-hover, #7f7f7f14);\n}\n\n.charter-nav__item.is-active {\n color: var(--dsw-alias-label-primary, inherit);\n background: color-mix(in srgb, var(--charter-brand) 9%, var(--charter-surface-2));\n font-weight: 600;\n}\n\n.charter-nav__item.is-active:before {\n content: \"\";\n background: var(--charter-brand);\n border-radius: 2px;\n width: 2px;\n position: absolute;\n top: 7px;\n bottom: 7px;\n left: 0;\n}\n\n.charter-sr-only {\n clip-path: inset(50%);\n white-space: nowrap;\n border: 0;\n width: 1px;\n height: 1px;\n padding: 0;\n position: absolute;\n overflow: hidden;\n}\n\n.charter-nav__text {\n text-overflow: ellipsis;\n white-space: nowrap;\n min-width: 0;\n overflow: hidden;\n}\n\n.charter-nav__badge {\n min-width: 18px;\n color: var(--dsw-alias-label-tertiary, #999);\n background: var(--charter-surface-2);\n font-variant-numeric: tabular-nums;\n text-align: center;\n border-radius: 999px;\n padding: 0 5px;\n font-size: 10px;\n line-height: 17px;\n}\n\n.charter-nav__item.is-active .charter-nav__badge {\n color: var(--charter-brand);\n background: color-mix(in srgb, var(--charter-brand) 10%, transparent);\n}\n\n.charter-nav__dot {\n background: var(--charter-brand);\n border-radius: 50%;\n width: 5px;\n height: 5px;\n}\n\n.charter-nav__badge + .charter-nav__dot {\n margin-left: 0;\n}\n\n.charter-nav__help {\n border: 1px solid var(--charter-border);\n width: 16px;\n height: 16px;\n color: var(--dsw-alias-label-tertiary, #999);\n cursor: help;\n border-radius: 50%;\n flex: 0 0 16px;\n justify-content: center;\n align-items: center;\n margin-left: auto;\n font-size: 10px;\n font-weight: 700;\n line-height: 1;\n display: inline-flex;\n position: relative;\n}\n\n.charter-nav__help:hover, .charter-nav__item:focus-visible .charter-nav__help {\n color: var(--charter-brand);\n border-color: var(--charter-brand);\n}\n\n.charter-nav__help:before {\n content: \"?\";\n}\n\n.charter-nav__help:after {\n content: attr(data-tooltip);\n z-index: 30;\n border: 1px solid var(--charter-border);\n width: min(160px, 70vw);\n color: var(--dsw-alias-label-primary, inherit);\n background: var(--dsw-alias-bg-base, #fff);\n box-shadow: 0 6px 18px color-mix(in srgb, var(--dsw-alias-label-primary, #000) 16%, transparent);\n text-align: left;\n white-space: normal;\n visibility: hidden;\n opacity: 0;\n pointer-events: none;\n border-radius: 7px;\n padding: 7px 9px;\n font-size: 10.5px;\n font-weight: 400;\n line-height: 1.45;\n transition: opacity .12s;\n position: absolute;\n top: calc(100% + 6px);\n right: 0;\n}\n\n.charter-nav__help:hover:after, .charter-nav__item:focus-visible .charter-nav__help:after {\n visibility: visible;\n opacity: 1;\n}\n\n.charter-content {\n flex-direction: column;\n gap: 12px;\n min-width: 0;\n display: flex;\n}\n\n.charter-content > * {\n margin-bottom: 0;\n}\n\n.charter-overview-grid {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 12px;\n display: grid;\n}\n\n.charter-statcard {\n min-width: 0;\n color: inherit;\n font: inherit;\n text-align: left;\n cursor: pointer;\n transition: border-color var(--charter-duration) var(--charter-ease), background-color var(--charter-duration) var(--charter-ease);\n gap: 2px;\n display: grid;\n}\n\n.charter-statcard:hover {\n border-color: color-mix(in srgb, var(--charter-brand) 30%, var(--charter-border));\n background: color-mix(in srgb, var(--charter-brand) 3%, var(--charter-surface));\n}\n\n.charter-statcard__value {\n font-variant-numeric: tabular-nums;\n margin-top: 2px;\n font-size: 22px;\n font-weight: 600;\n line-height: 1.2;\n}\n\n.charter-statcard__label {\n color: var(--dsw-alias-label-secondary, #777);\n font-size: 11px;\n}\n\n.charter-statcard__list {\n color: var(--dsw-alias-label-secondary, #777);\n gap: 2px;\n margin-top: 6px;\n font-size: 11.5px;\n line-height: 1.4;\n display: grid;\n}\n\n.charter-statcard__list > span {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n}\n\n.charter-statcard__list em {\n color: var(--dsw-alias-label-tertiary, #999);\n margin-left: 6px;\n font-size: 10px;\n font-style: normal;\n}\n\n.charter-statcard__link {\n color: var(--charter-brand);\n margin-top: 6px;\n font-size: 10.5px;\n font-weight: 600;\n}\n\n.charter-callout {\n border: 1px solid color-mix(in srgb, var(--charter-brand) 34%, var(--charter-border));\n border-radius: var(--charter-radius);\n width: 100%;\n color: inherit;\n background: linear-gradient(180deg, color-mix(in srgb, var(--charter-brand) 5%, var(--charter-surface)), var(--charter-surface));\n font: inherit;\n text-align: left;\n cursor: pointer;\n transition: border-color var(--charter-duration) var(--charter-ease);\n gap: 2px;\n padding: 12px 14px;\n display: grid;\n}\n\n.charter-callout:hover {\n border-color: color-mix(in srgb, var(--charter-brand) 55%, var(--charter-border));\n}\n\n.charter-callout strong {\n font-size: 13.5px;\n font-weight: 600;\n}\n\n.charter-callout > span:not(.charter-kicker, .charter-callout__link) {\n max-width: 72ch;\n color: var(--dsw-alias-label-secondary, #777);\n font-size: 11.5px;\n line-height: 1.45;\n}\n\n.charter-callout__link {\n color: var(--charter-brand);\n margin-top: 3px;\n font-size: 10.5px;\n font-weight: 600;\n}\n\n.charter-empty-actions {\n flex-wrap: wrap;\n gap: 7px;\n margin-top: 8px;\n display: flex;\n}\n\n.charter-budgetgrid {\n color: var(--dsw-alias-label-secondary, #777);\n font-variant-numeric: tabular-nums;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 5px 18px;\n margin-top: 10px;\n font-size: 11.5px;\n line-height: 1.5;\n display: grid;\n}\n\n.charter-hint {\n color: var(--dsw-alias-label-tertiary, #999);\n margin: 0;\n font-size: 10.5px;\n}\n\n@container (width <= 880px) {\n .charter-columns {\n grid-template-columns: minmax(0, 1fr);\n }\n\n .charter-body {\n display: block;\n }\n\n .charter-nav {\n scrollbar-width: thin;\n flex-wrap: wrap;\n gap: 2px;\n margin-bottom: 12px;\n padding: 5px;\n display: flex;\n position: static;\n overflow: visible;\n }\n\n .charter-nav__label {\n display: none;\n }\n\n .charter-nav__item {\n white-space: nowrap;\n flex: none;\n width: auto;\n }\n\n .charter-nav__item.is-active:before {\n width: auto;\n height: 2px;\n inset: auto 8px 2px;\n }\n\n .charter-overview-grid {\n grid-template-columns: minmax(0, 1fr);\n }\n\n .charter-pagehead {\n flex-direction: column;\n align-items: stretch;\n gap: 14px;\n padding: 16px;\n }\n\n .charter-mark {\n width: 38px;\n height: 38px;\n }\n\n .charter-headside {\n justify-items: start;\n width: 100%;\n }\n\n .charter-chips {\n justify-content: flex-start;\n }\n\n .charter-meter {\n text-align: left;\n width: 100%;\n max-width: 320px;\n }\n}\n\n@container (width <= 560px) {\n .charter-shell {\n padding-inline: 12px;\n }\n\n .charter-budgetgrid {\n grid-template-columns: minmax(0, 1fr);\n }\n\n .charter-card {\n padding: 12px;\n }\n\n .charter-cardhead {\n flex-direction: column;\n align-items: stretch;\n gap: 8px;\n }\n\n .charter-cardtools {\n justify-content: space-between;\n }\n\n .charter-item__actions {\n box-shadow: none;\n backdrop-filter: none;\n opacity: 1;\n pointer-events: auto;\n background: none;\n border: 0;\n justify-content: flex-start;\n margin-left: 15px;\n padding: 0;\n position: static;\n }\n\n .charter-actionbar {\n flex-direction: column;\n align-items: stretch;\n }\n\n .charter-actionbar__actions {\n grid-template-columns: 1fr 1fr;\n display: grid;\n }\n\n .charter-actionbar__actions > .charter-actionbar__primary {\n grid-column: 1 / -1;\n }\n}\n\n@media (hover: none) {\n .charter-item__actions {\n box-shadow: none;\n backdrop-filter: none;\n opacity: 1;\n pointer-events: auto;\n background: none;\n border: 0;\n justify-content: flex-start;\n margin-left: 15px;\n padding: 0;\n position: static;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .charter-root *, .charter-root :before, .charter-root :after {\n transition-duration: .01ms !important;\n }\n}\n\n[data-conversation-scroll]:has(.charter-root) > [data-composer-seat]:not(:has([data-approval-key], [data-question-key], [data-plan-review-key])), [data-conversation-scroll]:has(.charter-root) ~ [data-width-handle] {\n display: none;\n}\n\n.charter-disclaimer {\n color: var(--dsw-alias-label-secondary, #666);\n margin: 2px 0 0;\n font-size: 11px;\n line-height: 1.4;\n}\n\n.charter-item.is-staged {\n box-shadow: inset 2px 0 0 var(--dsw-alias-brand-primary, #4b6bfb);\n}\n\n.charter-item__menu {\n position: relative;\n}\n\n.charter-item__menu > summary {\n cursor: pointer;\n list-style: none;\n}\n\n.charter-item__menu > summary::-webkit-details-marker {\n display: none;\n}\n\n.charter-item__menulist {\n z-index: 6;\n border: 1px solid var(--charter-border-soft);\n background: var(--dsw-alias-bg-base, #fff);\n min-width: 168px;\n box-shadow: 0 6px 18px color-mix(in srgb, var(--dsw-alias-label-primary, #000) 14%, transparent);\n border-radius: 8px;\n flex-direction: column;\n padding: 4px;\n display: flex;\n position: absolute;\n top: calc(100% + 4px);\n right: 0;\n}\n\n.charter-item__menulist button {\n min-height: 36px;\n color: inherit;\n font: inherit;\n text-align: left;\n cursor: pointer;\n background: none;\n border: 0;\n border-radius: 6px;\n padding: 6px 10px;\n}\n\n.charter-item__menulist button:hover, .charter-item__menulist button:focus-visible {\n background: var(--dsw-alias-interactive-bg-hover, #7f7f7f1a);\n}\n\n.charter-historytoggle {\n border: 1px dashed var(--charter-border-soft);\n color: var(--dsw-alias-label-secondary, #666);\n font: inherit;\n cursor: pointer;\n background: none;\n border-radius: 7px;\n align-self: flex-start;\n margin-top: 6px;\n padding: 4px 8px;\n font-size: 12px;\n}\n\n.charter-historytoggle:hover {\n background: var(--dsw-alias-interactive-bg-hover, #7f7f7f14);\n}\n\n.charter-bootstrap__summary {\n flex-wrap: wrap;\n align-items: center;\n gap: 8px;\n margin: 8px 0;\n display: flex;\n}\n\n.charter-draftfield__meta {\n flex-wrap: wrap;\n justify-content: space-between;\n align-items: center;\n gap: 6px;\n display: flex;\n}\n\n.charter-callout--static {\n cursor: default;\n}\n\n.charter-callout__actions {\n flex-wrap: wrap;\n gap: 8px;\n margin-top: 6px;\n display: flex;\n}\n\n.charter-editor__reasonfield {\n color: var(--dsw-alias-label-secondary, #666);\n flex-direction: column;\n gap: 4px;\n font-size: 12px;\n display: flex;\n}\n\n.charter-actionbar__hint {\n color: var(--dsw-alias-label-tertiary, #888);\n margin-top: 2px;\n font-size: 11px;\n display: block;\n}\n\n.charter-item__actions {\n align-items: center;\n gap: 2px;\n}\n\n.charter-recovery__facts, .charter-recovery__preview dl {\n grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));\n gap: 8px 16px;\n margin: 10px 0;\n padding: 0;\n display: grid;\n}\n\n.charter-recovery__facts > div, .charter-recovery__preview dl > div {\n min-width: 0;\n}\n\n.charter-recovery__facts dt, .charter-recovery__preview dt {\n color: var(--dsw-alias-label-tertiary, #7f7f7fd9);\n text-transform: uppercase;\n letter-spacing: .04em;\n margin: 0;\n font-size: 11px;\n}\n\n.charter-recovery__facts dd, .charter-recovery__preview dd {\n overflow-wrap: anywhere;\n font-variant-numeric: tabular-nums;\n margin: 2px 0 0;\n}\n\n.charter-recovery__actions, .charter-recovery__danger, .charter-recovery__file, .charter-recovery__preview {\n flex-wrap: wrap;\n align-items: center;\n gap: 8px 12px;\n margin-top: 10px;\n display: flex;\n}\n\n.charter-recovery__file {\n flex-direction: column;\n align-items: flex-start;\n}\n\n.charter-recovery__file input[type=\"file\"] {\n border: 1px dashed var(--charter-border);\n border-radius: var(--charter-radius);\n background: var(--charter-surface);\n max-width: 100%;\n color: inherit;\n font: inherit;\n cursor: pointer;\n padding: 6px 8px;\n}\n\n.charter-recovery__file input[type=\"file\"]:focus-visible, .charter-recovery__actions .charter-button:focus-visible {\n outline: 2px solid var(--charter-brand);\n outline-offset: 2px;\n}\n\n.charter-recovery__preview {\n border: 1px solid var(--charter-border-soft);\n border-radius: var(--charter-radius);\n background: var(--charter-surface);\n flex-direction: column;\n align-items: stretch;\n padding: 10px 12px;\n}\n\n.charter-recovery__preview dl {\n margin: 6px 0 0;\n}\n\n.charter-recovery__danger {\n border: 1px solid var(--charter-warn);\n border-radius: var(--charter-radius);\n background: var(--charter-surface-2);\n flex-direction: column;\n align-items: flex-start;\n padding: 10px 12px;\n}\n\n@container (width <= 520px) {\n .charter-recovery__facts, .charter-recovery__preview dl {\n grid-template-columns: 1fr;\n }\n\n .charter-recovery__actions {\n flex-direction: column;\n align-items: stretch;\n }\n}\n\n.charter-bootstrap__group {\n gap: 2px;\n margin-top: 8px;\n display: grid;\n}\n\n.charter-bootstrap__group h4 {\n color: var(--dsw-alias-label-secondary, #777);\n letter-spacing: .03em;\n text-transform: uppercase;\n margin: 6px 0 2px;\n font-size: 10.5px;\n font-weight: 600;\n}\n\n.charter-bootstrap__checklabel, .charter-bootstrap__textlabel {\n color: var(--dsw-alias-label-tertiary, #999);\n font-size: 10px;\n}\n\n.charter-bootstrap__checklabel {\n cursor: pointer;\n flex: none;\n margin-top: 7px;\n}\n\n.charter-bootstrap__textlabel {\n justify-self: start;\n}\n\n.charter-error-details {\n color: var(--dsw-alias-label-secondary, #777);\n margin: 4px 0;\n font-size: 11px;\n}\n\n.charter-error-details summary {\n cursor: pointer;\n}\n\n.charter-error-details pre {\n border: 1px solid var(--charter-border-soft);\n background: var(--charter-surface-2);\n max-height: 180px;\n color: var(--dsw-alias-label-primary, inherit);\n white-space: pre-wrap;\n overflow-wrap: anywhere;\n border-radius: 6px;\n margin: 4px 0 0;\n padding: 6px 8px;\n font-size: 11px;\n overflow: auto;\n}\n\n@media (hover: none) {\n .charter-nav__item:focus .charter-nav__help:after {\n visibility: visible;\n opacity: 1;\n }\n}\n\n@media (width <= 640px), (pointer: coarse) {\n .charter-progress select, .charter-item__menulist button, .charter-preview__view, .charter-actionbar__actions .charter-button, .charter-bootstrap__summary .charter-button, .charter-add__foot .charter-button, .charter-recovery__actions .charter-button, .charter-nav__item {\n min-height: 44px;\n }\n\n .charter-actionbar__actions, .charter-bootstrap__summary, .charter-add__foot, .charter-bootstrap__item {\n flex-wrap: wrap;\n }\n\n .charter-bootstrap__item .charter-draftfield {\n min-width: min(100%, 220px);\n }\n}\n\n.charter-dependency-list {\n gap: 6px;\n margin: 0;\n padding: 0;\n list-style: none;\n display: grid;\n}\n\n.charter-dependency {\n border: 1px solid var(--charter-border-soft);\n border-radius: 7px;\n grid-template-columns: auto minmax(0, 1fr) auto;\n align-items: baseline;\n gap: 8px;\n padding: 8px 10px;\n display: grid;\n}\n\n.charter-dependency.is-dependency-conflict {\n border-color: var(--charter-danger);\n}\n\n.charter-dependency__key {\n color: var(--charter-brand);\n font-size: 11px;\n font-weight: 700;\n}\n\n.charter-dependency__text {\n overflow-wrap: anywhere;\n min-width: 0;\n}\n\n.charter-dependency__status {\n color: var(--dsw-alias-label-tertiary, inherit);\n font-size: 11px;\n}\n\n.charter-dependency__requires {\n color: var(--dsw-alias-label-tertiary, inherit);\n grid-column: 2 / -1;\n font-size: 11px;\n}\n\n.charter-dependency__select {\n border: 1px solid var(--charter-border-soft);\n background: var(--charter-surface-2);\n max-width: 100%;\n min-height: 28px;\n color: inherit;\n font: inherit;\n border-radius: 6px;\n grid-column: 2 / -1;\n font-size: 11px;\n}\n\n.charter-batch-list {\n gap: 4px;\n margin: 0;\n padding: 0;\n list-style: none;\n display: grid;\n}\n\n.charter-batch {\n border-bottom: 1px solid var(--charter-border-soft);\n flex-wrap: wrap;\n gap: 10px;\n padding: 8px 10px;\n font-size: 11px;\n display: flex;\n}\n\n.charter-batch__source {\n font-weight: 600;\n}\n\n.charter-batch__revision, .charter-batch__count {\n color: var(--dsw-alias-label-tertiary, inherit);\n}\n\n.charter-changeset__body {\n color: var(--dsw-alias-label-tertiary, inherit);\n flex-wrap: wrap;\n gap: 12px;\n font-size: 11px;\n display: flex;\n}\n\n.charter-proposal-list {\n gap: 8px;\n margin: 0;\n padding: 0;\n list-style: none;\n display: grid;\n}\n\n.charter-proposal {\n border: 1px solid var(--charter-border-soft);\n border-radius: 7px;\n gap: 6px;\n padding: 8px 10px;\n display: grid;\n}\n\n.charter-proposal__text {\n overflow-wrap: anywhere;\n margin: 0;\n}\n\n.charter-proposal__meta {\n color: var(--dsw-alias-label-tertiary, inherit);\n font-size: 11px;\n}\n\n.charter-proposal__reason, .charter-proposal__actions {\n grid-column: 1 / -1;\n}\n\n.charter-proposal__reason {\n border: 1px solid var(--charter-border-soft);\n background: var(--charter-surface-2);\n min-height: 28px;\n color: inherit;\n font: inherit;\n border-radius: 6px;\n padding: 4px 6px;\n font-size: 12px;\n}\n\n.charter-proposal__actions {\n flex-wrap: wrap;\n gap: 8px;\n display: flex;\n}\n\n.charter-timeline {\n gap: 4px;\n margin: 0;\n padding: 0;\n list-style: none;\n display: grid;\n}\n\n.charter-timeline__row {\n border-bottom: 1px solid var(--charter-border-soft);\n grid-template-columns: auto minmax(0, 1fr) auto;\n gap: 8px;\n padding: 8px 10px;\n font-size: 12px;\n display: grid;\n}\n\n.charter-timeline__kind, .charter-timeline__state, .charter-timeline__lineage {\n color: var(--dsw-alias-label-tertiary, inherit);\n font-size: 11px;\n}\n\n.charter-timeline__text {\n overflow-wrap: anywhere;\n min-width: 0;\n}\n\n.charter-notice--danger {\n border-color: var(--charter-danger);\n color: var(--charter-danger);\n}\n";
|
|
6
|
+
const __charterCss = ".charter-root {\n --charter-border: var(--dsw-alias-border-l2, #7f7f7f38);\n --charter-border-soft: var(--dsw-alias-border-l1, #7f7f7f24);\n --charter-surface: var(--dsw-alias-bg-layer-1, #7f7f7f0e);\n --charter-surface-2: var(--dsw-alias-bg-layer-2, #7f7f7f16);\n --charter-brand: var(--dsw-alias-brand-primary, #3978d4);\n --charter-brand-fill: var(--dsw-alias-button-primary-fill, #3978d4);\n --charter-brand-fill-hover: var(--dsw-alias-button-primary-hover, var(--charter-brand-fill));\n --charter-brand-label: var(--dsw-alias-label-primary-foreground, #fff);\n --charter-danger: var(--dsw-alias-state-error-primary, #d14343);\n --charter-warn: var(--dsw-alias-state-warn-primary, #b7791f);\n --charter-success: var(--dsw-alias-state-success-primary, #2f8a5b);\n --charter-radius: 10px;\n --charter-ease: var(--ds-ease-in-out, ease-in-out);\n --charter-duration: var(--ds-transition-duration, .18s);\n box-sizing: border-box;\n width: 100%;\n min-height: 100%;\n color: var(--dsw-alias-label-primary, inherit);\n background: var(--dsw-alias-bg-base, transparent);\n font-family: var(--dsw-font-family, inherit);\n font-size: var(--dsh-content-font-size, 13px);\n line-height: 1.5;\n overflow-x: hidden;\n container-type: inline-size;\n}\n\n.charter-root *, .charter-root :before, .charter-root :after {\n box-sizing: border-box;\n}\n\n.charter-shell {\n width: 100%;\n max-width: 1100px;\n margin: 0 auto;\n padding: clamp(20px, 3.5vw, 34px) clamp(16px, 3.5vw, 40px) clamp(72px, 12vh, 120px);\n}\n\n.charter-pagehead {\n border-bottom: 1px solid var(--charter-border-soft);\n justify-content: space-between;\n align-items: flex-start;\n gap: 16px;\n margin-bottom: 12px;\n padding: 2px 0 12px;\n display: flex;\n}\n\n.charter-heading {\n align-items: flex-start;\n gap: 10px;\n min-width: 0;\n display: flex;\n}\n\n.charter-heading__copy {\n min-width: 0;\n}\n\n.charter-mark {\n flex: none;\n width: 32px;\n height: 32px;\n margin-top: 1px;\n display: block;\n}\n\n.charter-mark svg {\n width: 100%;\n height: 100%;\n display: block;\n}\n\n.charter-eyebrow, .charter-kicker {\n color: var(--dsw-alias-label-secondary, #777);\n letter-spacing: .075em;\n text-transform: uppercase;\n font-size: 10.5px;\n font-weight: 650;\n line-height: 1.4;\n display: block;\n}\n\n.charter-pagehead h2 {\n letter-spacing: -.01em;\n margin: 0;\n font-size: 20px;\n font-weight: 500;\n line-height: 28px;\n}\n\n.charter-subtitle {\n max-width: 64ch;\n color: var(--dsw-alias-label-secondary, #777);\n margin: 2px 0 0;\n font-size: 12px;\n line-height: 1.45;\n}\n\n.charter-headside {\n flex: none;\n justify-items: end;\n gap: 7px;\n min-width: 180px;\n display: grid;\n}\n\n.charter-chips {\n flex-wrap: wrap;\n justify-content: flex-end;\n gap: 5px;\n display: flex;\n}\n\n.charter-meter {\n width: min(190px, 30vw);\n color: var(--dsw-alias-label-secondary, #777);\n font-variant-numeric: tabular-nums;\n text-align: right;\n gap: 4px;\n font-size: 10.5px;\n display: grid;\n}\n\n.charter-meter__track {\n background: color-mix(in srgb, var(--dsw-alias-label-secondary, #777) 16%, transparent);\n border-radius: 999px;\n width: 100%;\n height: 3px;\n display: block;\n overflow: hidden;\n}\n\n.charter-meter__fill {\n border-radius: inherit;\n background: var(--charter-brand);\n height: 100%;\n transition: width var(--charter-duration) var(--charter-ease), background-color var(--charter-duration) var(--charter-ease);\n display: block;\n}\n\n.charter-meter.is-warn {\n color: var(--charter-warn);\n}\n\n.charter-meter.is-warn .charter-meter__fill {\n background: var(--charter-warn);\n}\n\n.charter-meter.is-over {\n color: var(--charter-danger);\n font-weight: 600;\n}\n\n.charter-meter.is-over .charter-meter__fill {\n background: var(--charter-danger);\n}\n\n.charter-areahead {\n border-bottom: 1px solid var(--charter-border-soft);\n margin: 2px 0 12px;\n padding-bottom: 8px;\n}\n\n.charter-areahead h2 {\n margin: 0;\n font-size: 18px;\n font-weight: 600;\n line-height: 1.3;\n}\n\n.charter-areahead .charter-hint {\n margin: 4px 0 0;\n font-size: 11px;\n line-height: 1.5;\n}\n\n.charter-card {\n border: 1px solid var(--charter-border);\n border-radius: var(--charter-radius);\n background: var(--charter-surface);\n min-width: 0;\n margin-bottom: 12px;\n padding: 14px 16px;\n}\n\n.charter-cardhead {\n justify-content: space-between;\n align-items: flex-start;\n gap: 12px;\n min-width: 0;\n display: flex;\n}\n\n.charter-cardtitle {\n min-width: 0;\n}\n\n.charter-cardtitle h3 {\n margin: 2px 0 0;\n font-size: 14px;\n font-weight: 600;\n line-height: 1.45;\n}\n\n.charter-fieldlabel {\n color: var(--dsw-alias-label-primary, inherit);\n font-size: 11px;\n font-weight: 600;\n line-height: 1.4;\n display: block;\n}\n\n.charter-card > .charter-hint {\n margin: 6px 0 0;\n font-size: 11px;\n line-height: 1.5;\n}\n\n.charter-cardtools {\n flex: none;\n align-items: center;\n gap: 8px;\n display: flex;\n}\n\n.charter-count {\n border: 1px solid var(--charter-border);\n min-width: 22px;\n height: 22px;\n color: var(--dsw-alias-label-secondary, #777);\n background: var(--charter-surface-2);\n font-variant-numeric: tabular-nums;\n border-radius: 999px;\n justify-content: center;\n align-items: center;\n padding: 0 7px;\n font-size: 11px;\n font-weight: 600;\n display: inline-flex;\n}\n\n.charter-objective h3 {\n max-width: 68ch;\n font-size: 15px;\n font-weight: 550;\n line-height: 1.55;\n}\n\n.charter-original {\n max-width: 72ch;\n color: var(--dsw-alias-label-secondary, #777);\n margin: 8px 0 0;\n font-size: 11.5px;\n line-height: 1.5;\n}\n\n.charter-copy {\n max-width: 72ch;\n color: var(--dsw-alias-label-secondary, #777);\n margin: 8px 0 0;\n font-size: 12px;\n line-height: 1.55;\n}\n\n.charter-source {\n border: 1px solid var(--charter-border-soft);\n color: var(--dsw-alias-label-secondary, #777);\n background: var(--charter-surface-2);\n border-radius: 999px;\n margin-top: 6px;\n padding: 1px 7px;\n font-size: 10.5px;\n display: inline-block;\n}\n\n.charter-columns {\n grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);\n align-items: start;\n gap: 12px;\n display: grid;\n}\n\n.charter-columns > .charter-card {\n margin-bottom: 0;\n}\n\n.charter-tag {\n color: var(--dsw-alias-label-secondary, #777);\n background: var(--charter-surface-2);\n white-space: nowrap;\n border: 1px solid #0000;\n border-radius: 999px;\n align-items: center;\n gap: 4px;\n padding: 1px 7px;\n font-size: 10.5px;\n line-height: 1.6;\n display: inline-flex;\n}\n\n.charter-tag--info {\n border-color: color-mix(in srgb, var(--charter-brand) 28%, transparent);\n color: var(--charter-brand);\n background: color-mix(in srgb, var(--charter-brand) 8%, transparent);\n}\n\n.charter-tag--success {\n border-color: color-mix(in srgb, var(--charter-success) 26%, transparent);\n color: var(--charter-success);\n background: color-mix(in srgb, var(--charter-success) 8%, transparent);\n}\n\n.charter-tag--warning {\n border-color: color-mix(in srgb, var(--charter-warn) 28%, transparent);\n color: var(--charter-warn);\n background: color-mix(in srgb, var(--charter-warn) 8%, transparent);\n}\n\n.charter-tag--danger {\n border-color: color-mix(in srgb, var(--charter-danger) 28%, transparent);\n color: var(--charter-danger);\n background: color-mix(in srgb, var(--charter-danger) 8%, transparent);\n}\n\n.charter-notice {\n border: 1px solid var(--charter-border);\n color: var(--dsw-alias-label-secondary, #777);\n background: var(--charter-surface-2);\n border-radius: 8px;\n margin-bottom: 12px;\n padding: 8px 11px;\n font-size: 12px;\n line-height: 1.5;\n}\n\n.charter-notice--warning {\n border-color: color-mix(in srgb, var(--charter-warn) 30%, var(--charter-border));\n background: color-mix(in srgb, var(--charter-warn) 7%, var(--charter-surface));\n}\n\n.charter-notice--danger {\n border-color: color-mix(in srgb, var(--charter-danger) 32%, var(--charter-border));\n color: var(--charter-danger);\n background: color-mix(in srgb, var(--charter-danger) 7%, var(--charter-surface));\n}\n\n.charter-list {\n flex-direction: column;\n margin-top: 8px;\n display: flex;\n}\n\n.charter-item {\n transition: background-color var(--charter-duration) var(--charter-ease);\n border-radius: 7px;\n flex-direction: column;\n gap: 2px;\n margin: 0 -6px;\n padding: 9px 6px;\n display: flex;\n position: relative;\n}\n\n.charter-item + .charter-item {\n border-top: 1px solid var(--charter-border-soft);\n}\n\n.charter-item:hover {\n background: var(--dsw-alias-interactive-bg-hover, #7f7f7f14);\n}\n\n.charter-item:focus-visible {\n outline: 2px solid var(--charter-brand);\n outline-offset: -2px;\n}\n\n.charter-item__hint {\n color: var(--dsw-alias-label-tertiary, #999);\n font-size: 10.5px;\n line-height: 1.45;\n}\n\n.charter-item--inactive {\n opacity: .72;\n}\n\n.charter-item__main {\n align-items: flex-start;\n gap: 8px;\n min-width: 0;\n display: flex;\n}\n\n.charter-item__copy {\n flex: 1;\n gap: 3px;\n min-width: 0;\n display: grid;\n}\n\n.charter-item__text {\n overflow-wrap: anywhere;\n color: var(--dsw-alias-label-primary, inherit);\n font-size: 12.5px;\n line-height: 1.55;\n}\n\n.charter-item__meta {\n flex-wrap: wrap;\n align-items: center;\n gap: 4px;\n display: flex;\n}\n\n.charter-item__bytes {\n color: var(--dsw-alias-label-tertiary, #999);\n font-variant-numeric: tabular-nums;\n white-space: nowrap;\n font-size: 10px;\n}\n\n.charter-item__actions {\n z-index: 2;\n border: 1px solid var(--charter-border-soft);\n background: color-mix(in srgb, var(--dsw-alias-bg-base, #fff) 92%, transparent);\n box-shadow: 0 2px 8px color-mix(in srgb, var(--dsw-alias-label-primary, #000) 7%, transparent);\n backdrop-filter: blur(5px);\n opacity: 0;\n pointer-events: none;\n transition: opacity var(--charter-duration) var(--charter-ease);\n border-radius: 7px;\n flex-wrap: nowrap;\n gap: 1px;\n padding: 2px 4px;\n display: flex;\n position: absolute;\n top: 4px;\n right: 4px;\n}\n\n.charter-item:hover .charter-item__actions, .charter-item:focus-within .charter-item__actions {\n opacity: 1;\n pointer-events: auto;\n}\n\n.charter-state-mark {\n background: var(--dsw-alias-label-tertiary, #999);\n border-radius: 50%;\n flex: none;\n width: 7px;\n height: 7px;\n margin-top: 6px;\n display: block;\n}\n\n.charter-state-mark--done {\n background: var(--charter-success);\n}\n\n.charter-state-mark--warning {\n background: var(--charter-warn);\n}\n\n.charter-state-mark--ongoing {\n background: var(--charter-brand);\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--charter-brand) 14%, transparent);\n}\n\n.charter-progress {\n color: var(--dsw-alias-label-secondary, #777);\n align-items: center;\n gap: 6px;\n margin: 5px 0 0 15px;\n font-size: 10.5px;\n display: flex;\n}\n\n.charter-progress select {\n border: 1px solid var(--charter-border);\n height: auto;\n min-height: 23px;\n color: var(--dsw-alias-label-primary, inherit);\n background: var(--charter-surface-2);\n font: inherit;\n border-radius: 5px;\n padding: 0 5px;\n font-size: 10.5px;\n}\n\n.charter-empty {\n border: 1px dashed var(--charter-border);\n color: var(--dsw-alias-label-tertiary, #999);\n text-align: center;\n border-radius: 7px;\n margin: 4px 0;\n padding: 12px 10px;\n font-size: 11.5px;\n}\n\n.charter-add {\n border: 1px solid var(--charter-border);\n background: var(--charter-surface-2);\n transition: border-color var(--charter-duration) var(--charter-ease), box-shadow var(--charter-duration) var(--charter-ease);\n border-radius: 8px;\n gap: 3px;\n margin-top: 9px;\n padding: 7px 8px;\n display: grid;\n}\n\n.charter-add:focus-within {\n border-color: color-mix(in srgb, var(--charter-brand) 55%, var(--charter-border));\n box-shadow: 0 0 0 1px color-mix(in srgb, var(--charter-brand) 32%, transparent);\n}\n\n.charter-add.is-over {\n border-color: color-mix(in srgb, var(--charter-danger) 55%, var(--charter-border));\n}\n\n.charter-add textarea {\n width: 100%;\n min-height: 34px;\n color: inherit;\n font: inherit;\n resize: vertical;\n background: none;\n border: 0;\n outline: 0;\n padding: 2px 3px;\n font-size: 12.5px;\n line-height: 1.5;\n}\n\n.charter-add textarea::placeholder {\n color: var(--dsw-alias-label-tertiary, #999);\n}\n\n.charter-add__foot {\n justify-content: space-between;\n align-items: center;\n gap: 8px;\n display: flex;\n}\n\n.charter-budget {\n color: var(--dsw-alias-label-tertiary, #999);\n font-variant-numeric: tabular-nums;\n white-space: nowrap;\n font-size: 10.5px;\n line-height: 1.4;\n}\n\n.charter-budget.is-over {\n color: var(--charter-danger);\n font-weight: 600;\n}\n\n.charter-button {\n min-height: 27px;\n color: var(--dsw-alias-label-secondary, #777);\n font: inherit;\n white-space: nowrap;\n cursor: pointer;\n transition: color var(--charter-duration) var(--charter-ease), background-color var(--charter-duration) var(--charter-ease), border-color var(--charter-duration) var(--charter-ease);\n background: none;\n border: 1px solid #0000;\n border-radius: 7px;\n padding: 3px 9px;\n font-size: 11.5px;\n font-weight: 550;\n line-height: 1.4;\n}\n\n.charter-button:hover:not(:disabled) {\n color: var(--dsw-alias-label-primary, inherit);\n background: var(--dsw-alias-interactive-bg-hover, #7f7f7f1a);\n}\n\n.charter-button:focus-visible, .charter-progress select:focus-visible, .charter-bootstrap textarea:focus-visible, .charter-editor__input:focus-visible, .charter-editor__reason:focus-visible {\n outline: 2px solid var(--charter-brand);\n outline-offset: 1px;\n}\n\n.charter-button:disabled {\n cursor: not-allowed;\n opacity: .42;\n}\n\n.charter-button--outline {\n border-color: var(--charter-border);\n background: var(--charter-surface-2);\n}\n\n.charter-button--primary {\n color: var(--charter-brand-label);\n background: var(--charter-brand-fill);\n border-color: #0000;\n}\n\n.charter-button--primary:hover:not(:disabled) {\n color: var(--charter-brand-label);\n background: var(--charter-brand-fill-hover);\n}\n\n.charter-button--primary:disabled {\n border-color: var(--charter-border);\n color: var(--dsw-alias-label-tertiary, #999);\n background: var(--charter-surface-2);\n opacity: 1;\n}\n\n.charter-inlineeditor {\n border-top: 1px solid var(--charter-border-soft);\n margin-top: 12px;\n padding-top: 12px;\n}\n\n.charter-editor__input, .charter-editor__reason {\n border: 1px solid var(--charter-border);\n width: 100%;\n color: inherit;\n background: var(--dsw-alias-bg-base, transparent);\n font: inherit;\n resize: vertical;\n border-radius: 8px;\n outline: 0;\n padding: 8px 10px;\n font-size: 12.5px;\n line-height: 1.55;\n}\n\n.charter-editor__input {\n min-height: 74px;\n}\n\n.charter-editor__reason {\n min-height: 34px;\n margin-top: 6px;\n}\n\n.charter-editor__actions {\n justify-content: flex-end;\n align-items: center;\n gap: 7px;\n margin-top: 8px;\n display: flex;\n}\n\n.charter-editor__actions .charter-budget {\n margin-right: auto;\n}\n\n.charter-editor__hint {\n color: var(--dsw-alias-label-tertiary, #999);\n margin-top: 5px;\n font-size: 10.5px;\n display: block;\n}\n\n.charter-bootstrap {\n border-color: color-mix(in srgb, var(--charter-brand) 36%, var(--charter-border));\n background: linear-gradient(180deg, color-mix(in srgb, var(--charter-brand) 5%, var(--charter-surface)), var(--charter-surface));\n}\n\n.charter-bootstrap__field, .charter-bootstrap__group {\n gap: 6px;\n margin-top: 12px;\n display: grid;\n}\n\n.charter-bootstrap__field > span:first-child, .charter-bootstrap__group > .charter-kicker {\n color: var(--dsw-alias-label-primary, inherit);\n letter-spacing: 0;\n text-transform: none;\n font-size: 11px;\n font-weight: 600;\n}\n\n.charter-bootstrap textarea {\n border: 1px solid var(--charter-border);\n width: 100%;\n min-height: 46px;\n color: inherit;\n background: var(--dsw-alias-bg-base, transparent);\n font: inherit;\n resize: vertical;\n border-radius: 8px;\n outline: 0;\n padding: 7px 9px;\n font-size: 12px;\n line-height: 1.5;\n}\n\n.charter-bootstrap__item {\n transition: background-color var(--charter-duration) var(--charter-ease);\n border-radius: 7px;\n align-items: flex-start;\n gap: 8px;\n padding: 5px 6px;\n display: flex;\n}\n\n.charter-bootstrap__item:hover {\n background: var(--dsw-alias-interactive-bg-hover, #7f7f7f12);\n}\n\n.charter-bootstrap__item input[type=\"checkbox\"] {\n accent-color: var(--charter-brand);\n flex: none;\n margin-top: 9px;\n}\n\n.charter-draftfield {\n flex: 1;\n gap: 2px;\n min-width: 0;\n display: grid;\n}\n\n.charter-draftfield .charter-budget {\n text-align: right;\n}\n\n.charter-bootstrap__actions {\n border-top: 1px solid var(--charter-border-soft);\n justify-content: flex-end;\n gap: 7px;\n margin-top: 12px;\n padding-top: 10px;\n display: flex;\n}\n\n.charter-empty-state {\n border: 1px dashed var(--charter-border);\n border-radius: var(--charter-radius);\n background: var(--charter-surface);\n gap: 3px;\n margin-bottom: 12px;\n padding: 14px 16px;\n display: grid;\n}\n\n.charter-empty-state h3 {\n margin: 0;\n font-size: 14px;\n font-weight: 600;\n}\n\n.charter-empty-state p {\n max-width: 68ch;\n color: var(--dsw-alias-label-secondary, #777);\n margin: 0;\n font-size: 12px;\n line-height: 1.5;\n}\n\n.charter-centered {\n min-height: 260px;\n color: var(--dsw-alias-label-secondary, #777);\n text-align: center;\n justify-content: center;\n align-items: center;\n gap: 9px;\n display: flex;\n}\n\n.charter-centered .charter-button {\n border-color: var(--charter-border);\n}\n\n.charter-preview {\n margin-top: 12px;\n}\n\n.charter-preview__meta {\n justify-content: space-between;\n align-items: center;\n gap: 10px;\n margin-bottom: 8px;\n display: flex;\n}\n\n.charter-preview__toolbar {\n flex-wrap: wrap;\n align-items: center;\n gap: 5px;\n margin: 0 0 8px;\n display: flex;\n}\n\n.charter-preview__view {\n border: 1px solid var(--charter-border);\n min-height: 26px;\n color: var(--dsw-alias-label-secondary, #777);\n font: inherit;\n cursor: pointer;\n background: none;\n border-radius: 6px;\n padding: 3px 8px;\n font-size: 10.5px;\n}\n\n.charter-preview__view:hover {\n color: var(--dsw-alias-label-primary, inherit);\n background: var(--dsw-alias-interactive-bg-hover, #7f7f7f14);\n}\n\n.charter-preview__view.is-active {\n color: var(--charter-brand);\n border-color: color-mix(in srgb, var(--charter-brand) 45%, var(--charter-border));\n background: color-mix(in srgb, var(--charter-brand) 8%, transparent);\n font-weight: 600;\n}\n\n.charter-preview__view:disabled {\n opacity: .45;\n cursor: default;\n}\n\n.charter-preview pre {\n border: 1px solid var(--charter-border-soft);\n max-height: 300px;\n color: var(--dsw-alias-label-primary, inherit);\n background: var(--charter-surface-2);\n font-family: var(--ds-font-family-code, ui-monospace, SFMono-Regular, Menlo, monospace);\n white-space: pre-wrap;\n overflow-wrap: anywhere;\n border-radius: 8px;\n margin: 0;\n padding: 10px 12px;\n font-size: 11.5px;\n line-height: 1.55;\n overflow: auto;\n}\n\n.charter-actionbar {\n z-index: 4;\n border: 1px solid var(--charter-border);\n border-radius: var(--charter-radius);\n background: color-mix(in srgb, var(--dsw-alias-bg-base, #fff) 88%, transparent);\n backdrop-filter: blur(8px);\n box-shadow: 0 2px 10px color-mix(in srgb, var(--dsw-alias-label-primary, #000) 4%, transparent);\n justify-content: space-between;\n align-items: center;\n gap: 14px;\n margin: 0 0 12px;\n padding: 8px 11px;\n display: flex;\n position: sticky;\n top: 0;\n}\n\n.charter-actionbar__status {\n min-width: 0;\n color: var(--dsw-alias-label-secondary, #777);\n align-items: center;\n gap: 8px;\n font-size: 11.5px;\n display: flex;\n}\n\n.charter-actionbar__status strong {\n color: var(--dsw-alias-label-primary, inherit);\n font-weight: 550;\n display: block;\n}\n\n.charter-actionbar__message {\n max-width: 46ch;\n color: var(--dsw-alias-label-secondary, #777);\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 10.5px;\n display: block;\n overflow: hidden;\n}\n\n.charter-actionbar__actions {\n flex: none;\n align-items: center;\n gap: 5px;\n display: flex;\n}\n\n.charter-dot {\n background: var(--dsw-alias-label-tertiary, #999);\n border-radius: 50%;\n flex: none;\n width: 7px;\n height: 7px;\n display: block;\n}\n\n.charter-dot.is-staged {\n background: var(--charter-brand);\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--charter-brand) 13%, transparent);\n}\n\n.charter-body {\n grid-template-columns: 172px minmax(0, 1fr);\n align-items: start;\n gap: 18px;\n display: grid;\n}\n\n.charter-nav {\n border: 1px solid var(--charter-border);\n border-radius: var(--charter-radius);\n background: var(--charter-surface);\n gap: 2px;\n padding: 6px;\n display: grid;\n position: sticky;\n top: 60px;\n}\n\n.charter-nav__label {\n color: var(--dsw-alias-label-tertiary, #999);\n letter-spacing: .08em;\n text-transform: uppercase;\n padding: 3px 8px 5px;\n font-size: 10px;\n font-weight: 650;\n}\n\n.charter-nav__item {\n width: 100%;\n min-height: 30px;\n color: var(--dsw-alias-label-secondary, #777);\n font: inherit;\n text-align: left;\n cursor: pointer;\n transition: color var(--charter-duration) var(--charter-ease), background-color var(--charter-duration) var(--charter-ease);\n background: none;\n border: 0;\n border-radius: 7px;\n align-items: center;\n gap: 6px;\n padding: 5px 8px;\n font-size: 12.5px;\n display: flex;\n position: relative;\n}\n\n.charter-nav__item:hover {\n color: var(--dsw-alias-label-primary, inherit);\n background: var(--dsw-alias-interactive-bg-hover, #7f7f7f14);\n}\n\n.charter-nav__item.is-active {\n color: var(--dsw-alias-label-primary, inherit);\n background: color-mix(in srgb, var(--charter-brand) 9%, var(--charter-surface-2));\n font-weight: 600;\n}\n\n.charter-nav__item.is-active:before {\n content: \"\";\n background: var(--charter-brand);\n border-radius: 2px;\n width: 2px;\n position: absolute;\n top: 7px;\n bottom: 7px;\n left: 0;\n}\n\n.charter-sr-only {\n clip-path: inset(50%);\n white-space: nowrap;\n border: 0;\n width: 1px;\n height: 1px;\n padding: 0;\n position: absolute;\n overflow: hidden;\n}\n\n.charter-nav__text {\n text-overflow: ellipsis;\n white-space: nowrap;\n min-width: 0;\n overflow: hidden;\n}\n\n.charter-nav__badge {\n min-width: 18px;\n color: var(--dsw-alias-label-tertiary, #999);\n background: var(--charter-surface-2);\n font-variant-numeric: tabular-nums;\n text-align: center;\n border-radius: 999px;\n padding: 0 5px;\n font-size: 10px;\n line-height: 17px;\n}\n\n.charter-nav__item.is-active .charter-nav__badge {\n color: var(--charter-brand);\n background: color-mix(in srgb, var(--charter-brand) 10%, transparent);\n}\n\n.charter-nav__dot {\n background: var(--charter-brand);\n border-radius: 50%;\n width: 5px;\n height: 5px;\n}\n\n.charter-nav__badge + .charter-nav__dot {\n margin-left: 0;\n}\n\n.charter-nav__help {\n border: 1px solid var(--charter-border);\n width: 16px;\n height: 16px;\n color: var(--dsw-alias-label-tertiary, #999);\n cursor: help;\n border-radius: 50%;\n flex: 0 0 16px;\n justify-content: center;\n align-items: center;\n margin-left: auto;\n font-size: 10px;\n font-weight: 700;\n line-height: 1;\n display: inline-flex;\n position: relative;\n}\n\n.charter-nav__help:hover, .charter-nav__item:focus-visible .charter-nav__help {\n color: var(--charter-brand);\n border-color: var(--charter-brand);\n}\n\n.charter-nav__help:before {\n content: \"?\";\n}\n\n.charter-nav__help:after {\n content: attr(data-tooltip);\n z-index: 30;\n border: 1px solid var(--charter-border);\n width: min(160px, 70vw);\n color: var(--dsw-alias-label-primary, inherit);\n background: var(--dsw-alias-bg-base, #fff);\n box-shadow: 0 6px 18px color-mix(in srgb, var(--dsw-alias-label-primary, #000) 16%, transparent);\n text-align: left;\n white-space: normal;\n visibility: hidden;\n opacity: 0;\n pointer-events: none;\n border-radius: 7px;\n padding: 7px 9px;\n font-size: 10.5px;\n font-weight: 400;\n line-height: 1.45;\n transition: opacity .12s;\n position: absolute;\n top: calc(100% + 6px);\n right: 0;\n}\n\n.charter-nav__help:hover:after, .charter-nav__item:focus-visible .charter-nav__help:after {\n visibility: visible;\n opacity: 1;\n}\n\n.charter-content {\n flex-direction: column;\n gap: 12px;\n min-width: 0;\n display: flex;\n}\n\n.charter-content > * {\n margin-bottom: 0;\n}\n\n.charter-overview-grid {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 12px;\n display: grid;\n}\n\n.charter-statcard {\n min-width: 0;\n color: inherit;\n font: inherit;\n text-align: left;\n cursor: pointer;\n transition: border-color var(--charter-duration) var(--charter-ease), background-color var(--charter-duration) var(--charter-ease);\n gap: 2px;\n display: grid;\n}\n\n.charter-statcard:hover {\n border-color: color-mix(in srgb, var(--charter-brand) 30%, var(--charter-border));\n background: color-mix(in srgb, var(--charter-brand) 3%, var(--charter-surface));\n}\n\n.charter-statcard__value {\n font-variant-numeric: tabular-nums;\n margin-top: 2px;\n font-size: 22px;\n font-weight: 600;\n line-height: 1.2;\n}\n\n.charter-statcard__label {\n color: var(--dsw-alias-label-secondary, #777);\n font-size: 11px;\n}\n\n.charter-statcard__list {\n color: var(--dsw-alias-label-secondary, #777);\n gap: 2px;\n margin-top: 6px;\n font-size: 11.5px;\n line-height: 1.4;\n display: grid;\n}\n\n.charter-statcard__list > span {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n}\n\n.charter-statcard__list em {\n color: var(--dsw-alias-label-tertiary, #999);\n margin-left: 6px;\n font-size: 10px;\n font-style: normal;\n}\n\n.charter-statcard__link {\n color: var(--charter-brand);\n margin-top: 6px;\n font-size: 10.5px;\n font-weight: 600;\n}\n\n.charter-callout {\n border: 1px solid color-mix(in srgb, var(--charter-brand) 34%, var(--charter-border));\n border-radius: var(--charter-radius);\n width: 100%;\n color: inherit;\n background: linear-gradient(180deg, color-mix(in srgb, var(--charter-brand) 5%, var(--charter-surface)), var(--charter-surface));\n font: inherit;\n text-align: left;\n cursor: pointer;\n transition: border-color var(--charter-duration) var(--charter-ease);\n gap: 2px;\n padding: 12px 14px;\n display: grid;\n}\n\n.charter-callout:hover {\n border-color: color-mix(in srgb, var(--charter-brand) 55%, var(--charter-border));\n}\n\n.charter-callout strong {\n font-size: 13.5px;\n font-weight: 600;\n}\n\n.charter-callout > span:not(.charter-kicker, .charter-callout__link) {\n max-width: 72ch;\n color: var(--dsw-alias-label-secondary, #777);\n font-size: 11.5px;\n line-height: 1.45;\n}\n\n.charter-callout__link {\n color: var(--charter-brand);\n margin-top: 3px;\n font-size: 10.5px;\n font-weight: 600;\n}\n\n.charter-empty-actions {\n flex-wrap: wrap;\n gap: 7px;\n margin-top: 8px;\n display: flex;\n}\n\n.charter-budgetgrid {\n color: var(--dsw-alias-label-secondary, #777);\n font-variant-numeric: tabular-nums;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 5px 18px;\n margin-top: 10px;\n font-size: 11.5px;\n line-height: 1.5;\n display: grid;\n}\n\n.charter-hint {\n color: var(--dsw-alias-label-tertiary, #999);\n margin: 0;\n font-size: 10.5px;\n}\n\n.charter-messageproposal__form {\n gap: 10px;\n margin-top: 12px;\n display: grid;\n}\n\n.charter-messageproposal__field {\n min-width: 0;\n color: var(--dsw-alias-label-secondary, #777);\n flex-direction: column;\n gap: 5px;\n font-size: 11px;\n display: flex;\n}\n\n.charter-messageproposal__field select, .charter-messageproposal__field input {\n box-sizing: border-box;\n border: 1px solid var(--charter-border);\n width: 100%;\n min-width: 0;\n max-width: 100%;\n min-height: 32px;\n color: inherit;\n background: var(--charter-surface-2);\n font: inherit;\n text-overflow: ellipsis;\n white-space: nowrap;\n border-radius: 7px;\n outline: 0;\n padding: 0 9px;\n font-size: 12px;\n overflow: hidden;\n}\n\n.charter-messageproposal__field select:focus-visible, .charter-messageproposal__field input:focus-visible {\n border-color: color-mix(in srgb, var(--charter-brand) 55%, var(--charter-border));\n box-shadow: 0 0 0 1px color-mix(in srgb, var(--charter-brand) 32%, transparent);\n}\n\n.charter-messageproposal__picker {\n min-width: 0;\n position: relative;\n}\n\n.charter-messageproposal__trigger {\n box-sizing: border-box;\n border: 1px solid var(--charter-border);\n width: 100%;\n min-width: 0;\n max-width: 100%;\n min-height: 32px;\n color: inherit;\n background: var(--charter-surface-2);\n font: inherit;\n text-align: left;\n cursor: pointer;\n border-radius: 7px;\n justify-content: space-between;\n align-items: center;\n gap: 8px;\n padding: 0 9px;\n font-size: 12px;\n display: flex;\n}\n\n.charter-messageproposal__trigger > span:first-child {\n text-overflow: ellipsis;\n white-space: nowrap;\n min-width: 0;\n overflow: hidden;\n}\n\n.charter-messageproposal__trigger:disabled {\n opacity: .55;\n cursor: default;\n}\n\n.charter-messageproposal__trigger:focus-visible {\n outline: 2px solid var(--charter-brand);\n outline-offset: 1px;\n}\n\n.charter-messageproposal__chevron {\n color: var(--dsw-alias-label-tertiary, #999);\n flex: none;\n}\n\n.charter-messageproposal__menu {\n z-index: 30;\n border: 1px solid var(--charter-border);\n background: var(--charter-surface);\n border-radius: 8px;\n max-height: 240px;\n padding: 4px;\n position: absolute;\n top: calc(100% + 4px);\n left: 0;\n right: 0;\n overflow-y: auto;\n box-shadow: 0 8px 24px #00000038;\n}\n\n.charter-messageproposal__option {\n width: 100%;\n color: inherit;\n font: inherit;\n text-align: left;\n cursor: pointer;\n background: none;\n border: 0;\n border-radius: 6px;\n grid-template-columns: auto minmax(0, 1fr);\n gap: 8px;\n padding: 7px 8px;\n font-size: 11.5px;\n display: grid;\n}\n\n.charter-messageproposal__option:hover, .charter-messageproposal__option.is-selected {\n background: var(--charter-surface-2);\n}\n\n.charter-messageproposal__option:focus-visible {\n outline: 2px solid var(--charter-brand);\n outline-offset: -1px;\n}\n\n.charter-messageproposal__optionseq {\n color: var(--dsw-alias-label-tertiary, #999);\n font-variant-numeric: tabular-nums;\n}\n\n.charter-messageproposal__optiontext {\n text-overflow: ellipsis;\n white-space: nowrap;\n min-width: 0;\n overflow: hidden;\n}\n\n.charter-messageproposal__kind {\n border: 1px solid var(--charter-border);\n background: var(--charter-surface-2);\n border-radius: 8px;\n gap: 2px;\n width: max-content;\n max-width: 100%;\n padding: 2px;\n display: inline-flex;\n}\n\n.charter-messageproposal__choice {\n min-height: 27px;\n color: var(--dsw-alias-label-secondary, #777);\n font: inherit;\n cursor: pointer;\n background: none;\n border: 0;\n border-radius: 6px;\n padding: 0 14px;\n font-size: 12px;\n}\n\n.charter-messageproposal__choice:hover {\n color: var(--dsw-alias-label-primary, inherit);\n background: color-mix(in srgb, var(--charter-surface) 70%, transparent);\n}\n\n.charter-messageproposal__choice.is-active {\n color: var(--dsw-alias-label-primary, inherit);\n background: var(--charter-surface);\n box-shadow: 0 1px 2px color-mix(in srgb, var(--charter-border) 70%, transparent);\n font-weight: 600;\n}\n\n.charter-messageproposal__choice:focus-visible, .charter-messageproposal__textarea:focus-visible {\n outline: 2px solid color-mix(in srgb, var(--charter-brand) 55%, transparent);\n outline-offset: 1px;\n}\n\n.charter-messageproposal__textarea {\n border: 1px solid var(--charter-border);\n width: 100%;\n min-height: 96px;\n color: inherit;\n background: var(--charter-surface-2);\n font: inherit;\n resize: vertical;\n border-radius: 7px;\n outline: 0;\n padding: 9px 10px;\n font-size: 12.5px;\n line-height: 1.55;\n}\n\n.charter-messageproposal__actions {\n flex-wrap: wrap;\n justify-content: flex-end;\n align-items: center;\n gap: 8px;\n padding-top: 1px;\n display: flex;\n}\n\n.charter-messageproposal__actions .charter-budget {\n margin-right: auto;\n}\n\n@container (width <= 560px) {\n .charter-messageproposal__kind {\n width: 100%;\n }\n\n .charter-messageproposal__choice {\n flex: 1;\n }\n\n .charter-messageproposal__actions {\n justify-content: flex-start;\n }\n\n .charter-messageproposal__actions .charter-budget {\n margin-right: 0;\n }\n}\n\n.charter-validator__form {\n gap: 10px;\n margin-top: 10px;\n display: grid;\n}\n\n.charter-validator__field {\n min-width: 0;\n color: var(--dsw-alias-label-secondary, #777);\n flex-direction: column;\n gap: 5px;\n font-size: 11px;\n display: flex;\n}\n\n.charter-validator__field select, .charter-validator__field input {\n box-sizing: border-box;\n text-overflow: ellipsis;\n white-space: nowrap;\n border: 1px solid var(--charter-border);\n width: 100%;\n min-width: 0;\n max-width: 100%;\n min-height: 32px;\n color: inherit;\n background: var(--charter-surface-2);\n font: inherit;\n border-radius: 7px;\n outline: 0;\n padding: 0 9px;\n font-size: 12px;\n overflow: hidden;\n}\n\n.charter-validator__field select:focus-visible, .charter-validator__field input:focus-visible {\n border-color: color-mix(in srgb, var(--charter-brand) 55%, var(--charter-border));\n box-shadow: 0 0 0 1px color-mix(in srgb, var(--charter-brand) 32%, transparent);\n}\n\n.charter-validator__row {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 10px 14px;\n display: grid;\n}\n\n.charter-validator__actions {\n flex-wrap: wrap;\n justify-content: flex-end;\n align-items: center;\n gap: 8px;\n margin-top: 2px;\n display: flex;\n}\n\n.charter-archivecache {\n border: 1px solid var(--charter-border-soft);\n border-radius: var(--charter-radius);\n background: color-mix(in srgb, var(--charter-surface-2) 55%, transparent);\n margin-top: 10px;\n}\n\n.charter-archivecache__head {\n border-bottom: 1px solid var(--charter-border-soft);\n flex-wrap: wrap;\n justify-content: space-between;\n align-items: baseline;\n gap: 4px 10px;\n padding: 9px 11px;\n display: flex;\n}\n\n.charter-archivecache__head strong {\n font-size: 11.5px;\n}\n\n.charter-archivecache__list {\n gap: 2px;\n margin: 0;\n padding: 5px;\n list-style: none;\n display: grid;\n}\n\n.charter-archivecache__item {\n width: 100%;\n color: inherit;\n font: inherit;\n text-align: left;\n cursor: pointer;\n background: none;\n border: 1px solid #0000;\n border-radius: 6px;\n grid-template-columns: minmax(0, 1fr) auto;\n gap: 4px 10px;\n padding: 7px 8px;\n display: grid;\n}\n\n.charter-archivecache__item:hover {\n border-color: var(--charter-border);\n background: var(--charter-surface);\n}\n\n.charter-archivecache__item.is-active {\n border-color: color-mix(in srgb, var(--charter-brand) 45%, var(--charter-border));\n background: var(--charter-surface);\n}\n\n.charter-archivecache__item:focus-visible {\n outline: 2px solid var(--charter-brand);\n outline-offset: 1px;\n}\n\n.charter-archivecache__revision {\n font-size: 12px;\n font-weight: 600;\n}\n\n.charter-archivecache__meta {\n color: var(--dsw-alias-label-tertiary, #999);\n font-variant-numeric: tabular-nums;\n font-size: 10.5px;\n}\n\n.charter-archivecache__empty {\n color: var(--dsw-alias-label-tertiary, #999);\n margin: 0;\n padding: 12px 11px;\n font-size: 11px;\n}\n\n@container (width <= 880px) {\n .charter-columns {\n grid-template-columns: minmax(0, 1fr);\n }\n\n .charter-body {\n display: block;\n }\n\n .charter-nav {\n scrollbar-width: thin;\n flex-wrap: wrap;\n gap: 2px;\n margin-bottom: 12px;\n padding: 5px;\n display: flex;\n position: static;\n overflow: visible;\n }\n\n .charter-nav__label {\n display: none;\n }\n\n .charter-nav__item {\n white-space: nowrap;\n flex: none;\n width: auto;\n }\n\n .charter-nav__item.is-active:before {\n width: auto;\n height: 2px;\n inset: auto 8px 2px;\n }\n\n .charter-overview-grid {\n grid-template-columns: minmax(0, 1fr);\n }\n\n .charter-pagehead {\n flex-direction: column;\n align-items: stretch;\n gap: 10px;\n padding: 2px 0 10px;\n }\n\n .charter-mark {\n width: 28px;\n height: 28px;\n }\n\n .charter-headside {\n justify-items: start;\n width: 100%;\n }\n\n .charter-chips {\n justify-content: flex-start;\n }\n\n .charter-meter {\n text-align: left;\n width: 100%;\n max-width: 320px;\n }\n}\n\n@container (width <= 560px) {\n .charter-validator__row {\n grid-template-columns: minmax(0, 1fr);\n }\n\n .charter-shell {\n padding-inline: 12px;\n }\n\n .charter-budgetgrid {\n grid-template-columns: minmax(0, 1fr);\n }\n\n .charter-card {\n padding: 12px;\n }\n\n .charter-cardhead {\n flex-direction: column;\n align-items: stretch;\n gap: 8px;\n }\n\n .charter-cardtools {\n justify-content: space-between;\n }\n\n .charter-item__actions {\n box-shadow: none;\n backdrop-filter: none;\n opacity: 1;\n pointer-events: auto;\n background: none;\n border: 0;\n justify-content: flex-start;\n margin-left: 15px;\n padding: 0;\n position: static;\n }\n\n .charter-actionbar {\n flex-direction: column;\n align-items: stretch;\n }\n\n .charter-actionbar__actions {\n grid-template-columns: 1fr 1fr;\n display: grid;\n }\n\n .charter-actionbar__actions > .charter-actionbar__primary {\n grid-column: 1 / -1;\n }\n}\n\n@media (hover: none) {\n .charter-item__actions {\n box-shadow: none;\n backdrop-filter: none;\n opacity: 1;\n pointer-events: auto;\n background: none;\n border: 0;\n justify-content: flex-start;\n margin-left: 15px;\n padding: 0;\n position: static;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .charter-root *, .charter-root :before, .charter-root :after {\n transition-duration: .01ms !important;\n }\n}\n\n[data-conversation-scroll]:has(.charter-root) > [data-composer-seat]:not(:has([data-approval-key], [data-question-key], [data-plan-review-key])), [data-conversation-scroll]:has(.charter-root) ~ [data-width-handle] {\n display: none;\n}\n\n.charter-disclaimer {\n color: var(--dsw-alias-label-secondary, #666);\n margin: 2px 0 0;\n font-size: 11px;\n line-height: 1.4;\n}\n\n.charter-item.is-staged {\n box-shadow: inset 2px 0 0 var(--dsw-alias-brand-primary, #4b6bfb);\n}\n\n.charter-item__menu {\n position: relative;\n}\n\n.charter-item__menu > summary {\n cursor: pointer;\n list-style: none;\n}\n\n.charter-item__menu > summary::-webkit-details-marker {\n display: none;\n}\n\n.charter-item__menulist {\n z-index: 6;\n border: 1px solid var(--charter-border-soft);\n background: var(--dsw-alias-bg-base, #fff);\n min-width: 168px;\n box-shadow: 0 6px 18px color-mix(in srgb, var(--dsw-alias-label-primary, #000) 14%, transparent);\n border-radius: 8px;\n flex-direction: column;\n padding: 4px;\n display: flex;\n position: absolute;\n top: calc(100% + 4px);\n right: 0;\n}\n\n.charter-item__menulist button {\n min-height: 36px;\n color: inherit;\n font: inherit;\n text-align: left;\n cursor: pointer;\n background: none;\n border: 0;\n border-radius: 6px;\n padding: 6px 10px;\n}\n\n.charter-item__menulist button:hover, .charter-item__menulist button:focus-visible {\n background: var(--dsw-alias-interactive-bg-hover, #7f7f7f1a);\n}\n\n.charter-historytoggle {\n border: 1px dashed var(--charter-border-soft);\n color: var(--dsw-alias-label-secondary, #666);\n font: inherit;\n cursor: pointer;\n background: none;\n border-radius: 7px;\n align-self: flex-start;\n margin-top: 6px;\n padding: 4px 8px;\n font-size: 12px;\n}\n\n.charter-historytoggle:hover {\n background: var(--dsw-alias-interactive-bg-hover, #7f7f7f14);\n}\n\n.charter-bootstrap__summary {\n flex-wrap: wrap;\n align-items: center;\n gap: 8px;\n margin: 8px 0;\n display: flex;\n}\n\n.charter-draftfield__meta {\n flex-wrap: wrap;\n justify-content: space-between;\n align-items: center;\n gap: 6px;\n display: flex;\n}\n\n.charter-callout--static {\n cursor: default;\n}\n\n.charter-callout__actions {\n flex-wrap: wrap;\n gap: 8px;\n margin-top: 6px;\n display: flex;\n}\n\n.charter-editor__reasonfield {\n color: var(--dsw-alias-label-secondary, #666);\n flex-direction: column;\n gap: 4px;\n font-size: 12px;\n display: flex;\n}\n\n.charter-actionbar__hint {\n color: var(--dsw-alias-label-tertiary, #888);\n margin-top: 2px;\n font-size: 11px;\n display: block;\n}\n\n.charter-item__actions {\n align-items: center;\n gap: 2px;\n}\n\n.charter-recovery__facts, .charter-recovery__preview dl {\n grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));\n gap: 8px 16px;\n margin: 10px 0;\n padding: 0;\n display: grid;\n}\n\n.charter-recovery__facts > div, .charter-recovery__preview dl > div {\n min-width: 0;\n}\n\n.charter-recovery__facts dt, .charter-recovery__preview dt {\n color: var(--dsw-alias-label-tertiary, #7f7f7fd9);\n text-transform: uppercase;\n letter-spacing: .04em;\n margin: 0;\n font-size: 11px;\n}\n\n.charter-recovery__facts dd, .charter-recovery__preview dd {\n overflow-wrap: anywhere;\n font-variant-numeric: tabular-nums;\n margin: 2px 0 0;\n}\n\n.charter-recovery__actions, .charter-recovery__danger, .charter-recovery__file, .charter-recovery__preview {\n flex-wrap: wrap;\n align-items: center;\n gap: 8px 12px;\n margin-top: 10px;\n display: flex;\n}\n\n.charter-recovery__import {\n margin-top: 12px;\n}\n\n.charter-recovery__import > summary {\n color: var(--dsw-alias-label-primary, inherit);\n cursor: pointer;\n font-size: 11px;\n font-weight: 600;\n line-height: 1.4;\n}\n\n.charter-recovery__import[open] > summary {\n margin-bottom: 4px;\n}\n\n.charter-recovery__file {\n flex-direction: column;\n align-items: flex-start;\n gap: 6px;\n width: 100%;\n margin-top: 8px;\n}\n\n.charter-recovery__file input[type=\"file\"] {\n box-sizing: border-box;\n border: 1px dashed var(--charter-border);\n border-radius: var(--charter-radius);\n background: var(--charter-surface);\n width: 100%;\n max-width: 640px;\n color: inherit;\n font: inherit;\n cursor: pointer;\n padding: 5px 7px;\n font-size: 11.5px;\n}\n\n.charter-recovery__file input[type=\"file\"]::file-selector-button {\n border: 1px solid var(--charter-border);\n color: var(--dsw-alias-label-primary, inherit);\n background: var(--charter-surface-2);\n font: inherit;\n cursor: pointer;\n border-radius: 5px;\n margin: 0 8px 0 0;\n padding: 3px 9px;\n font-size: 11px;\n}\n\n.charter-recovery__file input[type=\"file\"]:focus-visible, .charter-recovery__actions .charter-button:focus-visible {\n outline: 2px solid var(--charter-brand);\n outline-offset: 2px;\n}\n\n.charter-recovery__preview {\n border: 1px solid var(--charter-border-soft);\n border-radius: var(--charter-radius);\n background: var(--charter-surface);\n flex-direction: column;\n align-items: stretch;\n padding: 10px 12px;\n}\n\n.charter-recovery__preview dl {\n margin: 6px 0 0;\n}\n\n.charter-recovery__danger {\n border: 1px solid var(--charter-warn);\n border-radius: var(--charter-radius);\n background: var(--charter-surface-2);\n flex-direction: column;\n align-items: flex-start;\n padding: 10px 12px;\n}\n\n@container (width <= 520px) {\n .charter-recovery__facts, .charter-recovery__preview dl {\n grid-template-columns: 1fr;\n }\n\n .charter-recovery__actions {\n flex-direction: column;\n align-items: stretch;\n }\n}\n\n.charter-bootstrap__group {\n gap: 2px;\n margin-top: 8px;\n display: grid;\n}\n\n.charter-bootstrap__group h4 {\n color: var(--dsw-alias-label-secondary, #777);\n letter-spacing: .03em;\n text-transform: uppercase;\n margin: 6px 0 2px;\n font-size: 10.5px;\n font-weight: 600;\n}\n\n.charter-bootstrap__checklabel, .charter-bootstrap__textlabel {\n color: var(--dsw-alias-label-tertiary, #999);\n font-size: 10px;\n}\n\n.charter-bootstrap__checklabel {\n cursor: pointer;\n flex: none;\n margin-top: 7px;\n}\n\n.charter-bootstrap__textlabel {\n justify-self: start;\n}\n\n.charter-error-details {\n color: var(--dsw-alias-label-secondary, #777);\n margin: 4px 0;\n font-size: 11px;\n}\n\n.charter-error-details summary {\n cursor: pointer;\n}\n\n.charter-error-details pre {\n border: 1px solid var(--charter-border-soft);\n background: var(--charter-surface-2);\n max-height: 180px;\n color: var(--dsw-alias-label-primary, inherit);\n white-space: pre-wrap;\n overflow-wrap: anywhere;\n border-radius: 6px;\n margin: 4px 0 0;\n padding: 6px 8px;\n font-size: 11px;\n overflow: auto;\n}\n\n@media (hover: none) {\n .charter-nav__item:focus .charter-nav__help:after {\n visibility: visible;\n opacity: 1;\n }\n}\n\n@media (width <= 640px), (pointer: coarse) {\n .charter-progress select, .charter-item__menulist button, .charter-preview__view, .charter-actionbar__actions .charter-button, .charter-bootstrap__summary .charter-button, .charter-add__foot .charter-button, .charter-recovery__actions .charter-button, .charter-nav__item {\n min-height: 44px;\n }\n\n .charter-actionbar__actions, .charter-bootstrap__summary, .charter-add__foot, .charter-bootstrap__item {\n flex-wrap: wrap;\n }\n\n .charter-bootstrap__item .charter-draftfield {\n min-width: min(100%, 220px);\n }\n}\n\n.charter-dependency-list {\n gap: 6px;\n margin: 0;\n padding: 0;\n list-style: none;\n display: grid;\n}\n\n.charter-dependency {\n border: 1px solid var(--charter-border-soft);\n border-radius: 7px;\n grid-template-columns: auto minmax(0, 1fr) auto;\n align-items: baseline;\n gap: 8px;\n padding: 8px 10px;\n display: grid;\n}\n\n.charter-dependency.is-dependency-conflict {\n border-color: var(--charter-danger);\n}\n\n.charter-dependency__key {\n color: var(--charter-brand);\n font-size: 11px;\n font-weight: 700;\n}\n\n.charter-dependency__text {\n overflow-wrap: anywhere;\n min-width: 0;\n}\n\n.charter-dependency__status {\n color: var(--dsw-alias-label-tertiary, inherit);\n font-size: 11px;\n}\n\n.charter-dependency__requires {\n color: var(--dsw-alias-label-tertiary, inherit);\n grid-column: 2 / -1;\n font-size: 11px;\n}\n\n.charter-dependency__select {\n box-sizing: border-box;\n text-overflow: ellipsis;\n border: 1px solid var(--charter-border-soft);\n background: var(--charter-surface-2);\n width: 100%;\n min-width: 0;\n max-width: 100%;\n min-height: 28px;\n color: inherit;\n font: inherit;\n border-radius: 6px;\n grid-column: 2 / -1;\n font-size: 11px;\n overflow: hidden;\n}\n\n.charter-batch-list {\n gap: 4px;\n margin: 0;\n padding: 0;\n list-style: none;\n display: grid;\n}\n\n.charter-batch {\n border-bottom: 1px solid var(--charter-border-soft);\n flex-wrap: wrap;\n gap: 10px;\n padding: 8px 10px;\n font-size: 11px;\n display: flex;\n}\n\n.charter-batch__source {\n font-weight: 600;\n}\n\n.charter-batch__revision, .charter-batch__count {\n color: var(--dsw-alias-label-tertiary, inherit);\n}\n\n.charter-changeset__body {\n color: var(--dsw-alias-label-tertiary, inherit);\n flex-wrap: wrap;\n gap: 12px;\n font-size: 11px;\n display: flex;\n}\n\n.charter-changeset__conflicts {\n gap: 4px;\n margin: 6px 0 0;\n padding: 0;\n font-size: 12px;\n list-style: none;\n display: grid;\n}\n\n.charter-changeset__conflicts li {\n grid-template-columns: auto minmax(0, 1fr) auto;\n align-items: baseline;\n gap: 8px;\n display: grid;\n}\n\n.charter-changeset__conflicttext {\n overflow-wrap: anywhere;\n min-width: 0;\n}\n\n.charter-proposal-list {\n gap: 8px;\n margin: 0;\n padding: 0;\n list-style: none;\n display: grid;\n}\n\n.charter-proposal {\n border: 1px solid var(--charter-border-soft);\n border-radius: 7px;\n gap: 6px;\n padding: 8px 10px;\n display: grid;\n}\n\n.charter-proposal__text {\n overflow-wrap: anywhere;\n margin: 0;\n}\n\n.charter-proposal__meta {\n color: var(--dsw-alias-label-tertiary, inherit);\n font-size: 11px;\n}\n\n.charter-proposal__reason, .charter-proposal__actions {\n grid-column: 1 / -1;\n}\n\n.charter-proposal__reason {\n border: 1px solid var(--charter-border-soft);\n background: var(--charter-surface-2);\n min-height: 28px;\n color: inherit;\n font: inherit;\n border-radius: 6px;\n padding: 4px 6px;\n font-size: 12px;\n}\n\n.charter-proposal__actions {\n flex-wrap: wrap;\n gap: 8px;\n display: flex;\n}\n\n.charter-timeline {\n gap: 4px;\n margin: 0;\n padding: 0;\n list-style: none;\n display: grid;\n}\n\n.charter-timeline__row {\n border-bottom: 1px solid var(--charter-border-soft);\n grid-template-columns: auto minmax(0, 1fr) auto;\n gap: 8px;\n padding: 8px 10px;\n font-size: 12px;\n display: grid;\n}\n\n.charter-timeline__kind, .charter-timeline__state, .charter-timeline__lineage {\n color: var(--dsw-alias-label-tertiary, inherit);\n font-size: 11px;\n}\n\n.charter-timeline__text {\n overflow-wrap: anywhere;\n min-width: 0;\n}\n\n.charter-notice--danger {\n border-color: var(--charter-danger);\n color: var(--charter-danger);\n}\n\n.charter-dependency-layout {\n flex-wrap: wrap;\n align-items: start;\n gap: 12px;\n display: flex;\n}\n\n.charter-dependency-listwrap {\n flex: 20em;\n min-width: 20rem;\n}\n\n.charter-graph {\n flex: 3 35em;\n min-width: 0;\n}\n\n.charter-dependency-layout.is-graph-hidden .charter-dependency-listwrap {\n flex: 100%;\n}\n\n.charter-graph__skip {\n clip: rect(0 0 0 0);\n white-space: nowrap;\n border: 0;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n position: absolute;\n overflow: hidden;\n}\n\n.charter-graph__skip:focus {\n clip: auto;\n width: auto;\n height: auto;\n color: var(--charter-brand);\n margin: 0 0 6px;\n font-size: 11px;\n position: static;\n}\n\n.charter-graph {\n border: 1px solid var(--charter-border-soft);\n background: var(--charter-surface-2);\n border-radius: 7px;\n min-width: 0;\n max-width: 100%;\n padding: 10px;\n}\n\n.charter-graph__toolbar {\n border: 1px solid var(--charter-border-soft);\n background: var(--charter-surface);\n border-radius: 6px;\n flex-wrap: wrap;\n align-items: center;\n gap: 10px 16px;\n margin-bottom: 10px;\n padding: 8px 10px;\n display: flex;\n}\n\n.charter-graph__toolbar-title {\n margin-right: auto;\n}\n\n.charter-graph__toolbar-title h4 {\n margin: 1px 0 0;\n font-size: 13px;\n}\n\n.charter-graph__toolbar-title .charter-kicker {\n font-size: 10px;\n}\n\n.charter-graph__control {\n min-width: 0;\n color: var(--dsw-alias-label-tertiary, inherit);\n align-items: center;\n gap: 6px;\n font-size: 11px;\n display: flex;\n}\n\n.charter-graph__control select {\n box-sizing: border-box;\n border: 1px solid var(--charter-border-soft);\n min-width: 10em;\n max-width: 20em;\n min-height: 44px;\n color: inherit;\n background: var(--charter-surface);\n font: inherit;\n border-radius: 5px;\n padding: 0 8px;\n font-size: 11px;\n}\n\n.charter-graph__control button {\n border: 1px solid var(--charter-border-soft);\n min-height: 44px;\n color: inherit;\n background: var(--charter-surface);\n font: inherit;\n cursor: pointer;\n border-radius: 5px;\n padding: 0 7px;\n font-size: 11px;\n}\n\n.charter-graph__control button[aria-pressed=\"true\"] {\n border-color: var(--charter-brand);\n color: var(--charter-brand);\n}\n\n.charter-graph__check {\n cursor: pointer;\n}\n\n.charter-graph__hint {\n margin: 0 0 6px;\n font-size: 10px;\n}\n\n.charter-graph__help {\n color: var(--dsw-alias-label-tertiary, inherit);\n margin-top: 6px;\n font-size: 10px;\n}\n\n.charter-graph__help summary {\n cursor: pointer;\n}\n\n.charter-graph__help p {\n margin: 4px 0 0;\n font-size: 10px;\n line-height: 1.45;\n}\n\n.charter-graph__viewport {\n box-sizing: border-box;\n border: 1px solid var(--charter-border-soft);\n background: var(--charter-surface);\n border-radius: 6px;\n width: 100%;\n min-height: 0;\n max-height: 460px;\n overflow: auto;\n}\n\n.charter-graph__viewport:focus-visible {\n outline: 2px solid var(--charter-brand);\n outline-offset: 2px;\n}\n\n.charter-graph__canvas {\n min-width: 0;\n min-height: 0;\n margin: 0 auto;\n font-size: 1rem;\n position: relative;\n}\n\n.charter-graph__svg {\n pointer-events: none;\n width: 100%;\n height: 100%;\n position: absolute;\n top: 0;\n left: 0;\n overflow: visible;\n}\n\n.charter-graph__edge-line {\n fill: none;\n stroke: var(--charter-border-strong, #aaa);\n stroke-width: .09375px;\n}\n\n.charter-graph__edge.is-requires.is-staged-added .charter-graph__edge-line {\n stroke: var(--charter-brand);\n stroke-dasharray: 4 3;\n}\n\n.charter-graph__edge.is-requires.is-staged-removed .charter-graph__edge-line {\n stroke: var(--charter-danger);\n stroke-dasharray: 3 3;\n}\n\n.charter-graph__edge.is-proposed .charter-graph__edge-line {\n stroke: var(--dsw-alias-label-tertiary, #999);\n stroke-dasharray: 2 4;\n}\n\n.charter-graph__edge.is-supersedes .charter-graph__edge-line {\n stroke: var(--dsw-alias-label-tertiary, #999);\n stroke-dasharray: 1 3;\n}\n\n.charter-graph__edge-removed {\n fill: none;\n stroke: var(--charter-danger);\n stroke-width: .1875px;\n opacity: .25;\n}\n\n.charter-graph__node {\n box-sizing: border-box;\n border: 1px solid var(--charter-border-strong, #aaa);\n border-left: 3px solid var(--charter-border-strong, #aaa);\n color: var(--charter-text, inherit);\n background: var(--charter-surface);\n font: inherit;\n text-align: left;\n cursor: pointer;\n border-radius: 7px;\n grid-template-rows: auto auto auto;\n align-content: start;\n gap: .0625em;\n padding: .25em .375em;\n display: grid;\n position: absolute;\n overflow: hidden;\n}\n\n.charter-graph__node.is-ready {\n border-left-color: var(--charter-success);\n}\n\n.charter-graph__node.is-in-progress {\n border-left-color: var(--charter-brand);\n}\n\n.charter-graph__node.is-blocked {\n border-left-color: var(--charter-warn);\n}\n\n.charter-graph__node.is-dependency-conflict {\n border-color: var(--charter-danger);\n border-left-color: var(--charter-danger);\n}\n\n.charter-graph__node.is-candidate, .charter-graph__node.is-history {\n border-style: dashed;\n}\n\n.charter-graph__node.is-staged-added {\n box-shadow: 0 0 0 2px color-mix(in srgb, var(--charter-brand) 30%, transparent);\n}\n\n.charter-graph__node.is-staged-changed {\n border-style: double;\n}\n\n.charter-graph__node.is-staged-removed {\n opacity: .55;\n border-style: dotted;\n text-decoration: line-through;\n}\n\n.charter-graph__node:focus-visible {\n outline: 2px solid var(--charter-brand);\n outline-offset: 2px;\n}\n\n.charter-graph__node[aria-current=\"true\"] {\n background: color-mix(in srgb, var(--charter-brand) 8%, var(--charter-surface));\n}\n\n.charter-graph__nodekey {\n color: var(--charter-brand);\n font-size: .625em;\n font-weight: 700;\n}\n\n.charter-graph__nodetext {\n overflow-wrap: anywhere;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n font-size: .78em;\n line-height: 1.2;\n display: -webkit-box;\n overflow: hidden;\n}\n\n.charter-graph__nodestatus {\n color: var(--dsw-alias-label-tertiary, inherit);\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: .6875em;\n overflow: hidden;\n}\n\n.charter-graph__edgehit {\n cursor: pointer;\n background: none;\n border: 0;\n border-radius: 50%;\n width: 44px;\n height: 44px;\n padding: 0;\n position: absolute;\n transform: translate(-50%, -50%);\n}\n\n.charter-graph__edgehit:focus-visible {\n outline: 2px solid var(--charter-brand);\n outline-offset: 1px;\n}\n\n.charter-graph__footer {\n color: var(--dsw-alias-label-tertiary, inherit);\n flex-wrap: wrap;\n justify-content: flex-start;\n gap: 8px;\n margin-top: 4px;\n font-size: 11px;\n display: flex;\n}\n\n.charter-graph__live {\n overflow-wrap: anywhere;\n min-width: 0;\n}\n\n.charter-graph__inspector {\n border: 1px solid var(--charter-border-soft);\n background: var(--charter-surface);\n border-radius: 6px;\n margin-top: 8px;\n padding: 8px;\n}\n\n.charter-graph__inspectorhead {\n justify-content: space-between;\n align-items: center;\n gap: 8px;\n display: flex;\n}\n\n.charter-graph__inspectorhead h4 {\n margin: 0;\n font-size: 12px;\n}\n\n.charter-graph__inspectortext {\n overflow-wrap: anywhere;\n margin: 6px 0;\n font-size: 12px;\n}\n\n.charter-graph__inspectormeta {\n gap: 3px;\n margin: 0;\n font-size: 11px;\n display: grid;\n}\n\n.charter-graph__inspectormeta div {\n gap: 6px;\n display: flex;\n}\n\n.charter-graph__inspectormeta dt {\n color: var(--dsw-alias-label-tertiary, inherit);\n}\n\n.charter-graph__inspectormeta dd {\n overflow-wrap: anywhere;\n margin: 0;\n}\n\n.charter-graph__inspectoractions {\n gap: 5px;\n margin-top: 6px;\n display: grid;\n}\n\n.charter-graph__inspectoractions select {\n box-sizing: border-box;\n width: 100%;\n min-height: 44px;\n font: inherit;\n font-size: 11px;\n}\n\n.charter-graph__inspectoractions .charter-linkbutton {\n justify-self: start;\n}\n\n.charter-linkbutton {\n color: var(--charter-brand);\n font: inherit;\n text-align: left;\n cursor: pointer;\n background: none;\n border: 0;\n padding: 1px 3px;\n font-size: 11px;\n}\n\n.charter-linkbutton:hover {\n text-decoration: underline;\n}\n\n.charter-linkbutton:focus-visible {\n outline: 2px solid var(--charter-brand);\n outline-offset: 1px;\n}\n\n.charter-dependency__locate {\n justify-self: start;\n}\n\n@media (forced-colors: active) {\n .charter-graph__node {\n color: canvastext;\n background: canvas;\n border: 1px solid canvastext;\n }\n\n .charter-graph__node.is-candidate, .charter-graph__node.is-history {\n border-style: dashed;\n }\n\n .charter-graph__node.is-staged-changed {\n border-style: double;\n }\n\n .charter-graph__node.is-staged-removed {\n border-style: dotted;\n }\n\n .charter-graph__node:focus-visible, .charter-graph__edgehit:focus-visible {\n outline: 2px solid highlight;\n }\n\n .charter-graph__edge-line, .charter-graph__edge-removed {\n stroke: canvastext;\n }\n}\n\n.charter-dependency {\n padding: 7px 9px;\n display: block;\n}\n\n.charter-dependency__row {\n grid-template-columns: auto minmax(0, 1fr) auto;\n align-items: start;\n gap: 8px;\n display: grid;\n}\n\n.charter-dependency__main {\n gap: 3px;\n min-width: 0;\n display: grid;\n}\n\n.charter-dependency__text {\n overflow-wrap: anywhere;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n display: -webkit-box;\n overflow: hidden;\n}\n\n.charter-dependency__meta {\n color: var(--dsw-alias-label-tertiary, inherit);\n flex-wrap: wrap;\n align-items: center;\n gap: 4px 8px;\n font-size: 11px;\n display: flex;\n}\n\n.charter-dependency__meta .charter-dependency__status.is-ready {\n color: var(--charter-success);\n}\n\n.charter-dependency__meta .charter-dependency__status.is-waiting {\n color: var(--charter-warn, inherit);\n}\n\n.charter-dependency__meta .charter-dependency__status.is-dependency-conflict, .charter-dependency__meta .charter-dependency__status.is-conflict {\n color: var(--charter-danger);\n}\n\n.charter-dependency__actions {\n flex-wrap: wrap;\n justify-content: end;\n gap: 2px 6px;\n display: inline-flex;\n}\n\n.charter-dependency__editor {\n border: 1px solid var(--charter-border-soft);\n background: var(--charter-surface-2);\n border-radius: 6px;\n gap: 4px;\n max-height: 220px;\n margin: 7px 0 0 24px;\n padding: 7px 9px;\n display: grid;\n overflow: auto;\n}\n\n.charter-dependency__editor legend {\n color: var(--dsw-alias-label-tertiary, inherit);\n padding: 0 4px;\n font-size: 10px;\n}\n\n.charter-dependency__editor label {\n align-items: center;\n gap: 6px;\n min-width: 0;\n min-height: 44px;\n font-size: 11px;\n display: flex;\n}\n\n.charter-dependency__editor label span {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n}\n";
|
|
7
7
|
const __charterStyleSelector = 'style[data-plugin-css="dsh-charter/charter.css"]';
|
|
8
8
|
if (typeof document !== 'undefined' && document.querySelector(__charterStyleSelector) === null) {
|
|
9
9
|
const style = document.createElement('style');
|
|
@@ -6596,6 +6596,8 @@ const charterMessageListSchema = discriminatedUnion("ok", [object({
|
|
|
6596
6596
|
seq: number().int().nonnegative(),
|
|
6597
6597
|
role: literal("user"),
|
|
6598
6598
|
excerpt: string(),
|
|
6599
|
+
text: string().optional(),
|
|
6600
|
+
truncated: boolean().optional(),
|
|
6599
6601
|
length: number().int().nonnegative()
|
|
6600
6602
|
}).strict())
|
|
6601
6603
|
}).strict(), object({
|
|
@@ -6607,9 +6609,40 @@ const charterMessageProposeRequestSchema = object({
|
|
|
6607
6609
|
sessionId: string().min(1),
|
|
6608
6610
|
seq: number().int().nonnegative().optional(),
|
|
6609
6611
|
kind: _enum(["invariant", "deliverable"]).optional(),
|
|
6612
|
+
text: string().max(65536).optional(),
|
|
6610
6613
|
start: number().int().nonnegative().optional(),
|
|
6611
6614
|
end: number().int().nonnegative().optional()
|
|
6612
6615
|
}).strict();
|
|
6616
|
+
const charterArchiveEntrySchema = object({
|
|
6617
|
+
key: string().min(1),
|
|
6618
|
+
revision: number().int().nonnegative(),
|
|
6619
|
+
archivedAt: number().int().nonnegative(),
|
|
6620
|
+
payloadDigest: string(),
|
|
6621
|
+
recordDigest: string(),
|
|
6622
|
+
lifecycle: string().nullable()
|
|
6623
|
+
}).strict();
|
|
6624
|
+
const charterArchiveListRequestSchema = object({ sessionId: string().min(1) }).strict();
|
|
6625
|
+
const charterArchiveReadRequestSchema = object({
|
|
6626
|
+
sessionId: string().min(1),
|
|
6627
|
+
key: string().min(1)
|
|
6628
|
+
}).strict();
|
|
6629
|
+
const charterArchiveListResultSchema = discriminatedUnion("ok", [object({
|
|
6630
|
+
ok: literal(true),
|
|
6631
|
+
archives: array(charterArchiveEntrySchema),
|
|
6632
|
+
limit: number().int().positive()
|
|
6633
|
+
}).strict(), object({
|
|
6634
|
+
ok: literal(false),
|
|
6635
|
+
code: charterErrorCodeSchema,
|
|
6636
|
+
message: string()
|
|
6637
|
+
}).strict()]);
|
|
6638
|
+
const charterArchiveReadResultSchema = discriminatedUnion("ok", [object({
|
|
6639
|
+
ok: literal(true),
|
|
6640
|
+
archive: charterRecordArchiveSchema
|
|
6641
|
+
}).strict(), object({
|
|
6642
|
+
ok: literal(false),
|
|
6643
|
+
code: charterErrorCodeSchema,
|
|
6644
|
+
message: string()
|
|
6645
|
+
}).strict()]);
|
|
6613
6646
|
const charterSourceIntegrityResultSchema = discriminatedUnion("ok", [object({
|
|
6614
6647
|
ok: literal(true),
|
|
6615
6648
|
revision: number().int().nonnegative(),
|
|
@@ -6663,6 +6696,22 @@ const charterValidatorRunResultSchema = discriminatedUnion("ok", [object({
|
|
|
6663
6696
|
code: charterErrorCodeSchema,
|
|
6664
6697
|
message: string()
|
|
6665
6698
|
}).strict()]);
|
|
6699
|
+
const charterDependencyConflictRefSchema = object({
|
|
6700
|
+
itemId: string(),
|
|
6701
|
+
before: _enum([
|
|
6702
|
+
"satisfied",
|
|
6703
|
+
"waiting",
|
|
6704
|
+
"dependency-conflict",
|
|
6705
|
+
"absent"
|
|
6706
|
+
]),
|
|
6707
|
+
after: _enum([
|
|
6708
|
+
"satisfied",
|
|
6709
|
+
"waiting",
|
|
6710
|
+
"dependency-conflict"
|
|
6711
|
+
]),
|
|
6712
|
+
beforeConflicts: number().int().nonnegative(),
|
|
6713
|
+
afterConflicts: number().int().nonnegative()
|
|
6714
|
+
}).strict();
|
|
6666
6715
|
const charterChangeSetPreviewResultSchema = discriminatedUnion("ok", [object({
|
|
6667
6716
|
ok: literal(true),
|
|
6668
6717
|
previewDigest: string(),
|
|
@@ -6680,7 +6729,11 @@ const charterChangeSetPreviewResultSchema = discriminatedUnion("ok", [object({
|
|
|
6680
6729
|
}).strict(),
|
|
6681
6730
|
changes: array(charterChangeSchema),
|
|
6682
6731
|
promptChanged: boolean(),
|
|
6683
|
-
metadataOnly: boolean()
|
|
6732
|
+
metadataOnly: boolean(),
|
|
6733
|
+
dependencyConflicts: object({
|
|
6734
|
+
added: array(charterDependencyConflictRefSchema),
|
|
6735
|
+
worsened: array(charterDependencyConflictRefSchema)
|
|
6736
|
+
}).strict().optional()
|
|
6684
6737
|
}).strict(), object({
|
|
6685
6738
|
ok: literal(false),
|
|
6686
6739
|
code: charterErrorCodeSchema,
|
|
@@ -6943,6 +6996,50 @@ const charterRemoteContribution = {
|
|
|
6943
6996
|
create: () => charterMessageListSchema
|
|
6944
6997
|
}
|
|
6945
6998
|
},
|
|
6999
|
+
{
|
|
7000
|
+
id: "dsh-charter#charter/listArchives",
|
|
7001
|
+
service: "charterRemote",
|
|
7002
|
+
namespace: "charter",
|
|
7003
|
+
method: "listArchives",
|
|
7004
|
+
invocation: { kind: "direct" },
|
|
7005
|
+
parameters: [{
|
|
7006
|
+
name: "request",
|
|
7007
|
+
wire: "request",
|
|
7008
|
+
source: "json",
|
|
7009
|
+
codec: {
|
|
7010
|
+
mode: "strict",
|
|
7011
|
+
typeSymbol: "dsh-charter/CharterArchiveListRequest",
|
|
7012
|
+
create: () => charterArchiveListRequestSchema
|
|
7013
|
+
}
|
|
7014
|
+
}],
|
|
7015
|
+
result: {
|
|
7016
|
+
mode: "strict",
|
|
7017
|
+
typeSymbol: "dsh-charter/CharterArchiveListResult",
|
|
7018
|
+
create: () => charterArchiveListResultSchema
|
|
7019
|
+
}
|
|
7020
|
+
},
|
|
7021
|
+
{
|
|
7022
|
+
id: "dsh-charter#charter/readArchive",
|
|
7023
|
+
service: "charterRemote",
|
|
7024
|
+
namespace: "charter",
|
|
7025
|
+
method: "readArchive",
|
|
7026
|
+
invocation: { kind: "direct" },
|
|
7027
|
+
parameters: [{
|
|
7028
|
+
name: "request",
|
|
7029
|
+
wire: "request",
|
|
7030
|
+
source: "json",
|
|
7031
|
+
codec: {
|
|
7032
|
+
mode: "strict",
|
|
7033
|
+
typeSymbol: "dsh-charter/CharterArchiveReadRequest",
|
|
7034
|
+
create: () => charterArchiveReadRequestSchema
|
|
7035
|
+
}
|
|
7036
|
+
}],
|
|
7037
|
+
result: {
|
|
7038
|
+
mode: "strict",
|
|
7039
|
+
typeSymbol: "dsh-charter/CharterArchiveReadResult",
|
|
7040
|
+
create: () => charterArchiveReadResultSchema
|
|
7041
|
+
}
|
|
7042
|
+
},
|
|
6946
7043
|
{
|
|
6947
7044
|
id: "dsh-charter#charter/proposeMessage",
|
|
6948
7045
|
service: "charterRemote",
|
|
@@ -9503,6 +9600,33 @@ function messageOf(error) {
|
|
|
9503
9600
|
return error instanceof Error ? error.message : String(error);
|
|
9504
9601
|
}
|
|
9505
9602
|
const ATTACH_TIMEOUT_MS = 15e3;
|
|
9603
|
+
function batchIntegrityOf(view) {
|
|
9604
|
+
return JSON.stringify((view.proposalBatches ?? []).map((batch) => [batch.id, batch.sourceIntegrity ?? null]));
|
|
9605
|
+
}
|
|
9606
|
+
/**
|
|
9607
|
+
* `accept()` may publish the Host frame before the query plane has enriched
|
|
9608
|
+
* proposal batches with source integrity. Carry the richer same-revision
|
|
9609
|
+
* batches forward; a later query frame can then refresh them.
|
|
9610
|
+
*/
|
|
9611
|
+
function carryBatchIntegrity(next, current) {
|
|
9612
|
+
if (next.proposalBatches === void 0 || current.proposalBatches === void 0) return next;
|
|
9613
|
+
const previous = new Map(current.proposalBatches.map((batch) => [batch.id, batch]));
|
|
9614
|
+
let changed = false;
|
|
9615
|
+
const proposalBatches = next.proposalBatches.map((batch) => {
|
|
9616
|
+
if (batch.sourceIntegrity !== void 0) return batch;
|
|
9617
|
+
const earlier = previous.get(batch.id);
|
|
9618
|
+
if (earlier?.sourceIntegrity === void 0) return batch;
|
|
9619
|
+
changed = true;
|
|
9620
|
+
return {
|
|
9621
|
+
...batch,
|
|
9622
|
+
sourceIntegrity: earlier.sourceIntegrity
|
|
9623
|
+
};
|
|
9624
|
+
});
|
|
9625
|
+
return changed ? {
|
|
9626
|
+
...next,
|
|
9627
|
+
proposalBatches
|
|
9628
|
+
} : next;
|
|
9629
|
+
}
|
|
9506
9630
|
var CharterSessionSource = class {
|
|
9507
9631
|
ctx;
|
|
9508
9632
|
sessionId;
|
|
@@ -9639,6 +9763,31 @@ var CharterSessionSource = class {
|
|
|
9639
9763
|
if (!result.ok) throw result.error;
|
|
9640
9764
|
return result.value;
|
|
9641
9765
|
};
|
|
9766
|
+
listArchives = async () => {
|
|
9767
|
+
const remote = this.remote;
|
|
9768
|
+
if (remote === void 0) return {
|
|
9769
|
+
ok: false,
|
|
9770
|
+
code: "UNAVAILABLE",
|
|
9771
|
+
message: "Charter connection is unavailable."
|
|
9772
|
+
};
|
|
9773
|
+
const result = await remote.listArchives({ sessionId: this.sessionId });
|
|
9774
|
+
if (!result.ok) throw result.error;
|
|
9775
|
+
return result.value;
|
|
9776
|
+
};
|
|
9777
|
+
readArchive = async (key) => {
|
|
9778
|
+
const remote = this.remote;
|
|
9779
|
+
if (remote === void 0) return {
|
|
9780
|
+
ok: false,
|
|
9781
|
+
code: "UNAVAILABLE",
|
|
9782
|
+
message: "Charter connection is unavailable."
|
|
9783
|
+
};
|
|
9784
|
+
const result = await remote.readArchive({
|
|
9785
|
+
sessionId: this.sessionId,
|
|
9786
|
+
key
|
|
9787
|
+
});
|
|
9788
|
+
if (!result.ok) throw result.error;
|
|
9789
|
+
return result.value;
|
|
9790
|
+
};
|
|
9642
9791
|
exportRecord = async () => {
|
|
9643
9792
|
const remote = this.remote;
|
|
9644
9793
|
if (remote === void 0) return {
|
|
@@ -9871,15 +10020,16 @@ var CharterSessionSource = class {
|
|
|
9871
10020
|
publishIfNewer(view) {
|
|
9872
10021
|
if (view.sessionId !== this.sessionId) return;
|
|
9873
10022
|
const current = this.state.view;
|
|
10023
|
+
const merged = current !== null && current.revision === view.revision && current.lifecycle === view.lifecycle ? carryBatchIntegrity(view, current) : view;
|
|
9874
10024
|
const lifecycleChanged = current !== null && view.lifecycle !== void 0 && current.lifecycle !== view.lifecycle;
|
|
9875
10025
|
if (current !== null && !lifecycleChanged && view.revision < current.revision) {
|
|
9876
10026
|
if (view.status !== "unavailable") return;
|
|
9877
10027
|
}
|
|
9878
|
-
if (current !== null && !lifecycleChanged &&
|
|
10028
|
+
if (current !== null && !lifecycleChanged && merged.revision === current.revision && merged.status === current.status && merged.promptDigest === current.promptDigest && merged.message === current.message && merged.overBudget === current.overBudget && JSON.stringify(merged.limits) === JSON.stringify(current.limits) && JSON.stringify(merged.recordState ?? null) === JSON.stringify(current.recordState ?? null) && JSON.stringify(merged.capabilities ?? null) === JSON.stringify(current.capabilities ?? null) && batchIntegrityOf(merged) === batchIntegrityOf(current) && this.state.status === "ready" && this.state.error === null) return;
|
|
9879
10029
|
this.clearWatchdog();
|
|
9880
10030
|
this.publish({
|
|
9881
10031
|
status: "ready",
|
|
9882
|
-
view,
|
|
10032
|
+
view: merged,
|
|
9883
10033
|
error: null
|
|
9884
10034
|
});
|
|
9885
10035
|
}
|
|
@@ -10058,36 +10208,34 @@ var CharterClientController = class CharterClientController {
|
|
|
10058
10208
|
const CHARTER_LOCALE_NS = "dsh-charter";
|
|
10059
10209
|
const CHARTER_LOCALE = {
|
|
10060
10210
|
zh: {
|
|
10061
|
-
tab: "
|
|
10062
|
-
"header.title": "
|
|
10211
|
+
tab: "契约",
|
|
10212
|
+
"header.title": "契约",
|
|
10063
10213
|
"header.subtitle": "压缩会改写历史,但你的约定不会。",
|
|
10064
10214
|
"header.version": "v{version}",
|
|
10065
10215
|
"header.disclaimer": "这是提供给模型的声明性上下文,不强制执行,也不是安全边界。",
|
|
10066
10216
|
"stats.revision": "修订 {revision}",
|
|
10067
|
-
"stats.active": "{count} 生效",
|
|
10068
|
-
"stats.stored": "{count} 已存储",
|
|
10069
10217
|
"stats.context": "{bytes} B 上下文",
|
|
10070
10218
|
"stats.budget": "{used} / {limit} 契约上下文",
|
|
10071
|
-
"status.loading": "
|
|
10072
|
-
"status.unavailable": "
|
|
10073
|
-
"status.notReady": "
|
|
10074
|
-
"status.initializing": "
|
|
10075
|
-
"status.notLive": "该会话尚未在当前 Host 进程中运行。请在此 Web
|
|
10076
|
-
"status.readOnly": "该会话尚未在当前 Host
|
|
10077
|
-
"status.lifecycle": "
|
|
10078
|
-
"status.corrupt": "
|
|
10079
|
-
"status.storage": "
|
|
10080
|
-
"status.absent": "
|
|
10081
|
-
"status.invalidSchema": "
|
|
10082
|
-
"status.invalidConsistency": "
|
|
10219
|
+
"status.loading": "正在加载契约...",
|
|
10220
|
+
"status.unavailable": "契约暂不可用。",
|
|
10221
|
+
"status.notReady": "契约尚未就绪。",
|
|
10222
|
+
"status.initializing": "契约正在初始化...",
|
|
10223
|
+
"status.notLive": "该会话尚未在当前 Host 进程中运行。请在此 Web 界面打开或启动它,契约标签页会自动更新。",
|
|
10224
|
+
"status.readOnly": "该会话尚未在当前 Host 进程中运行。当前显示已保存的只读契约;请在此 Web 界面打开或启动该会话后再编辑。",
|
|
10225
|
+
"status.lifecycle": "已保存的契约属于另一个会话生命周期。",
|
|
10226
|
+
"status.corrupt": "已保存的契约数据不一致。",
|
|
10227
|
+
"status.storage": "契约存储暂不可用。",
|
|
10228
|
+
"status.absent": "未加载到契约记录;它可能从未存在,或存储无法读取它。",
|
|
10229
|
+
"status.invalidSchema": "已保存的契约记录结构不合法。",
|
|
10230
|
+
"status.invalidConsistency": "已保存的契约记录不一致。",
|
|
10083
10231
|
"status.futureSchema": "该记录由更新版本的 Charter schema 写入,已被只读保留;请升级插件。",
|
|
10084
10232
|
"status.writeUncertain": "上次存储写入结果不确定。请重启 Host 重新加载存储介质。",
|
|
10085
10233
|
"status.legacyHost": "连接的是旧版 Host bundle,恢复能力不可用。",
|
|
10086
|
-
"status.overBudget": "
|
|
10087
|
-
"status.reconnecting": "
|
|
10234
|
+
"status.overBudget": "已保存的契约有效,但超出当前预算限制,因此暂时不注入。请删除或归档条目以回到预算内。",
|
|
10235
|
+
"status.reconnecting": "正在重新连接契约服务;编辑已暂停,当前显示的是最近一次已确认状态。",
|
|
10088
10236
|
"empty.kicker": "开始",
|
|
10089
|
-
"empty.title": "
|
|
10090
|
-
"empty.body": "
|
|
10237
|
+
"empty.title": "这个会话还没有契约。",
|
|
10238
|
+
"empty.body": "先设置目标或添加硬约束,然后点击应用;模型会从下一次请求起看到契约。",
|
|
10091
10239
|
"nav.label": "章节",
|
|
10092
10240
|
"nav.workspace": "工作区",
|
|
10093
10241
|
"nav.review": "审阅中心",
|
|
@@ -10101,7 +10249,7 @@ const CHARTER_LOCALE = {
|
|
|
10101
10249
|
"nav.recovery": "存储与恢复",
|
|
10102
10250
|
"nav.open": "打开",
|
|
10103
10251
|
"nav.workspaceHelp": "查看当前目标、全局硬约束、执行计划和未解决阻塞。",
|
|
10104
|
-
"nav.reviewHelp": "
|
|
10252
|
+
"nav.reviewHelp": "审阅消息提案、压缩历史草案、待处理提案和近期变更。",
|
|
10105
10253
|
"nav.diagnosticsHelp": "检查 prompt、预算、记录健康、恢复和能力诊断。",
|
|
10106
10254
|
"nav.overviewHelp": "一眼查看已生效的承诺、数量、预算和待审状态。",
|
|
10107
10255
|
"nav.objectiveHelp": "查看或调整当前目标;原始目标保持不变。",
|
|
@@ -10109,7 +10257,7 @@ const CHARTER_LOCALE = {
|
|
|
10109
10257
|
"nav.deliverablesHelp": "管理交付物并跟踪交付进度。",
|
|
10110
10258
|
"nav.historyHelp": "从最近一次可用压缩摘要生成只读的审阅草案。",
|
|
10111
10259
|
"nav.contextHelp": "预览应用后模型实际收到的 user-role 上下文。",
|
|
10112
|
-
"nav.recoveryHelp": "导出、恢复或显式初始化该 Session
|
|
10260
|
+
"nav.recoveryHelp": "导出、恢复或显式初始化该 Session 的底层契约记录。",
|
|
10113
10261
|
"changeset.kicker": "变更集",
|
|
10114
10262
|
"changeset.title": "待应用变更",
|
|
10115
10263
|
"changeset.ops": "{count} 个暂存操作",
|
|
@@ -10117,13 +10265,22 @@ const CHARTER_LOCALE = {
|
|
|
10117
10265
|
"changeset.promptDelta": "Prompt 字节:{before} → {after}",
|
|
10118
10266
|
"changeset.itemsDelta": "条目:{before} → {after}",
|
|
10119
10267
|
"changeset.editorOpen": "有未关闭的行内编辑器",
|
|
10268
|
+
"changeset.conflicts": "本次变更引入或加重了 {count} 处依赖冲突",
|
|
10269
|
+
"changeset.conflictAdded": "新增冲突(阻塞前置 {before} → {after})",
|
|
10270
|
+
"changeset.conflictWorsened": "冲突加重(阻塞前置 {before} → {after})",
|
|
10271
|
+
"changeset.conflictHint": "存在 {count} 处依赖冲突,应用前需要你确认",
|
|
10272
|
+
"changeset.conflictConfirmHint": "确认在存在 {count} 处依赖冲突的情况下应用",
|
|
10120
10273
|
"review.itemProposals": "条目提案",
|
|
10121
10274
|
"review.messageProposal": "消息提案",
|
|
10122
|
-
"review.
|
|
10123
|
-
"
|
|
10275
|
+
"review.messageProposalHint": "从最近的用户消息中提取一条,保存为待审提案;审阅并应用前不会改变契约。",
|
|
10276
|
+
"review.saveLatestMessage": "保存为提案",
|
|
10277
|
+
"message.pick": "用户消息",
|
|
10278
|
+
"message.pickPlaceholder": "选择一条最近的用户消息",
|
|
10124
10279
|
"message.kind": "提案类型",
|
|
10125
|
-
"message.
|
|
10126
|
-
"message.
|
|
10280
|
+
"message.textLabel": "提案正文(可编辑)",
|
|
10281
|
+
"message.textHint": "已带入所选用户消息,保存前可以自由修改。",
|
|
10282
|
+
"message.truncated": "消息较长,显示内容已截断;请先编辑再保存。",
|
|
10283
|
+
"message.legacyUnavailable": "当前 Host 未提供完整消息正文,无法在这里编辑为提案。",
|
|
10127
10284
|
"review.contentModified": "正文已修改",
|
|
10128
10285
|
"review.inactiveItems": "非当前与已拒绝条目",
|
|
10129
10286
|
"review.objectiveHistory": "目标提案历史",
|
|
@@ -10141,7 +10298,8 @@ const CHARTER_LOCALE = {
|
|
|
10141
10298
|
"review.objectiveReason": "替换当前目标的理由",
|
|
10142
10299
|
"review.acceptObjective": "接受目标",
|
|
10143
10300
|
"review.rejectObjective": "拒绝目标",
|
|
10144
|
-
"review.
|
|
10301
|
+
"review.heading": "审阅中心",
|
|
10302
|
+
"review.headingHint": "审阅消息提案、压缩历史草案、待处理提案和近期变更;应用前不会改变契约。",
|
|
10145
10303
|
"review.title": "提案批次",
|
|
10146
10304
|
"review.captured": "捕获于 revision {revision}",
|
|
10147
10305
|
"review.sourceIntegrity": "来源:{integrity}",
|
|
@@ -10152,10 +10310,7 @@ const CHARTER_LOCALE = {
|
|
|
10152
10310
|
"review.source.agent-tool": "模型工具提案",
|
|
10153
10311
|
"review.source.fork": "Fork 提案",
|
|
10154
10312
|
"review.source.legacy-unknown": "旧版未知来源",
|
|
10155
|
-
"deps.kicker": "执行计划",
|
|
10156
10313
|
"deps.title": "依赖与就绪状态",
|
|
10157
|
-
"deps.requires": "依赖 {keys}",
|
|
10158
|
-
"deps.editAria": "{key} 的前置交付物",
|
|
10159
10314
|
"deps.status.ready": "可推进",
|
|
10160
10315
|
"deps.status.waiting": "等待前置",
|
|
10161
10316
|
"deps.status.dependency-conflict": "依赖冲突",
|
|
@@ -10164,12 +10319,64 @@ const CHARTER_LOCALE = {
|
|
|
10164
10319
|
"deps.status.terminal": "已结束",
|
|
10165
10320
|
"deps.prerequisiteConflict": "前置冲突",
|
|
10166
10321
|
"deps.conflict": "暂存的依赖计划包含环或非法引用。请移除或修改前置条件后再 Apply。",
|
|
10322
|
+
"deps.graphTitle": "依赖关系图",
|
|
10323
|
+
"deps.graphFocus": "焦点",
|
|
10324
|
+
"deps.graphDepth": "深度",
|
|
10325
|
+
"deps.depth1": "1 跳",
|
|
10326
|
+
"deps.depth2": "2 跳",
|
|
10327
|
+
"deps.showSupersedes": "显示替代关系",
|
|
10328
|
+
"deps.zoomIn": "放大",
|
|
10329
|
+
"deps.zoomOut": "缩小",
|
|
10330
|
+
"deps.resetLayout": "重置缩放",
|
|
10331
|
+
"deps.hideGraph": "隐藏图形",
|
|
10332
|
+
"deps.showGraph": "显示图形",
|
|
10333
|
+
"deps.graphAria": "依赖关系图",
|
|
10334
|
+
"deps.graphKeys": "Tab 进入图形区一次;方向键沿依赖移动;[ 和 ] 遍历所有节点与边;Enter 打开详情;Esc 关闭详情,再按回到列表。",
|
|
10335
|
+
"deps.historyKicker": "已替代",
|
|
10336
|
+
"deps.historyStatus": "不在执行序",
|
|
10337
|
+
"deps.candidateKicker": "候选",
|
|
10338
|
+
"deps.candidateStatus": "未进入执行序",
|
|
10339
|
+
"deps.historyAria": "已替代条目 {text};不在执行序",
|
|
10340
|
+
"deps.candidateAria": "候选提案 {text};未进入执行序",
|
|
10341
|
+
"deps.edgeAria": "{to} 依赖 {from}",
|
|
10342
|
+
"deps.edgeAriaAdded": "{to} 依赖 {from}(本次新增)",
|
|
10343
|
+
"deps.edgeAriaRemoved": "{to} 依赖 {from}(本次删除)",
|
|
10344
|
+
"deps.proposedEdgeAria": "{to} 的候选前置 {from};回车查看提案",
|
|
10345
|
+
"deps.supersedesEdgeAria": "{from} 已被 {to} 替代",
|
|
10346
|
+
"deps.graphDegradedSupersedes": "视图过密,已隐藏替代历史。",
|
|
10347
|
+
"deps.graphDegradedDepth": "视图过密,深度已降为 1 跳。",
|
|
10348
|
+
"deps.graphTooDense": "依赖视图有 {count} 个可导航元素,请使用列表。",
|
|
10349
|
+
"deps.inspectorTitle": "依赖详情 · {key}",
|
|
10350
|
+
"deps.closeInspector": "关闭详情",
|
|
10351
|
+
"deps.inspectorStatus": "状态",
|
|
10352
|
+
"deps.inspectorRequires": "前置",
|
|
10353
|
+
"deps.addRequires": "添加前置交付物",
|
|
10354
|
+
"deps.removeRequires": "移除 {key}",
|
|
10355
|
+
"deps.removeEdge": "移除这条依赖",
|
|
10356
|
+
"deps.openProposal": "打开提案",
|
|
10357
|
+
"deps.skipToList": "跳到依赖列表",
|
|
10358
|
+
"deps.showMore": "再显示 {count} 行依赖",
|
|
10359
|
+
"deps.rowPosition": "第 {index} 条依赖,共 {total} 条",
|
|
10360
|
+
"deps.locateInList": "在列表中定位",
|
|
10361
|
+
"deps.locateInGraph": "在图中定位",
|
|
10362
|
+
"deps.graphHint": "图不会自动修改状态;编辑只会暂存到 Change Set,Apply 仍是唯一提交点。",
|
|
10363
|
+
"deps.help": "键位与说明",
|
|
10364
|
+
"deps.graphEmpty": "还没有依赖关系。可以把一个节点拖到另一个节点上,或在列表行中打开前置编辑。",
|
|
10365
|
+
"deps.graphIsolatedTooMany": "还没有依赖关系。当前交付物过多,孤立节点预览已隐藏,请使用列表。",
|
|
10366
|
+
"deps.requiresSummary": "前置:{keys}",
|
|
10367
|
+
"deps.noRequires": "无前置",
|
|
10368
|
+
"deps.editRequires": "编辑前置",
|
|
10369
|
+
"deps.stagedAdded": "暂存新增",
|
|
10370
|
+
"deps.dropInvalidSelf": "交付物不能依赖自身。",
|
|
10371
|
+
"deps.dropInvalidDuplicate": "这个前置交付物已经存在。",
|
|
10372
|
+
"deps.stagedRemoved": "暂存删除",
|
|
10373
|
+
"deps.candidateCycle": "候选依赖成环,接受时会被拒绝",
|
|
10167
10374
|
"overview.budget": "预算",
|
|
10168
10375
|
"overview.budgetDetail": "上下文、目标与条目上限",
|
|
10169
10376
|
"overview.nothing": "尚未配置。",
|
|
10170
10377
|
"overview.objectiveHint": "原始目标不可改写;调整目标会保留原始版本供审阅。",
|
|
10171
10378
|
"bootstrap.kicker": "历史草案",
|
|
10172
|
-
"bootstrap.title": "
|
|
10379
|
+
"bootstrap.title": "压缩历史草案",
|
|
10173
10380
|
"bootstrap.body": "这是从最近一次压缩摘要中抽取的草案,尚未生效。请检查后应用。",
|
|
10174
10381
|
"bootstrap.source": "来源:压缩摘要(约 {tokens} tokens 被压缩)",
|
|
10175
10382
|
"bootstrap.sourcePlain": "来源:压缩摘要",
|
|
@@ -10190,8 +10397,8 @@ const CHARTER_LOCALE = {
|
|
|
10190
10397
|
"bootstrap.stale": "读取历史草案期间会话已更新,草案已丢弃;请重试以读取最新历史。",
|
|
10191
10398
|
"bootstrap.notLive": "该会话当前不在这个 Host 进程中运行。在此打开它后才能读取压缩历史。",
|
|
10192
10399
|
"bootstrap.noSummary": "该会话还没有可用的压缩摘要;完成一次压缩后才会出现草案。",
|
|
10193
|
-
"bootstrap.unavailable": "
|
|
10194
|
-
"notice.conflict": "
|
|
10400
|
+
"bootstrap.unavailable": "契约存储不可用,暂时无法读取历史草案。",
|
|
10401
|
+
"notice.conflict": "契约已从修订 {from} 更新到 {to}。草稿已保留;可将草稿应用到最新修订,或丢弃后查看新版本。",
|
|
10195
10402
|
"objective.kicker": "目标",
|
|
10196
10403
|
"objective.empty": "尚未设置目标。",
|
|
10197
10404
|
"objective.set": "设置目标",
|
|
@@ -10235,8 +10442,8 @@ const CHARTER_LOCALE = {
|
|
|
10235
10442
|
"item.purge": "永久清除",
|
|
10236
10443
|
"item.confirmPurge": "确认清除",
|
|
10237
10444
|
"item.keep": "保留",
|
|
10238
|
-
"editor.charterTextAria": "
|
|
10239
|
-
"editor.objectiveAria": "
|
|
10445
|
+
"editor.charterTextAria": "契约文本",
|
|
10446
|
+
"editor.objectiveAria": "契约目标",
|
|
10240
10447
|
"editor.invariantAria": "约束文本",
|
|
10241
10448
|
"editor.deliverableAria": "交付物文本",
|
|
10242
10449
|
"error.connectionKind.timeout": "连接超时",
|
|
@@ -10257,8 +10464,8 @@ const CHARTER_LOCALE = {
|
|
|
10257
10464
|
"editor.issue.surrogate": "文本包含无效 Unicode。",
|
|
10258
10465
|
"composer.invariant": "硬约束",
|
|
10259
10466
|
"composer.deliverable": "交付物",
|
|
10260
|
-
"composer.groupAria": "
|
|
10261
|
-
"composer.inputAria": "
|
|
10467
|
+
"composer.groupAria": "新契约条目类型",
|
|
10468
|
+
"composer.inputAria": "新契约条目",
|
|
10262
10469
|
"composer.invariantAria": "新硬约束文本",
|
|
10263
10470
|
"composer.deliverableAria": "新交付物文本",
|
|
10264
10471
|
"error.details": "展开技术详情",
|
|
@@ -10284,7 +10491,7 @@ const CHARTER_LOCALE = {
|
|
|
10284
10491
|
"preview.exact": "精确文本",
|
|
10285
10492
|
"preview.formattedHint": "为便于阅读而美化;字节数和精确视图使用原始文本。",
|
|
10286
10493
|
"preview.formattedUnavailable": "无法格式化 JSON,已显示精确文本。",
|
|
10287
|
-
"preview.emptyHint": "
|
|
10494
|
+
"preview.emptyHint": "当前没有可渲染的契约上下文。",
|
|
10288
10495
|
"preview.exactHint": "模型实际收到的 user-role 文本和字节数。",
|
|
10289
10496
|
"footer.none": "没有暂存的修改",
|
|
10290
10497
|
"footer.one": "1 处暂存修改",
|
|
@@ -10304,12 +10511,13 @@ const CHARTER_LOCALE = {
|
|
|
10304
10511
|
"footer.abandon": "放弃未知请求",
|
|
10305
10512
|
"footer.abandonConfirm": "确认放弃——将丢弃保留请求和本地草稿文本",
|
|
10306
10513
|
"footer.applying": "正在应用...",
|
|
10514
|
+
"footer.applyConfirmConflicts": "仍要应用({count} 处冲突)",
|
|
10307
10515
|
"budget.editorOver": "文本超过 {limit} 上限。",
|
|
10308
10516
|
"budget.shrinking": "当前仍超限,但这是缩短操作,可以提交。",
|
|
10309
10517
|
"budget.notGrowing": "当前仍超限,但这次修改不会增大 prompt,可以提交。",
|
|
10310
10518
|
"budget.itemOver": "有条目超过 {limit} 上限。",
|
|
10311
10519
|
"budget.objectiveOver": "目标超过 {limit} 上限。",
|
|
10312
|
-
"budget.contextOver": "
|
|
10520
|
+
"budget.contextOver": "契约所占上下文超过 {limit} 预算(不含历史消息、系统提示、工具定义或其他 DSH 上下文)。请先删除/归档条目或缩短草案再应用。",
|
|
10313
10521
|
"budget.opsOver": "本草案单批操作数超过 {limit}。请减少暂存修改,分批应用。",
|
|
10314
10522
|
"budget.itemsOver": "本草案会超过 {limit} 条目上限。请先删除或归档条目再应用。",
|
|
10315
10523
|
"budget.pendingOver": "本草案会超过 {limit} 待审条目上限。请先处理或归档待审条目再应用。",
|
|
@@ -10333,28 +10541,28 @@ const CHARTER_LOCALE = {
|
|
|
10333
10541
|
"apply.block.quota": "暂存修改超过 Charter 限制。",
|
|
10334
10542
|
"apply.block.stale": "历史草案已过期,请重新抽取。",
|
|
10335
10543
|
"footer.applyHint": "应用会原子提交全部暂存修改,模型从下一次请求起可见。",
|
|
10336
|
-
"bootstrap.applyHint": "
|
|
10544
|
+
"bootstrap.applyHint": "已审阅的历史草案将写入空契约。",
|
|
10337
10545
|
"apply.block.bootstrap-blocked": "请先处理上方 bootstrap 原因,再应用已审阅草案。",
|
|
10338
10546
|
"footer.replayed": "已安全重放此前保存的编辑。",
|
|
10339
10547
|
"button.retry": "重试",
|
|
10340
10548
|
"error.INVALID_ARGUMENT": "编辑请求无效。",
|
|
10341
|
-
"error.FORBIDDEN": "
|
|
10342
|
-
"error.NOT_FOUND": "
|
|
10343
|
-
"error.LIFECYCLE_MISMATCH": "
|
|
10344
|
-
"error.REVISION_CONFLICT": "
|
|
10549
|
+
"error.FORBIDDEN": "无权编辑此契约。",
|
|
10550
|
+
"error.NOT_FOUND": "未找到会话或契约条目。",
|
|
10551
|
+
"error.LIFECYCLE_MISMATCH": "契约属于另一个会话生命周期。",
|
|
10552
|
+
"error.REVISION_CONFLICT": "契约已被更新,草稿已保留。",
|
|
10345
10553
|
"error.MUTATION_ID_REUSED": "该编辑标识已用于不同内容。",
|
|
10346
10554
|
"error.INVALID_REFERENCE": "编辑引用了不存在的条目。",
|
|
10347
10555
|
"error.INVALID_TRANSITION": "当前状态下不允许该修改。",
|
|
10348
10556
|
"error.IMMUTABLE_FIELD": "该字段不可修改。",
|
|
10349
|
-
"error.QUOTA_EXCEEDED": "
|
|
10350
|
-
"error.CORRUPT_STATE": "
|
|
10557
|
+
"error.QUOTA_EXCEEDED": "超出契约限制,未保存任何修改。",
|
|
10558
|
+
"error.CORRUPT_STATE": "已保存的契约数据不一致。",
|
|
10351
10559
|
"error.INITIALIZATION_REQUIRED": "该 Session 没有已确认的契约记录。请在“存储与恢复”中显式初始化。",
|
|
10352
10560
|
"error.INVALID_ARCHIVE": "所选备份不是有效的 dsh-charter 记录归档。",
|
|
10353
10561
|
"error.RECORD_CONFLICT": "契约记录在预览后已变化,请查看最新状态后重试。",
|
|
10354
10562
|
"error.OPERATION_ID_REUSED": "该恢复操作 ID 被用于了不同内容。",
|
|
10355
10563
|
"error.RECOVERY_UNSUPPORTED": "记录维护需要 DSH 0.2.1 或更新版本(owner/资源约束)。",
|
|
10356
10564
|
"recovery.title": "存储与恢复",
|
|
10357
|
-
"recovery.subtitle": "
|
|
10565
|
+
"recovery.subtitle": "备份完整契约记录,并有意识地恢复本 Session。",
|
|
10358
10566
|
"recovery.recordTitle": "记录状态",
|
|
10359
10567
|
"recovery.healthy": "健康",
|
|
10360
10568
|
"recovery.absent": "缺失(未确认)",
|
|
@@ -10368,11 +10576,19 @@ const CHARTER_LOCALE = {
|
|
|
10368
10576
|
"recovery.digest": "记录摘要",
|
|
10369
10577
|
"recovery.overBudget": "超出预算(不注入)",
|
|
10370
10578
|
"recovery.exportTitle": "导出",
|
|
10371
|
-
"recovery.exportHint": "
|
|
10372
|
-
"recovery.sensitive": "
|
|
10579
|
+
"recovery.exportHint": "下载完整记录,用于外部校验、审计或自行保存。恢复使用下方的本地缓存,不依赖这次下载。",
|
|
10580
|
+
"recovery.sensitive": "敏感:归档包含你的契约文本,请安全保存。",
|
|
10373
10581
|
"recovery.export": "下载记录归档",
|
|
10374
10582
|
"recovery.exportFailed": "无法导出该记录。",
|
|
10375
10583
|
"recovery.chooseFile": "选择归档文件",
|
|
10584
|
+
"recovery.cacheTitle": "最近归档缓存",
|
|
10585
|
+
"recovery.cacheHint": "在记录预算允许时,每次成功修改后自动保留最近 5 份快照,更早的会被清理。恢复直接从缓存选择,不需要先下载文件。",
|
|
10586
|
+
"recovery.cacheEmpty": "还没有缓存快照;成功 Apply 一次且记录预算允许时会自动生成。",
|
|
10587
|
+
"recovery.cacheUnavailable": "归档缓存不可用。",
|
|
10588
|
+
"recovery.cacheAria": "选择要恢复的归档",
|
|
10589
|
+
"recovery.cacheRevision": "修订 {revision}",
|
|
10590
|
+
"recovery.importTitle": "高级:从本地归档文件导入",
|
|
10591
|
+
"recovery.importHint": "仅用于另一台机器导出的归档,或缓存功能出现前保存的旧文件。正常恢复请使用上方缓存。",
|
|
10376
10592
|
"recovery.selected": "已选择",
|
|
10377
10593
|
"recovery.previewTitle": "归档预览",
|
|
10378
10594
|
"recovery.previewHealth": "健康状态",
|
|
@@ -10385,10 +10601,12 @@ const CHARTER_LOCALE = {
|
|
|
10385
10601
|
"recovery.cryptoUnavailable": "WebCrypto 不可用,无法校验归档摘要,恢复已禁用。",
|
|
10386
10602
|
"recovery.sessionMismatchPreview": "该归档属于其他 Session。",
|
|
10387
10603
|
"recovery.lifecycleMismatchPreview": "该归档属于其他 Session 生命周期。",
|
|
10388
|
-
"recovery.initialize": "
|
|
10389
|
-
"recovery.initializeWarning": "
|
|
10390
|
-
"recovery.initializeConfirm": "
|
|
10391
|
-
"recovery.
|
|
10604
|
+
"recovery.initialize": "初始化空契约",
|
|
10605
|
+
"recovery.initializeWarning": "创建空契约可能覆盖存储无法读取的文档;如需原始文件请先备份。",
|
|
10606
|
+
"recovery.initializeConfirm": "确认初始化空契约",
|
|
10607
|
+
"recovery.restoreTitle": "恢复归档",
|
|
10608
|
+
"recovery.restoreCached": "恢复缓存快照",
|
|
10609
|
+
"recovery.restoreFile": "恢复导入归档",
|
|
10392
10610
|
"recovery.restoreConfirm": "确认恢复",
|
|
10393
10611
|
"recovery.capabilityUnavailable": "记录维护需要 DSH 0.2.1 或更新版本(owner/资源约束)。",
|
|
10394
10612
|
"recovery.recordLimit": "当前记录预算不足以容纳恢复归档;需要停止 Host 后离线备份。",
|
|
@@ -10426,8 +10644,8 @@ const CHARTER_LOCALE = {
|
|
|
10426
10644
|
"recovery.reason.capability": "当前 runtime 不支持记录维护。",
|
|
10427
10645
|
"recovery.reason.recordHealthy": "健康记录不能被替换。",
|
|
10428
10646
|
"recovery.reason.legacyHost": "连接的 Host 不支持记录维护。",
|
|
10429
|
-
"error.UNAVAILABLE": "
|
|
10430
|
-
"error.connection": "
|
|
10647
|
+
"error.UNAVAILABLE": "契约暂不可用。",
|
|
10648
|
+
"error.connection": "契约连接不可用。",
|
|
10431
10649
|
"error.draftScope": "暂存草稿属于另一个会话,已丢弃。",
|
|
10432
10650
|
"error.unexpected": "编辑发生意外错误。",
|
|
10433
10651
|
"tag.staged": "已暂存",
|
|
@@ -10441,17 +10659,27 @@ const CHARTER_LOCALE = {
|
|
|
10441
10659
|
"validity.unknown": "未知",
|
|
10442
10660
|
"validity.stale": "已过期",
|
|
10443
10661
|
"validators.title": "事实有效性验证器",
|
|
10444
|
-
"validators.hint": "
|
|
10445
|
-
"validators.
|
|
10446
|
-
"validators.
|
|
10662
|
+
"validators.hint": "先选一条已生效的承诺,再选要检查的事实,最后指定工作区文件。验证器只读文件,不执行 shell,也不修改承诺正文。",
|
|
10663
|
+
"validators.targetLabel": "验证哪条承诺",
|
|
10664
|
+
"validators.targetHint": "只列出已生效的硬约束和交付物。",
|
|
10665
|
+
"validators.methodLabel": "要检查什么",
|
|
10666
|
+
"validators.pathLabel": "工作区路径",
|
|
10667
|
+
"validators.expectationLabel": "期望内容",
|
|
10668
|
+
"validators.itemAria": "要验证的承诺",
|
|
10669
|
+
"validators.kindAria": "验证方式",
|
|
10447
10670
|
"validators.pathAria": "工作区相对文件路径",
|
|
10448
10671
|
"validators.pathPlaceholder": "relative/path",
|
|
10449
10672
|
"validators.expectationAria": "期望摘要或文本",
|
|
10450
10673
|
"validators.containsPlaceholder": "要查找的文本",
|
|
10451
|
-
"validators.pickItem": "
|
|
10452
|
-
"validators.run": "
|
|
10674
|
+
"validators.pickItem": "选择一条已生效承诺",
|
|
10675
|
+
"validators.run": "运行检查",
|
|
10676
|
+
"validators.kind.path-exists": "路径存在",
|
|
10677
|
+
"validators.kind.file-digest": "文件 SHA-256 匹配",
|
|
10678
|
+
"validators.kind.file-contains": "文件包含文本",
|
|
10453
10679
|
"validators.done": "验证结果已保存。",
|
|
10454
10680
|
"validators.failed": "验证请求失败。",
|
|
10681
|
+
"integrity.title": "证据完整性",
|
|
10682
|
+
"integrity.hint": "检查提案引用的消息和摘要来源是否仍与当前会话历史一致;这不是对承诺内容本身的业务校验。",
|
|
10455
10683
|
"integrity.check": "检查证据完整性",
|
|
10456
10684
|
"integrity.summary": "已检查 {count} 条证据绑定,{changed} 条不是 intact。",
|
|
10457
10685
|
"integrity.truncated": "证据检查已受读取预算上限截断。",
|
|
@@ -10504,8 +10732,6 @@ const CHARTER_LOCALE = {
|
|
|
10504
10732
|
"header.title": "Charter",
|
|
10505
10733
|
"header.subtitle": "Compaction rewrites history. Your commitments don't.",
|
|
10506
10734
|
"stats.revision": "rev {revision}",
|
|
10507
|
-
"stats.active": "{count} active",
|
|
10508
|
-
"stats.stored": "{count} stored",
|
|
10509
10735
|
"overview.afterApply": "After Apply",
|
|
10510
10736
|
"stats.afterApply": "{active} active / {stored} stored after Apply",
|
|
10511
10737
|
"stats.context": "{bytes} B context",
|
|
@@ -10545,7 +10771,7 @@ const CHARTER_LOCALE = {
|
|
|
10545
10771
|
"nav.recovery": "Storage & recovery",
|
|
10546
10772
|
"nav.open": "Open",
|
|
10547
10773
|
"nav.workspaceHelp": "See the current objective, global invariants, execution plan, and unresolved blockers.",
|
|
10548
|
-
"nav.reviewHelp": "Review
|
|
10774
|
+
"nav.reviewHelp": "Review message proposals, compaction-history drafts, pending proposals, and recent changes.",
|
|
10549
10775
|
"nav.diagnosticsHelp": "Inspect prompt, budgets, record health, recovery, and capability diagnostics.",
|
|
10550
10776
|
"nav.overviewHelp": "See active commitments, counts, budget, and any pending review at a glance.",
|
|
10551
10777
|
"nav.objectiveHelp": "Read or redirect the current objective while the original objective stays immutable.",
|
|
@@ -10561,13 +10787,22 @@ const CHARTER_LOCALE = {
|
|
|
10561
10787
|
"changeset.promptDelta": "Prompt bytes: {before} → {after}",
|
|
10562
10788
|
"changeset.itemsDelta": "Items: {before} → {after}",
|
|
10563
10789
|
"changeset.editorOpen": "An inline editor is open",
|
|
10790
|
+
"changeset.conflicts": "This Change Set introduces or worsens {count} dependency conflict(s)",
|
|
10791
|
+
"changeset.conflictAdded": "new conflict ({before} → {after} blocking prerequisites)",
|
|
10792
|
+
"changeset.conflictWorsened": "worsened ({before} → {after} blocking prerequisites)",
|
|
10793
|
+
"changeset.conflictHint": "{count} dependency conflict(s) — Apply needs your confirmation",
|
|
10794
|
+
"changeset.conflictConfirmHint": "Confirm to apply with {count} known dependency conflict(s)",
|
|
10564
10795
|
"review.itemProposals": "Item proposals",
|
|
10565
10796
|
"review.messageProposal": "Message proposal",
|
|
10566
|
-
"review.
|
|
10567
|
-
"
|
|
10797
|
+
"review.messageProposalHint": "Turn one recent user message into a pending proposal. Nothing changes until you review and apply it.",
|
|
10798
|
+
"review.saveLatestMessage": "Save as proposal",
|
|
10799
|
+
"message.pick": "User message",
|
|
10800
|
+
"message.pickPlaceholder": "Choose a recent user message",
|
|
10568
10801
|
"message.kind": "Proposal kind",
|
|
10569
|
-
"message.
|
|
10570
|
-
"message.
|
|
10802
|
+
"message.textLabel": "Proposal text (editable)",
|
|
10803
|
+
"message.textHint": "The selected message is loaded here. Edit it freely before saving as a pending proposal.",
|
|
10804
|
+
"message.truncated": "This message is long and was capped for display; edit the text before saving.",
|
|
10805
|
+
"message.legacyUnavailable": "This Host does not expose the full message text, so it cannot be edited as a proposal here.",
|
|
10571
10806
|
"review.contentModified": "content modified",
|
|
10572
10807
|
"review.inactiveItems": "Inactive and rejected items",
|
|
10573
10808
|
"review.objectiveHistory": "Objective proposal history",
|
|
@@ -10585,7 +10820,8 @@ const CHARTER_LOCALE = {
|
|
|
10585
10820
|
"review.objectiveReason": "Reason for replacing the current objective",
|
|
10586
10821
|
"review.acceptObjective": "Accept objective",
|
|
10587
10822
|
"review.rejectObjective": "Reject objective",
|
|
10588
|
-
"review.
|
|
10823
|
+
"review.heading": "Review Center",
|
|
10824
|
+
"review.headingHint": "Review message proposals, compaction-history drafts, pending proposals, and recent changes. Nothing changes until you apply it.",
|
|
10589
10825
|
"review.title": "Proposal batches",
|
|
10590
10826
|
"review.captured": "Captured at revision {revision}",
|
|
10591
10827
|
"review.sourceIntegrity": "Source: {integrity}",
|
|
@@ -10596,10 +10832,7 @@ const CHARTER_LOCALE = {
|
|
|
10596
10832
|
"review.source.agent-tool": "Agent tool proposal",
|
|
10597
10833
|
"review.source.fork": "Fork proposal",
|
|
10598
10834
|
"review.source.legacy-unknown": "Legacy unknown source",
|
|
10599
|
-
"deps.kicker": "Execution plan",
|
|
10600
10835
|
"deps.title": "Dependencies and readiness",
|
|
10601
|
-
"deps.requires": "Requires {keys}",
|
|
10602
|
-
"deps.editAria": "Prerequisites for {key}",
|
|
10603
10836
|
"deps.status.ready": "ready",
|
|
10604
10837
|
"deps.status.waiting": "waiting",
|
|
10605
10838
|
"deps.status.dependency-conflict": "dependency conflict",
|
|
@@ -10608,12 +10841,64 @@ const CHARTER_LOCALE = {
|
|
|
10608
10841
|
"deps.status.terminal": "terminal",
|
|
10609
10842
|
"deps.prerequisiteConflict": "prerequisite conflict",
|
|
10610
10843
|
"deps.conflict": "The staged dependency plan contains a cycle or invalid reference. Remove or change a prerequisite before Apply.",
|
|
10844
|
+
"deps.graphTitle": "Dependency map",
|
|
10845
|
+
"deps.graphFocus": "Focus",
|
|
10846
|
+
"deps.graphDepth": "Depth",
|
|
10847
|
+
"deps.depth1": "1 hop",
|
|
10848
|
+
"deps.depth2": "2 hops",
|
|
10849
|
+
"deps.showSupersedes": "Show replacements",
|
|
10850
|
+
"deps.zoomIn": "Zoom in",
|
|
10851
|
+
"deps.zoomOut": "Zoom out",
|
|
10852
|
+
"deps.resetLayout": "Reset zoom",
|
|
10853
|
+
"deps.hideGraph": "Hide graph",
|
|
10854
|
+
"deps.showGraph": "Show graph",
|
|
10855
|
+
"deps.graphAria": "Dependency graph",
|
|
10856
|
+
"deps.graphKeys": "Tab enters the graph once. Arrow keys move along dependencies; [ and ] visit every node and edge; Enter opens details; Esc closes details, then returns to the list.",
|
|
10857
|
+
"deps.historyKicker": "Replaced",
|
|
10858
|
+
"deps.historyStatus": "Not in the execution order",
|
|
10859
|
+
"deps.candidateKicker": "Candidate",
|
|
10860
|
+
"deps.candidateStatus": "Not in the execution order",
|
|
10861
|
+
"deps.historyAria": "Replaced item {text}; not in the execution order",
|
|
10862
|
+
"deps.candidateAria": "Candidate {text}; not in the execution order",
|
|
10863
|
+
"deps.edgeAria": "{to} depends on {from}",
|
|
10864
|
+
"deps.edgeAriaAdded": "{to} depends on {from} (added in this draft)",
|
|
10865
|
+
"deps.edgeAriaRemoved": "{to} depends on {from} (removed in this draft)",
|
|
10866
|
+
"deps.proposedEdgeAria": "Candidate prerequisite {from} for {to}; Enter opens the proposal",
|
|
10867
|
+
"deps.supersedesEdgeAria": "{from} is replaced by {to}",
|
|
10868
|
+
"deps.graphDegradedSupersedes": "The replacement history is hidden because this view is too dense.",
|
|
10869
|
+
"deps.graphDegradedDepth": "Depth was reduced to one hop because this view is too dense.",
|
|
10870
|
+
"deps.graphTooDense": "This dependency view has {count} navigable items; use the list instead.",
|
|
10871
|
+
"deps.inspectorTitle": "Dependency details · {key}",
|
|
10872
|
+
"deps.closeInspector": "Close details",
|
|
10873
|
+
"deps.inspectorStatus": "Status",
|
|
10874
|
+
"deps.inspectorRequires": "Requires",
|
|
10875
|
+
"deps.addRequires": "Add a prerequisite",
|
|
10876
|
+
"deps.removeRequires": "Remove {key}",
|
|
10877
|
+
"deps.removeEdge": "Remove this dependency",
|
|
10878
|
+
"deps.openProposal": "Open proposal",
|
|
10879
|
+
"deps.skipToList": "Skip to the dependency list",
|
|
10880
|
+
"deps.showMore": "Show {count} more dependency rows",
|
|
10881
|
+
"deps.rowPosition": "Dependency {index} of {total}",
|
|
10882
|
+
"deps.locateInList": "Locate in the list",
|
|
10883
|
+
"deps.locateInGraph": "Locate in graph",
|
|
10884
|
+
"deps.graphHint": "The graph never changes state by itself; edits are staged into the Change Set and Apply remains the only commit.",
|
|
10885
|
+
"deps.help": "Keys and notes",
|
|
10886
|
+
"deps.graphEmpty": "No dependencies yet. Drag one node onto another, or open a list row to add a prerequisite.",
|
|
10887
|
+
"deps.graphIsolatedTooMany": "No dependencies yet. The isolated-node preview is hidden for this many rows; use the list.",
|
|
10888
|
+
"deps.requiresSummary": "Prerequisites: {keys}",
|
|
10889
|
+
"deps.noRequires": "No prerequisites",
|
|
10890
|
+
"deps.editRequires": "Edit prerequisites",
|
|
10891
|
+
"deps.stagedAdded": "staged addition",
|
|
10892
|
+
"deps.dropInvalidSelf": "A deliverable cannot depend on itself.",
|
|
10893
|
+
"deps.dropInvalidDuplicate": "This prerequisite is already present.",
|
|
10894
|
+
"deps.stagedRemoved": "staged removal",
|
|
10895
|
+
"deps.candidateCycle": "candidate dependencies form a cycle; acceptance will be rejected",
|
|
10611
10896
|
"overview.budget": "Budget",
|
|
10612
10897
|
"overview.budgetDetail": "Prompt, objective, and item limits",
|
|
10613
10898
|
"overview.nothing": "Nothing configured yet.",
|
|
10614
10899
|
"overview.objectiveHint": "The original objective is immutable; a redirect keeps it for review.",
|
|
10615
10900
|
"bootstrap.kicker": "History draft",
|
|
10616
|
-
"bootstrap.title": "
|
|
10901
|
+
"bootstrap.title": "Compaction history draft",
|
|
10617
10902
|
"bootstrap.body": "This draft was extracted from the latest compaction summary and is not effective yet. Review it, then apply.",
|
|
10618
10903
|
"bootstrap.source": "Source: compaction summary ({tokens} tokens shadowed)",
|
|
10619
10904
|
"bootstrap.sourcePlain": "Source: compaction summary",
|
|
@@ -10748,6 +11033,7 @@ const CHARTER_LOCALE = {
|
|
|
10748
11033
|
"footer.abandon": "Abandon unknown request",
|
|
10749
11034
|
"footer.abandonConfirm": "Confirm abandon — this discards the retained request and local draft text",
|
|
10750
11035
|
"footer.applying": "Applying...",
|
|
11036
|
+
"footer.applyConfirmConflicts": "Apply with {count} conflict(s)",
|
|
10751
11037
|
"budget.editorOver": "This text exceeds the {limit} limit.",
|
|
10752
11038
|
"budget.shrinking": "Over the limit, but shortening is allowed and will be admitted.",
|
|
10753
11039
|
"budget.notGrowing": "Over the limit, but this edit does not increase the prompt; it will be admitted.",
|
|
@@ -10810,11 +11096,19 @@ const CHARTER_LOCALE = {
|
|
|
10810
11096
|
"recovery.digest": "Record digest",
|
|
10811
11097
|
"recovery.overBudget": "Over budget (not injected)",
|
|
10812
11098
|
"recovery.exportTitle": "Export",
|
|
10813
|
-
"recovery.exportHint": "Download the complete record
|
|
11099
|
+
"recovery.exportHint": "Download the complete record for external analysis, auditing, or backup. Restore uses the cache below; it does not depend on this download.",
|
|
10814
11100
|
"recovery.sensitive": "Sensitive: the archive contains your charter text. Store it securely.",
|
|
10815
11101
|
"recovery.export": "Download record archive",
|
|
10816
11102
|
"recovery.exportFailed": "The record could not be exported.",
|
|
10817
11103
|
"recovery.chooseFile": "Choose archive file",
|
|
11104
|
+
"recovery.cacheTitle": "Recent archive cache",
|
|
11105
|
+
"recovery.cacheHint": "While the record budget allows it, the latest five committed snapshots are kept automatically; older snapshots are pruned. Restore selects a cached snapshot, so no download is required.",
|
|
11106
|
+
"recovery.cacheEmpty": "No cached snapshot yet. A successful Apply creates one automatically when the record budget allows it.",
|
|
11107
|
+
"recovery.cacheUnavailable": "The archive cache is unavailable.",
|
|
11108
|
+
"recovery.cacheAria": "Choose a cached archive",
|
|
11109
|
+
"recovery.cacheRevision": "Revision {revision}",
|
|
11110
|
+
"recovery.importTitle": "Advanced: import a local archive file",
|
|
11111
|
+
"recovery.importHint": "Only for an archive exported from another machine or kept before this cache existed. Normal restore should use the cache above.",
|
|
10818
11112
|
"recovery.selected": "Selected",
|
|
10819
11113
|
"recovery.previewTitle": "Archive preview",
|
|
10820
11114
|
"recovery.previewHealth": "Health",
|
|
@@ -10830,7 +11124,9 @@ const CHARTER_LOCALE = {
|
|
|
10830
11124
|
"recovery.initialize": "Initialize empty Charter",
|
|
10831
11125
|
"recovery.initializeWarning": "Creating an empty Charter may replace a document that storage cannot read. Back up the file first if you need it.",
|
|
10832
11126
|
"recovery.initializeConfirm": "Confirm initialize empty",
|
|
10833
|
-
"recovery.
|
|
11127
|
+
"recovery.restoreTitle": "Restore archive",
|
|
11128
|
+
"recovery.restoreCached": "Restore cached snapshot",
|
|
11129
|
+
"recovery.restoreFile": "Restore imported archive",
|
|
10834
11130
|
"recovery.restoreConfirm": "Confirm restore",
|
|
10835
11131
|
"recovery.capabilityUnavailable": "Record maintenance requires DSH 0.2.1 or newer with owner/resource enforcement.",
|
|
10836
11132
|
"recovery.recordLimit": "The configured record budget leaves no room for a recovery archive; offline backup after stopping the Host is required.",
|
|
@@ -10883,17 +11179,27 @@ const CHARTER_LOCALE = {
|
|
|
10883
11179
|
"validity.unknown": "Unknown",
|
|
10884
11180
|
"validity.stale": "Stale",
|
|
10885
11181
|
"validators.title": "Fact validity validator",
|
|
10886
|
-
"validators.hint": "
|
|
10887
|
-
"validators.
|
|
10888
|
-
"validators.
|
|
11182
|
+
"validators.hint": "Pick one active commitment, choose what to check, then run it against a file in this workspace. The validator only reads files; it never executes a shell or edits the commitment.",
|
|
11183
|
+
"validators.targetLabel": "Commitment to check",
|
|
11184
|
+
"validators.targetHint": "Only active hard constraints and deliverables are listed.",
|
|
11185
|
+
"validators.methodLabel": "What should be true",
|
|
11186
|
+
"validators.pathLabel": "Workspace path",
|
|
11187
|
+
"validators.expectationLabel": "Expected content",
|
|
11188
|
+
"validators.itemAria": "Commitment to validate",
|
|
11189
|
+
"validators.kindAria": "Validation type",
|
|
10889
11190
|
"validators.pathAria": "Workspace relative file path",
|
|
10890
11191
|
"validators.pathPlaceholder": "relative/path",
|
|
10891
11192
|
"validators.expectationAria": "Expected digest or text",
|
|
10892
11193
|
"validators.containsPlaceholder": "text to find",
|
|
10893
|
-
"validators.pickItem": "Choose an active
|
|
10894
|
-
"validators.run": "Run
|
|
11194
|
+
"validators.pickItem": "Choose an active commitment",
|
|
11195
|
+
"validators.run": "Run check",
|
|
11196
|
+
"validators.kind.path-exists": "Path exists",
|
|
11197
|
+
"validators.kind.file-digest": "File SHA-256 matches",
|
|
11198
|
+
"validators.kind.file-contains": "File contains text",
|
|
10895
11199
|
"validators.done": "Validator result saved.",
|
|
10896
11200
|
"validators.failed": "Validator request failed.",
|
|
11201
|
+
"integrity.title": "Evidence integrity",
|
|
11202
|
+
"integrity.hint": "Checks whether the message and summary sources that proposals came from still match the current Session history. This is not a business check of the commitment itself.",
|
|
10897
11203
|
"integrity.check": "Check evidence integrity",
|
|
10898
11204
|
"integrity.summary": "Checked {count} evidence binding(s); {changed} not intact.",
|
|
10899
11205
|
"integrity.truncated": "Evidence checks were capped by the read budget.",
|
|
@@ -10965,6 +11271,43 @@ function topologicalDeliverables(items) {
|
|
|
10965
11271
|
}
|
|
10966
11272
|
return ordered;
|
|
10967
11273
|
}
|
|
11274
|
+
function validateDependencyGraph(items) {
|
|
11275
|
+
const byId = new Map(items.map((item) => [item.id, item]));
|
|
11276
|
+
for (const item of items) {
|
|
11277
|
+
if (item.kind !== "deliverable") {
|
|
11278
|
+
if ("requires" in item) throw charterError("CORRUPT_STATE", `non-deliverable item ${item.id} cannot carry requires`);
|
|
11279
|
+
continue;
|
|
11280
|
+
}
|
|
11281
|
+
const proposed = item.kind === "deliverable" ? item.proposedRequires ?? [] : [];
|
|
11282
|
+
if (new Set(proposed).size !== proposed.length) throw charterError("CORRUPT_STATE", `deliverable ${item.id} has duplicate proposed prerequisites`);
|
|
11283
|
+
for (const prerequisiteId of proposed) {
|
|
11284
|
+
const prerequisite = byId.get(prerequisiteId);
|
|
11285
|
+
if (prerequisite === void 0 || prerequisite.kind !== "deliverable" || !isStandingItem(prerequisite) && !(prerequisite.review === "pending" && prerequisite.lifecycle === "current")) throw charterError("INVALID_CHANGE_SET", `deliverable ${item.id} has a dangling proposed prerequisite ${prerequisiteId}`);
|
|
11286
|
+
}
|
|
11287
|
+
const requires = item.requires ?? [];
|
|
11288
|
+
if (new Set(requires).size !== requires.length) throw charterError("CORRUPT_STATE", `deliverable ${item.id} has duplicate prerequisites`);
|
|
11289
|
+
if (requires.length === 0) continue;
|
|
11290
|
+
if (!isStandingItem(item)) throw charterError("CORRUPT_STATE", `inactive deliverable ${item.id} cannot carry requires`);
|
|
11291
|
+
for (const prerequisiteId of requires) {
|
|
11292
|
+
if (prerequisiteId === item.id) throw charterError("INVALID_CHANGE_SET", `deliverable ${item.id} cannot require itself`);
|
|
11293
|
+
const prerequisite = byId.get(prerequisiteId);
|
|
11294
|
+
if (prerequisite === void 0 || prerequisite.kind !== "deliverable" || !isStandingItem(prerequisite)) throw charterError("INVALID_CHANGE_SET", `deliverable ${item.id} has a dangling prerequisite ${prerequisiteId}`);
|
|
11295
|
+
}
|
|
11296
|
+
}
|
|
11297
|
+
const state = /* @__PURE__ */ new Map();
|
|
11298
|
+
const visit = (item) => {
|
|
11299
|
+
const current = state.get(item.id) ?? 0;
|
|
11300
|
+
if (current === 1) throw charterError("INVALID_CHANGE_SET", "deliverable dependency graph contains a cycle");
|
|
11301
|
+
if (current === 2) return;
|
|
11302
|
+
state.set(item.id, 1);
|
|
11303
|
+
for (const id of item.requires ?? []) {
|
|
11304
|
+
const next = byId.get(id);
|
|
11305
|
+
if (next !== void 0 && next.kind === "deliverable") visit(next);
|
|
11306
|
+
}
|
|
11307
|
+
state.set(item.id, 2);
|
|
11308
|
+
};
|
|
11309
|
+
for (const item of standingDeliverables(items)) visit(item);
|
|
11310
|
+
}
|
|
10968
11311
|
function prerequisiteStatus(item, items) {
|
|
10969
11312
|
const byId = new Map(items.map((candidate) => [candidate.id, candidate]));
|
|
10970
11313
|
const prerequisites = (item.requires ?? []).map((id) => byId.get(id));
|
|
@@ -10992,158 +11335,1313 @@ function dependencyProjection(items) {
|
|
|
10992
11335
|
executionDisplay: executionDisplay(item, items)
|
|
10993
11336
|
}));
|
|
10994
11337
|
}
|
|
10995
|
-
|
|
10996
|
-
|
|
10997
|
-
|
|
10998
|
-
|
|
10999
|
-
|
|
11000
|
-
|
|
11001
|
-
|
|
11002
|
-
const
|
|
11003
|
-
|
|
11004
|
-
|
|
11005
|
-
const
|
|
11006
|
-
|
|
11007
|
-
|
|
11008
|
-
|
|
11338
|
+
/**
|
|
11339
|
+
* Prerequisite ids that make `item` conflict right now: a cancelled prerequisite,
|
|
11340
|
+
* or a prerequisite that is not `done` while the dependent already started.
|
|
11341
|
+
* Mirrors `prerequisiteStatus` rules 1–2, but returns the causes so a Change Set
|
|
11342
|
+
* can tell "new conflict" from "worsened conflict".
|
|
11343
|
+
*/
|
|
11344
|
+
function conflictingPrerequisites(item, items) {
|
|
11345
|
+
const byId = new Map(items.map((candidate) => [candidate.id, candidate]));
|
|
11346
|
+
const causes = [];
|
|
11347
|
+
for (const id of item.requires ?? []) {
|
|
11348
|
+
const prerequisite = byId.get(id);
|
|
11349
|
+
if (prerequisite === void 0 || prerequisite.kind !== "deliverable") continue;
|
|
11350
|
+
if (prerequisite.progress === "cancelled") {
|
|
11351
|
+
causes.push(id);
|
|
11352
|
+
continue;
|
|
11353
|
+
}
|
|
11354
|
+
if (prerequisite.progress !== "done" && (item.progress === "in-progress" || item.progress === "done")) causes.push(id);
|
|
11009
11355
|
}
|
|
11356
|
+
return causes;
|
|
11010
11357
|
}
|
|
11011
11358
|
/**
|
|
11012
|
-
*
|
|
11013
|
-
*
|
|
11014
|
-
*
|
|
11359
|
+
* Design §6.5: a Change Set must prominently mark newly introduced or worsened
|
|
11360
|
+
* readiness conflicts and require explicit user confirmation. This is the shared
|
|
11361
|
+
* before/after comparison used by the planner (Host authority) and the Pane
|
|
11362
|
+
* (immediate feedback), so both sides cannot drift.
|
|
11363
|
+
*
|
|
11364
|
+
* Structural illegality (cycles, dangling or inactive endpoints) is *not* part of
|
|
11365
|
+
* this diff: `validateDependencyGraph` rejects those outright.
|
|
11015
11366
|
*/
|
|
11016
|
-
|
|
11017
|
-
|
|
11018
|
-
|
|
11019
|
-
|
|
11020
|
-
|
|
11021
|
-
|
|
11022
|
-
|
|
11023
|
-
|
|
11024
|
-
|
|
11367
|
+
function dependencyConflictDiff(before, after) {
|
|
11368
|
+
const snapshot = (items) => {
|
|
11369
|
+
const out = /* @__PURE__ */ new Map();
|
|
11370
|
+
for (const item of standingDeliverables(items)) out.set(item.id, {
|
|
11371
|
+
status: prerequisiteStatus(item, items),
|
|
11372
|
+
conflicts: conflictingPrerequisites(item, items).length
|
|
11373
|
+
});
|
|
11374
|
+
return out;
|
|
11375
|
+
};
|
|
11376
|
+
const beforeState = snapshot(before);
|
|
11377
|
+
const afterState = snapshot(after);
|
|
11378
|
+
const added = [];
|
|
11379
|
+
const worsened = [];
|
|
11380
|
+
for (const [itemId, next] of afterState) {
|
|
11381
|
+
if (next.status !== "dependency-conflict") continue;
|
|
11382
|
+
const previous = beforeState.get(itemId);
|
|
11383
|
+
if (previous === void 0 || previous.status !== "dependency-conflict") {
|
|
11384
|
+
added.push({
|
|
11385
|
+
itemId,
|
|
11386
|
+
before: previous?.status ?? "absent",
|
|
11387
|
+
after: next.status,
|
|
11388
|
+
beforeConflicts: previous?.conflicts ?? 0,
|
|
11389
|
+
afterConflicts: next.conflicts
|
|
11390
|
+
});
|
|
11391
|
+
continue;
|
|
11392
|
+
}
|
|
11393
|
+
if (next.conflicts > previous.conflicts) worsened.push({
|
|
11394
|
+
itemId,
|
|
11395
|
+
before: previous.status,
|
|
11396
|
+
after: next.status,
|
|
11397
|
+
beforeConflicts: previous.conflicts,
|
|
11398
|
+
afterConflicts: next.conflicts
|
|
11399
|
+
});
|
|
11025
11400
|
}
|
|
11026
|
-
|
|
11027
|
-
ok: false,
|
|
11028
|
-
reason: "fileTooLarge"
|
|
11029
|
-
};
|
|
11030
|
-
const parsed = charterRecordArchiveSchema.safeParse(raw);
|
|
11031
|
-
if (!parsed.success) return {
|
|
11032
|
-
ok: false,
|
|
11033
|
-
reason: "invalidArchive"
|
|
11034
|
-
};
|
|
11035
|
-
const archive = parsed.data;
|
|
11036
|
-
if (archive.source.sessionId !== expected.sessionId) return {
|
|
11037
|
-
ok: false,
|
|
11038
|
-
reason: "sessionMismatch"
|
|
11039
|
-
};
|
|
11040
|
-
if (expected.lifecycle !== null && archive.source.lifecycle !== expected.lifecycle) return {
|
|
11041
|
-
ok: false,
|
|
11042
|
-
reason: "lifecycleMismatch"
|
|
11043
|
-
};
|
|
11044
|
-
const { payloadDigest, ...body } = archive;
|
|
11045
|
-
const actualPayload = await sha256Text(canonicalJson(body));
|
|
11046
|
-
if (actualPayload === null) return {
|
|
11047
|
-
ok: false,
|
|
11048
|
-
reason: "cryptoUnavailable"
|
|
11049
|
-
};
|
|
11050
|
-
const actualRecord = await sha256Text(canonicalJson(archive.record));
|
|
11051
|
-
if (actualRecord === null) return {
|
|
11052
|
-
ok: false,
|
|
11053
|
-
reason: "cryptoUnavailable"
|
|
11054
|
-
};
|
|
11055
|
-
const payloadDigestOk = payloadDigest === actualPayload;
|
|
11056
|
-
const recordDigestOk = archive.source.recordDigest === actualRecord;
|
|
11057
|
-
if (!payloadDigestOk || !recordDigestOk) return {
|
|
11058
|
-
ok: false,
|
|
11059
|
-
reason: "digestMismatch"
|
|
11060
|
-
};
|
|
11401
|
+
const byItemId = (left, right) => left.itemId < right.itemId ? -1 : left.itemId > right.itemId ? 1 : 0;
|
|
11061
11402
|
return {
|
|
11062
|
-
|
|
11063
|
-
|
|
11064
|
-
exportedAt: archive.exportedAt,
|
|
11065
|
-
sourceSession: archive.source.sessionId,
|
|
11066
|
-
health: archive.source.health,
|
|
11067
|
-
revision: archive.source.revision,
|
|
11068
|
-
lifecycle: archive.source.lifecycle,
|
|
11069
|
-
digest: archive.source.recordDigest,
|
|
11070
|
-
payloadDigestOk,
|
|
11071
|
-
recordDigestOk
|
|
11403
|
+
added: added.sort(byItemId),
|
|
11404
|
+
worsened: worsened.sort(byItemId)
|
|
11072
11405
|
};
|
|
11073
11406
|
}
|
|
11074
11407
|
//#endregion
|
|
11075
|
-
//#region .build-ts/
|
|
11408
|
+
//#region .build-ts/client/relation-graph.js
|
|
11076
11409
|
/**
|
|
11077
|
-
*
|
|
11078
|
-
*
|
|
11079
|
-
*
|
|
11410
|
+
* Client-side dependency-graph projection.
|
|
11411
|
+
*
|
|
11412
|
+
* The design contract is split in two:
|
|
11413
|
+
* - buildRelationGraph compares committed and projected items and derives
|
|
11414
|
+
* execution/candidate/history lanes plus edge staging state;
|
|
11415
|
+
* - layoutRelationGraph is a deterministic, font-free geometry pass over the
|
|
11416
|
+
* semantic model.
|
|
11417
|
+
*
|
|
11418
|
+
* Both functions are pure. The Pane renders their output; the Host is not
|
|
11419
|
+
* involved and no graph coordinate enters the record, prompt, or digest.
|
|
11080
11420
|
*/
|
|
11081
|
-
const
|
|
11082
|
-
|
|
11083
|
-
|
|
11084
|
-
|
|
11085
|
-
|
|
11086
|
-
|
|
11087
|
-
|
|
11088
|
-
|
|
11089
|
-
|
|
11090
|
-
|
|
11091
|
-
|
|
11092
|
-
|
|
11421
|
+
const GRAPH = {
|
|
11422
|
+
nodePaddingEm: .625,
|
|
11423
|
+
summaryEm: .78,
|
|
11424
|
+
nodeMinWidthEm: 9,
|
|
11425
|
+
nodeWidthEm: 10,
|
|
11426
|
+
nodeMaxWidthEm: 12,
|
|
11427
|
+
nodeHeightEm: {
|
|
11428
|
+
1: 3,
|
|
11429
|
+
2: 4.5
|
|
11430
|
+
},
|
|
11431
|
+
rankPitchEm: 12.5,
|
|
11432
|
+
rowPitchEm: 5.5,
|
|
11433
|
+
candidateGapEm: 2.5,
|
|
11434
|
+
historyGapEm: 2.5,
|
|
11435
|
+
navigationLimit: 60,
|
|
11436
|
+
isolatedNodeLimit: 20,
|
|
11437
|
+
touchTargetPx: 44
|
|
11093
11438
|
};
|
|
11094
|
-
|
|
11095
|
-
|
|
11439
|
+
const LINE_CAPACITY = Math.floor((GRAPH.nodeWidthEm - 2 * GRAPH.nodePaddingEm) / GRAPH.summaryEm);
|
|
11440
|
+
const active = (item) => item.kind === "deliverable" && item.review === "accepted" && item.lifecycle === "current";
|
|
11441
|
+
const pending = (item) => item.kind === "deliverable" && item.review === "pending" && item.lifecycle === "current";
|
|
11442
|
+
const requiresOf = (item) => item.requires ?? [];
|
|
11443
|
+
const proposedOf = (item) => item.proposedRequires ?? [];
|
|
11444
|
+
const sameSet = (left, right) => {
|
|
11445
|
+
const a = new Set(left);
|
|
11446
|
+
const b = new Set(right);
|
|
11447
|
+
return a.size === b.size && [...a].every((value) => b.has(value));
|
|
11448
|
+
};
|
|
11449
|
+
function statusFor(item, byId) {
|
|
11450
|
+
const prerequisites = requiresOf(item).map((id) => byId.get(id)).filter((value) => value !== void 0);
|
|
11451
|
+
const conflict = prerequisites.some((prerequisite) => prerequisite.progress === "cancelled" || prerequisite.progress !== "done" && (item.progress === "in-progress" || item.progress === "done"));
|
|
11452
|
+
const waiting = !conflict && prerequisites.some((prerequisite) => prerequisite.progress !== "done");
|
|
11453
|
+
const prerequisiteStatus = conflict ? "dependency-conflict" : waiting ? "waiting" : "satisfied";
|
|
11454
|
+
return {
|
|
11455
|
+
prerequisiteStatus,
|
|
11456
|
+
executionDisplay: item.progress === "done" || item.progress === "cancelled" ? "terminal" : item.progress === "blocked" ? "blocked" : item.progress === "in-progress" ? "in-progress" : prerequisiteStatus === "satisfied" ? "ready" : prerequisiteStatus
|
|
11457
|
+
};
|
|
11458
|
+
}
|
|
11459
|
+
function topology(items) {
|
|
11460
|
+
const byId = new Map(items.map((item) => [item.id, item]));
|
|
11461
|
+
const rankOf = /* @__PURE__ */ new Map();
|
|
11462
|
+
const visiting = /* @__PURE__ */ new Set();
|
|
11463
|
+
const place = (id) => {
|
|
11464
|
+
const known = rankOf.get(id);
|
|
11465
|
+
if (known !== void 0) return known;
|
|
11466
|
+
if (visiting.has(id)) return 0;
|
|
11467
|
+
visiting.add(id);
|
|
11468
|
+
const prerequisites = requiresOf(byId.get(id) ?? {
|
|
11469
|
+
id,
|
|
11470
|
+
kind: "deliverable",
|
|
11471
|
+
text: "",
|
|
11472
|
+
review: "accepted",
|
|
11473
|
+
lifecycle: "current"
|
|
11474
|
+
}).filter((prerequisiteId) => byId.has(prerequisiteId));
|
|
11475
|
+
const rank = prerequisites.length === 0 ? 0 : Math.max(...prerequisites.map(place)) + 1;
|
|
11476
|
+
visiting.delete(id);
|
|
11477
|
+
rankOf.set(id, rank);
|
|
11478
|
+
return rank;
|
|
11479
|
+
};
|
|
11480
|
+
for (const item of items) place(item.id);
|
|
11481
|
+
const byRank = /* @__PURE__ */ new Map();
|
|
11482
|
+
for (const item of items) {
|
|
11483
|
+
const rank = rankOf.get(item.id) ?? 0;
|
|
11484
|
+
const rows = byRank.get(rank) ?? [];
|
|
11485
|
+
rows.push(item);
|
|
11486
|
+
byRank.set(rank, rows);
|
|
11487
|
+
}
|
|
11488
|
+
const out = /* @__PURE__ */ new Map();
|
|
11489
|
+
const order = [];
|
|
11490
|
+
for (const rank of [...byRank.keys()].sort((a, b) => a - b)) (byRank.get(rank) ?? []).slice().sort((a, b) => (a.order ?? 0) - (b.order ?? 0) || a.id.localeCompare(b.id)).forEach((item, index) => {
|
|
11491
|
+
const status = statusFor(item, byId);
|
|
11492
|
+
out.set(item.id, {
|
|
11493
|
+
rank,
|
|
11494
|
+
order: index,
|
|
11495
|
+
localKey: `D${order.length + 1}`,
|
|
11496
|
+
prerequisiteStatus: status.prerequisiteStatus,
|
|
11497
|
+
executionDisplay: status.executionDisplay
|
|
11498
|
+
});
|
|
11499
|
+
order.push(item.id);
|
|
11500
|
+
});
|
|
11501
|
+
return {
|
|
11502
|
+
byId: out,
|
|
11503
|
+
order
|
|
11504
|
+
};
|
|
11096
11505
|
}
|
|
11097
|
-
|
|
11098
|
-
|
|
11099
|
-
const
|
|
11100
|
-
|
|
11101
|
-
|
|
11102
|
-
|
|
11103
|
-
|
|
11104
|
-
|
|
11506
|
+
function buildRelationGraph(input) {
|
|
11507
|
+
const committed = input.committed;
|
|
11508
|
+
const projected = input.projected;
|
|
11509
|
+
const showSupersedes = input.showSupersedes !== false;
|
|
11510
|
+
const committedActive = committed.filter(active);
|
|
11511
|
+
const projectedActive = projected.filter(active);
|
|
11512
|
+
const committedTopology = topology(committedActive);
|
|
11513
|
+
const projectedTopology = topology(projectedActive);
|
|
11514
|
+
const committedById = new Map(committedActive.map((item) => [item.id, item]));
|
|
11515
|
+
const projectedById = new Map(projectedActive.map((item) => [item.id, item]));
|
|
11516
|
+
const nodes = [];
|
|
11517
|
+
const allExecutionIds = /* @__PURE__ */ new Set([...committedById.keys(), ...projectedById.keys()]);
|
|
11518
|
+
for (const id of allExecutionIds) {
|
|
11519
|
+
const before = committedById.get(id);
|
|
11520
|
+
const after = projectedById.get(id);
|
|
11521
|
+
const state = before === void 0 ? "staged-added" : after === void 0 ? "staged-removed" : !sameSet(requiresOf(before), requiresOf(after)) || before.progress !== after.progress ? "staged-changed" : "unchanged";
|
|
11522
|
+
const source = after ?? before;
|
|
11523
|
+
if (source === void 0) continue;
|
|
11524
|
+
const projectedTopo = projectedTopology.byId.get(id);
|
|
11525
|
+
const committedTopo = committedTopology.byId.get(id);
|
|
11526
|
+
const topo = projectedTopo ?? committedTopo;
|
|
11527
|
+
nodes.push({
|
|
11528
|
+
id,
|
|
11529
|
+
lane: "execution",
|
|
11530
|
+
localKey: topo?.localKey,
|
|
11531
|
+
text: source.text,
|
|
11532
|
+
rank: topo?.rank,
|
|
11533
|
+
order: topo?.order ?? 0,
|
|
11534
|
+
groupRank: void 0,
|
|
11535
|
+
progress: source.progress,
|
|
11536
|
+
executionDisplay: topo?.executionDisplay,
|
|
11537
|
+
prerequisiteStatus: topo?.prerequisiteStatus,
|
|
11538
|
+
state
|
|
11539
|
+
});
|
|
11105
11540
|
}
|
|
11106
|
-
|
|
11107
|
-
|
|
11108
|
-
|
|
11109
|
-
|
|
11110
|
-
|
|
11111
|
-
const
|
|
11112
|
-
const
|
|
11113
|
-
|
|
11114
|
-
|
|
11115
|
-
|
|
11116
|
-
|
|
11117
|
-
|
|
11118
|
-
|
|
11119
|
-
|
|
11120
|
-
|
|
11121
|
-
|
|
11122
|
-
|
|
11123
|
-
|
|
11124
|
-
|
|
11125
|
-
|
|
11126
|
-
|
|
11127
|
-
case "saved": return t("footer.saved", { revision: feedback.revision });
|
|
11128
|
-
case "replayed": return t("footer.replayed");
|
|
11129
|
-
case "bootstrapSaved": return t("footer.bootstrapSaved", {
|
|
11130
|
-
revision: feedback.revision,
|
|
11131
|
-
active: feedback.active,
|
|
11132
|
-
pending: feedback.pending
|
|
11541
|
+
const committedPending = new Map(committed.filter(pending).map((item) => [item.id, item]));
|
|
11542
|
+
const projectedPending = new Map(projected.filter(pending).map((item) => [item.id, item]));
|
|
11543
|
+
const executionIds = new Set(nodes.map((node) => node.id));
|
|
11544
|
+
const referenced = /* @__PURE__ */ new Set();
|
|
11545
|
+
for (const item of projectedPending.values()) for (const id of proposedOf(item)) referenced.add(id);
|
|
11546
|
+
const nextCandidateOrder = () => nodes.filter((node) => node.lane === "candidate").length;
|
|
11547
|
+
for (const [id, item] of projectedPending) {
|
|
11548
|
+
if (proposedOf(item).length === 0 && !referenced.has(id)) continue;
|
|
11549
|
+
const targetRanks = proposedOf(item).map((target) => projectedTopology.byId.get(target)?.rank).filter((rank) => rank !== void 0);
|
|
11550
|
+
nodes.push({
|
|
11551
|
+
id,
|
|
11552
|
+
lane: "candidate",
|
|
11553
|
+
localKey: void 0,
|
|
11554
|
+
text: item.text,
|
|
11555
|
+
rank: void 0,
|
|
11556
|
+
order: item.order ?? nextCandidateOrder(),
|
|
11557
|
+
groupRank: targetRanks.length ? Math.max(...targetRanks) : Number.MAX_SAFE_INTEGER,
|
|
11558
|
+
progress: void 0,
|
|
11559
|
+
executionDisplay: void 0,
|
|
11560
|
+
prerequisiteStatus: void 0,
|
|
11561
|
+
state: committedPending.has(id) ? "unchanged" : "staged-added"
|
|
11133
11562
|
});
|
|
11134
|
-
case "error": return errorLabel(feedback.code, t);
|
|
11135
|
-
case "connection": return t("error.connection");
|
|
11136
|
-
case "scope": return t("error.draftScope");
|
|
11137
|
-
case "editorBudget": return t("budget.editorOver", { limit: formatBytes(t, feedback.limit) });
|
|
11138
|
-
case "itemBudget": return t("budget.itemOver", { limit: formatBytes(t, feedback.limit) });
|
|
11139
|
-
case "editorUnchanged": return feedback.target === "objective" ? t("editor.unchangedObjective") : t("editor.unchangedItem");
|
|
11140
|
-
case "editorInvalid": return textIssueMessage(feedback.issue, t);
|
|
11141
|
-
case "discarded": return t("footer.discarded");
|
|
11142
11563
|
}
|
|
11143
|
-
|
|
11144
|
-
|
|
11145
|
-
|
|
11146
|
-
|
|
11564
|
+
for (const [id, item] of committedPending) {
|
|
11565
|
+
if (projectedPending.has(id) || executionIds.has(id)) continue;
|
|
11566
|
+
nodes.push({
|
|
11567
|
+
id,
|
|
11568
|
+
lane: "candidate",
|
|
11569
|
+
localKey: void 0,
|
|
11570
|
+
text: item.text,
|
|
11571
|
+
rank: void 0,
|
|
11572
|
+
order: item.order ?? nextCandidateOrder(),
|
|
11573
|
+
groupRank: Number.MAX_SAFE_INTEGER,
|
|
11574
|
+
progress: void 0,
|
|
11575
|
+
executionDisplay: void 0,
|
|
11576
|
+
prerequisiteStatus: void 0,
|
|
11577
|
+
state: "staged-removed"
|
|
11578
|
+
});
|
|
11579
|
+
}
|
|
11580
|
+
const pendingIds = new Set(projectedPending.keys());
|
|
11581
|
+
const cycleIds = /* @__PURE__ */ new Set();
|
|
11582
|
+
const visitState = /* @__PURE__ */ new Map();
|
|
11583
|
+
const stack = [];
|
|
11584
|
+
const visit = (id) => {
|
|
11585
|
+
const state = visitState.get(id) ?? 0;
|
|
11586
|
+
if (state === 2) return;
|
|
11587
|
+
if (state === 1) {
|
|
11588
|
+
const index = stack.indexOf(id);
|
|
11589
|
+
if (index >= 0) for (const member of stack.slice(index)) cycleIds.add(member);
|
|
11590
|
+
return;
|
|
11591
|
+
}
|
|
11592
|
+
visitState.set(id, 1);
|
|
11593
|
+
stack.push(id);
|
|
11594
|
+
for (const target of proposedOf(projectedPending.get(id) ?? {
|
|
11595
|
+
id,
|
|
11596
|
+
kind: "deliverable",
|
|
11597
|
+
text: "",
|
|
11598
|
+
review: "pending",
|
|
11599
|
+
lifecycle: "current"
|
|
11600
|
+
})) if (pendingIds.has(target)) visit(target);
|
|
11601
|
+
stack.pop();
|
|
11602
|
+
visitState.set(id, 2);
|
|
11603
|
+
};
|
|
11604
|
+
for (const id of pendingIds) visit(id);
|
|
11605
|
+
const candidateRankCache = /* @__PURE__ */ new Map();
|
|
11606
|
+
const candidateRank = (id) => {
|
|
11607
|
+
if (cycleIds.has(id)) return 0;
|
|
11608
|
+
const cached = candidateRankCache.get(id);
|
|
11609
|
+
if (cached !== void 0) return cached;
|
|
11610
|
+
if (!pendingIds.has(id)) return 0;
|
|
11611
|
+
const item = projectedPending.get(id);
|
|
11612
|
+
if (item === void 0) return 0;
|
|
11613
|
+
const activeBase = Math.max(0, ...proposedOf(item).map((target) => projectedTopology.byId.get(target)?.rank).filter((rank) => rank !== void 0));
|
|
11614
|
+
const pendingPredecessors = proposedOf(item).filter((target) => pendingIds.has(target));
|
|
11615
|
+
const rank = activeBase + (pendingPredecessors.length === 0 ? 0 : 1 + Math.max(...pendingPredecessors.map(candidateRank)));
|
|
11616
|
+
candidateRankCache.set(id, rank);
|
|
11617
|
+
return rank;
|
|
11618
|
+
};
|
|
11619
|
+
for (let index = 0; index < nodes.length; index += 1) {
|
|
11620
|
+
const node = nodes[index];
|
|
11621
|
+
if (node?.lane !== "candidate" || !pendingIds.has(node.id)) continue;
|
|
11622
|
+
nodes[index] = {
|
|
11623
|
+
...node,
|
|
11624
|
+
groupRank: candidateRank(node.id),
|
|
11625
|
+
candidateCycle: cycleIds.has(node.id) || proposedOf(projectedPending.get(node.id) ?? {
|
|
11626
|
+
id: node.id,
|
|
11627
|
+
kind: "deliverable",
|
|
11628
|
+
text: "",
|
|
11629
|
+
review: "pending",
|
|
11630
|
+
lifecycle: "current"
|
|
11631
|
+
}).some((target) => pendingIds.has(target) && cycleIds.has(target))
|
|
11632
|
+
};
|
|
11633
|
+
}
|
|
11634
|
+
const edges = [];
|
|
11635
|
+
const committedPairs = /* @__PURE__ */ new Set();
|
|
11636
|
+
for (const item of committedActive) for (const from of requiresOf(item)) committedPairs.add(`${from}→${item.id}`);
|
|
11637
|
+
const projectedPairs = /* @__PURE__ */ new Set();
|
|
11638
|
+
for (const item of projectedActive) for (const from of requiresOf(item)) projectedPairs.add(`${from}→${item.id}`);
|
|
11639
|
+
for (const pair of /* @__PURE__ */ new Set([...committedPairs, ...projectedPairs])) {
|
|
11640
|
+
const [from = "", to = ""] = pair.split("→");
|
|
11641
|
+
const inCommitted = committedPairs.has(pair);
|
|
11642
|
+
const inProjected = projectedPairs.has(pair);
|
|
11643
|
+
edges.push({
|
|
11644
|
+
from,
|
|
11645
|
+
to,
|
|
11646
|
+
kind: "requires",
|
|
11647
|
+
state: inCommitted && inProjected ? "committed" : inProjected ? "staged-added" : "staged-removed",
|
|
11648
|
+
editable: true,
|
|
11649
|
+
focusable: true
|
|
11650
|
+
});
|
|
11651
|
+
}
|
|
11652
|
+
for (const item of projectedPending.values()) for (const from of proposedOf(item)) edges.push({
|
|
11653
|
+
from,
|
|
11654
|
+
to: item.id,
|
|
11655
|
+
kind: "proposed",
|
|
11656
|
+
state: "committed",
|
|
11657
|
+
editable: false,
|
|
11658
|
+
focusable: true,
|
|
11659
|
+
targetProposalId: item.id
|
|
11660
|
+
});
|
|
11661
|
+
const committedAll = new Map(committed.map((item) => [item.id, item]));
|
|
11662
|
+
const projectedAll = new Map(projected.map((item) => [item.id, item]));
|
|
11663
|
+
const pairsOf = (items) => {
|
|
11664
|
+
const out = /* @__PURE__ */ new Set();
|
|
11665
|
+
for (const item of items) {
|
|
11666
|
+
if (item.supersedes !== void 0) out.add(`${item.supersedes}→${item.id}`);
|
|
11667
|
+
if (item.supersededBy !== void 0) out.add(`${item.id}→${item.supersededBy}`);
|
|
11668
|
+
}
|
|
11669
|
+
return out;
|
|
11670
|
+
};
|
|
11671
|
+
const committedSupersedes = pairsOf(committed);
|
|
11672
|
+
const projectedSupersedes = pairsOf(projected);
|
|
11673
|
+
const supersedesPairs = /* @__PURE__ */ new Set([...committedSupersedes, ...projectedSupersedes]);
|
|
11674
|
+
const visibleIds = new Set(nodes.map((node) => node.id));
|
|
11675
|
+
const committedActiveIds = new Set(committedActive.map((item) => item.id));
|
|
11676
|
+
const projectedActiveIds = new Set(projectedActive.map((item) => item.id));
|
|
11677
|
+
if (showSupersedes) {
|
|
11678
|
+
const endpoints = /* @__PURE__ */ new Set();
|
|
11679
|
+
for (const pair of supersedesPairs) for (const id of pair.split("→")) endpoints.add(id);
|
|
11680
|
+
[...endpoints].filter((id) => !visibleIds.has(id)).filter((id) => !committedActiveIds.has(id) && !projectedActiveIds.has(id)).filter((id) => committedAll.has(id) || projectedAll.has(id)).sort().forEach((id, index) => {
|
|
11681
|
+
const item = projectedAll.get(id) ?? committedAll.get(id);
|
|
11682
|
+
if (item === void 0) return;
|
|
11683
|
+
nodes.push({
|
|
11684
|
+
id,
|
|
11685
|
+
lane: "history",
|
|
11686
|
+
ghost: true,
|
|
11687
|
+
localKey: void 0,
|
|
11688
|
+
text: item.text,
|
|
11689
|
+
rank: void 0,
|
|
11690
|
+
order: index,
|
|
11691
|
+
groupRank: void 0,
|
|
11692
|
+
progress: void 0,
|
|
11693
|
+
executionDisplay: void 0,
|
|
11694
|
+
prerequisiteStatus: void 0,
|
|
11695
|
+
state: "unchanged"
|
|
11696
|
+
});
|
|
11697
|
+
visibleIds.add(id);
|
|
11698
|
+
});
|
|
11699
|
+
}
|
|
11700
|
+
for (const pair of [...supersedesPairs].sort()) {
|
|
11701
|
+
if (!showSupersedes) break;
|
|
11702
|
+
const [from = "", to = ""] = pair.split("→");
|
|
11703
|
+
if (!visibleIds.has(from) || !visibleIds.has(to)) continue;
|
|
11704
|
+
const inCommitted = committedSupersedes.has(pair);
|
|
11705
|
+
const inProjected = projectedSupersedes.has(pair);
|
|
11706
|
+
edges.push({
|
|
11707
|
+
from,
|
|
11708
|
+
to,
|
|
11709
|
+
kind: "supersedes",
|
|
11710
|
+
state: inCommitted && inProjected ? "committed" : inProjected ? "staged-added" : "staged-removed",
|
|
11711
|
+
editable: false,
|
|
11712
|
+
focusable: true
|
|
11713
|
+
});
|
|
11714
|
+
}
|
|
11715
|
+
return {
|
|
11716
|
+
nodes,
|
|
11717
|
+
edges,
|
|
11718
|
+
topoOrder: projectedTopology.order,
|
|
11719
|
+
committedTopoOrder: committedTopology.order,
|
|
11720
|
+
navigables: nodes.length + edges.length
|
|
11721
|
+
};
|
|
11722
|
+
}
|
|
11723
|
+
function labelLines(text) {
|
|
11724
|
+
let weight = 0;
|
|
11725
|
+
for (const character of text) weight += /[\u2e80-\u9fff\uf900-\ufaff\uff00-\uffef]/u.test(character) ? 1 : .5;
|
|
11726
|
+
return weight <= LINE_CAPACITY ? 1 : 2;
|
|
11727
|
+
}
|
|
11728
|
+
function defaultFocus(model) {
|
|
11729
|
+
const execution = model.nodes.filter((node) => node.lane === "execution");
|
|
11730
|
+
const order = (nodes) => nodes.slice().sort((a, b) => (a.rank ?? 999) - (b.rank ?? 999) || (a.order ?? 0) - (b.order ?? 0) || a.id.localeCompare(b.id));
|
|
11731
|
+
if (execution.length === 0) {
|
|
11732
|
+
const candidate = model.nodes.filter((node) => node.lane === "candidate");
|
|
11733
|
+
if (candidate.length > 0) return order(candidate)[0]?.id;
|
|
11734
|
+
return order(model.nodes.filter((node) => node.lane === "history"))[0]?.id;
|
|
11735
|
+
}
|
|
11736
|
+
const conflict = order(execution.filter((node) => node.prerequisiteStatus === "dependency-conflict" || node.executionDisplay === "dependency-conflict"));
|
|
11737
|
+
if (conflict.length > 0) return conflict[0]?.id;
|
|
11738
|
+
const waiting = order(execution.filter((node) => node.executionDisplay === "waiting"));
|
|
11739
|
+
if (waiting.length > 0) return waiting[0]?.id;
|
|
11740
|
+
return order(execution)[0]?.id;
|
|
11741
|
+
}
|
|
11742
|
+
function layoutRelationGraph(model, options = {}) {
|
|
11743
|
+
const depth = options.depth ?? 1;
|
|
11744
|
+
const focusId = options.focusId !== void 0 ? options.focusId : defaultFocus(model);
|
|
11745
|
+
let visible = [...model.nodes];
|
|
11746
|
+
let visibleEdges = [...model.edges];
|
|
11747
|
+
if (model.edges.length === 0) {
|
|
11748
|
+
if (visible.length > GRAPH.isolatedNodeLimit) return {
|
|
11749
|
+
nodes: [],
|
|
11750
|
+
edges: [],
|
|
11751
|
+
width: 0,
|
|
11752
|
+
height: 0,
|
|
11753
|
+
traversal: [],
|
|
11754
|
+
navigables: visible.length,
|
|
11755
|
+
focusId,
|
|
11756
|
+
depth,
|
|
11757
|
+
degraded: {
|
|
11758
|
+
supersedesHidden: options.supersedesHidden === true,
|
|
11759
|
+
depthReduced: false,
|
|
11760
|
+
hidden: true,
|
|
11761
|
+
isolatedTooMany: true
|
|
11762
|
+
}
|
|
11763
|
+
};
|
|
11764
|
+
const ordered = visible.slice().sort((a, b) => {
|
|
11765
|
+
const lane = (value) => value.lane === "execution" ? 0 : value.lane === "candidate" ? 1 : 2;
|
|
11766
|
+
return lane(a) - lane(b) || a.order - b.order || a.id.localeCompare(b.id);
|
|
11767
|
+
});
|
|
11768
|
+
const columns = Math.min(3, Math.max(1, ordered.length));
|
|
11769
|
+
const placed = ordered.map((node, index) => {
|
|
11770
|
+
const lines = labelLines(node.text);
|
|
11771
|
+
return {
|
|
11772
|
+
...node,
|
|
11773
|
+
col: index % columns,
|
|
11774
|
+
x: index % columns * GRAPH.rankPitchEm,
|
|
11775
|
+
y: Math.floor(index / columns) * GRAPH.rowPitchEm,
|
|
11776
|
+
w: GRAPH.nodeWidthEm,
|
|
11777
|
+
h: GRAPH.nodeHeightEm[lines],
|
|
11778
|
+
labelLines: lines
|
|
11779
|
+
};
|
|
11780
|
+
});
|
|
11781
|
+
return {
|
|
11782
|
+
nodes: placed,
|
|
11783
|
+
edges: [],
|
|
11784
|
+
width: Math.max(0, ...placed.map((node) => node.x + node.w)),
|
|
11785
|
+
height: Math.max(0, ...placed.map((node) => node.y + node.h)),
|
|
11786
|
+
traversal: placed.map((node) => node.id),
|
|
11787
|
+
navigables: placed.length,
|
|
11788
|
+
focusId,
|
|
11789
|
+
depth,
|
|
11790
|
+
degraded: {
|
|
11791
|
+
supersedesHidden: options.supersedesHidden === true,
|
|
11792
|
+
depthReduced: false,
|
|
11793
|
+
hidden: false,
|
|
11794
|
+
isolatedTooMany: false
|
|
11795
|
+
}
|
|
11796
|
+
};
|
|
11797
|
+
}
|
|
11798
|
+
if (focusId !== void 0 && model.edges.length > 0) {
|
|
11799
|
+
const keep = /* @__PURE__ */ new Set([focusId]);
|
|
11800
|
+
let frontier = [focusId];
|
|
11801
|
+
for (let distance = 0; distance < depth; distance += 1) {
|
|
11802
|
+
const next = [];
|
|
11803
|
+
for (const id of frontier) for (const edge of model.edges) {
|
|
11804
|
+
if (edge.from === id && !keep.has(edge.to)) {
|
|
11805
|
+
keep.add(edge.to);
|
|
11806
|
+
next.push(edge.to);
|
|
11807
|
+
}
|
|
11808
|
+
if (edge.to === id && !keep.has(edge.from)) {
|
|
11809
|
+
keep.add(edge.from);
|
|
11810
|
+
next.push(edge.from);
|
|
11811
|
+
}
|
|
11812
|
+
}
|
|
11813
|
+
frontier = next;
|
|
11814
|
+
}
|
|
11815
|
+
visible = visible.filter((node) => keep.has(node.id));
|
|
11816
|
+
visibleEdges = visibleEdges.filter((edge) => keep.has(edge.from) && keep.has(edge.to));
|
|
11817
|
+
}
|
|
11818
|
+
if (options.supersedesHidden === true) {
|
|
11819
|
+
visible = visible.filter((node) => node.lane !== "history");
|
|
11820
|
+
visibleEdges = visibleEdges.filter((edge) => edge.kind !== "supersedes");
|
|
11821
|
+
}
|
|
11822
|
+
const navigables = visible.length + visibleEdges.length;
|
|
11823
|
+
const hasHistory = visible.some((node) => node.lane === "history");
|
|
11824
|
+
if (navigables > GRAPH.navigationLimit && hasHistory && options.supersedesHidden !== true) {
|
|
11825
|
+
const inner = layoutRelationGraph(model, {
|
|
11826
|
+
...options,
|
|
11827
|
+
supersedesHidden: true
|
|
11828
|
+
});
|
|
11829
|
+
return {
|
|
11830
|
+
...inner,
|
|
11831
|
+
degraded: {
|
|
11832
|
+
...inner.degraded,
|
|
11833
|
+
supersedesHidden: true
|
|
11834
|
+
}
|
|
11835
|
+
};
|
|
11836
|
+
}
|
|
11837
|
+
if (navigables > GRAPH.navigationLimit && depth > 1) {
|
|
11838
|
+
const inner = layoutRelationGraph(model, {
|
|
11839
|
+
...options,
|
|
11840
|
+
depth: 1
|
|
11841
|
+
});
|
|
11842
|
+
return {
|
|
11843
|
+
...inner,
|
|
11844
|
+
degraded: {
|
|
11845
|
+
...inner.degraded,
|
|
11846
|
+
depthReduced: true
|
|
11847
|
+
}
|
|
11848
|
+
};
|
|
11849
|
+
}
|
|
11850
|
+
if (navigables > GRAPH.navigationLimit) return {
|
|
11851
|
+
nodes: [],
|
|
11852
|
+
edges: [],
|
|
11853
|
+
width: 0,
|
|
11854
|
+
height: 0,
|
|
11855
|
+
traversal: [],
|
|
11856
|
+
navigables,
|
|
11857
|
+
focusId,
|
|
11858
|
+
depth,
|
|
11859
|
+
degraded: {
|
|
11860
|
+
supersedesHidden: options.supersedesHidden === true,
|
|
11861
|
+
depthReduced: false,
|
|
11862
|
+
hidden: true,
|
|
11863
|
+
isolatedTooMany: false
|
|
11864
|
+
}
|
|
11865
|
+
};
|
|
11866
|
+
const placed = [];
|
|
11867
|
+
const rankRows = /* @__PURE__ */ new Map();
|
|
11868
|
+
for (const node of visible.filter((value) => value.lane === "execution")) {
|
|
11869
|
+
const rank = node.rank ?? 0;
|
|
11870
|
+
const rows = rankRows.get(rank) ?? [];
|
|
11871
|
+
rows.push(node);
|
|
11872
|
+
rankRows.set(rank, rows);
|
|
11873
|
+
}
|
|
11874
|
+
let rowCount = 1;
|
|
11875
|
+
for (const rows of rankRows.values()) rowCount = Math.max(rowCount, rows.length);
|
|
11876
|
+
const maxExecutionHeight = rankRows.size === 0 ? GRAPH.nodeHeightEm[1] : Math.max(...[...rankRows.values()].flat().map((node) => GRAPH.nodeHeightEm[labelLines(node.text)]));
|
|
11877
|
+
const executionHeight = (rowCount - 1) * GRAPH.rowPitchEm + maxExecutionHeight + GRAPH.candidateGapEm;
|
|
11878
|
+
const sortedRanks = [...rankRows.keys()].sort((a, b) => a - b);
|
|
11879
|
+
const minimumRank = sortedRanks.length > 0 ? sortedRanks[0] ?? 0 : 0;
|
|
11880
|
+
const maxColumn = sortedRanks.length > 0 ? (sortedRanks[sortedRanks.length - 1] ?? 0) - minimumRank : -1;
|
|
11881
|
+
for (const rank of sortedRanks) (rankRows.get(rank) ?? []).slice().sort((a, b) => a.order - b.order || a.id.localeCompare(b.id)).forEach((node, index) => {
|
|
11882
|
+
const lines = labelLines(node.text);
|
|
11883
|
+
placed.push({
|
|
11884
|
+
...node,
|
|
11885
|
+
col: rank - minimumRank,
|
|
11886
|
+
x: (rank - minimumRank) * GRAPH.rankPitchEm,
|
|
11887
|
+
y: index * GRAPH.rowPitchEm,
|
|
11888
|
+
w: GRAPH.nodeWidthEm,
|
|
11889
|
+
h: GRAPH.nodeHeightEm[lines],
|
|
11890
|
+
labelLines: lines
|
|
11891
|
+
});
|
|
11892
|
+
});
|
|
11893
|
+
const candidates = visible.filter((node) => node.lane === "candidate");
|
|
11894
|
+
const candidateColumns = /* @__PURE__ */ new Map();
|
|
11895
|
+
for (const node of candidates) {
|
|
11896
|
+
const column = node.groupRank === Number.MAX_SAFE_INTEGER ? maxColumn + 1 : Math.max(0, (node.groupRank ?? 0) - minimumRank);
|
|
11897
|
+
const rows = candidateColumns.get(column) ?? [];
|
|
11898
|
+
rows.push(node);
|
|
11899
|
+
candidateColumns.set(column, rows);
|
|
11900
|
+
}
|
|
11901
|
+
for (const [column, rows] of candidateColumns) {
|
|
11902
|
+
rows.sort((a, b) => a.order - b.order || a.id.localeCompare(b.id));
|
|
11903
|
+
rows.forEach((node, index) => {
|
|
11904
|
+
const lines = labelLines(node.text);
|
|
11905
|
+
placed.push({
|
|
11906
|
+
...node,
|
|
11907
|
+
col: column,
|
|
11908
|
+
x: column * GRAPH.rankPitchEm,
|
|
11909
|
+
y: executionHeight + index * GRAPH.rowPitchEm,
|
|
11910
|
+
w: GRAPH.nodeWidthEm,
|
|
11911
|
+
h: GRAPH.nodeHeightEm[lines],
|
|
11912
|
+
labelLines: lines
|
|
11913
|
+
});
|
|
11914
|
+
});
|
|
11915
|
+
}
|
|
11916
|
+
const history = visible.filter((node) => node.lane === "history");
|
|
11917
|
+
if (history.length > 0) {
|
|
11918
|
+
const columnById = new Map(placed.filter((node) => node.lane !== "history").map((node) => [node.id, node.col]));
|
|
11919
|
+
const supersedesEdges = visibleEdges.filter((edge) => edge.kind === "supersedes");
|
|
11920
|
+
const columnOf = (id) => {
|
|
11921
|
+
const seen = /* @__PURE__ */ new Set([id]);
|
|
11922
|
+
const queue = [id];
|
|
11923
|
+
while (queue.length > 0) {
|
|
11924
|
+
const current = queue.shift();
|
|
11925
|
+
if (current === void 0) break;
|
|
11926
|
+
for (const edge of supersedesEdges) {
|
|
11927
|
+
const next = edge.from === current ? edge.to : edge.to === current ? edge.from : void 0;
|
|
11928
|
+
if (next === void 0 || seen.has(next)) continue;
|
|
11929
|
+
const column = columnById.get(next);
|
|
11930
|
+
if (column !== void 0) return column;
|
|
11931
|
+
seen.add(next);
|
|
11932
|
+
queue.push(next);
|
|
11933
|
+
}
|
|
11934
|
+
}
|
|
11935
|
+
return 0;
|
|
11936
|
+
};
|
|
11937
|
+
const candidatePlaced = placed.filter((node) => node.lane === "candidate");
|
|
11938
|
+
const historyTop = candidatePlaced.length > 0 ? Math.max(...candidatePlaced.map((node) => node.y + node.h)) + GRAPH.historyGapEm : executionHeight;
|
|
11939
|
+
const historyColumns = /* @__PURE__ */ new Map();
|
|
11940
|
+
for (const node of history) {
|
|
11941
|
+
const column = columnOf(node.id);
|
|
11942
|
+
const rows = historyColumns.get(column) ?? [];
|
|
11943
|
+
rows.push(node);
|
|
11944
|
+
historyColumns.set(column, rows);
|
|
11945
|
+
}
|
|
11946
|
+
for (const [column, rows] of historyColumns) {
|
|
11947
|
+
rows.sort((a, b) => a.order - b.order || a.id.localeCompare(b.id));
|
|
11948
|
+
rows.forEach((node, index) => {
|
|
11949
|
+
const lines = labelLines(node.text);
|
|
11950
|
+
placed.push({
|
|
11951
|
+
...node,
|
|
11952
|
+
col: column,
|
|
11953
|
+
x: column * GRAPH.rankPitchEm,
|
|
11954
|
+
y: historyTop + index * GRAPH.rowPitchEm,
|
|
11955
|
+
w: GRAPH.nodeWidthEm,
|
|
11956
|
+
h: GRAPH.nodeHeightEm[lines],
|
|
11957
|
+
labelLines: lines
|
|
11958
|
+
});
|
|
11959
|
+
});
|
|
11960
|
+
}
|
|
11961
|
+
}
|
|
11962
|
+
const byId = new Map(placed.map((node) => [node.id, node]));
|
|
11963
|
+
const edges = visibleEdges.filter((edge) => byId.has(edge.from) && byId.has(edge.to)).map((edge) => {
|
|
11964
|
+
const from = byId.get(edge.from);
|
|
11965
|
+
const to = byId.get(edge.to);
|
|
11966
|
+
const x1 = from.x + from.w;
|
|
11967
|
+
const y1 = from.y + from.h / 2;
|
|
11968
|
+
const x2 = to.x;
|
|
11969
|
+
const y2 = to.y + to.h / 2;
|
|
11970
|
+
const middle = (x1 + x2) / 2;
|
|
11971
|
+
return {
|
|
11972
|
+
...edge,
|
|
11973
|
+
key: `e:${edge.kind}:${edge.from}→${edge.to}`,
|
|
11974
|
+
path: `M ${x1} ${y1} C ${middle} ${y1}, ${middle} ${y2}, ${x2} ${y2}`,
|
|
11975
|
+
labelAt: {
|
|
11976
|
+
x: middle,
|
|
11977
|
+
y: (y1 + y2) / 2 - .4
|
|
11978
|
+
}
|
|
11979
|
+
};
|
|
11980
|
+
});
|
|
11981
|
+
const traversal = [];
|
|
11982
|
+
const executionNodes = placed.filter((node) => node.lane === "execution").sort((a, b) => a.col - b.col || a.order - b.order || a.id.localeCompare(b.id));
|
|
11983
|
+
const candidateNodes = placed.filter((node) => node.lane === "candidate").sort((a, b) => a.col - b.col || a.order - b.order || a.id.localeCompare(b.id));
|
|
11984
|
+
const addWithEdges = (node) => {
|
|
11985
|
+
if (!traversal.includes(node.id)) traversal.push(node.id);
|
|
11986
|
+
edges.filter((edge) => edge.from === node.id || edge.kind === "proposed" && edge.to === node.id).sort((a, b) => {
|
|
11987
|
+
const left = byId.get(a.to);
|
|
11988
|
+
const right = byId.get(b.to);
|
|
11989
|
+
return (left?.col ?? 999) - (right?.col ?? 999) || (left?.order ?? 999) - (right?.order ?? 999);
|
|
11990
|
+
}).forEach((edge) => {
|
|
11991
|
+
if (!traversal.includes(edge.key)) traversal.push(edge.key);
|
|
11992
|
+
});
|
|
11993
|
+
};
|
|
11994
|
+
for (const node of executionNodes) addWithEdges(node);
|
|
11995
|
+
for (const node of candidateNodes) addWithEdges(node);
|
|
11996
|
+
const historyNodes = placed.filter((node) => node.lane === "history").sort((a, b) => a.col - b.col || a.order - b.order || a.id.localeCompare(b.id));
|
|
11997
|
+
for (const node of historyNodes) addWithEdges(node);
|
|
11998
|
+
return {
|
|
11999
|
+
nodes: placed,
|
|
12000
|
+
edges,
|
|
12001
|
+
width: Math.max(0, ...placed.map((node) => node.x + node.w)),
|
|
12002
|
+
height: Math.max(0, ...placed.map((node) => node.y + node.h)),
|
|
12003
|
+
traversal,
|
|
12004
|
+
navigables,
|
|
12005
|
+
focusId,
|
|
12006
|
+
depth,
|
|
12007
|
+
degraded: {
|
|
12008
|
+
supersedesHidden: options.supersedesHidden === true,
|
|
12009
|
+
depthReduced: false,
|
|
12010
|
+
hidden: false,
|
|
12011
|
+
isolatedTooMany: false
|
|
12012
|
+
}
|
|
12013
|
+
};
|
|
12014
|
+
}
|
|
12015
|
+
function graphNavigationTarget(layout, currentKey, key) {
|
|
12016
|
+
const nodes = new Map(layout.nodes.map((node) => [node.id, node]));
|
|
12017
|
+
const edges = new Map(layout.edges.map((edge) => [edge.key, edge]));
|
|
12018
|
+
const index = layout.traversal.indexOf(currentKey);
|
|
12019
|
+
if (index < 0) return null;
|
|
12020
|
+
if (key === "Home") return layout.traversal[0] ?? null;
|
|
12021
|
+
if (key === "End") return layout.traversal[layout.traversal.length - 1] ?? null;
|
|
12022
|
+
if (key === "BracketRight" || key === "PageDown") return layout.traversal[(index + 1) % layout.traversal.length] ?? null;
|
|
12023
|
+
if (key === "BracketLeft" || key === "PageUp") return layout.traversal[(index - 1 + layout.traversal.length) % layout.traversal.length] ?? null;
|
|
12024
|
+
const isEdge = currentKey.startsWith("e:");
|
|
12025
|
+
if (key === "ArrowLeft" || key === "ArrowRight") {
|
|
12026
|
+
if (isEdge) {
|
|
12027
|
+
const edge = edges.get(currentKey);
|
|
12028
|
+
if (edge === void 0 || edge.kind !== "requires") return null;
|
|
12029
|
+
return key === "ArrowRight" ? edge.to : edge.from;
|
|
12030
|
+
}
|
|
12031
|
+
const node = nodes.get(currentKey);
|
|
12032
|
+
if (node === void 0) return null;
|
|
12033
|
+
const candidates = (key === "ArrowRight" ? layout.edges.filter((edge) => edge.kind === "requires" && edge.from === currentKey).map((edge) => nodes.get(edge.to)) : layout.edges.filter((edge) => edge.kind === "requires" && edge.to === currentKey).map((edge) => nodes.get(edge.from))).filter((candidate) => candidate !== void 0);
|
|
12034
|
+
if (candidates.length === 0) return null;
|
|
12035
|
+
const sorted = candidates.slice().sort((a, b) => {
|
|
12036
|
+
return (a.rank ?? a.col) - (b.rank ?? b.col) || a.order - b.order || a.id.localeCompare(b.id);
|
|
12037
|
+
});
|
|
12038
|
+
const column = (candidate) => candidate.col;
|
|
12039
|
+
const currentColumn = node.col;
|
|
12040
|
+
if (key === "ArrowRight") return (sorted.filter((candidate) => column(candidate) > currentColumn || column(candidate) === currentColumn && candidate.order > node.order)[0] ?? sorted[0])?.id ?? null;
|
|
12041
|
+
return (sorted.filter((candidate) => column(candidate) < currentColumn || column(candidate) === currentColumn && candidate.order < node.order).reverse()[0] ?? sorted[sorted.length - 1])?.id ?? null;
|
|
12042
|
+
}
|
|
12043
|
+
const edge = isEdge ? edges.get(currentKey) : void 0;
|
|
12044
|
+
const node = nodes.get(isEdge ? edge?.to ?? "" : currentKey);
|
|
12045
|
+
if (node === void 0) return null;
|
|
12046
|
+
const sameLane = layout.nodes.filter((candidate) => candidate.lane === node.lane && candidate.col === node.col).sort((a, b) => a.order - b.order || a.id.localeCompare(b.id));
|
|
12047
|
+
if (sameLane.length < 2) return null;
|
|
12048
|
+
const currentIndex = sameLane.findIndex((candidate) => candidate.id === node.id);
|
|
12049
|
+
return (key === "ArrowDown" ? sameLane[(currentIndex + 1) % sameLane.length] : sameLane[(currentIndex - 1 + sameLane.length) % sameLane.length])?.id ?? null;
|
|
12050
|
+
}
|
|
12051
|
+
//#endregion
|
|
12052
|
+
//#region .build-ts/client/DependencyGraph.js
|
|
12053
|
+
function nodeName(node, t) {
|
|
12054
|
+
if (node.lane === "execution") {
|
|
12055
|
+
const status = t(`deps.status.${node.executionDisplay ?? "ready"}`);
|
|
12056
|
+
return `${node.localKey ?? ""} ${node.text} ${status}`.trim();
|
|
12057
|
+
}
|
|
12058
|
+
if (node.lane === "history") return t("deps.historyAria", { text: node.text });
|
|
12059
|
+
return t("deps.candidateAria", { text: node.text });
|
|
12060
|
+
}
|
|
12061
|
+
function edgeName(edge, model, t) {
|
|
12062
|
+
const from = model.nodes.find((node) => node.id === edge.from);
|
|
12063
|
+
const to = model.nodes.find((node) => node.id === edge.to);
|
|
12064
|
+
const left = from?.localKey ?? from?.text ?? edge.from;
|
|
12065
|
+
const right = to?.localKey ?? to?.text ?? edge.to;
|
|
12066
|
+
if (edge.kind === "proposed") return t("deps.proposedEdgeAria", {
|
|
12067
|
+
from: left,
|
|
12068
|
+
to: right
|
|
12069
|
+
});
|
|
12070
|
+
if (edge.kind === "supersedes") return t("deps.supersedesEdgeAria", {
|
|
12071
|
+
from: left,
|
|
12072
|
+
to: right
|
|
12073
|
+
});
|
|
12074
|
+
return t(edge.state === "staged-added" ? "deps.edgeAriaAdded" : edge.state === "staged-removed" ? "deps.edgeAriaRemoved" : "deps.edgeAria", {
|
|
12075
|
+
from: left,
|
|
12076
|
+
to: right
|
|
12077
|
+
});
|
|
12078
|
+
}
|
|
12079
|
+
function nodeClass(node) {
|
|
12080
|
+
return [
|
|
12081
|
+
"charter-graph__node",
|
|
12082
|
+
`is-${node.lane}`,
|
|
12083
|
+
node.ghost === true ? "is-ghost" : "",
|
|
12084
|
+
node.lane === "execution" ? `is-${node.executionDisplay ?? "unknown"}` : "",
|
|
12085
|
+
`is-${node.state}`
|
|
12086
|
+
].filter(Boolean).join(" ");
|
|
12087
|
+
}
|
|
12088
|
+
function edgeClass(edge) {
|
|
12089
|
+
return `charter-graph__edge is-${edge.kind} is-${edge.state}`;
|
|
12090
|
+
}
|
|
12091
|
+
function DependencyGraph({ layout, model, focusId, activeKey, depth, showSupersedes, editable, onFocus, onActiveKey, onDepth, onShowSupersedes, onStageRequires, onLocateList, onProposal, t }) {
|
|
12092
|
+
const groupRef = (0, react.useRef)(null);
|
|
12093
|
+
const key = activeKey ?? focusId ?? layout.traversal[0];
|
|
12094
|
+
const [inspector, setInspector] = (0, react.useState)(void 0);
|
|
12095
|
+
const [zoom, setZoom] = (0, react.useState)(1);
|
|
12096
|
+
const [dragError, setDragError] = (0, react.useState)(null);
|
|
12097
|
+
const selectedNode = inspector === void 0 ? void 0 : layout.nodes.find((node) => node.id === inspector);
|
|
12098
|
+
const selectedEdge = inspector === void 0 ? void 0 : layout.edges.find((edge) => edge.key === inspector);
|
|
12099
|
+
const activeNode = key === void 0 ? void 0 : layout.nodes.find((node) => node.id === key);
|
|
12100
|
+
const activeEdge = key === void 0 ? void 0 : layout.edges.find((edge) => edge.key === key);
|
|
12101
|
+
const inspectorLabel = selectedNode === void 0 ? selectedEdge === void 0 ? "" : edgeName(selectedEdge, model, t) : selectedNode.localKey ?? selectedNode.text;
|
|
12102
|
+
const liveLabel = activeNode === void 0 ? activeEdge === void 0 ? "" : edgeName(activeEdge, model, t) : nodeName(activeNode, t);
|
|
12103
|
+
(0, react.useEffect)(() => {
|
|
12104
|
+
if (key === void 0) return;
|
|
12105
|
+
if (!layout.traversal.includes(key)) {
|
|
12106
|
+
const next = layout.traversal[0];
|
|
12107
|
+
if (next !== void 0) onActiveKey(next);
|
|
12108
|
+
}
|
|
12109
|
+
}, [
|
|
12110
|
+
key,
|
|
12111
|
+
layout.traversal,
|
|
12112
|
+
onActiveKey
|
|
12113
|
+
]);
|
|
12114
|
+
const executionNodes = (0, react.useMemo)(() => layout.nodes.filter((node) => node.lane === "execution"), [layout.nodes]);
|
|
12115
|
+
const availableNodes = (0, react.useMemo)(() => model.nodes.filter((node) => node.lane === "execution"), [model.nodes]);
|
|
12116
|
+
const focusKey = (next) => {
|
|
12117
|
+
onActiveKey(next);
|
|
12118
|
+
(groupRef.current?.querySelector(`[data-graph-key="${CSS.escape(next)}"]`))?.focus();
|
|
12119
|
+
};
|
|
12120
|
+
const handleKeyDown = (event) => {
|
|
12121
|
+
if (event.target !== event.currentTarget && (event.key === "Enter" || event.key === " ")) return;
|
|
12122
|
+
if (event.key === "Escape") {
|
|
12123
|
+
event.preventDefault();
|
|
12124
|
+
event.stopPropagation();
|
|
12125
|
+
if (inspector !== void 0) setInspector(void 0);
|
|
12126
|
+
else document.querySelector(".charter-graph__skip")?.focus();
|
|
12127
|
+
return;
|
|
12128
|
+
}
|
|
12129
|
+
if ((event.key === "Delete" || event.key === "Backspace") && key !== void 0) {
|
|
12130
|
+
const edge = layout.edges.find((candidate) => candidate.key === key);
|
|
12131
|
+
if (edge?.kind === "requires" && edge.editable && editable) {
|
|
12132
|
+
event.preventDefault();
|
|
12133
|
+
event.stopPropagation();
|
|
12134
|
+
onStageRequires(edge.to, projectedRequires(edge.to).filter((id) => id !== edge.from));
|
|
12135
|
+
}
|
|
12136
|
+
return;
|
|
12137
|
+
}
|
|
12138
|
+
const next = graphNavigationTarget(layout, key ?? "", event.key);
|
|
12139
|
+
if (next === null || next === key) return;
|
|
12140
|
+
event.preventDefault();
|
|
12141
|
+
event.stopPropagation();
|
|
12142
|
+
focusKey(next);
|
|
12143
|
+
};
|
|
12144
|
+
const handleActivate = (targetKey) => {
|
|
12145
|
+
onActiveKey(targetKey);
|
|
12146
|
+
const node = layout.nodes.find((candidate) => candidate.id === targetKey);
|
|
12147
|
+
if (node !== void 0) {
|
|
12148
|
+
onFocus(node.id);
|
|
12149
|
+
setInspector(node.id);
|
|
12150
|
+
return;
|
|
12151
|
+
}
|
|
12152
|
+
const edge = layout.edges.find((candidate) => candidate.key === targetKey);
|
|
12153
|
+
if (edge?.kind === "proposed") {
|
|
12154
|
+
onProposal(edge.targetProposalId ?? edge.to);
|
|
12155
|
+
return;
|
|
12156
|
+
}
|
|
12157
|
+
setInspector(targetKey);
|
|
12158
|
+
};
|
|
12159
|
+
const removeRequires = (node, id) => {
|
|
12160
|
+
if (!editable) return;
|
|
12161
|
+
onStageRequires(node.id, projectedRequires(node.id).filter((value) => value !== id));
|
|
12162
|
+
};
|
|
12163
|
+
const projectedRequires = (id) => {
|
|
12164
|
+
return [...new Set(model.edges.filter((edge) => edge.kind === "requires" && edge.to === id && edge.state !== "staged-removed").map((edge) => edge.from))];
|
|
12165
|
+
};
|
|
12166
|
+
const addRequires = (node, prerequisiteId) => {
|
|
12167
|
+
if (!editable || prerequisiteId === "" || prerequisiteId === node.id) return;
|
|
12168
|
+
const current = projectedRequires(node.id);
|
|
12169
|
+
if (current.includes(prerequisiteId)) return;
|
|
12170
|
+
onStageRequires(node.id, [...current, prerequisiteId]);
|
|
12171
|
+
};
|
|
12172
|
+
return (0, react_jsx_runtime.jsxs)("section", {
|
|
12173
|
+
className: "charter-graph",
|
|
12174
|
+
"aria-labelledby": "charter-dependency-graph-title",
|
|
12175
|
+
children: [
|
|
12176
|
+
(0, react_jsx_runtime.jsx)("h4", {
|
|
12177
|
+
id: "charter-dependency-graph-title",
|
|
12178
|
+
className: "charter-sr-only",
|
|
12179
|
+
children: t("deps.graphTitle")
|
|
12180
|
+
}),
|
|
12181
|
+
(0, react_jsx_runtime.jsxs)("div", {
|
|
12182
|
+
className: "charter-graph__toolbar",
|
|
12183
|
+
children: [
|
|
12184
|
+
(0, react_jsx_runtime.jsxs)("label", {
|
|
12185
|
+
className: "charter-graph__control",
|
|
12186
|
+
children: [(0, react_jsx_runtime.jsx)("span", { children: t("deps.graphFocus") }), (0, react_jsx_runtime.jsx)("select", {
|
|
12187
|
+
"aria-label": t("deps.graphFocus"),
|
|
12188
|
+
value: focusId ?? "",
|
|
12189
|
+
onChange: (event) => {
|
|
12190
|
+
onFocus(event.target.value);
|
|
12191
|
+
onActiveKey(event.target.value);
|
|
12192
|
+
},
|
|
12193
|
+
children: executionNodes.map((node) => (0, react_jsx_runtime.jsxs)("option", {
|
|
12194
|
+
value: node.id,
|
|
12195
|
+
children: [
|
|
12196
|
+
node.localKey,
|
|
12197
|
+
" · ",
|
|
12198
|
+
node.text
|
|
12199
|
+
]
|
|
12200
|
+
}, node.id))
|
|
12201
|
+
})]
|
|
12202
|
+
}),
|
|
12203
|
+
(0, react_jsx_runtime.jsxs)("div", {
|
|
12204
|
+
className: "charter-graph__control",
|
|
12205
|
+
children: [
|
|
12206
|
+
(0, react_jsx_runtime.jsx)("span", { children: t("deps.graphDepth") }),
|
|
12207
|
+
(0, react_jsx_runtime.jsx)("button", {
|
|
12208
|
+
type: "button",
|
|
12209
|
+
"aria-pressed": depth === 1,
|
|
12210
|
+
onClick: () => onDepth(1),
|
|
12211
|
+
children: t("deps.depth1")
|
|
12212
|
+
}),
|
|
12213
|
+
(0, react_jsx_runtime.jsx)("button", {
|
|
12214
|
+
type: "button",
|
|
12215
|
+
"aria-pressed": depth === 2,
|
|
12216
|
+
onClick: () => onDepth(2),
|
|
12217
|
+
children: t("deps.depth2")
|
|
12218
|
+
})
|
|
12219
|
+
]
|
|
12220
|
+
}),
|
|
12221
|
+
(0, react_jsx_runtime.jsxs)("label", {
|
|
12222
|
+
className: "charter-graph__control charter-graph__check",
|
|
12223
|
+
children: [(0, react_jsx_runtime.jsx)("input", {
|
|
12224
|
+
type: "checkbox",
|
|
12225
|
+
checked: showSupersedes,
|
|
12226
|
+
onChange: (event) => onShowSupersedes(event.target.checked)
|
|
12227
|
+
}), (0, react_jsx_runtime.jsx)("span", { children: t("deps.showSupersedes") })]
|
|
12228
|
+
}),
|
|
12229
|
+
(0, react_jsx_runtime.jsxs)("div", {
|
|
12230
|
+
className: "charter-graph__control",
|
|
12231
|
+
children: [
|
|
12232
|
+
(0, react_jsx_runtime.jsx)("button", {
|
|
12233
|
+
type: "button",
|
|
12234
|
+
"aria-label": t("deps.zoomOut"),
|
|
12235
|
+
onClick: () => setZoom((value) => Math.max(.75, Math.round((value - .25) * 100) / 100)),
|
|
12236
|
+
children: "−"
|
|
12237
|
+
}),
|
|
12238
|
+
(0, react_jsx_runtime.jsxs)("button", {
|
|
12239
|
+
type: "button",
|
|
12240
|
+
"aria-label": t("deps.resetLayout"),
|
|
12241
|
+
onClick: () => setZoom(1),
|
|
12242
|
+
children: [Math.round(zoom * 100), "%"]
|
|
12243
|
+
}),
|
|
12244
|
+
(0, react_jsx_runtime.jsx)("button", {
|
|
12245
|
+
type: "button",
|
|
12246
|
+
"aria-label": t("deps.zoomIn"),
|
|
12247
|
+
onClick: () => setZoom((value) => Math.min(2, Math.round((value + .25) * 100) / 100)),
|
|
12248
|
+
children: "+"
|
|
12249
|
+
})
|
|
12250
|
+
]
|
|
12251
|
+
})
|
|
12252
|
+
]
|
|
12253
|
+
}),
|
|
12254
|
+
dragError !== null && (0, react_jsx_runtime.jsx)("div", {
|
|
12255
|
+
className: "charter-notice charter-notice--warning",
|
|
12256
|
+
role: "alert",
|
|
12257
|
+
children: dragError
|
|
12258
|
+
}),
|
|
12259
|
+
layout.edges.length === 0 && (0, react_jsx_runtime.jsx)("p", {
|
|
12260
|
+
className: "charter-hint charter-graph__hint",
|
|
12261
|
+
children: t("deps.graphEmpty")
|
|
12262
|
+
}),
|
|
12263
|
+
layout.degraded.supersedesHidden && showSupersedes && (0, react_jsx_runtime.jsx)("div", {
|
|
12264
|
+
className: "charter-notice",
|
|
12265
|
+
role: "status",
|
|
12266
|
+
children: t("deps.graphDegradedSupersedes")
|
|
12267
|
+
}),
|
|
12268
|
+
layout.degraded.isolatedTooMany && (0, react_jsx_runtime.jsx)("div", {
|
|
12269
|
+
className: "charter-notice",
|
|
12270
|
+
role: "status",
|
|
12271
|
+
children: t("deps.graphIsolatedTooMany")
|
|
12272
|
+
}),
|
|
12273
|
+
layout.degraded.depthReduced && (0, react_jsx_runtime.jsx)("div", {
|
|
12274
|
+
className: "charter-notice",
|
|
12275
|
+
role: "status",
|
|
12276
|
+
children: t("deps.graphDegradedDepth")
|
|
12277
|
+
}),
|
|
12278
|
+
layout.degraded.hidden && !layout.degraded.isolatedTooMany && (0, react_jsx_runtime.jsx)("div", {
|
|
12279
|
+
className: "charter-notice charter-notice--warning",
|
|
12280
|
+
role: "status",
|
|
12281
|
+
children: t("deps.graphTooDense", { count: layout.navigables })
|
|
12282
|
+
}),
|
|
12283
|
+
!layout.degraded.hidden && (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
12284
|
+
(0, react_jsx_runtime.jsx)("div", {
|
|
12285
|
+
ref: groupRef,
|
|
12286
|
+
className: "charter-graph__viewport",
|
|
12287
|
+
role: "group",
|
|
12288
|
+
tabIndex: 0,
|
|
12289
|
+
"aria-label": t("deps.graphAria"),
|
|
12290
|
+
"aria-describedby": "charter-graph-keys",
|
|
12291
|
+
onKeyDown: handleKeyDown,
|
|
12292
|
+
onFocus: (event) => {
|
|
12293
|
+
if (event.target === event.currentTarget && key !== void 0) groupRef.current?.querySelector(`[data-graph-key="${CSS.escape(key)}"]`)?.focus();
|
|
12294
|
+
},
|
|
12295
|
+
children: (0, react_jsx_runtime.jsxs)("div", {
|
|
12296
|
+
className: "charter-graph__canvas",
|
|
12297
|
+
style: {
|
|
12298
|
+
width: `${Math.max(layout.width, 1)}em`,
|
|
12299
|
+
height: `${Math.max(layout.height, 1)}em`,
|
|
12300
|
+
transform: `scale(${zoom})`,
|
|
12301
|
+
transformOrigin: "top left"
|
|
12302
|
+
},
|
|
12303
|
+
children: [
|
|
12304
|
+
(0, react_jsx_runtime.jsx)("svg", {
|
|
12305
|
+
className: "charter-graph__svg",
|
|
12306
|
+
viewBox: `0 0 ${Math.max(layout.width, 1)} ${Math.max(layout.height, 1)}`,
|
|
12307
|
+
preserveAspectRatio: "none",
|
|
12308
|
+
"aria-hidden": "true",
|
|
12309
|
+
focusable: "false",
|
|
12310
|
+
children: layout.edges.map((edge) => (0, react_jsx_runtime.jsxs)("g", {
|
|
12311
|
+
className: edgeClass(edge),
|
|
12312
|
+
children: [(0, react_jsx_runtime.jsx)("path", {
|
|
12313
|
+
d: edge.path,
|
|
12314
|
+
className: "charter-graph__edge-line"
|
|
12315
|
+
}), edge.state === "staged-removed" && (0, react_jsx_runtime.jsx)("path", {
|
|
12316
|
+
d: edge.path,
|
|
12317
|
+
className: "charter-graph__edge-removed"
|
|
12318
|
+
})]
|
|
12319
|
+
}, edge.key))
|
|
12320
|
+
}),
|
|
12321
|
+
layout.nodes.map((node) => (0, react_jsx_runtime.jsxs)("button", {
|
|
12322
|
+
type: "button",
|
|
12323
|
+
className: nodeClass(node),
|
|
12324
|
+
"data-graph-key": node.id,
|
|
12325
|
+
tabIndex: -1,
|
|
12326
|
+
"aria-label": nodeName(node, t),
|
|
12327
|
+
"aria-current": node.id === focusId ? "true" : void 0,
|
|
12328
|
+
style: {
|
|
12329
|
+
left: `${node.x}em`,
|
|
12330
|
+
top: `${node.y}em`,
|
|
12331
|
+
width: `${node.w}em`,
|
|
12332
|
+
height: `max(${node.h}em, ${GRAPH.touchTargetPx}px)`
|
|
12333
|
+
},
|
|
12334
|
+
draggable: editable && node.lane === "execution",
|
|
12335
|
+
onDragStart: (event) => {
|
|
12336
|
+
if (!editable || node.lane !== "execution") return;
|
|
12337
|
+
setDragError(null);
|
|
12338
|
+
event.dataTransfer.setData("text/plain", node.id);
|
|
12339
|
+
event.dataTransfer.effectAllowed = "link";
|
|
12340
|
+
},
|
|
12341
|
+
onDragOver: (event) => {
|
|
12342
|
+
if (!editable || node.lane !== "execution") return;
|
|
12343
|
+
event.preventDefault();
|
|
12344
|
+
event.dataTransfer.dropEffect = "link";
|
|
12345
|
+
},
|
|
12346
|
+
onDrop: (event) => {
|
|
12347
|
+
if (!editable || node.lane !== "execution") return;
|
|
12348
|
+
event.preventDefault();
|
|
12349
|
+
const source = event.dataTransfer.getData("text/plain");
|
|
12350
|
+
if (source === "") return;
|
|
12351
|
+
if (source === node.id) {
|
|
12352
|
+
setDragError(t("deps.dropInvalidSelf"));
|
|
12353
|
+
return;
|
|
12354
|
+
}
|
|
12355
|
+
if (projectedRequires(node.id).includes(source)) {
|
|
12356
|
+
setDragError(t("deps.dropInvalidDuplicate"));
|
|
12357
|
+
return;
|
|
12358
|
+
}
|
|
12359
|
+
addRequires(node, source);
|
|
12360
|
+
},
|
|
12361
|
+
onFocus: () => onActiveKey(node.id),
|
|
12362
|
+
onClick: () => handleActivate(node.id),
|
|
12363
|
+
children: [
|
|
12364
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
12365
|
+
className: "charter-graph__nodekey",
|
|
12366
|
+
children: node.lane === "execution" ? node.localKey : node.lane === "history" ? t("deps.historyKicker") : t("deps.candidateKicker")
|
|
12367
|
+
}),
|
|
12368
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
12369
|
+
className: "charter-graph__nodetext",
|
|
12370
|
+
children: node.text
|
|
12371
|
+
}),
|
|
12372
|
+
(0, react_jsx_runtime.jsxs)("span", {
|
|
12373
|
+
className: "charter-graph__nodestatus",
|
|
12374
|
+
children: [
|
|
12375
|
+
node.lane === "execution" ? `${t(`deps.status.${node.executionDisplay ?? "ready"}`)}${node.prerequisiteStatus === "dependency-conflict" && node.executionDisplay !== "dependency-conflict" ? ` · ${t("deps.prerequisiteConflict")}` : ""}` : node.lane === "history" ? t("deps.historyStatus") : t("deps.candidateStatus"),
|
|
12376
|
+
node.state === "staged-added" ? ` · ${t("deps.stagedAdded")}` : node.state === "staged-removed" ? ` · ${t("deps.stagedRemoved")}` : "",
|
|
12377
|
+
node.candidateCycle === true ? ` · ${t("deps.candidateCycle")}` : ""
|
|
12378
|
+
]
|
|
12379
|
+
})
|
|
12380
|
+
]
|
|
12381
|
+
}, node.id)),
|
|
12382
|
+
layout.edges.map((edge) => (0, react_jsx_runtime.jsx)("button", {
|
|
12383
|
+
type: "button",
|
|
12384
|
+
className: "charter-graph__edgehit",
|
|
12385
|
+
"data-graph-key": edge.key,
|
|
12386
|
+
tabIndex: -1,
|
|
12387
|
+
"aria-label": edgeName(edge, model, t),
|
|
12388
|
+
title: edgeName(edge, model, t),
|
|
12389
|
+
style: {
|
|
12390
|
+
left: `${edge.labelAt.x}em`,
|
|
12391
|
+
top: `${edge.labelAt.y}em`
|
|
12392
|
+
},
|
|
12393
|
+
onClick: () => handleActivate(edge.key)
|
|
12394
|
+
}, `hit-${edge.key}`))
|
|
12395
|
+
]
|
|
12396
|
+
})
|
|
12397
|
+
}),
|
|
12398
|
+
(0, react_jsx_runtime.jsxs)("div", {
|
|
12399
|
+
className: "charter-graph__footer",
|
|
12400
|
+
children: [(selectedNode?.lane === "execution" || selectedEdge !== void 0 && model.nodes.find((node) => node.id === selectedEdge.to)?.lane === "execution") && (0, react_jsx_runtime.jsx)("button", {
|
|
12401
|
+
type: "button",
|
|
12402
|
+
className: "charter-linkbutton",
|
|
12403
|
+
onClick: () => onLocateList(selectedNode?.id ?? selectedEdge?.to ?? ""),
|
|
12404
|
+
children: t("deps.locateInList")
|
|
12405
|
+
}), (0, react_jsx_runtime.jsx)("span", {
|
|
12406
|
+
role: "status",
|
|
12407
|
+
className: "charter-sr-only",
|
|
12408
|
+
children: liveLabel
|
|
12409
|
+
})]
|
|
12410
|
+
}),
|
|
12411
|
+
(0, react_jsx_runtime.jsxs)("details", {
|
|
12412
|
+
className: "charter-graph__help",
|
|
12413
|
+
children: [
|
|
12414
|
+
(0, react_jsx_runtime.jsx)("summary", { children: t("deps.help") }),
|
|
12415
|
+
(0, react_jsx_runtime.jsx)("p", { children: t("deps.graphKeys") }),
|
|
12416
|
+
(0, react_jsx_runtime.jsx)("p", { children: t("deps.graphHint") })
|
|
12417
|
+
]
|
|
12418
|
+
}),
|
|
12419
|
+
(selectedNode !== void 0 || selectedEdge !== void 0) && (0, react_jsx_runtime.jsxs)("aside", {
|
|
12420
|
+
className: "charter-graph__inspector",
|
|
12421
|
+
"aria-label": t("deps.inspectorTitle", { key: inspectorLabel }),
|
|
12422
|
+
children: [
|
|
12423
|
+
(0, react_jsx_runtime.jsxs)("div", {
|
|
12424
|
+
className: "charter-graph__inspectorhead",
|
|
12425
|
+
children: [(0, react_jsx_runtime.jsx)("h4", { children: t("deps.inspectorTitle", { key: inspectorLabel }) }), (0, react_jsx_runtime.jsx)("button", {
|
|
12426
|
+
type: "button",
|
|
12427
|
+
className: "charter-linkbutton",
|
|
12428
|
+
onClick: () => setInspector(void 0),
|
|
12429
|
+
children: t("deps.closeInspector")
|
|
12430
|
+
})]
|
|
12431
|
+
}),
|
|
12432
|
+
selectedNode !== void 0 && (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
12433
|
+
(0, react_jsx_runtime.jsx)("p", {
|
|
12434
|
+
className: "charter-graph__inspectortext",
|
|
12435
|
+
children: selectedNode.text
|
|
12436
|
+
}),
|
|
12437
|
+
(0, react_jsx_runtime.jsxs)("dl", {
|
|
12438
|
+
className: "charter-graph__inspectormeta",
|
|
12439
|
+
children: [(0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("deps.inspectorStatus") }), (0, react_jsx_runtime.jsx)("dd", { children: selectedNode.executionDisplay === void 0 ? selectedNode.lane === "history" ? t("deps.historyStatus") : t("deps.candidateStatus") : t(`deps.status.${selectedNode.executionDisplay}`) })] }), selectedNode.lane === "execution" && (0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("deps.inspectorRequires") }), (0, react_jsx_runtime.jsx)("dd", { children: projectedRequires(selectedNode.id).map((id) => model.nodes.find((node) => node.id === id)?.localKey ?? id).join(", ") || "—" })] })]
|
|
12440
|
+
}),
|
|
12441
|
+
selectedNode.lane === "execution" && editable && (0, react_jsx_runtime.jsxs)("div", {
|
|
12442
|
+
className: "charter-graph__inspectoractions",
|
|
12443
|
+
children: [(0, react_jsx_runtime.jsxs)("select", {
|
|
12444
|
+
"aria-label": t("deps.addRequires"),
|
|
12445
|
+
defaultValue: "",
|
|
12446
|
+
onChange: (event) => {
|
|
12447
|
+
addRequires(selectedNode, event.target.value);
|
|
12448
|
+
event.currentTarget.value = "";
|
|
12449
|
+
},
|
|
12450
|
+
children: [(0, react_jsx_runtime.jsx)("option", {
|
|
12451
|
+
value: "",
|
|
12452
|
+
children: t("deps.addRequires")
|
|
12453
|
+
}), availableNodes.filter((node) => node.id !== selectedNode.id && !projectedRequires(selectedNode.id).includes(node.id)).map((node) => (0, react_jsx_runtime.jsxs)("option", {
|
|
12454
|
+
value: node.id,
|
|
12455
|
+
children: [
|
|
12456
|
+
node.localKey,
|
|
12457
|
+
" · ",
|
|
12458
|
+
node.text
|
|
12459
|
+
]
|
|
12460
|
+
}, node.id))]
|
|
12461
|
+
}), projectedRequires(selectedNode.id).map((id) => (0, react_jsx_runtime.jsx)("button", {
|
|
12462
|
+
type: "button",
|
|
12463
|
+
className: "charter-linkbutton",
|
|
12464
|
+
onClick: () => removeRequires(selectedNode, id),
|
|
12465
|
+
children: t("deps.removeRequires", { key: model.nodes.find((node) => node.id === id)?.localKey ?? id })
|
|
12466
|
+
}, id))]
|
|
12467
|
+
})
|
|
12468
|
+
] }),
|
|
12469
|
+
selectedEdge !== void 0 && (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
12470
|
+
(0, react_jsx_runtime.jsx)("p", {
|
|
12471
|
+
className: "charter-graph__inspectortext",
|
|
12472
|
+
children: edgeName(selectedEdge, model, t)
|
|
12473
|
+
}),
|
|
12474
|
+
selectedEdge.kind === "requires" && selectedEdge.editable && editable && (0, react_jsx_runtime.jsx)("button", {
|
|
12475
|
+
type: "button",
|
|
12476
|
+
className: "charter-linkbutton",
|
|
12477
|
+
onClick: () => onStageRequires(selectedEdge.to, projectedRequires(selectedEdge.to).filter((id) => id !== selectedEdge.from)),
|
|
12478
|
+
children: t("deps.removeEdge")
|
|
12479
|
+
}),
|
|
12480
|
+
selectedEdge.kind === "proposed" && (0, react_jsx_runtime.jsx)("button", {
|
|
12481
|
+
type: "button",
|
|
12482
|
+
className: "charter-linkbutton",
|
|
12483
|
+
onClick: () => onProposal(selectedEdge.targetProposalId ?? selectedEdge.to),
|
|
12484
|
+
children: t("deps.openProposal")
|
|
12485
|
+
})
|
|
12486
|
+
] })
|
|
12487
|
+
]
|
|
12488
|
+
})
|
|
12489
|
+
] })
|
|
12490
|
+
]
|
|
12491
|
+
});
|
|
12492
|
+
}
|
|
12493
|
+
//#endregion
|
|
12494
|
+
//#region .build-ts/client/archive-preview.js
|
|
12495
|
+
function canonicalJson(value) {
|
|
12496
|
+
return JSON.stringify(value);
|
|
12497
|
+
}
|
|
12498
|
+
async function sha256Text(value) {
|
|
12499
|
+
const bytes = new TextEncoder().encode(value);
|
|
12500
|
+
const subtle = globalThis.crypto?.subtle;
|
|
12501
|
+
if (subtle === void 0) return null;
|
|
12502
|
+
try {
|
|
12503
|
+
const digest = await subtle.digest("SHA-256", bytes);
|
|
12504
|
+
return `sha256:${[...new Uint8Array(digest)].map((byte) => byte.toString(16).padStart(2, "0")).join("")}`;
|
|
12505
|
+
} catch {
|
|
12506
|
+
return null;
|
|
12507
|
+
}
|
|
12508
|
+
}
|
|
12509
|
+
/**
|
|
12510
|
+
* Client-side early preview ONLY: the Host repeats every check. It verifies the
|
|
12511
|
+
* envelope/digests with WebCrypto (no Node-only crypto in the browser bundle),
|
|
12512
|
+
* the Session/lifecycle identity, and the file size before restore is offered.
|
|
12513
|
+
*/
|
|
12514
|
+
async function previewArchive(raw, expected) {
|
|
12515
|
+
let serialized;
|
|
12516
|
+
try {
|
|
12517
|
+
serialized = canonicalJson(raw);
|
|
12518
|
+
} catch {
|
|
12519
|
+
return {
|
|
12520
|
+
ok: false,
|
|
12521
|
+
reason: "invalidJson"
|
|
12522
|
+
};
|
|
12523
|
+
}
|
|
12524
|
+
if (new TextEncoder().encode(serialized).byteLength > expected.maxRecoveryBytes) return {
|
|
12525
|
+
ok: false,
|
|
12526
|
+
reason: "fileTooLarge"
|
|
12527
|
+
};
|
|
12528
|
+
const parsed = charterRecordArchiveSchema.safeParse(raw);
|
|
12529
|
+
if (!parsed.success) return {
|
|
12530
|
+
ok: false,
|
|
12531
|
+
reason: "invalidArchive"
|
|
12532
|
+
};
|
|
12533
|
+
const archive = parsed.data;
|
|
12534
|
+
if (archive.source.sessionId !== expected.sessionId) return {
|
|
12535
|
+
ok: false,
|
|
12536
|
+
reason: "sessionMismatch"
|
|
12537
|
+
};
|
|
12538
|
+
if (expected.lifecycle !== null && archive.source.lifecycle !== expected.lifecycle) return {
|
|
12539
|
+
ok: false,
|
|
12540
|
+
reason: "lifecycleMismatch"
|
|
12541
|
+
};
|
|
12542
|
+
const { payloadDigest, ...body } = archive;
|
|
12543
|
+
const actualPayload = await sha256Text(canonicalJson(body));
|
|
12544
|
+
if (actualPayload === null) return {
|
|
12545
|
+
ok: false,
|
|
12546
|
+
reason: "cryptoUnavailable"
|
|
12547
|
+
};
|
|
12548
|
+
const actualRecord = await sha256Text(canonicalJson(archive.record));
|
|
12549
|
+
if (actualRecord === null) return {
|
|
12550
|
+
ok: false,
|
|
12551
|
+
reason: "cryptoUnavailable"
|
|
12552
|
+
};
|
|
12553
|
+
const payloadDigestOk = payloadDigest === actualPayload;
|
|
12554
|
+
const recordDigestOk = archive.source.recordDigest === actualRecord;
|
|
12555
|
+
if (!payloadDigestOk || !recordDigestOk) return {
|
|
12556
|
+
ok: false,
|
|
12557
|
+
reason: "digestMismatch"
|
|
12558
|
+
};
|
|
12559
|
+
return {
|
|
12560
|
+
ok: true,
|
|
12561
|
+
archive,
|
|
12562
|
+
exportedAt: archive.exportedAt,
|
|
12563
|
+
sourceSession: archive.source.sessionId,
|
|
12564
|
+
health: archive.source.health,
|
|
12565
|
+
revision: archive.source.revision,
|
|
12566
|
+
lifecycle: archive.source.lifecycle,
|
|
12567
|
+
digest: archive.source.recordDigest,
|
|
12568
|
+
payloadDigestOk,
|
|
12569
|
+
recordDigestOk
|
|
12570
|
+
};
|
|
12571
|
+
}
|
|
12572
|
+
//#endregion
|
|
12573
|
+
//#region .build-ts/version.js
|
|
12574
|
+
/**
|
|
12575
|
+
* Package version shown by the Pane. Kept in source so the single-file client
|
|
12576
|
+
* bundle carries the value; `tests/version.spec.ts` fails if it drifts from
|
|
12577
|
+
* `package.json`.
|
|
12578
|
+
*/
|
|
12579
|
+
const CHARTER_VERSION = "0.2.2";
|
|
12580
|
+
//#endregion
|
|
12581
|
+
//#region .build-ts/client/CharterPane.js
|
|
12582
|
+
const EMPTY_PLAN = {
|
|
12583
|
+
ops: [],
|
|
12584
|
+
active: 0,
|
|
12585
|
+
pending: 0,
|
|
12586
|
+
pendingInvariants: 0,
|
|
12587
|
+
pendingDeliverables: 0,
|
|
12588
|
+
outcomes: {},
|
|
12589
|
+
usedExactFallback: false,
|
|
12590
|
+
exactRenders: 0
|
|
12591
|
+
};
|
|
12592
|
+
function formatBytes(t, bytes) {
|
|
12593
|
+
return bytes < 1024 ? t("unit.bytes", { value: bytes }) : t("unit.kib", { value: (bytes / 1024).toFixed(bytes < 10240 ? 1 : 0) });
|
|
12594
|
+
}
|
|
12595
|
+
/** Pretty-print the JSON body of the rendered prompt for reading; exact bytes remain available. */
|
|
12596
|
+
function formatCharterPreview(preview) {
|
|
12597
|
+
const start = preview.indexOf("{");
|
|
12598
|
+
if (start < 0) return null;
|
|
12599
|
+
try {
|
|
12600
|
+
return preview.slice(0, start) + JSON.stringify(JSON.parse(preview.slice(start)), null, 2);
|
|
12601
|
+
} catch {
|
|
12602
|
+
return null;
|
|
12603
|
+
}
|
|
12604
|
+
}
|
|
12605
|
+
function progressLabel(progress, t) {
|
|
12606
|
+
return t(`progress.${progress ?? "not-started"}`);
|
|
12607
|
+
}
|
|
12608
|
+
function errorLabel(code, t) {
|
|
12609
|
+
const key = `error.${code}`;
|
|
12610
|
+
const text = t(key);
|
|
12611
|
+
return text === key ? t("error.unexpected") : text;
|
|
12612
|
+
}
|
|
12613
|
+
function textIssueMessage(issue, t) {
|
|
12614
|
+
if (issue === "control") return t("editor.issue.control");
|
|
12615
|
+
if (issue === "surrogate") return t("editor.issue.surrogate");
|
|
12616
|
+
return t("editor.issue.empty");
|
|
12617
|
+
}
|
|
12618
|
+
function countLabel(t, count, one, other) {
|
|
12619
|
+
return t(count === 1 ? one : other, { count });
|
|
12620
|
+
}
|
|
12621
|
+
/** Resolve a stable feedback descriptor against the current locale. */
|
|
12622
|
+
function feedbackText(feedback, t) {
|
|
12623
|
+
if (feedback === null) return null;
|
|
12624
|
+
switch (feedback.kind) {
|
|
12625
|
+
case "saved": return t("footer.saved", { revision: feedback.revision });
|
|
12626
|
+
case "replayed": return t("footer.replayed");
|
|
12627
|
+
case "bootstrapSaved": return t("footer.bootstrapSaved", {
|
|
12628
|
+
revision: feedback.revision,
|
|
12629
|
+
active: feedback.active,
|
|
12630
|
+
pending: feedback.pending
|
|
12631
|
+
});
|
|
12632
|
+
case "error": return errorLabel(feedback.code, t);
|
|
12633
|
+
case "connection": return t("error.connection");
|
|
12634
|
+
case "scope": return t("error.draftScope");
|
|
12635
|
+
case "editorBudget": return t("budget.editorOver", { limit: formatBytes(t, feedback.limit) });
|
|
12636
|
+
case "itemBudget": return t("budget.itemOver", { limit: formatBytes(t, feedback.limit) });
|
|
12637
|
+
case "editorUnchanged": return feedback.target === "objective" ? t("editor.unchangedObjective") : t("editor.unchangedItem");
|
|
12638
|
+
case "editorInvalid": return textIssueMessage(feedback.issue, t);
|
|
12639
|
+
case "discarded": return t("footer.discarded");
|
|
12640
|
+
}
|
|
12641
|
+
}
|
|
12642
|
+
function feedbackDetail(feedback) {
|
|
12643
|
+
return feedback?.kind === "error" ? feedback.detail : void 0;
|
|
12644
|
+
}
|
|
11147
12645
|
function ErrorDetails({ detail, t }) {
|
|
11148
12646
|
if (detail === void 0 || detail.trim().length === 0) return null;
|
|
11149
12647
|
return (0, react_jsx_runtime.jsxs)("details", {
|
|
@@ -11181,6 +12679,10 @@ function itemState(item) {
|
|
|
11181
12679
|
if (item.kind === "deliverable" && item.progress === "in-progress") return "ongoing";
|
|
11182
12680
|
return "idle";
|
|
11183
12681
|
}
|
|
12682
|
+
const EMPTY_CONFLICT_DIFF = {
|
|
12683
|
+
added: [],
|
|
12684
|
+
worsened: []
|
|
12685
|
+
};
|
|
11184
12686
|
function shortText(text, length = 48) {
|
|
11185
12687
|
const normalized = text.replace(/\s+/gu, " ").trim();
|
|
11186
12688
|
return normalized.length <= length ? normalized : `${normalized.slice(0, length)}...`;
|
|
@@ -11643,17 +13145,31 @@ function CharterPane({ source, draft, release, t }) {
|
|
|
11643
13145
|
const [validatorRunning, setValidatorRunning] = (0, react.useState)(false);
|
|
11644
13146
|
const [reviewLimit, setReviewLimit] = (0, react.useState)(50);
|
|
11645
13147
|
const [integrityFeedback, setIntegrityFeedback] = (0, react.useState)(null);
|
|
11646
|
-
const [batchIntegrity, setBatchIntegrity] = (0, react.useState)({});
|
|
11647
13148
|
const [messageCandidates, setMessageCandidates] = (0, react.useState)([]);
|
|
11648
13149
|
const [messageSeq, setMessageSeq] = (0, react.useState)(void 0);
|
|
11649
13150
|
const [messageKind, setMessageKind] = (0, react.useState)("invariant");
|
|
11650
|
-
const [
|
|
11651
|
-
const [
|
|
13151
|
+
const [messageDraft, setMessageDraft] = (0, react.useState)("");
|
|
13152
|
+
const [messageMenuOpen, setMessageMenuOpen] = (0, react.useState)(false);
|
|
11652
13153
|
const bootstrapId = (0, react.useId)();
|
|
11653
13154
|
const applyHintId = (0, react.useId)();
|
|
11654
13155
|
const [confirmAbandon, setConfirmAbandon] = (0, react.useState)(false);
|
|
11655
13156
|
const [confirmDiscardAll, setConfirmDiscardAll] = (0, react.useState)(false);
|
|
13157
|
+
const [confirmConflictApply, setConfirmConflictApply] = (0, react.useState)(false);
|
|
13158
|
+
const [dependencyGraphHidden, setDependencyGraphHidden] = (0, react.useState)(false);
|
|
13159
|
+
const [dependencyGraphDepth, setDependencyGraphDepth] = (0, react.useState)(1);
|
|
13160
|
+
const [dependencyGraphSupersedes, setDependencyGraphSupersedes] = (0, react.useState)(true);
|
|
13161
|
+
const [dependencyGraphFocusId, setDependencyGraphFocusId] = (0, react.useState)(void 0);
|
|
13162
|
+
const [dependencyGraphActiveKey, setDependencyGraphActiveKey] = (0, react.useState)(void 0);
|
|
13163
|
+
const [dependencyGraphProblem, setDependencyGraphProblem] = (0, react.useState)(null);
|
|
13164
|
+
const [dependencyVisibleCount, setDependencyVisibleCount] = (0, react.useState)(50);
|
|
13165
|
+
const [dependencyEditorId, setDependencyEditorId] = (0, react.useState)(null);
|
|
13166
|
+
const [pendingListFocusId, setPendingListFocusId] = (0, react.useState)(null);
|
|
13167
|
+
const [pendingProposalFocusId, setPendingProposalFocusId] = (0, react.useState)(null);
|
|
11656
13168
|
const [archivePreview, setArchivePreview] = (0, react.useState)(null);
|
|
13169
|
+
const [archiveEntries, setArchiveEntries] = (0, react.useState)([]);
|
|
13170
|
+
const [archiveCacheProblem, setArchiveCacheProblem] = (0, react.useState)(null);
|
|
13171
|
+
const [activeArchiveKey, setActiveArchiveKey] = (0, react.useState)(null);
|
|
13172
|
+
const [archiveSource, setArchiveSource] = (0, react.useState)(null);
|
|
11657
13173
|
const [previewMode, setPreviewMode] = (0, react.useState)("formatted");
|
|
11658
13174
|
const [confirmRecovery, setConfirmRecovery] = (0, react.useState)(null);
|
|
11659
13175
|
const [confirmRestoreKey, setConfirmRestoreKey] = (0, react.useState)(null);
|
|
@@ -11665,6 +13181,7 @@ function CharterPane({ source, draft, release, t }) {
|
|
|
11665
13181
|
const exportInFlightRef = (0, react.useRef)(false);
|
|
11666
13182
|
const viewRef = (0, react.useRef)(view);
|
|
11667
13183
|
const archiveInputRef = (0, react.useRef)(null);
|
|
13184
|
+
const messageMenuRef = (0, react.useRef)(null);
|
|
11668
13185
|
const triggerRef = (0, react.useRef)(null);
|
|
11669
13186
|
const statusRef = (0, react.useRef)(null);
|
|
11670
13187
|
(0, react.useEffect)(() => () => {
|
|
@@ -11683,6 +13200,19 @@ function CharterPane({ source, draft, release, t }) {
|
|
|
11683
13200
|
setConfirmRecovery(null);
|
|
11684
13201
|
setExportProblem(null);
|
|
11685
13202
|
setExporting(false);
|
|
13203
|
+
setActiveArchiveKey(null);
|
|
13204
|
+
setArchiveSource(null);
|
|
13205
|
+
setMessageCandidates([]);
|
|
13206
|
+
setMessageSeq(void 0);
|
|
13207
|
+
setMessageDraft("");
|
|
13208
|
+
setMessageKind("invariant");
|
|
13209
|
+
setMessageMenuOpen(false);
|
|
13210
|
+
setValidatorItemId("");
|
|
13211
|
+
setValidatorKind("workspace.path-exists");
|
|
13212
|
+
setValidatorPath("");
|
|
13213
|
+
setValidatorExpectation("");
|
|
13214
|
+
setValidatorFeedback(null);
|
|
13215
|
+
setIntegrityFeedback(null);
|
|
11686
13216
|
if (archiveInputRef.current !== null) archiveInputRef.current.value = "";
|
|
11687
13217
|
}, [
|
|
11688
13218
|
source,
|
|
@@ -11706,8 +13236,6 @@ function CharterPane({ source, draft, release, t }) {
|
|
|
11706
13236
|
const invariants = projectedItems.filter((item) => item.kind === "invariant");
|
|
11707
13237
|
const deliverables = projectedItems.filter((item) => item.kind === "deliverable");
|
|
11708
13238
|
const counts = itemCounts(projectedItems);
|
|
11709
|
-
const committedActive = (view?.items ?? []).filter((item) => item.lifecycle === "current" && item.review === "accepted").length;
|
|
11710
|
-
const committedStored = view?.items.length ?? 0;
|
|
11711
13239
|
const activeInvariants = activeItems(invariants);
|
|
11712
13240
|
const pendingInvariants = pendingItems(invariants);
|
|
11713
13241
|
const currentInvariants = activeItems(invariants);
|
|
@@ -11738,6 +13266,7 @@ function CharterPane({ source, draft, release, t }) {
|
|
|
11738
13266
|
}
|
|
11739
13267
|
}, [projectedItems]);
|
|
11740
13268
|
const dependencyPlan = dependencyPlanResult.plan;
|
|
13269
|
+
const dependencyByItemId = (0, react.useMemo)(() => new Map(dependencyPlan.map((row) => [row.id, row])), [dependencyPlan]);
|
|
11741
13270
|
const dependencyConflict = !dependencyPlanResult.ok;
|
|
11742
13271
|
const currentDeliverables = activeItems(deliverables);
|
|
11743
13272
|
const historyDeliverables = deliverables.filter((item) => item.lifecycle !== "current" || item.review === "rejected");
|
|
@@ -11771,6 +13300,34 @@ function CharterPane({ source, draft, release, t }) {
|
|
|
11771
13300
|
const preview = previewResult.text;
|
|
11772
13301
|
const previewInvalid = !previewResult.ok;
|
|
11773
13302
|
const planInvalid = dependencyConflict || previewInvalid;
|
|
13303
|
+
const conflictDiff = (0, react.useMemo)(() => view === null ? EMPTY_CONFLICT_DIFF : dependencyConflictDiff(view.items, projectedItems), [view, projectedItems]);
|
|
13304
|
+
const conflictTotal = conflictDiff.added.length + conflictDiff.worsened.length;
|
|
13305
|
+
const relationGraph = (0, react.useMemo)(() => {
|
|
13306
|
+
if (view === null || !dependencyPlanResult.ok) return null;
|
|
13307
|
+
return buildRelationGraph({
|
|
13308
|
+
committed: view.items,
|
|
13309
|
+
projected: projectedItems,
|
|
13310
|
+
ops,
|
|
13311
|
+
showSupersedes: true
|
|
13312
|
+
});
|
|
13313
|
+
}, [
|
|
13314
|
+
view,
|
|
13315
|
+
projectedItems,
|
|
13316
|
+
ops,
|
|
13317
|
+
dependencyPlanResult.ok
|
|
13318
|
+
]);
|
|
13319
|
+
const relationFocusId = relationGraph === null ? void 0 : dependencyGraphFocusId !== void 0 && relationGraph.nodes.some((node) => node.id === dependencyGraphFocusId) ? dependencyGraphFocusId : defaultFocus(relationGraph);
|
|
13320
|
+
const relationLayout = (0, react.useMemo)(() => relationGraph === null ? null : layoutRelationGraph(relationGraph, {
|
|
13321
|
+
focusId: relationFocusId,
|
|
13322
|
+
depth: dependencyGraphDepth,
|
|
13323
|
+
supersedesHidden: !dependencyGraphSupersedes
|
|
13324
|
+
}), [
|
|
13325
|
+
relationGraph,
|
|
13326
|
+
relationFocusId,
|
|
13327
|
+
dependencyGraphDepth,
|
|
13328
|
+
dependencyGraphSupersedes
|
|
13329
|
+
]);
|
|
13330
|
+
const relationGraphAvailable = relationGraph !== null && relationGraph.nodes.length > 0;
|
|
11774
13331
|
const formattedPreview = (0, react.useMemo)(() => formatCharterPreview(preview), [preview]);
|
|
11775
13332
|
const bootstrapPromptBytes = (0, react.useMemo)(() => {
|
|
11776
13333
|
if (view === null || bootstrapPhase !== "draft") return 0;
|
|
@@ -11874,17 +13431,54 @@ function CharterPane({ source, draft, release, t }) {
|
|
|
11874
13431
|
view?.lifecycle,
|
|
11875
13432
|
draftState.attempt
|
|
11876
13433
|
]);
|
|
13434
|
+
(0, react.useEffect)(() => {
|
|
13435
|
+
setDependencyGraphHidden(false);
|
|
13436
|
+
setDependencyGraphFocusId(void 0);
|
|
13437
|
+
setDependencyGraphActiveKey(void 0);
|
|
13438
|
+
setDependencyVisibleCount(50);
|
|
13439
|
+
setDependencyEditorId(null);
|
|
13440
|
+
setPendingListFocusId(null);
|
|
13441
|
+
setPendingProposalFocusId(null);
|
|
13442
|
+
}, [view?.sessionId]);
|
|
11877
13443
|
(0, react.useEffect)(() => {
|
|
11878
13444
|
setConfirmDiscardAll(false);
|
|
13445
|
+
setConfirmConflictApply(false);
|
|
13446
|
+
setDependencyGraphProblem(null);
|
|
11879
13447
|
}, [
|
|
11880
13448
|
view?.sessionId,
|
|
11881
13449
|
view?.lifecycle,
|
|
13450
|
+
view?.revision,
|
|
13451
|
+
baseRevision,
|
|
13452
|
+
conflictTotal,
|
|
11882
13453
|
draftState.ops,
|
|
11883
13454
|
draftState.editor,
|
|
11884
13455
|
draftState.editorText,
|
|
11885
13456
|
draftState.newInvariant,
|
|
11886
13457
|
draftState.newDeliverable
|
|
11887
13458
|
]);
|
|
13459
|
+
(0, react.useEffect)(() => {
|
|
13460
|
+
if (!maintenanceEnabled || section !== "context" && section !== "recovery" || source.listArchives === void 0) return;
|
|
13461
|
+
let active = true;
|
|
13462
|
+
setArchiveCacheProblem(null);
|
|
13463
|
+
source.listArchives().then((result) => {
|
|
13464
|
+
if (!active) return;
|
|
13465
|
+
if (result.ok) setArchiveEntries(result.archives);
|
|
13466
|
+
else setArchiveCacheProblem(errorLabel(result.code, t));
|
|
13467
|
+
}).catch(() => {
|
|
13468
|
+
if (active) setArchiveCacheProblem(t("recovery.cacheUnavailable"));
|
|
13469
|
+
});
|
|
13470
|
+
return () => {
|
|
13471
|
+
active = false;
|
|
13472
|
+
};
|
|
13473
|
+
}, [
|
|
13474
|
+
maintenanceEnabled,
|
|
13475
|
+
section,
|
|
13476
|
+
source,
|
|
13477
|
+
view?.revision,
|
|
13478
|
+
draftState.maintenanceSaving,
|
|
13479
|
+
recoveryBusy,
|
|
13480
|
+
t
|
|
13481
|
+
]);
|
|
11888
13482
|
(0, react.useEffect)(() => {
|
|
11889
13483
|
if (draftState.maintenanceSaving || maintenanceReplay) return;
|
|
11890
13484
|
if (archiveInputRef.current !== null) archiveInputRef.current.value = "";
|
|
@@ -11895,20 +13489,66 @@ function CharterPane({ source, draft, release, t }) {
|
|
|
11895
13489
|
]);
|
|
11896
13490
|
(0, react.useEffect)(() => {
|
|
11897
13491
|
if (section !== "history" || source.queryMessages === void 0) return;
|
|
13492
|
+
let active = true;
|
|
11898
13493
|
source.queryMessages().then((result) => {
|
|
11899
|
-
if (result.ok)
|
|
11900
|
-
|
|
11901
|
-
|
|
11902
|
-
|
|
11903
|
-
|
|
11904
|
-
if (source.sourceIntegrity !== void 0) source.sourceIntegrity().then((result) => {
|
|
11905
|
-
if (!result.ok) return;
|
|
11906
|
-
setBatchIntegrity(Object.fromEntries(result.batches.map((batch) => [batch.batchId, batch.integrity])));
|
|
13494
|
+
if (!active || !result.ok) return;
|
|
13495
|
+
setMessageCandidates(result.messages);
|
|
13496
|
+
const last = result.messages.at(-1);
|
|
13497
|
+
setMessageSeq(last?.seq);
|
|
13498
|
+
setMessageDraft(last?.text ?? "");
|
|
11907
13499
|
}).catch(() => void 0);
|
|
13500
|
+
return () => {
|
|
13501
|
+
active = false;
|
|
13502
|
+
};
|
|
11908
13503
|
}, [
|
|
11909
13504
|
section,
|
|
11910
13505
|
source,
|
|
11911
|
-
view?.
|
|
13506
|
+
view?.sessionId
|
|
13507
|
+
]);
|
|
13508
|
+
(0, react.useEffect)(() => {
|
|
13509
|
+
if (pendingListFocusId === null) return;
|
|
13510
|
+
if (typeof document === "undefined") {
|
|
13511
|
+
setPendingListFocusId(null);
|
|
13512
|
+
return;
|
|
13513
|
+
}
|
|
13514
|
+
const row = document.querySelector(`[data-dependency-id="${CSS.escape(pendingListFocusId)}"]`);
|
|
13515
|
+
if (row !== null) {
|
|
13516
|
+
row.focus();
|
|
13517
|
+
row.scrollIntoView({ block: "nearest" });
|
|
13518
|
+
}
|
|
13519
|
+
setPendingListFocusId(null);
|
|
13520
|
+
}, [
|
|
13521
|
+
pendingListFocusId,
|
|
13522
|
+
dependencyVisibleCount,
|
|
13523
|
+
dependencyPlan.length,
|
|
13524
|
+
section
|
|
13525
|
+
]);
|
|
13526
|
+
(0, react.useEffect)(() => {
|
|
13527
|
+
if (pendingProposalFocusId === null || section !== "history") return;
|
|
13528
|
+
const index = pendingItemProposals.findIndex((item) => item.id === pendingProposalFocusId);
|
|
13529
|
+
if (index < 0) {
|
|
13530
|
+
setPendingProposalFocusId(null);
|
|
13531
|
+
return;
|
|
13532
|
+
}
|
|
13533
|
+
if (index >= reviewLimit) {
|
|
13534
|
+
setReviewLimit(index + 1);
|
|
13535
|
+
return;
|
|
13536
|
+
}
|
|
13537
|
+
if (typeof document === "undefined") {
|
|
13538
|
+
setPendingProposalFocusId(null);
|
|
13539
|
+
return;
|
|
13540
|
+
}
|
|
13541
|
+
const row = document.querySelector(`[data-proposal-id="${CSS.escape(pendingProposalFocusId)}"]`);
|
|
13542
|
+
if (row !== null) {
|
|
13543
|
+
row.focus();
|
|
13544
|
+
row.scrollIntoView({ block: "nearest" });
|
|
13545
|
+
}
|
|
13546
|
+
setPendingProposalFocusId(null);
|
|
13547
|
+
}, [
|
|
13548
|
+
pendingProposalFocusId,
|
|
13549
|
+
section,
|
|
13550
|
+
reviewLimit,
|
|
13551
|
+
pendingItemProposals
|
|
11912
13552
|
]);
|
|
11913
13553
|
if (state.status === "connecting" && view === null) return (0, react_jsx_runtime.jsxs)("main", {
|
|
11914
13554
|
className: "charter-root charter-centered",
|
|
@@ -11941,7 +13581,7 @@ function CharterPane({ source, draft, release, t }) {
|
|
|
11941
13581
|
const admission = draftAdmission(view, ops);
|
|
11942
13582
|
const applyBlocked = !admission.ok;
|
|
11943
13583
|
const applyBlockReason = editReplay ? "retry" : unknownBlocked ? oldLifecycleUnknown ? "lifecycle-abandon" : "unknown" : saving ? "busy" : editor !== null ? "editor-open" : revisionConflict ? "revision-conflict" : !online ? "connection" : !editable ? "read-only" : ops.length === 0 ? "no-changes" : applyBlocked ? admission.reason === "invalid-dependencies" ? "dependency-conflict" : "quota" : planInvalid ? "dependency-conflict" : null;
|
|
11944
|
-
const applyHint = applyBlockReason
|
|
13584
|
+
const applyHint = applyBlockReason !== null ? t(`apply.block.${applyBlockReason}`) : conflictTotal > 0 ? t(confirmConflictApply ? "changeset.conflictConfirmHint" : "changeset.conflictHint", { count: conflictTotal }) : t("footer.applyHint");
|
|
11945
13585
|
const bootstrapHint = bootstrapReplay ? t("apply.block.retry") : bootstrapSaving ? t("apply.block.busy") : canApplyBootstrap ? t("bootstrap.applyHint") : t("apply.block.bootstrap-blocked");
|
|
11946
13586
|
const footerHint = bootstrapPhase === "draft" || bootstrapReplay ? bootstrapHint : applyHint;
|
|
11947
13587
|
const canRebaseNow = rebaseAvailable(draftState);
|
|
@@ -11980,6 +13620,11 @@ function CharterPane({ source, draft, release, t }) {
|
|
|
11980
13620
|
} : null;
|
|
11981
13621
|
const area = section === "history" ? "review" : section === "context" || section === "recovery" ? "diagnostics" : "workspace";
|
|
11982
13622
|
const goSection = (next) => draft.setSection(next);
|
|
13623
|
+
const selectedMessage = messageCandidates.find((message) => message.seq === messageSeq);
|
|
13624
|
+
const messageBytes = normalizedBytes(messageDraft);
|
|
13625
|
+
const messageOverBudget = messageBytes > view.limits.maxItemBytes;
|
|
13626
|
+
const messageTextAvailable = selectedMessage?.text !== void 0;
|
|
13627
|
+
const messageCanSave = messageSeq !== void 0 && messageTextAvailable && normalizedNonEmpty(messageDraft) && !messageOverBudget;
|
|
11983
13628
|
const queue = (op) => {
|
|
11984
13629
|
if (!online || view.status !== "ready" || saving) return;
|
|
11985
13630
|
draft.stage(view, op);
|
|
@@ -11989,8 +13634,37 @@ function CharterPane({ source, draft, release, t }) {
|
|
|
11989
13634
|
draft.openEditor(target, view);
|
|
11990
13635
|
};
|
|
11991
13636
|
const applyDraft = () => {
|
|
13637
|
+
if (conflictTotal > 0 && !confirmConflictApply) {
|
|
13638
|
+
setConfirmConflictApply(true);
|
|
13639
|
+
return;
|
|
13640
|
+
}
|
|
13641
|
+
setConfirmConflictApply(false);
|
|
11992
13642
|
draft.applyDraft(view).finally(() => statusRef.current?.focus());
|
|
11993
13643
|
};
|
|
13644
|
+
const stageGraphRequires = (targetId, nextRequires) => {
|
|
13645
|
+
if (view === null || !editable) return;
|
|
13646
|
+
const candidateItems = projectedItems.map((item) => item.id === targetId ? {
|
|
13647
|
+
...item,
|
|
13648
|
+
requires: [...nextRequires]
|
|
13649
|
+
} : item);
|
|
13650
|
+
try {
|
|
13651
|
+
const projected = candidateItems;
|
|
13652
|
+
validateDependencyGraph(projected);
|
|
13653
|
+
dependencyProjection(projected);
|
|
13654
|
+
} catch {
|
|
13655
|
+
setDependencyGraphProblem(t("deps.conflict"));
|
|
13656
|
+
return;
|
|
13657
|
+
}
|
|
13658
|
+
setDependencyGraphProblem(null);
|
|
13659
|
+
draft.setDeliverableRequires(view, targetId, nextRequires);
|
|
13660
|
+
};
|
|
13661
|
+
const locateGraphNodeInList = (id) => {
|
|
13662
|
+
if (id === "") return;
|
|
13663
|
+
const index = dependencyPlan.findIndex((row) => row.id === id);
|
|
13664
|
+
if (index < 0) return;
|
|
13665
|
+
setDependencyVisibleCount((count) => Math.max(count, index + 1));
|
|
13666
|
+
setPendingListFocusId(id);
|
|
13667
|
+
};
|
|
11994
13668
|
const errorText = (code) => {
|
|
11995
13669
|
if (code === void 0) return t("recovery.exportFailed");
|
|
11996
13670
|
const key = `error.${code}`;
|
|
@@ -12021,13 +13695,76 @@ function CharterPane({ source, draft, release, t }) {
|
|
|
12021
13695
|
if (epoch !== exportEpochRef.current) return;
|
|
12022
13696
|
exportInFlightRef.current = false;
|
|
12023
13697
|
setExporting(false);
|
|
12024
|
-
if (result.ok)
|
|
12025
|
-
|
|
13698
|
+
if (result.ok) {
|
|
13699
|
+
downloadArchive(result.filename, result.archive);
|
|
13700
|
+
source.listArchives?.().then((list) => {
|
|
13701
|
+
if (list.ok) setArchiveEntries(list.archives);
|
|
13702
|
+
}).catch(() => void 0);
|
|
13703
|
+
} else setExportProblem(errorText(result.code));
|
|
13704
|
+
}).catch(() => {
|
|
13705
|
+
if (epoch !== exportEpochRef.current) return;
|
|
13706
|
+
exportInFlightRef.current = false;
|
|
13707
|
+
setExporting(false);
|
|
13708
|
+
setExportProblem(t("recovery.exportFailed"));
|
|
13709
|
+
});
|
|
13710
|
+
};
|
|
13711
|
+
const chooseCachedArchive = (entry) => {
|
|
13712
|
+
if (recoveryBusy || unknownBlocked || source.readArchive === void 0) return;
|
|
13713
|
+
const generation = ++archiveGenerationRef.current;
|
|
13714
|
+
const expectedSessionId = view?.sessionId;
|
|
13715
|
+
const expectedLifecycle = draftState.lifecycle ?? view?.lifecycle ?? null;
|
|
13716
|
+
const label = t("recovery.cacheRevision", { revision: entry.revision });
|
|
13717
|
+
const isCurrent = () => generation === archiveGenerationRef.current && viewRef.current?.sessionId === expectedSessionId && (draft.getSnapshot().lifecycle ?? null) === expectedLifecycle;
|
|
13718
|
+
setActiveArchiveKey(entry.key);
|
|
13719
|
+
setArchiveSource("cache");
|
|
13720
|
+
setArchivePreview({ fileName: label });
|
|
13721
|
+
setExportProblem(null);
|
|
13722
|
+
setConfirmRecovery(null);
|
|
13723
|
+
if (view === null) return;
|
|
13724
|
+
const maxBytes = view.limits.maxRecoveryBytes ?? 4 * 1024 * 1024;
|
|
13725
|
+
const lifecycle = draftState.lifecycle ?? view.lifecycle ?? null;
|
|
13726
|
+
source.readArchive(entry.key).then(async (result) => {
|
|
13727
|
+
if (!isCurrent()) return;
|
|
13728
|
+
if (!result.ok) {
|
|
13729
|
+
setArchivePreview({
|
|
13730
|
+
fileName: label,
|
|
13731
|
+
errorKey: "recovery.invalidArchive"
|
|
13732
|
+
});
|
|
13733
|
+
return;
|
|
13734
|
+
}
|
|
13735
|
+
const preview = await previewArchive(result.archive, {
|
|
13736
|
+
sessionId: view.sessionId,
|
|
13737
|
+
lifecycle,
|
|
13738
|
+
maxRecoveryBytes: maxBytes
|
|
13739
|
+
});
|
|
13740
|
+
if (!isCurrent()) return;
|
|
13741
|
+
if (!preview.ok) {
|
|
13742
|
+
const key = preview.reason === "fileTooLarge" ? "recovery.fileTooLargeLimit" : preview.reason === "invalidJson" ? "recovery.invalidJson" : preview.reason === "invalidArchive" ? "recovery.invalidArchive" : preview.reason === "sessionMismatch" ? "recovery.sessionMismatchPreview" : preview.reason === "lifecycleMismatch" ? "recovery.lifecycleMismatchPreview" : preview.reason === "cryptoUnavailable" ? "recovery.cryptoUnavailable" : "recovery.digestMismatchPreview";
|
|
13743
|
+
setArchivePreview({
|
|
13744
|
+
fileName: label,
|
|
13745
|
+
errorKey: key,
|
|
13746
|
+
...preview.reason === "fileTooLarge" ? { errorParams: { limit: formatBytes(t, maxBytes) } } : {}
|
|
13747
|
+
});
|
|
13748
|
+
return;
|
|
13749
|
+
}
|
|
13750
|
+
if (!isCurrent()) return;
|
|
13751
|
+
setArchivePreview({
|
|
13752
|
+
fileName: label,
|
|
13753
|
+
archive: preview.archive,
|
|
13754
|
+
health: preview.health,
|
|
13755
|
+
revision: preview.revision,
|
|
13756
|
+
lifecycle: preview.lifecycle,
|
|
13757
|
+
digest: preview.digest,
|
|
13758
|
+
exportedAt: preview.exportedAt,
|
|
13759
|
+
sourceSession: preview.sourceSession,
|
|
13760
|
+
payloadDigestOk: preview.payloadDigestOk,
|
|
13761
|
+
recordDigestOk: preview.recordDigestOk
|
|
13762
|
+
});
|
|
12026
13763
|
}).catch(() => {
|
|
12027
|
-
if (
|
|
12028
|
-
|
|
12029
|
-
|
|
12030
|
-
|
|
13764
|
+
if (isCurrent()) setArchivePreview({
|
|
13765
|
+
fileName: label,
|
|
13766
|
+
errorKey: "recovery.invalidArchive"
|
|
13767
|
+
});
|
|
12031
13768
|
});
|
|
12032
13769
|
};
|
|
12033
13770
|
const chooseArchive = (file) => {
|
|
@@ -12037,6 +13774,7 @@ function CharterPane({ source, draft, release, t }) {
|
|
|
12037
13774
|
const expectedLifecycle = draftState.lifecycle ?? view?.lifecycle ?? null;
|
|
12038
13775
|
const isCurrent = () => generation === archiveGenerationRef.current && viewRef.current?.sessionId === expectedSessionId && (draft.getSnapshot().lifecycle ?? null) === expectedLifecycle;
|
|
12039
13776
|
setArchivePreview({ fileName: file.name });
|
|
13777
|
+
setArchiveSource("file");
|
|
12040
13778
|
setExportProblem(null);
|
|
12041
13779
|
setConfirmRecovery(null);
|
|
12042
13780
|
if (view === null) return;
|
|
@@ -12211,8 +13949,6 @@ function CharterPane({ source, draft, release, t }) {
|
|
|
12211
13949
|
children: t("header.version", { version: CHARTER_VERSION })
|
|
12212
13950
|
}),
|
|
12213
13951
|
(0, react_jsx_runtime.jsx)(StatusTag, { children: t("stats.revision", { revision: view.revision }) }),
|
|
12214
|
-
(0, react_jsx_runtime.jsx)(StatusTag, { children: t("stats.active", { count: committedActive }) }),
|
|
12215
|
-
(0, react_jsx_runtime.jsx)(StatusTag, { children: t("stats.stored", { count: committedStored }) }),
|
|
12216
13952
|
ops.length > 0 && (0, react_jsx_runtime.jsx)(StatusTag, {
|
|
12217
13953
|
tone: "info",
|
|
12218
13954
|
children: t("stats.afterApply", {
|
|
@@ -12399,7 +14135,7 @@ function CharterPane({ source, draft, release, t }) {
|
|
|
12399
14135
|
disabled: editReplay ? saving : applyBlockReason !== null,
|
|
12400
14136
|
onClick: applyDraft,
|
|
12401
14137
|
busy: saving,
|
|
12402
|
-
children: saving ? t("footer.applying") : editReplay ? t("footer.retryApply") : t("footer.apply")
|
|
14138
|
+
children: saving ? t("footer.applying") : editReplay ? t("footer.retryApply") : confirmConflictApply && conflictTotal > 0 ? t("footer.applyConfirmConflicts", { count: conflictTotal }) : t("footer.apply")
|
|
12403
14139
|
}),
|
|
12404
14140
|
unknownReplay && (0, react_jsx_runtime.jsx)(ActionButton, {
|
|
12405
14141
|
variant: "outline",
|
|
@@ -12469,36 +14205,70 @@ function CharterPane({ source, draft, release, t }) {
|
|
|
12469
14205
|
area === "workspace" && hasLocalWork && (0, react_jsx_runtime.jsxs)("section", {
|
|
12470
14206
|
className: "charter-card charter-section charter-changeset",
|
|
12471
14207
|
"aria-labelledby": "charter-changeset-title",
|
|
12472
|
-
children: [
|
|
12473
|
-
|
|
12474
|
-
|
|
12475
|
-
|
|
12476
|
-
|
|
12477
|
-
|
|
12478
|
-
|
|
12479
|
-
|
|
12480
|
-
|
|
12481
|
-
|
|
14208
|
+
children: [
|
|
14209
|
+
(0, react_jsx_runtime.jsxs)("div", {
|
|
14210
|
+
className: "charter-cardhead",
|
|
14211
|
+
children: [(0, react_jsx_runtime.jsxs)("div", {
|
|
14212
|
+
className: "charter-cardtitle",
|
|
14213
|
+
children: [(0, react_jsx_runtime.jsx)("span", {
|
|
14214
|
+
className: "charter-kicker",
|
|
14215
|
+
children: t("changeset.kicker")
|
|
14216
|
+
}), (0, react_jsx_runtime.jsx)("h3", {
|
|
14217
|
+
id: "charter-changeset-title",
|
|
14218
|
+
children: t("changeset.title")
|
|
14219
|
+
})]
|
|
14220
|
+
}), (0, react_jsx_runtime.jsx)("span", {
|
|
14221
|
+
className: "charter-count",
|
|
14222
|
+
children: localWork.stagedOps
|
|
12482
14223
|
})]
|
|
12483
|
-
}),
|
|
12484
|
-
|
|
12485
|
-
|
|
12486
|
-
|
|
12487
|
-
|
|
12488
|
-
|
|
12489
|
-
|
|
12490
|
-
|
|
12491
|
-
|
|
12492
|
-
|
|
12493
|
-
|
|
12494
|
-
|
|
12495
|
-
|
|
12496
|
-
|
|
12497
|
-
|
|
12498
|
-
|
|
12499
|
-
|
|
12500
|
-
|
|
12501
|
-
|
|
14224
|
+
}),
|
|
14225
|
+
(0, react_jsx_runtime.jsxs)("div", {
|
|
14226
|
+
className: "charter-changeset__body",
|
|
14227
|
+
children: [
|
|
14228
|
+
(0, react_jsx_runtime.jsx)("span", { children: t("changeset.ops", { count: localWork.stagedOps }) }),
|
|
14229
|
+
(0, react_jsx_runtime.jsx)("span", { children: t("changeset.promptDelta", {
|
|
14230
|
+
before: formatBytes(t, utf8Bytes$2(view.promptText)),
|
|
14231
|
+
after: formatBytes(t, previewBytes)
|
|
14232
|
+
}) }),
|
|
14233
|
+
(0, react_jsx_runtime.jsx)("span", { children: t("changeset.itemsDelta", {
|
|
14234
|
+
before: view.items.length,
|
|
14235
|
+
after: projectedItems.length
|
|
14236
|
+
}) }),
|
|
14237
|
+
editor !== null && (0, react_jsx_runtime.jsx)("span", { children: t("changeset.editorOpen") })
|
|
14238
|
+
]
|
|
14239
|
+
}),
|
|
14240
|
+
conflictTotal > 0 && (0, react_jsx_runtime.jsxs)("div", {
|
|
14241
|
+
className: "charter-notice charter-notice--warning",
|
|
14242
|
+
role: "status",
|
|
14243
|
+
children: [(0, react_jsx_runtime.jsx)("strong", { children: t("changeset.conflicts", { count: conflictTotal }) }), (0, react_jsx_runtime.jsx)("ul", {
|
|
14244
|
+
className: "charter-changeset__conflicts",
|
|
14245
|
+
children: [...conflictDiff.added.map((entry) => ({
|
|
14246
|
+
...entry,
|
|
14247
|
+
kind: "added"
|
|
14248
|
+
})), ...conflictDiff.worsened.map((entry) => ({
|
|
14249
|
+
...entry,
|
|
14250
|
+
kind: "worsened"
|
|
14251
|
+
}))].map((entry) => {
|
|
14252
|
+
const key = dependencyPlan.find((row) => row.id === entry.itemId)?.localKey ?? entry.itemId;
|
|
14253
|
+
const text = projectedItems.find((item) => item.id === entry.itemId)?.text ?? entry.itemId;
|
|
14254
|
+
return (0, react_jsx_runtime.jsxs)("li", { children: [
|
|
14255
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
14256
|
+
className: "charter-dependency__key",
|
|
14257
|
+
children: key
|
|
14258
|
+
}),
|
|
14259
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
14260
|
+
className: "charter-changeset__conflicttext",
|
|
14261
|
+
children: shortText(text, 40)
|
|
14262
|
+
}),
|
|
14263
|
+
(0, react_jsx_runtime.jsx)("span", { children: t(entry.kind === "added" ? "changeset.conflictAdded" : "changeset.conflictWorsened", {
|
|
14264
|
+
before: entry.beforeConflicts,
|
|
14265
|
+
after: entry.afterConflicts
|
|
14266
|
+
}) })
|
|
14267
|
+
] }, entry.itemId);
|
|
14268
|
+
})
|
|
14269
|
+
})]
|
|
14270
|
+
})
|
|
14271
|
+
]
|
|
12502
14272
|
}),
|
|
12503
14273
|
area === "workspace" && (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
12504
14274
|
bootstrapPhase === "draft" && (0, react_jsx_runtime.jsxs)("button", {
|
|
@@ -12902,7 +14672,7 @@ function CharterPane({ source, draft, release, t }) {
|
|
|
12902
14672
|
maxBytes: view.limits.maxItemBytes,
|
|
12903
14673
|
previousBytes: editor.kind === "edit" ? normalizedBytes(editor.item.text) : void 0,
|
|
12904
14674
|
label: t("editor.invariantAria"),
|
|
12905
|
-
t
|
|
14675
|
+
t: (key, values) => t(key, values)
|
|
12906
14676
|
})
|
|
12907
14677
|
})
|
|
12908
14678
|
]
|
|
@@ -12915,64 +14685,168 @@ function CharterPane({ source, draft, release, t }) {
|
|
|
12915
14685
|
area === "workspace" && dependencyPlan.length > 0 && (0, react_jsx_runtime.jsxs)("section", {
|
|
12916
14686
|
className: "charter-card charter-section",
|
|
12917
14687
|
"aria-labelledby": "charter-dependency-title",
|
|
12918
|
-
children: [
|
|
12919
|
-
|
|
12920
|
-
|
|
12921
|
-
|
|
12922
|
-
|
|
12923
|
-
|
|
12924
|
-
|
|
12925
|
-
|
|
12926
|
-
|
|
12927
|
-
|
|
14688
|
+
children: [
|
|
14689
|
+
(0, react_jsx_runtime.jsxs)("div", {
|
|
14690
|
+
className: "charter-cardhead",
|
|
14691
|
+
children: [(0, react_jsx_runtime.jsx)("div", {
|
|
14692
|
+
className: "charter-cardtitle",
|
|
14693
|
+
children: (0, react_jsx_runtime.jsx)("h3", {
|
|
14694
|
+
id: "charter-dependency-title",
|
|
14695
|
+
children: t("deps.title")
|
|
14696
|
+
})
|
|
14697
|
+
}), (0, react_jsx_runtime.jsxs)("div", {
|
|
14698
|
+
className: "charter-cardtools",
|
|
14699
|
+
children: [(0, react_jsx_runtime.jsx)("span", {
|
|
14700
|
+
className: "charter-count",
|
|
14701
|
+
children: dependencyPlan.length
|
|
14702
|
+
}), relationGraphAvailable && (0, react_jsx_runtime.jsx)("button", {
|
|
14703
|
+
type: "button",
|
|
14704
|
+
className: "charter-linkbutton",
|
|
14705
|
+
"aria-pressed": !dependencyGraphHidden,
|
|
14706
|
+
onClick: () => setDependencyGraphHidden((value) => !value),
|
|
14707
|
+
children: dependencyGraphHidden ? t("deps.showGraph") : t("deps.hideGraph")
|
|
14708
|
+
})]
|
|
12928
14709
|
})]
|
|
12929
|
-
}),
|
|
12930
|
-
|
|
12931
|
-
|
|
12932
|
-
|
|
12933
|
-
|
|
12934
|
-
|
|
12935
|
-
|
|
12936
|
-
|
|
12937
|
-
|
|
12938
|
-
|
|
12939
|
-
|
|
12940
|
-
|
|
12941
|
-
|
|
12942
|
-
|
|
12943
|
-
|
|
12944
|
-
|
|
12945
|
-
|
|
12946
|
-
|
|
12947
|
-
|
|
12948
|
-
|
|
12949
|
-
|
|
12950
|
-
|
|
12951
|
-
|
|
12952
|
-
|
|
12953
|
-
|
|
12954
|
-
|
|
12955
|
-
|
|
12956
|
-
|
|
12957
|
-
|
|
12958
|
-
|
|
12959
|
-
|
|
12960
|
-
(
|
|
12961
|
-
|
|
12962
|
-
|
|
12963
|
-
|
|
12964
|
-
|
|
12965
|
-
|
|
12966
|
-
|
|
12967
|
-
|
|
12968
|
-
|
|
12969
|
-
|
|
12970
|
-
|
|
12971
|
-
|
|
12972
|
-
|
|
12973
|
-
|
|
14710
|
+
}),
|
|
14711
|
+
dependencyGraphProblem !== null && (0, react_jsx_runtime.jsx)("div", {
|
|
14712
|
+
className: "charter-notice charter-notice--warning",
|
|
14713
|
+
role: "alert",
|
|
14714
|
+
children: dependencyGraphProblem
|
|
14715
|
+
}),
|
|
14716
|
+
(0, react_jsx_runtime.jsxs)("div", {
|
|
14717
|
+
className: `charter-dependency-layout${dependencyGraphHidden ? " is-graph-hidden" : ""}`,
|
|
14718
|
+
children: [
|
|
14719
|
+
!dependencyGraphHidden && relationGraphAvailable && relationLayout !== null && !relationLayout.degraded.hidden && !relationLayout.degraded.isolatedTooMany && (0, react_jsx_runtime.jsx)("a", {
|
|
14720
|
+
className: "charter-graph__skip",
|
|
14721
|
+
href: "#charter-dependency-list",
|
|
14722
|
+
children: t("deps.skipToList")
|
|
14723
|
+
}),
|
|
14724
|
+
!dependencyGraphHidden && relationGraphAvailable && relationGraph !== null && relationLayout !== null && (0, react_jsx_runtime.jsx)(DependencyGraph, {
|
|
14725
|
+
layout: relationLayout,
|
|
14726
|
+
model: relationGraph,
|
|
14727
|
+
focusId: relationFocusId,
|
|
14728
|
+
activeKey: dependencyGraphActiveKey ?? relationFocusId,
|
|
14729
|
+
depth: dependencyGraphDepth,
|
|
14730
|
+
showSupersedes: dependencyGraphSupersedes,
|
|
14731
|
+
editable,
|
|
14732
|
+
onFocus: (id) => {
|
|
14733
|
+
setDependencyGraphFocusId(id);
|
|
14734
|
+
setDependencyGraphActiveKey(id);
|
|
14735
|
+
},
|
|
14736
|
+
onActiveKey: setDependencyGraphActiveKey,
|
|
14737
|
+
onDepth: setDependencyGraphDepth,
|
|
14738
|
+
onShowSupersedes: setDependencyGraphSupersedes,
|
|
14739
|
+
onStageRequires: stageGraphRequires,
|
|
14740
|
+
onLocateList: locateGraphNodeInList,
|
|
14741
|
+
onProposal: (id) => {
|
|
14742
|
+
setPendingProposalFocusId(id);
|
|
14743
|
+
goSection("history");
|
|
14744
|
+
},
|
|
14745
|
+
t: (key, values) => t(key, values)
|
|
14746
|
+
}),
|
|
14747
|
+
(0, react_jsx_runtime.jsxs)("div", {
|
|
14748
|
+
className: "charter-dependency-listwrap",
|
|
14749
|
+
children: [(0, react_jsx_runtime.jsx)("ol", {
|
|
14750
|
+
className: "charter-dependency-list",
|
|
14751
|
+
id: "charter-dependency-list",
|
|
14752
|
+
children: dependencyPlan.slice(0, dependencyVisibleCount).map((row, rowIndex) => {
|
|
14753
|
+
const item = view.items.find((candidate) => candidate.id === row.id);
|
|
14754
|
+
return (0, react_jsx_runtime.jsxs)("li", {
|
|
14755
|
+
className: `charter-dependency is-${row.executionDisplay}`,
|
|
14756
|
+
"data-dependency-id": row.id,
|
|
14757
|
+
tabIndex: -1,
|
|
14758
|
+
children: [
|
|
14759
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
14760
|
+
className: "charter-sr-only",
|
|
14761
|
+
children: t("deps.rowPosition", {
|
|
14762
|
+
index: rowIndex + 1,
|
|
14763
|
+
total: dependencyPlan.length
|
|
14764
|
+
})
|
|
14765
|
+
}),
|
|
14766
|
+
(0, react_jsx_runtime.jsxs)("div", {
|
|
14767
|
+
className: "charter-dependency__row",
|
|
14768
|
+
children: [
|
|
14769
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
14770
|
+
className: "charter-dependency__key",
|
|
14771
|
+
children: row.localKey
|
|
14772
|
+
}),
|
|
14773
|
+
(0, react_jsx_runtime.jsxs)("div", {
|
|
14774
|
+
className: "charter-dependency__main",
|
|
14775
|
+
children: [(0, react_jsx_runtime.jsx)("span", {
|
|
14776
|
+
className: "charter-dependency__text",
|
|
14777
|
+
title: item?.text ?? row.id,
|
|
14778
|
+
children: item?.text ?? row.id
|
|
14779
|
+
}), (0, react_jsx_runtime.jsxs)("span", {
|
|
14780
|
+
className: "charter-dependency__meta",
|
|
14781
|
+
children: [
|
|
14782
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
14783
|
+
className: `charter-dependency__status is-${row.executionDisplay}`,
|
|
14784
|
+
children: t(`deps.status.${row.executionDisplay}`)
|
|
14785
|
+
}),
|
|
14786
|
+
row.prerequisiteStatus === "dependency-conflict" && row.executionDisplay !== "dependency-conflict" && (0, react_jsx_runtime.jsx)("span", {
|
|
14787
|
+
className: "charter-dependency__status is-conflict",
|
|
14788
|
+
children: t("deps.prerequisiteConflict")
|
|
14789
|
+
}),
|
|
14790
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
14791
|
+
className: "charter-dependency__requires",
|
|
14792
|
+
children: row.requires.length > 0 ? t("deps.requiresSummary", { keys: row.requires.map((requireId) => dependencyByItemId.get(requireId)?.localKey ?? requireId).join(", ") }) : t("deps.noRequires")
|
|
14793
|
+
})
|
|
14794
|
+
]
|
|
14795
|
+
})]
|
|
14796
|
+
}),
|
|
14797
|
+
(0, react_jsx_runtime.jsxs)("div", {
|
|
14798
|
+
className: "charter-dependency__actions",
|
|
14799
|
+
children: [relationGraphAvailable && (0, react_jsx_runtime.jsx)("button", {
|
|
14800
|
+
type: "button",
|
|
14801
|
+
className: "charter-linkbutton",
|
|
14802
|
+
onClick: () => {
|
|
14803
|
+
setDependencyGraphHidden(false);
|
|
14804
|
+
setDependencyGraphFocusId(row.id);
|
|
14805
|
+
setDependencyGraphActiveKey(row.id);
|
|
14806
|
+
},
|
|
14807
|
+
children: t("deps.locateInGraph")
|
|
14808
|
+
}), (0, react_jsx_runtime.jsx)("button", {
|
|
14809
|
+
type: "button",
|
|
14810
|
+
className: "charter-linkbutton",
|
|
14811
|
+
"aria-expanded": dependencyEditorId === row.id,
|
|
14812
|
+
onClick: () => setDependencyEditorId((id) => id === row.id ? null : row.id),
|
|
14813
|
+
children: t("deps.editRequires")
|
|
14814
|
+
})]
|
|
14815
|
+
})
|
|
14816
|
+
]
|
|
14817
|
+
}),
|
|
14818
|
+
dependencyEditorId === row.id && (0, react_jsx_runtime.jsxs)("fieldset", {
|
|
14819
|
+
className: "charter-dependency__editor",
|
|
14820
|
+
children: [(0, react_jsx_runtime.jsx)("legend", { children: t("deps.editRequires") }), view.items.filter((candidate) => candidate.kind === "deliverable" && candidate.review === "accepted" && candidate.lifecycle === "current" && candidate.id !== row.id).map((candidate) => {
|
|
14821
|
+
const candidateKey = dependencyByItemId.get(candidate.id)?.localKey ?? "";
|
|
14822
|
+
return (0, react_jsx_runtime.jsxs)("label", { children: [(0, react_jsx_runtime.jsx)("input", {
|
|
14823
|
+
type: "checkbox",
|
|
14824
|
+
checked: row.requiresIds.includes(candidate.id),
|
|
14825
|
+
disabled: !editable || saving || unknownBlocked,
|
|
14826
|
+
onChange: (event) => {
|
|
14827
|
+
const next = event.target.checked ? [...row.requiresIds, candidate.id] : row.requiresIds.filter((id) => id !== candidate.id);
|
|
14828
|
+
draft.setDeliverableRequires(view, row.id, next);
|
|
14829
|
+
}
|
|
14830
|
+
}), (0, react_jsx_runtime.jsxs)("span", { children: [
|
|
14831
|
+
candidateKey,
|
|
14832
|
+
" · ",
|
|
14833
|
+
shortText(candidate.text, 40)
|
|
14834
|
+
] })] }, candidate.id);
|
|
14835
|
+
})]
|
|
14836
|
+
})
|
|
14837
|
+
]
|
|
14838
|
+
}, row.id);
|
|
14839
|
+
})
|
|
14840
|
+
}), dependencyPlan.length > dependencyVisibleCount && (0, react_jsx_runtime.jsx)("button", {
|
|
14841
|
+
type: "button",
|
|
14842
|
+
className: "charter-linkbutton",
|
|
14843
|
+
onClick: () => setDependencyVisibleCount((count) => count + 50),
|
|
14844
|
+
children: t("deps.showMore", { count: Math.min(50, dependencyPlan.length - dependencyVisibleCount) })
|
|
14845
|
+
})]
|
|
14846
|
+
})
|
|
14847
|
+
]
|
|
12974
14848
|
})
|
|
12975
|
-
|
|
14849
|
+
]
|
|
12976
14850
|
}),
|
|
12977
14851
|
area === "workspace" && (0, react_jsx_runtime.jsxs)("section", {
|
|
12978
14852
|
className: "charter-card charter-section",
|
|
@@ -13056,90 +14930,170 @@ function CharterPane({ source, draft, release, t }) {
|
|
|
13056
14930
|
})
|
|
13057
14931
|
]
|
|
13058
14932
|
}),
|
|
13059
|
-
area === "review" &&
|
|
13060
|
-
className: "charter-
|
|
14933
|
+
area === "review" && (0, react_jsx_runtime.jsxs)("header", {
|
|
14934
|
+
className: "charter-areahead",
|
|
14935
|
+
children: [(0, react_jsx_runtime.jsx)("h2", { children: t("review.heading") }), (0, react_jsx_runtime.jsx)("p", {
|
|
14936
|
+
className: "charter-hint",
|
|
14937
|
+
children: t("review.headingHint")
|
|
14938
|
+
})]
|
|
14939
|
+
}),
|
|
14940
|
+
area === "review" && source.proposeMessage !== void 0 && (0, react_jsx_runtime.jsxs)("section", {
|
|
14941
|
+
className: "charter-card charter-section charter-messageproposal",
|
|
13061
14942
|
"aria-labelledby": "charter-message-proposal-title",
|
|
13062
|
-
children: (0, react_jsx_runtime.
|
|
14943
|
+
children: [(0, react_jsx_runtime.jsx)("div", {
|
|
13063
14944
|
className: "charter-cardhead",
|
|
13064
|
-
children:
|
|
14945
|
+
children: (0, react_jsx_runtime.jsxs)("div", {
|
|
13065
14946
|
className: "charter-cardtitle",
|
|
13066
|
-
children: [(0, react_jsx_runtime.jsx)("
|
|
13067
|
-
className: "charter-kicker",
|
|
13068
|
-
children: t("review.kicker")
|
|
13069
|
-
}), (0, react_jsx_runtime.jsx)("h3", {
|
|
14947
|
+
children: [(0, react_jsx_runtime.jsx)("h3", {
|
|
13070
14948
|
id: "charter-message-proposal-title",
|
|
13071
14949
|
children: t("review.messageProposal")
|
|
14950
|
+
}), (0, react_jsx_runtime.jsx)("p", {
|
|
14951
|
+
className: "charter-hint",
|
|
14952
|
+
children: t("review.messageProposalHint")
|
|
13072
14953
|
})]
|
|
13073
|
-
})
|
|
13074
|
-
|
|
13075
|
-
|
|
13076
|
-
|
|
13077
|
-
|
|
13078
|
-
|
|
13079
|
-
|
|
13080
|
-
|
|
13081
|
-
|
|
13082
|
-
|
|
13083
|
-
|
|
13084
|
-
|
|
13085
|
-
|
|
13086
|
-
},
|
|
13087
|
-
|
|
13088
|
-
|
|
14954
|
+
})
|
|
14955
|
+
}), (0, react_jsx_runtime.jsxs)("div", {
|
|
14956
|
+
className: "charter-messageproposal__form",
|
|
14957
|
+
children: [
|
|
14958
|
+
(0, react_jsx_runtime.jsxs)("div", {
|
|
14959
|
+
className: "charter-messageproposal__field",
|
|
14960
|
+
children: [(0, react_jsx_runtime.jsx)("span", {
|
|
14961
|
+
className: "charter-fieldlabel",
|
|
14962
|
+
children: t("message.pick")
|
|
14963
|
+
}), (0, react_jsx_runtime.jsxs)("div", {
|
|
14964
|
+
className: "charter-messageproposal__picker",
|
|
14965
|
+
onBlur: (event) => {
|
|
14966
|
+
if (!event.currentTarget.contains(event.relatedTarget)) setMessageMenuOpen(false);
|
|
14967
|
+
},
|
|
14968
|
+
onKeyDown: (event) => {
|
|
14969
|
+
if (event.key === "Escape") {
|
|
14970
|
+
setMessageMenuOpen(false);
|
|
14971
|
+
return;
|
|
14972
|
+
}
|
|
14973
|
+
if (!messageMenuOpen || event.key !== "ArrowDown" && event.key !== "ArrowUp") return;
|
|
14974
|
+
const options = [...messageMenuRef.current?.querySelectorAll("[role=\"option\"]") ?? []];
|
|
14975
|
+
if (options.length === 0) return;
|
|
14976
|
+
event.preventDefault();
|
|
14977
|
+
const current = options.indexOf(document.activeElement);
|
|
14978
|
+
options[event.key === "ArrowDown" ? (current + 1) % options.length : (current - 1 + options.length) % options.length]?.focus();
|
|
14979
|
+
},
|
|
14980
|
+
children: [(0, react_jsx_runtime.jsxs)("button", {
|
|
14981
|
+
type: "button",
|
|
14982
|
+
className: "charter-messageproposal__trigger",
|
|
14983
|
+
"aria-label": t("message.pick"),
|
|
14984
|
+
"aria-haspopup": "listbox",
|
|
14985
|
+
"aria-expanded": messageMenuOpen,
|
|
14986
|
+
disabled: messageCandidates.length === 0 || saving || unknownBlocked,
|
|
14987
|
+
onClick: () => setMessageMenuOpen((open) => !open),
|
|
14988
|
+
children: [(0, react_jsx_runtime.jsx)("span", { children: selectedMessage === void 0 ? t("message.pickPlaceholder") : `#${selectedMessage.seq} · ${shortText(selectedMessage.excerpt, 72)}` }), (0, react_jsx_runtime.jsx)("span", {
|
|
14989
|
+
"aria-hidden": "true",
|
|
14990
|
+
className: "charter-messageproposal__chevron",
|
|
14991
|
+
children: "⌄"
|
|
14992
|
+
})]
|
|
14993
|
+
}), messageMenuOpen && (0, react_jsx_runtime.jsx)("div", {
|
|
14994
|
+
ref: messageMenuRef,
|
|
14995
|
+
className: "charter-messageproposal__menu",
|
|
14996
|
+
role: "listbox",
|
|
14997
|
+
"aria-label": t("message.pick"),
|
|
14998
|
+
children: messageCandidates.map((candidate) => (0, react_jsx_runtime.jsxs)("button", {
|
|
14999
|
+
type: "button",
|
|
15000
|
+
role: "option",
|
|
15001
|
+
"aria-selected": candidate.seq === messageSeq,
|
|
15002
|
+
className: `charter-messageproposal__option${candidate.seq === messageSeq ? " is-selected" : ""}`,
|
|
15003
|
+
title: candidate.excerpt,
|
|
15004
|
+
onClick: () => {
|
|
15005
|
+
setMessageSeq(candidate.seq);
|
|
15006
|
+
setMessageDraft(candidate.text ?? "");
|
|
15007
|
+
setMessageMenuOpen(false);
|
|
15008
|
+
},
|
|
15009
|
+
children: [(0, react_jsx_runtime.jsxs)("span", {
|
|
15010
|
+
className: "charter-messageproposal__optionseq",
|
|
15011
|
+
children: ["#", candidate.seq]
|
|
15012
|
+
}), (0, react_jsx_runtime.jsx)("span", {
|
|
15013
|
+
className: "charter-messageproposal__optiontext",
|
|
15014
|
+
children: candidate.excerpt
|
|
15015
|
+
})]
|
|
15016
|
+
}, candidate.seq))
|
|
15017
|
+
})]
|
|
15018
|
+
})]
|
|
15019
|
+
}),
|
|
15020
|
+
(0, react_jsx_runtime.jsxs)("label", {
|
|
15021
|
+
className: "charter-messageproposal__field",
|
|
15022
|
+
children: [
|
|
15023
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
15024
|
+
className: "charter-fieldlabel",
|
|
15025
|
+
children: t("message.textLabel")
|
|
15026
|
+
}),
|
|
15027
|
+
(0, react_jsx_runtime.jsx)("textarea", {
|
|
15028
|
+
"aria-label": t("message.textLabel"),
|
|
15029
|
+
className: "charter-messageproposal__textarea",
|
|
15030
|
+
disabled: messageSeq !== void 0 && !messageTextAvailable,
|
|
15031
|
+
value: messageDraft,
|
|
15032
|
+
onChange: (event) => setMessageDraft(event.target.value)
|
|
15033
|
+
}),
|
|
15034
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
15035
|
+
className: "charter-hint",
|
|
15036
|
+
children: messageSeq !== void 0 && !messageTextAvailable ? t("message.legacyUnavailable") : selectedMessage?.truncated === true ? t("message.truncated") : t("message.textHint")
|
|
15037
|
+
})
|
|
15038
|
+
]
|
|
15039
|
+
}),
|
|
15040
|
+
(0, react_jsx_runtime.jsxs)("div", {
|
|
15041
|
+
className: "charter-messageproposal__field",
|
|
15042
|
+
children: [(0, react_jsx_runtime.jsx)("span", {
|
|
15043
|
+
className: "charter-fieldlabel",
|
|
15044
|
+
children: t("message.kind")
|
|
15045
|
+
}), (0, react_jsx_runtime.jsxs)("div", {
|
|
15046
|
+
className: "charter-messageproposal__kind",
|
|
15047
|
+
role: "group",
|
|
13089
15048
|
"aria-label": t("message.kind"),
|
|
13090
|
-
|
|
13091
|
-
|
|
13092
|
-
|
|
13093
|
-
|
|
15049
|
+
children: [(0, react_jsx_runtime.jsx)("button", {
|
|
15050
|
+
type: "button",
|
|
15051
|
+
className: `charter-messageproposal__choice${messageKind === "invariant" ? " is-active" : ""}`,
|
|
15052
|
+
"aria-pressed": messageKind === "invariant",
|
|
15053
|
+
onClick: () => setMessageKind("invariant"),
|
|
13094
15054
|
children: t("invariants.kicker")
|
|
13095
|
-
}), (0, react_jsx_runtime.jsx)("
|
|
13096
|
-
|
|
15055
|
+
}), (0, react_jsx_runtime.jsx)("button", {
|
|
15056
|
+
type: "button",
|
|
15057
|
+
className: `charter-messageproposal__choice${messageKind === "deliverable" ? " is-active" : ""}`,
|
|
15058
|
+
"aria-pressed": messageKind === "deliverable",
|
|
15059
|
+
onClick: () => setMessageKind("deliverable"),
|
|
13097
15060
|
children: t("deliverables.kicker")
|
|
13098
15061
|
})]
|
|
13099
|
-
})
|
|
13100
|
-
|
|
13101
|
-
|
|
13102
|
-
|
|
13103
|
-
|
|
13104
|
-
|
|
13105
|
-
|
|
13106
|
-
(0, react_jsx_runtime.jsx)(
|
|
13107
|
-
"aria-label": t("message.rangeEnd"),
|
|
13108
|
-
placeholder: t("message.rangeEnd"),
|
|
13109
|
-
value: messageEnd,
|
|
13110
|
-
onChange: (event) => setMessageEnd(event.target.value)
|
|
13111
|
-
}),
|
|
13112
|
-
(0, react_jsx_runtime.jsx)(ActionButton, {
|
|
15062
|
+
})]
|
|
15063
|
+
}),
|
|
15064
|
+
(0, react_jsx_runtime.jsxs)("div", {
|
|
15065
|
+
className: "charter-messageproposal__actions",
|
|
15066
|
+
children: [(0, react_jsx_runtime.jsx)("span", {
|
|
15067
|
+
className: `charter-budget${messageOverBudget ? " is-over" : ""}`,
|
|
15068
|
+
children: messageOverBudget ? t("budget.itemOver", { limit: formatBytes(t, view.limits.maxItemBytes) }) : `${formatBytes(t, messageBytes)} / ${formatBytes(t, view.limits.maxItemBytes)}`
|
|
15069
|
+
}), (0, react_jsx_runtime.jsx)(ActionButton, {
|
|
13113
15070
|
variant: "outline",
|
|
13114
|
-
disabled: saving || unknownBlocked ||
|
|
15071
|
+
disabled: saving || unknownBlocked || !messageCanSave,
|
|
13115
15072
|
onClick: () => {
|
|
15073
|
+
if (!messageCanSave || messageSeq === void 0) return;
|
|
13116
15074
|
draft.proposeLatestMessage({
|
|
13117
|
-
|
|
15075
|
+
seq: messageSeq,
|
|
13118
15076
|
kind: messageKind,
|
|
13119
|
-
|
|
13120
|
-
...messageEnd.trim() === "" ? {} : { end: Number(messageEnd) }
|
|
15077
|
+
text: messageDraft.trim()
|
|
13121
15078
|
});
|
|
13122
15079
|
},
|
|
13123
15080
|
children: t("review.saveLatestMessage")
|
|
13124
|
-
})
|
|
13125
|
-
|
|
13126
|
-
|
|
13127
|
-
})
|
|
15081
|
+
})]
|
|
15082
|
+
})
|
|
15083
|
+
]
|
|
15084
|
+
})]
|
|
13128
15085
|
}),
|
|
13129
15086
|
area === "review" && inactiveItems.length > 0 && (0, react_jsx_runtime.jsxs)("section", {
|
|
13130
15087
|
className: "charter-card charter-section",
|
|
13131
15088
|
"aria-labelledby": "charter-inactive-title",
|
|
13132
15089
|
children: [(0, react_jsx_runtime.jsxs)("div", {
|
|
13133
15090
|
className: "charter-cardhead",
|
|
13134
|
-
children: [(0, react_jsx_runtime.
|
|
15091
|
+
children: [(0, react_jsx_runtime.jsx)("div", {
|
|
13135
15092
|
className: "charter-cardtitle",
|
|
13136
|
-
children:
|
|
13137
|
-
className: "charter-kicker",
|
|
13138
|
-
children: t("review.kicker")
|
|
13139
|
-
}), (0, react_jsx_runtime.jsx)("h3", {
|
|
15093
|
+
children: (0, react_jsx_runtime.jsx)("h3", {
|
|
13140
15094
|
id: "charter-inactive-title",
|
|
13141
15095
|
children: t("review.inactiveItems")
|
|
13142
|
-
})
|
|
15096
|
+
})
|
|
13143
15097
|
}), (0, react_jsx_runtime.jsx)("span", {
|
|
13144
15098
|
className: "charter-count",
|
|
13145
15099
|
children: inactiveItems.length
|
|
@@ -13174,15 +15128,12 @@ function CharterPane({ source, draft, release, t }) {
|
|
|
13174
15128
|
"aria-labelledby": "charter-objective-history-title",
|
|
13175
15129
|
children: [(0, react_jsx_runtime.jsxs)("div", {
|
|
13176
15130
|
className: "charter-cardhead",
|
|
13177
|
-
children: [(0, react_jsx_runtime.
|
|
15131
|
+
children: [(0, react_jsx_runtime.jsx)("div", {
|
|
13178
15132
|
className: "charter-cardtitle",
|
|
13179
|
-
children:
|
|
13180
|
-
className: "charter-kicker",
|
|
13181
|
-
children: t("review.kicker")
|
|
13182
|
-
}), (0, react_jsx_runtime.jsx)("h3", {
|
|
15133
|
+
children: (0, react_jsx_runtime.jsx)("h3", {
|
|
13183
15134
|
id: "charter-objective-history-title",
|
|
13184
15135
|
children: t("review.objectiveHistory")
|
|
13185
|
-
})
|
|
15136
|
+
})
|
|
13186
15137
|
}), (0, react_jsx_runtime.jsx)("span", {
|
|
13187
15138
|
className: "charter-count",
|
|
13188
15139
|
children: closedObjectiveProposals.length
|
|
@@ -13217,15 +15168,12 @@ function CharterPane({ source, draft, release, t }) {
|
|
|
13217
15168
|
"aria-labelledby": "charter-item-proposals-title",
|
|
13218
15169
|
children: [(0, react_jsx_runtime.jsxs)("div", {
|
|
13219
15170
|
className: "charter-cardhead",
|
|
13220
|
-
children: [(0, react_jsx_runtime.
|
|
15171
|
+
children: [(0, react_jsx_runtime.jsx)("div", {
|
|
13221
15172
|
className: "charter-cardtitle",
|
|
13222
|
-
children:
|
|
13223
|
-
className: "charter-kicker",
|
|
13224
|
-
children: t("review.kicker")
|
|
13225
|
-
}), (0, react_jsx_runtime.jsx)("h3", {
|
|
15173
|
+
children: (0, react_jsx_runtime.jsx)("h3", {
|
|
13226
15174
|
id: "charter-item-proposals-title",
|
|
13227
15175
|
children: t("review.itemProposals")
|
|
13228
|
-
})
|
|
15176
|
+
})
|
|
13229
15177
|
}), (0, react_jsx_runtime.jsx)("span", {
|
|
13230
15178
|
className: "charter-count",
|
|
13231
15179
|
children: pendingItemProposals.length
|
|
@@ -13236,6 +15184,8 @@ function CharterPane({ source, draft, release, t }) {
|
|
|
13236
15184
|
const batch = batchByItem.get(item.id);
|
|
13237
15185
|
return (0, react_jsx_runtime.jsxs)("li", {
|
|
13238
15186
|
className: "charter-proposal",
|
|
15187
|
+
"data-proposal-id": item.id,
|
|
15188
|
+
tabIndex: -1,
|
|
13239
15189
|
children: [
|
|
13240
15190
|
(0, react_jsx_runtime.jsx)("p", {
|
|
13241
15191
|
className: "charter-proposal__text",
|
|
@@ -13279,15 +15229,12 @@ function CharterPane({ source, draft, release, t }) {
|
|
|
13279
15229
|
"aria-labelledby": "charter-objective-proposals-title",
|
|
13280
15230
|
children: [(0, react_jsx_runtime.jsxs)("div", {
|
|
13281
15231
|
className: "charter-cardhead",
|
|
13282
|
-
children: [(0, react_jsx_runtime.
|
|
15232
|
+
children: [(0, react_jsx_runtime.jsx)("div", {
|
|
13283
15233
|
className: "charter-cardtitle",
|
|
13284
|
-
children:
|
|
13285
|
-
className: "charter-kicker",
|
|
13286
|
-
children: t("review.kicker")
|
|
13287
|
-
}), (0, react_jsx_runtime.jsx)("h3", {
|
|
15234
|
+
children: (0, react_jsx_runtime.jsx)("h3", {
|
|
13288
15235
|
id: "charter-objective-proposals-title",
|
|
13289
15236
|
children: t("review.objectiveProposals")
|
|
13290
|
-
})
|
|
15237
|
+
})
|
|
13291
15238
|
}), (0, react_jsx_runtime.jsx)("span", {
|
|
13292
15239
|
className: "charter-count",
|
|
13293
15240
|
children: pendingObjectiveProposals.length
|
|
@@ -13349,15 +15296,12 @@ function CharterPane({ source, draft, release, t }) {
|
|
|
13349
15296
|
"aria-labelledby": "charter-batches-title",
|
|
13350
15297
|
children: [(0, react_jsx_runtime.jsxs)("div", {
|
|
13351
15298
|
className: "charter-cardhead",
|
|
13352
|
-
children: [(0, react_jsx_runtime.
|
|
15299
|
+
children: [(0, react_jsx_runtime.jsx)("div", {
|
|
13353
15300
|
className: "charter-cardtitle",
|
|
13354
|
-
children:
|
|
13355
|
-
className: "charter-kicker",
|
|
13356
|
-
children: t("review.kicker")
|
|
13357
|
-
}), (0, react_jsx_runtime.jsx)("h3", {
|
|
15301
|
+
children: (0, react_jsx_runtime.jsx)("h3", {
|
|
13358
15302
|
id: "charter-batches-title",
|
|
13359
15303
|
children: t("review.title")
|
|
13360
|
-
})
|
|
15304
|
+
})
|
|
13361
15305
|
}), (0, react_jsx_runtime.jsx)("span", {
|
|
13362
15306
|
className: "charter-count",
|
|
13363
15307
|
children: view.proposalBatches.length
|
|
@@ -13381,9 +15325,9 @@ function CharterPane({ source, draft, release, t }) {
|
|
|
13381
15325
|
className: "charter-batch__count",
|
|
13382
15326
|
children: t("review.pendingCandidates", { count: pending })
|
|
13383
15327
|
}),
|
|
13384
|
-
|
|
15328
|
+
batch.sourceIntegrity !== void 0 && batch.sourceIntegrity !== "not-applicable" && (0, react_jsx_runtime.jsx)("span", {
|
|
13385
15329
|
className: "charter-batch__count",
|
|
13386
|
-
children: t("review.sourceIntegrity", { integrity:
|
|
15330
|
+
children: t("review.sourceIntegrity", { integrity: batch.sourceIntegrity })
|
|
13387
15331
|
})
|
|
13388
15332
|
]
|
|
13389
15333
|
}, batch.id);
|
|
@@ -13698,7 +15642,7 @@ function CharterPane({ source, draft, release, t }) {
|
|
|
13698
15642
|
}) : null),
|
|
13699
15643
|
area === "diagnostics" && (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
13700
15644
|
source.runValidators !== void 0 && (0, react_jsx_runtime.jsxs)("section", {
|
|
13701
|
-
className: "charter-card charter-section",
|
|
15645
|
+
className: "charter-card charter-section charter-validator",
|
|
13702
15646
|
"aria-labelledby": "charter-validator-title",
|
|
13703
15647
|
children: [
|
|
13704
15648
|
(0, react_jsx_runtime.jsx)("div", {
|
|
@@ -13719,77 +15663,118 @@ function CharterPane({ source, draft, release, t }) {
|
|
|
13719
15663
|
children: t("validators.hint")
|
|
13720
15664
|
}),
|
|
13721
15665
|
(0, react_jsx_runtime.jsxs)("div", {
|
|
13722
|
-
className: "charter-
|
|
15666
|
+
className: "charter-validator__form",
|
|
13723
15667
|
children: [
|
|
13724
|
-
(0, react_jsx_runtime.jsxs)("
|
|
13725
|
-
|
|
13726
|
-
value: validatorItemId,
|
|
13727
|
-
onChange: (event) => setValidatorItemId(event.target.value),
|
|
13728
|
-
children: [(0, react_jsx_runtime.jsx)("option", {
|
|
13729
|
-
value: "",
|
|
13730
|
-
children: t("validators.pickItem")
|
|
13731
|
-
}), view.items.filter((item) => item.review === "accepted" && item.lifecycle === "current").map((item) => (0, react_jsx_runtime.jsx)("option", {
|
|
13732
|
-
value: item.id,
|
|
13733
|
-
children: item.text
|
|
13734
|
-
}, item.id))]
|
|
13735
|
-
}),
|
|
13736
|
-
(0, react_jsx_runtime.jsxs)("select", {
|
|
13737
|
-
"aria-label": t("validators.kindAria"),
|
|
13738
|
-
value: validatorKind,
|
|
13739
|
-
onChange: (event) => setValidatorKind(event.target.value),
|
|
15668
|
+
(0, react_jsx_runtime.jsxs)("label", {
|
|
15669
|
+
className: "charter-validator__field",
|
|
13740
15670
|
children: [
|
|
13741
|
-
(0, react_jsx_runtime.jsx)("
|
|
13742
|
-
|
|
13743
|
-
children: "
|
|
15671
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
15672
|
+
className: "charter-fieldlabel",
|
|
15673
|
+
children: t("validators.targetLabel")
|
|
13744
15674
|
}),
|
|
13745
|
-
(0, react_jsx_runtime.
|
|
13746
|
-
|
|
13747
|
-
|
|
15675
|
+
(0, react_jsx_runtime.jsxs)("select", {
|
|
15676
|
+
"aria-label": t("validators.itemAria"),
|
|
15677
|
+
value: validatorItemId,
|
|
15678
|
+
onChange: (event) => setValidatorItemId(event.target.value),
|
|
15679
|
+
children: [(0, react_jsx_runtime.jsx)("option", {
|
|
15680
|
+
value: "",
|
|
15681
|
+
children: t("validators.pickItem")
|
|
15682
|
+
}), view.items.filter((item) => item.review === "accepted" && item.lifecycle === "current").map((item) => (0, react_jsx_runtime.jsxs)("option", {
|
|
15683
|
+
value: item.id,
|
|
15684
|
+
title: item.text,
|
|
15685
|
+
children: [
|
|
15686
|
+
item.kind === "invariant" ? t("invariants.kicker") : t("deliverables.kicker"),
|
|
15687
|
+
" · ",
|
|
15688
|
+
shortText(item.text, 14)
|
|
15689
|
+
]
|
|
15690
|
+
}, item.id))]
|
|
13748
15691
|
}),
|
|
13749
|
-
(0, react_jsx_runtime.jsx)("
|
|
13750
|
-
|
|
13751
|
-
children: "
|
|
15692
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
15693
|
+
className: "charter-hint",
|
|
15694
|
+
children: t("validators.targetHint")
|
|
13752
15695
|
})
|
|
13753
15696
|
]
|
|
13754
15697
|
}),
|
|
13755
|
-
(0, react_jsx_runtime.
|
|
13756
|
-
|
|
13757
|
-
|
|
13758
|
-
|
|
13759
|
-
|
|
15698
|
+
(0, react_jsx_runtime.jsxs)("div", {
|
|
15699
|
+
className: "charter-validator__row",
|
|
15700
|
+
children: [(0, react_jsx_runtime.jsxs)("label", {
|
|
15701
|
+
className: "charter-validator__field",
|
|
15702
|
+
children: [(0, react_jsx_runtime.jsx)("span", {
|
|
15703
|
+
className: "charter-fieldlabel",
|
|
15704
|
+
children: t("validators.methodLabel")
|
|
15705
|
+
}), (0, react_jsx_runtime.jsxs)("select", {
|
|
15706
|
+
"aria-label": t("validators.kindAria"),
|
|
15707
|
+
value: validatorKind,
|
|
15708
|
+
onChange: (event) => setValidatorKind(event.target.value),
|
|
15709
|
+
children: [
|
|
15710
|
+
(0, react_jsx_runtime.jsx)("option", {
|
|
15711
|
+
value: "workspace.path-exists",
|
|
15712
|
+
children: t("validators.kind.path-exists")
|
|
15713
|
+
}),
|
|
15714
|
+
(0, react_jsx_runtime.jsx)("option", {
|
|
15715
|
+
value: "workspace.file-digest",
|
|
15716
|
+
children: t("validators.kind.file-digest")
|
|
15717
|
+
}),
|
|
15718
|
+
(0, react_jsx_runtime.jsx)("option", {
|
|
15719
|
+
value: "workspace.file-contains",
|
|
15720
|
+
children: t("validators.kind.file-contains")
|
|
15721
|
+
})
|
|
15722
|
+
]
|
|
15723
|
+
})]
|
|
15724
|
+
}), (0, react_jsx_runtime.jsxs)("label", {
|
|
15725
|
+
className: "charter-validator__field",
|
|
15726
|
+
children: [(0, react_jsx_runtime.jsx)("span", {
|
|
15727
|
+
className: "charter-fieldlabel",
|
|
15728
|
+
children: t("validators.pathLabel")
|
|
15729
|
+
}), (0, react_jsx_runtime.jsx)("input", {
|
|
15730
|
+
"aria-label": t("validators.pathAria"),
|
|
15731
|
+
placeholder: t("validators.pathPlaceholder"),
|
|
15732
|
+
value: validatorPath,
|
|
15733
|
+
onChange: (event) => setValidatorPath(event.target.value)
|
|
15734
|
+
})]
|
|
15735
|
+
})]
|
|
13760
15736
|
}),
|
|
13761
|
-
validatorKind !== "workspace.path-exists" && (0, react_jsx_runtime.
|
|
13762
|
-
|
|
13763
|
-
|
|
13764
|
-
|
|
13765
|
-
|
|
15737
|
+
validatorKind !== "workspace.path-exists" && (0, react_jsx_runtime.jsxs)("label", {
|
|
15738
|
+
className: "charter-validator__field",
|
|
15739
|
+
children: [(0, react_jsx_runtime.jsx)("span", {
|
|
15740
|
+
className: "charter-fieldlabel",
|
|
15741
|
+
children: t("validators.expectationLabel")
|
|
15742
|
+
}), (0, react_jsx_runtime.jsx)("input", {
|
|
15743
|
+
"aria-label": t("validators.expectationAria"),
|
|
15744
|
+
placeholder: validatorKind === "workspace.file-digest" ? "sha256:..." : t("validators.containsPlaceholder"),
|
|
15745
|
+
value: validatorExpectation,
|
|
15746
|
+
onChange: (event) => setValidatorExpectation(event.target.value)
|
|
15747
|
+
})]
|
|
13766
15748
|
}),
|
|
13767
|
-
(0, react_jsx_runtime.jsx)(
|
|
13768
|
-
|
|
13769
|
-
|
|
13770
|
-
|
|
13771
|
-
|
|
13772
|
-
|
|
13773
|
-
|
|
13774
|
-
|
|
13775
|
-
|
|
13776
|
-
|
|
13777
|
-
|
|
13778
|
-
|
|
13779
|
-
|
|
13780
|
-
|
|
13781
|
-
|
|
13782
|
-
|
|
13783
|
-
|
|
13784
|
-
|
|
13785
|
-
|
|
13786
|
-
|
|
13787
|
-
|
|
13788
|
-
|
|
13789
|
-
|
|
13790
|
-
|
|
13791
|
-
|
|
13792
|
-
|
|
15749
|
+
(0, react_jsx_runtime.jsx)("div", {
|
|
15750
|
+
className: "charter-validator__actions",
|
|
15751
|
+
children: (0, react_jsx_runtime.jsx)(ActionButton, {
|
|
15752
|
+
variant: "outline",
|
|
15753
|
+
disabled: validatorRunning || validatorItemId === "" || validatorPath.trim() === "",
|
|
15754
|
+
onClick: () => {
|
|
15755
|
+
(async () => {
|
|
15756
|
+
setValidatorRunning(true);
|
|
15757
|
+
setValidatorFeedback(null);
|
|
15758
|
+
try {
|
|
15759
|
+
const result = await source.runValidators([{
|
|
15760
|
+
itemId: validatorItemId,
|
|
15761
|
+
validator: {
|
|
15762
|
+
kind: validatorKind,
|
|
15763
|
+
path: validatorPath.trim(),
|
|
15764
|
+
...validatorKind === "workspace.file-digest" ? { expectedDigest: validatorExpectation.trim() } : {},
|
|
15765
|
+
...validatorKind === "workspace.file-contains" ? { contains: validatorExpectation } : {}
|
|
15766
|
+
}
|
|
15767
|
+
}]);
|
|
15768
|
+
setValidatorFeedback(result.ok ? t("validators.done") : errorLabel(result.code, t));
|
|
15769
|
+
} catch {
|
|
15770
|
+
setValidatorFeedback(t("validators.failed"));
|
|
15771
|
+
} finally {
|
|
15772
|
+
setValidatorRunning(false);
|
|
15773
|
+
}
|
|
15774
|
+
})();
|
|
15775
|
+
},
|
|
15776
|
+
children: t("validators.run")
|
|
15777
|
+
})
|
|
13793
15778
|
})
|
|
13794
15779
|
]
|
|
13795
15780
|
}),
|
|
@@ -13797,9 +15782,32 @@ function CharterPane({ source, draft, release, t }) {
|
|
|
13797
15782
|
className: "charter-hint",
|
|
13798
15783
|
role: "status",
|
|
13799
15784
|
children: validatorFeedback
|
|
15785
|
+
})
|
|
15786
|
+
]
|
|
15787
|
+
}),
|
|
15788
|
+
source.sourceIntegrity !== void 0 && (0, react_jsx_runtime.jsxs)("section", {
|
|
15789
|
+
className: "charter-card charter-section",
|
|
15790
|
+
"aria-labelledby": "charter-integrity-title",
|
|
15791
|
+
children: [
|
|
15792
|
+
(0, react_jsx_runtime.jsx)("div", {
|
|
15793
|
+
className: "charter-cardhead",
|
|
15794
|
+
children: (0, react_jsx_runtime.jsxs)("div", {
|
|
15795
|
+
className: "charter-cardtitle",
|
|
15796
|
+
children: [(0, react_jsx_runtime.jsx)("span", {
|
|
15797
|
+
className: "charter-kicker",
|
|
15798
|
+
children: t("diagnostics.kicker")
|
|
15799
|
+
}), (0, react_jsx_runtime.jsx)("h3", {
|
|
15800
|
+
id: "charter-integrity-title",
|
|
15801
|
+
children: t("integrity.title")
|
|
15802
|
+
})]
|
|
15803
|
+
})
|
|
13800
15804
|
}),
|
|
13801
|
-
|
|
13802
|
-
className: "charter-
|
|
15805
|
+
(0, react_jsx_runtime.jsx)("p", {
|
|
15806
|
+
className: "charter-hint",
|
|
15807
|
+
children: t("integrity.hint")
|
|
15808
|
+
}),
|
|
15809
|
+
(0, react_jsx_runtime.jsx)("div", {
|
|
15810
|
+
className: "charter-validator__actions",
|
|
13803
15811
|
children: (0, react_jsx_runtime.jsx)(ActionButton, {
|
|
13804
15812
|
variant: "outline",
|
|
13805
15813
|
onClick: () => {
|
|
@@ -13931,7 +15939,7 @@ function CharterPane({ source, draft, release, t }) {
|
|
|
13931
15939
|
children: t("recovery.title")
|
|
13932
15940
|
}), (0, react_jsx_runtime.jsx)("h3", {
|
|
13933
15941
|
id: "charter-restore-title",
|
|
13934
|
-
children: t("recovery.
|
|
15942
|
+
children: t("recovery.restoreTitle")
|
|
13935
15943
|
})]
|
|
13936
15944
|
})
|
|
13937
15945
|
}),
|
|
@@ -14001,22 +16009,70 @@ function CharterPane({ source, draft, release, t }) {
|
|
|
14001
16009
|
})
|
|
14002
16010
|
]
|
|
14003
16011
|
}),
|
|
14004
|
-
(0, react_jsx_runtime.jsxs)(
|
|
14005
|
-
|
|
14006
|
-
|
|
14007
|
-
|
|
14008
|
-
|
|
14009
|
-
|
|
14010
|
-
|
|
14011
|
-
|
|
14012
|
-
|
|
14013
|
-
|
|
14014
|
-
|
|
14015
|
-
|
|
14016
|
-
|
|
14017
|
-
}
|
|
14018
|
-
|
|
14019
|
-
|
|
16012
|
+
maintenanceEnabled && (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
16013
|
+
(0, react_jsx_runtime.jsxs)("div", {
|
|
16014
|
+
className: "charter-archivecache",
|
|
16015
|
+
children: [(0, react_jsx_runtime.jsx)("div", {
|
|
16016
|
+
className: "charter-archivecache__head",
|
|
16017
|
+
children: (0, react_jsx_runtime.jsx)("strong", { children: t("recovery.cacheTitle") })
|
|
16018
|
+
}), archiveCacheProblem !== null ? (0, react_jsx_runtime.jsx)("p", {
|
|
16019
|
+
className: "charter-archivecache__empty",
|
|
16020
|
+
role: "alert",
|
|
16021
|
+
children: archiveCacheProblem
|
|
16022
|
+
}) : archiveEntries.length === 0 ? (0, react_jsx_runtime.jsx)("p", {
|
|
16023
|
+
className: "charter-archivecache__empty",
|
|
16024
|
+
children: t("recovery.cacheEmpty")
|
|
16025
|
+
}) : (0, react_jsx_runtime.jsx)("ul", {
|
|
16026
|
+
className: "charter-archivecache__list",
|
|
16027
|
+
"aria-label": t("recovery.cacheAria"),
|
|
16028
|
+
children: archiveEntries.map((entry) => (0, react_jsx_runtime.jsx)("li", { children: (0, react_jsx_runtime.jsxs)("button", {
|
|
16029
|
+
type: "button",
|
|
16030
|
+
"aria-pressed": activeArchiveKey === entry.key,
|
|
16031
|
+
className: `charter-archivecache__item${activeArchiveKey === entry.key ? " is-active" : ""}`,
|
|
16032
|
+
onClick: () => chooseCachedArchive(entry),
|
|
16033
|
+
children: [(0, react_jsx_runtime.jsx)("span", {
|
|
16034
|
+
className: "charter-archivecache__revision",
|
|
16035
|
+
children: t("recovery.cacheRevision", { revision: entry.revision })
|
|
16036
|
+
}), (0, react_jsx_runtime.jsxs)("span", {
|
|
16037
|
+
className: "charter-archivecache__meta",
|
|
16038
|
+
children: [
|
|
16039
|
+
formatTimestamp(entry.archivedAt),
|
|
16040
|
+
" · ",
|
|
16041
|
+
shortText(entry.recordDigest.replace("sha256:", ""), 16)
|
|
16042
|
+
]
|
|
16043
|
+
})]
|
|
16044
|
+
}) }, entry.key))
|
|
16045
|
+
})]
|
|
16046
|
+
}),
|
|
16047
|
+
(0, react_jsx_runtime.jsx)("p", {
|
|
16048
|
+
className: "charter-hint",
|
|
16049
|
+
children: t("recovery.cacheHint")
|
|
16050
|
+
}),
|
|
16051
|
+
(0, react_jsx_runtime.jsxs)("details", {
|
|
16052
|
+
className: "charter-recovery__import",
|
|
16053
|
+
children: [
|
|
16054
|
+
(0, react_jsx_runtime.jsx)("summary", { children: t("recovery.importTitle") }),
|
|
16055
|
+
(0, react_jsx_runtime.jsx)("p", {
|
|
16056
|
+
className: "charter-hint",
|
|
16057
|
+
children: t("recovery.importHint")
|
|
16058
|
+
}),
|
|
16059
|
+
(0, react_jsx_runtime.jsx)("label", {
|
|
16060
|
+
className: "charter-recovery__file",
|
|
16061
|
+
children: (0, react_jsx_runtime.jsx)("input", {
|
|
16062
|
+
ref: archiveInputRef,
|
|
16063
|
+
"aria-label": t("recovery.chooseFile"),
|
|
16064
|
+
type: "file",
|
|
16065
|
+
accept: "application/json,.json",
|
|
16066
|
+
disabled: recoveryBusy || unknownBlocked,
|
|
16067
|
+
onChange: (event) => {
|
|
16068
|
+
const file = event.currentTarget.files?.[0];
|
|
16069
|
+
if (file !== void 0) chooseArchive(file);
|
|
16070
|
+
}
|
|
16071
|
+
})
|
|
16072
|
+
})
|
|
16073
|
+
]
|
|
16074
|
+
})
|
|
16075
|
+
] }),
|
|
14020
16076
|
archivePreview !== null && (0, react_jsx_runtime.jsxs)("div", {
|
|
14021
16077
|
className: "charter-recovery__preview",
|
|
14022
16078
|
children: [
|
|
@@ -14073,7 +16129,7 @@ function CharterPane({ source, draft, release, t }) {
|
|
|
14073
16129
|
variant: confirmRecovery === "restore" ? "primary" : "outline",
|
|
14074
16130
|
disabled: !maintenanceEnabled || recoveryBusy || !restoreAdmission.ok || !restoreArchiveReady,
|
|
14075
16131
|
onClick: restoreArchive,
|
|
14076
|
-
children: confirmRecovery === "restore" ? t("recovery.restoreConfirm") : t("recovery.
|
|
16132
|
+
children: confirmRecovery === "restore" ? t("recovery.restoreConfirm") : archiveSource === "file" ? t("recovery.restoreFile") : t("recovery.restoreCached")
|
|
14077
16133
|
}),
|
|
14078
16134
|
confirmRecovery === "restore" && (0, react_jsx_runtime.jsx)(ActionButton, {
|
|
14079
16135
|
variant: "outline",
|