very-happy-cli 0.2.130 → 0.2.131
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-Co3atHW2.mjs → AcpBackend-DSRZM4lo.mjs} +2 -2
- package/dist/{AcpBackend-5slez7vM.cjs → AcpBackend-Dv_EKDIQ.cjs} +2 -2
- package/dist/{AcpSessionManager-B0sD6Zi7.mjs → AcpSessionManager-DtXOAeQ0.mjs} +1 -1
- package/dist/{AcpSessionManager-CxvVg8ec.cjs → AcpSessionManager-r8SLweP4.cjs} +1 -1
- package/dist/{agentGuidance-TjPzDO7d.cjs → agentGuidance-B4bH8Nuz.cjs} +1 -1
- package/dist/{agentGuidance-7pJxf_3b.mjs → agentGuidance-CeuhVA2K.mjs} +1 -1
- package/dist/codex/happyMcpStdioBridge.cjs +2 -2
- package/dist/codex/happyMcpStdioBridge.mjs +2 -2
- package/dist/{config-BWu8j7bO.mjs → config-Ur8QEJ0U.mjs} +4 -4
- package/dist/{config-B4Md4FvK.cjs → config-onxMcdX3.cjs} +4 -4
- package/dist/{index-DksoP9b2.cjs → index-B1hbB5R7.cjs} +14 -7
- package/dist/{index-C7TA3haC.cjs → index-B5Vv72dN.cjs} +70 -24
- package/dist/{index-BUhcXX8R.mjs → index-BPYVCjjs.mjs} +66 -20
- package/dist/{index-C13U8MkT.mjs → index-BXB-84P_.mjs} +4 -4
- package/dist/{index-Ds0aHXiU.cjs → index-BjctcFpG.cjs} +4 -4
- package/dist/{index-CdOVizh_.mjs → index-CsfUI8Bw.mjs} +15 -8
- package/dist/index.cjs +4 -4
- package/dist/index.mjs +4 -4
- package/dist/{installTerminalHooks-kUC6I6Rn.mjs → installTerminalHooks-DLwx6m7I.mjs} +4 -4
- package/dist/{installTerminalHooks-cNXov61F.cjs → installTerminalHooks-IaEGKZDR.cjs} +4 -4
- package/dist/lib.cjs +2 -2
- package/dist/lib.d.cts +32 -22
- package/dist/lib.d.mts +32 -22
- package/dist/lib.mjs +2 -2
- package/dist/{limits-CIcZA0Bn.mjs → limits-BusZ5sPV.mjs} +7 -7
- package/dist/{limits-BhK6ovLz.cjs → limits-C9bJJEyR.cjs} +7 -7
- package/dist/{mcp-D5uyhbfB.mjs → mcp-CZJM3obK.mjs} +4 -4
- package/dist/{mcp-CNX1qErQ.cjs → mcp-D4_4kl0R.cjs} +4 -4
- package/dist/{runGemini-DvV6X_GE.cjs → runGemini-CRoqO5Mf.cjs} +6 -6
- package/dist/{runGemini-BQd3qlVY.mjs → runGemini-DGHhBbmk.mjs} +6 -6
- package/dist/{runOpenClaw-jxvPz3bo.cjs → runOpenClaw-BzY__v8T.cjs} +5 -5
- package/dist/{runOpenClaw-BgtE2jKF.mjs → runOpenClaw-Ca9ygi8M.mjs} +5 -5
- package/dist/{send-BdhUFGTm.mjs → send-B1lln_bW.mjs} +4 -4
- package/dist/{send-Di8Q32Ds.cjs → send-CkfdImmJ.cjs} +4 -4
- package/dist/{sessions-Bo2THj4y.mjs → sessions-Cyzh822v.mjs} +4 -4
- package/dist/{sessions-eaAew6IP.cjs → sessions-D4cvTe7G.cjs} +4 -4
- package/dist/{spawn-CJxg1JUO.mjs → spawn-CdOt7Cv_.mjs} +4 -4
- package/dist/{spawn-6GfCYB5i.cjs → spawn-ID9-RfTN.cjs} +4 -4
- package/dist/{teams-CHGj90rR.mjs → teams-Bf2D8dwL.mjs} +4 -4
- package/dist/{teams-WdwFtptw.cjs → teams-CZ9xg-Rv.cjs} +4 -4
- package/dist/{todo-C8hDSNBP.mjs → todo-9iv7_n7i.mjs} +3 -3
- package/dist/{todo-C-wktj2K.cjs → todo-DK3L93BC.cjs} +3 -3
- package/dist/{types-QB33ckXt.cjs → types-B20MYc5R.cjs} +9 -2
- package/dist/{types-B-ySoSY9.mjs → types-lFZhC_6M.mjs} +8 -2
- package/package.json +7 -7
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(import.meta.url);import chalk from 'chalk';
|
|
2
2
|
import os, { homedir, userInfo, tmpdir } from 'node:os';
|
|
3
3
|
import { randomUUID, randomBytes, createHash as createHash$1, timingSafeEqual } from 'node:crypto';
|
|
4
|
-
import { j as getProjectPath, g as BUILTIN_TODO_DISCOVERY, p as projectPath, k as initializeSandbox, w as wrapCommand, d as contentLogMetadata, I as InvalidateSync, R as RawJSONLinesSchema, h as delay, l as AsyncLock, S as STREAM_DELTA_MAX_CHARS, M as MAX_CHAT_ATTACHMENT_SOURCE_BYTES, m as commandOnPath, n as deriveLocalCliUpdateSummary, o as isClaudeSessionId, q as getLocalHappyAgentCredentialPath, r as readLocalHappyAgentCredentials, t as parseExactVersion, u as compareExactVersions, v as extractCompleteLines, x as decideBackfill, y as parseTerminalHookPayload, z as tmuxArgs, C as scrubTmuxClientEnv, D as decideMirrorBinding, E as MIRROR_BACKFILL_LINES_DEFAULT, F as mirrorLineKey, G as mirrorLocalId, H as detectCLIAvailability, J as detectResumeSupport, K as summarizeSpawnSessionForLog, L as shellescape, A as ApiClient, N as fetchCliUpdateState, O as resolveCliUpdateCheckInterval, P as DEFAULT_CLI_UPDATE_CHECK_INTERVAL_MS, i as isValidSessionId, Q as listVhTerminals, T as isValidTerminalId, U as readVhTerminal, V as sendToVhTerminal, W as
|
|
5
|
-
import { z as readDaemonState, l as logger, c as configuration, A as clearDaemonState, B as ensurePrivateDirectory, D as hardenPrivateFile, p as packageJson, g as readSettings, E as readCredentials, s as credentialRelayProblem, i as encodeBase64, F as readSettingsOutcome, G as updateSettings, H as encodeBase64Url, m as decodeBase64, I as writeCredentialsLegacy, J as writeCredentialsDataKey, d as readCredentialsForConfiguredRelay, j as encrypt, r as readPersistedSessions, w as writePrivateFileSync, K as decryptWithDataKey, L as decryptLegacy, M as persistSession, k as decrypt, f as ensurePrivateDirectorySync, N as acquireDaemonLock, O as deletePersistedSessions, P as writeDaemonState, Q as writeSettings, R as releaseDaemonLock, C as CLIPBOARD_TOOL_NAME, a as CLIPBOARD_TOOL_TITLE, b as CLIPBOARD_TOOL_DESCRIPTION, e as CLIPBOARD_MAX_BYTES, S as clearCredentials, T as clearMachineId, U as SandboxConfigSchema, V as getLatestDaemonLog } from './limits-
|
|
4
|
+
import { j as getProjectPath, g as BUILTIN_TODO_DISCOVERY, p as projectPath, k as initializeSandbox, w as wrapCommand, d as contentLogMetadata, I as InvalidateSync, R as RawJSONLinesSchema, h as delay, l as AsyncLock, S as STREAM_DELTA_MAX_CHARS, M as MAX_CHAT_ATTACHMENT_SOURCE_BYTES, m as commandOnPath, n as deriveLocalCliUpdateSummary, o as isClaudeSessionId, q as getLocalHappyAgentCredentialPath, r as readLocalHappyAgentCredentials, t as parseExactVersion, u as compareExactVersions, v as extractCompleteLines, x as decideBackfill, y as parseTerminalHookPayload, z as tmuxArgs, C as scrubTmuxClientEnv, D as decideMirrorBinding, E as MIRROR_BACKFILL_LINES_DEFAULT, F as mirrorLineKey, G as mirrorLocalId, H as detectCLIAvailability, J as detectResumeSupport, K as summarizeSpawnSessionForLog, L as shellescape, A as ApiClient, N as fetchCliUpdateState, O as resolveCliUpdateCheckInterval, P as DEFAULT_CLI_UPDATE_CHECK_INTERVAL_MS, i as isValidSessionId, Q as listVhTerminals, T as isValidTerminalId, U as readVhTerminal, V as sendToVhTerminal, W as ContextUsageSchema, X as TITLE_PROMPT_PREFIX, Y as BOARD_ANALYZER_PROMPT_PREFIX, f as connectionState, Z as startOfflineReconnection, c as createEnvelope, _ as CodexAppServerClient } from './types-lFZhC_6M.mjs';
|
|
5
|
+
import { z as readDaemonState, l as logger, c as configuration, A as clearDaemonState, B as ensurePrivateDirectory, D as hardenPrivateFile, p as packageJson, g as readSettings, E as readCredentials, s as credentialRelayProblem, i as encodeBase64, F as readSettingsOutcome, G as updateSettings, H as encodeBase64Url, m as decodeBase64, I as writeCredentialsLegacy, J as writeCredentialsDataKey, d as readCredentialsForConfiguredRelay, j as encrypt, r as readPersistedSessions, w as writePrivateFileSync, K as decryptWithDataKey, L as decryptLegacy, M as persistSession, k as decrypt, f as ensurePrivateDirectorySync, N as acquireDaemonLock, O as deletePersistedSessions, P as writeDaemonState, Q as writeSettings, R as releaseDaemonLock, C as CLIPBOARD_TOOL_NAME, a as CLIPBOARD_TOOL_TITLE, b as CLIPBOARD_TOOL_DESCRIPTION, e as CLIPBOARD_MAX_BYTES, S as clearCredentials, T as clearMachineId, U as SandboxConfigSchema, V as getLatestDaemonLog } from './limits-BusZ5sPV.mjs';
|
|
6
6
|
import spawn$1, { spawn } from 'cross-spawn';
|
|
7
7
|
import path, { join, resolve, basename, isAbsolute, dirname, sep, delimiter, normalize } from 'node:path';
|
|
8
8
|
import { createInterface } from 'node:readline';
|
|
9
9
|
import { existsSync, readFileSync, readdirSync, statSync, mkdirSync, unlinkSync, renameSync, writeFileSync, accessSync, constants, openSync, fsyncSync, closeSync, rmSync as rmSync$1, chmodSync as chmodSync$1 } from 'node:fs';
|
|
10
|
-
import { f as trimIdent, A as AGENT_GUIDANCE, t as teamScopePath, T as TeamConnectionPreflightError, e as createTeamsClient, P as PREVIEW_TOOL_NAME, R as REPORT_PROGRESS_TOOL_NAME, g as TEAM_TOOL_NAMES, r as registerTeamsTools, a as PREVIEW_TOOL_TITLE, b as PREVIEW_TOOL_DESCRIPTION, h as REPORT_PROGRESS_TOOL_TITLE, i as REPORT_PROGRESS_TOOL_DESCRIPTION } from './agentGuidance-
|
|
10
|
+
import { f as trimIdent, A as AGENT_GUIDANCE, t as teamScopePath, T as TeamConnectionPreflightError, e as createTeamsClient, P as PREVIEW_TOOL_NAME, R as REPORT_PROGRESS_TOOL_NAME, g as TEAM_TOOL_NAMES, r as registerTeamsTools, a as PREVIEW_TOOL_TITLE, b as PREVIEW_TOOL_DESCRIPTION, h as REPORT_PROGRESS_TOOL_TITLE, i as REPORT_PROGRESS_TOOL_DESCRIPTION } from './agentGuidance-CeuhVA2K.mjs';
|
|
11
11
|
import { readFile, writeFile, rename, unlink, mkdir, symlink, rm, readlink, lstat, stat, open as open$1, appendFile } from 'node:fs/promises';
|
|
12
12
|
import fs, { watch, access } from 'fs/promises';
|
|
13
13
|
import { useStdout, useInput, Box, Text, render } from 'ink';
|
|
@@ -8873,6 +8873,24 @@ export default async function(pi) {
|
|
|
8873
8873
|
const {readFile} = await import('node:fs/promises');
|
|
8874
8874
|
const {join} = await import('node:path');
|
|
8875
8875
|
const {homedir} = await import('node:os');
|
|
8876
|
+
const contextEndpoint = process.env.HAPPY_CONTEXT_USAGE_URL;
|
|
8877
|
+
if (contextEndpoint) {
|
|
8878
|
+
const target = new URL(contextEndpoint);
|
|
8879
|
+
if (target.origin !== url.origin || !target.pathname.startsWith('/runtime-context/')) throw new Error('Very Happy context must be local');
|
|
8880
|
+
let reporting = Promise.resolve();
|
|
8881
|
+
for (const name of ['session_start', 'session_switch', 'session_compact', 'model_select', 'turn_end', 'agent_end']) {
|
|
8882
|
+
pi.on(name, async (_event, ctx) => {
|
|
8883
|
+
const usage = ctx.getContextUsage?.();
|
|
8884
|
+
const contextWindow = usage?.contextWindow ?? ctx.model?.contextWindow;
|
|
8885
|
+
if (!(contextWindow > 0)) return;
|
|
8886
|
+
const snapshot = {source:'pi', tokens:usage?.tokens ?? null, contextWindow};
|
|
8887
|
+
reporting = reporting.catch(() => {}).then(async () => {
|
|
8888
|
+
try { await fetch(contextEndpoint, {method:'POST', redirect:'error', headers:{'content-type':'application/json'}, body:JSON.stringify(snapshot), signal:AbortSignal.timeout(2000)}); } catch {}
|
|
8889
|
+
});
|
|
8890
|
+
await reporting;
|
|
8891
|
+
});
|
|
8892
|
+
}
|
|
8893
|
+
}
|
|
8876
8894
|
pi.on('tool_call', async (event, ctx) => {
|
|
8877
8895
|
let mode = process.env.HAPPY_PERMISSION_MODE || 'default';
|
|
8878
8896
|
const sid = process.env.HAPPY_SESSION_ID;
|
|
@@ -9596,6 +9614,10 @@ function createTeamWorker(deps) {
|
|
|
9596
9614
|
await deps.stopAndWait(op.sessionId);
|
|
9597
9615
|
await archiveSession(op.sessionId);
|
|
9598
9616
|
}
|
|
9617
|
+
if (team.archivedAt !== void 0) {
|
|
9618
|
+
await complete(op, receipt);
|
|
9619
|
+
return;
|
|
9620
|
+
}
|
|
9599
9621
|
const origins = team.operations.filter((candidate) => candidate.type === "spawn" && candidate.botId === op.botId && candidate.generation === op.generation && candidate.sessionId === op.sessionId);
|
|
9600
9622
|
if (origins.length !== 1) throw new Error("Original worktree ownership is unknown; manual reconciliation required");
|
|
9601
9623
|
const resource = readReceipt(home, origins[0].id);
|
|
@@ -9680,7 +9702,7 @@ Use the teams tools to inspect current task state before acting. This message is
|
|
|
9680
9702
|
const status = axios.isAxiosError(error) ? error.response?.status : void 0;
|
|
9681
9703
|
if (status !== 404) deps.log("Teams schedule advancement unavailable; regular reconciliation continues");
|
|
9682
9704
|
}
|
|
9683
|
-
const { data } = await http.get("/v1/teams/operations", { params: { machineId: deps.machineId, schedulesVersion: 1, teamLaunchVersion: 1 } });
|
|
9705
|
+
const { data } = await http.get("/v1/teams/operations", { params: { machineId: deps.machineId, schedulesVersion: 1, teamLaunchVersion: 1, teamArchiveVersion: 1 } });
|
|
9684
9706
|
knownSessionIds = new Set((data.teams ?? []).flatMap((team) => team.bots.flatMap((bot) => bot.sessionId ? [bot.sessionId] : [])));
|
|
9685
9707
|
for (const op of data.operations) {
|
|
9686
9708
|
if (closed) break;
|
|
@@ -11762,7 +11784,30 @@ async function startHappyServer(client, options) {
|
|
|
11762
11784
|
}
|
|
11763
11785
|
}
|
|
11764
11786
|
};
|
|
11787
|
+
const contextPath = "/runtime-context/" + randomUUID();
|
|
11765
11788
|
const server = createServer(async (req, res) => {
|
|
11789
|
+
if (req.url?.startsWith("/runtime-context/")) {
|
|
11790
|
+
if (!options?.onContextUsage || req.url !== contextPath || req.method !== "POST" || req.headers.origin) {
|
|
11791
|
+
res.writeHead(403).end();
|
|
11792
|
+
return;
|
|
11793
|
+
}
|
|
11794
|
+
try {
|
|
11795
|
+
let body = "";
|
|
11796
|
+
for await (const chunk of req) {
|
|
11797
|
+
body += chunk.toString();
|
|
11798
|
+
if (Buffer.byteLength(body) > 2048) {
|
|
11799
|
+
res.writeHead(413).end();
|
|
11800
|
+
return;
|
|
11801
|
+
}
|
|
11802
|
+
}
|
|
11803
|
+
const usage = ContextUsageSchema.parse({ ...JSON.parse(body), updatedAt: Date.now() });
|
|
11804
|
+
options.onContextUsage(usage);
|
|
11805
|
+
res.writeHead(204).end();
|
|
11806
|
+
} catch {
|
|
11807
|
+
if (!res.headersSent) res.writeHead(400).end();
|
|
11808
|
+
}
|
|
11809
|
+
return;
|
|
11810
|
+
}
|
|
11766
11811
|
const mcp = createMcpServer(handlers, options, client.sessionId);
|
|
11767
11812
|
try {
|
|
11768
11813
|
const transport = new StreamableHTTPServerTransport({
|
|
@@ -11796,6 +11841,7 @@ async function startHappyServer(client, options) {
|
|
|
11796
11841
|
logger.debug(`[happyMCP] server:ready sessionId=${client.sessionId} url=${baseUrl.toString()}`);
|
|
11797
11842
|
return {
|
|
11798
11843
|
url: baseUrl.toString(),
|
|
11844
|
+
contextUsageUrl: options?.onContextUsage ? new URL(contextPath, baseUrl).toString() : void 0,
|
|
11799
11845
|
toolNames: [
|
|
11800
11846
|
"change_title",
|
|
11801
11847
|
CLIPBOARD_TOOL_NAME,
|
|
@@ -12063,7 +12109,7 @@ function registerSideQuestionHandler(rpc, deps) {
|
|
|
12063
12109
|
const retainMs = deps.retainMs ?? SIDE_QUESTION_RETAIN_MS;
|
|
12064
12110
|
const maxRunMs = deps.maxRunMs ?? SIDE_QUESTION_MAX_RUN_MS;
|
|
12065
12111
|
const run = deps.run ?? (async (input) => {
|
|
12066
|
-
const { query } = await import('./index-
|
|
12112
|
+
const { query } = await import('./index-BXB-84P_.mjs');
|
|
12067
12113
|
return runSideQuestion(query, input);
|
|
12068
12114
|
});
|
|
12069
12115
|
const slots = /* @__PURE__ */ new Map();
|
|
@@ -17080,7 +17126,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
17080
17126
|
process.exit(0);
|
|
17081
17127
|
} else if (subcommand === "install-terminal-hooks") {
|
|
17082
17128
|
try {
|
|
17083
|
-
const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await import('./installTerminalHooks-
|
|
17129
|
+
const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await import('./installTerminalHooks-DLwx6m7I.mjs');
|
|
17084
17130
|
const command = parseTerminalHooksArgs(args.slice(1));
|
|
17085
17131
|
if (command.action === "help") {
|
|
17086
17132
|
console.log(TERMINAL_HOOKS_HELP);
|
|
@@ -17097,7 +17143,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
17097
17143
|
}
|
|
17098
17144
|
} else if (subcommand === "spawn") {
|
|
17099
17145
|
try {
|
|
17100
|
-
const { handleSpawnCommand } = await import('./spawn-
|
|
17146
|
+
const { handleSpawnCommand } = await import('./spawn-CdOt7Cv_.mjs');
|
|
17101
17147
|
await handleSpawnCommand(args.slice(1));
|
|
17102
17148
|
} catch (error) {
|
|
17103
17149
|
console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
|
|
@@ -17109,7 +17155,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
17109
17155
|
return;
|
|
17110
17156
|
} else if (subcommand === "sessions") {
|
|
17111
17157
|
try {
|
|
17112
|
-
const { handleSessionsCommand } = await import('./sessions-
|
|
17158
|
+
const { handleSessionsCommand } = await import('./sessions-Cyzh822v.mjs');
|
|
17113
17159
|
await handleSessionsCommand(args.slice(1));
|
|
17114
17160
|
} catch (error) {
|
|
17115
17161
|
console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
|
|
@@ -17121,7 +17167,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
17121
17167
|
return;
|
|
17122
17168
|
} else if (subcommand === "send") {
|
|
17123
17169
|
try {
|
|
17124
|
-
const { handleSendCommand } = await import('./send-
|
|
17170
|
+
const { handleSendCommand } = await import('./send-B1lln_bW.mjs');
|
|
17125
17171
|
await handleSendCommand(args.slice(1));
|
|
17126
17172
|
} catch (error) {
|
|
17127
17173
|
console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
|
|
@@ -17227,9 +17273,9 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
17227
17273
|
if (geminiSubcommand === "project" && args[2] === "set" && args[3]) {
|
|
17228
17274
|
const projectId = args[3];
|
|
17229
17275
|
try {
|
|
17230
|
-
const { saveGoogleCloudProjectToConfig } = await import('./config-
|
|
17231
|
-
const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await import('./limits-
|
|
17232
|
-
const { ApiClient: ApiClient2 } = await import('./types-
|
|
17276
|
+
const { saveGoogleCloudProjectToConfig } = await import('./config-Ur8QEJ0U.mjs');
|
|
17277
|
+
const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await import('./limits-BusZ5sPV.mjs').then(function (n) { return n.W; });
|
|
17278
|
+
const { ApiClient: ApiClient2 } = await import('./types-lFZhC_6M.mjs').then(function (n) { return n.$; });
|
|
17233
17279
|
let userEmail = void 0;
|
|
17234
17280
|
try {
|
|
17235
17281
|
const credentials = await readCredentialsForConfiguredRelay2();
|
|
@@ -17260,7 +17306,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
17260
17306
|
}
|
|
17261
17307
|
if (geminiSubcommand === "project" && args[2] === "get") {
|
|
17262
17308
|
try {
|
|
17263
|
-
const { readGeminiLocalConfig } = await import('./config-
|
|
17309
|
+
const { readGeminiLocalConfig } = await import('./config-Ur8QEJ0U.mjs');
|
|
17264
17310
|
const config = readGeminiLocalConfig();
|
|
17265
17311
|
if (config.googleCloudProject) {
|
|
17266
17312
|
console.log(`Current Google Cloud Project: ${config.googleCloudProject}`);
|
|
@@ -17300,7 +17346,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
17300
17346
|
process.exit(0);
|
|
17301
17347
|
}
|
|
17302
17348
|
try {
|
|
17303
|
-
const { runGemini } = await import('./runGemini-
|
|
17349
|
+
const { runGemini } = await import('./runGemini-DGHhBbmk.mjs');
|
|
17304
17350
|
let startedBy = void 0;
|
|
17305
17351
|
for (let i = 1; i < args.length; i++) {
|
|
17306
17352
|
if (args[i] === "--started-by") {
|
|
@@ -17330,7 +17376,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
17330
17376
|
}
|
|
17331
17377
|
};
|
|
17332
17378
|
try {
|
|
17333
|
-
const { runAcp, resolveAcpAgentConfig } = await import('./index-
|
|
17379
|
+
const { runAcp, resolveAcpAgentConfig } = await import('./index-CsfUI8Bw.mjs');
|
|
17334
17380
|
const parsed = parsePiRunnerArgs(args.slice(1));
|
|
17335
17381
|
const resolved = resolveAcpAgentConfig(["pi", ...parsed.passthrough]);
|
|
17336
17382
|
const { credentials } = await authAndSetupMachineIfNeeded();
|
|
@@ -17358,7 +17404,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
17358
17404
|
return;
|
|
17359
17405
|
} else if (subcommand === "acp") {
|
|
17360
17406
|
try {
|
|
17361
|
-
const { runAcp, resolveAcpAgentConfig } = await import('./index-
|
|
17407
|
+
const { runAcp, resolveAcpAgentConfig } = await import('./index-CsfUI8Bw.mjs');
|
|
17362
17408
|
let startedBy = void 0;
|
|
17363
17409
|
let verbose = false;
|
|
17364
17410
|
const acpArgs = [];
|
|
@@ -17398,7 +17444,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
17398
17444
|
return;
|
|
17399
17445
|
} else if (subcommand === "openclaw") {
|
|
17400
17446
|
try {
|
|
17401
|
-
const { runOpenClaw } = await import('./runOpenClaw-
|
|
17447
|
+
const { runOpenClaw } = await import('./runOpenClaw-Ca9ygi8M.mjs');
|
|
17402
17448
|
let startedBy = void 0;
|
|
17403
17449
|
let verbose = false;
|
|
17404
17450
|
let gatewayUrl;
|
|
@@ -17449,7 +17495,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
17449
17495
|
return;
|
|
17450
17496
|
} else if (subcommand === "todo") {
|
|
17451
17497
|
try {
|
|
17452
|
-
const { handleTodoCommand } = await import('./todo-
|
|
17498
|
+
const { handleTodoCommand } = await import('./todo-9iv7_n7i.mjs');
|
|
17453
17499
|
await handleTodoCommand(args.slice(1));
|
|
17454
17500
|
} catch (error) {
|
|
17455
17501
|
console.error(JSON.stringify({ error: error instanceof Error ? error.message : "Todo command failed" }));
|
|
@@ -17458,7 +17504,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
17458
17504
|
return;
|
|
17459
17505
|
} else if (subcommand === "teams") {
|
|
17460
17506
|
try {
|
|
17461
|
-
const { handleTeamsCommand } = await import('./teams-
|
|
17507
|
+
const { handleTeamsCommand } = await import('./teams-Bf2D8dwL.mjs');
|
|
17462
17508
|
await handleTeamsCommand(args.slice(1));
|
|
17463
17509
|
} catch (error) {
|
|
17464
17510
|
console.error(error instanceof Error ? error.message : "Teams command failed");
|
|
@@ -17467,7 +17513,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
17467
17513
|
return;
|
|
17468
17514
|
} else if (subcommand === "mcp" && args.length === 1) {
|
|
17469
17515
|
try {
|
|
17470
|
-
const { handleMcpCommand } = await import('./mcp-
|
|
17516
|
+
const { handleMcpCommand } = await import('./mcp-CZJM3obK.mjs');
|
|
17471
17517
|
await handleMcpCommand();
|
|
17472
17518
|
} catch (error) {
|
|
17473
17519
|
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-BPYVCjjs.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-lFZhC_6M.mjs';
|
|
7
7
|
import 'axios';
|
|
8
|
-
import './limits-
|
|
8
|
+
import './limits-BusZ5sPV.mjs';
|
|
9
9
|
import 'node:fs/promises';
|
|
10
10
|
import 'node:fs';
|
|
11
11
|
import 'node:path';
|
|
@@ -29,7 +29,7 @@ import 'fs';
|
|
|
29
29
|
import 'node:readline';
|
|
30
30
|
import '@anthropic-ai/sandbox-runtime';
|
|
31
31
|
import 'expo-server-sdk';
|
|
32
|
-
import './agentGuidance-
|
|
32
|
+
import './agentGuidance-CeuhVA2K.mjs';
|
|
33
33
|
import 'ink';
|
|
34
34
|
import 'react';
|
|
35
35
|
import 'ps-list';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-B5Vv72dN.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-B20MYc5R.cjs');
|
|
9
9
|
require('axios');
|
|
10
|
-
require('./limits-
|
|
10
|
+
require('./limits-C9bJJEyR.cjs');
|
|
11
11
|
require('node:fs/promises');
|
|
12
12
|
require('node:fs');
|
|
13
13
|
require('node:path');
|
|
@@ -31,7 +31,7 @@ require('fs');
|
|
|
31
31
|
require('node:readline');
|
|
32
32
|
require('@anthropic-ai/sandbox-runtime');
|
|
33
33
|
require('expo-server-sdk');
|
|
34
|
-
require('./agentGuidance-
|
|
34
|
+
require('./agentGuidance-B4bH8Nuz.cjs');
|
|
35
35
|
require('ink');
|
|
36
36
|
require('react');
|
|
37
37
|
require('ps-list');
|
|
@@ -1,9 +1,9 @@
|
|
|
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 { c as configuration, g as readSettings, i as encodeBase64, l as logger } from './limits-
|
|
4
|
-
import { A as AcpSessionManager } from './AcpSessionManager-
|
|
5
|
-
import { f as connectionState, A as ApiClient, p as projectPath, g as BUILTIN_TODO_DISCOVERY } from './types-
|
|
6
|
-
import { P as PI_TEAMS_EXTENSION, n as initialMachineMetadata, o as createSessionMetadata, u as setupOfflineReconnection, v as notifyDaemonSessionStarted, z as StreamRelay, x as MessageQueue2, B as hashObject, C as startHappyServer, E as registerAgentAttachmentDownloads, F as TitleGenerator, y as registerKillSessionHandler, H as CLAUDE_ATTACHMENT_KINDS, I as stageClaudeAttachments, J as appendStagedAttachmentsToPrompt, K as BasePermissionHandler, L as writeSessionModeFile, N as normalizeAcpPermissionMode, O as removeSessionModeFile } from './index-
|
|
1
|
+
import { D as DefaultTransport, A as AcpBackend } from './AcpBackend-DSRZM4lo.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-DSRZM4lo.mjs';
|
|
3
|
+
import { c as configuration, g as readSettings, i as encodeBase64, l as logger } from './limits-BusZ5sPV.mjs';
|
|
4
|
+
import { A as AcpSessionManager } from './AcpSessionManager-DtXOAeQ0.mjs';
|
|
5
|
+
import { f as connectionState, A as ApiClient, p as projectPath, g as BUILTIN_TODO_DISCOVERY } from './types-lFZhC_6M.mjs';
|
|
6
|
+
import { P as PI_TEAMS_EXTENSION, n as initialMachineMetadata, o as createSessionMetadata, u as setupOfflineReconnection, v as notifyDaemonSessionStarted, z as StreamRelay, x as MessageQueue2, B as hashObject, C as startHappyServer, E as registerAgentAttachmentDownloads, F as TitleGenerator, y as registerKillSessionHandler, H as CLAUDE_ATTACHMENT_KINDS, I as stageClaudeAttachments, J as appendStagedAttachmentsToPrompt, K as BasePermissionHandler, L as writeSessionModeFile, N as normalizeAcpPermissionMode, O as removeSessionModeFile } from './index-BPYVCjjs.mjs';
|
|
7
7
|
import { mkdir, chmod, writeFile, rename } from 'node:fs/promises';
|
|
8
8
|
import { randomUUID } from 'node:crypto';
|
|
9
9
|
import { join } from 'node:path';
|
|
@@ -32,7 +32,7 @@ import 'fs';
|
|
|
32
32
|
import 'node:readline';
|
|
33
33
|
import '@anthropic-ai/sandbox-runtime';
|
|
34
34
|
import 'expo-server-sdk';
|
|
35
|
-
import './agentGuidance-
|
|
35
|
+
import './agentGuidance-CeuhVA2K.mjs';
|
|
36
36
|
import 'ink';
|
|
37
37
|
import 'react';
|
|
38
38
|
import '@anthropic-ai/claude-agent-sdk';
|
|
@@ -706,7 +706,13 @@ async function runAcp(opts) {
|
|
|
706
706
|
return true;
|
|
707
707
|
};
|
|
708
708
|
const isAssistantVariant = process.env.HAPPY_SESSION_VARIANT === "assistant";
|
|
709
|
-
const happyServer = await startHappyServer(session, {
|
|
709
|
+
const happyServer = await startHappyServer(session, {
|
|
710
|
+
assistant: isAssistantVariant,
|
|
711
|
+
...opts.agentName === "pi" ? { onContextUsage: (contextUsage) => {
|
|
712
|
+
session.updateAgentState((state2) => ({ ...state2, contextUsage }));
|
|
713
|
+
} } : {}
|
|
714
|
+
});
|
|
715
|
+
if (opts.agentName === "pi") session.updateAgentState((state2) => ({ ...state2, contextUsage: null }));
|
|
710
716
|
const mcpServers = {
|
|
711
717
|
happy: {
|
|
712
718
|
command: join(projectPath(), "bin", "very-happy-mcp.mjs"),
|
|
@@ -722,6 +728,7 @@ async function runAcp(opts) {
|
|
|
722
728
|
env: {
|
|
723
729
|
...teamsPiEnv,
|
|
724
730
|
HAPPY_MCP_URL: happyServer.url,
|
|
731
|
+
...happyServer.contextUsageUrl ? { HAPPY_CONTEXT_USAGE_URL: happyServer.contextUsageUrl } : {},
|
|
725
732
|
HAPPY_SESSION_ID: session.sessionId,
|
|
726
733
|
HAPPY_PERMISSION_MODE: initialPermissionMode
|
|
727
734
|
},
|
package/dist/index.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
require('chalk');
|
|
4
|
-
require('./index-
|
|
5
|
-
require('./limits-
|
|
4
|
+
require('./index-B5Vv72dN.cjs');
|
|
5
|
+
require('./limits-C9bJJEyR.cjs');
|
|
6
6
|
require('zod');
|
|
7
|
-
require('./types-
|
|
7
|
+
require('./types-B20MYc5R.cjs');
|
|
8
8
|
require('node:child_process');
|
|
9
9
|
require('node:os');
|
|
10
10
|
require('node:crypto');
|
|
@@ -12,7 +12,7 @@ require('cross-spawn');
|
|
|
12
12
|
require('node:path');
|
|
13
13
|
require('node:readline');
|
|
14
14
|
require('node:fs');
|
|
15
|
-
require('./agentGuidance-
|
|
15
|
+
require('./agentGuidance-B4bH8Nuz.cjs');
|
|
16
16
|
require('node:fs/promises');
|
|
17
17
|
require('fs/promises');
|
|
18
18
|
require('ink');
|
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import 'chalk';
|
|
2
|
-
import './index-
|
|
3
|
-
import './limits-
|
|
2
|
+
import './index-BPYVCjjs.mjs';
|
|
3
|
+
import './limits-BusZ5sPV.mjs';
|
|
4
4
|
import 'zod';
|
|
5
|
-
import './types-
|
|
5
|
+
import './types-lFZhC_6M.mjs';
|
|
6
6
|
import 'node:child_process';
|
|
7
7
|
import 'node:os';
|
|
8
8
|
import 'node:crypto';
|
|
@@ -10,7 +10,7 @@ import 'cross-spawn';
|
|
|
10
10
|
import 'node:path';
|
|
11
11
|
import 'node:readline';
|
|
12
12
|
import 'node:fs';
|
|
13
|
-
import './agentGuidance-
|
|
13
|
+
import './agentGuidance-CeuhVA2K.mjs';
|
|
14
14
|
import 'node:fs/promises';
|
|
15
15
|
import 'fs/promises';
|
|
16
16
|
import 'ink';
|
|
@@ -3,10 +3,10 @@ import { join, resolve } from 'node:path';
|
|
|
3
3
|
import { homedir } from 'node:os';
|
|
4
4
|
import { spawnSync } from 'node:child_process';
|
|
5
5
|
import chalk from 'chalk';
|
|
6
|
-
import { p as projectPath } from './types-
|
|
7
|
-
import { t as tmuxSupportsSessionEnv } from './index-
|
|
6
|
+
import { p as projectPath } from './types-lFZhC_6M.mjs';
|
|
7
|
+
import { t as tmuxSupportsSessionEnv } from './index-BPYVCjjs.mjs';
|
|
8
8
|
import 'axios';
|
|
9
|
-
import './limits-
|
|
9
|
+
import './limits-BusZ5sPV.mjs';
|
|
10
10
|
import 'node:fs/promises';
|
|
11
11
|
import 'zod';
|
|
12
12
|
import 'node:crypto';
|
|
@@ -28,7 +28,7 @@ import 'fs';
|
|
|
28
28
|
import 'node:readline';
|
|
29
29
|
import '@anthropic-ai/sandbox-runtime';
|
|
30
30
|
import 'expo-server-sdk';
|
|
31
|
-
import './agentGuidance-
|
|
31
|
+
import './agentGuidance-CeuhVA2K.mjs';
|
|
32
32
|
import 'ink';
|
|
33
33
|
import 'react';
|
|
34
34
|
import '@anthropic-ai/claude-agent-sdk';
|
|
@@ -5,10 +5,10 @@ var path = require('node:path');
|
|
|
5
5
|
var os = require('node:os');
|
|
6
6
|
var node_child_process = require('node:child_process');
|
|
7
7
|
var chalk = require('chalk');
|
|
8
|
-
var api = require('./types-
|
|
9
|
-
var index = require('./index-
|
|
8
|
+
var api = require('./types-B20MYc5R.cjs');
|
|
9
|
+
var index = require('./index-B5Vv72dN.cjs');
|
|
10
10
|
require('axios');
|
|
11
|
-
require('./limits-
|
|
11
|
+
require('./limits-C9bJJEyR.cjs');
|
|
12
12
|
require('node:fs/promises');
|
|
13
13
|
require('zod');
|
|
14
14
|
require('node:crypto');
|
|
@@ -30,7 +30,7 @@ require('fs');
|
|
|
30
30
|
require('node:readline');
|
|
31
31
|
require('@anthropic-ai/sandbox-runtime');
|
|
32
32
|
require('expo-server-sdk');
|
|
33
|
-
require('./agentGuidance-
|
|
33
|
+
require('./agentGuidance-B4bH8Nuz.cjs');
|
|
34
34
|
require('ink');
|
|
35
35
|
require('react');
|
|
36
36
|
require('@anthropic-ai/claude-agent-sdk');
|
package/dist/lib.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var api = require('./types-
|
|
4
|
-
var persistence = require('./limits-
|
|
3
|
+
var api = require('./types-B20MYc5R.cjs');
|
|
4
|
+
var persistence = require('./limits-C9bJJEyR.cjs');
|
|
5
5
|
require('axios');
|
|
6
6
|
require('node:events');
|
|
7
7
|
require('socket.io-client');
|
package/dist/lib.d.cts
CHANGED
|
@@ -5,28 +5,6 @@ import { EventEmitter } from 'node:events';
|
|
|
5
5
|
import { Socket } from 'socket.io-client';
|
|
6
6
|
import { ExpoPushMessage } from 'expo-server-sdk';
|
|
7
7
|
|
|
8
|
-
declare const CLAUDE_AUTH_PROBE_VERSION: 1;
|
|
9
|
-
type ClaudeAuthStatus = 'ok' | 'not-logged-in' | 'unknown' | 'error' | 'claude-missing';
|
|
10
|
-
type ClaudeAuthDiagnosis = 'keychain-empty-item' | 'store-divergence' | 'no-credentials' | 'credentials-rejected' | 'sdk-binary-missing' | 'probe-timeout' | 'probe-crash';
|
|
11
|
-
type ClaudeAuthLineage = 'launchd' | 'inherited-env' | 'other';
|
|
12
|
-
type ClaudeCredentialStore = 'auto' | 'file';
|
|
13
|
-
interface ClaudeAuthState$1 {
|
|
14
|
-
probeVersion: typeof CLAUDE_AUTH_PROBE_VERSION;
|
|
15
|
-
daemonPid: number;
|
|
16
|
-
status: ClaudeAuthStatus;
|
|
17
|
-
authMethod?: string;
|
|
18
|
-
subscriptionType?: string;
|
|
19
|
-
diagnosis?: ClaudeAuthDiagnosis;
|
|
20
|
-
detail?: string;
|
|
21
|
-
repairable?: 'delete-empty-keychain-item';
|
|
22
|
-
context: {
|
|
23
|
-
platform: string;
|
|
24
|
-
lineage: ClaudeAuthLineage;
|
|
25
|
-
credentialStore: ClaudeCredentialStore;
|
|
26
|
-
};
|
|
27
|
-
checkedAt: number;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
8
|
declare const sessionTurnEndStatusSchema: z.ZodEnum<{
|
|
31
9
|
completed: "completed";
|
|
32
10
|
failed: "failed";
|
|
@@ -176,6 +154,37 @@ declare const sessionStreamFrameSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
176
154
|
}, z.core.$strip>], "t">;
|
|
177
155
|
type SessionStreamFrame = z.infer<typeof sessionStreamFrameSchema>;
|
|
178
156
|
|
|
157
|
+
/** Runtime context occupancy, never cumulative billing. null after compaction is unknown. */
|
|
158
|
+
declare const ContextUsageSchema: z$1.ZodObject<{
|
|
159
|
+
source: z$1.ZodLiteral<"pi">;
|
|
160
|
+
tokens: z$1.ZodNullable<z$1.ZodNumber>;
|
|
161
|
+
contextWindow: z$1.ZodNumber;
|
|
162
|
+
updatedAt: z$1.ZodNumber;
|
|
163
|
+
}, z$1.core.$strip>;
|
|
164
|
+
type ContextUsage = z$1.infer<typeof ContextUsageSchema>;
|
|
165
|
+
|
|
166
|
+
declare const CLAUDE_AUTH_PROBE_VERSION: 1;
|
|
167
|
+
type ClaudeAuthStatus = 'ok' | 'not-logged-in' | 'unknown' | 'error' | 'claude-missing';
|
|
168
|
+
type ClaudeAuthDiagnosis = 'keychain-empty-item' | 'store-divergence' | 'no-credentials' | 'credentials-rejected' | 'sdk-binary-missing' | 'probe-timeout' | 'probe-crash';
|
|
169
|
+
type ClaudeAuthLineage = 'launchd' | 'inherited-env' | 'other';
|
|
170
|
+
type ClaudeCredentialStore = 'auto' | 'file';
|
|
171
|
+
interface ClaudeAuthState$1 {
|
|
172
|
+
probeVersion: typeof CLAUDE_AUTH_PROBE_VERSION;
|
|
173
|
+
daemonPid: number;
|
|
174
|
+
status: ClaudeAuthStatus;
|
|
175
|
+
authMethod?: string;
|
|
176
|
+
subscriptionType?: string;
|
|
177
|
+
diagnosis?: ClaudeAuthDiagnosis;
|
|
178
|
+
detail?: string;
|
|
179
|
+
repairable?: 'delete-empty-keychain-item';
|
|
180
|
+
context: {
|
|
181
|
+
platform: string;
|
|
182
|
+
lineage: ClaudeAuthLineage;
|
|
183
|
+
credentialStore: ClaudeCredentialStore;
|
|
184
|
+
};
|
|
185
|
+
checkedAt: number;
|
|
186
|
+
}
|
|
187
|
+
|
|
179
188
|
/**
|
|
180
189
|
* Simplified schema that only validates fields actually used in the codebase
|
|
181
190
|
* while preserving all other fields through passthrough()
|
|
@@ -675,6 +684,7 @@ type Metadata = {
|
|
|
675
684
|
};
|
|
676
685
|
};
|
|
677
686
|
type AgentState$1 = {
|
|
687
|
+
contextUsage?: ContextUsage | null;
|
|
678
688
|
controlledByUser?: boolean | null | undefined;
|
|
679
689
|
requests?: {
|
|
680
690
|
[id: string]: {
|
package/dist/lib.d.mts
CHANGED
|
@@ -5,28 +5,6 @@ import { EventEmitter } from 'node:events';
|
|
|
5
5
|
import { Socket } from 'socket.io-client';
|
|
6
6
|
import { ExpoPushMessage } from 'expo-server-sdk';
|
|
7
7
|
|
|
8
|
-
declare const CLAUDE_AUTH_PROBE_VERSION: 1;
|
|
9
|
-
type ClaudeAuthStatus = 'ok' | 'not-logged-in' | 'unknown' | 'error' | 'claude-missing';
|
|
10
|
-
type ClaudeAuthDiagnosis = 'keychain-empty-item' | 'store-divergence' | 'no-credentials' | 'credentials-rejected' | 'sdk-binary-missing' | 'probe-timeout' | 'probe-crash';
|
|
11
|
-
type ClaudeAuthLineage = 'launchd' | 'inherited-env' | 'other';
|
|
12
|
-
type ClaudeCredentialStore = 'auto' | 'file';
|
|
13
|
-
interface ClaudeAuthState$1 {
|
|
14
|
-
probeVersion: typeof CLAUDE_AUTH_PROBE_VERSION;
|
|
15
|
-
daemonPid: number;
|
|
16
|
-
status: ClaudeAuthStatus;
|
|
17
|
-
authMethod?: string;
|
|
18
|
-
subscriptionType?: string;
|
|
19
|
-
diagnosis?: ClaudeAuthDiagnosis;
|
|
20
|
-
detail?: string;
|
|
21
|
-
repairable?: 'delete-empty-keychain-item';
|
|
22
|
-
context: {
|
|
23
|
-
platform: string;
|
|
24
|
-
lineage: ClaudeAuthLineage;
|
|
25
|
-
credentialStore: ClaudeCredentialStore;
|
|
26
|
-
};
|
|
27
|
-
checkedAt: number;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
8
|
declare const sessionTurnEndStatusSchema: z.ZodEnum<{
|
|
31
9
|
completed: "completed";
|
|
32
10
|
failed: "failed";
|
|
@@ -176,6 +154,37 @@ declare const sessionStreamFrameSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
176
154
|
}, z.core.$strip>], "t">;
|
|
177
155
|
type SessionStreamFrame = z.infer<typeof sessionStreamFrameSchema>;
|
|
178
156
|
|
|
157
|
+
/** Runtime context occupancy, never cumulative billing. null after compaction is unknown. */
|
|
158
|
+
declare const ContextUsageSchema: z$1.ZodObject<{
|
|
159
|
+
source: z$1.ZodLiteral<"pi">;
|
|
160
|
+
tokens: z$1.ZodNullable<z$1.ZodNumber>;
|
|
161
|
+
contextWindow: z$1.ZodNumber;
|
|
162
|
+
updatedAt: z$1.ZodNumber;
|
|
163
|
+
}, z$1.core.$strip>;
|
|
164
|
+
type ContextUsage = z$1.infer<typeof ContextUsageSchema>;
|
|
165
|
+
|
|
166
|
+
declare const CLAUDE_AUTH_PROBE_VERSION: 1;
|
|
167
|
+
type ClaudeAuthStatus = 'ok' | 'not-logged-in' | 'unknown' | 'error' | 'claude-missing';
|
|
168
|
+
type ClaudeAuthDiagnosis = 'keychain-empty-item' | 'store-divergence' | 'no-credentials' | 'credentials-rejected' | 'sdk-binary-missing' | 'probe-timeout' | 'probe-crash';
|
|
169
|
+
type ClaudeAuthLineage = 'launchd' | 'inherited-env' | 'other';
|
|
170
|
+
type ClaudeCredentialStore = 'auto' | 'file';
|
|
171
|
+
interface ClaudeAuthState$1 {
|
|
172
|
+
probeVersion: typeof CLAUDE_AUTH_PROBE_VERSION;
|
|
173
|
+
daemonPid: number;
|
|
174
|
+
status: ClaudeAuthStatus;
|
|
175
|
+
authMethod?: string;
|
|
176
|
+
subscriptionType?: string;
|
|
177
|
+
diagnosis?: ClaudeAuthDiagnosis;
|
|
178
|
+
detail?: string;
|
|
179
|
+
repairable?: 'delete-empty-keychain-item';
|
|
180
|
+
context: {
|
|
181
|
+
platform: string;
|
|
182
|
+
lineage: ClaudeAuthLineage;
|
|
183
|
+
credentialStore: ClaudeCredentialStore;
|
|
184
|
+
};
|
|
185
|
+
checkedAt: number;
|
|
186
|
+
}
|
|
187
|
+
|
|
179
188
|
/**
|
|
180
189
|
* Simplified schema that only validates fields actually used in the codebase
|
|
181
190
|
* while preserving all other fields through passthrough()
|
|
@@ -675,6 +684,7 @@ type Metadata = {
|
|
|
675
684
|
};
|
|
676
685
|
};
|
|
677
686
|
type AgentState$1 = {
|
|
687
|
+
contextUsage?: ContextUsage | null;
|
|
678
688
|
controlledByUser?: boolean | null | undefined;
|
|
679
689
|
requests?: {
|
|
680
690
|
[id: string]: {
|
package/dist/lib.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { A as ApiClient, a as ApiSessionClient, R as RawJSONLinesSchema } from './types-
|
|
2
|
-
export { c as configuration, l as logger } from './limits-
|
|
1
|
+
export { A as ApiClient, a as ApiSessionClient, R as RawJSONLinesSchema } from './types-lFZhC_6M.mjs';
|
|
2
|
+
export { c as configuration, l as logger } from './limits-BusZ5sPV.mjs';
|
|
3
3
|
import 'axios';
|
|
4
4
|
import 'node:events';
|
|
5
5
|
import 'socket.io-client';
|
|
@@ -9,7 +9,7 @@ import chalk from 'chalk';
|
|
|
9
9
|
import { inspect } from 'node:util';
|
|
10
10
|
|
|
11
11
|
var name = "very-happy-cli";
|
|
12
|
-
var version = "0.2.
|
|
12
|
+
var version = "0.2.131";
|
|
13
13
|
var description = "Remote multi-agent workspace CLI with deep Claude integration, native terminal streaming, and self-hosting.";
|
|
14
14
|
var author = "Kirill Dubovitskiy";
|
|
15
15
|
var contributors = [
|
|
@@ -122,12 +122,12 @@ var dependencies = {
|
|
|
122
122
|
zod: "^4.0.0"
|
|
123
123
|
};
|
|
124
124
|
var optionalDependencies = {
|
|
125
|
-
"very-happy-tools-arm64-darwin": "0.2.
|
|
126
|
-
"very-happy-tools-x64-darwin": "0.2.
|
|
127
|
-
"very-happy-tools-arm64-linux": "0.2.
|
|
128
|
-
"very-happy-tools-x64-linux": "0.2.
|
|
129
|
-
"very-happy-tools-arm64-win32": "0.2.
|
|
130
|
-
"very-happy-tools-x64-win32": "0.2.
|
|
125
|
+
"very-happy-tools-arm64-darwin": "0.2.131",
|
|
126
|
+
"very-happy-tools-x64-darwin": "0.2.131",
|
|
127
|
+
"very-happy-tools-arm64-linux": "0.2.131",
|
|
128
|
+
"very-happy-tools-x64-linux": "0.2.131",
|
|
129
|
+
"very-happy-tools-arm64-win32": "0.2.131",
|
|
130
|
+
"very-happy-tools-x64-win32": "0.2.131"
|
|
131
131
|
};
|
|
132
132
|
var devDependencies = {
|
|
133
133
|
"@slopus/happy-wire": "workspace:*",
|