@juspay/neurolink 13.4.9 → 13.4.10
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 +3 -2
- package/README.md +11 -2
- package/dist/browser/neurolink.min.js +281 -281
- package/dist/hitl/hitlManager.d.ts +1 -0
- package/dist/hitl/hitlManager.js +2 -1
- package/dist/neurolink.js +17 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
## [13.4.
|
|
1
|
+
## [13.4.10](https://github.com/juspay/neurolink/compare/v13.4.9...v13.4.10) (2026-10-19)
|
|
2
2
|
|
|
3
3
|
### Bug Fixes
|
|
4
4
|
|
|
5
|
-
- **(
|
|
5
|
+
- **(hitl):** log the real allowArgumentModification default and complete the documented response ([7b6ce94](https://github.com/juspay/neurolink/commit/7b6ce943e83dfe72905b33729143dac3d45acb25))
|
|
6
|
+
- **(test):** restore network hooks and env when the provider-status case fails during setup ([fe71e65](https://github.com/juspay/neurolink/commit/fe71e653351626702ce1800a735101b1dcc186a1))
|
|
6
7
|
|
|
7
8
|
## [11.2.3](https://github.com/juspay/neurolink/compare/v11.2.2...v11.2.3) (2026-08-19)
|
|
8
9
|
|
package/README.md
CHANGED
|
@@ -491,7 +491,11 @@ NeuroLink includes a **HITL (Human-in-the-Loop) system** that pauses a tool call
|
|
|
491
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 {
|
|
494
|
+
import {
|
|
495
|
+
NeuroLink,
|
|
496
|
+
type ConfirmationRequestEvent,
|
|
497
|
+
type ConfirmationResponseEvent,
|
|
498
|
+
} from "@juspay/neurolink";
|
|
495
499
|
|
|
496
500
|
const neurolink = new NeuroLink({
|
|
497
501
|
hitl: {
|
|
@@ -505,6 +509,7 @@ const neurolink = new NeuroLink({
|
|
|
505
509
|
// Approval is event-based: NeuroLink emits a request, your app answers it
|
|
506
510
|
const emitter = neurolink.getEventEmitter();
|
|
507
511
|
emitter.on("hitl:confirmation-request", async (event) => {
|
|
512
|
+
const receivedAt = Date.now();
|
|
508
513
|
// The emitter types listener arguments as unknown, so narrow the event
|
|
509
514
|
const { payload } = event as ConfirmationRequestEvent;
|
|
510
515
|
const { confirmationId, toolName, arguments: args } = payload;
|
|
@@ -517,8 +522,12 @@ emitter.on("hitl:confirmation-request", async (event) => {
|
|
|
517
522
|
confirmationId,
|
|
518
523
|
approved,
|
|
519
524
|
reason: approved ? undefined : "Rejected by reviewer",
|
|
525
|
+
metadata: {
|
|
526
|
+
timestamp: new Date().toISOString(),
|
|
527
|
+
responseTime: Date.now() - receivedAt, // ms since the request arrived
|
|
528
|
+
},
|
|
520
529
|
},
|
|
521
|
-
});
|
|
530
|
+
} satisfies ConfirmationResponseEvent);
|
|
522
531
|
});
|
|
523
532
|
|
|
524
533
|
// A tool call to a matching tool pauses until your handler answers
|