very-happy-cli 0.2.157 → 0.2.159
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AcpBackend-BymWX-LI.cjs → AcpBackend-DUYFlyfN.cjs} +2 -2
- package/dist/{AcpBackend-Cy18U7yw.mjs → AcpBackend-VsfkZiVF.mjs} +2 -2
- package/dist/{AcpSessionManager-BF7zBGAi.cjs → AcpSessionManager-Bdv8LWXh.cjs} +1 -1
- package/dist/{AcpSessionManager-Ds8rcp95.mjs → AcpSessionManager-rYtVb0kN.mjs} +1 -1
- package/dist/{agentGuidance-Db76O1kw.cjs → agentGuidance-BRDN1NoZ.cjs} +3 -2
- package/dist/{agentGuidance-CU6YD_Ms.mjs → agentGuidance-KgvYuF3R.mjs} +3 -2
- package/dist/{agentHome-B0CLy0Qx.cjs → agentHome-CHh4lmjM.cjs} +2 -2
- package/dist/{agentHome-BaJ9xtxB.mjs → agentHome-CvsJyeQB.mjs} +2 -2
- package/dist/{auto-DqKGFq8U.cjs → auto-DKmEls8Z.cjs} +19 -10
- package/dist/{auto-B1YAwaeU.mjs → auto-nb8GhRRy.mjs} +19 -10
- package/dist/codex/happyMcpStdioBridge.cjs +2 -2
- package/dist/codex/happyMcpStdioBridge.mjs +2 -2
- package/dist/{config-aAbhJllb.mjs → config-ClLtM6F3.mjs} +4 -4
- package/dist/{config-CzkBjZnV.cjs → config-DLx-vW3I.cjs} +4 -4
- package/dist/{index-BVu8Cufk.mjs → index-2mCaeKyf.mjs} +19 -9
- package/dist/{index-CTbGqVFY.cjs → index-BEOMECtE.cjs} +18 -8
- package/dist/{index-BYU1e81k.mjs → index-BF6WfgV5.mjs} +63 -29
- package/dist/{index-DQcRkI9r.mjs → index-C-JazrMB.mjs} +4 -4
- package/dist/{index-Cz-uqnJk.cjs → index-blDSadUR.cjs} +4 -4
- package/dist/{index-C9QzZsUQ.cjs → index-rH3DrQ5B.cjs} +67 -33
- package/dist/index.cjs +4 -4
- package/dist/index.mjs +4 -4
- package/dist/{install-BMlV0Tnr.cjs → install-BOHrUaFM.cjs} +1 -1
- package/dist/{install-BuYnqtVa.mjs → install-BPhJppvd.mjs} +1 -1
- package/dist/{installTerminalHooks-BVVOEGhG.cjs → installTerminalHooks-Cou3WUf3.cjs} +4 -4
- package/dist/{installTerminalHooks-ELDoqh0A.mjs → installTerminalHooks-WeznjkuC.mjs} +4 -4
- package/dist/lib.cjs +2 -2
- package/dist/lib.d.cts +114 -0
- package/dist/lib.d.mts +114 -0
- package/dist/lib.mjs +2 -2
- package/dist/{limits-CyuIt-Vl.cjs → limits-BH5CV5vR.cjs} +39 -7
- package/dist/{limits-A2c-3M-_.mjs → limits-CjRj8IX5.mjs} +39 -8
- package/dist/{mcp-CXkvnztT.cjs → mcp-CPYbtsYG.cjs} +4 -4
- package/dist/{mcp-Bo934Kpy.mjs → mcp-Dy3f_K0h.mjs} +4 -4
- package/dist/{piRuntime-CJjA26oD.cjs → piRuntime-NtF0YqjH.cjs} +2 -2
- package/dist/{piRuntime-DdEY2mE9.mjs → piRuntime-kLZNpAAl.mjs} +2 -2
- package/dist/{piTerminal-CpU3hzrX.cjs → piTerminal-9J0GAKzb.cjs} +6 -6
- package/dist/{piTerminal-DwWmgumi.mjs → piTerminal-B0fEOV_2.mjs} +6 -6
- package/dist/{runGemini-Cj6oJQ-I.mjs → runGemini-DV6Ouadt.mjs} +6 -6
- package/dist/{runGemini-DS-0qm0L.cjs → runGemini-F-mqx3_K.cjs} +6 -6
- package/dist/{runOpenClaw-DUCQxkI-.mjs → runOpenClaw-D7MlPS5n.mjs} +5 -5
- package/dist/{runOpenClaw-CvSm8oTc.cjs → runOpenClaw-Qqo9j63M.cjs} +5 -5
- package/dist/{send-CHxobaoI.cjs → send-4qJTCAYW.cjs} +2 -2
- package/dist/{send-D5CyRyZ_.mjs → send-CLhYXNgy.mjs} +2 -2
- package/dist/{sessions-BFlIrKCY.cjs → sessions-Bh1pyddi.cjs} +2 -2
- package/dist/{sessions-DsE01xKc.mjs → sessions-CzIH2rGp.mjs} +2 -2
- package/dist/{spawn-CdihhwHs.mjs → spawn-CPIWlPOM.mjs} +4 -4
- package/dist/{spawn-HV345RN-.cjs → spawn-CmFOSVdW.cjs} +4 -4
- package/dist/{teams-BahinMnH.cjs → teams-CB1R9-Z9.cjs} +5 -5
- package/dist/{teams-BE8nMB6O.mjs → teams-CEahj4cm.mjs} +5 -5
- package/dist/{todo-CuQAkSp2.mjs → todo-Cknp5D4U.mjs} +2 -2
- package/dist/{todo-CMMQ6yhU.cjs → todo-DqyRI4wP.cjs} +2 -2
- package/dist/{types-B0sSi6eM.cjs → types-BbvK1Tr_.cjs} +192 -2
- package/dist/{types-BrGJ7PJz.mjs → types-Dh-s4Lqs.mjs} +192 -2
- package/package.json +7 -7
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
var node_child_process = require('node:child_process');
|
|
4
4
|
var sdk = require('@agentclientprotocol/sdk');
|
|
5
5
|
var node_crypto = require('node:crypto');
|
|
6
|
-
var persistence = require('./limits-
|
|
7
|
-
var index = require('./types-
|
|
6
|
+
var persistence = require('./limits-BH5CV5vR.cjs');
|
|
7
|
+
var index = require('./types-BbvK1Tr_.cjs');
|
|
8
8
|
|
|
9
9
|
function acpImageBlocks(attachments, supportsImages) {
|
|
10
10
|
return attachments.filter((file) => ["image/jpeg", "image/png", "image/gif", "image/webp"].includes(file.mimeType)).map((file) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { spawn } from 'node:child_process';
|
|
2
2
|
import { ndJsonStream, ClientSideConnection } from '@agentclientprotocol/sdk';
|
|
3
3
|
import { randomUUID } from 'node:crypto';
|
|
4
|
-
import { l as logger, F as packageJson, g as delay } from './limits-
|
|
5
|
-
import { j as contentLogMetadata, i as errorLogMetadata } from './types-
|
|
4
|
+
import { l as logger, F as packageJson, g as delay } from './limits-CjRj8IX5.mjs';
|
|
5
|
+
import { j as contentLogMetadata, i as errorLogMetadata } from './types-Dh-s4Lqs.mjs';
|
|
6
6
|
|
|
7
7
|
function acpImageBlocks(attachments, supportsImages) {
|
|
8
8
|
return attachments.filter((file) => ["image/jpeg", "image/png", "image/gif", "image/webp"].includes(file.mimeType)).map((file) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createId } from '@paralleldrive/cuid2';
|
|
2
|
-
import { s as streamKeyOf, e as createEnvelope } from './limits-
|
|
2
|
+
import { s as streamKeyOf, e as createEnvelope } from './limits-CjRj8IX5.mjs';
|
|
3
3
|
|
|
4
4
|
function turnOptions(turnId, time) {
|
|
5
5
|
return turnId ? { turn: turnId, time } : { time };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var z = require('zod');
|
|
4
4
|
var node_crypto = require('node:crypto');
|
|
5
|
-
var persistence = require('./limits-
|
|
5
|
+
var persistence = require('./limits-BH5CV5vR.cjs');
|
|
6
6
|
var promises = require('node:fs/promises');
|
|
7
7
|
var node_fs = require('node:fs');
|
|
8
8
|
var path = require('node:path');
|
|
@@ -305,7 +305,8 @@ function createAutomationsClient(options) {
|
|
|
305
305
|
}).then((r) => r.runs),
|
|
306
306
|
getRun: (id) => request("GET", `/v1/automations/runs/${enc(id)}`).then((r) => r.run),
|
|
307
307
|
cancel: (id) => request("POST", `/v1/automations/runs/${enc(id)}/cancel`).then((r) => r.run),
|
|
308
|
-
|
|
308
|
+
/** B-508: `by` records what resolved the flag (server default `owner`; older servers ignore the body). */
|
|
309
|
+
ack: (id, by) => request("POST", `/v1/automations/runs/${enc(id)}/ack`, by === void 0 ? void 0 : { by }).then((r) => r.run),
|
|
309
310
|
report: (id, input) => request("POST", `/v1/automations/runs/${enc(id)}/report`, input).then((r) => r.run),
|
|
310
311
|
claim: (input) => request("POST", "/v1/automations/claim", input),
|
|
311
312
|
stickies: (id, key) => request("GET", `/v1/automations/${enc(id)}/stickies`, void 0, { key }).then((r) => r.stickies),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { randomUUID } from 'node:crypto';
|
|
3
|
-
import { G as normalizeHttpEndpoint, c as configuration, r as readSettings, d as readPersistedSessions, h as readCredentialsForConfiguredRelay, H as AutomationNameSchema, I as AutomationConcurrencySchema, J as AutomationActionSchema, K as AutomationTriggerSchema, w as encodeBase64, L as encrypt, M as decodeBase64, g as delay, N as decrypt, O as listDaemonSessions, n as stopDaemonSession,
|
|
3
|
+
import { G as normalizeHttpEndpoint, c as configuration, r as readSettings, d as readPersistedSessions, h as readCredentialsForConfiguredRelay, H as AutomationNameSchema, I as AutomationConcurrencySchema, J as AutomationActionSchema, K as AutomationTriggerSchema, w as encodeBase64, L as encrypt, M as decodeBase64, g as delay, N as decrypt, O as listDaemonSessions, n as stopDaemonSession, Q as backgroundTasksReport, R as resumeDaemonSession, i as isValidSessionId, S as listDaemonPeers } from './limits-CjRj8IX5.mjs';
|
|
4
4
|
import { open, mkdir, rename, unlink } from 'node:fs/promises';
|
|
5
5
|
import { constants, existsSync, readFileSync, statSync } from 'node:fs';
|
|
6
6
|
import { isAbsolute, join, dirname, resolve as resolve$1 } from 'node:path';
|
|
@@ -303,7 +303,8 @@ function createAutomationsClient(options) {
|
|
|
303
303
|
}).then((r) => r.runs),
|
|
304
304
|
getRun: (id) => request("GET", `/v1/automations/runs/${enc(id)}`).then((r) => r.run),
|
|
305
305
|
cancel: (id) => request("POST", `/v1/automations/runs/${enc(id)}/cancel`).then((r) => r.run),
|
|
306
|
-
|
|
306
|
+
/** B-508: `by` records what resolved the flag (server default `owner`; older servers ignore the body). */
|
|
307
|
+
ack: (id, by) => request("POST", `/v1/automations/runs/${enc(id)}/ack`, by === void 0 ? void 0 : { by }).then((r) => r.run),
|
|
307
308
|
report: (id, input) => request("POST", `/v1/automations/runs/${enc(id)}/report`, input).then((r) => r.run),
|
|
308
309
|
claim: (input) => request("POST", "/v1/automations/claim", input),
|
|
309
310
|
stickies: (id, key) => request("GET", `/v1/automations/${enc(id)}/stickies`, void 0, { key }).then((r) => r.stickies),
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
var chalk = require('chalk');
|
|
4
4
|
var os = require('node:os');
|
|
5
|
-
var persistence = require('./limits-
|
|
5
|
+
var persistence = require('./limits-BH5CV5vR.cjs');
|
|
6
6
|
require('node:fs');
|
|
7
|
-
var index = require('./types-
|
|
7
|
+
var index = require('./types-BbvK1Tr_.cjs');
|
|
8
8
|
require('zod');
|
|
9
9
|
require('@paralleldrive/cuid2');
|
|
10
10
|
require('node:fs/promises');
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
2
|
import { homedir } from 'node:os';
|
|
3
|
-
import { r as readSettings, u as updateSettings } from './limits-
|
|
3
|
+
import { r as readSettings, u as updateSettings } from './limits-CjRj8IX5.mjs';
|
|
4
4
|
import 'node:fs';
|
|
5
|
-
import { d as describeAgentHome, p as probeLoginShellEnv, r as resolveAgentHomes, e as expandHomePath, b as AGENT_HOME_ENV_NAMES } from './types-
|
|
5
|
+
import { d as describeAgentHome, p as probeLoginShellEnv, r as resolveAgentHomes, e as expandHomePath, b as AGENT_HOME_ENV_NAMES } from './types-Dh-s4Lqs.mjs';
|
|
6
6
|
import 'zod';
|
|
7
7
|
import '@paralleldrive/cuid2';
|
|
8
8
|
import 'node:fs/promises';
|
|
@@ -4,11 +4,11 @@ var chalk = require('chalk');
|
|
|
4
4
|
var os = require('node:os');
|
|
5
5
|
var node_fs = require('node:fs');
|
|
6
6
|
var path = require('node:path');
|
|
7
|
-
var persistence = require('./limits-
|
|
8
|
-
var agentGuidance = require('./agentGuidance-
|
|
9
|
-
var index = require('./index-
|
|
10
|
-
var install = require('./install-
|
|
11
|
-
var spawn = require('./spawn-
|
|
7
|
+
var persistence = require('./limits-BH5CV5vR.cjs');
|
|
8
|
+
var agentGuidance = require('./agentGuidance-BRDN1NoZ.cjs');
|
|
9
|
+
var index = require('./index-rH3DrQ5B.cjs');
|
|
10
|
+
var install = require('./install-BOHrUaFM.cjs');
|
|
11
|
+
var spawn = require('./spawn-CmFOSVdW.cjs');
|
|
12
12
|
require('zod');
|
|
13
13
|
require('@paralleldrive/cuid2');
|
|
14
14
|
require('node:fs/promises');
|
|
@@ -17,7 +17,7 @@ require('tweetnacl');
|
|
|
17
17
|
require('node:util');
|
|
18
18
|
require('axios');
|
|
19
19
|
require('socket.io-client');
|
|
20
|
-
require('./types-
|
|
20
|
+
require('./types-BbvK1Tr_.cjs');
|
|
21
21
|
require('node:events');
|
|
22
22
|
require('child_process');
|
|
23
23
|
require('util');
|
|
@@ -53,7 +53,7 @@ require('node:readline/promises');
|
|
|
53
53
|
|
|
54
54
|
const AUTO_ACTIONS = ["list", "show", "create", "edit", "pause", "resume", "rm", "run", "fire", "runs", "cancel", "ack", "report", "skill", "install", "uninstall", "help"];
|
|
55
55
|
const VALUE_FLAGS = ["--name", "--rename", "--description", "--machine", "--cron", "--tz", "--every", "--at", "--spawn-dir", "--prompt", "--prompt-file", "--agent", "--model", "--permission-mode", "--sticky-key", "--send-session", "--cwd", "--env", "--timeout", "--concurrency", "--max-runtime", "--payload", "--payload-json", "--payload-file", "--dedupe-key", "--status", "--limit", "--run", "--summary", "--error", "--attention", "--host", "--home"];
|
|
56
|
-
const BOOL_FLAGS = ["--manual", "--script", "--worktree", "--paused", "--wait", "--json", "--apply", "--all-machines", "--attention", "--help", "-h"];
|
|
56
|
+
const BOOL_FLAGS = ["--manual", "--script", "--worktree", "--paused", "--wait", "--json", "--apply", "--all-machines", "--all", "--attention", "--help", "-h"];
|
|
57
57
|
function parseAutoArgs(args) {
|
|
58
58
|
const command = { action: "help", flags: {}, env: [], bools: /* @__PURE__ */ new Set(), argv: [] };
|
|
59
59
|
if (args.length === 0) return command;
|
|
@@ -172,7 +172,7 @@ ${chalk.bold("Usage:")}
|
|
|
172
172
|
very-happy auto fire <name> [--payload\u2026] [--dedupe-key <key>] [--wait [--timeout <dur>]]
|
|
173
173
|
very-happy auto runs [--name <name>] [--status <s>] [--attention] [--limit <n>] [--json]
|
|
174
174
|
very-happy auto runs <runId> [--json]
|
|
175
|
-
very-happy auto cancel <runId> | ack <runId>
|
|
175
|
+
very-happy auto cancel <runId> | ack <runId> | ack --all [--name <name>]
|
|
176
176
|
very-happy auto report [--run <id>] --status done|failed [--summary <text>] [--error <text>] [--attention <reason>]
|
|
177
177
|
very-happy auto skill | install|uninstall --host claude|codex|pi [--home <path>] [--apply]
|
|
178
178
|
|
|
@@ -265,7 +265,7 @@ async function handleAutoCommand(args) {
|
|
|
265
265
|
const needsName = ["show", "edit", "pause", "resume", "rm", "run", "fire"];
|
|
266
266
|
const needsRunId = ["cancel", "ack"];
|
|
267
267
|
if (needsName.includes(command.action) && !command.target) throw new Error(`${command.action} needs an automation name`);
|
|
268
|
-
if (needsRunId.includes(command.action) && !command.target) throw new Error(`${command.action} needs a run id`);
|
|
268
|
+
if (needsRunId.includes(command.action) && !command.target && !(command.action === "ack" && command.bools.has("--all"))) throw new Error(`${command.action} needs a run id (or ack --all)`);
|
|
269
269
|
if (command.action === "create" && !command.flags["--name"]) throw new Error("create needs --name <name>");
|
|
270
270
|
for (const name of [command.flags["--name"], command.flags["--rename"], needsName.includes(command.action) ? command.target : void 0]) {
|
|
271
271
|
if (name !== void 0 && !persistence.AUTOMATION_NAME_PATTERN.test(name)) throw new Error(`Invalid automation name "${name}": use [a-z0-9][a-z0-9-_.]{0,63}`);
|
|
@@ -431,7 +431,16 @@ async function handleAutoCommand(args) {
|
|
|
431
431
|
}
|
|
432
432
|
case "cancel":
|
|
433
433
|
case "ack": {
|
|
434
|
-
|
|
434
|
+
if (command.action === "ack" && command.bools.has("--all")) {
|
|
435
|
+
if (command.target) throw new Error("ack --all takes no run id (use --name to limit to one automation)");
|
|
436
|
+
const flagged = await client.runs({ name: command.flags["--name"], attention: true, limit: 200 });
|
|
437
|
+
const runs = [];
|
|
438
|
+
for (const run2 of flagged) runs.push(await client.ack(run2.id, "owner"));
|
|
439
|
+
if (json) console.log(JSON.stringify({ acked: runs.length, runs }));
|
|
440
|
+
else console.log(runs.length === 0 ? "Nothing needs your decision." : `Acknowledged ${runs.length} run(s).`);
|
|
441
|
+
return;
|
|
442
|
+
}
|
|
443
|
+
const run = command.action === "cancel" ? await client.cancel(command.target) : await client.ack(command.target, "owner");
|
|
435
444
|
if (json) console.log(JSON.stringify({ run }));
|
|
436
445
|
else printRun(run);
|
|
437
446
|
return;
|
|
@@ -2,11 +2,11 @@ import chalk from 'chalk';
|
|
|
2
2
|
import { homedir } from 'node:os';
|
|
3
3
|
import { readFileSync } from 'node:fs';
|
|
4
4
|
import { resolve } from 'node:path';
|
|
5
|
-
import { A as AUTOMATION_NAME_PATTERN, f as isAutomationRunTerminal, c as configuration, g as delay } from './limits-
|
|
6
|
-
import { y as authenticatedAutomationsClient, z as automationRunIdFromEnv, x as sessionWebUrl, A as isAutomationsUnavailable, B as AUTOMATIONS_UNAVAILABLE_MESSAGE } from './agentGuidance-
|
|
7
|
-
import { p as parseDuration, t as triggerFromFlags, d as describeTrigger, a as describeAction, S as SPAWN_AGENTS, s as sanitizeSpawnPermissionMode, A as ALLOWED_SPAWN_PERMISSION_MODES } from './index-
|
|
8
|
-
import { A as AUTOMATION_SKILL, i as installAutomationSkill } from './install-
|
|
9
|
-
import { parseEnvAssignment } from './spawn-
|
|
5
|
+
import { A as AUTOMATION_NAME_PATTERN, f as isAutomationRunTerminal, c as configuration, g as delay } from './limits-CjRj8IX5.mjs';
|
|
6
|
+
import { y as authenticatedAutomationsClient, z as automationRunIdFromEnv, x as sessionWebUrl, A as isAutomationsUnavailable, B as AUTOMATIONS_UNAVAILABLE_MESSAGE } from './agentGuidance-KgvYuF3R.mjs';
|
|
7
|
+
import { p as parseDuration, t as triggerFromFlags, d as describeTrigger, a as describeAction, S as SPAWN_AGENTS, s as sanitizeSpawnPermissionMode, A as ALLOWED_SPAWN_PERMISSION_MODES } from './index-BF6WfgV5.mjs';
|
|
8
|
+
import { A as AUTOMATION_SKILL, i as installAutomationSkill } from './install-BPhJppvd.mjs';
|
|
9
|
+
import { parseEnvAssignment } from './spawn-CPIWlPOM.mjs';
|
|
10
10
|
import 'zod';
|
|
11
11
|
import '@paralleldrive/cuid2';
|
|
12
12
|
import 'node:fs/promises';
|
|
@@ -15,7 +15,7 @@ import 'tweetnacl';
|
|
|
15
15
|
import 'node:util';
|
|
16
16
|
import 'axios';
|
|
17
17
|
import 'socket.io-client';
|
|
18
|
-
import './types-
|
|
18
|
+
import './types-Dh-s4Lqs.mjs';
|
|
19
19
|
import 'node:events';
|
|
20
20
|
import 'child_process';
|
|
21
21
|
import 'util';
|
|
@@ -51,7 +51,7 @@ import 'node:readline/promises';
|
|
|
51
51
|
|
|
52
52
|
const AUTO_ACTIONS = ["list", "show", "create", "edit", "pause", "resume", "rm", "run", "fire", "runs", "cancel", "ack", "report", "skill", "install", "uninstall", "help"];
|
|
53
53
|
const VALUE_FLAGS = ["--name", "--rename", "--description", "--machine", "--cron", "--tz", "--every", "--at", "--spawn-dir", "--prompt", "--prompt-file", "--agent", "--model", "--permission-mode", "--sticky-key", "--send-session", "--cwd", "--env", "--timeout", "--concurrency", "--max-runtime", "--payload", "--payload-json", "--payload-file", "--dedupe-key", "--status", "--limit", "--run", "--summary", "--error", "--attention", "--host", "--home"];
|
|
54
|
-
const BOOL_FLAGS = ["--manual", "--script", "--worktree", "--paused", "--wait", "--json", "--apply", "--all-machines", "--attention", "--help", "-h"];
|
|
54
|
+
const BOOL_FLAGS = ["--manual", "--script", "--worktree", "--paused", "--wait", "--json", "--apply", "--all-machines", "--all", "--attention", "--help", "-h"];
|
|
55
55
|
function parseAutoArgs(args) {
|
|
56
56
|
const command = { action: "help", flags: {}, env: [], bools: /* @__PURE__ */ new Set(), argv: [] };
|
|
57
57
|
if (args.length === 0) return command;
|
|
@@ -170,7 +170,7 @@ ${chalk.bold("Usage:")}
|
|
|
170
170
|
very-happy auto fire <name> [--payload\u2026] [--dedupe-key <key>] [--wait [--timeout <dur>]]
|
|
171
171
|
very-happy auto runs [--name <name>] [--status <s>] [--attention] [--limit <n>] [--json]
|
|
172
172
|
very-happy auto runs <runId> [--json]
|
|
173
|
-
very-happy auto cancel <runId> | ack <runId>
|
|
173
|
+
very-happy auto cancel <runId> | ack <runId> | ack --all [--name <name>]
|
|
174
174
|
very-happy auto report [--run <id>] --status done|failed [--summary <text>] [--error <text>] [--attention <reason>]
|
|
175
175
|
very-happy auto skill | install|uninstall --host claude|codex|pi [--home <path>] [--apply]
|
|
176
176
|
|
|
@@ -263,7 +263,7 @@ async function handleAutoCommand(args) {
|
|
|
263
263
|
const needsName = ["show", "edit", "pause", "resume", "rm", "run", "fire"];
|
|
264
264
|
const needsRunId = ["cancel", "ack"];
|
|
265
265
|
if (needsName.includes(command.action) && !command.target) throw new Error(`${command.action} needs an automation name`);
|
|
266
|
-
if (needsRunId.includes(command.action) && !command.target) throw new Error(`${command.action} needs a run id`);
|
|
266
|
+
if (needsRunId.includes(command.action) && !command.target && !(command.action === "ack" && command.bools.has("--all"))) throw new Error(`${command.action} needs a run id (or ack --all)`);
|
|
267
267
|
if (command.action === "create" && !command.flags["--name"]) throw new Error("create needs --name <name>");
|
|
268
268
|
for (const name of [command.flags["--name"], command.flags["--rename"], needsName.includes(command.action) ? command.target : void 0]) {
|
|
269
269
|
if (name !== void 0 && !AUTOMATION_NAME_PATTERN.test(name)) throw new Error(`Invalid automation name "${name}": use [a-z0-9][a-z0-9-_.]{0,63}`);
|
|
@@ -429,7 +429,16 @@ async function handleAutoCommand(args) {
|
|
|
429
429
|
}
|
|
430
430
|
case "cancel":
|
|
431
431
|
case "ack": {
|
|
432
|
-
|
|
432
|
+
if (command.action === "ack" && command.bools.has("--all")) {
|
|
433
|
+
if (command.target) throw new Error("ack --all takes no run id (use --name to limit to one automation)");
|
|
434
|
+
const flagged = await client.runs({ name: command.flags["--name"], attention: true, limit: 200 });
|
|
435
|
+
const runs = [];
|
|
436
|
+
for (const run2 of flagged) runs.push(await client.ack(run2.id, "owner"));
|
|
437
|
+
if (json) console.log(JSON.stringify({ acked: runs.length, runs }));
|
|
438
|
+
else console.log(runs.length === 0 ? "Nothing needs your decision." : `Acknowledged ${runs.length} run(s).`);
|
|
439
|
+
return;
|
|
440
|
+
}
|
|
441
|
+
const run = command.action === "cancel" ? await client.cancel(command.target) : await client.ack(command.target, "owner");
|
|
433
442
|
if (json) console.log(JSON.stringify({ run }));
|
|
434
443
|
else printRun(run);
|
|
435
444
|
return;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var agentGuidance = require('../agentGuidance-
|
|
3
|
+
var agentGuidance = require('../agentGuidance-BRDN1NoZ.cjs');
|
|
4
4
|
var mcp_js = require('@modelcontextprotocol/sdk/server/mcp.js');
|
|
5
5
|
var stdio_js = require('@modelcontextprotocol/sdk/server/stdio.js');
|
|
6
6
|
var index_js = require('@modelcontextprotocol/sdk/client/index.js');
|
|
7
7
|
var streamableHttp_js = require('@modelcontextprotocol/sdk/client/streamableHttp.js');
|
|
8
8
|
var z = require('zod');
|
|
9
|
-
var persistence = require('../limits-
|
|
9
|
+
var persistence = require('../limits-BH5CV5vR.cjs');
|
|
10
10
|
require('node:crypto');
|
|
11
11
|
require('node:fs/promises');
|
|
12
12
|
require('node:fs');
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { P as PREVIEW_TOOL_NAME, a as PREVIEW_TOOL_TITLE, b as PREVIEW_TOOL_DESCRIPTION, r as registerTeamsTools, c as registerAutomationTools, d as registerSessionPeerTools } from '../agentGuidance-
|
|
1
|
+
import { P as PREVIEW_TOOL_NAME, a as PREVIEW_TOOL_TITLE, b as PREVIEW_TOOL_DESCRIPTION, r as registerTeamsTools, c as registerAutomationTools, d as registerSessionPeerTools } from '../agentGuidance-KgvYuF3R.mjs';
|
|
2
2
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
3
3
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
4
4
|
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
5
5
|
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';
|
|
6
6
|
import { z } from 'zod';
|
|
7
|
-
import { C as CLIPBOARD_TOOL_NAME, a as CLIPBOARD_TOOL_TITLE, b as CLIPBOARD_TOOL_DESCRIPTION } from '../limits-
|
|
7
|
+
import { C as CLIPBOARD_TOOL_NAME, a as CLIPBOARD_TOOL_TITLE, b as CLIPBOARD_TOOL_DESCRIPTION } from '../limits-CjRj8IX5.mjs';
|
|
8
8
|
import 'node:crypto';
|
|
9
9
|
import 'node:fs/promises';
|
|
10
10
|
import 'node:fs';
|
|
@@ -2,8 +2,8 @@ import { existsSync, readFileSync, mkdirSync, writeFileSync } from 'fs';
|
|
|
2
2
|
import { join } from 'path';
|
|
3
3
|
import { homedir } from 'os';
|
|
4
4
|
import { execSync } from 'child_process';
|
|
5
|
-
import { l as logger } from './limits-
|
|
6
|
-
import { D as DEFAULT_GEMINI_MODEL, G as GEMINI_MODEL_ENV } from './index-
|
|
5
|
+
import { l as logger } from './limits-CjRj8IX5.mjs';
|
|
6
|
+
import { D as DEFAULT_GEMINI_MODEL, G as GEMINI_MODEL_ENV } from './index-BF6WfgV5.mjs';
|
|
7
7
|
import 'zod';
|
|
8
8
|
import '@paralleldrive/cuid2';
|
|
9
9
|
import 'node:fs/promises';
|
|
@@ -14,7 +14,7 @@ import 'chalk';
|
|
|
14
14
|
import 'node:util';
|
|
15
15
|
import 'node:os';
|
|
16
16
|
import 'node:path';
|
|
17
|
-
import './types-
|
|
17
|
+
import './types-Dh-s4Lqs.mjs';
|
|
18
18
|
import 'axios';
|
|
19
19
|
import 'node:events';
|
|
20
20
|
import 'socket.io-client';
|
|
@@ -29,7 +29,7 @@ import 'node-pty';
|
|
|
29
29
|
import 'node:readline';
|
|
30
30
|
import '@anthropic-ai/sandbox-runtime';
|
|
31
31
|
import 'expo-server-sdk';
|
|
32
|
-
import './agentGuidance-
|
|
32
|
+
import './agentGuidance-KgvYuF3R.mjs';
|
|
33
33
|
import 'ink';
|
|
34
34
|
import 'react';
|
|
35
35
|
import '@anthropic-ai/claude-agent-sdk';
|
|
@@ -4,8 +4,8 @@ var fs = require('fs');
|
|
|
4
4
|
var path = require('path');
|
|
5
5
|
var os = require('os');
|
|
6
6
|
var child_process = require('child_process');
|
|
7
|
-
var persistence = require('./limits-
|
|
8
|
-
var index = require('./index-
|
|
7
|
+
var persistence = require('./limits-BH5CV5vR.cjs');
|
|
8
|
+
var index = require('./index-rH3DrQ5B.cjs');
|
|
9
9
|
require('zod');
|
|
10
10
|
require('@paralleldrive/cuid2');
|
|
11
11
|
require('node:fs/promises');
|
|
@@ -16,7 +16,7 @@ require('chalk');
|
|
|
16
16
|
require('node:util');
|
|
17
17
|
require('node:os');
|
|
18
18
|
require('node:path');
|
|
19
|
-
require('./types-
|
|
19
|
+
require('./types-BbvK1Tr_.cjs');
|
|
20
20
|
require('axios');
|
|
21
21
|
require('node:events');
|
|
22
22
|
require('socket.io-client');
|
|
@@ -31,7 +31,7 @@ require('node-pty');
|
|
|
31
31
|
require('node:readline');
|
|
32
32
|
require('@anthropic-ai/sandbox-runtime');
|
|
33
33
|
require('expo-server-sdk');
|
|
34
|
-
require('./agentGuidance-
|
|
34
|
+
require('./agentGuidance-BRDN1NoZ.cjs');
|
|
35
35
|
require('ink');
|
|
36
36
|
require('react');
|
|
37
37
|
require('@anthropic-ai/claude-agent-sdk');
|
|
@@ -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-VsfkZiVF.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-VsfkZiVF.mjs';
|
|
3
|
+
import { r as readSettings, v as notifyDaemonSessionStarted, w as encodeBase64, l as logger, x as BUILTIN_TODO_DISCOVERY, c as configuration, P as PROMPT_QUEUE_CAPABILITY, y as reportSessionEditToDaemon } from './limits-CjRj8IX5.mjs';
|
|
4
|
+
import { A as AcpSessionManager } from './AcpSessionManager-rYtVb0kN.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-BF6WfgV5.mjs';
|
|
6
|
+
import { p as preparePiTeamsRuntime } from './piRuntime-kLZNpAAl.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-Dh-s4Lqs.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-KgvYuF3R.mjs';
|
|
24
24
|
import 'axios';
|
|
25
25
|
import 'socket.io-client';
|
|
26
26
|
import 'fs/promises';
|
|
@@ -603,7 +603,8 @@ async function runAcp(opts) {
|
|
|
603
603
|
...process.env.VH_TEAM_OPERATION_ID ? { teamOperationId: process.env.VH_TEAM_OPERATION_ID } : {},
|
|
604
604
|
machineId: settings.machineId,
|
|
605
605
|
startedBy: opts.startedBy,
|
|
606
|
-
sandbox: settings.sandboxConfig
|
|
606
|
+
sandbox: settings.sandboxConfig,
|
|
607
|
+
capabilities: [PROMPT_QUEUE_CAPABILITY]
|
|
607
608
|
});
|
|
608
609
|
metadata.attachmentKinds = [];
|
|
609
610
|
const response = await api.getOrCreateSession({ tag: sessionTag, metadata, state });
|
|
@@ -623,6 +624,7 @@ async function runAcp(opts) {
|
|
|
623
624
|
if (permissionHandler) {
|
|
624
625
|
permissionHandler.updateSession(newSession);
|
|
625
626
|
}
|
|
627
|
+
attachPromptQueueDrain(newSession);
|
|
626
628
|
}
|
|
627
629
|
});
|
|
628
630
|
session = initialSession;
|
|
@@ -647,6 +649,13 @@ async function runAcp(opts) {
|
|
|
647
649
|
});
|
|
648
650
|
const sessionManager = new AcpSessionManager(streamingEnabled ? { stream: streamRelay } : {});
|
|
649
651
|
const messageQueue = new MessageQueue2((mode) => hashObject(mode));
|
|
652
|
+
function attachPromptQueueDrain(client) {
|
|
653
|
+
const drain = client.attachPromptQueueDrain({
|
|
654
|
+
isIdle: () => messageQueue.size() === 0 && messageQueue.isWaiting()
|
|
655
|
+
});
|
|
656
|
+
messageQueue.setOnWait(() => drain.onIdle());
|
|
657
|
+
}
|
|
658
|
+
attachPromptQueueDrain(session);
|
|
650
659
|
let currentPermissionMode;
|
|
651
660
|
let currentModel;
|
|
652
661
|
let modeSelector = null;
|
|
@@ -1226,6 +1235,7 @@ ${BUILTIN_TODO_DISCOVERY}`;
|
|
|
1226
1235
|
logger.debug(`[${opts.agentName}] Failed to stop Happy MCP server:`, error);
|
|
1227
1236
|
}
|
|
1228
1237
|
try {
|
|
1238
|
+
session.closePromptQueueDrain();
|
|
1229
1239
|
session.updateMetadata((currentMetadata) => ({
|
|
1230
1240
|
...currentMetadata,
|
|
1231
1241
|
lifecycleState: "archived",
|
|
@@ -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-DUYFlyfN.cjs');
|
|
4
|
+
var persistence = require('./limits-BH5CV5vR.cjs');
|
|
5
|
+
var AcpSessionManager = require('./AcpSessionManager-Bdv8LWXh.cjs');
|
|
6
|
+
var index$1 = require('./index-rH3DrQ5B.cjs');
|
|
7
|
+
var piRuntime = require('./piRuntime-NtF0YqjH.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-BbvK1Tr_.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-BRDN1NoZ.cjs');
|
|
25
25
|
require('axios');
|
|
26
26
|
require('socket.io-client');
|
|
27
27
|
require('fs/promises');
|
|
@@ -604,7 +604,8 @@ async function runAcp(opts) {
|
|
|
604
604
|
...process.env.VH_TEAM_OPERATION_ID ? { teamOperationId: process.env.VH_TEAM_OPERATION_ID } : {},
|
|
605
605
|
machineId: settings.machineId,
|
|
606
606
|
startedBy: opts.startedBy,
|
|
607
|
-
sandbox: settings.sandboxConfig
|
|
607
|
+
sandbox: settings.sandboxConfig,
|
|
608
|
+
capabilities: [persistence.PROMPT_QUEUE_CAPABILITY]
|
|
608
609
|
});
|
|
609
610
|
metadata.attachmentKinds = [];
|
|
610
611
|
const response = await api.getOrCreateSession({ tag: sessionTag, metadata, state });
|
|
@@ -624,6 +625,7 @@ async function runAcp(opts) {
|
|
|
624
625
|
if (permissionHandler) {
|
|
625
626
|
permissionHandler.updateSession(newSession);
|
|
626
627
|
}
|
|
628
|
+
attachPromptQueueDrain(newSession);
|
|
627
629
|
}
|
|
628
630
|
});
|
|
629
631
|
session = initialSession;
|
|
@@ -648,6 +650,13 @@ async function runAcp(opts) {
|
|
|
648
650
|
});
|
|
649
651
|
const sessionManager = new AcpSessionManager.AcpSessionManager(streamingEnabled ? { stream: streamRelay } : {});
|
|
650
652
|
const messageQueue = new index$1.MessageQueue2((mode) => index$1.hashObject(mode));
|
|
653
|
+
function attachPromptQueueDrain(client) {
|
|
654
|
+
const drain = client.attachPromptQueueDrain({
|
|
655
|
+
isIdle: () => messageQueue.size() === 0 && messageQueue.isWaiting()
|
|
656
|
+
});
|
|
657
|
+
messageQueue.setOnWait(() => drain.onIdle());
|
|
658
|
+
}
|
|
659
|
+
attachPromptQueueDrain(session);
|
|
651
660
|
let currentPermissionMode;
|
|
652
661
|
let currentModel;
|
|
653
662
|
let modeSelector = null;
|
|
@@ -1227,6 +1236,7 @@ ${persistence.BUILTIN_TODO_DISCOVERY}`;
|
|
|
1227
1236
|
persistence.logger.debug(`[${opts.agentName}] Failed to stop Happy MCP server:`, error);
|
|
1228
1237
|
}
|
|
1229
1238
|
try {
|
|
1239
|
+
session.closePromptQueueDrain();
|
|
1230
1240
|
session.updateMetadata((currentMetadata) => ({
|
|
1231
1241
|
...currentMetadata,
|
|
1232
1242
|
lifecycleState: "archived",
|