Skip to content

Commit 65d7b74

Browse files
committed
Merge origin/main into claude/issue-21922-meta-read-declines-code-datasource-row
Claude-Session: https://claude.ai/code/session_017ErfyP2Rx7XWHJA27QjyUi Co-authored-by: Claude <noreply@anthropic.com>
2 parents 085c662 + 04e776b commit 65d7b74

16 files changed

Lines changed: 116 additions & 101 deletions
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
"@objectstack/spec": patch
3+
---
4+
5+
`App.defaultAgent` docblock: the agent route is the one chat door, and the console is what reads the key.
6+
7+
Clause-②: no
8+
9+
- The docblock no longer says the assistant chat endpoint (`POST /api/v1/ai/assistant/chat`) resolves this agent from `context.appName`. That route, with `GET /api/v1/ai/assistant` and `GET /api/v1/ai/assistant/skills`, was retired in the cloud AI runtime (objectstack-ai/cloud#2621, objectstack-ai/cloud#2651), and no server route reads `defaultAgent`.
10+
- It now says who does read it. The console's chat dock hands the active app's `defaultAgent` to its one surface-to-agent resolver, which honours only `ask` or `build` (legacy aliases included) and otherwise falls back to the surface default. The resolved agent is then called by name on `POST /api/v1/ai/agents/:agentName/chat`, where the path segment, not this key, selects the agent.
11+
- The ADR-0063 surface-binding paragraph and the rule that only the two platform agents resolve are unchanged, as is the note that the bare `POST /api/v1/ai/chat` resolves no agent.
12+
- The docs page `ai/actions-as-tools` lists the agent route as the only in-product chat route.
13+
- ⛔ No schema, parse, `.describe()`, export, type or accept-set change. The docblock ships in the published package, in the `dist/ui` and `dist/browser` JavaScript bundles and in the shipped `src/ui/app.zod.ts`, which is why this is a patch.

‎content/docs/ai/actions-as-tools.mdx‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -271,10 +271,9 @@ action into AI only when its logic is safe to run on behalf of anyone the
271271
capability gate admits.
272272

273273
<Callout type="info">
274-
**ObjectOS** — the in-product chat routes
275-
(`/api/v1/ai/assistant/chat`, `/api/v1/ai/agents/:agentName/chat`) resolve the
276-
authenticated principal from `req.user` — both cookie session
277-
(`better-auth.session_token`) and Bearer token are handled — and forward it to
274+
**ObjectOS** — the in-product chat route, `/api/v1/ai/agents/:agentName/chat`,
275+
resolves the authenticated principal from `req.user` — both cookie session
276+
(`better-auth.session_token`) and Bearer token are handled — and forwards it to
278277
`aiService.chatWithTools(...)` as
279278
`toolExecutionContext: { actor, conversationId, environmentId }`. That threads the
280279
same RLS context through the runtime's built-in data tools and its

‎packages/spec/src/api/plugin-rest-api.handler-status-retirement.test.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ const WELL_FORMED = {
7070

7171
const PRESCRIPTION = /`RestApiEndpoint\.handlerStatus`.*was removed.*17/s;
7272

73-
describe('[#13823] RestApiEndpoint.handlerStatus retirement', () => {
73+
describe('RestApiEndpoint.handlerStatus retirement', () => {
7474
// All three former values, INCLUDING the documented default: the old
7575
// docblock's `@default 'implemented'` was prose only — the key never carried
7676
// a Zod `.default()`, so no built artifact materialised it and there is no
@@ -156,7 +156,7 @@ describe('[#13823] RestApiEndpoint.handlerStatus retirement', () => {
156156
});
157157
});
158158

159-
describe('[#13823] api/HandlerStatus + api/RouteCoverage{Entry,Report} def retirement', () => {
159+
describe('api/HandlerStatus + api/RouteCoverage{Entry,Report} def retirement', () => {
160160
/** The 6 names the three retired defs exported (3 schema consts + 3 types). */
161161
const RETIRED_NAMES = [
162162
'HandlerStatusSchema',
@@ -176,7 +176,7 @@ describe('[#13823] api/HandlerStatus + api/RouteCoverage{Entry,Report} def retir
176176

177177
// ── ABSENCE (every entry, not just ./api) ─────────────────────────────
178178
for (const name of RETIRED_NAMES) {
179-
expect(holdersOf(name), `${name} must have zero holders after #13823`).toEqual([]);
179+
expect(holdersOf(name), `${name} must have zero holders after its retirement`).toEqual([]);
180180
}
181181

182182
// ── SURVIVAL ──────────────────────────────────────────────────────────
@@ -205,7 +205,7 @@ describe('[#13823] api/HandlerStatus + api/RouteCoverage{Entry,Report} def retir
205205
});
206206
});
207207

208-
describe('[#13823] ADR-0087 registration', () => {
208+
describe('handlerStatus retirement — ADR-0087 registration', () => {
209209
it('declares the tombstoned key and the three removed defs under major 18, with the D3 entry', () => {
210210
expect(RETIRED_KEYS_BY_MAJOR[18]).toContain('api/RestApiEndpoint:handlerStatus');
211211
for (const def of ['api/HandlerStatus', 'api/RouteCoverageEntry', 'api/RouteCoverageReport']) {

‎packages/spec/src/api/plugin-rest-api.schema-refs.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ function resolvesToZodSchema(name: string): boolean {
5353
return !!candidate && typeof (candidate as { safeParse?: unknown }).safeParse === 'function';
5454
}
5555

56-
describe('#3899 — catalog schema references resolve and sit on the right methods', () => {
56+
describe('catalog schema references resolve and sit on the right methods', () => {
5757
it('every requestSchema names a Zod schema exported from @objectstack/spec/api', () => {
5858
for (const ep of allEndpoints()) {
5959
if (!ep.requestSchema) continue;
@@ -87,7 +87,7 @@ describe('#3899 — catalog schema references resolve and sit on the right metho
8787
}
8888
});
8989

90-
it('at least the routes wired in #3899 still declare their request schemas', () => {
90+
it('at least the routes wired to the request-schema gate still declare their request schemas', () => {
9191
// Anti-erosion floor: the gate above is vacuous if declarations are simply
9292
// deleted. These five are validated at their mounted routes.
9393
const declared = new Map(

‎packages/spec/src/api/plugin-rest-api.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ describe('plugin-rest-api.zod', () => {
541541
expect(paths).not.toContain('/preferences');
542542
});
543543

544-
it('declares no AI routes — this table cannot vouch for a Cloud/EE surface (#3718)', () => {
544+
it('declares no AI routes — this table cannot vouch for a Cloud/EE surface', () => {
545545
// DEFAULT_AI_ROUTES used to sit here declaring `/nlq`, `/suggest` and
546546
// `/insights`, and this test asserted its shape — three endpoints no repo
547547
// has ever mounted, checked for `toHaveLength(3)`. Shape is not
@@ -691,7 +691,7 @@ describe('plugin-rest-api.zod', () => {
691691
// than a bare unrecognized-key error, and the value survives at the same
692692
// magnitude. Asserting the message, not just `.toThrow()`: a bare throw stays
693693
// green when the schema throws for some unrelated reason.
694-
describe('RestApiEndpoint / RestApiPluginConfig durations carry their unit (#15677)', () => {
694+
describe('RestApiEndpoint / RestApiPluginConfig durations carry their unit in the key name', () => {
695695
const endpoint = {
696696
method: 'GET' as const, path: '/api/v1/discovery',
697697
handler: 'getDiscovery', category: 'discovery' as const,

0 commit comments

Comments
 (0)