image-skill 0.1.67 → 0.1.68
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 +9 -0
- package/bin/image-skill.mjs +68 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,15 @@ provenance; this file is the human- and agent-readable release map.
|
|
|
6
6
|
|
|
7
7
|
## Unreleased
|
|
8
8
|
|
|
9
|
+
## 0.1.68 - 2026-06-18
|
|
10
|
+
|
|
11
|
+
- Release (activation/self-fund): publish the quote-auth retry handoff from
|
|
12
|
+
#2002 so a valid unauthenticated `credits quote` failure preserves the exact
|
|
13
|
+
`error.recovery.after_auth` retry command, plus env-token and stdin-token
|
|
14
|
+
handoffs, after signup. The quote remains no-charge: no buy, wallet
|
|
15
|
+
settlement, provider call, credit debit, media write, hosted deploy, or
|
|
16
|
+
production write changed in this release bump.
|
|
17
|
+
|
|
9
18
|
## 0.1.67 - 2026-06-18
|
|
10
19
|
|
|
11
20
|
- Activation/self-fund: when `create --guide` reaches `ready_to_create` and
|
package/bin/image-skill.mjs
CHANGED
|
@@ -15,7 +15,7 @@ import { Readable } from "node:stream";
|
|
|
15
15
|
import { pipeline } from "node:stream/promises";
|
|
16
16
|
import os from "node:os";
|
|
17
17
|
|
|
18
|
-
const VERSION = "0.1.
|
|
18
|
+
const VERSION = "0.1.68";
|
|
19
19
|
const PACKAGE_NAME = "image-skill";
|
|
20
20
|
const DEFAULT_API_BASE_URL = "https://api.image-skill.com";
|
|
21
21
|
const DEFAULT_DOCS_BASE_URL = "https://image-skill.com";
|
|
@@ -1192,10 +1192,6 @@ async function credits(argv) {
|
|
|
1192
1192
|
if (credentialFlag !== null) {
|
|
1193
1193
|
return credentialFlag;
|
|
1194
1194
|
}
|
|
1195
|
-
const token = await resolveToken(args);
|
|
1196
|
-
if (!token.ok) {
|
|
1197
|
-
return token.result;
|
|
1198
|
-
}
|
|
1199
1195
|
const creditsValue = flagNumber(args, "credits");
|
|
1200
1196
|
const pack = flagString(args, "pack");
|
|
1201
1197
|
if (creditsValue === null && pack === null) {
|
|
@@ -1222,6 +1218,16 @@ async function credits(argv) {
|
|
|
1222
1218
|
`public credits quote supports --payment-method ${PUBLIC_QUOTE_PAYMENT_METHODS.join(" or ")}`,
|
|
1223
1219
|
);
|
|
1224
1220
|
}
|
|
1221
|
+
const token = await resolveToken(args);
|
|
1222
|
+
if (!token.ok) {
|
|
1223
|
+
return withCreditQuoteAuthRecovery(token.result, {
|
|
1224
|
+
args,
|
|
1225
|
+
creditsValue,
|
|
1226
|
+
pack,
|
|
1227
|
+
paymentMethod,
|
|
1228
|
+
idempotency,
|
|
1229
|
+
});
|
|
1230
|
+
}
|
|
1225
1231
|
const body = {
|
|
1226
1232
|
...(creditsValue === null ? {} : { credits: creditsValue }),
|
|
1227
1233
|
...(pack === null ? {} : { pack_id: pack }),
|
|
@@ -3059,6 +3065,63 @@ function renderCopyRunnablePaymentCommand(commandPrefix, command) {
|
|
|
3059
3065
|
return renderGuidePrefixedCommand(commandPrefix, command);
|
|
3060
3066
|
}
|
|
3061
3067
|
|
|
3068
|
+
function withCreditQuoteAuthRecovery(result, input) {
|
|
3069
|
+
const command = renderCopyRunnablePaymentCommand(
|
|
3070
|
+
createGuideCommandPrefix(),
|
|
3071
|
+
renderCreditQuoteRetryCommand(input),
|
|
3072
|
+
);
|
|
3073
|
+
return {
|
|
3074
|
+
...result,
|
|
3075
|
+
envelope: {
|
|
3076
|
+
...result.envelope,
|
|
3077
|
+
error: {
|
|
3078
|
+
...result.envelope.error,
|
|
3079
|
+
recovery: {
|
|
3080
|
+
...(result.envelope.error?.recovery ?? {}),
|
|
3081
|
+
after_auth: {
|
|
3082
|
+
command,
|
|
3083
|
+
command_copy_runnable: true,
|
|
3084
|
+
with_env: `IMAGE_SKILL_TOKEN="$IMAGE_SKILL_TOKEN" ${command}`,
|
|
3085
|
+
with_stdin: renderTokenStdinCommand(command),
|
|
3086
|
+
accepted_methods: ["config", "IMAGE_SKILL_TOKEN", "--token-stdin"],
|
|
3087
|
+
requires_auth: true,
|
|
3088
|
+
command_effect: {
|
|
3089
|
+
label: "live_money_quote_no_charge",
|
|
3090
|
+
live_money: true,
|
|
3091
|
+
payment_object: true,
|
|
3092
|
+
payment_attempt: false,
|
|
3093
|
+
wallet_settlement: false,
|
|
3094
|
+
provider_call: false,
|
|
3095
|
+
credit_debit: false,
|
|
3096
|
+
media_write: false,
|
|
3097
|
+
},
|
|
3098
|
+
},
|
|
3099
|
+
},
|
|
3100
|
+
},
|
|
3101
|
+
},
|
|
3102
|
+
};
|
|
3103
|
+
}
|
|
3104
|
+
|
|
3105
|
+
function renderCreditQuoteRetryCommand(input) {
|
|
3106
|
+
return [
|
|
3107
|
+
"image-skill credits quote",
|
|
3108
|
+
...(input.pack === null
|
|
3109
|
+
? ["--credits", String(input.creditsValue)]
|
|
3110
|
+
: ["--pack", input.pack]),
|
|
3111
|
+
"--payment-method",
|
|
3112
|
+
input.paymentMethod,
|
|
3113
|
+
"--idempotency-key",
|
|
3114
|
+
input.idempotency.value,
|
|
3115
|
+
...quoteRetryApiBaseArgs(input.args),
|
|
3116
|
+
"--json",
|
|
3117
|
+
].join(" ");
|
|
3118
|
+
}
|
|
3119
|
+
|
|
3120
|
+
function quoteRetryApiBaseArgs(args) {
|
|
3121
|
+
const apiBaseUrl = explicitApiBaseUrl(args);
|
|
3122
|
+
return apiBaseUrl === null ? [] : ["--api-base-url", shellQuote(apiBaseUrl)];
|
|
3123
|
+
}
|
|
3124
|
+
|
|
3062
3125
|
function createGuideStage(input) {
|
|
3063
3126
|
if (input.promptRequired) {
|
|
3064
3127
|
return "prompt_required";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "image-skill",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.68",
|
|
4
4
|
"description": "Zero-setup durable creative-media CLI for agents (image + video + audio + 3D): guide-first creation, model and cost inspection, owned URLs, JSON recovery, payments, reusable assets, and feedback.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|