image-skill 0.1.58 → 0.1.60
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 +19 -0
- package/SKILL.md +13 -0
- package/bin/image-skill.mjs +119 -2
- package/cli.md +63 -4
- package/llms.txt +3 -3
- package/package.json +1 -1
- package/skill.md +13 -0
- package/skills/image-skill/SKILL.md +13 -0
- package/skills/image-skill/references/cli.md +63 -4
- package/skills/image-skill/references/llms.txt +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,25 @@ 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.60 - 2026-06-17
|
|
8
|
+
|
|
9
|
+
- Release (activation/self-fund): add `credits quote --json`
|
|
10
|
+
`data.next_actions.recommended_buy`, carrying the returned `quote_id`, a
|
|
11
|
+
stable purchase idempotency key, copy-runnable buy/status commands, and
|
|
12
|
+
explicit live-money payment-attempt safety fields. Quote remains no-credit
|
|
13
|
+
and no-media; buy still requires delegated spend and verified
|
|
14
|
+
settlement/webhook fulfillment before credits are granted.
|
|
15
|
+
|
|
16
|
+
## 0.1.59 - 2026-06-17
|
|
17
|
+
|
|
18
|
+
- Release (activation/self-fund): add
|
|
19
|
+
`credits methods --json` `data.next_actions.recommended_quote`, a ranked
|
|
20
|
+
copy-runnable quote handoff that prefers browserless agent-settleable x402
|
|
21
|
+
when available and falls back to Stripe Checkout when that is the only usable
|
|
22
|
+
live rail. The quote step is explicitly no-spend: it creates a live-money
|
|
23
|
+
payment object but does not move money, grant credits, debit credits, call a
|
|
24
|
+
provider, or write media.
|
|
25
|
+
|
|
7
26
|
## 0.1.58 - 2026-06-17
|
|
8
27
|
|
|
9
28
|
- Release (activation/self-fund): mirror top-up urgency and the no-spend
|
package/SKILL.md
CHANGED
|
@@ -173,6 +173,19 @@ One Image Skill credit is `$0.01`. Operation debits are model-priced, not flat.
|
|
|
173
173
|
| Same rail with `agent_settleable:false` but `purchasable:true` | The rail is quoteable but settlement still needs a wallet substrate you do not have. Skip to Stripe Checkout. |
|
|
174
174
|
| Only `stripe_checkout` available | Quote with `--payment-method stripe_checkout`, then `credits buy --provider stripe` returns `checkout_handoff_url`. Hand that URL to a human sponsor. Do not strip the Stripe `#...` fragment if you fall back to the full `checkout_url`. |
|
|
175
175
|
|
|
176
|
+
If `credits methods --json` returns `data.next_actions.recommended_quote`, use
|
|
177
|
+
that action's `command` as the next authenticated quote step. It is the ranked
|
|
178
|
+
handoff to the best currently usable rail. The quote command creates a
|
|
179
|
+
live-money payment object but does not move money, grant credits, debit
|
|
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`.
|
|
188
|
+
|
|
176
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.
|
|
177
190
|
|
|
178
191
|
At any guide stage, read `data.checks.quota.top_up`: when `recommended` is
|
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.60";
|
|
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);
|
|
@@ -2675,8 +2678,55 @@ function withCopyRunnablePaymentMethodCommands(result, commandPrefix) {
|
|
|
2675
2678
|
}
|
|
2676
2679
|
|
|
2677
2680
|
function paymentMethodCatalogWithCopyRunnableCommands(catalog, commandPrefix) {
|
|
2681
|
+
const nextActions =
|
|
2682
|
+
catalog.next_actions !== null && typeof catalog.next_actions === "object"
|
|
2683
|
+
? catalog.next_actions
|
|
2684
|
+
: null;
|
|
2685
|
+
const recommendedQuote =
|
|
2686
|
+
nextActions?.recommended_quote !== null &&
|
|
2687
|
+
typeof nextActions?.recommended_quote === "object"
|
|
2688
|
+
? nextActions.recommended_quote
|
|
2689
|
+
: null;
|
|
2678
2690
|
return {
|
|
2679
2691
|
...catalog,
|
|
2692
|
+
...(recommendedQuote === null
|
|
2693
|
+
? {}
|
|
2694
|
+
: {
|
|
2695
|
+
next_actions: {
|
|
2696
|
+
...nextActions,
|
|
2697
|
+
recommended_quote: {
|
|
2698
|
+
...recommendedQuote,
|
|
2699
|
+
command:
|
|
2700
|
+
typeof recommendedQuote.command === "string"
|
|
2701
|
+
? renderCopyRunnablePaymentCommand(
|
|
2702
|
+
commandPrefix,
|
|
2703
|
+
recommendedQuote.command,
|
|
2704
|
+
)
|
|
2705
|
+
: recommendedQuote.command,
|
|
2706
|
+
quote_command:
|
|
2707
|
+
typeof recommendedQuote.quote_command === "string"
|
|
2708
|
+
? renderCopyRunnablePaymentCommand(
|
|
2709
|
+
commandPrefix,
|
|
2710
|
+
recommendedQuote.quote_command,
|
|
2711
|
+
)
|
|
2712
|
+
: recommendedQuote.quote_command,
|
|
2713
|
+
buy_command:
|
|
2714
|
+
typeof recommendedQuote.buy_command === "string"
|
|
2715
|
+
? renderCopyRunnablePaymentCommand(
|
|
2716
|
+
commandPrefix,
|
|
2717
|
+
recommendedQuote.buy_command,
|
|
2718
|
+
)
|
|
2719
|
+
: recommendedQuote.buy_command,
|
|
2720
|
+
status_command:
|
|
2721
|
+
typeof recommendedQuote.status_command === "string"
|
|
2722
|
+
? renderCopyRunnablePaymentCommand(
|
|
2723
|
+
commandPrefix,
|
|
2724
|
+
recommendedQuote.status_command,
|
|
2725
|
+
)
|
|
2726
|
+
: recommendedQuote.status_command,
|
|
2727
|
+
},
|
|
2728
|
+
},
|
|
2729
|
+
}),
|
|
2680
2730
|
methods: Array.isArray(catalog.methods)
|
|
2681
2731
|
? catalog.methods.map((method) => ({
|
|
2682
2732
|
...method,
|
|
@@ -2712,6 +2762,73 @@ function paymentMethodCatalogWithCopyRunnableCommands(catalog, commandPrefix) {
|
|
|
2712
2762
|
};
|
|
2713
2763
|
}
|
|
2714
2764
|
|
|
2765
|
+
function withCopyRunnableCreditQuoteCommands(result, commandPrefix) {
|
|
2766
|
+
const data = result.envelope.data;
|
|
2767
|
+
if (
|
|
2768
|
+
data === null ||
|
|
2769
|
+
typeof data !== "object" ||
|
|
2770
|
+
data.next_actions === null ||
|
|
2771
|
+
typeof data.next_actions !== "object"
|
|
2772
|
+
) {
|
|
2773
|
+
return result;
|
|
2774
|
+
}
|
|
2775
|
+
return {
|
|
2776
|
+
...result,
|
|
2777
|
+
envelope: {
|
|
2778
|
+
...result.envelope,
|
|
2779
|
+
data: creditQuoteWithCopyRunnableCommands(data, commandPrefix),
|
|
2780
|
+
},
|
|
2781
|
+
};
|
|
2782
|
+
}
|
|
2783
|
+
|
|
2784
|
+
function creditQuoteWithCopyRunnableCommands(quote, commandPrefix) {
|
|
2785
|
+
const recommendedBuy =
|
|
2786
|
+
quote.next_actions?.recommended_buy !== null &&
|
|
2787
|
+
typeof quote.next_actions?.recommended_buy === "object"
|
|
2788
|
+
? quote.next_actions.recommended_buy
|
|
2789
|
+
: null;
|
|
2790
|
+
if (recommendedBuy === null) {
|
|
2791
|
+
return quote;
|
|
2792
|
+
}
|
|
2793
|
+
return {
|
|
2794
|
+
...quote,
|
|
2795
|
+
next_actions: {
|
|
2796
|
+
...quote.next_actions,
|
|
2797
|
+
recommended_buy: {
|
|
2798
|
+
...recommendedBuy,
|
|
2799
|
+
command:
|
|
2800
|
+
typeof recommendedBuy.command === "string"
|
|
2801
|
+
? renderCopyRunnablePaymentCommand(
|
|
2802
|
+
commandPrefix,
|
|
2803
|
+
recommendedBuy.command,
|
|
2804
|
+
)
|
|
2805
|
+
: recommendedBuy.command,
|
|
2806
|
+
buy_command:
|
|
2807
|
+
typeof recommendedBuy.buy_command === "string"
|
|
2808
|
+
? renderCopyRunnablePaymentCommand(
|
|
2809
|
+
commandPrefix,
|
|
2810
|
+
recommendedBuy.buy_command,
|
|
2811
|
+
)
|
|
2812
|
+
: recommendedBuy.buy_command,
|
|
2813
|
+
status_command:
|
|
2814
|
+
typeof recommendedBuy.status_command === "string"
|
|
2815
|
+
? renderCopyRunnablePaymentCommand(
|
|
2816
|
+
commandPrefix,
|
|
2817
|
+
recommendedBuy.status_command,
|
|
2818
|
+
)
|
|
2819
|
+
: recommendedBuy.status_command,
|
|
2820
|
+
status_command_after_payment:
|
|
2821
|
+
typeof recommendedBuy.status_command_after_payment === "string"
|
|
2822
|
+
? renderCopyRunnablePaymentCommand(
|
|
2823
|
+
commandPrefix,
|
|
2824
|
+
recommendedBuy.status_command_after_payment,
|
|
2825
|
+
)
|
|
2826
|
+
: recommendedBuy.status_command_after_payment,
|
|
2827
|
+
},
|
|
2828
|
+
},
|
|
2829
|
+
};
|
|
2830
|
+
}
|
|
2831
|
+
|
|
2715
2832
|
function renderCopyRunnablePaymentCommand(commandPrefix, command) {
|
|
2716
2833
|
if (/\bnpx\s+(?:-y|--yes)\s+image-skill@latest\b/.test(command)) {
|
|
2717
2834
|
return command;
|
package/cli.md
CHANGED
|
@@ -421,6 +421,29 @@ Minimum success data shape:
|
|
|
421
421
|
"quote_endpoint": "/v1/credit-quotes",
|
|
422
422
|
"packs_endpoint": "/v1/credit-packs",
|
|
423
423
|
"status_endpoint": "/v1/credit-purchases/status",
|
|
424
|
+
"next_actions": {
|
|
425
|
+
"recommended_quote": {
|
|
426
|
+
"purpose": "quote_credit_top_up",
|
|
427
|
+
"recommendation_reason": "browserless_agent_self_fund",
|
|
428
|
+
"method_id": "stripe_x402.exact.usdc",
|
|
429
|
+
"pack_id": "starter-500",
|
|
430
|
+
"command": "image-skill credits quote --pack starter-500 --payment-method stripe_x402.exact.usdc --json",
|
|
431
|
+
"quote_command_copy_runnable": true,
|
|
432
|
+
"buy_command": "image-skill credits buy --provider stripe_x402 --quote-id QUOTE_ID --idempotency-key KEY --json",
|
|
433
|
+
"status_command": "image-skill credits status --payment-attempt-id PAYMENT_ATTEMPT_ID --json",
|
|
434
|
+
"requires_auth": true,
|
|
435
|
+
"live_money": true,
|
|
436
|
+
"requires_browser": false,
|
|
437
|
+
"agent_settleable": true,
|
|
438
|
+
"command_effect": {
|
|
439
|
+
"label": "live_money_quote_no_charge",
|
|
440
|
+
"no_spend": true,
|
|
441
|
+
"payment_object": true,
|
|
442
|
+
"credit_debit": false,
|
|
443
|
+
"media_write": false
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
},
|
|
424
447
|
"methods": [
|
|
425
448
|
{
|
|
426
449
|
"method_id": "stripe_checkout",
|
|
@@ -460,7 +483,10 @@ Public payment discovery is intentionally action-first. Limited-rollout rails
|
|
|
460
483
|
may be returned with `available:false`, `quoteable:false`, `purchasable:false`,
|
|
461
484
|
and a non-null `unavailable_reason` so headless agents can understand the path
|
|
462
485
|
without trying it. Use a method only when it is returned with `available:true`,
|
|
463
|
-
`quoteable:true`, and `purchasable:true`.
|
|
486
|
+
`quoteable:true`, and `purchasable:true`. When
|
|
487
|
+
`next_actions.recommended_quote` is present, prefer its `command` as the next
|
|
488
|
+
authenticated quote step; it creates a live-money payment object but does not
|
|
489
|
+
move money, grant credits, debit credits, call a provider, or write media.
|
|
464
490
|
|
|
465
491
|
Hosted API equivalent:
|
|
466
492
|
|
|
@@ -597,14 +623,47 @@ Minimum success data:
|
|
|
597
623
|
"idempotency_key": "quote-run-001",
|
|
598
624
|
"pack_id": null,
|
|
599
625
|
"pack": null,
|
|
600
|
-
"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
|
+
}
|
|
601
656
|
}
|
|
602
657
|
```
|
|
603
658
|
|
|
604
659
|
For x402 quotes, `accepted_payment_method` is
|
|
605
660
|
`"stripe_x402.exact.usdc"`. The quote does not grant credits or include pay-to
|
|
606
|
-
instructions; `
|
|
607
|
-
|
|
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`.
|
|
608
667
|
|
|
609
668
|
Hosted API equivalent:
|
|
610
669
|
|
package/llms.txt
CHANGED
|
@@ -116,9 +116,9 @@ Hosted API endpoints:
|
|
|
116
116
|
- POST https://api.image-skill.com/v1/agent-claims attaches an email-shaped durable contact inbox to the authenticated agent after an (often anonymous) signup. Request JSON is {"contact": INBOX}. Re-sending the same contact is idempotent (data.state unchanged); a different contact replaces the previous one (data.state attached). Attaching a contact is not inbox-ownership verification: data.claim_state stays unclaimed and data.claim_request_state reports requested. The response echoes only a redacted contact.
|
|
117
117
|
- GET https://api.image-skill.com/v1/whoami returns durable hosted identity for Authorization: Bearer TOKEN.
|
|
118
118
|
- GET https://api.image-skill.com/v1/quota returns durable hosted quota for Authorization: Bearer TOKEN.
|
|
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,
|
|
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. 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.60",
|
|
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
|
@@ -173,6 +173,19 @@ One Image Skill credit is `$0.01`. Operation debits are model-priced, not flat.
|
|
|
173
173
|
| Same rail with `agent_settleable:false` but `purchasable:true` | The rail is quoteable but settlement still needs a wallet substrate you do not have. Skip to Stripe Checkout. |
|
|
174
174
|
| Only `stripe_checkout` available | Quote with `--payment-method stripe_checkout`, then `credits buy --provider stripe` returns `checkout_handoff_url`. Hand that URL to a human sponsor. Do not strip the Stripe `#...` fragment if you fall back to the full `checkout_url`. |
|
|
175
175
|
|
|
176
|
+
If `credits methods --json` returns `data.next_actions.recommended_quote`, use
|
|
177
|
+
that action's `command` as the next authenticated quote step. It is the ranked
|
|
178
|
+
handoff to the best currently usable rail. The quote command creates a
|
|
179
|
+
live-money payment object but does not move money, grant credits, debit
|
|
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`.
|
|
188
|
+
|
|
176
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.
|
|
177
190
|
|
|
178
191
|
At any guide stage, read `data.checks.quota.top_up`: when `recommended` is
|
|
@@ -173,6 +173,19 @@ One Image Skill credit is `$0.01`. Operation debits are model-priced, not flat.
|
|
|
173
173
|
| Same rail with `agent_settleable:false` but `purchasable:true` | The rail is quoteable but settlement still needs a wallet substrate you do not have. Skip to Stripe Checkout. |
|
|
174
174
|
| Only `stripe_checkout` available | Quote with `--payment-method stripe_checkout`, then `credits buy --provider stripe` returns `checkout_handoff_url`. Hand that URL to a human sponsor. Do not strip the Stripe `#...` fragment if you fall back to the full `checkout_url`. |
|
|
175
175
|
|
|
176
|
+
If `credits methods --json` returns `data.next_actions.recommended_quote`, use
|
|
177
|
+
that action's `command` as the next authenticated quote step. It is the ranked
|
|
178
|
+
handoff to the best currently usable rail. The quote command creates a
|
|
179
|
+
live-money payment object but does not move money, grant credits, debit
|
|
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`.
|
|
188
|
+
|
|
176
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.
|
|
177
190
|
|
|
178
191
|
At any guide stage, read `data.checks.quota.top_up`: when `recommended` is
|
|
@@ -421,6 +421,29 @@ Minimum success data shape:
|
|
|
421
421
|
"quote_endpoint": "/v1/credit-quotes",
|
|
422
422
|
"packs_endpoint": "/v1/credit-packs",
|
|
423
423
|
"status_endpoint": "/v1/credit-purchases/status",
|
|
424
|
+
"next_actions": {
|
|
425
|
+
"recommended_quote": {
|
|
426
|
+
"purpose": "quote_credit_top_up",
|
|
427
|
+
"recommendation_reason": "browserless_agent_self_fund",
|
|
428
|
+
"method_id": "stripe_x402.exact.usdc",
|
|
429
|
+
"pack_id": "starter-500",
|
|
430
|
+
"command": "image-skill credits quote --pack starter-500 --payment-method stripe_x402.exact.usdc --json",
|
|
431
|
+
"quote_command_copy_runnable": true,
|
|
432
|
+
"buy_command": "image-skill credits buy --provider stripe_x402 --quote-id QUOTE_ID --idempotency-key KEY --json",
|
|
433
|
+
"status_command": "image-skill credits status --payment-attempt-id PAYMENT_ATTEMPT_ID --json",
|
|
434
|
+
"requires_auth": true,
|
|
435
|
+
"live_money": true,
|
|
436
|
+
"requires_browser": false,
|
|
437
|
+
"agent_settleable": true,
|
|
438
|
+
"command_effect": {
|
|
439
|
+
"label": "live_money_quote_no_charge",
|
|
440
|
+
"no_spend": true,
|
|
441
|
+
"payment_object": true,
|
|
442
|
+
"credit_debit": false,
|
|
443
|
+
"media_write": false
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
},
|
|
424
447
|
"methods": [
|
|
425
448
|
{
|
|
426
449
|
"method_id": "stripe_checkout",
|
|
@@ -460,7 +483,10 @@ Public payment discovery is intentionally action-first. Limited-rollout rails
|
|
|
460
483
|
may be returned with `available:false`, `quoteable:false`, `purchasable:false`,
|
|
461
484
|
and a non-null `unavailable_reason` so headless agents can understand the path
|
|
462
485
|
without trying it. Use a method only when it is returned with `available:true`,
|
|
463
|
-
`quoteable:true`, and `purchasable:true`.
|
|
486
|
+
`quoteable:true`, and `purchasable:true`. When
|
|
487
|
+
`next_actions.recommended_quote` is present, prefer its `command` as the next
|
|
488
|
+
authenticated quote step; it creates a live-money payment object but does not
|
|
489
|
+
move money, grant credits, debit credits, call a provider, or write media.
|
|
464
490
|
|
|
465
491
|
Hosted API equivalent:
|
|
466
492
|
|
|
@@ -597,14 +623,47 @@ Minimum success data:
|
|
|
597
623
|
"idempotency_key": "quote-run-001",
|
|
598
624
|
"pack_id": null,
|
|
599
625
|
"pack": null,
|
|
600
|
-
"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
|
+
}
|
|
601
656
|
}
|
|
602
657
|
```
|
|
603
658
|
|
|
604
659
|
For x402 quotes, `accepted_payment_method` is
|
|
605
660
|
`"stripe_x402.exact.usdc"`. The quote does not grant credits or include pay-to
|
|
606
|
-
instructions; `
|
|
607
|
-
|
|
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`.
|
|
608
667
|
|
|
609
668
|
Hosted API equivalent:
|
|
610
669
|
|
|
@@ -116,9 +116,9 @@ Hosted API endpoints:
|
|
|
116
116
|
- POST https://api.image-skill.com/v1/agent-claims attaches an email-shaped durable contact inbox to the authenticated agent after an (often anonymous) signup. Request JSON is {"contact": INBOX}. Re-sending the same contact is idempotent (data.state unchanged); a different contact replaces the previous one (data.state attached). Attaching a contact is not inbox-ownership verification: data.claim_state stays unclaimed and data.claim_request_state reports requested. The response echoes only a redacted contact.
|
|
117
117
|
- GET https://api.image-skill.com/v1/whoami returns durable hosted identity for Authorization: Bearer TOKEN.
|
|
118
118
|
- GET https://api.image-skill.com/v1/quota returns durable hosted quota for Authorization: Bearer TOKEN.
|
|
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,
|
|
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. 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
|