@alook/cli 0.0.139 → 0.0.141

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 CHANGED
@@ -16433,7 +16433,8 @@ var machine = sqliteTable("machine", {
16433
16433
  createdAt: text("created_at").notNull().$defaultFn(() => new Date().toISOString()),
16434
16434
  pendingUpdateVersion: text("pending_update_version"),
16435
16435
  pendingRescan: integer2("pending_rescan", { mode: "boolean" }).default(false),
16436
- updatedAt: text("updated_at").notNull().$defaultFn(() => new Date().toISOString())
16436
+ updatedAt: text("updated_at").notNull().$defaultFn(() => new Date().toISOString()),
16437
+ ownerId: text("owner_id").references(() => user.id, { onDelete: "set null" })
16437
16438
  }, (t) => [primaryKey({ columns: [t.workspaceId, t.daemonId] })]);
16438
16439
  var agentRuntime = sqliteTable("agent_runtime", {
16439
16440
  id: text("id").primaryKey().$defaultFn(() => nanoid3()),
@@ -20720,15 +20721,15 @@ async function startDaemon(profile, serverUrl) {
20720
20721
  const allEntries = cliConfig.watched_workspaces || [];
20721
20722
  const workspaces = allEntries.filter((ws) => ws.status !== "deleted" && !!ws.id);
20722
20723
  if (workspaces.length === 0) {
20723
- log10.error("No workspaces configured. Register a workspace first.");
20724
- process.exit(1);
20725
- return;
20724
+ log10.info("No workspaces configured — daemon starting in standby mode. Register a workspace to begin.");
20726
20725
  }
20727
- const hasPerWorkspaceTokens = workspaces.every((ws) => !!ws.token);
20728
- if (!hasPerWorkspaceTokens) {
20729
- log10.error(`Config uses old format. Run '${cmdPrefix()} register --token <token>' for each workspace to upgrade.`);
20730
- process.exit(1);
20731
- return;
20726
+ if (workspaces.length > 0) {
20727
+ const hasPerWorkspaceTokens = workspaces.every((ws) => !!ws.token);
20728
+ if (!hasPerWorkspaceTokens) {
20729
+ log10.error(`Config uses old format. Run '${cmdPrefix()} register --token <token>' for each workspace to upgrade.`);
20730
+ process.exit(1);
20731
+ return;
20732
+ }
20732
20733
  }
20733
20734
  if (cliConfig.server_url)
20734
20735
  config2.serverURL = cliConfig.server_url;
@@ -20753,7 +20754,7 @@ async function startDaemon(profile, serverUrl) {
20753
20754
  log10.info(`Detected providers: ${providers.map((p) => `${p.type}@${p.version}`).join(", ")}`);
20754
20755
  const workspaceStates = [];
20755
20756
  const runtimeIndex = new Map;
20756
- const hadWorkspaces = true;
20757
+ let hadWorkspaces = workspaces.length > 0;
20757
20758
  for (const ws of workspaces) {
20758
20759
  const runtimes = providers.map((p) => ({
20759
20760
  type: p.type,
@@ -20789,7 +20790,7 @@ async function startDaemon(profile, serverUrl) {
20789
20790
  });
20790
20791
  }
20791
20792
  }
20792
- if (workspaceStates.length === 0 && workspaces.length > 0) {
20793
+ if (workspaceStates.length === 0 && hadWorkspaces) {
20793
20794
  log10.error("No workspaces registered successfully.");
20794
20795
  process.exit(1);
20795
20796
  return;
@@ -21155,6 +21156,7 @@ async function startDaemon(profile, serverUrl) {
21155
21156
  }
21156
21157
  }
21157
21158
  if (newWorkspaces.length > 0) {
21159
+ hadWorkspaces = true;
21158
21160
  health.setRuntimeCount(workspaceStates.reduce((sum, w) => sum + w.runtimeIds.length, 0));
21159
21161
  if (!wsClient && workspaceStates.length > 0) {
21160
21162
  const token = workspaceStates[0].token;
@@ -16342,7 +16342,8 @@ var machine = sqliteTable("machine", {
16342
16342
  createdAt: text("created_at").notNull().$defaultFn(() => new Date().toISOString()),
16343
16343
  pendingUpdateVersion: text("pending_update_version"),
16344
16344
  pendingRescan: integer2("pending_rescan", { mode: "boolean" }).default(false),
16345
- updatedAt: text("updated_at").notNull().$defaultFn(() => new Date().toISOString())
16345
+ updatedAt: text("updated_at").notNull().$defaultFn(() => new Date().toISOString()),
16346
+ ownerId: text("owner_id").references(() => user.id, { onDelete: "set null" })
16346
16347
  }, (t) => [primaryKey({ columns: [t.workspaceId, t.daemonId] })]);
16347
16348
  var agentRuntime = sqliteTable("agent_runtime", {
16348
16349
  id: text("id").primaryKey().$defaultFn(() => nanoid3()),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alook/cli",
3
- "version": "0.0.139",
3
+ "version": "0.0.141",
4
4
  "description": "Alook CLI — Enable Your Person Colleague",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/alookai/alook#readme",