very-happy-cli 0.2.156 → 0.2.158
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-BHe1_F1h.cjs → AcpBackend-DIDRig5G.cjs} +2 -2
- package/dist/{AcpBackend-C3nc1u-s.mjs → AcpBackend-vDVLHuYJ.mjs} +2 -2
- package/dist/{AcpSessionManager-BVxkQnNf.cjs → AcpSessionManager-C44U99CC.cjs} +1 -1
- package/dist/{AcpSessionManager-dN3k1LbI.mjs → AcpSessionManager-CmRjfhn3.mjs} +1 -1
- package/dist/{agentGuidance-C604n0Zq.mjs → agentGuidance-CrR9l62U.mjs} +562 -30
- package/dist/{agentGuidance-C-CmV03f.cjs → agentGuidance-DwOWbX55.cjs} +581 -29
- package/dist/{agentHome-D2XGsoqs.mjs → agentHome-CyLmGH5L.mjs} +2 -2
- package/dist/{agentHome-CmIJNV7f.cjs → agentHome-Dw8Jx_CJ.cjs} +2 -2
- package/dist/{auto-B1I6G_Nf.mjs → auto-BlMZPwOk.mjs} +19 -10
- package/dist/{auto-CMDq4oIu.cjs → auto-DZbNcTXx.cjs} +19 -10
- package/dist/codex/happyMcpStdioBridge.cjs +2 -2
- package/dist/codex/happyMcpStdioBridge.mjs +2 -2
- package/dist/{config-BkTu25bH.mjs → config-BtPArqRH.mjs} +4 -4
- package/dist/{config-BYHSRY2E.cjs → config-DG84bjwF.cjs} +4 -4
- package/dist/{index-BbtR-Qto.cjs → index-BG932eCh.cjs} +292 -47
- package/dist/{index-DAAreiRF.mjs → index-CVCt3kSt.mjs} +289 -44
- package/dist/{index-CB8QnjvS.cjs → index-D5ScEErM.cjs} +4 -4
- package/dist/{index-B_-7NpGZ.cjs → index-DPCsWlWK.cjs} +7 -7
- package/dist/{index-PYO8Mdz4.mjs → index-DgO0FHOx.mjs} +4 -4
- package/dist/{index-B5QbzEga.mjs → index-ZChGsuB7.mjs} +8 -8
- package/dist/index.cjs +4 -4
- package/dist/index.mjs +4 -4
- package/dist/{install-CNtXzwT_.mjs → install-DarS_Wco.mjs} +1 -1
- package/dist/{install-CO1ps6Wt.cjs → install-wKQGgXvN.cjs} +1 -1
- package/dist/{installTerminalHooks-CMpOV3RU.mjs → installTerminalHooks-CpNbRFPz.mjs} +4 -4
- package/dist/{installTerminalHooks-BOAnQ1Qe.cjs → installTerminalHooks-DcQfee_O.cjs} +4 -4
- package/dist/lib.cjs +2 -2
- package/dist/lib.d.cts +77 -1
- package/dist/lib.d.mts +77 -1
- package/dist/lib.mjs +2 -2
- package/dist/{limits-DmMdchTz.mjs → limits-D2uN090G.mjs} +163 -11
- package/dist/{limits-o29KXBgj.cjs → limits-kqFqhfsh.cjs} +170 -10
- package/dist/{mcp-C_uejotl.mjs → mcp-BN6bKIGb.mjs} +4 -4
- package/dist/{mcp-CwK1nI7Y.cjs → mcp-DGdeUUDJ.cjs} +4 -4
- package/dist/{piRuntime-Dj5WnqzJ.cjs → piRuntime-3qtbKujX.cjs} +2 -2
- package/dist/{piRuntime-Cu2-8nOT.mjs → piRuntime-bkw2NAZU.mjs} +2 -2
- package/dist/{piTerminal-D-BIbov9.cjs → piTerminal-BYxp3LMr.cjs} +6 -6
- package/dist/{piTerminal-DanZeBrO.mjs → piTerminal-DilKwM7B.mjs} +6 -6
- package/dist/{runGemini--QqK-Ap5.cjs → runGemini-28O2sqyI.cjs} +6 -6
- package/dist/{runGemini-CZ_lhMWY.mjs → runGemini-Cjii069p.mjs} +6 -6
- package/dist/{runOpenClaw-C0xLhTvk.cjs → runOpenClaw-CiMZad-H.cjs} +5 -5
- package/dist/{runOpenClaw-CxgLpm38.mjs → runOpenClaw-jaLr7KF1.mjs} +5 -5
- package/dist/{send-BaOkDgH0.mjs → send-C9mOtChi.mjs} +43 -31
- package/dist/{send-CTcGMVuG.cjs → send-D5ejHPXG.cjs} +43 -31
- package/dist/{sessions-OmvyJb0n.cjs → sessions-BNMPQoLE.cjs} +133 -49
- package/dist/{sessions-Bn304xF1.mjs → sessions-W6771g3X.mjs} +133 -49
- package/dist/{spawn-BKNabutV.mjs → spawn-D0QVhzRb.mjs} +4 -4
- package/dist/{spawn-CC6V2KiA.cjs → spawn-Ddtom1cb.cjs} +4 -4
- package/dist/{teams-XtrH3_h3.cjs → teams-BZ1tayg_.cjs} +5 -5
- package/dist/{teams-CLbS2_4Q.mjs → teams-CqSwtw2O.mjs} +5 -5
- package/dist/{todo-CEDvKNXK.cjs → todo-BYMg0fR0.cjs} +2 -2
- package/dist/{todo-BcPbNKt2.mjs → todo-BbusB1zM.mjs} +2 -2
- package/dist/{types-BEVzYSoV.mjs → types-DIBF4U0Y.mjs} +78 -5
- package/dist/{types-CphWjqHc.cjs → types-DnrPeN80.cjs} +78 -5
- package/package.json +7 -7
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BG932eCh.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-DnrPeN80.cjs');
|
|
9
9
|
require('axios');
|
|
10
|
-
require('./limits-
|
|
10
|
+
require('./limits-kqFqhfsh.cjs');
|
|
11
11
|
require('zod');
|
|
12
12
|
require('@paralleldrive/cuid2');
|
|
13
13
|
require('node:fs/promises');
|
|
@@ -32,7 +32,7 @@ require('fs');
|
|
|
32
32
|
require('node:readline');
|
|
33
33
|
require('@anthropic-ai/sandbox-runtime');
|
|
34
34
|
require('expo-server-sdk');
|
|
35
|
-
require('./agentGuidance-
|
|
35
|
+
require('./agentGuidance-DwOWbX55.cjs');
|
|
36
36
|
require('ink');
|
|
37
37
|
require('react');
|
|
38
38
|
require('ps-list');
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var AcpBackend = require('./AcpBackend-
|
|
4
|
-
var persistence = require('./limits-
|
|
5
|
-
var AcpSessionManager = require('./AcpSessionManager-
|
|
6
|
-
var index$1 = require('./index-
|
|
7
|
-
var piRuntime = require('./piRuntime-
|
|
3
|
+
var AcpBackend = require('./AcpBackend-DIDRig5G.cjs');
|
|
4
|
+
var persistence = require('./limits-kqFqhfsh.cjs');
|
|
5
|
+
var AcpSessionManager = require('./AcpSessionManager-C44U99CC.cjs');
|
|
6
|
+
var index$1 = require('./index-BG932eCh.cjs');
|
|
7
|
+
var piRuntime = require('./piRuntime-3qtbKujX.cjs');
|
|
8
8
|
var node_crypto = require('node:crypto');
|
|
9
9
|
var path = require('node:path');
|
|
10
|
-
var index = require('./types-
|
|
10
|
+
var index = require('./types-DnrPeN80.cjs');
|
|
11
11
|
var terminalTitleSuggest = require('./terminalTitleSuggest-Dji8I0Jy.cjs');
|
|
12
12
|
require('node:child_process');
|
|
13
13
|
require('@agentclientprotocol/sdk');
|
|
@@ -21,7 +21,7 @@ require('node:util');
|
|
|
21
21
|
require('node:os');
|
|
22
22
|
require('cross-spawn');
|
|
23
23
|
require('node:readline');
|
|
24
|
-
require('./agentGuidance-
|
|
24
|
+
require('./agentGuidance-DwOWbX55.cjs');
|
|
25
25
|
require('axios');
|
|
26
26
|
require('socket.io-client');
|
|
27
27
|
require('fs/promises');
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { q as query } from './index-
|
|
1
|
+
import { q as query } from './index-CVCt3kSt.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-DIBF4U0Y.mjs';
|
|
7
7
|
import 'axios';
|
|
8
|
-
import './limits-
|
|
8
|
+
import './limits-D2uN090G.mjs';
|
|
9
9
|
import 'zod';
|
|
10
10
|
import '@paralleldrive/cuid2';
|
|
11
11
|
import 'node:fs/promises';
|
|
@@ -30,7 +30,7 @@ import 'fs';
|
|
|
30
30
|
import 'node:readline';
|
|
31
31
|
import '@anthropic-ai/sandbox-runtime';
|
|
32
32
|
import 'expo-server-sdk';
|
|
33
|
-
import './agentGuidance-
|
|
33
|
+
import './agentGuidance-CrR9l62U.mjs';
|
|
34
34
|
import 'ink';
|
|
35
35
|
import 'react';
|
|
36
36
|
import 'ps-list';
|
|
@@ -1,12 +1,12 @@
|
|
|
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 { r as readSettings, v as notifyDaemonSessionStarted, w as encodeBase64, l as logger, x as BUILTIN_TODO_DISCOVERY, c as configuration, y as reportSessionEditToDaemon } from './limits-
|
|
4
|
-
import { A as AcpSessionManager } from './AcpSessionManager-
|
|
5
|
-
import { h as initialMachineMetadata, j as createSessionMetadata, k as setupOfflineReconnection, l as StreamRelay, M as MessageQueue2, m as hashObject, n as startHappyServer, o as registerAgentAttachmentDownloads, u as TitleGenerator, v as registerKillSessionHandler, C as CLAUDE_ATTACHMENT_KINDS, w as stageClaudeAttachments, x as appendStagedAttachmentsToPrompt, B as BasePermissionHandler, E as EditReportThrottle, y as extractAcpEditPaths, z as writeSessionModeFile, F as normalizeAcpPermissionMode, H as removeSessionModeFile } from './index-
|
|
6
|
-
import { p as preparePiTeamsRuntime } from './piRuntime-
|
|
1
|
+
import { D as DefaultTransport, A as AcpBackend } from './AcpBackend-vDVLHuYJ.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-vDVLHuYJ.mjs';
|
|
3
|
+
import { r as readSettings, v as notifyDaemonSessionStarted, w as encodeBase64, l as logger, x as BUILTIN_TODO_DISCOVERY, c as configuration, y as reportSessionEditToDaemon } from './limits-D2uN090G.mjs';
|
|
4
|
+
import { A as AcpSessionManager } from './AcpSessionManager-CmRjfhn3.mjs';
|
|
5
|
+
import { h as initialMachineMetadata, j as createSessionMetadata, k as setupOfflineReconnection, l as StreamRelay, M as MessageQueue2, m as hashObject, n as startHappyServer, o as registerAgentAttachmentDownloads, u as TitleGenerator, v as registerKillSessionHandler, C as CLAUDE_ATTACHMENT_KINDS, w as stageClaudeAttachments, x as appendStagedAttachmentsToPrompt, B as BasePermissionHandler, E as EditReportThrottle, y as extractAcpEditPaths, z as writeSessionModeFile, F as normalizeAcpPermissionMode, H as removeSessionModeFile } from './index-CVCt3kSt.mjs';
|
|
6
|
+
import { p as preparePiTeamsRuntime } from './piRuntime-bkw2NAZU.mjs';
|
|
7
7
|
import { randomUUID } from 'node:crypto';
|
|
8
8
|
import { join } from 'node:path';
|
|
9
|
-
import { h as connectionState, A as ApiClient } from './types-
|
|
9
|
+
import { h as connectionState, A as ApiClient } from './types-DIBF4U0Y.mjs';
|
|
10
10
|
import { p as projectPath } from './terminalTitleSuggest-DKgX3osW.mjs';
|
|
11
11
|
import 'node:child_process';
|
|
12
12
|
import '@agentclientprotocol/sdk';
|
|
@@ -20,7 +20,7 @@ import 'node:util';
|
|
|
20
20
|
import 'node:os';
|
|
21
21
|
import 'cross-spawn';
|
|
22
22
|
import 'node:readline';
|
|
23
|
-
import './agentGuidance-
|
|
23
|
+
import './agentGuidance-CrR9l62U.mjs';
|
|
24
24
|
import 'axios';
|
|
25
25
|
import 'socket.io-client';
|
|
26
26
|
import 'fs/promises';
|
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-BG932eCh.cjs');
|
|
5
|
+
require('./limits-kqFqhfsh.cjs');
|
|
6
6
|
require('zod');
|
|
7
|
-
require('./types-
|
|
7
|
+
require('./types-DnrPeN80.cjs');
|
|
8
8
|
require('node:child_process');
|
|
9
9
|
require('node:os');
|
|
10
10
|
require('node:crypto');
|
|
@@ -15,7 +15,7 @@ require('node:fs');
|
|
|
15
15
|
require('./terminalTitleSuggest-Dji8I0Jy.cjs');
|
|
16
16
|
require('path');
|
|
17
17
|
require('url');
|
|
18
|
-
require('./agentGuidance-
|
|
18
|
+
require('./agentGuidance-DwOWbX55.cjs');
|
|
19
19
|
require('node:fs/promises');
|
|
20
20
|
require('axios');
|
|
21
21
|
require('socket.io-client');
|
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import 'chalk';
|
|
2
|
-
import './index-
|
|
3
|
-
import './limits-
|
|
2
|
+
import './index-CVCt3kSt.mjs';
|
|
3
|
+
import './limits-D2uN090G.mjs';
|
|
4
4
|
import 'zod';
|
|
5
|
-
import './types-
|
|
5
|
+
import './types-DIBF4U0Y.mjs';
|
|
6
6
|
import 'node:child_process';
|
|
7
7
|
import 'node:os';
|
|
8
8
|
import 'node:crypto';
|
|
@@ -13,7 +13,7 @@ import 'node:fs';
|
|
|
13
13
|
import './terminalTitleSuggest-DKgX3osW.mjs';
|
|
14
14
|
import 'path';
|
|
15
15
|
import 'url';
|
|
16
|
-
import './agentGuidance-
|
|
16
|
+
import './agentGuidance-CrR9l62U.mjs';
|
|
17
17
|
import 'node:fs/promises';
|
|
18
18
|
import 'axios';
|
|
19
19
|
import 'socket.io-client';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createHash, randomUUID } from 'node:crypto';
|
|
2
2
|
import { unlink, rmdir, mkdir, lstat, readFile, writeFile, rename } from 'node:fs/promises';
|
|
3
3
|
import { join, resolve, dirname } from 'node:path';
|
|
4
|
-
import { T as TEAM_SKILL } from './index-
|
|
4
|
+
import { T as TEAM_SKILL } from './index-CVCt3kSt.mjs';
|
|
5
5
|
|
|
6
6
|
async function assertPrivateDestination(directory) {
|
|
7
7
|
for (let path = directory; ; path = dirname(path)) {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var node_crypto = require('node:crypto');
|
|
4
4
|
var promises = require('node:fs/promises');
|
|
5
5
|
var path = require('node:path');
|
|
6
|
-
var index = require('./index-
|
|
6
|
+
var index = require('./index-BG932eCh.cjs');
|
|
7
7
|
|
|
8
8
|
async function assertPrivateDestination(directory) {
|
|
9
9
|
for (let path$1 = directory; ; path$1 = path.dirname(path$1)) {
|
|
@@ -4,14 +4,14 @@ import { homedir } from 'node:os';
|
|
|
4
4
|
import { spawnSync } from 'node:child_process';
|
|
5
5
|
import chalk from 'chalk';
|
|
6
6
|
import { p as projectPath } from './terminalTitleSuggest-DKgX3osW.mjs';
|
|
7
|
-
import { b as tmuxSupportsSessionEnv } from './index-
|
|
7
|
+
import { b as tmuxSupportsSessionEnv } from './index-CVCt3kSt.mjs';
|
|
8
8
|
import 'path';
|
|
9
9
|
import 'url';
|
|
10
10
|
import 'zod';
|
|
11
11
|
import 'node:crypto';
|
|
12
|
-
import './types-
|
|
12
|
+
import './types-DIBF4U0Y.mjs';
|
|
13
13
|
import 'axios';
|
|
14
|
-
import './limits-
|
|
14
|
+
import './limits-D2uN090G.mjs';
|
|
15
15
|
import '@paralleldrive/cuid2';
|
|
16
16
|
import 'node:fs/promises';
|
|
17
17
|
import 'tweetnacl';
|
|
@@ -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-CrR9l62U.mjs';
|
|
33
33
|
import 'ink';
|
|
34
34
|
import 'react';
|
|
35
35
|
import '@anthropic-ai/claude-agent-sdk';
|
|
@@ -6,14 +6,14 @@ var os = require('node:os');
|
|
|
6
6
|
var node_child_process = require('node:child_process');
|
|
7
7
|
var chalk = require('chalk');
|
|
8
8
|
var terminalTitleSuggest = require('./terminalTitleSuggest-Dji8I0Jy.cjs');
|
|
9
|
-
var index = require('./index-
|
|
9
|
+
var index = require('./index-BG932eCh.cjs');
|
|
10
10
|
require('path');
|
|
11
11
|
require('url');
|
|
12
12
|
require('zod');
|
|
13
13
|
require('node:crypto');
|
|
14
|
-
require('./types-
|
|
14
|
+
require('./types-DnrPeN80.cjs');
|
|
15
15
|
require('axios');
|
|
16
|
-
require('./limits-
|
|
16
|
+
require('./limits-kqFqhfsh.cjs');
|
|
17
17
|
require('@paralleldrive/cuid2');
|
|
18
18
|
require('node:fs/promises');
|
|
19
19
|
require('tweetnacl');
|
|
@@ -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-DwOWbX55.cjs');
|
|
35
35
|
require('ink');
|
|
36
36
|
require('react');
|
|
37
37
|
require('@anthropic-ai/claude-agent-sdk');
|
package/dist/lib.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./types-
|
|
4
|
-
var persistence = require('./limits-
|
|
3
|
+
var index = require('./types-DnrPeN80.cjs');
|
|
4
|
+
var persistence = require('./limits-kqFqhfsh.cjs');
|
|
5
5
|
require('axios');
|
|
6
6
|
require('node:events');
|
|
7
7
|
require('socket.io-client');
|
package/dist/lib.d.cts
CHANGED
|
@@ -5,6 +5,45 @@ import { EventEmitter } from 'node:events';
|
|
|
5
5
|
import { Socket } from 'socket.io-client';
|
|
6
6
|
import { ExpoPushMessage } from 'expo-server-sdk';
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* B-507 — which background tasks does this Claude session still have in
|
|
10
|
+
* flight? Pure bookkeeping over SDK messages; no I/O.
|
|
11
|
+
*
|
|
12
|
+
* A turn ending is not the session going quiet: an async-launched sub-agent,
|
|
13
|
+
* a `run_in_background` Bash command, a Monitor or a workflow keeps running
|
|
14
|
+
* and will wake the session with a task_notification later. Nothing used to
|
|
15
|
+
* say so explicitly — auto-archive had to guess from event recency and got it
|
|
16
|
+
* wrong (Owner's PR#631 session). This tracker is the explicit answer; the
|
|
17
|
+
* wrapper publishes its `list()` on the heartbeat, to the daemon and into
|
|
18
|
+
* agentState (`update/backgroundTaskActivity.ts`).
|
|
19
|
+
*
|
|
20
|
+
* Signals (SDK 0.3.281, sdk.d.ts):
|
|
21
|
+
* - `system/background_tasks_changed` is the LEVEL: the full live set after
|
|
22
|
+
* every membership change, REPLACE semantics — "consumers that only need
|
|
23
|
+
* 'is background work running' should replace their set with each payload
|
|
24
|
+
* rather than pairing edges". It is per process: nothing at startup, so
|
|
25
|
+
* `reset()` on every query (re)start.
|
|
26
|
+
* - the EDGES `task_started{is_backgrounded}` / `task_updated.patch` /
|
|
27
|
+
* `task_notification` still apply, for Claude Code runtimes that predate
|
|
28
|
+
* the level signal. Both are applied; for one transition they agree (a
|
|
29
|
+
* level first makes the edge an idempotent replay, an edge first is
|
|
30
|
+
* overwritten by the same set), so they cannot fight.
|
|
31
|
+
* - a foreground Agent whose tool_result carries `tool_use_result.status ===
|
|
32
|
+
* 'async_launched'` moved to the background (B-260-P2's marker) — the
|
|
33
|
+
* fallback when neither task_started.is_backgrounded nor the level exists.
|
|
34
|
+
* - `ambient` tasks are "not activity; hosts should exclude them from
|
|
35
|
+
* activity indicators" — excluded here too.
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
interface BackgroundTaskInfo {
|
|
39
|
+
id: string;
|
|
40
|
+
/** SDK task_type as reported (local_bash / local_agent / monitor / …); 'unknown' when absent. */
|
|
41
|
+
type: string;
|
|
42
|
+
description: string;
|
|
43
|
+
/** Wrapper-local ms epoch of when this task was first seen in the background. */
|
|
44
|
+
startedAt: number;
|
|
45
|
+
}
|
|
46
|
+
|
|
8
47
|
declare const sessionTurnEndStatusSchema: z.ZodEnum<{
|
|
9
48
|
completed: "completed";
|
|
10
49
|
failed: "failed";
|
|
@@ -721,6 +760,12 @@ type Metadata = {
|
|
|
721
760
|
type AgentState$1 = {
|
|
722
761
|
contextUsage?: ContextUsage | null;
|
|
723
762
|
controlledByUser?: boolean | null | undefined;
|
|
763
|
+
/** B-507: background tasks still in flight, renewed every 60s while non-empty
|
|
764
|
+
* (`update/backgroundTaskActivity.ts`). Readers expire it by `updatedAt`. */
|
|
765
|
+
backgroundTasks?: {
|
|
766
|
+
updatedAt: number;
|
|
767
|
+
tasks: BackgroundTaskInfo[];
|
|
768
|
+
} | null;
|
|
724
769
|
requests?: {
|
|
725
770
|
[id: string]: {
|
|
726
771
|
tool: string;
|
|
@@ -778,6 +823,15 @@ interface RpcHandlerConfig {
|
|
|
778
823
|
|
|
779
824
|
declare class RpcHandlerManager {
|
|
780
825
|
private handlers;
|
|
826
|
+
/**
|
|
827
|
+
* B-506: methods whose params/result are PLAINTEXT JSON strings instead of
|
|
828
|
+
* machine-key ciphertext. The caller is a CLI on another machine of the
|
|
829
|
+
* same account, which holds neither this machine's key nor the account
|
|
830
|
+
* content key; the trusted relay sees the payload either way (this fork
|
|
831
|
+
* is server-trusted, not e2e). Only `registerPlainHandler` puts a method
|
|
832
|
+
* here; everything else keeps decrypting.
|
|
833
|
+
*/
|
|
834
|
+
private plainMethods;
|
|
781
835
|
private readonly scopePrefix;
|
|
782
836
|
private readonly encryptionKey;
|
|
783
837
|
private readonly encryptionVariant;
|
|
@@ -791,12 +845,22 @@ declare class RpcHandlerManager {
|
|
|
791
845
|
*/
|
|
792
846
|
registerHandler<TRequest = any, TResponse = any>(method: string, handler: RpcHandler<TRequest, TResponse>): void;
|
|
793
847
|
unregisterHandler(method: string): void;
|
|
848
|
+
/**
|
|
849
|
+
* B-506: register a method whose request is a plaintext JSON string and
|
|
850
|
+
* whose response is returned as a plaintext JSON string (see
|
|
851
|
+
* `plainMethods`). The handler receives the parsed params; a throw is
|
|
852
|
+
* answered with `{ error }` like the encrypted path.
|
|
853
|
+
*/
|
|
854
|
+
registerPlainHandler<TRequest = any, TResponse = any>(method: string, handler: RpcHandler<TRequest, TResponse>): void;
|
|
855
|
+
isPlainMethod(prefixedMethod: string): boolean;
|
|
794
856
|
/**
|
|
795
857
|
* Handle an incoming RPC request
|
|
796
858
|
* @param request - The RPC request data
|
|
797
859
|
* @param callback - The response callback
|
|
798
860
|
*/
|
|
799
861
|
handleRequest(request: RpcRequest): Promise<any>;
|
|
862
|
+
/** Plaintext variant of handleRequest (B-506). Never throws; never encrypts. */
|
|
863
|
+
private handlePlainRequest;
|
|
800
864
|
onSocketConnect(socket: Socket): void;
|
|
801
865
|
/**
|
|
802
866
|
* Attach a candidate transport and wait until the server confirms every
|
|
@@ -1042,7 +1106,12 @@ declare class ApiSessionClient extends EventEmitter {
|
|
|
1042
1106
|
/** B-466: turn edges (and a periodic lease) reported to the local daemon so
|
|
1043
1107
|
* auto-update waits for "no turn in flight" instead of "no sessions". */
|
|
1044
1108
|
private readonly turnReporter;
|
|
1045
|
-
|
|
1109
|
+
/** B-507: background tasks in flight, published on change and renewed every
|
|
1110
|
+
* 60s to the daemon (`/session-event background_tasks`) and into agentState
|
|
1111
|
+
* (`backgroundTasks: { updatedAt, tasks }`) — the two readers that outlive a
|
|
1112
|
+
* single heartbeat. The heartbeat itself carries only the count. */
|
|
1113
|
+
private readonly backgroundTaskReporter;
|
|
1114
|
+
keepAlive(thinking: boolean, mode: 'local' | 'remote', backgroundTasks?: readonly BackgroundTaskInfo[]): void;
|
|
1046
1115
|
/**
|
|
1047
1116
|
* B-309: push one live stream frame (thinking/text delta or progress) to
|
|
1048
1117
|
* this account's web clients.
|
|
@@ -1419,6 +1488,13 @@ declare class ApiMachineClient {
|
|
|
1419
1488
|
}>;
|
|
1420
1489
|
setStore: (store: 'auto' | 'file') => Promise<ClaudeAuthState>;
|
|
1421
1490
|
}): void;
|
|
1491
|
+
/**
|
|
1492
|
+
* B-506: the five `sessions.*` methods a CLI on ANOTHER machine of this
|
|
1493
|
+
* account calls to read / message sessions this daemon spawned. Plaintext
|
|
1494
|
+
* on purpose (no shared key with the caller); see
|
|
1495
|
+
* `api/rpc/RpcHandlerManager.ts` `registerPlainHandler`.
|
|
1496
|
+
*/
|
|
1497
|
+
setRemoteSessionOpsHandlers(handlers: Record<string, (params: unknown) => Promise<unknown>>): void;
|
|
1422
1498
|
setRPCHandlers({ spawnSession, resumeSession, restartSession, stopSession, listTrackedSessionIds, requestShutdown }: MachineRpcHandlers): void;
|
|
1423
1499
|
private syncRestartSessionRpcRegistration;
|
|
1424
1500
|
private syncResumeSessionRpcRegistration;
|
package/dist/lib.d.mts
CHANGED
|
@@ -5,6 +5,45 @@ import { EventEmitter } from 'node:events';
|
|
|
5
5
|
import { Socket } from 'socket.io-client';
|
|
6
6
|
import { ExpoPushMessage } from 'expo-server-sdk';
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* B-507 — which background tasks does this Claude session still have in
|
|
10
|
+
* flight? Pure bookkeeping over SDK messages; no I/O.
|
|
11
|
+
*
|
|
12
|
+
* A turn ending is not the session going quiet: an async-launched sub-agent,
|
|
13
|
+
* a `run_in_background` Bash command, a Monitor or a workflow keeps running
|
|
14
|
+
* and will wake the session with a task_notification later. Nothing used to
|
|
15
|
+
* say so explicitly — auto-archive had to guess from event recency and got it
|
|
16
|
+
* wrong (Owner's PR#631 session). This tracker is the explicit answer; the
|
|
17
|
+
* wrapper publishes its `list()` on the heartbeat, to the daemon and into
|
|
18
|
+
* agentState (`update/backgroundTaskActivity.ts`).
|
|
19
|
+
*
|
|
20
|
+
* Signals (SDK 0.3.281, sdk.d.ts):
|
|
21
|
+
* - `system/background_tasks_changed` is the LEVEL: the full live set after
|
|
22
|
+
* every membership change, REPLACE semantics — "consumers that only need
|
|
23
|
+
* 'is background work running' should replace their set with each payload
|
|
24
|
+
* rather than pairing edges". It is per process: nothing at startup, so
|
|
25
|
+
* `reset()` on every query (re)start.
|
|
26
|
+
* - the EDGES `task_started{is_backgrounded}` / `task_updated.patch` /
|
|
27
|
+
* `task_notification` still apply, for Claude Code runtimes that predate
|
|
28
|
+
* the level signal. Both are applied; for one transition they agree (a
|
|
29
|
+
* level first makes the edge an idempotent replay, an edge first is
|
|
30
|
+
* overwritten by the same set), so they cannot fight.
|
|
31
|
+
* - a foreground Agent whose tool_result carries `tool_use_result.status ===
|
|
32
|
+
* 'async_launched'` moved to the background (B-260-P2's marker) — the
|
|
33
|
+
* fallback when neither task_started.is_backgrounded nor the level exists.
|
|
34
|
+
* - `ambient` tasks are "not activity; hosts should exclude them from
|
|
35
|
+
* activity indicators" — excluded here too.
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
interface BackgroundTaskInfo {
|
|
39
|
+
id: string;
|
|
40
|
+
/** SDK task_type as reported (local_bash / local_agent / monitor / …); 'unknown' when absent. */
|
|
41
|
+
type: string;
|
|
42
|
+
description: string;
|
|
43
|
+
/** Wrapper-local ms epoch of when this task was first seen in the background. */
|
|
44
|
+
startedAt: number;
|
|
45
|
+
}
|
|
46
|
+
|
|
8
47
|
declare const sessionTurnEndStatusSchema: z.ZodEnum<{
|
|
9
48
|
completed: "completed";
|
|
10
49
|
failed: "failed";
|
|
@@ -721,6 +760,12 @@ type Metadata = {
|
|
|
721
760
|
type AgentState$1 = {
|
|
722
761
|
contextUsage?: ContextUsage | null;
|
|
723
762
|
controlledByUser?: boolean | null | undefined;
|
|
763
|
+
/** B-507: background tasks still in flight, renewed every 60s while non-empty
|
|
764
|
+
* (`update/backgroundTaskActivity.ts`). Readers expire it by `updatedAt`. */
|
|
765
|
+
backgroundTasks?: {
|
|
766
|
+
updatedAt: number;
|
|
767
|
+
tasks: BackgroundTaskInfo[];
|
|
768
|
+
} | null;
|
|
724
769
|
requests?: {
|
|
725
770
|
[id: string]: {
|
|
726
771
|
tool: string;
|
|
@@ -778,6 +823,15 @@ interface RpcHandlerConfig {
|
|
|
778
823
|
|
|
779
824
|
declare class RpcHandlerManager {
|
|
780
825
|
private handlers;
|
|
826
|
+
/**
|
|
827
|
+
* B-506: methods whose params/result are PLAINTEXT JSON strings instead of
|
|
828
|
+
* machine-key ciphertext. The caller is a CLI on another machine of the
|
|
829
|
+
* same account, which holds neither this machine's key nor the account
|
|
830
|
+
* content key; the trusted relay sees the payload either way (this fork
|
|
831
|
+
* is server-trusted, not e2e). Only `registerPlainHandler` puts a method
|
|
832
|
+
* here; everything else keeps decrypting.
|
|
833
|
+
*/
|
|
834
|
+
private plainMethods;
|
|
781
835
|
private readonly scopePrefix;
|
|
782
836
|
private readonly encryptionKey;
|
|
783
837
|
private readonly encryptionVariant;
|
|
@@ -791,12 +845,22 @@ declare class RpcHandlerManager {
|
|
|
791
845
|
*/
|
|
792
846
|
registerHandler<TRequest = any, TResponse = any>(method: string, handler: RpcHandler<TRequest, TResponse>): void;
|
|
793
847
|
unregisterHandler(method: string): void;
|
|
848
|
+
/**
|
|
849
|
+
* B-506: register a method whose request is a plaintext JSON string and
|
|
850
|
+
* whose response is returned as a plaintext JSON string (see
|
|
851
|
+
* `plainMethods`). The handler receives the parsed params; a throw is
|
|
852
|
+
* answered with `{ error }` like the encrypted path.
|
|
853
|
+
*/
|
|
854
|
+
registerPlainHandler<TRequest = any, TResponse = any>(method: string, handler: RpcHandler<TRequest, TResponse>): void;
|
|
855
|
+
isPlainMethod(prefixedMethod: string): boolean;
|
|
794
856
|
/**
|
|
795
857
|
* Handle an incoming RPC request
|
|
796
858
|
* @param request - The RPC request data
|
|
797
859
|
* @param callback - The response callback
|
|
798
860
|
*/
|
|
799
861
|
handleRequest(request: RpcRequest): Promise<any>;
|
|
862
|
+
/** Plaintext variant of handleRequest (B-506). Never throws; never encrypts. */
|
|
863
|
+
private handlePlainRequest;
|
|
800
864
|
onSocketConnect(socket: Socket): void;
|
|
801
865
|
/**
|
|
802
866
|
* Attach a candidate transport and wait until the server confirms every
|
|
@@ -1042,7 +1106,12 @@ declare class ApiSessionClient extends EventEmitter {
|
|
|
1042
1106
|
/** B-466: turn edges (and a periodic lease) reported to the local daemon so
|
|
1043
1107
|
* auto-update waits for "no turn in flight" instead of "no sessions". */
|
|
1044
1108
|
private readonly turnReporter;
|
|
1045
|
-
|
|
1109
|
+
/** B-507: background tasks in flight, published on change and renewed every
|
|
1110
|
+
* 60s to the daemon (`/session-event background_tasks`) and into agentState
|
|
1111
|
+
* (`backgroundTasks: { updatedAt, tasks }`) — the two readers that outlive a
|
|
1112
|
+
* single heartbeat. The heartbeat itself carries only the count. */
|
|
1113
|
+
private readonly backgroundTaskReporter;
|
|
1114
|
+
keepAlive(thinking: boolean, mode: 'local' | 'remote', backgroundTasks?: readonly BackgroundTaskInfo[]): void;
|
|
1046
1115
|
/**
|
|
1047
1116
|
* B-309: push one live stream frame (thinking/text delta or progress) to
|
|
1048
1117
|
* this account's web clients.
|
|
@@ -1419,6 +1488,13 @@ declare class ApiMachineClient {
|
|
|
1419
1488
|
}>;
|
|
1420
1489
|
setStore: (store: 'auto' | 'file') => Promise<ClaudeAuthState>;
|
|
1421
1490
|
}): void;
|
|
1491
|
+
/**
|
|
1492
|
+
* B-506: the five `sessions.*` methods a CLI on ANOTHER machine of this
|
|
1493
|
+
* account calls to read / message sessions this daemon spawned. Plaintext
|
|
1494
|
+
* on purpose (no shared key with the caller); see
|
|
1495
|
+
* `api/rpc/RpcHandlerManager.ts` `registerPlainHandler`.
|
|
1496
|
+
*/
|
|
1497
|
+
setRemoteSessionOpsHandlers(handlers: Record<string, (params: unknown) => Promise<unknown>>): void;
|
|
1422
1498
|
setRPCHandlers({ spawnSession, resumeSession, restartSession, stopSession, listTrackedSessionIds, requestShutdown }: MachineRpcHandlers): void;
|
|
1423
1499
|
private syncRestartSessionRpcRegistration;
|
|
1424
1500
|
private syncResumeSessionRpcRegistration;
|
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-DIBF4U0Y.mjs';
|
|
2
|
+
export { c as configuration, l as logger } from './limits-D2uN090G.mjs';
|
|
3
3
|
import 'axios';
|
|
4
4
|
import 'node:events';
|
|
5
5
|
import 'socket.io-client';
|