@north-light/cli 0.3.415 → 0.3.417

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 (42) hide show
  1. package/dist/builtin-memory/00-runtime-base/00-authoring.md +3 -1
  2. package/dist/cli.js +7 -7
  3. package/dist/clients/attach/viewer.js +1025 -1055
  4. package/dist/core/grants/on-sync.js +1 -1
  5. package/dist/core/graph/custom.js +5 -5
  6. package/dist/core/graph/reader.js +3 -3
  7. package/dist/core/graph/spaces/app.js +1 -1
  8. package/dist/core/graph/types.d.ts +5 -0
  9. package/dist/core/runs/confinement.d.ts +2 -0
  10. package/dist/core/runs/confinement.js +2 -2
  11. package/dist/core/runtime/recap.js +1 -1
  12. package/dist/core/runtime/run-command.d.ts +4 -0
  13. package/dist/core/runtime/run-command.js +1 -1
  14. package/dist/core/spaces/mounts.d.ts +5 -0
  15. package/dist/core/spaces/mounts.js +1 -1
  16. package/dist/core/spaces/process.d.ts +8 -0
  17. package/dist/core/spaces/process.js +1 -1
  18. package/dist/daemon/api/handlers/crons.js +1 -1
  19. package/dist/daemon/api/handlers/files.js +1 -1
  20. package/dist/daemon/api/handlers/nodes.js +1 -1
  21. package/dist/daemon/api/handlers/providers.js +1 -1
  22. package/dist/daemon/api/handlers/runs.js +1 -1
  23. package/dist/daemon/api/operations.d.ts +1 -1
  24. package/dist/daemon/api/operations.js +1 -1
  25. package/dist/daemon/api/router.d.ts +15 -0
  26. package/dist/daemon/api/router.js +1 -1
  27. package/dist/daemon/api/server.d.ts +5 -1
  28. package/dist/daemon/api/server.js +1 -1
  29. package/dist/daemon/cron/live-runs.d.ts +28 -0
  30. package/dist/daemon/cron/live-runs.js +1 -1
  31. package/dist/daemon/cron/run-socket.d.ts +30 -0
  32. package/dist/daemon/cron/run-socket.js +1 -0
  33. package/dist/daemon/cron-run.js +2 -1
  34. package/dist/daemon/crtrd.js +7 -7
  35. package/dist/daemon/reconcilers/cron-lane.js +1 -1
  36. package/dist/shared/env.d.ts +6 -5
  37. package/dist/shared/env.js +2 -2
  38. package/dist/types.js +1 -1
  39. package/package.json +9 -9
  40. package/packages/crouter-identity/package.json +1 -1
  41. package/runtime.lock.json +338 -2057
  42. package/scripts/postinstall.mjs +9 -0
@@ -10,6 +10,8 @@ rationale: >-
10
10
 
11
11
  "Ground what you report" and "Acting" exist because the Fable 5 model guidance (adopted 2026-08-22, Silas) showed that an explicit audit-against-tool-results instruction nearly eliminates fabricated status reports, and that un-steered models take unrequested actions and over-deliberate; both sections track the official wording closely on purpose — its density and operational triggers are the quality bar.
12
12
 
13
+ The last sentence of "Acting" — favoring the current request over re-examining earlier answers — exists because models re-deliberate settled answers on later turns, spending thinking on what was already resolved instead of the current ask. Silas asked for it (2026-10-03) and had it softened from "treat that answer as done" to a focus preference rather than a prohibition.
14
+
13
15
  The Mermaid line exists because the viewer's inline diagram affordance is otherwise invisible to an agent working from ordinary Markdown defaults.
14
16
 
15
17
  "Watching" exists because every read records a watch that lasts until the reader removes it, and nothing else an agent sees at boot says so or names `crtr canvas unwatch`; without it agents accumulate edit notices for documents they no longer care about (Silas, 2026-09-26).
@@ -37,7 +39,7 @@ Every document you keep — plan, findings, map, roadmap — is a living stateme
37
39
  Before reporting progress, audit each claim against a tool result from this session. Report only work you can point to evidence for; if something is not yet verified, say so explicitly. Report outcomes faithfully: if tests fail, say so with the output; if a step was skipped, say that; when something is done and verified, state it plainly without hedging.
38
40
 
39
41
  ## Acting
40
- When you have enough information to act, act — do not re-derive facts already established, re-litigate a decision already made, or narrate options you will not pursue; when weighing a choice, give a recommendation, not a survey. When whoever tasked you is describing a problem or thinking out loud rather than requesting a change, the deliverable is your assessment — report your findings and stop. Before a command that changes system state (a restart, a delete, a config edit), check that the evidence supports that specific action — a signal that pattern-matches a known failure may have a different cause.
42
+ When you have enough information to act, act — do not re-derive facts already established, re-litigate a decision already made, or narrate options you will not pursue; when weighing a choice, give a recommendation, not a survey. When whoever tasked you is describing a problem or thinking out loud rather than requesting a change, the deliverable is your assessment — report your findings and stop. Before a command that changes system state (a restart, a delete, a config edit), check that the evidence supports that specific action — a signal that pattern-matches a known failure may have a different cause. On later turns, put your thinking mainly toward what the user is asking now rather than re-examining earlier answers.
41
43
 
42
44
  ## Say what actually happens
43
45
  Everything you write — replies, reports, approval requests, documents, comments — describes systems in concrete, existing product terms: the real command, the real event, the actual cause. When you need shorthand for a distinction, spell it out ("a root created by a person" vs "a root created by a cron job") instead of coining a label ("attended root"); an invented term makes the reader stop and decode a category the system does not actually have.
package/dist/cli.js CHANGED
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
- var w=Object.defineProperty;var s=(r,o)=>w(r,"name",{value:o,configurable:!0});import"./suppress-experimental-warnings.js";import{mkdirSync as v,openSync as R,readFileSync as S,renameSync as E,rmSync as _,statSync as f,writeFileSync as b}from"node:fs";import{dirname as l,join as a}from"node:path";import{enableCompileCache as C}from"node:module";import{fileURLToPath as d}from"node:url";import{isDaemonControlInvocation as u,isLayoutMigrationInvocation as I,personOnlyInvocation as N,resolveDaemonControlRoot as O,resolveLayoutMigrationRoot as k,resolveRoot as x}from"./build-root.js";import{maybeBootRoot as A}from"./core/runtime/front-door.js";import{maybeAutoUpdate as $}from"./core/auto-update.js";import{ensureProjectScope as T}from"./core/bootstrap.js";import{provisionExports as F,pruneLegacyExports as M}from"./core/host-exports/export.js";import{revalidateBundlePlugins as P}from"./core/command-plugins/revalidate.js";import{renderNode as D,runCli as g,walk as L}from"./core/command.js";import{dispatchWithStaleRecovery as j}from"./core/manifest-recovery.js";import{installStdoutErrorPolicy as K}from"./core/stdout-errors.js";import{handle as U}from"./core/io.js";import{CrtrError as y,ownerOnly as B}from"./core/errors.js";import{ExitCode as J}from"./types.js";import{layoutNeedsMigration as W,runtimeRoot as q}from"./core/layout.js";import{ApiError as G}from"./api/index.js";import{mark as e}from"./core/timing.js";import{sandboxCliNodeId as V}from"./shared/env.js";import{nodeRunDir as h}from"./core/canvas/paths.js";import{installBrokerConfigSnapshot as z}from"./core/config.js";R(d(import.meta.url),"r"),K(),e("cli.entry",{cmd:process.argv[2]??"(bare)"});try{C()}catch{}e("cli.compile_cache");const H=a(l(d(import.meta.url)),".."),m=a(q(),"first-run.json");function c(r){return(r instanceof Error?r.message:String(r)).split(/\r?\n/,1)[0]??""}s(c,"errorMessage");function Q(r){const o=l(m);v(o,{recursive:!0});const t=`${m}.${process.pid}.${Date.now()}.tmp`;try{b(t,JSON.stringify({packageVersion:r,completedAt:new Date().toISOString()})+`
3
- `,"utf8"),E(t,m)}finally{_(t,{force:!0})}}s(Q,"writeFirstRunMarker");async function X(){if(process.env.CRTR_NO_AUTO_INIT==="1")return;try{if(f(m,{throwIfNoEntry:!1})!==void 0)return}catch(o){process.stderr.write(`crtr: first-run reconcile marker check failed: ${c(o)}
4
- `);return}try{if(f(a(H,".git"),{throwIfNoEntry:!1})!==void 0)return}catch(o){process.stderr.write(`crtr: first-run reconcile source check failed: ${c(o)}
2
+ var w=Object.defineProperty;var s=(r,o)=>w(r,"name",{value:o,configurable:!0});import"./suppress-experimental-warnings.js";import{mkdirSync as v,openSync as R,readFileSync as S,renameSync as E,rmSync as _,statSync as l,writeFileSync as b}from"node:fs";import{dirname as d,join as a}from"node:path";import{enableCompileCache as C}from"node:module";import{fileURLToPath as u}from"node:url";import{isDaemonControlInvocation as g,isLayoutMigrationInvocation as I,personOnlyInvocation as N,resolveDaemonControlRoot as O,resolveLayoutMigrationRoot as k,resolveRoot as x}from"./build-root.js";import{maybeBootRoot as A}from"./core/runtime/front-door.js";import{maybeAutoUpdate as $}from"./core/auto-update.js";import{ensureProjectScope as T}from"./core/bootstrap.js";import{provisionExports as F,pruneLegacyExports as M}from"./core/host-exports/export.js";import{revalidateBundlePlugins as P}from"./core/command-plugins/revalidate.js";import{renderNode as D,runCli as y,walk as L}from"./core/command.js";import{dispatchWithStaleRecovery as j}from"./core/manifest-recovery.js";import{installStdoutErrorPolicy as K}from"./core/stdout-errors.js";import{handle as U}from"./core/io.js";import{CrtrError as h,ownerOnly as B}from"./core/errors.js";import{ExitCode as J}from"./types.js";import{layoutNeedsMigration as W,runtimeRoot as q}from"./core/layout.js";import{ApiError as G}from"./api/index.js";import{mark as e}from"./core/timing.js";import{launchSnapshotFile as V,sandboxCliNodeId as z}from"./shared/env.js";import{nodeRunDir as f}from"./core/canvas/paths.js";import{installBrokerConfigSnapshot as H}from"./core/config.js";R(u(import.meta.url),"r"),K(),e("cli.entry",{cmd:process.argv[2]??"(bare)"});try{C()}catch{}e("cli.compile_cache");const Q=a(d(u(import.meta.url)),".."),m=a(q(),"first-run.json");function c(r){return(r instanceof Error?r.message:String(r)).split(/\r?\n/,1)[0]??""}s(c,"errorMessage");function X(r){const o=d(m);v(o,{recursive:!0});const t=`${m}.${process.pid}.${Date.now()}.tmp`;try{b(t,JSON.stringify({packageVersion:r,completedAt:new Date().toISOString()})+`
3
+ `,"utf8"),E(t,m)}finally{_(t,{force:!0})}}s(X,"writeFirstRunMarker");async function Y(){if(process.env.CRTR_NO_AUTO_INIT==="1")return;try{if(l(m,{throwIfNoEntry:!1})!==void 0)return}catch(o){process.stderr.write(`crtr: first-run reconcile marker check failed: ${c(o)}
4
+ `);return}try{if(l(a(Q,".git"),{throwIfNoEntry:!1})!==void 0)return}catch(o){process.stderr.write(`crtr: first-run reconcile source check failed: ${c(o)}
5
5
  `);return}let r;try{const{reconcileFirstRun:o}=await import("./commands/sys/setup-core.js");r=await o((t,p)=>{process.stderr.write(`crtr: first-run reconcile ${t} failed: ${c(p)}
6
6
  `)})}catch(o){process.stderr.write(`crtr: first-run reconcile failed: ${c(o)}
7
- `)}finally{if(r!==void 0)try{Q(r)}catch(o){process.stderr.write(`crtr: first-run reconcile marker failed: ${c(o)}
8
- `)}}}s(X,"maybeReconcileFirstRun");async function Y(){const r=I(process.argv),o=V(),t=o!==void 0;if(o!==void 0){process.env.CRTR_API_SOCKET=a(h(o),"cli.sock");const i=N(process.argv);if(i!==null)throw B(`crtr ${i} is not available to an app's node`,"Run this command from the person's terminal.");const n=JSON.parse(S(a(h(o),"broker-launch.json"),"utf8"));if(!n.configSnapshot)throw new Error("node launch is missing its config snapshot");z(n.configSnapshot)}if(!t&&W()&&!u(process.argv)&&!r)throw new y("layout_migration_required","run crtr sys migrate while the runtime is offline",J.NETWORK,{next:"Run `crtr sys migrate` while the runtime is offline, then restart it."});if(r){const i=await k();if(process.argv.slice(4).some(n=>n==="-h"||n==="--help")){process.stdout.write(D(L(i,["sys","migrate"]).node)+`
9
- `);return}await g(i,process.argv);return}if(t||(M(process.argv),await X()),await A(process.argv),e("cli.front_door_passed"),u(process.argv)){await g(await O(),process.argv);return}t||await P(process.argv),e("cli.plugins_revalidated");const p=await x(process.argv[2]);e("cli.root_resolved"),t||(F(p,process.argv),T(process.argv),$(process.argv)),e("cli.dispatch_start"),await j(p,process.argv),e("cli.dispatch_done")}s(Y,"main"),Y().catch(r=>{(r instanceof Error&&r.name==="AbortError"||r instanceof Error&&/operation was aborted/i.test(r.message))&&(process.stderr.write(`crtr: Interrupted
10
- `),process.exit(130)),(r instanceof G||r instanceof y)&&(U(r),process.exit(typeof process.exitCode=="number"?process.exitCode:1));const t=r instanceof Error?r.message:String(r);process.stderr.write(`crtr: ${t}
7
+ `)}finally{if(r!==void 0)try{X(r)}catch(o){process.stderr.write(`crtr: first-run reconcile marker failed: ${c(o)}
8
+ `)}}}s(Y,"maybeReconcileFirstRun");async function Z(){const r=I(process.argv),o=z(),t=o!==void 0;if(o!==void 0){process.env.CRTR_API_SOCKET=a(f(o),"cli.sock");const i=N(process.argv);if(i!==null)throw B(`crtr ${i} is not available to an app's node`,"Run this command from the person's terminal.");const n=JSON.parse(S(V(f(o))??a(f(o),"broker-launch.json"),"utf8"));if(!n.configSnapshot)throw new Error("node launch is missing its config snapshot");H(n.configSnapshot)}if(!t&&W()&&!g(process.argv)&&!r)throw new h("layout_migration_required","run crtr sys migrate while the runtime is offline",J.NETWORK,{next:"Run `crtr sys migrate` while the runtime is offline, then restart it."});if(r){const i=await k();if(process.argv.slice(4).some(n=>n==="-h"||n==="--help")){process.stdout.write(D(L(i,["sys","migrate"]).node)+`
9
+ `);return}await y(i,process.argv);return}if(t||(M(process.argv),await Y()),await A(process.argv),e("cli.front_door_passed"),g(process.argv)){await y(await O(),process.argv);return}t||await P(process.argv),e("cli.plugins_revalidated");const p=await x(process.argv[2]);e("cli.root_resolved"),t||(F(p,process.argv),T(process.argv),$(process.argv)),e("cli.dispatch_start"),await j(p,process.argv),e("cli.dispatch_done")}s(Z,"main"),Z().catch(r=>{(r instanceof Error&&r.name==="AbortError"||r instanceof Error&&/operation was aborted/i.test(r.message))&&(process.stderr.write(`crtr: Interrupted
10
+ `),process.exit(130)),(r instanceof G||r instanceof h)&&(U(r),process.exit(typeof process.exitCode=="number"?process.exitCode:1));const t=r instanceof Error?r.message:String(r);process.stderr.write(`crtr: ${t}
11
11
  `),process.exit(1)});