@agimon-ai/doompi-task 0.0.1-alpha.72 → 0.0.1-alpha.73
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.
- package/README.md +12 -3
- package/dist/_virtual/_rolldown/runtime.cjs +23 -1
- package/dist/api-contracts.cjs +7 -1
- package/dist/api-contracts.d.cts +1 -1
- package/dist/api-contracts.d.mts +1 -1
- package/dist/api-contracts.mjs +2 -1
- package/dist/commands.cjs +4 -1
- package/dist/commands.d.cts +2 -2
- package/dist/commands.d.mts +2 -2
- package/dist/commands.mjs +2 -1
- package/dist/config.cjs +19 -1
- package/dist/config.d.cts +1 -1
- package/dist/config.d.mts +1 -1
- package/dist/config.mjs +2 -1
- package/dist/delegation-manager.cjs +10 -1
- package/dist/delegation-manager.d.cts +2 -2
- package/dist/delegation-manager.d.mts +2 -2
- package/dist/delegation-manager.mjs +3 -1
- package/dist/extensions/pi.cjs +49 -2
- package/dist/extensions/pi.cjs.map +1 -1
- package/dist/extensions/pi.d.cts +3 -4
- package/dist/extensions/pi.d.cts.map +1 -1
- package/dist/extensions/pi.d.mts +3 -4
- package/dist/extensions/pi.d.mts.map +1 -1
- package/dist/extensions/pi.mjs +44 -2
- package/dist/extensions/pi.mjs.map +1 -1
- package/dist/extensions/server.cjs +56 -1
- package/dist/extensions/server.cjs.map +1 -1
- package/dist/extensions/server.d.cts +3 -3
- package/dist/extensions/server.d.cts.map +1 -1
- package/dist/extensions/server.d.mts +3 -3
- package/dist/extensions/server.d.mts.map +1 -1
- package/dist/extensions/server.mjs +51 -1
- package/dist/extensions/server.mjs.map +1 -1
- package/dist/extensions/web.mjs +1013 -0
- package/dist/extensions/web.mjs.map +1 -0
- package/dist/index.cjs +106 -1
- package/dist/index.d.cts +15 -15
- package/dist/index.d.mts +15 -15
- package/dist/index.mjs +16 -1
- package/dist/logSinkTelemetry.cjs +6 -1
- package/dist/logSinkTelemetry.d.cts +2 -2
- package/dist/logSinkTelemetry.d.mts +2 -2
- package/dist/logSinkTelemetry.mjs +3 -1
- package/dist/src/constants/promptGuidelines.cjs +26 -0
- package/dist/src/constants/promptGuidelines.cjs.map +1 -0
- package/dist/src/constants/promptGuidelines.d.cts.map +1 -0
- package/dist/src/constants/promptGuidelines.d.mts.map +1 -0
- package/dist/src/constants/promptGuidelines.mjs +26 -0
- package/dist/src/constants/promptGuidelines.mjs.map +1 -0
- package/dist/src/constants/task.cjs +6 -0
- package/dist/src/constants/task.cjs.map +1 -0
- package/dist/src/constants/task.d.cts.map +1 -0
- package/dist/src/constants/task.d.mts.map +1 -0
- package/dist/src/constants/task.mjs +6 -0
- package/dist/src/constants/task.mjs.map +1 -0
- package/dist/src/extensions/(backend)/channel/_lib/task-graph.cjs +90 -0
- package/dist/src/extensions/(backend)/channel/_lib/task-graph.cjs.map +1 -0
- package/dist/src/extensions/(backend)/channel/_lib/task-graph.mjs +89 -0
- package/dist/src/extensions/(backend)/channel/_lib/task-graph.mjs.map +1 -0
- package/dist/src/extensions/(backend)/channel/task-graph.server.cjs +7 -0
- package/dist/src/extensions/(backend)/channel/task-graph.server.cjs.map +1 -0
- package/dist/src/extensions/(backend)/channel/task-graph.server.mjs +8 -0
- package/dist/src/extensions/(backend)/channel/task-graph.server.mjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/_lib/root.cli.cjs +317 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/_lib/root.cli.cjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/_lib/root.cli.d.cts +39 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/_lib/root.cli.d.cts.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/_lib/root.cli.d.mts +39 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/_lib/root.cli.d.mts.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/_lib/root.cli.mjs +317 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/_lib/root.cli.mjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/_lib/root.server.cjs +95 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/_lib/root.server.cjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/_lib/root.server.mjs +95 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/_lib/root.server.mjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/command/_lib/tasks.cli.cjs +30 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/command/_lib/tasks.cli.cjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/command/_lib/tasks.cli.d.cts +20 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/command/_lib/tasks.cli.d.cts.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/command/_lib/tasks.cli.d.mts +20 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/command/_lib/tasks.cli.d.mts.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/command/_lib/tasks.cli.mjs +29 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/command/_lib/tasks.cli.mjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/command/_lib/tasks.server.cjs +19 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/command/_lib/tasks.server.cjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/command/_lib/tasks.server.mjs +19 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/command/_lib/tasks.server.mjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/command/tasks.cli.cjs +8 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/command/tasks.cli.cjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/command/tasks.cli.mjs +9 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/command/tasks.cli.mjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/command/tasks.server.cjs +7 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/command/tasks.server.cjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/command/tasks.server.mjs +8 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/command/tasks.server.mjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/hook/_lib/session-compact.cli.cjs +6 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/hook/_lib/session-compact.cli.cjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/hook/_lib/session-compact.cli.mjs +6 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/hook/_lib/session-compact.cli.mjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/hook/_lib/session-start.cli.cjs +6 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/hook/_lib/session-start.cli.cjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/hook/_lib/session-start.cli.mjs +6 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/hook/_lib/session-start.cli.mjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/hook/_lib/session-tree.cli.cjs +6 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/hook/_lib/session-tree.cli.cjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/hook/_lib/session-tree.cli.mjs +6 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/hook/_lib/session-tree.cli.mjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/hook/_lib/tool-execution-end.cli.cjs +6 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/hook/_lib/tool-execution-end.cli.cjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/hook/_lib/tool-execution-end.cli.mjs +6 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/hook/_lib/tool-execution-end.cli.mjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/hook/session-compact.cli.cjs +7 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/hook/session-compact.cli.cjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/hook/session-compact.cli.mjs +8 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/hook/session-compact.cli.mjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/hook/session-start.cli.cjs +7 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/hook/session-start.cli.cjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/hook/session-start.cli.mjs +8 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/hook/session-start.cli.mjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/hook/session-tree.cli.cjs +7 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/hook/session-tree.cli.cjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/hook/session-tree.cli.mjs +8 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/hook/session-tree.cli.mjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/hook/tool-execution-end.cli.cjs +7 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/hook/tool-execution-end.cli.cjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/hook/tool-execution-end.cli.mjs +8 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/hook/tool-execution-end.cli.mjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/resource/_lib/task-board.server.cjs +20 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/resource/_lib/task-board.server.cjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/resource/_lib/task-board.server.mjs +20 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/resource/_lib/task-board.server.mjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/resource/task-board.server.cjs +7 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/resource/task-board.server.cjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/resource/task-board.server.mjs +8 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/resource/task-board.server.mjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/root.cli.cjs +11 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/root.cli.cjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/root.cli.mjs +12 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/root.cli.mjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/root.server.cjs +7 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/root.server.cjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/root.server.mjs +8 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/root.server.mjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/tool/_lib/task.cli.cjs +160 -0
- package/dist/{tools/task.cjs.map → src/extensions/workspaces/sessions/(backend)/tool/_lib/task.cli.cjs.map} +1 -1
- package/dist/{tools/task.d.cts → src/extensions/workspaces/sessions/(backend)/tool/_lib/task.cli.d.cts} +11 -8
- package/dist/src/extensions/workspaces/sessions/(backend)/tool/_lib/task.cli.d.cts.map +1 -0
- package/dist/{tools/task.d.mts → src/extensions/workspaces/sessions/(backend)/tool/_lib/task.cli.d.mts} +11 -8
- package/dist/src/extensions/workspaces/sessions/(backend)/tool/_lib/task.cli.d.mts.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/tool/_lib/task.cli.mjs +157 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/tool/_lib/task.cli.mjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/tool/_lib/task.server.cjs +109 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/tool/_lib/task.server.cjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/tool/_lib/task.server.mjs +107 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/tool/_lib/task.server.mjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/tool/task.cli.cjs +7 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/tool/task.cli.cjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/tool/task.cli.mjs +8 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/tool/task.cli.mjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/tool/task.server.cjs +7 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/tool/task.server.cjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/tool/task.server.mjs +8 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/tool/task.server.mjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(frontend)/_shared/format.cli.cjs +333 -0
- package/dist/src/extensions/workspaces/sessions/(frontend)/_shared/format.cli.cjs.map +1 -0
- package/dist/{tui/format.d.mts → src/extensions/workspaces/sessions/(frontend)/_shared/format.cli.d.cts} +5 -5
- package/dist/src/extensions/workspaces/sessions/(frontend)/_shared/format.cli.d.cts.map +1 -0
- package/dist/{tui/format.d.cts → src/extensions/workspaces/sessions/(frontend)/_shared/format.cli.d.mts} +5 -5
- package/dist/src/extensions/workspaces/sessions/(frontend)/_shared/format.cli.d.mts.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(frontend)/_shared/format.cli.mjs +322 -0
- package/dist/src/extensions/workspaces/sessions/(frontend)/_shared/format.cli.mjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(frontend)/message/doom-task-notify.cli.cjs +9 -0
- package/dist/src/extensions/workspaces/sessions/(frontend)/message/doom-task-notify.cli.cjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(frontend)/message/doom-task-notify.cli.mjs +9 -0
- package/dist/src/extensions/workspaces/sessions/(frontend)/message/doom-task-notify.cli.mjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(frontend)/overlay/_lib/selectors.cjs +149 -0
- package/dist/src/extensions/workspaces/sessions/(frontend)/overlay/_lib/selectors.cjs.map +1 -0
- package/dist/{tui → src/extensions/workspaces/sessions/(frontend)/overlay/_lib}/selectors.d.cts +2 -2
- package/dist/src/extensions/workspaces/sessions/(frontend)/overlay/_lib/selectors.d.cts.map +1 -0
- package/dist/{tui → src/extensions/workspaces/sessions/(frontend)/overlay/_lib}/selectors.d.mts +2 -2
- package/dist/src/extensions/workspaces/sessions/(frontend)/overlay/_lib/selectors.d.mts.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(frontend)/overlay/_lib/selectors.mjs +142 -0
- package/dist/src/extensions/workspaces/sessions/(frontend)/overlay/_lib/selectors.mjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(frontend)/overlay/_lib/task-space.cli.cjs +358 -0
- package/dist/src/extensions/workspaces/sessions/(frontend)/overlay/_lib/task-space.cli.cjs.map +1 -0
- package/dist/{tui/taskSpace.d.cts → src/extensions/workspaces/sessions/(frontend)/overlay/_lib/task-space.cli.d.cts} +4 -3
- package/dist/src/extensions/workspaces/sessions/(frontend)/overlay/_lib/task-space.cli.d.cts.map +1 -0
- package/dist/{tui/taskSpace.d.mts → src/extensions/workspaces/sessions/(frontend)/overlay/_lib/task-space.cli.d.mts} +4 -3
- package/dist/src/extensions/workspaces/sessions/(frontend)/overlay/_lib/task-space.cli.d.mts.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(frontend)/overlay/_lib/task-space.cli.mjs +355 -0
- package/dist/src/extensions/workspaces/sessions/(frontend)/overlay/_lib/task-space.cli.mjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(frontend)/overlay/_lib/taskOverlay.cjs +165 -0
- package/dist/src/extensions/workspaces/sessions/(frontend)/overlay/_lib/taskOverlay.cjs.map +1 -0
- package/dist/{tui → src/extensions/workspaces/sessions/(frontend)/overlay/_lib}/taskOverlay.d.cts +6 -4
- package/dist/src/extensions/workspaces/sessions/(frontend)/overlay/_lib/taskOverlay.d.cts.map +1 -0
- package/dist/{tui → src/extensions/workspaces/sessions/(frontend)/overlay/_lib}/taskOverlay.d.mts +6 -4
- package/dist/src/extensions/workspaces/sessions/(frontend)/overlay/_lib/taskOverlay.d.mts.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(frontend)/overlay/_lib/taskOverlay.mjs +164 -0
- package/dist/src/extensions/workspaces/sessions/(frontend)/overlay/_lib/taskOverlay.mjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(frontend)/tool/_lib/task.cli.cjs +13 -0
- package/dist/src/extensions/workspaces/sessions/(frontend)/tool/_lib/task.cli.cjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(frontend)/tool/_lib/task.cli.mjs +13 -0
- package/dist/src/extensions/workspaces/sessions/(frontend)/tool/_lib/task.cli.mjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(frontend)/tool/task.cli.cjs +7 -0
- package/dist/src/extensions/workspaces/sessions/(frontend)/tool/task.cli.cjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(frontend)/tool/task.cli.mjs +8 -0
- package/dist/src/extensions/workspaces/sessions/(frontend)/tool/task.cli.mjs.map +1 -0
- package/dist/src/models/task.cjs +29 -0
- package/dist/src/models/task.cjs.map +1 -0
- package/dist/{models → src/models}/task.d.cts +12 -2
- package/dist/src/models/task.d.cts.map +1 -0
- package/dist/{models → src/models}/task.d.mts +12 -2
- package/dist/src/models/task.d.mts.map +1 -0
- package/dist/src/models/task.mjs +26 -0
- package/dist/src/models/task.mjs.map +1 -0
- package/dist/src/models/taskGraph.cjs +67 -0
- package/dist/src/models/taskGraph.cjs.map +1 -0
- package/dist/src/models/taskGraph.d.cts.map +1 -0
- package/dist/src/models/taskGraph.d.mts.map +1 -0
- package/dist/src/models/taskGraph.mjs +63 -0
- package/dist/src/models/taskGraph.mjs.map +1 -0
- package/dist/src/schemas/apiContracts.cjs +51 -0
- package/dist/src/schemas/apiContracts.cjs.map +1 -0
- package/dist/{schemas → src/schemas}/apiContracts.d.cts.map +1 -1
- package/dist/{schemas → src/schemas}/apiContracts.d.mts.map +1 -1
- package/dist/src/schemas/apiContracts.mjs +49 -0
- package/dist/src/schemas/apiContracts.mjs.map +1 -0
- package/dist/src/schemas/task.cjs +130 -0
- package/dist/src/schemas/task.cjs.map +1 -0
- package/dist/src/schemas/task.d.cts.map +1 -0
- package/dist/src/schemas/task.d.mts.map +1 -0
- package/dist/src/schemas/task.mjs +117 -0
- package/dist/src/schemas/task.mjs.map +1 -0
- package/dist/src/services/config/index.cjs +88 -0
- package/dist/src/services/config/index.cjs.map +1 -0
- package/dist/src/services/config/index.d.cts.map +1 -0
- package/dist/src/services/config/index.d.mts.map +1 -0
- package/dist/src/services/config/index.mjs +72 -0
- package/dist/src/services/config/index.mjs.map +1 -0
- package/dist/src/services/contextContribution/index.cjs +51 -0
- package/dist/src/services/contextContribution/index.cjs.map +1 -0
- package/dist/src/services/contextContribution/index.mjs +46 -0
- package/dist/src/services/contextContribution/index.mjs.map +1 -0
- package/dist/src/services/delegation/index.cjs +629 -0
- package/dist/src/services/delegation/index.cjs.map +1 -0
- package/dist/src/services/delegation/index.d.cts.map +1 -0
- package/dist/src/services/delegation/index.d.mts.map +1 -0
- package/dist/src/services/delegation/index.mjs +623 -0
- package/dist/src/services/delegation/index.mjs.map +1 -0
- package/dist/src/services/delegationPlatform/index.cjs +23 -0
- package/dist/src/services/delegationPlatform/index.cjs.map +1 -0
- package/dist/src/services/delegationPlatform/index.mjs +21 -0
- package/dist/src/services/delegationPlatform/index.mjs.map +1 -0
- package/dist/src/services/invariants/index.cjs +64 -0
- package/dist/src/services/invariants/index.cjs.map +1 -0
- package/dist/src/services/invariants/index.d.cts.map +1 -0
- package/dist/src/services/invariants/index.d.mts.map +1 -0
- package/dist/src/services/invariants/index.mjs +62 -0
- package/dist/src/services/invariants/index.mjs.map +1 -0
- package/dist/src/services/logSinkTelemetry/index.cjs +43 -0
- package/dist/src/services/logSinkTelemetry/index.cjs.map +1 -0
- package/dist/src/services/logSinkTelemetry/index.d.cts.map +1 -0
- package/dist/src/services/logSinkTelemetry/index.d.mts.map +1 -0
- package/dist/src/services/logSinkTelemetry/index.mjs +41 -0
- package/dist/src/services/logSinkTelemetry/index.mjs.map +1 -0
- package/dist/src/services/paths/index.cjs +233 -0
- package/dist/src/services/paths/index.cjs.map +1 -0
- package/dist/src/services/paths/index.d.cts.map +1 -0
- package/dist/src/services/paths/index.d.mts.map +1 -0
- package/dist/src/services/paths/index.mjs +218 -0
- package/dist/src/services/paths/index.mjs.map +1 -0
- package/dist/src/services/processLiveness/index.cjs +20 -0
- package/dist/src/services/processLiveness/index.cjs.map +1 -0
- package/dist/src/services/processLiveness/index.d.cts.map +1 -0
- package/dist/src/services/processLiveness/index.d.mts.map +1 -0
- package/dist/src/services/processLiveness/index.mjs +20 -0
- package/dist/src/services/processLiveness/index.mjs.map +1 -0
- package/dist/src/services/reconcile/index.cjs +65 -0
- package/dist/src/services/reconcile/index.cjs.map +1 -0
- package/dist/src/services/reconcile/index.d.cts.map +1 -0
- package/dist/src/services/reconcile/index.d.mts.map +1 -0
- package/dist/src/services/reconcile/index.mjs +63 -0
- package/dist/src/services/reconcile/index.mjs.map +1 -0
- package/dist/src/services/reducer/index.cjs +350 -0
- package/dist/src/services/reducer/index.cjs.map +1 -0
- package/dist/src/services/reducer/index.d.cts.map +1 -0
- package/dist/src/services/reducer/index.d.mts.map +1 -0
- package/dist/src/services/reducer/index.mjs +345 -0
- package/dist/src/services/reducer/index.mjs.map +1 -0
- package/dist/src/services/taskNarration/index.cjs +32 -0
- package/dist/src/services/taskNarration/index.cjs.map +1 -0
- package/dist/src/services/taskNarration/index.mjs +32 -0
- package/dist/src/services/taskNarration/index.mjs.map +1 -0
- package/dist/src/services/taskResult/index.cjs +174 -0
- package/dist/src/services/taskResult/index.cjs.map +1 -0
- package/dist/src/services/taskResult/index.d.cts.map +1 -0
- package/dist/src/services/taskResult/index.d.mts.map +1 -0
- package/dist/src/services/taskResult/index.mjs +165 -0
- package/dist/src/services/taskResult/index.mjs.map +1 -0
- package/dist/src/services/taskStore/index.cjs +216 -0
- package/dist/src/services/taskStore/index.cjs.map +1 -0
- package/dist/src/services/taskStore/index.d.cts.map +1 -0
- package/dist/src/services/taskStore/index.d.mts.map +1 -0
- package/dist/src/services/taskStore/index.mjs +213 -0
- package/dist/src/services/taskStore/index.mjs.map +1 -0
- package/dist/src/types/delegation.cjs +7 -0
- package/dist/src/types/delegation.cjs.map +1 -0
- package/dist/{types → src/types}/delegation.d.cts.map +1 -1
- package/dist/{types → src/types}/delegation.d.mts.map +1 -1
- package/dist/src/types/delegation.mjs +7 -0
- package/dist/src/types/delegation.mjs.map +1 -0
- package/dist/src/types/telemetry.cjs +26 -0
- package/dist/src/types/telemetry.cjs.map +1 -0
- package/dist/src/types/telemetry.d.cts.map +1 -0
- package/dist/src/types/telemetry.d.mts.map +1 -0
- package/dist/src/types/telemetry.mjs +26 -0
- package/dist/src/types/telemetry.mjs.map +1 -0
- package/dist/src/types/webTasks.cjs +7 -0
- package/dist/src/types/webTasks.cjs.map +1 -0
- package/dist/src/types/webTasks.mjs +7 -0
- package/dist/src/types/webTasks.mjs.map +1 -0
- package/dist/store-invariants.cjs +5 -1
- package/dist/store-invariants.d.cts +1 -1
- package/dist/store-invariants.d.mts +1 -1
- package/dist/store-invariants.mjs +2 -1
- package/dist/store-paths.cjs +14 -1
- package/dist/store-paths.d.cts +1 -1
- package/dist/store-paths.d.mts +1 -1
- package/dist/store-paths.mjs +2 -1
- package/dist/store-process-liveness.cjs +3 -1
- package/dist/store-process-liveness.d.cts +1 -1
- package/dist/store-process-liveness.d.mts +1 -1
- package/dist/store-process-liveness.mjs +2 -1
- package/dist/store-reconcile.cjs +5 -1
- package/dist/store-reconcile.d.cts +1 -1
- package/dist/store-reconcile.d.mts +1 -1
- package/dist/store-reconcile.mjs +2 -1
- package/dist/store-reducer.cjs +8 -1
- package/dist/store-reducer.d.cts +1 -1
- package/dist/store-reducer.d.mts +1 -1
- package/dist/store-reducer.mjs +2 -1
- package/dist/store-task-graph.cjs +7 -1
- package/dist/store-task-graph.d.cts +1 -1
- package/dist/store-task-graph.d.mts +1 -1
- package/dist/store-task-graph.mjs +2 -1
- package/dist/store-task-store.cjs +3 -1
- package/dist/store-task-store.d.cts +1 -1
- package/dist/store-task-store.d.mts +1 -1
- package/dist/store-task-store.mjs +2 -1
- package/dist/store-types.cjs +6 -1
- package/dist/store-types.d.cts +1 -1
- package/dist/store-types.d.mts +1 -1
- package/dist/store-types.mjs +2 -1
- package/dist/tool-prompt-guidelines.cjs +3 -1
- package/dist/tool-prompt-guidelines.d.cts +1 -1
- package/dist/tool-prompt-guidelines.d.mts +1 -1
- package/dist/tool-prompt-guidelines.mjs +2 -1
- package/dist/tool-response-envelope.cjs +12 -1
- package/dist/tool-response-envelope.d.cts +1 -1
- package/dist/tool-response-envelope.d.mts +1 -1
- package/dist/tool-response-envelope.mjs +2 -1
- package/dist/tool-schema.cjs +17 -1
- package/dist/tool-schema.d.cts +2 -2
- package/dist/tool-schema.d.mts +2 -2
- package/dist/tool-schema.mjs +3 -1
- package/dist/tool-task-tool.cjs +6 -1
- package/dist/tool-task-tool.d.cts +2 -2
- package/dist/tool-task-tool.d.mts +2 -2
- package/dist/tool-task-tool.mjs +3 -1
- package/dist/tui-format.cjs +14 -1
- package/dist/tui-format.d.cts +1 -1
- package/dist/tui-format.d.mts +1 -1
- package/dist/tui-format.mjs +2 -1
- package/dist/tui-selectors.cjs +10 -1
- package/dist/tui-selectors.d.cts +1 -1
- package/dist/tui-selectors.d.mts +1 -1
- package/dist/tui-selectors.mjs +2 -1
- package/dist/tui-task-overlay.cjs +4 -1
- package/dist/tui-task-overlay.d.cts +2 -2
- package/dist/tui-task-overlay.d.mts +2 -2
- package/dist/tui-task-overlay.mjs +2 -1
- package/dist/tui-task-space.cjs +5 -1
- package/dist/tui-task-space.d.cts +1 -1
- package/dist/tui-task-space.d.mts +1 -1
- package/dist/tui-task-space.mjs +2 -1
- package/package.json +15 -14
- package/dist/constants/promptGuidelines.cjs +0 -2
- package/dist/constants/promptGuidelines.cjs.map +0 -1
- package/dist/constants/promptGuidelines.d.cts.map +0 -1
- package/dist/constants/promptGuidelines.d.mts.map +0 -1
- package/dist/constants/promptGuidelines.mjs +0 -2
- package/dist/constants/promptGuidelines.mjs.map +0 -1
- package/dist/constants/task.cjs +0 -2
- package/dist/constants/task.cjs.map +0 -1
- package/dist/constants/task.d.cts.map +0 -1
- package/dist/constants/task.d.mts.map +0 -1
- package/dist/constants/task.mjs +0 -2
- package/dist/constants/task.mjs.map +0 -1
- package/dist/controllers/tasksCommand.cjs +0 -2
- package/dist/controllers/tasksCommand.cjs.map +0 -1
- package/dist/controllers/tasksCommand.d.cts +0 -15
- package/dist/controllers/tasksCommand.d.cts.map +0 -1
- package/dist/controllers/tasksCommand.d.mts +0 -15
- package/dist/controllers/tasksCommand.d.mts.map +0 -1
- package/dist/controllers/tasksCommand.mjs +0 -2
- package/dist/controllers/tasksCommand.mjs.map +0 -1
- package/dist/controllers/webTasksChannel.cjs +0 -2
- package/dist/controllers/webTasksChannel.cjs.map +0 -1
- package/dist/controllers/webTasksChannel.mjs +0 -2
- package/dist/controllers/webTasksChannel.mjs.map +0 -1
- package/dist/models/task.cjs +0 -2
- package/dist/models/task.cjs.map +0 -1
- package/dist/models/task.d.cts.map +0 -1
- package/dist/models/task.d.mts.map +0 -1
- package/dist/models/task.mjs +0 -2
- package/dist/models/task.mjs.map +0 -1
- package/dist/models/taskGraph.cjs +0 -2
- package/dist/models/taskGraph.cjs.map +0 -1
- package/dist/models/taskGraph.d.cts.map +0 -1
- package/dist/models/taskGraph.d.mts.map +0 -1
- package/dist/models/taskGraph.mjs +0 -2
- package/dist/models/taskGraph.mjs.map +0 -1
- package/dist/schemas/apiContracts.cjs +0 -2
- package/dist/schemas/apiContracts.cjs.map +0 -1
- package/dist/schemas/apiContracts.mjs +0 -2
- package/dist/schemas/apiContracts.mjs.map +0 -1
- package/dist/schemas/task.cjs +0 -2
- package/dist/schemas/task.cjs.map +0 -1
- package/dist/schemas/task.d.cts.map +0 -1
- package/dist/schemas/task.d.mts.map +0 -1
- package/dist/schemas/task.mjs +0 -2
- package/dist/schemas/task.mjs.map +0 -1
- package/dist/services/config/index.cjs +0 -2
- package/dist/services/config/index.cjs.map +0 -1
- package/dist/services/config/index.d.cts.map +0 -1
- package/dist/services/config/index.d.mts.map +0 -1
- package/dist/services/config/index.mjs +0 -2
- package/dist/services/config/index.mjs.map +0 -1
- package/dist/services/contextContribution/index.cjs +0 -3
- package/dist/services/contextContribution/index.cjs.map +0 -1
- package/dist/services/contextContribution/index.mjs +0 -3
- package/dist/services/contextContribution/index.mjs.map +0 -1
- package/dist/services/delegation/index.cjs +0 -6
- package/dist/services/delegation/index.cjs.map +0 -1
- package/dist/services/delegation/index.d.cts.map +0 -1
- package/dist/services/delegation/index.d.mts.map +0 -1
- package/dist/services/delegation/index.mjs +0 -6
- package/dist/services/delegation/index.mjs.map +0 -1
- package/dist/services/delegationPlatform/index.cjs +0 -2
- package/dist/services/delegationPlatform/index.cjs.map +0 -1
- package/dist/services/delegationPlatform/index.mjs +0 -2
- package/dist/services/delegationPlatform/index.mjs.map +0 -1
- package/dist/services/invariants/index.cjs +0 -2
- package/dist/services/invariants/index.cjs.map +0 -1
- package/dist/services/invariants/index.d.cts.map +0 -1
- package/dist/services/invariants/index.d.mts.map +0 -1
- package/dist/services/invariants/index.mjs +0 -2
- package/dist/services/invariants/index.mjs.map +0 -1
- package/dist/services/logSinkTelemetry/index.cjs +0 -2
- package/dist/services/logSinkTelemetry/index.cjs.map +0 -1
- package/dist/services/logSinkTelemetry/index.d.cts.map +0 -1
- package/dist/services/logSinkTelemetry/index.d.mts.map +0 -1
- package/dist/services/logSinkTelemetry/index.mjs +0 -2
- package/dist/services/logSinkTelemetry/index.mjs.map +0 -1
- package/dist/services/paths/index.cjs +0 -2
- package/dist/services/paths/index.cjs.map +0 -1
- package/dist/services/paths/index.d.cts.map +0 -1
- package/dist/services/paths/index.d.mts.map +0 -1
- package/dist/services/paths/index.mjs +0 -2
- package/dist/services/paths/index.mjs.map +0 -1
- package/dist/services/processLiveness/index.cjs +0 -2
- package/dist/services/processLiveness/index.cjs.map +0 -1
- package/dist/services/processLiveness/index.d.cts.map +0 -1
- package/dist/services/processLiveness/index.d.mts.map +0 -1
- package/dist/services/processLiveness/index.mjs +0 -2
- package/dist/services/processLiveness/index.mjs.map +0 -1
- package/dist/services/reconcile/index.cjs +0 -2
- package/dist/services/reconcile/index.cjs.map +0 -1
- package/dist/services/reconcile/index.d.cts.map +0 -1
- package/dist/services/reconcile/index.d.mts.map +0 -1
- package/dist/services/reconcile/index.mjs +0 -2
- package/dist/services/reconcile/index.mjs.map +0 -1
- package/dist/services/reducer/index.cjs +0 -3
- package/dist/services/reducer/index.cjs.map +0 -1
- package/dist/services/reducer/index.d.cts.map +0 -1
- package/dist/services/reducer/index.d.mts.map +0 -1
- package/dist/services/reducer/index.mjs +0 -3
- package/dist/services/reducer/index.mjs.map +0 -1
- package/dist/services/taskNarration/index.cjs +0 -2
- package/dist/services/taskNarration/index.cjs.map +0 -1
- package/dist/services/taskNarration/index.mjs +0 -2
- package/dist/services/taskNarration/index.mjs.map +0 -1
- package/dist/services/taskResult/index.cjs +0 -7
- package/dist/services/taskResult/index.cjs.map +0 -1
- package/dist/services/taskResult/index.d.cts.map +0 -1
- package/dist/services/taskResult/index.d.mts.map +0 -1
- package/dist/services/taskResult/index.mjs +0 -7
- package/dist/services/taskResult/index.mjs.map +0 -1
- package/dist/services/taskStore/index.cjs +0 -2
- package/dist/services/taskStore/index.cjs.map +0 -1
- package/dist/services/taskStore/index.d.cts.map +0 -1
- package/dist/services/taskStore/index.d.mts.map +0 -1
- package/dist/services/taskStore/index.mjs +0 -2
- package/dist/services/taskStore/index.mjs.map +0 -1
- package/dist/tools/task.cjs +0 -3
- package/dist/tools/task.d.cts.map +0 -1
- package/dist/tools/task.d.mts.map +0 -1
- package/dist/tools/task.mjs +0 -3
- package/dist/tools/task.mjs.map +0 -1
- package/dist/tui/format.cjs +0 -4
- package/dist/tui/format.cjs.map +0 -1
- package/dist/tui/format.d.cts.map +0 -1
- package/dist/tui/format.d.mts.map +0 -1
- package/dist/tui/format.mjs +0 -4
- package/dist/tui/format.mjs.map +0 -1
- package/dist/tui/selectors.cjs +0 -2
- package/dist/tui/selectors.cjs.map +0 -1
- package/dist/tui/selectors.d.cts.map +0 -1
- package/dist/tui/selectors.d.mts.map +0 -1
- package/dist/tui/selectors.mjs +0 -2
- package/dist/tui/selectors.mjs.map +0 -1
- package/dist/tui/taskOverlay.cjs +0 -2
- package/dist/tui/taskOverlay.cjs.map +0 -1
- package/dist/tui/taskOverlay.d.cts.map +0 -1
- package/dist/tui/taskOverlay.d.mts.map +0 -1
- package/dist/tui/taskOverlay.mjs +0 -2
- package/dist/tui/taskOverlay.mjs.map +0 -1
- package/dist/tui/taskSpace.cjs +0 -5
- package/dist/tui/taskSpace.cjs.map +0 -1
- package/dist/tui/taskSpace.d.cts.map +0 -1
- package/dist/tui/taskSpace.d.mts.map +0 -1
- package/dist/tui/taskSpace.mjs +0 -5
- package/dist/tui/taskSpace.mjs.map +0 -1
- package/dist/types/delegation.cjs +0 -2
- package/dist/types/delegation.cjs.map +0 -1
- package/dist/types/delegation.mjs +0 -2
- package/dist/types/delegation.mjs.map +0 -1
- package/dist/types/telemetry.cjs +0 -2
- package/dist/types/telemetry.cjs.map +0 -1
- package/dist/types/telemetry.d.cts.map +0 -1
- package/dist/types/telemetry.d.mts.map +0 -1
- package/dist/types/telemetry.mjs +0 -2
- package/dist/types/telemetry.mjs.map +0 -1
- package/dist/types/webTasks.cjs +0 -2
- package/dist/types/webTasks.cjs.map +0 -1
- package/dist/types/webTasks.mjs +0 -2
- package/dist/types/webTasks.mjs.map +0 -1
- package/src/extensions/web.ts +0 -18
- package/src/web/components/TaskDetailDialog.tsx +0 -251
- package/src/web/components/TaskToolMessage.tsx +0 -120
- package/src/web/components/TasksActivitySection.tsx +0 -200
- package/src/web/lib/taskToolFormat.ts +0 -330
- package/src/web/stores/tasksStore.ts +0 -114
- package/src/web/tsconfig.json +0 -23
- /package/dist/{constants → src/constants}/promptGuidelines.d.cts +0 -0
- /package/dist/{constants → src/constants}/promptGuidelines.d.mts +0 -0
- /package/dist/{constants → src/constants}/task.d.cts +0 -0
- /package/dist/{constants → src/constants}/task.d.mts +0 -0
- /package/dist/{models → src/models}/taskGraph.d.cts +0 -0
- /package/dist/{models → src/models}/taskGraph.d.mts +0 -0
- /package/dist/{schemas → src/schemas}/apiContracts.d.cts +0 -0
- /package/dist/{schemas → src/schemas}/apiContracts.d.mts +0 -0
- /package/dist/{schemas → src/schemas}/task.d.cts +0 -0
- /package/dist/{schemas → src/schemas}/task.d.mts +0 -0
- /package/dist/{services → src/services}/config/index.d.cts +0 -0
- /package/dist/{services → src/services}/config/index.d.mts +0 -0
- /package/dist/{services → src/services}/delegation/index.d.cts +0 -0
- /package/dist/{services → src/services}/delegation/index.d.mts +0 -0
- /package/dist/{services → src/services}/invariants/index.d.cts +0 -0
- /package/dist/{services → src/services}/invariants/index.d.mts +0 -0
- /package/dist/{services → src/services}/logSinkTelemetry/index.d.cts +0 -0
- /package/dist/{services → src/services}/logSinkTelemetry/index.d.mts +0 -0
- /package/dist/{services → src/services}/paths/index.d.cts +0 -0
- /package/dist/{services → src/services}/paths/index.d.mts +0 -0
- /package/dist/{services → src/services}/processLiveness/index.d.cts +0 -0
- /package/dist/{services → src/services}/processLiveness/index.d.mts +0 -0
- /package/dist/{services → src/services}/reconcile/index.d.cts +0 -0
- /package/dist/{services → src/services}/reconcile/index.d.mts +0 -0
- /package/dist/{services → src/services}/reducer/index.d.cts +0 -0
- /package/dist/{services → src/services}/reducer/index.d.mts +0 -0
- /package/dist/{services → src/services}/taskResult/index.d.cts +0 -0
- /package/dist/{services → src/services}/taskResult/index.d.mts +0 -0
- /package/dist/{services → src/services}/taskStore/index.d.cts +0 -0
- /package/dist/{services → src/services}/taskStore/index.d.mts +0 -0
- /package/dist/{types → src/types}/delegation.d.cts +0 -0
- /package/dist/{types → src/types}/delegation.d.mts +0 -0
- /package/dist/{types → src/types}/telemetry.d.cts +0 -0
- /package/dist/{types → src/types}/telemetry.d.mts +0 -0
|
@@ -0,0 +1,1013 @@
|
|
|
1
|
+
import { defineActivityGroup, defineChannelFile, defineFill, defineSessionStore, defineToolRenderer, defineWebPlugin } from "@agimon-ai/doompi-core/web";
|
|
2
|
+
import { Button, ChevronDownIcon, ChevronRightIcon, Dialog, DialogBody, DialogContent, DialogFooter, DialogHeader, DialogTitle, Dot, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, EditIcon, Input, KebabIcon, MessageIcon, MessageItem, MessageItemBody, MessageItemHeader, MessageItemStatus, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Textarea, TrashIcon, toolTone } from "@agimon-ai/doompi-web-components";
|
|
3
|
+
import { useStore } from "@tanstack/react-store";
|
|
4
|
+
import { useState } from "react";
|
|
5
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
//#region src/types/webTasks.ts
|
|
7
|
+
/** Browser-safe task view published by the cockpit hub channel. */
|
|
8
|
+
const TASKS_CHANNEL_TYPE = "task_graph";
|
|
9
|
+
//#endregion
|
|
10
|
+
//#region src/extensions/workspaces/sessions/(frontend)/channel/_lib/tasksStore.ts
|
|
11
|
+
const tasks = defineSessionStore({
|
|
12
|
+
tasks: [],
|
|
13
|
+
rev: 0
|
|
14
|
+
});
|
|
15
|
+
function isRecord$1(value) {
|
|
16
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
17
|
+
}
|
|
18
|
+
function parseTask(value) {
|
|
19
|
+
if (!isRecord$1(value) || typeof value.id !== "number" || typeof value.subject !== "string") return null;
|
|
20
|
+
if (![
|
|
21
|
+
"pending",
|
|
22
|
+
"in_progress",
|
|
23
|
+
"completed",
|
|
24
|
+
"failed"
|
|
25
|
+
].includes(String(value.status))) return null;
|
|
26
|
+
const task = {
|
|
27
|
+
id: value.id,
|
|
28
|
+
subject: value.subject,
|
|
29
|
+
status: value.status,
|
|
30
|
+
blockedBy: Array.isArray(value.blockedBy) ? value.blockedBy.filter((id) => typeof id === "number") : []
|
|
31
|
+
};
|
|
32
|
+
if (typeof value.description === "string") task.description = value.description;
|
|
33
|
+
if (typeof value.activeForm === "string") task.activeForm = value.activeForm;
|
|
34
|
+
if (typeof value.owner === "string") task.owner = value.owner;
|
|
35
|
+
if (typeof value.updatedAt === "string") task.updatedAt = value.updatedAt;
|
|
36
|
+
if (isRecord$1(value.delegation)) {
|
|
37
|
+
task.delegation = {};
|
|
38
|
+
if (typeof value.delegation.agent === "string") task.delegation.agent = value.delegation.agent;
|
|
39
|
+
if (typeof value.delegation.state === "string") task.delegation.state = value.delegation.state;
|
|
40
|
+
}
|
|
41
|
+
return task;
|
|
42
|
+
}
|
|
43
|
+
const tasksChannel = tasks.channel({
|
|
44
|
+
channel: TASKS_CHANNEL_TYPE,
|
|
45
|
+
parse(input) {
|
|
46
|
+
if (!isRecord$1(input) || !Array.isArray(input.tasks) || typeof input.rev !== "number") return null;
|
|
47
|
+
return {
|
|
48
|
+
tasks: input.tasks.map(parseTask).filter((task) => task !== null),
|
|
49
|
+
rev: input.rev
|
|
50
|
+
};
|
|
51
|
+
},
|
|
52
|
+
reduce: (_current, payload) => payload
|
|
53
|
+
});
|
|
54
|
+
function taskEditDraft(task) {
|
|
55
|
+
return {
|
|
56
|
+
subject: task.subject,
|
|
57
|
+
description: task.description ?? "",
|
|
58
|
+
status: task.status
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
function changedFields(task, draft) {
|
|
62
|
+
const changes = [];
|
|
63
|
+
const subject = draft.subject.trim();
|
|
64
|
+
const description = draft.description.trim();
|
|
65
|
+
if (subject && subject !== task.subject) changes.push(`set subject to "${subject}"`);
|
|
66
|
+
if (description !== (task.description ?? "").trim()) changes.push(description ? `set description to "${description}"` : "clear the description");
|
|
67
|
+
if (draft.status !== task.status) changes.push(`set status to ${draft.status}`);
|
|
68
|
+
return changes;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* The agent stays the only writer of task state, so an edit leaves the cockpit
|
|
72
|
+
* as one prompt naming exactly the fields the human changed. Nothing changed
|
|
73
|
+
* means nothing to send.
|
|
74
|
+
*/
|
|
75
|
+
function taskEditInstruction(task, draft) {
|
|
76
|
+
const changes = changedFields(task, draft);
|
|
77
|
+
if (changes.length === 0) return null;
|
|
78
|
+
return `Update task #${task.id}: ${changes.join("; ")}. Change nothing else and keep the dependency graph valid.`;
|
|
79
|
+
}
|
|
80
|
+
function requestTaskEdit(send, sessionId, task, draft) {
|
|
81
|
+
const message = taskEditInstruction(task, draft);
|
|
82
|
+
if (message === null) return false;
|
|
83
|
+
send(sessionId, {
|
|
84
|
+
type: "prompt",
|
|
85
|
+
message
|
|
86
|
+
});
|
|
87
|
+
return true;
|
|
88
|
+
}
|
|
89
|
+
/** Steering for the subagent that owns a delegated task. */
|
|
90
|
+
function taskMessageInstruction(taskId, agent, message) {
|
|
91
|
+
return `Steer the ${agent} run working on task #${taskId} with this message, then update the task if its plan changed: ${message.trim()}`;
|
|
92
|
+
}
|
|
93
|
+
function requestTaskMessage(send, sessionId, taskId, agent, message) {
|
|
94
|
+
send(sessionId, {
|
|
95
|
+
type: "prompt",
|
|
96
|
+
message: taskMessageInstruction(taskId, agent, message)
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
function requestTaskRemoval(send, sessionId, taskId) {
|
|
100
|
+
send(sessionId, {
|
|
101
|
+
type: "prompt",
|
|
102
|
+
message: `Remove task #${taskId}. Also remove or repair every dependency that references it so the remaining task graph is valid.`
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
//#endregion
|
|
106
|
+
//#region src/extensions/workspaces/sessions/(frontend)/activity-group/tasks.web.ts
|
|
107
|
+
/**
|
|
108
|
+
* The live task board in the session Activity dock.
|
|
109
|
+
*
|
|
110
|
+
* Active means a delegated run is still out, not that the list has entries. A
|
|
111
|
+
* pending task waits for this agent's next turn and reports to nobody, so
|
|
112
|
+
* counting it as running would leave the dock badge, the top bar and the
|
|
113
|
+
* timeline's background-work notice claiming work that nothing will finish.
|
|
114
|
+
*/
|
|
115
|
+
var tasks_web_default = defineActivityGroup({
|
|
116
|
+
keys: "t l",
|
|
117
|
+
statusKey: "@agimon-ai/doompi-task",
|
|
118
|
+
marksBackgroundWork: false,
|
|
119
|
+
activeSource: {
|
|
120
|
+
subscribe(listener) {
|
|
121
|
+
const subscription = tasks.store.subscribe(listener);
|
|
122
|
+
return () => subscription.unsubscribe();
|
|
123
|
+
},
|
|
124
|
+
isActive(sessionId) {
|
|
125
|
+
return tasks.select(tasks.store.state, sessionId).tasks.some((task) => task.delegation?.state === "requested" || task.delegation?.state === "running");
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
order: 65
|
|
129
|
+
});
|
|
130
|
+
//#endregion
|
|
131
|
+
//#region src/extensions/workspaces/sessions/(frontend)/channel/task-graph.web.ts
|
|
132
|
+
var task_graph_web_default = defineChannelFile(tasksChannel);
|
|
133
|
+
//#endregion
|
|
134
|
+
//#region src/extensions/workspaces/sessions/(frontend)/fill/_lib/TaskDetailDialog.tsx
|
|
135
|
+
const STATUS_CHOICES = [
|
|
136
|
+
"pending",
|
|
137
|
+
"in_progress",
|
|
138
|
+
"completed",
|
|
139
|
+
"failed"
|
|
140
|
+
];
|
|
141
|
+
const DESCRIPTION_ROWS = 5;
|
|
142
|
+
const MESSAGE_ROWS = 4;
|
|
143
|
+
function FieldLabel({ children }) {
|
|
144
|
+
return /* @__PURE__ */ jsx("span", {
|
|
145
|
+
className: "text-2xs font-bold tracking-widest text-doom-faint",
|
|
146
|
+
children
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
function Field({ label, children }) {
|
|
150
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
151
|
+
className: "flex flex-col gap-1.5",
|
|
152
|
+
children: [/* @__PURE__ */ jsx(FieldLabel, { children: label }), children]
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
function ReadOnlyValue({ value, testId }) {
|
|
156
|
+
return /* @__PURE__ */ jsx("span", {
|
|
157
|
+
"data-testid": testId,
|
|
158
|
+
className: "whitespace-pre-wrap break-words text-sm leading-relaxed text-doom-dim",
|
|
159
|
+
children: value
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
function TaskFacts({ task }) {
|
|
163
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
164
|
+
className: "flex flex-wrap gap-5",
|
|
165
|
+
children: [
|
|
166
|
+
/* @__PURE__ */ jsx(Field, {
|
|
167
|
+
label: "STATUS",
|
|
168
|
+
children: /* @__PURE__ */ jsx(ReadOnlyValue, {
|
|
169
|
+
testId: "task-detail-status",
|
|
170
|
+
value: task.status.replace("_", " ")
|
|
171
|
+
})
|
|
172
|
+
}),
|
|
173
|
+
task.activeForm ? /* @__PURE__ */ jsx(Field, {
|
|
174
|
+
label: "ACTIVE FORM",
|
|
175
|
+
children: /* @__PURE__ */ jsx(ReadOnlyValue, {
|
|
176
|
+
testId: "task-detail-active-form",
|
|
177
|
+
value: task.activeForm
|
|
178
|
+
})
|
|
179
|
+
}) : null,
|
|
180
|
+
task.owner ? /* @__PURE__ */ jsx(Field, {
|
|
181
|
+
label: "OWNER",
|
|
182
|
+
children: /* @__PURE__ */ jsx(ReadOnlyValue, {
|
|
183
|
+
testId: "task-detail-owner",
|
|
184
|
+
value: task.owner
|
|
185
|
+
})
|
|
186
|
+
}) : null,
|
|
187
|
+
task.delegation?.agent ? /* @__PURE__ */ jsx(Field, {
|
|
188
|
+
label: "DELEGATED TO",
|
|
189
|
+
children: /* @__PURE__ */ jsx(ReadOnlyValue, {
|
|
190
|
+
testId: "task-detail-agent",
|
|
191
|
+
value: task.delegation.state ? `${task.delegation.agent} · ${task.delegation.state}` : task.delegation.agent
|
|
192
|
+
})
|
|
193
|
+
}) : null,
|
|
194
|
+
task.blockedBy.length > 0 ? /* @__PURE__ */ jsx(Field, {
|
|
195
|
+
label: "BLOCKED BY",
|
|
196
|
+
children: /* @__PURE__ */ jsx(ReadOnlyValue, {
|
|
197
|
+
testId: "task-detail-blocked-by",
|
|
198
|
+
value: task.blockedBy.map((id) => `#${id}`).join(", ")
|
|
199
|
+
})
|
|
200
|
+
}) : null,
|
|
201
|
+
task.updatedAt ? /* @__PURE__ */ jsx(Field, {
|
|
202
|
+
label: "UPDATED",
|
|
203
|
+
children: /* @__PURE__ */ jsx(ReadOnlyValue, {
|
|
204
|
+
testId: "task-detail-updated",
|
|
205
|
+
value: task.updatedAt
|
|
206
|
+
})
|
|
207
|
+
}) : null
|
|
208
|
+
]
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* One task, read first and changed second. Every change leaves as a prompt the
|
|
213
|
+
* session can see, so the agent remains the only writer of task state.
|
|
214
|
+
*/
|
|
215
|
+
function TaskDetailDialog({ task, sessionId, mode: initialMode, send, onClose }) {
|
|
216
|
+
const [mode, setMode] = useState(initialMode);
|
|
217
|
+
const [draft, setDraft] = useState(() => taskEditDraft(task));
|
|
218
|
+
const [message, setMessage] = useState("");
|
|
219
|
+
const agent = task.delegation?.agent;
|
|
220
|
+
const submitEdit = () => {
|
|
221
|
+
if (requestTaskEdit(send, sessionId, task, draft)) onClose();
|
|
222
|
+
};
|
|
223
|
+
const submitMessage = () => {
|
|
224
|
+
if (!message.trim() || !agent) return;
|
|
225
|
+
requestTaskMessage(send, sessionId, task.id, agent, message);
|
|
226
|
+
onClose();
|
|
227
|
+
};
|
|
228
|
+
return /* @__PURE__ */ jsx(Dialog, {
|
|
229
|
+
open: true,
|
|
230
|
+
onOpenChange: (open) => {
|
|
231
|
+
if (!open) onClose();
|
|
232
|
+
},
|
|
233
|
+
children: /* @__PURE__ */ jsxs(DialogContent, {
|
|
234
|
+
width: "lg",
|
|
235
|
+
"data-testid": "task-detail-dialog",
|
|
236
|
+
"data-mode": mode,
|
|
237
|
+
"aria-describedby": void 0,
|
|
238
|
+
children: [/* @__PURE__ */ jsx(DialogHeader, { children: /* @__PURE__ */ jsxs("div", {
|
|
239
|
+
className: "flex min-w-0 flex-col items-start gap-1 sm:flex-row sm:items-center sm:gap-2.5",
|
|
240
|
+
children: [/* @__PURE__ */ jsxs("span", {
|
|
241
|
+
className: "text-2xs text-doom-faint",
|
|
242
|
+
children: ["task #", task.id]
|
|
243
|
+
}), /* @__PURE__ */ jsx(DialogTitle, {
|
|
244
|
+
"data-testid": "task-detail-title",
|
|
245
|
+
className: "max-w-full break-words",
|
|
246
|
+
children: task.subject
|
|
247
|
+
})]
|
|
248
|
+
}) }), /* @__PURE__ */ jsxs(DialogBody, { children: [
|
|
249
|
+
mode === "view" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
250
|
+
/* @__PURE__ */ jsx(Field, {
|
|
251
|
+
label: "DESCRIPTION",
|
|
252
|
+
children: /* @__PURE__ */ jsx(ReadOnlyValue, {
|
|
253
|
+
testId: "task-detail-description",
|
|
254
|
+
value: task.description ?? "no description on this task"
|
|
255
|
+
})
|
|
256
|
+
}),
|
|
257
|
+
/* @__PURE__ */ jsx(TaskFacts, { task }),
|
|
258
|
+
/* @__PURE__ */ jsxs(DialogFooter, { children: [
|
|
259
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1" }),
|
|
260
|
+
agent ? /* @__PURE__ */ jsx(Button, {
|
|
261
|
+
variant: "outline",
|
|
262
|
+
size: "xs",
|
|
263
|
+
"data-testid": "task-detail-open-message",
|
|
264
|
+
onClick: () => setMode("message"),
|
|
265
|
+
children: "message agent"
|
|
266
|
+
}) : null,
|
|
267
|
+
/* @__PURE__ */ jsx(Button, {
|
|
268
|
+
variant: "primary",
|
|
269
|
+
size: "xs",
|
|
270
|
+
"data-testid": "task-detail-open-edit",
|
|
271
|
+
onClick: () => setMode("edit"),
|
|
272
|
+
children: "edit"
|
|
273
|
+
})
|
|
274
|
+
] })
|
|
275
|
+
] }) : null,
|
|
276
|
+
mode === "edit" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
277
|
+
/* @__PURE__ */ jsx(Field, {
|
|
278
|
+
label: "SUBJECT",
|
|
279
|
+
children: /* @__PURE__ */ jsx(Input, {
|
|
280
|
+
"data-testid": "task-detail-subject-input",
|
|
281
|
+
autoFocus: true,
|
|
282
|
+
value: draft.subject,
|
|
283
|
+
onChange: (event) => setDraft({
|
|
284
|
+
...draft,
|
|
285
|
+
subject: event.target.value
|
|
286
|
+
})
|
|
287
|
+
})
|
|
288
|
+
}),
|
|
289
|
+
/* @__PURE__ */ jsx(Field, {
|
|
290
|
+
label: "DESCRIPTION",
|
|
291
|
+
children: /* @__PURE__ */ jsx(Textarea, {
|
|
292
|
+
"data-testid": "task-detail-description-input",
|
|
293
|
+
rows: DESCRIPTION_ROWS,
|
|
294
|
+
value: draft.description,
|
|
295
|
+
placeholder: "what this task covers",
|
|
296
|
+
onChange: (event) => setDraft({
|
|
297
|
+
...draft,
|
|
298
|
+
description: event.target.value
|
|
299
|
+
})
|
|
300
|
+
})
|
|
301
|
+
}),
|
|
302
|
+
/* @__PURE__ */ jsx(Field, {
|
|
303
|
+
label: "STATUS",
|
|
304
|
+
children: /* @__PURE__ */ jsxs(Select, {
|
|
305
|
+
value: draft.status,
|
|
306
|
+
onValueChange: (value) => setDraft({
|
|
307
|
+
...draft,
|
|
308
|
+
status: value
|
|
309
|
+
}),
|
|
310
|
+
children: [/* @__PURE__ */ jsx(SelectTrigger, {
|
|
311
|
+
"data-testid": "task-detail-status-input",
|
|
312
|
+
className: "h-7 w-full min-w-0 text-xs sm:min-w-[200px]",
|
|
313
|
+
children: /* @__PURE__ */ jsx(SelectValue, {})
|
|
314
|
+
}), /* @__PURE__ */ jsx(SelectContent, { children: STATUS_CHOICES.map((status) => /* @__PURE__ */ jsx(SelectItem, {
|
|
315
|
+
value: status,
|
|
316
|
+
children: status.replace("_", " ")
|
|
317
|
+
}, status)) })]
|
|
318
|
+
})
|
|
319
|
+
}),
|
|
320
|
+
/* @__PURE__ */ jsxs(DialogFooter, {
|
|
321
|
+
className: "flex-wrap sm:flex-nowrap",
|
|
322
|
+
children: [
|
|
323
|
+
/* @__PURE__ */ jsx("span", {
|
|
324
|
+
className: "w-full text-2xs text-doom-faint sm:w-auto",
|
|
325
|
+
children: "saved as one prompt naming only the fields you changed"
|
|
326
|
+
}),
|
|
327
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1" }),
|
|
328
|
+
/* @__PURE__ */ jsx(Button, {
|
|
329
|
+
variant: "outline",
|
|
330
|
+
size: "xs",
|
|
331
|
+
"data-testid": "task-detail-cancel",
|
|
332
|
+
onClick: onClose,
|
|
333
|
+
children: "cancel"
|
|
334
|
+
}),
|
|
335
|
+
/* @__PURE__ */ jsx(Button, {
|
|
336
|
+
variant: "primary",
|
|
337
|
+
size: "xs",
|
|
338
|
+
"data-testid": "task-detail-save",
|
|
339
|
+
onClick: submitEdit,
|
|
340
|
+
children: "save"
|
|
341
|
+
})
|
|
342
|
+
]
|
|
343
|
+
})
|
|
344
|
+
] }) : null,
|
|
345
|
+
mode === "message" && agent ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Field, {
|
|
346
|
+
label: `MESSAGE TO ${agent.toUpperCase()}`,
|
|
347
|
+
children: /* @__PURE__ */ jsx(Textarea, {
|
|
348
|
+
"data-testid": "task-detail-message-input",
|
|
349
|
+
autoFocus: true,
|
|
350
|
+
rows: MESSAGE_ROWS,
|
|
351
|
+
value: message,
|
|
352
|
+
placeholder: "guidance for the run working on this task",
|
|
353
|
+
onChange: (event) => setMessage(event.target.value)
|
|
354
|
+
})
|
|
355
|
+
}), /* @__PURE__ */ jsxs(DialogFooter, {
|
|
356
|
+
className: "flex-wrap sm:flex-nowrap",
|
|
357
|
+
children: [
|
|
358
|
+
/* @__PURE__ */ jsx("span", {
|
|
359
|
+
className: "w-full text-2xs text-doom-faint sm:w-auto",
|
|
360
|
+
children: "steers the run, it does not edit the task"
|
|
361
|
+
}),
|
|
362
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1" }),
|
|
363
|
+
/* @__PURE__ */ jsx(Button, {
|
|
364
|
+
variant: "outline",
|
|
365
|
+
size: "xs",
|
|
366
|
+
"data-testid": "task-detail-cancel",
|
|
367
|
+
onClick: onClose,
|
|
368
|
+
children: "cancel"
|
|
369
|
+
}),
|
|
370
|
+
/* @__PURE__ */ jsx(Button, {
|
|
371
|
+
variant: "primary",
|
|
372
|
+
size: "xs",
|
|
373
|
+
"data-testid": "task-detail-send",
|
|
374
|
+
onClick: submitMessage,
|
|
375
|
+
children: "send"
|
|
376
|
+
})
|
|
377
|
+
]
|
|
378
|
+
})] }) : null
|
|
379
|
+
] })]
|
|
380
|
+
})
|
|
381
|
+
});
|
|
382
|
+
}
|
|
383
|
+
//#endregion
|
|
384
|
+
//#region src/extensions/workspaces/sessions/(frontend)/fill/_lib/TasksActivitySection.tsx
|
|
385
|
+
const STATUS_TONE$1 = {
|
|
386
|
+
pending: "muted",
|
|
387
|
+
in_progress: "yellow",
|
|
388
|
+
completed: "green",
|
|
389
|
+
failed: "red",
|
|
390
|
+
deleted: "muted"
|
|
391
|
+
};
|
|
392
|
+
function TaskRow({ task, sessionId, sendSessionFrame, openDialog }) {
|
|
393
|
+
const detail = task.status === "in_progress" ? task.activeForm : task.description;
|
|
394
|
+
const agent = task.delegation?.agent;
|
|
395
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
396
|
+
"data-testid": `activity-task-${task.id}`,
|
|
397
|
+
"data-task-status": task.status,
|
|
398
|
+
className: "flex flex-col gap-1 rounded-md px-1 py-1",
|
|
399
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
400
|
+
className: "grid min-w-0 grid-cols-[auto_minmax(0,1fr)_auto_auto] items-center gap-x-1.5",
|
|
401
|
+
children: [
|
|
402
|
+
/* @__PURE__ */ jsx(Dot, {
|
|
403
|
+
tone: STATUS_TONE$1[task.status],
|
|
404
|
+
pulse: task.status === "in_progress"
|
|
405
|
+
}),
|
|
406
|
+
/* @__PURE__ */ jsxs("button", {
|
|
407
|
+
type: "button",
|
|
408
|
+
"data-testid": `activity-task-title-${task.id}`,
|
|
409
|
+
title: task.subject,
|
|
410
|
+
onClick: () => openDialog("view"),
|
|
411
|
+
className: `min-w-0 truncate text-left text-xs font-bold hover:underline ${task.status === "failed" ? "text-doom-red" : task.status === "completed" ? "text-doom-dim" : "text-doom-hi"}`,
|
|
412
|
+
children: [
|
|
413
|
+
/* @__PURE__ */ jsxs("span", {
|
|
414
|
+
className: "text-doom-faint",
|
|
415
|
+
children: ["#", task.id]
|
|
416
|
+
}),
|
|
417
|
+
" ",
|
|
418
|
+
task.subject
|
|
419
|
+
]
|
|
420
|
+
}),
|
|
421
|
+
/* @__PURE__ */ jsx("span", {
|
|
422
|
+
className: "shrink-0 text-2xs text-doom-faint",
|
|
423
|
+
children: task.status.replace("_", " ")
|
|
424
|
+
}),
|
|
425
|
+
task.status !== "completed" && task.status !== "deleted" ? /* @__PURE__ */ jsxs(DropdownMenu, { children: [/* @__PURE__ */ jsx(DropdownMenuTrigger, {
|
|
426
|
+
asChild: true,
|
|
427
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
428
|
+
variant: "ghost",
|
|
429
|
+
size: "icon",
|
|
430
|
+
"data-testid": `activity-task-menu-${task.id}`,
|
|
431
|
+
"aria-label": `task #${task.id} actions`,
|
|
432
|
+
title: `task #${task.id} actions`,
|
|
433
|
+
className: "self-center shrink-0 text-doom-faint hover:bg-doom-deep hover:text-doom-hi data-[state=open]:bg-doom-deep data-[state=open]:text-doom-hi",
|
|
434
|
+
children: /* @__PURE__ */ jsx(KebabIcon, { className: "h-3 w-3" })
|
|
435
|
+
})
|
|
436
|
+
}), /* @__PURE__ */ jsxs(DropdownMenuContent, {
|
|
437
|
+
"data-testid": `activity-task-menu-list-${task.id}`,
|
|
438
|
+
children: [
|
|
439
|
+
/* @__PURE__ */ jsxs(DropdownMenuItem, {
|
|
440
|
+
"data-testid": `activity-task-edit-${task.id}`,
|
|
441
|
+
onSelect: () => openDialog("edit"),
|
|
442
|
+
children: [/* @__PURE__ */ jsx(EditIcon, { className: "h-3 w-3" }), "Edit"]
|
|
443
|
+
}),
|
|
444
|
+
agent ? /* @__PURE__ */ jsxs(DropdownMenuItem, {
|
|
445
|
+
"data-testid": `activity-task-message-${task.id}`,
|
|
446
|
+
onSelect: () => openDialog("message"),
|
|
447
|
+
children: [/* @__PURE__ */ jsx(MessageIcon, { className: "h-3 w-3" }), "Message agent"]
|
|
448
|
+
}) : null,
|
|
449
|
+
/* @__PURE__ */ jsxs(DropdownMenuItem, {
|
|
450
|
+
variant: "destructive",
|
|
451
|
+
"data-testid": `activity-task-remove-${task.id}`,
|
|
452
|
+
onSelect: () => requestTaskRemoval(sendSessionFrame, sessionId, task.id),
|
|
453
|
+
children: [/* @__PURE__ */ jsx(TrashIcon, { className: "h-3 w-3" }), "Remove"]
|
|
454
|
+
})
|
|
455
|
+
]
|
|
456
|
+
})] }) : null
|
|
457
|
+
]
|
|
458
|
+
}), detail || agent || task.blockedBy.length > 0 ? /* @__PURE__ */ jsxs("span", {
|
|
459
|
+
className: "truncate pl-3 text-2xs text-doom-faint",
|
|
460
|
+
children: [
|
|
461
|
+
agent ? `[${agent}] ` : "",
|
|
462
|
+
detail ?? "",
|
|
463
|
+
task.blockedBy.length > 0 ? ` · blocked by ${task.blockedBy.map((id) => `#${id}`).join(", ")}` : ""
|
|
464
|
+
]
|
|
465
|
+
}) : null]
|
|
466
|
+
});
|
|
467
|
+
}
|
|
468
|
+
/**
|
|
469
|
+
* Session task graph in the activity dock. Empty graphs have no cockpit presence.
|
|
470
|
+
*
|
|
471
|
+
* This fills the `tasks` activity group, so the dock has already drawn the
|
|
472
|
+
* heading, the key chip and the section frame. Rendering rows only keeps the
|
|
473
|
+
* group titled once.
|
|
474
|
+
*/
|
|
475
|
+
function TasksActivitySection({ sessionId, sendSessionFrame }) {
|
|
476
|
+
const sessionTasks = useStore(tasks.store, (state) => tasks.select(state, sessionId).tasks);
|
|
477
|
+
const [historyOpen, setHistoryOpen] = useState(false);
|
|
478
|
+
const [dialog, setDialog] = useState();
|
|
479
|
+
if (sessionId === null || sessionTasks.length === 0) return null;
|
|
480
|
+
const active = sessionTasks.filter((task) => task.status === "pending" || task.status === "in_progress");
|
|
481
|
+
const history = sessionTasks.filter((task) => task.status === "completed" || task.status === "failed");
|
|
482
|
+
const dialogTask = dialog ? sessionTasks.find((task) => task.id === dialog.taskId) : void 0;
|
|
483
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
484
|
+
className: "flex flex-col gap-2",
|
|
485
|
+
children: [
|
|
486
|
+
active.length > 0 ? /* @__PURE__ */ jsx("div", {
|
|
487
|
+
className: "flex flex-col gap-0.5",
|
|
488
|
+
children: active.map((task) => /* @__PURE__ */ jsx(TaskRow, {
|
|
489
|
+
task,
|
|
490
|
+
sessionId,
|
|
491
|
+
sendSessionFrame,
|
|
492
|
+
openDialog: (mode) => setDialog({
|
|
493
|
+
taskId: task.id,
|
|
494
|
+
mode
|
|
495
|
+
})
|
|
496
|
+
}, task.id))
|
|
497
|
+
}) : null,
|
|
498
|
+
history.length > 0 ? /* @__PURE__ */ jsxs("div", {
|
|
499
|
+
className: "flex flex-col gap-0.5",
|
|
500
|
+
children: [/* @__PURE__ */ jsxs(Button, {
|
|
501
|
+
variant: "ghost",
|
|
502
|
+
size: "xs",
|
|
503
|
+
"aria-expanded": historyOpen,
|
|
504
|
+
onClick: () => setHistoryOpen((open) => !open),
|
|
505
|
+
className: "justify-start gap-1.5 rounded-md px-1 py-0.5 hover:bg-doom-panel",
|
|
506
|
+
children: [
|
|
507
|
+
historyOpen ? /* @__PURE__ */ jsx(ChevronDownIcon, { className: "h-2.5 w-2.5 text-doom-faint" }) : /* @__PURE__ */ jsx(ChevronRightIcon, { className: "h-2.5 w-2.5 text-doom-faint" }),
|
|
508
|
+
/* @__PURE__ */ jsx("span", {
|
|
509
|
+
className: "text-xs font-bold text-doom-dim",
|
|
510
|
+
children: "session"
|
|
511
|
+
}),
|
|
512
|
+
/* @__PURE__ */ jsx("span", {
|
|
513
|
+
className: "text-2xs text-doom-faint",
|
|
514
|
+
children: history.length
|
|
515
|
+
})
|
|
516
|
+
]
|
|
517
|
+
}), historyOpen ? /* @__PURE__ */ jsx("div", {
|
|
518
|
+
className: "flex flex-col gap-0.5 pl-2",
|
|
519
|
+
children: history.map((task) => /* @__PURE__ */ jsx(TaskRow, {
|
|
520
|
+
task,
|
|
521
|
+
sessionId,
|
|
522
|
+
sendSessionFrame,
|
|
523
|
+
openDialog: (mode) => setDialog({
|
|
524
|
+
taskId: task.id,
|
|
525
|
+
mode
|
|
526
|
+
})
|
|
527
|
+
}, task.id))
|
|
528
|
+
}) : null]
|
|
529
|
+
}) : null,
|
|
530
|
+
dialog && dialogTask ? /* @__PURE__ */ jsx(TaskDetailDialog, {
|
|
531
|
+
task: dialogTask,
|
|
532
|
+
sessionId,
|
|
533
|
+
mode: dialog.mode,
|
|
534
|
+
send: sendSessionFrame,
|
|
535
|
+
onClose: () => setDialog(void 0)
|
|
536
|
+
}, `${dialogTask.id}-${dialog.mode}`) : null
|
|
537
|
+
]
|
|
538
|
+
});
|
|
539
|
+
}
|
|
540
|
+
//#endregion
|
|
541
|
+
//#region src/extensions/workspaces/sessions/(frontend)/fill/Tasks.activity.tasks.web.tsx
|
|
542
|
+
var Tasks_activity_tasks_web_default = defineFill({ component: TasksActivitySection });
|
|
543
|
+
//#endregion
|
|
544
|
+
//#region src/extensions/workspaces/sessions/(frontend)/tool/_lib/taskToolFormat.ts
|
|
545
|
+
const STATUS_GLYPH = {
|
|
546
|
+
pending: "○",
|
|
547
|
+
in_progress: "◐",
|
|
548
|
+
completed: "●",
|
|
549
|
+
failed: "✗",
|
|
550
|
+
deleted: "⊘"
|
|
551
|
+
};
|
|
552
|
+
const STATUS_LABEL = {
|
|
553
|
+
pending: "pending",
|
|
554
|
+
in_progress: "in progress",
|
|
555
|
+
completed: "completed",
|
|
556
|
+
failed: "failed",
|
|
557
|
+
deleted: "deleted"
|
|
558
|
+
};
|
|
559
|
+
const ACTION_GLYPH = {
|
|
560
|
+
upsert: "✎",
|
|
561
|
+
delete: "×",
|
|
562
|
+
get: "›",
|
|
563
|
+
list: "☰",
|
|
564
|
+
clear: "∅",
|
|
565
|
+
assign: "⇒",
|
|
566
|
+
cancel: "⊗"
|
|
567
|
+
};
|
|
568
|
+
/**
|
|
569
|
+
* `upsert` is two operations behind one name, so a homogeneous batch narrows to
|
|
570
|
+
* the glyph the operator already reads: `+` means new work appeared, `→` means
|
|
571
|
+
* work moved. A mixed batch keeps the neutral write glyph.
|
|
572
|
+
*/
|
|
573
|
+
const UPSERT_CREATE_GLYPH = "+";
|
|
574
|
+
const UPSERT_UPDATE_GLYPH = "→";
|
|
575
|
+
/** Task rows kept in a collapsed result, before the card is expanded. */
|
|
576
|
+
const TRANSCRIPT_TASK_ROWS = 8;
|
|
577
|
+
const TASK_STATUSES = [
|
|
578
|
+
"pending",
|
|
579
|
+
"in_progress",
|
|
580
|
+
"completed",
|
|
581
|
+
"failed",
|
|
582
|
+
"deleted"
|
|
583
|
+
];
|
|
584
|
+
const TASK_ACTIONS = [
|
|
585
|
+
"upsert",
|
|
586
|
+
"list",
|
|
587
|
+
"get",
|
|
588
|
+
"delete",
|
|
589
|
+
"clear",
|
|
590
|
+
"assign",
|
|
591
|
+
"cancel"
|
|
592
|
+
];
|
|
593
|
+
const INLINE_WHITESPACE = /\s+/gu;
|
|
594
|
+
function isRecord(value) {
|
|
595
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
596
|
+
}
|
|
597
|
+
function isStatus(value) {
|
|
598
|
+
return typeof value === "string" && TASK_STATUSES.includes(value);
|
|
599
|
+
}
|
|
600
|
+
function isAction(value) {
|
|
601
|
+
return typeof value === "string" && TASK_ACTIONS.includes(value);
|
|
602
|
+
}
|
|
603
|
+
function taskView(value) {
|
|
604
|
+
if (!isRecord(value) || typeof value.id !== "number" || typeof value.subject !== "string") return null;
|
|
605
|
+
if (!isStatus(value.status)) return null;
|
|
606
|
+
const task = {
|
|
607
|
+
id: value.id,
|
|
608
|
+
subject: value.subject,
|
|
609
|
+
status: value.status
|
|
610
|
+
};
|
|
611
|
+
if (typeof value.activeForm === "string") task.activeForm = value.activeForm;
|
|
612
|
+
if (Array.isArray(value.blockedBy)) task.blockedBy = value.blockedBy.filter((id) => typeof id === "number");
|
|
613
|
+
if (isRecord(value.delegation)) {
|
|
614
|
+
task.delegation = {};
|
|
615
|
+
if (typeof value.delegation.agent === "string") task.delegation.agent = value.delegation.agent;
|
|
616
|
+
if (typeof value.delegation.state === "string") task.delegation.state = value.delegation.state;
|
|
617
|
+
}
|
|
618
|
+
return task;
|
|
619
|
+
}
|
|
620
|
+
function idList(value) {
|
|
621
|
+
return Array.isArray(value) ? value.filter((id) => typeof id === "number") : [];
|
|
622
|
+
}
|
|
623
|
+
/** Narrows the wire details; null when they are not a task result at all. */
|
|
624
|
+
function taskDetailsView(details) {
|
|
625
|
+
if (!isRecord(details) || !isAction(details.action) || !Array.isArray(details.tasks)) return null;
|
|
626
|
+
const view = {
|
|
627
|
+
action: details.action,
|
|
628
|
+
params: isRecord(details.params) ? details.params : {},
|
|
629
|
+
tasks: details.tasks.map(taskView).filter((task) => task !== null)
|
|
630
|
+
};
|
|
631
|
+
if (typeof details.error === "string") view.error = details.error;
|
|
632
|
+
if (isRecord(details.upsert)) view.upsert = {
|
|
633
|
+
applied: idList(details.upsert.applied),
|
|
634
|
+
failed: typeof details.upsert.failed === "number" ? details.upsert.failed : 0
|
|
635
|
+
};
|
|
636
|
+
if (isRecord(details.assignment)) view.assignment = {
|
|
637
|
+
assigned: idList(details.assignment.assigned),
|
|
638
|
+
failed: typeof details.assignment.failed === "number" ? details.assignment.failed : 0
|
|
639
|
+
};
|
|
640
|
+
return view;
|
|
641
|
+
}
|
|
642
|
+
/** `#id` for the wire's id, which the TUI would resolve to a subject through the store. */
|
|
643
|
+
function idLabel(value) {
|
|
644
|
+
return typeof value === "number" || typeof value === "string" ? `#${value}` : "#?";
|
|
645
|
+
}
|
|
646
|
+
/** Keep dynamic content on one line. */
|
|
647
|
+
function inlineText(text) {
|
|
648
|
+
return text.replace(INLINE_WHITESPACE, " ").trim();
|
|
649
|
+
}
|
|
650
|
+
function upsertGlyph(items) {
|
|
651
|
+
if (items.length === 0) return ACTION_GLYPH.upsert;
|
|
652
|
+
if (items.every((item) => item.id === void 0)) return UPSERT_CREATE_GLYPH;
|
|
653
|
+
if (items.every((item) => item.id !== void 0)) return UPSERT_UPDATE_GLYPH;
|
|
654
|
+
return ACTION_GLYPH.upsert;
|
|
655
|
+
}
|
|
656
|
+
/**
|
|
657
|
+
* The TUI resolves an id to its subject through the task store; the card has
|
|
658
|
+
* no store and shows `#id` until the result names the task.
|
|
659
|
+
*/
|
|
660
|
+
function taskCallView(args) {
|
|
661
|
+
const action = typeof args.action === "string" ? args.action : "task";
|
|
662
|
+
if (!isAction(action)) return {
|
|
663
|
+
glyph: "?",
|
|
664
|
+
action,
|
|
665
|
+
subjectTone: "dim"
|
|
666
|
+
};
|
|
667
|
+
const items = action === "upsert" && Array.isArray(args.tasks) ? args.tasks.filter(isRecord) : [];
|
|
668
|
+
const view = {
|
|
669
|
+
glyph: action === "upsert" ? upsertGlyph(items) : ACTION_GLYPH[action],
|
|
670
|
+
action,
|
|
671
|
+
subjectTone: "dim"
|
|
672
|
+
};
|
|
673
|
+
if (action === "upsert") {
|
|
674
|
+
if (items.length === 1) {
|
|
675
|
+
const only = items[0] ?? {};
|
|
676
|
+
if (only.id === void 0) {
|
|
677
|
+
if (typeof only.subject === "string") view.subject = inlineText(only.subject);
|
|
678
|
+
} else {
|
|
679
|
+
view.subject = typeof only.subject === "string" ? inlineText(only.subject) : idLabel(only.id);
|
|
680
|
+
view.subjectTone = "accent";
|
|
681
|
+
}
|
|
682
|
+
} else if (items.length > 1) view.subject = `${items.length} tasks`;
|
|
683
|
+
} else if (action === "assign") {
|
|
684
|
+
const assignments = Array.isArray(args.assignments) ? args.assignments.filter(isRecord) : [];
|
|
685
|
+
if (assignments.length === 1) {
|
|
686
|
+
const only = assignments[0] ?? {};
|
|
687
|
+
view.subject = idLabel(only.id);
|
|
688
|
+
view.subjectTone = "accent";
|
|
689
|
+
if (typeof only.agent === "string") view.detail = `→ ${only.agent}`;
|
|
690
|
+
} else if (assignments.length > 1) view.subject = `${assignments.length} tasks`;
|
|
691
|
+
} else if ((action === "get" || action === "delete" || action === "cancel") && args.id !== void 0) {
|
|
692
|
+
view.subject = idLabel(args.id);
|
|
693
|
+
view.subjectTone = "accent";
|
|
694
|
+
} else if (action === "list" && isStatus(args.status)) view.detail = STATUS_LABEL[args.status];
|
|
695
|
+
return view;
|
|
696
|
+
}
|
|
697
|
+
function taskRow(task) {
|
|
698
|
+
const row = {
|
|
699
|
+
id: task.id,
|
|
700
|
+
glyph: STATUS_GLYPH[task.status],
|
|
701
|
+
subject: inlineText(task.subject),
|
|
702
|
+
status: task.status,
|
|
703
|
+
closed: task.status === "completed" || task.status === "deleted",
|
|
704
|
+
blockedBy: task.blockedBy ?? []
|
|
705
|
+
};
|
|
706
|
+
if (task.delegation?.agent) row.agent = inlineText(task.delegation.agent);
|
|
707
|
+
if (task.status === "in_progress" && task.activeForm) row.activeForm = inlineText(task.activeForm);
|
|
708
|
+
return row;
|
|
709
|
+
}
|
|
710
|
+
function nonEmptyLines(text) {
|
|
711
|
+
return text.split("\n").filter((line) => line.trim().length > 0);
|
|
712
|
+
}
|
|
713
|
+
/**
|
|
714
|
+
* The rows `list` reported to the model: `details.tasks` is the whole
|
|
715
|
+
* document, so the call's filters apply again here or the card would disagree
|
|
716
|
+
* with the text the model was given.
|
|
717
|
+
*/
|
|
718
|
+
function listedTasks(details) {
|
|
719
|
+
let view = details.tasks;
|
|
720
|
+
if (details.params.includeDeleted !== true) view = view.filter((task) => task.status !== "deleted");
|
|
721
|
+
if (isStatus(details.params.status)) view = view.filter((task) => task.status === details.params.status);
|
|
722
|
+
return view;
|
|
723
|
+
}
|
|
724
|
+
function byIds(details, ids) {
|
|
725
|
+
return ids.flatMap((id) => details.tasks.find((task) => task.id === id) ?? []);
|
|
726
|
+
}
|
|
727
|
+
function batch(tasks, failed, verb, expanded) {
|
|
728
|
+
if (tasks.length === 1 && failed === 0) return {
|
|
729
|
+
rows: [taskRow(tasks[0])],
|
|
730
|
+
status: null
|
|
731
|
+
};
|
|
732
|
+
const shown = expanded ? tasks : tasks.slice(0, TRANSCRIPT_TASK_ROWS);
|
|
733
|
+
let summary = `${tasks.length} ${verb}`;
|
|
734
|
+
if (failed > 0) summary += ` · ${failed} failed`;
|
|
735
|
+
if (tasks.length > shown.length) summary += ` · ${tasks.length - shown.length} more`;
|
|
736
|
+
return {
|
|
737
|
+
rows: shown.map(taskRow),
|
|
738
|
+
status: {
|
|
739
|
+
glyph: failed > 0 ? "!" : "✓",
|
|
740
|
+
tone: failed > 0 ? "warning" : "ok",
|
|
741
|
+
text: summary
|
|
742
|
+
}
|
|
743
|
+
};
|
|
744
|
+
}
|
|
745
|
+
function taskResultView(input) {
|
|
746
|
+
const details = taskDetailsView(input.details);
|
|
747
|
+
if (input.isPartial) return {
|
|
748
|
+
rows: [],
|
|
749
|
+
errorLines: [],
|
|
750
|
+
status: {
|
|
751
|
+
glyph: "◐",
|
|
752
|
+
tone: "running",
|
|
753
|
+
text: nonEmptyLines(input.output).at(-1) ?? "working"
|
|
754
|
+
}
|
|
755
|
+
};
|
|
756
|
+
if (input.isError || details?.error !== void 0) {
|
|
757
|
+
const all = nonEmptyLines(details?.error ?? input.output);
|
|
758
|
+
if (all.length <= 1) return {
|
|
759
|
+
rows: [],
|
|
760
|
+
errorLines: [],
|
|
761
|
+
status: {
|
|
762
|
+
glyph: "✗",
|
|
763
|
+
tone: "error",
|
|
764
|
+
text: all[0] ?? ""
|
|
765
|
+
}
|
|
766
|
+
};
|
|
767
|
+
return {
|
|
768
|
+
rows: [],
|
|
769
|
+
errorLines: input.expanded ? all : all.slice(0, TRANSCRIPT_TASK_ROWS),
|
|
770
|
+
status: {
|
|
771
|
+
glyph: "✗",
|
|
772
|
+
tone: "error",
|
|
773
|
+
text: ""
|
|
774
|
+
}
|
|
775
|
+
};
|
|
776
|
+
}
|
|
777
|
+
if (details === null) return {
|
|
778
|
+
rows: [],
|
|
779
|
+
errorLines: [],
|
|
780
|
+
status: {
|
|
781
|
+
glyph: "✓",
|
|
782
|
+
tone: "ok",
|
|
783
|
+
text: ""
|
|
784
|
+
}
|
|
785
|
+
};
|
|
786
|
+
if (details.action === "list") {
|
|
787
|
+
const tasks = listedTasks(details);
|
|
788
|
+
const shown = input.expanded ? tasks : tasks.slice(0, TRANSCRIPT_TASK_ROWS);
|
|
789
|
+
let summary = tasks.length === 0 ? "no tasks" : `${tasks.length} task${tasks.length === 1 ? "" : "s"}`;
|
|
790
|
+
if (tasks.length > shown.length) summary += ` · ${tasks.length - shown.length} more`;
|
|
791
|
+
return {
|
|
792
|
+
rows: shown.map(taskRow),
|
|
793
|
+
errorLines: [],
|
|
794
|
+
status: {
|
|
795
|
+
glyph: "✓",
|
|
796
|
+
tone: "ok",
|
|
797
|
+
text: summary
|
|
798
|
+
}
|
|
799
|
+
};
|
|
800
|
+
}
|
|
801
|
+
if (details.action === "clear") return {
|
|
802
|
+
rows: [],
|
|
803
|
+
errorLines: [],
|
|
804
|
+
status: {
|
|
805
|
+
glyph: "✓",
|
|
806
|
+
tone: "ok",
|
|
807
|
+
text: "cleared"
|
|
808
|
+
}
|
|
809
|
+
};
|
|
810
|
+
if (details.action === "assign" && details.assignment) return {
|
|
811
|
+
errorLines: [],
|
|
812
|
+
...batch(byIds(details, details.assignment.assigned), details.assignment.failed, "assigned", input.expanded)
|
|
813
|
+
};
|
|
814
|
+
if (details.action === "upsert") return {
|
|
815
|
+
errorLines: [],
|
|
816
|
+
...batch(byIds(details, details.upsert?.applied ?? []), details.upsert?.failed ?? 0, "applied", input.expanded)
|
|
817
|
+
};
|
|
818
|
+
const id = details.params.id;
|
|
819
|
+
const task = typeof id === "number" ? details.tasks.find((candidate) => candidate.id === id) : void 0;
|
|
820
|
+
if (!task) return {
|
|
821
|
+
rows: [],
|
|
822
|
+
errorLines: [],
|
|
823
|
+
status: {
|
|
824
|
+
glyph: "✓",
|
|
825
|
+
tone: "ok",
|
|
826
|
+
text: ""
|
|
827
|
+
}
|
|
828
|
+
};
|
|
829
|
+
return {
|
|
830
|
+
rows: [taskRow(task)],
|
|
831
|
+
errorLines: [],
|
|
832
|
+
status: null
|
|
833
|
+
};
|
|
834
|
+
}
|
|
835
|
+
//#endregion
|
|
836
|
+
//#region src/extensions/workspaces/sessions/(frontend)/tool/_lib/TaskToolMessage.tsx
|
|
837
|
+
const STATUS_TONE = {
|
|
838
|
+
pending: "text-doom-dim",
|
|
839
|
+
in_progress: "text-doom-yellow",
|
|
840
|
+
completed: "text-doom-green",
|
|
841
|
+
failed: "text-doom-red",
|
|
842
|
+
deleted: "text-doom-faint"
|
|
843
|
+
};
|
|
844
|
+
const RESULT_TONE = {
|
|
845
|
+
running: "running",
|
|
846
|
+
ok: "ok",
|
|
847
|
+
error: "error",
|
|
848
|
+
warning: "running"
|
|
849
|
+
};
|
|
850
|
+
/** One task row: status glyph, id, subject and chips on the left, the status label flushed right. */
|
|
851
|
+
function TaskRowLine({ row }) {
|
|
852
|
+
return /* @__PURE__ */ jsxs("li", {
|
|
853
|
+
"data-testid": "tool-result-task-row",
|
|
854
|
+
"data-task-id": row.id,
|
|
855
|
+
className: "flex items-baseline gap-2",
|
|
856
|
+
children: [
|
|
857
|
+
/* @__PURE__ */ jsx("span", {
|
|
858
|
+
className: `shrink-0 ${STATUS_TONE[row.status]}`,
|
|
859
|
+
children: row.glyph
|
|
860
|
+
}),
|
|
861
|
+
/* @__PURE__ */ jsxs("span", {
|
|
862
|
+
className: "shrink-0 text-doom-faint",
|
|
863
|
+
children: ["#", row.id]
|
|
864
|
+
}),
|
|
865
|
+
/* @__PURE__ */ jsxs("span", {
|
|
866
|
+
className: `min-w-0 flex-1 truncate ${row.closed ? "text-doom-faint line-through" : row.status === "in_progress" ? "text-doom-blue" : "text-doom-text"}`,
|
|
867
|
+
children: [
|
|
868
|
+
row.subject,
|
|
869
|
+
row.agent ? /* @__PURE__ */ jsxs("span", {
|
|
870
|
+
className: "text-doom-faint",
|
|
871
|
+
children: [
|
|
872
|
+
" [",
|
|
873
|
+
row.agent,
|
|
874
|
+
"]"
|
|
875
|
+
]
|
|
876
|
+
}) : null,
|
|
877
|
+
row.activeForm ? /* @__PURE__ */ jsxs("span", {
|
|
878
|
+
className: "text-doom-faint",
|
|
879
|
+
children: [
|
|
880
|
+
" (",
|
|
881
|
+
row.activeForm,
|
|
882
|
+
")"
|
|
883
|
+
]
|
|
884
|
+
}) : null,
|
|
885
|
+
row.blockedBy.length > 0 ? /* @__PURE__ */ jsxs("span", {
|
|
886
|
+
className: "text-doom-faint",
|
|
887
|
+
children: [" ⛓ ", row.blockedBy.map((id) => `#${id}`).join(",")]
|
|
888
|
+
}) : null
|
|
889
|
+
]
|
|
890
|
+
}),
|
|
891
|
+
/* @__PURE__ */ jsx("span", {
|
|
892
|
+
className: `shrink-0 ${STATUS_TONE[row.status]}`,
|
|
893
|
+
children: STATUS_LABEL[row.status]
|
|
894
|
+
})
|
|
895
|
+
]
|
|
896
|
+
});
|
|
897
|
+
}
|
|
898
|
+
/**
|
|
899
|
+
* The task tool's timeline item: `glyph action subject` with the assignee or
|
|
900
|
+
* list filter in the header, as renderTaskCall shows it; the rows the action
|
|
901
|
+
* touched, then the batch or list summary, in the body, as renderTaskResult
|
|
902
|
+
* lays it out.
|
|
903
|
+
*/
|
|
904
|
+
function TaskToolMessage({ args, result, output, running, isError }) {
|
|
905
|
+
const call = taskCallView(args);
|
|
906
|
+
const collapsed = taskResultView({
|
|
907
|
+
details: result?.details,
|
|
908
|
+
output,
|
|
909
|
+
expanded: false,
|
|
910
|
+
isPartial: running,
|
|
911
|
+
isError
|
|
912
|
+
});
|
|
913
|
+
const full = taskResultView({
|
|
914
|
+
details: result?.details,
|
|
915
|
+
output,
|
|
916
|
+
expanded: true,
|
|
917
|
+
isPartial: running,
|
|
918
|
+
isError
|
|
919
|
+
});
|
|
920
|
+
const hidden = full.rows.length - collapsed.rows.length + (full.errorLines.length - collapsed.errorLines.length);
|
|
921
|
+
return /* @__PURE__ */ jsx(MessageItem, {
|
|
922
|
+
tone: toolTone({
|
|
923
|
+
running,
|
|
924
|
+
isError
|
|
925
|
+
}),
|
|
926
|
+
expandable: hidden > 0,
|
|
927
|
+
children: ({ expanded }) => {
|
|
928
|
+
const view = expanded ? full : collapsed;
|
|
929
|
+
const empty = view.rows.length === 0 && view.errorLines.length === 0 && view.status === null;
|
|
930
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(MessageItemHeader, {
|
|
931
|
+
title: "task",
|
|
932
|
+
children: /* @__PURE__ */ jsxs("span", {
|
|
933
|
+
"data-testid": "tool-call-task",
|
|
934
|
+
className: "flex min-w-0 flex-1 items-center gap-1.5",
|
|
935
|
+
children: [
|
|
936
|
+
/* @__PURE__ */ jsxs("span", {
|
|
937
|
+
className: "shrink-0 text-doom-text",
|
|
938
|
+
children: [
|
|
939
|
+
call.glyph,
|
|
940
|
+
" ",
|
|
941
|
+
call.action
|
|
942
|
+
]
|
|
943
|
+
}),
|
|
944
|
+
call.subject ? /* @__PURE__ */ jsx("span", {
|
|
945
|
+
className: `min-w-0 truncate ${call.subjectTone === "accent" ? "text-doom-blue" : "text-doom-dim"}`,
|
|
946
|
+
children: call.subject
|
|
947
|
+
}) : null,
|
|
948
|
+
call.detail ? /* @__PURE__ */ jsx("span", {
|
|
949
|
+
className: "shrink-0 text-doom-faint",
|
|
950
|
+
children: call.detail
|
|
951
|
+
}) : null
|
|
952
|
+
]
|
|
953
|
+
})
|
|
954
|
+
}), empty ? null : /* @__PURE__ */ jsxs(MessageItemBody, {
|
|
955
|
+
"data-testid": "tool-result-task",
|
|
956
|
+
className: "flex flex-col gap-1",
|
|
957
|
+
children: [
|
|
958
|
+
view.rows.length > 0 ? /* @__PURE__ */ jsx("ul", {
|
|
959
|
+
className: "flex flex-col gap-0.5",
|
|
960
|
+
children: view.rows.map((row) => /* @__PURE__ */ jsx(TaskRowLine, { row }, row.id))
|
|
961
|
+
}) : null,
|
|
962
|
+
view.errorLines.length > 0 ? /* @__PURE__ */ jsx("pre", {
|
|
963
|
+
className: "whitespace-pre-wrap break-words font-mono text-doom-dim",
|
|
964
|
+
children: view.errorLines.join("\n")
|
|
965
|
+
}) : null,
|
|
966
|
+
!expanded && hidden > 0 ? /* @__PURE__ */ jsxs(MessageItemStatus, {
|
|
967
|
+
expands: true,
|
|
968
|
+
children: [hidden, " more"]
|
|
969
|
+
}) : null,
|
|
970
|
+
view.status ? /* @__PURE__ */ jsx(MessageItemStatus, {
|
|
971
|
+
"data-testid": "tool-result-task-status",
|
|
972
|
+
tone: RESULT_TONE[view.status.tone],
|
|
973
|
+
glyph: view.status.glyph,
|
|
974
|
+
children: view.status.text
|
|
975
|
+
}) : null
|
|
976
|
+
]
|
|
977
|
+
})] });
|
|
978
|
+
}
|
|
979
|
+
});
|
|
980
|
+
}
|
|
981
|
+
//#endregion
|
|
982
|
+
//#region src/extensions/workspaces/sessions/(frontend)/tool/task.web.tsx
|
|
983
|
+
var task_web_default = defineToolRenderer({ message: TaskToolMessage });
|
|
984
|
+
//#endregion
|
|
985
|
+
//#region generated/web.ts
|
|
986
|
+
const via = (identity, value) => ({
|
|
987
|
+
...identity,
|
|
988
|
+
...value
|
|
989
|
+
});
|
|
990
|
+
const webPlugin = defineWebPlugin({
|
|
991
|
+
id: "task",
|
|
992
|
+
session: {
|
|
993
|
+
get activityGroups() {
|
|
994
|
+
return [via({ name: "tasks" }, tasks_web_default)];
|
|
995
|
+
},
|
|
996
|
+
get channels() {
|
|
997
|
+
return [via({ channel: "task_graph" }, task_graph_web_default)];
|
|
998
|
+
},
|
|
999
|
+
get fills() {
|
|
1000
|
+
return [via({
|
|
1001
|
+
slot: "activity.tasks",
|
|
1002
|
+
id: "tasks"
|
|
1003
|
+
}, Tasks_activity_tasks_web_default)];
|
|
1004
|
+
},
|
|
1005
|
+
get toolRenderers() {
|
|
1006
|
+
return [via({ tools: ["task"] }, task_web_default)];
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
1009
|
+
});
|
|
1010
|
+
//#endregion
|
|
1011
|
+
export { webPlugin };
|
|
1012
|
+
|
|
1013
|
+
//# sourceMappingURL=web.mjs.map
|