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): fold agent knowledge.topics into sources; mark unenforced AI config experimental (#1891, #1893)
Liveness-audit closeouts (umbrella #1878):
- AIKnowledgeSchema folds the deprecated `topics` alias into canonical
`sources` at parse time (canonical wins; alias dropped from output,
mirroring the visibleWhen normalization). Authoring `topics` was a
silent no-op — the renderer reads `sources`. JSDoc example updated;
fold covered by new tests.
- Author-facing `[EXPERIMENTAL — not enforced]` markers on parsed-but-
unconsumed AI config, matching the liveness ledger (ADR-0078): agent
memory/guardrails/structuredOutput/lifecycle, tool outputSchema.
- Reference docs (agent.mdx / tool.mdx) regenerated.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CMaDBhnZEUu1fcw8Rvo6Yq
Copy file name to clipboardExpand all lines: content/docs/references/ai/agent.mdx
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ const result = AIKnowledge.parse(data);
30
30
| Property | Type | Required | Description |
31
31
| :--- | :--- | :--- | :--- |
32
32
|**sources**|`string[]`| optional | Knowledge sources/tags to recruit RAG context from. Canonical key consumed by the agent renderer (objectui AgentPreview KnowledgeSummary). |
33
-
|**topics**|`string[]`| optional | Deprecated alias for `sources` (spec key ≠ consumed key drift, liveness audit #1878/#1891). Prefer `sources`; `topics` is retained for back-compat but the renderer reads`sources`. |
33
+
|**topics**|`string[]`| optional | Deprecated alias for `sources` (spec key ≠ consumed key drift, liveness audit #1878/#1891). Folded into `sources` at parse time; prefer`sources`. |
34
34
|**indexes**|`string[]`| ✅ | Vector Store Indexes |
35
35
36
36
@@ -75,19 +75,19 @@ const result = AIKnowledge.parse(data);
75
75
|**avatar**|`string`| optional ||
76
76
|**role**|`string`| ✅ | The persona/role (e.g. "Senior Support Engineer") |
77
77
|**instructions**|`string`| ✅ | System Prompt / Prime Directives |
|**memory**|`{ longTerm?: object; reflectionInterval?: integer }`| optional |[EXPERIMENTAL — not enforced]Agent memory management. Parsed but no runtime consumer yet (liveness #1878/#1893).|
89
+
|**guardrails**|`{ maxTokensPerInvocation?: integer; maxExecutionTimeSec?: integer; blockedTopics?: string[] }`| optional |[EXPERIMENTAL — not enforced]Safety guardrails for the agent. Parsed but not enforced — real limits come from the quota service (liveness #1878/#1893).|
90
+
|**structuredOutput**|`{ format: Enum<'json_object' \| 'json_schema' \| 'regex' \| 'grammar' \| 'xml'>; schema?: Record<string, any>; strict?: boolean; retryOnValidationFailure?: boolean; … }`| optional |[EXPERIMENTAL — not enforced]Structured output format and validation configuration. Parsed but no runtime consumer yet (liveness #1878/#1893).|
|**parameters**|`Record<string, any>`| ✅ | JSON Schema for tool parameters |
41
-
|**outputSchema**|`Record<string, any>`| optional | JSON Schema for tool output |
41
+
|**outputSchema**|`Record<string, any>`| optional |[EXPERIMENTAL — not enforced]JSON Schema for tool output. Keys are folded into the tool description only; outputs are not validated (liveness #1878/#1893).|
42
42
|**objectName**|`string`| optional | Target object name (snake_case) |
43
43
|**requiresConfirmation**|`boolean`| ✅ | Require user confirmation before execution |
sources: z.array(z.string()).optional().describe('Knowledge sources/tags to recruit RAG context from. Canonical key consumed by the agent renderer (objectui AgentPreview KnowledgeSummary).'),
36
-
topics: z.array(z.string()).optional().describe('Deprecated alias for `sources` (spec key ≠ consumed key drift, liveness audit #1878/#1891). Prefer `sources`; `topics` is retained for back-compat but the renderer reads `sources`.'),
36
+
topics: z.array(z.string()).optional().describe('Deprecated alias for `sources` (spec key ≠ consumed key drift, liveness audit #1878/#1891). Folded into `sources` at parse time; prefer `sources`.'),
37
37
indexes: z.array(z.string()).describe('Vector Store Indexes'),
38
+
}).transform((input)=>{
39
+
// #1891: fold the deprecated `topics` alias into the canonical `sources` and
40
+
// drop it from the output (mirrors `normalizeVisibleWhen`, ADR-0089 D2) so
41
+
// authoring `topics` is no longer a silent no-op — the renderer reads
42
+
// `sources`. The canonical key wins when both are present.
43
+
const{ topics, ...rest}=input;
44
+
if(rest.sources===undefined&&topics!==undefined){
45
+
return{ ...rest,sources: topics};
46
+
}
47
+
returnrest;
38
48
}));
39
49
40
50
/**
@@ -110,7 +120,7 @@ export type StructuredOutputConfig = z.infer<typeof StructuredOutputConfigSchema
110
120
* role: 'Help Desk Assistant',
111
121
* instructions: 'You are a helpful assistant. Always verify user identity first.',
instructions: z.string().describe('System Prompt / Prime Directives'),
140
150
model: AIModelConfigSchema.optional(),
141
-
lifecycle: StateMachineSchema.optional().describe('State machine defining the agent conversation follow and constraints'),
151
+
lifecycle: StateMachineSchema.optional().describe('[EXPERIMENTAL — not enforced] State machine defining the agent conversation flow and constraints. Parsed but no runtime consumer yet (liveness #1878/#1893).'),
142
152
143
153
/**
144
154
* ADR-0063 §1 / ADR-0064 — the product surface this agent IS. The kernel
blockedTopics: z.array(z.string()).optional().describe('Forbidden topics or action names'),
228
-
}).optional().describe('Safety guardrails for the agent'),
238
+
}).optional().describe('[EXPERIMENTAL — not enforced] Safety guardrails for the agent. Parsed but not enforced — real limits come from the quota service (liveness #1878/#1893).'),
229
239
230
240
/** Structured Output */
231
-
structuredOutput: StructuredOutputConfigSchema.optional().describe('Structured output format and validation configuration'),
241
+
structuredOutput: StructuredOutputConfigSchema.optional().describe('[EXPERIMENTAL — not enforced] Structured output format and validation configuration. Parsed but no runtime consumer yet (liveness #1878/#1893).'),
* Used for structured output validation and downstream tool chaining.
85
+
*
86
+
* ⚠️ EXPERIMENTAL — NOT ENFORCED (liveness #1878/#1893). The runtime folds
87
+
* the top-level keys into the tool description shown to the LLM
88
+
* (service-ai action-tools) but performs NO output validation against this
89
+
* schema, and downstream tool chaining does not consume it either.
86
90
*/
87
-
outputSchema: z.record(z.string(),z.unknown()).optional().describe('JSON Schema for tool output'),
91
+
outputSchema: z.record(z.string(),z.unknown()).optional().describe('[EXPERIMENTAL — not enforced] JSON Schema for tool output. Keys are folded into the tool description only; outputs are not validated (liveness #1878/#1893).'),
88
92
89
93
/**
90
94
* Associated object name (when the tool operates on a specific data object).
0 commit comments