@tutti-os/agent-gui 0.0.10 → 0.0.12
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/AgentMessageMarkdown-DeYPURtF.d.ts +7 -0
- package/dist/agent-conversation/index.d.ts +135 -0
- package/dist/agent-conversation/index.js +77 -0
- package/dist/agent-conversation/index.js.map +1 -0
- package/dist/agent-message-center/index.d.ts +45 -46
- package/dist/agent-message-center/index.js +1801 -1166
- package/dist/agent-message-center/index.js.map +1 -1
- package/dist/agentConversationVM-BtHYOTgv.d.ts +342 -0
- package/dist/app/renderer/agentactivity.css +233 -0
- package/dist/chunk-72YSPOHX.js +13290 -0
- package/dist/chunk-72YSPOHX.js.map +1 -0
- package/dist/{chunk-3D5VTIKP.js → chunk-IBIMGLCD.js} +1 -28
- package/dist/chunk-IBIMGLCD.js.map +1 -0
- package/dist/chunk-MKHDRIGN.js +71 -0
- package/dist/chunk-MKHDRIGN.js.map +1 -0
- package/dist/{chunk-EHLA6MSQ.js → chunk-PKCJR6GC.js} +10 -20
- package/dist/chunk-PKCJR6GC.js.map +1 -0
- package/dist/chunk-PONEQEJ5.js +2616 -0
- package/dist/chunk-PONEQEJ5.js.map +1 -0
- package/dist/chunk-TYGL25EL.js +30 -0
- package/dist/chunk-TYGL25EL.js.map +1 -0
- package/dist/chunk-XJ34OIEQ.js +18 -0
- package/dist/chunk-XJ34OIEQ.js.map +1 -0
- package/dist/{chunk-T6U7AB7F.js → chunk-Y3AQGWJA.js} +55 -3
- package/dist/chunk-Y3AQGWJA.js.map +1 -0
- package/dist/{chunk-CUQJ3VO3.js → chunk-Y5O7BVGU.js} +282 -2531
- package/dist/chunk-Y5O7BVGU.js.map +1 -0
- package/dist/i18n/index.d.ts +54 -2
- package/dist/i18n/index.js +1 -1
- package/dist/index.d.ts +11 -8
- package/dist/index.js +10179 -21761
- package/dist/index.js.map +1 -1
- package/dist/plan-decision-ops.d.ts +70 -0
- package/dist/plan-decision-ops.js +19 -0
- package/dist/plan-decision-ops.js.map +1 -0
- package/dist/workspace-agent-generated-files.d.ts +1 -1
- package/dist/workspace-agent-generated-files.js +5 -3
- package/dist/{workspaceAgentActivityListViewModel-Be4zm3nk.d.ts → workspaceAgentActivityListViewModel-BLLYGuFO.d.ts} +36 -2
- package/package.json +24 -10
- package/dist/chunk-3D5VTIKP.js.map +0 -1
- package/dist/chunk-CUQJ3VO3.js.map +0 -1
- package/dist/chunk-EHLA6MSQ.js.map +0 -1
- package/dist/chunk-T6U7AB7F.js.map +0 -1
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { A as AgentConversationPromptVM } from './agentConversationVM-BtHYOTgv.js';
|
|
2
|
+
import './workspaceAgentActivityListViewModel-BLLYGuFO.js';
|
|
3
|
+
import '@tutti-os/agent-activity-core';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Codex has no provider-driven exit-plan approval flow (unlike claude-code's
|
|
7
|
+
* ExitPlanMode tool): the official TUI offers a local "implement this plan?"
|
|
8
|
+
* prompt after a plan-mode turn completes and submits a literal coding
|
|
9
|
+
* message in default mode. This mirrors that contract for the GUI.
|
|
10
|
+
* See codex-rs/tui/src/chatwidget/plan_implementation.rs.
|
|
11
|
+
*/
|
|
12
|
+
declare const PLAN_IMPLEMENTATION_PROMPT = "Implement the plan.";
|
|
13
|
+
/** Action ids carried by the plan-implementation interactive prompt. */
|
|
14
|
+
declare const PLAN_IMPLEMENTATION_ACTION_IMPLEMENT = "implement";
|
|
15
|
+
declare const PLAN_IMPLEMENTATION_ACTION_FEEDBACK = "feedback";
|
|
16
|
+
declare const PLAN_IMPLEMENTATION_ACTION_SKIP = "skip";
|
|
17
|
+
/**
|
|
18
|
+
* Builds the plan-implementation interactive prompt VM for a plan turn so the
|
|
19
|
+
* controller and the message center surface the codex plan decision through
|
|
20
|
+
* the same `pendingInteractivePrompt` machinery as claude-code exit-plan.
|
|
21
|
+
*/
|
|
22
|
+
declare function planImplementationPromptFromPlanTurn(planTurnId: string, title: string): Extract<AgentConversationPromptVM, {
|
|
23
|
+
kind: "plan-implementation";
|
|
24
|
+
}>;
|
|
25
|
+
interface PlanTimelineItem {
|
|
26
|
+
turnId?: string | null;
|
|
27
|
+
occurredAtUnixMs?: number | null;
|
|
28
|
+
createdAtUnixMs?: number | null;
|
|
29
|
+
seq?: number | null;
|
|
30
|
+
payload?: Record<string, unknown> | null;
|
|
31
|
+
}
|
|
32
|
+
type PlanDecisionOp = {
|
|
33
|
+
type: "updateSettings";
|
|
34
|
+
settings: {
|
|
35
|
+
planMode: false;
|
|
36
|
+
};
|
|
37
|
+
} | {
|
|
38
|
+
type: "sendInput";
|
|
39
|
+
text: string;
|
|
40
|
+
} | {
|
|
41
|
+
type: "submitInteractive";
|
|
42
|
+
requestId: string;
|
|
43
|
+
action?: string;
|
|
44
|
+
optionId?: string;
|
|
45
|
+
payload?: Record<string, unknown>;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Single source of truth for what a plan decision DOES at the daemon level.
|
|
49
|
+
* Both the desktop service (submitPlanDecision) and the in-conversation
|
|
50
|
+
* controller (implementPlan) execute these ops with their own primitives;
|
|
51
|
+
* node-local UI side effects are layered on by the controller, not here.
|
|
52
|
+
*/
|
|
53
|
+
declare function planDecisionOps(input: {
|
|
54
|
+
promptKind: string;
|
|
55
|
+
action?: string;
|
|
56
|
+
optionId?: string;
|
|
57
|
+
payload?: Record<string, unknown>;
|
|
58
|
+
requestId: string;
|
|
59
|
+
}): PlanDecisionOp[];
|
|
60
|
+
/**
|
|
61
|
+
* Returns the turn id of the latest turn that produced a plan item, or null.
|
|
62
|
+
* Driven by the same timeline data that renders the plan card (no race with a
|
|
63
|
+
* separate status flag), keyed by turn id so a given plan is offered once and
|
|
64
|
+
* a fresh plan turn re-arms the offer. Mirrors the codex TUI gate
|
|
65
|
+
* (saw_plan_item_this_turn) but evaluated against the latest turn rather than
|
|
66
|
+
* a transient per-turn boolean.
|
|
67
|
+
*/
|
|
68
|
+
declare function latestPlanTurnId(timelineItems: readonly PlanTimelineItem[]): string | null;
|
|
69
|
+
|
|
70
|
+
export { PLAN_IMPLEMENTATION_ACTION_FEEDBACK, PLAN_IMPLEMENTATION_ACTION_IMPLEMENT, PLAN_IMPLEMENTATION_ACTION_SKIP, PLAN_IMPLEMENTATION_PROMPT, type PlanDecisionOp, latestPlanTurnId, planDecisionOps, planImplementationPromptFromPlanTurn };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
PLAN_IMPLEMENTATION_ACTION_FEEDBACK,
|
|
3
|
+
PLAN_IMPLEMENTATION_ACTION_IMPLEMENT,
|
|
4
|
+
PLAN_IMPLEMENTATION_ACTION_SKIP,
|
|
5
|
+
PLAN_IMPLEMENTATION_PROMPT,
|
|
6
|
+
latestPlanTurnId,
|
|
7
|
+
planDecisionOps,
|
|
8
|
+
planImplementationPromptFromPlanTurn
|
|
9
|
+
} from "./chunk-MKHDRIGN.js";
|
|
10
|
+
export {
|
|
11
|
+
PLAN_IMPLEMENTATION_ACTION_FEEDBACK,
|
|
12
|
+
PLAN_IMPLEMENTATION_ACTION_IMPLEMENT,
|
|
13
|
+
PLAN_IMPLEMENTATION_ACTION_SKIP,
|
|
14
|
+
PLAN_IMPLEMENTATION_PROMPT,
|
|
15
|
+
latestPlanTurnId,
|
|
16
|
+
planDecisionOps,
|
|
17
|
+
planImplementationPromptFromPlanTurn
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=plan-decision-ops.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { B as BuildWorkspaceAgentActivityListOptions, W as WorkspaceAgentActivityCard, m as WorkspaceAgentActivityListViewModel,
|
|
1
|
+
export { B as BuildWorkspaceAgentActivityListOptions, W as WorkspaceAgentActivityCard, m as WorkspaceAgentActivityListViewModel, o as WorkspaceAgentActivityStatus, q as WorkspaceAgentChangedFile, r as buildWorkspaceAgentActivityListViewModel, s as collectWorkspaceAgentGeneratedFiles, t as resolveWorkspaceAgentActivityStatus, u as resolveWorkspaceAgentActivityTitle, v as reuseWorkspaceAgentActivityListViewModelIfUnchanged, w as workspaceAgentProviderLabel } from './workspaceAgentActivityListViewModel-BLLYGuFO.js';
|
|
2
2
|
import '@tutti-os/agent-activity-core';
|
|
@@ -4,12 +4,14 @@ import {
|
|
|
4
4
|
resolveWorkspaceAgentActivityStatus,
|
|
5
5
|
resolveWorkspaceAgentActivityTitle,
|
|
6
6
|
reuseWorkspaceAgentActivityListViewModelIfUnchanged
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-PKCJR6GC.js";
|
|
8
|
+
import "./chunk-IBIMGLCD.js";
|
|
9
|
+
import "./chunk-XJ34OIEQ.js";
|
|
8
10
|
import {
|
|
9
11
|
workspaceAgentProviderLabel
|
|
10
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-TYGL25EL.js";
|
|
11
13
|
import "./chunk-GCBDIQDX.js";
|
|
12
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-Y3AQGWJA.js";
|
|
13
15
|
export {
|
|
14
16
|
buildWorkspaceAgentActivityListViewModel,
|
|
15
17
|
collectWorkspaceAgentGeneratedFiles,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AgentActivityMessage, AgentActivitySnapshot, AgentActivityPresence
|
|
1
|
+
import { AgentActivityMessage, AgentActivitySession, AgentActivitySnapshot, AgentActivityPresence } from '@tutti-os/agent-activity-core';
|
|
2
2
|
|
|
3
3
|
interface AgentHostManagedAgentsStateItem {
|
|
4
4
|
toolId: string;
|
|
@@ -236,6 +236,40 @@ interface WorkspaceAgentActivitySession extends Omit<AgentActivitySession, "prov
|
|
|
236
236
|
pinnedAtUnixMs?: number | null;
|
|
237
237
|
syncState?: WorkspaceAgentActivitySyncState;
|
|
238
238
|
}
|
|
239
|
+
interface WorkspaceAgentActivityFileChange {
|
|
240
|
+
path: string;
|
|
241
|
+
change?: "added" | "modified" | "deleted" | "moved" | string;
|
|
242
|
+
tools?: string[];
|
|
243
|
+
}
|
|
244
|
+
interface WorkspaceAgentActivityFileChanges {
|
|
245
|
+
coverage?: string;
|
|
246
|
+
files?: WorkspaceAgentActivityFileChange[];
|
|
247
|
+
}
|
|
248
|
+
interface WorkspaceAgentActivityTimelineItem {
|
|
249
|
+
id: number;
|
|
250
|
+
workspaceId?: string;
|
|
251
|
+
agentSessionId: string;
|
|
252
|
+
seq?: number;
|
|
253
|
+
turnId?: string;
|
|
254
|
+
eventSource?: string;
|
|
255
|
+
eventId: string;
|
|
256
|
+
actorType: string;
|
|
257
|
+
actorId: string;
|
|
258
|
+
itemType: "message" | "call" | "event" | "error" | "lifecycle" | string;
|
|
259
|
+
role?: string;
|
|
260
|
+
callType?: "tool" | "skill" | "subagent" | "approval" | "workflow" | string;
|
|
261
|
+
callId?: string;
|
|
262
|
+
name?: string;
|
|
263
|
+
status?: string | null;
|
|
264
|
+
content?: string;
|
|
265
|
+
payload?: Record<string, unknown> & {
|
|
266
|
+
content?: unknown;
|
|
267
|
+
text?: unknown;
|
|
268
|
+
fileChanges?: WorkspaceAgentActivityFileChanges;
|
|
269
|
+
};
|
|
270
|
+
occurredAtUnixMs?: number;
|
|
271
|
+
createdAtUnixMs?: number;
|
|
272
|
+
}
|
|
239
273
|
interface WorkspaceAgentActivityMessage extends Omit<AgentActivityMessage, "id" | "turnId" | "status"> {
|
|
240
274
|
id?: number;
|
|
241
275
|
turnId?: string | null;
|
|
@@ -306,4 +340,4 @@ declare function reuseWorkspaceAgentActivityListViewModelIfUnchanged(previous: W
|
|
|
306
340
|
declare function resolveWorkspaceAgentActivityStatus(session: WorkspaceAgentActivitySession): WorkspaceAgentActivityStatus;
|
|
307
341
|
declare function resolveWorkspaceAgentActivityTitle(session: WorkspaceAgentActivitySession, messages?: readonly WorkspaceAgentActivityMessage[]): string;
|
|
308
342
|
|
|
309
|
-
export { type AgentHostBatchUserInfoInput as A, type BuildWorkspaceAgentActivityListOptions as B, type WorkspaceAgentActivityCard as W, type AgentHostBatchUserInfoResult as a, type AgentHostDeleteWorkspaceAgentSessionInput as b, type AgentHostManagedAgentsState as c, type AgentHostRuntimeOpenclawGatewayWarmupResult as d, type AgentHostWorkspaceAgentListInput as e, type AgentHostWorkspaceAgentMessage as f, type AgentHostWorkspaceAgentSession as g, type AgentHostWorkspaceAgentSessionMessages as h, type AgentHostWorkspaceAgentSessionMessagesInput as i, type AgentHostWorkspaceAgentSessionSummary as j, type AgentHostWorkspaceAgentSessionSummaryInput as k, type AgentHostWorkspaceAgentSnapshot as l, type WorkspaceAgentActivityListViewModel as m, type
|
|
343
|
+
export { type AgentHostBatchUserInfoInput as A, type BuildWorkspaceAgentActivityListOptions as B, type ToolCallStatusKind as T, type WorkspaceAgentActivityCard as W, type AgentHostBatchUserInfoResult as a, type AgentHostDeleteWorkspaceAgentSessionInput as b, type AgentHostManagedAgentsState as c, type AgentHostRuntimeOpenclawGatewayWarmupResult as d, type AgentHostWorkspaceAgentListInput as e, type AgentHostWorkspaceAgentMessage as f, type AgentHostWorkspaceAgentSession as g, type AgentHostWorkspaceAgentSessionMessages as h, type AgentHostWorkspaceAgentSessionMessagesInput as i, type AgentHostWorkspaceAgentSessionSummary as j, type AgentHostWorkspaceAgentSessionSummaryInput as k, type AgentHostWorkspaceAgentSnapshot as l, type WorkspaceAgentActivityListViewModel as m, type WorkspaceAgentActivitySession as n, type WorkspaceAgentActivityStatus as o, type WorkspaceAgentActivityTimelineItem as p, type WorkspaceAgentChangedFile as q, buildWorkspaceAgentActivityListViewModel as r, collectWorkspaceAgentGeneratedFiles as s, resolveWorkspaceAgentActivityStatus as t, resolveWorkspaceAgentActivityTitle as u, reuseWorkspaceAgentActivityListViewModelIfUnchanged as v, workspaceAgentProviderLabel as w };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tutti-os/agent-gui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.12",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -13,6 +13,14 @@
|
|
|
13
13
|
"types": "./dist/agent-message-center/index.d.ts",
|
|
14
14
|
"import": "./dist/agent-message-center/index.js"
|
|
15
15
|
},
|
|
16
|
+
"./agent-conversation": {
|
|
17
|
+
"types": "./dist/agent-conversation/index.d.ts",
|
|
18
|
+
"import": "./dist/agent-conversation/index.js"
|
|
19
|
+
},
|
|
20
|
+
"./plan-decision-ops": {
|
|
21
|
+
"types": "./dist/plan-decision-ops.d.ts",
|
|
22
|
+
"import": "./dist/plan-decision-ops.js"
|
|
23
|
+
},
|
|
16
24
|
"./agent-rich-text-at-provider": {
|
|
17
25
|
"types": "./dist/agent-rich-text-at-provider.d.ts",
|
|
18
26
|
"import": "./dist/agent-rich-text-at-provider.js"
|
|
@@ -70,15 +78,15 @@
|
|
|
70
78
|
},
|
|
71
79
|
"dependencies": {
|
|
72
80
|
"@monaco-editor/react": "^4.7.0",
|
|
73
|
-
"@tutti-os/agent-activity-core": "0.0.
|
|
74
|
-
"@tutti-os/ui-i18n-runtime": "0.0.
|
|
75
|
-
"@tutti-os/ui-react-hooks": "0.0.
|
|
76
|
-
"@tutti-os/ui-system": "0.0.
|
|
77
|
-
"@tutti-os/workbench-surface": "0.0.
|
|
78
|
-
"@tutti-os/workspace-file-manager": "0.0.
|
|
79
|
-
"@tutti-os/workspace-file-reference": "0.0.
|
|
80
|
-
"@tutti-os/workspace-issue-manager": "0.0.
|
|
81
|
-
"@tutti-os/workspace-user-project": "0.0.
|
|
81
|
+
"@tutti-os/agent-activity-core": "0.0.12",
|
|
82
|
+
"@tutti-os/ui-i18n-runtime": "0.0.12",
|
|
83
|
+
"@tutti-os/ui-react-hooks": "0.0.12",
|
|
84
|
+
"@tutti-os/ui-system": "0.0.12",
|
|
85
|
+
"@tutti-os/workbench-surface": "0.0.12",
|
|
86
|
+
"@tutti-os/workspace-file-manager": "0.0.12",
|
|
87
|
+
"@tutti-os/workspace-file-reference": "0.0.12",
|
|
88
|
+
"@tutti-os/workspace-issue-manager": "0.0.12",
|
|
89
|
+
"@tutti-os/workspace-user-project": "0.0.12",
|
|
82
90
|
"@tanstack/react-virtual": "^3.13.12",
|
|
83
91
|
"@tiptap/core": "^3.11.1",
|
|
84
92
|
"@tiptap/pm": "^3.23.6",
|
|
@@ -129,6 +137,12 @@
|
|
|
129
137
|
"agent-message-center": [
|
|
130
138
|
"./dist/agent-message-center/index.d.ts"
|
|
131
139
|
],
|
|
140
|
+
"agent-conversation": [
|
|
141
|
+
"./dist/agent-conversation/index.d.ts"
|
|
142
|
+
],
|
|
143
|
+
"plan-decision-ops": [
|
|
144
|
+
"./dist/plan-decision-ops.d.ts"
|
|
145
|
+
],
|
|
132
146
|
"agent-rich-text-at-provider": [
|
|
133
147
|
"./dist/agent-rich-text-at-provider.d.ts"
|
|
134
148
|
],
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../shared/workspaceAgentProviderLabel.ts","../shared/workspaceAgentSessionSortTime.ts"],"sourcesContent":["export function workspaceAgentProviderLabel(provider: string): string {\n const normalized = provider.trim().toLowerCase();\n switch (normalized) {\n case \"codex\":\n return \"Codex\";\n case \"claude-code\":\n return \"Claude Code\";\n case \"gemini\":\n return \"Gemini\";\n case \"openclaw\":\n return \"OpenClaw\";\n case \"hermes\":\n return \"Hermes\";\n case \"nexight\":\n return \"Nexight\";\n case \"unknown\":\n return \"Unknown\";\n default:\n return titleCase(provider);\n }\n}\n\nfunction titleCase(value: string): string {\n return value\n .split(/[-_\\s]+/)\n .filter(Boolean)\n .map((part) => part.charAt(0).toUpperCase() + part.slice(1))\n .join(\" \");\n}\n","export interface WorkspaceAgentSessionSortTimeSession {\n createdAtUnixMs?: number;\n endedAtUnixMs?: number;\n id?: number;\n agentSessionId?: string;\n providerSessionId?: string | null;\n startedAtUnixMs?: number;\n updatedAtUnixMs?: number;\n}\n\nexport interface WorkspaceAgentSessionSortTimeMessage {\n agentSessionId?: string;\n occurredAtUnixMs?: number;\n role?: string;\n turnId?: string | null;\n}\n\nexport interface WorkspaceAgentSessionSortTimeContext {\n messages?: readonly WorkspaceAgentSessionSortTimeMessage[];\n}\n\nexport function resolveWorkspaceAgentSessionSortTimeUnixMs(\n session: WorkspaceAgentSessionSortTimeSession,\n context: WorkspaceAgentSessionSortTimeContext = {}\n): number {\n const hasSortContext = hasWorkspaceAgentSessionSortContext(context);\n const fallbackUpdatedAtUnixMs = hasSortContext\n ? null\n : positiveNumber(session.updatedAtUnixMs);\n return (\n latestUserTurnStartTimeUnixMs(session, context) ??\n positiveNumber(session.endedAtUnixMs) ??\n fallbackUpdatedAtUnixMs ??\n positiveNumber(session.startedAtUnixMs) ??\n positiveNumber(session.createdAtUnixMs) ??\n positiveNumber(session.id) ??\n 0\n );\n}\n\nfunction hasWorkspaceAgentSessionSortContext(\n context: WorkspaceAgentSessionSortTimeContext\n): boolean {\n return Boolean(context.messages?.length);\n}\n\nfunction latestUserTurnStartTimeUnixMs(\n session: WorkspaceAgentSessionSortTimeSession,\n context: WorkspaceAgentSessionSortTimeContext\n): number | null {\n const sessionIds = new Set(\n [session.agentSessionId, session.providerSessionId]\n .map((value) => value?.trim())\n .filter((value): value is string => Boolean(value))\n );\n const startsByTurnId = new Map<string, number>();\n for (const message of context.messages ?? []) {\n if (!matchesSession(message.agentSessionId, sessionIds)) {\n continue;\n }\n const turnId = message.turnId?.trim();\n if (!turnId) {\n continue;\n }\n const role = normalizeToken(message.role);\n if (role === \"user\") {\n const startedAtUnixMs = positiveNumber(message.occurredAtUnixMs);\n if (startedAtUnixMs !== null) {\n startsByTurnId.set(\n turnId,\n minNullable(startsByTurnId.get(turnId) ?? null, startedAtUnixMs)!\n );\n }\n }\n }\n let latest: number | null = null;\n for (const startedAtUnixMs of startsByTurnId.values()) {\n latest =\n latest === null ? startedAtUnixMs : Math.max(latest, startedAtUnixMs);\n }\n return latest;\n}\n\nfunction matchesSession(\n agentSessionId: string | undefined,\n sessionIds: ReadonlySet<string>\n): boolean {\n if (sessionIds.size === 0) {\n return true;\n }\n const normalized = agentSessionId?.trim();\n return Boolean(normalized && sessionIds.has(normalized));\n}\n\nfunction minNullable(left: number | null, right: number | null): number | null {\n if (left === null) {\n return right;\n }\n if (right === null) {\n return left;\n }\n return Math.min(left, right);\n}\n\nfunction normalizeToken(value: string | undefined): string {\n return value?.trim().toLowerCase() ?? \"\";\n}\n\nfunction positiveNumber(value: unknown): number | null {\n return typeof value === \"number\" && Number.isFinite(value) && value > 0\n ? value\n : null;\n}\n"],"mappings":";AAAO,SAAS,4BAA4B,UAA0B;AACpE,QAAM,aAAa,SAAS,KAAK,EAAE,YAAY;AAC/C,UAAQ,YAAY;AAAA,IAClB,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO,UAAU,QAAQ;AAAA,EAC7B;AACF;AAEA,SAAS,UAAU,OAAuB;AACxC,SAAO,MACJ,MAAM,SAAS,EACf,OAAO,OAAO,EACd,IAAI,CAAC,SAAS,KAAK,OAAO,CAAC,EAAE,YAAY,IAAI,KAAK,MAAM,CAAC,CAAC,EAC1D,KAAK,GAAG;AACb;;;ACPO,SAAS,2CACd,SACA,UAAgD,CAAC,GACzC;AACR,QAAM,iBAAiB,oCAAoC,OAAO;AAClE,QAAM,0BAA0B,iBAC5B,OACA,eAAe,QAAQ,eAAe;AAC1C,SACE,8BAA8B,SAAS,OAAO,KAC9C,eAAe,QAAQ,aAAa,KACpC,2BACA,eAAe,QAAQ,eAAe,KACtC,eAAe,QAAQ,eAAe,KACtC,eAAe,QAAQ,EAAE,KACzB;AAEJ;AAEA,SAAS,oCACP,SACS;AACT,SAAO,QAAQ,QAAQ,UAAU,MAAM;AACzC;AAEA,SAAS,8BACP,SACA,SACe;AACf,QAAM,aAAa,IAAI;AAAA,IACrB,CAAC,QAAQ,gBAAgB,QAAQ,iBAAiB,EAC/C,IAAI,CAAC,UAAU,OAAO,KAAK,CAAC,EAC5B,OAAO,CAAC,UAA2B,QAAQ,KAAK,CAAC;AAAA,EACtD;AACA,QAAM,iBAAiB,oBAAI,IAAoB;AAC/C,aAAW,WAAW,QAAQ,YAAY,CAAC,GAAG;AAC5C,QAAI,CAAC,eAAe,QAAQ,gBAAgB,UAAU,GAAG;AACvD;AAAA,IACF;AACA,UAAM,SAAS,QAAQ,QAAQ,KAAK;AACpC,QAAI,CAAC,QAAQ;AACX;AAAA,IACF;AACA,UAAM,OAAO,eAAe,QAAQ,IAAI;AACxC,QAAI,SAAS,QAAQ;AACnB,YAAM,kBAAkB,eAAe,QAAQ,gBAAgB;AAC/D,UAAI,oBAAoB,MAAM;AAC5B,uBAAe;AAAA,UACb;AAAA,UACA,YAAY,eAAe,IAAI,MAAM,KAAK,MAAM,eAAe;AAAA,QACjE;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACA,MAAI,SAAwB;AAC5B,aAAW,mBAAmB,eAAe,OAAO,GAAG;AACrD,aACE,WAAW,OAAO,kBAAkB,KAAK,IAAI,QAAQ,eAAe;AAAA,EACxE;AACA,SAAO;AACT;AAEA,SAAS,eACP,gBACA,YACS;AACT,MAAI,WAAW,SAAS,GAAG;AACzB,WAAO;AAAA,EACT;AACA,QAAM,aAAa,gBAAgB,KAAK;AACxC,SAAO,QAAQ,cAAc,WAAW,IAAI,UAAU,CAAC;AACzD;AAEA,SAAS,YAAY,MAAqB,OAAqC;AAC7E,MAAI,SAAS,MAAM;AACjB,WAAO;AAAA,EACT;AACA,MAAI,UAAU,MAAM;AAClB,WAAO;AAAA,EACT;AACA,SAAO,KAAK,IAAI,MAAM,KAAK;AAC7B;AAEA,SAAS,eAAe,OAAmC;AACzD,SAAO,OAAO,KAAK,EAAE,YAAY,KAAK;AACxC;AAEA,SAAS,eAAe,OAA+B;AACrD,SAAO,OAAO,UAAU,YAAY,OAAO,SAAS,KAAK,KAAK,QAAQ,IAClE,QACA;AACN;","names":[]}
|