opencode-swarm 7.126.0 → 7.126.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/swarm-pr-feedback/SKILL.md +19 -14
- package/.opencode/skills/swarm-pr-review/SKILL.md +17 -13
- package/dist/cli/{config-doctor-akxywx0c.js → config-doctor-23jxdqwv.js} +2 -2
- package/dist/cli/{core-v1kp7anb.js → core-wg3re04e.js} +1 -1
- package/dist/cli/{curation-policy-dptr1rfe.js → curation-policy-0t6hny6g.js} +2 -2
- package/dist/cli/{curator-23hynz78.js → curator-g8rggzbk.js} +14 -14
- package/dist/cli/{curator-llm-factory-r648jn8e.js → curator-llm-factory-36psae60.js} +14 -14
- package/dist/cli/{guardrail-explain-6atsd4vr.js → guardrail-explain-6ffgrjx9.js} +15 -15
- package/dist/cli/{guardrail-log-222xyxfp.js → guardrail-log-57sczn5h.js} +3 -3
- package/dist/cli/{hive-promoter-bnkhzd46.js → hive-promoter-c458rgp5.js} +14 -14
- package/dist/cli/{index-qzkcy22e.js → index-1p9z8cc4.js} +1 -1
- package/dist/cli/{index-cdx337js.js → index-3hkbegq2.js} +1 -1
- package/dist/cli/{index-gnvg72y1.js → index-4ff0x4cg.js} +79 -1
- package/dist/cli/{index-kwnsatzq.js → index-6j9p0c40.js} +2 -2
- package/dist/cli/{index-a1c9az5e.js → index-abw10n3f.js} +109 -151
- package/dist/cli/{index-r1gdkn2d.js → index-c8sqc3nh.js} +113 -21
- package/dist/cli/{index-2bnfwmk3.js → index-cnhp6c0k.js} +1 -1
- package/dist/cli/{index-dezgmvtw.js → index-echdpdhy.js} +1 -1
- package/dist/cli/{index-yfzn5r9s.js → index-k5xh81c9.js} +3 -3
- package/dist/cli/{index-mgrsx5hn.js → index-kx3533dm.js} +1 -1
- package/dist/cli/{index-bcgfhxzv.js → index-nkhp7j16.js} +5 -5
- package/dist/cli/{index-2yd75hms.js → index-nmyg9b7v.js} +4 -4
- package/dist/cli/{index-16z6txq3.js → index-vvwf9ark.js} +2 -2
- package/dist/cli/{index-jt7hnr7q.js → index-w0yztxgq.js} +1 -1
- package/dist/cli/{index-g4ef4v3m.js → index-w9cb5zwh.js} +1 -1
- package/dist/cli/{index-y4ry07h8.js → index-x1w4cx3n.js} +2 -2
- package/dist/cli/{index-0ff5cm9j.js → index-y9t766sw.js} +2217 -2195
- package/dist/cli/{index-68fpa7ff.js → index-yf4kvhrn.js} +16 -16
- package/dist/cli/index.js +14 -14
- package/dist/cli/{knowledge-escalator-4hc8w7sd.js → knowledge-escalator-kd80m9vp.js} +3 -3
- package/dist/cli/{knowledge-events-kyqjv1f8.js → knowledge-events-j7jfwm1d.js} +1 -1
- package/dist/cli/{knowledge-store-06k0p1gs.js → knowledge-store-1d4byc7y.js} +1 -1
- package/dist/cli/{knowledge-validator-42xjmcmh.js → knowledge-validator-63mkgt9x.js} +4 -4
- package/dist/cli/{scan-cursor-gjcvpyta.js → scan-cursor-qzn5jmbe.js} +2 -2
- package/dist/cli/{schema-69z8w1ka.js → schema-2j92wnns.js} +1 -1
- package/dist/cli/{scope-persistence-habn4q8a.js → scope-persistence-dm5bab50.js} +3 -1
- package/dist/cli/{skill-generator-t6j93mwt.js → skill-generator-sv6zvdvz.js} +5 -5
- package/dist/config/index.d.ts +1 -0
- package/dist/config/loader.d.ts +51 -36
- package/dist/hooks/pr-workflow-gate.d.ts +39 -0
- package/dist/hooks/scope-guard.d.ts +6 -1
- package/dist/index.js +29 -26
- package/dist/scope/scope-binding.d.ts +21 -2
- package/dist/scope/scope-persistence.d.ts +6 -0
- package/dist/tools/index.d.ts +2 -0
- package/dist/tools/manifest.d.ts +2 -0
- package/dist/tools/prepare-pr-feedback-scope.d.ts +5 -0
- package/dist/tools/tool-metadata.d.ts +98 -0
- package/dist/tools/write-pr-review-artifact.d.ts +5 -0
- package/package.json +3 -3
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
handleGuardrailExplain
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-x1w4cx3n.js";
|
|
5
5
|
import {
|
|
6
6
|
handleGuardrailLog
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-1p9z8cc4.js";
|
|
8
8
|
import {
|
|
9
9
|
COMMAND_REGISTRY,
|
|
10
10
|
SWARM_COMMAND_TOOL_ALLOWLIST,
|
|
@@ -83,28 +83,28 @@ import {
|
|
|
83
83
|
handleWriteRetroCommand,
|
|
84
84
|
normalizeSwarmCommandInput,
|
|
85
85
|
resolveCommand
|
|
86
|
-
} from "./index-
|
|
87
|
-
import"./index-
|
|
88
|
-
import"./index-
|
|
86
|
+
} from "./index-y9t766sw.js";
|
|
87
|
+
import"./index-echdpdhy.js";
|
|
88
|
+
import"./index-w0yztxgq.js";
|
|
89
89
|
import"./index-kk1scggc.js";
|
|
90
90
|
import"./index-4905hd2m.js";
|
|
91
91
|
import"./index-134d35c1.js";
|
|
92
92
|
import"./index-6n2jpz7x.js";
|
|
93
|
-
import"./index-
|
|
94
|
-
import"./index-
|
|
95
|
-
import"./index-
|
|
93
|
+
import"./index-k5xh81c9.js";
|
|
94
|
+
import"./index-nkhp7j16.js";
|
|
95
|
+
import"./index-3hkbegq2.js";
|
|
96
96
|
import"./index-vxv732ex.js";
|
|
97
97
|
import"./index-c8s9a3zh.js";
|
|
98
98
|
import"./index-9ss2m4rs.js";
|
|
99
99
|
import"./index-23zsx7dm.js";
|
|
100
|
-
import"./index-
|
|
101
|
-
import"./index-
|
|
100
|
+
import"./index-6j9p0c40.js";
|
|
101
|
+
import"./index-kx3533dm.js";
|
|
102
102
|
import"./index-rtry5xyf.js";
|
|
103
|
-
import"./index-
|
|
104
|
-
import"./index-
|
|
103
|
+
import"./index-nmyg9b7v.js";
|
|
104
|
+
import"./index-cnhp6c0k.js";
|
|
105
105
|
import"./index-ae75rja9.js";
|
|
106
106
|
import"./index-q27bajqb.js";
|
|
107
|
-
import"./index-
|
|
107
|
+
import"./index-abw10n3f.js";
|
|
108
108
|
import"./index-k5jrywpr.js";
|
|
109
109
|
import"./index-n832052r.js";
|
|
110
110
|
import {
|
|
@@ -113,14 +113,14 @@ import {
|
|
|
113
113
|
init_constants,
|
|
114
114
|
init_schema,
|
|
115
115
|
stripKnownSwarmPrefix
|
|
116
|
-
} from "./index-
|
|
116
|
+
} from "./index-c8sqc3nh.js";
|
|
117
117
|
import"./index-bk5tah7q.js";
|
|
118
118
|
import"./index-8fwhhayc.js";
|
|
119
119
|
import"./index-q1exe2b3.js";
|
|
120
|
-
import"./index-
|
|
120
|
+
import"./index-4ff0x4cg.js";
|
|
121
121
|
import"./index-2tn5h2zp.js";
|
|
122
122
|
import"./index-1kz6da87.js";
|
|
123
|
-
import"./index-
|
|
123
|
+
import"./index-w9cb5zwh.js";
|
|
124
124
|
import"./index-4rhhvd1a.js";
|
|
125
125
|
import"./index-0cz1ws47.js";
|
|
126
126
|
import"./index-2445sx3d.js";
|
package/dist/cli/index.js
CHANGED
|
@@ -7,41 +7,41 @@ import {
|
|
|
7
7
|
getPluginLockFilePaths,
|
|
8
8
|
package_default,
|
|
9
9
|
resolveCommand
|
|
10
|
-
} from "./index-
|
|
11
|
-
import"./index-
|
|
12
|
-
import"./index-
|
|
10
|
+
} from "./index-y9t766sw.js";
|
|
11
|
+
import"./index-echdpdhy.js";
|
|
12
|
+
import"./index-w0yztxgq.js";
|
|
13
13
|
import"./index-kk1scggc.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-k5xh81c9.js";
|
|
18
|
+
import"./index-nkhp7j16.js";
|
|
19
|
+
import"./index-3hkbegq2.js";
|
|
20
20
|
import"./index-vxv732ex.js";
|
|
21
21
|
import"./index-c8s9a3zh.js";
|
|
22
22
|
import"./index-9ss2m4rs.js";
|
|
23
23
|
import"./index-23zsx7dm.js";
|
|
24
|
-
import"./index-
|
|
25
|
-
import"./index-
|
|
24
|
+
import"./index-6j9p0c40.js";
|
|
25
|
+
import"./index-kx3533dm.js";
|
|
26
26
|
import"./index-rtry5xyf.js";
|
|
27
|
-
import"./index-
|
|
28
|
-
import"./index-
|
|
27
|
+
import"./index-nmyg9b7v.js";
|
|
28
|
+
import"./index-cnhp6c0k.js";
|
|
29
29
|
import"./index-ae75rja9.js";
|
|
30
30
|
import"./index-q27bajqb.js";
|
|
31
|
-
import"./index-
|
|
31
|
+
import"./index-abw10n3f.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-c8sqc3nh.js";
|
|
38
38
|
import"./index-bk5tah7q.js";
|
|
39
39
|
import"./index-8fwhhayc.js";
|
|
40
40
|
import"./index-q1exe2b3.js";
|
|
41
|
-
import"./index-
|
|
41
|
+
import"./index-4ff0x4cg.js";
|
|
42
42
|
import"./index-2tn5h2zp.js";
|
|
43
43
|
import"./index-1kz6da87.js";
|
|
44
|
-
import"./index-
|
|
44
|
+
import"./index-w9cb5zwh.js";
|
|
45
45
|
import"./index-4rhhvd1a.js";
|
|
46
46
|
import"./index-0cz1ws47.js";
|
|
47
47
|
import"./index-2445sx3d.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-nkhp7j16.js";
|
|
12
|
+
import"./index-nmyg9b7v.js";
|
|
13
|
+
import"./index-cnhp6c0k.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-cnhp6c0k.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-6j9p0c40.js";
|
|
27
|
+
import"./index-kx3533dm.js";
|
|
28
28
|
import"./index-rtry5xyf.js";
|
|
29
|
-
import"./index-
|
|
30
|
-
import"./index-
|
|
29
|
+
import"./index-nmyg9b7v.js";
|
|
30
|
+
import"./index-cnhp6c0k.js";
|
|
31
31
|
import"./index-ae75rja9.js";
|
|
32
32
|
import"./index-q27bajqb.js";
|
|
33
33
|
import"./index-bk5tah7q.js";
|
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
alreadyCuratedThisGeneration,
|
|
5
5
|
claimNextScanBatch,
|
|
6
6
|
getScanStatus
|
|
7
|
-
} from "./index-
|
|
8
|
-
import"./index-
|
|
7
|
+
} from "./index-3hkbegq2.js";
|
|
8
|
+
import"./index-nmyg9b7v.js";
|
|
9
9
|
import"./index-ae75rja9.js";
|
|
10
10
|
import"./index-q27bajqb.js";
|
|
11
11
|
import"./index-bk5tah7q.js";
|
|
@@ -6,12 +6,13 @@ import {
|
|
|
6
6
|
readPlanScope,
|
|
7
7
|
readScopeBindingFromDisk,
|
|
8
8
|
readScopeFromDisk,
|
|
9
|
+
resolveAuthorizedPrFeedbackScopeBindingFromDisk,
|
|
9
10
|
resolveAuthorizedScopeBinding,
|
|
10
11
|
resolveAuthorizedScopeBindingForSession,
|
|
11
12
|
resolveScopeWithFallbacks,
|
|
12
13
|
writeScopeBindingToDisk,
|
|
13
14
|
writeScopeToDisk
|
|
14
|
-
} from "./index-
|
|
15
|
+
} from "./index-4ff0x4cg.js";
|
|
15
16
|
import"./index-2tn5h2zp.js";
|
|
16
17
|
import"./index-1kz6da87.js";
|
|
17
18
|
import"./index-zgwm4ryv.js";
|
|
@@ -27,6 +28,7 @@ export {
|
|
|
27
28
|
resolveScopeWithFallbacks,
|
|
28
29
|
resolveAuthorizedScopeBindingForSession,
|
|
29
30
|
resolveAuthorizedScopeBinding,
|
|
31
|
+
resolveAuthorizedPrFeedbackScopeBindingFromDisk,
|
|
30
32
|
readScopeFromDisk,
|
|
31
33
|
readScopeBindingFromDisk,
|
|
32
34
|
readPlanScope,
|
|
@@ -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-k5xh81c9.js";
|
|
37
|
+
import"./index-6j9p0c40.js";
|
|
38
|
+
import"./index-kx3533dm.js";
|
|
39
39
|
import"./index-rtry5xyf.js";
|
|
40
|
-
import"./index-
|
|
41
|
-
import"./index-
|
|
40
|
+
import"./index-nmyg9b7v.js";
|
|
41
|
+
import"./index-cnhp6c0k.js";
|
|
42
42
|
import"./index-ae75rja9.js";
|
|
43
43
|
import"./index-q27bajqb.js";
|
|
44
44
|
import"./index-bk5tah7q.js";
|
package/dist/config/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export type { AgentName, PipelineAgentName, QAAgentName, } from './constants';
|
|
|
2
2
|
export { ALL_AGENT_NAMES, ALL_SUBAGENT_NAMES, DEFAULT_MODELS, isQAAgent, isSubagent, ORCHESTRATOR_NAME, PIPELINE_AGENTS, QA_AGENTS, } from './constants';
|
|
3
3
|
export type { ApprovalEvidence, BaseEvidence, DiffEvidence, Evidence, EvidenceBundle, EvidenceType, EvidenceVerdict, NoteEvidence, ReviewEvidence, TestEvidence, } from './evidence-schema';
|
|
4
4
|
export { ApprovalEvidenceSchema, BaseEvidenceSchema, DiffEvidenceSchema, EVIDENCE_MAX_JSON_BYTES, EVIDENCE_MAX_PATCH_BYTES, EVIDENCE_MAX_TASK_BYTES, EvidenceBundleSchema, EvidenceSchema, EvidenceTypeSchema, EvidenceVerdictSchema, NoteEvidenceSchema, ReviewEvidenceSchema, TestEvidenceSchema, } from './evidence-schema';
|
|
5
|
+
export type { ConfigBuildResult, ConfigLoadResult, ConfigRecovery, } from './loader';
|
|
5
6
|
export { loadAgentPrompt, loadPluginConfig, loadPluginConfigWithMeta, loadPluginConfigWithMetaAsync, } from './loader';
|
|
6
7
|
import { loadPluginConfigWithMeta } from './loader';
|
|
7
8
|
/**
|
package/dist/config/loader.d.ts
CHANGED
|
@@ -1,26 +1,6 @@
|
|
|
1
1
|
import type { z } from 'zod';
|
|
2
2
|
import { type PluginConfig } from './schema';
|
|
3
3
|
export declare const MAX_CONFIG_FILE_BYTES = 102400;
|
|
4
|
-
/**
|
|
5
|
-
* Recovery type indicating how the config was recovered from parse failure.
|
|
6
|
-
* - 'none': config parsed cleanly on first attempt
|
|
7
|
-
* - 'stripped_keys': Zod-confirmed unrecognized keys were surgically removed and parse succeeded
|
|
8
|
-
* - 'user_only': project config was ignored (validation error); user config used alone
|
|
9
|
-
* - 'guardrails_defaults': no recovery succeeded; fail-secure guardrails defaults applied
|
|
10
|
-
*/
|
|
11
|
-
export type RecoveryType = 'none' | 'stripped_keys' | 'user_only' | 'guardrails_defaults';
|
|
12
|
-
/**
|
|
13
|
-
* Structured recovery metadata returned by parseConfigWithFallback.
|
|
14
|
-
* Exposed via loadPluginConfigWithMeta[Async] so programmatic callers can
|
|
15
|
-
* introspect what recovery was performed.
|
|
16
|
-
*/
|
|
17
|
-
export interface RecoveryInfo {
|
|
18
|
-
recovery: RecoveryType;
|
|
19
|
-
/** Dotted key paths that were removed during recovery (empty if none were stripped). */
|
|
20
|
-
removedKeys: string[];
|
|
21
|
-
/** Human-readable advisory messages describing what recovery was performed. */
|
|
22
|
-
warnings: string[];
|
|
23
|
-
}
|
|
24
4
|
export { deepMerge, MAX_MERGE_DEPTH } from '../utils/merge';
|
|
25
5
|
/**
|
|
26
6
|
* Flatten a ZodError into a compact, single-line, human-readable summary that
|
|
@@ -35,36 +15,71 @@ export { deepMerge, MAX_MERGE_DEPTH } from '../utils/merge';
|
|
|
35
15
|
* raw dump of the user's config values.
|
|
36
16
|
*/
|
|
37
17
|
export declare function formatZodIssues(error: z.ZodError): string;
|
|
38
|
-
export declare function loadPluginConfig(directory: string): PluginConfig;
|
|
39
18
|
/**
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
19
|
+
* Recovery classification returned by `buildConfigWithMeta`.
|
|
20
|
+
*
|
|
21
|
+
* 'none' – config parsed cleanly, no keys removed.
|
|
22
|
+
* 'stripped_keys' – pre-Zod section sanitization (gates, external_skills)
|
|
23
|
+
* and/or Zod-targeted key removal dropped some keys;
|
|
24
|
+
* the remaining configuration was preserved.
|
|
25
|
+
* 'user_only' – project config was discarded (failed validation and
|
|
26
|
+
* targeted recovery); user config alone was used.
|
|
27
|
+
* 'guardrails_defaults'– neither merged nor user config was recoverable;
|
|
28
|
+
* fell back to fail-secure guardrails-only defaults.
|
|
43
29
|
*/
|
|
44
|
-
export
|
|
30
|
+
export type ConfigRecovery = 'none' | 'stripped_keys' | 'user_only' | 'guardrails_defaults';
|
|
31
|
+
/** Full result from the shared config-build core. */
|
|
32
|
+
export type ConfigBuildResult = {
|
|
45
33
|
config: PluginConfig;
|
|
34
|
+
recovery: ConfigRecovery;
|
|
35
|
+
/** Dotted key paths that were removed during recovery (gates, Zod strict, etc.). */
|
|
36
|
+
removedKeys: string[];
|
|
37
|
+
/** Human-readable summary messages about the recovery action. */
|
|
38
|
+
warnings: string[];
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Full result from `loadPluginConfigWithMeta` and `loadPluginConfigWithMetaAsync`.
|
|
42
|
+
* Extends `ConfigBuildResult` with I/O-layer fields about whether a config
|
|
43
|
+
* file was found and whether it could be read.
|
|
44
|
+
*/
|
|
45
|
+
export type ConfigLoadResult = ConfigBuildResult & {
|
|
46
|
+
/** True when at least one config file (user or project) existed on disk. */
|
|
46
47
|
loadedFromFile: boolean;
|
|
47
48
|
/** True when a config file existed but could not be loaded (corrupt JSON,
|
|
48
49
|
* oversized, permission error). Consumers with fail-closed semantics —
|
|
49
50
|
* e.g. the Full-Auto `locked` activation guard — must treat this as
|
|
50
51
|
* "config unknown", not "config defaults". */
|
|
51
52
|
configHadErrors: boolean;
|
|
52
|
-
recovery: RecoveryType;
|
|
53
|
-
removedKeys: string[];
|
|
54
|
-
warnings: string[];
|
|
55
53
|
};
|
|
54
|
+
/**
|
|
55
|
+
* Load plugin configuration from user and project config files.
|
|
56
|
+
*
|
|
57
|
+
* Config locations:
|
|
58
|
+
* 1. User config: ~/.config/opencode/opencode-swarm.json
|
|
59
|
+
* 2. Project config: <directory>/.opencode/opencode-swarm.json
|
|
60
|
+
*
|
|
61
|
+
* Project config takes precedence. Nested objects are deep-merged, except
|
|
62
|
+
* `full_auto.locked`: it is a hard-off and OR-merges across both levels, so
|
|
63
|
+
* `locked: true` at either level cannot be overridden by `locked: false`.
|
|
64
|
+
* IMPORTANT: Raw configs are merged BEFORE Zod parsing so that
|
|
65
|
+
* Zod defaults don't override explicit user values.
|
|
66
|
+
*/
|
|
67
|
+
export declare function loadPluginConfig(directory: string): PluginConfig;
|
|
68
|
+
/**
|
|
69
|
+
* Variant of `loadPluginConfig` that also returns loader metadata, including
|
|
70
|
+
* recovery classification, removed keys, and warning messages. All callers
|
|
71
|
+
* that need to surface config-health information (doctor, command-return) use
|
|
72
|
+
* this function. `buildConfigWithMeta` is the shared core — files are read
|
|
73
|
+
* exactly once, no double-read.
|
|
74
|
+
*/
|
|
75
|
+
export declare function loadPluginConfigWithMeta(directory: string): ConfigLoadResult;
|
|
56
76
|
/**
|
|
57
77
|
* Async variant of `loadPluginConfigWithMeta`. Used by the plugin entry
|
|
58
78
|
* (issue #704) so initialization does not perform synchronous fs reads.
|
|
79
|
+
* Calls the same `buildConfigWithMeta` shared core as the sync path — the
|
|
80
|
+
* only difference is that file I/O uses `node:fs/promises` (issue #1900 FR-1).
|
|
59
81
|
*/
|
|
60
|
-
export declare function loadPluginConfigWithMetaAsync(directory: string): Promise<
|
|
61
|
-
config: PluginConfig;
|
|
62
|
-
loadedFromFile: boolean;
|
|
63
|
-
configHadErrors: boolean;
|
|
64
|
-
recovery: RecoveryType;
|
|
65
|
-
removedKeys: string[];
|
|
66
|
-
warnings: string[];
|
|
67
|
-
}>;
|
|
82
|
+
export declare function loadPluginConfigWithMetaAsync(directory: string): Promise<ConfigLoadResult>;
|
|
68
83
|
/**
|
|
69
84
|
* Load custom prompt for an agent from the prompts directory.
|
|
70
85
|
* Checks for {agent}.md (replaces default) and {agent}_append.md (appends).
|
|
@@ -79,6 +79,20 @@ interface PrFeedbackReadyToPublishRecord {
|
|
|
79
79
|
}
|
|
80
80
|
export type PrWorkflowCompletionStatus = 'completed' | 'ready-to-publish';
|
|
81
81
|
export type PrReviewValidationPhase = 'council' | 'reviewer' | 'critic';
|
|
82
|
+
export type PrReviewArtifactBoundary = 'post_explorer' | 'post_reviewer' | 'post_critic';
|
|
83
|
+
type PrReviewArtifactRecord = {
|
|
84
|
+
finding_id: string;
|
|
85
|
+
status: 'PENDING' | 'CONFIRMED' | 'DISPROVED' | 'PRE_EXISTING';
|
|
86
|
+
next_action: 'route_to_reviewer' | 'route_to_critic' | 'report' | 'suppress_with_reason' | 'handoff_to_feedback';
|
|
87
|
+
severity?: 'CRITICAL' | 'HIGH' | 'MEDIUM' | 'LOW';
|
|
88
|
+
};
|
|
89
|
+
interface PrFeedbackScopeDeclarationRecord {
|
|
90
|
+
taskId: string;
|
|
91
|
+
files: string[];
|
|
92
|
+
revisionDigest: string;
|
|
93
|
+
declaredAt: string;
|
|
94
|
+
consumedByCallId?: string;
|
|
95
|
+
}
|
|
82
96
|
interface PrReviewValidationBatchRecord {
|
|
83
97
|
batchId: string;
|
|
84
98
|
phase: PrReviewValidationPhase;
|
|
@@ -105,6 +119,11 @@ export interface PrWorkflowGateState {
|
|
|
105
119
|
prReviewBaseDispatch?: PrReviewBaseDispatchRecord;
|
|
106
120
|
prReviewTriggerEvalPath?: string;
|
|
107
121
|
prReviewValidationBatches?: PrReviewValidationBatchRecord[];
|
|
122
|
+
prReviewArtifactRunId?: string;
|
|
123
|
+
prReviewFindingsPath?: string;
|
|
124
|
+
prReviewArtifactBoundaries?: PrReviewArtifactBoundary[];
|
|
125
|
+
prReviewHandoffPath?: string;
|
|
126
|
+
prReviewHandoffRequired?: boolean;
|
|
108
127
|
prFeedbackInventory?: string[];
|
|
109
128
|
prFeedbackVerifications?: PrFeedbackVerificationRecord[];
|
|
110
129
|
/** @deprecated Compatibility projection of the most recent verification dispatch. */
|
|
@@ -112,6 +131,7 @@ export interface PrWorkflowGateState {
|
|
|
112
131
|
prFeedbackStageA?: PrFeedbackStageARecord;
|
|
113
132
|
prFeedbackGateBatches?: PrFeedbackGateBatchRecord[];
|
|
114
133
|
prFeedbackReadyToPublish?: PrFeedbackReadyToPublishRecord;
|
|
134
|
+
prFeedbackScopes?: PrFeedbackScopeDeclarationRecord[];
|
|
115
135
|
}
|
|
116
136
|
export declare function activatePrWorkflow(directory: string, sessionID: string, mode: PrWorkflowMode, options?: {
|
|
117
137
|
prHeadSha?: string;
|
|
@@ -210,6 +230,25 @@ export declare function assertPrFeedbackGatePhaseSettled(directory: string, sess
|
|
|
210
230
|
/** Require every ordered feedback gate on one unchanged revision. */
|
|
211
231
|
export declare function assertPrFeedbackReadyToPublish(directory: string, sessionID: string): Promise<PrWorkflowGateState>;
|
|
212
232
|
export declare function markPrReviewTriggerEvaluationComplete(directory: string, sessionID: string, artifactPath: string): Promise<PrWorkflowGateState>;
|
|
233
|
+
export declare function assertPrReviewArtifactBoundary(directory: string, sessionID: string, runId: string, boundary: PrReviewArtifactBoundary, findingIds: string[]): Promise<PrWorkflowGateState>;
|
|
234
|
+
/**
|
|
235
|
+
* Artifact records are a projection of lane receipts, never a caller-controlled
|
|
236
|
+
* replacement for them. Keep their workflow status/action aligned with the
|
|
237
|
+
* reviewer and critic rows that the gate already authenticated.
|
|
238
|
+
*/
|
|
239
|
+
export declare function assertPrReviewArtifactRecordsMatchAuthoritativeVerdicts(directory: string, sessionID: string, boundary: PrReviewArtifactBoundary, records: readonly PrReviewArtifactRecord[]): Promise<void>;
|
|
240
|
+
export declare function markPrReviewArtifactBoundary(directory: string, sessionID: string, runId: string, boundary: PrReviewArtifactBoundary, artifactPath: string, findingIds: string[], handoffRequired: boolean): Promise<PrWorkflowGateState>;
|
|
241
|
+
export declare function markPrReviewHandoffComplete(directory: string, sessionID: string, runId: string, artifactPath: string): Promise<PrWorkflowGateState>;
|
|
242
|
+
export declare function declarePrFeedbackScope(directory: string, sessionID: string, taskId: string, files: string[]): Promise<PrWorkflowGateState>;
|
|
243
|
+
export declare function resolvePrFeedbackScopeDeclaration(directory: string, sessionID: string, taskId: string): Promise<PrFeedbackScopeDeclarationRecord | null>;
|
|
244
|
+
export declare function consumePrFeedbackScopeDeclaration(directory: string, sessionID: string, taskId: string, callID: string): Promise<PrFeedbackScopeDeclarationRecord | null>;
|
|
245
|
+
export declare function validatePrFeedbackScopeBinding(directory: string, binding: {
|
|
246
|
+
taskId: string;
|
|
247
|
+
files: string[];
|
|
248
|
+
dispatchCallId?: string;
|
|
249
|
+
workflowSessionId?: string;
|
|
250
|
+
workflowRevisionDigest?: string;
|
|
251
|
+
}): Promise<boolean>;
|
|
213
252
|
export declare function enforcePrWorkflowToolBefore(directory: string, sessionID: string, toolName: string, args: Record<string, unknown> | undefined, generatedAgentNames?: readonly string[]): Promise<void>;
|
|
214
253
|
/** Validate the terminal PR workflow contract before removing its durable gate. */
|
|
215
254
|
export declare function completePrWorkflow(directory: string, sessionID: string, expectedMode: PrWorkflowMode, prHeadSha: string): Promise<PrWorkflowCompletionStatus>;
|
|
@@ -8,8 +8,10 @@
|
|
|
8
8
|
* Fires BEFORE write/edit tools execute. When a coder attempts to modify a file
|
|
9
9
|
* outside its Task-correlated scope, blocks the call and injects an advisory.
|
|
10
10
|
*/
|
|
11
|
-
import {
|
|
11
|
+
import { getAuthorizedPrFeedbackScopeBinding } from '../scope/scope-binding';
|
|
12
|
+
import { resolveAuthorizedPrFeedbackScopeBindingFromDisk, resolveAuthorizedScopeBinding, resolveAuthorizedScopeBindingForSession } from '../scope/scope-persistence';
|
|
12
13
|
import { type AgentSessionState } from '../state';
|
|
14
|
+
import { validatePrFeedbackScopeBinding } from './pr-workflow-gate';
|
|
13
15
|
import { resolveWriteTargets } from './write-target-resolver';
|
|
14
16
|
/**
|
|
15
17
|
* Configuration for scope guard behavior.
|
|
@@ -69,6 +71,9 @@ export declare const _internals: {
|
|
|
69
71
|
resolveWriteTargets: typeof resolveWriteTargets;
|
|
70
72
|
resolveAuthorizedScopeBinding: typeof resolveAuthorizedScopeBinding;
|
|
71
73
|
resolveAuthorizedScopeBindingForSession: typeof resolveAuthorizedScopeBindingForSession;
|
|
74
|
+
getAuthorizedPrFeedbackScopeBinding: typeof getAuthorizedPrFeedbackScopeBinding;
|
|
75
|
+
resolveAuthorizedPrFeedbackScopeBindingFromDisk: typeof resolveAuthorizedPrFeedbackScopeBindingFromDisk;
|
|
76
|
+
validatePrFeedbackScopeBinding: typeof validatePrFeedbackScopeBinding;
|
|
72
77
|
resolveTaskId: (session: AgentSessionState | undefined) => string | null;
|
|
73
78
|
};
|
|
74
79
|
export {};
|