opencode-swarm 7.66.2 → 7.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/state.d.ts CHANGED
@@ -46,6 +46,19 @@ export interface DelegationEntry {
46
46
  * Used by delegation-tracker.ts to record why a delegation occurred.
47
47
  */
48
48
  export type DelegationReason = 'normal_delegation' | 'review_rejected' | 'critic_consultation' | 'retry_circuit_breaker' | 'conflict_escalation' | 'stale_recovery';
49
+ /**
50
+ * Per-session PR subscription state for the background PR poller.
51
+ * Keyed by `${repoFullName}::${prNumber}` within the session's prSubscriptions Map.
52
+ */
53
+ export interface PrSubscriptionState {
54
+ prNumber: number;
55
+ repoFullName: string;
56
+ prUrl: string;
57
+ lastKnownStatus: string;
58
+ lastPollTime: number;
59
+ errorCount: number;
60
+ isWatching: boolean;
61
+ }
49
62
  /**
50
63
  * Per-task workflow state for gate progression tracking.
51
64
  * Transitions must be forward-only: idle → coder_delegated → pre_check_passed → reviewer_run → tests_run → complete
@@ -226,6 +239,8 @@ export interface AgentSessionState {
226
239
  prmHardStopPending: boolean;
227
240
  /** Per-session escalation tracker instance (set lazily by PRM hook) */
228
241
  prmEscalationTracker?: EscalationTracker;
242
+ /** Active PR subscriptions for the background poller, keyed by `${repoFullName}::${prNumber}` */
243
+ prSubscriptions: Map<string, PrSubscriptionState>;
229
244
  }
230
245
  /**
231
246
  * Represents a single agent invocation window with isolated guardrail budgets.
@@ -628,6 +643,16 @@ export declare function clearCriticalShownIds(sessionID: string): boolean;
628
643
  /** Add a knowledge ack dedup key, FIFO-evicting the oldest if the cap is
629
644
  * exceeded. Sets preserve insertion order in JS. */
630
645
  export declare function addKnowledgeAckDedup(key: string): void;
646
+ /**
647
+ * Rehydrate PR subscriptions for a given session from durable storage.
648
+ * Reads active subscriptions from the JSONL store and filters to those
649
+ * belonging to the specified sessionID, converting each to a PrSubscriptionState.
650
+ *
651
+ * @param sessionID - The session identifier to filter subscriptions by
652
+ * @param directory - Project root containing .swarm/ subdirectory
653
+ * @returns Map of PrSubscriptionState keyed by `${repoFullName}::${prNumber}`
654
+ */
655
+ export declare function rehydratePrSubscriptions(sessionID: string, directory: string): Promise<Map<string, PrSubscriptionState>>;
631
656
  /**
632
657
  * Test-only dependency-injection seam. Production code calls
633
658
  * `_internals.*` for key exported functions and objects so tests can replace
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "7.66.2",
3
+ "version": "7.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",