Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/ai-type-create-seeds.md
Original file line number Diff line number Diff line change
@@ -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.
32 changes: 32 additions & 0 deletions packages/spec/src/kernel/metadata-create-seeds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,38 @@ const BUILTIN_METADATA_CREATE_SEEDS: Partial<Record<MetadataType, unknown>> = {
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: '<p>Email body</p>',
},
permission: {
name: 'new_permission',
label: 'New Permission',
// a permission set's per-object grant map; empty = no grants yet.
objects: {},
},
};

/**
Expand Down