@taco-ai/cli 0.1.2 → 0.2.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 +39 -12
- package/dist/taco.mjs +33 -33
- package/lib/installHelpers.ts +66 -30
- package/lib/installId.ts +27 -2
- package/lib/sidecarLauncher.ts +41 -6
- package/lib/start.ts +83 -43
- package/lib/status.ts +5 -57
- package/lib/stop.ts +9 -64
- package/lib/upgradePlatform.ts +21 -0
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -1,22 +1,36 @@
|
|
|
1
1
|
# @taco-ai/cli
|
|
2
2
|
|
|
3
3
|
Taco command-line launcher and daemon supervisor. Wraps `@taco-ai/sidecar`
|
|
4
|
-
with user-facing subcommands
|
|
5
|
-
|
|
6
|
-
daemon through.
|
|
4
|
+
with user-facing subcommands and provides a single entry point the Tauri
|
|
5
|
+
desktop (and humans) can use to manage the sidecar daemon.
|
|
7
6
|
|
|
8
|
-
## Subcommands
|
|
7
|
+
## Subcommands
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
| Command | Purpose | Output |
|
|
10
|
+
|---|---|---|
|
|
11
|
+
| `taco start` | Spawn the sidecar daemon in socket-bridge mode (or reuse an existing healthy one). Daemonizes after writing its data + control socket paths. | NDJSON socket path on stdout (last line); exits once the daemon is up. |
|
|
12
|
+
| `taco status` | Ping the control socket; report PID, uptime, protocol version, and instance id. | One-line summary on stdout; non-zero exit if no daemon is reachable. |
|
|
13
|
+
| `taco stop` | Send a graceful shutdown to the control socket; wait, then SIGTERM / SIGKILL. | Removes the data socket + PID + start lock on success. |
|
|
14
|
+
| `taco install` | Register the daemon as a system service so it survives reboots. macOS: LaunchAgent (`RunAtLoad` + `KeepAlive`). Windows: Task Scheduler `ONSTART` task. Linux: returns `unsupported platform`. | Writes the service definition; no stdout contract beyond the success line. |
|
|
15
|
+
| `taco uninstall` | Remove the registered service. macOS: unloads + deletes the plist. Windows: deletes the Task Scheduler entry. Linux: no-op with a warning. | Removes the system registration; user data (sessions, logs, config) is **not** touched. |
|
|
16
|
+
| `taco upgrade` | Download a new `@taco-ai/sidecar` release artifact, swap the binary, signal the daemon to restart. | Prints the installed version on stdout. |
|
|
12
17
|
|
|
13
|
-
|
|
18
|
+
All commands write diagnostics to stderr. A non-zero exit indicates a failure
|
|
19
|
+
of the operation itself (e.g. `taco stop` with no reachable daemon, `taco install`
|
|
20
|
+
on Linux); `--help` is always supported.
|
|
14
21
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
22
|
+
## Platform capabilities
|
|
23
|
+
|
|
24
|
+
| Capability | macOS | Windows | Linux |
|
|
25
|
+
|---|---|---|---|
|
|
26
|
+
| Spawn / connect to daemon | ✅ | ✅ | ✅ |
|
|
27
|
+
| `taco status` / `taco stop` | ✅ | ✅ | ✅ |
|
|
28
|
+
| `taco install` / `taco uninstall` (system service) | ✅ (LaunchAgent) | ✅ (Task Scheduler) | ❌ (unsupported) |
|
|
29
|
+
| Auto-restart on crash (via the registered service) | ✅ (`KeepAlive`) | ❌ (not configured) | ❌ |
|
|
30
|
+
|
|
31
|
+
Linux users who need daemon-on-boot must register the service themselves
|
|
32
|
+
(e.g. systemd user unit). `taco start` works on Linux; the daemon will run
|
|
33
|
+
as long as the user is logged in.
|
|
20
34
|
|
|
21
35
|
## Dev mode
|
|
22
36
|
|
|
@@ -25,3 +39,16 @@ checkout containing `pnpm-workspace.yaml`) to spawn the bundle via
|
|
|
25
39
|
`tsx <repo>/packages/sidecar/src/index.ts` instead of the bundled
|
|
26
40
|
`@taco-ai/sidecar-<platform>` artifact. Hot reload + TypeScript source paths
|
|
27
41
|
in stack traces.
|
|
42
|
+
|
|
43
|
+
## Endpoints
|
|
44
|
+
|
|
45
|
+
| Platform | Data socket | Control socket |
|
|
46
|
+
|---|---|---|
|
|
47
|
+
| Unix | `$TACO_RUNTIME_DIR/sidecar.sock` | `$TACO_RUNTIME_DIR/sidecar-ctl.sock` |
|
|
48
|
+
| Windows | `\\.\pipe\taco-sidecar` | `\\.\pipe\taco-sidecar-ctl` |
|
|
49
|
+
|
|
50
|
+
The Windows pipe names are **fixed** and do not change with `TACO_RUNTIME_DIR`
|
|
51
|
+
— so on Windows you cannot get a second daemon by pointing the CLI at a
|
|
52
|
+
different runtime directory. The Unix layout follows the runtime directory,
|
|
53
|
+
so Unix users can run isolated daemons by exporting a different
|
|
54
|
+
`TACO_RUNTIME_DIR` before each `taco start`.
|