@warpgogol/forge 9.7.1 → 10.1.0
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/AGENTS.md +50 -27
- package/CHANGELOG.md +39 -0
- package/bin/cli.js +0 -0
- package/dist/os/codebase/handlers/codebase-measure-symbols.d.ts.map +1 -1
- package/dist/os/codebase/handlers/codebase-measure-symbols.js +35 -4
- package/dist/os/codebase/handlers/codebase-measure-symbols.js.map +1 -1
- package/dist/os/core/core.module.d.ts.map +1 -1
- package/dist/os/core/core.module.js +1 -69
- package/dist/os/core/core.module.js.map +1 -1
- package/dist/os/core/handlers/assets-helpers.d.ts.map +1 -1
- package/dist/os/core/handlers/assets-helpers.js +2 -3
- package/dist/os/core/handlers/assets-helpers.js.map +1 -1
- package/dist/os/core/handlers/determinism-check.d.ts.map +1 -1
- package/dist/os/core/handlers/determinism-check.js +2 -3
- package/dist/os/core/handlers/determinism-check.js.map +1 -1
- package/dist/os/core/handlers/release-prepare.d.ts.map +1 -1
- package/dist/os/core/handlers/release-prepare.js +2 -4
- package/dist/os/core/handlers/release-prepare.js.map +1 -1
- package/dist/os/flow/handlers/flow-peers.js +1 -1
- package/dist/os/flow/handlers/flow-peers.js.map +1 -1
- package/dist/os/{mission → flow}/open-missions.d.ts +1 -2
- package/dist/os/flow/open-missions.d.ts.map +1 -0
- package/dist/os/flow/open-missions.js +37 -0
- package/dist/os/flow/open-missions.js.map +1 -0
- package/dist/os/flow/preflight.js +1 -1
- package/dist/os/flow/preflight.js.map +1 -1
- package/dist/os/rfc/probe-batch.d.ts.map +1 -1
- package/dist/os/rfc/probe-batch.js +13 -6
- package/dist/os/rfc/probe-batch.js.map +1 -1
- package/dist/src/command-modules.d.ts.map +1 -1
- package/dist/src/command-modules.js +0 -2
- package/dist/src/command-modules.js.map +1 -1
- package/dist/src/contract/core-nodes.d.ts +8 -0
- package/dist/src/contract/core-nodes.d.ts.map +1 -0
- package/dist/src/contract/core-nodes.js +101 -0
- package/dist/src/contract/core-nodes.js.map +1 -0
- package/dist/src/contract/evaluator.d.ts +48 -0
- package/dist/src/contract/evaluator.d.ts.map +1 -0
- package/dist/src/contract/evaluator.js +158 -0
- package/dist/src/contract/evaluator.js.map +1 -0
- package/dist/src/contract/evidence-store.d.ts +17 -0
- package/dist/src/contract/evidence-store.d.ts.map +1 -0
- package/dist/src/contract/evidence-store.js +113 -0
- package/dist/src/contract/evidence-store.js.map +1 -0
- package/dist/src/contract/executors/zero-deps.d.ts +3 -0
- package/dist/src/contract/executors/zero-deps.d.ts.map +1 -0
- package/dist/src/contract/executors/zero-deps.js +88 -0
- package/dist/src/contract/executors/zero-deps.js.map +1 -0
- package/dist/src/contract/fingerprint.d.ts +34 -0
- package/dist/src/contract/fingerprint.d.ts.map +1 -0
- package/dist/src/contract/fingerprint.js +153 -0
- package/dist/src/contract/fingerprint.js.map +1 -0
- package/dist/src/contract/graph.d.ts +23 -0
- package/dist/src/contract/graph.d.ts.map +1 -0
- package/dist/src/contract/graph.js +158 -0
- package/dist/src/contract/graph.js.map +1 -0
- package/dist/src/contract/migration-map.d.ts +51 -0
- package/dist/src/contract/migration-map.d.ts.map +1 -0
- package/dist/src/contract/migration-map.js +130 -0
- package/dist/src/contract/migration-map.js.map +1 -0
- package/dist/src/contract/types.d.ts +108 -0
- package/dist/src/contract/types.d.ts.map +1 -0
- package/dist/src/contract/types.js +23 -0
- package/dist/src/contract/types.js.map +1 -0
- package/dist/src/index.d.ts +0 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +0 -2
- package/dist/src/index.js.map +1 -1
- package/dist/src/integration/drain.d.ts +31 -0
- package/dist/src/integration/drain.d.ts.map +1 -0
- package/dist/src/integration/drain.js +195 -0
- package/dist/src/integration/drain.js.map +1 -0
- package/dist/src/integration/enqueue.d.ts +30 -0
- package/dist/src/integration/enqueue.d.ts.map +1 -0
- package/dist/src/integration/enqueue.js +64 -0
- package/dist/src/integration/enqueue.js.map +1 -0
- package/dist/src/integration/gitops.d.ts +33 -0
- package/dist/src/integration/gitops.d.ts.map +1 -0
- package/dist/src/integration/gitops.js +128 -0
- package/dist/src/integration/gitops.js.map +1 -0
- package/dist/src/integration/lease.d.ts +16 -0
- package/dist/src/integration/lease.d.ts.map +1 -0
- package/dist/src/integration/lease.js +140 -0
- package/dist/src/integration/lease.js.map +1 -0
- package/dist/src/integration/materialize.d.ts +7 -0
- package/dist/src/integration/materialize.d.ts.map +1 -0
- package/dist/src/integration/materialize.js +34 -0
- package/dist/src/integration/materialize.js.map +1 -0
- package/dist/src/integration/store.d.ts +21 -0
- package/dist/src/integration/store.d.ts.map +1 -0
- package/dist/src/integration/store.js +131 -0
- package/dist/src/integration/store.js.map +1 -0
- package/dist/src/integration/types.d.ts +71 -0
- package/dist/src/integration/types.d.ts.map +1 -0
- package/dist/src/integration/types.js +18 -0
- package/dist/src/integration/types.js.map +1 -0
- package/dist/src/onboarding/doctor.d.ts +0 -5
- package/dist/src/onboarding/doctor.d.ts.map +1 -1
- package/dist/src/onboarding/doctor.js +6 -79
- package/dist/src/onboarding/doctor.js.map +1 -1
- package/dist/src/onboarding/npm-token-check.d.ts +1 -1
- package/dist/src/onboarding/npm-token-check.d.ts.map +1 -1
- package/dist/src/onboarding/npm-token-check.js +2 -2
- package/dist/src/onboarding/npm-token-check.js.map +1 -1
- package/dist/src/sdk/context.d.ts +13 -0
- package/dist/src/sdk/context.d.ts.map +1 -0
- package/dist/src/sdk/context.js +128 -0
- package/dist/src/sdk/context.js.map +1 -0
- package/dist/src/sdk/loader.d.ts +25 -0
- package/dist/src/sdk/loader.d.ts.map +1 -0
- package/dist/src/sdk/loader.js +155 -0
- package/dist/src/sdk/loader.js.map +1 -0
- package/dist/src/sdk/scan.d.ts +16 -0
- package/dist/src/sdk/scan.d.ts.map +1 -0
- package/dist/src/sdk/scan.js +126 -0
- package/dist/src/sdk/scan.js.map +1 -0
- package/dist/src/sdk/skills-gen.d.ts +27 -0
- package/dist/src/sdk/skills-gen.d.ts.map +1 -0
- package/dist/src/sdk/skills-gen.js +87 -0
- package/dist/src/sdk/skills-gen.js.map +1 -0
- package/dist/src/sdk/types.d.ts +124 -0
- package/dist/src/sdk/types.d.ts.map +1 -0
- package/dist/src/sdk/types.js +34 -0
- package/dist/src/sdk/types.js.map +1 -0
- package/dist/src/utils/hash.d.ts +1 -0
- package/dist/src/utils/hash.d.ts.map +1 -1
- package/dist/src/utils/hash.js +4 -0
- package/dist/src/utils/hash.js.map +1 -1
- package/dist/{os/mission → src/utils}/lockfile.d.ts +1 -18
- package/dist/src/utils/lockfile.d.ts.map +1 -0
- package/dist/src/utils/lockfile.js +70 -0
- package/dist/src/utils/lockfile.js.map +1 -0
- package/os/codebase/handlers/codebase-measure-symbols.ts +32 -4
- package/os/core/core.module.ts +3 -76
- package/os/core/handlers/assets-helpers.ts +2 -4
- package/os/core/handlers/determinism-check.ts +2 -3
- package/os/core/handlers/lifecycle-handlers.test.ts +529 -0
- package/os/core/handlers/release-prepare.ts +2 -4
- package/os/correctness/gate/trust-boundary-cx18.test.ts +1 -1
- package/os/flow/handlers/flow-peers.ts +1 -1
- package/os/flow/open-missions.ts +45 -0
- package/os/flow/preflight.ts +1 -1
- package/os/flow/tests/release-lines.test.ts +136 -0
- package/os/flow/tests/state-roots.test.ts +1 -48
- package/os/rfc/handlers/validate-corpus.test.ts +149 -0
- package/os/rfc/probe-batch.test.ts +253 -0
- package/os/rfc/probe-batch.ts +13 -6
- package/os/rfc/verifier/rfc-1391/ac10-operating-model-policy.acceptance.test.ts +63 -0
- package/package.json +177 -506
- package/src/command-modules.ts +0 -2
- package/src/contract/core-nodes.ts +111 -0
- package/src/contract/evaluator.ts +207 -0
- package/src/contract/evidence-store.ts +119 -0
- package/src/contract/executors/zero-deps.ts +92 -0
- package/src/contract/fingerprint.ts +176 -0
- package/src/contract/graph.ts +181 -0
- package/src/contract/migration-map.ts +174 -0
- package/src/contract/types.ts +125 -0
- package/src/index.ts +0 -2
- package/src/integration/drain.ts +271 -0
- package/src/integration/enqueue.ts +92 -0
- package/src/integration/gitops.ts +174 -0
- package/src/integration/lease.ts +144 -0
- package/src/integration/materialize.ts +40 -0
- package/src/integration/store.ts +153 -0
- package/src/integration/types.ts +79 -0
- package/src/onboarding/doctor.ts +9 -96
- package/src/onboarding/npm-token-check.ts +3 -3
- package/src/sdk/context.ts +135 -0
- package/src/sdk/loader.ts +170 -0
- package/src/sdk/scan.ts +132 -0
- package/src/sdk/skills-gen.ts +104 -0
- package/src/sdk/types.ts +135 -0
- package/src/tests/pkg-health-self-scan.test.ts +29 -0
- package/src/tests/rfc-evidence-sync.test.ts +369 -0
- package/src/tests/skill-agents-sync.test.ts +192 -0
- package/src/utils/hash.ts +5 -0
- package/src/utils/lockfile.ts +78 -0
- package/dist/os/core/handlers/forge-autonomy-validate.d.ts +0 -25
- package/dist/os/core/handlers/forge-autonomy-validate.d.ts.map +0 -1
- package/dist/os/core/handlers/forge-autonomy-validate.js +0 -208
- package/dist/os/core/handlers/forge-autonomy-validate.js.map +0 -1
- package/dist/os/mission/handlers/archive.d.ts +0 -4
- package/dist/os/mission/handlers/archive.d.ts.map +0 -1
- package/dist/os/mission/handlers/archive.js +0 -583
- package/dist/os/mission/handlers/archive.js.map +0 -1
- package/dist/os/mission/importer-block.d.ts +0 -19
- package/dist/os/mission/importer-block.d.ts.map +0 -1
- package/dist/os/mission/importer-block.js +0 -124
- package/dist/os/mission/importer-block.js.map +0 -1
- package/dist/os/mission/index.d.ts +0 -2
- package/dist/os/mission/index.d.ts.map +0 -1
- package/dist/os/mission/index.js +0 -15
- package/dist/os/mission/index.js.map +0 -1
- package/dist/os/mission/lockfile.d.ts.map +0 -1
- package/dist/os/mission/lockfile.js +0 -138
- package/dist/os/mission/lockfile.js.map +0 -1
- package/dist/os/mission/mission.module.d.ts +0 -3
- package/dist/os/mission/mission.module.d.ts.map +0 -1
- package/dist/os/mission/mission.module.js +0 -63
- package/dist/os/mission/mission.module.js.map +0 -1
- package/dist/os/mission/open-missions.d.ts.map +0 -1
- package/dist/os/mission/open-missions.js +0 -42
- package/dist/os/mission/open-missions.js.map +0 -1
- package/dist/os/mission/types.d.ts +0 -23
- package/dist/os/mission/types.d.ts.map +0 -1
- package/dist/os/mission/types.js +0 -19
- package/dist/os/mission/types.js.map +0 -1
- package/dist/os/werkstatt/handlers/lock.d.ts +0 -10
- package/dist/os/werkstatt/handlers/lock.d.ts.map +0 -1
- package/dist/os/werkstatt/handlers/lock.js +0 -153
- package/dist/os/werkstatt/handlers/lock.js.map +0 -1
- package/dist/os/werkstatt/handlers/schema.d.ts +0 -33
- package/dist/os/werkstatt/handlers/schema.d.ts.map +0 -1
- package/dist/os/werkstatt/handlers/schema.js +0 -42
- package/dist/os/werkstatt/handlers/schema.js.map +0 -1
- package/dist/os/werkstatt/handlers/werkstatt-lock-recover.d.ts +0 -15
- package/dist/os/werkstatt/handlers/werkstatt-lock-recover.d.ts.map +0 -1
- package/dist/os/werkstatt/handlers/werkstatt-lock-recover.js +0 -171
- package/dist/os/werkstatt/handlers/werkstatt-lock-recover.js.map +0 -1
- package/dist/os/werkstatt/handlers/werkstatt-lock-status.d.ts +0 -18
- package/dist/os/werkstatt/handlers/werkstatt-lock-status.d.ts.map +0 -1
- package/dist/os/werkstatt/handlers/werkstatt-lock-status.js +0 -51
- package/dist/os/werkstatt/handlers/werkstatt-lock-status.js.map +0 -1
- package/dist/os/werkstatt/handlers/werkstatt-operation-validate.d.ts +0 -11
- package/dist/os/werkstatt/handlers/werkstatt-operation-validate.d.ts.map +0 -1
- package/dist/os/werkstatt/handlers/werkstatt-operation-validate.js +0 -86
- package/dist/os/werkstatt/handlers/werkstatt-operation-validate.js.map +0 -1
- package/dist/os/werkstatt/handlers/workspace-deps.d.ts +0 -12
- package/dist/os/werkstatt/handlers/workspace-deps.d.ts.map +0 -1
- package/dist/os/werkstatt/handlers/workspace-deps.js +0 -42
- package/dist/os/werkstatt/handlers/workspace-deps.js.map +0 -1
- package/dist/os/werkstatt/index.d.ts +0 -7
- package/dist/os/werkstatt/index.d.ts.map +0 -1
- package/dist/os/werkstatt/index.js +0 -18
- package/dist/os/werkstatt/index.js.map +0 -1
- package/dist/os/werkstatt/werkstatt.module.d.ts +0 -3
- package/dist/os/werkstatt/werkstatt.module.d.ts.map +0 -1
- package/dist/os/werkstatt/werkstatt.module.js +0 -91
- package/dist/os/werkstatt/werkstatt.module.js.map +0 -1
- package/os/core/handlers/forge-autonomy-validate.ts +0 -276
- package/os/correctness/gate/trust-boundary-cx19.test.ts +0 -514
- package/os/mission/handlers/archive.test.ts +0 -764
- package/os/mission/handlers/archive.ts +0 -711
- package/os/mission/handlers/ship-inflight-degraded.test.ts +0 -105
- package/os/mission/importer-block.ts +0 -119
- package/os/mission/index.ts +0 -15
- package/os/mission/lockfile.ts +0 -152
- package/os/mission/mission.module.ts +0 -68
- package/os/mission/open-missions.ts +0 -50
- package/os/mission/types.ts +0 -42
- package/os/werkstatt/handlers/lock.ts +0 -168
- package/os/werkstatt/handlers/schema.ts +0 -47
- package/os/werkstatt/handlers/werkstatt-lock-recover.ts +0 -206
- package/os/werkstatt/handlers/werkstatt-lock-status.ts +0 -82
- package/os/werkstatt/handlers/werkstatt-operation-validate.ts +0 -112
- package/os/werkstatt/handlers/workspace-deps.ts +0 -56
- package/os/werkstatt/index.ts +0 -39
- package/os/werkstatt/werkstatt.module.ts +0 -95
- package/src/tests/doctor-autonomy.test.ts +0 -246
- package/src/tests/forge-autonomy-validate.test.ts +0 -159
- package/src/tests/werkstatt-lock.test.ts +0 -357
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/*
|
|
2
|
+
<MODULE_CONTRACT>
|
|
3
|
+
<purpose>
|
|
4
|
+
Plugin SDK types (Werkstatt RFC-1648) — the platform boundary for in-process
|
|
5
|
+
executable plugins: manifest contract, command module contract, and the typed
|
|
6
|
+
PluginContext ports through which ALL platform interaction flows. Plugins never
|
|
7
|
+
touch raw node capabilities.
|
|
8
|
+
</purpose>
|
|
9
|
+
<non-goals><item>No loader or enforcement logic — contracts only.</item></non-goals>
|
|
10
|
+
<CHANGE_SUMMARY><item>RFC-1648 (WP-5): initial SDK contracts.</item></CHANGE_SUMMARY>
|
|
11
|
+
*/
|
|
12
|
+
export const LIFECYCLE_HOOKS = ["onActivate", "onDeactivate", "beforeIntegrate", "afterIntegrate"];
|
|
13
|
+
/** Typed incompatibility error — fail-closed, no degraded modes. */
|
|
14
|
+
export class PluginLoadError extends Error {
|
|
15
|
+
kind;
|
|
16
|
+
pluginId;
|
|
17
|
+
constructor(kind, message, pluginId) {
|
|
18
|
+
super(message);
|
|
19
|
+
this.kind = kind;
|
|
20
|
+
this.pluginId = pluginId;
|
|
21
|
+
this.name = "PluginLoadError";
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
export class CapabilityViolation extends Error {
|
|
25
|
+
capability;
|
|
26
|
+
pluginId;
|
|
27
|
+
constructor(capability, pluginId, detail) {
|
|
28
|
+
super(`capability violation: plugin "${pluginId}" has no ${capability} grant — ${detail}`);
|
|
29
|
+
this.capability = capability;
|
|
30
|
+
this.pluginId = pluginId;
|
|
31
|
+
this.name = "CapabilityViolation";
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/sdk/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AA4CF,MAAM,CAAC,MAAM,eAAe,GAA6B,CAAC,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,gBAAgB,CAAC,CAAC;AA2D7H,oEAAoE;AACpE,MAAM,OAAO,eAAgB,SAAQ,KAAK;IAEtB;IAEA;IAHlB,YACkB,IAAyH,EACzI,OAAe,EACC,QAAiB;QAEjC,KAAK,CAAC,OAAO,CAAC,CAAC;QAJC,SAAI,GAAJ,IAAI,CAAqH;QAEzH,aAAQ,GAAR,QAAQ,CAAS;QAGjC,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;IAChC,CAAC;CACF;AAED,MAAM,OAAO,mBAAoB,SAAQ,KAAK;IAE1B;IACA;IAFlB,YACkB,UAAkB,EAClB,QAAgB,EAChC,MAAc;QAEd,KAAK,CAAC,iCAAiC,QAAQ,YAAY,UAAU,YAAY,MAAM,EAAE,CAAC,CAAC;QAJ3E,eAAU,GAAV,UAAU,CAAQ;QAClB,aAAQ,GAAR,QAAQ,CAAQ;QAIhC,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;IACpC,CAAC;CACF"}
|
package/dist/src/utils/hash.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hash.d.ts","sourceRoot":"","sources":["../../../src/utils/hash.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hash.d.ts","sourceRoot":"","sources":["../../../src/utils/hash.ts"],"names":[],"mappings":"AA2BA,wBAAgB,QAAQ,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,GAAG,MAAM,CAG3D;AAED,wBAAsB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAEnE"}
|
package/dist/src/utils/hash.js
CHANGED
|
@@ -22,8 +22,12 @@ Sweep batch 4: 73 Compass headers on headerless engine files (certification, com
|
|
|
22
22
|
</CHANGE_SUMMARY>
|
|
23
23
|
*/
|
|
24
24
|
import { createHash } from "node:crypto";
|
|
25
|
+
import { readFile } from "node:fs/promises";
|
|
25
26
|
export function byteHash(bytes) {
|
|
26
27
|
const input = typeof bytes === "string" ? Buffer.from(bytes, "utf8") : bytes;
|
|
27
28
|
return `sha256:${createHash("sha256").update(input).digest("hex")}`;
|
|
28
29
|
}
|
|
30
|
+
export async function byteHashFile(absPath) {
|
|
31
|
+
return byteHash(await readFile(absPath));
|
|
32
|
+
}
|
|
29
33
|
//# sourceMappingURL=hash.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hash.js","sourceRoot":"","sources":["../../../src/utils/hash.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;EAsBE;AAEF,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"hash.js","sourceRoot":"","sources":["../../../src/utils/hash.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;EAsBE;AAEF,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,MAAM,UAAU,QAAQ,CAAC,KAA0B;IACjD,MAAM,KAAK,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IAC7E,OAAO,UAAU,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;AACtE,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,OAAe;IAChD,OAAO,QAAQ,CAAC,MAAM,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;AAC3C,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { WorkspaceIO } from "
|
|
1
|
+
import type { WorkspaceIO } from "../types.ts";
|
|
2
2
|
/**
|
|
3
3
|
* Restore `pnpm-lock.yaml` to the bytes committed at HEAD.
|
|
4
4
|
*
|
|
@@ -18,21 +18,4 @@ export declare function restoreTrackedLockfile(root: string, io: Pick<WorkspaceI
|
|
|
18
18
|
* to `exitCode`; a spawn failure (missing binary) keeps throwing.
|
|
19
19
|
*/
|
|
20
20
|
export declare function execFileSyncAdapter(): Pick<WorkspaceIO, "exec">;
|
|
21
|
-
/**
|
|
22
|
-
* RFC-1544 AC-5: drop the listed missions' `missions/<id>/workpiece`
|
|
23
|
-
* importer subtrees from the tracked `pnpm-lock.yaml` and stage the result
|
|
24
|
-
* for the archive bookkeeping commit. The written bytes are HEAD-minus-
|
|
25
|
-
* importers — the post-archive `pnpm install` may churn unrelated lockfile
|
|
26
|
-
* state, and only the importer removal is legitimate tracked change, so
|
|
27
|
-
* everything else is discarded exactly like `restoreTrackedLockfile` did.
|
|
28
|
-
*
|
|
29
|
-
* Returns `pruned` = mission ids whose importer block was actually removed;
|
|
30
|
-
* `staged` = whether `pnpm-lock.yaml` reached the index. When no listed
|
|
31
|
-
* importer exists at HEAD the tracked file is restored instead (the old
|
|
32
|
-
* churn-discard behavior) and `staged` stays false.
|
|
33
|
-
*/
|
|
34
|
-
export declare function pruneMissionImportersFromLockfile(root: string, missionIds: string[], io: Pick<WorkspaceIO, "exec" | "writeFile">): Promise<{
|
|
35
|
-
pruned: string[];
|
|
36
|
-
staged: boolean;
|
|
37
|
-
}>;
|
|
38
21
|
//# sourceMappingURL=lockfile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lockfile.d.ts","sourceRoot":"","sources":["../../../src/utils/lockfile.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAA2B,WAAW,EAAE,MAAM,aAAa,CAAC;AAKxE;;;;;;;;;;GAUG;AACH,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,IAAI,CAAC,WAAW,EAAE,MAAM,GAAG,WAAW,CAAC,GAC1C,OAAO,CAAC,OAAO,CAAC,CAUlB;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CA6B/D"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/*
|
|
2
|
+
<MODULE_CONTRACT>
|
|
3
|
+
<purpose>Generic tracked-lockfile hygiene — restore pnpm-lock.yaml to HEAD bytes through the judged git channel, plus a sync-world exec adapter. Absorbed from the v9 os/mission module during the v10 core transfer (Werkstatt RFC-1649); mission-specific importer pruning stayed studio-private and did not transfer.</purpose>
|
|
4
|
+
<non-goals>
|
|
5
|
+
<item>No mission/studio layout knowledge — this module is layout-generic.</item>
|
|
6
|
+
</non-goals>
|
|
7
|
+
</MODULE_CONTRACT>
|
|
8
|
+
*/
|
|
9
|
+
import path from "node:path";
|
|
10
|
+
import { execFileSync } from "./sync-fs.js";
|
|
11
|
+
import { verifierGit } from "./verifier-git.js";
|
|
12
|
+
const LOCKFILE_NAME = "pnpm-lock.yaml";
|
|
13
|
+
/**
|
|
14
|
+
* Restore `pnpm-lock.yaml` to the bytes committed at HEAD.
|
|
15
|
+
*
|
|
16
|
+
* Runs `git show HEAD:pnpm-lock.yaml` in `root`. On exit 0 the stdout is written
|
|
17
|
+
* back over `root/pnpm-lock.yaml` and the call returns `true`. On a non-zero
|
|
18
|
+
* exit (no such file at HEAD, not a git repository) it returns `false` and
|
|
19
|
+
* changes nothing. Spawn failures (missing git binary) propagate.
|
|
20
|
+
* `root` is the repository root — git resolves `HEAD:pnpm-lock.yaml` against
|
|
21
|
+
* the enclosing repo's top level, so passing a nested directory of a larger
|
|
22
|
+
* repo would restore that repo's root lockfile instead.
|
|
23
|
+
*/
|
|
24
|
+
export async function restoreTrackedLockfile(root, io) {
|
|
25
|
+
// The committed-bytes read goes through the judged channel — the
|
|
26
|
+
// ambient exec layer inherits `process.env`, so a session `GIT_DIR`
|
|
27
|
+
// would serve `HEAD:` from a foreign object store and this "restore"
|
|
28
|
+
// would write forged bytes into the real worktree (CX-164). A refused
|
|
29
|
+
// read restores nothing and reports false.
|
|
30
|
+
const res = await verifierGit(root, ["show", `HEAD:${LOCKFILE_NAME}`]);
|
|
31
|
+
if (res.exitCode !== 0)
|
|
32
|
+
return false;
|
|
33
|
+
await io.writeFile(path.join(root, LOCKFILE_NAME), res.stdout);
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Sync-world adapter for `io.exec` — wraps `execFileSync` so handlers that still
|
|
38
|
+
* run on `execSync`/`execFileSync` (e.g. mission.archive) can call
|
|
39
|
+
* `restoreTrackedLockfile` without duplicating its logic. A non-zero exit maps
|
|
40
|
+
* to `exitCode`; a spawn failure (missing binary) keeps throwing.
|
|
41
|
+
*/
|
|
42
|
+
export function execFileSyncAdapter() {
|
|
43
|
+
return {
|
|
44
|
+
exec(command, args, opts) {
|
|
45
|
+
try {
|
|
46
|
+
const stdout = execFileSync(command, args, {
|
|
47
|
+
cwd: opts?.cwd,
|
|
48
|
+
encoding: "utf-8",
|
|
49
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
50
|
+
timeout: opts?.timeoutMs,
|
|
51
|
+
// Real pnpm-lock.yaml files exceed the 1 MiB default many times over —
|
|
52
|
+
// an ENOBUFS kill carries status null and would rethrow below.
|
|
53
|
+
maxBuffer: 64 * 1024 * 1024,
|
|
54
|
+
});
|
|
55
|
+
return Promise.resolve({ exitCode: 0, stdout, stderr: "" });
|
|
56
|
+
}
|
|
57
|
+
catch (err) {
|
|
58
|
+
const e = err;
|
|
59
|
+
if (e.status === undefined || e.status === null)
|
|
60
|
+
throw err;
|
|
61
|
+
return Promise.resolve({
|
|
62
|
+
exitCode: e.status,
|
|
63
|
+
stdout: e.stdout?.toString() ?? "",
|
|
64
|
+
stderr: e.stderr?.toString() ?? "",
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=lockfile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lockfile.js","sourceRoot":"","sources":["../../../src/utils/lockfile.ts"],"names":[],"mappings":"AAAA;;;;;;;EAOE;AAEF,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,aAAa,GAAG,gBAAgB,CAAC;AAEvC;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC1C,IAAY,EACZ,EAA2C;IAE3C,iEAAiE;IACjE,oEAAoE;IACpE,qEAAqE;IACrE,sEAAsE;IACtE,2CAA2C;IAC3C,MAAM,GAAG,GAAG,MAAM,WAAW,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE,QAAQ,aAAa,EAAE,CAAC,CAAC,CAAC;IACvE,IAAI,GAAG,CAAC,QAAQ,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IACrC,MAAM,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC/D,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB;IACjC,OAAO;QACL,IAAI,CAAC,OAAe,EAAE,IAAc,EAAE,IAAkB;YACtD,IAAI,CAAC;gBACH,MAAM,MAAM,GAAG,YAAY,CAAC,OAAO,EAAE,IAAI,EAAE;oBACzC,GAAG,EAAE,IAAI,EAAE,GAAG;oBACd,QAAQ,EAAE,OAAO;oBACjB,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;oBAC/B,OAAO,EAAE,IAAI,EAAE,SAAS;oBACxB,uEAAuE;oBACvE,+DAA+D;oBAC/D,SAAS,EAAE,EAAE,GAAG,IAAI,GAAG,IAAI;iBAC5B,CAAC,CAAC;gBACH,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC;YAC9D,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,MAAM,CAAC,GAAG,GAIT,CAAC;gBACF,IAAI,CAAC,CAAC,MAAM,KAAK,SAAS,IAAI,CAAC,CAAC,MAAM,KAAK,IAAI;oBAAE,MAAM,GAAG,CAAC;gBAC3D,OAAO,OAAO,CAAC,OAAO,CAAC;oBACrB,QAAQ,EAAE,CAAC,CAAC,MAAM;oBAClB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;oBAClC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;iBACnC,CAAC,CAAC;YACL,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -17,10 +17,38 @@ estimate, never a crash.
|
|
|
17
17
|
</CHANGE_SUMMARY>
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
|
-
import {
|
|
21
|
-
import { join } from "node:path";
|
|
20
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
21
|
+
import { dirname, join, resolve } from "node:path";
|
|
22
22
|
import { pathToFileURL } from "node:url";
|
|
23
23
|
|
|
24
|
+
/**
|
|
25
|
+
* Walk the node_modules chain upward from the measured workspace root,
|
|
26
|
+
* mirroring Node's directory resolution — but deliberately WITHOUT the
|
|
27
|
+
* environment-dependent fallbacks (NODE_PATH, $HOME/.node_modules, global
|
|
28
|
+
* prefixes). The measured workspace counts typescript as available only when
|
|
29
|
+
* its own directory chain provides it; a harness that injects typescript into
|
|
30
|
+
* the process environment (vitest's NODE_PATH, a global install) must not
|
|
31
|
+
* leak into the measurement.
|
|
32
|
+
*/
|
|
33
|
+
function resolveWorkspaceTypeScript(workspaceRoot: string): string | null {
|
|
34
|
+
let dir = resolve(workspaceRoot);
|
|
35
|
+
for (;;) {
|
|
36
|
+
const pkgJsonPath = join(dir, "node_modules", "typescript", "package.json");
|
|
37
|
+
if (existsSync(pkgJsonPath)) {
|
|
38
|
+
try {
|
|
39
|
+
const pkg = JSON.parse(readFileSync(pkgJsonPath, "utf8")) as { main?: string };
|
|
40
|
+
const entry = join(dir, "node_modules", "typescript", pkg.main ?? "lib/typescript.js");
|
|
41
|
+
if (existsSync(entry)) return entry;
|
|
42
|
+
} catch {
|
|
43
|
+
// malformed package.json — keep walking up
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
const parent = dirname(dir);
|
|
47
|
+
if (parent === dir) return null;
|
|
48
|
+
dir = parent;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
24
52
|
export interface FileSymbols {
|
|
25
53
|
classes: number;
|
|
26
54
|
functions: number;
|
|
@@ -88,8 +116,8 @@ export async function measureSymbols(
|
|
|
88
116
|
try {
|
|
89
117
|
// Resolve against the measured workspace, not this package — forge carries
|
|
90
118
|
// no typescript dependency of its own, so a bare import would never find it.
|
|
91
|
-
const
|
|
92
|
-
|
|
119
|
+
const tsPath = resolveWorkspaceTypeScript(workspaceRoot);
|
|
120
|
+
if (tsPath == null) throw new Error("typescript-unavailable");
|
|
93
121
|
ts = (await import(pathToFileURL(tsPath).href)) as unknown as TsApi;
|
|
94
122
|
} catch {
|
|
95
123
|
skipped.push("typescript-unavailable");
|
package/os/core/core.module.ts
CHANGED
|
@@ -52,13 +52,9 @@ import type {
|
|
|
52
52
|
ForgeRuntimeContext,
|
|
53
53
|
} from "../../src/types.ts";
|
|
54
54
|
import path from "node:path";
|
|
55
|
-
import { restoreTrackedLockfile, execFileSyncAdapter } from "../mission/lockfile.ts";
|
|
56
55
|
import {
|
|
57
|
-
|
|
58
|
-
evidenceAnchoredGit,
|
|
59
|
-
evidenceRepoPreflight,
|
|
56
|
+
|
|
60
57
|
} from "../../src/utils/verifier-git.ts";
|
|
61
|
-
import { writeFileIfChanged } from "../../src/utils/fs-idempotent.ts";
|
|
62
58
|
import {
|
|
63
59
|
FORGE_SKILLS,
|
|
64
60
|
discoverPackSkills,
|
|
@@ -93,7 +89,6 @@ export async function createForgeCoreModule(): Promise<ForgeModule> {
|
|
|
93
89
|
const { runReleasePublish } = await import("./handlers/release-publish.ts");
|
|
94
90
|
const { runKnowledgeCompact } = await import("./handlers/knowledge-compact.ts");
|
|
95
91
|
const { runPackageHealth } = await import("./handlers/package-health.ts");
|
|
96
|
-
const { runForgeAutonomyValidate } = await import("./handlers/forge-autonomy-validate.ts");
|
|
97
92
|
const { runPublicSurfaceValidate } = await import("./handlers/public-surface.ts");
|
|
98
93
|
const { runFileSizeLint } = await import("./handlers/file-size-lint.ts");
|
|
99
94
|
const { runCompassDocsScaffold } = await import("../compass/handlers/compass-docs-scaffold.ts");
|
|
@@ -999,25 +994,6 @@ export async function createForgeCoreModule(): Promise<ForgeModule> {
|
|
|
999
994
|
},
|
|
1000
995
|
execute: runPackageHealth,
|
|
1001
996
|
},
|
|
1002
|
-
{
|
|
1003
|
-
name: "forge.autonomy.validate",
|
|
1004
|
-
mutatesState: false,
|
|
1005
|
-
// RFC-1606: the FORGE-AUTONOMY-02 strip-types arm spawns tsc — the
|
|
1006
|
-
// read-only IO adapter refuses exec unless the command opts in.
|
|
1007
|
-
execOnReadOnly: true,
|
|
1008
|
-
contract: "forge",
|
|
1009
|
-
rules: [],
|
|
1010
|
-
description:
|
|
1011
|
-
"Scan packages/forge/os/** for forbidden @warpgogol/werkstatt-engine imports outside os/werkstatt/. " +
|
|
1012
|
-
"Enforces FORGE-AUTONOMY-01 (RFC-0940, DNA-64). @warpgogol/werkstatt-shared is exempt. " +
|
|
1013
|
-
"Type-only imports (import type) are exempt.",
|
|
1014
|
-
scope: "workspace",
|
|
1015
|
-
acceptsAllFlag: false,
|
|
1016
|
-
reads: ["packages/forge/os/**/*.ts"],
|
|
1017
|
-
cacheable: false,
|
|
1018
|
-
flags: {},
|
|
1019
|
-
execute: runForgeAutonomyValidate,
|
|
1020
|
-
},
|
|
1021
997
|
{
|
|
1022
998
|
name: "forge.public-surface.validate",
|
|
1023
999
|
mutatesState: false,
|
|
@@ -1071,7 +1047,7 @@ export async function createForgeCoreModule(): Promise<ForgeModule> {
|
|
|
1071
1047
|
coverage: "operator" as const,
|
|
1072
1048
|
description:
|
|
1073
1049
|
"Umbrella command that runs rfc.archive, adr.archive, plan.archive, " +
|
|
1074
|
-
"audit.archive,
|
|
1050
|
+
"audit.archive, and session.archive in sequence. " +
|
|
1075
1051
|
"Passes --dry-run and --status through to all sub-commands. Not atomic " +
|
|
1076
1052
|
"— if one sub-command fails, prior moves are not rolled back. " +
|
|
1077
1053
|
"Owner generators of every generated artifact invalidated by the " +
|
|
@@ -1093,8 +1069,6 @@ export async function createForgeCoreModule(): Promise<ForgeModule> {
|
|
|
1093
1069
|
"docs/audits/archive/**",
|
|
1094
1070
|
"docs/sessions/*.md",
|
|
1095
1071
|
"docs/sessions/archive/**",
|
|
1096
|
-
"missions/*",
|
|
1097
|
-
"missions/archive/**",
|
|
1098
1072
|
"docs/specs/live/*.md",
|
|
1099
1073
|
"pnpm-lock.yaml",
|
|
1100
1074
|
// RFC-1528: owner-regen writes the generated artifacts invalidated by
|
|
@@ -1110,7 +1084,6 @@ export async function createForgeCoreModule(): Promise<ForgeModule> {
|
|
|
1110
1084
|
"docs/audits/**/*.md",
|
|
1111
1085
|
"docs/sessions/**/*.md",
|
|
1112
1086
|
"docs/specs/live/*.md",
|
|
1113
|
-
"missions/**",
|
|
1114
1087
|
],
|
|
1115
1088
|
cacheable: false,
|
|
1116
1089
|
flags: {
|
|
@@ -1160,7 +1133,6 @@ export async function createForgeCoreModule(): Promise<ForgeModule> {
|
|
|
1160
1133
|
const { runPlanArchive } = await import("../plan/handlers/archive.ts");
|
|
1161
1134
|
const { runAuditArchive } = await import("../audit/handlers/archive.ts");
|
|
1162
1135
|
const { runSessionArchive } = await import("../session/handlers/archive.ts");
|
|
1163
|
-
const { runMissionArchive } = await import("../mission/handlers/archive.ts");
|
|
1164
1136
|
|
|
1165
1137
|
type ArchiveHandler = (
|
|
1166
1138
|
input: ForgeCommandInput,
|
|
@@ -1173,7 +1145,6 @@ export async function createForgeCoreModule(): Promise<ForgeModule> {
|
|
|
1173
1145
|
{ name: "plan.archive", fn: runPlanArchive as ArchiveHandler },
|
|
1174
1146
|
{ name: "audit.archive", fn: runAuditArchive as ArchiveHandler },
|
|
1175
1147
|
{ name: "session.archive", fn: runSessionArchive as ArchiveHandler },
|
|
1176
|
-
{ name: "mission.archive", fn: runMissionArchive as ArchiveHandler },
|
|
1177
1148
|
];
|
|
1178
1149
|
|
|
1179
1150
|
for (const { name: cmdName, fn } of subCommands) {
|
|
@@ -1304,51 +1275,7 @@ export async function createForgeCoreModule(): Promise<ForgeModule> {
|
|
|
1304
1275
|
}
|
|
1305
1276
|
}
|
|
1306
1277
|
|
|
1307
|
-
|
|
1308
|
-
// own restore. Only mission moves run `pnpm install` and can churn the
|
|
1309
|
-
// lockfile; gating on them alone means an rfc/adr/plan-only archive run
|
|
1310
|
-
// never touches a locally edited pnpm-lock.yaml. Restore HEAD bytes
|
|
1311
|
-
// instead of staging — mission churn is never committed.
|
|
1312
|
-
const missionData = results["mission.archive"] as { moved?: unknown[] } | undefined;
|
|
1313
|
-
const missionMoved = Array.isArray(missionData?.moved) ? missionData.moved.length : 0;
|
|
1314
|
-
if (!dryRun && missionMoved > 0) {
|
|
1315
|
-
try {
|
|
1316
|
-
const restored = await restoreTrackedLockfile(routedContext.workspaceRoot, {
|
|
1317
|
-
...execFileSyncAdapter(),
|
|
1318
|
-
writeFile: async (target, content) => {
|
|
1319
|
-
await writeFileIfChanged(target, content);
|
|
1320
|
-
},
|
|
1321
|
-
});
|
|
1322
|
-
if (restored) {
|
|
1323
|
-
// RFC-1602 (F-0245): index-side counterpart — the restore put
|
|
1324
|
-
// HEAD back on disk; without unstaging, the pre-restore prune
|
|
1325
|
-
// stays staged and the lockfile sits MM. Anchored mutation:
|
|
1326
|
-
// ambient exec inherits session GIT_* and could reset a
|
|
1327
|
-
// foreign index (CX-170).
|
|
1328
|
-
const lockPreflight = await evidenceRepoPreflight(routedContext.workspaceRoot);
|
|
1329
|
-
if (lockPreflight !== null) {
|
|
1330
|
-
try {
|
|
1331
|
-
await evidenceAnchoredGit(
|
|
1332
|
-
routedContext.workspaceRoot,
|
|
1333
|
-
["reset", "-q", "--", "pnpm-lock.yaml"],
|
|
1334
|
-
{ preflight: lockPreflight },
|
|
1335
|
-
);
|
|
1336
|
-
} finally {
|
|
1337
|
-
closeEvidenceIndex(lockPreflight);
|
|
1338
|
-
}
|
|
1339
|
-
}
|
|
1340
|
-
if (outputFormat === "pretty") {
|
|
1341
|
-
logger.info(" docs.archive: restored pnpm-lock.yaml to HEAD (safety net)");
|
|
1342
|
-
}
|
|
1343
|
-
}
|
|
1344
|
-
} catch (refreshErr) {
|
|
1345
|
-
if (outputFormat === "pretty") {
|
|
1346
|
-
logger.warn(
|
|
1347
|
-
` docs.archive: lockfile safety-net restore failed — run 'pnpm install' manually: ${refreshErr instanceof Error ? refreshErr.message : String(refreshErr)}`,
|
|
1348
|
-
);
|
|
1349
|
-
}
|
|
1350
|
-
}
|
|
1351
|
-
}
|
|
1278
|
+
|
|
1352
1279
|
|
|
1353
1280
|
// ── RFC-1602 (F-0212): owner-regen is DEFERRED to the integrate
|
|
1354
1281
|
// fold — archive returns in seconds; flow.integrate regenerates the
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
|
|
14
14
|
import { join, relative, extname } from "node:path";
|
|
15
15
|
import { ambientIo } from "../../../src/utils/io.ts";
|
|
16
|
-
import {
|
|
16
|
+
import { collectFiles } from "../../../src/utils/fs.ts";
|
|
17
|
+
import { byteHashFile } from "../../../src/utils/hash.ts";
|
|
17
18
|
import type { ProfileAsset, ProfileAssetType } from "../../../src/profiles/profile-schema.ts";
|
|
18
19
|
|
|
19
20
|
// Ambient default for helper fns without a context param — handlers override
|
|
@@ -43,7 +44,6 @@ export async function scanAssets(
|
|
|
43
44
|
assetsConfig: ProfileAsset,
|
|
44
45
|
options: { dryRun?: boolean; typeFilter?: string } = {},
|
|
45
46
|
): Promise<AssetEntry[]> {
|
|
46
|
-
const { collectFiles, byteHashFile } = await loadWorkspaceDeps();
|
|
47
47
|
const assetsDir = join(workspaceRoot, assetsConfig.dir);
|
|
48
48
|
const allFiles = await collectFiles(assetsDir, {
|
|
49
49
|
ignore: (name) => name.startsWith("-") || name.startsWith("old-") || name === ".DS_Store",
|
|
@@ -92,8 +92,6 @@ export async function extractReferences(
|
|
|
92
92
|
compositionExtensions: string[],
|
|
93
93
|
): Promise<Map<string, string[]>> {
|
|
94
94
|
const refMap = new Map<string, string[]>();
|
|
95
|
-
|
|
96
|
-
const { collectFiles } = await loadWorkspaceDeps();
|
|
97
95
|
const allFiles = await collectFiles(workspaceRoot, {
|
|
98
96
|
extensions: compositionExtensions,
|
|
99
97
|
ignore: (name) =>
|
|
@@ -13,12 +13,13 @@
|
|
|
13
13
|
|
|
14
14
|
import { exec } from "../../../src/utils/sync-fs.ts";
|
|
15
15
|
import { ambientIo, resolveIo } from "../../../src/utils/io.ts";
|
|
16
|
+
import { collectFiles } from "../../../src/utils/fs.ts";
|
|
17
|
+
import { byteHashFile } from "../../../src/utils/hash.ts";
|
|
16
18
|
import { promisify } from "node:util";
|
|
17
19
|
|
|
18
20
|
import { existsSync } from "../../../src/utils/sync-fs.ts";
|
|
19
21
|
import { join, relative, dirname } from "node:path";
|
|
20
22
|
import { createHash } from "node:crypto";
|
|
21
|
-
import { loadWorkspaceDeps } from "../../werkstatt/handlers/workspace-deps.ts";
|
|
22
23
|
import type {
|
|
23
24
|
ForgeCommandInput,
|
|
24
25
|
ForgeCommandResult,
|
|
@@ -95,7 +96,6 @@ function matchesGlob(filePath: string, patterns: string[]): boolean {
|
|
|
95
96
|
}
|
|
96
97
|
|
|
97
98
|
async function computeInputHash(workspaceRoot: string, inputPatterns: string[]): Promise<string> {
|
|
98
|
-
const { collectFiles, byteHashFile } = await loadWorkspaceDeps();
|
|
99
99
|
const allFiles = await collectFiles(workspaceRoot, {
|
|
100
100
|
ignore: (name) =>
|
|
101
101
|
name.startsWith("-") ||
|
|
@@ -292,7 +292,6 @@ export async function runDeterminismCheck(
|
|
|
292
292
|
const absOutputPath = join(workspaceRoot, outputPath);
|
|
293
293
|
|
|
294
294
|
try {
|
|
295
|
-
const { byteHashFile } = await loadWorkspaceDeps();
|
|
296
295
|
await execAsync(produceCommand, { cwd: workspaceRoot, timeout: 60_000 });
|
|
297
296
|
const firstHash = await byteHashFile(absOutputPath);
|
|
298
297
|
|