Skip to content

Commit c97a044

Browse files
committed
fix(cli): declare the os environments session widening and correct the active-environment header
The five subcommands now accept the cloud.json session they used to refuse, so the changeset declares Clause-② yes (widening) at minor. The active-environment.ts header no longer says os environments authenticates only as the runtime identity. Claude-Session: https://claude.ai/code/session_01VvcEokUG1tvVxkceYfR5XB Co-authored-by: Claude <noreply@anthropic.com>
1 parent 97c52b5 commit c97a044

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

‎.changeset/21360-environments-cloud-session.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
2-
'@objectstack/cli': patch
2+
'@objectstack/cli': minor
33
---
44

55
`os environments list | show | create | bind | switch` run on the `os cloud login` session
66

7-
Clause-②: no
7+
Clause-②: yes (widening)
88

99
The documented hosted flow is `os cloud login`, then `os environments create`. The five
1010
`os environments` subcommands read only `~/.objectstack/credentials.json` (the `os login`

‎packages/cli/src/utils/active-environment.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@
2626
*
2727
* ## Two stores, two active environments
2828
*
29-
* `os environments switch` keeps writing `credentials.json` (that is the copy
30-
* `createApiClient` reads for the `data` / `meta` / `environments` families,
31-
* and `os environments` authenticating as the runtime identity is deliberate).
32-
* When the control plane it just talked to IS `cloud.json`'s server, it records
29+
* `os environments switch` keeps writing `credentials.json` when it ran on that
30+
* file's session (it is the copy `createApiClient` reads for the `data` / `meta`
31+
* families, and `os environments` runs on either stored session, chosen once in
32+
* `createControlPlaneApiClient`). When the control plane it just talked to IS `cloud.json`'s server, it records
3333
* the same id there too — and that is the copy the publish reads back.
3434
*
3535
* ## Two writers, ONE gate

0 commit comments

Comments
 (0)