@north-light/cli 0.3.621 → 0.3.622

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.
@@ -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.48";
2
+ export declare const CONTRACT_LEVEL = "1.49";
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.48",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.49",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};
@@ -45,7 +45,11 @@ export interface DocLinkReportDTO {
45
45
  unresolved_links?: string[];
46
46
  remote_links?: string[];
47
47
  }
48
- export interface DocWrittenDTO extends DocLinkReportDTO {
48
+ /** `unreached`: present and true when no agent will be routed to the document — not node-owned, no rule, and no document with a rule links to it. */
49
+ export interface DocReachDTO {
50
+ unreached?: boolean;
51
+ }
52
+ export interface DocWrittenDTO extends DocLinkReportDTO, DocReachDTO {
49
53
  id: string;
50
54
  name: string;
51
55
  }
@@ -71,7 +75,7 @@ export interface DocEditRequest {
71
75
  extensions?: Record<string, Record<string, unknown>>;
72
76
  unset?: DocUnsetField[];
73
77
  }
74
- export interface DocEditedDTO extends DocLinkReportDTO {
78
+ export interface DocEditedDTO extends DocLinkReportDTO, DocReachDTO {
75
79
  id: string;
76
80
  name: string;
77
81
  revision: number;
@@ -32,7 +32,7 @@ Search the chosen owner before creating. Use `insights/<topic>` under the chosen
32
32
 
33
33
  ## Create the listener
34
34
 
35
- Run `crtr doc write -h`, then create the listener document under the chosen owner, named `insights/<topic>`, as a preference with the rule `on: boot`, `deliver: preview` (`--rule`, see `crtr doc write --rule -h`).
35
+ Run `crtr doc write -h`, then create the listener document under the chosen owner, named `insights/<topic>`, as a preference with the rule `on: boot`, `deliver: preview` (`--rule`, see `crtr doc write -h`).
36
36
 
37
37
  Its preview must name the actual domain trigger: when user-supplied information, a correction, or a user response relates to this domain, read the preference because recognizing the underlying principle preserves knowledge future decisions can use.
38
38
 
@@ -34,7 +34,7 @@ crtr keeps one graph of **objects** in one SQLite database (`canvas.db`). Docume
34
34
  - **marketplaces** — authoring a crtr marketplace: the marketplace.json index, local-link and remote-Git plugin sources, auto-bump CI, dual-publishing.
35
35
  - **examples/** — worked compositions of the primitives into complete systems, e.g. the iMessage assistant node.
36
36
 
37
- Adjacent, outside this dir: writing documents (kind, delivery rules, preview, the asked-to-remember workflow) is owned by `crtr doc write -h` and its focused `--owner -h`/`--rule -h` — the guide lives on that `-h` surface so it is delivered exactly when you write. Finding and reading objects is `crtr canvas -h`; registering a custom object is `crtr custom-object -h`.
37
+ Adjacent, outside this dir: writing documents (kind, delivery rules, preview, the asked-to-remember workflow) is owned by `crtr doc write -h` and its focused `--owner -h` — the guide lives on that `-h` surface so it is delivered exactly when you write. Finding and reading objects is `crtr canvas -h`; registering a custom object is `crtr custom-object -h`.
38
38
 
39
39
  Briefly: **plugins** package documents and commands, with command execution selected by `plugin.json.transport` (`exec` for a trusted local executable or `http` for a fetched remote REST manifest); **marketplaces** index and distribute plugins. Plugin commands enter the **external-command** fallthrough, leaving the core fast-path untouched.
40
40
 
@@ -9,7 +9,7 @@ surfaces:
9
9
 
10
10
  # How documents load
11
11
 
12
- A document is an object on the canvas ([[internal]] has the model): it has an owner, a privacy level and a name, and any node that may read it can `crtr canvas read` it. Whether it also *loads on its own* — into a node's boot context, when a file is read, when a command runs — is decided only by the document's **rules**; the runtime never guesses. A rule is one `on` event, one `deliver` level and one optional `if`, plus structural ordering. The writing contract (flags, preview craft) is `crtr doc write -h` and its focused `crtr doc write --rule -h`; which owner to write under is `internal/agent-shaping`; where state lives is `internal/storage-tiers`. This document is the mechanics between those: what actually fires, when, and in what order.
12
+ A document is an object on the canvas ([[internal]] has the model): it has an owner, a privacy level and a name, and any node that may read it can `crtr canvas read` it. Whether it also *loads on its own* — into a node's boot context, when a file is read, when a command runs — is decided only by the document's **rules**; the runtime never guesses. A rule is one `on` event, one `deliver` level and one optional `if`, plus structural ordering. The writing contract (flags, preview craft) is `crtr doc write -h`; which owner to write under is `internal/agent-shaping`; where state lives is `internal/storage-tiers`. This document is the mechanics between those: what actually fires, when, and in what order.
13
13
 
14
14
  (In a package file — a builtin or plugin `memory/*.md` — rules are authored in the package-file frontmatter (`surfaces`, `gate`, `slash`) and converted into these rules on import; see `internal/plugins`. Everything below describes the converted rules.)
15
15
 
@@ -39,7 +39,7 @@ Silence is the absence of a rule; there is no `none` level. `summary` is **not**
39
39
 
40
40
  ## Conditions
41
41
 
42
- A rule's `if` is the eligibility predicate over the receiving node — kind, mode, lifecycle, orchestration depth, cwd, the repos it is eligible for (`repo`: those enclosing its cwd and those of its profile's project paths; use `cwd` for location), profile — using the standard matcher vocabulary (`crtr doc write --rule -h`). When it fails, that rule delivers nothing; there is no document-level condition, so one document can choose a different level by node kind with two rules. No `if` means always eligible. Persona prose is just boot-content documents with an `if` (`if: {kind: developer, mode: base}`); guidance that should scale with effort is one predicate (`orchestration.depth: {gte: 2}`), not a mechanism.
42
+ A rule's `if` is the eligibility predicate over the receiving node — kind, mode, lifecycle, orchestration depth, cwd, the repos it is eligible for (`repo`: those enclosing its cwd and those of its profile's project paths; use `cwd` for location), profile — using the standard matcher vocabulary (`crtr doc write -h`). When it fails, that rule delivers nothing; there is no document-level condition, so one document can choose a different level by node kind with two rules. No `if` means always eligible. Persona prose is just boot-content documents with an `if` (`if: {kind: developer, mode: base}`); guidance that should scale with effort is one predicate (`orchestration.depth: {gte: 2}`), not a mechanism.
43
43
 
44
44
  ## Listings and dedup
45
45
 
@@ -35,7 +35,7 @@ The frontmatter of a `memory/` file is the **package-file format**, not the `crt
35
35
  | `unlisted`, `privacy`, `lint-ignore`, `extensions` | the document fields of the same names (a package document is always public and shipped) |
36
36
  | `name` | an explicit local name, instead of one derived from the path |
37
37
 
38
- Delivery semantics (events, levels, `if`) are the rule model in [[internal/memory-loading]]; `crtr doc write --rule -h` documents the rule JSON the converted rules take. The loader's `lint-ignore` accepts `length`, `broad-memory-read` and `orphan` and records it on the document, but `crtr doc lint` never checks package documents (see the end of this page), so it suppresses nothing there. A file whose frontmatter fails validation blocks install and update.
38
+ Delivery semantics (events, levels, `if`) are the rule model in [[internal/memory-loading]]; `crtr doc write -h` documents the rule JSON the converted rules take. The loader's `lint-ignore` accepts `length`, `broad-memory-read` and `orphan` and records it on the document, but `crtr doc lint` never checks package documents (see the end of this page), so it suppresses nothing there. A file whose frontmatter fails validation blocks install and update.
39
39
 
40
40
  File naming decides the document name: a directory's `INDEX.md` is the document named for the directory (reading it lists the names under it), a package-root `INDEX.md` is `index`, and a leading `NN-` ordering prefix is stripped from every segment (`04-orchestration-kernel.md` is `orchestration-kernel`). Renaming or moving a file changes the document's name, and `[[links]]` to the old name stop resolving.
41
41
 
@@ -265,7 +265,7 @@ Standard semver:
265
265
 
266
266
  `crtr pkg plugin disable <name>` flips the per-scope config without removing files. A disabled plugin's documents are removed from the canvas: they are not listed and `crtr canvas read <plugin>/<name>` no longer finds them. Re-enable with `crtr pkg plugin enable <name>`.
267
267
 
268
- Individual documents inside an enabled plugin are kept out of automatic delivery and listings by giving them no delivery rules plus `unlisted: true` (or a rule whose `if` fails — that suppresses automatic delivery only; an explicit read by name still resolves), not by a command — see `crtr doc write --rule -h`.
268
+ Individual documents inside an enabled plugin are kept out of automatic delivery and listings by giving them no delivery rules plus `unlisted: true` (or a rule whose `if` fails — that suppresses automatic delivery only; an explicit read by name still resolves), not by a command — see `crtr doc write -h`.
269
269
 
270
270
  ## What goes in a plugin
271
271