@jamesmurdza/opencode-daytona 0.1.12 → 0.1.14
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/.opencode/plugin/daytona/core/logger.ts +50 -0
- package/.opencode/plugin/daytona/core/project-data-storage.ts +154 -0
- package/.opencode/plugin/daytona/core/session-manager.ts +170 -0
- package/.opencode/plugin/daytona/core/types.ts +68 -0
- package/.opencode/plugin/daytona/git/host-git-manager.ts +94 -0
- package/.opencode/plugin/daytona/git/index.ts +1 -0
- package/.opencode/plugin/daytona/git/sandbox-git-manager.ts +51 -0
- package/.opencode/plugin/daytona/git/session-git-manager.ts +65 -0
- package/.opencode/plugin/daytona/index.ts +50 -0
- package/.opencode/plugin/daytona/plugins/custom-tools.ts +20 -0
- package/.opencode/plugin/daytona/plugins/index.ts +8 -0
- package/.opencode/plugin/daytona/plugins/session-cleanup.ts +22 -0
- package/.opencode/plugin/daytona/plugins/session-idle-auto-commit.ts +30 -0
- package/.opencode/plugin/daytona/plugins/system-transform.ts +28 -0
- package/.opencode/plugin/daytona/tools/bash.ts +32 -0
- package/.opencode/plugin/daytona/tools/edit.ts +21 -0
- package/.opencode/plugin/daytona/tools/get-preview-url.ts +15 -0
- package/.opencode/plugin/daytona/tools/glob.ts +16 -0
- package/.opencode/plugin/daytona/tools/grep.ts +16 -0
- package/.opencode/plugin/daytona/tools/ls.ts +18 -0
- package/.opencode/plugin/daytona/tools/lsp.ts +15 -0
- package/.opencode/plugin/daytona/tools/multiedit.ts +32 -0
- package/.opencode/plugin/daytona/tools/patch.ts +21 -0
- package/.opencode/plugin/daytona/tools/read.ts +16 -0
- package/.opencode/plugin/daytona/tools/write.ts +16 -0
- package/.opencode/plugin/daytona/tools.ts +33 -0
- package/.opencode/plugin/{index.js → index.ts} +1 -2
- package/README.md +192 -0
- package/package.json +3 -12
- package/.opencode/plugin/daytona/index.d.ts +0 -25
- package/.opencode/plugin/daytona/index.d.ts.map +0 -1
- package/.opencode/plugin/daytona/index.js +0 -36
- package/.opencode/plugin/daytona/index.js.map +0 -1
- package/.opencode/plugin/daytona/logger.d.ts +0 -13
- package/.opencode/plugin/daytona/logger.d.ts.map +0 -1
- package/.opencode/plugin/daytona/logger.js +0 -26
- package/.opencode/plugin/daytona/logger.js.map +0 -1
- package/.opencode/plugin/daytona/plugins.d.ts +0 -22
- package/.opencode/plugin/daytona/plugins.d.ts.map +0 -1
- package/.opencode/plugin/daytona/plugins.js +0 -60
- package/.opencode/plugin/daytona/plugins.js.map +0 -1
- package/.opencode/plugin/daytona/session-manager.d.ts +0 -47
- package/.opencode/plugin/daytona/session-manager.d.ts.map +0 -1
- package/.opencode/plugin/daytona/session-manager.js +0 -171
- package/.opencode/plugin/daytona/session-manager.js.map +0 -1
- package/.opencode/plugin/daytona/tools.d.ts +0 -185
- package/.opencode/plugin/daytona/tools.d.ts.map +0 -1
- package/.opencode/plugin/daytona/tools.js +0 -232
- package/.opencode/plugin/daytona/tools.js.map +0 -1
- package/.opencode/plugin/daytona/types.d.ts +0 -32
- package/.opencode/plugin/daytona/types.d.ts.map +0 -1
- package/.opencode/plugin/daytona/types.js +0 -10
- package/.opencode/plugin/daytona/types.js.map +0 -1
- package/.opencode/plugin/index.d.ts +0 -6
- package/.opencode/plugin/index.d.ts.map +0 -1
- package/.opencode/plugin/index.js.map +0 -1
|
@@ -1,232 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tool implementations for Daytona sandbox integration
|
|
3
|
-
*/
|
|
4
|
-
import { z } from "zod";
|
|
5
|
-
export function createDaytonaTools(sessionManager, projectId, worktree) {
|
|
6
|
-
return {
|
|
7
|
-
/**
|
|
8
|
-
* Executes a shell command in the Daytona sandbox and returns the output
|
|
9
|
-
* @param command - Shell command to execute
|
|
10
|
-
* @param background - Whether to run the command in the background
|
|
11
|
-
*/
|
|
12
|
-
bash: {
|
|
13
|
-
description: "Executes shell commands in a Daytona sandbox",
|
|
14
|
-
args: {
|
|
15
|
-
command: z.string(),
|
|
16
|
-
background: z.boolean().optional(),
|
|
17
|
-
},
|
|
18
|
-
async execute(args, ctx) {
|
|
19
|
-
const sessionId = ctx.sessionID;
|
|
20
|
-
const sandbox = await sessionManager.getSandbox(sessionId, projectId, worktree);
|
|
21
|
-
if (args.background) {
|
|
22
|
-
// Run command in background using session-based execution
|
|
23
|
-
const execSessionId = `exec-session-${sessionId}`;
|
|
24
|
-
// Create session if it doesn't exist
|
|
25
|
-
try {
|
|
26
|
-
await sandbox.process.getSession(execSessionId);
|
|
27
|
-
}
|
|
28
|
-
catch {
|
|
29
|
-
await sandbox.process.createSession(execSessionId);
|
|
30
|
-
}
|
|
31
|
-
// Execute command asynchronously in the session
|
|
32
|
-
const result = await sandbox.process.executeSessionCommand(execSessionId, {
|
|
33
|
-
command: args.command,
|
|
34
|
-
runAsync: true,
|
|
35
|
-
});
|
|
36
|
-
return `Command started in background (cmdId: ${result.cmdId})`;
|
|
37
|
-
}
|
|
38
|
-
else {
|
|
39
|
-
const result = await sandbox.process.executeCommand(args.command);
|
|
40
|
-
return `Exit code: ${result.exitCode}\n${result.result}`;
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
/**
|
|
45
|
-
* Reads and returns the contents of a file from the sandbox
|
|
46
|
-
* @param filePath - Path to the file to read
|
|
47
|
-
*/
|
|
48
|
-
read: {
|
|
49
|
-
description: "Reads file from Daytona sandbox",
|
|
50
|
-
args: {
|
|
51
|
-
filePath: z.string(),
|
|
52
|
-
},
|
|
53
|
-
async execute(args, ctx) {
|
|
54
|
-
const sandbox = await sessionManager.getSandbox(ctx.sessionID, projectId, worktree);
|
|
55
|
-
const buffer = await sandbox.fs.downloadFile(args.filePath);
|
|
56
|
-
const decoder = new TextDecoder();
|
|
57
|
-
return decoder.decode(buffer);
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
/**
|
|
61
|
-
* Writes content to a file in the sandbox, creating it if it doesn't exist
|
|
62
|
-
* @param filePath - Path to the file to write
|
|
63
|
-
* @param content - Content to write to the file
|
|
64
|
-
*/
|
|
65
|
-
write: {
|
|
66
|
-
description: "Writes content to file in Daytona sandbox",
|
|
67
|
-
args: {
|
|
68
|
-
filePath: z.string(),
|
|
69
|
-
content: z.string(),
|
|
70
|
-
},
|
|
71
|
-
async execute(args, ctx) {
|
|
72
|
-
const sandbox = await sessionManager.getSandbox(ctx.sessionID, projectId, worktree);
|
|
73
|
-
await sandbox.fs.uploadFile(Buffer.from(args.content), args.filePath);
|
|
74
|
-
return `Written ${args.content.length} bytes to ${args.filePath}`;
|
|
75
|
-
},
|
|
76
|
-
},
|
|
77
|
-
/**
|
|
78
|
-
* Replaces the first occurrence of a text pattern in a file
|
|
79
|
-
* @param filePath - Path to the file to edit
|
|
80
|
-
* @param oldString - Text to search for
|
|
81
|
-
* @param newString - Text to replace with
|
|
82
|
-
*/
|
|
83
|
-
edit: {
|
|
84
|
-
description: "Replaces text in a file in Daytona sandbox",
|
|
85
|
-
args: {
|
|
86
|
-
filePath: z.string(),
|
|
87
|
-
oldString: z.string(),
|
|
88
|
-
newString: z.string(),
|
|
89
|
-
},
|
|
90
|
-
async execute(args, ctx) {
|
|
91
|
-
const sandbox = await sessionManager.getSandbox(ctx.sessionID, projectId, worktree);
|
|
92
|
-
const buffer = await sandbox.fs.downloadFile(args.filePath);
|
|
93
|
-
const decoder = new TextDecoder();
|
|
94
|
-
const content = decoder.decode(buffer);
|
|
95
|
-
const newContent = content.replace(args.oldString, args.newString);
|
|
96
|
-
await sandbox.fs.uploadFile(Buffer.from(newContent), args.filePath);
|
|
97
|
-
return `Edited ${args.filePath}`;
|
|
98
|
-
},
|
|
99
|
-
},
|
|
100
|
-
/**
|
|
101
|
-
* Applies multiple text replacements to a file atomically
|
|
102
|
-
* @param filePath - Path to the file to edit
|
|
103
|
-
* @param edits - Array of {oldString, newString} pairs to apply
|
|
104
|
-
*/
|
|
105
|
-
multiedit: {
|
|
106
|
-
description: "Applies multiple edits to a file in Daytona sandbox atomically",
|
|
107
|
-
args: {
|
|
108
|
-
filePath: z.string(),
|
|
109
|
-
edits: z.array(z.object({
|
|
110
|
-
oldString: z.string(),
|
|
111
|
-
newString: z.string(),
|
|
112
|
-
})),
|
|
113
|
-
},
|
|
114
|
-
async execute(args, ctx) {
|
|
115
|
-
const sandbox = await sessionManager.getSandbox(ctx.sessionID, projectId, worktree);
|
|
116
|
-
const buffer = await sandbox.fs.downloadFile(args.filePath);
|
|
117
|
-
const decoder = new TextDecoder();
|
|
118
|
-
let content = decoder.decode(buffer);
|
|
119
|
-
for (const edit of args.edits) {
|
|
120
|
-
content = content.replace(edit.oldString, edit.newString);
|
|
121
|
-
}
|
|
122
|
-
await sandbox.fs.uploadFile(Buffer.from(content), args.filePath);
|
|
123
|
-
return `Applied ${args.edits.length} edits to ${args.filePath}`;
|
|
124
|
-
},
|
|
125
|
-
},
|
|
126
|
-
/**
|
|
127
|
-
* Patches a file by replacing a code snippet with a new one
|
|
128
|
-
* @param filePath - Path to the file to patch
|
|
129
|
-
* @param oldSnippet - Code snippet to search for
|
|
130
|
-
* @param newSnippet - Code snippet to replace with
|
|
131
|
-
*/
|
|
132
|
-
patch: {
|
|
133
|
-
description: "Patches a file with a code snippet in Daytona sandbox",
|
|
134
|
-
args: {
|
|
135
|
-
filePath: z.string(),
|
|
136
|
-
oldSnippet: z.string(),
|
|
137
|
-
newSnippet: z.string(),
|
|
138
|
-
},
|
|
139
|
-
async execute(args, ctx) {
|
|
140
|
-
const sandbox = await sessionManager.getSandbox(ctx.sessionID, projectId, worktree);
|
|
141
|
-
const buffer = await sandbox.fs.downloadFile(args.filePath);
|
|
142
|
-
const decoder = new TextDecoder();
|
|
143
|
-
const content = decoder.decode(buffer);
|
|
144
|
-
const newContent = content.replace(args.oldSnippet, args.newSnippet);
|
|
145
|
-
await sandbox.fs.uploadFile(Buffer.from(newContent), args.filePath);
|
|
146
|
-
return `Patched ${args.filePath}`;
|
|
147
|
-
},
|
|
148
|
-
},
|
|
149
|
-
/**
|
|
150
|
-
* Lists files and directories in the specified path (or working directory)
|
|
151
|
-
* @param dirPath - Optional directory path to list (defaults to working directory)
|
|
152
|
-
*/
|
|
153
|
-
ls: {
|
|
154
|
-
description: "Lists files in a directory in Daytona sandbox",
|
|
155
|
-
args: {
|
|
156
|
-
dirPath: z.string().optional(),
|
|
157
|
-
},
|
|
158
|
-
async execute(args, ctx) {
|
|
159
|
-
const sandbox = await sessionManager.getSandbox(ctx.sessionID, projectId, worktree);
|
|
160
|
-
const workDir = await sandbox.getWorkDir();
|
|
161
|
-
const path = args.dirPath || workDir;
|
|
162
|
-
const files = await sandbox.fs.listFiles(path);
|
|
163
|
-
return files.map((f) => f.name).join('\n');
|
|
164
|
-
},
|
|
165
|
-
},
|
|
166
|
-
/**
|
|
167
|
-
* Searches for files matching a glob pattern in the sandbox
|
|
168
|
-
* @param pattern - Glob pattern to match files (e.g., "**\/*.ts")
|
|
169
|
-
*/
|
|
170
|
-
glob: {
|
|
171
|
-
description: "Searches for files matching a pattern in Daytona sandbox",
|
|
172
|
-
args: {
|
|
173
|
-
pattern: z.string(),
|
|
174
|
-
},
|
|
175
|
-
async execute(args, ctx) {
|
|
176
|
-
const sandbox = await sessionManager.getSandbox(ctx.sessionID, projectId, worktree);
|
|
177
|
-
const workDir = await sandbox.getWorkDir();
|
|
178
|
-
const result = await sandbox.fs.searchFiles(workDir, args.pattern);
|
|
179
|
-
return result.files.join('\n');
|
|
180
|
-
},
|
|
181
|
-
},
|
|
182
|
-
/**
|
|
183
|
-
* Searches for text patterns in files and returns matching lines
|
|
184
|
-
* @param pattern - Text pattern to search for
|
|
185
|
-
*/
|
|
186
|
-
grep: {
|
|
187
|
-
description: "Searches for text pattern in files in Daytona sandbox",
|
|
188
|
-
args: {
|
|
189
|
-
pattern: z.string(),
|
|
190
|
-
},
|
|
191
|
-
async execute(args, ctx) {
|
|
192
|
-
const sandbox = await sessionManager.getSandbox(ctx.sessionID, projectId, worktree);
|
|
193
|
-
const workDir = await sandbox.getWorkDir();
|
|
194
|
-
const matches = await sandbox.fs.findFiles(workDir, args.pattern);
|
|
195
|
-
return matches.map((m) => `${m.file}:${m.line}: ${m.content}`).join('\n');
|
|
196
|
-
},
|
|
197
|
-
},
|
|
198
|
-
/**
|
|
199
|
-
* Performs LSP (Language Server Protocol) operations for code intelligence (not yet implemented)
|
|
200
|
-
* @param op - LSP operation to perform
|
|
201
|
-
* @param filePath - Path to the file
|
|
202
|
-
* @param line - Line number
|
|
203
|
-
*/
|
|
204
|
-
lsp: {
|
|
205
|
-
description: "LSP operation in Daytona sandbox (code intelligence)",
|
|
206
|
-
args: {
|
|
207
|
-
op: z.string(),
|
|
208
|
-
filePath: z.string(),
|
|
209
|
-
line: z.number(),
|
|
210
|
-
},
|
|
211
|
-
async execute(args, ctx) {
|
|
212
|
-
return `LSP operations are not yet implemented in the Daytona plugin.`;
|
|
213
|
-
},
|
|
214
|
-
},
|
|
215
|
-
/**
|
|
216
|
-
* Gets a preview URL for the Daytona sandbox
|
|
217
|
-
* @param port - Port number to preview
|
|
218
|
-
*/
|
|
219
|
-
getPreviewURL: {
|
|
220
|
-
description: "Gets a preview URL for the Daytona sandbox",
|
|
221
|
-
args: {
|
|
222
|
-
port: z.number(),
|
|
223
|
-
},
|
|
224
|
-
async execute(args, ctx) {
|
|
225
|
-
const sandbox = await sessionManager.getSandbox(ctx.sessionID, projectId, worktree);
|
|
226
|
-
const previewLink = await sandbox.getPreviewLink(args.port);
|
|
227
|
-
return `Sandbox Preview URL: ${previewLink.url}`;
|
|
228
|
-
},
|
|
229
|
-
},
|
|
230
|
-
};
|
|
231
|
-
}
|
|
232
|
-
//# sourceMappingURL=tools.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../../../../.opencode/plugin/daytona/tools.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,MAA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AAE;gBACJ,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;aACjB;YACD,KAAK,CAAC,OAAO,CAAC,IAAsB,EAAE,GAAgB;gBACpD,MAAM,OAAO,GAAG,MAAM,cAAc,CAAC,UAAU,CAAC,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;gBACpF,MAAM,WAAW,GAAG,MAAM,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBAC5D,OAAO,wBAAwB,WAAW,CAAC,GAAG,EAAE,CAAC;YACnD,CAAC;SACF;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Type definitions and constants for the Daytona OpenCode plugin
|
|
3
|
-
*/
|
|
4
|
-
import type { Sandbox } from "@daytonaio/sdk";
|
|
5
|
-
export type EventSessionDeleted = {
|
|
6
|
-
type: "session.deleted";
|
|
7
|
-
properties: {
|
|
8
|
-
info: {
|
|
9
|
-
id: string;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
export declare const EVENT_TYPE_SESSION_DELETED = "session.deleted";
|
|
14
|
-
export type LogLevel = 'INFO' | 'ERROR' | 'WARN';
|
|
15
|
-
export type SandboxInfo = {
|
|
16
|
-
id: string;
|
|
17
|
-
};
|
|
18
|
-
export type SessionInfo = {
|
|
19
|
-
sandboxId: string;
|
|
20
|
-
created: number;
|
|
21
|
-
lastAccessed: number;
|
|
22
|
-
};
|
|
23
|
-
export type ProjectSessionData = {
|
|
24
|
-
projectId: string;
|
|
25
|
-
worktree: string;
|
|
26
|
-
sessions: Record<string, SessionInfo>;
|
|
27
|
-
};
|
|
28
|
-
export type SessionSandboxMap = Map<string, Sandbox | SandboxInfo>;
|
|
29
|
-
export declare const LOG_LEVEL_INFO: LogLevel;
|
|
30
|
-
export declare const LOG_LEVEL_ERROR: LogLevel;
|
|
31
|
-
export declare const LOG_LEVEL_WARN: LogLevel;
|
|
32
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../.opencode/plugin/daytona/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAI9C,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,iBAAiB,CAAC;IACxB,UAAU,EAAE;QACV,IAAI,EAAE;YAAE,EAAE,EAAE,MAAM,CAAA;SAAE,CAAC;KACtB,CAAC;CACH,CAAC;AAIF,eAAO,MAAM,0BAA0B,oBAAoB,CAAC;AAI5D,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;AAEjD,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;CACvC,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,GAAG,CAAC,MAAM,EAAE,OAAO,GAAG,WAAW,CAAC,CAAC;AAInE,eAAO,MAAM,cAAc,EAAE,QAAiB,CAAC;AAC/C,eAAO,MAAM,eAAe,EAAE,QAAkB,CAAC;AACjD,eAAO,MAAM,cAAc,EAAE,QAAiB,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Type definitions and constants for the Daytona OpenCode plugin
|
|
3
|
-
*/
|
|
4
|
-
// OpenCode constants
|
|
5
|
-
export const EVENT_TYPE_SESSION_DELETED = 'session.deleted';
|
|
6
|
-
// Daytona plugin constants
|
|
7
|
-
export const LOG_LEVEL_INFO = 'INFO';
|
|
8
|
-
export const LOG_LEVEL_ERROR = 'ERROR';
|
|
9
|
-
export const LOG_LEVEL_WARN = 'WARN';
|
|
10
|
-
//# sourceMappingURL=types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../.opencode/plugin/daytona/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAaH,qBAAqB;AAErB,MAAM,CAAC,MAAM,0BAA0B,GAAG,iBAAiB,CAAC;AAwB5D,2BAA2B;AAE3B,MAAM,CAAC,MAAM,cAAc,GAAa,MAAM,CAAC;AAC/C,MAAM,CAAC,MAAM,eAAe,GAAa,OAAO,CAAC;AACjD,MAAM,CAAC,MAAM,cAAc,GAAa,MAAM,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../.opencode/plugin/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,cAAc,oBAAoB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../.opencode/plugin/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,cAAc,oBAAoB,CAAC"}
|