@juspay/neurolink 12.49.9 → 12.49.11
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 +2 -2
- package/dist/browser/neurolink.min.js +368 -368
- package/dist/providers/catalog/loader.js +6 -0
- package/dist/providers/catalog/provider-catalog.schema.json +3 -0
- package/dist/providers/catalog/reka.json +4 -1
- package/dist/providers/catalog/schema.d.ts +1 -0
- package/dist/providers/catalog/schema.js +1 -0
- package/dist/providers/configuredOpenAICompat.d.ts +7 -0
- package/dist/providers/configuredOpenAICompat.js +11 -0
- package/dist/providers/decide/dialects/index.d.ts +2 -0
- package/dist/providers/decide/dialects/index.js +5 -0
- package/dist/providers/decide/dialects/systemOne.d.ts +2 -0
- package/dist/providers/decide/dialects/systemOne.js +104 -0
- package/dist/providers/decide/guards.d.ts +4 -0
- package/dist/providers/decide/guards.js +29 -0
- package/dist/providers/systemOneDecision.d.ts +7 -3
- package/dist/providers/systemOneDecision.js +20 -117
- package/dist/types/decision.d.ts +17 -0
- package/dist/types/providerCatalog.d.ts +22 -6
- package/dist/types/providers.d.ts +11 -0
- package/docs-site/static/search-index.json +2 -2
- package/package.json +1 -1
|
@@ -9771,11 +9771,11 @@
|
|
|
9771
9771
|
{"objectID":"205e4e44d27692634aa5454565d9f060ceb88cdac97e7d37622bc5b9a1eefeb6","title":"Verification commands","url":"/docs/provider-integration/tiers/tier-1-aggregator-passthrough#verification-commands","content":"`bash","hierarchy":{"lvl0":"Provider Integration","lvl1":"Tier 1 — Aggregator Passthrough","lvl2":"Verification commands","lvl3":""}},
|
|
9772
9772
|
{"objectID":"09ead22698863d776e82e2f0f3dfdd9a596f39cc106302a02c51a6ef37b436de","title":"LiteLLM example","url":"/docs/provider-integration/tiers/tier-1-aggregator-passthrough#litellm-example","content":"pnpm run cli generate \"hello\" --provider litellm --model","hierarchy":{"lvl0":"Provider Integration","lvl1":"Tier 1 — Aggregator Passthrough","lvl2":"LiteLLM example","lvl3":""}},
|
|
9773
9773
|
{"objectID":"f46ff1668fbf30431a2b6578654212feb2043845eb7a28281e47075703948472","title":"OpenRouter example","url":"/docs/provider-integration/tiers/tier-1-aggregator-passthrough#openrouter-example","content":"pnpm run cli generate \"hello\" --provider openrouter --model /\n\n\nBoth should return a normal GenerateResult with non-empty content`. If\neither 400s with an \"unknown model\" style error, the aggregator doesn't\nactually serve that model yet — fix the aggregator-side config, not\nNeuroLink.","hierarchy":{"lvl0":"Provider Integration","lvl1":"Tier 1 — Aggregator Passthrough","lvl2":"OpenRouter example","lvl3":""}},
|
|
9774
|
-
{"objectID":"0c443abf0cfa1b31edc3337559bddbf37453d87732cfd17b08d461f55c77b195","title":"Tier 2 — Catalog Entry","url":"/docs/provider-integration/tiers/tier-2-catalog-entry","content":"Tier 2 — Catalog Entry\n\nWhen this applies: the vendor speaks the OpenAI /v1/chat/completions\nwire format (Bearer auth, standard SSE, standard JSON body) and needs\nzero behavioral overrides — no custom adjustRequestBody, no\nadjustResponseFormat, no nonstandard auth header, no adjustBodyAfter400.\nThis is the Groq/xAI/Together AI/Fireworks/Perplexity/Cloudflare/Mistral\nshape from before the redesign — now expressed as one JSON file instead of\na hand-written subclass (see ../adr/0002-catalog-over-subclass-default.md\nand the single-JSON spec at\ndocs/superpowers/plans/2026-08-28-provider-json-catalog-spec.md).\n\nIf you're not sure whether your provider is quirk-free, start writing the\nJSON anyway — if it turns out you need a hook, migrate to Tier 3 instead of\nforcing the quirk into the catalog shape.\n\nFiles touched (end state)\n\n| # | File | Change |\n| --- | ------------------------------------- | ------------------------------- |\n| 1 | src/lib/providers/catalog/<id>.json | The entire integration, as data |\n\nThat is the whole list. Everything else is generated or derived:\npnpm run codegen:catalog writes the AIProviderName member, the\n <Name>Models enum and the NeurolinkCredentials key into marked\n regions, plus the generated catalog index. Pre-commit and CI fail on\n stale output, so it can't drift.\nThe runtime loader builds the registry entry, descriptor, config options,\n context windows, pricing, vision map and model choices from the JSON.\nThe test suites derive their spec rows, matrix rows and counts from the\n built catalog.\n\nScaffold it with:\n\nTier 2 emits exactly two files: a pre-filled <id>.json (with TODO markers\nwhere only a live probe can supply the truth) and a short checklist. The\nJSON deliberately fails schema validation until every TODO is replaced.\n\nCount pins — nothing to bump\n\nThere are none left. The wiring and descriptor suites compute their\nexpected totals from CATALOG_PROVIDER_IDS, and the matrix rows spread\nfrom the catalog with a completeness guard that throws if any catalog\nprovider is missing. Adding a provider changes no test file.\n\nsrc/lib/factories/providerRegistry.ts isn't in the table either:\n_doRegister() loops over the catalog and registers every entry\ngenerically.\n\nOne historical exception worth re-checking: commandFactory.ts's separate\nsetup [provider] subcommand hand-hardcoded its own provider-choices array.\nThat was migrated to derive from the enum (PR #1583) — confirm it still\ndoes before assuming you need a manual edit.\n\nThe JSON, field by field\n\nid, displayName, aliases, tier, then:\n\nwire — baseURL for the normal case. Env var names derive by\nconvention (<CONSTANT_CASE(id)>_API_KEY / _BASE_URL / _MODEL); set\nenvOverrides only for a vendor that breaks it. For a URL computed from\nanother credential (Cloudflare's account id) use baseURLTemplate plus\nexactly one extraCredentials entry.\n\nmodels — default, fallbacks, defaultContextWindow,\ndefaultMaxOutputTokens, and a catalog map of model id → {contextWindow?,\nmaxOutputTokens?, pricingPerMTok?, vision, status, description, enumMember?}.\nOmit a number rather than invent one. Optional refinements:\n\n| Field | Use it when
|
|
9774
|
+
{"objectID":"0c443abf0cfa1b31edc3337559bddbf37453d87732cfd17b08d461f55c77b195","title":"Tier 2 — Catalog Entry","url":"/docs/provider-integration/tiers/tier-2-catalog-entry","content":"Tier 2 — Catalog Entry\n\nWhen this applies: the vendor speaks the OpenAI /v1/chat/completions\nwire format (Bearer auth, standard SSE, standard JSON body) and needs\nzero behavioral overrides — no custom adjustRequestBody, no\nadjustResponseFormat, no nonstandard auth header, no adjustBodyAfter400.\nThis is the Groq/xAI/Together AI/Fireworks/Perplexity/Cloudflare/Mistral\nshape from before the redesign — now expressed as one JSON file instead of\na hand-written subclass (see ../adr/0002-catalog-over-subclass-default.md\nand the single-JSON spec at\ndocs/superpowers/plans/2026-08-28-provider-json-catalog-spec.md).\n\nIf you're not sure whether your provider is quirk-free, start writing the\nJSON anyway — if it turns out you need a hook, migrate to Tier 3 instead of\nforcing the quirk into the catalog shape.\n\nFiles touched (end state)\n\n| # | File | Change |\n| --- | ------------------------------------- | ------------------------------- |\n| 1 | src/lib/providers/catalog/<id>.json | The entire integration, as data |\n\nThat is the whole list. Everything else is generated or derived:\npnpm run codegen:catalog writes the AIProviderName member, the\n <Name>Models enum and the NeurolinkCredentials key into marked\n regions, plus the generated catalog index. Pre-commit and CI fail on\n stale output, so it can't drift.\nThe runtime loader builds the registry entry, descriptor, config options,\n context windows, pricing, vision map and model choices from the JSON.\nThe test suites derive their spec rows, matrix rows and counts from the\n built catalog.\n\nScaffold it with:\n\nTier 2 emits exactly two files: a pre-filled <id>.json (with TODO markers\nwhere only a live probe can supply the truth) and a short checklist. The\nJSON deliberately fails schema validation until every TODO is replaced.\n\nCount pins — nothing to bump\n\nThere are none left. The wiring and descriptor suites compute their\nexpected totals from CATALOG_PROVIDER_IDS, and the matrix rows spread\nfrom the catalog with a completeness guard that throws if any catalog\nprovider is missing. Adding a provider changes no test file.\n\nsrc/lib/factories/providerRegistry.ts isn't in the table either:\n_doRegister() loops over the catalog and registers every entry\ngenerically.\n\nOne historical exception worth re-checking: commandFactory.ts's separate\nsetup [provider] subcommand hand-hardcoded its own provider-choices array.\nThat was migrated to derive from the enum (PR #1583) — confirm it still\ndoes before assuming you need a manual edit.\n\nThe JSON, field by field\n\nid, displayName, aliases, tier, then:\n\nwire — baseURL for the normal case. Env var names derive by\nconvention (<CONSTANT_CASE(id)>_API_KEY / _BASE_URL / _MODEL); set\nenvOverrides only for a vendor that breaks it. For a URL computed from\nanother credential (Cloudflare's account id) use baseURLTemplate plus\nexactly one extraCredentials entry.\n\nmodels — default, fallbacks, defaultContextWindow,\ndefaultMaxOutputTokens, and a catalog map of model id → {contextWindow?,\nmaxOutputTokens?, pricingPerMTok?, vision, tools?, status, description, enumMember?}.\nOmit a number rather than invent one. Optional refinements:\n\n| Field | Use it when |\n| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| enumMember | The derived constant-case name would break an existing export |\n| enumTypeName | The <Name>Models enum name must differ from the derived one |\n| fallbackModelName | The legacy fallback differs from fallbacks[1] ?? fallbacks[0] |\n| registryDefaultModel | The registry default differs from default |\n| topModels | The CLI picker should show a curated ordered subset |\n| visionModel | Vision tests need a specific model (the default is text-only) |\n| testModel | The catalog default is retired/gated on the testing account |\n| tools (per model) | capabilities.tools is \"model-dependent\" and the vendor's own docs say which served models actually accept tool definitions (Reka: only reka-flash) |\n\ntestModel is matrix-only","hierarchy":{"lvl0":"Provider Integration","lvl1":"Tier 2 — Catalog Entry","lvl2":"","lvl3":""}},
|
|
9775
9775
|
{"objectID":"4b278bfa53040dfc60deaffd7c0042488d914cc4eff89ded532f5582eceadce6","title":"Tier 2 — Catalog Entry","url":"/docs/provider-integration/tiers/tier-2-catalog-entry#tier-2-catalog-entry","content":"When this applies: the vendor speaks the OpenAI /v1/chat/completions\nwire format (Bearer auth, standard SSE, standard JSON body) and needs\nzero behavioral overrides — no custom adjustRequestBody, no\nadjustResponseFormat, no nonstandard auth header, no adjustBodyAfter400.\nThis is the Groq/xAI/Together AI/Fireworks/Perplexity/Cloudflare/Mistral\nshape from before the redesign — now expressed as one JSON file instead of\na hand-written subclass (see ../adr/0002-catalog-over-subclass-default.md\nand the single-JSON spec at\ndocs/superpowers/plans/2026-08-28-provider-json-catalog-spec.md).\n\nIf you're not sure whether your provider is quirk-free, start writing the\nJSON anyway — if it turns out you need a hook, migrate to Tier 3 instead of\nforcing the quirk into the catalog shape.","hierarchy":{"lvl0":"Provider Integration","lvl1":"Tier 2 — Catalog Entry","lvl2":"Tier 2 — Catalog Entry","lvl3":""}},
|
|
9776
9776
|
{"objectID":"1bb614eb5848cace52afb691aa99aeab78366a84a216f758ef9df6c86e49c0cc","title":"Files touched (end state)","url":"/docs/provider-integration/tiers/tier-2-catalog-entry#files-touched-end-state","content":"| # | File | Change |\n| --- | ------------------------------------- | ------------------------------- |\n| 1 | src/lib/providers/catalog/<id>.json | The entire integration, as data |\n\nThat is the whole list. Everything else is generated or derived:\npnpm run codegen:catalog writes the AIProviderName member, the\n <Name>Models enum and the NeurolinkCredentials key into marked\n regions, plus the generated catalog index. Pre-commit and CI fail on\n stale output, so it can't drift.\nThe runtime loader builds the registry entry, descriptor, config options,\n context windows, pricing, vision map and model choices from the JSON.\nThe test suites derive their spec rows, matrix rows and counts from the\n built catalog.\n\nScaffold it with:\n\nTier 2 emits exactly two files: a pre-filled <id>.json (with TODO markers\nwhere only a live probe can supply the truth) and a short checklist. The\nJSON deliberately fails schema validation until every TODO is replaced.","hierarchy":{"lvl0":"Provider Integration","lvl1":"Tier 2 — Catalog Entry","lvl2":"Files touched (end state)","lvl3":""}},
|
|
9777
9777
|
{"objectID":"9627a6b63ab505017fbc3edd7f9ec312f548b35aef74edd6e2be5eac8e1ade0f","title":"Count pins — nothing to bump","url":"/docs/provider-integration/tiers/tier-2-catalog-entry#count-pins-nothing-to-bump","content":"There are none left. The wiring and descriptor suites compute their\nexpected totals from CATALOG_PROVIDER_IDS, and the matrix rows spread\nfrom the catalog with a completeness guard that throws if any catalog\nprovider is missing. Adding a provider changes no test file.\n\nsrc/lib/factories/providerRegistry.ts isn't in the table either:\n_doRegister() loops over the catalog and registers every entry\ngenerically.\n\nOne historical exception worth re-checking: commandFactory.ts's separate\nsetup [provider] subcommand hand-hardcoded its own provider-choices array.\nThat was migrated to derive from the enum (PR #1583) — confirm it still\ndoes before assuming you need a manual edit.","hierarchy":{"lvl0":"Provider Integration","lvl1":"Tier 2 — Catalog Entry","lvl2":"Count pins — nothing to bump","lvl3":""}},
|
|
9778
|
-
{"objectID":"672b4a181677219d0db0d64d290a3f1a268691c336f02fe776a01d94d0684ae5","title":"The JSON, field by field","url":"/docs/provider-integration/tiers/tier-2-catalog-entry#the-json-field-by-field","content":"id, displayName, aliases, tier, then:\n\nwire — baseURL for the normal case. Env var names derive by\nconvention (<CONSTANT_CASE(id)>_API_KEY / _BASE_URL / _MODEL); set\nenvOverrides only for a vendor that breaks it. For a URL computed from\nanother credential (Cloudflare's account id) use baseURLTemplate plus\nexactly one extraCredentials entry.\n\nmodels — default, fallbacks, defaultContextWindow,\ndefaultMaxOutputTokens, and a catalog map of model id → {contextWindow?,\nmaxOutputTokens?, pricingPerMTok?, vision, status, description, enumMember?}.\nOmit a number rather than invent one. Optional refinements:\n\n| Field | Use it when
|
|
9778
|
+
{"objectID":"672b4a181677219d0db0d64d290a3f1a268691c336f02fe776a01d94d0684ae5","title":"The JSON, field by field","url":"/docs/provider-integration/tiers/tier-2-catalog-entry#the-json-field-by-field","content":"id, displayName, aliases, tier, then:\n\nwire — baseURL for the normal case. Env var names derive by\nconvention (<CONSTANT_CASE(id)>_API_KEY / _BASE_URL / _MODEL); set\nenvOverrides only for a vendor that breaks it. For a URL computed from\nanother credential (Cloudflare's account id) use baseURLTemplate plus\nexactly one extraCredentials entry.\n\nmodels — default, fallbacks, defaultContextWindow,\ndefaultMaxOutputTokens, and a catalog map of model id → {contextWindow?,\nmaxOutputTokens?, pricingPerMTok?, vision, tools?, status, description, enumMember?}.\nOmit a number rather than invent one. Optional refinements:\n\n| Field | Use it when |\n| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| enumMember | The derived constant-case name would break an existing export |\n| enumTypeName | The <Name>Models enum name must differ from the derived one |\n| fallbackModelName | The legacy fallback differs from fallbacks[1] ??","hierarchy":{"lvl0":"Provider Integration","lvl1":"Tier 2 — Catalog Entry","lvl2":"The JSON, field by field","lvl3":""}},
|
|
9779
9779
|
{"objectID":"5f38f36d8546533723645d1643ea69418d7e5cbe47cde5d18b5ad998d053e476","title":"Live verification","url":"/docs/provider-integration/tiers/tier-2-catalog-entry#live-verification","content":"The mocked gates prove the wire contract, not the commercial reality.\nEach of these caught a real defect on the cerebras pilot:\nRoster probe first — authenticated GET <baseURL>/models. Pick\n default, fallbacks and catalog keys from what the API serves TODAY.\n Vendor docs listed four cerebras models; the live roster had two, and\n the documented default 404'd (finding #7). This ages: both Groq's and\n Fireworks' catalog defaults went dead within weeks.\nBilling policy — confirm how a working key is obtained. Cerebras has\n no keyless free tier: even the \"$5 free credits\" require saving a payment\n card (finding #8); SambaNova requires payment outright (finding #11).\nCapability probes — probe tools + response_format in one request\n before setting structuredOutputWithTools; strict backends 400. Don't\n copy another provider's flags on vibes.\nLive matrix — with a working key:\n npx tsx test/continuous-test-suite-provider-matrix.ts --provider=<id>\n must pass generate, stream, tool calling and structured output, and a\n bare node dist/cli/index.js generate \"...\" --provider <id> must resolve\n the default model. The pilot's first live run was 2/4 and surfaced an\n SDK-wide bug (tool_choice emitted on tools-less requests — fixed in\n #1564, now pinned by the mocked suite), which is why this step exists.\n\nRecord the outcome in evidence.liveMatrix.","hierarchy":{"lvl0":"Provider Integration","lvl1":"Tier 2 — Catalog Entry","lvl2":"Live verification","lvl3":""}},
|
|
9780
9780
|
{"objectID":"bea00545b1053aa393e34f487097636d2ee23cfdc652c6724dc6029192017ffd","title":"Verification commands","url":"/docs/provider-integration/tiers/tier-2-catalog-entry#verification-commands","content":"All must exit 0 before opening the PR. The first three test commands run in\nthe provider-safety-net CI job (.github/workflows/ci.yml) — zero-API,\nzero-credential checks, so there's no reason to skip them locally. Add a\ncase to test:error-classifier-contract first if your entry sets\ntimeoutErrorClass or vendor-specific errorRules.\n\nBecause the suites derive from data, a new provider needs no new assertions\n— but if you ever do add one, run the break-one-assertion ritual: flip it,\nconfirm the suite reports ✗ and exits non-zero (not ⊘ skip — see the\nassertion-message hazard in CLAUDE.md), then restore it.","hierarchy":{"lvl0":"Provider Integration","lvl1":"Tier 2 — Catalog Entry","lvl2":"Verification commands","lvl3":""}},
|
|
9781
9781
|
{"objectID":"3f8e5102409b953258a82548fec14a7726774f6e1e5c3c7d826400ef24ebf105","title":"Tier 3 — Adapter-Based Native","url":"/docs/provider-integration/tiers/tier-3-adapter-native","content":"Tier 3 — Adapter-Based Native\n\nWhen this applies: the vendor has its own SDK or wire format that\nisn't OpenAI-compatible, but it's still a normal request/response (or\nrequest/SSE-stream) HTTP+JSON lifecycle you can drive from a provider\nclass. This is the Anthropic/Google AI Studio shape — a dedicated\nsrc/lib/providers/<name>.ts extending BaseProvider directly, not the\nOpenAIChatCompletionsProvider family.\n\nCorrected from the original plan text (2026-08-18): the plan's\ndraft cited \"the Mistral/Cohere/Ollama shape\" as the Tier 3 example.\nThat's stale — mistral.ts, cohere.ts, and ollama/client.ts all\nextend OpenAIChatCompletionsProvider, the Tier 2 family, not\nBaseProvider directly. (Mistral is separately already named in\n../adr/0002-catalog-over-subclass-default.md as a Tier 2\ncatalog-migration candidate — the original draft was internally\ninconsistent about which tier Mistral belongs to.) The verified,\ncurrently-shipping examples of a chat/text provider extending\nBaseProvider directly are Anthropic\n(src/lib/providers/anthropic/client.ts) and Google AI Studio\n(src/lib/providers/googleAiStudio/client.ts) — used below.\nWhy these two, specifically: they implement the request/response and\nstreaming lifecycle against their vendor's own wire format directly,\ninside the provider class itself — they don't inherit that lifecycle\nfrom OpenAIChatCompletionsProvider's shared chat-completions\nimplementation the way Mistral/Cohere/Ollama do. That's the actual line\nbetween Tier 2 and Tier 3: not \"does the vendor have a custom SDK\" but\n\"does this class implement the provider surface itself, or inherit it.\"\nWhen you compare your new provider's shape against Anthropic/Google AI\nStudio, that's the property you're matching — not their specific\nrequest/response format, which is vendor-idiosyncratic and won't look\nlike yours.\n\nAs of 2026-08-18 there is no shared streaming-loop adapter beyond\nBaseProvider and OpenAIChatCompletionsProvider (checked\nsrc/lib/providers/ for a nativeAdapter*.ts or similar — none exists).\nIf one lands later, extend it instead of hand-rolling the SSE parser and\nmulti-step tool loop; the steps below describe the always-true minimum\nregardless of whether that shared adapter exists yet.\n\nFiles touched (end state)\n\n| # | File | Change |\n| --- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| 1 | src/lib/constants/enums.ts | New AIProviderName member + a <Name>Models enum (default + fallback model ids — Tier 3 providers keep an explicit model catalog since there's no OPENAI_COMPAT_CATALOG row to hold defaultModel/fallbackModels) |\n| 2 | src/lib/providers/<name>.ts | NEW provider class extending BaseProvider (or a shared adapter, if one has landed by the time you read this) |\n| 3 | src/lib/factories/providerDescriptors.ts | One ProviderDescriptor entry |\n| 4 | src/lib/factories/providerRegistry.ts | One ProviderFactory.registerProvider() block, dynamic import, 5-argument call including the descriptor argument from PROVIDER_DESCRIPTORS_BY_NAME |\n| 5 | src/lib/types/providers.ts | New NeurolinkCredentials[\"<key>\"] slice |\n| 6 | src/lib/adapters/providerImageAdapter.ts | VISION_CAPABILITIES entry — only if the provider/model is multimodal |\n| 7 | test/continuous-test-suite-providers-mocked.ts | Mocked-contract section ","hierarchy":{"lvl0":"Provider Integration","lvl1":"Tier 3 — Adapter-Based Native","lvl2":"","lvl3":""}},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juspay/neurolink",
|
|
3
|
-
"version": "12.49.
|
|
3
|
+
"version": "12.49.11",
|
|
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": {
|