@alook/cli 0.0.108 → 0.0.110

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 +5 -4
  2. package/package.json +3 -2
package/dist/index.js CHANGED
@@ -21026,6 +21026,7 @@ async function startDaemon(profile, serverUrl) {
21026
21026
  pollTimer = setInterval(pollCycle, newInterval);
21027
21027
  }
21028
21028
  function handleWsPush(msg) {
21029
+ const wsMap = new Map(workspaceStates.map((ws) => [ws.workspaceId, ws]));
21029
21030
  switch (msg.type) {
21030
21031
  case "daemon.tasks":
21031
21032
  for (const apiTask of msg.tasks) {
@@ -21034,7 +21035,7 @@ async function startDaemon(profile, serverUrl) {
21034
21035
  const task = fromApiTask(apiTask);
21035
21036
  if (activeTasks.has(task.id))
21036
21037
  continue;
21037
- const ws = workspaceStates.find((w) => w.workspaceId === task.workspaceId);
21038
+ const ws = wsMap.get(task.workspaceId);
21038
21039
  if (!ws)
21039
21040
  continue;
21040
21041
  syncAgentId(task.agentId, ws.workspaceId);
@@ -21046,7 +21047,7 @@ async function startDaemon(profile, serverUrl) {
21046
21047
  }
21047
21048
  break;
21048
21049
  case "daemon.file_requests": {
21049
- const ws = workspaceStates.find((w) => w.workspaceId === msg.workspaceId);
21050
+ const ws = wsMap.get(msg.workspaceId);
21050
21051
  if (ws) {
21051
21052
  for (const req of msg.requests) {
21052
21053
  handleFileRequest(client, config2, ws.workspaceId, req, ws.token).catch((e) => log9.debug("WS file request error", e));
@@ -21056,7 +21057,7 @@ async function startDaemon(profile, serverUrl) {
21056
21057
  }
21057
21058
  case "daemon.meetings":
21058
21059
  for (const m of msg.meetings) {
21059
- const ws = workspaceStates.find((w) => w.workspaceId === m.workspace_id);
21060
+ const ws = wsMap.get(m.workspace_id);
21060
21061
  if (!ws)
21061
21062
  continue;
21062
21063
  const agentBaseDir = join11(config2.workspacesRoot, m.workspace_id, m.agent_id, "workdir");
@@ -21088,7 +21089,7 @@ async function startDaemon(profile, serverUrl) {
21088
21089
  requestRestart();
21089
21090
  break;
21090
21091
  case "daemon.kill": {
21091
- const ws = workspaceStates.find((w) => w.workspaceId === msg.workspaceId);
21092
+ const ws = wsMap.get(msg.workspaceId);
21092
21093
  if (ws && !activeTasks.has(msg.taskId)) {
21093
21094
  const killTask = fromApiTask({
21094
21095
  id: msg.taskId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alook/cli",
3
- "version": "0.0.108",
3
+ "version": "0.0.110",
4
4
  "description": "Alook CLI — Enable Your Person Colleague",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/alookai/alook#readme",
@@ -40,6 +40,7 @@
40
40
  "dev": "bun run src/index.ts",
41
41
  "build": "bun build src/index.ts --outdir dist --target node --format esm --external citty --external commander --external postal-mime --external playwright-core && bun build daemon/session-runner.ts --outdir dist --target node --format esm --external citty --external commander --external postal-mime && bun build daemon/meeting-runner.ts --outdir dist --target node --format esm --external playwright-core && node scripts/prepare-dist.mjs",
42
42
  "prepack": "pnpm run build",
43
+ "knip": "knip",
43
44
  "test": "vitest run",
44
45
  "test:integration": "vitest run --config ../../tests/integration/cli/vitest.config.ts --passWithNoTests",
45
46
  "lint": "eslint .",
@@ -53,9 +54,9 @@
53
54
  },
54
55
  "devDependencies": {
55
56
  "@alook/shared": "workspace:*",
56
- "@alook/test-utils": "workspace:*",
57
57
  "@types/bun": "^1.3.14",
58
58
  "eslint": "^10.3.0",
59
+ "knip": "^6.14.2",
59
60
  "typescript": "^6.0.3",
60
61
  "typescript-eslint": "^8.59.4",
61
62
  "vitest": "^4.1.7"