@daytonaio/opencode 0.143.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 (86) hide show
  1. package/.opencode/plugin/daytona/core/logger.d.ts +15 -0
  2. package/.opencode/plugin/daytona/core/logger.js +64 -0
  3. package/.opencode/plugin/daytona/core/logger.js.map +1 -0
  4. package/.opencode/plugin/daytona/core/project-data-storage.d.ts +42 -0
  5. package/.opencode/plugin/daytona/core/project-data-storage.js +171 -0
  6. package/.opencode/plugin/daytona/core/project-data-storage.js.map +1 -0
  7. package/.opencode/plugin/daytona/core/session-manager.d.ts +46 -0
  8. package/.opencode/plugin/daytona/core/session-manager.js +239 -0
  9. package/.opencode/plugin/daytona/core/session-manager.js.map +1 -0
  10. package/.opencode/plugin/daytona/core/toast.d.ts +47 -0
  11. package/.opencode/plugin/daytona/core/toast.js +73 -0
  12. package/.opencode/plugin/daytona/core/toast.js.map +1 -0
  13. package/.opencode/plugin/daytona/core/types.d.ts +53 -0
  14. package/.opencode/plugin/daytona/core/types.js +15 -0
  15. package/.opencode/plugin/daytona/core/types.js.map +1 -0
  16. package/.opencode/plugin/daytona/git/host-git-manager.d.ts +40 -0
  17. package/.opencode/plugin/daytona/git/host-git-manager.js +283 -0
  18. package/.opencode/plugin/daytona/git/host-git-manager.js.map +1 -0
  19. package/.opencode/plugin/daytona/git/index.d.ts +5 -0
  20. package/.opencode/plugin/daytona/git/index.js +10 -0
  21. package/.opencode/plugin/daytona/git/index.js.map +1 -0
  22. package/.opencode/plugin/daytona/git/sandbox-git-manager.d.ts +14 -0
  23. package/.opencode/plugin/daytona/git/sandbox-git-manager.js +68 -0
  24. package/.opencode/plugin/daytona/git/sandbox-git-manager.js.map +1 -0
  25. package/.opencode/plugin/daytona/git/session-git-manager.d.ts +43 -0
  26. package/.opencode/plugin/daytona/git/session-git-manager.js +132 -0
  27. package/.opencode/plugin/daytona/git/session-git-manager.js.map +1 -0
  28. package/.opencode/plugin/daytona/index.d.ts +10 -0
  29. package/.opencode/plugin/daytona/index.js +44 -0
  30. package/.opencode/plugin/daytona/index.js.map +1 -0
  31. package/.opencode/plugin/daytona/plugins/custom-tools.d.ts +11 -0
  32. package/.opencode/plugin/daytona/plugins/custom-tools.js +26 -0
  33. package/.opencode/plugin/daytona/plugins/custom-tools.js.map +1 -0
  34. package/.opencode/plugin/daytona/plugins/index.d.ts +11 -0
  35. package/.opencode/plugin/daytona/plugins/index.js +19 -0
  36. package/.opencode/plugin/daytona/plugins/index.js.map +1 -0
  37. package/.opencode/plugin/daytona/plugins/session-cleanup.d.ts +11 -0
  38. package/.opencode/plugin/daytona/plugins/session-cleanup.js +43 -0
  39. package/.opencode/plugin/daytona/plugins/session-cleanup.js.map +1 -0
  40. package/.opencode/plugin/daytona/plugins/session-idle-auto-commit.d.ts +10 -0
  41. package/.opencode/plugin/daytona/plugins/session-idle-auto-commit.js +54 -0
  42. package/.opencode/plugin/daytona/plugins/session-idle-auto-commit.js.map +1 -0
  43. package/.opencode/plugin/daytona/plugins/system-transform.d.ts +10 -0
  44. package/.opencode/plugin/daytona/plugins/system-transform.js +29 -0
  45. package/.opencode/plugin/daytona/plugins/system-transform.js.map +1 -0
  46. package/.opencode/plugin/daytona/tools/bash.d.ts +19 -0
  47. package/.opencode/plugin/daytona/tools/bash.js +42 -0
  48. package/.opencode/plugin/daytona/tools/bash.js.map +1 -0
  49. package/.opencode/plugin/daytona/tools/edit.d.ts +21 -0
  50. package/.opencode/plugin/daytona/tools/edit.js +27 -0
  51. package/.opencode/plugin/daytona/tools/edit.js.map +1 -0
  52. package/.opencode/plugin/daytona/tools/get-preview-url.d.ts +17 -0
  53. package/.opencode/plugin/daytona/tools/get-preview-url.js +21 -0
  54. package/.opencode/plugin/daytona/tools/get-preview-url.js.map +1 -0
  55. package/.opencode/plugin/daytona/tools/glob.d.ts +17 -0
  56. package/.opencode/plugin/daytona/tools/glob.js +25 -0
  57. package/.opencode/plugin/daytona/tools/glob.js.map +1 -0
  58. package/.opencode/plugin/daytona/tools/grep.d.ts +17 -0
  59. package/.opencode/plugin/daytona/tools/grep.js +25 -0
  60. package/.opencode/plugin/daytona/tools/grep.js.map +1 -0
  61. package/.opencode/plugin/daytona/tools/ls.d.ts +17 -0
  62. package/.opencode/plugin/daytona/tools/ls.js +26 -0
  63. package/.opencode/plugin/daytona/tools/ls.js.map +1 -0
  64. package/.opencode/plugin/daytona/tools/lsp.d.ts +21 -0
  65. package/.opencode/plugin/daytona/tools/lsp.js +21 -0
  66. package/.opencode/plugin/daytona/tools/lsp.js.map +1 -0
  67. package/.opencode/plugin/daytona/tools/multiedit.d.ts +25 -0
  68. package/.opencode/plugin/daytona/tools/multiedit.js +31 -0
  69. package/.opencode/plugin/daytona/tools/multiedit.js.map +1 -0
  70. package/.opencode/plugin/daytona/tools/patch.d.ts +19 -0
  71. package/.opencode/plugin/daytona/tools/patch.js +19 -0
  72. package/.opencode/plugin/daytona/tools/patch.js.map +1 -0
  73. package/.opencode/plugin/daytona/tools/read.d.ts +17 -0
  74. package/.opencode/plugin/daytona/tools/read.js +22 -0
  75. package/.opencode/plugin/daytona/tools/read.js.map +1 -0
  76. package/.opencode/plugin/daytona/tools/write.d.ts +19 -0
  77. package/.opencode/plugin/daytona/tools/write.js +22 -0
  78. package/.opencode/plugin/daytona/tools/write.js.map +1 -0
  79. package/.opencode/plugin/daytona/tools.d.ts +129 -0
  80. package/.opencode/plugin/daytona/tools.js +38 -0
  81. package/.opencode/plugin/daytona/tools.js.map +1 -0
  82. package/.opencode/plugin/index.d.ts +9 -0
  83. package/.opencode/plugin/index.js +13 -0
  84. package/.opencode/plugin/index.js.map +1 -0
  85. package/README.md +219 -0
  86. package/package.json +55 -0
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Copyright 2025 Daytona Platforms Inc.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ import { z } from 'zod';
6
+ import type { PluginInput } from '@opencode-ai/plugin';
7
+ import type { ToolContext } from '@opencode-ai/plugin/tool';
8
+ import type { DaytonaSessionManager } from '../core/session-manager';
9
+ export declare const globTool: (sessionManager: DaytonaSessionManager, projectId: string, worktree: string, pluginCtx: PluginInput) => {
10
+ description: string;
11
+ args: {
12
+ pattern: z.ZodString;
13
+ };
14
+ execute(args: {
15
+ pattern: string;
16
+ }, ctx: ToolContext): Promise<string>;
17
+ };
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright 2025 Daytona Platforms Inc.
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.globTool = void 0;
8
+ const zod_1 = require("zod");
9
+ const globTool = (sessionManager, projectId, worktree, pluginCtx) => ({
10
+ description: 'Searches for files matching a pattern in Daytona sandbox',
11
+ args: {
12
+ pattern: zod_1.z.string(),
13
+ },
14
+ async execute(args, ctx) {
15
+ const sandbox = await sessionManager.getSandbox(ctx.sessionID, projectId, worktree, pluginCtx);
16
+ const workDir = await sandbox.getWorkDir();
17
+ if (!workDir) {
18
+ throw new Error('Work directory not available');
19
+ }
20
+ const result = await sandbox.fs.searchFiles(workDir, args.pattern);
21
+ return result.files.join('\n');
22
+ },
23
+ });
24
+ exports.globTool = globTool;
25
+ //# sourceMappingURL=glob.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"glob.js","sourceRoot":"","sources":["../../../../../../../libs/opencode-plugin/.opencode/plugin/daytona/tools/glob.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,6BAAuB;AAKhB,MAAM,QAAQ,GAAG,CACtB,cAAqC,EACrC,SAAiB,EACjB,QAAgB,EAChB,SAAsB,EACtB,EAAE,CAAC,CAAC;IACJ,WAAW,EAAE,0DAA0D;IACvE,IAAI,EAAE;QACJ,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;KACpB;IACD,KAAK,CAAC,OAAO,CAAC,IAAyB,EAAE,GAAgB;QACvD,MAAM,OAAO,GAAG,MAAM,cAAc,CAAC,UAAU,CAAC,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAA;QAC9F,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,UAAU,EAAE,CAAA;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAA;QACjD,CAAC;QACD,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,EAAE,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,CAAA;QAClE,OAAO,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAChC,CAAC;CACF,CAAC,CAAA;AAnBW,QAAA,QAAQ,YAmBnB"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Copyright 2025 Daytona Platforms Inc.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ import { z } from 'zod';
6
+ import type { PluginInput } from '@opencode-ai/plugin';
7
+ import type { ToolContext } from '@opencode-ai/plugin/tool';
8
+ import type { DaytonaSessionManager } from '../core/session-manager';
9
+ export declare const grepTool: (sessionManager: DaytonaSessionManager, projectId: string, worktree: string, pluginCtx: PluginInput) => {
10
+ description: string;
11
+ args: {
12
+ pattern: z.ZodString;
13
+ };
14
+ execute(args: {
15
+ pattern: string;
16
+ }, ctx: ToolContext): Promise<string>;
17
+ };
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright 2025 Daytona Platforms Inc.
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.grepTool = void 0;
8
+ const zod_1 = require("zod");
9
+ const grepTool = (sessionManager, projectId, worktree, pluginCtx) => ({
10
+ description: 'Searches for text pattern in files in Daytona sandbox',
11
+ args: {
12
+ pattern: zod_1.z.string(),
13
+ },
14
+ async execute(args, ctx) {
15
+ const sandbox = await sessionManager.getSandbox(ctx.sessionID, projectId, worktree, pluginCtx);
16
+ const workDir = await sandbox.getWorkDir();
17
+ if (!workDir) {
18
+ throw new Error('Work directory not available');
19
+ }
20
+ const matches = await sandbox.fs.findFiles(workDir, args.pattern);
21
+ return matches.map((m) => `${m.file}:${m.line}: ${m.content}`).join('\n');
22
+ },
23
+ });
24
+ exports.grepTool = grepTool;
25
+ //# sourceMappingURL=grep.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"grep.js","sourceRoot":"","sources":["../../../../../../../libs/opencode-plugin/.opencode/plugin/daytona/tools/grep.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,6BAAuB;AAMhB,MAAM,QAAQ,GAAG,CACtB,cAAqC,EACrC,SAAiB,EACjB,QAAgB,EAChB,SAAsB,EACtB,EAAE,CAAC,CAAC;IACJ,WAAW,EAAE,uDAAuD;IACpE,IAAI,EAAE;QACJ,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;KACpB;IACD,KAAK,CAAC,OAAO,CAAC,IAAyB,EAAE,GAAgB;QACvD,MAAM,OAAO,GAAG,MAAM,cAAc,CAAC,UAAU,CAAC,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAA;QAC9F,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,UAAU,EAAE,CAAA;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAA;QACjD,CAAC;QACD,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,EAAE,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,CAAA;QACjE,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,CAAQ,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAClF,CAAC;CACF,CAAC,CAAA;AAnBW,QAAA,QAAQ,YAmBnB"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Copyright 2025 Daytona Platforms Inc.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ import { z } from 'zod';
6
+ import type { PluginInput } from '@opencode-ai/plugin';
7
+ import type { ToolContext } from '@opencode-ai/plugin/tool';
8
+ import type { DaytonaSessionManager } from '../core/session-manager';
9
+ export declare const lsTool: (sessionManager: DaytonaSessionManager, projectId: string, worktree: string, pluginCtx: PluginInput) => {
10
+ description: string;
11
+ args: {
12
+ dirPath: z.ZodOptional<z.ZodString>;
13
+ };
14
+ execute(args: {
15
+ dirPath?: string;
16
+ }, ctx: ToolContext): Promise<string>;
17
+ };
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright 2025 Daytona Platforms Inc.
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.lsTool = void 0;
8
+ const zod_1 = require("zod");
9
+ const lsTool = (sessionManager, projectId, worktree, pluginCtx) => ({
10
+ description: 'Lists files in a directory in Daytona sandbox',
11
+ args: {
12
+ dirPath: zod_1.z.string().optional(),
13
+ },
14
+ async execute(args, ctx) {
15
+ const sandbox = await sessionManager.getSandbox(ctx.sessionID, projectId, worktree, pluginCtx);
16
+ const workDir = await sandbox.getWorkDir();
17
+ const path = args.dirPath || workDir;
18
+ if (!path) {
19
+ throw new Error('Work directory not available');
20
+ }
21
+ const files = (await sandbox.fs.listFiles(path));
22
+ return files.map((f) => f.name).join('\n');
23
+ },
24
+ });
25
+ exports.lsTool = lsTool;
26
+ //# sourceMappingURL=ls.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ls.js","sourceRoot":"","sources":["../../../../../../../libs/opencode-plugin/.opencode/plugin/daytona/tools/ls.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,6BAAuB;AAMhB,MAAM,MAAM,GAAG,CACpB,cAAqC,EACrC,SAAiB,EACjB,QAAgB,EAChB,SAAsB,EACtB,EAAE,CAAC,CAAC;IACJ,WAAW,EAAE,+CAA+C;IAC5D,IAAI,EAAE;QACJ,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KAC/B;IACD,KAAK,CAAC,OAAO,CAAC,IAA0B,EAAE,GAAgB;QACxD,MAAM,OAAO,GAAG,MAAM,cAAc,CAAC,UAAU,CAAC,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAA;QAC9F,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,UAAU,EAAE,CAAA;QAC1C,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,IAAI,OAAO,CAAA;QACpC,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAA;QACjD,CAAC;QACD,MAAM,KAAK,GAAG,CAAC,MAAM,OAAO,CAAC,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,CAAe,CAAA;QAC9D,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC5C,CAAC;CACF,CAAC,CAAA;AApBW,QAAA,MAAM,UAoBjB"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Copyright 2025 Daytona Platforms Inc.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ import { z } from 'zod';
6
+ import type { PluginInput } from '@opencode-ai/plugin';
7
+ import type { ToolContext } from '@opencode-ai/plugin/tool';
8
+ import type { DaytonaSessionManager } from '../core/session-manager';
9
+ export declare const lspTool: (sessionManager: DaytonaSessionManager, projectId: string, worktree: string, pluginCtx: PluginInput) => {
10
+ description: string;
11
+ args: {
12
+ op: z.ZodString;
13
+ filePath: z.ZodString;
14
+ line: z.ZodNumber;
15
+ };
16
+ execute(args: {
17
+ op: string;
18
+ filePath: string;
19
+ line: number;
20
+ }, ctx: ToolContext): Promise<string>;
21
+ };
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright 2025 Daytona Platforms Inc.
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.lspTool = void 0;
8
+ const zod_1 = require("zod");
9
+ const lspTool = (sessionManager, projectId, worktree, pluginCtx) => ({
10
+ description: 'LSP operation in Daytona sandbox (code intelligence)',
11
+ args: {
12
+ op: zod_1.z.string(),
13
+ filePath: zod_1.z.string(),
14
+ line: zod_1.z.number(),
15
+ },
16
+ async execute(args, ctx) {
17
+ return `LSP operations are not yet implemented in the Daytona plugin.`;
18
+ },
19
+ });
20
+ exports.lspTool = lspTool;
21
+ //# sourceMappingURL=lsp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lsp.js","sourceRoot":"","sources":["../../../../../../../libs/opencode-plugin/.opencode/plugin/daytona/tools/lsp.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,6BAAuB;AAKhB,MAAM,OAAO,GAAG,CACrB,cAAqC,EACrC,SAAiB,EACjB,QAAgB,EAChB,SAAsB,EACtB,EAAE,CAAC,CAAC;IACJ,WAAW,EAAE,sDAAsD;IACnE,IAAI,EAAE;QACJ,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;QACd,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE;QACpB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;KACjB;IACD,KAAK,CAAC,OAAO,CAAC,IAAoD,EAAE,GAAgB;QAClF,OAAO,+DAA+D,CAAA;IACxE,CAAC;CACF,CAAC,CAAA;AAfW,QAAA,OAAO,WAelB"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Copyright 2025 Daytona Platforms Inc.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ import { z } from 'zod';
6
+ import type { PluginInput } from '@opencode-ai/plugin';
7
+ import type { ToolContext } from '@opencode-ai/plugin/tool';
8
+ import type { DaytonaSessionManager } from '../core/session-manager';
9
+ export declare const multieditTool: (sessionManager: DaytonaSessionManager, projectId: string, worktree: string, pluginCtx: PluginInput) => {
10
+ description: string;
11
+ args: {
12
+ filePath: z.ZodString;
13
+ edits: z.ZodArray<z.ZodObject<{
14
+ oldString: z.ZodString;
15
+ newString: z.ZodString;
16
+ }, z.core.$strip>>;
17
+ };
18
+ execute(args: {
19
+ filePath: string;
20
+ edits: Array<{
21
+ oldString: string;
22
+ newString: string;
23
+ }>;
24
+ }, ctx: ToolContext): Promise<string>;
25
+ };
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright 2025 Daytona Platforms Inc.
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.multieditTool = void 0;
8
+ const zod_1 = require("zod");
9
+ const multieditTool = (sessionManager, projectId, worktree, pluginCtx) => ({
10
+ description: 'Applies multiple edits to a file in Daytona sandbox atomically',
11
+ args: {
12
+ filePath: zod_1.z.string(),
13
+ edits: zod_1.z.array(zod_1.z.object({
14
+ oldString: zod_1.z.string(),
15
+ newString: zod_1.z.string(),
16
+ })),
17
+ },
18
+ async execute(args, ctx) {
19
+ const sandbox = await sessionManager.getSandbox(ctx.sessionID, projectId, worktree, pluginCtx);
20
+ const buffer = await sandbox.fs.downloadFile(args.filePath);
21
+ const decoder = new TextDecoder();
22
+ let content = decoder.decode(buffer);
23
+ for (const edit of args.edits) {
24
+ content = content.replace(edit.oldString, edit.newString);
25
+ }
26
+ await sandbox.fs.uploadFile(Buffer.from(content), args.filePath);
27
+ return `Applied ${args.edits.length} edits to ${args.filePath}`;
28
+ },
29
+ });
30
+ exports.multieditTool = multieditTool;
31
+ //# sourceMappingURL=multiedit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"multiedit.js","sourceRoot":"","sources":["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C;CACF,CAAC,CAAA;AA7BW,QAAA,aAAa,iBA6BxB"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Copyright 2025 Daytona Platforms Inc.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ import { z } from 'zod';
6
+ import type { PluginInput } from '@opencode-ai/plugin';
7
+ import type { ToolContext } from '@opencode-ai/plugin/tool';
8
+ import type { DaytonaSessionManager } from '../core/session-manager';
9
+ export declare const patchTool: (sessionManager: DaytonaSessionManager, projectId: string, worktree: string, pluginCtx: PluginInput) => {
10
+ description: string;
11
+ args: {
12
+ patchText: z.ZodString;
13
+ };
14
+ execute(args: {
15
+ filePath: string;
16
+ oldSnippet: string;
17
+ newSnippet: string;
18
+ }, ctx: ToolContext): Promise<string>;
19
+ };
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright 2025 Daytona Platforms Inc.
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.patchTool = void 0;
8
+ const zod_1 = require("zod");
9
+ const patchTool = (sessionManager, projectId, worktree, pluginCtx) => ({
10
+ description: 'Applies a patch to the project in Daytona sandbox',
11
+ args: {
12
+ patchText: zod_1.z.string().describe('The full patch text that describes all changes to be made'),
13
+ },
14
+ async execute(args, ctx) {
15
+ return `Patch operations are not yet implemented in the Daytona plugin.`;
16
+ },
17
+ });
18
+ exports.patchTool = patchTool;
19
+ //# sourceMappingURL=patch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"patch.js","sourceRoot":"","sources":["../../../../../../../libs/opencode-plugin/.opencode/plugin/daytona/tools/patch.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,6BAAuB;AAKhB,MAAM,SAAS,GAAG,CACvB,cAAqC,EACrC,SAAiB,EACjB,QAAgB,EAChB,SAAsB,EACtB,EAAE,CAAC,CAAC;IACJ,WAAW,EAAE,mDAAmD;IAChE,IAAI,EAAE;QACJ,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,2DAA2D,CAAC;KAC5F;IACD,KAAK,CAAC,OAAO,CAAC,IAAkE,EAAE,GAAgB;QAChG,OAAO,iEAAiE,CAAA;IAC1E,CAAC;CACF,CAAC,CAAA;AAbW,QAAA,SAAS,aAapB"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Copyright 2025 Daytona Platforms Inc.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ import { z } from 'zod';
6
+ import type { PluginInput } from '@opencode-ai/plugin';
7
+ import type { ToolContext } from '@opencode-ai/plugin/tool';
8
+ import type { DaytonaSessionManager } from '../core/session-manager';
9
+ export declare const readTool: (sessionManager: DaytonaSessionManager, projectId: string, worktree: string, pluginCtx: PluginInput) => {
10
+ description: string;
11
+ args: {
12
+ filePath: z.ZodString;
13
+ };
14
+ execute(args: {
15
+ filePath: string;
16
+ }, ctx: ToolContext): Promise<string>;
17
+ };
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright 2025 Daytona Platforms Inc.
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.readTool = void 0;
8
+ const zod_1 = require("zod");
9
+ const readTool = (sessionManager, projectId, worktree, pluginCtx) => ({
10
+ description: 'Reads file from Daytona sandbox',
11
+ args: {
12
+ filePath: zod_1.z.string(),
13
+ },
14
+ async execute(args, ctx) {
15
+ const sandbox = await sessionManager.getSandbox(ctx.sessionID, projectId, worktree, pluginCtx);
16
+ const buffer = await sandbox.fs.downloadFile(args.filePath);
17
+ const decoder = new TextDecoder();
18
+ return decoder.decode(buffer);
19
+ },
20
+ });
21
+ exports.readTool = readTool;
22
+ //# sourceMappingURL=read.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"read.js","sourceRoot":"","sources":["../../../../../../../libs/opencode-plugin/.opencode/plugin/daytona/tools/read.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,6BAAuB;AAKhB,MAAM,QAAQ,GAAG,CACtB,cAAqC,EACrC,SAAiB,EACjB,QAAgB,EAChB,SAAsB,EACtB,EAAE,CAAC,CAAC;IACJ,WAAW,EAAE,iCAAiC;IAC9C,IAAI,EAAE;QACJ,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE;KACrB;IACD,KAAK,CAAC,OAAO,CAAC,IAA0B,EAAE,GAAgB;QACxD,MAAM,OAAO,GAAG,MAAM,cAAc,CAAC,UAAU,CAAC,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAA;QAC9F,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;QAC3D,MAAM,OAAO,GAAG,IAAI,WAAW,EAAE,CAAA;QACjC,OAAO,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;IAC/B,CAAC;CACF,CAAC,CAAA;AAhBW,QAAA,QAAQ,YAgBnB"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Copyright 2025 Daytona Platforms Inc.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ import { z } from 'zod';
6
+ import type { PluginInput } from '@opencode-ai/plugin';
7
+ import type { ToolContext } from '@opencode-ai/plugin/tool';
8
+ import type { DaytonaSessionManager } from '../core/session-manager';
9
+ export declare const writeTool: (sessionManager: DaytonaSessionManager, projectId: string, worktree: string, pluginCtx: PluginInput) => {
10
+ description: string;
11
+ args: {
12
+ filePath: z.ZodString;
13
+ content: z.ZodString;
14
+ };
15
+ execute(args: {
16
+ filePath: string;
17
+ content: string;
18
+ }, ctx: ToolContext): Promise<string>;
19
+ };
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright 2025 Daytona Platforms Inc.
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.writeTool = void 0;
8
+ const zod_1 = require("zod");
9
+ const writeTool = (sessionManager, projectId, worktree, pluginCtx) => ({
10
+ description: 'Writes content to file in Daytona sandbox',
11
+ args: {
12
+ filePath: zod_1.z.string(),
13
+ content: zod_1.z.string(),
14
+ },
15
+ async execute(args, ctx) {
16
+ const sandbox = await sessionManager.getSandbox(ctx.sessionID, projectId, worktree, pluginCtx);
17
+ await sandbox.fs.uploadFile(Buffer.from(args.content), args.filePath);
18
+ return `Written ${args.content.length} bytes to ${args.filePath}`;
19
+ },
20
+ });
21
+ exports.writeTool = writeTool;
22
+ //# sourceMappingURL=write.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"write.js","sourceRoot":"","sources":["../../../../../../../libs/opencode-plugin/.opencode/plugin/daytona/tools/write.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,6BAAuB;AAKhB,MAAM,SAAS,GAAG,CACvB,cAAqC,EACrC,SAAiB,EACjB,QAAgB,EAChB,SAAsB,EACtB,EAAE,CAAC,CAAC;IACJ,WAAW,EAAE,2CAA2C;IACxD,IAAI,EAAE;QACJ,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE;QACpB,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;KACpB;IACD,KAAK,CAAC,OAAO,CAAC,IAA2C,EAAE,GAAgB;QACzE,MAAM,OAAO,GAAG,MAAM,cAAc,CAAC,UAAU,CAAC,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAA;QAC9F,MAAM,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;QACrE,OAAO,WAAW,IAAI,CAAC,OAAO,CAAC,MAAM,aAAa,IAAI,CAAC,QAAQ,EAAE,CAAA;IACnE,CAAC;CACF,CAAC,CAAA;AAhBW,QAAA,SAAS,aAgBpB"}
@@ -0,0 +1,129 @@
1
+ /**
2
+ * Copyright 2025 Daytona Platforms Inc.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ import type { DaytonaSessionManager } from './core/session-manager';
6
+ import type { PluginInput } from '@opencode-ai/plugin';
7
+ export declare function createDaytonaTools(sessionManager: DaytonaSessionManager, projectId: string, worktree: string, pluginCtx: PluginInput): {
8
+ bash: {
9
+ description: string;
10
+ args: {
11
+ command: import("zod").ZodString;
12
+ background: import("zod").ZodOptional<import("zod").ZodBoolean>;
13
+ };
14
+ execute(args: {
15
+ command: string;
16
+ background?: boolean;
17
+ }, ctx: import("@opencode-ai/plugin/tool", { with: { "resolution-mode": "import" } }).ToolContext): Promise<string>;
18
+ };
19
+ read: {
20
+ description: string;
21
+ args: {
22
+ filePath: import("zod").ZodString;
23
+ };
24
+ execute(args: {
25
+ filePath: string;
26
+ }, ctx: import("@opencode-ai/plugin/tool", { with: { "resolution-mode": "import" } }).ToolContext): Promise<string>;
27
+ };
28
+ write: {
29
+ description: string;
30
+ args: {
31
+ filePath: import("zod").ZodString;
32
+ content: import("zod").ZodString;
33
+ };
34
+ execute(args: {
35
+ filePath: string;
36
+ content: string;
37
+ }, ctx: import("@opencode-ai/plugin/tool", { with: { "resolution-mode": "import" } }).ToolContext): Promise<string>;
38
+ };
39
+ edit: {
40
+ description: string;
41
+ args: {
42
+ filePath: import("zod").ZodString;
43
+ oldString: import("zod").ZodString;
44
+ newString: import("zod").ZodString;
45
+ };
46
+ execute(args: {
47
+ filePath: string;
48
+ oldString: string;
49
+ newString: string;
50
+ }, ctx: import("@opencode-ai/plugin/tool", { with: { "resolution-mode": "import" } }).ToolContext): Promise<string>;
51
+ };
52
+ multiedit: {
53
+ description: string;
54
+ args: {
55
+ filePath: import("zod").ZodString;
56
+ edits: import("zod").ZodArray<import("zod").ZodObject<{
57
+ oldString: import("zod").ZodString;
58
+ newString: import("zod").ZodString;
59
+ }, import("zod/v4/core").$strip>>;
60
+ };
61
+ execute(args: {
62
+ filePath: string;
63
+ edits: Array<{
64
+ oldString: string;
65
+ newString: string;
66
+ }>;
67
+ }, ctx: import("@opencode-ai/plugin/tool", { with: { "resolution-mode": "import" } }).ToolContext): Promise<string>;
68
+ };
69
+ patch: {
70
+ description: string;
71
+ args: {
72
+ patchText: import("zod").ZodString;
73
+ };
74
+ execute(args: {
75
+ filePath: string;
76
+ oldSnippet: string;
77
+ newSnippet: string;
78
+ }, ctx: import("@opencode-ai/plugin/tool", { with: { "resolution-mode": "import" } }).ToolContext): Promise<string>;
79
+ };
80
+ ls: {
81
+ description: string;
82
+ args: {
83
+ dirPath: import("zod").ZodOptional<import("zod").ZodString>;
84
+ };
85
+ execute(args: {
86
+ dirPath?: string;
87
+ }, ctx: import("@opencode-ai/plugin/tool", { with: { "resolution-mode": "import" } }).ToolContext): Promise<string>;
88
+ };
89
+ glob: {
90
+ description: string;
91
+ args: {
92
+ pattern: import("zod").ZodString;
93
+ };
94
+ execute(args: {
95
+ pattern: string;
96
+ }, ctx: import("@opencode-ai/plugin/tool", { with: { "resolution-mode": "import" } }).ToolContext): Promise<string>;
97
+ };
98
+ grep: {
99
+ description: string;
100
+ args: {
101
+ pattern: import("zod").ZodString;
102
+ };
103
+ execute(args: {
104
+ pattern: string;
105
+ }, ctx: import("@opencode-ai/plugin/tool", { with: { "resolution-mode": "import" } }).ToolContext): Promise<string>;
106
+ };
107
+ lsp: {
108
+ description: string;
109
+ args: {
110
+ op: import("zod").ZodString;
111
+ filePath: import("zod").ZodString;
112
+ line: import("zod").ZodNumber;
113
+ };
114
+ execute(args: {
115
+ op: string;
116
+ filePath: string;
117
+ line: number;
118
+ }, ctx: import("@opencode-ai/plugin/tool", { with: { "resolution-mode": "import" } }).ToolContext): Promise<string>;
119
+ };
120
+ getPreviewURL: {
121
+ description: string;
122
+ args: {
123
+ port: import("zod").ZodNumber;
124
+ };
125
+ execute(args: {
126
+ port: number;
127
+ }, ctx: import("@opencode-ai/plugin/tool", { with: { "resolution-mode": "import" } }).ToolContext): Promise<string>;
128
+ };
129
+ };
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright 2025 Daytona Platforms Inc.
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.createDaytonaTools = createDaytonaTools;
8
+ /**
9
+ * Tool implementations for Daytona sandbox integration
10
+ */
11
+ const bash_1 = require("./tools/bash");
12
+ const read_1 = require("./tools/read");
13
+ const write_1 = require("./tools/write");
14
+ const edit_1 = require("./tools/edit");
15
+ const multiedit_1 = require("./tools/multiedit");
16
+ const patch_1 = require("./tools/patch");
17
+ const ls_1 = require("./tools/ls");
18
+ const glob_1 = require("./tools/glob");
19
+ const grep_1 = require("./tools/grep");
20
+ const lsp_1 = require("./tools/lsp");
21
+ const get_preview_url_1 = require("./tools/get-preview-url");
22
+ function createDaytonaTools(sessionManager, projectId, worktree, pluginCtx) {
23
+ const repoPath = sessionManager.repoPath;
24
+ return {
25
+ bash: (0, bash_1.bashTool)(sessionManager, projectId, worktree, pluginCtx, repoPath),
26
+ read: (0, read_1.readTool)(sessionManager, projectId, worktree, pluginCtx),
27
+ write: (0, write_1.writeTool)(sessionManager, projectId, worktree, pluginCtx),
28
+ edit: (0, edit_1.editTool)(sessionManager, projectId, worktree, pluginCtx),
29
+ multiedit: (0, multiedit_1.multieditTool)(sessionManager, projectId, worktree, pluginCtx),
30
+ patch: (0, patch_1.patchTool)(sessionManager, projectId, worktree, pluginCtx),
31
+ ls: (0, ls_1.lsTool)(sessionManager, projectId, worktree, pluginCtx),
32
+ glob: (0, glob_1.globTool)(sessionManager, projectId, worktree, pluginCtx),
33
+ grep: (0, grep_1.grepTool)(sessionManager, projectId, worktree, pluginCtx),
34
+ lsp: (0, lsp_1.lspTool)(sessionManager, projectId, worktree, pluginCtx),
35
+ getPreviewURL: (0, get_preview_url_1.getPreviewURLTool)(sessionManager, projectId, worktree, pluginCtx),
36
+ };
37
+ }
38
+ //# sour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SAAS,EAAE,QAAQ,EAAE,SAAS,CAAC;QAC9D,GAAG,EAAE,IAAA,aAAO,EAAC,cAAc,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,CAAC;QAC5D,aAAa,EAAE,IAAA,mCAAiB,EAAC,cAAc,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,CAAC;KACjF,CAAA;AACH,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Copyright 2025 Daytona Platforms Inc.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ /**
6
+ * Main entry point for the OpenCode Daytona plugin
7
+ * Re-exports all plugin components from the daytona module
8
+ */
9
+ export * from './daytona/index.js';
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright 2025 Daytona Platforms Inc.
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ const tslib_1 = require("tslib");
8
+ /**
9
+ * Main entry point for the OpenCode Daytona plugin
10
+ * Re-exports all plugin components from the daytona module
11
+ */
12
+ tslib_1.__exportStar(require("./daytona/index.js"), exports);
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/opencode-plugin/.opencode/plugin/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;;GAGG;AAEH,6DAAkC"}