@tutti-os/agent-gui 0.0.55 → 0.0.57
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/@-lined-14px-64O2KKB4.svg +3 -0
- package/dist/{AgentMentionSearchController-DzhWr0PN.d.ts → AgentMentionSearchController-Po0KQLcL.d.ts} +13 -1
- package/dist/agent-conversation/index.d.ts +3 -3
- package/dist/agent-conversation/index.js +6 -6
- package/dist/agent-message-center/index.d.ts +1 -1
- package/dist/agent-message-center/index.js +8 -8
- package/dist/{agentGuiNodeTypes-DCnsaqJr.d.ts → agentGuiNodeTypes-BRU6P22B.d.ts} +2 -1
- package/dist/app/renderer/agentactivity.css +48 -3
- package/dist/app/renderer/assets/icons/@-lined-14px.svg +3 -0
- package/dist/{chunk-ZFDO72FE.js → chunk-2VHP7KQ5.js} +16 -3
- package/dist/chunk-2VHP7KQ5.js.map +1 -0
- package/dist/{chunk-2XVECUTU.js → chunk-33LWYV6O.js} +33 -1
- package/dist/chunk-33LWYV6O.js.map +1 -0
- package/dist/{chunk-GBAQVKQN.js → chunk-DZ76JPCV.js} +104 -10
- package/dist/chunk-DZ76JPCV.js.map +1 -0
- package/dist/{chunk-PBHTLI3E.js → chunk-HFZOXSSQ.js} +2 -2
- package/dist/{chunk-7H4IH67L.js → chunk-IMZBRUP3.js} +13 -5
- package/dist/{chunk-7H4IH67L.js.map → chunk-IMZBRUP3.js.map} +1 -1
- package/dist/{chunk-6AXH2BOD.js → chunk-KOR6UVUJ.js} +5 -5
- package/dist/{chunk-NBTJEF3H.js → chunk-N37A5CJH.js} +140 -4
- package/dist/chunk-N37A5CJH.js.map +1 -0
- package/dist/{chunk-WMQN7SZC.js → chunk-QFHR527D.js} +2 -2
- package/dist/{chunk-BGZ2OSDQ.js → chunk-RGVVHF7Q.js} +2 -2
- package/dist/{chunk-GL54NRMB.js → chunk-S6PCOX3S.js} +40 -1
- package/dist/chunk-S6PCOX3S.js.map +1 -0
- package/dist/{chunk-CMOGPJ23.js → chunk-SZ7JGCS3.js} +2 -2
- package/dist/{chunk-H2YWXFYX.js → chunk-Z3AAQQFD.js} +2 -2
- package/dist/context-mention-palette/index.d.ts +2 -2
- package/dist/context-mention-palette/index.js +7 -7
- package/dist/i18n/index.d.ts +32 -0
- package/dist/i18n/index.js +2 -2
- package/dist/index.d.ts +49 -8
- package/dist/index.js +322 -75
- package/dist/index.js.map +1 -1
- package/dist/queued-prompt-runtime.d.ts +2 -2
- package/dist/{types-B2m7UcBb.d.ts → types-BsHvTjIZ.d.ts} +8 -1
- package/dist/workbench/contribution.d.ts +1 -1
- package/dist/workbench/index.d.ts +1 -1
- package/dist/workbench/index.js +3 -3
- package/dist/workbench/launch.d.ts +1 -1
- package/dist/workbench/providerCatalog.d.ts +1 -1
- package/dist/workbench/sessionTitle.d.ts +1 -1
- package/dist/workbench/sessionTitle.js +3 -3
- package/dist/workbench/state.d.ts +1 -1
- package/dist/workbench/types.d.ts +1 -1
- package/dist/workspace-agent-generated-files.js +3 -3
- package/dist/{workspaceLinkActions-C6POH38D.d.ts → workspaceLinkActions-Bjy_XfBm.d.ts} +8 -1
- package/package.json +14 -14
- package/dist/chunk-2XVECUTU.js.map +0 -1
- package/dist/chunk-GBAQVKQN.js.map +0 -1
- package/dist/chunk-GL54NRMB.js.map +0 -1
- package/dist/chunk-NBTJEF3H.js.map +0 -1
- package/dist/chunk-ZFDO72FE.js.map +0 -1
- /package/dist/{chunk-PBHTLI3E.js.map → chunk-HFZOXSSQ.js.map} +0 -0
- /package/dist/{chunk-6AXH2BOD.js.map → chunk-KOR6UVUJ.js.map} +0 -0
- /package/dist/{chunk-WMQN7SZC.js.map → chunk-QFHR527D.js.map} +0 -0
- /package/dist/{chunk-BGZ2OSDQ.js.map → chunk-RGVVHF7Q.js.map} +0 -0
- /package/dist/{chunk-CMOGPJ23.js.map → chunk-SZ7JGCS3.js.map} +0 -0
- /package/dist/{chunk-H2YWXFYX.js.map → chunk-Z3AAQQFD.js.map} +0 -0
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
formatAgentSessionMentionText,
|
|
5
5
|
normalizeAgentGUIProviderIdentity,
|
|
6
6
|
resolveAgentGUIExplicitConversationTitle
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-SZ7JGCS3.js";
|
|
8
8
|
|
|
9
9
|
// workbench/sessionTitle.ts
|
|
10
10
|
function formatAgentGuiSessionPlainTitle(title, options = {}) {
|
|
@@ -96,4 +96,4 @@ export {
|
|
|
96
96
|
formatAgentGuiConversationPlainTitle,
|
|
97
97
|
resolveAgentGuiWorkbenchSessionTitle
|
|
98
98
|
};
|
|
99
|
-
//# sourceMappingURL=chunk-
|
|
99
|
+
//# sourceMappingURL=chunk-RGVVHF7Q.js.map
|
|
@@ -13,6 +13,42 @@ import {
|
|
|
13
13
|
tuttiDocRoundedUrl
|
|
14
14
|
} from "./chunk-MTFSQWZ6.js";
|
|
15
15
|
|
|
16
|
+
// shared/agentCustomMentionKinds.ts
|
|
17
|
+
var registry = /* @__PURE__ */ new Map();
|
|
18
|
+
var RESERVED_AGENT_MENTION_PROVIDER_IDS = /* @__PURE__ */ new Set([
|
|
19
|
+
"agent-session",
|
|
20
|
+
"agent-target",
|
|
21
|
+
"custom",
|
|
22
|
+
"file",
|
|
23
|
+
"issue",
|
|
24
|
+
"session",
|
|
25
|
+
"task",
|
|
26
|
+
"workspace-app",
|
|
27
|
+
"workspace-app-factory",
|
|
28
|
+
"workspace-issue",
|
|
29
|
+
"workspace-reference"
|
|
30
|
+
]);
|
|
31
|
+
function registerAgentCustomMentionKind(definition) {
|
|
32
|
+
const kind = definition.kind.trim().toLowerCase();
|
|
33
|
+
if (!kind) {
|
|
34
|
+
throw new Error(
|
|
35
|
+
"[agent-gui] custom mention kind must be a non-empty provider id"
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
if (RESERVED_AGENT_MENTION_PROVIDER_IDS.has(kind)) {
|
|
39
|
+
throw new Error(
|
|
40
|
+
`[agent-gui] custom mention kind "${kind}" collides with a built-in provider id`
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
registry.set(kind, definition);
|
|
44
|
+
}
|
|
45
|
+
function getAgentCustomMentionKind(kind) {
|
|
46
|
+
return registry.get(kind.trim().toLowerCase());
|
|
47
|
+
}
|
|
48
|
+
function resetAgentCustomMentionKindsForTests() {
|
|
49
|
+
registry.clear();
|
|
50
|
+
}
|
|
51
|
+
|
|
16
52
|
// agentActivityRuntime.tsx
|
|
17
53
|
import {
|
|
18
54
|
createContext,
|
|
@@ -235,6 +271,9 @@ function managedAgentRoundedIconUrl(provider) {
|
|
|
235
271
|
}
|
|
236
272
|
|
|
237
273
|
export {
|
|
274
|
+
registerAgentCustomMentionKind,
|
|
275
|
+
getAgentCustomMentionKind,
|
|
276
|
+
resetAgentCustomMentionKindsForTests,
|
|
238
277
|
AgentActivityRuntimeProvider,
|
|
239
278
|
useAgentActivityRuntime,
|
|
240
279
|
useOptionalAgentActivityRuntime,
|
|
@@ -252,4 +291,4 @@ export {
|
|
|
252
291
|
MANAGED_AGENT_ICON_FALLBACK_URL,
|
|
253
292
|
managedAgentRoundedIconUrl
|
|
254
293
|
};
|
|
255
|
-
//# sourceMappingURL=chunk-
|
|
294
|
+
//# sourceMappingURL=chunk-S6PCOX3S.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../shared/agentCustomMentionKinds.ts","../agentActivityRuntime.tsx","../agentActivityHost.tsx","../host/agentHostApi.ts","../shared/managedAgentProviders.ts","../shared/managedAgentIcons.ts"],"sourcesContent":["import type { ReactNode } from \"react\";\n\n// 自定义 mention kind 注册表:让宿主(如 tsh)从外部注册 mention://<kind>/... 链接的\n// 解析与 composer 内 chip 渲染,包内不内置任何具体业务 kind。\n//\n// 管线接点:\n// - 解析:agentFileMentionExtension.parseMentionItemFromHref 命中注册 kind 时产出\n// AgentMentionCustomItem(展示字段由 present() 提取;href 是完整信息源,round-trip 无损)\n// - 渲染:AgentMentionNodeView 对 kind===\"custom\" 调 renderChip(),缺省用包内通用双行卡\n// - 点击:clickable 的 kind 经 resolveWorkspaceMentionLinkAction 上抛\n// open-custom-mention 链接动作(携带原始 href,宿主自行二次解析)\n//\n// 注册时机:宿主渲染进程 bootstrap(早于首个 composer 挂载);模块级单例,重复注册以\n// 后者为准(HMR 友好)。\n\nexport interface AgentCustomMentionIdentity {\n entityId: string;\n label: string;\n scope?: Readonly<Record<string, string>>;\n}\n\nexport interface AgentCustomMentionPresentation {\n /** chip 第一行(缺省用链接 label)。 */\n name: string;\n /** chip 第二行(可选,通用双行卡的次要文案)。 */\n summary?: string;\n /** 所属 workspace(可选;custom kind 的 scope 键由注册方约定)。 */\n workspaceId?: string;\n}\n\nexport interface AgentCustomMentionChipContext {\n href: string;\n name: string;\n summary?: string;\n isEditable: boolean;\n /** 可编辑态的移除按钮,由 NodeView 注入;自定义渲染需自行摆放。 */\n removeAction?: ReactNode;\n}\n\nexport interface AgentCustomMentionKindDefinition {\n /** mention://<kind>/... 的 providerId(URL hostname,小写)。 */\n kind: string;\n /**\n * 从 canonical mention 链接提取展示字段;返回 null 表示链接无效,\n * 退化为普通链接/字面文本。\n */\n present(\n mention: AgentCustomMentionIdentity,\n href: string\n ): AgentCustomMentionPresentation | null;\n /** 自定义 chip 渲染;缺省用包内通用双行卡(name + summary)。 */\n renderChip?(context: AgentCustomMentionChipContext): ReactNode;\n /** 点击是否上抛 open-custom-mention 链接动作;缺省 false(chip 只展示)。 */\n clickable?: boolean;\n}\n\nconst registry = new Map<string, AgentCustomMentionKindDefinition>();\n\n// 包内管线已内置处理的 providerId(agentFileMentionExtension /\n// resolveWorkspaceMentionLinkAction),以及宿主侧沿用的 legacy 短名与内部 kind。\n// 注册表查找在部分链路先于内置分支执行,若放行同名注册会静默劫持内置 mention\n// 的解析——注册发生在宿主 bootstrap,直接抛错 fail-fast。\nconst RESERVED_AGENT_MENTION_PROVIDER_IDS = new Set([\n \"agent-session\",\n \"agent-target\",\n \"custom\",\n \"file\",\n \"issue\",\n \"session\",\n \"task\",\n \"workspace-app\",\n \"workspace-app-factory\",\n \"workspace-issue\",\n \"workspace-reference\"\n]);\n\nexport function registerAgentCustomMentionKind(\n definition: AgentCustomMentionKindDefinition\n): void {\n const kind = definition.kind.trim().toLowerCase();\n if (!kind) {\n throw new Error(\n \"[agent-gui] custom mention kind must be a non-empty provider id\"\n );\n }\n if (RESERVED_AGENT_MENTION_PROVIDER_IDS.has(kind)) {\n throw new Error(\n `[agent-gui] custom mention kind \"${kind}\" collides with a built-in provider id`\n );\n }\n registry.set(kind, definition);\n}\n\nexport function getAgentCustomMentionKind(\n kind: string\n): AgentCustomMentionKindDefinition | undefined {\n return registry.get(kind.trim().toLowerCase());\n}\n\nexport function resetAgentCustomMentionKindsForTests(): void {\n registry.clear();\n}\n","import {\n createContext,\n useContext,\n useSyncExternalStore,\n type JSX,\n type PropsWithChildren\n} from \"react\";\nimport type {\n AgentActivityCancelSessionInput,\n AgentActivityCancelSessionResult,\n AgentActivityCreateSessionInput,\n AgentActivityDeleteSessionInput,\n AgentActivityDeleteSessionResult,\n AgentActivityMessageOrder,\n AgentActivityMessagePage,\n AgentActivitySendInput,\n AgentActivitySendInputResult,\n AgentActivitySession,\n AgentActivitySnapshot,\n AgentActivitySnapshotListener,\n AgentActivitySubmitInteractiveInput\n} from \"@tutti-os/agent-activity-core\";\nimport type {\n AgentHostAgentSessionComposerSettings,\n AgentHostActivateAgentSessionResult,\n AgentHostRuntimeOpenclawGatewayWarmupResult,\n AgentHostUpdateAgentSessionSettingsResult,\n AgentHostUnactivateAgentSessionResult,\n AgentHostAgentSessionState\n} from \"./shared/contracts/dto\";\nimport type { AgentGUIProviderTargetRef } from \"./types\";\n\nexport interface AgentActivityRuntimeListSessionMessagesInput {\n afterVersion?: number;\n beforeVersion?: number;\n cache?: boolean;\n agentSessionId: string;\n limit?: number;\n order?: AgentActivityMessageOrder;\n signal?: AbortSignal;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeListGeneratedFilesInput {\n limit?: number;\n query?: string;\n sessionCwd?: string;\n signal?: AbortSignal;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeGeneratedFile {\n label: string;\n path: string;\n}\n\nexport interface AgentActivityRuntimeGeneratedFileList {\n entries: AgentActivityRuntimeGeneratedFile[];\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeEnsureSessionSynchronizedInput {\n afterVersion?: number;\n agentSessionId: string;\n onError?: (error: unknown) => void;\n workspaceId: string;\n}\n\nexport type AgentActivityRuntimeRetainSessionEventsInput =\n AgentActivityRuntimeEnsureSessionSynchronizedInput;\n\nexport interface AgentActivityRuntimeSetSessionPinnedInput {\n agentSessionId: string;\n pinned: boolean;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeTrackSettingsProjectChangeInput {\n action: \"clear\" | \"create_new\" | \"select_existing\";\n agentSessionId: string;\n provider?: string | null;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeGetSessionControlStateInput {\n agentSessionId: string;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeGetComposerOptionsInput {\n agentTargetId?: string | null;\n cwd?: string | null;\n force?: boolean;\n provider?: string;\n settings?: AgentHostAgentSessionComposerSettings | null;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeUpdateSessionSettingsInput {\n agentSessionId: string;\n settings: AgentHostAgentSessionComposerSettings;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeTrackDraftComposerSettingsChangeInput {\n nextSettings: AgentHostAgentSessionComposerSettings;\n previousSettings: AgentHostAgentSessionComposerSettings;\n provider: string;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeWarmupOpenclawGatewayInput {\n workspaceId?: string | null;\n}\n\nexport interface AgentActivityRuntimeDiagnosticInput {\n details?: Record<string, unknown>;\n event: string;\n level?: \"debug\" | \"info\" | \"warn\" | \"error\";\n source?: string;\n workspaceId?: string | null;\n}\n\nexport interface AgentActivityRuntimeActivateSessionInput {\n agentSessionId: string;\n agentTargetId?: string | null;\n cwd?: string;\n initialContent?: AgentActivitySendInput[\"content\"];\n /** 仅展示用首轮文本(bundle 折叠成一个 chip);initialContent 仍带展开后的文件。 */\n initialDisplayPrompt?: string | null;\n metadata?: Record<string, unknown>;\n mode: \"existing\" | \"new\";\n openclawGatewayReady?: boolean;\n provider?: string;\n /**\n * Opaque host-owned target reference. AgentGUI passes this through only; hosts\n * must not treat it as authority and must re-authenticate before launch.\n */\n providerTargetRef?: AgentGUIProviderTargetRef | null;\n settings?: AgentHostAgentSessionComposerSettings;\n title?: string;\n visible?: boolean;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeUnactivateSessionInput {\n agentSessionId: string;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeReadSessionAttachmentInput {\n agentSessionId: string;\n attachmentId: string;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeReadPromptAssetInput {\n agentSessionId?: string | null;\n assetId?: string | null;\n hostPath?: string | null;\n kind?: string | null;\n mimeType: string;\n name?: string | null;\n path?: string | null;\n sha256?: string | null;\n uploadStatus?: string | null;\n uri?: string | null;\n workspaceId: string;\n}\n\nexport type AgentActivityRuntimePromptContentBlock =\n AgentActivitySendInput[\"content\"][number] & {\n assetId?: string;\n hostPath?: string;\n kind?: string;\n path?: string;\n sizeBytes?: number;\n uploadStatus?: string;\n uri?: string;\n };\n\nexport interface AgentActivityRuntimeUploadPromptContentInput {\n content: AgentActivityRuntimePromptContentBlock[];\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeUploadPromptContentResult {\n content: AgentActivityRuntimePromptContentBlock[];\n}\n\nexport interface AgentActivityRuntimeSessionAttachment {\n attachmentId: string;\n mimeType: string;\n name?: string;\n data: string;\n}\n\nexport interface AgentActivityRuntimePromptAsset {\n assetId?: string;\n hostPath?: string;\n kind?: string;\n mimeType: string;\n name?: string;\n path: string;\n uploadStatus?: string;\n uri?: string;\n data: string;\n}\n\nexport interface AgentActivityRuntime {\n promptContentUploadSupport?: {\n file?: boolean;\n image?: boolean;\n };\n cancelSession(\n input: AgentActivityCancelSessionInput\n ): Promise<AgentActivityCancelSessionResult>;\n createSession(\n input: AgentActivityCreateSessionInput\n ): Promise<AgentActivitySession>;\n deleteSession(\n input: AgentActivityDeleteSessionInput\n ): Promise<AgentActivityDeleteSessionResult>;\n activateSession(\n input: AgentActivityRuntimeActivateSessionInput\n ): Promise<AgentHostActivateAgentSessionResult>;\n getSession(\n workspaceId: string,\n agentSessionId: string\n ): Promise<AgentActivitySession>;\n getComposerOptions(\n input: AgentActivityRuntimeGetComposerOptionsInput\n ): Promise<unknown>;\n updateSessionSettings(\n input: AgentActivityRuntimeUpdateSessionSettingsInput\n ): Promise<AgentHostUpdateAgentSessionSettingsResult>;\n warmupOpenclawGateway?(\n input?: AgentActivityRuntimeWarmupOpenclawGatewayInput\n ): Promise<AgentHostRuntimeOpenclawGatewayWarmupResult>;\n getSessionControlState(\n input: AgentActivityRuntimeGetSessionControlStateInput\n ): Promise<AgentHostAgentSessionState>;\n getSnapshot(workspaceId: string): AgentActivitySnapshot;\n listSessionMessages(\n input: AgentActivityRuntimeListSessionMessagesInput\n ): Promise<AgentActivityMessagePage>;\n listAgentGeneratedFiles?(\n input: AgentActivityRuntimeListGeneratedFilesInput\n ): Promise<AgentActivityRuntimeGeneratedFileList>;\n load(\n workspaceId: string,\n signal?: AbortSignal\n ): Promise<AgentActivitySnapshot>;\n ensureSessionSynchronized?(\n input: AgentActivityRuntimeEnsureSessionSynchronizedInput\n ): () => void;\n /** @deprecated Use ensureSessionSynchronized. */\n retainSessionEvents(\n input: AgentActivityRuntimeRetainSessionEventsInput\n ): () => void;\n sendInput(\n input: AgentActivitySendInput\n ): Promise<AgentActivitySendInputResult>;\n uploadPromptContent?(\n input: AgentActivityRuntimeUploadPromptContentInput\n ): Promise<AgentActivityRuntimeUploadPromptContentResult>;\n readSessionAttachment?(\n input: AgentActivityRuntimeReadSessionAttachmentInput\n ): Promise<AgentActivityRuntimeSessionAttachment>;\n readPromptAsset?(\n input: AgentActivityRuntimeReadPromptAssetInput\n ): Promise<AgentActivityRuntimePromptAsset>;\n setSessionPinned(\n input: AgentActivityRuntimeSetSessionPinnedInput\n ): Promise<AgentActivitySession>;\n trackSettingsProjectChange?(\n input: AgentActivityRuntimeTrackSettingsProjectChangeInput\n ): Promise<void>;\n trackDraftComposerSettingsChange?(\n input: AgentActivityRuntimeTrackDraftComposerSettingsChangeInput\n ): Promise<void>;\n reportDiagnostic?(\n input: AgentActivityRuntimeDiagnosticInput\n ): Promise<void> | void;\n unactivateSession(\n input: AgentActivityRuntimeUnactivateSessionInput\n ): Promise<AgentHostUnactivateAgentSessionResult>;\n submitInteractive(\n input: AgentActivitySubmitInteractiveInput\n ): Promise<unknown>;\n subscribeSessionEvents(\n workspaceId: string,\n listener: (event: unknown) => void\n ): () => void;\n subscribe(\n workspaceId: string,\n listener: AgentActivitySnapshotListener\n ): () => void;\n}\n\nconst AgentActivityRuntimeContext = createContext<AgentActivityRuntime | null>(\n null\n);\n\nlet currentAgentActivityRuntime: AgentActivityRuntime | null = null;\n\nexport interface AgentActivityRuntimeProviderProps extends PropsWithChildren {\n runtime?: AgentActivityRuntime | null;\n}\n\nexport function AgentActivityRuntimeProvider({\n children,\n runtime\n}: AgentActivityRuntimeProviderProps): JSX.Element {\n currentAgentActivityRuntime = runtime ?? null;\n return (\n <AgentActivityRuntimeContext.Provider value={runtime ?? null}>\n {children}\n </AgentActivityRuntimeContext.Provider>\n );\n}\n\nexport function useAgentActivityRuntime(): AgentActivityRuntime {\n const runtime =\n useContext(AgentActivityRuntimeContext) ?? getTestAgentActivityRuntime();\n if (!runtime) {\n throw new Error(\n \"AgentActivityRuntimeProvider is missing an AgentActivityRuntime instance.\"\n );\n }\n return runtime;\n}\n\nexport function useOptionalAgentActivityRuntime(): AgentActivityRuntime | null {\n return (\n useContext(AgentActivityRuntimeContext) ?? getTestAgentActivityRuntime()\n );\n}\n\nexport function useAgentActivitySnapshot(\n workspaceId: string\n): AgentActivitySnapshot {\n const runtime = useAgentActivityRuntime();\n const normalizedWorkspaceId = workspaceId.trim();\n return useSyncExternalStore(\n (listener) => runtime.subscribe(normalizedWorkspaceId, listener),\n () => runtime.getSnapshot(normalizedWorkspaceId),\n () => runtime.getSnapshot(normalizedWorkspaceId)\n );\n}\n\nexport function getAgentActivityRuntime(): AgentActivityRuntime {\n const runtime =\n getExplicitWindowTestAgentActivityRuntime() ??\n currentAgentActivityRuntime ??\n getTestAgentActivityRuntime();\n if (!runtime) {\n throw new Error(\n \"AgentActivityRuntimeProvider is missing an AgentActivityRuntime instance.\"\n );\n }\n return runtime;\n}\n\nexport function getOptionalAgentActivityRuntime(): AgentActivityRuntime | null {\n return (\n getExplicitWindowTestAgentActivityRuntime() ??\n currentAgentActivityRuntime ??\n getTestAgentActivityRuntime()\n );\n}\n\nexport function resetAgentActivityRuntimeForTests(): void {\n if (process.env.NODE_ENV === \"test\") {\n currentAgentActivityRuntime = null;\n }\n}\n\nexport function setAgentActivityRuntimeForTests(\n runtime: AgentActivityRuntime | null\n): void {\n if (process.env.NODE_ENV === \"test\") {\n currentAgentActivityRuntime = runtime;\n }\n}\n\nfunction getTestAgentActivityRuntime(): AgentActivityRuntime | null {\n if (process.env.NODE_ENV !== \"test\") {\n return null;\n }\n if (typeof window === \"undefined\") {\n return null;\n }\n const explicitRuntime = getExplicitWindowTestAgentActivityRuntime();\n if (explicitRuntime) {\n return explicitRuntime;\n }\n if (currentAgentActivityRuntime) {\n return currentAgentActivityRuntime;\n }\n const testRuntime = (\n window as unknown as Window & {\n agentActivityRuntime?: AgentActivityRuntime;\n }\n ).agentActivityRuntime;\n return testRuntime ?? null;\n}\n\nfunction getExplicitWindowTestAgentActivityRuntime(): AgentActivityRuntime | null {\n if (process.env.NODE_ENV !== \"test\" || typeof window === \"undefined\") {\n return null;\n }\n const testDescriptor = Object.getOwnPropertyDescriptor(\n window,\n \"agentActivityRuntime\"\n );\n if (!testDescriptor || !(\"value\" in testDescriptor)) {\n return null;\n }\n return (testDescriptor.value as AgentActivityRuntime | undefined) ?? null;\n}\n","import {\n createContext,\n useContext,\n useMemo,\n type JSX,\n type PropsWithChildren\n} from \"react\";\nimport {\n toAgentHostRuntimeApi,\n type AgentHostInputApi,\n type AgentHostRuntimeApi\n} from \"./host/agentHostApi\";\nimport {\n AgentActivityRuntimeProvider,\n type AgentActivityRuntime\n} from \"./agentActivityRuntime\";\n\nconst AgentActivityHostContext = createContext<AgentHostRuntimeApi | null>(\n null\n);\n\nlet currentAgentHostApi: AgentHostRuntimeApi | null = null;\n\nexport interface AgentActivityHostProviderProps extends PropsWithChildren {\n agentActivityRuntime?: AgentActivityRuntime | null;\n agentHostApi?: AgentHostInputApi | null;\n}\n\nexport function AgentActivityHostProvider({\n agentActivityRuntime,\n agentHostApi,\n children\n}: AgentActivityHostProviderProps): JSX.Element {\n const resolvedAgentHostApi = useMemo(\n () => (agentHostApi ? toAgentHostRuntimeApi(agentHostApi) : null),\n [agentHostApi]\n );\n currentAgentHostApi = resolvedAgentHostApi;\n return (\n <AgentActivityRuntimeProvider runtime={agentActivityRuntime}>\n <AgentActivityHostContext.Provider value={resolvedAgentHostApi}>\n {children}\n </AgentActivityHostContext.Provider>\n </AgentActivityRuntimeProvider>\n );\n}\n\nexport function useAgentHostApi(): AgentHostRuntimeApi {\n const agentHostApi =\n useContext(AgentActivityHostContext) ?? getTestAgentHostApi();\n if (!agentHostApi) {\n throw new Error(\n \"AgentActivityHostProvider is missing an agentHostApi instance.\"\n );\n }\n return agentHostApi;\n}\n\nexport function useOptionalAgentHostApi(): AgentHostRuntimeApi | null {\n return useContext(AgentActivityHostContext) ?? getTestAgentHostApi();\n}\n\nexport function getAgentHostApi(): AgentHostRuntimeApi {\n const agentHostApi =\n getExplicitWindowTestAgentHostApi() ??\n currentAgentHostApi ??\n getTestAgentHostApi();\n if (!agentHostApi) {\n throw new Error(\n \"AgentActivityHostProvider is missing an agentHostApi instance.\"\n );\n }\n return agentHostApi;\n}\n\nexport function getOptionalAgentHostApi(): AgentHostRuntimeApi | null {\n return (\n getExplicitWindowTestAgentHostApi() ??\n currentAgentHostApi ??\n getTestAgentHostApi()\n );\n}\n\nexport function resetAgentHostApiForTests(): void {\n if (process.env.NODE_ENV === \"test\") {\n currentAgentHostApi = null;\n }\n}\n\nexport function setAgentHostApiForTests(\n agentHostApi: AgentHostInputApi | AgentHostRuntimeApi | null\n): void {\n if (process.env.NODE_ENV === \"test\") {\n currentAgentHostApi = agentHostApi\n ? toAgentHostRuntimeApi(agentHostApi)\n : null;\n }\n}\n\nfunction getTestAgentHostApi(): AgentHostRuntimeApi | null {\n if (process.env.NODE_ENV !== \"test\") {\n return null;\n }\n if (typeof window === \"undefined\") {\n return null;\n }\n const explicitAgentHostApi = getExplicitWindowTestAgentHostApi();\n if (explicitAgentHostApi) {\n return explicitAgentHostApi;\n }\n if (currentAgentHostApi) {\n return currentAgentHostApi;\n }\n const testAgentHostApi = (\n window as unknown as Window & {\n agentHostApi?: AgentHostInputApi | AgentHostRuntimeApi;\n }\n ).agentHostApi;\n return testAgentHostApi ? toAgentHostRuntimeApi(testAgentHostApi) : null;\n}\n\nfunction getExplicitWindowTestAgentHostApi(): AgentHostRuntimeApi | null {\n if (process.env.NODE_ENV !== \"test\" || typeof window === \"undefined\") {\n return null;\n }\n const testDescriptor = Object.getOwnPropertyDescriptor(\n window,\n \"agentHostApi\"\n );\n if (!testDescriptor || !(\"value\" in testDescriptor)) {\n return null;\n }\n const testAgentHostApi = testDescriptor.value as\n | AgentHostInputApi\n | AgentHostRuntimeApi\n | undefined;\n return testAgentHostApi ? toAgentHostRuntimeApi(testAgentHostApi) : null;\n}\n","import type {\n AgentHostBatchUserInfoInput,\n AgentHostBatchUserInfoResult,\n AgentHostDeleteWorkspaceAgentSessionInput,\n AgentHostWorkspaceAgentListInput as AgentHostListWorkspaceAgentsInput,\n AgentHostListWorkspaceAgentProbesInput,\n AgentHostWorkspaceAgentSessionMessages,\n AgentHostWorkspaceAgentSessionMessagesInput,\n AgentHostWorkspaceAgentSessionSummary,\n AgentHostWorkspaceAgentSessionSummaryInput,\n AgentHostWorkspaceAgentProbesResult,\n AgentHostWorkspaceAgentSnapshot,\n PersistWriteResult,\n ReadWorkspaceAgentReadStateInput,\n ReadWorkspaceFileResult as AgentHostReadWorkspaceFileResult,\n WorkspaceAgentReadStateSnapshot,\n WriteWorkspaceAgentReadStateInput\n} from \"../shared/contracts/dto\";\nimport type { WorkspaceUserProjectService } from \"@tutti-os/workspace-user-project/contracts\";\n\ntype AgentHostAsyncResult<T = any> = Promise<T>;\ntype AgentHostRecord = Record<string, unknown>;\ntype AgentHostUnsubscribe = () => void;\ntype AgentHostWorkspaceScopedInput<\n T extends {\n workspaceId?: string | null;\n }\n> = Omit<T, \"workspaceId\"> & {\n workspaceId: string;\n};\ntype AgentHostWorkspaceAgentsListInput =\n AgentHostWorkspaceScopedInput<AgentHostListWorkspaceAgentsInput>;\ntype AgentHostWorkspaceAgentSessionMessagesRuntimeInput =\n AgentHostWorkspaceScopedInput<AgentHostWorkspaceAgentSessionMessagesInput>;\ntype AgentHostWorkspaceAgentSessionSummaryRuntimeInput =\n AgentHostWorkspaceScopedInput<AgentHostWorkspaceAgentSessionSummaryInput>;\ntype AgentHostDeleteWorkspaceAgentSessionRuntimeInput =\n AgentHostWorkspaceScopedInput<AgentHostDeleteWorkspaceAgentSessionInput>;\n\nexport type AgentHostClipboardApi = {\n writeImage?: (input: {\n data: string;\n mimeType: \"image/png\";\n }) => AgentHostAsyncResult<void>;\n writeText: (text: string) => AgentHostAsyncResult<void>;\n};\n\nexport type AgentHostDebugApi = {\n logRuntimeDiagnostics: (\n payload: unknown\n ) => AgentHostAsyncResult<void> | void;\n logTerminalDiagnostics?: (\n payload: unknown\n ) => AgentHostAsyncResult<void> | void;\n};\n\nexport type AgentHostFilesystemApi = AgentHostRecord & {\n readFileText: (payload: {\n path?: string;\n uri?: string;\n }) => AgentHostAsyncResult<{\n content: string;\n name?: string;\n path?: string;\n }>;\n};\n\nexport type AgentHostMetaApi = AgentHostRecord & {\n appVersion?: string | null;\n isPackaged?: boolean;\n isTest?: boolean;\n mainPid?: number | null;\n platform?: string;\n workspaceId?: string;\n};\n\nexport type AgentHostEnvironmentApi = AgentHostRecord & {\n getBaseUrl?: () => AgentHostAsyncResult<string>;\n warmupOpenclawGateway?: (input?: unknown) => AgentHostAsyncResult<unknown>;\n};\n\nexport type AgentHostPersistenceApi = AgentHostRecord & {\n readWorkspaceAgentReadState: (\n input: ReadWorkspaceAgentReadStateInput\n ) => AgentHostAsyncResult<WorkspaceAgentReadStateSnapshot>;\n writeWorkspaceAgentReadState: (\n input: WriteWorkspaceAgentReadStateInput\n ) => AgentHostAsyncResult<PersistWriteResult>;\n};\n\nexport type AgentHostToastApi = AgentHostRecord & {\n error: (title: string, description?: string) => void;\n info?: (title: string, description?: string) => void;\n success?: (title: string, description?: string) => void;\n};\n\nexport interface AgentHostSelectedFile {\n name?: string;\n path: string;\n}\n\nexport interface AgentHostSelectFilesInput {\n allowDirectories?: boolean;\n}\n\nexport interface AgentHostApplyWorkspaceGitPatchInput {\n allowBinary?: boolean;\n atomic?: boolean;\n cwd: string;\n diff: string;\n revert?: boolean;\n target?: \"unstaged\" | \"staged\" | \"staged-and-unstaged\";\n}\n\nexport interface AgentHostApplyWorkspaceGitPatchResult {\n status: \"success\" | \"partial-success\" | \"error\";\n appliedPaths: string[];\n skippedPaths: string[];\n conflictedPaths: string[];\n errorCode?: \"not-git-repo\" | string;\n execOutput?: {\n command: string;\n stdout: string;\n stderr: string;\n };\n}\n\nexport interface AgentHostResolveWorkspaceGitPatchSupportInput {\n cwd: string;\n}\n\nexport interface AgentHostResolveWorkspaceGitPatchSupportResult {\n supported: boolean;\n root?: string;\n errorCode?: \"not-git-repo\" | string;\n}\n\nexport type AgentHostWorkspaceApi = AgentHostRecord & {\n applyGitPatch?: (\n input: AgentHostApplyWorkspaceGitPatchInput\n ) => AgentHostAsyncResult<AgentHostApplyWorkspaceGitPatchResult>;\n resolveGitPatchSupport?: (\n input: AgentHostResolveWorkspaceGitPatchSupportInput\n ) => AgentHostAsyncResult<AgentHostResolveWorkspaceGitPatchSupportResult>;\n copyPath?: (input: { path: string }) => AgentHostAsyncResult<void>;\n ensureDirectory: (input: { path: string }) => AgentHostAsyncResult<void>;\n getReferenceForFile?: (file: File) => {\n kind: \"file\" | \"folder\";\n path: string;\n };\n readFile: (input: {\n path: string;\n }) => AgentHostAsyncResult<AgentHostReadWorkspaceFileResult>;\n selectContextEntries?: () => AgentHostAsyncResult<{ entries: unknown[] }>;\n selectDirectory: () => AgentHostAsyncResult<{ path: string } | null>;\n selectFiles: (\n input?: AgentHostSelectFilesInput\n ) => AgentHostAsyncResult<AgentHostSelectedFile[]>;\n writeFileText: (input: {\n content: string;\n path: string;\n }) => AgentHostAsyncResult<unknown>;\n};\n\nexport interface AgentHostInputApi {\n account?: AgentHostAccountApi;\n agentGuiBatch?: AgentHostAgentGuiBatchApi;\n agentSessions?: AgentHostAgentSessionsApi;\n clipboard: AgentHostClipboardApi;\n debug?: AgentHostDebugApi;\n filesystem: AgentHostFilesystemApi;\n meta?: AgentHostMetaApi;\n onHostEvent?: (listener: (event: any) => void) => AgentHostUnsubscribe;\n persistence?: AgentHostPersistenceApi;\n runtime?: AgentHostEnvironmentApi;\n toast?: AgentHostToastApi;\n userProjects?: AgentHostUserProjectsApi;\n workspace: AgentHostWorkspaceApi;\n workspaceAgentProbes?: AgentHostWorkspaceAgentProbesApi;\n workspaceAgents?: AgentHostWorkspaceAgentsApi;\n}\n\nexport type AgentHostApi = AgentHostInputApi;\n\nexport type AgentHostAccountApi = AgentHostRecord & {\n batchGetUserInfo: (\n input: AgentHostBatchUserInfoInput\n ) => AgentHostAsyncResult<AgentHostBatchUserInfoResult>;\n ensureProfiles?: (input: any) => AgentHostAsyncResult<any>;\n};\n\nexport type AgentHostAgentGuiBatchApi = AgentHostRecord & {\n exportRun: (input: any) => AgentHostAsyncResult<any>;\n};\n\nexport type AgentHostWorkspaceAgentProbesApi = AgentHostRecord & {\n list: (\n input: AgentHostListWorkspaceAgentProbesInput\n ) => AgentHostAsyncResult<AgentHostWorkspaceAgentProbesResult>;\n};\n\nexport type AgentProviderProbeListInput =\n AgentHostListWorkspaceAgentProbesInput;\nexport type AgentProviderProbeListResult = AgentHostWorkspaceAgentProbesResult;\n\nexport interface AgentHostUserProject {\n id: string;\n path: string;\n label: string;\n createdAtUnixMs?: number;\n updatedAtUnixMs?: number;\n lastUsedAtUnixMs?: number;\n}\n\nexport type AgentHostUserProjectsApi = AgentHostRecord & {\n service?: WorkspaceUserProjectService;\n checkPath?: (input: { path: string }) => AgentHostAsyncResult<{\n exists: boolean;\n isDirectory: boolean;\n path: string;\n }>;\n create?: (input: {\n name: string;\n }) => AgentHostAsyncResult<AgentHostUserProject>;\n getDefaultSelection?: () => AgentHostAsyncResult<{\n path: string | null;\n } | null>;\n list: () => AgentHostAsyncResult<{\n projects: AgentHostUserProject[];\n }>;\n subscribe?: (listener: () => void) => AgentHostUnsubscribe;\n prepareSelection?: (input: {\n projectLocked: boolean;\n selectedPath: string | null;\n }) => AgentHostAsyncResult<{\n isSelectedPathMissing: boolean;\n projects: AgentHostUserProject[];\n selection:\n | {\n kind: \"clear\";\n suppressedPath: string;\n }\n | {\n kind: \"none\";\n }\n | {\n kind: \"select\";\n path: string;\n };\n }>;\n remove?: (input: { path: string }) => AgentHostAsyncResult<void>;\n isNoProjectPath?: (input: { path: string }) => boolean;\n rememberDefaultSelection?: (input: {\n path: string | null;\n }) => AgentHostAsyncResult<void>;\n use: (input: { path: string }) => AgentHostAsyncResult<AgentHostUserProject>;\n};\n\nexport type AgentHostAgentSessionsApi = AgentHostRecord & {\n activate: (input: any) => AgentHostAsyncResult<any>;\n /**\n * @deprecated AgentGUI production writes must use AgentActivityRuntime.cancelSession.\n */\n cancel: (input: any) => AgentHostAsyncResult<any>;\n /**\n * @deprecated AgentGUI production writes must use AgentActivityRuntime.sendInput.\n */\n exec: (input: any) => AgentHostAsyncResult<any>;\n getComposerOptions?: (input: any) => AgentHostAsyncResult<any>;\n getState: (input: any) => AgentHostAsyncResult<any>;\n onEvent?: (listener: (event: any) => void) => AgentHostUnsubscribe;\n /**\n * @deprecated AgentGUI production writes must use AgentActivityRuntime.setSessionPinned.\n */\n pinSession?: (input: any) => AgentHostAsyncResult<any>;\n /**\n * @deprecated AgentGUI production sync must use AgentActivityRuntime.ensureSessionSynchronized.\n */\n releaseEventStream?: (input?: any) => AgentHostAsyncResult;\n /**\n * @deprecated AgentGUI production sync must use AgentActivityRuntime.ensureSessionSynchronized.\n */\n retainEventStream?: (input: any) => AgentHostAsyncResult;\n /**\n * @deprecated AgentGUI production writes must use AgentActivityRuntime.submitInteractive.\n */\n submitInteractive: (input: any) => AgentHostAsyncResult<any>;\n /**\n * @deprecated AgentGUI production UI must derive events from AgentActivityRuntime snapshots.\n */\n trackSettingsProjectChange?: (input: {\n action: \"clear\" | \"create_new\" | \"select_existing\";\n agentSessionId: string;\n provider?: string | null;\n }) => AgentHostAsyncResult<void>;\n subscribeEvents: (\n input: any,\n listener: (event: any) => void\n ) => AgentHostUnsubscribe;\n unactivate: (input: any) => AgentHostAsyncResult<any>;\n updateSettings: (input: any) => AgentHostAsyncResult<any>;\n};\n\n/**\n * @deprecated Legacy host DTO projection. AgentGUI production reads and writes\n * must use AgentActivityRuntime and AgentActivity* models.\n */\nexport type AgentHostWorkspaceAgentsApi = AgentHostRecord & {\n /**\n * @deprecated Use AgentActivityRuntime.deleteSession.\n */\n deleteSession: (\n input: AgentHostDeleteWorkspaceAgentSessionRuntimeInput\n ) => AgentHostAsyncResult<any>;\n /**\n * @deprecated Derive summaries from AgentActivitySnapshot/session messages.\n */\n getSessionSummary: (\n input: AgentHostWorkspaceAgentSessionSummaryRuntimeInput\n ) => AgentHostAsyncResult<AgentHostWorkspaceAgentSessionSummary>;\n /**\n * @deprecated Use AgentActivityRuntime.load/getSnapshot.\n */\n list: (\n input: string | AgentHostWorkspaceAgentsListInput\n ) => AgentHostAsyncResult<AgentHostWorkspaceAgentSnapshot>;\n /**\n * @deprecated Use AgentActivityRuntime.listSessionMessages.\n */\n listSessionMessages: (\n input: AgentHostWorkspaceAgentSessionMessagesRuntimeInput\n ) => AgentHostAsyncResult<AgentHostWorkspaceAgentSessionMessages>;\n};\n\nexport interface AgentHostRuntimeApi {\n account?: AgentHostAccountApi;\n agentGuiBatch: AgentHostAgentGuiBatchApi;\n clipboard: AgentHostClipboardApi;\n debug?: AgentHostDebugApi;\n filesystem: AgentHostFilesystemApi;\n meta?: AgentHostMetaApi;\n onHostEvent?: (listener: (event: any) => void) => AgentHostUnsubscribe;\n persistence?: AgentHostPersistenceApi;\n runtime?: AgentHostEnvironmentApi;\n toast?: AgentHostToastApi;\n userProjects?: AgentHostUserProjectsApi;\n workspace: AgentHostWorkspaceApi;\n workspaceAgentProbes?: AgentHostWorkspaceAgentProbesApi;\n}\n\nexport function toAgentHostRuntimeApi(\n hostApi: AgentHostInputApi | AgentHostRuntimeApi\n): AgentHostRuntimeApi {\n return {\n account: hostApi.account,\n agentGuiBatch: hostApi.agentGuiBatch ?? ({} as AgentHostAgentGuiBatchApi),\n clipboard: hostApi.clipboard,\n debug: hostApi.debug,\n filesystem: hostApi.filesystem,\n meta: hostApi.meta,\n onHostEvent: hostApi.onHostEvent,\n persistence: hostApi.persistence,\n runtime: hostApi.runtime,\n toast: hostApi.toast,\n userProjects: hostApi.userProjects,\n workspace: hostApi.workspace,\n workspaceAgentProbes: hostApi.workspaceAgentProbes\n };\n}\n","export function normalizeManagedAgentProvider(\n provider: string | undefined\n): string {\n const normalized =\n provider\n ?.trim()\n .toLowerCase()\n .replace(/[_\\s]+/gu, \"-\") ?? \"\";\n switch (normalized) {\n case \"claude\":\n case \"claude-code\":\n return \"claude-code\";\n case \"nexight\":\n case \"tutti-doc\":\n return \"tutti\";\n default:\n return normalized;\n }\n}\n","import { normalizeManagedAgentProvider } from \"./managedAgentProviders\";\nimport {\n claudeRoundedUrl,\n codexRoundedUrl,\n geminiRoundedUrl,\n hermesRoundedUrl,\n manageAgentClaudeCodeUrl,\n manageAgentCodexUrl,\n manageAgentGeminiUrl,\n manageAgentHermesUrl,\n manageAgentTuttiUrl,\n manageAgentOpenclawUrl,\n tuttiDocRoundedUrl,\n openclawRoundedUrl\n} from \"../managedAgentIconAssets\";\n\n/** Square avatar art for the managed toolchain agents (used by Manage Agents and Launch home Agents floor). */\nexport const MANAGED_AGENT_ICON_URLS: Record<string, string> = {\n \"claude-code\": manageAgentClaudeCodeUrl,\n codex: manageAgentCodexUrl,\n gemini: manageAgentGeminiUrl,\n hermes: manageAgentHermesUrl,\n tutti: manageAgentTuttiUrl,\n openclaw: manageAgentOpenclawUrl\n};\n\n/** Rounded avatars for Room status / room activity panel only. */\nexport const MANAGED_AGENT_ICON_ROUNDED_URLS: Record<string, string> = {\n \"claude-code\": claudeRoundedUrl,\n codex: codexRoundedUrl,\n gemini: geminiRoundedUrl,\n hermes: hermesRoundedUrl,\n tutti: tuttiDocRoundedUrl,\n openclaw: openclawRoundedUrl\n};\n\n/** 与 Manage Agents 列表用的方图区分;房间预览弹幕条等仅用圆图 */\nconst MANAGED_AGENT_ROUNDED_ICON_FALLBACK_URL = tuttiDocRoundedUrl;\n\nexport const MANAGED_AGENT_ICON_FALLBACK_URL = manageAgentTuttiUrl;\n\nexport function managedAgentRoundedIconUrl(\n provider: string | undefined\n): string {\n return (\n MANAGED_AGENT_ICON_ROUNDED_URLS[normalizeManagedAgentProvider(provider)] ??\n MANAGED_AGENT_ROUNDED_ICON_FALLBACK_URL\n );\n}\n"],"mappings":"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","names":["createContext","useContext","jsx","createContext","useContext"]}
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-GCBDIQDX.js";
|
|
4
4
|
import {
|
|
5
5
|
translateInUiLanguage
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-33LWYV6O.js";
|
|
7
7
|
|
|
8
8
|
// shared/utils/agentSessionMentionText.ts
|
|
9
9
|
import {
|
|
@@ -314,4 +314,4 @@ export {
|
|
|
314
314
|
resolveAgentGUIProviderDisplayLabel,
|
|
315
315
|
firstAgentGUIUserMessageTitle
|
|
316
316
|
};
|
|
317
|
-
//# sourceMappingURL=chunk-
|
|
317
|
+
//# sourceMappingURL=chunk-SZ7JGCS3.js.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
setCurrentAgentGuiI18nRuntime,
|
|
7
7
|
translate,
|
|
8
8
|
translateInUiLanguage
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-33LWYV6O.js";
|
|
10
10
|
|
|
11
11
|
// i18n/index.ts
|
|
12
12
|
import React, {
|
|
@@ -68,4 +68,4 @@ export {
|
|
|
68
68
|
AgentGuiI18nProvider,
|
|
69
69
|
useTranslation
|
|
70
70
|
};
|
|
71
|
-
//# sourceMappingURL=chunk-
|
|
71
|
+
//# sourceMappingURL=chunk-Z3AAQQFD.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { f as AgentMentionSearchState, A as AgentContextMentionItem, a as AgentMentionBrowseCategory, b as AgentMentionFilterId, d as AgentMentionGroupId } from '../AgentMentionSearchController-
|
|
2
|
-
export { c as AgentMentionGroup, e as AgentMentionSearchController } from '../AgentMentionSearchController-
|
|
1
|
+
import { f as AgentMentionSearchState, A as AgentContextMentionItem, a as AgentMentionBrowseCategory, b as AgentMentionFilterId, d as AgentMentionGroupId } from '../AgentMentionSearchController-Po0KQLcL.js';
|
|
2
|
+
export { c as AgentMentionGroup, e as AgentMentionSearchController } from '../AgentMentionSearchController-Po0KQLcL.js';
|
|
3
3
|
export { AGENT_CONTEXT_MENTION_PROVIDER_IDS, AgentContextMentionInsertResult, AgentContextMentionProvider, AgentContextMentionProviderId, AgentContextMentionQueryInput } from '../context-mention-provider.js';
|
|
4
4
|
import '@tutti-os/ui-rich-text/at-panel';
|
|
5
5
|
import '@tutti-os/ui-rich-text/types';
|
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
AgentMentionSearchController,
|
|
5
5
|
flattenAgentMentionPaletteEntries,
|
|
6
6
|
groupStartKeys
|
|
7
|
-
} from "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
7
|
+
} from "../chunk-IMZBRUP3.js";
|
|
8
|
+
import "../chunk-HFZOXSSQ.js";
|
|
9
|
+
import "../chunk-QFHR527D.js";
|
|
10
10
|
import "../chunk-IBIMGLCD.js";
|
|
11
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-N37A5CJH.js";
|
|
12
12
|
import "../chunk-Y35GDLP2.js";
|
|
13
13
|
import "../chunk-LUGELG5V.js";
|
|
14
|
-
import "../chunk-
|
|
14
|
+
import "../chunk-S6PCOX3S.js";
|
|
15
15
|
import "../chunk-TYGL25EL.js";
|
|
16
16
|
import "../chunk-PJP5BUU6.js";
|
|
17
17
|
import "../chunk-MTFSQWZ6.js";
|
|
@@ -19,8 +19,8 @@ import {
|
|
|
19
19
|
AGENT_CONTEXT_MENTION_PROVIDER_IDS
|
|
20
20
|
} from "../chunk-JM24HADP.js";
|
|
21
21
|
import "../chunk-GCBDIQDX.js";
|
|
22
|
-
import "../chunk-
|
|
23
|
-
import "../chunk-
|
|
22
|
+
import "../chunk-Z3AAQQFD.js";
|
|
23
|
+
import "../chunk-33LWYV6O.js";
|
|
24
24
|
export {
|
|
25
25
|
AGENT_CONTEXT_MENTION_PROVIDER_IDS,
|
|
26
26
|
AgentContextMentionPalette,
|
package/dist/i18n/index.d.ts
CHANGED
|
@@ -336,6 +336,20 @@ declare const agentGuiI18nResources: {
|
|
|
336
336
|
readonly followupPlaceholder: "Request follow-up changes from {{provider}}";
|
|
337
337
|
readonly installRequiredPlaceholder: "Finish setting up {{provider}} to send messages";
|
|
338
338
|
readonly installRequiredAction: "Set up";
|
|
339
|
+
readonly providerGateCheckingTitle: "Checking your agent";
|
|
340
|
+
readonly providerGateCheckingDescription: "One moment while we check whether {{provider}} is ready.";
|
|
341
|
+
readonly providerGateInstallTitle: "Install {{provider}} first";
|
|
342
|
+
readonly providerGateInstallDescription: "{{provider}} needs to be installed before you can start a new chat here.";
|
|
343
|
+
readonly providerGateInstallAction: "Install";
|
|
344
|
+
readonly providerGateLoginTitle: "Sign in to {{provider}}";
|
|
345
|
+
readonly providerGateLoginDescription: "{{provider}} is installed. Sign in once, then come back and start chatting.";
|
|
346
|
+
readonly providerGateLoginAction: "Sign in";
|
|
347
|
+
readonly providerGateUnavailableTitle: "{{provider}} is not ready yet";
|
|
348
|
+
readonly providerGateUnavailableDescription: "We could not confirm that {{provider}} is ready. Try checking again.";
|
|
349
|
+
readonly providerGateRetryAction: "Check again";
|
|
350
|
+
readonly providerGatePendingInstall: "Installing…";
|
|
351
|
+
readonly providerGatePendingLogin: "Opening sign in…";
|
|
352
|
+
readonly providerGatePendingRefresh: "Checking…";
|
|
339
353
|
readonly collaboratorSessionReadOnlyPlaceholder: "This session belongs to another user and cannot be replied to directly";
|
|
340
354
|
readonly send: "Send";
|
|
341
355
|
readonly modelLabel: "Model";
|
|
@@ -834,6 +848,7 @@ declare const agentGuiI18nResources: {
|
|
|
834
848
|
readonly fileMentionEmpty: "Search workspace files based on your input";
|
|
835
849
|
readonly fileMentionError: "Unable to search Files.";
|
|
836
850
|
readonly fileMentionTabHint: "Tab switch category | ←→ enter/leave folder | ↑↓ switch selection";
|
|
851
|
+
readonly mentionPalette: "Mention context";
|
|
837
852
|
readonly addReference: "Add reference";
|
|
838
853
|
readonly referenceWorkspaceFiles: "Reference workspace files";
|
|
839
854
|
readonly referencePicker: {
|
|
@@ -890,6 +905,7 @@ declare const agentGuiI18nResources: {
|
|
|
890
905
|
readonly mentionKindAppFactory: "App Factory";
|
|
891
906
|
readonly mentionKindFile: "File";
|
|
892
907
|
readonly mentionKindIssue: "Task";
|
|
908
|
+
readonly mentionKindReference: "Reference";
|
|
893
909
|
readonly mentionKindSession: "Session";
|
|
894
910
|
readonly mentionGroupFiles: "Files";
|
|
895
911
|
readonly mentionGroupOpenedFiles: "Files I opened";
|
|
@@ -2797,6 +2813,20 @@ declare const agentGuiI18nResources: {
|
|
|
2797
2813
|
readonly followupPlaceholder: "要求 {{provider}} 继续后续变更";
|
|
2798
2814
|
readonly installRequiredPlaceholder: "请先完成 {{provider}} 配置,然后再发送消息";
|
|
2799
2815
|
readonly installRequiredAction: "设置";
|
|
2816
|
+
readonly providerGateCheckingTitle: "正在检查 Agent";
|
|
2817
|
+
readonly providerGateCheckingDescription: "稍等一下,我们正在确认 {{provider}} 是否已经可用。";
|
|
2818
|
+
readonly providerGateInstallTitle: "先安装 {{provider}}";
|
|
2819
|
+
readonly providerGateInstallDescription: "需要先安装 {{provider}},才能在这里开始新的对话。";
|
|
2820
|
+
readonly providerGateInstallAction: "安装";
|
|
2821
|
+
readonly providerGateLoginTitle: "登录 {{provider}}";
|
|
2822
|
+
readonly providerGateLoginDescription: "{{provider}} 已安装。先完成一次登录,然后就可以开始对话。";
|
|
2823
|
+
readonly providerGateLoginAction: "登录";
|
|
2824
|
+
readonly providerGateUnavailableTitle: "{{provider}} 暂时还不可用";
|
|
2825
|
+
readonly providerGateUnavailableDescription: "我们还不能确认 {{provider}} 已准备好,可以再检测一次。";
|
|
2826
|
+
readonly providerGateRetryAction: "重新检测";
|
|
2827
|
+
readonly providerGatePendingInstall: "正在安装…";
|
|
2828
|
+
readonly providerGatePendingLogin: "正在打开登录…";
|
|
2829
|
+
readonly providerGatePendingRefresh: "正在检测…";
|
|
2800
2830
|
readonly collaboratorSessionReadOnlyPlaceholder: "非当前用户会话,不可直接对话";
|
|
2801
2831
|
readonly send: "发送";
|
|
2802
2832
|
readonly modelLabel: "模型";
|
|
@@ -3295,6 +3325,7 @@ declare const agentGuiI18nResources: {
|
|
|
3295
3325
|
readonly fileMentionEmpty: "根据你输入的内容搜索工作区文件";
|
|
3296
3326
|
readonly fileMentionError: "无法搜索工作区文件。";
|
|
3297
3327
|
readonly fileMentionTabHint: "Tab 切换分类 | ←→ 进入/返回文件夹 | ↑↓ 切换选中";
|
|
3328
|
+
readonly mentionPalette: "提及上下文";
|
|
3298
3329
|
readonly addReference: "添加引用";
|
|
3299
3330
|
readonly referenceWorkspaceFiles: "引用空间文件";
|
|
3300
3331
|
readonly referencePicker: {
|
|
@@ -3351,6 +3382,7 @@ declare const agentGuiI18nResources: {
|
|
|
3351
3382
|
readonly mentionKindAppFactory: "应用工厂";
|
|
3352
3383
|
readonly mentionKindFile: "文件";
|
|
3353
3384
|
readonly mentionKindIssue: "任务";
|
|
3385
|
+
readonly mentionKindReference: "引用";
|
|
3354
3386
|
readonly mentionKindSession: "会话";
|
|
3355
3387
|
readonly mentionGroupFiles: "文件";
|
|
3356
3388
|
readonly mentionGroupOpenedFiles: "我打开的文件";
|
package/dist/i18n/index.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -2,18 +2,19 @@ import { AgentActivityNeedsAttentionItem, AgentActivitySnapshot, AgentActivityCa
|
|
|
2
2
|
export { AgentActivityAdapter, AgentActivityController, AgentActivityMessage, AgentActivityNeedsAttentionItem, AgentActivitySnapshot, selectNeedsAttentionCount, selectNeedsAttentionItems } from '@tutti-os/agent-activity-core';
|
|
3
3
|
import { m as WorkspaceAgentActivityListViewModel, g as AgentHostWorkspaceAgentSession, f as AgentHostWorkspaceAgentMessage, l as AgentHostWorkspaceAgentSnapshot, B as BuildWorkspaceAgentActivityListOptions, d as AgentHostRuntimeOpenclawGatewayWarmupResult, c as AgentHostManagedAgentsState } from './workspaceAgentActivityListViewModel-B5viw5Da.js';
|
|
4
4
|
import * as react from 'react';
|
|
5
|
-
import { PropsWithChildren, JSX } from 'react';
|
|
5
|
+
import { ReactNode, PropsWithChildren, JSX } from 'react';
|
|
6
6
|
import { I18nRuntime } from '@tutti-os/ui-i18n-runtime';
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
import { q as AgentProvider, f as AgentGUIProviderTargetRef, i as AgentHostAgentSessionComposerSettings, g as AgentHostActivateAgentSessionResult, o as AgentHostUpdateAgentSessionSettingsResult, m as AgentHostAgentSessionState, n as AgentHostUnactivateAgentSessionResult, A as AgentGUINodeData, e as AgentGUIProviderTarget, a as AgentGUIProvider, p as AgentPromptContentBlock, P as Point, b as AgentGUIProviderReadinessGate, N as NodeFrame } from './types-BsHvTjIZ.js';
|
|
8
|
+
export { c as AgentGUIProviderReadinessGateAction, d as AgentGUIProviderReadinessGateStatus } from './types-BsHvTjIZ.js';
|
|
9
|
+
import { l as AgentProbeSnapshot, A as AgentComposerDraft, o as AgentSessionCommand, d as AgentGUIProviderSkillOption, a as AgentGUIComposerSettingsVM, e as AgentGUIQueuedPromptVM, c as AgentGUINodeViewModel, b as AgentGUIConversationScope, h as AgentHostInputApi } from './agentGuiNodeTypes-BRU6P22B.js';
|
|
10
|
+
export { f as AgentHostApi, g as AgentHostApplyWorkspaceGitPatchInput, i as AgentHostRuntimeApi, j as AgentHostSelectFilesInput, k as AgentProbeProvider, m as AgentProviderProbeListInput, n as AgentProviderProbeListResult, p as AgentUsageQuota, q as AgentUsageSnapshot, P as PersistWriteResult, R as ReadWorkspaceAgentReadStateInput, W as WorkspaceAgentReadStateSnapshot, r as WriteWorkspaceAgentReadStateInput } from './agentGuiNodeTypes-BRU6P22B.js';
|
|
10
11
|
import { WorkspaceFileEntry } from '@tutti-os/workspace-file-manager/services';
|
|
11
12
|
import { WorkspaceFileReference, ReferenceLocateTarget, WorkspaceFileReferenceAdapter } from '@tutti-os/workspace-file-reference/contracts';
|
|
12
13
|
import { ReferenceSourceAggregator } from '@tutti-os/workspace-file-reference/core';
|
|
13
14
|
import { U as UiLanguage, a as UiTheme } from './uiSettings-BQS9r2eo.js';
|
|
14
|
-
import { W as WorkspaceLinkAction } from './workspaceLinkActions-
|
|
15
|
-
import { A as AgentContextMentionItem } from './AgentMentionSearchController-
|
|
16
|
-
export { p as preloadAgentMentionBrowse } from './AgentMentionSearchController-
|
|
15
|
+
import { W as WorkspaceLinkAction } from './workspaceLinkActions-Bjy_XfBm.js';
|
|
16
|
+
import { A as AgentContextMentionItem } from './AgentMentionSearchController-Po0KQLcL.js';
|
|
17
|
+
export { p as preloadAgentMentionBrowse } from './AgentMentionSearchController-Po0KQLcL.js';
|
|
17
18
|
import { b as AgentConversationPromptVM } from './agentConversationVM-Qbz9GBwR.js';
|
|
18
19
|
import { WorkspaceUserProjectI18nRuntime } from '@tutti-os/workspace-user-project/i18n';
|
|
19
20
|
import { WorkspaceUserProjectSelectChangeAction } from '@tutti-os/workspace-user-project/ui';
|
|
@@ -49,6 +50,44 @@ declare function agentHostSnapshotFromAgentActivitySnapshot(snapshot: AgentActiv
|
|
|
49
50
|
*/
|
|
50
51
|
declare function projectCoreSessionStatus(status: string): string;
|
|
51
52
|
|
|
53
|
+
interface AgentCustomMentionIdentity {
|
|
54
|
+
entityId: string;
|
|
55
|
+
label: string;
|
|
56
|
+
scope?: Readonly<Record<string, string>>;
|
|
57
|
+
}
|
|
58
|
+
interface AgentCustomMentionPresentation {
|
|
59
|
+
/** chip 第一行(缺省用链接 label)。 */
|
|
60
|
+
name: string;
|
|
61
|
+
/** chip 第二行(可选,通用双行卡的次要文案)。 */
|
|
62
|
+
summary?: string;
|
|
63
|
+
/** 所属 workspace(可选;custom kind 的 scope 键由注册方约定)。 */
|
|
64
|
+
workspaceId?: string;
|
|
65
|
+
}
|
|
66
|
+
interface AgentCustomMentionChipContext {
|
|
67
|
+
href: string;
|
|
68
|
+
name: string;
|
|
69
|
+
summary?: string;
|
|
70
|
+
isEditable: boolean;
|
|
71
|
+
/** 可编辑态的移除按钮,由 NodeView 注入;自定义渲染需自行摆放。 */
|
|
72
|
+
removeAction?: ReactNode;
|
|
73
|
+
}
|
|
74
|
+
interface AgentCustomMentionKindDefinition {
|
|
75
|
+
/** mention://<kind>/... 的 providerId(URL hostname,小写)。 */
|
|
76
|
+
kind: string;
|
|
77
|
+
/**
|
|
78
|
+
* 从 canonical mention 链接提取展示字段;返回 null 表示链接无效,
|
|
79
|
+
* 退化为普通链接/字面文本。
|
|
80
|
+
*/
|
|
81
|
+
present(mention: AgentCustomMentionIdentity, href: string): AgentCustomMentionPresentation | null;
|
|
82
|
+
/** 自定义 chip 渲染;缺省用包内通用双行卡(name + summary)。 */
|
|
83
|
+
renderChip?(context: AgentCustomMentionChipContext): ReactNode;
|
|
84
|
+
/** 点击是否上抛 open-custom-mention 链接动作;缺省 false(chip 只展示)。 */
|
|
85
|
+
clickable?: boolean;
|
|
86
|
+
}
|
|
87
|
+
declare function registerAgentCustomMentionKind(definition: AgentCustomMentionKindDefinition): void;
|
|
88
|
+
declare function getAgentCustomMentionKind(kind: string): AgentCustomMentionKindDefinition | undefined;
|
|
89
|
+
declare function resetAgentCustomMentionKindsForTests(): void;
|
|
90
|
+
|
|
52
91
|
type AgentCustomModelEnabledByProvider<TProvider extends string> = Record<TProvider, boolean>;
|
|
53
92
|
type AgentCustomModelByProvider<TProvider extends string> = Record<TProvider, string>;
|
|
54
93
|
type AgentCustomModelOptionsByProvider<TProvider extends string> = Record<TProvider, string[]>;
|
|
@@ -571,6 +610,7 @@ interface AgentComposerProps {
|
|
|
571
610
|
fileMentionEmpty: string;
|
|
572
611
|
fileMentionError: string;
|
|
573
612
|
fileMentionTabHint: string;
|
|
613
|
+
mentionPalette: string;
|
|
574
614
|
removeMention: string;
|
|
575
615
|
addReference: string;
|
|
576
616
|
referenceWorkspaceFiles: string;
|
|
@@ -724,6 +764,7 @@ interface AgentGUINodeProps {
|
|
|
724
764
|
onAgentProviderLogin?: (provider: AgentProvider) => void;
|
|
725
765
|
providerTargets?: readonly AgentGUIProviderTarget[];
|
|
726
766
|
providerTargetsLoading?: boolean;
|
|
767
|
+
providerReadinessGates?: Partial<Record<AgentGUIProvider, AgentGUIProviderReadinessGate | null>> | null;
|
|
727
768
|
defaultProviderTargetId?: string | null;
|
|
728
769
|
conversationScope?: AgentGUIConversationScope;
|
|
729
770
|
onWorkspaceFileReferencesAdded?: (input: {
|
|
@@ -834,4 +875,4 @@ interface AgentActivityHostProviderProps extends PropsWithChildren {
|
|
|
834
875
|
}
|
|
835
876
|
declare function AgentActivityHostProvider({ agentActivityRuntime, agentHostApi, children }: AgentActivityHostProviderProps): JSX.Element;
|
|
836
877
|
|
|
837
|
-
export { AgentActivityHostProvider, type AgentActivityHostProviderProps, type AgentActivityRuntime, type AgentActivityRuntimeListSessionMessagesInput, type AgentActivityRuntimePromptContentBlock, AgentActivityRuntimeProvider, type AgentActivityRuntimeProviderProps, type AgentActivityRuntimeRetainSessionEventsInput, type AgentActivityRuntimeSetSessionPinnedInput, type AgentActivityRuntimeUpdateSessionSettingsInput, type AgentActivityRuntimeUploadPromptContentInput, type AgentActivityRuntimeUploadPromptContentResult, type AgentActivityRuntimeWarmupOpenclawGatewayInput, type AgentActivitySnapshotProjection, AgentContextMentionProvider, AgentGUI, type AgentGUIProps, AgentGUIProvider, AgentGUIProviderTarget, AgentGUIProviderTargetRef, AgentGuiI18nLocale, AgentHostInputApi, AgentProbeSnapshot, AgentQueuedPromptQueueSnapshot, AgentQueuedPromptRuntime, AgentQueuedPromptRuntimeProvider, type AgentQueuedPromptRuntimeProviderProps, agentGUIDefaultTargetProviders, agentGuiDockIconUrl, agentGuiDockIconUrls, agentHostSnapshotFromAgentActivitySnapshot, buildAgentActivitySnapshotProjection, createLocalAgentGUIProviderTarget, createLocalAgentGUIProviderTargets, getAgentActivityRuntime, getOptionalAgentActivityRuntime, localAgentGUIProviderTargetId, normalizeAgentGUIProviderTargets, projectCoreSessionStatus, resetAgentActivityRuntimeForTests, resetAgentQueuedPromptRuntimeForTests, resolveAgentGUIExpandedWindowFrame, resolveAgentGUIProviderTarget, setAgentActivityRuntimeForTests, setAgentQueuedPromptRuntimeForTests, shouldAutoCollapseAgentGUIConversationRail, useAgentActivityRuntime, useAgentActivitySnapshot, useAgentQueuedPromptRuntime, useAgentQueuedPromptSessionSnapshot, useOptionalAgentActivityRuntime };
|
|
878
|
+
export { AgentActivityHostProvider, type AgentActivityHostProviderProps, type AgentActivityRuntime, type AgentActivityRuntimeListSessionMessagesInput, type AgentActivityRuntimePromptContentBlock, AgentActivityRuntimeProvider, type AgentActivityRuntimeProviderProps, type AgentActivityRuntimeRetainSessionEventsInput, type AgentActivityRuntimeSetSessionPinnedInput, type AgentActivityRuntimeUpdateSessionSettingsInput, type AgentActivityRuntimeUploadPromptContentInput, type AgentActivityRuntimeUploadPromptContentResult, type AgentActivityRuntimeWarmupOpenclawGatewayInput, type AgentActivitySnapshotProjection, AgentContextMentionProvider, type AgentCustomMentionChipContext, type AgentCustomMentionIdentity, type AgentCustomMentionKindDefinition, type AgentCustomMentionPresentation, AgentGUI, type AgentGUIProps, AgentGUIProvider, AgentGUIProviderReadinessGate, AgentGUIProviderTarget, AgentGUIProviderTargetRef, AgentGuiI18nLocale, AgentHostInputApi, AgentProbeSnapshot, AgentQueuedPromptQueueSnapshot, AgentQueuedPromptRuntime, AgentQueuedPromptRuntimeProvider, type AgentQueuedPromptRuntimeProviderProps, agentGUIDefaultTargetProviders, agentGuiDockIconUrl, agentGuiDockIconUrls, agentHostSnapshotFromAgentActivitySnapshot, buildAgentActivitySnapshotProjection, createLocalAgentGUIProviderTarget, createLocalAgentGUIProviderTargets, getAgentActivityRuntime, getAgentCustomMentionKind, getOptionalAgentActivityRuntime, localAgentGUIProviderTargetId, normalizeAgentGUIProviderTargets, projectCoreSessionStatus, registerAgentCustomMentionKind, resetAgentActivityRuntimeForTests, resetAgentCustomMentionKindsForTests, resetAgentQueuedPromptRuntimeForTests, resolveAgentGUIExpandedWindowFrame, resolveAgentGUIProviderTarget, setAgentActivityRuntimeForTests, setAgentQueuedPromptRuntimeForTests, shouldAutoCollapseAgentGUIConversationRail, useAgentActivityRuntime, useAgentActivitySnapshot, useAgentQueuedPromptRuntime, useAgentQueuedPromptSessionSnapshot, useOptionalAgentActivityRuntime };
|