@deftai/directive-core 0.55.1 → 0.56.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/dist/cache/errors.d.ts +4 -1
- package/dist/cache/errors.js +8 -2
- package/dist/cache/fetch.d.ts +50 -0
- package/dist/cache/fetch.js +224 -3
- package/dist/cache/main.js +10 -5
- package/dist/cache/operations.js +6 -4
- package/dist/codebase/map-fresh.js +7 -1
- package/dist/deposit/copy-tree.d.ts +16 -0
- package/dist/deposit/copy-tree.js +58 -0
- package/dist/deposit/resolve-content.d.ts +28 -0
- package/dist/deposit/resolve-content.js +70 -0
- package/dist/doctor/checks.d.ts +6 -0
- package/dist/doctor/checks.js +37 -0
- package/dist/doctor/constants.d.ts +2 -0
- package/dist/doctor/constants.js +8 -0
- package/dist/engine-version.d.ts +3 -0
- package/dist/engine-version.js +23 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -1
- package/dist/init-deposit/gitignore.d.ts +51 -0
- package/dist/init-deposit/gitignore.js +200 -0
- package/dist/init-deposit/index.d.ts +6 -0
- package/dist/init-deposit/index.js +6 -0
- package/dist/init-deposit/init-deposit.d.ts +44 -0
- package/dist/init-deposit/init-deposit.js +197 -0
- package/dist/init-deposit/legacy-detect.d.ts +61 -0
- package/dist/init-deposit/legacy-detect.js +223 -0
- package/dist/init-deposit/migrate.d.ts +88 -0
- package/dist/init-deposit/migrate.js +196 -0
- package/dist/init-deposit/refresh.d.ts +50 -0
- package/dist/init-deposit/refresh.js +292 -0
- package/dist/init-deposit/scaffold.d.ts +41 -0
- package/dist/init-deposit/scaffold.js +753 -0
- package/dist/legacy-bridge/bridge-drift.d.ts +70 -0
- package/dist/legacy-bridge/bridge-drift.js +171 -0
- package/dist/legacy-bridge/freeze-gate.d.ts +79 -0
- package/dist/legacy-bridge/freeze-gate.js +168 -0
- package/dist/legacy-bridge/index.d.ts +4 -0
- package/dist/legacy-bridge/index.js +4 -0
- package/dist/legacy-bridge/sot.d.ts +45 -0
- package/dist/legacy-bridge/sot.js +49 -0
- package/dist/preflight-cache/evaluate.d.ts +11 -0
- package/dist/preflight-cache/evaluate.js +63 -13
- package/dist/release-e2e/constants.d.ts +2 -0
- package/dist/release-e2e/constants.js +2 -0
- package/dist/release-e2e/flags.js +5 -1
- package/dist/release-e2e/legacy-bridge-leg.d.ts +134 -0
- package/dist/release-e2e/legacy-bridge-leg.js +460 -0
- package/dist/release-e2e/main.d.ts +2 -1
- package/dist/release-e2e/main.js +17 -1
- package/dist/release-e2e/npm-ops.d.ts +3 -1
- package/dist/release-e2e/npm-ops.js +5 -3
- package/dist/release-e2e/types.d.ts +9 -0
- package/dist/render/index.d.ts +1 -1
- package/dist/render/index.js +1 -1
- package/dist/render/project-render.js +4 -3
- package/dist/render/roadmap-render.d.ts +4 -2
- package/dist/render/roadmap-render.js +14 -7
- package/dist/swarm/routing-verify.js +2 -2
- package/dist/swarm/subagent-backend.d.ts +16 -0
- package/dist/swarm/subagent-backend.js +14 -0
- package/dist/triage/actions/candidates-log.d.ts +12 -1
- package/dist/triage/actions/candidates-log.js +44 -7
- package/dist/triage/actions/index.d.ts +25 -1
- package/dist/triage/actions/index.js +94 -3
- package/dist/triage/summary/index.d.ts +1 -3
- package/dist/triage/summary/index.js +6 -57
- package/dist/triage/summary/reconcilable.js +4 -33
- package/dist/triage/welcome/default-mode.d.ts +1 -0
- package/dist/triage/welcome/default-mode.js +6 -0
- package/dist/vbrief-validate/project-definition.js +4 -69
- package/dist/vbrief-validate/registry-status.d.ts +20 -0
- package/dist/vbrief-validate/registry-status.js +85 -0
- package/package.json +11 -2
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
import { execFileSync } from "node:child_process";
|
|
14
14
|
import { existsSync, readdirSync, readFileSync, statSync } from "node:fs";
|
|
15
15
|
import { join, relative } from "node:path";
|
|
16
|
+
import { probeCacheDrift } from "../cache/fetch.js";
|
|
16
17
|
// ---------------------------------------------------------------------------
|
|
17
18
|
// Public constants (mirror preflight_cache.py)
|
|
18
19
|
// ---------------------------------------------------------------------------
|
|
@@ -246,7 +247,7 @@ function parseCandidates(candidatesPath) {
|
|
|
246
247
|
if (data !== null && typeof data === "object" && !Array.isArray(data)) {
|
|
247
248
|
const d = data;
|
|
248
249
|
entries.push({
|
|
249
|
-
issue: Number(d.issue ?? 0),
|
|
250
|
+
issue: Number(d.issue ?? d.issue_number ?? 0),
|
|
250
251
|
repo: String(d.repo ?? ""),
|
|
251
252
|
decision: String(d.decision ?? ""),
|
|
252
253
|
ts: String(d.ts ?? d.timestamp ?? ""),
|
|
@@ -272,7 +273,49 @@ function latestDecisionForIssue(candidates, repo, issueNumber) {
|
|
|
272
273
|
// Main evaluate function
|
|
273
274
|
// ---------------------------------------------------------------------------
|
|
274
275
|
const REMEDIATION_NO_CACHE = [" Recovery: run `deft triage:bootstrap` to seed the cache."].join("\n");
|
|
275
|
-
const
|
|
276
|
+
const REMEDIATION_STALE_FORCE = [
|
|
277
|
+
" Recovery: run `deft cache:fetch-all --force` to refresh and reconcile upstream state.",
|
|
278
|
+
].join("\n");
|
|
279
|
+
const REMEDIATION_STALE_PLAIN = [
|
|
280
|
+
" Recovery: run `deft cache:fetch-all` to refresh and reconcile upstream state.",
|
|
281
|
+
].join("\n");
|
|
282
|
+
/**
|
|
283
|
+
* Branch-aware recovery hint (#1953 Option 3).
|
|
284
|
+
* Age-stale (or age+drift mixed) → --force bypasses TTL; drift-only → plain refetch.
|
|
285
|
+
*/
|
|
286
|
+
export function recoveryHintForStaleFailure(causes) {
|
|
287
|
+
if (causes.ageStale) {
|
|
288
|
+
return REMEDIATION_STALE_FORCE;
|
|
289
|
+
}
|
|
290
|
+
return REMEDIATION_STALE_PLAIN;
|
|
291
|
+
}
|
|
292
|
+
function formatDriftFailure(repo, drift) {
|
|
293
|
+
const parts = [];
|
|
294
|
+
if (drift.stateDriftNumbers.length > 0) {
|
|
295
|
+
parts.push(`${drift.stateDriftNumbers.length} cached-open issue(s) absent from live open set`);
|
|
296
|
+
}
|
|
297
|
+
if (drift.contentDriftNumbers.length > 0) {
|
|
298
|
+
parts.push(`${drift.contentDriftNumbers.length} TTL-fresh issue(s) with upstream content drift`);
|
|
299
|
+
}
|
|
300
|
+
return {
|
|
301
|
+
code: 1,
|
|
302
|
+
message: [
|
|
303
|
+
`❌ deft cache-fresh: stale-by-drift -- ${parts.join("; ")} (${repo}).`,
|
|
304
|
+
recoveryHintForStaleFailure({ ageStale: false, driftDetected: true }),
|
|
305
|
+
].join("\n"),
|
|
306
|
+
};
|
|
307
|
+
}
|
|
308
|
+
function runDriftProbe(resolvedRepo, cacheRoot, source, options) {
|
|
309
|
+
if (options.probeDriftFn) {
|
|
310
|
+
return options.probeDriftFn(resolvedRepo, cacheRoot, source);
|
|
311
|
+
}
|
|
312
|
+
try {
|
|
313
|
+
return probeCacheDrift({ repo: resolvedRepo, source, cacheRoot });
|
|
314
|
+
}
|
|
315
|
+
catch {
|
|
316
|
+
return null;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
276
319
|
const REMEDIATION_NO_CANDIDATES = [
|
|
277
320
|
" Recovery: run `deft triage:bootstrap` to initialise the triage log.",
|
|
278
321
|
].join("\n");
|
|
@@ -355,18 +398,18 @@ export function evaluate(projectRoot, options = {}) {
|
|
|
355
398
|
allMetaPaths.length > 0 &&
|
|
356
399
|
scopedMetaPaths.length === 0 &&
|
|
357
400
|
candState === "populated";
|
|
358
|
-
// Step 5:
|
|
359
|
-
let
|
|
360
|
-
let
|
|
401
|
+
// Step 5: Oldest in-scope entry age + drift probe (#1886)
|
|
402
|
+
let minFetchedAt = null;
|
|
403
|
+
let minMetaPath = null;
|
|
361
404
|
for (const p of scopedMetaPaths.length > 0 ? scopedMetaPaths : allMetaPaths) {
|
|
362
405
|
const ts = metaFetchedAt(p);
|
|
363
|
-
if (ts !== null && (
|
|
364
|
-
|
|
365
|
-
|
|
406
|
+
if (ts !== null && (minFetchedAt === null || ts < minFetchedAt)) {
|
|
407
|
+
minFetchedAt = ts;
|
|
408
|
+
minMetaPath = p;
|
|
366
409
|
}
|
|
367
410
|
}
|
|
368
411
|
const now = nowFn();
|
|
369
|
-
const ageMs =
|
|
412
|
+
const ageMs = minFetchedAt !== null ? now.getTime() - minFetchedAt.getTime() : Infinity;
|
|
370
413
|
const ageH = ageMs / (1000 * 3600);
|
|
371
414
|
const stale = ageH > maxAgeHours;
|
|
372
415
|
// Step 5b: --allow-stale bypass
|
|
@@ -383,15 +426,22 @@ export function evaluate(projectRoot, options = {}) {
|
|
|
383
426
|
return { code: 0, message: warning };
|
|
384
427
|
}
|
|
385
428
|
if (stale) {
|
|
386
|
-
const display =
|
|
429
|
+
const display = minMetaPath !== null ? relative(projectRoot, minMetaPath) : "?";
|
|
387
430
|
return {
|
|
388
431
|
code: 1,
|
|
389
432
|
message: [
|
|
390
|
-
`❌ deft cache-fresh: cache is ${ageH.toFixed(1)}h old (max-age=${maxAgeHours}h);
|
|
391
|
-
|
|
433
|
+
`❌ deft cache-fresh: cache is ${ageH.toFixed(1)}h old (max-age=${maxAgeHours}h); oldest in-scope entry ${display}.`,
|
|
434
|
+
recoveryHintForStaleFailure({ ageStale: true, driftDetected: false }),
|
|
392
435
|
].join("\n"),
|
|
393
436
|
};
|
|
394
437
|
}
|
|
438
|
+
if (resolvedRepo !== null && !allowStale) {
|
|
439
|
+
const drift = runDriftProbe(resolvedRepo, cacheRoot, source, options);
|
|
440
|
+
if (drift !== null &&
|
|
441
|
+
(drift.stateDriftNumbers.length > 0 || drift.contentDriftNumbers.length > 0)) {
|
|
442
|
+
return formatDriftFailure(resolvedRepo, drift);
|
|
443
|
+
}
|
|
444
|
+
}
|
|
395
445
|
// Step 6: --for-issue
|
|
396
446
|
if (options.forIssue !== undefined && options.forIssue !== null) {
|
|
397
447
|
const forResult = evaluateForIssue(resolvedRepo, options.forIssue, candidatesPath, cacheRoot, source, scopeRules, projectRoot);
|
|
@@ -416,7 +466,7 @@ export function evaluate(projectRoot, options = {}) {
|
|
|
416
466
|
inScopeCount = scopedMetaPaths.length;
|
|
417
467
|
}
|
|
418
468
|
const repoLabel = resolvedRepo ?? "unknown-repo";
|
|
419
|
-
let msg = `✓ deft cache-fresh: ${repoLabel} -- ${inScopeCount} entry/ies in scope;
|
|
469
|
+
let msg = `✓ deft cache-fresh: ${repoLabel} -- ${inScopeCount} entry/ies in scope; oldest fetched ${ageH.toFixed(1)}h ago (max-age=${maxAgeHours}h); ${statePhrase}.`;
|
|
420
470
|
if (options.forIssue !== undefined && options.forIssue !== null) {
|
|
421
471
|
msg += ` Issue #${options.forIssue} latest decision = accept; in subscription scope.`;
|
|
422
472
|
}
|
|
@@ -11,6 +11,8 @@ export declare const REHEARSAL_VERSION = "0.0.1";
|
|
|
11
11
|
* .github/workflows/npm-publish.yml (types -> core -> content -> cli).
|
|
12
12
|
*/
|
|
13
13
|
export declare const NPM_PUBLISH_PACKAGES: readonly ["types", "core", "content", "cli"];
|
|
14
|
+
/** #1925: throwaway dist-tag so dry-run does not apply `latest` to 0.0.1. */
|
|
15
|
+
export declare const NPM_E2E_REHEARSAL_TAG = "e2e-rehearsal";
|
|
14
16
|
export declare const NPM_INSTALL_TIMEOUT_SECONDS = 600;
|
|
15
17
|
export declare const NPM_BUILD_TIMEOUT_SECONDS = 600;
|
|
16
18
|
export declare const NPM_PUBLISH_DRYRUN_TIMEOUT_SECONDS = 180;
|
|
@@ -11,6 +11,8 @@ export const REHEARSAL_VERSION = "0.0.1";
|
|
|
11
11
|
* .github/workflows/npm-publish.yml (types -> core -> content -> cli).
|
|
12
12
|
*/
|
|
13
13
|
export const NPM_PUBLISH_PACKAGES = ["types", "core", "content", "cli"];
|
|
14
|
+
/** #1925: throwaway dist-tag so dry-run does not apply `latest` to 0.0.1. */
|
|
15
|
+
export const NPM_E2E_REHEARSAL_TAG = "e2e-rehearsal";
|
|
14
16
|
export const NPM_INSTALL_TIMEOUT_SECONDS = 600;
|
|
15
17
|
export const NPM_BUILD_TIMEOUT_SECONDS = 600;
|
|
16
18
|
export const NPM_PUBLISH_DRYRUN_TIMEOUT_SECONDS = 180;
|
|
@@ -25,6 +25,7 @@ export function parseE2EFlags(argv) {
|
|
|
25
25
|
let keepRepo = false;
|
|
26
26
|
let projectRoot = null;
|
|
27
27
|
let skipNpm = false;
|
|
28
|
+
let legacyBridge = false;
|
|
28
29
|
const unknown = [];
|
|
29
30
|
for (let i = 0; i < argv.length; i += 1) {
|
|
30
31
|
const arg = argv[i];
|
|
@@ -42,6 +43,9 @@ export function parseE2EFlags(argv) {
|
|
|
42
43
|
else if (arg === "--skip-npm") {
|
|
43
44
|
skipNpm = true;
|
|
44
45
|
}
|
|
46
|
+
else if (arg === "--legacy-bridge") {
|
|
47
|
+
legacyBridge = true;
|
|
48
|
+
}
|
|
45
49
|
else if (arg === "--owner") {
|
|
46
50
|
const next = argv[i + 1];
|
|
47
51
|
if (next === undefined || next.startsWith("-")) {
|
|
@@ -75,6 +79,6 @@ export function parseE2EFlags(argv) {
|
|
|
75
79
|
unknown.push(arg);
|
|
76
80
|
}
|
|
77
81
|
}
|
|
78
|
-
return { help, owner, dryRun, keepRepo, projectRoot, skipNpm, unknown };
|
|
82
|
+
return { help, owner, dryRun, keepRepo, projectRoot, skipNpm, legacyBridge, unknown };
|
|
79
83
|
}
|
|
80
84
|
//# sourceMappingURL=flags.js.map
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { type LegacyLayoutKind } from "../init-deposit/legacy-detect.js";
|
|
2
|
+
import { type InstallManifestFields } from "../init-deposit/scaffold.js";
|
|
3
|
+
import type { E2ESeams } from "./types.js";
|
|
4
|
+
/** The frozen Go bridge repo (the published release lives under deftai/directive). */
|
|
5
|
+
export declare const GO_BRIDGE_REPO = "deftai/directive";
|
|
6
|
+
/** A legacy on-disk shape the stage-1 bridge migrates and the npm CLI refuses. */
|
|
7
|
+
export interface LegacyFixtureSpec {
|
|
8
|
+
readonly kind: LegacyLayoutKind;
|
|
9
|
+
readonly provision: (dir: string) => void;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* The legacy layouts the leg provisions + asserts. Covers the four shapes the
|
|
13
|
+
* detector recognises (legacy-detect.ts): orphan `.deft/VERSION`, legacy
|
|
14
|
+
* `deft/`-prefixed root, git-clone / submodule, and a pre-v0.27 sentinel-only
|
|
15
|
+
* AGENTS.md. Each fixture lands in its own clean throwaway dir.
|
|
16
|
+
*/
|
|
17
|
+
export declare const LEGACY_FIXTURES: readonly LegacyFixtureSpec[];
|
|
18
|
+
/** Provision the named legacy fixture under `dir`. */
|
|
19
|
+
export declare function provisionLegacyFixture(dir: string, kind: LegacyLayoutKind): void;
|
|
20
|
+
/**
|
|
21
|
+
* Stage-0 fixture-shape assertions: every legacy fixture is classified as legacy
|
|
22
|
+
* with its expected kind, and the npm refuse-preflight surface (story P) would
|
|
23
|
+
* refuse it (we exercise the version-neutral two-step refusal message). This is
|
|
24
|
+
* the boundary that makes the two-stage migration load-bearing: the npm path
|
|
25
|
+
* NEVER migrates a legacy layout -- the frozen Go bridge does (stage 1) first.
|
|
26
|
+
*/
|
|
27
|
+
export declare function assertLegacyFixturesDetectedAndRefused(workRoot: string): [boolean, string];
|
|
28
|
+
/**
|
|
29
|
+
* The canonical installer manifest fields the frozen Go bridge writes into
|
|
30
|
+
* `.deft/core/VERSION`. Field names + order come from the installer's
|
|
31
|
+
* `buildInstallManifestText` (the TS port of the Go `BuildInstallManifestText`),
|
|
32
|
+
* so this fixture is the same shape a real frozen-bridge run deposits.
|
|
33
|
+
*/
|
|
34
|
+
export declare const CANONICAL_INSTALLER_MANIFEST_FIELDS: InstallManifestFields;
|
|
35
|
+
/**
|
|
36
|
+
* The install-manifest field keys a canonical installer VERSION carries, derived
|
|
37
|
+
* from the installer's own `buildInstallManifestText` output so the handshake
|
|
38
|
+
* expectation tracks the real installer field shape rather than restating it.
|
|
39
|
+
* `directive migrate` consumes this VERSION; a drift away from these keys is the
|
|
40
|
+
* handshake break this leg now asserts against.
|
|
41
|
+
*/
|
|
42
|
+
export declare function installerManifestFieldKeys(): string[];
|
|
43
|
+
/**
|
|
44
|
+
* Assert an installer-shaped VERSION is migrate-acceptable: `parseInstallManifest`
|
|
45
|
+
* accepts it AND it carries every canonical installer manifest field
|
|
46
|
+
* ({@link installerManifestFieldKeys}) with a non-empty value. A drifted field
|
|
47
|
+
* shape (missing or renamed key, empty value) returns a handshake mismatch
|
|
48
|
+
* reason so the leg fails loudly rather than letting `directive migrate` stamp a
|
|
49
|
+
* non-installer VERSION npm-managed. This is the stage-2 handshake the #1912
|
|
50
|
+
* freeze hinges on (the installer VERSION the npm CLI accepts as canonical-ready).
|
|
51
|
+
*/
|
|
52
|
+
export declare function assertInstallerVersionMigrateAcceptable(versionText: string): [boolean, string];
|
|
53
|
+
/**
|
|
54
|
+
* Provision a canonical-vendored `.deft/core` deposit -- the shape the stage-1
|
|
55
|
+
* bridge produces from a legacy layout. Writes an installer-shaped VERSION (via
|
|
56
|
+
* the installer's own `writeInstallManifest`) unless `versionTextOverride` is
|
|
57
|
+
* supplied, in which case the raw override text is written verbatim so a test can
|
|
58
|
+
* drive a drifted VERSION through the stage-2 handshake. Optionally renders
|
|
59
|
+
* AGENTS.md when the agents-entry template is available (so the npm-hybrid
|
|
60
|
+
* end-state check can assert the managed-section the way `directive init`/`update`
|
|
61
|
+
* do). Returns the VERSION manifest path so the caller can assert the handshake.
|
|
62
|
+
*/
|
|
63
|
+
export declare function provisionCanonicalVendoredDeposit(projectDir: string, agentsTemplatePath: string | null, versionTextOverride?: string | null): {
|
|
64
|
+
deftDir: string;
|
|
65
|
+
agentsRendered: boolean;
|
|
66
|
+
manifestPath: string;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* Stage-2 assertion: drive a canonical-vendored deposit through `directive
|
|
70
|
+
* migrate` (and the init/update AGENTS.md render) to a valid npm-hybrid deposit.
|
|
71
|
+
* Asserts migrate stamps the deposit npm-managed, is idempotent (already-hybrid
|
|
72
|
+
* on the second run), and leaves a `managed_by: 'npm'` manifest.
|
|
73
|
+
*/
|
|
74
|
+
export declare function assertNpmHybridMigration(workRoot: string, agentsTemplatePath: string | null, seams?: LegacyBridgeLegSeams): [boolean, string];
|
|
75
|
+
/** The outcome of resolving which downloaded asset is the bridge binary for this host. */
|
|
76
|
+
export type BridgeAssetSelection = {
|
|
77
|
+
kind: "ok";
|
|
78
|
+
name: string;
|
|
79
|
+
} | {
|
|
80
|
+
kind: "none";
|
|
81
|
+
} | {
|
|
82
|
+
kind: "no-platform-match";
|
|
83
|
+
candidates: string[];
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* Pick the deft-install bridge binary matching the current host platform/arch.
|
|
87
|
+
*
|
|
88
|
+
* Go releases publish one asset per OS/arch (e.g. `deft-install-linux-amd64`,
|
|
89
|
+
* `deft-install-darwin-arm64`, `deft-install-windows-amd64.exe`). Selecting
|
|
90
|
+
* `assets[0]` alphabetically silently picks the wrong binary on a multi-asset
|
|
91
|
+
* release (darwin sorts before linux), producing an exec-format failure on a
|
|
92
|
+
* non-Darwin runner. This resolves the host-matching asset instead and reports
|
|
93
|
+
* a precise outcome when none matches:
|
|
94
|
+
* - single deft-install asset -> use it (single-binary releases, back-compat);
|
|
95
|
+
* - prefer an asset whose name carries BOTH the GOOS and GOARCH tokens;
|
|
96
|
+
* - else fall back to a GOOS-only match (releases that omit the arch suffix);
|
|
97
|
+
* - else `no-platform-match` so the caller fails loudly rather than guessing.
|
|
98
|
+
*/
|
|
99
|
+
export declare function selectBridgeAsset(fileNames: readonly string[], platform?: NodeJS.Platform, arch?: string): BridgeAssetSelection;
|
|
100
|
+
/**
|
|
101
|
+
* The frozen-mode real handoff (reached ONLY once the operator pins the SoT):
|
|
102
|
+
* download the frozen Go bridge binary at the pinned tag and run it against a
|
|
103
|
+
* legacy fixture to normalise it to canonical-vendored. Soft-skips when `gh` is
|
|
104
|
+
* absent. Never builds/cuts a release -- it consumes an already-published one.
|
|
105
|
+
*/
|
|
106
|
+
export declare function downloadAndRunFrozenBridge(pin: string, fixtureDir: string, seams?: E2ESeams & LegacyBridgeLegSeams): [boolean, string];
|
|
107
|
+
export interface LegacyBridgeLegSeams {
|
|
108
|
+
/** Test seam: override the Tier-0 SoT reader (default: real lastGoInstaller). */
|
|
109
|
+
lastGoInstaller?: () => string | null;
|
|
110
|
+
/** Test seam: engine-resolve check used by the stage-2 migrate (default: npm present). */
|
|
111
|
+
resolveEngine?: () => string | null;
|
|
112
|
+
/** Test seam: deterministic ISO timestamp for the migrate backup filename. */
|
|
113
|
+
nowIso?: () => string;
|
|
114
|
+
/** Test seam: override the frozen-mode bridge handoff (default: gh release download + run). */
|
|
115
|
+
runFrozenBridge?: (pin: string, fixtureDir: string) => [boolean, string];
|
|
116
|
+
/** Override the agents-entry template path (default: <projectRoot>/content/templates/agents-entry.md). */
|
|
117
|
+
agentsTemplatePath?: string | null;
|
|
118
|
+
/**
|
|
119
|
+
* Test seam: write this raw text to the stage-2 `.deft/core/VERSION` instead of
|
|
120
|
+
* the installer-shaped manifest, to drive a drifted VERSION through the
|
|
121
|
+
* migrate-acceptable handshake assertion (default: installer-shaped manifest).
|
|
122
|
+
*/
|
|
123
|
+
versionTextOverride?: string;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Run the pinned legacy -> bridge -> npm-hybrid migration leg.
|
|
127
|
+
*
|
|
128
|
+
* Returns `[ok, reason]` like the other release-e2e legs. Soft-skips (ok=true)
|
|
129
|
+
* when npm is absent. While the SoT is null (pending-pin) it asserts the
|
|
130
|
+
* fixture-shape + stage-2 npm-hybrid checks and SKIPS the real frozen-binary
|
|
131
|
+
* download; once the SoT is pinned it additionally runs the real bridge handoff.
|
|
132
|
+
*/
|
|
133
|
+
export declare function runLegacyBridgeLeg(projectRoot: string, seams?: E2ESeams & LegacyBridgeLegSeams): [boolean, string];
|
|
134
|
+
//# sourceMappingURL=legacy-bridge-leg.d.ts.map
|