@yu_robotics/remote-cli 1.6.121 ā 1.6.133
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/README.md +36 -3
- package/dist/client/MessageHandler.d.ts.map +1 -1
- package/dist/client/MessageHandler.js +37 -3
- package/dist/client/MessageHandler.js.map +1 -1
- package/dist/client/TaskRecovery.d.ts.map +1 -1
- package/dist/client/TaskRecovery.js +5 -0
- package/dist/client/TaskRecovery.js.map +1 -1
- package/dist/client/WebSocketClient.d.ts +6 -0
- package/dist/client/WebSocketClient.d.ts.map +1 -1
- package/dist/client/WebSocketClient.js +4 -0
- package/dist/client/WebSocketClient.js.map +1 -1
- package/dist/commands/config.js +7 -0
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/start.d.ts.map +1 -1
- package/dist/commands/start.js +11 -0
- package/dist/commands/start.js.map +1 -1
- package/dist/delegation/DelegatedWorkerSessionStore.d.ts +4 -1
- package/dist/delegation/DelegatedWorkerSessionStore.d.ts.map +1 -1
- package/dist/delegation/DelegatedWorkerSessionStore.js +6 -7
- package/dist/delegation/DelegatedWorkerSessionStore.js.map +1 -1
- package/dist/delegation/DelegatedWorkspaceManager.d.ts +91 -0
- package/dist/delegation/DelegatedWorkspaceManager.d.ts.map +1 -0
- package/dist/delegation/DelegatedWorkspaceManager.js +377 -0
- package/dist/delegation/DelegatedWorkspaceManager.js.map +1 -0
- package/dist/delegation/DelegationManager.d.ts +13 -4
- package/dist/delegation/DelegationManager.d.ts.map +1 -1
- package/dist/delegation/DelegationManager.js +388 -114
- package/dist/delegation/DelegationManager.js.map +1 -1
- package/dist/delegation/DelegationNotice.d.ts.map +1 -1
- package/dist/delegation/DelegationNotice.js +2 -0
- package/dist/delegation/DelegationNotice.js.map +1 -1
- package/dist/delegation/DelegationStore.d.ts +6 -2
- package/dist/delegation/DelegationStore.d.ts.map +1 -1
- package/dist/delegation/DelegationStore.js +12 -5
- package/dist/delegation/DelegationStore.js.map +1 -1
- package/dist/delegation/GitCheckpoint.d.ts +27 -0
- package/dist/delegation/GitCheckpoint.d.ts.map +1 -0
- package/dist/delegation/GitCheckpoint.js +226 -0
- package/dist/delegation/GitCheckpoint.js.map +1 -0
- package/dist/delegation/contract.d.ts +18 -4
- package/dist/delegation/contract.d.ts.map +1 -1
- package/dist/delegation/contract.js +13 -4
- package/dist/delegation/contract.js.map +1 -1
- package/dist/executor/AcpExecutor.d.ts +2 -0
- package/dist/executor/AcpExecutor.d.ts.map +1 -1
- package/dist/executor/AcpExecutor.js +22 -2
- package/dist/executor/AcpExecutor.js.map +1 -1
- package/dist/executor/AgyExecutor.d.ts +1 -0
- package/dist/executor/AgyExecutor.d.ts.map +1 -1
- package/dist/executor/AgyExecutor.js +4 -0
- package/dist/executor/AgyExecutor.js.map +1 -1
- package/dist/executor/ClaudePersistentExecutor.d.ts +2 -0
- package/dist/executor/ClaudePersistentExecutor.d.ts.map +1 -1
- package/dist/executor/ClaudePersistentExecutor.js +19 -0
- package/dist/executor/ClaudePersistentExecutor.js.map +1 -1
- package/dist/executor/CodexAppServerClient.d.ts +5 -0
- package/dist/executor/CodexAppServerClient.d.ts.map +1 -1
- package/dist/executor/CodexAppServerClient.js +6 -2
- package/dist/executor/CodexAppServerClient.js.map +1 -1
- package/dist/executor/CodexAppServerExecutor.d.ts +4 -0
- package/dist/executor/CodexAppServerExecutor.d.ts.map +1 -1
- package/dist/executor/CodexAppServerExecutor.js +32 -0
- package/dist/executor/CodexAppServerExecutor.js.map +1 -1
- package/dist/executor/ExecutionMetadata.d.ts +9 -0
- package/dist/executor/ExecutionMetadata.d.ts.map +1 -0
- package/dist/executor/ExecutionMetadata.js +57 -0
- package/dist/executor/ExecutionMetadata.js.map +1 -0
- package/dist/executor/IExecutor.d.ts +4 -1
- package/dist/executor/IExecutor.d.ts.map +1 -1
- package/dist/executor/PiExecutor.d.ts +3 -0
- package/dist/executor/PiExecutor.d.ts.map +1 -1
- package/dist/executor/PiExecutor.js +36 -0
- package/dist/executor/PiExecutor.js.map +1 -1
- package/dist/executor/claude/ClaudeStderrFilter.d.ts +1 -1
- package/dist/executor/claude/ClaudeStderrFilter.d.ts.map +1 -1
- package/dist/executor/claude/ClaudeStderrFilter.js +3 -2
- package/dist/executor/claude/ClaudeStderrFilter.js.map +1 -1
- package/dist/maintenance/CodexStatusProbe.d.ts +26 -0
- package/dist/maintenance/CodexStatusProbe.d.ts.map +1 -0
- package/dist/maintenance/CodexStatusProbe.js +124 -0
- package/dist/maintenance/CodexStatusProbe.js.map +1 -0
- package/dist/maintenance/CodexWeekly.d.ts +17 -0
- package/dist/maintenance/CodexWeekly.d.ts.map +1 -0
- package/dist/maintenance/CodexWeekly.js +60 -0
- package/dist/maintenance/CodexWeekly.js.map +1 -0
- package/dist/maintenance/MaintenanceClient.d.ts +23 -0
- package/dist/maintenance/MaintenanceClient.d.ts.map +1 -0
- package/dist/maintenance/MaintenanceClient.js +69 -0
- package/dist/maintenance/MaintenanceClient.js.map +1 -0
- package/dist/maintenance/PrivateStore.d.ts +10 -0
- package/dist/maintenance/PrivateStore.d.ts.map +1 -0
- package/dist/maintenance/PrivateStore.js +54 -0
- package/dist/maintenance/PrivateStore.js.map +1 -0
- package/dist/maintenance/ReleaseNotes.d.ts +30 -0
- package/dist/maintenance/ReleaseNotes.d.ts.map +1 -0
- package/dist/maintenance/ReleaseNotes.js +139 -0
- package/dist/maintenance/ReleaseNotes.js.map +1 -0
- package/dist/maintenance/ReleaseOverview.d.ts +23 -0
- package/dist/maintenance/ReleaseOverview.d.ts.map +1 -0
- package/dist/maintenance/ReleaseOverview.js +56 -0
- package/dist/maintenance/ReleaseOverview.js.map +1 -0
- package/dist/maintenance/SubscriptionInspection.d.ts +49 -0
- package/dist/maintenance/SubscriptionInspection.d.ts.map +1 -0
- package/dist/maintenance/SubscriptionInspection.js +193 -0
- package/dist/maintenance/SubscriptionInspection.js.map +1 -0
- package/dist/maintenance/SubscriptionReminderStore.d.ts +12 -0
- package/dist/maintenance/SubscriptionReminderStore.d.ts.map +1 -0
- package/dist/maintenance/SubscriptionReminderStore.js +60 -0
- package/dist/maintenance/SubscriptionReminderStore.js.map +1 -0
- package/dist/maintenance/UpdateNotices.d.ts +21 -0
- package/dist/maintenance/UpdateNotices.d.ts.map +1 -0
- package/dist/maintenance/UpdateNotices.js +104 -0
- package/dist/maintenance/UpdateNotices.js.map +1 -0
- package/dist/maintenance/Version.d.ts +3 -0
- package/dist/maintenance/Version.d.ts.map +1 -0
- package/dist/maintenance/Version.js +42 -0
- package/dist/maintenance/Version.js.map +1 -0
- package/dist/maintenance/release-notes.json +1 -0
- package/dist/types/config.d.ts +5 -0
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/config.js.map +1 -1
- package/dist/types/index.d.ts +15 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -18,6 +18,26 @@ Remote control Claude Code, AGY CLI, Codex CLI, OpenCode CLI, Kimi Code CLI, ZCo
|
|
|
18
18
|
|
|
19
19
|
Router 1.6.117 and newer explicitly label standalone background-task notifications **Background task**. The status, originating thread name (or thread ID when no name is provided), and abbreviated task ID remain visible, while **View details** is collapsed by default and contains the rich Markdown result and optional output path. Failed tasks also show a short, literal failure summary outside the panel. This changes only the Router presentation: the CLI protocol, foreground replies, delegated-worker cards, and reply-to-thread routing remain unchanged.
|
|
20
20
|
|
|
21
|
+
## Maintenance Notices
|
|
22
|
+
|
|
23
|
+
From CLI and Router 1.6.127, upgrade notices use concise Chinese summaries from `RELEASE_NOTES_ZH.md`, with one short title and one to three user-visible changes per release. `CHANGELOG.md` remains the English technical record. The CLI build requires matching current-version entries in both documents and bundles both, without online translation or model calls. New Routers show summaries directly and collapse technical details. Earlier maintenance-capable Routers show the summary in their existing collapsed panels; new Routers keep older CLI notes collapsed when no technical-details field is present. Cumulative ranges, silent first adoption, delivery acknowledgements, and protocol version 1 are unchanged.
|
|
24
|
+
|
|
25
|
+
From CLI and Router 1.6.128, upgrade cards group changes by stable feature tags across each device's full pending version range, not just the current detail page. Exact duplicate items are removed within a feature; distinct changes remain available in paged version records. Feature tags are stripped from display Markdown and never shown to users. The overview is bounded to 6 KiB, six features, and 12 items, with explicit omission counts; every original summary and technical record remains in collapsed version details. Older metadata or insufficient overview space falls back to the existing per-version display. The optional overview preserves protocol version 1 and old-peer behavior, without model calls or changes to first adoption, notification progress, or acknowledgements.
|
|
26
|
+
|
|
27
|
+
From CLI and Router 1.6.123, the first feature-enabled start records a silent version baseline, without sending historical changelogs. Later successful newer starts deliver cumulative bundled release notes, including skipped/offline upgrades, in standalone cards with collapsed Markdown and View more. Downgrades keep the notification baseline; old Routers leave notices pending without changing normal messaging.
|
|
28
|
+
|
|
29
|
+
Startup and hourly Codex-only status inspection runs independently of user threads and other backends. It uses native file-backed ChatGPT tokens ephemerally, never refreshes/writes credentials, and never creates a thread or sends a prompt. Keyring-only or expired login and unavailable APIs are not treated as zero usage. Reminders require two zero-usage samples 58-62 minutes apart, each with approximately seven days remaining, and a reset deadline that advances with elapsed time (two-minute tolerances). This is a notification heuristic, not a confirmed provider activation or reset policy. Account observations remain in memory; acknowledged delivery suppression is persisted as described below. Reminders carry a backend identifier for backend-specific copy; Codex explains possible reset-countdown drift and tells the user to send a normal task to start the next usage window, without verification steps. Cards show 100% weekly availability at the qualifying checks, not a live balance or a guarantee about when a usage window starts. New reminder cards have no buttons; legacy Dismiss callbacks never send requests. No Send Hi button or automatic activation is offered.
|
|
30
|
+
|
|
31
|
+
From Router 1.6.125, quota reminder cards use the title **šÆ Codex Reset** and summary **Weekly quota reset: 100%**, without the sampling-disclaimer footer. From Router 1.6.126, new quota cards have no buttons; validated legacy Dismiss callbacks remain passive. Normal-task guidance and inspection criteria are unchanged.
|
|
32
|
+
|
|
33
|
+
From CLI 1.6.126, acknowledged quota-reminder suppression survives upgrades and restarts in a private local ledger under `~/.remote-cli/subscription-reminders/`, scoped to the Router and device. It stores only hashed account/bucket fingerprints, not tokens, raw account identifiers, credential metadata, reset timestamps, or quota observations. Credential refreshes do not clear suppression; only a valid non-candidate observation rearms that account. Missing/failed probes retain suppression. Sampling baselines remain in memory. Accepted acknowledgement writes finish before graceful shutdown; corrupt, unsafe, or unavailable storage pauses quota inspection and reminder delivery without erasing the ledger or affecting normal messaging.
|
|
34
|
+
|
|
35
|
+
Deduplication is not exactly once: a crash between card delivery and local acknowledgement persistence can still produce a duplicate. Earlier clients retain process-only suppression, and their delivery history cannot be recovered on first adoption of the ledger; one additional qualifying reminder is possible. The Router presentation change alone does not give an older CLI restart-safe suppression.
|
|
36
|
+
|
|
37
|
+
Token handoff uses an experimental, unstable app-server login API that OpenAI may change or remove. Unsupported versions make inspection unavailable without affecting messaging or falling back to a model request. Reverify this API when updating the supported Codex version.
|
|
38
|
+
|
|
39
|
+
Both features default to enabled. Set `maintenance.updateNotice` or `maintenance.subscriptionInspection` to `false` using `remote-cli config set` and restart to opt out. See [Maintenance Notices](../../README.md#maintenance-notices) for delivery, privacy, retention, and compatibility limits.
|
|
40
|
+
|
|
21
41
|
## Prerequisites
|
|
22
42
|
|
|
23
43
|
- **Node.js** >= 18.0.0
|
|
@@ -166,7 +186,7 @@ the command. Reading this setting does not initialize delegation or start worker
|
|
|
166
186
|
|
|
167
187
|
From CLI 1.6.118, `/status` shows DSH's official recharge and bonus wallet balances when available. Native official-account sign-in is required; API-key-only or custom-provider setup does not supply these wallets. Amounts retain their native decimal precision and currency; balances are not token usage or plan quota. The query does not create or change an ACP conversation. Its owned process uses the same log-upload and telemetry suppression as the DSH executor, is stopped after the query, and omits the balance section on failure or timeout. No other backend or Router protocol changes are required.
|
|
168
188
|
|
|
169
|
-
From CLI 1.6.120, Claude SDK `[claude-code:unrecognized_model]`
|
|
189
|
+
From CLI 1.6.120, Claude SDK `[claude-code:unrecognized_model]` diagnostics are omitted from Feishu streaming/results and Claude slash-command error details. CLI 1.6.124 also filters the `generate_session_title` source, including delegated Claude workers. Matching requires a bounded, standalone valid JSON record containing only a nonempty `model` string and a recognized `query_source` (`sdk` or `generate_session_title`); model names are not hard-coded. Unknown sources, additional payload fields, malformed records, actual API/authentication errors, exit status, and assistant reply text are retained. The persistent Claude process's raw stderr remains in local CLI logs; this presentation filter does not disable Claude Code telemetry or change the configured model, other backends, or the Router protocol.
|
|
170
190
|
|
|
171
191
|
CLI 1.6.94 and newer show each finished worker as a result block in the existing
|
|
172
192
|
reply card, with a colored status label, backend name, short task description,
|
|
@@ -209,8 +229,21 @@ is disabled and cross-backend sandbox translation remains unsupported. Saved
|
|
|
209
229
|
sandbox policies are not weakened. `read_only` remains recognized for
|
|
210
230
|
compatibility but is unavailable; discovery reports the rejection reason.
|
|
211
231
|
There is one
|
|
212
|
-
active child per parent and at most three per CLI process, with
|
|
213
|
-
|
|
232
|
+
active child per parent and at most three per CLI process, with bounded time/output.
|
|
233
|
+
From CLI 1.6.129, a request may accept multiple independent tasks before collecting
|
|
234
|
+
results. Followers report `queued`, execute in FIFO order, and may be cancelled
|
|
235
|
+
individually without starting a worker. The cumulative limit is 12 accepted tasks
|
|
236
|
+
per request across continuations, including failures and cancellations. Queue
|
|
237
|
+
waits expire one hour after admission. Confirmed process exit and reusable lane
|
|
238
|
+
metadata are required before the next worker starts; an uncertain exit blocks
|
|
239
|
+
queued siblings. No peer communication or native backend behavior changes are
|
|
240
|
+
included. Other overlapping requests or a new request without an available
|
|
241
|
+
global execution slot are rejected rather than queued. Queue status uses existing
|
|
242
|
+
notice text, with progress cards only for started workers; existing Routers remain
|
|
243
|
+
compatible. Restarting the CLI interrupts retained queued/running records without
|
|
244
|
+
replaying work. Sibling results are not explicitly forwarded; a reused same-backend
|
|
245
|
+
lane retains its own earlier task context. Uncertain startup or cleanup retains
|
|
246
|
+
the occupied global slot until the CLI restarts. Workspace reservations apply to
|
|
214
247
|
delegation-enabled work; opted-out threads keep ordinary workspace access, so
|
|
215
248
|
use separate workspaces for independent writers. See
|
|
216
249
|
[Cross-backend Delegation](../../README.md#cross-backend-delegation) for limits,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageHandler.d.ts","sourceRoot":"","sources":["../../src/client/MessageHandler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAMpD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAgK,MAAM,UAAU,CAAC;AACzM,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAMxD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"MessageHandler.d.ts","sourceRoot":"","sources":["../../src/client/MessageHandler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAMpD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAgK,MAAM,UAAU,CAAC;AACzM,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAMxD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AA8GxD;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAkB;IAClC,OAAO,CAAC,UAAU,CAAqB;IACvC,OAAO,CAAC,aAAa,CAAgB;IACrC,OAAO,CAAC,cAAc,CAAiB;IACvC,OAAO,CAAC,MAAM,CAAgB;IAC9B,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,aAAa,C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AO,CAAC,YAAY;IAgDpB,OAAO,CAAC,YAAY;YAUN,cAAc;YAuBd,oBAAoB;IAkHlC;;OAEG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAc/B"}
|
|
@@ -29,6 +29,7 @@ const contract_1 = require("../delegation/contract");
|
|
|
29
29
|
const DelegationStatusFormatter_1 = require("../delegation/DelegationStatusFormatter");
|
|
30
30
|
const BackendCommand_1 = require("../utils/BackendCommand");
|
|
31
31
|
const ClaudeStderrFilter_1 = require("../executor/claude/ClaudeStderrFilter");
|
|
32
|
+
const ExecutionMetadata_1 = require("../executor/ExecutionMetadata");
|
|
32
33
|
const EFFORT_BACKENDS = new Set(['codex', 'agy', 'opencode', 'kimi', 'zcode', 'pi', 'dsh']);
|
|
33
34
|
const NATIVE_MODEL_LIST_BACKENDS = new Set(['codex', 'opencode', 'kimi', 'zcode', 'pi', 'dsh']);
|
|
34
35
|
const SLASH_SESSION_BACKENDS = new Set(['opencode', 'kimi', 'zcode', 'pi']);
|
|
@@ -313,6 +314,28 @@ class MessageHandler {
|
|
|
313
314
|
return;
|
|
314
315
|
}
|
|
315
316
|
// Child input belongs to the child executor, even though the parent owns the thread.
|
|
317
|
+
const addressedReply = /^(yes|no)\s+(\S+)$/i.exec(content?.trim() ?? '');
|
|
318
|
+
const addressedApproval = addressedReply ? this.pendingApprovalCards.get(addressedReply[2]) : undefined;
|
|
319
|
+
if (addressedApproval?.delegated && addressedReply) {
|
|
320
|
+
let accepted = false;
|
|
321
|
+
if (addressedApproval.request.threadId === resolvedThreadId && addressedApproval.request.openId === message.openId) {
|
|
322
|
+
const action = addressedReply[1].toLowerCase() === 'yes' ? 'approve' : 'deny';
|
|
323
|
+
try {
|
|
324
|
+
accepted = addressedApproval.executor.respondToApproval?.(addressedReply[2], action) === true;
|
|
325
|
+
}
|
|
326
|
+
catch { /* Never fall through to another executor after a targeted approval fails. */ }
|
|
327
|
+
if (accepted)
|
|
328
|
+
this.resolveApprovalCard(addressedReply[2], action === 'approve' ? 'approved' : 'denied');
|
|
329
|
+
}
|
|
330
|
+
this.sendResponse(messageId, resolvedThreadId, accepted ? { success: true, output: 'Approval response sent.' }
|
|
331
|
+
: { success: false, error: 'The addressed worker approval could not be applied. Check its request ID and owner.' });
|
|
332
|
+
return;
|
|
333
|
+
}
|
|
334
|
+
if (this.delegation.hasAmbiguousInput(resolvedThreadId)) {
|
|
335
|
+
this.sendResponse(messageId, resolvedThreadId, { success: false,
|
|
336
|
+
error: 'Multiple workers are waiting for input. Use the specific approval card or request ID; an unaddressed reply cannot be routed safely.' });
|
|
337
|
+
return;
|
|
338
|
+
}
|
|
316
339
|
const inputExecutor = this.delegation.waitingExecutor(resolvedThreadId) ?? executor;
|
|
317
340
|
if ('isWaitingInput' in inputExecutor && typeof inputExecutor.isWaitingInput === 'function') {
|
|
318
341
|
const ex = inputExecutor;
|
|
@@ -1800,6 +1823,7 @@ You can also use natural language commands to control Claude Code CLI.`,
|
|
|
1800
1823
|
this.sendStreamContext(messageId, threadId, executor);
|
|
1801
1824
|
let delegationScope;
|
|
1802
1825
|
let delegationBridge;
|
|
1826
|
+
let executionMetadata;
|
|
1803
1827
|
const complete = async (success, error) => {
|
|
1804
1828
|
delegationBridge?.activate(undefined);
|
|
1805
1829
|
const retained = !success && delegationScope && !delegationScope.isClosed()
|
|
@@ -1823,7 +1847,7 @@ You can also use natural language commands to control Claude Code CLI.`,
|
|
|
1823
1847
|
}
|
|
1824
1848
|
const responseError = fromQueue && !success
|
|
1825
1849
|
? this.pauseQueueAfterFailure(threadId, error || 'Queued command failed') : error;
|
|
1826
|
-
this.sendResponse(messageId, threadId, { success, error: responseError, threads: this.threadPool.getSummaries() });
|
|
1850
|
+
this.sendResponse(messageId, threadId, { success, error: responseError, threads: this.threadPool.getSummaries(), executionMetadata });
|
|
1827
1851
|
if (fromQueue)
|
|
1828
1852
|
console.log(`[MessageHandler] Finished queued message ${messageId} in thread ${threadId}: success=${success}, remaining=${this.threadQueues.get(threadId)?.length ?? 0}, paused=${this.pausedQueues.has(threadId)}`);
|
|
1829
1853
|
return success;
|
|
@@ -1920,7 +1944,7 @@ You can also use natural language commands to control Claude Code CLI.`,
|
|
|
1920
1944
|
this.sendStreamChunk(messageId, threadId, chunk);
|
|
1921
1945
|
},
|
|
1922
1946
|
onToolUse: (toolUse) => {
|
|
1923
|
-
if (delegationScope && /remote_cli_(list_backends|delegate|result|cancel)$/.test(toolUse.name)) {
|
|
1947
|
+
if (delegationScope && /remote_cli_(list_backends|delegate|result|cancel|integrate)$/.test(toolUse.name)) {
|
|
1924
1948
|
delegationControlTools.add(toolUse.id);
|
|
1925
1949
|
return;
|
|
1926
1950
|
}
|
|
@@ -1991,8 +2015,14 @@ You can also use natural language commands to control Claude Code CLI.`,
|
|
|
1991
2015
|
onToolResult: tool => { if (active && !scope.isClosed())
|
|
1992
2016
|
options.onToolResult?.(tool); },
|
|
1993
2017
|
} : options;
|
|
2018
|
+
const backend = this.threadPool.getBackendKey(threadId);
|
|
2019
|
+
const launchMetadata = (0, ExecutionMetadata_1.captureExecutionMetadata)(executor, backend);
|
|
2020
|
+
executionMetadata = launchMetadata;
|
|
2021
|
+
let capturedMetadata = false;
|
|
1994
2022
|
try {
|
|
1995
2023
|
const result = await executor.execute(prompt, guardedOptions);
|
|
2024
|
+
executionMetadata = (0, ExecutionMetadata_1.mergeReportedExecutionMetadata)(launchMetadata, (0, ExecutionMetadata_1.captureExecutionMetadata)(executor, backend));
|
|
2025
|
+
capturedMetadata = true;
|
|
1996
2026
|
active = false;
|
|
1997
2027
|
delegationBridge?.activate(undefined);
|
|
1998
2028
|
assertCoordinatorActive();
|
|
@@ -2007,6 +2037,8 @@ You can also use natural language commands to control Claude Code CLI.`,
|
|
|
2007
2037
|
return result;
|
|
2008
2038
|
}
|
|
2009
2039
|
finally {
|
|
2040
|
+
if (!capturedMetadata)
|
|
2041
|
+
executionMetadata = (0, ExecutionMetadata_1.mergeReportedExecutionMetadata)(launchMetadata, (0, ExecutionMetadata_1.captureExecutionMetadata)(executor, backend));
|
|
2010
2042
|
active = false;
|
|
2011
2043
|
delegationBridge?.activate(undefined);
|
|
2012
2044
|
if (!finished)
|
|
@@ -2121,7 +2153,8 @@ You can also use natural language commands to control Claude Code CLI.`,
|
|
|
2121
2153
|
const description = request.approval.description;
|
|
2122
2154
|
const longest = (description.match(/`+/g) ?? []).reduce((length, run) => Math.max(length, run.length), 2);
|
|
2123
2155
|
const fence = '`'.repeat(longest + 1);
|
|
2124
|
-
this.sendStreamChunk(request.taskMessageId, request.threadId, `\nš **Approval required**\n\n${fence}\n${description}\n${fence}\n\nReply yes, no${request.approval.canRemember ? ', or remember to save these directories' : ''}
|
|
2156
|
+
this.sendStreamChunk(request.taskMessageId, request.threadId, `\nš **Approval required**\n\n${fence}\n${description}\n${fence}\n\nReply yes, no${request.approval.canRemember ? ', or remember to save these directories' : ''}.${pending.delegated
|
|
2157
|
+
? ` To address this worker explicitly, reply yes ${requestId} or no ${requestId}.` : ''}\n`);
|
|
2125
2158
|
}
|
|
2126
2159
|
resolveApprovalCard(requestId, status) {
|
|
2127
2160
|
const pending = this.pendingApprovalCards.get(requestId);
|
|
@@ -2327,6 +2360,7 @@ You can also use natural language commands to control Claude Code CLI.`,
|
|
|
2327
2360
|
threadId,
|
|
2328
2361
|
threads: result.threads,
|
|
2329
2362
|
queueConfirmation: result.queueConfirmation,
|
|
2363
|
+
...(result.executionMetadata ? { executionMetadata: result.executionMetadata } : {}),
|
|
2330
2364
|
cwd,
|
|
2331
2365
|
timestamp: Date.now(),
|
|
2332
2366
|
});
|