@north-light/cli 0.3.752 → 0.3.754

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 (74) hide show
  1. package/README.md +1 -1
  2. package/bin/runtime-generation-manifest.mjs +3 -10
  3. package/dist/api/contract.d.ts +1 -1
  4. package/dist/api/contract.js +1 -1
  5. package/dist/api/dto/health.d.ts +3 -0
  6. package/dist/builtin-memory/crouter-sdk/release-notes.md +6 -0
  7. package/dist/clients/attach/viewer.js +342 -342
  8. package/dist/commands/sys/daemon.js +1 -1
  9. package/dist/commands/sys/doctor.js +1 -1
  10. package/dist/commands/sys/signin.js +2 -3
  11. package/dist/commands/sys/update.js +1 -1
  12. package/dist/core/audit.d.ts +2 -0
  13. package/dist/core/audit.js +2 -2
  14. package/dist/core/auto-update.js +4 -4
  15. package/dist/core/canvas/canvas.d.ts +1 -1
  16. package/dist/core/canvas/canvas.js +26 -19
  17. package/dist/core/canvas/schema-pg/038-actor.sql +4 -0
  18. package/dist/core/canvas/schema-version.d.ts +1 -1
  19. package/dist/core/canvas/schema-version.js +1 -1
  20. package/dist/core/import/load/copy.js +9 -9
  21. package/dist/core/import/load/keys.d.ts +5 -0
  22. package/dist/core/import/load/keys.js +8 -0
  23. package/dist/core/import/load/prepare.d.ts +3 -0
  24. package/dist/core/import/load/prepare.js +12 -12
  25. package/dist/core/import/load/rollback.js +7 -7
  26. package/dist/core/import/load/run.js +2 -3
  27. package/dist/core/import/load/verify.js +8 -8
  28. package/dist/core/ledger/charges.js +1 -1
  29. package/dist/core/ledger/chunks.js +1 -1
  30. package/dist/core/ledger/read.js +1 -1
  31. package/dist/core/ledger/types.d.ts +4 -0
  32. package/dist/core/providers/audit.js +3 -3
  33. package/dist/core/providers/call.d.ts +2 -0
  34. package/dist/core/providers/call.js +1 -1
  35. package/dist/core/providers/receipts.d.ts +2 -0
  36. package/dist/core/providers/receipts.js +1 -1
  37. package/dist/core/self-update.d.ts +1 -4
  38. package/dist/core/self-update.js +1 -1
  39. package/dist/daemon/api/handlers/providers.d.ts +2 -0
  40. package/dist/daemon/api/handlers/providers.js +1 -1
  41. package/dist/daemon/machine-daemon.js +1 -1
  42. package/dist/daemon/manage.js +3 -3
  43. package/dist/daemon/peer/ingress.js +1 -1
  44. package/docs/sdk/release-notes.md +6 -0
  45. package/package.json +3 -4
  46. package/packages/crouter-api/dist/api/contract.js +1 -1
  47. package/packages/crouter-api/dist/commands/sys/daemon.js +8 -3
  48. package/packages/crouter-api/dist/commands/sys/doctor.js +0 -9
  49. package/packages/crouter-api/dist/commands/sys/signin.js +0 -4
  50. package/packages/crouter-api/dist/commands/sys/update.js +1 -2
  51. package/packages/crouter-api/dist/core/canvas/canvas.js +14 -4
  52. package/packages/crouter-api/dist/core/canvas/schema-version.js +1 -1
  53. package/packages/crouter-api/dist/core/import/load/copy.js +47 -23
  54. package/packages/crouter-api/dist/core/import/load/keys.js +77 -0
  55. package/packages/crouter-api/dist/core/import/load/prepare.js +6 -0
  56. package/packages/crouter-api/dist/core/ledger/charges.js +3 -3
  57. package/packages/crouter-api/dist/core/ledger/chunks.js +1 -1
  58. package/packages/crouter-api/dist/core/ledger/read.js +1 -1
  59. package/packages/crouter-api/dist/core/providers/audit.js +2 -2
  60. package/packages/crouter-api/dist/core/providers/call.js +2 -2
  61. package/packages/crouter-api/dist/core/providers/receipts.js +1 -1
  62. package/packages/crouter-api/dist/core/self-update.js +1 -1
  63. package/packages/crouter-api/dist/daemon/api/handlers/providers.js +1 -1
  64. package/packages/crouter-api/dist/daemon/manage.js +3 -2
  65. package/packages/crouter-api/package.json +1 -1
  66. package/packages/crouter-identity/package.json +1 -1
  67. package/packages/crouter-plugin/package.json +3 -3
  68. package/runtime.lock.json +14 -14
  69. package/scripts/install-runtime.mjs +2 -2
  70. package/scripts/self-update.mjs +14 -5
  71. package/dist/commands/sys/old-package.d.ts +0 -9
  72. package/dist/commands/sys/old-package.js +0 -1
  73. package/packages/crouter-api/dist/commands/sys/old-package.js +0 -20
  74. package/scripts/lib/update-target.mjs +0 -78
package/README.md CHANGED
@@ -10,7 +10,7 @@
10
10
 
11
11
  crouter is an agent runtime for Node.js. Each agent is a **node**: a record with a goal, a context directory, and a detached process (its *broker*) that hosts the model session. A daemon, `crtrd`, owns every node's state and lifecycle. You drive it with the `crtr` command line, a terminal viewer, or a typed TypeScript SDK — all three are clients of the same local API. Each model session runs on [pi](https://github.com/earendil-works/pi), the open-source coding-agent harness; crouter adds the daemon, the node graph, the context system and the CLI around it.
12
12
 
13
- Closing a terminal does not stop an agent, and an agent that is waiting on something has no process at all. Nodes can spawn children, report to whoever subscribes to them, and share markdown documents that other agents are shown when they become relevant. crouter is not a model and does not bundle one: you sign in to a model provider during setup. It is also not a hosted service; it runs on your machine, or in a container you start.
13
+ Closing a terminal does not stop an agent, and an agent that is waiting on something has no process at all. Nodes can spawn children, report to whoever subscribes to them, and share markdown documents that other agents are shown when they become relevant. crouter is not a model and does not bundle one: you sign in to a model provider during setup. It runs on your machine, in a container you start, or in a Northlight-hosted runtime.
14
14
 
15
15
  [Docs](https://crouter.docs.northlight.ai) · [Getting started](https://crouter.docs.northlight.ai/docs/cli/first-session) · [Concepts](https://crouter.docs.northlight.ai/docs/concepts) · [SDK](https://crouter.docs.northlight.ai/docs/sdk) · [Plugins](https://crouter.docs.northlight.ai/docs/plugin) · [Marketplace](https://github.com/crouton-labs/crouter-official-marketplace) · [Discord](https://discord.gg/txKS3swtWY)
16
16
 
@@ -11,18 +11,11 @@ export function runtimeHome() {
11
11
  export const GENERATION_ID = /^[a-f0-9]{64}$/;
12
12
  export const MANIFEST_SCHEMA = 1;
13
13
  export const PACKAGE_NAME = '@north-light/cli';
14
- /** The name every generation manifest records, whichever package built it. It is
15
- * frozen at the pre-rename package name on purpose: a global install of the old
16
- * `@crouter/cli` keeps its own copy of this file as its launch shim, and that
17
- * shim refuses a generation whose manifest names a package it does not know.
18
- * Recording the old name lets an install that moved to `@north-light/cli` keep
19
- * launching through the shim it already has. */
20
- export const GENERATION_PACKAGE_NAME = '@crouter/cli';
21
- /** Names earlier releases recorded in a generation manifest. A generation installed
22
- * before the rename is still valid, so the selector accepts these as well. */
14
+ /** Names earlier releases recorded in a generation manifest (every release up to the removal of the
15
+ * `@crouter/cli` bridge recorded `@crouter/cli`). A generation installed under one of them is still valid. */
23
16
  export const LEGACY_PACKAGE_NAMES = new Set(['crouter', 'crtr', '@north-light/crouter', '@crouter/cli']);
24
17
  export function isKnownPackageName(name) {
25
- return name === PACKAGE_NAME || name === GENERATION_PACKAGE_NAME || LEGACY_PACKAGE_NAMES.has(name);
18
+ return name === PACKAGE_NAME || LEGACY_PACKAGE_NAMES.has(name);
26
19
  }
27
20
  export const ENTRY_NAMES = ['broker', 'cli', 'daemon', 'launcher'];
28
21
  /** Entries every generation carries. Generations installed before the root
@@ -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.76";
2
+ export declare const CONTRACT_LEVEL = "1.77";
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.76",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.77",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};
@@ -12,6 +12,9 @@ export interface HealthDTO {
12
12
  link_connected?: boolean;
13
13
  /** Present on a machine-role daemon only: false when this computer has no person sign-in, so it opens no link and runs no agent or cron. */
14
14
  signed_in?: boolean;
15
+ /** Present on a machine-role daemon only: id of the runtime generation it was launched from, null when it runs from a source checkout. That
16
+ * daemon serves no `/v1/status`, so `crtr sys daemon status` reads its generation here. */
17
+ generation_id?: string | null;
15
18
  /** Present while corpus migration or normal daemon startup is incomplete. */
16
19
  startup_blocked?: string;
17
20
  /** Always present; only `ready` admits normal daemon work. */
@@ -9,6 +9,12 @@ when-and-why-to-read: When you need Release notes, this knowledge should be read
9
9
 
10
10
  Changes to `@north-light/sdk` that can change what an existing app sees. Newest first.
11
11
 
12
+ ## 0.3.753
13
+
14
+ ### Charges and audit rows record the actor
15
+
16
+ `charges` and `audit_rows` gain a nullable `actor` column: the principal that presented the call (the token's presenting link, or the envelope's `act`). Rows written earlier hold null. No SDK call or response changes.
17
+
12
18
  ## 0.3.751
13
19
 
14
20
  ### Call tokens may name any principal