opencode-swarm 6.66.0 → 6.67.0

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/dist/cli/index.js CHANGED
@@ -18535,9 +18535,9 @@ var AGENT_TOOL_MAP = {
18535
18535
  "checkpoint",
18536
18536
  "check_gate_status",
18537
18537
  "completion_verify",
18538
+ "complexity_hotspots",
18538
18539
  "convene_council",
18539
18540
  "declare_council_criteria",
18540
- "complexity_hotspots",
18541
18541
  "detect_domains",
18542
18542
  "evidence_check",
18543
18543
  "extract_code_blocks",
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Adversarial security tests for safeAssignOwnProps.
3
+ * Tests prototype pollution attacks, constructor pollution, array smuggling,
4
+ * and boundary violations.
5
+ */
6
+ export {};
@@ -48,6 +48,8 @@ export interface CouncilSynthesis {
48
48
  /** 1-indexed */
49
49
  roundNumber: number;
50
50
  allCriteriaMet: boolean;
51
+ /** true when called with an empty verdicts array — the APPROVE is vacuous */
52
+ emptyVerdictsWarning?: boolean;
51
53
  }
52
54
  export interface CouncilCriteriaItem {
53
55
  id: string;
@@ -71,7 +73,14 @@ export interface CouncilConfig {
71
73
  vetoPriority: boolean;
72
74
  /** Default false — when true, convene_council rejects unless all 5 member verdicts are provided */
73
75
  requireAllMembers: boolean;
74
- /** Optional webhook URL or handler name invoked when maxRounds is reached without APPROVE. Declared for forward compatibility; no behavior is implemented yet. */
76
+ /**
77
+ * Optional webhook URL or handler name for auto-escalation when maxRounds is
78
+ * reached without APPROVE. Reserved for forward compatibility — NOT yet
79
+ * implemented. Currently, maxRounds exhaustion surfaces a user-facing message
80
+ * via `buildUnifiedFeedbackMd` in council-service.ts (see the "Escalate to
81
+ * user" block), and the architect must relay it to the user. Future wiring
82
+ * options: critic_oversight agent, HTTP webhook, or configurable handler.
83
+ */
75
84
  escalateOnMaxRounds?: string;
76
85
  }
77
86
  export declare const COUNCIL_DEFAULTS: CouncilConfig;
package/dist/index.js CHANGED
@@ -175,9 +175,9 @@ var init_constants = __esm(() => {
175
175
  "checkpoint",
176
176
  "check_gate_status",
177
177
  "completion_verify",
178
+ "complexity_hotspots",
178
179
  "convene_council",
179
180
  "declare_council_criteria",
180
- "complexity_hotspots",
181
181
  "detect_domains",
182
182
  "evidence_check",
183
183
  "extract_code_blocks",
@@ -68371,7 +68371,13 @@ ${body2}`);
68371
68371
  }
68372
68372
 
68373
68373
  // src/council/council-evidence-writer.ts
68374
- import { existsSync as existsSync36, mkdirSync as mkdirSync16, readFileSync as readFileSync35, writeFileSync as writeFileSync11 } from "fs";
68374
+ import {
68375
+ appendFileSync as appendFileSync7,
68376
+ existsSync as existsSync36,
68377
+ mkdirSync as mkdirSync16,
68378
+ readFileSync as readFileSync35,
68379
+ writeFileSync as writeFileSync11
68380
+ } from "fs";
68375
68381
  import { join as join59 } from "path";
68376
68382
  var EVIDENCE_DIR2 = ".swarm/evidence";
68377
68383
  var VALID_TASK_ID = /^\d+\.\d+(\.\d+)*$/;
@@ -68382,7 +68388,23 @@ function safeAssignOwnProps(target, source) {
68382
68388
  for (const key of Object.keys(source)) {
68383
68389
  if (FORBIDDEN_KEYS.has(key))
68384
68390
  continue;
68385
- target[key] = source[key];
68391
+ const value = source[key];
68392
+ if (value !== null && typeof value === "object" && !Array.isArray(value)) {
68393
+ const nested = Object.create(null);
68394
+ safeAssignOwnProps(nested, value);
68395
+ target[key] = nested;
68396
+ } else if (Array.isArray(value)) {
68397
+ target[key] = value.map((item) => {
68398
+ if (item !== null && typeof item === "object" && !Array.isArray(item)) {
68399
+ const nested = Object.create(null);
68400
+ safeAssignOwnProps(nested, item);
68401
+ return nested;
68402
+ }
68403
+ return item;
68404
+ });
68405
+ } else {
68406
+ target[key] = value;
68407
+ }
68386
68408
  }
68387
68409
  return target;
68388
68410
  }
@@ -68420,6 +68442,20 @@ function writeCouncilEvidence(workingDir, synthesis) {
68420
68442
  safeAssignOwnProps(updated, existingRoot);
68421
68443
  updated.gates = mergedGates;
68422
68444
  writeFileSync11(filePath, JSON.stringify(updated, null, 2));
68445
+ try {
68446
+ const councilDir = join59(workingDir, ".swarm", "council");
68447
+ mkdirSync16(councilDir, { recursive: true });
68448
+ const auditLine = JSON.stringify({
68449
+ round: synthesis.roundNumber,
68450
+ verdict: synthesis.overallVerdict,
68451
+ timestamp: synthesis.timestamp,
68452
+ vetoedBy: synthesis.vetoedBy
68453
+ });
68454
+ appendFileSync7(join59(councilDir, `${synthesis.taskId}.rounds.jsonl`), `${auditLine}
68455
+ `);
68456
+ } catch (auditError) {
68457
+ console.warn(`writeCouncilEvidence: failed to append round-history audit log: ${auditError instanceof Error ? auditError.message : String(auditError)}`);
68458
+ }
68423
68459
  }
68424
68460
 
68425
68461
  // src/council/types.ts
@@ -68469,7 +68505,8 @@ function synthesizeCouncilVerdicts(taskId, swarmId, verdicts, criteria, roundNum
68469
68505
  advisoryFindings,
68470
68506
  unifiedFeedbackMd,
68471
68507
  roundNumber,
68472
- allCriteriaMet
68508
+ allCriteriaMet,
68509
+ ...verdicts.length === 0 && { emptyVerdictsWarning: true }
68473
68510
  };
68474
68511
  }
68475
68512
  function detectConflicts(verdicts) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "6.66.0",
3
+ "version": "6.67.0",
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",