@orkestrel/scaffold 0.0.129 → 0.0.131
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/bin/main.js +39 -36
- package/dist/bin/main.js.map +1 -1
- package/dist/host/agents/orchestration.md +1 -0
- package/dist/host/agents/platforms/windows.md +1 -0
- package/dist/host/agents/skills/orkestrel-parallel/references/t3.md +1 -0
- package/dist/host/agents/skills/orkestrel-polish/SKILL.md +1 -0
- package/dist/host/claude/agents/orkestrel.md +7 -7
- package/dist/host/claude/rules/patterns.md +2 -0
- package/dist/host/guides/agent.md +228 -152
- package/dist/host/guides/capture.md +5 -5
- package/dist/host/guides/middleware.md +82 -64
- package/dist/host/guides/scaffold.md +13 -6
- package/dist/host/manifest.json +11 -11
- package/dist/src/core/index.cjs +69 -18
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.d.cts +5 -2
- package/dist/src/core/index.d.ts +5 -2
- package/dist/src/core/index.js +69 -18
- package/dist/src/core/index.js.map +1 -1
- package/package.json +1 -1
package/dist/bin/main.js
CHANGED
|
@@ -10,7 +10,7 @@ import { readdirSync } from "node:fs";
|
|
|
10
10
|
import { parseArgs } from "node:util";
|
|
11
11
|
var package_default = {
|
|
12
12
|
name: "@orkestrel/scaffold",
|
|
13
|
-
version: "0.0.
|
|
13
|
+
version: "0.0.131",
|
|
14
14
|
description: "Scaffold workspaces with commands: new, audit, surface, repair, catalog, and overwrite.",
|
|
15
15
|
keywords: [
|
|
16
16
|
"audit",
|
|
@@ -188,6 +188,8 @@ var USAGE_CODE = "USAGE";
|
|
|
188
188
|
var FAILED_CODE = "FAILED";
|
|
189
189
|
/** Holds what the failure envelope says when the raised value carried no message. */
|
|
190
190
|
var FAILED_MESSAGE = "The command failed for an unrecognized reason";
|
|
191
|
+
/** Names the gate chains a writing verb lands over a generated predecessor. */
|
|
192
|
+
var CHAIN_SCRIPTS = Object.freeze(["test", "build:app"]);
|
|
191
193
|
/**
|
|
192
194
|
* Names the workspace argument the creation verb takes, as usage writes it.
|
|
193
195
|
*
|
|
@@ -815,18 +817,20 @@ function sheetTestToQuestion(artifact, present) {
|
|
|
815
817
|
*
|
|
816
818
|
* @param manifest - The target manifest text.
|
|
817
819
|
* @param blueprint - The workspace shape that supplies the planned scripts.
|
|
818
|
-
* @returns The blueprint's writable scripts, followed by the planned `test`
|
|
819
|
-
* declared chain is a generated predecessor of
|
|
820
|
+
* @returns The blueprint's writable scripts, followed by the planned `test` and `build:app` chains
|
|
821
|
+
* where each declared chain is a generated predecessor of its planned chain.
|
|
820
822
|
*
|
|
821
823
|
* @remarks
|
|
822
|
-
* A publishing manifest's byte-exact former generated chain also joins the writable
|
|
823
|
-
* planned chain with its generated application and journey invocations after
|
|
824
|
-
* that differs in spacing, order, or another step does not match that
|
|
825
|
-
*
|
|
826
|
-
*
|
|
827
|
-
*
|
|
828
|
-
*
|
|
829
|
-
*
|
|
824
|
+
* A publishing manifest's byte-exact former generated `test` chain also joins the writable
|
|
825
|
+
* region: the planned chain with its generated application and journey invocations after
|
|
826
|
+
* `test:src`. A chain that differs in spacing, order, or another step does not match that
|
|
827
|
+
* predecessor.
|
|
828
|
+
*
|
|
829
|
+
* A declared `test` or `build:app` chain is a generated predecessor when it runs fewer `&&` steps
|
|
830
|
+
* than the planned chain and every step it runs is a planned step, in the planned order. That is
|
|
831
|
+
* the chain a birth or an earlier write left before a structural fact planned another step, such as
|
|
832
|
+
* a root `tests/setupBrowser.test.ts` proof planning `npm run test:setup:browser`, or studies
|
|
833
|
+
* beside the server application planning `npm run build:app:barrel`, so the write lands the
|
|
830
834
|
* planned chain in its place. A chain running a step the plan does not generate, or running the
|
|
831
835
|
* planned steps in another order, is one the package owns, and no entry names it.
|
|
832
836
|
*
|
|
@@ -838,36 +842,35 @@ function sheetTestToQuestion(artifact, present) {
|
|
|
838
842
|
function manifestToWritableScripts(manifest, blueprint) {
|
|
839
843
|
const writable = blueprintToWritableScripts(blueprint);
|
|
840
844
|
const generated = blueprintToScripts(blueprint);
|
|
841
|
-
const planned = generated.test;
|
|
842
845
|
const parsed = parseJSON(manifest);
|
|
843
846
|
const scripts = isRecord(parsed) && isRecord(parsed.scripts) ? parsed.scripts : {};
|
|
844
|
-
const
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
const
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
name:
|
|
847
|
+
const supplied = new Set(writable.map(({ name }) => name));
|
|
848
|
+
const chains = CHAIN_SCRIPTS.flatMap((chain) => {
|
|
849
|
+
const planned = generated[chain];
|
|
850
|
+
const declared = scripts[chain];
|
|
851
|
+
if (planned === void 0 || !isString(declared)) return [];
|
|
852
|
+
const landed = [{
|
|
853
|
+
name: chain,
|
|
851
854
|
command: planned,
|
|
852
855
|
accepted: [declared]
|
|
853
856
|
}];
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
857
|
+
if (chain === "test" && generated.prepublishOnly !== void 0 && isRecord(parsed) && parsed.private !== true) {
|
|
858
|
+
const helpers = Object.keys(generated).filter((name) => name === "test:app" || /^test:journey(:|$)/u.test(name));
|
|
859
|
+
const former = planned.replace("npm run test:src", ["npm run test:src", ...helpers.map((name) => `npm run ${name}`)].join(" && "));
|
|
860
|
+
if (helpers.length > 0 && declared === former) return landed;
|
|
861
|
+
}
|
|
862
|
+
const steps = declared.split("&&").map((step) => step.trim());
|
|
863
|
+
const expected = planned.split("&&").map((step) => step.trim());
|
|
864
|
+
if (steps.length >= expected.length) return [];
|
|
865
|
+
const resumed = expected.values();
|
|
866
|
+
if (!steps.every((step) => resumed.some((entry) => entry === step))) return [];
|
|
867
|
+
return expected.every((step) => {
|
|
868
|
+
if (steps.includes(step)) return true;
|
|
869
|
+
const name = /^npm run (\S+)$/.exec(step)?.[1];
|
|
870
|
+
return name !== void 0 && (supplied.has(name) || isString(scripts[name]));
|
|
871
|
+
}) ? landed : [];
|
|
872
|
+
});
|
|
873
|
+
return [...writable, ...chains];
|
|
871
874
|
}
|
|
872
875
|
/**
|
|
873
876
|
* Keeps only dependencies published by the Orkestrel fleet.
|