opencode-swarm 7.146.2 → 7.146.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.
- package/.opencode/skills/swarm-pr-review/SKILL.md +27 -44
- package/.opencode/skills/swarm-pr-review/references/findings-persistence-contract.md +52 -12
- package/.opencode/skills/swarm-pr-review/references/lane-output-recoverability.md +6 -3
- package/.opencode/skills/swarm-pr-review/references/parser-dry-run.md +19 -1
- package/.opencode/skills/swarm-pr-review/references/verdict-settlement-contract.md +41 -0
- package/dist/agents/council-prompts.d.ts +3 -3
- package/dist/background/candidate-contract.d.ts +21 -1
- package/dist/background/candidate-parser.d.ts +21 -1
- package/dist/background/pending-delegations.d.ts +8 -1
- package/dist/background/pr-review-collection-receipt.d.ts +70 -0
- package/dist/cli/{config-doctor-vstrprja.js → config-doctor-578ebqhn.js} +2 -2
- package/dist/cli/{core-3wzpwe5z.js → core-2ne03a43.js} +1 -1
- package/dist/cli/{curation-policy-x19e8bqc.js → curation-policy-g353f457.js} +6 -6
- package/dist/cli/{curator-llm-factory-6bra0bfd.js → curator-llm-factory-6hgn7p6n.js} +27 -27
- package/dist/cli/{curator-cvy1s7wd.js → curator-w52frg17.js} +27 -27
- package/dist/cli/{evidence-summary-service-yhap2xph.js → evidence-summary-service-nj4p6a0d.js} +11 -11
- package/dist/cli/{gate-evidence-vxbyq5sb.js → gate-evidence-4vnjdh9y.js} +6 -6
- package/dist/cli/{guardrail-explain-h8cnwa02.js → guardrail-explain-rq01z1yz.js} +28 -28
- package/dist/cli/{guardrail-log-syb7tz2w.js → guardrail-log-ratb651f.js} +3 -3
- package/dist/cli/{hive-promoter-3tex870c.js → hive-promoter-pbm9kee1.js} +27 -27
- package/dist/cli/{index-yxhcy5cm.js → index-1mbdwy12.js} +55 -1
- package/dist/cli/{index-01ybcsa5.js → index-3neh2mxk.js} +2 -2
- package/dist/cli/{index-5e5a1y2r.js → index-3p4wgm0d.js} +1 -1
- package/dist/cli/{index-4vwn66wk.js → index-5cbbtbvf.js} +3 -3
- package/dist/cli/{index-z5ppkn8y.js → index-6eycwm3v.js} +6 -6
- package/dist/cli/{index-bghwrr59.js → index-6q35swn2.js} +1 -1
- package/dist/cli/{index-qbpxrw95.js → index-8py21zn6.js} +2 -2
- package/dist/cli/{index-tj861zhd.js → index-96zkay2e.js} +4 -4
- package/dist/cli/{index-y3hmyvt6.js → index-bq4mvwht.js} +2 -2
- package/dist/cli/{index-rfph0nhf.js → index-brb64k96.js} +1426 -635
- package/dist/cli/{index-p0m03xa6.js → index-df8xj9hr.js} +4 -4
- package/dist/cli/{index-cr90rcg3.js → index-dp5w9s5z.js} +7 -7
- package/dist/cli/{index-w0cj7zyd.js → index-f75qjtn5.js} +1 -1
- package/dist/cli/{index-vmfaafte.js → index-ffqdah8s.js} +5 -5
- package/dist/cli/{index-f3x2gsby.js → index-fp2d44f5.js} +1 -1
- package/dist/cli/{index-jv9xs6mb.js → index-g2r8nknz.js} +2 -2
- package/dist/cli/{index-n4k0pt5f.js → index-g335vrc7.js} +4 -4
- package/dist/cli/{index-z9ed68jt.js → index-gr3zfcsh.js} +18 -4
- package/dist/cli/{index-w5r84rd1.js → index-hcb25p12.js} +1 -1
- package/dist/cli/{index-ycgm9pzg.js → index-hw1yghpg.js} +7 -6
- package/dist/cli/{index-a1febb2k.js → index-jgwhpza8.js} +2 -2
- package/dist/cli/{index-cx67qa9g.js → index-kjmcp9mf.js} +1 -1
- package/dist/cli/{index-42nq97rb.js → index-kv2j4cnq.js} +6 -6
- package/dist/cli/{index-zkaz3fhw.js → index-p3k155dv.js} +2 -2
- package/dist/cli/{index-qyvjp0bq.js → index-q81s0m8k.js} +66 -37
- package/dist/cli/{index-97psh79d.js → index-rpy0bent.js} +178 -18
- package/dist/cli/{index-r46q6996.js → index-t798v5pq.js} +29 -29
- package/dist/cli/{index-e1hjd15c.js → index-tp5ytzzg.js} +1 -1
- package/dist/cli/{index-vj9bba5k.js → index-vdrwj7z0.js} +4 -4
- package/dist/cli/{index-46cypnz3.js → index-wesj94x0.js} +4 -4
- package/dist/cli/{index-c9jr4j2q.js → index-xsxj4vbf.js} +1 -1
- package/dist/cli/index.js +27 -27
- package/dist/cli/{knowledge-escalator-mn4sx4qd.js → knowledge-escalator-jbazxmk5.js} +11 -11
- package/dist/cli/{knowledge-events-x975ngy4.js → knowledge-events-jyqy3st8.js} +9 -9
- package/dist/cli/{knowledge-link-8pr02pza.js → knowledge-link-jkx8xjxp.js} +5 -5
- package/dist/cli/{knowledge-store-33p762ey.js → knowledge-store-e2defagd.js} +6 -6
- package/dist/cli/{knowledge-validator-q5jc0scs.js → knowledge-validator-pnmdsw2b.js} +8 -8
- package/dist/cli/{pending-delegations-kkrczqv7.js → pending-delegations-k2yqg1sj.js} +3 -3
- package/dist/cli/{pr-subscriptions-2xn238xt.js → pr-subscriptions-js5v2xr6.js} +3 -3
- package/dist/cli/{runner-e7z9cf5y.js → runner-q7d22d1w.js} +6 -6
- package/dist/cli/{scan-cursor-p7t5mb4x.js → scan-cursor-snx85enn.js} +7 -7
- package/dist/cli/{schema-t8bmshhj.js → schema-6rmxzg6g.js} +1 -1
- package/dist/cli/{scope-persistence-2kyrgsca.js → scope-persistence-23cqafkx.js} +7 -7
- package/dist/cli/{skill-generator-fwvmcv8m.js → skill-generator-980zjk9q.js} +13 -13
- package/dist/cli/{telemetry-t109dhv7.js → telemetry-xzy0qeap.js} +1 -1
- package/dist/cli/{worktree-collision-ownership-2jtg2my1.js → worktree-collision-ownership-xj0bsg92.js} +3 -3
- package/dist/cli/{worktree-isolation-87j70zg1.js → worktree-isolation-4d0nc04c.js} +27 -27
- package/dist/commands/close.d.ts +1 -0
- package/dist/commands/context-map-stats.d.ts +5 -0
- package/dist/config/schema.d.ts +16 -0
- package/dist/context-map/telemetry.d.ts +168 -26
- package/dist/council/council-evidence-writer.d.ts +2 -1
- package/dist/council/council-freshness.d.ts +49 -0
- package/dist/council/council-review-identity.d.ts +133 -0
- package/dist/council/council-round-state.d.ts +27 -3
- package/dist/council/disagreement-detector.d.ts +12 -2
- package/dist/council/general-council-types.d.ts +32 -0
- package/dist/council/types.d.ts +43 -7
- package/dist/hooks/pr-workflow-gate.d.ts +58 -5
- package/dist/index.js +177 -152
- package/dist/observability/catalog.d.ts +7 -5
- package/dist/telemetry.d.ts +22 -1
- package/dist/tools/dispatch-lanes.d.ts +30 -8
- package/dist/tools/phase-complete/gates/types.d.ts +7 -0
- package/dist/tools/write-final-council-evidence.d.ts +1 -7
- package/package.json +2 -1
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The event catalog (issue #2029).
|
|
3
3
|
*
|
|
4
|
-
* Exactly
|
|
5
|
-
* `src/telemetry.ts:15-
|
|
4
|
+
* Exactly 46 entries, matching the `TelemetryEvent` union at
|
|
5
|
+
* `src/telemetry.ts:15-109`. Thirty-eight predate the #2029 contract; the 39th is
|
|
6
6
|
* `agent_conflict_detected` (previously emitted through a force-cast past the
|
|
7
7
|
* type system), the 40th is `close_archive_result` (issue #2030 — the
|
|
8
8
|
* structured close/archive result event), the 41st is the bounded diagnostic
|
|
9
9
|
* projection of authoritative knowledge-receipt transitions (issue #2031).
|
|
10
10
|
* The 42nd is the human-only `knowledge_maintenance` quarantine audit
|
|
11
11
|
* (issue #2033), the 43rd is the aggregate `context_pruned` transcript
|
|
12
|
-
* mutation audit,
|
|
13
|
-
* residue audit (issue #2035)
|
|
12
|
+
* mutation audit, the 44th is the bounded `residue_health` atomic-write
|
|
13
|
+
* residue audit (issue #2035), and the 46th is the bounded
|
|
14
|
+
* `context_telemetry_health` storage audit for the issue-#2037
|
|
15
|
+
* `.swarm/context-telemetry.jsonl` store. These late additions are instances of
|
|
14
16
|
* the defect class this contract exists to close: an event kind entering the
|
|
15
17
|
* stream with no registration.
|
|
16
18
|
*
|
|
@@ -65,7 +67,7 @@ export interface CatalogEntry {
|
|
|
65
67
|
/**
|
|
66
68
|
* Whether an event of this kind must carry `trace.parentSpanId`.
|
|
67
69
|
*
|
|
68
|
-
* `false` for all
|
|
70
|
+
* `false` for all 46 entries today, and that is a truthful statement about
|
|
69
71
|
* the current system rather than a placeholder: no producer supplies a
|
|
70
72
|
* parent span, so `createObservation` never sets one. Setting this to `true`
|
|
71
73
|
* for a kind whose producer cannot supply a parent would make every
|
package/dist/telemetry.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ export type TelemetryEvent = 'session_started' | 'session_ended' | 'agent_activa
|
|
|
32
32
|
* `prm_hard_stop` TRIGGER emitted by `src/prm/escalation.ts`. A trigger with
|
|
33
33
|
* no matching delivery means the containment never reached the agent.
|
|
34
34
|
*/
|
|
35
|
-
| 'prm_hard_stop_delivered' | 'agent_conflict_detected' | 'close_archive_result' | 'knowledge_receipt_transition' | 'knowledge_maintenance' | 'residue_health';
|
|
35
|
+
| 'prm_hard_stop_delivered' | 'agent_conflict_detected' | 'close_archive_result' | 'knowledge_receipt_transition' | 'knowledge_maintenance' | 'residue_health' | 'context_telemetry_health';
|
|
36
36
|
/** Stable classification for how a reviewer-gate decision was established. */
|
|
37
37
|
export type ReviewerGateEvidenceKind = 'genuine' | 'fallback' | 'data_quality' | 'block';
|
|
38
38
|
/**
|
|
@@ -236,6 +236,27 @@ export declare const telemetry: {
|
|
|
236
236
|
oldest_age_ms: number;
|
|
237
237
|
grammar_counts: Record<string, number>;
|
|
238
238
|
}): void;
|
|
239
|
+
/**
|
|
240
|
+
* Context-map telemetry storage health (issue #2037). Emitted after a
|
|
241
|
+
* compaction or close cut for the bounded `.swarm/context-telemetry.jsonl`
|
|
242
|
+
* store. Bounded payload: accepted/compacted/retained/dropped/corrupt
|
|
243
|
+
* counts, oldest/newest timestamps, and byte figures. Counts ONLY — no
|
|
244
|
+
* capsule/query content and no filesystem paths, matching the observability
|
|
245
|
+
* contract's no-content-in-metrics rule. Enables PR 16 to alarm and PR 20 to
|
|
246
|
+
* report without leaking workspace layout or capsule contents.
|
|
247
|
+
*/
|
|
248
|
+
contextTelemetryHealth(data: {
|
|
249
|
+
trigger: "compaction" | "close";
|
|
250
|
+
accepted_count: number;
|
|
251
|
+
compacted_count: number;
|
|
252
|
+
retained_count: number;
|
|
253
|
+
dropped_count: number;
|
|
254
|
+
corrupt_count: number;
|
|
255
|
+
oldest_timestamp: string | null;
|
|
256
|
+
newest_timestamp: string | null;
|
|
257
|
+
bytes: number;
|
|
258
|
+
limit_bytes: number;
|
|
259
|
+
}): void;
|
|
239
260
|
/**
|
|
240
261
|
* Issue #2063 C2 — the PRM hard-stop DENIAL was actually delivered to the
|
|
241
262
|
* agent (thrown by the guardrails `toolBefore` consumer). `prm_hard_stop`
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { type BackgroundDelegationRecord, type BackgroundDelegationWorkflowLaneRecovery } from '../background/pending-delegations.js';
|
|
2
|
+
import { type BackgroundDelegationRecord, type BackgroundDelegationResult, type BackgroundDelegationWorkflowLaneRecovery } from '../background/pending-delegations.js';
|
|
3
3
|
import { resolveExactMergeBaseAsync, resolvePrWorkflowRevisionDigestAsync } from '../background/workspace-snapshot.js';
|
|
4
4
|
import { loadPluginConfig } from '../config/loader.js';
|
|
5
|
-
import { type PrReviewDepthTier, validatePrWorkflowTransportRecovery } from '../hooks/pr-workflow-gate.js';
|
|
5
|
+
import { type PrReviewDepthTier, type PrReviewVerdictCollectionReceipt, validatePrWorkflowTransportRecovery } from '../hooks/pr-workflow-gate.js';
|
|
6
6
|
import { buildLaneOrientationBlock } from '../hooks/repo-graph-injection.js';
|
|
7
7
|
import { createParallelDispatcher } from '../parallel/dispatcher/parallel-dispatcher.js';
|
|
8
8
|
import { createSwarmTool } from './create-tool.js';
|
|
@@ -138,6 +138,8 @@ export interface DispatchLaneResult {
|
|
|
138
138
|
kind: BackgroundDelegationWorkflowLaneRecovery['kind'];
|
|
139
139
|
reason: string;
|
|
140
140
|
}>;
|
|
141
|
+
accepted_review_item_ids?: string[];
|
|
142
|
+
rejected_review_item_ids?: string[];
|
|
141
143
|
/**
|
|
142
144
|
* Set to true when this lane's `output` preview was withheld because an
|
|
143
145
|
* identical preview (same batch, lane, and result digest) was already
|
|
@@ -411,6 +413,11 @@ export declare const _test_exports: {
|
|
|
411
413
|
*/
|
|
412
414
|
resetDeliveredLaneOutputs: () => void;
|
|
413
415
|
recordToLaneResult: typeof recordToLaneResult;
|
|
416
|
+
appendPrReviewCollectionReceipt: typeof appendPrReviewCollectionReceipt;
|
|
417
|
+
parsePrReviewCollectionReceipt: typeof parsePrReviewCollectionReceipt;
|
|
418
|
+
resolvePrReviewReceiptFallbacks: typeof resolvePrReviewReceiptFallbacks;
|
|
419
|
+
resolvePrReviewReceiptFallbacksFromState: typeof resolvePrReviewReceiptFallbacksFromState;
|
|
420
|
+
consumePrReviewReceiptAppendFailureLog: typeof consumePrReviewReceiptAppendFailureLog;
|
|
414
421
|
prReviewLaneResponseBudgetChars: typeof prReviewLaneResponseBudgetChars;
|
|
415
422
|
};
|
|
416
423
|
type ReadOnlyToolPermissions = Record<string, false> & {
|
|
@@ -426,6 +433,7 @@ export declare function executeDispatchLanes(args: unknown, directory: string, c
|
|
|
426
433
|
export declare function executeDispatchLanesAsync(args: unknown, directory: string, context?: DispatchLanesExecutionContext): Promise<DispatchLanesAsyncResult>;
|
|
427
434
|
export declare function executeCollectLaneResults(args: unknown, directory: string, context?: Pick<DispatchLanesExecutionContext, 'sessionID'>): Promise<CollectLaneResultsResult>;
|
|
428
435
|
declare function isRetryableSessionCreateFailure(error: unknown): boolean;
|
|
436
|
+
declare function consumePrReviewReceiptAppendFailureLog(loggedFailures: Set<string>, parentSessionId: string, correlationId: string): boolean;
|
|
429
437
|
declare function extractAssistantTranscript(messages: Array<{
|
|
430
438
|
info?: {
|
|
431
439
|
role?: string;
|
|
@@ -452,14 +460,28 @@ declare function reserveCollectionLaneCallBudgets(deadline: number, remainingLan
|
|
|
452
460
|
revisionDigestBudgetMs: number;
|
|
453
461
|
};
|
|
454
462
|
declare function nextCollectPollInterval(currentMs: number): number;
|
|
455
|
-
declare function buildCollectResult(batchId: string, records: BackgroundDelegationRecord[], includePending: boolean, deliveryContext?:
|
|
463
|
+
declare function buildCollectResult(batchId: string, records: BackgroundDelegationRecord[], includePending: boolean, deliveryContext?: LaneResultDeliveryContext): CollectLaneResultsResult;
|
|
464
|
+
interface LaneResultDeliveryContext {
|
|
456
465
|
directory?: string;
|
|
457
466
|
sessionID?: string;
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
467
|
+
reviewReceipts?: ReadonlyMap<string, PrReviewVerdictCollectionReceipt>;
|
|
468
|
+
}
|
|
469
|
+
declare function resolvePrReviewReceiptFallbacks(directory: string, sessionID: string | undefined, records: readonly BackgroundDelegationRecord[]): Promise<ReadonlyMap<string, PrReviewVerdictCollectionReceipt>>;
|
|
470
|
+
interface PrReviewReceiptFallbackState {
|
|
471
|
+
prReviewValidationBatches?: Array<{
|
|
472
|
+
batchId: string;
|
|
473
|
+
phase: string;
|
|
474
|
+
lanes: Array<{
|
|
475
|
+
laneId: string;
|
|
476
|
+
workflowLane: string;
|
|
477
|
+
reviewItemIds?: string[];
|
|
478
|
+
}>;
|
|
479
|
+
}>;
|
|
480
|
+
}
|
|
481
|
+
declare function resolvePrReviewReceiptFallbacksFromState(records: readonly BackgroundDelegationRecord[], state: PrReviewReceiptFallbackState): ReadonlyMap<string, PrReviewVerdictCollectionReceipt>;
|
|
482
|
+
declare function appendPrReviewCollectionReceipt(record: BackgroundDelegationRecord, result: BackgroundDelegationResult, receipt: PrReviewVerdictCollectionReceipt): BackgroundDelegationResult | null;
|
|
483
|
+
declare function parsePrReviewCollectionReceipt(record: BackgroundDelegationRecord): PrReviewVerdictCollectionReceipt | null;
|
|
484
|
+
declare function recordToLaneResult(record: BackgroundDelegationRecord, batchId: string, deliveryContext?: LaneResultDeliveryContext): DispatchLaneResult;
|
|
463
485
|
declare function buildReadOnlyTools(): ReadOnlyToolPermissions;
|
|
464
486
|
type ApplyCommonPromptResult = {
|
|
465
487
|
ok: true;
|
|
@@ -50,4 +50,11 @@ export interface GateContext {
|
|
|
50
50
|
autoReviewBlocked?: boolean;
|
|
51
51
|
/** Machine-readable reason from the current review run, when blocked. */
|
|
52
52
|
autoReviewBlockReason?: import('../../../review/engine').ReviewEngineResult['blockReason'];
|
|
53
|
+
/**
|
|
54
|
+
* Single clock captured once for the whole aggregate phase preflight
|
|
55
|
+
* (issue #2102 contract D). All freshness-sensitive gates must evaluate
|
|
56
|
+
* against this timestamp instead of calling Date.now()/new Date() so
|
|
57
|
+
* their verdicts stay mutually consistent across an age boundary.
|
|
58
|
+
*/
|
|
59
|
+
preflightNowMs: number;
|
|
53
60
|
}
|
|
@@ -7,13 +7,7 @@ export declare const ArgsSchema: z.ZodObject<{
|
|
|
7
7
|
projectSummary: z.ZodString;
|
|
8
8
|
roundNumber: z.ZodOptional<z.ZodNumber>;
|
|
9
9
|
verdicts: z.ZodArray<z.ZodObject<{
|
|
10
|
-
agent: z.
|
|
11
|
-
reviewer: "reviewer";
|
|
12
|
-
test_engineer: "test_engineer";
|
|
13
|
-
critic: "critic";
|
|
14
|
-
explorer: "explorer";
|
|
15
|
-
sme: "sme";
|
|
16
|
-
}>;
|
|
10
|
+
agent: z.ZodString;
|
|
17
11
|
verdict: z.ZodEnum<{
|
|
18
12
|
APPROVE: "APPROVE";
|
|
19
13
|
CONCERNS: "CONCERNS";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-swarm",
|
|
3
|
-
"version": "7.146.
|
|
3
|
+
"version": "7.146.4",
|
|
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",
|
|
@@ -110,6 +110,7 @@
|
|
|
110
110
|
"check:events": "bun run scripts/check-event-contract.ts",
|
|
111
111
|
"check:retention": "bun run scripts/check-retention-registry.ts",
|
|
112
112
|
"check:test-file-cap": "bun run scripts/check-test-file-cap.ts",
|
|
113
|
+
"check:pending-fragment": "bun run scripts/check-pending-fragment.ts",
|
|
113
114
|
"check:gate-portability": "bun run scripts/check-gate-portability.ts",
|
|
114
115
|
"check:bare-spawn": "bun run scripts/check-bare-executable-spawn.ts",
|
|
115
116
|
"check:memory-recall": "bun run scripts/memory-recall-regression.ts"
|