opencode-swarm 7.124.0 → 7.125.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/.opencode/skills/critic-gate/SKILL.md +8 -0
- package/.opencode/skills/swarm/SKILL.md +12 -8
- package/.opencode/skills/swarm-pr-feedback/SKILL.md +245 -171
- package/.opencode/skills/swarm-pr-feedback/references/bot-claim-verification.md +71 -0
- package/.opencode/skills/swarm-pr-feedback/references/operational-gotchas.md +49 -0
- package/.opencode/skills/swarm-pr-review/SKILL.md +238 -412
- package/.opencode/skills/swarm-pr-review/references/parser-dry-run.md +235 -0
- package/.opencode/skills/swarm-pr-review/references/prompt-templates.md +103 -0
- package/.opencode/skills/writing-tests/SKILL.md +4 -123
- package/.opencode/skills/writing-tests/references/mock-and-seam-inventory.md +43 -0
- package/README.md +3 -1
- package/dist/background/lane-output-store.d.ts +10 -0
- package/dist/background/pending-delegations.d.ts +3 -0
- package/dist/background/workspace-snapshot.d.ts +59 -0
- package/dist/cli/{config-doctor-53mnpeke.js → config-doctor-g3m2q646.js} +2 -2
- package/dist/cli/{curation-policy-ny033330.js → curation-policy-vgbx8530.js} +2 -2
- package/dist/cli/{curator-llm-factory-e0tjz8qq.js → curator-llm-factory-7pvqy94w.js} +15 -14
- package/dist/cli/{curator-nvn1pdq6.js → curator-xk4g1nx2.js} +15 -14
- package/dist/cli/{evidence-summary-service-9hq7n9k9.js → evidence-summary-service-v4h2w487.js} +1 -1
- package/dist/cli/{guardrail-explain-d3dd57nf.js → guardrail-explain-wfk16bpr.js} +16 -15
- package/dist/cli/{guardrail-log-3q2z9axs.js → guardrail-log-5zz9xx6z.js} +3 -3
- package/dist/cli/{hive-promoter-9gbpepgm.js → hive-promoter-njwc5rt0.js} +15 -14
- package/dist/cli/{pending-delegations-e3bcqj77.js → index-0cz1ws47.js} +4 -18
- package/dist/cli/{index-3yyr4ynk.js → index-3k8pg467.js} +1 -1
- package/dist/cli/{index-x2mmnrnx.js → index-83rwq7pb.js} +1 -1
- package/dist/cli/{index-c6crt5rs.js → index-8yvqkbw7.js} +12 -2
- package/dist/cli/{index-z0m4angq.js → index-93cq8t5b.js} +5 -5
- package/dist/cli/{index-8pz0ypxz.js → index-cz6fv84h.js} +17 -16
- package/dist/cli/{index-mkkx1a4f.js → index-dsf1yv4s.js} +1588 -891
- package/dist/cli/{index-4rzzzjtg.js → index-fs02c7tz.js} +277 -16
- package/dist/cli/{index-zjedv2bd.js → index-ghteqdy1.js} +2 -2
- package/dist/cli/{index-13d2g7k9.js → index-kvrk3h8p.js} +1 -1
- package/dist/cli/{index-eeg04r0x.js → index-kws8zn6y.js} +1 -1
- package/dist/cli/index-mg54y5gc.js +564 -0
- package/dist/cli/{index-qd77aft9.js → index-mhhmecsw.js} +2 -2
- package/dist/cli/{index-2x4maxte.js → index-mwdcvh0e.js} +4 -4
- package/dist/cli/{index-e19mxn9f.js → index-pbjenws7.js} +1 -1
- package/dist/cli/{index-wqwpzhv1.js → index-rpg8qqjs.js} +2 -2
- package/dist/cli/{index-tyg0zezw.js → index-tn3shyqj.js} +3 -3
- package/dist/cli/{index-htbjqftb.js → index-txragda9.js} +1 -1
- package/dist/cli/{index-v5ecczts.js → index-z4sc6yxc.js} +1 -1
- package/dist/cli/index.js +15 -14
- package/dist/cli/{knowledge-escalator-r1s01m3z.js → knowledge-escalator-jtyykzqc.js} +3 -3
- package/dist/cli/{knowledge-events-a9hmxvke.js → knowledge-events-qhr97sy9.js} +1 -1
- package/dist/cli/{knowledge-store-jt31br5k.js → knowledge-store-332x3pjv.js} +1 -1
- package/dist/cli/{knowledge-validator-9vrwxr3z.js → knowledge-validator-3t8tgzsz.js} +4 -4
- package/dist/cli/pending-delegations-7j8xqg5f.js +34 -0
- package/dist/cli/{scan-cursor-bkjtsawg.js → scan-cursor-q21c9k9q.js} +2 -2
- package/dist/cli/{schema-y3z416z7.js → schema-y2d7j2jk.js} +1 -1
- package/dist/cli/{skill-generator-794hyndw.js → skill-generator-3gkxx98d.js} +5 -5
- package/dist/cli/workspace-snapshot-c9pxxt9a.js +48 -0
- package/dist/commands/close.d.ts +4 -2
- package/dist/commands/registry.d.ts +1 -1
- package/dist/config/schema.d.ts +4 -0
- package/dist/evidence/documents-retention.d.ts +116 -0
- package/dist/evidence/manager.d.ts +17 -0
- package/dist/hooks/pr-workflow-gate.d.ts +211 -0
- package/dist/hooks/pr-workflow-response-gate.d.ts +23 -0
- package/dist/hooks/pr-workflow-session-resolver.d.ts +14 -0
- package/dist/index.js +563 -523
- package/dist/tools/complete-pr-workflow.d.ts +5 -0
- package/dist/tools/dispatch-lanes.d.ts +44 -0
- package/dist/tools/index.d.ts +2 -0
- package/dist/tools/manifest.d.ts +2 -0
- package/dist/tools/run-pr-feedback-stage-a.d.ts +69 -0
- package/dist/tools/tool-metadata.d.ts +8 -0
- package/dist/tools/write-pr-review-trigger-eval.d.ts +56 -46
- package/package.json +1 -1
- package/dist/cli/index-dqh3zhhc.js +0 -133
- package/dist/cli/workspace-snapshot-eyf6gd0d.js +0 -22
package/dist/cli/index.js
CHANGED
|
@@ -7,34 +7,34 @@ import {
|
|
|
7
7
|
getPluginLockFilePaths,
|
|
8
8
|
package_default,
|
|
9
9
|
resolveCommand
|
|
10
|
-
} from "./index-
|
|
11
|
-
import"./index-
|
|
12
|
-
import"./index-
|
|
13
|
-
import"./index-
|
|
10
|
+
} from "./index-dsf1yv4s.js";
|
|
11
|
+
import"./index-pbjenws7.js";
|
|
12
|
+
import"./index-z4sc6yxc.js";
|
|
13
|
+
import"./index-fs02c7tz.js";
|
|
14
14
|
import"./index-4905hd2m.js";
|
|
15
15
|
import"./index-134d35c1.js";
|
|
16
16
|
import"./index-6n2jpz7x.js";
|
|
17
|
-
import"./index-
|
|
18
|
-
import"./index-
|
|
19
|
-
import"./index-
|
|
17
|
+
import"./index-tn3shyqj.js";
|
|
18
|
+
import"./index-93cq8t5b.js";
|
|
19
|
+
import"./index-kws8zn6y.js";
|
|
20
20
|
import"./index-vxv732ex.js";
|
|
21
21
|
import"./index-c8s9a3zh.js";
|
|
22
22
|
import"./index-s9mj4rb9.js";
|
|
23
23
|
import"./index-23zsx7dm.js";
|
|
24
|
-
import"./index-
|
|
25
|
-
import"./index-
|
|
24
|
+
import"./index-ghteqdy1.js";
|
|
25
|
+
import"./index-kvrk3h8p.js";
|
|
26
26
|
import"./index-rtry5xyf.js";
|
|
27
|
-
import"./index-
|
|
28
|
-
import"./index-
|
|
27
|
+
import"./index-mwdcvh0e.js";
|
|
28
|
+
import"./index-83rwq7pb.js";
|
|
29
29
|
import"./index-ae75rja9.js";
|
|
30
30
|
import"./index-q27bajqb.js";
|
|
31
|
-
import"./index-
|
|
31
|
+
import"./index-3k8pg467.js";
|
|
32
32
|
import"./index-k5jrywpr.js";
|
|
33
33
|
import"./index-n832052r.js";
|
|
34
34
|
import {
|
|
35
35
|
DEFAULT_AGENT_CONFIGS,
|
|
36
36
|
init_constants
|
|
37
|
-
} from "./index-
|
|
37
|
+
} from "./index-8yvqkbw7.js";
|
|
38
38
|
import"./index-bk5tah7q.js";
|
|
39
39
|
import"./index-8fwhhayc.js";
|
|
40
40
|
import"./index-q1exe2b3.js";
|
|
@@ -43,11 +43,12 @@ import"./index-2tn5h2zp.js";
|
|
|
43
43
|
import"./index-1kz6da87.js";
|
|
44
44
|
import"./index-v2rdhwx8.js";
|
|
45
45
|
import"./index-gacm5s2n.js";
|
|
46
|
+
import"./index-0cz1ws47.js";
|
|
46
47
|
import"./index-2445sx3d.js";
|
|
47
48
|
import"./index-z6xqpmqg.js";
|
|
48
49
|
import"./index-zjygnfay.js";
|
|
49
50
|
import"./index-zgwm4ryv.js";
|
|
50
|
-
import"./index-
|
|
51
|
+
import"./index-mg54y5gc.js";
|
|
51
52
|
import"./index-3x761jqv.js";
|
|
52
53
|
import"./index-7mkpsw6g.js";
|
|
53
54
|
import"./index-fsrp8wp3.js";
|
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
maybeEscalateOnViolation,
|
|
9
9
|
maybeQuarantineOnContradiction,
|
|
10
10
|
readRecentEscalations
|
|
11
|
-
} from "./index-
|
|
12
|
-
import"./index-
|
|
13
|
-
import"./index-
|
|
11
|
+
} from "./index-93cq8t5b.js";
|
|
12
|
+
import"./index-mwdcvh0e.js";
|
|
13
|
+
import"./index-83rwq7pb.js";
|
|
14
14
|
import"./index-ae75rja9.js";
|
|
15
15
|
import"./index-q27bajqb.js";
|
|
16
16
|
import"./index-bk5tah7q.js";
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
resolveKnowledgeCounterBaselinePath,
|
|
27
27
|
resolveKnowledgeEventsPath,
|
|
28
28
|
resolveLegacyApplicationLogPath
|
|
29
|
-
} from "./index-
|
|
29
|
+
} from "./index-83rwq7pb.js";
|
|
30
30
|
import"./index-ae75rja9.js";
|
|
31
31
|
import"./index-q27bajqb.js";
|
|
32
32
|
import"./index-zgwm4ryv.js";
|
|
@@ -23,11 +23,11 @@ import {
|
|
|
23
23
|
validateLesson,
|
|
24
24
|
validateSkillCandidatePath,
|
|
25
25
|
validateSkillPath
|
|
26
|
-
} from "./index-
|
|
27
|
-
import"./index-
|
|
26
|
+
} from "./index-ghteqdy1.js";
|
|
27
|
+
import"./index-kvrk3h8p.js";
|
|
28
28
|
import"./index-rtry5xyf.js";
|
|
29
|
-
import"./index-
|
|
30
|
-
import"./index-
|
|
29
|
+
import"./index-mwdcvh0e.js";
|
|
30
|
+
import"./index-83rwq7pb.js";
|
|
31
31
|
import"./index-ae75rja9.js";
|
|
32
32
|
import"./index-q27bajqb.js";
|
|
33
33
|
import"./index-bk5tah7q.js";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
BACKGROUND_DELEGATIONS_FILE,
|
|
4
|
+
appendDelegationTransition,
|
|
5
|
+
buildPromptSnapshot,
|
|
6
|
+
findByBatchId,
|
|
7
|
+
findByCorrelationId,
|
|
8
|
+
findOpenAsyncLaneBatches,
|
|
9
|
+
readDelegations,
|
|
10
|
+
recordPendingDelegation,
|
|
11
|
+
sweepStaleDelegations
|
|
12
|
+
} from "./index-0cz1ws47.js";
|
|
13
|
+
import"./index-2445sx3d.js";
|
|
14
|
+
import"./index-z6xqpmqg.js";
|
|
15
|
+
import"./index-zjygnfay.js";
|
|
16
|
+
import"./index-zgwm4ryv.js";
|
|
17
|
+
import"./index-fsrp8wp3.js";
|
|
18
|
+
import"./index-76kvm9z5.js";
|
|
19
|
+
import"./index-q2rrv0cy.js";
|
|
20
|
+
import"./index-bpmtbmy9.js";
|
|
21
|
+
import"./index-7g4c7s5r.js";
|
|
22
|
+
import"./index-qe3v54nb.js";
|
|
23
|
+
import"./index-a76rekgs.js";
|
|
24
|
+
export {
|
|
25
|
+
sweepStaleDelegations,
|
|
26
|
+
recordPendingDelegation,
|
|
27
|
+
readDelegations,
|
|
28
|
+
findOpenAsyncLaneBatches,
|
|
29
|
+
findByCorrelationId,
|
|
30
|
+
findByBatchId,
|
|
31
|
+
buildPromptSnapshot,
|
|
32
|
+
appendDelegationTransition,
|
|
33
|
+
BACKGROUND_DELEGATIONS_FILE
|
|
34
|
+
};
|
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
alreadyCuratedThisGeneration,
|
|
5
5
|
claimNextScanBatch,
|
|
6
6
|
getScanStatus
|
|
7
|
-
} from "./index-
|
|
8
|
-
import"./index-
|
|
7
|
+
} from "./index-kws8zn6y.js";
|
|
8
|
+
import"./index-mwdcvh0e.js";
|
|
9
9
|
import"./index-ae75rja9.js";
|
|
10
10
|
import"./index-q27bajqb.js";
|
|
11
11
|
import"./index-bk5tah7q.js";
|
|
@@ -33,12 +33,12 @@ import {
|
|
|
33
33
|
sanitizeSlug,
|
|
34
34
|
selectCandidateEntries,
|
|
35
35
|
writeEvalStub
|
|
36
|
-
} from "./index-
|
|
37
|
-
import"./index-
|
|
38
|
-
import"./index-
|
|
36
|
+
} from "./index-tn3shyqj.js";
|
|
37
|
+
import"./index-ghteqdy1.js";
|
|
38
|
+
import"./index-kvrk3h8p.js";
|
|
39
39
|
import"./index-rtry5xyf.js";
|
|
40
|
-
import"./index-
|
|
41
|
-
import"./index-
|
|
40
|
+
import"./index-mwdcvh0e.js";
|
|
41
|
+
import"./index-83rwq7pb.js";
|
|
42
42
|
import"./index-ae75rja9.js";
|
|
43
43
|
import"./index-q27bajqb.js";
|
|
44
44
|
import"./index-bk5tah7q.js";
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
_internals,
|
|
4
|
+
captureWorkspaceSnapshot,
|
|
5
|
+
changedFilesSinceSnapshot,
|
|
6
|
+
compareWorkspaceSnapshot,
|
|
7
|
+
compareWorkspaceSnapshots,
|
|
8
|
+
digest,
|
|
9
|
+
parsePorcelainPaths,
|
|
10
|
+
readGitTextAtRevision,
|
|
11
|
+
resolveCommitCountSince,
|
|
12
|
+
resolveCurrentGitHead,
|
|
13
|
+
resolveCurrentUpstreamPushTarget,
|
|
14
|
+
resolveCurrentUpstreamRemoteRef,
|
|
15
|
+
resolveExactMergeBase,
|
|
16
|
+
resolveExactRemoteBranchHead,
|
|
17
|
+
resolveGitControlStateDigest,
|
|
18
|
+
resolveIsExactSingleChildCommit,
|
|
19
|
+
resolveIsWorkingTreeClean,
|
|
20
|
+
resolvePrWorkflowRevisionDigest,
|
|
21
|
+
resolvePrWorkflowRevisionDigestAsync,
|
|
22
|
+
resolveRemoteRefsContainingHead,
|
|
23
|
+
workspaceSnapshotMatches
|
|
24
|
+
} from "./index-mg54y5gc.js";
|
|
25
|
+
import"./index-a76rekgs.js";
|
|
26
|
+
export {
|
|
27
|
+
workspaceSnapshotMatches,
|
|
28
|
+
resolveRemoteRefsContainingHead,
|
|
29
|
+
resolvePrWorkflowRevisionDigestAsync,
|
|
30
|
+
resolvePrWorkflowRevisionDigest,
|
|
31
|
+
resolveIsWorkingTreeClean,
|
|
32
|
+
resolveIsExactSingleChildCommit,
|
|
33
|
+
resolveGitControlStateDigest,
|
|
34
|
+
resolveExactRemoteBranchHead,
|
|
35
|
+
resolveExactMergeBase,
|
|
36
|
+
resolveCurrentUpstreamRemoteRef,
|
|
37
|
+
resolveCurrentUpstreamPushTarget,
|
|
38
|
+
resolveCurrentGitHead,
|
|
39
|
+
resolveCommitCountSince,
|
|
40
|
+
readGitTextAtRevision,
|
|
41
|
+
parsePorcelainPaths,
|
|
42
|
+
digest,
|
|
43
|
+
compareWorkspaceSnapshots,
|
|
44
|
+
compareWorkspaceSnapshot,
|
|
45
|
+
changedFilesSinceSnapshot,
|
|
46
|
+
captureWorkspaceSnapshot,
|
|
47
|
+
_internals
|
|
48
|
+
};
|
package/dist/commands/close.d.ts
CHANGED
|
@@ -134,8 +134,10 @@ export declare function runFinalizeStage(ctx: CloseStageContext): Promise<void>;
|
|
|
134
134
|
export declare function runArchiveStage(ctx: CloseStageContext): Promise<void>;
|
|
135
135
|
/**
|
|
136
136
|
* Runs the evidence-retention sub-logic of STAGE 2 (ARCHIVE).
|
|
137
|
-
* Reads max_age_days / max_bundles
|
|
138
|
-
*
|
|
137
|
+
* Reads max_age_days / max_bundles / cache_max_bytes / cache_max_records from
|
|
138
|
+
* config.evidence (FR-016, issue #1184) and calls archiveEvidence. The report
|
|
139
|
+
* overload is used so the documents-cache prune runs when cache caps are set.
|
|
140
|
+
* Fail-open: pushes a warning on error but never throws.
|
|
139
141
|
*/
|
|
140
142
|
export declare function runArchiveEvidenceRetention(ctx: ArchiveStageContext): Promise<void>;
|
|
141
143
|
/**
|
|
@@ -517,7 +517,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
517
517
|
readonly handler: (ctx: CommandContext) => CommandResult;
|
|
518
518
|
readonly description: "Launch deep PR review with multi-lane analysis [url] [--council]";
|
|
519
519
|
readonly args: "<pr-url|owner/repo#N|N> [--council]";
|
|
520
|
-
readonly details: "Launches a structured PR review: reconstructs PR intent via obligation extraction cascade, launches all 6 fixed base explorer lanes through dispatch_lanes_async while the architect keeps doing non-dependent work, polls collect_lane_results incrementally, runs
|
|
520
|
+
readonly details: "Launches a structured PR review: reconstructs PR intent via obligation extraction cascade, launches all 6 fixed base explorer lanes through dispatch_lanes_async while the architect keeps doing non-dependent work, polls collect_lane_results incrementally, runs all 11 mandatory repository-agnostic micro-lanes without applicability waivers, validates findings through independent reviewer confirmation, applies critic challenge to HIGH/CRITICAL findings, then synthesizes only after coverage is closed. Failed obligations retry through the same structured async mode and exact PR head; blocking or direct-Task dispatch is not provenance-equivalent, so unclosed coverage leaves the review BLOCKED rather than degraded. --council variant fires adversarial multi-model review. Supports full GitHub URL, owner/repo#N shorthand, or bare PR number (resolves against origin remote).";
|
|
521
521
|
readonly category: "agent";
|
|
522
522
|
readonly toolPolicy: "none";
|
|
523
523
|
};
|
package/dist/config/schema.d.ts
CHANGED
|
@@ -262,6 +262,8 @@ export declare const EvidenceConfigSchema: z.ZodObject<{
|
|
|
262
262
|
max_age_days: z.ZodDefault<z.ZodNumber>;
|
|
263
263
|
max_bundles: z.ZodDefault<z.ZodNumber>;
|
|
264
264
|
auto_archive: z.ZodDefault<z.ZodBoolean>;
|
|
265
|
+
cache_max_bytes: z.ZodOptional<z.ZodNumber>;
|
|
266
|
+
cache_max_records: z.ZodOptional<z.ZodNumber>;
|
|
265
267
|
}, z.core.$strip>;
|
|
266
268
|
export type EvidenceConfig = z.infer<typeof EvidenceConfigSchema>;
|
|
267
269
|
export declare const GateFeatureSchema: z.ZodObject<{
|
|
@@ -1805,6 +1807,8 @@ export declare const PluginConfigSchema: z.ZodObject<{
|
|
|
1805
1807
|
max_age_days: z.ZodDefault<z.ZodNumber>;
|
|
1806
1808
|
max_bundles: z.ZodDefault<z.ZodNumber>;
|
|
1807
1809
|
auto_archive: z.ZodDefault<z.ZodBoolean>;
|
|
1810
|
+
cache_max_bytes: z.ZodOptional<z.ZodNumber>;
|
|
1811
|
+
cache_max_records: z.ZodOptional<z.ZodNumber>;
|
|
1808
1812
|
}, z.core.$strip>>;
|
|
1809
1813
|
summaries: z.ZodOptional<z.ZodObject<{
|
|
1810
1814
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Retention for the web_search / web_fetch documents cache at
|
|
3
|
+
* `.swarm/evidence-cache/documents.jsonl`.
|
|
4
|
+
*
|
|
5
|
+
* Background (issue #1184): `writeEvidenceDocuments` in `./documents.ts` is
|
|
6
|
+
* purely append-only. Without this module the cache grows without bound.
|
|
7
|
+
* This module provides a bounded, project-root-contained, atomic-rewrite
|
|
8
|
+
* prune that is invoked only via `/swarm archive` and `/swarm finalize`
|
|
9
|
+
* (never on the plugin init path — AGENTS.md invariant #1).
|
|
10
|
+
*
|
|
11
|
+
* Design contract (mirrors `archiveEvaluationArtifacts` in
|
|
12
|
+
* `../evaluation/retention.ts` where applicable):
|
|
13
|
+
* - Optional byte cap and optional record-count cap. When both are unset the
|
|
14
|
+
* prune is a no-op (current append-only behavior preserved exactly).
|
|
15
|
+
* - Corrupt rows (failed `JSON.parse`) are dropped from the rewrite and
|
|
16
|
+
* reported via `corrupt` count. They are NOT relocated to a sidecar —
|
|
17
|
+
* matches the "report, don't relocate" precedent in
|
|
18
|
+
* `archiveEvaluationArtifacts` (retention.ts:246-254), while still
|
|
19
|
+
* preserving the bounded-growth contract (a corrupt row otherwise counts
|
|
20
|
+
* toward caps forever).
|
|
21
|
+
* - Atomic rewrite via temp file + fsync + rename. NOT under
|
|
22
|
+
* `withEvidenceLock`: web_search/web_fetch are hot paths and forcing a
|
|
23
|
+
* lockfile round-trip on every capture is an unjustified latency tax
|
|
24
|
+
* (issue-tracer critic item #2). The append-vs-rewrite race is a known,
|
|
25
|
+
* accepted data-loss window: a concurrent `appendFile` whose write is in
|
|
26
|
+
* flight when the prune renames the temp over the target will, on POSIX,
|
|
27
|
+
* complete against the now-unlinked old inode (the appended row is
|
|
28
|
+
* silently lost from the cache). This is accepted because refs are
|
|
29
|
+
* content-addressed (`evd_<sha256[:16]>`) so a lost row's ref
|
|
30
|
+
* re-materializes on the next capture of the same content, and because
|
|
31
|
+
* the prune runs only via explicit `/swarm archive` / `/swarm finalize`,
|
|
32
|
+
* not on every write.
|
|
33
|
+
* - Read is streamed line-by-line via `node:readline` with a hard 100 MiB
|
|
34
|
+
* cap. On cap breach the prune aborts, writes nothing, and leaves the
|
|
35
|
+
* file byte-identical.
|
|
36
|
+
* - Windows-safe rename: `EPERM`/`EBUSY`/`ENOTEMPTY`/`EACCES` are retried
|
|
37
|
+
* with bounded backoff (5× / 10ms). On final failure the temp file is
|
|
38
|
+
* removed and the original is left untouched (fail-safe).
|
|
39
|
+
*
|
|
40
|
+
* Memory tradeoff (L6-002): valid rows are parsed into a `ParsedRow[]` and
|
|
41
|
+
* retained in memory (raw string + parsed object per row) before selection.
|
|
42
|
+
* The 100 MiB read cap bounds input bytes, but the in-process heap footprint
|
|
43
|
+
* is higher (V8 string + object overhead). This is an accepted tradeoff: the
|
|
44
|
+
* prune runs once per explicit `/swarm archive` / `/swarm finalize` (never on
|
|
45
|
+
* a hot path), the input is bounded, and a streaming rewrite would be a
|
|
46
|
+
* materially larger refactor. If the cache ever needs to scale beyond the
|
|
47
|
+
* current cap, switch `readCacheRows` + `selectSurvivors` to a streaming
|
|
48
|
+
* selection (single pass, write survivors directly to the temp file).
|
|
49
|
+
*/
|
|
50
|
+
import * as fs from 'node:fs';
|
|
51
|
+
export interface DocumentsRetentionResult {
|
|
52
|
+
/** Total valid (parseable) rows read before pruning. Excludes corrupt rows. */
|
|
53
|
+
inventory: number;
|
|
54
|
+
/** Rows marked for deletion by the policy (same as `inventory - surviving`). */
|
|
55
|
+
selected: number;
|
|
56
|
+
/** Rows actually removed from the file. Always 0 when `dryRun` or `aborted`. */
|
|
57
|
+
archived: number;
|
|
58
|
+
/** Unparseable rows dropped from the rewrite (count only; not preserved). */
|
|
59
|
+
corrupt: number;
|
|
60
|
+
/** File size in bytes before the prune (0 if the file did not exist). */
|
|
61
|
+
bytesBefore: number;
|
|
62
|
+
/** File size in bytes after the prune. Equal to `bytesBefore` on no-op. */
|
|
63
|
+
bytesAfter: number;
|
|
64
|
+
/** True when the prune produced no file mutation. */
|
|
65
|
+
dryRun: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* True when the read cap (`MAX_READ_BYTES`) was exceeded. On abort the file
|
|
68
|
+
* is left byte-identical — no temp file, no rewrite, no sidecar.
|
|
69
|
+
*/
|
|
70
|
+
aborted: boolean;
|
|
71
|
+
}
|
|
72
|
+
export interface PruneEvidenceDocumentsArgs {
|
|
73
|
+
directory: string;
|
|
74
|
+
/** Optional byte cap. When omitted, no byte-based pruning. */
|
|
75
|
+
maxBytes?: number;
|
|
76
|
+
/** Optional record-count cap. When omitted, no count-based pruning. */
|
|
77
|
+
maxRecords?: number;
|
|
78
|
+
/** When true, compute the plan but write nothing. */
|
|
79
|
+
dryRun?: boolean;
|
|
80
|
+
}
|
|
81
|
+
/** Internal DI seam (AGENTS.md invariant #7 — preferred over mock.module). */
|
|
82
|
+
export declare const _internals: {
|
|
83
|
+
stat: (path: string) => Promise<fs.Stats>;
|
|
84
|
+
createReadStream: (path: string, options: {
|
|
85
|
+
encoding: BufferEncoding;
|
|
86
|
+
highWaterMark: number;
|
|
87
|
+
}) => fs.ReadStream;
|
|
88
|
+
openSync: (path: string, flags: fs.OpenMode) => number;
|
|
89
|
+
writeSync: (fd: number, data: string, position?: number | null) => number;
|
|
90
|
+
fsyncSync: (fd: number) => void;
|
|
91
|
+
closeSync: (fd: number) => void;
|
|
92
|
+
renameWithRetry: (src: string, dst: string) => Promise<void>;
|
|
93
|
+
unlink: (path: string) => Promise<void>;
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* Atomic rename with bounded retry for Windows.
|
|
97
|
+
*
|
|
98
|
+
* On Windows, `fs.rename` over an existing file can fail with `EPERM` when
|
|
99
|
+
* another handle (e.g. a concurrent `appendFile` from web_search) holds the
|
|
100
|
+
* target. We retry the rename a bounded number of times with a short backoff
|
|
101
|
+
* (the `readSwarmFileAsync` precedent in `hooks/utils.ts:263` uses the same
|
|
102
|
+
* 5× / 10ms shape for the macOS rename-visibility race). On final failure we
|
|
103
|
+
* rethrow — the caller is responsible for cleaning up the temp file.
|
|
104
|
+
*
|
|
105
|
+
* The optional `renameFn` is a test seam (defaults to `fsp.rename`) so the
|
|
106
|
+
* retry loop can be exercised deterministically on non-Windows hosts.
|
|
107
|
+
*/
|
|
108
|
+
export declare function atomicRenameWithRetry(src: string, dst: string, renameFn?: (s: string, d: string) => Promise<void>): Promise<void>;
|
|
109
|
+
/**
|
|
110
|
+
* Apply the configured byte/count retention policy to the documents cache.
|
|
111
|
+
*
|
|
112
|
+
* Safe to call on a missing file (returns an idempotent zeroed result) and
|
|
113
|
+
* safe to call with both caps unset (no-op). Never throws for routine cases;
|
|
114
|
+
* surfaces unexpected I/O errors to the caller (archive command fails open).
|
|
115
|
+
*/
|
|
116
|
+
export declare function pruneEvidenceDocuments(args: PruneEvidenceDocumentsArgs): Promise<DocumentsRetentionResult>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type BuildEvidence, type Evidence, type EvidenceBundle, type PlaceholderEvidence, type QualityBudgetEvidence, type SastEvidence, type SbomEvidence, type SecretscanEvidence, type SyntaxEvidence } from '../config/evidence-schema';
|
|
2
2
|
import { type EvaluationRetentionResult } from '../evaluation/retention.js';
|
|
3
|
+
import { type DocumentsRetentionResult, pruneEvidenceDocuments } from './documents-retention.js';
|
|
3
4
|
/**
|
|
4
5
|
* Discriminated union returned by loadEvidence.
|
|
5
6
|
* - 'found': file exists and passed Zod schema validation
|
|
@@ -101,11 +102,26 @@ export type EvidenceArchiveReport = {
|
|
|
101
102
|
archivedEvidence: string[];
|
|
102
103
|
failedEvidence: string[];
|
|
103
104
|
evaluation: EvaluationRetentionResult;
|
|
105
|
+
/**
|
|
106
|
+
* Documents-cache retention result (issue #1184). Always present in the
|
|
107
|
+
* report shape — a zeroed result ({ inventory: 0, selected: 0, ... })
|
|
108
|
+
* indicates the cache was not pruned (no caps configured, file missing,
|
|
109
|
+
* or prune disabled).
|
|
110
|
+
*/
|
|
111
|
+
documentsCache: DocumentsRetentionResult;
|
|
104
112
|
};
|
|
105
113
|
export type EvidenceArchiveReportOptions = {
|
|
106
114
|
report: true;
|
|
107
115
|
dryRun?: boolean;
|
|
108
116
|
now?: Date;
|
|
117
|
+
/**
|
|
118
|
+
* Optional documents-cache retention caps (issue #1184). When either is a
|
|
119
|
+
* positive number, `archiveEvidence` also prunes
|
|
120
|
+
* `.swarm/evidence-cache/documents.jsonl` after the bundle/evaluation
|
|
121
|
+
* sweep. When both are unset, the cache is left untouched (append-only).
|
|
122
|
+
*/
|
|
123
|
+
cacheMaxBytes?: number;
|
|
124
|
+
cacheMaxRecords?: number;
|
|
109
125
|
};
|
|
110
126
|
export declare function archiveEvidence(directory: string, maxAgeDays: number, maxBundles?: number): Promise<string[]>;
|
|
111
127
|
export declare function archiveEvidence(directory: string, maxAgeDays: number, maxBundles: number | undefined, options: EvidenceArchiveReportOptions): Promise<EvidenceArchiveReport>;
|
|
@@ -125,6 +141,7 @@ export declare const _internals: {
|
|
|
125
141
|
validateEvidence: typeof validateEvidence;
|
|
126
142
|
saveEvidence: typeof saveEvidence;
|
|
127
143
|
deleteEvidence: typeof deleteEvidence;
|
|
144
|
+
pruneEvidenceDocuments: typeof pruneEvidenceDocuments;
|
|
128
145
|
now: () => Date;
|
|
129
146
|
};
|
|
130
147
|
export {};
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import { resolveCommitCountSince, resolveCurrentGitHead, resolveCurrentUpstreamPushTarget, resolveCurrentUpstreamRemoteRef, resolveExactRemoteBranchHead, resolveIsExactSingleChildCommit, resolveIsWorkingTreeClean, resolvePrWorkflowRevisionDigest, resolveRemoteRefsContainingHead } from '../background/workspace-snapshot.js';
|
|
2
|
+
export declare const PR_REVIEW_BASE_DIMENSION_IDS: readonly ["intent-architecture", "correctness-state", "tests-falsifiability", "security-trust", "reliability-performance", "compatibility-delivery"];
|
|
3
|
+
export declare const PR_REVIEW_REQUIRED_MICRO_LANE_IDS: readonly ["auth-identity-secrets", "untrusted-input-boundaries", "subprocess-platform", "concurrency-state", "dependencies-build-release", "api-schema-migrations", "test-infrastructure", "ui-accessibility-i18n", "privacy-observability", "generated-provenance", "unclassified-risk"];
|
|
4
|
+
export type PrReviewBaseDimensionId = (typeof PR_REVIEW_BASE_DIMENSION_IDS)[number];
|
|
5
|
+
export type PrWorkflowMode = 'PR_REVIEW' | 'PR_FEEDBACK';
|
|
6
|
+
export interface PrWorkflowLaneSpec {
|
|
7
|
+
laneId?: string;
|
|
8
|
+
workflowLane?: string;
|
|
9
|
+
reviewItemIds?: string[];
|
|
10
|
+
}
|
|
11
|
+
export interface PrFeedbackLaneOwnership {
|
|
12
|
+
laneId: string;
|
|
13
|
+
ownedItemIds: string[];
|
|
14
|
+
}
|
|
15
|
+
interface PrReviewBaseDispatchRecord {
|
|
16
|
+
batchId: string;
|
|
17
|
+
lanes: Array<{
|
|
18
|
+
laneId: string;
|
|
19
|
+
workflowLane: PrReviewBaseDimensionId;
|
|
20
|
+
}>;
|
|
21
|
+
validatedAt: string;
|
|
22
|
+
}
|
|
23
|
+
interface PrFeedbackVerificationRecord {
|
|
24
|
+
batchId: string;
|
|
25
|
+
ownership: PrFeedbackLaneOwnership[];
|
|
26
|
+
validatedAt: string;
|
|
27
|
+
}
|
|
28
|
+
export type PrFeedbackGatePhase = 'stage-b-reviewer' | 'stage-b-test' | 'closeout-reviewer' | 'closeout-critic';
|
|
29
|
+
export type PrFeedbackStageACategory = 'build' | 'typecheck' | 'lint' | 'diff-check' | 'reproduction';
|
|
30
|
+
export interface PrFeedbackStageACheckReceipt {
|
|
31
|
+
category: PrFeedbackStageACategory;
|
|
32
|
+
workingDirectory?: string;
|
|
33
|
+
obligationId?: string;
|
|
34
|
+
validatorContract?: {
|
|
35
|
+
path: string;
|
|
36
|
+
id: string;
|
|
37
|
+
};
|
|
38
|
+
command: string[];
|
|
39
|
+
targets?: string[];
|
|
40
|
+
feedbackTargets?: Array<{
|
|
41
|
+
feedbackItemId: string;
|
|
42
|
+
target: string;
|
|
43
|
+
expectedBehavior: string;
|
|
44
|
+
}>;
|
|
45
|
+
durationMs: number;
|
|
46
|
+
}
|
|
47
|
+
interface PrFeedbackStageARecord {
|
|
48
|
+
revisionDigest: string;
|
|
49
|
+
checks: PrFeedbackStageACheckReceipt[];
|
|
50
|
+
feedbackItemIds?: string[];
|
|
51
|
+
applicableCategories?: Array<'build' | 'typecheck' | 'lint'>;
|
|
52
|
+
applicableObligations?: Array<{
|
|
53
|
+
id: string;
|
|
54
|
+
category: 'build' | 'typecheck' | 'lint';
|
|
55
|
+
workingDirectory: string;
|
|
56
|
+
source: string;
|
|
57
|
+
validatorContract?: {
|
|
58
|
+
path: string;
|
|
59
|
+
id: string;
|
|
60
|
+
};
|
|
61
|
+
}>;
|
|
62
|
+
validatedAt: string;
|
|
63
|
+
}
|
|
64
|
+
interface PrFeedbackGateBatchRecord {
|
|
65
|
+
batchId: string;
|
|
66
|
+
phase: PrFeedbackGatePhase;
|
|
67
|
+
laneId: string;
|
|
68
|
+
itemIds: string[];
|
|
69
|
+
revisionDigest: string;
|
|
70
|
+
validatedAt: string;
|
|
71
|
+
}
|
|
72
|
+
interface PrFeedbackReadyToPublishRecord {
|
|
73
|
+
revisionDigest: string;
|
|
74
|
+
localHead: string;
|
|
75
|
+
remoteName: string;
|
|
76
|
+
remoteBranchRef: string;
|
|
77
|
+
remoteRef: string;
|
|
78
|
+
validatedAt: string;
|
|
79
|
+
}
|
|
80
|
+
export type PrWorkflowCompletionStatus = 'completed' | 'ready-to-publish';
|
|
81
|
+
export type PrReviewValidationPhase = 'council' | 'reviewer' | 'critic';
|
|
82
|
+
interface PrReviewValidationBatchRecord {
|
|
83
|
+
batchId: string;
|
|
84
|
+
phase: PrReviewValidationPhase;
|
|
85
|
+
lanes: Array<{
|
|
86
|
+
laneId: string;
|
|
87
|
+
workflowLane: string;
|
|
88
|
+
reviewItemIds?: string[];
|
|
89
|
+
}>;
|
|
90
|
+
validatedAt: string;
|
|
91
|
+
}
|
|
92
|
+
export interface PrWorkflowGateState {
|
|
93
|
+
schemaVersion: 1;
|
|
94
|
+
/** Monotonic durable revision used to reject stale same-session transitions. */
|
|
95
|
+
revision: number;
|
|
96
|
+
sessionID: string;
|
|
97
|
+
mode: PrWorkflowMode;
|
|
98
|
+
activatedAt: string;
|
|
99
|
+
updatedAt: string;
|
|
100
|
+
prHeadSha?: string;
|
|
101
|
+
prReviewBaseRef?: string;
|
|
102
|
+
prReviewBaseSha?: string;
|
|
103
|
+
prReviewBaseDispatches?: PrReviewBaseDispatchRecord[];
|
|
104
|
+
/** @deprecated Compatibility projection of the most recent base dispatch. */
|
|
105
|
+
prReviewBaseDispatch?: PrReviewBaseDispatchRecord;
|
|
106
|
+
prReviewTriggerEvalPath?: string;
|
|
107
|
+
prReviewValidationBatches?: PrReviewValidationBatchRecord[];
|
|
108
|
+
prFeedbackInventory?: string[];
|
|
109
|
+
prFeedbackVerifications?: PrFeedbackVerificationRecord[];
|
|
110
|
+
/** @deprecated Compatibility projection of the most recent verification dispatch. */
|
|
111
|
+
prFeedbackVerification?: PrFeedbackVerificationRecord;
|
|
112
|
+
prFeedbackStageA?: PrFeedbackStageARecord;
|
|
113
|
+
prFeedbackGateBatches?: PrFeedbackGateBatchRecord[];
|
|
114
|
+
prFeedbackReadyToPublish?: PrFeedbackReadyToPublishRecord;
|
|
115
|
+
}
|
|
116
|
+
export declare function activatePrWorkflow(directory: string, sessionID: string, mode: PrWorkflowMode, options?: {
|
|
117
|
+
prHeadSha?: string;
|
|
118
|
+
}): Promise<PrWorkflowGateState>;
|
|
119
|
+
export declare function readPrWorkflowGateState(directory: string, sessionID: string): Promise<PrWorkflowGateState | null>;
|
|
120
|
+
export declare function clearPrWorkflowGateState(directory: string, sessionID: string, expectedRevision?: number): Promise<void>;
|
|
121
|
+
/** Bind an active PR workflow to one immutable PR head. */
|
|
122
|
+
export declare function bindPrWorkflowHead(directory: string, sessionID: string, prHeadSha: string): Promise<PrWorkflowGateState>;
|
|
123
|
+
/** Bind an active PR_REVIEW workflow to one immutable merge-base scope. */
|
|
124
|
+
export declare function bindPrReviewBase(directory: string, sessionID: string, options: {
|
|
125
|
+
prHeadSha: string;
|
|
126
|
+
baseRef: string;
|
|
127
|
+
baseSha: string;
|
|
128
|
+
}): Promise<PrWorkflowGateState>;
|
|
129
|
+
/** Prove that caller-provided PR identity equals the actual checked-out commit. */
|
|
130
|
+
export declare function assertCurrentCheckoutHead(directory: string, expectedHead: string): string;
|
|
131
|
+
/** Prove that every PR-review lane reads the immutable checked-out PR tree. */
|
|
132
|
+
export declare function assertPrReviewCleanCheckout(directory: string): void;
|
|
133
|
+
export declare function enforcePrWorkflowDispatchLanesAsync(directory: string, sessionID: string, toolName: string): Promise<PrWorkflowGateState | null>;
|
|
134
|
+
export declare function enforcePrReviewBaseDimensions(directory: string, sessionID: string, lanes: readonly PrWorkflowLaneSpec[], options: {
|
|
135
|
+
batchId: string;
|
|
136
|
+
prHeadSha: string;
|
|
137
|
+
}): Promise<PrWorkflowGateState>;
|
|
138
|
+
/** Validate durable exact-six PR review evidence across all base and retry batches. */
|
|
139
|
+
export declare function assertPrReviewBaseCoverageSettled(directory: string, sessionID: string): Promise<PrWorkflowGateState>;
|
|
140
|
+
/** Persist a council/reviewer/critic validation batch before launch. */
|
|
141
|
+
export declare function recordPrReviewValidationBatch(directory: string, sessionID: string, phase: PrReviewValidationPhase, lanes: readonly PrWorkflowLaneSpec[], options: {
|
|
142
|
+
batchId: string;
|
|
143
|
+
prHeadSha: string;
|
|
144
|
+
}): Promise<PrWorkflowGateState>;
|
|
145
|
+
/** Validate that every declared council/reviewer/critic obligation has a successful retry. */
|
|
146
|
+
export declare function assertPrReviewValidationSettled(directory: string, sessionID: string, phase?: PrReviewValidationPhase): Promise<PrWorkflowGateState>;
|
|
147
|
+
export declare function declarePrFeedbackInventory(directory: string, sessionID: string, inventoryIds: readonly string[], options: {
|
|
148
|
+
prHeadSha: string;
|
|
149
|
+
}): Promise<PrWorkflowGateState>;
|
|
150
|
+
export declare function enforcePrFeedbackVerificationOwnership(directory: string, sessionID: string, ownership: readonly PrFeedbackLaneOwnership[], options: {
|
|
151
|
+
batchId: string;
|
|
152
|
+
prHeadSha: string;
|
|
153
|
+
}): Promise<PrWorkflowGateState>;
|
|
154
|
+
/** Validate cumulative exact inventory ownership and settled verification artifacts. */
|
|
155
|
+
export declare function assertPrFeedbackVerificationSettled(directory: string, sessionID: string): Promise<PrWorkflowGateState>;
|
|
156
|
+
/** Persist an actually executed Stage A receipt and invalidate later approvals. */
|
|
157
|
+
export declare function recordPrFeedbackStageA(directory: string, sessionID: string, revisionDigest: string, checks: readonly PrFeedbackStageACheckReceipt[], options?: {
|
|
158
|
+
applicableCategories?: ReadonlyArray<'build' | 'typecheck' | 'lint'>;
|
|
159
|
+
applicableObligations?: ReadonlyArray<{
|
|
160
|
+
id: string;
|
|
161
|
+
category: 'build' | 'typecheck' | 'lint';
|
|
162
|
+
workingDirectory: string;
|
|
163
|
+
source: string;
|
|
164
|
+
validatorContract?: {
|
|
165
|
+
path: string;
|
|
166
|
+
id: string;
|
|
167
|
+
};
|
|
168
|
+
}>;
|
|
169
|
+
}): Promise<PrWorkflowGateState>;
|
|
170
|
+
/** Record one ordered, single-lane feedback validation phase before launch. */
|
|
171
|
+
export declare function recordPrFeedbackGateBatch(directory: string, sessionID: string, phase: PrFeedbackGatePhase, lane: PrFeedbackLaneOwnership, options: {
|
|
172
|
+
batchId: string;
|
|
173
|
+
prHeadSha: string;
|
|
174
|
+
revisionDigest: string;
|
|
175
|
+
}): Promise<PrWorkflowGateState>;
|
|
176
|
+
/** Require the latest receipt for a feedback gate phase to be positive and fresh. */
|
|
177
|
+
export declare function assertPrFeedbackGatePhaseSettled(directory: string, sessionID: string, phase: PrFeedbackGatePhase): Promise<PrWorkflowGateState>;
|
|
178
|
+
/** Require every ordered feedback gate on one unchanged revision. */
|
|
179
|
+
export declare function assertPrFeedbackReadyToPublish(directory: string, sessionID: string): Promise<PrWorkflowGateState>;
|
|
180
|
+
export declare function markPrReviewTriggerEvaluationComplete(directory: string, sessionID: string, artifactPath: string): Promise<PrWorkflowGateState>;
|
|
181
|
+
export declare function enforcePrWorkflowToolBefore(directory: string, sessionID: string, toolName: string, args: Record<string, unknown> | undefined, generatedAgentNames?: readonly string[]): Promise<void>;
|
|
182
|
+
/** Validate the terminal PR workflow contract before removing its durable gate. */
|
|
183
|
+
export declare function completePrWorkflow(directory: string, sessionID: string, expectedMode: PrWorkflowMode, prHeadSha: string): Promise<PrWorkflowCompletionStatus>;
|
|
184
|
+
export declare const _test_exports: {
|
|
185
|
+
workflowGateStateRelativePath: typeof workflowGateStateRelativePath;
|
|
186
|
+
workflowGateStateLockRelativePath: typeof workflowGateStateLockRelativePath;
|
|
187
|
+
resetTrackedStateCache: () => void;
|
|
188
|
+
beforeTerminalClear: (() => Promise<void>) | undefined;
|
|
189
|
+
resolveCurrentGitHead: typeof resolveCurrentGitHead;
|
|
190
|
+
resolveCurrentUpstreamPushTarget: typeof resolveCurrentUpstreamPushTarget;
|
|
191
|
+
resolveCurrentUpstreamRemoteRef: typeof resolveCurrentUpstreamRemoteRef;
|
|
192
|
+
resolveExactRemoteBranchHead: typeof resolveExactRemoteBranchHead;
|
|
193
|
+
resolveCommitCountSince: typeof resolveCommitCountSince;
|
|
194
|
+
resolveIsWorkingTreeClean: typeof resolveIsWorkingTreeClean;
|
|
195
|
+
resolveIsExactSingleChildCommit: typeof resolveIsExactSingleChildCommit;
|
|
196
|
+
resolvePrWorkflowRevisionDigest: typeof resolvePrWorkflowRevisionDigest;
|
|
197
|
+
resolveRemoteRefsContainingHead: typeof resolveRemoteRefsContainingHead;
|
|
198
|
+
parseCriticVerdict: typeof parseCriticVerdict;
|
|
199
|
+
isProcessAlive: typeof isProcessAlive;
|
|
200
|
+
nowMs: () => number;
|
|
201
|
+
};
|
|
202
|
+
/** Require at least one real discovery row or a lane-bound CLEAN attestation. */
|
|
203
|
+
export declare function prReviewDiscoveryArtifactCoversLane(text: string, expectedWorkflowLane: string): boolean;
|
|
204
|
+
declare function parseCriticVerdict(text: string, itemId: string, reviewerSeverity?: string): {
|
|
205
|
+
status: string;
|
|
206
|
+
severity: string;
|
|
207
|
+
} | null;
|
|
208
|
+
declare function isProcessAlive(pid: number): boolean;
|
|
209
|
+
declare function workflowGateStateLockRelativePath(sessionID: string): string;
|
|
210
|
+
declare function workflowGateStateRelativePath(sessionID: string): string;
|
|
211
|
+
export {};
|