@orkestrel/scaffold 0.0.118 → 0.0.120

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 (55) hide show
  1. package/dist/bin/main.js +15 -15
  2. package/dist/bin/main.js.map +1 -1
  3. package/dist/host/agents/platforms/windows.md +2 -1
  4. package/dist/host/agents/skills/orkestrel-journey/references/layer.md +10 -10
  5. package/dist/host/agents/skills/orkestrel-journey/references/statechart.md +1 -1
  6. package/dist/host/agents/skills/orkestrel-journey/references/styles.md +3 -3
  7. package/dist/host/agents/skills/orkestrel-publish/references/release.md +1 -0
  8. package/dist/host/agents/skills/orkestrel-publish/references/wave.md +2 -1
  9. package/dist/host/claude/agents/orkestrel.md +27 -26
  10. package/dist/host/claude/rules/names.md +3 -2
  11. package/dist/host/claude/rules/tests.md +4 -2
  12. package/dist/host/claude/rules/typescript.md +2 -3
  13. package/dist/host/claude/rules/workspace.md +2 -1
  14. package/dist/host/guides/abort.md +0 -4
  15. package/dist/host/guides/budget.md +1 -5
  16. package/dist/host/guides/codec.md +18 -3
  17. package/dist/host/guides/contract.md +23 -44
  18. package/dist/host/guides/csv.md +86 -93
  19. package/dist/host/guides/database.md +0 -4
  20. package/dist/host/guides/emitter.md +0 -2
  21. package/dist/host/guides/form.md +26 -47
  22. package/dist/host/guides/html.md +3 -7
  23. package/dist/host/guides/indexeddb.md +28 -32
  24. package/dist/host/guides/jsonrpc.md +187 -0
  25. package/dist/host/guides/markdown.md +132 -141
  26. package/dist/host/guides/msg.md +47 -63
  27. package/dist/host/guides/ndjson.md +0 -4
  28. package/dist/host/guides/pool.md +0 -4
  29. package/dist/host/guides/process.md +71 -79
  30. package/dist/host/guides/reason.md +30 -36
  31. package/dist/host/guides/router.md +11 -18
  32. package/dist/host/guides/scaffold.md +147 -137
  33. package/dist/host/guides/sqlite.md +0 -4
  34. package/dist/host/guides/sse.md +6 -10
  35. package/dist/host/guides/table.md +481 -493
  36. package/dist/host/guides/template.md +0 -4
  37. package/dist/host/guides/test.md +46 -66
  38. package/dist/host/guides/timeout.md +0 -6
  39. package/dist/host/guides/tool.md +2 -6
  40. package/dist/host/guides/websocket.md +0 -4
  41. package/dist/host/manifest.json +100 -428
  42. package/dist/host/tests/setupPolicy.ts +18 -6
  43. package/dist/src/core/index.cjs +171 -122
  44. package/dist/src/core/index.cjs.map +1 -1
  45. package/dist/src/core/index.d.cts +236 -213
  46. package/dist/src/core/index.d.ts +236 -213
  47. package/dist/src/core/index.js +159 -111
  48. package/dist/src/core/index.js.map +1 -1
  49. package/dist/src/server/index.cjs +62 -39
  50. package/dist/src/server/index.cjs.map +1 -1
  51. package/dist/src/server/index.d.cts +59 -54
  52. package/dist/src/server/index.d.ts +59 -54
  53. package/dist/src/server/index.js +63 -40
  54. package/dist/src/server/index.js.map +1 -1
  55. package/package.json +9 -9
@@ -12,7 +12,13 @@ import {
12
12
  hasCanonicalSegments,
13
13
  resolveLink,
14
14
  } from '@orkestrel/guide'
15
- import { BASE_DEV_DEPENDENCIES, DISTRIBUTION_SETUP_PATH, HOST_PATHS } from '@orkestrel/scaffold'
15
+ import {
16
+ BASE_DEV_DEPENDENCIES,
17
+ DISTRIBUTION_SETUP_PATH,
18
+ HOST_INVENTORY_PATH,
19
+ HOST_PATHS,
20
+ } from '@orkestrel/scaffold'
21
+ import { MANIFEST_NAME, readSurfaceBaseline } from '@orkestrel/scaffold/server'
16
22
  import { spawnSync } from 'node:child_process'
17
23
  import { createRequire } from 'node:module'
18
24
  import {
@@ -3737,8 +3743,10 @@ export function readPolicySurface(root: string): PolicySurfacePopulation {
3737
3743
  * Inspects source and target-owned setup names against the hosted fleet guides.
3738
3744
  *
3739
3745
  * @remarks
3740
- * Source names claimed by the target's own hosted guide are grandfathered. Setup names have no
3741
- * grandfather. Catalog rows come from beside the guides: when reading installed guides, from the
3746
+ * Source names claimed by the target's own hosted guide are grandfathered, and so are source names
3747
+ * whose collision record names the target as an owner: the installed host's `manifest.json` in a
3748
+ * target, and the committed `host.json` in the scaffold checkout. A malformed record throws. Setup
3749
+ * names have no grandfather. Catalog rows come from beside the guides: when reading installed guides, from the
3742
3750
  * staged catalog and never from the target's own table, which can list a package without a guide in
3743
3751
  * that host. An absent installed host falls back to checkout guides only with catalog coverage.
3744
3752
  * Missing comparison evidence and unread barrel statements produce surface violations.
@@ -3804,9 +3812,13 @@ export function inspectPolicySurface(root: string): readonly PolicyViolation[] {
3804
3812
  ]
3805
3813
  },
3806
3814
  )
3807
- const grandfather = new Set(
3808
- guides.filter((guide) => guide.owner === own).flatMap(({ symbols }) => symbols),
3809
- )
3815
+ const record = readSurfaceBaseline(host, hosted ? MANIFEST_NAME : HOST_INVENTORY_PATH) ?? []
3816
+ const grandfather = new Set([
3817
+ ...guides.filter((guide) => guide.owner === own).flatMap(({ symbols }) => symbols),
3818
+ ...record
3819
+ .filter(({ owners }) => own !== undefined && owners.includes(own))
3820
+ .map(({ name }) => name),
3821
+ ])
3810
3822
  const claimed = Map.groupBy(
3811
3823
  guides
3812
3824
  .filter((guide) => guide.owner !== own)