Skip to content

feat(assistant): bring in local agents, with this instance's address in the steps (abilityai/trinity-enterprise#1353) - #4749

Merged
vybe merged 3 commits into
devfrom
feature/1353-local-agents
Nov 24, 2026
Merged

vybe merged 3 commits into
devfrom
feature/1353-local-agents

Conversation

@trinity-ability

Copy link
Copy Markdown
Contributor

Assistant half of abilityai/trinity-enterprise#1353, building on the first session from #4736. Companions: abilityai/trinity-enterprise#1371 (status local_agents) and abilityai/trinity-gateway#30 (the offer, the no, the pick-up).

What changes

  • The opening's I already run agents in Claude Code goes to the assistant as a first-session turn. The localHandOff stub ("coming soon") is removed.
  • local-move card (AssistantLocalMove.vue, utils/localMove.js): every step and command is written by the page, and the card is accepted only bare.
    1. Turn on External MCP access, linking to /settings?tab=mcp-keys. Shown while /api/settings/mcp-external-access says off or can't be read.
    2. Add the plugins (agent-dev, create-agent, trinity from abilityai/abilities).
    3. /trinity:connect, with window.location.origin filled in.
    4. /agent-dev:agent-fleet-analysis: a report they read first; nothing moves yet.
    5. /agent-dev:agent-fleet-migrate: waits for their yes, then asks again before deploying; the GitHub repo + read-token prerequisite is stated.
    • A closing line says .env files stay on their machine and credentials are asked for in the masked field, never in chat. There is no Confirm button: the card changes nothing here. Space is reserved while access is read.
  • Opening (openingGroup): status local_agents: 'no' offers only Start from scratch; 'offered' offers My agents are here / Start from scratch.
  • Store externalMcpAccess() returns true / false / null and never throws.
  • Enterprise pointer 26ccbb3 → 1413256 (abilityai/trinity-enterprise#1371's head).

Tests

  • assistantWidget.mount.spec.js (+6 mounted, 1 replaced): the local answer is sent as a first-session turn; the card shows the origin, /trinity:connect and both fleet skills; the access step appears when access is off, is gone when it is on, and is worded as a check when it can't be read; the opening respects a kept no and an earlier offer.
  • localMove.spec.js (8): step order, address, access step, card gate (extra keys refused), opening group.
  • Mutation: deleting the card-accept line turns 4 red.
  • Touched specs plus the raw-color, loading-gate and source-text ratchets: 236 passed. The full frontend vitest run was not done here; it does not finish in this container's time limit.

Steps that do not work yet against a self-serve instance (dev c62030c)

Desk-checked, not run live. Nothing here is worked around: the plugin skills are not changed by these PRs.

  1. External MCP access is off on a fresh instance. /trinity:connect is refused (403 external_mcp_access_off) until an admin turns it on under Settings → MCP Keys. The card reads /api/settings/mcp-external-access and shows this step first, with a link, while access is off or the state can't be read. Not fixed. Still open for the operator: should self-serve spares be built with it on?
  2. Each moved agent needs its own GitHub repo. agent-fleet-migrate 1.3 deploys repository-first: gh signed in on the person's machine, plus a GitHub read token on the instance (Settings → MCP Keys → Personal GitHub Token). The card states both. A person without gh cannot complete the move. That fix belongs to the marketplace side (trinity-pm).
  3. Sign-in by emailed code: unverified. /trinity:connect signs in by emailed code and needs an operator+ account. It should work for the setup admin through the gateway relay, but nobody has checked it live.
  4. Terms: unverified. Nobody has checked whether an MCP key from /trinity:connect meets any terms gate on a self-serve instance before /trinity:onboard / deploy_system creates agents. The free plan's build limits on agents created over MCP haven't been checked either.
  5. Running after the move. Claude has to be connected (fix(deps): remediate Dependabot npm alerts via lockfile bumps + overrides (#1353) #1354, today the API key) and each agent's credentials typed in again, because .env files stay behind. The assistant's "Agents moved in" steps handle this: Claude first, then ask_credential per missing credential, one run, one schedule. It only works if the instance's tools can list an agent's missing credentials. Not run live.
  6. Arrival is said, not detected. The assistant picks up when the person presses or says "My agents are here", or when its agent list shows agents it didn't build after the steps were given. Nothing is pushed to the page when the move finishes.

No closing keyword (cross-repo issue; closes at release). Ready for review; not merged by me.

🤖 Generated with Claude Code

…in the steps (abilityai/trinity-enterprise#1353)

The opening's 'I already run agents in Claude Code' now goes to the assistant
(it was a 'coming soon' line written on the page). The assistant answers with a
local-move card: the page writes every step and command (utils/localMove.js)
with window.location.origin, and puts 'turn on External MCP access' first while
the instance says it is off or cannot say. The card has no Confirm; it changes
nothing here. The opening leaves out an answer already given (status
local_agents: 'no' drops the local path, 'offered' asks 'My agents are here').

Enterprise pointer 26ccbb3 -> 1413256 (abilityai/trinity-enterprise feature/1353-local-agents).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@trinity-ability

Copy link
Copy Markdown
Contributor Author

Validation: REQUEST CHANGES (one item: the submodule pointer)

Independent validation, run on fresh clones of this PR and its two companions. Lane C because of the submodule pointer.

This PR must not merge until the change below is made:

  • src/backend/enterprise points at 1413256, the head of an unmerged companion branch, which is not on the private repo's main. Once the companion merges, re-pin it to the squash-merge commit that companion creates on the private repo's main. Its current main tip is 26ccbb3, the existing pin, with nothing landed since. Merge this PR straight after: until it lands, the private repo's paired card-parity test runs against dev and stays red.

Checked, all pass:

  • The card carries no model text. acceptCards accepts local-move only with no other keys, and AssistantLocalMove takes no props. Every word and command comes from utils/localMove.js, and the address is window.location.origin. Two mutations were tested: letting extra keys through makes localMove.spec red, and hard-coding the address makes assistantWidget.mount.spec red.
  • "Start from scratch" behaves as before. The opening with no recorded answer is the same two buttons, pick() no longer special-cases anything, and scratch still goes through send(). Starters are still shown only while the panel is fresh.
  • No secret is asked for or carried. The commands contain no values, and the closing line sends credentials to the masked field.
  • Removing the localHandOff stub is justified. Its only test asserted the "coming soon" text and was replaced by the first-session-turn test, and nothing else references it.
  • Tests: 248 passed across the 9 specs that touch the assistant and first session (ratchets included), all green. Tier 1 is green: pytest (head), regression diff, journey-impact, journey-smoke, e2e. dev-ci is green.

Warnings (not blocking):

  • The opening's "My agents are here" button exists only while the person has no agent of their own (isFirstSession). The moment moved agents arrive it is gone, so picking up depends on the person typing it or the assistant noticing. Item 6 of the body covers this; worth a follow-up.
  • No closing keyword. The issue is in the other tracker, so automation would not promote it anyway; set its status by hand after merge.
  • /review and /cso --diff were not run in this validation.

@trinity-ability trinity-ability added the status-needs-fix PR has an unaddressed review/validation finding; cleared by the author's next push (#2815) label Nov 24, 2026
Trinity Agent (trinity) and others added 2 commits November 24, 2026 03:28
…istant status (abilityai/trinity-enterprise#1371)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…abilityai/trinity-enterprise#1353)

The opening group was gated on isFirstSession, which ends the moment the
person has an agent of their own — exactly when moved agents arrive. With
local_agents 'offered' it now stays while the first session runs (until the
first result is seen). The new mount spec went red (normal starters shown,
no 'My agents are here') before the change.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@vybe vybe 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.

Independent validation asked only for the submodule pointer to sit on a merged commit; it now does, and the one follow-up fix is a two-line change with its own test. All required checks green.

@vybe
vybe merged commit 2611e60 into dev Nov 24, 2026
26 checks passed
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.

2 participants