diff --git a/.changeset/ai-type-create-seeds.md b/.changeset/ai-type-create-seeds.md new file mode 100644 index 0000000000..3c318c1b8b --- /dev/null +++ b/.changeset/ai-type-create-seeds.md @@ -0,0 +1,7 @@ +--- +'@objectstack/spec': minor +--- + +Add authoritative create seeds for agent / tool / skill / email_template / permission + +Extends the spec-derived create-shape contract to the AI and integration metadata types. Each now has an authoritative minimal create seed (validated against its schema), so the Studio designer / CLI / API derive their create defaults from the spec via `/meta/types` — closing the "designer emits a minimal shape the spec rejects → create→save 422" gap for these types too (agent needs `role`+`instructions`, tool needs `description`+`parameters`, skill needs `tools`, email_template needs `subject`+`bodyHtml`, permission needs `objects`). `trigger` has no spec schema and is intentionally not seeded. diff --git a/packages/spec/src/kernel/metadata-create-seeds.ts b/packages/spec/src/kernel/metadata-create-seeds.ts index 23a6954533..0fa34e8983 100644 --- a/packages/spec/src/kernel/metadata-create-seeds.ts +++ b/packages/spec/src/kernel/metadata-create-seeds.ts @@ -104,6 +104,38 @@ const BUILTIN_METADATA_CREATE_SEEDS: Partial> = { pluralLabel: 'New Objects', fields: {}, }, + agent: { + name: 'new_agent', + label: 'New Agent', + // role + instructions are required — the agent's persona and behavior. + role: 'A helpful assistant.', + instructions: 'Describe what this agent should do.', + }, + tool: { + name: 'new_tool', + label: 'New Tool', + // description + a (possibly empty) parameters record are required. + description: 'Describe what this tool does.', + parameters: {}, + }, + skill: { + name: 'new_skill', + label: 'New Skill', + // a skill bundles tools; an empty list is a valid starting point. + tools: [], + }, + email_template: { + name: 'new_email_template', + label: 'New Email Template', + subject: 'Subject line', + bodyHtml: '

Email body

', + }, + permission: { + name: 'new_permission', + label: 'New Permission', + // a permission set's per-object grant map; empty = no grants yet. + objects: {}, + }, }; /**