@stigmer/react 3.12.4 → 3.12.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.
Files changed (190) hide show
  1. package/attachment/AttachmentChipList.js +16 -6
  2. package/attachment/AttachmentChipList.js.map +1 -1
  3. package/attachment/index.d.ts +1 -1
  4. package/attachment/index.d.ts.map +1 -1
  5. package/attachment/index.js.map +1 -1
  6. package/attachment/useAttachments.d.ts +51 -8
  7. package/attachment/useAttachments.d.ts.map +1 -1
  8. package/attachment/useAttachments.js +74 -3
  9. package/attachment/useAttachments.js.map +1 -1
  10. package/composer/SessionComposer.d.ts.map +1 -1
  11. package/composer/SessionComposer.js +17 -10
  12. package/composer/SessionComposer.js.map +1 -1
  13. package/conversation/ConversationComposer.d.ts +19 -3
  14. package/conversation/ConversationComposer.d.ts.map +1 -1
  15. package/conversation/ConversationComposer.js +4 -4
  16. package/conversation/ConversationComposer.js.map +1 -1
  17. package/conversation/ConversationTemplatePickerDialog.d.ts +63 -0
  18. package/conversation/ConversationTemplatePickerDialog.d.ts.map +1 -0
  19. package/conversation/ConversationTemplatePickerDialog.js +151 -0
  20. package/conversation/ConversationTemplatePickerDialog.js.map +1 -0
  21. package/conversation/ConversationsWorkbench.d.ts.map +1 -1
  22. package/conversation/ConversationsWorkbench.js +16 -5
  23. package/conversation/ConversationsWorkbench.js.map +1 -1
  24. package/conversation/index.d.ts +3 -1
  25. package/conversation/index.d.ts.map +1 -1
  26. package/conversation/index.js +1 -0
  27. package/conversation/index.js.map +1 -1
  28. package/conversation/useConversationParticipation.d.ts +41 -4
  29. package/conversation/useConversationParticipation.d.ts.map +1 -1
  30. package/conversation/useConversationParticipation.js +13 -2
  31. package/conversation/useConversationParticipation.js.map +1 -1
  32. package/identity-account/AccountPreferencesPanel.d.ts +35 -0
  33. package/identity-account/AccountPreferencesPanel.d.ts.map +1 -0
  34. package/identity-account/AccountPreferencesPanel.js +187 -0
  35. package/identity-account/AccountPreferencesPanel.js.map +1 -0
  36. package/identity-account/index.d.ts +8 -0
  37. package/identity-account/index.d.ts.map +1 -1
  38. package/identity-account/index.js +4 -0
  39. package/identity-account/index.js.map +1 -1
  40. package/identity-account/useAccountExecutionDefaults.d.ts +36 -0
  41. package/identity-account/useAccountExecutionDefaults.d.ts.map +1 -0
  42. package/identity-account/useAccountExecutionDefaults.js +46 -0
  43. package/identity-account/useAccountExecutionDefaults.js.map +1 -0
  44. package/identity-account/useMyIdentityAccount.d.ts +55 -0
  45. package/identity-account/useMyIdentityAccount.d.ts.map +1 -0
  46. package/identity-account/useMyIdentityAccount.js +37 -0
  47. package/identity-account/useMyIdentityAccount.js.map +1 -0
  48. package/identity-account/useUpdateIdentityAccount.d.ts +42 -0
  49. package/identity-account/useUpdateIdentityAccount.d.ts.map +1 -0
  50. package/identity-account/useUpdateIdentityAccount.js +53 -0
  51. package/identity-account/useUpdateIdentityAccount.js.map +1 -0
  52. package/index.d.ts +11 -9
  53. package/index.d.ts.map +1 -1
  54. package/index.js +8 -5
  55. package/index.js.map +1 -1
  56. package/internal/StandingContextField.d.ts +37 -0
  57. package/internal/StandingContextField.d.ts.map +1 -0
  58. package/internal/StandingContextField.js +24 -0
  59. package/internal/StandingContextField.js.map +1 -0
  60. package/library/InstanceVisibilitySelector.d.ts.map +1 -1
  61. package/library/InstanceVisibilitySelector.js +9 -2
  62. package/library/InstanceVisibilitySelector.js.map +1 -1
  63. package/library/ResourceVisibilityControl.d.ts +13 -3
  64. package/library/ResourceVisibilityControl.d.ts.map +1 -1
  65. package/library/ResourceVisibilityControl.js +33 -5
  66. package/library/ResourceVisibilityControl.js.map +1 -1
  67. package/library/VisibilityOptionRow.d.ts +6 -0
  68. package/library/VisibilityOptionRow.d.ts.map +1 -1
  69. package/library/VisibilityOptionRow.js +11 -1
  70. package/library/VisibilityOptionRow.js.map +1 -1
  71. package/library/VisibilitySelector.d.ts.map +1 -1
  72. package/library/VisibilitySelector.js +14 -2
  73. package/library/VisibilitySelector.js.map +1 -1
  74. package/library/index.d.ts +4 -2
  75. package/library/index.d.ts.map +1 -1
  76. package/library/index.js +2 -1
  77. package/library/index.js.map +1 -1
  78. package/library/useCanSetPublicVisibility.d.ts +30 -0
  79. package/library/useCanSetPublicVisibility.d.ts.map +1 -0
  80. package/library/useCanSetPublicVisibility.js +41 -0
  81. package/library/useCanSetPublicVisibility.js.map +1 -0
  82. package/library/visibilityLevels.d.ts +32 -1
  83. package/library/visibilityLevels.d.ts.map +1 -1
  84. package/library/visibilityLevels.js +34 -14
  85. package/library/visibilityLevels.js.map +1 -1
  86. package/mcp-server/useMcpServerConnect.d.ts +8 -5
  87. package/mcp-server/useMcpServerConnect.d.ts.map +1 -1
  88. package/mcp-server/useMcpServerConnect.js +2 -1
  89. package/mcp-server/useMcpServerConnect.js.map +1 -1
  90. package/mcp-server/useMcpServerOAuthConnect.d.ts.map +1 -1
  91. package/mcp-server/useMcpServerOAuthConnect.js +7 -2
  92. package/mcp-server/useMcpServerOAuthConnect.js.map +1 -1
  93. package/oauth-app/CreateOAuthAppForm.d.ts +2 -2
  94. package/oauth-app/CreateOAuthAppForm.d.ts.map +1 -1
  95. package/oauth-app/CreateOAuthAppForm.js +13 -4
  96. package/oauth-app/CreateOAuthAppForm.js.map +1 -1
  97. package/oauth-app/OAuthAppDetailPanel.d.ts.map +1 -1
  98. package/oauth-app/OAuthAppDetailPanel.js +32 -5
  99. package/oauth-app/OAuthAppDetailPanel.js.map +1 -1
  100. package/organization/OrgPreferencesPanel.d.ts +32 -0
  101. package/organization/OrgPreferencesPanel.d.ts.map +1 -0
  102. package/organization/OrgPreferencesPanel.js +90 -0
  103. package/organization/OrgPreferencesPanel.js.map +1 -0
  104. package/organization/OrgProfilePanel.d.ts.map +1 -1
  105. package/organization/OrgProfilePanel.js +5 -4
  106. package/organization/OrgProfilePanel.js.map +1 -1
  107. package/organization/index.d.ts +2 -0
  108. package/organization/index.d.ts.map +1 -1
  109. package/organization/index.js +1 -0
  110. package/organization/index.js.map +1 -1
  111. package/package.json +4 -4
  112. package/session/NewSessionViewer.d.ts +10 -1
  113. package/session/NewSessionViewer.d.ts.map +1 -1
  114. package/session/NewSessionViewer.js +2 -1
  115. package/session/NewSessionViewer.js.map +1 -1
  116. package/session/useNewSessionFlow.d.ts +27 -1
  117. package/session/useNewSessionFlow.d.ts.map +1 -1
  118. package/session/useNewSessionFlow.js +45 -8
  119. package/session/useNewSessionFlow.js.map +1 -1
  120. package/settings/AccountPreferencesSection.d.ts +3 -0
  121. package/settings/AccountPreferencesSection.d.ts.map +1 -0
  122. package/settings/AccountPreferencesSection.js +10 -0
  123. package/settings/AccountPreferencesSection.js.map +1 -0
  124. package/settings/OrgPreferencesSection.d.ts +3 -0
  125. package/settings/OrgPreferencesSection.d.ts.map +1 -0
  126. package/settings/OrgPreferencesSection.js +13 -0
  127. package/settings/OrgPreferencesSection.js.map +1 -0
  128. package/settings/index.d.ts +2 -0
  129. package/settings/index.d.ts.map +1 -1
  130. package/settings/index.js +2 -0
  131. package/settings/index.js.map +1 -1
  132. package/settings/settings-nav.d.ts.map +1 -1
  133. package/settings/settings-nav.js +17 -1
  134. package/settings/settings-nav.js.map +1 -1
  135. package/src/attachment/AttachmentChipList.tsx +19 -8
  136. package/src/attachment/__tests__/AttachmentChipList.test.tsx +12 -0
  137. package/src/attachment/__tests__/useAttachments.test.ts +293 -0
  138. package/src/attachment/index.ts +1 -0
  139. package/src/attachment/useAttachments.ts +143 -11
  140. package/src/composer/SessionComposer.tsx +23 -14
  141. package/src/conversation/ConversationComposer.tsx +38 -4
  142. package/src/conversation/ConversationTemplatePickerDialog.tsx +441 -0
  143. package/src/conversation/ConversationsWorkbench.tsx +40 -4
  144. package/src/conversation/__tests__/ConversationComposer.test.tsx +56 -1
  145. package/src/conversation/__tests__/ConversationTemplatePickerDialog.test.tsx +224 -0
  146. package/src/conversation/__tests__/useConversationParticipation.test.tsx +45 -4
  147. package/src/conversation/index.ts +4 -0
  148. package/src/conversation/useConversationParticipation.ts +58 -6
  149. package/src/identity-account/AccountPreferencesPanel.tsx +446 -0
  150. package/src/identity-account/__tests__/AccountPreferencesPanel.test.tsx +233 -0
  151. package/src/identity-account/__tests__/useAccountExecutionDefaults.test.tsx +116 -0
  152. package/src/identity-account/__tests__/useMyIdentityAccount.test.tsx +121 -0
  153. package/src/identity-account/index.ts +11 -0
  154. package/src/identity-account/useAccountExecutionDefaults.ts +63 -0
  155. package/src/identity-account/useMyIdentityAccount.ts +75 -0
  156. package/src/identity-account/useUpdateIdentityAccount.ts +73 -0
  157. package/src/index.ts +24 -2
  158. package/src/internal/StandingContextField.tsx +92 -0
  159. package/src/library/InstanceVisibilitySelector.tsx +9 -2
  160. package/src/library/ResourceVisibilityControl.tsx +46 -13
  161. package/src/library/VisibilityOptionRow.tsx +28 -6
  162. package/src/library/VisibilitySelector.tsx +14 -2
  163. package/src/library/__tests__/VisibilitySelector.test.tsx +48 -1
  164. package/src/library/__tests__/visibilityLevels.test.ts +67 -1
  165. package/src/library/index.ts +6 -1
  166. package/src/library/useCanSetPublicVisibility.ts +56 -0
  167. package/src/library/visibilityLevels.ts +65 -14
  168. package/src/mcp-server/__tests__/useMcpServerConnect.asyncLane.test.tsx +117 -0
  169. package/src/mcp-server/useMcpServerConnect.ts +9 -6
  170. package/src/mcp-server/useMcpServerOAuthConnect.ts +7 -2
  171. package/src/oauth-app/CreateOAuthAppForm.tsx +58 -3
  172. package/src/oauth-app/OAuthAppDetailPanel.tsx +84 -3
  173. package/src/organization/OrgPreferencesPanel.tsx +221 -0
  174. package/src/organization/OrgProfilePanel.tsx +5 -4
  175. package/src/organization/__tests__/OrgPreferencesPanel.test.tsx +145 -0
  176. package/src/organization/__tests__/OrgProfilePanel.test.tsx +108 -0
  177. package/src/organization/index.ts +2 -0
  178. package/src/session/NewSessionViewer.tsx +12 -0
  179. package/src/session/__tests__/useNewSessionFlow.test.tsx +151 -0
  180. package/src/session/useNewSessionFlow.ts +76 -9
  181. package/src/settings/AccountPreferencesSection.tsx +25 -0
  182. package/src/settings/OrgPreferencesSection.tsx +35 -0
  183. package/src/settings/__tests__/settings-nav.test.ts +27 -0
  184. package/src/settings/index.ts +2 -0
  185. package/src/settings/settings-nav.ts +18 -0
  186. package/src/workflow/ApprovalFormBuilder.tsx +5 -27
  187. package/styles.css +1 -1
  188. package/workflow/ApprovalFormBuilder.d.ts.map +1 -1
  189. package/workflow/ApprovalFormBuilder.js +8 -5
  190. package/workflow/ApprovalFormBuilder.js.map +1 -1
@@ -0,0 +1,27 @@
1
+ import { describe, it, expect } from "vitest";
2
+ import { SETTINGS_NAV_GROUPS } from "../settings-nav";
3
+
4
+ // The nav model is the single source for the sidebar AND both client-app
5
+ // landing grids — these entries disappearing would silently orphan the
6
+ // preference pages everywhere at once.
7
+ describe("SETTINGS_NAV_GROUPS preference entries", () => {
8
+ it("lists org preferences in the Organization group", () => {
9
+ const organization = SETTINGS_NAV_GROUPS.find(
10
+ (g) => g.label === "Organization",
11
+ );
12
+ expect(organization).toBeDefined();
13
+ expect(
14
+ organization!.items.find((i) => i.href === "/settings/org-preferences")
15
+ ?.label,
16
+ ).toBe("Preferences");
17
+ });
18
+
19
+ it("lists account preferences in the Account group", () => {
20
+ const account = SETTINGS_NAV_GROUPS.find((g) => g.label === "Account");
21
+ expect(account).toBeDefined();
22
+ expect(
23
+ account!.items.find((i) => i.href === "/settings/account-preferences")
24
+ ?.label,
25
+ ).toBe("Preferences");
26
+ });
27
+ });
@@ -10,6 +10,8 @@ export { BillingSection } from "./BillingSection.js";
10
10
  export type { BillingSectionProps } from "./BillingSection.js";
11
11
  export { MembersSection } from "./MembersSection.js";
12
12
  export { OrgProfileSection } from "./OrgProfileSection.js";
13
+ export { OrgPreferencesSection } from "./OrgPreferencesSection.js";
14
+ export { AccountPreferencesSection } from "./AccountPreferencesSection.js";
13
15
  export { EnvironmentsSection } from "./EnvironmentsSection.js";
14
16
  export { InvitationsSection } from "./InvitationsSection.js";
15
17
  export { IdentityProvidersSection } from "./IdentityProvidersSection.js";
@@ -13,6 +13,8 @@ import {
13
13
  Plug,
14
14
  Scale,
15
15
  ShieldCheck,
16
+ SlidersHorizontal,
17
+ UserCog,
16
18
  Users,
17
19
  } from "lucide-react";
18
20
 
@@ -55,6 +57,11 @@ export const SETTINGS_NAV_GROUPS: readonly SettingsNavGroup[] = [
55
57
  "Manage your team, organization identity, and identity providers.",
56
58
  items: [
57
59
  { href: "/settings/org-profile", label: "Org Profile", icon: Building2 },
60
+ {
61
+ href: "/settings/org-preferences",
62
+ label: "Preferences",
63
+ icon: SlidersHorizontal,
64
+ },
58
65
  { href: "/settings/members", label: "Members", icon: Users },
59
66
  { href: "/settings/invitations", label: "Invitations", icon: Link },
60
67
  {
@@ -92,6 +99,17 @@ export const SETTINGS_NAV_GROUPS: readonly SettingsNavGroup[] = [
92
99
  { href: "/settings/usage", label: "Usage", icon: BarChart3 },
93
100
  ],
94
101
  },
102
+ {
103
+ label: "Account",
104
+ description: "Personal settings that apply to you across the platform.",
105
+ items: [
106
+ {
107
+ href: "/settings/account-preferences",
108
+ label: "Preferences",
109
+ icon: UserCog,
110
+ },
111
+ ],
112
+ },
95
113
  ];
96
114
 
97
115
  /**
@@ -24,11 +24,15 @@ interface FormFieldEntry {
24
24
  enumValues: string;
25
25
  }
26
26
 
27
+ // HUMAN_INPUT_TIMEOUT_ESCALATE is deliberately absent: the proto declares it
28
+ // but no runtime exists, and the server validator refuses it at apply
29
+ // (stigmer/stigmer#779). The old option also wrote an `escalation_task` field
30
+ // that HumanInputTaskConfig never had, so every config it produced failed
31
+ // the server's strict decode.
27
32
  const TIMEOUT_POLICY_OPTIONS = [
28
33
  { value: "HUMAN_INPUT_TIMEOUT_FAIL", label: "Fail — task errors on timeout" },
29
34
  { value: "HUMAN_INPUT_TIMEOUT_APPROVE", label: "Auto-approve — proceed as approved" },
30
35
  { value: "HUMAN_INPUT_TIMEOUT_DENY", label: "Auto-deny — proceed as denied" },
31
- { value: "HUMAN_INPUT_TIMEOUT_ESCALATE", label: "Escalate — branch to escalation task" },
32
36
  ] as const;
33
37
 
34
38
  const TIMEOUT_UNITS = [
@@ -107,8 +111,6 @@ export const ApprovalFormBuilder = memo(function ApprovalFormBuilder({
107
111
  <TimeoutSection
108
112
  timeout={typeof cfg.timeout === "number" ? cfg.timeout : 0}
109
113
  onTimeout={typeof cfg.on_timeout === "string" ? cfg.on_timeout : ""}
110
- escalationTask={typeof cfg.escalation_task === "string" ? cfg.escalation_task : ""}
111
- allTaskNames={allTaskNames}
112
114
  onUpdateConfig={onUpdateConfig}
113
115
  />
114
116
  <StringListSection
@@ -619,14 +621,10 @@ function FormFieldRow({
619
621
  function TimeoutSection({
620
622
  timeout,
621
623
  onTimeout,
622
- escalationTask,
623
- allTaskNames,
624
624
  onUpdateConfig,
625
625
  }: {
626
626
  timeout: number;
627
627
  onTimeout: string;
628
- escalationTask: string;
629
- allTaskNames: readonly string[];
630
628
  onUpdateConfig: (fieldPath: string, value: unknown) => void;
631
629
  }) {
632
630
  const bestUnit = useMemo(() => {
@@ -665,8 +663,6 @@ function TimeoutSection({
665
663
  [timeout, unit, onUpdateConfig],
666
664
  );
667
665
 
668
- const isEscalate = onTimeout === "HUMAN_INPUT_TIMEOUT_ESCALATE";
669
-
670
666
  return (
671
667
  <CollapsibleSection title="Timeout">
672
668
  <div className="stg:flex stg:items-center stg:gap-1">
@@ -710,24 +706,6 @@ function TimeoutSection({
710
706
  </div>
711
707
  )}
712
708
 
713
- {isEscalate && (
714
- <div className="stg:mt-1.5 stg:flex stg:flex-col stg:gap-1">
715
- <label className="stg:text-[10px] stg:text-[var(--stgm-muted-foreground,#737373)]">
716
- Escalation task
717
- </label>
718
- <select
719
- value={escalationTask}
720
- onChange={(e) => onUpdateConfig("escalation_task", e.target.value || undefined)}
721
- className={cn(smallInputClass)}
722
- aria-label="Escalation target task"
723
- >
724
- <option value="">— Select escalation task —</option>
725
- {allTaskNames.map((name) => (
726
- <option key={name} value={name}>{name}</option>
727
- ))}
728
- </select>
729
- </div>
730
- )}
731
709
  </CollapsibleSection>
732
710
  );
733
711
  }