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
16 changes: 16 additions & 0 deletions .changeset/37967-retired-agent-keys-unknown-key-prose.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
'@objectstack/skills': patch
'@objectstack/spec': patch
---

docs: the retired agent keys are refused as unknown keys, not tombstones

Clause-②: no
Metadata-protocol: none

`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:

- **`@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.
- **`@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.

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.
4 changes: 2 additions & 2 deletions content/docs/ai/agents.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,8 @@ own `ask` / `build` records use exactly these fields):
| `instructions` | System prompt / prime directives |
| `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 |
| `skills` | Skill names to attach (the primary Agent → Skill → Tool capability model) |
| `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) |
| `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 |
| `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) |
| `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 |

There is no `type` field and no fixed agent "type" taxonomy — behaviour comes from
persona, instructions, skills, and tools. There are no `triggers` / `schedule`
Expand Down
6 changes: 4 additions & 2 deletions packages/spec/src/ai/agent.zod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,10 @@ export const AIModelConfigSchema = lazySchema(() => acceptRetiredDefaultResidue(

/*
* REMOVED — `AIKnowledgeSchema` / `AIKnowledge` (#3896 audit close-out). It
* typed `agent.knowledge`, tombstoned below: the RAG path never read the
* agent record, so the whole block was a grounding claim nothing enforced.
* typed `agent.knowledge`, which no key below declares any more: the RAG
* path never read the agent record, so the whole block was a grounding claim
* nothing enforced. The key's tombstone aged out at protocol 18, so the
* strict `AgentSchema` refuses it as an unknown key naming the upgrade guide.
* The protocol-17 `agent-knowledge-topics-to-sources` conversion remains in
* the chain (it rewrites historical SOURCES and imports nothing from here).
*/
Expand Down
2 changes: 1 addition & 1 deletion skills/objectstack-ai/evals/skills-tools-knowledge.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
{
"id": 5,
"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.",
"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.",
"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.",
"files": [],
"assertions": {
"must_contain": ["defineSkill", "skills", "surface", "aiExposed"],
Expand Down
Loading