image-skill 0.1.60 → 0.1.61
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 +118 -3
- package/cli.md +28 -0
- package/package.json +1 -1
- package/skills/image-skill/references/cli.md +28 -0
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.61 - 2026-06-17
|
|
8
|
+
|
|
9
|
+
- Release (activation/self-fund): add payment-attempt continuation actions.
|
|
10
|
+
`credits status --quote-id ...` now repeats the exact
|
|
11
|
+
`data.next_actions.recommended_buy` command for open x402/Checkout quotes,
|
|
12
|
+
and Stripe x402 buy/status responses expose
|
|
13
|
+
`data.next_actions.recommended_settlement` with exact payable-instruction
|
|
14
|
+
paths, status/quota commands, and wallet-settlement safety flags.
|
|
15
|
+
|
|
7
16
|
## 0.1.60 - 2026-06-17
|
|
8
17
|
|
|
9
18
|
- Release (activation/self-fund): add `credits quote --json`
|
package/bin/image-skill.mjs
CHANGED
|
@@ -15,7 +15,7 @@ import { Readable } from "node:stream";
|
|
|
15
15
|
import { pipeline } from "node:stream/promises";
|
|
16
16
|
import os from "node:os";
|
|
17
17
|
|
|
18
|
-
const VERSION = "0.1.
|
|
18
|
+
const VERSION = "0.1.61";
|
|
19
19
|
const PACKAGE_NAME = "image-skill";
|
|
20
20
|
const DEFAULT_API_BASE_URL = "https://api.image-skill.com";
|
|
21
21
|
const DEFAULT_DOCS_BASE_URL = "https://image-skill.com";
|
|
@@ -1296,7 +1296,10 @@ async function credits(argv) {
|
|
|
1296
1296
|
idempotency_key: idempotency.value,
|
|
1297
1297
|
},
|
|
1298
1298
|
});
|
|
1299
|
-
return
|
|
1299
|
+
return withCopyRunnablePaymentNextActionCommands(
|
|
1300
|
+
withStripeCheckoutCopyFallback(result),
|
|
1301
|
+
createGuideCommandPrefix(),
|
|
1302
|
+
);
|
|
1300
1303
|
}
|
|
1301
1304
|
if (subcommand === "status") {
|
|
1302
1305
|
const args = parseArgs(rest);
|
|
@@ -1316,7 +1319,10 @@ async function credits(argv) {
|
|
|
1316
1319
|
path: `/v1/credit-purchases/status?${query.toString()}`,
|
|
1317
1320
|
token: token.token,
|
|
1318
1321
|
});
|
|
1319
|
-
return
|
|
1322
|
+
return withCopyRunnablePaymentNextActionCommands(
|
|
1323
|
+
withStripeCheckoutCopyFallback(result),
|
|
1324
|
+
createGuideCommandPrefix(),
|
|
1325
|
+
);
|
|
1320
1326
|
}
|
|
1321
1327
|
return invalid(
|
|
1322
1328
|
"image-skill credits",
|
|
@@ -2781,6 +2787,115 @@ function withCopyRunnableCreditQuoteCommands(result, commandPrefix) {
|
|
|
2781
2787
|
};
|
|
2782
2788
|
}
|
|
2783
2789
|
|
|
2790
|
+
function withCopyRunnablePaymentNextActionCommands(result, commandPrefix) {
|
|
2791
|
+
const data = result.envelope.data;
|
|
2792
|
+
if (
|
|
2793
|
+
!result.envelope.ok ||
|
|
2794
|
+
data === null ||
|
|
2795
|
+
typeof data !== "object" ||
|
|
2796
|
+
Array.isArray(data)
|
|
2797
|
+
) {
|
|
2798
|
+
return result;
|
|
2799
|
+
}
|
|
2800
|
+
const updated = paymentNextActionsWithCopyRunnableCommands(
|
|
2801
|
+
data,
|
|
2802
|
+
commandPrefix,
|
|
2803
|
+
);
|
|
2804
|
+
if (updated === data) {
|
|
2805
|
+
return result;
|
|
2806
|
+
}
|
|
2807
|
+
return {
|
|
2808
|
+
...result,
|
|
2809
|
+
envelope: {
|
|
2810
|
+
...result.envelope,
|
|
2811
|
+
data: updated,
|
|
2812
|
+
},
|
|
2813
|
+
};
|
|
2814
|
+
}
|
|
2815
|
+
|
|
2816
|
+
function paymentNextActionsWithCopyRunnableCommands(data, commandPrefix) {
|
|
2817
|
+
if (
|
|
2818
|
+
data.next_actions === null ||
|
|
2819
|
+
typeof data.next_actions !== "object" ||
|
|
2820
|
+
Array.isArray(data.next_actions)
|
|
2821
|
+
) {
|
|
2822
|
+
return data;
|
|
2823
|
+
}
|
|
2824
|
+
let changed = false;
|
|
2825
|
+
const nextActions = { ...data.next_actions };
|
|
2826
|
+
|
|
2827
|
+
if (
|
|
2828
|
+
nextActions.recommended_buy !== null &&
|
|
2829
|
+
typeof nextActions.recommended_buy === "object" &&
|
|
2830
|
+
!Array.isArray(nextActions.recommended_buy)
|
|
2831
|
+
) {
|
|
2832
|
+
const recommendedBuy = { ...nextActions.recommended_buy };
|
|
2833
|
+
changed =
|
|
2834
|
+
renderPaymentActionCommandField(
|
|
2835
|
+
recommendedBuy,
|
|
2836
|
+
"command",
|
|
2837
|
+
commandPrefix,
|
|
2838
|
+
) || changed;
|
|
2839
|
+
changed =
|
|
2840
|
+
renderPaymentActionCommandField(
|
|
2841
|
+
recommendedBuy,
|
|
2842
|
+
"buy_command",
|
|
2843
|
+
commandPrefix,
|
|
2844
|
+
) || changed;
|
|
2845
|
+
changed =
|
|
2846
|
+
renderPaymentActionCommandField(
|
|
2847
|
+
recommendedBuy,
|
|
2848
|
+
"status_command",
|
|
2849
|
+
commandPrefix,
|
|
2850
|
+
) || changed;
|
|
2851
|
+
changed =
|
|
2852
|
+
renderPaymentActionCommandField(
|
|
2853
|
+
recommendedBuy,
|
|
2854
|
+
"status_command_after_payment",
|
|
2855
|
+
commandPrefix,
|
|
2856
|
+
) || changed;
|
|
2857
|
+
nextActions.recommended_buy = recommendedBuy;
|
|
2858
|
+
}
|
|
2859
|
+
|
|
2860
|
+
if (
|
|
2861
|
+
nextActions.recommended_settlement !== null &&
|
|
2862
|
+
typeof nextActions.recommended_settlement === "object" &&
|
|
2863
|
+
!Array.isArray(nextActions.recommended_settlement)
|
|
2864
|
+
) {
|
|
2865
|
+
const recommendedSettlement = { ...nextActions.recommended_settlement };
|
|
2866
|
+
changed =
|
|
2867
|
+
renderPaymentActionCommandField(
|
|
2868
|
+
recommendedSettlement,
|
|
2869
|
+
"status_command",
|
|
2870
|
+
commandPrefix,
|
|
2871
|
+
) || changed;
|
|
2872
|
+
changed =
|
|
2873
|
+
renderPaymentActionCommandField(
|
|
2874
|
+
recommendedSettlement,
|
|
2875
|
+
"quota_command",
|
|
2876
|
+
commandPrefix,
|
|
2877
|
+
) || changed;
|
|
2878
|
+
nextActions.recommended_settlement = recommendedSettlement;
|
|
2879
|
+
}
|
|
2880
|
+
|
|
2881
|
+
return changed ? { ...data, next_actions: nextActions } : data;
|
|
2882
|
+
}
|
|
2883
|
+
|
|
2884
|
+
function renderPaymentActionCommandField(record, field, commandPrefix) {
|
|
2885
|
+
if (typeof record[field] !== "string") {
|
|
2886
|
+
return false;
|
|
2887
|
+
}
|
|
2888
|
+
const rendered = renderCopyRunnablePaymentCommand(
|
|
2889
|
+
commandPrefix,
|
|
2890
|
+
record[field],
|
|
2891
|
+
);
|
|
2892
|
+
if (rendered === record[field]) {
|
|
2893
|
+
return false;
|
|
2894
|
+
}
|
|
2895
|
+
record[field] = rendered;
|
|
2896
|
+
return true;
|
|
2897
|
+
}
|
|
2898
|
+
|
|
2784
2899
|
function creditQuoteWithCopyRunnableCommands(quote, commandPrefix) {
|
|
2785
2900
|
const recommendedBuy =
|
|
2786
2901
|
quote.next_actions?.recommended_buy !== null &&
|
package/cli.md
CHANGED
|
@@ -665,6 +665,12 @@ Use `data.next_actions.recommended_buy.status_command` to inspect the quote or
|
|
|
665
665
|
payment state by `quote_id`; after buy returns a `payment_attempt_id`, prefer
|
|
666
666
|
`status_command_after_payment`.
|
|
667
667
|
|
|
668
|
+
When `credits status --quote-id quote_... --json` sees an open
|
|
669
|
+
`stripe_x402.exact.usdc` or `stripe_checkout` quote, it repeats the exact
|
|
670
|
+
`data.next_actions.recommended_buy` command with the real `quote_id` and
|
|
671
|
+
`purchase:quote_...` idempotency key so agents do not need to reconstruct the
|
|
672
|
+
buy step from placeholders.
|
|
673
|
+
|
|
668
674
|
Hosted API equivalent:
|
|
669
675
|
|
|
670
676
|
```bash
|
|
@@ -743,6 +749,22 @@ Minimum x402 action-required data:
|
|
|
743
749
|
"client_secret": "[redacted-stripe-client-secret]"
|
|
744
750
|
}
|
|
745
751
|
},
|
|
752
|
+
"next_actions": {
|
|
753
|
+
"recommended_settlement": {
|
|
754
|
+
"purpose": "settle_stripe_x402_credit_top_up",
|
|
755
|
+
"quote_id": "quote_...",
|
|
756
|
+
"payment_attempt_id": "payatt_...",
|
|
757
|
+
"method_id": "stripe_x402.exact.usdc",
|
|
758
|
+
"payable_instructions_path": "data.stripe_x402.payable_instructions",
|
|
759
|
+
"status_command": "image-skill credits status --payment-attempt-id payatt_... --json",
|
|
760
|
+
"quota_command": "image-skill usage quota --json",
|
|
761
|
+
"command_effect": {
|
|
762
|
+
"wallet_settlement": true,
|
|
763
|
+
"credit_debit": false,
|
|
764
|
+
"media_write": false
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
},
|
|
746
768
|
"next": {
|
|
747
769
|
"agent_action": "pay_stripe_crypto_deposit",
|
|
748
770
|
"suggested_commands": [
|
|
@@ -842,6 +864,12 @@ At most one reference flag is allowed: `--quote-id`,
|
|
|
842
864
|
`--payment-attempt-id`, `--checkout-session-id`, or `--receipt-id`. Passing no
|
|
843
865
|
reference returns the balance/quota state.
|
|
844
866
|
|
|
867
|
+
For Stripe x402 attempts that are still `action_required`, status responses
|
|
868
|
+
include `data.next_actions.recommended_settlement` with the same exact Base/USDC
|
|
869
|
+
payable instructions, a copy-runnable status command for the real
|
|
870
|
+
`payment_attempt_id`, and explicit effect flags showing this is wallet
|
|
871
|
+
settlement, not credit debit, media write, or provider generation work.
|
|
872
|
+
|
|
845
873
|
Minimum action-required data:
|
|
846
874
|
|
|
847
875
|
```json
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "image-skill",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.61",
|
|
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,
|
|
@@ -665,6 +665,12 @@ Use `data.next_actions.recommended_buy.status_command` to inspect the quote or
|
|
|
665
665
|
payment state by `quote_id`; after buy returns a `payment_attempt_id`, prefer
|
|
666
666
|
`status_command_after_payment`.
|
|
667
667
|
|
|
668
|
+
When `credits status --quote-id quote_... --json` sees an open
|
|
669
|
+
`stripe_x402.exact.usdc` or `stripe_checkout` quote, it repeats the exact
|
|
670
|
+
`data.next_actions.recommended_buy` command with the real `quote_id` and
|
|
671
|
+
`purchase:quote_...` idempotency key so agents do not need to reconstruct the
|
|
672
|
+
buy step from placeholders.
|
|
673
|
+
|
|
668
674
|
Hosted API equivalent:
|
|
669
675
|
|
|
670
676
|
```bash
|
|
@@ -743,6 +749,22 @@ Minimum x402 action-required data:
|
|
|
743
749
|
"client_secret": "[redacted-stripe-client-secret]"
|
|
744
750
|
}
|
|
745
751
|
},
|
|
752
|
+
"next_actions": {
|
|
753
|
+
"recommended_settlement": {
|
|
754
|
+
"purpose": "settle_stripe_x402_credit_top_up",
|
|
755
|
+
"quote_id": "quote_...",
|
|
756
|
+
"payment_attempt_id": "payatt_...",
|
|
757
|
+
"method_id": "stripe_x402.exact.usdc",
|
|
758
|
+
"payable_instructions_path": "data.stripe_x402.payable_instructions",
|
|
759
|
+
"status_command": "image-skill credits status --payment-attempt-id payatt_... --json",
|
|
760
|
+
"quota_command": "image-skill usage quota --json",
|
|
761
|
+
"command_effect": {
|
|
762
|
+
"wallet_settlement": true,
|
|
763
|
+
"credit_debit": false,
|
|
764
|
+
"media_write": false
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
},
|
|
746
768
|
"next": {
|
|
747
769
|
"agent_action": "pay_stripe_crypto_deposit",
|
|
748
770
|
"suggested_commands": [
|
|
@@ -842,6 +864,12 @@ At most one reference flag is allowed: `--quote-id`,
|
|
|
842
864
|
`--payment-attempt-id`, `--checkout-session-id`, or `--receipt-id`. Passing no
|
|
843
865
|
reference returns the balance/quota state.
|
|
844
866
|
|
|
867
|
+
For Stripe x402 attempts that are still `action_required`, status responses
|
|
868
|
+
include `data.next_actions.recommended_settlement` with the same exact Base/USDC
|
|
869
|
+
payable instructions, a copy-runnable status command for the real
|
|
870
|
+
`payment_attempt_id`, and explicit effect flags showing this is wallet
|
|
871
|
+
settlement, not credit debit, media write, or provider generation work.
|
|
872
|
+
|
|
845
873
|
Minimum action-required data:
|
|
846
874
|
|
|
847
875
|
```json
|