Skip to content

Commit 1c2e51f

Browse files
committed
docs: retired agent keys are refused as unknown keys, not tombstones
Eval case 5's expected_output, the tools and knowledge rows of the ai/agents page and the AIKnowledgeSchema comment in agent.zod.ts now say what protocol 18 does: the strict AgentSchema refuses each key as an unknown key naming the upgrade guide. Claude-Session: https://claude.ai/code/session_016WV4cxBECSPtHxQMZDHSie Co-authored-by: Claude <noreply@anthropic.com>
1 parent dc45b1e commit 1c2e51f

4 files changed

Lines changed: 23 additions & 5 deletions

File tree

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@objectstack/skills': patch
3+
'@objectstack/spec': patch
4+
---
5+
6+
docs: the retired agent keys are refused as unknown keys, not tombstones
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
`agent.tools` and `agent.knowledge` were removed in protocol 17, and their tombstones left the shape at protocol 18. Since then the strict `AgentSchema` refuses each as an unknown key, and the refusal names https://objectstack.ai/docs/protocol-upgrade. Three texts still described the older behaviour and now say what happens today:
12+
13+
- **`@objectstack/skills`.** In the `objectstack-ai` skill's `skills-tools-knowledge` evals, case 5's `expected_output` no longer calls the two keys protocol-17 tombstones. The case's prompt and assertions are unchanged.
14+
- **`@objectstack/spec`.** The comment in `src/ai/agent.zod.ts` on the removed `AIKnowledgeSchema` no longer says `agent.knowledge` is tombstoned below it. No schema, type or export changes.
15+
16+
The `ai/agents` docs page says the same in its `tools` and `knowledge` rows: the key is not on the type, so there is no `never` member for `tsc` to refuse by name. Nothing to migrate.

‎content/docs/ai/agents.mdx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,8 +308,8 @@ own `ask` / `build` records use exactly these fields):
308308
| `instructions` | System prompt / prime directives |
309309
| `model` | Model config: `model` (the model name, optional — absent means the deployment's default model), `temperature`, `maxTokens`, `topP`. There is no `provider`: it was **removed in protocol 19 (#37712)** because no runtime read it — the deployment's AI settings choose the provider, and resolve the model name among the providers they turn on |
310310
| `skills` | Skill names to attach (the primary Agent → Skill → Tool capability model) |
311-
| `tools` | **Removed in protocol 17 (#3894)** — typed `never`, so writing it fails `tsc`, and a value that reaches the runtime is rejected at parse. This is **not** a rename: there is no key the value moves to. Declare each tool on a **skill** instead — a platform tool by its registered name, or `action_<name>` for one of your own AI-exposed Actions — and attach that skill through `skills` (ADR-0064) |
312-
| `knowledge` | **Removed in protocol 17 (#3896)** — typed `never`, so writing it fails `tsc`, and a value that reaches the runtime is rejected at parse. Declaring `sources` / `indexes` here never scoped retrieval: `search_knowledge` takes `sourceIds` from the LLM's own tool-call arguments, not from the agent record, so an author who “scoped” access here scoped nothing. This is **not** a rename: there is no key the value moves to — delete the block. Restrict retrieval at the knowledge-service / source level (per-source permissions), and describe intended grounding in `instructions` so the model asks for the right sources |
311+
| `tools` | **Removed in protocol 17 (#3894)** — the key is not on the type, and the strict schema refuses it as an unknown key, naming the [upgrade guide](https://objectstack.ai/docs/protocol-upgrade). This is **not** a rename: there is no key the value moves to. Declare each tool on a **skill** instead — a platform tool by its registered name, or `action_<name>` for one of your own AI-exposed Actions — and attach that skill through `skills` (ADR-0064) |
312+
| `knowledge` | **Removed in protocol 17 (#3896)** — the key is not on the type, and the strict schema refuses it as an unknown key, naming the [upgrade guide](https://objectstack.ai/docs/protocol-upgrade). Declaring `sources` / `indexes` here never scoped retrieval: `search_knowledge` takes `sourceIds` from the LLM's own tool-call arguments, not from the agent record, so an author who “scoped” access here scoped nothing. This is **not** a rename: there is no key the value moves to — delete the block. Restrict retrieval at the knowledge-service / source level (per-source permissions), and describe intended grounding in `instructions` so the model asks for the right sources |
313313

314314
There is no `type` field and no fixed agent "type" taxonomy — behaviour comes from
315315
persona, instructions, skills, and tools. There are no `triggers` / `schedule`

‎packages/spec/src/ai/agent.zod.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,10 @@ export const AIModelConfigSchema = lazySchema(() => acceptRetiredDefaultResidue(
9797

9898
/*
9999
* REMOVED — `AIKnowledgeSchema` / `AIKnowledge` (#3896 audit close-out). It
100-
* typed `agent.knowledge`, tombstoned below: the RAG path never read the
101-
* agent record, so the whole block was a grounding claim nothing enforced.
100+
* typed `agent.knowledge`, which no key below declares any more: the RAG
101+
* path never read the agent record, so the whole block was a grounding claim
102+
* nothing enforced. The key's tombstone aged out at protocol 18, so the
103+
* strict `AgentSchema` refuses it as an unknown key naming the upgrade guide.
102104
* The protocol-17 `agent-knowledge-topics-to-sources` conversion remains in
103105
* the chain (it rewrites historical SOURCES and imports nothing from here).
104106
*/

‎skills/objectstack-ai/evals/skills-tools-knowledge.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
{
4545
"id": 5,
4646
"prompt": "Create `src/ai/support-bot.agent.ts` with defineAgent({ name: 'crm_support_bot', tools: ['query_records', 'action_crm_close_case'], knowledge: ['support_kb'] }) and register it under agents. None of the project's files are in this directory: answer from what is stated here.",
47-
"expected_output": "Refuses the agent: the `agent` type is closed to third parties (a stack-authored agent is filtered out, refused by `loadAgent()` and 404s on chat), and `agent.tools` / `agent.knowledge` are protocol-17 tombstones. Re-declares the two tools in a `defineSkill` (registered under `skills`) with a `surface`, and restricts retrieval at the knowledge-source level (`aiExposed`, `where`) rather than on an agent. The in-app `ask` assistant picks the skill up by surface (`ask` or `both`) for the app the user is in, and a tool the skill names outside the allow-set is dropped with a diagnostic.",
47+
"expected_output": "Refuses the agent: the `agent` type is closed to third parties (a stack-authored agent is filtered out, refused by `loadAgent()` and 404s on chat), and `agent.tools` / `agent.knowledge` were removed in protocol 17: the strict schema refuses each as an unknown key, naming https://objectstack.ai/docs/protocol-upgrade. Re-declares the two tools in a `defineSkill` (registered under `skills`) with a `surface`, and restricts retrieval at the knowledge-source level (`aiExposed`, `where`) rather than on an agent. The in-app `ask` assistant picks the skill up by surface (`ask` or `both`) for the app the user is in, and a tool the skill names outside the allow-set is dropped with a diagnostic.",
4848
"files": [],
4949
"assertions": {
5050
"must_contain": ["defineSkill", "skills", "surface", "aiExposed"],

0 commit comments

Comments
 (0)