You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add CREATE/DROP MODEL for agent-editor Model documents
Implements write support for the agent-editor Model document type,
the first CustomBlobDocument writer in the codebase.
New commands:
- CREATE MODEL Module.Name (Provider: MxCloudGenAI, Key: Module.Const)
- DROP MODEL Module.Name
Infrastructure built for reuse by other agent-editor doc types:
- sdk/mpr/writer_customblob.go — generic CustomBlobDocument BSON
wrapper writer (sets $Type, $ID, Metadata with CreatedByExtension
and ReadableTypeName, Contents JSON, ExportLevel, Excluded)
- sdk/mpr/writer_agenteditor_model.go — Model-specific Contents
JSON encoder matching Studio Pro's exact output shape
- Executor.resolveConstantRef() — resolves a qualified constant name
to {documentId, qualifiedName} for the providerFields.key reference
Validation:
- Rejects duplicate model names in the same project
- Rejects missing Key constant references with actionable error
- Defaults Provider to MxCloudGenAI when omitted
Byte-for-byte verified: Contents JSON produced by CREATE MODEL
matches the Studio-Pro-created Agents.MyFirstModel exactly (same
field names, order, nesting, and values including the resolved
constant documentId UUID).
Grammar: createModelStatement rule with modelProperty alternatives
(identifierOrKeyword for Provider, qualifiedName for Key,
STRING_LITERAL for Portal-populated metadata). DROP MODEL added
to dropStatement rule.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0 commit comments