fix(admin): adagents.json builder always emits valid v3 authorization_type#4464
Merged
Merged
Conversation
…_type Every saved or serialized agent now carries an authorization_type discriminator plus matching selector. Copy/Download block when any agent lacks scope (catches registry-picker stubs and untouched v2 imports) or when the contact section has fields filled but no name. Refs Russell Stringham's #4459 thread question. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced May 12, 2026
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
The
/adagents/builderadmin tool could produceauthorized_agents[]entries with onlyurl + authorized_for + delegation_type, which fails v3 schema validation. v3 requiresauthorization_typeplus a non-empty matching selector on every entry.Russell Stringham flagged this on the #4459 thread.
What changed in
server/public/adagents-builder.htmlsaveAgentmaps the three access-mode radios to explicit v3 shapes:authorization_type: property_ids(≥1 selection required)authorization_type: property_tags(≥1 selection required)property_ids(no implicit "all + future"; help text reflects this)updateJsonPreviewdrops the legacy fallthrough that emitted bareproperty_idswithoutauthorization_type.editAgentreads v3 fields first; v2property_ids/tag:-prefix shape is a legacy import path that auto-upgrades on next save.coversAlldetection uses Set equality.renderAgentsshows a red "copyJson/downloadJsonnow callblockIfAgentsMissScopeto refuse export when any agent lacksauthorization_typeor when the contact section has fields filled but noname(v3 requires it).Validated
property_idssnapshot,property_tags, reference-mode) validate againststatic/schemas/source/adagents.jsonvia Ajv with full core-schema graph loaded.{url, authorized_for, delegation_type}shape correctly fails v3 validation.adagents-manager.test.tstests pass.Test plan
/adagents/builderafter deploy: add agent in each of the three modes, copy JSON, paste into validator🤖 Generated with Claude Code