n8n-nodes-niyoos 0.1.0 → 1.0.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/README.md +70 -75
- package/dist/credentials/NiyoosApi.credentials.d.ts +2 -5
- package/dist/credentials/NiyoosApi.credentials.js +4 -6
- package/dist/credentials/NiyoosApi.credentials.js.map +1 -1
- package/dist/nodes/Niyoos/Niyoos.node.d.ts +5 -0
- package/dist/nodes/Niyoos/Niyoos.node.js +93 -0
- package/dist/nodes/Niyoos/Niyoos.node.js.map +1 -0
- package/dist/nodes/Niyoos/Niyoos.node.json +18 -0
- package/dist/nodes/NiyoosChatModel/NiyoosChatModel.node.d.ts +1 -0
- package/dist/nodes/NiyoosChatModel/NiyoosChatModel.node.js +85 -32
- package/dist/nodes/NiyoosChatModel/NiyoosChatModel.node.js.map +1 -1
- package/dist/nodes/NiyoosChatModel/NiyoosChatModel.node.json +18 -0
- package/dist/nodes/shared/errors.d.ts +15 -0
- package/dist/nodes/shared/errors.js +103 -0
- package/dist/nodes/shared/errors.js.map +1 -0
- package/dist/nodes/shared/failedAttempt.d.ts +4 -0
- package/dist/nodes/shared/failedAttempt.js +44 -0
- package/dist/nodes/shared/failedAttempt.js.map +1 -0
- package/dist/nodes/shared/wire.d.ts +5 -0
- package/dist/nodes/shared/wire.js +31 -0
- package/dist/nodes/shared/wire.js.map +1 -0
- package/dist/package.json +66 -0
- package/package.json +64 -61
- package/dist/nodes/NiyoosChatModel/niyoos.dark.svg +0 -5
- package/dist/nodes/NiyoosChatModel/niyoos.svg +0 -5
- /package/dist/{credentials → icons}/niyoos.dark.svg +0 -0
- /package/dist/{credentials → icons}/niyoos.svg +0 -0
package/README.md
CHANGED
|
@@ -1,97 +1,92 @@
|
|
|
1
1
|
# n8n-nodes-niyoos
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
[Niyoos](https://niyoos.com) is an OpenAI-compatible governance proxy that sits
|
|
8
|
-
in front of your LLM providers (Anthropic and others). Your traffic is
|
|
9
|
-
authenticated with a per-agent key and is **metered, cost-tracked, rate-limited
|
|
10
|
-
and audited centrally** — while the wire format stays standard OpenAI
|
|
11
|
-
`chat/completions`. This node drives that proxy with the proven `ChatOpenAI`
|
|
12
|
-
client pointed at your Niyoos base URL, so every call your workflow makes is
|
|
13
|
-
governed by Niyoos automatically.
|
|
14
|
-
|
|
15
|
-
[Installation](#installation) · [Getting a Niyoos agent key](#getting-a-niyoos-agent-key) · [Usage](#usage) · [Model dropdown](#model-dropdown-one-agent--one-provider) · [Known issues](#known-issues) · [License](#license)
|
|
16
|
-
|
|
17
|
-
## What this package provides
|
|
18
|
-
|
|
19
|
-
- **Credential — Niyoos API**
|
|
20
|
-
- `Agent Key` — your `sk-aiwos-…` key (stored masked).
|
|
21
|
-
- `Base URL` — defaults to `https://api.niyoos.com/proxy/v1`.
|
|
22
|
-
- The connection test calls `GET /integrations/v1/me` and passes when the key
|
|
23
|
-
resolves to an active agent.
|
|
24
|
-
- **Node — Niyoos Chat Model** (a LangChain sub-node with an `AI Language Model`
|
|
25
|
-
output; connect it to a root node such as the AI Agent)
|
|
26
|
-
- `Model` — a dropdown populated live from `GET /proxy/v1/models`.
|
|
27
|
-
- Options: `Sampling Temperature`, `Maximum Number of Tokens`, `Top P`,
|
|
28
|
-
`Timeout`, `Maximum Retries`.
|
|
3
|
+
> **Requires n8n 2.16 or newer.** On an older n8n (any 1.x, or 2.x before 2.16), install
|
|
4
|
+
> **`n8n-nodes-niyoos@0.1.x`** instead — this version will not run there. See
|
|
5
|
+
> [Compatibility](#compatibility).
|
|
29
6
|
|
|
30
|
-
|
|
7
|
+
**Put your n8n AI agents under governance.** [Niyoos](https://niyoos.com) sits between your
|
|
8
|
+
workflows and your AI providers. Every model call your AI Agent makes goes through Niyoos,
|
|
9
|
+
which can stop an agent instantly with a kill switch, hold it to a spending limit, and seal a
|
|
10
|
+
record of each call — its cost, model, timing and outcome — in a tamper-evident audit log.
|
|
11
|
+
Your provider keys stay encrypted inside Niyoos; n8n only ever holds a per-agent Niyoos key.
|
|
31
12
|
|
|
32
|
-
|
|
13
|
+
This package gives n8n two nodes:
|
|
33
14
|
|
|
34
|
-
**
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
15
|
+
- **Niyoos Chat Model** — the model for your AI Agent, Basic LLM Chain or any node with a Chat
|
|
16
|
+
Model input. Each workflow execution is recorded in Niyoos as one run, with no setup.
|
|
17
|
+
- **Niyoos** (action) — **Get Agent**: the name, organisation and status of your agent, so a
|
|
18
|
+
workflow can check the agent is active before it starts.
|
|
38
19
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
```
|
|
20
|
+
[Installation](#installation) · [Credentials](#credentials) · [Usage](#usage) ·
|
|
21
|
+
[Runs](#runs) · [When Niyoos stops a call](#when-niyoos-stops-a-call) ·
|
|
22
|
+
[Compatibility](#compatibility) · [Development](#development) · [License](#license)
|
|
43
23
|
|
|
44
|
-
|
|
45
|
-
LangChain/AI nodes. Tested against `n8n-workflow` 2.16.
|
|
24
|
+
## Installation
|
|
46
25
|
|
|
47
|
-
|
|
26
|
+
Follow n8n's [community nodes installation guide](https://docs.n8n.io/integrations/community-nodes/installation/)
|
|
27
|
+
and install **`n8n-nodes-niyoos`**.
|
|
48
28
|
|
|
49
|
-
|
|
50
|
-
2. Open **Agents** and create an agent (or pick an existing one). Each agent is
|
|
51
|
-
bound to exactly one provider credential (e.g. an Anthropic key).
|
|
52
|
-
3. Reveal or create the agent's **API key** — it looks like `sk-aiwos-…`.
|
|
53
|
-
4. In n8n, create a **Niyoos API** credential and paste the key. Leave the base
|
|
54
|
-
URL at its default unless you run a self-hosted or staging Niyoos deployment.
|
|
29
|
+
## Credentials
|
|
55
30
|
|
|
56
|
-
|
|
57
|
-
|
|
31
|
+
Create a **Niyoos API** credential:
|
|
32
|
+
|
|
33
|
+
| Field | What to enter |
|
|
34
|
+
|---|---|
|
|
35
|
+
| Agent Key | Your Niyoos agent key, starting `sk-aiwos-`. In the Niyoos dashboard, open **Agents**, pick or create an agent, and copy its key. |
|
|
36
|
+
| Base URL | Leave as `https://api.niyoos.com/proxy/v1` unless you run your own Niyoos deployment. |
|
|
37
|
+
|
|
38
|
+
The connection test checks the key against Niyoos and passes when it belongs to an existing
|
|
39
|
+
agent. Each Niyoos agent is bound to one provider credential, so the model list shows that
|
|
40
|
+
provider's models. To use another provider, create another agent and another credential.
|
|
58
41
|
|
|
59
42
|
## Usage
|
|
60
43
|
|
|
61
|
-
1. Add an **AI Agent** (or any node with a Chat Model input)
|
|
62
|
-
2.
|
|
63
|
-
3.
|
|
64
|
-
|
|
44
|
+
1. Add an **AI Agent** (or any node with a Chat Model input).
|
|
45
|
+
2. Connect a **Niyoos Chat Model** to its Chat Model input.
|
|
46
|
+
3. Choose your **Niyoos API** credential and a model, then run the workflow.
|
|
47
|
+
|
|
48
|
+
## Runs
|
|
65
49
|
|
|
66
|
-
|
|
50
|
+
Every model call carries a run id, `n8n-<workflowId>-<executionId>`, so all the calls one
|
|
51
|
+
workflow execution makes are grouped as one run in Niyoos. Nothing needs configuring.
|
|
67
52
|
|
|
68
|
-
|
|
69
|
-
the catalog **for the specific agent your key belongs to**. In Niyoos, **one
|
|
70
|
-
agent is bound to exactly one provider credential** — so the dropdown is
|
|
71
|
-
inherently scoped to that agent's provider. If your key belongs to an
|
|
72
|
-
Anthropic-backed agent, you will see Claude models only; you will not see
|
|
73
|
-
another provider's models here. To use a different provider, create a separate
|
|
74
|
-
agent (and a separate Niyoos API credential) for it.
|
|
53
|
+
## When Niyoos stops a call
|
|
75
54
|
|
|
76
|
-
|
|
55
|
+
When Niyoos refuses a call, the node tells you why and what to change — for example:
|
|
77
56
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
add them under **Options** — so leave *Sampling Temperature* unset for those
|
|
84
|
-
models. Other models (for example `claude-haiku-4-5`) still accept it.
|
|
85
|
-
- **Dynamic connection labels are not supported.** n8n names credentials by
|
|
86
|
-
what you type; unlike some other integration platforms, it cannot label the
|
|
87
|
-
connection from the identity response. The connection test still validates the
|
|
88
|
-
key against `/integrations/v1/me`.
|
|
57
|
+
| What happened | What the node says |
|
|
58
|
+
|---|---|
|
|
59
|
+
| The agent's kill switch is on | *This Niyoos agent is disabled (kill switch). Re-enable it in the Niyoos dashboard before running this workflow again.* |
|
|
60
|
+
| The agent reached its spending limit | *This Niyoos agent has reached the spending limit set for it, so Niyoos stopped the request before any provider was called. …* |
|
|
61
|
+
| The provider rejected the stored key | *The upstream provider rejected the provider key configured for this Niyoos agent. …* |
|
|
89
62
|
|
|
90
|
-
|
|
63
|
+
Every refusal Niyoos can return has its own explanation. If n8n is going to retry a call, the
|
|
64
|
+
retry is left to happen and the explanation is shown only once the call has failed for good.
|
|
65
|
+
|
|
66
|
+
## Compatibility
|
|
67
|
+
|
|
68
|
+
- **n8n 2.16 or newer** for version 1.x of this package. On an older n8n the chat model says so
|
|
69
|
+
when the workflow runs.
|
|
70
|
+
- **On n8n 1.x, or n8n 2.x before 2.16, install `n8n-nodes-niyoos@0.1.x`.** In n8n's community
|
|
71
|
+
nodes installer, enter the package name with the version, e.g. `n8n-nodes-niyoos@0.1.0`, and do
|
|
72
|
+
not update it past 0.1.x until you have upgraded n8n.
|
|
73
|
+
- **Retries:** current n8n versions do not retry a failed AI model call, so the chat model's
|
|
74
|
+
*Maximum Retries* option has no effect today. It is kept so the setting works if n8n restores
|
|
75
|
+
retries.
|
|
76
|
+
- No runtime dependencies: n8n supplies the model client.
|
|
77
|
+
|
|
78
|
+
## Development
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
npm ci
|
|
82
|
+
npm run lint
|
|
83
|
+
npm test # builds, then runs the test suite against the built package
|
|
84
|
+
```
|
|
91
85
|
|
|
92
|
-
-
|
|
93
|
-
-
|
|
86
|
+
`contract/niyoos-contract.json` holds the Niyoos wire values this package depends on — every
|
|
87
|
+
refusal code, the client header and the run-id rule. The tests fail if the package and the
|
|
88
|
+
contract disagree.
|
|
94
89
|
|
|
95
90
|
## License
|
|
96
91
|
|
|
97
|
-
[MIT](
|
|
92
|
+
[MIT](LICENSE)
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import type { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
1
|
+
import type { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, Icon, INodeProperties } from 'n8n-workflow';
|
|
2
2
|
export declare class NiyoosApi implements ICredentialType {
|
|
3
3
|
name: string;
|
|
4
4
|
displayName: string;
|
|
5
5
|
documentationUrl: string;
|
|
6
|
-
icon:
|
|
7
|
-
readonly light: "file:niyoos.svg";
|
|
8
|
-
readonly dark: "file:niyoos.dark.svg";
|
|
9
|
-
};
|
|
6
|
+
icon: Icon;
|
|
10
7
|
properties: INodeProperties[];
|
|
11
8
|
authenticate: IAuthenticateGeneric;
|
|
12
9
|
test: ICredentialTestRequest;
|
|
@@ -5,11 +5,8 @@ class NiyoosApi {
|
|
|
5
5
|
constructor() {
|
|
6
6
|
this.name = 'niyoosApi';
|
|
7
7
|
this.displayName = 'Niyoos API';
|
|
8
|
-
this.documentationUrl = 'https://
|
|
9
|
-
this.icon = {
|
|
10
|
-
light: 'file:niyoos.svg',
|
|
11
|
-
dark: 'file:niyoos.dark.svg',
|
|
12
|
-
};
|
|
8
|
+
this.documentationUrl = 'https://github.com/niyoos/n8n-nodes-niyoos#credentials';
|
|
9
|
+
this.icon = { light: 'file:../icons/niyoos.svg', dark: 'file:../icons/niyoos.dark.svg' };
|
|
13
10
|
this.properties = [
|
|
14
11
|
{
|
|
15
12
|
displayName: 'Agent Key',
|
|
@@ -25,7 +22,7 @@ class NiyoosApi {
|
|
|
25
22
|
name: 'baseUrl',
|
|
26
23
|
type: 'string',
|
|
27
24
|
default: 'https://api.niyoos.com/proxy/v1',
|
|
28
|
-
description: 'Base URL of the Niyoos
|
|
25
|
+
description: 'Base URL of the Niyoos proxy. Change this only to target a self-hosted or staging Niyoos deployment.',
|
|
29
26
|
},
|
|
30
27
|
];
|
|
31
28
|
this.authenticate = {
|
|
@@ -33,6 +30,7 @@ class NiyoosApi {
|
|
|
33
30
|
properties: {
|
|
34
31
|
headers: {
|
|
35
32
|
Authorization: '=Bearer {{$credentials.agentApiKey}}',
|
|
33
|
+
'x-niyoos-client': 'n8n',
|
|
36
34
|
},
|
|
37
35
|
},
|
|
38
36
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NiyoosApi.credentials.js","sourceRoot":"","sources":["../../credentials/NiyoosApi.credentials.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"NiyoosApi.credentials.js","sourceRoot":"","sources":["../../credentials/NiyoosApi.credentials.ts"],"names":[],"mappings":";;;AAYA,MAAa,SAAS;IAAtB;QACC,SAAI,GAAG,WAAW,CAAC;QAEnB,gBAAW,GAAG,YAAY,CAAC;QAE3B,qBAAgB,GAAG,wDAAwD,CAAC;QAE5E,SAAI,GAAS,EAAE,KAAK,EAAE,0BAA0B,EAAE,IAAI,EAAE,+BAA+B,EAAE,CAAC;QAE1F,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,WAAW;gBACxB,IAAI,EAAE,aAAa;gBACnB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC/B,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EACV,mGAAmG;aACpG;YACD;gBACC,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,iCAAiC;gBAC1C,WAAW,EACV,sGAAsG;aACvG;SACD,CAAC;QAIF,iBAAY,GAAyB;YACpC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACX,OAAO,EAAE;oBACR,aAAa,EAAE,sCAAsC;oBACrD,iBAAiB,EAAE,KAAK;iBACxB;aACD;SACD,CAAC;QAKF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,MAAM,EAAE,KAAK;gBACb,OAAO,EAAE,8CAA8C;gBACvD,GAAG,EAAE,qBAAqB;aAC1B;SACD,CAAC;IACH,CAAC;CAAA;AApDD,8BAoDC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type IExecuteFunctions, type INodeExecutionData, type INodeType, type INodeTypeDescription } from 'n8n-workflow';
|
|
2
|
+
export declare class Niyoos implements INodeType {
|
|
3
|
+
description: INodeTypeDescription;
|
|
4
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
5
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Niyoos = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const errors_1 = require("../shared/errors");
|
|
6
|
+
const wire_1 = require("../shared/wire");
|
|
7
|
+
class Niyoos {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.description = {
|
|
10
|
+
displayName: 'Niyoos',
|
|
11
|
+
name: 'niyoos',
|
|
12
|
+
icon: { light: 'file:../../icons/niyoos.svg', dark: 'file:../../icons/niyoos.dark.svg' },
|
|
13
|
+
group: ['transform'],
|
|
14
|
+
version: [1],
|
|
15
|
+
subtitle: '={{ $parameter["operation"] }}',
|
|
16
|
+
description: 'Read the status of your Niyoos-governed AI agent',
|
|
17
|
+
defaults: {
|
|
18
|
+
name: 'Niyoos',
|
|
19
|
+
},
|
|
20
|
+
usableAsTool: true,
|
|
21
|
+
inputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
22
|
+
outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
23
|
+
credentials: [
|
|
24
|
+
{
|
|
25
|
+
name: 'niyoosApi',
|
|
26
|
+
required: true,
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
properties: [
|
|
30
|
+
{
|
|
31
|
+
displayName: 'Operation',
|
|
32
|
+
name: 'operation',
|
|
33
|
+
type: 'options',
|
|
34
|
+
noDataExpression: true,
|
|
35
|
+
options: [
|
|
36
|
+
{
|
|
37
|
+
name: 'Get Agent',
|
|
38
|
+
value: 'getAgent',
|
|
39
|
+
description: 'Get the name, organisation and status of the agent this key belongs to',
|
|
40
|
+
action: 'Get the agent',
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
default: 'getAgent',
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
async execute() {
|
|
49
|
+
var _a;
|
|
50
|
+
const items = this.getInputData();
|
|
51
|
+
const out = [];
|
|
52
|
+
const credentials = await this.getCredentials('niyoosApi');
|
|
53
|
+
const origin = String((_a = credentials.baseUrl) !== null && _a !== void 0 ? _a : '').split('/proxy')[0].replace(/\/+$/, '');
|
|
54
|
+
for (let i = 0; i < items.length; i++) {
|
|
55
|
+
try {
|
|
56
|
+
const operation = this.getNodeParameter('operation', i);
|
|
57
|
+
if (operation !== 'getAgent') {
|
|
58
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Unsupported operation: ${operation}`, { itemIndex: i });
|
|
59
|
+
}
|
|
60
|
+
let agent;
|
|
61
|
+
try {
|
|
62
|
+
agent = (await this.helpers.httpRequestWithAuthentication.call(this, 'niyoosApi', {
|
|
63
|
+
method: 'GET',
|
|
64
|
+
url: `${origin}/integrations/v1/me`,
|
|
65
|
+
headers: { [wire_1.CLIENT_HEADER]: wire_1.CLIENT_VALUE },
|
|
66
|
+
json: true,
|
|
67
|
+
}));
|
|
68
|
+
}
|
|
69
|
+
catch (error) {
|
|
70
|
+
const explained = (0, errors_1.explainNiyoosThrownError)(error);
|
|
71
|
+
if (explained === null)
|
|
72
|
+
throw new n8n_workflow_1.NodeApiError(this.getNode(), error, { itemIndex: i });
|
|
73
|
+
throw new n8n_workflow_1.NodeApiError(this.getNode(), error, {
|
|
74
|
+
message: explained.explanation,
|
|
75
|
+
description: explained.serverMessage,
|
|
76
|
+
itemIndex: i,
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
out.push({ json: agent, pairedItem: { item: i } });
|
|
80
|
+
}
|
|
81
|
+
catch (error) {
|
|
82
|
+
if (this.continueOnFail()) {
|
|
83
|
+
out.push({ json: { error: error.message }, pairedItem: { item: i } });
|
|
84
|
+
continue;
|
|
85
|
+
}
|
|
86
|
+
throw new n8n_workflow_1.NodeApiError(this.getNode(), error, { itemIndex: i });
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return [out];
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
exports.Niyoos = Niyoos;
|
|
93
|
+
//# sourceMappingURL=Niyoos.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Niyoos.node.js","sourceRoot":"","sources":["../../../nodes/Niyoos/Niyoos.node.ts"],"names":[],"mappings":";;;AAAA,+CAUsB;AAEtB,6CAA4D;AAC5D,yCAA6D;AAQ7D,MAAa,MAAM;IAAnB;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,QAAQ;YACrB,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,EAAE,KAAK,EAAE,6BAA6B,EAAE,IAAI,EAAE,kCAAkC,EAAE;YACxF,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC,CAAC,CAAC;YACZ,QAAQ,EAAE,gCAAgC;YAC1C,WAAW,EAAE,kDAAkD;YAC/D,QAAQ,EAAE;gBACT,IAAI,EAAE,QAAQ;aACd;YACD,YAAY,EAAE,IAAI;YAClB,MAAM,EAAE,CAAC,kCAAmB,CAAC,IAAI,CAAC;YAClC,OAAO,EAAE,CAAC,kCAAmB,CAAC,IAAI,CAAC;YACnC,WAAW,EAAE;gBACZ;oBACC,IAAI,EAAE,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QACD,OAAO,CAAC,GAAG,CAAC,CAAC;IACd,CAAC;CACD;AApFD,wBAoFC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"node": "n8n-nodes-niyoos.niyoos",
|
|
3
|
+
"nodeVersion": "1.0",
|
|
4
|
+
"codexVersion": "1.0",
|
|
5
|
+
"categories": ["Development"],
|
|
6
|
+
"resources": {
|
|
7
|
+
"credentialDocumentation": [
|
|
8
|
+
{
|
|
9
|
+
"url": "https://github.com/niyoos/n8n-nodes-niyoos#credentials"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"primaryDocumentation": [
|
|
13
|
+
{
|
|
14
|
+
"url": "https://github.com/niyoos/n8n-nodes-niyoos#readme"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type ILoadOptionsFunctions, type INodePropertyOptions, type INodeType, type INodeTypeDescription, type ISupplyDataFunctions, type SupplyData } from 'n8n-workflow';
|
|
2
|
+
export declare const SDK_MISSING_MESSAGE = "The Niyoos Chat Model needs n8n 2.16 or newer. Update n8n, or install n8n-nodes-niyoos 0.1.x, which is the version for older n8n releases.";
|
|
2
3
|
export declare class NiyoosChatModel implements INodeType {
|
|
3
4
|
description: INodeTypeDescription;
|
|
4
5
|
methods: {
|
|
@@ -1,20 +1,53 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NiyoosChatModel = void 0;
|
|
4
|
-
const openai_1 = require("@langchain/openai");
|
|
36
|
+
exports.NiyoosChatModel = exports.SDK_MISSING_MESSAGE = void 0;
|
|
5
37
|
const n8n_workflow_1 = require("n8n-workflow");
|
|
38
|
+
const errors_1 = require("../shared/errors");
|
|
39
|
+
const failedAttempt_1 = require("../shared/failedAttempt");
|
|
40
|
+
const wire_1 = require("../shared/wire");
|
|
41
|
+
exports.SDK_MISSING_MESSAGE = 'The Niyoos Chat Model needs n8n 2.16 or newer. Update n8n, or install n8n-nodes-niyoos 0.1.x, which is the version for older n8n releases.';
|
|
6
42
|
class NiyoosChatModel {
|
|
7
43
|
constructor() {
|
|
8
44
|
this.description = {
|
|
9
45
|
displayName: 'Niyoos Chat Model',
|
|
10
46
|
name: 'niyoosChatModel',
|
|
11
|
-
icon: {
|
|
12
|
-
light: 'file:niyoos.svg',
|
|
13
|
-
dark: 'file:niyoos.dark.svg',
|
|
14
|
-
},
|
|
47
|
+
icon: { light: 'file:../../icons/niyoos.svg', dark: 'file:../../icons/niyoos.dark.svg' },
|
|
15
48
|
group: ['transform'],
|
|
16
|
-
version: 1,
|
|
17
|
-
description: 'Language model served through
|
|
49
|
+
version: [1],
|
|
50
|
+
description: 'Language model served through Niyoos, which governs and records every call',
|
|
18
51
|
subtitle: '={{ $parameter["model"] }}',
|
|
19
52
|
defaults: {
|
|
20
53
|
name: 'Niyoos Chat Model',
|
|
@@ -23,13 +56,10 @@ class NiyoosChatModel {
|
|
|
23
56
|
categories: ['AI'],
|
|
24
57
|
subcategories: {
|
|
25
58
|
AI: ['Language Models', 'Root Nodes'],
|
|
59
|
+
'Language Models': ['Chat Models (Recommended)'],
|
|
26
60
|
},
|
|
27
61
|
resources: {
|
|
28
|
-
primaryDocumentation: [
|
|
29
|
-
{
|
|
30
|
-
url: 'https://niyoos.com/docs/integrations/n8n',
|
|
31
|
-
},
|
|
32
|
-
],
|
|
62
|
+
primaryDocumentation: [{ url: 'https://github.com/niyoos/n8n-nodes-niyoos#readme' }],
|
|
33
63
|
},
|
|
34
64
|
},
|
|
35
65
|
inputs: [],
|
|
@@ -43,7 +73,7 @@ class NiyoosChatModel {
|
|
|
43
73
|
],
|
|
44
74
|
properties: [
|
|
45
75
|
{
|
|
46
|
-
displayName: '
|
|
76
|
+
displayName: 'Every call is sent through Niyoos, which applies this agent\'s kill switch and spending limit and records the call in its audit log.',
|
|
47
77
|
name: 'notice',
|
|
48
78
|
type: 'notice',
|
|
49
79
|
default: '',
|
|
@@ -52,7 +82,7 @@ class NiyoosChatModel {
|
|
|
52
82
|
displayName: 'Model Name or ID',
|
|
53
83
|
name: 'model',
|
|
54
84
|
type: 'options',
|
|
55
|
-
description: 'The model to use, loaded
|
|
85
|
+
description: 'The model to use, loaded from your Niyoos agent. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
|
56
86
|
typeOptions: {
|
|
57
87
|
loadOptionsMethod: 'getModels',
|
|
58
88
|
},
|
|
@@ -71,7 +101,7 @@ class NiyoosChatModel {
|
|
|
71
101
|
name: 'maxTokens',
|
|
72
102
|
type: 'number',
|
|
73
103
|
default: -1,
|
|
74
|
-
description: 'The maximum number of tokens to generate in the completion. -1 lets the model
|
|
104
|
+
description: 'The maximum number of tokens to generate in the completion. -1 lets the model decide.',
|
|
75
105
|
typeOptions: { minValue: -1 },
|
|
76
106
|
},
|
|
77
107
|
{
|
|
@@ -79,7 +109,7 @@ class NiyoosChatModel {
|
|
|
79
109
|
name: 'maxRetries',
|
|
80
110
|
type: 'number',
|
|
81
111
|
default: 2,
|
|
82
|
-
description: 'Maximum number of times to retry a failing request',
|
|
112
|
+
description: 'Maximum number of times to retry a failing request. Current n8n versions do not retry AI model calls, so this setting currently has no effect.',
|
|
83
113
|
typeOptions: { minValue: 0 },
|
|
84
114
|
},
|
|
85
115
|
{
|
|
@@ -116,11 +146,24 @@ class NiyoosChatModel {
|
|
|
116
146
|
var _a;
|
|
117
147
|
const credentials = await this.getCredentials('niyoosApi');
|
|
118
148
|
const baseUrl = String((_a = credentials.baseUrl) !== null && _a !== void 0 ? _a : '').replace(/\/+$/, '');
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
149
|
+
let response;
|
|
150
|
+
try {
|
|
151
|
+
response = (await this.helpers.httpRequestWithAuthentication.call(this, 'niyoosApi', {
|
|
152
|
+
method: 'GET',
|
|
153
|
+
url: `${baseUrl}/models`,
|
|
154
|
+
headers: { [wire_1.CLIENT_HEADER]: wire_1.CLIENT_VALUE },
|
|
155
|
+
json: true,
|
|
156
|
+
}));
|
|
157
|
+
}
|
|
158
|
+
catch (error) {
|
|
159
|
+
const explained = (0, errors_1.explainNiyoosThrownError)(error);
|
|
160
|
+
if (explained === null)
|
|
161
|
+
throw new n8n_workflow_1.NodeApiError(this.getNode(), error);
|
|
162
|
+
throw new n8n_workflow_1.NodeApiError(this.getNode(), error, {
|
|
163
|
+
message: explained.explanation,
|
|
164
|
+
description: explained.serverMessage,
|
|
165
|
+
});
|
|
166
|
+
}
|
|
124
167
|
const models = Array.isArray(response === null || response === void 0 ? void 0 : response.data) ? response.data : [];
|
|
125
168
|
return models
|
|
126
169
|
.map((m) => m === null || m === void 0 ? void 0 : m.id)
|
|
@@ -132,25 +175,35 @@ class NiyoosChatModel {
|
|
|
132
175
|
};
|
|
133
176
|
}
|
|
134
177
|
async supplyData(itemIndex) {
|
|
135
|
-
var _a;
|
|
178
|
+
var _a, _b;
|
|
179
|
+
let sdk;
|
|
180
|
+
try {
|
|
181
|
+
sdk = await Promise.resolve().then(() => __importStar(require('@n8n/ai-node-sdk')));
|
|
182
|
+
}
|
|
183
|
+
catch {
|
|
184
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), exports.SDK_MISSING_MESSAGE, { itemIndex });
|
|
185
|
+
}
|
|
136
186
|
const credentials = await this.getCredentials('niyoosApi');
|
|
137
187
|
const model = this.getNodeParameter('model', itemIndex);
|
|
138
188
|
const options = this.getNodeParameter('options', itemIndex, {});
|
|
139
|
-
const
|
|
189
|
+
const headers = { [wire_1.CLIENT_HEADER]: wire_1.CLIENT_VALUE };
|
|
190
|
+
const runId = (0, wire_1.composeRunId)(this.getWorkflow().id, this.getExecutionId());
|
|
191
|
+
if (runId !== null)
|
|
192
|
+
headers[wire_1.RUN_ID_HEADER] = runId;
|
|
193
|
+
return sdk.supplyModel(this, {
|
|
194
|
+
type: 'openai',
|
|
195
|
+
baseUrl: String((_a = credentials.baseUrl) !== null && _a !== void 0 ? _a : '').replace(/\/+$/, ''),
|
|
140
196
|
apiKey: credentials.agentApiKey,
|
|
141
197
|
model,
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
},
|
|
198
|
+
defaultHeaders: headers,
|
|
199
|
+
useResponsesApi: false,
|
|
145
200
|
temperature: options.temperature,
|
|
146
|
-
maxTokens: options.maxTokens === undefined || options.maxTokens === -1 ? undefined : options.maxTokens,
|
|
147
201
|
topP: options.topP,
|
|
202
|
+
maxTokens: options.maxTokens === undefined || options.maxTokens === -1 ? undefined : options.maxTokens,
|
|
148
203
|
timeout: options.timeout,
|
|
149
|
-
maxRetries: (
|
|
204
|
+
maxRetries: (_b = options.maxRetries) !== null && _b !== void 0 ? _b : 2,
|
|
205
|
+
onFailedAttempt: (0, failedAttempt_1.makeNiyoosFailedAttemptHandler)(() => this.getNode()),
|
|
150
206
|
});
|
|
151
|
-
return {
|
|
152
|
-
response: chatModel,
|
|
153
|
-
};
|
|
154
207
|
}
|
|
155
208
|
}
|
|
156
209
|
exports.NiyoosChatModel = NiyoosChatModel;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NiyoosChatModel.node.js","sourceRoot":"","sources":["../../../nodes/NiyoosChatModel/NiyoosChatModel.node.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NiyoosChatModel.node.js","sourceRoot":"","sources":["../../../nodes/NiyoosChatModel/NiyoosChatModel.node.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAWsB;AAEtB,6CAA4D;AAC5D,2DAAyE;AACzE,yCAA0F;AAU7E,QAAA,mBAAmB,GAC/B,4IAA4I,CAAC;AAW9I,MAAa,eAAe;IAA5B;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,mBAAmB;YAChC,IAAI,EAAE,iBAAiB;YACvB,IAAI,EAAE,EAAE,KAAK,EAAE,6BAA6B,EAAE,IAAI,EAAE,kCAAkC,EAAE;YACxF,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC,CAAC,CAAC;YACZ,WAAW,EAAE,4EAA4E;YACzF,QAAQ,EAAE,4BAA4B;YAC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AE,OAAO,CAAC,WAAW;YAChC,IAAI,EAAE,OAAO,CAAC,IAAI;YAElB,SAAS,EAAE,OAAO,CAAC,SAAS,KAAK,SAAS,IAAI,OAAO,CAAC,SAAS,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS;YACtG,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,UAAU,EAAE,MAAA,OAAO,CAAC,UAAU,mCAAI,CAAC;YACnC,eAAe,EAAE,IAAA,8CAA8B,EAAC,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;SACrE,CAAC,CAAC;IACJ,CAAC;CACD;AApLD,0CAoLC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"node": "n8n-nodes-niyoos.niyoosChatModel",
|
|
3
|
+
"nodeVersion": "1.0",
|
|
4
|
+
"codexVersion": "1.0",
|
|
5
|
+
"categories": ["Development"],
|
|
6
|
+
"resources": {
|
|
7
|
+
"credentialDocumentation": [
|
|
8
|
+
{
|
|
9
|
+
"url": "https://github.com/niyoos/n8n-nodes-niyoos#credentials"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"primaryDocumentation": [
|
|
13
|
+
{
|
|
14
|
+
"url": "https://github.com/niyoos/n8n-nodes-niyoos#readme"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type NiyoosErrorCode = 'CALLER_KEY_INVALID' | 'CALLER_REQUEST_REJECTED' | 'CALLER_ENDPOINT_MALFORMED' | 'CONFIG_PROVIDER_KEY_REJECTED' | 'CONFIG_PROVIDER_KEY_MISSING' | 'CONFIG_CREDENTIAL_DISABLED' | 'CONFIG_CREDENTIAL_REVOKED' | 'CONFIG_ENDPOINT_BLOCKED' | 'CONFIG_PROVIDER_MISCONFIGURED' | 'CONFIG_PROVIDER_QUOTA_EXHAUSTED' | 'POLICY_AGENT_DISABLED' | 'POLICY_COST_LIMIT_REACHED' | 'GATEWAY_RATE_LIMIT' | 'GATEWAY_CREDENTIAL_THROTTLED' | 'GATEWAY_TIMEOUT' | 'GATEWAY_RESPONSE_TOO_LARGE' | 'GATEWAY_INTERNAL_ERROR' | 'PROVIDER_RATE_LIMITED' | 'PROVIDER_UNAVAILABLE' | 'UPSTREAM_UNREACHABLE';
|
|
2
|
+
export declare const NIYOOS_EXPLANATIONS: Record<NiyoosErrorCode, string>;
|
|
3
|
+
export declare function isNiyoosErrorCode(value: unknown): value is NiyoosErrorCode;
|
|
4
|
+
export interface NiyoosEnvelope {
|
|
5
|
+
code?: string;
|
|
6
|
+
message?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function parseNiyoosEnvelope(body: unknown): NiyoosEnvelope;
|
|
9
|
+
export declare function explainNiyoosEnvelope(envelope: NiyoosEnvelope): string | null;
|
|
10
|
+
export interface NiyoosThrownExplanation {
|
|
11
|
+
code: NiyoosErrorCode;
|
|
12
|
+
explanation: string;
|
|
13
|
+
serverMessage?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare function explainNiyoosThrownError(error: unknown): NiyoosThrownExplanation | null;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NIYOOS_EXPLANATIONS = void 0;
|
|
4
|
+
exports.isNiyoosErrorCode = isNiyoosErrorCode;
|
|
5
|
+
exports.parseNiyoosEnvelope = parseNiyoosEnvelope;
|
|
6
|
+
exports.explainNiyoosEnvelope = explainNiyoosEnvelope;
|
|
7
|
+
exports.explainNiyoosThrownError = explainNiyoosThrownError;
|
|
8
|
+
exports.NIYOOS_EXPLANATIONS = {
|
|
9
|
+
CALLER_KEY_INVALID: 'Niyoos rejected this agent key: it is invalid, has been revoked, or its agent was deleted. Open the Niyoos credential in n8n and paste a current agent key from the Niyoos dashboard.',
|
|
10
|
+
CALLER_REQUEST_REJECTED: 'The provider rejected this request as invalid — most often an unknown model name, or an option outside the range it accepts. Niyoos passed the request through unchanged and did not judge it. Check the Model field and the values under Options, then run the workflow again.',
|
|
11
|
+
CALLER_ENDPOINT_MALFORMED: 'Niyoos refused the shape of this request\'s URL before it reached the provider: the proxy path must be spelled canonically — no doubled slashes, no percent-encoded separators, no "." or ".." segments. In n8n this almost always means the Base URL in the Niyoos credential carries a trailing slash or an extra path segment. Correct it to exactly https://api.niyoos.com/proxy/v1 (or your deployment\'s equivalent) and run the workflow again.',
|
|
12
|
+
CONFIG_PROVIDER_KEY_REJECTED: 'The upstream provider rejected the provider key configured for this Niyoos agent. Replace that key in the Niyoos dashboard — retrying will not help, and your Niyoos agent key itself is valid.',
|
|
13
|
+
CONFIG_PROVIDER_KEY_MISSING: 'This Niyoos agent has no provider credential assigned, so there is nothing for Niyoos to call on your behalf. Assign one to the agent in the Niyoos dashboard, then run the workflow again.',
|
|
14
|
+
CONFIG_CREDENTIAL_DISABLED: 'The provider credential assigned to this Niyoos agent is disabled. Re-enable or replace it in the Niyoos dashboard, then run the workflow again.',
|
|
15
|
+
CONFIG_CREDENTIAL_REVOKED: 'The provider credential assigned to this Niyoos agent has been revoked and cannot be used again. Assign a new credential to the agent in the Niyoos dashboard.',
|
|
16
|
+
CONFIG_ENDPOINT_BLOCKED: 'Niyoos refused to call the custom provider endpoint configured for this agent, because that address is not one Niyoos is permitted to reach. Correct the endpoint URL on the provider credential in the Niyoos dashboard.',
|
|
17
|
+
CONFIG_PROVIDER_MISCONFIGURED: "This Niyoos agent's provider settings are incomplete or inconsistent, so the request never reached a provider at all. Review the agent's provider credential in the Niyoos dashboard — retrying unchanged will not help.",
|
|
18
|
+
CONFIG_PROVIDER_QUOTA_EXHAUSTED: "The provider account behind this Niyoos agent's provider key has run out of credit or quota. Open that provider's own billing console and add credit or raise the quota — running the workflow again will not help until you do. Your Niyoos agent key and your n8n credential are both fine.",
|
|
19
|
+
POLICY_AGENT_DISABLED: 'This Niyoos agent is disabled (kill switch). Re-enable it in the Niyoos dashboard before running this workflow again.',
|
|
20
|
+
POLICY_COST_LIMIT_REACHED: 'This Niyoos agent has reached the spending limit set for it, so Niyoos stopped the request before any provider was called. Raise or reset that limit in the Niyoos dashboard — waiting will not clear it on its own.',
|
|
21
|
+
GATEWAY_RATE_LIMIT: 'Niyoos is rate-limiting this agent key: too many requests arrived in a short window. Wait about a minute and run the workflow again, or slow it down. This limit belongs to Niyoos and is not one you can change in the dashboard.',
|
|
22
|
+
GATEWAY_CREDENTIAL_THROTTLED: 'Niyoos is throttling the provider credential this agent uses, because too many requests are sharing it at once. Wait about a minute and try again, or spread the load across more credentials.',
|
|
23
|
+
GATEWAY_TIMEOUT: 'Niyoos stopped waiting for the provider before a response arrived. This is the Niyoos deadline rather than a provider failure — and because the request had already been sent, the provider may have completed it and billed you for it. Raise Timeout under Options, or shorten the prompt, before retrying.',
|
|
24
|
+
GATEWAY_RESPONSE_TOO_LARGE: 'The provider sent back a response larger than Niyoos will relay, so Niyoos refused it rather than truncating it. Nothing was recorded as billable. This is almost always a model asked for a very long output, or a streaming response that never ended. Check the requested output length — a lower max_tokens — or narrow the prompt, then retry.',
|
|
25
|
+
GATEWAY_INTERNAL_ERROR: 'Niyoos itself failed while handling this request. Nothing in your workflow or your Niyoos settings caused it. Retry, and if it keeps happening contact Niyoos support with the time of the run.',
|
|
26
|
+
PROVIDER_RATE_LIMITED: 'The upstream provider rate-limited this request. The limit belongs to the provider account behind this agent credential, not to Niyoos. Wait a short while and run the workflow again, or raise the quota with the provider.',
|
|
27
|
+
PROVIDER_UNAVAILABLE: 'The upstream provider is down or returned an error of its own. Niyoos reached it and it failed. Wait and retry — there is nothing to change in n8n or in the Niyoos dashboard.',
|
|
28
|
+
UPSTREAM_UNREACHABLE: 'Niyoos could not reach the upstream provider at all: the connection never completed, so it is not known whether the network or the provider is at fault. Wait and retry, and if it persists check the status page of the provider.',
|
|
29
|
+
};
|
|
30
|
+
const DETAIL_BEARING = [
|
|
31
|
+
'CALLER_REQUEST_REJECTED',
|
|
32
|
+
'CONFIG_ENDPOINT_BLOCKED',
|
|
33
|
+
];
|
|
34
|
+
function isNiyoosErrorCode(value) {
|
|
35
|
+
return (typeof value === 'string' &&
|
|
36
|
+
Object.prototype.hasOwnProperty.call(exports.NIYOOS_EXPLANATIONS, value));
|
|
37
|
+
}
|
|
38
|
+
function parseNiyoosEnvelope(body) {
|
|
39
|
+
let data = body;
|
|
40
|
+
if (typeof data === 'string') {
|
|
41
|
+
try {
|
|
42
|
+
data = JSON.parse(data);
|
|
43
|
+
}
|
|
44
|
+
catch {
|
|
45
|
+
return {};
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
if (!data || typeof data !== 'object')
|
|
49
|
+
return {};
|
|
50
|
+
const err = data.error;
|
|
51
|
+
if (!err || typeof err !== 'object')
|
|
52
|
+
return {};
|
|
53
|
+
const e = err;
|
|
54
|
+
return {
|
|
55
|
+
code: typeof e.code === 'string' ? e.code : undefined,
|
|
56
|
+
message: typeof e.message === 'string' ? e.message : undefined,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
function explainNiyoosEnvelope(envelope) {
|
|
60
|
+
const { code, message } = envelope;
|
|
61
|
+
if (!isNiyoosErrorCode(code))
|
|
62
|
+
return null;
|
|
63
|
+
const explanation = exports.NIYOOS_EXPLANATIONS[code];
|
|
64
|
+
const detail = typeof message === 'string' ? message.trim() : '';
|
|
65
|
+
if (detail.length > 0 && DETAIL_BEARING.indexOf(code) !== -1) {
|
|
66
|
+
return explanation + ' (Niyoos reported: ' + detail + ')';
|
|
67
|
+
}
|
|
68
|
+
return explanation;
|
|
69
|
+
}
|
|
70
|
+
function explainNiyoosThrownError(error) {
|
|
71
|
+
for (const candidate of candidateBodies(error)) {
|
|
72
|
+
const envelope = parseNiyoosEnvelope(candidate);
|
|
73
|
+
const explanation = explainNiyoosEnvelope(envelope);
|
|
74
|
+
if (explanation !== null && isNiyoosErrorCode(envelope.code)) {
|
|
75
|
+
return {
|
|
76
|
+
code: envelope.code,
|
|
77
|
+
explanation,
|
|
78
|
+
serverMessage: envelope.message,
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
return null;
|
|
83
|
+
}
|
|
84
|
+
function candidateBodies(error) {
|
|
85
|
+
if (!error || typeof error !== 'object')
|
|
86
|
+
return [];
|
|
87
|
+
const e = error;
|
|
88
|
+
const response = e.response;
|
|
89
|
+
const cause = e.cause;
|
|
90
|
+
return [
|
|
91
|
+
e,
|
|
92
|
+
e.error,
|
|
93
|
+
e.errorResponse,
|
|
94
|
+
e.body,
|
|
95
|
+
e.responseBody,
|
|
96
|
+
response === null || response === void 0 ? void 0 : response.data,
|
|
97
|
+
response === null || response === void 0 ? void 0 : response.body,
|
|
98
|
+
response,
|
|
99
|
+
cause,
|
|
100
|
+
cause === null || cause === void 0 ? void 0 : cause.error,
|
|
101
|
+
];
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../nodes/shared/errors.ts"],"names":[],"mappings":";;;AA6HA,8CAKC;AAaD,kDAiBC;AAQD,sDAUC;AAmBD,4DAeC;AAhKY,QAAA,mBAAmB,GAAoC;IACnE,kBAAkB,EACjB,uLAAuL;IAExL,uBAAuB,EACtB,iRAAiR;IAElR,yBAAyB,EACxB,wbAAwb;IAEzb,4BAA4B,EAC3B,iMAAiM;IAElM,2BAA2B,EAC1B,6LAA6L;IAE9L,0BAA0B,EACzB,kJAAkJ;IAEnJ,yBAAyB,EACxB,gKAAgK;IAEjK,uBAAuB,EACtB,2NAA2N;IAE5N,6BAA6B,EAC5B,0NAA0N;IAE3N,+BAA+B,EAC9B,+RAA+R;IAEhS,qBAAqB,EACpB,uHAAuH;IAExH,yBAAyB,EACxB,sNAAsN;IAEvN,kBAAkB,EACjB,oOAAoO;IAErO,4BAA4B,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C,QAA+C,CAAC;IACnE,MAAM,KAAK,GAAG,CAAC,CAAC,KAA4C,CAAC;IAC7D,OAAO;QACN,CAAC;QACD,CAAC,CAAC,KAAK;QACP,CAAC,CAAC,aAAa;QACf,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,YAAY;QACd,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,IAAI;QACd,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,IAAI;QACd,QAAQ;QACR,KAAK;QACL,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,KAAK;KACZ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type INode } from 'n8n-workflow';
|
|
2
|
+
export declare function statusOf(error: unknown): number | undefined;
|
|
3
|
+
export declare function willBeRetried(error: unknown): boolean;
|
|
4
|
+
export declare function makeNiyoosFailedAttemptHandler(getNode: () => INode): (error: unknown) => void;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.statusOf = statusOf;
|
|
4
|
+
exports.willBeRetried = willBeRetried;
|
|
5
|
+
exports.makeNiyoosFailedAttemptHandler = makeNiyoosFailedAttemptHandler;
|
|
6
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
7
|
+
const errors_1 = require("./errors");
|
|
8
|
+
const STATUS_NO_RETRY = [400, 401, 402, 403, 404, 405, 406, 407, 409];
|
|
9
|
+
function statusOf(error) {
|
|
10
|
+
var _a;
|
|
11
|
+
if (!error || typeof error !== 'object')
|
|
12
|
+
return undefined;
|
|
13
|
+
const e = error;
|
|
14
|
+
for (const candidate of [e.status, (_a = e.response) === null || _a === void 0 ? void 0 : _a.status, e.httpCode]) {
|
|
15
|
+
const n = typeof candidate === 'string' ? Number(candidate) : candidate;
|
|
16
|
+
if (typeof n === 'number' && Number.isInteger(n) && n >= 100 && n <= 599)
|
|
17
|
+
return n;
|
|
18
|
+
}
|
|
19
|
+
return undefined;
|
|
20
|
+
}
|
|
21
|
+
function willBeRetried(error) {
|
|
22
|
+
const status = statusOf(error);
|
|
23
|
+
if (status !== undefined && STATUS_NO_RETRY.indexOf(status) !== -1)
|
|
24
|
+
return false;
|
|
25
|
+
const left = error === null || error === void 0 ? void 0 : error.retriesLeft;
|
|
26
|
+
return typeof left === 'number' && left > 0;
|
|
27
|
+
}
|
|
28
|
+
function makeNiyoosFailedAttemptHandler(getNode) {
|
|
29
|
+
return (error) => {
|
|
30
|
+
const explained = (0, errors_1.explainNiyoosThrownError)(error);
|
|
31
|
+
if (explained === null)
|
|
32
|
+
return;
|
|
33
|
+
if (willBeRetried(error))
|
|
34
|
+
return;
|
|
35
|
+
const status = statusOf(error);
|
|
36
|
+
throw new n8n_workflow_1.NodeApiError(getNode(), error, {
|
|
37
|
+
message: explained.explanation,
|
|
38
|
+
description: explained.serverMessage,
|
|
39
|
+
httpCode: status === undefined ? undefined : String(status),
|
|
40
|
+
functionality: 'configuration-node',
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=failedAttempt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"failedAttempt.js","sourceRoot":"","sources":["../../../nodes/shared/failedAttempt.ts"],"names":[],"mappings":";;AAmCA,4BAQC;AAGD,sCAKC;AAED,wEAaC;AAlED,+CAAyE;AAEzE,qCAAoD;AA+BpD,MAAM,eAAe,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAEtE,SAAgB,QAAQ,CAAC,KAAc;;IACtC,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,SAAS,CAAC;IAC1D,MAAM,CAAC,GAAG,KAAkF,CAAC;IAC7F,KAAK,MAAM,SAAS,IAAI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MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC;YAC3D,aAAa,EAAE,oBAAoB;SACnC,CAAC,CAAC;IACJ,CAAC,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const CLIENT_HEADER = "x-niyoos-client";
|
|
2
|
+
export declare const CLIENT_VALUE = "n8n";
|
|
3
|
+
export declare const RUN_ID_HEADER = "x-niyoos-run-id";
|
|
4
|
+
export declare const RUN_ID_PATTERN: RegExp;
|
|
5
|
+
export declare function composeRunId(workflowId: unknown, executionId: unknown): string | null;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RUN_ID_PATTERN = exports.RUN_ID_HEADER = exports.CLIENT_VALUE = exports.CLIENT_HEADER = void 0;
|
|
4
|
+
exports.composeRunId = composeRunId;
|
|
5
|
+
exports.CLIENT_HEADER = 'x-niyoos-client';
|
|
6
|
+
exports.CLIENT_VALUE = 'n8n';
|
|
7
|
+
exports.RUN_ID_HEADER = 'x-niyoos-run-id';
|
|
8
|
+
exports.RUN_ID_PATTERN = /^[A-Za-z0-9_-]{8,64}$/;
|
|
9
|
+
const HASH_PREFIX = 'n8n-h-';
|
|
10
|
+
function hash64(text) {
|
|
11
|
+
let a = 0x811c9dc5;
|
|
12
|
+
let b = 0x01000193 ^ 0x5bd1e995;
|
|
13
|
+
for (let i = 0; i < text.length; i++) {
|
|
14
|
+
const c = text.charCodeAt(i);
|
|
15
|
+
a = Math.imul(a ^ c, 0x01000193) >>> 0;
|
|
16
|
+
b = Math.imul(b ^ c, 0x01000193 ^ 0x2f) >>> 0;
|
|
17
|
+
}
|
|
18
|
+
return a.toString(16).padStart(8, '0') + b.toString(16).padStart(8, '0');
|
|
19
|
+
}
|
|
20
|
+
function composeRunId(workflowId, executionId) {
|
|
21
|
+
const exec = typeof executionId === 'string' || typeof executionId === 'number' ? String(executionId) : '';
|
|
22
|
+
if (exec.length === 0)
|
|
23
|
+
return null;
|
|
24
|
+
const wf = typeof workflowId === 'string' || typeof workflowId === 'number' ? String(workflowId) : '';
|
|
25
|
+
const readable = `n8n-${wf}-${exec}`;
|
|
26
|
+
if (wf.length > 0 && exports.RUN_ID_PATTERN.test(readable))
|
|
27
|
+
return readable;
|
|
28
|
+
const hashed = HASH_PREFIX + hash64(`${wf}\u0000${exec}`);
|
|
29
|
+
return exports.RUN_ID_PATTERN.test(hashed) ? hashed : null;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=wire.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wire.js","sourceRoot":"","sources":["../../../nodes/shared/wire.ts"],"names":[],"mappings":";;;AAsDA,oCAYC;AAzDY,QAAA,aAAa,GAAG,iBAAiB,CAAC;AAClC,QAAA,YAAY,GAAG,KAAK,CAAC;AAGrB,QAAA,aAAa,GAAG,iBAAiB,CAAC;AAMlC,QAAA,cAAc,GAAG,uBAAuB,CAAC;AAGtD,MAAM,WAAW,GAAG,QAAQ,CAAC;AAQ7B,SAAS,MAAM,CAAC,IAAY;IAC3B,IAAI,CAAC,GAAG,UAAU,CAAC;IACnB,IAAI,CAAC,GAAG,UAAU,GAAG,UAAU,CAAC;IAChC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACtC,MAAM,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QAC7B,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC;QACvC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;IAC/C,CAAC;IACD,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;AAC1E,CAAC;AAeD,SAAgB,YAAY,CAAC,UAAmB,EAAE,WAAoB;IACrE,MAAM,IAAI,GAAG,OAAO,WAAW,KAAK,QAAQ,IAAI,OAAO,WAAW,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAC3G,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACnC,MAAM,EAAE,GAAG,OAAO,UAAU,KAAK,QAAQ,IAAI,OAAO,UAAU,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAEtG,MAAM,QAAQ,GAAG,OAAO,EAAE,IAAI,IAAI,EAAE,CAAC;IACrC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,IAAI,sBAAc,CAAC,IAAI,CAAC,QAAQ,CAAC;QAAE,OAAO,QAAQ,CAAC;IAEpE,MAAM,MAAM,GAAG,WAAW,GAAG,MAAM,CAAC,GAAG,EAAE,SAAS,IAAI,EAAE,CAAC,CAAC;IAG1D,OAAO,sBAAc,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;AACpD,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "n8n-nodes-niyoos",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Govern the AI agents in your n8n workflows with Niyoos: a kill switch, spending limits and a tamper-evident audit log for every model call.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"homepage": "https://niyoos.com",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"n8n-community-node-package",
|
|
9
|
+
"n8n",
|
|
10
|
+
"niyoos",
|
|
11
|
+
"ai governance",
|
|
12
|
+
"llm",
|
|
13
|
+
"audit",
|
|
14
|
+
"chat model"
|
|
15
|
+
],
|
|
16
|
+
"author": {
|
|
17
|
+
"name": "Niyoos",
|
|
18
|
+
"email": "support@niyoos.com"
|
|
19
|
+
},
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "https://github.com/niyoos/n8n-nodes-niyoos.git"
|
|
23
|
+
},
|
|
24
|
+
"bugs": {
|
|
25
|
+
"url": "https://github.com/niyoos/n8n-nodes-niyoos/issues"
|
|
26
|
+
},
|
|
27
|
+
"scripts": {
|
|
28
|
+
"build": "n8n-node build",
|
|
29
|
+
"build:watch": "tsc --watch",
|
|
30
|
+
"dev": "n8n-node dev",
|
|
31
|
+
"lint": "n8n-node lint",
|
|
32
|
+
"lint:fix": "n8n-node lint --fix",
|
|
33
|
+
"release": "n8n-node release",
|
|
34
|
+
"prepublishOnly": "n8n-node prerelease",
|
|
35
|
+
"test": "n8n-node build && node --test \"test/*.test.mjs\""
|
|
36
|
+
},
|
|
37
|
+
"files": [
|
|
38
|
+
"dist",
|
|
39
|
+
"!dist/tsconfig.tsbuildinfo"
|
|
40
|
+
],
|
|
41
|
+
"n8n": {
|
|
42
|
+
"n8nNodesApiVersion": 1,
|
|
43
|
+
"aiNodeSdkVersion": 1,
|
|
44
|
+
"strict": true,
|
|
45
|
+
"credentials": [
|
|
46
|
+
"dist/credentials/NiyoosApi.credentials.js"
|
|
47
|
+
],
|
|
48
|
+
"nodes": [
|
|
49
|
+
"dist/nodes/NiyoosChatModel/NiyoosChatModel.node.js",
|
|
50
|
+
"dist/nodes/Niyoos/Niyoos.node.js"
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@n8n/ai-node-sdk": "0.7.0",
|
|
55
|
+
"@n8n/node-cli": "0.53.2",
|
|
56
|
+
"eslint": "9.32.0",
|
|
57
|
+
"n8n-workflow": "2.16.0",
|
|
58
|
+
"prettier": "3.6.2",
|
|
59
|
+
"release-it": "^21.1.0",
|
|
60
|
+
"typescript": "5.9.2"
|
|
61
|
+
},
|
|
62
|
+
"peerDependencies": {
|
|
63
|
+
"@n8n/ai-node-sdk": ">=0.7.0",
|
|
64
|
+
"n8n-workflow": "*"
|
|
65
|
+
}
|
|
66
|
+
}
|
package/package.json
CHANGED
|
@@ -1,63 +1,66 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
2
|
+
"name": "n8n-nodes-niyoos",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Govern the AI agents in your n8n workflows with Niyoos: a kill switch, spending limits and a tamper-evident audit log for every model call.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"homepage": "https://niyoos.com",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"n8n-community-node-package",
|
|
9
|
+
"n8n",
|
|
10
|
+
"niyoos",
|
|
11
|
+
"ai governance",
|
|
12
|
+
"llm",
|
|
13
|
+
"audit",
|
|
14
|
+
"chat model"
|
|
15
|
+
],
|
|
16
|
+
"author": {
|
|
17
|
+
"name": "Niyoos",
|
|
18
|
+
"email": "support@niyoos.com"
|
|
19
|
+
},
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "https://github.com/niyoos/n8n-nodes-niyoos.git"
|
|
23
|
+
},
|
|
24
|
+
"bugs": {
|
|
25
|
+
"url": "https://github.com/niyoos/n8n-nodes-niyoos/issues"
|
|
26
|
+
},
|
|
27
|
+
"scripts": {
|
|
28
|
+
"build": "n8n-node build",
|
|
29
|
+
"build:watch": "tsc --watch",
|
|
30
|
+
"dev": "n8n-node dev",
|
|
31
|
+
"lint": "n8n-node lint",
|
|
32
|
+
"lint:fix": "n8n-node lint --fix",
|
|
33
|
+
"release": "n8n-node release",
|
|
34
|
+
"prepublishOnly": "n8n-node prerelease",
|
|
35
|
+
"test": "n8n-node build && node --test \"test/*.test.mjs\""
|
|
36
|
+
},
|
|
37
|
+
"files": [
|
|
38
|
+
"dist",
|
|
39
|
+
"!dist/tsconfig.tsbuildinfo"
|
|
40
|
+
],
|
|
41
|
+
"n8n": {
|
|
42
|
+
"n8nNodesApiVersion": 1,
|
|
43
|
+
"aiNodeSdkVersion": 1,
|
|
44
|
+
"strict": true,
|
|
45
|
+
"credentials": [
|
|
46
|
+
"dist/credentials/NiyoosApi.credentials.js"
|
|
47
|
+
],
|
|
48
|
+
"nodes": [
|
|
49
|
+
"dist/nodes/NiyoosChatModel/NiyoosChatModel.node.js",
|
|
50
|
+
"dist/nodes/Niyoos/Niyoos.node.js"
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@n8n/ai-node-sdk": "0.7.0",
|
|
55
|
+
"@n8n/node-cli": "0.53.2",
|
|
56
|
+
"eslint": "9.32.0",
|
|
57
|
+
"n8n-workflow": "2.16.0",
|
|
58
|
+
"prettier": "3.6.2",
|
|
59
|
+
"release-it": "^21.1.0",
|
|
60
|
+
"typescript": "5.9.2"
|
|
61
|
+
},
|
|
62
|
+
"peerDependencies": {
|
|
63
|
+
"@n8n/ai-node-sdk": ">=0.7.0",
|
|
64
|
+
"n8n-workflow": "*"
|
|
65
|
+
}
|
|
63
66
|
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512" role="img" aria-label="Niyoos">
|
|
2
|
-
<g transform="translate(15.925 18.298) scale(2.712716)">
|
|
3
|
-
<path d="M 73.500 12.641 C 37.177 33.550, 23.603 41.670, 21.563 43.710 C 17.423 47.850, 16 52.202, 16 60.727 C 16 67.717, 16.273 68.908, 18.314 70.826 C 21.168 73.506, 25.975 73.651, 29.065 71.149 C 30.902 69.661, 31.437 68.042, 31.790 62.899 C 32.042 59.220, 32.864 55.778, 33.724 54.801 C 34.546 53.866, 39.228 50.821, 44.129 48.035 L 53.039 42.969 60.971 47.544 C 65.334 50.060, 69.158 52.921, 69.469 53.901 C 69.780 54.882, 71.148 56.730, 72.509 58.008 C 74.369 59.756, 76.143 60.333, 79.648 60.333 C 83.628 60.333, 84.730 59.866, 87.156 57.151 C 89.297 54.755, 90 52.959, 90 49.885 C 90 46.607, 89.388 45.231, 86.894 42.901 C 84.870 41.010, 82.725 40, 80.732 40 C 77.713 40, 69 35.646, 69 34.137 C 69 32.824, 85.521 24, 87.978 24 C 89.247 24, 95.059 26.765, 100.893 30.145 C 106.727 33.525, 117.800 39.895, 125.500 44.301 C 133.200 48.706, 140.512 53.220, 141.750 54.330 C 143.852 56.216, 144 57.157, 144 68.674 C 144 76.599, 143.626 81, 142.952 81 C 140.726 81, 137 86.321, 137 89.500 C 137 92.679, 140.726 98, 142.952 98 C 144.507 98, 144.325 117.178, 142.750 119.308 C 141.555 120.925, 127.971 129.333, 127.463 128.771 C 127.329 128.622, 127.016 113.688, 126.768 95.585 L 126.317 62.669 123.603 60.335 C 120.131 57.348, 116.840 57.373, 113.306 60.412 L 110.500 62.825 110.206 101.178 L 109.913 139.532 104.690 142.266 C 101.818 143.770, 99.138 145, 98.734 145 C 98.330 145, 98 131.762, 98 115.582 C 98 99.402, 97.720 85.435, 97.379 84.545 C 96.679 82.722, 91.944 80, 89.473 80 C 88.578 80, 86.531 81.315, 84.923 82.923 L 82 85.846 82 115.864 C 82 132.374, 81.646 146.101, 81.213 146.368 C 80.780 146.636, 78.080 145.500, 75.213 143.845 L 70 140.835 70 123.341 L 70 105.846 67.077 102.923 C 65.469 101.315, 63.465 100, 62.624 100 C 59.785 100, 56.228 102.205, 55.110 104.657 C 54.420 106.173, 54.001 114.350, 54.002 126.297 C 54.004 150.478, 53.891 150.205, 67 157.807 C 83.962 167.644, 86.591 168.433, 93.915 165.880 C 99.471 163.943, 151.341 133.935, 154.777 130.669 C 160.439 125.289, 161 121.395, 161 87.500 C 161 54.776, 160.418 50.252, 155.495 44.701 C 154.129 43.162, 142.772 35.927, 130.256 28.624 C 93.288 7.051, 95.232 7.997, 87.904 8.018 C 82.133 8.034, 80.709 8.492, 73.500 12.641 M 47.315 66.452 C 45.563 67.220, 43.436 69.191, 42.588 70.830 C 41.536 72.864, 37.651 75.828, 30.367 80.156 C 23.873 84.013, 18.952 87.676, 17.810 89.500 C 16.141 92.169, 15.965 94.284, 16.217 108.661 L 16.500 124.821 19.608 128.661 C 23.506 133.475, 32.535 138.990, 36.527 138.996 C 40.558 139.001, 43.696 136.660, 44.487 133.057 C 45.349 129.136, 43.776 126.502, 38.707 123.377 C 36.393 121.950, 33.938 120.071, 33.250 119.200 C 32.428 118.160, 32 113.987, 32 107.016 L 32 96.413 40.927 91.207 C 45.836 88.343, 50.829 86, 52.022 86 C 55.104 86, 59.640 83.086, 60.915 80.288 C 62.783 76.187, 62.197 72.242, 59.250 69.088 C 55.923 65.526, 51.600 64.572, 47.315 66.452" fill="#FFFFFF" fill-rule="evenodd" stroke="none"/>
|
|
4
|
-
</g>
|
|
5
|
-
</svg>
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512" role="img" aria-label="Niyoos">
|
|
2
|
-
<g transform="translate(15.925 18.298) scale(2.712716)">
|
|
3
|
-
<path d="M 73.500 12.641 C 37.177 33.550, 23.603 41.670, 21.563 43.710 C 17.423 47.850, 16 52.202, 16 60.727 C 16 67.717, 16.273 68.908, 18.314 70.826 C 21.168 73.506, 25.975 73.651, 29.065 71.149 C 30.902 69.661, 31.437 68.042, 31.790 62.899 C 32.042 59.220, 32.864 55.778, 33.724 54.801 C 34.546 53.866, 39.228 50.821, 44.129 48.035 L 53.039 42.969 60.971 47.544 C 65.334 50.060, 69.158 52.921, 69.469 53.901 C 69.780 54.882, 71.148 56.730, 72.509 58.008 C 74.369 59.756, 76.143 60.333, 79.648 60.333 C 83.628 60.333, 84.730 59.866, 87.156 57.151 C 89.297 54.755, 90 52.959, 90 49.885 C 90 46.607, 89.388 45.231, 86.894 42.901 C 84.870 41.010, 82.725 40, 80.732 40 C 77.713 40, 69 35.646, 69 34.137 C 69 32.824, 85.521 24, 87.978 24 C 89.247 24, 95.059 26.765, 100.893 30.145 C 106.727 33.525, 117.800 39.895, 125.500 44.301 C 133.200 48.706, 140.512 53.220, 141.750 54.330 C 143.852 56.216, 144 57.157, 144 68.674 C 144 76.599, 143.626 81, 142.952 81 C 140.726 81, 137 86.321, 137 89.500 C 137 92.679, 140.726 98, 142.952 98 C 144.507 98, 144.325 117.178, 142.750 119.308 C 141.555 120.925, 127.971 129.333, 127.463 128.771 C 127.329 128.622, 127.016 113.688, 126.768 95.585 L 126.317 62.669 123.603 60.335 C 120.131 57.348, 116.840 57.373, 113.306 60.412 L 110.500 62.825 110.206 101.178 L 109.913 139.532 104.690 142.266 C 101.818 143.770, 99.138 145, 98.734 145 C 98.330 145, 98 131.762, 98 115.582 C 98 99.402, 97.720 85.435, 97.379 84.545 C 96.679 82.722, 91.944 80, 89.473 80 C 88.578 80, 86.531 81.315, 84.923 82.923 L 82 85.846 82 115.864 C 82 132.374, 81.646 146.101, 81.213 146.368 C 80.780 146.636, 78.080 145.500, 75.213 143.845 L 70 140.835 70 123.341 L 70 105.846 67.077 102.923 C 65.469 101.315, 63.465 100, 62.624 100 C 59.785 100, 56.228 102.205, 55.110 104.657 C 54.420 106.173, 54.001 114.350, 54.002 126.297 C 54.004 150.478, 53.891 150.205, 67 157.807 C 83.962 167.644, 86.591 168.433, 93.915 165.880 C 99.471 163.943, 151.341 133.935, 154.777 130.669 C 160.439 125.289, 161 121.395, 161 87.500 C 161 54.776, 160.418 50.252, 155.495 44.701 C 154.129 43.162, 142.772 35.927, 130.256 28.624 C 93.288 7.051, 95.232 7.997, 87.904 8.018 C 82.133 8.034, 80.709 8.492, 73.500 12.641 M 47.315 66.452 C 45.563 67.220, 43.436 69.191, 42.588 70.830 C 41.536 72.864, 37.651 75.828, 30.367 80.156 C 23.873 84.013, 18.952 87.676, 17.810 89.500 C 16.141 92.169, 15.965 94.284, 16.217 108.661 L 16.500 124.821 19.608 128.661 C 23.506 133.475, 32.535 138.990, 36.527 138.996 C 40.558 139.001, 43.696 136.660, 44.487 133.057 C 45.349 129.136, 43.776 126.502, 38.707 123.377 C 36.393 121.950, 33.938 120.071, 33.250 119.200 C 32.428 118.160, 32 113.987, 32 107.016 L 32 96.413 40.927 91.207 C 45.836 88.343, 50.829 86, 52.022 86 C 55.104 86, 59.640 83.086, 60.915 80.288 C 62.783 76.187, 62.197 72.242, 59.250 69.088 C 55.923 65.526, 51.600 64.572, 47.315 66.452" fill="#131A2A" fill-rule="evenodd" stroke="none"/>
|
|
4
|
-
</g>
|
|
5
|
-
</svg>
|
|
File without changes
|
|
File without changes
|