@alook/cli 0.0.139 → 0.0.140

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.
Files changed (2) hide show
  1. package/dist/index.js +11 -10
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -20720,15 +20720,15 @@ async function startDaemon(profile, serverUrl) {
20720
20720
  const allEntries = cliConfig.watched_workspaces || [];
20721
20721
  const workspaces = allEntries.filter((ws) => ws.status !== "deleted" && !!ws.id);
20722
20722
  if (workspaces.length === 0) {
20723
- log10.error("No workspaces configured. Register a workspace first.");
20724
- process.exit(1);
20725
- return;
20723
+ log10.info("No workspaces configured — daemon starting in standby mode. Register a workspace to begin.");
20726
20724
  }
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;
20725
+ if (workspaces.length > 0) {
20726
+ const hasPerWorkspaceTokens = workspaces.every((ws) => !!ws.token);
20727
+ if (!hasPerWorkspaceTokens) {
20728
+ log10.error(`Config uses old format. Run '${cmdPrefix()} register --token <token>' for each workspace to upgrade.`);
20729
+ process.exit(1);
20730
+ return;
20731
+ }
20732
20732
  }
20733
20733
  if (cliConfig.server_url)
20734
20734
  config2.serverURL = cliConfig.server_url;
@@ -20753,7 +20753,7 @@ async function startDaemon(profile, serverUrl) {
20753
20753
  log10.info(`Detected providers: ${providers.map((p) => `${p.type}@${p.version}`).join(", ")}`);
20754
20754
  const workspaceStates = [];
20755
20755
  const runtimeIndex = new Map;
20756
- const hadWorkspaces = true;
20756
+ let hadWorkspaces = workspaces.length > 0;
20757
20757
  for (const ws of workspaces) {
20758
20758
  const runtimes = providers.map((p) => ({
20759
20759
  type: p.type,
@@ -20789,7 +20789,7 @@ async function startDaemon(profile, serverUrl) {
20789
20789
  });
20790
20790
  }
20791
20791
  }
20792
- if (workspaceStates.length === 0 && workspaces.length > 0) {
20792
+ if (workspaceStates.length === 0 && hadWorkspaces) {
20793
20793
  log10.error("No workspaces registered successfully.");
20794
20794
  process.exit(1);
20795
20795
  return;
@@ -21155,6 +21155,7 @@ async function startDaemon(profile, serverUrl) {
21155
21155
  }
21156
21156
  }
21157
21157
  if (newWorkspaces.length > 0) {
21158
+ hadWorkspaces = true;
21158
21159
  health.setRuntimeCount(workspaceStates.reduce((sum, w) => sum + w.runtimeIds.length, 0));
21159
21160
  if (!wsClient && workspaceStates.length > 0) {
21160
21161
  const token = workspaceStates[0].token;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alook/cli",
3
- "version": "0.0.139",
3
+ "version": "0.0.140",
4
4
  "description": "Alook CLI — Enable Your Person Colleague",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/alookai/alook#readme",