opencode-swarm 7.139.1 → 7.139.3
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/phase-wrap/SKILL.md +2 -2
- package/.opencode/skills/swarm-pr-review/SKILL.md +15 -0
- package/dist/background/stage-b-gates.d.ts +5 -1
- package/dist/background/task-envelope.d.ts +4 -4
- package/dist/cli/{config-doctor-tgnr91q3.js → config-doctor-75qky762.js} +3 -3
- package/dist/cli/{core-g2dfh9fq.js → core-nn8ffy5h.js} +3 -3
- package/dist/cli/{curation-policy-2qnhgdtt.js → curation-policy-f46tf3dw.js} +5 -5
- package/dist/cli/{curator-drift-vfh07mqy.js → curator-drift-r52hjskk.js} +2 -2
- package/dist/cli/{curator-llm-factory-1ftzece0.js → curator-llm-factory-1r9vz0g2.js} +28 -28
- package/dist/cli/{curator-nbsag633.js → curator-m6mk2v1n.js} +28 -28
- package/dist/cli/{dispatch-b1fge4xk.js → dispatch-nbv0hezh.js} +2 -2
- package/dist/cli/{evidence-summary-service-kzxr71yd.js → evidence-summary-service-sxcq5nrt.js} +6 -6
- package/dist/cli/{gate-evidence-z2b1ymnw.js → gate-evidence-1982qswy.js} +3 -3
- package/dist/cli/{guardrail-explain-vb9k9zwm.js → guardrail-explain-y2wg00dp.js} +29 -29
- package/dist/cli/{guardrail-log-0djnvfas.js → guardrail-log-320grggj.js} +5 -5
- package/dist/cli/{hive-promoter-bpt26yew.js → hive-promoter-v4w7cjvk.js} +28 -28
- package/dist/cli/{index-3eddtgxt.js → index-05mms0va.js} +1 -1
- package/dist/cli/{index-y1zcsf2a.js → index-0mzz46we.js} +2 -2
- package/dist/cli/{index-ywysg26s.js → index-1jbj7vzv.js} +4 -4
- package/dist/cli/{index-91s653xx.js → index-1yd38ajy.js} +2 -2
- package/dist/cli/{index-gvhvz176.js → index-2eet124q.js} +1 -1
- package/dist/cli/{index-0wp67gqj.js → index-4fr94329.js} +11 -6
- package/dist/cli/{index-y111zefa.js → index-4nt52yr9.js} +80 -31
- package/dist/cli/{index-3jcyn8g6.js → index-4wjk296r.js} +1 -1
- package/dist/cli/{index-xka8s8jw.js → index-5hyq2mw6.js} +30 -30
- package/dist/cli/{index-5zyk8qgv.js → index-5syvwd8g.js} +1 -1
- package/dist/cli/{index-en6qq954.js → index-6axm8q3s.js} +3 -3
- package/dist/cli/{index-668dpw5e.js → index-6mvbjqbt.js} +1 -1
- package/dist/cli/{index-wsdnttf4.js → index-74hpm6sh.js} +1 -1
- package/dist/cli/{index-wrt6m5ze.js → index-ajwmn8gp.js} +289 -73
- package/dist/cli/{index-0ymhx85c.js → index-ba5e5e3n.js} +2 -2
- package/dist/cli/{index-hn0mdcmj.js → index-bcwx1335.js} +1 -1
- package/dist/cli/{index-a12906mj.js → index-gen82t10.js} +3 -3
- package/dist/cli/{index-s608d3hw.js → index-hckq2r5m.js} +1 -1
- package/dist/cli/{index-aymt7hzw.js → index-hwnpd4tw.js} +3 -3
- package/dist/cli/{index-xec724kg.js → index-jqn332jx.js} +2 -2
- package/dist/cli/{index-x9q4bbhd.js → index-k87hs2ff.js} +1 -1
- package/dist/cli/{index-15526t16.js → index-kyz7259r.js} +2 -2
- package/dist/cli/{index-prmb5qfp.js → index-mv0czd9c.js} +2 -2
- package/dist/cli/{index-hgrkhxbk.js → index-mzck763x.js} +2 -2
- package/dist/cli/{index-xr07r80d.js → index-tkg6rapy.js} +1345 -682
- package/dist/cli/{index-ht4q3548.js → index-v7g8dnyh.js} +3 -3
- package/dist/cli/{index-vxbppwvf.js → index-xeyr62x0.js} +5 -5
- package/dist/cli/{index-vm4xw9z3.js → index-xsxrhakg.js} +1 -1
- package/dist/cli/{index-5w7ekpy3.js → index-xzzcfwwm.js} +1 -1
- package/dist/cli/{index-dw09fz3w.js → index-yawwwhmc.js} +2 -2
- package/dist/cli/{index-q7ezzgwq.js → index-yh0q21nj.js} +1 -1
- package/dist/cli/{index-db7wf6ke.js → index-z6qe8wft.js} +6 -6
- package/dist/cli/index.js +28 -28
- package/dist/cli/{knowledge-escalator-pjg2x75c.js → knowledge-escalator-kkjsjtza.js} +6 -6
- package/dist/cli/{knowledge-events-vxheptk8.js → knowledge-events-jbw9j94n.js} +4 -4
- package/dist/cli/{knowledge-link-3tq8w6gs.js → knowledge-link-f6akgbdn.js} +3 -3
- package/dist/cli/{knowledge-store-36mascwz.js → knowledge-store-m7vnz62z.js} +4 -4
- package/dist/cli/{knowledge-validator-anats6rj.js → knowledge-validator-rqj7kech.js} +7 -7
- package/dist/cli/{pending-delegations-tmyf18p4.js → pending-delegations-14544jpr.js} +3 -3
- package/dist/cli/{pr-subscriptions-hhx6yk24.js → pr-subscriptions-qdwfm1a8.js} +3 -3
- package/dist/cli/{runner-w30gazew.js → runner-mzb3e2s6.js} +4 -4
- package/dist/cli/{scan-cursor-apbz9eez.js → scan-cursor-8e6ryhjq.js} +5 -5
- package/dist/cli/{schema-x9fr2ey8.js → schema-g7rs20c6.js} +2 -2
- package/dist/cli/{scope-persistence-3f0d4fwv.js → scope-persistence-wy65zyha.js} +2 -2
- package/dist/cli/{skill-generator-20czn4kd.js → skill-generator-2rv6ftre.js} +8 -8
- package/dist/cli/{task-envelope-qn0qtnh0.js → task-envelope-jp2fdsvn.js} +11 -8
- package/dist/cli/{workspace-snapshot-h5rzw37b.js → workspace-snapshot-w3tg4ne5.js} +2 -2
- package/dist/cli/{worktree-collision-ownership-vexb0b6r.js → worktree-collision-ownership-24s0t62z.js} +4 -4
- package/dist/commands/approve-plan-critic.d.ts +2 -2
- package/dist/commands/registry.d.ts +1 -1
- package/dist/config/agent-model.d.ts +35 -0
- package/dist/db/qa-gate-profile.d.ts +11 -3
- package/dist/evidence/manager.d.ts +1 -1
- package/dist/evidence/phase-participation.d.ts +44 -0
- package/dist/hooks/compaction-customizer.d.ts +30 -2
- package/dist/hooks/context-budget.d.ts +1 -1
- package/dist/hooks/delegation-gate.d.ts +3 -3
- package/dist/hooks/guardrails/index.d.ts +5 -1
- package/dist/hooks/guardrails/messages-transform.d.ts +2 -0
- package/dist/hooks/guardrails/pre-check-result.d.ts +20 -0
- package/dist/hooks/pr-workflow-gate.d.ts +8 -1
- package/dist/index.js +421 -416
- package/dist/sast/semgrep.d.ts +15 -32
- package/dist/services/compaction-service.d.ts +3 -1
- package/dist/session/snapshot-writer.d.ts +1 -0
- package/dist/state.d.ts +70 -19
- package/dist/tools/context-status.d.ts +4 -1
- package/dist/tools/lint.d.ts +48 -22
- package/dist/tools/pre-check-batch.d.ts +37 -13
- package/dist/tools/quality-budget.d.ts +3 -2
- package/dist/tools/sast-baseline.d.ts +1 -0
- package/dist/tools/sast-scan.d.ts +4 -1
- package/dist/tools/secretscan.d.ts +2 -2
- package/dist/tools/set-qa-gates.d.ts +5 -4
- package/dist/utils/bun-compat.d.ts +20 -0
- package/dist/utils/external-tool-runner.d.ts +10 -0
- package/package.json +1 -1
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { PluginConfig } from './schema';
|
|
2
|
+
export interface ParsedAgentModel {
|
|
3
|
+
modelID: string;
|
|
4
|
+
providerID?: string;
|
|
5
|
+
}
|
|
6
|
+
type RegisteredAgentModel = {
|
|
7
|
+
model?: unknown;
|
|
8
|
+
mode?: unknown;
|
|
9
|
+
};
|
|
10
|
+
/** Split a supported legacy `provider/model/variant` value like registration does. */
|
|
11
|
+
export declare function splitEmbeddedAgentVariant(model: string): {
|
|
12
|
+
model: string;
|
|
13
|
+
variant?: string;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Return only an explicit, nonblank model for an exact generated agent target.
|
|
17
|
+
* Unknown swarm prefixes and agent names fail closed instead of borrowing a
|
|
18
|
+
* similarly named role from another swarm.
|
|
19
|
+
*/
|
|
20
|
+
export declare function resolveConfiguredAgentModel(config: PluginConfig, exactAgentName: string): string | undefined;
|
|
21
|
+
/** Resolve the registered model for an exact generated agent target. */
|
|
22
|
+
export declare function resolveRegisteredAgentModel(config: PluginConfig, exactAgentName: string): string | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Resolve the model that an exact generated agent will actually receive.
|
|
25
|
+
*
|
|
26
|
+
* Primary agents intentionally omit their registered model so OpenCode's UI
|
|
27
|
+
* controls selection; their live assistant metadata remains authoritative.
|
|
28
|
+
* Subagents use a runtime-mutated explicit model (including guardrail fallback)
|
|
29
|
+
* before the factory-resolved registered model, which also preserves inherited
|
|
30
|
+
* role defaults such as curator -> explorer.
|
|
31
|
+
*/
|
|
32
|
+
export declare function resolveRuntimeAgentModel(config: PluginConfig, registeredAgents: Record<string, RegisteredAgentModel>, exactAgentName: string): string | undefined;
|
|
33
|
+
/** Parse model-only or provider/model config values without partial fallback. */
|
|
34
|
+
export declare function parseAgentModel(model: string): ParsedAgentModel | undefined;
|
|
35
|
+
export {};
|
|
@@ -19,6 +19,7 @@ export declare const _internals: {
|
|
|
19
19
|
getEffectiveGates: typeof getEffectiveGates;
|
|
20
20
|
computeProfileHash: typeof computeProfileHash;
|
|
21
21
|
hasAnyProfileWithEnabledGate: typeof hasAnyProfileWithEnabledGate;
|
|
22
|
+
afterSetGatesRead: (profile: QaGateProfile) => void;
|
|
22
23
|
};
|
|
23
24
|
/**
|
|
24
25
|
* QA gate flags. All eleven gates are tracked explicitly.
|
|
@@ -74,9 +75,15 @@ export declare function getProfile(directory: string, planId: string): QaGatePro
|
|
|
74
75
|
export declare function hasAnyProfileWithEnabledGate(directory: string, gate: keyof QaGates): boolean;
|
|
75
76
|
/**
|
|
76
77
|
* Return the existing profile for `planId`, or create a new one seeded with
|
|
77
|
-
* `DEFAULT_QA_GATES`
|
|
78
|
+
* `DEFAULT_QA_GATES` plus the caller's initial gate selection if none exists.
|
|
79
|
+
*
|
|
80
|
+
* `initialGates` is applied only by the winning INSERT. A caller that loses a
|
|
81
|
+
* UNIQUE-index race receives the winner's profile unchanged and must still run
|
|
82
|
+
* `setGates` to apply the normal ratchet rules. This lets the first architect
|
|
83
|
+
* selection turn default-on gates off without giving a later/concurrent caller
|
|
84
|
+
* a way to loosen an already-persisted `true` gate.
|
|
78
85
|
*/
|
|
79
|
-
export declare function getOrCreateProfile(directory: string, planId: string, projectType?: string): QaGateProfile;
|
|
86
|
+
export declare function getOrCreateProfile(directory: string, planId: string, projectType?: string, initialGates?: Partial<QaGates>): QaGateProfile;
|
|
80
87
|
/**
|
|
81
88
|
* Update gates for `planId`. Gates can only be ratcheted tighter —
|
|
82
89
|
* attempting to disable a currently-enabled gate throws. Throws if the
|
|
@@ -112,7 +119,8 @@ export declare function computeProfileHash(profile: QaGateProfile): string;
|
|
|
112
119
|
* - council_mode — src/state.ts isCouncilGateActive + src/hooks/delegation-gate.ts
|
|
113
120
|
* (replaces per-task Stage B with full 5-member council via submit_council_verdicts).
|
|
114
121
|
* - sme_enabled — consumed during MODE: BRAINSTORM/SPECIFY architect dialogue.
|
|
115
|
-
* - critic_pre_plan —
|
|
122
|
+
* - critic_pre_plan — src/hooks/delegation-gate.ts (blocks coder delegation
|
|
123
|
+
* until plan-critic approval when the effective gate is enabled).
|
|
116
124
|
* - sast_enabled — consumed inside pre_check_batch tool.
|
|
117
125
|
* - hallucination_guard — src/tools/phase-complete.ts Gate 3 (blocks phase_complete
|
|
118
126
|
* until .swarm/evidence/{phase}/hallucination-guard.json has APPROVED verdict).
|
|
@@ -85,7 +85,7 @@ export declare function validateProjectRoot(directory: string): void;
|
|
|
85
85
|
* Performs atomic write via temp file + rename.
|
|
86
86
|
* @throws Error if task ID is invalid or size limit would be exceeded
|
|
87
87
|
*/
|
|
88
|
-
export declare function saveEvidence(directory: string, taskId: string, evidence: Evidence): Promise<EvidenceBundle>;
|
|
88
|
+
export declare function saveEvidence(directory: string, taskId: string, evidence: Evidence, abortSignal?: AbortSignal): Promise<EvidenceBundle>;
|
|
89
89
|
/**
|
|
90
90
|
* Transform a flat retrospective object into a valid EvidenceBundle.
|
|
91
91
|
*/
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Durable, phase-bound proof that a required swarm role completed successfully.
|
|
3
|
+
*
|
|
4
|
+
* Foreground Task calls are correlated in memory only until their terminal
|
|
5
|
+
* tool.execute.after event. Background calls promote the same reservation to
|
|
6
|
+
* this store's durable pending list and are completed only by the trusted
|
|
7
|
+
* background completion observer.
|
|
8
|
+
*/
|
|
9
|
+
import type { BackgroundDelegationRecord } from '../background/pending-delegations.js';
|
|
10
|
+
import { type Plan } from '../config/plan-schema.js';
|
|
11
|
+
export declare const PHASE_PARTICIPATION_FILE = "evidence/phase-participation.json";
|
|
12
|
+
export declare const PHASE_PARTICIPATION_QUARANTINE_DIR = "evidence/phase-participation-quarantine";
|
|
13
|
+
export declare const MAX_PHASE_PARTICIPATION_BYTES: number;
|
|
14
|
+
export declare const MAX_PHASE_PARTICIPATION_PENDING = 128;
|
|
15
|
+
export declare const MAX_PHASE_PARTICIPATION_RECEIPTS = 128;
|
|
16
|
+
export declare const MAX_PHASE_PARTICIPATION_QUARANTINE_FILES = 16;
|
|
17
|
+
export declare const MAX_PHASE_PARTICIPATION_QUARANTINE_BYTES: number;
|
|
18
|
+
export declare const MAX_PHASE_PARTICIPATION_QUARANTINE_DIRECTORY_ENTRIES = 64;
|
|
19
|
+
export interface ParticipationReadResult {
|
|
20
|
+
status: 'missing' | 'valid' | 'corrupt' | 'unreadable' | 'oversized';
|
|
21
|
+
found: boolean;
|
|
22
|
+
}
|
|
23
|
+
export declare function reserveApprovedPhaseParticipation(input: {
|
|
24
|
+
directory: string;
|
|
25
|
+
tool: string;
|
|
26
|
+
parentSessionId: string;
|
|
27
|
+
callId: string;
|
|
28
|
+
args: Record<string, unknown>;
|
|
29
|
+
policy: unknown;
|
|
30
|
+
}): Promise<void>;
|
|
31
|
+
export declare function observePhaseParticipationToolResult(input: {
|
|
32
|
+
directory: string;
|
|
33
|
+
tool: string;
|
|
34
|
+
parentSessionId: string;
|
|
35
|
+
callId: string;
|
|
36
|
+
output: unknown;
|
|
37
|
+
}): Promise<void>;
|
|
38
|
+
export declare function completeBackgroundPhaseParticipation(input: {
|
|
39
|
+
directory: string;
|
|
40
|
+
record: BackgroundDelegationRecord;
|
|
41
|
+
resultText: string;
|
|
42
|
+
}): Promise<boolean>;
|
|
43
|
+
export declare function readPhaseParticipation(directory: string, plan: Plan, phase: number, role: string): ParticipationReadResult;
|
|
44
|
+
export declare function resetPhaseParticipationForTests(): void;
|
|
@@ -1,11 +1,39 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Compaction Customizer Hook
|
|
3
3
|
*
|
|
4
|
-
* Enhances session compaction by injecting
|
|
5
|
-
* Adds current phase information and key decisions to the compaction context.
|
|
4
|
+
* Enhances session compaction by injecting bounded, summary-only swarm facts.
|
|
6
5
|
*/
|
|
6
|
+
import * as fs from 'node:fs';
|
|
7
7
|
import type { PluginConfig } from '../config';
|
|
8
|
+
interface CompactionFact {
|
|
9
|
+
label: string;
|
|
10
|
+
value: string;
|
|
11
|
+
}
|
|
12
|
+
declare function countStoredOutputs(directory: string): Promise<{
|
|
13
|
+
count: number;
|
|
14
|
+
truncated: boolean;
|
|
15
|
+
} | null>;
|
|
16
|
+
/**
|
|
17
|
+
* Build one bounded block so the host never receives a partially-delimited set
|
|
18
|
+
* of plugin facts. The caller appends this block atomically to output.context.
|
|
19
|
+
*/
|
|
20
|
+
declare function buildCompactionFactsBlock(facts: CompactionFact[]): string;
|
|
8
21
|
/**
|
|
9
22
|
* Creates the experimental.session.compacting hook for compaction customization.
|
|
10
23
|
*/
|
|
11
24
|
export declare function createCompactionCustomizerHook(config: PluginConfig, directory: string): Record<string, unknown>;
|
|
25
|
+
export declare const _test_exports: {
|
|
26
|
+
buildCompactionFactsBlock: typeof buildCompactionFactsBlock;
|
|
27
|
+
compactionFs: {
|
|
28
|
+
lstat: typeof fs.promises.lstat;
|
|
29
|
+
realpath: typeof fs.promises.realpath;
|
|
30
|
+
opendir: typeof fs.promises.opendir;
|
|
31
|
+
};
|
|
32
|
+
countStoredOutputs: typeof countStoredOutputs;
|
|
33
|
+
MAX_COMPACTION_FACT_CHARS: number;
|
|
34
|
+
MAX_COMPACTION_CONTEXT_CHARS: number;
|
|
35
|
+
MAX_STORED_OUTPUTS_TO_COUNT: number;
|
|
36
|
+
COMPACTION_FACTS_OPEN: string;
|
|
37
|
+
COMPACTION_FACTS_CLOSE: string;
|
|
38
|
+
};
|
|
39
|
+
export {};
|
|
@@ -36,7 +36,7 @@ interface MessageWithParts {
|
|
|
36
36
|
* Injects warnings when context usage exceeds configured thresholds.
|
|
37
37
|
* Only operates on messages for the architect agent.
|
|
38
38
|
*/
|
|
39
|
-
export declare function createContextBudgetHandler(config: PluginConfig): (_input: Record<string, never>, _output: {
|
|
39
|
+
export declare function createContextBudgetHandler(config: PluginConfig, resolveAgentModel?: (agentName: string) => string | undefined): (_input: Record<string, never>, _output: {
|
|
40
40
|
messages?: MessageWithParts[];
|
|
41
41
|
}) => Promise<void>;
|
|
42
42
|
export {};
|
|
@@ -288,9 +288,9 @@ export declare function isPlanCriticApproved(directory: string): Promise<boolean
|
|
|
288
288
|
* When the critic returns APPROVED but the mechanical snapshot recorder
|
|
289
289
|
* ({@link recordPlanCriticApprovalSnapshotIfApplicable}) fails to persist it
|
|
290
290
|
* (verdict-format mismatch, dispatch-signal miss, or a plan.json read race),
|
|
291
|
-
* the gate
|
|
292
|
-
*
|
|
293
|
-
*
|
|
291
|
+
* the gate blocks coder delegations when the effective `critic_pre_plan`
|
|
292
|
+
* policy is enabled. This records a manual `plan_critic_gate` approval snapshot
|
|
293
|
+
* so the gate unblocks, with a
|
|
294
294
|
* distinct `method: 'manual_override'` audit marker so a human or downstream
|
|
295
295
|
* review can distinguish a manual approval from a mechanical critic approval.
|
|
296
296
|
*
|
|
@@ -21,6 +21,10 @@ export declare const _internals: {
|
|
|
21
21
|
dcCheckJunctionCreation: typeof dcCheckJunctionCreation;
|
|
22
22
|
extractErrorSignal: typeof extractErrorSignal;
|
|
23
23
|
getSandboxExecutor: typeof getExecutor;
|
|
24
|
+
/** Test-only compatibility for legacy direct-after hook tests. */
|
|
25
|
+
allowUncorrelatedGateReceipts: boolean;
|
|
26
|
+
MAX_PENDING_GATE_RECEIPTS_PER_SESSION: number;
|
|
27
|
+
MAX_PENDING_GATE_RECEIPT_SESSIONS: number;
|
|
24
28
|
/**
|
|
25
29
|
* Test/inspection seams for the no-op detector's bounded session state
|
|
26
30
|
* (invariant 8). Production code does not call these; they exist so the
|
|
@@ -82,7 +86,7 @@ export { redactShellCommand } from './helpers';
|
|
|
82
86
|
* @param config Guardrails configuration (optional)
|
|
83
87
|
* @returns Tool before/after hooks and messages transform hook
|
|
84
88
|
*/
|
|
85
|
-
export declare function createGuardrailsHooks(directory: string, directoryOrConfig?: string | GuardrailsConfig, config?: GuardrailsConfig, authorityConfig?: AuthorityConfig, worktreeBaseDirOverrides?: string[]): {
|
|
89
|
+
export declare function createGuardrailsHooks(directory: string, directoryOrConfig?: string | GuardrailsConfig, config?: GuardrailsConfig, authorityConfig?: AuthorityConfig, worktreeBaseDirOverrides?: string[], resolveAgentModel?: (agentName: string) => string | undefined): {
|
|
86
90
|
toolBefore: (input: {
|
|
87
91
|
tool: string;
|
|
88
92
|
sessionID: string;
|
|
@@ -33,6 +33,8 @@ export interface MessagesTransformContext {
|
|
|
33
33
|
* explanation for the silence.
|
|
34
34
|
*/
|
|
35
35
|
lastCountedAssistantMsgId: Map<string, string>;
|
|
36
|
+
/** Resolve an explicit model for the exact incoming agent, when available. */
|
|
37
|
+
resolveAgentModel?: (agentName: string) => string | undefined;
|
|
36
38
|
}
|
|
37
39
|
type ChatMessageLike = {
|
|
38
40
|
/**
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type PreCheckVerdict = {
|
|
2
|
+
kind: 'pass';
|
|
3
|
+
} | {
|
|
4
|
+
kind: 'fail';
|
|
5
|
+
code: 'PRE_CHECK_FAILED' | 'PRE_CHECK_INPUT_INVALID';
|
|
6
|
+
} | {
|
|
7
|
+
kind: 'skip';
|
|
8
|
+
} | {
|
|
9
|
+
kind: 'invalid';
|
|
10
|
+
code: 'PRE_CHECK_RESULT_INVALID';
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Decode the public pre_check_batch result without treating nested text as
|
|
14
|
+
* control data. Unknown, oversized, truncated, or contradictory shapes are
|
|
15
|
+
* non-passing and receive one bounded diagnostic code.
|
|
16
|
+
*/
|
|
17
|
+
export declare function decodePreCheckResult(output: unknown): PreCheckVerdict;
|
|
18
|
+
export declare const _internals: {
|
|
19
|
+
MAX_PRE_CHECK_RESULT_BYTES: number;
|
|
20
|
+
};
|
|
@@ -283,6 +283,13 @@ export interface PrWorkflowGateState {
|
|
|
283
283
|
/** Canonical ordered semantic ledger frozen by the first micro dispatch. */
|
|
284
284
|
prReviewTriggerLedger?: PrReviewInlineTriggerRow[];
|
|
285
285
|
prReviewTriggerEvalPath?: string;
|
|
286
|
+
/**
|
|
287
|
+
* The run_id bound to the trigger-evaluation receipt at first consumption.
|
|
288
|
+
* Mirrors `prReviewArtifactRunId`: once set, a subsequent receipt under a
|
|
289
|
+
* different run_id is rejected, and it must agree with the findings artifact
|
|
290
|
+
* run_id (both live under `.swarm/pr-review/<run_id>/`). Closes issue #2124.
|
|
291
|
+
*/
|
|
292
|
+
prReviewTriggerEvalRunId?: string;
|
|
286
293
|
prReviewValidationBatches?: PrReviewValidationBatchRecord[];
|
|
287
294
|
/** Keyed by validation batch id. See `PrReviewBatchCoherenceRecord`. */
|
|
288
295
|
prReviewBatchCoherence?: Record<string, PrReviewBatchCoherenceRecord>;
|
|
@@ -465,7 +472,7 @@ export declare function recordPrFeedbackGateBatch(directory: string, sessionID:
|
|
|
465
472
|
export declare function assertPrFeedbackGatePhaseSettled(directory: string, sessionID: string, phase: PrFeedbackGatePhase): Promise<PrWorkflowGateState>;
|
|
466
473
|
/** Require every ordered feedback gate on one unchanged revision. */
|
|
467
474
|
export declare function assertPrFeedbackReadyToPublish(directory: string, sessionID: string): Promise<PrWorkflowGateState>;
|
|
468
|
-
export declare function markPrReviewTriggerEvaluationComplete(directory: string, sessionID: string, artifactPath: string): Promise<PrWorkflowGateState>;
|
|
475
|
+
export declare function markPrReviewTriggerEvaluationComplete(directory: string, sessionID: string, runId: string, artifactPath: string): Promise<PrWorkflowGateState>;
|
|
469
476
|
/** Freeze one exact inline trigger ledger across every micro dispatch. */
|
|
470
477
|
export declare function bindPrReviewTriggerLedger(directory: string, sessionID: string, input: unknown): Promise<PrWorkflowGateState>;
|
|
471
478
|
export declare function assertPrReviewArtifactBoundary(directory: string, sessionID: string, runId: string, boundary: PrReviewArtifactBoundary, findingIds: string[]): Promise<PrWorkflowGateState>;
|