Add an optional 'context' parameter to the create_file and create_version
agent tools so the chat agent can pass generation/source context (e.g.
'Generated using gemini') to the AI metadata autofill workflow.
- Add Asset.autofillContext column, persisted in the same transaction as
asset creation when context is provided
- Add new list_autofill_fields agent tool exposing autofillable metadata
fields (name, type, description, options) per project
- Autofill workflow reads the stored context and includes it in the
autofill AI prompt
- Add short chat system-prompt guidance to use list_autofill_fields and
pass <=50 word context when creating files/versions
Add an optional 'data' field ({name, content}) to the create_file agent tool
so agents can create files without a local file (e.g. when bash is not
available). The existing 'path' upload mode is preserved; exactly one of
'path' or 'data' must be provided.
Extract mime detection helpers (getFileMimeType, readFileMimeType) into a
new file-mime module, keeping utils/mime.ts free of fs/path imports so it
stays compatible with the Temporal workflow bundle (agent-autofill imports
getProxyType from it). Refactor create_version to reuse the extracted
helpers.
Content uploads reuse s3Service.putObject; mime type is derived from the
filename extension with a text/plain fallback, and the name is sanitized
for the S3 key.
Two bugs found while testing skill loading as a non-owner:
1. The injected bash tool was never actually usable: AgentHarness.setTools
only updates the tool registry unless activeToolNames is passed, so bash
was missing from the active tool set sent to the model on the next turn.
Pass the full post-update tool list as activeToolNames.
2. The active_tools_change session entry (written by setTools) has no chat
representation, so mapEntryToMessage fell back to fabricating an empty
user message that appeared as a stray empty bubble in the chat stream.
Render active_tools_change as a typed custom message and skip entry
types that have no chat representation instead of emitting empty text.
A userId that is not a team member previously resolved to isOwner=true
(role === undefined || role === 'owner'), bypassing bash restrictions.
Treat only flows without a user context (autofill etc.) and explicit
owner memberships as unrestricted; unknown users are now restricted.
Editor/reviewer users can no longer ask the agent to run arbitrary bash
commands. Bash execution for them is gated behind approved team skills:
- Add required source param (enum user/skill) to the bash tool; commands
with source=user are blocked when the user is not a team owner.
- Append a Restricted User Context instruction to the system prompt for
non-owner users: never run user-requested bash, only skill-required
commands with source=skill.
- Delay bash tool injection for editor/reviewer: it is only added after
a skill is successfully loaded via read_skill (or restored when a
skill was loaded earlier in the session). Team owners are unaffected.
Add four project-level webapp e2e tests:
- invite a member to a project; the invitee only sees the invited project
- drag a file into a folder and a folder into another folder
- drag a file onto a file to create a version stack
- drag a file onto a version stack to add a new version
Supporting changes:
- expose rootFolderId on the project fixture
- add seedFolder/seedFile helpers and a cross-browser dragCard helper
(WebKit requires pointer moves in awaited batches for dnd-kit activation)
- add project-members-trigger testid to the file-browser toolbar
- document the new test cases in the e2e README
Add six domain-level web app e2e tests covering team member removal,
file upload/delete/restore, share link creation and password protection,
and collection creation. Introduce a parametrized 'file' fixture with
configurable media types (text/binary/image/video/pdf) for future
type-scoped tests, plus helpers for share APIs and team member seeding.
Also document all web app e2e test cases in apps/web/e2e/README.md and
require this documentation in AGENTS.md.
Both Agents and Members header buttons had 'sticky top-0', so while
scrolling the 256px mention list the Agents header stayed pinned and the
Members header snapped to the same top position, covering it exactly.
Remove 'sticky top-0' so headers scroll away naturally with their
sections.
- Render real avatar images (with initials fallback) for users in the
@-mention popup instead of a colored letter circle; bots keep the
colored fallback since BotInfo has no image field.
- Auto-scroll the highlighted mention row into view when navigating
the list with ArrowUp/ArrowDown keys.
Add comprehensive test coverage for 5 core service methods that were
added in the layered architecture refactor but lacked tests:
- AgentService.getAgent: found/not-found cases
- ProjectService.getUserProjects: team scope, project scope,
multi-team aggregation, limit, and empty result cases
- SkillService.getSkill: full field mapping and not-found cases
- TeamService.hasWritableRoleInAnyTeam: owner, editor, reviewer,
and no-membership cases
- UserService (new file): getUserById and createGuestUser