@tangle-network/agent-provider-tangle 0.3.4 → 0.3.5

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/index.d.ts CHANGED
@@ -54,7 +54,7 @@ export interface SandboxInstanceLike {
54
54
  }): Promise<string>;
55
55
  write?(path: string, content: string, options?: {
56
56
  sessionId?: string;
57
- }): Promise<void>;
57
+ }): Promise<unknown>;
58
58
  exec?(command: string, options?: unknown): Promise<SandboxExecResult>;
59
59
  fs?: {
60
60
  supportsWriteMode?: true;
package/dist/index.js CHANGED
@@ -88,7 +88,13 @@ function sandboxInstanceAsEnvironment(box, providerName, client) {
88
88
  }
89
89
  : {}),
90
90
  ...(box.read ? { read: box.read.bind(box) } : {}),
91
- ...(box.write ? { write: box.write.bind(box) } : {}),
91
+ ...(box.write
92
+ ? {
93
+ async write(path, content) {
94
+ await box.write?.(path, content);
95
+ },
96
+ }
97
+ : {}),
92
98
  ...(box.exec
93
99
  ? {
94
100
  async exec(command, options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/agent-provider-tangle",
3
- "version": "0.3.4",
3
+ "version": "0.3.5",
4
4
  "description": "AgentEnvironmentProvider adapter for Tangle sandboxes",
5
5
  "type": "module",
6
6
  "license": "MIT",