opencode-swarm 7.125.0 → 7.125.2

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 (50) hide show
  1. package/.opencode/skills/swarm-pr-feedback/SKILL.md +11 -127
  2. package/.opencode/skills/swarm-pr-feedback/references/bot-claim-verification.md +71 -0
  3. package/.opencode/skills/swarm-pr-feedback/references/operational-gotchas.md +49 -0
  4. package/.opencode/skills/swarm-pr-review/SKILL.md +6 -346
  5. package/.opencode/skills/swarm-pr-review/references/parser-dry-run.md +235 -0
  6. package/.opencode/skills/swarm-pr-review/references/prompt-templates.md +103 -0
  7. package/.opencode/skills/writing-tests/SKILL.md +4 -123
  8. package/.opencode/skills/writing-tests/references/mock-and-seam-inventory.md +43 -0
  9. package/dist/cli/{config-doctor-be9sxqx8.js → config-doctor-8df6hk58.js} +2 -2
  10. package/dist/cli/{curation-policy-52kt6d7t.js → curation-policy-7pvghg6f.js} +2 -2
  11. package/dist/cli/{curator-hbst8nbc.js → curator-dw2zb74h.js} +13 -13
  12. package/dist/cli/{curator-llm-factory-frde1955.js → curator-llm-factory-bntt6v8j.js} +13 -13
  13. package/dist/cli/{evidence-summary-service-9hq7n9k9.js → evidence-summary-service-v4h2w487.js} +1 -1
  14. package/dist/cli/{guardrail-explain-112kqmbc.js → guardrail-explain-vmr4db9n.js} +14 -14
  15. package/dist/cli/{guardrail-log-c8zcab91.js → guardrail-log-8prd6cnc.js} +3 -3
  16. package/dist/cli/{hive-promoter-448xs2tp.js → hive-promoter-xymt9vf2.js} +13 -13
  17. package/dist/cli/{index-jh6s75f6.js → index-1s7jzcsy.js} +1 -1
  18. package/dist/cli/{index-09vd53pz.js → index-39p1yyag.js} +1 -1
  19. package/dist/cli/{index-dx2c2wjt.js → index-7mtvvt8p.js} +2 -2
  20. package/dist/cli/{index-67hqr2zv.js → index-7ne6q2a0.js} +1 -1
  21. package/dist/cli/{index-amspa811.js → index-8ed9rz7y.js} +122 -45
  22. package/dist/cli/{index-0y6tmm9v.js → index-92xyawa7.js} +1 -1
  23. package/dist/cli/{index-7j3sm7h8.js → index-em4h33my.js} +2 -2
  24. package/dist/cli/{index-4rzzzjtg.js → index-fs02c7tz.js} +277 -16
  25. package/dist/cli/{index-kt0awv1n.js → index-j8ptbcxz.js} +1 -1
  26. package/dist/cli/{index-yt1v62pv.js → index-pgya7cnn.js} +4 -4
  27. package/dist/cli/{index-vtwqjr4z.js → index-ptmhxsaf.js} +3 -3
  28. package/dist/cli/{index-xattnmyb.js → index-qcrah1jk.js} +6 -2
  29. package/dist/cli/{index-6vfvc36k.js → index-sxdh19nk.js} +1 -1
  30. package/dist/cli/{index-n6chz2g8.js → index-tdpct4cz.js} +1 -1
  31. package/dist/cli/{index-99ed0h32.js → index-v3f7jvm8.js} +5 -5
  32. package/dist/cli/{index-9hbwa5x1.js → index-yrk6hfp1.js} +15 -15
  33. package/dist/cli/{index-958hf0yr.js → index-zbsxek49.js} +2 -2
  34. package/dist/cli/index.js +13 -13
  35. package/dist/cli/{knowledge-escalator-htafbhxg.js → knowledge-escalator-47hfstmk.js} +3 -3
  36. package/dist/cli/{knowledge-events-havw8c4t.js → knowledge-events-j5dpp72w.js} +1 -1
  37. package/dist/cli/{knowledge-store-hqngpt2v.js → knowledge-store-58gt7m85.js} +1 -1
  38. package/dist/cli/{knowledge-validator-g7mpnazh.js → knowledge-validator-jjxw5mwc.js} +4 -4
  39. package/dist/cli/{scan-cursor-sx7cvh8v.js → scan-cursor-h8we8dfv.js} +2 -2
  40. package/dist/cli/{schema-2418eqy3.js → schema-xpqbhcyp.js} +1 -1
  41. package/dist/cli/{skill-generator-zggy797r.js → skill-generator-k8d0vff0.js} +5 -5
  42. package/dist/commands/close.d.ts +4 -2
  43. package/dist/config/schema.d.ts +8 -0
  44. package/dist/evidence/documents-retention.d.ts +116 -0
  45. package/dist/evidence/manager.d.ts +17 -0
  46. package/dist/hooks/knowledge-application-gate.d.ts +8 -2
  47. package/dist/hooks/knowledge-application.d.ts +2 -0
  48. package/dist/index.js +376 -368
  49. package/dist/state.d.ts +33 -2
  50. package/package.json +1 -1
package/dist/state.d.ts CHANGED
@@ -375,11 +375,24 @@ export declare const swarmState: {
375
375
  phase?: string;
376
376
  generatedAt: number;
377
377
  }>;
378
- /** v2: dedup set for ack records. Key = `${sessionId}|${id}|${result}|${dayKey}`.
378
+ /** v2: dedup set for ack records. Key = `${sessionId}|${id}|${result}`.
379
379
  * Prevents the chat.messages.transform path AND a knowledge_ack tool call
380
- * from double-counting the same ack within a session-day. FIFO-capped —
380
+ * from double-counting the same ack within a session. FIFO-capped —
381
381
  * see addKnowledgeAckDedup. */
382
382
  knowledgeAckDedup: Set<string>;
383
+ /** v2: per-session denial counter for the knowledge-application enforcement
384
+ * gate's deadlock escape hatch (`knowledgeApplicationGateBefore`). Keyed by
385
+ * sessionID; each entry also records the `directiveKey` (a sorted, joined
386
+ * fingerprint of the critical-directive-id set the count was accumulated
387
+ * against) so a session that has its critical directives swapped out from
388
+ * under it — an ordinary occurrence on phase/task transitions via
389
+ * `setCriticalShownIds` — does not carry a stale denial count into an
390
+ * unrelated new directive's budget. FIFO-capped — see
391
+ * incrementGateDenialCount/clearGateDenialCount. */
392
+ gateDenialCounts: Map<string, {
393
+ count: number;
394
+ directiveKey: string;
395
+ }>;
383
396
  /**
384
397
  * All generated agent names registered with OpenCode at plugin init.
385
398
  * Used by Full-Auto v2 delegation guard to apply strict registry-aware
@@ -731,6 +744,7 @@ export declare function getSessionEnvironment(sessionId: string): EnvironmentPro
731
744
  export declare function ensureSessionEnvironment(sessionId: string): EnvironmentProfile;
732
745
  export declare const MAX_TRACKED_CRITICAL_SHOWN = 500;
733
746
  export declare const MAX_TRACKED_KNOWLEDGE_ACKS = 5000;
747
+ export declare const MAX_TRACKED_GATE_DENIALS = 500;
734
748
  /** Set the critical shown ids for a session, FIFO-evicting the oldest entry
735
749
  * if the cap is exceeded. Re-setting an existing key keeps insertion order
736
750
  * fresh for that key (delete-then-set). */
@@ -744,6 +758,23 @@ export declare function setCriticalShownIds(sessionID: string, value: {
744
758
  * not bypass the FIFO-cap pathway with a direct `.delete()`. Returns
745
759
  * whether an entry was removed. */
746
760
  export declare function clearCriticalShownIds(sessionID: string): boolean;
761
+ /** Build the directive-identity fingerprint used to key the gate denial
762
+ * counter — a sorted, joined snapshot of a critical-directive-id set. Two
763
+ * calls with the same id set (regardless of order) produce the same key,
764
+ * so re-injecting the identical directive on a later turn does not reset
765
+ * the counter, but swapping to a genuinely different directive set does. */
766
+ export declare function buildGateDenialDirectiveKey(ids: string[]): string;
767
+ /** Increment (or start) the per-session gate denial counter for the given
768
+ * directive identity, FIFO-evicting the oldest session entry if the cap is
769
+ * exceeded. When the stored entry's `directiveKey` does not match
770
+ * `directiveKey`, the counter restarts at 1 instead of continuing to
771
+ * accumulate — this is what prevents a stale denial count from an earlier,
772
+ * unrelated critical directive from carrying into a fresh one's
773
+ * `max_gate_denials` budget. Returns the resulting count. */
774
+ export declare function incrementGateDenialCount(sessionID: string, directiveKey: string): number;
775
+ /** Clear the gate denial counter for a session. Centralised so call sites do
776
+ * not bypass the FIFO-cap pathway with a direct `.delete()`. */
777
+ export declare function clearGateDenialCount(sessionID: string): void;
747
778
  /** Add a knowledge ack dedup key, FIFO-evicting the oldest if the cap is
748
779
  * exceeded. Sets preserve insertion order in JS. */
749
780
  export declare function addKnowledgeAckDedup(key: string): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "7.125.0",
3
+ "version": "7.125.2",
4
4
  "description": "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",