@tangle-network/agent-app 0.44.41 → 0.44.46

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.
Files changed (65) hide show
  1. package/dist/DesignCanvas-NEIW3AER.js +10 -0
  2. package/dist/DesignCanvasEditor-QD33OI2W.js +13 -0
  3. package/dist/{TimelineEditor-2ECKSU6P.js → TimelineEditor-6PV42FLG.js} +2 -2
  4. package/dist/app-auth/index.js +2 -2
  5. package/dist/assistant/index.d.ts +1 -0
  6. package/dist/assistant/index.js +2 -1
  7. package/dist/assistant/index.js.map +1 -1
  8. package/dist/brand/index.d.ts +8 -18
  9. package/dist/brand/index.js +15 -61
  10. package/dist/brand/index.js.map +1 -1
  11. package/dist/chat-routes/index.js +2 -2
  12. package/dist/chunk-3E4MW5LR.js +204 -0
  13. package/dist/chunk-3E4MW5LR.js.map +1 -0
  14. package/dist/{chunk-PTUMBMVH.js → chunk-J25RST7G.js} +12 -6
  15. package/dist/{chunk-PTUMBMVH.js.map → chunk-J25RST7G.js.map} +1 -1
  16. package/dist/{chunk-O63WWYET.js → chunk-KPRBFNGT.js} +15 -5
  17. package/dist/chunk-KPRBFNGT.js.map +1 -0
  18. package/dist/{chunk-4KKXZQPT.js → chunk-MLACJ6DB.js} +1 -1
  19. package/dist/{chunk-4KKXZQPT.js.map → chunk-MLACJ6DB.js.map} +1 -1
  20. package/dist/{chunk-VYECQAGM.js → chunk-MYS7DHMM.js} +2 -2
  21. package/dist/{chunk-VTWKH4YU.js → chunk-O22STZ3P.js} +2 -2
  22. package/dist/{chunk-4TI7QWLW.js → chunk-OO4DROKM.js} +3 -3
  23. package/dist/{chunk-YRMLYFVR.js → chunk-PCJHEZA7.js} +2 -2
  24. package/dist/{chunk-Q3FONVAK.js → chunk-RMHZKMQ4.js} +5 -5
  25. package/dist/{chunk-LNRDDXME.js → chunk-T3TYG3VW.js} +750 -186
  26. package/dist/chunk-T3TYG3VW.js.map +1 -0
  27. package/dist/{chunk-VWOPOLVO.js → chunk-U4BXAZCN.js} +2 -2
  28. package/dist/{chunk-HUBACCOP.js → chunk-VGATER6G.js} +46 -22
  29. package/dist/chunk-VGATER6G.js.map +1 -0
  30. package/dist/design-canvas/index.js +2 -2
  31. package/dist/design-canvas-react/engine.js +4 -4
  32. package/dist/design-canvas-react/index.js +7 -7
  33. package/dist/design-canvas-react/lazy.js +1 -1
  34. package/dist/platform/index.js +2 -2
  35. package/dist/preset-cloudflare/index.d.ts +14 -1
  36. package/dist/preset-cloudflare/index.js +35 -1
  37. package/dist/preset-cloudflare/index.js.map +1 -1
  38. package/dist/sandbox/index.d.ts +23 -10
  39. package/dist/sandbox/index.js +3 -1
  40. package/dist/sequences/index.js +1 -1
  41. package/dist/sequences-react/index.d.ts +3 -9
  42. package/dist/sequences-react/index.js +2 -2
  43. package/dist/session-shell/index.d.ts +275 -0
  44. package/dist/session-shell/index.js +31 -0
  45. package/dist/session-shell/index.js.map +1 -0
  46. package/dist/teams-react/index.js +3 -3
  47. package/dist/web/index.d.ts +11 -1
  48. package/dist/web/index.js +3 -1
  49. package/dist/web-react/index.d.ts +160 -2
  50. package/dist/web-react/index.js +12 -1
  51. package/package.json +6 -1
  52. package/dist/DesignCanvas-Z362I3R3.js +0 -10
  53. package/dist/DesignCanvasEditor-ZFE2W4OJ.js +0 -13
  54. package/dist/chunk-HUBACCOP.js.map +0 -1
  55. package/dist/chunk-LNRDDXME.js.map +0 -1
  56. package/dist/chunk-O63WWYET.js.map +0 -1
  57. /package/dist/{DesignCanvas-Z362I3R3.js.map → DesignCanvas-NEIW3AER.js.map} +0 -0
  58. /package/dist/{DesignCanvasEditor-ZFE2W4OJ.js.map → DesignCanvasEditor-QD33OI2W.js.map} +0 -0
  59. /package/dist/{TimelineEditor-2ECKSU6P.js.map → TimelineEditor-6PV42FLG.js.map} +0 -0
  60. /package/dist/{chunk-VYECQAGM.js.map → chunk-MYS7DHMM.js.map} +0 -0
  61. /package/dist/{chunk-VTWKH4YU.js.map → chunk-O22STZ3P.js.map} +0 -0
  62. /package/dist/{chunk-4TI7QWLW.js.map → chunk-OO4DROKM.js.map} +0 -0
  63. /package/dist/{chunk-YRMLYFVR.js.map → chunk-PCJHEZA7.js.map} +0 -0
  64. /package/dist/{chunk-Q3FONVAK.js.map → chunk-RMHZKMQ4.js.map} +0 -0
  65. /package/dist/{chunk-VWOPOLVO.js.map → chunk-U4BXAZCN.js.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  assertMediaUrl
3
- } from "./chunk-PTUMBMVH.js";
3
+ } from "./chunk-J25RST7G.js";
4
4
 
5
5
  // src/design-canvas/model.ts
6
6
  var SCENE_SCHEMA_VERSION = 1;
@@ -1001,4 +1001,4 @@ export {
1001
1001
  scalePageForChannelPreset,
1002
1002
  bleedAwareExportRect
1003
1003
  };
1004
- //# sourceMappingURL=chunk-VWOPOLVO.js.map
1004
+ //# sourceMappingURL=chunk-U4BXAZCN.js.map
@@ -978,6 +978,24 @@ function transientExecError(err) {
978
978
  function deferredProfileWriteFailed(stage, name, cause) {
979
979
  return new Error(`deferred file write failed on ${stage} box ${name}: ${cause.message}`, { cause });
980
980
  }
981
+ var SandboxEgressPolicyMismatchError = class extends Error {
982
+ stage;
983
+ boxName;
984
+ currentPolicy;
985
+ currentSource;
986
+ desiredPolicy;
987
+ constructor(stage, boxName, currentPolicy, currentSource, desiredPolicy) {
988
+ super(
989
+ `egress policy mismatch on ${stage} box ${boxName}: current ${currentPolicy.mode} policy from ${currentSource} does not explicitly match desired ${desiredPolicy.mode} policy; the existing box was preserved and egress was not updated.`
990
+ );
991
+ this.name = "SandboxEgressPolicyMismatchError";
992
+ this.stage = stage;
993
+ this.boxName = boxName;
994
+ this.currentPolicy = currentPolicy;
995
+ this.currentSource = currentSource;
996
+ this.desiredPolicy = desiredPolicy;
997
+ }
998
+ };
981
999
  var SandboxRuntimeAuthRefreshError = class extends Error {
982
1000
  constructor(stage, name, detail, cause) {
983
1001
  super(`${stage} sandbox auth refresh failed for ${name}: ${detail}`, { cause });
@@ -1411,7 +1429,7 @@ async function peekWorkspaceSandbox(shell, options) {
1411
1429
  return { status: "running", box: match };
1412
1430
  }
1413
1431
  async function finalizeExistingBox(shell, client, box, stage, name, workspaceId, userId, harness, scope) {
1414
- await reconcileExistingBoxEgress(box, shell.egressPolicy, stage, name);
1432
+ await assertExistingBoxEgress(box, shell.egressPolicy, stage, name);
1415
1433
  const written = await materializeDeferredFilesForExistingBox(
1416
1434
  shell,
1417
1435
  client,
@@ -1434,18 +1452,24 @@ async function finalizeExistingBox(shell, client, box, stage, name, workspaceId,
1434
1452
  }
1435
1453
  return finalBox;
1436
1454
  }
1455
+ function canonicalizeJson(value) {
1456
+ if (Array.isArray(value)) return value.map(canonicalizeJson);
1457
+ if (value === null || typeof value !== "object") return value;
1458
+ return Object.fromEntries(
1459
+ Object.entries(value).sort(([left], [right]) => left < right ? -1 : left > right ? 1 : 0).map(([key, entry]) => [key, canonicalizeJson(entry)])
1460
+ );
1461
+ }
1437
1462
  function normalizedEgressPolicy(policy) {
1438
- if (policy.mode !== "strict") return policy.mode;
1439
- const allowDomains = [...new Set(
1440
- (policy.allowDomains ?? []).map((domain) => domain.trim().toLowerCase()).filter(Boolean)
1441
- )].sort();
1442
- return JSON.stringify({
1443
- mode: policy.mode,
1444
- allowDomains,
1445
- includeImplicitDomains: policy.includeImplicitDomains !== false
1446
- });
1463
+ const normalized = { ...policy };
1464
+ if (policy.mode === "strict") {
1465
+ normalized.allowDomains = [...new Set(
1466
+ (policy.allowDomains ?? []).map((domain) => domain.trim().toLowerCase()).filter(Boolean)
1467
+ )].sort();
1468
+ normalized.includeImplicitDomains = policy.includeImplicitDomains !== false;
1469
+ }
1470
+ return JSON.stringify(canonicalizeJson(normalized));
1447
1471
  }
1448
- async function reconcileExistingBoxEgress(box, desired, stage, name) {
1472
+ async function assertExistingBoxEgress(box, desired, stage, name) {
1449
1473
  if (!desired) return;
1450
1474
  let current;
1451
1475
  try {
@@ -1457,16 +1481,15 @@ async function reconcileExistingBoxEgress(box, desired, stage, name) {
1457
1481
  });
1458
1482
  }
1459
1483
  const matchingPolicy = normalizedEgressPolicy(current.policy) === normalizedEgressPolicy(desired);
1460
- const effectiveSource = desired.mode !== "open" || current.source !== "platform";
1461
- if (matchingPolicy && effectiveSource) return;
1462
- try {
1463
- await box.egress.update(desired);
1464
- } catch (cause) {
1465
- const error = cause instanceof Error ? cause : new Error(String(cause));
1466
- throw new Error(`egress policy update failed on ${stage} box ${name}: ${error.message}`, {
1467
- cause: error
1468
- });
1469
- }
1484
+ const explicitSource = current.source !== "platform";
1485
+ if (matchingPolicy && explicitSource) return;
1486
+ throw new SandboxEgressPolicyMismatchError(
1487
+ stage,
1488
+ name,
1489
+ current.policy,
1490
+ current.source,
1491
+ desired
1492
+ );
1470
1493
  }
1471
1494
  async function ensureWorkspaceSandbox(shell, options) {
1472
1495
  const { workspaceId, userId, harness, forceNew, onProgress, billingOwnerId } = options;
@@ -1983,6 +2006,7 @@ export {
1983
2006
  buildSandboxToolPathSetupScript,
1984
2007
  runSandboxToolPathSetup,
1985
2008
  splitDeferredProfileFiles,
2009
+ SandboxEgressPolicyMismatchError,
1986
2010
  SandboxRuntimeAuthRefreshError,
1987
2011
  SandboxRecoveryFailedError,
1988
2012
  writeProfileFilesToBox,
@@ -2014,4 +2038,4 @@ export {
2014
2038
  isTerminalPromptEvent,
2015
2039
  detectInteractiveQuestion
2016
2040
  };
2017
- //# sourceMappingURL=chunk-HUBACCOP.js.map
2041
+ //# sourceMappingURL=chunk-VGATER6G.js.map