opencode-swarm 7.134.1 → 7.134.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/swarm-pr-feedback/SKILL.md +10 -3
- package/.opencode/skills/swarm-pr-review/SKILL.md +11 -3
- package/README.md +1 -1
- package/dist/background/pr-event-delivery.d.ts +8 -0
- package/dist/background/pr-event-subscribers.d.ts +5 -0
- package/dist/background/pr-feedback-event-queue.d.ts +37 -0
- package/dist/background/workspace-snapshot.d.ts +8 -3
- package/dist/cli/{config-doctor-4avzz3rh.js → config-doctor-yqwm2tfh.js} +2 -2
- package/dist/cli/{curation-policy-8vkzjtwb.js → curation-policy-x5m4x34n.js} +2 -2
- package/dist/cli/{curator-llm-factory-2qk8q4y9.js → curator-llm-factory-24mjnh2y.js} +14 -14
- package/dist/cli/{curator-3vsvhwav.js → curator-thrwgwh1.js} +14 -14
- package/dist/cli/{evidence-summary-service-mrzsjpg4.js → evidence-summary-service-pay9409b.js} +1 -1
- package/dist/cli/{guardrail-explain-tw521x47.js → guardrail-explain-nmfq71cm.js} +15 -15
- package/dist/cli/{guardrail-log-e3jrwdw8.js → guardrail-log-2a61rz1w.js} +3 -3
- package/dist/cli/{hive-promoter-sdy5qjzn.js → hive-promoter-2nkjjwgc.js} +14 -14
- package/dist/cli/{index-m8ajf6wb.js → index-1mq8kmp6.js} +3 -3
- package/dist/cli/{index-bq2848a3.js → index-2b7sv71f.js} +1 -1
- package/dist/cli/{index-h3k62043.js → index-3nasn371.js} +47 -12
- package/dist/cli/{index-0541h76w.js → index-5f403c30.js} +1 -1
- package/dist/cli/{index-358f9h8p.js → index-6kfqz0jw.js} +3203 -2039
- package/dist/cli/{index-8t9xpn1a.js → index-6wya5cqh.js} +1 -1
- package/dist/cli/{index-k742ecbm.js → index-8fhg2nt2.js} +2 -2
- package/dist/cli/{index-9z1q181f.js → index-8wktghbc.js} +1 -1
- package/dist/cli/{index-c0e3vhv9.js → index-ddxt327j.js} +1 -1
- package/dist/cli/{index-kwm7hz18.js → index-mgr951p8.js} +5 -5
- package/dist/cli/{index-6b69mp0r.js → index-q3m6bpx2.js} +2 -2
- package/dist/cli/{index-463k8mfr.js → index-reesz606.js} +2 -2
- package/dist/cli/{index-2j8f71c3.js → index-rjngxx7q.js} +4 -4
- package/dist/cli/{index-y2esw64s.js → index-tsmjmhnk.js} +1 -1
- package/dist/cli/{index-mz6sqtm9.js → index-txwm0fv4.js} +16 -16
- package/dist/cli/{index-zjw32rv9.js → index-y3rj2jgb.js} +1 -1
- package/dist/cli/{index-pz49rx4y.js → index-yaptf0hg.js} +2 -2
- package/dist/cli/{index-1v5mby7t.js → index-yqvh2s4w.js} +1 -1
- package/dist/cli/index.js +14 -14
- package/dist/cli/{knowledge-escalator-v09w0jmg.js → knowledge-escalator-fqsavryx.js} +3 -3
- package/dist/cli/{knowledge-events-qp19r2he.js → knowledge-events-ykt8vrvj.js} +1 -1
- package/dist/cli/{knowledge-store-n5pvv0s3.js → knowledge-store-tpd98m39.js} +1 -1
- package/dist/cli/{knowledge-validator-qg31ycbb.js → knowledge-validator-kc7fnt2r.js} +4 -4
- package/dist/cli/{scan-cursor-wtzfvkh2.js → scan-cursor-121b73j0.js} +2 -2
- package/dist/cli/{schema-erk5bz43.js → schema-jb4p8ja9.js} +1 -1
- package/dist/cli/{skill-generator-nxs65tq3.js → skill-generator-m2g5mdva.js} +5 -5
- package/dist/cli/{workspace-snapshot-35qc0y8a.js → workspace-snapshot-9h5za0s6.js} +3 -1
- package/dist/commands/pr-feedback.d.ts +15 -2
- package/dist/git/pr-workflow-state.d.ts +37 -0
- package/dist/hooks/pr-workflow-gate.d.ts +42 -2
- package/dist/hooks/pr-workflow-response-gate.d.ts +3 -0
- package/dist/hooks/shell-write-detect.d.ts +1 -1
- package/dist/index.js +490 -476
- package/dist/tools/pr-workflow-status.d.ts +2 -0
- package/dist/tools/pre-check-batch.d.ts +22 -0
- package/dist/tools/prepare-pr-workflow-checkout.d.ts +2 -0
- package/package.json +1 -1
|
@@ -608,7 +608,7 @@ async function applyKnowledgeVerdictFeedback(directory, options) {
|
|
|
608
608
|
deltas.push({ id, delta });
|
|
609
609
|
}
|
|
610
610
|
if (deltas.length > 0) {
|
|
611
|
-
const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-
|
|
611
|
+
const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-tpd98m39.js");
|
|
612
612
|
await bumpKnowledgeConfidenceBatch(directory, deltas, options?.floorOptions);
|
|
613
613
|
}
|
|
614
614
|
return {
|
|
@@ -180,7 +180,7 @@ class BubblewrapSandboxExecutor {
|
|
|
180
180
|
"--dev",
|
|
181
181
|
"/dev",
|
|
182
182
|
"--size",
|
|
183
|
-
|
|
183
|
+
String(TMPFS_SIZE_BYTES),
|
|
184
184
|
"--tmpfs",
|
|
185
185
|
`'${shellEscape(temp)}'`,
|
|
186
186
|
"--ro-bind",
|
|
@@ -210,7 +210,7 @@ class BubblewrapSandboxExecutor {
|
|
|
210
210
|
return {};
|
|
211
211
|
}
|
|
212
212
|
}
|
|
213
|
-
var BWRAP_VERSION_EXIT = 0, BWRAP_UNAVAILABLE_CODES, _internals2;
|
|
213
|
+
var BWRAP_VERSION_EXIT = 0, BWRAP_UNAVAILABLE_CODES, TMPFS_SIZE_BYTES = 524288000, _internals2;
|
|
214
214
|
var init_bubblewrap_executor = __esm(() => {
|
|
215
215
|
init_logger();
|
|
216
216
|
init_executor();
|
|
@@ -6,13 +6,13 @@ import {
|
|
|
6
6
|
resolveSwarmKnowledgePath,
|
|
7
7
|
transactKnowledge,
|
|
8
8
|
wordBigrams
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-rjngxx7q.js";
|
|
10
10
|
import {
|
|
11
11
|
countEntryContradictionsInWindow,
|
|
12
12
|
countEntryViolationsInWindow,
|
|
13
13
|
readKnowledgeEvents,
|
|
14
14
|
recordKnowledgeEvent
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-6wya5cqh.js";
|
|
16
16
|
import {
|
|
17
17
|
init_knowledge_types,
|
|
18
18
|
isActiveStatus
|
|
@@ -190,11 +190,11 @@ async function maybeQuarantineOnContradiction(directory, entryId, threshold, win
|
|
|
190
190
|
alreadyInactive: true
|
|
191
191
|
};
|
|
192
192
|
}
|
|
193
|
-
const { quarantineEntry } = await import("./knowledge-validator-
|
|
193
|
+
const { quarantineEntry } = await import("./knowledge-validator-kc7fnt2r.js");
|
|
194
194
|
let policyConfig;
|
|
195
195
|
try {
|
|
196
|
-
const { KnowledgeConfigSchema } = await import("./schema-
|
|
197
|
-
const { loadPluginConfigWithMeta } = await import("./index-
|
|
196
|
+
const { KnowledgeConfigSchema } = await import("./schema-jb4p8ja9.js");
|
|
197
|
+
const { loadPluginConfigWithMeta } = await import("./index-reesz606.js");
|
|
198
198
|
const { config: loadedConfig } = loadPluginConfigWithMeta(directory);
|
|
199
199
|
policyConfig = KnowledgeConfigSchema.parse(loadedConfig.knowledge ?? {});
|
|
200
200
|
} catch {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
authorizeCuration
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-y3rj2jgb.js";
|
|
5
5
|
import {
|
|
6
6
|
findNearDuplicate,
|
|
7
7
|
inferTags,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
resolveSwarmKnowledgePath,
|
|
10
10
|
resolveSwarmRejectedPath,
|
|
11
11
|
transactKnowledge
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-rjngxx7q.js";
|
|
13
13
|
import {
|
|
14
14
|
resolveKnowledgeStoreDir
|
|
15
15
|
} from "./index-cfkvc5q9.js";
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
loadPluginConfigWithMeta,
|
|
8
8
|
loadPluginConfigWithMetaAsync,
|
|
9
9
|
resolveWorktreeIsolationConfig
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-ddxt327j.js";
|
|
11
11
|
import {
|
|
12
12
|
ApprovalEvidenceSchema,
|
|
13
13
|
BaseEvidenceSchema,
|
|
@@ -62,7 +62,7 @@ import {
|
|
|
62
62
|
isQAAgent,
|
|
63
63
|
isSubagent,
|
|
64
64
|
resolveAutoReviewConfig
|
|
65
|
-
} from "./index-
|
|
65
|
+
} from "./index-tsmjmhnk.js";
|
|
66
66
|
import"./index-bk5tah7q.js";
|
|
67
67
|
import {
|
|
68
68
|
MigrationStatusSchema,
|
|
@@ -702,7 +702,7 @@ async function applyConfidenceFloorAction(directory, touched, options) {
|
|
|
702
702
|
const recovered = touched.filter((e) => e.confidence > CONFIDENCE_FLOOR + FLOOR_EPSILON && e.confidence_floor_demoted);
|
|
703
703
|
if (atFloor.length === 0 && recovered.length === 0)
|
|
704
704
|
return;
|
|
705
|
-
const { readKnowledgeCounterRollups, effectiveRetrievalOutcomes } = await import("./knowledge-events-
|
|
705
|
+
const { readKnowledgeCounterRollups, effectiveRetrievalOutcomes } = await import("./knowledge-events-ykt8vrvj.js");
|
|
706
706
|
const rollups = await readKnowledgeCounterRollups(directory);
|
|
707
707
|
const flagIds = new Set;
|
|
708
708
|
for (const e of atFloor) {
|
|
@@ -769,11 +769,11 @@ async function applyConfidenceFloorAction(directory, touched, options) {
|
|
|
769
769
|
});
|
|
770
770
|
}
|
|
771
771
|
if (action === "quarantine" && toQuarantine.length > 0) {
|
|
772
|
-
const { quarantineEntry } = await import("./knowledge-validator-
|
|
773
|
-
const { KnowledgeConfigSchema } = await import("./schema-
|
|
772
|
+
const { quarantineEntry } = await import("./knowledge-validator-kc7fnt2r.js");
|
|
773
|
+
const { KnowledgeConfigSchema } = await import("./schema-jb4p8ja9.js");
|
|
774
774
|
let config;
|
|
775
775
|
try {
|
|
776
|
-
const { loadPluginConfigWithMeta } = await import("./index-
|
|
776
|
+
const { loadPluginConfigWithMeta } = await import("./index-reesz606.js");
|
|
777
777
|
const { config: loadedConfig } = loadPluginConfigWithMeta(directory);
|
|
778
778
|
config = KnowledgeConfigSchema.parse(loadedConfig.knowledge ?? {});
|
|
779
779
|
} catch {
|
|
@@ -19,7 +19,7 @@ var package_default;
|
|
|
19
19
|
var init_package = __esm(() => {
|
|
20
20
|
package_default = {
|
|
21
21
|
name: "opencode-swarm",
|
|
22
|
-
version: "7.134.
|
|
22
|
+
version: "7.134.3",
|
|
23
23
|
description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
|
|
24
24
|
main: "dist/index.js",
|
|
25
25
|
types: "dist/index.d.ts",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
handleGuardrailExplain
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-yaptf0hg.js";
|
|
5
5
|
import {
|
|
6
6
|
handleGuardrailLog
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-8wktghbc.js";
|
|
8
8
|
import {
|
|
9
9
|
COMMAND_REGISTRY,
|
|
10
10
|
SWARM_COMMAND_TOOL_ALLOWLIST,
|
|
@@ -84,30 +84,30 @@ import {
|
|
|
84
84
|
handleWriteRetroCommand,
|
|
85
85
|
normalizeSwarmCommandInput,
|
|
86
86
|
resolveCommand
|
|
87
|
-
} from "./index-
|
|
87
|
+
} from "./index-6kfqz0jw.js";
|
|
88
88
|
import"./index-13xxjfhn.js";
|
|
89
|
-
import"./index-
|
|
90
|
-
import"./index-
|
|
91
|
-
import"./index-
|
|
89
|
+
import"./index-yqvh2s4w.js";
|
|
90
|
+
import"./index-2b7sv71f.js";
|
|
91
|
+
import"./index-8fhg2nt2.js";
|
|
92
92
|
import"./index-4905hd2m.js";
|
|
93
93
|
import"./index-134d35c1.js";
|
|
94
|
-
import"./index-
|
|
95
|
-
import"./index-
|
|
96
|
-
import"./index-
|
|
94
|
+
import"./index-1mq8kmp6.js";
|
|
95
|
+
import"./index-mgr951p8.js";
|
|
96
|
+
import"./index-5f403c30.js";
|
|
97
97
|
import"./index-vxv732ex.js";
|
|
98
98
|
import"./index-c8s9a3zh.js";
|
|
99
99
|
import"./index-9ss2m4rs.js";
|
|
100
100
|
import"./index-wk1h5ec2.js";
|
|
101
101
|
import"./index-1j3682j8.js";
|
|
102
|
-
import"./index-
|
|
103
|
-
import"./index-
|
|
102
|
+
import"./index-q3m6bpx2.js";
|
|
103
|
+
import"./index-y3rj2jgb.js";
|
|
104
104
|
import"./index-rtry5xyf.js";
|
|
105
|
-
import"./index-
|
|
106
|
-
import"./index-
|
|
105
|
+
import"./index-rjngxx7q.js";
|
|
106
|
+
import"./index-6wya5cqh.js";
|
|
107
107
|
import"./index-ae75rja9.js";
|
|
108
108
|
import"./index-cfkvc5q9.js";
|
|
109
109
|
import"./index-dd7ttx8x.js";
|
|
110
|
-
import"./index-
|
|
110
|
+
import"./index-ddxt327j.js";
|
|
111
111
|
import"./index-k5jrywpr.js";
|
|
112
112
|
import"./index-n832052r.js";
|
|
113
113
|
import {
|
|
@@ -116,7 +116,7 @@ import {
|
|
|
116
116
|
init_constants,
|
|
117
117
|
init_schema,
|
|
118
118
|
stripKnownSwarmPrefix
|
|
119
|
-
} from "./index-
|
|
119
|
+
} from "./index-tsmjmhnk.js";
|
|
120
120
|
import"./index-bk5tah7q.js";
|
|
121
121
|
import"./index-8fwhhayc.js";
|
|
122
122
|
import"./index-q1exe2b3.js";
|
|
@@ -138,7 +138,7 @@ import"./index-z6xqpmqg.js";
|
|
|
138
138
|
import"./index-zjygnfay.js";
|
|
139
139
|
import"./index-qe3v54nb.js";
|
|
140
140
|
import"./index-zgwm4ryv.js";
|
|
141
|
-
import"./index-
|
|
141
|
+
import"./index-3nasn371.js";
|
|
142
142
|
import"./index-a76rekgs.js";
|
|
143
143
|
|
|
144
144
|
// src/commands/index.ts
|
|
@@ -12,14 +12,14 @@ import {
|
|
|
12
12
|
detectPosixWrites,
|
|
13
13
|
detectWindowsWrites,
|
|
14
14
|
resolveWriteTargets
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-6kfqz0jw.js";
|
|
16
16
|
import {
|
|
17
17
|
checkFileAuthority,
|
|
18
18
|
classifyFile,
|
|
19
19
|
isInDeclaredScope,
|
|
20
20
|
redactPath,
|
|
21
21
|
redactShellCommand
|
|
22
|
-
} from "./index-
|
|
22
|
+
} from "./index-yqvh2s4w.js";
|
|
23
23
|
|
|
24
24
|
// src/services/guardrail-explain-service.ts
|
|
25
25
|
import path from "path";
|
package/dist/cli/index.js
CHANGED
|
@@ -6,30 +6,30 @@ import {
|
|
|
6
6
|
getPluginConfigDir,
|
|
7
7
|
getPluginLockFilePaths,
|
|
8
8
|
resolveCommand
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-6kfqz0jw.js";
|
|
10
10
|
import"./index-13xxjfhn.js";
|
|
11
|
-
import"./index-
|
|
12
|
-
import"./index-
|
|
13
|
-
import"./index-
|
|
11
|
+
import"./index-yqvh2s4w.js";
|
|
12
|
+
import"./index-2b7sv71f.js";
|
|
13
|
+
import"./index-8fhg2nt2.js";
|
|
14
14
|
import"./index-4905hd2m.js";
|
|
15
15
|
import"./index-134d35c1.js";
|
|
16
|
-
import"./index-
|
|
17
|
-
import"./index-
|
|
18
|
-
import"./index-
|
|
16
|
+
import"./index-1mq8kmp6.js";
|
|
17
|
+
import"./index-mgr951p8.js";
|
|
18
|
+
import"./index-5f403c30.js";
|
|
19
19
|
import"./index-vxv732ex.js";
|
|
20
20
|
import"./index-c8s9a3zh.js";
|
|
21
21
|
import"./index-9ss2m4rs.js";
|
|
22
22
|
import"./index-wk1h5ec2.js";
|
|
23
23
|
import"./index-1j3682j8.js";
|
|
24
|
-
import"./index-
|
|
25
|
-
import"./index-
|
|
24
|
+
import"./index-q3m6bpx2.js";
|
|
25
|
+
import"./index-y3rj2jgb.js";
|
|
26
26
|
import"./index-rtry5xyf.js";
|
|
27
|
-
import"./index-
|
|
28
|
-
import"./index-
|
|
27
|
+
import"./index-rjngxx7q.js";
|
|
28
|
+
import"./index-6wya5cqh.js";
|
|
29
29
|
import"./index-ae75rja9.js";
|
|
30
30
|
import"./index-cfkvc5q9.js";
|
|
31
31
|
import"./index-dd7ttx8x.js";
|
|
32
|
-
import"./index-
|
|
32
|
+
import"./index-ddxt327j.js";
|
|
33
33
|
import"./index-k5jrywpr.js";
|
|
34
34
|
import"./index-n832052r.js";
|
|
35
35
|
import {
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
init_constants,
|
|
38
38
|
init_package,
|
|
39
39
|
package_default
|
|
40
|
-
} from "./index-
|
|
40
|
+
} from "./index-tsmjmhnk.js";
|
|
41
41
|
import"./index-bk5tah7q.js";
|
|
42
42
|
import"./index-8fwhhayc.js";
|
|
43
43
|
import"./index-q1exe2b3.js";
|
|
@@ -59,7 +59,7 @@ import"./index-z6xqpmqg.js";
|
|
|
59
59
|
import"./index-zjygnfay.js";
|
|
60
60
|
import"./index-qe3v54nb.js";
|
|
61
61
|
import"./index-zgwm4ryv.js";
|
|
62
|
-
import"./index-
|
|
62
|
+
import"./index-3nasn371.js";
|
|
63
63
|
import"./index-a76rekgs.js";
|
|
64
64
|
|
|
65
65
|
// src/cli/index.ts
|
|
@@ -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-mgr951p8.js";
|
|
12
|
+
import"./index-rjngxx7q.js";
|
|
13
|
+
import"./index-6wya5cqh.js";
|
|
14
14
|
import"./index-ae75rja9.js";
|
|
15
15
|
import"./index-cfkvc5q9.js";
|
|
16
16
|
import"./index-dd7ttx8x.js";
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
resolveKnowledgeCounterBaselinePath,
|
|
27
27
|
resolveKnowledgeEventsPath,
|
|
28
28
|
resolveLegacyApplicationLogPath
|
|
29
|
-
} from "./index-
|
|
29
|
+
} from "./index-6wya5cqh.js";
|
|
30
30
|
import"./index-ae75rja9.js";
|
|
31
31
|
import"./index-cfkvc5q9.js";
|
|
32
32
|
import"./index-dd7ttx8x.js";
|
|
@@ -23,11 +23,11 @@ import {
|
|
|
23
23
|
validateLesson,
|
|
24
24
|
validateSkillCandidatePath,
|
|
25
25
|
validateSkillPath
|
|
26
|
-
} from "./index-
|
|
27
|
-
import"./index-
|
|
26
|
+
} from "./index-q3m6bpx2.js";
|
|
27
|
+
import"./index-y3rj2jgb.js";
|
|
28
28
|
import"./index-rtry5xyf.js";
|
|
29
|
-
import"./index-
|
|
30
|
-
import"./index-
|
|
29
|
+
import"./index-rjngxx7q.js";
|
|
30
|
+
import"./index-6wya5cqh.js";
|
|
31
31
|
import"./index-ae75rja9.js";
|
|
32
32
|
import"./index-cfkvc5q9.js";
|
|
33
33
|
import"./index-dd7ttx8x.js";
|
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
alreadyCuratedThisGeneration,
|
|
5
5
|
claimNextScanBatch,
|
|
6
6
|
getScanStatus
|
|
7
|
-
} from "./index-
|
|
8
|
-
import"./index-
|
|
7
|
+
} from "./index-5f403c30.js";
|
|
8
|
+
import"./index-rjngxx7q.js";
|
|
9
9
|
import"./index-ae75rja9.js";
|
|
10
10
|
import"./index-cfkvc5q9.js";
|
|
11
11
|
import"./index-dd7ttx8x.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-1mq8kmp6.js";
|
|
37
|
+
import"./index-q3m6bpx2.js";
|
|
38
|
+
import"./index-y3rj2jgb.js";
|
|
39
39
|
import"./index-rtry5xyf.js";
|
|
40
|
-
import"./index-
|
|
41
|
-
import"./index-
|
|
40
|
+
import"./index-rjngxx7q.js";
|
|
41
|
+
import"./index-6wya5cqh.js";
|
|
42
42
|
import"./index-ae75rja9.js";
|
|
43
43
|
import"./index-cfkvc5q9.js";
|
|
44
44
|
import"./index-dd7ttx8x.js";
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
compareWorkspaceSnapshots,
|
|
8
8
|
digest,
|
|
9
9
|
parsePorcelainPaths,
|
|
10
|
+
parsePorcelainV2Snapshot,
|
|
10
11
|
readGitTextAtRevision,
|
|
11
12
|
resolveCommitCountSince,
|
|
12
13
|
resolveCommitCountSinceAsync,
|
|
@@ -32,7 +33,7 @@ import {
|
|
|
32
33
|
resolveRemoteRefsContainingHead,
|
|
33
34
|
resolveRemoteRefsContainingHeadAsync,
|
|
34
35
|
workspaceSnapshotMatches
|
|
35
|
-
} from "./index-
|
|
36
|
+
} from "./index-3nasn371.js";
|
|
36
37
|
import"./index-a76rekgs.js";
|
|
37
38
|
export {
|
|
38
39
|
workspaceSnapshotMatches,
|
|
@@ -60,6 +61,7 @@ export {
|
|
|
60
61
|
resolveCommitCountSinceAsync,
|
|
61
62
|
resolveCommitCountSince,
|
|
62
63
|
readGitTextAtRevision,
|
|
64
|
+
parsePorcelainV2Snapshot,
|
|
63
65
|
parsePorcelainPaths,
|
|
64
66
|
digest,
|
|
65
67
|
compareWorkspaceSnapshots,
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* Input contract (PR reference is optional):
|
|
10
10
|
* /swarm pr-feedback 155 → feedback pass on PR 155
|
|
11
11
|
* /swarm pr-feedback 155 also fix the lint errors → PR 155 + extra instructions
|
|
12
|
-
* /swarm pr-feedback 155 continue from .swarm/pr-review/<run_id>/feedback-handoff.
|
|
13
|
-
* -> PR 155 +
|
|
12
|
+
* /swarm pr-feedback 155 continue from .swarm/pr-review/<run_id>/feedback-handoff.json
|
|
13
|
+
* -> PR 155 + exact transition request
|
|
14
14
|
* /swarm pr-feedback owner/repo#155 → shorthand
|
|
15
15
|
* /swarm pr-feedback https://github.com/.../pull/155
|
|
16
16
|
* /swarm pr-feedback → bare signal; architect builds
|
|
@@ -22,4 +22,17 @@
|
|
|
22
22
|
* PR-reference parsing and injection-hardening are shared with /swarm pr-review
|
|
23
23
|
* via ./pr-ref.ts.
|
|
24
24
|
*/
|
|
25
|
+
export interface PrFeedbackContinuationRequest {
|
|
26
|
+
runId: string;
|
|
27
|
+
handoffPath: string;
|
|
28
|
+
instructions: string;
|
|
29
|
+
}
|
|
30
|
+
export interface PrFeedbackCommandInput {
|
|
31
|
+
prUrl?: string;
|
|
32
|
+
instructions: string;
|
|
33
|
+
continuation?: PrFeedbackContinuationRequest;
|
|
34
|
+
error?: string;
|
|
35
|
+
errorKind?: 'pr-reference' | 'continuation';
|
|
36
|
+
}
|
|
37
|
+
export declare function parsePrFeedbackCommandInput(directory: string, args: string[]): PrFeedbackCommandInput;
|
|
25
38
|
export declare function handlePrFeedbackCommand(directory: string, args: string[]): string;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { parsePorcelainV2Snapshot } from '../background/workspace-snapshot.js';
|
|
2
|
+
export type PrWorkflowGitStateKind = 'clean' | 'stashable' | 'recovery-required' | 'indeterminate';
|
|
3
|
+
export interface PrWorkflowGitState {
|
|
4
|
+
kind: PrWorkflowGitStateKind;
|
|
5
|
+
code: 'CLEAN' | 'STASHABLE_CHANGES' | 'UNMERGED_INDEX' | 'GIT_OPERATION_IN_PROGRESS' | 'DIRTY_SUBMODULE' | 'SWARM_STATE_TRACKING_ERROR' | 'GIT_STATE_INDETERMINATE';
|
|
6
|
+
retryable: boolean;
|
|
7
|
+
requiredAction: string;
|
|
8
|
+
evidence: {
|
|
9
|
+
worktreeRoot: string | null;
|
|
10
|
+
gitDir: string | null;
|
|
11
|
+
operations: string[];
|
|
12
|
+
unmergedCodes: string[];
|
|
13
|
+
paths: string[];
|
|
14
|
+
trackedCount: number;
|
|
15
|
+
untrackedCount: number;
|
|
16
|
+
pathsTruncated: boolean;
|
|
17
|
+
detail?: string;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
interface GitCaptureResult {
|
|
21
|
+
ok: boolean;
|
|
22
|
+
stdout: string;
|
|
23
|
+
}
|
|
24
|
+
declare function runGitCapture(directory: string, args: readonly string[]): Promise<GitCaptureResult>;
|
|
25
|
+
declare function activeOperations(gitDir: string): Promise<string[]>;
|
|
26
|
+
/**
|
|
27
|
+
* Classify the checkout before a PR workflow can take ownership of it.
|
|
28
|
+
* Unknown Git state fails closed; ordinary tracked/untracked dirt is explicitly
|
|
29
|
+
* distinguished from conflict and in-progress-operation recovery states.
|
|
30
|
+
*/
|
|
31
|
+
export declare function classifyPrWorkflowGitState(directory: string): Promise<PrWorkflowGitState>;
|
|
32
|
+
export declare const _internals: {
|
|
33
|
+
runGitCapture: typeof runGitCapture;
|
|
34
|
+
activeOperations: typeof activeOperations;
|
|
35
|
+
parsePorcelainV2: typeof parsePorcelainV2Snapshot;
|
|
36
|
+
};
|
|
37
|
+
export {};
|
|
@@ -1,9 +1,27 @@
|
|
|
1
1
|
import * as fsp from 'node:fs/promises';
|
|
2
2
|
import { resolveCommitCountSince, resolveCommitCountSinceAsync, resolveCurrentGitHead, resolveCurrentGitHeadAsync, resolveCurrentUpstreamPushTarget, resolveCurrentUpstreamPushTargetAsync, resolveCurrentUpstreamRemoteRef, resolveExactRemoteBranchHead, resolveExactRemoteBranchHeadAsync, resolveIsExactSingleChildCommit, resolveIsExactSingleChildCommitAsync, resolveIsWorkingTreeClean, resolveIsWorkingTreeCleanAsync, resolvePrReviewDiffStats, resolvePrReviewDiffStatsAsync, resolvePrWorkflowRevisionDigest, resolveRemoteRefsContainingHead, resolveRemoteRefsContainingHeadAsync } from '../background/workspace-snapshot.js';
|
|
3
|
+
import { type PrWorkflowGitState } from '../git/pr-workflow-state.js';
|
|
3
4
|
export declare const PR_REVIEW_BASE_DIMENSION_IDS: readonly ["intent-architecture", "correctness-state", "tests-falsifiability", "security-trust", "reliability-performance", "compatibility-delivery"];
|
|
4
5
|
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"];
|
|
5
6
|
export type PrReviewBaseDimensionId = (typeof PR_REVIEW_BASE_DIMENSION_IDS)[number];
|
|
6
7
|
export type PrWorkflowMode = 'PR_REVIEW' | 'PR_FEEDBACK';
|
|
8
|
+
export interface PrWorkflowCheckoutRecoveryRecord {
|
|
9
|
+
code: 'UNMERGED_INDEX' | 'GIT_OPERATION_IN_PROGRESS' | 'DIRTY_SUBMODULE' | 'SWARM_STATE_TRACKING_ERROR' | 'GIT_STATE_INDETERMINATE';
|
|
10
|
+
retryable: false;
|
|
11
|
+
requiredAction: string;
|
|
12
|
+
evidence: PrWorkflowGitState['evidence'];
|
|
13
|
+
detectedAt: string;
|
|
14
|
+
}
|
|
15
|
+
export interface PrFeedbackReviewHandoffRecord {
|
|
16
|
+
path: string;
|
|
17
|
+
runId: string;
|
|
18
|
+
sourcePrHeadSha: string;
|
|
19
|
+
prUrl: string;
|
|
20
|
+
findingIds: string[];
|
|
21
|
+
digest: string;
|
|
22
|
+
sourceWorkflowInstanceId: string;
|
|
23
|
+
provenance: 'active-review-v1' | 'external-v1';
|
|
24
|
+
}
|
|
7
25
|
export type PrReviewDepthTier = 'S' | 'M' | 'L';
|
|
8
26
|
/**
|
|
9
27
|
* Objective size thresholds for the controller-computed PR-review depth tier.
|
|
@@ -156,6 +174,8 @@ export interface PrWorkflowGateState {
|
|
|
156
174
|
schemaVersion: 1;
|
|
157
175
|
/** Monotonic durable revision used to reject stale same-session transitions. */
|
|
158
176
|
revision: number;
|
|
177
|
+
/** Stable identity that prevents revision-only ABA during mode replacement. */
|
|
178
|
+
workflowInstanceId?: string;
|
|
159
179
|
sessionID: string;
|
|
160
180
|
mode: PrWorkflowMode;
|
|
161
181
|
activatedAt: string;
|
|
@@ -181,6 +201,10 @@ export interface PrWorkflowGateState {
|
|
|
181
201
|
prReviewArtifactBoundaries?: PrReviewArtifactBoundary[];
|
|
182
202
|
prReviewHandoffPath?: string;
|
|
183
203
|
prReviewHandoffRequired?: boolean;
|
|
204
|
+
checkoutRecovery?: PrWorkflowCheckoutRecoveryRecord;
|
|
205
|
+
/** HTTPS PR URL selected after canonical GitHub PR identity validation. */
|
|
206
|
+
prFeedbackTargetUrl?: string;
|
|
207
|
+
prFeedbackReviewHandoff?: PrFeedbackReviewHandoffRecord;
|
|
184
208
|
prFeedbackInventory?: string[];
|
|
185
209
|
prFeedbackVerifications?: PrFeedbackVerificationRecord[];
|
|
186
210
|
/** @deprecated Compatibility projection of the most recent verification dispatch. */
|
|
@@ -192,6 +216,8 @@ export interface PrWorkflowGateState {
|
|
|
192
216
|
}
|
|
193
217
|
export declare function activatePrWorkflow(directory: string, sessionID: string, mode: PrWorkflowMode, options?: {
|
|
194
218
|
prHeadSha?: string;
|
|
219
|
+
requireCheckoutPreflight?: boolean;
|
|
220
|
+
prUrl?: string;
|
|
195
221
|
}): Promise<PrWorkflowGateState>;
|
|
196
222
|
export declare function readPrWorkflowGateState(directory: string, sessionID: string): Promise<PrWorkflowGateState | null>;
|
|
197
223
|
/**
|
|
@@ -202,7 +228,9 @@ export declare function readPrWorkflowGateState(directory: string, sessionID: st
|
|
|
202
228
|
* it settles. The state passed to the action is schema-validated durable state,
|
|
203
229
|
* never a caller-supplied projection.
|
|
204
230
|
*/
|
|
205
|
-
export declare function withPrWorkflowCheckoutPreparationLock<T>(directory: string, sessionID: string, action: (state: PrWorkflowGateState
|
|
231
|
+
export declare function withPrWorkflowCheckoutPreparationLock<T>(directory: string, sessionID: string, action: (state: PrWorkflowGateState, controls: {
|
|
232
|
+
markRecoveryRequired: (gitState: PrWorkflowGitState) => Promise<PrWorkflowGateState>;
|
|
233
|
+
}) => Promise<T>): Promise<T>;
|
|
206
234
|
export declare function clearPrWorkflowGateState(directory: string, sessionID: string, expectedRevision?: number): Promise<void>;
|
|
207
235
|
/**
|
|
208
236
|
* Abort an active PR workflow gate without reaching terminal completion.
|
|
@@ -316,6 +344,11 @@ export declare function assertPrReviewArtifactBoundary(directory: string, sessio
|
|
|
316
344
|
export declare function assertPrReviewArtifactRecordsMatchAuthoritativeVerdicts(directory: string, sessionID: string, boundary: PrReviewArtifactBoundary, records: readonly PrReviewArtifactRecord[]): Promise<void>;
|
|
317
345
|
export declare function markPrReviewArtifactBoundary(directory: string, sessionID: string, runId: string, boundary: PrReviewArtifactBoundary, artifactPath: string, findingIds: string[], handoffRequired: boolean): Promise<PrWorkflowGateState>;
|
|
318
346
|
export declare function markPrReviewHandoffComplete(directory: string, sessionID: string, runId: string, artifactPath: string): Promise<PrWorkflowGateState>;
|
|
347
|
+
export declare function transitionPrReviewToFeedback(directory: string, sessionID: string, request: {
|
|
348
|
+
runId: string;
|
|
349
|
+
handoffPath: string;
|
|
350
|
+
prUrl?: string;
|
|
351
|
+
}): Promise<PrWorkflowGateState>;
|
|
319
352
|
export declare function declarePrFeedbackScope(directory: string, sessionID: string, taskId: string, files: string[]): Promise<PrWorkflowGateState>;
|
|
320
353
|
export declare function resolvePrFeedbackScopeDeclaration(directory: string, sessionID: string, taskId: string): Promise<PrFeedbackScopeDeclarationRecord | null>;
|
|
321
354
|
export declare function consumePrFeedbackScopeDeclaration(directory: string, sessionID: string, taskId: string, callID: string): Promise<PrFeedbackScopeDeclarationRecord | null>;
|
|
@@ -334,6 +367,12 @@ export declare const _test_exports: {
|
|
|
334
367
|
workflowGateStateLockRelativePath: typeof workflowGateStateLockRelativePath;
|
|
335
368
|
resetTrackedStateCache: () => void;
|
|
336
369
|
beforeTerminalClear: (() => Promise<void>) | undefined;
|
|
370
|
+
beforePrFeedbackTransitionLock: (() => Promise<void>) | undefined;
|
|
371
|
+
beforeBoundedSwarmFileOpen: (() => Promise<void>) | undefined;
|
|
372
|
+
beforeSessionStateLockWrite: (() => Promise<void>) | undefined;
|
|
373
|
+
beforeSafeDirectoryCreate: ((parentPath: string, nextPath: string) => Promise<void>) | undefined;
|
|
374
|
+
beforeAtomicTempWrite: (() => Promise<void>) | undefined;
|
|
375
|
+
beforeAtomicRename: (() => Promise<void>) | undefined;
|
|
337
376
|
resolveCurrentGitHead: typeof resolveCurrentGitHead;
|
|
338
377
|
resolveCurrentGitHeadAsync: typeof resolveCurrentGitHeadAsync;
|
|
339
378
|
resolveCurrentUpstreamPushTarget: typeof resolveCurrentUpstreamPushTarget;
|
|
@@ -378,10 +417,11 @@ declare function isProcessAlive(pid: number): boolean;
|
|
|
378
417
|
declare function workflowGateStateLockRelativePath(sessionID: string): string;
|
|
379
418
|
declare function workflowGateStateRelativePath(sessionID: string): string;
|
|
380
419
|
export declare function prWorkflowSessionFileStem(sessionID: string): string;
|
|
420
|
+
export declare function ensurePrWorkflowSafeParentDirectory(directory: string, filePath: string): Promise<string>;
|
|
381
421
|
/**
|
|
382
422
|
* Write a PR-workflow artifact with the gate's Windows-safe atomic persistence
|
|
383
423
|
* contract. Checkout-preparation receipts must survive the same transient
|
|
384
424
|
* rename contention as canonical gate state.
|
|
385
425
|
*/
|
|
386
|
-
export declare function writePrWorkflowAtomicJson(filePath: string, value: unknown): Promise<void>;
|
|
426
|
+
export declare function writePrWorkflowAtomicJson(directory: string, filePath: string, value: unknown): Promise<void>;
|
|
387
427
|
export {};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { claimPrFeedbackMonitorEvents, readPrFeedbackMonitorQueue } from '../background/pr-feedback-event-queue.js';
|
|
1
2
|
import { readPrWorkflowGateState } from './pr-workflow-gate.js';
|
|
2
3
|
export declare const _internals: {
|
|
3
4
|
readPrWorkflowGateState: typeof readPrWorkflowGateState;
|
|
5
|
+
claimPrFeedbackMonitorEvents: typeof claimPrFeedbackMonitorEvents;
|
|
6
|
+
readPrFeedbackMonitorQueue: typeof readPrFeedbackMonitorQueue;
|
|
4
7
|
};
|
|
5
8
|
/**
|
|
6
9
|
* Maximum number of consecutive unproductive auto-resumes per gated session
|
|
@@ -68,7 +68,7 @@ export declare function detectInteractiveSession(command: string, shell: 'posix'
|
|
|
68
68
|
*
|
|
69
69
|
* Detects:
|
|
70
70
|
* - Redirection operators: >, >>, >|, <<, <<- (here-docs)
|
|
71
|
-
* - Write-effect builtins: cp, mv, install, ln, truncate, dd (of=)
|
|
71
|
+
* - Write-effect builtins: cp, mv, install, ln, truncate, dd (of=), tee
|
|
72
72
|
* - In-place editors: sed -i, perl -i, awk -i
|
|
73
73
|
* - Interpreter eval: python -c, node -e, bun -e, ruby -e, perl -e, php -r
|
|
74
74
|
* - Network downloaders: curl -o, wget -O, scp
|