comisai 1.0.7 → 1.0.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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@comis/agent",
3
3
  "private": true,
4
- "version": "1.0.7",
4
+ "version": "1.0.8",
5
5
  "author": "Moshe Anconina",
6
6
  "license": "Apache-2.0",
7
7
  "description": "AI agent executor, budget control, and session management for Comis",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@comis/channels",
3
3
  "private": true,
4
- "version": "1.0.7",
4
+ "version": "1.0.8",
5
5
  "author": "Moshe Anconina",
6
6
  "license": "Apache-2.0",
7
7
  "description": "Chat platform adapters — Discord, Telegram, Slack, WhatsApp, Signal, iMessage, IRC, LINE",
@@ -269,8 +269,14 @@ async function handleDaemonStart() {
269
269
  }
270
270
  const scope = manager === "systemd-user" ? "systemd (user scope)" : "systemd";
271
271
  info(`Starting daemon via ${scope}...`);
272
- await execSystemctl(manager, "start", "comis");
273
- success("Daemon started");
272
+ try {
273
+ await execSystemctl(manager, "start", "comis");
274
+ success("Daemon started");
275
+ }
276
+ catch {
277
+ error("Cannot start daemon: insufficient permissions");
278
+ info("Run as root: sudo systemctl start comis");
279
+ }
274
280
  return;
275
281
  }
276
282
  case "pm2": {
@@ -304,8 +310,14 @@ async function handleDaemonStop() {
304
310
  }
305
311
  const scope = manager === "systemd-user" ? "systemd (user scope)" : "systemd";
306
312
  info(`Stopping daemon via ${scope}...`);
307
- await execSystemctl(manager, "stop", "comis");
308
- success("Daemon stopped");
313
+ try {
314
+ await execSystemctl(manager, "stop", "comis");
315
+ success("Daemon stopped");
316
+ }
317
+ catch {
318
+ error("Cannot stop daemon: insufficient permissions");
319
+ info("Run as root: sudo systemctl stop comis");
320
+ }
309
321
  return;
310
322
  }
311
323
  case "pm2": {
@@ -218,7 +218,6 @@ async function restartViaSystemd(manager) {
218
218
  const args = manager === "systemd-user"
219
219
  ? ["--user", "restart", "comis"]
220
220
  : ["restart", "comis"];
221
- // System-scope requires root; try sudo for non-root users
222
221
  if (manager === "systemd" && process.getuid?.() !== 0) {
223
222
  await exec("sudo", ["systemctl", ...args], { timeout: 15_000 });
224
223
  }
@@ -227,6 +226,27 @@ async function restartViaSystemd(manager) {
227
226
  }
228
227
  return true;
229
228
  }
229
+ catch {
230
+ // sudo failed (comis user has no sudo) — fall back to SIGUSR2.
231
+ // The daemon traps SIGUSR2 and exits with code 42; systemd respawns
232
+ // it via RestartForceExitStatus=42, picking up the new config.
233
+ return restartViaSigusr2(manager);
234
+ }
235
+ }
236
+ async function restartViaSigusr2(manager) {
237
+ try {
238
+ const pidArgs = manager === "systemd-user"
239
+ ? ["--user", "show", "comis", "--property=MainPID", "--value"]
240
+ : ["show", "comis", "--property=MainPID", "--value"];
241
+ const { stdout } = await exec("systemctl", pidArgs, { timeout: 5_000 });
242
+ const pid = Number(stdout.trim());
243
+ if (isNaN(pid) || pid <= 0)
244
+ return false;
245
+ process.kill(pid, "SIGUSR2");
246
+ // Wait for systemd to respawn the process
247
+ await new Promise((r) => setTimeout(r, 3000));
248
+ return true;
249
+ }
230
250
  catch {
231
251
  return false;
232
252
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@comis/cli",
3
3
  "private": true,
4
- "version": "1.0.7",
4
+ "version": "1.0.8",
5
5
  "author": "Moshe Anconina",
6
6
  "license": "Apache-2.0",
7
7
  "description": "Command-line interface for the Comis AI agent platform",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@comis/core",
3
3
  "private": true,
4
- "version": "1.0.7",
4
+ "version": "1.0.8",
5
5
  "author": "Moshe Anconina",
6
6
  "license": "Apache-2.0",
7
7
  "description": "Core domain types, ports, event bus, security, and config for Comis",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@comis/daemon",
3
3
  "private": true,
4
- "version": "1.0.7",
4
+ "version": "1.0.8",
5
5
  "author": "Moshe Anconina",
6
6
  "license": "Apache-2.0",
7
7
  "description": "Background daemon and orchestrator for the Comis platform",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@comis/gateway",
3
3
  "private": true,
4
- "version": "1.0.7",
4
+ "version": "1.0.8",
5
5
  "author": "Moshe Anconina",
6
6
  "license": "Apache-2.0",
7
7
  "description": "HTTP, JSON-RPC, and WebSocket gateway for Comis",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@comis/infra",
3
3
  "private": true,
4
- "version": "1.0.7",
4
+ "version": "1.0.8",
5
5
  "author": "Moshe Anconina",
6
6
  "license": "Apache-2.0",
7
7
  "description": "Structured logging infrastructure for Comis",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@comis/memory",
3
3
  "private": true,
4
- "version": "1.0.7",
4
+ "version": "1.0.8",
5
5
  "author": "Moshe Anconina",
6
6
  "license": "Apache-2.0",
7
7
  "description": "SQLite memory, embeddings, and RAG storage for Comis agents",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@comis/scheduler",
3
3
  "private": true,
4
- "version": "1.0.7",
4
+ "version": "1.0.8",
5
5
  "author": "Moshe Anconina",
6
6
  "license": "Apache-2.0",
7
7
  "description": "Task scheduling and cron management for Comis",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@comis/shared",
3
3
  "private": true,
4
- "version": "1.0.7",
4
+ "version": "1.0.8",
5
5
  "author": "Moshe Anconina",
6
6
  "license": "Apache-2.0",
7
7
  "description": "Shared types and utilities for the Comis platform",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@comis/skills",
3
3
  "private": true,
4
- "version": "1.0.7",
4
+ "version": "1.0.8",
5
5
  "author": "Moshe Anconina",
6
6
  "license": "Apache-2.0",
7
7
  "description": "Skill system, MCP integration, and tool sandbox for Comis agents",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "comisai",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "author": "Moshe Anconina",
5
5
  "license": "Apache-2.0",
6
6
  "description": "Security-first AI agent platform — connects AI agents to Discord, Telegram, Slack, WhatsApp, and more",
@@ -115,17 +115,17 @@
115
115
  "@comis/daemon"
116
116
  ],
117
117
  "dependencies": {
118
- "@comis/shared": "1.0.7",
119
- "@comis/core": "1.0.7",
120
- "@comis/infra": "1.0.7",
121
- "@comis/memory": "1.0.7",
122
- "@comis/gateway": "1.0.7",
123
- "@comis/skills": "1.0.7",
124
- "@comis/scheduler": "1.0.7",
125
- "@comis/agent": "1.0.7",
126
- "@comis/channels": "1.0.7",
127
- "@comis/cli": "1.0.7",
128
- "@comis/daemon": "1.0.7",
118
+ "@comis/shared": "1.0.8",
119
+ "@comis/core": "1.0.8",
120
+ "@comis/infra": "1.0.8",
121
+ "@comis/memory": "1.0.8",
122
+ "@comis/gateway": "1.0.8",
123
+ "@comis/skills": "1.0.8",
124
+ "@comis/scheduler": "1.0.8",
125
+ "@comis/agent": "1.0.8",
126
+ "@comis/channels": "1.0.8",
127
+ "@comis/cli": "1.0.8",
128
+ "@comis/daemon": "1.0.8",
129
129
  "@agentclientprotocol/sdk": "^0.15.0",
130
130
  "@clack/core": "^1.1.0",
131
131
  "@clack/prompts": "^1.1.0",