@orkestrel/scaffold 0.0.133 → 0.0.135

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 (92) hide show
  1. package/dist/agents/skills/orkestrel-dispatch/scripts/bench.js +61 -96
  2. package/dist/agents/skills/orkestrel-dispatch/scripts/brief.js +48 -76
  3. package/dist/agents/skills/orkestrel-dispatch/scripts/chain.js +27 -66
  4. package/dist/agents/skills/orkestrel-dispatch/scripts/cite.js +31 -64
  5. package/dist/agents/skills/orkestrel-dispatch/scripts/launch.js +43 -57
  6. package/dist/agents/skills/orkestrel-dispatch/scripts/login.js +43 -86
  7. package/dist/agents/skills/orkestrel-dispatch/scripts/patch.js +68 -104
  8. package/dist/agents/skills/orkestrel-dispatch/scripts/result.js +35 -69
  9. package/dist/agents/skills/orkestrel-dispatch/scripts/sweep.js +47 -84
  10. package/dist/agents/skills/orkestrel-falsify/scripts/mutate.js +134 -116
  11. package/dist/agents/skills/orkestrel-harden/scripts/discovery.js +38 -90
  12. package/dist/agents/skills/orkestrel-harden/scripts/interleave.js +39 -103
  13. package/dist/agents/skills/orkestrel-harden/scripts/measure.js +40 -89
  14. package/dist/agents/skills/orkestrel-harden/scripts/titles.js +41 -87
  15. package/dist/agents/skills/orkestrel-parallel/scripts/cases.js +43 -88
  16. package/dist/agents/skills/orkestrel-parallel/scripts/lane.js +1568 -213
  17. package/dist/agents/skills/orkestrel-publish/scripts/compare.js +40 -60
  18. package/dist/agents/skills/orkestrel-publish/scripts/pins.js +47 -81
  19. package/dist/agents/skills/orkestrel-publish/scripts/steps.js +66 -104
  20. package/dist/agents/skills/orkestrel-publish/scripts/swap.js +74 -88
  21. package/dist/agents/skills/orkestrel-publish/scripts/wave.js +387 -109
  22. package/dist/agents/skills/orkestrel-publish/scripts/window.js +55 -96
  23. package/dist/agents/skills/orkestrel-scout/scripts/map.js +54 -101
  24. package/dist/bin/main.js +275 -33
  25. package/dist/bin/main.js.map +1 -1
  26. package/dist/host/AGENTS.md +1 -1
  27. package/dist/host/agents/skills/orkestrel-dispatch/scripts/bench.ts +81 -97
  28. package/dist/host/agents/skills/orkestrel-dispatch/scripts/brief.ts +64 -72
  29. package/dist/host/agents/skills/orkestrel-dispatch/scripts/chain.ts +41 -63
  30. package/dist/host/agents/skills/orkestrel-dispatch/scripts/cite.ts +56 -79
  31. package/dist/host/agents/skills/orkestrel-dispatch/scripts/launch.ts +61 -74
  32. package/dist/host/agents/skills/orkestrel-dispatch/scripts/login.ts +59 -89
  33. package/dist/host/agents/skills/orkestrel-dispatch/scripts/patch.ts +87 -106
  34. package/dist/host/agents/skills/orkestrel-dispatch/scripts/result.ts +57 -76
  35. package/dist/host/agents/skills/orkestrel-dispatch/scripts/sweep.ts +73 -88
  36. package/dist/host/agents/skills/orkestrel-falsify/SKILL.md +2 -2
  37. package/dist/host/agents/skills/orkestrel-falsify/scripts/mutate.ts +167 -119
  38. package/dist/host/agents/skills/orkestrel-harden/references/methods.md +1 -1
  39. package/dist/host/agents/skills/orkestrel-harden/scripts/discovery.ts +58 -75
  40. package/dist/host/agents/skills/orkestrel-harden/scripts/interleave.ts +55 -99
  41. package/dist/host/agents/skills/orkestrel-harden/scripts/measure.ts +59 -90
  42. package/dist/host/agents/skills/orkestrel-harden/scripts/titles.ts +60 -80
  43. package/dist/host/agents/skills/orkestrel-parallel/SKILL.md +4 -4
  44. package/dist/host/agents/skills/orkestrel-parallel/scripts/cases.ts +71 -108
  45. package/dist/host/agents/skills/orkestrel-parallel/scripts/lane.ts +1990 -274
  46. package/dist/host/agents/skills/orkestrel-publish/references/release.md +1 -0
  47. package/dist/host/agents/skills/orkestrel-publish/references/wave.md +28 -7
  48. package/dist/host/agents/skills/orkestrel-publish/scripts/compare.ts +58 -79
  49. package/dist/host/agents/skills/orkestrel-publish/scripts/pins.ts +66 -87
  50. package/dist/host/agents/skills/orkestrel-publish/scripts/steps.ts +84 -102
  51. package/dist/host/agents/skills/orkestrel-publish/scripts/swap.ts +92 -99
  52. package/dist/host/agents/skills/orkestrel-publish/scripts/wave.ts +483 -127
  53. package/dist/host/agents/skills/orkestrel-publish/scripts/window.ts +82 -120
  54. package/dist/host/agents/skills/orkestrel-scout/SKILL.md +3 -3
  55. package/dist/host/agents/skills/orkestrel-scout/scripts/map.ts +85 -112
  56. package/dist/host/claude/agents/orkestrel.md +16 -16
  57. package/dist/host/claude/rules/architecture.md +1 -1
  58. package/dist/host/claude/rules/documentation.md +1 -1
  59. package/dist/host/claude/rules/patterns.md +7 -4
  60. package/dist/host/claude/rules/styles.md +1 -1
  61. package/dist/host/claude/rules/tests.md +3 -3
  62. package/dist/host/claude/rules/workspace.md +50 -37
  63. package/dist/host/configs/helpers.ts +117 -71
  64. package/dist/host/dotfiles/oxlintrc.json +6 -0
  65. package/dist/host/guides/agent.md +989 -395
  66. package/dist/host/guides/database.md +357 -342
  67. package/dist/host/guides/form.md +79 -4
  68. package/dist/host/guides/middleware.md +5 -5
  69. package/dist/host/guides/ollama.md +41 -42
  70. package/dist/host/guides/scaffold.md +170 -70
  71. package/dist/host/guides/study.md +12 -12
  72. package/dist/host/guides/table.md +20 -6
  73. package/dist/host/guides/test.md +166 -52
  74. package/dist/host/guides/toolbox.md +127 -81
  75. package/dist/host/guides/workspace.md +21 -14
  76. package/dist/host/manifest.json +54 -54
  77. package/dist/host/tests/config.test.ts +251 -7
  78. package/dist/host/tests/policy.test.ts +14 -21
  79. package/dist/host/tests/setupPolicy.ts +43 -36
  80. package/dist/src/core/index.cjs +533 -139
  81. package/dist/src/core/index.cjs.map +1 -1
  82. package/dist/src/core/index.d.cts +223 -16
  83. package/dist/src/core/index.d.ts +223 -16
  84. package/dist/src/core/index.js +524 -139
  85. package/dist/src/core/index.js.map +1 -1
  86. package/dist/src/server/index.cjs +23 -14
  87. package/dist/src/server/index.cjs.map +1 -1
  88. package/dist/src/server/index.d.cts +3 -2
  89. package/dist/src/server/index.d.ts +3 -2
  90. package/dist/src/server/index.js +24 -15
  91. package/dist/src/server/index.js.map +1 -1
  92. package/package.json +2 -2
@@ -7,9 +7,6 @@ import type { JSONValue } from '@orkestrel/contract';
7
7
  /** Lists the development dependencies a private browser application adds. */
8
8
  export declare const APP_BROWSER_DEV_DEPENDENCIES: Readonly<Record<string, string>>;
9
9
 
10
- /** Names the development dependency every private `app` environment adds. */
11
- export declare const APP_DEV_DEPENDENCIES: Readonly<Record<string, string>>;
12
-
13
10
  /**
14
11
  * Holds the configuration and runtime-entry settings each private `app` environment
15
12
  * contributes, frozen.
@@ -251,6 +248,7 @@ export declare interface ArtifactTemplateSet {
251
248
  readonly distribution: {
252
249
  readonly module: string;
253
250
  readonly proof: string;
251
+ readonly events: string;
254
252
  readonly transport: string;
255
253
  readonly types: string;
256
254
  readonly launcher: string;
@@ -362,9 +360,12 @@ export declare const BASE_DEV_DEPENDENCIES: Readonly<Record<string, string>>;
362
360
  /** Lists the configuration files a workspace that ships its own executable adds, frozen. */
363
361
  export declare const BIN_CONFIGS: readonly string[];
364
362
 
365
- /** Names the executable entry whose presence makes a workspace `bin`. */
363
+ /** Names the executable entry, the `main` module of `src/bin`. */
366
364
  export declare const BIN_ENTRY_PATH = "src/bin/main.ts";
367
365
 
366
+ /** Matches the stem of a `src/bin` module: lowercase letters and digits, letter first, no hyphen. */
367
+ export declare const BIN_MODULE_PATTERN: RegExp;
368
+
368
369
  /** Names the built executable a bin workspace's manifest command runs. */
369
370
  export declare const BIN_OUTPUT_PATH = "dist/bin/main.js";
370
371
 
@@ -388,6 +389,11 @@ export declare const BIN_OUTPUT_PATH = "dist/bin/main.js";
388
389
  * `setup` lists the runtimes required by root setup proofs: `node` for generic
389
390
  * and server proofs, and `browser` for `tests/setupBrowser.test.ts` and `tests/setupStyles.test.ts`.
390
391
  * `journey` selects the birth-owned variant wrapper for a browser application.
392
+ * `bin` lists the stems of the direct `.ts` files of `src/bin`, sorted: each stem that opens with
393
+ * a lowercase letter and that {@link CENTRAL_FILE_NAMES} does not name. The gate refuses a stem
394
+ * {@link isBinModule} rejects. `main` is the
395
+ * executable the manifest's `bin` field runs, and every other module publishes the ES-only
396
+ * `./<name>` subpath with its declaration, for a host tool that loads the module by specifier.
391
397
  * `skills` registers the `skills` Vitest project over the mirrored proofs of the skill
392
398
  * scripts a workspace ships under each `.agents/skills/<skill>/scripts/` directory, and adds their
393
399
  * scoped typecheck.
@@ -427,7 +433,7 @@ export declare interface Blueprint {
427
433
  readonly version: string;
428
434
  readonly engines: string;
429
435
  readonly overrides: readonly Override[];
430
- readonly bin: boolean;
436
+ readonly bin: readonly string[];
431
437
  readonly setup: readonly SetupRuntime[];
432
438
  readonly guides: boolean;
433
439
  readonly integration: boolean;
@@ -548,9 +554,34 @@ export declare function blueprintToDevDependencies(blueprint: Blueprint): Readon
548
554
  export declare function blueprintToDocumentArtifacts(blueprint: Blueprint): readonly ContentArtifact[];
549
555
 
550
556
  /**
551
- * Projects published environments and sheets into the manifest export map.
557
+ * Projects a blueprint into the `bin`, `files`, and `exports` entries its manifest carries.
558
+ *
552
559
  * @param blueprint - The workspace specification.
553
- * @returns JavaScript conditions and CSS and SCSS subpaths, without an invented JavaScript root.
560
+ * @returns The planned commands, packed paths, and subpaths, each in the order the manifest emits.
561
+ *
562
+ * @remarks
563
+ * A workspace without an executable plans no command, and one publishing nothing plans no
564
+ * subpath, because its manifest carries no `exports` map. `dist/src` is packed only where a
565
+ * library environment or a sheet builds into it: an executable reaches `dist/src` only through
566
+ * the `@src/*` specifiers its build rewrites, one per library environment, so an executable
567
+ * beside no library environment bundles what it imports and packs `dist/bin` alone. A workspace
568
+ * publishing nothing packs `dist/app` when it builds an application.
569
+ *
570
+ * @example
571
+ * ```ts
572
+ * import { blueprintToEntries, createBlueprint } from '@orkestrel/scaffold'
573
+ *
574
+ * blueprintToEntries(createBlueprint('router', { src: ['core'], bin: ['main'] })).files
575
+ * // ['dist/src', 'dist/bin', 'README.md']
576
+ * ```
577
+ */
578
+ export declare function blueprintToEntries(blueprint: Blueprint): ManifestEntrySet;
579
+
580
+ /**
581
+ * Projects published environments, sheets, and `src/bin` modules into the manifest export map.
582
+ * @param blueprint - The workspace specification.
583
+ * @returns JavaScript conditions, CSS and SCSS subpaths, and the ES-only `./<name>` subpath of
584
+ * each `src/bin` module other than `main`, without an invented JavaScript root.
554
585
  * @example
555
586
  * ```ts
556
587
  * import { blueprintToExports, createBlueprint } from '@orkestrel/scaffold'
@@ -1024,9 +1055,10 @@ export declare function blueprintToToolchainHolds(blueprint: Blueprint): Readonl
1024
1055
  * Every direct `test:<project>` script is writable, together with the probe and
1025
1056
  * benchmark workbench scripts. A workspace carrying guides adds `test:guides`,
1026
1057
  * whose package-owned entry runs the guides project and handles explicit parity
1027
- * rewrites, and one carrying skills adds `test:skills`. Publishing adds the pack and publication lifecycle scripts.
1028
- * Sheet and framework faces add their check and build scripts, application frameworks add dev scripts,
1029
- * and selected showcases and journeys add their mode scripts.
1058
+ * rewrites, and one carrying skills adds `test:skills`. Publishing adds the pack and publication
1059
+ * lifecycle scripts. Library environments, sheet faces, framework faces, and `src/bin` modules
1060
+ * add their check and build scripts, application
1061
+ * frameworks add dev scripts, and selected showcases and journeys add their mode scripts.
1030
1062
  * A base browser application's journey axis also adds `journey` and `capture`, and each
1031
1063
  * app-side browser face adds `journey:<name>` and `capture:<name>`. Their generated
1032
1064
  * commands are writable and have no predecessor forms; customized values remain caller-owned.
@@ -1043,10 +1075,10 @@ export declare function blueprintToToolchainHolds(blueprint: Blueprint): Readonl
1043
1075
  * existed. The pack hook accepts the build chain emitted before it
1044
1076
  * delegated to `build`. The publication hook accepts the same gate chain without
1045
1077
  * {@link RELEASE_PROOF_COMMAND}. No accepted publication chain carries a study
1046
- * step. `serve:build` accepts the server-only chain it ran before it delegated to
1047
- * `build`. The value being written is always writable, so it is not repeated there. Any other value is a script the workspace author
1048
- * customized, and {@link replaceManifestScripts} retains it while writing the
1049
- * other named scripts independently.
1078
+ * step. `serve:build` accepts the server-only chain it ran before it delegated to `build`.
1079
+ * The value being written is always writable, so it is not repeated there. Any other value is a
1080
+ * script the workspace author customized, and {@link replaceManifestScripts} retains it while
1081
+ * writing the other named scripts independently.
1050
1082
  *
1051
1083
  * @example
1052
1084
  * ```ts
@@ -1054,7 +1086,7 @@ export declare function blueprintToToolchainHolds(blueprint: Blueprint): Readonl
1054
1086
  *
1055
1087
  * const blueprint = createBlueprint('router', { src: ['core'] })
1056
1088
  *
1057
- * blueprintToWritableScripts(blueprint)[0]?.name // 'test:src:core'
1089
+ * blueprintToWritableScripts(blueprint)[0]?.name // 'check:src:core'
1058
1090
  * ```
1059
1091
  */
1060
1092
  export declare function blueprintToWritableScripts(blueprint: Blueprint): readonly ManifestScript[];
@@ -1308,6 +1340,9 @@ export declare type CatalogEntry = {
1308
1340
  */
1309
1341
  export declare function catalogToLayers(entries: readonly CatalogEntry[]): ReadonlyArray<readonly string[]>;
1310
1342
 
1343
+ /** Lists the stems of the centralized files the architecture kind table names, which no `src/bin` module takes, frozen. */
1344
+ export declare const CENTRAL_FILE_NAMES: readonly string[];
1345
+
1311
1346
  /**
1312
1347
  * Collects the near names and equal contracts other owners claim beside each name a candidate adds.
1313
1348
  *
@@ -1878,7 +1913,7 @@ export declare class Compiler implements CompilerInterface {
1878
1913
  * const blueprint = createBlueprint('router', {
1879
1914
  * src: ['core', 'server'],
1880
1915
  * dependencies: [{ name: '@orkestrel/emitter', range: '^0.0.5' }],
1881
- * bin: true,
1916
+ * bin: ['main'],
1882
1917
  * })
1883
1918
  *
1884
1919
  * blueprint.version // '0.0.1'
@@ -2328,6 +2363,38 @@ export declare class Compiler implements CompilerInterface {
2328
2363
  */
2329
2364
  export declare function insertManifestDependencies(manifest: string, additions: DependencyPinSet): string | undefined;
2330
2365
 
2366
+ /**
2367
+ * Inserts the planned `bin`, `files`, and `exports` entries a package manifest lacks.
2368
+ *
2369
+ * @param manifest - The manifest text to compile.
2370
+ * @param planned - The entries the plan emits, each in planned order.
2371
+ * @returns The manifest declaring every planned entry, or `undefined` when the text is not a
2372
+ * manifest object, or a section that must take an entry holds a value of another shape: `bin` not
2373
+ * an object, `exports` not a map of subpaths, or `files` not an array of strings.
2374
+ *
2375
+ * @remarks
2376
+ * The compiler inserts text instead of serializing the manifest, so every declared byte survives,
2377
+ * and a declared entry keeps its value whatever the plan holds. An inserted entry lands before the
2378
+ * first declared entry the plan orders after it, or after the last declared entry when none does,
2379
+ * and copies the indentation of the section's first entry; a nested value takes the same step per
2380
+ * level. An absent section is created as one top-level key holding the planned entries, before the
2381
+ * first declared key `MANIFEST_KEY_ORDER` orders after it, or last in the manifest object. A
2382
+ * manifest declaring every planned entry is returned unchanged.
2383
+ *
2384
+ * @example
2385
+ * ```ts
2386
+ * import { insertManifestEntries } from '@orkestrel/scaffold'
2387
+ *
2388
+ * insertManifestEntries('{\n\t"files": [\n\t\t"dist/src",\n\t\t"README.md"\n\t]\n}\n', {
2389
+ * bin: {},
2390
+ * files: ['dist/src', 'dist/bin', 'README.md'],
2391
+ * exports: {},
2392
+ * })
2393
+ * // '{\n\t"files": [\n\t\t"dist/src",\n\t\t"dist/bin",\n\t\t"README.md"\n\t]\n}\n'
2394
+ * ```
2395
+ */
2396
+ export declare function insertManifestEntries(manifest: string, planned: ManifestEntrySet): string | undefined;
2397
+
2331
2398
  /**
2332
2399
  * Inserts dependencies into one section of package manifest text.
2333
2400
  *
@@ -2425,6 +2492,21 @@ export declare class Compiler implements CompilerInterface {
2425
2492
  */
2426
2493
  export declare const isAudit: Guard<Audit>;
2427
2494
 
2495
+ /**
2496
+ * Narrows a value to the stem of a `src/bin` module.
2497
+ * @param value - The candidate stem.
2498
+ * @returns True if the stem matches `BIN_MODULE_PATTERN` within the name length cap and names no
2499
+ * centralized file; false otherwise.
2500
+ * @example
2501
+ * ```ts
2502
+ * import { isBinModule } from '@orkestrel/scaffold'
2503
+ *
2504
+ * isBinModule('reporter') // true
2505
+ * isBinModule('helpers') // false
2506
+ * ```
2507
+ */
2508
+ export declare function isBinModule(value: unknown): value is string;
2509
+
2428
2510
  /**
2429
2511
  * Narrows a value to a {@link Blueprint}.
2430
2512
  *
@@ -2867,6 +2949,28 @@ export declare class Compiler implements CompilerInterface {
2867
2949
  */
2868
2950
  export declare const isStylesExtension: Guard<StylesExtension>;
2869
2951
 
2952
+ /**
2953
+ * Narrows a manifest `exports` value to a map of subpaths.
2954
+ *
2955
+ * @param value - The declared `exports` value.
2956
+ * @returns True if the value is an object whose every key opens with `.`; false otherwise.
2957
+ *
2958
+ * @remarks
2959
+ * Node reads a string, an array, or an object whose keys are conditions, such as `import` and
2960
+ * `require`, as the root export alone, and refuses an object that mixes conditions with subpaths,
2961
+ * so a subpath can be added only to a subpath map. A value whose keys cannot be read answers
2962
+ * `false`.
2963
+ *
2964
+ * @example
2965
+ * ```ts
2966
+ * import { isSubpathMap } from '@orkestrel/scaffold'
2967
+ *
2968
+ * isSubpathMap({ '.': './index.js' }) // true
2969
+ * isSubpathMap({ import: './index.js' }) // false
2970
+ * ```
2971
+ */
2972
+ export declare function isSubpathMap(value: unknown): value is Readonly<Record<string, unknown>>;
2973
+
2870
2974
  /**
2871
2975
  * Narrows a value to a surface an extension can extend.
2872
2976
  * @param value - The candidate surface.
@@ -2929,6 +3033,16 @@ export declare class Compiler implements CompilerInterface {
2929
3033
  */
2930
3034
  export declare type Lookup = 'found' | 'missing' | 'unmatched' | 'failed';
2931
3035
 
3036
+ /**
3037
+ * Lists the top-level manifest keys in the order a compiled manifest emits them.
3038
+ *
3039
+ * @remarks
3040
+ * An entry write that creates an absent `bin`, `files`, or `exports` key places it before the
3041
+ * first declared key this list orders after it, so a created key lands where a born manifest
3042
+ * carries it.
3043
+ */
3044
+ export declare const MANIFEST_KEY_ORDER: readonly string[];
3045
+
2932
3046
  /** Names the manifest path every compiler plan emits with birth ownership. */
2933
3047
  export declare const MANIFEST_PATH = "package.json";
2934
3048
 
@@ -2953,6 +3067,20 @@ export declare class Compiler implements CompilerInterface {
2953
3067
  readonly text: string;
2954
3068
  }
2955
3069
 
3070
+ /**
3071
+ * Describes the `bin`, `files`, and `exports` entries a manifest carries.
3072
+ *
3073
+ * @remarks
3074
+ * `bin` maps each command name to the file it runs, `files` lists the packed paths, and
3075
+ * `exports` maps each subpath to its target or condition block. Each list keeps the order the
3076
+ * plan emits, and an entry write reads that order to place an inserted entry.
3077
+ */
3078
+ export declare interface ManifestEntrySet {
3079
+ readonly bin: Readonly<Record<string, string>>;
3080
+ readonly files: readonly string[];
3081
+ readonly exports: Readonly<Record<string, unknown>>;
3082
+ }
3083
+
2956
3084
  /**
2957
3085
  * Describes the manifest regions a writing operation may change.
2958
3086
  *
@@ -2966,12 +3094,15 @@ export declare class Compiler implements CompilerInterface {
2966
3094
  * `overrides` names npm selector maps whose string leaves are replaced or inserted.
2967
3095
  * Malformed ancestors and duplicate selected keys refuse the write. This metadata
2968
3096
  * is independent of the artifact replacements carried by `Blueprint.overrides`.
3097
+ * `entries` names the planned `bin`, `files`, and `exports` entries, and the writer inserts each
3098
+ * one the manifest lacks. Absent, nothing is inserted.
2969
3099
  */
2970
3100
  export declare interface ManifestRegionSet {
2971
3101
  readonly pins: DependencyPinSet;
2972
3102
  readonly scripts: readonly ManifestScript[];
2973
3103
  readonly additions?: DependencyPinSet;
2974
3104
  readonly overrides?: Readonly<Record<string, Readonly<Record<string, string>>>>;
3105
+ readonly entries?: ManifestEntrySet;
2975
3106
  }
2976
3107
 
2977
3108
  /**
@@ -3017,6 +3148,37 @@ export declare class Compiler implements CompilerInterface {
3017
3148
  */
3018
3149
  export declare function manifestToDependencies(manifest: string): ManifestDependencySet;
3019
3150
 
3151
+ /**
3152
+ * Projects a package manifest's text to the planned `bin`, `files`, and `exports` entries it lacks.
3153
+ *
3154
+ * @param manifest - The `package.json` text.
3155
+ * @param planned - The entries the plan emits.
3156
+ * @returns The planned entries the manifest does not declare, each in planned order.
3157
+ *
3158
+ * @remarks
3159
+ * A planned command counts as declared when the manifest names it, or when any declared command
3160
+ * runs the planned file: a package keeps the command name it publishes. A string `bin` declares
3161
+ * the planned command when it names the planned file. A planned packed path counts as declared
3162
+ * when a declared path equals it or names a directory above it, as {@link matchesPackedPath} reads
3163
+ * the pair. A subpath counts as declared by name alone, so a declared entry holding another value
3164
+ * stays the package's. A string `exports`, a fallback array, or an object whose keys are conditions
3165
+ * rather than subpaths declares the root subpath `.` alone, as Node reads each. A section holding any other shape declares none of
3166
+ * its planned entries. A manifest that is not an object lacks nothing, because no entry can be read
3167
+ * from it or written into it.
3168
+ *
3169
+ * @example
3170
+ * ```ts
3171
+ * import { manifestToEntries } from '@orkestrel/scaffold'
3172
+ *
3173
+ * manifestToEntries('{"files": ["dist/src"]}', {
3174
+ * bin: {},
3175
+ * files: ['dist/src', 'dist/bin'],
3176
+ * exports: {},
3177
+ * }).files // ['dist/bin']
3178
+ * ```
3179
+ */
3180
+ export declare function manifestToEntries(manifest: string, planned: ManifestEntrySet): ManifestEntrySet;
3181
+
3020
3182
  /**
3021
3183
  * Represents one string or object brace found in manifest text.
3022
3184
  *
@@ -3171,6 +3333,30 @@ export declare class Compiler implements CompilerInterface {
3171
3333
  */
3172
3334
  export declare function matchesOrchestrationPath(path: string): boolean;
3173
3335
 
3336
+ /**
3337
+ * Checks whether a declared `files` entry packs a planned one.
3338
+ *
3339
+ * @param declared - The entry the manifest declares.
3340
+ * @param planned - The entry the plan emits.
3341
+ * @returns True if the entries are equal, or the declared entry names a directory whose path
3342
+ * segments open the planned entry's; false otherwise.
3343
+ *
3344
+ * @remarks
3345
+ * A declared entry ending in `/**` or `/*` packs the directory it names, so `dist/**` packs
3346
+ * `dist/app`. No other glob is read: an entry such as `dist/*.js` packs no planned path it does not
3347
+ * equal. A negated entry such as `!dist/src/styles/index.js` excludes a path rather than packing
3348
+ * one, so only an equal entry declares it.
3349
+ *
3350
+ * @example
3351
+ * ```ts
3352
+ * import { matchesPackedPath } from '@orkestrel/scaffold'
3353
+ *
3354
+ * matchesPackedPath('dist', 'dist/app') // true
3355
+ * matchesPackedPath('dist-old', 'dist/app') // false
3356
+ * ```
3357
+ */
3358
+ export declare function matchesPackedPath(declared: string, planned: string): boolean;
3359
+
3174
3360
  /**
3175
3361
  * Tests whether one emitted line fits the vendored formatter width.
3176
3362
  *
@@ -3381,6 +3567,27 @@ export declare class Compiler implements CompilerInterface {
3381
3567
  */
3382
3568
  export declare function nameToGuide(name: string): string;
3383
3569
 
3570
+ /**
3571
+ * Returns the canonical form of a path a manifest names inside its package.
3572
+ *
3573
+ * @param path - A `bin` target or a `files` entry.
3574
+ * @returns The path with `/` for every backslash, one `/` for every run of separators, and no
3575
+ * leading `./` or trailing `/`.
3576
+ *
3577
+ * @remarks
3578
+ * npm reads a backslash in a `bin` or `files` path as a separator and collapses repeated
3579
+ * separators, so `dist\bin\main.js` and `dist//bin/main.js` name `dist/bin/main.js`.
3580
+ *
3581
+ * @example
3582
+ * ```ts
3583
+ * import { normalizePackagePath } from '@orkestrel/scaffold'
3584
+ *
3585
+ * normalizePackagePath('./dist/bin/main.js') // 'dist/bin/main.js'
3586
+ * normalizePackagePath('dist//bin/main.js') // 'dist/bin/main.js'
3587
+ * ```
3588
+ */
3589
+ export declare function normalizePackagePath(path: string): string;
3590
+
3384
3591
  /**
3385
3592
  * Lists the exact root paths that wire an agent bench or own an orchestration directory, frozen.
3386
3593
  *