image-skill 0.1.31 → 0.1.32
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 +86 -19
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,15 @@ This changelog tracks the public `image-skill` CLI package and public skill
|
|
|
4
4
|
mirror. The npm package metadata remains the authority for tarball integrity and
|
|
5
5
|
provenance; this file is the human- and agent-readable release map.
|
|
6
6
|
|
|
7
|
+
## 0.1.32 - 2026-06-04
|
|
8
|
+
|
|
9
|
+
- Fix (payments): public `create --guide` payment suggestions and
|
|
10
|
+
`credits methods` recovery commands now emit copy-runnable
|
|
11
|
+
`npx -y image-skill@latest` commands that preserve
|
|
12
|
+
`IMAGE_SKILL_CONFIG_PATH` when agents use a non-default config path. The
|
|
13
|
+
self-fund quote/buy/status path no longer drops auth context after a fresh
|
|
14
|
+
`npx` invocation.
|
|
15
|
+
|
|
7
16
|
## 0.1.31 - 2026-06-03
|
|
8
17
|
|
|
9
18
|
- Fix (guide): public `create --guide` copyable commands now preserve
|
package/bin/image-skill.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import { Readable } from "node:stream";
|
|
|
7
7
|
import { pipeline } from "node:stream/promises";
|
|
8
8
|
import os from "node:os";
|
|
9
9
|
|
|
10
|
-
const VERSION = "0.1.
|
|
10
|
+
const VERSION = "0.1.32";
|
|
11
11
|
const PACKAGE_NAME = "image-skill";
|
|
12
12
|
const DEFAULT_API_BASE_URL = "https://api.image-skill.com";
|
|
13
13
|
const DEFAULT_DOCS_BASE_URL = "https://image-skill.com";
|
|
@@ -918,12 +918,15 @@ async function credits(argv) {
|
|
|
918
918
|
if (tokenHandoff !== null) {
|
|
919
919
|
return tokenHandoff;
|
|
920
920
|
}
|
|
921
|
-
return
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
921
|
+
return withCopyRunnablePaymentMethodCommands(
|
|
922
|
+
await apiRequest({
|
|
923
|
+
command: "image-skill credits methods",
|
|
924
|
+
method: "GET",
|
|
925
|
+
apiBaseUrl: apiBase(args),
|
|
926
|
+
path: "/v1/payment-methods",
|
|
927
|
+
}),
|
|
928
|
+
createGuideCommandPrefix(),
|
|
929
|
+
);
|
|
927
930
|
}
|
|
928
931
|
if (subcommand === "packs") {
|
|
929
932
|
const [packsSubcommand, ...packsRest] = rest;
|
|
@@ -1460,7 +1463,6 @@ async function createGuide(args) {
|
|
|
1460
1463
|
const authenticated = quota?.envelope.data?.authenticated === true;
|
|
1461
1464
|
const publicTokenSource =
|
|
1462
1465
|
token.source === "anonymous" ? "none" : token.source;
|
|
1463
|
-
const paymentSummary = createGuidePaymentSummary(payments.envelope.data);
|
|
1464
1466
|
const stage = createGuideStage({
|
|
1465
1467
|
prompt: trimmedPrompt,
|
|
1466
1468
|
health,
|
|
@@ -1478,6 +1480,10 @@ async function createGuide(args) {
|
|
|
1478
1480
|
? LOCAL_WRITABLE_CONFIG_PATH
|
|
1479
1481
|
: configuredImageSkillConfigPath(),
|
|
1480
1482
|
});
|
|
1483
|
+
const paymentSummary = createGuidePaymentSummary(
|
|
1484
|
+
payments.envelope.data,
|
|
1485
|
+
guideCommandPrefix,
|
|
1486
|
+
);
|
|
1481
1487
|
const blocker = createGuideBlocker(stage, {
|
|
1482
1488
|
requestedModelId,
|
|
1483
1489
|
quota,
|
|
@@ -1875,7 +1881,7 @@ function createGuideSelectionReason(model, prompt, intent) {
|
|
|
1875
1881
|
return "guide selected the first available executable create model";
|
|
1876
1882
|
}
|
|
1877
1883
|
|
|
1878
|
-
function createGuidePaymentSummary(data) {
|
|
1884
|
+
function createGuidePaymentSummary(data, commandPrefix) {
|
|
1879
1885
|
const methods = Array.isArray(data?.methods)
|
|
1880
1886
|
? data.methods.filter((method) => method.live_money)
|
|
1881
1887
|
: [];
|
|
@@ -1933,6 +1939,7 @@ function createGuidePaymentSummary(data) {
|
|
|
1933
1939
|
suggested_commands: createGuidePaymentCommands(
|
|
1934
1940
|
preferredMethod,
|
|
1935
1941
|
availableMethods.filter((method) => method !== preferredMethod),
|
|
1942
|
+
commandPrefix,
|
|
1936
1943
|
),
|
|
1937
1944
|
};
|
|
1938
1945
|
}
|
|
@@ -1995,7 +2002,11 @@ function createGuidePreferredPaymentSummary(method) {
|
|
|
1995
2002
|
};
|
|
1996
2003
|
}
|
|
1997
2004
|
|
|
1998
|
-
function createGuidePaymentCommands(
|
|
2005
|
+
function createGuidePaymentCommands(
|
|
2006
|
+
preferredMethod,
|
|
2007
|
+
fallbackMethods,
|
|
2008
|
+
commandPrefix,
|
|
2009
|
+
) {
|
|
1999
2010
|
const commands = [
|
|
2000
2011
|
"image-skill credits methods --json",
|
|
2001
2012
|
"image-skill credits packs list --json",
|
|
@@ -2017,7 +2028,68 @@ function createGuidePaymentCommands(preferredMethod, fallbackMethods) {
|
|
|
2017
2028
|
}
|
|
2018
2029
|
}
|
|
2019
2030
|
}
|
|
2020
|
-
return commands
|
|
2031
|
+
return commands.map((command) =>
|
|
2032
|
+
renderCopyRunnablePaymentCommand(commandPrefix, command),
|
|
2033
|
+
);
|
|
2034
|
+
}
|
|
2035
|
+
|
|
2036
|
+
function withCopyRunnablePaymentMethodCommands(result, commandPrefix) {
|
|
2037
|
+
const data = result.envelope.data;
|
|
2038
|
+
if (data === null || typeof data !== "object") {
|
|
2039
|
+
return result;
|
|
2040
|
+
}
|
|
2041
|
+
return {
|
|
2042
|
+
...result,
|
|
2043
|
+
envelope: {
|
|
2044
|
+
...result.envelope,
|
|
2045
|
+
data: paymentMethodCatalogWithCopyRunnableCommands(data, commandPrefix),
|
|
2046
|
+
},
|
|
2047
|
+
};
|
|
2048
|
+
}
|
|
2049
|
+
|
|
2050
|
+
function paymentMethodCatalogWithCopyRunnableCommands(catalog, commandPrefix) {
|
|
2051
|
+
return {
|
|
2052
|
+
...catalog,
|
|
2053
|
+
methods: Array.isArray(catalog.methods)
|
|
2054
|
+
? catalog.methods.map((method) => ({
|
|
2055
|
+
...method,
|
|
2056
|
+
recovery:
|
|
2057
|
+
method.recovery === null || typeof method.recovery !== "object"
|
|
2058
|
+
? method.recovery
|
|
2059
|
+
: {
|
|
2060
|
+
...method.recovery,
|
|
2061
|
+
quote_command:
|
|
2062
|
+
typeof method.recovery.quote_command === "string"
|
|
2063
|
+
? renderCopyRunnablePaymentCommand(
|
|
2064
|
+
commandPrefix,
|
|
2065
|
+
method.recovery.quote_command,
|
|
2066
|
+
)
|
|
2067
|
+
: method.recovery.quote_command,
|
|
2068
|
+
purchase_command:
|
|
2069
|
+
typeof method.recovery.purchase_command === "string"
|
|
2070
|
+
? renderCopyRunnablePaymentCommand(
|
|
2071
|
+
commandPrefix,
|
|
2072
|
+
method.recovery.purchase_command,
|
|
2073
|
+
)
|
|
2074
|
+
: method.recovery.purchase_command,
|
|
2075
|
+
status_command:
|
|
2076
|
+
typeof method.recovery.status_command === "string"
|
|
2077
|
+
? renderCopyRunnablePaymentCommand(
|
|
2078
|
+
commandPrefix,
|
|
2079
|
+
method.recovery.status_command,
|
|
2080
|
+
)
|
|
2081
|
+
: method.recovery.status_command,
|
|
2082
|
+
},
|
|
2083
|
+
}))
|
|
2084
|
+
: catalog.methods,
|
|
2085
|
+
};
|
|
2086
|
+
}
|
|
2087
|
+
|
|
2088
|
+
function renderCopyRunnablePaymentCommand(commandPrefix, command) {
|
|
2089
|
+
if (/\bnpx\s+(?:-y|--yes)\s+image-skill@latest\b/.test(command)) {
|
|
2090
|
+
return command;
|
|
2091
|
+
}
|
|
2092
|
+
return renderGuidePrefixedCommand(commandPrefix, command);
|
|
2021
2093
|
}
|
|
2022
2094
|
|
|
2023
2095
|
function createGuideStage(input) {
|
|
@@ -2217,7 +2289,6 @@ function createGuideSelfFundHandoff(stage, input) {
|
|
|
2217
2289
|
const statusCommand = guidePaymentCommandByKind(
|
|
2218
2290
|
input.paymentSummary.suggested_commands,
|
|
2219
2291
|
"status",
|
|
2220
|
-
input.commandPrefix,
|
|
2221
2292
|
);
|
|
2222
2293
|
|
|
2223
2294
|
return {
|
|
@@ -2234,12 +2305,10 @@ function createGuideSelfFundHandoff(stage, input) {
|
|
|
2234
2305
|
quote: guidePaymentCommandByKind(
|
|
2235
2306
|
input.paymentSummary.suggested_commands,
|
|
2236
2307
|
"quote",
|
|
2237
|
-
input.commandPrefix,
|
|
2238
2308
|
),
|
|
2239
2309
|
buy: guidePaymentCommandByKind(
|
|
2240
2310
|
input.paymentSummary.suggested_commands,
|
|
2241
2311
|
"buy",
|
|
2242
|
-
input.commandPrefix,
|
|
2243
2312
|
),
|
|
2244
2313
|
status: statusCommand,
|
|
2245
2314
|
},
|
|
@@ -2510,11 +2579,9 @@ function createGuideNextCommand(stage, input) {
|
|
|
2510
2579
|
return renderGuideSignupCommand(input);
|
|
2511
2580
|
}
|
|
2512
2581
|
if (stage === "quota_required") {
|
|
2513
|
-
return
|
|
2514
|
-
input.
|
|
2515
|
-
|
|
2516
|
-
firstPaymentActionCommand(input.paymentSummary.suggested_commands),
|
|
2517
|
-
),
|
|
2582
|
+
return (
|
|
2583
|
+
firstPaymentActionCommand(input.paymentSummary.suggested_commands) ??
|
|
2584
|
+
renderGuidePrefixedCommand(input.commandPrefix, "credits methods --json")
|
|
2518
2585
|
);
|
|
2519
2586
|
}
|
|
2520
2587
|
if (createGuideSelectedModelRequiresInputImage(input.selected)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "image-skill",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.32",
|
|
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,
|