@juspay/neurolink 13.4.4 → 13.4.5

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 CHANGED
@@ -1,8 +1,8 @@
1
- ## [13.4.4](https://github.com/juspay/neurolink/compare/v13.4.3...v13.4.4) (2026-10-18)
1
+ ## [13.4.5](https://github.com/juspay/neurolink/compare/v13.4.4...v13.4.5) (2026-10-18)
2
2
 
3
3
  ### Bug Fixes
4
4
 
5
- - **(types):** keep exceljs types out of the public declarations ([31e4d21](https://github.com/juspay/neurolink/commit/31e4d21ed99f5d4027764edae27128d167037166)), closes [#1999](https://github.com/juspay/neurolink/issues/1999)
5
+ - **(xor):** send decisions to /v1/decisions with the xor-latest and xor-omni models ([5ef74c4](https://github.com/juspay/neurolink/commit/5ef74c42a8e6422641ff39743b65061c5c5c1385))
6
6
 
7
7
  ## [11.2.3](https://github.com/juspay/neurolink/compare/v11.2.2...v11.2.3) (2026-08-19)
8
8
 
package/README.md CHANGED
@@ -286,7 +286,7 @@ TypeSafe and Laya both configured, TypeSafe runs; with only Laya's key and base
286
286
  set, Laya runs.
287
287
 
288
288
  [**XOR**](docs/getting-started/providers/xor.md) is Juspay's Apache-2.0,
289
- open-weights decision model (`xor-1.1`); setup is on
289
+ open-weights decision model (`xor-latest` for text, `xor-omni` for images and video); setup is on
290
290
  [Hugging Face](https://huggingface.co/juspay/xor). It has no built-in endpoint
291
291
  either: set `XOR_API_KEY` and `XOR_BASE_URL` to the origin of a deployment or of
292
292
  a LiteLLM proxy route (or pass `credentials.xor`). XOR counts only with both its
@@ -481,36 +481,54 @@ The [guide's limits section](docs/getting-started/providers/cloudflare-clef.md#l
481
481
 
482
482
  ## Enterprise Security: Human-in-the-Loop (HITL)
483
483
 
484
- NeuroLink includes a **HITL (Human-in-the-Loop) system** for regulated industries and high-stakes AI operations:
484
+ NeuroLink includes a **HITL (Human-in-the-Loop) system** that pauses a tool call until your application approves or rejects it, for high-stakes AI operations:
485
485
 
486
- | Capability | Description | Use Case |
487
- | --------------------------- | ----------------------------------------------------------------------- | ------------------------------------------ |
488
- | **Tool Approval Workflows** | Require human approval before AI executes sensitive tools | Financial transactions, data modifications |
489
- | **Output Validation** | Route AI outputs through human review pipelines | Medical diagnosis, legal documents |
490
- | **Confidence Thresholds** | Automatically trigger human review below confidence level | Critical business decisions |
491
- | **Complete Audit Trail** | Audit logging to support your compliance program (HIPAA / SOC 2 / GDPR) | Regulated industries |
486
+ | Capability | Description | Use Case |
487
+ | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ |
488
+ | **Tool Approval Workflows** | Pause tools whose name matches `dangerousActions`, or that a `customRules` condition selects, until your app answers | Financial transactions, data modifications |
489
+ | **Argument Review** | A response can carry `modifiedArguments` and the tool runs with them. `allowArgumentModification` only tells your UI (`allowModification`); NeuroLink does not enforce it | Correcting a path or amount before it runs |
490
+ | **Timeout Policy** | Reject when nobody answers (default) or auto-approve, with `autoApproveExclusions` for tools that always need an answer | Unattended and background runs |
491
+ | **Audit Logging** | `auditLogging: true` writes each request and decision, with the full tool arguments, to the NeuroLink logger; it is a log, not a compliance control | Debugging and your own review records |
492
492
 
493
493
  ```typescript
494
- import { NeuroLink } from "@juspay/neurolink";
494
+ import { NeuroLink, type ConfirmationRequestEvent } from "@juspay/neurolink";
495
495
 
496
496
  const neurolink = new NeuroLink({
497
497
  hitl: {
498
498
  enabled: true,
499
- requireApproval: ["writeFile", "executeCode", "sendEmail"],
500
- confidenceThreshold: 0.85,
501
- reviewCallback: async (action, context) => {
502
- // Custom review logic - integrate with your approval system
503
- return await yourApprovalSystem.requestReview(action);
504
- },
499
+ // Case-insensitive substring match against the tool name
500
+ dangerousActions: ["writeFile", "executeCode", "sendEmail"],
501
+ timeout: 30000, // Rejects if nobody answers within 30 seconds
505
502
  },
506
503
  });
507
504
 
508
- // AI pauses for human approval before executing sensitive tools
505
+ // Approval is event-based: NeuroLink emits a request, your app answers it
506
+ const emitter = neurolink.getEventEmitter();
507
+ emitter.on("hitl:confirmation-request", async (event) => {
508
+ // The emitter types listener arguments as unknown, so narrow the event
509
+ const { payload } = event as ConfirmationRequestEvent;
510
+ const { confirmationId, toolName, arguments: args } = payload;
511
+ // Integrate with your approval system (UI prompt, Slack, ticketing)
512
+ const approved = await yourApprovalSystem.requestReview({ toolName, args });
513
+
514
+ emitter.emit("hitl:confirmation-response", {
515
+ type: "hitl:confirmation-response",
516
+ payload: {
517
+ confirmationId,
518
+ approved,
519
+ reason: approved ? undefined : "Rejected by reviewer",
520
+ },
521
+ });
522
+ });
523
+
524
+ // A tool call to a matching tool pauses until your handler answers
509
525
  const result = await neurolink.generate({
510
526
  input: { text: "Send quarterly report to stakeholders" },
511
527
  });
512
528
  ```
513
529
 
530
+ The [Enterprise HITL Guide](docs/features/enterprise-hitl.md) also sketches a larger target API (`requireApproval`, `reviewCallback`, `confidenceThreshold`, asynchronous review, escalation policies). None of it is implemented yet, and NeuroLink drops unknown `hitl` keys without an error. See [#752](https://github.com/juspay/neurolink/issues/752).
531
+
514
532
  **[Enterprise HITL Guide](docs/features/enterprise-hitl.md)** | **[Quick Start](docs/features/hitl.md)**
515
533
 
516
534
  ## 📚 Quick Start Guide