You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(client): declare the three response keys environments.create() really receives (#12883)
`client.environments.create()` declared its unwrap shape as the single key
`environment`, while `POST /api/v1/cloud/environments` answers 201 with
`warnings`, `durationMs` and a conditional `hostnameAssignment` as well.
`warnings` is the partial-degradation channel, so no SDK caller could learn
what a provision failed to do without an `as any`.
Per the 2026-08-29 maintainer ruling (verbatim 「同意」, option 甲) the three
keys are declared as the INLINE WIRE SHAPE and are NOT bound to
`@objectstack/spec/cloud`'s `ProvisionEnvironmentResponseSchema`, honouring
the namespace docblock's recorded snake_case constraint.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TvqBFLRzXdSPcbusDoED9k
feat(client): `environments.create()` declares the three response keys the control plane really sends — `warnings`, `durationMs`, and a conditional `hostnameAssignment` (#12883)
6
+
7
+
`client.environments.create()` declared its unwrap shape as the single key
8
+
`environment`, while `POST /api/v1/cloud/environments` answers `201` with three
9
+
more. `warnings` in particular is the channel a partially-degraded provision
10
+
uses to report what it could not do, and no SDK caller could reach it without
11
+
an `as any`.
12
+
13
+
This is **additive**: `environment` keeps its shape and every existing call site
14
+
keeps compiling. What changes is that three previously-erased keys are now
15
+
declared and reachable.
16
+
17
+
```ts
18
+
const res =awaitclient.environments.create({ organization_id, display_name });
19
+
20
+
res.warnings; // string[] — partial-degradation channel, no cast needed
21
+
res.durationMs; // number
22
+
res.hostnameAssignment; // optional — present ONLY when the control plane
23
+
// renamed a colliding hostname; absence stays absence
24
+
```
25
+
26
+
Per the 2026-08-29 maintainer ruling (verbatim 「同意」, option 甲) the three keys
27
+
are typed as the **inline wire shape** and are deliberately **not** bound to
28
+
`@objectstack/spec/cloud`'s `ProvisionEnvironmentResponseSchema`: those are
29
+
camelCase row contracts, and the `/api/v1/cloud/*` control plane this namespace
30
+
calls speaks snake_case — the constraint already recorded on the namespace
31
+
docblock. Binding them would typecheck and be false.
32
+
33
+
The request side of the same method is untouched and remains a separate card.
0 commit comments