@myagentroam/node 0.11.15 → 0.11.17
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 +13 -24
- package/dist/native-session-history.js +35 -832
- package/dist/native-transcript-adapters.js +9 -0
- package/dist/native-transcript-model.js +1 -0
- package/dist/runner/abstract-runner.js +12 -0
- package/dist/runner/claude/conversation-parser.js +80 -1
- package/dist/runner/claude/managed-run-controller.js +4 -2
- package/dist/runner/claude/message-parsers.js +37 -0
- package/dist/runner/claude/native-context-usage.js +90 -0
- package/dist/runner/claude/native-transcript.js +347 -0
- package/dist/runner/claude/tool-normalizer.js +12 -2
- package/dist/runner/claude-code-runner.js +13 -2
- package/dist/runner/codex/conversation-parser.js +67 -3
- package/dist/runner/codex/managed-run-controller.js +3 -2
- package/dist/runner/codex/native-context-usage.js +42 -0
- package/dist/runner/codex/native-transcript.js +575 -0
- package/dist/runner/codex-runner.js +18 -3
- package/dist/runner/mar-agent/managed-run-controller.js +1 -1
- package/dist/runner/mar-agent-runner.js +6 -0
- package/dist/runner/opencode/conversation-parser.js +1 -1
- package/dist/runner/opencode/managed-run-controller.js +1 -1
- package/dist/runner/opencode-runner.js +7 -1
- package/dist/runner/runner-registry.js +4 -0
- package/dist/runtime-state.js +1 -6
- package/dist/service/continuous-run-coordinator.js +1 -0
- package/dist/service/conversation-template-manifest.js +179 -0
- package/dist/service/conversation-template-node-service.js +10 -132
- package/dist/service/external-session-resume-service.js +15 -0
- package/dist/service/fake-managed-run-service.js +1 -1
- package/dist/service/goal-continuation-coordinator.js +4 -3
- package/dist/service/goal-runtime.js +0 -9
- package/dist/service/hosted-conversation-node-service.js +16 -179
- package/dist/service/hosted-conversation-store.js +2 -33
- package/dist/service/native-session-projection-service.js +7 -24
- package/dist/service/node-control-channel.js +1 -1
- package/dist/service/node-control-message-service.js +0 -8
- package/dist/service/node-request-service.js +1 -1
- package/dist/service/node-run-event-bridge.js +0 -37
- package/dist/service/node-terminal-channel.js +1 -1
- package/dist/service/recent-run-projection-service.js +2 -1
- package/dist/service/run-workbench-service.js +1 -1
- package/dist/service/runner-interaction-service.js +2 -1
- package/dist/service/runner-service.js +6 -4
- package/dist/service/session-identity-service.js +1 -0
- package/dist/service/session-message-service.js +1 -0
- package/dist/service/session-query-service.js +1 -1
- package/dist/service/workbench-event-projection.js +1 -1
- package/dist/service/workbench-event-service.js +1 -1
- package/dist/service/workspace-file-service.js +0 -2
- package/dist/service/workspace-queue-workbench-service.js +2 -2
- package/dist/util/node-operation-parsers.js +0 -45
- package/dist/util/runner-native-session-parsers.js +17 -194
- package/package.json +5 -5
package/dist/connector.js
CHANGED
|
@@ -80,9 +80,9 @@ import { NotificationMcpBridge, resolveNotificationCapability } from './service/
|
|
|
80
80
|
import { SessionCatalogService } from './service/session-catalog-service.js';
|
|
81
81
|
import { SessionCommandService } from './service/session-command-service.js';
|
|
82
82
|
import { SessionPresentationService } from './service/session-presentation-service.js';
|
|
83
|
-
import { isPlainRecord, isRunnerImageAttachment, parseRunnerImageAttachments } from './
|
|
83
|
+
import { isPlainRecord, isRunnerImageAttachment, parseRunnerImageAttachments } from './util/node-operation-parsers.js';
|
|
84
84
|
import { WebToolService } from './service/web-tool-service.js';
|
|
85
|
-
export { nodeConnectEndpoint, validatedCapabilities } from './
|
|
85
|
+
export { nodeConnectEndpoint, validatedCapabilities } from './util/node-operation-parsers.js';
|
|
86
86
|
import { NodeControlChannel } from './service/node-control-channel.js';
|
|
87
87
|
import { NodeControlMessageService } from './service/node-control-message-service.js';
|
|
88
88
|
import { NodeRequestService } from './service/node-request-service.js';
|
|
@@ -313,16 +313,14 @@ export class NodeConnector {
|
|
|
313
313
|
active: (workspaceId) => this.workspaceWatchService.topicActive(workspaceId, 'sessions'),
|
|
314
314
|
invalidate: (workspaceId) => void this.workspaceWorkbenchService?.invalidateTopic(workspaceId, 'sessions')
|
|
315
315
|
});
|
|
316
|
-
|
|
317
|
-
this.workspaceWorkbenchService?.invalidateWorkspaceFiles(workspaceId);
|
|
318
|
-
this.workspaceCoordinator.invalidate(workspaceId);
|
|
319
|
-
}, {}, (workspaceId, resourcePath) => this.workspaceUploadService.fileResource(workspaceId, resourcePath) ??
|
|
320
|
-
this.runAttachmentService.fileResource(workspaceId, resourcePath));
|
|
321
|
-
workspaceUploadService = new WorkspaceUploadService(this.workspaceState, (workspaceId) => {
|
|
316
|
+
invalidateWorkspaceFiles = (workspaceId) => {
|
|
322
317
|
this.workspaceFileService.dispose(workspaceId);
|
|
323
318
|
this.workspaceWorkbenchService?.invalidateWorkspaceFiles(workspaceId);
|
|
324
319
|
this.workspaceCoordinator.invalidate(workspaceId);
|
|
325
|
-
}
|
|
320
|
+
};
|
|
321
|
+
workspaceFileService = new WorkspaceFileService(this.workspaceState, this.invalidateWorkspaceFiles, {}, (workspaceId, resourcePath) => this.workspaceUploadService.fileResource(workspaceId, resourcePath) ??
|
|
322
|
+
this.runAttachmentService.fileResource(workspaceId, resourcePath));
|
|
323
|
+
workspaceUploadService = new WorkspaceUploadService(this.workspaceState, this.invalidateWorkspaceFiles, () => this.attachmentTemporaryRoot());
|
|
326
324
|
directTransferService;
|
|
327
325
|
attachmentTemporaryRoot() {
|
|
328
326
|
if (this.config === undefined)
|
|
@@ -337,6 +335,7 @@ export class NodeConnector {
|
|
|
337
335
|
runtime = new NodeRuntimeState(() => this.config?.nodeId ?? 'runtime-node', (workspaceId) => this.database?.getWorkspace(workspaceId), Date.now, (run, session, userMessage) => this.recentRunProjectionService.record(run, session, userMessage));
|
|
338
336
|
goalCoordinator = new GoalContinuationCoordinator({
|
|
339
337
|
goals: this.goalRuntime,
|
|
338
|
+
runners: () => this.runners,
|
|
340
339
|
runtime: this.runtime,
|
|
341
340
|
commands: this.commandStates,
|
|
342
341
|
queue: () => this.continuousRunCoordinator,
|
|
@@ -697,6 +696,7 @@ export class NodeConnector {
|
|
|
697
696
|
capabilities: () => this.capabilities,
|
|
698
697
|
state: this.sessionState,
|
|
699
698
|
commands: this.commandStates,
|
|
699
|
+
releaseResumeState: (directIds, projectionIds) => this.externalSessionResumeService.forgetSessions(directIds, projectionIds),
|
|
700
700
|
present: (session) => this.sessionPresentationService.present(session)
|
|
701
701
|
});
|
|
702
702
|
this.conversationHistoryService = new ConversationHistoryService({
|
|
@@ -706,7 +706,7 @@ export class NodeConnector {
|
|
|
706
706
|
attachments: this.runAttachmentService,
|
|
707
707
|
snapshotSequence: () => this.workbenchEventService.snapshotSequence(),
|
|
708
708
|
hasManagedActiveRun: (session) => hasManagedActiveRun(this.runtime, session),
|
|
709
|
-
setExternalActivity: (sessionId, activity) => this.
|
|
709
|
+
setExternalActivity: (sessionId, activity) => this.externalSessionResumeService.setActivity(sessionId, activity)
|
|
710
710
|
});
|
|
711
711
|
this.conversationSegmentService = new ConversationSegmentService((session, input) => this.conversationHistoryService.read(session, input));
|
|
712
712
|
this.sessionContextService = new SessionContextService({
|
|
@@ -891,15 +891,15 @@ export class NodeConnector {
|
|
|
891
891
|
},
|
|
892
892
|
validateCommands: (previousId, nextId) => this.commandStates.validateSessionIdentityPromotion(previousId, nextId),
|
|
893
893
|
migrateCommands: (previousId, nextId) => this.commandStates.promoteSessionIdentity(previousId, nextId),
|
|
894
|
+
migrateAttachments: (previousId, nextId) => this.runAttachmentService.migrateSession(previousId, nextId),
|
|
894
895
|
migrateGoal: (previousId, nextId) => {
|
|
895
|
-
this.runAttachmentService.migrateSession(previousId, nextId);
|
|
896
896
|
this.goalCoordinator.migrateSession(previousId, nextId);
|
|
897
897
|
this.goalMcpBridge.migrateSession(previousId, nextId);
|
|
898
898
|
},
|
|
899
899
|
migrateQueue: (previousId, nextId) => this.continuousRunCoordinator.migrateSession(previousId, nextId),
|
|
900
900
|
migrateRunnerState: (previousId, nextId) => {
|
|
901
901
|
this.modelUsage.promoteSession(previousId, nextId);
|
|
902
|
-
this.
|
|
902
|
+
this.runners.migrateSessionIdentity(previousId, nextId);
|
|
903
903
|
},
|
|
904
904
|
emitSession: (session) => this.emitSessionWorkbenchEvent({ session }),
|
|
905
905
|
emitRun: (run) => this.emitWorkbenchEvent('run', { run }),
|
|
@@ -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,14 +1233,9 @@ 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,
|
|
1242
|
-
codex: this.codexClient,
|
|
1243
|
-
claude: this.claudeClient,
|
|
1244
|
-
openCode: this.openCodeClient,
|
|
1245
1239
|
send: (type, payload, replyTo) => this.send(type, payload, replyTo)
|
|
1246
1240
|
});
|
|
1247
1241
|
this.connectionLifecycle = new NodeConnectionLifecycleService({
|
|
@@ -1364,11 +1358,7 @@ export class NodeConnector {
|
|
|
1364
1358
|
uploads: this.workspaceUploadService,
|
|
1365
1359
|
changes: this.workspaceChangeService,
|
|
1366
1360
|
listSessions: (workspaceId) => this.executeNodeOperation('session.list', { workspaceId, limit: 30 }),
|
|
1367
|
-
invalidate:
|
|
1368
|
-
this.workspaceFileService.dispose(workspaceId);
|
|
1369
|
-
this.workspaceWorkbenchService.invalidateWorkspaceFiles(workspaceId);
|
|
1370
|
-
this.workspaceCoordinator.invalidate(workspaceId);
|
|
1371
|
-
},
|
|
1361
|
+
invalidate: this.invalidateWorkspaceFiles,
|
|
1372
1362
|
nodeId: () => this.config?.nodeId ?? 'runtime-node',
|
|
1373
1363
|
nodeGeneration: () => this.nodeGeneration,
|
|
1374
1364
|
emitWatchEvent: (payload) => this.send('watch.event', payload)
|
|
@@ -1744,7 +1734,6 @@ export class NodeConnector {
|
|
|
1744
1734
|
emitWorkbenchEvent = (category, payload) => this.workbenchEventService.dispatch(category, payload);
|
|
1745
1735
|
discoverWorkspaceSessions = (workspaceId, onRunnerDiscovered) => this.nativeSessionProjectionService.discoverWorkspace(workspaceId, onRunnerDiscovered);
|
|
1746
1736
|
invalidateWorkspaceWatchTopics = (workspaceId) => this.workspaceCoordinator.invalidate(workspaceId);
|
|
1747
|
-
reconcilePersistedRuns = () => undefined;
|
|
1748
1737
|
startCapabilityRefresh = () => this.connectionLifecycle.startCapabilityRefresh();
|
|
1749
1738
|
refreshCapabilities = () => this.connectionLifecycle.refreshCapabilities();
|
|
1750
1739
|
async executeNodeOperation(operation, data) {
|