@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,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { t as
|
|
7
|
-
import { t as
|
|
8
|
-
import {
|
|
1
|
+
import { t as CompanionView } from "./companion-view-BKVXD3TO.js";
|
|
2
|
+
import { ft as Link, pt as useNavigate } from "./studio-queries-BtRGzDdh.js";
|
|
3
|
+
import { n as require_react, o as __toESM, t as require_jsx_runtime } from "./jsx-runtime-Bt0s0YKS.js";
|
|
4
|
+
import { Tr as cn, r as Icon, t as Button } from "./button-CgOIVdmD.js";
|
|
5
|
+
import { a as Count, c as PAGE_PAD, d as Progress, f as ROW, i as CommandLine, o as EmptyNote, p as StatusWord, r as Age, s as ListCard, u as Pills } from "./store-Cs17okNG.js";
|
|
6
|
+
import { n as PanelSection, r as SidePanel, t as PanelHead } from "./panel-BR_t9iMM.js";
|
|
7
|
+
import { t as Warnings } from "./warnings-CDy9pdgL.js";
|
|
8
|
+
import { i as PathSteps, n as ArtifactReader, r as Artifacts } from "./artifacts-DnF9L3dZ.js";
|
|
9
|
+
import { F as GROUP_TITLES, I as changeGroup, L as changeProgress, P as CHANGE_GROUPS, R as changeStep, f as Route, z as groupChanges } from "./router-DkRHNTpE.js";
|
|
9
10
|
// src/views/overview/changed-specs.ts
|
|
10
11
|
var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
|
|
11
12
|
/** Each capability once, at the newest shipped change that touched it. */
|
|
@@ -215,146 +216,10 @@ function ChangedSpecs({ shipped }) {
|
|
|
215
216
|
})
|
|
216
217
|
});
|
|
217
218
|
}
|
|
218
|
-
// src/views/overview/artifacts.tsx
|
|
219
|
-
var CHANGES_DIR = "openspec/changes";
|
|
220
|
-
var changeDir = (change) => `${CHANGES_DIR}/${change.name}`;
|
|
221
|
-
var ITEM = "flex w-full min-w-0 items-center gap-2.5 rounded-control border-0 bg-transparent px-2 py-1 text-left text-sm text-text hover:bg-surface-soft disabled:cursor-default disabled:hover:bg-transparent";
|
|
222
|
-
function Check({ done }) {
|
|
223
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
224
|
-
className: cn("grid size-3.5 flex-none place-items-center rounded-[4px] border", done ? "border-accent bg-accent text-on-accent" : "border-rule bg-page"),
|
|
225
|
-
"aria-hidden": "true",
|
|
226
|
-
children: done ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, {
|
|
227
|
-
name: "check",
|
|
228
|
-
className: "size-2.5 [stroke-width:2.4]"
|
|
229
|
-
}) : null
|
|
230
|
-
});
|
|
231
|
-
}
|
|
232
|
-
/** The change's spec deltas, one file per capability folder. */
|
|
233
|
-
function SpecFiles({ companion, dir, onRead }) {
|
|
234
|
-
const folders = useQuery(vaultChildrenQuery(companion, `${dir}/specs`));
|
|
235
|
-
if (folders.isPending) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
236
|
-
className: "m-0 pl-8 text-xs text-muted",
|
|
237
|
-
children: "Listing specs…"
|
|
238
|
-
});
|
|
239
|
-
const specs = (folders.data?.entries ?? []).filter((entry) => entry.kind === "directory");
|
|
240
|
-
if (folders.isError || specs.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
241
|
-
className: "m-0 pl-8 text-xs text-muted",
|
|
242
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, {
|
|
243
|
-
to: "/vault",
|
|
244
|
-
search: (previous) => ({
|
|
245
|
-
...previous,
|
|
246
|
-
dir: `${dir}/specs`
|
|
247
|
-
}),
|
|
248
|
-
children: "Open the specs folder"
|
|
249
|
-
})
|
|
250
|
-
});
|
|
251
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("ul", {
|
|
252
|
-
className: "m-0 grid list-none gap-0.5 p-0 pl-6",
|
|
253
|
-
children: specs.map((entry) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
|
|
254
|
-
type: "button",
|
|
255
|
-
className: ITEM,
|
|
256
|
-
"data-artifact-file": `${entry.path}/spec.md`,
|
|
257
|
-
onClick: () => onRead(`${entry.path}/spec.md`),
|
|
258
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, {
|
|
259
|
-
name: "doc",
|
|
260
|
-
className: "flex-none text-muted"
|
|
261
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
262
|
-
className: "truncate font-mono text-xs",
|
|
263
|
-
children: entry.name
|
|
264
|
-
})]
|
|
265
|
-
}) }, entry.path))
|
|
266
|
-
});
|
|
267
|
-
}
|
|
268
|
-
/** The artifacts the Delivery Path writes, in its order; a written one opens to read. */
|
|
269
|
-
function Artifacts({ change, companion, onRead }) {
|
|
270
|
-
if (change.artifacts.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
271
|
-
className: "m-0 text-sm text-muted",
|
|
272
|
-
children: "No artifacts yet."
|
|
273
|
-
});
|
|
274
|
-
const dir = changeDir(change);
|
|
275
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("ul", {
|
|
276
|
-
className: "m-0 -mx-2 grid list-none gap-0.5 p-0",
|
|
277
|
-
children: change.artifacts.map((artifact) => {
|
|
278
|
-
const done = artifact.status === "done";
|
|
279
|
-
const readable = done && companion !== void 0;
|
|
280
|
-
const folder = artifact.id === "specs";
|
|
281
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("li", { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
|
|
282
|
-
type: "button",
|
|
283
|
-
className: ITEM,
|
|
284
|
-
disabled: !readable || folder,
|
|
285
|
-
"data-artifact": artifact.id,
|
|
286
|
-
onClick: () => onRead(`${dir}/${artifact.id}.md`),
|
|
287
|
-
children: [
|
|
288
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Check, { done }),
|
|
289
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
290
|
-
className: done ? "text-text" : "text-muted",
|
|
291
|
-
children: artifact.id
|
|
292
|
-
}),
|
|
293
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
294
|
-
className: "ml-auto text-xs text-muted",
|
|
295
|
-
children: !done ? "not yet" : folder ? "per capability" : "read"
|
|
296
|
-
}),
|
|
297
|
-
readable && !folder ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, {
|
|
298
|
-
name: "right",
|
|
299
|
-
className: "text-muted"
|
|
300
|
-
}) : null
|
|
301
|
-
]
|
|
302
|
-
}), readable && folder ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SpecFiles, {
|
|
303
|
-
companion,
|
|
304
|
-
dir,
|
|
305
|
-
onRead
|
|
306
|
-
}) : null] }, artifact.id);
|
|
307
|
-
})
|
|
308
|
-
});
|
|
309
|
-
}
|
|
310
|
-
/** One artifact read in the panel, so a review needs no trip to the Vault. */
|
|
311
|
-
function ArtifactReader({ companion, path, change, onBack }) {
|
|
312
|
-
const file = useQuery(vaultQuery(companion, { path }));
|
|
313
|
-
const markdown = file.data?.open?.markdown;
|
|
314
|
-
const name = path.slice(changeDir(change).length + 1);
|
|
315
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", {
|
|
316
|
-
className: "grid content-start gap-3 px-5 py-4",
|
|
317
|
-
"aria-label": `Artifact ${name}`,
|
|
318
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
319
|
-
className: "flex items-center gap-2",
|
|
320
|
-
children: [
|
|
321
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Button, {
|
|
322
|
-
size: "sm",
|
|
323
|
-
variant: "ghost",
|
|
324
|
-
className: "-ml-2",
|
|
325
|
-
onClick: onBack,
|
|
326
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, { name: "left" }), " Artifacts"]
|
|
327
|
-
}),
|
|
328
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("code", {
|
|
329
|
-
className: "min-w-0 truncate font-mono text-xs text-muted",
|
|
330
|
-
children: name
|
|
331
|
-
}),
|
|
332
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Link, {
|
|
333
|
-
className: "ml-auto inline-flex flex-none items-center gap-1.5 text-xs",
|
|
334
|
-
to: "/vault",
|
|
335
|
-
search: (previous) => ({
|
|
336
|
-
...previous,
|
|
337
|
-
path
|
|
338
|
-
}),
|
|
339
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, {
|
|
340
|
-
name: "external",
|
|
341
|
-
className: "size-3.5"
|
|
342
|
-
}), " Open in Vault"]
|
|
343
|
-
})
|
|
344
|
-
]
|
|
345
|
-
}), markdown ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
346
|
-
className: "prose-panel",
|
|
347
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MarkdownView, { nodes: markdown })
|
|
348
|
-
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
349
|
-
className: "m-0 text-sm text-muted",
|
|
350
|
-
children: file.isPending ? "Loading…" : "The file could not be read."
|
|
351
|
-
})]
|
|
352
|
-
});
|
|
353
|
-
}
|
|
354
219
|
// src/views/overview/changes.tsx
|
|
355
220
|
var GROUP_HINTS = {
|
|
356
221
|
"needs-you": "Review or fix before the build goes on",
|
|
357
|
-
building: "
|
|
222
|
+
building: "Some tasks are done; others remain",
|
|
358
223
|
ready: "Every task is done"
|
|
359
224
|
};
|
|
360
225
|
/** A change's status word and marker shape. */
|
|
@@ -373,7 +238,7 @@ function status(change) {
|
|
|
373
238
|
};
|
|
374
239
|
if (group === "building") return {
|
|
375
240
|
marker: "build",
|
|
376
|
-
word:
|
|
241
|
+
word: GROUP_TITLES.building
|
|
377
242
|
};
|
|
378
243
|
return {
|
|
379
244
|
marker: "done",
|
|
@@ -386,21 +251,9 @@ var PATH_STAGES = [
|
|
|
386
251
|
"Apply change",
|
|
387
252
|
"Archive change"
|
|
388
253
|
];
|
|
389
|
-
/** Where the change is on the Delivery Path, as four steps. */
|
|
390
|
-
function PathSteps({ stage }) {
|
|
391
|
-
const at = PATH_STAGES.indexOf(stage);
|
|
392
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("ol", {
|
|
393
|
-
className: "m-0 grid list-none grid-cols-4 gap-1 p-0",
|
|
394
|
-
"aria-label": "Delivery Path",
|
|
395
|
-
children: PATH_STAGES.map((name, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("li", {
|
|
396
|
-
"aria-current": index === at ? "step" : void 0,
|
|
397
|
-
className: cn("grid gap-1.5 text-2xs text-muted before:h-1 before:rounded-full before:bg-rule before:content-['']", index < at && "before:bg-[color-mix(in_srgb,var(--accent)_55%,var(--border))]", index === at && "font-semibold text-text before:bg-accent", index === at && name === "Human review" && "before:bg-why"),
|
|
398
|
-
children: name
|
|
399
|
-
}, name))
|
|
400
|
-
});
|
|
401
|
-
}
|
|
402
254
|
function ChangeDetail({ change, companion, reading, onRead }) {
|
|
403
255
|
const step = changeStep(change);
|
|
256
|
+
const progress = changeProgress(change);
|
|
404
257
|
const { marker, word } = status(change);
|
|
405
258
|
const artifacts = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PanelSection, {
|
|
406
259
|
title: "Artifacts",
|
|
@@ -436,7 +289,11 @@ function ChangeDetail({ change, companion, reading, onRead }) {
|
|
|
436
289
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PanelSection, {
|
|
437
290
|
title: "Delivery Path",
|
|
438
291
|
aside: step.stage,
|
|
439
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PathSteps, {
|
|
292
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PathSteps, {
|
|
293
|
+
steps: PATH_STAGES,
|
|
294
|
+
current: PATH_STAGES.indexOf(step.stage),
|
|
295
|
+
tone: step.stage === "Human review" ? "why" : "accent"
|
|
296
|
+
})
|
|
440
297
|
}),
|
|
441
298
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(PanelSection, {
|
|
442
299
|
title: "Next step",
|
|
@@ -446,12 +303,9 @@ function ChangeDetail({ change, companion, reading, onRead }) {
|
|
|
446
303
|
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CommandLine, { text: step.prompt })]
|
|
447
304
|
}),
|
|
448
305
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PanelSection, {
|
|
449
|
-
title: "Tasks",
|
|
450
|
-
aside: `${
|
|
451
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Progress, {
|
|
452
|
-
done: change.completedTasks ?? 0,
|
|
453
|
-
total: change.totalTasks ?? 0
|
|
454
|
-
})
|
|
306
|
+
title: progress.unit === "tasks" ? "Tasks" : "Plan",
|
|
307
|
+
aside: `${progress.done}/${progress.total}`,
|
|
308
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Progress, { ...progress })
|
|
455
309
|
}),
|
|
456
310
|
review ? null : artifacts
|
|
457
311
|
] })] });
|
|
@@ -461,7 +315,7 @@ function ChangeRow({ change, current, onOpen }) {
|
|
|
461
315
|
const step = changeStep(change);
|
|
462
316
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
|
|
463
317
|
type: "button",
|
|
464
|
-
className: cn(ROW, "grid grid-cols-[minmax(0,1fr)
|
|
318
|
+
className: cn(ROW, "grid grid-cols-[minmax(0,1fr)_max-content_150px_72px] @max-[640px]:grid-cols-[minmax(0,1fr)_auto]"),
|
|
465
319
|
"aria-current": current ? "true" : void 0,
|
|
466
320
|
"data-change": change.name,
|
|
467
321
|
onClick: onOpen,
|
|
@@ -482,10 +336,7 @@ function ChangeRow({ change, current, onOpen }) {
|
|
|
482
336
|
}),
|
|
483
337
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
484
338
|
className: "@max-[640px]:hidden",
|
|
485
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Progress, {
|
|
486
|
-
done: change.completedTasks ?? 0,
|
|
487
|
-
total: change.totalTasks ?? 0
|
|
488
|
-
})
|
|
339
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Progress, { ...changeProgress(change) })
|
|
489
340
|
}),
|
|
490
341
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Age, {
|
|
491
342
|
at: change.lastModified,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as STUDIO_MODE_PARAM, b as requestedMode, d as COMPANION_PARAM, p as LEGACY_ROLE_PARAM, u as COMPANION_DIGEST_PATTERN, x as viewsFor } from "./studio-CAcKp3bM.js";
|
|
2
2
|
// src/lib/search.ts
|
|
3
3
|
/**
|
|
4
4
|
* Forgiving like the server's own parsing: an unknown value selects nothing rather than failing.
|
|
@@ -12,8 +12,27 @@ function validateStudioSearch(raw) {
|
|
|
12
12
|
if (typeof raw.role === "string") params.set(LEGACY_ROLE_PARAM, raw.role);
|
|
13
13
|
const mode = requestedMode(params);
|
|
14
14
|
if (mode) search.studioMode = mode;
|
|
15
|
+
const days = Number(raw.usageDays);
|
|
16
|
+
if (/^\d+$/.test(String(raw.usageDays)) && Number.isInteger(days) && days >= 1 && days <= 365) search.usageDays = days;
|
|
17
|
+
if (typeof raw.usageRepository === "string" && /^[a-zA-Z0-9_-]{1,64}$/.test(raw.usageRepository)) search.usageRepository = raw.usageRepository;
|
|
15
18
|
return search;
|
|
16
19
|
}
|
|
20
|
+
/** The router JSON-parses search values, so `?q=2026` arrives as a number; read it as typed. */
|
|
21
|
+
function searchText(value) {
|
|
22
|
+
if (typeof value !== "string" && typeof value !== "number" && typeof value !== "boolean") return;
|
|
23
|
+
return String(value).trim() || void 0;
|
|
24
|
+
}
|
|
25
|
+
/** Values naming nothing in the companion's specs are dropped by the view, not here. */
|
|
26
|
+
function validateSpecsSearch(raw) {
|
|
27
|
+
const q = searchText(raw.q);
|
|
28
|
+
const repo = searchText(raw.repo);
|
|
29
|
+
const area = searchText(raw.area);
|
|
30
|
+
return {
|
|
31
|
+
...q ? { q } : {},
|
|
32
|
+
...repo ? { repo } : {},
|
|
33
|
+
...area ? { area } : {}
|
|
34
|
+
};
|
|
35
|
+
}
|
|
17
36
|
/**
|
|
18
37
|
* The address to replace this one with so it names the effective mode and no legacy `role`,
|
|
19
38
|
* or `null` when it already does. A view the mode is not offered lands on the Overview.
|
|
@@ -33,4 +52,4 @@ function canonicalHref(pathname, searchStr, view, studioMode) {
|
|
|
33
52
|
params.set(STUDIO_MODE_PARAM, studioMode);
|
|
34
53
|
return `${pathname}?${params}`;
|
|
35
54
|
}
|
|
36
|
-
export {
|
|
55
|
+
export { validateSpecsSearch as n, validateStudioSearch as r, canonicalHref as t };
|