opencode-swarm 7.148.0 → 7.148.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.
- package/.opencode/skills/swarm-pr-review/SKILL.md +6 -4
- package/.opencode/skills/swarm-pr-review/references/findings-persistence-contract.md +33 -1
- package/.opencode/skills/swarm-pr-review/references/lane-output-recoverability.md +2 -2
- package/.opencode/skills/swarm-pr-review/references/parser-dry-run.md +1 -2
- package/.opencode/skills/swarm-pr-review/references/prompt-templates.md +11 -3
- package/dist/background/pending-delegations.d.ts +1 -1
- package/dist/background/pr-review-collection-receipt.d.ts +2 -2
- package/dist/background/pr-review-contract.d.ts +148 -0
- package/dist/background/pr-review-trigger-contract.d.ts +1 -0
- package/dist/cli/{config-doctor-z2wam5wn.js → config-doctor-6danhdcy.js} +2 -2
- package/dist/cli/{core-k7m76ce0.js → core-0ghwny8q.js} +1 -1
- package/dist/cli/{curation-policy-kd8j8cne.js → curation-policy-hkdghd3a.js} +6 -6
- package/dist/cli/{curator-llm-factory-4qt8b15s.js → curator-llm-factory-6n47j5qn.js} +27 -27
- package/dist/cli/{curator-jwpm52kg.js → curator-wvm7qbkk.js} +27 -27
- package/dist/cli/{evidence-summary-service-90z295j3.js → evidence-summary-service-0xwrkmf9.js} +11 -11
- package/dist/cli/{gate-evidence-3q6q71fw.js → gate-evidence-6e5yhcy6.js} +6 -6
- package/dist/cli/{guardrail-explain-44xt373y.js → guardrail-explain-tgv7rvap.js} +28 -28
- package/dist/cli/{guardrail-log-kbp5jztb.js → guardrail-log-k0zk6rbs.js} +3 -3
- package/dist/cli/{guardrail-reset-vpazhh8k.js → guardrail-reset-4fw16xmb.js} +27 -27
- package/dist/cli/{hive-promoter-tdrkz9nh.js → hive-promoter-zemwxxw1.js} +27 -27
- package/dist/cli/{index-dfvh1r8g.js → index-03wz9h63.js} +29 -29
- package/dist/cli/{index-d3bdr78h.js → index-092deqxs.js} +2 -1
- package/dist/cli/{index-pgvx3rkq.js → index-2n9rwvcc.js} +1 -1
- package/dist/cli/{index-7hctrdk8.js → index-2zz8b0rb.js} +2 -2
- package/dist/cli/{index-qwj7qjjp.js → index-3pbvdde0.js} +2 -2
- package/dist/cli/{index-ykjjqg79.js → index-5vyej8pc.js} +6 -6
- package/dist/cli/{index-9pmmexsd.js → index-7jaq84cg.js} +1 -1
- package/dist/cli/{index-52gnz782.js → index-84ytts36.js} +4 -4
- package/dist/cli/{index-k6h5yc1j.js → index-crpkb5x6.js} +5 -5
- package/dist/cli/{index-p62we2ar.js → index-ebt47fnp.js} +1 -1
- package/dist/cli/{index-q81s0m8k.js → index-ghbkknjz.js} +79 -38
- package/dist/cli/{index-crpb0qke.js → index-hsq8nyen.js} +4522 -2938
- package/dist/cli/{index-sycndcwd.js → index-k2ad2vtb.js} +1 -1
- package/dist/cli/{index-qcm97jfh.js → index-m5z2fgs4.js} +1 -1
- package/dist/cli/{index-n96wwf56.js → index-mbcyz77e.js} +4 -4
- package/dist/cli/{index-702zx3rk.js → index-mgcffsk0.js} +1 -1
- package/dist/cli/{index-7ac5z627.js → index-ndqhtgrc.js} +1 -1
- package/dist/cli/{index-ffevkn7k.js → index-nqwn8sf0.js} +1 -1
- package/dist/cli/{index-016708th.js → index-nxydm56k.js} +2 -2
- package/dist/cli/{index-dmbaaz6d.js → index-pzt7ed53.js} +4 -4
- package/dist/cli/{index-n0fpefqx.js → index-q6kscnts.js} +4 -4
- package/dist/cli/{index-zwpttdgn.js → index-r9g7ymv2.js} +1 -1
- package/dist/cli/{index-6q35swn2.js → index-rsn4jm90.js} +1 -1
- package/dist/cli/{index-jpa03jcc.js → index-s0nss8c4.js} +1 -1
- package/dist/cli/{index-gwrv6c56.js → index-s0s1e5jp.js} +7 -7
- package/dist/cli/{index-07zgs6y0.js → index-wgrvq2bc.js} +14 -10
- package/dist/cli/{index-y586zet4.js → index-x4kgn37c.js} +2 -2
- package/dist/cli/{index-h879g4r4.js → index-x9jppg8b.js} +3 -3
- package/dist/cli/{index-rcjq8dm4.js → index-x9q0b3a8.js} +2 -2
- package/dist/cli/{index-x4rxh8j9.js → index-xn7h24x4.js} +3 -3
- package/dist/cli/{index-2y14mjfn.js → index-zpn3wqvp.js} +10 -7
- package/dist/cli/index.js +27 -27
- package/dist/cli/{knowledge-escalator-0qnm48g8.js → knowledge-escalator-rfw35yt1.js} +11 -11
- package/dist/cli/{knowledge-events-3zv81nzp.js → knowledge-events-wmjm5wn6.js} +9 -9
- package/dist/cli/{knowledge-link-w91bcyx2.js → knowledge-link-5dctq0ax.js} +5 -5
- package/dist/cli/{knowledge-store-njtx6wj1.js → knowledge-store-f2ev6s5p.js} +8 -6
- package/dist/cli/{knowledge-validator-7eqj5afv.js → knowledge-validator-6cmwpx9e.js} +8 -8
- package/dist/cli/{pending-delegations-k4x00mqc.js → pending-delegations-h4gr264y.js} +3 -3
- package/dist/cli/{pr-subscriptions-x2mqc3f1.js → pr-subscriptions-9mg6mwc0.js} +3 -3
- package/dist/cli/{runner-gfzkp9nv.js → runner-9g2pcg10.js} +6 -6
- package/dist/cli/{scan-cursor-a6dhyf55.js → scan-cursor-x1ma7edk.js} +7 -7
- package/dist/cli/{schema-p0vn1zgh.js → schema-g5ggmb47.js} +1 -1
- package/dist/cli/{scope-persistence-zs97zkt7.js → scope-persistence-gt0zpp6a.js} +7 -7
- package/dist/cli/{skill-generator-5qg15q1j.js → skill-generator-q6m110d5.js} +13 -13
- package/dist/cli/{telemetry-xzy0qeap.js → telemetry-1pnsftp0.js} +1 -1
- package/dist/cli/{worktree-collision-ownership-q2gswg16.js → worktree-collision-ownership-e0p490vw.js} +3 -3
- package/dist/cli/{worktree-isolation-ndb5fwys.js → worktree-isolation-akwwt8n5.js} +27 -27
- package/dist/consensus/contracts.d.ts +5 -1
- package/dist/consensus/corpus.d.ts +26 -3
- package/dist/consensus/miner.d.ts +5 -1
- package/dist/hooks/curator.d.ts +41 -1
- package/dist/hooks/knowledge-store.d.ts +26 -2
- package/dist/hooks/pr-workflow-gate.d.ts +26 -1
- package/dist/hooks/skill-scoring.d.ts +13 -3
- package/dist/hooks/skill-usage-log.d.ts +140 -17
- package/dist/hooks/skill-usage-pending.d.ts +392 -0
- package/dist/index.js +513 -505
- package/dist/observability/catalog.d.ts +6 -4
- package/dist/telemetry.d.ts +35 -1
- package/dist/tools/write-pr-review-artifact.d.ts +7 -0
- package/dist/tools/write-pr-review-trigger-eval.d.ts +3 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The event catalog (issue #2029).
|
|
3
3
|
*
|
|
4
|
-
* Exactly
|
|
4
|
+
* Exactly 47 entries, matching the `TelemetryEvent` union at
|
|
5
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
|
|
@@ -10,9 +10,11 @@
|
|
|
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
12
|
* mutation audit, the 44th is the bounded `residue_health` atomic-write
|
|
13
|
-
* residue audit (issue #2035),
|
|
13
|
+
* residue audit (issue #2035), the 46th is the bounded
|
|
14
14
|
* `context_telemetry_health` storage audit for the issue-#2037
|
|
15
|
-
* `.swarm/context-telemetry.jsonl` store
|
|
15
|
+
* `.swarm/context-telemetry.jsonl` store, and the 47th is the counts-only
|
|
16
|
+
* `skill_usage_health` storage audit for the issue-#2038
|
|
17
|
+
* `.swarm/skill-usage.jsonl` store and its authoritative pending sidecar. These late additions are instances of
|
|
16
18
|
* the defect class this contract exists to close: an event kind entering the
|
|
17
19
|
* stream with no registration.
|
|
18
20
|
*
|
|
@@ -67,7 +69,7 @@ export interface CatalogEntry {
|
|
|
67
69
|
/**
|
|
68
70
|
* Whether an event of this kind must carry `trace.parentSpanId`.
|
|
69
71
|
*
|
|
70
|
-
* `false` for all
|
|
72
|
+
* `false` for all 47 entries today, and that is a truthful statement about
|
|
71
73
|
* the current system rather than a placeholder: no producer supplies a
|
|
72
74
|
* parent span, so `createObservation` never sets one. Setting this to `true`
|
|
73
75
|
* 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' | 'context_telemetry_health';
|
|
35
|
+
| 'prm_hard_stop_delivered' | 'agent_conflict_detected' | 'close_archive_result' | 'knowledge_receipt_transition' | 'knowledge_maintenance' | 'residue_health' | 'context_telemetry_health' | 'skill_usage_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
|
/**
|
|
@@ -257,6 +257,40 @@ export declare const telemetry: {
|
|
|
257
257
|
bytes: number;
|
|
258
258
|
limit_bytes: number;
|
|
259
259
|
}): void;
|
|
260
|
+
/**
|
|
261
|
+
* Skill-usage health (issue #2038). Emitted on compaction, migration,
|
|
262
|
+
* consumption, and pressure events for skill-usage tracking. Bounded
|
|
263
|
+
* payload: accepted/compacted/dropped/corrupt/retained counts, retry and
|
|
264
|
+
* curator figures, oldest/newest timestamps, and byte figures. Counts
|
|
265
|
+
* ONLY — no skill path, no per-skill identifier, no content, matching the
|
|
266
|
+
* observability contract's no-content-in-metrics rule. The adversarial
|
|
267
|
+
* case is thousands of distinct skill IDs, so a per-skill label would be
|
|
268
|
+
* an unbounded label set.
|
|
269
|
+
*/
|
|
270
|
+
skillUsageHealth(data: {
|
|
271
|
+
trigger: "compaction" | "migration" | "consumption" | "pressure";
|
|
272
|
+
accepted: number;
|
|
273
|
+
compacted: number;
|
|
274
|
+
dropped: number;
|
|
275
|
+
skills_dropped: number;
|
|
276
|
+
corrupt: number;
|
|
277
|
+
pending_retained: number;
|
|
278
|
+
uncertain_retained: number;
|
|
279
|
+
uncertain_expired: number;
|
|
280
|
+
pending_evicted: number;
|
|
281
|
+
no_source_knowledge: number;
|
|
282
|
+
no_matching_knowledge: number;
|
|
283
|
+
bump_retry: number;
|
|
284
|
+
bump_unrecoverable: number;
|
|
285
|
+
bump_applied_zero: number;
|
|
286
|
+
pressure: number;
|
|
287
|
+
curator_skipped: number;
|
|
288
|
+
bytes: number;
|
|
289
|
+
limit_bytes: number;
|
|
290
|
+
oldest_timestamp: string | null;
|
|
291
|
+
newest_timestamp: string | null;
|
|
292
|
+
coverage: boolean;
|
|
293
|
+
}): void;
|
|
260
294
|
/**
|
|
261
295
|
* Issue #2063 C2 — the PRM hard-stop DENIAL was actually delivered to the
|
|
262
296
|
* agent (thrown by the guardrails `toolBefore` consumer). `prm_hard_stop`
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { createSwarmTool } from './create-tool.js';
|
|
2
|
+
declare function atomicWrite(filePath: string, content: string): Promise<void>;
|
|
3
|
+
declare function atomicCreate(filePath: string, content: string): Promise<boolean>;
|
|
4
|
+
export declare const _internals: {
|
|
5
|
+
atomicWrite: typeof atomicWrite;
|
|
6
|
+
atomicCreate: typeof atomicCreate;
|
|
7
|
+
};
|
|
2
8
|
export declare function executeWritePrReviewArtifact(args: unknown, directory: string, context?: {
|
|
3
9
|
sessionID?: string;
|
|
4
10
|
}): Promise<string>;
|
|
5
11
|
export declare const write_pr_review_artifact: ReturnType<typeof createSwarmTool>;
|
|
12
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { resolveExactMergeBase, resolveExactMergeBaseAsync, resolvePrWorkflowRevisionDigest, resolvePrWorkflowRevisionDigestAsync } from '../background/workspace-snapshot.js';
|
|
3
|
+
import { markPrReviewTriggerEvaluationComplete } from '../hooks/pr-workflow-gate.js';
|
|
3
4
|
import { createSwarmTool } from './create-tool';
|
|
4
5
|
export { PR_REVIEW_TRIGGER_DEFINITIONS } from '../background/pr-review-trigger-contract.js';
|
|
5
6
|
export declare const _internals: {
|
|
@@ -7,9 +8,10 @@ export declare const _internals: {
|
|
|
7
8
|
resolvePrWorkflowRevisionDigestAsync: typeof resolvePrWorkflowRevisionDigestAsync;
|
|
8
9
|
resolveMergeBase: typeof resolveExactMergeBase;
|
|
9
10
|
resolveMergeBaseAsync: typeof resolveExactMergeBaseAsync;
|
|
11
|
+
markPrReviewTriggerEvaluationComplete: typeof markPrReviewTriggerEvaluationComplete;
|
|
10
12
|
};
|
|
11
13
|
declare const WritePrReviewTriggerEvalArgsSchema: z.ZodObject<{
|
|
12
|
-
run_id: z.ZodString
|
|
14
|
+
run_id: z.ZodOptional<z.ZodString>;
|
|
13
15
|
pr_head_sha: z.ZodString;
|
|
14
16
|
base_sha: z.ZodOptional<z.ZodString>;
|
|
15
17
|
base_ref: z.ZodOptional<z.ZodString>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-swarm",
|
|
3
|
-
"version": "7.148.
|
|
3
|
+
"version": "7.148.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",
|