@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.
- package/dist/agents/skills/orkestrel-dispatch/scripts/bench.js +61 -96
- package/dist/agents/skills/orkestrel-dispatch/scripts/brief.js +48 -76
- package/dist/agents/skills/orkestrel-dispatch/scripts/chain.js +27 -66
- package/dist/agents/skills/orkestrel-dispatch/scripts/cite.js +31 -64
- package/dist/agents/skills/orkestrel-dispatch/scripts/launch.js +43 -57
- package/dist/agents/skills/orkestrel-dispatch/scripts/login.js +43 -86
- package/dist/agents/skills/orkestrel-dispatch/scripts/patch.js +68 -104
- package/dist/agents/skills/orkestrel-dispatch/scripts/result.js +35 -69
- package/dist/agents/skills/orkestrel-dispatch/scripts/sweep.js +47 -84
- package/dist/agents/skills/orkestrel-falsify/scripts/mutate.js +134 -116
- package/dist/agents/skills/orkestrel-harden/scripts/discovery.js +38 -90
- package/dist/agents/skills/orkestrel-harden/scripts/interleave.js +39 -103
- package/dist/agents/skills/orkestrel-harden/scripts/measure.js +40 -89
- package/dist/agents/skills/orkestrel-harden/scripts/titles.js +41 -87
- package/dist/agents/skills/orkestrel-parallel/scripts/cases.js +43 -88
- package/dist/agents/skills/orkestrel-parallel/scripts/lane.js +1568 -213
- package/dist/agents/skills/orkestrel-publish/scripts/compare.js +40 -60
- package/dist/agents/skills/orkestrel-publish/scripts/pins.js +47 -81
- package/dist/agents/skills/orkestrel-publish/scripts/steps.js +66 -104
- package/dist/agents/skills/orkestrel-publish/scripts/swap.js +74 -88
- package/dist/agents/skills/orkestrel-publish/scripts/wave.js +387 -109
- package/dist/agents/skills/orkestrel-publish/scripts/window.js +55 -96
- package/dist/agents/skills/orkestrel-scout/scripts/map.js +54 -101
- package/dist/bin/main.js +275 -33
- package/dist/bin/main.js.map +1 -1
- package/dist/host/AGENTS.md +1 -1
- package/dist/host/agents/skills/orkestrel-dispatch/scripts/bench.ts +81 -97
- package/dist/host/agents/skills/orkestrel-dispatch/scripts/brief.ts +64 -72
- package/dist/host/agents/skills/orkestrel-dispatch/scripts/chain.ts +41 -63
- package/dist/host/agents/skills/orkestrel-dispatch/scripts/cite.ts +56 -79
- package/dist/host/agents/skills/orkestrel-dispatch/scripts/launch.ts +61 -74
- package/dist/host/agents/skills/orkestrel-dispatch/scripts/login.ts +59 -89
- package/dist/host/agents/skills/orkestrel-dispatch/scripts/patch.ts +87 -106
- package/dist/host/agents/skills/orkestrel-dispatch/scripts/result.ts +57 -76
- package/dist/host/agents/skills/orkestrel-dispatch/scripts/sweep.ts +73 -88
- package/dist/host/agents/skills/orkestrel-falsify/SKILL.md +2 -2
- package/dist/host/agents/skills/orkestrel-falsify/scripts/mutate.ts +167 -119
- package/dist/host/agents/skills/orkestrel-harden/references/methods.md +1 -1
- package/dist/host/agents/skills/orkestrel-harden/scripts/discovery.ts +58 -75
- package/dist/host/agents/skills/orkestrel-harden/scripts/interleave.ts +55 -99
- package/dist/host/agents/skills/orkestrel-harden/scripts/measure.ts +59 -90
- package/dist/host/agents/skills/orkestrel-harden/scripts/titles.ts +60 -80
- package/dist/host/agents/skills/orkestrel-parallel/SKILL.md +4 -4
- package/dist/host/agents/skills/orkestrel-parallel/scripts/cases.ts +71 -108
- package/dist/host/agents/skills/orkestrel-parallel/scripts/lane.ts +1990 -274
- package/dist/host/agents/skills/orkestrel-publish/references/release.md +1 -0
- package/dist/host/agents/skills/orkestrel-publish/references/wave.md +28 -7
- package/dist/host/agents/skills/orkestrel-publish/scripts/compare.ts +58 -79
- package/dist/host/agents/skills/orkestrel-publish/scripts/pins.ts +66 -87
- package/dist/host/agents/skills/orkestrel-publish/scripts/steps.ts +84 -102
- package/dist/host/agents/skills/orkestrel-publish/scripts/swap.ts +92 -99
- package/dist/host/agents/skills/orkestrel-publish/scripts/wave.ts +483 -127
- package/dist/host/agents/skills/orkestrel-publish/scripts/window.ts +82 -120
- package/dist/host/agents/skills/orkestrel-scout/SKILL.md +3 -3
- package/dist/host/agents/skills/orkestrel-scout/scripts/map.ts +85 -112
- package/dist/host/claude/agents/orkestrel.md +16 -16
- package/dist/host/claude/rules/architecture.md +1 -1
- package/dist/host/claude/rules/documentation.md +1 -1
- package/dist/host/claude/rules/patterns.md +7 -4
- package/dist/host/claude/rules/styles.md +1 -1
- package/dist/host/claude/rules/tests.md +3 -3
- package/dist/host/claude/rules/workspace.md +50 -37
- package/dist/host/configs/helpers.ts +117 -71
- package/dist/host/dotfiles/oxlintrc.json +6 -0
- package/dist/host/guides/agent.md +989 -395
- package/dist/host/guides/database.md +357 -342
- package/dist/host/guides/form.md +79 -4
- package/dist/host/guides/middleware.md +5 -5
- package/dist/host/guides/ollama.md +41 -42
- package/dist/host/guides/scaffold.md +170 -70
- package/dist/host/guides/study.md +12 -12
- package/dist/host/guides/table.md +20 -6
- package/dist/host/guides/test.md +166 -52
- package/dist/host/guides/toolbox.md +127 -81
- package/dist/host/guides/workspace.md +21 -14
- package/dist/host/manifest.json +54 -54
- package/dist/host/tests/config.test.ts +251 -7
- package/dist/host/tests/policy.test.ts +14 -21
- package/dist/host/tests/setupPolicy.ts +43 -36
- package/dist/src/core/index.cjs +533 -139
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.d.cts +223 -16
- package/dist/src/core/index.d.ts +223 -16
- package/dist/src/core/index.js +524 -139
- package/dist/src/core/index.js.map +1 -1
- package/dist/src/server/index.cjs +23 -14
- package/dist/src/server/index.cjs.map +1 -1
- package/dist/src/server/index.d.cts +3 -2
- package/dist/src/server/index.d.ts +3 -2
- package/dist/src/server/index.js +24 -15
- package/dist/src/server/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -1046,7 +1046,7 @@ function listWrapperPaths(target, groups) {
|
|
|
1046
1046
|
name,
|
|
1047
1047
|
axes: _src_core.AXES
|
|
1048
1048
|
})),
|
|
1049
|
-
bin:
|
|
1049
|
+
bin: ["main"],
|
|
1050
1050
|
styles: true,
|
|
1051
1051
|
themes: true,
|
|
1052
1052
|
showcase: true,
|
|
@@ -1091,8 +1091,6 @@ function pruneEmptiedDirectories(target, removed) {
|
|
|
1091
1091
|
return [...new Set(Iterator.from(removed).flatMap((path) => listAncestors(path).slice(1, -1)).toArray())].sort((left, right) => (0, _orkestrel_contract.comparePrimitives)(right.split("/").length, left.split("/").length) || (0, _orkestrel_contract.comparePrimitives)(left, right)).flatMap((candidate) => {
|
|
1092
1092
|
const directory = resolveContainedPath(target, candidate);
|
|
1093
1093
|
if (directory === void 0 || !isPhysicalDirectory(directory)) return [];
|
|
1094
|
-
const entries = (0, _orkestrel_contract.attempt)(() => (0, node_fs.readdirSync)(directory));
|
|
1095
|
-
if (!entries.success || entries.value.length > 0) return [];
|
|
1096
1094
|
return (0, _orkestrel_contract.attempt)(() => (0, node_fs.rmdirSync)(directory)).success ? [candidate] : [];
|
|
1097
1095
|
});
|
|
1098
1096
|
}
|
|
@@ -1941,7 +1939,7 @@ function readSurfaceCandidate(root, loader) {
|
|
|
1941
1939
|
const owner = name.replace(/^@orkestrel\//u, "");
|
|
1942
1940
|
const guide = readSurfaceFile(root, owner, "candidate", loader);
|
|
1943
1941
|
const source = (0, node_path.join)(root, "src");
|
|
1944
|
-
if (guide === void 0 && !isPhysicalDirectory(source)) throw new _src_core.ScaffoldError("TARGET", `Surface candidate ${JSON.stringify(root.slice(0, 512))} has neither ${JSON.stringify(`guides/${owner}.md`)} nor src
|
|
1942
|
+
if (guide === void 0 && !isPhysicalDirectory(source)) throw new _src_core.ScaffoldError("TARGET", `Surface candidate ${JSON.stringify(root.slice(0, 512))} publishes no surface: it has neither ${JSON.stringify(`guides/${owner}.md`)} nor src/, as an app-only workspace has neither. Its test:policy surface rule enforces fleet name ownership over its exports, so run npm run test:policy there; add its guide or src/ only when the package is meant to publish names.`, { root });
|
|
1945
1943
|
const reflection = readSurfaceModule(loader);
|
|
1946
1944
|
const files = Object.fromEntries(listFiles(source).filter((file) => file.endsWith(".ts")).map((file) => {
|
|
1947
1945
|
const text = readFileText(source, file);
|
|
@@ -2472,7 +2470,7 @@ var isDependencies = (0, _orkestrel_contract.andOf)(_src_core.isCollection, (0,
|
|
|
2472
2470
|
* The whole closed record a manifest-writing method accepts, so a caller
|
|
2473
2471
|
* naming a region the writer does not carry is refused before any byte moves.
|
|
2474
2472
|
* Each region is bounded by the same collection law its own list guard applies,
|
|
2475
|
-
* and `additions`
|
|
2473
|
+
* and `additions`, `overrides`, and `entries` are the regions a caller may omit.
|
|
2476
2474
|
*
|
|
2477
2475
|
* @example
|
|
2478
2476
|
* ```ts
|
|
@@ -2497,8 +2495,17 @@ var isManifestRegionSet = (0, _orkestrel_contract.recordOf)({
|
|
|
2497
2495
|
runtime: isDependencies,
|
|
2498
2496
|
development: isDependencies
|
|
2499
2497
|
}),
|
|
2500
|
-
overrides: (0, _orkestrel_contract.compileGuard)((0, _orkestrel_contract.recordShape)((0, _orkestrel_contract.recordShape)((0, _orkestrel_contract.stringShape)())))
|
|
2501
|
-
|
|
2498
|
+
overrides: (0, _orkestrel_contract.compileGuard)((0, _orkestrel_contract.recordShape)((0, _orkestrel_contract.recordShape)((0, _orkestrel_contract.stringShape)()))),
|
|
2499
|
+
entries: (0, _orkestrel_contract.recordOf)({
|
|
2500
|
+
bin: (0, _orkestrel_contract.compileGuard)((0, _orkestrel_contract.recordShape)((0, _orkestrel_contract.stringShape)())),
|
|
2501
|
+
files: (0, _orkestrel_contract.andOf)(_src_core.isCollection, (0, _orkestrel_contract.arrayOf)(_orkestrel_contract.isString)),
|
|
2502
|
+
exports: _orkestrel_contract.isRecord
|
|
2503
|
+
})
|
|
2504
|
+
}, [
|
|
2505
|
+
"additions",
|
|
2506
|
+
"overrides",
|
|
2507
|
+
"entries"
|
|
2508
|
+
]);
|
|
2502
2509
|
/** Narrows a value to a bounded list of fetched guide mirrors. */
|
|
2503
2510
|
var isMirrors = (0, _orkestrel_contract.andOf)(_src_core.isCollection, (0, _orkestrel_contract.arrayOf)(_src_core.isMirror));
|
|
2504
2511
|
/** Narrows a value to a bounded list of fleet catalog rows. */
|
|
@@ -3066,7 +3073,7 @@ var WriteTransaction = class {
|
|
|
3066
3073
|
const destination = (0, node_path.resolve)(path);
|
|
3067
3074
|
const { anchor: located, missing } = this.#locate(destination);
|
|
3068
3075
|
const created = [];
|
|
3069
|
-
for (const segment of
|
|
3076
|
+
for (const segment of missing.toReversed()) {
|
|
3070
3077
|
const anchor = created.at(-1) ?? located;
|
|
3071
3078
|
if (!matchesAnchor(anchor)) throw new _src_core.ScaffoldError("WRITE", `The directory at ${anchor.path} changed while writing.`, {
|
|
3072
3079
|
path: destination,
|
|
@@ -3142,10 +3149,10 @@ var WriteTransaction = class {
|
|
|
3142
3149
|
(0, node_fs.renameSync)(expectation.path, backup);
|
|
3143
3150
|
}
|
|
3144
3151
|
#recover(promoted, taken) {
|
|
3145
|
-
const restoreFailures = [...
|
|
3152
|
+
const restoreFailures = [...taken.toReversed().flatMap((path) => {
|
|
3146
3153
|
const restored = (0, _orkestrel_contract.attempt)(() => (0, node_fs.renameSync)(this.#resolve(this.#backup, path), this.#expectation(path).path));
|
|
3147
3154
|
return restored.success ? [] : [restored.error];
|
|
3148
|
-
}), ...
|
|
3155
|
+
}), ...promoted.toReversed().flatMap((path) => {
|
|
3149
3156
|
const expectation = this.#expectation(path);
|
|
3150
3157
|
const restored = (0, _orkestrel_contract.attempt)(() => {
|
|
3151
3158
|
if (expectation.shape === "absent") {
|
|
@@ -3161,7 +3168,7 @@ var WriteTransaction = class {
|
|
|
3161
3168
|
force: true
|
|
3162
3169
|
})) : void 0;
|
|
3163
3170
|
const clearFailures = cleared === void 0 || cleared.success ? [] : [cleared.error];
|
|
3164
|
-
const removeFailures =
|
|
3171
|
+
const removeFailures = this.#created.toReversed().flatMap((created) => {
|
|
3165
3172
|
const path = (0, _orkestrel_contract.isString)(created) ? created : created.path;
|
|
3166
3173
|
const removed = (0, _orkestrel_contract.attempt)(() => (0, node_fs.rmdirSync)(path));
|
|
3167
3174
|
return !removed.success && !matchesMissingPath(removed.error) ? [removed.error] : [];
|
|
@@ -3514,7 +3521,8 @@ var Materializer = class {
|
|
|
3514
3521
|
* the manifest does not declare is the caller's mistake and throws. A script
|
|
3515
3522
|
* holding a value the region does not accept is the workspace author's own
|
|
3516
3523
|
* chain, so the script region is skipped without a byte moving and the range
|
|
3517
|
-
* region is still written.
|
|
3524
|
+
* region is still written. An entry section holding another shape is the package's own
|
|
3525
|
+
* value, so the entry region is skipped the same way. The advisory channel reports what the maintainer
|
|
3518
3526
|
* must paste.
|
|
3519
3527
|
*/
|
|
3520
3528
|
declare(regions, target) {
|
|
@@ -4108,7 +4116,8 @@ var Materializer = class {
|
|
|
4108
4116
|
const missing = [...regions.pins.runtime, ...regions.pins.development].find((dependency) => !text.includes(JSON.stringify(dependency.name)));
|
|
4109
4117
|
throw this.#error("INVALID", `The manifest does not declare ${missing?.name ?? "a requested package"}, so its range cannot be rewritten.`, missing === void 0 ? void 0 : { name: missing.name });
|
|
4110
4118
|
}
|
|
4111
|
-
|
|
4119
|
+
const scripted = (0, _src_core.replaceManifestScripts)(manifest, regions.scripts) ?? manifest;
|
|
4120
|
+
return regions.entries === void 0 ? scripted : (0, _src_core.insertManifestEntries)(scripted, regions.entries) ?? scripted;
|
|
4112
4121
|
};
|
|
4113
4122
|
}
|
|
4114
4123
|
#finish(result) {
|
|
@@ -4674,7 +4683,7 @@ var Upstream = class {
|
|
|
4674
4683
|
url,
|
|
4675
4684
|
count: names.length
|
|
4676
4685
|
});
|
|
4677
|
-
return
|
|
4686
|
+
return names.toSorted();
|
|
4678
4687
|
}
|
|
4679
4688
|
#latest(content) {
|
|
4680
4689
|
const parsed = (0, _orkestrel_contract.parseJSON)(content);
|