@juspay/neurolink 13.13.0 → 13.13.2

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.
@@ -116,17 +116,42 @@ function readCodexRequestRefusal(status, errorText) {
116
116
  */
117
117
  const codexRefreshInFlight = new Map();
118
118
  async function refreshCodexTokenOnceWithDependencies(key, refreshToken, store, refresh) {
119
- const existing = codexRefreshInFlight.get(key);
119
+ // Re-read the stored token instead of trusting the caller's snapshot. A
120
+ // request that captured the pool just before a previous refresh completed
121
+ // holds a token that has since been rotated; using it would spend a real
122
+ // attempt on a grant the server has already invalidated.
123
+ const latest = await store.peekTokens(key).catch(() => null);
124
+ const current = latest?.refreshToken ?? refreshToken;
125
+ // Flights are keyed by the token that is actually spent, read from the store
126
+ // rather than from the caller. Every caller for one account therefore
127
+ // shares one flight whatever snapshot it holds, and accounts that share a
128
+ // refresh token share it too. Nothing awaits between this lookup and the
129
+ // set below, so two callers cannot both start a flight.
130
+ const flightKey = current || key;
131
+ const existing = codexRefreshInFlight.get(flightKey);
120
132
  if (existing) {
121
- return existing;
133
+ const resolved = await existing;
134
+ // Normally the owner's fan-out already persisted this key; this repairs
135
+ // the case where that write failed, and only while the stored token is
136
+ // still the one that was rotated.
137
+ await saveRotatedIfCurrent(store, key, current, resolved, latest?.scope);
138
+ return resolved;
122
139
  }
123
140
  const pending = (async () => {
124
- // Re-read the stored token instead of trusting the caller's snapshot. A
125
- // request that captured the pool just before a previous refresh completed
126
- // holds a token that has since been rotated; using it would spend a real
127
- // attempt on a grant the server has already invalidated.
128
- const latest = await store.peekTokens(key).catch(() => null);
129
- const current = latest?.refreshToken ?? refreshToken;
141
+ // The peek above ran outside any flight. If a flight for this token ended
142
+ // between that peek and this point, `current` has already been rotated;
143
+ // spending it would be an invalid_grant. Re-read inside the flight and use
144
+ // what the finished flight stored instead of refreshing again.
145
+ if (latest) {
146
+ const fresh = await store.peekTokens(key).catch(() => null);
147
+ if (fresh?.refreshToken && fresh.refreshToken !== current) {
148
+ return {
149
+ accessToken: fresh.accessToken,
150
+ refreshToken: fresh.refreshToken,
151
+ expiresAt: fresh.expiresAt ?? latest.expiresAt ?? Date.now(),
152
+ };
153
+ }
154
+ }
130
155
  const refreshed = await refresh(current);
131
156
  const resolved = {
132
157
  accessToken: refreshed.accessToken,
@@ -138,19 +163,62 @@ async function refreshCodexTokenOnceWithDependencies(key, refreshToken, store, r
138
163
  // rotating refresh token, receive an invalid_grant, and disable an account
139
164
  // another request has already healed.
140
165
  if (latest) {
141
- await store.saveTokens(key, {
142
- ...resolved,
143
- tokenType: "Bearer",
144
- ...(latest.scope ? { scope: latest.scope } : {}),
145
- });
166
+ const saved = await saveRotatedIfCurrent(store, key, current, resolved, latest.scope);
167
+ if (!saved) {
168
+ logger.warn(`[codex] ${key} changed during refresh; kept the stored credential instead of the rotated token`);
169
+ }
170
+ }
171
+ if (store.getProviderSnapshot) {
172
+ let snapshot = {};
173
+ try {
174
+ snapshot = await store.getProviderSnapshot();
175
+ }
176
+ catch (error) {
177
+ logger.warn(`[codex] could not read sibling accounts to propagate the rotated token: ${error instanceof Error ? error.message : String(error)}`);
178
+ }
179
+ for (const [siblingKey, entry] of Object.entries(snapshot)) {
180
+ if (!siblingKey.startsWith("codex:") ||
181
+ siblingKey === key ||
182
+ entry?.tokens?.refreshToken !== current) {
183
+ continue;
184
+ }
185
+ try {
186
+ await saveRotatedIfCurrent(store, siblingKey, current, resolved, entry.tokens?.scope);
187
+ }
188
+ catch (error) {
189
+ logger.warn(`[codex] could not propagate the rotated token to ${siblingKey}: ${error instanceof Error ? error.message : String(error)}`);
190
+ }
191
+ }
146
192
  }
147
193
  return resolved;
148
194
  })().finally(() => {
149
- codexRefreshInFlight.delete(key);
195
+ codexRefreshInFlight.delete(flightKey);
150
196
  });
151
- codexRefreshInFlight.set(key, pending);
197
+ codexRefreshInFlight.set(flightKey, pending);
152
198
  return pending;
153
199
  }
200
+ /**
201
+ * Persist a rotated token for `key` only while its stored refresh token is
202
+ * still `rotatedFrom`, so a concurrent `auth login --force` import is never
203
+ * overwritten. Atomic under the token store's lock when it offers
204
+ * `saveTokensIf`; otherwise a best-effort peek-then-save.
205
+ */
206
+ async function saveRotatedIfCurrent(store, key, rotatedFrom, resolved, scope) {
207
+ const tokens = {
208
+ ...resolved,
209
+ tokenType: "Bearer",
210
+ ...(scope ? { scope } : {}),
211
+ };
212
+ if (store.saveTokensIf) {
213
+ return store.saveTokensIf(key, tokens, (providers) => providers[key]?.tokens?.refreshToken === rotatedFrom);
214
+ }
215
+ const stored = await store.peekTokens(key).catch(() => null);
216
+ if (stored?.refreshToken !== rotatedFrom) {
217
+ return false;
218
+ }
219
+ await store.saveTokens(key, tokens);
220
+ return true;
221
+ }
154
222
  /** Refresh an account's token at most once at a time. */
155
223
  async function refreshCodexTokenOnce(key, refreshToken) {
156
224
  return refreshCodexTokenOnceWithDependencies(key, refreshToken, tokenStore, refreshCodexToken);
@@ -12,6 +12,7 @@
12
12
  * maps onto the session fields and its secondary window onto the weekly fields.
13
13
  */
14
14
  import type { AccountCoolingReason, AccountQuota, ClaudeContentBlock, ClaudeTool, InternalResult } from "./proxy.js";
15
+ import type { StoredOAuthTokens } from "./auth.js";
15
16
  /** Token block inside `~/.codex/auth.json`. */
16
17
  export type CodexAuthFileTokens = {
17
18
  id_token?: string;
@@ -40,6 +41,21 @@ export type CodexImportedCredential = {
40
41
  /** Account email decoded from the id token, for the account label. */
41
42
  email?: string;
42
43
  };
44
+ /** Provider inventory as seen by a Codex credential import. */
45
+ export type CodexImportProviders = Record<string, {
46
+ tokens?: StoredOAuthTokens;
47
+ }>;
48
+ /** Token-store operations needed to import a Codex credential into the pool. */
49
+ export type CodexImportTokenStore = {
50
+ getProviderSnapshot: () => Promise<Record<string, {
51
+ tokens?: StoredOAuthTokens;
52
+ }>>;
53
+ saveTokensIf: (key: string, tokens: StoredOAuthTokens, guard: (providers: Record<string, {
54
+ tokens?: StoredOAuthTokens;
55
+ }>) => boolean, options?: {
56
+ enable?: boolean;
57
+ }) => Promise<boolean>;
58
+ };
43
59
  /** Raw OpenAI OAuth token endpoint response. */
44
60
  export type CodexTokenResponse = {
45
61
  access_token?: string;
@@ -238,6 +238,8 @@ export type StreamLoopArgs = {
238
238
  url: string;
239
239
  fetchImpl: typeof fetch;
240
240
  abortSignal: AbortSignal | undefined;
241
+ /** Re-arm the idle timeout when any upstream wire bytes arrive. */
242
+ onStreamActivity?: () => void;
241
243
  options: StreamOptions;
242
244
  conversation: OpenAICompatChatMessage[];
243
245
  openAITools: OpenAICompatChatTool[] | undefined;
@@ -1076,6 +1076,14 @@ export type CodexRotationFailure = {
1076
1076
  export type CodexRefreshTokenStore = {
1077
1077
  peekTokens(provider: string): Promise<StoredOAuthTokens | null>;
1078
1078
  saveTokens(provider: string, tokens: StoredOAuthTokens): Promise<void>;
1079
+ /** Compare-and-set save under the store's lock; the real token store has it. */
1080
+ saveTokensIf?(provider: string, tokens: StoredOAuthTokens, guard: (providers: Record<string, {
1081
+ tokens?: StoredOAuthTokens;
1082
+ }>) => boolean): Promise<boolean>;
1083
+ /** Present on the real token store; lets a refresh also reach sibling labels. */
1084
+ getProviderSnapshot?(): Promise<Record<string, {
1085
+ tokens?: StoredOAuthTokens;
1086
+ }>>;
1079
1087
  };
1080
1088
  /** Result contract for a Codex OAuth refresh operation. */
1081
1089
  export type CodexTokenRefresher = (refreshToken: string) => Promise<{
@@ -532,7 +532,9 @@ export type StreamOptions = {
532
532
  schema?: ValidationSchema;
533
533
  tools?: Record<string, Tool>;
534
534
  timeout?: number | string;
535
- /** Wall-clock cap for the whole agentic turn (ms). See GenerateOptions.turnTimeoutMs. */
535
+ /** Optional wall-clock cap for the whole agentic turn (ms). OpenAI-compatible
536
+ * and native Anthropic streams have no lifetime cap by default; `timeout`
537
+ * bounds idle time. See GenerateOptions.turnTimeoutMs. */
536
538
  turnTimeoutMs?: number;
537
539
  /**
538
540
  * Opt-in execution policy for this turn (native Anthropic streaming only).
@@ -136,6 +136,14 @@ export declare function createTimeoutController(timeout: number | string | undef
136
136
  reset: () => void;
137
137
  timeoutMs: number;
138
138
  } | null;
139
+ /** Keep a stream's idle deadline alive for every received wire chunk. */
140
+ export declare function monitorStreamActivity(body: ReadableStream<Uint8Array>, onActivity: () => void): ReadableStream<Uint8Array>;
141
+ /**
142
+ * Hard lifetime cap for a live stream, separate from its resettable idle
143
+ * deadline. Opt-in: only an explicit positive `turnTimeoutMs` sets one;
144
+ * otherwise there is no cap, so long but active streams are not cut off.
145
+ */
146
+ export declare function getStreamLifetimeTimeout(turnTimeoutMs?: number | null): number | undefined;
139
147
  /**
140
148
  * Compose an external abort signal with a timeout controller's signal.
141
149
  * Returns a single AbortSignal that fires when either signal aborts.
@@ -115,11 +115,18 @@ export const DEFAULT_TIMEOUTS = {
115
115
  * @returns Default timeout string
116
116
  */
117
117
  export function getDefaultTimeout(provider, operation = "generate") {
118
+ const providerKey = provider.toLowerCase().replace("_", "-");
119
+ const providerDefault = DEFAULT_TIMEOUTS.providers[providerKey] || DEFAULT_TIMEOUTS.global;
118
120
  if (operation === "stream") {
119
- return DEFAULT_TIMEOUTS.streaming;
121
+ // A stream never gets less than its provider's own budget, so slow-first-
122
+ // token providers (ollama, litellm: 5m) keep theirs instead of dropping
123
+ // to the shared streaming default.
124
+ return (parseTimeout(providerDefault) ?? 0) >
125
+ (parseTimeout(DEFAULT_TIMEOUTS.streaming) ?? 0)
126
+ ? providerDefault
127
+ : DEFAULT_TIMEOUTS.streaming;
120
128
  }
121
- const providerKey = provider.toLowerCase().replace("_", "-");
122
- return (DEFAULT_TIMEOUTS.providers[providerKey] || DEFAULT_TIMEOUTS.global);
129
+ return providerDefault;
123
130
  }
124
131
  /**
125
132
  * Create a timeout promise that rejects after specified duration
@@ -371,6 +378,27 @@ export function createTimeoutController(timeout, provider, operation) {
371
378
  };
372
379
  return { controller, cleanup, reset, timeoutMs };
373
380
  }
381
+ /** Keep a stream's idle deadline alive for every received wire chunk. */
382
+ export function monitorStreamActivity(body, onActivity) {
383
+ return body.pipeThrough(new TransformStream({
384
+ transform(chunk, controller) {
385
+ onActivity();
386
+ controller.enqueue(chunk);
387
+ },
388
+ }));
389
+ }
390
+ /**
391
+ * Hard lifetime cap for a live stream, separate from its resettable idle
392
+ * deadline. Opt-in: only an explicit positive `turnTimeoutMs` sets one;
393
+ * otherwise there is no cap, so long but active streams are not cut off.
394
+ */
395
+ export function getStreamLifetimeTimeout(turnTimeoutMs) {
396
+ return typeof turnTimeoutMs === "number" &&
397
+ Number.isFinite(turnTimeoutMs) &&
398
+ turnTimeoutMs > 0
399
+ ? turnTimeoutMs
400
+ : undefined;
401
+ }
374
402
  /**
375
403
  * Compose an external abort signal with a timeout controller's signal.
376
404
  * Returns a single AbortSignal that fires when either signal aborts.
@@ -1234,10 +1234,11 @@
1234
1234
  {"objectID":"d98dc8888c6b1b9c2181c08fe15c1d7f0545d665022f285f5349ecc5a7dedbe7","title":"Distributed Rate Limiting with Redis","url":"/docs/cookbook/rate-limit-handling#distributed-rate-limiting-with-redis","content":"For multi-instance deployments:","hierarchy":{"lvl0":"Cookbook","lvl1":"Rate Limit Handling","lvl2":"Distributed Rate Limiting with Redis","lvl3":""}},
1235
1235
  {"objectID":"ebb9c835006b8a4ebb952c6342112e445f5a584bc0f24287fc5886e240c8f375","title":"Best Practices","url":"/docs/cookbook/rate-limit-handling#best-practices","content":"Set conservative limits: Start with 80% of provider's limit\nMonitor usage: Track request patterns to optimize limits\nUse burst capacity: Allow occasional spikes while maintaining average rate\nImplement backoff: Exponential backoff on repeated rate limit errors\nCache responses: Reduce duplicate requests (see Cost Optimization)","hierarchy":{"lvl0":"Cookbook","lvl1":"Rate Limit Handling","lvl2":"Best Practices","lvl3":""}},
1236
1236
  {"objectID":"122f6a4b4882fe77a0403e20ab2c3032e58546c210d38e58d571da33ced23320","title":"See Also","url":"/docs/cookbook/rate-limit-handling#see-also","content":"Cost Optimization\nBatch Processing\nError Recovery\nStreaming with Retry","hierarchy":{"lvl0":"Cookbook","lvl1":"Rate Limit Handling","lvl2":"See Also","lvl3":""}},
1237
- {"objectID":"feb0e8fdd5a55ed39cd3eeb932df920702f17bf519b947650e61547319e7cc11","title":"Streaming with Retry Logic","url":"/docs/cookbook/streaming-with-retry","content":"Streaming with Retry Logic\n\nProblem\n\nNetwork interruptions, temporary provider outages, and transient errors can cause streaming responses to fail mid-stream. Without retry logic, users experience incomplete responses and poor reliability.\n\nSolution\n\nImplement automatic retry with exponential backoff for streaming responses. Handle different failure scenarios:\nNetwork timeouts\nConnection drops\nProvider rate limits\nTransient API errors\n\nCode\n\nExplanation\nRetry Configuration\n\nThe RetryConfig interface defines retry behavior:\nmaxRetries: Maximum number of retry attempts\ninitialDelay: Starting delay between retries (milliseconds)\nmaxDelay: Maximum delay to prevent excessive waiting\nbackoffMultiplier: How quickly delays increase (exponential backoff)\nRetry Loop\n\nThe while loop attempts streaming up to maxRetries + 1 times (initial attempt + retries).\nError Classification\n\nNot all errors should trigger retries:\nRetryable: Network errors, rate limits, temporary service issues\nNon-retryable: Authentication errors, invalid requests, missing models\nExponential Backoff\n\nEach retry waits longer than the previous:\nFirst retry: 1000ms\nSecond retry: 2000ms\nThird retry: 4000ms\nFourth retry: 8000ms (capped at maxDelay)\n\nThis prevents overwhelming the provider and gives transient issues time to resolve.\nStream Consumption\n\nThe code accumulates chunks to provide a complete response even if earlier attempts partially succeeded.\n\nVariations\n\nResume from Last Position\n\nFor very long streams, resume from the last received position:\n\nCircuit Breaker Pattern\n\nPrevent repeated failures with a circuit breaker:\n\nProvider Fallback on Retry\n\nTry different providers on subsequent retries:\n\nSee Also\nError Recovery Patterns\nMulti-Provider Fallback\nRate Limit Handling\nStreaming API Reference","hierarchy":{"lvl0":"Cookbook","lvl1":"Streaming with Retry Logic","lvl2":"","lvl3":""}},
1237
+ {"objectID":"feb0e8fdd5a55ed39cd3eeb932df920702f17bf519b947650e61547319e7cc11","title":"Streaming with Retry Logic","url":"/docs/cookbook/streaming-with-retry","content":"Streaming with Retry Logic\n\nProblem\n\nNetwork interruptions, temporary provider outages, and transient errors can cause streaming responses to fail mid-stream. Without retry logic, users experience incomplete responses and poor reliability.\n\nSolution\n\nImplement automatic retry with exponential backoff for streaming responses. Handle different failure scenarios:\nNetwork timeouts\nConnection drops\nProvider rate limits\nTransient API errors\n\nCode\n\nStream timeout policy\n\nStreaming calls now select the existing 2m streaming default instead of the\nprovider's generation default (for example, 30s for OpenAI, 60s for Anthropic).\nExplicit timeout values still take precedence, and Ollama's environment timeout\noverrides are preserved. Non-streaming defaults are unchanged.\n\nFor OpenAI-compatible and native Anthropic streams, timeout bounds inactivity:\neach raw response chunk, including a heartbeat, resets the idle deadline. Active\nstreams have no default lifetime cap and can continue beyond 30 minutes. Set\nturnTimeoutMs to opt in to a total turn deadline; heartbeat activity cannot\nextend it. Anthropic's explicit executionControl policy retains its existing\nper-request and lifetime behavior.\n\nRetry example\n\nExplanation\nRetry Configuration\n\nThe RetryConfig interface defines retry behavior:\nmaxRetries: Maximum number of retry attempts\ninitialDelay: Starting delay between retries (milliseconds)\nmaxDelay: Maximum delay to prevent excessive waiting\nbackoffMultiplier: How quickly delays increase (exponential backoff)\nRetry Loop\n\nThe while loop attempts streaming up to maxRetries + 1 times (initial attempt + retries).\nError Classification\n\nNot all errors should trigger retries:\nRetryable: Network errors, rate limits, temporary service issues\nNon-retryable: Authentication errors, invalid requests, missing models\nExponential Backoff\n\nEach retry waits longer than the previous:\nFirst retry: 1000ms\nSecond retry: 2000ms\nThird retry: 4000ms\nFourth retry: 8000ms (capped at maxDelay)\n\nThis prevents overwhelming the provider and gives transient issues time to resolve.\nStream Consumption\n\nThe code accumulates chunks to provide a complete response even if earlier attempts partially succeeded.\n\nVariations\n\nResume from Last Position\n\nFor very long streams, resume from the last received position:\n\nCircuit Breaker Pattern\n\nPrevent repeated failures with a circuit breaker:\n\nProvider Fallback on Retry\n\nTry different providers on subsequent retries:\n\nSee Also\nError Recovery Patterns\nMulti-Provider Fallback\nRate Limit Handling\nStreaming API Reference","hierarchy":{"lvl0":"Cookbook","lvl1":"Streaming with Retry Logic","lvl2":"","lvl3":""}},
1238
1238
  {"objectID":"472ceb0e39b287f287bd570b5250f75c2c2d8bc15e868b791e472374d26b1e02","title":"Problem","url":"/docs/cookbook/streaming-with-retry#problem","content":"Network interruptions, temporary provider outages, and transient errors can cause streaming responses to fail mid-stream. Without retry logic, users experience incomplete responses and poor reliability.","hierarchy":{"lvl0":"Cookbook","lvl1":"Streaming with Retry Logic","lvl2":"Problem","lvl3":""}},
1239
1239
  {"objectID":"6bcb7cd2ca9e53a0aa68e99dc609654017ddd5f23b6067e390140b05461edeca","title":"Solution","url":"/docs/cookbook/streaming-with-retry#solution","content":"Implement automatic retry with exponential backoff for streaming responses. Handle different failure scenarios:\nNetwork timeouts\nConnection drops\nProvider rate limits\nTransient API errors","hierarchy":{"lvl0":"Cookbook","lvl1":"Streaming with Retry Logic","lvl2":"Solution","lvl3":""}},
1240
- {"objectID":"2e7e45f94094925c5eaeb5816a36861806781b38d3481fc30ab949cc4f4d519f","title":"Code","url":"/docs/cookbook/streaming-with-retry#code","content":"Code","hierarchy":{"lvl0":"Cookbook","lvl1":"Streaming with Retry Logic","lvl2":"Code","lvl3":""}},
1240
+ {"objectID":"004d71f259083aaf893462f593d262c104d2dd0c5c7cdbb3d2f193c39d2cbde0","title":"Stream timeout policy","url":"/docs/cookbook/streaming-with-retry#stream-timeout-policy","content":"Streaming calls now select the existing 2m streaming default instead of the\nprovider's generation default (for example, 30s for OpenAI, 60s for Anthropic).\nExplicit timeout values still take precedence, and Ollama's environment timeout\noverrides are preserved. Non-streaming defaults are unchanged.\n\nFor OpenAI-compatible and native Anthropic streams, timeout bounds inactivity:\neach raw response chunk, including a heartbeat, resets the idle deadline. Active\nstreams have no default lifetime cap and can continue beyond 30 minutes. Set\nturnTimeoutMs to opt in to a total turn deadline; heartbeat activity cannot\nextend it. Anthropic's explicit executionControl policy retains its existing\nper-request and lifetime behavior.","hierarchy":{"lvl0":"Cookbook","lvl1":"Streaming with Retry Logic","lvl2":"Stream timeout policy","lvl3":""}},
1241
+ {"objectID":"e5c135a20ebb1351667908f24421f51aaf357ed494f213f91c985ac79f52c40a","title":"Retry example","url":"/docs/cookbook/streaming-with-retry#retry-example","content":"Retry example","hierarchy":{"lvl0":"Cookbook","lvl1":"Streaming with Retry Logic","lvl2":"Retry example","lvl3":""}},
1241
1242
  {"objectID":"698239032e7c166416bea4bc349591a3c45b04a69856f94b368c51661929c507","title":"1. Retry Configuration","url":"/docs/cookbook/streaming-with-retry#1-retry-configuration","content":"The RetryConfig interface defines retry behavior:\nmaxRetries: Maximum number of retry attempts\ninitialDelay: Starting delay between retries (milliseconds)\nmaxDelay: Maximum delay to prevent excessive waiting\nbackoffMultiplier: How quickly delays increase (exponential backoff)","hierarchy":{"lvl0":"Cookbook","lvl1":"Streaming with Retry Logic","lvl2":"1. Retry Configuration","lvl3":""}},
1242
1243
  {"objectID":"5c86ad31f040c5162dc4dd7b52c1e42f84a44ebfe6a7ff9709e10979f1d8e248","title":"2. Retry Loop","url":"/docs/cookbook/streaming-with-retry#2-retry-loop","content":"The while loop attempts streaming up to maxRetries + 1 times (initial attempt + retries).","hierarchy":{"lvl0":"Cookbook","lvl1":"Streaming with Retry Logic","lvl2":"2. Retry Loop","lvl3":""}},
1243
1244
  {"objectID":"718825ea30baf3d66847139cbd9931c250d2c3d23e13e7a78cb7aa3e7abade9f","title":"3. Error Classification","url":"/docs/cookbook/streaming-with-retry#3-error-classification","content":"Not all errors should trigger retries:\nRetryable: Network errors, rate limits, temporary service issues\nNon-retryable: Authentication errors, invalid requests, missing models","hierarchy":{"lvl0":"Cookbook","lvl1":"Streaming with Retry Logic","lvl2":"3. Error Classification","lvl3":""}},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juspay/neurolink",
3
- "version": "13.13.0",
3
+ "version": "13.13.2",
4
4
  "packageManager": "pnpm@10.34.9+sha512.f49b5a8ea0fdedb44bb3c0c1d6575092a53c2950d95b7ad15df11f17974877a2de3a01c07e934e9b28ce716e51c09a94962c7306d09be2e1e4b18a8c8762fd32",
5
5
  "description": "The pipe layer of an AI nervous system: one interface connecting provider neurons to your application, across three inference types — generate, stream and decide. `decide` returns typed, calibrated judgements from a non-generative model (~400ms, ~$0.00002/call) for routing, tool selection and context budgeting. MCP-native (4 transports), voice TTS/STT/realtime, RAG, agents, memory, compaction, 9 observability exporters. OpenAI · Anthropic · Gemini · Bedrock · Azure · Ollama · TypeSafe Jev and more.",
6
6
  "author": {