refactor(spec): remove unenforced agent visibility field (ADR-0056 D8, #1901)#3216
Merged
Merged
Conversation
…D8, #1901) Agent `visibility` (global/organization/private) was declared but never enforced: the chat-access evaluator excluded it and the agent list route did not filter by it, so `private` never hid an agent. Per ADR-0049 / ADR-0056 D8 ("design+enforce or remove"), a security-shaped field with no runtime consumer is a liability — authors who set `private` believe they've restricted an agent when they have not. Correct enforcement is undesigned, not just unplumbed: agents have no owner field (`agent.tenantId` was already removed in #2377) and the `EXTERNAL` posture rung is never derived, so `organization` vs `global` is runtime-indistinguishable. Unlike field-encryption (kept EXPERIMENTAL — stable schema shape on a real roadmap), there is no shape worth preserving, so the field is dropped rather than carried marked. - Remove `visibility` from AgentSchema (`agent.zod.ts`) and the authoring form (`agent.form.ts`); drop the default-value assertion in `agent.test.ts`. - AgentSchema is not `.strict()`, so existing metadata still setting `visibility` parses cleanly (unknown key stripped, not rejected). - Liveness ledger: drop the `visibility` entry (`liveness/agent.json`). - Authz-conformance matrix: move `agent-visibility` from experimental to removed (ADR-0056 D10). - Regenerate schema reference docs; update the authorization posture table. Use `access` / `permissions` to restrict agent use — both enforced at the chat route (#1884). Re-introduce `visibility` when the listing surface gains real owner/org semantics; tracked in #1901. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012gckUwoUMWvTWfGHFgWAob
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📓 Docs Drift CheckThis PR changes 2 package(s): 103 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
os-zhuang
marked this pull request as ready for review
July 18, 2026 14:41
baozhoutao
added a commit
that referenced
this pull request
Jul 19, 2026
…lity removal) hotcrm v2.0.0 still authors the agent `visibility` field that #3216 removed from the spec (ADR-0056 D8), so the pre-publish downstream smoke has been red and the release train is stalled. Point the gate at hotcrm v2.1.0, which drops the field. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
baozhoutao
added a commit
to objectstack-ai/hotcrm
that referenced
this pull request
Jul 19, 2026
…0056 D8) (#449) The upcoming @objectstack/spec release removes the unenforced agent `visibility` field (objectstack-ai/framework#3216). Omit it from the two copilot agents so hotcrm typechecks against both the current and the upcoming spec. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
baozhoutao
added a commit
that referenced
this pull request
Jul 19, 2026
…e164196801bd (#3294) * ci(release): bump downstream-smoke HOTCRM_REF to v2.1.0 (agent visibility removal) hotcrm v2.0.0 still authors the agent `visibility` field that #3216 removed from the spec (ADR-0056 D8), so the pre-publish downstream smoke has been red and the release train is stalled. Point the gate at hotcrm v2.1.0, which drops the field. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore: bump objectui to e164196801bd fix(app-shell,plugin-detail): record History tab renders display values, not raw audit payloads (#2691) objectui@e164196801bd38e1396798877a69e0a09e80d8d3 --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Removes the agent
visibility(global/organization/private) field, closing out #1901 by the ADR-0056 D8 "design+enforce or remove" disposition — remove, not enforce.visibilitywas declared but never enforced: the chat-access evaluator excluded it and the agent list route never filtered by it, so settingprivatenever hid an agent. Per ADR-0049 / ADR-0056 D8, a security-shaped field with no runtime consumer is a liability — authors who setprivatebelieve they've restricted an agent when they haven't.Why remove instead of enforce or keep-marked
Correct enforcement is undesigned, not merely unplumbed:
agent.tenantIdwas already removed ([11.0][A2] Remove dead author-facing metadata properties (ADR-0049 enforce-or-remove) #2377), and agents carry no owner field — soprivate("owner only") has no anchor.EXTERNALposture rung is defined but never derived (no external principal type —posture-ladder.ts), soorganizationvsglobalis runtime-indistinguishable today.Unlike
field-encryption(kept[EXPERIMENTAL]— it has a stable schema shape on a real enterprise roadmap), there's no shape here worth preserving, so the field is dropped rather than carried marked. Re-introducevisibilitywhen the agent listing surface gains real owner/org semantics.Real gating already exists and is unchanged:
access/permissionsare enforced at the chat route (#1884).Changes
agent.zod.ts— remove thevisibilityfield; replace its EXPERIMENTAL banner with a removal note (alongside the existingtenantId-removal note).agent.form.ts— drop thevisibilityfield from the authoring form.agent.test.ts— drop thevisibilitydefault-value assertion.liveness/agent.json— drop thevisibilityledger entry (schema and ledger stay in sync for the completeness gate).authz-conformance.matrix.ts— moveagent-visibilityfromexperimental→removed(ADR-0056 D10).content/docs/references/ai/agent.mdx) and update the authorization posture table.@objectstack/specminor.AgentSchemais not.strict(), so existing metadata still settingvisibilityparses cleanly (unknown key stripped, not rejected) — a non-breaking removal, consistent with the prior compliance/masking/RLS removals.Companion PR
objectui removes the now-dead
visibilitypill fromAgentPreview: objectstack-ai/objectui#(companion — same branch).Verification
No node_modules in this environment (install was declined), so no local build/test run. Changes are surgical removals with no new logic; the spec liveness gate and the D10 matrix
removed-has-noteinvariant are both satisfied by construction (verified by readingcheck-liveness.mtsandauthz-conformance.test.ts).Closes #1901.
🤖 Generated with Claude Code
https://claude.ai/code/session_012gckUwoUMWvTWfGHFgWAob
Generated by Claude Code