inkstone 0.1.3: image-caps preflight, a zero-prompt browser sign-in, key calls on the session cookie (#832)

inkstone 0.1.3 (#832, yunwang2442-creator):

- Image requests are prechecked before they leave: 8 images, 10MB each, 40MB in all.
  - A request over a cap gets a local 400 shape refusal, so magpie asks the next account and rests none.
  - The plan's invalid_media / media_fetch_failed / unsupported_media_type errors become the same kind of refusal.
- The body rewrite strips the reasoning fields and sets image detail to auto.
- A zero-prompt browser sign-in comes first, and a second browser method reuses a pasted key.
  - Neither browser method is offered when no Chromium-family browser is found (#825).
- The /keys calls ride the session cookie, without the pagination query. Key creation retries the console's -15100 "refresh page and retry".
- The #826 metadata token read is kept, and its test is back.
- The fake browser is built once per user and source hash (#824), and the title wait reads only on Windows.
- maxConcurrency is 4.
- The doubled comment line is dropped from every opencode2.mjs copy, agy-cli's included.

Reviewed at 88e66bde, on mote (macOS, Bun 1.4.2) with a temp HOME:
- full bun test: 6853 pass / 0 fail; both checks exit 0
- bun scripts/check.mjs and bun scripts/check.mjs inkstone: exit 0
- 21 hand breaks: 20 red, 1 not caught (the /keys pagination test calls protocol.listKeys directly; follow-up filed)

Not tried: a real InkStone account or sign-in, Windows and Linux runs.
This commit is contained in:
我是一条没有名字的区
2026-11-07 22:24:56 +08:00
committed by GitHub
parent d34785ae88
commit 087c36123d
51 changed files with 964 additions and 176 deletions
-1
View File
@@ -85,7 +85,6 @@ export function fieldsOf(prompts) {
if (p.placeholder) f.placeholder = String(p.placeholder)
if (p.type === "select" && Array.isArray(p.options))
f.options = p.options.map((o) => ({ value: String(o.value), label: String(o.label ?? o.value), ...(o.hint ? { description: String(o.hint) } : {}) }))
// a prompt shown only when another answer says so can't be required
// a prompt shown only when another answer says so can't be required, and
// neither can one whose own validate() accepts an empty answer (the
// browser sign-in's optional API key)