@warpgogol/forge 9.7.0 → 9.7.1
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/CHANGELOG.md +25 -0
- package/dist/os/adr/handlers/archive.d.ts.map +1 -1
- package/dist/os/adr/handlers/archive.js +3 -7
- package/dist/os/adr/handlers/archive.js.map +1 -1
- package/dist/os/adr/handlers/list-create.d.ts.map +1 -1
- package/dist/os/adr/handlers/list-create.js +8 -6
- package/dist/os/adr/handlers/list-create.js.map +1 -1
- package/dist/os/audit/handlers/archive.d.ts.map +1 -1
- package/dist/os/audit/handlers/archive.js +3 -7
- package/dist/os/audit/handlers/archive.js.map +1 -1
- package/dist/os/core/archive-regen.d.ts +1 -0
- package/dist/os/core/archive-regen.d.ts.map +1 -1
- package/dist/os/core/archive-regen.js +31 -6
- package/dist/os/core/archive-regen.js.map +1 -1
- package/dist/os/core/core.module.d.ts.map +1 -1
- package/dist/os/core/core.module.js +5 -0
- package/dist/os/core/core.module.js.map +1 -1
- package/dist/os/core/handlers/pinned-check.d.ts +13 -0
- package/dist/os/core/handlers/pinned-check.d.ts.map +1 -1
- package/dist/os/core/handlers/pinned-check.js +25 -0
- package/dist/os/core/handlers/pinned-check.js.map +1 -1
- package/dist/os/core/handlers/pinned-types.d.ts +7 -0
- package/dist/os/core/handlers/pinned-types.d.ts.map +1 -1
- package/dist/os/core/handlers/pinned-validate.d.ts.map +1 -1
- package/dist/os/core/handlers/pinned-validate.js +24 -1
- package/dist/os/core/handlers/pinned-validate.js.map +1 -1
- package/dist/os/flow/digest.d.ts +73 -1
- package/dist/os/flow/digest.d.ts.map +1 -1
- package/dist/os/flow/digest.js +344 -92
- package/dist/os/flow/digest.js.map +1 -1
- package/dist/os/flow/evidence-lock.d.ts +36 -0
- package/dist/os/flow/evidence-lock.d.ts.map +1 -0
- package/dist/os/flow/evidence-lock.js +156 -0
- package/dist/os/flow/evidence-lock.js.map +1 -0
- package/dist/os/flow/flow.module.d.ts.map +1 -1
- package/dist/os/flow/flow.module.js +36 -14
- package/dist/os/flow/flow.module.js.map +1 -1
- package/dist/os/flow/git.d.ts +50 -3
- package/dist/os/flow/git.d.ts.map +1 -1
- package/dist/os/flow/git.js +144 -12
- package/dist/os/flow/git.js.map +1 -1
- package/dist/os/flow/handlers/flow-digest.d.ts.map +1 -1
- package/dist/os/flow/handlers/flow-digest.js +3 -5
- package/dist/os/flow/handlers/flow-digest.js.map +1 -1
- package/dist/os/flow/handlers/flow-push.d.ts +81 -0
- package/dist/os/flow/handlers/flow-push.d.ts.map +1 -1
- package/dist/os/flow/handlers/flow-push.js +642 -138
- package/dist/os/flow/handlers/flow-push.js.map +1 -1
- package/dist/os/flow/locks.d.ts +8 -0
- package/dist/os/flow/locks.d.ts.map +1 -1
- package/dist/os/flow/locks.js +6 -3
- package/dist/os/flow/locks.js.map +1 -1
- package/dist/os/flow/preflight.d.ts.map +1 -1
- package/dist/os/flow/preflight.js +4 -2
- package/dist/os/flow/preflight.js.map +1 -1
- package/dist/os/flow/registry.d.ts +9 -5
- package/dist/os/flow/registry.d.ts.map +1 -1
- package/dist/os/flow/registry.js +2 -2
- package/dist/os/flow/registry.js.map +1 -1
- package/dist/os/friction/friction.module.d.ts.map +1 -1
- package/dist/os/friction/friction.module.js +30 -5
- package/dist/os/friction/friction.module.js.map +1 -1
- package/dist/os/friction/handlers/friction-add.d.ts.map +1 -1
- package/dist/os/friction/handlers/friction-add.js +10 -17
- package/dist/os/friction/handlers/friction-add.js.map +1 -1
- package/dist/os/friction/handlers/friction-migrate.d.ts.map +1 -1
- package/dist/os/friction/handlers/friction-migrate.js +188 -2
- package/dist/os/friction/handlers/friction-migrate.js.map +1 -1
- package/dist/os/friction/store.d.ts +4 -0
- package/dist/os/friction/store.d.ts.map +1 -1
- package/dist/os/friction/store.js +20 -0
- package/dist/os/friction/store.js.map +1 -1
- package/dist/os/friction/types.d.ts +12 -0
- package/dist/os/friction/types.d.ts.map +1 -1
- package/dist/os/friction/types.js +8 -0
- package/dist/os/friction/types.js.map +1 -1
- package/dist/os/gate/handlers/gate-probe-catalog.d.ts.map +1 -1
- package/dist/os/gate/handlers/gate-probe-catalog.js +38 -5
- package/dist/os/gate/handlers/gate-probe-catalog.js.map +1 -1
- package/dist/os/mission/handlers/archive.d.ts.map +1 -1
- package/dist/os/mission/handlers/archive.js +3 -7
- package/dist/os/mission/handlers/archive.js.map +1 -1
- package/dist/os/plan/handlers/archive.d.ts.map +1 -1
- package/dist/os/plan/handlers/archive.js +3 -7
- package/dist/os/plan/handlers/archive.js.map +1 -1
- package/dist/os/rfc/handlers/archive.d.ts.map +1 -1
- package/dist/os/rfc/handlers/archive.js +3 -7
- package/dist/os/rfc/handlers/archive.js.map +1 -1
- package/dist/os/rfc/handlers/list-create.d.ts.map +1 -1
- package/dist/os/rfc/handlers/list-create.js +15 -7
- package/dist/os/rfc/handlers/list-create.js.map +1 -1
- package/dist/os/session/handlers/archive.d.ts.map +1 -1
- package/dist/os/session/handlers/archive.js +3 -7
- package/dist/os/session/handlers/archive.js.map +1 -1
- package/dist/os/system/handlers/system-product-register.d.ts +24 -0
- package/dist/os/system/handlers/system-product-register.d.ts.map +1 -0
- package/dist/os/system/handlers/system-product-register.js +322 -0
- package/dist/os/system/handlers/system-product-register.js.map +1 -0
- package/dist/os/system/handlers/system-products-status.d.ts +23 -0
- package/dist/os/system/handlers/system-products-status.d.ts.map +1 -0
- package/dist/os/system/handlers/system-products-status.js +235 -0
- package/dist/os/system/handlers/system-products-status.js.map +1 -0
- package/dist/os/system/schemas.d.ts +13 -0
- package/dist/os/system/schemas.d.ts.map +1 -1
- package/dist/os/system/schemas.js +15 -0
- package/dist/os/system/schemas.js.map +1 -1
- package/dist/os/system/system.module.d.ts.map +1 -1
- package/dist/os/system/system.module.js +113 -3
- package/dist/os/system/system.module.js.map +1 -1
- package/dist/src/config/forge-config.d.ts +2 -0
- package/dist/src/config/forge-config.d.ts.map +1 -1
- package/dist/src/config/forge-config.js +11 -10
- package/dist/src/config/forge-config.js.map +1 -1
- package/dist/src/onboarding/create.d.ts.map +1 -1
- package/dist/src/onboarding/create.js +27 -2
- package/dist/src/onboarding/create.js.map +1 -1
- package/dist/src/profiles/stack-profile.js +2 -2
- package/dist/src/types.js +2 -2
- package/dist/src/utils/verifier-git.d.ts +27 -1
- package/dist/src/utils/verifier-git.d.ts.map +1 -1
- package/dist/src/utils/verifier-git.js +36 -6
- package/dist/src/utils/verifier-git.js.map +1 -1
- package/docs/reference/system-hub.md +104 -0
- package/os/adr/handlers/archive.ts +3 -11
- package/os/adr/handlers/list-create.test.ts +174 -0
- package/os/adr/handlers/list-create.ts +16 -8
- package/os/audit/handlers/archive.ts +3 -11
- package/os/core/archive-regen.ts +33 -7
- package/os/core/core.module.ts +7 -0
- package/os/core/docs-archive.test.ts +25 -0
- package/os/core/handlers/pinned-check.ts +30 -0
- package/os/core/handlers/pinned-types.ts +7 -0
- package/os/core/handlers/pinned-validate.ts +28 -3
- package/os/flow/digest.ts +436 -95
- package/os/flow/evidence-lock.ts +184 -0
- package/os/flow/flow.module.ts +37 -14
- package/os/flow/git.ts +206 -11
- package/os/flow/handlers/flow-digest.ts +12 -8
- package/os/flow/handlers/flow-push.ts +725 -137
- package/os/flow/locks.ts +24 -7
- package/os/flow/preflight.ts +4 -2
- package/os/flow/registry.ts +7 -3
- package/os/flow/tests/digest-id-inputs.test.ts +106 -0
- package/os/flow/tests/digest-persist.test.ts +243 -0
- package/os/flow/tests/evidence-preflight-surface-skip.test.ts +218 -0
- package/os/flow/tests/flow-push-attest.test.ts +137 -0
- package/os/flow/tests/flow-push-review-baseline.test.ts +339 -0
- package/os/flow/tests/flow-push-verifier-batch.test.ts +134 -0
- package/os/friction/friction-add.test.ts +42 -0
- package/os/friction/friction-migrate.test.ts +67 -2
- package/os/friction/friction.module.ts +33 -5
- package/os/friction/handlers/friction-add.ts +10 -15
- package/os/friction/handlers/friction-migrate.ts +220 -1
- package/os/friction/store.ts +19 -0
- package/os/friction/types.ts +8 -0
- package/os/gate/handlers/gate-probe-catalog.ts +39 -7
- package/os/gate/handlers/gate-probe-ratchet.test.ts +57 -22
- package/os/mission/handlers/archive.ts +3 -11
- package/os/plan/handlers/archive.ts +3 -11
- package/os/rfc/handlers/archive.ts +3 -11
- package/os/rfc/handlers/list-create.ts +22 -17
- package/os/session/handlers/archive.ts +3 -11
- package/os/system/handlers/system-product-register.ts +492 -0
- package/os/system/handlers/system-products-status.ts +395 -0
- package/os/system/schemas.ts +17 -0
- package/os/system/system.module.ts +117 -3
- package/os/system/tests/system-product-register.test.ts +304 -0
- package/os/system/tests/system-products-status.test.ts +154 -0
- package/package.json +1 -1
- package/profiles/root-agents-system.md +82 -0
- package/profiles/system.yaml +1 -0
- package/src/config/forge-config.ts +16 -11
- package/src/onboarding/create-superfolder-guard.test.ts +73 -0
- package/src/onboarding/create.ts +28 -2
- package/src/profiles/stack-profile.ts +2 -2
- package/src/tests/evidence-consult-serialization.test.ts +202 -0
- package/src/tests/pinned-validate.test.ts +194 -0
- package/src/tests/profile-flow-hooks.test.ts +1 -0
- package/src/tests/profile-schema.test.ts +1 -0
- package/src/tests/stack-profile.test.ts +1 -0
- package/src/types.ts +2 -2
- package/src/utils/verifier-git.ts +53 -5
|
@@ -24,11 +24,11 @@ substituted object, a redirected repository, or a shim binary's output
|
|
|
24
24
|
<item>Short-cluster argv models must walk EVERY optarg/required-arg short, not just the flag being hunted — the first valued short in a cluster eats the remainder as its value, so a hunted flag inside that tail is not a flag at all (`status -Muno` = `-M` "uno", no `-u` exists — CX-r43-F1). `indexOf` on a cluster is never a parse; status's optarg shorts are `-u` AND `-M`, ls-files's required-arg shorts are `-x`/`-X`, and any cluster char outside the modeled set must leave the walk armed, never narrow it.</item>
|
|
25
25
|
</KEY_DECISIONS>
|
|
26
26
|
<CHANGE_SUMMARY>
|
|
27
|
-
<item>RFC-1616: totalize the worktree arm — anchored reads, compare-under-arm, check-ignore, embedded-gitdir refusal</item>
|
|
28
27
|
<item>RFC-1616: admit-list ls-files worktree scope and pin internal check-ignore consults (RFC-1616 r40)</item>
|
|
29
28
|
<item>RFC-1616: close r41 trust-boundary counterexamples — per-argv ignored-dir prune, file-valued argv strip/forbid, unconditional upstream pins</item>
|
|
30
29
|
<item>RFC-1616: close r42 trust-boundary counterexamples — classifier parses spawned argv (last-wins/OPTARG/valued-consumption), envPins carry =-bearing config keys</item>
|
|
31
30
|
<item>RFC-1616: status cluster walk treats -M as optarg — -Muno's tail is a similarity value, not a -u mode</item>
|
|
31
|
+
<item>RFC-1644: skip the worktree-surface capture for consults whose arm consumes none</item>
|
|
32
32
|
<history>RFC-1616</history>
|
|
33
33
|
</CHANGE_SUMMARY>
|
|
34
34
|
*/
|
|
@@ -611,6 +611,23 @@ export interface EvidencePreflight {
|
|
|
611
611
|
* refuses via `worktreeArmPlan` returning null.
|
|
612
612
|
*/
|
|
613
613
|
worktreeSurface?: WorktreeSurface;
|
|
614
|
+
/**
|
|
615
|
+
* RFC-1644: `true` when the preflight was asked to skip the worktree
|
|
616
|
+
* baseline (`worktreeSurface: "skip"`) — `worktreeSurface` is then
|
|
617
|
+
* `undefined`, which every consumer already treats as fail-closed.
|
|
618
|
+
*/
|
|
619
|
+
worktreeSurfaceSkipped?: true;
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
/**
|
|
623
|
+
* RFC-1644: per-call preflight options. `worktreeSurface: "skip"` leaves
|
|
624
|
+
* the CX-r38-W1 worktree baseline uncaptured — only per-spawn preflights
|
|
625
|
+
* whose argv `consultReadsWorktreeSurface` classifies false may pass it.
|
|
626
|
+
* Cached/anchored preflights serve argv they cannot see and keep the
|
|
627
|
+
* default `"capture"`.
|
|
628
|
+
*/
|
|
629
|
+
export interface EvidencePreflightOptions {
|
|
630
|
+
worktreeSurface?: "capture" | "skip";
|
|
614
631
|
}
|
|
615
632
|
|
|
616
633
|
/**
|
|
@@ -5505,6 +5522,20 @@ export function consultDescendsIgnoredDirs(args: readonly string[]): boolean {
|
|
|
5505
5522
|
* everything else adds nothing. `null` = the required surface is
|
|
5506
5523
|
* unverifiable and the consult must refuse.
|
|
5507
5524
|
*/
|
|
5525
|
+
/**
|
|
5526
|
+
* RFC-1644: whether a consult's worktree arm consumes the capture-instant
|
|
5527
|
+
* worktree surface (CX-r38-W1). `resolveWorktreeArm` branches on THIS
|
|
5528
|
+
* predicate, and the per-spawn preflights skip the capture exactly when it
|
|
5529
|
+
* is false — the skip and the arm can never disagree. "Consumes no
|
|
5530
|
+
* surface" describes the ARM, not git's I/O: a bare rev token without
|
|
5531
|
+
* `--` still makes git probe a same-named worktree file (pre-existing
|
|
5532
|
+
* CX-r39-A1 miss, F-0396) — unarmed before and after this predicate.
|
|
5533
|
+
*/
|
|
5534
|
+
export function consultReadsWorktreeSurface(args: readonly string[]): boolean {
|
|
5535
|
+
const scope = worktreeConsultScope(args);
|
|
5536
|
+
return scope === "tracked" || scope === "tracked+untracked" || args[0] === "check-ignore";
|
|
5537
|
+
}
|
|
5538
|
+
|
|
5508
5539
|
export function resolveWorktreeArm(
|
|
5509
5540
|
args: readonly string[],
|
|
5510
5541
|
preflight: EvidencePreflight,
|
|
@@ -5515,6 +5546,10 @@ export function resolveWorktreeArm(
|
|
|
5515
5546
|
extraWatch: readonly string[] | undefined;
|
|
5516
5547
|
} | null {
|
|
5517
5548
|
const scope = worktreeConsultScope(args);
|
|
5549
|
+
// RFC-1644: the single gate both the preflight skip and the arm read.
|
|
5550
|
+
if (!consultReadsWorktreeSurface(args)) {
|
|
5551
|
+
return { scope, wtPlan: null, extraWatch: extraWatchPaths };
|
|
5552
|
+
}
|
|
5518
5553
|
if (scope === "tracked" || scope === "tracked+untracked") {
|
|
5519
5554
|
// CX-r41-F1: prune the ignored-dir set only when the consult argv
|
|
5520
5555
|
// provably never reads those interiors (`status -uall`/`--ignored`
|
|
@@ -6441,6 +6476,7 @@ export type EvidenceGitRunner = (
|
|
|
6441
6476
|
export async function evidenceRepoPreflight(
|
|
6442
6477
|
repoRoot: string,
|
|
6443
6478
|
prior?: EvidenceFingerprint | null,
|
|
6479
|
+
options?: EvidencePreflightOptions,
|
|
6444
6480
|
): Promise<EvidencePreflight | null> {
|
|
6445
6481
|
// Indirection → resolves → fingerprint, fused so the ordering contract
|
|
6446
6482
|
// (CX-134/135) cannot be misordered: `.git` gitfile/commondir bytes are
|
|
@@ -6573,7 +6609,12 @@ export async function evidenceRepoPreflight(
|
|
|
6573
6609
|
// the capture-instant state, so a flip/hide landing between capture
|
|
6574
6610
|
// and arm reads as drift (the `.git` fingerprint's own semantics)
|
|
6575
6611
|
// instead of being silently adopted as the pin baseline.
|
|
6576
|
-
|
|
6612
|
+
// RFC-1644: a per-spawn preflight whose argv's worktree arm consumes no
|
|
6613
|
+
// surface (`consultReadsWorktreeSurface` false) skips the baseline — no
|
|
6614
|
+
// reader exists for it, and an arm that needs it refuses on `undefined`.
|
|
6615
|
+
if (options?.worktreeSurface === "skip") {
|
|
6616
|
+
preflight.worktreeSurfaceSkipped = true;
|
|
6617
|
+
} else if (preflight.index?.names !== undefined && fingerprint.workTree !== null) {
|
|
6577
6618
|
const wt = fingerprint.workTree;
|
|
6578
6619
|
const surface = captureWorktreeSurface(wt, preflight.index.names);
|
|
6579
6620
|
// CX-r39 reliability, CX-r41-F1: directories git reports ignored
|
|
@@ -7740,7 +7781,12 @@ async function verifierGitSpawn(
|
|
|
7740
7781
|
};
|
|
7741
7782
|
}
|
|
7742
7783
|
} else {
|
|
7743
|
-
|
|
7784
|
+
// RFC-1644: the skip decision rides the consult's own immutable argv —
|
|
7785
|
+
// every re-preflight below re-derives the same value.
|
|
7786
|
+
const surfaceOpt: EvidencePreflightOptions = {
|
|
7787
|
+
worktreeSurface: consultReadsWorktreeSurface(args) ? "capture" : "skip",
|
|
7788
|
+
};
|
|
7789
|
+
preflight = await evidenceRepoPreflight(cwd, undefined, surfaceOpt);
|
|
7744
7790
|
// Re-prove the fingerprint right before the spawn, and keep re-
|
|
7745
7791
|
// preflighting while the surface drifts — a session write racing the
|
|
7746
7792
|
// judgment→spawn window reads as drift and the bounded loop re-judges
|
|
@@ -7759,7 +7805,7 @@ async function verifierGitSpawn(
|
|
|
7759
7805
|
// steer re-resolution into a forged common dir (CX-143).
|
|
7760
7806
|
const priorFp = preflight.fingerprint;
|
|
7761
7807
|
closeEvidenceIndex(preflight);
|
|
7762
|
-
preflight = attempt >= 2 ? null : await evidenceRepoPreflight(cwd, priorFp);
|
|
7808
|
+
preflight = attempt >= 2 ? null : await evidenceRepoPreflight(cwd, priorFp, surfaceOpt);
|
|
7763
7809
|
}
|
|
7764
7810
|
// The spawn-window watch (CX-r22): every check above ends at its
|
|
7765
7811
|
// own `lstat`/read — the judged child opens `.git` metadata inside
|
|
@@ -7812,7 +7858,9 @@ async function verifierGitSpawn(
|
|
|
7812
7858
|
windowWatch = null;
|
|
7813
7859
|
closeEvidenceIndex(preflight);
|
|
7814
7860
|
preflight =
|
|
7815
|
-
armAttempt >= 1
|
|
7861
|
+
armAttempt >= 1
|
|
7862
|
+
? null
|
|
7863
|
+
: await evidenceRepoPreflight(cwd, preflight.fingerprint, surfaceOpt);
|
|
7816
7864
|
}
|
|
7817
7865
|
}
|
|
7818
7866
|
}
|