@taco-ai/shared 0.4.6 → 0.4.8
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/dist/daemonPaths.d.ts +101 -0
- package/dist/daemonPaths.d.ts.map +1 -0
- package/dist/daemonPaths.js +189 -0
- package/dist/daemonPaths.js.map +1 -0
- package/package.json +4 -3
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared Node-only daemon path, install-id, PID-file, and upgrade-marker helpers.
|
|
3
|
+
*
|
|
4
|
+
* Consumed by both `@taco-ai/sidecar` and `@taco-ai/cli` so algorithms that
|
|
5
|
+
* must stay byte-for-byte identical (such as `computeInstallId` and
|
|
6
|
+
* `windowsPipeSlug`) have a single source of truth instead of mirrored copies.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Resolve the absolute `$TACO_HOME` directory (`TACO_HOME` env > `$HOME/.taco`).
|
|
10
|
+
* Blank/whitespace env is treated as unset; relative paths resolve against cwd
|
|
11
|
+
* to match Rust's `resolve_taco_home`.
|
|
12
|
+
*/
|
|
13
|
+
export declare function resolveTacoHome(env?: NodeJS.ProcessEnv): string;
|
|
14
|
+
/** Default daemon runtime directory for a user-data home. */
|
|
15
|
+
export declare function defaultRuntimeDir(home?: string): string;
|
|
16
|
+
/** Resolve daemon runtime state independently from the shared user-data home. */
|
|
17
|
+
export declare function resolveTacoRuntimeDir(home?: string, runtimeOverride?: string | undefined): string;
|
|
18
|
+
/**
|
|
19
|
+
* Normalize a runtime directory so debug/release/verbatim Windows paths hash
|
|
20
|
+
* to the same pipe slug. Slash direction, trailing separators, and the `\\?\`
|
|
21
|
+
* prefix must not produce a second daemon for the same directory. Step order
|
|
22
|
+
* and ASCII-only case folding must match Rust's `paths.rs::windows_pipe_slug`
|
|
23
|
+
* byte for byte.
|
|
24
|
+
*/
|
|
25
|
+
export declare function windowsPipeSlug(runtimeDir: string): string;
|
|
26
|
+
/** NDJSON socket path (Unix domain socket or Windows named pipe). */
|
|
27
|
+
export declare function ndjsonSocketPath(runtimeDir?: string): string;
|
|
28
|
+
/** Control socket path (Unix domain socket or Windows named pipe). */
|
|
29
|
+
export declare function controlSocketPath(runtimeDir?: string): string;
|
|
30
|
+
/** Daemon PID file path inside the runtime directory. */
|
|
31
|
+
export declare function runtimePidFile(runtimeDir?: string): string;
|
|
32
|
+
/**
|
|
33
|
+
* Stable identifier for one taco install on one machine.
|
|
34
|
+
*
|
|
35
|
+
* Two anchors are hashed: `resourcesRoot` (this installation's bundle dir) and
|
|
36
|
+
* `tacoHome` (so a relocatable install stays unique even if symlinked). Must
|
|
37
|
+
* stay byte-for-byte compatible with Rust's `daemon_reap::compute_install_id`.
|
|
38
|
+
*/
|
|
39
|
+
export declare function computeInstallId(resourcesRoot: string, tacoHome: string): string;
|
|
40
|
+
/** Shape of the JSON record the daemon writes to `<runtimeDir>/sidecar.pid`. */
|
|
41
|
+
export interface SidecarPidRecord {
|
|
42
|
+
/** Schema version. Bump on any field rename/remove. */
|
|
43
|
+
version: 1;
|
|
44
|
+
/** Daemon pid. Same value as `process.pid` at write time. */
|
|
45
|
+
pid: number;
|
|
46
|
+
/** Install id produced by `computeInstallId`. */
|
|
47
|
+
install_id: string;
|
|
48
|
+
/** ISO-8601 timestamp of when the daemon bound both sockets. */
|
|
49
|
+
started_at: string;
|
|
50
|
+
/** Sidecar code version the daemon is running (`sidecarVersion()`). */
|
|
51
|
+
sidecar_version?: string;
|
|
52
|
+
}
|
|
53
|
+
/** Build the pid-file payload. */
|
|
54
|
+
export declare function buildSidecarPidRecord(pid: number, installId: string, sidecarVersion?: string, now?: () => Date): SidecarPidRecord;
|
|
55
|
+
/** Parsed JSON record from `<runtimeDir>/sidecar.pid`. */
|
|
56
|
+
export interface ParsedPidFile {
|
|
57
|
+
pid: number;
|
|
58
|
+
installId: string | null;
|
|
59
|
+
startedAt: string | null;
|
|
60
|
+
version: number;
|
|
61
|
+
/** `sidecar_version` from the JSON record; null when absent. */
|
|
62
|
+
sidecarVersion: string | null;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Parse the JSON record in `sidecar.pid`. Returns null when absent, malformed,
|
|
66
|
+
* unknown schema version, or invalid PID so callers never signal an unowned pid.
|
|
67
|
+
*/
|
|
68
|
+
export declare function parsePidFile(contents: string): ParsedPidFile | null;
|
|
69
|
+
/**
|
|
70
|
+
* Decide whether a serving daemon should be reaped for running stale code.
|
|
71
|
+
* Foreign `install_id` and unparseable records are never reaped.
|
|
72
|
+
*/
|
|
73
|
+
export declare function pidRecordIsStale(parsed: ParsedPidFile | null, ownInstallId: string, expectedVersion: string): boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Probe whether a PID currently exists. Rejects non-positive/non-integer PIDs
|
|
76
|
+
* and treats `EPERM` as alive (the process exists under another user/privilege).
|
|
77
|
+
*/
|
|
78
|
+
export declare function isPidAlive(pid: number): boolean;
|
|
79
|
+
/** On-disk contract between `taco upgrade` (CLI) and the daemon's upgrader. */
|
|
80
|
+
export interface UpgradeMarker {
|
|
81
|
+
/** Target version (e.g. "0.2.0"). Surfaces in the UI's "daemon upgrading" notice. */
|
|
82
|
+
version: string;
|
|
83
|
+
/** Absolute path to the staging dir holding the new bundle contents. */
|
|
84
|
+
staging_dir: string;
|
|
85
|
+
/** Absolute path to the live dir the staging should replace. */
|
|
86
|
+
live_dir: string;
|
|
87
|
+
/** Wall-clock ISO when the marker was written; used for diagnostics only. */
|
|
88
|
+
written_at: string;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Compare two install-root paths for equality after `path.resolve`.
|
|
92
|
+
* Windows compares case-insensitively (NTFS).
|
|
93
|
+
*/
|
|
94
|
+
export declare function sameInstallPath(a: string, b: string): boolean;
|
|
95
|
+
/** Read + parse an upgrade marker. Missing or malformed returns null. */
|
|
96
|
+
export declare function readUpgradeMarker(filePath: string, onWarn?: (message: string) => void): Promise<UpgradeMarker | null>;
|
|
97
|
+
/** Persist an upgrade marker atomically via a unique temp file and rename. */
|
|
98
|
+
export declare function writeUpgradeMarker(filePath: string, marker: UpgradeMarker): Promise<void>;
|
|
99
|
+
/** Delete an upgrade marker (idempotent on ENOENT). */
|
|
100
|
+
export declare function clearUpgradeMarker(filePath: string): Promise<void>;
|
|
101
|
+
//# sourceMappingURL=daemonPaths.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"daemonPaths.d.ts","sourceRoot":"","sources":["../daemonPaths.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AASH;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,CAI5E;AAED,6DAA6D;AAC7D,wBAAgB,iBAAiB,CAAC,IAAI,GAAE,MAA0B,GAAG,MAAM,CAE1E;AAED,iFAAiF;AACjF,wBAAgB,qBAAqB,CACjC,IAAI,GAAE,MAA0B,EAChC,eAAe,GAAE,MAAM,GAAG,SAAwC,GACnE,MAAM,CAGR;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAK1D;AAED,qEAAqE;AACrE,wBAAgB,gBAAgB,CAAC,UAAU,GAAE,MAAgC,GAAG,MAAM,CAKrF;AAED,sEAAsE;AACtE,wBAAgB,iBAAiB,CAAC,UAAU,GAAE,MAAgC,GAAG,MAAM,CAKtF;AAED,yDAAyD;AACzD,wBAAgB,cAAc,CAAC,UAAU,GAAE,MAAgC,GAAG,MAAM,CAEnF;AAID;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,aAAa,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAMhF;AAED,gFAAgF;AAChF,MAAM,WAAW,gBAAgB;IAC7B,uDAAuD;IACvD,OAAO,EAAE,CAAC,CAAC;IACX,6DAA6D;IAC7D,GAAG,EAAE,MAAM,CAAC;IACZ,iDAAiD;IACjD,UAAU,EAAE,MAAM,CAAC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E,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,GACnC,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAe/B;AAED,8EAA8E;AAC9E,wBAAsB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAS/F;AAED,uDAAuD;AACvD,wBAAsB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAIxE"}
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared Node-only daemon path, install-id, PID-file, and upgrade-marker helpers.
|
|
3
|
+
*
|
|
4
|
+
* Consumed by both `@taco-ai/sidecar` and `@taco-ai/cli` so algorithms that
|
|
5
|
+
* must stay byte-for-byte identical (such as `computeInstallId` and
|
|
6
|
+
* `windowsPipeSlug`) have a single source of truth instead of mirrored copies.
|
|
7
|
+
*/
|
|
8
|
+
import { createHash, randomUUID } from "node:crypto";
|
|
9
|
+
import { mkdir, readFile, rename, unlink, writeFile } from "node:fs/promises";
|
|
10
|
+
import { homedir } from "node:os";
|
|
11
|
+
import { dirname, join, resolve } from "node:path";
|
|
12
|
+
// ─── paths ──────────────────────────────────────────────────────────────────
|
|
13
|
+
/**
|
|
14
|
+
* Resolve the absolute `$TACO_HOME` directory (`TACO_HOME` env > `$HOME/.taco`).
|
|
15
|
+
* Blank/whitespace env is treated as unset; relative paths resolve against cwd
|
|
16
|
+
* to match Rust's `resolve_taco_home`.
|
|
17
|
+
*/
|
|
18
|
+
export function resolveTacoHome(env = process.env) {
|
|
19
|
+
const raw = env.TACO_HOME?.trim();
|
|
20
|
+
if (raw)
|
|
21
|
+
return resolve(raw);
|
|
22
|
+
return resolve(homedir(), ".taco");
|
|
23
|
+
}
|
|
24
|
+
/** Default daemon runtime directory for a user-data home. */
|
|
25
|
+
export function defaultRuntimeDir(home = resolveTacoHome()) {
|
|
26
|
+
return join(home, "run");
|
|
27
|
+
}
|
|
28
|
+
/** Resolve daemon runtime state independently from the shared user-data home. */
|
|
29
|
+
export function resolveTacoRuntimeDir(home = resolveTacoHome(), runtimeOverride = process.env.TACO_RUNTIME_DIR) {
|
|
30
|
+
const raw = runtimeOverride?.trim();
|
|
31
|
+
return raw && raw.length > 0 ? raw : defaultRuntimeDir(home);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Normalize a runtime directory so debug/release/verbatim Windows paths hash
|
|
35
|
+
* to the same pipe slug. Slash direction, trailing separators, and the `\\?\`
|
|
36
|
+
* prefix must not produce a second daemon for the same directory. Step order
|
|
37
|
+
* and ASCII-only case folding must match Rust's `paths.rs::windows_pipe_slug`
|
|
38
|
+
* byte for byte.
|
|
39
|
+
*/
|
|
40
|
+
export function windowsPipeSlug(runtimeDir) {
|
|
41
|
+
let normalized = runtimeDir.replace(/\//g, "\\");
|
|
42
|
+
if (normalized.startsWith("\\\\?\\"))
|
|
43
|
+
normalized = normalized.slice(4);
|
|
44
|
+
normalized = normalized.replace(/\\+$/, "").replace(/[A-Z]/g, (c) => c.toLowerCase());
|
|
45
|
+
return createHash("sha256").update(normalized, "utf8").digest("hex").slice(0, 16);
|
|
46
|
+
}
|
|
47
|
+
/** NDJSON socket path (Unix domain socket or Windows named pipe). */
|
|
48
|
+
export function ndjsonSocketPath(runtimeDir = resolveTacoRuntimeDir()) {
|
|
49
|
+
if (process.platform === "win32") {
|
|
50
|
+
return `\\\\.\\pipe\\taco-sidecar-${windowsPipeSlug(runtimeDir)}`;
|
|
51
|
+
}
|
|
52
|
+
return join(runtimeDir, "sidecar.sock");
|
|
53
|
+
}
|
|
54
|
+
/** Control socket path (Unix domain socket or Windows named pipe). */
|
|
55
|
+
export function controlSocketPath(runtimeDir = resolveTacoRuntimeDir()) {
|
|
56
|
+
if (process.platform === "win32") {
|
|
57
|
+
return `\\\\.\\pipe\\taco-sidecar-ctl-${windowsPipeSlug(runtimeDir)}`;
|
|
58
|
+
}
|
|
59
|
+
return join(runtimeDir, "sidecar-ctl.sock");
|
|
60
|
+
}
|
|
61
|
+
/** Daemon PID file path inside the runtime directory. */
|
|
62
|
+
export function runtimePidFile(runtimeDir = resolveTacoRuntimeDir()) {
|
|
63
|
+
return join(runtimeDir, "sidecar.pid");
|
|
64
|
+
}
|
|
65
|
+
// ─── install id & pid records ───────────────────────────────────────────────
|
|
66
|
+
/**
|
|
67
|
+
* Stable identifier for one taco install on one machine.
|
|
68
|
+
*
|
|
69
|
+
* Two anchors are hashed: `resourcesRoot` (this installation's bundle dir) and
|
|
70
|
+
* `tacoHome` (so a relocatable install stays unique even if symlinked). Must
|
|
71
|
+
* stay byte-for-byte compatible with Rust's `daemon_reap::compute_install_id`.
|
|
72
|
+
*/
|
|
73
|
+
export function computeInstallId(resourcesRoot, tacoHome) {
|
|
74
|
+
const h = createHash("sha256");
|
|
75
|
+
h.update(resourcesRoot);
|
|
76
|
+
h.update("\0");
|
|
77
|
+
h.update(tacoHome);
|
|
78
|
+
return h.digest("hex").slice(0, 16);
|
|
79
|
+
}
|
|
80
|
+
/** Build the pid-file payload. */
|
|
81
|
+
export function buildSidecarPidRecord(pid, installId, sidecarVersion, now = () => new Date()) {
|
|
82
|
+
return {
|
|
83
|
+
version: 1,
|
|
84
|
+
pid,
|
|
85
|
+
install_id: installId,
|
|
86
|
+
started_at: now().toISOString(),
|
|
87
|
+
...(sidecarVersion !== undefined ? { sidecar_version: sidecarVersion } : {}),
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Parse the JSON record in `sidecar.pid`. Returns null when absent, malformed,
|
|
92
|
+
* unknown schema version, or invalid PID so callers never signal an unowned pid.
|
|
93
|
+
*/
|
|
94
|
+
export function parsePidFile(contents) {
|
|
95
|
+
const trimmed = contents.trim();
|
|
96
|
+
if (!trimmed.startsWith("{"))
|
|
97
|
+
return null;
|
|
98
|
+
try {
|
|
99
|
+
const parsed = JSON.parse(trimmed);
|
|
100
|
+
if (parsed.version !== 1)
|
|
101
|
+
return null;
|
|
102
|
+
const pid = typeof parsed.pid === "number" ? parsed.pid : Number.NaN;
|
|
103
|
+
const installId = typeof parsed.install_id === "string" ? parsed.install_id : null;
|
|
104
|
+
const startedAt = typeof parsed.started_at === "string" ? parsed.started_at : null;
|
|
105
|
+
const sidecarVersion = typeof parsed.sidecar_version === "string" ? parsed.sidecar_version : null;
|
|
106
|
+
if (!Number.isFinite(pid) || pid <= 0)
|
|
107
|
+
return null;
|
|
108
|
+
return { pid, installId, startedAt, version: 1, sidecarVersion };
|
|
109
|
+
}
|
|
110
|
+
catch {
|
|
111
|
+
return null;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Decide whether a serving daemon should be reaped for running stale code.
|
|
116
|
+
* Foreign `install_id` and unparseable records are never reaped.
|
|
117
|
+
*/
|
|
118
|
+
export function pidRecordIsStale(parsed, ownInstallId, expectedVersion) {
|
|
119
|
+
if (parsed === null)
|
|
120
|
+
return false;
|
|
121
|
+
if (parsed.installId !== null && parsed.installId !== ownInstallId)
|
|
122
|
+
return false;
|
|
123
|
+
return parsed.sidecarVersion !== expectedVersion;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Probe whether a PID currently exists. Rejects non-positive/non-integer PIDs
|
|
127
|
+
* and treats `EPERM` as alive (the process exists under another user/privilege).
|
|
128
|
+
*/
|
|
129
|
+
export function isPidAlive(pid) {
|
|
130
|
+
if (!Number.isSafeInteger(pid) || pid <= 0)
|
|
131
|
+
return false;
|
|
132
|
+
try {
|
|
133
|
+
process.kill(pid, 0);
|
|
134
|
+
return true;
|
|
135
|
+
}
|
|
136
|
+
catch (error) {
|
|
137
|
+
return error?.code === "EPERM";
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
const UPGRADE_MARKER_INDENT = 2;
|
|
141
|
+
/**
|
|
142
|
+
* Compare two install-root paths for equality after `path.resolve`.
|
|
143
|
+
* Windows compares case-insensitively (NTFS).
|
|
144
|
+
*/
|
|
145
|
+
export function sameInstallPath(a, b) {
|
|
146
|
+
const na = resolve(a);
|
|
147
|
+
const nb = resolve(b);
|
|
148
|
+
return process.platform === "win32" ? na.toLowerCase() === nb.toLowerCase() : na === nb;
|
|
149
|
+
}
|
|
150
|
+
/** Read + parse an upgrade marker. Missing or malformed returns null. */
|
|
151
|
+
export async function readUpgradeMarker(filePath, onWarn) {
|
|
152
|
+
let raw;
|
|
153
|
+
try {
|
|
154
|
+
raw = await readFile(filePath, "utf8");
|
|
155
|
+
}
|
|
156
|
+
catch (err) {
|
|
157
|
+
if (err.code === "ENOENT")
|
|
158
|
+
return null;
|
|
159
|
+
onWarn?.(`failed to read marker ${filePath}: ${String(err)}`);
|
|
160
|
+
return null;
|
|
161
|
+
}
|
|
162
|
+
try {
|
|
163
|
+
return JSON.parse(raw);
|
|
164
|
+
}
|
|
165
|
+
catch (err) {
|
|
166
|
+
onWarn?.(`malformed marker ${filePath}: ${String(err)}`);
|
|
167
|
+
return null;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
/** Persist an upgrade marker atomically via a unique temp file and rename. */
|
|
171
|
+
export async function writeUpgradeMarker(filePath, marker) {
|
|
172
|
+
await mkdir(dirname(filePath), { recursive: true });
|
|
173
|
+
const tmp = `${filePath}.${process.pid}.${randomUUID()}.tmp`;
|
|
174
|
+
try {
|
|
175
|
+
await writeFile(tmp, JSON.stringify(marker, null, UPGRADE_MARKER_INDENT), "utf8");
|
|
176
|
+
await rename(tmp, filePath);
|
|
177
|
+
}
|
|
178
|
+
finally {
|
|
179
|
+
await unlink(tmp).catch(() => undefined);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
/** Delete an upgrade marker (idempotent on ENOENT). */
|
|
183
|
+
export async function clearUpgradeMarker(filePath) {
|
|
184
|
+
await unlink(filePath).catch((err) => {
|
|
185
|
+
if (err.code !== "ENOENT")
|
|
186
|
+
throw err;
|
|
187
|
+
});
|
|
188
|
+
}
|
|
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,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACpD,MAAM,GAAG,GAAG,GAAG,QAAQ,IAAI,OAAO,CAAC,GAAG,IAAI,UAAU,EAAE,MAAM,CAAC;IAC7D,IAAI,CAAC;QACD,MAAM,SAAS,CAAC,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,qBAAqB,CAAC,EAAE,MAAM,CAAC,CAAC;QAClF,MAAM,MAAM,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;IAChC,CAAC;YAAS,CAAC;QACP,MAAM,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;IAC7C,CAAC;AACL,CAAC;AAED,uDAAuD;AACvD,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,QAAgB;IACrD,MAAM,MAAM,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,CAAC,GAA0B,EAAE,EAAE;QACxD,IAAI,GAAG,CAAC,IAAI,KAAK,QAAQ;YAAE,MAAM,GAAG,CAAC;IACzC,CAAC,CAAC,CAAC;AACP,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taco-ai/shared",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.8",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/tacoClient.js",
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
".": "./dist/tacoClient.js",
|
|
10
10
|
"./node": "./dist/tacoClientNode.js",
|
|
11
11
|
"./spawn": "./dist/spawn.js",
|
|
12
|
-
"./controlNode": "./dist/controlNode.js"
|
|
12
|
+
"./controlNode": "./dist/controlNode.js",
|
|
13
|
+
"./daemonPaths": "./dist/daemonPaths.js"
|
|
13
14
|
},
|
|
14
15
|
"files": [
|
|
15
16
|
"dist"
|
|
@@ -20,7 +21,7 @@
|
|
|
20
21
|
"access": "public"
|
|
21
22
|
},
|
|
22
23
|
"dependencies": {
|
|
23
|
-
"@taco-ai/protocol": "0.4.
|
|
24
|
+
"@taco-ai/protocol": "0.4.8"
|
|
24
25
|
},
|
|
25
26
|
"devDependencies": {
|
|
26
27
|
"@types/node": "^22.7.0",
|