@yu_robotics/remote-cli 1.6.265 → 1.6.267
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/client/MessageHandler.d.ts +1 -0
- package/dist/client/MessageHandler.d.ts.map +1 -1
- package/dist/client/MessageHandler.js +86 -58
- package/dist/client/MessageHandler.js.map +1 -1
- package/dist/executor/AgyExecutor.d.ts +0 -2
- package/dist/executor/AgyExecutor.d.ts.map +1 -1
- package/dist/executor/AgyExecutor.js +0 -19
- package/dist/executor/AgyExecutor.js.map +1 -1
- package/dist/executor/ClaudePersistentExecutor.d.ts +1 -4
- package/dist/executor/ClaudePersistentExecutor.d.ts.map +1 -1
- package/dist/executor/ClaudePersistentExecutor.js +0 -59
- package/dist/executor/ClaudePersistentExecutor.js.map +1 -1
- package/dist/executor/DshExecutor.d.ts +1 -5
- package/dist/executor/DshExecutor.d.ts.map +1 -1
- package/dist/executor/DshExecutor.js +0 -35
- package/dist/executor/DshExecutor.js.map +1 -1
- package/dist/executor/IExecutor.d.ts +0 -4
- package/dist/executor/IExecutor.d.ts.map +1 -1
- package/dist/executor/acp/AcpClient.d.ts +0 -1
- package/dist/executor/acp/AcpClient.d.ts.map +1 -1
- package/dist/executor/acp/AcpClient.js.map +1 -1
- package/dist/executor/agy/AgyAcpRuntime.d.ts +0 -3
- package/dist/executor/agy/AgyAcpRuntime.d.ts.map +1 -1
- package/dist/executor/agy/AgyAcpRuntime.js +1 -30
- package/dist/executor/agy/AgyAcpRuntime.js.map +1 -1
- package/dist/executor/dsh/DshAcpClient.d.ts +1 -10
- package/dist/executor/dsh/DshAcpClient.d.ts.map +1 -1
- package/dist/executor/dsh/DshAcpClient.js +12 -75
- package/dist/executor/dsh/DshAcpClient.js.map +1 -1
- package/dist/executor/dsh/DshPrivacy.d.ts +1 -1
- package/dist/executor/dsh/DshPrivacy.d.ts.map +1 -1
- package/dist/executor/dsh/DshPrivacy.js +2 -2
- package/dist/executor/dsh/DshPrivacy.js.map +1 -1
- package/dist/maintenance/release-notes.json +1 -1
- package/dist/scheduling/ScheduleCapabilities.d.ts +0 -42
- package/dist/scheduling/ScheduleCapabilities.d.ts.map +1 -1
- package/dist/scheduling/ScheduleCapabilities.js +3 -4
- package/dist/scheduling/ScheduleCapabilities.js.map +1 -1
- package/dist/scheduling/ScheduleCommand.js +3 -3
- package/dist/scheduling/ScheduleCommand.js.map +1 -1
- package/dist/scheduling/ScheduleService.d.ts +10 -19
- package/dist/scheduling/ScheduleService.d.ts.map +1 -1
- package/dist/scheduling/ScheduleService.js +103 -577
- package/dist/scheduling/ScheduleService.js.map +1 -1
- package/dist/scheduling/ScheduleToolScope.d.ts +2 -2
- package/dist/scheduling/ScheduleToolScope.d.ts.map +1 -1
- package/dist/scheduling/ScheduleToolScope.js +1 -1
- package/dist/scheduling/ScheduleToolScope.js.map +1 -1
- package/dist/scheduling/agy/AgyScheduleHost.d.ts +1 -3
- package/dist/scheduling/agy/AgyScheduleHost.d.ts.map +1 -1
- package/dist/scheduling/agy/AgyScheduleHost.js +0 -3
- package/dist/scheduling/agy/AgyScheduleHost.js.map +1 -1
- package/dist/scheduling/agy/AgySessionSchedules.d.ts +3 -2
- package/dist/scheduling/agy/AgySessionSchedules.d.ts.map +1 -1
- package/dist/scheduling/agy/AgySessionSchedules.js +3 -0
- package/dist/scheduling/agy/AgySessionSchedules.js.map +1 -1
- package/dist/scheduling/dsh/NativeScheduleToolGuard.d.ts +14 -0
- package/dist/scheduling/dsh/NativeScheduleToolGuard.d.ts.map +1 -0
- package/dist/scheduling/dsh/NativeScheduleToolGuard.js +12 -0
- package/dist/scheduling/dsh/NativeScheduleToolGuard.js.map +1 -0
- package/dist/scheduling/dsh/ScheduledSessionGuard.d.ts +0 -1
- package/dist/scheduling/dsh/ScheduledSessionGuard.d.ts.map +1 -1
- package/dist/scheduling/dsh/ScheduledSessionGuard.js +0 -27
- package/dist/scheduling/dsh/ScheduledSessionGuard.js.map +1 -1
- package/dist/scheduling/types.d.ts +3 -8
- package/dist/scheduling/types.d.ts.map +1 -1
- package/dist/scheduling/types.js.map +1 -1
- package/native/prebuilds/darwin-arm64/managed_native.node +0 -0
- package/native/prebuilds/darwin-arm64/manifest.json +1 -1
- package/native/prebuilds/darwin-x64/managed_native.node +0 -0
- package/native/prebuilds/darwin-x64/manifest.json +1 -1
- package/native/prebuilds/win32-arm64/managed_native.node +0 -0
- package/native/prebuilds/win32-arm64/manifest.json +1 -1
- package/native/prebuilds/win32-x64/managed_native.node +0 -0
- package/native/prebuilds/win32-x64/manifest.json +1 -1
- package/package.json +1 -1
- package/dist/scheduling/ClaudeNativeScheduleProvider.d.ts +0 -19
- package/dist/scheduling/ClaudeNativeScheduleProvider.d.ts.map +0 -1
- package/dist/scheduling/ClaudeNativeScheduleProvider.js +0 -570
- package/dist/scheduling/ClaudeNativeScheduleProvider.js.map +0 -1
- package/dist/scheduling/DshNativeScheduleProvider.d.ts +0 -19
- package/dist/scheduling/DshNativeScheduleProvider.d.ts.map +0 -1
- package/dist/scheduling/DshNativeScheduleProvider.js +0 -470
- package/dist/scheduling/DshNativeScheduleProvider.js.map +0 -1
- package/dist/scheduling/dsh/HostBridge.d.ts +0 -96
- package/dist/scheduling/dsh/HostBridge.d.ts.map +0 -1
- package/dist/scheduling/dsh/HostBridge.js +0 -364
- package/dist/scheduling/dsh/HostBridge.js.map +0 -1
- package/dist/scheduling/dsh/ScopePlugin.d.ts +0 -9
- package/dist/scheduling/dsh/ScopePlugin.d.ts.map +0 -1
- package/dist/scheduling/dsh/ScopePlugin.js +0 -13
- package/dist/scheduling/dsh/ScopePlugin.js.map +0 -1
- package/dist/scheduling/dsh/SessionScheduleBridge.d.ts +0 -35
- package/dist/scheduling/dsh/SessionScheduleBridge.d.ts.map +0 -1
- package/dist/scheduling/dsh/SessionScheduleBridge.js +0 -296
- package/dist/scheduling/dsh/SessionScheduleBridge.js.map +0 -1
- package/dist/scheduling/dsh/SessionScheduleClient.d.ts +0 -15
- package/dist/scheduling/dsh/SessionScheduleClient.d.ts.map +0 -1
- package/dist/scheduling/dsh/SessionScheduleClient.js +0 -184
- package/dist/scheduling/dsh/SessionScheduleClient.js.map +0 -1
- package/dist/scheduling/dsh/SessionScheduleStorage.d.ts +0 -8
- package/dist/scheduling/dsh/SessionScheduleStorage.d.ts.map +0 -1
- package/dist/scheduling/dsh/SessionScheduleStorage.js +0 -34
- package/dist/scheduling/dsh/SessionScheduleStorage.js.map +0 -1
- package/dist/scheduling/dsh/launch.d.ts +0 -13
- package/dist/scheduling/dsh/launch.d.ts.map +0 -1
- package/dist/scheduling/dsh/launch.js +0 -58
- package/dist/scheduling/dsh/launch.js.map +0 -1
- package/dist/scheduling/dsh/protocol.d.ts +0 -28
- package/dist/scheduling/dsh/protocol.d.ts.map +0 -1
- package/dist/scheduling/dsh/protocol.js +0 -142
- package/dist/scheduling/dsh/protocol.js.map +0 -1
- package/dist/scheduling/dsh/sessionLaunch.d.ts +0 -3
- package/dist/scheduling/dsh/sessionLaunch.d.ts.map +0 -1
- package/dist/scheduling/dsh/sessionLaunch.js +0 -22
- package/dist/scheduling/dsh/sessionLaunch.js.map +0 -1
- package/dist/scheduling/dsh/sessionProtocol.d.ts +0 -4
- package/dist/scheduling/dsh/sessionProtocol.d.ts.map +0 -1
- package/dist/scheduling/dsh/sessionProtocol.js +0 -7
- package/dist/scheduling/dsh/sessionProtocol.js.map +0 -1
|
@@ -106,6 +106,7 @@ export declare class MessageHandler {
|
|
|
106
106
|
private handleWorkerContextReset;
|
|
107
107
|
private detachDelegationBridge;
|
|
108
108
|
private clearThreadConversation;
|
|
109
|
+
private resetThreadConversation;
|
|
109
110
|
/**
|
|
110
111
|
* Handle built-in commands (thread-scoped).
|
|
111
112
|
* Returns true if handled.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageHandler.d.ts","sourceRoot":"","sources":["../../src/client/MessageHandler.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,eAAe,EAAE,MAA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AsB;IAsBpC,mFAAmF;YACrE,eAAe;YAuDf,mBAAmB;IA0BjC,OAAO,CAAC,YAAY;YAUN,cAAc;YAuBd,oBAAoB;IAgHlC;;OAEG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAoC/B"}
|
|
@@ -62,7 +62,6 @@ const ScheduleService_1 = require("../scheduling/ScheduleService");
|
|
|
62
62
|
const ScheduleDeliveryClient_1 = require("../scheduling/ScheduleDeliveryClient");
|
|
63
63
|
const ScheduleCommand_1 = require("../scheduling/ScheduleCommand");
|
|
64
64
|
const ScheduleCapabilities_1 = require("../scheduling/ScheduleCapabilities");
|
|
65
|
-
const types_2 = require("../scheduling/types");
|
|
66
65
|
const EFFORT_BACKENDS = new Set(['claude', 'codex', 'agy', 'opencode', 'kimi', 'zcode', 'pi', 'dsh']);
|
|
67
66
|
const SLASH_SESSION_BACKENDS = new Set(['opencode', 'kimi', 'zcode', 'pi']);
|
|
68
67
|
const NATIVE_SKILLS_BACKENDS = new Set(['claude', 'agy', 'opencode', 'kimi', 'zcode', 'pi']);
|
|
@@ -1041,6 +1040,40 @@ class MessageHandler {
|
|
|
1041
1040
|
* Handle /abort command for a specific thread executor
|
|
1042
1041
|
*/
|
|
1043
1042
|
async handleAbortCommand(messageId, threadId, executor) {
|
|
1043
|
+
const occurrence = this.hostOccurrences.get(threadId);
|
|
1044
|
+
if (occurrence) {
|
|
1045
|
+
const operation = this.activeThreadOperations.get(threadId);
|
|
1046
|
+
if (!operation || this.isDestroyed || occurrence.record.openId !== this.messageOpenIds.get(messageId)
|
|
1047
|
+
|| !this.hostBindingCurrent(occurrence.record)) {
|
|
1048
|
+
this.sendResponse(messageId, threadId, { success: false, error: 'Scheduled occurrence ownership changed.' });
|
|
1049
|
+
return;
|
|
1050
|
+
}
|
|
1051
|
+
if (!occurrence.executor) {
|
|
1052
|
+
this.sendResponse(messageId, threadId, { success: true, output: 'The scheduled occurrence has not started executing.' });
|
|
1053
|
+
return;
|
|
1054
|
+
}
|
|
1055
|
+
if (executor !== occurrence.executor) {
|
|
1056
|
+
this.sendResponse(messageId, threadId, { success: false, error: 'Scheduled executor changed.' });
|
|
1057
|
+
return;
|
|
1058
|
+
}
|
|
1059
|
+
try {
|
|
1060
|
+
occurrence.abort ??= executor.abort().then(accepted => {
|
|
1061
|
+
if (executor.hasPendingCancellation?.() || executor.hasUncertainShutdown?.()) {
|
|
1062
|
+
throw new Error('Scheduled occurrence interruption is unconfirmed. Retry /abort.');
|
|
1063
|
+
}
|
|
1064
|
+
return accepted;
|
|
1065
|
+
});
|
|
1066
|
+
if (!await occurrence.abort)
|
|
1067
|
+
throw new Error('The executor did not confirm interruption of this occurrence.');
|
|
1068
|
+
await operation.done;
|
|
1069
|
+
this.sendResponse(messageId, threadId, { success: true, output: 'The scheduled occurrence was interrupted by /abort.' });
|
|
1070
|
+
}
|
|
1071
|
+
catch (error) {
|
|
1072
|
+
occurrence.abort = undefined;
|
|
1073
|
+
this.sendResponse(messageId, threadId, { success: false, error: error instanceof Error ? error.message : 'Failed to interrupt the scheduled occurrence.' });
|
|
1074
|
+
}
|
|
1075
|
+
return;
|
|
1076
|
+
}
|
|
1044
1077
|
if (executor?.hasPendingSettingsChange?.()) {
|
|
1045
1078
|
this.sendResponse(messageId, threadId, { success: false,
|
|
1046
1079
|
error: 'Native settings change is pending or unconfirmed. Wait for its reply or retry the setting after a terminal error. /clear is destructive recovery and loses session-only schedules.' });
|
|
@@ -1204,11 +1237,39 @@ class MessageHandler {
|
|
|
1204
1237
|
async clearThreadConversation(messageId, threadId) {
|
|
1205
1238
|
if (this.abortOperations.has(threadId))
|
|
1206
1239
|
throw new Error('Direct backend abort is still pending; retry /clear after it settles.');
|
|
1240
|
+
if (this.scheduleManagement.has(threadId))
|
|
1241
|
+
throw new Error('Schedule management is in progress. Retry the conversation reset after it settles.');
|
|
1242
|
+
this.scheduleManagement.add(threadId);
|
|
1243
|
+
try {
|
|
1244
|
+
await this.resetThreadConversation(messageId, threadId);
|
|
1245
|
+
}
|
|
1246
|
+
finally {
|
|
1247
|
+
this.scheduleManagement.delete(threadId);
|
|
1248
|
+
}
|
|
1249
|
+
}
|
|
1250
|
+
async resetThreadConversation(messageId, threadId) {
|
|
1207
1251
|
const existing = this.threadPool.getExistingExecutor(threadId);
|
|
1208
1252
|
const destructiveRecovery = existing?.hasPendingCancellation?.() === true || existing?.hasPendingSettingsChange?.() === true;
|
|
1253
|
+
const openId = this.messageOpenIds.get(messageId);
|
|
1254
|
+
const binding = this.scheduleBinding;
|
|
1255
|
+
const connectionEpoch = this.imageConnectionEpoch;
|
|
1209
1256
|
await this.assertScheduleCleanupContext(threadId);
|
|
1210
|
-
|
|
1211
|
-
|
|
1257
|
+
const removed = await this.schedules?.clearHostContext(threadId, () => {
|
|
1258
|
+
// A previous clear committed schedule erasure before writing its pending reset marker.
|
|
1259
|
+
if (this.threadManager.contextResets.isPending(threadId))
|
|
1260
|
+
return undefined;
|
|
1261
|
+
if (!openId || !binding || connectionEpoch !== this.imageConnectionEpoch)
|
|
1262
|
+
throw new Error('Conversation reset requires the original schedule binding.');
|
|
1263
|
+
const owner = this.scheduleOwner(threadId, openId);
|
|
1264
|
+
this.requireHostBinding(owner, binding.epoch);
|
|
1265
|
+
return owner;
|
|
1266
|
+
}, destructiveRecovery);
|
|
1267
|
+
const scheduleNotice = removed ? `Removed ${removed} host ${removed === 1 ? 'schedule' : 'schedules'} and associated history. ` : '';
|
|
1268
|
+
if (removed) {
|
|
1269
|
+
this.scheduleOwners.delete(threadId);
|
|
1270
|
+
if (connectionEpoch !== this.imageConnectionEpoch)
|
|
1271
|
+
throw new Error(`${scheduleNotice}Device binding changed during conversation reset. Retry in the original thread.`);
|
|
1272
|
+
}
|
|
1212
1273
|
this.conversationRevisions.set(threadId, (this.conversationRevisions.get(threadId) ?? 0) + 1);
|
|
1213
1274
|
this.settingsService.invalidate(threadId);
|
|
1214
1275
|
this.directoryBrowser.invalidate(threadId);
|
|
@@ -1252,11 +1313,11 @@ class MessageHandler {
|
|
|
1252
1313
|
this.threadPool.setThreadBusy(threadId, false);
|
|
1253
1314
|
await workers;
|
|
1254
1315
|
this.sendResponse(messageId, threadId, { success: true,
|
|
1255
|
-
output: `${destructiveRecovery ? 'Explicit reset stopped the Claude host; its session-only schedules were lost. ' : ''}Started a fresh conversation for direct backends and managed workers. Permanent deletion of old managed child native sessions is queued. Verified Codex, Kimi, Pi, and Claude child sessions are supported on Linux; unsupported versions, layouts, backends, platforms, and unconfirmed targets remain pending. Task artifacts and recovery evidence are retained. Pending native writers still block conflicting execution.` }, true);
|
|
1316
|
+
output: `${scheduleNotice}${destructiveRecovery ? 'Explicit reset stopped the Claude host; its session-only schedules were lost. ' : ''}Started a fresh conversation for direct backends and managed workers. Permanent deletion of old managed child native sessions is queued. Verified Codex, Kimi, Pi, and Claude child sessions are supported on Linux; unsupported versions, layouts, backends, platforms, and unconfirmed targets remain pending. Task artifacts and recovery evidence are retained. Pending native writers still block conflicting execution.` }, true);
|
|
1256
1317
|
}
|
|
1257
1318
|
catch (error) {
|
|
1258
1319
|
const detail = error instanceof Error ? error.message : 'Local context storage is unavailable';
|
|
1259
|
-
throw new Error(
|
|
1320
|
+
throw new Error(`${scheduleNotice}Could not clear thread conversation: ${detail}. Check local CLI storage and retry /clear or /new.`);
|
|
1260
1321
|
}
|
|
1261
1322
|
finally {
|
|
1262
1323
|
if (active)
|
|
@@ -3511,52 +3572,13 @@ You can also use natural language commands to control Claude Code CLI.`,
|
|
|
3511
3572
|
hostDispatch: (record, occurrenceId, admit) => this.dispatchHostOccurrence(record, occurrenceId, admit),
|
|
3512
3573
|
isNativeMutationPending: owner => this.threadPool.getExistingExecutor(owner.threadId)?.hasPendingScheduleMutation?.() ?? false,
|
|
3513
3574
|
withPurgeVerification: (record, context, accept) => (0, SchedulePurgeVerification_1.verifySchedulePurge)(record, this.schedulePurgeHosts.get(record.threadId), context.isCurrent, accept),
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
const backend = input.backend === undefined ? 'claude' : input.backend;
|
|
3522
|
-
let executor;
|
|
3523
|
-
let generation;
|
|
3524
|
-
try {
|
|
3525
|
-
if (input.engine === 'host')
|
|
3526
|
-
throw new Error('Host schedules cannot create native timer definitions.');
|
|
3527
|
-
(0, ScheduleCapabilities_1.assertNativeScheduleBackend)(backend);
|
|
3528
|
-
if (!input.threadId)
|
|
3529
|
-
throw new Error('Native scheduling requires the original thread.');
|
|
3530
|
-
if (this.threadPool.getBackendKey(input.threadId) !== backend)
|
|
3531
|
-
throw new Error('Foreground scheduling backend changed before native admission.');
|
|
3532
|
-
executor = this.threadPool.getExecutor(input.threadId);
|
|
3533
|
-
if (!executor.createNativeSchedule)
|
|
3534
|
-
throw new Error('The original executor does not support native session scheduling.');
|
|
3535
|
-
generation = this.scheduleGeneration(input.threadId);
|
|
3536
|
-
}
|
|
3537
|
-
catch (error) {
|
|
3538
|
-
throw new types_2.NativeScheduleNotAdmittedError(error instanceof Error ? error.message : 'Native schedule provider refused admission.');
|
|
3539
|
-
}
|
|
3540
|
-
return executor.createNativeSchedule(input, event => {
|
|
3541
|
-
const settled = onEvent(event);
|
|
3542
|
-
// A foreground message confirmed into the thread queue while an
|
|
3543
|
-
// autonomous native occurrence was running must be retried when
|
|
3544
|
-
// that occurrence reaches a terminal state. The executor's own
|
|
3545
|
-
// queue wake does not know about MessageHandler's queue.
|
|
3546
|
-
if (event.type === 'completed' || (event.type === 'stopped' && event.exitConfirmed !== false)) {
|
|
3547
|
-
queueMicrotask(() => { void this.startNextQueuedCommand(input.threadId); });
|
|
3548
|
-
}
|
|
3549
|
-
return settled;
|
|
3550
|
-
}, () => {
|
|
3551
|
-
try {
|
|
3552
|
-
return !this.isDestroyed && this.scheduleGeneration(input.threadId) === generation
|
|
3553
|
-
&& this.threadPool.getBackendKey(input.threadId) === backend;
|
|
3554
|
-
}
|
|
3555
|
-
catch {
|
|
3556
|
-
return false;
|
|
3557
|
-
}
|
|
3558
|
-
}, canAdmitOccurrence);
|
|
3559
|
-
} },
|
|
3575
|
+
cleanupFor: input => {
|
|
3576
|
+
if (input.engine === 'host')
|
|
3577
|
+
return undefined;
|
|
3578
|
+
if (!input.threadId || this.threadPool.getBackendKey(input.threadId) !== input.backend)
|
|
3579
|
+
return undefined;
|
|
3580
|
+
return this.threadPool.getExecutor(input.threadId).nativeScheduleCleanup;
|
|
3581
|
+
},
|
|
3560
3582
|
isOwnerCurrent: owner => {
|
|
3561
3583
|
// Shutdown blocks delivery separately; it does not invalidate persisted ownership.
|
|
3562
3584
|
if (owner.bindingEpoch !== undefined && (!this.wsClient.isConnected() || !this.scheduleBinding))
|
|
@@ -3645,6 +3667,7 @@ You can also use natural language commands to control Claude Code CLI.`,
|
|
|
3645
3667
|
};
|
|
3646
3668
|
beforePrompt();
|
|
3647
3669
|
let display = '';
|
|
3670
|
+
occurrence.executor = executor;
|
|
3648
3671
|
const result = await executor.execute(record.prompt, {
|
|
3649
3672
|
hostScheduleSessionId: sessionId,
|
|
3650
3673
|
// Claude checks queued authorization before process startup and again before stdin.
|
|
@@ -3686,8 +3709,13 @@ You can also use natural language commands to control Claude Code CLI.`,
|
|
|
3686
3709
|
}
|
|
3687
3710
|
this.sendStreamChunk(messageId, threadId, chunk);
|
|
3688
3711
|
},
|
|
3689
|
-
})
|
|
3712
|
+
}).catch((error) => ({ success: false, output: undefined,
|
|
3713
|
+
error: error instanceof Error ? error.message : 'Scheduled execution failed.' }));
|
|
3714
|
+
const aborted = occurrence.abort && await occurrence.abort;
|
|
3690
3715
|
check(true);
|
|
3716
|
+
if (aborted)
|
|
3717
|
+
return { success: false, abortedByUser: true, output: display || result.output,
|
|
3718
|
+
error: 'Scheduled occurrence interrupted by /abort.' };
|
|
3691
3719
|
// Prefer the public display stream, but preserve the executor's final
|
|
3692
3720
|
// output when a backend only returns its answer at turn completion.
|
|
3693
3721
|
return { success: result.success, output: display || result.output, error: result.error };
|
|
@@ -3701,12 +3729,13 @@ You can also use natural language commands to control Claude Code CLI.`,
|
|
|
3701
3729
|
this.resolveApprovalCard(id, 'expired');
|
|
3702
3730
|
}
|
|
3703
3731
|
this.messageOpenIds.delete(messageId);
|
|
3704
|
-
this.hostOccurrences.
|
|
3732
|
+
if (this.hostOccurrences.get(threadId) === occurrence)
|
|
3733
|
+
this.hostOccurrences.delete(threadId);
|
|
3705
3734
|
this.cancelledOperations.delete(token);
|
|
3706
3735
|
if (this.finishThreadOperation(threadId, token) && !this.isDestroyed)
|
|
3707
3736
|
void this.startNextQueuedCommand(threadId);
|
|
3708
3737
|
}
|
|
3709
|
-
});
|
|
3738
|
+
}, true);
|
|
3710
3739
|
}
|
|
3711
3740
|
async activeSchedules(threadId) {
|
|
3712
3741
|
const owner = this.scheduleOwners.get(threadId);
|
|
@@ -3919,8 +3948,7 @@ You can also use natural language commands to control Claude Code CLI.`,
|
|
|
3919
3948
|
const needsVerification = backend === 'claude' && !!executor.withReviewedNativeCleanup && (cleanup.some(item => ids.includes(item.id) && item.backend === 'claude' && !!item.attribution && !!item.nativeId) || records.some(record => ids.includes(record.id)
|
|
3920
3949
|
&& record.engine !== 'host' && record.backend === 'claude' && !!record.recovery && !!record.nativeId && !record.cleanupConfirmed && !record.creationRefused && !['active', 'running', 'creating'].includes(record.state)));
|
|
3921
3950
|
const needsNative = needsVerification || ['claude', 'agy'].includes(backend) && records.some(record => ids.includes(record.id)
|
|
3922
|
-
&& record.engine !== 'host' && record.backend === backend &&
|
|
3923
|
-
|| backend === 'agy' && service.needsNativePurge(owner, record.id)));
|
|
3951
|
+
&& record.engine !== 'host' && record.backend === backend && service.canCancel(owner, record.id));
|
|
3924
3952
|
if (!needsNative)
|
|
3925
3953
|
return await run();
|
|
3926
3954
|
if (!executor.withNativeScheduleOperation)
|
|
@@ -4115,9 +4143,9 @@ You can also use natural language commands to control Claude Code CLI.`,
|
|
|
4115
4143
|
+ '\nRetry /schedule purge <managed-id,...>; use cleanup review/delete for exact native definitions in their original bound session.';
|
|
4116
4144
|
}
|
|
4117
4145
|
if (storedOnly)
|
|
4118
|
-
output = `
|
|
4146
|
+
output = `Showing the stored catalog. Native cancellation cleanup is pending. Retry /abort to finish cleanup.\n\n${output}`;
|
|
4119
4147
|
if (updateSnapshot)
|
|
4120
|
-
output = `
|
|
4148
|
+
output = `Showing the stored catalog during the automatic update. Check the CLI diagnostics before stopping or restarting the service.\n\n${output}`;
|
|
4121
4149
|
respond({ success: true, scheduleMenu: updateSnapshot ? undefined : menuFor(owner, records), output });
|
|
4122
4150
|
}
|
|
4123
4151
|
catch (error) {
|