image-skill 0.1.30 → 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 +18 -0
- package/bin/image-skill.mjs +140 -28
- 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.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
|
+
|
|
16
|
+
## 0.1.31 - 2026-06-03
|
|
17
|
+
|
|
18
|
+
- Fix (guide): public `create --guide` copyable commands now preserve
|
|
19
|
+
`IMAGE_SKILL_CONFIG_PATH` when an agent uses a non-default config path, and
|
|
20
|
+
blocked-config recovery commands switch to the local writable fallback in the
|
|
21
|
+
emitted `npx image-skill@latest` command. Auth signup, rerun, escape hatch,
|
|
22
|
+
ready dry-run/create, and self-fund quote/buy/status commands all keep the
|
|
23
|
+
same config context so fresh tool processes do not silently lose auth.
|
|
24
|
+
|
|
7
25
|
## 0.1.30 - 2026-06-03
|
|
8
26
|
|
|
9
27
|
- Fix (provenance): replace the stale version-stamped "Current Published
|
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,
|
|
@@ -1472,6 +1474,16 @@ async function createGuide(args) {
|
|
|
1472
1474
|
});
|
|
1473
1475
|
const authConfigWrite =
|
|
1474
1476
|
stage === "auth_required" ? await probeConfigWritable() : null;
|
|
1477
|
+
const guideCommandPrefix = createGuideCommandPrefix({
|
|
1478
|
+
configPath:
|
|
1479
|
+
authConfigWrite?.ok === false
|
|
1480
|
+
? LOCAL_WRITABLE_CONFIG_PATH
|
|
1481
|
+
: configuredImageSkillConfigPath(),
|
|
1482
|
+
});
|
|
1483
|
+
const paymentSummary = createGuidePaymentSummary(
|
|
1484
|
+
payments.envelope.data,
|
|
1485
|
+
guideCommandPrefix,
|
|
1486
|
+
);
|
|
1475
1487
|
const blocker = createGuideBlocker(stage, {
|
|
1476
1488
|
requestedModelId,
|
|
1477
1489
|
quota,
|
|
@@ -1486,7 +1498,7 @@ async function createGuide(args) {
|
|
|
1486
1498
|
aspectRatio: selectedAspectRatio,
|
|
1487
1499
|
apiBaseUrl: explicitApiBaseUrl(args),
|
|
1488
1500
|
paymentSummary,
|
|
1489
|
-
commandPrefix:
|
|
1501
|
+
commandPrefix: guideCommandPrefix,
|
|
1490
1502
|
authConfigWritable: authConfigWrite?.ok ?? true,
|
|
1491
1503
|
});
|
|
1492
1504
|
const escapeHatches = createGuideEscapeHatches({
|
|
@@ -1497,7 +1509,7 @@ async function createGuide(args) {
|
|
|
1497
1509
|
budgetGuard,
|
|
1498
1510
|
aspectRatio: selectedAspectRatio,
|
|
1499
1511
|
apiBaseUrl: explicitApiBaseUrl(args),
|
|
1500
|
-
commandPrefix:
|
|
1512
|
+
commandPrefix: guideCommandPrefix,
|
|
1501
1513
|
});
|
|
1502
1514
|
const nextCommandEffect = createGuideNextCommandEffect(stage, {
|
|
1503
1515
|
estimatedCredits,
|
|
@@ -1532,7 +1544,7 @@ async function createGuide(args) {
|
|
|
1532
1544
|
? renderGuideCommand(
|
|
1533
1545
|
trimmedPrompt,
|
|
1534
1546
|
explicitApiBaseUrl(args),
|
|
1535
|
-
|
|
1547
|
+
guideCommandPrefix,
|
|
1536
1548
|
)
|
|
1537
1549
|
: null;
|
|
1538
1550
|
const authHandoff = createGuideAuthHandoff(stage, {
|
|
@@ -1551,6 +1563,7 @@ async function createGuide(args) {
|
|
|
1551
1563
|
nextCommand,
|
|
1552
1564
|
afterNext,
|
|
1553
1565
|
tokenSource: publicTokenSource,
|
|
1566
|
+
commandPrefix: guideCommandPrefix,
|
|
1554
1567
|
});
|
|
1555
1568
|
return createGuideSuccess(quota?.envelope.actor ?? null, {
|
|
1556
1569
|
schema: "image-skill.create-guide.v1",
|
|
@@ -1868,7 +1881,7 @@ function createGuideSelectionReason(model, prompt, intent) {
|
|
|
1868
1881
|
return "guide selected the first available executable create model";
|
|
1869
1882
|
}
|
|
1870
1883
|
|
|
1871
|
-
function createGuidePaymentSummary(data) {
|
|
1884
|
+
function createGuidePaymentSummary(data, commandPrefix) {
|
|
1872
1885
|
const methods = Array.isArray(data?.methods)
|
|
1873
1886
|
? data.methods.filter((method) => method.live_money)
|
|
1874
1887
|
: [];
|
|
@@ -1926,6 +1939,7 @@ function createGuidePaymentSummary(data) {
|
|
|
1926
1939
|
suggested_commands: createGuidePaymentCommands(
|
|
1927
1940
|
preferredMethod,
|
|
1928
1941
|
availableMethods.filter((method) => method !== preferredMethod),
|
|
1942
|
+
commandPrefix,
|
|
1929
1943
|
),
|
|
1930
1944
|
};
|
|
1931
1945
|
}
|
|
@@ -1988,7 +2002,11 @@ function createGuidePreferredPaymentSummary(method) {
|
|
|
1988
2002
|
};
|
|
1989
2003
|
}
|
|
1990
2004
|
|
|
1991
|
-
function createGuidePaymentCommands(
|
|
2005
|
+
function createGuidePaymentCommands(
|
|
2006
|
+
preferredMethod,
|
|
2007
|
+
fallbackMethods,
|
|
2008
|
+
commandPrefix,
|
|
2009
|
+
) {
|
|
1992
2010
|
const commands = [
|
|
1993
2011
|
"image-skill credits methods --json",
|
|
1994
2012
|
"image-skill credits packs list --json",
|
|
@@ -2010,7 +2028,68 @@ function createGuidePaymentCommands(preferredMethod, fallbackMethods) {
|
|
|
2010
2028
|
}
|
|
2011
2029
|
}
|
|
2012
2030
|
}
|
|
2013
|
-
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);
|
|
2014
2093
|
}
|
|
2015
2094
|
|
|
2016
2095
|
function createGuideStage(input) {
|
|
@@ -2500,11 +2579,9 @@ function createGuideNextCommand(stage, input) {
|
|
|
2500
2579
|
return renderGuideSignupCommand(input);
|
|
2501
2580
|
}
|
|
2502
2581
|
if (stage === "quota_required") {
|
|
2503
|
-
return
|
|
2504
|
-
input.
|
|
2505
|
-
|
|
2506
|
-
firstPaymentActionCommand(input.paymentSummary.suggested_commands),
|
|
2507
|
-
),
|
|
2582
|
+
return (
|
|
2583
|
+
firstPaymentActionCommand(input.paymentSummary.suggested_commands) ??
|
|
2584
|
+
renderGuidePrefixedCommand(input.commandPrefix, "credits methods --json")
|
|
2508
2585
|
);
|
|
2509
2586
|
}
|
|
2510
2587
|
if (createGuideSelectedModelRequiresInputImage(input.selected)) {
|
|
@@ -2598,13 +2675,7 @@ function renderGuideSignupCommand(input) {
|
|
|
2598
2675
|
: ["--api-base-url", shellQuote(input.apiBaseUrl)]),
|
|
2599
2676
|
"--json",
|
|
2600
2677
|
].join(" ");
|
|
2601
|
-
|
|
2602
|
-
input.commandPrefix,
|
|
2603
|
-
signupCommand,
|
|
2604
|
-
);
|
|
2605
|
-
return input.authConfigWritable === false
|
|
2606
|
-
? renderWritableConfigCommand(command)
|
|
2607
|
-
: command;
|
|
2678
|
+
return renderGuidePrefixedCommand(input.commandPrefix, signupCommand);
|
|
2608
2679
|
}
|
|
2609
2680
|
|
|
2610
2681
|
function renderTokenStdinCommand(command) {
|
|
@@ -2621,14 +2692,18 @@ function firstPaymentActionCommand(commands) {
|
|
|
2621
2692
|
);
|
|
2622
2693
|
}
|
|
2623
2694
|
|
|
2624
|
-
function guidePaymentCommandByKind(commands, kind) {
|
|
2695
|
+
function guidePaymentCommandByKind(commands, kind, commandPrefix = null) {
|
|
2625
2696
|
const pattern =
|
|
2626
2697
|
kind === "quote"
|
|
2627
2698
|
? /\bcredits\s+quote\b/
|
|
2628
2699
|
: kind === "buy"
|
|
2629
2700
|
? /\bcredits\s+buy\b/
|
|
2630
2701
|
: /\bcredits\s+status\b/;
|
|
2631
|
-
|
|
2702
|
+
const command = commands.find((candidate) => pattern.test(candidate)) ?? null;
|
|
2703
|
+
if (command === null || commandPrefix === null) {
|
|
2704
|
+
return command;
|
|
2705
|
+
}
|
|
2706
|
+
return renderGuidePrefixedCommand(commandPrefix, command);
|
|
2632
2707
|
}
|
|
2633
2708
|
|
|
2634
2709
|
function renderImageTo3dGuideCommand(input) {
|
|
@@ -2685,6 +2760,43 @@ function renderGuidePrefixedCommand(commandPrefix, command) {
|
|
|
2685
2760
|
return `${commandPrefix} ${stripImageSkillCommandPrefix(command)}`;
|
|
2686
2761
|
}
|
|
2687
2762
|
|
|
2763
|
+
function createGuideCommandPrefix(input = {}) {
|
|
2764
|
+
const configPath =
|
|
2765
|
+
input.configPath === undefined
|
|
2766
|
+
? configuredImageSkillConfigPath()
|
|
2767
|
+
: input.configPath;
|
|
2768
|
+
return renderShellEnvPrefixedCommand(
|
|
2769
|
+
{
|
|
2770
|
+
npm_config_update_notifier: "false",
|
|
2771
|
+
...(configPath === null ? {} : { IMAGE_SKILL_CONFIG_PATH: configPath }),
|
|
2772
|
+
},
|
|
2773
|
+
"npx -y image-skill@latest",
|
|
2774
|
+
);
|
|
2775
|
+
}
|
|
2776
|
+
|
|
2777
|
+
function configuredImageSkillConfigPath() {
|
|
2778
|
+
const configPath = process.env.IMAGE_SKILL_CONFIG_PATH;
|
|
2779
|
+
return typeof configPath === "string" && configPath.length > 0
|
|
2780
|
+
? configPath
|
|
2781
|
+
: null;
|
|
2782
|
+
}
|
|
2783
|
+
|
|
2784
|
+
function renderShellEnvPrefixedCommand(env, command) {
|
|
2785
|
+
const assignments = Object.entries(env).map(
|
|
2786
|
+
([name, value]) => `${name}=${shellEnvAssignmentValue(name, value)}`,
|
|
2787
|
+
);
|
|
2788
|
+
return assignments.length === 0
|
|
2789
|
+
? command
|
|
2790
|
+
: `${assignments.join(" ")} ${command}`;
|
|
2791
|
+
}
|
|
2792
|
+
|
|
2793
|
+
function shellEnvAssignmentValue(name, value) {
|
|
2794
|
+
if (name.startsWith("npm_config_") && /^(?:true|false|\d+)$/.test(value)) {
|
|
2795
|
+
return value;
|
|
2796
|
+
}
|
|
2797
|
+
return shellQuote(value);
|
|
2798
|
+
}
|
|
2799
|
+
|
|
2688
2800
|
function renderWritableConfigCommand(command) {
|
|
2689
2801
|
return `IMAGE_SKILL_CONFIG_PATH="${LOCAL_WRITABLE_CONFIG_PATH}" ${command}`;
|
|
2690
2802
|
}
|
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,
|