@tangle-network/agent-provider-tangle 0.13.1 → 0.13.2
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { harnessSystemPromptIntents } from "@tangle-network/agent-interface";
|
|
1
|
+
import { deepFreeze, harnessSystemPromptIntents } from "@tangle-network/agent-interface";
|
|
2
2
|
import { SandboxInstance } from "@tangle-network/sandbox";
|
|
3
3
|
import { ADAPTER_CEILING_DEPLOYMENT, deploymentBacksInteractiveAgent, deploymentBacksRetainedControl, } from "./tangle-deployment-capabilities.js";
|
|
4
4
|
import { clientObservationSurfaceSupport, observationSurfaceSupport, } from "./tangle-observation.js";
|
|
@@ -428,11 +428,7 @@ export function capabilitiesForClient(declared, client) {
|
|
|
428
428
|
* mutated flag would describe a surface this environment does not have.
|
|
429
429
|
*/
|
|
430
430
|
export function frozenCapabilityDocument(document) {
|
|
431
|
-
|
|
432
|
-
return document;
|
|
433
|
-
for (const value of Object.values(document))
|
|
434
|
-
frozenCapabilityDocument(value);
|
|
435
|
-
return Object.freeze(document);
|
|
431
|
+
return deepFreeze(document);
|
|
436
432
|
}
|
|
437
433
|
/**
|
|
438
434
|
* Narrow a declared capability document to what this Sandbox instance backs
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AgentTurnInputSchema } from "@tangle-network/agent-interface";
|
|
1
|
+
import { AgentTurnInputSchema, deepFreeze } from "@tangle-network/agent-interface";
|
|
2
2
|
import { AgentEnvironmentCapabilitiesSchema } from "@tangle-network/agent-interface/environment-provider";
|
|
3
3
|
import { environmentEventFromSandboxEvent } from "./tangle-events.js";
|
|
4
4
|
import { executionIdFromTurnInput, promptFromTurnInput, promptOptionsFromTurnInput, } from "./tangle-prompt.js";
|
|
@@ -304,11 +304,3 @@ export async function sandboxInstanceAsEnvironment(box, providerName, client, de
|
|
|
304
304
|
function snapshotMetadata(metadata) {
|
|
305
305
|
return deepFreeze(structuredClone(metadata));
|
|
306
306
|
}
|
|
307
|
-
function deepFreeze(value, seen = new Set()) {
|
|
308
|
-
if (value === null || typeof value !== "object" || seen.has(value))
|
|
309
|
-
return value;
|
|
310
|
-
seen.add(value);
|
|
311
|
-
for (const child of Object.values(value))
|
|
312
|
-
deepFreeze(child, seen);
|
|
313
|
-
return Object.freeze(value);
|
|
314
|
-
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/agent-provider-tangle",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.2",
|
|
4
4
|
"description": "AgentEnvironmentProvider adapter for Tangle sandboxes",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"LICENSE"
|
|
86
86
|
],
|
|
87
87
|
"dependencies": {
|
|
88
|
-
"@tangle-network/agent-interface": "^1.
|
|
88
|
+
"@tangle-network/agent-interface": "^1.5.0"
|
|
89
89
|
},
|
|
90
90
|
"peerDependencies": {
|
|
91
91
|
"@tangle-network/sandbox": ">=0.30.1 <1.0.0"
|