svamp-cli 0.1.52 → 0.1.53

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.
@@ -0,0 +1,558 @@
1
+ function getSandboxEnv() {
2
+ return {
3
+ apiUrl: process.env.SANDBOX_API_URL || "https://agent-sandbox.aicell.io",
4
+ apiKey: process.env.SANDBOX_API_KEY || process.env.HYPHA_TOKEN || "",
5
+ namespace: process.env.SANDBOX_NAMESPACE || process.env.HYPHA_WORKSPACE || "",
6
+ sandboxId: process.env.SANDBOX_ID || ""
7
+ };
8
+ }
9
+ function requireSandboxEnv() {
10
+ const env = getSandboxEnv();
11
+ if (!env.apiKey) {
12
+ throw new Error(
13
+ 'No API credentials found.\nRun "svamp login" to authenticate with Hypha, or set SANDBOX_API_KEY directly.'
14
+ );
15
+ }
16
+ if (!env.namespace) {
17
+ throw new Error(
18
+ 'No namespace/workspace found.\nRun "svamp login" to set HYPHA_WORKSPACE, or set SANDBOX_NAMESPACE directly.'
19
+ );
20
+ }
21
+ return env;
22
+ }
23
+ function requireSandboxApiEnv() {
24
+ const env = getSandboxEnv();
25
+ if (!env.apiKey) {
26
+ throw new Error(
27
+ 'No API credentials found.\nRun "svamp login" to authenticate with Hypha, or set SANDBOX_API_KEY directly.'
28
+ );
29
+ }
30
+ return env;
31
+ }
32
+ async function sandboxFetch(env, path, init) {
33
+ const url = `${env.apiUrl.replace(/\/+$/, "")}${path}`;
34
+ const headers = {
35
+ "Authorization": `Bearer ${env.apiKey}`,
36
+ "Content-Type": "application/json",
37
+ ...init?.headers || {}
38
+ };
39
+ const res = await fetch(url, { ...init, headers });
40
+ if (!res.ok) {
41
+ const body = await res.text().catch(() => "");
42
+ let detail = body;
43
+ try {
44
+ detail = JSON.parse(body).detail || body;
45
+ } catch {
46
+ }
47
+ throw new Error(`${res.status} ${res.statusText}: ${detail}`);
48
+ }
49
+ return res;
50
+ }
51
+ async function createServiceGroup(name, ports, options) {
52
+ const env = requireSandboxEnv();
53
+ const body = {};
54
+ if (ports.length === 1 && options?.subdomain) {
55
+ body.port = ports[0];
56
+ body.subdomain = options.subdomain;
57
+ } else {
58
+ body.ports = ports.map((p) => ({ port: p }));
59
+ }
60
+ if (options?.healthPath) {
61
+ body.health_path = options.healthPath;
62
+ if (options.healthInterval) {
63
+ body.health_interval = options.healthInterval;
64
+ }
65
+ }
66
+ const res = await sandboxFetch(env, `/services/${env.namespace}/${name}`, {
67
+ method: "POST",
68
+ body: JSON.stringify(body)
69
+ });
70
+ return res.json();
71
+ }
72
+ async function listServiceGroups() {
73
+ const env = requireSandboxEnv();
74
+ const res = await sandboxFetch(env, `/services/${env.namespace}`);
75
+ return res.json();
76
+ }
77
+ async function getServiceGroup(name) {
78
+ const env = requireSandboxEnv();
79
+ const res = await sandboxFetch(env, `/services/${env.namespace}/${name}`);
80
+ return res.json();
81
+ }
82
+ async function deleteServiceGroup(name) {
83
+ const env = requireSandboxEnv();
84
+ const res = await sandboxFetch(env, `/services/${env.namespace}/${name}`, {
85
+ method: "DELETE"
86
+ });
87
+ return res.json();
88
+ }
89
+ async function addPort(name, port, subdomain) {
90
+ const env = requireSandboxEnv();
91
+ const res = await sandboxFetch(env, `/services/${env.namespace}/${name}/ports`, {
92
+ method: "POST",
93
+ body: JSON.stringify({ port, subdomain })
94
+ });
95
+ return res.json();
96
+ }
97
+ async function removePort(name, port) {
98
+ const env = requireSandboxEnv();
99
+ const res = await sandboxFetch(env, `/services/${env.namespace}/${name}/ports/${port}`, {
100
+ method: "DELETE"
101
+ });
102
+ return res.json();
103
+ }
104
+ async function renameSubdomain(name, port, subdomain) {
105
+ const env = requireSandboxEnv();
106
+ const res = await sandboxFetch(env, `/services/${env.namespace}/${name}/subdomain`, {
107
+ method: "PUT",
108
+ body: JSON.stringify({ port, subdomain })
109
+ });
110
+ return res.json();
111
+ }
112
+ async function addBackend(name, sandboxId) {
113
+ const env = requireSandboxEnv();
114
+ const sid = sandboxId || env.sandboxId;
115
+ if (!sid) {
116
+ throw new Error(
117
+ "No sandbox ID provided and SANDBOX_ID is not set.\nUse --sandbox-id <id> to specify which sandbox to add."
118
+ );
119
+ }
120
+ const res = await sandboxFetch(env, `/services/${env.namespace}/${name}/backends`, {
121
+ method: "POST",
122
+ body: JSON.stringify({ sandbox_id: sid })
123
+ });
124
+ return res.json();
125
+ }
126
+ async function removeBackend(name, sandboxId) {
127
+ const env = requireSandboxEnv();
128
+ const sid = sandboxId || env.sandboxId;
129
+ if (!sid) {
130
+ throw new Error(
131
+ "No sandbox ID provided and SANDBOX_ID is not set.\nUse --sandbox-id <id> to specify which sandbox to remove."
132
+ );
133
+ }
134
+ const res = await sandboxFetch(env, `/services/${env.namespace}/${name}/backends/${sid}`, {
135
+ method: "DELETE"
136
+ });
137
+ return res.json();
138
+ }
139
+
140
+ function getFlag(args, flag) {
141
+ const idx = args.indexOf(flag);
142
+ return idx !== -1 && idx + 1 < args.length ? args[idx + 1] : void 0;
143
+ }
144
+ function getAllFlags(args, flag) {
145
+ const values = [];
146
+ for (let i = 0; i < args.length; i++) {
147
+ if (args[i] === flag && i + 1 < args.length) {
148
+ values.push(args[i + 1]);
149
+ i++;
150
+ }
151
+ }
152
+ return values;
153
+ }
154
+ function hasFlag(args, ...flags) {
155
+ return flags.some((f) => args.includes(f));
156
+ }
157
+ function positionalArgs(args) {
158
+ const result = [];
159
+ for (let i = 0; i < args.length; i++) {
160
+ if (args[i].startsWith("--")) {
161
+ if (i + 1 < args.length && !args[i + 1].startsWith("--")) {
162
+ i++;
163
+ }
164
+ continue;
165
+ }
166
+ result.push(args[i]);
167
+ }
168
+ return result;
169
+ }
170
+ function parsePorts(args) {
171
+ const portStrs = getAllFlags(args, "--port");
172
+ if (portStrs.length === 0) return [];
173
+ const ports = [];
174
+ for (const s of portStrs) {
175
+ const p = parseInt(s, 10);
176
+ if (isNaN(p) || p < 1 || p > 65535) {
177
+ console.error(`Error: invalid port '${s}' \u2014 must be 1-65535`);
178
+ process.exit(1);
179
+ }
180
+ ports.push(p);
181
+ }
182
+ return ports;
183
+ }
184
+ function printServiceGroupInfo(info) {
185
+ console.log(`Service group: ${info.name}`);
186
+ console.log(` Namespace: ${info.namespace}`);
187
+ console.log(` K8s svc: ${info.k8s_service}`);
188
+ console.log(` Created: ${info.created_at}`);
189
+ if (info.health_path) {
190
+ console.log(` Health: ${info.health_path} (every ${info.health_interval}s)`);
191
+ }
192
+ console.log(` Ports (${info.ports.length}):`);
193
+ for (const p of info.ports) {
194
+ console.log(` ${p.port} \u2192 ${p.url}`);
195
+ }
196
+ console.log(` Backends (${info.backends.length}):`);
197
+ for (const b of info.backends) {
198
+ const healthTag = b.healthy === false ? " [unhealthy]" : b.healthy === true ? "" : "";
199
+ const failInfo = b.consecutive_failures ? ` (${b.consecutive_failures} failures)` : "";
200
+ console.log(` - ${b.sandbox_id} (${b.pod_ip})${healthTag}${failInfo}`);
201
+ }
202
+ }
203
+ function printServiceGroupListItem(g) {
204
+ console.log(` ${g.name}`);
205
+ if (g.ports.length > 1) {
206
+ for (const p of g.ports) {
207
+ console.log(` ${p.port} \u2192 ${p.url}`);
208
+ }
209
+ } else {
210
+ console.log(` URL: ${g.url}`);
211
+ console.log(` Port: ${g.port}`);
212
+ }
213
+ console.log(` Backends: ${g.backend_count}`);
214
+ }
215
+ function validateSubdomain(sub) {
216
+ if (sub.split("-").length - 1 < 2) {
217
+ console.error(`Error: custom subdomain must contain at least 2 hyphens (e.g., my-cool-service), got '${sub}'`);
218
+ process.exit(1);
219
+ }
220
+ }
221
+ async function serviceCreate(args) {
222
+ const positional = positionalArgs(args);
223
+ const name = positional[0];
224
+ const ports = parsePorts(args);
225
+ const subdomain = getFlag(args, "--subdomain");
226
+ const healthPath = getFlag(args, "--health-path");
227
+ const healthIntervalStr = getFlag(args, "--health-interval");
228
+ if (!name || ports.length === 0) {
229
+ console.error("Usage: svamp service create <name> --port <port> [--port <port2>] [--health-path <path>]");
230
+ process.exit(1);
231
+ }
232
+ if (subdomain) validateSubdomain(subdomain);
233
+ const healthInterval = healthIntervalStr ? parseInt(healthIntervalStr, 10) : void 0;
234
+ try {
235
+ const result = await createServiceGroup(name, ports, {
236
+ subdomain,
237
+ healthPath,
238
+ healthInterval
239
+ });
240
+ console.log(`Service group created: ${result.name}`);
241
+ for (const p of result.ports) {
242
+ console.log(` ${p.port} \u2192 ${p.url}`);
243
+ }
244
+ console.log(` K8s svc: ${result.k8s_service}`);
245
+ console.log(` Backends: ${result.backends.length}`);
246
+ } catch (err) {
247
+ console.error(`Error creating service group: ${err.message}`);
248
+ process.exit(1);
249
+ }
250
+ }
251
+ async function serviceList(args) {
252
+ const jsonOutput = hasFlag(args, "--json");
253
+ try {
254
+ const groups = await listServiceGroups();
255
+ if (jsonOutput) {
256
+ console.log(JSON.stringify(groups, null, 2));
257
+ return;
258
+ }
259
+ if (groups.length === 0) {
260
+ console.log("No service groups found.");
261
+ return;
262
+ }
263
+ console.log(`Service groups (${groups.length}):
264
+ `);
265
+ for (const g of groups) {
266
+ printServiceGroupListItem(g);
267
+ console.log();
268
+ }
269
+ } catch (err) {
270
+ console.error(`Error listing service groups: ${err.message}`);
271
+ process.exit(1);
272
+ }
273
+ }
274
+ async function serviceInfo(args) {
275
+ const positional = positionalArgs(args);
276
+ const name = positional[0];
277
+ const jsonOutput = hasFlag(args, "--json");
278
+ if (!name) {
279
+ console.error("Usage: svamp service info <name> [--json]");
280
+ process.exit(1);
281
+ }
282
+ try {
283
+ const info = await getServiceGroup(name);
284
+ if (jsonOutput) {
285
+ console.log(JSON.stringify(info, null, 2));
286
+ return;
287
+ }
288
+ printServiceGroupInfo(info);
289
+ } catch (err) {
290
+ console.error(`Error getting service group: ${err.message}`);
291
+ process.exit(1);
292
+ }
293
+ }
294
+ async function serviceDelete(args) {
295
+ const positional = positionalArgs(args);
296
+ const name = positional[0];
297
+ if (!name) {
298
+ console.error("Usage: svamp service delete <name>");
299
+ process.exit(1);
300
+ }
301
+ try {
302
+ await deleteServiceGroup(name);
303
+ console.log(`Service group '${name}' deleted.`);
304
+ } catch (err) {
305
+ console.error(`Error deleting service group: ${err.message}`);
306
+ process.exit(1);
307
+ }
308
+ }
309
+ async function serviceAddBackend(args) {
310
+ const positional = positionalArgs(args);
311
+ const name = positional[0];
312
+ const sandboxId = getFlag(args, "--sandbox-id");
313
+ if (!name) {
314
+ console.error("Usage: svamp service add-backend <name> [--sandbox-id <id>]");
315
+ process.exit(1);
316
+ }
317
+ try {
318
+ const result = await addBackend(name, sandboxId);
319
+ console.log(`Backend added to '${name}': ${result.sandbox_id} (${result.pod_ip})`);
320
+ console.log(` Total backends: ${result.backend_count}`);
321
+ } catch (err) {
322
+ console.error(`Error adding backend: ${err.message}`);
323
+ process.exit(1);
324
+ }
325
+ }
326
+ async function serviceRemoveBackend(args) {
327
+ const positional = positionalArgs(args);
328
+ const name = positional[0];
329
+ const sandboxId = getFlag(args, "--sandbox-id");
330
+ if (!name) {
331
+ console.error("Usage: svamp service remove-backend <name> [--sandbox-id <id>]");
332
+ process.exit(1);
333
+ }
334
+ try {
335
+ const result = await removeBackend(name, sandboxId);
336
+ console.log(`Backend removed from '${name}': ${result.sandbox_id}`);
337
+ console.log(` Remaining backends: ${result.backend_count}`);
338
+ } catch (err) {
339
+ console.error(`Error removing backend: ${err.message}`);
340
+ process.exit(1);
341
+ }
342
+ }
343
+ async function serviceAddPort(args) {
344
+ const positional = positionalArgs(args);
345
+ const name = positional[0];
346
+ const ports = parsePorts(args);
347
+ const subdomain = getFlag(args, "--subdomain");
348
+ if (!name || ports.length !== 1) {
349
+ console.error("Usage: svamp service add-port <name> --port <port> [--subdomain <sub>]");
350
+ process.exit(1);
351
+ }
352
+ if (subdomain) validateSubdomain(subdomain);
353
+ try {
354
+ const result = await addPort(name, ports[0], subdomain);
355
+ console.log(`Port added to '${name}': ${result.port} \u2192 ${result.url}`);
356
+ console.log(` Total ports: ${result.total_ports}`);
357
+ } catch (err) {
358
+ console.error(`Error adding port: ${err.message}`);
359
+ process.exit(1);
360
+ }
361
+ }
362
+ async function serviceRemovePort(args) {
363
+ const positional = positionalArgs(args);
364
+ const name = positional[0];
365
+ const ports = parsePorts(args);
366
+ if (!name || ports.length !== 1) {
367
+ console.error("Usage: svamp service remove-port <name> --port <port>");
368
+ process.exit(1);
369
+ }
370
+ try {
371
+ const result = await removePort(name, ports[0]);
372
+ console.log(`Port removed from '${name}': ${result.port}`);
373
+ console.log(` Remaining ports: ${result.total_ports}`);
374
+ } catch (err) {
375
+ console.error(`Error removing port: ${err.message}`);
376
+ process.exit(1);
377
+ }
378
+ }
379
+ async function serviceRename(args) {
380
+ const positional = positionalArgs(args);
381
+ const name = positional[0];
382
+ const ports = parsePorts(args);
383
+ const subdomain = getFlag(args, "--subdomain");
384
+ if (!name || ports.length !== 1 || !subdomain) {
385
+ console.error("Usage: svamp service rename <name> --port <port> --subdomain <new-subdomain>");
386
+ console.error(" The subdomain must contain at least 2 hyphens (e.g., my-cool-service)");
387
+ process.exit(1);
388
+ }
389
+ if (subdomain.split("-").length - 1 < 2) {
390
+ console.error(`Error: subdomain must contain at least 2 hyphens (e.g., my-cool-service), got '${subdomain}'`);
391
+ process.exit(1);
392
+ }
393
+ try {
394
+ const result = await renameSubdomain(name, ports[0], subdomain);
395
+ if (result.status === "unchanged") {
396
+ console.log(`Subdomain already set to '${result.subdomain}' \u2014 no change.`);
397
+ } else {
398
+ console.log(`Subdomain renamed: ${result.old_subdomain} \u2192 ${result.subdomain}`);
399
+ console.log(` New URL: ${result.url}`);
400
+ }
401
+ } catch (err) {
402
+ console.error(`Error renaming subdomain: ${err.message}`);
403
+ process.exit(1);
404
+ }
405
+ }
406
+ async function serviceExpose(args) {
407
+ const positional = positionalArgs(args);
408
+ const name = positional[0];
409
+ const ports = parsePorts(args);
410
+ const subdomain = getFlag(args, "--subdomain");
411
+ const healthPath = getFlag(args, "--health-path");
412
+ const healthIntervalStr = getFlag(args, "--health-interval");
413
+ if (!name || ports.length === 0) {
414
+ console.error("Usage: svamp service expose <name> --port <port> [--port <port2>] [--health-path <path>]");
415
+ process.exit(1);
416
+ }
417
+ if (subdomain) validateSubdomain(subdomain);
418
+ const healthInterval = healthIntervalStr ? parseInt(healthIntervalStr, 10) : void 0;
419
+ const env = getSandboxEnv();
420
+ try {
421
+ const group = await createServiceGroup(name, ports, {
422
+ subdomain,
423
+ healthPath,
424
+ healthInterval
425
+ });
426
+ if (env.sandboxId) {
427
+ const result = await addBackend(name);
428
+ console.log(`Backend added: ${result.sandbox_id} (${result.pod_ip})`);
429
+ console.log(`
430
+ Service is live:`);
431
+ for (const p of group.ports) {
432
+ console.log(` ${p.port} \u2192 ${p.url}`);
433
+ }
434
+ } else {
435
+ console.log(`No SANDBOX_ID detected \u2014 starting reverse tunnel.`);
436
+ const { runTunnel } = await import('./tunnel-DhVAOdGd.mjs');
437
+ await runTunnel(name, ports);
438
+ }
439
+ } catch (err) {
440
+ console.error(`Error exposing service: ${err.message}`);
441
+ process.exit(1);
442
+ }
443
+ }
444
+ async function serviceTunnel(args) {
445
+ const positional = positionalArgs(args);
446
+ const name = positional[0];
447
+ const ports = parsePorts(args);
448
+ if (!name || ports.length === 0) {
449
+ console.error("Usage: svamp service tunnel <name> --port <port> [--port <port2>]");
450
+ process.exit(1);
451
+ }
452
+ const { runTunnel } = await import('./tunnel-DhVAOdGd.mjs');
453
+ await runTunnel(name, ports);
454
+ }
455
+ async function handleServiceCommand() {
456
+ const args = process.argv.slice(2);
457
+ const serviceArgs = args.slice(1);
458
+ const sub = serviceArgs[0];
459
+ if (!sub || sub === "--help" || sub === "-h") {
460
+ printServiceHelp();
461
+ return;
462
+ }
463
+ const commandArgs = serviceArgs.slice(1);
464
+ if (sub === "create") {
465
+ await serviceCreate(commandArgs);
466
+ } else if (sub === "list" || sub === "ls") {
467
+ await serviceList(commandArgs);
468
+ } else if (sub === "info" || sub === "show") {
469
+ await serviceInfo(commandArgs);
470
+ } else if (sub === "delete" || sub === "rm") {
471
+ await serviceDelete(commandArgs);
472
+ } else if (sub === "add-backend" || sub === "add") {
473
+ await serviceAddBackend(commandArgs);
474
+ } else if (sub === "remove-backend" || sub === "remove") {
475
+ await serviceRemoveBackend(commandArgs);
476
+ } else if (sub === "add-port") {
477
+ await serviceAddPort(commandArgs);
478
+ } else if (sub === "remove-port") {
479
+ await serviceRemovePort(commandArgs);
480
+ } else if (sub === "rename") {
481
+ await serviceRename(commandArgs);
482
+ } else if (sub === "expose") {
483
+ await serviceExpose(commandArgs);
484
+ } else if (sub === "tunnel") {
485
+ await serviceTunnel(commandArgs);
486
+ } else {
487
+ console.error(`Unknown service command: ${sub}`);
488
+ printServiceHelp();
489
+ process.exit(1);
490
+ }
491
+ }
492
+ function printServiceHelp() {
493
+ console.log(`
494
+ svamp service \u2014 Manage load-balanced service groups
495
+
496
+ Usage:
497
+ svamp service create <name> --port <port> [--port <port2>] [options] Create a service group
498
+ svamp service list [--json] List service groups
499
+ svamp service info <name> [--json] Show service group details
500
+ svamp service delete <name> Delete a service group
501
+ svamp service add-backend <name> [--sandbox-id <id>] Add a pod as backend
502
+ svamp service remove-backend <name> [--sandbox-id <id>] Remove a backend
503
+ svamp service add-port <name> --port <port> [--subdomain <sub>] Add port to existing group
504
+ svamp service remove-port <name> --port <port> Remove port from group
505
+ svamp service rename <name> --port <port> --subdomain <sub> Rename subdomain of a port
506
+ svamp service expose <name> --port <port> [--port <port2>] [options] Create + join (auto-detects tunnel)
507
+ svamp service tunnel <name> --port <port> [--port <port2>] Tunnel local ports to service group
508
+
509
+ Create/Expose options:
510
+ --health-path <path> Health check endpoint (e.g., /health)
511
+ --health-interval <sec> Health check interval in seconds (default: 30)
512
+ --subdomain <sub> Custom subdomain (must contain at least 2 hyphens)
513
+
514
+ Service groups expose HTTP services via stable URLs with K8s-native load
515
+ balancing. Multiple pods can serve the same service \u2014 K8s handles traffic
516
+ distribution automatically.
517
+
518
+ Multi-port: Use --port multiple times to expose several ports under one
519
+ service group. Each port gets its own unique subdomain and URL.
520
+
521
+ Auto-detect: 'expose' automatically detects the environment:
522
+ - Cloud sandbox (SANDBOX_ID set): adds pod as K8s backend
523
+ - Local machine (no SANDBOX_ID): starts reverse tunnel
524
+
525
+ Environment variables (set by provisioner):
526
+ SANDBOX_API_URL Agent-sandbox API base URL
527
+ SANDBOX_API_KEY API authentication token
528
+ SANDBOX_NAMESPACE User's sandbox namespace
529
+ SANDBOX_ID This pod's sandbox ID
530
+
531
+ Examples:
532
+ svamp service expose my-api --port 8000
533
+ svamp service expose my-api --port 8000 --port 3000 --health-path /health
534
+ svamp service add-port my-api --port 5000
535
+ svamp service remove-port my-api --port 5000
536
+ svamp service list
537
+ svamp service info my-api
538
+ svamp service delete my-api
539
+ `.trim());
540
+ }
541
+
542
+ var commands = /*#__PURE__*/Object.freeze({
543
+ __proto__: null,
544
+ handleServiceCommand: handleServiceCommand,
545
+ serviceAddBackend: serviceAddBackend,
546
+ serviceAddPort: serviceAddPort,
547
+ serviceCreate: serviceCreate,
548
+ serviceDelete: serviceDelete,
549
+ serviceExpose: serviceExpose,
550
+ serviceInfo: serviceInfo,
551
+ serviceList: serviceList,
552
+ serviceRemoveBackend: serviceRemoveBackend,
553
+ serviceRemovePort: serviceRemovePort,
554
+ serviceRename: serviceRename,
555
+ serviceTunnel: serviceTunnel
556
+ });
557
+
558
+ export { commands as c, requireSandboxApiEnv as r };
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { c as connectToHypha, d as daemonStatus, g as getHyphaServerUrl, r as registerMachineService, a as registerSessionService, s as startDaemon, b as stopDaemon } from './run-BnnUavlu.mjs';
1
+ export { c as connectToHypha, d as daemonStatus, g as getHyphaServerUrl, r as registerMachineService, a as registerSessionService, s as startDaemon, b as stopDaemon } from './run-CBhm4Jop.mjs';
2
2
  import 'os';
3
3
  import 'fs/promises';
4
4
  import 'fs';
@@ -0,0 +1,60 @@
1
+ var name = "svamp-cli";
2
+ var version = "0.1.53";
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: "tsc --noEmit && pkgroll",
21
+ typecheck: "tsc --noEmit",
22
+ test: "npx tsx test/test-authorize.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-ralph-loop.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-output-formatters.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-skills.mjs && npx tsx test/test-agent-grouping.mjs && npx tsx test/test-ralph-loop-integration.mjs && npx tsx test/test-ralph-loop-modes.mjs && npx tsx test/test-machine-list-directory.mjs && npx tsx test/test-service-commands.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
+ };
28
+ var dependencies = {
29
+ "@agentclientprotocol/sdk": "^0.14.1",
30
+ "@modelcontextprotocol/sdk": "^1.25.3",
31
+ "hypha-rpc": "0.21.29",
32
+ ws: "^8.18.0",
33
+ zod: "^3.24.4"
34
+ };
35
+ var devDependencies = {
36
+ "@types/node": ">=20",
37
+ "@types/ws": "^8.5.14",
38
+ pkgroll: "^2.14.2",
39
+ tsx: "^4.20.6",
40
+ typescript: "5.9.3"
41
+ };
42
+ var packageManager = "yarn@1.22.22";
43
+ var _package = {
44
+ name: name,
45
+ version: version,
46
+ description: description,
47
+ author: author,
48
+ license: license,
49
+ type: type,
50
+ bin: bin,
51
+ files: files,
52
+ main: main,
53
+ exports: exports$1,
54
+ scripts: scripts,
55
+ dependencies: dependencies,
56
+ devDependencies: devDependencies,
57
+ packageManager: packageManager
58
+ };
59
+
60
+ export { author, bin, _package as default, dependencies, description, devDependencies, exports$1 as exports, files, license, main, name, packageManager, scripts, type, version };