n8n-nodes-2kw 6.3.0-dev.12 → 6.3.0-dev.122
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 +24 -3
- package/dist/nodes/TwoKw/descriptions/agent.js +19 -2
- package/dist/nodes/TwoKw/descriptions/agent.js.map +1 -1
- package/dist/nodes/TwoKw/operations/agent.d.ts +15 -0
- package/dist/nodes/TwoKw/operations/agent.js +69 -10
- package/dist/nodes/TwoKw/operations/agent.js.map +1 -1
- package/dist/nodes/TwoKw/operations/connect-pause.d.ts +70 -0
- package/dist/nodes/TwoKw/operations/connect-pause.js +158 -0
- package/dist/nodes/TwoKw/operations/connect-pause.js.map +1 -0
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -33,8 +33,8 @@ Agent, Label, Schema, Prompt, Schema Version, and Prompt Label fields are **sear
|
|
|
33
33
|
|
|
34
34
|
| Resource | Operation | Notes |
|
|
35
35
|
| --- | --- | --- |
|
|
36
|
-
| Agent | Decide Approval | Approves or rejects every pending approval of a paused run and continues it. Required: `Agent`, `Response ID`, `Decision` (`Approve All` / `Reject All`, default reject). Optional: `Label` (the one the run used), `Reason`, `Remember for Conversation` (approvals only). Options: `Return Paused Runs`, `Simplify Output`. See [Human approval from a workflow](#human-approval-from-a-workflow). |
|
|
37
|
-
| Agent | Send Message | Runs one turn of a stored agent. `Agent` and `Label` are pickers (empty label = latest). Options: `Binary Properties` (comma-separated, uploaded as attachments), `Conversation ID`, `Previous Response ID`, `Return Paused Runs`, `Simplify Output`. Fails if the agent pauses unless `Return Paused Runs` is on — see [Agents in n8n](#agents-in-n8n). |
|
|
36
|
+
| Agent | Decide Approval | Approves or rejects every pending approval of a paused run and continues it. Required: `Agent`, `Response ID`, `Decision` (`Approve All` / `Reject All`, default reject). Optional: `Label` (the one the run used), `Reason`, `Remember for Conversation` (approvals only). Options: `Mode`, `Return Paused Runs`, `Simplify Output`. See [Human approval from a workflow](#human-approval-from-a-workflow). |
|
|
37
|
+
| Agent | Send Message | Runs one turn of a stored agent. `Agent` and `Label` are pickers (empty label = latest). Options: `Binary Properties` (comma-separated, uploaded as attachments), `Conversation ID`, `Mode`, `Previous Response ID`, `Return Paused Runs`, `Simplify Output`. Fails if the agent pauses unless `Return Paused Runs` is on — see [Agents in n8n](#agents-in-n8n). |
|
|
38
38
|
| Schema | Get | Searchable picker. Returns schema metadata + active version. |
|
|
39
39
|
| Prompt | Get | Searchable picker. Returns prompt metadata. |
|
|
40
40
|
| Prompt | Compile | Compiles a prompt with a `Variables` JSON map. Optional `Version ID` (string) or `Label` (picker, depends on prompt). |
|
|
@@ -48,10 +48,20 @@ Agent, Label, Schema, Prompt, Schema Version, and Prompt Label fields are **sear
|
|
|
48
48
|
|
|
49
49
|
## Agents in n8n
|
|
50
50
|
|
|
51
|
-
**Agent › Send Message** runs one turn of an agent you built in 2kw and returns its answer as `text`, together with `status`, `responseId`, `conversationId`, `model` and `usage`. Pass `conversationId` (or `responseId` as *Previous Response ID*) to a later Send Message to continue the thread. Files from binary properties are uploaded and attached to the message; images reach the model as pixels.
|
|
51
|
+
**Agent › Send Message** runs one turn of an agent you built in 2kw and returns its answer as `text`, together with `status`, `responseId`, `conversationId`, `conversationMode`, `model` and `usage`. `conversationMode` is the [conversation mode](#conversation-mode) the turn ran under: `plan`, `ask`, `auto`, or `null` when none is set. Pass `conversationId` (or `responseId` as *Previous Response ID*) to a later Send Message to continue the thread. Files from binary properties are uploaded and attached to the message; images reach the model as pixels.
|
|
52
52
|
|
|
53
53
|
**n8n runs agents unattended by default.** When an agent's policy wants a human to approve a tool call, the run pauses and this operation fails with the tools that are waiting, for example `Agent paused for approval: create_invoice (apreq_…)`. To ask a person instead, see [Human approval from a workflow](#human-approval-from-a-workflow). For agents you call from n8n, use tools their policy lets run without a human decision — once auto-approval is available, set `classes.write` to `auto` in the agent's policy. A run that asks for a client-side tool fails the same way (`Agent requested client-side tool …`), because n8n cannot execute it. A run that stops early (`status: incomplete`, e.g. too many tool iterations) is returned, not failed; check `incompleteReason`. Leave *Retry On Fail* off for agents with write tools: a timed-out turn may still be running, and a retry repeats its tool calls.
|
|
54
54
|
|
|
55
|
+
### Conversation mode
|
|
56
|
+
|
|
57
|
+
The **Mode** option of Send Message and Decide Approval sets the conversation's mode, which narrows what the agent may do without touching the agent:
|
|
58
|
+
|
|
59
|
+
- **Plan**: read only. Anything that could change something is refused.
|
|
60
|
+
- **Ask**: no automatic approver. Calls that need approval wait for a person.
|
|
61
|
+
- **Auto**: the operator's policy as written, automatic approver included.
|
|
62
|
+
|
|
63
|
+
Leave the option out to keep the conversation's mode; the node then sends nothing. Once added, it defaults to `Ask`, and the node appends a `backbone:mode` item to the request. The mode is stored on the conversation and applies to its later turns too. A mode only tightens the agent's policy, never loosens it. See [Conversation Mode](https://docs.2kw.ai/agents#conversation-mode) in the API docs.
|
|
64
|
+
|
|
55
65
|
### Human approval from a workflow
|
|
56
66
|
|
|
57
67
|
To put a person in the loop instead of failing, turn on **Return Paused Runs** in Send Message. A run that pauses for approval then comes out as an item with `status: requires_action`, its `responseId`, and `pendingApprovals` — one entry per waiting call, with `approvalId`, `tool`, `arguments`, `policyClass` and `reason` (why the auto-approver escalated it, or `null`). Route on `status` with an IF node, ask a person with any Send-and-Wait node (Slack, email, Telegram), and pass the answer to **Agent › Decide Approval**:
|
|
@@ -68,10 +78,17 @@ It fails the item when:
|
|
|
68
78
|
|
|
69
79
|
- nothing is pending on the response: already decided by a person, a conversation grant or the auto-approver, or the ID is not a paused run of this agent;
|
|
70
80
|
- the platform refuses the decision, for example because an approval was decided automatically (`2kw refused the decision on response …`) or is no longer pending;
|
|
81
|
+
- the conversation is in Plan and an approval is not read-only (`conversation_in_plan_mode`). The approval stays pending. Setting Mode to `Ask` on the same Decide Approval leaves Plan and approves in one request; leaving Plan is the person's decision, so ask them first;
|
|
71
82
|
- the continued run asks for a client-side tool, which n8n still cannot execute. A turn can wait for approvals and a client-side tool at once; deciding the approvals does not run the client-side tool.
|
|
72
83
|
|
|
73
84
|
Approvals remain a human decision. Do not give Decide Approval to an AI Agent as a tool, and do not wire it to approve without asking someone. For tools that should run without a person, set `classes.write` to `auto` in the agent's policy once auto-approval is available.
|
|
74
85
|
|
|
86
|
+
### Connectors that need a person's sign-in
|
|
87
|
+
|
|
88
|
+
An agent can use an MCP connector that acts as a person, through their own OAuth sign-in. When nobody is connected yet, or the agent is not yet allowed to use the connection, the run pauses with a `backbone:connector_auth_request` item instead of calling the connector. n8n cannot sign in for anyone, so by default the item fails with `Agent paused until you connect <label> (<host>) in https://chat.2kw.ai/connectors`. The error says *allow the agent to use* instead of *connect* when the connection exists but this agent is not allowed yet, and *reconnect* when the sign-in expired.
|
|
89
|
+
|
|
90
|
+
To handle the pause in the workflow, turn on **Return Paused Runs**. The paused item then carries `pendingConnections`, one entry per connector: `serverLabel`, `host`, `reason` (`connect`, `allow` or `reconnect`), `destinations` (the hosts an allow is asked for again, or `null`) and `connectUrl`, the Connectors page of chat.2kw.ai that belongs to the credential's base URL. Send the person the link, wait until they have connected, then continue the run with **Send Message** and **Previous Response ID** `{{ $json.responseId }}`; the message can be anything, for example "connected". The platform checks the connection again on that turn: if the person connected, the agent goes on; if not, it is told so and may ask once more. Never answer the connect call yourself.
|
|
91
|
+
|
|
75
92
|
**Using n8n's OpenAI node instead.** With the OpenAI credential set up as below, *OpenAI › Message a Model* (n8n 1.117 or later) can call an agent too: pick the model **By ID** and enter `agent/<name>` or `agent/<name>@<label>`. That is fine for text-only turns with agents that never pause. It cannot attach files, and its default *Simplify* setting hides a paused run — the workflow receives empty output and carries on. The OpenAI *Chat Model* inside n8n's AI Agent is not supported for agents: with a streaming trigger it requests streaming, which the 2kw Responses API does not offer yet.
|
|
76
93
|
|
|
77
94
|
## Chat completions (via n8n's OpenAI node)
|
|
@@ -122,6 +139,8 @@ Prereleases publish under the `dev` dist-tag (`npm install n8n-nodes-2kw@dev`),
|
|
|
122
139
|
### Unreleased
|
|
123
140
|
- Added Agent › Send Message: agent and label pickers, file attachments, loud failure when the agent pauses for approval.
|
|
124
141
|
- Added Agent › Decide Approval: approve or reject every pending approval of a paused run and continue it. Send Message and Decide Approval gained `Return Paused Runs`, which returns an approval pause as an item with `pendingApprovals` instead of failing.
|
|
142
|
+
- Added the `Mode` option (Plan, Ask, Auto) to Agent › Send Message and Decide Approval, which sets the conversation mode, and `conversationMode` to the simplified output.
|
|
143
|
+
- A run paused on a connector the user must connect in chat.2kw.ai now fails with the connector's label, host and the Connectors link instead of "client-side tool mcp__<label>__connect". With Return Paused Runs on it is returned with `pendingConnections`; the simplified output of every paused run now carries `pendingConnections` (empty when none).
|
|
125
144
|
|
|
126
145
|
Entries below `1.0.0` predate npm publication and use the node's own numbering.
|
|
127
146
|
|
|
@@ -174,6 +193,8 @@ worth knowing:
|
|
|
174
193
|
|
|
175
194
|
Type drift check fails the build if `generated/openapi.d.ts` no longer matches `mcp/src/generated/openapi.d.ts`. Run `npm run sync-types` after any MCP regeneration. In a standalone checkout of the mirror there is no `mcp/` to compare against, so the check accepts the committed copy and the drift guard runs in the monorepo pipeline only.
|
|
176
195
|
|
|
196
|
+
The connect-pause decoder works the same way. `nodes/TwoKw/operations/connect-pause.ts` and `test/fixtures/connect-pause-cases.json` are copies of the CLI's `cli/src/lib/connect-pause.ts` and its golden fixture, so the CLI, the MCP server and this node read a paused run's connector requests by one rule. `npm test` runs `npm run check-connect-pause` first and fails when either copy has drifted; run `npm run sync-connect-pause` after changing the CLI's files, never edit the copies. The mirror has no `cli/` either, so there the check accepts the committed copies.
|
|
197
|
+
|
|
177
198
|
## License
|
|
178
199
|
|
|
179
200
|
MIT — see [LICENSE](LICENSE). Note that this applies to the n8n node package only; the rest of the 2kw.ai platform is proprietary.
|
|
@@ -9,7 +9,7 @@ const returnPausedRuns = {
|
|
|
9
9
|
name: 'returnPausedRuns',
|
|
10
10
|
type: 'boolean',
|
|
11
11
|
default: false,
|
|
12
|
-
description: 'Whether to return a run that pauses for approval as an item (status requires_action, with pendingApprovals) instead of failing, so Agent › Decide Approval can continue it',
|
|
12
|
+
description: 'Whether to return a run that pauses for approval or for a connector the user must connect in chat as an item (status requires_action, with pendingApprovals and pendingConnections) instead of failing, so Agent › Decide Approval or a Send Message with Previous Response ID can continue it',
|
|
13
13
|
};
|
|
14
14
|
const simplifyOutput = {
|
|
15
15
|
displayName: 'Simplify Output',
|
|
@@ -18,6 +18,22 @@ const simplifyOutput = {
|
|
|
18
18
|
default: true,
|
|
19
19
|
description: 'Whether to return text, status, IDs and usage instead of the raw response',
|
|
20
20
|
};
|
|
21
|
+
/**
|
|
22
|
+
* The end user's conversation mode (#656). Absent until added: a workflow that never adds it
|
|
23
|
+
* sends no backbone:mode item (S3 D2). Values sorted by name, as the node's other options are.
|
|
24
|
+
*/
|
|
25
|
+
const conversationMode = {
|
|
26
|
+
displayName: 'Mode',
|
|
27
|
+
name: 'mode',
|
|
28
|
+
type: 'options',
|
|
29
|
+
default: 'ask',
|
|
30
|
+
description: "Conversation mode for this and later turns of the conversation. Leave the option out to keep the conversation's mode.",
|
|
31
|
+
options: [
|
|
32
|
+
{ name: 'Ask', value: 'ask', description: 'No automatic approver. Calls that need approval wait for a person.' },
|
|
33
|
+
{ name: 'Auto', value: 'auto', description: "The operator's policy as written, automatic approver included" },
|
|
34
|
+
{ name: 'Plan', value: 'plan', description: 'Read only. Anything that could change something is refused.' },
|
|
35
|
+
],
|
|
36
|
+
};
|
|
21
37
|
exports.agentOperations = {
|
|
22
38
|
displayName: 'Operation',
|
|
23
39
|
name: 'operation',
|
|
@@ -119,6 +135,7 @@ exports.agentFields = [
|
|
|
119
135
|
default: '',
|
|
120
136
|
description: 'Continue an existing conversation',
|
|
121
137
|
},
|
|
138
|
+
conversationMode,
|
|
122
139
|
{
|
|
123
140
|
displayName: 'Previous Response ID',
|
|
124
141
|
name: 'previousResponseId',
|
|
@@ -176,7 +193,7 @@ exports.agentFields = [
|
|
|
176
193
|
placeholder: 'Add Option',
|
|
177
194
|
default: {},
|
|
178
195
|
displayOptions: { show: showDecideApproval },
|
|
179
|
-
options: [returnPausedRuns, simplifyOutput],
|
|
196
|
+
options: [conversationMode, returnPausedRuns, simplifyOutput],
|
|
180
197
|
},
|
|
181
198
|
];
|
|
182
199
|
//# sourceMappingURL=agent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.js","sourceRoot":"","sources":["../../../../nodes/TwoKw/descriptions/agent.ts"],"names":[],"mappings":";;;AAEA,MAAM,eAAe,GAAG,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,CAAC,aAAa,CAAC,EAAE,CAAC;AAC5E,MAAM,kBAAkB,GAAG,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,CAAC,gBAAgB,CAAC,EAAE,CAAC;AAClF,MAAM,YAAY,GAAG,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,CAAC,aAAa,EAAE,gBAAgB,CAAC,EAAE,CAAC;AAE3F,MAAM,gBAAgB,GAAoB;IACxC,WAAW,EAAE,oBAAoB;IACjC,IAAI,EAAE,kBAAkB;IACxB,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,KAAK;IACd,WAAW,EACT,
|
|
1
|
+
{"version":3,"file":"agent.js","sourceRoot":"","sources":["../../../../nodes/TwoKw/descriptions/agent.ts"],"names":[],"mappings":";;;AAEA,MAAM,eAAe,GAAG,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,CAAC,aAAa,CAAC,EAAE,CAAC;AAC5E,MAAM,kBAAkB,GAAG,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,CAAC,gBAAgB,CAAC,EAAE,CAAC;AAClF,MAAM,YAAY,GAAG,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,CAAC,aAAa,EAAE,gBAAgB,CAAC,EAAE,CAAC;AAE3F,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AAI,EAAE,kBAAkB,EAAE;QAC5C,WAAW,EACT,0HAA0H;QAC5H,OAAO,EAAE;YACP,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,iCAAiC,EAAE;YACzF,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,mDAAmD,EAAE;SAC1G;KACF;IACD;QACE,WAAW,EAAE,QAAQ;QACrB,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,cAAc,EAAE,EAAE,IAAI,EAAE,kBAAkB,EAAE;QAC5C,WAAW,EAAE,0EAA0E;KACxF;IACD;QACE,WAAW,EAAE,2BAA2B;QACxC,IAAI,EAAE,yBAAyB;QAC/B,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,KAAK;QACd,cAAc,EAAE,EAAE,IAAI,EAAE,EAAE,GAAG,kBAAkB,EAAE,QAAQ,EAAE,CAAC,SAAS,CAAC,EAAE,EAAE;QAC1E,WAAW,EACT,sJAAsJ;KACzJ;IACD;QACE,WAAW,EAAE,SAAS;QACtB,IAAI,EAAE,eAAe;QACrB,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,YAAY;QACzB,OAAO,EAAE,EAAE;QACX,cAAc,EAAE,EAAE,IAAI,EAAE,kBAAkB,EAAE;QAC5C,OAAO,EAAE,CAAC,gBAAgB,EAAE,gBAAgB,EAAE,cAAc,CAAC;KAC9D;CACF,CAAC"}
|
|
@@ -13,6 +13,10 @@ interface OutputItem {
|
|
|
13
13
|
arguments?: string;
|
|
14
14
|
policy_class?: string;
|
|
15
15
|
reason?: string | null;
|
|
16
|
+
call_id?: string;
|
|
17
|
+
server_label?: string;
|
|
18
|
+
host?: string;
|
|
19
|
+
destinations?: string[];
|
|
16
20
|
}
|
|
17
21
|
export interface AgentResponse {
|
|
18
22
|
id: string;
|
|
@@ -26,6 +30,7 @@ export interface AgentResponse {
|
|
|
26
30
|
conversation?: {
|
|
27
31
|
id?: string;
|
|
28
32
|
} | null;
|
|
33
|
+
conversation_mode?: string | null;
|
|
29
34
|
}
|
|
30
35
|
/** A `GET /v1/agents/{agentId}/approvals` row; only the fields a decision needs. */
|
|
31
36
|
interface ApprovalRow {
|
|
@@ -39,6 +44,16 @@ interface ApprovalRow {
|
|
|
39
44
|
export declare function buildAgentModel(ref: string, label: string): string;
|
|
40
45
|
/** Every assistant `output_text` part, in output order — the resource has no `output_text` field. */
|
|
41
46
|
export declare function responseText(response: AgentResponse): string;
|
|
47
|
+
/**
|
|
48
|
+
* The Connectors page of the chat web host that belongs to the credential's base URL. The host
|
|
49
|
+
* map is the CLI's, in the guarded copy `connect-pause.ts` (#807 R11, #1086).
|
|
50
|
+
*/
|
|
51
|
+
export declare function connectorsUrlFor(baseUrl: unknown): string;
|
|
52
|
+
/**
|
|
53
|
+
* The connectors a paused run waits on, in the workflow's shape (#807): what the CLI and the MCP
|
|
54
|
+
* server decode, with `destinations` null when there are none and the page to open beside each.
|
|
55
|
+
*/
|
|
56
|
+
export declare function pendingConnectionsJson(output: unknown, connectorsUrl: string): IDataObject[];
|
|
42
57
|
/**
|
|
43
58
|
* One `backbone:approval_response` per pending approval, with the backend's field
|
|
44
59
|
* names (ApprovalResponseItem). `remember` is sent only on an approval, and never for
|
|
@@ -2,11 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.buildAgentModel = buildAgentModel;
|
|
4
4
|
exports.responseText = responseText;
|
|
5
|
+
exports.connectorsUrlFor = connectorsUrlFor;
|
|
6
|
+
exports.pendingConnectionsJson = pendingConnectionsJson;
|
|
5
7
|
exports.approvalResponseItems = approvalResponseItems;
|
|
6
8
|
exports.gatewayError = gatewayError;
|
|
7
9
|
exports.executeAgent = executeAgent;
|
|
8
10
|
const n8n_workflow_1 = require("n8n-workflow");
|
|
9
11
|
const transport_1 = require("../transport");
|
|
12
|
+
const connect_pause_1 = require("./connect-pause");
|
|
10
13
|
/** `agent/<ref>` at the latest label (`agent/<ref>@` if the ref contains `@`), or `agent/<ref>@<label>`. */
|
|
11
14
|
function buildAgentModel(ref, label) {
|
|
12
15
|
if (label)
|
|
@@ -60,6 +63,17 @@ async function uploadAttachments(ctx, itemIndex, binaryProperties) {
|
|
|
60
63
|
}
|
|
61
64
|
const APPROVAL_REQUEST = 'backbone:approval_request';
|
|
62
65
|
const APPROVAL_RESPONSE = 'backbone:approval_response';
|
|
66
|
+
const MODE_ITEM = 'backbone:mode';
|
|
67
|
+
const CONVERSATION_MODES = ['plan', 'ask', 'auto'];
|
|
68
|
+
/** The `backbone:mode` item (S1 D7), appended last; nothing when the option was not added. */
|
|
69
|
+
function modeItems(mode) {
|
|
70
|
+
return mode ? [{ type: MODE_ITEM, mode }] : [];
|
|
71
|
+
}
|
|
72
|
+
/** The echoed `conversation_mode` (#656); an absent key or any other value reads as null. */
|
|
73
|
+
function conversationModeOf(response) {
|
|
74
|
+
const raw = response.conversation_mode;
|
|
75
|
+
return typeof raw === 'string' && CONVERSATION_MODES.includes(raw) ? raw : null;
|
|
76
|
+
}
|
|
63
77
|
/**
|
|
64
78
|
* Approval requests still waiting for a decision. Requests the auto-approver or a
|
|
65
79
|
* conversation grant already decided carry another status and are not pending (#634).
|
|
@@ -67,12 +81,33 @@ const APPROVAL_RESPONSE = 'backbone:approval_response';
|
|
|
67
81
|
function pendingApprovalItems(response) {
|
|
68
82
|
return (response.output ?? []).filter((item) => item.type === APPROVAL_REQUEST && item.status === 'in_progress');
|
|
69
83
|
}
|
|
70
|
-
|
|
84
|
+
/**
|
|
85
|
+
* The Connectors page of the chat web host that belongs to the credential's base URL. The host
|
|
86
|
+
* map is the CLI's, in the guarded copy `connect-pause.ts` (#807 R11, #1086).
|
|
87
|
+
*/
|
|
88
|
+
function connectorsUrlFor(baseUrl) {
|
|
89
|
+
return `${(0, connect_pause_1.chatOriginFor)(baseUrl)}/connectors`;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* The connectors a paused run waits on, in the workflow's shape (#807): what the CLI and the MCP
|
|
93
|
+
* server decode, with `destinations` null when there are none and the page to open beside each.
|
|
94
|
+
*/
|
|
95
|
+
function pendingConnectionsJson(output, connectorsUrl) {
|
|
96
|
+
return (0, connect_pause_1.pendingConnectionsOf)(output).map((connection) => ({
|
|
97
|
+
serverLabel: connection.serverLabel,
|
|
98
|
+
host: connection.host,
|
|
99
|
+
reason: connection.reason,
|
|
100
|
+
destinations: connection.destinations ?? null,
|
|
101
|
+
connectUrl: connectorsUrl,
|
|
102
|
+
}));
|
|
103
|
+
}
|
|
104
|
+
function simplify(response, connectorsUrl) {
|
|
71
105
|
const json = {
|
|
72
106
|
text: responseText(response),
|
|
73
107
|
status: response.status,
|
|
74
108
|
responseId: response.id,
|
|
75
109
|
conversationId: response.conversation?.id ?? null,
|
|
110
|
+
conversationMode: conversationModeOf(response),
|
|
76
111
|
model: response.model,
|
|
77
112
|
usage: response.usage ?? null,
|
|
78
113
|
};
|
|
@@ -87,16 +122,19 @@ function simplify(response) {
|
|
|
87
122
|
policyClass: item.policy_class ?? null,
|
|
88
123
|
reason: item.reason ?? null,
|
|
89
124
|
}));
|
|
125
|
+
json.pendingConnections = pendingConnectionsJson(response.output, connectorsUrl);
|
|
90
126
|
}
|
|
91
127
|
return json;
|
|
92
128
|
}
|
|
93
129
|
/**
|
|
94
130
|
* n8n runs agents unattended (spec D2): a turn that waits for a human or for a
|
|
95
131
|
* client-side tool fails the item loudly instead of reaching the workflow as
|
|
96
|
-
* empty output. With Return Paused Runs on, an approval pause
|
|
97
|
-
* item instead, for a later Decide
|
|
132
|
+
* empty output. With Return Paused Runs on, an approval pause or a connector
|
|
133
|
+
* connect pause (#807) is returned as an item instead, for a later Decide
|
|
134
|
+
* Approval (#660) or a Send Message with Previous Response ID; a relay pause
|
|
135
|
+
* still fails.
|
|
98
136
|
*/
|
|
99
|
-
function assertNotPaused(ctx, response, itemIndex, returnPausedRuns) {
|
|
137
|
+
function assertNotPaused(ctx, response, itemIndex, returnPausedRuns, connectorsUrl) {
|
|
100
138
|
if (response.status === 'completed' || response.status === 'incomplete')
|
|
101
139
|
return;
|
|
102
140
|
const output = response.output ?? [];
|
|
@@ -113,8 +151,25 @@ function assertNotPaused(ctx, response, itemIndex, returnPausedRuns) {
|
|
|
113
151
|
'or remove them from agents you call from n8n.',
|
|
114
152
|
});
|
|
115
153
|
}
|
|
154
|
+
// The connect call is in_progress like a relay call, but nobody answers it: the
|
|
155
|
+
// user connects in chat and the run is continued (#807, spec §8).
|
|
156
|
+
const connections = (0, connect_pause_1.pendingConnectionsOf)(response.output);
|
|
157
|
+
if (connections.length > 0) {
|
|
158
|
+
if (returnPausedRuns)
|
|
159
|
+
return;
|
|
160
|
+
const what = (0, connect_pause_1.connectionsPhrase)(connections);
|
|
161
|
+
throw new n8n_workflow_1.NodeOperationError(ctx.getNode(), `Agent paused until you ${what} in ${connectorsUrl}`, {
|
|
162
|
+
itemIndex,
|
|
163
|
+
description: `Response ${response.id} needs a connector signed in as a person: ${what}. ` +
|
|
164
|
+
`Open ${connectorsUrl} (chat.2kw.ai → Connectors) and do so, then continue the run with ` +
|
|
165
|
+
`Send Message and Previous Response ID ${response.id}. ` +
|
|
166
|
+
'Turn on Return Paused Runs to handle this pause in the workflow instead of failing.',
|
|
167
|
+
});
|
|
168
|
+
}
|
|
116
169
|
// Server tools that already ran precede the relay calls as completed
|
|
117
|
-
// function_call items; only the in_progress ones wait for the caller.
|
|
170
|
+
// function_call items; only the in_progress ones wait for the caller. No
|
|
171
|
+
// connect call is left here: the engine puts an open request in front of
|
|
172
|
+
// every connector's first connect call, and those returned or threw above.
|
|
118
173
|
const relays = output.filter((item) => item.type === 'function_call' && item.status === 'in_progress');
|
|
119
174
|
if (relays.length > 0) {
|
|
120
175
|
throw new n8n_workflow_1.NodeOperationError(ctx.getNode(), `Agent requested client-side tool ${relays.map((r) => r.name).join(', ')}, which n8n cannot execute`, {
|
|
@@ -125,9 +180,13 @@ function assertNotPaused(ctx, response, itemIndex, returnPausedRuns) {
|
|
|
125
180
|
}
|
|
126
181
|
throw new n8n_workflow_1.NodeOperationError(ctx.getNode(), `Agent run ended with unexpected status "${response.status}"`, { itemIndex, description: `Response ${response.id}.` });
|
|
127
182
|
}
|
|
128
|
-
function runResult(ctx, response, itemIndex, options) {
|
|
129
|
-
|
|
130
|
-
const
|
|
183
|
+
async function runResult(ctx, response, itemIndex, options) {
|
|
184
|
+
// Read only for a connect pause, the one case that names the chat web host.
|
|
185
|
+
const connectorsUrl = response.status === 'requires_action' && (0, connect_pause_1.pendingConnectionsOf)(response.output).length > 0
|
|
186
|
+
? connectorsUrlFor((await ctx.getCredentials('2kwApi')).baseUrl)
|
|
187
|
+
: connectorsUrlFor(undefined);
|
|
188
|
+
assertNotPaused(ctx, response, itemIndex, options.returnPausedRuns === true, connectorsUrl);
|
|
189
|
+
const json = options.simplify === false ? response : simplify(response, connectorsUrl);
|
|
131
190
|
return [{ json, pairedItem: itemIndex }];
|
|
132
191
|
}
|
|
133
192
|
async function sendMessage(ctx, itemIndex) {
|
|
@@ -141,7 +200,7 @@ async function sendMessage(ctx, itemIndex) {
|
|
|
141
200
|
}
|
|
142
201
|
const body = {
|
|
143
202
|
model: buildAgentModel(ref, label),
|
|
144
|
-
input: [{ type: 'message', role: 'user', content }],
|
|
203
|
+
input: [{ type: 'message', role: 'user', content }, ...modeItems(options.mode)],
|
|
145
204
|
};
|
|
146
205
|
const conversationId = options.conversationId?.trim();
|
|
147
206
|
const previousResponseId = options.previousResponseId?.trim();
|
|
@@ -296,7 +355,7 @@ async function decideApproval(ctx, itemIndex) {
|
|
|
296
355
|
const body = {
|
|
297
356
|
model: buildAgentModel(agentId, label),
|
|
298
357
|
previous_response_id: responseId,
|
|
299
|
-
input: approvalResponseItems(rows, decision, reason, remember),
|
|
358
|
+
input: [...approvalResponseItems(rows, decision, reason, remember), ...modeItems(options.mode)],
|
|
300
359
|
};
|
|
301
360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,aAAa;QAAE,OAAO,WAAW,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IACrE,IAAI,SAAS,KAAK,gBAAgB;QAAE,OAAO,cAAc,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IAC3E,MAAM,IAAI,iCAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,4BAA4B,SAAS,EAAE,EAAE;QACpF,SAAS;KACV,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The connect pause, decoded one way for every client (#1086, spec §4, D4): an open
|
|
3
|
+
* `backbone:connector_auth_request` (#807 R12) is a connector the run waits for the user to
|
|
4
|
+
* connect, allow or reconnect in chat.2kw.ai.
|
|
5
|
+
*
|
|
6
|
+
* This file is canonical. `mcp/src/lib/connect-pause.ts` and
|
|
7
|
+
* `n8n/nodes/TwoKw/operations/connect-pause.ts` are byte copies of it under a header: edit it
|
|
8
|
+
* here, then run `npm run sync:connect-pause` in mcp/ and `npm run sync-connect-pause` in n8n/.
|
|
9
|
+
* Its golden fixture, `cli/tests/fixtures/connect-pause-cases.json`, is copied the same way into
|
|
10
|
+
* mcp/, n8n/ and surface/, and every client's decoder test runs every case of it.
|
|
11
|
+
*
|
|
12
|
+
* Plain TypeScript with no imports, no `process`, no Node types and no timers, so n8n's source
|
|
13
|
+
* scanner and its empty `dependencies` accept the copy. The CLI and the MCP server keep their
|
|
14
|
+
* `AI_2KW_CHAT_URL` override in their own code, around {@link chatOriginFor}.
|
|
15
|
+
*/
|
|
16
|
+
/** Fallback chat.2kw.ai origin when the API host is not one we recognise. */
|
|
17
|
+
export declare const DEFAULT_CHAT_URL = "https://chat.2kw.ai";
|
|
18
|
+
/** Known API-host → chat web host mappings; a connect pause points the user there (#807 R11). */
|
|
19
|
+
export declare const CHAT_URL_BY_API_HOST: Readonly<Record<string, string>>;
|
|
20
|
+
/**
|
|
21
|
+
* The chat web host that belongs to an API base URL, where a member connects a connector
|
|
22
|
+
* (`<chat>/connectors`). An unknown host, an unparsable URL or no URL at all is chat.2kw.ai.
|
|
23
|
+
*/
|
|
24
|
+
export declare function chatOriginFor(baseUrl: unknown): string;
|
|
25
|
+
/** What the user is asked to do: connect, allow the agent, or reconnect. */
|
|
26
|
+
export type ConnectReason = "connect" | "allow" | "reconnect";
|
|
27
|
+
export declare const CONNECT_REASONS: readonly ConnectReason[];
|
|
28
|
+
/**
|
|
29
|
+
* One open connect request. `id` (`cauth_<call id>`) and `callId` (the first connect call for
|
|
30
|
+
* this connector) are what a client needs to withhold the connect calls; the CLI and the MCP
|
|
31
|
+
* server drop both from what they publish.
|
|
32
|
+
*/
|
|
33
|
+
export interface PendingConnection {
|
|
34
|
+
id: string;
|
|
35
|
+
callId: string;
|
|
36
|
+
serverLabel: string;
|
|
37
|
+
/** The MCP server's host: what the user is asked to connect to. */
|
|
38
|
+
host: string;
|
|
39
|
+
reason: ConnectReason;
|
|
40
|
+
/** The egress difference an allow is asked again for (#807 R9); absent otherwise, never empty. */
|
|
41
|
+
destinations?: string[];
|
|
42
|
+
}
|
|
43
|
+
/** Enough of a connection to name it in a sentence. */
|
|
44
|
+
export interface ConnectTarget {
|
|
45
|
+
serverLabel: string;
|
|
46
|
+
host: string;
|
|
47
|
+
reason: string;
|
|
48
|
+
}
|
|
49
|
+
/** The synthetic tool a connector's connect pause is raised through (#806). */
|
|
50
|
+
export declare function connectToolName(serverLabel: string): string;
|
|
51
|
+
/**
|
|
52
|
+
* The connectors a response's `output` still waits on: every `in_progress` connect request whose
|
|
53
|
+
* id no other-status projection in the same list resolved, one per id, in order. An item without
|
|
54
|
+
* a non-empty `id`, `call_id`, `server_label` or `host` cannot be acted on and is skipped; a
|
|
55
|
+
* `reason` outside the three reads as `connect`, the action that always applies; only the string
|
|
56
|
+
* entries of `destinations` are kept, and none at all omits the field.
|
|
57
|
+
*/
|
|
58
|
+
export declare function pendingConnectionsOf(output: unknown): PendingConnection[];
|
|
59
|
+
/**
|
|
60
|
+
* The call ids a connect pause withholds from the caller: the call each pending request names;
|
|
61
|
+
* the own `call_id` of every open connect request, even one {@link pendingConnectionsOf} could not
|
|
62
|
+
* describe (a missing `server_label` or `host`), since a connect call is the engine's to answer,
|
|
63
|
+
* never the client's (R7); and every `mcp__<label>__connect` call for a connector in
|
|
64
|
+
* `connections` (the model may call it more than once; one request stands for all of them).
|
|
65
|
+
*/
|
|
66
|
+
export declare function connectCallIds(output: unknown, connections: readonly Pick<PendingConnection, "callId" | "serverLabel">[]): Set<string>;
|
|
67
|
+
/** "connect erp (erp.example.com)", "allow the agent to use …" or "reconnect …". */
|
|
68
|
+
export declare function connectionPhrase(c: ConnectTarget): string;
|
|
69
|
+
/** "connect a (h), allow the agent to use b (h) and reconnect c (h)"; empty for none. */
|
|
70
|
+
export declare function connectionsPhrase(connections: readonly ConnectTarget[]): string;
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// GENERATED COPY of cli/src/lib/connect-pause.ts (#1086). Do not edit here: edit the CLI's file,
|
|
3
|
+
// then run `npm run sync-connect-pause` in n8n/. `npm run check-connect-pause` fails on any drift.
|
|
4
|
+
/**
|
|
5
|
+
* The connect pause, decoded one way for every client (#1086, spec §4, D4): an open
|
|
6
|
+
* `backbone:connector_auth_request` (#807 R12) is a connector the run waits for the user to
|
|
7
|
+
* connect, allow or reconnect in chat.2kw.ai.
|
|
8
|
+
*
|
|
9
|
+
* This file is canonical. `mcp/src/lib/connect-pause.ts` and
|
|
10
|
+
* `n8n/nodes/TwoKw/operations/connect-pause.ts` are byte copies of it under a header: edit it
|
|
11
|
+
* here, then run `npm run sync:connect-pause` in mcp/ and `npm run sync-connect-pause` in n8n/.
|
|
12
|
+
* Its golden fixture, `cli/tests/fixtures/connect-pause-cases.json`, is copied the same way into
|
|
13
|
+
* mcp/, n8n/ and surface/, and every client's decoder test runs every case of it.
|
|
14
|
+
*
|
|
15
|
+
* Plain TypeScript with no imports, no `process`, no Node types and no timers, so n8n's source
|
|
16
|
+
* scanner and its empty `dependencies` accept the copy. The CLI and the MCP server keep their
|
|
17
|
+
* `AI_2KW_CHAT_URL` override in their own code, around {@link chatOriginFor}.
|
|
18
|
+
*/
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
exports.CONNECT_REASONS = exports.CHAT_URL_BY_API_HOST = exports.DEFAULT_CHAT_URL = void 0;
|
|
21
|
+
exports.chatOriginFor = chatOriginFor;
|
|
22
|
+
exports.connectToolName = connectToolName;
|
|
23
|
+
exports.pendingConnectionsOf = pendingConnectionsOf;
|
|
24
|
+
exports.connectCallIds = connectCallIds;
|
|
25
|
+
exports.connectionPhrase = connectionPhrase;
|
|
26
|
+
exports.connectionsPhrase = connectionsPhrase;
|
|
27
|
+
/** Fallback chat.2kw.ai origin when the API host is not one we recognise. */
|
|
28
|
+
exports.DEFAULT_CHAT_URL = "https://chat.2kw.ai";
|
|
29
|
+
/** Known API-host → chat web host mappings; a connect pause points the user there (#807 R11). */
|
|
30
|
+
exports.CHAT_URL_BY_API_HOST = {
|
|
31
|
+
"api.2kw.ai": "https://chat.2kw.ai",
|
|
32
|
+
"api-dev.2kw.ai": "https://chat-dev.2kw.ai",
|
|
33
|
+
"backbone.manfred-kunze.dev": "https://chat.2kw.ai",
|
|
34
|
+
"localhost:8080": "http://localhost:3000",
|
|
35
|
+
"127.0.0.1:8080": "http://localhost:3000",
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* The chat web host that belongs to an API base URL, where a member connects a connector
|
|
39
|
+
* (`<chat>/connectors`). An unknown host, an unparsable URL or no URL at all is chat.2kw.ai.
|
|
40
|
+
*/
|
|
41
|
+
function chatOriginFor(baseUrl) {
|
|
42
|
+
try {
|
|
43
|
+
const host = new URL(String(baseUrl ?? "")).host;
|
|
44
|
+
// hasOwn, not a bare index: a host named after an Object.prototype key must not resolve.
|
|
45
|
+
return Object.hasOwn(exports.CHAT_URL_BY_API_HOST, host) ? exports.CHAT_URL_BY_API_HOST[host] ?? exports.DEFAULT_CHAT_URL : exports.DEFAULT_CHAT_URL;
|
|
46
|
+
}
|
|
47
|
+
catch {
|
|
48
|
+
return exports.DEFAULT_CHAT_URL;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
exports.CONNECT_REASONS = ["connect", "allow", "reconnect"];
|
|
52
|
+
const CONNECT_REQUEST = "backbone:connector_auth_request";
|
|
53
|
+
function itemsOf(output) {
|
|
54
|
+
if (!Array.isArray(output))
|
|
55
|
+
return [];
|
|
56
|
+
return output.filter((item) => typeof item === "object" && item !== null && !Array.isArray(item));
|
|
57
|
+
}
|
|
58
|
+
function text(value) {
|
|
59
|
+
return typeof value === "string" && value.length > 0 ? value : undefined;
|
|
60
|
+
}
|
|
61
|
+
/** The synthetic tool a connector's connect pause is raised through (#806). */
|
|
62
|
+
function connectToolName(serverLabel) {
|
|
63
|
+
return `mcp__${serverLabel}__connect`;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* The connectors a response's `output` still waits on: every `in_progress` connect request whose
|
|
67
|
+
* id no other-status projection in the same list resolved, one per id, in order. An item without
|
|
68
|
+
* a non-empty `id`, `call_id`, `server_label` or `host` cannot be acted on and is skipped; a
|
|
69
|
+
* `reason` outside the three reads as `connect`, the action that always applies; only the string
|
|
70
|
+
* entries of `destinations` are kept, and none at all omits the field.
|
|
71
|
+
*/
|
|
72
|
+
function pendingConnectionsOf(output) {
|
|
73
|
+
const items = itemsOf(output);
|
|
74
|
+
const resolved = new Set();
|
|
75
|
+
for (const item of items) {
|
|
76
|
+
const id = text(item.id);
|
|
77
|
+
if (item.type === CONNECT_REQUEST && id && item.status !== "in_progress")
|
|
78
|
+
resolved.add(id);
|
|
79
|
+
}
|
|
80
|
+
const pending = new Map();
|
|
81
|
+
for (const item of items) {
|
|
82
|
+
if (item.type !== CONNECT_REQUEST || item.status !== "in_progress")
|
|
83
|
+
continue;
|
|
84
|
+
const id = text(item.id);
|
|
85
|
+
const callId = text(item.call_id);
|
|
86
|
+
const serverLabel = text(item.server_label);
|
|
87
|
+
const host = text(item.host);
|
|
88
|
+
if (!id || !callId || !serverLabel || !host || resolved.has(id) || pending.has(id))
|
|
89
|
+
continue;
|
|
90
|
+
const reason = text(item.reason);
|
|
91
|
+
const destinations = Array.isArray(item.destinations)
|
|
92
|
+
? item.destinations.filter((entry) => typeof entry === "string")
|
|
93
|
+
: [];
|
|
94
|
+
pending.set(id, {
|
|
95
|
+
id,
|
|
96
|
+
callId,
|
|
97
|
+
serverLabel,
|
|
98
|
+
host,
|
|
99
|
+
reason: reason && exports.CONNECT_REASONS.includes(reason) ? reason : "connect",
|
|
100
|
+
...(destinations.length > 0 ? { destinations } : {}),
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
return [...pending.values()];
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* The call ids a connect pause withholds from the caller: the call each pending request names;
|
|
107
|
+
* the own `call_id` of every open connect request, even one {@link pendingConnectionsOf} could not
|
|
108
|
+
* describe (a missing `server_label` or `host`), since a connect call is the engine's to answer,
|
|
109
|
+
* never the client's (R7); and every `mcp__<label>__connect` call for a connector in
|
|
110
|
+
* `connections` (the model may call it more than once; one request stands for all of them).
|
|
111
|
+
*/
|
|
112
|
+
function connectCallIds(output, connections) {
|
|
113
|
+
const names = new Set(connections.map((c) => connectToolName(c.serverLabel)));
|
|
114
|
+
const ids = new Set(connections.map((c) => c.callId));
|
|
115
|
+
const items = itemsOf(output);
|
|
116
|
+
// Every open connect request's own call id is withheld, even one pendingConnectionsOf could
|
|
117
|
+
// not fully describe (a missing server_label or host): the paired function_call must never be
|
|
118
|
+
// left for the caller to fabricate an output for (R7).
|
|
119
|
+
const resolved = new Set();
|
|
120
|
+
for (const item of items) {
|
|
121
|
+
const id = text(item.id);
|
|
122
|
+
if (item.type === CONNECT_REQUEST && id && item.status !== "in_progress")
|
|
123
|
+
resolved.add(id);
|
|
124
|
+
}
|
|
125
|
+
for (const item of items) {
|
|
126
|
+
if (item.type !== CONNECT_REQUEST || item.status !== "in_progress")
|
|
127
|
+
continue;
|
|
128
|
+
const id = text(item.id);
|
|
129
|
+
if (id && resolved.has(id))
|
|
130
|
+
continue;
|
|
131
|
+
const callId = text(item.call_id);
|
|
132
|
+
if (callId)
|
|
133
|
+
ids.add(callId);
|
|
134
|
+
}
|
|
135
|
+
for (const item of items) {
|
|
136
|
+
const callId = text(item.call_id);
|
|
137
|
+
if (item.type === "function_call" && callId && typeof item.name === "string" && names.has(item.name))
|
|
138
|
+
ids.add(callId);
|
|
139
|
+
}
|
|
140
|
+
return ids;
|
|
141
|
+
}
|
|
142
|
+
/** "connect erp (erp.example.com)", "allow the agent to use …" or "reconnect …". */
|
|
143
|
+
function connectionPhrase(c) {
|
|
144
|
+
const target = `${c.serverLabel} (${c.host})`;
|
|
145
|
+
if (c.reason === "allow")
|
|
146
|
+
return `allow the agent to use ${target}`;
|
|
147
|
+
if (c.reason === "reconnect")
|
|
148
|
+
return `reconnect ${target}`;
|
|
149
|
+
return `connect ${target}`;
|
|
150
|
+
}
|
|
151
|
+
/** "connect a (h), allow the agent to use b (h) and reconnect c (h)"; empty for none. */
|
|
152
|
+
function connectionsPhrase(connections) {
|
|
153
|
+
const phrases = connections.map(connectionPhrase);
|
|
154
|
+
if (phrases.length < 2)
|
|
155
|
+
return phrases[0] ?? "";
|
|
156
|
+
return `${phrases.slice(0, -1).join(", ")} and ${phrases[phrases.length - 1]}`;
|
|
157
|
+
}
|
|
158
|
+
//# sourceMappingURL=connect-pause.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connect-pause.js","sourceRoot":"","sources":["../../../../nodes/TwoKw/operations/connect-pause.ts"],"names":[],"mappings":";AAAA,iGAAiG;AACjG,mGAAmG;AACnG;;;;;;;;;;;;;;GAcG;;;AAkBH,sCAQC;AA4CD,0CAEC;AASD,oDA6BC;AASD,wCA2BC;AAGD,4CAKC;AAGD,8CAIC;AA/JD,6EAA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CAAC;IAC3D,OAAO,WAAW,MAAM,EAAE,CAAC;AAC7B,CAAC;AAED,yFAAyF;AACzF,SAAgB,iBAAiB,CAAC,WAAqC;IACrE,MAAM,OAAO,GAAG,WAAW,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;IAClD,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAChD,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC;AACjF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "n8n-nodes-2kw",
|
|
3
|
-
"version": "6.3.0-dev.
|
|
3
|
+
"version": "6.3.0-dev.122",
|
|
4
4
|
"description": "n8n community node for the 2kw.ai platform (engineering name: Backbone)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -24,10 +24,12 @@
|
|
|
24
24
|
"dev": "tsc --watch",
|
|
25
25
|
"lint": "tsc --noEmit && npm run scan",
|
|
26
26
|
"scan": "node scripts/scan-source.mjs",
|
|
27
|
-
"test": "npm run check-types && vitest run",
|
|
27
|
+
"test": "npm run check-types && npm run check-connect-pause && vitest run",
|
|
28
28
|
"test:watch": "vitest",
|
|
29
29
|
"sync-types": "tsx scripts/sync-openapi-types.ts",
|
|
30
30
|
"check-types": "tsx scripts/sync-openapi-types.ts --check",
|
|
31
|
+
"sync-connect-pause": "tsx scripts/sync-connect-pause.ts",
|
|
32
|
+
"check-connect-pause": "tsx scripts/sync-connect-pause.ts --check",
|
|
31
33
|
"prepublishOnly": "npm run build"
|
|
32
34
|
},
|
|
33
35
|
"files": [
|