svamp-cli 0.2.195 → 0.2.197

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 (27) hide show
  1. package/bin/skills/loop/bin/stop-gate.mjs +31 -1
  2. package/bin/skills/loop/test/test-loop-gate.mjs +38 -0
  3. package/dist/{agentCommands-IdOiOg0f.mjs → agentCommands-Dxuc65V_.mjs} +5 -5
  4. package/dist/{auth-DmrnqTLo.mjs → auth-DweBQRAL.mjs} +1 -1
  5. package/dist/cli.mjs +60 -60
  6. package/dist/{commands-CbBOkn_G.mjs → commands-BF7fzTcc.mjs} +1 -1
  7. package/dist/{commands-DAYpMdgB.mjs → commands-BFZhHLhh.mjs} +2 -2
  8. package/dist/{commands-BlTV-jYX.mjs → commands-BItE-9OU.mjs} +1 -1
  9. package/dist/{commands-DHI31wAh.mjs → commands-BJ3G0VVJ.mjs} +1 -1
  10. package/dist/{commands-DZhCJXnB.mjs → commands-BWD_a3hE.mjs} +2 -2
  11. package/dist/{commands-B3uk2hcj.mjs → commands-Bxb8oEBa.mjs} +1 -1
  12. package/dist/{commands-DjT7M2al.mjs → commands-C1V3SEF9.mjs} +5 -5
  13. package/dist/{fleet-BtwsNKuT.mjs → fleet-C-2EKVda.mjs} +1 -1
  14. package/dist/{frpc-WpRu5zE_.mjs → frpc-BgabHfqV.mjs} +1 -1
  15. package/dist/{headlessCli-Dy049YdV.mjs → headlessCli-CtTe4oJ4.mjs} +2 -2
  16. package/dist/{httpServer-Cf54pQ77.mjs → httpServer-B1KVQJfm.mjs} +38 -0
  17. package/dist/index.mjs +1 -1
  18. package/dist/{package-ARvCEkBY.mjs → package-PTsbpBGF.mjs} +2 -2
  19. package/dist/{rpc-DgV6_G_Q.mjs → rpc-C35Y8Vto.mjs} +1 -1
  20. package/dist/{rpc-CvpwmghB.mjs → rpc-DlM7ml1e.mjs} +1 -1
  21. package/dist/{run-DiCtjIs5.mjs → run-B3fosGEs.mjs} +335 -36
  22. package/dist/{run-D79u_Ud4.mjs → run-DtTnHqcs.mjs} +1 -1
  23. package/dist/{scheduler-D8Xj2_vB.mjs → scheduler-B3hBIkt8.mjs} +1 -1
  24. package/dist/{serveCommands-Bc9DXaQv.mjs → serveCommands-Bj2aEfKX.mjs} +5 -5
  25. package/dist/{serveManager-C2ykbnxd.mjs → serveManager-CCslS9Yt.mjs} +2 -2
  26. package/dist/{sideband-B9uONcBg.mjs → sideband-BtZMx9Af.mjs} +1 -1
  27. package/package.json +2 -2
@@ -1,11 +1,11 @@
1
1
  import { writeFileSync, readFileSync } from 'fs';
2
2
  import { resolve } from 'path';
3
- import { connectAndGetMachine } from './commands-B3uk2hcj.mjs';
3
+ import { connectAndGetMachine } from './commands-Bxb8oEBa.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-DiCtjIs5.mjs';
8
+ import './run-B3fosGEs.mjs';
9
9
  import 'os';
10
10
  import 'fs/promises';
11
11
  import 'url';
@@ -1,5 +1,5 @@
1
1
  import { execSync } from 'node:child_process';
2
- import { m as resolveProjectRoot, t as searchIssues, q as listIssues, o as addComment, u as updateIssue, n as getIssue, v as isVisibleTo, x as summarize, p as addIssue } from './run-DiCtjIs5.mjs';
2
+ import { m as resolveProjectRoot, t as searchIssues, q as listIssues, o as addComment, u as updateIssue, n as getIssue, v as isVisibleTo, x as summarize, p as addIssue } from './run-B3fosGEs.mjs';
3
3
  import 'os';
4
4
  import 'fs/promises';
5
5
  import 'fs';
@@ -1,5 +1,5 @@
1
1
  import { spawnSync } from 'node:child_process';
2
- import { m as resolveProjectRoot } from './run-DiCtjIs5.mjs';
2
+ import { m as resolveProjectRoot } from './run-B3fosGEs.mjs';
3
3
  import { w as workflowSteps, s as setWorkflowEnabled, i as isWorkflowEnabled, r as removeWorkflow, g as getWorkflow, l as listWorkflows, a as saveWorkflow, b as rawWorkflow } from './store-DEZ8e-uE.mjs';
4
4
  import 'os';
5
5
  import 'fs/promises';
@@ -1,8 +1,8 @@
1
1
  import { existsSync } from 'node:fs';
2
2
  import { resolve } from 'node:path';
3
- import { connectAndGetMachine, resolveSessionId, createWorktree, connectAndResolveSession } from './commands-B3uk2hcj.mjs';
3
+ import { connectAndGetMachine, resolveSessionId, createWorktree, connectAndResolveSession } from './commands-Bxb8oEBa.mjs';
4
4
  import { execSync } from 'node:child_process';
5
- import { u as updateIssue, o as addComment, p as addIssue, y as shortId } from './run-DiCtjIs5.mjs';
5
+ import { u as updateIssue, o as addComment, p as addIssue, y as shortId } from './run-B3fosGEs.mjs';
6
6
  import 'node:os';
7
7
  import 'os';
8
8
  import 'fs/promises';
@@ -2,7 +2,7 @@ import { existsSync, readFileSync, writeFileSync } from 'node:fs';
2
2
  import { execSync } from 'node:child_process';
3
3
  import { basename, resolve, join, isAbsolute } from 'node:path';
4
4
  import os from 'node:os';
5
- import { O as formatHandle, P as normalizeAllowedUser, Q as loadSecurityContextConfig, T as resolveSecurityContext, U as buildSecurityContextFromFlags, V as mergeSecurityContexts, c as connectToHypha, W as buildSessionShareUrl, X as computeOutboundHop, y as shortId, Y as buildMachineShareUrl, Z as parseHandle, _ as handleMatchesMetadata } from './run-DiCtjIs5.mjs';
5
+ import { O as formatHandle, P as normalizeAllowedUser, Q as loadSecurityContextConfig, T as resolveSecurityContext, U as buildSecurityContextFromFlags, V as mergeSecurityContexts, c as connectToHypha, W as buildSessionShareUrl, X as computeOutboundHop, y as shortId, Y as buildMachineShareUrl, Z as parseHandle, _ as handleMatchesMetadata } from './run-B3fosGEs.mjs';
6
6
  import 'os';
7
7
  import 'fs/promises';
8
8
  import 'fs';
@@ -58,7 +58,7 @@ async function serviceExpose(args) {
58
58
  process.exit(1);
59
59
  }
60
60
  if (foreground) {
61
- const { runFrpcTunnel } = await import('./frpc-WpRu5zE_.mjs');
61
+ const { runFrpcTunnel } = await import('./frpc-BgabHfqV.mjs');
62
62
  await runFrpcTunnel(name, ports, void 0, {
63
63
  group,
64
64
  groupKey,
@@ -68,7 +68,7 @@ async function serviceExpose(args) {
68
68
  });
69
69
  return;
70
70
  }
71
- const { connectAndGetMachine } = await import('./commands-B3uk2hcj.mjs');
71
+ const { connectAndGetMachine } = await import('./commands-Bxb8oEBa.mjs');
72
72
  const { server, machine } = await connectAndGetMachine();
73
73
  try {
74
74
  const status = await machine.tunnelStart({
@@ -123,7 +123,7 @@ async function serviceServe(args) {
123
123
  };
124
124
  process.on("SIGINT", cleanup);
125
125
  process.on("SIGTERM", cleanup);
126
- const { runFrpcTunnel } = await import('./frpc-WpRu5zE_.mjs');
126
+ const { runFrpcTunnel } = await import('./frpc-BgabHfqV.mjs');
127
127
  await runFrpcTunnel(name, [caddyPort]);
128
128
  } catch (err) {
129
129
  console.error(`Error serving directory: ${err.message}`);
@@ -132,7 +132,7 @@ async function serviceServe(args) {
132
132
  }
133
133
  async function serviceList(_args) {
134
134
  try {
135
- const { connectAndGetMachine } = await import('./commands-B3uk2hcj.mjs');
135
+ const { connectAndGetMachine } = await import('./commands-Bxb8oEBa.mjs');
136
136
  const { server, machine } = await connectAndGetMachine();
137
137
  try {
138
138
  const tunnels = await machine.tunnelList({});
@@ -172,7 +172,7 @@ async function serviceDelete(args) {
172
172
  process.exit(1);
173
173
  }
174
174
  try {
175
- const { connectAndGetMachine } = await import('./commands-B3uk2hcj.mjs');
175
+ const { connectAndGetMachine } = await import('./commands-Bxb8oEBa.mjs');
176
176
  const { server, machine } = await connectAndGetMachine();
177
177
  try {
178
178
  await machine.tunnelStop({ name });
@@ -1,7 +1,7 @@
1
1
  import { existsSync, readFileSync } from 'node:fs';
2
2
  import { join } from 'node:path';
3
3
  import os from 'node:os';
4
- import { c as connectToHypha } from './run-DiCtjIs5.mjs';
4
+ import { c as connectToHypha } from './run-B3fosGEs.mjs';
5
5
  import { PINNED_CLAUDE_CODE_VERSION } from './pinnedClaudeCode-HydRNEt7.mjs';
6
6
  import 'os';
7
7
  import 'fs/promises';
@@ -4,7 +4,7 @@ import { mkdirSync, writeFileSync, unlinkSync, existsSync, chmodSync, readFileSy
4
4
  import { join } from 'path';
5
5
  import { homedir, platform, arch } from 'os';
6
6
  import { randomUUID, createHash } from 'crypto';
7
- import { h as getFrpsSubdomainHost, i as getFrpsServerPort, j as getFrpsServerAddr } from './run-DiCtjIs5.mjs';
7
+ import { h as getFrpsSubdomainHost, i as getFrpsServerPort, j as getFrpsServerAddr } from './run-B3fosGEs.mjs';
8
8
  import 'fs/promises';
9
9
  import 'url';
10
10
  import 'node:crypto';
@@ -1,5 +1,5 @@
1
- import { N as resolveModel, $ as describeMisconfiguration, a0 as buildMachineDeps } from './run-DiCtjIs5.mjs';
2
- import { handleRealtimeEvent, initMachineVoiceSession } from './sideband-B9uONcBg.mjs';
1
+ import { N as resolveModel, $ as describeMisconfiguration, a0 as buildMachineDeps } from './run-B3fosGEs.mjs';
2
+ import { handleRealtimeEvent, initMachineVoiceSession } from './sideband-BtZMx9Af.mjs';
3
3
  import { WebSocket } from 'ws';
4
4
  import { execSync, spawn } from 'child_process';
5
5
  import 'os';
@@ -160,6 +160,44 @@ data: ${JSON.stringify({ error: out.error })}
160
160
  });
161
161
  return;
162
162
  }
163
+ m = u.pathname.match(/^\/channel\/([\w.-]+)\/upload$/);
164
+ if (m) {
165
+ const cid = m[1];
166
+ const rpc2 = await findOwner(deps, cid);
167
+ if (!rpc2?.channelUpload) {
168
+ json(404, { error: "channel not found" });
169
+ return;
170
+ }
171
+ let chunks2 = "";
172
+ req.on("data", (d) => {
173
+ chunks2 += d;
174
+ if (chunks2.length > 40 * 1024 * 1024) req.destroy();
175
+ });
176
+ req.on("end", async () => {
177
+ let body = {};
178
+ try {
179
+ body = chunks2 ? JSON.parse(chunks2) : {};
180
+ } catch {
181
+ json(400, { error: "invalid JSON body" });
182
+ return;
183
+ }
184
+ try {
185
+ const out = await rpc2.channelUpload({
186
+ channel: cid,
187
+ key: keyOf(),
188
+ from: body.from,
189
+ session: body.session,
190
+ filename: body.filename,
191
+ content_base64: body.content_base64 ?? body.contentBase64,
192
+ content_type: body.content_type ?? body.contentType
193
+ });
194
+ json(out?.error ? out.error === "channel not found" ? 404 : 400 : 200, out);
195
+ } catch (e) {
196
+ json(500, { error: e?.message || String(e) });
197
+ }
198
+ });
199
+ return;
200
+ }
163
201
  m = u.pathname.match(/^\/channel\/([\w.-]+)\/tool$/);
164
202
  if (m) {
165
203
  const cid = m[1];
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-DiCtjIs5.mjs';
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-B3fosGEs.mjs';
2
2
  import 'os';
3
3
  import 'fs/promises';
4
4
  import 'fs';
@@ -1,5 +1,5 @@
1
1
  var name = "svamp-cli";
2
- var version = "0.2.195";
2
+ var version = "0.2.197";
3
3
  var description = "Svamp CLI — AI workspace daemon on Hypha Cloud";
4
4
  var author = "Amun AI AB";
5
5
  var license = "SEE LICENSE IN LICENSE";
@@ -19,7 +19,7 @@ var exports$1 = {
19
19
  var scripts = {
20
20
  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",
21
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-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-btw-proxy-env.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-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 && npx tsx test/test-crew-standalone.mjs",
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-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-btw-proxy-env.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-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-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-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-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",
23
23
  "test:hypha": "node --no-warnings test/test-hypha-service.mjs",
24
24
  dev: "tsx src/cli.ts",
25
25
  "dev:daemon": "tsx src/cli.ts daemon start-sync",
@@ -1,4 +1,4 @@
1
- import { m as resolveProjectRoot, u as updateIssue, n as getIssue, o as addComment, p as addIssue, q as listIssues, t as searchIssues, v as isVisibleTo } from './run-DiCtjIs5.mjs';
1
+ import { m as resolveProjectRoot, u as updateIssue, n as getIssue, o as addComment, p as addIssue, q as listIssues, t as searchIssues, v as isVisibleTo } from './run-B3fosGEs.mjs';
2
2
  import 'os';
3
3
  import 'fs/promises';
4
4
  import 'fs';
@@ -1,5 +1,5 @@
1
1
  import { spawnSync } from 'node:child_process';
2
- import { m as resolveProjectRoot } from './run-DiCtjIs5.mjs';
2
+ import { m as resolveProjectRoot } from './run-B3fosGEs.mjs';
3
3
  import { g as getWorkflow, w as workflowSteps, s as setWorkflowEnabled, r as removeWorkflow, a as saveWorkflow, b as rawWorkflow, l as listWorkflows } from './store-DEZ8e-uE.mjs';
4
4
  import 'os';
5
5
  import 'fs/promises';