@veris-ai/daytona-opencode 0.1.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 (106) hide show
  1. package/.opencode/plugin/daytona/core/logger.d.ts +15 -0
  2. package/.opencode/plugin/daytona/core/logger.js +65 -0
  3. package/.opencode/plugin/daytona/core/logger.js.map +1 -0
  4. package/.opencode/plugin/daytona/core/logger.ts +71 -0
  5. package/.opencode/plugin/daytona/core/project-data-storage.d.ts +63 -0
  6. package/.opencode/plugin/daytona/core/project-data-storage.js +213 -0
  7. package/.opencode/plugin/daytona/core/project-data-storage.js.map +1 -0
  8. package/.opencode/plugin/daytona/core/project-data-storage.ts +234 -0
  9. package/.opencode/plugin/daytona/core/session-manager.d.ts +74 -0
  10. package/.opencode/plugin/daytona/core/session-manager.js +441 -0
  11. package/.opencode/plugin/daytona/core/session-manager.js.map +1 -0
  12. package/.opencode/plugin/daytona/core/session-manager.ts +471 -0
  13. package/.opencode/plugin/daytona/core/toast.d.ts +47 -0
  14. package/.opencode/plugin/daytona/core/toast.js +70 -0
  15. package/.opencode/plugin/daytona/core/toast.js.map +1 -0
  16. package/.opencode/plugin/daytona/core/toast.ts +96 -0
  17. package/.opencode/plugin/daytona/core/types.d.ts +53 -0
  18. package/.opencode/plugin/daytona/core/types.js +12 -0
  19. package/.opencode/plugin/daytona/core/types.js.map +1 -0
  20. package/.opencode/plugin/daytona/core/types.ts +72 -0
  21. package/.opencode/plugin/daytona/git/host-git-manager.d.ts +58 -0
  22. package/.opencode/plugin/daytona/git/host-git-manager.js +342 -0
  23. package/.opencode/plugin/daytona/git/host-git-manager.js.map +1 -0
  24. package/.opencode/plugin/daytona/git/host-git-manager.ts +372 -0
  25. package/.opencode/plugin/daytona/git/index.d.ts +5 -0
  26. package/.opencode/plugin/daytona/git/index.js +6 -0
  27. package/.opencode/plugin/daytona/git/index.js.map +1 -0
  28. package/.opencode/plugin/daytona/git/index.ts +6 -0
  29. package/.opencode/plugin/daytona/git/sandbox-git-manager.d.ts +22 -0
  30. package/.opencode/plugin/daytona/git/sandbox-git-manager.js +80 -0
  31. package/.opencode/plugin/daytona/git/sandbox-git-manager.js.map +1 -0
  32. package/.opencode/plugin/daytona/git/sandbox-git-manager.ts +92 -0
  33. package/.opencode/plugin/daytona/git/session-git-manager.d.ts +54 -0
  34. package/.opencode/plugin/daytona/git/session-git-manager.js +184 -0
  35. package/.opencode/plugin/daytona/git/session-git-manager.js.map +1 -0
  36. package/.opencode/plugin/daytona/git/session-git-manager.ts +203 -0
  37. package/.opencode/plugin/daytona/index.d.ts +125 -0
  38. package/.opencode/plugin/daytona/index.js +60 -0
  39. package/.opencode/plugin/daytona/index.js.map +1 -0
  40. package/.opencode/plugin/daytona/index.ts +73 -0
  41. package/.opencode/plugin/daytona/plugins/custom-tools.d.ts +122 -0
  42. package/.opencode/plugin/daytona/plugins/custom-tools.js +18 -0
  43. package/.opencode/plugin/daytona/plugins/custom-tools.js.map +1 -0
  44. package/.opencode/plugin/daytona/plugins/custom-tools.ts +21 -0
  45. package/.opencode/plugin/daytona/plugins/session-events.d.ts +10 -0
  46. package/.opencode/plugin/daytona/plugins/session-events.js +63 -0
  47. package/.opencode/plugin/daytona/plugins/session-events.js.map +1 -0
  48. package/.opencode/plugin/daytona/plugins/session-events.ts +61 -0
  49. package/.opencode/plugin/daytona/plugins/system-transform.d.ts +10 -0
  50. package/.opencode/plugin/daytona/plugins/system-transform.js +38 -0
  51. package/.opencode/plugin/daytona/plugins/system-transform.js.map +1 -0
  52. package/.opencode/plugin/daytona/plugins/system-transform.ts +43 -0
  53. package/.opencode/plugin/daytona/tools/bash.d.ts +19 -0
  54. package/.opencode/plugin/daytona/tools/bash.js +42 -0
  55. package/.opencode/plugin/daytona/tools/bash.js.map +1 -0
  56. package/.opencode/plugin/daytona/tools/bash.ts +51 -0
  57. package/.opencode/plugin/daytona/tools/edit.d.ts +21 -0
  58. package/.opencode/plugin/daytona/tools/edit.js +33 -0
  59. package/.opencode/plugin/daytona/tools/edit.js.map +1 -0
  60. package/.opencode/plugin/daytona/tools/edit.ts +44 -0
  61. package/.opencode/plugin/daytona/tools/get-preview-url.d.ts +17 -0
  62. package/.opencode/plugin/daytona/tools/get-preview-url.js +17 -0
  63. package/.opencode/plugin/daytona/tools/get-preview-url.js.map +1 -0
  64. package/.opencode/plugin/daytona/tools/get-preview-url.ts +26 -0
  65. package/.opencode/plugin/daytona/tools/git-sync.d.ts +12 -0
  66. package/.opencode/plugin/daytona/tools/git-sync.js +26 -0
  67. package/.opencode/plugin/daytona/tools/git-sync.js.map +1 -0
  68. package/.opencode/plugin/daytona/tools/git-sync.ts +36 -0
  69. package/.opencode/plugin/daytona/tools/glob.d.ts +17 -0
  70. package/.opencode/plugin/daytona/tools/glob.js +21 -0
  71. package/.opencode/plugin/daytona/tools/glob.js.map +1 -0
  72. package/.opencode/plugin/daytona/tools/glob.ts +30 -0
  73. package/.opencode/plugin/daytona/tools/grep.d.ts +17 -0
  74. package/.opencode/plugin/daytona/tools/grep.js +29 -0
  75. package/.opencode/plugin/daytona/tools/grep.js.map +1 -0
  76. package/.opencode/plugin/daytona/tools/grep.ts +39 -0
  77. package/.opencode/plugin/daytona/tools/ls.d.ts +17 -0
  78. package/.opencode/plugin/daytona/tools/ls.js +22 -0
  79. package/.opencode/plugin/daytona/tools/ls.js.map +1 -0
  80. package/.opencode/plugin/daytona/tools/ls.ts +32 -0
  81. package/.opencode/plugin/daytona/tools/multiedit.d.ts +25 -0
  82. package/.opencode/plugin/daytona/tools/multiedit.js +37 -0
  83. package/.opencode/plugin/daytona/tools/multiedit.js.map +1 -0
  84. package/.opencode/plugin/daytona/tools/multiedit.ts +54 -0
  85. package/.opencode/plugin/daytona/tools/read.d.ts +17 -0
  86. package/.opencode/plugin/daytona/tools/read.js +18 -0
  87. package/.opencode/plugin/daytona/tools/read.js.map +1 -0
  88. package/.opencode/plugin/daytona/tools/read.ts +27 -0
  89. package/.opencode/plugin/daytona/tools/veris-receipt.d.ts +26 -0
  90. package/.opencode/plugin/daytona/tools/veris-receipt.js +76 -0
  91. package/.opencode/plugin/daytona/tools/veris-receipt.js.map +1 -0
  92. package/.opencode/plugin/daytona/tools/veris-receipt.ts +103 -0
  93. package/.opencode/plugin/daytona/tools/write.d.ts +19 -0
  94. package/.opencode/plugin/daytona/tools/write.js +18 -0
  95. package/.opencode/plugin/daytona/tools/write.js.map +1 -0
  96. package/.opencode/plugin/daytona/tools/write.ts +27 -0
  97. package/.opencode/plugin/daytona/tools.d.ts +119 -0
  98. package/.opencode/plugin/daytona/tools.js +35 -0
  99. package/.opencode/plugin/daytona/tools.js.map +1 -0
  100. package/.opencode/plugin/daytona/tools.ts +45 -0
  101. package/.opencode/plugin/index.d.ts +9 -0
  102. package/.opencode/plugin/index.js +10 -0
  103. package/.opencode/plugin/index.js.map +1 -0
  104. package/.opencode/plugin/index.ts +11 -0
  105. package/README.md +87 -0
  106. package/package.json +52 -0
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Copyright Daytona Platforms Inc.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ import { z } from 'zod';
6
+ export const getPreviewURLTool = (sessionManager, projectId, worktree, pluginCtx) => ({
7
+ description: 'Gets a preview URL for the Daytona sandbox',
8
+ args: {
9
+ port: z.number().int().min(1).max(65535),
10
+ },
11
+ async execute(args, ctx) {
12
+ const sandbox = await sessionManager.getSandbox(ctx.sessionID, projectId, worktree, pluginCtx);
13
+ const previewLink = await sandbox.getPreviewLink(args.port);
14
+ return `Sandbox Preview URL: ${previewLink.url}`;
15
+ },
16
+ });
17
+ //# sourceMappingURL=get-preview-url.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-preview-url.js","sourceRoot":"","sources":["get-preview-url.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAKvB,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,cAAqC,EACrC,SAAiB,EACjB,QAAgB,EAChB,SAAsB,EACtB,EAAE,CAAC,CAAC;IACJ,WAAW,EAAE,4CAA4C;IACzD,IAAI,EAAE;QACJ,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC;KACzC;IACD,KAAK,CAAC,OAAO,CAAC,IAAsB,EAAE,GAAgB;QACpD,MAAM,OAAO,GAAG,MAAM,cAAc,CAAC,UAAU,CAAC,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAA;QAC9F,MAAM,WAAW,GAAG,MAAM,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC3D,OAAO,wBAAwB,WAAW,CAAC,GAAG,EAAE,CAAA;IAClD,CAAC;CACF,CAAC,CAAA"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Copyright Daytona Platforms Inc.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+
6
+ import { z } from 'zod'
7
+ import type { PluginInput } from '@opencode-ai/plugin'
8
+ import type { ToolContext } from '@opencode-ai/plugin/tool'
9
+ import type { DaytonaSessionManager } from '../core/session-manager'
10
+
11
+ export const getPreviewURLTool = (
12
+ sessionManager: DaytonaSessionManager,
13
+ projectId: string,
14
+ worktree: string,
15
+ pluginCtx: PluginInput,
16
+ ) => ({
17
+ description: 'Gets a preview URL for the Daytona sandbox',
18
+ args: {
19
+ port: z.number().int().min(1).max(65535),
20
+ },
21
+ async execute(args: { port: number }, ctx: ToolContext) {
22
+ const sandbox = await sessionManager.getSandbox(ctx.sessionID, projectId, worktree, pluginCtx)
23
+ const previewLink = await sandbox.getPreviewLink(args.port)
24
+ return `Sandbox Preview URL: ${previewLink.url}`
25
+ },
26
+ })
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Copyright Daytona Platforms Inc.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ import type { PluginInput } from '@opencode-ai/plugin';
6
+ import type { ToolContext } from '@opencode-ai/plugin/tool';
7
+ import type { DaytonaSessionManager } from '../core/session-manager';
8
+ export declare const gitSyncTool: (sessionManager: DaytonaSessionManager, projectId: string, worktree: string, pluginCtx: PluginInput) => {
9
+ description: string;
10
+ args: {};
11
+ execute(_args: {}, ctx: ToolContext): Promise<string>;
12
+ };
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Copyright Daytona Platforms Inc.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ import { SessionGitManager } from '../git/session-git-manager';
6
+ export const gitSyncTool = (sessionManager, projectId, worktree, pluginCtx) => ({
7
+ description: 'Commits pending changes in the Daytona sandbox and pulls them into the local opencode/N branch. Returns only after the changes are in the local repository, and fails with the git error otherwise. Use as the final step when the user asks to sync, hand off, or finalize sandbox changes.',
8
+ args: {},
9
+ async execute(_args, ctx) {
10
+ const sessionId = ctx.sessionID;
11
+ if (!sessionManager.hasSandbox(sessionId, projectId)) {
12
+ return 'No sandbox exists for this session; nothing to sync.';
13
+ }
14
+ const sandbox = await sessionManager.getSandbox(sessionId, projectId, worktree, pluginCtx);
15
+ const branchNumber = sessionManager.getBranchNumberForSandbox(projectId, sandbox.id);
16
+ if (!branchNumber) {
17
+ return 'Git syncing is disabled for this session (no local git repository); nothing to sync.';
18
+ }
19
+ const sessionGit = new SessionGitManager(sandbox, sessionManager.repoPath, worktree, branchNumber);
20
+ const didSync = await SessionGitManager.enqueueSessionSync(sessionId, () => sessionGit.autoCommitAndPull(pluginCtx));
21
+ return didSync
22
+ ? `Synced sandbox changes to local branch opencode/${branchNumber}.`
23
+ : 'No changes to sync; the local repository is already up to date.';
24
+ },
25
+ });
26
+ //# sourceMappingURL=git-sync.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"git-sync.js","sourceRoot":"","sources":["git-sync.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAE9D,MAAM,CAAC,MAAM,WAAW,GAAG,CACzB,cAAqC,EACrC,SAAiB,EACjB,QAAgB,EAChB,SAAsB,EACtB,EAAE,CAAC,CAAC;IACJ,WAAW,EACT,8RAA8R;IAChS,IAAI,EAAE,EAAE;IACR,KAAK,CAAC,OAAO,CAAC,KAAS,EAAE,GAAgB;QACvC,MAAM,SAAS,GAAG,GAAG,CAAC,SAAS,CAAA;QAC/B,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,SAAS,EAAE,SAAS,CAAC,EAAE,CAAC;YACrD,OAAO,sDAAsD,CAAA;QAC/D,CAAC;QACD,MAAM,OAAO,GAAG,MAAM,cAAc,CAAC,UAAU,CAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAA;QAC1F,MAAM,YAAY,GAAG,cAAc,CAAC,yBAAyB,CAAC,SAAS,EAAE,OAAO,CAAC,EAAE,CAAC,CAAA;QACpF,IAAI,CAAC,YAAY,EAAE,CAAC;YAClB,OAAO,sFAAsF,CAAA;QAC/F,CAAC;QACD,MAAM,UAAU,GAAG,IAAI,iBAAiB,CAAC,OAAO,EAAE,cAAc,CAAC,QAAQ,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAA;QAClG,MAAM,OAAO,GAAG,MAAM,iBAAiB,CAAC,kBAAkB,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC,CAAA;QACpH,OAAO,OAAO;YACZ,CAAC,CAAC,mDAAmD,YAAY,GAAG;YACpE,CAAC,CAAC,iEAAiE,CAAA;IACvE,CAAC;CACF,CAAC,CAAA"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Copyright Daytona Platforms Inc.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+
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
+ import { SessionGitManager } from '../git/session-git-manager'
10
+
11
+ export const gitSyncTool = (
12
+ sessionManager: DaytonaSessionManager,
13
+ projectId: string,
14
+ worktree: string,
15
+ pluginCtx: PluginInput,
16
+ ) => ({
17
+ description:
18
+ 'Commits pending changes in the Daytona sandbox and pulls them into the local opencode/N branch. Returns only after the changes are in the local repository, and fails with the git error otherwise. Use as the final step when the user asks to sync, hand off, or finalize sandbox changes.',
19
+ args: {},
20
+ async execute(_args: {}, ctx: ToolContext) {
21
+ const sessionId = ctx.sessionID
22
+ if (!sessionManager.hasSandbox(sessionId, projectId)) {
23
+ return 'No sandbox exists for this session; nothing to sync.'
24
+ }
25
+ const sandbox = await sessionManager.getSandbox(sessionId, projectId, worktree, pluginCtx)
26
+ const branchNumber = sessionManager.getBranchNumberForSandbox(projectId, sandbox.id)
27
+ if (!branchNumber) {
28
+ return 'Git syncing is disabled for this session (no local git repository); nothing to sync.'
29
+ }
30
+ const sessionGit = new SessionGitManager(sandbox, sessionManager.repoPath, worktree, branchNumber)
31
+ const didSync = await SessionGitManager.enqueueSessionSync(sessionId, () => sessionGit.autoCommitAndPull(pluginCtx))
32
+ return didSync
33
+ ? `Synced sandbox changes to local branch opencode/${branchNumber}.`
34
+ : 'No changes to sync; the local repository is already up to date.'
35
+ },
36
+ })
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Copyright 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,21 @@
1
+ /**
2
+ * Copyright Daytona Platforms Inc.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ import { z } from 'zod';
6
+ export const globTool = (sessionManager, projectId, worktree, pluginCtx) => ({
7
+ description: 'Searches for files matching a pattern in Daytona sandbox',
8
+ args: {
9
+ pattern: z.string(),
10
+ },
11
+ async execute(args, ctx) {
12
+ const sandbox = await sessionManager.getSandbox(ctx.sessionID, projectId, worktree, pluginCtx);
13
+ const workDir = await sandbox.getWorkDir();
14
+ if (!workDir) {
15
+ throw new Error('Work directory not available');
16
+ }
17
+ const result = await sandbox.fs.searchFiles(workDir, args.pattern);
18
+ return result.files.join('\n');
19
+ },
20
+ });
21
+ //# sourceMappingURL=glob.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"glob.js","sourceRoot":"","sources":["glob.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAKvB,MAAM,CAAC,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,CAAC,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"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Copyright Daytona Platforms Inc.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+
6
+ import { z } from 'zod'
7
+ import type { PluginInput } from '@opencode-ai/plugin'
8
+ import type { ToolContext } from '@opencode-ai/plugin/tool'
9
+ import type { DaytonaSessionManager } from '../core/session-manager'
10
+
11
+ export const globTool = (
12
+ sessionManager: DaytonaSessionManager,
13
+ projectId: string,
14
+ worktree: string,
15
+ pluginCtx: PluginInput,
16
+ ) => ({
17
+ description: 'Searches for files matching a pattern in Daytona sandbox',
18
+ args: {
19
+ pattern: z.string(),
20
+ },
21
+ async execute(args: { pattern: string }, ctx: ToolContext) {
22
+ const sandbox = await sessionManager.getSandbox(ctx.sessionID, projectId, worktree, pluginCtx)
23
+ const workDir = await sandbox.getWorkDir()
24
+ if (!workDir) {
25
+ throw new Error('Work directory not available')
26
+ }
27
+ const result = await sandbox.fs.searchFiles(workDir, args.pattern)
28
+ return result.files.join('\n')
29
+ },
30
+ })
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Copyright 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,29 @@
1
+ /**
2
+ * Copyright Daytona Platforms Inc.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ import { z } from 'zod';
6
+ export const grepTool = (sessionManager, projectId, worktree, pluginCtx) => ({
7
+ description: 'Searches for text pattern in files in Daytona sandbox',
8
+ args: {
9
+ pattern: z.string(),
10
+ },
11
+ async execute(args, ctx) {
12
+ const sandbox = await sessionManager.getSandbox(ctx.sessionID, projectId, worktree, pluginCtx);
13
+ const workDir = await sandbox.getWorkDir();
14
+ if (!workDir) {
15
+ throw new Error('Work directory not available');
16
+ }
17
+ const matches = await sandbox.fs.findFiles(workDir, args.pattern);
18
+ const maxMatches = 100;
19
+ const formatted = matches
20
+ .slice(0, maxMatches)
21
+ .map((m) => `${m.file}:${m.line}: ${m.content}`)
22
+ .join('\n');
23
+ if (matches.length > maxMatches) {
24
+ return `${formatted}\n... (${matches.length - maxMatches} more matches truncated; refine your pattern)`;
25
+ }
26
+ return formatted;
27
+ },
28
+ });
29
+ //# sourceMappingURL=grep.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"grep.js","sourceRoot":"","sources":["grep.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAMvB,MAAM,CAAC,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,CAAC,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,MAAM,UAAU,GAAG,GAAG,CAAA;QACtB,MAAM,SAAS,GAAG,OAAO;aACtB,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC;aACpB,GAAG,CAAC,CAAC,CAAQ,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC;aACtD,IAAI,CAAC,IAAI,CAAC,CAAA;QACb,IAAI,OAAO,CAAC,MAAM,GAAG,UAAU,EAAE,CAAC;YAChC,OAAO,GAAG,SAAS,UAAU,OAAO,CAAC,MAAM,GAAG,UAAU,+CAA+C,CAAA;QACzG,CAAC;QACD,OAAO,SAAS,CAAA;IAClB,CAAC;CACF,CAAC,CAAA"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Copyright Daytona Platforms Inc.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+
6
+ import { z } from 'zod'
7
+ import type { Match } from '@daytona/sdk'
8
+ import type { PluginInput } from '@opencode-ai/plugin'
9
+ import type { ToolContext } from '@opencode-ai/plugin/tool'
10
+ import type { DaytonaSessionManager } from '../core/session-manager'
11
+
12
+ export const grepTool = (
13
+ sessionManager: DaytonaSessionManager,
14
+ projectId: string,
15
+ worktree: string,
16
+ pluginCtx: PluginInput,
17
+ ) => ({
18
+ description: 'Searches for text pattern in files in Daytona sandbox',
19
+ args: {
20
+ pattern: z.string(),
21
+ },
22
+ async execute(args: { pattern: string }, ctx: ToolContext) {
23
+ const sandbox = await sessionManager.getSandbox(ctx.sessionID, projectId, worktree, pluginCtx)
24
+ const workDir = await sandbox.getWorkDir()
25
+ if (!workDir) {
26
+ throw new Error('Work directory not available')
27
+ }
28
+ const matches = await sandbox.fs.findFiles(workDir, args.pattern)
29
+ const maxMatches = 100
30
+ const formatted = matches
31
+ .slice(0, maxMatches)
32
+ .map((m: Match) => `${m.file}:${m.line}: ${m.content}`)
33
+ .join('\n')
34
+ if (matches.length > maxMatches) {
35
+ return `${formatted}\n... (${matches.length - maxMatches} more matches truncated; refine your pattern)`
36
+ }
37
+ return formatted
38
+ },
39
+ })
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Copyright 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,22 @@
1
+ /**
2
+ * Copyright Daytona Platforms Inc.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ import { z } from 'zod';
6
+ export const lsTool = (sessionManager, projectId, worktree, pluginCtx) => ({
7
+ description: 'Lists files in a directory in Daytona sandbox',
8
+ args: {
9
+ dirPath: z.string().optional(),
10
+ },
11
+ async execute(args, ctx) {
12
+ const sandbox = await sessionManager.getSandbox(ctx.sessionID, projectId, worktree, pluginCtx);
13
+ const workDir = await sandbox.getWorkDir();
14
+ const path = args.dirPath || workDir;
15
+ if (!path) {
16
+ throw new Error('Work directory not available');
17
+ }
18
+ const files = (await sandbox.fs.listFiles(path));
19
+ return files.map((f) => f.name).join('\n');
20
+ },
21
+ });
22
+ //# sourceMappingURL=ls.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ls.js","sourceRoot":"","sources":["ls.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAMvB,MAAM,CAAC,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,CAAC,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"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Copyright Daytona Platforms Inc.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+
6
+ import { z } from 'zod'
7
+ import type { PluginInput } from '@opencode-ai/plugin'
8
+ import type { ToolContext } from '@opencode-ai/plugin/tool'
9
+ import type { DaytonaSessionManager } from '../core/session-manager'
10
+ import type { FileInfo } from '@daytona/sdk'
11
+
12
+ export const lsTool = (
13
+ sessionManager: DaytonaSessionManager,
14
+ projectId: string,
15
+ worktree: string,
16
+ pluginCtx: PluginInput,
17
+ ) => ({
18
+ description: 'Lists files in a directory in Daytona sandbox',
19
+ args: {
20
+ dirPath: z.string().optional(),
21
+ },
22
+ async execute(args: { dirPath?: string }, ctx: ToolContext) {
23
+ const sandbox = await sessionManager.getSandbox(ctx.sessionID, projectId, worktree, pluginCtx)
24
+ const workDir = await sandbox.getWorkDir()
25
+ const path = args.dirPath || workDir
26
+ if (!path) {
27
+ throw new Error('Work directory not available')
28
+ }
29
+ const files = (await sandbox.fs.listFiles(path)) as FileInfo[]
30
+ return files.map((f) => f.name).join('\n')
31
+ },
32
+ })
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Copyright 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,37 @@
1
+ /**
2
+ * Copyright Daytona Platforms Inc.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ import { z } from 'zod';
6
+ export const multieditTool = (sessionManager, projectId, worktree, pluginCtx) => ({
7
+ description: 'Applies multiple edits to a file in Daytona sandbox atomically',
8
+ args: {
9
+ filePath: z.string(),
10
+ edits: z.array(z.object({
11
+ oldString: z.string(),
12
+ newString: z.string(),
13
+ })),
14
+ },
15
+ async execute(args, ctx) {
16
+ const sandbox = await sessionManager.getSandbox(ctx.sessionID, projectId, worktree, pluginCtx);
17
+ const buffer = await sandbox.fs.downloadFile(args.filePath);
18
+ const decoder = new TextDecoder();
19
+ let content = decoder.decode(buffer);
20
+ for (const [i, edit] of args.edits.entries()) {
21
+ if (edit.oldString === '') {
22
+ throw new Error(`edits[${i}].oldString is empty; refusing to prepend to ${args.filePath}.`);
23
+ }
24
+ const occurrences = content.split(edit.oldString).length - 1;
25
+ if (occurrences === 0) {
26
+ throw new Error(`edits[${i}].oldString not found in ${args.filePath}: ${JSON.stringify(edit.oldString)}`);
27
+ }
28
+ if (occurrences > 1) {
29
+ throw new Error(`edits[${i}].oldString is ambiguous (${occurrences} matches) in ${args.filePath}: ${JSON.stringify(edit.oldString)}`);
30
+ }
31
+ content = content.replace(edit.oldString, edit.newString);
32
+ }
33
+ await sandbox.fs.uploadFile(Buffer.from(content), args.filePath);
34
+ return `Applied ${args.edits.length} edits to ${args.filePath}`;
35
+ },
36
+ });
37
+ //# sourceMappingURL=multiedit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"multiedit.js","sourceRoot":"","sources":["multiedit.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAKvB,MAAM,CAAC,MAAM,aAAa,GAAG,CAC3B,cAAqC,EACrC,SAAiB,EACjB,QAAgB,EAChB,SAAsB,EACtB,EAAE,CAAC,CAAC;IACJ,WAAW,EAAE,gEAAgE;IAC7E,IAAI,EAAE;QACJ,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;QACpB,KAAK,EAAE,CAAC,CAAC,KAAK,CACZ,CAAC,CAAC,MAAM,CAAC;YACP,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;YACrB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;SACtB,CAAC,CACH;KACF;IACD,KAAK,CAAC,OAAO,CAAC,IAAkF,EAAE,GAAgB;QAChH,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,IAAI,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;QAEpC,KAAK,MAAM,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC;YAC7C,IAAI,IAAI,CAAC,SAAS,KAAK,EAAE,EAAE,CAAC;gBAC1B,MAAM,IAAI,KAAK,CAAC,SAAS,CAAC,gDAAgD,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAA;YAC7F,CAAC;YACD,MAAM,WAAW,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,MAAM,GAAG,CAAC,CAAA;YAC5D,IAAI,WAAW,KAAK,CAAC,EAAE,CAAC;gBACtB,MAAM,IAAI,KAAK,CACb,SAAS,CAAC,4BAA4B,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CACzF,CAAA;YACH,CAAC;YACD,IAAI,WAAW,GAAG,CAAC,EAAE,CAAC;gBACpB,MAAM,IAAI,KAAK,CACb,SAAS,CAAC,6BAA6B,WAAW,gBAAgB,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CACrH,CAAA;YACH,CAAC;YACD,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,CAAA;QAC3D,CAAC;QAED,MAAM,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;QAChE,OAAO,WAAW,IAAI,CAAC,KAAK,CAAC,MAAM,aAAa,IAAI,CAAC,QAAQ,EAAE,CAAA;IACjE,CAAC;CACF,CAAC,CAAA"}
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Copyright Daytona Platforms Inc.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+
6
+ import { z } from 'zod'
7
+ import type { PluginInput } from '@opencode-ai/plugin'
8
+ import type { ToolContext } from '@opencode-ai/plugin/tool'
9
+ import type { DaytonaSessionManager } from '../core/session-manager'
10
+
11
+ export const multieditTool = (
12
+ sessionManager: DaytonaSessionManager,
13
+ projectId: string,
14
+ worktree: string,
15
+ pluginCtx: PluginInput,
16
+ ) => ({
17
+ description: 'Applies multiple edits to a file in Daytona sandbox atomically',
18
+ args: {
19
+ filePath: z.string(),
20
+ edits: z.array(
21
+ z.object({
22
+ oldString: z.string(),
23
+ newString: z.string(),
24
+ }),
25
+ ),
26
+ },
27
+ async execute(args: { filePath: string; edits: Array<{ oldString: string; newString: string }> }, ctx: ToolContext) {
28
+ const sandbox = await sessionManager.getSandbox(ctx.sessionID, projectId, worktree, pluginCtx)
29
+ const buffer = await sandbox.fs.downloadFile(args.filePath)
30
+ const decoder = new TextDecoder()
31
+ let content = decoder.decode(buffer)
32
+
33
+ for (const [i, edit] of args.edits.entries()) {
34
+ if (edit.oldString === '') {
35
+ throw new Error(`edits[${i}].oldString is empty; refusing to prepend to ${args.filePath}.`)
36
+ }
37
+ const occurrences = content.split(edit.oldString).length - 1
38
+ if (occurrences === 0) {
39
+ throw new Error(
40
+ `edits[${i}].oldString not found in ${args.filePath}: ${JSON.stringify(edit.oldString)}`,
41
+ )
42
+ }
43
+ if (occurrences > 1) {
44
+ throw new Error(
45
+ `edits[${i}].oldString is ambiguous (${occurrences} matches) in ${args.filePath}: ${JSON.stringify(edit.oldString)}`,
46
+ )
47
+ }
48
+ content = content.replace(edit.oldString, edit.newString)
49
+ }
50
+
51
+ await sandbox.fs.uploadFile(Buffer.from(content), args.filePath)
52
+ return `Applied ${args.edits.length} edits to ${args.filePath}`
53
+ },
54
+ })
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Copyright 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,18 @@
1
+ /**
2
+ * Copyright Daytona Platforms Inc.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ import { z } from 'zod';
6
+ export const readTool = (sessionManager, projectId, worktree, pluginCtx) => ({
7
+ description: 'Reads file from Daytona sandbox',
8
+ args: {
9
+ filePath: z.string(),
10
+ },
11
+ async execute(args, ctx) {
12
+ const sandbox = await sessionManager.getSandbox(ctx.sessionID, projectId, worktree, pluginCtx);
13
+ const buffer = await sandbox.fs.downloadFile(args.filePath);
14
+ const decoder = new TextDecoder();
15
+ return decoder.decode(buffer);
16
+ },
17
+ });
18
+ //# sourceMappingURL=read.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"read.js","sourceRoot":"","sources":["read.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAKvB,MAAM,CAAC,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,CAAC,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"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Copyright Daytona Platforms Inc.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+
6
+ import { z } from 'zod'
7
+ import type { PluginInput } from '@opencode-ai/plugin'
8
+ import type { ToolContext } from '@opencode-ai/plugin/tool'
9
+ import type { DaytonaSessionManager } from '../core/session-manager'
10
+
11
+ export const readTool = (
12
+ sessionManager: DaytonaSessionManager,
13
+ projectId: string,
14
+ worktree: string,
15
+ pluginCtx: PluginInput,
16
+ ) => ({
17
+ description: 'Reads file from Daytona sandbox',
18
+ args: {
19
+ filePath: z.string(),
20
+ },
21
+ async execute(args: { filePath: string }, ctx: ToolContext) {
22
+ const sandbox = await sessionManager.getSandbox(ctx.sessionID, projectId, worktree, pluginCtx)
23
+ const buffer = await sandbox.fs.downloadFile(args.filePath)
24
+ const decoder = new TextDecoder()
25
+ return decoder.decode(buffer)
26
+ },
27
+ })
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Copyright Veris AI
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ *
5
+ * The eleventh tool, and the only one this fork adds.
6
+ *
7
+ * Every other tool tells the agent what its own code did. This one tells it
8
+ * what the VENDOR received — read from the twin, not from the sandbox — which
9
+ * is the only way to tell a real integration from a plausible-looking one. An
10
+ * agent that says "I called the Stripe API and it worked" and an agent that
11
+ * fabricated the response produce identical transcripts; they produce different
12
+ * receipts.
13
+ */
14
+ import { z } from 'zod';
15
+ import type { PluginInput } from '@opencode-ai/plugin';
16
+ import type { ToolContext } from '@opencode-ai/plugin/tool';
17
+ import type { DaytonaSessionManager } from '../core/session-manager';
18
+ export declare const verisReceiptTool: (sessionManager: DaytonaSessionManager, projectId: string, worktree: string, pluginCtx: PluginInput) => {
19
+ description: string;
20
+ args: {
21
+ service: z.ZodOptional<z.ZodString>;
22
+ };
23
+ execute(args: {
24
+ service?: string;
25
+ }, ctx: ToolContext): Promise<string>;
26
+ };