@n8n/agents 0.10.1 → 0.12.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/dist/build.tsbuildinfo +1 -1
- package/dist/index.d.ts +10 -2
- package/dist/index.js +36 -5
- package/dist/index.js.map +1 -1
- package/dist/runtime/agent-runtime.d.ts +14 -6
- package/dist/runtime/agent-runtime.js +359 -267
- 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 +2 -3
- package/dist/runtime/mcp-connection.js +3 -6
- 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 +8 -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 +40 -4
- package/dist/sdk/catalog.js.map +1 -1
- package/dist/sdk/guardrails/index.d.ts +5 -0
- package/dist/sdk/guardrails/index.js +15 -0
- package/dist/sdk/guardrails/index.js.map +1 -0
- package/dist/sdk/guardrails/patterns.d.ts +13 -0
- package/dist/sdk/guardrails/patterns.js +61 -0
- package/dist/sdk/guardrails/patterns.js.map +1 -0
- package/dist/sdk/guardrails/redactor.d.ts +24 -0
- package/dist/sdk/guardrails/redactor.js +86 -0
- package/dist/sdk/guardrails/redactor.js.map +1 -0
- package/dist/sdk/guardrails/streaming-redactor.d.ts +9 -0
- package/dist/sdk/guardrails/streaming-redactor.js +43 -0
- package/dist/sdk/guardrails/streaming-redactor.js.map +1 -0
- 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/guardrail.d.ts +1 -1
- 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 +68 -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 +45 -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
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DaytonaFilesystem = void 0;
|
|
4
|
+
const base_filesystem_1 = require("./base-filesystem");
|
|
5
|
+
class DaytonaFilesystem extends base_filesystem_1.BaseFilesystem {
|
|
6
|
+
constructor(sandbox) {
|
|
7
|
+
super();
|
|
8
|
+
this.sandbox = sandbox;
|
|
9
|
+
this.name = 'DaytonaFilesystem';
|
|
10
|
+
this.provider = 'daytona';
|
|
11
|
+
this.status = 'pending';
|
|
12
|
+
this.id = `daytona-fs-${sandbox.id}`;
|
|
13
|
+
}
|
|
14
|
+
async withFs(op) {
|
|
15
|
+
await this.ensureReady();
|
|
16
|
+
return await this.sandbox.withFilesystem(op);
|
|
17
|
+
}
|
|
18
|
+
async readFile(path, options) {
|
|
19
|
+
return await this.withFs(async (fs) => {
|
|
20
|
+
const buffer = await fs.downloadFile(path);
|
|
21
|
+
if (options?.encoding) {
|
|
22
|
+
return buffer.toString(options.encoding);
|
|
23
|
+
}
|
|
24
|
+
return buffer;
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
async writeFile(path, content, options) {
|
|
28
|
+
await this.withFs(async (fs) => {
|
|
29
|
+
if (options?.recursive) {
|
|
30
|
+
const dir = path.substring(0, path.lastIndexOf('/'));
|
|
31
|
+
if (dir) {
|
|
32
|
+
await fs.createFolder(dir, '755');
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
const buffer = typeof content === 'string' ? Buffer.from(content, 'utf-8') : Buffer.from(content);
|
|
36
|
+
await fs.uploadFile(buffer, path);
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
async appendFile(path, content) {
|
|
40
|
+
await this.withFs(async (fs) => {
|
|
41
|
+
let existing;
|
|
42
|
+
try {
|
|
43
|
+
existing = await fs.downloadFile(path);
|
|
44
|
+
}
|
|
45
|
+
catch (error) {
|
|
46
|
+
if (!isDaytona404(error))
|
|
47
|
+
throw error;
|
|
48
|
+
existing = Buffer.alloc(0);
|
|
49
|
+
}
|
|
50
|
+
const append = typeof content === 'string' ? Buffer.from(content, 'utf-8') : Buffer.from(content);
|
|
51
|
+
await fs.uploadFile(Buffer.concat([existing, append]), path);
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
async deleteFile(path, options) {
|
|
55
|
+
await this.withFs(async (fs) => await fs.deleteFile(path, options?.recursive));
|
|
56
|
+
}
|
|
57
|
+
async copyFile(src, dest, _options) {
|
|
58
|
+
await this.withFs(async (fs) => {
|
|
59
|
+
const content = await fs.downloadFile(src);
|
|
60
|
+
await fs.uploadFile(content, dest);
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
async moveFile(src, dest, _options) {
|
|
64
|
+
await this.withFs(async (fs) => await fs.moveFiles(src, dest));
|
|
65
|
+
}
|
|
66
|
+
async mkdir(path, _options) {
|
|
67
|
+
await this.withFs(async (fs) => await fs.createFolder(path, '755'));
|
|
68
|
+
}
|
|
69
|
+
async rmdir(path, options) {
|
|
70
|
+
await this.withFs(async (fs) => await fs.deleteFile(path, options?.recursive ?? false));
|
|
71
|
+
}
|
|
72
|
+
async readdir(path, _options) {
|
|
73
|
+
return await this.withFs(async (fs) => {
|
|
74
|
+
const files = await fs.listFiles(path);
|
|
75
|
+
return files.map((f) => ({
|
|
76
|
+
name: f.name ?? '',
|
|
77
|
+
type: f.isDir ? 'directory' : 'file',
|
|
78
|
+
size: f.size,
|
|
79
|
+
}));
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
async exists(path) {
|
|
83
|
+
return await this.withFs(async (fs) => {
|
|
84
|
+
try {
|
|
85
|
+
await fs.getFileDetails(path);
|
|
86
|
+
return true;
|
|
87
|
+
}
|
|
88
|
+
catch (error) {
|
|
89
|
+
if (isDaytona404(error))
|
|
90
|
+
return false;
|
|
91
|
+
throw error;
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
async stat(path) {
|
|
96
|
+
return await this.withFs(async (fs) => {
|
|
97
|
+
let info;
|
|
98
|
+
try {
|
|
99
|
+
info = await fs.getFileDetails(path);
|
|
100
|
+
}
|
|
101
|
+
catch (error) {
|
|
102
|
+
if (isDaytona404(error)) {
|
|
103
|
+
throw new DaytonaFileNotFoundError(path);
|
|
104
|
+
}
|
|
105
|
+
throw error;
|
|
106
|
+
}
|
|
107
|
+
return {
|
|
108
|
+
name: info.name ?? path.split('/').pop() ?? '',
|
|
109
|
+
path,
|
|
110
|
+
type: info.isDir ? 'directory' : 'file',
|
|
111
|
+
size: info.size ?? 0,
|
|
112
|
+
createdAt: new Date(info.modTime ?? 0),
|
|
113
|
+
modifiedAt: new Date(info.modTime ?? 0),
|
|
114
|
+
};
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
exports.DaytonaFilesystem = DaytonaFilesystem;
|
|
119
|
+
class DaytonaFileNotFoundError extends Error {
|
|
120
|
+
constructor(path) {
|
|
121
|
+
super(`File not found: ${path}`);
|
|
122
|
+
this.name = 'DaytonaFileNotFoundError';
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
function isDaytona404(error) {
|
|
126
|
+
return (error instanceof Error &&
|
|
127
|
+
'statusCode' in error &&
|
|
128
|
+
error.statusCode === 404);
|
|
129
|
+
}
|
|
130
|
+
//# sourceMappingURL=daytona-filesystem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"daytona-filesystem.js","sourceRoot":"","sources":["../../../src/workspace/filesystem/daytona-filesystem.ts"],"names":[],"mappings":";;;AAoBA,uDAAmD;AASnD,MAAa,iBAAkB,SAAQ,gCAAc;IAMpD,YAA6B,OAAuB;QACnD,KAAK,EAAE,CAAC;QADoB,YAAO,GAAP,OAAO,CAAgB;QAJ3C,SAAI,GAAG,mBAAmB,CAAC;QAC3B,aAAQ,GAAG,SAAS,CAAC;QAC9B,WAAM,GAAmB,SAAS,CAAC;QAIlC,IAAI,CAAC,EAAE,GAAG,cAAc,OAAO,CAAC,EAAE,EAAE,CAAC;IACtC,CAAC;IAOO,KAAK,CAAC,MAAM,CAAI,EAAuC;QAC9D,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC;QACzB,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;IAC9C,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,IAAY,EAAE,OAAqB;QACjD,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,EAAE,EAAE;YACrC,MAAM,M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|
|
|
1
|
+
import type { CopyOptions, FileContent, FileEntry, FileStat, ListOptions, ProviderStatus, ReadOptions, RemoveOptions, WriteOptions } from '../types';
|
|
2
|
+
import { BaseFilesystem } from './base-filesystem';
|
|
3
|
+
import type { N8nSandboxServiceSandbox } from '../sandbox/n8n-sandbox-sandbox';
|
|
4
|
+
export declare class N8nSandboxFilesystem extends BaseFilesystem {
|
|
5
|
+
private readonly sandbox;
|
|
6
|
+
readonly id: string;
|
|
7
|
+
readonly name = "N8nSandboxFilesystem";
|
|
8
|
+
readonly provider = "n8n-sandbox";
|
|
9
|
+
status: ProviderStatus;
|
|
10
|
+
constructor(sandbox: N8nSandboxServiceSandbox);
|
|
11
|
+
private getClientAndSandboxId;
|
|
12
|
+
readFile(path: string, options?: ReadOptions): Promise<string | Buffer>;
|
|
13
|
+
writeFile(path: string, content: FileContent, options?: WriteOptions): Promise<void>;
|
|
14
|
+
appendFile(path: string, content: FileContent): Promise<void>;
|
|
15
|
+
deleteFile(path: string, options?: RemoveOptions): Promise<void>;
|
|
16
|
+
copyFile(src: string, dest: string, options?: CopyOptions): Promise<void>;
|
|
17
|
+
moveFile(src: string, dest: string, options?: CopyOptions): Promise<void>;
|
|
18
|
+
mkdir(path: string, options?: {
|
|
19
|
+
recursive?: boolean;
|
|
20
|
+
}): Promise<void>;
|
|
21
|
+
rmdir(path: string, options?: RemoveOptions): Promise<void>;
|
|
22
|
+
readdir(path: string, _options?: ListOptions): Promise<FileEntry[]>;
|
|
23
|
+
exists(path: string): Promise<boolean>;
|
|
24
|
+
stat(path: string): Promise<FileStat>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.N8nSandboxFilesystem = void 0;
|
|
4
|
+
const sandbox_client_1 = require("@n8n/sandbox-client");
|
|
5
|
+
const posix_1 = require("node:path/posix");
|
|
6
|
+
const base_filesystem_1 = require("./base-filesystem");
|
|
7
|
+
function getParentDirectory(path) {
|
|
8
|
+
const parent = (0, posix_1.dirname)(path);
|
|
9
|
+
return parent === '.' || parent === '/' ? null : parent;
|
|
10
|
+
}
|
|
11
|
+
class N8nSandboxFilesystem extends base_filesystem_1.BaseFilesystem {
|
|
12
|
+
constructor(sandbox) {
|
|
13
|
+
super();
|
|
14
|
+
this.sandbox = sandbox;
|
|
15
|
+
this.name = 'N8nSandboxFilesystem';
|
|
16
|
+
this.provider = 'n8n-sandbox';
|
|
17
|
+
this.status = 'pending';
|
|
18
|
+
this.id = `n8n-sandbox-fs-${sandbox.id}`;
|
|
19
|
+
}
|
|
20
|
+
async getClientAndSandboxId() {
|
|
21
|
+
await this.sandbox.ensureRunning();
|
|
22
|
+
return {
|
|
23
|
+
client: this.sandbox.getClient(),
|
|
24
|
+
sandboxId: this.sandbox.id,
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
async readFile(path, options) {
|
|
28
|
+
await this.ensureReady();
|
|
29
|
+
const { client, sandboxId } = await this.getClientAndSandboxId();
|
|
30
|
+
const content = await client.readFile(sandboxId, path);
|
|
31
|
+
if (options?.encoding) {
|
|
32
|
+
return content.toString(options.encoding);
|
|
33
|
+
}
|
|
34
|
+
return content;
|
|
35
|
+
}
|
|
36
|
+
async writeFile(path, content, options) {
|
|
37
|
+
await this.ensureReady();
|
|
38
|
+
const { client, sandboxId } = await this.getClientAndSandboxId();
|
|
39
|
+
if (options?.recursive) {
|
|
40
|
+
const parent = getParentDirectory(path);
|
|
41
|
+
if (parent) {
|
|
42
|
+
await client.mkdir(sandboxId, parent, true);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
await client.writeFile(sandboxId, path, content, options?.overwrite ?? true);
|
|
46
|
+
}
|
|
47
|
+
async appendFile(path, content) {
|
|
48
|
+
await this.ensureReady();
|
|
49
|
+
const { client, sandboxId } = await this.getClientAndSandboxId();
|
|
50
|
+
await client.appendFile(sandboxId, path, content);
|
|
51
|
+
}
|
|
52
|
+
async deleteFile(path, options) {
|
|
53
|
+
await this.ensureReady();
|
|
54
|
+
const { client, sandboxId } = await this.getClientAndSandboxId();
|
|
55
|
+
await client.deleteFile(sandboxId, path, {
|
|
56
|
+
recursive: options?.recursive,
|
|
57
|
+
force: options?.force,
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
async copyFile(src, dest, options) {
|
|
61
|
+
await this.ensureReady();
|
|
62
|
+
const { client, sandboxId } = await this.getClientAndSandboxId();
|
|
63
|
+
await client.copyFile(sandboxId, {
|
|
64
|
+
src,
|
|
65
|
+
dest,
|
|
66
|
+
recursive: options?.recursive,
|
|
67
|
+
overwrite: options?.overwrite,
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
async moveFile(src, dest, options) {
|
|
71
|
+
await this.ensureReady();
|
|
72
|
+
const { client, sandboxId } = await this.getClientAndSandboxId();
|
|
73
|
+
await client.moveFile(sandboxId, {
|
|
74
|
+
src,
|
|
75
|
+
dest,
|
|
76
|
+
overwrite: options?.overwrite,
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
async mkdir(path, options) {
|
|
80
|
+
await this.ensureReady();
|
|
81
|
+
const { client, sandboxId } = await this.getClientAndSandboxId();
|
|
82
|
+
await client.mkdir(sandboxId, path, options?.recursive ?? false);
|
|
83
|
+
}
|
|
84
|
+
async rmdir(path, options) {
|
|
85
|
+
await this.deleteFile(path, options);
|
|
86
|
+
}
|
|
87
|
+
async readdir(path, _options) {
|
|
88
|
+
await this.ensureReady();
|
|
89
|
+
const { client, sandboxId } = await this.getClientAndSandboxId();
|
|
90
|
+
const files = await client.listFiles(sandboxId, { path });
|
|
91
|
+
return files.map((entry) => ({
|
|
92
|
+
name: entry.name,
|
|
93
|
+
type: entry.isDir ? 'directory' : 'file',
|
|
94
|
+
size: entry.size,
|
|
95
|
+
}));
|
|
96
|
+
}
|
|
97
|
+
async exists(path) {
|
|
98
|
+
await this.ensureReady();
|
|
99
|
+
try {
|
|
100
|
+
const { client, sandboxId } = await this.getClientAndSandboxId();
|
|
101
|
+
await client.stat(sandboxId, path);
|
|
102
|
+
return true;
|
|
103
|
+
}
|
|
104
|
+
catch (error) {
|
|
105
|
+
if (error instanceof sandbox_client_1.SandboxServiceError && error.status === 404) {
|
|
106
|
+
return false;
|
|
107
|
+
}
|
|
108
|
+
throw error;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
async stat(path) {
|
|
112
|
+
await this.ensureReady();
|
|
113
|
+
const { client, sandboxId } = await this.getClientAndSandboxId();
|
|
114
|
+
const stat = await client.stat(sandboxId, path);
|
|
115
|
+
return {
|
|
116
|
+
name: stat.name,
|
|
117
|
+
path: stat.path,
|
|
118
|
+
type: stat.type,
|
|
119
|
+
size: stat.size,
|
|
120
|
+
createdAt: new Date(stat.createdAt),
|
|
121
|
+
modifiedAt: new Date(stat.modifiedAt),
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
exports.N8nSandboxFilesystem = N8nSandboxFilesystem;
|
|
126
|
+
//# sourceMappingURL=n8n-sandbox-filesystem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"n8n-sandbox-filesystem.js","sourceRoot":"","sources":["../../../src/workspace/filesystem/n8n-sandbox-filesystem.ts"],"names":[],"mappings":";;;AAAA,wDAA0D;AAC1D,2CAA0C;AAa1C,uDAAmD;AAGnD,SAAS,kBAAkB,CAAC,IAAY;IACvC,MAAM,MAAM,GAAG,IAAA,eAAO,EAAC,IAAI,CAAC,CAAC;IAC7B,OAAO,MAAM,KAAK,GAAG,IAAI,MAAM,KAAK,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC;AACzD,CAAC;AAGD,MAAa,oBAAqB,SAAQ,gCAAc;IASvD,YAA6B,OAAiC;QAC7D,KAAK,EAAE,CAAC;QADoB,YAAO,GAAP,OAAO,CAA0B;QANrD,SAAI,GAAG,sBAAsB,CAAC;QAE9B,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AAM,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,IAAI,CAAC,qBAAqB,EAAE,CAAC;YACjE,MAAM,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;YACnC,OAAO,IAAI,CAAC;QACb,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,IAAI,KAAK,YAAY,oCAAmB,IAAI,KAAK,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;gBAClE,OAAO,KAAK,CAAC;YACd,CAAC;YACD,MAAM,KAAK,CAAC;QACb,CAAC;IACF,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,IAAY;QACtB,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC;QACzB,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,IAAI,CAAC,qBAAqB,EAAE,CAAC;QACjE,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;QAChD,OAAO;YACN,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,SAAS,EAAE,IAAI,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC;YACnC,UAAU,EAAE,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC;SACrC,CAAC;IACH,CAAC;CACD;AAhID,oDAgIC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { CreateSandboxOptions, SandboxConfig, SandboxFilesystem, SandboxInstance } from './types';
|
|
2
|
+
export declare function createSandbox(config: SandboxConfig, options?: CreateSandboxOptions): Promise<SandboxInstance | undefined>;
|
|
3
|
+
export declare function createFilesystem(sandbox: undefined): undefined;
|
|
4
|
+
export declare function createFilesystem(sandbox: SandboxInstance): SandboxFilesystem;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createSandbox = createSandbox;
|
|
4
|
+
exports.createFilesystem = createFilesystem;
|
|
5
|
+
const daytona_sandbox_1 = require("./daytona-sandbox");
|
|
6
|
+
const n8n_sandbox_sandbox_1 = require("./n8n-sandbox-sandbox");
|
|
7
|
+
const daytona_filesystem_1 = require("../filesystem/daytona-filesystem");
|
|
8
|
+
const n8n_sandbox_filesystem_1 = require("../filesystem/n8n-sandbox-filesystem");
|
|
9
|
+
async function createSandbox(config, options = {}) {
|
|
10
|
+
return await Promise.resolve(buildSandbox(config, options));
|
|
11
|
+
}
|
|
12
|
+
function buildSandbox(config, options = {}) {
|
|
13
|
+
if (!config.enabled)
|
|
14
|
+
return undefined;
|
|
15
|
+
const provider = config.provider;
|
|
16
|
+
if (provider === 'daytona') {
|
|
17
|
+
const mode = config.getAuthToken ? 'proxy' : 'direct';
|
|
18
|
+
const logger = options.logger ?? config.logger;
|
|
19
|
+
return new daytona_sandbox_1.DaytonaSandbox({
|
|
20
|
+
id: config.id,
|
|
21
|
+
name: config.name,
|
|
22
|
+
apiKey: config.getAuthToken ? undefined : config.daytonaApiKey,
|
|
23
|
+
getAuthToken: config.getAuthToken,
|
|
24
|
+
refreshSkewMs: config.refreshSkewMs,
|
|
25
|
+
logger,
|
|
26
|
+
apiUrl: config.daytonaApiUrl,
|
|
27
|
+
labels: config.labels,
|
|
28
|
+
...(config.ephemeral !== undefined ? { ephemeral: config.ephemeral } : {}),
|
|
29
|
+
...(config.autoStopInterval !== undefined
|
|
30
|
+
? { autoStopInterval: config.autoStopInterval }
|
|
31
|
+
: {}),
|
|
32
|
+
...(config.autoArchiveInterval !== undefined
|
|
33
|
+
? { autoArchiveInterval: config.autoArchiveInterval }
|
|
34
|
+
: {}),
|
|
35
|
+
...(config.autoDeleteInterval !== undefined
|
|
36
|
+
? { autoDeleteInterval: config.autoDeleteInterval }
|
|
37
|
+
: {}),
|
|
38
|
+
...(config.image ? { image: config.image } : {}),
|
|
39
|
+
...(config.snapshot ? { snapshot: config.snapshot } : {}),
|
|
40
|
+
language: 'typescript',
|
|
41
|
+
timeout: config.timeout ?? 300_000,
|
|
42
|
+
createTimeoutSeconds: config.createTimeoutSeconds ?? 300,
|
|
43
|
+
errorReporter: options.errorReporter,
|
|
44
|
+
createStrategyMode: mode,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
if (provider === 'n8n-sandbox') {
|
|
48
|
+
return new n8n_sandbox_sandbox_1.N8nSandboxServiceSandbox({
|
|
49
|
+
apiKey: config.apiKey,
|
|
50
|
+
serviceUrl: config.serviceUrl,
|
|
51
|
+
timeout: config.timeout ?? 300_000,
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
const exhaustiveProvider = provider;
|
|
55
|
+
throw new Error(`Unsupported sandbox provider: ${String(exhaustiveProvider)}`);
|
|
56
|
+
}
|
|
57
|
+
function createFilesystem(sandbox) {
|
|
58
|
+
if (!sandbox)
|
|
59
|
+
return undefined;
|
|
60
|
+
if (sandbox instanceof n8n_sandbox_sandbox_1.N8nSandboxServiceSandbox) {
|
|
61
|
+
return new n8n_sandbox_filesystem_1.N8nSandboxFilesystem(sandbox);
|
|
62
|
+
}
|
|
63
|
+
if (sandbox instanceof daytona_sandbox_1.DaytonaSandbox) {
|
|
64
|
+
return new daytona_filesystem_1.DaytonaFilesystem(sandbox);
|
|
65
|
+
}
|
|
66
|
+
throw new Error(`Unsupported sandbox instance: ${sandbox.name}`);
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=create-workspace.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-workspace.js","sourceRoot":"","sources":["../../../src/workspace/sandbox/create-workspace.ts"],"names":[],"mappings":";;AAWA,sCAKC;AAwDD,4CAcC;AAtFD,uDAAmD;AACnD,+DAAiE;AAOjE,yEAAqE;AACrE,iFAA4E;AAErE,KAAK,UAAU,aAAa,CAClC,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IAC1C,CAAC;IAED,IAAI,OAAO,YAAY,gCAAc,EAAE,CAAC;QACvC,OAAO,IAAI,sCAAiB,CAAC,OAAO,CAAC,CAAC;IACvC,CAAC;IAED,MAAM,IAAI,KAAK,CAAC,iCAAiC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;AAClE,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Daytona } from '@daytonaio/sdk';
|
|
2
|
+
import type { Logger } from './logger';
|
|
3
|
+
export interface DaytonaAuthManagerOptions {
|
|
4
|
+
apiUrl?: string;
|
|
5
|
+
target?: string;
|
|
6
|
+
staticApiKey?: string;
|
|
7
|
+
getAuthToken?: () => Promise<string>;
|
|
8
|
+
refreshSkewMs?: number;
|
|
9
|
+
logger?: Logger;
|
|
10
|
+
sandboxName?: string;
|
|
11
|
+
now?: () => number;
|
|
12
|
+
}
|
|
13
|
+
export declare class DaytonaAuthManager {
|
|
14
|
+
private readonly options;
|
|
15
|
+
private readonly now;
|
|
16
|
+
private readonly refreshSkewMs;
|
|
17
|
+
private client?;
|
|
18
|
+
private expiresAt;
|
|
19
|
+
private pendingRefresh?;
|
|
20
|
+
private generation;
|
|
21
|
+
constructor(options: DaytonaAuthManagerOptions);
|
|
22
|
+
getClient(): Promise<Daytona>;
|
|
23
|
+
getGeneration(): number;
|
|
24
|
+
private refresh;
|
|
25
|
+
private doRefresh;
|
|
26
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DaytonaAuthManager = void 0;
|
|
4
|
+
const utils_1 = require("@n8n/utils");
|
|
5
|
+
const lazy_daytona_1 = require("./lazy-daytona");
|
|
6
|
+
const DEFAULT_REFRESH_SKEW_MS = 5 * 60 * 1000;
|
|
7
|
+
const DECODE_FALLBACK_TTL_MS = 30 * 60 * 1000;
|
|
8
|
+
class DaytonaAuthManager {
|
|
9
|
+
constructor(options) {
|
|
10
|
+
this.expiresAt = 0;
|
|
11
|
+
this.generation = 0;
|
|
12
|
+
const hasStatic = options.staticApiKey !== undefined;
|
|
13
|
+
const hasCallback = options.getAuthToken !== undefined;
|
|
14
|
+
if (hasStatic === hasCallback) {
|
|
15
|
+
throw new Error('DaytonaAuthManager requires exactly one of staticApiKey or getAuthToken');
|
|
16
|
+
}
|
|
17
|
+
this.options = options;
|
|
18
|
+
this.now = options.now ?? Date.now;
|
|
19
|
+
this.refreshSkewMs =
|
|
20
|
+
options.refreshSkewMs !== undefined && options.refreshSkewMs > 0
|
|
21
|
+
? options.refreshSkewMs
|
|
22
|
+
: DEFAULT_REFRESH_SKEW_MS;
|
|
23
|
+
if (hasStatic) {
|
|
24
|
+
this.expiresAt = Number.POSITIVE_INFINITY;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
async getClient() {
|
|
28
|
+
if (this.client && this.now() + this.refreshSkewMs < this.expiresAt) {
|
|
29
|
+
return this.client;
|
|
30
|
+
}
|
|
31
|
+
await this.refresh();
|
|
32
|
+
if (!this.client) {
|
|
33
|
+
throw new Error('DaytonaAuthManager.refresh did not set a client');
|
|
34
|
+
}
|
|
35
|
+
return this.client;
|
|
36
|
+
}
|
|
37
|
+
getGeneration() {
|
|
38
|
+
return this.generation;
|
|
39
|
+
}
|
|
40
|
+
async refresh() {
|
|
41
|
+
if (this.pendingRefresh) {
|
|
42
|
+
await this.pendingRefresh;
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
this.pendingRefresh = this.doRefresh().finally(() => {
|
|
46
|
+
this.pendingRefresh = undefined;
|
|
47
|
+
});
|
|
48
|
+
await this.pendingRefresh;
|
|
49
|
+
}
|
|
50
|
+
async doRefresh() {
|
|
51
|
+
const { Daytona } = (0, lazy_daytona_1.loadDaytona)();
|
|
52
|
+
const apiKey = this.options.getAuthToken
|
|
53
|
+
? await this.options.getAuthToken()
|
|
54
|
+
: this.options.staticApiKey;
|
|
55
|
+
const connection = { apiKey };
|
|
56
|
+
if (this.options.apiUrl !== undefined)
|
|
57
|
+
connection.apiUrl = this.options.apiUrl;
|
|
58
|
+
if (this.options.target !== undefined)
|
|
59
|
+
connection.target = this.options.target;
|
|
60
|
+
let decodedFromJwt = false;
|
|
61
|
+
if (this.options.getAuthToken && apiKey) {
|
|
62
|
+
const expSeconds = (0, utils_1.getJwtExpiry)(apiKey);
|
|
63
|
+
decodedFromJwt = expSeconds !== undefined;
|
|
64
|
+
this.expiresAt =
|
|
65
|
+
expSeconds !== undefined ? expSeconds * 1000 : this.now() + DECODE_FALLBACK_TTL_MS;
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
this.expiresAt = Number.POSITIVE_INFINITY;
|
|
69
|
+
}
|
|
70
|
+
this.client = new Daytona(connection);
|
|
71
|
+
this.generation += 1;
|
|
72
|
+
if (this.options.getAuthToken) {
|
|
73
|
+
const ttlMs = this.expiresAt - this.now();
|
|
74
|
+
this.options.logger?.debug('Daytona auth token refreshed', {
|
|
75
|
+
sandboxName: this.options.sandboxName,
|
|
76
|
+
generation: this.generation,
|
|
77
|
+
expiresInMs: ttlMs,
|
|
78
|
+
expirySource: decodedFromJwt ? 'jwt-exp' : 'fallback',
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
exports.DaytonaAuthManager = DaytonaAuthManager;
|
|
84
|
+
//# sourceMappingURL=daytona-auth-manager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"daytona-auth-manager.js","sourceRoot":"","sources":["../../../src/workspace/sandbox/daytona-auth-manager.ts"],"names":[],"mappings":";;;AACA,sCAA0C;AAE1C,iDAA6C;AAG7C,MAAM,uBAAuB,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC;AAC9C,MAAM,sBAAsB,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAqC9C,MAAa,kBAAkB;IAS9B,YAAY,OAAkC;QAJtC,cAA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AM,GAAG,IAAI,OAAO,CAAC,UAAU,CAAC,CAAC;QACtC,IAAI,CAAC,UAAU,IAAI,CAAC,CAAC;QAErB,IAAI,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC;YAC/B,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;YAC1C,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC,8BAA8B,EAAE;gBAC1D,WAAW,EAAE,IAAI,CAAC,OAAO,CAAC,WAAW;gBACrC,UAAU,EAAE,IAAI,CAAC,UAAU;gBAC3B,WAAW,EAAE,KAAK;gBAClB,YAAY,EAAE,cAAc,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU;aACrD,CAAC,CAAC;QACJ,CAAC;IACF,CAAC;CACD;AApFD,gDAoFC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { CreateSandboxFromImageParams, Resources, Sandbox, VolumeMount } from '@daytonaio/sdk';
|
|
2
|
+
import type { CommandResult, ExecuteCommandOptions, ProviderStatus, SandboxInfo } from '../types';
|
|
3
|
+
import { BaseSandbox } from './base-sandbox';
|
|
4
|
+
import type { ErrorReporter, Logger } from './logger';
|
|
5
|
+
export interface DaytonaSandboxOptions {
|
|
6
|
+
id?: string;
|
|
7
|
+
apiKey?: string;
|
|
8
|
+
getAuthToken?: () => Promise<string>;
|
|
9
|
+
refreshSkewMs?: number;
|
|
10
|
+
logger?: Logger;
|
|
11
|
+
apiUrl?: string;
|
|
12
|
+
target?: string;
|
|
13
|
+
timeout?: number;
|
|
14
|
+
createTimeoutSeconds?: number;
|
|
15
|
+
language?: 'typescript' | 'javascript' | 'python';
|
|
16
|
+
resources?: Resources;
|
|
17
|
+
env?: Record<string, string>;
|
|
18
|
+
labels?: Record<string, string>;
|
|
19
|
+
snapshot?: string;
|
|
20
|
+
image?: CreateSandboxFromImageParams['image'];
|
|
21
|
+
ephemeral?: boolean;
|
|
22
|
+
autoStopInterval?: number;
|
|
23
|
+
autoArchiveInterval?: number;
|
|
24
|
+
autoDeleteInterval?: number;
|
|
25
|
+
volumes?: VolumeMount[];
|
|
26
|
+
name?: string;
|
|
27
|
+
user?: string;
|
|
28
|
+
public?: boolean;
|
|
29
|
+
networkBlockAll?: boolean;
|
|
30
|
+
networkAllowList?: string;
|
|
31
|
+
errorReporter?: ErrorReporter;
|
|
32
|
+
createStrategyMode?: 'direct' | 'proxy';
|
|
33
|
+
}
|
|
34
|
+
export declare class DaytonaSandbox extends BaseSandbox {
|
|
35
|
+
private readonly options;
|
|
36
|
+
private static readonly DEAD_STATES;
|
|
37
|
+
readonly id: string;
|
|
38
|
+
readonly name = "DaytonaSandbox";
|
|
39
|
+
readonly provider = "daytona";
|
|
40
|
+
status: ProviderStatus;
|
|
41
|
+
private readonly timeout;
|
|
42
|
+
private readonly language;
|
|
43
|
+
private readonly createdAt;
|
|
44
|
+
private readonly auth;
|
|
45
|
+
private readonly sandboxName;
|
|
46
|
+
private lastClientGeneration;
|
|
47
|
+
private sandbox?;
|
|
48
|
+
private workingDirectory?;
|
|
49
|
+
private recoveryPromise?;
|
|
50
|
+
constructor(options?: DaytonaSandboxOptions);
|
|
51
|
+
get instance(): Sandbox;
|
|
52
|
+
start(): Promise<void>;
|
|
53
|
+
stop(): Promise<void>;
|
|
54
|
+
destroy(): Promise<void>;
|
|
55
|
+
executeCommand(command: string, args?: string[], options?: ExecuteCommandOptions): Promise<CommandResult>;
|
|
56
|
+
withFilesystem<T>(op: (fs: Sandbox['fs']) => Promise<T>): Promise<T>;
|
|
57
|
+
ensureAuthFresh(): Promise<void>;
|
|
58
|
+
getInfo(): SandboxInfo;
|
|
59
|
+
getInstructions(): string;
|
|
60
|
+
private getDaytona;
|
|
61
|
+
private resetLocalHandle;
|
|
62
|
+
private isRecoverable;
|
|
63
|
+
private recoverAndRetry;
|
|
64
|
+
private recover;
|
|
65
|
+
private findExistingSandbox;
|
|
66
|
+
private createSandbox;
|
|
67
|
+
private createSandboxParams;
|
|
68
|
+
private reportCreateError;
|
|
69
|
+
private detectWorkingDirectory;
|
|
70
|
+
private isDeadState;
|
|
71
|
+
private compactEnv;
|
|
72
|
+
}
|