opencode-swarm 7.137.1 → 7.137.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 (39) hide show
  1. package/dist/cli/{config-doctor-b9r9rt2c.js → config-doctor-xrbzq4r0.js} +2 -2
  2. package/dist/cli/{curation-policy-ftx2emfw.js → curation-policy-xyradeax.js} +2 -2
  3. package/dist/cli/{curator-1sxxtbq7.js → curator-h1ea9skz.js} +12 -12
  4. package/dist/cli/{curator-llm-factory-yhqbkc5w.js → curator-llm-factory-rk7pccwc.js} +12 -12
  5. package/dist/cli/{guardrail-explain-qh1y8jsz.js → guardrail-explain-sq1kcah3.js} +13 -13
  6. package/dist/cli/{guardrail-log-84zffdv3.js → guardrail-log-7anp1z1n.js} +3 -3
  7. package/dist/cli/{hive-promoter-hpe29xrz.js → hive-promoter-qsymj94z.js} +12 -12
  8. package/dist/cli/{index-m4s91910.js → index-02jqxmh8.js} +5 -5
  9. package/dist/cli/{index-d67810xe.js → index-1da1tvtn.js} +1 -1
  10. package/dist/cli/{index-t5099rx9.js → index-4t39wzzg.js} +1 -1
  11. package/dist/cli/{index-e0nvge1c.js → index-5k0csd2m.js} +2 -2
  12. package/dist/cli/{index-t2mv25yf.js → index-9casmxdt.js} +4 -4
  13. package/dist/cli/{index-em10pmph.js → index-aygnzd04.js} +1 -1
  14. package/dist/cli/{index-9vqxf9pd.js → index-d735dzm7.js} +37 -36
  15. package/dist/cli/{index-pbe51g7h.js → index-gey6qegb.js} +1 -1
  16. package/dist/cli/{index-k8y41t4y.js → index-jdqayy7h.js} +2 -2
  17. package/dist/cli/{index-bxk0a1r9.js → index-kakb2jm0.js} +1 -1
  18. package/dist/cli/{index-7e60c7ay.js → index-p0kez6cn.js} +14 -14
  19. package/dist/cli/{index-zxf5w0jj.js → index-pwx989sa.js} +3 -3
  20. package/dist/cli/{index-gd47gp2q.js → index-rfrkt29c.js} +1 -1
  21. package/dist/cli/{index-a3gpeb4f.js → index-s9at02fn.js} +1 -1
  22. package/dist/cli/{index-1qn2gchc.js → index-vyh2prxv.js} +1 -1
  23. package/dist/cli/{index-d8rc8c9y.js → index-ysh3a2nb.js} +2 -2
  24. package/dist/cli/index.js +12 -12
  25. package/dist/cli/{knowledge-escalator-3ds615yq.js → knowledge-escalator-e9zk371p.js} +3 -3
  26. package/dist/cli/{knowledge-events-3c0g2xbm.js → knowledge-events-dnyc1k78.js} +1 -1
  27. package/dist/cli/{knowledge-store-pq43990j.js → knowledge-store-x4vqyhbz.js} +1 -1
  28. package/dist/cli/{knowledge-validator-gepda374.js → knowledge-validator-72jdx5ze.js} +4 -4
  29. package/dist/cli/{scan-cursor-5hq37qdg.js → scan-cursor-z4xpes5f.js} +2 -2
  30. package/dist/cli/{schema-mrbyt7dg.js → schema-2dkw18zz.js} +1 -1
  31. package/dist/cli/{skill-generator-3gt8em6v.js → skill-generator-0q1jk6xd.js} +5 -5
  32. package/dist/council/council-evidence-writer.d.ts +2 -1
  33. package/dist/council/council-round-state.d.ts +110 -0
  34. package/dist/council/types.d.ts +0 -2
  35. package/dist/index.js +60 -56
  36. package/dist/tools/convene-council.d.ts +2 -17
  37. package/dist/tools/submit-phase-council-verdicts.d.ts +0 -1
  38. package/dist/tools/write-final-council-evidence.d.ts +4 -18
  39. package/package.json +1 -1
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  readKnowledge,
4
4
  transactKnowledge
5
- } from "./index-t2mv25yf.js";
5
+ } from "./index-9casmxdt.js";
6
6
  import {
7
7
  resolveKnowledgeStoreDir
8
8
  } from "./index-vft1pg34.js";
@@ -1,10 +1,10 @@
1
1
  // @bun
2
2
  import {
3
3
  handleGuardrailExplain
4
- } from "./index-d8rc8c9y.js";
4
+ } from "./index-ysh3a2nb.js";
5
5
  import {
6
6
  handleGuardrailLog
7
- } from "./index-pbe51g7h.js";
7
+ } from "./index-gey6qegb.js";
8
8
  import {
9
9
  COMMAND_REGISTRY,
10
10
  SWARM_COMMAND_TOOL_ALLOWLIST,
@@ -84,39 +84,39 @@ import {
84
84
  handleWriteRetroCommand,
85
85
  normalizeSwarmCommandInput,
86
86
  resolveCommand
87
- } from "./index-9vqxf9pd.js";
87
+ } from "./index-d735dzm7.js";
88
88
  import"./index-vm4xw9z3.js";
89
89
  import"./index-b2s3t517.js";
90
- import"./index-em10pmph.js";
91
- import"./index-gd47gp2q.js";
90
+ import"./index-aygnzd04.js";
91
+ import"./index-rfrkt29c.js";
92
92
  import"./index-1zrb3vt2.js";
93
93
  import"./index-5wjw05dy.js";
94
94
  import"./index-y8552snf.js";
95
95
  import"./index-4905hd2m.js";
96
96
  import"./index-134d35c1.js";
97
- import"./index-zxf5w0jj.js";
98
- import"./index-m4s91910.js";
99
- import"./index-bxk0a1r9.js";
97
+ import"./index-pwx989sa.js";
98
+ import"./index-02jqxmh8.js";
99
+ import"./index-kakb2jm0.js";
100
100
  import"./index-6mjf4vr1.js";
101
101
  import"./index-c8s9a3zh.js";
102
102
  import"./index-9ss2m4rs.js";
103
103
  import"./index-wsdnttf4.js";
104
104
  import"./index-5r6kkhd7.js";
105
- import"./index-k8y41t4y.js";
106
- import"./index-a3gpeb4f.js";
105
+ import"./index-jdqayy7h.js";
106
+ import"./index-s9at02fn.js";
107
107
  import"./index-rtry5xyf.js";
108
- import"./index-t2mv25yf.js";
109
- import"./index-t5099rx9.js";
108
+ import"./index-9casmxdt.js";
109
+ import"./index-4t39wzzg.js";
110
110
  import"./index-ae75rja9.js";
111
111
  import"./index-vft1pg34.js";
112
112
  import"./index-n3h6rmbe.js";
113
- import"./index-d67810xe.js";
113
+ import"./index-1da1tvtn.js";
114
114
  import"./index-k5jrywpr.js";
115
115
  import"./index-n832052r.js";
116
116
  import {
117
117
  init_schema,
118
118
  stripKnownSwarmPrefix
119
- } from "./index-1qn2gchc.js";
119
+ } from "./index-vyh2prxv.js";
120
120
  import"./index-bk5tah7q.js";
121
121
  import"./index-8fwhhayc.js";
122
122
  import"./index-q1exe2b3.js";
@@ -2,18 +2,18 @@
2
2
  import {
3
3
  ALLOWED_SKILL_PATH_PREFIXES,
4
4
  validateSkillPath
5
- } from "./index-k8y41t4y.js";
5
+ } from "./index-jdqayy7h.js";
6
6
  import {
7
7
  computeOutcomeSignal,
8
8
  readKnowledge,
9
9
  resolveHiveKnowledgePath,
10
10
  resolveSwarmKnowledgePath,
11
11
  transactKnowledge
12
- } from "./index-t2mv25yf.js";
12
+ } from "./index-9casmxdt.js";
13
13
  import {
14
14
  effectiveRetrievalOutcomes,
15
15
  readKnowledgeCounterRollups
16
- } from "./index-t5099rx9.js";
16
+ } from "./index-4t39wzzg.js";
17
17
  import {
18
18
  init_knowledge_types,
19
19
  isActiveStatus
@@ -6,7 +6,7 @@ import {
6
6
  PluginConfigSchema,
7
7
  init_schema,
8
8
  stripKnownSwarmPrefix
9
- } from "./index-1qn2gchc.js";
9
+ } from "./index-vyh2prxv.js";
10
10
  import {
11
11
  ALL_AGENT_NAMES,
12
12
  init_constants
@@ -4,7 +4,7 @@ import {
4
4
  } from "./index-rtry5xyf.js";
5
5
  import {
6
6
  readKnowledgeEvents
7
- } from "./index-t5099rx9.js";
7
+ } from "./index-4t39wzzg.js";
8
8
  import {
9
9
  isLinked,
10
10
  readLinkPointer,
@@ -21,7 +21,7 @@ var package_default;
21
21
  var init_package = __esm(() => {
22
22
  package_default = {
23
23
  name: "opencode-swarm",
24
- version: "7.137.1",
24
+ version: "7.137.2",
25
25
  description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
26
26
  main: "dist/index.js",
27
27
  types: "dist/index.d.ts",
@@ -12,14 +12,14 @@ import {
12
12
  detectPosixWrites,
13
13
  detectWindowsWrites,
14
14
  resolveWriteTargets
15
- } from "./index-9vqxf9pd.js";
15
+ } from "./index-d735dzm7.js";
16
16
  import {
17
17
  checkFileAuthority,
18
18
  classifyFile,
19
19
  isInDeclaredScope,
20
20
  redactPath,
21
21
  redactShellCommand
22
- } from "./index-em10pmph.js";
22
+ } from "./index-aygnzd04.js";
23
23
 
24
24
  // src/services/guardrail-explain-service.ts
25
25
  import path from "path";
package/dist/cli/index.js CHANGED
@@ -6,39 +6,39 @@ import {
6
6
  getPluginConfigDir,
7
7
  getPluginLockFilePaths,
8
8
  resolveCommand
9
- } from "./index-9vqxf9pd.js";
9
+ } from "./index-d735dzm7.js";
10
10
  import"./index-vm4xw9z3.js";
11
11
  import"./index-b2s3t517.js";
12
- import"./index-em10pmph.js";
13
- import"./index-gd47gp2q.js";
12
+ import"./index-aygnzd04.js";
13
+ import"./index-rfrkt29c.js";
14
14
  import"./index-1zrb3vt2.js";
15
15
  import"./index-5wjw05dy.js";
16
16
  import"./index-y8552snf.js";
17
17
  import"./index-4905hd2m.js";
18
18
  import"./index-134d35c1.js";
19
- import"./index-zxf5w0jj.js";
20
- import"./index-m4s91910.js";
21
- import"./index-bxk0a1r9.js";
19
+ import"./index-pwx989sa.js";
20
+ import"./index-02jqxmh8.js";
21
+ import"./index-kakb2jm0.js";
22
22
  import"./index-6mjf4vr1.js";
23
23
  import"./index-c8s9a3zh.js";
24
24
  import"./index-9ss2m4rs.js";
25
25
  import"./index-wsdnttf4.js";
26
26
  import"./index-5r6kkhd7.js";
27
- import"./index-k8y41t4y.js";
28
- import"./index-a3gpeb4f.js";
27
+ import"./index-jdqayy7h.js";
28
+ import"./index-s9at02fn.js";
29
29
  import"./index-rtry5xyf.js";
30
- import"./index-t2mv25yf.js";
31
- import"./index-t5099rx9.js";
30
+ import"./index-9casmxdt.js";
31
+ import"./index-4t39wzzg.js";
32
32
  import"./index-ae75rja9.js";
33
33
  import"./index-vft1pg34.js";
34
34
  import"./index-n3h6rmbe.js";
35
- import"./index-d67810xe.js";
35
+ import"./index-1da1tvtn.js";
36
36
  import"./index-k5jrywpr.js";
37
37
  import"./index-n832052r.js";
38
38
  import {
39
39
  init_package,
40
40
  package_default
41
- } from "./index-1qn2gchc.js";
41
+ } from "./index-vyh2prxv.js";
42
42
  import"./index-bk5tah7q.js";
43
43
  import"./index-8fwhhayc.js";
44
44
  import"./index-q1exe2b3.js";
@@ -8,9 +8,9 @@ import {
8
8
  maybeEscalateOnViolation,
9
9
  maybeQuarantineOnContradiction,
10
10
  readRecentEscalations
11
- } from "./index-m4s91910.js";
12
- import"./index-t2mv25yf.js";
13
- import"./index-t5099rx9.js";
11
+ } from "./index-02jqxmh8.js";
12
+ import"./index-9casmxdt.js";
13
+ import"./index-4t39wzzg.js";
14
14
  import"./index-ae75rja9.js";
15
15
  import"./index-vft1pg34.js";
16
16
  import"./index-n3h6rmbe.js";
@@ -28,7 +28,7 @@ import {
28
28
  resolveKnowledgeCounterBaselinePath,
29
29
  resolveKnowledgeEventsPath,
30
30
  resolveLegacyApplicationLogPath
31
- } from "./index-t5099rx9.js";
31
+ } from "./index-4t39wzzg.js";
32
32
  import"./index-ae75rja9.js";
33
33
  import"./index-vft1pg34.js";
34
34
  import"./index-n3h6rmbe.js";
@@ -41,7 +41,7 @@ import {
41
41
  transactKnowledge,
42
42
  transactKnowledgeWithCas,
43
43
  wordBigrams
44
- } from "./index-t2mv25yf.js";
44
+ } from "./index-9casmxdt.js";
45
45
  import {
46
46
  resolveHiveDataDir
47
47
  } from "./index-ae75rja9.js";
@@ -23,11 +23,11 @@ import {
23
23
  validateLesson,
24
24
  validateSkillCandidatePath,
25
25
  validateSkillPath
26
- } from "./index-k8y41t4y.js";
27
- import"./index-a3gpeb4f.js";
26
+ } from "./index-jdqayy7h.js";
27
+ import"./index-s9at02fn.js";
28
28
  import"./index-rtry5xyf.js";
29
- import"./index-t2mv25yf.js";
30
- import"./index-t5099rx9.js";
29
+ import"./index-9casmxdt.js";
30
+ import"./index-4t39wzzg.js";
31
31
  import"./index-ae75rja9.js";
32
32
  import"./index-vft1pg34.js";
33
33
  import"./index-n3h6rmbe.js";
@@ -4,8 +4,8 @@ import {
4
4
  alreadyCuratedThisGeneration,
5
5
  claimNextScanBatch,
6
6
  getScanStatus
7
- } from "./index-bxk0a1r9.js";
8
- import"./index-t2mv25yf.js";
7
+ } from "./index-kakb2jm0.js";
8
+ import"./index-9casmxdt.js";
9
9
  import"./index-ae75rja9.js";
10
10
  import"./index-vft1pg34.js";
11
11
  import"./index-n3h6rmbe.js";
@@ -95,7 +95,7 @@ import {
95
95
  resolveGeneratedAgentRole,
96
96
  resolveGuardrailsConfig,
97
97
  stripKnownSwarmPrefix
98
- } from "./index-1qn2gchc.js";
98
+ } from "./index-vyh2prxv.js";
99
99
  import"./index-bk5tah7q.js";
100
100
  import"./index-3jcyn8g6.js";
101
101
  import"./index-bpmtbmy9.js";
@@ -33,12 +33,12 @@ import {
33
33
  sanitizeSlug,
34
34
  selectCandidateEntries,
35
35
  writeEvalStub
36
- } from "./index-zxf5w0jj.js";
37
- import"./index-k8y41t4y.js";
38
- import"./index-a3gpeb4f.js";
36
+ } from "./index-pwx989sa.js";
37
+ import"./index-jdqayy7h.js";
38
+ import"./index-s9at02fn.js";
39
39
  import"./index-rtry5xyf.js";
40
- import"./index-t2mv25yf.js";
41
- import"./index-t5099rx9.js";
40
+ import"./index-9casmxdt.js";
41
+ import"./index-4t39wzzg.js";
42
42
  import"./index-ae75rja9.js";
43
43
  import"./index-vft1pg34.js";
44
44
  import"./index-n3h6rmbe.js";
@@ -24,4 +24,5 @@ import type { CouncilSynthesis } from './types';
24
24
  export declare const _internals: {
25
25
  withTaskEvidenceLock: typeof withTaskEvidenceLock;
26
26
  };
27
- export declare function writeCouncilEvidence(workingDir: string, synthesis: CouncilSynthesis): Promise<void>;
27
+ export declare function writeCouncilEvidence(workingDir: string, synthesis: CouncilSynthesis, attemptId?: string): Promise<void>;
28
+ export declare function hasCouncilEvidenceAttempt(workingDir: string, taskId: string, attemptId: string, roundNumber: number): boolean;
@@ -0,0 +1,110 @@
1
+ import { randomUUID } from 'node:crypto';
2
+ import { withEvidenceLock } from '../evidence/lock.js';
3
+ import { atomicWriteFile } from '../evidence/task-file.js';
4
+ export type CouncilRoundScope = {
5
+ kind: 'task';
6
+ taskId: string;
7
+ } | {
8
+ kind: 'phase';
9
+ phaseNumber: number;
10
+ } | {
11
+ kind: 'final';
12
+ generation: string;
13
+ };
14
+ export type CouncilRoundTransition = 'stay' | 'advance' | 'close';
15
+ type AuditScope = {
16
+ kind: 'task';
17
+ scopeHash: string;
18
+ } | {
19
+ kind: 'phase';
20
+ phaseNumber: number;
21
+ } | {
22
+ kind: 'final';
23
+ scopeHash: string;
24
+ };
25
+ interface StateSnapshot {
26
+ version: 1;
27
+ currentRound: number;
28
+ status: 'open' | 'closed';
29
+ maxRoundsExhausted: boolean;
30
+ lastAttemptId?: string;
31
+ lastDigest?: string;
32
+ }
33
+ interface AttemptRecord {
34
+ version: 1;
35
+ event: 'received' | 'finalized' | 'recovered';
36
+ attemptId: string;
37
+ timestamp: string;
38
+ scope: AuditScope;
39
+ clientRound?: number;
40
+ authoritativeRound: number;
41
+ digest: string;
42
+ sessionHash?: string;
43
+ disposition: string;
44
+ verdictCount: number;
45
+ members: string[];
46
+ transition?: CouncilRoundTransition;
47
+ gateEffect?: 'none' | 'blocked' | 'allowed';
48
+ verdict?: 'APPROVE' | 'CONCERNS' | 'REJECT';
49
+ quorumSize?: number;
50
+ evidenceRef?: string;
51
+ nextState?: StateSnapshot;
52
+ }
53
+ export interface CouncilAttemptEvaluation {
54
+ disposition: string;
55
+ response: Record<string, unknown>;
56
+ transition: CouncilRoundTransition;
57
+ gateEffect: 'none' | 'blocked' | 'allowed';
58
+ verdict?: 'APPROVE' | 'CONCERNS' | 'REJECT';
59
+ quorumSize?: number;
60
+ evidence?: {
61
+ reference: string;
62
+ commit: (attemptId: string) => Promise<void>;
63
+ };
64
+ /**
65
+ * Non-critical notification/reward work. It runs best-effort and at most once
66
+ * after the verdict, audit, and state commit; failures never change the verdict.
67
+ */
68
+ afterCommit?: () => void | Promise<void>;
69
+ }
70
+ export interface CouncilAttemptInput {
71
+ directory: string;
72
+ scope: CouncilRoundScope;
73
+ clientRound?: number;
74
+ maxRounds: number;
75
+ sessionID?: string;
76
+ request: unknown;
77
+ verdictCount: number;
78
+ members: string[];
79
+ probePendingEvidence?: (attemptId: string, round: number, evidenceRef?: string) => Promise<boolean>;
80
+ evaluate: (authoritativeRound: number) => Promise<CouncilAttemptEvaluation>;
81
+ }
82
+ export declare class CouncilRoundStateUncertainError extends Error {
83
+ constructor(message: string);
84
+ }
85
+ export declare function councilRoundStatePaths(directory: string, scope: CouncilRoundScope): {
86
+ state: string;
87
+ audit: string;
88
+ lock: string;
89
+ };
90
+ export declare function councilRequestDigest(request: unknown, round: number): string;
91
+ declare function appendAudit(path: string, record: AttemptRecord): void;
92
+ interface AuditTail {
93
+ records: AttemptRecord[];
94
+ truncated: boolean;
95
+ }
96
+ declare function readAuditTail(path: string, scope: CouncilRoundScope): AuditTail;
97
+ export declare function runCouncilAttempt(input: CouncilAttemptInput): Promise<string>;
98
+ export declare function recordUnscopedCouncilAttempt(directory: string, level: 'task' | 'phase' | 'final', disposition: string, raw: unknown, issues: Array<{
99
+ path: Array<PropertyKey>;
100
+ code: string;
101
+ }>, sessionID?: string): Promise<string | null>;
102
+ export declare const _internals: {
103
+ now: () => string;
104
+ uuid: typeof randomUUID;
105
+ appendAudit: typeof appendAudit;
106
+ readAuditTail: typeof readAuditTail;
107
+ atomicWrite: typeof atomicWriteFile;
108
+ withLock: typeof withEvidenceLock;
109
+ };
110
+ export {};
@@ -21,8 +21,6 @@ export interface CouncilFinding {
21
21
  export interface CouncilMemberVerdict {
22
22
  agent: CouncilAgent;
23
23
  verdict: CouncilVerdict;
24
- /** Optional source round for freshness checks on resubmission. */
25
- verdictRound?: number;
26
24
  /** Confidence 0.0–1.0 */
27
25
  confidence: number;
28
26
  findings: CouncilFinding[];