image-skill 0.1.4 → 0.1.6

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/README.md CHANGED
@@ -16,7 +16,7 @@ Install the executable CLI from npm:
16
16
  ```bash
17
17
  npm install -g image-skill
18
18
  image-skill doctor --json
19
- image-skill signup --agent --human-email CONTACT_OR_SPONSOR_EMAIL --agent-name creative-agent --runtime openclaw --save --json
19
+ image-skill signup --agent --agent-contact CONTACT_OR_SPONSOR_INBOX --agent-name creative-agent --runtime openclaw --save --json
20
20
  image-skill credits methods --json
21
21
  image-skill credits packs list --json
22
22
  image-skill credits quote --pack starter-500 --payment-method stripe_checkout --idempotency-key first-topup-001 --json
@@ -24,6 +24,8 @@ image-skill credits buy --provider stripe --quote-id quote_... --idempotency-key
24
24
  image-skill create --prompt "A tiny studio robot painting a postcard" --model xai.grok-imagine-image --accept-unknown-cost --json
25
25
  ```
26
26
 
27
+ The public CLI supports Node.js 20 and newer.
28
+
27
29
  Agent-facing contracts:
28
30
 
29
31
  - [skills/image-skill/SKILL.md](./skills/image-skill/SKILL.md)
@@ -7,7 +7,7 @@ import { Readable } from "node:stream";
7
7
  import { pipeline } from "node:stream/promises";
8
8
  import os from "node:os";
9
9
 
10
- const VERSION = "0.1.4";
10
+ const VERSION = "0.1.6";
11
11
  const DEFAULT_API_BASE_URL = "https://api.image-skill.com";
12
12
  const DEFAULT_CONFIG_PATH = join(
13
13
  process.env.XDG_CONFIG_HOME ?? join(os.homedir(), ".config"),
@@ -15,9 +15,9 @@ const DEFAULT_CONFIG_PATH = join(
15
15
  "config.json",
16
16
  );
17
17
  const SIGNUP_SUGGESTED_COMMAND =
18
- "image-skill signup --agent --human-email CONTACT_OR_SPONSOR_EMAIL --agent-name NAME --runtime RUNTIME --save --json";
18
+ "image-skill signup --agent --agent-contact CONTACT_OR_SPONSOR_INBOX --agent-name NAME --runtime RUNTIME --save --json";
19
19
  const SIGNUP_CONTACT_GUIDANCE =
20
- "Use --human-email for the accountable contact or sponsor inbox for this restricted agent identity. If no individual human is in the loop, use a durable operator/team/agent inbox that can receive future claim, billing, or abuse notices; do not invent a person or use a throwaway inbox.";
20
+ "Use --agent-contact for the accountable contact, sponsor, operator, or agent inbox for this restricted agent identity. If no individual human is in the loop, use a durable operator/team/agent inbox that can receive future claim, billing, or abuse notices; do not invent a person or use a throwaway inbox. --human-email remains a compatibility alias.";
21
21
 
22
22
  const argv = process.argv.slice(2);
23
23
  const result = await main(argv);
@@ -39,7 +39,7 @@ async function main(rawArgv) {
39
39
  docs_url: "https://image-skill.com/cli.md",
40
40
  commands: [
41
41
  "doctor",
42
- "signup --agent --save",
42
+ "signup --agent --agent-contact --save",
43
43
  "auth status",
44
44
  "auth save",
45
45
  "auth logout",
@@ -173,18 +173,35 @@ async function signup(argv) {
173
173
  if (!flagBool(args, "agent")) {
174
174
  return invalid("image-skill signup", "signup currently requires --agent");
175
175
  }
176
- const humanEmail = flagString(args, "human-email");
176
+ const contact = signupContact(args);
177
177
  const agentName = flagString(args, "agent-name");
178
178
  const runtime = flagString(args, "runtime");
179
- if (humanEmail === null || agentName === null || runtime === null) {
179
+ if (!contact.ok) {
180
+ return failure(
181
+ "image-skill signup",
182
+ 2,
183
+ "INVALID_ARGUMENTS",
184
+ contact.message,
185
+ false,
186
+ {
187
+ required_flags: ["--agent-contact", "--agent-name", "--runtime"],
188
+ suggested_command: SIGNUP_SUGGESTED_COMMAND,
189
+ docs_url: "https://image-skill.com/cli.md#image-skill-signup-agent",
190
+ },
191
+ );
192
+ }
193
+ if (contact.value === null || agentName === null || runtime === null) {
180
194
  return failure(
181
195
  "image-skill signup",
182
196
  2,
183
197
  "INVALID_ARGUMENTS",
184
- `signup requires --human-email, --agent-name, and --runtime. ${SIGNUP_CONTACT_GUIDANCE}`,
198
+ `signup requires --agent-contact, --agent-name, and --runtime. ${SIGNUP_CONTACT_GUIDANCE}`,
185
199
  false,
186
200
  {
187
- required_flags: ["--human-email", "--agent-name", "--runtime"],
201
+ required_flags: ["--agent-contact", "--agent-name", "--runtime"],
202
+ accepted_aliases: {
203
+ "--human-email": "--agent-contact",
204
+ },
188
205
  suggested_command: SIGNUP_SUGGESTED_COMMAND,
189
206
  docs_url: "https://image-skill.com/cli.md#image-skill-signup-agent",
190
207
  },
@@ -198,7 +215,7 @@ async function signup(argv) {
198
215
  apiBaseUrl: apiBase(args),
199
216
  path: "/v1/agent-signups",
200
217
  body: {
201
- human_email: humanEmail,
218
+ human_email: contact.value,
202
219
  agent_name: agentName,
203
220
  runtime,
204
221
  return_token: save || showToken,
@@ -1280,6 +1297,49 @@ function flagBool(args, name) {
1280
1297
  return args.flags.has(name) && args.flags.get(name)?.at(-1) !== "false";
1281
1298
  }
1282
1299
 
1300
+ function signupContact(args) {
1301
+ if (
1302
+ args.flags.has("agent-contact") &&
1303
+ flagString(args, "agent-contact") === null
1304
+ ) {
1305
+ return {
1306
+ ok: false,
1307
+ value: null,
1308
+ message: "agent-contact requires a value",
1309
+ };
1310
+ }
1311
+ if (
1312
+ args.flags.has("human-email") &&
1313
+ flagString(args, "human-email") === null
1314
+ ) {
1315
+ return {
1316
+ ok: false,
1317
+ value: null,
1318
+ message: "human-email requires a value",
1319
+ };
1320
+ }
1321
+ const agentContact = flagString(args, "agent-contact");
1322
+ const humanEmail = flagString(args, "human-email");
1323
+ if (agentContact !== null && humanEmail !== null) {
1324
+ const normalizedAgentContact = agentContact.trim().toLowerCase();
1325
+ const normalizedHumanEmail = humanEmail.trim().toLowerCase();
1326
+ if (normalizedAgentContact !== normalizedHumanEmail) {
1327
+ return {
1328
+ ok: false,
1329
+ value: null,
1330
+ message:
1331
+ "signup received both --agent-contact and --human-email with different values; use one durable contact inbox",
1332
+ };
1333
+ }
1334
+ return { ok: true, value: normalizedAgentContact };
1335
+ }
1336
+ const value = agentContact ?? humanEmail;
1337
+ return {
1338
+ ok: true,
1339
+ value: value === null ? null : value.trim().toLowerCase(),
1340
+ };
1341
+ }
1342
+
1283
1343
  function flagNumber(args, name) {
1284
1344
  const value = flagString(args, name);
1285
1345
  if (value === null) {
package/cli.md CHANGED
@@ -54,7 +54,7 @@ Bootstraps restricted agent access.
54
54
 
55
55
  ```bash
56
56
  image-skill signup --agent \
57
- --human-email human@example.com \
57
+ --agent-contact agent-ops@example.com \
58
58
  --agent-name creative-agent \
59
59
  --runtime codex \
60
60
  --save \
@@ -66,13 +66,14 @@ permissions and redacts it from stdout. Use `--show-token` only when the agent
66
66
  runtime has a separate secret store and needs the raw token once. Do not paste
67
67
  tokens into prompts, logs, issue text, or feedback.
68
68
 
69
- In this preview contract, `--human-email` is the accountable contact or sponsor
70
- inbox for the restricted agent identity. If no individual human is in the loop,
71
- use a durable operator/team/agent inbox that can receive future claim, billing,
72
- or abuse notices. Do not invent a person or use a throwaway inbox.
69
+ In this preview contract, `--agent-contact` is the accountable contact,
70
+ sponsor, operator, or agent inbox for the restricted agent identity. If no
71
+ individual human is in the loop, use a durable operator/team/agent inbox that
72
+ can receive future claim, billing, or abuse notices. Do not invent a person or
73
+ use a throwaway inbox.
73
74
  `example.invalid` addresses are only appropriate inside documented harness or
74
- proof runs. Agent-contact-backed signup is planned, but the currently published
75
- CLI uses `--human-email`.
75
+ proof runs. `--human-email` remains accepted as a compatibility alias for
76
+ `--agent-contact`.
76
77
 
77
78
  For shell-based agent runtimes, store the token outside prompts and then expose
78
79
  it as:
@@ -235,6 +236,11 @@ image-skill credits quote \
235
236
  --json
236
237
  ```
237
238
 
239
+ Idempotency keys are scoped to the current hosted agent identity and exact
240
+ quote request. Reusing a key with different credits, pack, or payment method
241
+ returns a structured `error.recovery.suggested_command` with a fresh
242
+ idempotency key for the attempted quote terms.
243
+
238
244
  For Stripe Checkout terms, prefer a named pack:
239
245
 
240
246
  ```bash
package/llms.txt CHANGED
@@ -44,7 +44,7 @@ Claim states:
44
44
 
45
45
  First-run flow:
46
46
  1. image-skill doctor --json
47
- 2. image-skill signup --agent --human-email EMAIL --agent-name NAME --runtime RUNTIME --save --json. The preview hosted signup path currently requires human_email as the accountable contact or sponsor inbox for the restricted agent identity. If no individual human is in the loop, use a durable operator/team/agent inbox that can receive future claim, billing, or abuse notices; do not invent a person or use a throwaway inbox. example.invalid addresses are only appropriate inside documented harness or proof runs. Future payment-backed and agent-contact-backed signup paths are planned. Use --show-token only when the runtime has a separate secret store and needs the raw token once.
47
+ 2. image-skill signup --agent --agent-contact EMAIL --agent-name NAME --runtime RUNTIME --save --json. The preview hosted signup path uses --agent-contact as the accountable contact, sponsor, operator, or agent inbox for the restricted agent identity. If no individual human is in the loop, use a durable operator/team/agent inbox that can receive future claim, billing, or abuse notices; do not invent a person or use a throwaway inbox. example.invalid addresses are only appropriate inside documented harness or proof runs. --human-email remains accepted as a compatibility alias. Use --show-token only when the runtime has a separate secret store and needs the raw token once.
48
48
  3. Reuse the saved CLI auth for later commands, or store the returned data.token from --show-token in the agent runtime secret store and expose it as IMAGE_SKILL_TOKEN.
49
49
  4. image-skill whoami --json
50
50
  5. image-skill usage quota --json
@@ -67,7 +67,7 @@ First-run flow:
67
67
 
68
68
  Core commands:
69
69
  - image-skill doctor --json
70
- - image-skill signup --agent --human-email EMAIL --agent-name NAME --runtime RUNTIME --save --json
70
+ - image-skill signup --agent --agent-contact EMAIL --agent-name NAME --runtime RUNTIME --save --json
71
71
  - image-skill whoami --json
72
72
  - image-skill usage quota --json
73
73
  - image-skill quota --json (compatibility alias)
@@ -98,7 +98,7 @@ Core commands:
98
98
  - image-skill feedback create --type TYPE --title TITLE --body BODY --command COMMAND --expected EXPECTED --actual ACTUAL --proof-needed PROOF --surface cli,docs --evidence trace:TRACE_ID --severity medium --confidence high --next-state watch --json
99
99
 
100
100
  Hosted API endpoints:
101
- - POST https://api.image-skill.com/v1/agent-signups creates or rotates a restricted unclaimed agent token. Request human_email is the preview contact/sponsor inbox, not a requirement that an autonomous agent stop until a specific human is present. The response returns the token once as data.token. Store it in the agent runtime secret store; never put it in prompts, logs, issue text, or feedback.
101
+ - POST https://api.image-skill.com/v1/agent-signups creates or rotates a restricted unclaimed agent token. Raw API request human_email is the compatibility contact field; CLI agents should prefer --agent-contact. The contact is not a requirement that an autonomous agent stop until a specific human is present. The response returns the token once as data.token. Store it in the agent runtime secret store; never put it in prompts, logs, issue text, or feedback.
102
102
  - GET https://api.image-skill.com/v1/whoami returns durable hosted identity for Authorization: Bearer TOKEN.
103
103
  - GET https://api.image-skill.com/v1/quota returns durable hosted quota for Authorization: Bearer TOKEN.
104
104
  - GET https://api.image-skill.com/v1/payment-methods returns the no-auth payment rail catalog. It tells agents which rails are available, whether live money can move, buyer modes (agent_only, hybrid, human_only), browser requirements, limits, endpoint paths, and recovery commands.
@@ -181,7 +181,7 @@ Unclaimed agents may not:
181
181
  - send card data, wallet secrets, provider receipts, Stripe secrets, MPP tokens, SPTs, or any payment credential to Image Skill; Stripe payment details must be entered only on Stripe-hosted checkout pages
182
182
 
183
183
  Credits:
184
- One Image Skill credit is $0.01. Use image-skill credits methods --json to inspect payment rail availability and whether a browser/human action is required. Use image-skill credits packs list --json to inspect recommended Stripe Checkout packs. Use image-skill credits quote --pack PACK_ID --payment-method stripe_checkout --json for the default live-money top-up path. Use image-skill credits quote --credits CREDITS --json for exact bounded custom top-ups when the required budget is already known. The default payment_method is fake. Use image-skill credits buy --provider stripe --json to create a hosted Stripe Checkout Session for a stripe_checkout quote; this returns checkout_url and does not grant credits. Use image-skill credits status --payment-attempt-id PAYMENT_ATTEMPT_ID --json after buy and after checkout completion to read state, receipt, credit_event, limits, and retry guidance. Use image-skill credits fake-purchase --json only to exercise the quote, receipt, credit-ledger, and activity-audit contract before live settlement rails are enabled. Create/edit debit model-priced credits after provider success; inspect models show and operation cost.credit_pricing for credits_required and pricing_confidence. Credits buy and fake-purchase require explicit --idempotency-key. Never send payment credentials to Image Skill; Stripe collects payment details on Stripe-hosted pages. Public request fields are credits, pack_id, payment_method, quote_id, status reference IDs, and idempotency_key.
184
+ One Image Skill credit is $0.01. Use image-skill credits methods --json to inspect payment rail availability and whether a browser/human action is required. Use image-skill credits packs list --json to inspect recommended Stripe Checkout packs. Use image-skill credits quote --pack PACK_ID --payment-method stripe_checkout --json for the default live-money top-up path. Use image-skill credits quote --credits CREDITS --json for exact bounded custom top-ups when the required budget is already known. The default payment_method is fake. Use image-skill credits buy --provider stripe --json to create a hosted Stripe Checkout Session for a stripe_checkout quote; this returns checkout_url and does not grant credits. Use image-skill credits status --payment-attempt-id PAYMENT_ATTEMPT_ID --json after buy and after checkout completion to read state, receipt, credit_event, limits, and retry guidance. Use image-skill credits fake-purchase --json only to exercise the quote, receipt, credit-ledger, and activity-audit contract before live settlement rails are enabled. Create/edit debit model-priced credits after provider success; inspect models show and operation cost.credit_pricing for credits_required and pricing_confidence. Credits buy and fake-purchase require explicit --idempotency-key. Quote idempotency keys are scoped to the hosted agent identity and exact quote terms; use per-run/per-step quote keys and inspect error.recovery.suggested_command on CREDIT_QUOTE_CONFLICT. Never send payment credentials to Image Skill; Stripe collects payment details on Stripe-hosted pages. Public request fields are credits, pack_id, payment_method, quote_id, status reference IDs, and idempotency_key.
185
185
 
186
186
  Telemetry:
187
187
  - command or endpoint name
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "image-skill",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "Thin hosted CLI for Image Skill, a creative runtime for agents.",
5
5
  "type": "module",
6
6
  "private": false,
@@ -20,7 +20,7 @@
20
20
  "cli.md"
21
21
  ],
22
22
  "engines": {
23
- "node": ">=22.0.0"
23
+ "node": ">=20.0.0"
24
24
  },
25
25
  "publishConfig": {
26
26
  "access": "public"
package/skill.md CHANGED
@@ -51,7 +51,7 @@ Bootstrap restricted agent access:
51
51
 
52
52
  ```bash
53
53
  image-skill signup --agent \
54
- --human-email HUMAN_EMAIL \
54
+ --agent-contact CONTACT_OR_SPONSOR_INBOX \
55
55
  --agent-name AGENT_NAME \
56
56
  --runtime RUNTIME_NAME \
57
57
  --save \
@@ -62,13 +62,14 @@ image-skill signup --agent \
62
62
  permissions and redacts it from stdout. Use `--show-token` only when the agent
63
63
  runtime has a separate secret store and needs the raw token once.
64
64
 
65
- In the preview contract, `--human-email` means the accountable contact or
66
- sponsor inbox for the restricted agent identity. If no individual human is in
67
- the loop, use a durable operator/team/agent inbox that can receive future claim,
68
- billing, or abuse notices. Do not invent a person or use a throwaway inbox.
65
+ In the preview contract, `--agent-contact` means the accountable contact,
66
+ sponsor, operator, or agent inbox for the restricted agent identity. If no
67
+ individual human is in the loop, use a durable operator/team/agent inbox that
68
+ can receive future claim, billing, or abuse notices. Do not invent a person or
69
+ use a throwaway inbox.
69
70
  `example.invalid` addresses are only appropriate inside documented harness or
70
- proof runs. Agent-contact-backed signup is planned, but the currently published
71
- CLI uses `--human-email`.
71
+ proof runs. `--human-email` remains accepted as a compatibility alias for
72
+ `--agent-contact`.
72
73
 
73
74
  If the runtime supports stdin secret handoff, prefer `--token-stdin` for
74
75
  `whoami`, `usage quota`, `quota`, `create`, and `feedback create` instead of
@@ -81,10 +82,10 @@ image-skill whoami --json
81
82
  image-skill usage quota --json
82
83
  ```
83
84
 
84
- The preview hosted signup path currently uses the contact/sponsor email field
85
- above. Future payment-backed and agent-contact-backed signup paths are planned
86
- so capable agents can become bounded paying users without making human claim the
87
- only path to meaningful usage.
85
+ The preview hosted signup path currently uses the agent-contact inbox above.
86
+ Future payment-backed signup paths are planned so capable agents can become
87
+ bounded paying users without making human claim the only path to meaningful
88
+ usage.
88
89
 
89
90
  Credit quote and buy flow:
90
91