@juspay/neurolink 12.28.4 → 12.29.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.
- package/CHANGELOG.md +9 -2
- package/dist/adapters/tts/googleTTSHandler.d.ts +71 -1
- package/dist/adapters/tts/googleTTSHandler.js +254 -0
- package/dist/browser/neurolink.min.js +399 -399
- package/dist/cli/commands/voices.d.ts +23 -0
- package/dist/cli/commands/voices.js +102 -0
- package/dist/cli/loop/optionsSchema.d.ts +1 -1
- package/dist/cli/parser.js +3 -0
- package/dist/constants/enums.d.ts +13 -0
- package/dist/constants/enums.js +15 -0
- package/dist/core/baseProvider.d.ts +4 -0
- package/dist/core/baseProvider.js +245 -148
- package/dist/core/modules/structuredOutputPolicy.d.ts +27 -0
- package/dist/core/modules/structuredOutputPolicy.js +36 -0
- package/dist/core/nativeGenerateLoop.js +7 -1
- package/dist/neurolink.d.ts +42 -0
- package/dist/neurolink.js +102 -2
- package/dist/providers/catalog/index.generated.d.ts +1 -1
- package/dist/providers/catalog/index.generated.js +6 -0
- package/dist/providers/catalog/morph.json +97 -0
- package/dist/providers/catalog/novita.json +114 -0
- package/dist/providers/openaiChatCompletionsBase.d.ts +22 -0
- package/dist/providers/openaiChatCompletionsBase.js +291 -8
- package/dist/server/utils/validation.d.ts +34 -0
- package/dist/server/utils/validation.js +27 -0
- package/dist/server/websocket/WebSocketHandler.d.ts +4 -6
- package/dist/server/websocket/WebSocketHandler.js +185 -18
- package/dist/types/cli.d.ts +11 -0
- package/dist/types/generate.d.ts +15 -0
- package/dist/types/isolatedAgent.d.ts +16 -7
- package/dist/types/openaiCompatible.d.ts +6 -0
- package/dist/types/providerCatalog.generated.d.ts +2 -2
- package/dist/types/providers.d.ts +50 -3
- package/dist/types/server.d.ts +8 -0
- package/dist/types/stream.d.ts +30 -0
- package/dist/types/tts.d.ts +10 -0
- package/dist/types/utilities.d.ts +16 -3
- package/dist/utils/logger.d.ts +58 -13
- package/dist/utils/logger.js +156 -11
- package/dist/utils/providerHealth.d.ts +65 -1
- package/dist/utils/providerHealth.js +216 -54
- package/dist/utils/ttsProcessor.d.ts +30 -1
- package/dist/utils/ttsProcessor.js +76 -0
- package/docs-site/static/search-index.json +4 -4
- package/package.json +6 -1
|
@@ -4489,7 +4489,7 @@
|
|
|
4489
4489
|
{"objectID":"4fba8a5ecbfc53e65f0e6192db71f2d3b82a547451168837085030212502f605","title":"Save to file","url":"/docs/features/tts#save-to-file","content":"neurolink generate \"Welcome to our application\" \\\n --provider google-ai \\\n --tts-voice en-US-Neural2-C \\\n --tts-output welcome.mp3\ntypescript\n\nconst neurolink = new NeuroLink();\n\nconst result = await neurolink.generate({\n input: { text: \"Hello, world!\" },\n provider: \"google-ai\",\n tts: {\n enabled: true,\n voice: \"en-US-Neural2-C\",\n format: \"mp3\",\n play: true, // Auto-play in CLI, manual in SDK\n },\n});\n\n// Access generated audio\nconsole.log(\"Audio size:\", result.audio?.size, \"bytes\");\nconsole.log(\"Audio format:\", result.audio?.format);\n`","hierarchy":{"lvl0":"Features","lvl1":"Text-to-Speech (TTS) Integration Guide","lvl2":"Save to file","lvl3":""}},
|
|
4490
4490
|
{"objectID":"6480c53c807e64a6d53b2c070905bc4edeb4d7bd9225830d84918739ba75b9d7","title":"Supported Providers","url":"/docs/features/tts#supported-providers","content":"TTS is available through the following providers:\n\n| Provider | Authentication | Voices / Models | Notes |\n| -------------- | ----------------------------------------------------------- | ------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| google-ai | Service Account () | 50+ voices (Neural2, Wavenet, Standard) | Same auth as (TTS uses Google Cloud Text-to-Speech client) |\n| vertex | Service Account () | 50+ voices (Neural2, Wavenet, Standard) | Recommended for production |\n| openai-tts | API Key () | 6 voices: alloy, echo, fable, onyx, nova, shimmer; models: tts-1, tts-1-hd | Good default quality |\n| elevenlabs | API Key () | Multilingual voices; model: elev","hierarchy":{"lvl0":"Features","lvl1":"Text-to-Speech (TTS) Integration Guide","lvl2":"Supported Providers","lvl3":""}},
|
|
4491
4491
|
{"objectID":"0245027b08c8b3e9599fcf003e028bfa7b590365cc2049aba35ce7cee445ff61","title":"Available Voice Types","url":"/docs/features/tts#available-voice-types","content":"Google Cloud TTS offers three voice quality tiers:\n\n| Voice Type | Quality | Cost | Use Case | Example Voice |\n| ------------ | ------- | ------ | --------------------------------------- | ------------------ |\n| Neural2 | Highest | High | Natural conversations, voice assistants | |\n| Wavenet | High | Medium | Professional narration, podcasts | |\n| Standard | Good | Low | Cost optimization, bulk generation | |","hierarchy":{"lvl0":"Features","lvl1":"Text-to-Speech (TTS) Integration Guide","lvl2":"Available Voice Types","lvl3":""}},
|
|
4492
|
-
{"objectID":"e3dffe1fb95f6705f2d355f61f0d8a7f3053c312f576aaf17f4a82c3d03e9953","title":"Voice Discovery","url":"/docs/features/tts#voice-discovery","content":"
|
|
4492
|
+
{"objectID":"e3dffe1fb95f6705f2d355f61f0d8a7f3053c312f576aaf17f4a82c3d03e9953","title":"Voice Discovery","url":"/docs/features/tts#voice-discovery","content":"takes a provider-specific identifier, and \nprints the ones a provider will accept:\n\n is required. The list is sorted by name and the count is printed\nat the end. Providers are registered only when their credentials are present,\nso an unconfigured provider is reported the same way a misspelled one is —\nwith the set that is registered named in the message, and a non-zero exit.\n\nThe same list is available from the SDK:\n\n is passed through to the provider, which decides what filtering\nit means: Google and Azure query their APIs with it, and OpenAI's fixed list\nignores it. An unregistered provider, or one whose handler does not implement\nvoice listing, raises a error.\n\nGoogle voice identifiers follow Google Cloud TTS naming conventions: (e.g., , ).\n\nRefer to the Google Cloud TTS voice list for all available voices.","hierarchy":{"lvl0":"Features","lvl1":"Text-to-Speech (TTS) Integration Guide","lvl2":"Voice Discovery","lvl3":""}},
|
|
4493
4493
|
{"objectID":"5286e5a8d6c113fc69be8b99e4bb873edd71e451caa2a01673aa1d31621f0af3","title":"Supported Languages","url":"/docs/features/tts#supported-languages","content":"English Variants:\n- United States English\n- British English\n- Australian English\n- Indian English\n\nOther Languages:\n, - Spanish (Spain, Latin America)\n, - French (France, Canada)\n- German\n- Japanese\n- Hindi\n, - Chinese (Simplified, Traditional)\n, - Portuguese (Brazil, Portugal)\n- Italian\n- Korean\n- Russian","hierarchy":{"lvl0":"Features","lvl1":"Text-to-Speech (TTS) Integration Guide","lvl2":"Supported Languages","lvl3":""}},
|
|
4494
4494
|
{"objectID":"cc003baac54d52f5303fa3e333d43096212de9505d8cb3f15a14c96f3e563e42","title":"Voice Selection Guidelines","url":"/docs/features/tts#voice-selection-guidelines","content":"For Natural Conversations:\n\nFor Professional Narration:\n\nFor Cost Optimization:","hierarchy":{"lvl0":"Features","lvl1":"Text-to-Speech (TTS) Integration Guide","lvl2":"Voice Selection Guidelines","lvl3":""}},
|
|
4495
4495
|
{"objectID":"e6d89ecb1a2aedf5e505263b9c14c576c12f543bd8ea95343f7411a4fa1b3b59","title":"TTS Synthesis Modes","url":"/docs/features/tts#tts-synthesis-modes","content":"NeuroLink supports two TTS synthesis modes:","hierarchy":{"lvl0":"Features","lvl1":"Text-to-Speech (TTS) Integration Guide","lvl2":"TTS Synthesis Modes","lvl3":""}},
|
|
@@ -4501,7 +4501,7 @@
|
|
|
4501
4501
|
{"objectID":"b039345b68e23c76f0eb6219aabc347404b5d45cb7ab4d3a7bfe30e198c9a273","title":"Pitch Adjustment","url":"/docs/features/tts#pitch-adjustment","content":"Adjust voice pitch (-20.0 to 20.0 semitones):\n\nCLI:","hierarchy":{"lvl0":"Features","lvl1":"Text-to-Speech (TTS) Integration Guide","lvl2":"Pitch Adjustment","lvl3":""}},
|
|
4502
4502
|
{"objectID":"068054039c4d8d505376a7faec625e0324d9a5da2e6f683a60883ba93cb65eef","title":"Volume Adjustment","url":"/docs/features/tts#volume-adjustment","content":"Control output volume (-96.0 to 16.0 dB):","hierarchy":{"lvl0":"Features","lvl1":"Text-to-Speech (TTS) Integration Guide","lvl2":"Volume Adjustment","lvl3":""}},
|
|
4503
4503
|
{"objectID":"5d6186bf5e19d14b1e69bcd5876eb97463d3aeaafd37319b597056a850ac84ce","title":"CLI Flags","url":"/docs/features/tts#cli-flags","content":"`bash\nneurolink generate \"Your text\" \\\n --provider google-ai \\\n --tts \\\n --tts-provider \\\n --tts-voice \\\n --tts-format \\\n --tts-speed \\\n --tts-pitch \\\n --tts-output \\\n --tts-use-ai-response","hierarchy":{"lvl0":"Features","lvl1":"Text-to-Speech (TTS) Integration Guide","lvl2":"CLI Flags","lvl3":""}},
|
|
4504
|
-
{"objectID":"f6092ac261977b5e79f9f707d6505793f21cf4ddd0031313c74bebfd3b069231","title":"--tts-use-ai-response : synthesize AI response instead of input text","url":"/docs/features/tts#--tts-use-ai-response-synthesize-ai-response-instead-of-input-text","content":"bash","hierarchy":{"lvl0":"Features","lvl1":"Text-to-Speech (TTS) Integration Guide","lvl2":"--tts-use-ai-response : synthesize AI response instead of input text","lvl3":""}},
|
|
4504
|
+
{"objectID":"f6092ac261977b5e79f9f707d6505793f21cf4ddd0031313c74bebfd3b069231","title":"--tts-use-ai-response : synthesize AI response instead of input text","url":"/docs/features/tts#--tts-use-ai-response-synthesize-ai-response-instead-of-input-text","content":"bash\nneurolink voices --provider [--language ] [--json]\nbash","hierarchy":{"lvl0":"Features","lvl1":"Text-to-Speech (TTS) Integration Guide","lvl2":"--tts-use-ai-response : synthesize AI response instead of input text","lvl3":""}},
|
|
4505
4505
|
{"objectID":"131a74bbe692e6aebc996fe939f726a4fe623e2b0bde16fbbf0c673ecd80a0b0","title":"Use OpenAI TTS","url":"/docs/features/tts#use-openai-tts","content":"neurolink generate \"Hello\" --tts --tts-provider openai-tts","hierarchy":{"lvl0":"Features","lvl1":"Text-to-Speech (TTS) Integration Guide","lvl2":"Use OpenAI TTS","lvl3":""}},
|
|
4506
4506
|
{"objectID":"9c0f45a9bee2138a8c40bbb602d4c84b9a6d5737d2082222439f6bea81ab5659","title":"Use ElevenLabs","url":"/docs/features/tts#use-elevenlabs","content":"neurolink generate \"Hello\" --tts --tts-provider elevenlabs","hierarchy":{"lvl0":"Features","lvl1":"Text-to-Speech (TTS) Integration Guide","lvl2":"Use ElevenLabs","lvl3":""}},
|
|
4507
4507
|
{"objectID":"8161ee48ef0c112ef3afbd0f21aae33ca4730a599cd787847d29308cf0a0e34b","title":"Use Azure TTS","url":"/docs/features/tts#use-azure-tts","content":"neurolink generate \"Hello\" --tts --tts-provider azure-tts","hierarchy":{"lvl0":"Features","lvl1":"Text-to-Speech (TTS) Integration Guide","lvl2":"Use Azure TTS","lvl3":""}},
|
|
@@ -4515,7 +4515,7 @@
|
|
|
4515
4515
|
{"objectID":"08724a6c8a1ff45069f41dd3bae14dd1e4ff31e8b2f4096293b910ebe24533d6","title":"Normal speed for comparison","url":"/docs/features/tts#normal-speed-for-comparison","content":"neurolink generate \"Je m'appelle Claude. Comment allez-vous?\" \\\n --provider google-ai \\\n --tts-voice fr-FR-Neural2-A \\\n --tts-speed 1.0 \\\n --tts-output french-normal.mp3\n`","hierarchy":{"lvl0":"Features","lvl1":"Text-to-Speech (TTS) Integration Guide","lvl2":"Normal speed for comparison","lvl3":""}},
|
|
4516
4516
|
{"objectID":"cb4c5d8f7134c3828c803beb43c98139a26313016dbfcc07a98d4993e4cd6323","title":"5. Multilingual Support","url":"/docs/features/tts#5-multilingual-support","content":"Generate audio in multiple languages:","hierarchy":{"lvl0":"Features","lvl1":"Text-to-Speech (TTS) Integration Guide","lvl2":"5. Multilingual Support","lvl3":""}},
|
|
4517
4517
|
{"objectID":"65b7d41fc925195acb42777a5370e28f53ec6e7e2531c1014578c382cd8a7698","title":"6. Batch Audio Generation","url":"/docs/features/tts#6-batch-audio-generation","content":"Generate multiple audio files efficiently:","hierarchy":{"lvl0":"Features","lvl1":"Text-to-Speech (TTS) Integration Guide","lvl2":"6. Batch Audio Generation","lvl3":""}},
|
|
4518
|
-
{"objectID":"1e68edb3c5d3c783223a84199f14f74d69c4ce175e656be58caf4b8b68dcaf05","title":"7. Streaming Text + Audio","url":"/docs/features/tts#7-streaming-text-audio","content":"Mode 2 can synthesize sentence-buffered audio while the text response is still\nstreaming. synthesizes whenever is set;\n selects input-versus-response synthesis for and\ndoes not apply to . sets the minimum number of\nbuffered characters before a completed sentence is flushed (default: 120). A\nprovider's remains a hard boundary; handlers without an override\nuse the 3,000-character default.\n\nHandlers can optionally expose provider-native audio reads for each buffered\ntext segment. NeuroLink prefers that capability when it supports the requested\noptions and otherwise keeps the existing one-buffer-per-segment synthesis path.\
|
|
4518
|
+
{"objectID":"1e68edb3c5d3c783223a84199f14f74d69c4ce175e656be58caf4b8b68dcaf05","title":"7. Streaming Text + Audio","url":"/docs/features/tts#7-streaming-text-audio","content":"Mode 2 can synthesize sentence-buffered audio while the text response is still\nstreaming. synthesizes whenever is set;\n selects input-versus-response synthesis for and\ndoes not apply to . sets the minimum number of\nbuffered characters before a completed sentence is flushed (default: 120). A\nprovider's remains a hard boundary; handlers without an override\nuse the 3,000-character default.\n\nHandlers can optionally expose provider-native audio reads for each buffered\ntext segment. NeuroLink prefers that capability when it supports the requested\noptions and otherwise keeps the existing one-buffer-per-segment synthesis path.\nCustom and built-in handlers without the optional capability remain compatible.\n\nTwo handlers currently offer it, each only for the options whose incremental\ndelivery has been verified against the live API:\n\n| Handler | Streams natively for | Everything else |\n| ------------ | --------------------------------------------------------------------------------------- | ------------------ |\n| | , | buffered synthesis |\n| | and /, and only for a , or voice | buffered synthesis |\n\nGoogle's restriction is the streaming endpoint's own, not NeuroLink's: it\nrejects every other voice family (, , , )\nwith , and\nrejects and as unsupported encodings even though\n accepts both. SSML is also excluded — the streaming request\nhas no SSML field at all, so input stays on the buffered path rather\nthan being sent as literal text. Because the default format is and the\ndefault voice is a one, native streaming is strictly opt-in: pass\nboth a streaming-capable voice and (or ) to get it.\n\nNote that is headerless: the chunks report so a\nconsumer can wrap them, and Google's buffered path does not support at\nall, so that format only works for the streaming-capable voices above.\n\nProvider-local chunk indexes and final","hierarchy":{"lvl0":"Features","lvl1":"Text-to-Speech (TTS) Integration Guide","lvl2":"7. Streaming Text + Audio","lvl3":""}},
|
|
4519
4519
|
{"objectID":"25e56e8c2aa2164c7ccb28511b88e83f4da1cdbda7bb94d32fbde94a91faa8d0","title":"Common Issues","url":"/docs/features/tts#common-issues","content":"| Issue | Cause | Solution |\n| -------------------------------- | ------------------------ | -------------------------------------------------------------------------------------------- |\n| \"TTS client not initialized\" | Missing credentials | Set or |\n| \"Invalid voice name\" | Voice ID not found | Check the Google Cloud TTS voice list |\n| \"Text too long\" | Input exceeds 5000 bytes | Split text into smaller chunks |\n| \"Synthesis failed\" | Network/API error | Check network connection and credentials |\n| Audio doesn't play | Missing audio player | Install (macOS), (Linux), or use WAV on Windows |\n| Empty audio buffer | API returned no content | Check API quota and retry |","hierarchy":{"lvl0":"Features","lvl1":"Text-to-Speech (TTS) Integration Guide","lvl2":"Common Issues","lvl3":""}},
|
|
4520
4520
|
{"objectID":"97a359cecb0e94254dd1b2c4accf0c28d6e60a0095b46364ab683bc35f998e88","title":"Authentication Issues","url":"/docs/features/tts#authentication-issues","content":"Service Account:\n\n`bash","hierarchy":{"lvl0":"Features","lvl1":"Text-to-Speech (TTS) Integration Guide","lvl2":"Authentication Issues","lvl3":""}},
|
|
4521
4521
|
{"objectID":"71ca373c0e8643e813ab5ee309fb55ddefefa288a816c2e9880f85f36fe03613","title":"Verify credentials file exists","url":"/docs/features/tts#verify-credentials-file-exists","content":"ls -la $GOOGLEAPPLICATIONCREDENTIALS","hierarchy":{"lvl0":"Features","lvl1":"Text-to-Speech (TTS) Integration Guide","lvl2":"Verify credentials file exists","lvl3":""}},
|
|
@@ -8368,7 +8368,7 @@
|
|
|
8368
8368
|
{"objectID":"549e7b7594cf096b8e419d967e9cfa997bb10defbc439635f2152bc7a919b3e5","title":"5. Behavioral contract (acceptance spec)","url":"/docs/plans/2026-07-27-isolated-agent-runner-rfc#5-behavioral-contract-acceptance-spec","content":"Lifecycle — worker instance from N3, disposed in — including on the leg\n path when the handle expires (TTL) or is stopped.\nResearch pass runs with tools under the turn budget ( + wrap-up nudge\nstall watchdog — the machinery from , not a reimplementation). NEVER a\n bare wall-clock abort: a budget-capped run ends with the model consolidating, an honest\n , and . (Leashed is fed in as \n so leg ends are consolidations too; only and waste trips end a leg by\n abort, and both preserve the records.)\nExtraction pass always runs (when is configured), tools disabled, on\n its OWN timeout — never carved out of the research budget — fed from the tool-execution\n records, so a research generate that died on a provider error still extracts from the\n records instead of losing the run. In leashed mode extraction runs on terminal legs;\n intermediate legs return summaries instead (per the O2 pattern —\n extracting every leg would burn the budget the leash exists to protect).\nStructured recovery built in — candidates in order: provider → raw\n JSON object → coerceschemamaxRetriesshapeDocstatus: 'error' | 'partial'abortSignalstopReason: \"aborted\"onEventstarttoolcalltoolresultphasewrapupleg_endwastecompleteerrortoolExecutionCapture.onRecordnextPlanwasteSignalsduplicateCallLimit: 2emptyResultStreakLimit: 3errorStreakLimit: 3noNewResultsLimit: 8`).","hierarchy":{"lvl0":"Plans","lvl1":"RFC: `runIsolatedAgent()` — production sub-agent runner + host-loop delegation","lvl2":"5. Behavioral contract (acceptance spec)","lvl3":""}},
|
|
8369
8369
|
{"objectID":"47dc3f7e12e98eb3908b16a7756ff38b9981a247958227b5a8737bd23da37fbf","title":"6. Field validation matrix","url":"/docs/plans/2026-07-27-isolated-agent-runner-rfc#6-field-validation-matrix","content":"Every public field mapped against the three reference implementations; fields that don't\nmap to all three are justified below the table.\n\n| Field | (a) research worker | (b) log-analysis worker | (c) Yama ContextExplorer |\n| ------------------------------------------------------- | -------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ------------------------ |\n| | persona + code-search MCP filter | persona + log tools | persona + repo tools |\n| (lenient) | evidence list validator | findings validator | context-pack validator |\n| (strict) | provider-attached; no defaults/catch | same | same |\n| | corrective re-ask shape doc | same | same |\n| | wraps bare top-level arrays | normalizes evidence rows | wraps arrays |\n| | parent turn cancels worker | same | same |\n| | O2 defaults | internal-caller overrides (the named co","hierarchy":{"lvl0":"Plans","lvl1":"RFC: `runIsolatedAgent()` — production sub-agent runner + host-loop delegation","lvl2":"6. Field validation matrix","lvl3":""}},
|
|
8370
8370
|
{"objectID":"97996d2242f9f46d729177904ae2aad1103120154667acc5dc5a9f3990601621","title":"6b. Migration note — GenerateResult.toolExecutions shape change","url":"/docs/plans/2026-07-27-isolated-agent-runner-rfc#6b-migration-note-generateresulttoolexecutions-shape-change","content":"The historical stub entries were (with fabricated\n). They are replaced by real s. Consumers\nreading the old fields get — update reads as follows:\n\n| Old field | New field | Notes |\n| ---------- | ------------ | ------------------------------------------------- |\n| | | |\n| | | as parsed by the loop |\n| | | serialized + bounded (~8KB default; cap raisable) |\n| | | real wall-clock, no longer always 0 |\n| — | | new: thrown errors AND error-shaped results |\n| — | | new: epoch ms |\n\n is deliberately unchanged (legacy\n summaries) — the stream-side contract is a\nseparate surface and migrating it is out of scope here.","hierarchy":{"lvl0":"Plans","lvl1":"RFC: `runIsolatedAgent()` — production sub-agent runner + host-loop delegation","lvl2":"6b. Migration note — GenerateResult.toolExecutions shape change","lvl3":""}},
|
|
8371
|
-
{"objectID":"e6a7791de93faea3f0d6b1bcad40aa5de97cfdfefacd9b9e8a7d2965f946b67e","title":"6c. Known limitations (follow-up work)","url":"/docs/plans/2026-07-27-isolated-agent-runner-rfc#6c-known-limitations-follow-up-work","content":"Log-bridge attribution
|
|
8371
|
+
{"objectID":"e6a7791de93faea3f0d6b1bcad40aa5de97cfdfefacd9b9e8a7d2965f946b67e","title":"6c. Known limitations (follow-up work)","url":"/docs/plans/2026-07-27-isolated-agent-runner-rfc#6c-known-limitations-follow-up-work","content":"~~Log-bridge attribution~~ — resolved. The logger now routes per\n instance: // run their bodies inside an\n AsyncLocalStorage scope carrying the emitting instance's id, and a worker's\n bridge is subscribed to that id instead of the host's process-wide\n emitter. Residual scope gaps, documented on :\n logs emitted while a consumer drains a returned stream run in the\n consumer's context, and logs emitted outside any call (construction,\n background MCP reconnects) stay unattributed.\n/ events fire post-execution (driven by the\n capture record) — a pre-execution hook on the recorder wrapper is the\n natural extension when live in-flight status is needed.\nNested delegations bypass the concurrency pool (the outer delegation\n already holds a slot; queueing nested work behind a full pool would\n deadlock it). Nested fan-out is therefore bounded by the outer slots ×\n per-run step caps, not by the pool directly. standalone\n delegations are always top-level and stay pooled.","hierarchy":{"lvl0":"Plans","lvl1":"RFC: `runIsolatedAgent()` — production sub-agent runner + host-loop delegation","lvl2":"6c. Known limitations (follow-up work)","lvl3":""}},
|
|
8372
8372
|
{"objectID":"98a6085557f7953269c6b8e5c9e872254ce137f4b6d4933dcca1db421e1fc7d8","title":"7. Implementation notes","url":"/docs/plans/2026-07-27-isolated-agent-runner-rfc#7-implementation-notes","content":"N2 capture rides a per-call \n () attached to the request options and wrapped at\n the two central tool-assembly points (, ) —\n BEFORE tool discovery, so mid-turn hydration inserts wrapped tools. All\n loops (AI-SDK, native Vertex Gemini/Claude, AI Studio) obtain tools through those\n points, so one wrapper covers every path with no per-loop double-recording.\nN3 sampling strip is registry-driven ( /\n in ): an explicit\n on a registry entry wins; otherwise known rejecting-family\n patterns (Sonnet 5, Opus 4.7+, Opus 5, Fable/Mythos) decide. Applied at every\n request-build site whose object retry paths spread ( on both Vertex\n Claude loops, on the OpenAI-compatible path, both direct-Anthropic builders),\n so retries/fallbacks inherit the strip; the reactive\n retry remains as the safety net. A debug log is emitted\n whenever params are stripped.\nN5 turn counting uses AsyncLocalStorage entered at the public when\n agent tools are registered; nested/internal generates share the top-level turn's\n counters ( returns null inside an active scope).\nThe stretch item (neutralizing instruction-shaped patterns in agent reports) is NOT part\n of this change, per the work plan (separate optional PR).","hierarchy":{"lvl0":"Plans","lvl1":"RFC: `runIsolatedAgent()` — production sub-agent runner + host-loop delegation","lvl2":"7. Implementation notes","lvl3":""}},
|
|
8373
8373
|
{"objectID":"bdfafc0f3a8fd37a6271bd7957aff7145529894007854c3fe8ddf4556f2f759f","title":"8. PR slicing","url":"/docs/plans/2026-07-27-isolated-agent-runner-rfc#8-pr-slicing","content":"The work lands as one PR per work item: N1 (agent plumbing), N2 (toolExecutions records),\nN3 (worker factory + sampling strip), N4 (runIsolatedAgent + this RFC), N5 (host-loop\ndelegation + AgentNetwork composition). N4/N5 ship with this RFC in-tree.","hierarchy":{"lvl0":"Plans","lvl1":"RFC: `runIsolatedAgent()` — production sub-agent runner + host-loop delegation","lvl2":"8. PR slicing","lvl3":""}},
|
|
8374
8374
|
{"objectID":"f0fee3d8005091330b88abba8bf41bc4b4e1b5f294425e4f0a250f93bb8f165d","title":"Completing the ai-sdk removal","url":"/docs/plans/2026-09-03-completing-the-ai-sdk-removal","content":"Completing the ai-sdk removal\n\nStatus: done. All 8 items landed. Item 7 — deleting —\nwas the last, in . and are gone from\nand , and keeps\nthem out.\n\nWhat is left, how each piece is solved, and the order forced by their\ndependencies. Every claim here was checked against the source or the installed\npackage, not inferred.\n\nThe rule that governs all of it\n\nRun on every step, not just the live matrix. The live\nmatrix has 40 cells across six providers and it passed a change that broke ten\nof them, because every provider reachable from this machine supports streaming\nand the mocked gate is the only thing that serves a non-streaming body. The\nlive matrix proves behaviour; the mocked gate proves the wire.\nAnthropic native generate\n\n hardcodes when it calls\n (), which is why routing generate through\nit changed the wire.\n\nSolution is the shape already proven for the OpenAI-compatible family: loop over\nthe provider's own delegating-model , which issues a non-streaming\n. Wrap each step in , funnel failures\nthrough , run the turn inside\n (now protected), and call .\n\nCarry over the two fixes found the first time. A schema arriving with no tools\nmust declare as the turn's only tool and pin to it,\nbecause declines an empty tool list. And must\nbe fired explicitly.\nSageMaker\n\n makes one call and already\nreturns ; no streaming is involved, so the wire hazard does not\napply. Same loop shape as above.\n\nThis machine has no SageMaker endpoint or credentials. Its single-step\nbehaviour is identical by construction because it is the same \ncall; the multi-step branch is the new code and needs a live endpoint before it\nis trusted. Say so in the commit rather than implying coverage.\nGuardrails filter and video-analysis formatting\n\nBoth want a single no-tool turn. did this cleanly before\nthe revert took it with everything else: it calls directly and\nreads the text out of the v3 content array. Re-apply unchanged.\nwrapLanguageModel\n\nUpstream is about fifty lines: reverse the middleware array, reduce it, and\nreturn an object that keeps , , and\n while routing and through\n plus the optional / hooks. One\nconsumer, . Reimplement directly.\n\nRecord while doing it that never runs today, because every\nstreaming path is native and bypasses the wrapped model.\nThe tool and schema type algebra\n\nThis is the one that must move as a unit, and the reason the first attempt\nfailed: was replaced while still came from , so the\nreplacement had to satisfy a type it no longer matched.\n\nThe algebra is small and fully specified in the installed package:\nis .\nis the union of , , and\n .\nis a conditional chain over those four.\ncarries , which is\n what ties 's first parameter to the schema.\n\nDeclare all of it in , repoint at the local\ndeclarations, and only then implement , and in\n. is identity upstream and is\n; the work is entirely in the types.\n\n should keep stamping . Nothing in\nthis repo reads it — looks for the plain \nproperty — but keeping it costs nothing and preserves recognition by anything\nthat does.\nThe rest of the public type surface\n\nThree files hand-declare structurally: (the message and part\ntypes), (the model, usage and finish-reason types) and\n (the middleware contract plus the protocol\ntypes from ).\n\nThe non-obvious one is , which embeds inferred\n references. No source edit removes those; they\ndisappear only once itself is local. Verify by hiding the package and\nre-running a consumer typecheck, which is how the leak was confirmed in the\nfirst place.\nGenerationHandler\n\n1409 lines, and its is unreachable once Anthropic and\nSageMaker are native. Four result-formatting helpers on it are still called from\n, but they take the result shape, so they die with\nit. Confirm by trapping the seam and running the full matrix plus the mocked\ngate, then delete. and lose their last consumers here.\nBrowser bundle\n\n still re-exports , ,\n and through the seam. No consumer was found for\nthem. Either drop them or map them onto NeuroLink's own equivalents; this is a\npublic-subpath decision, not a technical one.\n\nOrder\n\nType algebra last among the type work but before the package drop; everything\nelse is independent.\nAnthropic, SageMaker, guardrails and video-analysis — the last runtime\n callers of .\n.\nDelete the dead GenerationHandler path.\nThe tool/schema algebra together with and .\nThe remaining public types.\nBrowser re-exports.\nDrop and , extend , and rewrite the\n documentation snippets that still tell users to import from directly.","hierarchy":{"lvl0":"Plans","lvl1":"Completing the ai-sdk removal","lvl2":"","lvl3":""}},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juspay/neurolink",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.29.0",
|
|
4
4
|
"packageManager": "pnpm@10.15.1",
|
|
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": {
|
|
@@ -95,6 +95,7 @@
|
|
|
95
95
|
"test:media": "pnpm exec tsx test/continuous-test-suite-media-gen.ts",
|
|
96
96
|
"test:media-registry-collisions": "pnpm exec tsx test/continuous-test-suite-media-registry-collisions.ts",
|
|
97
97
|
"test:memory": "pnpm exec tsx test/continuous-test-suite-memory.ts",
|
|
98
|
+
"test:logger-routing": "pnpm exec tsx test/continuous-test-suite-logger-instance-routing.ts",
|
|
98
99
|
"test:multimodal-rag": "pnpm exec tsx test/continuous-test-suite-multimodal-rag.ts",
|
|
99
100
|
"test:multimodal-text-content-fold": "pnpm exec tsx test/continuous-test-suite-multimodal-text-content-fold.ts",
|
|
100
101
|
"test:proxy-sharing": "pnpm run build && pnpm exec tsx test/continuous-test-suite-proxy-sharing.ts",
|
|
@@ -111,6 +112,7 @@
|
|
|
111
112
|
"test:middleware": "pnpm exec tsx test/continuous-test-suite-middleware.ts",
|
|
112
113
|
"test:stream-middleware": "pnpm exec tsx test/continuous-test-suite-stream-middleware.ts",
|
|
113
114
|
"test:stream-tool-telemetry": "pnpm exec tsx test/continuous-test-suite-stream-tool-telemetry.ts",
|
|
115
|
+
"test:stream-teardown-abort": "pnpm exec tsx test/continuous-test-suite-stream-teardown-abort.ts",
|
|
114
116
|
"test:observability": "pnpm exec tsx test/continuous-test-suite-observability.ts",
|
|
115
117
|
"test:ppt": "pnpm exec tsx test/continuous-test-suite-ppt.ts",
|
|
116
118
|
"test:vertex-loop-characterization": "tsx test/continuous-test-suite-vertex-loop-characterization.ts",
|
|
@@ -127,6 +129,7 @@
|
|
|
127
129
|
"test:mcp:infra": "pnpm exec tsx test/continuous-test-suite-mcp-infra.ts",
|
|
128
130
|
"test:vendor-recovery": "pnpm exec tsx test/continuous-test-suite-native-vendor-recovery.ts",
|
|
129
131
|
"test:anthropic-generate-guard": "pnpm exec tsx test/continuous-test-suite-anthropic-generate-guard.ts",
|
|
132
|
+
"test:stream-structured-output": "pnpm exec tsx test/continuous-test-suite-stream-structured-output.ts",
|
|
130
133
|
"test:browser-bundle": "pnpm exec tsx test/continuous-test-suite-browser-bundle.ts",
|
|
131
134
|
"test:providers-mocked": "pnpm exec tsx test/continuous-test-suite-providers-mocked.ts",
|
|
132
135
|
"scaffold:provider": "pnpm exec tsx tools/scaffold-provider.ts",
|
|
@@ -144,8 +147,10 @@
|
|
|
144
147
|
"test:decide": "pnpm exec tsx test/continuous-test-suite-decide.ts",
|
|
145
148
|
"test:agent-mode": "pnpm exec tsx test/continuous-test-suite-agent-mode.ts",
|
|
146
149
|
"test:servers": "pnpm exec tsx test/continuous-test-suite-servers.ts",
|
|
150
|
+
"test:websocket-agent-handler": "pnpm exec tsx test/continuous-test-suite-websocket-agent-handler.ts",
|
|
147
151
|
"test:tool-reliability": "pnpm exec tsx test/continuous-test-suite-tool-reliability.ts",
|
|
148
152
|
"test:video-abort": "pnpm exec tsx test/continuous-test-suite-video-abort.ts",
|
|
153
|
+
"test:video-options-allowlist": "pnpm exec tsx test/continuous-test-suite-video-options-allowlist.ts",
|
|
149
154
|
"test:tts": "pnpm exec tsx test/continuous-test-suite-tts.ts",
|
|
150
155
|
"test:tts:unit": "pnpm exec tsx test/continuous-test-suite-tts-unit.ts",
|
|
151
156
|
"test:stt:unit": "pnpm exec tsx test/continuous-test-suite-stt-unit.ts",
|