@actionway/cli 0.18.2 → 0.18.3
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/assets/skill/actionway/SKILL.md +1 -0
- package/dist/index.js +14 -3
- package/package.json +3 -3
|
@@ -36,6 +36,7 @@ Use the installed `actionway` CLI and its server-backed Capability Registry as t
|
|
|
36
36
|
- `accepted`: immediately wait on the returned `job.jobRef`.
|
|
37
37
|
- `completed`: consume the returned result.
|
|
38
38
|
- `confirmation: strong`: never treat chat text alone as approval; follow a server-verifiable approval instruction or report that execution cannot continue.
|
|
39
|
+
6. On `E_INSUFFICIENT_BALANCE`, stop the call. When the failure includes `top_up_url`, the user-facing response must render that exact field value as a Markdown link by substituting it into `[Top up Actionway balance](<top_up_url>)`; never leave it only in terminal JSON, replace it with a terminal command, or synthesize a URL for another environment. Ask the user to retry the original task after the top-up is complete.
|
|
39
40
|
|
|
40
41
|
## Handle asynchronous jobs
|
|
41
42
|
|
package/dist/index.js
CHANGED
|
@@ -13335,7 +13335,10 @@ async function captureInstallStarted(input) {
|
|
|
13335
13335
|
{
|
|
13336
13336
|
method: "POST",
|
|
13337
13337
|
headers: { Accept: "application/json", "Content-Type": "application/json" },
|
|
13338
|
-
body: JSON.stringify({
|
|
13338
|
+
body: JSON.stringify({
|
|
13339
|
+
installSessionId: input.installSessionId,
|
|
13340
|
+
installSource: input.installSource
|
|
13341
|
+
})
|
|
13339
13342
|
},
|
|
13340
13343
|
ANALYTICS_TIMEOUT_MS,
|
|
13341
13344
|
input.fetchImpl ?? fetch
|
|
@@ -13348,6 +13351,7 @@ async function captureInstallStarted(input) {
|
|
|
13348
13351
|
async function requestCliInstallSession(input) {
|
|
13349
13352
|
const url = new URL(`${stripSlash2(input.gateway)}/api/auth/cli-session`);
|
|
13350
13353
|
url.searchParams.set("install_session_id", input.installSessionId);
|
|
13354
|
+
url.searchParams.set("install_source", input.installSource);
|
|
13351
13355
|
let response;
|
|
13352
13356
|
try {
|
|
13353
13357
|
response = await fetchWithTimeout(
|
|
@@ -13393,6 +13397,7 @@ async function connectInstallSession(input) {
|
|
|
13393
13397
|
gateway,
|
|
13394
13398
|
accessToken: credentials.access_token,
|
|
13395
13399
|
installSessionId: input.installSessionId,
|
|
13400
|
+
installSource: input.installSource,
|
|
13396
13401
|
fetchImpl
|
|
13397
13402
|
});
|
|
13398
13403
|
}
|
|
@@ -13416,9 +13421,14 @@ function registerInitCommand(program2) {
|
|
|
13416
13421
|
if (opts.skillOnly) {
|
|
13417
13422
|
ok({ skill });
|
|
13418
13423
|
}
|
|
13424
|
+
const installSource = opts.installSessionId ? "website_prompt" : "manual_init";
|
|
13419
13425
|
const installSessionId = resolveInstallSessionId(opts.installSessionId);
|
|
13420
13426
|
const initGateway = initGatewayUrl(opts.gateway, process.env);
|
|
13421
|
-
await captureInstallStarted({
|
|
13427
|
+
await captureInstallStarted({
|
|
13428
|
+
gateway: initGateway,
|
|
13429
|
+
installSessionId,
|
|
13430
|
+
installSource
|
|
13431
|
+
});
|
|
13422
13432
|
let loginStarted = false;
|
|
13423
13433
|
if (!whoamiSnapshot()) {
|
|
13424
13434
|
loginStarted = true;
|
|
@@ -13433,7 +13443,8 @@ function registerInitCommand(program2) {
|
|
|
13433
13443
|
}
|
|
13434
13444
|
const account = await connectInstallSession({
|
|
13435
13445
|
...opts.gateway ? { explicitGateway: opts.gateway } : {},
|
|
13436
|
-
installSessionId
|
|
13446
|
+
installSessionId,
|
|
13447
|
+
installSource
|
|
13437
13448
|
});
|
|
13438
13449
|
const snapshot = whoamiSnapshot();
|
|
13439
13450
|
ok({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@actionway/cli",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.3",
|
|
4
4
|
"description": "actionway CLI 的本地端壳:Clerk OAuth 鉴权 + cli-core 共享命令面 + init / update / skill 物化 / 版本三链路(终端用户本地 Codex / Claude Code 使用)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"tsx": "^4.20.0",
|
|
20
20
|
"typescript": "7.0.2",
|
|
21
21
|
"vitest": "^3.2.7",
|
|
22
|
-
"@actionway/
|
|
23
|
-
"@actionway/
|
|
22
|
+
"@actionway/contracts": "0.1.0",
|
|
23
|
+
"@actionway/cli-core": "0.1.0"
|
|
24
24
|
},
|
|
25
25
|
"engines": {
|
|
26
26
|
"node": ">=20"
|