Skip to content

Commit dc5adae

Browse files
authored
Merge pull request #1050 from objectstack-ai/copilot/add-metadata-management-tool
2 parents e9b157c + de7dc8c commit dc5adae

12 files changed

Lines changed: 1693 additions & 0 deletions

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1515
absent, fixing the CI `@objectstack/client#test` failure.
1616

1717
### Added
18+
- **Metadata Management Tools (`service-ai`)** — Added 6 built-in AI tools for metadata
19+
CRUD operations, each defined as a first-class `Tool` metadata file using `defineTool()`
20+
from `@objectstack/spec/ai`:
21+
- `create-object.tool.ts` — Creates a new data object with schema validation
22+
- `add-field.tool.ts` — Adds a field to an existing object
23+
- `modify-field.tool.ts` — Modifies field properties on an object
24+
- `delete-field.tool.ts` — Removes a field from an object
25+
- `list-metadata-objects.tool.ts` — Lists all registered metadata objects
26+
- `describe-metadata-object.tool.ts` — Returns full schema details of an object
27+
28+
Each `.tool.ts` file is an independent metadata unit with `name`, `label`, `description`,
29+
`category`, `builtIn`, and `parameters` — following the same `.object.ts` / `.view.ts`
30+
metadata file convention. Handler factories remain in `metadata-tools.ts` and bind handlers
31+
at `ai:ready` time via `registerMetadataTools(registry, { metadataService })`.
32+
79 unit tests covering tool metadata properties, handler execution, input validation,
33+
error handling, dual registration with data tools, and a full lifecycle test.
1834
- **Agent Skills — `skills/` directory (agentskills.io)** — Created `skills/` folder at
1935
repository root following the [agentskills.io specification](https://agentskills.io/specification).
2036
Five expert-knowledge skills with hand-written `SKILL.md` files and `references/` quick-lookup

ROADMAP.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,6 +663,7 @@ Objects now declare `namespace: 'sys'` and a short `name` (e.g., `name: 'user'`)
663663
- [ ] Agent runtime — execute AI agents defined in spec schemas
664664
- [x] Tool registry — connect agents to ObjectQL operations, APIs, and workflows (initial implementation in `service-ai`)
665665
- [x] Conversation management — persistent chat with context windows (initial implementation in `service-ai`)
666+
- [x] Metadata management tools — 6 built-in tools (`create_object`, `add_field`, `modify_field`, `delete_field`, `list_objects`, `describe_object`) with tool definitions and runtime handlers co-located in `service-ai/src/tools/metadata-tools.ts`, registered via `registerMetadataTools()`
666667

667668
### 7.3 RAG Pipeline
668669

0 commit comments

Comments
 (0)