@north-light/crouter 0.3.163 → 0.3.165

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 (167) hide show
  1. package/dist/build-root.d.ts +6 -6
  2. package/dist/build-root.js +12 -13
  3. package/dist/builtin-memory/00-runtime-base.md +3 -4
  4. package/dist/builtin-memory/01-spine/01-no-manager.md +1 -1
  5. package/dist/builtin-memory/02-lifecycle/00-terminal.md +2 -0
  6. package/dist/builtin-memory/04-orchestration-kernel.md +16 -18
  7. package/dist/builtin-memory/05-kinds/advisor/00-base.md +0 -2
  8. package/dist/builtin-memory/05-kinds/advisor/01-orchestrator.md +3 -9
  9. package/dist/builtin-memory/05-kinds/developer/00-base.md +1 -3
  10. package/dist/builtin-memory/05-kinds/developer/01-orchestrator.md +2 -10
  11. package/dist/builtin-memory/05-kinds/explore/00-base.md +2 -2
  12. package/dist/builtin-memory/05-kinds/explore/01-orchestrator.md +0 -2
  13. package/dist/builtin-memory/05-kinds/general/00-base.md +3 -5
  14. package/dist/builtin-memory/05-kinds/general/01-orchestrator.md +0 -4
  15. package/dist/builtin-memory/05-kinds/plan/01-orchestrator.md +1 -3
  16. package/dist/builtin-memory/05-kinds/plan/reviewers/00-base.md +12 -0
  17. package/dist/builtin-memory/05-kinds/plan/reviewers/architecture-fit.md +0 -2
  18. package/dist/builtin-memory/05-kinds/plan/reviewers/code-smells.md +0 -2
  19. package/dist/builtin-memory/05-kinds/plan/reviewers/pattern-consistency.md +0 -2
  20. package/dist/builtin-memory/05-kinds/plan/reviewers/requirements-coverage.md +1 -1
  21. package/dist/builtin-memory/05-kinds/plan/reviewers/security.md +0 -2
  22. package/dist/builtin-memory/05-kinds/review/00-base.md +0 -2
  23. package/dist/builtin-memory/05-kinds/review/01-orchestrator.md +1 -3
  24. package/dist/builtin-memory/05-kinds/spec/00-base.md +1 -1
  25. package/dist/builtin-memory/05-kinds/spec/01-orchestrator.md +2 -4
  26. package/dist/builtin-memory/05-kinds/spec/requirements.md +1 -1
  27. package/dist/builtin-memory/advisor/council.md +40 -0
  28. package/dist/builtin-memory/design.md +8 -11
  29. package/dist/builtin-memory/development.md +6 -9
  30. package/dist/builtin-memory/internal/INDEX.md +5 -5
  31. package/dist/builtin-memory/internal/agent-shaping.md +5 -7
  32. package/dist/builtin-memory/internal/examples/imessage-assistant.md +3 -3
  33. package/dist/builtin-memory/internal/marketplaces.md +13 -14
  34. package/dist/builtin-memory/internal/memory-loading.md +45 -0
  35. package/dist/builtin-memory/internal/nodes-and-canvas.md +4 -4
  36. package/dist/builtin-memory/internal/plugins.md +61 -45
  37. package/dist/builtin-memory/planning.md +4 -7
  38. package/dist/builtin-memory/spec.md +9 -12
  39. package/dist/builtin-memory/wedged-child-on-runaway-bash.md +8 -22
  40. package/dist/cli.js +1 -1
  41. package/dist/clients/attach/__tests__/attach-keybindings.test.js +17 -4
  42. package/dist/clients/attach/__tests__/context-message.test.js +31 -20
  43. package/dist/clients/attach/__tests__/crtr-output-coverage.test.js +1 -1
  44. package/dist/clients/attach/__tests__/crtr-output.test.js +39 -30
  45. package/dist/clients/attach/__tests__/edit-diff.test.js +21 -20
  46. package/dist/clients/attach/render/chat-view.d.ts +20 -20
  47. package/dist/clients/attach/render/chat-view.js +88 -89
  48. package/dist/clients/attach/render/{frozen-history.d.ts → condensed-history.d.ts} +1 -18
  49. package/dist/clients/attach/render/condensed-history.js +60 -0
  50. package/dist/clients/attach/render/context-message.js +9 -14
  51. package/dist/clients/attach/render/crtr-output.d.ts +2 -1
  52. package/dist/clients/attach/render/crtr-output.js +4 -4
  53. package/dist/clients/attach/render/edit-diff.d.ts +21 -6
  54. package/dist/clients/attach/render/edit-diff.js +90 -91
  55. package/dist/clients/attach/render/tool-calls.d.ts +14 -18
  56. package/dist/clients/attach/render/tool-calls.js +66 -41
  57. package/dist/clients/attach/session/bindings.d.ts +5 -3
  58. package/dist/clients/attach/session/bindings.js +7 -13
  59. package/dist/clients/attach/session/keys.d.ts +2 -0
  60. package/dist/clients/attach/session/keys.js +36 -37
  61. package/dist/clients/attach/session/profile-files.d.ts +8 -0
  62. package/dist/clients/attach/session/profile-files.js +157 -0
  63. package/dist/clients/attach/viewer.js +530 -528
  64. package/dist/commands/memory/lint.js +1 -1
  65. package/dist/commands/memory/write.js +1 -1
  66. package/dist/commands/node.js +2 -2
  67. package/dist/commands/pkg/plugin-inspect.js +6 -7
  68. package/dist/commands/pkg/plugin-manage.d.ts +1 -1
  69. package/dist/commands/pkg/plugin-manage.js +131 -19
  70. package/dist/commands/pkg/plugin.js +2 -2
  71. package/dist/commands/pkg.js +6 -11
  72. package/dist/commands/profile/env.js +3 -3
  73. package/dist/commands/sys/config.js +17 -76
  74. package/dist/commands/sys/doctor.js +5 -91
  75. package/dist/commands/sys/setup-wizard.d.ts +9 -11
  76. package/dist/commands/sys/setup-wizard.js +47 -81
  77. package/dist/core/__tests__/base-worker-prompt.test.js +18 -21
  78. package/dist/core/__tests__/command-plugins-surfaces.test.js +39 -5
  79. package/dist/core/__tests__/command-plugins.test.js +36 -16
  80. package/dist/core/__tests__/review-model-floor.test.js +2 -2
  81. package/dist/core/__tests__/tmux-surface.test.js +10 -1
  82. package/dist/core/command-manifests/manifest.d.ts +24 -0
  83. package/dist/core/{configured-clis → command-manifests}/manifest.js +21 -25
  84. package/dist/core/command-manifests/registry.d.ts +1 -2
  85. package/dist/core/command-manifests/registry.js +2 -2
  86. package/dist/core/command-manifests/schema.d.ts +11 -13
  87. package/dist/core/command-manifests/schema.js +53 -192
  88. package/dist/core/command-plugins/compose.d.ts +0 -6
  89. package/dist/core/command-plugins/compose.js +28 -75
  90. package/dist/core/command-plugins/discovery.d.ts +25 -58
  91. package/dist/core/command-plugins/discovery.js +152 -259
  92. package/dist/core/command-plugins/endpoint.d.ts +24 -0
  93. package/dist/core/command-plugins/endpoint.js +48 -0
  94. package/dist/core/command-plugins/store.d.ts +16 -0
  95. package/dist/core/command-plugins/store.js +64 -0
  96. package/dist/core/command-plugins/{adapter.d.ts → transport/exec-invoke.d.ts} +3 -3
  97. package/dist/core/command-plugins/{adapter.js → transport/exec-invoke.js} +4 -4
  98. package/dist/core/{configured-clis/fetch.d.ts → command-plugins/transport/http-fetch.d.ts} +9 -18
  99. package/dist/core/{configured-clis/fetch.js → command-plugins/transport/http-fetch.js} +15 -35
  100. package/dist/core/{configured-clis/invoker.d.ts → command-plugins/transport/http-invoke.d.ts} +7 -7
  101. package/dist/core/{configured-clis/invoker.js → command-plugins/transport/http-invoke.js} +21 -23
  102. package/dist/core/command.d.ts +8 -9
  103. package/dist/core/command.js +6 -9
  104. package/dist/core/config.js +6 -10
  105. package/dist/core/env-name.d.ts +6 -0
  106. package/dist/core/env-name.js +9 -0
  107. package/dist/core/io.d.ts +1 -1
  108. package/dist/core/keybindings/__tests__/resolve.test.js +40 -3
  109. package/dist/core/keybindings/attach-control.d.ts +37 -0
  110. package/dist/core/keybindings/attach-control.js +38 -0
  111. package/dist/core/keybindings/catalog.d.ts +5 -4
  112. package/dist/core/keybindings/catalog.js +16 -8
  113. package/dist/core/keybindings/index.d.ts +1 -0
  114. package/dist/core/keybindings/index.js +1 -0
  115. package/dist/core/keybindings/types.d.ts +1 -1
  116. package/dist/core/preview-registry.js +41 -74
  117. package/dist/core/runtime/bearings.d.ts +2 -5
  118. package/dist/core/runtime/bearings.js +2 -5
  119. package/dist/core/runtime/front-door.d.ts +1 -1
  120. package/dist/core/runtime/front-door.js +2 -2
  121. package/dist/core/runtime/kickoff.d.ts +3 -3
  122. package/dist/core/runtime/kickoff.js +4 -3
  123. package/dist/core/runtime/situational-context.d.ts +1 -1
  124. package/dist/core/runtime/situational-context.js +1 -1
  125. package/dist/core/runtime/spawn.js +9 -9
  126. package/dist/core/runtime/tmux.js +29 -2
  127. package/dist/core/scope.d.ts +0 -5
  128. package/dist/core/scope.js +0 -10
  129. package/dist/core/user-settings.d.ts +193 -0
  130. package/dist/core/user-settings.js +252 -0
  131. package/dist/index.d.ts +4 -0
  132. package/dist/index.js +3 -0
  133. package/dist/pi-extensions/canvas-stophook.js +3 -2
  134. package/dist/pi-extensions/canvas-tool-guide.js +4 -1
  135. package/dist/shared/generated-context.d.ts +34 -0
  136. package/dist/shared/generated-context.js +98 -0
  137. package/dist/types.d.ts +23 -16
  138. package/dist/types.js +3 -14
  139. package/dist/web-client/assets/{index-NIuSCOHM.js → index-BMTOGuOZ.js} +19 -19
  140. package/dist/web-client/assets/index-DvA6Zw-R.css +2 -0
  141. package/dist/web-client/index.html +2 -2
  142. package/dist/web-client/sw.js +1 -1
  143. package/docs/public-api.md +1 -0
  144. package/package.json +2 -2
  145. package/runtime.lock.json +6 -6
  146. package/dist/builtin-memory/05-kinds/product/00-base.md +0 -25
  147. package/dist/builtin-memory/05-kinds/product/01-orchestrator.md +0 -15
  148. package/dist/builtin-memory/05-kinds/product/teardown.md +0 -15
  149. package/dist/builtin-memory/internal/workflow-codification.md +0 -82
  150. package/dist/builtin-memory/product.md +0 -80
  151. package/dist/clients/attach/render/frozen-history.js +0 -100
  152. package/dist/commands/pkg/cli-inspect.d.ts +0 -17
  153. package/dist/commands/pkg/cli-inspect.js +0 -190
  154. package/dist/commands/pkg/cli-manage.d.ts +0 -3
  155. package/dist/commands/pkg/cli-manage.js +0 -206
  156. package/dist/commands/pkg/cli.d.ts +0 -1
  157. package/dist/commands/pkg/cli.js +0 -14
  158. package/dist/core/configured-clis/cache.d.ts +0 -16
  159. package/dist/core/configured-clis/cache.js +0 -57
  160. package/dist/core/configured-clis/compose.d.ts +0 -14
  161. package/dist/core/configured-clis/compose.js +0 -60
  162. package/dist/core/configured-clis/discovery.d.ts +0 -47
  163. package/dist/core/configured-clis/discovery.js +0 -173
  164. package/dist/core/configured-clis/manifest.d.ts +0 -24
  165. package/dist/core/configured-clis/registration.d.ts +0 -40
  166. package/dist/core/configured-clis/registration.js +0 -201
  167. package/dist/web-client/assets/index-CqLKj8Xu.css +0 -2
package/dist/types.d.ts CHANGED
@@ -13,6 +13,14 @@ export interface OwnerRef {
13
13
  name?: string;
14
14
  email?: string;
15
15
  }
16
+ export type PluginTransport = {
17
+ kind: 'exec';
18
+ executable: string;
19
+ } | {
20
+ kind: 'http';
21
+ endpoint: string;
22
+ authEnv?: string;
23
+ };
16
24
  export interface PluginManifest {
17
25
  name: string;
18
26
  version?: string;
@@ -26,6 +34,7 @@ export interface PluginManifest {
26
34
  * crtr owns parse/help/render/errors and direct-spawns the plugin's one
27
35
  * executable per leaf invocation. See `src/core/command-plugins/`. */
28
36
  commands?: string;
37
+ transport?: PluginTransport;
29
38
  }
30
39
  export interface MarketplacePluginEntry {
31
40
  name: string;
@@ -50,10 +59,6 @@ export interface ConfigPluginEntry {
50
59
  source_marketplace?: string;
51
60
  version?: string;
52
61
  }
53
- export interface ConfigConfiguredCliEntry {
54
- endpoint: string;
55
- authEnvVar?: string;
56
- }
57
62
  export type AutoUpdateMode = 'notify' | 'apply' | false;
58
63
  export interface AutoUpdateConfig {
59
64
  crtr: AutoUpdateMode;
@@ -139,9 +144,13 @@ export interface ScopeConfig {
139
144
  schema_version: number;
140
145
  marketplaces: Record<string, ConfigMarketplaceEntry>;
141
146
  plugins: Record<string, ConfigPluginEntry>;
142
- configuredClis: Record<string, ConfigConfiguredCliEntry>;
143
147
  auto_update: AutoUpdateConfig;
144
148
  max_panes_per_window: number;
149
+ /** Open a managed child's viewer beside its parent when that parent has a
150
+ * live tmux viewer. Turning this off leaves every new managed child running
151
+ * as a detached broker until someone focuses or attaches it explicitly.
152
+ * Independent attended roots keep their normal viewer behavior. */
153
+ auto_open_child_viewers: boolean;
145
154
  brokerThresholds: BrokerThresholdsConfig;
146
155
  /** Ring a short completion sound in the attach viewer when the node you are
147
156
  * watching finishes a turn and hands control back (the Claude-Code Stop-hook
@@ -149,13 +158,13 @@ export interface ScopeConfig {
149
158
  * node with no viewer attached is silent regardless. Default true. */
150
159
  completion_bell: boolean;
151
160
  /** How many trailing refresh-yield CYCLES the attach viewer renders at full
152
- * fidelity. Older cycles are condensed (cycle dividers plus whatever
153
- * `condensed_history` admits) and frozen into a flat line block:
154
- * no tool components are built for them, and they never re-wrap on resize.
155
- * Tool calls and results measure ~63% of a transcript's rendered lines and
156
- * ~69% of its build time, so this is the dominant cost of attaching to a long
157
- * multi-cycle node. Full detail for every cycle stays in the session file.
158
- * Minimum 1 (the live cycle is never condensed). Default 2. */
161
+ * fidelity. Older cycles are condensed to cycle dividers plus whatever
162
+ * `condensed_history` admits. No tool components are built for them, while
163
+ * retained prose re-wraps when the pane width changes. Tool calls and results
164
+ * measure ~63% of a transcript's rendered lines and ~69% of its build time,
165
+ * so excluding them is the dominant attach-time saving for a long multi-cycle
166
+ * node. Full detail for every cycle stays in the session file. Minimum 1 (the
167
+ * live cycle is never condensed). Default 2. */
159
168
  live_cycles: number;
160
169
  /** What survives from a CONDENSED cycle (one older than the trailing
161
170
  * `live_cycles`). The cycle dividers always remain as seams so you can see
@@ -310,10 +319,8 @@ export declare function defaultRemoteCanvasConfig(): RemoteCanvasConfig;
310
319
  * base-worker defaults; `orchestratorModel` optionally raises the default
311
320
  * for a coordinating persona. Roadmap-shaping guidance is orchestrator-only —
312
321
  * an orchestrator-gated memory doc keyed to the kind, not baked into the
313
- * registry entry. Sub-persona `availableTo` is
314
- * omitted where it only reproduces the default (its own top-level
315
- * ancestor) — `product/teardown` is included explicitly below for parity
316
- * even though its value equals the default. */
322
+ * registry entry. Sub-persona `availableTo` is omitted where it only
323
+ * reproduces the default (its own top-level ancestor). */
317
324
  export declare function defaultKindsConfig(): Record<string, KindConfig>;
318
325
  export declare function defaultModelLaddersConfig(): ModelLaddersConfig;
319
326
  export declare function defaultScopeState(): ScopeState;
package/dist/types.js CHANGED
@@ -31,9 +31,9 @@ export function defaultScopeConfig() {
31
31
  schema_version: SCHEMA_VERSION,
32
32
  marketplaces: {},
33
33
  plugins: {},
34
- configuredClis: {},
35
34
  auto_update: { crtr: 'notify', content: 'notify', interval_hours: 24 },
36
35
  max_panes_per_window: DEFAULT_MAX_PANES_PER_WINDOW,
36
+ auto_open_child_viewers: true,
37
37
  brokerThresholds: { warning: 128, automaticReviveCap: 256 },
38
38
  completion_bell: true,
39
39
  live_cycles: DEFAULT_LIVE_CYCLES,
@@ -56,10 +56,8 @@ export function defaultRemoteCanvasConfig() {
56
56
  * base-worker defaults; `orchestratorModel` optionally raises the default
57
57
  * for a coordinating persona. Roadmap-shaping guidance is orchestrator-only —
58
58
  * an orchestrator-gated memory doc keyed to the kind, not baked into the
59
- * registry entry. Sub-persona `availableTo` is
60
- * omitted where it only reproduces the default (its own top-level
61
- * ancestor) — `product/teardown` is included explicitly below for parity
62
- * even though its value equals the default. */
59
+ * registry entry. Sub-persona `availableTo` is omitted where it only
60
+ * reproduces the default (its own top-level ancestor). */
63
61
  export function defaultKindsConfig() {
64
62
  return {
65
63
  general: {
@@ -89,10 +87,6 @@ export function defaultKindsConfig() {
89
87
  whenToUse: 'Collaborate with the user to discover what to build, then write the spec — behavior, non-goals, interfaces, edge cases, testable acceptance criteria.',
90
88
  model: 'anthropic/strong',
91
89
  },
92
- product: {
93
- whenToUse: 'Discover the real user need behind a request and define the product experience that meets it — use cases, how it should feel and look, grounded in how comparable products solve it. Hands off to spec.',
94
- model: 'anthropic/strong',
95
- },
96
90
  review: {
97
91
  whenToUse: 'Validate or critique code, a plan, or a spec — deliver a complete, severity-rated verdict without adjudicating.',
98
92
  model: 'openai/medium',
@@ -126,11 +120,6 @@ export function defaultKindsConfig() {
126
120
  whenToUse: 'Derive testable EARS requirements from a finished, approved design — in isolation, from the rendered design text alone.',
127
121
  model: 'medium',
128
122
  },
129
- 'product/teardown': {
130
- whenToUse: 'Tear down ONE comparable product against a specific job-to-be-done — how it solves it, where it succeeds and fails its users, and what to borrow, avoid, or differentiate from.',
131
- model: 'medium',
132
- availableTo: ['product'],
133
- },
134
123
  };
135
124
  }
136
125
  export function defaultModelLaddersConfig() {