@cassiomc1/forgeloop 1.6.4 → 1.6.5
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.
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Deprecated filename
|
|
2
|
+
|
|
3
|
+
> Deprecated since package `1.2.4`; retained as a repository compatibility stub.
|
|
4
|
+
> It is not part of the public integration surface and is scheduled for removal
|
|
5
|
+
> in the next compatibility-breaking release.
|
|
6
|
+
|
|
7
|
+
ForgeLoop is vendor-neutral and does not use a supported-agent allowlist.
|
|
8
|
+
|
|
9
|
+
The canonical integration contract is:
|
|
10
|
+
|
|
11
|
+
[`PROTOCOL_INTEGRATION.md`](./PROTOCOL_INTEGRATION.md)
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
ForgeLoop is a portable protocol and support CLI for verifiable engineering workflows. It records and validates task state, contracts, routing, checks, evidence, continuity, and optional code attestations. It does not become an agent scheduler, delegation service, source-control authority, or secret manager.
|
|
8
8
|
|
|
9
9
|
Protocol version: 1
|
|
10
|
-
Package version: 1.6.
|
|
10
|
+
Package version: 1.6.5
|
|
11
11
|
|
|
12
12
|
## Canonical loop
|
|
13
13
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cassiomc1/forgeloop",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.5",
|
|
4
4
|
"description": "Portable, verifiable engineering protocol for AI coding environments and developer workflows",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"GUIDE_ROUTER.md",
|
|
29
29
|
"LOOP_ENGINEERING.md",
|
|
30
30
|
"PROTOCOL_INTEGRATION.md",
|
|
31
|
+
"AGENT_COMPATIBILITY.md",
|
|
31
32
|
"LOOP_SYSTEM_DESIGN.md",
|
|
32
33
|
"QUALITY_SCORECARD.md",
|
|
33
34
|
"TERMINOLOGY.md",
|
package/src/core/resumability.js
CHANGED
|
@@ -26,7 +26,7 @@ async function deriveResumePhaseFromLedger(target, packageRoot, taskId) {
|
|
|
26
26
|
return null;
|
|
27
27
|
}
|
|
28
28
|
if (!ledger?.valid) return null;
|
|
29
|
-
const scoped = (ledger.events ?? []).filter((event) => event.taskId === taskId);
|
|
29
|
+
const scoped = (ledger.events ?? []).filter((event) => !taskId || event.taskId === taskId);
|
|
30
30
|
if (scoped.some((event) => event.event === "COMPLETION_VALIDATED")) return null;
|
|
31
31
|
const positions = RESUME_PHASE_BY_MILESTONE;
|
|
32
32
|
let derived = null;
|
|
@@ -42,6 +42,20 @@ async function deriveResumePhaseFromLedger(target, packageRoot, taskId) {
|
|
|
42
42
|
return derived;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
+
function deriveVerificationCycleFromLedger(events) {
|
|
46
|
+
const cycleEvents = new Set([
|
|
47
|
+
"VERIFICATION_STARTED",
|
|
48
|
+
"VERIFICATION_RECORDED",
|
|
49
|
+
"DIAGNOSIS_RECORDED",
|
|
50
|
+
"DIAGNOSTIC_CASE_RECORDED",
|
|
51
|
+
]);
|
|
52
|
+
const cycles = events
|
|
53
|
+
.filter((event) => cycleEvents.has(event.event))
|
|
54
|
+
.map((event) => event.details?.verificationCycle)
|
|
55
|
+
.filter((cycle) => Number.isInteger(cycle) && cycle >= 1);
|
|
56
|
+
return cycles.at(-1);
|
|
57
|
+
}
|
|
58
|
+
|
|
45
59
|
function resumeSteps(phase) {
|
|
46
60
|
if (phase === "EXECUTING" || phase === "VERIFYING") {
|
|
47
61
|
return {
|
|
@@ -61,6 +75,17 @@ export async function ensureResumableState({ target, packageRoot, contract, rout
|
|
|
61
75
|
if (existing) return existing;
|
|
62
76
|
|
|
63
77
|
const resumedPhase = await deriveResumePhaseFromLedger(target, packageRoot, taskId) ?? "ROUTED";
|
|
78
|
+
let verificationCycle;
|
|
79
|
+
try {
|
|
80
|
+
const ledger = await validateEventLedger(target, packageRoot, { taskId });
|
|
81
|
+
if (ledger.valid) {
|
|
82
|
+
verificationCycle = deriveVerificationCycleFromLedger(
|
|
83
|
+
(ledger.events ?? []).filter((event) => !taskId || event.taskId === taskId),
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
} catch {
|
|
87
|
+
verificationCycle = undefined;
|
|
88
|
+
}
|
|
64
89
|
const steps = resumeSteps(resumedPhase);
|
|
65
90
|
const state = createWorkState({
|
|
66
91
|
taskId: contract.value.taskId,
|
|
@@ -71,6 +96,7 @@ export async function ensureResumableState({ target, packageRoot, contract, rout
|
|
|
71
96
|
selectedGuides: route.value.guides,
|
|
72
97
|
completedSteps: steps.completedSteps,
|
|
73
98
|
pendingSteps: steps.pendingSteps,
|
|
99
|
+
...(verificationCycle !== undefined ? { verificationCycle } : {}),
|
|
74
100
|
checks: [],
|
|
75
101
|
failures: [],
|
|
76
102
|
blockers: [],
|