@tangle-network/agent-provider-tangle 0.3.3 → 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
@@ -28,7 +28,7 @@ export function createTangleProvider(options) {
28
28
  async create(input) {
29
29
  const createOptions = options.mapCreateInput?.(input) ??
30
30
  sandboxOptionsFromCreateInput(input, options.defaultBackend ?? "opencode");
31
- const box = await options.client.create(createOptions);
31
+ const box = await options.client.create(createOptions, input.signal ? { signal: input.signal } : undefined);
32
32
  return sandboxInstanceAsEnvironment(box, providerName, options.client);
33
33
  },
34
34
  ...(options.client.get
@@ -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,15 +1,16 @@
1
1
  {
2
2
  "name": "@tangle-network/agent-provider-tangle",
3
- "version": "0.3.3",
3
+ "version": "0.3.5",
4
4
  "description": "AgentEnvironmentProvider adapter for Tangle sandboxes",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
- "main": "dist/index.js",
8
- "types": "src/index.ts",
7
+ "main": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
9
  "exports": {
10
10
  ".": {
11
11
  "import": "./dist/index.js",
12
- "types": "./src/index.ts"
12
+ "types": "./dist/index.d.ts",
13
+ "default": "./dist/index.js"
13
14
  }
14
15
  },
15
16
  "repository": {
@@ -19,16 +20,7 @@
19
20
  },
20
21
  "publishConfig": {
21
22
  "access": "public",
22
- "registry": "https://registry.npmjs.org",
23
- "main": "./dist/index.js",
24
- "types": "./dist/index.d.ts",
25
- "exports": {
26
- ".": {
27
- "import": "./dist/index.js",
28
- "types": "./dist/index.d.ts",
29
- "default": "./dist/index.js"
30
- }
31
- }
23
+ "registry": "https://registry.npmjs.org"
32
24
  },
33
25
  "files": [
34
26
  "dist/index.d.ts",
@@ -38,13 +30,6 @@
38
30
  "README.md",
39
31
  "LICENSE"
40
32
  ],
41
- "scripts": {
42
- "build": "tsc -p tsconfig.json",
43
- "check-types": "tsc --noEmit",
44
- "clean": "rm -rf dist",
45
- "prepublishOnly": "pnpm run build",
46
- "test": "vitest run src"
47
- },
48
33
  "dependencies": {
49
34
  "@tangle-network/agent-interface": "0.34.0"
50
35
  },
@@ -57,10 +42,16 @@
57
42
  }
58
43
  },
59
44
  "devDependencies": {
60
- "@tangle-network/agent-provider-testkit": "workspace:*",
61
45
  "@tangle-network/sandbox": "^0.11.1",
62
- "@types/node": "catalog:",
46
+ "@types/node": "25.6.0",
63
47
  "typescript": "^6.0.3",
64
- "vitest": "catalog:"
48
+ "vitest": "^4.1.5",
49
+ "@tangle-network/agent-provider-testkit": "0.3.4"
50
+ },
51
+ "scripts": {
52
+ "build": "tsc -p tsconfig.json",
53
+ "check-types": "tsc --noEmit",
54
+ "clean": "rm -rf dist",
55
+ "test": "vitest run src"
65
56
  }
66
- }
57
+ }