opencode-swarm 7.109.2 → 7.109.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 (39) hide show
  1. package/.opencode/skills/ci-failure-batching/SKILL.md +39 -0
  2. package/.opencode/skills/gate-attribution/SKILL.md +31 -0
  3. package/.opencode/skills/merge-queue-readiness/SKILL.md +37 -0
  4. package/.opencode/skills/skill-edit-validation/SKILL.md +29 -0
  5. package/.opencode/skills/worktree-retry-cleanup/SKILL.md +24 -0
  6. package/dist/cli/{config-doctor-q354tb2w.js → config-doctor-9vjyj9m3.js} +2 -2
  7. package/dist/cli/{curator-llm-factory-wqbm9mwr.js → curator-llm-factory-3hf9xpnd.js} +9 -9
  8. package/dist/cli/{curator-6p9tpprq.js → curator-zn1kmwmz.js} +9 -9
  9. package/dist/cli/{guardrail-explain-ynge4ww3.js → guardrail-explain-hjz1k6w0.js} +10 -10
  10. package/dist/cli/{guardrail-log-8mqqsssq.js → guardrail-log-5240bawg.js} +3 -3
  11. package/dist/cli/{hive-promoter-qh2rh8x2.js → hive-promoter-j81yj97d.js} +9 -9
  12. package/dist/cli/{index-h4c4rrwx.js → index-18690p15.js} +23 -2
  13. package/dist/cli/{index-fz1jgbvw.js → index-41fgssqr.js} +22 -2
  14. package/dist/cli/{index-wg0665ft.js → index-8f10r7ay.js} +2 -2
  15. package/dist/cli/{index-9qxntjtx.js → index-b15qbvph.js} +190 -41
  16. package/dist/cli/{index-wj4jeavn.js → index-d3txrx5q.js} +1 -1
  17. package/dist/cli/{index-5gnp8fyw.js → index-mtzjbaaa.js} +3 -3
  18. package/dist/cli/{index-3qwaydq1.js → index-nvmy7xmj.js} +11 -11
  19. package/dist/cli/{index-vx76tcxe.js → index-p5vm9gy9.js} +1 -1
  20. package/dist/cli/{index-cqbqynzp.js → index-y3nx3ss0.js} +710 -557
  21. package/dist/cli/{index-mmny81g1.js → index-y5z2qdvk.js} +1 -1
  22. package/dist/cli/{index-8a8b5wjf.js → index-zh3qh6m7.js} +2 -2
  23. package/dist/cli/{index-fm7xz1ne.js → index-zjh648z4.js} +81 -1
  24. package/dist/cli/index.js +9 -9
  25. package/dist/cli/{knowledge-escalator-6v7sjprx.js → knowledge-escalator-9ksrgq7h.js} +3 -3
  26. package/dist/cli/{knowledge-events-6n3x3he2.js → knowledge-events-ymysgtrr.js} +1 -1
  27. package/dist/cli/{knowledge-store-exkw6yb1.js → knowledge-store-562fefjy.js} +1 -1
  28. package/dist/cli/{knowledge-validator-exymfcb9.js → knowledge-validator-b9nvmzjc.js} +4 -2
  29. package/dist/cli/{schema-x17zmd03.js → schema-5vmb5dh8.js} +3 -1
  30. package/dist/cli/{skill-generator-mx9br4ty.js → skill-generator-mjfqvnn0.js} +15 -5
  31. package/dist/config/bundled-skills.d.ts +1 -1
  32. package/dist/config/schema.d.ts +12 -4
  33. package/dist/hooks/knowledge-types.d.ts +6 -0
  34. package/dist/hooks/knowledge-validator.d.ts +5 -0
  35. package/dist/hooks/skill-invalidator.d.ts +48 -0
  36. package/dist/index.js +217 -216
  37. package/dist/services/skill-generator.d.ts +47 -2
  38. package/dist/tools/knowledge-remove.d.ts +3 -8
  39. package/package.json +6 -1
@@ -0,0 +1,39 @@
1
+ ---
2
+ name: ci-failure-batching
3
+ description: Batch collection and fix protocol for CI failures. Triggered when any CI check fails on a PR. Prevents serial diagnose-fix-push cycles by collecting all failures before fixing.
4
+ ---
5
+
6
+ # CI Failure Batching
7
+
8
+ ## Trigger
9
+ When ANY CI check fails on the PR (pr-monitor surfaces `pr.ci.failed`).
10
+
11
+ ## Protocol
12
+ 1. **DO NOT immediately fix the first failure.** Check if other jobs are still running:
13
+ ```
14
+ gh pr checks <PR> --repo <repo>
15
+ ```
16
+ 2. **If jobs are still running:** Note the failure, WAIT for the run to complete
17
+ 3. **Once the run completes, collect ALL failures:**
18
+ - Identify every check with `fail` status
19
+ - For each: `gh run view <run-id> --log-failed`
20
+ - Build a complete failure ledger
21
+ 4. **Fix ALL failures in one changeset:** Cluster by root cause, fix each cluster, verify locally
22
+ 5. **Push the fixes in one cycle.** Amend the commit and push. NOTE: `git push --force` / `--force-with-lease` is deny-pattern-blocked by the guardrail in guarded sessions (no orchestrator exemption). If force-push is blocked, push a normal new fix commit instead — the batching goal is ONE push cycle (collect all → fix all → push once), not literally one commit. A single new commit containing all batched fixes satisfies the goal.
23
+ 6. **Only re-push if NEW failures surface** that were not in the original batch.
24
+
25
+ ## Why this matters
26
+ Without batching, N failures produce N push cycles. With batching, N failures produce 1 push cycle.
27
+
28
+ Example from session #1685:
29
+ - Without batching: 6 pushes (format → stale-assertion-1 → stale-assertion-2 → integration → merge-group → clean)
30
+ - With batching: 2 pushes (collect all → fix all → push once → clean)
31
+
32
+ ## Pr-monitor workaround
33
+ The pr-monitor fires `pr.ci.failed` per-check. When the first event arrives:
34
+ 1. Check `gh pr checks` — are other jobs still running?
35
+ 2. If yes: WAIT for completion
36
+ 3. If no: the single failure IS the only failure — proceed normally
37
+
38
+ ## Root cause
39
+ The pr-monitor should batch-fire after the CI run completes (issue #1746 item 7). This playbook is the manual protocol.
@@ -0,0 +1,31 @@
1
+ ---
2
+ name: gate-attribution
3
+ description: Per-task gate dispatch protocol. Documents the single-taskId attribution rule and parallel-lane optimization for reviewer/test_engineer gates.
4
+ ---
5
+
6
+ # Gate Attribution
7
+
8
+ ## The rule
9
+ The gate tracker attributes reviewer/test_engineer dispatches PER TASK (single taskId in the prompt). Set-dispatches covering multiple tasks do NOT count per-task, even with per-task verdicts.
10
+
11
+ ## Protocol
12
+ 1. **For each task requiring a gate:** Dispatch a separate reviewer and/or test_engineer with exactly ONE taskId
13
+ 2. **Minimize overhead via parallel dispatch:**
14
+ ```
15
+ dispatch_lanes_async with:
16
+ - common_prompt: shared verification context
17
+ - lanes: one lane per task, each with a single taskId
18
+ - max_concurrent: up to 3
19
+ ```
20
+ 3. **Collect + attribute:** Each lane result auto-attributes to its taskId
21
+ 4. **Do NOT batch:** Even for identical reviews, dispatch separately
22
+
23
+ ## Optimization for trivial tasks
24
+ For pure ceremony gates (1-line doc fix):
25
+ ```
26
+ TASK: Verify task X.Y. Run skill-mirrors.test.ts. PASS/FAIL.
27
+ taskId: X.Y
28
+ ```
29
+
30
+ ## Why this exists
31
+ The gate tracker (`src/hooks/delegation-gate.ts`) keys delegation chains by `sessionID`, and task attribution resolves exactly ONE taskId per dispatch (`args.task_id ?? args.taskId`). Ambiguous multi-task prompts fail closed (resolve to null) rather than attributing to any task — so a set-dispatch covering multiple tasks does not count per-task even with per-task verdicts. Tracked in issue #1746 item 6.
@@ -0,0 +1,37 @@
1
+ ---
2
+ name: merge-queue-readiness
3
+ description: Pre-queue merge-group CI simulation. Triggered before adding a PR to a GitHub merge queue. Prevents merge-queue kick-outs from integration test failures.
4
+ ---
5
+
6
+ # Merge Queue Readiness
7
+
8
+ ## Trigger
9
+ Before adding the PR to the merge queue (or before the final push if the repo uses a merge queue).
10
+
11
+ ## Protocol
12
+ 1. **Fetch latest main:** `git fetch origin main`
13
+ 2. **Create a temporary simulation worktree (do NOT mutate the PR branch).** Use a project-relative path UNDER the swarm worktree base so the path is portable across OSes and its later removal is permitted by the worktree guardrail (paths outside `.swarm-worktrees/` are blocked). Do NOT hardcode `/tmp` — it does not exist on Windows.
14
+ ```
15
+ git worktree add .swarm-worktrees/merge-sim origin/main
16
+ cd .swarm-worktrees/merge-sim
17
+ git merge <pr-branch> --no-edit
18
+ ```
19
+ 3. **Run integration + unit tests against the merged result:**
20
+ ```
21
+ bun test tests/integration --timeout 120000
22
+ bun test tests/unit --timeout 120000
23
+ ```
24
+ (Use per-file loops for hot modules per AGENTS.md invariant 6)
25
+ 4. **If failures:** Fix on the PR branch, re-push, re-simulate. Always run the cleanup step (5) before re-simulating or on any exit path — do not leave the simulation worktree behind.
26
+ 5. **Cleanup (run on EVERY exit path, including failure):** `git worktree remove --force .swarm-worktrees/merge-sim`. If the remove is guardrail-blocked or fails, delete the directory directly and run `git worktree prune`.
27
+ 6. **Only after simulation passes,** add PR to the merge queue.
28
+
29
+ ## Why this matters
30
+ PR-branch CI and merge-group CI test DIFFERENT things:
31
+ - PR-branch: tests the PR head commit in isolation
32
+ - Merge-group: tests a temporary merge of PR head + latest main
33
+
34
+ Integration tests that pass on the PR branch may fail in merge-group context due to test interactions exposed by the merged result.
35
+
36
+ ## Root cause
37
+ A `swarm ci-simulate` command would automate this (issue #1746 item 5). This playbook is the manual protocol.
@@ -0,0 +1,29 @@
1
+ ---
2
+ name: skill-edit-validation
3
+ description: Content-assertion sweep after editing SKILL.md files. Triggered when a task changes skill or prompt content that tests assert against. Prevents stale-assertion CI failures.
4
+ ---
5
+
6
+ # Skill Edit Validation
7
+
8
+ ## Trigger
9
+ After editing ANY `.md` file under `.opencode/skills/`, `.claude/skills/`, or `.agents/skills/` that changes content wording (not just whitespace/formatting).
10
+
11
+ ## Protocol
12
+ 1. **Extract changed phrases:** Identify old wording vs new wording (e.g., "spec.md does NOT exist" changed to "NO effective spec exists")
13
+ 2. **Targeted sweep:** For each OLD phrase, grep test files:
14
+ ```
15
+ rg "<old-phrase>" tests/ src/ --type ts -l
16
+ ```
17
+ Focus on: `*-audit*`, `*-security*`, `*-spec-gate*`, `*skill-mirror*`, `*soft-spec*`, `*prompt*`, `*workflow*`
18
+ 3. **For each match:** Read the assertion context (surrounding 10 lines). Verify:
19
+ - Does the assertion still hold against the new content?
20
+ - Is it checking a substring containing the old phrase?
21
+ - Is it checking for the ABSENCE of a word the new wording introduces? (e.g., `not.toContain('skip')` catches "this check is skipped")
22
+ 4. **Update stale assertions in the same changeset.** Do NOT defer to CI.
23
+ 5. **Preserve behavioral intent:** When updating, preserve what the assertion TESTS (e.g., "the plan skill has a spec-absent branch"), not just the string match.
24
+
25
+ ## Constraint
26
+ Do NOT rubber-stamp brittle assertions. If an assertion tests implementation detail rather than behavioral intent, flag it for refactoring to a semantic check.
27
+
28
+ ## Root cause
29
+ A skill-content test registry would auto-adjust (issue #1746 item 3). This playbook is the manual safety net.
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: worktree-retry-cleanup
3
+ description: Protocol for cleaning parallel-coder worktree lanes before retry. Triggered before re-dispatching any task that already has a lane (completed, denied, cancelled, or failed).
4
+ ---
5
+
6
+ # Worktree Retry Cleanup
7
+
8
+ ## Trigger
9
+ Before re-dispatching a coder for a task that already has a lane (any prior dispatch status).
10
+
11
+ ## Protocol
12
+ 1. **Ownership check — do this FIRST, before any deletion.** Confirm the lane is not owned by another ACTIVE session: read `.swarm/session/state.json` and verify no other session's `delegationChains` reference `<session>/<task>`. If another active session owns it, STOP — surface the conflict and do not delete.
13
+ 2. **Check for existing lane branch:** `git branch --list "swarm/lane/<session>/<task>"`
14
+ 3. **If branch exists:**
15
+ - Verify 0-commits-ahead: `git log --oneline HEAD..swarm/lane/<session>/<task>` — empty = safe
16
+ - Delete: `git branch -d swarm/lane/<session>/<task>` (use `-D` only if `-d` fails AND the commits are confirmed unneeded)
17
+ - Under full-auto, `-D` is deny-pattern-blocked — use `-d`
18
+ 4. **Remove the per-lane worktree directory.** Target the SPECIFIC lane `.swarm-worktrees/<session>/<task>`, NOT the session parent (the parent holds sibling lanes). Prefer `git worktree remove .swarm-worktrees/<session>/<task>` — this is permitted because the path is under the `.swarm-worktrees/` base. A bare `rm -rf` / `Remove-Item -Recurse -Force` on `.swarm-worktrees/` is deny-pattern-blocked by the guardrail, so do not use it here.
19
+ 5. **Prune:** `git worktree prune`
20
+ 6. **Verify:** `git branch --list "swarm/lane/<session>/<task>"` returns empty
21
+ 7. Only after cleanup, proceed to `declare_scope` + coder dispatch
22
+
23
+ ## Root cause
24
+ The provisioning code should auto-clean after coder completion/denial/cancellation (tracked in issue #1746 item 1). This playbook is the temporary protocol.
@@ -12,8 +12,8 @@ import {
12
12
  shouldRunOnStartup,
13
13
  writeBackupArtifact,
14
14
  writeDoctorArtifact
15
- } from "./index-fm7xz1ne.js";
16
- import"./index-h4c4rrwx.js";
15
+ } from "./index-zjh648z4.js";
16
+ import"./index-18690p15.js";
17
17
  import"./index-bfwt3abw.js";
18
18
  import"./index-5e4e2hvv.js";
19
19
  import"./index-p0arc26j.js";
@@ -1,21 +1,21 @@
1
1
  // @bun
2
2
  import {
3
3
  createCuratorLLMDelegate
4
- } from "./index-cqbqynzp.js";
5
- import"./index-wj4jeavn.js";
6
- import"./index-5gnp8fyw.js";
4
+ } from "./index-y3nx3ss0.js";
5
+ import"./index-d3txrx5q.js";
6
+ import"./index-mtzjbaaa.js";
7
7
  import"./index-c8s9a3zh.js";
8
- import"./index-fm7xz1ne.js";
8
+ import"./index-zjh648z4.js";
9
9
  import"./index-j2v3w1ds.js";
10
10
  import"./index-scww5b77.js";
11
11
  import"./index-yw8qpf51.js";
12
12
  import"./index-85bacexr.js";
13
13
  import"./index-09xpycan.js";
14
- import"./index-h4c4rrwx.js";
15
- import"./index-9qxntjtx.js";
16
- import"./index-mmny81g1.js";
17
- import"./index-fz1jgbvw.js";
18
- import"./index-wg0665ft.js";
14
+ import"./index-18690p15.js";
15
+ import"./index-b15qbvph.js";
16
+ import"./index-y5z2qdvk.js";
17
+ import"./index-41fgssqr.js";
18
+ import"./index-8f10r7ay.js";
19
19
  import"./index-2nt4mq9n.js";
20
20
  import"./index-bfwt3abw.js";
21
21
  import"./index-wvrj16f0.js";
@@ -11,21 +11,21 @@ import {
11
11
  runCuratorInit,
12
12
  runCuratorPhase,
13
13
  writeCuratorSummary
14
- } from "./index-cqbqynzp.js";
15
- import"./index-wj4jeavn.js";
16
- import"./index-5gnp8fyw.js";
14
+ } from "./index-y3nx3ss0.js";
15
+ import"./index-d3txrx5q.js";
16
+ import"./index-mtzjbaaa.js";
17
17
  import"./index-c8s9a3zh.js";
18
- import"./index-fm7xz1ne.js";
18
+ import"./index-zjh648z4.js";
19
19
  import"./index-j2v3w1ds.js";
20
20
  import"./index-scww5b77.js";
21
21
  import"./index-yw8qpf51.js";
22
22
  import"./index-85bacexr.js";
23
23
  import"./index-09xpycan.js";
24
- import"./index-h4c4rrwx.js";
25
- import"./index-9qxntjtx.js";
26
- import"./index-mmny81g1.js";
27
- import"./index-fz1jgbvw.js";
28
- import"./index-wg0665ft.js";
24
+ import"./index-18690p15.js";
25
+ import"./index-b15qbvph.js";
26
+ import"./index-y5z2qdvk.js";
27
+ import"./index-41fgssqr.js";
28
+ import"./index-8f10r7ay.js";
29
29
  import"./index-2nt4mq9n.js";
30
30
  import"./index-bfwt3abw.js";
31
31
  import"./index-wvrj16f0.js";
@@ -1,22 +1,22 @@
1
1
  // @bun
2
2
  import {
3
3
  handleGuardrailExplain
4
- } from "./index-8a8b5wjf.js";
5
- import"./index-cqbqynzp.js";
6
- import"./index-wj4jeavn.js";
7
- import"./index-5gnp8fyw.js";
4
+ } from "./index-zh3qh6m7.js";
5
+ import"./index-y3nx3ss0.js";
6
+ import"./index-d3txrx5q.js";
7
+ import"./index-mtzjbaaa.js";
8
8
  import"./index-c8s9a3zh.js";
9
- import"./index-fm7xz1ne.js";
9
+ import"./index-zjh648z4.js";
10
10
  import"./index-j2v3w1ds.js";
11
11
  import"./index-scww5b77.js";
12
12
  import"./index-yw8qpf51.js";
13
13
  import"./index-85bacexr.js";
14
14
  import"./index-09xpycan.js";
15
- import"./index-h4c4rrwx.js";
16
- import"./index-9qxntjtx.js";
17
- import"./index-mmny81g1.js";
18
- import"./index-fz1jgbvw.js";
19
- import"./index-wg0665ft.js";
15
+ import"./index-18690p15.js";
16
+ import"./index-b15qbvph.js";
17
+ import"./index-y5z2qdvk.js";
18
+ import"./index-41fgssqr.js";
19
+ import"./index-8f10r7ay.js";
20
20
  import"./index-2nt4mq9n.js";
21
21
  import"./index-bfwt3abw.js";
22
22
  import"./index-wvrj16f0.js";
@@ -1,9 +1,9 @@
1
1
  // @bun
2
2
  import {
3
3
  handleGuardrailLog
4
- } from "./index-vx76tcxe.js";
5
- import"./index-wj4jeavn.js";
6
- import"./index-h4c4rrwx.js";
4
+ } from "./index-p5vm9gy9.js";
5
+ import"./index-d3txrx5q.js";
6
+ import"./index-18690p15.js";
7
7
  import"./index-bfwt3abw.js";
8
8
  import"./index-5e4e2hvv.js";
9
9
  import"./index-p0arc26j.js";
@@ -5,21 +5,21 @@ import {
5
5
  isHiveEligible,
6
6
  promoteFromSwarm,
7
7
  promoteToHive
8
- } from "./index-cqbqynzp.js";
9
- import"./index-wj4jeavn.js";
10
- import"./index-5gnp8fyw.js";
8
+ } from "./index-y3nx3ss0.js";
9
+ import"./index-d3txrx5q.js";
10
+ import"./index-mtzjbaaa.js";
11
11
  import"./index-c8s9a3zh.js";
12
- import"./index-fm7xz1ne.js";
12
+ import"./index-zjh648z4.js";
13
13
  import"./index-j2v3w1ds.js";
14
14
  import"./index-scww5b77.js";
15
15
  import"./index-yw8qpf51.js";
16
16
  import"./index-85bacexr.js";
17
17
  import"./index-09xpycan.js";
18
- import"./index-h4c4rrwx.js";
19
- import"./index-9qxntjtx.js";
20
- import"./index-mmny81g1.js";
21
- import"./index-fz1jgbvw.js";
22
- import"./index-wg0665ft.js";
18
+ import"./index-18690p15.js";
19
+ import"./index-b15qbvph.js";
20
+ import"./index-y5z2qdvk.js";
21
+ import"./index-41fgssqr.js";
22
+ import"./index-8f10r7ay.js";
23
23
  import"./index-2nt4mq9n.js";
24
24
  import"./index-bfwt3abw.js";
25
25
  import"./index-wvrj16f0.js";
@@ -1126,6 +1126,27 @@ var QualityBudgetConfigSchema = GateFeatureSchema.extend({
1126
1126
  enforce_on_globs: exports_external.array(exports_external.string()).default(["src/**"]),
1127
1127
  exclude_globs: exports_external.array(exports_external.string()).default(["docs/**", "tests/**", "**/*.test.*"])
1128
1128
  });
1129
+ var GATE_CONFIG_KNOWN_SECTION_KEYS = {
1130
+ syntax_check: ["enabled"],
1131
+ placeholder_scan: [
1132
+ "enabled",
1133
+ "deny_patterns",
1134
+ "allow_globs",
1135
+ "max_allowed_findings"
1136
+ ],
1137
+ sast_scan: ["enabled"],
1138
+ sbom_generate: ["enabled"],
1139
+ build_check: ["enabled"],
1140
+ quality_budget: [
1141
+ "enabled",
1142
+ "max_complexity_delta",
1143
+ "max_public_api_delta",
1144
+ "max_duplication_ratio",
1145
+ "min_test_to_code_ratio",
1146
+ "enforce_on_globs",
1147
+ "exclude_globs"
1148
+ ]
1149
+ };
1129
1150
  var GateConfigSchema = exports_external.object({
1130
1151
  syntax_check: GateFeatureSchema.default({ enabled: true }),
1131
1152
  placeholder_scan: PlaceholderScanConfigSchema.default({
@@ -1154,7 +1175,7 @@ var GateConfigSchema = exports_external.object({
1154
1175
  sast_scan: GateFeatureSchema.default({ enabled: true }),
1155
1176
  sbom_generate: GateFeatureSchema.default({ enabled: true }),
1156
1177
  build_check: GateFeatureSchema.default({ enabled: true }),
1157
- quality_budget: QualityBudgetConfigSchema
1178
+ quality_budget: QualityBudgetConfigSchema.default(() => QualityBudgetConfigSchema.parse({}))
1158
1179
  });
1159
1180
  var PipelineConfigSchema = exports_external.object({
1160
1181
  parallel_precheck: exports_external.boolean().default(true)
@@ -2362,4 +2383,4 @@ var PluginConfigSchema = exports_external.object({
2362
2383
  skills: SkillsConfigSchema.optional()
2363
2384
  });
2364
2385
 
2365
- export { ORCHESTRATOR_NAME, ALL_SUBAGENT_NAMES, ALL_AGENT_NAMES, TOOL_NAMES, TOOL_NAME_SET, AGENT_TOOL_MAP, DEFAULT_AGENT_CONFIGS, _internals, isKnownCanonicalRole, getCanonicalAgentRole, resolveGeneratedAgentRole, stripKnownSwarmPrefix, AgentReasoningConfigSchema, AgentThinkingConfigSchema, AgentOverrideConfigSchema, SwarmConfigSchema, ModelPricingConfigSchema, PricingConfigSchema, HooksConfigSchema, ScoringWeightsSchema, DecisionDecaySchema, TokenRatiosSchema, ScoringConfigSchema, ContextBudgetConfigSchema, EvidenceConfigSchema, GateFeatureSchema, PlaceholderScanConfigSchema, QualityBudgetConfigSchema, GateConfigSchema, PipelineConfigSchema, PhaseCompleteConfigSchema, SummaryConfigSchema, ReviewPassesConfigSchema, AutoReviewConfigSchema, AdversarialDetectionConfigSchema, AdversarialTestingConfigSchema, IntegrationAnalysisConfigSchema, DocsConfigSchema, DesignDocsConfigSchema, UIReviewConfigSchema, CompactionAdvisoryConfigSchema, LintConfigSchema, SecretscanConfigSchema, GuardrailsProfileSchema, DEFAULT_AGENT_PROFILES, DEFAULT_ARCHITECT_PROFILE, GuardrailsConfigSchema, WatchdogConfigSchema, SelfReviewConfigSchema, resolveGuardrailsConfig, ToolFilterConfigSchema, PlanCursorConfigSchema, ContextMapConfigSchema, RepoGraphConfigSchema, CheckpointConfigSchema, AutomationModeSchema, AutomationCapabilitiesSchema, AutomationConfigSchema, KnowledgeConfigSchema, MemoryConfigSchema, CuratorConfigSchema, ArchitecturalSupervisionConfigSchema, KnowledgeApplicationConfigSchema, SkillPropagationConfigSchema, SkillImproverConfigSchema, SkillsConfigSchema, SpecWriterConfigSchema, SlopDetectorConfigSchema, IncrementalVerifyConfigSchema, CompactionConfigSchema, PrmConfigSchema, AgentAuthorityRuleSchema, AuthorityConfigSchema, GeneralCouncilConfigSchema, CouncilConfigSchema, PrMonitorConfigSchema, ParallelizationConfigSchema, WorktreeIsolationConfigSchema, LeanTurboConfigSchema, EpicConfigSchema, StandardTurboConfigSchema, LeanTurboStrategyConfigSchema, TurboConfigSchema, ExternalSkillCandidateSourceTypeSchema, ExternalSkillCandidateEvaluationVerdictSchema, DiscoverySourceSchema, ExternalSkillCandidateSchema, ExternalSkillsConfigSchema, DEFAULT_EXTERNAL_SKILLS_CONFIG, DEFAULT_SKILLS_CONFIG, resolveExternalSkillsConfig, PluginConfigSchema };
2386
+ export { ORCHESTRATOR_NAME, ALL_SUBAGENT_NAMES, ALL_AGENT_NAMES, TOOL_NAMES, TOOL_NAME_SET, AGENT_TOOL_MAP, DEFAULT_AGENT_CONFIGS, _internals, isKnownCanonicalRole, getCanonicalAgentRole, resolveGeneratedAgentRole, stripKnownSwarmPrefix, AgentReasoningConfigSchema, AgentThinkingConfigSchema, 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, AdversarialTestingConfigSchema, IntegrationAnalysisConfigSchema, DocsConfigSchema, DesignDocsConfigSchema, UIReviewConfigSchema, CompactionAdvisoryConfigSchema, LintConfigSchema, SecretscanConfigSchema, GuardrailsProfileSchema, DEFAULT_AGENT_PROFILES, DEFAULT_ARCHITECT_PROFILE, GuardrailsConfigSchema, WatchdogConfigSchema, SelfReviewConfigSchema, resolveGuardrailsConfig, ToolFilterConfigSchema, PlanCursorConfigSchema, ContextMapConfigSchema, RepoGraphConfigSchema, CheckpointConfigSchema, AutomationModeSchema, AutomationCapabilitiesSchema, AutomationConfigSchema, KnowledgeConfigSchema, MemoryConfigSchema, CuratorConfigSchema, ArchitecturalSupervisionConfigSchema, KnowledgeApplicationConfigSchema, SkillPropagationConfigSchema, SkillImproverConfigSchema, SkillsConfigSchema, SpecWriterConfigSchema, SlopDetectorConfigSchema, IncrementalVerifyConfigSchema, CompactionConfigSchema, PrmConfigSchema, AgentAuthorityRuleSchema, AuthorityConfigSchema, GeneralCouncilConfigSchema, CouncilConfigSchema, PrMonitorConfigSchema, ParallelizationConfigSchema, WorktreeIsolationConfigSchema, LeanTurboConfigSchema, EpicConfigSchema, StandardTurboConfigSchema, LeanTurboStrategyConfigSchema, TurboConfigSchema, ExternalSkillCandidateSourceTypeSchema, ExternalSkillCandidateEvaluationVerdictSchema, DiscoverySourceSchema, ExternalSkillCandidateSchema, ExternalSkillsConfigSchema, DEFAULT_EXTERNAL_SKILLS_CONFIG, DEFAULT_SKILLS_CONFIG, resolveExternalSkillsConfig, PluginConfigSchema };
@@ -6,7 +6,7 @@ import {
6
6
  resolveSwarmKnowledgePath,
7
7
  resolveSwarmRejectedPath,
8
8
  transactKnowledge
9
- } from "./index-wg0665ft.js";
9
+ } from "./index-8f10r7ay.js";
10
10
  import {
11
11
  resolveKnowledgeStoreDir
12
12
  } from "./index-2nt4mq9n.js";
@@ -341,6 +341,7 @@ function validateLesson(candidate, existingLessons, meta) {
341
341
  }
342
342
  var ACTIONABLE_STRING_MAX = 200;
343
343
  var ACTIONABLE_LIST_MAX = 20;
344
+ var RETIRED_SKILL_HISTORY_MAX = 50;
344
345
  var NAME_PATTERN = /^[a-z][a-z0-9_]{0,63}$/;
345
346
  var SOURCE_REF_FORBIDDEN = /(\.\.\/|\.\.\\|\0|[\x00-\x1f\x7f])/;
346
347
  var ALLOWED_SKILL_PATH_PREFIXES = [
@@ -473,6 +474,25 @@ function validateActionableFields(fields) {
473
474
  if (fields.generated_skill_path !== undefined && !validateSkillPath(fields.generated_skill_path)) {
474
475
  errors.push("generated_skill_path must be repo-local under allowed prefix");
475
476
  }
477
+ if (fields.draft_generated_skill_slug !== undefined) {
478
+ if (typeof fields.draft_generated_skill_slug !== "string" || !/^[a-z0-9][a-z0-9-]{0,63}$/.test(fields.draft_generated_skill_slug)) {
479
+ errors.push("draft_generated_skill_slug must be a kebab-case slug");
480
+ }
481
+ }
482
+ if (fields.draft_generated_skill_path !== undefined && !validateSkillPath(fields.draft_generated_skill_path)) {
483
+ errors.push("draft_generated_skill_path must be repo-local under allowed prefix");
484
+ }
485
+ if (fields.retired_skill_history !== undefined) {
486
+ if (!Array.isArray(fields.retired_skill_history)) {
487
+ errors.push("retired_skill_history must be an array of slugs");
488
+ } else {
489
+ if (fields.retired_skill_history.length > RETIRED_SKILL_HISTORY_MAX) {
490
+ errors.push(`retired_skill_history exceeds ${RETIRED_SKILL_HISTORY_MAX} items`);
491
+ } else if (!fields.retired_skill_history.every((s) => typeof s === "string" && /^[a-z0-9][a-z0-9-]{0,63}$/.test(s))) {
492
+ errors.push("retired_skill_history entries must be kebab-case slugs");
493
+ }
494
+ }
495
+ }
476
496
  return { valid: errors.length === 0, errors };
477
497
  }
478
498
  function hasNonEmptyList(v) {
@@ -738,4 +758,4 @@ var _internals = {
738
758
  hasSignificantOverlap
739
759
  };
740
760
 
741
- export { DANGEROUS_COMMAND_ERROR_PATTERNS, DANGEROUS_COMMAND_WARNING_PATTERNS, DANGEROUS_COMMAND_PATTERNS, SECURITY_DEGRADING_PATTERNS, INVISIBLE_FORMAT_CHARS, INJECTION_PATTERNS, validateLesson, ACTIONABLE_STRING_MAX, ACTIONABLE_LIST_MAX, ALLOWED_SKILL_PATH_PREFIXES, validateSkillPath, validateSkillCandidatePath, validateActionableFields, validateActionability, resolveUnactionablePath, appendUnactionable, auditEntryHealth, quarantineEntry, restoreEntry, unarchiveEntry, _internals };
761
+ export { DANGEROUS_COMMAND_ERROR_PATTERNS, DANGEROUS_COMMAND_WARNING_PATTERNS, DANGEROUS_COMMAND_PATTERNS, SECURITY_DEGRADING_PATTERNS, INVISIBLE_FORMAT_CHARS, INJECTION_PATTERNS, validateLesson, ACTIONABLE_STRING_MAX, ACTIONABLE_LIST_MAX, RETIRED_SKILL_HISTORY_MAX, ALLOWED_SKILL_PATH_PREFIXES, validateSkillPath, validateSkillCandidatePath, validateActionableFields, validateActionability, resolveUnactionablePath, appendUnactionable, auditEntryHealth, quarantineEntry, restoreEntry, unarchiveEntry, _internals };
@@ -525,7 +525,7 @@ async function applyConfidenceFloorAction(directory, touched, options) {
525
525
  const recovered = touched.filter((e) => e.confidence > CONFIDENCE_FLOOR + FLOOR_EPSILON && e.confidence_floor_demoted);
526
526
  if (atFloor.length === 0 && recovered.length === 0)
527
527
  return;
528
- const { readKnowledgeCounterRollups, effectiveRetrievalOutcomes } = await import("./knowledge-events-6n3x3he2.js");
528
+ const { readKnowledgeCounterRollups, effectiveRetrievalOutcomes } = await import("./knowledge-events-ymysgtrr.js");
529
529
  const rollups = await readKnowledgeCounterRollups(directory);
530
530
  const flagIds = new Set;
531
531
  for (const e of atFloor) {
@@ -592,7 +592,7 @@ async function applyConfidenceFloorAction(directory, touched, options) {
592
592
  });
593
593
  }
594
594
  if (action === "quarantine" && toQuarantine.length > 0) {
595
- const { quarantineEntry } = await import("./knowledge-validator-exymfcb9.js");
595
+ const { quarantineEntry } = await import("./knowledge-validator-b9nvmzjc.js");
596
596
  for (const { id } of toQuarantine) {
597
597
  await quarantineEntry(directory, id, "confidence_floor_negative_outcome", "auto").catch((err) => {
598
598
  console.warn("[knowledge-store] confidence-floor quarantine failed (best-effort):", err instanceof Error ? err.message : String(err));