luxin-cli 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -6,6 +6,38 @@ provenance; this file is the human- and agent-readable release map.
6
6
 
7
7
  ## Unreleased
8
8
 
9
+ ## 0.2.2 - 2026-07-30
10
+
11
+ - Release (retention/self-fund): publish the human handoff from #2181. New verb
12
+ `luxin claim code` mints a single-use, 15-minute dashboard link for the
13
+ authenticated agent's human and hands back `data.dashboard_url` — give your
14
+ human that link and they can watch your work and fund your credits there,
15
+ signing in with nothing but the link (no email, no password, no provider
16
+ billing setup). The mint envelope teaches the handoff in-band rather than only
17
+ in docs: `data.human_handoff` carries
18
+ `share_field: "data.dashboard_url"` and `never_share: ["token", "code"]`
19
+ alongside a warning with the same sentence, so an agent that never reads
20
+ `cli.md` still learns to send the link and nothing else. The code rides in the
21
+ URL fragment (`#code=...`), which browsers never send to a server, so sharing
22
+ the link intact keeps the credential out of server logs and analytics.
23
+ - Release (activation): create and edit successes that produced real durable
24
+ media now carry `data.next_actions.share_with_human` — the same copy-runnable
25
+ `luxin claim code --json`, typed no-spend like the existing `inspect_job` /
26
+ `inspect_asset` / `iterate_edit` / `self_fund` actions — so the handoff is
27
+ offered at the moment finished work exists to show. Dry runs never carry it:
28
+ inviting a human to look at a plan is the wrong moment for the funding ask.
29
+ - Release (contract surfaces): `luxin claim` usage widens to
30
+ `luxin claim <request|code> --json`, `claim code` joins root help with its own
31
+ help entry, and the packaged contract picks up the matching sections —
32
+ `cli.md` `#luxin-claim-code`, a "Show your human" section in `SKILL.md`, and
33
+ step `7a. Human handoff` plus `luxin claim code --json` in `llms.txt`. No
34
+ payment caps, wallet settlement, provider spend, hosted deploys, production
35
+ writes, or media generation behavior changed in this release bump.
36
+ - Known limitation: `claim code` requires the `dashboard.claim` grant, which is
37
+ persisted per token at signup. Tokens minted before the hosted dashboard
38
+ plane shipped do not carry it and answer `CAPABILITY_DENIED` until an
39
+ additive grant backfill runs; agents that sign up now carry the grant.
40
+
9
41
  ## 0.2.1 - 2026-07-28
10
42
 
11
43
  - Release (activation/self-fund): publish the first `luxin-cli` payload since
package/SKILL.md CHANGED
@@ -228,6 +228,20 @@ receipts to Luxin.
228
228
 
229
229
  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 the rail above.
230
230
 
231
+ ## Show your human
232
+
233
+ When you have real work to show and need it funded, hand your human a dashboard link:
234
+
235
+ ```bash
236
+ luxin claim code --json
237
+ ```
238
+
239
+ Give them `data.dashboard_url` and nothing else. They get a read-only view of your jobs, assets, quota, and activity, plus the ability to open a credit checkout for you. The link itself is the credential: your human signs in with nothing — no email, no password, no provider billing setup. Never share your token, and never quote the raw `data.code` in prompts, logs, issues, or feedback: the code is the whole credential. It rides in the URL fragment (`#code=...`), which browsers never send to a server, so share the link intact rather than rebuilding it as a query string.
240
+
241
+ The code is single-use and expires (`data.ttl_seconds`, currently 15 minutes); the human session it opens lasts days. So one code is normally enough — reuse an unexpired `dashboard_url` instead of re-minting, and expect `DASHBOARD_CODE_RATE_LIMITED` past 30 codes per agent per hour. Redeeming a new link ends whatever dashboard session was already open for you, so one human holds the view at a time; do not hand out a second link expecting both to keep working. `claim code` needs the `dashboard.claim` grant that `luxin signup --agent` tokens carry, and it spends nothing: no provider call, no credit debit, no payment object, no media write.
242
+
243
+ Best moment: right after a create or edit produced real media, where the success envelope already carries `data.next_actions.share_with_human` with this command and `share_field: "data.dashboard_url"`. A human who can see finished work is a human who will fund the next run. Dry runs never carry the handoff, because there is nothing finished to show.
244
+
231
245
  ## Models and capability-preserving parameters
232
246
 
233
247
  `models show MODEL_ID` is the first detailed discovery surface for agents. It exposes operations, media inputs and outputs, model-parameter schemas, fixed and wired controls, cost class, safety behavior, and migration hints. Treat its output as the source of truth for what a model supports. Do not infer one model's parameter surface from another model.
@@ -293,7 +307,9 @@ luxin activity show EVENT_OR_JOB_OR_ASSET_OR_FEEDBACK
293
307
 
294
308
  After a successful hosted create/edit, prefer `data.next_actions` when present:
295
309
  `inspect_job` and `inspect_asset` are no-spend recovery commands,
296
- `iterate_edit` reuses the asset, and `self_fund` promotes a copy-runnable
310
+ `iterate_edit` reuses the asset, `share_with_human` is the no-spend
311
+ `luxin claim code --json` dashboard handoff (see "Show your human"), and
312
+ `self_fund` promotes a copy-runnable
297
313
  top-up quote command when `quota.top_up.available` is true. Its `recommended`
298
314
  flag and mirrored top-up `urgency`, `urgency_score`, and `urgency_reasons` say
299
315
  whether the agent should act now, while `first_safe_command` plus
package/bin/luxin.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.2.1";
18
+ const VERSION = "0.2.2";
19
19
  const PACKAGE_NAME = "luxin";
20
20
  const DEFAULT_API_BASE_URL = "https://api.luxin.sh";
21
21
  const DEFAULT_DOCS_BASE_URL = "https://luxin.sh";
@@ -338,6 +338,7 @@ function commandHelpByKey(key) {
338
338
  "trust",
339
339
  "signup --agent --agent-name NAME --runtime RUNTIME",
340
340
  "claim request --contact INBOX",
341
+ "claim code",
341
342
  "whoami",
342
343
  "usage quota",
343
344
  "quota",
@@ -400,9 +401,9 @@ function commandHelpByKey(key) {
400
401
  },
401
402
  claim: {
402
403
  command: "luxin claim help",
403
- usage: "luxin claim request --contact AGENT_OR_OPERATOR_INBOX --json",
404
+ usage: "luxin claim <request|code> --json",
404
405
  docs_url: "https://luxin.sh/cli.md#luxin-claim-request",
405
- subcommands: ["request"],
406
+ subcommands: ["request", "code"],
406
407
  },
407
408
  "claim request": {
408
409
  command: "luxin claim request help",
@@ -411,6 +412,14 @@ function commandHelpByKey(key) {
411
412
  required_flags: ["--contact"],
412
413
  optional_flags: ["--token-stdin"],
413
414
  },
415
+ "claim code": {
416
+ command: "luxin claim code help",
417
+ usage: "luxin claim code --json",
418
+ docs_url: "https://luxin.sh/cli.md#luxin-claim-code",
419
+ description:
420
+ "Mint a single-use, short-lived dashboard link and hand data.dashboard_url to your human: they can watch your work and fund your credits there. No inputs beyond auth; no spend.",
421
+ optional_flags: ["--token-stdin"],
422
+ },
414
423
  auth: {
415
424
  command: "luxin auth help",
416
425
  usage: "luxin auth <status|save|logout> --json",
@@ -965,12 +974,15 @@ async function signup(argv) {
965
974
  // unclaimed; attaching a contact is not inbox-ownership verification.
966
975
  async function claim(argv) {
967
976
  const [subcommand, ...rest] = argv;
977
+ if (subcommand === "code") {
978
+ return await claimCode(rest);
979
+ }
968
980
  if (subcommand !== "request") {
969
981
  return failure(
970
982
  "luxin claim",
971
983
  2,
972
984
  "INVALID_ARGUMENTS",
973
- "claim requires the request subcommand",
985
+ "claim requires the request or code subcommand",
974
986
  false,
975
987
  {
976
988
  suggested_command: CLAIM_REQUEST_SUGGESTED_COMMAND,
@@ -1008,6 +1020,25 @@ async function claim(argv) {
1008
1020
  });
1009
1021
  }
1010
1022
 
1023
+ // Claim code (#2088 S1d): mints the single-use, short-TTL dashboard link the
1024
+ // agent hands to its HUMAN — they watch the work and fund the credits there.
1025
+ // The code rides in the URL fragment of data.dashboard_url, which never
1026
+ // reaches servers, logs, or analytics. Hand over the link and nothing else.
1027
+ async function claimCode(argv) {
1028
+ const args = parseArgs(argv);
1029
+ const token = await resolveToken(args);
1030
+ if (!token.ok) {
1031
+ return token.result;
1032
+ }
1033
+ return apiRequest({
1034
+ command: "luxin claim code",
1035
+ method: "POST",
1036
+ apiBaseUrl: apiBase(args),
1037
+ path: "/v1/dashboard-codes",
1038
+ token: token.token,
1039
+ });
1040
+ }
1041
+
1011
1042
  function rewriteSignupContactFailure(result) {
1012
1043
  const error = result.envelope.error;
1013
1044
  if (
package/cli.md CHANGED
@@ -175,6 +175,68 @@ printf '%s\n' "$IMAGE_SKILL_TOKEN" | luxin usage quota --token-stdin --json
175
175
  `--api-base-url` is an advanced preview/test override; production public agents
176
176
  should omit it.
177
177
 
178
+ ### `luxin claim code`
179
+
180
+ Mints a single-use, short-lived dashboard link for the authenticated agent's
181
+ human. This is the human handoff: give `data.dashboard_url` to your human and
182
+ they can watch your work and fund your credits there. The link itself is the
183
+ credential: your human signs in with nothing — no email, no password, no
184
+ provider billing setup.
185
+
186
+ ```bash
187
+ luxin claim code --json
188
+ ```
189
+
190
+ ```json
191
+ {
192
+ "ok": true,
193
+ "command": "luxin claim code",
194
+ "data": {
195
+ "mode": "hosted_auth",
196
+ "agent_id": "agt_...",
197
+ "code": "dc_...",
198
+ "dashboard_url": "https://luxin.sh/dashboard#code=dc_...",
199
+ "expires_at": "2026-07-30T18:15:00.000Z",
200
+ "ttl_seconds": 900,
201
+ "single_use": true,
202
+ "human_handoff": {
203
+ "purpose": "hand_dashboard_link_to_human",
204
+ "audience": "human",
205
+ "share_field": "data.dashboard_url",
206
+ "message": "give dashboard_url to your human: they can watch your work and fund your credits there. Send the link only — never your token, and never the raw code.",
207
+ "never_share": ["token", "code"]
208
+ }
209
+ }
210
+ }
211
+ ```
212
+
213
+ Hand over `data.dashboard_url` and nothing else. Never hand over your token,
214
+ and never quote the raw `data.code` in prompts, logs, issue text, or feedback:
215
+ the code is the whole credential. The code travels in the URL fragment
216
+ (`#code=...`), which browsers never send to a server, so it stays out of server
217
+ logs and analytics — keep it that way by sharing the link intact rather than
218
+ rebuilding it as a query string.
219
+
220
+ The code is single-use and expires (`data.ttl_seconds`, currently 15 minutes).
221
+ The dashboard is read-only over your work — jobs, assets, quota, activity — plus
222
+ the ability to open a credit checkout for you. It cannot create, edit, upload,
223
+ or spend as you. Once your human has opened the link their session lasts days,
224
+ so one code is normally all that is needed; mint a fresh one when the link
225
+ expires unused. Redeeming a new link ends whatever dashboard session was
226
+ already open for you, so one human holds the view at a time — do not hand out
227
+ a second link expecting both to keep working. Minting is capped at 30 codes per
228
+ agent per hour and answers `DASHBOARD_CODE_RATE_LIMITED` past that — reuse an
229
+ unexpired `dashboard_url` instead of re-minting per message.
230
+
231
+ `claim code` requires the `dashboard.claim` grant, which restricted tokens
232
+ minted by `luxin signup --agent` carry. It never spends: no provider call, no
233
+ credit debit, no payment object, no media write.
234
+
235
+ Best moment to run it: right after a create or edit produced real media. That
236
+ success envelope carries `data.next_actions.share_with_human` with this exact
237
+ command, because a human who can see finished work is a human who will fund the
238
+ next run.
239
+
178
240
  ### First Run Guide Loop
179
241
 
180
242
  Use the no-spend guide first. It is the only required first command for a fresh
@@ -1642,6 +1704,13 @@ The quote command omits `--idempotency-key` so the public CLI generates and
1642
1704
  returns one for retry safety before the agent follows the quote response into
1643
1705
  `credits buy` and `credits status`.
1644
1706
 
1707
+ When a create or edit produced a real durable asset, the same envelope carries
1708
+ `data.next_actions.share_with_human`: a no-spend, copy-runnable
1709
+ `luxin claim code --json` plus `share_field: "data.dashboard_url"`. Run it and
1710
+ hand your human the resulting `dashboard_url` — they can watch this work and
1711
+ fund your credits from it. Dry runs never carry it, because there is nothing
1712
+ finished to show.
1713
+
1645
1714
  Provider/model names in this paragraph are preview provenance, not the primary
1646
1715
  public UX. The public selection surface should be Luxin capabilities and
1647
1716
  model-parameter schemas; provider/model details belong in explicit
package/commands.json CHANGED
@@ -33,7 +33,7 @@
33
33
  "surface": "hosted_cli",
34
34
  "mutation": true,
35
35
  "spend": false,
36
- "subcommands": ["request"]
36
+ "subcommands": ["request", "code"]
37
37
  },
38
38
  {
39
39
  "id": "whoami",
@@ -166,6 +166,7 @@
166
166
  "trust",
167
167
  "signup --agent --agent-name NAME --runtime RUNTIME",
168
168
  "claim request --contact INBOX",
169
+ "claim code",
169
170
  "whoami",
170
171
  "usage quota",
171
172
  "quota",
@@ -238,9 +239,9 @@
238
239
  "key": "claim",
239
240
  "help": {
240
241
  "command": "luxin claim help",
241
- "usage": "luxin claim request --contact AGENT_OR_OPERATOR_INBOX --json",
242
+ "usage": "luxin claim <request|code> --json",
242
243
  "docs_url": "https://luxin.sh/cli.md#luxin-claim-request",
243
- "subcommands": ["request"]
244
+ "subcommands": ["request", "code"]
244
245
  }
245
246
  },
246
247
  {
@@ -253,6 +254,16 @@
253
254
  "optional_flags": ["--token-stdin"]
254
255
  }
255
256
  },
257
+ {
258
+ "key": "claim code",
259
+ "help": {
260
+ "command": "luxin claim code help",
261
+ "usage": "luxin claim code --json",
262
+ "docs_url": "https://luxin.sh/cli.md#luxin-claim-code",
263
+ "description": "Mint a single-use, short-lived dashboard link and hand data.dashboard_url to your human: they can watch your work and fund your credits there. No inputs beyond auth; no spend.",
264
+ "optional_flags": ["--token-stdin"]
265
+ }
266
+ },
256
267
  {
257
268
  "key": "whoami",
258
269
  "help": {
package/llms.txt CHANGED
@@ -66,6 +66,7 @@ First-run guide loop:
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 luxin 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 Luxin 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 Luxin 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. When self_fund.recommended is true and the quote is copy-runnable, data.self_fund_next_command aliases data.next_actions.self_fund.quote_command and data.self_fund_next_command_effect proves the quote creates no provider call, hosted create, credit debit, media write, or wallet settlement. 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 luxin jobs show JOB_ID to recover status, cost, safety, timestamps, and final assets; luxin assets get ASSET_URL_OR_ID --output ./result.png to fetch the generated asset without repeating provider work; and luxin 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.
69
+ 7a. Human handoff. When a create or edit produced a real asset, data.next_actions.share_with_human offers the no-spend, copy-runnable command luxin claim code --json with share_field data.dashboard_url. Run it and give your human the returned data.dashboard_url: they get a read-only view of your jobs, assets, quota, and activity plus the ability to open a credit checkout for you. The link itself is the credential: your human signs in with nothing — no email, no password, no provider billing setup. Hand over data.dashboard_url only — never your token, and never the raw data.code, which is the whole credential; the code rides in the URL fragment (#code=...), which browsers never send to a server, so share the link intact instead of rebuilding it as a query string. The code is single-use and expires (data.ttl_seconds, currently 15 minutes) while the human session it opens lasts days, so one code is normally enough; reuse an unexpired dashboard_url rather than re-minting, since minting is capped at 30 codes per agent per hour (DASHBOARD_CODE_RATE_LIMITED past that). Redeeming a new link ends whatever dashboard session was already open for you, so one human holds the view at a time; do not hand out a second link expecting both to keep working. luxin claim code needs the dashboard.claim grant that luxin signup --agent tokens carry, and it spends nothing: no provider call, no credit debit, no payment object, no media write. Dry runs never carry the handoff because there is nothing finished to show.
69
70
  8. Leave luxin feedback create if the first-run flow is confusing, blocked, missing an affordance, or easier through a direct provider than through Luxin. Feedback auth uses saved config from default signup, IMAGE_SKILL_TOKEN, or --token-stdin; if signup or guide already saved config, run feedback create normally and do not copy a raw token. Never paste tokens into feedback title, body, evidence, issues, or logs. Use luxin activity show FEEDBACK_ID only when you need to confirm the feedback entered the hosted ledger.
70
71
 
71
72
  Manual escape hatches are not prerequisites. Use luxin doctor, luxin models list, luxin models show MODEL_ID, luxin whoami, luxin usage quota, luxin credits methods, luxin credits packs list, luxin credits quote, luxin credits buy, luxin credits status, luxin create --dry-run, and luxin edit --dry-run only when data.next_command or data.escape_hatches asks for them, or when the task genuinely needs deeper capability, quota, payment, or planning detail.
@@ -74,6 +75,7 @@ Core commands:
74
75
  - luxin doctor --json
75
76
  - luxin signup --agent --agent-name NAME --runtime RUNTIME --json
76
77
  - luxin claim request --contact AGENT_OR_OPERATOR_INBOX --json
78
+ - luxin claim code --json
77
79
  - luxin whoami --json
78
80
  - luxin usage quota --json
79
81
  - luxin quota --json (compatibility alias)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "luxin-cli",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
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. Luxin is a creative-media runtime, unrelated to the luxon datetime library.",
5
5
  "type": "module",
6
6
  "private": false,
package/skill.md CHANGED
@@ -228,6 +228,20 @@ receipts to Luxin.
228
228
 
229
229
  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 the rail above.
230
230
 
231
+ ## Show your human
232
+
233
+ When you have real work to show and need it funded, hand your human a dashboard link:
234
+
235
+ ```bash
236
+ luxin claim code --json
237
+ ```
238
+
239
+ Give them `data.dashboard_url` and nothing else. They get a read-only view of your jobs, assets, quota, and activity, plus the ability to open a credit checkout for you. The link itself is the credential: your human signs in with nothing — no email, no password, no provider billing setup. Never share your token, and never quote the raw `data.code` in prompts, logs, issues, or feedback: the code is the whole credential. It rides in the URL fragment (`#code=...`), which browsers never send to a server, so share the link intact rather than rebuilding it as a query string.
240
+
241
+ The code is single-use and expires (`data.ttl_seconds`, currently 15 minutes); the human session it opens lasts days. So one code is normally enough — reuse an unexpired `dashboard_url` instead of re-minting, and expect `DASHBOARD_CODE_RATE_LIMITED` past 30 codes per agent per hour. Redeeming a new link ends whatever dashboard session was already open for you, so one human holds the view at a time; do not hand out a second link expecting both to keep working. `claim code` needs the `dashboard.claim` grant that `luxin signup --agent` tokens carry, and it spends nothing: no provider call, no credit debit, no payment object, no media write.
242
+
243
+ Best moment: right after a create or edit produced real media, where the success envelope already carries `data.next_actions.share_with_human` with this command and `share_field: "data.dashboard_url"`. A human who can see finished work is a human who will fund the next run. Dry runs never carry the handoff, because there is nothing finished to show.
244
+
231
245
  ## Models and capability-preserving parameters
232
246
 
233
247
  `models show MODEL_ID` is the first detailed discovery surface for agents. It exposes operations, media inputs and outputs, model-parameter schemas, fixed and wired controls, cost class, safety behavior, and migration hints. Treat its output as the source of truth for what a model supports. Do not infer one model's parameter surface from another model.
@@ -293,7 +307,9 @@ luxin activity show EVENT_OR_JOB_OR_ASSET_OR_FEEDBACK
293
307
 
294
308
  After a successful hosted create/edit, prefer `data.next_actions` when present:
295
309
  `inspect_job` and `inspect_asset` are no-spend recovery commands,
296
- `iterate_edit` reuses the asset, and `self_fund` promotes a copy-runnable
310
+ `iterate_edit` reuses the asset, `share_with_human` is the no-spend
311
+ `luxin claim code --json` dashboard handoff (see "Show your human"), and
312
+ `self_fund` promotes a copy-runnable
297
313
  top-up quote command when `quota.top_up.available` is true. Its `recommended`
298
314
  flag and mirrored top-up `urgency`, `urgency_score`, and `urgency_reasons` say
299
315
  whether the agent should act now, while `first_safe_command` plus
@@ -228,6 +228,20 @@ receipts to Luxin.
228
228
 
229
229
  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 the rail above.
230
230
 
231
+ ## Show your human
232
+
233
+ When you have real work to show and need it funded, hand your human a dashboard link:
234
+
235
+ ```bash
236
+ luxin claim code --json
237
+ ```
238
+
239
+ Give them `data.dashboard_url` and nothing else. They get a read-only view of your jobs, assets, quota, and activity, plus the ability to open a credit checkout for you. The link itself is the credential: your human signs in with nothing — no email, no password, no provider billing setup. Never share your token, and never quote the raw `data.code` in prompts, logs, issues, or feedback: the code is the whole credential. It rides in the URL fragment (`#code=...`), which browsers never send to a server, so share the link intact rather than rebuilding it as a query string.
240
+
241
+ The code is single-use and expires (`data.ttl_seconds`, currently 15 minutes); the human session it opens lasts days. So one code is normally enough — reuse an unexpired `dashboard_url` instead of re-minting, and expect `DASHBOARD_CODE_RATE_LIMITED` past 30 codes per agent per hour. Redeeming a new link ends whatever dashboard session was already open for you, so one human holds the view at a time; do not hand out a second link expecting both to keep working. `claim code` needs the `dashboard.claim` grant that `luxin signup --agent` tokens carry, and it spends nothing: no provider call, no credit debit, no payment object, no media write.
242
+
243
+ Best moment: right after a create or edit produced real media, where the success envelope already carries `data.next_actions.share_with_human` with this command and `share_field: "data.dashboard_url"`. A human who can see finished work is a human who will fund the next run. Dry runs never carry the handoff, because there is nothing finished to show.
244
+
231
245
  ## Models and capability-preserving parameters
232
246
 
233
247
  `models show MODEL_ID` is the first detailed discovery surface for agents. It exposes operations, media inputs and outputs, model-parameter schemas, fixed and wired controls, cost class, safety behavior, and migration hints. Treat its output as the source of truth for what a model supports. Do not infer one model's parameter surface from another model.
@@ -293,7 +307,9 @@ luxin activity show EVENT_OR_JOB_OR_ASSET_OR_FEEDBACK
293
307
 
294
308
  After a successful hosted create/edit, prefer `data.next_actions` when present:
295
309
  `inspect_job` and `inspect_asset` are no-spend recovery commands,
296
- `iterate_edit` reuses the asset, and `self_fund` promotes a copy-runnable
310
+ `iterate_edit` reuses the asset, `share_with_human` is the no-spend
311
+ `luxin claim code --json` dashboard handoff (see "Show your human"), and
312
+ `self_fund` promotes a copy-runnable
297
313
  top-up quote command when `quota.top_up.available` is true. Its `recommended`
298
314
  flag and mirrored top-up `urgency`, `urgency_score`, and `urgency_reasons` say
299
315
  whether the agent should act now, while `first_safe_command` plus
@@ -175,6 +175,68 @@ printf '%s\n' "$IMAGE_SKILL_TOKEN" | luxin usage quota --token-stdin --json
175
175
  `--api-base-url` is an advanced preview/test override; production public agents
176
176
  should omit it.
177
177
 
178
+ ### `luxin claim code`
179
+
180
+ Mints a single-use, short-lived dashboard link for the authenticated agent's
181
+ human. This is the human handoff: give `data.dashboard_url` to your human and
182
+ they can watch your work and fund your credits there. The link itself is the
183
+ credential: your human signs in with nothing — no email, no password, no
184
+ provider billing setup.
185
+
186
+ ```bash
187
+ luxin claim code --json
188
+ ```
189
+
190
+ ```json
191
+ {
192
+ "ok": true,
193
+ "command": "luxin claim code",
194
+ "data": {
195
+ "mode": "hosted_auth",
196
+ "agent_id": "agt_...",
197
+ "code": "dc_...",
198
+ "dashboard_url": "https://luxin.sh/dashboard#code=dc_...",
199
+ "expires_at": "2026-07-30T18:15:00.000Z",
200
+ "ttl_seconds": 900,
201
+ "single_use": true,
202
+ "human_handoff": {
203
+ "purpose": "hand_dashboard_link_to_human",
204
+ "audience": "human",
205
+ "share_field": "data.dashboard_url",
206
+ "message": "give dashboard_url to your human: they can watch your work and fund your credits there. Send the link only — never your token, and never the raw code.",
207
+ "never_share": ["token", "code"]
208
+ }
209
+ }
210
+ }
211
+ ```
212
+
213
+ Hand over `data.dashboard_url` and nothing else. Never hand over your token,
214
+ and never quote the raw `data.code` in prompts, logs, issue text, or feedback:
215
+ the code is the whole credential. The code travels in the URL fragment
216
+ (`#code=...`), which browsers never send to a server, so it stays out of server
217
+ logs and analytics — keep it that way by sharing the link intact rather than
218
+ rebuilding it as a query string.
219
+
220
+ The code is single-use and expires (`data.ttl_seconds`, currently 15 minutes).
221
+ The dashboard is read-only over your work — jobs, assets, quota, activity — plus
222
+ the ability to open a credit checkout for you. It cannot create, edit, upload,
223
+ or spend as you. Once your human has opened the link their session lasts days,
224
+ so one code is normally all that is needed; mint a fresh one when the link
225
+ expires unused. Redeeming a new link ends whatever dashboard session was
226
+ already open for you, so one human holds the view at a time — do not hand out
227
+ a second link expecting both to keep working. Minting is capped at 30 codes per
228
+ agent per hour and answers `DASHBOARD_CODE_RATE_LIMITED` past that — reuse an
229
+ unexpired `dashboard_url` instead of re-minting per message.
230
+
231
+ `claim code` requires the `dashboard.claim` grant, which restricted tokens
232
+ minted by `luxin signup --agent` carry. It never spends: no provider call, no
233
+ credit debit, no payment object, no media write.
234
+
235
+ Best moment to run it: right after a create or edit produced real media. That
236
+ success envelope carries `data.next_actions.share_with_human` with this exact
237
+ command, because a human who can see finished work is a human who will fund the
238
+ next run.
239
+
178
240
  ### First Run Guide Loop
179
241
 
180
242
  Use the no-spend guide first. It is the only required first command for a fresh
@@ -1642,6 +1704,13 @@ The quote command omits `--idempotency-key` so the public CLI generates and
1642
1704
  returns one for retry safety before the agent follows the quote response into
1643
1705
  `credits buy` and `credits status`.
1644
1706
 
1707
+ When a create or edit produced a real durable asset, the same envelope carries
1708
+ `data.next_actions.share_with_human`: a no-spend, copy-runnable
1709
+ `luxin claim code --json` plus `share_field: "data.dashboard_url"`. Run it and
1710
+ hand your human the resulting `dashboard_url` — they can watch this work and
1711
+ fund your credits from it. Dry runs never carry it, because there is nothing
1712
+ finished to show.
1713
+
1645
1714
  Provider/model names in this paragraph are preview provenance, not the primary
1646
1715
  public UX. The public selection surface should be Luxin capabilities and
1647
1716
  model-parameter schemas; provider/model details belong in explicit
@@ -33,7 +33,7 @@
33
33
  "surface": "hosted_cli",
34
34
  "mutation": true,
35
35
  "spend": false,
36
- "subcommands": ["request"]
36
+ "subcommands": ["request", "code"]
37
37
  },
38
38
  {
39
39
  "id": "whoami",
@@ -166,6 +166,7 @@
166
166
  "trust",
167
167
  "signup --agent --agent-name NAME --runtime RUNTIME",
168
168
  "claim request --contact INBOX",
169
+ "claim code",
169
170
  "whoami",
170
171
  "usage quota",
171
172
  "quota",
@@ -238,9 +239,9 @@
238
239
  "key": "claim",
239
240
  "help": {
240
241
  "command": "luxin claim help",
241
- "usage": "luxin claim request --contact AGENT_OR_OPERATOR_INBOX --json",
242
+ "usage": "luxin claim <request|code> --json",
242
243
  "docs_url": "https://luxin.sh/cli.md#luxin-claim-request",
243
- "subcommands": ["request"]
244
+ "subcommands": ["request", "code"]
244
245
  }
245
246
  },
246
247
  {
@@ -253,6 +254,16 @@
253
254
  "optional_flags": ["--token-stdin"]
254
255
  }
255
256
  },
257
+ {
258
+ "key": "claim code",
259
+ "help": {
260
+ "command": "luxin claim code help",
261
+ "usage": "luxin claim code --json",
262
+ "docs_url": "https://luxin.sh/cli.md#luxin-claim-code",
263
+ "description": "Mint a single-use, short-lived dashboard link and hand data.dashboard_url to your human: they can watch your work and fund your credits there. No inputs beyond auth; no spend.",
264
+ "optional_flags": ["--token-stdin"]
265
+ }
266
+ },
256
267
  {
257
268
  "key": "whoami",
258
269
  "help": {
@@ -66,6 +66,7 @@ First-run guide loop:
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 luxin 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 Luxin 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 Luxin 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. When self_fund.recommended is true and the quote is copy-runnable, data.self_fund_next_command aliases data.next_actions.self_fund.quote_command and data.self_fund_next_command_effect proves the quote creates no provider call, hosted create, credit debit, media write, or wallet settlement. 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 luxin jobs show JOB_ID to recover status, cost, safety, timestamps, and final assets; luxin assets get ASSET_URL_OR_ID --output ./result.png to fetch the generated asset without repeating provider work; and luxin 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.
69
+ 7a. Human handoff. When a create or edit produced a real asset, data.next_actions.share_with_human offers the no-spend, copy-runnable command luxin claim code --json with share_field data.dashboard_url. Run it and give your human the returned data.dashboard_url: they get a read-only view of your jobs, assets, quota, and activity plus the ability to open a credit checkout for you. The link itself is the credential: your human signs in with nothing — no email, no password, no provider billing setup. Hand over data.dashboard_url only — never your token, and never the raw data.code, which is the whole credential; the code rides in the URL fragment (#code=...), which browsers never send to a server, so share the link intact instead of rebuilding it as a query string. The code is single-use and expires (data.ttl_seconds, currently 15 minutes) while the human session it opens lasts days, so one code is normally enough; reuse an unexpired dashboard_url rather than re-minting, since minting is capped at 30 codes per agent per hour (DASHBOARD_CODE_RATE_LIMITED past that). Redeeming a new link ends whatever dashboard session was already open for you, so one human holds the view at a time; do not hand out a second link expecting both to keep working. luxin claim code needs the dashboard.claim grant that luxin signup --agent tokens carry, and it spends nothing: no provider call, no credit debit, no payment object, no media write. Dry runs never carry the handoff because there is nothing finished to show.
69
70
  8. Leave luxin feedback create if the first-run flow is confusing, blocked, missing an affordance, or easier through a direct provider than through Luxin. Feedback auth uses saved config from default signup, IMAGE_SKILL_TOKEN, or --token-stdin; if signup or guide already saved config, run feedback create normally and do not copy a raw token. Never paste tokens into feedback title, body, evidence, issues, or logs. Use luxin activity show FEEDBACK_ID only when you need to confirm the feedback entered the hosted ledger.
70
71
 
71
72
  Manual escape hatches are not prerequisites. Use luxin doctor, luxin models list, luxin models show MODEL_ID, luxin whoami, luxin usage quota, luxin credits methods, luxin credits packs list, luxin credits quote, luxin credits buy, luxin credits status, luxin create --dry-run, and luxin edit --dry-run only when data.next_command or data.escape_hatches asks for them, or when the task genuinely needs deeper capability, quota, payment, or planning detail.
@@ -74,6 +75,7 @@ Core commands:
74
75
  - luxin doctor --json
75
76
  - luxin signup --agent --agent-name NAME --runtime RUNTIME --json
76
77
  - luxin claim request --contact AGENT_OR_OPERATOR_INBOX --json
78
+ - luxin claim code --json
77
79
  - luxin whoami --json
78
80
  - luxin usage quota --json
79
81
  - luxin quota --json (compatibility alias)