@tiangong-ai/cli 0.0.31 → 0.0.33

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.
Files changed (64) hide show
  1. package/AGENTS.md +2 -2
  2. package/README.md +140 -98
  3. package/dist/research/orchestration.js +519 -21
  4. package/dist/research/orchestration.js.map +1 -1
  5. package/dist/research/workspace/acquisition.d.ts +71 -0
  6. package/dist/research/workspace/acquisition.js +593 -0
  7. package/dist/research/workspace/acquisition.js.map +1 -0
  8. package/dist/research/workspace/artifacts.d.ts +43 -0
  9. package/dist/research/workspace/artifacts.js +544 -0
  10. package/dist/research/workspace/artifacts.js.map +1 -0
  11. package/dist/research/workspace/broker.d.ts +5 -0
  12. package/dist/research/workspace/broker.js +318 -43
  13. package/dist/research/workspace/broker.js.map +1 -1
  14. package/dist/research/workspace/companion-readiness.d.ts +11 -0
  15. package/dist/research/workspace/companion-readiness.js +75 -0
  16. package/dist/research/workspace/companion-readiness.js.map +1 -0
  17. package/dist/research/workspace/discovery-planning.d.ts +25 -0
  18. package/dist/research/workspace/discovery-planning.js +106 -0
  19. package/dist/research/workspace/discovery-planning.js.map +1 -0
  20. package/dist/research/workspace/discovery-status.d.ts +46 -0
  21. package/dist/research/workspace/discovery-status.js +183 -0
  22. package/dist/research/workspace/discovery-status.js.map +1 -0
  23. package/dist/research/workspace/discovery.d.ts +25 -0
  24. package/dist/research/workspace/discovery.js +268 -0
  25. package/dist/research/workspace/discovery.js.map +1 -0
  26. package/dist/research/workspace/downloads.d.ts +76 -0
  27. package/dist/research/workspace/downloads.js +274 -0
  28. package/dist/research/workspace/downloads.js.map +1 -0
  29. package/dist/research/workspace/evidence-ledger.d.ts +52 -0
  30. package/dist/research/workspace/evidence-ledger.js +487 -0
  31. package/dist/research/workspace/evidence-ledger.js.map +1 -0
  32. package/dist/research/workspace/evidence.d.ts +1 -0
  33. package/dist/research/workspace/evidence.js +2 -0
  34. package/dist/research/workspace/evidence.js.map +1 -1
  35. package/dist/research/workspace/input-plan.js +4 -0
  36. package/dist/research/workspace/input-plan.js.map +1 -1
  37. package/dist/research/workspace/native-activity.d.ts +65 -0
  38. package/dist/research/workspace/native-activity.js +153 -0
  39. package/dist/research/workspace/native-activity.js.map +1 -0
  40. package/dist/research/workspace/preflight.d.ts +18 -0
  41. package/dist/research/workspace/preflight.js +47 -20
  42. package/dist/research/workspace/preflight.js.map +1 -1
  43. package/dist/research/workspace/projects.d.ts +3 -1
  44. package/dist/research/workspace/projects.js +357 -5
  45. package/dist/research/workspace/projects.js.map +1 -1
  46. package/dist/research/workspace/runtime.d.ts +171 -3
  47. package/dist/research/workspace/runtime.js +1582 -77
  48. package/dist/research/workspace/runtime.js.map +1 -1
  49. package/dist/research/workspace/sanitization.js +28 -6
  50. package/dist/research/workspace/sanitization.js.map +1 -1
  51. package/dist/research/workspace/schemas.d.ts +3 -0
  52. package/dist/research/workspace/schemas.js +206 -33
  53. package/dist/research/workspace/schemas.js.map +1 -1
  54. package/dist/research/workspace/setup-catalog.js +2 -2
  55. package/dist/research/workspace/setup-wizard.js +45 -17
  56. package/dist/research/workspace/setup-wizard.js.map +1 -1
  57. package/dist/research/workspace/setup.d.ts +27 -5
  58. package/dist/research/workspace/setup.js +400 -85
  59. package/dist/research/workspace/setup.js.map +1 -1
  60. package/dist/research/workspace/types.d.ts +38 -3
  61. package/dist/research/workspace/workspace.d.ts +2 -0
  62. package/dist/research/workspace/workspace.js +128 -26
  63. package/dist/research/workspace/workspace.js.map +1 -1
  64. package/package.json +1 -1
package/AGENTS.md CHANGED
@@ -15,8 +15,8 @@ checkPaths:
15
15
  - .docpact/config.yaml
16
16
  - docs/agents/**
17
17
  - src/**
18
- lastReviewedAt: 2026-08-09
19
- lastReviewedCommit: 14c804e61b3768489253533ee754b6f7e75460ea
18
+ lastReviewedAt: 2026-08-11
19
+ lastReviewedCommit: 2ce7ad7cd36c1aeba577bc72e4095ed3a81debd6
20
20
  ---
21
21
 
22
22
  # Tiangong AI CLI Contract
package/README.md CHANGED
@@ -12,8 +12,8 @@ checkPaths:
12
12
  - package.json
13
13
  - bin/**
14
14
  - src/**
15
- lastReviewedAt: 2026-08-09
16
- lastReviewedCommit: 14c804e61b3768489253533ee754b6f7e75460ea
15
+ lastReviewedAt: 2026-08-10
16
+ lastReviewedCommit: bef62f8d48c42eaff14fa2bd7eba1be83a46a58b
17
17
  ---
18
18
 
19
19
  # Tiangong AI CLI
@@ -314,7 +314,8 @@ can inspect `capability doctor`, `project preflight`, `project init`, and `run`
314
314
  syntax safely from an empty or unrelated directory.
315
315
 
316
316
  The requirements object declares `dimensions`, `sourceTypes`, optional
317
- `requiredCapabilityIds` and `requiredDiscoveryScopes`, `minSources`,
317
+ `requiredCapabilityIds`, `requiredCompanionIds`, and
318
+ `requiredDiscoveryScopes`, `minSources`,
318
319
  `minFullTextSources`, `minDatedSources`, and optional inclusive
319
320
  `publicationDateFrom` / `publicationDateTo` boundaries (`YYYY-MM-DD` or
320
321
  `null`). Explicit capability/scope requirements are exact: wildcard web or SCI
@@ -331,18 +332,20 @@ full source. Symlinks, duplicate content, changed hashes, and context above
331
332
  `maxInputContextTokens` are rejected.
332
333
 
333
334
  The workspace stores its current protocol state under `.tiangong-research/`.
334
- Each project follows five ordered stages: evidence discovery, analysis,
335
- synthesis, independent review, and mechanical closure. Producer work defaults
336
- to Codex, independent review defaults to Claude, and a run is blocked when both
337
- routes use the same agent family.
338
-
339
- Research execution requires `/usr/bin/sandbox-exec` on macOS or Bubblewrap
340
- (`bwrap`) on Linux. Windows can inspect and configure workspaces but does not
341
- execute research packages. That outer platform sandbox is the execution
342
- boundary. Codex is therefore started with its nested sandbox disabled: nesting
343
- Seatbelt on macOS can cancel MCP calls even though the process is already
344
- confined. Shell and unified-exec tools remain disabled, as do undeclared Codex
345
- integrations.
335
+ Each project follows the evidence-first sequence: broad discovery, strict
336
+ admission, acquisition audit, immutable evidence freeze, analysis, synthesis,
337
+ independent review, and mechanical closure. Discover, acquire, analyze, and
338
+ synthesize run in the current interactive Codex app/session or Claude Code
339
+ session. The CLI never launches a nested producer process. Independent review
340
+ runs through the other configured agent family's CLI, and execution is blocked
341
+ when the two roles use the same family.
342
+
343
+ Independent reviewer execution requires `/usr/bin/sandbox-exec` on macOS or
344
+ Bubblewrap (`bwrap`) on Linux. Windows can inspect and configure workspaces but
345
+ does not launch reviewer packages; smoke-test setup reports a non-blocking
346
+ warning there, while production readiness fails closed. The current native producer remains governed
347
+ by its host application's own permissions; the CLI supplies a hash-bound packet
348
+ and deterministic broker commands, not a second nested sandbox or agent.
346
349
 
347
350
  Add immutable local evidence, verify the workspace, and execute ready work:
348
351
 
@@ -356,20 +359,55 @@ tiangong-ai research workspace doctor --workspace /absolute/path/to/workspace \
356
359
  --agent-smoke --capability-smoke
357
360
  tiangong-ai research run --workspace /absolute/path/to/workspace \
358
361
  --project gpu-resource-impact --progress-jsonl
362
+ # When stopReason is native-stage-required, perform the returned stage here:
363
+ tiangong-ai research project stage prepare gpu-resource-impact \
364
+ --stage discover --host-agent codex \
365
+ --workspace /absolute/path/to/workspace --json
366
+ tiangong-ai research project stage submit gpu-resource-impact \
367
+ --session SESSION_ID --output /absolute/path/to/discover.json \
368
+ --confirm-model EXPECTED_MODEL \
369
+ --workspace /absolute/path/to/workspace --json
359
370
  tiangong-ai research status --workspace /absolute/path/to/workspace --json
360
371
  ```
361
372
 
373
+ The discover packet derives a bounded multi-channel plan from reviewed evidence
374
+ requirements. Required channels run first; exact repeated requests reuse the
375
+ project cache without another provider call but still consume a bounded context
376
+ view; remaining views are spent only on explicit coverage,
377
+ counterevidence, date, applicability, or full-text gaps. Native Web/Browser
378
+ leads may be registered as supplemental candidates, but they cannot be admitted
379
+ until the same canonical URL/DOI has an immutable broker occurrence. Registered
380
+ inputs are formal candidates under their own content-hash identity.
381
+ The acquire packet audits every provisional source and registers only explicit
382
+ files—never a directory or “latest download.” PDF and Office artifacts are
383
+ structurally verified and content-addressed. A registered binary full file is
384
+ review-bound but is not counted as producer-readable full text unless an
385
+ admitted UTF-8 text/JSON/HTML/CSV/Markdown derivative exists. Such a derivative
386
+ names its registered parent and inherits that parent's canonical source URL;
387
+ it does not invent a second network-download binding, and a conflicting URL is
388
+ rejected.
389
+
390
+ Successful acquisition freezes an immutable evidence snapshot before analysis.
391
+ The reviewer and mechanical closure bind and recheck the snapshot chain,
392
+ ledger, receipts, selected artifacts, excerpts, analysis, and report. Refresh a
393
+ closed result with `research project addendum SOURCE --to TARGET`; the original
394
+ closure remains unchanged, the child snapshot records a mechanical delta, and
395
+ default status hides the superseded project (`research status --all` shows full
396
+ lineage).
397
+
362
398
  Use `research run --project <id>` for an auditable project-scoped run: only
363
399
  that project is checked, scheduled, summarized, and bound to the top-level
364
400
  JSON/JSONL `projectId`, so historical blocked siblings do not alter its exit
365
401
  status. Omit `--project` and use `--max-parallel` only for an intentional
366
402
  workspace-wide run.
367
403
 
368
- Inputs are admitted by SHA-256. Agent work runs with a dedicated capsule HOME
369
- in an ephemeral platform sandbox. Only the minimal supported agent auth file is
370
- copied into that HOME. A formatting repair reuses that capsule copy only after
371
- its SHA-256 still matches the owner source; changed, symlinked, or non-owner-only
372
- authentication stops execution instead of being overwritten. For Claude, an
404
+ Inputs are admitted by SHA-256. Native producer preparation creates an
405
+ ephemeral, hash-bound packet directory but does not copy agent authentication
406
+ or start an agent. The independent reviewer runs with a dedicated capsule HOME
407
+ in an ephemeral platform sandbox. Only the minimal supported reviewer auth file
408
+ is copied into that HOME. A reviewer formatting repair reuses that capsule copy
409
+ only after its SHA-256 still matches the owner source; changed, symlinked, or
410
+ non-owner-only authentication stops execution instead of being overwritten. For Claude, an
373
411
  owner-only user `settings.json` is never
374
412
  copied; only the whitelisted API key/token and HTTPS base URL fields from its
375
413
  `env` object are injected in memory. Permissions, hooks, additional directories,
@@ -377,75 +415,70 @@ and unrelated settings are not admitted. Codex project-root discovery is
377
415
  terminated by a capsule-local marker/config override, so a parent workspace
378
416
  `.codex/config.toml` is neither required nor made readable. The workspace
379
417
  credential file and the rest of the host home are not admitted. Production
380
- doctor is blocked until
381
- `--agent-smoke` actually starts both routes inside this boundary. A successful
382
- smoke creates a 24-hour attestation bound to workspace config, capability lock,
383
- output schema, and the resolved agent binary/wrapper fingerprints. Production
384
- execution stops before invocation if the attestation expires or any bound value
385
- drifts. While that attestation remains current, a plain `workspace doctor`
386
- revalidates its hashes and the currently resolved producer/reviewer runtime
387
- fingerprints, then reuses the attested agent and capability smoke results.
388
- Passing the smoke flags explicitly performs fresh checks instead; missing,
389
- expired, or drifted attestations remain blocking and include the refresh action.
390
- Use the exact `codex` / `claude` route by default. A custom wrapper must use an
418
+ doctor is blocked until `--agent-smoke` actually starts the independent reviewer
419
+ inside this boundary. The native producer is verified as the current host and
420
+ is never smoke-tested as a child process. A successful smoke creates a 24-hour
421
+ attestation bound to workspace config, capability lock, output schema, and the
422
+ resolved reviewer binary/wrapper fingerprints. Production review stops before
423
+ invocation if the attestation expires or any bound value drifts. While that
424
+ attestation remains current, a plain `workspace doctor` revalidates its hashes
425
+ and the current reviewer runtime fingerprint before reuse. Passing the smoke
426
+ flags explicitly performs fresh checks instead; missing, expired, or drifted
427
+ attestations remain blocking and include the refresh action. Use the exact
428
+ `codex` / `claude` route by default. A custom reviewer wrapper must use an
391
429
  absolute `binary` plus an absolute `wrapperTargetBinary`; the runtime injects
392
430
  the resolved target path and independently hashes the target executable, route
393
431
  launcher/wrapper, and internal adapter. A wrapper that performs an unpinned
394
432
  PATH lookup is not a reproducible route.
395
433
 
396
- The CLI owns the authoritative JSON Schemas for discovery, analysis,
397
- synthesis, and review. Inspect one with `research schema show <stage> --json`.
398
- Codex and Claude receive the schema through their structured-output options;
399
- the CLI materializes the validated final object. A syntax/schema failure gets
400
- at most one separately budgeted formatting repair, never a full blind retry.
401
- The same isolated repair may correct mechanically diagnosed provenance or
402
- finding/source bindings; it has no broker or research tools and cannot add new
403
- facts.
434
+ The CLI owns the authoritative JSON Schemas for discovery, acquisition,
435
+ analysis, synthesis, and review. Inspect one with
436
+ `research schema show <stage> --json`.
437
+ Native producer preparation returns the exact schema and prompt to the current
438
+ host; `stage submit` validates and atomically materializes its JSON. A rejected
439
+ native submission keeps the bound session for an explicit correction and never
440
+ launches a repair model. The independent reviewer receives its schema through
441
+ the reviewer CLI's structured-output option; a reviewer syntax/schema or
442
+ mechanical binding failure gets at most one separately budgeted formatting-only
443
+ repair with no research tools.
404
444
 
405
445
  Total, per-package, output, repair, broker-response bytes, estimated broker
406
446
  context tokens, context items, wall-time, output-count, output-size, and attempt
407
447
  limits live in `.tiangong-research/config.json`.
408
- New workspaces reserve 550,000 total tokens by default, including 230,000 for
409
- discovery; the remaining package defaults are 60,000 for analysis, 70,000 for
410
- synthesis, and 175,000 for review. Primary output is bounded at 6,000 tokens
411
- and a separately invoked repair at 4,000. These are admission ceilings rather
412
- than a target spend and can be lowered only when the resulting pre-call
413
- reservations still fit.
414
- Before an agent starts, the runtime reserves the package token and conservative
415
- price budget. The call-level check accounts for prompt and schema bytes at
416
- three bytes per token, repeats input allowance for every permitted API turn,
417
- adds the maximum bounded broker context for every permitted discovery turn,
418
- and adds primary output plus a potential isolated repair's input and output;
419
- insufficient package or remaining project budget prevents invocation. The
420
- preflight uses the same reservation calculator and additionally reserves the
421
- entire admitted capability-documentation budget on every broker turn, so a
422
- project cannot pass admission and then fail solely because runtime applies a
423
- stricter token formula. Review admission reserves three maximum-size generated
424
- artifacts plus one globally bounded evidence-excerpt bundle; runtime applies
425
- that same stage-specific context ceiling. The
426
- provider cost cap is the current package reservation, not the remaining
427
- workspace allowance. Tool-free Codex primary stages reserve two protocol turns;
428
- Claude JSON Schema primary stages reserve and receive a three-turn provider cap,
429
- matching the current Claude Code structured-output exchange. External tools
430
- remain disabled. Formatting repair omits the provider
431
- schema tool, uses one plain-JSON turn, and remains subject to the CLI schema and
432
- semantic validators. Current Codex and Claude CLI adapters report
433
- output usage only after execution, so preflight identifies
434
- `outputTokenLimitEnforcement` as `post-execution`; captured bytes provide a
435
- separate process bound. Discovery capture allowance includes the bounded MCP
436
- tool contexts as well as the requested model output, and over-limit output fails
437
- without promotion. New workspaces also enforce a six-call broker budget
438
- mechanically; every successful result reports the remaining calls and excess
439
- calls are rejected before another provider fetch or evidence promotion.
440
- Preflight also reports per-stage `maxTurns` and `turnLimitEnforcement`: Claude
441
- receives a provider-side turn cap, while the current Codex CLI exposes no such
442
- flag, so its turn allowance is reservation guidance plus post-execution
443
- accounting and rejection. Usage records separate input, cached-input, and output
444
- tokens; `inputTokens` excludes
445
- the separately reported cached portion. Configured pricing fills cost when the
446
- provider does not report it. Run records and JSONL progress also preserve
447
- sanitized event/item counts, provider turns, tool calls, reasoning tokens, and
448
- bounded provider errors.
448
+ New production workspaces use generous but finite runaway ceilings: 20,000,000
449
+ total tokens and package ceilings of 12,000,000 for discovery, 2,000,000 for
450
+ acquisition, 1,500,000 each for analysis and synthesis, and 2,500,000 for
451
+ review. Primary output is bounded at 32,000 tokens and a separately invoked
452
+ repair at 16,000. The production broker hard ceiling is 256 bounded views with
453
+ 32,000 context tokens per view; input context is bounded at 128,000 tokens.
454
+ These values are not a target spend. Coverage-derived working plans and early
455
+ stop control ordinary use, while the finite ceilings, three attempts per
456
+ package, and explicit confirmation above the cost threshold stop runaway work.
457
+ Smoke-test workspaces retain their smaller low-cost defaults.
458
+ Before project initialization and every executable package, the control plane
459
+ requires the complete token and conservative price reservation to fit. Native
460
+ producer stages reserve prompt, schema, admitted context, bounded broker
461
+ context, and output allowance, but the host app does not expose trusted
462
+ per-stage usage telemetry to this CLI. A successful native submit therefore
463
+ charges the full reviewed package reservation and records
464
+ `accountingMode=reserved-native-host`; submit still enforces the exact schema,
465
+ output bytes/tokens, provenance, coverage, hashes, and remaining project budget.
466
+ It does not claim a provider-side turn or output-token cap for the host app.
467
+
468
+ Independent review uses the pre-call reservation calculator and the reviewer's
469
+ provider-side structured-output/turn controls where available. Review admission
470
+ reserves three maximum-size generated artifacts plus one globally bounded
471
+ evidence-excerpt bundle, and formatting repair remains one separately budgeted,
472
+ tool-free JSON correction. Production workspaces enforce a finite 256-view
473
+ broker ceiling mechanically, while each project derives a much smaller working
474
+ budget from its reviewed coverage requirements and stops early when they are
475
+ supportable. Every successful native evidence fetch reports the remaining
476
+ working budget; excess calls are rejected before another provider request or
477
+ evidence promotion. Reviewer usage records separate input, cached-input, and
478
+ output tokens; configured pricing fills cost when the provider omits it. Run
479
+ records and JSONL progress preserve sanitized accounting mode, event/item
480
+ counts, provider turns, tool calls, reasoning tokens, and bounded provider
481
+ errors.
449
482
 
450
483
  Every evidence source must resolve to an admitted input or a completed broker
451
484
  receipt. Successful broker bodies are immutable content-addressed objects under
@@ -459,20 +492,23 @@ context, broker objects, and registered local input hashes before recording
459
492
  their safe locators. Capsule deletion therefore does not delete the durable
460
493
  review chain.
461
494
 
462
- Discovery receives only the capability broker as an execution tool. The CLI
463
- embeds the exact staged capability manifest and each external Skill's top-level
464
- `SKILL.md` in the prompt, so the producer does not need filesystem or shell
465
- access and cannot execute provider examples directly. The manifest includes
466
- the locked, non-secret HTTPS endpoint rather than only its host, so the model
467
- never has to guess a provider path. Broker responses include
468
- the exact bounded context inline with the hash-bound receipt; raw objects remain
469
- in the permanent evidence store for audit.
470
- Analyze and synthesize receive bounded, hash-verified prior-stage artifacts in
471
- their prompt with tools disabled. Review is also tool-free and uses the
495
+ Native discovery preparation embeds the exact staged capability manifest and
496
+ each external Skill's top-level `SKILL.md`. The current host may fetch admitted
497
+ evidence only with `research project evidence fetch`, whose bounded request file
498
+ contains logical IDs but no credential values. The manifest includes the locked,
499
+ non-secret HTTPS endpoint rather than only its host, and each response returns
500
+ the exact bounded context plus a hash-bound receipt while retaining the raw
501
+ object in the permanent evidence store. Host web/search/database tools cannot
502
+ substitute for a required broker receipt.
503
+ Analyze and synthesize packets contain bounded, hash-verified prior-stage
504
+ artifacts and require no external evidence calls. Review is tool-free and uses the
472
505
  reviewer's route-specific structured-output turn cap:
473
506
  its prompt embeds the complete generated artifacts and a deterministic,
474
507
  globally bounded set of excerpts distributed across registered local contexts
475
- and broker receipts. The packet hash is schema-bound, but complete packet
508
+ and broker receipts. Broker excerpts prioritize deterministic, sanitized
509
+ projections of the exact raw-response items selected by admitted evidence JSON
510
+ Pointers; uncited receipts retain metadata-only bindings, and unresolved
511
+ pointers receive a bounded-context fallback. The packet hash is schema-bound, but complete packet
476
512
  metadata is not redundantly copied into model context. Full local files,
477
513
  original per-receipt bounded contexts, raw broker objects, and the complete
478
514
  packet remain hash-bound for durable human/mechanical audit; the model must not
@@ -547,21 +583,27 @@ tiangong-ai research capability credential set \
547
583
 
548
584
  The broker injects declared credentials only for admitted HTTPS hosts. Agent
549
585
  processes do not receive this variable. Keep the file owner-only (`chmod 600`)
550
- and run `research capability doctor --live` plus production
551
- `research workspace doctor --agent-smoke --capability-smoke` before a run.
586
+ and run the production setup/workspace doctor before a run. Setup doctor reuses
587
+ one capability probe and never starts the paid reviewer smoke while a blocking
588
+ static or low-cost prerequisite is already failing.
552
589
  Capability doctor retries only one 429 response with bounded `Retry-After`
553
590
  backoff; deterministic 4xx, missing subscription, authentication, drift, and
554
591
  content-type failures stop explicitly. It retains only a bounded sanitized
555
592
  provider code/detail and safe request ID, with an actionable baseline-or-
556
- subscription decision for `OPTION_NOT_IN_PLAN`. An explicitly requested agent
557
- or capability smoke failure makes setup readiness `BLOCKED`, never a warning.
593
+ subscription decision for `OPTION_NOT_IN_PLAN`. Required evidence/reviewer
594
+ failures make `researchReadiness=BLOCKED`. Optional preprocessing, acquisition,
595
+ and authoring checks have separate readiness fields; they block only a project
596
+ or operation that explicitly lists the exact component in
597
+ `requiredCompanionIds`.
558
598
  Credential diagnostics distinguish standalone ambient absence,
559
599
  broker-store absence, policy-rejected injection, and provider 401/403. Every
560
600
  such diagnostic identifies the execution mode, credential scope, whether a
561
601
  network request occurred, and a minimum action without returning credentials
562
- or raw authentication responses. The optional Semantic Scholar live check also
563
- performs only one bounded 429 retry; a second 429 remains an explicit setup
564
- blocker and never triggers a standalone fallback.
602
+ or raw authentication responses. The optional Semantic Scholar resolver check
603
+ also performs only one bounded 429 retry. A second 429 leaves acquisition
604
+ `DEGRADED`, does not block unrelated research, and never triggers a standalone
605
+ fallback; the academic adapter can still use its unchanged Unpaywall → Semantic
606
+ Scholar OA → arXiv → explicit browser-handoff order.
565
607
  The broker preserves a sanitized non-2xx excerpt, safe request ID, and
566
608
  `Retry-After`. It performs at most one inline 429 retry when the declared or
567
609
  default delay is at most five seconds; longer throttles return an actionable