very-happy-cli 0.2.110 → 0.2.112
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-D0_wbTs6.cjs → AcpBackend-B3x-gQWP.cjs} +1 -1
- package/dist/{AcpBackend-DzZR7TEv.mjs → AcpBackend-DDEdYVW2.mjs} +1 -1
- package/dist/{AcpSessionManager-tWuFWeIF.mjs → AcpSessionManager-BORAhQ1r.mjs} +1 -1
- package/dist/{AcpSessionManager-Dcj_iHw8.cjs → AcpSessionManager-DGPLD-go.cjs} +1 -1
- package/dist/{config-CTyyVXHj.mjs → config-B_L5vXXu.mjs} +2 -2
- package/dist/{config-CTCGilz_.cjs → config-KX6e7GEu.cjs} +2 -2
- package/dist/{index-D-adqB7g.cjs → index-B7-t5Kwz.cjs} +4 -4
- package/dist/{index-CvnMiYgh.cjs → index-BnRQP3PL.cjs} +250 -20
- package/dist/{index-DW78HyvK.cjs → index-CTd0skWH.cjs} +2 -2
- package/dist/{index-Brhvj7p0.mjs → index-Cu5FdgTq.mjs} +5 -5
- package/dist/{index-BW9kDx5m.mjs → index-inkhalP5.mjs} +245 -17
- package/dist/{index-jYltd-ZW.mjs → index-lQzCAx9I.mjs} +2 -2
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{installTerminalHooks-DhQ6k7YD.cjs → installTerminalHooks-BVk-r0yD.cjs} +2 -2
- package/dist/{installTerminalHooks-CJyoR9jp.mjs → installTerminalHooks-CQiW7Jn9.mjs} +2 -2
- package/dist/lib.cjs +1 -1
- package/dist/lib.d.cts +44 -0
- package/dist/lib.d.mts +44 -0
- package/dist/lib.mjs +1 -1
- package/dist/{mcp-Dr1PegOw.cjs → mcp-D0DIU8Q2.cjs} +2 -2
- package/dist/{mcp-BO9-sxMr.mjs → mcp-DD-0VkiA.mjs} +2 -2
- package/dist/{runGemini-CuzqF6Ys.mjs → runGemini-DHyBDo5P.mjs} +4 -4
- package/dist/{runGemini-D6Wwfk_0.cjs → runGemini-Dq1d8Ccb.cjs} +4 -4
- package/dist/{runOpenClaw-BYmlS-4Q.cjs → runOpenClaw-BHXnUF_m.cjs} +3 -3
- package/dist/{runOpenClaw-B5pkmSTb.mjs → runOpenClaw-DX-tgQ2V.mjs} +3 -3
- package/dist/{send-Btz1IZ9U.mjs → send-0TYDXiGx.mjs} +2 -2
- package/dist/{send-CuajooZC.cjs → send-By6zEUWo.cjs} +2 -2
- package/dist/{sessions-CVUBS3LG.cjs → sessions-DTBRcBRk.cjs} +2 -2
- package/dist/{sessions-DDwCphTQ.mjs → sessions-TM8VaCMY.mjs} +2 -2
- package/dist/{spawn-CwS8CPbr.cjs → spawn-CweTEYze.cjs} +57 -4
- package/dist/{spawn-DcA80_VN.mjs → spawn-D0oTo5BT.mjs} +56 -5
- package/dist/{types-BdO0jg7G.mjs → types-C5ewhu1Q.mjs} +96 -11
- package/dist/{types--t4zLibT.cjs → types-R11tMGyX.cjs} +97 -11
- package/package.json +7 -7
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var node_child_process = require('node:child_process');
|
|
4
4
|
var sdk = require('@agentclientprotocol/sdk');
|
|
5
5
|
var node_crypto = require('node:crypto');
|
|
6
|
-
var persistence = require('./types
|
|
6
|
+
var persistence = require('./types-R11tMGyX.cjs');
|
|
7
7
|
|
|
8
8
|
const DEFAULT_TIMEOUTS = {
|
|
9
9
|
/** Default initialization timeout: 60 seconds */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { spawn } from 'node:child_process';
|
|
2
2
|
import { ndJsonStream, ClientSideConnection } from '@agentclientprotocol/sdk';
|
|
3
3
|
import { randomUUID } from 'node:crypto';
|
|
4
|
-
import { l as logger, d as contentLogMetadata, e as errorLogMetadata, f as packageJson, g as delay } from './types-
|
|
4
|
+
import { l as logger, d as contentLogMetadata, e as errorLogMetadata, f as packageJson, g as delay } from './types-C5ewhu1Q.mjs';
|
|
5
5
|
|
|
6
6
|
const DEFAULT_TIMEOUTS = {
|
|
7
7
|
/** Default initialization timeout: 60 seconds */
|
|
@@ -2,8 +2,8 @@ import { existsSync, readFileSync, mkdirSync, writeFileSync } from 'fs';
|
|
|
2
2
|
import { join } from 'path';
|
|
3
3
|
import { homedir } from 'os';
|
|
4
4
|
import { execSync } from 'child_process';
|
|
5
|
-
import { l as logger } from './types-
|
|
6
|
-
import {
|
|
5
|
+
import { l as logger } from './types-C5ewhu1Q.mjs';
|
|
6
|
+
import { g as DEFAULT_GEMINI_MODEL, G as GEMINI_MODEL_ENV } from './index-inkhalP5.mjs';
|
|
7
7
|
import 'axios';
|
|
8
8
|
import 'chalk';
|
|
9
9
|
import 'node:util';
|
|
@@ -4,8 +4,8 @@ var fs = require('fs');
|
|
|
4
4
|
var path = require('path');
|
|
5
5
|
var os = require('os');
|
|
6
6
|
var child_process = require('child_process');
|
|
7
|
-
var persistence = require('./types
|
|
8
|
-
var index = require('./index-
|
|
7
|
+
var persistence = require('./types-R11tMGyX.cjs');
|
|
8
|
+
var index = require('./index-BnRQP3PL.cjs');
|
|
9
9
|
require('axios');
|
|
10
10
|
require('chalk');
|
|
11
11
|
require('node:util');
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var AcpBackend = require('./AcpBackend-
|
|
4
|
-
var persistence = require('./types
|
|
5
|
-
var AcpSessionManager = require('./AcpSessionManager-
|
|
3
|
+
var AcpBackend = require('./AcpBackend-B3x-gQWP.cjs');
|
|
4
|
+
var persistence = require('./types-R11tMGyX.cjs');
|
|
5
|
+
var AcpSessionManager = require('./AcpSessionManager-DGPLD-go.cjs');
|
|
6
6
|
var node_crypto = require('node:crypto');
|
|
7
7
|
var path = require('node:path');
|
|
8
|
-
var index = require('./index-
|
|
8
|
+
var index = require('./index-BnRQP3PL.cjs');
|
|
9
9
|
require('node:child_process');
|
|
10
10
|
require('@agentclientprotocol/sdk');
|
|
11
11
|
require('axios');
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var chalk = require('chalk');
|
|
4
4
|
var os = require('node:os');
|
|
5
5
|
var node_crypto = require('node:crypto');
|
|
6
|
-
var persistence = require('./types
|
|
6
|
+
var persistence = require('./types-R11tMGyX.cjs');
|
|
7
7
|
var spawn = require('cross-spawn');
|
|
8
8
|
var path = require('node:path');
|
|
9
9
|
var node_readline = require('node:readline');
|
|
@@ -191,7 +191,14 @@ async function stopDaemonSession(sessionId) {
|
|
|
191
191
|
return result.success || false;
|
|
192
192
|
}
|
|
193
193
|
async function spawnDaemonSession(directory, sessionId, opts) {
|
|
194
|
-
const result = await daemonPost("/spawn-session", {
|
|
194
|
+
const result = await daemonPost("/spawn-session", {
|
|
195
|
+
directory,
|
|
196
|
+
sessionId,
|
|
197
|
+
spawnedBy: opts?.spawnedBy,
|
|
198
|
+
permissionMode: opts?.permissionMode,
|
|
199
|
+
agent: opts?.agent,
|
|
200
|
+
environmentVariables: opts?.environmentVariables
|
|
201
|
+
});
|
|
195
202
|
return result;
|
|
196
203
|
}
|
|
197
204
|
async function notifyDaemonSessionEvent(sessionId, event, spawnedBy) {
|
|
@@ -2018,7 +2025,14 @@ async function claudeRemote(opts) {
|
|
|
2018
2025
|
onUserDialog: opts.onUserDialog,
|
|
2019
2026
|
supportedDialogKinds: opts.onUserDialog ? ["refusal_fallback_prompt"] : void 0,
|
|
2020
2027
|
abort: opts.signal,
|
|
2021
|
-
settingsPath: opts.hookSettingsPath
|
|
2028
|
+
settingsPath: opts.hookSettingsPath,
|
|
2029
|
+
// B-309: token-level partials. Without this the SDK emits nothing
|
|
2030
|
+
// between "turn started" and "entire assistant message", which is
|
|
2031
|
+
// exactly why the web used to show a spinner where the terminal shows
|
|
2032
|
+
// the model thinking out loud. The partials do NOT enter the
|
|
2033
|
+
// transcript; they are split off below and relayed on a side channel.
|
|
2034
|
+
// Only pay for them when someone is listening.
|
|
2035
|
+
includePartialMessages: opts.onStreamFrame ? true : void 0
|
|
2022
2036
|
};
|
|
2023
2037
|
let thinking = false;
|
|
2024
2038
|
const updateThinking = (newThinking) => {
|
|
@@ -2068,10 +2082,26 @@ async function claudeRemote(opts) {
|
|
|
2068
2082
|
try {
|
|
2069
2083
|
persistence.logger.debug(`[claudeRemote] Starting to iterate over response`);
|
|
2070
2084
|
for await (const message of response) {
|
|
2085
|
+
if (message.type === "stream_event") {
|
|
2086
|
+
if (opts.onStreamFrame && !message.parent_tool_use_id) {
|
|
2087
|
+
opts.onStreamFrame({ type: "stream_event", event: message.event });
|
|
2088
|
+
}
|
|
2089
|
+
continue;
|
|
2090
|
+
}
|
|
2071
2091
|
persistence.logger.debug(`[claudeRemote] Message ${message.type}`, persistence.contentLogMetadata(message));
|
|
2072
2092
|
if (message.type === "assistant" && message.error) {
|
|
2073
2093
|
lastAssistantError = message.error;
|
|
2074
2094
|
}
|
|
2095
|
+
if (opts.onStreamFrame && message.type === "system") {
|
|
2096
|
+
const subtype = message.subtype;
|
|
2097
|
+
if (subtype === "thinking_tokens") {
|
|
2098
|
+
const tokens = message;
|
|
2099
|
+
opts.onStreamFrame({ type: "system", subtype: "thinking_tokens", estimated_tokens: tokens.estimated_tokens });
|
|
2100
|
+
} else if (subtype === "status") {
|
|
2101
|
+
const status = message;
|
|
2102
|
+
opts.onStreamFrame({ type: "system", subtype: "status", status: status.status });
|
|
2103
|
+
}
|
|
2104
|
+
}
|
|
2075
2105
|
const outboundMessage = isCompactCommand && message.type === "assistant" ? { ...message, isCompactSummary: true } : message;
|
|
2076
2106
|
opts.onMessage(outboundMessage);
|
|
2077
2107
|
if (message.type === "system" && message.subtype === "init") {
|
|
@@ -3271,6 +3301,197 @@ class OutgoingMessageQueue {
|
|
|
3271
3301
|
}
|
|
3272
3302
|
}
|
|
3273
3303
|
|
|
3304
|
+
const STREAM_FLUSH_MS = 80;
|
|
3305
|
+
const PROGRESS_FLUSH_MS = 250;
|
|
3306
|
+
const STREAM_FLUSH_MAX_BYTES = 16 * 1024;
|
|
3307
|
+
class StreamRelay {
|
|
3308
|
+
send;
|
|
3309
|
+
setTimer;
|
|
3310
|
+
clearTimer;
|
|
3311
|
+
now;
|
|
3312
|
+
/** The block currently accumulating deltas. At most one is open at a time
|
|
3313
|
+
* in practice; a switch flushes the previous one first, so out-of-order
|
|
3314
|
+
* SDK frames degrade to "slightly chunkier", never to interleaved text. */
|
|
3315
|
+
pending = null;
|
|
3316
|
+
flushHandle = null;
|
|
3317
|
+
progress = {};
|
|
3318
|
+
progressDirty = false;
|
|
3319
|
+
progressHandle = null;
|
|
3320
|
+
/** Message id of the block currently open, so `content_block_delta` (which
|
|
3321
|
+
* carries only an index) can be attributed. Reset per assistant message. */
|
|
3322
|
+
currentMid = null;
|
|
3323
|
+
openBlocks = /* @__PURE__ */ new Set();
|
|
3324
|
+
/** True while nothing has been ingested since the last sweep. Both the SDK
|
|
3325
|
+
* `result` frame and the launcher's `finally` call endTurn (the second is
|
|
3326
|
+
* the safety net for turns that die before producing a result), so
|
|
3327
|
+
* without this a normal turn would emit two sweeps. */
|
|
3328
|
+
idleSinceTurnEnd = true;
|
|
3329
|
+
constructor(options) {
|
|
3330
|
+
this.send = options.send;
|
|
3331
|
+
this.setTimer = options.setTimer ?? ((fn, ms) => setTimeout(fn, ms));
|
|
3332
|
+
this.clearTimer = options.clearTimer ?? ((handle) => clearTimeout(handle));
|
|
3333
|
+
this.now = options.now ?? (() => Date.now());
|
|
3334
|
+
}
|
|
3335
|
+
/** Feed one SDK frame. Unknown shapes are ignored, never thrown on: this
|
|
3336
|
+
* channel must not be able to take a turn down. */
|
|
3337
|
+
ingest(message) {
|
|
3338
|
+
this.idleSinceTurnEnd = false;
|
|
3339
|
+
try {
|
|
3340
|
+
if (message.type === "stream_event") {
|
|
3341
|
+
this.ingestStreamEvent(message.event);
|
|
3342
|
+
return;
|
|
3343
|
+
}
|
|
3344
|
+
if (message.type === "system" && message.subtype === "thinking_tokens") {
|
|
3345
|
+
if (typeof message.estimated_tokens === "number") {
|
|
3346
|
+
this.setProgress({ thinkingTokens: message.estimated_tokens });
|
|
3347
|
+
}
|
|
3348
|
+
return;
|
|
3349
|
+
}
|
|
3350
|
+
if (message.type === "system" && message.subtype === "status") {
|
|
3351
|
+
const status = message.status === "requesting" || message.status === "compacting" ? message.status : void 0;
|
|
3352
|
+
this.progress.status = status;
|
|
3353
|
+
this.progressDirty = true;
|
|
3354
|
+
this.scheduleProgress();
|
|
3355
|
+
return;
|
|
3356
|
+
}
|
|
3357
|
+
} catch {
|
|
3358
|
+
}
|
|
3359
|
+
}
|
|
3360
|
+
/** The turn produced its result. Flushes everything and tells the web to
|
|
3361
|
+
* sweep drafts that no persisted message ever claimed. */
|
|
3362
|
+
endTurn() {
|
|
3363
|
+
if (this.idleSinceTurnEnd) {
|
|
3364
|
+
this.clearTimers();
|
|
3365
|
+
return;
|
|
3366
|
+
}
|
|
3367
|
+
this.idleSinceTurnEnd = true;
|
|
3368
|
+
this.flushPending();
|
|
3369
|
+
this.closeOpenBlocks();
|
|
3370
|
+
this.flushProgress();
|
|
3371
|
+
this.progress = {};
|
|
3372
|
+
this.currentMid = null;
|
|
3373
|
+
this.send({ t: "turn-end" });
|
|
3374
|
+
}
|
|
3375
|
+
/** Release timers without emitting anything (session teardown). */
|
|
3376
|
+
dispose() {
|
|
3377
|
+
this.clearTimers();
|
|
3378
|
+
this.pending = null;
|
|
3379
|
+
this.openBlocks.clear();
|
|
3380
|
+
}
|
|
3381
|
+
clearTimers() {
|
|
3382
|
+
if (this.flushHandle !== null) this.clearTimer(this.flushHandle);
|
|
3383
|
+
if (this.progressHandle !== null) this.clearTimer(this.progressHandle);
|
|
3384
|
+
this.flushHandle = null;
|
|
3385
|
+
this.progressHandle = null;
|
|
3386
|
+
}
|
|
3387
|
+
ingestStreamEvent(event) {
|
|
3388
|
+
const e = event;
|
|
3389
|
+
if (!e || typeof e.type !== "string") return;
|
|
3390
|
+
if (e.type === "message_start") {
|
|
3391
|
+
const mid = e.message?.id;
|
|
3392
|
+
this.flushPending();
|
|
3393
|
+
this.closeOpenBlocks();
|
|
3394
|
+
this.currentMid = typeof mid === "string" && mid.length > 0 ? mid : null;
|
|
3395
|
+
return;
|
|
3396
|
+
}
|
|
3397
|
+
if (e.type === "content_block_start") {
|
|
3398
|
+
const kind = e.content_block?.type === "thinking" ? "thinking" : e.content_block?.type === "text" ? "text" : null;
|
|
3399
|
+
if (!kind || !this.currentMid || typeof e.index !== "number") return;
|
|
3400
|
+
this.flushPending();
|
|
3401
|
+
this.openBlocks.add(e.index);
|
|
3402
|
+
this.send({ t: "block-start", mid: this.currentMid, idx: e.index, kind });
|
|
3403
|
+
return;
|
|
3404
|
+
}
|
|
3405
|
+
if (e.type === "content_block_delta") {
|
|
3406
|
+
const delta = e.delta;
|
|
3407
|
+
const text = delta?.type === "text_delta" ? delta.text : delta?.type === "thinking_delta" ? delta.thinking : null;
|
|
3408
|
+
if (typeof text !== "string" || text.length === 0) return;
|
|
3409
|
+
if (!this.currentMid || typeof e.index !== "number") return;
|
|
3410
|
+
if (!this.openBlocks.has(e.index)) return;
|
|
3411
|
+
this.appendDelta(this.currentMid, e.index, text);
|
|
3412
|
+
return;
|
|
3413
|
+
}
|
|
3414
|
+
if (e.type === "content_block_stop") {
|
|
3415
|
+
if (!this.currentMid || typeof e.index !== "number") return;
|
|
3416
|
+
if (!this.openBlocks.has(e.index)) return;
|
|
3417
|
+
this.flushPending();
|
|
3418
|
+
this.openBlocks.delete(e.index);
|
|
3419
|
+
this.send({ t: "block-end", mid: this.currentMid, idx: e.index });
|
|
3420
|
+
return;
|
|
3421
|
+
}
|
|
3422
|
+
if (e.type === "message_delta") {
|
|
3423
|
+
const outputTokens = e.usage?.output_tokens;
|
|
3424
|
+
if (typeof outputTokens === "number") {
|
|
3425
|
+
this.setProgress({ outputTokens });
|
|
3426
|
+
}
|
|
3427
|
+
return;
|
|
3428
|
+
}
|
|
3429
|
+
}
|
|
3430
|
+
appendDelta(mid, idx, text) {
|
|
3431
|
+
if (this.pending && (this.pending.mid !== mid || this.pending.idx !== idx)) {
|
|
3432
|
+
this.flushPending();
|
|
3433
|
+
}
|
|
3434
|
+
if (!this.pending) {
|
|
3435
|
+
this.pending = { mid, idx, text: "", bytes: 0 };
|
|
3436
|
+
}
|
|
3437
|
+
this.pending.text += text;
|
|
3438
|
+
this.pending.bytes += Buffer.byteLength(text, "utf8");
|
|
3439
|
+
if (this.pending.bytes >= STREAM_FLUSH_MAX_BYTES || this.pending.text.length >= persistence.STREAM_DELTA_MAX_CHARS) {
|
|
3440
|
+
this.flushPending();
|
|
3441
|
+
return;
|
|
3442
|
+
}
|
|
3443
|
+
if (this.flushHandle === null) {
|
|
3444
|
+
this.flushHandle = this.setTimer(() => {
|
|
3445
|
+
this.flushHandle = null;
|
|
3446
|
+
this.flushPending();
|
|
3447
|
+
}, STREAM_FLUSH_MS);
|
|
3448
|
+
}
|
|
3449
|
+
}
|
|
3450
|
+
flushPending() {
|
|
3451
|
+
if (this.flushHandle !== null) {
|
|
3452
|
+
this.clearTimer(this.flushHandle);
|
|
3453
|
+
this.flushHandle = null;
|
|
3454
|
+
}
|
|
3455
|
+
const pending = this.pending;
|
|
3456
|
+
this.pending = null;
|
|
3457
|
+
if (!pending || pending.text.length === 0) return;
|
|
3458
|
+
this.send({ t: "block-delta", mid: pending.mid, idx: pending.idx, text: pending.text });
|
|
3459
|
+
}
|
|
3460
|
+
/** Close blocks the SDK never stopped (interrupt, error, message switch) so
|
|
3461
|
+
* the web's draft does not keep a blinking cursor forever. */
|
|
3462
|
+
closeOpenBlocks() {
|
|
3463
|
+
if (!this.currentMid || this.openBlocks.size === 0) {
|
|
3464
|
+
this.openBlocks.clear();
|
|
3465
|
+
return;
|
|
3466
|
+
}
|
|
3467
|
+
for (const idx of [...this.openBlocks].sort((a, b) => a - b)) {
|
|
3468
|
+
this.send({ t: "block-end", mid: this.currentMid, idx });
|
|
3469
|
+
}
|
|
3470
|
+
this.openBlocks.clear();
|
|
3471
|
+
}
|
|
3472
|
+
setProgress(patch) {
|
|
3473
|
+
this.progress = { ...this.progress, ...patch };
|
|
3474
|
+
this.progressDirty = true;
|
|
3475
|
+
this.scheduleProgress();
|
|
3476
|
+
}
|
|
3477
|
+
scheduleProgress() {
|
|
3478
|
+
if (this.progressHandle !== null) return;
|
|
3479
|
+
this.progressHandle = this.setTimer(() => {
|
|
3480
|
+
this.progressHandle = null;
|
|
3481
|
+
this.flushProgress();
|
|
3482
|
+
}, PROGRESS_FLUSH_MS);
|
|
3483
|
+
}
|
|
3484
|
+
flushProgress() {
|
|
3485
|
+
if (this.progressHandle !== null) {
|
|
3486
|
+
this.clearTimer(this.progressHandle);
|
|
3487
|
+
this.progressHandle = null;
|
|
3488
|
+
}
|
|
3489
|
+
if (!this.progressDirty) return;
|
|
3490
|
+
this.progressDirty = false;
|
|
3491
|
+
this.send({ t: "progress", ...this.progress });
|
|
3492
|
+
}
|
|
3493
|
+
}
|
|
3494
|
+
|
|
3274
3495
|
function getAskUserQuestionToolCallIds(message) {
|
|
3275
3496
|
if (message.type !== "assistant") {
|
|
3276
3497
|
return [];
|
|
@@ -3651,6 +3872,10 @@ async function claudeRemoteLauncher(session, onPermissionModeChange, onEffective
|
|
|
3651
3872
|
return nextMode;
|
|
3652
3873
|
};
|
|
3653
3874
|
permissionHandler.reset("Previous CLI process exited before responding");
|
|
3875
|
+
const streamingEnabled = process.env.HAPPY_SESSION_STREAM_DISABLED !== "1";
|
|
3876
|
+
const streamRelay = new StreamRelay({
|
|
3877
|
+
send: (frame) => session.client.sendStreamFrame(frame)
|
|
3878
|
+
});
|
|
3654
3879
|
const messageQueue = new OutgoingMessageQueue(
|
|
3655
3880
|
(logMessage) => session.client.sendClaudeSessionMessage(logMessage)
|
|
3656
3881
|
);
|
|
@@ -3909,6 +4134,7 @@ async function claudeRemoteLauncher(session, onPermissionModeChange, onEffective
|
|
|
3909
4134
|
};
|
|
3910
4135
|
},
|
|
3911
4136
|
onThinkingChange: session.onThinkingChange,
|
|
4137
|
+
onStreamFrame: streamingEnabled ? (frame) => streamRelay.ingest(frame) : void 0,
|
|
3912
4138
|
claudeEnvVars: session.claudeEnvVars,
|
|
3913
4139
|
claudeArgs: session.claudeArgs,
|
|
3914
4140
|
onMessage,
|
|
@@ -3988,6 +4214,8 @@ async function claudeRemoteLauncher(session, onPermissionModeChange, onEffective
|
|
|
3988
4214
|
await messageQueue.flush();
|
|
3989
4215
|
messageQueue.destroy();
|
|
3990
4216
|
persistence.logger.debug("[remote]: message queue flushed");
|
|
4217
|
+
streamRelay.endTurn();
|
|
4218
|
+
streamRelay.dispose();
|
|
3991
4219
|
abortController = null;
|
|
3992
4220
|
abortFuture?.resolve(void 0);
|
|
3993
4221
|
abortFuture = null;
|
|
@@ -6943,7 +7171,7 @@ function parseJsonObject(text) {
|
|
|
6943
7171
|
return null;
|
|
6944
7172
|
}
|
|
6945
7173
|
}
|
|
6946
|
-
function resolveSdkClaudeBinary(platform = process.platform, arch = process.arch, resolver = (s) => node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-
|
|
7174
|
+
function resolveSdkClaudeBinary(platform = process.platform, arch = process.arch, resolver = (s) => node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-BnRQP3PL.cjs', document.baseURI).href))).resolve(s)) {
|
|
6947
7175
|
const platformArch = `${platform}-${arch}`;
|
|
6948
7176
|
const candidates = [
|
|
6949
7177
|
`@anthropic-ai/claude-agent-sdk-${platformArch}/claude`,
|
|
@@ -10390,7 +10618,7 @@ function registerSideQuestionHandler(rpc, deps) {
|
|
|
10390
10618
|
const retainMs = deps.retainMs ?? SIDE_QUESTION_RETAIN_MS;
|
|
10391
10619
|
const maxRunMs = deps.maxRunMs ?? SIDE_QUESTION_MAX_RUN_MS;
|
|
10392
10620
|
const run = deps.run ?? (async (input) => {
|
|
10393
|
-
const { query } = await Promise.resolve().then(function () { return require('./index-
|
|
10621
|
+
const { query } = await Promise.resolve().then(function () { return require('./index-CTd0skWH.cjs'); });
|
|
10394
10622
|
return runSideQuestion(query, input);
|
|
10395
10623
|
});
|
|
10396
10624
|
const slots = /* @__PURE__ */ new Map();
|
|
@@ -10492,7 +10720,7 @@ const MAX_TITLE_CHARS = 60;
|
|
|
10492
10720
|
const GENERATION_TIMEOUT_MS = 3e4;
|
|
10493
10721
|
function resolveClaudeBinary() {
|
|
10494
10722
|
try {
|
|
10495
|
-
const require$1 = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-
|
|
10723
|
+
const require$1 = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-BnRQP3PL.cjs', document.baseURI).href)));
|
|
10496
10724
|
const utilsPath = path.resolve(path.join(persistence.projectPath(), "scripts", "claude_version_utils.cjs"));
|
|
10497
10725
|
const { getClaudeCliPath } = require$1(utilsPath);
|
|
10498
10726
|
const path$1 = getClaudeCliPath();
|
|
@@ -12694,9 +12922,9 @@ function resolveLocalSignupBootstrap(configuredMode, configuredInviteCodes, gene
|
|
|
12694
12922
|
};
|
|
12695
12923
|
}
|
|
12696
12924
|
|
|
12697
|
-
const __filename$1 = node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-
|
|
12925
|
+
const __filename$1 = node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-BnRQP3PL.cjs', document.baseURI).href)));
|
|
12698
12926
|
const __dirname$1 = path.dirname(__filename$1);
|
|
12699
|
-
const require_ = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-
|
|
12927
|
+
const require_ = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-BnRQP3PL.cjs', document.baseURI).href)));
|
|
12700
12928
|
const PRISMA_QUERY_ENGINE_FILES = {
|
|
12701
12929
|
"arm64-darwin": "libquery_engine-darwin-arm64.dylib.node",
|
|
12702
12930
|
"x64-darwin": "libquery_engine-darwin.dylib.node",
|
|
@@ -15320,7 +15548,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
15320
15548
|
process.exit(0);
|
|
15321
15549
|
} else if (subcommand === "install-terminal-hooks") {
|
|
15322
15550
|
try {
|
|
15323
|
-
const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await Promise.resolve().then(function () { return require('./installTerminalHooks-
|
|
15551
|
+
const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await Promise.resolve().then(function () { return require('./installTerminalHooks-BVk-r0yD.cjs'); });
|
|
15324
15552
|
const command = parseTerminalHooksArgs(args.slice(1));
|
|
15325
15553
|
if (command.action === "help") {
|
|
15326
15554
|
console.log(TERMINAL_HOOKS_HELP);
|
|
@@ -15337,7 +15565,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
15337
15565
|
}
|
|
15338
15566
|
} else if (subcommand === "spawn") {
|
|
15339
15567
|
try {
|
|
15340
|
-
const { handleSpawnCommand } = await Promise.resolve().then(function () { return require('./spawn-
|
|
15568
|
+
const { handleSpawnCommand } = await Promise.resolve().then(function () { return require('./spawn-CweTEYze.cjs'); });
|
|
15341
15569
|
await handleSpawnCommand(args.slice(1));
|
|
15342
15570
|
} catch (error) {
|
|
15343
15571
|
console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
|
|
@@ -15349,7 +15577,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
15349
15577
|
return;
|
|
15350
15578
|
} else if (subcommand === "sessions") {
|
|
15351
15579
|
try {
|
|
15352
|
-
const { handleSessionsCommand } = await Promise.resolve().then(function () { return require('./sessions-
|
|
15580
|
+
const { handleSessionsCommand } = await Promise.resolve().then(function () { return require('./sessions-DTBRcBRk.cjs'); });
|
|
15353
15581
|
await handleSessionsCommand(args.slice(1));
|
|
15354
15582
|
} catch (error) {
|
|
15355
15583
|
console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
|
|
@@ -15361,7 +15589,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
15361
15589
|
return;
|
|
15362
15590
|
} else if (subcommand === "send") {
|
|
15363
15591
|
try {
|
|
15364
|
-
const { handleSendCommand } = await Promise.resolve().then(function () { return require('./send-
|
|
15592
|
+
const { handleSendCommand } = await Promise.resolve().then(function () { return require('./send-By6zEUWo.cjs'); });
|
|
15365
15593
|
await handleSendCommand(args.slice(1));
|
|
15366
15594
|
} catch (error) {
|
|
15367
15595
|
console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
|
|
@@ -15467,9 +15695,9 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
15467
15695
|
if (geminiSubcommand === "project" && args[2] === "set" && args[3]) {
|
|
15468
15696
|
const projectId = args[3];
|
|
15469
15697
|
try {
|
|
15470
|
-
const { saveGoogleCloudProjectToConfig } = await Promise.resolve().then(function () { return require('./config-
|
|
15471
|
-
const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await Promise.resolve().then(function () { return require('./types
|
|
15472
|
-
const { ApiClient: ApiClient2 } = await Promise.resolve().then(function () { return require('./types
|
|
15698
|
+
const { saveGoogleCloudProjectToConfig } = await Promise.resolve().then(function () { return require('./config-KX6e7GEu.cjs'); });
|
|
15699
|
+
const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await Promise.resolve().then(function () { return require('./types-R11tMGyX.cjs'); }).then(function (n) { return n.persistence; });
|
|
15700
|
+
const { ApiClient: ApiClient2 } = await Promise.resolve().then(function () { return require('./types-R11tMGyX.cjs'); }).then(function (n) { return n.api; });
|
|
15473
15701
|
let userEmail = void 0;
|
|
15474
15702
|
try {
|
|
15475
15703
|
const credentials = await readCredentialsForConfiguredRelay2();
|
|
@@ -15500,7 +15728,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
15500
15728
|
}
|
|
15501
15729
|
if (geminiSubcommand === "project" && args[2] === "get") {
|
|
15502
15730
|
try {
|
|
15503
|
-
const { readGeminiLocalConfig } = await Promise.resolve().then(function () { return require('./config-
|
|
15731
|
+
const { readGeminiLocalConfig } = await Promise.resolve().then(function () { return require('./config-KX6e7GEu.cjs'); });
|
|
15504
15732
|
const config = readGeminiLocalConfig();
|
|
15505
15733
|
if (config.googleCloudProject) {
|
|
15506
15734
|
console.log(`Current Google Cloud Project: ${config.googleCloudProject}`);
|
|
@@ -15540,7 +15768,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
15540
15768
|
process.exit(0);
|
|
15541
15769
|
}
|
|
15542
15770
|
try {
|
|
15543
|
-
const { runGemini } = await Promise.resolve().then(function () { return require('./runGemini-
|
|
15771
|
+
const { runGemini } = await Promise.resolve().then(function () { return require('./runGemini-Dq1d8Ccb.cjs'); });
|
|
15544
15772
|
let startedBy = void 0;
|
|
15545
15773
|
for (let i = 1; i < args.length; i++) {
|
|
15546
15774
|
if (args[i] === "--started-by") {
|
|
@@ -15562,7 +15790,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
15562
15790
|
return;
|
|
15563
15791
|
} else if (subcommand === "acp") {
|
|
15564
15792
|
try {
|
|
15565
|
-
const { runAcp, resolveAcpAgentConfig } = await Promise.resolve().then(function () { return require('./index-
|
|
15793
|
+
const { runAcp, resolveAcpAgentConfig } = await Promise.resolve().then(function () { return require('./index-B7-t5Kwz.cjs'); });
|
|
15566
15794
|
let startedBy = void 0;
|
|
15567
15795
|
let verbose = false;
|
|
15568
15796
|
const acpArgs = [];
|
|
@@ -15602,7 +15830,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
15602
15830
|
return;
|
|
15603
15831
|
} else if (subcommand === "openclaw") {
|
|
15604
15832
|
try {
|
|
15605
|
-
const { runOpenClaw } = await Promise.resolve().then(function () { return require('./runOpenClaw-
|
|
15833
|
+
const { runOpenClaw } = await Promise.resolve().then(function () { return require('./runOpenClaw-BHXnUF_m.cjs'); });
|
|
15606
15834
|
let startedBy = void 0;
|
|
15607
15835
|
let verbose = false;
|
|
15608
15836
|
let gatewayUrl;
|
|
@@ -15653,7 +15881,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
15653
15881
|
return;
|
|
15654
15882
|
} else if (subcommand === "mcp" && args.length === 1) {
|
|
15655
15883
|
try {
|
|
15656
|
-
const { handleMcpCommand } = await Promise.resolve().then(function () { return require('./mcp-
|
|
15884
|
+
const { handleMcpCommand } = await Promise.resolve().then(function () { return require('./mcp-D0DIU8Q2.cjs'); });
|
|
15657
15885
|
await handleMcpCommand();
|
|
15658
15886
|
} catch (error) {
|
|
15659
15887
|
process.stderr.write(`[very-happy mcp] Fatal: ${error instanceof Error ? error.message : String(error)}
|
|
@@ -16011,6 +16239,7 @@ ${chalk.bold("Examples:")}
|
|
|
16011
16239
|
}
|
|
16012
16240
|
}
|
|
16013
16241
|
|
|
16242
|
+
exports.ALLOWED_SPAWN_PERMISSION_MODES = ALLOWED_SPAWN_PERMISSION_MODES;
|
|
16014
16243
|
exports.BasePermissionHandler = BasePermissionHandler;
|
|
16015
16244
|
exports.BaseReasoningProcessor = BaseReasoningProcessor;
|
|
16016
16245
|
exports.CHANGE_TITLE_INSTRUCTION = CHANGE_TITLE_INSTRUCTION;
|
|
@@ -16034,6 +16263,7 @@ exports.pushClipboardViaDaemon = pushClipboardViaDaemon;
|
|
|
16034
16263
|
exports.query = query;
|
|
16035
16264
|
exports.readSessionTranscript = readSessionTranscript;
|
|
16036
16265
|
exports.registerKillSessionHandler = registerKillSessionHandler;
|
|
16266
|
+
exports.sanitizeSpawnPermissionMode = sanitizeSpawnPermissionMode;
|
|
16037
16267
|
exports.sendUserMessage = sendUserMessage;
|
|
16038
16268
|
exports.sessionWebUrl = sessionWebUrl;
|
|
16039
16269
|
exports.setupOfflineReconnection = setupOfflineReconnection;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BnRQP3PL.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-R11tMGyX.cjs');
|
|
9
9
|
require('axios');
|
|
10
10
|
require('node:util');
|
|
11
11
|
require('node:fs');
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { D as DefaultTransport, A as AcpBackend } from './AcpBackend-
|
|
2
|
-
export { a as DEFAULT_IDLE_TIMEOUT_MS, b as DEFAULT_TOOL_CALL_TIMEOUT_MS, e as extractErrorDetail, f as formatDuration, c as formatDurationMinutes, h as handleAgentMessageChunk, d as handleAgentThoughtChunk, g as handleLegacyMessageChunk, i as handlePlanUpdate, j as handleThinkingUpdate, k as handleToolCall, l as handleToolCallUpdate, p as parseArgsFromContent } from './AcpBackend-
|
|
3
|
-
import { h as connectionState, A as ApiClient, j as readSettings, k as encodeBase64, l as logger, p as projectPath } from './types-
|
|
4
|
-
import { A as AcpSessionManager } from './AcpSessionManager-
|
|
1
|
+
import { D as DefaultTransport, A as AcpBackend } from './AcpBackend-DDEdYVW2.mjs';
|
|
2
|
+
export { a as DEFAULT_IDLE_TIMEOUT_MS, b as DEFAULT_TOOL_CALL_TIMEOUT_MS, e as extractErrorDetail, f as formatDuration, c as formatDurationMinutes, h as handleAgentMessageChunk, d as handleAgentThoughtChunk, g as handleLegacyMessageChunk, i as handlePlanUpdate, j as handleThinkingUpdate, k as handleToolCall, l as handleToolCallUpdate, p as parseArgsFromContent } from './AcpBackend-DDEdYVW2.mjs';
|
|
3
|
+
import { h as connectionState, A as ApiClient, j as readSettings, k as encodeBase64, l as logger, p as projectPath } from './types-C5ewhu1Q.mjs';
|
|
4
|
+
import { A as AcpSessionManager } from './AcpSessionManager-BORAhQ1r.mjs';
|
|
5
5
|
import { randomUUID } from 'node:crypto';
|
|
6
6
|
import { join } from 'node:path';
|
|
7
|
-
import {
|
|
7
|
+
import { h as initialMachineMetadata, j as createSessionMetadata, k as setupOfflineReconnection, n as notifyDaemonSessionStarted, m as MessageQueue2, o as hashObject, u as startHappyServer, v as registerKillSessionHandler, B as BasePermissionHandler } from './index-inkhalP5.mjs';
|
|
8
8
|
import 'node:child_process';
|
|
9
9
|
import '@agentclientprotocol/sdk';
|
|
10
10
|
import 'axios';
|