@uniqbit/mate-core 0.17.0-canary.9 → 0.17.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.
Files changed (103) hide show
  1. package/package.json +11 -5
  2. package/src/cli/commands/artifact/finish/index.ts +0 -9
  3. package/src/cli/commands/artifact/finish/openspec.ts +2 -2
  4. package/src/cli/commands/artifact/finish/registry.ts +1 -1
  5. package/src/cli/commands/artifact/pending/discovery.ts +1 -1
  6. package/src/cli/commands/artifact/pending/index.ts +0 -16
  7. package/src/cli/commands/cap/graphify.ts +1 -1
  8. package/src/cli/commands/cap/index-cmd.ts +1 -1
  9. package/src/cli/commands/cap/tokensave.ts +4 -3
  10. package/src/cli/commands/companion/companion.ts +4 -0
  11. package/src/cli/commands/companion/hub.ts +2 -1
  12. package/src/cli/commands/companion/list.ts +2 -1
  13. package/src/cli/commands/companion/prepare.ts +2 -2
  14. package/src/cli/commands/companion/update.ts +334 -0
  15. package/src/cli/commands/doctor.ts +2 -1
  16. package/src/cli/commands/install.ts +59 -5
  17. package/src/cli/commands/launch/shared.ts +2 -1
  18. package/src/cli/commands/plugin/plugin.ts +4 -0
  19. package/src/cli/commands/plugin/verify.ts +25 -0
  20. package/src/cli/commands/report/highlight.ts +1 -4
  21. package/src/cli/commands/report/renderer.ts +0 -2
  22. package/src/cli/commands/studio/access.ts +201 -0
  23. package/src/cli/commands/studio/index.ts +207 -26
  24. package/src/cli/commands/studio/openspec-cli.ts +1 -1
  25. package/src/cli/commands/studio/selection.ts +127 -11
  26. package/src/cli/commands/studio/server.ts +355 -64
  27. package/src/cli/commands/studio/terminal-assets.ts +50 -0
  28. package/src/cli/commands/studio/terminal-launch.ts +71 -0
  29. package/src/cli/commands/studio/terminal.ts +593 -0
  30. package/src/cli/commands/studio/vault.ts +320 -75
  31. package/src/cli/commands/studio/views/client.ts +90 -9
  32. package/src/cli/commands/studio/views/companion-picker.tsx +9 -5
  33. package/src/cli/commands/studio/views/companion-selector.tsx +11 -7
  34. package/src/cli/commands/studio/views/document.tsx +411 -107
  35. package/src/cli/commands/studio/views/model.ts +14 -1
  36. package/src/cli/commands/studio/views/selection-fields.tsx +14 -0
  37. package/src/cli/commands/studio/views/styles.ts +106 -13
  38. package/src/cli/commands/studio/views/terminal.tsx +426 -0
  39. package/src/cli/commands/studio/views/vault/state.ts +42 -0
  40. package/src/cli/commands/studio/views/workflow/steps.ts +10 -3
  41. package/src/cli/commands/update.ts +11 -8
  42. package/src/cli/companion-link-wizard.tsx +1 -1
  43. package/src/cli/companion-selector.tsx +1 -1
  44. package/src/cli/launch-selector.tsx +1 -1
  45. package/src/cli/main.ts +2 -1
  46. package/src/cli/usage.ts +7 -3
  47. package/src/cli/write-json-stdout.ts +2 -2
  48. package/src/lib/components/spinner.tsx +2 -2
  49. package/src/lib/components/startup-progress.tsx +1 -1
  50. package/src/lib/context-mode-package.ts +1 -1
  51. package/src/lib/opencode-plugin-package.ts +3 -0
  52. package/src/lib/orchestrator/adapters/opencode.ts +53 -13
  53. package/src/lib/orchestrator/companion-hub.ts +3 -3
  54. package/src/lib/orchestrator/companion-registry-store.ts +1 -1
  55. package/src/lib/orchestrator/config-store.ts +2 -2
  56. package/src/lib/orchestrator/editor.ts +4 -12
  57. package/src/lib/orchestrator/engine-guard.ts +9 -1
  58. package/src/lib/orchestrator/projection-entries.ts +1 -1
  59. package/src/lib/orchestrator/projection-record.ts +1 -1
  60. package/src/lib/orchestrator/projection-types.ts +0 -4
  61. package/src/lib/orchestrator/repo-local-registry.ts +0 -1
  62. package/src/lib/orchestrator/root-context.ts +1 -1
  63. package/src/lib/orchestrator/setup-compatibilities.ts +1 -1
  64. package/src/lib/orchestrator/setup-preflight.ts +1 -1
  65. package/src/lib/orchestrator/types.ts +1 -1
  66. package/src/lib/orchestrator/working-repo-projection.ts +1 -1
  67. package/src/lib/orchestrator/workspace-inventory.ts +2 -2
  68. package/src/lib/package-paths.ts +1 -11
  69. package/src/lib/package-root.ts +43 -0
  70. package/src/lib/prebuilt-workspace.ts +1 -1
  71. package/src/lib/public-npm.ts +1 -1
  72. package/src/opencode/companion-hooks.ts +131 -153
  73. package/src/opencode/index.ts +12 -6
  74. package/src/opencode/tui.tsx +46 -49
  75. package/src/playbooks/companion-guidance.ts +1 -28
  76. package/src/runtime/companion-sync.ts +0 -3
  77. package/src/templates/capabilities/openspec-cap/mate-minimal/schema.yaml +2 -1
  78. package/src/templates/providers/opencode/opencode.json +6 -4
  79. package/src/tools/setup/__snapshots__/runtime-surface-golden.test.ts.snap +500 -408
  80. package/src/tools/setup/capabilities/context-mode.ts +45 -25
  81. package/src/tools/setup/capabilities/graphify-shared.ts +3 -3
  82. package/src/tools/setup/capabilities/graphify.ts +2 -2
  83. package/src/tools/setup/capabilities/openspec.ts +2 -7
  84. package/src/tools/setup/capabilities/react-doctor.ts +1 -1
  85. package/src/tools/setup/capabilities/rtk.ts +2 -2
  86. package/src/tools/setup/capabilities/tokensave.ts +98 -12
  87. package/src/tools/setup/context-services.ts +3 -6
  88. package/src/tools/setup/dynamic-plugins/declarations.ts +47 -0
  89. package/src/tools/setup/dynamic-plugins/frozen.ts +215 -0
  90. package/src/tools/setup/dynamic-plugins/hydrate.ts +1 -40
  91. package/src/tools/setup/dynamic-plugins/loader.ts +16 -0
  92. package/src/tools/setup/dynamic-plugins/policy.ts +55 -0
  93. package/src/tools/setup/dynamic-plugins/staging.ts +53 -0
  94. package/src/tools/setup/dynamic-plugins/verify.ts +70 -0
  95. package/src/tools/setup/mate.ts +1 -1
  96. package/src/tools/setup/providers/claude-format.ts +1 -1
  97. package/src/tools/setup/providers/claude.ts +1 -1
  98. package/src/tools/setup/providers/opencode-format.ts +220 -25
  99. package/src/tools/setup/providers/opencode.ts +63 -21
  100. package/src/tools/setup/runtime-documents.ts +9 -11
  101. package/src/tools/setup.ts +0 -4
  102. package/src/cli/commands/studio/views/pairings.tsx +0 -38
  103. package/src/templates/providers/opencode/tui.json +0 -3
@@ -1,8 +1,14 @@
1
1
  /** @jsxImportSource hono/jsx */
2
2
 
3
3
  import type { StudioInventory, StudioInventoryCompanion } from "../inventory";
4
- import { companionDigest, type StudioSelection } from "../selection";
4
+ import {
5
+ COMPANION_PARAM,
6
+ companionDigest,
7
+ type StudioSelection,
8
+ switchCompanion,
9
+ } from "../selection";
5
10
  import { healthNote } from "./model";
11
+ import { SelectionFields } from "./selection-fields";
6
12
 
7
13
  interface CompanionPickerProps {
8
14
  inventory: StudioInventory;
@@ -45,9 +51,7 @@ export function CompanionPicker({ inventory, selection }: CompanionPickerProps)
45
51
  Studio serves one companion at a time, and remembers the one you choose for your next visit.
46
52
  </p>
47
53
  <form method="get" action="/">
48
- {selection.view === "dashboard" ? null : (
49
- <input type="hidden" name="view" value={selection.view} />
50
- )}
54
+ <SelectionFields selection={switchCompanion(selection, null)} />
51
55
  <div className="picker-grid">
52
56
  {companions.map((companion) => (
53
57
  <CompanionCard key={companionDigest(companion.path)} companion={companion} />
@@ -66,7 +70,7 @@ function CompanionCard({ companion }: { companion: StudioInventoryCompanion }) {
66
70
  return (
67
71
  <button
68
72
  type="submit"
69
- name="companion"
73
+ name={COMPANION_PARAM}
70
74
  value={companionDigest(companion.path)}
71
75
  className="picker-card"
72
76
  data-unready={companion.health === "ready" ? undefined : "true"}
@@ -1,8 +1,15 @@
1
1
  /** @jsxImportSource hono/jsx */
2
2
 
3
3
  import type { StudioInventoryCompanion } from "../inventory";
4
- import { companionDigest, resolveCompanion, type StudioSelection } from "../selection";
4
+ import {
5
+ COMPANION_PARAM,
6
+ companionDigest,
7
+ resolveCompanion,
8
+ type StudioSelection,
9
+ switchCompanion,
10
+ } from "../selection";
5
11
  import { healthNote, type StudioPage } from "./model";
12
+ import { SelectionFields } from "./selection-fields";
6
13
 
7
14
  interface CompanionSelectorProps {
8
15
  inventory: StudioPage["inventory"];
@@ -11,8 +18,7 @@ interface CompanionSelectorProps {
11
18
 
12
19
  /**
13
20
  * A GET form, so choosing a companion is a navigation to the URL naming it. The
14
- * change is deliberately not carried over: it belongs to the companion being
15
- * left behind.
21
+ * hidden fields are the switch with no companion; the `<select>` names it.
16
22
  */
17
23
  export function CompanionSelector({ inventory, selection }: CompanionSelectorProps) {
18
24
  const companions = inventory.companions;
@@ -21,11 +27,9 @@ export function CompanionSelector({ inventory, selection }: CompanionSelectorPro
21
27
  return (
22
28
  <form className="sidebar-scope" method="get" action="/">
23
29
  <span className="sidebar-label">Scope</span>
24
- {selection.view === "dashboard" ? null : (
25
- <input type="hidden" name="view" value={selection.view} />
26
- )}
30
+ <SelectionFields selection={switchCompanion(selection, null)} />
27
31
  {/* eslint-disable-next-line react/no-unknown-property -- raw HTML attribute: hono/jsx server-renders this inline handler */}
28
- <select name="companion" aria-label="Companion Repository">
32
+ <select name={COMPANION_PARAM} aria-label="Companion Repository">
29
33
  <PlaceholderOption companionCount={companions.length} selected={selected} />
30
34
  {companions.map((companion) => {
31
35
  const digest = companionDigest(companion.path);