Multi-Agent Collaboration for Team and Friends
TypeScript agent-automationagent-orchestrationagent-workflowai-agentsai-collaborationai-memoryai-workforceautonomous-agentsclaude-codeclaude-code-skillscodexcoding-agentmulti-agentmultiple-agentone-person-businessone-person-companyone-person-teamopencodesolopreneur
feat: update workspace eviction
Gus269d990aa51a
diff --git a/src/cli/daemon/daemon.ts b/src/cli/daemon/daemon.tsindex e5b8a64e1..a5e1645aa 100644--- a/src/cli/daemon/daemon.ts+++ b/src/cli/daemon/daemon.ts@@ -168,7 +168,20 @@ export async function startDaemon(runtimes,});} catch (e) {- log.error(`Failed to register workspace ${ws.id}, skipping`, e);+ if (e instanceof Error && e.message.startsWith("HTTP 401")) {+ log.warn(`Workspace ${ws.id} token invalid — removing from config`);+ try {+ const cfg = loadCLIConfigForProfile(profile);+ cfg.watched_workspaces = (cfg.watched_workspaces || []).filter(+ (w) => w.id !== ws.id,+ );+ saveCLIConfigForProfile(profile, cfg);+ } catch {+ // best-effort+ }+ } else {+ log.error(`Failed to register workspace ${ws.id}, skipping`, e);+ }continue;}log.info(`Workspace ${ws.id} registered — ${resp.runtimes.length} runtime(s)`);@@ -294,7 +307,11 @@ export async function startDaemon(});}} catch (e) {- log.debug("Poll error", e);+ if (e instanceof Error && e.message.startsWith("HTTP 401")) {+ evictedIds.push(ws.workspaceId);+ } else {+ log.debug("Poll error", e);+ }}}diff --git a/src/cli/daemon/execenv/context.ts b/src/cli/daemon/execenv/context.tsindex e9655d7ec..4b9c203d4 100644--- a/src/cli/daemon/execenv/context.ts+++ b/src/cli/daemon/execenv/context.ts@@ -21,8 +21,8 @@ const SYSTEM_PROMPT_BODY = `## Memory Management- For SPECIFIC yet LONG rules or pattern, write to experiences/[NAME].md, and add index to ./memory.md for later recall.### whats is ESSENTIAL and SHORT Memory?- basic user profile, e.g.:- - "user name is gus"- - "user is working on alook"+ - "user name is ..."+ - "user is working on ..."- certain local project mapping, e.g.:- "alook means the project under /user/home/alook/"- when to read certain stuff, e.g.:@@ -114,17 +114,18 @@ To reply to an email, add '--in-reply-to <EMAIL_ID>' to the send command. This scontent += `\n### CalendarYou have your own calendar to setup daily routines and reminders.Schedule future tasks for yourself. At the scheduled time, a new task is dispatched to you with the event as the prompt (task type 'calendar_event').++!USE Calendar when you think the tasks are recurring or it should be conducted in the future.---Create a one-off event:-- Run 'npx @alook/cli calendar set --agent_id ${task.agentId} --event_title "<PROMPT_TEXT>" --datetime <YYYY-MM-DDTHH:MM>'+- Run 'npx @alook/cli calendar set --agent_id ${task.agentId} --event_title "<TASK_TITLE>" --description "<TASK_BODY>" --datetime <YYYY-MM-DDTHH:MM>'- '--datetime' is LOCAL time, format 'YYYY-MM-DDTHH:MM' (e.g. '2026-04-17T09:30'). Do NOT pass UTC / ISO strings with 'Z'.- '--event_title' becomes the task prompt when the event fires — write it as the instruction you want future-you to receive.- - Optional '--description "<text>"' — longer notes/context shown alongside the event in the web UI. Use it for anything that wouldn't fit cleanly in the title.Create a repeating event:- Add '--repeat <interval>' where interval is like '1day', '2hour', '1week', '1month'.- Optionally add '--repeat_stop_date <YYYY-MM-DD>' to stop the recurrence (local date).-- Example: 'npx @alook/cli calendar set --agent_id ${task.agentId} --event_title "daily standup summary" --datetime 2026-04-18T09:00 --repeat 1day --repeat_stop_date 2026-05-18'+- Example: 'npx @alook/cli calendar set --agent_id ${task.agentId} --event_title "<REPEAT_TASK_TITLE>" --description "<REPEAT_TASK_BODY>" --datetime 2026-04-18T09:00 --repeat 1day --repeat_stop_date 2026-05-18'List upcoming events:- Run 'npx @alook/cli calendar list --agent_id ${task.agentId}' (defaults: next 30 days, past 0 days).