opencode-swarm 7.134.2 → 7.135.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 (74) hide show
  1. package/.opencode/skills/swarm-pr-feedback/SKILL.md +10 -3
  2. package/.opencode/skills/swarm-pr-review/SKILL.md +11 -3
  3. package/README.md +1 -1
  4. package/dist/background/pr-event-delivery.d.ts +8 -0
  5. package/dist/background/pr-event-subscribers.d.ts +5 -0
  6. package/dist/background/pr-feedback-event-queue.d.ts +37 -0
  7. package/dist/background/pr-monitor-worker.d.ts +14 -13
  8. package/dist/background/workspace-snapshot.d.ts +8 -3
  9. package/dist/cli/{config-doctor-wk7xzrma.js → config-doctor-j1x63x87.js} +2 -2
  10. package/dist/cli/{core-d6yd2jzv.js → core-fvqp2gnn.js} +1 -1
  11. package/dist/cli/{curation-policy-npgspa14.js → curation-policy-xg9zw0ep.js} +6 -6
  12. package/dist/cli/{curator-llm-factory-tpc0qg6x.js → curator-llm-factory-4mat6cq5.js} +24 -24
  13. package/dist/cli/{curator-njzxdyav.js → curator-yc06cmnz.js} +24 -24
  14. package/dist/cli/{evidence-summary-service-pay9409b.js → evidence-summary-service-0cczdmjv.js} +6 -6
  15. package/dist/cli/{gate-evidence-b5v1xvxp.js → gate-evidence-8zrwdj69.js} +4 -4
  16. package/dist/cli/{guardrail-explain-75pr3e9z.js → guardrail-explain-zmbxwh3s.js} +25 -25
  17. package/dist/cli/{guardrail-log-783svw0e.js → guardrail-log-7egxrxap.js} +3 -3
  18. package/dist/cli/{hive-promoter-nrxjatdx.js → hive-promoter-7s3gzajy.js} +24 -24
  19. package/dist/cli/{index-5nybajn9.js → index-09b9zncg.js} +1 -1
  20. package/dist/cli/{index-v8m282zt.js → index-337r9pkr.js} +2 -2
  21. package/dist/cli/{index-h3k62043.js → index-3nasn371.js} +47 -12
  22. package/dist/cli/{index-2t1n9k7b.js → index-44zgqvqh.js} +1 -1
  23. package/dist/cli/{index-746ga67b.js → index-4yv2rn8q.js} +1 -1
  24. package/dist/cli/{index-9299e7d5.js → index-6kmmdtdp.js} +2 -2
  25. package/dist/cli/{index-q2rrv0cy.js → index-7a2hm51h.js} +57 -2
  26. package/dist/cli/{index-y3v1404y.js → index-7an2qn0s.js} +1 -1
  27. package/dist/cli/{index-4cnwvmsm.js → index-86wdrskb.js} +5 -5
  28. package/dist/cli/{index-225t7m1j.js → index-96b78s7p.js} +26 -26
  29. package/dist/cli/{index-a0nk83rk.js → index-997d6p42.js} +4 -4
  30. package/dist/cli/{index-njfcm1tn.js → index-a4972t0f.js} +3 -3
  31. package/dist/cli/{index-wk1h5ec2.js → index-b7p0mp2q.js} +2 -2
  32. package/dist/cli/{index-cav39zjt.js → index-crw4n55v.js} +3645 -2336
  33. package/dist/cli/{index-ss26e2d4.js → index-ctvnb76s.js} +1 -1
  34. package/dist/cli/{index-n48xwynh.js → index-e8w62fgs.js} +1 -1
  35. package/dist/cli/{index-8fhg2nt2.js → index-ens0gt38.js} +5 -5
  36. package/dist/cli/{index-ca44jww3.js → index-g0raqavt.js} +2 -2
  37. package/dist/cli/{index-0dszfjf3.js → index-grxkbbc5.js} +1 -1
  38. package/dist/cli/{index-x60gpbt5.js → index-nrvs08pr.js} +6 -6
  39. package/dist/cli/{index-p8hezdtz.js → index-ny93srnd.js} +1 -1
  40. package/dist/cli/{index-1bytvz73.js → index-q9mq5tv3.js} +2 -2
  41. package/dist/cli/{index-y8vqsm2g.js → index-vf6e8ame.js} +2 -2
  42. package/dist/cli/{index-4p02dp92.js → index-wxyxf0bd.js} +2 -2
  43. package/dist/cli/{index-asd9n0ms.js → index-x88w0cp5.js} +3 -3
  44. package/dist/cli/{index-dd7ttx8x.js → index-xg9repnx.js} +1 -1
  45. package/dist/cli/{index-cfkvc5q9.js → index-yhba8swx.js} +1 -1
  46. package/dist/cli/{index-1j3682j8.js → index-z085b4ka.js} +1 -1
  47. package/dist/cli/index.js +24 -24
  48. package/dist/cli/{knowledge-escalator-b3b91k0t.js → knowledge-escalator-d76a090n.js} +7 -7
  49. package/dist/cli/{knowledge-events-kyw0s745.js → knowledge-events-3mcg1a0e.js} +5 -5
  50. package/dist/cli/{knowledge-link-nc4y2zkq.js → knowledge-link-etrfntkd.js} +4 -4
  51. package/dist/cli/{knowledge-store-5watc2b2.js → knowledge-store-xtt4sede.js} +5 -5
  52. package/dist/cli/{knowledge-validator-a4wxkgbc.js → knowledge-validator-h1k7ymtd.js} +8 -8
  53. package/dist/cli/{pending-delegations-v9e40hfk.js → pending-delegations-4z3tkkct.js} +3 -3
  54. package/dist/cli/{pr-subscriptions-ztq40hrt.js → pr-subscriptions-29j794kd.js} +3 -3
  55. package/dist/cli/{scan-cursor-gcd771kn.js → scan-cursor-stztfv7d.js} +6 -6
  56. package/dist/cli/{schema-6eghf6gt.js → schema-tbq2srrh.js} +1 -1
  57. package/dist/cli/{scope-persistence-hz3zmmsv.js → scope-persistence-7wydjzx8.js} +4 -4
  58. package/dist/cli/{skill-generator-8dswjh14.js → skill-generator-02q1qdf0.js} +9 -9
  59. package/dist/cli/{telemetry-qh78ymq4.js → telemetry-859khp82.js} +9 -1
  60. package/dist/cli/{workspace-snapshot-35qc0y8a.js → workspace-snapshot-9h5za0s6.js} +3 -1
  61. package/dist/cli/{worktree-collision-ownership-c4bdnjtx.js → worktree-collision-ownership-dtwr0xj4.js} +3 -3
  62. package/dist/commands/context-map-stats.d.ts +5 -0
  63. package/dist/commands/pr-feedback.d.ts +15 -2
  64. package/dist/commands/registry.d.ts +14 -0
  65. package/dist/git/pr-workflow-state.d.ts +37 -0
  66. package/dist/hooks/pr-workflow-gate.d.ts +42 -2
  67. package/dist/hooks/pr-workflow-response-gate.d.ts +3 -0
  68. package/dist/index.js +512 -496
  69. package/dist/services/status-service.d.ts +12 -2
  70. package/dist/telemetry.d.ts +5 -0
  71. package/dist/tools/pr-workflow-status.d.ts +2 -0
  72. package/dist/tools/pre-check-batch.d.ts +22 -0
  73. package/dist/tools/prepare-pr-workflow-checkout.d.ts +2 -0
  74. package/package.json +1 -1
@@ -118,6 +118,16 @@ export interface StatusData {
118
118
  sharedRoot?: string;
119
119
  generation?: number;
120
120
  };
121
+ /** FR-010: last heartbeat activity for the session */
122
+ lastActivity?: {
123
+ sessionId: string;
124
+ /** epoch ms from getLastHeartbeat */
125
+ timestamp: number;
126
+ /** null when no heartbeat recorded */
127
+ agoMs: number | null;
128
+ /** human-readable: "5s ago", "12m ago", "2h ago", "never" */
129
+ agoLabel: string;
130
+ };
121
131
  /**
122
132
  * #1850: memory cohort link status. Distinct from `cohort` (knowledge link)
123
133
  * so status can distinguish knowledge-linked from memory-linked (acceptance
@@ -139,7 +149,7 @@ export interface StatusData {
139
149
  * Get status data from the swarm directory.
140
150
  * Returns structured data that can be used by GUI, background flows, or commands.
141
151
  */
142
- export declare function getStatusData(directory: string, agents: Record<string, AgentDefinition>): Promise<StatusData>;
152
+ export declare function getStatusData(directory: string, agents: Record<string, AgentDefinition>, sessionId?: string): Promise<StatusData>;
143
153
  /**
144
154
  * Format status data as markdown for command output.
145
155
  * This is the thin adapter that delegates to the service.
@@ -149,4 +159,4 @@ export declare function formatStatusMarkdown(status: StatusData): string;
149
159
  * Handle status command - delegates to service and formats output.
150
160
  * Kept for backward compatibility - thin adapter.
151
161
  */
152
- export declare function handleStatusCommand(directory: string, agents: Record<string, AgentDefinition>): Promise<string>;
162
+ export declare function handleStatusCommand(directory: string, agents: Record<string, AgentDefinition>, sessionId?: string): Promise<string>;
@@ -10,6 +10,10 @@ export type ReviewerGateEvidenceKind = 'genuine' | 'fallback' | 'data_quality' |
10
10
  */
11
11
  export type ReviewerGateReasonCode = 'lean_turbo_completed_lane' | 'standard_turbo_non_tier3' | 'durable_evidence_complete' | 'workflow_state_complete' | 'stage_b_parallel_complete' | 'no_active_sessions' | 'zero_valid_sessions' | 'restart_recovery_complete' | 'scoped_delegation_complete' | 'unscoped_delegation_complete' | 'corrupt_evidence' | 'required_gates_missing' | 'inspection_error';
12
12
  export type TelemetryListener = (event: TelemetryEvent, data: Record<string, unknown>) => void;
13
+ export declare function startHeartbeatTracking(): void;
14
+ export declare function getLastHeartbeat(sessionId: string): number | undefined;
15
+ export declare function stopHeartbeatTracking(): void;
16
+ export declare function resetHeartbeatTrackingForTesting(): void;
13
17
  /**
14
18
  * Number of emits between rotation checks. 50 keeps the overhead at one
15
19
  * `statSync` per 50 telemetry writes (~once per few seconds in a busy
@@ -87,4 +91,5 @@ export declare const _internals: {
87
91
  telemetry: typeof telemetry;
88
92
  emit: typeof emit;
89
93
  rotateTelemetryIfNeeded: typeof rotateTelemetryIfNeeded;
94
+ heartbeatListenerCount: () => number;
90
95
  };
@@ -1,4 +1,5 @@
1
1
  import { resolveCurrentGitHeadAsync, resolveIsWorkingTreeCleanAsync } from '../background/workspace-snapshot';
2
+ import { classifyPrWorkflowGitState } from '../git/pr-workflow-state';
2
3
  import { readPrWorkflowGateState } from '../hooks/pr-workflow-gate';
3
4
  import { createSwarmTool } from './create-tool';
4
5
  /**
@@ -23,6 +24,7 @@ export declare const _internals: {
23
24
  resolveCurrentGitHeadAsync: typeof resolveCurrentGitHeadAsync;
24
25
  resolveIsWorkingTreeCleanAsync: typeof resolveIsWorkingTreeCleanAsync;
25
26
  runGitCapture: typeof runGitCapture;
27
+ classifyGitState: typeof classifyPrWorkflowGitState;
26
28
  truncateToByteBudget: typeof truncateToByteBudget;
27
29
  };
28
30
  export {};
@@ -12,6 +12,11 @@ import type { SastScanFinding, SastScanResult } from './sast-scan';
12
12
  import type { SecretscanErrorResult, SecretscanResult } from './secretscan';
13
13
  export declare const _internals: {
14
14
  qualityBudget: typeof qualityBudget;
15
+ runLintWrapped: typeof runLintWrapped;
16
+ runSecretscanWrapped: typeof runSecretscanWrapped;
17
+ runSastScanWrapped: typeof runSastScanWrapped;
18
+ runQualityBudgetWrapped: typeof runQualityBudgetWrapped;
19
+ getChangedLineRanges: typeof getChangedLineRanges;
15
20
  };
16
21
  export interface PreCheckBatchInput {
17
22
  /** List of specific files to check (optional) */
@@ -57,6 +62,22 @@ export interface PreCheckBatchResult {
57
62
  /** Pre-existing SAST findings on unchanged lines, requiring reviewer triage */
58
63
  sast_preexisting_findings?: SastScanFinding[];
59
64
  }
65
+ /**
66
+ * Run lint with detection and timeout
67
+ */
68
+ declare function runLintWrapped(files: string[] | undefined, directory: string, _config?: PluginConfig): Promise<ToolResult<LintResult>>;
69
+ /**
70
+ * Run secretscan with timeout
71
+ */
72
+ declare function runSecretscanWrapped(files: string[] | undefined, directory: string, _config?: PluginConfig): Promise<ToolResult<SecretscanResult | SecretscanErrorResult>>;
73
+ /**
74
+ * Run SAST scan with timeout
75
+ */
76
+ declare function runSastScanWrapped(changedFiles: string[], directory: string, severityThreshold: 'low' | 'medium' | 'high' | 'critical', config?: PluginConfig, phase?: number): Promise<ToolResult<SastScanResult>>;
77
+ /**
78
+ * Run quality budget with timeout
79
+ */
80
+ declare function runQualityBudgetWrapped(changedFiles: string[], directory: string, config?: PluginConfig): Promise<ToolResult<QualityBudgetResult>>;
60
81
  /**
61
82
  * Parse unified diff output (with -U0) to extract added/modified line numbers per file.
62
83
  * Returns a Map from normalised file path → Set of changed line numbers.
@@ -91,3 +112,4 @@ export declare function runPreCheckBatch(input: PreCheckBatchInput, workspaceDir
91
112
  * Returns unified result with gates_passed status
92
113
  */
93
114
  export declare const pre_check_batch: ReturnType<typeof tool>;
115
+ export {};
@@ -1,3 +1,4 @@
1
+ import { classifyPrWorkflowGitState } from '../git/pr-workflow-state.js';
1
2
  import { createSwarmTool } from './create-tool.js';
2
3
  /**
3
4
  * Preserve explicit dirty tracked files before the unbound PR checkout.
@@ -26,6 +27,7 @@ declare function runGit(directory: string, args: string[], options?: {
26
27
  */
27
28
  export declare const _internals: {
28
29
  runGit: typeof runGit;
30
+ classifyGitState: typeof classifyPrWorkflowGitState;
29
31
  };
30
32
  export declare const prepare_pr_workflow_checkout: ReturnType<typeof createSwarmTool>;
31
33
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "7.134.2",
3
+ "version": "7.135.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",