Let a tenant package declare the work areas it brings - #637
masterblox wants to merge 1 commit into
Conversation
A package may ship an optional surfaces.yaml naming the work areas it brings (id, title, agent_id). The build owns the module and the URL path, resolving declared ids against what it serves; a declaration nothing serves stops the deployment at package load with an error naming the id. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Needs changes before merge:
Either wire it end to end (startup calls |
|
Closing. |
A tenant package can already carry its brand, its agents, its channels, its model, its knowledge,
its skills and its guided actions. What it cannot carry is the answer to "what work does this
deployment do?". This adds one optional file for that:
surfaces.yaml.Three keys and nothing else. The build, not the package, owns the module and the URL path: declared
ids are resolved against what the build actually serves, and a declaration nothing serves stops the
deployment at tenant-package load with an error naming the id, rather than painting a tab that goes
nowhere. The closed rules (no fourth key, no
${...}, no URL, a bounded count, unique ids, anagent_idthe package actually declares) are enforced where the file is read.surfaces.yamlis deliberately the one package file read without${NAME}environment expansion.A surface is drawn for people, so an interpolated value would be published by rendering it. That
reason is written down next to the code, because it reads like an inconsistency otherwise.
Related to the direction in #398 — a package being the unit that describes its own work, rather than
something retyped into a dialog.
Tests.
server/tests/tenant-surfaces.test.ts— 12 pass, 0 fail, and it exercises the refusals,not just the happy path.
Checks, on a fresh checkout of
mainwith this change applied:bun run format:check,bun run lint,bun run typecheck,bun run build: all exit 0.bun run test: identical to the same checkout without the change — 63 fail, 57 errors, with nofailure unique to this branch and none in the added file. Those failures are environmental: the
integration suite wants a PostgreSQL with pgvector via
TEST_DATABASE_URL, which a bare checkoutdoes not have.
The change is additive and optional. A package that ships no
surfaces.yamlbehaves exactly as itdoes today.
🤖 Generated with Claude Code