@tangle-network/agent-app 0.63.30 → 0.63.31

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 (133) hide show
  1. package/dist/{DesignCanvas-3DGZQOD7.js → DesignCanvas-VKZ7Y3JU.js} +2 -3
  2. package/dist/{DesignCanvasEditor-OG4QY5WJ.js → DesignCanvasEditor-3V53YLLZ.js} +2 -3
  3. package/dist/agent-profiles/d1.js +4 -3
  4. package/dist/agent-profiles/d1.js.map +1 -1
  5. package/dist/agent-profiles/index.js +4 -3
  6. package/dist/alerting/github.d.ts +33 -0
  7. package/dist/alerting/index.d.ts +1 -0
  8. package/dist/alerting/index.js +47 -0
  9. package/dist/alerting/index.js.map +1 -1
  10. package/dist/app-auth/index.js +1 -2
  11. package/dist/app-auth/index.js.map +1 -1
  12. package/dist/assistant/index.js +4 -4
  13. package/dist/billing/index.d.ts +15 -0
  14. package/dist/billing/index.js +5 -3
  15. package/dist/chat-routes/index.js +15 -14
  16. package/dist/chat-routes/index.js.map +1 -1
  17. package/dist/chat-store/index.js +34 -4
  18. package/dist/chat-store/index.js.map +1 -1
  19. package/dist/chat-store/schema.d.ts +286 -0
  20. package/dist/{chunk-6JEDSKFH.js → chunk-2SDX3OC4.js} +32 -24
  21. package/dist/{chunk-6JEDSKFH.js.map → chunk-2SDX3OC4.js.map} +1 -1
  22. package/dist/{chunk-QLZ6A73E.js → chunk-4CEIZZTH.js} +9 -9
  23. package/dist/{chunk-WL7PZK7Q.js → chunk-4PIN6QYQ.js} +43 -1
  24. package/dist/chunk-4PIN6QYQ.js.map +1 -0
  25. package/dist/{chunk-6UMIOEDR.js → chunk-AZRPDSRQ.js} +3 -3
  26. package/dist/{chunk-6LMM3OVX.js → chunk-BMCC2BUP.js} +3 -3
  27. package/dist/{chunk-36HSG7HU.js → chunk-CRZXEKCX.js} +2 -2
  28. package/dist/chunk-F4XBNR5L.js +16 -0
  29. package/dist/chunk-F4XBNR5L.js.map +1 -0
  30. package/dist/chunk-GY4IPYG4.js +40 -0
  31. package/dist/chunk-GY4IPYG4.js.map +1 -0
  32. package/dist/{chunk-6OG4244Y.js → chunk-MTKD2FN5.js} +2 -251
  33. package/dist/chunk-MTKD2FN5.js.map +1 -0
  34. package/dist/{chunk-5AUZR655.js → chunk-NDXQFEZQ.js} +51 -48
  35. package/dist/chunk-NDXQFEZQ.js.map +1 -0
  36. package/dist/chunk-NSWLZTJX.js +645 -0
  37. package/dist/chunk-NSWLZTJX.js.map +1 -0
  38. package/dist/chunk-PU6AWIRE.js +252 -0
  39. package/dist/chunk-PU6AWIRE.js.map +1 -0
  40. package/dist/{chunk-JKECSYDB.js → chunk-PV3GSLUY.js} +3 -3
  41. package/dist/{chunk-7Y7U7U7X.js → chunk-Q7RSHLEV.js} +5 -3
  42. package/dist/{chunk-7Y7U7U7X.js.map → chunk-Q7RSHLEV.js.map} +1 -1
  43. package/dist/{chunk-HRBF4B5L.js → chunk-TUJ4277Q.js} +1 -14
  44. package/dist/chunk-TUJ4277Q.js.map +1 -0
  45. package/dist/{chunk-57XPEL7X.js → chunk-V42C72V5.js} +25 -2
  46. package/dist/chunk-V42C72V5.js.map +1 -0
  47. package/dist/{chunk-FCYHDENJ.js → chunk-VOIVDEAV.js} +2 -2
  48. package/dist/{chunk-ACB7KOQ6.js → chunk-WSQSKYXP.js} +4 -4
  49. package/dist/{chunk-F6J5J4H6.js → chunk-WYQTPFPI.js} +26 -2
  50. package/dist/chunk-WYQTPFPI.js.map +1 -0
  51. package/dist/{chunk-PFTOGTHH.js → chunk-Z3IJ7XEW.js} +3 -3
  52. package/dist/{chunk-ZD2AUFIT.js → chunk-ZGGEYYEQ.js} +3 -3
  53. package/dist/{chunk-O5AUJQIA.js → chunk-ZNWJJRHP.js} +2 -2
  54. package/dist/design-canvas/index.js +1 -2
  55. package/dist/design-canvas/index.js.map +1 -1
  56. package/dist/design-canvas-react/engine.js +1 -2
  57. package/dist/design-canvas-react/index.js +2 -3
  58. package/dist/design-canvas-react/index.js.map +1 -1
  59. package/dist/design-canvas-react/lazy.js +1 -1
  60. package/dist/media/generate-request.d.ts +27 -1
  61. package/dist/media/index.js +36 -426
  62. package/dist/media/index.js.map +1 -1
  63. package/dist/media/router-generation.d.ts +7 -0
  64. package/dist/operator/gateway-keys.d.ts +44 -0
  65. package/dist/operator/index.d.ts +1 -0
  66. package/dist/operator/index.js +55 -1
  67. package/dist/operator/index.js.map +1 -1
  68. package/dist/plans/decision.d.ts +31 -0
  69. package/dist/plans/drizzle.js +1 -1
  70. package/dist/plans/index.js +5 -1
  71. package/dist/platform/billing.d.ts +3 -2
  72. package/dist/platform/deployment.d.ts +21 -0
  73. package/dist/platform/index.d.ts +1 -0
  74. package/dist/platform/index.js +30 -10
  75. package/dist/platform/index.js.map +1 -1
  76. package/dist/preset-cloudflare/index.js +9 -8
  77. package/dist/preset-cloudflare/index.js.map +1 -1
  78. package/dist/public-consultation/index.d.ts +1 -1
  79. package/dist/public-consultation/index.js +13 -12
  80. package/dist/public-consultation/index.js.map +1 -1
  81. package/dist/sandbox/computer-receipts.d.ts +1 -1
  82. package/dist/sandbox/index.d.ts +1 -0
  83. package/dist/sandbox/index.js +15 -8
  84. package/dist/sandbox/router-model-policy.d.ts +31 -0
  85. package/dist/sequences/index.js +1 -2
  86. package/dist/sequences/index.js.map +1 -1
  87. package/dist/spend/drizzle.d.ts +195 -0
  88. package/dist/spend/drizzle.js +22 -0
  89. package/dist/spend/drizzle.js.map +1 -1
  90. package/dist/stream/index.js +2 -2
  91. package/dist/studio/generated-media/flows.d.ts +240 -0
  92. package/dist/studio/generated-media/index.d.ts +3 -1
  93. package/dist/studio/generated-media/index.js +357 -138
  94. package/dist/studio/generated-media/index.js.map +1 -1
  95. package/dist/studio/index.js +18 -16
  96. package/dist/studio-react/index.js +28 -26
  97. package/dist/studio-react/index.js.map +1 -1
  98. package/dist/teams/index.d.ts +1 -0
  99. package/dist/teams/index.js +16 -0
  100. package/dist/teams/index.js.map +1 -1
  101. package/dist/teams/invitations-api.js +1 -1
  102. package/dist/teams/members-api.d.ts +5 -3
  103. package/dist/teams/members-api.js +1 -1
  104. package/dist/teams/thread-access.d.ts +22 -0
  105. package/dist/tools/index.js +5 -4
  106. package/dist/web/index.js +4 -6
  107. package/dist/web-react/index.js +4 -4
  108. package/dist/work-product/index.js +3 -2
  109. package/dist/work-product/index.js.map +1 -1
  110. package/dist/workspace-export/d1.d.ts +1 -1
  111. package/dist/workspace-export/index.js +9 -2
  112. package/dist/workspace-export/index.js.map +1 -1
  113. package/package.json +1 -1
  114. package/dist/chunk-57XPEL7X.js.map +0 -1
  115. package/dist/chunk-5AUZR655.js.map +0 -1
  116. package/dist/chunk-6OG4244Y.js.map +0 -1
  117. package/dist/chunk-6Z7TZVKZ.js +0 -26
  118. package/dist/chunk-6Z7TZVKZ.js.map +0 -1
  119. package/dist/chunk-F6J5J4H6.js.map +0 -1
  120. package/dist/chunk-HRBF4B5L.js.map +0 -1
  121. package/dist/chunk-WL7PZK7Q.js.map +0 -1
  122. /package/dist/{DesignCanvas-3DGZQOD7.js.map → DesignCanvas-VKZ7Y3JU.js.map} +0 -0
  123. /package/dist/{DesignCanvasEditor-OG4QY5WJ.js.map → DesignCanvasEditor-3V53YLLZ.js.map} +0 -0
  124. /package/dist/{chunk-QLZ6A73E.js.map → chunk-4CEIZZTH.js.map} +0 -0
  125. /package/dist/{chunk-6UMIOEDR.js.map → chunk-AZRPDSRQ.js.map} +0 -0
  126. /package/dist/{chunk-6LMM3OVX.js.map → chunk-BMCC2BUP.js.map} +0 -0
  127. /package/dist/{chunk-36HSG7HU.js.map → chunk-CRZXEKCX.js.map} +0 -0
  128. /package/dist/{chunk-JKECSYDB.js.map → chunk-PV3GSLUY.js.map} +0 -0
  129. /package/dist/{chunk-FCYHDENJ.js.map → chunk-VOIVDEAV.js.map} +0 -0
  130. /package/dist/{chunk-ACB7KOQ6.js.map → chunk-WSQSKYXP.js.map} +0 -0
  131. /package/dist/{chunk-PFTOGTHH.js.map → chunk-Z3IJ7XEW.js.map} +0 -0
  132. /package/dist/{chunk-ZD2AUFIT.js.map → chunk-ZGGEYYEQ.js.map} +0 -0
  133. /package/dist/{chunk-O5AUJQIA.js.map → chunk-ZNWJJRHP.js.map} +0 -0
@@ -21,3 +21,4 @@
21
21
  export * from './roles';
22
22
  export * from './invite';
23
23
  export * from './invitations';
24
+ export * from './thread-access';
@@ -28,6 +28,21 @@ import {
28
28
  workspaceRoleToCollaborationAccess,
29
29
  workspaceRoleToSandboxRole
30
30
  } from "../chunk-6XIAPIW6.js";
31
+
32
+ // src/teams/thread-access.ts
33
+ function createThreadAccessCheck(options) {
34
+ return async function requireThreadAccess(threadId, userId, role) {
35
+ if (!threadId) return Response.json({ error: "Missing threadId" }, { status: 400 });
36
+ const workspaceId = await options.findThreadWorkspace(threadId);
37
+ if (!workspaceId) return Response.json({ error: "Thread not found" }, { status: 404 });
38
+ try {
39
+ await options.requireWorkspaceAccess(workspaceId, userId, role);
40
+ } catch {
41
+ return Response.json({ error: "Thread not found" }, { status: 404 });
42
+ }
43
+ return { threadId, workspaceId };
44
+ };
45
+ }
31
46
  export {
32
47
  ASSIGNABLE_WORKSPACE_ROLES,
33
48
  INVITATION_EMAIL_HINT,
@@ -37,6 +52,7 @@ export {
37
52
  WORKSPACE_ROLES,
38
53
  WORKSPACE_ROLE_RANK,
39
54
  canManageWorkspaceMemberRole,
55
+ createThreadAccessCheck,
40
56
  generateInvitationToken,
41
57
  generateInviteToken,
42
58
  getInvitationExpiresAt,
@@ -1 +1 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
1
+ {"version":3,"sources":["../../src/teams/thread-access.ts"],"sourcesContent":["/**\n * Access to a thread follows its workspace: the caller needs the role on the\n * workspace the thread itself names, so a forged thread id from another\n * workspace answers 404, never rows. A missing thread and a denied workspace\n * answer the same 404 so neither reveals the other exists.\n */\nimport type { WorkspaceRole } from './roles'\n\nexport interface ThreadAccessOptions<Role extends string = WorkspaceRole> {\n /** The workspace a thread belongs to, or null when no such thread exists. */\n findThreadWorkspace(threadId: string): Promise<string | null>\n /** The product's workspace check; it throws (any error) to deny. */\n requireWorkspaceAccess(workspaceId: string, userId: string, role: Role): Promise<unknown>\n}\n\n/**\n * Bind the thread check to a product's thread table and workspace access.\n * The returned check answers the thread and its workspace id, or the Response the\n * route returns: 400 for a missing id, 404 for an unknown or denied thread.\n */\nexport function createThreadAccessCheck<Role extends string = WorkspaceRole>(options: ThreadAccessOptions<Role>) {\n return async function requireThreadAccess(\n threadId: string | undefined,\n userId: string,\n role: Role,\n ): Promise<{ threadId: string; workspaceId: string } | Response> {\n if (!threadId) return Response.json({ error: 'Missing threadId' }, { status: 400 })\n const workspaceId = await options.findThreadWorkspace(threadId)\n if (!workspaceId) return Response.json({ error: 'Thread not found' }, { status: 404 })\n try {\n await options.requireWorkspaceAccess(workspaceId, userId, role)\n } catch {\n return Response.json({ error: 'Thread not found' }, { status: 404 })\n }\n return { threadId, workspaceId }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBO,SAAS,wBAA6D,SAAoC;AAC/G,SAAO,eAAe,oBACpB,UACA,QACA,MAC+D;AAC/D,QAAI,CAAC,SAAU,QAAO,SAAS,KAAK,EAAE,OAAO,mBAAmB,GAAG,EAAE,QAAQ,IAAI,CAAC;AAClF,UAAM,cAAc,MAAM,QAAQ,oBAAoB,QAAQ;AAC9D,QAAI,CAAC,YAAa,QAAO,SAAS,KAAK,EAAE,OAAO,mBAAmB,GAAG,EAAE,QAAQ,IAAI,CAAC;AACrF,QAAI;AACF,YAAM,QAAQ,uBAAuB,aAAa,QAAQ,IAAI;AAAA,IAChE,QAAQ;AACN,aAAO,SAAS,KAAK,EAAE,OAAO,mBAAmB,GAAG,EAAE,QAAQ,IAAI,CAAC;AAAA,IACrE;AACA,WAAO,EAAE,UAAU,YAAY;AAAA,EACjC;AACF;","names":[]}
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  SeatLimitError,
3
3
  fireMemberSync
4
- } from "../chunk-F6J5J4H6.js";
4
+ } from "../chunk-WYQTPFPI.js";
5
5
  import "../chunk-DJ4VJIH5.js";
6
6
  import {
7
7
  INVITATION_EMAIL_HINT,
@@ -128,9 +128,10 @@ export interface InviteDetails {
128
128
  currentUserEmail: string | null;
129
129
  }
130
130
  /**
131
- * Build the members API bound to one product's db/tables/access. Returns six
132
- * handlers; an app maps its route methods onto them (GET→list, POST→invite,
133
- * PATCH→updateRole, DELETE→remove; accept on its own route).
131
+ * Build the members API bound to one product's db/tables/access. Returns the
132
+ * handlers an app maps its route methods onto (GET→list, POST→invite,
133
+ * PATCH→updateRole, DELETE→remove; accept on its own route), and
134
+ * `handleMembersRequest`, which does that mapping for a single members route.
134
135
  */
135
136
  export declare function createMembersApi(opts: MembersApiOptions): {
136
137
  listMembers: (input: {
@@ -162,4 +163,5 @@ export declare function createMembersApi(opts: MembersApiOptions): {
162
163
  token?: string;
163
164
  actor: MembersApiActor;
164
165
  }) => Promise<Response>;
166
+ handleMembersRequest: (request: Request, actor: MembersApiActor | null) => Promise<Response>;
165
167
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  SeatLimitError,
3
3
  createMembersApi
4
- } from "../chunk-F6J5J4H6.js";
4
+ } from "../chunk-WYQTPFPI.js";
5
5
  import "../chunk-DJ4VJIH5.js";
6
6
  import "../chunk-KBJZMR4E.js";
7
7
  import "../chunk-6XIAPIW6.js";
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Access to a thread follows its workspace: the caller needs the role on the
3
+ * workspace the thread itself names, so a forged thread id from another
4
+ * workspace answers 404, never rows. A missing thread and a denied workspace
5
+ * answer the same 404 so neither reveals the other exists.
6
+ */
7
+ import type { WorkspaceRole } from './roles';
8
+ export interface ThreadAccessOptions<Role extends string = WorkspaceRole> {
9
+ /** The workspace a thread belongs to, or null when no such thread exists. */
10
+ findThreadWorkspace(threadId: string): Promise<string | null>;
11
+ /** The product's workspace check; it throws (any error) to deny. */
12
+ requireWorkspaceAccess(workspaceId: string, userId: string, role: Role): Promise<unknown>;
13
+ }
14
+ /**
15
+ * Bind the thread check to a product's thread table and workspace access.
16
+ * The returned check answers the thread and its workspace id, or the Response the
17
+ * route returns: 400 for a missing id, 404 for an unknown or denied thread.
18
+ */
19
+ export declare function createThreadAccessCheck<Role extends string = WorkspaceRole>(options: ThreadAccessOptions<Role>): (threadId: string | undefined, userId: string, role: Role) => Promise<{
20
+ threadId: string;
21
+ workspaceId: string;
22
+ } | Response>;
@@ -5,7 +5,7 @@ import {
5
5
  outcomeStatus,
6
6
  resolveToolCapabilities,
7
7
  restrictTaxonomy
8
- } from "../chunk-ACB7KOQ6.js";
8
+ } from "../chunk-WSQSKYXP.js";
9
9
  import {
10
10
  DEFAULT_APP_TOOL_PATHS,
11
11
  DEFAULT_HEADER_NAMES,
@@ -24,7 +24,7 @@ import {
24
24
  verifyCapabilityToken,
25
25
  verifyExpiringCapabilityToken
26
26
  } from "../chunk-O7UX55EU.js";
27
- import "../chunk-7Y7U7U7X.js";
27
+ import "../chunk-Q7RSHLEV.js";
28
28
  import "../chunk-S5SRJJQG.js";
29
29
  import {
30
30
  APP_TOOL_NAMES,
@@ -33,11 +33,12 @@ import {
33
33
  defineAppTool,
34
34
  findCustomTool,
35
35
  isAppToolName
36
- } from "../chunk-FCYHDENJ.js";
36
+ } from "../chunk-VOIVDEAV.js";
37
37
  import "../chunk-UGWQLQDS.js";
38
+ import "../chunk-TUJ4277Q.js";
38
39
  import {
39
40
  ToolInputError
40
- } from "../chunk-HRBF4B5L.js";
41
+ } from "../chunk-F4XBNR5L.js";
41
42
  export {
42
43
  APP_TOOL_NAMES,
43
44
  DEFAULT_APP_TOOL_PATHS,
package/dist/web/index.js CHANGED
@@ -35,14 +35,12 @@ import {
35
35
  withFreeRouteLimit
36
36
  } from "../chunk-ALIWB2P3.js";
37
37
  import {
38
- isWorkspaceFileExportable
39
- } from "../chunk-TXD5HXLE.js";
40
- import {
38
+ isBlockedFetchHostname,
41
39
  withTimeout
42
- } from "../chunk-6Z7TZVKZ.js";
40
+ } from "../chunk-V42C72V5.js";
43
41
  import {
44
- isBlockedFetchHostname
45
- } from "../chunk-57XPEL7X.js";
42
+ isWorkspaceFileExportable
43
+ } from "../chunk-TXD5HXLE.js";
46
44
  export {
47
45
  FREE_ROUTE_BUDGETS,
48
46
  FreeRouteLimitError,
@@ -146,7 +146,7 @@ import {
146
146
  withoutRecordGridCreated,
147
147
  withoutRecordGridRemoved,
148
148
  withoutRecordGridUpdate
149
- } from "../chunk-6UMIOEDR.js";
149
+ } from "../chunk-AZRPDSRQ.js";
150
150
  import {
151
151
  useInfiniteScroll
152
152
  } from "../chunk-UHSUY6H6.js";
@@ -257,11 +257,11 @@ import {
257
257
  isChatAttachmentPart,
258
258
  mentionInputToPart,
259
259
  mentionPartsFromMessageParts
260
- } from "../chunk-36HSG7HU.js";
260
+ } from "../chunk-CRZXEKCX.js";
261
261
  import "../chunk-ZVEEWGDK.js";
262
262
  import {
263
263
  attachmentPartKey
264
- } from "../chunk-O5AUJQIA.js";
264
+ } from "../chunk-ZNWJJRHP.js";
265
265
  import {
266
266
  INTERACTION_CANCEL_EVENT,
267
267
  INTERACTION_EVENT,
@@ -313,8 +313,8 @@ import {
313
313
  import "../chunk-AMUXRAUO.js";
314
314
  import "../chunk-PV33JZKV.js";
315
315
  import "../chunk-ELX5YITO.js";
316
+ import "../chunk-4PIN6QYQ.js";
316
317
  import "../chunk-TXD5HXLE.js";
317
- import "../chunk-WL7PZK7Q.js";
318
318
  export {
319
319
  AGENT_PROFILE_EDITOR_SECTIONS,
320
320
  ALLOWED_ATTACHMENT_SNIFFED_MIMES,
@@ -26,11 +26,12 @@ import {
26
26
  } from "../chunk-ZVEEWGDK.js";
27
27
  import {
28
28
  defineAppTool
29
- } from "../chunk-FCYHDENJ.js";
29
+ } from "../chunk-VOIVDEAV.js";
30
30
  import "../chunk-UGWQLQDS.js";
31
+ import "../chunk-TUJ4277Q.js";
31
32
  import {
32
33
  ToolInputError
33
- } from "../chunk-HRBF4B5L.js";
34
+ } from "../chunk-F4XBNR5L.js";
34
35
 
35
36
  // src/work-product/service.ts
36
37
  var WORK_PRODUCT_TRANSITIONS = {