@n8n/agents 0.10.1 → 0.11.1
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/dist/build.tsbuildinfo +1 -1
- package/dist/index.d.ts +8 -2
- package/dist/index.js +27 -5
- package/dist/index.js.map +1 -1
- package/dist/runtime/agent-runtime.d.ts +14 -6
- package/dist/runtime/agent-runtime.js +320 -243
- package/dist/runtime/agent-runtime.js.map +1 -1
- package/dist/runtime/delegate-sub-agent-tool.d.ts +87 -0
- package/dist/runtime/delegate-sub-agent-tool.js +362 -0
- package/dist/runtime/delegate-sub-agent-tool.js.map +1 -0
- package/dist/runtime/event-bus.d.ts +8 -0
- package/dist/runtime/event-bus.js +48 -0
- package/dist/runtime/event-bus.js.map +1 -1
- package/dist/runtime/mcp-connection.d.ts +1 -2
- package/dist/runtime/mcp-connection.js +1 -4
- package/dist/runtime/mcp-connection.js.map +1 -1
- package/dist/runtime/message-list.d.ts +9 -3
- package/dist/runtime/message-list.js +16 -5
- package/dist/runtime/message-list.js.map +1 -1
- package/dist/runtime/messages.js +10 -2
- package/dist/runtime/messages.js.map +1 -1
- package/dist/runtime/model-factory.js +12 -0
- package/dist/runtime/model-factory.js.map +1 -1
- package/dist/runtime/provider-credentials.d.ts +13 -0
- package/dist/runtime/provider-credentials.js +1 -0
- package/dist/runtime/provider-credentials.js.map +1 -1
- package/dist/runtime/runtime-helpers.d.ts +1 -2
- package/dist/runtime/runtime-helpers.js +0 -8
- package/dist/runtime/runtime-helpers.js.map +1 -1
- package/dist/runtime/sdk-owned-tool.d.ts +4 -0
- package/dist/runtime/sdk-owned-tool.js +19 -0
- package/dist/runtime/sdk-owned-tool.js.map +1 -0
- package/dist/runtime/stream.js +8 -0
- package/dist/runtime/stream.js.map +1 -1
- package/dist/runtime/sub-agent-task-path.d.ts +10 -0
- package/dist/runtime/sub-agent-task-path.js +39 -0
- package/dist/runtime/sub-agent-task-path.js.map +1 -0
- package/dist/runtime/title-generation.js +3 -5
- package/dist/runtime/title-generation.js.map +1 -1
- package/dist/runtime/tool-adapter.d.ts +0 -9
- package/dist/runtime/tool-adapter.js +12 -21
- package/dist/runtime/tool-adapter.js.map +1 -1
- package/dist/runtime/write-todos-tool.d.ts +3 -0
- package/dist/runtime/write-todos-tool.js +95 -0
- package/dist/runtime/write-todos-tool.js.map +1 -0
- package/dist/sdk/agent.d.ts +19 -12
- package/dist/sdk/agent.js +318 -91
- package/dist/sdk/agent.js.map +1 -1
- package/dist/sdk/cancellation.d.ts +7 -0
- package/dist/sdk/cancellation.js +16 -0
- package/dist/sdk/cancellation.js.map +1 -0
- package/dist/sdk/catalog.js +20 -4
- package/dist/sdk/catalog.js.map +1 -1
- package/dist/sdk/mcp-client.d.ts +1 -1
- package/dist/sdk/mcp-client.js +2 -2
- package/dist/sdk/mcp-client.js.map +1 -1
- package/dist/sdk/memory.d.ts +1 -3
- package/dist/sdk/memory.js +0 -14
- package/dist/sdk/memory.js.map +1 -1
- package/dist/sdk/provider-capabilities.js +1 -0
- package/dist/sdk/provider-capabilities.js.map +1 -1
- package/dist/sdk/tool.d.ts +3 -0
- package/dist/sdk/tool.js +42 -10
- package/dist/sdk/tool.js.map +1 -1
- package/dist/storage/base-memory.d.ts +0 -31
- package/dist/storage/base-memory.js +0 -9
- package/dist/storage/base-memory.js.map +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.js.map +1 -1
- package/dist/types/runtime/event.d.ts +31 -1
- package/dist/types/runtime/event.js +2 -0
- package/dist/types/runtime/event.js.map +1 -1
- package/dist/types/sdk/agent-builder.d.ts +0 -1
- package/dist/types/sdk/agent.d.ts +20 -15
- package/dist/types/sdk/memory.d.ts +0 -42
- package/dist/types/sdk/message.d.ts +1 -0
- package/dist/types/sdk/tool.d.ts +19 -1
- package/dist/utils/json-schema.d.ts +3 -0
- package/dist/utils/json-schema.js +72 -0
- package/dist/utils/json-schema.js.map +1 -0
- package/dist/workspace/filesystem/daytona-filesystem.d.ts +25 -0
- package/dist/workspace/filesystem/daytona-filesystem.js +130 -0
- package/dist/workspace/filesystem/daytona-filesystem.js.map +1 -0
- package/dist/workspace/filesystem/n8n-sandbox-filesystem.d.ts +25 -0
- package/dist/workspace/filesystem/n8n-sandbox-filesystem.js +126 -0
- package/dist/workspace/filesystem/n8n-sandbox-filesystem.js.map +1 -0
- package/dist/workspace/sandbox/create-workspace.d.ts +4 -0
- package/dist/workspace/sandbox/create-workspace.js +58 -0
- package/dist/workspace/sandbox/create-workspace.js.map +1 -0
- package/dist/workspace/sandbox/daytona-auth-manager.d.ts +26 -0
- package/dist/workspace/sandbox/daytona-auth-manager.js +84 -0
- package/dist/workspace/sandbox/daytona-auth-manager.js.map +1 -0
- package/dist/workspace/sandbox/daytona-sandbox.d.ts +72 -0
- package/dist/workspace/sandbox/daytona-sandbox.js +357 -0
- package/dist/workspace/sandbox/daytona-sandbox.js.map +1 -0
- package/dist/workspace/sandbox/index.d.ts +7 -0
- package/dist/workspace/sandbox/index.js +22 -0
- package/dist/workspace/sandbox/index.js.map +1 -0
- package/dist/workspace/sandbox/lazy-daytona.d.ts +2 -0
- package/dist/workspace/sandbox/lazy-daytona.js +12 -0
- package/dist/workspace/sandbox/lazy-daytona.js.map +1 -0
- package/dist/workspace/sandbox/logger.d.ts +12 -0
- package/dist/workspace/sandbox/logger.js +3 -0
- package/dist/workspace/sandbox/logger.js.map +1 -0
- package/dist/workspace/sandbox/n8n-sandbox-sandbox.d.ts +35 -0
- package/dist/workspace/sandbox/n8n-sandbox-sandbox.js +138 -0
- package/dist/workspace/sandbox/n8n-sandbox-sandbox.js.map +1 -0
- package/dist/workspace/sandbox/provider.d.ts +4 -0
- package/dist/workspace/sandbox/provider.js +14 -0
- package/dist/workspace/sandbox/provider.js.map +1 -0
- package/dist/workspace/sandbox/run-in-sandbox.d.ts +26 -0
- package/dist/workspace/sandbox/run-in-sandbox.js +19 -0
- package/dist/workspace/sandbox/run-in-sandbox.js.map +1 -0
- package/dist/workspace/sandbox/types.d.ts +41 -0
- package/dist/workspace/sandbox/types.js +3 -0
- package/dist/workspace/sandbox/types.js.map +1 -0
- package/dist/workspace/sandbox/workspace-root.d.ts +16 -0
- package/dist/workspace/sandbox/workspace-root.js +69 -0
- package/dist/workspace/sandbox/workspace-root.js.map +1 -0
- package/dist/workspace/tools/batch-str-replace-file.js +2 -2
- package/dist/workspace/tools/batch-str-replace-file.js.map +1 -1
- package/dist/workspace/tools/str-replace-file.js +2 -2
- package/dist/workspace/tools/str-replace-file.js.map +1 -1
- package/package.json +29 -17
- package/dist/sdk/network.d.ts +0 -20
- package/dist/sdk/network.js +0 -46
- package/dist/sdk/network.js.map +0 -1
package/dist/sdk/network.js
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Network = void 0;
|
|
4
|
-
class Network {
|
|
5
|
-
constructor(name) {
|
|
6
|
-
this.agents = [];
|
|
7
|
-
this.networkName = name;
|
|
8
|
-
}
|
|
9
|
-
coordinator(a) {
|
|
10
|
-
this.coordinatorAgent = a;
|
|
11
|
-
return this;
|
|
12
|
-
}
|
|
13
|
-
agent(a) {
|
|
14
|
-
this.agents.push(a);
|
|
15
|
-
return this;
|
|
16
|
-
}
|
|
17
|
-
ensureBuilt() {
|
|
18
|
-
this.built ??= this.build();
|
|
19
|
-
return this.built;
|
|
20
|
-
}
|
|
21
|
-
get name() {
|
|
22
|
-
return this.networkName;
|
|
23
|
-
}
|
|
24
|
-
async run(prompt, options) {
|
|
25
|
-
return await this.ensureBuilt().run(prompt, options);
|
|
26
|
-
}
|
|
27
|
-
build() {
|
|
28
|
-
if (!this.coordinatorAgent) {
|
|
29
|
-
throw new Error(`Network "${this.networkName}" requires a coordinator`);
|
|
30
|
-
}
|
|
31
|
-
if (this.agents.length === 0) {
|
|
32
|
-
throw new Error(`Network "${this.networkName}" requires at least one agent`);
|
|
33
|
-
}
|
|
34
|
-
const coordinator = this.coordinatorAgent;
|
|
35
|
-
const name = this.networkName;
|
|
36
|
-
return {
|
|
37
|
-
name,
|
|
38
|
-
async run(prompt, options) {
|
|
39
|
-
const messages = [{ role: 'user', content: [{ type: 'text', text: prompt }] }];
|
|
40
|
-
return await coordinator.generate(messages, options);
|
|
41
|
-
},
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
exports.Network = Network;
|
|
46
|
-
//# sourceMappingURL=network.js.map
|
package/dist/sdk/network.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"network.js","sourceRoot":"","sources":["../../src/sdk/network.ts"],"names":[],"mappings":";;;AAsBA,MAAa,OAAO;IASnB,YAAY,IAAY;QAJhB,WAAM,GAAY,EAAE,CAAC;QAK5B,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;IACzB,CAAC;IAGD,WAAW,CAAC,CAAQ;QACnB,IAAI,CAAC,gBAAgB,GAAG,CAAC,CAAC;QAC1B,OAAO,IAAI,CAAC;IACb,CAAC;IAGD,KAAK,CAAC,CAAQ;QACb,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACpB,OAAO,IAAI,CAAC;IACb,CAAC;IAGO,WAAW;QAClB,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,EAAE,CAAC;QAC5B,OAAO,IAAI,CAAC,KAAK,CAAC;IACnB,CAAC;IAGD,IAAI,IAAI;QACP,OAAO,IAAI,CAAC,WAAW,CAAC;IACzB,CAAC;IAGD,KAAK,CAAC,GAAG,CAAC,MAAc,EAAE,OAAoB;QAC7C,OAAO,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtD,CAAC;IAGS,KAAK;QACd,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC;YAC5B,MAAM,IAAI,KAAK,CAAC,YAAY,IAAI,CAAC,WAAW,0BAA0B,CAAC,CAAC;QACzE,CAAC;QACD,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,YAAY,IAAI,CAAC,WAAW,+BAA+B,CAAC,CAAC;QAC9E,CAAC;QAOD,MAAM,WAAW,GAAG,IAAI,CAAC,gBAAgB,CAAC;QAC1C,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC;QAE9B,OAAO;YACN,IAAI;YAEJ,KAAK,CAAC,GAAG,CAAC,MAAc,EAAE,OAAoB;gBAC7C,MAAM,QAAQ,GAAc,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC;gBAC1F,OAAO,MAAM,WAAW,CAAC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;YACtD,CAAC;SACD,CAAC;IACH,CAAC;CACD;AAnED,0BAmEC"}
|