@tangle-network/agent-provider-tangle 3.6.2 → 3.6.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 -0
- package/dist/tangle-evidence.js +12 -0
- package/dist/tangle-terminal.d.ts +1 -5
- package/dist/tangle-terminal.js +0 -15
- package/dist/tangle-workspace-branching.js +20 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -54,6 +54,7 @@ Evidence capture retains full workspace files that exceed the Sandbox JSON read
|
|
|
54
54
|
This requires a Sandbox SDK whose filesystem advertises `supportsBoundedDownload`.
|
|
55
55
|
Capture verifies the downloaded size and SHA-256 receipt before adding bytes to the archive.
|
|
56
56
|
Aggregate limits, credential exclusions, and exact native-session proof remain enforced.
|
|
57
|
+
Capture lists no directory below a credential directory such as `.opencode` or `.config`: it records the directory as excluded and accounts for its subtree with one complete usage scan, so the workspace totals still reconcile.
|
|
57
58
|
An unsupported downloader or incomplete transfer fails capture and preserves the source environment.
|
|
58
59
|
|
|
59
60
|
## Named model credentials at creation
|
package/dist/tangle-evidence.js
CHANGED
|
@@ -242,6 +242,18 @@ async function captureSandboxEvidence(box, options, writer) {
|
|
|
242
242
|
scannedDirectories++;
|
|
243
243
|
if (path.split("/").some((part) => blockedNames.has(part))) {
|
|
244
244
|
excludedPaths.push({ ...item, reason: "credential-path" });
|
|
245
|
+
// Nothing below a credential directory is read, so none of it is listed either: one
|
|
246
|
+
// complete usage scan accounts for its subtree against the workspace totals. Listing it
|
|
247
|
+
// cost one request per directory; .opencode/node_modules alone was 271 of a capture's
|
|
248
|
+
// 302 list calls and about 100 s of each two-minute workspace capture on 2026-10-06.
|
|
249
|
+
options.signal?.throwIfAborted();
|
|
250
|
+
const subtree = await fs.usage(sourcePath);
|
|
251
|
+
if (!subtree.complete || subtree.skippedEntries !== 0)
|
|
252
|
+
throw new Error("Tangle workspace usage scan is incomplete");
|
|
253
|
+
scannedDirectories += subtree.directoryCount;
|
|
254
|
+
scannedFiles += subtree.fileCount;
|
|
255
|
+
scannedSize += subtree.sizeBytes;
|
|
256
|
+
continue;
|
|
245
257
|
}
|
|
246
258
|
stack.push(sourcePath);
|
|
247
259
|
continue;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AgentTerminalSession, TerminalAttachRequest, TerminalAttachResult } from "@tangle-network/agent-interface";
|
|
2
2
|
import type { SandboxInstanceLike, SandboxTerminalReadyLike, SandboxTerminalStreamLike, SandboxTerminalsLike } from "./tangle-types.js";
|
|
3
3
|
import { TerminalFrameLog } from "./tangle-terminal-frames.js";
|
|
4
4
|
/** Terminal handles this environment holds, keyed by terminal session id. */
|
|
@@ -72,7 +72,3 @@ export declare function prepareTangleTerminalAttachment(input: {
|
|
|
72
72
|
release?: (terminalSessionId: string, stream: SandboxTerminalStreamLike) => void;
|
|
73
73
|
}): Promise<PreparedTangleTerminal>;
|
|
74
74
|
export declare function createTangleTerminalRegistry(box: SandboxInstanceLike): TangleTerminalRegistry;
|
|
75
|
-
/** Close a stream that has not been handed to a caller. */
|
|
76
|
-
export declare function closeTangleStreamQuietly(stream: SandboxTerminalStreamLike): Promise<void>;
|
|
77
|
-
/** Add the exact claim identity without replacing the terminal implementation. */
|
|
78
|
-
export declare function bindTangleInteractiveControl(session: AgentTerminalSession, control: AgentInteractiveSessionControlClaim): AgentInteractiveTerminalSession;
|
package/dist/tangle-terminal.js
CHANGED
|
@@ -476,21 +476,6 @@ async function closeQuietly(stream) {
|
|
|
476
476
|
// caller's failure is reported from the attach result it receives.
|
|
477
477
|
}
|
|
478
478
|
}
|
|
479
|
-
/** Close a stream that has not been handed to a caller. */
|
|
480
|
-
export async function closeTangleStreamQuietly(stream) {
|
|
481
|
-
await closeQuietly(stream);
|
|
482
|
-
}
|
|
483
|
-
/** Add the exact claim identity without replacing the terminal implementation. */
|
|
484
|
-
export function bindTangleInteractiveControl(session, control) {
|
|
485
|
-
return Object.create(session, {
|
|
486
|
-
control: {
|
|
487
|
-
configurable: false,
|
|
488
|
-
enumerable: true,
|
|
489
|
-
value: Object.freeze({ ...control }),
|
|
490
|
-
writable: false,
|
|
491
|
-
},
|
|
492
|
-
});
|
|
493
|
-
}
|
|
494
479
|
function boundedLabel(value) {
|
|
495
480
|
return typeof value === "string" && value.length > 0 && value.length <= 512
|
|
496
481
|
? value
|
|
@@ -74,6 +74,17 @@ export function createTangleWorkspaceBranching(options) {
|
|
|
74
74
|
return recovered;
|
|
75
75
|
};
|
|
76
76
|
/** The fork equivalent of {@link resolveCheckpoint}. */
|
|
77
|
+
const resolveLocalFork = (request) => {
|
|
78
|
+
const local = forks.get(request.idempotencyKey);
|
|
79
|
+
if (!local)
|
|
80
|
+
return { state: "absent" };
|
|
81
|
+
return local.request.requestDigest === request.requestDigest
|
|
82
|
+
? { state: "known", record: local }
|
|
83
|
+
: {
|
|
84
|
+
state: "conflict",
|
|
85
|
+
existingRequestDigest: local.request.requestDigest,
|
|
86
|
+
};
|
|
87
|
+
};
|
|
77
88
|
const resolveFork = async (request, signal) => {
|
|
78
89
|
const local = forks.get(request.idempotencyKey);
|
|
79
90
|
if (local) {
|
|
@@ -280,7 +291,15 @@ export function createTangleWorkspaceBranching(options) {
|
|
|
280
291
|
typeof box.getTeeAttestation !== "function")) {
|
|
281
292
|
return forkUnknown(request, "Confidential fork requires a trusted verifier and Sandbox attestation support", false);
|
|
282
293
|
}
|
|
283
|
-
|
|
294
|
+
// A key this handle has not recorded is created again with the same key: Sandbox applies the
|
|
295
|
+
// key and replays the child it already created for it. Searching the account for the key's
|
|
296
|
+
// child first paged every sandbox in the account, which timed out or repeated rows on an
|
|
297
|
+
// account with thousands of them, so a fork answered unknown (agent-sdk#439 removed the same
|
|
298
|
+
// scan from deleteCheckpoint). This provider cannot create a confidential fork, only recover
|
|
299
|
+
// one, so that request still searches; lookupFork does too, for a key it must recover.
|
|
300
|
+
const known = request.confidential?.requested === true
|
|
301
|
+
? await resolveFork(request, operation?.signal)
|
|
302
|
+
: resolveLocalFork(request);
|
|
284
303
|
if (known.state === "conflict") {
|
|
285
304
|
return forkConflict(request, known.existingRequestDigest);
|
|
286
305
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/agent-provider-tangle",
|
|
3
|
-
"version": "3.6.
|
|
3
|
+
"version": "3.6.5",
|
|
4
4
|
"description": "AgentEnvironmentProvider adapter for Tangle sandboxes",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
"dist/model-credential-capacity.d.ts"
|
|
129
129
|
],
|
|
130
130
|
"dependencies": {
|
|
131
|
-
"@tangle-network/agent-interface": "^
|
|
131
|
+
"@tangle-network/agent-interface": "^3.0.0"
|
|
132
132
|
},
|
|
133
133
|
"peerDependencies": {
|
|
134
134
|
"@tangle-network/sandbox": ">=0.58.7 <1.0.0"
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
}
|
|
140
140
|
},
|
|
141
141
|
"devDependencies": {
|
|
142
|
-
"@tangle-network/agent-provider-testkit": "0.10.
|
|
142
|
+
"@tangle-network/agent-provider-testkit": "0.10.2",
|
|
143
143
|
"@tangle-network/agent-runtime": "0.292.3",
|
|
144
144
|
"@tangle-network/sandbox": "0.58.7",
|
|
145
145
|
"@types/node": "26.6.3",
|