@agentconnect.md/daemon 1.0.0-rc.7 → 1.0.0-rc.9
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/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/package.json +2 -5
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ import { spawn as spawn$1 } from "child_process";
|
|
|
14
14
|
import { Readable, Writable } from "node:stream";
|
|
15
15
|
import { randomUUID } from "node:crypto";
|
|
16
16
|
import { lstat, open, readdir, realpath, stat as stat$1 } from "node:fs/promises";
|
|
17
|
-
import
|
|
17
|
+
import { DatabaseSync } from "node:sqlite";
|
|
18
18
|
//#region \0rolldown/runtime.js
|
|
19
19
|
var __create = Object.create;
|
|
20
20
|
var __defProp$1 = Object.defineProperty;
|
|
@@ -21280,7 +21280,7 @@ var SystemdController = class {
|
|
|
21280
21280
|
]);
|
|
21281
21281
|
}
|
|
21282
21282
|
async status() {
|
|
21283
|
-
const logPath =
|
|
21283
|
+
const logPath = `journalctl --user -u ${UNIT}`;
|
|
21284
21284
|
if (!this.isInstalled()) return {
|
|
21285
21285
|
installed: false,
|
|
21286
21286
|
running: false,
|
|
@@ -22934,8 +22934,8 @@ var LocalStore = class {
|
|
|
22934
22934
|
db;
|
|
22935
22935
|
constructor(dbPath) {
|
|
22936
22936
|
mkdirSync(dirname(dbPath), { recursive: true });
|
|
22937
|
-
this.db = new
|
|
22938
|
-
this.db.
|
|
22937
|
+
this.db = new DatabaseSync(dbPath);
|
|
22938
|
+
this.db.exec("PRAGMA journal_mode = WAL");
|
|
22939
22939
|
this.db.exec(`
|
|
22940
22940
|
CREATE TABLE IF NOT EXISTS sessions (
|
|
22941
22941
|
key TEXT PRIMARY KEY, agentId TEXT, platform TEXT, channel TEXT, thread TEXT,
|
|
@@ -80889,6 +80889,7 @@ async function runLogin(opts, partial = {}) {
|
|
|
80889
80889
|
out.write(`✓ authenticated${r.daemonId ? ` (daemon ${r.daemonId})` : ""} — credentials saved\n`);
|
|
80890
80890
|
return;
|
|
80891
80891
|
}
|
|
80892
|
+
if (opts.configPath) throw new Error("interactive login does not support --config — use --root <dir> so the daemon and the installed service read the same config");
|
|
80892
80893
|
const rl = createInterface({
|
|
80893
80894
|
input: deps.input,
|
|
80894
80895
|
output: out
|
|
@@ -80918,7 +80919,7 @@ async function runLogin(opts, partial = {}) {
|
|
|
80918
80919
|
cpUrl: url,
|
|
80919
80920
|
cpToken: token
|
|
80920
80921
|
});
|
|
80921
|
-
const ans = await nextLine(iter, "Install AgentConnect as a background service? (y/N) ", out);
|
|
80922
|
+
const ans = (await nextLine(iter, "Install AgentConnect as a background service? (y/N) ", out)).toLowerCase();
|
|
80922
80923
|
if (ans === "y" || ans === "yes") {
|
|
80923
80924
|
await deps.installService();
|
|
80924
80925
|
out.write("Service installed and started. Manage it with `agentconnect up` / `down` / `status`.\n");
|