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
fix: use agent steps in timeline
Gus92d99d9d8c3d
diff --git a/src/cli/daemon/daemon.ts b/src/cli/daemon/daemon.tsindex ebc012587..d8d59d789 100644--- a/src/cli/daemon/daemon.ts+++ b/src/cli/daemon/daemon.ts@@ -294,10 +294,10 @@ async function runTask(output: msg.output,});- // Context timeline — record assistant text messages as steps+ // Context timeline — record assistant text messagesif (msg.type === "text" && msg.content) {updateEntry(timelineDir, task.id, (entry) => {- entry.steps.push(msg.content!);+ entry.agent_responses.push(msg.content!);});}@@ -334,7 +334,6 @@ async function runTask(entry.session_id = result.sessionId || null;entry.pid = null;entry.status = "completed";- entry.response = result.output || null;});} else {updateEntry(timelineDir, task.id, (entry) => {diff --git a/src/cli/daemon/execenv/__tests__/timeline.test.ts b/src/cli/daemon/execenv/__tests__/timeline.test.tsindex 387ffde51..033145094 100644--- a/src/cli/daemon/execenv/__tests__/timeline.test.ts+++ b/src/cli/daemon/execenv/__tests__/timeline.test.ts@@ -54,8 +54,7 @@ describe("timeline", () => {expect(entries[0].status).toBe("running");expect(entries[0].prompt).toBe("do something");expect(entries[0].type).toBe("user_dm_message");- expect(entries[0].steps).toEqual([]);- expect(entries[0].response).toBeNull();+ expect(entries[0].agent_responses).toEqual([]);expect(entries[0].errmsg).toBeNull();});@@ -73,11 +72,11 @@ describe("timeline", () => {initEntry(dir, entry);updateEntry(dir, "t_abc", (e) => {- e.steps.push("Step 1: Looking at the code...");+ e.agent_responses.push("Step 1: Looking at the code...");});const entries = readEntries();- expect(entries[0].steps).toEqual(["Step 1: Looking at the code..."]);+ expect(entries[0].agent_responses).toEqual(["Step 1: Looking at the code..."]);});it("updateEntry sets completion fields correctly", () => {@@ -88,14 +87,12 @@ describe("timeline", () => {e.session_id = "sess_123";e.pid = null;e.status = "completed";- e.response = "Done! Here is the result.";});const entries = readEntries();expect(entries[0].session_id).toBe("sess_123");expect(entries[0].pid).toBeNull();expect(entries[0].status).toBe("completed");- expect(entries[0].response).toBe("Done! Here is the result.");expect(entries[0].errmsg).toBeNull();});@@ -113,7 +110,6 @@ describe("timeline", () => {expect(entries[0].pid).toBeNull();expect(entries[0].status).toBe("failed");expect(entries[0].errmsg).toBe("something went wrong");- expect(entries[0].response).toBeNull();});it("multiple entries for different task_ids coexist in same file", () => {@@ -131,29 +127,29 @@ describe("timeline", () => {initEntry(dir, createTimelineEntry("t_2", "second task"));updateEntry(dir, "t_2", (e) => {- e.steps.push("Working on second task");+ e.agent_responses.push("Working on second task");});const entries = readEntries();- expect(entries[0].steps).toEqual([]);- expect(entries[1].steps).toEqual(["Working on second task"]);+ expect(entries[0].agent_responses).toEqual([]);+ expect(entries[1].agent_responses).toEqual(["Working on second task"]);});it("timeline operations are best-effort — errors don't propagate", () => {// updateEntry on a non-existent directory should not throw- expect(() => updateEntry("/nonexistent/path", "t_1", (e) => { e.steps.push("x"); })).not.toThrow();+ expect(() => updateEntry("/nonexistent/path", "t_1", (e) => { e.agent_responses.push("x"); })).not.toThrow();});it("updateEntry is a no-op when task_id not found", () => {initEntry(dir, createTimelineEntry("t_1", "task"));updateEntry(dir, "t_nonexistent", (e) => {- e.steps.push("should not happen");+ e.agent_responses.push("should not happen");});const entries = readEntries();expect(entries).toHaveLength(1);- expect(entries[0].steps).toEqual([]);+ expect(entries[0].agent_responses).toEqual([]);});it("datetime is local timezone with UTC offset", () => {@@ -195,12 +191,12 @@ describe("timeline", () => {// updateEntry should find it even though it's not in today's fileupdateEntry(dir, "t_old", (e) => {- e.steps.push("Updated across midnight");+ e.agent_responses.push("Updated across midnight");});const content = readFileSync(filePath, "utf-8");const updated: ContextTimelineEntry = JSON.parse(content.trimEnd());- expect(updated.steps).toEqual(["Updated across midnight"]);+ expect(updated.agent_responses).toEqual(["Updated across midnight"]);});it("updateEntry stops at first match and does not modify older files", () => {@@ -216,16 +212,16 @@ describe("timeline", () => {writeFileSync(yesterdayFile, JSON.stringify(entryYesterday) + "\n");updateEntry(dir, "t_dup", (e) => {- e.response = "done";+ e.status = "completed";});// Today's file should be updatedconst todayParsed: ContextTimelineEntry = JSON.parse(readFileSync(todayFile, "utf-8").trimEnd());- expect(todayParsed.response).toBe("done");+ expect(todayParsed.status).toBe("completed");// Yesterday's should be untouchedconst yesterdayParsed: ContextTimelineEntry = JSON.parse(readFileSync(yesterdayFile, "utf-8").trimEnd());- expect(yesterdayParsed.response).toBeNull();+ expect(yesterdayParsed.status).toBe("running");});it("updateEntry is a no-op when task_id not found in any day", () => {@@ -237,12 +233,12 @@ describe("timeline", () => {// Should not throw, just silently no-opupdateEntry(dir, "t_nonexistent", (e) => {- e.steps.push("nope");+ e.agent_responses.push("nope");});// Verify nothing changedconst todayEntries = JSON.parse(readFileSync(join(dir, _todayFilename()), "utf-8").trimEnd());- expect(todayEntries.steps).toEqual([]);+ expect(todayEntries.agent_responses).toEqual([]);});describe("findResumableSessionId", () => {@@ -262,8 +258,7 @@ describe("timeline", () => {datetime: new Date().toISOString(),type: "user_dm_message",prompt: "test",- steps: [],- response: null,+ agent_responses: [],errmsg: null,...overrides,};diff --git a/src/cli/daemon/execenv/context.ts b/src/cli/daemon/execenv/context.tsindex 55993d417..41ba06dff 100644--- a/src/cli/daemon/execenv/context.ts+++ b/src/cli/daemon/execenv/context.ts@@ -44,8 +44,7 @@ Each line is a JSON object with these fields:- "datetime" — when the task started (local timezone)- "type" — always "user_dm_message"- "prompt" — what the user asked-- "steps" — assistant text outputs during execution-- "response" — final response (null if running or failed)+- "agent_responses" — assistant text outputs during execution- "errmsg" — error message (null unless status is "failed")## RULESdiff --git a/src/cli/daemon/execenv/timeline.ts b/src/cli/daemon/execenv/timeline.tsindex 4526b0927..9e1895feb 100644--- a/src/cli/daemon/execenv/timeline.ts+++ b/src/cli/daemon/execenv/timeline.ts@@ -28,8 +28,7 @@ export interface ContextTimelineEntry {datetime: string;type: string;prompt: string;- steps: string[];- response: string | null;+ agent_responses: string[];errmsg: string | null;}@@ -202,8 +201,7 @@ export function createTimelineEntry(datetime: localISOString(),type: "user_dm_message",prompt,- steps: [],- response: null,+ agent_responses: [],errmsg: null,};}diff --git a/src/web/src/app/globals.css b/src/web/src/app/globals.cssindex 2caae1435..133f01dcf 100644--- a/src/web/src/app/globals.css+++ b/src/web/src/app/globals.css@@ -160,7 +160,7 @@bottom: -180px;right: -150px;border-radius: 68% 32% 25% 75% / 38% 72% 28% 62%;- background: oklch(0.88 0.10 85);+ background: oklch(0.90 0.06 250);animation: blob-drift-2 30s ease-in-out infinite;}diff --git a/src/web/src/components/gradient-background.tsx b/src/web/src/components/gradient-background.tsxindex 144cf7e4b..d10f6e223 100644--- a/src/web/src/components/gradient-background.tsx+++ b/src/web/src/components/gradient-background.tsx@@ -1,6 +1,10 @@"use client";+import { useId } from "react";+export function GradientBackground() {+ const filterId = useId();+return (<divaria-hidden@@ -8,7 +12,7 @@ export function GradientBackground() {>{/* Blob 1 — warm amber, top-left drift */}<div className="gradient-blob gradient-blob-1" />- {/* Blob 2 — soft peach, bottom-right drift */}+ {/* Blob 2 — cool periwinkle, bottom-right drift */}<div className="gradient-blob gradient-blob-2" />{/* Blob 3 — cream rose, top-right → center */}<div className="gradient-blob gradient-blob-3" />@@ -16,7 +20,7 @@ export function GradientBackground() {<div className="gradient-blob gradient-blob-4" />{/* Noise texture overlay */}<svg className="absolute inset-0 w-full h-full opacity-[0.25] mix-blend-multiply dark:mix-blend-overlay pointer-events-none">- <filter id="noise">+ <filter id={filterId}><feTurbulence type="fractalNoise" baseFrequency="0.75" numOctaves="4" stitchTiles="stitch" /><feComponentTransfer><feFuncR type="linear" slope="0.5" intercept="0" />@@ -24,7 +28,7 @@ export function GradientBackground() {<feFuncB type="linear" slope="0.5" intercept="0" /></feComponentTransfer></filter>- <rect width="100%" height="100%" filter="url(#noise)" />+ <rect width="100%" height="100%" filter={`url(#${filterId})`} /></svg></div>);