@amaster.ai/runtime-cli 1.1.69 → 1.1.71
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/README.md +5 -0
- package/dist/cli.cjs +7 -1
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +7 -1
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +7 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -13,6 +13,11 @@ CLI for Amaster SDK - Multi-app support for OpenClaw. Manage multiple Amaster ap
|
|
|
13
13
|
- **S3 Storage**: Upload files, download objects, and inspect metadata
|
|
14
14
|
- **OpenClaw Integration**: Initialize app-specific skills and MCP servers
|
|
15
15
|
|
|
16
|
+
Execution hosts can set `refreshManagedExternally: true` in a private app auth
|
|
17
|
+
session when they supply short-lived access tokens. The CLI then disables SDK
|
|
18
|
+
cookie refresh and automatic request replay; rejected or expired credentials
|
|
19
|
+
must be renewed by that host. Standalone login sessions retain automatic refresh.
|
|
20
|
+
|
|
16
21
|
## Installation
|
|
17
22
|
|
|
18
23
|
```bash
|
package/dist/cli.cjs
CHANGED
|
@@ -3217,10 +3217,12 @@ function createAmasterClient(appCode) {
|
|
|
3217
3217
|
process.exit(1);
|
|
3218
3218
|
}
|
|
3219
3219
|
const token = getAccessToken(appCode);
|
|
3220
|
-
|
|
3220
|
+
const refreshManagedExternally = getAuthSession(appCode)?.refreshManagedExternally === true;
|
|
3221
|
+
if (token && !refreshManagedExternally && shouldRefreshToken(appCode)) {
|
|
3221
3222
|
console.error(chalk4__default.default.yellow("\u26A0\uFE0F Session expiring soon. Please login again."));
|
|
3222
3223
|
}
|
|
3223
3224
|
const client$1 = client.createClient({
|
|
3225
|
+
autoRefresh: !refreshManagedExternally,
|
|
3224
3226
|
baseURL: appConfig.baseURL,
|
|
3225
3227
|
headers: {
|
|
3226
3228
|
"x-app-code": appCode,
|
|
@@ -3229,6 +3231,10 @@ function createAmasterClient(appCode) {
|
|
|
3229
3231
|
} : {}
|
|
3230
3232
|
},
|
|
3231
3233
|
onUnauthorized: () => {
|
|
3234
|
+
if (refreshManagedExternally) {
|
|
3235
|
+
console.error(chalk4__default.default.red("Application authorization expired or was denied. Renew through the execution host and retry."));
|
|
3236
|
+
process.exit(1);
|
|
3237
|
+
}
|
|
3232
3238
|
if (token) {
|
|
3233
3239
|
console.error(chalk4__default.default.red("\n\u274C Session expired. Please login again."));
|
|
3234
3240
|
console.error(chalk4__default.default.yellow(`Run: amaster login --app ${appCode}`));
|