@tangle-network/agent-provider-tangle 5.0.3 → 5.0.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/README.md +1 -1
- package/dist/tangle-prompt.js +6 -5
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# @tangle-network/agent-provider-tangle
|
|
2
2
|
|
|
3
3
|
Wraps `@tangle-network/sandbox` as an `AgentEnvironmentProvider`.
|
|
4
|
-
The Sandbox peer range is `>=0.
|
|
4
|
+
The Sandbox peer range is `>=1.0.151 <2.0.0`. Sandbox 1.0.141 cannot deliver a profile whose files exceed one gateway request when a turn carries it: its file-mount delivery fails reading its upload manifest. 1.0.151 delivers it.
|
|
5
5
|
|
|
6
6
|
Terminal `result` and `done` events use the Sandbox SDK's `projectAgentTerminalRecord` summary. Cumulative tool history stays in native evidence; bounded approval identity survives projection, and malformed or conflicting approval sources fail closed. Terminal events omit the duplicate raw `providerEvent` payload.
|
|
7
7
|
|
package/dist/tangle-prompt.js
CHANGED
|
@@ -5,7 +5,7 @@ import { assertCliAuthReferenceSupported, cliAuthReferenceSchema, } from "@tangl
|
|
|
5
5
|
import { agentProfileSchema, canonicalAgentProfileDigest, canonicalCandidateDigest, boundedEventContentRecordSchema, AgentExactRunControlRefSchema, AgentTurnInputSchema, ContextTransferReceiptSchema, ProxySecretReceiptSchema, deepFreeze, isProxySecretScopeAttenuation, proxySecretPresentationsEqual, contextTransferResultMatchesRequest, } from "@tangle-network/agent-interface";
|
|
6
6
|
import { tokenUsageFromData } from "./tangle-result-values.js";
|
|
7
7
|
import { TangleCredentialCapacityError } from "./model-credential-capacity.js";
|
|
8
|
-
import { assertBoundedJson, awaitWithSignal, boundedString, PROFILE_AT_PROFILE, } from "./tangle-contract-safety.js";
|
|
8
|
+
import { assertBoundedJson, awaitWithSignal, boundedString, MAX_INLINE_PAYLOAD_BYTES, PROFILE_AT_PROFILE, } from "./tangle-contract-safety.js";
|
|
9
9
|
import { profileCredentialSource } from "./model-credential-source.js";
|
|
10
10
|
import { tangleRuntimeAttachments } from "./tangle-runtime-attachments.js";
|
|
11
11
|
import { sessionPromptSessionId } from "./tangle-session-control.js";
|
|
@@ -118,6 +118,9 @@ export async function preparePromptOptions(box, options, provider, bindings) {
|
|
|
118
118
|
const sessionId = options.sessionId ?? sessionPromptSessionId(provider, box.id, options.turnId ?? options.executionId) ?? randomUUID();
|
|
119
119
|
const backend = isolated ? { ...options.backend, metadata: { ...options.backend?.metadata, profileSecretIsolation: true } } : options.backend ?? {};
|
|
120
120
|
const { runtimeSecrets: _turnOnly, ...persisted } = backend;
|
|
121
|
+
// createSession posts the whole backend unprimed, so a native turn whose profile exceeds the gateway bound cannot be prepared: it launches unprepared, and the SDK stages the profile's files like create-time mounts.
|
|
122
|
+
if (!isolated && new TextEncoder().encode(JSON.stringify(persisted)).length > MAX_INLINE_PAYLOAD_BYTES)
|
|
123
|
+
return options;
|
|
121
124
|
const created = await awaitWithSignal(box.createSession({ sessionId, retention: "workspace", backend: persisted }), options.signal);
|
|
122
125
|
if (created.session.id !== sessionId || created.info.id !== sessionId)
|
|
123
126
|
throw new Error("Tangle profile preparation changed its exact session identity");
|
|
@@ -270,9 +273,8 @@ function sandboxPromptBackendModel(value) {
|
|
|
270
273
|
model.maxThinkingTokens = present.maxThinkingTokens;
|
|
271
274
|
}
|
|
272
275
|
if (present.mode !== undefined) {
|
|
273
|
-
if (present.mode !== "api" && present.mode !== "cli")
|
|
276
|
+
if (present.mode !== "api" && present.mode !== "cli")
|
|
274
277
|
throw new Error('Tangle prompt backend model mode must be "api" or "cli"');
|
|
275
|
-
}
|
|
276
278
|
model.mode = present.mode;
|
|
277
279
|
}
|
|
278
280
|
if (present.authMode !== undefined) {
|
|
@@ -301,9 +303,8 @@ function sandboxPromptBackendServer(value) {
|
|
|
301
303
|
server.port = present.port;
|
|
302
304
|
}
|
|
303
305
|
if (present.hostname !== undefined) {
|
|
304
|
-
if (typeof present.hostname !== "string" || present.hostname === "")
|
|
306
|
+
if (typeof present.hostname !== "string" || present.hostname === "")
|
|
305
307
|
throw new Error("Tangle prompt backend server hostname must be a non-empty string");
|
|
306
|
-
}
|
|
307
308
|
server.hostname = boundedString(present.hostname, "Tangle prompt backend server hostname");
|
|
308
309
|
}
|
|
309
310
|
return server;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/agent-provider-tangle",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.5",
|
|
4
4
|
"description": "AgentEnvironmentProvider adapter for Tangle sandboxes",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@tangle-network/agent-interface": "^5.10.10"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
|
-
"@tangle-network/sandbox": ">=1.0.
|
|
39
|
+
"@tangle-network/sandbox": ">=1.0.151 <2.0.0"
|
|
40
40
|
},
|
|
41
41
|
"peerDependenciesMeta": {
|
|
42
42
|
"@tangle-network/sandbox": {
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
}
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@tangle-network/agent-provider-testkit": "0.12.
|
|
47
|
+
"@tangle-network/agent-provider-testkit": "0.12.4",
|
|
48
48
|
"@tangle-network/agent-runtime": "0.349.0",
|
|
49
|
-
"@tangle-network/sandbox": "1.0.
|
|
49
|
+
"@tangle-network/sandbox": "1.0.151",
|
|
50
50
|
"@types/node": "26.6.5",
|
|
51
51
|
"typescript": "6.0.3",
|
|
52
52
|
"vitest": "5.0.5"
|