Skip to content

DO NOT MERGE — merge train: 4544, 4658, 4388 - #4667

Closed
vybe wants to merge 13 commits into
devfrom
train/20261119-1518
Closed

vybe wants to merge 13 commits into
devfrom
train/20261119-1518

Conversation

@vybe

@vybe vybe commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Integration surface for #4544, #4658 and #4388. Never merged; the members merge individually once this is green.

francisjervis and others added 13 commits November 8, 2026 23:31
…4387)

A template can now name skills from the platform skills library in
`template.yaml` `library_skills:`. Creating an agent from it assigns each
name the library has (as the owner; the creating agent recorded for
attribution) and delivers them once the agent's /health answers, through
the start-path injection. Creation starts the container directly, so
nothing else delivered assigned skills before the agent's next start.

- services/template_skills.py: total reader (charset from skill_packaging,
  de-dup, cap 50, `set:` refused by name); both catalog builders surface
  library_skills + library_skill_errors
- all three resolver branches fill _TemplateResolution.declared_library_skills
- the skills.manage fence applies at creation: an agent key without the
  grant gets no assignment; people, user keys and the system key pass
- ghost-skipped, non-fatal inside the creation rollback fence; a missed
  delivery is repaired by the next start
- requirements §21.3.4, architecture map + agent-lifecycle section, agent guide

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…refusal (#4387)

Addresses the merge-train review on #4388.

- Call site pinned: three test_4387_* cases in the create-agent
  characterization suite run a whole create_agent_internal. With the call
  site passing tr.declared_library_skills unfenced, the agent-key case goes
  red. The copy-snapshot resolver branch gets its own test as well.
- The fence refusal at creation is now an audit row (capability_refused,
  target = the new agent), and an agent key the grant admits leaves a
  capability_used row, like the route fence. dependencies._audit_capability
  now tolerates request=None, which a system deploy passes.
- LIBRARY_SKILLS_READY_TIMEOUT_S is a constant, not an env read.
- Third-party names removed from the requirement text and test fixtures.
- Feature-flow doc (template-library-skills.md) and a "Declared Library
  Skills" section in the creating-agents user doc.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The /workspace/a/:name watcher returned while the roster was still
loading and only ran again when the route name or the thread count
changed. With no chats the count stays 0, so the watcher never ran
again and the stage fell back to the first own agent.

Fixes #4517
A failed sessions read never latches threadsLoaded, so the new guard kept the
previous conversation on stage under the clicked agent's URL. Treat a failed
list as settled and re-run the watcher when sessionsFailed changes.
Conflicts in docs/memory/feature-flows.md and agent_service/crud.py were
keep-both: dev's declared_model seed (#4442) and bundled avatar install
(ent#1173) sit beside this branch's declared_library_skills.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…gnment (#4387)

dev's ent#753 guard requires every agent_skills writer to reach the gate
reconcile. The creation-time writer now does, before delivery, and is
listed in the guard's expected sites.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…4654)

/api/mcp/validate now returns user_role alongside the existing fields.
McpAuthContext gains a userRole field populated at auth time.
checkAgentAccess in chat.ts uses authContext.userRole === "admin" instead
of the previous username string comparison, so a renamed admin retains
access and an account named "admin" without the role is refused.

Regression test: chat.admin-acl.test.ts (2 cases).

Closes #4654

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…es empty (#4517)

threadsLoaded gated the landing watcher without being one of its sources,
so a click on an agent while the first thread read was in flight never
landed for a person with no chats. It is now a watch source. Tests cover
that case and pin the sessionsFailed source on a cold agent link.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… assertion (#4654)

The validate response's user_role and the server's hand-off into the auth
context were unpinned: deleting either left every test green while every
admin lost the bypass. Also notes on the type that userRole is the owner's
role on every scope, and documents the field.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…incipal (#4387)

The assignment-time gate reconcile carried no actor, so a default gate
applied at creation was audited as system. The principal and request are
now threaded through, a test pins the reconcile and its order before
delivery, and an ephemeral creation no longer runs the skills.manage
fence it cannot use.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ui PR touches the frontend UI — triggers Playwright e2e tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants