@tangle-network/agent-app 0.63.75 → 0.63.77

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 (95) hide show
  1. package/dist/{DesignCanvas-566V5KVC.js → DesignCanvas-JA5O6Y6C.js} +4 -5
  2. package/dist/{DesignCanvasEditor-PUO5Y6FB.js → DesignCanvasEditor-6SQAQGOY.js} +5 -6
  3. package/dist/agent-profiles/d1.js +3 -3
  4. package/dist/agent-profiles/index.js +3 -3
  5. package/dist/app-auth/index.js +1 -2
  6. package/dist/app-auth/index.js.map +1 -1
  7. package/dist/assistant/index.js +5 -6
  8. package/dist/assistant/index.js.map +1 -1
  9. package/dist/chat-routes/agent-producers.d.ts +5 -2
  10. package/dist/chat-routes/index.js +9 -10
  11. package/dist/chat-routes/index.js.map +1 -1
  12. package/dist/chat-store/index.js +1 -1
  13. package/dist/chat-store/parts.d.ts +4 -1
  14. package/dist/{chunk-JLFFTSWN.js → chunk-2CRRXINH.js} +20 -8
  15. package/dist/chunk-2CRRXINH.js.map +1 -0
  16. package/dist/{chunk-WYQTPFPI.js → chunk-3ELC7F62.js} +2 -2
  17. package/dist/{chunk-XJ7DC2DI.js → chunk-DNM5CN3R.js} +3 -3
  18. package/dist/{chunk-E2JMXA2V.js → chunk-DURND7YS.js} +5 -5
  19. package/dist/{chunk-E2JMXA2V.js.map → chunk-DURND7YS.js.map} +1 -1
  20. package/dist/{chunk-GAYWV565.js → chunk-H3XWDX4Z.js} +2 -2
  21. package/dist/chunk-H3XWDX4Z.js.map +1 -0
  22. package/dist/{chunk-RKNNMC6T.js → chunk-H6BRJU5M.js} +1 -1
  23. package/dist/{chunk-YG3DSMPS.js → chunk-IWEGCOQR.js} +40 -21
  24. package/dist/chunk-IWEGCOQR.js.map +1 -0
  25. package/dist/{chunk-6IMNAZR7.js → chunk-M42DQ6HM.js} +2 -2
  26. package/dist/{chunk-2ACI3WYT.js → chunk-OWNWWT76.js} +2 -2
  27. package/dist/{chunk-5ERXADSW.js → chunk-Q54SXI57.js} +2 -2
  28. package/dist/{chunk-62BPUU3A.js → chunk-V2BC73KQ.js} +5 -5
  29. package/dist/{chunk-VKJEH6DG.js → chunk-X32H7TXZ.js} +2 -2
  30. package/dist/{chunk-I4CFBLSJ.js → chunk-Y3HRQVAO.js} +10 -10
  31. package/dist/{chunk-KBJZMR4E.js → chunk-Y5WTAHWY.js} +1 -1
  32. package/dist/chunk-Y5WTAHWY.js.map +1 -0
  33. package/dist/{chunk-YQD2RISF.js → chunk-YAIUAUWJ.js} +3 -3
  34. package/dist/{chunk-7O62NYGT.js → chunk-YHA6W3OW.js} +2 -2
  35. package/dist/{chunk-OBKVNZPH.js → chunk-YL5JDX7K.js} +4 -4
  36. package/dist/{chunk-OBKVNZPH.js.map → chunk-YL5JDX7K.js.map} +1 -1
  37. package/dist/design-canvas/index.js +1 -2
  38. package/dist/design-canvas/index.js.map +1 -1
  39. package/dist/design-canvas-react/engine.js +1 -2
  40. package/dist/design-canvas-react/index.js +10 -11
  41. package/dist/design-canvas-react/index.js.map +1 -1
  42. package/dist/design-canvas-react/lazy.js +1 -1
  43. package/dist/platform/index.js +9 -10
  44. package/dist/platform/index.js.map +1 -1
  45. package/dist/preset-cloudflare/index.js +7 -7
  46. package/dist/public-consultation/index.js +8 -9
  47. package/dist/public-consultation/index.js.map +1 -1
  48. package/dist/sandbox/index.js +4 -4
  49. package/dist/sequences/index.js +1 -2
  50. package/dist/sequences/index.js.map +1 -1
  51. package/dist/settings-react/index.js +64 -31
  52. package/dist/settings-react/index.js.map +1 -1
  53. package/dist/settings-react/members-section.d.ts +15 -5
  54. package/dist/stories/chat/fixtures.d.ts +5 -5
  55. package/dist/stories/settings/settings-demo.d.ts +4 -1
  56. package/dist/teams/index.js +1 -1
  57. package/dist/teams/invitations-api.d.ts +6 -4
  58. package/dist/teams/invitations-api.js +4 -2
  59. package/dist/teams/invitations-api.js.map +1 -1
  60. package/dist/teams/invitations.d.ts +2 -0
  61. package/dist/teams/members-api.js +2 -2
  62. package/dist/teams-react/components/invitation-detail.d.ts +4 -2
  63. package/dist/teams-react/index.js +2 -2
  64. package/dist/theme/tokens.css +19 -19
  65. package/dist/tools/index.js +4 -4
  66. package/dist/web/index.d.ts +0 -1
  67. package/dist/web/index.js +1 -7
  68. package/dist/web-react/chat-stream.d.ts +3 -1
  69. package/dist/web-react/index.js +9 -10
  70. package/dist/web-react/message-projection.d.ts +2 -2
  71. package/dist/work-product/index.js +2 -2
  72. package/dist/worker-build/index.d.ts +26 -0
  73. package/dist/worker-build/index.js +73 -0
  74. package/dist/worker-build/index.js.map +1 -0
  75. package/package.json +12 -7
  76. package/dist/chunk-GAYWV565.js.map +0 -1
  77. package/dist/chunk-JLFFTSWN.js.map +0 -1
  78. package/dist/chunk-KBJZMR4E.js.map +0 -1
  79. package/dist/chunk-XBBXPZJI.js +0 -47
  80. package/dist/chunk-XBBXPZJI.js.map +0 -1
  81. package/dist/chunk-YG3DSMPS.js.map +0 -1
  82. package/dist/web/speakers.d.ts +0 -30
  83. /package/dist/{DesignCanvas-566V5KVC.js.map → DesignCanvas-JA5O6Y6C.js.map} +0 -0
  84. /package/dist/{DesignCanvasEditor-PUO5Y6FB.js.map → DesignCanvasEditor-6SQAQGOY.js.map} +0 -0
  85. /package/dist/{chunk-WYQTPFPI.js.map → chunk-3ELC7F62.js.map} +0 -0
  86. /package/dist/{chunk-XJ7DC2DI.js.map → chunk-DNM5CN3R.js.map} +0 -0
  87. /package/dist/{chunk-RKNNMC6T.js.map → chunk-H6BRJU5M.js.map} +0 -0
  88. /package/dist/{chunk-6IMNAZR7.js.map → chunk-M42DQ6HM.js.map} +0 -0
  89. /package/dist/{chunk-2ACI3WYT.js.map → chunk-OWNWWT76.js.map} +0 -0
  90. /package/dist/{chunk-5ERXADSW.js.map → chunk-Q54SXI57.js.map} +0 -0
  91. /package/dist/{chunk-62BPUU3A.js.map → chunk-V2BC73KQ.js.map} +0 -0
  92. /package/dist/{chunk-VKJEH6DG.js.map → chunk-X32H7TXZ.js.map} +0 -0
  93. /package/dist/{chunk-I4CFBLSJ.js.map → chunk-Y3HRQVAO.js.map} +0 -0
  94. /package/dist/{chunk-YQD2RISF.js.map → chunk-YAIUAUWJ.js.map} +0 -0
  95. /package/dist/{chunk-7O62NYGT.js.map → chunk-YHA6W3OW.js.map} +0 -0
@@ -4,12 +4,12 @@ import {
4
4
  invitationDetail,
5
5
  isCurrentMember,
6
6
  memberRoleLabel
7
- } from "../chunk-OBKVNZPH.js";
7
+ } from "../chunk-YL5JDX7K.js";
8
8
  import {
9
9
  INVITATION_EMAIL_HINT,
10
10
  INVITATION_EXPIRY_DAYS,
11
11
  isInvitationEmail
12
- } from "../chunk-KBJZMR4E.js";
12
+ } from "../chunk-Y5WTAHWY.js";
13
13
  import {
14
14
  hasWorkspaceRole
15
15
  } from "../chunk-6XIAPIW6.js";
@@ -24,12 +24,12 @@ import {
24
24
  import {
25
25
  bindSearchPickerNavigation
26
26
  } from "../chunk-ZAMHLXNS.js";
27
+ import "../chunk-RASGKEAL.js";
27
28
  import {
28
29
  confirmWrite,
29
30
  rejectWrite,
30
31
  useConfirmedMutation
31
32
  } from "../chunk-AVP5SNIG.js";
32
- import "../chunk-RASGKEAL.js";
33
33
  import {
34
34
  useWorkspaceExport
35
35
  } from "../chunk-EZFBGW23.js";
@@ -836,7 +836,11 @@ function plansAction(href, Link) {
836
836
  if (!href) return void 0;
837
837
  return (failure) => failure.code === "plan_limit" ? /* @__PURE__ */ jsx6(Link, { href, className: "font-medium text-[var(--accent-text)] underline-offset-4 hover:underline", children: "View plans" }) : null;
838
838
  }
839
- function InviteDialog({ onInvite, plansHref, LinkComponent, open, onOpenChange }) {
839
+ var INVITE_DIALOG = {
840
+ email: { consequence: `They get an email with a link to join. The link works for ${INVITATION_EXPIRY_DAYS} days.`, confirmLabel: "Send invite" },
841
+ link: { consequence: `No email is sent. You get a link to share with them, and it works for ${INVITATION_EXPIRY_DAYS} days.`, confirmLabel: "Create invite link" }
842
+ };
843
+ function InviteDialog({ onInvite, delivery, onMinted, plansHref, LinkComponent, open, onOpenChange }) {
840
844
  const id = useId2();
841
845
  const [email, setEmail] = useState5("");
842
846
  const [role, setRole] = useState5("editor");
@@ -855,10 +859,13 @@ function InviteDialog({ onInvite, plansHref, LinkComponent, open, onOpenChange }
855
859
  open,
856
860
  onOpenChange,
857
861
  title: "Invite people",
858
- consequence: `They get an email with a link to join. The link works for ${INVITATION_EXPIRY_DAYS} days.`,
859
- confirmLabel: "Send invite",
862
+ ...INVITE_DIALOG[delivery],
860
863
  canConfirm: valid,
861
864
  onConfirm: () => onInvite({ email: email.trim(), role }),
865
+ onConfirmed: (value) => {
866
+ const inviteUrl = value?.inviteUrl;
867
+ if (delivery === "link" && typeof inviteUrl === "string") onMinted({ email: email.trim(), inviteUrl });
868
+ },
862
869
  refusalAction: plansAction(plansHref, LinkComponent),
863
870
  children: [
864
871
  /* @__PURE__ */ jsxs5("div", { className: "grid gap-2", children: [
@@ -887,6 +894,25 @@ function InviteDialog({ onInvite, plansHref, LinkComponent, open, onOpenChange }
887
894
  }
888
895
  );
889
896
  }
897
+ function MintedLinkRow({ email, inviteUrl }) {
898
+ const id = useId2();
899
+ const { note, error, copy } = useCopyLink();
900
+ return /* @__PURE__ */ jsx6(
901
+ SettingsRow,
902
+ {
903
+ label: `Invite link for ${email}`,
904
+ htmlFor: id,
905
+ description: `Share it with them yourself. It works for ${INVITATION_EXPIRY_DAYS} days.`,
906
+ status: note,
907
+ error: error ?? void 0,
908
+ layout: "stacked",
909
+ children: /* @__PURE__ */ jsxs5("div", { className: "flex min-w-0 gap-2", children: [
910
+ /* @__PURE__ */ jsx6(Input2, { id, readOnly: true, value: inviteUrl, className: "min-w-0 flex-1", onFocus: (event) => event.currentTarget.select() }),
911
+ /* @__PURE__ */ jsx6(Button4, { type: "button", variant: "outline", onClick: () => void copy(inviteUrl), children: "Copy link" })
912
+ ] })
913
+ }
914
+ );
915
+ }
890
916
  function MembersSection({
891
917
  id = "members",
892
918
  title = "Members",
@@ -898,11 +924,13 @@ function MembersSection({
898
924
  onChangeRole,
899
925
  onRemove,
900
926
  onInvite,
927
+ delivery = "email",
901
928
  plansHref,
902
929
  LinkComponent = PlainLink,
903
930
  menuItems
904
931
  }) {
905
932
  const [inviting, setInviting] = useState5(false);
933
+ const [minted, setMinted] = useState5(null);
906
934
  const canManage = hasWorkspaceRole(currentRole, "admin");
907
935
  return /* @__PURE__ */ jsxs5(
908
936
  SettingsSection,
@@ -928,56 +956,60 @@ function MembersSection({
928
956
  member.id
929
957
  );
930
958
  }) }),
931
- onInvite && /* @__PURE__ */ jsx6(InviteDialog, { onInvite, plansHref, LinkComponent, open: inviting, onOpenChange: setInviting })
959
+ minted && /* @__PURE__ */ jsx6(MintedLinkRow, { ...minted }, minted.inviteUrl),
960
+ onInvite && /* @__PURE__ */ jsx6(InviteDialog, { onInvite, delivery, onMinted: setMinted, plansHref, LinkComponent, open: inviting, onOpenChange: setInviting })
932
961
  ]
933
962
  }
934
963
  );
935
964
  }
936
965
  var INVITATION_COLUMNS = { action: "8rem", menu: "36px" };
937
- function useFlash() {
938
- const [message, setMessage] = useState5(null);
966
+ function useCopyLink(onCopy) {
967
+ const [note, setNote] = useState5(null);
968
+ const [error, setError] = useState5(null);
939
969
  useEffect5(() => {
940
- if (!message) return;
941
- const timer = setTimeout(() => setMessage(null), SAVED_VISIBLE_MS);
970
+ if (!note) return;
971
+ const timer = setTimeout(() => setNote(null), SAVED_VISIBLE_MS);
942
972
  return () => clearTimeout(timer);
943
- }, [message]);
944
- return [message, setMessage];
945
- }
946
- function PendingInvitation({ invitation, canManage, onResend, onRevoke, onCopy }) {
947
- const [revoking, setRevoking] = useState5(false);
948
- const [note, flash] = useFlash();
949
- const [error, setError] = useState5(null);
950
- const copy = async () => {
973
+ }, [note]);
974
+ const copy = async (inviteUrl) => {
951
975
  try {
952
- if (onCopy) await onCopy({ inviteUrl: invitation.inviteUrl });
953
- else await navigator.clipboard.writeText(invitation.inviteUrl);
976
+ if (onCopy) await onCopy({ inviteUrl });
977
+ else await navigator.clipboard.writeText(inviteUrl);
954
978
  setError(null);
955
- flash("Link copied");
979
+ setNote("Link copied");
956
980
  } catch {
957
- setError("Couldn't copy the link. Select it from the invitation email instead.");
981
+ setError(/* @__PURE__ */ jsxs5(Fragment4, { children: [
982
+ "Couldn\u2019t copy the link. Select it here instead: ",
983
+ breakable(inviteUrl)
984
+ ] }));
958
985
  }
959
986
  };
960
- const resend = async () => {
987
+ return { note, flash: setNote, error, setError, copy };
988
+ }
989
+ function PendingInvitation({ invitation, canManage, delivery, onResend, onRevoke, onCopy }) {
990
+ const [revoking, setRevoking] = useState5(false);
991
+ const { note, flash, error, setError, copy } = useCopyLink(onCopy);
992
+ const resend = onResend && delivery === "email" ? async () => {
961
993
  const outcome = await onResend({ invitationId: invitation.id });
962
994
  if (outcome.succeeded) {
963
995
  setError(null);
964
996
  flash("Sent again");
965
997
  } else setError(outcome.message);
966
- };
967
- const undelivered = invitation.emailStatus === "failed" ? "The email wasn\u2019t delivered. Copy the link and send it yourself." : null;
998
+ } : null;
999
+ const undelivered = delivery === "email" && invitation.emailStatus === "failed" ? "The email wasn\u2019t delivered. Copy the link and send it yourself." : null;
968
1000
  return /* @__PURE__ */ jsxs5(Fragment4, { children: [
969
1001
  /* @__PURE__ */ jsx6(
970
1002
  SettingsListItem,
971
1003
  {
972
1004
  title: breakable(invitation.email),
973
1005
  meta: /* @__PURE__ */ jsxs5("span", { className: "inline-flex flex-wrap items-center gap-x-2", children: [
974
- invitationDetail(invitation),
1006
+ invitationDetail(invitation, delivery),
975
1007
  note && /* @__PURE__ */ jsx6("span", { className: "text-[var(--surface-success-text)]", children: note })
976
1008
  ] }),
977
1009
  error: error ?? undelivered ?? void 0,
978
- action: canManage ? { label: "Copy link", onSelect: () => void copy() } : void 0,
1010
+ action: canManage ? { label: "Copy link", onSelect: () => void copy(invitation.inviteUrl) } : void 0,
979
1011
  menu: canManage ? [
980
- { label: "Resend email", onSelect: () => void resend() },
1012
+ ...resend ? [{ label: "Resend email", onSelect: () => void resend() }] : [],
981
1013
  { label: "Revoke\u2026", tone: "danger", onSelect: () => setRevoking(true) }
982
1014
  ] : void 0
983
1015
  }
@@ -1003,14 +1035,15 @@ function InvitationsSection({
1003
1035
  currentRole,
1004
1036
  onResend,
1005
1037
  onRevoke,
1006
- onCopy
1038
+ onCopy,
1039
+ delivery = "email"
1007
1040
  }) {
1008
1041
  const [showPast, setShowPast] = useState5(false);
1009
1042
  const canManage = hasWorkspaceRole(currentRole, "admin");
1010
1043
  const pending = invitations.filter((invitation) => invitation.status === "pending");
1011
1044
  const past = invitations.filter((invitation) => invitation.status !== "pending");
1012
1045
  return /* @__PURE__ */ jsxs5(SettingsSection, { id, title, children: [
1013
- pending.length === 0 ? /* @__PURE__ */ jsx6(SettingsRow, { label: "No pending invitations", layout: "compact" }) : /* @__PURE__ */ jsx6(SettingsList, { "aria-label": "Pending invitations", columns: INVITATION_COLUMNS, children: pending.map((invitation) => /* @__PURE__ */ jsx6(PendingInvitation, { invitation, canManage, onResend, onRevoke, onCopy }, invitation.id)) }),
1046
+ pending.length === 0 ? /* @__PURE__ */ jsx6(SettingsRow, { label: "No pending invitations", layout: "compact" }) : /* @__PURE__ */ jsx6(SettingsList, { "aria-label": "Pending invitations", columns: INVITATION_COLUMNS, children: pending.map((invitation) => /* @__PURE__ */ jsx6(PendingInvitation, { invitation, canManage, delivery, onResend, onRevoke, onCopy }, invitation.id)) }),
1014
1047
  past.length > 0 && /* @__PURE__ */ jsxs5(Collapsible, { open: showPast, onOpenChange: setShowPast, children: [
1015
1048
  /* @__PURE__ */ jsx6("div", { className: "border-t border-[color:var(--border-subtle)] px-5 py-3 @max-[34rem]/settings-section:px-4", children: /* @__PURE__ */ jsx6(CollapsibleTrigger, { asChild: true, children: /* @__PURE__ */ jsxs5(Button4, { type: "button", variant: "ghost", className: "-ml-4", children: [
1016
1049
  showPast ? "Hide past invitations" : `Show ${past.length} past ${past.length === 1 ? "invitation" : "invitations"}`,