@myagentroam/node 0.11.16 → 0.11.18

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/connector.js CHANGED
@@ -1201,7 +1201,6 @@ export class NodeConnector {
1201
1201
  handleMailNotificationResponse: (envelope) => this.mailNotificationControl.handle(envelope),
1202
1202
  handleDirectTransfer: (envelope) => this.handleDirectTransfer(envelope),
1203
1203
  handleTerminalDirect: (envelope) => this.handleTerminalDirect(envelope),
1204
- reconcileRuns: (envelope) => this.runEventBridge.reconcile(envelope),
1205
1204
  runners: this.runners,
1206
1205
  deliverSessionChannelMessage: (envelope) => this.runnerChannelMessages.handle(envelope),
1207
1206
  completeUncontrolledCancellation: (runId) => {
@@ -1234,8 +1233,6 @@ export class NodeConnector {
1234
1233
  this.modelUsage.bindInherited(runId, session.id, session.runner);
1235
1234
  },
1236
1235
  modelUsage: (runId, payload) => this.modelUsage.record(runId, payload),
1237
- runtime: this.runtime,
1238
- state: this.runState,
1239
1236
  events: this.runEventService,
1240
1237
  emitWorkbench: (category, payload) => this.publishWorkbenchEvent(category, payload),
1241
1238
  queues: this.workspaceQueueWorkbenchService,
@@ -1737,7 +1734,6 @@ export class NodeConnector {
1737
1734
  emitWorkbenchEvent = (category, payload) => this.workbenchEventService.dispatch(category, payload);
1738
1735
  discoverWorkspaceSessions = (workspaceId, onRunnerDiscovered) => this.nativeSessionProjectionService.discoverWorkspace(workspaceId, onRunnerDiscovered);
1739
1736
  invalidateWorkspaceWatchTopics = (workspaceId) => this.workspaceCoordinator.invalidate(workspaceId);
1740
- reconcilePersistedRuns = () => undefined;
1741
1737
  startCapabilityRefresh = () => this.connectionLifecycle.startCapabilityRefresh();
1742
1738
  refreshCapabilities = () => this.connectionLifecycle.refreshCapabilities();
1743
1739
  async executeNodeOperation(operation, data) {
@@ -29,20 +29,23 @@ export class MarAgentMcpClientCache {
29
29
  let entry = this.#entries.get(key);
30
30
  if (entry === undefined) {
31
31
  await this.#evictIdleEntry();
32
- if (this.#entries.size >= this.#maxEntries) {
33
- const pool = await MarAgentMcpClientPool.connect(servers, cwd, options);
34
- return singleUseLease(pool);
32
+ entry = this.#entries.get(key);
33
+ if (entry === undefined) {
34
+ if (this.#entries.size >= this.#maxEntries) {
35
+ const pool = await MarAgentMcpClientPool.connect(servers, cwd, options);
36
+ return singleUseLease(pool);
37
+ }
38
+ entry = {
39
+ promise: MarAgentMcpClientPool.connect(servers, cwd, options),
40
+ references: 0,
41
+ lastReleasedAt: 0
42
+ };
43
+ this.#entries.set(key, entry);
44
+ entry.promise.catch(() => {
45
+ if (this.#entries.get(key) === entry)
46
+ this.#entries.delete(key);
47
+ });
35
48
  }
36
- entry = {
37
- promise: MarAgentMcpClientPool.connect(servers, cwd, options),
38
- references: 0,
39
- lastReleasedAt: 0
40
- };
41
- this.#entries.set(key, entry);
42
- entry.promise.catch(() => {
43
- if (this.#entries.get(key) === entry)
44
- this.#entries.delete(key);
45
- });
46
49
  }
47
50
  if (entry.timer !== undefined) {
48
51
  clearTimeout(entry.timer);
@@ -1237,12 +1237,6 @@ export class NodeRuntimeState {
1237
1237
  if (this.sessionHistoryMutations.has(sessionId))
1238
1238
  throw new Error('SESSION_ACTIVE');
1239
1239
  }
1240
- reconcileRun(id, active) {
1241
- // There is no cross-restart run recovery: this process-local state is
1242
- // discarded on restart and cannot be reconciled from SQLite.
1243
- void id;
1244
- void active;
1245
- }
1246
1240
  replaceSession(id, patch) {
1247
1241
  const value = this.requireSession(id);
1248
1242
  const next = { ...value, ...patch };
@@ -701,11 +701,8 @@ export class HostedConversationStore {
701
701
  const paths = conversationPaths(directory);
702
702
  await this.assertConversationLayout(paths);
703
703
  let manifest;
704
- let manifestNeedsUpgrade = false;
705
704
  try {
706
- const stored = storedHostedConversationManifest(JSON.parse(await readFile(paths.manifestPath, 'utf8')));
707
- manifest = stored.manifest;
708
- manifestNeedsUpgrade = stored.upgraded;
705
+ manifest = hostedConversationManifestSchema.parse(JSON.parse(await readFile(paths.manifestPath, 'utf8')));
709
706
  }
710
707
  catch {
711
708
  throw new Error('HOSTED_CONVERSATION_STORAGE_INVALID');
@@ -724,7 +721,7 @@ export class HostedConversationStore {
724
721
  ...manifest,
725
722
  quota: { ...manifest.quota, usedBytes }
726
723
  });
727
- if (manifestNeedsUpgrade || next !== manifest)
724
+ if (next !== manifest)
728
725
  await this.writeManifest(paths.manifestPath, next);
729
726
  rebuilt.push({ manifest: next, files });
730
727
  }
@@ -1220,34 +1217,6 @@ function conversationPaths(conversationDirectory) {
1220
1217
  quotaDirectory: join(runtimeDirectory, 'quota')
1221
1218
  };
1222
1219
  }
1223
- function storedHostedConversationManifest(input) {
1224
- const stored = typeof input === 'object' && input !== null && !Array.isArray(input)
1225
- ? input
1226
- : {};
1227
- const withoutLegacyMetadata = { ...stored };
1228
- delete withoutLegacyMetadata['recoverableUntil'];
1229
- delete withoutLegacyMetadata['pendingVersionId'];
1230
- const missingPinnedAt = !('pinnedAt' in stored);
1231
- const missingTitleSource = !('titleSource' in stored);
1232
- const legacyUpgradeStatus = stored.status === 'UPGRADE_PENDING' || stored.status === 'UPGRADE_FAILED';
1233
- const hasPendingVersion = 'pendingVersionId' in stored;
1234
- const upgraded = missingPinnedAt ||
1235
- missingTitleSource ||
1236
- 'recoverableUntil' in stored ||
1237
- hasPendingVersion ||
1238
- legacyUpgradeStatus;
1239
- return {
1240
- manifest: hostedConversationManifestSchema.parse(upgraded
1241
- ? {
1242
- ...withoutLegacyMetadata,
1243
- ...(missingPinnedAt ? { pinnedAt: null } : {}),
1244
- ...(missingTitleSource ? { titleSource: 'CUSTOM' } : {}),
1245
- ...(legacyUpgradeStatus ? { status: 'ACTIVE' } : {})
1246
- }
1247
- : input),
1248
- upgraded
1249
- };
1250
- }
1251
1220
  function childPath(parent, key) {
1252
1221
  if (!STORAGE_KEY.test(key))
1253
1222
  throw new Error('HOSTED_CONVERSATION_STORAGE_INVALID');
@@ -51,10 +51,6 @@ export class NodeControlMessageService {
51
51
  }
52
52
  if (envelope.type === 'ack')
53
53
  return;
54
- if (envelope.type === 'runs.reconcile') {
55
- this.options.reconcileRuns(envelope);
56
- return;
57
- }
58
54
  if (envelope.type === 'run.approval.decision') {
59
55
  this.decideApproval(envelope);
60
56
  return;
@@ -80,10 +76,6 @@ export class NodeControlMessageService {
80
76
  this.cancelRun(envelope);
81
77
  return;
82
78
  }
83
- if (envelope.type === 'lease.reconcile') {
84
- this.options.send('ack', { type: envelope.type }, envelope.id);
85
- return;
86
- }
87
79
  if (envelope.type !== 'error')
88
80
  this.options.send('error', { code: 'MESSAGE_TYPE_UNKNOWN' }, envelope.id);
89
81
  }
@@ -27,17 +27,4 @@ export class NodeRunEventBridge {
27
27
  queue: this.options.queues.present(workspaceId, sessionId)
28
28
  });
29
29
  }
30
- reconcile(envelope) {
31
- const payload = envelope.payload;
32
- if (!Array.isArray(payload.runIds) || payload.runIds.some((id) => typeof id !== 'string')) {
33
- this.options.send('error', { code: 'MESSAGE_INVALID' }, envelope.id);
34
- return;
35
- }
36
- for (const runId of payload.runIds) {
37
- const known = this.options.state.active.has(runId);
38
- this.options.runtime.reconcileRun(runId, known);
39
- this.options.send('lease.reconcile', { runId, known });
40
- }
41
- this.options.send('ack', { type: 'runs.reconcile' }, envelope.id);
42
- }
43
30
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myagentroam/node",
3
- "version": "0.11.16",
3
+ "version": "0.11.18",
4
4
  "description": "MyAgentRoam Node runtime CLI.",
5
5
  "license": "Apache-2.0 AND GPL-2.0-or-later",
6
6
  "type": "module",
@@ -37,10 +37,10 @@
37
37
  "playwright": "1.62.1",
38
38
  "ws": "^8.21.3",
39
39
  "zod": "4.4.3",
40
- "@myagentroam/agent": "0.11.16",
41
- "@myagentroam/code-navigation": "0.11.0",
40
+ "@myagentroam/agent": "0.11.18",
42
41
  "@myagentroam/marctl": "0.11.0",
43
- "@myagentroam/protocol": "0.11.16"
42
+ "@myagentroam/code-navigation": "0.11.0",
43
+ "@myagentroam/protocol": "0.11.18"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@types/ws": "^8.18.1"