Commit a1194c5
feat(service-ai): add runtime metadata tool handlers with registerMetadataTools()
Implement actual ToolHandler functions for all 6 metadata management
tools in packages/services/service-ai/src/tools/metadata-tools.ts:
- create_object: Validates snake_case name, checks duplicates, registers via IMetadataService
- add_field: Validates object exists, field doesn't exist, merges into object definition
- modify_field: Validates object/field exist, applies partial patch
- delete_field: Validates object/field exist, removes field from definition
- list_objects: Returns summaries with optional filter and field inclusion
- describe_object: Returns full schema with field array and feature flags
registerMetadataTools() follows same pattern as registerDataTools().
29 unit tests covering handler execution, validation, error paths,
and full create→add→modify→delete→describe lifecycle.
Agent-Logs-Url: https://github.com/objectstack-ai/spec/sessions/ff28e788-07bc-4fd3-99b2-9f6db7352c67
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>1 parent c0f2017 commit a1194c5
6 files changed
Lines changed: 1293 additions & 7 deletions
File tree
- packages/services/service-ai/src
- __tests__
- tools
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
26 | 30 | | |
27 | 31 | | |
28 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
663 | 663 | | |
664 | 664 | | |
665 | 665 | | |
666 | | - | |
| 666 | + | |
667 | 667 | | |
668 | 668 | | |
669 | 669 | | |
| |||
0 commit comments