image-skill 0.1.31 → 0.1.33
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 +18 -0
- package/bin/image-skill.mjs +134 -22
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,24 @@ 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.33 - 2026-06-04
|
|
8
|
+
|
|
9
|
+
- Fix (guide): public `create --guide` replay commands now preserve explicit
|
|
10
|
+
`--model`, `--provider`, `--intent`, and
|
|
11
|
+
`--max-estimated-usd-per-image` context in `after_next`, auth rerun, and
|
|
12
|
+
self-fund handoff commands. Modality-specific aliases can send an agent
|
|
13
|
+
through signup or quota recovery without silently falling back to the default
|
|
14
|
+
image guide.
|
|
15
|
+
|
|
16
|
+
## 0.1.32 - 2026-06-04
|
|
17
|
+
|
|
18
|
+
- Fix (payments): public `create --guide` payment suggestions and
|
|
19
|
+
`credits methods` recovery commands now emit copy-runnable
|
|
20
|
+
`npx -y image-skill@latest` commands that preserve
|
|
21
|
+
`IMAGE_SKILL_CONFIG_PATH` when agents use a non-default config path. The
|
|
22
|
+
self-fund quote/buy/status path no longer drops auth context after a fresh
|
|
23
|
+
`npx` invocation.
|
|
24
|
+
|
|
7
25
|
## 0.1.31 - 2026-06-03
|
|
8
26
|
|
|
9
27
|
- 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.33";
|
|
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;
|
|
@@ -1397,7 +1400,8 @@ async function createGuide(args) {
|
|
|
1397
1400
|
const trimmedPrompt = prompt.trim();
|
|
1398
1401
|
const requestedModelId = flagString(args, "model");
|
|
1399
1402
|
const requestedProviderId = flagString(args, "provider");
|
|
1400
|
-
const
|
|
1403
|
+
const requestedIntentFlag = flagString(args, "intent");
|
|
1404
|
+
const requestedIntent = requestedIntentFlag ?? "explore";
|
|
1401
1405
|
const maxEstimatedUsdPerImage = flagNumber(
|
|
1402
1406
|
args,
|
|
1403
1407
|
"max-estimated-usd-per-image",
|
|
@@ -1460,7 +1464,6 @@ async function createGuide(args) {
|
|
|
1460
1464
|
const authenticated = quota?.envelope.data?.authenticated === true;
|
|
1461
1465
|
const publicTokenSource =
|
|
1462
1466
|
token.source === "anonymous" ? "none" : token.source;
|
|
1463
|
-
const paymentSummary = createGuidePaymentSummary(payments.envelope.data);
|
|
1464
1467
|
const stage = createGuideStage({
|
|
1465
1468
|
prompt: trimmedPrompt,
|
|
1466
1469
|
health,
|
|
@@ -1478,6 +1481,10 @@ async function createGuide(args) {
|
|
|
1478
1481
|
? LOCAL_WRITABLE_CONFIG_PATH
|
|
1479
1482
|
: configuredImageSkillConfigPath(),
|
|
1480
1483
|
});
|
|
1484
|
+
const paymentSummary = createGuidePaymentSummary(
|
|
1485
|
+
payments.envelope.data,
|
|
1486
|
+
guideCommandPrefix,
|
|
1487
|
+
);
|
|
1481
1488
|
const blocker = createGuideBlocker(stage, {
|
|
1482
1489
|
requestedModelId,
|
|
1483
1490
|
quota,
|
|
@@ -1488,6 +1495,9 @@ async function createGuide(args) {
|
|
|
1488
1495
|
selected,
|
|
1489
1496
|
requestedProviderId,
|
|
1490
1497
|
requestedIntent,
|
|
1498
|
+
requestedIntentFlag,
|
|
1499
|
+
requestedModelId,
|
|
1500
|
+
maxEstimatedUsdPerImage,
|
|
1491
1501
|
budgetGuard,
|
|
1492
1502
|
aspectRatio: selectedAspectRatio,
|
|
1493
1503
|
apiBaseUrl: explicitApiBaseUrl(args),
|
|
@@ -1500,6 +1510,9 @@ async function createGuide(args) {
|
|
|
1500
1510
|
selected,
|
|
1501
1511
|
requestedProviderId,
|
|
1502
1512
|
requestedIntent,
|
|
1513
|
+
requestedIntentFlag,
|
|
1514
|
+
requestedModelId,
|
|
1515
|
+
maxEstimatedUsdPerImage,
|
|
1503
1516
|
budgetGuard,
|
|
1504
1517
|
aspectRatio: selectedAspectRatio,
|
|
1505
1518
|
apiBaseUrl: explicitApiBaseUrl(args),
|
|
@@ -1539,6 +1552,12 @@ async function createGuide(args) {
|
|
|
1539
1552
|
trimmedPrompt,
|
|
1540
1553
|
explicitApiBaseUrl(args),
|
|
1541
1554
|
guideCommandPrefix,
|
|
1555
|
+
{
|
|
1556
|
+
modelId: requestedModelId,
|
|
1557
|
+
providerId: requestedProviderId,
|
|
1558
|
+
intent: requestedIntentFlag,
|
|
1559
|
+
maxEstimatedUsdPerImage,
|
|
1560
|
+
},
|
|
1542
1561
|
)
|
|
1543
1562
|
: null;
|
|
1544
1563
|
const authHandoff = createGuideAuthHandoff(stage, {
|
|
@@ -1875,7 +1894,7 @@ function createGuideSelectionReason(model, prompt, intent) {
|
|
|
1875
1894
|
return "guide selected the first available executable create model";
|
|
1876
1895
|
}
|
|
1877
1896
|
|
|
1878
|
-
function createGuidePaymentSummary(data) {
|
|
1897
|
+
function createGuidePaymentSummary(data, commandPrefix) {
|
|
1879
1898
|
const methods = Array.isArray(data?.methods)
|
|
1880
1899
|
? data.methods.filter((method) => method.live_money)
|
|
1881
1900
|
: [];
|
|
@@ -1933,6 +1952,7 @@ function createGuidePaymentSummary(data) {
|
|
|
1933
1952
|
suggested_commands: createGuidePaymentCommands(
|
|
1934
1953
|
preferredMethod,
|
|
1935
1954
|
availableMethods.filter((method) => method !== preferredMethod),
|
|
1955
|
+
commandPrefix,
|
|
1936
1956
|
),
|
|
1937
1957
|
};
|
|
1938
1958
|
}
|
|
@@ -1995,7 +2015,11 @@ function createGuidePreferredPaymentSummary(method) {
|
|
|
1995
2015
|
};
|
|
1996
2016
|
}
|
|
1997
2017
|
|
|
1998
|
-
function createGuidePaymentCommands(
|
|
2018
|
+
function createGuidePaymentCommands(
|
|
2019
|
+
preferredMethod,
|
|
2020
|
+
fallbackMethods,
|
|
2021
|
+
commandPrefix,
|
|
2022
|
+
) {
|
|
1999
2023
|
const commands = [
|
|
2000
2024
|
"image-skill credits methods --json",
|
|
2001
2025
|
"image-skill credits packs list --json",
|
|
@@ -2017,7 +2041,68 @@ function createGuidePaymentCommands(preferredMethod, fallbackMethods) {
|
|
|
2017
2041
|
}
|
|
2018
2042
|
}
|
|
2019
2043
|
}
|
|
2020
|
-
return commands
|
|
2044
|
+
return commands.map((command) =>
|
|
2045
|
+
renderCopyRunnablePaymentCommand(commandPrefix, command),
|
|
2046
|
+
);
|
|
2047
|
+
}
|
|
2048
|
+
|
|
2049
|
+
function withCopyRunnablePaymentMethodCommands(result, commandPrefix) {
|
|
2050
|
+
const data = result.envelope.data;
|
|
2051
|
+
if (data === null || typeof data !== "object") {
|
|
2052
|
+
return result;
|
|
2053
|
+
}
|
|
2054
|
+
return {
|
|
2055
|
+
...result,
|
|
2056
|
+
envelope: {
|
|
2057
|
+
...result.envelope,
|
|
2058
|
+
data: paymentMethodCatalogWithCopyRunnableCommands(data, commandPrefix),
|
|
2059
|
+
},
|
|
2060
|
+
};
|
|
2061
|
+
}
|
|
2062
|
+
|
|
2063
|
+
function paymentMethodCatalogWithCopyRunnableCommands(catalog, commandPrefix) {
|
|
2064
|
+
return {
|
|
2065
|
+
...catalog,
|
|
2066
|
+
methods: Array.isArray(catalog.methods)
|
|
2067
|
+
? catalog.methods.map((method) => ({
|
|
2068
|
+
...method,
|
|
2069
|
+
recovery:
|
|
2070
|
+
method.recovery === null || typeof method.recovery !== "object"
|
|
2071
|
+
? method.recovery
|
|
2072
|
+
: {
|
|
2073
|
+
...method.recovery,
|
|
2074
|
+
quote_command:
|
|
2075
|
+
typeof method.recovery.quote_command === "string"
|
|
2076
|
+
? renderCopyRunnablePaymentCommand(
|
|
2077
|
+
commandPrefix,
|
|
2078
|
+
method.recovery.quote_command,
|
|
2079
|
+
)
|
|
2080
|
+
: method.recovery.quote_command,
|
|
2081
|
+
purchase_command:
|
|
2082
|
+
typeof method.recovery.purchase_command === "string"
|
|
2083
|
+
? renderCopyRunnablePaymentCommand(
|
|
2084
|
+
commandPrefix,
|
|
2085
|
+
method.recovery.purchase_command,
|
|
2086
|
+
)
|
|
2087
|
+
: method.recovery.purchase_command,
|
|
2088
|
+
status_command:
|
|
2089
|
+
typeof method.recovery.status_command === "string"
|
|
2090
|
+
? renderCopyRunnablePaymentCommand(
|
|
2091
|
+
commandPrefix,
|
|
2092
|
+
method.recovery.status_command,
|
|
2093
|
+
)
|
|
2094
|
+
: method.recovery.status_command,
|
|
2095
|
+
},
|
|
2096
|
+
}))
|
|
2097
|
+
: catalog.methods,
|
|
2098
|
+
};
|
|
2099
|
+
}
|
|
2100
|
+
|
|
2101
|
+
function renderCopyRunnablePaymentCommand(commandPrefix, command) {
|
|
2102
|
+
if (/\bnpx\s+(?:-y|--yes)\s+image-skill@latest\b/.test(command)) {
|
|
2103
|
+
return command;
|
|
2104
|
+
}
|
|
2105
|
+
return renderGuidePrefixedCommand(commandPrefix, command);
|
|
2021
2106
|
}
|
|
2022
2107
|
|
|
2023
2108
|
function createGuideStage(input) {
|
|
@@ -2217,7 +2302,6 @@ function createGuideSelfFundHandoff(stage, input) {
|
|
|
2217
2302
|
const statusCommand = guidePaymentCommandByKind(
|
|
2218
2303
|
input.paymentSummary.suggested_commands,
|
|
2219
2304
|
"status",
|
|
2220
|
-
input.commandPrefix,
|
|
2221
2305
|
);
|
|
2222
2306
|
|
|
2223
2307
|
return {
|
|
@@ -2234,12 +2318,10 @@ function createGuideSelfFundHandoff(stage, input) {
|
|
|
2234
2318
|
quote: guidePaymentCommandByKind(
|
|
2235
2319
|
input.paymentSummary.suggested_commands,
|
|
2236
2320
|
"quote",
|
|
2237
|
-
input.commandPrefix,
|
|
2238
2321
|
),
|
|
2239
2322
|
buy: guidePaymentCommandByKind(
|
|
2240
2323
|
input.paymentSummary.suggested_commands,
|
|
2241
2324
|
"buy",
|
|
2242
|
-
input.commandPrefix,
|
|
2243
2325
|
),
|
|
2244
2326
|
status: statusCommand,
|
|
2245
2327
|
},
|
|
@@ -2498,7 +2580,12 @@ function createGuideWarning(stage, input) {
|
|
|
2498
2580
|
|
|
2499
2581
|
function createGuideNextCommand(stage, input) {
|
|
2500
2582
|
if (stage === "prompt_required") {
|
|
2501
|
-
return renderGuideCommand("PROMPT", input.apiBaseUrl, input.commandPrefix
|
|
2583
|
+
return renderGuideCommand("PROMPT", input.apiBaseUrl, input.commandPrefix, {
|
|
2584
|
+
modelId: input.requestedModelId,
|
|
2585
|
+
providerId: input.requestedProviderId,
|
|
2586
|
+
intent: input.requestedIntentFlag,
|
|
2587
|
+
maxEstimatedUsdPerImage: input.maxEstimatedUsdPerImage,
|
|
2588
|
+
});
|
|
2502
2589
|
}
|
|
2503
2590
|
if (stage === "no_executable_model" || stage === "service_unreachable") {
|
|
2504
2591
|
return renderGuidePrefixedCommand(
|
|
@@ -2510,11 +2597,9 @@ function createGuideNextCommand(stage, input) {
|
|
|
2510
2597
|
return renderGuideSignupCommand(input);
|
|
2511
2598
|
}
|
|
2512
2599
|
if (stage === "quota_required") {
|
|
2513
|
-
return
|
|
2514
|
-
input.
|
|
2515
|
-
|
|
2516
|
-
firstPaymentActionCommand(input.paymentSummary.suggested_commands),
|
|
2517
|
-
),
|
|
2600
|
+
return (
|
|
2601
|
+
firstPaymentActionCommand(input.paymentSummary.suggested_commands) ??
|
|
2602
|
+
renderGuidePrefixedCommand(input.commandPrefix, "credits methods --json")
|
|
2518
2603
|
);
|
|
2519
2604
|
}
|
|
2520
2605
|
if (createGuideSelectedModelRequiresInputImage(input.selected)) {
|
|
@@ -2590,11 +2675,38 @@ function createGuideEscapeHatches(input) {
|
|
|
2590
2675
|
};
|
|
2591
2676
|
}
|
|
2592
2677
|
|
|
2593
|
-
function renderGuideCommand(
|
|
2678
|
+
function renderGuideCommand(
|
|
2679
|
+
prompt,
|
|
2680
|
+
apiBaseUrl,
|
|
2681
|
+
commandPrefix = "image-skill",
|
|
2682
|
+
options = {},
|
|
2683
|
+
) {
|
|
2594
2684
|
return [
|
|
2595
2685
|
commandPrefix,
|
|
2596
2686
|
"create --guide --prompt",
|
|
2597
2687
|
shellQuote(prompt),
|
|
2688
|
+
...(options.modelId === null ||
|
|
2689
|
+
options.modelId === undefined ||
|
|
2690
|
+
options.modelId === ""
|
|
2691
|
+
? []
|
|
2692
|
+
: ["--model", shellQuote(options.modelId)]),
|
|
2693
|
+
...(options.providerId === null ||
|
|
2694
|
+
options.providerId === undefined ||
|
|
2695
|
+
options.providerId === ""
|
|
2696
|
+
? []
|
|
2697
|
+
: ["--provider", shellQuote(options.providerId)]),
|
|
2698
|
+
...(options.intent === null ||
|
|
2699
|
+
options.intent === undefined ||
|
|
2700
|
+
options.intent === ""
|
|
2701
|
+
? []
|
|
2702
|
+
: ["--intent", shellQuote(options.intent)]),
|
|
2703
|
+
...(options.maxEstimatedUsdPerImage === null ||
|
|
2704
|
+
options.maxEstimatedUsdPerImage === undefined
|
|
2705
|
+
? []
|
|
2706
|
+
: [
|
|
2707
|
+
"--max-estimated-usd-per-image",
|
|
2708
|
+
shellQuote(formatUsd(options.maxEstimatedUsdPerImage)),
|
|
2709
|
+
]),
|
|
2598
2710
|
...(apiBaseUrl === null ? [] : ["--api-base-url", shellQuote(apiBaseUrl)]),
|
|
2599
2711
|
"--json",
|
|
2600
2712
|
].join(" ");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "image-skill",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.33",
|
|
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,
|