@uniqbit/mate-core 0.18.5 → 0.20.0
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/marketplace.json +14 -0
- package/claude-capability-plugins/companion-mentions/.claude-plugin/plugin.json +8 -0
- package/claude-capability-plugins/companion-mentions/hooks/companion.ts +457 -0
- package/claude-capability-plugins/companion-mentions/hooks/hooks.json +1 -0
- package/claude-capability-plugins/companion-mentions/hooks/register.ts +403 -0
- package/claude-plugin/hooks/companion-instructions.mjs +9 -0
- package/claude-plugin/hooks/hooks.json +41 -2
- package/claude-plugin/hooks/session-attention.mjs +10 -0
- package/claude-plugin/hooks/session-end.mjs +9 -0
- package/claude-plugin/hooks/session-guidance.mjs +1 -1
- package/claude-plugin/hooks/tokensave-route.mjs +52 -0
- package/opencode-plugin/src/server.ts +17 -2
- package/opencode-plugin/src/tui.tsx +3 -1
- package/opencode-plugin/tui.tsx +4 -1
- package/package.json +52 -15
- package/src/brand/art.generated.ts +69 -0
- package/src/brand/index.ts +12 -0
- package/src/brand/palette.ts +19 -0
- package/src/brand/svg.generated.ts +8 -0
- package/src/brand/terminal.ts +88 -0
- package/src/brand/types.ts +33 -0
- package/src/cli/commands/artifact/apply-context.ts +275 -0
- package/src/cli/commands/artifact/artifact.ts +12 -0
- package/src/cli/commands/artifact/delivery/archive.ts +125 -0
- package/src/cli/commands/artifact/delivery/branch-flags.ts +55 -0
- package/src/cli/commands/artifact/delivery/environment.ts +127 -0
- package/src/cli/commands/artifact/delivery/link.ts +191 -0
- package/src/cli/commands/artifact/delivery/output.ts +97 -0
- package/src/cli/commands/artifact/finish/command.ts +83 -8
- package/src/cli/commands/artifact/finish/engine.ts +91 -14
- package/src/cli/commands/artifact/finish/finisher.ts +10 -0
- package/src/cli/commands/artifact/finish/git.ts +132 -19
- package/src/cli/commands/artifact/finish/openspec.ts +180 -138
- package/src/cli/commands/artifact/finish/secret-scan.ts +43 -0
- package/src/cli/commands/artifact/finish/worktree-cleanup.ts +92 -0
- package/src/cli/commands/artifact/pending/command.ts +31 -3
- package/src/cli/commands/artifact/pending/discovery.ts +21 -57
- package/src/cli/commands/cap/graphify.ts +52 -3
- package/src/cli/commands/cap/index-cmd.ts +71 -15
- package/src/cli/commands/cap/openspec.ts +13 -25
- package/src/cli/commands/cap/tokensave.ts +7 -5
- package/src/cli/commands/companion/companion.ts +1 -1
- package/src/cli/commands/companion/link.ts +50 -5
- package/src/cli/commands/companion/open.ts +101 -51
- package/src/cli/commands/companion/sync.ts +10 -0
- package/src/cli/commands/companion/tui.ts +17 -7
- package/src/cli/commands/companion/update.ts +143 -48
- package/src/cli/commands/doctor.ts +317 -7
- package/src/cli/commands/factory/factory.ts +301 -0
- package/src/cli/commands/install.ts +133 -9
- package/src/cli/commands/launch/shared.ts +16 -11
- package/src/cli/commands/plugin/install.ts +9 -4
- package/src/cli/commands/plugin/plugin.ts +3 -2
- package/src/cli/commands/report/adapter.ts +11 -2
- package/src/cli/commands/report/contract.ts +21 -0
- package/src/cli/commands/report/highlight.ts +34 -4
- package/src/cli/commands/report/index.ts +20 -1
- package/src/cli/commands/report/markdown.ts +110 -0
- package/src/cli/commands/report/palette.ts +118 -0
- package/src/cli/commands/report/renderer.ts +456 -153
- package/src/cli/commands/report/types.ts +16 -0
- package/src/cli/commands/session/context.ts +102 -0
- package/src/cli/commands/session/prepare.ts +32 -4
- package/src/cli/commands/session/registry.ts +90 -0
- package/src/cli/commands/setup.ts +50 -24
- package/src/cli/commands/studio/companion-removal.ts +79 -0
- package/src/cli/commands/studio/factory-credential.ts +49 -0
- package/src/cli/commands/studio/index.ts +29 -2
- package/src/cli/commands/studio/mate-inventory.ts +1 -1
- package/src/cli/commands/studio/openspec-cli.ts +10 -58
- package/src/cli/commands/studio/payload.ts +260 -15
- package/src/cli/commands/studio/routes.ts +41 -6
- package/src/cli/commands/studio/selection.ts +161 -17
- package/src/cli/commands/studio/server.ts +429 -326
- package/src/cli/commands/studio/services.ts +80 -0
- package/src/cli/commands/studio/skill-files.ts +133 -0
- package/src/cli/commands/studio/studio-app.ts +67 -0
- package/src/cli/commands/studio/terminal-assets.ts +21 -33
- package/src/cli/commands/studio/terminal.ts +85 -15
- package/src/cli/commands/studio/vault.ts +218 -44
- package/src/cli/commands/studio/views/model.ts +13 -0
- package/src/cli/commands/studio/views/vault/markdown-tree.ts +518 -0
- package/src/cli/commands/studio/views/vault/view.ts +185 -0
- package/src/cli/commands/studio/workset-session.ts +131 -0
- package/src/cli/commands/unwrap.ts +16 -0
- package/src/cli/commands/update.ts +53 -9
- package/src/cli/commands/vscode/setup.ts +155 -0
- package/src/cli/commands/vscode/vsix.ts +73 -0
- package/src/cli/commands/working/cleanup.ts +44 -11
- package/src/cli/commands/working/link.ts +76 -0
- package/src/cli/commands/working/working.ts +10 -0
- package/src/cli/commands/working/worktree.ts +406 -0
- package/src/cli/commands/wrap.ts +38 -20
- package/src/cli/companion-link-wizard.tsx +2 -0
- package/src/cli/companion-selector.tsx +2 -0
- package/src/cli/confirm.ts +2 -0
- package/src/cli/install-plan.tsx +127 -160
- package/src/cli/launch-selector.tsx +2 -0
- package/src/cli/main.ts +31 -3
- package/src/cli/parse-flags.ts +32 -6
- package/src/cli/repo-list-table.tsx +2 -0
- package/src/cli/setup-selector.tsx +86 -151
- package/src/cli/usage.ts +20 -1
- package/src/create-mate.ts +5 -4
- package/src/hooks/companion-instructions.ts +198 -0
- package/src/hooks/hook-io.ts +78 -0
- package/src/hooks/session-banner.ts +24 -30
- package/src/hooks/session-end.ts +10 -0
- package/src/hooks/session-guidance.ts +18 -22
- package/src/hooks/session-prepare.ts +137 -34
- package/src/hooks/session-register.ts +199 -0
- package/src/hooks/tokensave-route.ts +30 -0
- package/src/hooks/validate-artifact-path.ts +90 -25
- package/src/index.ts +4 -0
- package/src/lib/apply-context/fingerprint.ts +174 -0
- package/src/lib/apply-context/protocol.ts +193 -0
- package/src/lib/change-layout.ts +154 -0
- package/src/lib/components/confirm-prompt.tsx +21 -9
- package/src/lib/components/select-menu.tsx +10 -3
- package/src/lib/components/spinner.tsx +4 -2
- package/src/lib/components/startup-progress.tsx +227 -41
- package/src/lib/components/text-input-display.tsx +2 -0
- package/src/lib/components/wizard-footer.tsx +2 -0
- package/src/lib/components/wizard-header.tsx +16 -12
- package/src/lib/context-mode-package.ts +24 -11
- package/src/lib/delivery/archive-change.ts +165 -0
- package/src/lib/delivery/branches.ts +147 -0
- package/src/lib/delivery/environment.ts +35 -0
- package/src/lib/delivery/forge.ts +279 -0
- package/src/lib/delivery/merge-git.ts +261 -0
- package/src/lib/delivery/overlap.ts +209 -0
- package/src/lib/delivery/record-delivery.ts +338 -0
- package/src/lib/delivery/record.ts +405 -0
- package/src/lib/delivery/refresh.ts +288 -0
- package/src/lib/delivery/repository-access.ts +141 -0
- package/src/lib/delivery/resolve-branch.ts +383 -0
- package/src/lib/delivery/stages.ts +111 -0
- package/src/lib/delivery/token.ts +24 -0
- package/src/lib/factory/attach-client.ts +113 -0
- package/src/lib/factory/attach.ts +178 -0
- package/src/lib/factory/broker.ts +190 -0
- package/src/lib/factory/bun-commands.ts +39 -0
- package/src/lib/factory/client.ts +92 -0
- package/src/lib/factory/command.ts +61 -0
- package/src/lib/factory/credential-store.ts +153 -0
- package/src/lib/factory/frames.ts +77 -0
- package/src/lib/factory/ids.ts +58 -0
- package/src/lib/factory/keyed-serial.ts +27 -0
- package/src/lib/factory/outcomes/actions.ts +114 -0
- package/src/lib/factory/outcomes/index.ts +391 -0
- package/src/lib/factory/outcomes/lifecycle.ts +205 -0
- package/src/lib/factory/outcomes/runs.ts +81 -0
- package/src/lib/factory/outcomes/sessions.ts +38 -0
- package/src/lib/factory/prepare.ts +49 -0
- package/src/lib/factory/pty.ts +103 -0
- package/src/lib/factory/runner/companion-context.ts +178 -0
- package/src/lib/factory/runner/control.ts +92 -0
- package/src/lib/factory/runner/harness-agent.ts +250 -0
- package/src/lib/factory/runner/live.ts +159 -0
- package/src/lib/factory/runner/questions.ts +22 -0
- package/src/lib/factory/runner/rank.ts +26 -0
- package/src/lib/factory/runner/run-policy.ts +12 -0
- package/src/lib/factory/runner/run.ts +199 -0
- package/src/lib/factory/runner/scheduler.ts +416 -0
- package/src/lib/factory/runner/state.ts +233 -0
- package/src/lib/factory/runner/workflow.ts +542 -0
- package/src/lib/factory/runtime.ts +981 -0
- package/src/lib/factory/sandbox.ts +292 -0
- package/src/lib/factory/worktree-branch.ts +17 -0
- package/src/lib/frontmatter.ts +18 -0
- package/src/lib/install.ts +66 -14
- package/src/lib/live-progress.ts +36 -0
- package/src/lib/member-choices.ts +67 -0
- package/src/lib/opencode-plugin-package.ts +5 -5
- package/src/lib/opencode-server.ts +238 -0
- package/src/lib/openspec-cli.ts +116 -0
- package/src/lib/openspec-scopes.ts +86 -0
- package/src/lib/orchestrator/adapters/base.ts +55 -22
- package/src/lib/orchestrator/adapters/claude-args.ts +50 -0
- package/src/lib/orchestrator/adapters/claude.ts +201 -43
- package/src/lib/orchestrator/adapters/opencode.ts +55 -2
- package/src/lib/orchestrator/checkout-adoption.ts +125 -0
- package/src/lib/orchestrator/companion-registry-store.ts +6 -2
- package/src/lib/orchestrator/config-store.ts +3 -2
- package/src/lib/orchestrator/editor.ts +32 -26
- package/src/lib/orchestrator/framework-context.ts +26 -14
- package/src/lib/orchestrator/global-config-store.ts +11 -0
- package/src/lib/orchestrator/launcher.ts +15 -2
- package/src/lib/orchestrator/openspec-store.ts +14 -54
- package/src/lib/orchestrator/projection-claude-commands.ts +36 -0
- package/src/lib/orchestrator/projection-claude-links.ts +206 -0
- package/src/lib/orchestrator/projection-claude-skills.ts +37 -129
- package/src/lib/orchestrator/projection-companion-link.ts +12 -1
- package/src/lib/orchestrator/projection-entries.ts +100 -34
- package/src/lib/orchestrator/projection-opencode-copies.ts +32 -15
- package/src/lib/orchestrator/projection-openspec-store.ts +54 -9
- package/src/lib/orchestrator/projection-runtime-documents.ts +15 -6
- package/src/lib/orchestrator/projection-types.ts +36 -1
- package/src/lib/orchestrator/refresh-working-claude-links.ts +87 -0
- package/src/lib/orchestrator/registry-checkouts.ts +177 -0
- package/src/lib/orchestrator/repository-link.ts +216 -57
- package/src/lib/orchestrator/serving-claude-wrap.ts +43 -0
- package/src/lib/orchestrator/session-context-link.ts +73 -0
- package/src/lib/orchestrator/session-prepare.ts +81 -11
- package/src/lib/orchestrator/setup-compatibilities.ts +56 -70
- package/src/lib/orchestrator/types.ts +12 -2
- package/src/lib/orchestrator/working-repo-projection.ts +50 -7
- package/src/lib/orchestrator/workspace-document.ts +105 -0
- package/src/lib/orchestrator/workspace-inventory.ts +5 -1
- package/src/lib/orchestrator/wrap-pass.ts +22 -1
- package/src/lib/package-paths.ts +37 -0
- package/src/lib/public-npm.ts +17 -0
- package/src/lib/runtime-directory-refresh.ts +17 -1
- package/src/lib/session-attribution.ts +52 -0
- package/src/lib/session-state.ts +285 -0
- package/src/lib/session-stop.ts +64 -0
- package/src/lib/workset/record.ts +533 -0
- package/src/lib/workset/repositories.ts +55 -0
- package/src/lib/workset/stage.ts +148 -0
- package/src/lib/workset/stages.ts +113 -0
- package/src/lib/workset/worktree-index.ts +116 -0
- package/src/lib/workset/worktree.ts +898 -0
- package/src/opencode/background-server.ts +145 -0
- package/src/opencode/companion-hooks.ts +111 -7
- package/src/opencode/companion-policy.ts +39 -20
- package/src/opencode/enter-worktree.ts +72 -0
- package/src/opencode/projected-guidance.ts +6 -2
- package/src/opencode/session-prepare.ts +2 -1
- package/src/opencode/session-register.ts +176 -0
- package/src/opencode/tui.tsx +24 -27
- package/src/plugins.ts +1 -0
- package/src/runtime/artifact-refusal.ts +63 -0
- package/src/runtime/claude-delivery-plan.ts +121 -11
- package/src/runtime/commit-attribution-guard.ts +181 -0
- package/src/runtime/companion-git.ts +52 -10
- package/src/runtime/companion-guidance.ts +20 -8
- package/src/runtime/companion-instructions.ts +340 -0
- package/src/runtime/companion-lock.ts +30 -7
- package/src/runtime/current-branch.ts +10 -0
- package/src/runtime/env.ts +59 -8
- package/src/runtime/error-message.ts +4 -0
- package/src/runtime/git-layout.ts +366 -0
- package/src/runtime/index.ts +29 -0
- package/src/runtime/launch-env-guard.ts +65 -0
- package/src/runtime/managed-block.ts +117 -0
- package/src/runtime/markdown-scan.ts +266 -0
- package/src/runtime/opencode-server-record.ts +136 -0
- package/src/runtime/physical-path.ts +111 -0
- package/src/runtime/policy.ts +50 -2
- package/src/runtime/projected-flag.ts +7 -0
- package/src/runtime/projected-guidance.ts +1 -0
- package/src/runtime/projection.ts +40 -6
- package/src/runtime/repo-local.ts +6 -1
- package/src/runtime/runtime-directory.ts +5 -0
- package/src/runtime/runtime-document-manifest.ts +62 -11
- package/src/runtime/secret-guard.ts +162 -0
- package/src/runtime/secret-patterns.ts +397 -0
- package/src/runtime/secret-scan.ts +90 -0
- package/src/runtime/serving-claude-wrap.ts +28 -0
- package/src/runtime/session-context.ts +99 -0
- package/src/runtime/session-kind.ts +13 -0
- package/src/runtime/session-registry.ts +434 -0
- package/src/runtime/shell-heredoc.ts +81 -0
- package/src/runtime/tokensave-route.ts +157 -0
- package/src/runtime/wrap-state.ts +75 -2
- package/src/runtime/write-atomic.ts +64 -0
- package/src/studio.ts +126 -0
- package/src/templates/capabilities/openspec-cap/mate-minimal/schema.yaml +14 -10
- package/src/templates/capabilities/openspec-cap/mate-minimal/templates/spec.md +3 -5
- package/src/templates/capabilities/openspec-cap/mate-v1/schema.yaml +18 -102
- package/src/templates/capabilities/openspec-cap/mate-v1/templates/spec.md +3 -5
- package/src/templates/capabilities/openspec-cap/openspec-conventions.yaml +20 -14
- package/src/templates/mate-skills/THIRD-PARTY-NOTICES.md +40 -0
- package/src/templates/mate-skills/agents/mate-apply-change/SKILL.md +162 -0
- package/src/templates/mate-skills/agents/mate-apply-change/references/mate-compact-apply.md +47 -0
- package/src/templates/mate-skills/agents/mate-apply-change/references/openspec-apply-change.md +200 -0
- package/src/templates/mate-skills/agents/mate-archive-change/SKILL.md +81 -0
- package/src/templates/mate-skills/{claude/mate-openspec-backfill → agents/mate-backfill-spec}/SKILL.md +11 -4
- package/src/templates/mate-skills/agents/mate-clarify-intent/SKILL.md +110 -0
- package/src/templates/mate-skills/agents/mate-explore-change/SKILL.md +66 -0
- package/src/templates/mate-skills/agents/mate-explore-change/references/openspec-explore.md +350 -0
- package/src/templates/mate-skills/agents/mate-grill-me/SKILL.md +11 -4
- package/src/templates/mate-skills/agents/mate-grill-with-docs/SKILL.md +2 -2
- package/src/templates/mate-skills/agents/mate-interview-me/SKILL.md +12 -5
- package/src/templates/mate-skills/agents/mate-propose-change/SKILL.md +102 -0
- package/src/templates/mate-skills/agents/mate-propose-change/references/mate-revise.md +45 -0
- package/src/templates/mate-skills/agents/mate-propose-change/references/openspec-propose.md +169 -0
- package/src/templates/mate-skills/agents/mate-propose-change/references/openspec-update-change.md +103 -0
- package/src/templates/mate-skills/agents/{mate-artifact-publish → mate-publish-artifact}/SKILL.md +109 -24
- package/src/templates/mate-skills/{claude/mate-artifact-publish → agents/mate-publish-artifact}/references/openspec.md +8 -5
- package/src/templates/mate-skills/agents/mate-show-me/SKILL.md +95 -16
- package/src/templates/mate-skills/agents/mate-simplify-code/SKILL.md +87 -68
- package/src/templates/mate-skills/claude/mate-apply-change/SKILL.md +162 -0
- package/src/templates/mate-skills/claude/mate-apply-change/references/mate-compact-apply.md +47 -0
- package/src/templates/mate-skills/claude/mate-apply-change/references/openspec-apply-change.md +200 -0
- package/src/templates/mate-skills/claude/mate-archive-change/SKILL.md +81 -0
- package/src/templates/mate-skills/{agents/mate-openspec-backfill → claude/mate-backfill-spec}/SKILL.md +11 -4
- package/src/templates/mate-skills/claude/mate-clarify-intent/SKILL.md +110 -0
- package/src/templates/mate-skills/claude/mate-explore-change/SKILL.md +66 -0
- package/src/templates/mate-skills/claude/mate-explore-change/references/openspec-explore.md +350 -0
- package/src/templates/mate-skills/claude/mate-grill-me/SKILL.md +11 -4
- package/src/templates/mate-skills/claude/mate-grill-with-docs/SKILL.md +2 -2
- package/src/templates/mate-skills/claude/mate-interview-me/SKILL.md +12 -5
- package/src/templates/mate-skills/claude/mate-propose-change/SKILL.md +102 -0
- package/src/templates/mate-skills/claude/mate-propose-change/references/mate-revise.md +45 -0
- package/src/templates/mate-skills/claude/mate-propose-change/references/openspec-propose.md +169 -0
- package/src/templates/mate-skills/claude/mate-propose-change/references/openspec-update-change.md +103 -0
- package/src/templates/mate-skills/claude/{mate-artifact-publish → mate-publish-artifact}/SKILL.md +109 -24
- package/src/templates/mate-skills/{agents/mate-artifact-publish → claude/mate-publish-artifact}/references/openspec.md +8 -5
- package/src/templates/mate-skills/claude/mate-show-me/SKILL.md +95 -16
- package/src/templates/mate-skills/claude/mate-simplify-code/SKILL.md +87 -68
- package/src/templates/mate-skills/openspec-references.ts +142 -0
- package/src/templates/root/TEMPLATE_AGENTS.md +2 -2
- package/src/tools/setup/__snapshots__/runtime-surface-golden.test.ts.snap +4340 -419
- package/src/tools/setup/capabilities/companion-mentions.ts +27 -0
- package/src/tools/setup/capabilities/context-mode.ts +56 -7
- package/src/tools/setup/capabilities/graphify-gate.ts +31 -0
- package/src/tools/setup/capabilities/graphify-secrets.ts +243 -0
- package/src/tools/setup/capabilities/graphify.ts +46 -7
- package/src/tools/setup/capabilities/openspec.ts +163 -272
- package/src/tools/setup/capabilities/react-doctor.ts +8 -1
- package/src/tools/setup/capabilities/rtk.ts +4 -0
- package/src/tools/setup/capabilities/tokensave.ts +113 -71
- package/src/tools/setup/context-services.ts +9 -17
- package/src/tools/setup/dynamic-plugins/hydrate.ts +4 -3
- package/src/tools/setup/dynamic-plugins/install.ts +24 -28
- package/src/tools/setup/engine.ts +100 -23
- package/src/tools/setup/install-contract.ts +8 -0
- package/src/tools/setup/managed-output.ts +51 -0
- package/src/tools/setup/mate-skill-copies.ts +51 -0
- package/src/tools/setup/mate.ts +86 -11
- package/src/tools/setup/package-managers/uv.ts +73 -11
- package/src/tools/setup/plugin.ts +40 -0
- package/src/tools/setup/plugins/guidance.ts +7 -4
- package/src/tools/setup/providers/agent-file-sections.ts +4 -2
- package/src/tools/setup/providers/claude-attribution.ts +65 -0
- package/src/tools/setup/providers/claude-plugin-folders.ts +625 -0
- package/src/tools/setup/providers/claude-plugin-hooks.ts +77 -19
- package/src/tools/setup/providers/claude-worktree-plugins.ts +122 -0
- package/src/tools/setup/providers/claude.ts +310 -8
- package/src/tools/setup/providers/opencode.ts +180 -1
- package/src/tools/setup/utils.ts +18 -4
- package/src/tools/setup/working-repo-cleanup.ts +29 -1
- package/src/tools/setup/working-repo-local-state.ts +252 -75
- package/src/tools/setup.ts +183 -26
- package/studio-dist/client/assets/app-CdPiFv59.css +2 -0
- package/studio-dist/client/assets/button-BIIHE0EQ.js +3 -0
- package/studio-dist/client/assets/companion-view-DM6YyXaR.js +1 -0
- package/studio-dist/client/assets/delivery-path-DELxj0Av.js +1 -0
- package/studio-dist/client/assets/dist-Dm7MtyHc.js +5 -0
- package/studio-dist/client/assets/factory-BZy0E8ty.js +4 -0
- package/studio-dist/client/assets/index-B3wkMzjA.js +40 -0
- package/studio-dist/client/assets/markdown-view-pQ2Qp_i5.js +1 -0
- package/studio-dist/client/assets/panel-CbajlC3p.js +1 -0
- package/studio-dist/client/assets/preload-helper-BLdHbfdN.js +1 -0
- package/studio-dist/client/assets/prepaint-CwSrpdFA.js +27 -0
- package/studio-dist/client/assets/react-CN2GSx7x.js +1 -0
- package/studio-dist/client/assets/reports-DllhYQ5_.js +1 -0
- package/studio-dist/client/assets/rolldown-runtime-WkwZ5CU-.js +1 -0
- package/studio-dist/client/assets/routes-COm-G3mK.js +1 -0
- package/studio-dist/client/assets/skills-DmWAy-jZ.js +1 -0
- package/studio-dist/client/assets/specs-BG3Wi3ln.js +1 -0
- package/studio-dist/client/assets/steps-DFsH3Neu.js +1 -0
- package/studio-dist/client/assets/terminal-eU5fzQzv.css +1 -0
- package/studio-dist/client/assets/vault-B2q1nBY5.js +1 -0
- package/studio-dist/client/assets/warnings-BSXIyuSQ.js +1 -0
- package/studio-dist/client/assets/wasm-inline-C2en61B5.js +1 -0
- package/studio-dist/client/assets/workflow-DlsQD6Hc.js +1 -0
- package/studio-dist/server/assets/__23tanstack-start-server-fn-resolver-M2GBs8s3.js +4051 -0
- package/studio-dist/server/assets/_tanstack-start-manifest_v.js +95 -0
- package/studio-dist/server/assets/actions-Bvgj9eb8.js +54 -0
- package/studio-dist/server/assets/actions-D8erOphH.js +44 -0
- package/studio-dist/server/assets/button-CIJqAhni.js +11929 -0
- package/studio-dist/server/assets/companion-view-DISASvdJ.js +39 -0
- package/studio-dist/server/assets/companions-BYbHWKOZ.js +15 -0
- package/studio-dist/server/assets/createServerFn-F5sAOF8V.js +459 -0
- package/studio-dist/server/assets/createServerRpc-tK2lE9R2.js +11 -0
- package/studio-dist/server/assets/delivery-path-C29fBynY.js +654 -0
- package/studio-dist/server/assets/dist-DpJWKyCm.js +5582 -0
- package/studio-dist/server/assets/empty-plugin-adapters-Cipd4ZH4.js +4 -0
- package/studio-dist/server/assets/factory-DGPmNGbo.js +69 -0
- package/studio-dist/server/assets/factory-DUTa0eDs.js +2172 -0
- package/studio-dist/server/assets/markdown-view-Bn7xPdks.js +86 -0
- package/studio-dist/server/assets/model-PyPALjii.js +18 -0
- package/studio-dist/server/assets/panel-3Jmn4awF.js +169 -0
- package/studio-dist/server/assets/prepaint-DJfTQ_VH.js +45 -0
- package/studio-dist/server/assets/react-Ce6dj15C.js +46 -0
- package/studio-dist/server/assets/reports-C06RXVE2.js +18 -0
- package/studio-dist/server/assets/reports-D6YMqhnO.js +142 -0
- package/studio-dist/server/assets/rolldown-runtime-DYf_mQCB.js +34 -0
- package/studio-dist/server/assets/router-C8MGqlAY.js +13713 -0
- package/studio-dist/server/assets/routes-BcFgvqf7.js +622 -0
- package/studio-dist/server/assets/search-JAKurDNh.js +36 -0
- package/studio-dist/server/assets/shell-DS3wUexh.js +52 -0
- package/studio-dist/server/assets/skills-BEnOxiDl.js +266 -0
- package/studio-dist/server/assets/skills-CtrBAtX3.js +28 -0
- package/studio-dist/server/assets/specs-C8rv34-5.js +211 -0
- package/studio-dist/server/assets/start-h3ICWwd2.js +36 -0
- package/studio-dist/server/assets/steps-Dq_CwY_s.js +181 -0
- package/studio-dist/server/assets/studio-BeltxxKt.js +216 -0
- package/studio-dist/server/assets/utils-C9CX1kcy.js +221 -0
- package/studio-dist/server/assets/vault-BmWnryh3.js +85 -0
- package/studio-dist/server/assets/vault-Fvxt2Tzl.js +1032 -0
- package/studio-dist/server/assets/views-BgYa-za2.js +80 -0
- package/studio-dist/server/assets/warnings-DzR6fyZh.js +23 -0
- package/studio-dist/server/assets/wasm-inline-CNeBKGwC.js +3 -0
- package/studio-dist/server/assets/workflow-liRYecHk.js +73 -0
- package/studio-dist/server/server.js +16066 -0
- package/wrappers/bin/graphify +52 -4
- package/wrappers/bin/openspec +33 -9
- package/wrappers/lib/graphify-gate.mjs +8 -0
- package/src/cli/commands/studio/views/client.ts +0 -654
- package/src/cli/commands/studio/views/companion-picker.tsx +0 -95
- package/src/cli/commands/studio/views/companion-selector.tsx +0 -94
- package/src/cli/commands/studio/views/dashboard/changes.tsx +0 -107
- package/src/cli/commands/studio/views/dashboard/index.tsx +0 -19
- package/src/cli/commands/studio/views/document.tsx +0 -842
- package/src/cli/commands/studio/views/error.tsx +0 -20
- package/src/cli/commands/studio/views/reports/index.tsx +0 -49
- package/src/cli/commands/studio/views/selection-fields.tsx +0 -14
- package/src/cli/commands/studio/views/skills/index.tsx +0 -87
- package/src/cli/commands/studio/views/specs/index.tsx +0 -157
- package/src/cli/commands/studio/views/styles.ts +0 -519
- package/src/cli/commands/studio/views/terminal.tsx +0 -484
- package/src/cli/commands/studio/views/vault/state.ts +0 -43
- package/src/cli/commands/studio/views/warnings.tsx +0 -21
- package/src/cli/commands/studio/views/workflow/index.tsx +0 -21
- package/src/cli/commands/studio/views/workflow/steps.ts +0 -337
- package/src/cli/commands/studio/views/workflow/transcript.tsx +0 -190
- package/src/lib/components/theme.ts +0 -2
- package/src/tools/setup/git-utils.ts +0 -30
- package/src/tools/setup/runtime-documents.ts +0 -291
|
@@ -0,0 +1,622 @@
|
|
|
1
|
+
import { i as __toESM } from "./rolldown-runtime-DYf_mQCB.js";
|
|
2
|
+
import { t as CompanionView } from "./companion-view-DISASvdJ.js";
|
|
3
|
+
import { $ as CommandLine, Ar as cn, Bi as Link, Gr as vaultChildrenQuery, Q as Age, Vi as useNavigate, at as Pills, ct as StatusWord, et as Count, fi as useQuery, nt as ListCard, ot as Progress, qr as vaultQuery, r as Icon, rt as PAGE_PAD, st as ROW, t as Button, tt as EmptyNote } from "./button-CIJqAhni.js";
|
|
4
|
+
import { j as require_react, u as require_jsx_runtime } from "./__23tanstack-start-server-fn-resolver-M2GBs8s3.js";
|
|
5
|
+
import { n as PanelSection, r as SidePanel, t as PanelHead } from "./panel-3Jmn4awF.js";
|
|
6
|
+
import { t as Warnings } from "./warnings-DzR6fyZh.js";
|
|
7
|
+
import { t as MarkdownView } from "./markdown-view-Bn7xPdks.js";
|
|
8
|
+
import { C as CHANGE_GROUPS, D as groupChanges, E as changeStep, T as changeGroup, c as Route, w as GROUP_TITLES } from "./router-C8MGqlAY.js";
|
|
9
|
+
// src/views/overview/changed-specs.ts
|
|
10
|
+
var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
|
|
11
|
+
/** Each capability once, at the newest shipped change that touched it. */
|
|
12
|
+
function recentlyChangedSpecs(shipped) {
|
|
13
|
+
const seen = /* @__PURE__ */ new Set();
|
|
14
|
+
const changed = [];
|
|
15
|
+
for (const change of shipped) for (const capability of change.specs) {
|
|
16
|
+
if (seen.has(capability)) continue;
|
|
17
|
+
seen.add(capability);
|
|
18
|
+
changed.push({
|
|
19
|
+
capability,
|
|
20
|
+
change: change.name,
|
|
21
|
+
archivedOn: change.archivedOn
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
return changed;
|
|
25
|
+
}
|
|
26
|
+
// src/views/overview/analyst-overview.tsx
|
|
27
|
+
var import_jsx_runtime = require_jsx_runtime();
|
|
28
|
+
var SHIPPED_LIMIT = 20;
|
|
29
|
+
var CHANGED_SPECS_LIMIT = 12;
|
|
30
|
+
var ARCHIVE_DIR = "openspec/changes/archive";
|
|
31
|
+
var specPath = (capability) => `openspec/specs/${capability}/spec.md`;
|
|
32
|
+
var LINK_ROW = cn(ROW, "grid grid-cols-[minmax(0,1fr)_auto] gap-x-4 py-2");
|
|
33
|
+
/** What shipped lately and the specs it changed; never active work. */
|
|
34
|
+
function AnalystOverview({ payload }) {
|
|
35
|
+
const [open, setOpen] = (0, import_react.useState)(null);
|
|
36
|
+
const shipped = payload.shipped.slice(0, SHIPPED_LIMIT);
|
|
37
|
+
const current = shipped.find((change) => change.anchor === open) ?? null;
|
|
38
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
39
|
+
className: "analyst-overview",
|
|
40
|
+
children: [
|
|
41
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Warnings, { warnings: payload.warnings }),
|
|
42
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
43
|
+
className: cn(PAGE_PAD, "@container pb-10"),
|
|
44
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
45
|
+
className: "grid grid-cols-[minmax(0,1.5fr)_minmax(0,1fr)] items-start gap-3 @max-[760px]:grid-cols-1",
|
|
46
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Shipped, {
|
|
47
|
+
all: payload.shipped.length,
|
|
48
|
+
shown: shipped,
|
|
49
|
+
current: open,
|
|
50
|
+
onOpen: setOpen
|
|
51
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ChangedSpecs, { shipped: payload.shipped })]
|
|
52
|
+
})
|
|
53
|
+
}),
|
|
54
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidePanel, {
|
|
55
|
+
items: shipped.map((change) => change.anchor),
|
|
56
|
+
current: current?.anchor ?? null,
|
|
57
|
+
onSelect: setOpen,
|
|
58
|
+
title: current ? `Shipped change ${current.name}` : "Shipped change",
|
|
59
|
+
children: current ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ShippedDetail, { change: current }) : null
|
|
60
|
+
})
|
|
61
|
+
]
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
/** Consecutive changes archived on the same day; the list is newest first. */
|
|
65
|
+
function byDay(changes) {
|
|
66
|
+
const days = [];
|
|
67
|
+
for (const change of changes) {
|
|
68
|
+
const last = days.at(-1);
|
|
69
|
+
if (last?.[0] === change.archivedOn) last[1].push(change);
|
|
70
|
+
else days.push([change.archivedOn, [change]]);
|
|
71
|
+
}
|
|
72
|
+
return days;
|
|
73
|
+
}
|
|
74
|
+
/** The weekday of an archive date; fixed locale and zone, so server and browser agree. */
|
|
75
|
+
function weekday(day) {
|
|
76
|
+
const date = /* @__PURE__ */ new Date(`${day}T00:00:00Z`);
|
|
77
|
+
return Number.isNaN(date.getTime()) ? "" : date.toLocaleDateString("en", {
|
|
78
|
+
weekday: "long",
|
|
79
|
+
timeZone: "UTC"
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
function Shipped({ all, shown, current, onOpen }) {
|
|
83
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ListCard, {
|
|
84
|
+
title: "Recently shipped",
|
|
85
|
+
count: all,
|
|
86
|
+
hint: all > shown.length ? `newest ${shown.length}` : void 0,
|
|
87
|
+
children: shown.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
88
|
+
className: "empty m-0 px-4 py-3 text-sm text-muted",
|
|
89
|
+
children: "No shipped changes yet."
|
|
90
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("ol", {
|
|
91
|
+
className: "analyst-days m-0 list-none p-0",
|
|
92
|
+
children: byDay(shown).map(([day, changes]) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("li", {
|
|
93
|
+
className: "border-t border-rule first:border-t-0",
|
|
94
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("h3", {
|
|
95
|
+
className: "m-0 flex items-center gap-2 bg-[color-mix(in_srgb,var(--surface)_45%,transparent)] px-4 pt-2.5 pb-1.5 text-xs font-semibold text-muted",
|
|
96
|
+
children: [
|
|
97
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("time", {
|
|
98
|
+
dateTime: day,
|
|
99
|
+
className: "font-mono text-text",
|
|
100
|
+
children: day
|
|
101
|
+
}),
|
|
102
|
+
weekday(day),
|
|
103
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Count, { value: changes.length })
|
|
104
|
+
]
|
|
105
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("ol", {
|
|
106
|
+
className: "analyst-list m-0 list-none p-0",
|
|
107
|
+
children: changes.map((change) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
|
|
108
|
+
type: "button",
|
|
109
|
+
className: cn(ROW, "grid gap-0.5 py-2"),
|
|
110
|
+
"aria-current": current === change.anchor ? "true" : void 0,
|
|
111
|
+
onClick: () => onOpen(change.anchor),
|
|
112
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
113
|
+
className: "analyst-row-title truncate font-mono text-sm",
|
|
114
|
+
children: change.name
|
|
115
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
116
|
+
className: "truncate text-xs text-muted",
|
|
117
|
+
children: change.specs.length === 0 ? "no spec changes" : change.specs.join(", ")
|
|
118
|
+
})]
|
|
119
|
+
}) }, change.anchor))
|
|
120
|
+
})]
|
|
121
|
+
}, day))
|
|
122
|
+
})
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
function ShippedDetail({ change }) {
|
|
126
|
+
const dir = `${ARCHIVE_DIR}/${change.anchor}`;
|
|
127
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
128
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PanelHead, {
|
|
129
|
+
mono: true,
|
|
130
|
+
title: change.name,
|
|
131
|
+
kicker: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { children: ["Shipped ", change.archivedOn] })
|
|
132
|
+
}),
|
|
133
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PanelSection, {
|
|
134
|
+
title: "Proposal",
|
|
135
|
+
children: change.hasProposal ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Link, {
|
|
136
|
+
className: "inline-flex items-center gap-2 text-sm",
|
|
137
|
+
to: "/vault",
|
|
138
|
+
search: (previous) => ({
|
|
139
|
+
...previous,
|
|
140
|
+
path: `${dir}/proposal.md`
|
|
141
|
+
}),
|
|
142
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, { name: "doc" }), " Read the proposal"]
|
|
143
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", {
|
|
144
|
+
className: "m-0 text-sm text-muted",
|
|
145
|
+
children: [
|
|
146
|
+
"This change has no proposal.",
|
|
147
|
+
" ",
|
|
148
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, {
|
|
149
|
+
to: "/vault",
|
|
150
|
+
search: (previous) => ({
|
|
151
|
+
...previous,
|
|
152
|
+
dir
|
|
153
|
+
}),
|
|
154
|
+
children: "Open its folder"
|
|
155
|
+
})
|
|
156
|
+
]
|
|
157
|
+
})
|
|
158
|
+
}),
|
|
159
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PanelSection, {
|
|
160
|
+
title: "Specs it changed",
|
|
161
|
+
aside: String(change.specs.length),
|
|
162
|
+
children: change.specs.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
163
|
+
className: "m-0 text-sm text-muted",
|
|
164
|
+
children: "No spec changed."
|
|
165
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("ul", {
|
|
166
|
+
className: "m-0 grid list-none gap-1 p-0",
|
|
167
|
+
children: change.specs.map((capability) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, {
|
|
168
|
+
className: "font-mono text-sm",
|
|
169
|
+
to: "/vault",
|
|
170
|
+
search: (previous) => ({
|
|
171
|
+
...previous,
|
|
172
|
+
path: specPath(capability)
|
|
173
|
+
}),
|
|
174
|
+
children: capability
|
|
175
|
+
}) }, capability))
|
|
176
|
+
})
|
|
177
|
+
})
|
|
178
|
+
] });
|
|
179
|
+
}
|
|
180
|
+
function ChangedSpecs({ shipped }) {
|
|
181
|
+
const shown = recentlyChangedSpecs(shipped).slice(0, CHANGED_SPECS_LIMIT);
|
|
182
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ListCard, {
|
|
183
|
+
title: "Recently changed specs",
|
|
184
|
+
hint: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, {
|
|
185
|
+
to: "/specs",
|
|
186
|
+
search: (previous) => previous,
|
|
187
|
+
children: "All specs"
|
|
188
|
+
}),
|
|
189
|
+
children: shown.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
190
|
+
className: "empty m-0 px-4 py-3 text-sm text-muted",
|
|
191
|
+
children: "No specs changed by shipped changes yet."
|
|
192
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("ol", {
|
|
193
|
+
className: "analyst-list m-0 list-none p-0",
|
|
194
|
+
children: shown.map((spec, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Link, {
|
|
195
|
+
className: LINK_ROW,
|
|
196
|
+
to: "/vault",
|
|
197
|
+
search: (previous) => ({
|
|
198
|
+
...previous,
|
|
199
|
+
path: specPath(spec.capability)
|
|
200
|
+
}),
|
|
201
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
202
|
+
className: "grid min-w-0 gap-0.5",
|
|
203
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
204
|
+
className: "analyst-row-title truncate font-mono text-sm",
|
|
205
|
+
children: spec.capability
|
|
206
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
207
|
+
className: "truncate text-xs text-muted",
|
|
208
|
+
children: ["by ", spec.change]
|
|
209
|
+
})]
|
|
210
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
211
|
+
className: "font-mono text-xs text-muted",
|
|
212
|
+
children: spec.archivedOn === shown[index - 1]?.archivedOn ? null : spec.archivedOn
|
|
213
|
+
})]
|
|
214
|
+
}) }, spec.capability))
|
|
215
|
+
})
|
|
216
|
+
});
|
|
217
|
+
}
|
|
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
|
+
// src/views/overview/changes.tsx
|
|
355
|
+
var GROUP_HINTS = {
|
|
356
|
+
"needs-you": "Review or fix before the build goes on",
|
|
357
|
+
building: "An agent is working through the tasks",
|
|
358
|
+
ready: "Every task is done"
|
|
359
|
+
};
|
|
360
|
+
/** A change's status word and marker shape. */
|
|
361
|
+
function status(change) {
|
|
362
|
+
if (change.valid === false) return {
|
|
363
|
+
marker: "issue",
|
|
364
|
+
word: "Invalid"
|
|
365
|
+
};
|
|
366
|
+
const group = changeGroup(change);
|
|
367
|
+
if (group === "needs-you") return (change.totalTasks ?? 0) === 0 ? {
|
|
368
|
+
marker: "warn",
|
|
369
|
+
word: "No tasks"
|
|
370
|
+
} : {
|
|
371
|
+
marker: "review",
|
|
372
|
+
word: "Review"
|
|
373
|
+
};
|
|
374
|
+
if (group === "building") return {
|
|
375
|
+
marker: "build",
|
|
376
|
+
word: "Building"
|
|
377
|
+
};
|
|
378
|
+
return {
|
|
379
|
+
marker: "done",
|
|
380
|
+
word: "Ready"
|
|
381
|
+
};
|
|
382
|
+
}
|
|
383
|
+
var PATH_STAGES = [
|
|
384
|
+
"Propose change",
|
|
385
|
+
"Human review",
|
|
386
|
+
"Apply change",
|
|
387
|
+
"Archive change"
|
|
388
|
+
];
|
|
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
|
+
function ChangeDetail({ change, companion, reading, onRead }) {
|
|
403
|
+
const step = changeStep(change);
|
|
404
|
+
const { marker, word } = status(change);
|
|
405
|
+
const artifacts = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PanelSection, {
|
|
406
|
+
title: "Artifacts",
|
|
407
|
+
aside: change.schemaName,
|
|
408
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Artifacts, {
|
|
409
|
+
change,
|
|
410
|
+
companion,
|
|
411
|
+
onRead
|
|
412
|
+
})
|
|
413
|
+
});
|
|
414
|
+
const review = changeGroup(change) === "needs-you";
|
|
415
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PanelHead, {
|
|
416
|
+
mono: true,
|
|
417
|
+
title: change.name,
|
|
418
|
+
kicker: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(StatusWord, {
|
|
419
|
+
marker,
|
|
420
|
+
children: word
|
|
421
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Age, {
|
|
422
|
+
at: change.lastModified,
|
|
423
|
+
className: "ml-auto"
|
|
424
|
+
})] }),
|
|
425
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
426
|
+
className: "m-0 text-sm text-muted",
|
|
427
|
+
children: step.situation
|
|
428
|
+
})
|
|
429
|
+
}), reading && companion ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ArtifactReader, {
|
|
430
|
+
companion,
|
|
431
|
+
path: reading,
|
|
432
|
+
change,
|
|
433
|
+
onBack: () => onRead(null)
|
|
434
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
435
|
+
review ? artifacts : null,
|
|
436
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PanelSection, {
|
|
437
|
+
title: "Delivery Path",
|
|
438
|
+
aside: step.stage,
|
|
439
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PathSteps, { stage: step.stage })
|
|
440
|
+
}),
|
|
441
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(PanelSection, {
|
|
442
|
+
title: "Next step",
|
|
443
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", {
|
|
444
|
+
className: "m-0 text-sm",
|
|
445
|
+
children: [step.next, "."]
|
|
446
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CommandLine, { text: step.prompt })]
|
|
447
|
+
}),
|
|
448
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PanelSection, {
|
|
449
|
+
title: "Tasks",
|
|
450
|
+
aside: `${change.completedTasks ?? 0}/${change.totalTasks ?? 0}`,
|
|
451
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Progress, {
|
|
452
|
+
done: change.completedTasks ?? 0,
|
|
453
|
+
total: change.totalTasks ?? 0
|
|
454
|
+
})
|
|
455
|
+
}),
|
|
456
|
+
review ? null : artifacts
|
|
457
|
+
] })] });
|
|
458
|
+
}
|
|
459
|
+
function ChangeRow({ change, current, onOpen }) {
|
|
460
|
+
const { marker, word } = status(change);
|
|
461
|
+
const step = changeStep(change);
|
|
462
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
|
|
463
|
+
type: "button",
|
|
464
|
+
className: cn(ROW, "grid grid-cols-[minmax(0,1fr)_120px_150px_72px] @max-[640px]:grid-cols-[minmax(0,1fr)_auto]"),
|
|
465
|
+
"aria-current": current ? "true" : void 0,
|
|
466
|
+
"data-change": change.name,
|
|
467
|
+
onClick: onOpen,
|
|
468
|
+
children: [
|
|
469
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
470
|
+
className: "grid min-w-0 gap-0.5",
|
|
471
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
472
|
+
className: "truncate font-mono text-sm",
|
|
473
|
+
children: change.name
|
|
474
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
475
|
+
className: cn("truncate text-xs", change.valid === false ? "text-bad" : "text-muted"),
|
|
476
|
+
children: step.situation
|
|
477
|
+
})]
|
|
478
|
+
}),
|
|
479
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(StatusWord, {
|
|
480
|
+
marker,
|
|
481
|
+
children: word
|
|
482
|
+
}),
|
|
483
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
484
|
+
className: "@max-[640px]:hidden",
|
|
485
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Progress, {
|
|
486
|
+
done: change.completedTasks ?? 0,
|
|
487
|
+
total: change.totalTasks ?? 0
|
|
488
|
+
})
|
|
489
|
+
}),
|
|
490
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Age, {
|
|
491
|
+
at: change.lastModified,
|
|
492
|
+
className: "text-right @max-[640px]:hidden"
|
|
493
|
+
})
|
|
494
|
+
]
|
|
495
|
+
}) });
|
|
496
|
+
}
|
|
497
|
+
/** Active changes in up to three groups by what they need; detail opens in the panel. */
|
|
498
|
+
function Changes({ changes, selected, companion }) {
|
|
499
|
+
const navigate = useNavigate();
|
|
500
|
+
const [filter, setFilter] = (0, import_react.useState)("all");
|
|
501
|
+
const [pass, setPass] = (0, import_react.useState)(false);
|
|
502
|
+
const [reading, setReading] = (0, import_react.useState)(null);
|
|
503
|
+
const groups = groupChanges(changes);
|
|
504
|
+
const shown = CHANGE_GROUPS.filter((group) => filter === "all" || filter === group);
|
|
505
|
+
const listed = shown.flatMap((group) => groups[group]);
|
|
506
|
+
const walk = pass ? groups["needs-you"] : listed;
|
|
507
|
+
const current = changes.find((change) => change.name === selected) ?? null;
|
|
508
|
+
const readingPath = reading && reading.change === current?.name ? reading.path : null;
|
|
509
|
+
const select = (name) => {
|
|
510
|
+
if (name === null) setPass(false);
|
|
511
|
+
navigate({
|
|
512
|
+
to: ".",
|
|
513
|
+
search: (previous) => ({
|
|
514
|
+
...previous,
|
|
515
|
+
change: name ?? void 0
|
|
516
|
+
}),
|
|
517
|
+
replace: true
|
|
518
|
+
});
|
|
519
|
+
};
|
|
520
|
+
if (changes.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("section", {
|
|
521
|
+
className: cn(PAGE_PAD, "pb-10"),
|
|
522
|
+
"aria-label": "Changes",
|
|
523
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EmptyNote, { children: "No change is in flight in this companion." })
|
|
524
|
+
});
|
|
525
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", {
|
|
526
|
+
className: cn(PAGE_PAD, "@container grid content-start gap-3 pb-10"),
|
|
527
|
+
"aria-label": "Changes",
|
|
528
|
+
children: [
|
|
529
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
530
|
+
className: "flex flex-wrap items-center gap-2",
|
|
531
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Pills, {
|
|
532
|
+
label: "Show changes",
|
|
533
|
+
value: filter,
|
|
534
|
+
onChange: setFilter,
|
|
535
|
+
options: [{
|
|
536
|
+
value: "all",
|
|
537
|
+
label: "All",
|
|
538
|
+
count: changes.length
|
|
539
|
+
}, ...CHANGE_GROUPS.map((group) => ({
|
|
540
|
+
value: group,
|
|
541
|
+
label: GROUP_TITLES[group],
|
|
542
|
+
count: groups[group].length,
|
|
543
|
+
tone: group === "needs-you" ? "warn" : void 0
|
|
544
|
+
}))]
|
|
545
|
+
}), groups["needs-you"].length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Button, {
|
|
546
|
+
variant: "primary",
|
|
547
|
+
size: "sm",
|
|
548
|
+
className: "ml-auto",
|
|
549
|
+
onClick: () => {
|
|
550
|
+
setPass(true);
|
|
551
|
+
select(groups["needs-you"][0].name);
|
|
552
|
+
},
|
|
553
|
+
children: ["Start review pass", /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Count, { value: groups["needs-you"].length })]
|
|
554
|
+
}) : null]
|
|
555
|
+
}),
|
|
556
|
+
shown.map((group) => groups[group].length === 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ListCard, {
|
|
557
|
+
title: GROUP_TITLES[group],
|
|
558
|
+
count: groups[group].length,
|
|
559
|
+
hint: GROUP_HINTS[group],
|
|
560
|
+
tone: group === "needs-you" ? "warn" : void 0,
|
|
561
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("ul", {
|
|
562
|
+
className: "m-0 list-none p-0",
|
|
563
|
+
children: groups[group].map((change) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ChangeRow, {
|
|
564
|
+
change,
|
|
565
|
+
current: change.name === selected,
|
|
566
|
+
onOpen: () => {
|
|
567
|
+
setPass(false);
|
|
568
|
+
select(change.name);
|
|
569
|
+
}
|
|
570
|
+
}, change.name))
|
|
571
|
+
})
|
|
572
|
+
}, group)),
|
|
573
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidePanel, {
|
|
574
|
+
items: walk.map((change) => change.name),
|
|
575
|
+
current: current?.name ?? null,
|
|
576
|
+
onSelect: select,
|
|
577
|
+
pass: pass ? "Needs you" : void 0,
|
|
578
|
+
wide: readingPath !== null,
|
|
579
|
+
title: current ? `Change ${current.name}` : "Change",
|
|
580
|
+
children: current ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ChangeDetail, {
|
|
581
|
+
change: current,
|
|
582
|
+
companion,
|
|
583
|
+
reading: readingPath,
|
|
584
|
+
onRead: (path) => setReading(path ? {
|
|
585
|
+
change: current.name,
|
|
586
|
+
path
|
|
587
|
+
} : null)
|
|
588
|
+
}) : null
|
|
589
|
+
})
|
|
590
|
+
]
|
|
591
|
+
});
|
|
592
|
+
}
|
|
593
|
+
// src/views/overview/dashboard.tsx
|
|
594
|
+
/** Changes only: specs and skills have their own views. */
|
|
595
|
+
function Dashboard({ payload, selected, companion }) {
|
|
596
|
+
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)(Changes, {
|
|
597
|
+
changes: payload.changes,
|
|
598
|
+
selected,
|
|
599
|
+
companion
|
|
600
|
+
})] });
|
|
601
|
+
}
|
|
602
|
+
// src/routes/index.tsx?tsr-split=component
|
|
603
|
+
/** Each mode reads its own Overview; the server's effective mode picks it, not the address. */
|
|
604
|
+
function Overview() {
|
|
605
|
+
const search = Route.useSearch();
|
|
606
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CompanionView, {
|
|
607
|
+
view: "dashboard",
|
|
608
|
+
search,
|
|
609
|
+
children: (data) => data.studioMode === "analysis" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AnalystOverview, { payload: {
|
|
610
|
+
shipped: data.shipped ?? [],
|
|
611
|
+
warnings: data.warnings
|
|
612
|
+
} }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Dashboard, {
|
|
613
|
+
payload: {
|
|
614
|
+
changes: data.changes ?? [],
|
|
615
|
+
warnings: data.warnings
|
|
616
|
+
},
|
|
617
|
+
selected: search.change,
|
|
618
|
+
companion: search.companion
|
|
619
|
+
})
|
|
620
|
+
});
|
|
621
|
+
}
|
|
622
|
+
export { Overview as component };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { b as viewsFor, f as LEGACY_ROLE_PARAM, g as STUDIO_MODE_PARAM, l as COMPANION_DIGEST_PATTERN, u as COMPANION_PARAM, y as requestedMode } from "./studio-BeltxxKt.js";
|
|
2
|
+
// src/lib/search.ts
|
|
3
|
+
/**
|
|
4
|
+
* Forgiving like the server's own parsing: an unknown value selects nothing rather than failing.
|
|
5
|
+
* Reads the mode with core's precedence, so an unknown `studioMode` never revives a legacy `role`.
|
|
6
|
+
*/
|
|
7
|
+
function validateStudioSearch(raw) {
|
|
8
|
+
const search = {};
|
|
9
|
+
if (typeof raw.companion === "string" && COMPANION_DIGEST_PATTERN.test(raw.companion)) search.companion = raw.companion;
|
|
10
|
+
const params = new URLSearchParams();
|
|
11
|
+
if (raw.studioMode !== void 0) params.set(STUDIO_MODE_PARAM, String(raw.studioMode));
|
|
12
|
+
if (typeof raw.role === "string") params.set(LEGACY_ROLE_PARAM, raw.role);
|
|
13
|
+
const mode = requestedMode(params);
|
|
14
|
+
if (mode) search.studioMode = mode;
|
|
15
|
+
return search;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The address to replace this one with so it names the effective mode and no legacy `role`,
|
|
19
|
+
* or `null` when it already does. A view the mode is not offered lands on the Overview.
|
|
20
|
+
*/
|
|
21
|
+
function canonicalHref(pathname, searchStr, view, studioMode) {
|
|
22
|
+
const params = new URLSearchParams(searchStr);
|
|
23
|
+
const offered = view === void 0 || viewsFor(studioMode).includes(view);
|
|
24
|
+
if (params.get("studioMode") === studioMode && !params.has("role") && offered) return null;
|
|
25
|
+
if (!offered) {
|
|
26
|
+
const landing = new URLSearchParams();
|
|
27
|
+
const companion = params.get(COMPANION_PARAM);
|
|
28
|
+
if (companion !== null) landing.set(COMPANION_PARAM, companion);
|
|
29
|
+
landing.set(STUDIO_MODE_PARAM, studioMode);
|
|
30
|
+
return `/?${landing}`;
|
|
31
|
+
}
|
|
32
|
+
params.delete(LEGACY_ROLE_PARAM);
|
|
33
|
+
params.set(STUDIO_MODE_PARAM, studioMode);
|
|
34
|
+
return `${pathname}?${params}`;
|
|
35
|
+
}
|
|
36
|
+
export { validateStudioSearch as n, canonicalHref as t };
|