scoutline 0.21.2 → 0.22.0

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 (123) hide show
  1. package/README.md +46 -1
  2. package/dist/capabilities/quota.d.ts +34 -8
  3. package/dist/capabilities/quota.d.ts.map +1 -1
  4. package/dist/capabilities/quota.js +8 -6
  5. package/dist/capabilities/quota.js.map +1 -1
  6. package/dist/capabilities/science.d.ts +15 -0
  7. package/dist/capabilities/science.d.ts.map +1 -1
  8. package/dist/capabilities/science.js +79 -0
  9. package/dist/capabilities/science.js.map +1 -1
  10. package/dist/commands/quota.d.ts.map +1 -1
  11. package/dist/commands/quota.js +3 -0
  12. package/dist/commands/quota.js.map +1 -1
  13. package/dist/commands/science.d.ts +13 -0
  14. package/dist/commands/science.d.ts.map +1 -1
  15. package/dist/commands/science.js +243 -48
  16. package/dist/commands/science.js.map +1 -1
  17. package/dist/index.d.ts +12 -0
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +78 -38
  20. package/dist/index.js.map +1 -1
  21. package/dist/lib/artifacts.d.ts.map +1 -1
  22. package/dist/lib/artifacts.js +4 -1
  23. package/dist/lib/artifacts.js.map +1 -1
  24. package/dist/lib/async-job-state.d.ts +17 -0
  25. package/dist/lib/async-job-state.d.ts.map +1 -1
  26. package/dist/lib/async-job-state.js +29 -0
  27. package/dist/lib/async-job-state.js.map +1 -1
  28. package/dist/lib/batch-manifest.d.ts +9 -0
  29. package/dist/lib/batch-manifest.d.ts.map +1 -1
  30. package/dist/lib/batch-manifest.js +8 -0
  31. package/dist/lib/batch-manifest.js.map +1 -1
  32. package/dist/lib/cache.d.ts +89 -10
  33. package/dist/lib/cache.d.ts.map +1 -1
  34. package/dist/lib/cache.js +190 -42
  35. package/dist/lib/cache.js.map +1 -1
  36. package/dist/lib/errors.d.ts +29 -3
  37. package/dist/lib/errors.d.ts.map +1 -1
  38. package/dist/lib/errors.js +29 -5
  39. package/dist/lib/errors.js.map +1 -1
  40. package/dist/lib/execution.d.ts +14 -6
  41. package/dist/lib/execution.d.ts.map +1 -1
  42. package/dist/lib/execution.js +50 -6
  43. package/dist/lib/execution.js.map +1 -1
  44. package/dist/lib/mcp-client.d.ts.map +1 -1
  45. package/dist/lib/mcp-client.js +9 -6
  46. package/dist/lib/mcp-client.js.map +1 -1
  47. package/dist/lib/redact.d.ts +3 -0
  48. package/dist/lib/redact.d.ts.map +1 -1
  49. package/dist/lib/redact.js +29 -4
  50. package/dist/lib/redact.js.map +1 -1
  51. package/dist/lib/retry-after.d.ts +54 -0
  52. package/dist/lib/retry-after.d.ts.map +1 -0
  53. package/dist/lib/retry-after.js +124 -0
  54. package/dist/lib/retry-after.js.map +1 -0
  55. package/dist/lib/tool-cache.d.ts +6 -4
  56. package/dist/lib/tool-cache.d.ts.map +1 -1
  57. package/dist/lib/tool-cache.js +9 -7
  58. package/dist/lib/tool-cache.js.map +1 -1
  59. package/dist/lib/tty.d.ts.map +1 -1
  60. package/dist/lib/tty.js +10 -0
  61. package/dist/lib/tty.js.map +1 -1
  62. package/dist/providers/arxiv/client.d.ts.map +1 -1
  63. package/dist/providers/arxiv/client.js +5 -4
  64. package/dist/providers/arxiv/client.js.map +1 -1
  65. package/dist/providers/brave/adapter.d.ts.map +1 -1
  66. package/dist/providers/brave/adapter.js +9 -3
  67. package/dist/providers/brave/adapter.js.map +1 -1
  68. package/dist/providers/brave/client.d.ts.map +1 -1
  69. package/dist/providers/brave/client.js +59 -7
  70. package/dist/providers/brave/client.js.map +1 -1
  71. package/dist/providers/crossref/client.d.ts.map +1 -1
  72. package/dist/providers/crossref/client.js +5 -4
  73. package/dist/providers/crossref/client.js.map +1 -1
  74. package/dist/providers/europepmc/client.d.ts.map +1 -1
  75. package/dist/providers/europepmc/client.js +5 -4
  76. package/dist/providers/europepmc/client.js.map +1 -1
  77. package/dist/providers/exa/adapter.d.ts +7 -0
  78. package/dist/providers/exa/adapter.d.ts.map +1 -1
  79. package/dist/providers/exa/adapter.js +11 -3
  80. package/dist/providers/exa/adapter.js.map +1 -1
  81. package/dist/providers/firecrawl/adapter.d.ts.map +1 -1
  82. package/dist/providers/firecrawl/adapter.js +12 -4
  83. package/dist/providers/firecrawl/adapter.js.map +1 -1
  84. package/dist/providers/firecrawl/client.d.ts.map +1 -1
  85. package/dist/providers/firecrawl/client.js +7 -0
  86. package/dist/providers/firecrawl/client.js.map +1 -1
  87. package/dist/providers/jina/adapter.d.ts.map +1 -1
  88. package/dist/providers/jina/adapter.js +10 -3
  89. package/dist/providers/jina/adapter.js.map +1 -1
  90. package/dist/providers/jina/client.d.ts.map +1 -1
  91. package/dist/providers/jina/client.js +23 -10
  92. package/dist/providers/jina/client.js.map +1 -1
  93. package/dist/providers/linkup/adapter.d.ts.map +1 -1
  94. package/dist/providers/linkup/adapter.js +13 -12
  95. package/dist/providers/linkup/adapter.js.map +1 -1
  96. package/dist/providers/openalex/adapter.d.ts.map +1 -1
  97. package/dist/providers/openalex/adapter.js +2 -0
  98. package/dist/providers/openalex/adapter.js.map +1 -1
  99. package/dist/providers/openalex/client.d.ts.map +1 -1
  100. package/dist/providers/openalex/client.js +6 -5
  101. package/dist/providers/openalex/client.js.map +1 -1
  102. package/dist/providers/parallel/adapter.d.ts.map +1 -1
  103. package/dist/providers/parallel/adapter.js +17 -6
  104. package/dist/providers/parallel/adapter.js.map +1 -1
  105. package/dist/providers/pubmed/client.d.ts.map +1 -1
  106. package/dist/providers/pubmed/client.js +5 -4
  107. package/dist/providers/pubmed/client.js.map +1 -1
  108. package/dist/providers/registry.d.ts +12 -0
  109. package/dist/providers/registry.d.ts.map +1 -1
  110. package/dist/providers/registry.js +12 -0
  111. package/dist/providers/registry.js.map +1 -1
  112. package/dist/providers/tavily/adapter.d.ts.map +1 -1
  113. package/dist/providers/tavily/adapter.js +12 -5
  114. package/dist/providers/tavily/adapter.js.map +1 -1
  115. package/dist/providers/tavily/client.d.ts.map +1 -1
  116. package/dist/providers/tavily/client.js +8 -0
  117. package/dist/providers/tavily/client.js.map +1 -1
  118. package/dist/providers/zai/quota.d.ts +25 -5
  119. package/dist/providers/zai/quota.d.ts.map +1 -1
  120. package/dist/providers/zai/quota.js +122 -29
  121. package/dist/providers/zai/quota.js.map +1 -1
  122. package/package.json +3 -3
  123. package/skills/scoutline/SKILL.md +93 -82
@@ -15,7 +15,7 @@ description: |
15
15
  # Scoutline
16
16
 
17
17
  Access Z.AI, MiniMax, Tavily, Exa, Brave, Firecrawl, Parallel AI, Perplexity, Jina AI, You.com,
18
- Linkup, and Spider.cloud capabilities via `npx scoutline@0.20.0`. The
18
+ Linkup, and Spider.cloud capabilities via `scoutline`. The
19
19
  CLI is self-documenting — use `--help` at any level.
20
20
 
21
21
  ## Setup
@@ -84,11 +84,11 @@ refused — set environment variables instead.
84
84
  ### Settings via `scoutline config` (scriptable, no TTY)
85
85
 
86
86
  ```bash
87
- npx scoutline@0.20.0 config get # full config, credentials always masked
88
- npx scoutline@0.20.0 config set routing.search tavily,brave # strict: typos FAIL, not drop
89
- npx scoutline@0.20.0 config set routing.reader parallel,linkup,jina # first configured reader supplier wins
90
- npx scoutline@0.20.0 config unset routing.search
91
- npx scoutline@0.20.0 config set fallbackEnabled false
87
+ scoutline config get # full config, credentials always masked
88
+ scoutline config set routing.search tavily,brave # strict: typos FAIL, not drop
89
+ scoutline config set routing.reader parallel,linkup,jina # first configured reader supplier wins
90
+ scoutline config unset routing.search
91
+ scoutline config set fallbackEnabled false
92
92
  ```
93
93
 
94
94
  The `routing` key sets a standing per-capability provider preference:
@@ -175,7 +175,7 @@ stderr notice instead of failing the invocation). Activation tiers:
175
175
  provider, registry order).
176
176
  2. A single `--provider <id>` or `SCOUTLINE_PROVIDER` — single
177
177
  provider; fan-out is ignored.
178
- 3. `npx scoutline@0.16.0 config set fanout true` (no pin) — standing
178
+ 3. `scoutline config set fanout true` (no pin) — standing
179
179
  fan-out on `routing.search` when set, else all configured search
180
180
  providers. Default off; `config set fanout false` disables.
181
181
  4. Otherwise the standard single-provider selection.
@@ -294,6 +294,11 @@ scoutline science get 10.1038/nature12373
294
294
  (`2401.12345`); the identifier grammar routes to the suppliers that
295
295
  can serve it.
296
296
 
297
+ Responses cache locally for 24h per supplier and request (`--no-cache`
298
+ bypasses for one invocation); transient failures (timeouts, network
299
+ errors, 5xx) retry once with backoff — supplier 429s surface as terminal
300
+ quota errors. Cache-served runs record journal warm-repeat markers.
301
+
297
302
  ## Batch (manifest runner)
298
303
 
299
304
  Run many operations in one process — one summary envelope on stdout,
@@ -351,109 +356,109 @@ input).
351
356
 
352
357
  ```bash
353
358
  # Z.AI (default)
354
- npx scoutline@0.20.0 vision analyze ./screenshot.png "What errors do you see?"
355
- npx scoutline@0.20.0 search "React 19 new features" --count 5
356
- npx scoutline@0.20.0 read https://docs.example.com/api
357
- npx scoutline@0.20.0 read https://docs.example.com/api --with-images-summary --no-gfm
358
- npx scoutline@0.20.0 fetch https://api.github.com/repos/nodejs/node --sha256
359
- npx scoutline@0.20.0 fetch https://example.com/report.pdf --pdf text --out report.txt
360
- npx scoutline@0.20.0 archive cdx https://example.com/ --from 20230101 --to 20231231
361
- npx scoutline@0.20.0 archive get https://example.com/ --at 20230601000000 --raw
362
- npx scoutline@0.20.0 archive diff https://example.com/ --since 30d
363
- npx scoutline@0.20.0 watch add https://example.com/changelog --name example-changelog
364
- npx scoutline@0.20.0 watch run --all # exit 0/1/2: no-change / change / fetch error
365
- npx scoutline@0.20.0 watch feed example-changelog --format rss
366
- npx scoutline@0.20.0 repo search facebook/react "server components"
367
- npx scoutline@0.20.0 repo search openai/codex "config" --language en
368
- npx scoutline@0.20.0 repo tree openai/codex --path codex-rs --depth 2
369
- npx scoutline@0.20.0 quota
370
- npx scoutline@0.20.0 doctor
359
+ scoutline vision analyze ./screenshot.png "What errors do you see?"
360
+ scoutline search "React 19 new features" --count 5
361
+ scoutline read https://docs.example.com/api
362
+ scoutline read https://docs.example.com/api --with-images-summary --no-gfm
363
+ scoutline fetch https://api.github.com/repos/nodejs/node --sha256
364
+ scoutline fetch https://example.com/report.pdf --pdf text --out report.txt
365
+ scoutline archive cdx https://example.com/ --from 20230101 --to 20231231
366
+ scoutline archive get https://example.com/ --at 20230601000000 --raw
367
+ scoutline archive diff https://example.com/ --since 30d
368
+ scoutline watch add https://example.com/changelog --name example-changelog
369
+ scoutline watch run --all # exit 0/1/2: no-change / change / fetch error
370
+ scoutline watch feed example-changelog --format rss
371
+ scoutline repo search facebook/react "server components"
372
+ scoutline repo search openai/codex "config" --language en
373
+ scoutline repo tree openai/codex --path codex-rs --depth 2
374
+ scoutline quota
375
+ scoutline doctor
371
376
 
372
377
  # MiniMax Token Plan
373
- npx scoutline@0.20.0 --provider minimax search "AI policy news"
374
- npx scoutline@0.20.0 --provider minimax vision analyze ./diagram.png "Explain this"
375
- npx scoutline@0.20.0 --provider minimax quota
376
- npx scoutline@0.20.0 doctor --provider minimax
378
+ scoutline --provider minimax search "AI policy news"
379
+ scoutline --provider minimax vision analyze ./diagram.png "Explain this"
380
+ scoutline --provider minimax quota
381
+ scoutline doctor --provider minimax
377
382
 
378
383
  # Tavily (Search, Reader, Crawl, Map, Research)
379
- npx scoutline@0.20.0 --provider tavily search "AI funding rounds" --topic news
380
- npx scoutline@0.20.0 --provider tavily read https://example.com/
381
- npx scoutline@0.20.0 --provider tavily crawl https://docs.example.com --depth 2
382
- npx scoutline@0.20.0 --provider tavily map https://docs.example.com
383
- npx scoutline@0.20.0 --provider tavily research "Rust async runtime comparison"
384
- npx scoutline@0.20.0 doctor --provider tavily
384
+ scoutline --provider tavily search "AI funding rounds" --topic news
385
+ scoutline --provider tavily read https://example.com/
386
+ scoutline --provider tavily crawl https://docs.example.com --depth 2
387
+ scoutline --provider tavily map https://docs.example.com
388
+ scoutline --provider tavily research "Rust async runtime comparison"
389
+ scoutline doctor --provider tavily
385
390
 
386
391
  # Exa (Search, Reader, Research)
387
- npx scoutline@0.20.0 --provider exa search "latest AI research" --topic news
388
- npx scoutline@0.20.0 --provider exa read https://example.com/
389
- npx scoutline@0.20.0 --provider exa research "Compare Rust async runtimes"
390
- npx scoutline@0.20.0 doctor --provider exa
392
+ scoutline --provider exa search "latest AI research" --topic news
393
+ scoutline --provider exa read https://example.com/
394
+ scoutline --provider exa research "Compare Rust async runtimes"
395
+ scoutline doctor --provider exa
391
396
 
392
397
  # Brave (Search: web, news, video)
393
- npx scoutline@0.20.0 --provider brave search "AI policy news" --topic news
394
- npx scoutline@0.20.0 --provider brave search "rust async" --type video
395
- npx scoutline@0.20.0 --provider brave search "large context topic" --content-size high
396
- npx scoutline@0.20.0 --provider brave quota
397
- npx scoutline@0.20.0 doctor --provider brave
398
+ scoutline --provider brave search "AI policy news" --topic news
399
+ scoutline --provider brave search "rust async" --type video
400
+ scoutline --provider brave search "large context topic" --content-size high
401
+ scoutline --provider brave quota
402
+ scoutline doctor --provider brave
398
403
 
399
404
  # Firecrawl (Search, Reader, Crawl, Map)
400
- npx scoutline@0.20.0 --provider firecrawl search "AI funding rounds" --content-size high
401
- npx scoutline@0.20.0 --provider firecrawl read https://example.com/
402
- npx scoutline@0.20.0 --provider firecrawl crawl https://docs.example.com --depth 2
403
- npx scoutline@0.20.0 --provider firecrawl map https://docs.example.com
404
- npx scoutline@0.20.0 --provider firecrawl quota # remaining credits
405
+ scoutline --provider firecrawl search "AI funding rounds" --content-size high
406
+ scoutline --provider firecrawl read https://example.com/
407
+ scoutline --provider firecrawl crawl https://docs.example.com --depth 2
408
+ scoutline --provider firecrawl map https://docs.example.com
409
+ scoutline --provider firecrawl quota # remaining credits
405
410
 
406
411
  # Parallel AI (Search, Reader, Research)
407
- npx scoutline@0.20.0 --provider parallel search "AI funding rounds" --topic news
408
- npx scoutline@0.20.0 --provider parallel read https://example.com/
409
- npx scoutline@0.20.0 --provider parallel research "Compare Rust async runtimes"
410
- npx scoutline@0.20.0 doctor --provider parallel
412
+ scoutline --provider parallel search "AI funding rounds" --topic news
413
+ scoutline --provider parallel read https://example.com/
414
+ scoutline --provider parallel research "Compare Rust async runtimes"
415
+ scoutline doctor --provider parallel
411
416
 
412
417
  # Perplexity (Search, Research)
413
- npx scoutline@0.20.0 --provider perplexity search "latest AI research" --topic news
414
- npx scoutline@0.20.0 --provider perplexity research "Compare Rust async runtimes"
415
- npx scoutline@0.20.0 doctor --provider perplexity
418
+ scoutline --provider perplexity search "latest AI research" --topic news
419
+ scoutline --provider perplexity research "Compare Rust async runtimes"
420
+ scoutline doctor --provider perplexity
416
421
 
417
422
  # Jina AI (Search, Reader, Research)
418
- npx scoutline@0.20.0 --provider jina search "AI policy news" --topic news
419
- npx scoutline@0.20.0 --provider jina read https://example.com/
420
- npx scoutline@0.20.0 --provider jina research "State of carbon capture 2025"
421
- npx scoutline@0.20.0 --provider jina quota # rate-limit telemetry, not spend
423
+ scoutline --provider jina search "AI policy news" --topic news
424
+ scoutline --provider jina read https://example.com/
425
+ scoutline --provider jina research "State of carbon capture 2025"
426
+ scoutline --provider jina quota # rate-limit telemetry, not spend
422
427
 
423
428
  # You.com (Search, Reader, Research)
424
- npx scoutline@0.20.0 --provider you search "AI policy news" --topic news
425
- npx scoutline@0.20.0 --provider you read https://example.com/
426
- npx scoutline@0.20.0 --provider you research "State of carbon capture 2025"
427
- npx scoutline@0.20.0 doctor --provider you
429
+ scoutline --provider you search "AI policy news" --topic news
430
+ scoutline --provider you read https://example.com/
431
+ scoutline --provider you research "State of carbon capture 2025"
432
+ scoutline doctor --provider you
428
433
 
429
434
  # Linkup (Search, Reader, Research)
430
- npx scoutline@0.20.0 --provider linkup search "AI funding rounds" --topic news
431
- npx scoutline@0.20.0 --provider linkup read https://example.com/
432
- npx scoutline@0.20.0 --provider linkup research "Compare Rust async runtimes"
433
- npx scoutline@0.20.0 --provider linkup quota # prepaid USD balance
434
- npx scoutline@0.20.0 doctor --provider linkup
435
+ scoutline --provider linkup search "AI funding rounds" --topic news
436
+ scoutline --provider linkup read https://example.com/
437
+ scoutline --provider linkup research "Compare Rust async runtimes"
438
+ scoutline --provider linkup quota # prepaid USD balance
439
+ scoutline doctor --provider linkup
435
440
 
436
441
  # Spider.cloud (Search, Reader, Crawl, Map)
437
- npx scoutline@0.20.0 --provider spider search "AI funding rounds" --topic news
438
- npx scoutline@0.20.0 --provider spider read https://example.com/
439
- npx scoutline@0.20.0 --provider spider crawl https://docs.example.com --depth 2
440
- npx scoutline@0.20.0 --provider spider map https://docs.example.com
441
- npx scoutline@0.20.0 --provider spider quota # credit balance
442
+ scoutline --provider spider search "AI funding rounds" --topic news
443
+ scoutline --provider spider read https://example.com/
444
+ scoutline --provider spider crawl https://docs.example.com --depth 2
445
+ scoutline --provider spider map https://docs.example.com
446
+ scoutline --provider spider quota # credit balance
442
447
 
443
448
  # All-Provider quota
444
- npx scoutline@0.20.0 quota --all-providers
449
+ scoutline quota --all-providers
445
450
 
446
451
  # Research journal — recall past work instead of re-searching (offline, no provider call)
447
- npx scoutline@0.20.0 history recall "rust async" --limit 5
448
- npx scoutline@0.20.0 history export --since 2026-09-01
452
+ scoutline history recall "rust async" --limit 5
453
+ scoutline history export --since 2026-09-01
449
454
 
450
455
  # Local cache inspection, clearing, and pruning
451
- npx scoutline@0.20.0 cache stats # inventory both subdirectories
452
- npx scoutline@0.20.0 cache clear # delete every file in cache/ and tools/
453
- npx scoutline@0.20.0 cache prune --older-than 24h # delete entries older than 24h (Nh|Nm|Ns|seconds)
456
+ scoutline cache stats # inventory both subdirectories
457
+ scoutline cache clear # delete every file in cache/ and tools/
458
+ scoutline cache prune --older-than 24h # delete entries older than 24h (Nh|Nm|Ns|seconds)
454
459
 
455
460
  # Config (see "Settings via scoutline config" above)
456
- npx scoutline@0.20.0 config get routing
461
+ scoutline config get routing
457
462
  ```
458
463
 
459
464
  ## Which provider when
@@ -666,7 +671,10 @@ construction — ambient `process.env` is never reread.
666
671
 
667
672
  Keyless and credential-free like `fetch`/`archive`; watch is stateful
668
673
  (state under `SCOUTLINE_WATCH_DIR`, default `~/.scoutline/watch`) and
669
- therefore rejected under `--isolated`. Page targets only (http(s)) in v1.
674
+ therefore rejected under `--isolated`, as are `research` and `crawl`
675
+ (async-job resume state; `map` is stateless and allowed). Under
676
+ `--isolated` the response cache, tool cache, and `--save` artifact store
677
+ each gain an `isolated/<pid>` segment. Page targets only (http(s)) in v1.
670
678
 
671
679
  `watch run` exit codes are a cron contract:
672
680
 
@@ -713,7 +721,10 @@ additive optional fields to both schemas
713
721
  Parallel, Perplexity, You.com),
714
722
  and each `doctor` provider entry may carry `quota: { source:
715
723
  "snapshot" | "none", observedAt?, authoritative }` plus `verification:
716
- { status, checkedAt, reason? }`. Each doctor row also carries
724
+ { status, checkedAt, reason? }`. Each `quota` requests category may
725
+ also carry an additive optional `toolUsage` array of per-tool
726
+ consumption rows (rendered on the TTY; carried verbatim in json/data;
727
+ no version bump). Each doctor row also carries
717
728
  `availability: "ok" | "exhausted" | "error" | "unconfigured"`
718
729
  (snapshot-based exhaustion evidence, healthy-first row ordering,
719
730
  `availableProviders` short list; `--available` filters the rows to