@wildo-ai/saas-frontend-lib 1.1.15 → 1.1.16
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/flows-actors/approval.labels.d.ts.map +1 -1
- package/dist/esm/components/flows-actors/approval.labels.js +3 -0
- package/dist/esm/components/flows-actors/approval.labels.js.map +1 -1
- package/dist/esm/components/flows-actors/task-detail.d.ts +12 -1
- package/dist/esm/components/flows-actors/task-detail.d.ts.map +1 -1
- package/dist/esm/components/flows-actors/task-detail.js +2 -2
- package/dist/esm/components/flows-actors/task-detail.js.map +1 -1
- package/dist/esm/components/settings/AppPage_AgentActivitySettings.d.ts +79 -0
- package/dist/esm/components/settings/AppPage_AgentActivitySettings.d.ts.map +1 -0
- package/dist/esm/components/settings/AppPage_AgentActivitySettings.js +271 -0
- package/dist/esm/components/settings/AppPage_AgentActivitySettings.js.map +1 -0
- package/dist/esm/components/settings/AppPage_AgentActivitySettings.labels.d.ts +3 -0
- package/dist/esm/components/settings/AppPage_AgentActivitySettings.labels.d.ts.map +1 -0
- package/dist/esm/components/settings/AppPage_AgentActivitySettings.labels.js +66 -0
- package/dist/esm/components/settings/AppPage_AgentActivitySettings.labels.js.map +1 -0
- package/dist/esm/components/settings/SettingsHub.d.ts.map +1 -1
- package/dist/esm/components/settings/SettingsHub.js +6 -0
- package/dist/esm/components/settings/SettingsHub.js.map +1 -1
- package/dist/esm/components/views/composite-view/CompositeView.d.ts +6 -0
- package/dist/esm/components/views/composite-view/CompositeView.d.ts.map +1 -1
- package/dist/esm/components/views/composite-view/CompositeView.js +12 -2
- package/dist/esm/components/views/composite-view/CompositeView.js.map +1 -1
- package/dist/esm/components/views/flows-actors-view/ConversationLinkPage.d.ts +57 -0
- package/dist/esm/components/views/flows-actors-view/ConversationLinkPage.d.ts.map +1 -0
- package/dist/esm/components/views/flows-actors-view/ConversationLinkPage.js +136 -0
- package/dist/esm/components/views/flows-actors-view/ConversationLinkPage.js.map +1 -0
- package/dist/esm/components/views/flows-actors-view/FlowsActorsView.d.ts +20 -0
- package/dist/esm/components/views/flows-actors-view/FlowsActorsView.d.ts.map +1 -1
- package/dist/esm/components/views/flows-actors-view/FlowsActorsView.js +139 -22
- package/dist/esm/components/views/flows-actors-view/FlowsActorsView.js.map +1 -1
- package/dist/esm/components/views/flows-actors-view/FlowsActorsView.labels.d.ts.map +1 -1
- package/dist/esm/components/views/flows-actors-view/FlowsActorsView.labels.js +5 -0
- package/dist/esm/components/views/flows-actors-view/FlowsActorsView.labels.js.map +1 -1
- package/dist/esm/components/views/flows-actors-view/held-conversation-selection.d.ts +4 -0
- package/dist/esm/components/views/flows-actors-view/held-conversation-selection.d.ts.map +1 -1
- package/dist/esm/components/views/flows-actors-view/held-conversation-selection.js +19 -0
- package/dist/esm/components/views/flows-actors-view/held-conversation-selection.js.map +1 -1
- package/dist/esm/components/views/flows-actors-view/linked-conversation.context.d.ts +26 -0
- package/dist/esm/components/views/flows-actors-view/linked-conversation.context.d.ts.map +1 -0
- package/dist/esm/components/views/flows-actors-view/linked-conversation.context.js +3 -0
- package/dist/esm/components/views/flows-actors-view/linked-conversation.context.js.map +1 -0
- package/dist/esm/core/components-registry/assert-registry-completeness.frontend.helper.d.ts.map +1 -1
- package/dist/esm/core/components-registry/assert-registry-completeness.frontend.helper.js +1 -0
- package/dist/esm/core/components-registry/assert-registry-completeness.frontend.helper.js.map +1 -1
- package/dist/esm/core/config/composite-view.schemas.d.ts +19 -0
- package/dist/esm/core/config/composite-view.schemas.d.ts.map +1 -1
- package/dist/esm/core/config/composite-view.schemas.js.map +1 -1
- package/dist/esm/core/config/engine-settings-destinations.d.ts.map +1 -1
- package/dist/esm/core/config/engine-settings-destinations.js +23 -0
- package/dist/esm/core/config/engine-settings-destinations.js.map +1 -1
- package/dist/esm/core/config/settings-hub-presentation.frontend.utils.d.ts.map +1 -1
- package/dist/esm/core/config/settings-hub-presentation.frontend.utils.js +3 -0
- package/dist/esm/core/config/settings-hub-presentation.frontend.utils.js.map +1 -1
- package/dist/esm/core/config/settings-hub.frontend.schemas.d.ts +12 -0
- package/dist/esm/core/config/settings-hub.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/config/settings-hub.frontend.schemas.js +12 -0
- package/dist/esm/core/config/settings-hub.frontend.schemas.js.map +1 -1
- package/dist/esm/core/events/events.frontend.schemas.d.ts +16 -0
- package/dist/esm/core/events/events.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/flows-actors/FlowsActorsContext.d.ts +10 -1
- package/dist/esm/core/flows-actors/FlowsActorsContext.d.ts.map +1 -1
- package/dist/esm/core/flows-actors/FlowsActorsContext.js +12 -3
- package/dist/esm/core/flows-actors/FlowsActorsContext.js.map +1 -1
- package/dist/esm/core/flows-actors/conversation-history.model.d.ts +19 -1
- package/dist/esm/core/flows-actors/conversation-history.model.d.ts.map +1 -1
- package/dist/esm/core/flows-actors/conversation-history.model.js +45 -4
- package/dist/esm/core/flows-actors/conversation-history.model.js.map +1 -1
- package/dist/esm/core/navigation/NavigationContentAreas.d.ts +0 -5
- package/dist/esm/core/navigation/NavigationContentAreas.d.ts.map +1 -1
- package/dist/esm/core/navigation/NavigationContentAreas.js +27 -1
- package/dist/esm/core/navigation/NavigationContentAreas.js.map +1 -1
- package/dist/esm/core/navigation/navigation.schemas.d.ts +20 -0
- package/dist/esm/core/navigation/navigation.schemas.d.ts.map +1 -1
- package/dist/esm/core/navigation/navigation.schemas.js +4 -0
- package/dist/esm/core/navigation/navigation.schemas.js.map +1 -1
- package/dist/esm/core/navigation/useNavigationRouterSync.d.ts.map +1 -1
- package/dist/esm/core/navigation/useNavigationRouterSync.js +5 -1
- package/dist/esm/core/navigation/useNavigationRouterSync.js.map +1 -1
- package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.d.ts +20 -1
- 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 +25 -0
- package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.js.map +1 -1
- package/dist/esm/core/resources/resources-repository.frontend.service.d.ts.map +1 -1
- package/dist/esm/core/resources/resources-repository.frontend.service.js +2 -0
- package/dist/esm/core/resources/resources-repository.frontend.service.js.map +1 -1
- package/dist/esm/core/runtime/AppRouter.d.ts.map +1 -1
- package/dist/esm/core/runtime/AppRouter.js +2 -1
- package/dist/esm/core/runtime/AppRouter.js.map +1 -1
- package/dist/esm/core/runtime/routes.frontend.definitions.d.ts +6 -0
- package/dist/esm/core/runtime/routes.frontend.definitions.d.ts.map +1 -1
- package/dist/esm/core/runtime/routes.frontend.definitions.js +7 -1
- package/dist/esm/core/runtime/routes.frontend.definitions.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +6 -6
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* AppPage_AgentActivitySettings — the Settings Hub "Agent activity" panel (#3990).
|
|
4
|
+
*
|
|
5
|
+
* What the application's declared FLOWS and ACTOR SYSTEMS did: the runs on the actor plane, newest first, and one run
|
|
6
|
+
* at a time, whole — how it moved, what each of its tasks was asked and produced, and for a flow the steps it went
|
|
7
|
+
* through, each with when it happened. Drawn through the engine's own flows-actors components (`AI_TaskTimeline`,
|
|
8
|
+
* `AI_TaskDetail`, `AI_FlowExecutionSummary`, `AI_FlowExecutionTimeline`), which until now only the application-creation
|
|
9
|
+
* workbench mounted, so an application's administrators had no way to read what its agents and flows did.
|
|
10
|
+
*
|
|
11
|
+
* Two scopes, passed explicitly at each mount (see `SettingsHub`):
|
|
12
|
+
* - ORGANIZATION — the organization the caller is working in, for its administrator;
|
|
13
|
+
* - APPLICATION — every organization, for the application's super-administrator: an application-wide read, so under
|
|
14
|
+
* independent approval it needs an access grant, and the panel names that step when the route asks for it.
|
|
15
|
+
*
|
|
16
|
+
* Every time is shown through `useI18n`'s formatters, so in the reading member's time zone, as record pages show it
|
|
17
|
+
* (#2242). What is NOT here, and why:
|
|
18
|
+
* - conversations (a chat, an A2A client's turn) — the Agent runs page's, under that resource's roles;
|
|
19
|
+
* - a task's MEMORY (`AI_TaskMemory`) — an application's actor runtime records none; the rows keep no memory, so there is
|
|
20
|
+
* nothing true to draw;
|
|
21
|
+
* - a live execution STREAM (`AI_ExecutionStream`) — nothing in an application streams an actor run's progress; this
|
|
22
|
+
* page reads what was recorded, and drawing the history as a stream would claim a liveness it does not have.
|
|
23
|
+
*
|
|
24
|
+
* Under the runs, the AGENT-TO-AGENT TASKS (#4024): the A2A tasks the organization's agents delegated to another
|
|
25
|
+
* party's agent, or received from one (and, on the application-wide page, the application's own machine clients'),
|
|
26
|
+
* newest first, each with its counterpart, direction, state and when it began and ended. A delegated task's state is the
|
|
27
|
+
* one the remote agent last REPORTED, shown with when it reported it: this page calls nobody. What the tasks asked and
|
|
28
|
+
* answered is not shown, nor any credential; a task one person's own credential or client opened is theirs and absent.
|
|
29
|
+
*
|
|
30
|
+
* i18n: the panel's own words are keys in `AppPage_AgentActivitySettings.labels.ts`, one per `AgentActivityRunKind`
|
|
31
|
+
* member and one per `AgentToAgentTaskDirection` member (both held total by its test). A run's status, a task's topic and a question's outcome are vocabularies their fields
|
|
32
|
+
* declare, worded from `system_enums`. Refs and ids are values, shown as they are.
|
|
33
|
+
*/
|
|
34
|
+
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
35
|
+
import { ButtonSize, FrontendComponentType } from '@wildo-ai/presets-components-models';
|
|
36
|
+
import { AgentActivityStatusChangeSchema, AgentToAgentDelegatedTaskSchema, AgentToAgentTaskDirection, AgentToAgentTaskSource, ErrorCustomMessageReference, Flow_Node_Type, FlowsActors_Status, } from '@wildo-ai/saas-models';
|
|
37
|
+
import { getSystemEnumName } from '@wildo-ai/zod-decorators';
|
|
38
|
+
import { Card, CardContent } from '../../components/sections/card.js';
|
|
39
|
+
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '../../components/sections/table.js';
|
|
40
|
+
import { Button, ButtonVariants_Variant } from '../../components/actions/button.js';
|
|
41
|
+
import { Text } from '../../components/typography/text.js';
|
|
42
|
+
import { Alert, AlertDescription } from '../../components/overlays/containers/alert.js';
|
|
43
|
+
import { AI_FlowNodeStatusBadge, useVocabularyWord } from '../../components/flows-actors/flow-node-badges.js';
|
|
44
|
+
import { AI_TaskDetail, AI_TaskTimeline } from '../../components/flows-actors/task-detail.js';
|
|
45
|
+
import { AI_FlowExecutionSummary, AI_FlowExecutionTimeline } from '../../components/flows-actors/flow-execution.js';
|
|
46
|
+
import { useI18n } from '../../core/i18n/useI18n.js';
|
|
47
|
+
import { useUserOrgs } from '../../core/security/useUserOrgs.js';
|
|
48
|
+
import { getManualCallsHttpClient } from '../../core/requests/wildo-http-client-manual-calls.frontend.service.js';
|
|
49
|
+
import { isBackendRefusal } from '../../core/errors/backend-refusal.frontend.js';
|
|
50
|
+
const COMPONENT = FrontendComponentType.APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS;
|
|
51
|
+
/** Whose runs the panel shows. Passed explicitly at each mount, so the call site says whose activity it is. */
|
|
52
|
+
export var AgentActivityScope;
|
|
53
|
+
(function (AgentActivityScope) {
|
|
54
|
+
/** The current organization's runs, for its administrator. */
|
|
55
|
+
AgentActivityScope["ORGANIZATION"] = "organization";
|
|
56
|
+
/** Every organization's runs, for the application's super-administrator (an application-wide read). */
|
|
57
|
+
AgentActivityScope["APPLICATION"] = "application";
|
|
58
|
+
})(AgentActivityScope || (AgentActivityScope = {}));
|
|
59
|
+
/** How a read stands. */
|
|
60
|
+
var AgentActivityReadState;
|
|
61
|
+
(function (AgentActivityReadState) {
|
|
62
|
+
AgentActivityReadState["LOADING"] = "loading";
|
|
63
|
+
AgentActivityReadState["READY"] = "ready";
|
|
64
|
+
AgentActivityReadState["FAILED"] = "failed";
|
|
65
|
+
/** Refused because an application-wide read under independent approval needs an access grant. */
|
|
66
|
+
AgentActivityReadState["ACCESS_GRANT_REQUIRED"] = "access-grant-required";
|
|
67
|
+
})(AgentActivityReadState || (AgentActivityReadState = {}));
|
|
68
|
+
/** The vocabulary a question's outcome is worded in, read off the field the contract declares. */
|
|
69
|
+
export const DECISION_OUTCOME_VOCABULARY = getSystemEnumName(AgentActivityStatusChangeSchema.shape.decisionOutcome);
|
|
70
|
+
/** The vocabulary a delegated task's reported state is worded in, read off the field the contract declares. */
|
|
71
|
+
export const REMOTE_TASK_STATE_VOCABULARY = getSystemEnumName(AgentToAgentDelegatedTaskSchema.shape.state);
|
|
72
|
+
/** The label key of a task direction. One key per `AgentToAgentTaskDirection` member. */
|
|
73
|
+
export function directionLabelKey(direction) {
|
|
74
|
+
return `direction_${direction}`;
|
|
75
|
+
}
|
|
76
|
+
/** The label key of a run kind. One key per `AgentActivityRunKind` member. */
|
|
77
|
+
export function runKindLabelKey(kind) {
|
|
78
|
+
return `kind_${kind}`;
|
|
79
|
+
}
|
|
80
|
+
/** How a failed read reads: the access-grant step when that is what the route asked for, else a generic failure. */
|
|
81
|
+
function readStateOfFailure(caught) {
|
|
82
|
+
return isBackendRefusal(caught) && caught.customMessageReference === ErrorCustomMessageReference.AUTHORIZATIONS_APPLICATION_ACCESS_GRANT_REQUIRED
|
|
83
|
+
? AgentActivityReadState.ACCESS_GRANT_REQUIRED
|
|
84
|
+
: AgentActivityReadState.FAILED;
|
|
85
|
+
}
|
|
86
|
+
/** The run's history as the task timeline reads it: each move and its instant. */
|
|
87
|
+
export function runHistoryEvents(run) {
|
|
88
|
+
return run.statusChanges.map((change) => ({ status: change.status, timestamp: change.timestamp }));
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* A flow run's steps as the flow timeline reads them: every node that recorded WHEN it took its status, with the name
|
|
92
|
+
* the flow declares for it. A node recorded before that instant was kept is left out and counted (`untimed`), so the
|
|
93
|
+
* page can say some steps carry no time rather than inventing one.
|
|
94
|
+
*/
|
|
95
|
+
export function flowRunTimeline(run) {
|
|
96
|
+
const nodes = run.flowRun?.nodes ?? [];
|
|
97
|
+
const events = [];
|
|
98
|
+
let untimed = 0;
|
|
99
|
+
for (const node of nodes) {
|
|
100
|
+
if (!node.statusAt) {
|
|
101
|
+
untimed += 1;
|
|
102
|
+
continue;
|
|
103
|
+
}
|
|
104
|
+
const nodeName = run.flowNodeNames?.[node.nodeRef];
|
|
105
|
+
events.push({ nodeRef: node.nodeRef, nodeType: node.nodeType, status: node.status, timestamp: node.statusAt, ...(nodeName ? { nodeName } : {}) });
|
|
106
|
+
}
|
|
107
|
+
return { events, untimed };
|
|
108
|
+
}
|
|
109
|
+
/** A flow run's step counts, for the summary: only STEP nodes are steps (a trigger and a finish are not work). */
|
|
110
|
+
export function flowRunStepCounts(run) {
|
|
111
|
+
const steps = (run.flowRun?.nodes ?? []).filter((node) => node.nodeType === Flow_Node_Type.STEP);
|
|
112
|
+
return {
|
|
113
|
+
total: steps.length,
|
|
114
|
+
completed: steps.filter((node) => node.status === FlowsActors_Status.COMPLETED).length,
|
|
115
|
+
failed: steps.filter((node) => node.status === FlowsActors_Status.FAILED).length,
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* A published task as the task card reads it. Its per-task history is not stored (the run's history is drawn once,
|
|
120
|
+
* above the tasks), it names no relationships, and its correlation context is withheld, so the card shows no context
|
|
121
|
+
* section rather than an empty one.
|
|
122
|
+
*/
|
|
123
|
+
export function taskCardOf(task) {
|
|
124
|
+
return {
|
|
125
|
+
title: task.title,
|
|
126
|
+
description: task.description,
|
|
127
|
+
topic: task.topic,
|
|
128
|
+
status: task.status,
|
|
129
|
+
actors: { actorRef: task.actorRef },
|
|
130
|
+
input: task.input,
|
|
131
|
+
...(task.output !== undefined ? { output: task.output } : {}),
|
|
132
|
+
relationships: [],
|
|
133
|
+
...(task.artifacts ? { artifacts: task.artifacts } : {}),
|
|
134
|
+
actorStates: [],
|
|
135
|
+
...(task.startedAt ? { startedAt: task.startedAt } : {}),
|
|
136
|
+
...(task.completedAt ? { completedAt: task.completedAt } : {}),
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
export const AppPage_AgentActivitySettings = ({ scope }) => {
|
|
140
|
+
const { tComponent, isReady, formatDateTime } = useI18n({ component: COMPONENT, keys: ['system_enums'] });
|
|
141
|
+
const { currentOrganizationId } = useUserOrgs();
|
|
142
|
+
const tc = useCallback((key, params) => tComponent(COMPONENT, key, params), [tComponent]);
|
|
143
|
+
/** The organization this panel reads: the current one at organization scope, none (every one) at application scope. */
|
|
144
|
+
const organizationId = scope === AgentActivityScope.ORGANIZATION ? currentOrganizationId : undefined;
|
|
145
|
+
const awaitsOrganization = scope === AgentActivityScope.ORGANIZATION && !currentOrganizationId;
|
|
146
|
+
const [pages, setPages] = useState(null);
|
|
147
|
+
const [readState, setReadState] = useState(AgentActivityReadState.LOADING);
|
|
148
|
+
const [moreLoading, setMoreLoading] = useState(false);
|
|
149
|
+
const [openRunId, setOpenRunId] = useState(null);
|
|
150
|
+
const readPage = useCallback((after) => getManualCallsHttpClient()
|
|
151
|
+
.listAgentActivity({ ...(organizationId ? { organizationId } : {}), ...(after ? { after } : {}) }), [organizationId]);
|
|
152
|
+
useEffect(() => {
|
|
153
|
+
if (awaitsOrganization)
|
|
154
|
+
return;
|
|
155
|
+
let cancelled = false;
|
|
156
|
+
setReadState(AgentActivityReadState.LOADING);
|
|
157
|
+
setOpenRunId(null);
|
|
158
|
+
readPage(undefined)
|
|
159
|
+
.then((page) => {
|
|
160
|
+
if (cancelled)
|
|
161
|
+
return;
|
|
162
|
+
setPages({ organizationId, runs: page.runs, ...(page.next ? { next: page.next } : {}) });
|
|
163
|
+
setReadState(AgentActivityReadState.READY);
|
|
164
|
+
})
|
|
165
|
+
// A refusal is not rethrown: the interceptor already handed it to the global error handler (#3250).
|
|
166
|
+
.catch((caught) => { if (!cancelled)
|
|
167
|
+
setReadState(readStateOfFailure(caught)); });
|
|
168
|
+
return () => { cancelled = true; };
|
|
169
|
+
}, [readPage, organizationId, awaitsOrganization]);
|
|
170
|
+
const loadMore = useCallback(() => {
|
|
171
|
+
if (!pages?.next)
|
|
172
|
+
return;
|
|
173
|
+
setMoreLoading(true);
|
|
174
|
+
readPage(pages.next)
|
|
175
|
+
.then((page) => setPages((held) => (held && held.organizationId === organizationId
|
|
176
|
+
? { organizationId, runs: [...held.runs, ...page.runs], ...(page.next ? { next: page.next } : {}) }
|
|
177
|
+
: held)))
|
|
178
|
+
.catch((caught) => setReadState(readStateOfFailure(caught)))
|
|
179
|
+
.finally(() => setMoreLoading(false));
|
|
180
|
+
}, [pages, readPage, organizationId]);
|
|
181
|
+
if (!isReady)
|
|
182
|
+
return null;
|
|
183
|
+
// Only the runs read for the organization selected NOW: after a switch, the previous one's runs are not this one's.
|
|
184
|
+
const current = pages && pages.organizationId === organizationId ? pages : null;
|
|
185
|
+
const titleKey = scope === AgentActivityScope.APPLICATION ? 'applicationPageTitle' : 'pageTitle';
|
|
186
|
+
const descriptionKey = scope === AgentActivityScope.APPLICATION ? 'applicationPageDescription' : 'pageDescription';
|
|
187
|
+
return (_jsxs("div", { className: "flex flex-col gap-section", "data-agent-activity-scope": scope, children: [_jsx("h3", { className: "text-base font-semibold tracking-tight", children: tc(titleKey) }), _jsx(Text, { className: "text-sm text-muted-foreground", children: tc(descriptionKey) }), awaitsOrganization ? (_jsx(Text, { className: "text-sm text-muted-foreground", children: tc('noOrganization') })) : readState === AgentActivityReadState.ACCESS_GRANT_REQUIRED ? (_jsx(Alert, { variant: "warning", "data-agent-activity-grant-required": true, children: _jsx(AlertDescription, { children: tc('errorAccessGrantRequired') }) })) : readState === AgentActivityReadState.FAILED ? (_jsx(Alert, { variant: "destructive", children: _jsx(AlertDescription, { children: tc('errorGeneric') }) })) : readState === AgentActivityReadState.LOADING || !current ? (_jsx(Text, { className: "text-sm text-muted-foreground", children: tc('loading') })) : openRunId ? (_jsx(AgentActivityRunView, { executionId: openRunId, organizationId: organizationId, showOrganization: scope === AgentActivityScope.APPLICATION, onBack: () => setOpenRunId(null), tc: tc, formatDateTime: formatDateTime })) : (_jsxs(_Fragment, { children: [current.runs.length === 0 ? (_jsx(Text, { className: "text-sm text-muted-foreground", children: tc('empty') })) : (_jsx(AgentActivityRunTable, { runs: current.runs, showOrganization: scope === AgentActivityScope.APPLICATION, hasMore: current.next !== undefined, moreLoading: moreLoading, onOpen: setOpenRunId, onMore: loadMore, tc: tc, formatDateTime: formatDateTime })), _jsx(AgentToAgentTaskSection, { organizationId: organizationId, showOrganization: scope === AgentActivityScope.APPLICATION, tc: tc, formatDateTime: formatDateTime })] }))] }));
|
|
188
|
+
};
|
|
189
|
+
/** The runs, newest first: what ran, what kind, how it stands, its case, when it began and ended. */
|
|
190
|
+
function AgentActivityRunTable({ runs, showOrganization, hasMore, moreLoading, onOpen, onMore, tc, formatDateTime }) {
|
|
191
|
+
return (_jsxs("div", { className: "flex flex-col gap-element", children: [_jsxs(Table, { children: [_jsx(TableHeader, { children: _jsxs(TableRow, { children: [_jsx(TableHead, { children: tc('columnSystem') }), _jsx(TableHead, { children: tc('columnKind') }), _jsx(TableHead, { children: tc('columnStatus') }), showOrganization ? _jsx(TableHead, { children: tc('columnOrganization') }) : null, _jsx(TableHead, { children: tc('columnCase') }), _jsx(TableHead, { children: tc('columnStarted') }), _jsx(TableHead, { children: tc('columnFinished') }), _jsx(TableHead, { children: _jsx("span", { className: "sr-only", children: tc('columnActions') }) })] }) }), _jsx(TableBody, { children: runs.map((run) => (_jsxs(TableRow, { "data-agent-activity-run": run.executionId, children: [_jsx(TableCell, { className: "font-mono", children: run.systemRef }), _jsx(TableCell, { children: tc(runKindLabelKey(run.kind)) }), _jsx(TableCell, { children: _jsx(AI_FlowNodeStatusBadge, { status: run.status }) }), showOrganization ? _jsx(TableCell, { className: "font-mono", children: run.organizationId }) : null, _jsx(TableCell, { className: "font-mono", children: run.caseRef?.resourceId ?? null }), _jsx(TableCell, { children: formatDateTime(run.createdAt) }), _jsx(TableCell, { children: run.finishedAt ? formatDateTime(run.finishedAt) : _jsx("span", { className: "text-muted-foreground", children: tc('notFinished') }) }), _jsx(TableCell, { children: _jsx(Button, { type: "button", variant: ButtonVariants_Variant.OUTLINE, size: ButtonSize.SM, onClick: () => onOpen(run.executionId), "data-agent-activity-open": run.executionId, children: tc('openRun') }) })] }, run.executionId))) })] }), hasMore ? (_jsx("div", { children: _jsx(Button, { type: "button", variant: ButtonVariants_Variant.OUTLINE, size: ButtonSize.SM, onClick: onMore, disabled: moreLoading, "data-agent-activity-more": true, children: moreLoading ? tc('loading') : tc('loadMore') }) })) : null] }));
|
|
192
|
+
}
|
|
193
|
+
/** One run, whole: how it moved, how the questions it waited on ended, its flow steps, and its tasks. */
|
|
194
|
+
function AgentActivityRunView({ executionId, organizationId, showOrganization, onBack, tc, formatDateTime }) {
|
|
195
|
+
const [run, setRun] = useState(null);
|
|
196
|
+
const [readState, setReadState] = useState(AgentActivityReadState.LOADING);
|
|
197
|
+
const { word: outcomeWord, isReady: outcomeWordsReady } = useVocabularyWord(DECISION_OUTCOME_VOCABULARY);
|
|
198
|
+
useEffect(() => {
|
|
199
|
+
let cancelled = false;
|
|
200
|
+
setReadState(AgentActivityReadState.LOADING);
|
|
201
|
+
getManualCallsHttpClient()
|
|
202
|
+
.readAgentActivityRun({ executionId, ...(organizationId ? { organizationId } : {}) })
|
|
203
|
+
.then((detail) => {
|
|
204
|
+
if (cancelled)
|
|
205
|
+
return;
|
|
206
|
+
setRun(detail);
|
|
207
|
+
setReadState(AgentActivityReadState.READY);
|
|
208
|
+
})
|
|
209
|
+
.catch((caught) => { if (!cancelled)
|
|
210
|
+
setReadState(readStateOfFailure(caught)); });
|
|
211
|
+
return () => { cancelled = true; };
|
|
212
|
+
}, [executionId, organizationId]);
|
|
213
|
+
const history = useMemo(() => (run ? runHistoryEvents(run) : []), [run]);
|
|
214
|
+
const flow = useMemo(() => (run?.flowRun ? flowRunTimeline(run) : null), [run]);
|
|
215
|
+
const counts = useMemo(() => (run?.flowRun ? flowRunStepCounts(run) : null), [run]);
|
|
216
|
+
const outcomes = useMemo(() => run?.statusChanges.filter((change) => change.decisionOutcome !== undefined) ?? [], [run]);
|
|
217
|
+
return (_jsxs("div", { className: "flex flex-col gap-section", "data-agent-activity-run-view": executionId, children: [_jsx("div", { children: _jsx(Button, { type: "button", variant: ButtonVariants_Variant.GHOST, size: ButtonSize.SM, onClick: onBack, "data-agent-activity-back": true, children: tc('backToRuns') }) }), readState === AgentActivityReadState.ACCESS_GRANT_REQUIRED ? (_jsx(Alert, { variant: "warning", children: _jsx(AlertDescription, { children: tc('errorAccessGrantRequired') }) })) : readState === AgentActivityReadState.FAILED ? (_jsx(Alert, { variant: "destructive", children: _jsx(AlertDescription, { children: tc('errorRun') }) })) : readState === AgentActivityReadState.LOADING || !run || !outcomeWordsReady ? (_jsx(Text, { className: "text-sm text-muted-foreground", children: tc('loading') })) : (_jsxs(_Fragment, { children: [_jsx(Card, { children: _jsxs(CardContent, { className: "flex flex-col gap-section p-card", children: [_jsxs("div", { className: "flex flex-wrap items-center gap-element", children: [_jsx("span", { className: "font-mono text-sm font-semibold", children: run.systemRef }), _jsx("span", { className: "text-sm text-muted-foreground", children: tc(runKindLabelKey(run.kind)) }), _jsx(AI_FlowNodeStatusBadge, { status: run.status })] }), _jsxs("dl", { className: "grid grid-cols-[auto_1fr] gap-x-section gap-y-element text-sm", children: [showOrganization ? (_jsxs(_Fragment, { children: [_jsx("dt", { className: "text-muted-foreground", children: tc('columnOrganization') }), _jsx("dd", { className: "font-mono", children: run.organizationId })] })) : null, run.caseRef ? (_jsxs(_Fragment, { children: [_jsx("dt", { className: "text-muted-foreground", children: tc('columnCase') }), _jsx("dd", { className: "font-mono", children: run.caseRef.resourceId })] })) : null, _jsx("dt", { className: "text-muted-foreground", children: tc('columnStarted') }), _jsx("dd", { children: formatDateTime(run.createdAt) }), _jsx("dt", { className: "text-muted-foreground", children: tc('columnFinished') }), _jsx("dd", { children: run.finishedAt ? formatDateTime(run.finishedAt) : tc('notFinished') })] }), history.length > 0 ? _jsx(AI_TaskTimeline, { events: history, "data-agent-activity-history": true }) : null, outcomes.length > 0 ? (_jsxs("section", { className: "flex flex-col gap-element", "aria-label": tc('decisionsHeading'), children: [_jsx("h4", { className: "text-sm font-semibold", children: tc('decisionsHeading') }), _jsx("ul", { className: "flex flex-col gap-element text-sm", children: outcomes.map((change, index) => (_jsx("li", { "data-agent-activity-decision": change.decisionOutcome, children: tc('decisionEnded', { outcome: outcomeWord(change.decisionOutcome), at: formatDateTime(change.timestamp) }) }, `${change.timestamp}-${index}`))) })] })) : null] }) }), run.flowRun && flow && counts ? (_jsxs("section", { className: "flex flex-col gap-element", "aria-label": tc('flowStepsHeading'), "data-agent-activity-flow": true, children: [_jsx("h4", { className: "text-sm font-semibold", children: tc('flowStepsHeading') }), _jsx(AI_FlowExecutionSummary, { totalSteps: counts.total, completedSteps: counts.completed, failedSteps: counts.failed, status: run.status, startedAt: run.createdAt, ...(run.finishedAt ? { completedAt: run.finishedAt } : {}) }), flow.events.length > 0 ? _jsx(AI_FlowExecutionTimeline, { events: flow.events }) : null, flow.untimed > 0 ? _jsx(Text, { className: "text-xs text-muted-foreground", children: tc('flowStepsUntimed', { count: flow.untimed }) }) : null, run.flowRun.failure ? (_jsx(Alert, { variant: "destructive", "data-agent-activity-flow-failure": true, children: _jsxs(AlertDescription, { children: [_jsx("span", { className: "font-medium", children: tc('flowFailureLabel') }), ' ', _jsx("span", { className: "font-mono text-xs", children: run.flowRun.failure })] }) })) : null] })) : null, _jsxs("section", { className: "flex flex-col gap-element", "aria-label": tc('tasksHeading'), children: [_jsx("h4", { className: "text-sm font-semibold", children: tc('tasksHeading') }), run.tasks.length === 0 ? (_jsx(Text, { className: "text-sm text-muted-foreground", children: tc('noTasks') })) : (run.tasks.map((task) => _jsx(AI_TaskDetail, { task: taskCardOf(task), "data-agent-activity-task": task.taskId }, task.taskId)))] })] }))] }));
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* The agent-to-agent tasks, newest first (#4024). Read on its own, after the runs were: the same admission answers both,
|
|
221
|
+
* so it is shown only once the runs could be read, and it keeps its own paging.
|
|
222
|
+
*/
|
|
223
|
+
function AgentToAgentTaskSection({ organizationId, showOrganization, tc, formatDateTime }) {
|
|
224
|
+
const [held, setHeld] = useState(null);
|
|
225
|
+
const [readState, setReadState] = useState(AgentActivityReadState.LOADING);
|
|
226
|
+
const [moreLoading, setMoreLoading] = useState(false);
|
|
227
|
+
const { word: stateWord, isReady: stateWordsReady } = useVocabularyWord(REMOTE_TASK_STATE_VOCABULARY);
|
|
228
|
+
const readPage = useCallback((after) => getManualCallsHttpClient()
|
|
229
|
+
.listAgentToAgentTasks({ ...(organizationId ? { organizationId } : {}), ...(after ? { after } : {}) }), [organizationId]);
|
|
230
|
+
useEffect(() => {
|
|
231
|
+
let cancelled = false;
|
|
232
|
+
setReadState(AgentActivityReadState.LOADING);
|
|
233
|
+
readPage(undefined)
|
|
234
|
+
.then((page) => {
|
|
235
|
+
if (cancelled)
|
|
236
|
+
return;
|
|
237
|
+
setHeld({ organizationId, tasks: page.tasks, ...(page.next ? { next: page.next } : {}) });
|
|
238
|
+
setReadState(AgentActivityReadState.READY);
|
|
239
|
+
})
|
|
240
|
+
// A refusal is not rethrown: the interceptor already handed it to the global error handler (#3250).
|
|
241
|
+
.catch((caught) => { if (!cancelled)
|
|
242
|
+
setReadState(readStateOfFailure(caught)); });
|
|
243
|
+
return () => { cancelled = true; };
|
|
244
|
+
}, [readPage, organizationId]);
|
|
245
|
+
const loadMore = useCallback(() => {
|
|
246
|
+
if (!held?.next)
|
|
247
|
+
return;
|
|
248
|
+
setMoreLoading(true);
|
|
249
|
+
readPage(held.next)
|
|
250
|
+
.then((page) => setHeld((previous) => (previous && previous.organizationId === organizationId
|
|
251
|
+
? { organizationId, tasks: [...previous.tasks, ...page.tasks], ...(page.next ? { next: page.next } : {}) }
|
|
252
|
+
: previous)))
|
|
253
|
+
.catch((caught) => setReadState(readStateOfFailure(caught)))
|
|
254
|
+
.finally(() => setMoreLoading(false));
|
|
255
|
+
}, [held, readPage, organizationId]);
|
|
256
|
+
// Only the tasks read for the organization selected NOW.
|
|
257
|
+
const current = held && held.organizationId === organizationId ? held : null;
|
|
258
|
+
return (_jsxs("section", { className: "flex flex-col gap-element", "aria-label": tc('agentToAgentHeading'), "data-agent-activity-agent-to-agent": true, children: [_jsx("h4", { className: "text-sm font-semibold", children: tc('agentToAgentHeading') }), _jsx(Text, { className: "text-sm text-muted-foreground", children: tc('agentToAgentDescription') }), readState === AgentActivityReadState.ACCESS_GRANT_REQUIRED ? (_jsx(Alert, { variant: "warning", children: _jsx(AlertDescription, { children: tc('errorAccessGrantRequired') }) })) : readState === AgentActivityReadState.FAILED ? (_jsx(Alert, { variant: "destructive", children: _jsx(AlertDescription, { children: tc('agentToAgentError') }) })) : readState === AgentActivityReadState.LOADING || !current || !stateWordsReady ? (_jsx(Text, { className: "text-sm text-muted-foreground", children: tc('loading') })) : current.tasks.length === 0 ? (_jsx(Text, { className: "text-sm text-muted-foreground", children: tc('agentToAgentEmpty') })) : (_jsxs(_Fragment, { children: [_jsxs(Table, { children: [_jsx(TableHeader, { children: _jsxs(TableRow, { children: [_jsx(TableHead, { children: tc('columnDirection') }), _jsx(TableHead, { children: tc('columnCounterpart') }), showOrganization ? _jsx(TableHead, { children: tc('columnOrganization') }) : null, _jsx(TableHead, { children: tc('columnTaskState') }), _jsx(TableHead, { children: tc('columnTaskStarted') }), _jsx(TableHead, { children: tc('columnTaskEnded') })] }) }), _jsx(TableBody, { children: current.tasks.map((task) => (_jsxs(TableRow, { "data-agent-to-agent-task": task.taskId, "data-agent-to-agent-direction": task.direction, children: [_jsx(TableCell, { children: tc(directionLabelKey(task.direction)) }), _jsx(TableCell, { children: _jsx(AgentToAgentCounterpart, { task: task, tc: tc }) }), showOrganization ? (_jsx(TableCell, { className: "font-mono", children: task.organizationId ?? (task.source === AgentToAgentTaskSource.RECEIVED_BY_APPLICATION ? _jsx("span", { className: "font-sans", children: tc('applicationOwnClient') }) : null) })) : null, _jsx(TableCell, { children: task.direction === AgentToAgentTaskDirection.RECEIVED ? (_jsx(AI_FlowNodeStatusBadge, { status: task.status })) : task.state ? (_jsxs("div", { className: "flex flex-col", "data-agent-to-agent-state": task.state, children: [_jsx("span", { children: stateWord(task.state) }), task.stateReportedAt ? _jsx("span", { className: "text-xs text-muted-foreground", children: tc('stateReportedAt', { at: formatDateTime(task.stateReportedAt) }) }) : null] })) : (_jsx("span", { className: "text-muted-foreground", children: tc('stateNotReported') })) }), _jsx(TableCell, { children: formatDateTime(task.startedAt) }), _jsx(TableCell, { children: task.endedAt ? formatDateTime(task.endedAt) : _jsx("span", { className: "text-muted-foreground", children: tc('taskNotEnded') }) })] }, `${task.source}:${task.taskId}`))) })] }), current.next ? (_jsx("div", { children: _jsx(Button, { type: "button", variant: ButtonVariants_Variant.OUTLINE, size: ButtonSize.SM, onClick: loadMore, disabled: moreLoading, "data-agent-to-agent-more": true, children: moreLoading ? tc('loading') : tc('loadMoreTasks') }) })) : null] }))] }));
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* Who the other party is: a delegated task's remote agent by the name the application declares (its ref beside it, or
|
|
262
|
+
* alone when no longer declared); a received task's client by the name its owner gave it, and which of this
|
|
263
|
+
* application's agents it reached.
|
|
264
|
+
*/
|
|
265
|
+
function AgentToAgentCounterpart({ task, tc }) {
|
|
266
|
+
if (task.direction === AgentToAgentTaskDirection.DELEGATED) {
|
|
267
|
+
return (_jsxs("div", { className: "flex flex-col", children: [_jsx("span", { children: task.remoteAgentName ?? _jsx("span", { className: "font-mono", children: task.remoteAgentRef }) }), task.remoteAgentName ? _jsx("span", { className: "font-mono text-xs text-muted-foreground", children: task.remoteAgentRef }) : null] }));
|
|
268
|
+
}
|
|
269
|
+
return (_jsxs("div", { className: "flex flex-col", children: [_jsx("span", { children: task.clientName ?? _jsx("span", { className: "text-muted-foreground", children: tc('unknownClient') }) }), _jsx("span", { className: "text-xs text-muted-foreground", children: task.agentRef ? tc('receivedByAgent', { agent: task.agentRef }) : tc('receivedByDefaultAgent') })] }));
|
|
270
|
+
}
|
|
271
|
+
//# sourceMappingURL=AppPage_AgentActivitySettings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppPage_AgentActivitySettings.js","sourceRoot":"","sources":["../../../../src/components/settings/AppPage_AgentActivitySettings.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,OAAc,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AACxF,OAAO,EAEL,+BAA+B,EAC/B,+BAA+B,EAC/B,yBAAyB,EACzB,sBAAsB,EACtB,2BAA2B,EAC3B,cAAc,EACd,kBAAkB,GAQnB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,8CAA8C,CAAC;AACjF,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AAC9H,OAAO,EAAE,MAAM,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AAC/F,OAAO,EAAE,IAAI,EAAE,MAAM,gDAAgD,CAAC;AACtE,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE,MAAM,0DAA0D,CAAC;AACnG,OAAO,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,8DAA8D,CAAC;AACzH,OAAO,EAAE,aAAa,EAAE,eAAe,EAAqD,MAAM,yDAAyD,CAAC;AAC5J,OAAO,EAAE,uBAAuB,EAAE,wBAAwB,EAA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C,CAAC,CAAC,CAAC,EAAE,CAAC,wBAAwB,CAAC,GAAQ,IACnJ,CACP,CAAC;AACJ,CAAC","sourcesContent":["/**\n * AppPage_AgentActivitySettings — the Settings Hub \"Agent activity\" panel (#3990).\n *\n * What the application's declared FLOWS and ACTOR SYSTEMS did: the runs on the actor plane, newest first, and one run\n * at a time, whole — how it moved, what each of its tasks was asked and produced, and for a flow the steps it went\n * through, each with when it happened. Drawn through the engine's own flows-actors components (`AI_TaskTimeline`,\n * `AI_TaskDetail`, `AI_FlowExecutionSummary`, `AI_FlowExecutionTimeline`), which until now only the application-creation\n * workbench mounted, so an application's administrators had no way to read what its agents and flows did.\n *\n * Two scopes, passed explicitly at each mount (see `SettingsHub`):\n * - ORGANIZATION — the organization the caller is working in, for its administrator;\n * - APPLICATION — every organization, for the application's super-administrator: an application-wide read, so under\n * independent approval it needs an access grant, and the panel names that step when the route asks for it.\n *\n * Every time is shown through `useI18n`'s formatters, so in the reading member's time zone, as record pages show it\n * (#2242). What is NOT here, and why:\n * - conversations (a chat, an A2A client's turn) — the Agent runs page's, under that resource's roles;\n * - a task's MEMORY (`AI_TaskMemory`) — an application's actor runtime records none; the rows keep no memory, so there is\n * nothing true to draw;\n * - a live execution STREAM (`AI_ExecutionStream`) — nothing in an application streams an actor run's progress; this\n * page reads what was recorded, and drawing the history as a stream would claim a liveness it does not have.\n *\n * Under the runs, the AGENT-TO-AGENT TASKS (#4024): the A2A tasks the organization's agents delegated to another\n * party's agent, or received from one (and, on the application-wide page, the application's own machine clients'),\n * newest first, each with its counterpart, direction, state and when it began and ended. A delegated task's state is the\n * one the remote agent last REPORTED, shown with when it reported it: this page calls nobody. What the tasks asked and\n * answered is not shown, nor any credential; a task one person's own credential or client opened is theirs and absent.\n *\n * i18n: the panel's own words are keys in `AppPage_AgentActivitySettings.labels.ts`, one per `AgentActivityRunKind`\n * member and one per `AgentToAgentTaskDirection` member (both held total by its test). A run's status, a task's topic and a question's outcome are vocabularies their fields\n * declare, worded from `system_enums`. Refs and ids are values, shown as they are.\n */\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\nimport { ButtonSize, FrontendComponentType } from '@wildo-ai/presets-components-models';\nimport {\n AgentActivityRunKind,\n AgentActivityStatusChangeSchema,\n AgentToAgentDelegatedTaskSchema,\n AgentToAgentTaskDirection,\n AgentToAgentTaskSource,\n ErrorCustomMessageReference,\n Flow_Node_Type,\n FlowsActors_Status,\n type AgentActivityListResponse,\n type AgentActivityPageCursor,\n type AgentActivityRunDetail,\n type AgentActivityRunSummary,\n type AgentActivityTask,\n type AgentToAgentTask,\n type AgentToAgentTaskPageCursor,\n} from '@wildo-ai/saas-models';\nimport { getSystemEnumName } from '@wildo-ai/zod-decorators';\nimport { Card, CardContent } from '~wildo-frontend-lib/components/sections/card';\nimport { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '~wildo-frontend-lib/components/sections/table';\nimport { Button, ButtonVariants_Variant } from '~wildo-frontend-lib/components/actions/button';\nimport { Text } from '~wildo-frontend-lib/components/typography/text';\nimport { Alert, AlertDescription } from '~wildo-frontend-lib/components/overlays/containers/alert';\nimport { AI_FlowNodeStatusBadge, useVocabularyWord } from '~wildo-frontend-lib/components/flows-actors/flow-node-badges';\nimport { AI_TaskDetail, AI_TaskTimeline, type AI_TaskDetailTask, type AI_TaskTimelineEvent } from '~wildo-frontend-lib/components/flows-actors/task-detail';\nimport { AI_FlowExecutionSummary, AI_FlowExecutionTimeline, type AI_FlowExecutionTimelineEvent } from '~wildo-frontend-lib/components/flows-actors/flow-execution';\nimport { useI18n } from '~wildo-frontend-lib/core/i18n/useI18n';\nimport { useUserOrgs } from '~wildo-frontend-lib/core/security/useUserOrgs';\nimport { getManualCallsHttpClient } from '~wildo-frontend-lib/core/requests/wildo-http-client-manual-calls.frontend.service';\nimport { isBackendRefusal } from '~wildo-frontend-lib/core/errors/backend-refusal.frontend';\n\nconst COMPONENT = FrontendComponentType.APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS;\n\n/** Whose runs the panel shows. Passed explicitly at each mount, so the call site says whose activity it is. */\nexport enum AgentActivityScope {\n /** The current organization's runs, for its administrator. */\n ORGANIZATION = 'organization',\n /** Every organization's runs, for the application's super-administrator (an application-wide read). */\n APPLICATION = 'application',\n}\n\n/** How a read stands. */\nenum AgentActivityReadState {\n LOADING = 'loading',\n READY = 'ready',\n FAILED = 'failed',\n /** Refused because an application-wide read under independent approval needs an access grant. */\n ACCESS_GRANT_REQUIRED = 'access-grant-required',\n}\n\n/** The vocabulary a question's outcome is worded in, read off the field the contract declares. */\nexport const DECISION_OUTCOME_VOCABULARY = getSystemEnumName(AgentActivityStatusChangeSchema.shape.decisionOutcome);\n\n/** The vocabulary a delegated task's reported state is worded in, read off the field the contract declares. */\nexport const REMOTE_TASK_STATE_VOCABULARY = getSystemEnumName(AgentToAgentDelegatedTaskSchema.shape.state);\n\n/** The label key of a task direction. One key per `AgentToAgentTaskDirection` member. */\nexport function directionLabelKey(direction: AgentToAgentTaskDirection): string {\n return `direction_${direction}`;\n}\n\n/** The label key of a run kind. One key per `AgentActivityRunKind` member. */\nexport function runKindLabelKey(kind: AgentActivityRunKind): string {\n return `kind_${kind}`;\n}\n\n/** How a failed read reads: the access-grant step when that is what the route asked for, else a generic failure. */\nfunction readStateOfFailure(caught: unknown): AgentActivityReadState {\n return isBackendRefusal(caught) && caught.customMessageReference === ErrorCustomMessageReference.AUTHORIZATIONS_APPLICATION_ACCESS_GRANT_REQUIRED\n ? AgentActivityReadState.ACCESS_GRANT_REQUIRED\n : AgentActivityReadState.FAILED;\n}\n\n/** The run's history as the task timeline reads it: each move and its instant. */\nexport function runHistoryEvents(run: Pick<AgentActivityRunDetail, 'statusChanges'>): AI_TaskTimelineEvent[] {\n return run.statusChanges.map((change) => ({ status: change.status, timestamp: change.timestamp }));\n}\n\n/**\n * A flow run's steps as the flow timeline reads them: every node that recorded WHEN it took its status, with the name\n * the flow declares for it. A node recorded before that instant was kept is left out and counted (`untimed`), so the\n * page can say some steps carry no time rather than inventing one.\n */\nexport function flowRunTimeline(run: Pick<AgentActivityRunDetail, 'flowRun' | 'flowNodeNames'>): { readonly events: AI_FlowExecutionTimelineEvent[]; readonly untimed: number } {\n const nodes = run.flowRun?.nodes ?? [];\n const events: AI_FlowExecutionTimelineEvent[] = [];\n let untimed = 0;\n for (const node of nodes) {\n if (!node.statusAt) {\n untimed += 1;\n continue;\n }\n const nodeName = run.flowNodeNames?.[node.nodeRef];\n events.push({ nodeRef: node.nodeRef, nodeType: node.nodeType, status: node.status, timestamp: node.statusAt, ...(nodeName ? { nodeName } : {}) });\n }\n return { events, untimed };\n}\n\n/** A flow run's step counts, for the summary: only STEP nodes are steps (a trigger and a finish are not work). */\nexport function flowRunStepCounts(run: Pick<AgentActivityRunDetail, 'flowRun'>): { readonly total: number; readonly completed: number; readonly failed: number } {\n const steps = (run.flowRun?.nodes ?? []).filter((node) => node.nodeType === Flow_Node_Type.STEP);\n return {\n total: steps.length,\n completed: steps.filter((node) => node.status === FlowsActors_Status.COMPLETED).length,\n failed: steps.filter((node) => node.status === FlowsActors_Status.FAILED).length,\n };\n}\n\n/**\n * A published task as the task card reads it. Its per-task history is not stored (the run's history is drawn once,\n * above the tasks), it names no relationships, and its correlation context is withheld, so the card shows no context\n * section rather than an empty one.\n */\nexport function taskCardOf(task: AgentActivityTask): AI_TaskDetailTask {\n return {\n title: task.title,\n description: task.description,\n topic: task.topic,\n status: task.status,\n actors: { actorRef: task.actorRef },\n input: task.input,\n ...(task.output !== undefined ? { output: task.output } : {}),\n relationships: [],\n ...(task.artifacts ? { artifacts: task.artifacts } : {}),\n actorStates: [],\n ...(task.startedAt ? { startedAt: task.startedAt } : {}),\n ...(task.completedAt ? { completedAt: task.completedAt } : {}),\n };\n}\n\nexport interface AppPage_AgentActivitySettingsProps {\n readonly scope: AgentActivityScope;\n}\n\nexport const AppPage_AgentActivitySettings: React.FC<AppPage_AgentActivitySettingsProps> = ({ scope }) => {\n const { tComponent, isReady, formatDateTime } = useI18n({ component: COMPONENT, keys: ['system_enums'] });\n const { currentOrganizationId } = useUserOrgs();\n const tc = useCallback((key: string, params?: Record<string, string | number>) => tComponent(COMPONENT, key, params), [tComponent]);\n /** The organization this panel reads: the current one at organization scope, none (every one) at application scope. */\n const organizationId = scope === AgentActivityScope.ORGANIZATION ? currentOrganizationId : undefined;\n const awaitsOrganization = scope === AgentActivityScope.ORGANIZATION && !currentOrganizationId;\n\n const [pages, setPages] = useState<{ readonly organizationId: string | undefined; readonly runs: AgentActivityRunSummary[]; readonly next?: AgentActivityPageCursor } | null>(null);\n const [readState, setReadState] = useState<AgentActivityReadState>(AgentActivityReadState.LOADING);\n const [moreLoading, setMoreLoading] = useState(false);\n const [openRunId, setOpenRunId] = useState<string | null>(null);\n\n const readPage = useCallback((after: AgentActivityPageCursor | undefined): Promise<AgentActivityListResponse> => getManualCallsHttpClient()\n .listAgentActivity({ ...(organizationId ? { organizationId } : {}), ...(after ? { after } : {}) }), [organizationId]);\n\n useEffect(() => {\n if (awaitsOrganization) return;\n let cancelled = false;\n setReadState(AgentActivityReadState.LOADING);\n setOpenRunId(null);\n readPage(undefined)\n .then((page) => {\n if (cancelled) return;\n setPages({ organizationId, runs: page.runs, ...(page.next ? { next: page.next } : {}) });\n setReadState(AgentActivityReadState.READY);\n })\n // A refusal is not rethrown: the interceptor already handed it to the global error handler (#3250).\n .catch((caught: unknown) => { if (!cancelled) setReadState(readStateOfFailure(caught)); });\n return () => { cancelled = true; };\n }, [readPage, organizationId, awaitsOrganization]);\n\n const loadMore = useCallback(() => {\n if (!pages?.next) return;\n setMoreLoading(true);\n readPage(pages.next)\n .then((page) => setPages((held) => (held && held.organizationId === organizationId\n ? { organizationId, runs: [...held.runs, ...page.runs], ...(page.next ? { next: page.next } : {}) }\n : held)))\n .catch((caught: unknown) => setReadState(readStateOfFailure(caught)))\n .finally(() => setMoreLoading(false));\n }, [pages, readPage, organizationId]);\n\n if (!isReady) return null;\n\n // Only the runs read for the organization selected NOW: after a switch, the previous one's runs are not this one's.\n const current = pages && pages.organizationId === organizationId ? pages : null;\n const titleKey = scope === AgentActivityScope.APPLICATION ? 'applicationPageTitle' : 'pageTitle';\n const descriptionKey = scope === AgentActivityScope.APPLICATION ? 'applicationPageDescription' : 'pageDescription';\n\n return (\n <div className=\"flex flex-col gap-section\" data-agent-activity-scope={scope}>\n <h3 className=\"text-base font-semibold tracking-tight\">{tc(titleKey)}</h3>\n <Text className=\"text-sm text-muted-foreground\">{tc(descriptionKey)}</Text>\n\n {awaitsOrganization ? (\n <Text className=\"text-sm text-muted-foreground\">{tc('noOrganization')}</Text>\n ) : readState === AgentActivityReadState.ACCESS_GRANT_REQUIRED ? (\n <Alert variant=\"warning\" data-agent-activity-grant-required>\n <AlertDescription>{tc('errorAccessGrantRequired')}</AlertDescription>\n </Alert>\n ) : readState === AgentActivityReadState.FAILED ? (\n <Alert variant=\"destructive\">\n <AlertDescription>{tc('errorGeneric')}</AlertDescription>\n </Alert>\n ) : readState === AgentActivityReadState.LOADING || !current ? (\n <Text className=\"text-sm text-muted-foreground\">{tc('loading')}</Text>\n ) : openRunId ? (\n <AgentActivityRunView\n executionId={openRunId}\n organizationId={organizationId}\n showOrganization={scope === AgentActivityScope.APPLICATION}\n onBack={() => setOpenRunId(null)}\n tc={tc}\n formatDateTime={formatDateTime}\n />\n ) : (\n <>\n {current.runs.length === 0 ? (\n <Text className=\"text-sm text-muted-foreground\">{tc('empty')}</Text>\n ) : (\n <AgentActivityRunTable\n runs={current.runs}\n showOrganization={scope === AgentActivityScope.APPLICATION}\n hasMore={current.next !== undefined}\n moreLoading={moreLoading}\n onOpen={setOpenRunId}\n onMore={loadMore}\n tc={tc}\n formatDateTime={formatDateTime}\n />\n )}\n <AgentToAgentTaskSection\n organizationId={organizationId}\n showOrganization={scope === AgentActivityScope.APPLICATION}\n tc={tc}\n formatDateTime={formatDateTime}\n />\n </>\n )}\n </div>\n );\n};\n\ninterface AgentActivityWords {\n readonly tc: (key: string, params?: Record<string, string | number>) => string;\n readonly formatDateTime: (value: Date | string | number) => string;\n}\n\ninterface AgentActivityRunTableProps extends AgentActivityWords {\n readonly runs: readonly AgentActivityRunSummary[];\n readonly showOrganization: boolean;\n readonly hasMore: boolean;\n readonly moreLoading: boolean;\n readonly onOpen: (executionId: string) => void;\n readonly onMore: () => void;\n}\n\n/** The runs, newest first: what ran, what kind, how it stands, its case, when it began and ended. */\nfunction AgentActivityRunTable({ runs, showOrganization, hasMore, moreLoading, onOpen, onMore, tc, formatDateTime }: AgentActivityRunTableProps): React.JSX.Element {\n return (\n <div className=\"flex flex-col gap-element\">\n <Table>\n <TableHeader>\n <TableRow>\n <TableHead>{tc('columnSystem')}</TableHead>\n <TableHead>{tc('columnKind')}</TableHead>\n <TableHead>{tc('columnStatus')}</TableHead>\n {showOrganization ? <TableHead>{tc('columnOrganization')}</TableHead> : null}\n <TableHead>{tc('columnCase')}</TableHead>\n <TableHead>{tc('columnStarted')}</TableHead>\n <TableHead>{tc('columnFinished')}</TableHead>\n <TableHead><span className=\"sr-only\">{tc('columnActions')}</span></TableHead>\n </TableRow>\n </TableHeader>\n <TableBody>\n {runs.map((run) => (\n <TableRow key={run.executionId} data-agent-activity-run={run.executionId}>\n <TableCell className=\"font-mono\">{run.systemRef}</TableCell>\n <TableCell>{tc(runKindLabelKey(run.kind))}</TableCell>\n <TableCell><AI_FlowNodeStatusBadge status={run.status} /></TableCell>\n {showOrganization ? <TableCell className=\"font-mono\">{run.organizationId}</TableCell> : null}\n <TableCell className=\"font-mono\">{run.caseRef?.resourceId ?? null}</TableCell>\n <TableCell>{formatDateTime(run.createdAt)}</TableCell>\n <TableCell>{run.finishedAt ? formatDateTime(run.finishedAt) : <span className=\"text-muted-foreground\">{tc('notFinished')}</span>}</TableCell>\n <TableCell>\n <Button type=\"button\" variant={ButtonVariants_Variant.OUTLINE} size={ButtonSize.SM} onClick={() => onOpen(run.executionId)} data-agent-activity-open={run.executionId}>\n {tc('openRun')}\n </Button>\n </TableCell>\n </TableRow>\n ))}\n </TableBody>\n </Table>\n {hasMore ? (\n <div>\n <Button type=\"button\" variant={ButtonVariants_Variant.OUTLINE} size={ButtonSize.SM} onClick={onMore} disabled={moreLoading} data-agent-activity-more>\n {moreLoading ? tc('loading') : tc('loadMore')}\n </Button>\n </div>\n ) : null}\n </div>\n );\n}\n\ninterface AgentActivityRunViewProps extends AgentActivityWords {\n readonly executionId: string;\n readonly organizationId: string | undefined;\n readonly showOrganization: boolean;\n readonly onBack: () => void;\n}\n\n/** One run, whole: how it moved, how the questions it waited on ended, its flow steps, and its tasks. */\nfunction AgentActivityRunView({ executionId, organizationId, showOrganization, onBack, tc, formatDateTime }: AgentActivityRunViewProps): React.JSX.Element {\n const [run, setRun] = useState<AgentActivityRunDetail | null>(null);\n const [readState, setReadState] = useState<AgentActivityReadState>(AgentActivityReadState.LOADING);\n const { word: outcomeWord, isReady: outcomeWordsReady } = useVocabularyWord(DECISION_OUTCOME_VOCABULARY);\n\n useEffect(() => {\n let cancelled = false;\n setReadState(AgentActivityReadState.LOADING);\n getManualCallsHttpClient()\n .readAgentActivityRun({ executionId, ...(organizationId ? { organizationId } : {}) })\n .then((detail) => {\n if (cancelled) return;\n setRun(detail);\n setReadState(AgentActivityReadState.READY);\n })\n .catch((caught: unknown) => { if (!cancelled) setReadState(readStateOfFailure(caught)); });\n return () => { cancelled = true; };\n }, [executionId, organizationId]);\n\n const history = useMemo(() => (run ? runHistoryEvents(run) : []), [run]);\n const flow = useMemo(() => (run?.flowRun ? flowRunTimeline(run) : null), [run]);\n const counts = useMemo(() => (run?.flowRun ? flowRunStepCounts(run) : null), [run]);\n const outcomes = useMemo(() => run?.statusChanges.filter((change) => change.decisionOutcome !== undefined) ?? [], [run]);\n\n return (\n <div className=\"flex flex-col gap-section\" data-agent-activity-run-view={executionId}>\n <div>\n <Button type=\"button\" variant={ButtonVariants_Variant.GHOST} size={ButtonSize.SM} onClick={onBack} data-agent-activity-back>\n {tc('backToRuns')}\n </Button>\n </div>\n {readState === AgentActivityReadState.ACCESS_GRANT_REQUIRED ? (\n <Alert variant=\"warning\"><AlertDescription>{tc('errorAccessGrantRequired')}</AlertDescription></Alert>\n ) : readState === AgentActivityReadState.FAILED ? (\n <Alert variant=\"destructive\"><AlertDescription>{tc('errorRun')}</AlertDescription></Alert>\n ) : readState === AgentActivityReadState.LOADING || !run || !outcomeWordsReady ? (\n <Text className=\"text-sm text-muted-foreground\">{tc('loading')}</Text>\n ) : (\n <>\n <Card>\n <CardContent className=\"flex flex-col gap-section p-card\">\n <div className=\"flex flex-wrap items-center gap-element\">\n <span className=\"font-mono text-sm font-semibold\">{run.systemRef}</span>\n <span className=\"text-sm text-muted-foreground\">{tc(runKindLabelKey(run.kind))}</span>\n <AI_FlowNodeStatusBadge status={run.status} />\n </div>\n <dl className=\"grid grid-cols-[auto_1fr] gap-x-section gap-y-element text-sm\">\n {showOrganization ? (<><dt className=\"text-muted-foreground\">{tc('columnOrganization')}</dt><dd className=\"font-mono\">{run.organizationId}</dd></>) : null}\n {run.caseRef ? (<><dt className=\"text-muted-foreground\">{tc('columnCase')}</dt><dd className=\"font-mono\">{run.caseRef.resourceId}</dd></>) : null}\n <dt className=\"text-muted-foreground\">{tc('columnStarted')}</dt>\n <dd>{formatDateTime(run.createdAt)}</dd>\n <dt className=\"text-muted-foreground\">{tc('columnFinished')}</dt>\n <dd>{run.finishedAt ? formatDateTime(run.finishedAt) : tc('notFinished')}</dd>\n </dl>\n {history.length > 0 ? <AI_TaskTimeline events={history} data-agent-activity-history /> : null}\n {outcomes.length > 0 ? (\n <section className=\"flex flex-col gap-element\" aria-label={tc('decisionsHeading')}>\n <h4 className=\"text-sm font-semibold\">{tc('decisionsHeading')}</h4>\n <ul className=\"flex flex-col gap-element text-sm\">\n {outcomes.map((change, index) => (\n <li key={`${change.timestamp}-${index}`} data-agent-activity-decision={change.decisionOutcome}>\n {tc('decisionEnded', { outcome: outcomeWord(change.decisionOutcome!), at: formatDateTime(change.timestamp) })}\n </li>\n ))}\n </ul>\n </section>\n ) : null}\n </CardContent>\n </Card>\n\n {run.flowRun && flow && counts ? (\n <section className=\"flex flex-col gap-element\" aria-label={tc('flowStepsHeading')} data-agent-activity-flow>\n <h4 className=\"text-sm font-semibold\">{tc('flowStepsHeading')}</h4>\n <AI_FlowExecutionSummary\n totalSteps={counts.total}\n completedSteps={counts.completed}\n failedSteps={counts.failed}\n status={run.status}\n startedAt={run.createdAt}\n {...(run.finishedAt ? { completedAt: run.finishedAt } : {})}\n />\n {flow.events.length > 0 ? <AI_FlowExecutionTimeline events={flow.events} /> : null}\n {flow.untimed > 0 ? <Text className=\"text-xs text-muted-foreground\">{tc('flowStepsUntimed', { count: flow.untimed })}</Text> : null}\n {/*\n * Why the run failed when no step did, as the run RECORDED it (`FlowRun_State.failure`): a value written for the\n * person reading the run, shown under a label, never a word this page derives from an identifier.\n */}\n {run.flowRun.failure ? (\n <Alert variant=\"destructive\" data-agent-activity-flow-failure>\n <AlertDescription>\n <span className=\"font-medium\">{tc('flowFailureLabel')}</span>{' '}\n <span className=\"font-mono text-xs\">{run.flowRun.failure}</span>\n </AlertDescription>\n </Alert>\n ) : null}\n </section>\n ) : null}\n\n <section className=\"flex flex-col gap-element\" aria-label={tc('tasksHeading')}>\n <h4 className=\"text-sm font-semibold\">{tc('tasksHeading')}</h4>\n {run.tasks.length === 0 ? (\n <Text className=\"text-sm text-muted-foreground\">{tc('noTasks')}</Text>\n ) : (\n run.tasks.map((task) => <AI_TaskDetail key={task.taskId} task={taskCardOf(task)} data-agent-activity-task={task.taskId} />)\n )}\n </section>\n </>\n )}\n </div>\n );\n}\n\ninterface AgentToAgentTaskSectionProps extends AgentActivityWords {\n /** The organization read; none (every organization and the application's own) on the application-wide page. */\n readonly organizationId: string | undefined;\n readonly showOrganization: boolean;\n}\n\n/**\n * The agent-to-agent tasks, newest first (#4024). Read on its own, after the runs were: the same admission answers both,\n * so it is shown only once the runs could be read, and it keeps its own paging.\n */\nfunction AgentToAgentTaskSection({ organizationId, showOrganization, tc, formatDateTime }: AgentToAgentTaskSectionProps): React.JSX.Element {\n const [held, setHeld] = useState<{ readonly organizationId: string | undefined; readonly tasks: AgentToAgentTask[]; readonly next?: AgentToAgentTaskPageCursor } | null>(null);\n const [readState, setReadState] = useState<AgentActivityReadState>(AgentActivityReadState.LOADING);\n const [moreLoading, setMoreLoading] = useState(false);\n const { word: stateWord, isReady: stateWordsReady } = useVocabularyWord(REMOTE_TASK_STATE_VOCABULARY);\n\n const readPage = useCallback((after: AgentToAgentTaskPageCursor | undefined) => getManualCallsHttpClient()\n .listAgentToAgentTasks({ ...(organizationId ? { organizationId } : {}), ...(after ? { after } : {}) }), [organizationId]);\n\n useEffect(() => {\n let cancelled = false;\n setReadState(AgentActivityReadState.LOADING);\n readPage(undefined)\n .then((page) => {\n if (cancelled) return;\n setHeld({ organizationId, tasks: page.tasks, ...(page.next ? { next: page.next } : {}) });\n setReadState(AgentActivityReadState.READY);\n })\n // A refusal is not rethrown: the interceptor already handed it to the global error handler (#3250).\n .catch((caught: unknown) => { if (!cancelled) setReadState(readStateOfFailure(caught)); });\n return () => { cancelled = true; };\n }, [readPage, organizationId]);\n\n const loadMore = useCallback(() => {\n if (!held?.next) return;\n setMoreLoading(true);\n readPage(held.next)\n .then((page) => setHeld((previous) => (previous && previous.organizationId === organizationId\n ? { organizationId, tasks: [...previous.tasks, ...page.tasks], ...(page.next ? { next: page.next } : {}) }\n : previous)))\n .catch((caught: unknown) => setReadState(readStateOfFailure(caught)))\n .finally(() => setMoreLoading(false));\n }, [held, readPage, organizationId]);\n\n // Only the tasks read for the organization selected NOW.\n const current = held && held.organizationId === organizationId ? held : null;\n\n return (\n <section className=\"flex flex-col gap-element\" aria-label={tc('agentToAgentHeading')} data-agent-activity-agent-to-agent>\n <h4 className=\"text-sm font-semibold\">{tc('agentToAgentHeading')}</h4>\n <Text className=\"text-sm text-muted-foreground\">{tc('agentToAgentDescription')}</Text>\n {readState === AgentActivityReadState.ACCESS_GRANT_REQUIRED ? (\n <Alert variant=\"warning\"><AlertDescription>{tc('errorAccessGrantRequired')}</AlertDescription></Alert>\n ) : readState === AgentActivityReadState.FAILED ? (\n <Alert variant=\"destructive\"><AlertDescription>{tc('agentToAgentError')}</AlertDescription></Alert>\n ) : readState === AgentActivityReadState.LOADING || !current || !stateWordsReady ? (\n <Text className=\"text-sm text-muted-foreground\">{tc('loading')}</Text>\n ) : current.tasks.length === 0 ? (\n <Text className=\"text-sm text-muted-foreground\">{tc('agentToAgentEmpty')}</Text>\n ) : (\n <>\n <Table>\n <TableHeader>\n <TableRow>\n <TableHead>{tc('columnDirection')}</TableHead>\n <TableHead>{tc('columnCounterpart')}</TableHead>\n {showOrganization ? <TableHead>{tc('columnOrganization')}</TableHead> : null}\n <TableHead>{tc('columnTaskState')}</TableHead>\n <TableHead>{tc('columnTaskStarted')}</TableHead>\n <TableHead>{tc('columnTaskEnded')}</TableHead>\n </TableRow>\n </TableHeader>\n <TableBody>\n {current.tasks.map((task) => (\n <TableRow key={`${task.source}:${task.taskId}`} data-agent-to-agent-task={task.taskId} data-agent-to-agent-direction={task.direction}>\n <TableCell>{tc(directionLabelKey(task.direction))}</TableCell>\n <TableCell><AgentToAgentCounterpart task={task} tc={tc} /></TableCell>\n {showOrganization ? (\n <TableCell className=\"font-mono\">\n {task.organizationId ?? (task.source === AgentToAgentTaskSource.RECEIVED_BY_APPLICATION ? <span className=\"font-sans\">{tc('applicationOwnClient')}</span> : null)}\n </TableCell>\n ) : null}\n <TableCell>\n {task.direction === AgentToAgentTaskDirection.RECEIVED ? (\n <AI_FlowNodeStatusBadge status={task.status} />\n ) : task.state ? (\n <div className=\"flex flex-col\" data-agent-to-agent-state={task.state}>\n <span>{stateWord(task.state)}</span>\n {task.stateReportedAt ? <span className=\"text-xs text-muted-foreground\">{tc('stateReportedAt', { at: formatDateTime(task.stateReportedAt) })}</span> : null}\n </div>\n ) : (\n <span className=\"text-muted-foreground\">{tc('stateNotReported')}</span>\n )}\n </TableCell>\n <TableCell>{formatDateTime(task.startedAt)}</TableCell>\n <TableCell>{task.endedAt ? formatDateTime(task.endedAt) : <span className=\"text-muted-foreground\">{tc('taskNotEnded')}</span>}</TableCell>\n </TableRow>\n ))}\n </TableBody>\n </Table>\n {current.next ? (\n <div>\n <Button type=\"button\" variant={ButtonVariants_Variant.OUTLINE} size={ButtonSize.SM} onClick={loadMore} disabled={moreLoading} data-agent-to-agent-more>\n {moreLoading ? tc('loading') : tc('loadMoreTasks')}\n </Button>\n </div>\n ) : null}\n </>\n )}\n </section>\n );\n}\n\n/**\n * Who the other party is: a delegated task's remote agent by the name the application declares (its ref beside it, or\n * alone when no longer declared); a received task's client by the name its owner gave it, and which of this\n * application's agents it reached.\n */\nfunction AgentToAgentCounterpart({ task, tc }: { readonly task: AgentToAgentTask; readonly tc: AgentActivityWords['tc'] }): React.JSX.Element {\n if (task.direction === AgentToAgentTaskDirection.DELEGATED) {\n return (\n <div className=\"flex flex-col\">\n <span>{task.remoteAgentName ?? <span className=\"font-mono\">{task.remoteAgentRef}</span>}</span>\n {task.remoteAgentName ? <span className=\"font-mono text-xs text-muted-foreground\">{task.remoteAgentRef}</span> : null}\n </div>\n );\n }\n return (\n <div className=\"flex flex-col\">\n <span>{task.clientName ?? <span className=\"text-muted-foreground\">{tc('unknownClient')}</span>}</span>\n <span className=\"text-xs text-muted-foreground\">{task.agentRef ? tc('receivedByAgent', { agent: task.agentRef }) : tc('receivedByDefaultAgent')}</span>\n </div>\n );\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppPage_AgentActivitySettings.labels.d.ts","sourceRoot":"","sources":["../../../../src/components/settings/AppPage_AgentActivitySettings.labels.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,mBAAmB,EAEzB,MAAM,qCAAqC,CAAC;AAW7C,eAAO,MAAM,qCAAqC,EAAE,mBAAmB,EAqDtE,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { FrontendComponentType, LabelKind, registerComponentLabels, } from '@wildo-ai/presets-components-models';
|
|
2
|
+
// Companion-only label metadata for the Agent activity settings panel (#3990): keys + kind + per-key purpose. Statically
|
|
3
|
+
// scanned by the dev companion to generate the `components.APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS.*` bundle; NOT imported at
|
|
4
|
+
// runtime, so it never ships in the browser bundle. Keep in lock-step with the keys the component reads via
|
|
5
|
+
// `tComponent(APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS, ...)`.
|
|
6
|
+
//
|
|
7
|
+
// One word per `AgentActivityRunKind` member, as literal refs (the scan reads literals); `AppPage_AgentActivitySettings.test.tsx`
|
|
8
|
+
// holds that total, so a member added to the vocabulary fails until its word is written here. A run's status, a task's
|
|
9
|
+
// topic and a question's outcome are NOT here: their fields declare those vocabularies, and their words live under
|
|
10
|
+
// `system_enums`. The task cards and timelines bring their own words (the flows-actors components' bundles).
|
|
11
|
+
export const AppLayoutsAgentActivitySettingsLabels = [
|
|
12
|
+
{ ref: 'pageTitle', kind: LabelKind.HEADING, purpose: 'Heading of the page listing what the application\'s automated workflows and AI agent teams did in this organization: each run, what it worked on, and how it went' },
|
|
13
|
+
{ ref: 'pageDescription', kind: LabelKind.DESCRIPTION, purpose: 'One sentence under the heading: every run of the organization\'s automated workflows and agent teams, newest first; open one to see each step it took and each task, with when it happened. Conversations with an assistant are under Agent runs, not here' },
|
|
14
|
+
{ ref: 'applicationPageTitle', kind: LabelKind.HEADING, purpose: 'Heading of the same page for the application\'s operator, across every customer organization' },
|
|
15
|
+
{ ref: 'applicationPageDescription', kind: LabelKind.DESCRIPTION, purpose: 'One sentence under the operator\'s heading: the runs of every organization\'s automated workflows and agent teams, each naming the organization it worked for. Reading across organizations is recorded in the audit log' },
|
|
16
|
+
{ ref: 'columnSystem', kind: LabelKind.LABEL, purpose: 'Column heading: which workflow or agent team ran (its identifier, shown as is)' },
|
|
17
|
+
{ ref: 'columnKind', kind: LabelKind.LABEL, purpose: 'Column heading: what kind of run it was (a workflow, an agent team, or one the application no longer has)' },
|
|
18
|
+
{ ref: 'kind_flow', kind: LabelKind.LABEL, purpose: 'Kind of run: an automated workflow, a fixed sequence of steps the application declares' },
|
|
19
|
+
{ ref: 'kind_actor_system', kind: LabelKind.LABEL, purpose: 'Kind of run: a team of AI agents working together on a task' },
|
|
20
|
+
{ ref: 'kind_undeclared', kind: LabelKind.LABEL, purpose: 'Kind of run: a workflow or agent team the application no longer has; the run still happened and is shown' },
|
|
21
|
+
{ ref: 'columnStatus', kind: LabelKind.LABEL, purpose: 'Column heading: how the run stands (running, waiting for a person, completed, failed, cancelled)' },
|
|
22
|
+
{ ref: 'columnOrganization', kind: LabelKind.LABEL, purpose: 'Column heading on the operator\'s page: the customer organization the run worked for (its identifier)' },
|
|
23
|
+
{ ref: 'columnCase', kind: LabelKind.LABEL, purpose: 'Column heading: the record the run worked on, when it worked on one (its identifier)' },
|
|
24
|
+
{ ref: 'columnStarted', kind: LabelKind.LABEL, purpose: 'Column heading and detail label: when the run began' },
|
|
25
|
+
{ ref: 'columnFinished', kind: LabelKind.LABEL, purpose: 'Column heading and detail label: when the run ended' },
|
|
26
|
+
{ ref: 'columnActions', kind: LabelKind.LABEL, purpose: 'Hidden column heading read by screen readers, over the button that opens a run' },
|
|
27
|
+
{ ref: 'notFinished', kind: LabelKind.MESSAGE, purpose: 'Shown as the end time of a run that is still going or waiting for a person' },
|
|
28
|
+
{ ref: 'openRun', kind: LabelKind.BUTTON, purpose: 'Button on a run\'s row: open the run to see its steps and tasks' },
|
|
29
|
+
{ ref: 'loadMore', kind: LabelKind.BUTTON, purpose: 'Button under the list: show older runs' },
|
|
30
|
+
{ ref: 'backToRuns', kind: LabelKind.BUTTON, purpose: 'Button above an opened run: go back to the list of runs' },
|
|
31
|
+
{ ref: 'decisionsHeading', kind: LabelKind.HEADING, purpose: 'Heading of the list of the questions the run stopped to ask a person, and how each ended' },
|
|
32
|
+
{ ref: 'decisionEnded', kind: LabelKind.MESSAGE, purpose: 'One line per question the run asked a person: how it ended, and when. Who answered is not shown. Params: {outcome}, how it ended (approved, rejected, withdrawn…); {at}, the date and time', params: [{ key: 'outcome', meaning: 'How the question ended, already in words' }, { key: 'at', meaning: 'Date and time it ended' }] },
|
|
33
|
+
{ ref: 'flowStepsHeading', kind: LabelKind.HEADING, purpose: 'Heading of the steps an automated workflow went through in this run, each with when it happened' },
|
|
34
|
+
{ ref: 'flowStepsUntimed', kind: LabelKind.MESSAGE, purpose: 'Shown under a workflow\'s steps when some were recorded before the application kept the time of each step, so those steps have no time and are not in the timeline. Param: {count}, how many', params: [{ key: 'count', meaning: 'How many steps carry no time', isCount: true }] },
|
|
35
|
+
{ ref: 'flowFailureLabel', kind: LabelKind.LABEL, purpose: 'Label before the reason a workflow run failed when no single step failed (for example it found no way forward), shown as the run recorded it' },
|
|
36
|
+
{ ref: 'tasksHeading', kind: LabelKind.HEADING, purpose: 'Heading of the tasks of the run: what each agent or workflow was asked and what it produced' },
|
|
37
|
+
{ ref: 'noTasks', kind: LabelKind.EMPTY_STATE, purpose: 'Shown when the run has no task recorded' },
|
|
38
|
+
{ ref: 'loading', kind: LabelKind.MESSAGE, purpose: 'Shown while the runs, or one run, are being read' },
|
|
39
|
+
{ ref: 'noOrganization', kind: LabelKind.MESSAGE, purpose: 'Shown when no organization is selected, so there are no runs to show' },
|
|
40
|
+
{ ref: 'empty', kind: LabelKind.EMPTY_STATE, purpose: 'Shown when no workflow or agent team has run yet' },
|
|
41
|
+
{ ref: 'errorGeneric', kind: LabelKind.MESSAGE, purpose: 'Generic error shown when the runs could not be read' },
|
|
42
|
+
{ ref: 'errorRun', kind: LabelKind.MESSAGE, purpose: 'Error shown when the opened run could not be read (it may no longer exist)' },
|
|
43
|
+
// Agent-to-agent tasks (#4024): one word per `AgentToAgentTaskDirection` member, held total by the panel's test.
|
|
44
|
+
{ ref: 'agentToAgentHeading', kind: LabelKind.HEADING, purpose: 'Heading of the list of tasks this organization\'s AI agents handed to another company\'s AI agent, or took on from one' },
|
|
45
|
+
{ ref: 'agentToAgentDescription', kind: LabelKind.DESCRIPTION, purpose: 'One sentence under that heading: each task exchanged with another party\'s AI agent, newest first, with who the other party is, which way it went, how it stands and when it began and ended. What was asked and answered is not shown, and a task a single person started with their own connection is not listed' },
|
|
46
|
+
{ ref: 'direction_delegated', kind: LabelKind.LABEL, purpose: 'Which way a task went: this application\'s agent handed it to another party\'s agent' },
|
|
47
|
+
{ ref: 'direction_received', kind: LabelKind.LABEL, purpose: 'Which way a task went: another party\'s agent handed it to this application\'s agent' },
|
|
48
|
+
{ ref: 'columnDirection', kind: LabelKind.LABEL, purpose: 'Column heading: which way the task went (handed out or taken on)' },
|
|
49
|
+
{ ref: 'columnCounterpart', kind: LabelKind.LABEL, purpose: 'Column heading: the other party: the outside AI agent the task was handed to, or the connected client that handed it in' },
|
|
50
|
+
{ ref: 'columnTaskState', kind: LabelKind.LABEL, purpose: 'Column heading: how the task stands' },
|
|
51
|
+
{ ref: 'columnTaskStarted', kind: LabelKind.LABEL, purpose: 'Column heading: when the task began' },
|
|
52
|
+
{ ref: 'columnTaskEnded', kind: LabelKind.LABEL, purpose: 'Column heading: when the task ended' },
|
|
53
|
+
{ ref: 'taskNotEnded', kind: LabelKind.MESSAGE, purpose: 'Shown as the end time of a task that has not ended, or whose end the other party has not reported' },
|
|
54
|
+
{ ref: 'stateNotReported', kind: LabelKind.MESSAGE, purpose: 'Shown as the state of a task handed to another party\'s agent when that agent has not told the application how it stands' },
|
|
55
|
+
{ ref: 'stateReportedAt', kind: LabelKind.MESSAGE, purpose: 'Small line under the state of a task handed to another party\'s agent: when that agent reported this state (it may have moved since). Param: {at}, the date and time', params: [{ key: 'at', meaning: 'Date and time the state was reported' }] },
|
|
56
|
+
{ ref: 'unknownClient', kind: LabelKind.MESSAGE, purpose: 'Shown instead of the client\'s name when this organization has no connected client of that name on record: it was removed, or the task came through another company\'s client acting for this organization. Must not claim either one' },
|
|
57
|
+
{ ref: 'receivedByAgent', kind: LabelKind.MESSAGE, purpose: 'Small line under the other party on a task taken on: which of this application\'s agents received it. Param: {agent}, the agent\'s identifier', params: [{ key: 'agent', meaning: 'Identifier of this application\'s agent, shown as is' }] },
|
|
58
|
+
{ ref: 'receivedByDefaultAgent', kind: LabelKind.MESSAGE, purpose: 'Small line under the other party on a task taken on: it reached this application\'s main agent' },
|
|
59
|
+
{ ref: 'applicationOwnClient', kind: LabelKind.LABEL, purpose: 'Shown in the organization column on the operator\'s page for a task handed in by a client of the application itself, which belongs to no customer organization' },
|
|
60
|
+
{ ref: 'loadMoreTasks', kind: LabelKind.BUTTON, purpose: 'Button under the list of tasks exchanged with other parties\' agents: show older ones' },
|
|
61
|
+
{ ref: 'agentToAgentEmpty', kind: LabelKind.EMPTY_STATE, purpose: 'Shown when no task has been exchanged with another party\'s agent yet' },
|
|
62
|
+
{ ref: 'agentToAgentError', kind: LabelKind.MESSAGE, purpose: 'Error shown when the tasks exchanged with other parties\' agents could not be read' },
|
|
63
|
+
{ ref: 'errorAccessGrantRequired', kind: LabelKind.MESSAGE, purpose: 'Shown to the application\'s operator when reading runs across customer organizations needs an access window that a second administrator approves, because the application requires independent approval for reads across organizations; the window is requested under Access grants' },
|
|
64
|
+
];
|
|
65
|
+
registerComponentLabels(FrontendComponentType.APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS, AppLayoutsAgentActivitySettingsLabels);
|
|
66
|
+
//# sourceMappingURL=AppPage_AgentActivitySettings.labels.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppPage_AgentActivitySettings.labels.js","sourceRoot":"","sources":["../../../../src/components/settings/AppPage_AgentActivitySettings.labels.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,SAAS,EAET,uBAAuB,GACxB,MAAM,qCAAqC,CAAC;AAE7C,yHAAyH;AACzH,0HAA0H;AAC1H,4GAA4G;AAC5G,0DAA0D;AAC1D,EAAE;AACF,kIAAkI;AAClI,uHAAuH;A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AAO,EAAE,+IAA+I,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,sDAAsD,EAAE,CAAC,EAAE;IAC1S,EAAE,GAAG,EAAE,wBAAwB,EAAE,IAAI,EAAE,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,gGAAgG,EAAE;IACrK,EAAE,GAAG,EAAE,sBAAsB,EAAE,IAAI,EAAE,SAAS,CAAC,KAAK,EAAE,OAAO,EAAE,gKAAgK,EAAE;IACjO,EAAE,GAAG,EAAE,eAAe,EAAE,IAAI,EAAE,SAAS,CAAC,MAAM,EAAE,OAAO,EAAE,uFAAuF,EAAE;IAClJ,EAAE,GAAG,EAAE,mBAAmB,EAAE,IAAI,EAAE,SAAS,CAAC,WAAW,EAAE,OAAO,EAAE,uEAAuE,EAAE;IAC3I,EAAE,GAAG,EAAE,mBAAmB,EAAE,IAAI,EAAE,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,oFAAoF,EAAE;IACpJ,EAAE,GAAG,EAAE,0BAA0B,EAAE,IAAI,EAAE,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,qRAAqR,EAAE;CAC7V,CAAC;AAEF,uBAAuB,CAAC,qBAAqB,CAAC,mCAAmC,EAAE,qCAAqC,CAAC,CAAC","sourcesContent":["import {\n FrontendComponentType,\n LabelKind,\n type LabellingUnitaryDef,\n registerComponentLabels,\n} from '@wildo-ai/presets-components-models';\n\n// Companion-only label metadata for the Agent activity settings panel (#3990): keys + kind + per-key purpose. Statically\n// scanned by the dev companion to generate the `components.APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS.*` bundle; NOT imported at\n// runtime, so it never ships in the browser bundle. Keep in lock-step with the keys the component reads via\n// `tComponent(APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS, ...)`.\n//\n// One word per `AgentActivityRunKind` member, as literal refs (the scan reads literals); `AppPage_AgentActivitySettings.test.tsx`\n// holds that total, so a member added to the vocabulary fails until its word is written here. A run's status, a task's\n// topic and a question's outcome are NOT here: their fields declare those vocabularies, and their words live under\n// `system_enums`. The task cards and timelines bring their own words (the flows-actors components' bundles).\nexport const AppLayoutsAgentActivitySettingsLabels: LabellingUnitaryDef[] = [\n { ref: 'pageTitle', kind: LabelKind.HEADING, purpose: 'Heading of the page listing what the application\\'s automated workflows and AI agent teams did in this organization: each run, what it worked on, and how it went' },\n { ref: 'pageDescription', kind: LabelKind.DESCRIPTION, purpose: 'One sentence under the heading: every run of the organization\\'s automated workflows and agent teams, newest first; open one to see each step it took and each task, with when it happened. Conversations with an assistant are under Agent runs, not here' },\n { ref: 'applicationPageTitle', kind: LabelKind.HEADING, purpose: 'Heading of the same page for the application\\'s operator, across every customer organization' },\n { ref: 'applicationPageDescription', kind: LabelKind.DESCRIPTION, purpose: 'One sentence under the operator\\'s heading: the runs of every organization\\'s automated workflows and agent teams, each naming the organization it worked for. Reading across organizations is recorded in the audit log' },\n { ref: 'columnSystem', kind: LabelKind.LABEL, purpose: 'Column heading: which workflow or agent team ran (its identifier, shown as is)' },\n { ref: 'columnKind', kind: LabelKind.LABEL, purpose: 'Column heading: what kind of run it was (a workflow, an agent team, or one the application no longer has)' },\n { ref: 'kind_flow', kind: LabelKind.LABEL, purpose: 'Kind of run: an automated workflow, a fixed sequence of steps the application declares' },\n { ref: 'kind_actor_system', kind: LabelKind.LABEL, purpose: 'Kind of run: a team of AI agents working together on a task' },\n { ref: 'kind_undeclared', kind: LabelKind.LABEL, purpose: 'Kind of run: a workflow or agent team the application no longer has; the run still happened and is shown' },\n { ref: 'columnStatus', kind: LabelKind.LABEL, purpose: 'Column heading: how the run stands (running, waiting for a person, completed, failed, cancelled)' },\n { ref: 'columnOrganization', kind: LabelKind.LABEL, purpose: 'Column heading on the operator\\'s page: the customer organization the run worked for (its identifier)' },\n { ref: 'columnCase', kind: LabelKind.LABEL, purpose: 'Column heading: the record the run worked on, when it worked on one (its identifier)' },\n { ref: 'columnStarted', kind: LabelKind.LABEL, purpose: 'Column heading and detail label: when the run began' },\n { ref: 'columnFinished', kind: LabelKind.LABEL, purpose: 'Column heading and detail label: when the run ended' },\n { ref: 'columnActions', kind: LabelKind.LABEL, purpose: 'Hidden column heading read by screen readers, over the button that opens a run' },\n { ref: 'notFinished', kind: LabelKind.MESSAGE, purpose: 'Shown as the end time of a run that is still going or waiting for a person' },\n { ref: 'openRun', kind: LabelKind.BUTTON, purpose: 'Button on a run\\'s row: open the run to see its steps and tasks' },\n { ref: 'loadMore', kind: LabelKind.BUTTON, purpose: 'Button under the list: show older runs' },\n { ref: 'backToRuns', kind: LabelKind.BUTTON, purpose: 'Button above an opened run: go back to the list of runs' },\n { ref: 'decisionsHeading', kind: LabelKind.HEADING, purpose: 'Heading of the list of the questions the run stopped to ask a person, and how each ended' },\n { ref: 'decisionEnded', kind: LabelKind.MESSAGE, purpose: 'One line per question the run asked a person: how it ended, and when. Who answered is not shown. Params: {outcome}, how it ended (approved, rejected, withdrawn…); {at}, the date and time', params: [{ key: 'outcome', meaning: 'How the question ended, already in words' }, { key: 'at', meaning: 'Date and time it ended' }] },\n { ref: 'flowStepsHeading', kind: LabelKind.HEADING, purpose: 'Heading of the steps an automated workflow went through in this run, each with when it happened' },\n { ref: 'flowStepsUntimed', kind: LabelKind.MESSAGE, purpose: 'Shown under a workflow\\'s steps when some were recorded before the application kept the time of each step, so those steps have no time and are not in the timeline. Param: {count}, how many', params: [{ key: 'count', meaning: 'How many steps carry no time', isCount: true }] },\n { ref: 'flowFailureLabel', kind: LabelKind.LABEL, purpose: 'Label before the reason a workflow run failed when no single step failed (for example it found no way forward), shown as the run recorded it' },\n { ref: 'tasksHeading', kind: LabelKind.HEADING, purpose: 'Heading of the tasks of the run: what each agent or workflow was asked and what it produced' },\n { ref: 'noTasks', kind: LabelKind.EMPTY_STATE, purpose: 'Shown when the run has no task recorded' },\n { ref: 'loading', kind: LabelKind.MESSAGE, purpose: 'Shown while the runs, or one run, are being read' },\n { ref: 'noOrganization', kind: LabelKind.MESSAGE, purpose: 'Shown when no organization is selected, so there are no runs to show' },\n { ref: 'empty', kind: LabelKind.EMPTY_STATE, purpose: 'Shown when no workflow or agent team has run yet' },\n { ref: 'errorGeneric', kind: LabelKind.MESSAGE, purpose: 'Generic error shown when the runs could not be read' },\n { ref: 'errorRun', kind: LabelKind.MESSAGE, purpose: 'Error shown when the opened run could not be read (it may no longer exist)' },\n // Agent-to-agent tasks (#4024): one word per `AgentToAgentTaskDirection` member, held total by the panel's test.\n { ref: 'agentToAgentHeading', kind: LabelKind.HEADING, purpose: 'Heading of the list of tasks this organization\\'s AI agents handed to another company\\'s AI agent, or took on from one' },\n { ref: 'agentToAgentDescription', kind: LabelKind.DESCRIPTION, purpose: 'One sentence under that heading: each task exchanged with another party\\'s AI agent, newest first, with who the other party is, which way it went, how it stands and when it began and ended. What was asked and answered is not shown, and a task a single person started with their own connection is not listed' },\n { ref: 'direction_delegated', kind: LabelKind.LABEL, purpose: 'Which way a task went: this application\\'s agent handed it to another party\\'s agent' },\n { ref: 'direction_received', kind: LabelKind.LABEL, purpose: 'Which way a task went: another party\\'s agent handed it to this application\\'s agent' },\n { ref: 'columnDirection', kind: LabelKind.LABEL, purpose: 'Column heading: which way the task went (handed out or taken on)' },\n { ref: 'columnCounterpart', kind: LabelKind.LABEL, purpose: 'Column heading: the other party: the outside AI agent the task was handed to, or the connected client that handed it in' },\n { ref: 'columnTaskState', kind: LabelKind.LABEL, purpose: 'Column heading: how the task stands' },\n { ref: 'columnTaskStarted', kind: LabelKind.LABEL, purpose: 'Column heading: when the task began' },\n { ref: 'columnTaskEnded', kind: LabelKind.LABEL, purpose: 'Column heading: when the task ended' },\n { ref: 'taskNotEnded', kind: LabelKind.MESSAGE, purpose: 'Shown as the end time of a task that has not ended, or whose end the other party has not reported' },\n { ref: 'stateNotReported', kind: LabelKind.MESSAGE, purpose: 'Shown as the state of a task handed to another party\\'s agent when that agent has not told the application how it stands' },\n { ref: 'stateReportedAt', kind: LabelKind.MESSAGE, purpose: 'Small line under the state of a task handed to another party\\'s agent: when that agent reported this state (it may have moved since). Param: {at}, the date and time', params: [{ key: 'at', meaning: 'Date and time the state was reported' }] },\n { ref: 'unknownClient', kind: LabelKind.MESSAGE, purpose: 'Shown instead of the client\\'s name when this organization has no connected client of that name on record: it was removed, or the task came through another company\\'s client acting for this organization. Must not claim either one' },\n { ref: 'receivedByAgent', kind: LabelKind.MESSAGE, purpose: 'Small line under the other party on a task taken on: which of this application\\'s agents received it. Param: {agent}, the agent\\'s identifier', params: [{ key: 'agent', meaning: 'Identifier of this application\\'s agent, shown as is' }] },\n { ref: 'receivedByDefaultAgent', kind: LabelKind.MESSAGE, purpose: 'Small line under the other party on a task taken on: it reached this application\\'s main agent' },\n { ref: 'applicationOwnClient', kind: LabelKind.LABEL, purpose: 'Shown in the organization column on the operator\\'s page for a task handed in by a client of the application itself, which belongs to no customer organization' },\n { ref: 'loadMoreTasks', kind: LabelKind.BUTTON, purpose: 'Button under the list of tasks exchanged with other parties\\' agents: show older ones' },\n { ref: 'agentToAgentEmpty', kind: LabelKind.EMPTY_STATE, purpose: 'Shown when no task has been exchanged with another party\\'s agent yet' },\n { ref: 'agentToAgentError', kind: LabelKind.MESSAGE, purpose: 'Error shown when the tasks exchanged with other parties\\' agents could not be read' },\n { ref: 'errorAccessGrantRequired', kind: LabelKind.MESSAGE, purpose: 'Shown to the application\\'s operator when reading runs across customer organizations needs an access window that a second administrator approves, because the application requires independent approval for reads across organizations; the window is requested under Access grants' },\n];\n\nregisterComponentLabels(FrontendComponentType.APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS, AppLayoutsAgentActivitySettingsLabels);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SettingsHub.d.ts","sourceRoot":"","sources":["../../../../src/components/settings/SettingsHub.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,KAAkD,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"SettingsHub.d.ts","sourceRoot":"","sources":["../../../../src/components/settings/SettingsHub.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,KAAkD,MAAM,OAAO,CAAC;AAyPvE,MAAM,WAAW,gBAAgB;IAC/B,iHAAiH;IACjH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,0FAA0F;IAC1F,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,WAAW,CAAC,EAAE,UAAU,EAAE,SAAS,EAAE,EAAE,gBAAgB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAyU1F"}
|
|
@@ -40,6 +40,7 @@ import { ExternalProvider_Connection_OwnerScope } from '@wildo-ai/external-conne
|
|
|
40
40
|
import { AppPage_ConnectedAccountsSettings } from './AppPage_ConnectedAccountsSettings.js';
|
|
41
41
|
import { AppPage_AgentWorkOverrideRateSettings } from './AppPage_AgentWorkOverrideRateSettings.js';
|
|
42
42
|
import { AppPage_AutonomousAgentsSettings } from './AppPage_AutonomousAgentsSettings.js';
|
|
43
|
+
import { AgentActivityScope, AppPage_AgentActivitySettings } from './AppPage_AgentActivitySettings.js';
|
|
43
44
|
import { AppPage_ModelCostBreakdownSettings, ModelCostBreakdownScope } from './AppPage_ModelCostBreakdownSettings.js';
|
|
44
45
|
import { AppPage_RepresentativeActivitySettings } from './AppPage_RepresentativeActivitySettings.js';
|
|
45
46
|
import { AppPage_AgentWorkEvaluationExportSettings } from './AppPage_AgentWorkEvaluationExportSettings.js';
|
|
@@ -119,6 +120,11 @@ function SettingsEnginePanel({ panelRef }) {
|
|
|
119
120
|
return _jsx(AppPage_AgentWorkOverrideRateSettings, {});
|
|
120
121
|
case SettingsPanelRef.AUTONOMOUS_AGENTS:
|
|
121
122
|
return _jsx(AppPage_AutonomousAgentsSettings, {});
|
|
123
|
+
case SettingsPanelRef.AGENT_ACTIVITY:
|
|
124
|
+
// Whose runs are passed EXPLICITLY at both sites, as for connected accounts above (#3990).
|
|
125
|
+
return _jsx(AppPage_AgentActivitySettings, { scope: AgentActivityScope.ORGANIZATION });
|
|
126
|
+
case SettingsPanelRef.APPLICATION_AGENT_ACTIVITY:
|
|
127
|
+
return _jsx(AppPage_AgentActivitySettings, { scope: AgentActivityScope.APPLICATION });
|
|
122
128
|
case SettingsPanelRef.MODEL_COST_BREAKDOWN:
|
|
123
129
|
// Whose cost is passed EXPLICITLY at both sites, as for connected accounts above.
|
|
124
130
|
return _jsx(AppPage_ModelCostBreakdownSettings, { scope: ModelCostBreakdownScope.APPLICATION });
|