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
11 changes: 11 additions & 0 deletions .changeset/ai-studio-five-registered-tool-names.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
"@objectstack/spec": minor
---

`PLATFORM_TOOLS_BY_PACKAGE['service-ai-studio']` lists the five tools the cloud AI runtime registers that it had been omitting: `get_authoring_rules`, `load_tools`, `open_record`, `test_flow` and `toggle_flow`. Added in the list's existing alphabetical order; nothing else in the registry moves.

The omission was not cosmetic. `PLATFORM_PROVIDED_TOOL_NAMES` is the load-bearing half of `skill.tools[]` reference integrity under ADR-0109 — the default third-party authoring path declares no tool records at all, so a `skill.tools[]` entry resolves against this registry or against the materialised `action_<name>` family and against nothing else. While these five were absent, a skill naming any of them was reported by `validate` / `lint` as a **fictional** tool reference (`ai-skill-tool-unresolved`), which is precisely the failure the registry was created to end. Five previously-refused references are now accepted; a name registered by nobody is still refused.

The module's own maintenance contract already said why an omission is worse than no registry at all — "an out-of-date registry is worse than no registry, because consumers now trust it" — and a second consumer had already paid for it: `@objectstack/mcp` gives a listed name `openWorldHint: false`, and the Studio's tool-step labels read the same set.

This is the data half only. Making the owning package's conformance test **derive** the union from what `plugin.ts` actually registers, instead of restating it, is tracked separately in the cloud repository; re-copying the list correctly resets the clock rather than stopping it.
27 changes: 27 additions & 0 deletions packages/lint/src/validate-ai-tool-references.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,33 @@ describe('validate-ai-tool-references', () => {
expect(validateAiToolReferences(stack)).toEqual([]);
});

/**
* [#16512] The five `service-ai-studio` tools the cloud runtime registers
* that the registry did not list.
*
* `PLATFORM_PROVIDED_TOOL_NAMES` is the load-bearing half of
* `skill.tools[]` reference integrity under ADR-0109, so while these five
* were absent a skill naming any of them was reported as a FICTIONAL tool —
* the precise failure the registry exists to end. The pin lives here, not
* beside the constant: "refused" and "accepted" are this rule's verdicts,
* and the list's own file can only pin its shape.
*/
it('resolves the five service-ai-studio tools the registry was missing (#16512)', () => {
const five = ['test_flow', 'toggle_flow', 'get_authoring_rules', 'load_tools', 'open_record'];
expect(validateAiToolReferences({ skills: [{ name: 's', tools: five }] })).toEqual([]);

// The control, without which this pin cannot fail: a sixth name shaped
// exactly like the five and registered by nobody is STILL reported. A
// universe widened until everything resolves would pass the assertion
// above and fail this one.
const control = validateAiToolReferences({
skills: [{ name: 's', tools: [...five, 'archive_flow'] }],
});
expect(control).toHaveLength(1);
expect(control[0].path).toBe('skills[0].tools[5]');
expect(control[0].message).toContain('archive_flow');
});

it('reports stable paths and tolerates junk shapes', () => {
const stack = {
skills: [{ name: 's', tools: ['query_records', 'nope_tool'] }],
Expand Down
5 changes: 5 additions & 0 deletions packages/spec/src/system/constants/platform-tool-names.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,21 @@ export const PLATFORM_TOOLS_BY_PACKAGE: Readonly<Record<string, readonly string[
'describe_metadata',
'describe_object',
'get_active_package',
'get_authoring_rules',
'get_metadata_schema',
'get_package',
'list_metadata',
'list_objects',
'list_packages',
'load_tools',
'modify_field',
'open_record',
'propose_blueprint',
'set_active_package',
'suggest_builder',
'test_flow',
'todo_write',
'toggle_flow',
'update_metadata',
'validate_expression',
'verify_build',
Expand Down
Loading