You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(spec): tombstone agent.tools instead of deleting it — unbreak main (#3894 follow-up) (#3904)
#3894 removed `agent.tools` and `AIToolSchema` outright, which broke
`pnpm --filter @objectstack/spec build` on main: the authorable-surface
ratchet (ADR-0104 / #3733) fails when an authorable key disappears,
because none of these schemas is `.strict()` — Zod silently STRIPS an
unknown key, so an author who keeps writing `tools:` gets a clean parse
and an agent that reaches none of the tools they listed. That is the
silent-capability-loss shape #3820 exists to eliminate, restored one
layer down. The gate was right; my removal was wrong.
(It slipped CI because Build Core restored a turbo cache entry for the
spec build; the failure reproduces on any cold build of main.)
The removal stands — ADR-0064 needs the second, unscoped tool slot gone.
What changes is HOW it is removed:
- `agent.tools` is now `retiredKey()`, so authoring it throws with the
fix in the message (use `skills`; a platform tool by name, or
`action_<name>` for your own AI-exposed Action; `os migrate meta`).
This supersedes #3894's "remains a silent no-op rather than a parse
error" — loud is correct, and is what the ratchet requires.
- A D2 conversion `agent-tools-to-skills` + its D3 chain step, so the
removal reaches spec-changes.json, the upgrade guide and the
`spec_changes` MCP tool. Unlike the protocol-17 renames beside it this
has NO lossless target: each entry must become a reference inside a
skill, which is a human decision. So it drops the dead key (the runtime
stopped reading it in cloud#910, so it already contributes nothing) and
emits one notice per agent marking where capability must be
re-declared.
- The three `ai/AITool:*` baseline lines are deleted deliberately — the
one case the ratchet sanctions in-PR. They were authorable only as the
element shape of `agent.tools`; with the parent tombstoned nothing
reaches them, so they cannot vanish silently: the parent speaks first,
with a prescription. Keeping a schema alive purely to hold three
unreachable lines would be the dead contract surface this issue is
about.
Agent tests now pin the rejection and its message rather than the strip
semantics they asserted before.
Verified: spec build OK, spec 6823 tests, lint 540, cli 761, full
workspace build, doc-authoring guard, check:docs, check:api-surface,
check:skill-refs, check:skill-examples (197), eslint — all green.
Claude-Session: https://claude.ai/code/session_01BHjroNkLkajskKbJaidko4
Co-authored-by: Claude <noreply@anthropic.com>
|**skills**|`string[]`| optional | Skill names to attach (Agent→Skill→Tool architecture) |
69
+
|**tools**|`any`| optional |[REMOVED]`agent.tools` was removed in @objectstack/spec 17 (#3894) — use `skills`. An agent reaches exactly the tools its surface-compatible skills declare (ADR-0064), so move each reference into a skill: a platform tool by its registered name, or `action_<name>` for one of your own AI-exposed Actions. Run `os migrate meta --from 16` to rewrite it automatically. |
0 commit comments