image-skill 0.1.66 → 0.1.68
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 +20 -0
- package/SKILL.md +8 -5
- package/bin/image-skill.mjs +115 -11
- package/cli.md +6 -2
- package/llms.txt +1 -1
- package/package.json +1 -1
- package/skill.md +8 -5
- package/skills/image-skill/SKILL.md +8 -5
- package/skills/image-skill/references/cli.md +6 -2
- package/skills/image-skill/references/llms.txt +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,26 @@ 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
|
+
## Unreleased
|
|
8
|
+
|
|
9
|
+
## 0.1.68 - 2026-06-18
|
|
10
|
+
|
|
11
|
+
- Release (activation/self-fund): publish the quote-auth retry handoff from
|
|
12
|
+
#2002 so a valid unauthenticated `credits quote` failure preserves the exact
|
|
13
|
+
`error.recovery.after_auth` retry command, plus env-token and stdin-token
|
|
14
|
+
handoffs, after signup. The quote remains no-charge: no buy, wallet
|
|
15
|
+
settlement, provider call, credit debit, media write, hosted deploy, or
|
|
16
|
+
production write changed in this release bump.
|
|
17
|
+
|
|
18
|
+
## 0.1.67 - 2026-06-18
|
|
19
|
+
|
|
20
|
+
- Activation/self-fund: when `create --guide` reaches `ready_to_create` and
|
|
21
|
+
pre-wall self-fund setup is recommended, `data.self_fund_next_command` now
|
|
22
|
+
aliases `data.self_fund_preparation.quote_command` with a `pre_wall_...`
|
|
23
|
+
label so agents can open the x402 quote path before consuming remaining free
|
|
24
|
+
allowance. Guide mode remains no-spend; buy/status/wallet settlement still
|
|
25
|
+
require delegated spend authority.
|
|
26
|
+
|
|
7
27
|
## 0.1.66 - 2026-06-18
|
|
8
28
|
|
|
9
29
|
- Release (activation/self-fund): publish ready-to-create guide
|
package/SKILL.md
CHANGED
|
@@ -39,7 +39,7 @@ JSON is the default. Do not add `--json` to examples.
|
|
|
39
39
|
npm_config_update_notifier=false npx -y image-skill@latest create --guide --prompt "a compact field camera on a stainless workbench"
|
|
40
40
|
```
|
|
41
41
|
|
|
42
|
-
The guide is a free, zero-spend planning call. Given current auth, quota, and payment state, it returns `data.next_command`, `data.next_command_copy_runnable`, `data.next_command_missing_inputs`, `data.stage`, `data.guide_warning`, `data.next_command_effect`, `data.auth_ready`, `data.no_spend_evaluation`, `data.guide_recovery`, `data.recommended_no_spend_command` (alias of `data.no_spend_next_command`), `data.no_spend_next_command_effect`, `data.self_fund_next_command`, `data.self_fund_handoff`, `data.self_fund_preparation`, `data.auth_handoff`, and `data.mutation`. It also preserves `data.checks.quota.top_up`, the same quota top-up recommendation returned by `usage quota`, so wallet-capable agents can see whether a browserless x402 top-up is recommended before the hard wall. Read `data.guide_warning` before running `data.next_command`: `next_command_safety` names whether the command is no-spend setup, read-only inspection, live-money payment action, or live media create. Run that next command only when `data.next_command_copy_runnable` is `true` and the warning says it is safe for your spend policy; when it is `false`, fill `data.next_command_missing_inputs` first. Prefer `data.guide_recovery` for no-doc recovery loops: it names the safest no-spend command and field, the live create or payment field that would spend, and the double-spend guard to check before any live retry. Repeat until `data.stage` is `ready_to_create`. At `ready_to_create`, `data.auth_ready.ready` and `data.auth_ready.next_command_auth_ready` are `true`: the returned create can reuse saved config, env token, or stdin token context without exposing a raw token. Read `data.self_fund_preparation` in this stage before spending the remaining free allowance: when `available` is true, it mirrors top-up `urgency`, `urgency_score`, and `urgency_reasons`; when `recommended` is true, `quote_command` creates an authenticated live-money quote/payment object but does not pay, settle a wallet transfer, debit credits, call a provider, or write media. Only a later buy/payment step can spend money. When `data.guide_warning.next_command_safety` is `live_media_create_credit_debit` and `data.no_spend_evaluation.stop_here` is `true`, `data.next_command` is the live create: run it only if media spend is allowed, otherwise stop before it and run `data.recommended_no_spend_command` for no-spend proof. The no-spend command is an authenticated hosted dry-run: it may create a recoverable `job.planned` receipt, but it has no provider call, credit debit, downloadable asset, or media write.
|
|
42
|
+
The guide is a free, zero-spend planning call. Given current auth, quota, and payment state, it returns `data.next_command`, `data.next_command_copy_runnable`, `data.next_command_missing_inputs`, `data.stage`, `data.guide_warning`, `data.next_command_effect`, `data.auth_ready`, `data.no_spend_evaluation`, `data.guide_recovery`, `data.recommended_no_spend_command` (alias of `data.no_spend_next_command`), `data.no_spend_next_command_effect`, `data.self_fund_next_command`, `data.self_fund_handoff`, `data.self_fund_preparation`, `data.auth_handoff`, and `data.mutation`. It also preserves `data.checks.quota.top_up`, the same quota top-up recommendation returned by `usage quota`, so wallet-capable agents can see whether a browserless x402 top-up is recommended before the hard wall. Read `data.guide_warning` before running `data.next_command`: `next_command_safety` names whether the command is no-spend setup, read-only inspection, live-money payment action, or live media create. Run that next command only when `data.next_command_copy_runnable` is `true` and the warning says it is safe for your spend policy; when it is `false`, fill `data.next_command_missing_inputs` first. Prefer `data.guide_recovery` for no-doc recovery loops: it names the safest no-spend command and field, the live create or payment field that would spend, and the double-spend guard to check before any live retry. Repeat until `data.stage` is `ready_to_create`. At `ready_to_create`, `data.auth_ready.ready` and `data.auth_ready.next_command_auth_ready` are `true`: the returned create can reuse saved config, env token, or stdin token context without exposing a raw token. Read `data.self_fund_preparation` in this stage before spending the remaining free allowance: when `available` is true, it mirrors top-up `urgency`, `urgency_score`, and `urgency_reasons`; when `recommended` is true, `quote_command` creates an authenticated live-money quote/payment object but does not pay, settle a wallet transfer, debit credits, call a provider, or write media. When that quote is copy-runnable, `data.self_fund_next_command` aliases it with a `pre_wall_...` label such as `pre_wall_browserless_agent_payable_quote`, so you can open the quote path before the quota wall. Only a later buy/payment step can spend money. When `data.guide_warning.next_command_safety` is `live_media_create_credit_debit` and `data.no_spend_evaluation.stop_here` is `true`, `data.next_command` is the live create: run it only if media spend is allowed, otherwise stop before it and run `data.recommended_no_spend_command` for no-spend proof. The no-spend command is an authenticated hosted dry-run: it may create a recoverable `job.planned` receipt, but it has no provider call, credit debit, downloadable asset, or media write.
|
|
43
43
|
|
|
44
44
|
When `data.stage` is `quota_required`, `data.self_fund_handoff` mirrors top-up `urgency`, `urgency_score`, and `urgency_reasons`, and exposes `first_safe_command` with a no-spend inspection effect. Run that no-spend command first when you need to inspect rails or stay below delegated spend authority before opening the live-money quote path.
|
|
45
45
|
|
|
@@ -206,10 +206,13 @@ When `create --guide` reaches `ready_to_create`, inspect
|
|
|
206
206
|
`data.self_fund_preparation` before consuming the remaining free allowance. If
|
|
207
207
|
it is available, `urgency`, `urgency_score`, and `urgency_reasons` mirror
|
|
208
208
|
`data.checks.quota.top_up`; if it is recommended, `quote_command` is the
|
|
209
|
-
pre-wall browserless x402 quote path
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
209
|
+
pre-wall browserless x402 quote path. When copy-runnable,
|
|
210
|
+
`data.self_fund_next_command` aliases that quote and
|
|
211
|
+
`data.self_fund_next_command_label` uses a `pre_wall_...` label. The command
|
|
212
|
+
creates an authenticated live-money quote/payment object without paying,
|
|
213
|
+
settling a wallet transfer, debiting credits, calling a provider, or writing
|
|
214
|
+
media. Only follow the later buy/status/wallet-settlement commands when
|
|
215
|
+
delegated spend is allowed.
|
|
213
216
|
For the browserless x402 path, `data.self_fund_handoff.wallet_settlement` names
|
|
214
217
|
the payable-instructions fields to read after `credits buy` or `credits status`,
|
|
215
218
|
plus the Base/USDC exact-amount and deposit-address fields. Use a delegated
|
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.68";
|
|
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";
|
|
@@ -1192,10 +1192,6 @@ async function credits(argv) {
|
|
|
1192
1192
|
if (credentialFlag !== null) {
|
|
1193
1193
|
return credentialFlag;
|
|
1194
1194
|
}
|
|
1195
|
-
const token = await resolveToken(args);
|
|
1196
|
-
if (!token.ok) {
|
|
1197
|
-
return token.result;
|
|
1198
|
-
}
|
|
1199
1195
|
const creditsValue = flagNumber(args, "credits");
|
|
1200
1196
|
const pack = flagString(args, "pack");
|
|
1201
1197
|
if (creditsValue === null && pack === null) {
|
|
@@ -1222,6 +1218,16 @@ async function credits(argv) {
|
|
|
1222
1218
|
`public credits quote supports --payment-method ${PUBLIC_QUOTE_PAYMENT_METHODS.join(" or ")}`,
|
|
1223
1219
|
);
|
|
1224
1220
|
}
|
|
1221
|
+
const token = await resolveToken(args);
|
|
1222
|
+
if (!token.ok) {
|
|
1223
|
+
return withCreditQuoteAuthRecovery(token.result, {
|
|
1224
|
+
args,
|
|
1225
|
+
creditsValue,
|
|
1226
|
+
pack,
|
|
1227
|
+
paymentMethod,
|
|
1228
|
+
idempotency,
|
|
1229
|
+
});
|
|
1230
|
+
}
|
|
1225
1231
|
const body = {
|
|
1226
1232
|
...(creditsValue === null ? {} : { credits: creditsValue }),
|
|
1227
1233
|
...(pack === null ? {} : { pack_id: pack }),
|
|
@@ -1866,11 +1872,6 @@ async function createGuide(args, options = {}) {
|
|
|
1866
1872
|
paymentSummary,
|
|
1867
1873
|
nextCommandCopyRunnable,
|
|
1868
1874
|
});
|
|
1869
|
-
const selfFundNextCommand = stage === "quota_required" ? nextCommand : null;
|
|
1870
|
-
const selfFundNextCommandLabel = createGuideSelfFundNextCommandLabel(
|
|
1871
|
-
stage,
|
|
1872
|
-
paymentSummary,
|
|
1873
|
-
);
|
|
1874
1875
|
const quotaTopUp = createGuideQuotaTopUp(
|
|
1875
1876
|
quota?.envelope.data?.top_up ?? null,
|
|
1876
1877
|
);
|
|
@@ -1917,6 +1918,15 @@ async function createGuide(args, options = {}) {
|
|
|
1917
1918
|
afterNext,
|
|
1918
1919
|
tokenSource: publicTokenSource,
|
|
1919
1920
|
});
|
|
1921
|
+
const selfFundNextCommand =
|
|
1922
|
+
stage === "quota_required"
|
|
1923
|
+
? nextCommand
|
|
1924
|
+
: createGuidePreWallSelfFundNextCommand(selfFundPreparation);
|
|
1925
|
+
const selfFundNextCommandLabel = createGuideSelfFundNextCommandLabel(
|
|
1926
|
+
stage,
|
|
1927
|
+
paymentSummary,
|
|
1928
|
+
selfFundPreparation,
|
|
1929
|
+
);
|
|
1920
1930
|
const guideRecovery = createGuideRecovery(stage, {
|
|
1921
1931
|
blocker,
|
|
1922
1932
|
nextCommand,
|
|
@@ -3055,6 +3065,63 @@ function renderCopyRunnablePaymentCommand(commandPrefix, command) {
|
|
|
3055
3065
|
return renderGuidePrefixedCommand(commandPrefix, command);
|
|
3056
3066
|
}
|
|
3057
3067
|
|
|
3068
|
+
function withCreditQuoteAuthRecovery(result, input) {
|
|
3069
|
+
const command = renderCopyRunnablePaymentCommand(
|
|
3070
|
+
createGuideCommandPrefix(),
|
|
3071
|
+
renderCreditQuoteRetryCommand(input),
|
|
3072
|
+
);
|
|
3073
|
+
return {
|
|
3074
|
+
...result,
|
|
3075
|
+
envelope: {
|
|
3076
|
+
...result.envelope,
|
|
3077
|
+
error: {
|
|
3078
|
+
...result.envelope.error,
|
|
3079
|
+
recovery: {
|
|
3080
|
+
...(result.envelope.error?.recovery ?? {}),
|
|
3081
|
+
after_auth: {
|
|
3082
|
+
command,
|
|
3083
|
+
command_copy_runnable: true,
|
|
3084
|
+
with_env: `IMAGE_SKILL_TOKEN="$IMAGE_SKILL_TOKEN" ${command}`,
|
|
3085
|
+
with_stdin: renderTokenStdinCommand(command),
|
|
3086
|
+
accepted_methods: ["config", "IMAGE_SKILL_TOKEN", "--token-stdin"],
|
|
3087
|
+
requires_auth: true,
|
|
3088
|
+
command_effect: {
|
|
3089
|
+
label: "live_money_quote_no_charge",
|
|
3090
|
+
live_money: true,
|
|
3091
|
+
payment_object: true,
|
|
3092
|
+
payment_attempt: false,
|
|
3093
|
+
wallet_settlement: false,
|
|
3094
|
+
provider_call: false,
|
|
3095
|
+
credit_debit: false,
|
|
3096
|
+
media_write: false,
|
|
3097
|
+
},
|
|
3098
|
+
},
|
|
3099
|
+
},
|
|
3100
|
+
},
|
|
3101
|
+
},
|
|
3102
|
+
};
|
|
3103
|
+
}
|
|
3104
|
+
|
|
3105
|
+
function renderCreditQuoteRetryCommand(input) {
|
|
3106
|
+
return [
|
|
3107
|
+
"image-skill credits quote",
|
|
3108
|
+
...(input.pack === null
|
|
3109
|
+
? ["--credits", String(input.creditsValue)]
|
|
3110
|
+
: ["--pack", input.pack]),
|
|
3111
|
+
"--payment-method",
|
|
3112
|
+
input.paymentMethod,
|
|
3113
|
+
"--idempotency-key",
|
|
3114
|
+
input.idempotency.value,
|
|
3115
|
+
...quoteRetryApiBaseArgs(input.args),
|
|
3116
|
+
"--json",
|
|
3117
|
+
].join(" ");
|
|
3118
|
+
}
|
|
3119
|
+
|
|
3120
|
+
function quoteRetryApiBaseArgs(args) {
|
|
3121
|
+
const apiBaseUrl = explicitApiBaseUrl(args);
|
|
3122
|
+
return apiBaseUrl === null ? [] : ["--api-base-url", shellQuote(apiBaseUrl)];
|
|
3123
|
+
}
|
|
3124
|
+
|
|
3058
3125
|
function createGuideStage(input) {
|
|
3059
3126
|
if (input.promptRequired) {
|
|
3060
3127
|
return "prompt_required";
|
|
@@ -3213,7 +3280,32 @@ function createGuideAuthReady(stage, input) {
|
|
|
3213
3280
|
};
|
|
3214
3281
|
}
|
|
3215
3282
|
|
|
3216
|
-
function createGuideSelfFundNextCommandLabel(
|
|
3283
|
+
function createGuideSelfFundNextCommandLabel(
|
|
3284
|
+
stage,
|
|
3285
|
+
paymentSummary,
|
|
3286
|
+
selfFundPreparation,
|
|
3287
|
+
) {
|
|
3288
|
+
if (stage === "ready_to_create") {
|
|
3289
|
+
if (createGuidePreWallSelfFundNextCommand(selfFundPreparation) === null) {
|
|
3290
|
+
return null;
|
|
3291
|
+
}
|
|
3292
|
+
if (
|
|
3293
|
+
selfFundPreparation?.top_up_path === "browserless_agent_self_fund" &&
|
|
3294
|
+
selfFundPreparation.preferred_method !== null &&
|
|
3295
|
+
paymentSummary.browserless_methods.includes(
|
|
3296
|
+
selfFundPreparation.preferred_method,
|
|
3297
|
+
) &&
|
|
3298
|
+
paymentSummary.agent_settleable_methods.includes(
|
|
3299
|
+
selfFundPreparation.preferred_method,
|
|
3300
|
+
)
|
|
3301
|
+
) {
|
|
3302
|
+
return "pre_wall_browserless_agent_payable_quote";
|
|
3303
|
+
}
|
|
3304
|
+
if (selfFundPreparation?.top_up_path === "human_payment_handoff") {
|
|
3305
|
+
return "pre_wall_human_handoff_payment_quote";
|
|
3306
|
+
}
|
|
3307
|
+
return "pre_wall_payment_or_quota_action";
|
|
3308
|
+
}
|
|
3217
3309
|
if (stage !== "quota_required") {
|
|
3218
3310
|
return null;
|
|
3219
3311
|
}
|
|
@@ -3234,6 +3326,18 @@ function createGuideSelfFundNextCommandLabel(stage, paymentSummary) {
|
|
|
3234
3326
|
return "payment_or_quota_action";
|
|
3235
3327
|
}
|
|
3236
3328
|
|
|
3329
|
+
function createGuidePreWallSelfFundNextCommand(selfFundPreparation) {
|
|
3330
|
+
if (
|
|
3331
|
+
selfFundPreparation === null ||
|
|
3332
|
+
!selfFundPreparation.available ||
|
|
3333
|
+
!selfFundPreparation.recommended ||
|
|
3334
|
+
!selfFundPreparation.quote_command_copy_runnable
|
|
3335
|
+
) {
|
|
3336
|
+
return null;
|
|
3337
|
+
}
|
|
3338
|
+
return selfFundPreparation.quote_command;
|
|
3339
|
+
}
|
|
3340
|
+
|
|
3237
3341
|
function createGuideSelfFundHandoff(stage, input) {
|
|
3238
3342
|
if (stage !== "quota_required") {
|
|
3239
3343
|
return null;
|
package/cli.md
CHANGED
|
@@ -250,8 +250,12 @@ step.
|
|
|
250
250
|
`urgency_reasons`; when `recommended` is true, `quote_command` creates an
|
|
251
251
|
authenticated live-money quote/payment object without paying, settling a
|
|
252
252
|
wallet transfer, debiting credits, calling a provider, or writing media.
|
|
253
|
-
|
|
254
|
-
|
|
253
|
+
When that recommended quote is copy-runnable, `data.self_fund_next_command`
|
|
254
|
+
aliases it and `data.self_fund_next_command_label` uses a `pre_wall_...`
|
|
255
|
+
label such as `pre_wall_browserless_agent_payable_quote`, so agents can open
|
|
256
|
+
the top-up quote path before consuming their remaining free allowance. Only
|
|
257
|
+
follow later buy/status/wallet-settlement commands when delegated spend is
|
|
258
|
+
allowed. `data.next_command_effect.label` is
|
|
255
259
|
`live_media_create_credit_debit`, with
|
|
256
260
|
`provider_call`, `hosted_create`, `credit_debit`, and `media_write` all true.
|
|
257
261
|
`data.guide_warning.next_command_safety` is
|
package/llms.txt
CHANGED
|
@@ -62,7 +62,7 @@ First-run guide loop:
|
|
|
62
62
|
2. Read data.guide_warning, then follow data.next_command when its next_command_safety is safe for the current spend policy. Prefer data.guide_recovery for no-doc recovery: data.guide_recovery.no_spend_command_field and data.guide_recovery.no_spend_command name the safest no-spend command, data.guide_recovery.live_create_command_field and data.guide_recovery.live_payment_command_field name fields that would spend, and data.guide_recovery.double_spend_guard tells you when to check error.recovery, jobs, activity, or payment status before any live retry. Do not run doctor, models list, signup, whoami, quota, dry-run, or payment commands as a setup checklist before the guide asks for them.
|
|
63
63
|
3. If data.stage is prompt_required, rerun data.next_command with the real prompt.
|
|
64
64
|
4. If data.stage is auth_required, data.auth_ready.ready is false and data.guide_warning.next_command_safety is hosted_signup_no_spend_setup. Run data.next_command, then rerun the guide once. Hosted signup saves the restricted token to the public CLI config by default with 0600 permissions. If the configured config path is blocked, data.next_command sets IMAGE_SKILL_CONFIG_PATH="$PWD/.image-skill/config.json" and still runs a saved-config signup; do not switch to raw-token handoff unless recovery explicitly requires it. If the runtime intentionally uses --no-save --show-token, store the returned token in the agent runtime secret store, then rerun with IMAGE_SKILL_TOKEN or --token-stdin; data.auth_handoff.rerun_guide.with_env and data.auth_handoff.rerun_guide.with_stdin are copy-safe templates for that mode. Signup is anonymous by default: no contact inbox is required to get a restricted token. The optional --agent-contact flag takes an email-shaped durable contact inbox for the restricted agent identity, not a requirement to find an individual human; attach one later with image-skill claim request --contact INBOX --json when funding or durability makes it worth having. Hosted signup returns the raw restricted token only when --show-token is set, and only once. When providing a contact, use an agent-owned inbox when available; otherwise use an operator, team, or sponsor inbox that can receive future claim, billing, or abuse notices. Never invent an inbox or borrow an unrelated human email just to fill the flag — omit it instead. example.invalid addresses are only appropriate inside documented harness or proof runs. --human-email remains accepted as a compatibility alias, but the guide must not teach it. Anonymous signups mint a fresh agent identity on every call; reuse the saved config instead of re-running signup. --save is accepted as a compatibility no-op for the default save behavior; use --no-save only when the runtime has a separate secret store and does not want local config.
|
|
65
|
-
5. At any guide stage, read data.checks.quota.top_up. When available is true, it includes recommended, recommendation_reason, preferred_payment_method, quote_command, quote_command_copy_runnable, quote_command_effect, and quote/buy/status command templates for the browserless x402 top-up path; recommended and urgency say whether to act now. On quota/payment recovery errors, read error.recovery.top_up: when delegated live-money quoting is allowed, prefer error.recovery.top_up.quote_command to open the top-up path, and use error.recovery.suggested_command for no-spend payment-method inspection. If data.stage is quota_required, data.guide_warning.next_command_safety is live_money_payment_action and data.guide_warning.payment_top_up_path summarizes the live-money path. Run data.self_fund_next_command to start the top-up. It aliases data.next_command and is the first payment command, usually an x402 or Stripe quote. First read data.checks.payments.preferred_method_summary.top_up_path: browserless_agent_self_fund means a wallet-equipped agent can complete the preferred live-money rail without a browser; human_payment_handoff means the agent can create the payment attempt but a human/browser step must complete before credits are granted. If the guide authenticated from env or stdin, prefer data.self_fund_handoff.auth.next_command.with_env or data.self_fund_handoff.auth.next_command.with_stdin so auth follows the payment command. Then follow data.self_fund_handoff.payment_commands.buy and status, and rerun data.self_fund_handoff.after_next once credits are granted. If data.stage is ready_to_create, inspect data.self_fund_preparation before consuming the remaining free allowance; it mirrors top-up urgency, urgency_score, and urgency_reasons. When available and recommended are true, data.self_fund_preparation.quote_command is the pre-wall browserless x402 quote
|
|
65
|
+
5. At any guide stage, read data.checks.quota.top_up. When available is true, it includes recommended, recommendation_reason, preferred_payment_method, quote_command, quote_command_copy_runnable, quote_command_effect, and quote/buy/status command templates for the browserless x402 top-up path; recommended and urgency say whether to act now. On quota/payment recovery errors, read error.recovery.top_up: when delegated live-money quoting is allowed, prefer error.recovery.top_up.quote_command to open the top-up path, and use error.recovery.suggested_command for no-spend payment-method inspection. If data.stage is quota_required, data.guide_warning.next_command_safety is live_money_payment_action and data.guide_warning.payment_top_up_path summarizes the live-money path. Run data.self_fund_next_command to start the top-up. It aliases data.next_command and is the first payment command, usually an x402 or Stripe quote. First read data.checks.payments.preferred_method_summary.top_up_path: browserless_agent_self_fund means a wallet-equipped agent can complete the preferred live-money rail without a browser; human_payment_handoff means the agent can create the payment attempt but a human/browser step must complete before credits are granted. If the guide authenticated from env or stdin, prefer data.self_fund_handoff.auth.next_command.with_env or data.self_fund_handoff.auth.next_command.with_stdin so auth follows the payment command. Then follow data.self_fund_handoff.payment_commands.buy and status, and rerun data.self_fund_handoff.after_next once credits are granted. If data.stage is ready_to_create, inspect data.self_fund_preparation before consuming the remaining free allowance; it mirrors top-up urgency, urgency_score, and urgency_reasons. When available and recommended are true, data.self_fund_preparation.quote_command is the pre-wall browserless x402 quote and, when copy-runnable, data.self_fund_next_command aliases it with a pre_wall label such as pre_wall_browserless_agent_payable_quote. The quote command creates an authenticated live-money quote/payment object, but data.self_fund_preparation.quote_command_effect must show no provider call, no hosted create, no credit debit, no media write, and no wallet settlement until a later buy/payment step. One Image Skill credit is $0.01. Credit quotes grant prepaid value units; create/edit operations debit model-priced credits reported as cost.credit_pricing. Starter preview currently gives bounded free-preview credits plus a four-job daily cap.
|
|
66
66
|
5a. When data.stage is quota_required, data.self_fund_handoff mirrors top-up urgency, urgency_score, and urgency_reasons, and exposes first_safe_command plus first_safe_command_effect. Run first_safe_command, usually image-skill credits methods --json, for no-spend rail inspection before quote/buy when delegated spend authority is absent or unclear.
|
|
67
67
|
6. If data.stage is ready_to_create, data.next_command is the first bounded live create. data.guide_warning.next_command_safety must be live_media_create_credit_debit, data.guide_warning.no_spend_safe must be false, data.guide_warning.spend_required must be true, and data.guide_warning.recommended_command_field must be recommended_no_spend_command. data.auth_ready.ready and data.auth_ready.next_command_auth_ready must be true; data.auth_ready.next_command_requires_auth must be true, and the command can reuse saved config, IMAGE_SKILL_TOKEN, or --token-stdin context without exposing a raw token. data.next_command_effect.label must be live_media_create_credit_debit and its provider_call, hosted_create, credit_debit, and media_write flags are true. data.no_spend_evaluation.stop_here must be true, data.no_spend_evaluation.next_command_is_live_create must be true, and data.no_spend_evaluation.recommended_command_field must be recommended_no_spend_command. Run data.next_command only when media spend is allowed. In no-spend evaluations, or when you only need to prove readiness without media/provider work, stop before data.next_command and run data.recommended_no_spend_command instead. data.recommended_no_spend_command must equal data.no_spend_next_command. data.no_spend_next_command_effect.label must be dry_run_planned_job_no_provider_call_no_credit_debit_no_media_write: no_spend, hosted_create_dry_run, planned_job, and plan_receipt are true; activity_event is job.planned; provider_call, credit_debit, and media_write are false. This dry-run may create a recoverable planned job/activity receipt but no provider execution, debit, downloadable asset, or media write. If the guide authenticated from env or stdin, prefer data.auth_handoff.next_command.with_env or data.auth_handoff.next_command.with_stdin so auth follows the live create. In guide cost output, cost.estimated_usd_per_image and cost.estimated_debit_usd_per_image are the Image Skill debit dollars for one output; cost.estimated_provider_usd_per_image is only the upstream provider estimate. Use the guide's returned max_estimated_usd_per_image because it is sized to the credit debit the agent funds. Add --output-count N only after models show confirms the selected create model supports more than one output; credit_pricing.credits_required is the total debit across outputs, while max_estimated_usd_per_image remains a per-image Image Skill debit guard.
|
|
68
68
|
7. After create, prefer data.next_actions when present: inspect_job and inspect_asset are copy-runnable no-spend recovery commands, iterate_edit is the reusable-asset edit template, and self_fund is the promoted top-up quote handoff when quota.top_up.available is true. self_fund.recommended plus urgency, urgency_score, and urgency_reasons say whether to act now, and self_fund exposes first_safe_command plus first_safe_command_effect for no-spend rail inspection before quote/buy. self_fund.quote_command is copy-runnable and omits --idempotency-key so the public CLI generates and returns one for retry safety; follow the quote response into buy/status. Otherwise use image-skill jobs show JOB_ID to recover status, cost, safety, timestamps, and final assets; image-skill assets get ASSET_URL_OR_ID --output ./result.png to fetch the generated asset without repeating provider work; and image-skill activity list --subject JOB_ID to find ledger events, trace, usage, asset links, and any data.next_actions.self_fund handoff to cite or follow. Hosted asset-id assets show/get may also return data.next_actions.self_fund after generated work, so inspect that field before ending the session.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "image-skill",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.68",
|
|
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
|
@@ -39,7 +39,7 @@ JSON is the default. Do not add `--json` to examples.
|
|
|
39
39
|
npm_config_update_notifier=false npx -y image-skill@latest create --guide --prompt "a compact field camera on a stainless workbench"
|
|
40
40
|
```
|
|
41
41
|
|
|
42
|
-
The guide is a free, zero-spend planning call. Given current auth, quota, and payment state, it returns `data.next_command`, `data.next_command_copy_runnable`, `data.next_command_missing_inputs`, `data.stage`, `data.guide_warning`, `data.next_command_effect`, `data.auth_ready`, `data.no_spend_evaluation`, `data.guide_recovery`, `data.recommended_no_spend_command` (alias of `data.no_spend_next_command`), `data.no_spend_next_command_effect`, `data.self_fund_next_command`, `data.self_fund_handoff`, `data.self_fund_preparation`, `data.auth_handoff`, and `data.mutation`. It also preserves `data.checks.quota.top_up`, the same quota top-up recommendation returned by `usage quota`, so wallet-capable agents can see whether a browserless x402 top-up is recommended before the hard wall. Read `data.guide_warning` before running `data.next_command`: `next_command_safety` names whether the command is no-spend setup, read-only inspection, live-money payment action, or live media create. Run that next command only when `data.next_command_copy_runnable` is `true` and the warning says it is safe for your spend policy; when it is `false`, fill `data.next_command_missing_inputs` first. Prefer `data.guide_recovery` for no-doc recovery loops: it names the safest no-spend command and field, the live create or payment field that would spend, and the double-spend guard to check before any live retry. Repeat until `data.stage` is `ready_to_create`. At `ready_to_create`, `data.auth_ready.ready` and `data.auth_ready.next_command_auth_ready` are `true`: the returned create can reuse saved config, env token, or stdin token context without exposing a raw token. Read `data.self_fund_preparation` in this stage before spending the remaining free allowance: when `available` is true, it mirrors top-up `urgency`, `urgency_score`, and `urgency_reasons`; when `recommended` is true, `quote_command` creates an authenticated live-money quote/payment object but does not pay, settle a wallet transfer, debit credits, call a provider, or write media. Only a later buy/payment step can spend money. When `data.guide_warning.next_command_safety` is `live_media_create_credit_debit` and `data.no_spend_evaluation.stop_here` is `true`, `data.next_command` is the live create: run it only if media spend is allowed, otherwise stop before it and run `data.recommended_no_spend_command` for no-spend proof. The no-spend command is an authenticated hosted dry-run: it may create a recoverable `job.planned` receipt, but it has no provider call, credit debit, downloadable asset, or media write.
|
|
42
|
+
The guide is a free, zero-spend planning call. Given current auth, quota, and payment state, it returns `data.next_command`, `data.next_command_copy_runnable`, `data.next_command_missing_inputs`, `data.stage`, `data.guide_warning`, `data.next_command_effect`, `data.auth_ready`, `data.no_spend_evaluation`, `data.guide_recovery`, `data.recommended_no_spend_command` (alias of `data.no_spend_next_command`), `data.no_spend_next_command_effect`, `data.self_fund_next_command`, `data.self_fund_handoff`, `data.self_fund_preparation`, `data.auth_handoff`, and `data.mutation`. It also preserves `data.checks.quota.top_up`, the same quota top-up recommendation returned by `usage quota`, so wallet-capable agents can see whether a browserless x402 top-up is recommended before the hard wall. Read `data.guide_warning` before running `data.next_command`: `next_command_safety` names whether the command is no-spend setup, read-only inspection, live-money payment action, or live media create. Run that next command only when `data.next_command_copy_runnable` is `true` and the warning says it is safe for your spend policy; when it is `false`, fill `data.next_command_missing_inputs` first. Prefer `data.guide_recovery` for no-doc recovery loops: it names the safest no-spend command and field, the live create or payment field that would spend, and the double-spend guard to check before any live retry. Repeat until `data.stage` is `ready_to_create`. At `ready_to_create`, `data.auth_ready.ready` and `data.auth_ready.next_command_auth_ready` are `true`: the returned create can reuse saved config, env token, or stdin token context without exposing a raw token. Read `data.self_fund_preparation` in this stage before spending the remaining free allowance: when `available` is true, it mirrors top-up `urgency`, `urgency_score`, and `urgency_reasons`; when `recommended` is true, `quote_command` creates an authenticated live-money quote/payment object but does not pay, settle a wallet transfer, debit credits, call a provider, or write media. When that quote is copy-runnable, `data.self_fund_next_command` aliases it with a `pre_wall_...` label such as `pre_wall_browserless_agent_payable_quote`, so you can open the quote path before the quota wall. Only a later buy/payment step can spend money. When `data.guide_warning.next_command_safety` is `live_media_create_credit_debit` and `data.no_spend_evaluation.stop_here` is `true`, `data.next_command` is the live create: run it only if media spend is allowed, otherwise stop before it and run `data.recommended_no_spend_command` for no-spend proof. The no-spend command is an authenticated hosted dry-run: it may create a recoverable `job.planned` receipt, but it has no provider call, credit debit, downloadable asset, or media write.
|
|
43
43
|
|
|
44
44
|
When `data.stage` is `quota_required`, `data.self_fund_handoff` mirrors top-up `urgency`, `urgency_score`, and `urgency_reasons`, and exposes `first_safe_command` with a no-spend inspection effect. Run that no-spend command first when you need to inspect rails or stay below delegated spend authority before opening the live-money quote path.
|
|
45
45
|
|
|
@@ -206,10 +206,13 @@ When `create --guide` reaches `ready_to_create`, inspect
|
|
|
206
206
|
`data.self_fund_preparation` before consuming the remaining free allowance. If
|
|
207
207
|
it is available, `urgency`, `urgency_score`, and `urgency_reasons` mirror
|
|
208
208
|
`data.checks.quota.top_up`; if it is recommended, `quote_command` is the
|
|
209
|
-
pre-wall browserless x402 quote path
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
209
|
+
pre-wall browserless x402 quote path. When copy-runnable,
|
|
210
|
+
`data.self_fund_next_command` aliases that quote and
|
|
211
|
+
`data.self_fund_next_command_label` uses a `pre_wall_...` label. The command
|
|
212
|
+
creates an authenticated live-money quote/payment object without paying,
|
|
213
|
+
settling a wallet transfer, debiting credits, calling a provider, or writing
|
|
214
|
+
media. Only follow the later buy/status/wallet-settlement commands when
|
|
215
|
+
delegated spend is allowed.
|
|
213
216
|
For the browserless x402 path, `data.self_fund_handoff.wallet_settlement` names
|
|
214
217
|
the payable-instructions fields to read after `credits buy` or `credits status`,
|
|
215
218
|
plus the Base/USDC exact-amount and deposit-address fields. Use a delegated
|
|
@@ -39,7 +39,7 @@ JSON is the default. Do not add `--json` to examples.
|
|
|
39
39
|
npm_config_update_notifier=false npx -y image-skill@latest create --guide --prompt "a compact field camera on a stainless workbench"
|
|
40
40
|
```
|
|
41
41
|
|
|
42
|
-
The guide is a free, zero-spend planning call. Given current auth, quota, and payment state, it returns `data.next_command`, `data.next_command_copy_runnable`, `data.next_command_missing_inputs`, `data.stage`, `data.guide_warning`, `data.next_command_effect`, `data.auth_ready`, `data.no_spend_evaluation`, `data.guide_recovery`, `data.recommended_no_spend_command` (alias of `data.no_spend_next_command`), `data.no_spend_next_command_effect`, `data.self_fund_next_command`, `data.self_fund_handoff`, `data.self_fund_preparation`, `data.auth_handoff`, and `data.mutation`. It also preserves `data.checks.quota.top_up`, the same quota top-up recommendation returned by `usage quota`, so wallet-capable agents can see whether a browserless x402 top-up is recommended before the hard wall. Read `data.guide_warning` before running `data.next_command`: `next_command_safety` names whether the command is no-spend setup, read-only inspection, live-money payment action, or live media create. Run that next command only when `data.next_command_copy_runnable` is `true` and the warning says it is safe for your spend policy; when it is `false`, fill `data.next_command_missing_inputs` first. Prefer `data.guide_recovery` for no-doc recovery loops: it names the safest no-spend command and field, the live create or payment field that would spend, and the double-spend guard to check before any live retry. Repeat until `data.stage` is `ready_to_create`. At `ready_to_create`, `data.auth_ready.ready` and `data.auth_ready.next_command_auth_ready` are `true`: the returned create can reuse saved config, env token, or stdin token context without exposing a raw token. Read `data.self_fund_preparation` in this stage before spending the remaining free allowance: when `available` is true, it mirrors top-up `urgency`, `urgency_score`, and `urgency_reasons`; when `recommended` is true, `quote_command` creates an authenticated live-money quote/payment object but does not pay, settle a wallet transfer, debit credits, call a provider, or write media. Only a later buy/payment step can spend money. When `data.guide_warning.next_command_safety` is `live_media_create_credit_debit` and `data.no_spend_evaluation.stop_here` is `true`, `data.next_command` is the live create: run it only if media spend is allowed, otherwise stop before it and run `data.recommended_no_spend_command` for no-spend proof. The no-spend command is an authenticated hosted dry-run: it may create a recoverable `job.planned` receipt, but it has no provider call, credit debit, downloadable asset, or media write.
|
|
42
|
+
The guide is a free, zero-spend planning call. Given current auth, quota, and payment state, it returns `data.next_command`, `data.next_command_copy_runnable`, `data.next_command_missing_inputs`, `data.stage`, `data.guide_warning`, `data.next_command_effect`, `data.auth_ready`, `data.no_spend_evaluation`, `data.guide_recovery`, `data.recommended_no_spend_command` (alias of `data.no_spend_next_command`), `data.no_spend_next_command_effect`, `data.self_fund_next_command`, `data.self_fund_handoff`, `data.self_fund_preparation`, `data.auth_handoff`, and `data.mutation`. It also preserves `data.checks.quota.top_up`, the same quota top-up recommendation returned by `usage quota`, so wallet-capable agents can see whether a browserless x402 top-up is recommended before the hard wall. Read `data.guide_warning` before running `data.next_command`: `next_command_safety` names whether the command is no-spend setup, read-only inspection, live-money payment action, or live media create. Run that next command only when `data.next_command_copy_runnable` is `true` and the warning says it is safe for your spend policy; when it is `false`, fill `data.next_command_missing_inputs` first. Prefer `data.guide_recovery` for no-doc recovery loops: it names the safest no-spend command and field, the live create or payment field that would spend, and the double-spend guard to check before any live retry. Repeat until `data.stage` is `ready_to_create`. At `ready_to_create`, `data.auth_ready.ready` and `data.auth_ready.next_command_auth_ready` are `true`: the returned create can reuse saved config, env token, or stdin token context without exposing a raw token. Read `data.self_fund_preparation` in this stage before spending the remaining free allowance: when `available` is true, it mirrors top-up `urgency`, `urgency_score`, and `urgency_reasons`; when `recommended` is true, `quote_command` creates an authenticated live-money quote/payment object but does not pay, settle a wallet transfer, debit credits, call a provider, or write media. When that quote is copy-runnable, `data.self_fund_next_command` aliases it with a `pre_wall_...` label such as `pre_wall_browserless_agent_payable_quote`, so you can open the quote path before the quota wall. Only a later buy/payment step can spend money. When `data.guide_warning.next_command_safety` is `live_media_create_credit_debit` and `data.no_spend_evaluation.stop_here` is `true`, `data.next_command` is the live create: run it only if media spend is allowed, otherwise stop before it and run `data.recommended_no_spend_command` for no-spend proof. The no-spend command is an authenticated hosted dry-run: it may create a recoverable `job.planned` receipt, but it has no provider call, credit debit, downloadable asset, or media write.
|
|
43
43
|
|
|
44
44
|
When `data.stage` is `quota_required`, `data.self_fund_handoff` mirrors top-up `urgency`, `urgency_score`, and `urgency_reasons`, and exposes `first_safe_command` with a no-spend inspection effect. Run that no-spend command first when you need to inspect rails or stay below delegated spend authority before opening the live-money quote path.
|
|
45
45
|
|
|
@@ -206,10 +206,13 @@ When `create --guide` reaches `ready_to_create`, inspect
|
|
|
206
206
|
`data.self_fund_preparation` before consuming the remaining free allowance. If
|
|
207
207
|
it is available, `urgency`, `urgency_score`, and `urgency_reasons` mirror
|
|
208
208
|
`data.checks.quota.top_up`; if it is recommended, `quote_command` is the
|
|
209
|
-
pre-wall browserless x402 quote path
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
209
|
+
pre-wall browserless x402 quote path. When copy-runnable,
|
|
210
|
+
`data.self_fund_next_command` aliases that quote and
|
|
211
|
+
`data.self_fund_next_command_label` uses a `pre_wall_...` label. The command
|
|
212
|
+
creates an authenticated live-money quote/payment object without paying,
|
|
213
|
+
settling a wallet transfer, debiting credits, calling a provider, or writing
|
|
214
|
+
media. Only follow the later buy/status/wallet-settlement commands when
|
|
215
|
+
delegated spend is allowed.
|
|
213
216
|
For the browserless x402 path, `data.self_fund_handoff.wallet_settlement` names
|
|
214
217
|
the payable-instructions fields to read after `credits buy` or `credits status`,
|
|
215
218
|
plus the Base/USDC exact-amount and deposit-address fields. Use a delegated
|
|
@@ -250,8 +250,12 @@ step.
|
|
|
250
250
|
`urgency_reasons`; when `recommended` is true, `quote_command` creates an
|
|
251
251
|
authenticated live-money quote/payment object without paying, settling a
|
|
252
252
|
wallet transfer, debiting credits, calling a provider, or writing media.
|
|
253
|
-
|
|
254
|
-
|
|
253
|
+
When that recommended quote is copy-runnable, `data.self_fund_next_command`
|
|
254
|
+
aliases it and `data.self_fund_next_command_label` uses a `pre_wall_...`
|
|
255
|
+
label such as `pre_wall_browserless_agent_payable_quote`, so agents can open
|
|
256
|
+
the top-up quote path before consuming their remaining free allowance. Only
|
|
257
|
+
follow later buy/status/wallet-settlement commands when delegated spend is
|
|
258
|
+
allowed. `data.next_command_effect.label` is
|
|
255
259
|
`live_media_create_credit_debit`, with
|
|
256
260
|
`provider_call`, `hosted_create`, `credit_debit`, and `media_write` all true.
|
|
257
261
|
`data.guide_warning.next_command_safety` is
|
|
@@ -62,7 +62,7 @@ First-run guide loop:
|
|
|
62
62
|
2. Read data.guide_warning, then follow data.next_command when its next_command_safety is safe for the current spend policy. Prefer data.guide_recovery for no-doc recovery: data.guide_recovery.no_spend_command_field and data.guide_recovery.no_spend_command name the safest no-spend command, data.guide_recovery.live_create_command_field and data.guide_recovery.live_payment_command_field name fields that would spend, and data.guide_recovery.double_spend_guard tells you when to check error.recovery, jobs, activity, or payment status before any live retry. Do not run doctor, models list, signup, whoami, quota, dry-run, or payment commands as a setup checklist before the guide asks for them.
|
|
63
63
|
3. If data.stage is prompt_required, rerun data.next_command with the real prompt.
|
|
64
64
|
4. If data.stage is auth_required, data.auth_ready.ready is false and data.guide_warning.next_command_safety is hosted_signup_no_spend_setup. Run data.next_command, then rerun the guide once. Hosted signup saves the restricted token to the public CLI config by default with 0600 permissions. If the configured config path is blocked, data.next_command sets IMAGE_SKILL_CONFIG_PATH="$PWD/.image-skill/config.json" and still runs a saved-config signup; do not switch to raw-token handoff unless recovery explicitly requires it. If the runtime intentionally uses --no-save --show-token, store the returned token in the agent runtime secret store, then rerun with IMAGE_SKILL_TOKEN or --token-stdin; data.auth_handoff.rerun_guide.with_env and data.auth_handoff.rerun_guide.with_stdin are copy-safe templates for that mode. Signup is anonymous by default: no contact inbox is required to get a restricted token. The optional --agent-contact flag takes an email-shaped durable contact inbox for the restricted agent identity, not a requirement to find an individual human; attach one later with image-skill claim request --contact INBOX --json when funding or durability makes it worth having. Hosted signup returns the raw restricted token only when --show-token is set, and only once. When providing a contact, use an agent-owned inbox when available; otherwise use an operator, team, or sponsor inbox that can receive future claim, billing, or abuse notices. Never invent an inbox or borrow an unrelated human email just to fill the flag — omit it instead. example.invalid addresses are only appropriate inside documented harness or proof runs. --human-email remains accepted as a compatibility alias, but the guide must not teach it. Anonymous signups mint a fresh agent identity on every call; reuse the saved config instead of re-running signup. --save is accepted as a compatibility no-op for the default save behavior; use --no-save only when the runtime has a separate secret store and does not want local config.
|
|
65
|
-
5. At any guide stage, read data.checks.quota.top_up. When available is true, it includes recommended, recommendation_reason, preferred_payment_method, quote_command, quote_command_copy_runnable, quote_command_effect, and quote/buy/status command templates for the browserless x402 top-up path; recommended and urgency say whether to act now. On quota/payment recovery errors, read error.recovery.top_up: when delegated live-money quoting is allowed, prefer error.recovery.top_up.quote_command to open the top-up path, and use error.recovery.suggested_command for no-spend payment-method inspection. If data.stage is quota_required, data.guide_warning.next_command_safety is live_money_payment_action and data.guide_warning.payment_top_up_path summarizes the live-money path. Run data.self_fund_next_command to start the top-up. It aliases data.next_command and is the first payment command, usually an x402 or Stripe quote. First read data.checks.payments.preferred_method_summary.top_up_path: browserless_agent_self_fund means a wallet-equipped agent can complete the preferred live-money rail without a browser; human_payment_handoff means the agent can create the payment attempt but a human/browser step must complete before credits are granted. If the guide authenticated from env or stdin, prefer data.self_fund_handoff.auth.next_command.with_env or data.self_fund_handoff.auth.next_command.with_stdin so auth follows the payment command. Then follow data.self_fund_handoff.payment_commands.buy and status, and rerun data.self_fund_handoff.after_next once credits are granted. If data.stage is ready_to_create, inspect data.self_fund_preparation before consuming the remaining free allowance; it mirrors top-up urgency, urgency_score, and urgency_reasons. When available and recommended are true, data.self_fund_preparation.quote_command is the pre-wall browserless x402 quote
|
|
65
|
+
5. At any guide stage, read data.checks.quota.top_up. When available is true, it includes recommended, recommendation_reason, preferred_payment_method, quote_command, quote_command_copy_runnable, quote_command_effect, and quote/buy/status command templates for the browserless x402 top-up path; recommended and urgency say whether to act now. On quota/payment recovery errors, read error.recovery.top_up: when delegated live-money quoting is allowed, prefer error.recovery.top_up.quote_command to open the top-up path, and use error.recovery.suggested_command for no-spend payment-method inspection. If data.stage is quota_required, data.guide_warning.next_command_safety is live_money_payment_action and data.guide_warning.payment_top_up_path summarizes the live-money path. Run data.self_fund_next_command to start the top-up. It aliases data.next_command and is the first payment command, usually an x402 or Stripe quote. First read data.checks.payments.preferred_method_summary.top_up_path: browserless_agent_self_fund means a wallet-equipped agent can complete the preferred live-money rail without a browser; human_payment_handoff means the agent can create the payment attempt but a human/browser step must complete before credits are granted. If the guide authenticated from env or stdin, prefer data.self_fund_handoff.auth.next_command.with_env or data.self_fund_handoff.auth.next_command.with_stdin so auth follows the payment command. Then follow data.self_fund_handoff.payment_commands.buy and status, and rerun data.self_fund_handoff.after_next once credits are granted. If data.stage is ready_to_create, inspect data.self_fund_preparation before consuming the remaining free allowance; it mirrors top-up urgency, urgency_score, and urgency_reasons. When available and recommended are true, data.self_fund_preparation.quote_command is the pre-wall browserless x402 quote and, when copy-runnable, data.self_fund_next_command aliases it with a pre_wall label such as pre_wall_browserless_agent_payable_quote. The quote command creates an authenticated live-money quote/payment object, but data.self_fund_preparation.quote_command_effect must show no provider call, no hosted create, no credit debit, no media write, and no wallet settlement until a later buy/payment step. One Image Skill credit is $0.01. Credit quotes grant prepaid value units; create/edit operations debit model-priced credits reported as cost.credit_pricing. Starter preview currently gives bounded free-preview credits plus a four-job daily cap.
|
|
66
66
|
5a. When data.stage is quota_required, data.self_fund_handoff mirrors top-up urgency, urgency_score, and urgency_reasons, and exposes first_safe_command plus first_safe_command_effect. Run first_safe_command, usually image-skill credits methods --json, for no-spend rail inspection before quote/buy when delegated spend authority is absent or unclear.
|
|
67
67
|
6. If data.stage is ready_to_create, data.next_command is the first bounded live create. data.guide_warning.next_command_safety must be live_media_create_credit_debit, data.guide_warning.no_spend_safe must be false, data.guide_warning.spend_required must be true, and data.guide_warning.recommended_command_field must be recommended_no_spend_command. data.auth_ready.ready and data.auth_ready.next_command_auth_ready must be true; data.auth_ready.next_command_requires_auth must be true, and the command can reuse saved config, IMAGE_SKILL_TOKEN, or --token-stdin context without exposing a raw token. data.next_command_effect.label must be live_media_create_credit_debit and its provider_call, hosted_create, credit_debit, and media_write flags are true. data.no_spend_evaluation.stop_here must be true, data.no_spend_evaluation.next_command_is_live_create must be true, and data.no_spend_evaluation.recommended_command_field must be recommended_no_spend_command. Run data.next_command only when media spend is allowed. In no-spend evaluations, or when you only need to prove readiness without media/provider work, stop before data.next_command and run data.recommended_no_spend_command instead. data.recommended_no_spend_command must equal data.no_spend_next_command. data.no_spend_next_command_effect.label must be dry_run_planned_job_no_provider_call_no_credit_debit_no_media_write: no_spend, hosted_create_dry_run, planned_job, and plan_receipt are true; activity_event is job.planned; provider_call, credit_debit, and media_write are false. This dry-run may create a recoverable planned job/activity receipt but no provider execution, debit, downloadable asset, or media write. If the guide authenticated from env or stdin, prefer data.auth_handoff.next_command.with_env or data.auth_handoff.next_command.with_stdin so auth follows the live create. In guide cost output, cost.estimated_usd_per_image and cost.estimated_debit_usd_per_image are the Image Skill debit dollars for one output; cost.estimated_provider_usd_per_image is only the upstream provider estimate. Use the guide's returned max_estimated_usd_per_image because it is sized to the credit debit the agent funds. Add --output-count N only after models show confirms the selected create model supports more than one output; credit_pricing.credits_required is the total debit across outputs, while max_estimated_usd_per_image remains a per-image Image Skill debit guard.
|
|
68
68
|
7. After create, prefer data.next_actions when present: inspect_job and inspect_asset are copy-runnable no-spend recovery commands, iterate_edit is the reusable-asset edit template, and self_fund is the promoted top-up quote handoff when quota.top_up.available is true. self_fund.recommended plus urgency, urgency_score, and urgency_reasons say whether to act now, and self_fund exposes first_safe_command plus first_safe_command_effect for no-spend rail inspection before quote/buy. self_fund.quote_command is copy-runnable and omits --idempotency-key so the public CLI generates and returns one for retry safety; follow the quote response into buy/status. Otherwise use image-skill jobs show JOB_ID to recover status, cost, safety, timestamps, and final assets; image-skill assets get ASSET_URL_OR_ID --output ./result.png to fetch the generated asset without repeating provider work; and image-skill activity list --subject JOB_ID to find ledger events, trace, usage, asset links, and any data.next_actions.self_fund handoff to cite or follow. Hosted asset-id assets show/get may also return data.next_actions.self_fund after generated work, so inspect that field before ending the session.
|