feat: plan and tasks on top of new events model - #658
Open
anfibiacreativa wants to merge 2 commits into
Open
Conversation
Rebuild PR #522's plan-mode client on top of the #648 AO architecture (ChatBackend + nx-chat-interaction + adapter-shaped tool cards); this supersedes #522 and is the client for da-agent #49. - plan card: exit_plan_mode renders inline as nx-campaign-plan-card in every state; Run wired to approveToolCall; excluded from the generic approval popover - task progress: merge :::task-item status into the plan card by label (last-wins) - continuation gate: handle data-continuation in chat-controller/stream; surface as a {type:'continuation'} interaction; Continue/Stop in nx-chat-interaction - governance: evaluate_page output renders as nx-governance-evaluation-card - add messages/* card components + CSS, utils/directives.js, utils/tool-name.js - tests for the new wiring; 150/150 chat tests pass Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
6 tasks
hannessolo
reviewed
Aug 12, 2026
hannessolo
left a comment
Contributor
There was a problem hiding this comment.
Looks good to me but would be good to get @sharanyavinod to take a look too
| } | ||
|
|
||
| _onKeydown = (e) => { | ||
| if (this.pending?.type === 'continuation') { |
Contributor
There was a problem hiding this comment.
This will require adobe-rnd/da-agent#71 to be reverted right?
| @@ -0,0 +1,29 @@ | |||
| function groupChecksByCategory(evaluations) { | |||
Contributor
There was a problem hiding this comment.
as discussed on slack, fine for now but let's think about a way to move this to an extension in the future
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Rebuilds the plan-mode assistant client (originally #522) on top of the #648
"ao support via config" architecture (
ChatBackendfacade +<nx-chat-interaction>ChatControllerindependently implemented plan/approval with incompatible structures. This PR
supersedes fix(chat): fix plan card rendering, task-status persistence, and CSS #522 and is the client counterpart to da-agent [SDK] Move to newer PostMessage pattern #49 (
enter_plan_mode/
exit_plan_mode,:::task-itemdirectives, and thedata-continuationgate).Why
da-agent #49 shipped the server side of plan mode + the continuation gate without a
client that could render them on the #648 architecture. On
maintoday,exit_plan_modeshows a raw JSON approval card and
data-continuationhas no UI (it was disabledserver-side in da-agent #71 to avoid hanging the turn). This PR provides that client.
What changed — mapped to da-agent behavior
exit_plan_mode(approval-gated, carries{title, tasks[]}) rendersinline in the stream as
<nx-campaign-plan-card>in every state, with Run wired toapproveToolCall. Excluded from the generic approval popover so it isn't shown twice._taskTextconcatenates assistant text;mergeTaskItemsFromTextmerges
:::task-itemstatus into the plan card by label (last-wins) → Run → Running… → Done.chat-controller.js(CONTINUATIONevent,
continuationPending,continueExecution/stopExecution) andstream.js; surfacedas a
{type:'continuation'}interaction; Continue/Stop card in<nx-chat-interaction>(Enter/Esc), via a neutral
renderContinuationCardincard-renderers.js.evaluate_pageoutput →<nx-governance-evaluation-card>(loading / error / result).
Brings in #522's
messages/*card components + CSS andutils/directives.js/utils/tool-name.jsverbatim (already unit-tested). Purely additive overmain(~+2.1k/−19 in the chat block); the AO path is untouched.
Test plan
npm test— 150/150 chat tests pass, including new coverage for: plan-card render +Run→approve,
:::task-itemstatus merge, governance card, continuation interaction,exit_plan_modeapproval-skip, andcontinue/stopExecutionproxying.verified against a da-agent with the gate enabled. (Governance card needs a governance MCP
(
GOVERNANCE_AGENT_URL) to exercise live; covered by unit tests.)Risks / coordination
continuationApprovalPatterns: ['evaluate_*']). Once this client is merged and deployed,re-enable it in da-agent so the Continue/Stop UI activates.
ChatControllerAO) is unchanged; continuation is da-agent-only.Related