@intentic/local-agent 1.231.0 → 1.233.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 +56 -19
- package/dist/autostart.d.ts +5 -1
- package/dist/autostart.d.ts.map +1 -1
- package/dist/autostart.js +18 -8
- package/dist/autostart.js.map +1 -1
- package/dist/detached.d.ts +2 -1
- package/dist/detached.d.ts.map +1 -1
- package/dist/detached.js +57 -4
- package/dist/detached.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/launcher.d.ts +3 -0
- package/dist/launcher.d.ts.map +1 -1
- package/dist/launcher.js +17 -0
- package/dist/launcher.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,9 +6,9 @@ The plumbing every intentic CLI that lives on a **user's own computer** needs, a
|
|
|
6
6
|
~/.intentic/<name>/ agentHome(name) — state dir + config.json
|
|
7
7
|
config.json writeSecretFile() — 0700 dir, 0600 file
|
|
8
8
|
<agent>.log spawnDetached() — the loop's output has nowhere else to go
|
|
9
|
-
<agent>.pid livePid() — find the loop again
|
|
9
|
+
<agent>.pid livePid() — find the loop again, pid + the boot it belongs to
|
|
10
10
|
|
|
11
|
-
HKCU\…\Run registerAutostart() — Windows, per-user, no elevation
|
|
11
|
+
HKCU\…\Run registerAutostart() — Windows, per-user, no elevation, through the launcher stub
|
|
12
12
|
~/Library/LaunchAgents/ registerAutostart() — macOS, opt-in per agent
|
|
13
13
|
~/.config/autostart/ registerAutostart() — Linux desktop session
|
|
14
14
|
|
|
@@ -17,18 +17,18 @@ stdout createUi(process) — the one renderer every age
|
|
|
17
17
|
|
|
18
18
|
## Why it exists
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
Two agents ship to a user's machine and have nothing in common except how they are **installed** and how they
|
|
21
21
|
**stay alive**:
|
|
22
22
|
|
|
23
23
|
| | what it does | uses |
|
|
24
24
|
| --- | --- | --- |
|
|
25
|
-
| [`@intentic/
|
|
26
|
-
| [`@intentic/sync`](../../_sandbox/sync) | mirrors files and ports between machine and sandbox | home, launcher, autostart, detached, ui |
|
|
25
|
+
| [`@intentic/machine`](../../_computers/machine) | lets the sandbox's agent work on this computer, and mirrors files and ports between the two | home, launcher, autostart, detached, ui |
|
|
27
26
|
| [`@intentic/acp-bridge`](../../_sandbox/acp-bridge) | lets an editor talk to the sandbox | home |
|
|
28
27
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
only one of them. It already
|
|
28
|
+
The machine agent's two halves (and the standalone host/sync agents they used to be) were written months apart,
|
|
29
|
+
and each copy of that plumbing was made from the last one: a shape with a known ending. The second copy is a
|
|
30
|
+
snapshot of the first on the day it was taken, and every fix after that lands in only one of them. It already
|
|
31
|
+
had:
|
|
32
32
|
|
|
33
33
|
- **sync wrote its token file world-readable.** Its config module was copied from host's *before* the 0600 floor
|
|
34
34
|
was added there, and nothing afterwards compared the two.
|
|
@@ -52,27 +52,63 @@ its old permissions forever.
|
|
|
52
52
|
|
|
53
53
|
**`launcher.ts`**: `cliLauncher(cliName)` answers how to re-invoke this CLI. The subtlety is the compiled
|
|
54
54
|
binary: `bun build --compile` reports an `argv[1]` inside its own virtual filesystem and re-injects it on every
|
|
55
|
-
launch, so passing it again shifts the command to `argv[2]` where the parser never looks.
|
|
55
|
+
launch, so passing it again shifts the command to `argv[2]` where the parser never looks. `windowsLaunchStub()`
|
|
56
|
+
finds the other half of a Windows install, [`intentic-launch.exe`](../win-launcher), sitting next to the agent's
|
|
57
|
+
own executable.
|
|
56
58
|
|
|
57
59
|
**`autostart.ts`**: `registerAutostart(spec, launcher, log)` against an `AutostartSpec` the agent declares.
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
60
|
+
launchd and the desktop session, which supervise what they start, get the **foreground** command. So does
|
|
61
|
+
Windows, but through the stub: `intentic-launch.exe --log <log> -- <agent> <foreground args>`. `launchAgent` is
|
|
62
|
+
optional: an agent that has not been exercised on macOS says so and gets a note, rather than a file macOS never
|
|
63
|
+
reads.
|
|
64
|
+
|
|
65
|
+
Windows earns that indirection. Explorer starts a Run entry in the interactive session, and the loader gives
|
|
66
|
+
every console-subsystem program a console — which on Windows 11, where the default console host is Windows
|
|
67
|
+
Terminal, is a terminal window on the desktop. The entry used to name the agent's own **detached** command,
|
|
68
|
+
which spawns the loop and exits, so what a user saw at every single boot was a black window for one to two
|
|
69
|
+
seconds. Nothing softer works: `powershell -WindowStyle Hidden` hides the console *its* host owns while the
|
|
70
|
+
window belongs to WindowsTerminal.exe, and a Task Scheduler logon task maps a window like anything else. Only a
|
|
71
|
+
program whose PE subsystem is GUI never gets a console, which is the whole of what the stub is. `detachedArgs`
|
|
72
|
+
remains the fallback for an install with no stub beside it (a developer running `node dist/cli.js`), and
|
|
73
|
+
registration says out loud that a window will flash.
|
|
74
|
+
|
|
75
|
+
**`detached.ts`**: `spawnDetached`, `livePid`, `pidFileBody`, `isProcessAlive`. On POSIX the loop is spawned
|
|
76
|
+
`detached` for its own session; on Windows because without it the loop is torn down the moment its parent
|
|
77
|
+
exits — measured on the compiled binary, and the reason "connected in the background (pid N)" was a lie there
|
|
78
|
+
for every release that passed `windowsHide` instead. The two cannot be combined to get both properties
|
|
67
79
|
(`CREATE_NO_WINDOW` is ignored alongside `DETACHED_PROCESS`), so a detached loop on Windows has no console at
|
|
68
80
|
all, and Windows hands a console child of a console-less process a new console *with a window*. That is why
|
|
69
81
|
every spawn inside a loop (git and ssh in sync's bridge, docker and PowerShell in host's tools) passes
|
|
70
82
|
`windowsHide` itself; the flag applies whether or not the parent has a console, where inheritance did not.
|
|
71
83
|
|
|
84
|
+
Where the stub is installed, `spawnDetached` goes through it on Windows and the bargain improves: the loop gets
|
|
85
|
+
`CREATE_NO_WINDOW`, so it has a console of its own with **no window on it**, and every console child inherits
|
|
86
|
+
that console instead of being handed a fresh one. The per-spawn `windowsHide` stays — it is what covers a loop
|
|
87
|
+
started any other way — but it stops being the only thing between a user and a black window. The stub prints
|
|
88
|
+
the loop's pid on its stdout, because its own pid belongs to a process that has already exited by the time the
|
|
89
|
+
settle check below would probe it.
|
|
90
|
+
|
|
72
91
|
`spawnDetached` also answers only once the loop has **survived** a short settle window, and throws naming its log
|
|
73
92
|
otherwise. A pid proves the OS created a process; every caller turns it straight into a sentence promising the
|
|
74
93
|
user their machine is now doing something.
|
|
75
94
|
|
|
95
|
+
A pidfile lives beside the config, so it **outlives the boot that wrote it**, while the number in it means
|
|
96
|
+
nothing outside that boot's process table: pids restart low and are handed out in roughly the same order every
|
|
97
|
+
time, so a loop's own pid from yesterday is somebody else's transient process this morning. So `pidFileBody`
|
|
98
|
+
writes the pid *and* a stamp naming the boot, and `livePid` ignores any record from a different one without
|
|
99
|
+
probing it. On Linux the stamp is `/proc/sys/kernel/random/boot_id`, exact and unmoved by the clock; elsewhere
|
|
100
|
+
it is the boot's epoch by subtraction from the uptime, which libuv takes from `GetTickCount64` on Windows and
|
|
101
|
+
`kern.boottime` on macOS — both keep counting across sleep, so a laptop that suspends goes on answering the same
|
|
102
|
+
boot. That derived form is compared with a two-minute tolerance, because it is anchored to `Date.now()` and a
|
|
103
|
+
stepped clock would otherwise read as a new boot; a false *mismatch* is the expensive direction, since it lets a
|
|
104
|
+
second loop start on top of a live one.
|
|
105
|
+
|
|
106
|
+
The cost of not doing this was measured: a machine bugchecked in standby, nothing removed the sync watcher's
|
|
107
|
+
pidfile, and on the next boot the watcher probed the pid it used to hold, found an unrelated early-boot process
|
|
108
|
+
wearing it, and refused to start. Refusing is deliberate and so exits 0 — a supervisor must not restart a
|
|
109
|
+
watcher into refusing again every `RestartSec` — which is precisely why `Restart=on-failure` never fired and
|
|
110
|
+
desktop file sync stayed off until somebody went looking.
|
|
111
|
+
|
|
76
112
|
**`ui.ts`**: `createUi(process)` is the whole of what an agent writes to a person, and the TypeScript twin of
|
|
77
113
|
`ic`'s `_sandbox/ic/src/ui.rs`. One question decides everything: is stdout a terminal. A **pipe** gets the
|
|
78
114
|
`intentic: [phase] message` marker stream and nothing else, because the desktop app parses it into a progress
|
|
@@ -99,5 +135,6 @@ business: which is why host's scopes and sync's Mutagen sessions are nowhere nea
|
|
|
99
135
|
- [src/home.ts](src/home.ts): the `~/.intentic/<agent>` directory and its 0600 floor.
|
|
100
136
|
- [src/autostart.ts](src/autostart.ts): login autostart, per platform.
|
|
101
137
|
- [src/detached.ts](src/detached.ts): the background loop, and surviving a closed terminal.
|
|
102
|
-
- [src/launcher.ts](src/launcher.ts): `cliLauncher()
|
|
138
|
+
- [src/launcher.ts](src/launcher.ts): `cliLauncher()` and the Windows launcher stub, including the
|
|
139
|
+
compiled-binary argv case.
|
|
103
140
|
- [src/ui.ts](src/ui.ts), the renderer: the pipe/terminal/nested split, the checklist, the ranked ending.
|
package/dist/autostart.d.ts
CHANGED
|
@@ -14,8 +14,12 @@ export interface AutostartSpec {
|
|
|
14
14
|
readonly foregroundArgs: readonly string[];
|
|
15
15
|
readonly failureNote: (reason: string) => string;
|
|
16
16
|
}
|
|
17
|
-
export declare const windowsRunAddArgs: (spec: AutostartSpec, launcher: CliLauncher) => string[];
|
|
17
|
+
export declare const windowsRunAddArgs: (spec: AutostartSpec, launcher: CliLauncher, stub?: string) => string[];
|
|
18
18
|
export declare const windowsRunDeleteArgs: (spec: AutostartSpec) => string[];
|
|
19
|
+
export declare const windowsRunValueAddArgs: (name: string, commandLine: string) => string[];
|
|
20
|
+
export declare const windowsRunValueDeleteArgs: (name: string) => string[];
|
|
21
|
+
export declare const setWindowsRunValue: (name: string, commandLine: string) => void;
|
|
22
|
+
export declare const clearWindowsRunValue: (name: string) => void;
|
|
19
23
|
export declare const systemdUserUnit: (spec: AutostartSpec, launcher: CliLauncher) => string;
|
|
20
24
|
export declare const linuxDesktopEntry: (spec: AutostartSpec, launcher: CliLauncher) => string;
|
|
21
25
|
export declare const macLaunchAgentXml: (spec: AutostartSpec, agent: LaunchAgentSpec, launcher: CliLauncher) => string;
|
package/dist/autostart.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"autostart.d.ts","sourceRoot":"","sources":["../src/autostart.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,WAAW,
|
|
1
|
+
{"version":3,"file":"autostart.d.ts","sourceRoot":"","sources":["../src/autostart.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,WAAW,EAA0E,MAAM,eAAe,CAAC;AACzH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAkCrC,MAAM,WAAW,eAAe;IAE5B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,aAAa;IAG1B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAOpB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAGzB,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IAEjC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAEhC,QAAQ,CAAC,WAAW,CAAC,EAAE,eAAe,CAAC;IAavC,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IACzC,QAAQ,CAAC,cAAc,EAAE,SAAS,MAAM,EAAE,CAAC;IAE3C,QAAQ,CAAC,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC;CACpD;AA0CD,eAAO,MAAM,iBAAiB,SAAU,aAAa,YAAY,WAAW,SAAS,MAAM,KAAG,MAAM,EAM/F,CAAC;AAEN,eAAO,MAAM,oBAAoB,SAAU,aAAa,KAAG,MAAM,EAAqD,CAAC;AAOvH,eAAO,MAAM,sBAAsB,SAAU,MAAM,eAAe,MAAM,KAAG,MAAM,EAUhF,CAAC;AAEF,eAAO,MAAM,yBAAyB,SAAU,MAAM,KAAG,MAAM,EAAmD,CAAC;AAGnH,eAAO,MAAM,kBAAkB,SAAU,MAAM,eAAe,MAAM,KAAG,IAAqE,CAAC;AAI7I,eAAO,MAAM,oBAAoB,SAAU,MAAM,KAAG,IAEnD,CAAC;AAuEF,eAAO,MAAM,eAAe,SAAU,aAAa,YAAY,WAAW,KAAG,MAmB5E,CAAC;AAwBF,eAAO,MAAM,iBAAiB,SAAU,aAAa,YAAY,WAAW,KAAG,MAO9E,CAAC;AAIF,eAAO,MAAM,iBAAiB,SAAU,aAAa,SAAS,eAAe,YAAY,WAAW,KAAG,MAetG,CAAC;AA2CF,eAAO,MAAM,iBAAiB,SAAgB,aAAa,YAAY,WAAW,OAAO,GAAG,KAAG,OAAO,CAAC,OAAO,CAkC7G,CAAC;AAGF,eAAO,MAAM,mBAAmB,SAAgB,aAAa,OAAO,GAAG,KAAG,OAAO,CAAC,IAAI,CA4BrF,CAAC"}
|
package/dist/autostart.js
CHANGED
|
@@ -2,7 +2,7 @@ import { spawnSync } from "node:child_process";
|
|
|
2
2
|
import { mkdir, rm, writeFile } from "node:fs/promises";
|
|
3
3
|
import { homedir } from "node:os";
|
|
4
4
|
import { basename, dirname, join } from "node:path";
|
|
5
|
-
import { quotedCommandLine } from "./launcher.js";
|
|
5
|
+
import { quotedCommandLine, stubCommand, WINDOWS_LAUNCH_STUB, windowsLaunchStub } from "./launcher.js";
|
|
6
6
|
const WINDOWS_RUN_KEY = "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Run";
|
|
7
7
|
const linuxDesktopPath = (spec) => join(homedir(), ".config", "autostart", `${spec.id}.desktop`);
|
|
8
8
|
const macPlistPath = (agent) => join(homedir(), "Library", "LaunchAgents", `${agent.label}.plist`);
|
|
@@ -11,7 +11,7 @@ const systemdUnitPath = (spec) => join(homedir(), ".config", "systemd", "user",
|
|
|
11
11
|
const regExe = () => join(process.env["SystemRoot"] ?? "C:\\Windows", "System32", "reg.exe");
|
|
12
12
|
const reason = (error) => (error instanceof Error ? error.message : String(error));
|
|
13
13
|
const register = (command, args) => {
|
|
14
|
-
const result = spawnSync(command, args, { encoding: "utf8" });
|
|
14
|
+
const result = spawnSync(command, args, { encoding: "utf8", windowsHide: true });
|
|
15
15
|
if (result.error !== undefined) {
|
|
16
16
|
throw result.error;
|
|
17
17
|
}
|
|
@@ -20,18 +20,24 @@ const register = (command, args) => {
|
|
|
20
20
|
throw new Error(said === "" ? `${basename(command)} exited ${result.status}` : said);
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
|
-
export const windowsRunAddArgs = (spec, launcher) => [
|
|
23
|
+
export const windowsRunAddArgs = (spec, launcher, stub) => windowsRunValueAddArgs(spec.windowsRunValue, quotedCommandLine(stub === undefined ? [...launcher, ...spec.detachedArgs] : stubCommand(stub, spec.logPath, [...launcher, ...spec.foregroundArgs])));
|
|
24
|
+
export const windowsRunDeleteArgs = (spec) => windowsRunValueDeleteArgs(spec.windowsRunValue);
|
|
25
|
+
export const windowsRunValueAddArgs = (name, commandLine) => [
|
|
24
26
|
"add",
|
|
25
27
|
WINDOWS_RUN_KEY,
|
|
26
28
|
"/v",
|
|
27
|
-
|
|
29
|
+
name,
|
|
28
30
|
"/t",
|
|
29
31
|
"REG_SZ",
|
|
30
32
|
"/d",
|
|
31
|
-
|
|
33
|
+
commandLine,
|
|
32
34
|
"/f",
|
|
33
35
|
];
|
|
34
|
-
export const
|
|
36
|
+
export const windowsRunValueDeleteArgs = (name) => ["delete", WINDOWS_RUN_KEY, "/v", name, "/f"];
|
|
37
|
+
export const setWindowsRunValue = (name, commandLine) => register(regExe(), windowsRunValueAddArgs(name, commandLine));
|
|
38
|
+
export const clearWindowsRunValue = (name) => {
|
|
39
|
+
spawnSync(regExe(), windowsRunValueDeleteArgs(name), { stdio: "ignore", windowsHide: true });
|
|
40
|
+
};
|
|
35
41
|
const SYSTEMD_LIVE_STATES = new Set(["running", "degraded", "starting", "maintenance", "stopping", "initializing"]);
|
|
36
42
|
const systemdUserAvailable = () => {
|
|
37
43
|
const result = spawnSync("systemctl", ["--user", "is-system-running"], { encoding: "utf8" });
|
|
@@ -127,7 +133,11 @@ export const registerAutostart = async (spec, launcher, log) => {
|
|
|
127
133
|
return await registerMac(spec, spec.launchAgent, launcher);
|
|
128
134
|
}
|
|
129
135
|
if (process.platform === "win32") {
|
|
130
|
-
|
|
136
|
+
const stub = windowsLaunchStub(launcher);
|
|
137
|
+
if (stub === undefined) {
|
|
138
|
+
log(`note: ${WINDOWS_LAUNCH_STUB} isn't installed beside this agent, so ${spec.id} will start at login through a console window that flashes on the desktop. Re-run the install command from the capability card to get it.`);
|
|
139
|
+
}
|
|
140
|
+
register(regExe(), windowsRunAddArgs(spec, launcher, stub));
|
|
131
141
|
return false;
|
|
132
142
|
}
|
|
133
143
|
if (process.platform === "linux") {
|
|
@@ -154,7 +164,7 @@ export const unregisterAutostart = async (spec, log) => {
|
|
|
154
164
|
return;
|
|
155
165
|
}
|
|
156
166
|
if (process.platform === "win32") {
|
|
157
|
-
|
|
167
|
+
clearWindowsRunValue(spec.windowsRunValue);
|
|
158
168
|
return;
|
|
159
169
|
}
|
|
160
170
|
spawnSync("systemctl", ["--user", "disable", "--now", systemdUnitName(spec)], { stdio: "ignore" });
|
package/dist/autostart.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"autostart.js","sourceRoot":"","sources":["../src/autostart.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAoB,iBAAiB,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"autostart.js","sourceRoot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
|
package/dist/detached.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type CliLauncher } from "./launcher.js";
|
|
2
2
|
export declare const isProcessAlive: (pid: number) => boolean;
|
|
3
|
+
export declare const pidFileBody: (pid?: number) => Promise<string>;
|
|
3
4
|
export declare const livePid: (pidPath: string) => Promise<number | undefined>;
|
|
4
5
|
export declare const spawnDetached: (logPath: string, launcher: CliLauncher, args: readonly string[]) => Promise<number>;
|
|
5
6
|
//# sourceMappingURL=detached.d.ts.map
|
package/dist/detached.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"detached.d.ts","sourceRoot":"","sources":["../src/detached.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"detached.d.ts","sourceRoot":"","sources":["../src/detached.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,WAAW,EAAkC,MAAM,eAAe,CAAC;AAYjF,eAAO,MAAM,cAAc,QAAS,MAAM,KAAG,OAO5C,CAAC;AAiDF,eAAO,MAAM,WAAW,SAAe,MAAM,KAAiB,OAAO,CAAC,MAAM,CAAkC,CAAC;AAK/G,eAAO,MAAM,OAAO,YAAmB,MAAM,KAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAUzE,CAAC;AAmGF,eAAO,MAAM,aAAa,YAAmB,MAAM,YAAY,WAAW,QAAQ,SAAS,MAAM,EAAE,KAAG,OAAO,CAAC,MAAM,CAUnH,CAAC"}
|
package/dist/detached.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { spawn } from "node:child_process";
|
|
2
2
|
import { openSync } from "node:fs";
|
|
3
3
|
import { readFile } from "node:fs/promises";
|
|
4
|
+
import { uptime } from "node:os";
|
|
5
|
+
import { basename } from "node:path";
|
|
4
6
|
import { setTimeout } from "node:timers/promises";
|
|
7
|
+
import { stubCommand, windowsLaunchStub } from "./launcher.js";
|
|
5
8
|
export const isProcessAlive = (pid) => {
|
|
6
9
|
try {
|
|
7
10
|
process.kill(pid, 0);
|
|
@@ -11,24 +14,74 @@ export const isProcessAlive = (pid) => {
|
|
|
11
14
|
return error.code === "EPERM";
|
|
12
15
|
}
|
|
13
16
|
};
|
|
17
|
+
const bootToken = async () => {
|
|
18
|
+
const bootId = (await readFile("/proc/sys/kernel/random/boot_id", "utf8").catch(() => "")).trim();
|
|
19
|
+
return bootId === "" ? `at:${Math.round(Date.now() - uptime() * 1000)}` : `id:${bootId}`;
|
|
20
|
+
};
|
|
21
|
+
const SAME_BOOT_MS = 120_000;
|
|
22
|
+
const sameBoot = (written, current) => {
|
|
23
|
+
if (!written.startsWith("at:") || !current.startsWith("at:")) {
|
|
24
|
+
return written === current;
|
|
25
|
+
}
|
|
26
|
+
return Math.abs(Number(written.slice(3)) - Number(current.slice(3))) <= SAME_BOOT_MS;
|
|
27
|
+
};
|
|
28
|
+
export const pidFileBody = async (pid = process.pid) => `${pid} ${await bootToken()}`;
|
|
14
29
|
export const livePid = async (pidPath) => {
|
|
15
|
-
const
|
|
30
|
+
const [written = "", stamp = ""] = (await readFile(pidPath, "utf8").catch(() => "")).trim().split(/\s+/);
|
|
31
|
+
const pid = Number(written);
|
|
16
32
|
if (!Number.isInteger(pid) || pid <= 0) {
|
|
17
33
|
return undefined;
|
|
18
34
|
}
|
|
35
|
+
if (!sameBoot(stamp, await bootToken())) {
|
|
36
|
+
return undefined;
|
|
37
|
+
}
|
|
19
38
|
return isProcessAlive(pid) ? pid : undefined;
|
|
20
39
|
};
|
|
21
40
|
const SETTLE_MS = 2_000;
|
|
22
41
|
const SETTLE_POLL_MS = 100;
|
|
23
|
-
|
|
42
|
+
const STUB_REPLY_MS = 10_000;
|
|
43
|
+
const spawnHere = (logPath, launcher, args) => {
|
|
24
44
|
const logFd = openSync(logPath, "a");
|
|
25
45
|
const [command, ...leading] = launcher;
|
|
26
46
|
const child = spawn(command, [...leading, ...args], { detached: true, stdio: ["ignore", logFd, logFd] });
|
|
27
47
|
child.unref();
|
|
28
|
-
|
|
29
|
-
if (pid === undefined) {
|
|
48
|
+
if (child.pid === undefined) {
|
|
30
49
|
throw new Error(`could not start ${command} in the background. Details: ${logPath}`);
|
|
31
50
|
}
|
|
51
|
+
return child.pid;
|
|
52
|
+
};
|
|
53
|
+
const spawnThroughStub = async (stub, logPath, launcher, args) => {
|
|
54
|
+
const [command, ...rest] = stubCommand(stub, logPath, [...launcher, ...args]);
|
|
55
|
+
const child = spawn(command, rest, { detached: true, stdio: ["ignore", "pipe", "pipe"] });
|
|
56
|
+
let answered = "";
|
|
57
|
+
let complained = "";
|
|
58
|
+
child.stdout?.on("data", (chunk) => (answered += chunk.toString()));
|
|
59
|
+
child.stderr?.on("data", (chunk) => (complained += chunk.toString()));
|
|
60
|
+
const status = await new Promise((resolve, reject) => {
|
|
61
|
+
const timer = globalThis.setTimeout(() => {
|
|
62
|
+
child.kill();
|
|
63
|
+
reject(new Error(`${basename(stub)} did not answer within ${STUB_REPLY_MS}ms. Details: ${logPath}`));
|
|
64
|
+
}, STUB_REPLY_MS);
|
|
65
|
+
timer.unref();
|
|
66
|
+
child.once("error", (error) => {
|
|
67
|
+
clearTimeout(timer);
|
|
68
|
+
reject(error);
|
|
69
|
+
});
|
|
70
|
+
child.once("close", (code) => {
|
|
71
|
+
clearTimeout(timer);
|
|
72
|
+
resolve(code);
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
const pid = Number(answered.trim());
|
|
76
|
+
if (status !== 0 || !Number.isInteger(pid) || pid <= 0) {
|
|
77
|
+
const said = complained.trim();
|
|
78
|
+
throw new Error(`${basename(stub)} could not start the background loop${said === "" ? "" : `: ${said}`}. Details: ${logPath}`);
|
|
79
|
+
}
|
|
80
|
+
return pid;
|
|
81
|
+
};
|
|
82
|
+
export const spawnDetached = async (logPath, launcher, args) => {
|
|
83
|
+
const stub = windowsLaunchStub(launcher);
|
|
84
|
+
const pid = stub === undefined ? spawnHere(logPath, launcher, args) : await spawnThroughStub(stub, logPath, launcher, args);
|
|
32
85
|
for (let waited = 0; waited < SETTLE_MS; waited += SETTLE_POLL_MS) {
|
|
33
86
|
await setTimeout(SETTLE_POLL_MS);
|
|
34
87
|
if (!isProcessAlive(pid)) {
|
package/dist/detached.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"detached.js","sourceRoot":"","sources":["../src/detached.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"detached.js","sourceRoot":"","sources":["../src/detached.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAoB,WAAW,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAYjF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,GAAW,EAAW,EAAE;IACnD,IAAI,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;QACrB,OAAO,IAAI,CAAC;IAChB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACb,OAAQ,KAA+B,CAAC,IAAI,KAAK,OAAO,CAAC;IAC7D,CAAC;AACL,CAAC,CAAC;AAoBF,MAAM,SAAS,GAAG,KAAK,IAAqB,EAAE;IAI1C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AAC;YACvB,MAAM,IAAI,KAAK,CAAC,4DAA4D,GAAG,eAAe,OAAO,EAAE,CAAC,CAAC;QAC7G,CAAC;IACL,CAAC;IACD,OAAO,GAAG,CAAC;AACf,CAAC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { agentHome, writeSecretFile, type AgentHome, type Log } from "./home.js";
|
|
2
|
-
export { cliLauncher, quotedCommandLine, type CliLauncher } from "./launcher.js";
|
|
3
|
-
export { linuxDesktopEntry, macLaunchAgentXml, registerAutostart, unregisterAutostart, windowsRunAddArgs, windowsRunDeleteArgs, type AutostartSpec, type LaunchAgentSpec, } from "./autostart.js";
|
|
4
|
-
export { isProcessAlive, livePid, spawnDetached } from "./detached.js";
|
|
2
|
+
export { cliLauncher, quotedCommandLine, stubCommand, WINDOWS_LAUNCH_STUB, windowsLaunchStub, type CliLauncher } from "./launcher.js";
|
|
3
|
+
export { clearWindowsRunValue, linuxDesktopEntry, macLaunchAgentXml, registerAutostart, setWindowsRunValue, unregisterAutostart, windowsRunAddArgs, windowsRunDeleteArgs, type AutostartSpec, type LaunchAgentSpec, } from "./autostart.js";
|
|
4
|
+
export { isProcessAlive, livePid, pidFileBody, spawnDetached } from "./detached.js";
|
|
5
5
|
export { agentException } from "./text.js";
|
|
6
6
|
export { asLabel, createUi, estimate, humanDuration, truncate, wrap, type Footnote, type PlanStep, type RowOutcome, type Ui, type UiMode, type UiProcess, } from "./ui.js";
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,KAAK,SAAS,EAAE,KAAK,GAAG,EAAE,MAAM,WAAW,CAAC;AACjF,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,KAAK,SAAS,EAAE,KAAK,GAAG,EAAE,MAAM,WAAW,CAAC;AACjF,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,WAAW,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AACtI,OAAO,EACH,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,EACpB,KAAK,aAAa,EAClB,KAAK,eAAe,GACvB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EACH,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,aAAa,EACb,QAAQ,EACR,IAAI,EACJ,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,KAAK,EAAE,EACP,KAAK,MAAM,EACX,KAAK,SAAS,GACjB,MAAM,SAAS,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { agentHome, writeSecretFile } from "./home.js";
|
|
2
|
-
export { cliLauncher, quotedCommandLine } from "./launcher.js";
|
|
3
|
-
export { linuxDesktopEntry, macLaunchAgentXml, registerAutostart, unregisterAutostart, windowsRunAddArgs, windowsRunDeleteArgs, } from "./autostart.js";
|
|
4
|
-
export { isProcessAlive, livePid, spawnDetached } from "./detached.js";
|
|
2
|
+
export { cliLauncher, quotedCommandLine, stubCommand, WINDOWS_LAUNCH_STUB, windowsLaunchStub } from "./launcher.js";
|
|
3
|
+
export { clearWindowsRunValue, linuxDesktopEntry, macLaunchAgentXml, registerAutostart, setWindowsRunValue, unregisterAutostart, windowsRunAddArgs, windowsRunDeleteArgs, } from "./autostart.js";
|
|
4
|
+
export { isProcessAlive, livePid, pidFileBody, spawnDetached } from "./detached.js";
|
|
5
5
|
export { agentException } from "./text.js";
|
|
6
6
|
export { asLabel, createUi, estimate, humanDuration, truncate, wrap, } from "./ui.js";
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,SAAS,EAAE,eAAe,EAA4B,MAAM,WAAW,CAAC;AACjF,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAoB,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,SAAS,EAAE,eAAe,EAA4B,MAAM,WAAW,CAAC;AACjF,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,WAAW,EAAE,mBAAmB,EAAE,iBAAiB,EAAoB,MAAM,eAAe,CAAC;AACtI,OAAO,EACH,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,GAGvB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EACH,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,aAAa,EACb,QAAQ,EACR,IAAI,GAOP,MAAM,SAAS,CAAC"}
|
package/dist/launcher.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
export type CliLauncher = readonly [string, ...string[]];
|
|
2
2
|
export declare const cliLauncher: (cliName: string) => CliLauncher;
|
|
3
3
|
export declare const quotedCommandLine: (argv: readonly string[]) => string;
|
|
4
|
+
export declare const WINDOWS_LAUNCH_STUB = "intentic-launch.exe";
|
|
5
|
+
export declare const windowsLaunchStub: (launcher: CliLauncher) => string | undefined;
|
|
6
|
+
export declare const stubCommand: (stub: string, logPath: string, argv: readonly string[]) => readonly [string, ...string[]];
|
|
4
7
|
//# sourceMappingURL=launcher.d.ts.map
|
package/dist/launcher.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"launcher.d.ts","sourceRoot":"","sources":["../src/launcher.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"launcher.d.ts","sourceRoot":"","sources":["../src/launcher.ts"],"names":[],"mappings":"AAmBA,MAAM,MAAM,WAAW,GAAG,SAAS,CAAC,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,CAAC;AAKzD,eAAO,MAAM,WAAW,YAAa,MAAM,KAAG,WAM7C,CAAC;AAKF,eAAO,MAAM,iBAAiB,SAAU,SAAS,MAAM,EAAE,KAAG,MAAiD,CAAC;AAc9G,eAAO,MAAM,mBAAmB,wBAAwB,CAAC;AAEzD,eAAO,MAAM,iBAAiB,aAAc,WAAW,KAAG,MAAM,GAAG,SAMlE,CAAC;AAQF,eAAO,MAAM,WAAW,SAAU,MAAM,WAAW,MAAM,QAAQ,SAAS,MAAM,EAAE,KAAG,SAAS,CAAC,MAAM,EAAE,GAAG,MAAM,EAAE,CAMjH,CAAC"}
|
package/dist/launcher.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { existsSync } from "node:fs";
|
|
2
|
+
import { dirname, join } from "node:path";
|
|
1
3
|
const isBunVirtualEntry = (entry) => entry.includes("$bunfs") || entry.includes("~BUN");
|
|
2
4
|
export const cliLauncher = (cliName) => {
|
|
3
5
|
const entry = process.argv[1];
|
|
@@ -7,4 +9,19 @@ export const cliLauncher = (cliName) => {
|
|
|
7
9
|
return isBunVirtualEntry(entry) ? [process.execPath] : [process.execPath, entry];
|
|
8
10
|
};
|
|
9
11
|
export const quotedCommandLine = (argv) => argv.map((arg) => `"${arg}"`).join(" ");
|
|
12
|
+
export const WINDOWS_LAUNCH_STUB = "intentic-launch.exe";
|
|
13
|
+
export const windowsLaunchStub = (launcher) => {
|
|
14
|
+
if (process.platform !== "win32") {
|
|
15
|
+
return undefined;
|
|
16
|
+
}
|
|
17
|
+
const candidate = join(dirname(launcher[0]), WINDOWS_LAUNCH_STUB);
|
|
18
|
+
return existsSync(candidate) ? candidate : undefined;
|
|
19
|
+
};
|
|
20
|
+
export const stubCommand = (stub, logPath, argv) => [
|
|
21
|
+
stub,
|
|
22
|
+
"--log",
|
|
23
|
+
logPath,
|
|
24
|
+
"--",
|
|
25
|
+
...argv,
|
|
26
|
+
];
|
|
10
27
|
//# sourceMappingURL=launcher.js.map
|
package/dist/launcher.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"launcher.js","sourceRoot":"","sources":["../src/launcher.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"launcher.js","sourceRoot":"","sources":["../src/launcher.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAoB1C,MAAM,iBAAiB,GAAG,CAAC,KAAa,EAAW,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AAGzG,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,OAAe,EAAe,EAAE;IACxD,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC9B,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACtB,MAAM,IAAI,KAAK,CAAC,qBAAqB,OAAO,wBAAwB,CAAC,CAAC;IAC1E,CAAC;IACD,OAAO,iBAAiB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;AACrF,CAAC,CAAC;AAKF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,IAAuB,EAAU,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,GAAG,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAc9G,MAAM,CAAC,MAAM,mBAAmB,GAAG,qBAAqB,CAAC;AAEzD,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,QAAqB,EAAsB,EAAE;IAC3E,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE,CAAC;QAC/B,OAAO,SAAS,CAAC;IACrB,CAAC;IACD,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,mBAAmB,CAAC,CAAC;IAClE,OAAO,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;AACzD,CAAC,CAAC;AAQF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,IAAY,EAAE,OAAe,EAAE,IAAuB,EAAkC,EAAE,CAAC;IACnH,IAAI;IACJ,OAAO;IACP,OAAO;IACP,IAAI;IACJ,GAAG,IAAI;CACV,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intentic/local-agent",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.233.0",
|
|
4
4
|
"description": "The plumbing every intentic CLI that lives on a user's own computer needs, state home, login autostart, self-relaunch, detached background loop",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|