Repository navigation
feat(library): rename Templates page to Library — one surface for agent templates + skills (ent#263) - #1904
Conversation
…ent#263) Byte-pure git mv with zero content edits so git rename detection holds and a parallel edit to Templates.vue (ent#260) resolves as a content merge inside Library.vue rather than a modify/delete conflict. All content changes land in follow-up commits. Co-Authored-By: Claude Fable 5 <[email protected]>
…ect (ent#263) - Library.vue: h1 'Library', new subtitle, templates content wrapped in an 'Agent Templates' section (own loading/error/empty states; inner headings demoted h2->h3); fetch migrated to the shared api client (Invariant #7) - router: /library route (meta.title Library) + /templates function-form redirect carrying query AND hash; route name Templates->Library (no named pushes exist) - NavBar: label Library, to=/library, active via startsWith('/library') - CreateAgentModal: its single raw-axios /api/templates call migrated to the shared api client so no half-migrated consumer of the endpoint remains Page-identity naming only (AC#4 reading): the asset-kind noun 'template' survives inside the Library (Starter/GitHub Templates sections, Use Template). Co-Authored-By: Claude Fable 5 <[email protected]>
… library (ent#263) - stores/skillsLibrary.js (new): fleet-scoped store, deliberately separate from stores/skills.js (KeepAlive-cached AgentDetail means SkillsPanel's clear() never fires on nav-away — shared refs would poison the cached tab); imports nothing from stores/skills.js. 4-state emptyReason discriminator (unconfigured/not_cloned/empty + error carried separately); sync() with a 180s timeout and ECONNABORTED -> status-refetch (a first clone can outlive the 30s api.js default; client timeout != server failure) - components/LibrarySkillsSection.vue (new): sync-state header leads with commit_sha + skill_count (disk-derived; last_sync is per-worker in-memory and renders only when truthy); repo URL admin-only, userinfo-stripped, labeled 'Primary source', hidden when status.sources reports >1 (#1901 forward-compat); admin Sync now; per-kind empty states teaching the next action; dormant source_name/shadowed_by slots; interpolation only - components/skills/{SkillContractChips.vue,contract.js} (new): the #183 contract-chips seam extracted from SkillsPanel so both the per-agent tab and the Library browse render package facts from one seam - SkillsPanel.vue: consumes the shared seam (local SkillMeta/formatBytes/deps removed); stores/skills.js untouched - Library.vue: skills section wired in + header jump anchors (no ?kind=) Co-Authored-By: Claude Fable 5 <[email protected]>
…263) - smoke.spec.js: '@smoke library page loads' asserts chrome-only getByRole headings (h1 Library + both section headings — the old getByText(/template/i) passed on the un-renamed page and proved nothing); new '@smoke templates path redirects to library'; stale nav comment fixed (Health/Ops merged in #1109) - browser-tab-titles.spec.js: nav click asserts 'Trinity — Library'; redirect test also covers /templates -> /library title resolution - tests/test_templates.py: remove TestEnvTemplate + TestTemplateRefresh — GET /api/templates/env-template and POST /api/templates/refresh no longer exist (router has exactly 2 GET routes; live-stack probe returns 404); test_get_template_by_id now exercises the REAL detail endpoint instead of the dead env-template detour that always skipped. 5 remaining tests pass against the live stack. Co-Authored-By: Claude Fable 5 <[email protected]>
…endpoint rot sweep (ent#263) - requirements/core-agent.md: new §4.5 Library Page — unified /library surface (agent templates + fleet skills browse), query+hash-preserving /templates redirect, stacked sections, per-kind empty states, the AC#4 page-identity naming rule; fleet assignment visibility named as Not Built - requirements/skills.md (surgical — §21.3/§22.2/new §22.3 only, avoiding PR #1901's §21.1/§21.5 hunks): §21.3 stale 'Skills tab is hidden' note corrected (visible since ent#235/PR #1877); §22.2 rewritten as visible/rebuilt; new §22.3 Library Page fleet skills browse — browse-only over the existing /api/skills/library reads, own skillsLibrary store + the KeepAlive rationale, admin-only URL/Sync, #1901 forward-compat, assignment read = Not Built - architecture.md: 'Top-nav IA — Library (ent#263)' paragraph beside the #1109 Operations one; stale 'Templates (4 endpoints)' table corrected to the 2 real routes (POST /refresh AND GET /env-template both verified absent) - feature-flows: templates-page.md git-mv'd to library-page.md + full rewrite (the old file was deeply stale — AgentSubNav, dead endpoints); index row + platform-settings.md Related-Flows link repointed - template-processing.md + CREDENTIAL_MANAGEMENT.md: dead env-template endpoint references removed/replaced (same rot class as the architecture table); Templates.vue references repointed at Library.vue - user docs (creating-agents.md, faq/agents.md): Templates page → Library (+ redirect note) Co-Authored-By: Claude Fable 5 <[email protected]>
…s row, dead skills-management link purge (ent#263) /sync-feature-flows verification pass over the branch diff: - skill-assignment.md: note that SkillsPanel's package-fact chips now render via the shared components/skills/ contract seam (extracted in ent#263) - feature-flows.md: Recent Updates row for ent#263; removed the stale 'Skills Management UI' index row — skills-management.md was split/archived long ago (the archive table records it) and the live row pointed at a missing file - library-page.md: repointed its two skills-management.md links (propagated from the stale index row) at skill-assignment.md Co-Authored-By: Claude Fable 5 <[email protected]>
…able URL shapes; share it with SkillsPanel (ent#263 review) Adversarial testing of the display-layer credential scrubber proved five leak shapes. Two families: the regex fallback under-matched what new URL() rejects (git+ssh:// schemes, protocol-relative //user:token@host, leading whitespace), and — worse — schemeless/scp user:token@host shapes PARSE as a WHATWG URL with an opaque hostless path where .username/.password assignment is a silent no-op, so the credential sailed through the success lane untouched. - move stripUserinfo to the shared components/skills/contract.js seam - trust the parsed lane only when host is present AND the strip verifiably took (post-assignment username/password empty); otherwise fall through to a widened textual scrub (scheme charset [A-Za-z][\w+.-]*, protocol- relative, schemeless colon-user, trim) - variant analysis: SkillsPanel's library_empty state rendered the RAW stored URL to any agent accessor — now scrubbed through the same helper - verified by an executed 26-case suite (23 adversarial leak shapes ALL PASS + 3 must-survive-unmangled regressions: plain https, scp git@host:path, path-@ preserved) - durable class captured in docs/memory/learnings.md Co-Authored-By: Claude Fable 5 <[email protected]>
… (ent#263 review) - feature-flows.md Archived Flows table pointed at archive/skills-management.md, which does not exist (the archive/ dir never received it) — same dead-link class d23005a purged from the skills index; row now says 'document not preserved' and names the dedicated flows it split into - add the /cso --diff report for the ent#263 review: zero backend surface delta; one MEDIUM display-layer scrubber finding (proven, remediated in 820895b with variant coverage); secrets/enterprise- disclosure/XSS/supply-chain/CI categories clean Co-Authored-By: Claude Fable 5 <[email protected]>
b89ff6a to
abef5f4
Compare
|
Resolve by running |
/review ReportBranch: No critical findings. This one is careful about exactly the things a "render semi-trusted GitHub content" page should be. Verified safe (with evidence)
Clean categoriesSQL / auth / credentials — N/A (no backend logic changed; only a test file). Reactive state — the store's non-shared-refs rationale is sound and documented. Error handling — the store's error path is the model case. Docs — feature-flow + requirements updated in-diff. Critical: 0 · Informational: 0 · Scope: clean. LGTM. |
…-page # Conflicts: # docs/memory/feature-flows.md # docs/memory/learnings.md
…-page # Conflicts: # docs/memory/feature-flows.md # src/frontend/e2e/browser-tab-titles.spec.js # src/frontend/e2e/smoke.spec.js # src/frontend/src/components/NavBar.vue
ent#263 (PR #1904, merged today) renamed `Templates.vue` -> `Library.vue` and restructured it into "installable assets for your fleet" — two stacked sections with jump anchors — with a comment recording that tab/filter-pill navigation was considered and deliberately rejected for this page. ent#126 had built its install surface as an `?tab=agents|systems` strip on that same page. Two independent designs for one page. This conforms to ent#263's model rather than reintroducing a competing one: Systems becomes a third `<section id="systems">` with its own jump anchor. Placed BETWEEN Agent Templates and Skills, not appended: Systems and Agent Templates both *install agents* (one template makes one agent, one manifest makes a wired fleet), while Skills configures agents that already exist. Grouping the two install kinds and leaving Skills last reads better than stacking Systems third by default. Hidden outright below `creator` rather than shown-and-disabled — a browse surface gains nothing from a dead panel — and the jump anchor is gated with it, so the nav can never point at a section that is not rendered. Also in this merge: - Kept dev's shared `api` client; did NOT reintroduce the raw `axios` import my side still carried (Invariant #7 moved underneath this branch). - e2e retargeted from the tab strip to the section, plus a new assertion that `/templates#systems` still redirects with the hash intact — that legacy hop is what older links land on. - Docs realigned across architecture, requirements, both flows and the user guide; the ent#263 page flow (`library-page.md`) gains the third section and records that tabs stay rejected. - learnings.md and the feature-flows index took both sides. The design question this raises — whether a fleet installer belongs on a browse page at all — is deliberately left for review rather than settled here. Full unit suite on the merged tree: 6173 passed, 14 skipped, 1 xfailed. Co-Authored-By: Claude Opus 5 <[email protected]>
Fixes abilityai/trinity-enterprise#263
Summary
Two-commit pure-
git mvrename (Templates.vue → Library.vue, then content edits) + a/libraryroute with a query+hash-preserving/templatesredirect. Adds a fleet-level skills browse section over the existing/api/skillsreads — isolated instores/skillsLibrary.js, zero overlap with open PR #1901's files — plus dormant slots for #1901'ssource/shadowedfields. e2e anchors + docs updated; stale-doc cleanup (deadenv-template/refreshendpoints, dead skills-management links).Flags
GET /api/skills/assignmentsendpoint is viable now.stripUserinforewritten after 5 proven credential-leak shapes (26-case adversarial suite); shared with SkillsPanel.Test evidence
verify-local --skip-agentPASStests/test_templates.py: 5 passedMerge-order notes
requirements/skills.mdhunks verified disjoint from open PR feat(skills): multi-source skills library — bundled community repo + per-instance custom repos (abilityai/trinity-enterprise#237) #1901 (first-merged wins; worst case a context-line rebase).Follow-ups (listed, NOT filed)
GET /api/skills/assignments(plan §6.2, unblocked)/operating-roomredirect hash gapurlonGET /api/skills/library/status(any-auth disclosure; coordinate with feat(skills): multi-source skills library — bundled community repo + per-instance custom repos (abilityai/trinity-enterprise#237) #1901)/templates— redirect keeps them working)🤖 Generated with Claude Code