@intentic/local-agent 1.310.0 → 1.312.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 +30 -167
- package/dist/home.d.ts +1 -0
- package/dist/home.d.ts.map +1 -1
- package/dist/home.js +2 -1
- package/dist/home.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,172 +1,35 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
The plumbing
|
|
4
|
-
|
|
1
|
+
# local-agent
|
|
2
|
+
|
|
3
|
+
The shared plumbing for intentic CLIs that run on a user's own computer: a private state directory, login autostart, re-launching itself, and one background agent found again by pidfile.
|
|
4
|
+
|
|
5
|
+
```mermaid
|
|
6
|
+
flowchart LR
|
|
7
|
+
machine["intentic-machine"] --> la(["local-agent"])
|
|
8
|
+
bridge["acp-bridge"] --> la
|
|
9
|
+
la --> home["~/.intentic/name<br/>owner-only files"]
|
|
10
|
+
la --> auto["Login autostart<br/>Task Scheduler, systemd, launchd"]
|
|
11
|
+
la --> pid["Pidfile + boot token<br/>one resident agent"]
|
|
12
|
+
auto -->|"Windows"| stub["intentic-launch.exe"]
|
|
5
13
|
```
|
|
6
|
-
~/.intentic/<name>/ agentHome(name) — state dir + config.json
|
|
7
|
-
config.json writeSecretFile() — 0700 dir, 0600 file, written whole (writeFileAtomic)
|
|
8
|
-
<agent>.log spawnDetached() — the agent's output has nowhere else to go
|
|
9
|
-
<agent>.pid claimPidFile() — one agent per home: pid, its boot, its build, its supervisor
|
|
10
|
-
|
|
11
|
-
Task Scheduler\<name> autostart().register — Windows, per-user logon task, supervised, no elevation
|
|
12
|
-
HKCU\…\Run autostart().register — Windows fallback, one shot at logon, nothing watches it
|
|
13
|
-
~/Library/LaunchAgents/ autostart().register — macOS, opt-in per agent, KeepAlive on a non-zero exit
|
|
14
|
-
~/.config/systemd/user/ autostart().register — Linux, Restart=on-failure
|
|
15
|
-
~/.config/autostart/ autostart().register — Linux desktop session, where there is no user manager
|
|
16
|
-
|
|
17
|
-
stdout createUi(process) — the one renderer every agent speaks through
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
## Why it exists
|
|
21
|
-
|
|
22
|
-
Two agents ship to a user's machine and have nothing in common except how they are **installed** and how they
|
|
23
|
-
**stay alive**:
|
|
24
|
-
|
|
25
|
-
| | what it does | uses |
|
|
26
|
-
| --- | --- | --- |
|
|
27
|
-
| [`@intentic/machine`](../../_devices/machine) | lets the sandbox's agent work on this computer, and mirrors files and ports between the two | home, launcher, autostart, detached, ui |
|
|
28
|
-
| [`@intentic/acp-bridge`](../../_sandbox/acp-bridge) | lets an editor talk to the sandbox | home |
|
|
29
|
-
|
|
30
|
-
The machine agent's two halves (and the standalone host/sync agents they used to be) were written months apart,
|
|
31
|
-
and each copy of that plumbing was made from the last one: a shape with a known ending. The second copy is a
|
|
32
|
-
snapshot of the first on the day it was taken, and every fix after that lands in only one of them. It already
|
|
33
|
-
had:
|
|
34
|
-
|
|
35
|
-
- **sync wrote its token file world-readable.** Its config module was copied from host's *before* the 0600 floor
|
|
36
|
-
was added there, and nothing afterwards compared the two.
|
|
37
|
-
- **host has no macOS autostart.** It was copied from a sync that did not have one yet, and on macOS it wrote an
|
|
38
|
-
XDG entry that nothing reads.
|
|
39
|
-
- **The Windows console rule, the compiled-binary argv rule and "report what the tool actually said"** were each
|
|
40
|
-
written out at length in two files, in prose, cross-referencing the other agent by name: including in
|
|
41
|
-
ARCHITECTURE.md, which said host's spawns behave "for the reason `@intentic/sync` documents".
|
|
42
|
-
- **Each agent grew its own `out()` closure** writing straight to stdout, so every improvement to how one of
|
|
43
|
-
them reads landed in exactly one of them: while the install a user actually experiences is `ic` and these
|
|
44
|
-
agents in sequence, three voices deep.
|
|
45
|
-
|
|
46
|
-
This package is those lessons as code, so the fourth agent inherits them by importing rather than by reading.
|
|
47
|
-
|
|
48
|
-
## The five pieces
|
|
49
|
-
|
|
50
|
-
**`home.ts`**: `agentHome(name)` gives `{ dir, configPath }` under `~/.intentic/<name>`; `writeSecretFile`
|
|
51
|
-
writes through a 0700 directory to a 0600 file. The directory's mode is re-applied on every write, because `mkdir`
|
|
52
|
-
does not tighten a directory that already exists: an agent installed before this floor existed would otherwise keep
|
|
53
|
-
its old permissions forever. Every write goes through `writeFileAtomic`, which puts the bytes beside the file and
|
|
54
|
-
renames them over it: a reader sees the old file or the new one, never a torn one, which a config reader would take
|
|
55
|
-
for an empty list and write back.
|
|
56
|
-
|
|
57
|
-
**`launcher.ts`**: `cliLauncher(cliName)` answers how to re-invoke this CLI. The subtlety is the compiled
|
|
58
|
-
binary: `bun build --compile` reports an `argv[1]` inside its own virtual filesystem and re-injects it on every
|
|
59
|
-
launch, so passing it again shifts the command to `argv[2]` where the parser never looks. `windowsLaunchStub()`
|
|
60
|
-
finds the other half of a Windows install, [`intentic-launch.exe`](../win-launcher), sitting next to the agent's
|
|
61
|
-
own executable.
|
|
62
|
-
|
|
63
|
-
**`autostart.ts`**: `autostart(spec, launcher, log)` against an `AutostartSpec` the agent declares, answering three
|
|
64
|
-
verbs. `register` writes the entry and never starts anything (with `repair`, it only puts back an entry that is
|
|
65
|
-
missing, which is what a running agent calls on itself). `start` starts the agent through its entry — `schtasks /run`,
|
|
66
|
-
`systemctl --user start`, `launchctl bootstrap` or `kickstart` — and answers false where the entry cannot, so the
|
|
67
|
-
caller spawns it instead. `unregister` clears every mechanism's entry, since which one is in force depends on what the
|
|
68
|
-
last registration found. Every mechanism here supervises what it starts, so every one gets the **foreground**
|
|
69
|
-
command; on Windows it goes through the stub, `intentic-launch.exe --log <log> --wait -- <agent> <foreground args>`.
|
|
70
|
-
`launchAgent` is optional: an agent that has not been exercised on macOS says so and gets a note, rather than a file
|
|
71
|
-
macOS never reads.
|
|
72
|
-
|
|
73
|
-
Supervised is the word that matters, and it is what each mechanism is chosen for. systemd has
|
|
74
|
-
`Restart=on-failure`; launchd gets `KeepAlive: {SuccessfulExit: false}`, which is the same bargain and safe to
|
|
75
|
-
make because these agents exit 0 for every deliberate stop and 128+SIGNAL otherwise. Windows gets a per-user
|
|
76
|
-
**logon task**: a Run value starts the agent once and nothing watches it afterwards, so a crash at ten in the
|
|
77
|
-
morning stayed a crash until the next sign-in. The task restarts a failed action three times a minute apart, and
|
|
78
|
-
a repeating trigger re-starts one that died some other way — `IgnoreNew` is what makes that repetition a no-op
|
|
79
|
-
while the agent is healthy rather than a second agent every five minutes. `InteractiveToken` is what makes it
|
|
80
|
-
need no password and no elevation; the `schtasks` form that *does* want a password is `/sc ONLOGON /ru`, which
|
|
81
|
-
is why this registers XML instead.
|
|
82
|
-
|
|
83
|
-
Windows earns the stub on top of that. Explorer starts a Run entry in the interactive session, and the loader
|
|
84
|
-
gives every console-subsystem program a console — which on Windows 11, where the default console host is Windows
|
|
85
|
-
Terminal, is a terminal window on the desktop. The entry used to name the agent's own **detached** command,
|
|
86
|
-
which spawns the agent and exits, so what a user saw at every single boot was a black window for one to two
|
|
87
|
-
seconds. Nothing softer works: `powershell -WindowStyle Hidden` hides the console *its* host owns while the
|
|
88
|
-
window belongs to WindowsTerminal.exe, and a logon task whose action is a **console** program maps a window like
|
|
89
|
-
anything else. Only a program whose PE subsystem is GUI never gets a console, which is the whole of what the
|
|
90
|
-
stub is — and it is why the logon task is registered only when the stub is there to be its action. Without one,
|
|
91
|
-
`detachedArgs` in the Run key remains the fallback (a developer running `node dist/cli.js`), unsupervised, and
|
|
92
|
-
registration says out loud that a window will flash.
|
|
93
|
-
|
|
94
|
-
Starting through the entry, rather than spawning beside it, is what keeps an agent supervised after a restart: a
|
|
95
|
-
process started outside the logon task is one the task does not know it is running, so the task starts a rival at
|
|
96
|
-
the next watchdog tick and restarts nothing when this one dies. Registration and starting are separate verbs for the
|
|
97
|
-
same reason: a running agent re-asserting its own entry must not be handed a rival, and on macOS a restart goes through
|
|
98
|
-
booting the job out — which is to say, killing the caller.
|
|
99
|
-
|
|
100
|
-
**`detached.ts`**: `spawnDetached`, the pidfile (`claimPidFile`, `holdPidFile`, `releasePidFile`, `livePidRecord`),
|
|
101
|
-
`stopProcess`, `isProcessAlive`, and the log roll every supervisor runs before it opens the log (`ROTATE_LOG_SH`). On POSIX the agent is spawned
|
|
102
|
-
`detached` for its own session; on Windows because without it the agent is torn down the moment its parent
|
|
103
|
-
exits — measured on the compiled binary, and the reason "connected in the background (pid N)" was a lie there
|
|
104
|
-
for every release that passed `windowsHide` instead. The two cannot be combined to get both properties
|
|
105
|
-
(`CREATE_NO_WINDOW` is ignored alongside `DETACHED_PROCESS`), so a detached agent on Windows has no console at
|
|
106
|
-
all, and Windows hands a console child of a console-less process a new console *with a window*. That is why
|
|
107
|
-
every spawn inside a agent (git and ssh in sync's bridge, docker and PowerShell in host's tools) passes
|
|
108
|
-
`windowsHide` itself; the flag applies whether or not the parent has a console, where inheritance did not.
|
|
109
|
-
|
|
110
|
-
Where the stub is installed, `spawnDetached` goes through it on Windows and the bargain improves: the agent gets
|
|
111
|
-
`CREATE_NO_WINDOW`, so it has a console of its own with **no window on it**, and every console child inherits
|
|
112
|
-
that console instead of being handed a fresh one. The per-spawn `windowsHide` stays — it is what covers a agent
|
|
113
|
-
started any other way — but it stops being the only thing between a user and a black window. The stub prints
|
|
114
|
-
the agent's pid on its stdout, because its own pid belongs to a process that has already exited by the time the
|
|
115
|
-
settle check below would probe it.
|
|
116
|
-
|
|
117
|
-
`spawnDetached` also answers only once the agent has **survived** a short settle window, and throws naming its log
|
|
118
|
-
otherwise. A pid proves the OS created a process; every caller turns it straight into a sentence promising the
|
|
119
|
-
user their machine is now doing something.
|
|
120
|
-
|
|
121
|
-
A pidfile lives beside the config, so it **outlives the boot that wrote it**, while the number in it means
|
|
122
|
-
nothing outside that boot's process table: pids restart low and are handed out in roughly the same order every
|
|
123
|
-
time, so an agent's own pid from yesterday is somebody else's transient process this morning. So the pidfile is a
|
|
124
|
-
JSON record of the pid, a stamp naming the boot, and what only the agent knows about itself (the build it runs and
|
|
125
|
-
who restarts it), and `livePidRecord` ignores any record from a different boot without probing it. On Linux the stamp is `/proc/sys/kernel/random/boot_id`, exact and unmoved by the clock; elsewhere
|
|
126
|
-
it is the boot's epoch by subtraction from the uptime, which libuv takes from `GetTickCount64` on Windows and
|
|
127
|
-
`kern.boottime` on macOS — both keep counting across sleep, so a laptop that suspends goes on answering the same
|
|
128
|
-
boot. That derived form is compared with a two-minute tolerance, because it is anchored to `Date.now()` and a
|
|
129
|
-
stepped clock would otherwise read as a new boot; a false *mismatch* is the expensive direction, since it lets a
|
|
130
|
-
second agent start on top of a live one.
|
|
131
|
-
|
|
132
|
-
The cost of not doing this was measured: a machine bugchecked in standby, nothing removed the sync watcher's
|
|
133
|
-
pidfile, and on the next boot the watcher probed the pid it used to hold, found an unrelated early-boot process
|
|
134
|
-
wearing it, and refused to start. Refusing is deliberate and so exits 0 — a supervisor must not restart a
|
|
135
|
-
watcher into refusing again every `RestartSec` — which is precisely why `Restart=on-failure` never fired and
|
|
136
|
-
desktop file sync stayed off until somebody went looking.
|
|
137
|
-
|
|
138
|
-
Claiming is a write, not a check. Reading the file and then writing it let two agents started at the same moment both
|
|
139
|
-
find it empty and both run; `claimPidFile` writes the record, waits a moment and reads it back, so only the last
|
|
140
|
-
writer keeps it and the other is told who holds it. The holder re-asserts it every tick with `holdPidFile` as a lease,
|
|
141
|
-
and `releasePidFile` removes the file only while it still names the caller, so a stopping agent never deletes the
|
|
142
|
-
claim of the one that replaced it.
|
|
143
|
-
|
|
144
|
-
**`ui.ts`**: `createUi(process)` is the whole of what an agent writes to a person, and the TypeScript twin of
|
|
145
|
-
`ic`'s `_sandbox/ic/src/ui.rs`. One question decides everything: is stdout a terminal. A **pipe** gets the
|
|
146
|
-
`intentic: [phase] message` marker stream and nothing else, because the desktop app parses it into a progress
|
|
147
|
-
bar and CI reads it out of a log: that shape is a contract, written down in
|
|
148
|
-
[docs/cli-output-protocol.md](../../docs/ops/cli-output-protocol.md). A **terminal** gets a banner, a numbered
|
|
149
|
-
checklist with durations, one repainting status line and a ranked ending. And a third mode, **nested**, is what
|
|
150
|
-
makes an install read as one program rather than three: `ic` runs these agents inside its own checklist and
|
|
151
|
-
sets `INTENTIC_UI=nested`, so their output lands as detail under its step instead of opening a second banner in
|
|
152
|
-
the middle of somebody's setup.
|
|
153
|
-
|
|
154
|
-
The live region is deliberately **one line**, repainted with a carriage return. Redrawing a whole checklist in
|
|
155
|
-
place needs the cursor moved up N lines, which needs to know when a line wrapped: and these run under
|
|
156
|
-
`curl | sh` on terminals of unknown width. Everything already settled scrolls above it.
|
|
157
|
-
|
|
158
|
-
## What this package is not
|
|
159
14
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
15
|
+
- Used by [`intentic-machine`](../machine) and [`acp-bridge`](../../_sandbox/acp-bridge); it always runs on the
|
|
16
|
+
user's device, never in a sandbox.
|
|
17
|
+
- `agentHome` puts state under `~/.intentic/<name>`, and `writeSecretFile` writes owner-only files, since they hold
|
|
18
|
+
sandbox credentials.
|
|
19
|
+
- `autostart` registers the agent at login under something that restarts it, with no elevation: a per-user logon
|
|
20
|
+
task through [`intentic-launch.exe`](../win-launcher) on Windows (a `HKCU\…\Run` value when the stub is absent), a
|
|
21
|
+
systemd user unit on Linux (an XDG autostart entry without a user manager), a LaunchAgent on macOS.
|
|
22
|
+
- A pidfile stores a boot token beside the pid, so a pid reused after a reboot never reads as a running agent, and
|
|
23
|
+
`claimPidFile` settles two starters racing for one file.
|
|
24
|
+
- `cliLauncher` rebuilds the argv that re-invokes the current CLI, both as `node dist/cli.js` and as a bun-compiled binary.
|
|
25
|
+
- `createUi` renders a setup command's checklist: `rich` in a terminal, `plain` markers for a pipe, `nested` inside a
|
|
26
|
+
parent's checklist.
|
|
163
27
|
|
|
164
28
|
## Key files
|
|
165
29
|
|
|
166
|
-
- [src/index.ts](src/index.ts)
|
|
167
|
-
- [src/
|
|
168
|
-
- [src/
|
|
169
|
-
- [src/
|
|
170
|
-
- [src/launcher.ts](src/launcher.ts)
|
|
171
|
-
|
|
172
|
-
- [src/ui.ts](src/ui.ts), the renderer: the pipe/terminal/nested split, the checklist, the ranked ending.
|
|
30
|
+
- [src/index.ts](src/index.ts) — everything the package exports.
|
|
31
|
+
- [src/autostart.ts](src/autostart.ts) — the login entry per OS, including the Windows task XML.
|
|
32
|
+
- [src/detached.ts](src/detached.ts) — pidfiles, `spawnDetached`, the launcher-stub spawn and log rotation.
|
|
33
|
+
- [src/home.ts](src/home.ts) — the state directory, atomic writes and owner-only secret files.
|
|
34
|
+
- [src/launcher.ts](src/launcher.ts) — the argv to re-launch this CLI and the stub command line.
|
|
35
|
+
- [src/ui.ts](src/ui.ts) — the checklist renderer and its output modes.
|
package/dist/home.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export interface AgentHome {
|
|
|
3
3
|
readonly dir: string;
|
|
4
4
|
readonly configPath: string;
|
|
5
5
|
}
|
|
6
|
+
export declare const homeDir: () => string;
|
|
6
7
|
export declare const agentHome: (name: string) => AgentHome;
|
|
7
8
|
export declare const writeFileAtomic: (path: string, contents: string | Uint8Array, mode?: number) => Promise<void>;
|
|
8
9
|
export declare const writeSecretFile: (path: string, dir: string, contents: string) => Promise<void>;
|
package/dist/home.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"home.d.ts","sourceRoot":"","sources":["../src/home.ts"],"names":[],"mappings":"AASA,MAAM,MAAM,GAAG,GAAG,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;AAE5C,MAAM,WAAW,SAAS;IAEtB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAErB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC/B;
|
|
1
|
+
{"version":3,"file":"home.d.ts","sourceRoot":"","sources":["../src/home.ts"],"names":[],"mappings":"AASA,MAAM,MAAM,GAAG,GAAG,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;AAE5C,MAAM,WAAW,SAAS;IAEtB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAErB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC/B;AAGD,eAAO,MAAM,OAAO,QAAO,MAAwG,CAAC;AAEpI,eAAO,MAAM,SAAS,SAAU,MAAM,KAAG,SAGxC,CAAC;AA0BF,eAAO,MAAM,eAAe,SAAgB,MAAM,YAAY,MAAM,GAAG,UAAU,oBAAiB,OAAO,CAAC,IAAI,CAU7G,CAAC;AAGF,eAAO,MAAM,eAAe,SAAgB,MAAM,OAAO,MAAM,YAAY,MAAM,KAAG,OAAO,CAAC,IAAI,CAI/F,CAAC"}
|
package/dist/home.js
CHANGED
|
@@ -2,8 +2,9 @@ import { chmod, mkdir, rename, rm, writeFile } from "node:fs/promises";
|
|
|
2
2
|
import { homedir } from "node:os";
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
import { setTimeout as sleep } from "node:timers/promises";
|
|
5
|
+
export const homeDir = () => (process.platform === "win32" ? process.env["USERPROFILE"] : process.env["HOME"]) || homedir();
|
|
5
6
|
export const agentHome = (name) => {
|
|
6
|
-
const dir = join(
|
|
7
|
+
const dir = join(homeDir(), ".intentic", name);
|
|
7
8
|
return { dir, configPath: join(dir, "config.json") };
|
|
8
9
|
};
|
|
9
10
|
const TRANSIENT_RENAME = new Set(["EPERM", "EACCES", "EBUSY"]);
|
package/dist/home.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"home.js","sourceRoot":"","sources":["../src/home.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,UAAU,IAA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AC;IAC/C,MAAM,eAAe,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;AACjD,CAAC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { agentHome, writeFileAtomic, writeSecretFile, type AgentHome, type Log } from "./home.js";
|
|
1
|
+
export { agentHome, homeDir, writeFileAtomic, writeSecretFile, type AgentHome, type Log } from "./home.js";
|
|
2
2
|
export { cliLauncher, quotedCommandLine, stubCommand, WINDOWS_LAUNCH_STUB, windowsLaunchStub, type CliLauncher } from "./launcher.js";
|
|
3
3
|
export { autostart, clearWindowsRunValue, linuxDesktopEntry, macLaunchAgentXml, ROTATE_LOG_SH, setWindowsRunValue, supervisedPath, windowsRunAddArgs, windowsRunDeleteArgs, type Autostart, type AutostartKind, type AutostartSpec, type LaunchAgentSpec, } from "./autostart.js";
|
|
4
4
|
export { claimPidFile, holdPidFile, isProcessAlive, livePid, livePidRecord, LOG_ROTATE_BYTES, type PidClaim, type PidRecord, pidFileBody, releasePidFile, spawnDetached, stopProcess, } from "./detached.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,eAAe,EAAE,KAAK,SAAS,EAAE,KAAK,GAAG,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,KAAK,SAAS,EAAE,KAAK,GAAG,EAAE,MAAM,WAAW,CAAC;AAC3G,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,WAAW,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AACtI,OAAO,EACH,SAAS,EACT,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,EACb,kBAAkB,EAClB,cAAc,EACd,iBAAiB,EACjB,oBAAoB,EACpB,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,eAAe,GACvB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACH,YAAY,EACZ,WAAW,EACX,cAAc,EACd,OAAO,EACP,aAAa,EACb,gBAAgB,EAChB,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,WAAW,EACX,cAAc,EACd,aAAa,EACb,WAAW,GACd,MAAM,eAAe,CAAC;AACvB,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,4 +1,4 @@
|
|
|
1
|
-
export { agentHome, writeFileAtomic, writeSecretFile } from "./home.js";
|
|
1
|
+
export { agentHome, homeDir, writeFileAtomic, writeSecretFile } from "./home.js";
|
|
2
2
|
export { cliLauncher, quotedCommandLine, stubCommand, WINDOWS_LAUNCH_STUB, windowsLaunchStub } from "./launcher.js";
|
|
3
3
|
export { autostart, clearWindowsRunValue, linuxDesktopEntry, macLaunchAgentXml, ROTATE_LOG_SH, setWindowsRunValue, supervisedPath, windowsRunAddArgs, windowsRunDeleteArgs, } from "./autostart.js";
|
|
4
4
|
export { claimPidFile, holdPidFile, isProcessAlive, livePid, livePidRecord, LOG_ROTATE_BYTES, pidFileBody, releasePidFile, spawnDetached, stopProcess, } from "./detached.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,eAAe,EAA4B,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,eAAe,EAAE,eAAe,EAA4B,MAAM,WAAW,CAAC;AAC3G,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,WAAW,EAAE,mBAAmB,EAAE,iBAAiB,EAAoB,MAAM,eAAe,CAAC;AACtI,OAAO,EACH,SAAS,EACT,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,EACb,kBAAkB,EAClB,cAAc,EACd,iBAAiB,EACjB,oBAAoB,GAKvB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACH,YAAY,EACZ,WAAW,EACX,cAAc,EACd,OAAO,EACP,aAAa,EACb,gBAAgB,EAGhB,WAAW,EACX,cAAc,EACd,aAAa,EACb,WAAW,GACd,MAAM,eAAe,CAAC;AACvB,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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intentic/local-agent",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.312.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 agent",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -30,14 +30,14 @@
|
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@intentic/base": "1.
|
|
33
|
+
"@intentic/base": "1.312.0",
|
|
34
34
|
"tslib": "2.8.1"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@intentic/testing": "0.0.0",
|
|
38
38
|
"@intentic/tsconfig": "0.0.0",
|
|
39
|
-
"@types/bun": "1.4.
|
|
40
|
-
"@types/node": "24.13.
|
|
39
|
+
"@types/bun": "1.4.2",
|
|
40
|
+
"@types/node": "24.13.6",
|
|
41
41
|
"@typescript/native-preview": "7.0.0-dev.20260707.2"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|