Repository navigation
feat(create-agent): prefill the name from the repository or template (abilityai/trinity-enterprise#964) - #3946
Conversation
…bilityai/trinity-enterprise#964) Picking a GitHub source now prefills the Create Agent dialog's Name, and so the permanent ID derived from it, with the name the source already carries: - Import a GitHub repository: the repo name without the owner, for owner/repo, URL and .git input and every import intent. - A GitHub template: its template.yaml `name:`, else its repo name. GitHub catalog entries gain `agent_name` (the declared `name:` alone, trimmed and capped; None for anything but a non-blank string), since `display_name` is the admin's or the template's catalog title. A hand-typed Name is never replaced; a Name still equal to the previous prefill follows the new source; an ID override is kept. Blank and local templates start empty as before. A candidate that sanitizes to nothing leaves Name empty. The create payload is unchanged. Fixes Abilityai/trinity-enterprise#964 Co-Authored-By: Claude Opus 5.5 <[email protected]>
obasilakis
left a comment
There was a problem hiding this comment.
Approving. Backend 13/13 and the mount spec 20/20 pass locally. Mutations (always overwrite, fill only when empty, return display_name as agent_name) each turn tests red.
One question for the issue author: AC #5 says copy sources keep an empty Name, while AC #1 says GitHub import prefills for any accepted form. The PR prefills on GitHub import with intent copy (CreateAgentModal.vue:500-503, spec it.each(['copy','fork'])). @vybe, which AC holds? If copy should stay empty, it's && importIntent.value !== 'copy' on the github-custom branch.
Non-blocking:
CreateAgentModal.vue:142: the ID preview line now appears the moment a GitHub source is picked (design contract principle 29). The manual browser check is still unticked; worth a look in both themes.dev-ciis red (#3931); wait for green before merging.
#3946) Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
merge-train 2026-10-26: pushed On obasilakis's open question (AC #5, "copy sources keep empty Name"): decided at the merge-train gate to merge as is — every GitHub import intent (clone/copy/fork) and fork-to-own templates prefill from the repo name; prefill never clobbers a typed name. AC #5 is read as covering Blank only, since the dialog has no other copy source. |
…y.json rebuilt from stages (#3946) Co-Authored-By: Claude Opus 5.5 <[email protected]>
Conflicts (both sides appended): docs/memory/feature-flows.md (kept both index rows, newest first) and tests/registry.json (kept both; every entry three-way checked). #3936 and #3946 add no route this census sees as a hand-copied self-gate and do not reference the old AGENT_CALLABLE table. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Summary
Abilityai/trinity-pm→trinity-pm), forowner/repo, URL and.gitinput and every import intent.name:, else its repo name. This covers featured fork-to-own templates and templates preselected by Library → Use Template.Changes
src/backend/services/template_service.py: GitHub catalog entries gainagent_name, the declaredname:alone.display_namecan't carry it, because it resolves the admin's title, then the template'sdisplay_name, thenname:.name:is untrusted (Path traversal in template resolution:local:<id>read escape, plusname:-derived credential staging that leaks another tenant's .mcp.json #1900). Anything but a non-blank string becomesNone, it is trimmed and capped at 128, and it is never raised on the catalog path.src/frontend/src/components/CreateAgentModal.vue:sourceName(computed): the name the picked source carries.watchthat writes it into Name only while Name is empty or still equals the last prefill.requirements/core-agent.md§1.1 andfeature-flows/agent-lifecycle.md.Test Plan
cd tests && pytest unit/test_ent964_template_agent_name.py: 13 cases (declared, admin title ignored, trimmed, capped, and none for missing, blank, non-string or a non-mapping template.yaml). All red before the change.npx vitest run tests/unit/createAgentNamePrefill964.spec.js: 20 cases, one or more per acceptance criterion. 14 were red before the change; the other 6 cover behaviour that must not change (Blank and local stay empty, typed names kept).owner/repoand Name showsrepo; type your own name, change the repo, and your name stays.Pre-existing, not changed here:
parseGithubRepocuts a repo URL at the first dot, sohttps://github.com/acme/trinity.docsbecomesacme/trinity(theowner/repoform is fine). Filed as #3947; the prefill makes it visible as Nametrinity.Fixes abilityai/trinity-enterprise#964
🤖 Generated with Claude Code