@agentproto/cli 0.1.0-alpha.9 → 0.1.0

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/README.md CHANGED
@@ -82,7 +82,7 @@ agentproto config show # dump full conf
82
82
  agentproto config path # print the file path
83
83
  agentproto config get daemon.port # read one key
84
84
  agentproto config set daemon.port 18791 # number auto-detected
85
- agentproto config set daemon.workspace ~/code/agentik-studio
85
+ agentproto config set daemon.workspace ~/code/my-app
86
86
  agentproto config set daemon.allowedOrigins https://guilde.work,https://app.example.com
87
87
  agentproto config set tunnel.host wss://guilde.work/api/v1/agentproto/tunnel
88
88
  agentproto config set tunnel.autoconnect true # --connect implied at next serve
@@ -179,14 +179,14 @@ SESSIONS (3) │ DETAIL
179
179
  PTY shell-main running 4m │ name claude-tui
180
180
  hermes-bg exited 1h │ kind terminal (pty)
181
181
  │ status running
182
- │ workspace agentik-studio
182
+ │ workspace my-app
183
183
  │ command claude
184
184
  │ pid 12345
185
185
  │ started 12m ago
186
186
  │ last out 3s ago
187
187
 
188
188
  │ Enter to attach
189
- ─ events 20:42:01 boot · agentik-studio · 20:43:11 spawn sess_a3f8c1b2 ──────────────
189
+ ─ events 20:42:01 boot · my-app · 20:43:11 spawn sess_a3f8c1b2 ──────────────────────
190
190
  ↑/↓ select · Enter attach · K kill · d forget · r refresh · q quit
191
191
  ```
192
192
 
@@ -253,7 +253,7 @@ agentproto sessions --attach claude-tui
253
253
  agentproto sessions mirror claude-tui
254
254
 
255
255
  # Spawn an agent CLI (ACP, structured events)
256
- agentproto sessions start claude-code --workspace agentik-studio --attach
256
+ agentproto sessions start claude-code --workspace my-app --attach
257
257
  agentproto sessions start hermes --label "ops on-call"
258
258
 
259
259
  # Spawn a real PTY (raw bytes, ANSI escapes, alt-screen apps)
package/dist/cli.mjs CHANGED
@@ -8507,12 +8507,34 @@ async function runServe(args) {
8507
8507
  port: { type: "string", short: "p" },
8508
8508
  bind: { type: "string", short: "b" },
8509
8509
  "allow-origin": { type: "string", multiple: true },
8510
- interactive: { type: "boolean", short: "i" }
8510
+ interactive: { type: "boolean", short: "i" },
8511
+ profile: { type: "string" }
8511
8512
  }
8512
8513
  });
8513
8514
  const cfg = await loadConfig();
8514
- const cfgDaemon = cfg.daemon ?? {};
8515
- const cfgTunnel = cfg.tunnel ?? {};
8515
+ const profileName = values.profile ?? cfg.activeProfile;
8516
+ const profile = profileName ? cfg.profiles?.[profileName] : void 0;
8517
+ if (values.profile && !profile) {
8518
+ process.stderr.write(
8519
+ `agentproto serve: profile "${values.profile}" not found in ~/.agentproto/config.json. Available: ${cfg.profiles ? Object.keys(cfg.profiles).join(", ") || "(none)" : "(no profiles block)"}
8520
+ `
8521
+ );
8522
+ return 2;
8523
+ }
8524
+ if (cfg.activeProfile && !values.profile && !profile) {
8525
+ process.stderr.write(
8526
+ `agentproto serve: \u26A0 activeProfile="${cfg.activeProfile}" but no matching entry in profiles[]; falling back to top-level config.
8527
+ `
8528
+ );
8529
+ }
8530
+ if (profile && process.stdout.isTTY) {
8531
+ process.stdout.write(
8532
+ `agentproto serve: using profile "${profileName}"
8533
+ `
8534
+ );
8535
+ }
8536
+ const cfgDaemon = { ...cfg.daemon ?? {}, ...profile?.daemon ?? {} };
8537
+ const cfgTunnel = { ...cfg.tunnel ?? {}, ...profile?.tunnel ?? {} };
8516
8538
  const workspace = resolve(
8517
8539
  values.workspace ?? cfgDaemon.workspace ?? process.cwd()
8518
8540
  );
@@ -8541,7 +8563,7 @@ async function runServe(args) {
8541
8563
  }
8542
8564
  const label = values.label ?? cfgDaemon.label ?? `${userInfo().username}@${hostname()}`;
8543
8565
  const connectFlag = values.connect ?? (cfgTunnel.autoconnect && cfgTunnel.host ? cfgTunnel.host : void 0);
8544
- let token = values.token ?? process.env.AGENTPROTO_TOKEN;
8566
+ let token = values.token ?? process.env.AGENTPROTO_TOKEN ?? cfgTunnel.token;
8545
8567
  if (!token && connectFlag) {
8546
8568
  const cred = await readHost(connectFlag);
8547
8569
  if (cred) {
@@ -11073,7 +11095,8 @@ Usage:
11073
11095
  agentproto setup <slug> [--force] [--dry-run] [--only <stepId>...]
11074
11096
  agentproto run <slug> [--cwd <dir>] [--prompt <text>] [--resume <session-id>]
11075
11097
  agentproto run-swarm --manifest <path> [--once] [--interval <ms|Ns>] [--verbose]
11076
- agentproto serve [--workspace <dir>] [--port <n>] [--bind <ip>]
11098
+ agentproto serve [--profile <name>]
11099
+ [--workspace <dir>] [--port <n>] [--bind <ip>]
11077
11100
  [--connect <url> [--token <jwt>] [--label <name>]]
11078
11101
  [--allow-origin <url> \u2026] [--interactive | -i]
11079
11102
  agentproto workspace <add|list|remove|use> [args]
@@ -11098,7 +11121,7 @@ Examples:
11098
11121
  agentproto workspace add ~/code/my-project --slug my-project
11099
11122
  agentproto workspace list
11100
11123
  agentproto serve --connect wss://guilde.work/api/v1/agentproto/tunnel
11101
- agentproto sessions start claude-code --workspace agentik-studio --attach
11124
+ agentproto sessions start claude-code --workspace my-app --attach
11102
11125
  agentproto sessions terminal --name claude-tui --attach -- claude
11103
11126
  agentproto sessions stop claude-tui
11104
11127
  agentproto config set daemon.port 18791