@tinkerlandai/indiana-cli 0.3.11 → 0.3.13
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 +7 -0
- package/README.md +60 -9
- package/dist/{chunk-A5HJK2OY.js → chunk-VEDX3X5S.js} +12 -4
- package/dist/{io-COF7BMWZ.js → io-KD7VVAPB.js} +1 -1
- package/dist/main.js +14121 -12539
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.13 — 2026-10-26
|
|
4
|
+
|
|
5
|
+
- Remove the `indiana iam` commands. IAM files are generated by the `@tinkerlandai/indiana-iam` build package; `indiana-iam validate` replaces `indiana iam check`.
|
|
6
|
+
- Add scoped Funnel, Paywall and Coupon authoring commands with canonical schemas, local validation, previews and explicit authorization requirements.
|
|
7
|
+
- Align bundled contracts, code-reference commands and error handling with the current management architecture.
|
|
8
|
+
|
|
3
9
|
## 0.3.11 — 2026-10-23
|
|
4
10
|
|
|
5
11
|
- Preserve the full capability catalog during npm release verification, with an explicit failure when command output exceeds its bound.
|
|
@@ -16,6 +22,7 @@
|
|
|
16
22
|
|
|
17
23
|
## 0.3.8 — 2026-10-23
|
|
18
24
|
|
|
25
|
+
- Recover a committed logout after a lost response using the original native refresh proof. Remove only the matching local profile after server confirmation; retain credentials on an uncertain or mismatched result. Requires the matching Admin deployment.
|
|
19
26
|
- Connect `growth experiments bandit-history list`, `growth metrics event-suggestions list` and `snapshots dimensions` through the management catalog. They and `growth experiments time-series` request `platform.read` plus `analytics.read` in the same environment. Requires the matching Admin deployment.
|
|
20
27
|
- Report Screen preview shares and the App Manifest preview as `BROWSER_ONLY`; they stay in the browser. App Manifest and consent operations remain unavailable until delegated access is connected.
|
|
21
28
|
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Indiana CLI
|
|
2
2
|
|
|
3
|
-
Indiana CLI **0.3.
|
|
3
|
+
Indiana CLI **0.3.13**, Node.js 22+. The executable is `indiana`. CLI versions are independent of the Customer SDKs.
|
|
4
4
|
|
|
5
5
|
Install the public npm package:
|
|
6
6
|
|
|
@@ -11,7 +11,7 @@ indiana doctor --server https://tinker.cash --json
|
|
|
11
11
|
indiana login --server https://tinker.cash
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
For a reproducible installation, use `npm install -g @tinkerlandai/indiana-cli@0.3.
|
|
14
|
+
For a reproducible installation, use `npm install -g @tinkerlandai/indiana-cli@0.3.13`. Uninstall with `npm uninstall -g @tinkerlandai/indiana-cli`. Node.js 22+ must be on PATH; the package includes the `indiana` command and npm installs its runtime dependencies.
|
|
15
15
|
|
|
16
16
|
The existing website installation channel remains available on macOS and Linux:
|
|
17
17
|
|
|
@@ -51,7 +51,7 @@ Better Auth in the Indiana Admin issues and refreshes CLI tokens through Authori
|
|
|
51
51
|
|
|
52
52
|
Implemented remote command surfaces include `login`, `whoami`, `auth status`, `logout`, `projects list`, and scoped `coupons`, `rewards` and `referral-programs` catalog/code/lifecycle operations. Their execution still requires current server registration, membership, role/App access and explicit resource grants. No local command proves those permissions.
|
|
53
53
|
|
|
54
|
-
`coupons subscription`, `coupons subscription-state` and `coupons subscription-recover` are unavailable in the current management runtime. They return `CAPABILITY_UNAVAILABLE` (exit 7) before reading files or credentials or making requests. `capabilities` reports these separately; `--only-supported` excludes them. Customer/Feature/Product management and Offering/Paywall/Funnel authoring now have connected scoped operations. Scoped balances, usage, ledger, billing controls, analytics and Sandbox Stripe refunds also use the original Console handlers. Organization governance, GrowthBook administration, profile images and compatible integration configuration use explicit layered grants.
|
|
54
|
+
`coupons subscription`, `coupons subscription-state` and `coupons subscription-recover` are unavailable in the current management runtime. They return `CAPABILITY_UNAVAILABLE` (exit 7) before reading files or credentials or making requests. `capabilities` reports these separately; `--only-supported` excludes them. Customer/Feature/Product management and Offering/Paywall/Funnel authoring now have connected scoped operations. Scoped balances, usage, ledger, billing controls, analytics and Sandbox Stripe refunds also use the original Console handlers. Organization governance, GrowthBook administration, profile images and compatible integration configuration use explicit layered grants. The generated catalog records connected operations individually; App Manifest/consent scope remains unconnected, browser-only previews stay unavailable, and Apple/Google provider configuration and native Product bindings remain deferred. Inspect the operation catalog for exact availability; it does not certify every provider/business branch.
|
|
55
55
|
|
|
56
56
|
Production OAuth and the scoped business slice are deployed at `https://tinker.cash`; `https://dev.tinker.cash` remains the separate Indiana-test deployment. Credentials and native OAuth clients are origin-bound and cannot be shared between them. See production acceptance for exact verified coverage and remaining gaps.
|
|
57
57
|
|
|
@@ -62,11 +62,60 @@ governance or same-user actions. `--scopes-file <path>` requests several exact l
|
|
|
62
62
|
in one immutable consent. Environment remains the default and preserves existing grants.
|
|
63
63
|
App configuration covers all App environments; selected-environment analysis still
|
|
64
64
|
requires its separate resource grants. See [layered authorization](../../docs/cli-layered-authorization.md)
|
|
65
|
-
for dependencies
|
|
65
|
+
for grant dependencies and scope. Invitation creation/resending
|
|
66
66
|
sends no email unless `--send-email` is explicitly supplied.
|
|
67
67
|
|
|
68
68
|
## Business operations
|
|
69
69
|
|
|
70
|
+
### Marketing authoring
|
|
71
|
+
|
|
72
|
+
Funnel, Paywall and Coupon authoring reuse the existing scoped Console/management services. CLI 0.3.13 exposes explicit draft commands, canonical schemas and verification limits. Older installations need an upgrade to use these commands.
|
|
73
|
+
|
|
74
|
+
```sh
|
|
75
|
+
indiana funnels describe --json
|
|
76
|
+
indiana paywalls describe --schema document --json
|
|
77
|
+
indiana paywalls describe --schema preview --json
|
|
78
|
+
indiana coupons describe --schema write --json
|
|
79
|
+
indiana coupons describe --schema read-result --json
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
`describe` is offline. `document` describes the file accepted by create/save/validate, `write` describes the full action accepted by the existing `apply` command, and `preview` describes that resource's preview file. `read-result` and `write-result` describe successful command output under `data`. JSON Schema covers shape; canonical parsers also run graph, binding, date and other refinements. Local input failures include field paths for correction without echoing the document.
|
|
83
|
+
|
|
84
|
+
`authorization.stages` lists the existing grants required for reads, writes, saved checks and previews; `authorization.requirements` combines them without duplicates. Server simulations also read their Product, Feature and Coupon dependencies; Funnel simulation additionally requires analytics access. Bind these explicit requirements to the exact Org/App/environment when requesting consent. Local Coupon preview needs no grant.
|
|
85
|
+
|
|
86
|
+
```sh
|
|
87
|
+
indiana funnels create --file funnel.json --name "Welcome" --request-id <uuid> --json
|
|
88
|
+
indiana funnels get <id> --json
|
|
89
|
+
indiana funnels save <id> --revision <revision> --name "Welcome" --file funnel.json --json
|
|
90
|
+
indiana funnels validate --file funnel.json --mode publish --json
|
|
91
|
+
indiana funnels check <id> --revision <revision> --json
|
|
92
|
+
indiana funnels preview --file funnel-preview-request.json --json
|
|
93
|
+
indiana funnels publish <id> --revision <revision> --json
|
|
94
|
+
|
|
95
|
+
indiana paywalls create --file paywall.json --json
|
|
96
|
+
indiana paywalls get <id> --json
|
|
97
|
+
indiana paywalls save <id> --revision <revision> --file paywall.json --json
|
|
98
|
+
indiana paywalls check <id> --revision <revision> --json
|
|
99
|
+
indiana paywalls preview --file paywall-preview-request.json --json
|
|
100
|
+
indiana paywalls publish <id> --revision <revision> --json
|
|
101
|
+
|
|
102
|
+
indiana coupons validate --file coupon.json --json
|
|
103
|
+
indiana coupons preview --file coupon.json --locale en --json
|
|
104
|
+
indiana coupons create --file coupon.json --json
|
|
105
|
+
indiana coupons get <id> --json
|
|
106
|
+
indiana coupons check <id> --revision <revision> --file proposed-coupon.json --json
|
|
107
|
+
indiana coupons save <id> --revision <revision> --file coupon.json --json
|
|
108
|
+
indiana coupons activate <id> --revision <revision> --json
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Funnel/Paywall `get` returns the full record; Coupon `get` retains its existing collection response, with the input document at `rows[0].input`. Create/save files contain a document, without scope fields or an action wrapper. Funnel creation requires a caller-owned stable request UUID. Save and publish/activate require the exact last-read revision. Paywall/Coupon creation has no creation-request contract: reconcile an uncertain result by reading before attempting another creation. Mutations are never automatically retried.
|
|
112
|
+
|
|
113
|
+
Funnel/Coupon `check` reads the saved revision and validates its canonical structure; it does not certify remote reference availability or database publication guards. Coupon `check --file` also applies the shared lifecycle rules to proposed edits, including locked commercial terms after activation. Paywall `check` runs the existing server publish preflight, returns individual blockers and exits 2 when blocked. Every check refuses a different saved revision with exit 5. Publish/activate still performs current native role, scope, lifecycle and business checks.
|
|
114
|
+
|
|
115
|
+
Funnel preview accepts the canonical single-session preview request, including explicit simulated scenario, stable preview ID and journal. The retained `funnels preview query` command supports the original transport. Paywall preview accepts `{ "doc": <Paywall document>, "locale": "en", "currency": "USD" }`; currency is optional and scope is supplied by the management adapter. Both return simulation JSON, without starting a customer Run, accepting payment, granting a Coupon, minting a public link or opening a browser. Coupon preview is local localized terms, not customer eligibility or a quote. Design previews, SDK runtime execution and financial acceptance remain separate.
|
|
116
|
+
|
|
117
|
+
Use scoped `templates list` to discover authored designs and `code pull/check/diff/push` to edit their sources. Paywalls pin published Offering Versions; template copy and draft saves do not publish or alter Product terms. Coupon presentation is authored in the consuming screen. Remote authoring commands require the approved exact App/environment and resource permissions, independently of offline discovery and validation.
|
|
118
|
+
|
|
70
119
|
### Code reference scanning
|
|
71
120
|
|
|
72
121
|
CLI **0.3.5** adds a CI surface using a dedicated App/environment API Key, independently of personal OAuth management sessions. The target server must have the matching code-reference API and database migration before a repository can report.
|
|
@@ -96,11 +145,13 @@ Scan evidence describes configured static scope only. Clean up old branches, mer
|
|
|
96
145
|
|
|
97
146
|
### Independent screen sources (unreleased source)
|
|
98
147
|
|
|
99
|
-
The current source adds `indiana code` for Paywall, Popup and
|
|
148
|
+
The current source adds `indiana code` for Paywall, Popup, Page and Banner designs. These commands require a source build and the matching Web management adapter; the scoped public 0.3.5 scanner release does not include them; they remain pending a separate release.
|
|
100
149
|
|
|
101
150
|
```sh
|
|
102
151
|
indiana code pull paywall/<uuid> --out ./template
|
|
103
|
-
indiana code pull
|
|
152
|
+
indiana code pull popup/<uuid> --out ./popup
|
|
153
|
+
indiana code pull page/<uuid> --out ./page
|
|
154
|
+
indiana code pull banner/<uuid> --out ./banner
|
|
104
155
|
indiana code pull template/<uuid> --out ./private-template
|
|
105
156
|
indiana code check ./template --json
|
|
106
157
|
indiana code diff ./template --json
|
|
@@ -159,9 +210,9 @@ Scope priority is explicit flags → `indiana.config.json` → selected profile.
|
|
|
159
210
|
|
|
160
211
|
Rename existing `grow.config.json` files to `indiana.config.json`; the JSON format is unchanged.
|
|
161
212
|
|
|
162
|
-
The user directory defaults to `.config/indiana` (Windows: `LOCALAPPDATA/Indiana/cli`). Override with **`INDIANA_CLI_CONFIG_DIR`**; 0.2.0 no longer reads `GROW_CLI_CONFIG_DIR`. Existing configuration formats are unchanged. Credentials default to the system keychain, with no implicit file fallback. Explicit `--credential-store file` requires POSIX 0600 files/0700 directories and is unavailable on Windows. Locks and atomic replacement protect writes. New locks record the local owner process and recover automatically only after that process is confirmed stopped. A live PID, an unverifiable owner or another host keeps the lock occupied regardless of age. Older versions left empty `.lock` files without ownership metadata: stop all Indiana CLI commands using that configuration, then remove only the reported `.lock` file and retry; preserve the configuration and credentials.
|
|
213
|
+
The user directory defaults to `.config/indiana` (Windows: `LOCALAPPDATA/Indiana/cli`). Override with **`INDIANA_CLI_CONFIG_DIR`**; 0.2.0 no longer reads `GROW_CLI_CONFIG_DIR`. Existing configuration formats are unchanged. Credentials default to the system keychain, with no implicit file fallback. Explicit `--credential-store file` requires POSIX 0600 files/0700 directories and is unavailable on Windows. Locks and atomic replacement protect writes. New locks record the local owner process and recover automatically only after that process is confirmed stopped. A live PID, an unverifiable owner or another host keeps the lock occupied regardless of age. Older versions left empty `.lock` files without ownership metadata: stop all Indiana CLI commands using that configuration, then remove only the reported `.lock` file and retry; preserve the configuration and credentials.
|
|
163
214
|
|
|
164
|
-
Credentials are saved only after the exact requested authorization is active. Refresh preserves user/client/session/grant identity and requires an active, unexpired grant. whoami verifies the current
|
|
215
|
+
Credentials are saved only after the exact requested authorization is active. Refresh preserves user/client/session/grant identity and requires an active, unexpired grant. whoami verifies the current native Better Auth user/session and active grant without outputting tokens. Logout without a saved credential succeeds without a network call. With a saved credential, logout confirms revocation of the exact Indiana authorization and termination of its own native Auth session before removing local credentials. Both results are reported separately. A failed or incomplete response retains credentials for retry; termination can refresh the same native session after the grant is revoked, without enabling business commands. `logout --local` explicitly leaves both server authorization and native session unchanged. Server and CLI support for this logout contract must be released together; older servers cannot confirm native cleanup.
|
|
165
216
|
|
|
166
217
|
## Local document tools
|
|
167
218
|
|
|
@@ -187,7 +238,7 @@ The current source distinguishes transport failures from HTTP responses in `doct
|
|
|
187
238
|
|
|
188
239
|
`doctor` identifies whether management metadata or OAuth discovery failed. Check the hostname/DNS for `dns`, host/port and proxy address for `connection_refused`, routing/VPN/firewall for `unreachable`, and the system clock/certificate trust for `tls`. HTTP 407 indicates proxy authentication; an unclassified proxy tunnel failure can remain `unknown`. If your network requires a proxy, check `HTTP_PROXY`, `HTTPS_PROXY` and `NO_PROXY`. On Node.js 22.21+ within 22.x or Node.js 24+, `NODE_USE_ENV_PROXY=1 indiana doctor --json` enables environment proxies for that invocation. This switch does not create a proxy or configure its address, and the CLI never changes shell configuration automatically.
|
|
189
240
|
|
|
190
|
-
Read-only transport failures use `check_availability`; writes and OAuth token exchanges use `recover_operation` with `retryable: false`, because the remote operation may have completed. Inspect the original operation/session before retrying. A network failure during refresh preserves the saved credential and does not by itself require deleting it or logging in again. Genuine HTTP service failures retain `SERVICE_UNAVAILABLE` with their status and available request ID.
|
|
241
|
+
Read-only transport failures use `check_availability`; writes and OAuth token exchanges use `recover_operation` with `retryable: false`, because the remote operation may have completed. Inspect the original operation/session before retrying. A network failure during refresh preserves the saved credential and does not by itself require deleting it or logging in again. Genuine HTTP service failures retain `SERVICE_UNAVAILABLE` with their status and available request ID.
|
|
191
242
|
|
|
192
243
|
| Exit | Meaning |
|
|
193
244
|
| ---- | --------------------------------------------------------- |
|
|
@@ -121,6 +121,7 @@ var localErrorRecovery = {
|
|
|
121
121
|
CONFIGURATION_DISPOSED: "reload_state",
|
|
122
122
|
UNSUPPORTED_SCHEMA: "upgrade_sdk",
|
|
123
123
|
FUNNEL_STOPPED: "check_availability",
|
|
124
|
+
PAYWALL_UNAVAILABLE: "check_availability",
|
|
124
125
|
EVALUATION_MODE: "reload_state",
|
|
125
126
|
SERVER_REQUIRED: "fix_request",
|
|
126
127
|
STICKY_SAVE_FAILED: "retry_same_request",
|
|
@@ -263,10 +264,17 @@ function cliErrorCause(error) {
|
|
|
263
264
|
}
|
|
264
265
|
function schemaError(error, code, message) {
|
|
265
266
|
if (error instanceof ZodError)
|
|
266
|
-
return new CliError(
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
267
|
+
return new CliError(
|
|
268
|
+
code,
|
|
269
|
+
message,
|
|
270
|
+
2,
|
|
271
|
+
{
|
|
272
|
+
fields: error.issues.slice(0, 50).map(({ code: code2, path, message: message2 }) => ({ code: code2, path, message: message2 })),
|
|
273
|
+
truncated: error.issues.length > 50
|
|
274
|
+
},
|
|
275
|
+
false,
|
|
276
|
+
{ recovery: "fix_request" }
|
|
277
|
+
);
|
|
270
278
|
return error;
|
|
271
279
|
}
|
|
272
280
|
function errorResult(error) {
|