@wildo-ai/saas-frontend-lib 1.1.16 → 1.1.17
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/dist/esm/components/compliance/EmbeddedSigningFrame.d.ts.map +1 -1
- package/dist/esm/components/compliance/EmbeddedSigningFrame.js +17 -6
- package/dist/esm/components/compliance/EmbeddedSigningFrame.js.map +1 -1
- package/dist/esm/components/data-display/approval-seal.d.ts +7 -5
- package/dist/esm/components/data-display/approval-seal.d.ts.map +1 -1
- package/dist/esm/components/data-display/approval-seal.js +10 -4
- package/dist/esm/components/data-display/approval-seal.js.map +1 -1
- package/dist/esm/components/data-display/signature-requests.d.ts +81 -0
- package/dist/esm/components/data-display/signature-requests.d.ts.map +1 -0
- package/dist/esm/components/data-display/signature-requests.js +123 -0
- package/dist/esm/components/data-display/signature-requests.js.map +1 -0
- package/dist/esm/components/flows-actors/approval.d.ts.map +1 -1
- package/dist/esm/components/flows-actors/approval.js +8 -15
- package/dist/esm/components/flows-actors/approval.js.map +1 -1
- package/dist/esm/components/form/automated/ResourceAutomatedForm.d.ts.map +1 -1
- package/dist/esm/components/form/automated/ResourceAutomatedForm.js +44 -29
- package/dist/esm/components/form/automated/ResourceAutomatedForm.js.map +1 -1
- package/dist/esm/components/navigation/NavigationItemBadge.d.ts +16 -0
- package/dist/esm/components/navigation/NavigationItemBadge.d.ts.map +1 -1
- package/dist/esm/components/navigation/NavigationItemBadge.js +14 -2
- package/dist/esm/components/navigation/NavigationItemBadge.js.map +1 -1
- package/dist/esm/components/navigation/app-level/ApplicationLevel_NavigationBack.d.ts +3 -3
- package/dist/esm/components/navigation/app-level/ApplicationLevel_NavigationBack.js +3 -3
- package/dist/esm/components/navigation/app-level/ApplicationLevel_NavigationBack.js.map +1 -1
- package/dist/esm/components/navigation/app-level/SidebarResourceBrowser.d.ts +5 -13
- package/dist/esm/components/navigation/app-level/SidebarResourceBrowser.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/SidebarResourceBrowser.js +30 -255
- package/dist/esm/components/navigation/app-level/SidebarResourceBrowser.js.map +1 -1
- package/dist/esm/components/navigation/app-level/useCommandMenuBehavior.d.ts +22 -1
- package/dist/esm/components/navigation/app-level/useCommandMenuBehavior.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/useCommandMenuBehavior.js +57 -26
- package/dist/esm/components/navigation/app-level/useCommandMenuBehavior.js.map +1 -1
- package/dist/esm/components/navigation/app-level/useMenuBarBehavior.d.ts +1 -1
- package/dist/esm/components/navigation/app-level/useMenuBarBehavior.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/useMenuBarBehavior.js +35 -1
- package/dist/esm/components/navigation/app-level/useMenuBarBehavior.js.map +1 -1
- package/dist/esm/components/navigation/app-level/useMenuUserOrgBehavior.d.ts +1 -1
- package/dist/esm/components/navigation/app-level/useMenuUserOrgBehavior.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/useMenuUserOrgBehavior.js +26 -4
- package/dist/esm/components/navigation/app-level/useMenuUserOrgBehavior.js.map +1 -1
- package/dist/esm/components/navigation/app-level/useNavigationBackBehavior.d.ts +31 -0
- package/dist/esm/components/navigation/app-level/useNavigationBackBehavior.d.ts.map +1 -0
- package/dist/esm/components/navigation/app-level/useNavigationBackBehavior.js +42 -0
- package/dist/esm/components/navigation/app-level/useNavigationBackBehavior.js.map +1 -0
- package/dist/esm/components/navigation/app-level/useSidebarResourceBrowser.d.ts +76 -0
- package/dist/esm/components/navigation/app-level/useSidebarResourceBrowser.d.ts.map +1 -0
- package/dist/esm/components/navigation/app-level/useSidebarResourceBrowser.js +268 -0
- package/dist/esm/components/navigation/app-level/useSidebarResourceBrowser.js.map +1 -0
- package/dist/esm/components/navigation/command.d.ts +5 -0
- package/dist/esm/components/navigation/command.d.ts.map +1 -1
- package/dist/esm/components/navigation/command.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_DangerZone.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_DangerZone.js +5 -2
- package/dist/esm/components/resources/ResourceLayout_DangerZone.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_InsertedViews.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_InsertedViews.js +5 -1
- package/dist/esm/components/resources/ResourceLayout_InsertedViews.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_List.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_List.js +4 -1
- package/dist/esm/components/resources/ResourceLayout_List.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_RecordSharing.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_RecordSharing.js +4 -1
- package/dist/esm/components/resources/ResourceLayout_RecordSharing.js.map +1 -1
- package/dist/esm/components/resources/collection/board/ResourceCollectionBody_Board.d.ts.map +1 -1
- package/dist/esm/components/resources/collection/board/ResourceCollectionBody_Board.js +4 -1
- package/dist/esm/components/resources/collection/board/ResourceCollectionBody_Board.js.map +1 -1
- package/dist/esm/components/resources/collection/calendar/ResourceCollectionBody_Calendar.d.ts.map +1 -1
- package/dist/esm/components/resources/collection/calendar/ResourceCollectionBody_Calendar.js +4 -1
- package/dist/esm/components/resources/collection/calendar/ResourceCollectionBody_Calendar.js.map +1 -1
- package/dist/esm/components/resources/collection/timeline/ResourceCollectionBody_Timeline.d.ts.map +1 -1
- package/dist/esm/components/resources/collection/timeline/ResourceCollectionBody_Timeline.js +4 -1
- package/dist/esm/components/resources/collection/timeline/ResourceCollectionBody_Timeline.js.map +1 -1
- package/dist/esm/components/resources/skeleton/Group.d.ts.map +1 -1
- package/dist/esm/components/resources/skeleton/Group.js +4 -1
- package/dist/esm/components/resources/skeleton/Group.js.map +1 -1
- package/dist/esm/components/sections/ContentSectionContainer.d.ts.map +1 -1
- package/dist/esm/components/sections/ContentSectionContainer.js +11 -7
- package/dist/esm/components/sections/ContentSectionContainer.js.map +1 -1
- package/dist/esm/components/sections/content-section.d.ts +1 -3
- package/dist/esm/components/sections/content-section.d.ts.map +1 -1
- package/dist/esm/components/sections/content-section.js.map +1 -1
- package/dist/esm/components/settings/AppPage_AgentActivitySettings.d.ts.map +1 -1
- package/dist/esm/components/settings/AppPage_AgentActivitySettings.js +2 -1
- package/dist/esm/components/settings/AppPage_AgentActivitySettings.js.map +1 -1
- package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.d.ts +12 -0
- package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.d.ts.map +1 -1
- package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.js +28 -6
- package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.js.map +1 -1
- package/dist/esm/components/typography/document-heading-level.d.ts +28 -0
- package/dist/esm/components/typography/document-heading-level.d.ts.map +1 -0
- package/dist/esm/components/typography/document-heading-level.js +63 -0
- package/dist/esm/components/typography/document-heading-level.js.map +1 -0
- package/dist/esm/components/views/chart-view/ChartView.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/ChartView.js +20 -16
- package/dist/esm/components/views/chart-view/ChartView.js.map +1 -1
- package/dist/esm/components/views/chart-view/ChartView.labels.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/ChartView.labels.js +7 -0
- package/dist/esm/components/views/chart-view/ChartView.labels.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builder-utils.d.ts +12 -3
- package/dist/esm/components/views/chart-view/option-builder/builder-utils.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builder-utils.js +18 -11
- package/dist/esm/components/views/chart-view/option-builder/builder-utils.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/bar-family.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/bar-family.builder.js +2 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/bar-family.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/funnel.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/funnel.builder.js +7 -3
- package/dist/esm/components/views/chart-view/option-builder/builders/funnel.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/gauge.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/gauge.builder.js +6 -2
- package/dist/esm/components/views/chart-view/option-builder/builders/gauge.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/heatmap.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/heatmap.builder.js +7 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/heatmap.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/hierarchical-family.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/hierarchical-family.builder.js +13 -9
- package/dist/esm/components/views/chart-view/option-builder/builders/hierarchical-family.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/line-family.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/line-family.builder.js +2 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/line-family.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/parallel.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/parallel.builder.js +2 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/parallel.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/pie-family.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/pie-family.builder.js +4 -3
- package/dist/esm/components/views/chart-view/option-builder/builders/pie-family.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/radar.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/radar.builder.js +2 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/radar.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/sankey.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/sankey.builder.js +5 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/sankey.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/statistical-family.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/statistical-family.builder.js +4 -3
- package/dist/esm/components/views/chart-view/option-builder/builders/statistical-family.builder.js.map +1 -1
- package/dist/esm/core/app-shell/app-shell.schemas.d.ts +87 -16
- package/dist/esm/core/app-shell/app-shell.schemas.d.ts.map +1 -1
- package/dist/esm/core/app-shell/app-shell.schemas.js +16 -0
- package/dist/esm/core/app-shell/app-shell.schemas.js.map +1 -1
- package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.d.ts +39 -4
- package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.d.ts.map +1 -1
- package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.js +33 -1
- package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.js.map +1 -1
- package/dist/esm/core/resources/hooks/useOperationEnabled.d.ts.map +1 -1
- package/dist/esm/core/resources/hooks/useOperationEnabled.js +41 -3
- package/dist/esm/core/resources/hooks/useOperationEnabled.js.map +1 -1
- package/dist/esm/core/search/command-score.d.ts +33 -0
- package/dist/esm/core/search/command-score.d.ts.map +1 -0
- package/dist/esm/core/search/command-score.js +109 -0
- package/dist/esm/core/search/command-score.js.map +1 -0
- package/dist/esm/index.d.ts +5 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +5 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +6 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"approval.d.ts","sourceRoot":"","sources":["../../../../src/components/flows-actors/approval.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAIL,KAAK,2BAA2B,EAEhC,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAE1B,KAAK,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AA;CAAE,EAAE,KAAK,EAAE,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,EAAE,CAKtI;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,8BAA8B,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAwKlG"}
|
|
@@ -120,12 +120,6 @@ const NO_OPERATION_RESOURCES = [];
|
|
|
120
120
|
export function FlowsActors_ApprovalRequest({ executionId, ...props }) {
|
|
121
121
|
const { executions, respondToApproval, answerQuestion } = useFlowsActors();
|
|
122
122
|
const [processingId, setProcessingId] = React.useState(null);
|
|
123
|
-
/**
|
|
124
|
-
* #2913: the decision this card answered, kept once the card's pending decision clears so the card shows its seal in
|
|
125
|
-
* its place. `shown` is what the card showed when it was answered: its decision and its title.
|
|
126
|
-
*/
|
|
127
|
-
const [answered, setAnswered] = React.useState(null);
|
|
128
|
-
const shown = React.useRef(null);
|
|
129
123
|
const execution = executions.get(executionId);
|
|
130
124
|
const pendingApproval = execution?.pendingApproval;
|
|
131
125
|
// The paused tool's title is loaded with the card's own words, so the card names the call as the inbox does.
|
|
@@ -137,13 +131,11 @@ export function FlowsActors_ApprovalRequest({ executionId, ...props }) {
|
|
|
137
131
|
// review F1).
|
|
138
132
|
const handleApprove = React.useCallback((id, comment, modifiedToolArgs, reasonCode) => {
|
|
139
133
|
setProcessingId(id);
|
|
140
|
-
setAnswered(shown.current);
|
|
141
134
|
// The reason rides only when given, so an answer without one keeps the call shape it always had.
|
|
142
135
|
respondToApproval(executionId, id, true, comment, modifiedToolArgs, ...(reasonCode ? [reasonCode] : []));
|
|
143
136
|
}, [executionId, respondToApproval]);
|
|
144
137
|
const handleDeny = React.useCallback((id, comment, reasonCode) => {
|
|
145
138
|
setProcessingId(id);
|
|
146
|
-
setAnswered(shown.current);
|
|
147
139
|
if (reasonCode)
|
|
148
140
|
respondToApproval(executionId, id, false, comment, undefined, reasonCode);
|
|
149
141
|
else
|
|
@@ -152,7 +144,6 @@ export function FlowsActors_ApprovalRequest({ executionId, ...props }) {
|
|
|
152
144
|
// #2720: the agent's QUESTION is answered with the person's values, or declined — never approved.
|
|
153
145
|
const handleAnswer = React.useCallback((id, optionRef, values, comment) => {
|
|
154
146
|
setProcessingId(id);
|
|
155
|
-
setAnswered(shown.current);
|
|
156
147
|
answerQuestion(executionId, optionRef, values, comment);
|
|
157
148
|
}, [executionId, answerQuestion]);
|
|
158
149
|
const approvalWord = React.useCallback((labelRef) => tComponent(FrontendComponentType.LOW_LEVEL_AI_APPROVAL, labelRef), [tComponent]);
|
|
@@ -162,11 +153,14 @@ export function FlowsActors_ApprovalRequest({ executionId, ...props }) {
|
|
|
162
153
|
React.useEffect(() => {
|
|
163
154
|
setProcessingId(null);
|
|
164
155
|
}, [pendingApproval]);
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
156
|
+
/*
|
|
157
|
+
* Answered: the card is gone. The seal of the answer is drawn on the conversation's line for the call that waited
|
|
158
|
+
* (#4062), named by the decision the server recorded on the call's trace, because this card lives only while the turn
|
|
159
|
+
* waits: the turn resumes the moment the decision is answered, here or from a reviewer's inbox, and a seal kept in this
|
|
160
|
+
* card's state was unmounted with it (#2913 kept it here, and no conversation ever showed one).
|
|
161
|
+
*/
|
|
162
|
+
if (!execution || !pendingApproval)
|
|
163
|
+
return null;
|
|
170
164
|
const { approvalId, riskLevel, expiresAt, toolName, toolArgs, toolInputSchema, modificationRefusal, rejectedToolArgs, routeKind, reasonCodes, reasonCodeRefused, question, presentation, } = pendingApproval;
|
|
171
165
|
/*
|
|
172
166
|
* The card's title, in this reader's words (#3201): the decision's presentation when the server sealed one, else the
|
|
@@ -175,7 +169,6 @@ export function FlowsActors_ApprovalRequest({ executionId, ...props }) {
|
|
|
175
169
|
* built from the tool's IDENTIFIER and rendered here as written, is gone from the announcement.
|
|
176
170
|
*/
|
|
177
171
|
const actionDescription = wordHumanDecisionPhrase(presentation?.title ?? describeHumanDecisionCard({ plane: HumanDecision_Plane.CONVERSATIONAL, toolName: toolName ?? '' }).title, t, roleLabel, toolLabel, operationLabel);
|
|
178
|
-
shown.current = pendingApproval.decisionRef ? { decisionRef: pendingApproval.decisionRef, title: actionDescription } : null;
|
|
179
172
|
/*
|
|
180
173
|
* Only an OWNER-routed decision is answered here. One routed to an assignee or a role is answered by a
|
|
181
174
|
* reviewer from their inbox, and the person whose conversation this is may not answer it (separation of
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"approval.js","sourceRoot":"","sources":["../../../../src/components/flows-actors/approval.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,kBAAkB,EAClB,gBAAgB,GAQjB,MAAM,8DAA8D,CAAC;AACtE,OAAO,EACL,iCAAiC,EACjC,2BAA2B,EAC3B,wBAAwB,EACxB,uBAAuB,EACvB,yBAAyB,EACzB,iBAAiB,EACjB,4BAA4B,EAC5B,mBAAmB,EACnB,2BAA2B,EAC3B,2BAA2B,EAC3B,uBAAuB,EACvB,uBAAuB,EACvB,gCAAgC,EAChC,uCAAuC,EACvC,kBAAkB,EAClB,yBAAyB,EACzB,+BAA+B,EAC/B,yBAAyB,EACzB,4BAA4B,GAM7B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,MAAM,2DAA2D,CAAC;AAC3H,OAAO,EAAE,cAAc,EAAE,MAAM,sDAAsD,CAAC;AAGtF,OAAO,EAAE,qBAAqB,EAAE,cAAc,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAA;AACtH,OAAO,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AAChE,OAAO,EAAE,uCAAuC,EAAE,mCAAmC,EAAE,MAAM,iFAAiF,CAAC;AAC/K,OAAO,EAAE,oBAAoB,EAAE,MAAM,2DAA2D,CAAC;AAEjG,sGAAsG;AACtG,MAAM,m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AiB,CAAC,QAAQ,EAAE,EAAE,YAAY,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAChK,YAAY,EAAE,CAAC,WAAW,EAAE,aAAa,EAAE,EAAE,CAAC,KAAK,GAAG,CAAC,WAAW,EAAE,iBAAiB,CAAC,WAAW,EAAE,EAAE,aAAa,EAAE,CAAC,EACrH,aAAa,EAAE,CAAC,WAAW,EAAE,EAAE,CAAC,KAAK,GAAG,CAAC,WAAW,EAAE,iBAAiB,CAAC,YAAY,EAAE,EAAE,CAAC,EACzF,aAAa,EAAE,UAAyB;gBACxC,2GAA2G;gBAC3G,SAAS,EAAE,SAAS,KAAK,yBAAyB,CAAC,OAAO,EAC1D,UAAU,EAAE,SAAS,KAAK,yBAAyB,CAAC,MAAM,EAC1D,OAAO,EAAE,GAAG,EAAE,GAAG,KAAK,OAAO,EAAE,CAAC,CAAC,CAAC,KAC9B,KAAK,GACT,EACD,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CACtB,KAAC,oBAAoB,IAAyB,WAAW,EAAE,KAAK,CAAC,WAAW,KAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,IAAxG,KAAK,CAAC,WAAW,CAA2F,CACxI,CAAC,IACC,CACJ,CAAC;AACJ,CAAC","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport {\n AI_ApprovalRequest,\n AI_ApprovalQueue,\n type AI_ApprovalQueueItem,\n type AI_ApprovalReasonCodeOption,\n type AI_ApprovalReassignCandidate,\n type AI_ApprovalRequestProps,\n type AI_ApprovalQueueProps,\n type AI_DecisionAnswerValue,\n type AI_DecisionQuestion,\n} from \"~wildo-frontend-lib/components/ai-elements/decision/approval\";\nimport {\n AGENT_WORK_REASON_CODE_VOCABULARY,\n ApplicationConfigVocabulary,\n FlowsActorsToolLabelSlot,\n flowsActorsToolLabelKey,\n flowsActorsToolLabelScope,\n HumanDecision_Act,\n HumanDecision_ActOutcomeKind,\n HumanDecision_Plane,\n HumanDecision_RefusalReason,\n HumanDecision_RequesterKind,\n HumanDecision_RouteKind,\n HumanDecisionPhraseKind,\n HUMAN_DECISION_INBOX_FOCUS_PARAM,\n HUMAN_DECISION_VERDICT_OPTIONS_BY_PLANE,\n ReviewDeadlineKind,\n describeHumanDecisionCard,\n humanDecisionAsksItsOwnQuestion,\n humanDecisionOptionPhrase,\n humanDecisionPresentedRowsOf,\n type HumanDecisionPhrase,\n type HumanDecision_ActOutcome,\n type HumanDecision_ActRequest,\n type HumanDecision_PendingCard,\n type HumanDecision_Request,\n} from \"@wildo-ai/saas-models\";\nimport { PendingDecisionsReadState, usePendingDecisions } from \"~wildo-frontend-lib/core/flows-actors/usePendingDecisions\";\nimport { useFlowsActors } from \"~wildo-frontend-lib/core/flows-actors/useFlowsActors\";\nimport type { ComponentProps } from \"react\";\nimport type { SerializableZodSchema } from \"@wildo-ai/zod-decorators\";\nimport { FrontendComponentType, LabellingTypes, ResourceOperationTextSlot } from \"@wildo-ai/presets-components-models\"\nimport { useI18n } from \"~wildo-frontend-lib/core/i18n/useI18n\";\nimport { APPROVAL_MODIFICATION_REFUSAL_LABEL_REF, describeApprovalModificationRefusal } from \"~wildo-frontend-lib/components/flows-actors/approval-modification-refusal.utils\";\nimport { DecisionApprovalSeal } from \"~wildo-frontend-lib/components/data-display/approval-seal\";\n\n/** How many decisions answered in this inbox keep their seal shown under it, newest first (#2913). */\nconst DECIDED_SEALS_SHOWN = 5;\n\n//===============================================================\n// Flows-Actors Approval Wrappers\n//\n// Thin context-wired wrappers over the preset decision components.\n//\n// - FlowsActors_ApprovalRequest answers a decision IN its conversation, over the socket the turn runs on.\n// - FlowsActors_ApprovalQueue is the person's INBOX: every decision they may act on, read from the server\n// (#1594 D6), answered and moved over REST.\n//\n// A decision with options of its OWN — an actor system's question, with its fields — is answered in the inbox too\n// (#2526): its card carries the request, and the inbox draws its options in place of Approve and Deny and sends the\n// chosen one, with the field values, in the one answer shape. Two standalone wrappers that answered such a decision\n// outside any list (FlowsActors_DecisionRequest, FlowsActors_HumanInputRequest) had no consumer and were folded into\n// this one path; since #2539 an application raises those decisions on its own actor plane.\n//===============================================================\n\n/**\n * What an act came to, in the approval's own labels. Total over the outcome vocabulary, so an outcome added\n * tomorrow is a compile error here rather than a silent act. `toolLabel` is the card's tool, in the words the card shows\n * it in, for the notices that name it. Exported for the pins that hold it.\n */\nexport function noticeOfOutcome(\n outcome: HumanDecision_ActOutcome,\n t: (labelRef: string, params?: Record<string, string>) => string,\n toolLabel?: string,\n): string | undefined {\n // #3316: the arguments a refusal is about, by name: the inbox has no error payload, and the values may all be valid.\n const named = { arguments: (outcome.argumentNames ?? []).join(', ') || t(\"noticeTheseArguments\") };\n const byKind: Readonly<Record<HumanDecision_ActOutcomeKind, string | undefined>> = {\n [HumanDecision_ActOutcomeKind.APPLIED]: undefined,\n // An admitted person's refused clock act names why (#1628); anything else stays one undisclosing notice.\n // #2903: the request changed since it was read; the list just re-read shows it as it is now.\n [HumanDecision_ActOutcomeKind.NOT_ACTIONABLE]: outcome.reason === HumanDecision_RefusalReason.PRESENTATION_STALE ? t(\"noticePresentationStale\")\n : outcome.reason === HumanDecision_RefusalReason.CLOCK_ALREADY_PAUSED ? t(\"noticeClockAlreadyPaused\")\n : outcome.reason === HumanDecision_RefusalReason.CLOCK_NOT_PAUSED ? t(\"noticeClockNotPaused\")\n : outcome.reason === HumanDecision_RefusalReason.PAUSE_STATE_NOT_DECLARED ? t(\"noticePauseStateNotDeclared\")\n : t(\"noticeNotActionable\"),\n [HumanDecision_ActOutcomeKind.LAPSED]: t(\"noticeLapsed\"),\n [HumanDecision_ActOutcomeKind.REQUESTER_AUTHORITY_LAPSED]: t(\"noticeRequesterAuthorityLapsed\"),\n // An edit pointing the call at a record the answerer may not reach says so (#2734): the inbox gets no error payload,\n // only the outcome, so its reason is what tells a representative to put the arguments back.\n // Likewise a call that would not run as read (#3295): the values may be valid, so \"refused\" alone says nothing.\n [HumanDecision_ActOutcomeKind.MODIFICATION_REJECTED]: outcome.reason === HumanDecision_RefusalReason.EDITED_CALL_NOT_REACHABLE\n ? t(\"noticeEditedCallNotReachable\", named)\n : outcome.reason === HumanDecision_RefusalReason.CALL_NOT_RUN_AS_READ\n ? t(\"noticeCallNotRunAsRead\", named)\n : outcome.reason === HumanDecision_RefusalReason.CREDENTIAL_NOT_ACCEPTED\n ? t(\"noticeCredentialNotAccepted\", named)\n : outcome.reason === HumanDecision_RefusalReason.CALL_CANNOT_RUN\n ? callCannotRunNotice(outcome, t, toolLabel)\n : outcome.reason === HumanDecision_RefusalReason.ARGUMENTS_CANNOT_BE_CORRECTED\n ? t(\"noticeArgumentsCannotBeCorrected\", named)\n : t(\"noticeModificationRejected\"),\n [HumanDecision_ActOutcomeKind.REASON_CODE_REJECTED]: t(\"noticeReasonCodeRejected\"),\n [HumanDecision_ActOutcomeKind.CONSENT_REQUIRED]: t(\"noticeConsentRequired\"),\n [HumanDecision_ActOutcomeKind.TARGET_REFUSED]: outcome.reason === HumanDecision_RefusalReason.NO_TARGET ? t(\"noticeNoEscalationTarget\") : t(\"noticeTargetRefused\"),\n [HumanDecision_ActOutcomeKind.SUPERSEDED]: t(\"noticeSuperseded\"),\n };\n return byKind[outcome.kind];\n}\n\n/**\n * #3965: why a call cannot run as things stand, in the label the conversation's card shows for the same refusal: an agent\n * suspended, a policy tightened and an agent gone each have their own remedy, and `call_cannot_run` alone names none of\n * them. A refusal this bundle does not know (a newer server), or none (an older one), keeps the generic notice.\n */\nfunction callCannotRunNotice(\n outcome: HumanDecision_ActOutcome,\n t: (labelRef: string, params?: Record<string, string>) => string,\n toolLabel: string | undefined,\n): string {\n const labelRef = outcome.callRefusalReason !== undefined && Object.hasOwn(APPROVAL_MODIFICATION_REFUSAL_LABEL_REF, outcome.callRefusalReason)\n ? APPROVAL_MODIFICATION_REFUSAL_LABEL_REF[outcome.callRefusalReason as keyof typeof APPROVAL_MODIFICATION_REFUSAL_LABEL_REF]\n : undefined;\n if (labelRef === undefined) return t(\"noticeCallCannotRun\");\n return t(labelRef, { toolName: toolLabel ?? '', arguments: (outcome.argumentNames ?? []).join(', ') });\n}\n\n/**\n * The presentation a card was read on (#2903), echoed on its answer: the server rebuilds the decision's presentation and\n * refuses an answer naming none, or one that is no longer current, so what is sealed is what this reviewer read.\n */\nfunction presentationEchoOf(decisions: readonly HumanDecision_PendingCard[], decisionRef: string): Pick<HumanDecision_ActRequest, 'presentationId'> {\n const presentationId = decisions.find((card) => card.decisionRef === decisionRef)?.presentationId;\n return presentationId ? { presentationId } : {};\n}\n\n/**\n * The reason picker's options (#1921): each declared code with its word from `system_enums.AgentWorkReasonCode.<code>`.\n *\n * The codes are the APPLICATION's (`agentWorkReview.reasonCodes`); their words live under the framework's named\n * vocabulary, where the labelling pipeline plans one key per declared code. A code nobody has worded yet shows as the\n * code itself — `tSystemEnum` answers the raw value on a miss — which is a missing label that looks missing, never words\n * invented from the identifier. Exported for the pin that holds that fallback.\n */\nexport function describeReasonCodeOptions(\n reasonCodes: readonly string[] | undefined,\n tSystemEnum: (enumName: typeof AGENT_WORK_REASON_CODE_VOCABULARY, enumValue: string) => string,\n): AI_ApprovalReasonCodeOption[] | undefined {\n if (!reasonCodes || reasonCodes.length === 0) return undefined;\n return reasonCodes.map((code) => ({ value: code, label: tSystemEnum(AGENT_WORK_REASON_CODE_VOCABULARY, code) }));\n}\n\n/**\n * A gate's pause states as the words a reviewer reads (#1864): each state's word under the framework's named vocabulary\n * `system_enums.HumanDecisionPauseState.<state>`, which the labelling pipeline plans from every gate's declared\n * `pauseStates`. A state nobody has worded yet shows as itself — `tSystemEnum` answers the raw value on a miss — a\n * missing label that looks missing. Exported for the pin that holds it.\n */\nexport function describePauseState(\n pauseState: string,\n tSystemEnum: (enumName: ApplicationConfigVocabulary.HUMAN_DECISION_PAUSE_STATE, enumValue: string) => string,\n): string {\n return tSystemEnum(ApplicationConfigVocabulary.HUMAN_DECISION_PAUSE_STATE, pauseState);\n}\n\n/**\n * The label namespaces the approval wrappers read beyond their own component: the reason codes' (#1921) and pause\n * states' (#1864) words, and the roles' (#2526 review F3) — the holder line names a role, and `roles` is not an eager\n * section, so without it every ROLE card named the role by its key.\n */\nconst APPROVAL_LABEL_NAMESPACES = [LabellingTypes.SYSTEM_ENUMS, LabellingTypes.ROLES];\n/** The chat card holds a tool approval, never an operation approval, so it loads no resource's operation titles. */\nconst NO_OPERATION_RESOURCES: readonly string[] = [];\n\n//===============================================================\n// FlowsActors_ApprovalRequest\n//\n// A decision answered in the conversation it was raised in.\n//===============================================================\n\nexport type FlowsActors_ApprovalRequestProps = Omit<\n AI_ApprovalRequestProps,\n \"approvalId\" | \"actionDescription\" | \"riskLevel\" | \"onApprove\" | \"onDeny\" | \"onEscalate\" | \"answerable\"\n> & {\n executionId: string;\n};\n\nexport function FlowsActors_ApprovalRequest({\n executionId,\n ...props\n}: FlowsActors_ApprovalRequestProps): React.JSX.Element | null {\n const { executions, respondToApproval, answerQuestion } = useFlowsActors();\n const [processingId, setProcessingId] = React.useState<string | null>(null);\n /**\n * #2913: the decision this card answered, kept once the card's pending decision clears so the card shows its seal in\n * its place. `shown` is what the card showed when it was answered: its decision and its title.\n */\n const [answered, setAnswered] = React.useState<{ readonly decisionRef: string; readonly title: string } | null>(null);\n const shown = React.useRef<{ readonly decisionRef: string; readonly title: string } | null>(null);\n const execution = executions.get(executionId);\n const pendingApproval = execution?.pendingApproval;\n // The paused tool's title is loaded with the card's own words, so the card names the call as the inbox does.\n const pendingToolName = pendingApproval?.toolName;\n const toolNames = React.useMemo(() => (pendingToolName ? [pendingToolName] : []), [pendingToolName]);\n const { t, roleLabel, toolLabel, operationLabel, tComponent, tSystemEnum } = useHumanDecisionWords(toolNames, NO_OPERATION_RESOURCES);\n\n // Every hook runs BEFORE the early return below. React requires the same hooks on every render, and the render\n // that clears `pendingApproval` — the moment a decision is answered — used to run three fewer (#534 fourth\n // review F1).\n const handleApprove = React.useCallback((id: string, comment?: string, modifiedToolArgs?: Record<string, unknown>, reasonCode?: string) => {\n setProcessingId(id);\n setAnswered(shown.current);\n // The reason rides only when given, so an answer without one keeps the call shape it always had.\n respondToApproval(executionId, id, true, comment, modifiedToolArgs, ...(reasonCode ? [reasonCode] : []));\n }, [executionId, respondToApproval]);\n\n const handleDeny = React.useCallback((id: string, comment?: string, reasonCode?: string) => {\n setProcessingId(id);\n setAnswered(shown.current);\n if (reasonCode) respondToApproval(executionId, id, false, comment, undefined, reasonCode);\n else respondToApproval(executionId, id, false, comment);\n }, [executionId, respondToApproval]);\n\n // #2720: the agent's QUESTION is answered with the person's values, or declined — never approved.\n const handleAnswer = React.useCallback((id: string, optionRef: string, values: readonly AI_DecisionAnswerValue[], comment?: string) => {\n setProcessingId(id);\n setAnswered(shown.current);\n answerQuestion(executionId, optionRef, values, comment);\n }, [executionId, answerQuestion]);\n const approvalWord = React.useCallback(\n (labelRef: string) => tComponent(FrontendComponentType.LOW_LEVEL_AI_APPROVAL, labelRef as never),\n [tComponent],\n );\n\n // A decision answered and then handed BACK arrives as a new pending approval — a refused edit (#587), or a\n // decision the consent requirement refused (#534). Whatever this component recorded as in flight has been\n // answered, so the decision is answerable again instead of staying disabled until the view remounts.\n React.useEffect(() => {\n setProcessingId(null);\n }, [pendingApproval]);\n\n if (!execution || !pendingApproval) {\n // Answered here and gone from the pending state: the seal of that answer, signed seconds later (#2913). A decision that\n // sealed nothing (or one answered by someone else) answers 404, and the card draws nothing, as before.\n return answered ? <DecisionApprovalSeal decisionRef={answered.decisionRef} description={answered.title} /> : null;\n }\n\n const {\n approvalId, riskLevel, expiresAt, toolName, toolArgs, toolInputSchema, modificationRefusal,\n rejectedToolArgs, routeKind, reasonCodes, reasonCodeRefused, question, presentation,\n } = pendingApproval;\n /*\n * The card's title, in this reader's words (#3201): the decision's presentation when the server sealed one, else the\n * tool-approval title every decision surface derives (`describeHumanDecisionCard`), worded exactly as the inbox words\n * the same decision. The pause carries typed state only: the server's English `Waiting for approval to run \"<tool>\".`,\n * built from the tool's IDENTIFIER and rendered here as written, is gone from the announcement.\n */\n const actionDescription = wordHumanDecisionPhrase(\n presentation?.title ?? describeHumanDecisionCard({ plane: HumanDecision_Plane.CONVERSATIONAL, toolName: toolName ?? '' }).title,\n t, roleLabel, toolLabel, operationLabel,\n );\n shown.current = pendingApproval.decisionRef ? { decisionRef: pendingApproval.decisionRef, title: actionDescription } : null;\n /*\n * Only an OWNER-routed decision is answered here. One routed to an assignee or a role is answered by a\n * reviewer from their inbox, and the person whose conversation this is may not answer it (separation of\n * duties, #1594) — so it shows as waiting, with nothing to press that the server would refuse.\n *\n * There is no Escalate here either. It used to send a DENIAL prefixed `[ESCALATED]`, which refused the call\n * and escalated nothing; an OWNER route cannot be escalated at all, and a reviewer escalates from the inbox.\n */\n const answerable = routeKind === undefined || routeKind === HumanDecision_RouteKind.OWNER;\n\n if (question) {\n // #2720: the agent asks its person. Its questions, through their form, in place of the call and its arguments.\n return (\n <AI_ApprovalRequest\n approvalId={approvalId}\n actionDescription={question.title}\n executionId={executionId}\n systemRef={execution.systemRef}\n expiresAt={expiresAt}\n answerable={answerable}\n question={humanDecisionQuestionOf(question, approvalWord)}\n onAnswer={handleAnswer}\n isProcessing={processingId === approvalId}\n {...props}\n />\n );\n }\n\n return (\n <AI_ApprovalRequest\n approvalId={approvalId}\n actionDescription={actionDescription}\n riskLevel={riskLevel}\n executionId={executionId}\n systemRef={execution.systemRef}\n expiresAt={expiresAt}\n answerable={answerable}\n // A refused reason code leaves the approval standing (#1921): it is back on screen, and says why in its own labels.\n actionNotice={!answerable\n ? tComponent(FrontendComponentType.LOW_LEVEL_AI_APPROVAL, \"awaitingReview\")\n : reasonCodeRefused ? tComponent(FrontendComponentType.LOW_LEVEL_AI_APPROVAL, \"noticeReasonCodeRejected\") : undefined}\n reasonCodeOptions={answerable ? describeReasonCodeOptions(reasonCodes, tSystemEnum) : undefined}\n /*\n * The tool call is WHAT is being approved, and until #528 it did not reach the browser at all.\n * `toolArgs` are the proposed arguments — a person approving \"rename this record\" is approving\n * a specific new title, and an approval surface that hides them is asking for a signature on an\n * unread document.\n *\n * #566 built the carrier for an edited call: the payload takes `modifiedToolArgs`, the server\n * re-validates them against the tool's own `inputSchema`, re-signs the approval over them and\n * records that the decider changed them. So the editor is offered here, where the decision is\n * answered — never where it is only shown.\n */\n allowArgumentModification={answerable}\n toolName={toolName}\n // The call's line names the tool by its title, as the card's title does (#3201).\n toolLabel={toolName ? toolLabel(toolName) : undefined}\n executionContext={toolArgs}\n // #2903: the arguments as the server presented them, rendered verbatim: what the person reads is what is sealed.\n // #2914: then the values of the record the approval covers, which the seal binds too.\n presentedArguments={pendingApproval.presentation ? humanDecisionPresentedRowsOf(pendingApproval.presentation) : undefined}\n argumentsSchema={toolInputSchema}\n // The refusal in the approval's own labels, naming the tool and the offending arguments (#1186).\n argumentModificationError={modificationRefusal\n ? describeApprovalModificationRefusal(modificationRefusal, (labelRef, params) => tComponent(FrontendComponentType.LOW_LEVEL_AI_APPROVAL, labelRef, params))\n : undefined}\n rejectedArguments={rejectedToolArgs}\n onApprove={handleApprove}\n onDeny={handleDeny}\n // Released by the effect above whenever the approval is handed back. Not released while the socket is\n // disconnected: `respondToApproval` then sends nothing and leaves the approval exactly as it was, so its\n // identity never changes — a stuck state that predates #534 and is cured by the view remounting.\n isProcessing={processingId === approvalId}\n {...props}\n />\n );\n}\n\n//===============================================================\n// FlowsActors_ApprovalQueue\n//\n// The person's inbox: every decision they may act on, from the server.\n//===============================================================\n\n/**\n * Who holds a listed decision now, in the approval's own words (#2526). Total over the route vocabulary.\n *\n * The inbox lists only decisions the viewer may ANSWER (#1594 I3), so an ASSIGNEE card is always assigned to the\n * viewer: \"you claimed it\" when they took it from a role, \"assigned to you\" when a resolver, a reassignment or an\n * escalation put it there. A decision a colleague claimed is not in the viewer's list at all. A ROLE card names the role\n * in the roles tree's words, never its key. Exported for the pin that holds it.\n */\nexport function describeDecisionHolder(\n route: HumanDecision_PendingCard['route'],\n t: (labelRef: string, params?: Record<string, string>) => string,\n roleLabel: (roleKey: string) => string,\n formatDateTime: (value: Date | string) => string,\n): string | undefined {\n const byKind: Readonly<Record<HumanDecision_RouteKind, () => string | undefined>> = {\n [HumanDecision_RouteKind.OWNER]: () => t(\"holderOwner\"),\n [HumanDecision_RouteKind.ASSIGNEE]: () => (route.claimedAt ? t(\"holderClaimedByYou\", { when: formatDateTime(route.claimedAt) }) : t(\"holderAssignedToYou\")),\n // A ROLE route always names its role (a gate without one stops the application at startup); none means no line.\n [HumanDecision_RouteKind.ROLE]: () => (route.eligibleRole ? t(\"holderRole\", { role: roleLabel(route.eligibleRole) }) : undefined),\n };\n return byKind[route.kind]();\n}\n\n/**\n * Who raised a listed decision, when that is worth saying (#2526). Total over the requester vocabulary.\n *\n * A person's own request needs no line: the holder line already says whose conversation it is when it is the viewer's,\n * and naming another person by id would show an identifier (naming people is #1852). What a reviewer must not miss is\n * a request with NO person behind it — an autonomous agent, raised by a machine — or one raised through an application a\n * person connected, which resumes only while that delegation holds.\n */\nconst REQUESTER_LABEL: Readonly<Record<HumanDecision_RequesterKind, string | undefined>> = {\n [HumanDecision_RequesterKind.USER]: undefined,\n [HumanDecision_RequesterKind.MACHINE]: \"requesterAutonomousAgent\",\n [HumanDecision_RequesterKind.DELEGATED_CLIENT]: \"requesterConnectedApplication\",\n};\n\nexport function describeDecisionRequester(\n requesterKind: HumanDecision_RequesterKind,\n t: (labelRef: string) => string,\n): string | undefined {\n const labelRef = REQUESTER_LABEL[requesterKind];\n return labelRef ? t(labelRef) : undefined;\n}\n\n/**\n * A phrase of the shared wording (`describeHumanDecisionCard`), in this inbox's words: an approval label through `t`, a\n * role through the roles label tree, a tool through its title in the tool label tree (#2551), a resource operation\n * through its title in the resource label tree (#2288), a host's own words as written.\n */\nfunction wordHumanDecisionPhrase(\n phrase: HumanDecisionPhrase,\n t: (labelRef: string, params?: Record<string, string>) => string,\n roleLabel: (roleKey: string) => string,\n toolLabel: (toolName: string) => string,\n // With no wording function, the operation's label key: a missing label looks missing.\n operationLabel: (resourceType: string, operationIdentifier: string) => string = (resourceType, operationIdentifier) =>\n `${LabellingTypes.RESOURCES}.${resourceType}.operations.${operationIdentifier}.${ResourceOperationTextSlot.TITLE}`,\n): string {\n switch (phrase.kind) {\n case HumanDecisionPhraseKind.LABEL:\n return phrase.params\n ? t(phrase.labelRef, Object.fromEntries(Object.entries(phrase.params).map(([key, value]) => [key, typeof value === 'object' ? wordHumanDecisionPhrase(value, t, roleLabel, toolLabel, operationLabel) : String(value)])))\n : t(phrase.labelRef);\n case HumanDecisionPhraseKind.ROLE:\n return roleLabel(phrase.roleKey);\n case HumanDecisionPhraseKind.TOOL:\n return toolLabel(phrase.toolName);\n case HumanDecisionPhraseKind.RESOURCE_OPERATION:\n return operationLabel(phrase.resourceType, phrase.operationIdentifier);\n case HumanDecisionPhraseKind.TEXT:\n return phrase.text;\n default: {\n const unhandled: never = phrase;\n return unhandled;\n }\n }\n}\n\n/**\n * What one inbox card SAYS, from the wording every decision surface shares (`describeHumanDecisionCard`): the same\n * line a chat card posted for this decision carries. A tool approval also shows the tool and its proposed arguments;\n * a representative admission (#1612) and a card asking its own question show none — there is no tool call.\n */\nfunction describeInboxCard(\n card: HumanDecision_PendingCard,\n t: (labelRef: string, params?: Record<string, string>) => string,\n roleLabel: (roleKey: string) => string = (roleKey) => roleKey,\n toolLabel: (toolName: string) => string = (toolName) => toolName,\n operationLabel?: (resourceType: string, operationIdentifier: string) => string,\n): Pick<AI_ApprovalQueueItem, 'actionDescription' | 'toolName' | 'toolLabel' | 'executionContext' | 'presentedArguments'> {\n // #2903: the values as the server presented them, rendered verbatim, so what the reviewer reads is what is sealed.\n // #2914: with the values of the record the approval covers.\n const presented = card.presentation ? { presentedArguments: humanDecisionPresentedRowsOf(card.presentation) } : {};\n const actionDescription = wordHumanDecisionPhrase(card.presentation?.title ?? describeHumanDecisionCard(card).title, t, roleLabel, toolLabel, operationLabel);\n // #2288: an operation approval shows the values the requester sent, as a tool approval shows its arguments.\n if (card.plane === HumanDecision_Plane.OPERATION_APPROVAL && card.operationApproval) {\n return { actionDescription, executionContext: card.operationApproval.requestedValues, ...presented };\n }\n const isRepresentativeAdmission = card.plane === HumanDecision_Plane.REPRESENTATIVE_ADMISSION && !!card.representativeAdmission;\n if (isRepresentativeAdmission || humanDecisionAsksItsOwnQuestion(card)) return { actionDescription };\n return { actionDescription, toolName: card.toolName, toolLabel: toolLabel(card.toolName), executionContext: card.toolArgs, ...presented };\n}\n\n/**\n * A request as the card asks it: its reason, its options and its fields with their form. An option the engine wrote is\n * worded by the approval label it names (`labelRef`, #2754), through `word` in this reader's language; any other option\n * carries the words its host wrote. The decision is the shared wording's (`humanDecisionOptionPhrase`), so the chat card,\n * the inbox and a notice cannot word one option two ways.\n */\nexport function humanDecisionQuestionOf(request: HumanDecision_Request, word: (labelRef: string) => string): AI_DecisionQuestion {\n return {\n description: request.description,\n options: request.options.map((option) => ({\n ref: option.ref,\n // An option phrase is a label or text: no role and no tool to word, so both pass through.\n label: wordHumanDecisionPhrase(humanDecisionOptionPhrase(option), word, (roleKey) => roleKey, (toolName) => toolName),\n intent: option.intent,\n ...(option.description ? { description: option.description } : {}),\n })),\n fields: request.fields,\n ...(request.form ? { form: request.form } : {}),\n };\n}\n\n/**\n * A card's own question, when it asks one (#2526): the request it carries, on a plane whose options are not the inbox's\n * Approve and Deny — or, on a plane that has those, a request that asks FIELDS, which only an agent's question to its\n * person does (#2720). `undefined` for a request the inbox words itself.\n */\nexport function decisionQuestionOf(card: Pick<HumanDecision_PendingCard, 'plane' | 'request'>, word: (labelRef: string) => string): AI_DecisionQuestion | undefined {\n if (!card.request) return undefined;\n if (!humanDecisionAsksItsOwnQuestion(card)) return undefined;\n // An option is worded by the label it names, on any plane (#2754): an agent's question and a flow's person step name\n // theirs. A host that named its own options keeps its words, whatever refs it chose (#2720 review L6).\n return humanDecisionQuestionOf(card.request, word);\n}\n\nexport type FlowsActors_ApprovalQueueProps = Omit<\n AI_ApprovalQueueProps,\n | \"items\" | \"onApprove\" | \"onDeny\" | \"onEscalate\" | \"onAnswer\" | \"onClaim\" | \"onUnclaim\" | \"onReassignOpen\" | \"onReassign\" | \"onPauseClock\" | \"onResumeClock\"\n | \"processingIds\" | \"isLoading\" | \"loadFailed\" | \"onRetry\"\n>;\n\n/**\n * The words a pending decision is read in, for every surface that shows one: an approval label through `t`, a role\n * through the roles label tree, a tool through its title in the tool label tree (#2551), a resource operation through its\n * title. The inbox and the chat card (#3201) both word a decision through these, so the two cannot read one decision two\n * ways, and neither shows a sentence the server wrote.\n *\n * `toolNames` and `operationResources` name the label scopes to load, so the titles are there when the card renders.\n */\nfunction useHumanDecisionWords(toolNames: readonly string[], operationResources: readonly string[]) {\n const labelKeys = React.useMemo(\n () => [...APPROVAL_LABEL_NAMESPACES, ...toolNames.map(flowsActorsToolLabelScope), ...operationResources.map((type) => `${LabellingTypes.RESOURCES}.${type}`)],\n [toolNames, operationResources],\n );\n const { t: tKey, tComponent, tRole, tSystemEnum, tResourceOperation, formatDateTime } = useI18n({ component: FrontendComponentType.LOW_LEVEL_AI_APPROVAL, keys: labelKeys });\n const t = React.useCallback(\n (labelRef: string, params?: Record<string, string>) => tComponent(FrontendComponentType.LOW_LEVEL_AI_APPROVAL, labelRef as never, params),\n [tComponent],\n );\n // A role is worded by the roles label tree, never shown as its identifier.\n const roleLabel = React.useCallback((roleKey: string) => (tRole ? tRole(roleKey, 'label') : roleKey), [tRole]);\n // A tool by its title, as the conversation names the same call; a tool with no words yet by its name.\n const toolLabel = React.useCallback((toolName: string) => {\n const key = flowsActorsToolLabelKey(toolName, FlowsActorsToolLabelSlot.TITLE);\n const resolved = tKey(key);\n return resolved === key || resolved.length === 0 ? toolName : resolved;\n }, [tKey]);\n // An operation by its title, as the application names it everywhere; with no title generated, its key (missing looks missing).\n const operationLabel = React.useCallback(\n (resourceType: string, operationIdentifier: string) => tResourceOperation(resourceType, operationIdentifier, ResourceOperationTextSlot.TITLE),\n [tResourceOperation],\n );\n return { t, roleLabel, toolLabel, operationLabel, tComponent, tSystemEnum, formatDateTime };\n}\n\n/**\n * The inbox's cards with the one a link named first (#2923): a chat card that cannot answer a decision links to it here\n * (`humanDecisionInboxPathOf`), and the person lands on it. The others keep their order.\n */\nexport function withFocusedDecisionFirst<T extends { readonly decisionRef: string }>(cards: readonly T[], search: string): readonly T[] {\n const focused = new URLSearchParams(search).get(HUMAN_DECISION_INBOX_FOCUS_PARAM);\n if (!focused) return cards;\n const named = cards.filter((card) => card.decisionRef === focused);\n return named.length === 0 ? cards : [...named, ...cards.filter((card) => card.decisionRef !== focused)];\n}\n\nexport function FlowsActors_ApprovalQueue(props: FlowsActors_ApprovalQueueProps): React.JSX.Element {\n const { decisions: listed, readState, refresh, act, candidates } = usePendingDecisions();\n // #2923: a link to one decision lists it first.\n const decisions = React.useMemo(() => withFocusedDecisionFirst(listed, window.location.search), [listed]);\n // The words of every tool a listed decision would run (#2551), loaded with the inbox's own.\n const toolNames = React.useMemo(() => [...new Set(decisions.map((card) => card.toolName).filter((name): name is string => !!name))].sort(), [decisions]);\n // #2288: the resources whose held operations are listed, so each operation is named by its title.\n const operationResources = React.useMemo(\n () => [...new Set(decisions.map((card) => card.operationApproval?.resourceType).filter((type): type is string => !!type))].sort(),\n [decisions],\n );\n const { t, roleLabel, toolLabel, operationLabel, tSystemEnum, formatDateTime } = useHumanDecisionWords(toolNames, operationResources);\n // Keyed by decisionRef: a decision is in flight from the act until its outcome returns.\n const [processing, setProcessing] = React.useState<ReadonlySet<string>>(() => new Set());\n const [notices, setNotices] = React.useState<ReadonlyMap<string, string>>(() => new Map());\n const [reassignCandidates, setReassignCandidates] = React.useState<ReadonlyMap<string, readonly AI_ApprovalReassignCandidate[]>>(() => new Map());\n /**\n * #2913: the decisions this person answered here. An answered card leaves the pending list, so its seal is shown under\n * the list instead: signed seconds after the answer, then current or not over the record it is about. Each keeps the\n * title its card showed, read from `cardTitles` when the answer was sent.\n */\n const [decided, setDecided] = React.useState<ReadonlyArray<{ readonly decisionRef: string; readonly title?: string }>>([]);\n const cardTitles = React.useRef<ReadonlyMap<string, string>>(new Map());\n // #3965: each card's tool, in its words, for a notice that names it.\n const cardToolLabels = React.useRef<ReadonlyMap<string, string>>(new Map());\n\n const run = React.useCallback(async (decisionRef: string, decisionAct: HumanDecision_Act, request: HumanDecision_ActRequest) => {\n setProcessing((previous) => new Set(previous).add(decisionRef));\n const title = cardTitles.current.get(decisionRef);\n try {\n const outcome = await act(decisionRef, decisionAct, request);\n if (decisionAct === HumanDecision_Act.ANSWER && outcome.kind === HumanDecision_ActOutcomeKind.APPLIED) {\n setDecided((previous) => [{ decisionRef, ...(title ? { title } : {}) }, ...previous.filter((entry) => entry.decisionRef !== decisionRef)].slice(0, DECIDED_SEALS_SHOWN));\n }\n const notice = noticeOfOutcome(outcome, t, cardToolLabels.current.get(decisionRef));\n setNotices((previous) => {\n const next = new Map(previous);\n if (notice === undefined) next.delete(decisionRef); else next.set(decisionRef, notice);\n return next;\n });\n } catch {\n // Not an outcome the server reported (a network failure): say it did not take, and leave it answerable.\n setNotices((previous) => new Map(previous).set(decisionRef, t(\"noticeNotActionable\")));\n } finally {\n setProcessing((previous) => {\n const next = new Set(previous);\n next.delete(decisionRef);\n return next;\n });\n }\n }, [act, t]);\n\n const items: AI_ApprovalQueueItem[] = React.useMemo(() => decisions.map((card) => ({\n approvalId: card.decisionRef,\n executionId: card.executionId,\n systemRef: card.systemRef,\n // #2526: the assistant by its own name, never its identifier; the risk the call's GATE declares, absent when none.\n systemName: card.systemDisplayName,\n riskLevel: card.riskLevel,\n // #2526: a decision asking its own question is answered by its own options.\n question: decisionQuestionOf(card, t),\n holderNotice: describeDecisionHolder(card.route, t, roleLabel, formatDateTime),\n requesterNotice: describeDecisionRequester(card.requesterKind, t),\n ...describeInboxCard(card, t, roleLabel, toolLabel, operationLabel),\n expiresAt: card.expiresAt ? new Date(card.expiresAt) : undefined,\n createdAt: new Date(card.requestedAt),\n // Only the acts the server says this person may perform — computed with the rule every act is checked by.\n // The inbox's Escalate names nobody, so it is offered only where the gate declares where escalations go;\n // handing it to a person of the reviewer's choosing is Reassign.\n canEscalate: card.permittedActs.includes(HumanDecision_Act.ESCALATE) && card.declaresEscalationTarget,\n canClaim: card.permittedActs.includes(HumanDecision_Act.CLAIM),\n canUnclaim: card.permittedActs.includes(HumanDecision_Act.UNCLAIM),\n canReassign: card.permittedActs.includes(HumanDecision_Act.REASSIGN),\n reassignCandidates: reassignCandidates.get(card.decisionRef),\n actionNotice: notices.get(card.decisionRef),\n // #1628 — the next deadline, or why its deadlines are paused; Pause only with a declared reason to name.\n canPauseClock: card.permittedActs.includes(HumanDecision_Act.PAUSE_CLOCK) && !card.clockPause && card.pauseStates.length > 0,\n canResumeClock: card.permittedActs.includes(HumanDecision_Act.RESUME_CLOCK) && !!card.clockPause,\n // A pause state is the APPLICATION's identifier, shown as its word (#1864) — see `describePauseState`.\n pauseStateOptions: card.pauseStates.map((pauseState) => ({ value: pauseState, label: describePauseState(pauseState, tSystemEnum) })),\n deadlineNotice: card.nextDeadline\n ? t(card.nextDeadline.kind === ReviewDeadlineKind.CLAIM ? \"deadlineClaimBy\" : \"deadlineDecisionBy\", { when: formatDateTime(card.nextDeadline.dueAt) })\n : undefined,\n clockPausedNotice: card.clockPause ? t(\"clockPausedIn\", { pauseState: describePauseState(card.clockPause.pauseStateRef, tSystemEnum) }) : undefined,\n // #1921 — the reviewer may give a reason from the application's vocabulary when correcting the agent, and may\n // CORRECT it by editing the call: the act request carries `modifiedToolArgs`, which the server re-validates against\n // the tool's own schema. Only on a tool approval — a representative admission has no call to edit and no agent to correct.\n reasonCodeOptions: describeReasonCodeOptions(card.reasonCodes, tSystemEnum),\n allowArgumentModification: card.plane === HumanDecision_Plane.CONVERSATIONAL,\n argumentsSchema: card.toolInputSchema as SerializableZodSchema | undefined,\n })), [decisions, reassignCandidates, notices, t, roleLabel, toolLabel, operationLabel, tSystemEnum, formatDateTime]);\n cardTitles.current = new Map(items.flatMap((item) => (typeof item.actionDescription === 'string' ? [[item.approvalId, item.actionDescription] as const] : [])));\n cardToolLabels.current = new Map(items.flatMap((item) => (item.toolLabel ? [[item.approvalId, item.toolLabel] as const] : [])));\n\n /**\n * An answer in the one answer shape: the option chosen, and no values. Which option refs \"approve\" and \"deny\" mean\n * depends on the decision's plane — a tool approval's, or a representative admission's (#1612) — so the card decides.\n */\n const answer = React.useCallback((decisionRef: string, approve: boolean, comment?: string, modifiedToolArgs?: Record<string, unknown>, reasonCode?: string) => {\n const plane = decisions.find((card) => card.decisionRef === decisionRef)?.plane;\n const options = plane ? HUMAN_DECISION_VERDICT_OPTIONS_BY_PLANE[plane] : undefined;\n if (!options) {\n // A plane whose options this inbox does not offer: say it cannot be answered here, and send nothing.\n setNotices((previous) => new Map(previous).set(decisionRef, t(\"noticeNotActionable\")));\n return;\n }\n const optionRef = approve ? options.approve : options.deny;\n void run(decisionRef, HumanDecision_Act.ANSWER, {\n answer: { decisionId: decisionRef, optionRef, values: [] },\n // #2903: the presentation the reviewer read; the server refuses an answer naming none, or one no longer current.\n ...presentationEchoOf(decisions, decisionRef),\n ...(comment ? { reason: comment } : {}),\n // Only when the reviewer edited the call: an absent field means \"run it as proposed\" (#566).\n ...(modifiedToolArgs ? { modifiedToolArgs } : {}),\n // Why the reviewer corrected the agent (#1921); refused with REASON_CODE_REJECTED unless the application declares it.\n ...(reasonCode ? { reasonCode } : {}),\n });\n }, [run, decisions, t]);\n\n const handleReassignOpen = React.useCallback((decisionRef: string) => {\n setReassignCandidates((previous) => {\n const next = new Map(previous);\n next.delete(decisionRef);\n return next;\n });\n void candidates(decisionRef)\n .then((people) => setReassignCandidates((previous) => new Map(previous).set(\n decisionRef,\n // The membership's email is how a same-organization reviewer tells people apart; it is data, not a label.\n people.map((person) => ({ value: person.userId, label: person.email ?? person.userId })),\n )))\n .catch(() => setReassignCandidates((previous) => new Map(previous).set(decisionRef, [])));\n }, [candidates]);\n\n return (\n <>\n <AI_ApprovalQueue\n items={items}\n onApprove={(decisionRef, comment, modifiedToolArgs, reasonCode) => answer(decisionRef, true, comment, modifiedToolArgs, reasonCode)}\n onDeny={(decisionRef, comment, reasonCode) => answer(decisionRef, false, comment, undefined, reasonCode)}\n onEscalate={(decisionRef, comment) => void run(decisionRef, HumanDecision_Act.ESCALATE, comment ? { reason: comment } : {})}\n // #2526: the option the reviewer chose and the values it carries, in the one answer shape the server checks against\n // the decision's own request (an option it never offered, or values an option does not take, is refused).\n onAnswer={(decisionRef, optionRef, values, comment, reasonCode) => void run(decisionRef, HumanDecision_Act.ANSWER, {\n answer: { decisionId: decisionRef, optionRef, values: [...values] },\n ...presentationEchoOf(decisions, decisionRef),\n ...(comment ? { reason: comment } : {}),\n // #2539: an actor question that reviews an agent's work may carry a declared reason, as a tool approval does.\n ...(reasonCode ? { reasonCode } : {}),\n })}\n onClaim={(decisionRef) => void run(decisionRef, HumanDecision_Act.CLAIM, {})}\n onUnclaim={(decisionRef) => void run(decisionRef, HumanDecision_Act.UNCLAIM, {})}\n onReassignOpen={handleReassignOpen}\n onReassign={(decisionRef, targetUserId, comment) => void run(decisionRef, HumanDecision_Act.REASSIGN, { targetUserId, ...(comment ? { reason: comment } : {}) })}\n onPauseClock={(decisionRef, pauseStateRef) => void run(decisionRef, HumanDecision_Act.PAUSE_CLOCK, { pauseStateRef })}\n onResumeClock={(decisionRef) => void run(decisionRef, HumanDecision_Act.RESUME_CLOCK, {})}\n processingIds={processing as Set<string>}\n // #2526: a read still settling, and a read that failed, are states the inbox SHOWS — never an empty inbox.\n isLoading={readState === PendingDecisionsReadState.LOADING}\n loadFailed={readState === PendingDecisionsReadState.FAILED}\n onRetry={() => { void refresh(); }}\n {...props}\n />\n {decided.map((entry) => (\n <DecisionApprovalSeal key={entry.decisionRef} decisionRef={entry.decisionRef} {...(entry.title ? { description: entry.title } : {})} />\n ))}\n </>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"approval.js","sourceRoot":"","sources":["../../../../src/components/flows-actors/approval.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,kBAAkB,EAClB,gBAAgB,GAQjB,MAAM,8DAA8D,CAAC;AACtE,OAAO,EACL,iCAAiC,EACjC,2BAA2B,EAC3B,wBAAwB,EACxB,uBAAuB,EACvB,yBAAyB,EACzB,iBAAiB,EACjB,4BAA4B,EAC5B,mBAAmB,EACnB,2BAA2B,EAC3B,2BAA2B,EAC3B,uBAAuB,EACvB,uBAAuB,EACvB,gCAAgC,EAChC,uCAAuC,EACvC,kBAAkB,EAClB,yBAAyB,EACzB,+BAA+B,EAC/B,yBAAyB,EACzB,4BAA4B,GAM7B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,MAAM,2DAA2D,CAAC;AAC3H,OAAO,EAAE,cAAc,EAAE,MAAM,sDAAsD,CAAC;AAGtF,OAAO,EAAE,qBAAqB,EAAE,cAAc,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAA;AACtH,OAAO,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AAChE,OAAO,EAAE,uCAAuC,EAAE,mCAAmC,EAAE,MAAM,iFAAiF,CAAC;AAC/K,OAAO,EAAE,oBAAoB,EAAE,MAAM,2DAA2D,CAAC;AAEjG,sGAAsG;AACtG,MAAM,mBAAmB,GAAG,CAAC,CAAC;AAE9B,iEAAiE;AACjE,kCAAkC;AAClC,EAAE;AACF,oEAAoE;AACpE,EAAE;AACF,2GAA2G;AAC3G,2GAA2G;AAC3G,+CAA+C;AAC/C,EAAE;AACF,mHAAmH;AACnH,qHAAqH;AACrH,qHAAqH;AACrH,sHAAsH;AACtH,4FAA4F;AAC5F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KAAK,CAAC,WAAW,CAA2F,CACxI,CAAC,IACC,CACJ,CAAC;AACJ,CAAC","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport {\n AI_ApprovalRequest,\n AI_ApprovalQueue,\n type AI_ApprovalQueueItem,\n type AI_ApprovalReasonCodeOption,\n type AI_ApprovalReassignCandidate,\n type AI_ApprovalRequestProps,\n type AI_ApprovalQueueProps,\n type AI_DecisionAnswerValue,\n type AI_DecisionQuestion,\n} from \"~wildo-frontend-lib/components/ai-elements/decision/approval\";\nimport {\n AGENT_WORK_REASON_CODE_VOCABULARY,\n ApplicationConfigVocabulary,\n FlowsActorsToolLabelSlot,\n flowsActorsToolLabelKey,\n flowsActorsToolLabelScope,\n HumanDecision_Act,\n HumanDecision_ActOutcomeKind,\n HumanDecision_Plane,\n HumanDecision_RefusalReason,\n HumanDecision_RequesterKind,\n HumanDecision_RouteKind,\n HumanDecisionPhraseKind,\n HUMAN_DECISION_INBOX_FOCUS_PARAM,\n HUMAN_DECISION_VERDICT_OPTIONS_BY_PLANE,\n ReviewDeadlineKind,\n describeHumanDecisionCard,\n humanDecisionAsksItsOwnQuestion,\n humanDecisionOptionPhrase,\n humanDecisionPresentedRowsOf,\n type HumanDecisionPhrase,\n type HumanDecision_ActOutcome,\n type HumanDecision_ActRequest,\n type HumanDecision_PendingCard,\n type HumanDecision_Request,\n} from \"@wildo-ai/saas-models\";\nimport { PendingDecisionsReadState, usePendingDecisions } from \"~wildo-frontend-lib/core/flows-actors/usePendingDecisions\";\nimport { useFlowsActors } from \"~wildo-frontend-lib/core/flows-actors/useFlowsActors\";\nimport type { ComponentProps } from \"react\";\nimport type { SerializableZodSchema } from \"@wildo-ai/zod-decorators\";\nimport { FrontendComponentType, LabellingTypes, ResourceOperationTextSlot } from \"@wildo-ai/presets-components-models\"\nimport { useI18n } from \"~wildo-frontend-lib/core/i18n/useI18n\";\nimport { APPROVAL_MODIFICATION_REFUSAL_LABEL_REF, describeApprovalModificationRefusal } from \"~wildo-frontend-lib/components/flows-actors/approval-modification-refusal.utils\";\nimport { DecisionApprovalSeal } from \"~wildo-frontend-lib/components/data-display/approval-seal\";\n\n/** How many decisions answered in this inbox keep their seal shown under it, newest first (#2913). */\nconst DECIDED_SEALS_SHOWN = 5;\n\n//===============================================================\n// Flows-Actors Approval Wrappers\n//\n// Thin context-wired wrappers over the preset decision components.\n//\n// - FlowsActors_ApprovalRequest answers a decision IN its conversation, over the socket the turn runs on.\n// - FlowsActors_ApprovalQueue is the person's INBOX: every decision they may act on, read from the server\n// (#1594 D6), answered and moved over REST.\n//\n// A decision with options of its OWN — an actor system's question, with its fields — is answered in the inbox too\n// (#2526): its card carries the request, and the inbox draws its options in place of Approve and Deny and sends the\n// chosen one, with the field values, in the one answer shape. Two standalone wrappers that answered such a decision\n// outside any list (FlowsActors_DecisionRequest, FlowsActors_HumanInputRequest) had no consumer and were folded into\n// this one path; since #2539 an application raises those decisions on its own actor plane.\n//===============================================================\n\n/**\n * What an act came to, in the approval's own labels. Total over the outcome vocabulary, so an outcome added\n * tomorrow is a compile error here rather than a silent act. `toolLabel` is the card's tool, in the words the card shows\n * it in, for the notices that name it. Exported for the pins that hold it.\n */\nexport function noticeOfOutcome(\n outcome: HumanDecision_ActOutcome,\n t: (labelRef: string, params?: Record<string, string>) => string,\n toolLabel?: string,\n): string | undefined {\n // #3316: the arguments a refusal is about, by name: the inbox has no error payload, and the values may all be valid.\n const named = { arguments: (outcome.argumentNames ?? []).join(', ') || t(\"noticeTheseArguments\") };\n const byKind: Readonly<Record<HumanDecision_ActOutcomeKind, string | undefined>> = {\n [HumanDecision_ActOutcomeKind.APPLIED]: undefined,\n // An admitted person's refused clock act names why (#1628); anything else stays one undisclosing notice.\n // #2903: the request changed since it was read; the list just re-read shows it as it is now.\n [HumanDecision_ActOutcomeKind.NOT_ACTIONABLE]: outcome.reason === HumanDecision_RefusalReason.PRESENTATION_STALE ? t(\"noticePresentationStale\")\n : outcome.reason === HumanDecision_RefusalReason.CLOCK_ALREADY_PAUSED ? t(\"noticeClockAlreadyPaused\")\n : outcome.reason === HumanDecision_RefusalReason.CLOCK_NOT_PAUSED ? t(\"noticeClockNotPaused\")\n : outcome.reason === HumanDecision_RefusalReason.PAUSE_STATE_NOT_DECLARED ? t(\"noticePauseStateNotDeclared\")\n : t(\"noticeNotActionable\"),\n [HumanDecision_ActOutcomeKind.LAPSED]: t(\"noticeLapsed\"),\n [HumanDecision_ActOutcomeKind.REQUESTER_AUTHORITY_LAPSED]: t(\"noticeRequesterAuthorityLapsed\"),\n // An edit pointing the call at a record the answerer may not reach says so (#2734): the inbox gets no error payload,\n // only the outcome, so its reason is what tells a representative to put the arguments back.\n // Likewise a call that would not run as read (#3295): the values may be valid, so \"refused\" alone says nothing.\n [HumanDecision_ActOutcomeKind.MODIFICATION_REJECTED]: outcome.reason === HumanDecision_RefusalReason.EDITED_CALL_NOT_REACHABLE\n ? t(\"noticeEditedCallNotReachable\", named)\n : outcome.reason === HumanDecision_RefusalReason.CALL_NOT_RUN_AS_READ\n ? t(\"noticeCallNotRunAsRead\", named)\n : outcome.reason === HumanDecision_RefusalReason.CREDENTIAL_NOT_ACCEPTED\n ? t(\"noticeCredentialNotAccepted\", named)\n : outcome.reason === HumanDecision_RefusalReason.CALL_CANNOT_RUN\n ? callCannotRunNotice(outcome, t, toolLabel)\n : outcome.reason === HumanDecision_RefusalReason.ARGUMENTS_CANNOT_BE_CORRECTED\n ? t(\"noticeArgumentsCannotBeCorrected\", named)\n : t(\"noticeModificationRejected\"),\n [HumanDecision_ActOutcomeKind.REASON_CODE_REJECTED]: t(\"noticeReasonCodeRejected\"),\n [HumanDecision_ActOutcomeKind.CONSENT_REQUIRED]: t(\"noticeConsentRequired\"),\n [HumanDecision_ActOutcomeKind.TARGET_REFUSED]: outcome.reason === HumanDecision_RefusalReason.NO_TARGET ? t(\"noticeNoEscalationTarget\") : t(\"noticeTargetRefused\"),\n [HumanDecision_ActOutcomeKind.SUPERSEDED]: t(\"noticeSuperseded\"),\n };\n return byKind[outcome.kind];\n}\n\n/**\n * #3965: why a call cannot run as things stand, in the label the conversation's card shows for the same refusal: an agent\n * suspended, a policy tightened and an agent gone each have their own remedy, and `call_cannot_run` alone names none of\n * them. A refusal this bundle does not know (a newer server), or none (an older one), keeps the generic notice.\n */\nfunction callCannotRunNotice(\n outcome: HumanDecision_ActOutcome,\n t: (labelRef: string, params?: Record<string, string>) => string,\n toolLabel: string | undefined,\n): string {\n const labelRef = outcome.callRefusalReason !== undefined && Object.hasOwn(APPROVAL_MODIFICATION_REFUSAL_LABEL_REF, outcome.callRefusalReason)\n ? APPROVAL_MODIFICATION_REFUSAL_LABEL_REF[outcome.callRefusalReason as keyof typeof APPROVAL_MODIFICATION_REFUSAL_LABEL_REF]\n : undefined;\n if (labelRef === undefined) return t(\"noticeCallCannotRun\");\n return t(labelRef, { toolName: toolLabel ?? '', arguments: (outcome.argumentNames ?? []).join(', ') });\n}\n\n/**\n * The presentation a card was read on (#2903), echoed on its answer: the server rebuilds the decision's presentation and\n * refuses an answer naming none, or one that is no longer current, so what is sealed is what this reviewer read.\n */\nfunction presentationEchoOf(decisions: readonly HumanDecision_PendingCard[], decisionRef: string): Pick<HumanDecision_ActRequest, 'presentationId'> {\n const presentationId = decisions.find((card) => card.decisionRef === decisionRef)?.presentationId;\n return presentationId ? { presentationId } : {};\n}\n\n/**\n * The reason picker's options (#1921): each declared code with its word from `system_enums.AgentWorkReasonCode.<code>`.\n *\n * The codes are the APPLICATION's (`agentWorkReview.reasonCodes`); their words live under the framework's named\n * vocabulary, where the labelling pipeline plans one key per declared code. A code nobody has worded yet shows as the\n * code itself — `tSystemEnum` answers the raw value on a miss — which is a missing label that looks missing, never words\n * invented from the identifier. Exported for the pin that holds that fallback.\n */\nexport function describeReasonCodeOptions(\n reasonCodes: readonly string[] | undefined,\n tSystemEnum: (enumName: typeof AGENT_WORK_REASON_CODE_VOCABULARY, enumValue: string) => string,\n): AI_ApprovalReasonCodeOption[] | undefined {\n if (!reasonCodes || reasonCodes.length === 0) return undefined;\n return reasonCodes.map((code) => ({ value: code, label: tSystemEnum(AGENT_WORK_REASON_CODE_VOCABULARY, code) }));\n}\n\n/**\n * A gate's pause states as the words a reviewer reads (#1864): each state's word under the framework's named vocabulary\n * `system_enums.HumanDecisionPauseState.<state>`, which the labelling pipeline plans from every gate's declared\n * `pauseStates`. A state nobody has worded yet shows as itself — `tSystemEnum` answers the raw value on a miss — a\n * missing label that looks missing. Exported for the pin that holds it.\n */\nexport function describePauseState(\n pauseState: string,\n tSystemEnum: (enumName: ApplicationConfigVocabulary.HUMAN_DECISION_PAUSE_STATE, enumValue: string) => string,\n): string {\n return tSystemEnum(ApplicationConfigVocabulary.HUMAN_DECISION_PAUSE_STATE, pauseState);\n}\n\n/**\n * The label namespaces the approval wrappers read beyond their own component: the reason codes' (#1921) and pause\n * states' (#1864) words, and the roles' (#2526 review F3) — the holder line names a role, and `roles` is not an eager\n * section, so without it every ROLE card named the role by its key.\n */\nconst APPROVAL_LABEL_NAMESPACES = [LabellingTypes.SYSTEM_ENUMS, LabellingTypes.ROLES];\n/** The chat card holds a tool approval, never an operation approval, so it loads no resource's operation titles. */\nconst NO_OPERATION_RESOURCES: readonly string[] = [];\n\n//===============================================================\n// FlowsActors_ApprovalRequest\n//\n// A decision answered in the conversation it was raised in.\n//===============================================================\n\nexport type FlowsActors_ApprovalRequestProps = Omit<\n AI_ApprovalRequestProps,\n \"approvalId\" | \"actionDescription\" | \"riskLevel\" | \"onApprove\" | \"onDeny\" | \"onEscalate\" | \"answerable\"\n> & {\n executionId: string;\n};\n\nexport function FlowsActors_ApprovalRequest({\n executionId,\n ...props\n}: FlowsActors_ApprovalRequestProps): React.JSX.Element | null {\n const { executions, respondToApproval, answerQuestion } = useFlowsActors();\n const [processingId, setProcessingId] = React.useState<string | null>(null);\n const execution = executions.get(executionId);\n const pendingApproval = execution?.pendingApproval;\n // The paused tool's title is loaded with the card's own words, so the card names the call as the inbox does.\n const pendingToolName = pendingApproval?.toolName;\n const toolNames = React.useMemo(() => (pendingToolName ? [pendingToolName] : []), [pendingToolName]);\n const { t, roleLabel, toolLabel, operationLabel, tComponent, tSystemEnum } = useHumanDecisionWords(toolNames, NO_OPERATION_RESOURCES);\n\n // Every hook runs BEFORE the early return below. React requires the same hooks on every render, and the render\n // that clears `pendingApproval` — the moment a decision is answered — used to run three fewer (#534 fourth\n // review F1).\n const handleApprove = React.useCallback((id: string, comment?: string, modifiedToolArgs?: Record<string, unknown>, reasonCode?: string) => {\n setProcessingId(id);\n // The reason rides only when given, so an answer without one keeps the call shape it always had.\n respondToApproval(executionId, id, true, comment, modifiedToolArgs, ...(reasonCode ? [reasonCode] : []));\n }, [executionId, respondToApproval]);\n\n const handleDeny = React.useCallback((id: string, comment?: string, reasonCode?: string) => {\n setProcessingId(id);\n if (reasonCode) respondToApproval(executionId, id, false, comment, undefined, reasonCode);\n else respondToApproval(executionId, id, false, comment);\n }, [executionId, respondToApproval]);\n\n // #2720: the agent's QUESTION is answered with the person's values, or declined — never approved.\n const handleAnswer = React.useCallback((id: string, optionRef: string, values: readonly AI_DecisionAnswerValue[], comment?: string) => {\n setProcessingId(id);\n answerQuestion(executionId, optionRef, values, comment);\n }, [executionId, answerQuestion]);\n const approvalWord = React.useCallback(\n (labelRef: string) => tComponent(FrontendComponentType.LOW_LEVEL_AI_APPROVAL, labelRef as never),\n [tComponent],\n );\n\n // A decision answered and then handed BACK arrives as a new pending approval — a refused edit (#587), or a\n // decision the consent requirement refused (#534). Whatever this component recorded as in flight has been\n // answered, so the decision is answerable again instead of staying disabled until the view remounts.\n React.useEffect(() => {\n setProcessingId(null);\n }, [pendingApproval]);\n\n /*\n * Answered: the card is gone. The seal of the answer is drawn on the conversation's line for the call that waited\n * (#4062), named by the decision the server recorded on the call's trace, because this card lives only while the turn\n * waits: the turn resumes the moment the decision is answered, here or from a reviewer's inbox, and a seal kept in this\n * card's state was unmounted with it (#2913 kept it here, and no conversation ever showed one).\n */\n if (!execution || !pendingApproval) return null;\n\n const {\n approvalId, riskLevel, expiresAt, toolName, toolArgs, toolInputSchema, modificationRefusal,\n rejectedToolArgs, routeKind, reasonCodes, reasonCodeRefused, question, presentation,\n } = pendingApproval;\n /*\n * The card's title, in this reader's words (#3201): the decision's presentation when the server sealed one, else the\n * tool-approval title every decision surface derives (`describeHumanDecisionCard`), worded exactly as the inbox words\n * the same decision. The pause carries typed state only: the server's English `Waiting for approval to run \"<tool>\".`,\n * built from the tool's IDENTIFIER and rendered here as written, is gone from the announcement.\n */\n const actionDescription = wordHumanDecisionPhrase(\n presentation?.title ?? describeHumanDecisionCard({ plane: HumanDecision_Plane.CONVERSATIONAL, toolName: toolName ?? '' }).title,\n t, roleLabel, toolLabel, operationLabel,\n );\n /*\n * Only an OWNER-routed decision is answered here. One routed to an assignee or a role is answered by a\n * reviewer from their inbox, and the person whose conversation this is may not answer it (separation of\n * duties, #1594) — so it shows as waiting, with nothing to press that the server would refuse.\n *\n * There is no Escalate here either. It used to send a DENIAL prefixed `[ESCALATED]`, which refused the call\n * and escalated nothing; an OWNER route cannot be escalated at all, and a reviewer escalates from the inbox.\n */\n const answerable = routeKind === undefined || routeKind === HumanDecision_RouteKind.OWNER;\n\n if (question) {\n // #2720: the agent asks its person. Its questions, through their form, in place of the call and its arguments.\n return (\n <AI_ApprovalRequest\n approvalId={approvalId}\n actionDescription={question.title}\n executionId={executionId}\n systemRef={execution.systemRef}\n expiresAt={expiresAt}\n answerable={answerable}\n question={humanDecisionQuestionOf(question, approvalWord)}\n onAnswer={handleAnswer}\n isProcessing={processingId === approvalId}\n {...props}\n />\n );\n }\n\n return (\n <AI_ApprovalRequest\n approvalId={approvalId}\n actionDescription={actionDescription}\n riskLevel={riskLevel}\n executionId={executionId}\n systemRef={execution.systemRef}\n expiresAt={expiresAt}\n answerable={answerable}\n // A refused reason code leaves the approval standing (#1921): it is back on screen, and says why in its own labels.\n actionNotice={!answerable\n ? tComponent(FrontendComponentType.LOW_LEVEL_AI_APPROVAL, \"awaitingReview\")\n : reasonCodeRefused ? tComponent(FrontendComponentType.LOW_LEVEL_AI_APPROVAL, \"noticeReasonCodeRejected\") : undefined}\n reasonCodeOptions={answerable ? describeReasonCodeOptions(reasonCodes, tSystemEnum) : undefined}\n /*\n * The tool call is WHAT is being approved, and until #528 it did not reach the browser at all.\n * `toolArgs` are the proposed arguments — a person approving \"rename this record\" is approving\n * a specific new title, and an approval surface that hides them is asking for a signature on an\n * unread document.\n *\n * #566 built the carrier for an edited call: the payload takes `modifiedToolArgs`, the server\n * re-validates them against the tool's own `inputSchema`, re-signs the approval over them and\n * records that the decider changed them. So the editor is offered here, where the decision is\n * answered — never where it is only shown.\n */\n allowArgumentModification={answerable}\n toolName={toolName}\n // The call's line names the tool by its title, as the card's title does (#3201).\n toolLabel={toolName ? toolLabel(toolName) : undefined}\n executionContext={toolArgs}\n // #2903: the arguments as the server presented them, rendered verbatim: what the person reads is what is sealed.\n // #2914: then the values of the record the approval covers, which the seal binds too.\n presentedArguments={pendingApproval.presentation ? humanDecisionPresentedRowsOf(pendingApproval.presentation) : undefined}\n argumentsSchema={toolInputSchema}\n // The refusal in the approval's own labels, naming the tool and the offending arguments (#1186).\n argumentModificationError={modificationRefusal\n ? describeApprovalModificationRefusal(modificationRefusal, (labelRef, params) => tComponent(FrontendComponentType.LOW_LEVEL_AI_APPROVAL, labelRef, params))\n : undefined}\n rejectedArguments={rejectedToolArgs}\n onApprove={handleApprove}\n onDeny={handleDeny}\n // Released by the effect above whenever the approval is handed back. Not released while the socket is\n // disconnected: `respondToApproval` then sends nothing and leaves the approval exactly as it was, so its\n // identity never changes — a stuck state that predates #534 and is cured by the view remounting.\n isProcessing={processingId === approvalId}\n {...props}\n />\n );\n}\n\n//===============================================================\n// FlowsActors_ApprovalQueue\n//\n// The person's inbox: every decision they may act on, from the server.\n//===============================================================\n\n/**\n * Who holds a listed decision now, in the approval's own words (#2526). Total over the route vocabulary.\n *\n * The inbox lists only decisions the viewer may ANSWER (#1594 I3), so an ASSIGNEE card is always assigned to the\n * viewer: \"you claimed it\" when they took it from a role, \"assigned to you\" when a resolver, a reassignment or an\n * escalation put it there. A decision a colleague claimed is not in the viewer's list at all. A ROLE card names the role\n * in the roles tree's words, never its key. Exported for the pin that holds it.\n */\nexport function describeDecisionHolder(\n route: HumanDecision_PendingCard['route'],\n t: (labelRef: string, params?: Record<string, string>) => string,\n roleLabel: (roleKey: string) => string,\n formatDateTime: (value: Date | string) => string,\n): string | undefined {\n const byKind: Readonly<Record<HumanDecision_RouteKind, () => string | undefined>> = {\n [HumanDecision_RouteKind.OWNER]: () => t(\"holderOwner\"),\n [HumanDecision_RouteKind.ASSIGNEE]: () => (route.claimedAt ? t(\"holderClaimedByYou\", { when: formatDateTime(route.claimedAt) }) : t(\"holderAssignedToYou\")),\n // A ROLE route always names its role (a gate without one stops the application at startup); none means no line.\n [HumanDecision_RouteKind.ROLE]: () => (route.eligibleRole ? t(\"holderRole\", { role: roleLabel(route.eligibleRole) }) : undefined),\n };\n return byKind[route.kind]();\n}\n\n/**\n * Who raised a listed decision, when that is worth saying (#2526). Total over the requester vocabulary.\n *\n * A person's own request needs no line: the holder line already says whose conversation it is when it is the viewer's,\n * and naming another person by id would show an identifier (naming people is #1852). What a reviewer must not miss is\n * a request with NO person behind it — an autonomous agent, raised by a machine — or one raised through an application a\n * person connected, which resumes only while that delegation holds.\n */\nconst REQUESTER_LABEL: Readonly<Record<HumanDecision_RequesterKind, string | undefined>> = {\n [HumanDecision_RequesterKind.USER]: undefined,\n [HumanDecision_RequesterKind.MACHINE]: \"requesterAutonomousAgent\",\n [HumanDecision_RequesterKind.DELEGATED_CLIENT]: \"requesterConnectedApplication\",\n};\n\nexport function describeDecisionRequester(\n requesterKind: HumanDecision_RequesterKind,\n t: (labelRef: string) => string,\n): string | undefined {\n const labelRef = REQUESTER_LABEL[requesterKind];\n return labelRef ? t(labelRef) : undefined;\n}\n\n/**\n * A phrase of the shared wording (`describeHumanDecisionCard`), in this inbox's words: an approval label through `t`, a\n * role through the roles label tree, a tool through its title in the tool label tree (#2551), a resource operation\n * through its title in the resource label tree (#2288), a host's own words as written.\n */\nfunction wordHumanDecisionPhrase(\n phrase: HumanDecisionPhrase,\n t: (labelRef: string, params?: Record<string, string>) => string,\n roleLabel: (roleKey: string) => string,\n toolLabel: (toolName: string) => string,\n // With no wording function, the operation's label key: a missing label looks missing.\n operationLabel: (resourceType: string, operationIdentifier: string) => string = (resourceType, operationIdentifier) =>\n `${LabellingTypes.RESOURCES}.${resourceType}.operations.${operationIdentifier}.${ResourceOperationTextSlot.TITLE}`,\n): string {\n switch (phrase.kind) {\n case HumanDecisionPhraseKind.LABEL:\n return phrase.params\n ? t(phrase.labelRef, Object.fromEntries(Object.entries(phrase.params).map(([key, value]) => [key, typeof value === 'object' ? wordHumanDecisionPhrase(value, t, roleLabel, toolLabel, operationLabel) : String(value)])))\n : t(phrase.labelRef);\n case HumanDecisionPhraseKind.ROLE:\n return roleLabel(phrase.roleKey);\n case HumanDecisionPhraseKind.TOOL:\n return toolLabel(phrase.toolName);\n case HumanDecisionPhraseKind.RESOURCE_OPERATION:\n return operationLabel(phrase.resourceType, phrase.operationIdentifier);\n case HumanDecisionPhraseKind.TEXT:\n return phrase.text;\n default: {\n const unhandled: never = phrase;\n return unhandled;\n }\n }\n}\n\n/**\n * What one inbox card SAYS, from the wording every decision surface shares (`describeHumanDecisionCard`): the same\n * line a chat card posted for this decision carries. A tool approval also shows the tool and its proposed arguments;\n * a representative admission (#1612) and a card asking its own question show none — there is no tool call.\n */\nfunction describeInboxCard(\n card: HumanDecision_PendingCard,\n t: (labelRef: string, params?: Record<string, string>) => string,\n roleLabel: (roleKey: string) => string = (roleKey) => roleKey,\n toolLabel: (toolName: string) => string = (toolName) => toolName,\n operationLabel?: (resourceType: string, operationIdentifier: string) => string,\n): Pick<AI_ApprovalQueueItem, 'actionDescription' | 'toolName' | 'toolLabel' | 'executionContext' | 'presentedArguments'> {\n // #2903: the values as the server presented them, rendered verbatim, so what the reviewer reads is what is sealed.\n // #2914: with the values of the record the approval covers.\n const presented = card.presentation ? { presentedArguments: humanDecisionPresentedRowsOf(card.presentation) } : {};\n const actionDescription = wordHumanDecisionPhrase(card.presentation?.title ?? describeHumanDecisionCard(card).title, t, roleLabel, toolLabel, operationLabel);\n // #2288: an operation approval shows the values the requester sent, as a tool approval shows its arguments.\n if (card.plane === HumanDecision_Plane.OPERATION_APPROVAL && card.operationApproval) {\n return { actionDescription, executionContext: card.operationApproval.requestedValues, ...presented };\n }\n const isRepresentativeAdmission = card.plane === HumanDecision_Plane.REPRESENTATIVE_ADMISSION && !!card.representativeAdmission;\n if (isRepresentativeAdmission || humanDecisionAsksItsOwnQuestion(card)) return { actionDescription };\n return { actionDescription, toolName: card.toolName, toolLabel: toolLabel(card.toolName), executionContext: card.toolArgs, ...presented };\n}\n\n/**\n * A request as the card asks it: its reason, its options and its fields with their form. An option the engine wrote is\n * worded by the approval label it names (`labelRef`, #2754), through `word` in this reader's language; any other option\n * carries the words its host wrote. The decision is the shared wording's (`humanDecisionOptionPhrase`), so the chat card,\n * the inbox and a notice cannot word one option two ways.\n */\nexport function humanDecisionQuestionOf(request: HumanDecision_Request, word: (labelRef: string) => string): AI_DecisionQuestion {\n return {\n description: request.description,\n options: request.options.map((option) => ({\n ref: option.ref,\n // An option phrase is a label or text: no role and no tool to word, so both pass through.\n label: wordHumanDecisionPhrase(humanDecisionOptionPhrase(option), word, (roleKey) => roleKey, (toolName) => toolName),\n intent: option.intent,\n ...(option.description ? { description: option.description } : {}),\n })),\n fields: request.fields,\n ...(request.form ? { form: request.form } : {}),\n };\n}\n\n/**\n * A card's own question, when it asks one (#2526): the request it carries, on a plane whose options are not the inbox's\n * Approve and Deny — or, on a plane that has those, a request that asks FIELDS, which only an agent's question to its\n * person does (#2720). `undefined` for a request the inbox words itself.\n */\nexport function decisionQuestionOf(card: Pick<HumanDecision_PendingCard, 'plane' | 'request'>, word: (labelRef: string) => string): AI_DecisionQuestion | undefined {\n if (!card.request) return undefined;\n if (!humanDecisionAsksItsOwnQuestion(card)) return undefined;\n // An option is worded by the label it names, on any plane (#2754): an agent's question and a flow's person step name\n // theirs. A host that named its own options keeps its words, whatever refs it chose (#2720 review L6).\n return humanDecisionQuestionOf(card.request, word);\n}\n\nexport type FlowsActors_ApprovalQueueProps = Omit<\n AI_ApprovalQueueProps,\n | \"items\" | \"onApprove\" | \"onDeny\" | \"onEscalate\" | \"onAnswer\" | \"onClaim\" | \"onUnclaim\" | \"onReassignOpen\" | \"onReassign\" | \"onPauseClock\" | \"onResumeClock\"\n | \"processingIds\" | \"isLoading\" | \"loadFailed\" | \"onRetry\"\n>;\n\n/**\n * The words a pending decision is read in, for every surface that shows one: an approval label through `t`, a role\n * through the roles label tree, a tool through its title in the tool label tree (#2551), a resource operation through its\n * title. The inbox and the chat card (#3201) both word a decision through these, so the two cannot read one decision two\n * ways, and neither shows a sentence the server wrote.\n *\n * `toolNames` and `operationResources` name the label scopes to load, so the titles are there when the card renders.\n */\nfunction useHumanDecisionWords(toolNames: readonly string[], operationResources: readonly string[]) {\n const labelKeys = React.useMemo(\n () => [...APPROVAL_LABEL_NAMESPACES, ...toolNames.map(flowsActorsToolLabelScope), ...operationResources.map((type) => `${LabellingTypes.RESOURCES}.${type}`)],\n [toolNames, operationResources],\n );\n const { t: tKey, tComponent, tRole, tSystemEnum, tResourceOperation, formatDateTime } = useI18n({ component: FrontendComponentType.LOW_LEVEL_AI_APPROVAL, keys: labelKeys });\n const t = React.useCallback(\n (labelRef: string, params?: Record<string, string>) => tComponent(FrontendComponentType.LOW_LEVEL_AI_APPROVAL, labelRef as never, params),\n [tComponent],\n );\n // A role is worded by the roles label tree, never shown as its identifier.\n const roleLabel = React.useCallback((roleKey: string) => (tRole ? tRole(roleKey, 'label') : roleKey), [tRole]);\n // A tool by its title, as the conversation names the same call; a tool with no words yet by its name.\n const toolLabel = React.useCallback((toolName: string) => {\n const key = flowsActorsToolLabelKey(toolName, FlowsActorsToolLabelSlot.TITLE);\n const resolved = tKey(key);\n return resolved === key || resolved.length === 0 ? toolName : resolved;\n }, [tKey]);\n // An operation by its title, as the application names it everywhere; with no title generated, its key (missing looks missing).\n const operationLabel = React.useCallback(\n (resourceType: string, operationIdentifier: string) => tResourceOperation(resourceType, operationIdentifier, ResourceOperationTextSlot.TITLE),\n [tResourceOperation],\n );\n return { t, roleLabel, toolLabel, operationLabel, tComponent, tSystemEnum, formatDateTime };\n}\n\n/**\n * The inbox's cards with the one a link named first (#2923): a chat card that cannot answer a decision links to it here\n * (`humanDecisionInboxPathOf`), and the person lands on it. The others keep their order.\n */\nexport function withFocusedDecisionFirst<T extends { readonly decisionRef: string }>(cards: readonly T[], search: string): readonly T[] {\n const focused = new URLSearchParams(search).get(HUMAN_DECISION_INBOX_FOCUS_PARAM);\n if (!focused) return cards;\n const named = cards.filter((card) => card.decisionRef === focused);\n return named.length === 0 ? cards : [...named, ...cards.filter((card) => card.decisionRef !== focused)];\n}\n\nexport function FlowsActors_ApprovalQueue(props: FlowsActors_ApprovalQueueProps): React.JSX.Element {\n const { decisions: listed, readState, refresh, act, candidates } = usePendingDecisions();\n // #2923: a link to one decision lists it first.\n const decisions = React.useMemo(() => withFocusedDecisionFirst(listed, window.location.search), [listed]);\n // The words of every tool a listed decision would run (#2551), loaded with the inbox's own.\n const toolNames = React.useMemo(() => [...new Set(decisions.map((card) => card.toolName).filter((name): name is string => !!name))].sort(), [decisions]);\n // #2288: the resources whose held operations are listed, so each operation is named by its title.\n const operationResources = React.useMemo(\n () => [...new Set(decisions.map((card) => card.operationApproval?.resourceType).filter((type): type is string => !!type))].sort(),\n [decisions],\n );\n const { t, roleLabel, toolLabel, operationLabel, tSystemEnum, formatDateTime } = useHumanDecisionWords(toolNames, operationResources);\n // Keyed by decisionRef: a decision is in flight from the act until its outcome returns.\n const [processing, setProcessing] = React.useState<ReadonlySet<string>>(() => new Set());\n const [notices, setNotices] = React.useState<ReadonlyMap<string, string>>(() => new Map());\n const [reassignCandidates, setReassignCandidates] = React.useState<ReadonlyMap<string, readonly AI_ApprovalReassignCandidate[]>>(() => new Map());\n /**\n * #2913: the decisions this person answered here. An answered card leaves the pending list, so its seal is shown under\n * the list instead: signed seconds after the answer, then current or not over the record it is about. Each keeps the\n * title its card showed, read from `cardTitles` when the answer was sent.\n */\n const [decided, setDecided] = React.useState<ReadonlyArray<{ readonly decisionRef: string; readonly title?: string }>>([]);\n const cardTitles = React.useRef<ReadonlyMap<string, string>>(new Map());\n // #3965: each card's tool, in its words, for a notice that names it.\n const cardToolLabels = React.useRef<ReadonlyMap<string, string>>(new Map());\n\n const run = React.useCallback(async (decisionRef: string, decisionAct: HumanDecision_Act, request: HumanDecision_ActRequest) => {\n setProcessing((previous) => new Set(previous).add(decisionRef));\n const title = cardTitles.current.get(decisionRef);\n try {\n const outcome = await act(decisionRef, decisionAct, request);\n if (decisionAct === HumanDecision_Act.ANSWER && outcome.kind === HumanDecision_ActOutcomeKind.APPLIED) {\n setDecided((previous) => [{ decisionRef, ...(title ? { title } : {}) }, ...previous.filter((entry) => entry.decisionRef !== decisionRef)].slice(0, DECIDED_SEALS_SHOWN));\n }\n const notice = noticeOfOutcome(outcome, t, cardToolLabels.current.get(decisionRef));\n setNotices((previous) => {\n const next = new Map(previous);\n if (notice === undefined) next.delete(decisionRef); else next.set(decisionRef, notice);\n return next;\n });\n } catch {\n // Not an outcome the server reported (a network failure): say it did not take, and leave it answerable.\n setNotices((previous) => new Map(previous).set(decisionRef, t(\"noticeNotActionable\")));\n } finally {\n setProcessing((previous) => {\n const next = new Set(previous);\n next.delete(decisionRef);\n return next;\n });\n }\n }, [act, t]);\n\n const items: AI_ApprovalQueueItem[] = React.useMemo(() => decisions.map((card) => ({\n approvalId: card.decisionRef,\n executionId: card.executionId,\n systemRef: card.systemRef,\n // #2526: the assistant by its own name, never its identifier; the risk the call's GATE declares, absent when none.\n systemName: card.systemDisplayName,\n riskLevel: card.riskLevel,\n // #2526: a decision asking its own question is answered by its own options.\n question: decisionQuestionOf(card, t),\n holderNotice: describeDecisionHolder(card.route, t, roleLabel, formatDateTime),\n requesterNotice: describeDecisionRequester(card.requesterKind, t),\n ...describeInboxCard(card, t, roleLabel, toolLabel, operationLabel),\n expiresAt: card.expiresAt ? new Date(card.expiresAt) : undefined,\n createdAt: new Date(card.requestedAt),\n // Only the acts the server says this person may perform — computed with the rule every act is checked by.\n // The inbox's Escalate names nobody, so it is offered only where the gate declares where escalations go;\n // handing it to a person of the reviewer's choosing is Reassign.\n canEscalate: card.permittedActs.includes(HumanDecision_Act.ESCALATE) && card.declaresEscalationTarget,\n canClaim: card.permittedActs.includes(HumanDecision_Act.CLAIM),\n canUnclaim: card.permittedActs.includes(HumanDecision_Act.UNCLAIM),\n canReassign: card.permittedActs.includes(HumanDecision_Act.REASSIGN),\n reassignCandidates: reassignCandidates.get(card.decisionRef),\n actionNotice: notices.get(card.decisionRef),\n // #1628 — the next deadline, or why its deadlines are paused; Pause only with a declared reason to name.\n canPauseClock: card.permittedActs.includes(HumanDecision_Act.PAUSE_CLOCK) && !card.clockPause && card.pauseStates.length > 0,\n canResumeClock: card.permittedActs.includes(HumanDecision_Act.RESUME_CLOCK) && !!card.clockPause,\n // A pause state is the APPLICATION's identifier, shown as its word (#1864) — see `describePauseState`.\n pauseStateOptions: card.pauseStates.map((pauseState) => ({ value: pauseState, label: describePauseState(pauseState, tSystemEnum) })),\n deadlineNotice: card.nextDeadline\n ? t(card.nextDeadline.kind === ReviewDeadlineKind.CLAIM ? \"deadlineClaimBy\" : \"deadlineDecisionBy\", { when: formatDateTime(card.nextDeadline.dueAt) })\n : undefined,\n clockPausedNotice: card.clockPause ? t(\"clockPausedIn\", { pauseState: describePauseState(card.clockPause.pauseStateRef, tSystemEnum) }) : undefined,\n // #1921 — the reviewer may give a reason from the application's vocabulary when correcting the agent, and may\n // CORRECT it by editing the call: the act request carries `modifiedToolArgs`, which the server re-validates against\n // the tool's own schema. Only on a tool approval — a representative admission has no call to edit and no agent to correct.\n reasonCodeOptions: describeReasonCodeOptions(card.reasonCodes, tSystemEnum),\n allowArgumentModification: card.plane === HumanDecision_Plane.CONVERSATIONAL,\n argumentsSchema: card.toolInputSchema as SerializableZodSchema | undefined,\n })), [decisions, reassignCandidates, notices, t, roleLabel, toolLabel, operationLabel, tSystemEnum, formatDateTime]);\n cardTitles.current = new Map(items.flatMap((item) => (typeof item.actionDescription === 'string' ? [[item.approvalId, item.actionDescription] as const] : [])));\n cardToolLabels.current = new Map(items.flatMap((item) => (item.toolLabel ? [[item.approvalId, item.toolLabel] as const] : [])));\n\n /**\n * An answer in the one answer shape: the option chosen, and no values. Which option refs \"approve\" and \"deny\" mean\n * depends on the decision's plane — a tool approval's, or a representative admission's (#1612) — so the card decides.\n */\n const answer = React.useCallback((decisionRef: string, approve: boolean, comment?: string, modifiedToolArgs?: Record<string, unknown>, reasonCode?: string) => {\n const plane = decisions.find((card) => card.decisionRef === decisionRef)?.plane;\n const options = plane ? HUMAN_DECISION_VERDICT_OPTIONS_BY_PLANE[plane] : undefined;\n if (!options) {\n // A plane whose options this inbox does not offer: say it cannot be answered here, and send nothing.\n setNotices((previous) => new Map(previous).set(decisionRef, t(\"noticeNotActionable\")));\n return;\n }\n const optionRef = approve ? options.approve : options.deny;\n void run(decisionRef, HumanDecision_Act.ANSWER, {\n answer: { decisionId: decisionRef, optionRef, values: [] },\n // #2903: the presentation the reviewer read; the server refuses an answer naming none, or one no longer current.\n ...presentationEchoOf(decisions, decisionRef),\n ...(comment ? { reason: comment } : {}),\n // Only when the reviewer edited the call: an absent field means \"run it as proposed\" (#566).\n ...(modifiedToolArgs ? { modifiedToolArgs } : {}),\n // Why the reviewer corrected the agent (#1921); refused with REASON_CODE_REJECTED unless the application declares it.\n ...(reasonCode ? { reasonCode } : {}),\n });\n }, [run, decisions, t]);\n\n const handleReassignOpen = React.useCallback((decisionRef: string) => {\n setReassignCandidates((previous) => {\n const next = new Map(previous);\n next.delete(decisionRef);\n return next;\n });\n void candidates(decisionRef)\n .then((people) => setReassignCandidates((previous) => new Map(previous).set(\n decisionRef,\n // The membership's email is how a same-organization reviewer tells people apart; it is data, not a label.\n people.map((person) => ({ value: person.userId, label: person.email ?? person.userId })),\n )))\n .catch(() => setReassignCandidates((previous) => new Map(previous).set(decisionRef, [])));\n }, [candidates]);\n\n return (\n <>\n <AI_ApprovalQueue\n items={items}\n onApprove={(decisionRef, comment, modifiedToolArgs, reasonCode) => answer(decisionRef, true, comment, modifiedToolArgs, reasonCode)}\n onDeny={(decisionRef, comment, reasonCode) => answer(decisionRef, false, comment, undefined, reasonCode)}\n onEscalate={(decisionRef, comment) => void run(decisionRef, HumanDecision_Act.ESCALATE, comment ? { reason: comment } : {})}\n // #2526: the option the reviewer chose and the values it carries, in the one answer shape the server checks against\n // the decision's own request (an option it never offered, or values an option does not take, is refused).\n onAnswer={(decisionRef, optionRef, values, comment, reasonCode) => void run(decisionRef, HumanDecision_Act.ANSWER, {\n answer: { decisionId: decisionRef, optionRef, values: [...values] },\n ...presentationEchoOf(decisions, decisionRef),\n ...(comment ? { reason: comment } : {}),\n // #2539: an actor question that reviews an agent's work may carry a declared reason, as a tool approval does.\n ...(reasonCode ? { reasonCode } : {}),\n })}\n onClaim={(decisionRef) => void run(decisionRef, HumanDecision_Act.CLAIM, {})}\n onUnclaim={(decisionRef) => void run(decisionRef, HumanDecision_Act.UNCLAIM, {})}\n onReassignOpen={handleReassignOpen}\n onReassign={(decisionRef, targetUserId, comment) => void run(decisionRef, HumanDecision_Act.REASSIGN, { targetUserId, ...(comment ? { reason: comment } : {}) })}\n onPauseClock={(decisionRef, pauseStateRef) => void run(decisionRef, HumanDecision_Act.PAUSE_CLOCK, { pauseStateRef })}\n onResumeClock={(decisionRef) => void run(decisionRef, HumanDecision_Act.RESUME_CLOCK, {})}\n processingIds={processing as Set<string>}\n // #2526: a read still settling, and a read that failed, are states the inbox SHOWS — never an empty inbox.\n isLoading={readState === PendingDecisionsReadState.LOADING}\n loadFailed={readState === PendingDecisionsReadState.FAILED}\n onRetry={() => { void refresh(); }}\n {...props}\n />\n {decided.map((entry) => (\n <DecisionApprovalSeal key={entry.decisionRef} decisionRef={entry.decisionRef} {...(entry.title ? { description: entry.title } : {})} />\n ))}\n </>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResourceAutomatedForm.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/automated/ResourceAutomatedForm.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,KAAyF,MAAM,OAAO,CAAC;AAE9G,OAAO,EAAE,aAAa,EAA+B,MAAM,iBAAiB,CAAC;AAkD7E,OAAO,EAAqG,eAAe,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC9K,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wDAAwD,CAAC;AAgC7F,OAAO,EAAE,gCAAgC,EAAE,MAAM,+DAA+D,CAAC;AAsDjH,OAAO,EAIL,KAAK,8BAA8B,EACpC,MAAM,+EAA+E,CAAC;AA4GvF,MAAM,WAAW,0BAA0B;IACzC,sEAAsE;IACtE,eAAe,EAAE,gCAAgC,CAAC;IAElD,6CAA6C;IAC7C,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;IAEhC,0CAA0C;IAC1C,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAEjC;;;;;;;;OAQG;IACH,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IAEtB,mCAAmC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,yDAAyD;IACzD,cAAc,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAE9C,wCAAwC;IACxC,gBAAgB,CAAC,EAAE,OAA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AAC,EACpC,eAAe,EACf,SAAS,EACT,OAAO,EACP,QAAQ,EACR,QAAgB,EAChB,SAAS,EACT,cAAc,EACd,gBAAuB,EACvB,cAAc,EACd,cAAc,EACd,WAAW,EACX,aAAa,EAAE,iBAAiB,EAChC,qBAAqB,EACrB,cAAc,EACd,8BAA8B,EAAE,oCAAoC,GACrE,EAAE,0BAA0B,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"ResourceAutomatedForm.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/automated/ResourceAutomatedForm.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,KAAyF,MAAM,OAAO,CAAC;AAE9G,OAAO,EAAE,aAAa,EAA+B,MAAM,iBAAiB,CAAC;AAkD7E,OAAO,EAAqG,eAAe,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC9K,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wDAAwD,CAAC;AAgC7F,OAAO,EAAE,gCAAgC,EAAE,MAAM,+DAA+D,CAAC;AAsDjH,OAAO,EAIL,KAAK,8BAA8B,EACpC,MAAM,+EAA+E,CAAC;AA4GvF,MAAM,WAAW,0BAA0B;IACzC,sEAAsE;IACtE,eAAe,EAAE,gCAAgC,CAAC;IAElD,6CAA6C;IAC7C,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;IAEhC,0CAA0C;IAC1C,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAEjC;;;;;;;;OAQG;IACH,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IAEtB,mCAAmC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,yDAAyD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,CAAC;IAChC;;;;;;;;;;;;OAYG;IACH,8BAA8B,CAAC,EAAE,8BAA8B,CAAC;CACjE;AA4MD,wBAAgB,qBAAqB,CAAC,EACpC,eAAe,EACf,SAAS,EACT,OAAO,EACP,QAAQ,EACR,QAAgB,EAChB,SAAS,EACT,cAAc,EACd,gBAAuB,EACvB,cAAc,EACd,cAAc,EACd,WAAW,EACX,aAAa,EAAE,iBAAiB,EAChC,qBAAqB,EACrB,cAAc,EACd,8BAA8B,EAAE,oCAAoC,GACrE,EAAE,0BAA0B,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CA07FvD"}
|
|
@@ -16,7 +16,7 @@ import React, { useContext, useEffect, useLayoutEffect, useMemo, useState, useCa
|
|
|
16
16
|
import { NotificationContext } from '../../../core/events/NotificationContext.js';
|
|
17
17
|
import { useFormContext } from 'react-hook-form';
|
|
18
18
|
import { z } from 'zod';
|
|
19
|
-
import { CoreResourceOperation, CoreUserNotificationChannel, CoreUserNotificationTarget, RelationshipNature, ResourceRelationshipBulkAction, ResourcesConfig_OperationPathUtils,
|
|
19
|
+
import { CoreResourceOperation, CoreUserNotificationChannel, CoreUserNotificationTarget, RelationshipNature, ResourceRelationshipBulkAction, ResourcesConfig_OperationPathUtils, ErrorCustomMessageReference, ErrorType, UserNotificationLevel, ResourcesConfigOperationsUrlsBuilderUtils, isFileRouteBearingOperation, Resources_SharedUtils, ResourceOperationRiskLevel, isIrreversibleOperation, MAIN_API_BASE_PATH, BULK_OPERATION_HOST_SUPPLIED_FIELDS, resourceInheritanceVariantSchemas, readOperationApprovalPending, READ_THROUGH_ORGANIZATION_UNIT_FIELD_NAME, CoreResourceType, PRIMARY_SCOPE_TO_FIELD_IDENTIFIER, ResourcePrimaryScope, } from '@wildo-ai/saas-models';
|
|
20
20
|
import { OperationsConfirmCritical } from '../../../components/feedback/operations-confirm-critical.js';
|
|
21
21
|
import { isReadThroughOrganizationUnitFieldInert, readThroughCreateOrganizationUnitCandidates } from '../../../core/resources/read-through-organization-unit.frontend.utils.js';
|
|
22
22
|
import { useReferenceRecordLabels } from '../../../components/form/automated/useReferenceRecordLabels.js';
|
|
@@ -1112,6 +1112,45 @@ export function ResourceAutomatedForm({ resourceContext, onSuccess, onError, onC
|
|
|
1112
1112
|
// =============================================================================
|
|
1113
1113
|
// SHARED BASE PATH (used by fileUploadContext & validateFieldUrl)
|
|
1114
1114
|
// =============================================================================
|
|
1115
|
+
/**
|
|
1116
|
+
* The operation this form's resource-integrated file routes hang off (#3960).
|
|
1117
|
+
*
|
|
1118
|
+
* The backend mounts the upload routes off ONE operation per lane: the default, non-bulk, literal `create` /
|
|
1119
|
+
* `update` API call (`isFileRouteBearingOperation`, from `@wildo-ai/saas-models`). A form rendered for a
|
|
1120
|
+
* custom verb (`update_branding`, `resourceOperationLike: UPDATE`) or a non-default variant edits the same record,
|
|
1121
|
+
* but its own route segment has no file route under it, so building the upload address from the RENDERED operation
|
|
1122
|
+
* answered 404. So: the rendered operation when it IS the mounted one; otherwise the mounted operation of the same
|
|
1123
|
+
* lane, addressable from this context. Never a custom verb — and when none is mounted, no upload endpoint at all,
|
|
1124
|
+
* which the field shows as unavailable rather than as a failed upload.
|
|
1125
|
+
*/
|
|
1126
|
+
const fileRouteOperation = useMemo(() => {
|
|
1127
|
+
if (!resourceConfig)
|
|
1128
|
+
return undefined;
|
|
1129
|
+
const isUpdateOperation = isSingleResourceUpdateLikeOperation(operation);
|
|
1130
|
+
const coreOperation = isUpdateOperation ? CoreResourceOperation.UPDATE : CoreResourceOperation.CREATE;
|
|
1131
|
+
if (isFileRouteBearingOperation(operation, coreOperation)) {
|
|
1132
|
+
return operation;
|
|
1133
|
+
}
|
|
1134
|
+
const mountedOperations = (resourceConfig.operations ?? []).filter((candidate) => isFileRouteBearingOperation(candidate, coreOperation));
|
|
1135
|
+
return isUpdateOperation
|
|
1136
|
+
? pickPreferredOperationForCoreSemanticAddressability({
|
|
1137
|
+
resourceConfig,
|
|
1138
|
+
operations: mountedOperations,
|
|
1139
|
+
coreOperation: CoreResourceOperation.UPDATE,
|
|
1140
|
+
registry,
|
|
1141
|
+
hasResourceId: Boolean(resourceId),
|
|
1142
|
+
contextResourceIdentifiers: contextResourceIdentifiersWithResourceId,
|
|
1143
|
+
contextualParameters: contextualParametersWithResourceId,
|
|
1144
|
+
})
|
|
1145
|
+
: pickPreferredOperationForCoreSemantic(mountedOperations, CoreResourceOperation.CREATE);
|
|
1146
|
+
}, [
|
|
1147
|
+
contextResourceIdentifiersWithResourceId,
|
|
1148
|
+
contextualParametersWithResourceId,
|
|
1149
|
+
operation,
|
|
1150
|
+
registry,
|
|
1151
|
+
resourceConfig,
|
|
1152
|
+
resourceId,
|
|
1153
|
+
]);
|
|
1115
1154
|
/**
|
|
1116
1155
|
* Compute the routed API base identity for this resource.
|
|
1117
1156
|
* Uses CREATE operation URL resolution so file uploads and validate-field routes
|
|
@@ -1137,21 +1176,7 @@ export function ResourceAutomatedForm({ resourceContext, onSuccess, onError, onC
|
|
|
1137
1176
|
if (updatedRecordId) {
|
|
1138
1177
|
contextualParameters[resourceFieldIdentifier] = updatedRecordId;
|
|
1139
1178
|
}
|
|
1140
|
-
const routeBearingMutationOperation =
|
|
1141
|
-
? operation
|
|
1142
|
-
: resourceConfig && isUpdateOperation
|
|
1143
|
-
? pickPreferredOperationForCoreSemanticAddressability({
|
|
1144
|
-
resourceConfig,
|
|
1145
|
-
operations: resourceConfig.operations ?? [],
|
|
1146
|
-
coreOperation: CoreResourceOperation.UPDATE,
|
|
1147
|
-
registry,
|
|
1148
|
-
hasResourceId: Boolean(resourceId),
|
|
1149
|
-
contextResourceIdentifiers: contextResourceIdentifiersWithResourceId,
|
|
1150
|
-
contextualParameters: contextualParametersWithResourceId,
|
|
1151
|
-
})
|
|
1152
|
-
: resourceConfig
|
|
1153
|
-
? pickPreferredOperationForCoreSemantic(resourceConfig.operations ?? [], CoreResourceOperation.CREATE)
|
|
1154
|
-
: undefined;
|
|
1179
|
+
const routeBearingMutationOperation = fileRouteOperation;
|
|
1155
1180
|
let basePath;
|
|
1156
1181
|
if (routeBearingMutationOperation) {
|
|
1157
1182
|
const routePaths = ResourcesConfigOperationsUrlsBuilderUtils.buildOperationFrontendRoutePaths(resourceConfig, routeBearingMutationOperation, registry.allResourceFieldIdentifiers);
|
|
@@ -1191,6 +1216,7 @@ export function ResourceAutomatedForm({ resourceContext, onSuccess, onError, onC
|
|
|
1191
1216
|
contextResourceIdentifiersWithResourceId,
|
|
1192
1217
|
contextualParametersWithResourceId,
|
|
1193
1218
|
effectiveCoreOperation,
|
|
1219
|
+
fileRouteOperation,
|
|
1194
1220
|
operation,
|
|
1195
1221
|
registry,
|
|
1196
1222
|
resourceConfig,
|
|
@@ -1208,19 +1234,7 @@ export function ResourceAutomatedForm({ resourceContext, onSuccess, onError, onC
|
|
|
1208
1234
|
const isUpdateOperation = isSingleResourceUpdateLikeOperation(operation);
|
|
1209
1235
|
const { apiBaseUrl, contextualParameters } = resourceApiBase;
|
|
1210
1236
|
try {
|
|
1211
|
-
const uploadOperation =
|
|
1212
|
-
? operation
|
|
1213
|
-
: isUpdateOperation
|
|
1214
|
-
? pickPreferredOperationForCoreSemanticAddressability({
|
|
1215
|
-
resourceConfig,
|
|
1216
|
-
operations: resourceConfig.operations ?? [],
|
|
1217
|
-
coreOperation: CoreResourceOperation.UPDATE,
|
|
1218
|
-
registry,
|
|
1219
|
-
hasResourceId: Boolean(resourceId),
|
|
1220
|
-
contextResourceIdentifiers: contextResourceIdentifiersWithResourceId,
|
|
1221
|
-
contextualParameters: contextualParametersWithResourceId,
|
|
1222
|
-
})
|
|
1223
|
-
: pickPreferredOperationForCoreSemantic(resourceConfig.operations ?? [], CoreResourceOperation.CREATE);
|
|
1237
|
+
const uploadOperation = fileRouteOperation;
|
|
1224
1238
|
if (!uploadOperation) {
|
|
1225
1239
|
return context;
|
|
1226
1240
|
}
|
|
@@ -1273,6 +1287,7 @@ export function ResourceAutomatedForm({ resourceContext, onSuccess, onError, onC
|
|
|
1273
1287
|
return context;
|
|
1274
1288
|
}, [
|
|
1275
1289
|
contextResourceIdentifiersWithResourceId,
|
|
1290
|
+
fileRouteOperation,
|
|
1276
1291
|
formSchema,
|
|
1277
1292
|
operation,
|
|
1278
1293
|
parentResourcesRequirementsKey,
|