image-skill 0.1.59 → 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 +18 -0
- package/SKILL.md +7 -0
- package/bin/image-skill.mjs +189 -4
- package/cli.md +64 -3
- package/llms.txt +2 -2
- package/package.json +1 -1
- package/skill.md +7 -0
- package/skills/image-skill/SKILL.md +7 -0
- package/skills/image-skill/references/cli.md +64 -3
- package/skills/image-skill/references/llms.txt +2 -2
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.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
|
+
|
|
16
|
+
## 0.1.60 - 2026-06-17
|
|
17
|
+
|
|
18
|
+
- Release (activation/self-fund): add `credits quote --json`
|
|
19
|
+
`data.next_actions.recommended_buy`, carrying the returned `quote_id`, a
|
|
20
|
+
stable purchase idempotency key, copy-runnable buy/status commands, and
|
|
21
|
+
explicit live-money payment-attempt safety fields. Quote remains no-credit
|
|
22
|
+
and no-media; buy still requires delegated spend and verified
|
|
23
|
+
settlement/webhook fulfillment before credits are granted.
|
|
24
|
+
|
|
7
25
|
## 0.1.59 - 2026-06-17
|
|
8
26
|
|
|
9
27
|
- Release (activation/self-fund): add
|
package/SKILL.md
CHANGED
|
@@ -178,6 +178,13 @@ that action's `command` as the next authenticated quote step. It is the ranked
|
|
|
178
178
|
handoff to the best currently usable rail. The quote command creates a
|
|
179
179
|
live-money payment object but does not move money, grant credits, debit
|
|
180
180
|
credits, call a provider, or write media.
|
|
181
|
+
After the quote succeeds, prefer
|
|
182
|
+
`data.next_actions.recommended_buy.command`: it includes the returned
|
|
183
|
+
`quote_id` and a stable non-secret purchase idempotency key. For x402 this
|
|
184
|
+
creates the browserless deposit attempt whose response contains pay-to
|
|
185
|
+
instructions; for Checkout this creates the human handoff URL. Use the quote
|
|
186
|
+
response's `status_command` to inspect by `quote_id`, and after buy returns a
|
|
187
|
+
`payment_attempt_id`, prefer `status_command_after_payment`.
|
|
181
188
|
|
|
182
189
|
Credits are not granted until verified settlement or webhook fulfillment succeeds in either rail. Operator-provided promotion codes are entered on Stripe-hosted Checkout, not in the CLI. For exact bounded budgets, keep the same rail choice: use `credits quote --credits CREDITS --payment-method stripe_x402.exact.usdc` when the method is agent-settleable, and use `--payment-method stripe_checkout` only for a human Checkout fallback.
|
|
183
190
|
|
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";
|
|
@@ -1241,7 +1241,10 @@ async function credits(argv) {
|
|
|
1241
1241
|
`generated idempotency key ${idempotency.value}; pass --idempotency-key for stable retries`,
|
|
1242
1242
|
);
|
|
1243
1243
|
}
|
|
1244
|
-
return
|
|
1244
|
+
return withCopyRunnableCreditQuoteCommands(
|
|
1245
|
+
result,
|
|
1246
|
+
createGuideCommandPrefix(),
|
|
1247
|
+
);
|
|
1245
1248
|
}
|
|
1246
1249
|
if (subcommand === "buy") {
|
|
1247
1250
|
const args = parseArgs(rest);
|
|
@@ -1293,7 +1296,10 @@ async function credits(argv) {
|
|
|
1293
1296
|
idempotency_key: idempotency.value,
|
|
1294
1297
|
},
|
|
1295
1298
|
});
|
|
1296
|
-
return
|
|
1299
|
+
return withCopyRunnablePaymentNextActionCommands(
|
|
1300
|
+
withStripeCheckoutCopyFallback(result),
|
|
1301
|
+
createGuideCommandPrefix(),
|
|
1302
|
+
);
|
|
1297
1303
|
}
|
|
1298
1304
|
if (subcommand === "status") {
|
|
1299
1305
|
const args = parseArgs(rest);
|
|
@@ -1313,7 +1319,10 @@ async function credits(argv) {
|
|
|
1313
1319
|
path: `/v1/credit-purchases/status?${query.toString()}`,
|
|
1314
1320
|
token: token.token,
|
|
1315
1321
|
});
|
|
1316
|
-
return
|
|
1322
|
+
return withCopyRunnablePaymentNextActionCommands(
|
|
1323
|
+
withStripeCheckoutCopyFallback(result),
|
|
1324
|
+
createGuideCommandPrefix(),
|
|
1325
|
+
);
|
|
1317
1326
|
}
|
|
1318
1327
|
return invalid(
|
|
1319
1328
|
"image-skill credits",
|
|
@@ -2759,6 +2768,182 @@ function paymentMethodCatalogWithCopyRunnableCommands(catalog, commandPrefix) {
|
|
|
2759
2768
|
};
|
|
2760
2769
|
}
|
|
2761
2770
|
|
|
2771
|
+
function withCopyRunnableCreditQuoteCommands(result, commandPrefix) {
|
|
2772
|
+
const data = result.envelope.data;
|
|
2773
|
+
if (
|
|
2774
|
+
data === null ||
|
|
2775
|
+
typeof data !== "object" ||
|
|
2776
|
+
data.next_actions === null ||
|
|
2777
|
+
typeof data.next_actions !== "object"
|
|
2778
|
+
) {
|
|
2779
|
+
return result;
|
|
2780
|
+
}
|
|
2781
|
+
return {
|
|
2782
|
+
...result,
|
|
2783
|
+
envelope: {
|
|
2784
|
+
...result.envelope,
|
|
2785
|
+
data: creditQuoteWithCopyRunnableCommands(data, commandPrefix),
|
|
2786
|
+
},
|
|
2787
|
+
};
|
|
2788
|
+
}
|
|
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
|
+
|
|
2899
|
+
function creditQuoteWithCopyRunnableCommands(quote, commandPrefix) {
|
|
2900
|
+
const recommendedBuy =
|
|
2901
|
+
quote.next_actions?.recommended_buy !== null &&
|
|
2902
|
+
typeof quote.next_actions?.recommended_buy === "object"
|
|
2903
|
+
? quote.next_actions.recommended_buy
|
|
2904
|
+
: null;
|
|
2905
|
+
if (recommendedBuy === null) {
|
|
2906
|
+
return quote;
|
|
2907
|
+
}
|
|
2908
|
+
return {
|
|
2909
|
+
...quote,
|
|
2910
|
+
next_actions: {
|
|
2911
|
+
...quote.next_actions,
|
|
2912
|
+
recommended_buy: {
|
|
2913
|
+
...recommendedBuy,
|
|
2914
|
+
command:
|
|
2915
|
+
typeof recommendedBuy.command === "string"
|
|
2916
|
+
? renderCopyRunnablePaymentCommand(
|
|
2917
|
+
commandPrefix,
|
|
2918
|
+
recommendedBuy.command,
|
|
2919
|
+
)
|
|
2920
|
+
: recommendedBuy.command,
|
|
2921
|
+
buy_command:
|
|
2922
|
+
typeof recommendedBuy.buy_command === "string"
|
|
2923
|
+
? renderCopyRunnablePaymentCommand(
|
|
2924
|
+
commandPrefix,
|
|
2925
|
+
recommendedBuy.buy_command,
|
|
2926
|
+
)
|
|
2927
|
+
: recommendedBuy.buy_command,
|
|
2928
|
+
status_command:
|
|
2929
|
+
typeof recommendedBuy.status_command === "string"
|
|
2930
|
+
? renderCopyRunnablePaymentCommand(
|
|
2931
|
+
commandPrefix,
|
|
2932
|
+
recommendedBuy.status_command,
|
|
2933
|
+
)
|
|
2934
|
+
: recommendedBuy.status_command,
|
|
2935
|
+
status_command_after_payment:
|
|
2936
|
+
typeof recommendedBuy.status_command_after_payment === "string"
|
|
2937
|
+
? renderCopyRunnablePaymentCommand(
|
|
2938
|
+
commandPrefix,
|
|
2939
|
+
recommendedBuy.status_command_after_payment,
|
|
2940
|
+
)
|
|
2941
|
+
: recommendedBuy.status_command_after_payment,
|
|
2942
|
+
},
|
|
2943
|
+
},
|
|
2944
|
+
};
|
|
2945
|
+
}
|
|
2946
|
+
|
|
2762
2947
|
function renderCopyRunnablePaymentCommand(commandPrefix, command) {
|
|
2763
2948
|
if (/\bnpx\s+(?:-y|--yes)\s+image-skill@latest\b/.test(command)) {
|
|
2764
2949
|
return command;
|
package/cli.md
CHANGED
|
@@ -623,14 +623,53 @@ Minimum success data:
|
|
|
623
623
|
"idempotency_key": "quote-run-001",
|
|
624
624
|
"pack_id": null,
|
|
625
625
|
"pack": null,
|
|
626
|
-
"live_money": true
|
|
626
|
+
"live_money": true,
|
|
627
|
+
"next_actions": {
|
|
628
|
+
"recommended_buy": {
|
|
629
|
+
"purpose": "complete_credit_top_up",
|
|
630
|
+
"recommendation_reason": "human_checkout_handoff",
|
|
631
|
+
"quote_id": "quote_...",
|
|
632
|
+
"method_id": "stripe_checkout",
|
|
633
|
+
"provider": "stripe",
|
|
634
|
+
"command": "image-skill credits buy --provider stripe --quote-id quote_... --idempotency-key purchase:quote_... --json",
|
|
635
|
+
"buy_command_copy_runnable": true,
|
|
636
|
+
"purchase_idempotency_key": "purchase:quote_...",
|
|
637
|
+
"status_command": "image-skill credits status --quote-id quote_... --json",
|
|
638
|
+
"status_command_copy_runnable": true,
|
|
639
|
+
"status_command_after_payment": "image-skill credits status --payment-attempt-id PAYMENT_ATTEMPT_ID --json",
|
|
640
|
+
"status_command_after_payment_copy_runnable": false,
|
|
641
|
+
"requires_auth": true,
|
|
642
|
+
"live_money": true,
|
|
643
|
+
"requires_browser": true,
|
|
644
|
+
"agent_settleable": false,
|
|
645
|
+
"human_handoff_required": true,
|
|
646
|
+
"command_effect": {
|
|
647
|
+
"label": "live_money_payment_attempt_requires_completion",
|
|
648
|
+
"no_spend": false,
|
|
649
|
+
"payment_attempt": true,
|
|
650
|
+
"credit_debit": false,
|
|
651
|
+
"media_write": false,
|
|
652
|
+
"wallet_settlement": false
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
}
|
|
627
656
|
}
|
|
628
657
|
```
|
|
629
658
|
|
|
630
659
|
For x402 quotes, `accepted_payment_method` is
|
|
631
660
|
`"stripe_x402.exact.usdc"`. The quote does not grant credits or include pay-to
|
|
632
|
-
instructions; `
|
|
633
|
-
|
|
661
|
+
instructions; `data.next_actions.recommended_buy.command` carries the returned
|
|
662
|
+
`quote_id` and a stable non-secret purchase idempotency key for the
|
|
663
|
+
action-required deposit attempt. Run it only when delegated spend is allowed.
|
|
664
|
+
Use `data.next_actions.recommended_buy.status_command` to inspect the quote or
|
|
665
|
+
payment state by `quote_id`; after buy returns a `payment_attempt_id`, prefer
|
|
666
|
+
`status_command_after_payment`.
|
|
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.
|
|
634
673
|
|
|
635
674
|
Hosted API equivalent:
|
|
636
675
|
|
|
@@ -710,6 +749,22 @@ Minimum x402 action-required data:
|
|
|
710
749
|
"client_secret": "[redacted-stripe-client-secret]"
|
|
711
750
|
}
|
|
712
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
|
+
},
|
|
713
768
|
"next": {
|
|
714
769
|
"agent_action": "pay_stripe_crypto_deposit",
|
|
715
770
|
"suggested_commands": [
|
|
@@ -809,6 +864,12 @@ At most one reference flag is allowed: `--quote-id`,
|
|
|
809
864
|
`--payment-attempt-id`, `--checkout-session-id`, or `--receipt-id`. Passing no
|
|
810
865
|
reference returns the balance/quota state.
|
|
811
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
|
+
|
|
812
873
|
Minimum action-required data:
|
|
813
874
|
|
|
814
875
|
```json
|
package/llms.txt
CHANGED
|
@@ -118,7 +118,7 @@ Hosted API endpoints:
|
|
|
118
118
|
- GET https://api.image-skill.com/v1/quota returns durable hosted quota for Authorization: Bearer TOKEN.
|
|
119
119
|
- GET https://api.image-skill.com/v1/payment-methods returns the no-auth action-only payment rail catalog. It tells agents which currently usable rails are available, whether live money can move, buyer modes (agent_only, hybrid, human_only), browser requirements, agent_initiated, agent_settleable, settlement_blocker, limits, endpoint paths, recovery commands, and data.next_actions.recommended_quote when a currently usable live rail can be quoted next. Planned, watch-only, fake, and private harness rails are intentionally omitted.
|
|
120
120
|
- GET https://api.image-skill.com/v1/credit-packs returns the public pack catalog. Recommended live-money packs include starter-500, builder-2000, and studio-5000. Packs are the default top-up UX; exact quotes remain supported for agents that already know the required credit budget.
|
|
121
|
-
- POST https://api.image-skill.com/v1/credit-quotes returns a credit quote for Authorization: Bearer TOKEN. Request JSON: either credits or pack_id, optional payment_method, idempotency_key. Use stripe_checkout for the human Checkout path. Use payment_method stripe_x402.exact.usdc only when credits methods returns it available/quoteable/purchasable/requires_browser:false; treat it as autonomous self-settlement only when agent_settleable:true is also returned. Response includes quote_id, credits, price_amount_cents, currency, accepted_payment_method, pack_id, pack, and
|
|
121
|
+
- POST https://api.image-skill.com/v1/credit-quotes returns a credit quote for Authorization: Bearer TOKEN. Request JSON: either credits or pack_id, optional payment_method, idempotency_key. Use stripe_checkout for the human Checkout path. Use payment_method stripe_x402.exact.usdc only when credits methods returns it available/quoteable/purchasable/requires_browser:false; treat it as autonomous self-settlement only when agent_settleable:true is also returned. Response includes quote_id, credits, price_amount_cents, currency, accepted_payment_method, pack_id, pack, live_money, and data.next_actions.recommended_buy for live public rails. The recommended buy action includes the real quote_id, a stable non-secret purchase_idempotency_key, a copy-runnable buy command, a quote-id status command, and a payment-attempt status template. One credit equals $0.01, so price_amount_cents equals credits. This does not grant credits.
|
|
122
122
|
- POST https://api.image-skill.com/v1/credit-purchases/stripe-x402-deposits creates a browserless action-required USDC deposit attempt for a stripe_x402.exact.usdc quote. Request JSON: quote_id, idempotency_key. Response includes state: action_required, payment_attempt_id, accepted_payment_method: stripe_x402.exact.usdc, live_money, amount_cents, stripe_x402 challenge metadata, stripe_x402.payable_instructions when Stripe returns a Base deposit address, and next.agent_action: pay_stripe_crypto_deposit. A wallet-equipped agent can pay the exact USDC token_amount_atomic to payable_instructions.deposit_address on Base. This does not grant credits; verified settlement/webhook fulfillment grants paid credits exactly once.
|
|
123
123
|
- POST https://api.image-skill.com/v1/credit-purchases/stripe-checkout-sessions creates a Stripe Checkout Session for a stripe_checkout quote. Request JSON: quote_id, idempotency_key. Response includes state: action_required, payment_attempt_id, checkout_session_id, checkout_handoff_url, checkout_compact_url, checkout_url, accepted_payment_method: stripe_checkout, and next.human_action: open_checkout_url. Present checkout_handoff_url to humans because it is short and redirects to Stripe; checkout_compact_url is also copy-safe when present. If no handoff URL is available, present the full checkout_url in a code block. Do not remove the Stripe # fragment; Checkout needs it in the browser. Stripe-hosted Checkout may accept operator-provided promotion codes; humans enter them on Stripe, not in the Image Skill CLI. This does not grant credits; verified Stripe webhook fulfillment grants paid credits exactly once.
|
|
124
124
|
- GET https://api.image-skill.com/v1/credit-purchases/status returns durable payment state for Authorization: Bearer TOKEN. Query with exactly one of quote_id, payment_attempt_id, checkout_session_id, or receipt_id. Response includes state, quote, payment_attempt, receipt, credit_event, provider_event, limits, and next.
|
|
@@ -196,7 +196,7 @@ Unclaimed agents may not:
|
|
|
196
196
|
- send card data, wallet secrets, wallet private keys, seed phrases, raw x402 payment headers, provider receipts, Stripe secrets, MPP tokens, SPTs, bearer tokens, or any payment credential to Image Skill; Stripe payment details must be entered only on Stripe-hosted checkout pages
|
|
197
197
|
|
|
198
198
|
Credits:
|
|
199
|
-
One Image Skill credit is $0.01. Use image-skill credits methods --json to inspect payment rail availability, browser/human requirements, agent_initiated, agent_settleable, and settlement_blocker. If data.next_actions.recommended_quote is present, prefer its command as the next authenticated quote step; it is a no-spend live-money quote object handoff and does not move money, grant credits, debit credits, call a provider, or write media. Always pass the returned payment method when quoting. When stripe_x402.exact.usdc is returned with available:true, quoteable:true, purchasable:true, requires_browser:false, and agent_settleable:true, image-skill credits quote --pack PACK_ID --payment-method stripe_x402.exact.usdc --json followed by
|
|
199
|
+
One Image Skill credit is $0.01. Use image-skill credits methods --json to inspect payment rail availability, browser/human requirements, agent_initiated, agent_settleable, and settlement_blocker. If data.next_actions.recommended_quote is present, prefer its command as the next authenticated quote step; it is a no-spend live-money quote object handoff and does not move money, grant credits, debit credits, call a provider, or write media. Always pass the returned payment method when quoting. After a successful public live-rail quote, prefer data.next_actions.recommended_buy.command: it includes the returned quote_id and a stable non-secret purchase idempotency key, and creates or replays the matching payment attempt. When stripe_x402.exact.usdc is returned with available:true, quoteable:true, purchasable:true, requires_browser:false, and agent_settleable:true, image-skill credits quote --pack PACK_ID --payment-method stripe_x402.exact.usdc --json followed by the quote response's recommended_buy.command creates a browserless live deposit attempt with stripe_x402.payable_instructions. Treat live_money:true as real spend, stay inside the delegated cap, and pay exactly token_amount_atomic USDC units to payable_instructions.deposit_address on Base only from a wallet substrate you control. Use image-skill credits quote --pack PACK_ID --payment-method stripe_checkout --json and the quote response's recommended_buy.command only for the Stripe Checkout human path; this returns checkout_handoff_url, copy-safe checkout_compact_url, and full Stripe checkout_url fallback and does not grant credits. Present checkout_handoff_url or checkout_compact_url to humans, especially in mobile terminals, SSH, or chat. If checkout_handoff_url is absent, present the full checkout_url in a code block and preserve the Stripe # fragment. Use image-skill credits status --quote-id QUOTE_ID --json before or after buy, and image-skill credits status --payment-attempt-id PAYMENT_ATTEMPT_ID --json after buy and after settlement/checkout completion to read state, receipt, credit_event, limits, and retry guidance. Create/edit debit model-priced credits after provider success; inspect models show and operation cost.credit_pricing for credits_required and pricing_confidence. Do not silently downgrade to the cheapest model to avoid payment when the user asked for quality or is willing to pay; quote the needed credits and use an agent_settleable:true x402 rail or Stripe Checkout fallback. Credits buy requires explicit --idempotency-key; recommended_buy.command supplies one generated from the quote id. Quote idempotency keys are scoped to the hosted agent identity and exact quote terms; the public CLI generates one when omitted and returns it in the quote response, while explicit keys remain available for retry-stable automation. Inspect error.recovery.suggested_command on CREDIT_QUOTE_CONFLICT. Never send payment credentials to Image Skill: no wallet private keys, seed phrases, x402 payment headers, deposit client secrets, provider receipts, card data, or Stripe secrets. Public request fields are credits, pack_id, payment_method, quote_id, status reference IDs, and idempotency_key.
|
|
200
200
|
|
|
201
201
|
Telemetry:
|
|
202
202
|
- command or endpoint name
|
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,
|
package/skill.md
CHANGED
|
@@ -178,6 +178,13 @@ that action's `command` as the next authenticated quote step. It is the ranked
|
|
|
178
178
|
handoff to the best currently usable rail. The quote command creates a
|
|
179
179
|
live-money payment object but does not move money, grant credits, debit
|
|
180
180
|
credits, call a provider, or write media.
|
|
181
|
+
After the quote succeeds, prefer
|
|
182
|
+
`data.next_actions.recommended_buy.command`: it includes the returned
|
|
183
|
+
`quote_id` and a stable non-secret purchase idempotency key. For x402 this
|
|
184
|
+
creates the browserless deposit attempt whose response contains pay-to
|
|
185
|
+
instructions; for Checkout this creates the human handoff URL. Use the quote
|
|
186
|
+
response's `status_command` to inspect by `quote_id`, and after buy returns a
|
|
187
|
+
`payment_attempt_id`, prefer `status_command_after_payment`.
|
|
181
188
|
|
|
182
189
|
Credits are not granted until verified settlement or webhook fulfillment succeeds in either rail. Operator-provided promotion codes are entered on Stripe-hosted Checkout, not in the CLI. For exact bounded budgets, keep the same rail choice: use `credits quote --credits CREDITS --payment-method stripe_x402.exact.usdc` when the method is agent-settleable, and use `--payment-method stripe_checkout` only for a human Checkout fallback.
|
|
183
190
|
|
|
@@ -178,6 +178,13 @@ that action's `command` as the next authenticated quote step. It is the ranked
|
|
|
178
178
|
handoff to the best currently usable rail. The quote command creates a
|
|
179
179
|
live-money payment object but does not move money, grant credits, debit
|
|
180
180
|
credits, call a provider, or write media.
|
|
181
|
+
After the quote succeeds, prefer
|
|
182
|
+
`data.next_actions.recommended_buy.command`: it includes the returned
|
|
183
|
+
`quote_id` and a stable non-secret purchase idempotency key. For x402 this
|
|
184
|
+
creates the browserless deposit attempt whose response contains pay-to
|
|
185
|
+
instructions; for Checkout this creates the human handoff URL. Use the quote
|
|
186
|
+
response's `status_command` to inspect by `quote_id`, and after buy returns a
|
|
187
|
+
`payment_attempt_id`, prefer `status_command_after_payment`.
|
|
181
188
|
|
|
182
189
|
Credits are not granted until verified settlement or webhook fulfillment succeeds in either rail. Operator-provided promotion codes are entered on Stripe-hosted Checkout, not in the CLI. For exact bounded budgets, keep the same rail choice: use `credits quote --credits CREDITS --payment-method stripe_x402.exact.usdc` when the method is agent-settleable, and use `--payment-method stripe_checkout` only for a human Checkout fallback.
|
|
183
190
|
|
|
@@ -623,14 +623,53 @@ Minimum success data:
|
|
|
623
623
|
"idempotency_key": "quote-run-001",
|
|
624
624
|
"pack_id": null,
|
|
625
625
|
"pack": null,
|
|
626
|
-
"live_money": true
|
|
626
|
+
"live_money": true,
|
|
627
|
+
"next_actions": {
|
|
628
|
+
"recommended_buy": {
|
|
629
|
+
"purpose": "complete_credit_top_up",
|
|
630
|
+
"recommendation_reason": "human_checkout_handoff",
|
|
631
|
+
"quote_id": "quote_...",
|
|
632
|
+
"method_id": "stripe_checkout",
|
|
633
|
+
"provider": "stripe",
|
|
634
|
+
"command": "image-skill credits buy --provider stripe --quote-id quote_... --idempotency-key purchase:quote_... --json",
|
|
635
|
+
"buy_command_copy_runnable": true,
|
|
636
|
+
"purchase_idempotency_key": "purchase:quote_...",
|
|
637
|
+
"status_command": "image-skill credits status --quote-id quote_... --json",
|
|
638
|
+
"status_command_copy_runnable": true,
|
|
639
|
+
"status_command_after_payment": "image-skill credits status --payment-attempt-id PAYMENT_ATTEMPT_ID --json",
|
|
640
|
+
"status_command_after_payment_copy_runnable": false,
|
|
641
|
+
"requires_auth": true,
|
|
642
|
+
"live_money": true,
|
|
643
|
+
"requires_browser": true,
|
|
644
|
+
"agent_settleable": false,
|
|
645
|
+
"human_handoff_required": true,
|
|
646
|
+
"command_effect": {
|
|
647
|
+
"label": "live_money_payment_attempt_requires_completion",
|
|
648
|
+
"no_spend": false,
|
|
649
|
+
"payment_attempt": true,
|
|
650
|
+
"credit_debit": false,
|
|
651
|
+
"media_write": false,
|
|
652
|
+
"wallet_settlement": false
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
}
|
|
627
656
|
}
|
|
628
657
|
```
|
|
629
658
|
|
|
630
659
|
For x402 quotes, `accepted_payment_method` is
|
|
631
660
|
`"stripe_x402.exact.usdc"`. The quote does not grant credits or include pay-to
|
|
632
|
-
instructions; `
|
|
633
|
-
|
|
661
|
+
instructions; `data.next_actions.recommended_buy.command` carries the returned
|
|
662
|
+
`quote_id` and a stable non-secret purchase idempotency key for the
|
|
663
|
+
action-required deposit attempt. Run it only when delegated spend is allowed.
|
|
664
|
+
Use `data.next_actions.recommended_buy.status_command` to inspect the quote or
|
|
665
|
+
payment state by `quote_id`; after buy returns a `payment_attempt_id`, prefer
|
|
666
|
+
`status_command_after_payment`.
|
|
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.
|
|
634
673
|
|
|
635
674
|
Hosted API equivalent:
|
|
636
675
|
|
|
@@ -710,6 +749,22 @@ Minimum x402 action-required data:
|
|
|
710
749
|
"client_secret": "[redacted-stripe-client-secret]"
|
|
711
750
|
}
|
|
712
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
|
+
},
|
|
713
768
|
"next": {
|
|
714
769
|
"agent_action": "pay_stripe_crypto_deposit",
|
|
715
770
|
"suggested_commands": [
|
|
@@ -809,6 +864,12 @@ At most one reference flag is allowed: `--quote-id`,
|
|
|
809
864
|
`--payment-attempt-id`, `--checkout-session-id`, or `--receipt-id`. Passing no
|
|
810
865
|
reference returns the balance/quota state.
|
|
811
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
|
+
|
|
812
873
|
Minimum action-required data:
|
|
813
874
|
|
|
814
875
|
```json
|
|
@@ -118,7 +118,7 @@ Hosted API endpoints:
|
|
|
118
118
|
- GET https://api.image-skill.com/v1/quota returns durable hosted quota for Authorization: Bearer TOKEN.
|
|
119
119
|
- GET https://api.image-skill.com/v1/payment-methods returns the no-auth action-only payment rail catalog. It tells agents which currently usable rails are available, whether live money can move, buyer modes (agent_only, hybrid, human_only), browser requirements, agent_initiated, agent_settleable, settlement_blocker, limits, endpoint paths, recovery commands, and data.next_actions.recommended_quote when a currently usable live rail can be quoted next. Planned, watch-only, fake, and private harness rails are intentionally omitted.
|
|
120
120
|
- GET https://api.image-skill.com/v1/credit-packs returns the public pack catalog. Recommended live-money packs include starter-500, builder-2000, and studio-5000. Packs are the default top-up UX; exact quotes remain supported for agents that already know the required credit budget.
|
|
121
|
-
- POST https://api.image-skill.com/v1/credit-quotes returns a credit quote for Authorization: Bearer TOKEN. Request JSON: either credits or pack_id, optional payment_method, idempotency_key. Use stripe_checkout for the human Checkout path. Use payment_method stripe_x402.exact.usdc only when credits methods returns it available/quoteable/purchasable/requires_browser:false; treat it as autonomous self-settlement only when agent_settleable:true is also returned. Response includes quote_id, credits, price_amount_cents, currency, accepted_payment_method, pack_id, pack, and
|
|
121
|
+
- POST https://api.image-skill.com/v1/credit-quotes returns a credit quote for Authorization: Bearer TOKEN. Request JSON: either credits or pack_id, optional payment_method, idempotency_key. Use stripe_checkout for the human Checkout path. Use payment_method stripe_x402.exact.usdc only when credits methods returns it available/quoteable/purchasable/requires_browser:false; treat it as autonomous self-settlement only when agent_settleable:true is also returned. Response includes quote_id, credits, price_amount_cents, currency, accepted_payment_method, pack_id, pack, live_money, and data.next_actions.recommended_buy for live public rails. The recommended buy action includes the real quote_id, a stable non-secret purchase_idempotency_key, a copy-runnable buy command, a quote-id status command, and a payment-attempt status template. One credit equals $0.01, so price_amount_cents equals credits. This does not grant credits.
|
|
122
122
|
- POST https://api.image-skill.com/v1/credit-purchases/stripe-x402-deposits creates a browserless action-required USDC deposit attempt for a stripe_x402.exact.usdc quote. Request JSON: quote_id, idempotency_key. Response includes state: action_required, payment_attempt_id, accepted_payment_method: stripe_x402.exact.usdc, live_money, amount_cents, stripe_x402 challenge metadata, stripe_x402.payable_instructions when Stripe returns a Base deposit address, and next.agent_action: pay_stripe_crypto_deposit. A wallet-equipped agent can pay the exact USDC token_amount_atomic to payable_instructions.deposit_address on Base. This does not grant credits; verified settlement/webhook fulfillment grants paid credits exactly once.
|
|
123
123
|
- POST https://api.image-skill.com/v1/credit-purchases/stripe-checkout-sessions creates a Stripe Checkout Session for a stripe_checkout quote. Request JSON: quote_id, idempotency_key. Response includes state: action_required, payment_attempt_id, checkout_session_id, checkout_handoff_url, checkout_compact_url, checkout_url, accepted_payment_method: stripe_checkout, and next.human_action: open_checkout_url. Present checkout_handoff_url to humans because it is short and redirects to Stripe; checkout_compact_url is also copy-safe when present. If no handoff URL is available, present the full checkout_url in a code block. Do not remove the Stripe # fragment; Checkout needs it in the browser. Stripe-hosted Checkout may accept operator-provided promotion codes; humans enter them on Stripe, not in the Image Skill CLI. This does not grant credits; verified Stripe webhook fulfillment grants paid credits exactly once.
|
|
124
124
|
- GET https://api.image-skill.com/v1/credit-purchases/status returns durable payment state for Authorization: Bearer TOKEN. Query with exactly one of quote_id, payment_attempt_id, checkout_session_id, or receipt_id. Response includes state, quote, payment_attempt, receipt, credit_event, provider_event, limits, and next.
|
|
@@ -196,7 +196,7 @@ Unclaimed agents may not:
|
|
|
196
196
|
- send card data, wallet secrets, wallet private keys, seed phrases, raw x402 payment headers, provider receipts, Stripe secrets, MPP tokens, SPTs, bearer tokens, or any payment credential to Image Skill; Stripe payment details must be entered only on Stripe-hosted checkout pages
|
|
197
197
|
|
|
198
198
|
Credits:
|
|
199
|
-
One Image Skill credit is $0.01. Use image-skill credits methods --json to inspect payment rail availability, browser/human requirements, agent_initiated, agent_settleable, and settlement_blocker. If data.next_actions.recommended_quote is present, prefer its command as the next authenticated quote step; it is a no-spend live-money quote object handoff and does not move money, grant credits, debit credits, call a provider, or write media. Always pass the returned payment method when quoting. When stripe_x402.exact.usdc is returned with available:true, quoteable:true, purchasable:true, requires_browser:false, and agent_settleable:true, image-skill credits quote --pack PACK_ID --payment-method stripe_x402.exact.usdc --json followed by
|
|
199
|
+
One Image Skill credit is $0.01. Use image-skill credits methods --json to inspect payment rail availability, browser/human requirements, agent_initiated, agent_settleable, and settlement_blocker. If data.next_actions.recommended_quote is present, prefer its command as the next authenticated quote step; it is a no-spend live-money quote object handoff and does not move money, grant credits, debit credits, call a provider, or write media. Always pass the returned payment method when quoting. After a successful public live-rail quote, prefer data.next_actions.recommended_buy.command: it includes the returned quote_id and a stable non-secret purchase idempotency key, and creates or replays the matching payment attempt. When stripe_x402.exact.usdc is returned with available:true, quoteable:true, purchasable:true, requires_browser:false, and agent_settleable:true, image-skill credits quote --pack PACK_ID --payment-method stripe_x402.exact.usdc --json followed by the quote response's recommended_buy.command creates a browserless live deposit attempt with stripe_x402.payable_instructions. Treat live_money:true as real spend, stay inside the delegated cap, and pay exactly token_amount_atomic USDC units to payable_instructions.deposit_address on Base only from a wallet substrate you control. Use image-skill credits quote --pack PACK_ID --payment-method stripe_checkout --json and the quote response's recommended_buy.command only for the Stripe Checkout human path; this returns checkout_handoff_url, copy-safe checkout_compact_url, and full Stripe checkout_url fallback and does not grant credits. Present checkout_handoff_url or checkout_compact_url to humans, especially in mobile terminals, SSH, or chat. If checkout_handoff_url is absent, present the full checkout_url in a code block and preserve the Stripe # fragment. Use image-skill credits status --quote-id QUOTE_ID --json before or after buy, and image-skill credits status --payment-attempt-id PAYMENT_ATTEMPT_ID --json after buy and after settlement/checkout completion to read state, receipt, credit_event, limits, and retry guidance. Create/edit debit model-priced credits after provider success; inspect models show and operation cost.credit_pricing for credits_required and pricing_confidence. Do not silently downgrade to the cheapest model to avoid payment when the user asked for quality or is willing to pay; quote the needed credits and use an agent_settleable:true x402 rail or Stripe Checkout fallback. Credits buy requires explicit --idempotency-key; recommended_buy.command supplies one generated from the quote id. Quote idempotency keys are scoped to the hosted agent identity and exact quote terms; the public CLI generates one when omitted and returns it in the quote response, while explicit keys remain available for retry-stable automation. Inspect error.recovery.suggested_command on CREDIT_QUOTE_CONFLICT. Never send payment credentials to Image Skill: no wallet private keys, seed phrases, x402 payment headers, deposit client secrets, provider receipts, card data, or Stripe secrets. Public request fields are credits, pack_id, payment_method, quote_id, status reference IDs, and idempotency_key.
|
|
200
200
|
|
|
201
201
|
Telemetry:
|
|
202
202
|
- command or endpoint name
|