Skip to content

feat: plan and tasks on top of new events model - #658

Open
anfibiacreativa wants to merge 2 commits into
mainfrom
feat/plan-tasks-on-648
Open

feat: plan and tasks on top of new events model#658
anfibiacreativa wants to merge 2 commits into
mainfrom
feat/plan-tasks-on-648

Conversation

@anfibiacreativa

Copy link
Copy Markdown
Member

Summary

Rebuilds the plan-mode assistant client (originally #522) on top of the #648
"ao support via config" architecture (ChatBackend facade + <nx-chat-interaction>

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 main today, exit_plan_mode
shows a raw JSON approval card and data-continuation has no UI (it was disabled
server-side in da-agent #71 to avoid hanging the turn). This PR provides that client.

What changed — mapped to da-agent behavior

  • Plan cardexit_plan_mode (approval-gated, carries {title, tasks[]}) renders
    inline in the stream as <nx-campaign-plan-card> in every state, with Run wired to
    approveToolCall. Excluded from the generic approval popover so it isn't shown twice.
  • Task progress_taskText concatenates assistant text; mergeTaskItemsFromText
    merges :::task-item status into the plan card by label (last-wins) → Run → Running… → Done.
  • Continuation gate — ported the backend into chat-controller.js (CONTINUATION
    event, continuationPending, continueExecution/stopExecution) and stream.js; surfaced
    as a {type:'continuation'} interaction; Continue/Stop card in <nx-chat-interaction>
    (Enter/Esc), via a neutral renderContinuationCard in card-renderers.js.
  • Governance cardevaluate_page output → <nx-governance-evaluation-card>
    (loading / error / result).

Brings in #522's messages/* card components + CSS and utils/directives.js /
utils/tool-name.js verbatim (already unit-tested). Purely additive over main
(~+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-item status merge, governance card, continuation interaction,
    exit_plan_mode approval-skip, and continue/stopExecution proxying.
  • ✅ ESLint + Stylelint clean.
  • ⏳ Local E2E (frescopa): plan card renders → Run → task progress. Continuation Continue/Stop
    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

  • Continuation gate is currently disabled server-side (da-agent Media by folder #71 commented out
    continuationApprovalPatterns: ['evaluate_*']). Once this client is merged and deployed,
    re-enable it in da-agent so the Continue/Stop UI activates.
  • AO path (ChatControllerAO) is unchanged; continuation is da-agent-only.

Related

claude and others added 2 commits August 12, 2026 11:10
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>
@aem-code-sync

aem-code-sync Bot commented Aug 12, 2026

Copy link
Copy Markdown

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch.
In case there are problems, just click the checkbox below to rerun the respective action.

  • Re-sync branch
Commits

@hannessolo hannessolo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me but would be good to get @sharanyavinod to take a look too

}

_onKeydown = (e) => {
if (this.pending?.type === 'continuation') {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will require adobe-rnd/da-agent#71 to be reverted right?

@@ -0,0 +1,29 @@
function groupChecksByCategory(evaluations) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as discussed on slack, fine for now but let's think about a way to move this to an extension in the future

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants