@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.
- package/attachment/AttachmentChipList.js +16 -6
- package/attachment/AttachmentChipList.js.map +1 -1
- package/attachment/index.d.ts +1 -1
- package/attachment/index.d.ts.map +1 -1
- package/attachment/index.js.map +1 -1
- package/attachment/useAttachments.d.ts +51 -8
- package/attachment/useAttachments.d.ts.map +1 -1
- package/attachment/useAttachments.js +74 -3
- package/attachment/useAttachments.js.map +1 -1
- package/composer/SessionComposer.d.ts.map +1 -1
- package/composer/SessionComposer.js +17 -10
- package/composer/SessionComposer.js.map +1 -1
- package/conversation/ConversationComposer.d.ts +19 -3
- package/conversation/ConversationComposer.d.ts.map +1 -1
- package/conversation/ConversationComposer.js +4 -4
- package/conversation/ConversationComposer.js.map +1 -1
- package/conversation/ConversationTemplatePickerDialog.d.ts +63 -0
- package/conversation/ConversationTemplatePickerDialog.d.ts.map +1 -0
- package/conversation/ConversationTemplatePickerDialog.js +151 -0
- package/conversation/ConversationTemplatePickerDialog.js.map +1 -0
- package/conversation/ConversationsWorkbench.d.ts.map +1 -1
- package/conversation/ConversationsWorkbench.js +16 -5
- package/conversation/ConversationsWorkbench.js.map +1 -1
- package/conversation/index.d.ts +3 -1
- package/conversation/index.d.ts.map +1 -1
- package/conversation/index.js +1 -0
- package/conversation/index.js.map +1 -1
- package/conversation/useConversationParticipation.d.ts +41 -4
- package/conversation/useConversationParticipation.d.ts.map +1 -1
- package/conversation/useConversationParticipation.js +13 -2
- package/conversation/useConversationParticipation.js.map +1 -1
- package/identity-account/AccountPreferencesPanel.d.ts +35 -0
- package/identity-account/AccountPreferencesPanel.d.ts.map +1 -0
- package/identity-account/AccountPreferencesPanel.js +187 -0
- package/identity-account/AccountPreferencesPanel.js.map +1 -0
- package/identity-account/index.d.ts +8 -0
- package/identity-account/index.d.ts.map +1 -1
- package/identity-account/index.js +4 -0
- package/identity-account/index.js.map +1 -1
- package/identity-account/useAccountExecutionDefaults.d.ts +36 -0
- package/identity-account/useAccountExecutionDefaults.d.ts.map +1 -0
- package/identity-account/useAccountExecutionDefaults.js +46 -0
- package/identity-account/useAccountExecutionDefaults.js.map +1 -0
- package/identity-account/useMyIdentityAccount.d.ts +55 -0
- package/identity-account/useMyIdentityAccount.d.ts.map +1 -0
- package/identity-account/useMyIdentityAccount.js +37 -0
- package/identity-account/useMyIdentityAccount.js.map +1 -0
- package/identity-account/useUpdateIdentityAccount.d.ts +42 -0
- package/identity-account/useUpdateIdentityAccount.d.ts.map +1 -0
- package/identity-account/useUpdateIdentityAccount.js +53 -0
- package/identity-account/useUpdateIdentityAccount.js.map +1 -0
- package/index.d.ts +11 -9
- package/index.d.ts.map +1 -1
- package/index.js +8 -5
- package/index.js.map +1 -1
- package/internal/StandingContextField.d.ts +37 -0
- package/internal/StandingContextField.d.ts.map +1 -0
- package/internal/StandingContextField.js +24 -0
- package/internal/StandingContextField.js.map +1 -0
- package/library/InstanceVisibilitySelector.d.ts.map +1 -1
- package/library/InstanceVisibilitySelector.js +9 -2
- package/library/InstanceVisibilitySelector.js.map +1 -1
- package/library/ResourceVisibilityControl.d.ts +13 -3
- package/library/ResourceVisibilityControl.d.ts.map +1 -1
- package/library/ResourceVisibilityControl.js +33 -5
- package/library/ResourceVisibilityControl.js.map +1 -1
- package/library/VisibilityOptionRow.d.ts +6 -0
- package/library/VisibilityOptionRow.d.ts.map +1 -1
- package/library/VisibilityOptionRow.js +11 -1
- package/library/VisibilityOptionRow.js.map +1 -1
- package/library/VisibilitySelector.d.ts.map +1 -1
- package/library/VisibilitySelector.js +14 -2
- package/library/VisibilitySelector.js.map +1 -1
- package/library/index.d.ts +4 -2
- package/library/index.d.ts.map +1 -1
- package/library/index.js +2 -1
- package/library/index.js.map +1 -1
- package/library/useCanSetPublicVisibility.d.ts +30 -0
- package/library/useCanSetPublicVisibility.d.ts.map +1 -0
- package/library/useCanSetPublicVisibility.js +41 -0
- package/library/useCanSetPublicVisibility.js.map +1 -0
- package/library/visibilityLevels.d.ts +32 -1
- package/library/visibilityLevels.d.ts.map +1 -1
- package/library/visibilityLevels.js +34 -14
- package/library/visibilityLevels.js.map +1 -1
- package/mcp-server/useMcpServerConnect.d.ts +8 -5
- package/mcp-server/useMcpServerConnect.d.ts.map +1 -1
- package/mcp-server/useMcpServerConnect.js +2 -1
- package/mcp-server/useMcpServerConnect.js.map +1 -1
- package/mcp-server/useMcpServerOAuthConnect.d.ts.map +1 -1
- package/mcp-server/useMcpServerOAuthConnect.js +7 -2
- package/mcp-server/useMcpServerOAuthConnect.js.map +1 -1
- package/oauth-app/CreateOAuthAppForm.d.ts +2 -2
- package/oauth-app/CreateOAuthAppForm.d.ts.map +1 -1
- package/oauth-app/CreateOAuthAppForm.js +13 -4
- package/oauth-app/CreateOAuthAppForm.js.map +1 -1
- package/oauth-app/OAuthAppDetailPanel.d.ts.map +1 -1
- package/oauth-app/OAuthAppDetailPanel.js +32 -5
- package/oauth-app/OAuthAppDetailPanel.js.map +1 -1
- package/organization/OrgPreferencesPanel.d.ts +32 -0
- package/organization/OrgPreferencesPanel.d.ts.map +1 -0
- package/organization/OrgPreferencesPanel.js +90 -0
- package/organization/OrgPreferencesPanel.js.map +1 -0
- package/organization/OrgProfilePanel.d.ts.map +1 -1
- package/organization/OrgProfilePanel.js +5 -4
- package/organization/OrgProfilePanel.js.map +1 -1
- package/organization/index.d.ts +2 -0
- package/organization/index.d.ts.map +1 -1
- package/organization/index.js +1 -0
- package/organization/index.js.map +1 -1
- package/package.json +4 -4
- package/session/NewSessionViewer.d.ts +10 -1
- package/session/NewSessionViewer.d.ts.map +1 -1
- package/session/NewSessionViewer.js +2 -1
- package/session/NewSessionViewer.js.map +1 -1
- package/session/useNewSessionFlow.d.ts +27 -1
- package/session/useNewSessionFlow.d.ts.map +1 -1
- package/session/useNewSessionFlow.js +45 -8
- package/session/useNewSessionFlow.js.map +1 -1
- package/settings/AccountPreferencesSection.d.ts +3 -0
- package/settings/AccountPreferencesSection.d.ts.map +1 -0
- package/settings/AccountPreferencesSection.js +10 -0
- package/settings/AccountPreferencesSection.js.map +1 -0
- package/settings/OrgPreferencesSection.d.ts +3 -0
- package/settings/OrgPreferencesSection.d.ts.map +1 -0
- package/settings/OrgPreferencesSection.js +13 -0
- package/settings/OrgPreferencesSection.js.map +1 -0
- package/settings/index.d.ts +2 -0
- package/settings/index.d.ts.map +1 -1
- package/settings/index.js +2 -0
- package/settings/index.js.map +1 -1
- package/settings/settings-nav.d.ts.map +1 -1
- package/settings/settings-nav.js +17 -1
- package/settings/settings-nav.js.map +1 -1
- package/src/attachment/AttachmentChipList.tsx +19 -8
- package/src/attachment/__tests__/AttachmentChipList.test.tsx +12 -0
- package/src/attachment/__tests__/useAttachments.test.ts +293 -0
- package/src/attachment/index.ts +1 -0
- package/src/attachment/useAttachments.ts +143 -11
- package/src/composer/SessionComposer.tsx +23 -14
- package/src/conversation/ConversationComposer.tsx +38 -4
- package/src/conversation/ConversationTemplatePickerDialog.tsx +441 -0
- package/src/conversation/ConversationsWorkbench.tsx +40 -4
- package/src/conversation/__tests__/ConversationComposer.test.tsx +56 -1
- package/src/conversation/__tests__/ConversationTemplatePickerDialog.test.tsx +224 -0
- package/src/conversation/__tests__/useConversationParticipation.test.tsx +45 -4
- package/src/conversation/index.ts +4 -0
- package/src/conversation/useConversationParticipation.ts +58 -6
- package/src/identity-account/AccountPreferencesPanel.tsx +446 -0
- package/src/identity-account/__tests__/AccountPreferencesPanel.test.tsx +233 -0
- package/src/identity-account/__tests__/useAccountExecutionDefaults.test.tsx +116 -0
- package/src/identity-account/__tests__/useMyIdentityAccount.test.tsx +121 -0
- package/src/identity-account/index.ts +11 -0
- package/src/identity-account/useAccountExecutionDefaults.ts +63 -0
- package/src/identity-account/useMyIdentityAccount.ts +75 -0
- package/src/identity-account/useUpdateIdentityAccount.ts +73 -0
- package/src/index.ts +24 -2
- package/src/internal/StandingContextField.tsx +92 -0
- package/src/library/InstanceVisibilitySelector.tsx +9 -2
- package/src/library/ResourceVisibilityControl.tsx +46 -13
- package/src/library/VisibilityOptionRow.tsx +28 -6
- package/src/library/VisibilitySelector.tsx +14 -2
- package/src/library/__tests__/VisibilitySelector.test.tsx +48 -1
- package/src/library/__tests__/visibilityLevels.test.ts +67 -1
- package/src/library/index.ts +6 -1
- package/src/library/useCanSetPublicVisibility.ts +56 -0
- package/src/library/visibilityLevels.ts +65 -14
- package/src/mcp-server/__tests__/useMcpServerConnect.asyncLane.test.tsx +117 -0
- package/src/mcp-server/useMcpServerConnect.ts +9 -6
- package/src/mcp-server/useMcpServerOAuthConnect.ts +7 -2
- package/src/oauth-app/CreateOAuthAppForm.tsx +58 -3
- package/src/oauth-app/OAuthAppDetailPanel.tsx +84 -3
- package/src/organization/OrgPreferencesPanel.tsx +221 -0
- package/src/organization/OrgProfilePanel.tsx +5 -4
- package/src/organization/__tests__/OrgPreferencesPanel.test.tsx +145 -0
- package/src/organization/__tests__/OrgProfilePanel.test.tsx +108 -0
- package/src/organization/index.ts +2 -0
- package/src/session/NewSessionViewer.tsx +12 -0
- package/src/session/__tests__/useNewSessionFlow.test.tsx +151 -0
- package/src/session/useNewSessionFlow.ts +76 -9
- package/src/settings/AccountPreferencesSection.tsx +25 -0
- package/src/settings/OrgPreferencesSection.tsx +35 -0
- package/src/settings/__tests__/settings-nav.test.ts +27 -0
- package/src/settings/index.ts +2 -0
- package/src/settings/settings-nav.ts +18 -0
- package/src/workflow/ApprovalFormBuilder.tsx +5 -27
- package/styles.css +1 -1
- package/workflow/ApprovalFormBuilder.d.ts.map +1 -1
- package/workflow/ApprovalFormBuilder.js +8 -5
- 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
|
+
});
|
package/src/settings/index.ts
CHANGED
|
@@ -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
|
}
|