@camerontaylor/paseo-cli 0.8.0-fork.1 → 0.8.0-fork.3

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 (120) hide show
  1. package/dist/cli.js +25 -37
  2. package/dist/commands/agent/archive.js +2 -15
  3. package/dist/commands/agent/attach.d.ts +1 -0
  4. package/dist/commands/agent/attach.js +8 -12
  5. package/dist/commands/agent/delete.js +4 -15
  6. package/dist/commands/agent/detach.js +2 -13
  7. package/dist/commands/agent/import.js +2 -16
  8. package/dist/commands/agent/inspect.js +2 -15
  9. package/dist/commands/agent/logs.js +12 -12
  10. package/dist/commands/agent/ls.js +2 -23
  11. package/dist/commands/agent/mode.js +2 -2
  12. package/dist/commands/agent/open.js +2 -8
  13. package/dist/commands/agent/reload.js +2 -15
  14. package/dist/commands/agent/run.js +11 -16
  15. package/dist/commands/agent/send.js +6 -15
  16. package/dist/commands/agent/stop.js +2 -15
  17. package/dist/commands/agent/update.js +2 -15
  18. package/dist/commands/agent/wait.js +4 -15
  19. package/dist/commands/clone.js +2 -8
  20. package/dist/commands/daemon/config.d.ts +3 -0
  21. package/dist/commands/daemon/config.js +102 -0
  22. package/dist/commands/daemon/index.js +20 -52
  23. package/dist/commands/daemon/local-daemon.d.ts +10 -75
  24. package/dist/commands/daemon/local-daemon.js +61 -503
  25. package/dist/commands/daemon/pair.d.ts +3 -8
  26. package/dist/commands/daemon/pair.js +31 -61
  27. package/dist/commands/daemon/reload.d.ts +3 -1
  28. package/dist/commands/daemon/reload.js +10 -2
  29. package/dist/commands/daemon/restart.d.ts +19 -11
  30. package/dist/commands/daemon/restart.js +102 -88
  31. package/dist/commands/daemon/set-password.js +6 -7
  32. package/dist/commands/daemon/start.d.ts +17 -3
  33. package/dist/commands/daemon/start.js +47 -52
  34. package/dist/commands/daemon/status.d.ts +12 -20
  35. package/dist/commands/daemon/status.js +90 -342
  36. package/dist/commands/daemon/stop.d.ts +19 -14
  37. package/dist/commands/daemon/stop.js +53 -55
  38. package/dist/commands/heartbeat/index.js +3 -3
  39. package/dist/commands/hub/connect.d.ts +1 -0
  40. package/dist/commands/hub/connect.js +1 -1
  41. package/dist/commands/hub/daemon-client.d.ts +3 -2
  42. package/dist/commands/hub/daemon-client.js +3 -3
  43. package/dist/commands/hub/disconnect.d.ts +1 -0
  44. package/dist/commands/hub/disconnect.js +1 -1
  45. package/dist/commands/hub/index.js +2 -2
  46. package/dist/commands/hub/init.d.ts +3 -1
  47. package/dist/commands/hub/init.js +13 -12
  48. package/dist/commands/hub/login.d.ts +4 -4
  49. package/dist/commands/hub/login.js +1 -1
  50. package/dist/commands/hub/logout.d.ts +1 -0
  51. package/dist/commands/hub/logout.js +2 -2
  52. package/dist/commands/hub/permissions.d.ts +1 -0
  53. package/dist/commands/hub/permissions.js +2 -2
  54. package/dist/commands/onboard.d.ts +7 -2
  55. package/dist/commands/onboard.js +58 -210
  56. package/dist/commands/open.js +2 -0
  57. package/dist/commands/permit/allow.js +2 -15
  58. package/dist/commands/permit/deny.js +2 -15
  59. package/dist/commands/permit/ls.js +2 -15
  60. package/dist/commands/plugin/index.js +7 -7
  61. package/dist/commands/plugin/shared.d.ts +4 -3
  62. package/dist/commands/plugin/shared.js +8 -8
  63. package/dist/commands/project/create.js +5 -3
  64. package/dist/commands/project/delete.js +4 -2
  65. package/dist/commands/project/ls.js +2 -2
  66. package/dist/commands/project/rename.js +4 -2
  67. package/dist/commands/provider/add.js +2 -2
  68. package/dist/commands/provider/diagnostic.js +1 -1
  69. package/dist/commands/provider/ls.js +2 -30
  70. package/dist/commands/provider/models.js +1 -1
  71. package/dist/commands/provider/rm.js +2 -2
  72. package/dist/commands/schedule/create.js +2 -2
  73. package/dist/commands/schedule/delete.js +1 -1
  74. package/dist/commands/schedule/inspect.js +1 -1
  75. package/dist/commands/schedule/logs.js +1 -1
  76. package/dist/commands/schedule/ls.js +1 -1
  77. package/dist/commands/schedule/pause.js +1 -1
  78. package/dist/commands/schedule/resume.js +1 -1
  79. package/dist/commands/schedule/run-once.js +1 -1
  80. package/dist/commands/schedule/shared.d.ts +3 -1
  81. package/dist/commands/schedule/shared.js +7 -5
  82. package/dist/commands/schedule/update.js +1 -1
  83. package/dist/commands/script/ls.js +1 -1
  84. package/dist/commands/script/shared.d.ts +2 -1
  85. package/dist/commands/script/shared.js +3 -3
  86. package/dist/commands/script/start.js +1 -1
  87. package/dist/commands/script/stop.js +1 -1
  88. package/dist/commands/terminal/capture.d.ts +1 -1
  89. package/dist/commands/terminal/capture.js +2 -3
  90. package/dist/commands/terminal/create.js +1 -1
  91. package/dist/commands/terminal/kill.js +1 -1
  92. package/dist/commands/terminal/ls.js +1 -1
  93. package/dist/commands/terminal/send-keys.d.ts +1 -1
  94. package/dist/commands/terminal/send-keys.js +2 -3
  95. package/dist/commands/terminal/shared.d.ts +2 -1
  96. package/dist/commands/terminal/shared.js +5 -3
  97. package/dist/commands/workspace/archive.d.ts +1 -0
  98. package/dist/commands/workspace/archive.js +4 -2
  99. package/dist/commands/workspace/create.js +4 -2
  100. package/dist/commands/workspace/ls.d.ts +1 -0
  101. package/dist/commands/workspace/ls.js +2 -2
  102. package/dist/commands/workspace/rename.d.ts +1 -0
  103. package/dist/commands/workspace/rename.js +4 -2
  104. package/dist/commands/workspace/setup.d.ts +1 -0
  105. package/dist/commands/workspace/setup.js +2 -2
  106. package/dist/commands/worktree/archive.js +4 -2
  107. package/dist/commands/worktree/create.js +2 -10
  108. package/dist/commands/worktree/ls.d.ts +0 -2
  109. package/dist/commands/worktree/ls.js +4 -30
  110. package/dist/output/with-output.d.ts +2 -0
  111. package/dist/run.js +11 -1
  112. package/dist/utils/client-id.d.ts +1 -1
  113. package/dist/utils/client-id.js +8 -14
  114. package/dist/utils/client.d.ts +16 -21
  115. package/dist/utils/client.js +57 -109
  116. package/dist/utils/command-options.d.ts +1 -0
  117. package/dist/utils/command-options.js +24 -2
  118. package/dist/utils/daemon-target.d.ts +13 -0
  119. package/dist/utils/daemon-target.js +51 -0
  120. package/package.json +8 -4
@@ -1,4 +1,4 @@
1
- import { connectToDaemon, getDaemonHost } from "../../utils/client.js";
1
+ import { connectToDaemon } from "../../utils/client.js";
2
2
  import { isSameOrDescendantPath } from "../../utils/paths.js";
3
3
  /** Schema for stop command output */
4
4
  export const stopSchema = {
@@ -14,7 +14,6 @@ export function addStopOptions(cmd) {
14
14
  .option("--cwd <path>", "Stop all agents in directory");
15
15
  }
16
16
  export async function runStopCommand(id, options, _command) {
17
- const host = getDaemonHost({ host: options.host });
18
17
  // Validate arguments - need either an id, --all, or --cwd
19
18
  if (!id && !options.all && !options.cwd) {
20
19
  const error = {
@@ -24,19 +23,7 @@ export async function runStopCommand(id, options, _command) {
24
23
  };
25
24
  throw error;
26
25
  }
27
- let client;
28
- try {
29
- client = await connectToDaemon({ host: options.host });
30
- }
31
- catch (err) {
32
- const message = err instanceof Error ? err.message : String(err);
33
- const error = {
34
- code: "DAEMON_NOT_RUNNING",
35
- message: `Cannot connect to daemon at ${host}: ${message}`,
36
- details: "Start the daemon with: paseo daemon start",
37
- };
38
- throw error;
39
- }
26
+ const client = await connectToDaemon({ target: options.daemonTarget });
40
27
  try {
41
28
  const fetchPayload = await client.fetchAgents({ filter: { includeArchived: true } });
42
29
  let agents = fetchPayload.entries.map((entry) => entry.agent);
@@ -1,4 +1,4 @@
1
- import { connectToDaemon, getDaemonHost } from "../../utils/client.js";
1
+ import { connectToDaemon } from "../../utils/client.js";
2
2
  /** Schema for update command output */
3
3
  export const updateSchema = {
4
4
  idField: "agentId",
@@ -122,7 +122,6 @@ function parseAgentChanges(options) {
122
122
  };
123
123
  }
124
124
  export async function runUpdateCommand(agentIdArg, options, _command) {
125
- const host = getDaemonHost({ host: options.host });
126
125
  // Validate arguments
127
126
  if (!agentIdArg || agentIdArg.trim().length === 0) {
128
127
  const error = {
@@ -133,19 +132,7 @@ export async function runUpdateCommand(agentIdArg, options, _command) {
133
132
  throw error;
134
133
  }
135
134
  const changes = parseAgentChanges(options);
136
- let client;
137
- try {
138
- client = await connectToDaemon({ host: options.host });
139
- }
140
- catch (err) {
141
- const message = err instanceof Error ? err.message : String(err);
142
- const error = {
143
- code: "DAEMON_NOT_RUNNING",
144
- message: `Cannot connect to daemon at ${host}: ${message}`,
145
- details: "Start the daemon with: paseo daemon start",
146
- };
147
- throw error;
148
- }
135
+ const client = await connectToDaemon({ target: options.daemonTarget });
149
136
  try {
150
137
  const fetchResult = await client.fetchAgent({ agentId: agentIdArg });
151
138
  if (!fetchResult) {
@@ -1,4 +1,4 @@
1
- import { connectToDaemon, getDaemonHost } from "../../utils/client.js";
1
+ import { connectToDaemon } from "../../utils/client.js";
2
2
  import { fetchAgentTimelineItems, formatAgentActivityTranscript } from "./logs.js";
3
3
  import { parseDuration } from "../../utils/duration.js";
4
4
  /** Schema for agent wait output */
@@ -44,6 +44,8 @@ function parseWaitTimeout(timeout) {
44
44
  };
45
45
  }
46
46
  catch (err) {
47
+ if (err && typeof err === "object" && "code" in err)
48
+ throw err;
47
49
  const message = err instanceof Error ? err.message : String(err);
48
50
  throw {
49
51
  code: "INVALID_TIMEOUT",
@@ -94,7 +96,6 @@ export function addWaitOptions(cmd) {
94
96
  .option("--timeout <seconds>", "Maximum wait time (default: no limit)");
95
97
  }
96
98
  export async function runWaitCommand(agentIdArg, options, _command) {
97
- const host = getDaemonHost({ host: options.host });
98
99
  if (!agentIdArg || agentIdArg.trim().length === 0) {
99
100
  throw {
100
101
  code: "MISSING_AGENT_ID",
@@ -103,19 +104,7 @@ export async function runWaitCommand(agentIdArg, options, _command) {
103
104
  };
104
105
  }
105
106
  const { timeoutMs, timeoutLabel } = parseWaitTimeout(options.timeout);
106
- let client;
107
- try {
108
- client = await connectToDaemon({ host: options.host });
109
- }
110
- catch (err) {
111
- const message = err instanceof Error ? err.message : String(err);
112
- const error = {
113
- code: "DAEMON_NOT_RUNNING",
114
- message: `Cannot connect to daemon at ${host}: ${message}`,
115
- details: "Start the daemon with: paseo daemon start",
116
- };
117
- throw error;
118
- }
107
+ const client = await connectToDaemon({ target: options.daemonTarget });
119
108
  try {
120
109
  try {
121
110
  const state = await client.waitForFinish(agentIdArg, timeoutMs);
@@ -1,5 +1,5 @@
1
1
  import { isCompleteGitRemote } from "@camerontaylor/paseo-protocol/git-remote";
2
- import { buildDaemonConnectionCommandError, connectToDaemon } from "../utils/client.js";
2
+ import { connectToDaemon } from "../utils/client.js";
3
3
  export const cloneSchema = {
4
4
  idField: "projectId",
5
5
  columns: [
@@ -20,13 +20,7 @@ export async function runCloneCommand(repo, options, _command) {
20
20
  if (!repoIsCompleteRemote && !options.protocol) {
21
21
  throw cmdError("INVALID_ARGUMENT", "--protocol is required for owner/repo repository names");
22
22
  }
23
- let client;
24
- try {
25
- client = await connectToDaemon({ host: options.host });
26
- }
27
- catch (err) {
28
- throw buildDaemonConnectionCommandError({ host: options.host, error: err });
29
- }
23
+ const client = await connectToDaemon({ target: options.daemonTarget });
30
24
  if (client.getLastServerInfoMessage()?.features?.projectGithubClone !== true) {
31
25
  await client.close().catch(() => { });
32
26
  throw cmdError("UNSUPPORTED_BY_HOST", "This daemon does not support cloning GitHub repos.", "Update the host to a newer Paseo version.");
@@ -0,0 +1,3 @@
1
+ import { Command } from "commander";
2
+ export declare function daemonConfigCommand(): Command;
3
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1,102 @@
1
+ import { addLocalDaemonOptions } from "../../utils/command-options.js";
2
+ import { Command } from "commander";
3
+ import { readDaemonInstance, readPersistedConfig, getPersistedConfigValue, editPersistedConfig, } from "@camerontaylor/paseo-server";
4
+ import { connectToDaemon } from "../../utils/client.js";
5
+ import { withOutput } from "../../output/index.js";
6
+ function redact(value) {
7
+ if (Array.isArray(value))
8
+ return value.map(redact);
9
+ if (!value || typeof value !== "object")
10
+ return value;
11
+ return Object.fromEntries(Object.entries(value).map(([key, item]) => [
12
+ key,
13
+ /password|(?:api|private|access)[_-]?key|token|secret|authorization/i.test(key)
14
+ ? "[redacted]"
15
+ : redact(item),
16
+ ]));
17
+ }
18
+ function result(data) {
19
+ return {
20
+ type: "single",
21
+ data,
22
+ schema: {
23
+ idField: () => "configuration",
24
+ columns: [],
25
+ renderHuman: () => JSON.stringify(data, null, 2),
26
+ },
27
+ };
28
+ }
29
+ function homeOf(options) {
30
+ if (options.daemonTarget.kind !== "instance")
31
+ throw new Error("Configuration edits require --home");
32
+ return options.daemonTarget.home;
33
+ }
34
+ async function applySaved(home, options) {
35
+ const nextCommand = `paseo daemon start --home ${JSON.stringify(home)}`;
36
+ const instance = await readDaemonInstance(home);
37
+ if (!instance?.listen)
38
+ return result({
39
+ action: "saved",
40
+ applied: false,
41
+ message: "Saved; not applied to a running daemon",
42
+ nextCommand,
43
+ });
44
+ let client;
45
+ try {
46
+ client = await connectToDaemon({ target: options.daemonTarget, timeout: 1500 });
47
+ }
48
+ catch {
49
+ return result({
50
+ action: "saved",
51
+ applied: false,
52
+ message: "Saved; not applied to a running daemon",
53
+ nextCommand: `paseo daemon reload --home ${JSON.stringify(home)}`,
54
+ });
55
+ }
56
+ try {
57
+ const reload = await client.reloadDaemonConfig();
58
+ return result({ action: "saved", ...reload });
59
+ }
60
+ catch (error) {
61
+ throw { code: "CONFIG_SAVED_RELOAD_FAILED", message: `Saved; reload failed: ${String(error)}` };
62
+ }
63
+ finally {
64
+ await client.close();
65
+ }
66
+ }
67
+ export function daemonConfigCommand() {
68
+ const config = new Command("config").description("Read or edit persistent local configuration (local operation)");
69
+ addLocalDaemonOptions(config.command("get [path]")).action(withOutput(async (field, options, _command) => {
70
+ const persisted = readPersistedConfig(homeOf(options));
71
+ const value = field ? getPersistedConfigValue(persisted, field) : persisted;
72
+ return result({
73
+ source: "configured",
74
+ path: field ?? null,
75
+ set: value !== undefined,
76
+ value: field && /password|(?:api|private|access)[_-]?key|token|secret|authorization/i.test(field)
77
+ ? "[redacted]"
78
+ : redact(value),
79
+ });
80
+ }));
81
+ addLocalDaemonOptions(config.command("set <path> <value>"))
82
+ .option("--string", "Interpret value literally as a string")
83
+ .action(withOutput(async (field, raw, options, _command) => {
84
+ let value = raw;
85
+ if (!options.string) {
86
+ try {
87
+ value = JSON.parse(raw);
88
+ }
89
+ catch {
90
+ /* Unquoted input is a string. */
91
+ }
92
+ }
93
+ editPersistedConfig(homeOf(options), field, { value });
94
+ return applySaved(homeOf(options), options);
95
+ }));
96
+ addLocalDaemonOptions(config.command("unset <path>")).action(withOutput(async (field, options, _command) => {
97
+ editPersistedConfig(homeOf(options), field, { unset: true });
98
+ return applySaved(homeOf(options), options);
99
+ }));
100
+ return config;
101
+ }
102
+ //# sourceMappingURL=config.js.map
@@ -1,60 +1,28 @@
1
- import { Command, Option } from "commander";
2
- import { startCommand } from "./start.js";
3
- import { runStatusCommand } from "./status.js";
4
- import { runStopCommand } from "./stop.js";
5
- import { runRestartCommand } from "./restart.js";
1
+ import { Command } from "commander";
2
+ import { startCommand, daemonRunCommand } from "./start.js";
3
+ import { daemonStatusCommand } from "./status.js";
4
+ import { daemonStopCommand } from "./stop.js";
5
+ import { daemonRestartCommand } from "./restart.js";
6
6
  import { runSetPasswordCommand } from "./set-password.js";
7
7
  import { pairCommand } from "./pair.js";
8
- import { runDaemonReloadCommand } from "./reload.js";
8
+ import { daemonReloadCommand } from "./reload.js";
9
+ import { daemonConfigCommand } from "./config.js";
9
10
  import { withOutput } from "../../output/index.js";
10
- import { addJsonAndDaemonHostOptions, addJsonOption } from "../../utils/command-options.js";
11
- function resolveHostnamesOption(hostnames, allowedHosts) {
12
- if (typeof hostnames === "string")
13
- return hostnames;
14
- if (typeof allowedHosts === "string")
15
- return allowedHosts;
16
- return undefined;
17
- }
11
+ import { addJsonOption, addLocalDaemonOptions } from "../../utils/command-options.js";
18
12
  export function createDaemonCommand() {
19
13
  const daemon = new Command("daemon").description("Manage the Paseo daemon");
20
- daemon.addCommand(startCommand());
21
- daemon.addCommand(pairCommand());
22
- addJsonAndDaemonHostOptions(daemon.command("reload").description("Reload config.json without restarting the daemon")).action(withOutput(runDaemonReloadCommand));
23
- addJsonOption(daemon.command("status").description("Show local daemon status"))
24
- .option("--home <path>", "Paseo home directory (default: ~/.paseo)")
25
- .action(withOutput(runStatusCommand));
26
- addJsonOption(daemon.command("stop").description("Stop the local daemon"))
27
- .option("--home <path>", "Paseo home directory (default: ~/.paseo)")
28
- .option("--timeout <seconds>", "Wait timeout before failing (default: 15)")
29
- .option("--force", "Send SIGKILL if graceful stop times out")
30
- .option("--kill-timeout <seconds>", "Wait after SIGKILL before failing (default: 3)")
31
- .action(withOutput(runStopCommand));
32
- addJsonOption(daemon.command("restart").description("Restart the local daemon"))
33
- .option("--home <path>", "Paseo home directory (default: ~/.paseo)")
34
- .option("--timeout <seconds>", "Wait timeout before force step (default: 15)")
35
- .option("--force", "Send SIGKILL if graceful stop times out")
36
- .option("--listen <listen>", "Listen target for restarted daemon (host:port, port, or unix socket)")
37
- .option("--port <port>", "Port for restarted daemon listen target")
38
- .option("--relay", "Enable relay on restarted daemon")
39
- .option("--no-relay", "Disable relay on restarted daemon")
40
- .option("--no-mcp", "Disable Agent MCP on restarted daemon")
41
- .option("--no-inject-mcp", "Disable auto-injecting the Paseo MCP into created agents")
42
- .option("--web-ui", "Enable the bundled daemon web UI on restarted daemon")
43
- .option("--no-web-ui", "Disable the bundled daemon web UI on restarted daemon")
44
- .option("--hostnames <hosts>", 'Daemon hostnames (comma-separated, e.g. "myhost,.example.com" or "true" for any)')
45
- .addOption(new Option("--allowed-hosts <hosts>").hideHelp())
46
- .action(withOutput((...args) => {
47
- const [options, command] = args.slice(-2);
48
- return runRestartCommand({
49
- ...options,
50
- hostnames: resolveHostnamesOption(options.hostnames, options.allowedHosts),
51
- }, command);
52
- }));
53
- addJsonOption(daemon
54
- .command("set-password")
55
- .description("Prompt for and save a hashed daemon password to config.json"))
56
- .option("--home <path>", "Paseo home directory (default: ~/.paseo)")
57
- .action(withOutput(runSetPasswordCommand));
14
+ for (const command of [
15
+ startCommand(),
16
+ daemonRunCommand(),
17
+ daemonStatusCommand(),
18
+ daemonStopCommand(),
19
+ daemonRestartCommand(),
20
+ daemonReloadCommand(),
21
+ pairCommand(),
22
+ daemonConfigCommand(),
23
+ ])
24
+ daemon.addCommand(command);
25
+ addJsonOption(addLocalDaemonOptions(daemon.command("set-password").description("Save a hashed daemon password (local operation)"))).action(withOutput(runSetPasswordCommand));
58
26
  return daemon;
59
27
  }
60
28
  //# sourceMappingURL=index.js.map
@@ -1,78 +1,13 @@
1
- import { spawnSync, type ChildProcess } from "node:child_process";
2
- import { spawnProcess } from "@camerontaylor/paseo-server";
3
- export interface DaemonStartOptions {
4
- port?: string;
5
- listen?: string;
6
- home?: string;
7
- foreground?: boolean;
8
- relay?: boolean;
9
- relayUseTls?: boolean;
10
- mcp?: boolean;
11
- injectMcp?: boolean;
12
- webUi?: boolean;
13
- hostnames?: string;
14
- }
15
- export interface LocalDaemonPidInfo {
16
- pid: number;
17
- startedAt?: string;
18
- hostname?: string;
19
- uid?: number;
20
- listen?: string;
21
- desktopManaged?: boolean;
22
- }
23
- export interface LocalDaemonState {
1
+ import { Command } from "commander";
2
+ export declare function launchLocalDaemon(options: {
24
3
  home: string;
25
- listen: string;
26
- relayEnabled: boolean;
27
- relayEndpoint: string;
28
- relayUseTls: boolean;
29
- relayPublicUseTls: boolean;
30
- logPath: string;
31
- pidPath: string;
32
- pidInfo: LocalDaemonPidInfo | null;
33
- running: boolean;
34
- stalePidFile: boolean;
35
- }
36
- export interface DetachedStartResult {
37
- pid: number | null;
38
- logPath: string;
39
- }
40
- export interface StopLocalDaemonOptions {
41
- home?: string;
42
4
  timeoutMs?: number;
43
- killTimeoutMs?: number;
44
- force?: boolean;
45
- }
46
- export interface StopLocalDaemonResult {
47
- action: "stopped" | "not_running";
48
- home: string;
49
- pid: number | null;
50
- forced: boolean;
51
- usedLifecycleRpc: boolean;
52
- reason: "not_running" | "lifecycle_shutdown_rpc" | "owner_pid_signal" | "owner_pid_sigkill";
53
- message: string;
54
- }
55
- export interface DetachedDaemonProcess extends Pick<ChildProcess, "once" | "pid" | "unref"> {
56
- }
57
- export interface ForegroundDaemonProcessResult {
58
- status: number | null;
59
- error?: Error;
60
- }
61
- export interface DaemonLaunchRuntime {
62
- resolveRunnerEntry(): string;
63
- resolveHome(env: NodeJS.ProcessEnv): string;
64
- spawnDetached(command: string, args: string[], options: Parameters<typeof spawnProcess>[2]): DetachedDaemonProcess;
65
- spawnForeground(command: string, args: string[], options: Parameters<typeof spawnSync>[2]): ForegroundDaemonProcessResult;
66
- }
67
- export declare const DEFAULT_STOP_TIMEOUT_MS = 15000;
68
- export declare const DEFAULT_KILL_TIMEOUT_MS = 3000;
69
- export declare function resolveLocalPaseoHome(home?: string): string;
70
- export declare function resolveTcpHostFromListen(listen: string): string | null;
71
- export declare function resolveLocalDaemonState(options?: {
72
- home?: string;
73
- }): LocalDaemonState;
74
- export declare function tailDaemonLog(home?: string, lines?: number): string | null;
75
- export declare function startLocalDaemonDetached(options: DaemonStartOptions, runtime?: DaemonLaunchRuntime): Promise<DetachedStartResult>;
76
- export declare function startLocalDaemonForeground(options: DaemonStartOptions, runtime?: DaemonLaunchRuntime): number;
77
- export declare function stopLocalDaemon(options?: StopLocalDaemonOptions): Promise<StopLocalDaemonResult>;
5
+ foreground?: boolean;
6
+ }): Promise<{
7
+ instance: import("@camerontaylor/paseo-server").DaemonInstance;
8
+ spawned: boolean;
9
+ exitCode?: number;
10
+ }>;
11
+ export declare function parseTimeoutMs(raw: unknown, fallback?: number): number;
12
+ export declare function rejectRemovedLaunchFlags(command: Command): Command;
78
13
  //# sourceMappingURL=local-daemon.d.ts.map