svamp-cli 0.2.308 → 0.2.310
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/{adminCommands-CtecEU3a.mjs → adminCommands-BcH3OlSL.mjs} +2 -2
- package/dist/{agentCommands-DEJpgdgc.mjs → agentCommands-9GHpj3mp.mjs} +6 -6
- package/dist/{auth-BTodo5Et.mjs → auth-CuN-K8i9.mjs} +2 -2
- package/dist/{cli-Ko4XpjRo.mjs → cli-Co_GXbrT.mjs} +70 -70
- package/dist/cli.mjs +3 -3
- package/dist/{commands-B-u0fICz.mjs → commands-B0cRa6cc.mjs} +3 -3
- package/dist/{commands-D3Nu5cYE.mjs → commands-D-RsuMqs.mjs} +3 -2
- package/dist/{commands-DA7rAZqn.mjs → commands-DBiIsRQ_.mjs} +2 -2
- package/dist/{commands-DfbOYRLs.mjs → commands-DiuHHJ6r.mjs} +3 -3
- package/dist/{commands-dBiQcDJ1.mjs → commands-DrVsg0Q1.mjs} +23 -11
- package/dist/{commands-B2ARVwag.mjs → commands-DuLlH97k.mjs} +3 -3
- package/dist/{commands-DKOYCcmo.mjs → commands-Dx4S6f_G.mjs} +2 -2
- package/dist/{commands-GNplzSQX.mjs → commands-Eo0kocpm.mjs} +37 -6
- package/dist/{fleet-CXixARxe.mjs → fleet-CFpET-T5.mjs} +3 -3
- package/dist/{frpc-DV_IIYpM.mjs → frpc-DxIjZ8o_.mjs} +5 -2
- package/dist/{headlessCli-DfkgeGnQ.mjs → headlessCli-BIY-YePw.mjs} +3 -3
- package/dist/index.mjs +2 -2
- package/dist/{notifyCommands-BUE_-OCX.mjs → notifyCommands-DldLQlDU.mjs} +2 -2
- package/dist/package-BKmrvBsb.mjs +64 -0
- package/dist/{pinnedClaudeCode-BaMR97BE.mjs → pinnedClaudeCode-zDzkOTi2.mjs} +1 -1
- package/dist/{rpc-BjKmyKdA.mjs → rpc-BVw8Tv9l.mjs} +2 -2
- package/dist/{rpc-wL-45Raf.mjs → rpc-D7_Gj0Kt.mjs} +2 -2
- package/dist/{run-VQIHMUdo.mjs → run-CqO23ro_.mjs} +420 -110
- package/dist/{run-ofbo9uzA.mjs → run-DLk7NGih.mjs} +2 -2
- package/dist/{scheduler-Dia9Akaw.mjs → scheduler-q7Refevo.mjs} +5 -5
- package/dist/{serveCommands-DehmO1cO.mjs → serveCommands-BJjvhDxp.mjs} +19 -12
- package/dist/{sideband-CGiNKfNE.mjs → sideband-Dv3qNlQN.mjs} +2 -2
- package/package.json +2 -2
- package/dist/package-GdCOuQCx.mjs +0 -64
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { writeFileSync, readFileSync } from 'fs';
|
|
2
2
|
import { resolve } from 'path';
|
|
3
|
-
import { connectAndGetMachine } from './commands-
|
|
3
|
+
import { connectAndGetMachine } from './commands-D-RsuMqs.mjs';
|
|
4
4
|
import 'node:fs';
|
|
5
5
|
import 'node:child_process';
|
|
6
6
|
import 'node:path';
|
|
7
7
|
import 'node:os';
|
|
8
|
-
import './run-
|
|
8
|
+
import './run-CqO23ro_.mjs';
|
|
9
9
|
import 'os';
|
|
10
10
|
import 'fs/promises';
|
|
11
11
|
import 'url';
|
|
@@ -17,9 +17,9 @@ import 'http';
|
|
|
17
17
|
import 'net';
|
|
18
18
|
import 'node:events';
|
|
19
19
|
import '@agentclientprotocol/sdk';
|
|
20
|
+
import 'node:util';
|
|
20
21
|
import 'node:readline';
|
|
21
22
|
import 'node:fs/promises';
|
|
22
|
-
import 'node:util';
|
|
23
23
|
import 'yaml';
|
|
24
24
|
|
|
25
25
|
function getFlag(args, flag) {
|
|
@@ -2,7 +2,7 @@ import { existsSync, readFileSync, writeFileSync } from 'node:fs';
|
|
|
2
2
|
import { execSync, execFileSync } from 'node:child_process';
|
|
3
3
|
import { basename, resolve, join, isAbsolute } from 'node:path';
|
|
4
4
|
import os from 'node:os';
|
|
5
|
-
import {
|
|
5
|
+
import { a6 as formatHandle, a7 as normalizeAllowedUser, a8 as loadSecurityContextConfig, a9 as resolveSecurityContext, aa as buildSecurityContextFromFlags, ab as mergeSecurityContexts, c as connectToHypha, ac as buildSessionShareUrl, ad as computeOutboundHop, i as shortId, ae as registerAwaitingReply, af as buildMachineShareUrl, ag as parseHandle, ah as handleMatchesMetadata } from './run-CqO23ro_.mjs';
|
|
6
6
|
import 'os';
|
|
7
7
|
import 'fs/promises';
|
|
8
8
|
import 'fs';
|
|
@@ -16,9 +16,9 @@ import 'http';
|
|
|
16
16
|
import 'net';
|
|
17
17
|
import 'node:events';
|
|
18
18
|
import '@agentclientprotocol/sdk';
|
|
19
|
+
import 'node:util';
|
|
19
20
|
import 'node:readline';
|
|
20
21
|
import 'node:fs/promises';
|
|
21
|
-
import 'node:util';
|
|
22
22
|
import 'yaml';
|
|
23
23
|
|
|
24
24
|
function formatTime(ts) {
|
|
@@ -113,6 +113,7 @@ const SESSION_RPC_PARAMS = {
|
|
|
113
113
|
getActivityState: [],
|
|
114
114
|
readFile: ["path"],
|
|
115
115
|
writeFile: ["path", "content"],
|
|
116
|
+
writeFileChunk: ["path", "content", "uploadId", "chunkIndex", "totalChunks", "isLast"],
|
|
116
117
|
listDirectory: ["path"],
|
|
117
118
|
bash: ["command", "cwd", "timeout"],
|
|
118
119
|
ripgrep: ["args", "cwd"],
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import os from 'os';
|
|
2
2
|
import fs__default from 'fs';
|
|
3
3
|
import { resolve, join, relative } from 'path';
|
|
4
|
-
import {
|
|
4
|
+
import { V as parseFrontmatter, W as getSkillsServer, X as getSkillsWorkspaceName, Y as getSkillsCollectionName, Z as fetchWithTimeout, _ as searchSkills, $ as SKILLS_DIR, a0 as getSkillInfo, a1 as downloadSkillFile, a2 as listSkillFiles } from './run-CqO23ro_.mjs';
|
|
5
5
|
import 'fs/promises';
|
|
6
6
|
import 'url';
|
|
7
7
|
import 'child_process';
|
|
@@ -16,9 +16,9 @@ import 'node:os';
|
|
|
16
16
|
import 'node:path';
|
|
17
17
|
import 'node:events';
|
|
18
18
|
import '@agentclientprotocol/sdk';
|
|
19
|
+
import 'node:util';
|
|
19
20
|
import 'node:readline';
|
|
20
21
|
import 'node:fs/promises';
|
|
21
|
-
import 'node:util';
|
|
22
22
|
import 'yaml';
|
|
23
23
|
|
|
24
24
|
const SVAMP_HOME = process.env.SVAMP_HOME || join(os.homedir(), ".svamp");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { execSync } from 'node:child_process';
|
|
2
2
|
import { existsSync, readFileSync } from 'node:fs';
|
|
3
3
|
import { join } from 'node:path';
|
|
4
|
-
import { f as flushAndExit } from './cli-
|
|
5
|
-
import { j as resolveProjectRoot, q as searchIssues, o as listIssues, l as resumeIssue, p as pauseIssue, m as addComment, u as updateIssue, k as getIssue, t as isVisibleTo,
|
|
4
|
+
import { f as flushAndExit } from './cli-Co_GXbrT.mjs';
|
|
5
|
+
import { j as resolveProjectRoot, q as searchIssues, o as listIssues, l as resumeIssue, p as pauseIssue, m as addComment, u as updateIssue, k as getIssue, t as isVisibleTo, J as summarize, n as addIssue } from './run-CqO23ro_.mjs';
|
|
6
6
|
import './serviceManager-hlOVxkhW.mjs';
|
|
7
7
|
import 'os';
|
|
8
8
|
import 'fs/promises';
|
|
@@ -18,9 +18,9 @@ import 'net';
|
|
|
18
18
|
import 'node:os';
|
|
19
19
|
import 'node:events';
|
|
20
20
|
import '@agentclientprotocol/sdk';
|
|
21
|
+
import 'node:util';
|
|
21
22
|
import 'node:readline';
|
|
22
23
|
import 'node:fs/promises';
|
|
23
|
-
import 'node:util';
|
|
24
24
|
import 'yaml';
|
|
25
25
|
|
|
26
26
|
const STATUS_GLYPH = {
|
|
@@ -60,7 +60,7 @@ async function serviceExpose(args) {
|
|
|
60
60
|
process.exit(1);
|
|
61
61
|
}
|
|
62
62
|
if (foreground) {
|
|
63
|
-
const { runFrpcTunnel } = await import('./frpc-
|
|
63
|
+
const { runFrpcTunnel } = await import('./frpc-DxIjZ8o_.mjs');
|
|
64
64
|
await runFrpcTunnel(name, ports, void 0, {
|
|
65
65
|
group,
|
|
66
66
|
groupKey,
|
|
@@ -70,7 +70,7 @@ async function serviceExpose(args) {
|
|
|
70
70
|
});
|
|
71
71
|
return;
|
|
72
72
|
}
|
|
73
|
-
const { connectAndGetMachine } = await import('./commands-
|
|
73
|
+
const { connectAndGetMachine } = await import('./commands-D-RsuMqs.mjs');
|
|
74
74
|
const { server, machine } = await connectAndGetMachine();
|
|
75
75
|
try {
|
|
76
76
|
const status = await machine.tunnelStart({
|
|
@@ -92,7 +92,7 @@ async function serviceExpose(args) {
|
|
|
92
92
|
console.log(` port ${port}: ${url}`);
|
|
93
93
|
}
|
|
94
94
|
if (process.env.SVAMP_SESSION_ID) {
|
|
95
|
-
const { autoAddSessionLink } = await import('./agentCommands-
|
|
95
|
+
const { autoAddSessionLink } = await import('./agentCommands-9GHpj3mp.mjs');
|
|
96
96
|
let added = 0;
|
|
97
97
|
for (const [port, url] of urlEntries) {
|
|
98
98
|
const label = urlEntries.length > 1 ? `${name}:${port}` : name;
|
|
@@ -127,20 +127,32 @@ async function serviceServe(args) {
|
|
|
127
127
|
try {
|
|
128
128
|
const resolvedDir = path.resolve(directory);
|
|
129
129
|
console.log(`Serving ${resolvedDir}`);
|
|
130
|
-
const servePort = 18080;
|
|
131
130
|
const http = await import('http');
|
|
132
|
-
const { serveStaticMount } = await import('./run-
|
|
131
|
+
const { serveStaticMount } = await import('./run-CqO23ro_.mjs').then(function (n) { return n.ap; });
|
|
132
|
+
const { getFreePort } = await import('./frpc-DxIjZ8o_.mjs');
|
|
133
133
|
const server = http.createServer((req, res) => {
|
|
134
134
|
const u = new URL(req.url || "/", "http://127.0.0.1");
|
|
135
135
|
let rel = u.pathname;
|
|
136
136
|
if (rel === `/${name}` || rel.startsWith(`/${name}/`)) rel = rel.slice(`/${name}`.length) || "/";
|
|
137
137
|
serveStaticMount(req, res, { rootDir: resolvedDir, relPath: rel || "/", mountUrlPrefix: "", browse: !noListing });
|
|
138
138
|
});
|
|
139
|
-
await new Promise((resolve, reject) => {
|
|
140
|
-
|
|
141
|
-
|
|
139
|
+
const servePort = await new Promise((resolve, reject) => {
|
|
140
|
+
const onErr = (e) => {
|
|
141
|
+
if (e && e.code === "EADDRINUSE") {
|
|
142
|
+
getFreePort().then((p) => {
|
|
143
|
+
server.listen(p, "127.0.0.1", () => resolve(p));
|
|
144
|
+
}).catch(reject);
|
|
145
|
+
} else {
|
|
146
|
+
reject(e);
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
server.once("error", onErr);
|
|
150
|
+
server.listen(18080, "127.0.0.1", () => {
|
|
151
|
+
server.removeListener("error", onErr);
|
|
152
|
+
resolve(18080);
|
|
153
|
+
});
|
|
142
154
|
});
|
|
143
|
-
const { runFrpcTunnel } = await import('./frpc-
|
|
155
|
+
const { runFrpcTunnel } = await import('./frpc-DxIjZ8o_.mjs');
|
|
144
156
|
void server;
|
|
145
157
|
await runFrpcTunnel(name, [servePort]);
|
|
146
158
|
} catch (err) {
|
|
@@ -150,7 +162,7 @@ async function serviceServe(args) {
|
|
|
150
162
|
}
|
|
151
163
|
async function serviceList(_args) {
|
|
152
164
|
try {
|
|
153
|
-
const { connectAndGetMachine } = await import('./commands-
|
|
165
|
+
const { connectAndGetMachine } = await import('./commands-D-RsuMqs.mjs');
|
|
154
166
|
const { server, machine } = await connectAndGetMachine();
|
|
155
167
|
try {
|
|
156
168
|
const tunnels = await machine.tunnelList({});
|
|
@@ -190,7 +202,7 @@ async function serviceDelete(args) {
|
|
|
190
202
|
process.exit(1);
|
|
191
203
|
}
|
|
192
204
|
try {
|
|
193
|
-
const { connectAndGetMachine } = await import('./commands-
|
|
205
|
+
const { connectAndGetMachine } = await import('./commands-D-RsuMqs.mjs');
|
|
194
206
|
const { server, machine } = await connectAndGetMachine();
|
|
195
207
|
try {
|
|
196
208
|
await machine.tunnelStop({ name });
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { connectAndResolveSession } from './commands-
|
|
1
|
+
import { connectAndResolveSession } from './commands-D-RsuMqs.mjs';
|
|
2
2
|
import 'node:fs';
|
|
3
3
|
import 'node:child_process';
|
|
4
4
|
import 'node:path';
|
|
5
5
|
import 'node:os';
|
|
6
|
-
import './run-
|
|
6
|
+
import './run-CqO23ro_.mjs';
|
|
7
7
|
import 'os';
|
|
8
8
|
import 'fs/promises';
|
|
9
9
|
import 'fs';
|
|
@@ -17,9 +17,9 @@ import 'http';
|
|
|
17
17
|
import 'net';
|
|
18
18
|
import 'node:events';
|
|
19
19
|
import '@agentclientprotocol/sdk';
|
|
20
|
+
import 'node:util';
|
|
20
21
|
import 'node:readline';
|
|
21
22
|
import 'node:fs/promises';
|
|
22
|
-
import 'node:util';
|
|
23
23
|
import 'yaml';
|
|
24
24
|
|
|
25
25
|
function argVal(args, name) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { spawnSync } from 'node:child_process';
|
|
2
|
-
import { j as resolveProjectRoot,
|
|
2
|
+
import { j as resolveProjectRoot, K as workflowSteps, z as setWorkflowEnabled, F as isWorkflowEnabled, A as removeWorkflow, x as getWorkflow, E as listWorkflows, C as saveWorkflow, D as rawWorkflow } from './run-CqO23ro_.mjs';
|
|
3
3
|
import 'os';
|
|
4
4
|
import 'fs/promises';
|
|
5
5
|
import 'fs';
|
|
@@ -16,9 +16,9 @@ import 'node:os';
|
|
|
16
16
|
import 'node:path';
|
|
17
17
|
import 'node:events';
|
|
18
18
|
import '@agentclientprotocol/sdk';
|
|
19
|
+
import 'node:util';
|
|
19
20
|
import 'node:readline';
|
|
20
21
|
import 'node:fs/promises';
|
|
21
|
-
import 'node:util';
|
|
22
22
|
import 'yaml';
|
|
23
23
|
|
|
24
24
|
function flag(args, name) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { existsSync } from 'node:fs';
|
|
2
|
-
import { resolve } from 'node:path';
|
|
3
|
-
import { connectAndGetMachine, resolveSessionId, createWorktree, connectAndResolveSession } from './commands-
|
|
2
|
+
import { join, resolve } from 'node:path';
|
|
3
|
+
import { connectAndGetMachine, resolveSessionId, createWorktree, connectAndResolveSession } from './commands-D-RsuMqs.mjs';
|
|
4
4
|
import { execFileSync } from 'node:child_process';
|
|
5
|
-
import { u as updateIssue, m as addComment, n as addIssue, i as shortId } from './run-
|
|
5
|
+
import { ai as withFileLock, u as updateIssue, m as addComment, n as addIssue, i as shortId } from './run-CqO23ro_.mjs';
|
|
6
6
|
import 'node:os';
|
|
7
7
|
import 'os';
|
|
8
8
|
import 'fs/promises';
|
|
@@ -17,9 +17,9 @@ import 'http';
|
|
|
17
17
|
import 'net';
|
|
18
18
|
import 'node:events';
|
|
19
19
|
import '@agentclientprotocol/sdk';
|
|
20
|
+
import 'node:util';
|
|
20
21
|
import 'node:readline';
|
|
21
22
|
import 'node:fs/promises';
|
|
22
|
-
import 'node:util';
|
|
23
23
|
import 'yaml';
|
|
24
24
|
|
|
25
25
|
function git(cwd, args) {
|
|
@@ -51,10 +51,15 @@ function currentBranch(worktreePath) {
|
|
|
51
51
|
}
|
|
52
52
|
function mergeBack(input) {
|
|
53
53
|
const baseBranch = input.baseBranch || "main";
|
|
54
|
-
const { projectRoot
|
|
54
|
+
const { projectRoot } = input;
|
|
55
55
|
if (!existsSync(projectRoot)) {
|
|
56
56
|
return { ok: false, stage: "verify", detail: `project root not found: ${projectRoot}` };
|
|
57
57
|
}
|
|
58
|
+
const mergeLock = join(projectRoot, ".git", "svamp-crew-merge.lock");
|
|
59
|
+
return withFileLock(mergeLock, () => mergeBackBody(input, baseBranch), { deadlineMs: 3e4, staleMs: 12e4 });
|
|
60
|
+
}
|
|
61
|
+
function mergeBackBody(input, baseBranch) {
|
|
62
|
+
const { projectRoot, branch, worktreePath } = input;
|
|
58
63
|
const worktreeGone = !existsSync(worktreePath);
|
|
59
64
|
if (!worktreeGone) {
|
|
60
65
|
let childStatus;
|
|
@@ -94,6 +99,22 @@ ${childStatus}`
|
|
|
94
99
|
detail: `lead tree ${projectRoot} has uncommitted tracked changes; commit/stash before merging.`
|
|
95
100
|
};
|
|
96
101
|
}
|
|
102
|
+
try {
|
|
103
|
+
const mergeBase = git(projectRoot, ["merge-base", "HEAD", branch]).trim();
|
|
104
|
+
const branchWrites = new Set(
|
|
105
|
+
git(projectRoot, ["diff", "--name-only", `${mergeBase}..${branch}`]).split("\n").map((s) => s.trim()).filter(Boolean)
|
|
106
|
+
);
|
|
107
|
+
const collisions = git(projectRoot, ["status", "--porcelain", "-uall"]).split("\n").filter((l) => l.startsWith("?? ")).map((l) => l.slice(3).trim()).filter((p) => p && branchWrites.has(p));
|
|
108
|
+
if (collisions.length) {
|
|
109
|
+
return {
|
|
110
|
+
ok: false,
|
|
111
|
+
stage: "verify",
|
|
112
|
+
detail: `lead tree ${projectRoot} has UNTRACKED file(s) that the feature branch also adds, so the merge would abort ("untracked working tree files would be overwritten"). This is a LEAD-tree obstruction the child cannot resolve \u2014 remove or commit these in the lead tree, then re-merge:
|
|
113
|
+
` + collisions.map((p) => ` ${p}`).join("\n")
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
} catch {
|
|
117
|
+
}
|
|
97
118
|
try {
|
|
98
119
|
git(projectRoot, ["merge", "--no-ff", branch, "-m", `crew: merge ${branch} into ${baseBranch}`]);
|
|
99
120
|
} catch (e) {
|
|
@@ -101,13 +122,23 @@ ${childStatus}`
|
|
|
101
122
|
try {
|
|
102
123
|
git(projectRoot, ["merge", "--abort"]);
|
|
103
124
|
} catch {
|
|
125
|
+
}
|
|
126
|
+
if (/index\.lock|Another git process|Unable to create.*\.lock|cannot lock ref/i.test(detail)) {
|
|
127
|
+
return { ok: false, stage: "merge", detail: `transient git contention (another process held the lead tree) \u2014 retry the merge:
|
|
128
|
+
${detail.trim()}` };
|
|
104
129
|
}
|
|
105
130
|
return { ok: false, stage: "merge", rework: true, detail: `merge conflict \u2014 aborted:
|
|
106
131
|
${detail.trim()}` };
|
|
107
132
|
}
|
|
108
133
|
let cleanupWarning;
|
|
109
134
|
if (!isMainWorkingTree(projectRoot, worktreePath)) try {
|
|
110
|
-
|
|
135
|
+
const dirtyNow = existsSync(worktreePath) ? worktreeStatus(worktreePath) : "";
|
|
136
|
+
if (dirtyNow) {
|
|
137
|
+
cleanupWarning = `feature worktree gained uncommitted changes after the merge \u2014 NOT force-removed to avoid losing work (${worktreePath}). Review and remove manually once saved:
|
|
138
|
+
${dirtyNow}`;
|
|
139
|
+
} else {
|
|
140
|
+
git(projectRoot, ["worktree", "remove", "--force", worktreePath]);
|
|
141
|
+
}
|
|
111
142
|
} catch (e) {
|
|
112
143
|
try {
|
|
113
144
|
git(projectRoot, ["worktree", "prune"]);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { existsSync, readFileSync } from 'node:fs';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
3
|
import os from 'node:os';
|
|
4
|
-
import {
|
|
5
|
-
import { PINNED_CLAUDE_CODE_VERSION } from './pinnedClaudeCode-
|
|
4
|
+
import { U as PINNED_CODEX_VERSION, c as connectToHypha } from './run-CqO23ro_.mjs';
|
|
5
|
+
import { PINNED_CLAUDE_CODE_VERSION } from './pinnedClaudeCode-zDzkOTi2.mjs';
|
|
6
6
|
import 'os';
|
|
7
7
|
import 'fs/promises';
|
|
8
8
|
import 'fs';
|
|
@@ -17,9 +17,9 @@ import 'http';
|
|
|
17
17
|
import 'net';
|
|
18
18
|
import 'node:events';
|
|
19
19
|
import '@agentclientprotocol/sdk';
|
|
20
|
+
import 'node:util';
|
|
20
21
|
import 'node:readline';
|
|
21
22
|
import 'node:fs/promises';
|
|
22
|
-
import 'node:util';
|
|
23
23
|
import 'yaml';
|
|
24
24
|
|
|
25
25
|
const SVAMP_HOME = process.env.SVAMP_HOME || join(os.homedir(), ".svamp");
|
|
@@ -4,7 +4,7 @@ import { mkdirSync, chmodSync, writeFileSync, unlinkSync, existsSync, readFileSy
|
|
|
4
4
|
import { join } from 'path';
|
|
5
5
|
import { homedir, platform, arch } from 'os';
|
|
6
6
|
import { randomUUID, createHash } from 'crypto';
|
|
7
|
-
import { e as getFrpsSubdomainHost, f as getFrpsServerPort, h as getFrpsServerAddr } from './run-
|
|
7
|
+
import { e as getFrpsSubdomainHost, f as getFrpsServerPort, h as getFrpsServerAddr } from './run-CqO23ro_.mjs';
|
|
8
8
|
import 'fs/promises';
|
|
9
9
|
import 'url';
|
|
10
10
|
import 'node:crypto';
|
|
@@ -16,9 +16,9 @@ import 'node:os';
|
|
|
16
16
|
import 'node:path';
|
|
17
17
|
import 'node:events';
|
|
18
18
|
import '@agentclientprotocol/sdk';
|
|
19
|
+
import 'node:util';
|
|
19
20
|
import 'node:readline';
|
|
20
21
|
import 'node:fs/promises';
|
|
21
|
-
import 'node:util';
|
|
22
22
|
import 'yaml';
|
|
23
23
|
|
|
24
24
|
function getMachineFingerprint() {
|
|
@@ -358,6 +358,9 @@ class FrpcTunnel {
|
|
|
358
358
|
if (!this._destroyed) {
|
|
359
359
|
this.connect().catch((err) => {
|
|
360
360
|
this.options.onError?.(err);
|
|
361
|
+
if (!this._destroyed && !this._restartTimer && !this.process) {
|
|
362
|
+
this._reconnectAfterDown(`reconnect setup failed: ${err?.message ?? err}`);
|
|
363
|
+
}
|
|
361
364
|
});
|
|
362
365
|
}
|
|
363
366
|
}, delay);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { handleRealtimeEvent, initMachineVoiceSession } from './sideband-
|
|
1
|
+
import { a3 as resolveModel, aj as describeMisconfiguration, ak as buildMachineDeps } from './run-CqO23ro_.mjs';
|
|
2
|
+
import { handleRealtimeEvent, initMachineVoiceSession } from './sideband-Dv3qNlQN.mjs';
|
|
3
3
|
import { WebSocket } from 'ws';
|
|
4
4
|
import { execSync, spawn } from 'child_process';
|
|
5
5
|
import 'os';
|
|
@@ -18,9 +18,9 @@ import 'node:os';
|
|
|
18
18
|
import 'node:path';
|
|
19
19
|
import 'node:events';
|
|
20
20
|
import '@agentclientprotocol/sdk';
|
|
21
|
+
import 'node:util';
|
|
21
22
|
import 'node:readline';
|
|
22
23
|
import 'node:fs/promises';
|
|
23
|
-
import 'node:util';
|
|
24
24
|
import 'yaml';
|
|
25
25
|
|
|
26
26
|
const PCM_RATE = 24e3;
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { c as connectToHypha, a as createSessionStore, d as daemonStatus, g as getHyphaServerUrl, r as registerMachineService, s as startDaemon, b as stopDaemon } from './run-
|
|
1
|
+
export { c as connectToHypha, a as createSessionStore, d as daemonStatus, g as getHyphaServerUrl, r as registerMachineService, s as startDaemon, b as stopDaemon } from './run-CqO23ro_.mjs';
|
|
2
2
|
import 'os';
|
|
3
3
|
import 'fs/promises';
|
|
4
4
|
import 'fs';
|
|
@@ -16,7 +16,7 @@ import 'node:os';
|
|
|
16
16
|
import 'node:path';
|
|
17
17
|
import 'node:events';
|
|
18
18
|
import '@agentclientprotocol/sdk';
|
|
19
|
+
import 'node:util';
|
|
19
20
|
import 'node:readline';
|
|
20
21
|
import 'node:fs/promises';
|
|
21
|
-
import 'node:util';
|
|
22
22
|
import 'yaml';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as connectToHypha, S as SharingNotificationSync,
|
|
1
|
+
import { c as connectToHypha, S as SharingNotificationSync, L as parseJwtEmail } from './run-CqO23ro_.mjs';
|
|
2
2
|
import { randomUUID } from 'node:crypto';
|
|
3
3
|
import { existsSync, readFileSync } from 'node:fs';
|
|
4
4
|
import { join } from 'node:path';
|
|
@@ -16,9 +16,9 @@ import 'http';
|
|
|
16
16
|
import 'net';
|
|
17
17
|
import 'node:events';
|
|
18
18
|
import '@agentclientprotocol/sdk';
|
|
19
|
+
import 'node:util';
|
|
19
20
|
import 'node:readline';
|
|
20
21
|
import 'node:fs/promises';
|
|
21
|
-
import 'node:util';
|
|
22
22
|
import 'yaml';
|
|
23
23
|
|
|
24
24
|
function loadEnv() {
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
var name = "svamp-cli";
|
|
2
|
+
var version = "0.2.310";
|
|
3
|
+
var description = "Svamp CLI — AI workspace daemon on Hypha Cloud";
|
|
4
|
+
var author = "Amun AI AB";
|
|
5
|
+
var license = "SEE LICENSE IN LICENSE";
|
|
6
|
+
var type = "module";
|
|
7
|
+
var bin = {
|
|
8
|
+
svamp: "./bin/svamp.mjs"
|
|
9
|
+
};
|
|
10
|
+
var files = [
|
|
11
|
+
"dist",
|
|
12
|
+
"bin"
|
|
13
|
+
];
|
|
14
|
+
var main = "./dist/index.mjs";
|
|
15
|
+
var exports$1 = {
|
|
16
|
+
".": "./dist/index.mjs",
|
|
17
|
+
"./cli": "./dist/cli.mjs"
|
|
18
|
+
};
|
|
19
|
+
var scripts = {
|
|
20
|
+
build: "rm -rf dist bin/skills bin/commands && mkdir -p bin/skills && cp -r ../../skills/artifact bin/skills/artifact && cp -r ../../skills/crew bin/skills/crew && cp -r ../../commands bin/commands && tsc --noEmit && pkgroll",
|
|
21
|
+
typecheck: "tsc --noEmit",
|
|
22
|
+
test: "npx tsx test/test-context-window.mjs && npx tsx test/test-ratelimit-retry.mjs && npx tsx test/test-instance-config.mjs && npx tsx test/test-authorize.mjs && npx tsx test/test-normalize-allowed-user.mjs && npx tsx test/test-share-url.mjs && npx tsx test/test-update-sharing-normalization.mjs && npx tsx test/test-sharing-notify-sync.mjs && npx tsx test/test-sharing-notify-resolve.mjs && npx tsx test/test-staged-homes-sweep.mjs && npx tsx test/test-session-helpers.mjs && npx tsx test/test-cli-routing.mjs && npx tsx test/test-security-context.mjs && npx tsx test/test-isolation-decision.mjs && npx tsx test/test-message-helpers.mjs && npx tsx test/test-agent-config.mjs && npx tsx test/test-wrap-command.mjs && npx tsx test/test-credential-staging.mjs && npx tsx test/test-claude-auth.mjs && npx tsx test/test-backend-accounts.mjs && npx tsx test/test-codex-force-model.mjs && npx tsx test/test-backend-oauth.mjs && npx tsx test/test-btw-proxy-env.mjs && npx tsx test/test-output-formatters.mjs && npx tsx test/test-inbox-guard.mjs && npx tsx test/test-user-events.mjs && npx tsx test/test-migrate-children.mjs && npx tsx test/test-outpost-install.mjs && npx tsx test/test-outpost-setup.mjs && npx tsx test/test-outpost-pairing.mjs && npx tsx test/test-outpost-coordinator.mjs && npx tsx test/e2e-outpost-transport.mjs && npx tsx test/test-inbox-reconcile.mjs && npx tsx test/test-auto-topic.mjs && npx tsx test/test-project-info.mjs && npx tsx test/test-agent-types.mjs && npx tsx test/test-transport.mjs && npx tsx test/test-session-update-handlers.mjs && npx tsx test/test-session-scanner.mjs && npx tsx test/test-hypha-client.mjs && npx tsx test/test-hook-settings.mjs && npx tsx test/test-session-service-logic.mjs && npx tsx test/test-daemon-persistence.mjs && npx tsx test/test-detect-isolation.mjs && npx tsx test/test-isolation-disable.mjs && npx tsx test/test-machine-service-logic.mjs && npx tsx test/test-machine-session-visibility.mjs && npx tsx test/test-session-access-fallback.mjs && npx tsx test/test-session-rpc-role-map.mjs && npx tsx test/test-interactive-helpers.mjs && npx tsx test/test-pinned-codex.mjs && npx tsx test/test-codex-request-timeout.mjs && npx tsx test/test-codex-app-server.mjs && npx tsx test/e2e-codex-midturn-steer.mjs && npx tsx test/test-acp-backend.mjs && npx tsx test/test-acp-bridge.mjs && npx tsx test/test-listener-backoff.mjs && npx tsx test/test-session-identity-env.mjs && npx tsx test/test-hook-server.mjs && npx tsx test/test-session-commands.mjs && npx tsx test/test-interactive-console.mjs && npx tsx test/test-session-messages.mjs && npx tsx test/test-session-send-query.mjs && npx tsx test/test-skills.mjs && npx tsx test/test-agent-grouping.mjs && npx tsx test/test-machine-list-directory.mjs && npx tsx test/test-service-commands.mjs && npx tsx test/test-supervisor.mjs && npx tsx test/test-supervisor-lock.mjs && node test/test-supervisor-restart.mjs && npx tsx test/test-clear-detection.mjs && npx tsx test/test-compact-detect.mjs && npx tsx test/test-session-consolidation.mjs && npx tsx test/test-inbox-store.mjs && npx tsx test/test-inbox.mjs && npx tsx test/test-inbox-cross-machine.mjs && npx tsx test/test-issue-store.mjs && npx tsx test/test-issue-store-lock.mjs && npx tsx test/test-issue-close-gate.mjs && npx tsx test/test-loop-verify.mjs && npx tsx test/test-restore-decision.mjs && npx tsx test/test-issue-rpc.mjs && npx tsx test/test-issue-pause.mjs && npx tsx test/test-workflow-store.mjs && npx tsx test/test-workflow-rpc.mjs && npx tsx test/test-workflow-scheduler.mjs && npx tsx test/test-cron.mjs && npx tsx test/test-workflow-runs.mjs && npx tsx test/test-workflow-runs-lock.mjs && npx tsx test/test-workflow-idle.mjs && npx tsx test/test-workflow-reconcile.mjs && npx tsx test/test-serve-link-subdomain.mjs && npx tsx test/test-short-id.mjs && npx tsx test/test-transcript-edit.mjs && npx tsx test/test-edit-history.mjs && npx tsx test/test-friendly-name.mjs && npx tsx test/test-session-rpc-dispatch.mjs && npx tsx test/test-sandbox-cli.mjs && npx tsx test/test-serve-manager.mjs && npx tsx test/test-serve-ws-upgrade.mjs && npx tsx test/test-serve-auth.mjs && npx tsx test/test-static-file-server.mjs && npx tsx test/test-serve-stability.mjs && npx tsx test/test-frpc-e2e.mjs --unit-only && npx tsx test/test-frpc-status.mjs && node test/pinnedClaudeCode.test.mjs && node test/fleet.test.mjs && npx tsx test/test-session-file.mjs && npx tsx test/test-channel-rpc.mjs && npx tsx test/test-wise-agent.mjs && npx tsx test/test-channel-agent.mjs && npx tsx test/test-channels-service.mjs && npx tsx test/test-hotreload-seam.mjs && npx tsx test/test-hot-reload.mjs && npx tsx test/test-hot-reload-live.mjs && npx tsx test/test-session-core.mjs && npx tsx test/test-channel-async-reply.mjs && npx tsx test/test-outbox-reload.mjs && npx tsx test/test-channel-binding.mjs && npx tsx test/test-channel-store-lock.mjs && npx tsx test/test-channel-identity.mjs && npx tsx test/test-stateless-dispatch-limiter.mjs && npx tsx test/test-shared-session-identity.mjs && npx tsx test/test-wise-agent-auth.mjs && npx tsx test/test-channel-http.mjs && npx tsx test/test-channel-upload.mjs && npx tsx test/test-wise-voice.mjs && npx tsx test/test-wise-headless.mjs && npx tsx test/test-wise-machine.mjs && npx tsx test/test-crew-merge.mjs && npx tsx test/test-crew-verdict-routing.mjs && npx tsx test/test-crew-standalone.mjs && npx tsx test/test-session-links.mjs && npx tsx test/test-issue-loop-pause-guard.mjs && npx tsx test/test-artifact-guard.mjs && npx tsx test/test-artifact-sync-pagination.mjs && npx tsx test/test-graceful-restart.mjs && npx tsx test/test-flush-exit.mjs && npx tsx test/test-codex-skills.mjs",
|
|
23
|
+
"test:hypha": "node --no-warnings test/test-hypha-service.mjs",
|
|
24
|
+
dev: "tsx src/cli.ts",
|
|
25
|
+
"dev:daemon": "tsx src/cli.ts daemon start-sync",
|
|
26
|
+
"test:e2e": "node --no-warnings test/e2e-session-tests.mjs",
|
|
27
|
+
"test:frpc": "npx tsx test/test-frpc-e2e.mjs",
|
|
28
|
+
prepublishOnly: "yarn build"
|
|
29
|
+
};
|
|
30
|
+
var dependencies = {
|
|
31
|
+
"@agentclientprotocol/sdk": "^0.14.1",
|
|
32
|
+
"@modelcontextprotocol/sdk": "^1.25.3",
|
|
33
|
+
"hypha-rpc": "0.21.42",
|
|
34
|
+
"node-pty": "1.2.0-beta.11",
|
|
35
|
+
ws: "^8.18.0",
|
|
36
|
+
yaml: "^2.8.2",
|
|
37
|
+
zod: "^3.24.4"
|
|
38
|
+
};
|
|
39
|
+
var devDependencies = {
|
|
40
|
+
"@types/node": ">=20",
|
|
41
|
+
"@types/ws": "^8.5.14",
|
|
42
|
+
pkgroll: "^2.14.2",
|
|
43
|
+
tsx: "^4.20.6",
|
|
44
|
+
typescript: "5.9.3"
|
|
45
|
+
};
|
|
46
|
+
var packageManager = "yarn@1.22.22";
|
|
47
|
+
var _package = {
|
|
48
|
+
name: name,
|
|
49
|
+
version: version,
|
|
50
|
+
description: description,
|
|
51
|
+
author: author,
|
|
52
|
+
license: license,
|
|
53
|
+
type: type,
|
|
54
|
+
bin: bin,
|
|
55
|
+
files: files,
|
|
56
|
+
main: main,
|
|
57
|
+
exports: exports$1,
|
|
58
|
+
scripts: scripts,
|
|
59
|
+
dependencies: dependencies,
|
|
60
|
+
devDependencies: devDependencies,
|
|
61
|
+
packageManager: packageManager
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export { author, bin, _package as default, dependencies, description, devDependencies, exports$1 as exports, files, license, main, name, packageManager, scripts, type, version };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { spawn, exec as exec$1 } from 'node:child_process';
|
|
2
2
|
import { promisify } from 'node:util';
|
|
3
3
|
|
|
4
|
-
const PINNED_CLAUDE_CODE_VERSION = "2.1.
|
|
4
|
+
const PINNED_CLAUDE_CODE_VERSION = "2.1.222";
|
|
5
5
|
const exec = promisify(exec$1);
|
|
6
6
|
let _reconcile = null;
|
|
7
7
|
function beginClaudeVersionReconcile(log) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as resolveProjectRoot, v as getRun, w as listRuns, x as getWorkflow, y as runWorkflow, z as setWorkflowEnabled, A as removeWorkflow, B as validateWorkflowName, C as saveWorkflow, D as rawWorkflow, E as listWorkflows } from './run-
|
|
1
|
+
import { j as resolveProjectRoot, v as getRun, w as listRuns, x as getWorkflow, y as runWorkflow, z as setWorkflowEnabled, A as removeWorkflow, B as validateWorkflowName, C as saveWorkflow, D as rawWorkflow, E as listWorkflows } from './run-CqO23ro_.mjs';
|
|
2
2
|
import 'os';
|
|
3
3
|
import 'fs/promises';
|
|
4
4
|
import 'fs';
|
|
@@ -16,9 +16,9 @@ import 'node:os';
|
|
|
16
16
|
import 'node:path';
|
|
17
17
|
import 'node:events';
|
|
18
18
|
import '@agentclientprotocol/sdk';
|
|
19
|
+
import 'node:util';
|
|
19
20
|
import 'node:readline';
|
|
20
21
|
import 'node:fs/promises';
|
|
21
|
-
import 'node:util';
|
|
22
22
|
import 'yaml';
|
|
23
23
|
|
|
24
24
|
async function workflowRpc(cwd, params) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as resolveProjectRoot, u as updateIssue, k as getIssue, l as resumeIssue, p as pauseIssue, m as addComment, n as addIssue, o as listIssues, q as searchIssues, t as isVisibleTo } from './run-
|
|
1
|
+
import { j as resolveProjectRoot, u as updateIssue, k as getIssue, l as resumeIssue, p as pauseIssue, m as addComment, n as addIssue, o as listIssues, q as searchIssues, t as isVisibleTo } from './run-CqO23ro_.mjs';
|
|
2
2
|
import 'os';
|
|
3
3
|
import 'fs/promises';
|
|
4
4
|
import 'fs';
|
|
@@ -16,9 +16,9 @@ import 'node:os';
|
|
|
16
16
|
import 'node:path';
|
|
17
17
|
import 'node:events';
|
|
18
18
|
import '@agentclientprotocol/sdk';
|
|
19
|
+
import 'node:util';
|
|
19
20
|
import 'node:readline';
|
|
20
21
|
import 'node:fs/promises';
|
|
21
|
-
import 'node:util';
|
|
22
22
|
import 'yaml';
|
|
23
23
|
|
|
24
24
|
function followUpCount(body) {
|