@tinkerlandai/indiana-cli 0.3.9 → 0.3.11

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,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.11 — 2026-10-23
4
+
5
+ - Preserve the full capability catalog during npm release verification, with an explicit failure when command output exceeds its bound.
6
+ - Finish configuration writes successfully when a competing process recovers the released empty lock directory, preserving any new owner's lock.
7
+
8
+ ## 0.3.10 — 2026-10-23
9
+
10
+ - Publish stable npm releases through the package-specific GitHub Actions trusted publisher.
11
+
3
12
  ## 0.3.9 — 2026-10-23
4
13
 
5
14
  - Distribute the CLI as `@tinkerlandai/indiana-cli` on npm, with independent `cli-vX.Y.Z` release tags.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Indiana CLI
2
2
 
3
- Indiana CLI **0.3.9**, Node.js 22+. The executable is `indiana`. CLI versions are independent of the Customer SDKs.
3
+ Indiana CLI **0.3.11**, 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.9`. 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.
14
+ For a reproducible installation, use `npm install -g @tinkerlandai/indiana-cli@0.3.11`. 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
 
@@ -94,34 +94,65 @@ function apiErrorCodeForStatus(status) {
94
94
  if ([408, 502, 503, 504].includes(status)) return "SERVICE_UNAVAILABLE";
95
95
  return "INTERNAL_ERROR";
96
96
  }
97
+ var localErrorRecovery = {
98
+ TIMEOUT: "recover_operation",
99
+ NETWORK_ERROR: "recover_operation",
100
+ HTTP_ERROR: "recover_operation",
101
+ INVALID_RESPONSE: "recover_operation",
102
+ NOT_IDENTIFIED: "authenticate",
103
+ INVALID_TOKEN: "authenticate",
104
+ INVALID_URL: "fix_request",
105
+ INVALID_TIMEOUT: "fix_request",
106
+ SERVER_ONLY: "fix_request",
107
+ PROTOCOL_MISMATCH: "upgrade_sdk",
108
+ IDENTITY_CHANGED: "reload_state",
109
+ EVENT_QUEUE_FULL: "retry_same_request",
110
+ // The original command or decision still owns the outcome.
111
+ COMMAND_PENDING: "recover_operation",
112
+ DECISION_PENDING: "recover_operation",
113
+ DECISION_ACCEPTANCE_UNKNOWN: "recover_operation",
114
+ RUN_RECONCILIATION_REQUIRED: "recover_operation",
115
+ DECISION_FAILED: "contact_support",
116
+ COMMAND_STORAGE_CONFLICT: "resolve_conflict",
117
+ COMMAND_STORAGE_INVALID: "fix_request",
118
+ CONFIGURATION_UNAVAILABLE: "check_availability",
119
+ CONFIGURATION_EXPIRED: "reload_state",
120
+ CONFIGURATION_CHANGED: "reload_state",
121
+ CONFIGURATION_DISPOSED: "reload_state",
122
+ UNSUPPORTED_SCHEMA: "upgrade_sdk",
123
+ FUNNEL_STOPPED: "check_availability",
124
+ EVALUATION_MODE: "reload_state",
125
+ SERVER_REQUIRED: "fix_request",
126
+ STICKY_SAVE_FAILED: "retry_same_request",
127
+ // The server refuses an exhausted transition budget as CONFLICT.
128
+ TRANSITION_LIMIT: "resolve_conflict",
129
+ PRECONDITION_FAILED: "reload_state",
130
+ PRODUCT_UNAVAILABLE: "fix_request",
131
+ PURCHASE_HANDLER_REQUIRED: "fix_request",
132
+ EVENT_HANDLER_REQUIRED: "fix_request",
133
+ CLOSED: "fix_request",
134
+ BRIDGE_UNAVAILABLE: "check_availability",
135
+ INVALID_CONFIGURATION: "fix_request",
136
+ NATIVE_OPERATION_FAILED: "contact_support",
137
+ // Usage is persisted before billing; recovery never reruns the model.
138
+ AI_PRICE_UNAVAILABLE: "fix_request",
139
+ AI_USAGE_UNAVAILABLE: "recover_operation",
140
+ AI_PROVIDER_ERROR: "check_availability",
141
+ AI_BALANCE_REJECTED: "resolve_conflict"
142
+ };
97
143
  function errorPolicy(code, status) {
98
144
  if (code === "CONFLICT" && status === 425)
99
145
  return { retryable: true, recovery: "retry_same_request" };
100
146
  if (code === "CONFLICT" && status === 412)
101
147
  return { retryable: false, recovery: "reload_state" };
102
- if ([
103
- "TIMEOUT",
104
- "NETWORK_ERROR",
105
- "HTTP_ERROR",
106
- "INVALID_RESPONSE",
107
- "INVALID_SERVER_RESPONSE"
108
- ].includes(code))
148
+ if (code === "INVALID_SERVER_RESPONSE")
109
149
  return { retryable: false, recovery: "recover_operation" };
110
- if (code === "NOT_IDENTIFIED" || code === "INVALID_TOKEN")
111
- return { retryable: false, recovery: "authenticate" };
112
- if ([
113
- "INVALID_URL",
114
- "INVALID_TIMEOUT",
115
- "SERVER_ONLY",
116
- "AMBIGUOUS_AUTHENTICATION"
117
- ].includes(code))
150
+ if (code === "AMBIGUOUS_AUTHENTICATION")
118
151
  return { retryable: false, recovery: "fix_request" };
119
- if (code === "PROTOCOL_MISMATCH")
120
- return { retryable: false, recovery: "upgrade_sdk" };
121
- if (code === "IDENTITY_CHANGED")
122
- return { retryable: false, recovery: "reload_state" };
123
- if (code === "CAPABILITY_UNAVAILABLE")
124
- return { retryable: false, recovery: "check_availability" };
152
+ if (Object.hasOwn(localErrorRecovery, code)) {
153
+ const recovery = localErrorRecovery[code];
154
+ return { retryable: recovery === "retry_same_request", recovery };
155
+ }
125
156
  const known = apiErrorCodeSchema.safeParse(code);
126
157
  if (!known.success) return { retryable: false, recovery: "contact_support" };
127
158
  return {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  readJsonFile,
3
3
  readJsonStream
4
- } from "./chunk-4MAMIKAR.js";
4
+ } from "./chunk-A5HJK2OY.js";
5
5
  export {
6
6
  readJsonFile,
7
7
  readJsonStream