feat(chat-ao): add CMA bridge controller subclass - #811
Open
anfibiacreativa wants to merge 1 commit into
Open
anfibiacreativa wants to merge 1 commit into
anfibiacreativa wants to merge 1 commit into
Conversation
Second step of decoupling the chat controller (see docs/chat-ao-controller-decoupling.md): the CMA bridge path now has its own subclass instead of sharing the AO-direct controller. - cma-chat-controller.js: CmaChatController extends Base. Routes the socket to the bridge (CMA_BRIDGE_WS_BASE) with activationKey + x-site on one AUTH frame, maps bridge auth rejections to tester-facing copy, routes the skills catalog to the bridge, and resumes the last session for the site on reload via a per-site sessionStorage pointer (the bridge replays history on attach). - base: _attach/reattachIfIdle and a default attach-only warmSession move to Base (both harnesses use them); Coworker keeps the REST warm override. - chat-ao.js: selects CmaChatController vs CoworkerChatController from the ew.altHarness flag once config resolves, passing the activation key. - skills.js: fetchSkills routes to the bridge REST plane (+ x-user-id) when an activation key is present; AO path unchanged. - ao-constants.js: CMA bridge WS/HTTP bases. - 10 CMA-subclass tests; 326 chat-ao tests pass total. Folds in the resume-on-reload work (supersedes feat/chat-ao-resume-main) and absorbs the ewoncma CMA client features onto current main.
anfibiacreativa
added this pull request to stack #812
October 3, 2026 07:43
|
Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch.
Commits
|
This branch was successfully deployed
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.
│ Stacked on PR 1 (feat/chat-ao-controller-decouple). Base this PR on that branch; rebase onto main once PR 1 merges.
Summary
resume the last session per-site on reload.
Why
Completes the controller decoupling started in PR 1. With a dedicated CMA subclass, bridge-path behavior (resume, auth-error copy, skills routing) can evolve without
any risk to the CX Coworker path, and vice-versa. It also absorbs the long-lived ewoncma branch's CMA client work onto current main and folds in the reload-resume
change (superseding feat/chat-ao-resume-main).
What Changed
_onSessionReady persists it, _onSessionError drops a rejected/stale pointer and starts fresh, startNewEpisode clears it.
warm override.
passed through. onUpdate handling extracted to _onControllerUpdate.
Test Plan
Risks / Follow-ups
change is deferring controller creation to after the flag resolves (no component-mount test depends on the old eager timing).
still wanted.
Test URLs: