scoutline 0.17.7 → 0.18.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 (102) hide show
  1. package/README.md +27 -26
  2. package/dist/capabilities/quota.d.ts.map +1 -1
  3. package/dist/capabilities/quota.js +4 -1
  4. package/dist/capabilities/quota.js.map +1 -1
  5. package/dist/capabilities/reader.d.ts +8 -0
  6. package/dist/capabilities/reader.d.ts.map +1 -1
  7. package/dist/capabilities/reader.js.map +1 -1
  8. package/dist/commands/crawl.js +3 -3
  9. package/dist/commands/doctor.d.ts.map +1 -1
  10. package/dist/commands/doctor.js +10 -9
  11. package/dist/commands/doctor.js.map +1 -1
  12. package/dist/commands/init.d.ts.map +1 -1
  13. package/dist/commands/init.js +65 -19
  14. package/dist/commands/init.js.map +1 -1
  15. package/dist/commands/map.js +3 -3
  16. package/dist/commands/quota.d.ts.map +1 -1
  17. package/dist/commands/quota.js +1 -2
  18. package/dist/commands/quota.js.map +1 -1
  19. package/dist/commands/read.d.ts.map +1 -1
  20. package/dist/commands/read.js +13 -5
  21. package/dist/commands/read.js.map +1 -1
  22. package/dist/commands/research.d.ts.map +1 -1
  23. package/dist/commands/research.js +7 -6
  24. package/dist/commands/research.js.map +1 -1
  25. package/dist/commands/search.d.ts.map +1 -1
  26. package/dist/commands/search.js +2 -3
  27. package/dist/commands/search.js.map +1 -1
  28. package/dist/index.d.ts.map +1 -1
  29. package/dist/index.js +9 -10
  30. package/dist/index.js.map +1 -1
  31. package/dist/lib/quota-mapping.d.ts +23 -2
  32. package/dist/lib/quota-mapping.d.ts.map +1 -1
  33. package/dist/lib/quota-mapping.js +47 -2
  34. package/dist/lib/quota-mapping.js.map +1 -1
  35. package/dist/lib/redact.d.ts +9 -1
  36. package/dist/lib/redact.d.ts.map +1 -1
  37. package/dist/lib/redact.js +21 -1
  38. package/dist/lib/redact.js.map +1 -1
  39. package/dist/providers/linkup/adapter.d.ts +92 -0
  40. package/dist/providers/linkup/adapter.d.ts.map +1 -0
  41. package/dist/providers/linkup/adapter.js +747 -0
  42. package/dist/providers/linkup/adapter.js.map +1 -0
  43. package/dist/providers/linkup/client.d.ts +157 -0
  44. package/dist/providers/linkup/client.d.ts.map +1 -0
  45. package/dist/providers/linkup/client.js +371 -0
  46. package/dist/providers/linkup/client.js.map +1 -0
  47. package/dist/providers/linkup/credentials.d.ts +41 -0
  48. package/dist/providers/linkup/credentials.d.ts.map +1 -0
  49. package/dist/providers/linkup/credentials.js +66 -0
  50. package/dist/providers/linkup/credentials.js.map +1 -0
  51. package/dist/providers/linkup/diagnostics.d.ts +39 -0
  52. package/dist/providers/linkup/diagnostics.d.ts.map +1 -0
  53. package/dist/providers/linkup/diagnostics.js +49 -0
  54. package/dist/providers/linkup/diagnostics.js.map +1 -0
  55. package/dist/providers/linkup/quota.d.ts +55 -0
  56. package/dist/providers/linkup/quota.d.ts.map +1 -0
  57. package/dist/providers/linkup/quota.js +100 -0
  58. package/dist/providers/linkup/quota.js.map +1 -0
  59. package/dist/providers/registry.d.ts.map +1 -1
  60. package/dist/providers/registry.js +6 -0
  61. package/dist/providers/registry.js.map +1 -1
  62. package/dist/providers/spider/adapter.d.ts +130 -0
  63. package/dist/providers/spider/adapter.d.ts.map +1 -0
  64. package/dist/providers/spider/adapter.js +683 -0
  65. package/dist/providers/spider/adapter.js.map +1 -0
  66. package/dist/providers/spider/client.d.ts +122 -0
  67. package/dist/providers/spider/client.d.ts.map +1 -0
  68. package/dist/providers/spider/client.js +267 -0
  69. package/dist/providers/spider/client.js.map +1 -0
  70. package/dist/providers/spider/credentials.d.ts +31 -0
  71. package/dist/providers/spider/credentials.d.ts.map +1 -0
  72. package/dist/providers/spider/credentials.js +52 -0
  73. package/dist/providers/spider/credentials.js.map +1 -0
  74. package/dist/providers/spider/diagnostics.d.ts +33 -0
  75. package/dist/providers/spider/diagnostics.d.ts.map +1 -0
  76. package/dist/providers/spider/diagnostics.js +55 -0
  77. package/dist/providers/spider/diagnostics.js.map +1 -0
  78. package/dist/providers/spider/quota.d.ts +61 -0
  79. package/dist/providers/spider/quota.d.ts.map +1 -0
  80. package/dist/providers/spider/quota.js +90 -0
  81. package/dist/providers/spider/quota.js.map +1 -0
  82. package/dist/providers/types.d.ts +1 -1
  83. package/dist/providers/types.d.ts.map +1 -1
  84. package/dist/providers/types.js +3 -0
  85. package/dist/providers/types.js.map +1 -1
  86. package/dist/providers/you/adapter.d.ts +92 -0
  87. package/dist/providers/you/adapter.d.ts.map +1 -0
  88. package/dist/providers/you/adapter.js +469 -0
  89. package/dist/providers/you/adapter.js.map +1 -0
  90. package/dist/providers/you/client.d.ts +94 -0
  91. package/dist/providers/you/client.d.ts.map +1 -0
  92. package/dist/providers/you/client.js +242 -0
  93. package/dist/providers/you/client.js.map +1 -0
  94. package/dist/providers/you/credentials.d.ts +40 -0
  95. package/dist/providers/you/credentials.d.ts.map +1 -0
  96. package/dist/providers/you/credentials.js +61 -0
  97. package/dist/providers/you/credentials.js.map +1 -0
  98. package/dist/providers/you/diagnostics.d.ts +43 -0
  99. package/dist/providers/you/diagnostics.d.ts.map +1 -0
  100. package/dist/providers/you/diagnostics.js +60 -0
  101. package/dist/providers/you/diagnostics.js.map +1 -0
  102. package/package.json +1 -1
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Linkup credential resolution.
3
+ *
4
+ * Single source of truth for the Linkup API key (`LINKUP_API_KEY`).
5
+ * Whitespace-only values are treated as absent, matching the
6
+ * descriptor's `isConfigured` contract. Resolved keys are returned
7
+ * trimmed so wire headers never carry stray whitespace.
8
+ *
9
+ * Boundary rules (ARCHITECTURE.md §2):
10
+ * - May import the normalized-error contract only.
11
+ * - Must NOT import transport, command presentation, or another
12
+ * Provider's Adapter.
13
+ *
14
+ * Missing credentials are surfaced as {@link ConfigurationError}
15
+ * (exit 3), distinct from {@link AuthError} (exit 1) which means the
16
+ * Provider REJECTED a presented credential.
17
+ */
18
+ import crypto from "node:crypto";
19
+ import { ConfigurationError } from "../../lib/errors.js";
20
+ const MISSING_KEY_HELP = 'export LINKUP_API_KEY="your-api-key"';
21
+ /**
22
+ * Pick a non-blank raw value from the environment and trim it. Returns
23
+ * `undefined` when the value is absent, non-string, or all whitespace.
24
+ */
25
+ function pickNonBlank(raw) {
26
+ if (typeof raw !== "string")
27
+ return undefined;
28
+ const trimmed = raw.trim();
29
+ return trimmed.length > 0 ? trimmed : undefined;
30
+ }
31
+ /**
32
+ * Resolve the Linkup API key without throwing. Returns the trimmed key
33
+ * or `undefined` when no non-blank value is present.
34
+ */
35
+ export function getLinkupApiKey(env) {
36
+ return pickNonBlank(env.LINKUP_API_KEY);
37
+ }
38
+ /**
39
+ * Resolve the Linkup API key or throw {@link ConfigurationError}
40
+ * (exit 3) when it is missing. Call this at every capability
41
+ * invocation gate.
42
+ */
43
+ export function requireLinkupApiKey(env) {
44
+ const key = getLinkupApiKey(env);
45
+ if (key === undefined) {
46
+ throw new ConfigurationError("LINKUP_API_KEY environment variable is required", MISSING_KEY_HELP);
47
+ }
48
+ return key;
49
+ }
50
+ /**
51
+ * True when a non-blank Linkup API key is configured. Metadata-only:
52
+ * performs no transport construction and reads no other Provider's
53
+ * credentials.
54
+ */
55
+ export function isLinkupConfigured(env) {
56
+ return getLinkupApiKey(env) !== undefined;
57
+ }
58
+ /**
59
+ * Lowercase hex SHA-256 fingerprint of the Linkup API key. Used for
60
+ * partitioned cache identity; the raw key must never appear in cache
61
+ * filenames, errors, or logs.
62
+ */
63
+ export function hashLinkupApiKey(key) {
64
+ return crypto.createHash("sha256").update(key).digest("hex");
65
+ }
66
+ //# sourceMappingURL=credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credentials.js","sourceRoot":"","sources":["../../../src/providers/linkup/credentials.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,MAAM,MAAM,aAAa,CAAC;AAEjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEzD,MAAM,gBAAgB,GAAG,sCAAsC,CAAC;AAEhE;;;GAGG;AACH,SAAS,YAAY,CAAC,GAAY;IAChC,IAAI,OAAO,GAAG,KAAK,QAAQ;QAAE,OAAO,SAAS,CAAC;IAC9C,MAAM,OAAO,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC;IAC3B,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;AAClD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,GAAsB;IACpD,OAAO,YAAY,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;AAC1C,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,mBAAmB,CAAC,GAAsB;IACxD,MAAM,GAAG,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC;IACjC,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;QACtB,MAAM,IAAI,kBAAkB,CAC1B,iDAAiD,EACjD,gBAAgB,CACjB,CAAC;IACJ,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAAC,GAAsB;IACvD,OAAO,eAAe,CAAC,GAAG,CAAC,KAAK,SAAS,CAAC;AAC5C,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,GAAW;IAC1C,OAAO,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC/D,CAAC"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Linkup Diagnostics Capability.
3
+ *
4
+ * Probes Linkup connectivity with the SAME non-destructive
5
+ * `GET /v1/credits/balance` the Quota Capability reads: the probe
6
+ * authenticates the Bearer key without spending credits. The probe
7
+ * NEVER POSTs a search — a diagnostics probe must not be metered.
8
+ *
9
+ * Structurally cloned from the Jina diagnostics pattern
10
+ * (non-destructive GET, IMPLEMENTATION-CONTRACT analog-adapter table).
11
+ *
12
+ * Boundary rules (ARCHITECTURE.md §2):
13
+ * - May import the diagnostics capability contract, Adapter-local
14
+ * credentials, Adapter-local transport, and normalized errors.
15
+ * - Must NOT import command presentation or another Provider's
16
+ * Adapter.
17
+ */
18
+ import type { DiagnosticsCapability } from "../../capabilities/diagnostics.js";
19
+ import { type LinkupTransportDeps } from "./client.js";
20
+ /**
21
+ * Options for the Linkup DiagnosticsCapability. The API key is
22
+ * resolved from `env`; transport dependencies (`fetch`, timers) are
23
+ * injectable for deterministic tests through the unified `transport`
24
+ * seam.
25
+ */
26
+ export interface LinkupDiagnosticsCapabilityOptions {
27
+ readonly env: NodeJS.ProcessEnv;
28
+ readonly transport?: LinkupTransportDeps;
29
+ }
30
+ /**
31
+ * Build the Linkup DiagnosticsCapability. The probe performs ONE GET
32
+ * against `/credits/balance` — the cheapest credible authentication
33
+ * check, costless on metered billing. When `options.probe` is false,
34
+ * `invoke` resolves immediately without touching the network — the
35
+ * doctor command skips probing unconfigured or tools-disabled
36
+ * Providers before reaching this Capability.
37
+ */
38
+ export declare function createLinkupDiagnosticsCapability(options: LinkupDiagnosticsCapabilityOptions): DiagnosticsCapability;
39
+ //# sourceMappingURL=diagnostics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diagnostics.d.ts","sourceRoot":"","sources":["../../../src/providers/linkup/diagnostics.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EACV,qBAAqB,EAEtB,MAAM,mCAAmC,CAAC;AAG3C,OAAO,EAA4B,KAAK,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAOjF;;;;;GAKG;AACH,MAAM,WAAW,kCAAkC;IACjD,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC,UAAU,CAAC;IAChC,QAAQ,CAAC,SAAS,CAAC,EAAE,mBAAmB,CAAC;CAC1C;AAED;;;;;;;GAOG;AACH,wBAAgB,iCAAiC,CAC/C,OAAO,EAAE,kCAAkC,GAC1C,qBAAqB,CAavB"}
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Linkup Diagnostics Capability.
3
+ *
4
+ * Probes Linkup connectivity with the SAME non-destructive
5
+ * `GET /v1/credits/balance` the Quota Capability reads: the probe
6
+ * authenticates the Bearer key without spending credits. The probe
7
+ * NEVER POSTs a search — a diagnostics probe must not be metered.
8
+ *
9
+ * Structurally cloned from the Jina diagnostics pattern
10
+ * (non-destructive GET, IMPLEMENTATION-CONTRACT analog-adapter table).
11
+ *
12
+ * Boundary rules (ARCHITECTURE.md §2):
13
+ * - May import the diagnostics capability contract, Adapter-local
14
+ * credentials, Adapter-local transport, and normalized errors.
15
+ * - Must NOT import command presentation or another Provider's
16
+ * Adapter.
17
+ */
18
+ import { createProbeErrorNormalizer, STANDARD_PROBE_PASS_THROUGH } from "../../lib/probe-errors.js";
19
+ import { requireLinkupApiKey } from "./credentials.js";
20
+ import { fetchLinkupCreditBalance } from "./client.js";
21
+ const normalizeProbeError = createProbeErrorNormalizer({
22
+ passThrough: STANDARD_PROBE_PASS_THROUGH,
23
+ fallbackMessage: "Linkup diagnostics probe failed",
24
+ });
25
+ /**
26
+ * Build the Linkup DiagnosticsCapability. The probe performs ONE GET
27
+ * against `/credits/balance` — the cheapest credible authentication
28
+ * check, costless on metered billing. When `options.probe` is false,
29
+ * `invoke` resolves immediately without touching the network — the
30
+ * doctor command skips probing unconfigured or tools-disabled
31
+ * Providers before reaching this Capability.
32
+ */
33
+ export function createLinkupDiagnosticsCapability(options) {
34
+ const { env, transport } = options;
35
+ return {
36
+ async invoke(diagOptions) {
37
+ if (!diagOptions.probe)
38
+ return;
39
+ const apiKey = requireLinkupApiKey(env);
40
+ try {
41
+ await fetchLinkupCreditBalance(apiKey, transport);
42
+ }
43
+ catch (error) {
44
+ throw normalizeProbeError(error);
45
+ }
46
+ },
47
+ };
48
+ }
49
+ //# sourceMappingURL=diagnostics.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diagnostics.js","sourceRoot":"","sources":["../../../src/providers/linkup/diagnostics.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAMH,OAAO,EAAE,0BAA0B,EAAE,2BAA2B,EAAE,MAAM,2BAA2B,CAAC;AACpG,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAA4B,MAAM,aAAa,CAAC;AAEjF,MAAM,mBAAmB,GAAG,0BAA0B,CAAC;IACrD,WAAW,EAAE,2BAA2B;IACxC,eAAe,EAAE,iCAAiC;CACnD,CAAC,CAAC;AAaH;;;;;;;GAOG;AACH,MAAM,UAAU,iCAAiC,CAC/C,OAA2C;IAE3C,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC;IACnC,OAAO;QACL,KAAK,CAAC,MAAM,CAAC,WAA8B;YACzC,IAAI,CAAC,WAAW,CAAC,KAAK;gBAAE,OAAO;YAC/B,MAAM,MAAM,GAAG,mBAAmB,CAAC,GAAG,CAAC,CAAC;YACxC,IAAI,CAAC;gBACH,MAAM,wBAAwB,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;YACpD,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,mBAAmB,CAAC,KAAK,CAAC,CAAC;YACnC,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Linkup Quota Capability.
3
+ *
4
+ * Maps the Linkup `GET /v1/credits/balance` response into the
5
+ * normalized Provider-quota interface. Linkup is metered billing: the
6
+ * endpoint reports ONLY a remaining credit `balance`, never a limit,
7
+ * so the single "credits" category publishes the exact `remaining`
8
+ * with `used`, `limit`, and `remainingPercent` omitted (GitHub #49
9
+ * unknown-limit window) — nothing is fabricated against an invented
10
+ * ceiling or percentage.
11
+ *
12
+ * Structurally cloned from the Jina quota pattern (non-destructive
13
+ * GET, IMPLEMENTATION-CONTRACT analog-adapter table): one direct GET
14
+ * per invoke, shared execution owns retry policy, quota never uses
15
+ * the response cache.
16
+ *
17
+ * Boundary rules (ARCHITECTURE.md §2):
18
+ * - May import the quota capability contract, Adapter-local
19
+ * credentials, Adapter-local quota transport, and normalized
20
+ * errors.
21
+ * - Must NOT import command presentation or another Provider's
22
+ * Adapter.
23
+ */
24
+ import type { ProviderQuotaSuccess, QuotaCapability } from "../../capabilities/quota.js";
25
+ import { type LinkupTransportDeps } from "./client.js";
26
+ /**
27
+ * Normalize a raw Linkup credit-balance payload
28
+ * (`{ balance: <number> }`) into the shared quota interface.
29
+ *
30
+ * A missing or non-finite `balance` is a malformed response and throws
31
+ * `ApiError` 500. A valid balance flows through
32
+ * `buildQuotaWindow({ remaining: balance })`, which publishes the
33
+ * exact remaining count and omits `used`, `limit`, and
34
+ * `remainingPercent` — the limit is unknown and no percentage is
35
+ * invented.
36
+ */
37
+ export declare function normalizeLinkupQuota(raw: unknown): ProviderQuotaSuccess;
38
+ /**
39
+ * Options for the Linkup QuotaCapability. The API key is resolved
40
+ * from `env`; transport dependencies (`fetch`, timers) are injectable
41
+ * for deterministic tests through the unified `transport` seam.
42
+ */
43
+ export interface LinkupQuotaCapabilityOptions {
44
+ readonly env: NodeJS.ProcessEnv;
45
+ readonly transport?: LinkupTransportDeps;
46
+ }
47
+ /**
48
+ * Build the Linkup QuotaCapability. `invoke` resolves the API key
49
+ * (required — the credit-balance endpoint authenticates the Bearer
50
+ * header), performs one non-destructive GET, and normalizes the
51
+ * balance into the shared interface. Shared execution wraps this in
52
+ * the retry policy; quota never uses the response cache.
53
+ */
54
+ export declare function createLinkupQuotaCapability(options: LinkupQuotaCapabilityOptions): QuotaCapability;
55
+ //# sourceMappingURL=quota.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quota.d.ts","sourceRoot":"","sources":["../../../src/providers/linkup/quota.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EACV,oBAAoB,EACpB,eAAe,EAChB,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EAA4B,KAAK,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAMjF;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,OAAO,GAAG,oBAAoB,CAmBvE;AAqBD;;;;GAIG;AACH,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC,UAAU,CAAC;IAChC,QAAQ,CAAC,SAAS,CAAC,EAAE,mBAAmB,CAAC;CAC1C;AAED;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,4BAA4B,GACpC,eAAe,CAajB"}
@@ -0,0 +1,100 @@
1
+ /**
2
+ * Linkup Quota Capability.
3
+ *
4
+ * Maps the Linkup `GET /v1/credits/balance` response into the
5
+ * normalized Provider-quota interface. Linkup is metered billing: the
6
+ * endpoint reports ONLY a remaining credit `balance`, never a limit,
7
+ * so the single "credits" category publishes the exact `remaining`
8
+ * with `used`, `limit`, and `remainingPercent` omitted (GitHub #49
9
+ * unknown-limit window) — nothing is fabricated against an invented
10
+ * ceiling or percentage.
11
+ *
12
+ * Structurally cloned from the Jina quota pattern (non-destructive
13
+ * GET, IMPLEMENTATION-CONTRACT analog-adapter table): one direct GET
14
+ * per invoke, shared execution owns retry policy, quota never uses
15
+ * the response cache.
16
+ *
17
+ * Boundary rules (ARCHITECTURE.md §2):
18
+ * - May import the quota capability contract, Adapter-local
19
+ * credentials, Adapter-local quota transport, and normalized
20
+ * errors.
21
+ * - Must NOT import command presentation or another Provider's
22
+ * Adapter.
23
+ */
24
+ import { ApiError, ScoutlineError } from "../../lib/errors.js";
25
+ import { requireLinkupApiKey } from "./credentials.js";
26
+ import { fetchLinkupCreditBalance } from "./client.js";
27
+ // ---------------------------------------------------------------------------
28
+ // Normalizer
29
+ // ---------------------------------------------------------------------------
30
+ /**
31
+ * Normalize a raw Linkup credit-balance payload
32
+ * (`{ balance: <number> }`) into the shared quota interface.
33
+ *
34
+ * A missing or non-finite `balance` is a malformed response and throws
35
+ * `ApiError` 500. A valid balance flows through
36
+ * `buildQuotaWindow({ remaining: balance })`, which publishes the
37
+ * exact remaining count and omits `used`, `limit`, and
38
+ * `remainingPercent` — the limit is unknown and no percentage is
39
+ * invented.
40
+ */
41
+ export function normalizeLinkupQuota(raw) {
42
+ if (!raw || typeof raw !== "object" || Array.isArray(raw)) {
43
+ throw new ApiError("Linkup quota returned a malformed response", 500);
44
+ }
45
+ const balance = raw.balance;
46
+ if (typeof balance !== "number" || !Number.isFinite(balance)) {
47
+ throw new ApiError("Linkup quota returned a malformed response", 500);
48
+ }
49
+ return {
50
+ provider: "linkup",
51
+ status: "ok",
52
+ categories: [
53
+ {
54
+ name: "credits",
55
+ unit: "credits",
56
+ current: { remaining: balance },
57
+ },
58
+ ],
59
+ };
60
+ }
61
+ // ---------------------------------------------------------------------------
62
+ // Capability factory
63
+ // ---------------------------------------------------------------------------
64
+ /**
65
+ * Map a thrown error into a normalized Linkup quota error. Every typed
66
+ * transport error (ConfigurationError, QuotaError, ValidationError,
67
+ * ApiError, TimeoutError, NetworkError) extends
68
+ * {@link ScoutlineError}, so the single guard passes them through
69
+ * verbatim (GitHub #49); anything else is wrapped as a generic
70
+ * `ApiError`.
71
+ */
72
+ function normalizeLinkupQuotaError(error) {
73
+ if (error instanceof ScoutlineError) {
74
+ return error;
75
+ }
76
+ return new ApiError("Linkup quota request failed", 500);
77
+ }
78
+ /**
79
+ * Build the Linkup QuotaCapability. `invoke` resolves the API key
80
+ * (required — the credit-balance endpoint authenticates the Bearer
81
+ * header), performs one non-destructive GET, and normalizes the
82
+ * balance into the shared interface. Shared execution wraps this in
83
+ * the retry policy; quota never uses the response cache.
84
+ */
85
+ export function createLinkupQuotaCapability(options) {
86
+ const { env, transport } = options;
87
+ return {
88
+ async invoke() {
89
+ const apiKey = requireLinkupApiKey(env);
90
+ try {
91
+ const raw = await fetchLinkupCreditBalance(apiKey, transport);
92
+ return normalizeLinkupQuota(raw);
93
+ }
94
+ catch (error) {
95
+ throw normalizeLinkupQuotaError(error);
96
+ }
97
+ },
98
+ };
99
+ }
100
+ //# sourceMappingURL=quota.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quota.js","sourceRoot":"","sources":["../../../src/providers/linkup/quota.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAOH,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAA4B,MAAM,aAAa,CAAC;AAEjF,8EAA8E;AAC9E,aAAa;AACb,8EAA8E;AAE9E;;;;;;;;;;GAUG;AACH,MAAM,UAAU,oBAAoB,CAAC,GAAY;IAC/C,IAAI,CAAC,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;QAC1D,MAAM,IAAI,QAAQ,CAAC,4CAA4C,EAAE,GAAG,CAAC,CAAC;IACxE,CAAC;IACD,MAAM,OAAO,GAAI,GAA+B,CAAC,OAAO,CAAC;IACzD,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;QAC7D,MAAM,IAAI,QAAQ,CAAC,4CAA4C,EAAE,GAAG,CAAC,CAAC;IACxE,CAAC;IACD,OAAO;QACL,QAAQ,EAAE,QAAQ;QAClB,MAAM,EAAE,IAAI;QACZ,UAAU,EAAE;YACV;gBACE,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE;aAChC;SACF;KACF,CAAC;AACJ,CAAC;AAED,8EAA8E;AAC9E,qBAAqB;AACrB,8EAA8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file":"registry.d.ts","sourceRoot":"","sources":["../../src/providers/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAa0D,OAAO,KAAK,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAM9H;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,EAAE,SAAS,kBAAkB,EAatE,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,EAAE,EAAE,UAAU,EACd,WAAW,GAAE,SAAS,kBAAkB,EAAkC,GACzE,kBAAkB,CAEpB;AAED;;;GAGG;AACH,wBAAgB,gCAAgC,CAC9C,GAAG,EAAE,MAAM,CAAC,UAAU,EACtB,WAAW,GAAE,SAAS,kBAAkB,EAAkC,GACzE,SAAS,kBAAkB,EAAE,CAE/B"}
@@ -23,6 +23,9 @@ import { createFirecrawlDescriptor } from "./firecrawl/adapter.js";
23
23
  import { createParallelDescriptor } from "./parallel/adapter.js";
24
24
  import { createPerplexityDescriptor } from "./perplexity/adapter.js";
25
25
  import { createJinaDescriptor } from "./jina/adapter.js";
26
+ import { createLinkupDescriptor } from "./linkup/adapter.js";
27
+ import { createYouDescriptor } from "./you/adapter.js";
28
+ import { createSpiderDescriptor } from "./spider/adapter.js";
26
29
  import { getProviderDescriptor as lookupProviderDescriptor, getConfiguredProviderDescriptors as lookupConfigured, } from "./types.js";
27
30
  /**
28
31
  * Built-in Provider Descriptors in canonical order. Each Descriptor is
@@ -40,6 +43,9 @@ export const BUILT_IN_PROVIDER_DESCRIPTORS = [
40
43
  createParallelDescriptor(),
41
44
  createPerplexityDescriptor(),
42
45
  createJinaDescriptor(),
46
+ createYouDescriptor(),
47
+ createLinkupDescriptor(),
48
+ createSpiderDescriptor(),
43
49
  ];
44
50
  /**
45
51
  * Look up a built-in Descriptor by ID. The optional `descriptors`
@@ -1 +1 @@
1
- {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/providers/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;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ACH,MAAM,UAAU,gCAAgC,CAC9C,GAAsB,EACtB,WAAW,GAAkC,6BAA6B;IAE1E,OAAO,gBAAgB,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC;AAC5C,CAAC"}
@@ -0,0 +1,130 @@
1
+ import type { SearchRequest, SearchSource } from "../../capabilities/search.js";
2
+ import type { ReaderFetchRequest, ReaderFetchResult, LegacyReaderCacheCandidate } from "../../capabilities/reader.js";
3
+ import type { CrawlRequest, CrawlResult } from "../../capabilities/crawl.js";
4
+ import type { MapRequest, MapResult } from "../../capabilities/map.js";
5
+ import type { DiagnosticsCapability } from "../../capabilities/diagnostics.js";
6
+ import type { ProviderCapability, ProviderContext } from "../types.js";
7
+ import { type SpiderTransportDeps } from "./client.js";
8
+ import { type SpiderQuotaCapability } from "./quota.js";
9
+ /**
10
+ * Local cache-identity type: identical to the shared
11
+ * `SearchCacheIdentity` except `provider` is the `"spider"` literal.
12
+ * Assignable to the shared contract once `"spider"` joins `PROVIDER_IDS`.
13
+ */
14
+ interface SpiderSearchCacheIdentity {
15
+ readonly provider: "spider";
16
+ readonly capability: "search";
17
+ readonly credentialFingerprint: string;
18
+ readonly request: Readonly<SearchRequest>;
19
+ }
20
+ /** Local Search contract — see the module header. */
21
+ interface SpiderSearchCapability {
22
+ validate(request: SearchRequest): void;
23
+ cacheIdentity(request: SearchRequest): SpiderSearchCacheIdentity;
24
+ invoke(request: SearchRequest): Promise<readonly SearchSource[]>;
25
+ }
26
+ /**
27
+ * Local cache-identity type: identical to the shared
28
+ * `ReaderCacheIdentity` except `provider` is the `"spider"` literal.
29
+ * Assignable to the shared contract once `"spider"` joins `PROVIDER_IDS`.
30
+ */
31
+ interface SpiderReaderCacheIdentity {
32
+ readonly provider: "spider";
33
+ readonly capability: "reader";
34
+ readonly operation: "reader-fetch";
35
+ readonly credentialFingerprint: string;
36
+ readonly request: Readonly<ReaderFetchRequest>;
37
+ readonly legacyCandidates: readonly LegacyReaderCacheCandidate<ReaderFetchResult>[];
38
+ }
39
+ /** Local Reader operation contract — see the module header. */
40
+ interface SpiderReaderOperation {
41
+ readonly kind: "reader-fetch";
42
+ validate(request: ReaderFetchRequest): void;
43
+ cacheIdentity(request: ReaderFetchRequest): SpiderReaderCacheIdentity;
44
+ decodeCached(value: unknown): ReaderFetchResult | null;
45
+ invoke(request: ReaderFetchRequest, signal?: AbortSignal): Promise<ReaderFetchResult>;
46
+ }
47
+ /** Local Reader contract — see the module header. */
48
+ interface SpiderReaderCapability {
49
+ readonly fetch: SpiderReaderOperation;
50
+ }
51
+ /**
52
+ * Local cache-identity type: identical to the shared `CacheIdentity`
53
+ * for crawl except `provider` is the `"spider"` literal. Assignable to
54
+ * the shared contract once `"spider"` joins `PROVIDER_IDS`.
55
+ */
56
+ interface SpiderCrawlCacheIdentity {
57
+ readonly provider: "spider";
58
+ readonly capability: "crawl";
59
+ readonly credentialFingerprint: string;
60
+ readonly request: Readonly<CrawlRequest>;
61
+ }
62
+ /** Local Crawl operation contract — see the module header. */
63
+ interface SpiderCrawlOperation {
64
+ readonly kind: "crawl-fetch";
65
+ validate(request: CrawlRequest): void;
66
+ cacheIdentity(request: CrawlRequest): SpiderCrawlCacheIdentity;
67
+ decodeCached(value: unknown): CrawlResult | null;
68
+ invoke(request: CrawlRequest): Promise<CrawlResult>;
69
+ }
70
+ /** Local Crawl contract — see the module header. */
71
+ interface SpiderCrawlCapability {
72
+ readonly fetch: SpiderCrawlOperation;
73
+ }
74
+ /**
75
+ * Local cache-identity type: identical to the shared `CacheIdentity`
76
+ * for map except `provider` is the `"spider"` literal. Assignable to
77
+ * the shared contract once `"spider"` joins `PROVIDER_IDS`.
78
+ */
79
+ interface SpiderMapCacheIdentity {
80
+ readonly provider: "spider";
81
+ readonly capability: "map";
82
+ readonly credentialFingerprint: string;
83
+ readonly request: Readonly<MapRequest>;
84
+ }
85
+ /** Local Map operation contract — see the module header. */
86
+ interface SpiderMapOperation {
87
+ readonly kind: "map-fetch";
88
+ validate(request: MapRequest): void;
89
+ cacheIdentity(request: MapRequest): SpiderMapCacheIdentity;
90
+ decodeCached(value: unknown): MapResult | null;
91
+ invoke(request: MapRequest): Promise<MapResult>;
92
+ }
93
+ /** Local Map contract — see the module header. */
94
+ interface SpiderMapCapability {
95
+ readonly fetch: SpiderMapOperation;
96
+ }
97
+ /**
98
+ * Dependencies the Spider Adapter accepts. The unified `transport` seam
99
+ * carries `fetch` and timer injection.
100
+ */
101
+ export interface SpiderAdapterDependencies {
102
+ readonly transport?: SpiderTransportDeps;
103
+ }
104
+ /** Local Adapter contract — see the module header. */
105
+ interface SpiderAdapter {
106
+ readonly id: "spider";
107
+ readonly search: SpiderSearchCapability;
108
+ readonly reader: SpiderReaderCapability;
109
+ readonly crawl: SpiderCrawlCapability;
110
+ readonly map: SpiderMapCapability;
111
+ readonly quota: SpiderQuotaCapability;
112
+ readonly diagnostics: DiagnosticsCapability;
113
+ }
114
+ /** Local Descriptor contract — see the module header. */
115
+ interface SpiderDescriptor {
116
+ readonly id: "spider";
117
+ isConfigured(env: NodeJS.ProcessEnv): boolean;
118
+ capabilities(): ReadonlySet<ProviderCapability>;
119
+ create(context: ProviderContext): SpiderAdapter;
120
+ readonly credentialEnvVars: readonly string[];
121
+ }
122
+ /**
123
+ * Build the Spider.cloud Provider Descriptor. Advertises the full
124
+ * Spider.cloud capability set (Search, Reader, Crawl, Map, Quota,
125
+ * Diagnostics). `create()` is side-effect-free; the transport is
126
+ * invoked per Capability call.
127
+ */
128
+ export declare function createSpiderDescriptor(dependencies?: SpiderAdapterDependencies): SpiderDescriptor;
129
+ export {};
130
+ //# sourceMappingURL=adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../src/providers/spider/adapter.ts"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EACV,aAAa,EAGb,YAAY,EACb,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EACV,kBAAkB,EAClB,iBAAiB,EACjB,0BAA0B,E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