@orkestrel/scaffold 0.0.116 → 0.0.117

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.
@@ -56,7 +56,7 @@ Treat generated package identifiers, versions, layers, and dependency ranges as
56
56
  | `@orkestrel/database` | `0.0.19` | L2 | `@orkestrel/sqlite` `^0.0.15`, `@orkestrel/emitter` `^0.0.13`, `@orkestrel/contract` `^0.0.20`, `@orkestrel/indexeddb` `^0.0.15` | |
57
57
  | `@orkestrel/emitter` | `0.0.13` | L1 | `@orkestrel/contract` `^0.0.20` | |
58
58
  | `@orkestrel/form` | `0.0.14` | L2 | `@orkestrel/emitter` `^0.0.13`, `@orkestrel/contract` `^0.0.20` | |
59
- | `@orkestrel/guide` | `0.0.26` | L3 | `@orkestrel/contract` `^0.0.20`, `@orkestrel/markdown` `^0.0.18` | |
59
+ | `@orkestrel/guide` | `0.0.28` | L3 | `@orkestrel/contract` `^0.0.20`, `@orkestrel/markdown` `^0.0.18` | |
60
60
  | `@orkestrel/html` | `0.0.13` | L1 | `@orkestrel/contract` `^0.0.20` | |
61
61
  | `@orkestrel/indexeddb` | `0.0.15` | L1 | `@orkestrel/contract` `^0.0.20` | |
62
62
  | `@orkestrel/interpret` | `0.0.18` | L3 | `@orkestrel/reason` `^0.0.15`, `@orkestrel/emitter` `^0.0.13`, `@orkestrel/contract` `^0.0.20`, `@orkestrel/template` `^0.0.11` | |
@@ -77,7 +77,7 @@ Treat generated package identifiers, versions, layers, and dependency ranges as
77
77
  | `@orkestrel/reason` | `0.0.15` | L2 | `@orkestrel/emitter` `^0.0.13`, `@orkestrel/contract` `^0.0.20` | |
78
78
  | `@orkestrel/relation` | `0.0.17` | L3 | `@orkestrel/emitter` `^0.0.13`, `@orkestrel/contract` `^0.0.20`, `@orkestrel/database` `^0.0.19` | |
79
79
  | `@orkestrel/router` | `0.0.18` | L2 | `@orkestrel/abort` `^0.0.14`, `@orkestrel/emitter` `^0.0.13`, `@orkestrel/contract` `^0.0.20` | |
80
- | `@orkestrel/scaffold` | `0.0.115` | L3 | `@orkestrel/console` `^0.0.17`, `@orkestrel/emitter` `^0.0.13`, `@orkestrel/process` `^0.0.16`, `@orkestrel/contract` `^0.0.20`, `@orkestrel/markdown` `^0.0.18`, `@orkestrel/template` `^0.0.11` | |
80
+ | `@orkestrel/scaffold` | `0.0.116` | L3 | `@orkestrel/console` `^0.0.17`, `@orkestrel/emitter` `^0.0.13`, `@orkestrel/process` `^0.0.16`, `@orkestrel/contract` `^0.0.20`, `@orkestrel/markdown` `^0.0.18`, `@orkestrel/template` `^0.0.11` | |
81
81
  | `@orkestrel/sea` | `0.0.20` | L3 | `@orkestrel/emitter` `^0.0.13`, `@orkestrel/process` `^0.0.16`, `@orkestrel/contract` `^0.0.20` | |
82
82
  | `@orkestrel/server` | `0.0.24` | L3 | `@orkestrel/abort` `^0.0.14`, `@orkestrel/codec` `^0.0.7`, `@orkestrel/router` `^0.0.18`, `@orkestrel/emitter` `^0.0.13`, `@orkestrel/timeout` `^0.0.14`, `@orkestrel/contract` `^0.0.20` | |
83
83
  | `@orkestrel/sqlite` | `0.0.15` | L1 | `@orkestrel/contract` `^0.0.20` | |
@@ -235,13 +235,14 @@ directly.
235
235
 
236
236
  The server command leaves come from [`helpers.ts`](../src/server/helpers.ts).
237
237
 
238
- | Name | Kind | Signature | Summary |
239
- | --------------------- | -------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
240
- | `formatGuideFinding` | function | `(finding: ParityFinding) => string` | Formats one finding with its guide prefix when needed. |
241
- | `matchesGuideResult` | function | `(result: unknown) => boolean` | Reads an owned foreign result view and accepts passed modules without unhandled errors. |
242
- | `resolveGuideRoot` | function | `(root: URL \| string) => string` | Resolves a command root to a native absolute path. |
243
- | `selectGuidePitch` | function | `(entries: readonly ManifestEntry[], name: string \| undefined) => string \| undefined` | Selects the indexed guide matching a package's bare name. |
244
- | `computeGuideProject` | function | `(module: string) => string \| undefined` | Computes the scoped project a guide module's declarations are emitted through. |
238
+ | Name | Kind | Signature | Summary |
239
+ | ------------------------- | -------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
240
+ | `formatGuideFinding` | function | `(finding: ParityFinding) => string` | Formats one finding with its guide prefix when needed. |
241
+ | `matchesGuideResult` | function | `(result: unknown) => boolean` | Reads an owned foreign result view and accepts passed modules without unhandled errors. |
242
+ | `resolveGuideRoot` | function | `(root: URL \| string) => string` | Resolves a command root to a native absolute path. |
243
+ | `selectGuidePitch` | function | `(entries: readonly ManifestEntry[], name: string \| undefined) => string \| undefined` | Selects the indexed guide matching a package's bare name. |
244
+ | `computeGuideProject` | function | `(module: string) => string \| undefined` | Computes the scoped project a guide module's declarations are emitted through. |
245
+ | `computeGuideEnvironment` | function | `(source: string) => string \| undefined` | Computes the environment directory whose project compiles a guide source. |
245
246
 
246
247
  ### Parsers
247
248
 
@@ -357,9 +358,15 @@ no-write and rewrite failures preserve a higher existing process exit code.
357
358
 
358
359
  Every inventory read first constructs `Parity` without declarations, so every manifest guide
359
360
  parses, and every name two modules of one entry declare refuses, before any module compiles. It
360
- then compiles each distinct directory the parsed rows' sources name through `GuideCompiler` and
361
- passes the emitted declarations to `Parity` as `declarations`. A module compiles once per `execute`
362
- call: a `--to` run's second inventory read reuses the first read's declarations, which a
361
+ then compiles, through `GuideCompiler`, each distinct `src/<env>` or `app/<env>` directory that a
362
+ parsed row's source equals or sits beneath, and passes every emitted declaration to `Parity` as
363
+ `declarations`. A row over `src/core/panels` reads its signatures from the `src/core` compile. A
364
+ source under no `src/<env>` or `app/<env>` directory refuses with code `compile`, naming the
365
+ module, and a source whose environment's emit holds no declaration under it refuses with code
366
+ `empty`, naming each such module and its project in `context.missing`. An environment compiles
367
+ once per `execute` call: a manifest that lists `src/core` and
368
+ `src/core/panels` compiles `src/core` once, and a `--to` run's second inventory read reuses the
369
+ first read's declarations, which a
363
370
  `--to source` rewrite cannot change, because it rewrites doc blocks and the emit removes comments.
364
371
  A refusal names the guide or the module; a compile refusal carries the compiler's output in its
365
372
  message and in `context.output`. The native command writes the message to stderr and raises the
@@ -1219,9 +1226,9 @@ source with `npm run test:guides -- --to source`; never weaken the case.
1219
1226
  - [`tests/src/core/Parity.test.ts`](../tests/src/core/Parity.test.ts) — parity findings, rewrite boundaries, and propagation of parse refusals with the guide path and cause. The `Signature` cell rewrite under guide authority and its report under source authority; the README named in a refused pitch parse; a name two modules of one entry export, refused with the guide, the name, and both modules, beside a distinct-name control.
1220
1227
  - [`tests/src/core/sources/Source.test.ts`](../tests/src/core/sources/Source.test.ts) — direct/barrel projections, lexical and JSDoc regressions, canonical-key populations, root and nested indexes, exact row grammar, graph invariants, and correlated population controls; signatures carried from supplied emitted declarations
1221
1228
  - [`tests/src/core/sources/SourceManager.test.ts`](../tests/src/core/sources/SourceManager.test.ts) — `computeModuleKey` boundary collision, specifier resolution, the `undefined` skip for an unmapped specifier, array-valued module scopes, `sources()` enumeration, and per-module entity sharing with a differently-scoped identity control.
1222
- - [`tests/src/server/GuideCommand.test.ts`](../tests/src/server/GuideCommand.test.ts) — malformed guide rejection with its path, code, and required header; direct installed reader and runner ports, fresh worker context, registration rejection, real runner cleanup after start failure, cleanup failure reporting, and higher native exit preservation; compile refusal naming the module; native `--to guide` signature rewrite and `--to source` report with exit codes; a malformed guide refused before any compile; one compile per module across a `--to guide` run, counted through a recording compiler; native exit 1 for a header refusal and for a compile refusal; a name `src/core` and `src/server` both export, refused, beside a distinct-name control that resolves
1229
+ - [`tests/src/server/GuideCommand.test.ts`](../tests/src/server/GuideCommand.test.ts) — malformed guide rejection with its path, code, and required header; direct installed reader and runner ports, fresh worker context, registration rejection, real runner cleanup after start failure, cleanup failure reporting, and higher native exit preservation; compile refusal naming the module; native `--to guide` signature rewrite and `--to source` report with exit codes; a malformed guide refused before any compile; one compile per environment across a `--to guide` run and across an environment's own and nested module rows, counted through a recording compiler; a nested module row read from its environment's compile, with a drifted cell reported for that row alone; a nested module its environment's project emits nothing under, refused with code `empty`; a source outside every `src/<env>` and `app/<env>` directory, refused with code `compile`; native exit 1 for a header refusal and for a compile refusal; a name `src/core` and `src/server` both export, refused, beside a distinct-name control that resolves
1223
1230
  - [`tests/src/server/GuideCompiler.test.ts`](../tests/src/server/GuideCompiler.test.ts) — every signature form computed from a fixture workspace compiler; byte-equal repeated compiles; refusal of a failing compile, a missing project, a module outside `src/<env>` and `app/<env>`, and a workspace with no compiler; coded `compile` refusals with the compiler output in `context`; `empty` refusals for a `declarationDir` and for an `include` that misses the module; `timeout` and `overflow` refusals; the scratch directory gone after a success and after a failure; sorted keys.
1224
- - [`tests/src/server/helpers.test.ts`](../tests/src/server/helpers.test.ts) — finding formatting, native and file-URL root resolution, pitch selection, and owned foreign-result reading with live receivers. Module-to-project mapping.
1231
+ - [`tests/src/server/helpers.test.ts`](../tests/src/server/helpers.test.ts) — finding formatting, native and file-URL root resolution, pitch selection, and owned foreign-result reading with live receivers. Module-to-project mapping, and the environment directory a source equals or sits beneath, matched by whole segments.
1225
1232
  - [`tests/src/server/parsers.test.ts`](../tests/src/server/parsers.test.ts) — native direction arguments and package-name parsing. `rootDir` reading from `--showConfig` output.
1226
1233
  - [`tests/setupServer.test.ts`](../tests/setupServer.test.ts) — the native carrier and `readGuideBuild`, which returns the built server entry the native-command cases load and refuses a missing build or one older than a source.
1227
1234
  - [`tests/distribution.test.ts`](../tests/distribution.test.ts) — the packed package through the `tests/setupDistribution.ts` harness, and `isGuideError` across the packed `import` and `require` entries and a copy at a second path: pairwise-distinct constructors, a hidden brand, subclass recognition, and refusal of a look-alike, a proxy, and a brand-only object.
@@ -393,7 +393,7 @@ Exported from `@orkestrel/scaffold/server`, and reachable from
393
393
  | `MaterializerInterface` | interface | `{ emitter, audit(), materialize(), repair(), mirror(), catalog(), declare(), remove(), destroy() }` | Describes the mutation contract: the package's only filesystem writer. |
394
394
  | `MaterializerOptions` | interface | `{ host?, on?, error? }` | Represents the options for the materializer. |
395
395
  | `ReadAllowanceInterface` | interface | `{ remaining, spend() }` | Describes the byte allowance one upstream call spends across every read it makes. |
396
- | `SurfaceModule` | interface | `{ createGuide, createSource, extractSourceLines }` | Describes the guide module functions required by surface reflection. |
396
+ | `SurfaceModule` | interface | `{ createGuide, createSource, extractSourceLines, isGuideError }` | Describes the guide module functions required by surface reflection. |
397
397
  | `TextReadResult` | interface | `{ lookup, content, note, unreachable? }` | Reports the outcome of one bounded read whose body is taken as text. |
398
398
  | `Worktree` | interface | `{ tracked, dirty }` | Describes what git reports about a target's working tree. |
399
399
  | `UpstreamInterface` | interface | `{ emitter, lookup(), fetch(), read(), catalog(), inventory(), destroy() }` | Describes the upstream contract: the package's only network reader, and it never writes. |
@@ -759,8 +759,11 @@ nor `src/`, when its guide exists but is not UTF-8 text within the artifact boun
759
759
  TypeScript source under `src/` cannot be read. Only `.ts` files under `src/` are read, so a binary
760
760
  asset there is ignored. A barrel holding a statement other than `export * from './module.js'`
761
761
  refuses with the statement named, because the reflection follows nothing else and an incomplete
762
- reading never reports clean. When `@orkestrel/guide` refuses a guide from any source, the command
763
- refuses with `TARGET`, naming the owner and the source and carrying the parser's message.
762
+ reading never reports clean. When `@orkestrel/guide` refuses a guide from any source with an error
763
+ its `isGuideError` guard accepts, such as a `## Surface` header other than
764
+ `Name | Kind | Signature | Summary`, the command refuses with `TARGET`, naming the owner and the
765
+ source, carrying the parser's message, and holding the guide error's `code` in the refusal's
766
+ context. Any other error the parser raises propagates unchanged.
764
767
 
765
768
  Compare unpublished candidates together with this command:
766
769
 
@@ -799,8 +802,9 @@ immediate package guides, excluding the README index. `readSurfaceCandidate` add
799
802
  and the candidate's conflicts. `readSurfaceFile` reads
800
803
  one owner's guide file under a root, and `readSurfaceGuide` parses guide text from any source.
801
804
  `readSurfaceRecord` reads a data root's record, and `resolveHostRoot` resolves the bundled root.
802
- `readSurfaceModule` loads `@orkestrel/guide` lazily and narrows it with `isSurfaceModule`; every
803
- reader takes an optional `SurfaceLoader` that resolves the module, and requires the package in
805
+ `readSurfaceModule` loads `@orkestrel/guide` lazily and narrows it with `isSurfaceModule`, which
806
+ requires `createGuide`, `createSource`, `extractSourceLines`, and `isGuideError` as functions, and
807
+ refuses with `TARGET` a module that lacks one or holds another value there; every reader takes an optional `SurfaceLoader` that resolves the module, and requires the package in
804
808
  scaffold's resolution path when none is supplied. Importing the server entry alone does not load
805
809
  it.
806
810
 
@@ -604,7 +604,7 @@
604
604
  "storage": "claude/agents/orkestrel.md",
605
605
  "destination": ".claude/agents/orkestrel.md",
606
606
  "executable": false,
607
- "digest": "e38ce6624566e4bb00281516faf8ea67869f16e5a4ecbc96ddda7aa263d1e94b"
607
+ "digest": "4ad75a62b6d394db889f1754956bbd053c2a68c5ed34b1cfae0d81841835a6f9"
608
608
  },
609
609
  {
610
610
  "storage": "claude/agents/planner.md",
@@ -1042,7 +1042,7 @@
1042
1042
  "storage": "guides/guide.md",
1043
1043
  "destination": "guides/guide.md",
1044
1044
  "executable": false,
1045
- "digest": "e1e677fe395af8153c5ceeb496630784507cee05d17f6f5cdaf7f9a221033117"
1045
+ "digest": "b8747025c58c3ea720c02db45d88a1047093f792c2fccde363080f82b0fb38be"
1046
1046
  },
1047
1047
  {
1048
1048
  "storage": "guides/html.md",
@@ -1168,7 +1168,7 @@
1168
1168
  "storage": "guides/scaffold.md",
1169
1169
  "destination": "guides/scaffold.md",
1170
1170
  "executable": false,
1171
- "digest": "9311d0b55f5d08c20ce417b84ac115e3c8400cf167cf7d108d1ef1cb846de837"
1171
+ "digest": "2c0a0d48a75950ceca3c17798a253a294f8c59767e1a76e576d452b37f6b6b6c"
1172
1172
  },
1173
1173
  {
1174
1174
  "storage": "guides/sea.md",
@@ -2141,5 +2141,5 @@
2141
2141
  ]
2142
2142
  }
2143
2143
  ],
2144
- "digest": "f7b980503c2ad03619c833ea066b67d682ec26c894ea5b52a6f013c93aaa491f"
2144
+ "digest": "19779721ea993b1201e3140ffd00a5bee9877768e351c40bd1805e3aea1cef3b"
2145
2145
  }
@@ -4,7 +4,7 @@ let _orkestrel_template = require("@orkestrel/template");
4
4
  let _orkestrel_emitter = require("@orkestrel/emitter");
5
5
  var package_default = {
6
6
  name: "@orkestrel/scaffold",
7
- version: "0.0.116",
7
+ version: "0.0.117",
8
8
  description: "Scaffold workspaces with commands: new, audit, surface, repair, catalog, and overwrite.",
9
9
  keywords: [
10
10
  "audit",
@@ -106,7 +106,7 @@ var package_default = {
106
106
  devDependencies: {
107
107
  "@microsoft/api-extractor": "^7.60.0",
108
108
  "@orkestrel/browser": "^0.0.30",
109
- "@orkestrel/guide": "^0.0.26",
109
+ "@orkestrel/guide": "^0.0.28",
110
110
  "@orkestrel/html": "^0.0.13",
111
111
  "@orkestrel/probe": "^0.0.26",
112
112
  "@orkestrel/test": "^0.0.31",