Commit 29bef09
docs(client): the README's AI example shows the surface that exists (#16212)
* docs(client): the README's AI example shows the surface that exists
`client.ai.nlq` / `.suggest` / `.insights` were removed in v17 (#3718), and
no server in any repo ever mounted `/api/v1/ai/{nlq,suggest,insights}` — every
call 404ed for the whole life of the namespace. The `@objectstack/client`
README's namespace tour still showed all three, and `files` ships `README.md`
inside the tarball, so that example is the package's npm front page: a
TypeScript reader copying it gets TS2339 and a JavaScript reader a runtime
`TypeError`.
Replaced with the live `ai` surface — `chat` (reading `answer.content` /
`answer.usage`), `complete`, `models`, `conversations.list`, `agents.chat`,
`pendingActions.list` — each call type-checked against this package's own
published `dist/index.d.ts`, with the removed three kept as a control that
still fails with TS2339 there. The comment also names the condition a reader
would otherwise hit unexplained: `/ai` is served by `service-ai` (Cloud/EE),
and an environment without it answers 501, not 404, carrying the remedy
discovery reports under `services.ai`.
The docs site's Client SDK page already carried this correction; it is
untouched here.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D47qPfEWVPmhguWgBZCi5N
* docs(client): drop the ADR-0028 citation from the models example
ADR-0028 in this repository is Metadata Naming & Namespace Isolation
(Deferred) — it says nothing about a model allowlist or plan tiers, and no
ADR in docs/adr/ covers one. The citation was inherited verbatim from the
docblock chain rather than checked, which is the same failure this card
exists to correct.
"plan-filtered" went with it: `AiModelsResponseSchema` declares `models` as
a union of bare id strings and `{ id, label, default }` objects, and states
that both shapes are live — objects when the service exposes the allowlist,
bare ids when it falls back to the adapter's `listModels()`. Both are pinned
accepted in `protocol.test.ts`. The comment now says only what the schema
asserts unconditionally.
Comment text only; no code, no other line, no changeset change.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D47qPfEWVPmhguWgBZCi5N
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 8647c87 commit 29bef09
2 files changed
Lines changed: 21 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
259 | 259 | | |
260 | 260 | | |
261 | 261 | | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
266 | 272 | | |
267 | 273 | | |
268 | 274 | | |
| |||
0 commit comments