image-skill 0.1.29 → 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,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.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
+
16
+ ## 0.1.30 - 2026-06-03
17
+
18
+ - Fix (provenance): replace the stale version-stamped "Current Published
19
+ Package" evidence with live npm metadata commands so agents verify the
20
+ package they are actually running instead of trusting a doc that can age
21
+ between releases.
22
+ - Fix (security): remove the hard-coded current attestation URL and keep the
23
+ registry attestation check parameterized by package version.
24
+
7
25
  ## 0.1.29 - 2026-06-03
8
26
 
9
27
  - Fix (self-fund): public `credits quote` now requires an explicit
package/PROVENANCE.md CHANGED
@@ -60,26 +60,29 @@ credits.
60
60
  The package should contain only the public CLI, public contracts, changelog,
61
61
  provenance note, and package metadata.
62
62
 
63
- ## Current Published Package
63
+ ## Latest Release Evidence
64
64
 
65
- `image-skill@0.1.15` (published 2026-05-31) was published from public repo
66
- commit `fc136fe84431ad145379fc8639ba9e1480f54442`.
65
+ Do not trust this file to name the current package after future publishes. npm
66
+ metadata is the release evidence. For the current dist-tag, run:
67
67
 
68
- Release evidence:
68
+ ```bash
69
+ npm view image-skill@latest version gitHead time.modified dist.integrity dist.tarball dist.attestations.url repository.url --json
70
+ ```
71
+
72
+ For a pinned package, replace `latest` with the exact version:
73
+
74
+ ```bash
75
+ npm view image-skill@VERSION version gitHead time.modified dist.integrity dist.tarball dist.attestations.url repository.url --json
76
+ ```
69
77
 
70
- - npm package: `image-skill@0.1.15`
71
- - npm tarball:
72
- `https://registry.npmjs.org/image-skill/-/image-skill-0.1.15.tgz`
73
- - npm integrity:
74
- `sha512-U8BkskNDnH3fDP1V4sV+rzRm9BnUx1Xl1M2kahNBfo8yaehk9BykI+ts5DBDuf+C2WToWLHds6ln+zNHAceXlw==`
75
- - npm attestation URL:
76
- `https://registry.npmjs.org/-/npm/v1/attestations/image-skill@0.1.15`
78
+ Use the returned `gitHead` as the public mirror commit, `dist.integrity` as the
79
+ tarball integrity, and `dist.attestations.url` as the registry provenance URL.
77
80
 
78
81
  Dispute-evidence summary (for any false-positive supply-chain flag): zero
79
- dependencies, `npm audit` = 0 vulnerabilities, MIT licensed, published via
80
- GitHub Actions npm OIDC trusted publishing (no long-lived token), with two live
81
- registry attestations (`github/npm publish v0.1` and
82
- `https://slsa.dev/provenance/v1`).
82
+ dependencies, `npm audit` = 0 vulnerabilities, MIT licensed, and published via
83
+ GitHub Actions npm OIDC trusted publishing (no long-lived token). Published
84
+ packages should expose npm registry attestations, including
85
+ `github/npm publish v0.1` and `https://slsa.dev/provenance/v1`.
83
86
 
84
87
  ## Trust Rules For Agents
85
88
 
package/SECURITY.md CHANGED
@@ -34,8 +34,11 @@ Attestations are also served directly by the registry:
34
34
  https://registry.npmjs.org/-/npm/v1/attestations/image-skill@VERSION
35
35
  ```
36
36
 
37
- For the current release that is
38
- `https://registry.npmjs.org/-/npm/v1/attestations/image-skill@0.1.15`.
37
+ For the current dist-tag, read the live attestation URL from npm metadata:
38
+
39
+ ```bash
40
+ npm view image-skill@latest dist.attestations.url --json
41
+ ```
39
42
 
40
43
  For an agent-readable trust packet that combines npm metadata, hosted contract
41
44
  hashes, API health, model availability, and safe commands, run:
@@ -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.29";
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.29",
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,