@loomcycle/n8n-nodes-loomcycle 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/LICENSE +201 -0
- package/README.md +190 -0
- package/dist/credentials/LoomCycleApi.credentials.d.ts +21 -0
- package/dist/credentials/LoomCycleApi.credentials.js +81 -0
- package/dist/credentials/LoomCycleApi.credentials.js.map +1 -0
- package/dist/nodes/LoomCycle/LoomCycle.node.d.ts +22 -0
- package/dist/nodes/LoomCycle/LoomCycle.node.js +403 -0
- package/dist/nodes/LoomCycle/LoomCycle.node.js.map +1 -0
- package/dist/nodes/LoomCycle/LoomCycle.node.json +13 -0
- package/dist/nodes/LoomCycle/LoomCycle.svg +13 -0
- package/dist/nodes/LoomCycle/descriptions/agentdef.d.ts +21 -0
- package/dist/nodes/LoomCycle/descriptions/agentdef.js +155 -0
- package/dist/nodes/LoomCycle/descriptions/agentdef.js.map +1 -0
- package/dist/nodes/LoomCycle/descriptions/channels.d.ts +19 -0
- package/dist/nodes/LoomCycle/descriptions/channels.js +164 -0
- package/dist/nodes/LoomCycle/descriptions/channels.js.map +1 -0
- package/dist/nodes/LoomCycle/descriptions/index.d.ts +6 -0
- package/dist/nodes/LoomCycle/descriptions/index.js +16 -0
- package/dist/nodes/LoomCycle/descriptions/index.js.map +1 -0
- package/dist/nodes/LoomCycle/descriptions/mcpserverdef.d.ts +29 -0
- package/dist/nodes/LoomCycle/descriptions/mcpserverdef.js +241 -0
- package/dist/nodes/LoomCycle/descriptions/mcpserverdef.js.map +1 -0
- package/dist/nodes/LoomCycle/descriptions/memory.d.ts +20 -0
- package/dist/nodes/LoomCycle/descriptions/memory.js +119 -0
- package/dist/nodes/LoomCycle/descriptions/memory.js.map +1 -0
- package/dist/nodes/LoomCycle/descriptions/runs.d.ts +17 -0
- package/dist/nodes/LoomCycle/descriptions/runs.js +226 -0
- package/dist/nodes/LoomCycle/descriptions/runs.js.map +1 -0
- package/dist/nodes/LoomCycle/descriptions/skilldef.d.ts +10 -0
- package/dist/nodes/LoomCycle/descriptions/skilldef.js +144 -0
- package/dist/nodes/LoomCycle/descriptions/skilldef.js.map +1 -0
- package/dist/nodes/LoomCycle/helpers/capability.d.ts +42 -0
- package/dist/nodes/LoomCycle/helpers/capability.js +54 -0
- package/dist/nodes/LoomCycle/helpers/capability.js.map +1 -0
- package/dist/nodes/LoomCycle/helpers/client.d.ts +15 -0
- package/dist/nodes/LoomCycle/helpers/client.js +30 -0
- package/dist/nodes/LoomCycle/helpers/client.js.map +1 -0
- package/dist/nodes/LoomCycle/helpers/envVarHints.d.ts +30 -0
- package/dist/nodes/LoomCycle/helpers/envVarHints.js +67 -0
- package/dist/nodes/LoomCycle/helpers/envVarHints.js.map +1 -0
- package/dist/nodes/LoomCycle/helpers/errors.d.ts +23 -0
- package/dist/nodes/LoomCycle/helpers/errors.js +189 -0
- package/dist/nodes/LoomCycle/helpers/errors.js.map +1 -0
- package/dist/nodes/LoomCycle/helpers/loadOptions.d.ts +24 -0
- package/dist/nodes/LoomCycle/helpers/loadOptions.js +89 -0
- package/dist/nodes/LoomCycle/helpers/loadOptions.js.map +1 -0
- package/dist/nodes/LoomCycle/helpers/segments.d.ts +13 -0
- package/dist/nodes/LoomCycle/helpers/segments.js +31 -0
- package/dist/nodes/LoomCycle/helpers/segments.js.map +1 -0
- package/dist/nodes/LoomCycle/helpers/staticData.d.ts +5 -0
- package/dist/nodes/LoomCycle/helpers/staticData.js +31 -0
- package/dist/nodes/LoomCycle/helpers/staticData.js.map +1 -0
- package/dist/nodes/LoomCycle/helpers/streaming.d.ts +31 -0
- package/dist/nodes/LoomCycle/helpers/streaming.js +48 -0
- package/dist/nodes/LoomCycle/helpers/streaming.js.map +1 -0
- package/dist/nodes/LoomCycleChannelMessage/LoomCycleChannelMessage.node.d.ts +24 -0
- package/dist/nodes/LoomCycleChannelMessage/LoomCycleChannelMessage.node.js +162 -0
- package/dist/nodes/LoomCycleChannelMessage/LoomCycleChannelMessage.node.js.map +1 -0
- package/dist/nodes/LoomCycleChannelMessage/LoomCycleChannelMessage.node.json +13 -0
- package/dist/nodes/LoomCycleChannelMessage/LoomCycleChannelMessage.svg +9 -0
- package/dist/nodes/LoomCycleChannelMessage/helpers/subscribe.d.ts +20 -0
- package/dist/nodes/LoomCycleChannelMessage/helpers/subscribe.js +106 -0
- package/dist/nodes/LoomCycleChannelMessage/helpers/subscribe.js.map +1 -0
- package/dist/nodes/LoomCycleChannelTool/LoomCycleChannelTool.node.d.ts +5 -0
- package/dist/nodes/LoomCycleChannelTool/LoomCycleChannelTool.node.js +114 -0
- package/dist/nodes/LoomCycleChannelTool/LoomCycleChannelTool.node.js.map +1 -0
- package/dist/nodes/LoomCycleChannelTool/LoomCycleChannelTool.node.json +13 -0
- package/dist/nodes/LoomCycleChannelTool/LoomCycleChannelTool.svg +13 -0
- package/dist/nodes/LoomCycleMcpServerTool/LoomCycleMcpServerTool.node.d.ts +5 -0
- package/dist/nodes/LoomCycleMcpServerTool/LoomCycleMcpServerTool.node.js +259 -0
- package/dist/nodes/LoomCycleMcpServerTool/LoomCycleMcpServerTool.node.js.map +1 -0
- package/dist/nodes/LoomCycleMcpServerTool/LoomCycleMcpServerTool.node.json +13 -0
- package/dist/nodes/LoomCycleMcpServerTool/LoomCycleMcpServerTool.svg +14 -0
- package/dist/nodes/LoomCycleMemoryTool/LoomCycleMemoryTool.node.d.ts +5 -0
- package/dist/nodes/LoomCycleMemoryTool/LoomCycleMemoryTool.node.js +108 -0
- package/dist/nodes/LoomCycleMemoryTool/LoomCycleMemoryTool.node.js.map +1 -0
- package/dist/nodes/LoomCycleMemoryTool/LoomCycleMemoryTool.node.json +13 -0
- package/dist/nodes/LoomCycleMemoryTool/LoomCycleMemoryTool.svg +11 -0
- package/dist/nodes/LoomCycleRunCompleted/LoomCycleRunCompleted.node.d.ts +18 -0
- package/dist/nodes/LoomCycleRunCompleted/LoomCycleRunCompleted.node.js +188 -0
- package/dist/nodes/LoomCycleRunCompleted/LoomCycleRunCompleted.node.js.map +1 -0
- package/dist/nodes/LoomCycleRunCompleted/LoomCycleRunCompleted.node.json +13 -0
- package/dist/nodes/LoomCycleRunCompleted/LoomCycleRunCompleted.svg +10 -0
- package/dist/nodes/LoomCycleRunCompleted/helpers/poll.d.ts +12 -0
- package/dist/nodes/LoomCycleRunCompleted/helpers/poll.js +69 -0
- package/dist/nodes/LoomCycleRunCompleted/helpers/poll.js.map +1 -0
- package/dist/nodes/LoomCycleRunCompleted/helpers/sse.d.ts +29 -0
- package/dist/nodes/LoomCycleRunCompleted/helpers/sse.js +61 -0
- package/dist/nodes/LoomCycleRunCompleted/helpers/sse.js.map +1 -0
- package/dist/nodes/LoomCycleSubAgentTool/LoomCycleSubAgentTool.node.d.ts +5 -0
- package/dist/nodes/LoomCycleSubAgentTool/LoomCycleSubAgentTool.node.js +131 -0
- package/dist/nodes/LoomCycleSubAgentTool/LoomCycleSubAgentTool.node.js.map +1 -0
- package/dist/nodes/LoomCycleSubAgentTool/LoomCycleSubAgentTool.node.json +13 -0
- package/dist/nodes/LoomCycleSubAgentTool/LoomCycleSubAgentTool.svg +12 -0
- package/dist/nodes/_shared/clusterTool.d.ts +19 -0
- package/dist/nodes/_shared/clusterTool.js +36 -0
- package/dist/nodes/_shared/clusterTool.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +86 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Helpers for the MCPServerDef Register UI's "Required env vars on
|
|
4
|
+
* loomcycle" hint. Loomcycle's wire path substitutes `${LOOMCYCLE_FOO}`
|
|
5
|
+
* tokens in header values at request time using its own env (operator-
|
|
6
|
+
* managed); the n8n node never transmits a plaintext credential, only
|
|
7
|
+
* the template string. This module extracts the token names from a
|
|
8
|
+
* header collection so the node UI can render a "set these on the
|
|
9
|
+
* loomcycle deployment" reminder.
|
|
10
|
+
*
|
|
11
|
+
* See doc-internal/mcp-server-def-cross-repo.md §"The env-var-mirror UX
|
|
12
|
+
* gap" for the full rationale.
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.extractEnvVarNames = extractEnvVarNames;
|
|
16
|
+
exports.extractEnvVarsFromHeaders = extractEnvVarsFromHeaders;
|
|
17
|
+
exports.formatEnvVarHint = formatEnvVarHint;
|
|
18
|
+
const ENV_TOKEN_RE = /\$\{(LOOMCYCLE_[A-Z0-9_]+)(?::-[^}]*)?\}/g;
|
|
19
|
+
/**
|
|
20
|
+
* Extract unique `${LOOMCYCLE_*}` env-var names referenced from a string.
|
|
21
|
+
* Supports the default-fallback form `${LOOMCYCLE_FOO:-default}` per the
|
|
22
|
+
* loomcycle v0.8.14 substitution grammar; the default value itself is
|
|
23
|
+
* ignored (loomcycle uses it; the operator still has to set the env to
|
|
24
|
+
* override).
|
|
25
|
+
*/
|
|
26
|
+
function extractEnvVarNames(text) {
|
|
27
|
+
if (!text)
|
|
28
|
+
return [];
|
|
29
|
+
const seen = new Set();
|
|
30
|
+
for (const match of text.matchAll(ENV_TOKEN_RE)) {
|
|
31
|
+
seen.add(match[1]);
|
|
32
|
+
}
|
|
33
|
+
return Array.from(seen).sort();
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Extract env-var names from the typical "headers" n8n fixedCollection
|
|
37
|
+
* shape (`{ header: [{ name, value }, ...] }`).
|
|
38
|
+
*/
|
|
39
|
+
function extractEnvVarsFromHeaders(headers) {
|
|
40
|
+
if (!headers || typeof headers !== 'object')
|
|
41
|
+
return [];
|
|
42
|
+
const headerCollection = headers.header;
|
|
43
|
+
if (!Array.isArray(headerCollection))
|
|
44
|
+
return [];
|
|
45
|
+
const seen = new Set();
|
|
46
|
+
for (const entry of headerCollection) {
|
|
47
|
+
if (!entry || typeof entry !== 'object')
|
|
48
|
+
continue;
|
|
49
|
+
const value = entry.value;
|
|
50
|
+
if (typeof value !== 'string')
|
|
51
|
+
continue;
|
|
52
|
+
for (const name of extractEnvVarNames(value)) {
|
|
53
|
+
seen.add(name);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return Array.from(seen).sort();
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Compose the human-readable hint string the node UI surfaces under
|
|
60
|
+
* the Headers field. Empty when no env-var tokens are referenced.
|
|
61
|
+
*/
|
|
62
|
+
function formatEnvVarHint(names) {
|
|
63
|
+
if (names.length === 0)
|
|
64
|
+
return '';
|
|
65
|
+
return `Required env vars on the loomcycle deployment: ${names.join(', ')}. Set these in loomcycle's environment before registering; they substitute into the header values at request time.`;
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=envVarHints.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"envVarHints.js","sourceRoot":"","sources":["../../../../nodes/LoomCycle/helpers/envVarHints.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;AAWH,gDAOC;AAMD,8DAcC;AAMD,4CAGC;AA7CD,MAAM,YAAY,GAAG,2CAA2C,CAAC;AAEjE;;;;;;GAMG;AACH,SAAgB,kBAAkB,CAAC,IAAY;IAC9C,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,CAAC;IACrB,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC;QACjD,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC;AAChC,CAAC;AAED;;;GAGG;AACH,SAAgB,yBAAyB,CAAC,OAAgB;IACzD,IAAI,CAAC,OAAO,IAAI,OAAO,OAAO,KAAK,QAAQ;QAAE,OAAO,EAAE,CAAC;IACvD,MAAM,gBAAgB,GAAI,OAAgC,CAAC,MAAM,CAAC;IAClE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,gBAAgB,CAAC;QAAE,OAAO,EAAE,CAAC;IAChD,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,KAAK,MAAM,KAAK,IAAI,gBAAgB,EAAE,CAAC;QACtC,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ;YAAE,SAAS;QAClD,MAAM,KAAK,GAAI,KAA6B,CAAC,KAAK,CAAC;QACnD,IAAI,OAAO,KAAK,KAAK,QAAQ;YAAE,SAAS;QACxC,KAAK,MAAM,IAAI,IAAI,kBAAkB,CAAC,KAAK,CAAC,EAAE,CAAC;YAC9C,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAChB,CAAC;IACF,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC;AAChC,CAAC;AAED;;;GAGG;AACH,SAAgB,gBAAgB,CAAC,KAAe;IAC/C,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAClC,OAAO,kDAAkD,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,oHAAoH,CAAC;AAC/L,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { INode } from 'n8n-workflow';
|
|
2
|
+
/**
|
|
3
|
+
* Redact anything that LOOKS like a bearer token from a body string before
|
|
4
|
+
* surfacing it in NodeApiError.description (which renders in the n8n
|
|
5
|
+
* execution-log UI). CLAUDE.md §security.6: the bearer never leaks.
|
|
6
|
+
*
|
|
7
|
+
* Patterns covered:
|
|
8
|
+
* - `Authorization: Bearer <token>` (case-insensitive)
|
|
9
|
+
* - bare `Bearer <token>` substrings
|
|
10
|
+
* - sk-* / lck-* / ant- style API-key-like tokens (best-effort defence in
|
|
11
|
+
* depth; loomcycle bearers don't match these but operators may set
|
|
12
|
+
* bearer values that do)
|
|
13
|
+
*/
|
|
14
|
+
export declare function redactBearerFragments(body: string): string;
|
|
15
|
+
/**
|
|
16
|
+
* Map a `@loomcycle/client` typed error onto an n8n-flavoured error that
|
|
17
|
+
* renders well in the editor UI. The mapping is intentionally broad — every
|
|
18
|
+
* downstream wire call funnels through this single function so the
|
|
19
|
+
* credential-boundary-redaction rule lives in one place.
|
|
20
|
+
*
|
|
21
|
+
* Non-loomcycle errors pass through unchanged.
|
|
22
|
+
*/
|
|
23
|
+
export declare function wrapLoomcycleError(err: unknown, node: INode): Error;
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.redactBearerFragments = redactBearerFragments;
|
|
4
|
+
exports.wrapLoomcycleError = wrapLoomcycleError;
|
|
5
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
6
|
+
const client_1 = require("@loomcycle/client");
|
|
7
|
+
/**
|
|
8
|
+
* Redact anything that LOOKS like a bearer token from a body string before
|
|
9
|
+
* surfacing it in NodeApiError.description (which renders in the n8n
|
|
10
|
+
* execution-log UI). CLAUDE.md §security.6: the bearer never leaks.
|
|
11
|
+
*
|
|
12
|
+
* Patterns covered:
|
|
13
|
+
* - `Authorization: Bearer <token>` (case-insensitive)
|
|
14
|
+
* - bare `Bearer <token>` substrings
|
|
15
|
+
* - sk-* / lck-* / ant- style API-key-like tokens (best-effort defence in
|
|
16
|
+
* depth; loomcycle bearers don't match these but operators may set
|
|
17
|
+
* bearer values that do)
|
|
18
|
+
*/
|
|
19
|
+
function redactBearerFragments(body) {
|
|
20
|
+
if (!body)
|
|
21
|
+
return body;
|
|
22
|
+
return body
|
|
23
|
+
.replace(/Authorization\s*:\s*Bearer\s+[\w.~+/=-]+/gi, 'Authorization: Bearer [REDACTED]')
|
|
24
|
+
.replace(/Bearer\s+[\w.~+/=-]{8,}/gi, 'Bearer [REDACTED]')
|
|
25
|
+
.replace(/\b(?:sk|lck|ant|sk-ant|sk-proj)-[\w-]{12,}/gi, '[REDACTED]');
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Map a `@loomcycle/client` typed error onto an n8n-flavoured error that
|
|
29
|
+
* renders well in the editor UI. The mapping is intentionally broad — every
|
|
30
|
+
* downstream wire call funnels through this single function so the
|
|
31
|
+
* credential-boundary-redaction rule lives in one place.
|
|
32
|
+
*
|
|
33
|
+
* Non-loomcycle errors pass through unchanged.
|
|
34
|
+
*/
|
|
35
|
+
function wrapLoomcycleError(err, node) {
|
|
36
|
+
if (err instanceof client_1.AuthError) {
|
|
37
|
+
return new n8n_workflow_1.NodeApiError(node, jsonifyError(err), {
|
|
38
|
+
message: 'Authentication failed',
|
|
39
|
+
description: 'The bearer token in the LoomCycle API credential was rejected. Check Settings → Credentials.',
|
|
40
|
+
httpCode: '401',
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
if (err instanceof client_1.AgentNotFoundError) {
|
|
44
|
+
return new n8n_workflow_1.NodeApiError(node, jsonifyError(err), {
|
|
45
|
+
message: 'Agent not found',
|
|
46
|
+
description: redactBearerFragments(err.bodyText ?? 'The agent_id was not found on this loomcycle deployment.'),
|
|
47
|
+
httpCode: '404',
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
if (err instanceof client_1.SessionNotFoundError) {
|
|
51
|
+
return new n8n_workflow_1.NodeApiError(node, jsonifyError(err), {
|
|
52
|
+
message: 'Session not found',
|
|
53
|
+
description: redactBearerFragments(err.bodyText ?? 'The session_id was not found.'),
|
|
54
|
+
httpCode: '404',
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
if (err instanceof client_1.SnapshotNotFoundError) {
|
|
58
|
+
return new n8n_workflow_1.NodeApiError(node, jsonifyError(err), {
|
|
59
|
+
message: 'Snapshot not found',
|
|
60
|
+
description: redactBearerFragments(err.bodyText ?? ''),
|
|
61
|
+
httpCode: '404',
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
if (err instanceof client_1.HookNotFoundError) {
|
|
65
|
+
return new n8n_workflow_1.NodeApiError(node, jsonifyError(err), {
|
|
66
|
+
message: 'Hook not found',
|
|
67
|
+
description: redactBearerFragments(err.bodyText ?? ''),
|
|
68
|
+
httpCode: '404',
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
if (err instanceof client_1.NotFoundError) {
|
|
72
|
+
return new n8n_workflow_1.NodeApiError(node, jsonifyError(err), {
|
|
73
|
+
message: 'Resource not found',
|
|
74
|
+
description: redactBearerFragments(err.bodyText ?? ''),
|
|
75
|
+
httpCode: '404',
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
if (err instanceof client_1.InvalidArgumentError) {
|
|
79
|
+
return new n8n_workflow_1.NodeApiError(node, jsonifyError(err), {
|
|
80
|
+
message: 'Invalid argument',
|
|
81
|
+
description: redactBearerFragments(err.bodyText ?? err.message),
|
|
82
|
+
httpCode: '400',
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
if (err instanceof client_1.SubstrateToolRefusedError) {
|
|
86
|
+
const tool = err.tool ? `${err.tool} ` : '';
|
|
87
|
+
return new n8n_workflow_1.NodeApiError(node, jsonifyError(err), {
|
|
88
|
+
message: `Substrate ${tool}refused the operation`,
|
|
89
|
+
description: redactBearerFragments(err.bodyText ?? err.message),
|
|
90
|
+
httpCode: '422',
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
if (err instanceof client_1.BackpressureError) {
|
|
94
|
+
return new n8n_workflow_1.NodeApiError(node, jsonifyError(err), {
|
|
95
|
+
message: 'Backpressure — too many in-flight requests',
|
|
96
|
+
description: redactBearerFragments(err.bodyText ?? 'Retry with backoff.'),
|
|
97
|
+
httpCode: '429',
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
if (err instanceof client_1.AlreadyPausingError) {
|
|
101
|
+
return new n8n_workflow_1.NodeApiError(node, jsonifyError(err), {
|
|
102
|
+
message: 'Runtime is already pausing or paused',
|
|
103
|
+
description: redactBearerFragments(err.bodyText ?? ''),
|
|
104
|
+
httpCode: '409',
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
if (err instanceof client_1.ChannelCursorRegressionError) {
|
|
108
|
+
return new n8n_workflow_1.NodeApiError(node, jsonifyError(err), {
|
|
109
|
+
message: 'Channel cursor regression — supplied cursor is older than the committed cursor',
|
|
110
|
+
description: redactBearerFragments(err.bodyText ?? 'Re-fetch the channel\'s current committed cursor via subscribeChannel and retry the Ack.'),
|
|
111
|
+
httpCode: '409',
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
if (err instanceof client_1.NotPausedError) {
|
|
115
|
+
return new n8n_workflow_1.NodeApiError(node, jsonifyError(err), {
|
|
116
|
+
message: 'Runtime is not paused',
|
|
117
|
+
description: redactBearerFragments(err.bodyText ?? ''),
|
|
118
|
+
httpCode: '409',
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
if (err instanceof client_1.PauseNotConfiguredError) {
|
|
122
|
+
return new n8n_workflow_1.NodeApiError(node, jsonifyError(err), {
|
|
123
|
+
message: 'Pause subsystem is not configured on this loomcycle deployment',
|
|
124
|
+
description: redactBearerFragments(err.bodyText ?? ''),
|
|
125
|
+
httpCode: '503',
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
if (err instanceof client_1.SnapshotTooLargeError) {
|
|
129
|
+
return new n8n_workflow_1.NodeApiError(node, jsonifyError(err), {
|
|
130
|
+
message: 'Snapshot too large for this operation',
|
|
131
|
+
description: redactBearerFragments(err.bodyText ?? ''),
|
|
132
|
+
httpCode: '413',
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
if (err instanceof client_1.SnapshotVersionError) {
|
|
136
|
+
return new n8n_workflow_1.NodeApiError(node, jsonifyError(err), {
|
|
137
|
+
message: 'Snapshot envelope version mismatch',
|
|
138
|
+
description: redactBearerFragments(err.bodyText ?? ''),
|
|
139
|
+
httpCode: '422',
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
if (err instanceof client_1.SessionBusyError) {
|
|
143
|
+
return new n8n_workflow_1.NodeApiError(node, jsonifyError(err), {
|
|
144
|
+
message: 'Session is busy',
|
|
145
|
+
description: redactBearerFragments(err.bodyText ?? ''),
|
|
146
|
+
httpCode: '409',
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
if (err instanceof client_1.AgentIDInUseError) {
|
|
150
|
+
return new n8n_workflow_1.NodeApiError(node, jsonifyError(err), {
|
|
151
|
+
message: 'agent_id is already in use',
|
|
152
|
+
description: redactBearerFragments(err.bodyText ?? ''),
|
|
153
|
+
httpCode: '409',
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
if (err instanceof client_1.UnavailableError) {
|
|
157
|
+
return new n8n_workflow_1.NodeApiError(node, jsonifyError(err), {
|
|
158
|
+
message: 'Loomcycle backend unavailable',
|
|
159
|
+
description: redactBearerFragments(err.bodyText ?? ''),
|
|
160
|
+
httpCode: '503',
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
if (err instanceof client_1.LoomcycleError) {
|
|
164
|
+
return new n8n_workflow_1.NodeApiError(node, jsonifyError(err), {
|
|
165
|
+
message: err.message || 'Loomcycle wire error',
|
|
166
|
+
description: redactBearerFragments(err.bodyText ?? ''),
|
|
167
|
+
httpCode: err.status !== undefined ? String(err.status) : '500',
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
if (err instanceof Error) {
|
|
171
|
+
return new n8n_workflow_1.NodeOperationError(node, err.message);
|
|
172
|
+
}
|
|
173
|
+
return new n8n_workflow_1.NodeOperationError(node, 'Unknown error from loomcycle');
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Coerce a LoomcycleError-shaped object into the JsonObject that
|
|
177
|
+
* NodeApiError expects in its second positional argument. The wire
|
|
178
|
+
* adapter's typed errors are real Error subclasses; n8n wants a plain
|
|
179
|
+
* object. Manual shape — we don't pass the original error instance
|
|
180
|
+
* because NodeApiError may serialise it and leak fields.
|
|
181
|
+
*/
|
|
182
|
+
function jsonifyError(err) {
|
|
183
|
+
return {
|
|
184
|
+
name: err.constructor.name,
|
|
185
|
+
message: err.message,
|
|
186
|
+
status: err.status ?? null,
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../../nodes/LoomCycle/helpers/errors.ts"],"names":[],"mappings":";;AAoCA,sDAMC;AAUD,gDAiKC;AApND,+CAAgE;AAChE,8CAoB2B;AAE3B;;;;;;;;;;;GAWG;AACH,SAAgB,qBAAqB,CAAC,IAAY;IACjD,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,CAAC;IACvB,OAAO,IAAI;SACT,OAAO,CAAC,4CAA4C,EAAE,kCAAkC,CAAC;SACzF,OAAO,CAAC,2BAA2B,EAAE,mBAAmB,CAAC;SACzD,OAAO,CAAC,8CAA8C,EAAE,YAAY,CAAC,CAAC;AACzE,CAAC;AAED;;;;;;;GAOG;AACH,SAAgB,kBAAkB,CAAC,GAAY,EAAE,IAAW;IAC3D,IAAI,GAAG,YAAY,kBAAS,EAAE,CAAC;QAC9B,OAAO,IAAI,2BAAY,CAAC,IAAI,EAAE,YAAY,CAAC,GAAG,CAAC,EAAE;YAChD,OAAO,EAAE,uBAAuB;YAChC,WAAW,EAAE,8FAA8F;YAC3G,QAAQ,EAAE,KAAK;SACf,CAAC,CAAC;IACJ,CAAC;IAED,IAAI,GAAG,YAAY,2BAAkB,EAAE,CAAC;QACvC,OAAO,IAAI,2BAAY,CAAC,IAAI,EAAE,YAAY,CAAC,GAAG,CAAC,EAAE;YAChD,OAAO,EAAE,iBAAiB;YAC1B,WAAW,EAAE,qBAAqB,CAAC,GAAG,CAAC,QAAQ,IAAI,0DAA0D,CAAC;YAC9G,QAAQ,EAAE,KAAK;SACf,CAAC,CAAC;IACJ,CAAC;IAED,IAAI,GAAG,YAAY,6BAAoB,EA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C;IAClD,CAAC;IAED,OAAO,IAAI,iCAAkB,CAAC,IAAI,EAAE,8BAA8B,CAAC,CAAC;AACrE,CAAC;AAED;;;;;;GAMG;AACH,SAAS,YAAY,CAAC,GAAmB;IACxC,OAAO;QACN,IAAI,EAAE,GAAG,CAAC,WAAW,CAAC,IAAI;QAC1B,OAAO,EAAE,GAAG,CAAC,OAAO;QACpB,MAAM,EAAE,GAAG,CAAC,MAAM,IAAI,IAAI;KAC1B,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ILoadOptionsFunctions, INodePropertyOptions } from 'n8n-workflow';
|
|
2
|
+
/**
|
|
3
|
+
* loadOptions methods for dynamic n8n parameter dropdowns.
|
|
4
|
+
*
|
|
5
|
+
* Each method MUST be defensive — n8n re-evaluates loadOptions on every
|
|
6
|
+
* parameter render, so failures here block the operator from configuring
|
|
7
|
+
* the node. On any error, return a single instructional placeholder
|
|
8
|
+
* option so the dropdown remains usable (the operator can switch to
|
|
9
|
+
* manual entry via the "Use Expression" toggle).
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* List agent names currently active for the credential's default user_id.
|
|
13
|
+
* Returns recent / running agent definitions visible via /v1/users/{id}/agents.
|
|
14
|
+
*/
|
|
15
|
+
export declare function loadAgents(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
16
|
+
/**
|
|
17
|
+
* List declared channels via GET /v1/_channels (admin endpoint;
|
|
18
|
+
* shipped in loomcycle v0.9.x PR #173).
|
|
19
|
+
*/
|
|
20
|
+
export declare function loadChannels(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
21
|
+
/**
|
|
22
|
+
* List known Memory scopes via GET /v1/_memory/scopes.
|
|
23
|
+
*/
|
|
24
|
+
export declare function loadMemoryScopes(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.loadAgents = loadAgents;
|
|
4
|
+
exports.loadChannels = loadChannels;
|
|
5
|
+
exports.loadMemoryScopes = loadMemoryScopes;
|
|
6
|
+
const client_1 = require("./client");
|
|
7
|
+
const errors_1 = require("./errors");
|
|
8
|
+
/**
|
|
9
|
+
* Build the dropdown's instructional fallback option after a failed
|
|
10
|
+
* loadOptions call. The message MUST run through `redactBearerFragments`
|
|
11
|
+
* because the wire-error string can echo back server-side header fragments
|
|
12
|
+
* (CLAUDE.md §security.6 — the bearer never reaches operator UIs).
|
|
13
|
+
*/
|
|
14
|
+
function failedToLoadOption(label, err) {
|
|
15
|
+
const msg = (0, errors_1.redactBearerFragments)(err.message ?? '');
|
|
16
|
+
return { name: `— failed to load ${label} (${msg}); type the name manually —`, value: '' };
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* loadOptions methods for dynamic n8n parameter dropdowns.
|
|
20
|
+
*
|
|
21
|
+
* Each method MUST be defensive — n8n re-evaluates loadOptions on every
|
|
22
|
+
* parameter render, so failures here block the operator from configuring
|
|
23
|
+
* the node. On any error, return a single instructional placeholder
|
|
24
|
+
* option so the dropdown remains usable (the operator can switch to
|
|
25
|
+
* manual entry via the "Use Expression" toggle).
|
|
26
|
+
*/
|
|
27
|
+
/**
|
|
28
|
+
* List agent names currently active for the credential's default user_id.
|
|
29
|
+
* Returns recent / running agent definitions visible via /v1/users/{id}/agents.
|
|
30
|
+
*/
|
|
31
|
+
async function loadAgents() {
|
|
32
|
+
try {
|
|
33
|
+
const userId = await (0, client_1.getCredentialDefault)(this, 'userId');
|
|
34
|
+
if (!userId) {
|
|
35
|
+
return [
|
|
36
|
+
{
|
|
37
|
+
name: '— set Default User ID on the credential to enable dropdown, or type the agent name manually —',
|
|
38
|
+
value: '',
|
|
39
|
+
},
|
|
40
|
+
];
|
|
41
|
+
}
|
|
42
|
+
const client = await (0, client_1.getClient)(this);
|
|
43
|
+
const agents = await client.listUserAgents(userId);
|
|
44
|
+
const names = Array.from(new Set(agents.map((a) => a.agent))).sort();
|
|
45
|
+
if (names.length === 0) {
|
|
46
|
+
return [{ name: '— no running agents for this user; type the agent name manually —', value: '' }];
|
|
47
|
+
}
|
|
48
|
+
return names.map((name) => ({ name, value: name }));
|
|
49
|
+
}
|
|
50
|
+
catch (err) {
|
|
51
|
+
return [failedToLoadOption('agents', err)];
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* List declared channels via GET /v1/_channels (admin endpoint;
|
|
56
|
+
* shipped in loomcycle v0.9.x PR #173).
|
|
57
|
+
*/
|
|
58
|
+
async function loadChannels() {
|
|
59
|
+
try {
|
|
60
|
+
const client = await (0, client_1.getClient)(this);
|
|
61
|
+
const resp = await client.listChannels();
|
|
62
|
+
const names = resp.channels.map((c) => c.name).sort();
|
|
63
|
+
if (names.length === 0) {
|
|
64
|
+
return [{ name: '— no channels declared in operator yaml; type the channel name manually —', value: '' }];
|
|
65
|
+
}
|
|
66
|
+
return names.map((name) => ({ name, value: name }));
|
|
67
|
+
}
|
|
68
|
+
catch (err) {
|
|
69
|
+
return [failedToLoadOption('channels', err)];
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* List known Memory scopes via GET /v1/_memory/scopes.
|
|
74
|
+
*/
|
|
75
|
+
async function loadMemoryScopes() {
|
|
76
|
+
try {
|
|
77
|
+
const client = await (0, client_1.getClient)(this);
|
|
78
|
+
const resp = await client.listMemoryScopes();
|
|
79
|
+
const names = resp.scopes.map((s) => s.name).sort();
|
|
80
|
+
if (names.length === 0) {
|
|
81
|
+
return [{ name: '— no memory scopes; type the scope name manually —', value: '' }];
|
|
82
|
+
}
|
|
83
|
+
return names.map((name) => ({ name, value: name }));
|
|
84
|
+
}
|
|
85
|
+
catch (err) {
|
|
86
|
+
return [failedToLoadOption('scopes', err)];
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=load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CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC;QACpD,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACxB,OAAO,CAAC,EAAE,IAAI,EAAE,oDAAoD,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;QACpF,CAAC;QACD,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IACrD,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACd,OAAO,CAAC,kBAAkB,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC;IAC5C,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { PromptSegment } from '@loomcycle/client';
|
|
2
|
+
/**
|
|
3
|
+
* Wrap an operator-supplied prompt string into the PromptSegment[] shape
|
|
4
|
+
* loomcycle's runStreaming expects.
|
|
5
|
+
*
|
|
6
|
+
* By default the prompt is wrapped as `trusted-text` — appropriate for
|
|
7
|
+
* operator-authored prompts. When the caller knows the prompt contains
|
|
8
|
+
* user-supplied content (e.g. a Slack message body, an HTTP webhook
|
|
9
|
+
* payload), they should set `asUntrusted: true` to use the
|
|
10
|
+
* `untrusted-block` segment kind, which loomcycle treats as data rather
|
|
11
|
+
* than instruction.
|
|
12
|
+
*/
|
|
13
|
+
export declare function buildSegments(prompt: string, asUntrusted?: boolean): PromptSegment[];
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildSegments = buildSegments;
|
|
4
|
+
/**
|
|
5
|
+
* Wrap an operator-supplied prompt string into the PromptSegment[] shape
|
|
6
|
+
* loomcycle's runStreaming expects.
|
|
7
|
+
*
|
|
8
|
+
* By default the prompt is wrapped as `trusted-text` — appropriate for
|
|
9
|
+
* operator-authored prompts. When the caller knows the prompt contains
|
|
10
|
+
* user-supplied content (e.g. a Slack message body, an HTTP webhook
|
|
11
|
+
* payload), they should set `asUntrusted: true` to use the
|
|
12
|
+
* `untrusted-block` segment kind, which loomcycle treats as data rather
|
|
13
|
+
* than instruction.
|
|
14
|
+
*/
|
|
15
|
+
function buildSegments(prompt, asUntrusted = false) {
|
|
16
|
+
if (asUntrusted) {
|
|
17
|
+
return [
|
|
18
|
+
{
|
|
19
|
+
role: 'user',
|
|
20
|
+
content: [{ type: 'untrusted-block', kind: 'text', text: prompt }],
|
|
21
|
+
},
|
|
22
|
+
];
|
|
23
|
+
}
|
|
24
|
+
return [
|
|
25
|
+
{
|
|
26
|
+
role: 'user',
|
|
27
|
+
content: [{ type: 'trusted-text', text: prompt }],
|
|
28
|
+
},
|
|
29
|
+
];
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=segments.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"segments.js","sourceRoot":"","sources":["../../../../nodes/LoomCycle/helpers/segments.ts"],"names":[],"mappings":";;AAaA,sCAeC;AA1BD;;;;;;;;;;GAUG;AACH,SAAgB,aAAa,CAAC,MAAc,EAAE,WAAW,GAAG,KAAK;IAChE,IAAI,WAAW,EAAE,CAAC;QACjB,OAAO;YACN;gBACC,IAAI,EAAE,MAAM;gBACZ,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;aAClE;SACD,CAAC;IACH,CAAC;IACD,OAAO;QACN;YACC,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;SACjD;KACD,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { IPollFunctions, ITriggerFunctions } from 'n8n-workflow';
|
|
2
|
+
export declare function readSeenSet(ctx: IPollFunctions | ITriggerFunctions, key: string): Set<string>;
|
|
3
|
+
export declare function writeSeenSet(ctx: IPollFunctions | ITriggerFunctions, key: string, seen: Set<string>, cap?: number): void;
|
|
4
|
+
export declare function readCursor(ctx: IPollFunctions | ITriggerFunctions, key: string): string;
|
|
5
|
+
export declare function writeCursor(ctx: IPollFunctions | ITriggerFunctions, key: string, cursor: string): void;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.readSeenSet = readSeenSet;
|
|
4
|
+
exports.writeSeenSet = writeSeenSet;
|
|
5
|
+
exports.readCursor = readCursor;
|
|
6
|
+
exports.writeCursor = writeCursor;
|
|
7
|
+
const DEFAULT_CAP = 1000;
|
|
8
|
+
function readSeenSet(ctx, key) {
|
|
9
|
+
const data = ctx.getWorkflowStaticData('node');
|
|
10
|
+
const slot = (data[key] ?? {});
|
|
11
|
+
return new Set(slot.seen ?? []);
|
|
12
|
+
}
|
|
13
|
+
function writeSeenSet(ctx, key, seen, cap = DEFAULT_CAP) {
|
|
14
|
+
const trimmed = seen.size > cap ? new Set(Array.from(seen).slice(-cap)) : seen;
|
|
15
|
+
const data = ctx.getWorkflowStaticData('node');
|
|
16
|
+
const slot = (data[key] ?? {});
|
|
17
|
+
slot.seen = Array.from(trimmed);
|
|
18
|
+
data[key] = slot;
|
|
19
|
+
}
|
|
20
|
+
function readCursor(ctx, key) {
|
|
21
|
+
const data = ctx.getWorkflowStaticData('node');
|
|
22
|
+
const slot = (data[key] ?? {});
|
|
23
|
+
return slot.cursor ?? '';
|
|
24
|
+
}
|
|
25
|
+
function writeCursor(ctx, key, cursor) {
|
|
26
|
+
const data = ctx.getWorkflowStaticData('node');
|
|
27
|
+
const slot = (data[key] ?? {});
|
|
28
|
+
slot.cursor = cursor;
|
|
29
|
+
data[key] = slot;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=staticData.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"staticData.js","sourceRoot":"","sources":["../../../../nodes/LoomCycle/helpers/staticData.ts"],"names":[],"mappings":";;AAsBA,kCAOC;AAED,oCAWC;AAED,gCAOC;AAED,kCASC;AA1CD,MAAM,WAAW,GAAG,IAAI,CAAC;AAEzB,SAAgB,WAAW,CAC1B,GAAuC,EACvC,GAAW;IAEX,MAAM,IAAI,GAAG,GAAG,CAAC,qBAAqB,CAAC,MAAM,CAAgB,CAAC;IAC9D,MAAM,IAAI,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAe,CAAC;IAC7C,OAAO,IAAI,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC;AACjC,CAAC;AAED,SAAgB,YAAY,CAC3B,GAAuC,EACvC,GAAW,EACX,IAAiB,EACjB,GAAG,GAAG,WAAW;IAEjB,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAC/E,MAAM,IAAI,GAAG,GAAG,CAAC,qBAAqB,CAAC,MAAM,CAAgB,CAAC;IAC9D,MAAM,IAAI,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAe,CAAC;IAC7C,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAChC,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;AAClB,CAAC;AAED,SAAgB,UAAU,CACzB,GAAuC,EACvC,GAAW;IAEX,MAAM,IAAI,GAAG,GAAG,CAAC,qBAAqB,CAAC,MAAM,CAAgB,CAAC;IAC9D,MAAM,IAAI,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAe,CAAC;IAC7C,OAAO,IAAI,CAAC,MAAM,IAAI,EAAE,CAAC;AAC1B,CAAC;AAED,SAAgB,WAAW,CAC1B,GAAuC,EACvC,GAAW,EACX,MAAc;IAEd,MAAM,IAAI,GAAG,GAAG,CAAC,qBAAqB,CAAC,MAAM,CAAgB,CAAC;IAC9D,MAAM,IAAI,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAe,CAAC;IAC7C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACrB,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { AgentEvent, Usage } from '@loomcycle/client';
|
|
2
|
+
/**
|
|
3
|
+
* Result of draining a runStreaming() iterable into a single n8n output.
|
|
4
|
+
*
|
|
5
|
+
* Action nodes block their execute() until the run completes — long runs
|
|
6
|
+
* are better expressed via the LoomCycleRunCompleted trigger (Sub-phase
|
|
7
|
+
* 2.3). This shape is what the action node returns to downstream nodes.
|
|
8
|
+
*
|
|
9
|
+
* **No `events` array.** Long agent runs can emit thousands of frames;
|
|
10
|
+
* bundling them all into the result inflates n8n's execution-record
|
|
11
|
+
* storage and risks running the worker out of memory under bulk input.
|
|
12
|
+
* Downstream nodes that need event-level visibility should consume the
|
|
13
|
+
* SSE stream directly via the LoomCycleRunCompleted trigger.
|
|
14
|
+
*/
|
|
15
|
+
export interface RunDrainResult {
|
|
16
|
+
finalText: string;
|
|
17
|
+
usage?: Usage;
|
|
18
|
+
stopReason?: string;
|
|
19
|
+
sessionId?: string;
|
|
20
|
+
agentId?: string;
|
|
21
|
+
runId?: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Drain an async-iterable of AgentEvents into a structured summary.
|
|
25
|
+
*
|
|
26
|
+
* `event: error` frames (or any frame with `is_error: true`) cause the
|
|
27
|
+
* function to throw — the action node's `wrapLoomcycleError` catches and
|
|
28
|
+
* surfaces them as NodeApiError. Other event types fold into the compact
|
|
29
|
+
* summary returned.
|
|
30
|
+
*/
|
|
31
|
+
export declare function drainRunStream(stream: AsyncIterable<AgentEvent>): Promise<RunDrainResult>;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.drainRunStream = drainRunStream;
|
|
4
|
+
/**
|
|
5
|
+
* Drain an async-iterable of AgentEvents into a structured summary.
|
|
6
|
+
*
|
|
7
|
+
* `event: error` frames (or any frame with `is_error: true`) cause the
|
|
8
|
+
* function to throw — the action node's `wrapLoomcycleError` catches and
|
|
9
|
+
* surfaces them as NodeApiError. Other event types fold into the compact
|
|
10
|
+
* summary returned.
|
|
11
|
+
*/
|
|
12
|
+
async function drainRunStream(stream) {
|
|
13
|
+
let finalText = '';
|
|
14
|
+
let usage;
|
|
15
|
+
let stopReason;
|
|
16
|
+
let sessionId;
|
|
17
|
+
let agentId;
|
|
18
|
+
let runId;
|
|
19
|
+
let errorMessage;
|
|
20
|
+
for await (const ev of stream) {
|
|
21
|
+
if (ev.type === 'text' && typeof ev.text === 'string') {
|
|
22
|
+
finalText += ev.text;
|
|
23
|
+
}
|
|
24
|
+
if (ev.type === 'usage' && ev.usage) {
|
|
25
|
+
usage = ev.usage;
|
|
26
|
+
}
|
|
27
|
+
if (ev.type === 'done' && ev.stop_reason) {
|
|
28
|
+
stopReason = ev.stop_reason;
|
|
29
|
+
}
|
|
30
|
+
if (ev.type === 'session' && ev.session_id) {
|
|
31
|
+
sessionId = ev.session_id;
|
|
32
|
+
}
|
|
33
|
+
if (ev.type === 'agent') {
|
|
34
|
+
if (ev.agent_id)
|
|
35
|
+
agentId = ev.agent_id;
|
|
36
|
+
if (ev.run_id)
|
|
37
|
+
runId = ev.run_id;
|
|
38
|
+
}
|
|
39
|
+
if (ev.type === 'error' || ev.is_error === true) {
|
|
40
|
+
errorMessage = ev.error ?? 'unknown error from loomcycle';
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
if (errorMessage) {
|
|
44
|
+
throw new Error(errorMessage);
|
|
45
|
+
}
|
|
46
|
+
return { finalText, usage, stopReason, sessionId, agentId, runId };
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=streaming.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"streaming.js","sourceRoot":"","sources":["../../../../nodes/LoomCycle/helpers/streaming.ts"],"names":[],"mappings":";;AAgCA,wCAoCC;AA5CD;;;;;;;GAOG;AACI,KAAK,UAAU,cAAc,CAAC,MAAiC;IACrE,IAAI,SAAS,GAAG,EAAE,CAAC;IACnB,IAAI,KAAwB,CAAC;IAC7B,IAAI,UAA8B,CAAC;IACnC,IAAI,SAA6B,CAAC;IAClC,IAAI,OAA2B,CAAC;IAChC,IAAI,KAAyB,CAAC;IAC9B,IAAI,YAAgC,CAAC;IAErC,IAAI,KAAK,EAAE,MAAM,EAAE,IAAI,MAAM,EAAE,CAAC;QAC/B,IAAI,EAAE,CAAC,IAAI,KAAK,MAAM,IAAI,OAAO,EAAE,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;YACvD,SAAS,IAAI,EAAE,CAAC,IAAI,CAAC;QACtB,CAAC;QACD,IAAI,EAAE,CAAC,IAAI,KAAK,OAAO,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC;YACrC,KAAK,GAAG,EAAE,CAAC,KAAK,CAAC;QAClB,CAAC;QACD,IAAI,EAAE,CAAC,IAAI,KAAK,MAAM,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;YAC1C,UAAU,GAAG,EAAE,CAAC,WAAW,CAAC;QAC7B,CAAC;QACD,IAAI,EAAE,CAAC,IAAI,KAAK,SAAS,IAAI,EAAE,CAAC,UAAU,EAAE,CAAC;YAC5C,SAAS,GAAG,EAAE,CAAC,UAAU,CAAC;QAC3B,CAAC;QACD,IAAI,EAAE,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;YACzB,IAAI,EAAE,CAAC,QAAQ;gBAAE,OAAO,GAAG,EAAE,CAAC,QAAQ,CAAC;YACvC,IAAI,EAAE,CAAC,MAAM;gBAAE,KAAK,GAAG,EAAE,CAAC,MAAM,CAAC;QAClC,CAAC;QACD,IAAI,EAAE,CAAC,IAAI,KAAK,OAAO,IAAI,EAAE,CAAC,QAAQ,KAAK,IAAI,EAAE,CAAC;YACjD,YAAY,GAAG,EAAE,CAAC,KAAK,IAAI,8BAA8B,CAAC;QAC3D,CAAC;IACF,CAAC;IAED,IAAI,YAAY,EAAE,CAAC;QAClB,MAAM,IAAI,KAAK,CAAC,YAAY,CAAC,CAAC;IAC/B,CAAC;IAED,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;AACpE,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { INodeType, INodeTypeDescription, ITriggerFunctions, ITriggerResponse } from 'n8n-workflow';
|
|
2
|
+
import { loadChannels } from '../LoomCycle/helpers/loadOptions';
|
|
3
|
+
/**
|
|
4
|
+
* `LoomCycle: Channel Message` — trigger that fires when a new
|
|
5
|
+
* message lands on a watched loomcycle channel.
|
|
6
|
+
*
|
|
7
|
+
* Two delivery modes:
|
|
8
|
+
* - `auto-ack`: direct long-poll subscribeChannel (at-most-once;
|
|
9
|
+
* fastest path)
|
|
10
|
+
* - `peek-ack`: peekChannel + explicit ackChannel after emit (at-
|
|
11
|
+
* least-once; survives workflow crashes mid-processing)
|
|
12
|
+
*
|
|
13
|
+
* Both modes ride the v0.9.2 PR #180 Channel CRUD wire surface — no
|
|
14
|
+
* one-shot agents.
|
|
15
|
+
*/
|
|
16
|
+
export declare class LoomCycleChannelMessage implements INodeType {
|
|
17
|
+
description: INodeTypeDescription;
|
|
18
|
+
methods: {
|
|
19
|
+
loadOptions: {
|
|
20
|
+
loadChannels: typeof loadChannels;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
trigger(this: ITriggerFunctions): Promise<ITriggerResponse>;
|
|
24
|
+
}
|