@tangle-network/agent-provider-tangle 1.8.0 → 1.8.1

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
@@ -467,5 +467,6 @@ Both functions return private binary files and provenance for the workspace, nat
467
467
  The caller must store those bytes in private durable custody before deleting the box.
468
468
  Credential exclusions remain listed with path, type, owner IDs, timestamps, mode, size, and reason.
469
469
  Each process stream has exact frame order and a terminal receipt.
470
- The capture records the running sidecar image digest and can compare it with the pre-create proof.
470
+ The capture records the running sidecar image digest and the served Sidecar bundle revision.
471
+ The image digest can be compared with the pre-create proof only when that proof identifies the actual placement image.
471
472
  An incomplete inventory, missing stream, unrelated backend, or mismatched digest does not produce complete evidence.
@@ -72,6 +72,7 @@ export interface TangleEnvironmentEvidence {
72
72
  eventCountsByExecutionId: Record<string, number>;
73
73
  backendType: string;
74
74
  sidecarImageDigest: string | null;
75
+ sidecarBundleRevision: string | null;
75
76
  transportEvents: "complete" | "unavailable";
76
77
  eventCount: number;
77
78
  messageCount: number;
@@ -250,6 +250,7 @@ export async function captureTangleSandboxEvidence(box, options) {
250
250
  };
251
251
  let nativeSessionId = null;
252
252
  let sidecarImageDigest = null;
253
+ let sidecarBundleRevision = null;
253
254
  let nativeReason = "raw-session-capture-capability-absent";
254
255
  if (native !== undefined) {
255
256
  if (native.sessionId !== id || native.backendType !== options.harness) {
@@ -265,7 +266,11 @@ export async function captureTangleSandboxEvidence(box, options) {
265
266
  native.sidecarImageDigest !== options.expectedSidecarImageDigest)) {
266
267
  throw new Error("Tangle raw session image digest is missing or differs from deployment proof");
267
268
  }
269
+ if (!/^[0-9a-f]{40}$/.test(native.sidecarBundleRevision)) {
270
+ throw new Error("Tangle raw session sidecar bundle revision is missing or invalid");
271
+ }
268
272
  sidecarImageDigest = native.sidecarImageDigest;
273
+ sidecarBundleRevision = native.sidecarBundleRevision;
269
274
  if (native.completeness?.nativeStore !== true || native.completeness.processIo !== true ||
270
275
  native.completeness.events !== true || !Array.isArray(native.files) ||
271
276
  !Array.isArray(native.processIo) || !Array.isArray(native.events) ||
@@ -448,7 +453,7 @@ export async function captureTangleSandboxEvidence(box, options) {
448
453
  }
449
454
  sessions.push({
450
455
  id, executionId: options.executionId, executionIds: [...executionIds], eventCountsByExecutionId,
451
- backendType: options.harness, sidecarImageDigest,
456
+ backendType: options.harness, sidecarImageDigest, sidecarBundleRevision,
452
457
  transportEvents: executionIds.every((executionId) => eventCountsByExecutionId[executionId] > 0) ? "complete" : "unavailable",
453
458
  eventCount: events.length, messageCount: messages.length, messageScope: "session",
454
459
  nativeSessionId, nativeReason, nativeStore, processStreams, nativeEvents,
@@ -556,6 +556,7 @@ export interface SandboxSessionLike {
556
556
  backendType: string;
557
557
  nativeSessionId?: string;
558
558
  sidecarImageDigest: string;
559
+ sidecarBundleRevision: string;
559
560
  nativeRoots: Array<{
560
561
  scope: "session-home" | "workspace-session";
561
562
  path: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/agent-provider-tangle",
3
- "version": "1.8.0",
3
+ "version": "1.8.1",
4
4
  "description": "AgentEnvironmentProvider adapter for Tangle sandboxes",
5
5
  "type": "module",
6
6
  "license": "MIT",