opencode-swarm 6.33.2 → 6.33.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/dist/cli/index.js CHANGED
@@ -34025,7 +34025,7 @@ function serializeAgentSession(s) {
34025
34025
  async function writeSnapshot(directory, state) {
34026
34026
  try {
34027
34027
  const snapshot = {
34028
- version: 1,
34028
+ version: 2,
34029
34029
  writtenAt: Date.now(),
34030
34030
  toolAggregates: Object.fromEntries(state.toolAggregates),
34031
34031
  activeAgent: Object.fromEntries(state.activeAgent),
package/dist/index.js CHANGED
@@ -39875,6 +39875,12 @@ function ensureAgentSession(sessionId, agentName, directory) {
39875
39875
  if (session.pendingAdvisoryMessages === undefined) {
39876
39876
  session.pendingAdvisoryMessages = [];
39877
39877
  }
39878
+ if (session.coderRevisions === undefined) {
39879
+ session.coderRevisions = 0;
39880
+ }
39881
+ if (session.revisionLimitHit === undefined) {
39882
+ session.revisionLimitHit = false;
39883
+ }
39878
39884
  session.lastToolCallTime = now;
39879
39885
  return session;
39880
39886
  }
@@ -46887,7 +46893,7 @@ function serializeAgentSession(s) {
46887
46893
  async function writeSnapshot(directory, state) {
46888
46894
  try {
46889
46895
  const snapshot = {
46890
- version: 1,
46896
+ version: 2,
46891
46897
  writtenAt: Date.now(),
46892
46898
  toolAggregates: Object.fromEntries(state.toolAggregates),
46893
46899
  activeAgent: Object.fromEntries(state.activeAgent),
@@ -55005,7 +55011,7 @@ async function readSnapshot(directory) {
55005
55011
  return;
55006
55012
  return value;
55007
55013
  });
55008
- if (parsed.version !== 1) {
55014
+ if (parsed.version !== 1 && parsed.version !== 2) {
55009
55015
  return null;
55010
55016
  }
55011
55017
  return parsed;
@@ -55036,13 +55042,23 @@ async function rehydrateState(snapshot) {
55036
55042
  swarmState.delegationChains.set(key, value);
55037
55043
  }
55038
55044
  }
55045
+ const now = Date.now();
55039
55046
  if (snapshot.agentSessions) {
55040
55047
  for (const [sessionId, serializedSession] of Object.entries(snapshot.agentSessions)) {
55041
55048
  if (!serializedSession || typeof serializedSession !== "object" || typeof serializedSession.agentName !== "string" || typeof serializedSession.lastToolCallTime !== "number" || typeof serializedSession.delegationActive !== "boolean") {
55042
55049
  console.warn("[snapshot-reader] Skipping malformed session %s: missing required fields (agentName, lastToolCallTime, delegationActive)", sessionId);
55043
55050
  continue;
55044
55051
  }
55045
- swarmState.agentSessions.set(sessionId, deserializeAgentSession(serializedSession));
55052
+ const session = deserializeAgentSession(serializedSession);
55053
+ session.lastToolCallTime = now;
55054
+ session.lastAgentEventTime = now;
55055
+ if (session.windows) {
55056
+ for (const window2 of Object.values(session.windows)) {
55057
+ window2.startedAtMs = now;
55058
+ window2.lastSuccessTimeMs = now;
55059
+ }
55060
+ }
55061
+ swarmState.agentSessions.set(sessionId, session);
55046
55062
  }
55047
55063
  }
55048
55064
  }
@@ -73,7 +73,7 @@ interface SerializedInvocationWindow {
73
73
  * Snapshot data structure written to disk
74
74
  */
75
75
  export interface SnapshotData {
76
- version: 1;
76
+ version: 1 | 2;
77
77
  writtenAt: number;
78
78
  toolAggregates: Record<string, ToolAggregate>;
79
79
  activeAgent: Record<string, string>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "6.33.2",
3
+ "version": "6.33.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",