Skip to content

docs: packages/client/README.md still documents client.ai.nlq / .suggest / .insights, removed in v17 — and that README ships inside the package #16142

Description

@baozhoutao

Recording only — not claimed, no assignee. Found while working #14546 (payload reads in the same README code block); out of scope there and deliberately left untouched by that PR.

Where

packages/client/README.md lines 262-264 on origin/main @ 1f2a02ba0, inside the namespace tour:

// AI Services
await client.ai.nlq({ query: 'Show me all active contacts' });
await client.ai.suggest({ object: 'contact', field: 'industry' });
await client.ai.insights({ object: 'sales', recordId: dealId });

Why it is wrong

None of the three methods exists on the client. packages/client/src/index.ts — the live ai namespace holds chat, chatStream, complete, models, conversations, agents, pendingActions; the only trace of the old three is the namespace docblock recording their removal: "Until v17 client.ai held nlq, suggest and insights, building /api/v1/ai/{nlq,suggest,insights}. No repo has ever mounted those paths; every call 404ed from the first release that shipped them."

The docs site already carries the correction — content/docs/api/client-sdk.mdx states the same history in its client.ai block — so this is the package README alone, left behind by #3718's removal.

Why it is worth a card rather than a note

packages/client/package.json declares files: ["dist", "README.md", "CHANGELOG.md"], so this text is the front page of @objectstack/client on npm. A reader copying it gets TS2339 on a released package's own README, and a JavaScript reader gets a runtime TypeError. The three lines are also the only occurrence in the file, so the fix is a deletion or a replacement with the surface that exists.

Executable criterion

grep -n "ai\.nlq\|ai\.suggest\|ai\.insights" packages/client/README.md returns the three lines; the same grep over packages/client/src/ returns only the historical docblock naming them as removed.

Not in scope for #14546

That card is one payload read per example for the analytics and automation calls; this is a different defect class (documented methods that no longer exist). #14546 remains open on its own terms and this is not addressed by its PR.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions