@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.
Files changed (99) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +190 -0
  3. package/dist/credentials/LoomCycleApi.credentials.d.ts +21 -0
  4. package/dist/credentials/LoomCycleApi.credentials.js +81 -0
  5. package/dist/credentials/LoomCycleApi.credentials.js.map +1 -0
  6. package/dist/nodes/LoomCycle/LoomCycle.node.d.ts +22 -0
  7. package/dist/nodes/LoomCycle/LoomCycle.node.js +403 -0
  8. package/dist/nodes/LoomCycle/LoomCycle.node.js.map +1 -0
  9. package/dist/nodes/LoomCycle/LoomCycle.node.json +13 -0
  10. package/dist/nodes/LoomCycle/LoomCycle.svg +13 -0
  11. package/dist/nodes/LoomCycle/descriptions/agentdef.d.ts +21 -0
  12. package/dist/nodes/LoomCycle/descriptions/agentdef.js +155 -0
  13. package/dist/nodes/LoomCycle/descriptions/agentdef.js.map +1 -0
  14. package/dist/nodes/LoomCycle/descriptions/channels.d.ts +19 -0
  15. package/dist/nodes/LoomCycle/descriptions/channels.js +164 -0
  16. package/dist/nodes/LoomCycle/descriptions/channels.js.map +1 -0
  17. package/dist/nodes/LoomCycle/descriptions/index.d.ts +6 -0
  18. package/dist/nodes/LoomCycle/descriptions/index.js +16 -0
  19. package/dist/nodes/LoomCycle/descriptions/index.js.map +1 -0
  20. package/dist/nodes/LoomCycle/descriptions/mcpserverdef.d.ts +29 -0
  21. package/dist/nodes/LoomCycle/descriptions/mcpserverdef.js +241 -0
  22. package/dist/nodes/LoomCycle/descriptions/mcpserverdef.js.map +1 -0
  23. package/dist/nodes/LoomCycle/descriptions/memory.d.ts +20 -0
  24. package/dist/nodes/LoomCycle/descriptions/memory.js +119 -0
  25. package/dist/nodes/LoomCycle/descriptions/memory.js.map +1 -0
  26. package/dist/nodes/LoomCycle/descriptions/runs.d.ts +17 -0
  27. package/dist/nodes/LoomCycle/descriptions/runs.js +226 -0
  28. package/dist/nodes/LoomCycle/descriptions/runs.js.map +1 -0
  29. package/dist/nodes/LoomCycle/descriptions/skilldef.d.ts +10 -0
  30. package/dist/nodes/LoomCycle/descriptions/skilldef.js +144 -0
  31. package/dist/nodes/LoomCycle/descriptions/skilldef.js.map +1 -0
  32. package/dist/nodes/LoomCycle/helpers/capability.d.ts +42 -0
  33. package/dist/nodes/LoomCycle/helpers/capability.js +54 -0
  34. package/dist/nodes/LoomCycle/helpers/capability.js.map +1 -0
  35. package/dist/nodes/LoomCycle/helpers/client.d.ts +15 -0
  36. package/dist/nodes/LoomCycle/helpers/client.js +30 -0
  37. package/dist/nodes/LoomCycle/helpers/client.js.map +1 -0
  38. package/dist/nodes/LoomCycle/helpers/envVarHints.d.ts +30 -0
  39. package/dist/nodes/LoomCycle/helpers/envVarHints.js +67 -0
  40. package/dist/nodes/LoomCycle/helpers/envVarHints.js.map +1 -0
  41. package/dist/nodes/LoomCycle/helpers/errors.d.ts +23 -0
  42. package/dist/nodes/LoomCycle/helpers/errors.js +189 -0
  43. package/dist/nodes/LoomCycle/helpers/errors.js.map +1 -0
  44. package/dist/nodes/LoomCycle/helpers/loadOptions.d.ts +24 -0
  45. package/dist/nodes/LoomCycle/helpers/loadOptions.js +89 -0
  46. package/dist/nodes/LoomCycle/helpers/loadOptions.js.map +1 -0
  47. package/dist/nodes/LoomCycle/helpers/segments.d.ts +13 -0
  48. package/dist/nodes/LoomCycle/helpers/segments.js +31 -0
  49. package/dist/nodes/LoomCycle/helpers/segments.js.map +1 -0
  50. package/dist/nodes/LoomCycle/helpers/staticData.d.ts +5 -0
  51. package/dist/nodes/LoomCycle/helpers/staticData.js +31 -0
  52. package/dist/nodes/LoomCycle/helpers/staticData.js.map +1 -0
  53. package/dist/nodes/LoomCycle/helpers/streaming.d.ts +31 -0
  54. package/dist/nodes/LoomCycle/helpers/streaming.js +48 -0
  55. package/dist/nodes/LoomCycle/helpers/streaming.js.map +1 -0
  56. package/dist/nodes/LoomCycleChannelMessage/LoomCycleChannelMessage.node.d.ts +24 -0
  57. package/dist/nodes/LoomCycleChannelMessage/LoomCycleChannelMessage.node.js +162 -0
  58. package/dist/nodes/LoomCycleChannelMessage/LoomCycleChannelMessage.node.js.map +1 -0
  59. package/dist/nodes/LoomCycleChannelMessage/LoomCycleChannelMessage.node.json +13 -0
  60. package/dist/nodes/LoomCycleChannelMessage/LoomCycleChannelMessage.svg +9 -0
  61. package/dist/nodes/LoomCycleChannelMessage/helpers/subscribe.d.ts +20 -0
  62. package/dist/nodes/LoomCycleChannelMessage/helpers/subscribe.js +106 -0
  63. package/dist/nodes/LoomCycleChannelMessage/helpers/subscribe.js.map +1 -0
  64. package/dist/nodes/LoomCycleChannelTool/LoomCycleChannelTool.node.d.ts +5 -0
  65. package/dist/nodes/LoomCycleChannelTool/LoomCycleChannelTool.node.js +114 -0
  66. package/dist/nodes/LoomCycleChannelTool/LoomCycleChannelTool.node.js.map +1 -0
  67. package/dist/nodes/LoomCycleChannelTool/LoomCycleChannelTool.node.json +13 -0
  68. package/dist/nodes/LoomCycleChannelTool/LoomCycleChannelTool.svg +13 -0
  69. package/dist/nodes/LoomCycleMcpServerTool/LoomCycleMcpServerTool.node.d.ts +5 -0
  70. package/dist/nodes/LoomCycleMcpServerTool/LoomCycleMcpServerTool.node.js +259 -0
  71. package/dist/nodes/LoomCycleMcpServerTool/LoomCycleMcpServerTool.node.js.map +1 -0
  72. package/dist/nodes/LoomCycleMcpServerTool/LoomCycleMcpServerTool.node.json +13 -0
  73. package/dist/nodes/LoomCycleMcpServerTool/LoomCycleMcpServerTool.svg +14 -0
  74. package/dist/nodes/LoomCycleMemoryTool/LoomCycleMemoryTool.node.d.ts +5 -0
  75. package/dist/nodes/LoomCycleMemoryTool/LoomCycleMemoryTool.node.js +108 -0
  76. package/dist/nodes/LoomCycleMemoryTool/LoomCycleMemoryTool.node.js.map +1 -0
  77. package/dist/nodes/LoomCycleMemoryTool/LoomCycleMemoryTool.node.json +13 -0
  78. package/dist/nodes/LoomCycleMemoryTool/LoomCycleMemoryTool.svg +11 -0
  79. package/dist/nodes/LoomCycleRunCompleted/LoomCycleRunCompleted.node.d.ts +18 -0
  80. package/dist/nodes/LoomCycleRunCompleted/LoomCycleRunCompleted.node.js +188 -0
  81. package/dist/nodes/LoomCycleRunCompleted/LoomCycleRunCompleted.node.js.map +1 -0
  82. package/dist/nodes/LoomCycleRunCompleted/LoomCycleRunCompleted.node.json +13 -0
  83. package/dist/nodes/LoomCycleRunCompleted/LoomCycleRunCompleted.svg +10 -0
  84. package/dist/nodes/LoomCycleRunCompleted/helpers/poll.d.ts +12 -0
  85. package/dist/nodes/LoomCycleRunCompleted/helpers/poll.js +69 -0
  86. package/dist/nodes/LoomCycleRunCompleted/helpers/poll.js.map +1 -0
  87. package/dist/nodes/LoomCycleRunCompleted/helpers/sse.d.ts +29 -0
  88. package/dist/nodes/LoomCycleRunCompleted/helpers/sse.js +61 -0
  89. package/dist/nodes/LoomCycleRunCompleted/helpers/sse.js.map +1 -0
  90. package/dist/nodes/LoomCycleSubAgentTool/LoomCycleSubAgentTool.node.d.ts +5 -0
  91. package/dist/nodes/LoomCycleSubAgentTool/LoomCycleSubAgentTool.node.js +131 -0
  92. package/dist/nodes/LoomCycleSubAgentTool/LoomCycleSubAgentTool.node.js.map +1 -0
  93. package/dist/nodes/LoomCycleSubAgentTool/LoomCycleSubAgentTool.node.json +13 -0
  94. package/dist/nodes/LoomCycleSubAgentTool/LoomCycleSubAgentTool.svg +12 -0
  95. package/dist/nodes/_shared/clusterTool.d.ts +19 -0
  96. package/dist/nodes/_shared/clusterTool.js +36 -0
  97. package/dist/nodes/_shared/clusterTool.js.map +1 -0
  98. package/dist/tsconfig.tsbuildinfo +1 -0
  99. package/package.json +86 -0
@@ -0,0 +1,403 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LoomCycle = void 0;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ const client_1 = require("./helpers/client");
6
+ const errors_1 = require("./helpers/errors");
7
+ const segments_1 = require("./helpers/segments");
8
+ const streaming_1 = require("./helpers/streaming");
9
+ const loadOptions_1 = require("./helpers/loadOptions");
10
+ const descriptions_1 = require("./descriptions");
11
+ /**
12
+ * Umbrella action node for the loomcycle agentic runtime. Op-discriminated
13
+ * across six resources: `run`, `memory`, `channel`, `agentDef`,
14
+ * `skillDef`, `mcpServerDef`.
15
+ *
16
+ * Programmatic execute() (not declarative routing) because the load-bearing
17
+ * paths go through `@loomcycle/client` rather than raw HTTP — typed-error
18
+ * mapping + SSE drain + credential-default fall-through all live in JS.
19
+ */
20
+ class LoomCycle {
21
+ constructor() {
22
+ this.description = {
23
+ displayName: 'LoomCycle',
24
+ name: 'loomCycle',
25
+ icon: 'file:LoomCycle.svg',
26
+ group: ['transform'],
27
+ version: 1,
28
+ subtitle: '={{$parameter["resource"] + ": " + $parameter["operation"]}}',
29
+ description: 'Drive a loomcycle agentic runtime — Run / Memory / Channel / AgentDef / SkillDef / MCPServerDef ops over HTTP+SSE',
30
+ defaults: { name: 'LoomCycle' },
31
+ inputs: ['main'],
32
+ outputs: ['main'],
33
+ credentials: [{ name: 'loomCycleApi', required: true }],
34
+ properties: [
35
+ {
36
+ displayName: 'Resource',
37
+ name: 'resource',
38
+ type: 'options',
39
+ noDataExpression: true,
40
+ // Alphabetised per n8n-nodes-base convention; default 'run' is
41
+ // selected by `value`, not array position.
42
+ options: [
43
+ { name: 'Agent Definition', value: 'agentDef' },
44
+ { name: 'Channel', value: 'channel' },
45
+ { name: 'MCP Server Definition', value: 'mcpServerDef' },
46
+ { name: 'Memory', value: 'memory' },
47
+ { name: 'Run', value: 'run' },
48
+ { name: 'Skill Definition', value: 'skillDef' },
49
+ ],
50
+ default: 'run',
51
+ },
52
+ ...descriptions_1.runOps,
53
+ ...descriptions_1.memoryOps,
54
+ ...descriptions_1.channelOps,
55
+ ...descriptions_1.agentDefOps,
56
+ ...descriptions_1.skillDefOps,
57
+ ...descriptions_1.mcpServerDefOps,
58
+ ],
59
+ };
60
+ this.methods = {
61
+ loadOptions: {
62
+ loadAgents: loadOptions_1.loadAgents,
63
+ loadChannels: loadOptions_1.loadChannels,
64
+ loadMemoryScopes: loadOptions_1.loadMemoryScopes,
65
+ },
66
+ };
67
+ }
68
+ async execute() {
69
+ const items = this.getInputData();
70
+ const returnData = [];
71
+ const client = await (0, client_1.getClient)(this);
72
+ for (let i = 0; i < items.length; i++) {
73
+ const resource = this.getNodeParameter('resource', i);
74
+ const operation = this.getNodeParameter('operation', i);
75
+ try {
76
+ let row;
77
+ if (resource === 'run') {
78
+ row = await executeRun.call(this, client, operation, i);
79
+ }
80
+ else if (resource === 'memory') {
81
+ row = await executeMemory.call(this, client, operation, i);
82
+ }
83
+ else if (resource === 'channel') {
84
+ row = await executeChannel.call(this, client, operation, i);
85
+ }
86
+ else if (resource === 'agentDef') {
87
+ row = await executeAgentDef.call(this, client, operation, i);
88
+ }
89
+ else if (resource === 'skillDef') {
90
+ row = await executeSkillDef.call(this, client, operation, i);
91
+ }
92
+ else if (resource === 'mcpServerDef') {
93
+ row = await executeMcpServerDef.call(this, client, operation, i);
94
+ }
95
+ else {
96
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Unknown resource: ${resource}`);
97
+ }
98
+ if (row !== undefined) {
99
+ returnData.push({ json: row, pairedItem: { item: i } });
100
+ }
101
+ }
102
+ catch (err) {
103
+ const wrapped = (0, errors_1.wrapLoomcycleError)(err, this.getNode());
104
+ if (this.continueOnFail()) {
105
+ returnData.push({
106
+ json: { error: wrapped.message },
107
+ error: wrapped,
108
+ pairedItem: { item: i },
109
+ });
110
+ continue;
111
+ }
112
+ throw wrapped;
113
+ }
114
+ }
115
+ return [returnData];
116
+ }
117
+ }
118
+ exports.LoomCycle = LoomCycle;
119
+ // ---- Resource dispatchers ----
120
+ async function executeRun(client, operation, i) {
121
+ if (operation === 'spawn') {
122
+ const agent = this.getNodeParameter('agent', i);
123
+ const prompt = this.getNodeParameter('prompt', i);
124
+ const userIdParam = this.getNodeParameter('userId', i, '');
125
+ const userTierParam = this.getNodeParameter('userTier', i, '');
126
+ const treatPromptAsUntrusted = this.getNodeParameter('treatPromptAsUntrusted', i, false);
127
+ const additionalFields = this.getNodeParameter('additionalFields', i, {});
128
+ const userId = userIdParam || (await (0, client_1.getCredentialDefault)(this, 'userId'));
129
+ const userTier = userTierParam || (await (0, client_1.getCredentialDefault)(this, 'userTier'));
130
+ const runOpts = {
131
+ agent,
132
+ segments: (0, segments_1.buildSegments)(prompt, treatPromptAsUntrusted),
133
+ };
134
+ if (userId)
135
+ runOpts.userId = userId;
136
+ if (userTier)
137
+ runOpts.userTier = userTier;
138
+ if (additionalFields.sessionId)
139
+ runOpts.sessionId = additionalFields.sessionId;
140
+ if (additionalFields.agentId)
141
+ runOpts.agentId = additionalFields.agentId;
142
+ if (additionalFields.userBearer)
143
+ runOpts.userBearer = additionalFields.userBearer;
144
+ const allowedTools = parseCsv(additionalFields.allowedTools);
145
+ if (allowedTools !== undefined)
146
+ runOpts.allowedTools = allowedTools;
147
+ const allowedHosts = parseCsv(additionalFields.allowedHosts);
148
+ if (allowedHosts !== undefined)
149
+ runOpts.allowedHosts = allowedHosts;
150
+ const webSearchFilter = additionalFields.webSearchFilter;
151
+ if (webSearchFilter === 'drop' || webSearchFilter === 'keep') {
152
+ runOpts.webSearchFilter = webSearchFilter;
153
+ }
154
+ const result = await (0, streaming_1.drainRunStream)(client.runStreaming(runOpts));
155
+ return result;
156
+ }
157
+ if (operation === 'getStatus') {
158
+ const agentId = this.getNodeParameter('agentId', i);
159
+ const agent = await client.getAgent(agentId);
160
+ return agent;
161
+ }
162
+ if (operation === 'wait') {
163
+ const agentId = this.getNodeParameter('agentId', i);
164
+ const pollIntervalMs = this.getNodeParameter('pollIntervalMs', i, 1000);
165
+ const timeoutSec = this.getNodeParameter('timeoutSec', i, 300);
166
+ const deadline = Date.now() + timeoutSec * 1000;
167
+ while (true) {
168
+ const agent = await client.getAgent(agentId);
169
+ if (agent.status !== 'running') {
170
+ return agent;
171
+ }
172
+ if (Date.now() >= deadline) {
173
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Timed out after ${timeoutSec}s waiting for agent ${agentId} to finish (current status: ${agent.status}).`);
174
+ }
175
+ await sleep(pollIntervalMs);
176
+ }
177
+ }
178
+ if (operation === 'cancel') {
179
+ const agentId = this.getNodeParameter('agentId', i);
180
+ const reason = this.getNodeParameter('reason', i, '');
181
+ const result = await client.cancelAgent(agentId, reason ? { reason } : undefined);
182
+ return result;
183
+ }
184
+ if (operation === 'listAgents') {
185
+ const userIdParam = this.getNodeParameter('userId', i, '');
186
+ const statusFilter = this.getNodeParameter('statusFilter', i, '');
187
+ const userId = userIdParam || (await (0, client_1.getCredentialDefault)(this, 'userId'));
188
+ if (!userId) {
189
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'User ID is required for List Agents — set per-node or as a Default User ID on the credential.');
190
+ }
191
+ const opts = statusFilter ? { status: statusFilter } : undefined;
192
+ const agents = await client.listUserAgents(userId, opts);
193
+ return { agents };
194
+ }
195
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Unknown run operation: ${operation}`);
196
+ }
197
+ async function executeMemory(client, operation, i) {
198
+ if (operation === 'listScopes') {
199
+ const resp = await client.listMemoryScopes();
200
+ return resp;
201
+ }
202
+ if (operation === 'listScopeIDs') {
203
+ const scope = this.getNodeParameter('scope', i);
204
+ const resp = await client.listMemoryScopeIDs(scope);
205
+ return resp;
206
+ }
207
+ if (operation === 'listEntries') {
208
+ const scope = this.getNodeParameter('scope', i);
209
+ const scopeID = this.getNodeParameter('scopeID', i);
210
+ const additionalFields = this.getNodeParameter('additionalFields', i, {});
211
+ const optsAny = {};
212
+ if (additionalFields.prefix)
213
+ optsAny.prefix = additionalFields.prefix;
214
+ if (typeof additionalFields.limit === 'number')
215
+ optsAny.limit = additionalFields.limit;
216
+ const resp = await client.listMemoryEntries(scope, scopeID, optsAny);
217
+ return resp;
218
+ }
219
+ if (operation === 'getEntry') {
220
+ const scope = this.getNodeParameter('scope', i);
221
+ const scopeID = this.getNodeParameter('scopeID', i);
222
+ const key = this.getNodeParameter('key', i);
223
+ const resp = await client.getMemoryEntry(scope, scopeID, key);
224
+ return resp;
225
+ }
226
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Unknown memory operation: ${operation}`);
227
+ }
228
+ async function executeChannel(client, operation, i) {
229
+ if (operation === 'listChannels') {
230
+ const resp = await client.listChannels();
231
+ return resp;
232
+ }
233
+ const channel = this.getNodeParameter('channel', i);
234
+ const scope = this.getNodeParameter('scope', i, 'global');
235
+ const userIdParam = this.getNodeParameter('userId', i, '');
236
+ const userId = scope === 'user' ? userIdParam || (await (0, client_1.getCredentialDefault)(this, 'userId')) : undefined;
237
+ if (scope === 'user' && !userId) {
238
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'User ID is required when Scope = User — set per-node or as a Default User ID on the credential.');
239
+ }
240
+ if (operation === 'publish') {
241
+ const rawPayload = this.getNodeParameter('payload', i, '{}');
242
+ // Strict JSON: a Channel publish payload that isn't a valid JSON
243
+ // value (object/array/string/number) would land server-side as a
244
+ // raw string — confusing for downstream consumers expecting
245
+ // structured data. Throw early so the operator sees the typo.
246
+ const payload = parseJsonField(rawPayload, { strict: true, node: this.getNode() });
247
+ const deliverAt = this.getNodeParameter('deliverAt', i, '');
248
+ const resp = await client.publishChannel(channel, {
249
+ scope,
250
+ userId,
251
+ payload,
252
+ deliverAt: deliverAt || undefined,
253
+ });
254
+ return resp;
255
+ }
256
+ if (operation === 'subscribe') {
257
+ const additionalFields = this.getNodeParameter('additionalFields', i, {});
258
+ const resp = await client.subscribeChannel(channel, {
259
+ scope,
260
+ userId,
261
+ fromCursor: additionalFields.fromCursor || undefined,
262
+ maxMessages: typeof additionalFields.maxMessages === 'number' ? additionalFields.maxMessages : undefined,
263
+ waitMs: typeof additionalFields.waitMs === 'number' ? additionalFields.waitMs : undefined,
264
+ });
265
+ return resp;
266
+ }
267
+ if (operation === 'peek') {
268
+ const additionalFields = this.getNodeParameter('additionalFields', i, {});
269
+ const resp = await client.peekChannel(channel, {
270
+ scope,
271
+ userId,
272
+ fromCursor: additionalFields.fromCursor || undefined,
273
+ maxMessages: typeof additionalFields.maxMessages === 'number' ? additionalFields.maxMessages : undefined,
274
+ });
275
+ return resp;
276
+ }
277
+ if (operation === 'ack') {
278
+ const cursor = this.getNodeParameter('cursor', i);
279
+ const resp = await client.ackChannel(channel, { scope, userId, cursor });
280
+ return resp;
281
+ }
282
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Unknown channel operation: ${operation}`);
283
+ }
284
+ // ---- Substrate-admin dispatchers (AgentDef / SkillDef / MCPServerDef) ----
285
+ async function executeAgentDef(client, operation, i) {
286
+ const input = buildSubstrateInput.call(this, operation, i);
287
+ const resp = await client.agentDef(input);
288
+ return { result: resp };
289
+ }
290
+ async function executeSkillDef(client, operation, i) {
291
+ const input = buildSubstrateInput.call(this, operation, i);
292
+ const resp = await client.skillDef(input);
293
+ return { result: resp };
294
+ }
295
+ async function executeMcpServerDef(client, operation, i) {
296
+ const input = buildSubstrateInput.call(this, operation, i);
297
+ // MCPServerDef-specific: structured Register UI assembles transport
298
+ // + url + headers as direct overlay fields (Fork uses the JSON
299
+ // overlay textarea instead).
300
+ if (operation === 'create') {
301
+ const transport = this.getNodeParameter('transport', i);
302
+ if (transport !== 'http' && transport !== 'streamable-http') {
303
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Transport must be HTTP or Streamable-HTTP. Stdio MCP servers must be declared in loomcycle.yaml (not via dynamic registration).`);
304
+ }
305
+ const url = this.getNodeParameter('url', i);
306
+ const headers = collectHeaders(this.getNodeParameter('headers', i, {}));
307
+ input.transport = transport;
308
+ input.url = url;
309
+ if (Object.keys(headers).length > 0)
310
+ input.headers = headers;
311
+ }
312
+ const resp = await client.mcpServerDef(input);
313
+ return { result: resp };
314
+ }
315
+ /**
316
+ * Build the SubstrateToolInput body shared by AgentDef / SkillDef /
317
+ * MCPServerDef. The closed-set op union covers create/fork/get/list/
318
+ * promote/retire; verify and rediscover ride the [extra: string]: unknown
319
+ * index signature on SubstrateToolInput.
320
+ */
321
+ function buildSubstrateInput(operation, i) {
322
+ const input = { op: operation };
323
+ const name = this.getNodeParameter('name', i, '');
324
+ if (name)
325
+ input.name = name;
326
+ const defId = this.getNodeParameter('defId', i, '');
327
+ if (defId)
328
+ input.def_id = defId;
329
+ const parentDefId = this.getNodeParameter('parentDefId', i, '');
330
+ if (parentDefId)
331
+ input.parent_def_id = parentDefId;
332
+ const description = this.getNodeParameter('defDescription', i, '');
333
+ if (description)
334
+ input.description = description;
335
+ if (operation === 'create' || operation === 'fork') {
336
+ const promote = this.getNodeParameter('promote', i, false);
337
+ input.promote = promote;
338
+ const overlay = parseJsonField(this.getNodeParameter('overlay', i, '{}'));
339
+ if (overlay && typeof overlay === 'object' && Object.keys(overlay).length > 0) {
340
+ input.overlay = overlay;
341
+ }
342
+ }
343
+ if (operation === 'verify') {
344
+ const contentSha256 = this.getNodeParameter('contentSha256', i, '');
345
+ if (contentSha256)
346
+ input.content_sha256 = contentSha256;
347
+ }
348
+ return input;
349
+ }
350
+ /**
351
+ * Collect headers from the n8n fixedCollection shape into a map. The
352
+ * input shape is `{ header: [{ name, value }, ...] }`. Empty when the
353
+ * operator added no headers.
354
+ */
355
+ function collectHeaders(raw) {
356
+ const out = {};
357
+ if (!raw || typeof raw !== 'object')
358
+ return out;
359
+ const headerCollection = raw.header;
360
+ if (!Array.isArray(headerCollection))
361
+ return out;
362
+ for (const entry of headerCollection) {
363
+ if (!entry || typeof entry !== 'object')
364
+ continue;
365
+ const name = entry.name;
366
+ const value = entry.value;
367
+ if (typeof name === 'string' && name && typeof value === 'string') {
368
+ out[name] = value;
369
+ }
370
+ }
371
+ return out;
372
+ }
373
+ // ---- Local helpers (kept inline; not shared) ----
374
+ function parseCsv(raw) {
375
+ if (typeof raw !== 'string' || raw.trim() === '')
376
+ return undefined;
377
+ const items = raw
378
+ .split(',')
379
+ .map((s) => s.trim())
380
+ .filter((s) => s.length > 0);
381
+ return items.length > 0 ? items : undefined;
382
+ }
383
+ function parseJsonField(raw, opts = {}) {
384
+ if (typeof raw !== 'string')
385
+ return raw;
386
+ const trimmed = raw.trim();
387
+ if (trimmed === '')
388
+ return {};
389
+ try {
390
+ return JSON.parse(trimmed);
391
+ }
392
+ catch (err) {
393
+ if (opts.strict && opts.node) {
394
+ const snippet = trimmed.length > 80 ? `${trimmed.slice(0, 80)}…` : trimmed;
395
+ throw new n8n_workflow_1.NodeOperationError(opts.node, `Invalid JSON: ${snippet} — ${err.message}`);
396
+ }
397
+ return raw;
398
+ }
399
+ }
400
+ function sleep(ms) {
401
+ return new Promise((resolve) => setTimeout(resolve, ms));
402
+ }
403
+ //# sourceMappingURL=LoomCycle.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LoomCycle.node.js","sourceRoot":"","sources":["../../../nodes/LoomCycle/LoomCycle.node.ts"],"names":[],"mappings":";;;AAOA,+CAAkD;AAGlD,6CAAmE;AACnE,6CAAsD;AACtD,iDAAmD;AACnD,mDAAqD;AACrD,uDAAmF;AACnF,iDAOwB;AAExB;;;;;;;;GAQG;AACH,MAAa,SAAS;IAAtB;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,WAAW;YACxB,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,oBAAoB;YAC1B,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,8DAA8D;YACxE,WAAW,EAAE,mHAAmH;YAChI,QAAQ,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;YAC/B,MAAM,EAAE,CAAC,MAAM,CAAC;YAChB,OAAO,EAAE,CAAC,MAAM,CAAC;YACjB,WAAW,EAAE,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;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1.0",
5
+ "categories": ["AI"],
6
+ "resources": {
7
+ "primaryDocumentation": [
8
+ {
9
+ "url": "https://github.com/denn-gubsky/n8n-nodes-loomcycle#readme"
10
+ }
11
+ ]
12
+ }
13
+ }
@@ -0,0 +1,13 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 60" width="60" height="60">
3
+ <title>LoomCycle</title>
4
+ <circle cx="30" cy="30" r="28" fill="#0f172a"/>
5
+ <g fill="none" stroke="#22d3ee" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
6
+ <circle cx="30" cy="30" r="16"/>
7
+ <path d="M30 14 L30 22"/>
8
+ <path d="M30 38 L30 46"/>
9
+ <path d="M14 30 L22 30"/>
10
+ <path d="M38 30 L46 30"/>
11
+ </g>
12
+ <circle cx="30" cy="30" r="4" fill="#22d3ee"/>
13
+ </svg>
@@ -0,0 +1,21 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ /**
3
+ * Operation descriptions for the `agentDef` resource — substrate-admin
4
+ * management of versioned agent definitions (v0.8.5+, content_sha256 in
5
+ * v0.9.x). 7 ops mapping to the op-discriminated `client.agentDef({op})`
6
+ * adapter call:
7
+ *
8
+ * - Create → register a new agent definition (description + overlay)
9
+ * - Fork → branch from an existing def_id with an overlay diff
10
+ * - Get → return the active row for a name
11
+ * - List → list all versions for a name (lineage tree)
12
+ * - Promote → make a specific def_id the active version
13
+ * - Retire → mark a def_id (or name's active) as retired
14
+ * - Verify → content_sha256 comparison ("is my bundle deployed?")
15
+ *
16
+ * The substrate refuses scope-violating mutations via
17
+ * `SubstrateToolRefusedError` (wired through helpers/errors.ts).
18
+ *
19
+ * Op options array is alphabetised by name.
20
+ */
21
+ export declare const agentDefOps: INodeProperties[];
@@ -0,0 +1,155 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.agentDefOps = void 0;
4
+ /**
5
+ * Operation descriptions for the `agentDef` resource — substrate-admin
6
+ * management of versioned agent definitions (v0.8.5+, content_sha256 in
7
+ * v0.9.x). 7 ops mapping to the op-discriminated `client.agentDef({op})`
8
+ * adapter call:
9
+ *
10
+ * - Create → register a new agent definition (description + overlay)
11
+ * - Fork → branch from an existing def_id with an overlay diff
12
+ * - Get → return the active row for a name
13
+ * - List → list all versions for a name (lineage tree)
14
+ * - Promote → make a specific def_id the active version
15
+ * - Retire → mark a def_id (or name's active) as retired
16
+ * - Verify → content_sha256 comparison ("is my bundle deployed?")
17
+ *
18
+ * The substrate refuses scope-violating mutations via
19
+ * `SubstrateToolRefusedError` (wired through helpers/errors.ts).
20
+ *
21
+ * Op options array is alphabetised by name.
22
+ */
23
+ exports.agentDefOps = [
24
+ {
25
+ displayName: 'Operation',
26
+ name: 'operation',
27
+ type: 'options',
28
+ noDataExpression: true,
29
+ displayOptions: { show: { resource: ['agentDef'] } },
30
+ options: [
31
+ {
32
+ name: 'Create',
33
+ value: 'create',
34
+ description: 'Register a new agent definition (initial version)',
35
+ action: 'Create an agent definition',
36
+ },
37
+ {
38
+ name: 'Fork',
39
+ value: 'fork',
40
+ description: 'Branch from an existing def_id with an overlay diff',
41
+ action: 'Fork an agent definition',
42
+ },
43
+ {
44
+ name: 'Get',
45
+ value: 'get',
46
+ description: 'Return the active row for a name',
47
+ action: 'Get an agent definition',
48
+ },
49
+ {
50
+ name: 'List Versions',
51
+ value: 'list',
52
+ description: 'List all versions for a name (lineage tree)',
53
+ action: 'List agent definition versions',
54
+ },
55
+ {
56
+ name: 'Promote',
57
+ value: 'promote',
58
+ description: 'Make a specific def_id the active version',
59
+ action: 'Promote an agent definition',
60
+ },
61
+ {
62
+ name: 'Retire',
63
+ value: 'retire',
64
+ description: 'Mark a def_id (or active row for a name) as retired',
65
+ action: 'Retire an agent definition',
66
+ },
67
+ {
68
+ name: 'Verify',
69
+ value: 'verify',
70
+ description: 'Compare a content_sha256 against the deployed active row',
71
+ action: 'Verify an agent definition hash',
72
+ },
73
+ ],
74
+ default: 'list',
75
+ },
76
+ // ---- Name (used by Get / List / Create / Retire / Verify) ----
77
+ {
78
+ displayName: 'Name',
79
+ name: 'name',
80
+ type: 'string',
81
+ default: '',
82
+ required: true,
83
+ displayOptions: {
84
+ show: { resource: ['agentDef'], operation: ['get', 'list', 'create', 'retire', 'verify'] },
85
+ },
86
+ description: 'Agent definition name (matches the agent\'s yaml frontmatter / .md filename stem)',
87
+ },
88
+ // ---- Def ID (used by Promote, optional override for Retire) ----
89
+ {
90
+ displayName: 'Def ID',
91
+ name: 'defId',
92
+ type: 'string',
93
+ default: '',
94
+ required: true,
95
+ displayOptions: { show: { resource: ['agentDef'], operation: ['promote'] } },
96
+ description: 'Specific def_id to act on. Versions are returned by List Versions.',
97
+ },
98
+ {
99
+ displayName: 'Def ID (Optional)',
100
+ name: 'defId',
101
+ type: 'string',
102
+ default: '',
103
+ displayOptions: { show: { resource: ['agentDef'], operation: ['retire'] } },
104
+ description: 'Specific def_id to retire. Leave empty to retire the active version of the name above.',
105
+ },
106
+ // ---- Parent Def ID (Fork) ----
107
+ {
108
+ displayName: 'Parent Def ID',
109
+ name: 'parentDefId',
110
+ type: 'string',
111
+ default: '',
112
+ required: true,
113
+ displayOptions: { show: { resource: ['agentDef'], operation: ['fork'] } },
114
+ description: 'Def_id of the row to fork. The new row inherits all fields not present in the overlay.',
115
+ },
116
+ // ---- Description (Create / Fork) ----
117
+ {
118
+ displayName: 'Description',
119
+ name: 'defDescription',
120
+ type: 'string',
121
+ default: '',
122
+ displayOptions: { show: { resource: ['agentDef'], operation: ['create', 'fork'] } },
123
+ description: 'Operator-visible description of this version. Helps audit the lineage later.',
124
+ },
125
+ // ---- Overlay JSON (Create / Fork) ----
126
+ {
127
+ displayName: 'Overlay (JSON)',
128
+ name: 'overlay',
129
+ type: 'json',
130
+ default: '{}',
131
+ typeOptions: { rows: 6 },
132
+ displayOptions: { show: { resource: ['agentDef'], operation: ['create', 'fork'] } },
133
+ description: 'JSON object containing the agent\'s content-bearing fields (e.g. model, max_iterations, allowed_tools, system_prompt). For Fork this is merged onto the parent. For Create this defines the initial row.',
134
+ },
135
+ // ---- Promote-After-Create (Create / Fork) ----
136
+ {
137
+ displayName: 'Promote to Active',
138
+ name: 'promote',
139
+ type: 'boolean',
140
+ default: false,
141
+ displayOptions: { show: { resource: ['agentDef'], operation: ['create', 'fork'] } },
142
+ description: 'Whether to auto-promote the new version to active immediately. If false, the new row exists but no agent uses it until a separate Promote call.',
143
+ },
144
+ // ---- Content SHA256 (Verify) ----
145
+ {
146
+ displayName: 'Content SHA256',
147
+ name: 'contentSha256',
148
+ type: 'string',
149
+ default: '',
150
+ required: true,
151
+ displayOptions: { show: { resource: ['agentDef'], operation: ['verify'] } },
152
+ description: 'Local content_sha256 (typically from `loomcycle hash agent &lt;path&gt;`) to compare against the deployed active row',
153
+ },
154
+ ];
155
+ //# sourceMappingURL=agentdef.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agentdef.js","sourceRoot":"","sources":["../../../../nodes/LoomCycle/descriptions/agentdef.ts"],"names":[],"mappings":";;;AAEA;;;;;;;;;;;;;;;;;;GAkBG;AACU,QAAA,WAAW,GAAsB;IAC7C;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,UAAU,CAAC,EAAE,EAAE;QACpD,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,mDAAmD;gBAChE,MAAM,EAAE,4BAA4B;aACpC;YACD;gBACC,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE,MAAM;gBACb,WAAW,EAAE,qDAAqD;gBAClE,MAAM,EAAE,0BAA0B;aAClC;YACD;gBACC,IAAI,EAAE,KAAK;gBACX,KAAK,EAAE,KAAK;gBACZ,WA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