very-happy-cli 0.2.151 → 0.2.152

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.
Files changed (57) hide show
  1. package/dist/{AcpBackend-BjTA5gUB.mjs → AcpBackend-Bs3wwYbt.mjs} +2 -2
  2. package/dist/{AcpBackend-blE9IEod.cjs → AcpBackend-CogiKCng.cjs} +2 -2
  3. package/dist/{AcpSessionManager-D-9mrp40.mjs → AcpSessionManager-BT8PJMEm.mjs} +1 -1
  4. package/dist/{AcpSessionManager-bF8PYu_B.cjs → AcpSessionManager-BazkBuFo.cjs} +9 -9
  5. package/dist/agentGuidance-CqBn77AI.cjs +553 -0
  6. package/dist/agentGuidance-Daxn5Nvj.mjs +529 -0
  7. package/dist/{agentHome-CeFDNzvq.mjs → agentHome-CCYfs8Ec.mjs} +3 -3
  8. package/dist/{agentHome-D6MSfwnp.cjs → agentHome-CpJjrQZc.cjs} +3 -3
  9. package/dist/auto-DV5emt1-.mjs +466 -0
  10. package/dist/auto-DncmTDvw.cjs +472 -0
  11. package/dist/codex/happyMcpStdioBridge.cjs +4 -2
  12. package/dist/codex/happyMcpStdioBridge.mjs +4 -2
  13. package/dist/{config-C-A1XF62.mjs → config-DbKpQpdL.mjs} +5 -5
  14. package/dist/{config-Cadw1sAk.cjs → config-DeJgSMh-.cjs} +5 -5
  15. package/dist/{index-CIyjJy8D.mjs → index-BauTv2jB.mjs} +712 -39
  16. package/dist/{index-DYQgcgL2.mjs → index-CN7OF2cU.mjs} +5 -5
  17. package/dist/{index-vyRqLjDv.cjs → index-CRaJ9k2p.cjs} +5 -5
  18. package/dist/{index-DEp6CmmS.mjs → index-DahaLbu4.mjs} +19 -19
  19. package/dist/{index-CqtfRzug.cjs → index-ZIW1jrYm.cjs} +750 -71
  20. package/dist/{index-BKGspSWk.cjs → index-imt4mC41.cjs} +19 -19
  21. package/dist/index.cjs +4 -4
  22. package/dist/index.mjs +4 -4
  23. package/dist/install-C1K3nrxF.mjs +114 -0
  24. package/dist/install-CDR3qBhs.cjs +118 -0
  25. package/dist/{installTerminalHooks-Bf_adbl3.cjs → installTerminalHooks-BoDxpaBO.cjs} +5 -5
  26. package/dist/{installTerminalHooks-Ch_yTtEA.mjs → installTerminalHooks-VvmlO6Ue.mjs} +5 -5
  27. package/dist/lib.cjs +3 -3
  28. package/dist/lib.mjs +3 -3
  29. package/dist/limits-BNTWyUaZ.cjs +2175 -0
  30. package/dist/limits-CKR_HJnO.mjs +2080 -0
  31. package/dist/{mcp-CMxEZ6-0.cjs → mcp-CCKCKL6l.cjs} +5 -5
  32. package/dist/{mcp-zu8n8TkR.mjs → mcp-D4dAo5BQ.mjs} +5 -5
  33. package/dist/{piRuntime-D3ny0mVg.cjs → piRuntime-Bn5ypbjH.cjs} +2 -2
  34. package/dist/{piRuntime-Cu6cXZ6N.mjs → piRuntime-CW-XA4rz.mjs} +2 -2
  35. package/dist/{piTerminal-kDSd_r9X.cjs → piTerminal-B7K75aXB.cjs} +6 -6
  36. package/dist/{piTerminal-M677UP7y.mjs → piTerminal-BLSXK1u2.mjs} +6 -6
  37. package/dist/{runGemini-DuwdVV1O.cjs → runGemini-Bgg1BzDK.cjs} +7 -7
  38. package/dist/{runGemini-DvJwQVGp.mjs → runGemini-D5N11LxO.mjs} +7 -7
  39. package/dist/{runOpenClaw-BsvtCE_H.cjs → runOpenClaw-B9qWHybc.cjs} +6 -6
  40. package/dist/{runOpenClaw-BG82bF18.mjs → runOpenClaw-CCpyKbrn.mjs} +6 -6
  41. package/dist/{send-o6WM-1G8.mjs → send-C44kcXz5.mjs} +5 -5
  42. package/dist/{send-aUkjhey7.cjs → send-wl9ei8yG.cjs} +5 -5
  43. package/dist/{sessions-DlU3foY_.mjs → sessions-DXJEcUg6.mjs} +5 -5
  44. package/dist/{sessions-B3vP18kz.cjs → sessions-Tad8elmy.cjs} +5 -5
  45. package/dist/{spawn-DxHIIqhi.mjs → spawn-BOlb5y1_.mjs} +6 -31
  46. package/dist/{spawn-DH6_p4-f.cjs → spawn-DA8WAFmm.cjs} +7 -32
  47. package/dist/{teams-DoAA_CcN.mjs → teams-Bs8lI887.mjs} +15 -72
  48. package/dist/{teams-BW8D1n3o.cjs → teams-qVLrFcdd.cjs} +13 -70
  49. package/dist/{todo-Bcc2XxGh.cjs → todo-mCMoGjJk.cjs} +4 -23
  50. package/dist/{todo-BhJbG5eq.mjs → todo-nzsqGZqp.mjs} +2 -21
  51. package/dist/{types-CPubg05Z.cjs → types-CN28qJl7.cjs} +31 -856
  52. package/dist/{types-BN3eiipi.mjs → types-xKrxbCRv.mjs} +204 -1017
  53. package/package.json +7 -7
  54. package/dist/agentGuidance-BXa9ikrZ.cjs +0 -267
  55. package/dist/agentGuidance-Dvo3cZMW.mjs +0 -251
  56. package/dist/limits-DS-bnYYp.mjs +0 -1165
  57. package/dist/limits-DwcY3kyi.cjs +0 -1236
@@ -1,20 +1,21 @@
1
1
  import { homedir } from 'node:os';
2
- import { unlink, rmdir, mkdir, lstat, readFile, writeFile, rename } from 'node:fs/promises';
2
+ import { readFile } from 'node:fs/promises';
3
3
  import { z } from 'zod';
4
- import { createHash, randomUUID } from 'node:crypto';
5
- import { d as teamRequest, e as createTeamsClient } from './agentGuidance-Dvo3cZMW.mjs';
6
- import { e as readCredentialsForConfiguredRelay } from './limits-DS-bnYYp.mjs';
7
- import { join, resolve, dirname } from 'node:path';
8
- import { N as TEAM_SKILL } from './index-CIyjJy8D.mjs';
4
+ import { randomUUID } from 'node:crypto';
5
+ import { g as teamRequest, h as createTeamsClient } from './agentGuidance-Daxn5Nvj.mjs';
6
+ import { f as readCredentialsForConfiguredRelay } from './limits-CKR_HJnO.mjs';
7
+ import { a as installTeamSkill, i as installAutomationSkill } from './install-C1K3nrxF.mjs';
9
8
  import 'node:fs';
9
+ import 'node:path';
10
10
  import 'tweetnacl';
11
11
  import 'chalk';
12
12
  import 'node:util';
13
- import './types-BN3eiipi.mjs';
13
+ import '@paralleldrive/cuid2';
14
+ import './index-BauTv2jB.mjs';
15
+ import './types-xKrxbCRv.mjs';
14
16
  import 'axios';
15
17
  import 'node:events';
16
18
  import 'socket.io-client';
17
- import '@paralleldrive/cuid2';
18
19
  import 'child_process';
19
20
  import 'util';
20
21
  import 'fs/promises';
@@ -98,69 +99,6 @@ async function setTeamPermissionMode(teamId, mode, requestId) {
98
99
  return safe;
99
100
  }
100
101
 
101
- async function assertPrivateDestination(directory) {
102
- for (let path = directory; ; path = dirname(path)) {
103
- try {
104
- const stat = await lstat(path);
105
- if (stat.isSymbolicLink() || !stat.isDirectory()) throw new Error("Refusing symlink or non-directory in managed skill destination: " + path);
106
- } catch (error) {
107
- if (error.code !== "ENOENT") throw error;
108
- }
109
- if (dirname(path) === path) break;
110
- }
111
- }
112
- const digest = (text) => createHash("sha256").update(text).digest("hex");
113
- async function read(path) {
114
- try {
115
- const stat = await lstat(path);
116
- if (!stat.isFile() || stat.isSymbolicLink()) throw new Error("Refusing non-regular managed file");
117
- return await readFile(path, "utf8");
118
- } catch (error) {
119
- if (error.code === "ENOENT") return null;
120
- throw error;
121
- }
122
- }
123
- async function publish(path, content) {
124
- const temporary = `${path}.${randomUUID()}.new`;
125
- try {
126
- await writeFile(temporary, content, { flag: "wx", mode: 384 });
127
- await rename(temporary, path);
128
- } finally {
129
- await unlink(temporary).catch(() => {
130
- });
131
- }
132
- }
133
- async function installTeamSkill(options) {
134
- const directory = join(resolve(options.home), ".local", "share", "very-happy", "skills", "very-happy-teams");
135
- await assertPrivateDestination(directory);
136
- const file = join(directory, "SKILL.md");
137
- const manifest = join(directory, ".very-happy-managed.json");
138
- const current = await read(file);
139
- const managed = await read(manifest);
140
- const previous = managed ? JSON.parse(managed) : null;
141
- if (previous && previous.owner !== "very-happy") throw new Error("Existing manifest is not owned by Very Happy");
142
- if (current !== null && (!previous || previous.owner !== "very-happy" || previous.sha256 !== digest(current) && previous.pendingSha256 !== digest(current))) {
143
- throw new Error("Existing skill is not owned by Very Happy or was edited; preserve it and resolve manually");
144
- }
145
- const action = options.uninstall ? current === null && managed === null ? "unchanged" : "remove" : current === TEAM_SKILL && !previous?.pendingSha256 ? "unchanged" : "write";
146
- if (options.apply && action !== "unchanged") {
147
- await assertPrivateDestination(directory);
148
- if (options.uninstall) {
149
- if (current !== null) await unlink(file);
150
- if (managed !== null) await unlink(manifest);
151
- await rmdir(directory).catch(() => {
152
- });
153
- } else {
154
- await mkdir(directory, { recursive: true });
155
- const nextHash = digest(TEAM_SKILL);
156
- await publish(manifest, JSON.stringify({ owner: "very-happy", sha256: current === null ? null : digest(current), pendingSha256: nextHash, version: 1 }));
157
- await publish(file, TEAM_SKILL);
158
- await publish(manifest, JSON.stringify({ owner: "very-happy", sha256: nextHash, version: 1 }));
159
- }
160
- }
161
- return { host: options.host, path: file, action, applied: !!options.apply, discovery: "No host skill directories are modified. Read this absolute skill path in a managed session.", managedSessions: "Team tools are injected by Very Happy. Standalone agents require a managed session connection." };
162
- }
163
-
164
102
  async function handleTeamsCommand(args) {
165
103
  const command = args[0];
166
104
  const value = (flag) => {
@@ -174,7 +112,12 @@ async function handleTeamsCommand(args) {
174
112
  if (command === "install" || command === "uninstall") {
175
113
  const host = value("--host");
176
114
  if (!host || !["claude", "codex", "pi"].includes(host)) throw new Error("--host must be claude, codex, or pi");
177
- console.log(JSON.stringify(await installTeamSkill({ host, home: value("--home") ?? homedir(), apply: args.includes("--apply"), uninstall: command === "uninstall" })));
115
+ const options = { host, home: value("--home") ?? homedir(), apply: args.includes("--apply"), uninstall: command === "uninstall" };
116
+ await installTeamSkill({ ...options, apply: false });
117
+ await installAutomationSkill({ ...options, apply: false });
118
+ const teams = await installTeamSkill(options);
119
+ const automations = await installAutomationSkill(options);
120
+ console.log(JSON.stringify({ ...teams, also: [automations] }));
178
121
  return;
179
122
  }
180
123
  if (command === "doctor") {
@@ -4,19 +4,20 @@ var os = require('node:os');
4
4
  var promises = require('node:fs/promises');
5
5
  var z = require('zod');
6
6
  var node_crypto = require('node:crypto');
7
- var agentGuidance = require('./agentGuidance-BXa9ikrZ.cjs');
8
- var persistence = require('./limits-DwcY3kyi.cjs');
9
- var path = require('node:path');
10
- var index = require('./index-CqtfRzug.cjs');
7
+ var agentGuidance = require('./agentGuidance-CqBn77AI.cjs');
8
+ var persistence = require('./limits-BNTWyUaZ.cjs');
9
+ var install = require('./install-CDR3qBhs.cjs');
11
10
  require('node:fs');
11
+ require('node:path');
12
12
  require('tweetnacl');
13
13
  require('chalk');
14
14
  require('node:util');
15
- require('./types-CPubg05Z.cjs');
15
+ require('@paralleldrive/cuid2');
16
+ require('./index-ZIW1jrYm.cjs');
17
+ require('./types-CN28qJl7.cjs');
16
18
  require('axios');
17
19
  require('node:events');
18
20
  require('socket.io-client');
19
- require('@paralleldrive/cuid2');
20
21
  require('child_process');
21
22
  require('util');
22
23
  require('fs/promises');
@@ -100,69 +101,6 @@ async function setTeamPermissionMode(teamId, mode, requestId) {
100
101
  return safe;
101
102
  }
102
103
 
103
- async function assertPrivateDestination(directory) {
104
- for (let path$1 = directory; ; path$1 = path.dirname(path$1)) {
105
- try {
106
- const stat = await promises.lstat(path$1);
107
- if (stat.isSymbolicLink() || !stat.isDirectory()) throw new Error("Refusing symlink or non-directory in managed skill destination: " + path$1);
108
- } catch (error) {
109
- if (error.code !== "ENOENT") throw error;
110
- }
111
- if (path.dirname(path$1) === path$1) break;
112
- }
113
- }
114
- const digest = (text) => node_crypto.createHash("sha256").update(text).digest("hex");
115
- async function read(path) {
116
- try {
117
- const stat = await promises.lstat(path);
118
- if (!stat.isFile() || stat.isSymbolicLink()) throw new Error("Refusing non-regular managed file");
119
- return await promises.readFile(path, "utf8");
120
- } catch (error) {
121
- if (error.code === "ENOENT") return null;
122
- throw error;
123
- }
124
- }
125
- async function publish(path, content) {
126
- const temporary = `${path}.${node_crypto.randomUUID()}.new`;
127
- try {
128
- await promises.writeFile(temporary, content, { flag: "wx", mode: 384 });
129
- await promises.rename(temporary, path);
130
- } finally {
131
- await promises.unlink(temporary).catch(() => {
132
- });
133
- }
134
- }
135
- async function installTeamSkill(options) {
136
- const directory = path.join(path.resolve(options.home), ".local", "share", "very-happy", "skills", "very-happy-teams");
137
- await assertPrivateDestination(directory);
138
- const file = path.join(directory, "SKILL.md");
139
- const manifest = path.join(directory, ".very-happy-managed.json");
140
- const current = await read(file);
141
- const managed = await read(manifest);
142
- const previous = managed ? JSON.parse(managed) : null;
143
- if (previous && previous.owner !== "very-happy") throw new Error("Existing manifest is not owned by Very Happy");
144
- if (current !== null && (!previous || previous.owner !== "very-happy" || previous.sha256 !== digest(current) && previous.pendingSha256 !== digest(current))) {
145
- throw new Error("Existing skill is not owned by Very Happy or was edited; preserve it and resolve manually");
146
- }
147
- const action = options.uninstall ? current === null && managed === null ? "unchanged" : "remove" : current === index.TEAM_SKILL && !previous?.pendingSha256 ? "unchanged" : "write";
148
- if (options.apply && action !== "unchanged") {
149
- await assertPrivateDestination(directory);
150
- if (options.uninstall) {
151
- if (current !== null) await promises.unlink(file);
152
- if (managed !== null) await promises.unlink(manifest);
153
- await promises.rmdir(directory).catch(() => {
154
- });
155
- } else {
156
- await promises.mkdir(directory, { recursive: true });
157
- const nextHash = digest(index.TEAM_SKILL);
158
- await publish(manifest, JSON.stringify({ owner: "very-happy", sha256: current === null ? null : digest(current), pendingSha256: nextHash, version: 1 }));
159
- await publish(file, index.TEAM_SKILL);
160
- await publish(manifest, JSON.stringify({ owner: "very-happy", sha256: nextHash, version: 1 }));
161
- }
162
- }
163
- return { host: options.host, path: file, action, applied: !!options.apply, discovery: "No host skill directories are modified. Read this absolute skill path in a managed session.", managedSessions: "Team tools are injected by Very Happy. Standalone agents require a managed session connection." };
164
- }
165
-
166
104
  async function handleTeamsCommand(args) {
167
105
  const command = args[0];
168
106
  const value = (flag) => {
@@ -176,7 +114,12 @@ async function handleTeamsCommand(args) {
176
114
  if (command === "install" || command === "uninstall") {
177
115
  const host = value("--host");
178
116
  if (!host || !["claude", "codex", "pi"].includes(host)) throw new Error("--host must be claude, codex, or pi");
179
- console.log(JSON.stringify(await installTeamSkill({ host, home: value("--home") ?? os.homedir(), apply: args.includes("--apply"), uninstall: command === "uninstall" })));
117
+ const options = { host, home: value("--home") ?? os.homedir(), apply: args.includes("--apply"), uninstall: command === "uninstall" };
118
+ await install.installTeamSkill({ ...options, apply: false });
119
+ await install.installAutomationSkill({ ...options, apply: false });
120
+ const teams = await install.installTeamSkill(options);
121
+ const automations = await install.installAutomationSkill(options);
122
+ console.log(JSON.stringify({ ...teams, also: [automations] }));
180
123
  return;
181
124
  }
182
125
  if (command === "doctor") {
@@ -1,8 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var persistence = require('./limits-DwcY3kyi.cjs');
4
- var index = require('./types-CPubg05Z.cjs');
5
- var agentGuidance = require('./agentGuidance-BXa9ikrZ.cjs');
3
+ var persistence = require('./limits-BNTWyUaZ.cjs');
4
+ var agentGuidance = require('./agentGuidance-CqBn77AI.cjs');
6
5
  require('node:fs/promises');
7
6
  require('node:fs');
8
7
  require('node:os');
@@ -12,25 +11,7 @@ require('node:crypto');
12
11
  require('tweetnacl');
13
12
  require('chalk');
14
13
  require('node:util');
15
- require('axios');
16
- require('node:events');
17
- require('socket.io-client');
18
14
  require('@paralleldrive/cuid2');
19
- require('child_process');
20
- require('util');
21
- require('fs/promises');
22
- require('crypto');
23
- require('path');
24
- require('cross-spawn');
25
- require('./projectPath-ChLhdOyt.cjs');
26
- require('url');
27
- require('os');
28
- require('node:child_process');
29
- require('node-pty');
30
- require('fs');
31
- require('node:readline');
32
- require('@anthropic-ai/sandbox-runtime');
33
- require('expo-server-sdk');
34
15
 
35
16
  async function authenticatedBuiltinTodoClient() {
36
17
  if (process.env.VH_TEAM_SCOPE_FILE !== void 0) {
@@ -42,7 +23,7 @@ async function authenticatedBuiltinTodoClient() {
42
23
  }
43
24
  const credentials = await persistence.readCredentialsForConfiguredRelay();
44
25
  if (!credentials) throw new Error("Sign in to Very Happy with `very-happy auth login` before accessing Todos.");
45
- return index.createBuiltinTodoClient(credentials, { serverUrl: persistence.configuration.serverUrl, clientId: "very-happy-cli-todo" });
26
+ return persistence.createBuiltinTodoClient(credentials, { serverUrl: persistence.configuration.serverUrl, clientId: "very-happy-cli-todo" });
46
27
  }
47
28
 
48
29
  const TODO_HELP = `very-happy todo \u2014 account-owned built-in Todos (JSON output)
@@ -106,7 +87,7 @@ async function handleTodoCommand(args) {
106
87
  return;
107
88
  }
108
89
  if (command.action === "skill") {
109
- console.log(index.BUILTIN_TODO_SKILL);
90
+ console.log(persistence.BUILTIN_TODO_SKILL);
110
91
  return;
111
92
  }
112
93
  const client = await authenticatedBuiltinTodoClient();
@@ -1,6 +1,5 @@
1
- import { e as readCredentialsForConfiguredRelay, c as configuration } from './limits-DS-bnYYp.mjs';
2
- import { f as createBuiltinTodoClient, B as BUILTIN_TODO_SKILL } from './types-BN3eiipi.mjs';
3
- import { c as readTeamScope, t as teamScopePath } from './agentGuidance-Dvo3cZMW.mjs';
1
+ import { f as readCredentialsForConfiguredRelay, g as createBuiltinTodoClient, c as configuration, B as BUILTIN_TODO_SKILL } from './limits-CKR_HJnO.mjs';
2
+ import { f as readTeamScope, t as teamScopePath } from './agentGuidance-Daxn5Nvj.mjs';
4
3
  import 'node:fs/promises';
5
4
  import 'node:fs';
6
5
  import 'node:os';
@@ -10,25 +9,7 @@ import 'node:crypto';
10
9
  import 'tweetnacl';
11
10
  import 'chalk';
12
11
  import 'node:util';
13
- import 'axios';
14
- import 'node:events';
15
- import 'socket.io-client';
16
12
  import '@paralleldrive/cuid2';
17
- import 'child_process';
18
- import 'util';
19
- import 'fs/promises';
20
- import 'crypto';
21
- import 'path';
22
- import 'cross-spawn';
23
- import './projectPath-CSpqWdxp.mjs';
24
- import 'url';
25
- import 'os';
26
- import 'node:child_process';
27
- import 'node-pty';
28
- import 'fs';
29
- import 'node:readline';
30
- import '@anthropic-ai/sandbox-runtime';
31
- import 'expo-server-sdk';
32
13
 
33
14
  async function authenticatedBuiltinTodoClient() {
34
15
  if (process.env.VH_TEAM_SCOPE_FILE !== void 0) {