@tangle-network/agent-provider-tangle 3.1.2 → 3.1.3

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/README.md CHANGED
@@ -33,6 +33,13 @@ Set `TANGLE_SANDBOX_URL` to use another deployment.
33
33
  Exact execution replay preserves the admitted request and its digest.
34
34
  An explicit replay override cannot replace the selected account, credential channel, or harness.
35
35
 
36
+ ## Workspace file reads
37
+
38
+ `environment.read` accepts file contents up to 4 MiB, measured in UTF-8 bytes.
39
+ Runtime resolves child source files through this reader without copying their contents into tool arguments.
40
+ Paths keep the control-plane limit.
41
+ Live reads require the selected Sandbox workspace capability.
42
+
36
43
  ## Named model credentials at creation
37
44
 
38
45
  `modelCredentials` sends a stored credential reference and explicit endpoint before Sandbox provisions the backend.
@@ -10,7 +10,7 @@ import { execResultFromSandboxExecResult } from "./tangle-result-values.js";
10
10
  import { capabilitiesForSandbox, frozenCapabilityDocument, sandboxCapabilitySupport, } from "./tangle-capabilities.js";
11
11
  import { profileCredentialSource } from "./model-credential-source.js";
12
12
  import { deploymentCapabilitySupport, readDeploymentCapabilitySupport } from "./tangle-deployment-capabilities.js";
13
- import { awaitWithSignal, assertBoundedJson, boundedIdentifier, boundedString, } from "./tangle-contract-safety.js";
13
+ import { awaitWithSignal, assertBoundedJson, boundedIdentifier, boundedString, MAX_PAYLOAD_STRING_BYTES, } from "./tangle-contract-safety.js";
14
14
  import { assertExecOptions, assertOptionKeys, } from "./tangle-environment-validation.js";
15
15
  import { interruptExecutionAfterAbort, } from "./tangle-environment-control.js";
16
16
  import { dispatchEnvironmentRun } from "./tangle-environment-dispatch.js";
@@ -317,7 +317,11 @@ export async function sandboxInstanceAsEnvironment(box, providerName, client, de
317
317
  options?.signal?.throwIfAborted();
318
318
  const content = await awaitWithSignal(box.read?.(path, options), options?.signal);
319
319
  options?.signal?.throwIfAborted();
320
- return boundedString(content, "Tangle file content");
320
+ if (typeof content !== "string" ||
321
+ Buffer.byteLength(content, "utf8") > MAX_PAYLOAD_STRING_BYTES) {
322
+ throw new Error("Tangle file content exceeds its bound");
323
+ }
324
+ return content;
321
325
  },
322
326
  }
323
327
  : {}),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/agent-provider-tangle",
3
- "version": "3.1.2",
3
+ "version": "3.1.3",
4
4
  "description": "AgentEnvironmentProvider adapter for Tangle sandboxes",
5
5
  "type": "module",
6
6
  "license": "MIT",