opencode-swarm 7.157.0 → 7.158.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.
Files changed (81) hide show
  1. package/.opencode/skills/swarm-pr-review/SKILL.md +24 -26
  2. package/.opencode/skills/swarm-pr-review/references/findings-persistence-contract.md +11 -3
  3. package/.opencode/skills/swarm-pr-review/references/parser-dry-run.md +1 -1
  4. package/.opencode/skills/swarm-pr-review/references/prompt-templates.md +3 -3
  5. package/dist/background/candidate-contract.d.ts +20 -3
  6. package/dist/background/candidate-parser.d.ts +8 -1
  7. package/dist/background/pr-review-contract.d.ts +93 -5
  8. package/dist/cli/{coder-settlement-dz2x352d.js → coder-settlement-5sexsmqz.js} +9 -9
  9. package/dist/cli/{config-doctor-4jxf9w9e.js → config-doctor-ewn2kw6d.js} +3 -3
  10. package/dist/cli/{core-xf2f087t.js → core-72wdmzps.js} +3 -3
  11. package/dist/cli/{curation-policy-72qx868r.js → curation-policy-vn3m5nq2.js} +4 -4
  12. package/dist/cli/curator-drift-g6w4ga1q.js +1 -1
  13. package/dist/cli/{curator-pjjw3ja4.js → curator-g06sa98p.js} +31 -31
  14. package/dist/cli/{curator-llm-factory-7mfvey3x.js → curator-llm-factory-r8q84m4g.js} +31 -31
  15. package/dist/cli/{evidence-summary-service-5ffkbs50.js → evidence-summary-service-ttd0ntm0.js} +12 -12
  16. package/dist/cli/{gate-evidence-ne9rbdtb.js → gate-evidence-agnxf7md.js} +6 -6
  17. package/dist/cli/{guardrail-explain-b9vr4ta3.js → guardrail-explain-qf4k176t.js} +32 -32
  18. package/dist/cli/{guardrail-log-hrt36jz5.js → guardrail-log-g4qc595v.js} +4 -4
  19. package/dist/cli/{guardrail-reset-pggm9hx4.js → guardrail-reset-zpxk0p1j.js} +31 -31
  20. package/dist/cli/{hive-promoter-7vxm11sm.js → hive-promoter-zxy07gjg.js} +31 -31
  21. package/dist/cli/{index-ebratyzr.js → index-1vxmqvpt.js} +1 -1
  22. package/dist/cli/{index-1dzy1j4v.js → index-5tchehv7.js} +2 -2
  23. package/dist/cli/{index-b5xm177r.js → index-5zgf140g.js} +1 -1
  24. package/dist/cli/{index-2e60kmzg.js → index-663wnh64.js} +6 -6
  25. package/dist/cli/{index-79k7p589.js → index-6xxpwk5x.js} +1 -1
  26. package/dist/cli/{index-3qpr16k2.js → index-745dh1z1.js} +34 -34
  27. package/dist/cli/{index-ngn6jmad.js → index-7s1hmrfh.js} +1 -1
  28. package/dist/cli/{index-dwkrdpz2.js → index-8fqb0ynp.js} +1 -1
  29. package/dist/cli/{index-p0by16z8.js → index-a1884hh4.js} +5 -5
  30. package/dist/cli/{index-93ymj3j5.js → index-bv24pbaj.js} +4 -4
  31. package/dist/cli/{index-vbqssmbs.js → index-c57cyrwn.js} +8 -8
  32. package/dist/cli/{index-tvtvhjh0.js → index-dmfbmnp7.js} +4 -4
  33. package/dist/cli/{index-3vqdt1sx.js → index-f036tggv.js} +5 -5
  34. package/dist/cli/{index-4w20thrc.js → index-f776m4r5.js} +2 -2
  35. package/dist/cli/{index-61nkp124.js → index-fwe1wh6r.js} +2 -2
  36. package/dist/cli/{index-q94gt4n9.js → index-gm10kvne.js} +3 -3
  37. package/dist/cli/{index-xe6zbfps.js → index-h52hs4e9.js} +1 -1
  38. package/dist/cli/{index-n7gv8m7v.js → index-nvta6kcv.js} +3 -3
  39. package/dist/cli/{index-gpf3cjre.js → index-pfnj5pvs.js} +1 -1
  40. package/dist/cli/{index-zq7pw6qg.js → index-pvs2zw1y.js} +2 -2
  41. package/dist/cli/{index-gk6wpq41.js → index-rac2gkvr.js} +862 -461
  42. package/dist/cli/{index-4kd1nqd2.js → index-rc93mm6e.js} +3 -5
  43. package/dist/cli/{index-nd22bsnt.js → index-rd324153.js} +2 -2
  44. package/dist/cli/{index-g0j2hnse.js → index-vwx0by4y.js} +5 -5
  45. package/dist/cli/{index-91ybfvy2.js → index-x4ftmdha.js} +1 -1
  46. package/dist/cli/{index-j3egsxa1.js → index-x71shq8j.js} +6 -6
  47. package/dist/cli/{index-n6ayyadp.js → index-y3hdwh66.js} +4 -4
  48. package/dist/cli/{index-12e2hztp.js → index-yfbp4q09.js} +1 -1
  49. package/dist/cli/{index-9r7gp6cp.js → index-yt75r1er.js} +4 -0
  50. package/dist/cli/{index-t0kxka8n.js → index-z54qw70y.js} +1 -1
  51. package/dist/cli/{index-8n602qc2.js → index-zawd71cg.js} +6 -6
  52. package/dist/cli/{index-6sbx96v6.js → index-zcmwwp1x.js} +5 -4
  53. package/dist/cli/index.js +32 -32
  54. package/dist/cli/{knowledge-escalator-d65mctqy.js → knowledge-escalator-22zaj224.js} +11 -11
  55. package/dist/cli/{knowledge-events-6aet71sp.js → knowledge-events-xbx1k408.js} +9 -9
  56. package/dist/cli/{knowledge-link-z9cchqdj.js → knowledge-link-cj2abbae.js} +3 -3
  57. package/dist/cli/{knowledge-store-vvgxbakx.js → knowledge-store-fnm8xh9c.js} +4 -4
  58. package/dist/cli/{knowledge-validator-4fb6pbpn.js → knowledge-validator-t2jztjy1.js} +6 -6
  59. package/dist/cli/{model-preflight-cv9kvw8h.js → model-preflight-w85ecyxh.js} +1 -1
  60. package/dist/cli/{pending-delegations-f52jtanf.js → pending-delegations-29rtv1gb.js} +1 -1
  61. package/dist/cli/pr-review-reentry-authorization-25dep81m.js +299 -0
  62. package/dist/cli/{pr-subscriptions-76vg2xya.js → pr-subscriptions-cgac3ydd.js} +2 -2
  63. package/dist/cli/{runner-eagt6gf8.js → runner-sj5sf36c.js} +4 -4
  64. package/dist/cli/{scan-cursor-q3530gc8.js → scan-cursor-8acs9kwe.js} +5 -5
  65. package/dist/cli/{schema-5zc62306.js → schema-rjhassd0.js} +2 -2
  66. package/dist/cli/{scope-persistence-fzqf115q.js → scope-persistence-jb1a5dzh.js} +7 -7
  67. package/dist/cli/{skill-generator-kh1z90tm.js → skill-generator-frgppk1w.js} +13 -13
  68. package/dist/cli/{worktree-collision-ownership-2qxjtxt6.js → worktree-collision-ownership-f5sj6ffa.js} +4 -4
  69. package/dist/cli/{worktree-isolation-40v34p0s.js → worktree-isolation-5b0w6bha.js} +31 -31
  70. package/dist/hooks/pr-review-reentry-authorization.d.ts +97 -0
  71. package/dist/hooks/pr-workflow-gate.d.ts +211 -8
  72. package/dist/index.js +468 -461
  73. package/dist/tools/authorize-pr-review-reentry.d.ts +16 -0
  74. package/dist/tools/complete-pr-workflow.d.ts +2 -1
  75. package/dist/tools/index.d.ts +1 -0
  76. package/dist/tools/manifest.d.ts +1 -0
  77. package/dist/tools/repo-graph/types.d.ts +9 -0
  78. package/dist/tools/repo-graph.d.ts +1 -1
  79. package/dist/tools/tool-metadata.d.ts +4 -0
  80. package/dist/tools/write-pr-review-artifact.d.ts +18 -0
  81. package/package.json +1 -1
@@ -0,0 +1,16 @@
1
+ import { createSwarmTool } from './create-tool.js';
2
+ /**
3
+ * Issue a ONE-USE reviewer re-entry authorization (issue #2383) for the
4
+ * CURRENT active PR_REVIEW workflow. The very next direct Task dispatch of
5
+ * the declared role consumes it atomically and bypasses ONLY the generic
6
+ * Stage-A task-workflow requirement; every other delegation gate stays
7
+ * authoritative. Bindings are exact (session, workflow, run, head SHA,
8
+ * worktree revision digest, role, gate generation): replay, cross-session
9
+ * use, wrong role, expiry, or any workflow progress since issuance fails
10
+ * closed. Issue immediately before the Task dispatch — authorizations are
11
+ * not stockpilable.
12
+ */
13
+ export declare function executeAuthorizePrReviewReentry(args: unknown, directory: string, context?: {
14
+ sessionID?: string;
15
+ }): Promise<string>;
16
+ export declare const authorize_pr_review_reentry: ReturnType<typeof createSwarmTool>;
@@ -1,4 +1,4 @@
1
- import { completePrWorkflow, readPrWorkflowGateState, settlePresumedStalePrWorkflowLanes } from '../hooks/pr-workflow-gate.js';
1
+ import { completePrWorkflow, readPrReviewTerminalCoverageForReport, readPrWorkflowGateState, settlePresumedStalePrWorkflowLanes } from '../hooks/pr-workflow-gate.js';
2
2
  import { createSwarmTool } from './create-tool.js';
3
3
  import { listPendingPrWorkflowCheckoutRestores } from './prepare-pr-workflow-checkout.js';
4
4
  export declare function executeCompletePrWorkflow(args: unknown, directory: string, context?: {
@@ -9,5 +9,6 @@ export declare const _internals: {
9
9
  completePrWorkflow: typeof completePrWorkflow;
10
10
  listPendingPrWorkflowCheckoutRestores: typeof listPendingPrWorkflowCheckoutRestores;
11
11
  readPrWorkflowGateState: typeof readPrWorkflowGateState;
12
+ readPrReviewTerminalCoverageForReport: typeof readPrReviewTerminalCoverageForReport;
12
13
  settlePresumedStalePrWorkflowLanes: typeof settlePresumedStalePrWorkflowLanes;
13
14
  };
@@ -97,6 +97,7 @@ export type { FlakyTestEntry } from '../test-impact/flaky-detector.js';
97
97
  export { computeFlakyScore, detectFlakyTests, isTestQuarantined, } from '../test-impact/flaky-detector.js';
98
98
  export { abort_pr_workflow, executeAbortPrWorkflow, } from './abort-pr-workflow';
99
99
  export { approve_plan_critic, executeApprovePlanCritic, } from './approve-plan-critic';
100
+ export { authorize_pr_review_reentry } from './authorize-pr-review-reentry';
100
101
  export { complete_pr_workflow, executeCompletePrWorkflow, } from './complete-pr-workflow';
101
102
  export { epic_plan_waves } from './epic-plan-waves';
102
103
  export { epic_record_divergence } from './epic-record-divergence';
@@ -44,6 +44,7 @@ export declare const TOOL_MANIFEST: {
44
44
  completion_verify: () => ToolDefinition;
45
45
  complete_pr_workflow: () => ToolDefinition;
46
46
  abort_pr_workflow: () => ToolDefinition;
47
+ authorize_pr_review_reentry: () => ToolDefinition;
47
48
  approve_plan_critic: () => ToolDefinition;
48
49
  prepare_pr_workflow_checkout: () => ToolDefinition;
49
50
  record_implementation_review: () => ToolDefinition;
@@ -49,6 +49,15 @@ export declare const REPO_GRAPH_FILENAME = "repo-graph.json";
49
49
  * four-coordinate symbol edges remain readable and are normalized in memory.
50
50
  */
51
51
  export declare const GRAPH_SCHEMA_VERSION = "1.5.0";
52
+ /**
53
+ * Default per-file source-size ceiling shared by graph construction and
54
+ * query-time source reads. The builder treats this as the default value of
55
+ * its `maxFileSizeBytes` option (which may be raised per build);
56
+ * `getContextPack` always enforces this constant at read time regardless of
57
+ * any build-time override, so a file built into the graph above this size
58
+ * yields a `source too large` span instead of source text.
59
+ */
60
+ export declare const DEFAULT_MAX_SOURCE_BYTES: number;
52
61
  /**
53
62
  * Compare dotted numeric version strings (e.g. '1.1.0' >= '1.1.0').
54
63
  * Missing/non-numeric segments are treated as 0. Returns true when `version`
@@ -27,5 +27,5 @@ export type { DeadExportsOptions } from './repo-graph/query';
27
27
  export { buildOntologyPreflightPacket, getBlastRadius, getCallers, getContextPack, getDeadExports, getDependencies, getFileOntology, getGraphHealth, getGraphNode, getImporters, getKeyFiles, getLocalizationContext, getPackageBoundaries, getSymbolConsumers, isGraphFresh, resetQueryCache, } from './repo-graph/query';
28
28
  export { getGraphPath, loadGraph, loadGraphSync, loadOrCreateGraph, saveGraph, saveIfDirty, } from './repo-graph/storage';
29
29
  export type { AskHit, AskOptions, AskResult, BlastRadiusResult, BuildWorkspaceGraphOptions, CallerReference, ContextPackCoverage, ContextPackResult, ContextPackSnippet, ContextPackSourceMode, ContextPackSpan, ConventionFact, DataOperationFact, DeadExportCandidate, DeadExportsResult, FileOntology, FileReference, FileRole, FreshnessProbeState, GraphEdge, GraphExtractionFailure, GraphExtractorInputWitness, GraphHealthResult, GraphNode, GraphUnresolvedImport, LocalizationBlock, OntologyFinding, PackageBoundarySummary, RepoGraph, RepoGraphDiagnostics, RouteFact, RouteMethod, SecurityFact, SymbolEdge, SymbolEdgeEvidence, SymbolEdgeKind, SymbolEdgeResolution, SymbolIdentityKind, SymbolReference, } from './repo-graph/types';
30
- export { createEmptyGraph, GRAPH_SCHEMA_VERSION, inferPackageBoundary, isSchemaVersionAtLeast, normalizeGraphPath, REPO_GRAPH_FILENAME, updateGraphMetadata, } from './repo-graph/types';
30
+ export { createEmptyGraph, DEFAULT_MAX_SOURCE_BYTES, GRAPH_SCHEMA_VERSION, inferPackageBoundary, isSchemaVersionAtLeast, normalizeGraphPath, REPO_GRAPH_FILENAME, updateGraphMetadata, } from './repo-graph/types';
31
31
  export { validateGraphEdge, validateGraphNode, validateWorkspace, } from './repo-graph/validation';
@@ -156,6 +156,10 @@ export declare const TOOL_METADATA: {
156
156
  description: string;
157
157
  agents: "architect"[];
158
158
  };
159
+ authorize_pr_review_reentry: {
160
+ description: string;
161
+ agents: "architect"[];
162
+ };
159
163
  approve_plan_critic: {
160
164
  description: string;
161
165
  agents: "architect"[];
@@ -1,11 +1,29 @@
1
+ import { z } from 'zod';
2
+ import type { FindingsSeverity } from '../background/candidate-contract.js';
3
+ import { PrReviewFindingSchema } from '../background/pr-review-contract.js';
1
4
  import { assertPrReviewArtifactBoundary } from '../hooks/pr-workflow-gate.js';
2
5
  import { createSwarmTool } from './create-tool.js';
6
+ /**
7
+ * READ shape. Deliberately tolerant of a missing `severity`: `readFindings`
8
+ * JSON-parses persisted lines without re-validating them, so rows written before
9
+ * severity became mandatory must still load (issue #2279 durable readability).
10
+ * The WRITE boundary is what enforces presence.
11
+ */
12
+ type PersistedFinding = Omit<z.infer<typeof PrReviewFindingSchema>, 'severity'> & {
13
+ severity?: FindingsSeverity;
14
+ boundary: 'post_explorer' | 'post_reviewer' | 'post_critic';
15
+ pr_head_sha: string;
16
+ recorded_at: string;
17
+ };
18
+ declare function readFindings(filePath: string): Promise<PersistedFinding[]>;
3
19
  declare function atomicWrite(filePath: string, content: string): Promise<void>;
4
20
  declare function atomicCreate(filePath: string, content: string): Promise<boolean>;
5
21
  export declare const _internals: {
6
22
  atomicWrite: typeof atomicWrite;
7
23
  atomicCreate: typeof atomicCreate;
8
24
  assertBoundary: typeof assertPrReviewArtifactBoundary;
25
+ /** Exposed so the #2383 read/migration boundary is testable directly. */
26
+ readFindings: typeof readFindings;
9
27
  };
10
28
  export declare function executeWritePrReviewArtifact(args: unknown, directory: string, context?: {
11
29
  sessionID?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "7.157.0",
3
+ "version": "7.158.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",