@uniqbit/mate-core 0.20.0 → 0.21.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/claude-capability-plugins/companion-mentions/.claude-plugin/plugin.json +1 -1
- package/claude-capability-plugins/companion-mentions/hooks/register.ts +1 -1
- package/claude-plugin/hooks/hooks.json +10 -1
- package/claude-plugin/hooks/rtk-worktree-git.mjs +58 -0
- package/opencode-plugin/src/server.ts +9 -2
- package/package.json +2 -1
- package/src/cli/commands/artifact/delivery/environment.ts +28 -8
- package/src/cli/commands/artifact/delivery/link.ts +28 -9
- package/src/cli/commands/artifact/delivery/output.ts +7 -0
- package/src/cli/commands/companion/update.ts +2 -19
- package/src/cli/commands/factory/factory.ts +11 -1
- package/src/cli/commands/install.ts +47 -36
- package/src/cli/commands/launch/claude.ts +2 -0
- package/src/cli/commands/launch/shared.ts +33 -6
- package/src/cli/commands/plugin/install.ts +27 -11
- package/src/cli/commands/report/index.ts +180 -184
- package/src/cli/commands/report/markdown.ts +67 -72
- package/src/cli/commands/shared/companion-selection.ts +3 -1
- package/src/cli/commands/studio/access.ts +6 -14
- package/src/cli/commands/studio/areas.ts +112 -33
- package/src/cli/commands/studio/companion-add.ts +87 -0
- package/src/cli/commands/studio/companion-removal.ts +15 -8
- package/src/cli/commands/studio/factory-credential.ts +1 -15
- package/src/cli/commands/studio/factory-git-tokens.ts +40 -0
- package/src/cli/commands/studio/factory-relay.ts +18 -0
- package/src/cli/commands/studio/graph-model.ts +61 -0
- package/src/cli/commands/studio/graph.ts +336 -0
- package/src/cli/commands/studio/index.ts +4 -4
- package/src/cli/commands/studio/payload.ts +42 -15
- package/src/cli/commands/studio/repository-add.ts +116 -0
- package/src/cli/commands/studio/routes.ts +6 -0
- package/src/cli/commands/studio/selection.ts +12 -3
- package/src/cli/commands/studio/server.ts +127 -5
- package/src/cli/commands/studio/services.ts +40 -0
- package/src/cli/commands/studio/terminal.ts +45 -3
- package/src/cli/commands/studio/views/vault/markdown-tree.ts +84 -3
- package/src/cli/commands/studio/workset-session.ts +47 -14
- package/src/cli/commands/unwrap.ts +3 -0
- package/src/cli/commands/update.ts +2 -0
- package/src/cli/commands/vscode/release-vsix.json +4 -0
- package/src/cli/commands/vscode/setup.ts +71 -13
- package/src/cli/commands/vscode/vsix.ts +48 -7
- package/src/cli/commands/working/cleanup.ts +40 -8
- package/src/cli/commands/working/worktree.ts +176 -35
- package/src/cli/main.ts +17 -2
- package/src/cli/usage.ts +1 -1
- package/src/hooks/rtk-worktree-git.ts +48 -0
- package/src/hooks/validate-artifact-path.ts +38 -7
- package/src/lib/delivery/branch-template.ts +122 -0
- package/src/lib/delivery/branches.ts +21 -16
- package/src/lib/delivery/checkout.ts +102 -0
- package/src/lib/delivery/environment.ts +2 -0
- package/src/lib/delivery/merge-git.ts +13 -1
- package/src/lib/delivery/record-delivery.ts +83 -29
- package/src/lib/delivery/record.ts +15 -3
- package/src/lib/delivery/resolve-branch.ts +157 -110
- package/src/lib/factory/attach-client.ts +11 -1
- package/src/lib/factory/broker.ts +37 -40
- package/src/lib/factory/client.ts +22 -1
- package/src/lib/factory/clone-url.ts +39 -0
- package/src/lib/factory/command.ts +21 -5
- package/src/lib/factory/git-auth.ts +61 -0
- package/src/lib/factory/git-credential-store.ts +181 -0
- package/src/lib/factory/ids.ts +12 -2
- package/src/lib/factory/outcomes/actions.ts +20 -4
- package/src/lib/factory/outcomes/index.ts +77 -11
- package/src/lib/factory/outcomes/lifecycle.ts +9 -2
- package/src/lib/factory/outcomes/sessions.ts +23 -1
- package/src/lib/factory/prepare.ts +9 -3
- package/src/lib/factory/runner/scheduler.ts +96 -14
- package/src/lib/factory/runner/workflow.ts +5 -1
- package/src/lib/factory/runtime.ts +143 -43
- package/src/lib/orchestrator/companion-hub.ts +6 -1
- package/src/lib/orchestrator/engine-floor.ts +48 -0
- package/src/lib/orchestrator/launcher.ts +34 -1
- package/src/lib/orchestrator/projection-claude-commands.ts +2 -2
- package/src/lib/orchestrator/projection-claude-entry.ts +42 -21
- package/src/lib/orchestrator/projection-claude-links.ts +32 -8
- package/src/lib/orchestrator/projection-claude-skills.ts +2 -2
- package/src/lib/orchestrator/projection-entries.ts +22 -18
- package/src/lib/orchestrator/projection-opencode-copies.ts +65 -21
- package/src/lib/orchestrator/projection-runtime-documents.ts +66 -43
- package/src/lib/orchestrator/projection-types.ts +28 -1
- package/src/lib/orchestrator/refresh-working-claude-links.ts +3 -1
- package/src/lib/orchestrator/session-prepare.ts +6 -1
- package/src/lib/orchestrator/setup-compatibilities.ts +1 -1
- package/src/lib/orchestrator/types.ts +4 -0
- package/src/lib/orchestrator/umbrella-checkouts.ts +102 -0
- package/src/lib/orchestrator/working-repo-projection.ts +24 -4
- package/src/lib/orchestrator/wrap-pass.ts +1 -0
- package/src/lib/public-npm.ts +95 -50
- package/src/lib/session-state.ts +72 -2
- package/src/lib/update-checker.ts +7 -1
- package/src/lib/usage/aggregate.ts +202 -0
- package/src/lib/usage/cache.ts +87 -0
- package/src/lib/usage/claude-pricing.ts +71 -0
- package/src/lib/usage/claude.ts +189 -0
- package/src/lib/usage/collect.ts +56 -0
- package/src/lib/usage/opencode.ts +188 -0
- package/src/lib/usage/records.ts +80 -0
- package/src/lib/usage/rtk-database.ts +72 -0
- package/src/lib/usage/savings.ts +209 -0
- package/src/lib/usage/scope.ts +182 -0
- package/src/lib/usage/source.ts +102 -0
- package/src/lib/usage/types.ts +143 -0
- package/src/lib/usage/window.ts +37 -0
- package/src/lib/workset/factory-local.ts +157 -0
- package/src/lib/workset/record.ts +25 -11
- package/src/lib/workset/repositories.ts +118 -25
- package/src/lib/workset/worktree-include.ts +161 -0
- package/src/lib/workset/worktree-index.ts +6 -2
- package/src/lib/workset/worktree.ts +591 -101
- package/src/opencode/companion-hooks.ts +46 -8
- package/src/opencode/companion-policy.ts +18 -5
- package/src/opencode/enter-worktree.ts +254 -6
- package/src/opencode/session-register.ts +2 -2
- package/src/runtime/claude-bg-isolation.ts +138 -0
- package/src/runtime/companion-git.ts +10 -2
- package/src/runtime/companion-guidance.ts +17 -4
- package/src/runtime/current-branch.ts +16 -2
- package/src/runtime/entered-worktree.ts +24 -0
- package/src/runtime/git-tracked.ts +60 -0
- package/src/runtime/repo-destination.ts +72 -0
- package/src/runtime/repo-local.ts +25 -3
- package/src/runtime/rtk-git-guard.ts +66 -0
- package/src/runtime/runtime-document-manifest.ts +229 -19
- package/src/runtime/runtime-document-manifest.typecheck.ts +10 -0
- package/src/runtime/secret-guard.ts +9 -2
- package/src/runtime/secret-policy-weakening.ts +122 -0
- package/src/runtime/serving-claude-wrap.ts +15 -2
- package/src/runtime/umbrella-folder.ts +56 -0
- package/src/runtime/wrap-state.ts +5 -13
- package/src/studio.ts +37 -0
- package/src/templates/mate-skills/agents/mate-apply-change/SKILL.md +61 -6
- package/src/templates/mate-skills/agents/mate-explore-change/SKILL.md +8 -4
- package/src/templates/mate-skills/agents/mate-propose-change/SKILL.md +9 -5
- package/src/templates/mate-skills/agents/mate-publish-artifact/SKILL.md +5 -4
- package/src/templates/mate-skills/agents/mate-show-me/SKILL.md +10 -4
- package/src/templates/mate-skills/agents/mate-simplify-code/SKILL.md +5 -1
- package/src/templates/mate-skills/claude/mate-apply-change/SKILL.md +61 -6
- package/src/templates/mate-skills/claude/mate-explore-change/SKILL.md +8 -4
- package/src/templates/mate-skills/claude/mate-propose-change/SKILL.md +9 -5
- package/src/templates/mate-skills/claude/mate-publish-artifact/SKILL.md +5 -4
- package/src/templates/mate-skills/claude/mate-show-me/SKILL.md +10 -4
- package/src/templates/mate-skills/claude/mate-simplify-code/SKILL.md +5 -1
- package/src/tools/setup/__snapshots__/runtime-surface-golden.test.ts.snap +307 -42
- package/src/tools/setup/capabilities/rtk.ts +93 -1
- package/src/tools/setup/dynamic-plugins/audiences.ts +65 -21
- package/src/tools/setup/dynamic-plugins/frozen.ts +32 -13
- package/src/tools/setup/dynamic-plugins/hydrate.ts +4 -4
- package/src/tools/setup/dynamic-plugins/install.ts +24 -22
- package/src/tools/setup/dynamic-plugins/loader.ts +11 -7
- package/src/tools/setup/dynamic-plugins/paths.ts +30 -10
- package/src/tools/setup/dynamic-plugins/verify.ts +10 -7
- package/src/tools/setup/dynamic-plugins/workspaces.ts +153 -0
- package/src/tools/setup/mate.ts +3 -3
- package/src/tools/setup/plugins/gitignore.ts +15 -9
- package/src/tools/setup/providers/claude-plugin-hooks.ts +12 -0
- package/src/tools/setup/providers/claude.ts +25 -3
- package/src/tools/setup/utils.ts +4 -2
- package/src/tools/setup/working-repo-cleanup.ts +2 -2
- package/src/tools/setup/working-repo-local-state.ts +2 -0
- package/src/tools/setup.ts +25 -14
- package/studio-dist/client/assets/app-D9cw6szy.css +2 -0
- package/studio-dist/client/assets/artifacts-WD2ZXYrx.js +1 -0
- package/studio-dist/client/assets/button-Br0O1sXw.js +1 -0
- package/studio-dist/client/assets/combobox-DA7RAUUZ.js +1 -0
- package/studio-dist/client/assets/companion-view-CrabvxS8.js +1 -0
- package/studio-dist/client/assets/factory-DGS0E16C.js +6 -0
- package/studio-dist/client/assets/fields-6aXBpFhJ.js +1 -0
- package/studio-dist/client/assets/getting-started-Clde4w6P.js +1 -0
- package/studio-dist/client/assets/getting-started-D6kgWwWZ.js +1 -0
- package/studio-dist/client/assets/getting-started._topic-BiunccbT.js +1 -0
- package/studio-dist/client/assets/getting-started.index-DpiNoGw8.js +1 -0
- package/studio-dist/client/assets/graph-B_TCBVbu.js +2 -0
- package/studio-dist/client/assets/graph-canvas-Ba37Y5AE.js +3242 -0
- package/studio-dist/client/assets/guides-Du_RtJxP.js +1 -0
- package/studio-dist/client/assets/index-Df8L1LQa.js +40 -0
- package/studio-dist/client/assets/jsx-runtime-MZURdZre.js +1 -0
- package/studio-dist/client/assets/markdown-view-BOX6x0rL.js +1 -0
- package/studio-dist/client/assets/panel-dbmCx7Mx.js +1 -0
- package/studio-dist/client/assets/queries-RvHeXY12.js +1 -0
- package/studio-dist/client/assets/react-3QStrcDO.js +27 -0
- package/studio-dist/client/assets/report-url-XRL0x1SY.js +1 -0
- package/studio-dist/client/assets/reports-r3IK7Doz.js +1 -0
- package/studio-dist/client/assets/routes-C0A5LTFc.js +1 -0
- package/studio-dist/client/assets/select-CnaMd617.js +1 -0
- package/studio-dist/client/assets/skills-CzjzHpBT.js +1 -0
- package/studio-dist/client/assets/specs-B0ldF_6J.js +1 -0
- package/studio-dist/client/assets/specs-view-BnCLA0gW.js +1 -0
- package/studio-dist/client/assets/spinner-Dcm3fqK1.js +1 -0
- package/studio-dist/client/assets/steps-C0p2N1Pb.js +1 -0
- package/studio-dist/client/assets/store-Dw34catY.js +1 -0
- package/studio-dist/client/assets/studio-Cpz_HRHp.js +100 -0
- package/studio-dist/client/assets/studio-queries-ibmpFo6R.js +2 -0
- package/studio-dist/client/assets/usage-C2QJ_0IZ.js +55 -0
- package/studio-dist/client/assets/useAnchoredPopupScrollLock-Bj-FWb8z.js +1 -0
- package/studio-dist/client/assets/useMutation-aAr2uiay.js +1 -0
- package/studio-dist/client/assets/useSelector-AYcH7lB0.js +2 -0
- package/studio-dist/client/assets/vault-BGcxkSIY.js +1 -0
- package/studio-dist/client/assets/warnings-R1cE1rLf.js +1 -0
- package/studio-dist/client/assets/workflow-C2qTrMDH.js +1 -0
- package/studio-dist/server/assets/__23tanstack-start-server-fn-resolver-Bn896ZYj.js +122 -0
- package/studio-dist/server/assets/_tanstack-start-manifest_v.js +102 -35
- package/studio-dist/server/assets/{actions-Bvgj9eb8.js → actions-DYSv-9VV.js} +10 -4
- package/studio-dist/server/assets/artifacts-DnF9L3dZ.js +216 -0
- package/studio-dist/server/assets/{button-CIJqAhni.js → button-CgOIVdmD.js} +13 -1702
- package/studio-dist/server/assets/combobox-DV_s9W0s.js +483 -0
- package/studio-dist/server/assets/{companion-view-DISASvdJ.js → companion-view-BKVXD3TO.js} +3 -3
- package/studio-dist/server/assets/companions-C7fctnU9.js +31 -0
- package/studio-dist/server/assets/{createServerRpc-tK2lE9R2.js → createServerRpc-bFKFpGFG.js} +1 -1
- package/studio-dist/server/assets/{factory-DUTa0eDs.js → factory-C7Ybg0xG.js} +1256 -353
- package/studio-dist/server/assets/{factory-DGPmNGbo.js → factory-Df5uAHjb.js} +53 -6
- package/studio-dist/server/assets/fields-BbieQTD0.js +1190 -0
- package/studio-dist/server/assets/getting-started-B136TP57.js +4 -0
- package/studio-dist/server/assets/getting-started-CRxMWorQ.js +67 -0
- package/studio-dist/server/assets/getting-started._topic-DJKQAzYl.js +13 -0
- package/studio-dist/server/assets/getting-started.index-D84gec1t.js +13 -0
- package/studio-dist/server/assets/graph-CSje3029.js +801 -0
- package/studio-dist/server/assets/graph-DDZzXM1L.js +16 -0
- package/studio-dist/server/assets/graph-canvas-22bWB5-2.js +21066 -0
- package/studio-dist/server/assets/graph-wire-BdSUx0G5.js +58 -0
- package/studio-dist/server/assets/guides-D9dk1Frq.js +13 -0
- package/studio-dist/server/assets/guides-IE-19POz.js +5 -0
- package/studio-dist/server/assets/guides.server-vcYRY5wx.js +66 -0
- package/studio-dist/server/assets/jsx-runtime-Bt0s0YKS.js +451 -0
- package/studio-dist/server/assets/{markdown-view-Bn7xPdks.js → markdown-view-BR8dJ7aR.js} +28 -9
- package/studio-dist/server/assets/{panel-3Jmn4awF.js → panel-BR_t9iMM.js} +4 -4
- package/studio-dist/server/assets/queries-DWoTin-q.js +32 -0
- package/studio-dist/server/assets/react-CdqSUhaL.js +89 -0
- package/studio-dist/server/assets/redirect-BaZ_QyqF.js +39 -0
- package/studio-dist/server/assets/report-url-BUXPcE_8.js +9 -0
- package/studio-dist/server/assets/{reports-D6YMqhnO.js → reports-CQ9qQ1-n.js} +9 -10
- package/studio-dist/server/assets/{reports-C06RXVE2.js → reports-dYDEoBeq.js} +3 -3
- package/studio-dist/server/assets/{router-C8MGqlAY.js → router-DkRHNTpE.js} +787 -2862
- package/studio-dist/server/assets/{routes-BcFgvqf7.js → routes-B6GfOew4.js} +22 -171
- package/studio-dist/server/assets/{search-JAKurDNh.js → search-BJnWLfkG.js} +21 -2
- package/studio-dist/server/assets/select-Af7Wibii.js +1609 -0
- package/studio-dist/server/assets/{shell-DS3wUexh.js → shell-Hq-hXgnT.js} +6 -5
- package/studio-dist/server/assets/{skills-BEnOxiDl.js → skills-B7nEuVbx.js} +9 -8
- package/studio-dist/server/assets/{skills-CtrBAtX3.js → skills-B_YYL7q8.js} +3 -3
- package/studio-dist/server/assets/specs-BpLUFntA.js +51 -0
- package/studio-dist/server/assets/specs-view-0peMVd22.js +426 -0
- package/studio-dist/server/assets/spinner-CdwJW4VB.js +20 -0
- package/studio-dist/server/assets/{steps-Dq_CwY_s.js → steps-D56DApvK.js} +1 -1
- package/studio-dist/server/assets/store-Cs17okNG.js +280 -0
- package/studio-dist/server/assets/studio-CAcKp3bM.js +10340 -0
- package/studio-dist/server/assets/studio-queries-BtRGzDdh.js +1451 -0
- package/studio-dist/server/assets/usage-COdjd1gD.js +25570 -0
- package/studio-dist/server/assets/usage-f6pqE1tm.js +24 -0
- package/studio-dist/server/assets/useAnchoredPopupScrollLock-DlBKHRw7.js +756 -0
- package/studio-dist/server/assets/useMutation-DzTZGenE.js +690 -0
- package/studio-dist/server/assets/{__23tanstack-start-server-fn-resolver-M2GBs8s3.js → useSelector-DUmCUXAs.js} +4 -668
- package/studio-dist/server/assets/{vault-Fvxt2Tzl.js → vault-BDuIUq0F.js} +8 -5
- package/studio-dist/server/assets/{vault-BmWnryh3.js → vault-BVLp6zu3.js} +3 -3
- package/studio-dist/server/assets/{views-BgYa-za2.js → views-flRUr21z.js} +4 -4
- package/studio-dist/server/assets/{warnings-DzR6fyZh.js → warnings-CDy9pdgL.js} +3 -2
- package/studio-dist/server/assets/{delivery-path-C29fBynY.js → workflow-D9GKI2EV.js} +132 -106
- package/studio-dist/server/server.js +582 -8
- package/src/cli/commands/report/collector.ts +0 -288
- package/studio-dist/client/assets/app-CdPiFv59.css +0 -2
- package/studio-dist/client/assets/button-BIIHE0EQ.js +0 -3
- package/studio-dist/client/assets/companion-view-DM6YyXaR.js +0 -1
- package/studio-dist/client/assets/delivery-path-DELxj0Av.js +0 -1
- package/studio-dist/client/assets/factory-BZy0E8ty.js +0 -4
- package/studio-dist/client/assets/index-B3wkMzjA.js +0 -40
- package/studio-dist/client/assets/markdown-view-pQ2Qp_i5.js +0 -1
- package/studio-dist/client/assets/panel-CbajlC3p.js +0 -1
- package/studio-dist/client/assets/prepaint-CwSrpdFA.js +0 -27
- package/studio-dist/client/assets/react-CN2GSx7x.js +0 -1
- package/studio-dist/client/assets/reports-DllhYQ5_.js +0 -1
- package/studio-dist/client/assets/rolldown-runtime-WkwZ5CU-.js +0 -1
- package/studio-dist/client/assets/routes-COm-G3mK.js +0 -1
- package/studio-dist/client/assets/skills-DmWAy-jZ.js +0 -1
- package/studio-dist/client/assets/specs-BG3Wi3ln.js +0 -1
- package/studio-dist/client/assets/steps-DFsH3Neu.js +0 -1
- package/studio-dist/client/assets/vault-B2q1nBY5.js +0 -1
- package/studio-dist/client/assets/warnings-BSXIyuSQ.js +0 -1
- package/studio-dist/client/assets/workflow-DlsQD6Hc.js +0 -1
- package/studio-dist/server/assets/companions-BYbHWKOZ.js +0 -15
- package/studio-dist/server/assets/createServerFn-F5sAOF8V.js +0 -459
- package/studio-dist/server/assets/prepaint-DJfTQ_VH.js +0 -45
- package/studio-dist/server/assets/react-Ce6dj15C.js +0 -46
- package/studio-dist/server/assets/rolldown-runtime-DYf_mQCB.js +0 -34
- package/studio-dist/server/assets/specs-C8rv34-5.js +0 -211
- package/studio-dist/server/assets/studio-BeltxxKt.js +0 -216
- package/studio-dist/server/assets/workflow-liRYecHk.js +0 -73
|
@@ -1,211 +0,0 @@
|
|
|
1
|
-
import { i as __toESM } from "./rolldown-runtime-DYf_mQCB.js";
|
|
2
|
-
import "./studio-BeltxxKt.js";
|
|
3
|
-
import { t as CompanionView } from "./companion-view-DISASvdJ.js";
|
|
4
|
-
import { Ar as cn, Bi as Link, ct as StatusWord, fi as useQuery, nt as ListCard, qr as vaultQuery, r as Icon, rt as PAGE_PAD, st as ROW, tt as EmptyNote } from "./button-CIJqAhni.js";
|
|
5
|
-
import { n as findAction, t as SUBJECT_PATTERN } from "./actions-D8erOphH.js";
|
|
6
|
-
import { j as require_react, u as require_jsx_runtime } from "./__23tanstack-start-server-fn-resolver-M2GBs8s3.js";
|
|
7
|
-
import { n as PanelSection, r as SidePanel, t as PanelHead } from "./panel-3Jmn4awF.js";
|
|
8
|
-
import { t as MarkdownView } from "./markdown-view-Bn7xPdks.js";
|
|
9
|
-
import { t as Warnings } from "./warnings-DzR6fyZh.js";
|
|
10
|
-
import { i as Route } from "./router-C8MGqlAY.js";
|
|
11
|
-
// src/lib/spec-offers.ts
|
|
12
|
-
/** Spec offers as the view renders them: prompts rebuilt from core's action list. */
|
|
13
|
-
function specOffers(data) {
|
|
14
|
-
return (data.actions ?? []).flatMap(({ id, runAgents, copyAgents }) => {
|
|
15
|
-
const action = findAction(id);
|
|
16
|
-
return action ? [{
|
|
17
|
-
action,
|
|
18
|
-
runAgents,
|
|
19
|
-
copyAgents
|
|
20
|
-
}] : [];
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
// src/views/specs/spec-areas.ts
|
|
24
|
-
var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
|
|
25
|
-
var UNASSIGNED_AREA = "unassigned";
|
|
26
|
-
/** A spec binds one Area or several, so it appears under each of them. */
|
|
27
|
-
function groupSpecsByArea(specs) {
|
|
28
|
-
const groups = /* @__PURE__ */ new Map();
|
|
29
|
-
for (const spec of specs) {
|
|
30
|
-
const areas = spec.areas.length > 0 ? spec.areas : [UNASSIGNED_AREA];
|
|
31
|
-
for (const area of areas) {
|
|
32
|
-
const existing = groups.get(area);
|
|
33
|
-
if (existing) existing.push(spec);
|
|
34
|
-
else groups.set(area, [spec]);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
return [...groups.entries()].toSorted((left, right) => left[0].localeCompare(right[0]));
|
|
38
|
-
}
|
|
39
|
-
// src/views/specs/specs-view.tsx
|
|
40
|
-
var import_jsx_runtime = require_jsx_runtime();
|
|
41
|
-
var NO_ACTIONS = [];
|
|
42
|
-
var specPath = (capability) => `openspec/specs/${capability}/spec.md`;
|
|
43
|
-
function specStatus(spec) {
|
|
44
|
-
if (spec.valid === false) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StatusWord, {
|
|
45
|
-
marker: "issue",
|
|
46
|
-
children: `${spec.issueCount ?? 0} issues`
|
|
47
|
-
});
|
|
48
|
-
if (spec.valid === true) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StatusWord, {
|
|
49
|
-
marker: "done",
|
|
50
|
-
children: "valid"
|
|
51
|
-
});
|
|
52
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StatusWord, {
|
|
53
|
-
marker: "idle",
|
|
54
|
-
children: "unvalidated"
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
var ROOT_AREA = ".";
|
|
58
|
-
/** The repository-root Area reads as words; any other Area is its path. */
|
|
59
|
-
var areaLabel = (area) => area === ROOT_AREA ? "Repository root" : area;
|
|
60
|
-
function requirementsText(count) {
|
|
61
|
-
if (count === void 0) return "requirements unknown";
|
|
62
|
-
return `${count} ${count === 1 ? "requirement" : "requirements"}`;
|
|
63
|
-
}
|
|
64
|
-
/** Capabilities by Area; a spec opens wide in the panel. */
|
|
65
|
-
function Specs({ payload, actions = NO_ACTIONS, companion }) {
|
|
66
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Warnings, { warnings: payload.warnings }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SpecsByArea, {
|
|
67
|
-
specs: payload.specs,
|
|
68
|
-
actions,
|
|
69
|
-
companion
|
|
70
|
-
})] });
|
|
71
|
-
}
|
|
72
|
-
var ACTION_BUTTON = "inline-flex h-7 items-center gap-1.5 rounded-[6px] border border-rule bg-surface px-2.5 text-xs text-text hover:border-accent hover:bg-accent-soft";
|
|
73
|
-
function SpecActions({ capability, actions }) {
|
|
74
|
-
if (!SUBJECT_PATTERN.test(capability) || actions.length === 0) return null;
|
|
75
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
76
|
-
className: "spec-actions flex flex-wrap items-center gap-1.5",
|
|
77
|
-
children: actions.map(({ action, runAgents, copyAgents }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react.Fragment, { children: [runAgents.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
|
|
78
|
-
type: "button",
|
|
79
|
-
className: cn(ACTION_BUTTON, "spec-action"),
|
|
80
|
-
"data-studio-action": action.id,
|
|
81
|
-
"data-studio-subject": capability,
|
|
82
|
-
"data-studio-agents": runAgents.join(" "),
|
|
83
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, {
|
|
84
|
-
name: "play",
|
|
85
|
-
className: "size-3.5"
|
|
86
|
-
}), action.label]
|
|
87
|
-
}) : null, /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
|
|
88
|
-
type: "button",
|
|
89
|
-
className: cn(ACTION_BUTTON, "spec-copy"),
|
|
90
|
-
"aria-label": "Copy prompt",
|
|
91
|
-
"data-studio-copy-prompt": action.id,
|
|
92
|
-
"data-prompt-claude": copyAgents.includes("claude") ? action.prompts.claude(capability) : void 0,
|
|
93
|
-
"data-prompt-opencode": copyAgents.includes("opencode") ? action.prompts.opencode(capability) : void 0,
|
|
94
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, {
|
|
95
|
-
name: "copy",
|
|
96
|
-
className: "size-3.5"
|
|
97
|
-
}), "Copy prompt"]
|
|
98
|
-
})] }, action.id))
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
function SpecsByArea({ specs, actions, companion }) {
|
|
102
|
-
const groups = groupSpecsByArea(specs);
|
|
103
|
-
const [open, setOpen] = (0, import_react.useState)(null);
|
|
104
|
-
const order = [...new Set(groups.flatMap(([, areaSpecs]) => areaSpecs.map((spec) => spec.capability)))];
|
|
105
|
-
const current = specs.find((spec) => spec.capability === open) ?? null;
|
|
106
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", {
|
|
107
|
-
className: cn(PAGE_PAD, "grid content-start gap-3 pb-10"),
|
|
108
|
-
"aria-label": "Specs by Area",
|
|
109
|
-
children: [groups.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EmptyNote, { children: "No specs in this companion." }) : groups.map(([area, areaSpecs]) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ListCard, {
|
|
110
|
-
title: area === ROOT_AREA ? areaLabel(area) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
111
|
-
className: "font-mono",
|
|
112
|
-
children: area
|
|
113
|
-
}),
|
|
114
|
-
label: `Area ${area}`,
|
|
115
|
-
count: areaSpecs.length,
|
|
116
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("ul", {
|
|
117
|
-
className: "m-0 list-none p-0",
|
|
118
|
-
children: areaSpecs.map((spec) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
|
|
119
|
-
type: "button",
|
|
120
|
-
className: cn(ROW, "grid grid-cols-[minmax(0,1fr)_auto_120px] py-1.5 max-sm:grid-cols-[minmax(0,1fr)_auto]"),
|
|
121
|
-
"aria-current": open === spec.capability ? "true" : void 0,
|
|
122
|
-
"data-spec": spec.capability,
|
|
123
|
-
onClick: () => setOpen(spec.capability),
|
|
124
|
-
children: [
|
|
125
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
126
|
-
className: "truncate font-mono text-sm",
|
|
127
|
-
children: spec.capability
|
|
128
|
-
}),
|
|
129
|
-
spec.valid === true ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {}) : specStatus(spec),
|
|
130
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
131
|
-
className: "text-right text-xs text-muted tabular-nums max-sm:hidden",
|
|
132
|
-
children: requirementsText(spec.requirementCount)
|
|
133
|
-
})
|
|
134
|
-
]
|
|
135
|
-
}) }, spec.capability))
|
|
136
|
-
})
|
|
137
|
-
}, area)), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidePanel, {
|
|
138
|
-
items: order,
|
|
139
|
-
current: current?.capability ?? null,
|
|
140
|
-
onSelect: setOpen,
|
|
141
|
-
wide: true,
|
|
142
|
-
title: current ? `Spec ${current.capability}` : "Spec",
|
|
143
|
-
children: current ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SpecDetail, {
|
|
144
|
-
spec: current,
|
|
145
|
-
actions,
|
|
146
|
-
companion
|
|
147
|
-
}) : null
|
|
148
|
-
})]
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
|
-
function SpecDetail({ spec, actions, companion }) {
|
|
152
|
-
const path = specPath(spec.capability);
|
|
153
|
-
const file = useQuery({
|
|
154
|
-
...vaultQuery(companion ?? "", { path }),
|
|
155
|
-
enabled: Boolean(companion)
|
|
156
|
-
});
|
|
157
|
-
const markdown = file.data?.open?.markdown;
|
|
158
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PanelHead, {
|
|
159
|
-
mono: true,
|
|
160
|
-
title: spec.capability,
|
|
161
|
-
kicker: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [specStatus(spec), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
162
|
-
className: "ml-auto",
|
|
163
|
-
children: spec.areas.map(areaLabel).join(", ")
|
|
164
|
-
})] }),
|
|
165
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
166
|
-
className: "flex flex-wrap items-center gap-2",
|
|
167
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SpecActions, {
|
|
168
|
-
capability: spec.capability,
|
|
169
|
-
actions
|
|
170
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Link, {
|
|
171
|
-
className: "inline-flex items-center gap-1.5 text-sm",
|
|
172
|
-
to: "/vault",
|
|
173
|
-
search: (previous) => ({
|
|
174
|
-
...previous,
|
|
175
|
-
path
|
|
176
|
-
}),
|
|
177
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, {
|
|
178
|
-
name: "external",
|
|
179
|
-
className: "size-3.5"
|
|
180
|
-
}), " Open in Vault"]
|
|
181
|
-
})]
|
|
182
|
-
})
|
|
183
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PanelSection, {
|
|
184
|
-
title: "Spec",
|
|
185
|
-
aside: spec.requirementCount === void 0 ? void 0 : requirementsText(spec.requirementCount),
|
|
186
|
-
children: markdown ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
187
|
-
className: "prose-panel",
|
|
188
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MarkdownView, { nodes: markdown })
|
|
189
|
-
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
190
|
-
className: "m-0 text-sm text-muted",
|
|
191
|
-
children: file.isError ? "The spec file could not be read." : file.isPending && companion ? "Loading…" : "The spec file could not be read."
|
|
192
|
-
})
|
|
193
|
-
})] });
|
|
194
|
-
}
|
|
195
|
-
// src/routes/specs.tsx?tsr-split=component
|
|
196
|
-
var SplitComponent = function SpecsRoute() {
|
|
197
|
-
const search = Route.useSearch();
|
|
198
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CompanionView, {
|
|
199
|
-
view: "specs",
|
|
200
|
-
search,
|
|
201
|
-
children: (data) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Specs, {
|
|
202
|
-
payload: {
|
|
203
|
-
specs: data.specs ?? [],
|
|
204
|
-
warnings: data.warnings
|
|
205
|
-
},
|
|
206
|
-
actions: specOffers(data),
|
|
207
|
-
companion: search.companion
|
|
208
|
-
})
|
|
209
|
-
});
|
|
210
|
-
};
|
|
211
|
-
export { SplitComponent as component };
|
|
@@ -1,216 +0,0 @@
|
|
|
1
|
-
import { createHash } from "node:crypto";
|
|
2
|
-
// ../mate-core/src/cli/commands/studio/selection.ts
|
|
3
|
-
var STUDIO_MODES = ["engineering", "analysis"];
|
|
4
|
-
/** Views only the mode is offered, in navigation order. */
|
|
5
|
-
var MODE_VIEWS = {
|
|
6
|
-
engineering: [
|
|
7
|
-
"dashboard",
|
|
8
|
-
"factory",
|
|
9
|
-
"workflow",
|
|
10
|
-
"skills"
|
|
11
|
-
],
|
|
12
|
-
analysis: ["dashboard"]
|
|
13
|
-
};
|
|
14
|
-
/** Views every mode is offered, in navigation order. */
|
|
15
|
-
var SHARED_VIEWS = [
|
|
16
|
-
"vault",
|
|
17
|
-
"specs",
|
|
18
|
-
"reports"
|
|
19
|
-
];
|
|
20
|
-
function viewsFor(mode) {
|
|
21
|
-
return [...MODE_VIEWS[mode], ...SHARED_VIEWS];
|
|
22
|
-
}
|
|
23
|
-
var POLICIES = {
|
|
24
|
-
standard: Object.freeze({
|
|
25
|
-
profile: "standard",
|
|
26
|
-
enabled: Object.freeze(["engineering", "analysis"]),
|
|
27
|
-
defaultMode: "engineering"
|
|
28
|
-
}),
|
|
29
|
-
appliance: Object.freeze({
|
|
30
|
-
profile: "appliance",
|
|
31
|
-
enabled: Object.freeze(["analysis"]),
|
|
32
|
-
defaultMode: "analysis"
|
|
33
|
-
})
|
|
34
|
-
};
|
|
35
|
-
function modePolicy(profile = "standard") {
|
|
36
|
-
return POLICIES[profile];
|
|
37
|
-
}
|
|
38
|
-
modePolicy("standard");
|
|
39
|
-
/** Old bookmarks' `role` values; read as input only, never written. */
|
|
40
|
-
var LEGACY_ROLE_MODES = {
|
|
41
|
-
"product-engineer": "engineering",
|
|
42
|
-
"business-analyst": "analysis"
|
|
43
|
-
};
|
|
44
|
-
var COMPANION_PARAM = "companion";
|
|
45
|
-
var STUDIO_MODE_PARAM = "studioMode";
|
|
46
|
-
/** Input-only alias of `studioMode`. */
|
|
47
|
-
var LEGACY_ROLE_PARAM = "role";
|
|
48
|
-
var VIEW_PARAM = "view";
|
|
49
|
-
/** Filled into a prompt when no change is named, so a prompt is never half-written. */
|
|
50
|
-
var CHANGE_PLACEHOLDER = "<change-name>";
|
|
51
|
-
/** Filled into pre-explore prompts, which run before any change exists. */
|
|
52
|
-
var IDEA_PLACEHOLDER = "<idea>";
|
|
53
|
-
var DIGEST_LENGTH = 10;
|
|
54
|
-
/**
|
|
55
|
-
* Derived from the companion path alone: stable enough to bookmark, and short
|
|
56
|
-
* enough that no absolute Companion Repository path is written into browser
|
|
57
|
-
* history, autocomplete, or a shared URL.
|
|
58
|
-
*/
|
|
59
|
-
/** The shape a digest must have to be trusted from outside the server: a URL, a browser store. */
|
|
60
|
-
var COMPANION_DIGEST_PATTERN = new RegExp(`^[0-9a-f]{${DIGEST_LENGTH}}$`);
|
|
61
|
-
function companionDigest(companionPath) {
|
|
62
|
-
return createHash("sha256").update(companionPath).digest("hex").slice(0, DIGEST_LENGTH);
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* The mode a request asks for, before the policy: a present `studioMode` wins, even an
|
|
66
|
-
* unknown one (which asks for none); a known legacy `role` is read only without it.
|
|
67
|
-
*/
|
|
68
|
-
function requestedMode(params) {
|
|
69
|
-
const canonical = params.get(STUDIO_MODE_PARAM);
|
|
70
|
-
if (canonical !== null) return STUDIO_MODES.includes(canonical) ? canonical : null;
|
|
71
|
-
const legacy = params.get("role") ?? "";
|
|
72
|
-
return Object.hasOwn(LEGACY_ROLE_MODES, legacy) ? LEGACY_ROLE_MODES[legacy] : null;
|
|
73
|
-
}
|
|
74
|
-
// ../mate-core/src/lib/delivery/stages.ts
|
|
75
|
-
/** Artifact sets of the schemas Mate ships, in dependency order. */
|
|
76
|
-
var SCHEMA_ARTIFACTS = {
|
|
77
|
-
"mate-v1": [
|
|
78
|
-
"proposal",
|
|
79
|
-
"specs",
|
|
80
|
-
"design",
|
|
81
|
-
"tasks"
|
|
82
|
-
],
|
|
83
|
-
"mate-minimal": ["specs", "tasks"]
|
|
84
|
-
};
|
|
85
|
-
/** The schema every companion is set to. */
|
|
86
|
-
var DEFAULT_SCHEMA = "mate-v1";
|
|
87
|
-
function isMateSchema(schema) {
|
|
88
|
-
return Object.hasOwn(SCHEMA_ARTIFACTS, schema);
|
|
89
|
-
}
|
|
90
|
-
function skillStage(id, label, skill, optional = false) {
|
|
91
|
-
return {
|
|
92
|
-
id,
|
|
93
|
-
label,
|
|
94
|
-
kind: "skill",
|
|
95
|
-
skill,
|
|
96
|
-
optional
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
var BEFORE_REVIEWS = [
|
|
100
|
-
skillStage("clarify-intent", "Clarify intent", "mate-clarify-intent", true),
|
|
101
|
-
skillStage("explore", "Explore change", "mate-explore-change"),
|
|
102
|
-
skillStage("propose", "Propose change", "mate-propose-change")
|
|
103
|
-
];
|
|
104
|
-
var AFTER_REVIEWS = [
|
|
105
|
-
skillStage("apply", "Apply change", "mate-apply-change"),
|
|
106
|
-
skillStage("inspect-outcome", "Inspect outcome", "mate-show-me", true),
|
|
107
|
-
skillStage("refine-code", "Refine code", "mate-simplify-code", true),
|
|
108
|
-
skillStage("archive", "Archive change", "mate-archive-change"),
|
|
109
|
-
skillStage("publish", "Publish companion artifacts", "mate-publish-artifact")
|
|
110
|
-
];
|
|
111
|
-
[...BEFORE_REVIEWS, ...AFTER_REVIEWS].map((stage) => stage.skill);
|
|
112
|
-
function reviewStage(artifact) {
|
|
113
|
-
return {
|
|
114
|
-
id: `review-${artifact}`,
|
|
115
|
-
label: `Review ${artifact}`,
|
|
116
|
-
kind: "human",
|
|
117
|
-
skill: null,
|
|
118
|
-
artifact,
|
|
119
|
-
optional: false
|
|
120
|
-
};
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* The Delivery Path for one schema. `artifacts` are its artifact ids in dependency order;
|
|
124
|
-
* `undefined` means the schema could not be read, which yields the skill stages alone with
|
|
125
|
-
* `reviewsKnown: false` rather than a guessed review set.
|
|
126
|
-
*/
|
|
127
|
-
function deliveryPath(artifacts) {
|
|
128
|
-
return {
|
|
129
|
-
stages: [
|
|
130
|
-
...BEFORE_REVIEWS,
|
|
131
|
-
...(artifacts ?? []).map(reviewStage),
|
|
132
|
-
...AFTER_REVIEWS
|
|
133
|
-
],
|
|
134
|
-
reviewsKnown: artifacts !== void 0
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
// ../mate-core/src/lib/workset/stage.ts
|
|
138
|
-
/** Delivery Path order; a Workset sits at the earliest stage among its changes. */
|
|
139
|
-
var WORKSET_STAGE_ORDER = [
|
|
140
|
-
"clarify-intent",
|
|
141
|
-
"explore",
|
|
142
|
-
"propose",
|
|
143
|
-
"human-review",
|
|
144
|
-
"apply",
|
|
145
|
-
"merge-wait",
|
|
146
|
-
"publish",
|
|
147
|
-
"done"
|
|
148
|
-
];
|
|
149
|
-
new Map(deliveryPath([]).stages.map((stage) => [stage.id, stage.label]));
|
|
150
|
-
// ../mate-core/src/brand/palette.ts
|
|
151
|
-
/** The five colours of the Mate identity, as defined in `assets/logo-kit/BRAND.md`. */
|
|
152
|
-
var BRAND_COLORS = {
|
|
153
|
-
ink: {
|
|
154
|
-
hex: "#1F2421",
|
|
155
|
-
ansi256: 235
|
|
156
|
-
},
|
|
157
|
-
mateGreen: {
|
|
158
|
-
hex: "#2E7D5B",
|
|
159
|
-
ansi256: 29
|
|
160
|
-
},
|
|
161
|
-
cream: {
|
|
162
|
-
hex: "#F4F0E8",
|
|
163
|
-
ansi256: 255
|
|
164
|
-
},
|
|
165
|
-
lightGreen: {
|
|
166
|
-
hex: "#7FD0A6",
|
|
167
|
-
ansi256: 115
|
|
168
|
-
},
|
|
169
|
-
night: {
|
|
170
|
-
hex: "#15191A",
|
|
171
|
-
ansi256: 234
|
|
172
|
-
}
|
|
173
|
-
};
|
|
174
|
-
BRAND_COLORS.mateGreen.hex;
|
|
175
|
-
// ../mate-core/src/brand/terminal.ts
|
|
176
|
-
function hexToRgb(hex) {
|
|
177
|
-
const value = Number.parseInt(hex.slice(1), 16);
|
|
178
|
-
return `${value >> 16 & 255};${value >> 8 & 255};${value & 255}`;
|
|
179
|
-
}
|
|
180
|
-
`${hexToRgb(BRAND_COLORS.mateGreen.hex)}`;
|
|
181
|
-
// ../mate-core/src/cli/commands/report/palette.ts
|
|
182
|
-
var { ink, mateGreen, cream, lightGreen, night } = BRAND_COLORS;
|
|
183
|
-
var LIGHT_PALETTE = {
|
|
184
|
-
ink: ink.hex,
|
|
185
|
-
bg: "#FFFFFF",
|
|
186
|
-
muted: "#59625E",
|
|
187
|
-
rule: "#E2DED5",
|
|
188
|
-
accent: mateGreen.hex,
|
|
189
|
-
surface: "#F7F5F0",
|
|
190
|
-
ok: mateGreen.hex,
|
|
191
|
-
warn: "#8A5A00",
|
|
192
|
-
error: "#B3261E",
|
|
193
|
-
info: "#2F5F9E",
|
|
194
|
-
neutral: "#66706B",
|
|
195
|
-
addBg: "#E4F3EA",
|
|
196
|
-
delBg: "#FBE8E6",
|
|
197
|
-
hunkBg: "#F1EEE7"
|
|
198
|
-
};
|
|
199
|
-
var DARK_PALETTE = {
|
|
200
|
-
ink: cream.hex,
|
|
201
|
-
bg: night.hex,
|
|
202
|
-
muted: "#A5AEA9",
|
|
203
|
-
rule: "#2D3433",
|
|
204
|
-
accent: lightGreen.hex,
|
|
205
|
-
surface: "#1C2223",
|
|
206
|
-
ok: lightGreen.hex,
|
|
207
|
-
warn: "#E3B45C",
|
|
208
|
-
error: "#F28B82",
|
|
209
|
-
info: "#8DB8F0",
|
|
210
|
-
neutral: "#A5AEA9",
|
|
211
|
-
addBg: "#16382A",
|
|
212
|
-
delBg: "#46211E",
|
|
213
|
-
hunkBg: "#232A2B"
|
|
214
|
-
};
|
|
215
|
-
({ ...LIGHT_PALETTE });
|
|
216
|
-
export { VIEW_PARAM as _, SCHEMA_ARTIFACTS as a, viewsFor as b, CHANGE_PLACEHOLDER as c, IDEA_PLACEHOLDER as d, LEGACY_ROLE_PARAM as f, STUDIO_MODE_PARAM as g, STUDIO_MODES as h, DEFAULT_SCHEMA as i, COMPANION_DIGEST_PATTERN as l, SHARED_VIEWS as m, LIGHT_PALETTE as n, deliveryPath as o, MODE_VIEWS as p, WORKSET_STAGE_ORDER as r, isMateSchema as s, DARK_PALETTE as t, COMPANION_PARAM as u, companionDigest as v, requestedMode as y };
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { fi as useQuery, zr as companionViewQuery } from "./button-CIJqAhni.js";
|
|
2
|
-
import { E as changeStep, b as useBrowser, n as Route } from "./router-C8MGqlAY.js";
|
|
3
|
-
import { t as CompanionView } from "./companion-view-DISASvdJ.js";
|
|
4
|
-
import { t as Warnings } from "./warnings-DzR6fyZh.js";
|
|
5
|
-
import { t as DeliveryPathView } from "./delivery-path-C29fBynY.js";
|
|
6
|
-
import { u as require_jsx_runtime } from "./__23tanstack-start-server-fn-resolver-M2GBs8s3.js";
|
|
7
|
-
// src/views/workflow/workflow-view.tsx
|
|
8
|
-
var import_jsx_runtime = require_jsx_runtime();
|
|
9
|
-
/** Graph node per change stage, in path order; matches the stage the Overview panel names. */
|
|
10
|
-
var STAGE_NODES = [
|
|
11
|
-
{
|
|
12
|
-
node: "propose",
|
|
13
|
-
label: "Propose change"
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
node: "reviews",
|
|
17
|
-
label: "Human review"
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
node: "apply",
|
|
21
|
-
label: "Apply change"
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
node: "archive",
|
|
25
|
-
label: "Archive change"
|
|
26
|
-
}
|
|
27
|
-
];
|
|
28
|
-
function stagesOf(changes) {
|
|
29
|
-
const byStage = STAGE_NODES.map((stage) => ({
|
|
30
|
-
...stage,
|
|
31
|
-
changes: changes.flatMap((change) => changeStep(change).stage === stage.label ? [change.name] : [])
|
|
32
|
-
}));
|
|
33
|
-
const counts = {};
|
|
34
|
-
for (const stage of byStage) if (stage.changes.length > 0) counts[stage.node] = stage.changes.length;
|
|
35
|
-
return {
|
|
36
|
-
counts,
|
|
37
|
-
byStage
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
var NO_CHANGES = [];
|
|
41
|
-
function Workflow({ payload, changes = NO_CHANGES }) {
|
|
42
|
-
const { counts, byStage } = stagesOf(changes);
|
|
43
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Warnings, { warnings: payload.warnings }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
44
|
-
className: "workflow-view",
|
|
45
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DeliveryPathView, {
|
|
46
|
-
payload,
|
|
47
|
-
counts,
|
|
48
|
-
changesByStage: byStage
|
|
49
|
-
})
|
|
50
|
-
})] });
|
|
51
|
-
}
|
|
52
|
-
// src/routes/workflow.tsx?tsr-split=component
|
|
53
|
-
var SplitComponent = function WorkflowRoute() {
|
|
54
|
-
const search = Route.useSearch();
|
|
55
|
-
const browser = useBrowser();
|
|
56
|
-
const overview = useQuery({
|
|
57
|
-
...companionViewQuery("dashboard", search),
|
|
58
|
-
enabled: browser
|
|
59
|
-
});
|
|
60
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CompanionView, {
|
|
61
|
-
view: "workflow",
|
|
62
|
-
search,
|
|
63
|
-
children: (data) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Workflow, {
|
|
64
|
-
payload: {
|
|
65
|
-
skills: data.skills ?? [],
|
|
66
|
-
topology: data.topology ?? null,
|
|
67
|
-
warnings: data.warnings
|
|
68
|
-
},
|
|
69
|
-
changes: overview.data?.changes ?? []
|
|
70
|
-
})
|
|
71
|
-
});
|
|
72
|
-
};
|
|
73
|
-
export { SplitComponent as component };
|