svamp-cli 0.1.79 → 0.1.80

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.
@@ -145,7 +145,7 @@ async function sessionBroadcast(action, args) {
145
145
  console.log(`Broadcast sent: ${action}`);
146
146
  }
147
147
  async function connectToMachineService() {
148
- const { connectAndGetMachine } = await import('./commands-B6FEeZeP.mjs');
148
+ const { connectAndGetMachine } = await import('./commands-C06J5fW3.mjs');
149
149
  return connectAndGetMachine();
150
150
  }
151
151
  async function inboxSend(targetSessionId, opts) {
@@ -161,7 +161,7 @@ async function inboxSend(targetSessionId, opts) {
161
161
  }
162
162
  const { server, machine } = await connectToMachineService();
163
163
  try {
164
- const { resolveSessionId } = await import('./commands-B6FEeZeP.mjs');
164
+ const { resolveSessionId } = await import('./commands-C06J5fW3.mjs');
165
165
  const sessions = await machine.listSessions();
166
166
  const match = resolveSessionId(sessions, targetSessionId);
167
167
  const fullTargetId = match.sessionId;
package/dist/cli.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { b as stopDaemon, s as startDaemon, d as daemonStatus } from './run-DsXDjwLW.mjs';
1
+ import { b as stopDaemon, s as startDaemon, d as daemonStatus } from './run-Dm7UViwQ.mjs';
2
2
  import 'os';
3
3
  import 'fs/promises';
4
4
  import 'fs';
@@ -211,7 +211,7 @@ async function main() {
211
211
  const { handleServiceCommand } = await import('./commands-BYbuedOK.mjs');
212
212
  await handleServiceCommand();
213
213
  } else if (subcommand === "process" || subcommand === "proc") {
214
- const { processCommand } = await import('./commands-Cf3mXxPZ.mjs');
214
+ const { processCommand } = await import('./commands-CphOj2pR.mjs');
215
215
  let machineId;
216
216
  const processArgs = args.slice(1);
217
217
  const mIdx = processArgs.findIndex((a) => a === "--machine" || a === "-m");
@@ -229,7 +229,7 @@ async function main() {
229
229
  } else if (!subcommand || subcommand === "start") {
230
230
  await handleInteractiveCommand();
231
231
  } else if (subcommand === "--version" || subcommand === "-v") {
232
- const pkg = await import('./package-B-yM5uv2.mjs').catch(() => ({ default: { version: "unknown" } }));
232
+ const pkg = await import('./package-CSxyijZF.mjs').catch(() => ({ default: { version: "unknown" } }));
233
233
  console.log(`svamp version: ${pkg.default.version}`);
234
234
  } else {
235
235
  console.error(`Unknown command: ${subcommand}`);
@@ -238,7 +238,7 @@ async function main() {
238
238
  }
239
239
  }
240
240
  async function handleInteractiveCommand() {
241
- const { runInteractive } = await import('./run-DqvxMsWh.mjs');
241
+ const { runInteractive } = await import('./run-DsSVL5N4.mjs');
242
242
  const interactiveArgs = subcommand === "start" ? args.slice(1) : args;
243
243
  let directory = process.cwd();
244
244
  let resumeSessionId;
@@ -283,7 +283,7 @@ async function handleAgentCommand() {
283
283
  return;
284
284
  }
285
285
  if (agentArgs[0] === "list") {
286
- const { KNOWN_ACP_AGENTS, KNOWN_MCP_AGENTS: KNOWN_MCP_AGENTS2 } = await import('./run-DsXDjwLW.mjs').then(function (n) { return n.i; });
286
+ const { KNOWN_ACP_AGENTS, KNOWN_MCP_AGENTS: KNOWN_MCP_AGENTS2 } = await import('./run-Dm7UViwQ.mjs').then(function (n) { return n.i; });
287
287
  console.log("Known agents:");
288
288
  for (const [name, config2] of Object.entries(KNOWN_ACP_AGENTS)) {
289
289
  console.log(` ${name.padEnd(12)} ${config2.command} ${config2.args.join(" ")} (ACP)`);
@@ -295,7 +295,7 @@ async function handleAgentCommand() {
295
295
  console.log('Use "svamp agent -- <command> [args]" for a custom ACP agent.');
296
296
  return;
297
297
  }
298
- const { resolveAcpAgentConfig, KNOWN_MCP_AGENTS } = await import('./run-DsXDjwLW.mjs').then(function (n) { return n.i; });
298
+ const { resolveAcpAgentConfig, KNOWN_MCP_AGENTS } = await import('./run-Dm7UViwQ.mjs').then(function (n) { return n.i; });
299
299
  let cwd = process.cwd();
300
300
  const filteredArgs = [];
301
301
  for (let i = 0; i < agentArgs.length; i++) {
@@ -319,12 +319,12 @@ async function handleAgentCommand() {
319
319
  console.log(`Starting ${config.agentName} agent in ${cwd}...`);
320
320
  let backend;
321
321
  if (KNOWN_MCP_AGENTS[config.agentName]) {
322
- const { CodexMcpBackend } = await import('./run-DsXDjwLW.mjs').then(function (n) { return n.j; });
322
+ const { CodexMcpBackend } = await import('./run-Dm7UViwQ.mjs').then(function (n) { return n.j; });
323
323
  backend = new CodexMcpBackend({ cwd, log: logFn });
324
324
  } else {
325
- const { AcpBackend } = await import('./run-DsXDjwLW.mjs').then(function (n) { return n.h; });
326
- const { GeminiTransport } = await import('./run-DsXDjwLW.mjs').then(function (n) { return n.G; });
327
- const { DefaultTransport } = await import('./run-DsXDjwLW.mjs').then(function (n) { return n.D; });
325
+ const { AcpBackend } = await import('./run-Dm7UViwQ.mjs').then(function (n) { return n.h; });
326
+ const { GeminiTransport } = await import('./run-Dm7UViwQ.mjs').then(function (n) { return n.G; });
327
+ const { DefaultTransport } = await import('./run-Dm7UViwQ.mjs').then(function (n) { return n.D; });
328
328
  const transportHandler = config.agentName === "gemini" ? new GeminiTransport() : new DefaultTransport(config.agentName);
329
329
  backend = new AcpBackend({
330
330
  agentName: config.agentName,
@@ -442,7 +442,7 @@ async function handleSessionCommand() {
442
442
  printSessionHelp();
443
443
  return;
444
444
  }
445
- const { sessionList, sessionSpawn, sessionStop, sessionInfo, sessionMessages, sessionAttach, sessionMachines, sessionSend, sessionWait, sessionShare, sessionRalphStart, sessionRalphCancel, sessionRalphStatus, sessionInboxSend, sessionInboxList, sessionInboxRead, sessionInboxReply, sessionInboxClear } = await import('./commands-B6FEeZeP.mjs');
445
+ const { sessionList, sessionSpawn, sessionStop, sessionInfo, sessionMessages, sessionAttach, sessionMachines, sessionSend, sessionWait, sessionShare, sessionRalphStart, sessionRalphCancel, sessionRalphStatus, sessionInboxSend, sessionInboxList, sessionInboxRead, sessionInboxReply, sessionInboxClear } = await import('./commands-C06J5fW3.mjs');
446
446
  const parseFlagStr = (flag, shortFlag) => {
447
447
  for (let i = 1; i < sessionArgs.length; i++) {
448
448
  if ((sessionArgs[i] === flag || shortFlag) && i + 1 < sessionArgs.length) {
@@ -502,7 +502,7 @@ async function handleSessionCommand() {
502
502
  allowDomain.push(sessionArgs[++i]);
503
503
  }
504
504
  }
505
- const { parseShareArg } = await import('./commands-B6FEeZeP.mjs');
505
+ const { parseShareArg } = await import('./commands-C06J5fW3.mjs');
506
506
  const shareEntries = share.map((s) => parseShareArg(s));
507
507
  await sessionSpawn(agent, dir, targetMachineId, {
508
508
  message,
@@ -588,7 +588,7 @@ async function handleSessionCommand() {
588
588
  console.error("Usage: svamp session approve <session-id> [request-id] [--json]");
589
589
  process.exit(1);
590
590
  }
591
- const { sessionApprove } = await import('./commands-B6FEeZeP.mjs');
591
+ const { sessionApprove } = await import('./commands-C06J5fW3.mjs');
592
592
  const approveReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
593
593
  await sessionApprove(sessionArgs[1], approveReqId, targetMachineId, {
594
594
  json: hasFlag("--json")
@@ -598,7 +598,7 @@ async function handleSessionCommand() {
598
598
  console.error("Usage: svamp session deny <session-id> [request-id] [--json]");
599
599
  process.exit(1);
600
600
  }
601
- const { sessionDeny } = await import('./commands-B6FEeZeP.mjs');
601
+ const { sessionDeny } = await import('./commands-C06J5fW3.mjs');
602
602
  const denyReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
603
603
  await sessionDeny(sessionArgs[1], denyReqId, targetMachineId, {
604
604
  json: hasFlag("--json")
@@ -634,7 +634,7 @@ async function handleSessionCommand() {
634
634
  console.error("Usage: svamp session set-title <title>");
635
635
  process.exit(1);
636
636
  }
637
- const { sessionSetTitle } = await import('./agentCommands-uNFhhdN1.mjs');
637
+ const { sessionSetTitle } = await import('./agentCommands-WLRw5gAP.mjs');
638
638
  await sessionSetTitle(title);
639
639
  } else if (sessionSubcommand === "set-link") {
640
640
  const url = sessionArgs[1];
@@ -643,7 +643,7 @@ async function handleSessionCommand() {
643
643
  process.exit(1);
644
644
  }
645
645
  const label = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
646
- const { sessionSetLink } = await import('./agentCommands-uNFhhdN1.mjs');
646
+ const { sessionSetLink } = await import('./agentCommands-WLRw5gAP.mjs');
647
647
  await sessionSetLink(url, label);
648
648
  } else if (sessionSubcommand === "notify") {
649
649
  const message = sessionArgs[1];
@@ -652,7 +652,7 @@ async function handleSessionCommand() {
652
652
  process.exit(1);
653
653
  }
654
654
  const level = parseFlagStr("--level") || "info";
655
- const { sessionNotify } = await import('./agentCommands-uNFhhdN1.mjs');
655
+ const { sessionNotify } = await import('./agentCommands-WLRw5gAP.mjs');
656
656
  await sessionNotify(message, level);
657
657
  } else if (sessionSubcommand === "broadcast") {
658
658
  const action = sessionArgs[1];
@@ -660,7 +660,7 @@ async function handleSessionCommand() {
660
660
  console.error("Usage: svamp session broadcast <action> [args...]\nActions: open-canvas <url> [label], close-canvas, toast <message>");
661
661
  process.exit(1);
662
662
  }
663
- const { sessionBroadcast } = await import('./agentCommands-uNFhhdN1.mjs');
663
+ const { sessionBroadcast } = await import('./agentCommands-WLRw5gAP.mjs');
664
664
  await sessionBroadcast(action, sessionArgs.slice(2).filter((a) => !a.startsWith("--")));
665
665
  } else if (sessionSubcommand === "inbox") {
666
666
  const inboxSubcmd = sessionArgs[1];
@@ -671,7 +671,7 @@ async function handleSessionCommand() {
671
671
  process.exit(1);
672
672
  }
673
673
  if (agentSessionId) {
674
- const { inboxSend } = await import('./agentCommands-uNFhhdN1.mjs');
674
+ const { inboxSend } = await import('./agentCommands-WLRw5gAP.mjs');
675
675
  await inboxSend(sessionArgs[2], {
676
676
  body: sessionArgs[3],
677
677
  subject: parseFlagStr("--subject"),
@@ -686,7 +686,7 @@ async function handleSessionCommand() {
686
686
  }
687
687
  } else if (inboxSubcmd === "list" || inboxSubcmd === "ls") {
688
688
  if (agentSessionId && !sessionArgs[2]) {
689
- const { inboxList } = await import('./agentCommands-uNFhhdN1.mjs');
689
+ const { inboxList } = await import('./agentCommands-WLRw5gAP.mjs');
690
690
  await inboxList({
691
691
  unread: hasFlag("--unread"),
692
692
  limit: parseFlagInt("--limit"),
@@ -708,7 +708,7 @@ async function handleSessionCommand() {
708
708
  process.exit(1);
709
709
  }
710
710
  if (agentSessionId && !sessionArgs[3]) {
711
- const { inboxList } = await import('./agentCommands-uNFhhdN1.mjs');
711
+ const { inboxList } = await import('./agentCommands-WLRw5gAP.mjs');
712
712
  await sessionInboxRead(agentSessionId, sessionArgs[2], targetMachineId);
713
713
  } else if (sessionArgs[3]) {
714
714
  await sessionInboxRead(sessionArgs[2], sessionArgs[3], targetMachineId);
@@ -718,7 +718,7 @@ async function handleSessionCommand() {
718
718
  }
719
719
  } else if (inboxSubcmd === "reply") {
720
720
  if (agentSessionId && sessionArgs[2] && sessionArgs[3] && !sessionArgs[4]) {
721
- const { inboxReply } = await import('./agentCommands-uNFhhdN1.mjs');
721
+ const { inboxReply } = await import('./agentCommands-WLRw5gAP.mjs');
722
722
  await inboxReply(sessionArgs[2], sessionArgs[3]);
723
723
  } else if (sessionArgs[2] && sessionArgs[3] && sessionArgs[4]) {
724
724
  await sessionInboxReply(sessionArgs[2], sessionArgs[3], sessionArgs[4], targetMachineId);
@@ -754,7 +754,7 @@ async function handleMachineCommand() {
754
754
  return;
755
755
  }
756
756
  if (machineSubcommand === "share") {
757
- const { machineShare } = await import('./commands-B6FEeZeP.mjs');
757
+ const { machineShare } = await import('./commands-C06J5fW3.mjs');
758
758
  let machineId;
759
759
  const shareArgs = [];
760
760
  for (let i = 1; i < machineArgs.length; i++) {
@@ -784,7 +784,7 @@ async function handleMachineCommand() {
784
784
  }
785
785
  await machineShare(machineId, { add, remove, list, configPath, showConfig });
786
786
  } else if (machineSubcommand === "exec") {
787
- const { machineExec } = await import('./commands-B6FEeZeP.mjs');
787
+ const { machineExec } = await import('./commands-C06J5fW3.mjs');
788
788
  let machineId;
789
789
  let cwd;
790
790
  const cmdParts = [];
@@ -804,7 +804,7 @@ async function handleMachineCommand() {
804
804
  }
805
805
  await machineExec(machineId, command, cwd);
806
806
  } else if (machineSubcommand === "info") {
807
- const { machineInfo } = await import('./commands-B6FEeZeP.mjs');
807
+ const { machineInfo } = await import('./commands-C06J5fW3.mjs');
808
808
  let machineId;
809
809
  for (let i = 1; i < machineArgs.length; i++) {
810
810
  if ((machineArgs[i] === "--machine" || machineArgs[i] === "-m") && i + 1 < machineArgs.length) {
@@ -824,10 +824,10 @@ async function handleMachineCommand() {
824
824
  level = machineArgs[++i];
825
825
  }
826
826
  }
827
- const { machineNotify } = await import('./agentCommands-uNFhhdN1.mjs');
827
+ const { machineNotify } = await import('./agentCommands-WLRw5gAP.mjs');
828
828
  await machineNotify(message, level);
829
829
  } else if (machineSubcommand === "ls") {
830
- const { machineLs } = await import('./commands-B6FEeZeP.mjs');
830
+ const { machineLs } = await import('./commands-C06J5fW3.mjs');
831
831
  let machineId;
832
832
  let showHidden = false;
833
833
  let path;
@@ -2,7 +2,7 @@ import { existsSync, readFileSync } from 'node:fs';
2
2
  import { execSync } from 'node:child_process';
3
3
  import { resolve, join } from 'node:path';
4
4
  import os from 'node:os';
5
- import { l as loadSecurityContextConfig, e as resolveSecurityContext, f as buildSecurityContextFromFlags, m as mergeSecurityContexts, c as connectToHypha } from './run-DsXDjwLW.mjs';
5
+ import { l as loadSecurityContextConfig, e as resolveSecurityContext, f as buildSecurityContextFromFlags, m as mergeSecurityContexts, c as connectToHypha } from './run-Dm7UViwQ.mjs';
6
6
  import 'os';
7
7
  import 'fs/promises';
8
8
  import 'fs';
@@ -1,11 +1,11 @@
1
1
  import { writeFileSync, readFileSync } from 'fs';
2
2
  import { resolve } from 'path';
3
- import { connectAndGetMachine } from './commands-B6FEeZeP.mjs';
3
+ import { connectAndGetMachine } from './commands-C06J5fW3.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-DsXDjwLW.mjs';
8
+ import './run-Dm7UViwQ.mjs';
9
9
  import 'os';
10
10
  import 'fs/promises';
11
11
  import 'url';
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-DsXDjwLW.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-Dm7UViwQ.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.1.79";
2
+ var version = "0.1.80";
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";
@@ -836,11 +836,6 @@ async function registerMachineService(server, machineId, metadata, daemonState,
836
836
  const session = terminalSessions.get(params.sessionId);
837
837
  if (!session) throw new Error(`Terminal session ${params.sessionId} not found`);
838
838
  const scrollback = session.outputBuffer.join("");
839
- if (params.cols && params.rows) {
840
- session.pty.resize(params.cols, params.rows);
841
- session.cols = params.cols;
842
- session.rows = params.rows;
843
- }
844
839
  return { sessionId: session.id, cols: session.cols, rows: session.rows, scrollback, exited: session.exited };
845
840
  },
846
841
  // Machine-level directory listing (read-only, view role)
@@ -2,7 +2,7 @@ import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(im
2
2
  import os from 'node:os';
3
3
  import { join, resolve } from 'node:path';
4
4
  import { mkdirSync, writeFileSync, existsSync, unlinkSync, readFileSync, watch } from 'node:fs';
5
- import { c as connectToHypha, a as registerSessionService } from './run-DsXDjwLW.mjs';
5
+ import { c as connectToHypha, a as registerSessionService } from './run-Dm7UViwQ.mjs';
6
6
  import { createServer } from 'node:http';
7
7
  import { spawn } from 'node:child_process';
8
8
  import { createInterface } from 'node:readline';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svamp-cli",
3
- "version": "0.1.79",
3
+ "version": "0.1.80",
4
4
  "description": "Svamp CLI — AI workspace daemon on Hypha Cloud",
5
5
  "author": "Amun AI AB",
6
6
  "license": "SEE LICENSE IN LICENSE",