very-happy-cli 0.2.134 → 0.2.136
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-B8KEjDwF.mjs → AcpBackend-C142vP3p.mjs} +2 -2
- package/dist/{AcpBackend-CeNp7tgD.cjs → AcpBackend-CRzu0_1Z.cjs} +2 -2
- package/dist/{AcpSessionManager-Bu1d05bx.cjs → AcpSessionManager-Ba6WMLXc.cjs} +1 -1
- package/dist/{AcpSessionManager-KlDZbEmZ.mjs → AcpSessionManager-CosTbAlR.mjs} +1 -1
- package/dist/{agentGuidance-Cg8Lha39.cjs → agentGuidance-6yh_wPwD.cjs} +1 -1
- package/dist/{agentGuidance-CPG5Cr5T.mjs → agentGuidance-ASxKHxBP.mjs} +1 -1
- package/dist/codex/happyMcpStdioBridge.cjs +2 -2
- package/dist/codex/happyMcpStdioBridge.mjs +2 -2
- package/dist/{config-C3e90AIH.cjs → config--cxxmkOd.cjs} +4 -4
- package/dist/{config-C4gWfnJX.mjs → config-VqHQ67d8.mjs} +4 -4
- package/dist/{index-B1plzL9M.cjs → index-8bwU9d-4.cjs} +1596 -1208
- package/dist/{index-jqG8CV0c.cjs → index-BPVQFcKW.cjs} +6 -6
- package/dist/{index-CX-zp3FH.cjs → index-BqbtKX0T.cjs} +4 -4
- package/dist/{index-BqUOj1zK.mjs → index-CHI7iTa0.mjs} +1594 -1206
- package/dist/{index-B6UvB88K.mjs → index-D3vlFjXy.mjs} +7 -7
- package/dist/{index-CEDPokKf.mjs → index-vN4Xf0zB.mjs} +4 -4
- package/dist/index.cjs +4 -4
- package/dist/index.mjs +4 -4
- package/dist/{installTerminalHooks-DPmEaHg2.cjs → installTerminalHooks-2POBqVlu.cjs} +4 -4
- package/dist/{installTerminalHooks-BT4Dq28Y.mjs → installTerminalHooks-D0YRu_p-.mjs} +4 -4
- package/dist/lib.cjs +2 -2
- package/dist/lib.d.cts +14 -0
- package/dist/lib.d.mts +14 -0
- package/dist/lib.mjs +2 -2
- package/dist/{limits-D6kiAfXJ.cjs → limits-DRrdJ7gr.cjs} +8 -8
- package/dist/{limits-BGeIBBE3.mjs → limits-kjHZUlSp.mjs} +8 -8
- package/dist/{mcp-DGZmUpuZ.cjs → mcp-C1JQsM1s.cjs} +4 -4
- package/dist/{mcp-BGu_dUaJ.mjs → mcp-CgjEHlky.mjs} +4 -4
- package/dist/{runGemini-BPPnulIk.cjs → runGemini-B9Rc-H0G.cjs} +6 -6
- package/dist/{runGemini-DGTNwiLo.mjs → runGemini-DufGnnl2.mjs} +6 -6
- package/dist/{runOpenClaw-BB3Ivt1S.cjs → runOpenClaw-BsRRKDvF.cjs} +5 -5
- package/dist/{runOpenClaw-CxgTFOSM.mjs → runOpenClaw-DAl2nnjB.mjs} +5 -5
- package/dist/{send-DHShoBeq.mjs → send-BHquPaeG.mjs} +4 -4
- package/dist/{send-Bo6iKuXr.cjs → send-DP6n2J9x.cjs} +4 -4
- package/dist/{sessions-CJuwvEr0.mjs → sessions-BtrLzv5U.mjs} +4 -4
- package/dist/{sessions-DyC5Attg.cjs → sessions-Q4BR02dG.cjs} +4 -4
- package/dist/{spawn-gha6nGx-.cjs → spawn-CMjhlwlD.cjs} +4 -4
- package/dist/{spawn-QtKlr8Ig.mjs → spawn-DuQXydqI.mjs} +4 -4
- package/dist/{teams-BbzWNV9e.cjs → teams-CkdUH10-.cjs} +4 -4
- package/dist/{teams-BF-GxUZc.mjs → teams-D5HxnyaW.mjs} +4 -4
- package/dist/{todo-CkJ5UjWs.mjs → todo-BiLIZH4t.mjs} +3 -3
- package/dist/{todo-BaNaNZ8c.cjs → todo-CaYedmtq.cjs} +3 -3
- package/dist/{types-Cq-tvv9t.mjs → types-BKrZubg8.mjs} +45 -9
- package/dist/{types-Dabm17Ln.cjs → types-DbBPNIwf.cjs} +46 -9
- package/package.json +8 -8
|
@@ -2,15 +2,15 @@ import { homedir } from 'node:os';
|
|
|
2
2
|
import { unlink, rmdir, mkdir, lstat, readFile, writeFile, rename } from 'node:fs/promises';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { createHash, randomUUID } from 'node:crypto';
|
|
5
|
-
import { d as teamRequest, e as createTeamsClient } from './agentGuidance-
|
|
6
|
-
import { d as readCredentialsForConfiguredRelay } from './limits-
|
|
5
|
+
import { d as teamRequest, e as createTeamsClient } from './agentGuidance-ASxKHxBP.mjs';
|
|
6
|
+
import { d as readCredentialsForConfiguredRelay } from './limits-kjHZUlSp.mjs';
|
|
7
7
|
import { join, resolve, dirname } from 'node:path';
|
|
8
|
-
import { T as TEAM_SKILL } from './index-
|
|
8
|
+
import { T as TEAM_SKILL } from './index-CHI7iTa0.mjs';
|
|
9
9
|
import 'node:fs';
|
|
10
10
|
import 'tweetnacl';
|
|
11
11
|
import 'chalk';
|
|
12
12
|
import 'node:util';
|
|
13
|
-
import './types-
|
|
13
|
+
import './types-BKrZubg8.mjs';
|
|
14
14
|
import 'axios';
|
|
15
15
|
import 'node:events';
|
|
16
16
|
import 'socket.io-client';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { d as readCredentialsForConfiguredRelay, c as configuration } from './limits-
|
|
2
|
-
import { b as createBuiltinTodoClient, B as BUILTIN_TODO_SKILL } from './types-
|
|
3
|
-
import { c as readTeamScope, t as teamScopePath } from './agentGuidance-
|
|
1
|
+
import { d as readCredentialsForConfiguredRelay, c as configuration } from './limits-kjHZUlSp.mjs';
|
|
2
|
+
import { b as createBuiltinTodoClient, B as BUILTIN_TODO_SKILL } from './types-BKrZubg8.mjs';
|
|
3
|
+
import { c as readTeamScope, t as teamScopePath } from './agentGuidance-ASxKHxBP.mjs';
|
|
4
4
|
import 'node:fs/promises';
|
|
5
5
|
import 'node:fs';
|
|
6
6
|
import 'node:os';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var persistence = require('./limits-
|
|
4
|
-
var api = require('./types-
|
|
5
|
-
var agentGuidance = require('./agentGuidance-
|
|
3
|
+
var persistence = require('./limits-DRrdJ7gr.cjs');
|
|
4
|
+
var api = require('./types-DbBPNIwf.cjs');
|
|
5
|
+
var agentGuidance = require('./agentGuidance-6yh_wPwD.cjs');
|
|
6
6
|
require('node:fs/promises');
|
|
7
7
|
require('node:fs');
|
|
8
8
|
require('node:os');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import axios from 'axios';
|
|
2
|
-
import { l as logger, i as encodeBase64, j as encrypt, k as decrypt, m as decodeBase64, c as configuration, o as decryptBlob, q as prepareClipboardText, g as readSettings, r as readPersistedSessions, s as credentialRelayProblem, p as packageJson, t as readTrackedClaudeSessionIds, u as libsodiumEncryptForPublicKey, v as libsodiumPublicKeyFromSecretKey, x as getRandomBytes, y as redactLogValue } from './limits-
|
|
2
|
+
import { l as logger, i as encodeBase64, j as encrypt, k as decrypt, m as decodeBase64, c as configuration, o as decryptBlob, q as prepareClipboardText, g as readSettings, r as readPersistedSessions, s as credentialRelayProblem, p as packageJson, t as readTrackedClaudeSessionIds, u as libsodiumEncryptForPublicKey, v as libsodiumPublicKeyFromSecretKey, x as getRandomBytes, y as redactLogValue } from './limits-kjHZUlSp.mjs';
|
|
3
3
|
import { EventEmitter } from 'node:events';
|
|
4
4
|
import { io } from 'socket.io-client';
|
|
5
5
|
import * as z from 'zod';
|
|
@@ -31,7 +31,8 @@ const sessionRoleSchema = z.enum(["user", "agent"]);
|
|
|
31
31
|
const sessionTextEventSchema = z.object({
|
|
32
32
|
t: z.literal("text"),
|
|
33
33
|
text: z.string(),
|
|
34
|
-
thinking: z.boolean().optional()
|
|
34
|
+
thinking: z.boolean().optional(),
|
|
35
|
+
actualModel: z.string().optional()
|
|
35
36
|
});
|
|
36
37
|
const sessionServiceMessageEventSchema = z.object({
|
|
37
38
|
t: z.literal("service"),
|
|
@@ -778,6 +779,25 @@ const ContextUsageSchema = z$1.object({
|
|
|
778
779
|
contextWindow: z$1.number().finite().positive(),
|
|
779
780
|
updatedAt: z$1.number().finite().nonnegative()
|
|
780
781
|
});
|
|
782
|
+
const AgentVersionsSchema = z$1.object({
|
|
783
|
+
checkedAt: z$1.number(),
|
|
784
|
+
daemonPid: z$1.number(),
|
|
785
|
+
agents: z$1.array(z$1.object({
|
|
786
|
+
id: z$1.string(),
|
|
787
|
+
installed: z$1.string().nullable(),
|
|
788
|
+
latest: z$1.string().nullable(),
|
|
789
|
+
status: z$1.string()
|
|
790
|
+
}))
|
|
791
|
+
});
|
|
792
|
+
const AGENT_VERSION_SOURCES = [
|
|
793
|
+
{ id: "claude", label: "Claude Code", command: "claude", package: "@anthropic-ai/claude-code", docs: "https://code.claude.com/docs/en/setup" },
|
|
794
|
+
{ id: "codex", label: "Codex", command: "codex", package: "@openai/codex", docs: "https://github.com/openai/codex#installation-and-usage" },
|
|
795
|
+
{ id: "pi", label: "Pi", command: "pi", package: "@mariozechner/pi-coding-agent", docs: "https://github.com/badlogic/pi-mono/tree/main/packages/coding-agent" },
|
|
796
|
+
{ id: "gemini", label: "Gemini CLI", command: "gemini", package: "@google/gemini-cli", docs: "https://github.com/google-gemini/gemini-cli#installation" },
|
|
797
|
+
{ id: "opencode", label: "OpenCode", command: "opencode", package: "opencode-ai", docs: "https://opencode.ai/docs/" },
|
|
798
|
+
{ id: "openclaw", label: "OpenClaw", command: "openclaw", package: "openclaw", docs: "https://docs.openclaw.ai/install/updating" },
|
|
799
|
+
{ id: "claude-sdk", label: "Claude Agent SDK", command: null, package: "@anthropic-ai/claude-agent-sdk", docs: "https://github.com/anthropics/claude-agent-sdk-typescript" }
|
|
800
|
+
];
|
|
781
801
|
|
|
782
802
|
z$1.object({
|
|
783
803
|
teamsVersion: z$1.number().int().positive().optional(),
|
|
@@ -889,6 +909,8 @@ const ClosedTerminalRecordSchema = z$1.object({
|
|
|
889
909
|
closedAt: z$1.number()
|
|
890
910
|
});
|
|
891
911
|
z$1.object({
|
|
912
|
+
agentVersions: AgentVersionsSchema.optional(),
|
|
913
|
+
agentVersionEpoch: z$1.number().optional(),
|
|
892
914
|
status: z$1.union([
|
|
893
915
|
z$1.enum(["running", "shutting-down"]),
|
|
894
916
|
z$1.string()
|
|
@@ -2426,7 +2448,12 @@ function mapTaskLifecycleSystemMessage(message, state, envelopes) {
|
|
|
2426
2448
|
if (!subtype.startsWith("task_")) return;
|
|
2427
2449
|
if (raw.skip_transcript === true) return;
|
|
2428
2450
|
const toolUseId = typeof raw.tool_use_id === "string" && raw.tool_use_id.length > 0 ? raw.tool_use_id : null;
|
|
2429
|
-
if (!toolUseId
|
|
2451
|
+
if (!toolUseId) return;
|
|
2452
|
+
if (subtype === "task_started" && raw.task_type === "local_bash" && state.bashToolCalls?.has(toolUseId)) {
|
|
2453
|
+
(state.backgroundBashCalls ??= /* @__PURE__ */ new Set()).add(toolUseId);
|
|
2454
|
+
}
|
|
2455
|
+
const backgroundBash = state.backgroundBashCalls?.has(toolUseId) === true;
|
|
2456
|
+
if (!getAgentToolCalls(state).has(toolUseId) && !backgroundBash) return;
|
|
2430
2457
|
const subagent = ensureSessionSubagentIdForProviderSubagent(state, toolUseId);
|
|
2431
2458
|
const usage = raw.usage && typeof raw.usage === "object" ? {
|
|
2432
2459
|
...typeof raw.usage.tool_uses === "number" ? { toolUses: raw.usage.tool_uses } : {},
|
|
@@ -2434,7 +2461,7 @@ function mapTaskLifecycleSystemMessage(message, state, envelopes) {
|
|
|
2434
2461
|
...typeof raw.usage.duration_ms === "number" ? { durationMs: raw.usage.duration_ms } : {}
|
|
2435
2462
|
} : void 0;
|
|
2436
2463
|
if (subtype === "task_started") {
|
|
2437
|
-
rememberSubagentMeta(state, subagent, { description: raw.description, subagentType: raw.subagent_type });
|
|
2464
|
+
rememberSubagentMeta(state, subagent, { description: raw.description, subagentType: backgroundBash ? "background-command" : raw.subagent_type });
|
|
2438
2465
|
const turn = ensureTurn(state, envelopes);
|
|
2439
2466
|
getStartedSubagents(state).delete(subagent);
|
|
2440
2467
|
maybeEmitSubagentStart(state, turn, subagent, envelopes);
|
|
@@ -2523,14 +2550,15 @@ function mapClaudeLogMessageToSessionEnvelopesInternal(message, state) {
|
|
|
2523
2550
|
blockCursor = state.streamBlockCursor ?? 0;
|
|
2524
2551
|
state.streamBlockCursor = blockCursor + blocks.length;
|
|
2525
2552
|
}
|
|
2553
|
+
const actualModel = subagent && typeof message.message?.model === "string" && message.message.model.trim() ? { actualModel: message.message.model.trim() } : {};
|
|
2526
2554
|
const draftKey = (index) => apiMessageId ? streamKeyOf(apiMessageId, blockCursor + index) : void 0;
|
|
2527
2555
|
for (const [blockIndex, block] of blocks.entries()) {
|
|
2528
2556
|
if (block.type === "text" && typeof block.text === "string" && block.text.trim().length > 0) {
|
|
2529
|
-
envelopes.push(createEnvelope("agent", { t: "text", text: block.text }, { turn: turnId, subagent, claudeUuid, usage, streamKey: draftKey(blockIndex) }));
|
|
2557
|
+
envelopes.push(createEnvelope("agent", { t: "text", text: block.text, ...actualModel }, { turn: turnId, subagent, claudeUuid, usage, streamKey: draftKey(blockIndex) }));
|
|
2530
2558
|
continue;
|
|
2531
2559
|
}
|
|
2532
2560
|
if (block.type === "thinking" && typeof block.thinking === "string" && block.thinking.trim().length > 0) {
|
|
2533
|
-
envelopes.push(createEnvelope("agent", { t: "text", text: block.thinking, thinking: true }, { turn: turnId, subagent, claudeUuid, usage, streamKey: draftKey(blockIndex) }));
|
|
2561
|
+
envelopes.push(createEnvelope("agent", { t: "text", text: block.thinking, thinking: true, ...actualModel }, { turn: turnId, subagent, claudeUuid, usage, streamKey: draftKey(blockIndex) }));
|
|
2534
2562
|
continue;
|
|
2535
2563
|
}
|
|
2536
2564
|
if (block.type === "tool_use") {
|
|
@@ -2558,7 +2586,8 @@ function mapClaudeLogMessageToSessionEnvelopesInternal(message, state) {
|
|
|
2558
2586
|
}
|
|
2559
2587
|
continue;
|
|
2560
2588
|
}
|
|
2561
|
-
|
|
2589
|
+
if (name === "Bash") (state.bashToolCalls ??= /* @__PURE__ */ new Set()).add(call);
|
|
2590
|
+
const args = isSubagentTool(name) || name === "Bash" ? { ...baseArgs, sessionSubagent: sessionSubagentForCall } : baseArgs;
|
|
2562
2591
|
envelopes.push(createEnvelope("agent", {
|
|
2563
2592
|
t: "tool-call-start",
|
|
2564
2593
|
call,
|
|
@@ -2659,7 +2688,7 @@ function mapClaudeLogMessageToSessionEnvelopesInternal(message, state) {
|
|
|
2659
2688
|
continue;
|
|
2660
2689
|
}
|
|
2661
2690
|
}
|
|
2662
|
-
if (sessionSubagentForToolResult) {
|
|
2691
|
+
if (sessionSubagentForToolResult && !state.backgroundBashCalls?.has(block.tool_use_id)) {
|
|
2663
2692
|
maybeEmitSubagentStop(state, turnId, sessionSubagentForToolResult, envelopes);
|
|
2664
2693
|
}
|
|
2665
2694
|
}
|
|
@@ -13029,6 +13058,10 @@ class CodexAppServerClient {
|
|
|
13029
13058
|
if (!item || typeof item !== "object") {
|
|
13030
13059
|
return method.startsWith("item/");
|
|
13031
13060
|
}
|
|
13061
|
+
if ((method === "item/started" || method === "item/completed") && (item.type === "collabAgentToolCall" || item.type === "subAgentActivity")) {
|
|
13062
|
+
this.eventHandler?.({ type: "collab_agent_item", item });
|
|
13063
|
+
return true;
|
|
13064
|
+
}
|
|
13032
13065
|
if (method === "item/started" && item.type === "commandExecution") {
|
|
13033
13066
|
const callId = typeof item.id === "string" ? item.id : "";
|
|
13034
13067
|
this.eventHandler?.({
|
|
@@ -14139,6 +14172,8 @@ class ApiMachineClient {
|
|
|
14139
14172
|
* stale" so the FIRST keep-alive tick always probes and populates the
|
|
14140
14173
|
* machine metadata that a connecting/reconnecting web client reads. */
|
|
14141
14174
|
lastCliProbeAt = Date.now() - CLI_AVAILABILITY_RECHECK_MS;
|
|
14175
|
+
/** Stable across socket reconnects; a new client/run invalidates old version checks. */
|
|
14176
|
+
agentVersionEpoch = Date.now();
|
|
14142
14177
|
cliUpdateState = null;
|
|
14143
14178
|
cliUpdatePushChain = Promise.resolve();
|
|
14144
14179
|
claudeAuthState = null;
|
|
@@ -14899,6 +14934,7 @@ class ApiMachineClient {
|
|
|
14899
14934
|
pid: process.pid,
|
|
14900
14935
|
httpPort: this.machine.daemonState?.httpPort,
|
|
14901
14936
|
startedAt: now,
|
|
14937
|
+
agentVersionEpoch: this.agentVersionEpoch,
|
|
14902
14938
|
webTerminals: { updatedAt: now, terminals: initialTerminals },
|
|
14903
14939
|
// B-265 capability flag; restamped every connect so the
|
|
14904
14940
|
// web's `detectedAt >= startedAt` trust rule holds.
|
|
@@ -16263,4 +16299,4 @@ const RawJSONLinesSchema = z$1.discriminatedUnion("type", [
|
|
|
16263
16299
|
}).passthrough()
|
|
16264
16300
|
]);
|
|
16265
16301
|
|
|
16266
|
-
export {
|
|
16302
|
+
export { CodexAppServerClient as $, ApiClient as A, BUILTIN_TODO_SKILL as B, tmuxArgs as C, scrubTmuxClientEnv as D, decideMirrorBinding as E, MIRROR_BACKFILL_LINES_DEFAULT as F, mirrorLineKey as G, mirrorLocalId as H, InvalidateSync as I, detectCLIAvailability as J, detectResumeSupport as K, summarizeSpawnSessionForLog as L, MAX_CHAT_ATTACHMENT_SOURCE_BYTES as M, shellescape as N, fetchCliUpdateState as O, resolveCliUpdateCheckInterval as P, DEFAULT_CLI_UPDATE_CHECK_INTERVAL_MS as Q, RawJSONLinesSchema as R, STREAM_DELTA_MAX_CHARS as S, listVhTerminals as T, isValidTerminalId as U, readVhTerminal as V, sendToVhTerminal as W, ContextUsageSchema as X, TITLE_PROMPT_PREFIX as Y, BOARD_ANALYZER_PROMPT_PREFIX as Z, startOfflineReconnection as _, ApiSessionClient as a, api as a0, createBuiltinTodoClient as b, createEnvelope as c, contentLogMetadata as d, errorLogMetadata as e, connectionState as f, BUILTIN_TODO_DISCOVERY as g, delay as h, isValidSessionId as i, getProjectPath as j, initializeSandbox as k, AsyncLock as l, commandOnPath as m, deriveLocalCliUpdateSummary as n, AGENT_VERSION_SOURCES as o, projectPath as p, isClaudeSessionId as q, getLocalHappyAgentCredentialPath as r, streamKeyOf as s, readLocalHappyAgentCredentials as t, parseExactVersion as u, compareExactVersions as v, wrapCommand as w, extractCompleteLines as x, decideBackfill as y, parseTerminalHookPayload as z };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var axios = require('axios');
|
|
4
|
-
var persistence = require('./limits-
|
|
4
|
+
var persistence = require('./limits-DRrdJ7gr.cjs');
|
|
5
5
|
var node_events = require('node:events');
|
|
6
6
|
var socket_ioClient = require('socket.io-client');
|
|
7
7
|
var z = require('zod');
|
|
@@ -53,7 +53,8 @@ const sessionRoleSchema = z__namespace.enum(["user", "agent"]);
|
|
|
53
53
|
const sessionTextEventSchema = z__namespace.object({
|
|
54
54
|
t: z__namespace.literal("text"),
|
|
55
55
|
text: z__namespace.string(),
|
|
56
|
-
thinking: z__namespace.boolean().optional()
|
|
56
|
+
thinking: z__namespace.boolean().optional(),
|
|
57
|
+
actualModel: z__namespace.string().optional()
|
|
57
58
|
});
|
|
58
59
|
const sessionServiceMessageEventSchema = z__namespace.object({
|
|
59
60
|
t: z__namespace.literal("service"),
|
|
@@ -800,6 +801,25 @@ const ContextUsageSchema = z.z.object({
|
|
|
800
801
|
contextWindow: z.z.number().finite().positive(),
|
|
801
802
|
updatedAt: z.z.number().finite().nonnegative()
|
|
802
803
|
});
|
|
804
|
+
const AgentVersionsSchema = z.z.object({
|
|
805
|
+
checkedAt: z.z.number(),
|
|
806
|
+
daemonPid: z.z.number(),
|
|
807
|
+
agents: z.z.array(z.z.object({
|
|
808
|
+
id: z.z.string(),
|
|
809
|
+
installed: z.z.string().nullable(),
|
|
810
|
+
latest: z.z.string().nullable(),
|
|
811
|
+
status: z.z.string()
|
|
812
|
+
}))
|
|
813
|
+
});
|
|
814
|
+
const AGENT_VERSION_SOURCES = [
|
|
815
|
+
{ id: "claude", label: "Claude Code", command: "claude", package: "@anthropic-ai/claude-code", docs: "https://code.claude.com/docs/en/setup" },
|
|
816
|
+
{ id: "codex", label: "Codex", command: "codex", package: "@openai/codex", docs: "https://github.com/openai/codex#installation-and-usage" },
|
|
817
|
+
{ id: "pi", label: "Pi", command: "pi", package: "@mariozechner/pi-coding-agent", docs: "https://github.com/badlogic/pi-mono/tree/main/packages/coding-agent" },
|
|
818
|
+
{ id: "gemini", label: "Gemini CLI", command: "gemini", package: "@google/gemini-cli", docs: "https://github.com/google-gemini/gemini-cli#installation" },
|
|
819
|
+
{ id: "opencode", label: "OpenCode", command: "opencode", package: "opencode-ai", docs: "https://opencode.ai/docs/" },
|
|
820
|
+
{ id: "openclaw", label: "OpenClaw", command: "openclaw", package: "openclaw", docs: "https://docs.openclaw.ai/install/updating" },
|
|
821
|
+
{ id: "claude-sdk", label: "Claude Agent SDK", command: null, package: "@anthropic-ai/claude-agent-sdk", docs: "https://github.com/anthropics/claude-agent-sdk-typescript" }
|
|
822
|
+
];
|
|
803
823
|
|
|
804
824
|
z.z.object({
|
|
805
825
|
teamsVersion: z.z.number().int().positive().optional(),
|
|
@@ -911,6 +931,8 @@ const ClosedTerminalRecordSchema = z.z.object({
|
|
|
911
931
|
closedAt: z.z.number()
|
|
912
932
|
});
|
|
913
933
|
z.z.object({
|
|
934
|
+
agentVersions: AgentVersionsSchema.optional(),
|
|
935
|
+
agentVersionEpoch: z.z.number().optional(),
|
|
914
936
|
status: z.z.union([
|
|
915
937
|
z.z.enum(["running", "shutting-down"]),
|
|
916
938
|
z.z.string()
|
|
@@ -1347,7 +1369,7 @@ class RpcHandlerManager {
|
|
|
1347
1369
|
}
|
|
1348
1370
|
}
|
|
1349
1371
|
|
|
1350
|
-
const __dirname$1 = path.dirname(url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('types-
|
|
1372
|
+
const __dirname$1 = path.dirname(url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('types-DbBPNIwf.cjs', document.baseURI).href))));
|
|
1351
1373
|
function projectPath() {
|
|
1352
1374
|
const path$1 = path.resolve(__dirname$1, "..");
|
|
1353
1375
|
return path$1;
|
|
@@ -2448,7 +2470,12 @@ function mapTaskLifecycleSystemMessage(message, state, envelopes) {
|
|
|
2448
2470
|
if (!subtype.startsWith("task_")) return;
|
|
2449
2471
|
if (raw.skip_transcript === true) return;
|
|
2450
2472
|
const toolUseId = typeof raw.tool_use_id === "string" && raw.tool_use_id.length > 0 ? raw.tool_use_id : null;
|
|
2451
|
-
if (!toolUseId
|
|
2473
|
+
if (!toolUseId) return;
|
|
2474
|
+
if (subtype === "task_started" && raw.task_type === "local_bash" && state.bashToolCalls?.has(toolUseId)) {
|
|
2475
|
+
(state.backgroundBashCalls ??= /* @__PURE__ */ new Set()).add(toolUseId);
|
|
2476
|
+
}
|
|
2477
|
+
const backgroundBash = state.backgroundBashCalls?.has(toolUseId) === true;
|
|
2478
|
+
if (!getAgentToolCalls(state).has(toolUseId) && !backgroundBash) return;
|
|
2452
2479
|
const subagent = ensureSessionSubagentIdForProviderSubagent(state, toolUseId);
|
|
2453
2480
|
const usage = raw.usage && typeof raw.usage === "object" ? {
|
|
2454
2481
|
...typeof raw.usage.tool_uses === "number" ? { toolUses: raw.usage.tool_uses } : {},
|
|
@@ -2456,7 +2483,7 @@ function mapTaskLifecycleSystemMessage(message, state, envelopes) {
|
|
|
2456
2483
|
...typeof raw.usage.duration_ms === "number" ? { durationMs: raw.usage.duration_ms } : {}
|
|
2457
2484
|
} : void 0;
|
|
2458
2485
|
if (subtype === "task_started") {
|
|
2459
|
-
rememberSubagentMeta(state, subagent, { description: raw.description, subagentType: raw.subagent_type });
|
|
2486
|
+
rememberSubagentMeta(state, subagent, { description: raw.description, subagentType: backgroundBash ? "background-command" : raw.subagent_type });
|
|
2460
2487
|
const turn = ensureTurn(state, envelopes);
|
|
2461
2488
|
getStartedSubagents(state).delete(subagent);
|
|
2462
2489
|
maybeEmitSubagentStart(state, turn, subagent, envelopes);
|
|
@@ -2545,14 +2572,15 @@ function mapClaudeLogMessageToSessionEnvelopesInternal(message, state) {
|
|
|
2545
2572
|
blockCursor = state.streamBlockCursor ?? 0;
|
|
2546
2573
|
state.streamBlockCursor = blockCursor + blocks.length;
|
|
2547
2574
|
}
|
|
2575
|
+
const actualModel = subagent && typeof message.message?.model === "string" && message.message.model.trim() ? { actualModel: message.message.model.trim() } : {};
|
|
2548
2576
|
const draftKey = (index) => apiMessageId ? streamKeyOf(apiMessageId, blockCursor + index) : void 0;
|
|
2549
2577
|
for (const [blockIndex, block] of blocks.entries()) {
|
|
2550
2578
|
if (block.type === "text" && typeof block.text === "string" && block.text.trim().length > 0) {
|
|
2551
|
-
envelopes.push(createEnvelope("agent", { t: "text", text: block.text }, { turn: turnId, subagent, claudeUuid, usage, streamKey: draftKey(blockIndex) }));
|
|
2579
|
+
envelopes.push(createEnvelope("agent", { t: "text", text: block.text, ...actualModel }, { turn: turnId, subagent, claudeUuid, usage, streamKey: draftKey(blockIndex) }));
|
|
2552
2580
|
continue;
|
|
2553
2581
|
}
|
|
2554
2582
|
if (block.type === "thinking" && typeof block.thinking === "string" && block.thinking.trim().length > 0) {
|
|
2555
|
-
envelopes.push(createEnvelope("agent", { t: "text", text: block.thinking, thinking: true }, { turn: turnId, subagent, claudeUuid, usage, streamKey: draftKey(blockIndex) }));
|
|
2583
|
+
envelopes.push(createEnvelope("agent", { t: "text", text: block.thinking, thinking: true, ...actualModel }, { turn: turnId, subagent, claudeUuid, usage, streamKey: draftKey(blockIndex) }));
|
|
2556
2584
|
continue;
|
|
2557
2585
|
}
|
|
2558
2586
|
if (block.type === "tool_use") {
|
|
@@ -2580,7 +2608,8 @@ function mapClaudeLogMessageToSessionEnvelopesInternal(message, state) {
|
|
|
2580
2608
|
}
|
|
2581
2609
|
continue;
|
|
2582
2610
|
}
|
|
2583
|
-
|
|
2611
|
+
if (name === "Bash") (state.bashToolCalls ??= /* @__PURE__ */ new Set()).add(call);
|
|
2612
|
+
const args = isSubagentTool(name) || name === "Bash" ? { ...baseArgs, sessionSubagent: sessionSubagentForCall } : baseArgs;
|
|
2584
2613
|
envelopes.push(createEnvelope("agent", {
|
|
2585
2614
|
t: "tool-call-start",
|
|
2586
2615
|
call,
|
|
@@ -2681,7 +2710,7 @@ function mapClaudeLogMessageToSessionEnvelopesInternal(message, state) {
|
|
|
2681
2710
|
continue;
|
|
2682
2711
|
}
|
|
2683
2712
|
}
|
|
2684
|
-
if (sessionSubagentForToolResult) {
|
|
2713
|
+
if (sessionSubagentForToolResult && !state.backgroundBashCalls?.has(block.tool_use_id)) {
|
|
2685
2714
|
maybeEmitSubagentStop(state, turnId, sessionSubagentForToolResult, envelopes);
|
|
2686
2715
|
}
|
|
2687
2716
|
}
|
|
@@ -13051,6 +13080,10 @@ class CodexAppServerClient {
|
|
|
13051
13080
|
if (!item || typeof item !== "object") {
|
|
13052
13081
|
return method.startsWith("item/");
|
|
13053
13082
|
}
|
|
13083
|
+
if ((method === "item/started" || method === "item/completed") && (item.type === "collabAgentToolCall" || item.type === "subAgentActivity")) {
|
|
13084
|
+
this.eventHandler?.({ type: "collab_agent_item", item });
|
|
13085
|
+
return true;
|
|
13086
|
+
}
|
|
13054
13087
|
if (method === "item/started" && item.type === "commandExecution") {
|
|
13055
13088
|
const callId = typeof item.id === "string" ? item.id : "";
|
|
13056
13089
|
this.eventHandler?.({
|
|
@@ -14161,6 +14194,8 @@ class ApiMachineClient {
|
|
|
14161
14194
|
* stale" so the FIRST keep-alive tick always probes and populates the
|
|
14162
14195
|
* machine metadata that a connecting/reconnecting web client reads. */
|
|
14163
14196
|
lastCliProbeAt = Date.now() - CLI_AVAILABILITY_RECHECK_MS;
|
|
14197
|
+
/** Stable across socket reconnects; a new client/run invalidates old version checks. */
|
|
14198
|
+
agentVersionEpoch = Date.now();
|
|
14164
14199
|
cliUpdateState = null;
|
|
14165
14200
|
cliUpdatePushChain = Promise.resolve();
|
|
14166
14201
|
claudeAuthState = null;
|
|
@@ -14921,6 +14956,7 @@ class ApiMachineClient {
|
|
|
14921
14956
|
pid: process.pid,
|
|
14922
14957
|
httpPort: this.machine.daemonState?.httpPort,
|
|
14923
14958
|
startedAt: now,
|
|
14959
|
+
agentVersionEpoch: this.agentVersionEpoch,
|
|
14924
14960
|
webTerminals: { updatedAt: now, terminals: initialTerminals },
|
|
14925
14961
|
// B-265 capability flag; restamped every connect so the
|
|
14926
14962
|
// web's `detectedAt >= startedAt` trust rule holds.
|
|
@@ -16285,6 +16321,7 @@ const RawJSONLinesSchema = z.z.discriminatedUnion("type", [
|
|
|
16285
16321
|
}).passthrough()
|
|
16286
16322
|
]);
|
|
16287
16323
|
|
|
16324
|
+
exports.AGENT_VERSION_SOURCES = AGENT_VERSION_SOURCES;
|
|
16288
16325
|
exports.ApiClient = ApiClient;
|
|
16289
16326
|
exports.ApiSessionClient = ApiSessionClient;
|
|
16290
16327
|
exports.AsyncLock = AsyncLock;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "very-happy-cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.136",
|
|
4
4
|
"description": "Remote multi-agent workspace CLI with deep Claude integration, native terminal streaming, and self-hosting.",
|
|
5
5
|
"author": "Kirill Dubovitskiy",
|
|
6
6
|
"contributors": [
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
},
|
|
80
80
|
"dependencies": {
|
|
81
81
|
"@agentclientprotocol/sdk": "^0.14.1",
|
|
82
|
-
"@anthropic-ai/claude-agent-sdk": "
|
|
82
|
+
"@anthropic-ai/claude-agent-sdk": "0.3.267",
|
|
83
83
|
"@anthropic-ai/sandbox-runtime": "^0.0.37",
|
|
84
84
|
"@modelcontextprotocol/sdk": "1.30.0",
|
|
85
85
|
"@noble/ed25519": "^3.0.0",
|
|
@@ -113,12 +113,12 @@
|
|
|
113
113
|
"zod": "^4.0.0"
|
|
114
114
|
},
|
|
115
115
|
"optionalDependencies": {
|
|
116
|
-
"very-happy-tools-arm64-darwin": "0.2.
|
|
117
|
-
"very-happy-tools-x64-darwin": "0.2.
|
|
118
|
-
"very-happy-tools-arm64-linux": "0.2.
|
|
119
|
-
"very-happy-tools-x64-linux": "0.2.
|
|
120
|
-
"very-happy-tools-arm64-win32": "0.2.
|
|
121
|
-
"very-happy-tools-x64-win32": "0.2.
|
|
116
|
+
"very-happy-tools-arm64-darwin": "0.2.136",
|
|
117
|
+
"very-happy-tools-x64-darwin": "0.2.136",
|
|
118
|
+
"very-happy-tools-arm64-linux": "0.2.136",
|
|
119
|
+
"very-happy-tools-x64-linux": "0.2.136",
|
|
120
|
+
"very-happy-tools-arm64-win32": "0.2.136",
|
|
121
|
+
"very-happy-tools-x64-win32": "0.2.136"
|
|
122
122
|
},
|
|
123
123
|
"devDependencies": {
|
|
124
124
|
"@slopus/happy-wire": "workspace:*",
|