very-happy-cli 0.2.158 → 0.2.159
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/{AcpBackend-DIDRig5G.cjs → AcpBackend-DUYFlyfN.cjs} +2 -2
- package/dist/{AcpBackend-vDVLHuYJ.mjs → AcpBackend-VsfkZiVF.mjs} +2 -2
- package/dist/{AcpSessionManager-C44U99CC.cjs → AcpSessionManager-Bdv8LWXh.cjs} +1 -1
- package/dist/{AcpSessionManager-CmRjfhn3.mjs → AcpSessionManager-rYtVb0kN.mjs} +1 -1
- package/dist/{agentGuidance-DwOWbX55.cjs → agentGuidance-BRDN1NoZ.cjs} +1 -1
- package/dist/{agentGuidance-CrR9l62U.mjs → agentGuidance-KgvYuF3R.mjs} +1 -1
- package/dist/{agentHome-Dw8Jx_CJ.cjs → agentHome-CHh4lmjM.cjs} +2 -2
- package/dist/{agentHome-CyLmGH5L.mjs → agentHome-CvsJyeQB.mjs} +2 -2
- package/dist/{auto-DZbNcTXx.cjs → auto-DKmEls8Z.cjs} +6 -6
- package/dist/{auto-BlMZPwOk.mjs → auto-nb8GhRRy.mjs} +6 -6
- package/dist/codex/happyMcpStdioBridge.cjs +2 -2
- package/dist/codex/happyMcpStdioBridge.mjs +2 -2
- package/dist/{config-BtPArqRH.mjs → config-ClLtM6F3.mjs} +4 -4
- package/dist/{config-DG84bjwF.cjs → config-DLx-vW3I.cjs} +4 -4
- package/dist/{index-ZChGsuB7.mjs → index-2mCaeKyf.mjs} +19 -9
- package/dist/{index-DPCsWlWK.cjs → index-BEOMECtE.cjs} +18 -8
- package/dist/{index-CVCt3kSt.mjs → index-BF6WfgV5.mjs} +62 -29
- package/dist/{index-DgO0FHOx.mjs → index-C-JazrMB.mjs} +4 -4
- package/dist/{index-D5ScEErM.cjs → index-blDSadUR.cjs} +4 -4
- package/dist/{index-BG932eCh.cjs → index-rH3DrQ5B.cjs} +66 -33
- package/dist/index.cjs +4 -4
- package/dist/index.mjs +4 -4
- package/dist/{install-wKQGgXvN.cjs → install-BOHrUaFM.cjs} +1 -1
- package/dist/{install-DarS_Wco.mjs → install-BPhJppvd.mjs} +1 -1
- package/dist/{installTerminalHooks-DcQfee_O.cjs → installTerminalHooks-Cou3WUf3.cjs} +4 -4
- package/dist/{installTerminalHooks-CpNbRFPz.mjs → installTerminalHooks-WeznjkuC.mjs} +4 -4
- package/dist/lib.cjs +2 -2
- package/dist/lib.d.cts +114 -0
- package/dist/lib.d.mts +114 -0
- package/dist/lib.mjs +2 -2
- package/dist/{limits-kqFqhfsh.cjs → limits-BH5CV5vR.cjs} +38 -7
- package/dist/{limits-D2uN090G.mjs → limits-CjRj8IX5.mjs} +38 -8
- package/dist/{mcp-DGdeUUDJ.cjs → mcp-CPYbtsYG.cjs} +4 -4
- package/dist/{mcp-BN6bKIGb.mjs → mcp-Dy3f_K0h.mjs} +4 -4
- package/dist/{piRuntime-3qtbKujX.cjs → piRuntime-NtF0YqjH.cjs} +2 -2
- package/dist/{piRuntime-bkw2NAZU.mjs → piRuntime-kLZNpAAl.mjs} +2 -2
- package/dist/{piTerminal-BYxp3LMr.cjs → piTerminal-9J0GAKzb.cjs} +6 -6
- package/dist/{piTerminal-DilKwM7B.mjs → piTerminal-B0fEOV_2.mjs} +6 -6
- package/dist/{runGemini-Cjii069p.mjs → runGemini-DV6Ouadt.mjs} +6 -6
- package/dist/{runGemini-28O2sqyI.cjs → runGemini-F-mqx3_K.cjs} +6 -6
- package/dist/{runOpenClaw-jaLr7KF1.mjs → runOpenClaw-D7MlPS5n.mjs} +5 -5
- package/dist/{runOpenClaw-CiMZad-H.cjs → runOpenClaw-Qqo9j63M.cjs} +5 -5
- package/dist/{send-D5ejHPXG.cjs → send-4qJTCAYW.cjs} +2 -2
- package/dist/{send-C9mOtChi.mjs → send-CLhYXNgy.mjs} +2 -2
- package/dist/{sessions-BNMPQoLE.cjs → sessions-Bh1pyddi.cjs} +2 -2
- package/dist/{sessions-W6771g3X.mjs → sessions-CzIH2rGp.mjs} +2 -2
- package/dist/{spawn-D0QVhzRb.mjs → spawn-CPIWlPOM.mjs} +4 -4
- package/dist/{spawn-Ddtom1cb.cjs → spawn-CmFOSVdW.cjs} +4 -4
- package/dist/{teams-BZ1tayg_.cjs → teams-CB1R9-Z9.cjs} +5 -5
- package/dist/{teams-CqSwtw2O.mjs → teams-CEahj4cm.mjs} +5 -5
- package/dist/{todo-BbusB1zM.mjs → todo-Cknp5D4U.mjs} +2 -2
- package/dist/{todo-BYMg0fR0.cjs → todo-DqyRI4wP.cjs} +2 -2
- package/dist/{types-DnrPeN80.cjs → types-BbvK1Tr_.cjs} +191 -1
- package/dist/{types-DIBF4U0Y.mjs → types-Dh-s4Lqs.mjs} +191 -1
- package/package.json +7 -7
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(import.meta.url);import chalk from 'chalk';
|
|
2
2
|
import os, { homedir, hostname, userInfo, tmpdir } from 'node:os';
|
|
3
3
|
import { randomUUID, randomInt, randomBytes, createHash as createHash$1, timingSafeEqual } from 'node:crypto';
|
|
4
|
-
import { g as getProjectPath, k as initializeSandbox, w as wrapCommand, j as contentLogMetadata, I as InvalidateSync, R as RawJSONLinesSchema, l as AsyncLock, M as MAX_CHAT_ATTACHMENT_SOURCE_BYTES, m as commandOnPath, n as deriveLocalCliUpdateSummary, o as isClaudeSessionId, q as getLocalHappyAgentCredentialPath, s as readLocalHappyAgentCredentials, t as parseExactVersion, u as compareExactVersions, v as extractCompleteLines, x as decideBackfill, y as parseTerminalHookPayload, z as tmuxArgs, B as scrubTmuxClientEnv, D as decideMirrorBinding, E as MIRROR_BACKFILL_LINES_DEFAULT, G as mirrorLineKey, H as mirrorLocalId, J as detectCLIAvailability, K as detectResumeSupport, L as refreshAgentHomes, d as describeAgentHome, T as TurnActivityTracker, N as summarizeSpawnSessionForLog, O as locateClaudeConversation, P as agentHomeSpawnEnv, Q as shellescape, A as ApiClient, S as fetchCliUpdateState, U as resolveCliUpdateCheckInterval, V as DEFAULT_CLI_UPDATE_CHECK_INTERVAL_MS, W as listVhTerminals, X as readVhTerminal, Y as sendToVhTerminal, Z as TITLE_PROMPT_PREFIX, _ as BOARD_ANALYZER_PROMPT_PREFIX, h as connectionState, $ as startOfflineReconnection, C as CodexAppServerClient } from './types-
|
|
5
|
-
import { l as logger,
|
|
4
|
+
import { g as getProjectPath, k as initializeSandbox, w as wrapCommand, j as contentLogMetadata, I as InvalidateSync, R as RawJSONLinesSchema, l as AsyncLock, M as MAX_CHAT_ATTACHMENT_SOURCE_BYTES, m as commandOnPath, n as deriveLocalCliUpdateSummary, o as isClaudeSessionId, q as getLocalHappyAgentCredentialPath, s as readLocalHappyAgentCredentials, t as parseExactVersion, u as compareExactVersions, v as extractCompleteLines, x as decideBackfill, y as parseTerminalHookPayload, z as tmuxArgs, B as scrubTmuxClientEnv, D as decideMirrorBinding, E as MIRROR_BACKFILL_LINES_DEFAULT, G as mirrorLineKey, H as mirrorLocalId, J as detectCLIAvailability, K as detectResumeSupport, L as refreshAgentHomes, d as describeAgentHome, T as TurnActivityTracker, N as summarizeSpawnSessionForLog, O as locateClaudeConversation, P as agentHomeSpawnEnv, Q as shellescape, A as ApiClient, S as fetchCliUpdateState, U as resolveCliUpdateCheckInterval, V as DEFAULT_CLI_UPDATE_CHECK_INTERVAL_MS, W as listVhTerminals, X as readVhTerminal, Y as sendToVhTerminal, Z as TITLE_PROMPT_PREFIX, _ as BOARD_ANALYZER_PROMPT_PREFIX, h as connectionState, $ as startOfflineReconnection, C as CodexAppServerClient } from './types-Dh-s4Lqs.mjs';
|
|
5
|
+
import { l as logger, ab as sameBackgroundTasks, ac as notifyDaemonSessionEvent, x as BUILTIN_TODO_DISCOVERY, g as delay, ad as STREAM_DELTA_MAX_CHARS, ae as ensurePrivateDirectory, af as hardenPrivateFile, c as configuration, ag as notifyDaemonClaudeAuthFailed, ah as createBackgroundTaskTracker, F as packageJson, r as readSettings, ai as readCredentials, a1 as credentialRelayProblem, k as checkIfDaemonRunningAndCleanupStaleState, aj as readDaemonState, ak as AGENT_VERSION_SOURCES, w as encodeBase64, al as readSettingsOutcome, u as updateSettings, am as encodeBase64Url, M as decodeBase64, an as writeCredentialsLegacy, ao as writeCredentialsDataKey, ap as BACKGROUND_TASK_DESCRIPTION_MAX, aq as BACKGROUND_TASKS_MAX, d as readPersistedSessions, E as writePrivateFileSync, ar as decryptWithDataKey, as as decryptLegacy, at as persistSession, z as ensurePrivateDirectorySync, au as getAgentCodeDefaults, av as normalizeAgentKey, aw as isClaudeOpus55Model, ax as supportsClaudeOpus55, ay as AUTOMATION_SUMMARY_MAX_CHARS, az as AUTOMATION_CLAIM_MAX_RUNS, aA as AUTOMATION_DEFAULT_LEASE_MS, f as isAutomationRunTerminal, aB as isDaemonRunningCurrentlyInstalledHappyVersion, aC as stopDaemon, aD as acquireDaemonLock, aE as BackgroundTaskTracker, aF as deletePersistedSessions, N as decrypt, aG as writeDaemonState, aH as writeSettings, aI as cleanupDaemonState, aJ as releaseDaemonLock, i as isValidSessionId, m as spawnDaemonSession, a5 as isValidTerminalId, aK as ContextUsageSchema, C as CLIPBOARD_TOOL_NAME, a as CLIPBOARD_TOOL_TITLE, b as CLIPBOARD_TOOL_DESCRIPTION, o as CLIPBOARD_MAX_BYTES, P as PROMPT_QUEUE_CAPABILITY, v as notifyDaemonSessionStarted, y as reportSessionEditToDaemon, aL as clearCredentials, aM as clearMachineId, h as readCredentialsForConfiguredRelay, aN as SandboxConfigSchema, e as createEnvelope, O as listDaemonSessions, n as stopDaemonSession, aO as getLatestDaemonLog } from './limits-CjRj8IX5.mjs';
|
|
6
6
|
import spawn$1, { spawn } from 'cross-spawn';
|
|
7
7
|
import path, { join, resolve, basename, delimiter, isAbsolute, dirname, sep, normalize } from 'node:path';
|
|
8
8
|
import { createInterface } from 'node:readline';
|
|
9
9
|
import { existsSync, readFileSync, readdirSync, statSync, mkdirSync, realpathSync, unlinkSync, renameSync, writeFileSync, accessSync, constants as constants$1, openSync, fsyncSync, closeSync, rmSync as rmSync$1, chmodSync as chmodSync$1 } from 'node:fs';
|
|
10
10
|
import { p as projectPath } from './terminalTitleSuggest-DKgX3osW.mjs';
|
|
11
|
-
import { K as trimIdent, L as AGENT_GUIDANCE, N as formatEditConflictNotice, H as sendUserMessage, S as SESSION_PEER_SENT_FROM, F as readSessionMetadata, R as RemoteCallBudget, O as REMOTE_WRITE_CALLS_PER_MINUTE, s as sendPeerMessage, j as listPeerSessions, u as deliverToSession, k as readSessionTranscript, l as listAccountSessions, g as listSessions, Q as guardRemoteSessionOpsRequest, U as remoteError, V as REMOTE_OP_DEADLINE_MS, W as formatRemoteAuditLine, X as REMOTE_SEND_COMMIT_DEADLINE_MS, Y as REMOTE_RESUME_WAIT_MS, Z as CLI_PEER_SENDER_ID, M as MAX_READ_LIMIT, _ as capRemoteTranscript, $ as capRemoteText, x as sessionWebUrl, a0 as REMOTE_ANSWER_MAX_BYTES, a1 as REMOTE_TITLE_MAX_BYTES, G as waitForSessionKey, q as archiveSession, a2 as createAutomationsClient, A as isAutomationsUnavailable, a3 as AutomationsRequestError, a4 as analyzeLatestTurn, a5 as readSessionLog$1, a6 as TURN_WINDOW, a7 as userPromptText, E as teamScopePath, a8 as TeamConnectionPreflightError, J as createTeamsClient, n as readRemoteTranscript, v as sendRemoteMessage, a9 as RemoteSessionOpsError, o as stopSession, P as PREVIEW_TOOL_NAME, aa as REPORT_PROGRESS_TOOL_NAME, ab as TEAM_TOOL_NAMES, ac as AUTOMATION_TOOL_NAMES, ad as SESSION_PEER_TOOL_NAMES, r as registerTeamsTools, c as registerAutomationTools, d as registerSessionPeerTools, ae as createSessionPeerToolExecutor, a as PREVIEW_TOOL_TITLE, b as PREVIEW_TOOL_DESCRIPTION, af as REPORT_PROGRESS_TOOL_TITLE, ag as REPORT_PROGRESS_TOOL_DESCRIPTION } from './agentGuidance-
|
|
11
|
+
import { K as trimIdent, L as AGENT_GUIDANCE, N as formatEditConflictNotice, H as sendUserMessage, S as SESSION_PEER_SENT_FROM, F as readSessionMetadata, R as RemoteCallBudget, O as REMOTE_WRITE_CALLS_PER_MINUTE, s as sendPeerMessage, j as listPeerSessions, u as deliverToSession, k as readSessionTranscript, l as listAccountSessions, g as listSessions, Q as guardRemoteSessionOpsRequest, U as remoteError, V as REMOTE_OP_DEADLINE_MS, W as formatRemoteAuditLine, X as REMOTE_SEND_COMMIT_DEADLINE_MS, Y as REMOTE_RESUME_WAIT_MS, Z as CLI_PEER_SENDER_ID, M as MAX_READ_LIMIT, _ as capRemoteTranscript, $ as capRemoteText, x as sessionWebUrl, a0 as REMOTE_ANSWER_MAX_BYTES, a1 as REMOTE_TITLE_MAX_BYTES, G as waitForSessionKey, q as archiveSession, a2 as createAutomationsClient, A as isAutomationsUnavailable, a3 as AutomationsRequestError, a4 as analyzeLatestTurn, a5 as readSessionLog$1, a6 as TURN_WINDOW, a7 as userPromptText, E as teamScopePath, a8 as TeamConnectionPreflightError, J as createTeamsClient, n as readRemoteTranscript, v as sendRemoteMessage, a9 as RemoteSessionOpsError, o as stopSession, P as PREVIEW_TOOL_NAME, aa as REPORT_PROGRESS_TOOL_NAME, ab as TEAM_TOOL_NAMES, ac as AUTOMATION_TOOL_NAMES, ad as SESSION_PEER_TOOL_NAMES, r as registerTeamsTools, c as registerAutomationTools, d as registerSessionPeerTools, ae as createSessionPeerToolExecutor, a as PREVIEW_TOOL_TITLE, b as PREVIEW_TOOL_DESCRIPTION, af as REPORT_PROGRESS_TOOL_TITLE, ag as REPORT_PROGRESS_TOOL_DESCRIPTION } from './agentGuidance-KgvYuF3R.mjs';
|
|
12
12
|
import { readFile, writeFile, rename, unlink, mkdir, access as access$1, symlink, rm, readlink, lstat, constants, stat, open as open$1, appendFile } from 'node:fs/promises';
|
|
13
13
|
import fs, { watch, access } from 'fs/promises';
|
|
14
14
|
import { useStdout, useInput, Box, Text, render } from 'ink';
|
|
@@ -4314,7 +4314,7 @@ async function claudeRemoteLauncher(session, onPermissionModeChange, onEffective
|
|
|
4314
4314
|
closeFailed: (error) => session.client.closeClaudeSessionTurn("failed", { error }),
|
|
4315
4315
|
onFailed: (error) => session.onSessionError(error),
|
|
4316
4316
|
onCompleted: () => {
|
|
4317
|
-
const idle = !modeGate.hasParked && session.queue.size() === 0;
|
|
4317
|
+
const idle = !modeGate.hasParked && session.queue.size() === 0 && !session.client.promptQueueHasPending();
|
|
4318
4318
|
session.onTurnEnd(idle);
|
|
4319
4319
|
if (idle) {
|
|
4320
4320
|
session.api.push().sendSessionNotification({
|
|
@@ -4470,6 +4470,12 @@ class MessageQueue2 {
|
|
|
4470
4470
|
* so the web stops painting a silently-lost message as "queued".
|
|
4471
4471
|
*/
|
|
4472
4472
|
onDiscardHandler = null;
|
|
4473
|
+
/**
|
|
4474
|
+
* B-509: fired when a consumer starts waiting on an EMPTY queue — the
|
|
4475
|
+
* runner has finished its turn and has nothing to run. The server-side
|
|
4476
|
+
* prompt queue drain uses it as its "idle" edge (utils/promptQueueDrain.ts).
|
|
4477
|
+
*/
|
|
4478
|
+
onWaitHandler = null;
|
|
4473
4479
|
modeHasher;
|
|
4474
4480
|
constructor(modeHasher, onMessageHandler = null, onDiscardHandler = null) {
|
|
4475
4481
|
this.modeHasher = modeHasher;
|
|
@@ -4490,6 +4496,14 @@ class MessageQueue2 {
|
|
|
4490
4496
|
setOnDiscard(handler) {
|
|
4491
4497
|
this.onDiscardHandler = handler;
|
|
4492
4498
|
}
|
|
4499
|
+
/** B-509: observe the consumer blocking on an empty queue. */
|
|
4500
|
+
setOnWait(handler) {
|
|
4501
|
+
this.onWaitHandler = handler;
|
|
4502
|
+
}
|
|
4503
|
+
/** B-509: true while a consumer is blocked waiting for the next message. */
|
|
4504
|
+
isWaiting() {
|
|
4505
|
+
return this.waiter !== null;
|
|
4506
|
+
}
|
|
4493
4507
|
/** Report the current items as destroyed for `reason` (caller clears next). */
|
|
4494
4508
|
notifyDiscard(reason) {
|
|
4495
4509
|
if (this.queue.length === 0) return;
|
|
@@ -4750,6 +4764,7 @@ class MessageQueue2 {
|
|
|
4750
4764
|
}
|
|
4751
4765
|
this.waiter = waiterFunc;
|
|
4752
4766
|
logger.debug("[MessageQueue2] Waiting for messages...");
|
|
4767
|
+
this.onWaitHandler?.();
|
|
4753
4768
|
});
|
|
4754
4769
|
}
|
|
4755
4770
|
}
|
|
@@ -4890,6 +4905,7 @@ function createSessionMetadata(opts) {
|
|
|
4890
4905
|
dangerouslySkipPermissions: opts.dangerouslySkipPermissions ?? null,
|
|
4891
4906
|
...opts.parentSessionId ? { parentSessionId: opts.parentSessionId } : {},
|
|
4892
4907
|
...opts.forkedFromMessageId ? { forkedFromMessageId: opts.forkedFromMessageId } : {},
|
|
4908
|
+
...opts.capabilities ? { capabilities: [...opts.capabilities] } : {},
|
|
4893
4909
|
// B-091/B-303: dispatched sessions carry their spawn origin as a tag
|
|
4894
4910
|
// from birth (see spawnOriginTags) — applies to every flavor the daemon
|
|
4895
4911
|
// can spawn, since HAPPY_SPAWNED_BY is exported flavor-independently.
|
|
@@ -5402,8 +5418,8 @@ ${typeLabels[type] || type}:`));
|
|
|
5402
5418
|
}
|
|
5403
5419
|
console.log(chalk.gray(" An external claude command is only needed for native terminal/mirror use."));
|
|
5404
5420
|
try {
|
|
5405
|
-
const { resolveAgentHomesForCli } = await import('./agentHome-
|
|
5406
|
-
const { describeAgentHome } = await import('./types-
|
|
5421
|
+
const { resolveAgentHomesForCli } = await import('./agentHome-CvsJyeQB.mjs');
|
|
5422
|
+
const { describeAgentHome } = await import('./types-Dh-s4Lqs.mjs').then(function (n) { return n.a0; });
|
|
5407
5423
|
const homes = await resolveAgentHomesForCli();
|
|
5408
5424
|
console.log(chalk.green(`\u2713 Claude config dir: ${describeAgentHome(homes.claudeConfigDir)}`));
|
|
5409
5425
|
console.log(chalk.green(`\u2713 Codex home: ${describeAgentHome(homes.codexHome)}`));
|
|
@@ -13482,7 +13498,7 @@ function registerSideQuestionHandler(rpc, deps) {
|
|
|
13482
13498
|
const retainMs = deps.retainMs ?? SIDE_QUESTION_RETAIN_MS;
|
|
13483
13499
|
const maxRunMs = deps.maxRunMs ?? SIDE_QUESTION_MAX_RUN_MS;
|
|
13484
13500
|
const fork = deps.run ?? (async (input) => {
|
|
13485
|
-
const { query } = await import('./index-
|
|
13501
|
+
const { query } = await import('./index-C-JazrMB.mjs');
|
|
13486
13502
|
return runSideQuestion(query, input);
|
|
13487
13503
|
});
|
|
13488
13504
|
const run = async (input, live) => {
|
|
@@ -14068,7 +14084,7 @@ async function runClaude(credentials, options = {}) {
|
|
|
14068
14084
|
// a brand-new session cannot pick a PDF until after sending once.
|
|
14069
14085
|
attachmentKinds: [...CLAUDE_ATTACHMENT_KINDS],
|
|
14070
14086
|
queueCancellation: true,
|
|
14071
|
-
capabilities: ["claude-steer-v1", "claude-live-permission-v1", "claude-live-permission-v2", "claude-btw-v1", "claude-runtime-controls-v1", "claude-opus-5-5-v1"],
|
|
14087
|
+
capabilities: ["claude-steer-v1", "claude-live-permission-v1", "claude-live-permission-v2", "claude-btw-v1", "claude-runtime-controls-v1", "claude-opus-5-5-v1", PROMPT_QUEUE_CAPABILITY],
|
|
14072
14088
|
// Effective mode this process enforces. Kept current by
|
|
14073
14089
|
// publishPermissionMode below; the web renders it instead of guessing.
|
|
14074
14090
|
permissionMode: mapToClaudeMode(initialPermissionMode ?? "default"),
|
|
@@ -14324,6 +14340,10 @@ async function runClaude(credentials, options = {}) {
|
|
|
14324
14340
|
controlledByUser: options.startingMode !== "remote"
|
|
14325
14341
|
}));
|
|
14326
14342
|
const messageQueue = new MessageQueue2(claudeModeHash);
|
|
14343
|
+
const promptQueueDrain = session.attachPromptQueueDrain({
|
|
14344
|
+
isIdle: () => messageQueue.size() === 0 && messageQueue.isWaiting()
|
|
14345
|
+
});
|
|
14346
|
+
messageQueue.setOnWait(() => promptQueueDrain.onIdle());
|
|
14327
14347
|
messageQueue.setOnDiscard((entries) => {
|
|
14328
14348
|
const byReason = /* @__PURE__ */ new Map();
|
|
14329
14349
|
for (const entry of entries) {
|
|
@@ -14627,6 +14647,7 @@ async function runClaude(credentials, options = {}) {
|
|
|
14627
14647
|
return;
|
|
14628
14648
|
}
|
|
14629
14649
|
logger.debug(`[START] Received termination signal, cleaning up (archive=${intent === "archive"})...`);
|
|
14650
|
+
promptQueueDrain.close();
|
|
14630
14651
|
try {
|
|
14631
14652
|
if (session) {
|
|
14632
14653
|
currentSession?.cleanup();
|
|
@@ -17888,7 +17909,8 @@ async function runCodex(opts) {
|
|
|
17888
17909
|
sandbox: sandboxConfig,
|
|
17889
17910
|
dangerouslySkipPermissions: initialPermissionMode === "yolo" || initialPermissionMode === "bypassPermissions",
|
|
17890
17911
|
...forkedFromSessionId ? { parentSessionId: forkedFromSessionId } : {},
|
|
17891
|
-
...forkedFromMessageId ? { forkedFromMessageId } : {}
|
|
17912
|
+
...forkedFromMessageId ? { forkedFromMessageId } : {},
|
|
17913
|
+
capabilities: [PROMPT_QUEUE_CAPABILITY]
|
|
17892
17914
|
});
|
|
17893
17915
|
metadata.attachmentKinds = [...CLAUDE_ATTACHMENT_KINDS];
|
|
17894
17916
|
const importCodexThreadId = process.env[IMPORT_CODEX_THREAD_ENV];
|
|
@@ -17955,6 +17977,7 @@ async function runCodex(opts) {
|
|
|
17955
17977
|
if (permissionHandler) {
|
|
17956
17978
|
permissionHandler.updateSession(newSession);
|
|
17957
17979
|
}
|
|
17980
|
+
attachPromptQueueDrain(newSession);
|
|
17958
17981
|
}
|
|
17959
17982
|
});
|
|
17960
17983
|
session = initialSession;
|
|
@@ -17984,6 +18007,13 @@ async function runCodex(opts) {
|
|
|
17984
18007
|
}
|
|
17985
18008
|
}
|
|
17986
18009
|
const messageQueue = new MessageQueue2(hashCodexEnhancedMode);
|
|
18010
|
+
function attachPromptQueueDrain(client2) {
|
|
18011
|
+
const drain = client2.attachPromptQueueDrain({
|
|
18012
|
+
isIdle: () => messageQueue.size() === 0 && messageQueue.isWaiting()
|
|
18013
|
+
});
|
|
18014
|
+
messageQueue.setOnWait(() => drain.onIdle());
|
|
18015
|
+
}
|
|
18016
|
+
attachPromptQueueDrain(session);
|
|
17987
18017
|
messageQueue.setOnDiscard((entries) => {
|
|
17988
18018
|
const keys = entries.map((entry) => entry.sourceId).filter((key) => typeof key === "string");
|
|
17989
18019
|
if (keys.length > 0) session.sendQueueCancelReason(keys, entries[0].reason);
|
|
@@ -18489,7 +18519,8 @@ async function runCodex(opts) {
|
|
|
18489
18519
|
});
|
|
18490
18520
|
emitReadyIfIdle({
|
|
18491
18521
|
pending,
|
|
18492
|
-
|
|
18522
|
+
// B-509: server-queued prompts count as pending input (no ready/push per item).
|
|
18523
|
+
queueSize: () => messageQueue.size() + (session.promptQueueHasPending() ? 1 : 0),
|
|
18493
18524
|
shouldExit,
|
|
18494
18525
|
sendReady
|
|
18495
18526
|
});
|
|
@@ -18567,7 +18598,8 @@ async function runCodex(opts) {
|
|
|
18567
18598
|
session.keepAlive(thinking, "remote");
|
|
18568
18599
|
emitReadyIfIdle({
|
|
18569
18600
|
pending,
|
|
18570
|
-
|
|
18601
|
+
// B-509: server-queued prompts count as pending input (no ready/push per item).
|
|
18602
|
+
queueSize: () => messageQueue.size() + (session.promptQueueHasPending() ? 1 : 0),
|
|
18571
18603
|
shouldExit,
|
|
18572
18604
|
sendReady
|
|
18573
18605
|
});
|
|
@@ -18578,6 +18610,7 @@ async function runCodex(opts) {
|
|
|
18578
18610
|
}
|
|
18579
18611
|
} finally {
|
|
18580
18612
|
disposeTermination?.();
|
|
18613
|
+
session.closePromptQueueDrain();
|
|
18581
18614
|
logger.debug("[codex]: Final cleanup start");
|
|
18582
18615
|
logActiveHandles("cleanup-start");
|
|
18583
18616
|
if (reconnectionHandle) {
|
|
@@ -18790,7 +18823,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
18790
18823
|
return;
|
|
18791
18824
|
} else if (subcommand === "install-terminal-hooks") {
|
|
18792
18825
|
try {
|
|
18793
|
-
const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await import('./installTerminalHooks-
|
|
18826
|
+
const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await import('./installTerminalHooks-WeznjkuC.mjs');
|
|
18794
18827
|
const command = parseTerminalHooksArgs(args.slice(1));
|
|
18795
18828
|
if (command.action === "help") {
|
|
18796
18829
|
console.log(TERMINAL_HOOKS_HELP);
|
|
@@ -18807,7 +18840,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
18807
18840
|
}
|
|
18808
18841
|
} else if (subcommand === "agent-home") {
|
|
18809
18842
|
try {
|
|
18810
|
-
const { parseAgentHomeArgs, runAgentHomeCommand } = await import('./agentHome-
|
|
18843
|
+
const { parseAgentHomeArgs, runAgentHomeCommand } = await import('./agentHome-CvsJyeQB.mjs');
|
|
18811
18844
|
await runAgentHomeCommand(parseAgentHomeArgs(args.slice(1)));
|
|
18812
18845
|
process.exit(0);
|
|
18813
18846
|
} catch (error) {
|
|
@@ -18816,7 +18849,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
18816
18849
|
}
|
|
18817
18850
|
} else if (subcommand === "spawn") {
|
|
18818
18851
|
try {
|
|
18819
|
-
const { handleSpawnCommand } = await import('./spawn-
|
|
18852
|
+
const { handleSpawnCommand } = await import('./spawn-CPIWlPOM.mjs');
|
|
18820
18853
|
await handleSpawnCommand(args.slice(1));
|
|
18821
18854
|
} catch (error) {
|
|
18822
18855
|
console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
|
|
@@ -18828,7 +18861,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
18828
18861
|
return;
|
|
18829
18862
|
} else if (subcommand === "sessions") {
|
|
18830
18863
|
try {
|
|
18831
|
-
const { handleSessionsCommand } = await import('./sessions-
|
|
18864
|
+
const { handleSessionsCommand } = await import('./sessions-CzIH2rGp.mjs');
|
|
18832
18865
|
await handleSessionsCommand(args.slice(1));
|
|
18833
18866
|
} catch (error) {
|
|
18834
18867
|
console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
|
|
@@ -18840,7 +18873,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
18840
18873
|
return;
|
|
18841
18874
|
} else if (subcommand === "send") {
|
|
18842
18875
|
try {
|
|
18843
|
-
const { handleSendCommand } = await import('./send-
|
|
18876
|
+
const { handleSendCommand } = await import('./send-CLhYXNgy.mjs');
|
|
18844
18877
|
await handleSendCommand(args.slice(1));
|
|
18845
18878
|
} catch (error) {
|
|
18846
18879
|
console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
|
|
@@ -18946,9 +18979,9 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
18946
18979
|
if (geminiSubcommand === "project" && args[2] === "set" && args[3]) {
|
|
18947
18980
|
const projectId = args[3];
|
|
18948
18981
|
try {
|
|
18949
|
-
const { saveGoogleCloudProjectToConfig } = await import('./config-
|
|
18950
|
-
const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await import('./limits-
|
|
18951
|
-
const { ApiClient: ApiClient2 } = await import('./types-
|
|
18982
|
+
const { saveGoogleCloudProjectToConfig } = await import('./config-ClLtM6F3.mjs');
|
|
18983
|
+
const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await import('./limits-CjRj8IX5.mjs').then(function (n) { return n.aP; });
|
|
18984
|
+
const { ApiClient: ApiClient2 } = await import('./types-Dh-s4Lqs.mjs').then(function (n) { return n.a1; });
|
|
18952
18985
|
let userEmail = void 0;
|
|
18953
18986
|
try {
|
|
18954
18987
|
const credentials = await readCredentialsForConfiguredRelay2();
|
|
@@ -18979,7 +19012,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
18979
19012
|
}
|
|
18980
19013
|
if (geminiSubcommand === "project" && args[2] === "get") {
|
|
18981
19014
|
try {
|
|
18982
|
-
const { readGeminiLocalConfig } = await import('./config-
|
|
19015
|
+
const { readGeminiLocalConfig } = await import('./config-ClLtM6F3.mjs');
|
|
18983
19016
|
const config = readGeminiLocalConfig();
|
|
18984
19017
|
if (config.googleCloudProject) {
|
|
18985
19018
|
console.log(`Current Google Cloud Project: ${config.googleCloudProject}`);
|
|
@@ -19019,7 +19052,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
19019
19052
|
process.exit(0);
|
|
19020
19053
|
}
|
|
19021
19054
|
try {
|
|
19022
|
-
const { runGemini } = await import('./runGemini-
|
|
19055
|
+
const { runGemini } = await import('./runGemini-DV6Ouadt.mjs');
|
|
19023
19056
|
let startedBy = void 0;
|
|
19024
19057
|
for (let i = 1; i < args.length; i++) {
|
|
19025
19058
|
if (args[i] === "--started-by") {
|
|
@@ -19042,7 +19075,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
19042
19075
|
} else if (subcommand === "pi") {
|
|
19043
19076
|
if (args[1] === "--terminal") {
|
|
19044
19077
|
try {
|
|
19045
|
-
const { runPiTerminal } = await import('./piTerminal-
|
|
19078
|
+
const { runPiTerminal } = await import('./piTerminal-B0fEOV_2.mjs');
|
|
19046
19079
|
process.exitCode = await runPiTerminal(args.slice(2));
|
|
19047
19080
|
} catch (error) {
|
|
19048
19081
|
console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
|
|
@@ -19059,7 +19092,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
19059
19092
|
}
|
|
19060
19093
|
};
|
|
19061
19094
|
try {
|
|
19062
|
-
const { runAcp, resolveAcpAgentConfig } = await import('./index-
|
|
19095
|
+
const { runAcp, resolveAcpAgentConfig } = await import('./index-2mCaeKyf.mjs');
|
|
19063
19096
|
const parsed = parsePiRunnerArgs(args.slice(1));
|
|
19064
19097
|
const resolved = resolveAcpAgentConfig(["pi", ...parsed.passthrough]);
|
|
19065
19098
|
const { credentials } = await authAndSetupMachineIfNeeded();
|
|
@@ -19087,7 +19120,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
19087
19120
|
return;
|
|
19088
19121
|
} else if (subcommand === "acp") {
|
|
19089
19122
|
try {
|
|
19090
|
-
const { runAcp, resolveAcpAgentConfig } = await import('./index-
|
|
19123
|
+
const { runAcp, resolveAcpAgentConfig } = await import('./index-2mCaeKyf.mjs');
|
|
19091
19124
|
let startedBy = void 0;
|
|
19092
19125
|
let verbose = false;
|
|
19093
19126
|
const acpArgs = [];
|
|
@@ -19127,7 +19160,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
19127
19160
|
return;
|
|
19128
19161
|
} else if (subcommand === "openclaw") {
|
|
19129
19162
|
try {
|
|
19130
|
-
const { runOpenClaw } = await import('./runOpenClaw-
|
|
19163
|
+
const { runOpenClaw } = await import('./runOpenClaw-D7MlPS5n.mjs');
|
|
19131
19164
|
let startedBy = void 0;
|
|
19132
19165
|
let verbose = false;
|
|
19133
19166
|
let gatewayUrl;
|
|
@@ -19178,7 +19211,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
19178
19211
|
return;
|
|
19179
19212
|
} else if (subcommand === "todo") {
|
|
19180
19213
|
try {
|
|
19181
|
-
const { handleTodoCommand } = await import('./todo-
|
|
19214
|
+
const { handleTodoCommand } = await import('./todo-Cknp5D4U.mjs');
|
|
19182
19215
|
await handleTodoCommand(args.slice(1));
|
|
19183
19216
|
} catch (error) {
|
|
19184
19217
|
console.error(JSON.stringify({ error: error instanceof Error ? error.message : "Todo command failed" }));
|
|
@@ -19187,7 +19220,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
19187
19220
|
return;
|
|
19188
19221
|
} else if (subcommand === "teams") {
|
|
19189
19222
|
try {
|
|
19190
|
-
const { handleTeamsCommand } = await import('./teams-
|
|
19223
|
+
const { handleTeamsCommand } = await import('./teams-CEahj4cm.mjs');
|
|
19191
19224
|
await handleTeamsCommand(args.slice(1));
|
|
19192
19225
|
} catch (error) {
|
|
19193
19226
|
console.error(error instanceof Error ? error.message : "Teams command failed");
|
|
@@ -19196,7 +19229,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
19196
19229
|
return;
|
|
19197
19230
|
} else if (subcommand === "auto") {
|
|
19198
19231
|
try {
|
|
19199
|
-
const { handleAutoCommand } = await import('./auto-
|
|
19232
|
+
const { handleAutoCommand } = await import('./auto-nb8GhRRy.mjs');
|
|
19200
19233
|
await handleAutoCommand(args.slice(1));
|
|
19201
19234
|
} catch (error) {
|
|
19202
19235
|
console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Automation command failed");
|
|
@@ -19208,7 +19241,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
19208
19241
|
return;
|
|
19209
19242
|
} else if (subcommand === "mcp" && (args.length === 1 || args.length === 2 && args[1] === "--terminal-tools")) {
|
|
19210
19243
|
try {
|
|
19211
|
-
const { handleMcpCommand } = await import('./mcp-
|
|
19244
|
+
const { handleMcpCommand } = await import('./mcp-Dy3f_K0h.mjs');
|
|
19212
19245
|
await handleMcpCommand(args[1] === "--terminal-tools");
|
|
19213
19246
|
} catch (error) {
|
|
19214
19247
|
process.stderr.write(`[very-happy mcp] Fatal: ${error instanceof Error ? error.message : String(error)}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { q as query } from './index-
|
|
1
|
+
import { q as query } from './index-BF6WfgV5.mjs';
|
|
2
2
|
export { AbortError } from '@anthropic-ai/claude-agent-sdk';
|
|
3
3
|
import 'chalk';
|
|
4
4
|
import 'node:os';
|
|
5
5
|
import 'node:crypto';
|
|
6
|
-
import './types-
|
|
6
|
+
import './types-Dh-s4Lqs.mjs';
|
|
7
7
|
import 'axios';
|
|
8
|
-
import './limits-
|
|
8
|
+
import './limits-CjRj8IX5.mjs';
|
|
9
9
|
import 'zod';
|
|
10
10
|
import '@paralleldrive/cuid2';
|
|
11
11
|
import 'node:fs/promises';
|
|
@@ -30,7 +30,7 @@ import 'fs';
|
|
|
30
30
|
import 'node:readline';
|
|
31
31
|
import '@anthropic-ai/sandbox-runtime';
|
|
32
32
|
import 'expo-server-sdk';
|
|
33
|
-
import './agentGuidance-
|
|
33
|
+
import './agentGuidance-KgvYuF3R.mjs';
|
|
34
34
|
import 'ink';
|
|
35
35
|
import 'react';
|
|
36
36
|
import 'ps-list';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-rH3DrQ5B.cjs');
|
|
4
4
|
var claudeAgentSdk = require('@anthropic-ai/claude-agent-sdk');
|
|
5
5
|
require('chalk');
|
|
6
6
|
require('node:os');
|
|
7
7
|
require('node:crypto');
|
|
8
|
-
require('./types-
|
|
8
|
+
require('./types-BbvK1Tr_.cjs');
|
|
9
9
|
require('axios');
|
|
10
|
-
require('./limits-
|
|
10
|
+
require('./limits-BH5CV5vR.cjs');
|
|
11
11
|
require('zod');
|
|
12
12
|
require('@paralleldrive/cuid2');
|
|
13
13
|
require('node:fs/promises');
|
|
@@ -32,7 +32,7 @@ require('fs');
|
|
|
32
32
|
require('node:readline');
|
|
33
33
|
require('@anthropic-ai/sandbox-runtime');
|
|
34
34
|
require('expo-server-sdk');
|
|
35
|
-
require('./agentGuidance-
|
|
35
|
+
require('./agentGuidance-BRDN1NoZ.cjs');
|
|
36
36
|
require('ink');
|
|
37
37
|
require('react');
|
|
38
38
|
require('ps-list');
|