Found while implementing #12866 (ADR-0006 D2, SDK half). Filed unassigned. Related: #12865 (the D2 epic — this is NOT in its declared scope, which is the projects METHOD namespace, its unwrap keys and its JSDoc).
What is left
#12866 renames client.projects.* to client.environments.* and moves the project/projects response keys. It deliberately does not touch the SECOND project surface on the same class — the environment-scoped sub-client — because that is a different shape (a factory method plus an exported class) and a different decision. After #12866 lands, packages/client/src/index.ts still carries:
| site | what it says today |
|---|
ObjectStackClient.project(environmentId) | the scoped-client factory; its own parameter is already called environmentId |
export class ScopedProjectClient | published class name |
| its docblock: "Project-scoped sub-client … a single client instance can talk to multiple projects" | the entity noun |
the environmentId client-option docblock: "Active project id (UUID of sys_environment)" | the entity noun, on an option already named environmentId |
projectResolution (named in that same docblock, pointing at packages/rest/src/rest-server.ts) | needs its own check — this card does not assert it is still the live spelling |
AGENTS.md's standing line is "Project now only means the npm/monorepo sense", and ADR-0006's v5.0 rename is aliasless, so every row above is a rename the ADR already decided; what it does not have is a card.
A measurable half that is cheap and independent
packages/client/src/client.test.ts lines 1989 and 1999 are two ScopedProjectClient test TITLES that read
it('prefixes meta.getTypes with /projects/:id', …)
it('prefixes data.find with /projects/:id', …)
while the assertions immediately below them pin http://localhost:3000/api/v1/environments/proj-123/…. The titles describe a URL the code has not built since the v5.0 path rename; the tests pass, so nothing says so. That half is a two-line fix with no API consequence and could be split out.
Scope note
Renaming the exported ScopedProjectClient class is a published-API break on @objectstack/client and should ride a coordinated window the same way #12866 does, not a drive-by. The docblock prose and the two test titles are not breaks and could land at any time.
Generated by Claude Code
Found while implementing #12866 (ADR-0006 D2, SDK half). Filed unassigned. Related: #12865 (the D2 epic — this is NOT in its declared scope, which is the
projectsMETHOD namespace, its unwrap keys and its JSDoc).What is left
#12866 renames
client.projects.*toclient.environments.*and moves theproject/projectsresponse keys. It deliberately does not touch the SECONDprojectsurface on the same class — the environment-scoped sub-client — because that is a different shape (a factory method plus an exported class) and a different decision. After #12866 lands,packages/client/src/index.tsstill carries:ObjectStackClient.project(environmentId)environmentIdexport class ScopedProjectClientenvironmentIdclient-option docblock: "Active project id (UUID ofsys_environment)"environmentIdprojectResolution(named in that same docblock, pointing atpackages/rest/src/rest-server.ts)AGENTS.md's standing line is "Project now only means the npm/monorepo sense", and ADR-0006's v5.0 rename is aliasless, so every row above is a rename the ADR already decided; what it does not have is a card.
A measurable half that is cheap and independent
packages/client/src/client.test.tslines 1989 and 1999 are twoScopedProjectClienttest TITLES that readwhile the assertions immediately below them pin
http://localhost:3000/api/v1/environments/proj-123/…. The titles describe a URL the code has not built since the v5.0 path rename; the tests pass, so nothing says so. That half is a two-line fix with no API consequence and could be split out.Scope note
Renaming the exported
ScopedProjectClientclass is a published-API break on@objectstack/clientand should ride a coordinated window the same way #12866 does, not a drive-by. The docblock prose and the two test titles are not breaks and could land at any time.Generated by Claude Code