n8n-nodes-lenz 0.1.6 → 0.1.8
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/README.md +20 -1
- package/dist/credentials/LenzApi.credentials.js +8 -3
- package/dist/credentials/LenzApi.credentials.js.map +1 -1
- package/dist/nodes/Lenz/Lenz.node.js +306 -965
- package/dist/nodes/Lenz/Lenz.node.js.map +1 -1
- package/dist/package.json +1 -4
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -4
package/README.md
CHANGED
|
@@ -69,11 +69,28 @@ A simple "fact-check gate" pattern — verify an LLM's output before acting on i
|
|
|
69
69
|
|
|
70
70
|
For a lighter check on lower-stakes content, swap the Lenz operation to **Assess (Fast)** instead — same wiring, ~5-10s instead of ~90s.
|
|
71
71
|
|
|
72
|
+
### Follow-up questions on a completed verification
|
|
73
|
+
|
|
74
|
+
Ask a grounded question about the evidence behind a Verify (Deep) result, by chaining two Lenz nodes:
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
[Lenz node] ──▶ [Lenz node]
|
|
78
|
+
Operation: Operation:
|
|
79
|
+
Verify (Deep) Ask Follow-Up
|
|
80
|
+
Verification ID: {{ $json.verification_id }}
|
|
81
|
+
Question: "What are the main sources supporting this verdict?"
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
1. Add a **Lenz node**, set Operation to **Verify (Deep)**, and run it.
|
|
85
|
+
2. Add a second **Lenz node** after it, with Operation set to **Ask Follow-Up**.
|
|
86
|
+
3. Set the Verification ID field to an expression referencing the first node's output: `{{ $json.verification_id }}`.
|
|
87
|
+
4. Keep the Question field as a fixed string (e.g. `"What are the main sources supporting this verdict?"`) — it works for whatever claim was just verified, since only the Verification ID needs to change per run.
|
|
88
|
+
|
|
72
89
|
## Resources
|
|
73
90
|
|
|
74
91
|
* [n8n community nodes documentation](https://docs.n8n.io/integrations/#community-nodes)
|
|
75
92
|
* [Lenz API documentation](https://lenz.io/developers)
|
|
76
|
-
* [lenz-io Node SDK](https://github.com/lenzhq/lenz-io-node) (
|
|
93
|
+
* [lenz-io Node SDK](https://github.com/lenzhq/lenz-io-node) (a standalone SDK for the same Lenz API, if you're building outside n8n)
|
|
77
94
|
|
|
78
95
|
## Version history
|
|
79
96
|
|
|
@@ -82,3 +99,5 @@ For a lighter check on lower-stakes content, swap the Lenz operation to **Assess
|
|
|
82
99
|
* **0.1.4** — Bundled `lenz-io` at build time (zero runtime dependencies, required for n8n Cloud verification); added a Jest test suite; fixed an error-message bug in the `NodeApiError` wrapping; replaced the placeholder icon with the real Lenz brand mark.
|
|
83
100
|
* **0.1.5** — Corrected the maintainer email in `package.json` to match the npm account.
|
|
84
101
|
* **0.1.6** — Fixed every violation found by n8n's official `@n8n/scan-community-package` compliance scanner: test files no longer ship in the package; the bundled `lenz-io` SDK is properly tree-shaken (dropping unused webhook-signature-verification code); replaced remaining restricted-global usage (`setTimeout`, `process`, `console`, `globalThis`) with scanner-safe equivalents; and stopped emitting unused `.d.ts` declaration files. Also fixed a dormant bug in the npm publish workflow.
|
|
102
|
+
* **0.1.7** — Clarified the Verification ID field description and added an Ask Follow-Up wiring example to the README.
|
|
103
|
+
* **0.1.8** — Rewrote the node to call the Lenz REST API directly via n8n's `httpRequestWithAuthentication` helper, removing the `lenz-io` SDK dependency entirely (zero runtime dependencies, no build-time bundling). This resolves the source-level restricted-import violations required for n8n Cloud verification.
|
|
@@ -20,14 +20,19 @@ class LenzApi {
|
|
|
20
20
|
description: 'Your Lenz API key (starts with "lenz_"). Get one at lenz.io/api-integration.',
|
|
21
21
|
},
|
|
22
22
|
];
|
|
23
|
+
this.authenticate = {
|
|
24
|
+
type: 'generic',
|
|
25
|
+
properties: {
|
|
26
|
+
headers: {
|
|
27
|
+
Authorization: '=Bearer {{$credentials.apiKey}}',
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
};
|
|
23
31
|
this.test = {
|
|
24
32
|
request: {
|
|
25
33
|
baseURL: 'https://lenz.io/api/v1',
|
|
26
34
|
url: '/me/usage',
|
|
27
35
|
method: 'GET',
|
|
28
|
-
headers: {
|
|
29
|
-
Authorization: '=Bearer {{$credentials.apiKey}}',
|
|
30
|
-
},
|
|
31
36
|
},
|
|
32
37
|
};
|
|
33
38
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LenzApi.credentials.js","sourceRoot":"","sources":["../../credentials/LenzApi.credentials.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"LenzApi.credentials.js","sourceRoot":"","sources":["../../credentials/LenzApi.credentials.ts"],"names":[],"mappings":";;;AAOA,MAAa,OAAO;IAApB;QACC,SAAI,GAAG,SAAS,CAAC;QACjB,gBAAW,GAAG,UAAU,CAAC;QACzB,SAAI,GAAG,EAAE,KAAK,EAAE,6BAA6B,EAAE,IAAI,EAAE,kCAAkC,EAAW,CAAC;QACnG,qBAAgB,GAAG,iCAAiC,CAAC;QAErD,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,SAAS;gBACtB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACZ,QAAQ,EAAE,IAAI;iBACd;gBACD,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EACV,8EAA8E;aAC/E;SACD,CAAC;QAEF,iBAAY,GAAyB;YACpC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACX,OAAO,EAAE;oBACR,aAAa,EAAE,iCAAiC;iBAChD;aACD;SACD,CAAC;QAEF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,OAAO,EAAE,wBAAwB;gBACjC,GAAG,EAAE,WAAW;gBAChB,MAAM,EAAE,KAAK;aACb;SACD,CAAC;IACH,CAAC;CAAA;AArCD,0BAqCC"}
|