File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ " @objectstack/spec " : patch
3+ " @objectstack/client " : patch
4+ ---
5+
6+ Stop documenting bare ` POST /api/v1/ai/chat ` as agent-resolved (#10510 ). Two
7+ shipped docblocks described a resolution step the route does not perform:
8+ ` client.ai.agents ` claimed ` /ai/chat ` "talks to the environment's default
9+ agent", and ` App.defaultAgent ` claimed that endpoint auto-resolves the app's
10+ agent from ` context.appName ` . The bare route loads no agent and never reads
11+ ` context.appName ` ; the default-agent chain (explicit > ` defaultAgent ` of the
12+ named app > first active) is driven by the assistant chat endpoint,
13+ ` POST /api/v1/ai/assistant/chat ` , and ` client.ai.agents.chat() ` is the only SDK
14+ method that reaches an agent at all.
15+
16+ Both sites read as a security-relevant scoping guarantee — an agent-resolved
17+ endpoint would have its tool offer scoped by that agent's skills (ADR-0063
18+ §1/§5) — so a reader auditing "which endpoints are surface-scoped?" from these
19+ declarations got the wrong answer at both. Documentation text only: no schema
20+ key, no parse behaviour and no runtime path changes.
Original file line number Diff line number Diff line change @@ -4240,10 +4240,13 @@ export class ObjectStackClient {
42404240 /**
42414241 * Named agents.
42424242 *
4243- * `/ai/chat` talks to the environment's default agent; these talk to one
4244- * you name. Both routes have been mounted since long before this namespace
4245- * existed — `objectui` hand-built their URLs in five places because the SDK
4246- * offered nothing to call (#3718).
4243+ * These are the only SDK methods that reach an agent. `POST /ai/chat`
4244+ * (`ai.chat` / `ai.chatStream`) is a raw chat plane that resolves no agent
4245+ * at all — it loads none, so nothing about that call is scoped by an
4246+ * agent's skills. Read it as agent-less, never as "the environment's
4247+ * default agent". Both routes have been mounted since long before this
4248+ * namespace existed — `objectui` hand-built their URLs in five places
4249+ * because the SDK offered nothing to call (#3718).
42474250 */
42484251 agents : {
42494252 /**
Original file line number Diff line number Diff line change @@ -1500,9 +1500,15 @@ export const AppSchema = lazySchema(() => strictObject(
15001500 /**
15011501 * Default agent for this app's ambient chat surface.
15021502 *
1503- * When set, the ambient chat endpoint (`POST /api/v1/ai/chat` with
1504- * `context.appName`) auto-resolves to this agent without the user
1505- * having to pick from a list.
1503+ * When set, the assistant chat endpoint (`POST /api/v1/ai/assistant/chat`)
1504+ * resolves this agent for a call carrying `context.appName`, without the
1505+ * user having to pick from a list — that route is what drives the
1506+ * resolution chain (explicit agent > `defaultAgent` of the named app >
1507+ * first active agent).
1508+ *
1509+ * The bare `POST /api/v1/ai/chat` route is NOT part of that chain: it
1510+ * resolves no agent and never reads `context.appName`, so this key does not
1511+ * scope it. Do not read this key as a guarantee over that endpoint.
15061512 *
15071513 * ADR-0063 §1/§2 — this is a SURFACE-BINDING knob, not a custom-agent
15081514 * slot: the resolvable values are the two platform agents (`ask` for a
You can’t perform that action at this time.
0 commit comments