opencode-swarm 7.126.2 → 7.126.4

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.
Files changed (49) hide show
  1. package/.opencode/skills/engineering-conventions/SKILL.md +1 -1
  2. package/.opencode/skills/issue-tracer/scripts/trace-init.sh +20 -0
  3. package/.opencode/skills/swarm-pr-feedback/SKILL.md +14 -3
  4. package/.opencode/skills/swarm-pr-review/SKILL.md +28 -7
  5. package/dist/background/pr-event-delivery.d.ts +1 -1
  6. package/dist/cli/{config-doctor-mfx27331.js → config-doctor-2admdwc2.js} +2 -2
  7. package/dist/cli/{curation-policy-n944aq62.js → curation-policy-s2wydhda.js} +2 -2
  8. package/dist/cli/{curator-qfh9xty4.js → curator-4tp297kp.js} +12 -12
  9. package/dist/cli/{curator-llm-factory-0rf29gfq.js → curator-llm-factory-caf8jqyb.js} +12 -12
  10. package/dist/cli/{guardrail-explain-jsrjqps1.js → guardrail-explain-yjzbs0fq.js} +13 -13
  11. package/dist/cli/{guardrail-log-61gya05m.js → guardrail-log-7cychbgs.js} +3 -3
  12. package/dist/cli/{hive-promoter-ktt17fyf.js → hive-promoter-er83aqka.js} +12 -12
  13. package/dist/cli/{index-nqp13m5a.js → index-360anpk0.js} +1 -1
  14. package/dist/cli/{index-5nq8dp63.js → index-46xgqgd5.js} +14 -14
  15. package/dist/cli/{index-gwss5btk.js → index-4scxzpbz.js} +1 -1
  16. package/dist/cli/{index-c48dvb6j.js → index-6mfcg9ws.js} +2 -2
  17. package/dist/cli/{index-vcqwhe9d.js → index-7ttstfv6.js} +25 -3
  18. package/dist/cli/{index-bf76q8q7.js → index-8etcyr9r.js} +1 -1
  19. package/dist/cli/{index-3xd9a2g7.js → index-cpssctv1.js} +1 -1
  20. package/dist/cli/{index-z8ftpav0.js → index-cxtnbjwn.js} +2 -2
  21. package/dist/cli/{index-pb8ag9vg.js → index-mgdcrhkg.js} +4 -4
  22. package/dist/cli/{index-pf3xae4s.js → index-r3f1z043.js} +1 -1
  23. package/dist/cli/{index-88dt7c9z.js → index-swgsq1ds.js} +2 -2
  24. package/dist/cli/{index-gf9cxvp0.js → index-v3gw3sc5.js} +1 -1
  25. package/dist/cli/{index-gxw20m1d.js → index-v4n224r1.js} +1 -1
  26. package/dist/cli/{index-f97dm6tz.js → index-vbk29hmf.js} +5 -5
  27. package/dist/cli/{index-7bxw3v5w.js → index-ypy3dhbg.js} +3 -3
  28. package/dist/cli/{index-d88y17ht.js → index-yvgmsepb.js} +155 -130
  29. package/dist/cli/index.js +12 -12
  30. package/dist/cli/{knowledge-escalator-nna0zec3.js → knowledge-escalator-9sd533p6.js} +3 -3
  31. package/dist/cli/{knowledge-events-7k82xk36.js → knowledge-events-v0cp1a8d.js} +1 -1
  32. package/dist/cli/{knowledge-store-efvtng9t.js → knowledge-store-mv7qjf4s.js} +1 -1
  33. package/dist/cli/{knowledge-validator-jh93eagj.js → knowledge-validator-g05g6qrt.js} +4 -4
  34. package/dist/cli/{scan-cursor-cydz8d9q.js → scan-cursor-jp2zz6y1.js} +2 -2
  35. package/dist/cli/{schema-fa033pqw.js → schema-2x7wsb0n.js} +1 -1
  36. package/dist/cli/{skill-generator-8v463kj7.js → skill-generator-497vvped.js} +5 -5
  37. package/dist/config/bundled-skills.d.ts +3 -2
  38. package/dist/config/schema.d.ts +4 -4
  39. package/dist/hooks/init-orphan-recovery.d.ts +1 -1
  40. package/dist/hooks/pr-workflow-auto-wake.d.ts +31 -0
  41. package/dist/hooks/pr-workflow-gate.d.ts +1 -1
  42. package/dist/hooks/pr-workflow-response-gate.d.ts +4 -0
  43. package/dist/index.d.ts +14 -0
  44. package/dist/index.js +289 -289
  45. package/dist/tools/repo-graph/builder.d.ts +5 -4
  46. package/dist/tools/test-runner.d.ts +12 -2
  47. package/dist/utils/path-security.d.ts +2 -0
  48. package/dist/utils/timeout.d.ts +8 -4
  49. package/package.json +1 -1
@@ -35,7 +35,7 @@ If you are not sure whether you are touching one of these, you are touching one
35
35
  The full list of 12 invariants is in `AGENTS.md`. The four that have caused the most recent production regressions:
36
36
 
37
37
  1. **Plugin initialization is bounded and fail-open.** Every awaited operation on the plugin-init path must be wrapped in `withTimeout(...)` and degrade non-fatally on timeout. Issue #704 (v7.0.3) and the v7.3.3 git-hygiene regression both stem from violating this. The OpenCode plugin host silently drops a plugin whose entry never resolves; users see "no agents in TUI / GUI" with no error.
38
- - **Bounded is not free:** `withTimeout` only prevents an *unbounded* hang — the awaited work's latency still counts toward the ~400 ms repro-704 init deadline. Defer non-trivial init I/O via `queueMicrotask` when nothing downstream needs it before `server()` resolves.
38
+ - **Bounded is not free:** `withTimeout` only prevents an *unbounded* hang — the awaited work's latency still counts toward the ~400 ms repro-704 init deadline. Register non-trivial init I/O in the wrapper-owned post-resolution task queue when nothing downstream needs it before `server()` resolves. Do not use `queueMicrotask` inside the initializer: it can run during a later `await` while `server()` is still unresolved.
39
39
  2. **Subprocesses are bounded, non-interactive, and killable.** Every `bunSpawn(['<bin>', ...])` call must pass `cwd`, `stdin: 'ignore'` (unless intentionally interactive), `timeout: <ms>`, bounded stdio, and call `proc.kill()` in a `finally`. An outer `withTimeout` is not enough — it lets the awaiter proceed but does not abort the child.
40
40
  3. **Runtime portability — Node-ESM-loadable + v1 plugin shape.** No top-level `bun:` imports in `dist/index.js`. Default export is `{ id, server }`. All `Bun.*` calls go through `src/utils/bun-compat.ts`. v6.86.8 / v6.86.9 are the cautionary tales.
41
41
  4. **Test mock isolation.** `mock.module(...)` leaks across files in Bun's shared test-runner process. Prefer, in order: (a) `_test_exports` for pure function testing with zero mocks, (b) `_internals` dependency-injection seam for within-module mocking (see `src/utils/gitignore-warning.ts:_internals` and `src/hooks/diff-scope.ts:_internals`), (c) `mock.module` only when unavoidable. Restore in `afterEach`. The writing-tests skill covers all three tiers in detail; load it before modifying tests.
@@ -15,6 +15,22 @@ set -eu
15
15
  # strict ASCII-only ranges regardless of the invoking environment.
16
16
  export LC_ALL=C
17
17
 
18
+ # Native Git for Windows prints drive-qualified paths (C:/...) even when it is
19
+ # invoked from MSYS/Git Bash. Coreutils do not consistently interpret that form
20
+ # as absolute in restricted/non-login shells, so normalize Git-reported paths
21
+ # before passing them to cd, mkdir, or redirection. POSIX hosts are unchanged.
22
+ to_shell_path() {
23
+ case "$(uname -s 2>/dev/null || true)" in
24
+ MINGW* | MSYS* | CYGWIN*)
25
+ if command -v cygpath >/dev/null 2>&1; then
26
+ cygpath -u "$1"
27
+ return
28
+ fi
29
+ ;;
30
+ esac
31
+ printf '%s\n' "$1"
32
+ }
33
+
18
34
  slug="${1:-}"
19
35
  if [ -z "$slug" ]; then
20
36
  echo "usage: trace-init.sh <issue-slug>" >&2
@@ -37,6 +53,7 @@ root="$(git rev-parse --show-toplevel 2>/dev/null)" || {
37
53
  echo "trace-init: not inside a git work tree — run this from within the target repository" >&2
38
54
  exit 2
39
55
  }
56
+ root="$(to_shell_path "$root")"
40
57
  root_real="$(cd "$root" && pwd -P)"
41
58
  trace_dir="$root/.agents/issue-traces/$slug"
42
59
 
@@ -88,10 +105,13 @@ if [ -z "$git_dir" ]; then
88
105
  echo "trace-init: could not resolve the git directory" >&2
89
106
  exit 2
90
107
  }
108
+ git_dir="$(to_shell_path "$git_dir")"
91
109
  case "$git_dir" in
92
110
  /*) ;; # already absolute
93
111
  *) git_dir="$(pwd)/$git_dir" ;;
94
112
  esac
113
+ else
114
+ git_dir="$(to_shell_path "$git_dir")"
95
115
  fi
96
116
  exclude_file="$git_dir/info/exclude"
97
117
  entry='.agents/issue-traces/'
@@ -144,7 +144,7 @@ tree:
144
144
  tracked path. It creates an auditable, path-scoped stash and returns its
145
145
  recovery command. Do not issue `git stash` through shell. The controller never
146
146
  stashes untracked files; move or remove those manually, or abort the checkout.
147
- - **Check out the head branch locally.** Feedback verification reads the working-tree
147
+ - **Check out the head branch locally before dispatching feedback lanes.** Feedback verification reads the working-tree
148
148
  filesystem (`Read`/`Glob`/`Grep`), and fixes must land on the PR branch — without a
149
149
  checkout you would verify and patch the base branch's code instead. Record the
150
150
  exact `merge_base...head_ref` range for diff-scoped inspection.
@@ -159,6 +159,15 @@ tree:
159
159
  the upstream of an existing local branch with
160
160
  `git branch --set-upstream-to=<remote>/<remote-branch> <local-branch>`).
161
161
  Branch creation/tracking is blocked after the immutable head is bound.
162
+ - `gh pr checkout` is permitted only in its non-force, non-submodule form with
163
+ the PR number/URL and optional `--repo` or `--branch` flags. Never use
164
+ `--force`, `--recurse-submodules`, or detached checkout during this
165
+ transition.
166
+ - Before the first feedback verification dispatch binds the head, prove that
167
+ `git rev-parse HEAD` equals the authoritative full `pr_head_sha`,
168
+ `git status --porcelain` is empty, and the current branch tracks the intended
169
+ PR head remote/branch. A detached checkout is valid for review, not feedback
170
+ publication.
162
171
 
163
172
  When a verification lane result includes `output_ref`, treat `output` as a
164
173
  preview and call `retrieve_lane_output` before using it to classify, resolve,
@@ -733,8 +742,10 @@ the independently approved digest, the exact approved commit remains current,
733
742
  its bound upstream remote-tracking ref points to that exact commit, every
734
743
  feedback ID has exact-provenance evidence, and no PR-workflow lanes remain
735
744
  open. While the gate remains active, the runtime replaces architect
736
- final-response text with a mechanical blocked notice and re-wakes an idle
737
- parent session.
745
+ final-response text with a mechanical blocked notice and normally re-wakes an
746
+ idle parent session. A user interruption pauses automatic wakes until a later
747
+ explicit user turn settles; the durable gate remains available to continue or
748
+ abort.
738
749
 
739
750
  Report:
740
751
 
@@ -134,9 +134,26 @@ If scope cannot be determined, review the narrowest safe scope available and sta
134
134
 
135
135
  ### Pre-flight git ref availability
136
136
 
137
- Before launching explorers (Phase 3), confirm the PR branch refs are available:
138
- - If `head_ref` is a remote branch that is not checked out locally, fetch it via `git fetch origin <head_ref>`
139
- - **Check out the head branch locally.** Explorer agents read files from the working tree, not from git history — passing the commit range in the delegation prompt is not sufficient because `Read` / `Glob` / `Grep` tools operate on the filesystem. Without a checkout, explorers silently read the base branch's version of changed files and produce invalid candidates. **Before checking out, verify the working tree is clean (`git status --porcelain`). If tracked changes exist, call `prepare_pr_workflow_checkout` with every explicit dirty tracked path. It creates an auditable, path-scoped stash and returns its recovery command. Do not issue `git stash` through shell. The controller never stashes untracked files; move or remove those manually, or abort the checkout.**
137
+ Before launching explorers (Phase 3), perform this exact standalone sequence:
138
+
139
+ 1. Resolve and retain the authoritative full `pr_head_sha` from PR metadata.
140
+ 2. Verify the working tree is clean with `git status --porcelain`. If tracked
141
+ changes exist, call `prepare_pr_workflow_checkout` with every explicit dirty
142
+ tracked path. Do not issue `git stash` through shell. The controller never
143
+ stashes untracked files; move or remove those manually, or abort.
144
+ 3. Fetch the PR head as one standalone command, for example
145
+ `git fetch origin refs/pull/<N>/head`. Do not compose fetch and checkout.
146
+ 4. Prove the full commit exists locally with
147
+ `git cat-file -e <full_pr_head_sha>^{commit}`.
148
+ 5. Check out the exact PR filesystem with
149
+ `git switch --detach <full_pr_head_sha>`. Do not use `--track FETCH_HEAD`:
150
+ `FETCH_HEAD` is not a remote-tracking branch.
151
+ 6. Confirm `git rev-parse HEAD` equals the full `pr_head_sha`, bind that exact
152
+ head through the first PR-review controller call, and finish this before dispatching explorer lanes.
153
+
154
+ Explorer agents read files from the working tree, not from git history. Passing
155
+ the commit range in a prompt cannot substitute for this checkout because
156
+ `Read` / `Glob` / `Grep` operate on the filesystem.
140
157
  - Explicitly pass the verified merge-base range (`base_sha...pr_head_sha`) in every explorer delegation so explorers inspect exactly the controller-bound PR diff. Include `base_ref` only as the live ref used to recompute `base_sha`; do not substitute a two-dot branch-tip range.
141
158
 
142
159
  If refs cannot be fetched or checked out, state the limitation in the context pack.
@@ -1405,7 +1422,9 @@ the same exact
1405
1422
  `pr_head_sha`. The tool refuses to clear the session gate while required base,
1406
1423
  trigger, declared reviewer/critic, or open-lane obligations remain incomplete.
1407
1424
  While the gate remains active, the runtime replaces architect final-response
1408
- text with a mechanical blocked notice and re-wakes an idle parent session. Only
1425
+ text with a mechanical blocked notice and re-wakes an idle parent session. A
1426
+ user interruption pauses every automatic wake path until a later explicit user
1427
+ turn settles; the durable gate remains available to continue or abort. Only
1409
1428
  emit the final report after the completion tool confirms that the gate cleared.
1410
1429
 
1411
1430
  ## Aborting an unrecoverable review
@@ -1419,9 +1438,11 @@ the merge-base bind can never verify. In that state the response gate
1419
1438
  suspends further auto-resumes after a small number of consecutive
1420
1439
  unproductive wakes, and the only exits are:
1421
1440
 
1422
- 1. **Diagnose and retry as two separate standalone commands.** First run
1423
- `git fetch origin refs/pull/<N>/head:pr-<N>-head` (single command), then
1424
- `git checkout pr-<N>-head` (single command). Then recompute the exact
1441
+ 1. **Diagnose and retry the canonical standalone sequence.** Run
1442
+ `git fetch origin refs/pull/<N>/head`, verify
1443
+ `git cat-file -e <full_pr_head_sha>^{commit}`, then run
1444
+ `git switch --detach <full_pr_head_sha>`. Do not use `--track FETCH_HEAD`.
1445
+ Confirm `git rev-parse HEAD` equals the authoritative PR head, then recompute the exact
1425
1446
  merge base with `git merge-base -- <base_ref> <pr_head_sha>` (single
1426
1447
  command) and retry the `swarm-pr-review:base` dispatch with the exact
1427
1448
  `pr_head_sha`, `base_sha`, and `base_ref`.
@@ -89,7 +89,7 @@ export declare function buildWakeMessage(events: FormattedPrEvent[]): string;
89
89
  * clients that lack it. Bounded by withTimeout; returns false on any
90
90
  * failure or timeout. Never throws.
91
91
  */
92
- declare function sendWakePrompt(sessionID: string, events: FormattedPrEvent[]): Promise<boolean>;
92
+ declare function sendWakePrompt(sessionID: string, events: FormattedPrEvent[], messageID: string): Promise<boolean>;
93
93
  export declare const _internals: {
94
94
  sendWakePrompt: typeof sendWakePrompt;
95
95
  withTimeout: typeof withTimeout;
@@ -12,8 +12,8 @@ import {
12
12
  shouldRunOnStartup,
13
13
  writeBackupArtifact,
14
14
  writeDoctorArtifact
15
- } from "./index-3xd9a2g7.js";
16
- import"./index-vcqwhe9d.js";
15
+ } from "./index-cpssctv1.js";
16
+ import"./index-7ttstfv6.js";
17
17
  import"./index-bk5tah7q.js";
18
18
  import"./index-z6xqpmqg.js";
19
19
  import"./index-zjygnfay.js";
@@ -4,9 +4,9 @@ import {
4
4
  authorizeCuration,
5
5
  buildConfigFingerprintInput,
6
6
  readCohortConfigFingerprint
7
- } from "./index-gwss5btk.js";
7
+ } from "./index-4scxzpbz.js";
8
8
  import"./index-rtry5xyf.js";
9
- import"./index-nqp13m5a.js";
9
+ import"./index-360anpk0.js";
10
10
  import"./index-ae75rja9.js";
11
11
  import"./index-q27bajqb.js";
12
12
  import"./index-zgwm4ryv.js";
@@ -14,31 +14,31 @@ import {
14
14
  runCuratorInit,
15
15
  runCuratorPhase,
16
16
  writeCuratorSummary
17
- } from "./index-d88y17ht.js";
18
- import"./index-gxw20m1d.js";
19
- import"./index-3xd9a2g7.js";
17
+ } from "./index-yvgmsepb.js";
18
+ import"./index-v4n224r1.js";
19
+ import"./index-cpssctv1.js";
20
20
  import"./index-kk1scggc.js";
21
21
  import"./index-4905hd2m.js";
22
22
  import"./index-134d35c1.js";
23
23
  import"./index-6n2jpz7x.js";
24
- import"./index-7bxw3v5w.js";
25
- import"./index-f97dm6tz.js";
26
- import"./index-pf3xae4s.js";
24
+ import"./index-ypy3dhbg.js";
25
+ import"./index-vbk29hmf.js";
26
+ import"./index-r3f1z043.js";
27
27
  import"./index-vxv732ex.js";
28
28
  import"./index-c8s9a3zh.js";
29
29
  import"./index-9ss2m4rs.js";
30
30
  import"./index-23zsx7dm.js";
31
- import"./index-88dt7c9z.js";
32
- import"./index-gwss5btk.js";
31
+ import"./index-swgsq1ds.js";
32
+ import"./index-4scxzpbz.js";
33
33
  import"./index-rtry5xyf.js";
34
- import"./index-pb8ag9vg.js";
35
- import"./index-nqp13m5a.js";
34
+ import"./index-mgdcrhkg.js";
35
+ import"./index-360anpk0.js";
36
36
  import"./index-ae75rja9.js";
37
37
  import"./index-q27bajqb.js";
38
- import"./index-gf9cxvp0.js";
38
+ import"./index-v3gw3sc5.js";
39
39
  import"./index-k5jrywpr.js";
40
40
  import"./index-n832052r.js";
41
- import"./index-vcqwhe9d.js";
41
+ import"./index-7ttstfv6.js";
42
42
  import"./index-bk5tah7q.js";
43
43
  import"./index-8fwhhayc.js";
44
44
  import"./index-q1exe2b3.js";
@@ -1,31 +1,31 @@
1
1
  // @bun
2
2
  import {
3
3
  createCuratorLLMDelegate
4
- } from "./index-d88y17ht.js";
5
- import"./index-gxw20m1d.js";
6
- import"./index-3xd9a2g7.js";
4
+ } from "./index-yvgmsepb.js";
5
+ import"./index-v4n224r1.js";
6
+ import"./index-cpssctv1.js";
7
7
  import"./index-kk1scggc.js";
8
8
  import"./index-4905hd2m.js";
9
9
  import"./index-134d35c1.js";
10
10
  import"./index-6n2jpz7x.js";
11
- import"./index-7bxw3v5w.js";
12
- import"./index-f97dm6tz.js";
13
- import"./index-pf3xae4s.js";
11
+ import"./index-ypy3dhbg.js";
12
+ import"./index-vbk29hmf.js";
13
+ import"./index-r3f1z043.js";
14
14
  import"./index-vxv732ex.js";
15
15
  import"./index-c8s9a3zh.js";
16
16
  import"./index-9ss2m4rs.js";
17
17
  import"./index-23zsx7dm.js";
18
- import"./index-88dt7c9z.js";
19
- import"./index-gwss5btk.js";
18
+ import"./index-swgsq1ds.js";
19
+ import"./index-4scxzpbz.js";
20
20
  import"./index-rtry5xyf.js";
21
- import"./index-pb8ag9vg.js";
22
- import"./index-nqp13m5a.js";
21
+ import"./index-mgdcrhkg.js";
22
+ import"./index-360anpk0.js";
23
23
  import"./index-ae75rja9.js";
24
24
  import"./index-q27bajqb.js";
25
- import"./index-gf9cxvp0.js";
25
+ import"./index-v3gw3sc5.js";
26
26
  import"./index-k5jrywpr.js";
27
27
  import"./index-n832052r.js";
28
- import"./index-vcqwhe9d.js";
28
+ import"./index-7ttstfv6.js";
29
29
  import"./index-bk5tah7q.js";
30
30
  import"./index-8fwhhayc.js";
31
31
  import"./index-q1exe2b3.js";
@@ -1,32 +1,32 @@
1
1
  // @bun
2
2
  import {
3
3
  handleGuardrailExplain
4
- } from "./index-z8ftpav0.js";
5
- import"./index-d88y17ht.js";
6
- import"./index-gxw20m1d.js";
7
- import"./index-3xd9a2g7.js";
4
+ } from "./index-cxtnbjwn.js";
5
+ import"./index-yvgmsepb.js";
6
+ import"./index-v4n224r1.js";
7
+ import"./index-cpssctv1.js";
8
8
  import"./index-kk1scggc.js";
9
9
  import"./index-4905hd2m.js";
10
10
  import"./index-134d35c1.js";
11
11
  import"./index-6n2jpz7x.js";
12
- import"./index-7bxw3v5w.js";
13
- import"./index-f97dm6tz.js";
14
- import"./index-pf3xae4s.js";
12
+ import"./index-ypy3dhbg.js";
13
+ import"./index-vbk29hmf.js";
14
+ import"./index-r3f1z043.js";
15
15
  import"./index-vxv732ex.js";
16
16
  import"./index-c8s9a3zh.js";
17
17
  import"./index-9ss2m4rs.js";
18
18
  import"./index-23zsx7dm.js";
19
- import"./index-88dt7c9z.js";
20
- import"./index-gwss5btk.js";
19
+ import"./index-swgsq1ds.js";
20
+ import"./index-4scxzpbz.js";
21
21
  import"./index-rtry5xyf.js";
22
- import"./index-pb8ag9vg.js";
23
- import"./index-nqp13m5a.js";
22
+ import"./index-mgdcrhkg.js";
23
+ import"./index-360anpk0.js";
24
24
  import"./index-ae75rja9.js";
25
25
  import"./index-q27bajqb.js";
26
- import"./index-gf9cxvp0.js";
26
+ import"./index-v3gw3sc5.js";
27
27
  import"./index-k5jrywpr.js";
28
28
  import"./index-n832052r.js";
29
- import"./index-vcqwhe9d.js";
29
+ import"./index-7ttstfv6.js";
30
30
  import"./index-bk5tah7q.js";
31
31
  import"./index-8fwhhayc.js";
32
32
  import"./index-q1exe2b3.js";
@@ -1,9 +1,9 @@
1
1
  // @bun
2
2
  import {
3
3
  handleGuardrailLog
4
- } from "./index-bf76q8q7.js";
5
- import"./index-gxw20m1d.js";
6
- import"./index-vcqwhe9d.js";
4
+ } from "./index-8etcyr9r.js";
5
+ import"./index-v4n224r1.js";
6
+ import"./index-7ttstfv6.js";
7
7
  import"./index-bk5tah7q.js";
8
8
  import"./index-z6xqpmqg.js";
9
9
  import"./index-zjygnfay.js";
@@ -7,33 +7,33 @@ import {
7
7
  isHiveEligible,
8
8
  promoteFromSwarm,
9
9
  promoteToHive
10
- } from "./index-d88y17ht.js";
11
- import"./index-gxw20m1d.js";
12
- import"./index-3xd9a2g7.js";
10
+ } from "./index-yvgmsepb.js";
11
+ import"./index-v4n224r1.js";
12
+ import"./index-cpssctv1.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-7bxw3v5w.js";
18
- import"./index-f97dm6tz.js";
19
- import"./index-pf3xae4s.js";
17
+ import"./index-ypy3dhbg.js";
18
+ import"./index-vbk29hmf.js";
19
+ import"./index-r3f1z043.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-88dt7c9z.js";
25
- import"./index-gwss5btk.js";
24
+ import"./index-swgsq1ds.js";
25
+ import"./index-4scxzpbz.js";
26
26
  import"./index-rtry5xyf.js";
27
27
  import {
28
28
  resolveHiveKnowledgePath
29
- } from "./index-pb8ag9vg.js";
30
- import"./index-nqp13m5a.js";
29
+ } from "./index-mgdcrhkg.js";
30
+ import"./index-360anpk0.js";
31
31
  import"./index-ae75rja9.js";
32
32
  import"./index-q27bajqb.js";
33
- import"./index-gf9cxvp0.js";
33
+ import"./index-v3gw3sc5.js";
34
34
  import"./index-k5jrywpr.js";
35
35
  import"./index-n832052r.js";
36
- import"./index-vcqwhe9d.js";
36
+ import"./index-7ttstfv6.js";
37
37
  import"./index-bk5tah7q.js";
38
38
  import"./index-8fwhhayc.js";
39
39
  import"./index-q1exe2b3.js";
@@ -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-efvtng9t.js");
611
+ const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-mv7qjf4s.js");
612
612
  await bumpKnowledgeConfidenceBatch(directory, deltas, options?.floorOptions);
613
613
  }
614
614
  return {
@@ -1,10 +1,10 @@
1
1
  // @bun
2
2
  import {
3
3
  handleGuardrailExplain
4
- } from "./index-z8ftpav0.js";
4
+ } from "./index-cxtnbjwn.js";
5
5
  import {
6
6
  handleGuardrailLog
7
- } from "./index-bf76q8q7.js";
7
+ } from "./index-8etcyr9r.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-d88y17ht.js";
87
- import"./index-gxw20m1d.js";
88
- import"./index-3xd9a2g7.js";
86
+ } from "./index-yvgmsepb.js";
87
+ import"./index-v4n224r1.js";
88
+ import"./index-cpssctv1.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-7bxw3v5w.js";
94
- import"./index-f97dm6tz.js";
95
- import"./index-pf3xae4s.js";
93
+ import"./index-ypy3dhbg.js";
94
+ import"./index-vbk29hmf.js";
95
+ import"./index-r3f1z043.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-88dt7c9z.js";
101
- import"./index-gwss5btk.js";
100
+ import"./index-swgsq1ds.js";
101
+ import"./index-4scxzpbz.js";
102
102
  import"./index-rtry5xyf.js";
103
- import"./index-pb8ag9vg.js";
104
- import"./index-nqp13m5a.js";
103
+ import"./index-mgdcrhkg.js";
104
+ import"./index-360anpk0.js";
105
105
  import"./index-ae75rja9.js";
106
106
  import"./index-q27bajqb.js";
107
- import"./index-gf9cxvp0.js";
107
+ import"./index-v3gw3sc5.js";
108
108
  import"./index-k5jrywpr.js";
109
109
  import"./index-n832052r.js";
110
110
  import {
@@ -113,7 +113,7 @@ import {
113
113
  init_constants,
114
114
  init_schema,
115
115
  stripKnownSwarmPrefix
116
- } from "./index-vcqwhe9d.js";
116
+ } from "./index-7ttstfv6.js";
117
117
  import"./index-bk5tah7q.js";
118
118
  import"./index-8fwhhayc.js";
119
119
  import"./index-q1exe2b3.js";
@@ -4,7 +4,7 @@ import {
4
4
  } from "./index-rtry5xyf.js";
5
5
  import {
6
6
  readKnowledgeEvents
7
- } from "./index-nqp13m5a.js";
7
+ } from "./index-360anpk0.js";
8
8
  import {
9
9
  isLinked,
10
10
  readLinkPointer,
@@ -6,7 +6,7 @@ import {
6
6
  loadPluginConfigWithMeta,
7
7
  loadPluginConfigWithMetaAsync,
8
8
  resolveWorktreeIsolationConfig
9
- } from "./index-gf9cxvp0.js";
9
+ } from "./index-v3gw3sc5.js";
10
10
  import {
11
11
  ApprovalEvidenceSchema,
12
12
  BaseEvidenceSchema,
@@ -58,7 +58,7 @@ import {
58
58
  WorktreeIsolationConfigSchema,
59
59
  isQAAgent,
60
60
  isSubagent
61
- } from "./index-vcqwhe9d.js";
61
+ } from "./index-7ttstfv6.js";
62
62
  import"./index-bk5tah7q.js";
63
63
  import {
64
64
  MigrationStatusSchema,
@@ -1199,6 +1199,23 @@ function resolveGuardrailsConfig(config, agentName) {
1199
1199
  };
1200
1200
  return resolved;
1201
1201
  }
1202
+ function rejectCheckpointPrototypePollution(raw) {
1203
+ if (!raw || typeof raw !== "object" || Array.isArray(raw))
1204
+ return raw;
1205
+ try {
1206
+ if (Object.getPrototypeOf(raw) !== Object.prototype) {
1207
+ return { [INVALID_CHECKPOINT_PROTO_FIELD]: true };
1208
+ }
1209
+ for (const key of Reflect.ownKeys(raw)) {
1210
+ if (typeof key === "string" && FORBIDDEN_CHECKPOINT_CONFIG_KEYS.has(key)) {
1211
+ return { [INVALID_CHECKPOINT_PROTO_FIELD]: true };
1212
+ }
1213
+ }
1214
+ } catch {
1215
+ return { [INVALID_CHECKPOINT_PROTO_FIELD]: true };
1216
+ }
1217
+ return raw;
1218
+ }
1202
1219
  function resolveExternalSkillsConfig(input) {
1203
1220
  if (input === undefined || input === null || typeof input !== "object" || Array.isArray(input)) {
1204
1221
  return { ...DEFAULT_EXTERNAL_SKILLS_CONFIG };
@@ -1218,7 +1235,7 @@ function resolveExternalSkillsConfig(input) {
1218
1235
  };
1219
1236
  return merged;
1220
1237
  }
1221
- var _internals, SEPARATORS, CANONICAL_ROLES_LONGEST_FIRST, CANONICAL_ROLES_SET, AgentReasoningConfigSchema, AgentThinkingConfigSchema, FALLBACK_MODELS_MAX = 3, AgentOverrideConfigSchema, SwarmConfigSchema, ModelPricingConfigSchema, PricingConfigSchema, HooksConfigSchema, ScoringWeightsSchema, DecisionDecaySchema, TokenRatiosSchema, ScoringConfigSchema, ContextBudgetConfigSchema, EvidenceConfigSchema, GateFeatureSchema, PlaceholderScanConfigSchema, QualityBudgetConfigSchema, GATE_CONFIG_KNOWN_SECTION_KEYS, GateConfigSchema, PipelineConfigSchema, PhaseCompleteConfigSchema, SummaryConfigSchema, ReviewPassesConfigSchema, AutoReviewConfigSchema, AdversarialDetectionConfigSchema, AdversarialTestingConfigSchemaBase, AdversarialTestingConfigSchema, IntegrationAnalysisConfigSchema, DocsConfigSchema, DesignDocsConfigSchema, UIReviewConfigSchema, CompactionAdvisoryConfigSchema, LintConfigSchema, SecretscanConfigSchema, GuardrailsProfileSchema, DEFAULT_AGENT_PROFILES, DEFAULT_ARCHITECT_PROFILE, GuardrailsConfigSchema, WatchdogConfigSchema, SelfReviewConfigSchema, ToolFilterConfigSchema, PlanCursorConfigSchema, ContextMapConfigSchema, RepoGraphConfigSchema, CheckpointConfigSchema, ApplyPatchConfigSchema, AutomationModeSchema, AutomationCapabilitiesSchema, AutomationConfigSchemaBase, AutomationConfigSchema, KnowledgeConfigSchema, MemoryConfigSchema, CuratorConfigSchema, ArchitecturalSupervisionConfigSchema, KnowledgeApplicationConfigSchema, SkillPropagationAudienceSchema, SkillPropagationConfigSchema, SkillImproverConfigSchema, SkillsConfigSchema, SpecWriterConfigSchema, SlopDetectorConfigSchema, IncrementalVerifyConfigSchema, CompactionConfigSchema, PrmConfigSchema, AgentAuthorityRuleSchema, AuthorityConfigSchema, GeneralCouncilMemberConfigSchema, GeneralCouncilConfigSchema, CouncilConfigSchema, PrMonitorConfigSchema, ParallelizationConfigSchema, WorktreeIsolationConfigSchema, LeanTurboConfigSchema, EpicConfigSchema, StandardTurboConfigSchema, LeanTurboStrategyConfigSchema, TurboConfigSchema, ExternalSkillCandidateSourceTypeSchema, ExternalSkillCandidateEvaluationVerdictSchema, DiscoverySourceSchema, ExternalSkillCandidateSchema, ExternalSkillsConfigSchema, DEFAULT_EXTERNAL_SKILLS_CONFIG, DEFAULT_SKILLS_CONFIG, PluginConfigSchema;
1238
+ var _internals, SEPARATORS, CANONICAL_ROLES_LONGEST_FIRST, CANONICAL_ROLES_SET, AgentReasoningConfigSchema, AgentThinkingConfigSchema, FALLBACK_MODELS_MAX = 3, AgentOverrideConfigSchema, SwarmConfigSchema, ModelPricingConfigSchema, PricingConfigSchema, HooksConfigSchema, ScoringWeightsSchema, DecisionDecaySchema, TokenRatiosSchema, ScoringConfigSchema, ContextBudgetConfigSchema, EvidenceConfigSchema, GateFeatureSchema, PlaceholderScanConfigSchema, QualityBudgetConfigSchema, GATE_CONFIG_KNOWN_SECTION_KEYS, GateConfigSchema, PipelineConfigSchema, PhaseCompleteConfigSchema, SummaryConfigSchema, ReviewPassesConfigSchema, AutoReviewConfigSchema, AdversarialDetectionConfigSchema, AdversarialTestingConfigSchemaBase, AdversarialTestingConfigSchema, IntegrationAnalysisConfigSchema, DocsConfigSchema, DesignDocsConfigSchema, UIReviewConfigSchema, CompactionAdvisoryConfigSchema, LintConfigSchema, SecretscanConfigSchema, GuardrailsProfileSchema, DEFAULT_AGENT_PROFILES, DEFAULT_ARCHITECT_PROFILE, GuardrailsConfigSchema, WatchdogConfigSchema, SelfReviewConfigSchema, ToolFilterConfigSchema, PlanCursorConfigSchema, ContextMapConfigSchema, RepoGraphConfigSchema, INVALID_CHECKPOINT_PROTO_FIELD = "__swarm_invalid_checkpoint_proto__", FORBIDDEN_CHECKPOINT_CONFIG_KEYS, CheckpointConfigSchema, ApplyPatchConfigSchema, AutomationModeSchema, AutomationCapabilitiesSchema, AutomationConfigSchemaBase, AutomationConfigSchema, KnowledgeConfigSchema, MemoryConfigSchema, CuratorConfigSchema, ArchitecturalSupervisionConfigSchema, KnowledgeApplicationConfigSchema, SkillPropagationAudienceSchema, SkillPropagationConfigSchema, SkillImproverConfigSchema, SkillsConfigSchema, SpecWriterConfigSchema, SlopDetectorConfigSchema, IncrementalVerifyConfigSchema, CompactionConfigSchema, PrmConfigSchema, AgentAuthorityRuleSchema, AuthorityConfigSchema, GeneralCouncilMemberConfigSchema, GeneralCouncilConfigSchema, CouncilConfigSchema, PrMonitorConfigSchema, ParallelizationConfigSchema, WorktreeIsolationConfigSchema, LeanTurboConfigSchema, EpicConfigSchema, StandardTurboConfigSchema, LeanTurboStrategyConfigSchema, TurboConfigSchema, ExternalSkillCandidateSourceTypeSchema, ExternalSkillCandidateEvaluationVerdictSchema, DiscoverySourceSchema, ExternalSkillCandidateSchema, ExternalSkillsConfigSchema, DEFAULT_EXTERNAL_SKILLS_CONFIG, DEFAULT_SKILLS_CONFIG, PluginConfigSchema;
1222
1239
  var init_schema = __esm(() => {
1223
1240
  init_zod();
1224
1241
  init_knowledge_types();
@@ -1689,11 +1706,16 @@ var init_schema = __esm(() => {
1689
1706
  RepoGraphConfigSchema = exports_external.object({
1690
1707
  exclude_dirs: exports_external.array(exports_external.string().trim().min(1)).default([])
1691
1708
  });
1692
- CheckpointConfigSchema = exports_external.object({
1709
+ FORBIDDEN_CHECKPOINT_CONFIG_KEYS = new Set([
1710
+ "__proto__",
1711
+ "prototype",
1712
+ "constructor"
1713
+ ]);
1714
+ CheckpointConfigSchema = exports_external.preprocess(rejectCheckpointPrototypePollution, exports_external.object({
1693
1715
  enabled: exports_external.boolean().default(true),
1694
1716
  auto_checkpoint_threshold: exports_external.number().int().min(1).max(20).default(3),
1695
1717
  allow_empty_commits: exports_external.boolean().default(false)
1696
- }).strict();
1718
+ }).strict());
1697
1719
  ApplyPatchConfigSchema = exports_external.object({
1698
1720
  fuzzy_match: exports_external.boolean().default(false),
1699
1721
  fuzzy_match_context_aware: exports_external.boolean().default(false)
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  redactPath,
4
4
  redactShellCommand
5
- } from "./index-gxw20m1d.js";
5
+ } from "./index-v4n224r1.js";
6
6
 
7
7
  // src/services/guardrail-log-service.ts
8
8
  import * as fs from "fs/promises";
@@ -8,7 +8,7 @@ import {
8
8
  init_constants,
9
9
  init_schema,
10
10
  stripKnownSwarmPrefix
11
- } from "./index-vcqwhe9d.js";
11
+ } from "./index-7ttstfv6.js";
12
12
  import {
13
13
  log
14
14
  } from "./index-zgwm4ryv.js";
@@ -12,14 +12,14 @@ import {
12
12
  detectPosixWrites,
13
13
  detectWindowsWrites,
14
14
  resolveWriteTargets
15
- } from "./index-d88y17ht.js";
15
+ } from "./index-yvgmsepb.js";
16
16
  import {
17
17
  checkFileAuthority,
18
18
  classifyFile,
19
19
  isInDeclaredScope,
20
20
  redactPath,
21
21
  redactShellCommand
22
- } from "./index-gxw20m1d.js";
22
+ } from "./index-v4n224r1.js";
23
23
 
24
24
  // src/services/guardrail-explain-service.ts
25
25
  import path from "path";
@@ -650,7 +650,7 @@ async function applyConfidenceFloorAction(directory, touched, options) {
650
650
  const recovered = touched.filter((e) => e.confidence > CONFIDENCE_FLOOR + FLOOR_EPSILON && e.confidence_floor_demoted);
651
651
  if (atFloor.length === 0 && recovered.length === 0)
652
652
  return;
653
- const { readKnowledgeCounterRollups, effectiveRetrievalOutcomes } = await import("./knowledge-events-7k82xk36.js");
653
+ const { readKnowledgeCounterRollups, effectiveRetrievalOutcomes } = await import("./knowledge-events-v0cp1a8d.js");
654
654
  const rollups = await readKnowledgeCounterRollups(directory);
655
655
  const flagIds = new Set;
656
656
  for (const e of atFloor) {
@@ -717,11 +717,11 @@ async function applyConfidenceFloorAction(directory, touched, options) {
717
717
  });
718
718
  }
719
719
  if (action === "quarantine" && toQuarantine.length > 0) {
720
- const { quarantineEntry } = await import("./knowledge-validator-jh93eagj.js");
721
- const { KnowledgeConfigSchema } = await import("./schema-fa033pqw.js");
720
+ const { quarantineEntry } = await import("./knowledge-validator-g05g6qrt.js");
721
+ const { KnowledgeConfigSchema } = await import("./schema-2x7wsb0n.js");
722
722
  let config;
723
723
  try {
724
- const { loadPluginConfigWithMeta } = await import("./index-c48dvb6j.js");
724
+ const { loadPluginConfigWithMeta } = await import("./index-6mfcg9ws.js");
725
725
  const { config: loadedConfig } = loadPluginConfigWithMeta(directory);
726
726
  config = KnowledgeConfigSchema.parse(loadedConfig.knowledge ?? {});
727
727
  } catch {
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  readKnowledge,
4
4
  transactKnowledge
5
- } from "./index-pb8ag9vg.js";
5
+ } from "./index-mgdcrhkg.js";
6
6
  import {
7
7
  resolveKnowledgeStoreDir
8
8
  } from "./index-q27bajqb.js";
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  authorizeCuration
4
- } from "./index-gwss5btk.js";
4
+ } from "./index-4scxzpbz.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-pb8ag9vg.js";
12
+ } from "./index-mgdcrhkg.js";
13
13
  import {
14
14
  resolveKnowledgeStoreDir
15
15
  } from "./index-q27bajqb.js";