@abelxiaoxing/cadence 1.0.14 → 1.1.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/README.md +39 -13
- package/agents/contract-reviewer.md +2 -2
- package/agents/design-explorer.md +1 -1
- package/agents/diagnosis-worker.md +6 -3
- package/agents/implementation-worker.md +14 -9
- package/config/.env.example +5 -17
- package/config/routes.example.json +42 -0
- package/package.json +3 -3
- package/prompts/abel-design.md +206 -228
- package/prompts/abel-diagnose.md +39 -18
- package/prompts/abel-implement.md +122 -178
- package/prompts/abel-init.md +36 -33
- package/skills/abel-workflow/SKILL.md +190 -168
- package/src/apply-transaction.ts +1427 -0
- package/src/artifact-store.ts +204 -0
- package/src/child-session.ts +136 -17
- package/src/contracts.ts +121 -696
- package/src/control-contracts.ts +246 -0
- package/src/delivery-compiler.ts +1118 -0
- package/src/design-control.ts +846 -0
- package/src/design-journal.ts +1569 -0
- package/src/file-snapshot.ts +5 -0
- package/src/implement-graph.ts +11 -4
- package/src/index.ts +1833 -118
- package/src/isolation-backend.ts +269 -0
- package/src/packet-runtime.ts +533 -0
- package/src/parent-provider.ts +23 -4
- package/src/route-policy.ts +483 -0
- package/src/run-state.ts +430 -0
- package/src/run-store.ts +990 -0
- package/src/safe-path.ts +11 -0
- package/src/scoped-tools.ts +36 -0
- package/src/state-root.ts +215 -0
- package/src/subagent-activity.ts +526 -27
- package/src/submit-tool.ts +274 -0
- package/src/task-ledger.ts +1380 -0
- package/src/verification-capability.ts +560 -45
- package/src/worker-broker.ts +703 -0
- package/src/workflow-engine.ts +7706 -0
- package/src/workspace-store.ts +544 -0
- package/src/candidate-preflight.ts +0 -1618
- package/src/drain.ts +0 -20
- package/src/patch.ts +0 -505
- package/src/result-store.ts +0 -312
- package/src/runtime.ts +0 -2436
- package/src/scheduler.ts +0 -384
- package/src/subagent-endpoint.ts +0 -158
- package/src/worker.ts +0 -204
package/src/file-snapshot.ts
CHANGED
|
@@ -30,6 +30,11 @@ function sha256(bytes: Buffer): string {
|
|
|
30
30
|
return createHash("sha256").update(bytes).digest("hex");
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
+
/** Hash bytes with the same identity used by file and workspace snapshots. */
|
|
34
|
+
export function snapshotContentHash(bytes: Uint8Array): string {
|
|
35
|
+
return createHash("sha256").update(bytes).digest("hex");
|
|
36
|
+
}
|
|
37
|
+
|
|
33
38
|
/** Snapshot one existing regular file under root. */
|
|
34
39
|
export function snapshotFile(root: string, relPath: string): FileBound | null {
|
|
35
40
|
if (observeSafePath(root, relPath).kind !== "file") return null;
|
package/src/implement-graph.ts
CHANGED
|
@@ -11,9 +11,12 @@ import {
|
|
|
11
11
|
verificationInputPaths,
|
|
12
12
|
} from "./contracts.ts";
|
|
13
13
|
import { isSafeRegularFile } from "./safe-path.ts";
|
|
14
|
-
import {
|
|
14
|
+
import {
|
|
15
|
+
type VerificationRunnerEnvironment,
|
|
16
|
+
validateVerificationAdapterCapability,
|
|
17
|
+
} from "./verification-capability.ts";
|
|
15
18
|
|
|
16
|
-
function canonicalJson(value: unknown): string {
|
|
19
|
+
export function canonicalJson(value: unknown): string {
|
|
17
20
|
if (Array.isArray(value)) {
|
|
18
21
|
return `[${value.map(canonicalJson).join(",")}]`;
|
|
19
22
|
}
|
|
@@ -28,7 +31,7 @@ function canonicalJson(value: unknown): string {
|
|
|
28
31
|
return JSON.stringify(value) ?? "null";
|
|
29
32
|
}
|
|
30
33
|
|
|
31
|
-
export function
|
|
34
|
+
export function hashCanonicalValue(value: unknown): string {
|
|
32
35
|
return createHash("sha256").update(canonicalJson(value)).digest("hex");
|
|
33
36
|
}
|
|
34
37
|
|
|
@@ -41,6 +44,7 @@ export interface ImplementExecutionFacts {
|
|
|
41
44
|
}>;
|
|
42
45
|
candidate?: { taskId: string; phase: ImplementationPhase };
|
|
43
46
|
dependencyOwner?: string;
|
|
47
|
+
verificationRunnerEnvironment?: VerificationRunnerEnvironment;
|
|
44
48
|
}
|
|
45
49
|
|
|
46
50
|
export interface ImplementPhaseReadiness {
|
|
@@ -358,7 +362,10 @@ export function assessImplementGraphReadiness(
|
|
|
358
362
|
const capability = validateVerificationAdapterCapability(
|
|
359
363
|
root,
|
|
360
364
|
boundary.verification,
|
|
361
|
-
{
|
|
365
|
+
{
|
|
366
|
+
dependencyOwner: facts.dependencyOwner ?? root,
|
|
367
|
+
runnerEnvironment: facts.verificationRunnerEnvironment,
|
|
368
|
+
},
|
|
362
369
|
);
|
|
363
370
|
if (!capability.ok) {
|
|
364
371
|
const { message: _message, ...diagnostic } = capability.diagnostic;
|