@north-light/cli 0.3.790 → 0.3.791

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 (66) hide show
  1. package/dist/api/contract.d.ts +1 -1
  2. package/dist/api/contract.js +1 -1
  3. package/dist/api/dto/nodes.d.ts +0 -12
  4. package/dist/builtin-pi-packages/pi-crtr-extensions/extensions/memory-slash-commands.ts +3 -2
  5. package/dist/clients/attach/viewer.js +526 -526
  6. package/dist/commands/node/bash.js +1 -1
  7. package/dist/commands/node/inspect.js +6 -6
  8. package/dist/commands/node/lifecycle.js +4 -4
  9. package/dist/commands/node-context.js +2 -2
  10. package/dist/core/canvas/node-agent-paths.d.ts +5 -0
  11. package/dist/core/canvas/node-agent-paths.js +1 -1
  12. package/dist/core/canvas/paths.d.ts +3 -10
  13. package/dist/core/canvas/paths.js +1 -1
  14. package/dist/core/canvas/render-source.js +1 -1
  15. package/dist/core/providers/files.js +1 -1
  16. package/dist/core/runtime/bearings-render.d.ts +2 -2
  17. package/dist/core/runtime/bearings-render.js +11 -11
  18. package/dist/core/runtime/bearings.js +1 -1
  19. package/dist/core/runtime/broker/attachments-fetch.js +1 -1
  20. package/dist/core/runtime/broker/bash-job-launch.d.ts +0 -4
  21. package/dist/core/runtime/broker/bash-job-launch.js +1 -1
  22. package/dist/core/runtime/broker/daemon-ops.d.ts +0 -8
  23. package/dist/core/runtime/broker/daemon-ops.js +1 -1
  24. package/dist/core/runtime/broker/frame-dispatch.d.ts +1 -1
  25. package/dist/core/runtime/broker/frame-dispatch.js +1 -1
  26. package/dist/core/runtime/broker/host-path-tokens.d.ts +5 -0
  27. package/dist/core/runtime/broker/host-path-tokens.js +1 -0
  28. package/dist/core/runtime/broker-extension-render.js +2 -2
  29. package/dist/core/runtime/broker.js +1 -1
  30. package/dist/core/runtime/host.js +3 -3
  31. package/dist/core/runtime/kickoff.d.ts +1 -1
  32. package/dist/core/runtime/kickoff.js +12 -12
  33. package/dist/core/runtime/nodes.js +1 -1
  34. package/dist/core/runtime/revive.js +2 -2
  35. package/dist/core/runtime/runner/blaxel/runner.js +2 -2
  36. package/dist/core/runtime/runner/launch-env.d.ts +7 -0
  37. package/dist/core/runtime/runner/launch-env.js +1 -0
  38. package/dist/core/runtime/runner/machine/executor.js +2 -2
  39. package/dist/core/runtime/runner/types.d.ts +1 -0
  40. package/dist/core/runtime/spawn.js +2 -2
  41. package/dist/core/storage/attachments.d.ts +1 -1
  42. package/dist/core/storage/attachments.js +1 -1
  43. package/dist/core/storage/tables.d.ts +6 -2
  44. package/dist/core/storage/tables.js +4 -4
  45. package/dist/core/substrate/delivery/deliver.js +1 -1
  46. package/dist/core/substrate/delivery/render-boot.js +1 -1
  47. package/dist/daemon/api/handlers/bash-jobs.js +3 -3
  48. package/dist/daemon/api/handlers/nodes.js +1 -1
  49. package/dist/daemon/api/map.d.ts +1 -4
  50. package/dist/daemon/api/map.js +2 -2
  51. package/dist/daemon/cron/machine-fire.js +1 -1
  52. package/dist/daemon/reconcilers/bash-deadline.js +1 -1
  53. package/dist/pi-extensions/canvas-bash-valve.js +6 -6
  54. package/dist/pi-extensions/canvas-context-intro.js +2 -2
  55. package/dist/pi-extensions/canvas-inbox-watcher.js +2 -2
  56. package/package.json +3 -3
  57. package/packages/crouter-api/dist/api/contract.js +1 -1
  58. package/packages/crouter-api/dist/core/canvas/paths.js +4 -13
  59. package/packages/crouter-api/dist/core/runtime/broker/attachments-fetch.js +18 -2
  60. package/packages/crouter-api/dist/core/runtime/broker/daemon-ops.js +0 -10
  61. package/packages/crouter-api/dist/core/runtime/broker/host-path-tokens.js +21 -0
  62. package/packages/crouter-api/package.json +1 -1
  63. package/packages/crouter-identity/package.json +1 -1
  64. package/packages/crouter-plugin/package.json +3 -3
  65. package/runtime.lock.json +14 -14
  66. package/scripts/sandbox-start.mjs +5 -3
@@ -1,5 +1,5 @@
1
1
  /** The contract level this build serves and requires. Written by `scripts/contract.mjs release`; never edit by hand. */
2
- export declare const CONTRACT_LEVEL = "1.89";
2
+ export declare const CONTRACT_LEVEL = "1.90";
3
3
  /** Request header naming the one contract level the caller needs, e.g. `1.3`. Optional: absent means no check. */
4
4
  export declare const REQUIRED_CONTRACT_HEADER = "Crouter-Required-Contract";
5
5
  /** Response header listing the contract levels the server serves, comma-separated, one per major, e.g. `1.3`. */
@@ -1 +1 @@
1
- var c=Object.defineProperty;var e=(r,t)=>c(r,"name",{value:t,configurable:!0});const f="1.89",i="Crouter-Required-Contract",p="Crouter-Contract";function l(r){const t=/^(\d+)\.(\d+)$/.exec(r.trim());return t===null?null:{major:Number(t[1]),minor:Number(t[2])}}e(l,"parseContractLevel");function a(r){return r==null?[]:r.split(",").map(t=>l(t)).filter(t=>t!==null)}e(a,"parseServedContracts");function s(r,t){const n=l(r);return n===null?!1:(typeof t=="string"||t===null||t===void 0?a(t):t).some(u=>u.major===n.major&&u.minor>=n.minor)}e(s,"contractSatisfies");function C(r,t,n={}){if(r===void 0)return null;if(l(r)===null)return{status:400,code:"invalid_request",param:i,message:`${i} must be a contract level like 1.0.`};if(s(r,t))return null;const o=r.trim();return{status:426,code:"runtime_version_unsupported",message:t===null||a(t).length===0?`The runtime did not name its contract level; the caller requires contract ${o} or later. Roll the runtime forward.`:`The runtime serves contract ${t}; the caller requires contract ${o} or later within the same major. Roll the runtime forward, or pin an SDK whose crouterContract the runtime serves.`,details:{sdk_version:(n.legacyMinimum??"").trim(),runtime_version:n.runtimeVersion??null,required_contract:o,runtime_contract:t}}}e(C,"contractRefusal");export{p as CONTRACT_HEADER,f as CONTRACT_LEVEL,i as REQUIRED_CONTRACT_HEADER,C as contractRefusal,s as contractSatisfies,l as parseContractLevel,a as parseServedContracts};
1
+ var c=Object.defineProperty;var e=(r,t)=>c(r,"name",{value:t,configurable:!0});const f="1.90",i="Crouter-Required-Contract",p="Crouter-Contract";function l(r){const t=/^(\d+)\.(\d+)$/.exec(r.trim());return t===null?null:{major:Number(t[1]),minor:Number(t[2])}}e(l,"parseContractLevel");function a(r){return r==null?[]:r.split(",").map(t=>l(t)).filter(t=>t!==null)}e(a,"parseServedContracts");function s(r,t){const n=l(r);return n===null?!1:(typeof t=="string"||t===null||t===void 0?a(t):t).some(u=>u.major===n.major&&u.minor>=n.minor)}e(s,"contractSatisfies");function C(r,t,n={}){if(r===void 0)return null;if(l(r)===null)return{status:400,code:"invalid_request",param:i,message:`${i} must be a contract level like 1.0.`};if(s(r,t))return null;const o=r.trim();return{status:426,code:"runtime_version_unsupported",message:t===null||a(t).length===0?`The runtime did not name its contract level; the caller requires contract ${o} or later. Roll the runtime forward.`:`The runtime serves contract ${t}; the caller requires contract ${o} or later within the same major. Roll the runtime forward, or pin an SDK whose crouterContract the runtime serves.`,details:{sdk_version:(n.legacyMinimum??"").trim(),runtime_version:n.runtimeVersion??null,required_contract:o,runtime_contract:t}}}e(C,"contractRefusal");export{p as CONTRACT_HEADER,f as CONTRACT_LEVEL,i as REQUIRED_CONTRACT_HEADER,C as contractRefusal,s as contractSatisfies,l as parseContractLevel,a as parseServedContracts};
@@ -160,14 +160,6 @@ export interface NodeEdgesDTO {
160
160
  /** Children I spawned. */
161
161
  children: NodeIdDTO[];
162
162
  }
163
- /** Absolute filesystem paths for a node (absorbs the `paths` read). */
164
- export interface NodePathsDTO {
165
- node_dir: string;
166
- context_dir: string;
167
- meta_path: string;
168
- transcript_path: string;
169
- view_socket: string;
170
- }
171
163
  /** A node's managed git worktree, if any. */
172
164
  export interface NodeWorktreeDTO {
173
165
  state: 'open' | 'closed' | 'abandoned';
@@ -250,7 +242,6 @@ export interface NodeDetailDTO extends Omit<NodeSummaryDTO, 'outcome'> {
250
242
  * coordinates without duplicating the full review record. */
251
243
  review_binding?: NodeReviewBindingDTO | null;
252
244
  edges: NodeEdgesDTO;
253
- paths: NodePathsDTO;
254
245
  worktree?: NodeWorktreeDTO | null;
255
246
  /** Present only on a `POST /promote` response — the roadmap/goal facts the
256
247
  * promote primitive returns beyond the node meta (spec §6.2). A plain detail
@@ -372,11 +363,8 @@ export interface TranscriptDTO {
372
363
  export interface ContextRootDTO {
373
364
  node_id: NodeIdDTO;
374
365
  label: string;
375
- dir: string;
376
366
  /** True for the node's own context root. */
377
367
  self: boolean;
378
- /** Count of context files plus report documents for the root. */
379
- files: number;
380
368
  }
381
369
  /** `GET /v1/nodes/{id}/context` result (the listing; the nvim popup stays local). */
382
370
  export interface ContextListDTO {
@@ -1,6 +1,7 @@
1
1
  import { envNodeId } from '../../../shared/env.js';
2
2
  import type { ExtensionAPI } from '@earendil-works/pi-coding-agent';
3
3
  import type { DeliveryCommandDTO } from '../../../api/dto/delivery.js';
4
+ import { expandHostPathTokens } from '../../../core/runtime/broker/host-path-tokens.js';
4
5
  import { brokerDelivery } from '../../../core/runtime/broker/daemon-ops.js';
5
6
  import {
6
7
  expandDeterministicCommand,
@@ -47,13 +48,13 @@ async function listSlashCommands(): Promise<DeliveryCommandDTO[]> {
47
48
  function readSlashCommand(name: string): { canonicalBody: string; executionBody: string } {
48
49
  const resolved = resolvedCommands.get(name);
49
50
  if (resolved === undefined) throw new Error(`slash command document was not resolved: ${name}`);
50
- return { canonicalBody: resolved.canonical_body, executionBody: resolved.execution_body };
51
+ return { canonicalBody: resolved.canonical_body, executionBody: expandHostPathTokens(resolved.execution_body) };
51
52
  }
52
53
 
53
54
  async function slashReadAttachments(name: string): Promise<{ blocks: string[]; execution_body: string }> {
54
55
  const res = await brokerDelivery(nodeIdOrThrow(), { activity: 'slash-command', subject: name });
55
56
  if (res.execution_body === undefined) throw new Error(`slash command document has no execution body: ${name}`);
56
- return { blocks: (res.blocks ?? []).filter((block) => block !== ''), execution_body: res.execution_body };
57
+ return { blocks: (res.blocks ?? []).filter((block) => block !== ''), execution_body: expandHostPathTokens(res.execution_body) };
57
58
  }
58
59
 
59
60
  function hasNodeRelativeExpansion(body: string): boolean {