@tinkerlandai/longplay-cli 0.3.18 → 0.3.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.20 — 2026-11-13
4
+
5
+ - `longplay login` opens a browser page where you select several Apps, their Sandbox or Live environments and an access level, then approve the exact permissions. One login can cover several Apps; switch between them with `longplay context use`.
6
+ - `longplay login --replace` logs the profile out and starts from its previous selection, so adding an App means selecting one more row.
7
+ - The login result names each approved environment and gives the `longplay context use` command that selects it. The local context moves to an approved environment when the current one was not approved.
8
+ - The selection page refuses a browser signed in to a different account from the one confirmed at sign-in and offers to switch.
9
+ - Logins with `--permissions`, `--scope` or `--scopes-file` are unchanged.
10
+
11
+ ## 0.3.19 — 2026-11-06
12
+
13
+ - Publish through GitHub Actions Trusted Publishing, with the registry publisher identity verified before completing the release.
14
+
3
15
  ## 0.3.18 — 2026-11-06
4
16
 
5
17
  - Update from `cdn.longplayai.com`. Installed CLIs on the website channel keep working after the public site and Console moved to their own hosts.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Longplay CLI
2
2
 
3
- Longplay CLI **0.3.18**, Node.js 22+. The executable is `longplay`. CLI versions are independent of the Customer SDKs.
3
+ Longplay CLI **0.3.20**, Node.js 22+. The executable is `longplay`. CLI versions are independent of the Customer SDKs.
4
4
 
5
5
  Install the public npm package:
6
6
 
@@ -11,7 +11,7 @@ longplay doctor --server https://console.longplayai.com --json
11
11
  longplay login --server https://console.longplayai.com
12
12
  ```
13
13
 
14
- For a reproducible installation, use `npm install -g @tinkerlandai/longplay-cli@0.3.18`. Uninstall with `npm uninstall -g @tinkerlandai/longplay-cli`. Node.js 22+ must be on PATH; the package includes the `longplay` command and npm installs its runtime dependencies.
14
+ For a reproducible installation, use `npm install -g @tinkerlandai/longplay-cli@0.3.20`. Uninstall with `npm uninstall -g @tinkerlandai/longplay-cli`. Node.js 22+ must be on PATH; the package includes the `longplay` command and npm installs its runtime dependencies.
15
15
 
16
16
  The existing website installation channel remains available on macOS and Linux:
17
17
 
@@ -204,9 +204,11 @@ longplay projects list --profile work --json
204
204
  longplay logout --profile work
205
205
  ```
206
206
 
207
- Replace the host and UUIDs with the explicitly configured deployment and your authorized scope. `doctor` reads public metadata only, sends no credentials and refuses redirects. New login requires an available OAuth client, browser Code+PKCE approval and a selected Org/App/environment. The exact loopback callback remains `http://127.0.0.1:43187/callback`; port conflicts fail explicitly.
207
+ Replace the host and UUIDs with the explicitly configured deployment and your authorized scope. `doctor` reads public metadata only, sends no credentials and refuses redirects. New login requires an available OAuth client and browser Code+PKCE approval; a login with explicit `--permissions` also requires a selected Org/App/environment. The exact loopback callback remains `http://127.0.0.1:43187/callback`; port conflicts fail explicitly.
208
208
 
209
- For resource commands, request only the necessary supported permissions with `login --permissions project.read,rewards.read`. Invalid, empty or duplicate permission entries are rejected before OAuth starts. Approval uses an immutable ordered scope list and does not widen the member's App allowlist or original role grants.
209
+ `longplay login` opens a browser page where you select the Apps, Sandbox/Live environments and access level this device may use, then approve the exact permissions it lists. Several Apps can be approved in one login. The login result lists each approved environment with the `longplay context use` command that selects it; saving a context needs a project config (`longplay config init --server <origin>`) or a profile. To add or remove an App later, run `longplay login --replace`: it logs this profile out and starts from its previous selection.
210
+
211
+ For scripts and narrowly scoped devices, request only the necessary supported permissions with `login --permissions project.read,rewards.read`. Invalid, empty or duplicate permission entries are rejected before OAuth starts. Approval uses an immutable ordered scope list and does not widen the member's App allowlist or original role grants.
210
212
 
211
213
  Scope priority is explicit flags → `longplay.config.json` → selected profile. Local selection remains `verified: false`. Profiles and credential storage bind to the exact management origin. Config files reject secrets and unknown fields; initialization never overwrites an existing file.
212
214
 
@@ -103,6 +103,7 @@ var localErrorRecovery = {
103
103
  HTTP_ERROR: "recover_operation",
104
104
  INVALID_RESPONSE: "recover_operation",
105
105
  NOT_IDENTIFIED: "authenticate",
106
+ CUSTOMER_SESSION_REQUIRED: "authenticate",
106
107
  INVALID_TOKEN: "authenticate",
107
108
  INVALID_URL: "fix_request",
108
109
  INVALID_TIMEOUT: "fix_request",
@@ -113,12 +114,17 @@ var localErrorRecovery = {
113
114
  EVENT_QUEUE_FULL: "retry_same_request",
114
115
  // The original command or decision still owns the outcome.
115
116
  COMMAND_PENDING: "recover_operation",
117
+ PURCHASE_PENDING: "recover_operation",
116
118
  DECISION_PENDING: "recover_operation",
117
119
  DECISION_ACCEPTANCE_UNKNOWN: "recover_operation",
118
120
  RUN_RECONCILIATION_REQUIRED: "recover_operation",
119
121
  DECISION_FAILED: "contact_support",
120
122
  COMMAND_STORAGE_CONFLICT: "resolve_conflict",
121
123
  COMMAND_STORAGE_INVALID: "fix_request",
124
+ PURCHASE_STORAGE_CONFLICT: "resolve_conflict",
125
+ // Missing purchase evidence cannot prove that the original attempt did not execute.
126
+ PURCHASE_STORAGE_INVALID: "recover_operation",
127
+ EXECUTION_POLICY_REFUSED: "fix_request",
122
128
  CONFIGURATION_UNAVAILABLE: "check_availability",
123
129
  CONFIGURATION_EXPIRED: "reload_state",
124
130
  CONFIGURATION_CHANGED: "reload_state",
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  readJsonFile,
3
3
  readJsonStream
4
- } from "./chunk-IS7R5ZK7.js";
4
+ } from "./chunk-JU4QHZXR.js";
5
5
  export {
6
6
  readJsonFile,
7
7
  readJsonStream