image-skill 0.1.30 → 0.1.31

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 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.31 - 2026-06-03
8
+
9
+ - Fix (guide): public `create --guide` copyable commands now preserve
10
+ `IMAGE_SKILL_CONFIG_PATH` when an agent uses a non-default config path, and
11
+ blocked-config recovery commands switch to the local writable fallback in the
12
+ emitted `npx image-skill@latest` command. Auth signup, rerun, escape hatch,
13
+ ready dry-run/create, and self-fund quote/buy/status commands all keep the
14
+ same config context so fresh tool processes do not silently lose auth.
15
+
7
16
  ## 0.1.30 - 2026-06-03
8
17
 
9
18
  - Fix (provenance): replace the stale version-stamped "Current Published
@@ -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.30";
10
+ const VERSION = "0.1.31";
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";
@@ -1472,6 +1472,12 @@ async function createGuide(args) {
1472
1472
  });
1473
1473
  const authConfigWrite =
1474
1474
  stage === "auth_required" ? await probeConfigWritable() : null;
1475
+ const guideCommandPrefix = createGuideCommandPrefix({
1476
+ configPath:
1477
+ authConfigWrite?.ok === false
1478
+ ? LOCAL_WRITABLE_CONFIG_PATH
1479
+ : configuredImageSkillConfigPath(),
1480
+ });
1475
1481
  const blocker = createGuideBlocker(stage, {
1476
1482
  requestedModelId,
1477
1483
  quota,
@@ -1486,7 +1492,7 @@ async function createGuide(args) {
1486
1492
  aspectRatio: selectedAspectRatio,
1487
1493
  apiBaseUrl: explicitApiBaseUrl(args),
1488
1494
  paymentSummary,
1489
- commandPrefix: PUBLIC_NPX_COMMAND_PREFIX,
1495
+ commandPrefix: guideCommandPrefix,
1490
1496
  authConfigWritable: authConfigWrite?.ok ?? true,
1491
1497
  });
1492
1498
  const escapeHatches = createGuideEscapeHatches({
@@ -1497,7 +1503,7 @@ async function createGuide(args) {
1497
1503
  budgetGuard,
1498
1504
  aspectRatio: selectedAspectRatio,
1499
1505
  apiBaseUrl: explicitApiBaseUrl(args),
1500
- commandPrefix: PUBLIC_NPX_COMMAND_PREFIX,
1506
+ commandPrefix: guideCommandPrefix,
1501
1507
  });
1502
1508
  const nextCommandEffect = createGuideNextCommandEffect(stage, {
1503
1509
  estimatedCredits,
@@ -1532,7 +1538,7 @@ async function createGuide(args) {
1532
1538
  ? renderGuideCommand(
1533
1539
  trimmedPrompt,
1534
1540
  explicitApiBaseUrl(args),
1535
- PUBLIC_NPX_COMMAND_PREFIX,
1541
+ guideCommandPrefix,
1536
1542
  )
1537
1543
  : null;
1538
1544
  const authHandoff = createGuideAuthHandoff(stage, {
@@ -1551,6 +1557,7 @@ async function createGuide(args) {
1551
1557
  nextCommand,
1552
1558
  afterNext,
1553
1559
  tokenSource: publicTokenSource,
1560
+ commandPrefix: guideCommandPrefix,
1554
1561
  });
1555
1562
  return createGuideSuccess(quota?.envelope.actor ?? null, {
1556
1563
  schema: "image-skill.create-guide.v1",
@@ -2210,6 +2217,7 @@ function createGuideSelfFundHandoff(stage, input) {
2210
2217
  const statusCommand = guidePaymentCommandByKind(
2211
2218
  input.paymentSummary.suggested_commands,
2212
2219
  "status",
2220
+ input.commandPrefix,
2213
2221
  );
2214
2222
 
2215
2223
  return {
@@ -2226,10 +2234,12 @@ function createGuideSelfFundHandoff(stage, input) {
2226
2234
  quote: guidePaymentCommandByKind(
2227
2235
  input.paymentSummary.suggested_commands,
2228
2236
  "quote",
2237
+ input.commandPrefix,
2229
2238
  ),
2230
2239
  buy: guidePaymentCommandByKind(
2231
2240
  input.paymentSummary.suggested_commands,
2232
2241
  "buy",
2242
+ input.commandPrefix,
2233
2243
  ),
2234
2244
  status: statusCommand,
2235
2245
  },
@@ -2598,13 +2608,7 @@ function renderGuideSignupCommand(input) {
2598
2608
  : ["--api-base-url", shellQuote(input.apiBaseUrl)]),
2599
2609
  "--json",
2600
2610
  ].join(" ");
2601
- const command = renderGuidePrefixedCommand(
2602
- input.commandPrefix,
2603
- signupCommand,
2604
- );
2605
- return input.authConfigWritable === false
2606
- ? renderWritableConfigCommand(command)
2607
- : command;
2611
+ return renderGuidePrefixedCommand(input.commandPrefix, signupCommand);
2608
2612
  }
2609
2613
 
2610
2614
  function renderTokenStdinCommand(command) {
@@ -2621,14 +2625,18 @@ function firstPaymentActionCommand(commands) {
2621
2625
  );
2622
2626
  }
2623
2627
 
2624
- function guidePaymentCommandByKind(commands, kind) {
2628
+ function guidePaymentCommandByKind(commands, kind, commandPrefix = null) {
2625
2629
  const pattern =
2626
2630
  kind === "quote"
2627
2631
  ? /\bcredits\s+quote\b/
2628
2632
  : kind === "buy"
2629
2633
  ? /\bcredits\s+buy\b/
2630
2634
  : /\bcredits\s+status\b/;
2631
- return commands.find((command) => pattern.test(command)) ?? null;
2635
+ const command = commands.find((candidate) => pattern.test(candidate)) ?? null;
2636
+ if (command === null || commandPrefix === null) {
2637
+ return command;
2638
+ }
2639
+ return renderGuidePrefixedCommand(commandPrefix, command);
2632
2640
  }
2633
2641
 
2634
2642
  function renderImageTo3dGuideCommand(input) {
@@ -2685,6 +2693,43 @@ function renderGuidePrefixedCommand(commandPrefix, command) {
2685
2693
  return `${commandPrefix} ${stripImageSkillCommandPrefix(command)}`;
2686
2694
  }
2687
2695
 
2696
+ function createGuideCommandPrefix(input = {}) {
2697
+ const configPath =
2698
+ input.configPath === undefined
2699
+ ? configuredImageSkillConfigPath()
2700
+ : input.configPath;
2701
+ return renderShellEnvPrefixedCommand(
2702
+ {
2703
+ npm_config_update_notifier: "false",
2704
+ ...(configPath === null ? {} : { IMAGE_SKILL_CONFIG_PATH: configPath }),
2705
+ },
2706
+ "npx -y image-skill@latest",
2707
+ );
2708
+ }
2709
+
2710
+ function configuredImageSkillConfigPath() {
2711
+ const configPath = process.env.IMAGE_SKILL_CONFIG_PATH;
2712
+ return typeof configPath === "string" && configPath.length > 0
2713
+ ? configPath
2714
+ : null;
2715
+ }
2716
+
2717
+ function renderShellEnvPrefixedCommand(env, command) {
2718
+ const assignments = Object.entries(env).map(
2719
+ ([name, value]) => `${name}=${shellEnvAssignmentValue(name, value)}`,
2720
+ );
2721
+ return assignments.length === 0
2722
+ ? command
2723
+ : `${assignments.join(" ")} ${command}`;
2724
+ }
2725
+
2726
+ function shellEnvAssignmentValue(name, value) {
2727
+ if (name.startsWith("npm_config_") && /^(?:true|false|\d+)$/.test(value)) {
2728
+ return value;
2729
+ }
2730
+ return shellQuote(value);
2731
+ }
2732
+
2688
2733
  function renderWritableConfigCommand(command) {
2689
2734
  return `IMAGE_SKILL_CONFIG_PATH="${LOCAL_WRITABLE_CONFIG_PATH}" ${command}`;
2690
2735
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "image-skill",
3
- "version": "0.1.30",
3
+ "version": "0.1.31",
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,