| ♻️ refactor(builtin-tool): move sub-agent dispatch from `lobe-gtd` to `lobe-agent` (#14715)
* ♻️ refactor(builtin-tool): move sub-agent dispatch from lobe-gtd to lobe-agent
Move the `execTask` / `execTasks` capability out of `packages/builtin-tool-gtd/`
and into `packages/builtin-tool-lobe-agent/`, renaming the public APIs to
`callSubAgent` / `callSubAgents`. The "subtask" naming inside GTD overlapped
with the new lobe-task tool's task model and conflated planning with
sub-agent dispatch.
- API names: `execTask` → `callSubAgent`, `execTasks` → `callSubAgents`
- TS types: `ExecTaskParams` → `CallSubAgentParams`, etc.; introduce
`SubAgentTask` to replace `ExecTaskItem`
- Client UI (Inspector / Render / Streaming) ported under
`packages/builtin-tool-lobe-agent/src/client/`
- Central registries (`packages/builtin-tools/src/{inspectors,renders,streamings}.ts`)
updated to register lobe-agent
- GTD `meta.description` and system role no longer mention async tasks;
they point to lobe-agent for sub-agent dispatch
- `isSubTask` filtering in `agentConfigResolver` now excludes `lobe-agent`
(new owner of sub-agent dispatch) instead of `lobe-gtd`
- i18n: new `builtins.lobe-agent.apiName.callSubAgent*` and
`workflow.toolDisplayName.callSubAgent*` keys in default/zh-CN/en-US
Kept the executor's emitted `state.type` values (`execTask` / `execTasks` /
`execClientTask` / `execClientTasks`) unchanged so the agent-runtime
instruction layer (`exec_task` / `exec_tasks` / `exec_client_task*`) and all
downstream tests / heterogeneous executors (`builtin-tool-agent-management`,
server `agentManagement` runtime) continue to work without modification.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* ♻️ refactor(chat): rename isSubTask flag to isSubAgent
After moving sub-agent dispatch from lobe-gtd to lobe-agent, the flag name
no longer matches what it controls. Rename `isSubTask` → `isSubAgent` across
the chat / agent runtime layer and update related comments and test labels.
- `agentConfigResolver` context field + filter helper
- `streamingExecutor.internal_createAgentState` + `executeClientAgent`
signatures and call sites
- `createAgentExecutors` (exec_task / exec_client_task handlers) and
`GroupOrchestrationExecutors` (batch_exec_async_tasks)
- `chatService.createAssistantMessageStream` `resolvedAgentConfig` docs
- Test descriptions and assertions in `agentConfigResolver.test.ts` and
`streamingExecutor.test.ts`
No behavior change — the flag's filter target (`lobe-agent` identifier) is
unchanged.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* ♻️ refactor(agent-runtime): rename exec_task wire identifiers to exec_sub_agent
Bring the agent-runtime "wire" naming in line with the lobe-agent
callSubAgent / callSubAgents API rename. Three layers are renamed in lockstep
to keep the bridge between tool executors and the runtime consistent:
1. Tool-emitted state.type discriminators
- 'execTask' → 'execSubAgent'
- 'execTasks' → 'execSubAgents'
- 'execClientTask' → 'execClientSubAgent'
- 'execClientTasks' → 'execClientSubAgents'
2. AgentInstruction.type and matching TS interfaces
- 'exec_task' / 'exec_tasks' / 'exec_client_task' / 'exec_client_tasks'
→ 'exec_sub_agent' / 'exec_sub_agents' / 'exec_client_sub_agent' /
'exec_client_sub_agents'
- AgentInstructionExecTask → AgentInstructionExecSubAgent (and the three
siblings)
- ExecTaskItem → SubAgentTask
3. AgentRuntimeContext.phase + matching payload types
- 'task_result' → 'sub_agent_result'
- 'tasks_batch_result' → 'sub_agents_batch_result'
- TaskResultPayload → SubAgentResultPayload
- TasksBatchResultPayload → SubAgentsBatchResultPayload
Also renames the operation-type discriminator 'execClientTask' /
'execClientTasks' to 'execClientSubAgent' / 'execClientSubAgents' and updates
its locale string in default / zh-CN / en-US.
Tests / fixtures / mocks updated in lockstep:
- packages/agent-runtime/src/agents/{GeneralChatAgent.ts,__tests__/...}
- packages/builtin-tool-{lobe-agent,agent-management}/src/...
- src/server/services/toolExecution/serverRuntimes/agentManagement.ts
- packages/agent-mock/src/cases/builtins/todo-write-stress.ts (helper renamed
to callSubAgent)
- src/store/chat/agents/createAgentExecutors.ts + exec-task / exec-tasks tests
+ fixtures/mockInstructions.ts (createExecSubAgent[s]Instruction)
- src/store/chat/slices/aiChat/actions/streamingExecutor.ts (phase check)
- packages/conversation-flow/src/__tests__/fixtures/**/*.json (8 fixtures
retargeted from lobe-gtd/execTask[s] to lobe-agent/callSubAgent[s] with the
new state.type wire values)
No behavior change — the agent runtime, executors and tests all go through
the same code paths; only the strings on the wire change.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* ♻️ refactor(builtin-tool): absorb GTD tool (plan + todo) into lobe-agent
Delete `packages/builtin-tool-gtd/` and fold its full surface — plan, todo,
ExecutionRuntime, all client UI (Inspector / Render / Streaming /
Intervention / SortableTodoList) and the system role — into
`packages/builtin-tool-lobe-agent/`. Single `lobe-agent` identifier now
owns: plan + todo management, sub-agent dispatch, and visual media analysis.
Also restructures the lobe-agent package so the executor lives under
`./client/` alongside the UI it ships with, and drops the dedicated
`./executor` export — consumers go through `./client` for everything
client-side.
Package-level changes:
- DELETE `packages/builtin-tool-gtd/` entirely.
- `packages/builtin-tool-lobe-agent/`
- Move `src/executor/` → `src/client/executor/`. Drop `./executor` from
`package.json` exports; expose `lobeAgentExecutor` via `./client` only.
- Rename `GTDExecutionRuntime` → `PlanExecutionRuntime` and place under
`src/client/executor/PlanRuntime/`. Re-export from package root so the
server runtime can consume it without pulling in client UI deps.
- Extend `LobeAgentExecutor` with `createPlan` / `updatePlan` /
`createTodos` / `updateTodos` / `clearTodos`, all delegated to the
shared runtime.
- Add Plan + Todo API entries to the manifest (with their original
descriptions, humanIntervention, renderDisplayControl).
- Move all GTD client UI verbatim:
`Inspector/{ClearTodos,CreatePlan,CreateTodos,UpdatePlan,UpdateTodos}`,
`Render/{CreatePlan,TodoList}`, `Streaming/CreatePlan`,
`Intervention/{AddTodo,ClearTodos,CreatePlan}`,
`components/SortableTodoList`. Register them in
`LobeAgentInspectors / Renders / Streamings`, add new
`LobeAgentInterventions`.
- Merge GTD system role into lobe-agent's (`<plan_and_todos>` plus the
existing `<sub_agents>` and `<run_in_client>` sections).
- `package.json`: pick up `@lobechat/prompts` dep and `@lobehub/editor` +
`antd` + `lucide-react` peer-deps inherited from GTD.
Central registries (`packages/builtin-tools/src/*`) and consumers:
- Remove every `GTDManifest / Inspectors / Renders / Streamings /
Interventions` import + registration; existing `LobeAgent*` registrations
now cover them.
- Replace `[GTDManifest.identifier]: GTDInterventions` with
`[LobeAgentManifest.identifier]: LobeAgentInterventions`.
- Drop `@lobechat/builtin-tool-gtd` workspace dep from
`packages/builtin-tools/package.json`, `packages/builtin-agents/package.json`
and root `package.json`.
- Remove `gtdExecutor` from `src/store/tool/slices/builtin/executors/index.ts`;
switch `lobeAgentExecutor` import to `/client`.
- Replace `serverRuntimes/gtd.ts` with a service factory
`serverRuntimes/lobeAgentPlan.ts` (`createServerPlanRuntimeService`).
`serverRuntimes/lobeAgent.ts` instantiates `PlanExecutionRuntime` with
that service so the registry exposes one runtime per `lobe-agent`
identifier covering both visual analysis and plan/todo.
- `services/chat/mecha/contextEngineering.ts`: gate plan/todo injection on
`LobeAgentIdentifier` instead of `GTDIdentifier`.
- `agentConfigResolver.test.ts`: switch fixture plugin IDs to
`LobeAgentIdentifier`.
- `packages/const/src/recommendedSkill.ts`: drop the standalone `lobe-gtd`
recommendation — `lobe-agent` already covers it via `defaultToolIds`.
i18n migration (default + zh-CN + en-US; other locales regenerate on
`pnpm i18n`):
- `builtins.lobe-gtd.*` → `builtins.lobe-agent.*` in `plugin.ts/json`.
- `lobe-gtd.*` (tool namespace) → `lobe-agent.*` in `tool.ts/json`.
- Remove `tools.builtins.lobe-gtd.{description,readme,title}` from
`setting.ts/json` (lobe-agent has its own meta now).
- Update all client component `t(...)` keys to the new namespace.
Mocks / fixtures / tests:
- `packages/agent-mock/src/cases/builtins/todo-write-stress.ts`: all
`identifier: 'lobe-gtd'` → `'lobe-agent'`; helper comments updated.
- `packages/types/src/stepContext.ts`: comment refers to
`builtin-tool-lobe-agent` (the only consumer of `StepContextTodoItem`).
- `packages/model-runtime/src/core/streams/google/google-ai.test.ts`:
function-call names from `lobe-gtd____createPlan` etc. → `lobe-agent____*`.
- `src/store/chat/slices/message/selectors/dbMessage.test.ts`: same.
- `src/features/DevPanel/RenderGallery/fixtures/lobe-gtd.ts` deleted; its
plan/todo fixtures are folded into `fixtures/lobe-agent.ts` alongside the
existing `callSubAgent[s]` ones.
- Replace `console.log` → `console.info` in moved client components to
satisfy lobe-agent's stricter ESLint rules (GTD package allowed
`console.log`; lobe-agent inherits the repo-wide `no-console` rule).
No behavior change for end users: `lobe-agent` now owns all the APIs,
identifiers, and UI that previously lived in `lobe-gtd`, but as a single
consolidated package under a single tool identifier.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* ♻️ refactor(context-engine): drop residual GTD naming, rename to PlanInjector / TodoInjector
Follow-up to 9ca5c9d (which absorbed the GTD tool package into lobe-agent).
That commit moved the package surface but left the GTD vocabulary embedded
in context-engine providers, types, metadata fields, XML tags, and a pile
of comments. This change finishes the sweep so the only remaining GTD
references are user-facing docs and the legitimate Productivity & GTD Coach
methodology suggestion.
context-engine
- `GTDPlanInjector` → `PlanInjector`; types `GTDPlan`/`GTDPlanInjectorConfig`
→ `Plan`/`PlanInjectorConfig`; metadata `gtdPlanId`/`gtdPlanInjected` →
`planId`/`planInjected`; XML tag `<gtd_plan>` → `<plan>`; debug channel
`provider:GTDPlanInjector` → `provider:PlanInjector`.
- `GTDTodoInjector` → `TodoInjector`; types `GTDTodoItem`/`GTDTodoList`/
`GTDTodoStatus`/`GTDTodoInjectorConfig` → `TodoItem`/`TodoList`/
`TodoStatus`/`TodoInjectorConfig`; metadata `gtdTodo*` → `todo*`;
XML tag `<gtd_todos>` → `<todos>`, wrapper `gtd_todo_context` →
`todo_context`; debug channel renamed similarly.
- `MessagesEngineParams.gtd?: GTDConfig` → `planTodo?: PlanTodoConfig`;
internal vars `isGTDPlanEnabled`/`isGTDTodoEnabled` →
`isPlanEnabled`/`isTodoEnabled`. Re-exports updated in `providers/index.ts`
and `engine/messages/{index,types}.ts`.
prompts
- `packages/prompts/src/prompts/gtd/` → `planTodo/` (only export was
`formatTodoStateSummary`, which kept its name). Updated `prompts/index.ts`
re-export.
src/services
- `contextEngineering.ts`: `GTDConfig` import → `PlanTodoConfig`;
`isGTDEnabled`/`gtdConfig` → `isPlanTodoEnabled`/`planTodoConfig`; payload
field `gtd` → `planTodo`; log message wording.
Tests
- `dbMessage.test.ts`: helper `createGTDToolMessage` →
`createLobeAgentToolMessage`; `gtdMessage` → `lobeAgentMessage`; all `it`
descriptions reworded to "lobe-agent" instead of "GTD".
- `agentConfigResolver.test.ts`: test descriptions reworded.
Comments / docs (no behavior change)
- agent-runtime (`instruction.ts`, `runtime.ts`, `generalAgent.ts`,
`messageSelectors.ts`), `types/{stepContext,tool/builtin}.ts`,
`builtin-agents/group-supervisor`, `builtin-tool-claude-code/types.ts`,
`builtin-tool-lobe-agent/Render/TodoList`, `createAgentExecutors.ts:1426`,
`AssistantGroup/{constants,Fallback.test}`, `agent-mock/todo-write-stress`,
`.agents/skills/builtin-tool/references/architecture.md`.
Intentionally left alone
- `docs/usage/agent/gtd.{mdx,zh-CN.mdx}` and other docs — user-facing
product brand "GTD Tools".
- `src/locales/default/suggestQuestions.ts` "Productivity & GTD Coach" —
references the methodology, not the tool.
- `ToolSystemRoleProvider.test.ts` `'gtd-tool'` fixture — generic test
identifier, unrelated.
- Translated locale files still carrying `lobe-gtd.*` keys — regenerated by
`pnpm i18n` from the updated default namespace.
Verified: `bun run type-check` passes; touched test files
(dbMessage, agentConfigResolver) and full context-engine + prompts test
suites pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* 🐛 fix(builtin-tool-lobe-agent): reset TodoList auto-save status to idle
`performSave` (the debounced auto-save path) was leaving `saveStatus` stuck
on 'saved' forever — `saveNow` had the 1.5s setTimeout-to-idle but the
auto-save twin didn't, so the inline indicator never eased back to idle
after a settle. Add the same idle-reset to performSave so both paths
behave the same.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> | 11 天前 |
| ✨ feat(agent-mock): add agent mock devtools with playback & fixture viewer (#14436)
* :package: feat(agent-mock): scaffold package skeleton
* :wrench: chore(agent-mock): align deps + add vitest config
* :sparkles: feat(agent-mock): add core types
* :sparkles: feat(agent-mock): add chunkSplitter with code-point safety
* :sparkles: feat(agent-mock): map ExecutionSnapshot → MockEvent[]
* :sparkles: feat(agent-mock): add defineCase / llmStep / toolStep / errorStep DSL
* :sparkles: feat(agent-mock): add snapshotToMockCase helper
* :sparkles: feat(agent-mock): add todo-write-stress builtin case + registry
* :sparkles: feat(agent-mock): add generator registry + tool-stress generator
* :sparkles: feat(agent-mock): add 4 more builtin cases (long-reasoning, mixed, error, subagent)
* :sparkles: feat(agent-mock): add subagent-tree + long-reasoning generators
* :sparkles: feat(agent-mock): add MockPlayer state machine + step navigation
* :sparkles: feat(agent-mock): add __agentMockSilent flag + signal bridge guard
* :sparkles: feat(agent-mock): add executeMockStream with side-effect gating
* :sparkles: feat(agent-mock): add dev-only devClearMockTopics TRPC procedure
* :sparkles: feat(agent-mock): add dev API to list/read .agent-tracing snapshots
* :sparkles: feat(agent-mock): add agentMockStore zustand
* :sparkles: feat(agent-mock): add useMockCases hook
* :sparkles: feat(agent-mock): add useAgentMockPlayer hook
* :sparkles: feat(agent-mock): add useMockTopicCleanup hook
* :sparkles: feat(agent-mock): add Fab entry component
* :sparkles: feat(agent-mock): add Modal shell with tab bar
* :sparkles: feat(agent-mock): add CaseList sidebar with search + groups
* :sparkles: feat(agent-mock): add MiniBar floating playback controls
* :sparkles: feat(agent-mock): add StatusGrid component
* :sparkles: feat(agent-mock): add Controls (play/pause/step/speed)
* :sparkles: feat(agent-mock): add ProgressBar
* :sparkles: feat(agent-mock): add TargetPicker
* :sparkles: feat(agent-mock): compose PlayerPanel
* :sparkles: feat(agent-mock): add TimelinePanel + virtualized EventRow
* :sparkles: feat(agent-mock): add read-only FixtureViewer with copy button
* :sparkles: feat(agent-mock): add SettingsPanel with toggles + clear topics
* :recycle: refactor(agent-mock): address quality review (stable itemContent, type-safe error handling, clipboard catch)
* :sparkles: feat(agent-mock): wire entry component (FAB + Modal + MiniBar)
* :sparkles: feat(agent-mock): mount AgentMockDevtools in SPAGlobalProvider
* :recycle: refactor(agent-mock): switch Modal to imperative createModal API
* :bug: fix(agent-mock): use close() + onOpenChangeComplete to preserve motion exit animation
* work
Signed-off-by: Innei <tukon479@gmail.com>
* minify
Signed-off-by: Innei <tukon479@gmail.com>
* :lipstick: refactor(agent-mock): rebuild devtools UI/UX with mono palette and IA reorg
Replace the in-modal sidebar + tab strip + MiniBar with a Fab-anchored
draggable Popover (case picker, transport, replay/loop, scrubbable progress,
stop, Open DevTools) and a token-driven Modal layout (two-row header,
Segmented view tabs, StatsStrip, sticky TransportBar). Wire EventRow and the
progress bars to seekToEventIndex (resolves the prior TODO), swap alert() for
toast.warning, persist loop and popover position to localStorage.
* work
Signed-off-by: Innei <tukon479@gmail.com>
* :broom: chore(agent-mock): remove replay debug logs
* 👷 build: add @google/genai to pnpm allowBuilds
Fixes ERR_PNPM_IGNORED_BUILDS in CI — pnpm v11 blocks install
when a dependency with install scripts is not in the allowBuilds list.
* 🐛 fix: resolve TS type errors in useAgentMockPlayer
- parentMessageId: coerce `undefined` to `null` to match `string | null`
- threadId: coerce `null` to `undefined` for cancelOperations param
* :recycle: refactor: revert ConversationArea & sync-import AgentMockDevtools
- ConversationArea: restore messageMapKey(context), avoid needless field spread
- SPAGlobalProvider: switch AgentMockDevtools to sync import (dev-only, no need to lazy)
---------
Signed-off-by: Innei <tukon479@gmail.com> | 17 天前 |
| ✨ feat(agent-mock): add agent mock devtools with playback & fixture viewer (#14436)
* :package: feat(agent-mock): scaffold package skeleton
* :wrench: chore(agent-mock): align deps + add vitest config
* :sparkles: feat(agent-mock): add core types
* :sparkles: feat(agent-mock): add chunkSplitter with code-point safety
* :sparkles: feat(agent-mock): map ExecutionSnapshot → MockEvent[]
* :sparkles: feat(agent-mock): add defineCase / llmStep / toolStep / errorStep DSL
* :sparkles: feat(agent-mock): add snapshotToMockCase helper
* :sparkles: feat(agent-mock): add todo-write-stress builtin case + registry
* :sparkles: feat(agent-mock): add generator registry + tool-stress generator
* :sparkles: feat(agent-mock): add 4 more builtin cases (long-reasoning, mixed, error, subagent)
* :sparkles: feat(agent-mock): add subagent-tree + long-reasoning generators
* :sparkles: feat(agent-mock): add MockPlayer state machine + step navigation
* :sparkles: feat(agent-mock): add __agentMockSilent flag + signal bridge guard
* :sparkles: feat(agent-mock): add executeMockStream with side-effect gating
* :sparkles: feat(agent-mock): add dev-only devClearMockTopics TRPC procedure
* :sparkles: feat(agent-mock): add dev API to list/read .agent-tracing snapshots
* :sparkles: feat(agent-mock): add agentMockStore zustand
* :sparkles: feat(agent-mock): add useMockCases hook
* :sparkles: feat(agent-mock): add useAgentMockPlayer hook
* :sparkles: feat(agent-mock): add useMockTopicCleanup hook
* :sparkles: feat(agent-mock): add Fab entry component
* :sparkles: feat(agent-mock): add Modal shell with tab bar
* :sparkles: feat(agent-mock): add CaseList sidebar with search + groups
* :sparkles: feat(agent-mock): add MiniBar floating playback controls
* :sparkles: feat(agent-mock): add StatusGrid component
* :sparkles: feat(agent-mock): add Controls (play/pause/step/speed)
* :sparkles: feat(agent-mock): add ProgressBar
* :sparkles: feat(agent-mock): add TargetPicker
* :sparkles: feat(agent-mock): compose PlayerPanel
* :sparkles: feat(agent-mock): add TimelinePanel + virtualized EventRow
* :sparkles: feat(agent-mock): add read-only FixtureViewer with copy button
* :sparkles: feat(agent-mock): add SettingsPanel with toggles + clear topics
* :recycle: refactor(agent-mock): address quality review (stable itemContent, type-safe error handling, clipboard catch)
* :sparkles: feat(agent-mock): wire entry component (FAB + Modal + MiniBar)
* :sparkles: feat(agent-mock): mount AgentMockDevtools in SPAGlobalProvider
* :recycle: refactor(agent-mock): switch Modal to imperative createModal API
* :bug: fix(agent-mock): use close() + onOpenChangeComplete to preserve motion exit animation
* work
Signed-off-by: Innei <tukon479@gmail.com>
* minify
Signed-off-by: Innei <tukon479@gmail.com>
* :lipstick: refactor(agent-mock): rebuild devtools UI/UX with mono palette and IA reorg
Replace the in-modal sidebar + tab strip + MiniBar with a Fab-anchored
draggable Popover (case picker, transport, replay/loop, scrubbable progress,
stop, Open DevTools) and a token-driven Modal layout (two-row header,
Segmented view tabs, StatsStrip, sticky TransportBar). Wire EventRow and the
progress bars to seekToEventIndex (resolves the prior TODO), swap alert() for
toast.warning, persist loop and popover position to localStorage.
* work
Signed-off-by: Innei <tukon479@gmail.com>
* :broom: chore(agent-mock): remove replay debug logs
* 👷 build: add @google/genai to pnpm allowBuilds
Fixes ERR_PNPM_IGNORED_BUILDS in CI — pnpm v11 blocks install
when a dependency with install scripts is not in the allowBuilds list.
* 🐛 fix: resolve TS type errors in useAgentMockPlayer
- parentMessageId: coerce `undefined` to `null` to match `string | null`
- threadId: coerce `null` to `undefined` for cancelOperations param
* :recycle: refactor: revert ConversationArea & sync-import AgentMockDevtools
- ConversationArea: restore messageMapKey(context), avoid needless field spread
- SPAGlobalProvider: switch AgentMockDevtools to sync import (dev-only, no need to lazy)
---------
Signed-off-by: Innei <tukon479@gmail.com> | 17 天前 |
| ✨ feat(agent-mock): add agent mock devtools with playback & fixture viewer (#14436)
* :package: feat(agent-mock): scaffold package skeleton
* :wrench: chore(agent-mock): align deps + add vitest config
* :sparkles: feat(agent-mock): add core types
* :sparkles: feat(agent-mock): add chunkSplitter with code-point safety
* :sparkles: feat(agent-mock): map ExecutionSnapshot → MockEvent[]
* :sparkles: feat(agent-mock): add defineCase / llmStep / toolStep / errorStep DSL
* :sparkles: feat(agent-mock): add snapshotToMockCase helper
* :sparkles: feat(agent-mock): add todo-write-stress builtin case + registry
* :sparkles: feat(agent-mock): add generator registry + tool-stress generator
* :sparkles: feat(agent-mock): add 4 more builtin cases (long-reasoning, mixed, error, subagent)
* :sparkles: feat(agent-mock): add subagent-tree + long-reasoning generators
* :sparkles: feat(agent-mock): add MockPlayer state machine + step navigation
* :sparkles: feat(agent-mock): add __agentMockSilent flag + signal bridge guard
* :sparkles: feat(agent-mock): add executeMockStream with side-effect gating
* :sparkles: feat(agent-mock): add dev-only devClearMockTopics TRPC procedure
* :sparkles: feat(agent-mock): add dev API to list/read .agent-tracing snapshots
* :sparkles: feat(agent-mock): add agentMockStore zustand
* :sparkles: feat(agent-mock): add useMockCases hook
* :sparkles: feat(agent-mock): add useAgentMockPlayer hook
* :sparkles: feat(agent-mock): add useMockTopicCleanup hook
* :sparkles: feat(agent-mock): add Fab entry component
* :sparkles: feat(agent-mock): add Modal shell with tab bar
* :sparkles: feat(agent-mock): add CaseList sidebar with search + groups
* :sparkles: feat(agent-mock): add MiniBar floating playback controls
* :sparkles: feat(agent-mock): add StatusGrid component
* :sparkles: feat(agent-mock): add Controls (play/pause/step/speed)
* :sparkles: feat(agent-mock): add ProgressBar
* :sparkles: feat(agent-mock): add TargetPicker
* :sparkles: feat(agent-mock): compose PlayerPanel
* :sparkles: feat(agent-mock): add TimelinePanel + virtualized EventRow
* :sparkles: feat(agent-mock): add read-only FixtureViewer with copy button
* :sparkles: feat(agent-mock): add SettingsPanel with toggles + clear topics
* :recycle: refactor(agent-mock): address quality review (stable itemContent, type-safe error handling, clipboard catch)
* :sparkles: feat(agent-mock): wire entry component (FAB + Modal + MiniBar)
* :sparkles: feat(agent-mock): mount AgentMockDevtools in SPAGlobalProvider
* :recycle: refactor(agent-mock): switch Modal to imperative createModal API
* :bug: fix(agent-mock): use close() + onOpenChangeComplete to preserve motion exit animation
* work
Signed-off-by: Innei <tukon479@gmail.com>
* minify
Signed-off-by: Innei <tukon479@gmail.com>
* :lipstick: refactor(agent-mock): rebuild devtools UI/UX with mono palette and IA reorg
Replace the in-modal sidebar + tab strip + MiniBar with a Fab-anchored
draggable Popover (case picker, transport, replay/loop, scrubbable progress,
stop, Open DevTools) and a token-driven Modal layout (two-row header,
Segmented view tabs, StatsStrip, sticky TransportBar). Wire EventRow and the
progress bars to seekToEventIndex (resolves the prior TODO), swap alert() for
toast.warning, persist loop and popover position to localStorage.
* work
Signed-off-by: Innei <tukon479@gmail.com>
* :broom: chore(agent-mock): remove replay debug logs
* 👷 build: add @google/genai to pnpm allowBuilds
Fixes ERR_PNPM_IGNORED_BUILDS in CI — pnpm v11 blocks install
when a dependency with install scripts is not in the allowBuilds list.
* 🐛 fix: resolve TS type errors in useAgentMockPlayer
- parentMessageId: coerce `undefined` to `null` to match `string | null`
- threadId: coerce `null` to `undefined` for cancelOperations param
* :recycle: refactor: revert ConversationArea & sync-import AgentMockDevtools
- ConversationArea: restore messageMapKey(context), avoid needless field spread
- SPAGlobalProvider: switch AgentMockDevtools to sync import (dev-only, no need to lazy)
---------
Signed-off-by: Innei <tukon479@gmail.com> | 17 天前 |
| ✨ feat(agent-mock): add agent mock devtools with playback & fixture viewer (#14436)
* :package: feat(agent-mock): scaffold package skeleton
* :wrench: chore(agent-mock): align deps + add vitest config
* :sparkles: feat(agent-mock): add core types
* :sparkles: feat(agent-mock): add chunkSplitter with code-point safety
* :sparkles: feat(agent-mock): map ExecutionSnapshot → MockEvent[]
* :sparkles: feat(agent-mock): add defineCase / llmStep / toolStep / errorStep DSL
* :sparkles: feat(agent-mock): add snapshotToMockCase helper
* :sparkles: feat(agent-mock): add todo-write-stress builtin case + registry
* :sparkles: feat(agent-mock): add generator registry + tool-stress generator
* :sparkles: feat(agent-mock): add 4 more builtin cases (long-reasoning, mixed, error, subagent)
* :sparkles: feat(agent-mock): add subagent-tree + long-reasoning generators
* :sparkles: feat(agent-mock): add MockPlayer state machine + step navigation
* :sparkles: feat(agent-mock): add __agentMockSilent flag + signal bridge guard
* :sparkles: feat(agent-mock): add executeMockStream with side-effect gating
* :sparkles: feat(agent-mock): add dev-only devClearMockTopics TRPC procedure
* :sparkles: feat(agent-mock): add dev API to list/read .agent-tracing snapshots
* :sparkles: feat(agent-mock): add agentMockStore zustand
* :sparkles: feat(agent-mock): add useMockCases hook
* :sparkles: feat(agent-mock): add useAgentMockPlayer hook
* :sparkles: feat(agent-mock): add useMockTopicCleanup hook
* :sparkles: feat(agent-mock): add Fab entry component
* :sparkles: feat(agent-mock): add Modal shell with tab bar
* :sparkles: feat(agent-mock): add CaseList sidebar with search + groups
* :sparkles: feat(agent-mock): add MiniBar floating playback controls
* :sparkles: feat(agent-mock): add StatusGrid component
* :sparkles: feat(agent-mock): add Controls (play/pause/step/speed)
* :sparkles: feat(agent-mock): add ProgressBar
* :sparkles: feat(agent-mock): add TargetPicker
* :sparkles: feat(agent-mock): compose PlayerPanel
* :sparkles: feat(agent-mock): add TimelinePanel + virtualized EventRow
* :sparkles: feat(agent-mock): add read-only FixtureViewer with copy button
* :sparkles: feat(agent-mock): add SettingsPanel with toggles + clear topics
* :recycle: refactor(agent-mock): address quality review (stable itemContent, type-safe error handling, clipboard catch)
* :sparkles: feat(agent-mock): wire entry component (FAB + Modal + MiniBar)
* :sparkles: feat(agent-mock): mount AgentMockDevtools in SPAGlobalProvider
* :recycle: refactor(agent-mock): switch Modal to imperative createModal API
* :bug: fix(agent-mock): use close() + onOpenChangeComplete to preserve motion exit animation
* work
Signed-off-by: Innei <tukon479@gmail.com>
* minify
Signed-off-by: Innei <tukon479@gmail.com>
* :lipstick: refactor(agent-mock): rebuild devtools UI/UX with mono palette and IA reorg
Replace the in-modal sidebar + tab strip + MiniBar with a Fab-anchored
draggable Popover (case picker, transport, replay/loop, scrubbable progress,
stop, Open DevTools) and a token-driven Modal layout (two-row header,
Segmented view tabs, StatsStrip, sticky TransportBar). Wire EventRow and the
progress bars to seekToEventIndex (resolves the prior TODO), swap alert() for
toast.warning, persist loop and popover position to localStorage.
* work
Signed-off-by: Innei <tukon479@gmail.com>
* :broom: chore(agent-mock): remove replay debug logs
* 👷 build: add @google/genai to pnpm allowBuilds
Fixes ERR_PNPM_IGNORED_BUILDS in CI — pnpm v11 blocks install
when a dependency with install scripts is not in the allowBuilds list.
* 🐛 fix: resolve TS type errors in useAgentMockPlayer
- parentMessageId: coerce `undefined` to `null` to match `string | null`
- threadId: coerce `null` to `undefined` for cancelOperations param
* :recycle: refactor: revert ConversationArea & sync-import AgentMockDevtools
- ConversationArea: restore messageMapKey(context), avoid needless field spread
- SPAGlobalProvider: switch AgentMockDevtools to sync import (dev-only, no need to lazy)
---------
Signed-off-by: Innei <tukon479@gmail.com> | 17 天前 |