svamp-cli 0.2.175 → 0.2.176
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/{agentCommands-C4upUtMc.mjs → agentCommands-kchQlyIS.mjs} +5 -5
- package/dist/{auth-BKN98KO4.mjs → auth-oH2upjHc.mjs} +1 -1
- package/dist/cli.mjs +61 -61
- package/dist/{commands-BbqjhR4z.mjs → commands-9LT5p45A.mjs} +2 -2
- package/dist/{commands-D03sBXV4.mjs → commands-CXtkDntj.mjs} +2 -2
- package/dist/{commands-D2lD-S4d.mjs → commands-CbrJ16x7.mjs} +5 -5
- package/dist/{commands-BF_Wy2B4.mjs → commands-Cu6nPOsD.mjs} +1 -1
- package/dist/{commands-CkygtYMZ.mjs → commands-DBi7fxGX.mjs} +2 -2
- package/dist/{commands-BssfhM-2.mjs → commands-DGkX7Kcr.mjs} +1 -1
- package/dist/{commands-DICHik9Y.mjs → commands-DHbv5qMP.mjs} +19 -13
- package/dist/{commands-CSK-jSnk.mjs → commands-USG2Z4XP.mjs} +1 -1
- package/dist/{fleet-qUmhLn41.mjs → fleet-BcS8xNkk.mjs} +1 -1
- package/dist/{frpc-BDZgTsi8.mjs → frpc-Bm7BrLan.mjs} +1 -1
- package/dist/{headlessCli-BG-PcYjM.mjs → headlessCli-B4CVNI7S.mjs} +2 -2
- package/dist/index.mjs +1 -1
- package/dist/{package-CMB-hfB0.mjs → package-DndVS0ln.mjs} +2 -2
- package/dist/{rpc-gCEvLUNu.mjs → rpc-BbaS0cLh.mjs} +1 -1
- package/dist/{rpc-CQTahguB.mjs → rpc-DVNDMfl8.mjs} +11 -9
- package/dist/{run-Buov6wz-.mjs → run-BmpyfykC.mjs} +29 -10
- package/dist/{run-DGs1hcvd.mjs → run-Cr1yt_tm.mjs} +1 -1
- package/dist/scheduler-BusuolPD.mjs +93 -0
- package/dist/{serveCommands-C6l8yA9_.mjs → serveCommands-Crb8ENkv.mjs} +5 -5
- package/dist/{serveManager-B_Bj1AF4.mjs → serveManager-DQByExEO.mjs} +2 -2
- package/dist/{sideband-BYiyQgZR.mjs → sideband-B4L2zR2U.mjs} +1 -1
- package/dist/store-BPL__e4D.mjs +125 -0
- package/package.json +2 -2
- package/dist/store-D2HNe-Kv.mjs +0 -74
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svamp-cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.176",
|
|
4
4
|
"description": "Svamp CLI — AI workspace daemon on Hypha Cloud",
|
|
5
5
|
"author": "Amun AI AB",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"scripts": {
|
|
21
21
|
"build": "rm -rf dist bin/skills && mkdir -p bin/skills && cp -r ../../skills/artifact bin/skills/artifact && cp -r ../../skills/loop bin/skills/loop && cp -r ../../skills/crew bin/skills/crew && tsc --noEmit && pkgroll",
|
|
22
22
|
"typecheck": "tsc --noEmit",
|
|
23
|
-
"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-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-loop-activation.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-output-formatters.mjs && npx tsx test/test-inbox-guard.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-machine-service-logic.mjs && npx tsx test/test-interactive-helpers.mjs && npx tsx test/test-codex-backend.mjs && npx tsx test/test-acp-backend.mjs && npx tsx test/test-acp-bridge.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-session-consolidation.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-close-gate.mjs && npx tsx test/test-issue-rpc.mjs && npx tsx test/test-workflow-store.mjs && npx tsx test/test-workflow-rpc.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-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-routine.mjs && npx tsx test/test-routine-rpc.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-channel-async-reply.mjs && npx tsx test/test-channel-binding.mjs && npx tsx test/test-channel-identity.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-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",
|
|
23
|
+
"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-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-loop-activation.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-output-formatters.mjs && npx tsx test/test-inbox-guard.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-machine-service-logic.mjs && npx tsx test/test-interactive-helpers.mjs && npx tsx test/test-codex-backend.mjs && npx tsx test/test-acp-backend.mjs && npx tsx test/test-acp-bridge.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-session-consolidation.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-close-gate.mjs && npx tsx test/test-issue-rpc.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-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-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-routine.mjs && npx tsx test/test-routine-rpc.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-channel-async-reply.mjs && npx tsx test/test-channel-binding.mjs && npx tsx test/test-channel-identity.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-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",
|
|
24
24
|
"test:hypha": "node --no-warnings test/test-hypha-service.mjs",
|
|
25
25
|
"dev": "tsx src/cli.ts",
|
|
26
26
|
"dev:daemon": "tsx src/cli.ts daemon start-sync",
|
package/dist/store-D2HNe-Kv.mjs
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { existsSync, unlinkSync, readFileSync, readdirSync, mkdirSync, writeFileSync, renameSync } from 'node:fs';
|
|
2
|
-
import { join } from 'node:path';
|
|
3
|
-
import { parse, stringify } from 'yaml';
|
|
4
|
-
|
|
5
|
-
function workflowsDir(projectRoot) {
|
|
6
|
-
return join(projectRoot, ".svamp", "workflows");
|
|
7
|
-
}
|
|
8
|
-
function workflowPath(projectRoot, name) {
|
|
9
|
-
return join(workflowsDir(projectRoot), `${name}.yaml`);
|
|
10
|
-
}
|
|
11
|
-
function parseWorkflow(content) {
|
|
12
|
-
try {
|
|
13
|
-
const o = parse(content);
|
|
14
|
-
if (!o || typeof o !== "object" || !o.name) return null;
|
|
15
|
-
const jobs = Array.isArray(o.jobs) ? o.jobs.map((j) => ({ run: String(j?.run ?? "") })).filter((j) => j.run) : [];
|
|
16
|
-
return { name: String(o.name), on: o.on && typeof o.on === "object" ? o.on : void 0, jobs, session: o.session ?? null };
|
|
17
|
-
} catch {
|
|
18
|
-
return null;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
function serializeWorkflow(wf) {
|
|
22
|
-
const clean = { name: wf.name };
|
|
23
|
-
if (wf.session) clean.session = wf.session;
|
|
24
|
-
if (wf.on && Object.keys(wf.on).length) clean.on = wf.on;
|
|
25
|
-
clean.jobs = wf.jobs.map((j) => ({ run: j.run }));
|
|
26
|
-
return stringify(clean);
|
|
27
|
-
}
|
|
28
|
-
function listWorkflows(projectRoot) {
|
|
29
|
-
const dir = workflowsDir(projectRoot);
|
|
30
|
-
if (!existsSync(dir)) return [];
|
|
31
|
-
const out = [];
|
|
32
|
-
for (const name of readdirSync(dir)) {
|
|
33
|
-
if (!name.endsWith(".yaml") && !name.endsWith(".yml")) continue;
|
|
34
|
-
try {
|
|
35
|
-
const wf = parseWorkflow(readFileSync(join(dir, name), "utf-8"));
|
|
36
|
-
if (wf) out.push(wf);
|
|
37
|
-
} catch {
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
return out.sort((a, b) => a.name.localeCompare(b.name));
|
|
41
|
-
}
|
|
42
|
-
function getWorkflow(projectRoot, name) {
|
|
43
|
-
const p = workflowPath(projectRoot, name);
|
|
44
|
-
if (!existsSync(p)) return null;
|
|
45
|
-
try {
|
|
46
|
-
return parseWorkflow(readFileSync(p, "utf-8"));
|
|
47
|
-
} catch {
|
|
48
|
-
return null;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
function rawWorkflow(projectRoot, name) {
|
|
52
|
-
const p = workflowPath(projectRoot, name);
|
|
53
|
-
return existsSync(p) ? readFileSync(p, "utf-8") : null;
|
|
54
|
-
}
|
|
55
|
-
function saveWorkflow(projectRoot, wf) {
|
|
56
|
-
const dir = workflowsDir(projectRoot);
|
|
57
|
-
mkdirSync(dir, { recursive: true });
|
|
58
|
-
const path = workflowPath(projectRoot, wf.name);
|
|
59
|
-
const tmp = `${path}.tmp-${process.pid}`;
|
|
60
|
-
writeFileSync(tmp, serializeWorkflow(wf));
|
|
61
|
-
renameSync(tmp, path);
|
|
62
|
-
}
|
|
63
|
-
function removeWorkflow(projectRoot, name) {
|
|
64
|
-
const p = workflowPath(projectRoot, name);
|
|
65
|
-
if (!existsSync(p)) return false;
|
|
66
|
-
try {
|
|
67
|
-
unlinkSync(p);
|
|
68
|
-
return true;
|
|
69
|
-
} catch {
|
|
70
|
-
return false;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export { rawWorkflow as a, getWorkflow as g, listWorkflows as l, removeWorkflow as r, saveWorkflow as s };
|