@tutti-os/agent-gui 0.0.189 → 0.0.191
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/AgentRichTextReadonly-HJQQ4KAL.js +19 -0
- package/dist/agent-conversation/index.d.ts +29 -15
- package/dist/agent-conversation/index.js +11 -11
- package/dist/agent-env/index.js +1 -1
- package/dist/agent-gui.d.ts +315 -13
- package/dist/agent-gui.js +23 -23
- package/dist/agent-message-center/index.d.ts +4 -7
- package/dist/agent-message-center/index.js +9 -9
- package/dist/{agentGuiNodeTypes-DAT3XJON.d.ts → agentGuiNodeTypes-B23ubO8n.d.ts} +21 -3
- package/dist/agents.d.ts +2 -1
- package/dist/app/renderer/agentactivity.css +20 -3
- package/dist/{chunk-YSA4MXR5.js → chunk-4CHBM3G3.js} +9 -3
- package/dist/chunk-4CHBM3G3.js.map +1 -0
- package/dist/{chunk-NCD5I4OB.js → chunk-5VECGOBU.js} +3 -3
- package/dist/{chunk-F5YFT4VB.js → chunk-73FNXLC6.js} +5431 -2202
- package/dist/chunk-73FNXLC6.js.map +1 -0
- package/dist/{chunk-AODSTIED.js → chunk-AFUVWWQY.js} +2 -2
- package/dist/{chunk-MHOYBRCY.js → chunk-CBMWHQ7P.js} +1 -1
- package/dist/chunk-CBMWHQ7P.js.map +1 -0
- package/dist/{chunk-THBCAUBR.js → chunk-CXC3ROXQ.js} +2 -2
- package/dist/{chunk-THBCAUBR.js.map → chunk-CXC3ROXQ.js.map} +1 -1
- package/dist/{chunk-CAZ7NYUE.js → chunk-DKGFEIZ7.js} +2 -2
- package/dist/{chunk-5UTK6FDH.js → chunk-DNHDR2YC.js} +3 -3
- package/dist/{chunk-U7GYZU6V.js → chunk-E2Y4FFQW.js} +5 -5
- package/dist/{chunk-KAF6JPGL.js → chunk-FGD2K7AB.js} +3 -3
- package/dist/chunk-FGD2K7AB.js.map +1 -0
- package/dist/{chunk-ZREBC77R.js → chunk-G7DS23D4.js} +2 -2
- package/dist/{chunk-VGUKS6JR.js → chunk-I4ICM3U4.js} +297 -43
- package/dist/chunk-I4ICM3U4.js.map +1 -0
- package/dist/{chunk-6II57C72.js → chunk-KDN6SLJM.js} +2 -2
- package/dist/{chunk-E5X3DSQZ.js → chunk-L3YCXXMA.js} +9 -9
- package/dist/{chunk-2674YZOF.js → chunk-M6HTOCQK.js} +3 -3
- package/dist/{chunk-SZVHT57M.js → chunk-MGSRWYRN.js} +2 -2
- package/dist/{chunk-5CLSJWUN.js → chunk-O433KXLK.js} +8 -1
- package/dist/chunk-O433KXLK.js.map +1 -0
- package/dist/{chunk-Z5IASLIU.js → chunk-PFTST5V6.js} +4 -4
- package/dist/{chunk-LLIM2OX6.js → chunk-S7OROGUS.js} +2 -2
- package/dist/{chunk-BVA5SVOD.js → chunk-U6TH4RJJ.js} +1394 -784
- package/dist/chunk-U6TH4RJJ.js.map +1 -0
- package/dist/{chunk-ETJFWUCA.js → chunk-V2BMPPOE.js} +4 -4
- package/dist/{chunk-OKBVGNH7.js → chunk-Z5Y3RB2U.js} +2 -2
- package/dist/{chunk-V3QHMEJZ.js → chunk-ZE6VLLFC.js} +51 -4
- package/dist/chunk-ZE6VLLFC.js.map +1 -0
- package/dist/context-mention-palette/index.js +10 -10
- package/dist/context-mention-provider.d.ts +1 -0
- package/dist/{contribution-C0MnLVKF.d.ts → contribution-DfeuQHH6.d.ts} +39 -0
- package/dist/conversation-rail-runtime.d.ts +10 -3
- package/dist/dock-icons.js +2 -2
- package/dist/i18n/index.d.ts +370 -168
- package/dist/i18n/index.js +2 -2
- package/dist/index.d.ts +1199 -580
- package/dist/index.js +23 -23
- package/dist/index.js.map +1 -1
- package/dist/mention-search.js +8 -8
- package/dist/planImplementationPresentation-BxVOLt6A.d.ts +24 -0
- package/dist/provider-identity.js +1 -1
- package/dist/{types-CWFDZVkv.d.ts → types-CWKbqBmi.d.ts} +44 -0
- package/dist/workbench/contribution.d.ts +1 -1
- package/dist/workbench/contribution.js +10 -10
- package/dist/workbench/index.d.ts +2 -2
- package/dist/workbench/index.js +10 -10
- package/dist/workbench/launch.d.ts +4 -0
- package/dist/workbench/launch.js +4 -4
- package/dist/workbench/providerCatalog.js +2 -2
- package/dist/workbench/sessionTitle.js +3 -3
- package/dist/workbench/state.js +3 -3
- package/dist/workbench/types.d.ts +3 -0
- package/dist/workbench/types.js +1 -1
- package/dist/{agentConversationVM-CYXZSrh9.d.ts → workspaceLinkActions-BmVLZszV.d.ts} +110 -73
- package/package.json +14 -14
- package/dist/AgentRichTextReadonly-OKZPTCIX.js +0 -19
- package/dist/chunk-5CLSJWUN.js.map +0 -1
- package/dist/chunk-BVA5SVOD.js.map +0 -1
- package/dist/chunk-F5YFT4VB.js.map +0 -1
- package/dist/chunk-KAF6JPGL.js.map +0 -1
- package/dist/chunk-MHOYBRCY.js.map +0 -1
- package/dist/chunk-V3QHMEJZ.js.map +0 -1
- package/dist/chunk-VGUKS6JR.js.map +0 -1
- package/dist/chunk-YSA4MXR5.js.map +0 -1
- /package/dist/{AgentRichTextReadonly-OKZPTCIX.js.map → AgentRichTextReadonly-HJQQ4KAL.js.map} +0 -0
- /package/dist/{chunk-NCD5I4OB.js.map → chunk-5VECGOBU.js.map} +0 -0
- /package/dist/{chunk-AODSTIED.js.map → chunk-AFUVWWQY.js.map} +0 -0
- /package/dist/{chunk-CAZ7NYUE.js.map → chunk-DKGFEIZ7.js.map} +0 -0
- /package/dist/{chunk-5UTK6FDH.js.map → chunk-DNHDR2YC.js.map} +0 -0
- /package/dist/{chunk-U7GYZU6V.js.map → chunk-E2Y4FFQW.js.map} +0 -0
- /package/dist/{chunk-ZREBC77R.js.map → chunk-G7DS23D4.js.map} +0 -0
- /package/dist/{chunk-6II57C72.js.map → chunk-KDN6SLJM.js.map} +0 -0
- /package/dist/{chunk-E5X3DSQZ.js.map → chunk-L3YCXXMA.js.map} +0 -0
- /package/dist/{chunk-2674YZOF.js.map → chunk-M6HTOCQK.js.map} +0 -0
- /package/dist/{chunk-SZVHT57M.js.map → chunk-MGSRWYRN.js.map} +0 -0
- /package/dist/{chunk-Z5IASLIU.js.map → chunk-PFTST5V6.js.map} +0 -0
- /package/dist/{chunk-LLIM2OX6.js.map → chunk-S7OROGUS.js.map} +0 -0
- /package/dist/{chunk-ETJFWUCA.js.map → chunk-V2BMPPOE.js.map} +0 -0
- /package/dist/{chunk-OKBVGNH7.js.map → chunk-Z5Y3RB2U.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveAgentGUIProviderCatalogIdentity
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-O433KXLK.js";
|
|
4
4
|
|
|
5
5
|
// shared/managedAgentProviders.ts
|
|
6
6
|
function normalizeManagedAgentProvider(provider) {
|
|
@@ -22,4 +22,4 @@ export {
|
|
|
22
22
|
normalizeManagedAgentProvider,
|
|
23
23
|
isBetaAgentProvider
|
|
24
24
|
};
|
|
25
|
-
//# sourceMappingURL=chunk-
|
|
25
|
+
//# sourceMappingURL=chunk-AFUVWWQY.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../workbench/types.ts"],"sourcesContent":["/** Open runtime metadata; agentTargetId remains the launch identity. */\nexport type AgentGuiWorkbenchProvider = string;\n\nexport const agentGuiWorkbenchOpenSessionActivationType =\n \"agent-gui:open-session\";\n\nexport const agentGuiWorkbenchPrefillPromptActivationType =\n \"agent-gui:prefill-prompt\";\n\nexport interface AgentGuiWorkbenchPrefillPromptPayload {\n agentTargetId?: string | null;\n autoSubmit?: boolean;\n draftPrompt: string;\n model?: string | null;\n modelPlanId?: string | null;\n provider?: AgentGuiWorkbenchProvider;\n userProjectPath?: string | null;\n}\n\nexport interface AgentGuiWorkbenchComposerOverrides {\n model?: string | null;\n modelPlanId?: string | null;\n permissionModeId?: string | null;\n planMode?: boolean;\n reasoningEffort?: string | null;\n speed?: string | null;\n}\n\nexport type AgentGuiWorkbenchComposerOverridesByProvider = Partial<\n Record<AgentGuiWorkbenchProvider, AgentGuiWorkbenchComposerOverrides | null>\n>;\n\nexport type AgentGuiWorkbenchComposerOverridesByAgentTargetId = Record<\n string,\n AgentGuiWorkbenchComposerOverrides | null\n>;\n\nexport interface AgentGuiWorkbenchNodeState {\n agentTargetId?: string | null;\n composerOverrides?: AgentGuiWorkbenchComposerOverrides | null;\n composerOverridesByAgentTargetId?: AgentGuiWorkbenchComposerOverridesByAgentTargetId | null;\n composerOverridesByProvider?: AgentGuiWorkbenchComposerOverridesByProvider | null;\n conversationCount?: number | null;\n conversationRailCollapsed?: boolean | null;\n conversationRailWidthPx?: number | null;\n lastActiveAgentSessionId: string | null;\n lastActiveAgentSessionIdByAgentTargetId?: Record<string, string> | null;\n provider: AgentGuiWorkbenchProvider;\n}\n\nexport interface AgentGuiWorkbenchState {\n agentTargetId?: string | null;\n conversationRailCollapsed?: boolean | null;\n conversationRailWidthPx?: number | null;\n lastActiveAgentSessionId: string | null;\n lastActiveAgentSessionIdByAgentTargetId?: Record<string, string> | null;\n}\n\nexport interface AgentGuiWorkbenchWorkspaceState {\n workspaceId: string;\n}\n"],"mappings":";AAGO,IAAM,6CACX;AAEK,IAAM,+CACX;","names":[]}
|
|
@@ -349,7 +349,7 @@ function buildAgentEnvWizardViewModel(input) {
|
|
|
349
349
|
const busy = installPending || updating || activeAction?.phase === "install" || activeAction?.phase === "repair" || activeAction?.phase === "verify";
|
|
350
350
|
const reasonCode = (status?.availability.reasonCode ?? "").toLowerCase();
|
|
351
351
|
const versionTooOld = reasonCodeIndicatesCliVersionUnsupported(reasonCode);
|
|
352
|
-
const cliBelowFloor =
|
|
352
|
+
const cliBelowFloor = versionTooOld;
|
|
353
353
|
const platformPackageIncomplete = reasonCode.includes(
|
|
354
354
|
"codex_platform_pkg_incomplete"
|
|
355
355
|
);
|
|
@@ -465,4 +465,4 @@ export {
|
|
|
465
465
|
deriveHasAnomaly,
|
|
466
466
|
buildAgentEnvWizardViewModel
|
|
467
467
|
};
|
|
468
|
-
//# sourceMappingURL=chunk-
|
|
468
|
+
//# sourceMappingURL=chunk-CXC3ROXQ.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../shared/agentEnv/agentEnvPanelActions.ts","../shared/agentEnv/agentErrorPresentation.ts","../shared/agentEnv/codexSetupContract.ts","../shared/agentEnv/agentEnvWizardFlow.ts","../shared/agentEnv/agentEnvViewModel.ts"],"sourcesContent":["import {\n createContext,\n createElement,\n useContext,\n type ReactElement,\n type ReactNode\n} from \"react\";\n\n/** Setup section requested by an AgentGUI remediation action. */\nexport type AgentEnvPanelFocus =\n | \"detect\"\n | \"install\"\n | \"repair\"\n | \"upgrade\"\n | \"auth\"\n | \"network\"\n | \"registry\";\n\nexport interface OpenAgentEnvPanelInput {\n provider?: string | null;\n focus?: AgentEnvPanelFocus | null;\n}\n\nexport type OpenAgentEnvPanelAction = (input?: OpenAgentEnvPanelInput) => void;\n\nconst AgentEnvPanelActionContext =\n createContext<OpenAgentEnvPanelAction | null>(null);\n\nexport function AgentEnvPanelActionProvider({\n children,\n openPanel\n}: {\n children: ReactNode;\n openPanel?: OpenAgentEnvPanelAction;\n}): ReactElement {\n return createElement(\n AgentEnvPanelActionContext.Provider,\n { value: openPanel ?? null },\n children\n );\n}\n\n/** Host-injected command; AgentGUI never owns the panel workflow state. */\nexport function useOpenAgentEnvPanel(): OpenAgentEnvPanelAction | null {\n return useContext(AgentEnvPanelActionContext);\n}\n","import type { AgentEnvPanelFocus } from \"./agentEnvPanelActions\";\n\n/**\n * Run-failure codes actually emitted by the daemon runtime classifier\n * (packages/agent/daemon/runtime/visible_error.go `visibleFailureCode`). These\n * are the codes the conversation error card really receives — unlike the\n * aspirational `CODEX_*` codes, which the run pipeline never produces.\n *\n * Keep this union aligned with the Go switch in `visibleFailureCode`.\n */\nexport type AgentRunErrorCode =\n | \"auth_required\"\n | \"cli_not_found\"\n | \"cli_version_unsupported\"\n | \"network_error\"\n | \"runtime_unavailable\"\n | \"request_timed_out\"\n | \"provider_config_timeout\"\n | \"provider_stream_disconnected\"\n | \"provider_concurrency_limit\"\n | \"insufficient_credits\"\n | \"quota_or_rate_limit\"\n | \"process_exited\"\n | \"provider_error\"\n | \"unknown\";\n\nexport interface AgentErrorPresentation {\n /**\n * i18n key for the one human sentence shown in the card, or null to let the\n * caller fall back to its phase-aware generic title.\n */\n messageKey: string | null;\n /**\n * Env-panel section the remediation button deep-links to, or null when the\n * failure is transient/server-side and the wizard cannot fix it — in which\n * case no call-to-action is shown (showing one would misrepresent reality).\n */\n focus: AgentEnvPanelFocus | null;\n /** i18n key for the remediation button. */\n actionKey: string | null;\n /** External remediation destination, when the action is account-level. */\n externalUrl?: string | null;\n}\n\nconst NO_CTA = { focus: null, actionKey: null } as const;\n\n// The escape hatch for hard failures whose cause is ambiguous from the message\n// alone (a non-zero exit, an unclassified provider error): send the user into\n// the wizard to self-detect, but keep the generic message.\nconst SELF_DETECT = {\n messageKey: null,\n focus: \"detect\" as const,\n actionKey: \"agentHost.agentGui.visibleErrorActionDetect\"\n};\n\nconst PRESENTATIONS: Record<AgentRunErrorCode, AgentErrorPresentation> = {\n // Environment problems the wizard can detect or repair → route to its step.\n auth_required: {\n messageKey: \"agentHost.agentGui.visibleErrorAuthRequired\",\n focus: \"auth\",\n actionKey: \"agentHost.agentGui.visibleErrorActionRelogin\"\n },\n cli_not_found: {\n messageKey: \"agentHost.agentGui.visibleErrorCliNotFound\",\n focus: \"install\",\n actionKey: \"agentHost.agentGui.visibleErrorActionInstall\"\n },\n cli_version_unsupported: {\n messageKey: \"agentHost.agentGui.visibleErrorVersionUnsupported\",\n focus: \"upgrade\",\n actionKey: \"agentHost.agentGui.visibleErrorActionUpgrade\"\n },\n network_error: {\n messageKey: \"agentHost.agentGui.visibleErrorNetwork\",\n focus: \"network\",\n actionKey: \"agentHost.agentGui.visibleErrorActionCheckNetwork\"\n },\n runtime_unavailable: {\n messageKey: \"agentHost.agentGui.visibleErrorRuntimeUnavailable\",\n focus: \"detect\",\n actionKey: \"agentHost.agentGui.visibleErrorActionDetect\"\n },\n // Transient / server-side failures: accurate copy, but no wizard CTA — it\n // cannot fix a rate limit or a dropped stream.\n request_timed_out: {\n messageKey: \"agentHost.agentGui.visibleErrorRequestTimedOut\",\n ...NO_CTA\n },\n provider_config_timeout: {\n messageKey: \"agentHost.agentGui.visibleErrorConfigTimeout\",\n ...NO_CTA\n },\n provider_stream_disconnected: {\n messageKey: \"agentHost.agentGui.visibleErrorStreamDisconnected\",\n ...NO_CTA\n },\n provider_concurrency_limit: {\n messageKey: \"agentHost.agentGui.visibleErrorConcurrencyLimit\",\n ...NO_CTA\n },\n insufficient_credits: {\n messageKey: \"agentHost.agentGui.visibleErrorInsufficientCredits\",\n focus: null,\n actionKey: \"agentHost.agentGui.visibleErrorActionViewPlans\",\n externalUrl: \"https://tutti.sh/profile/plan\"\n },\n quota_or_rate_limit: {\n messageKey: \"agentHost.agentGui.visibleErrorQuotaOrRateLimit\",\n ...NO_CTA\n },\n // Ambiguous hard failures → generic message + self-detect escape hatch.\n process_exited: SELF_DETECT,\n provider_error: SELF_DETECT,\n unknown: SELF_DETECT\n};\n\n/**\n * Resolves the card presentation for a run-failure code. Returns null for codes\n * outside the known vocabulary so the caller renders its plain generic card with\n * no call-to-action.\n */\nexport function resolveAgentErrorPresentation(\n code: string | null | undefined\n): AgentErrorPresentation | null {\n if (!code) {\n return null;\n }\n return PRESENTATIONS[code as AgentRunErrorCode] ?? null;\n}\n\nconst FAILED_MESSAGE_CODE_MARKERS: ReadonlyArray<\n readonly [AgentRunErrorCode, readonly string[]]\n> = [\n [\n \"auth_required\",\n [\n \"authentication_failed\",\n \"invalid authentication credentials\",\n \"401 invalid authentication\",\n \"unauthorized\",\n \"not logged in\",\n \"please run /login\",\n \"invalid api key\"\n ]\n ],\n [\n \"cli_version_unsupported\",\n [\"requires a newer version\", \"version is too old\", \"unsupported version\"]\n ],\n [\n \"cli_not_found\",\n [\n \"no such file or directory\",\n \"command not found\",\n \"enoent\",\n \"executable file not found\"\n ]\n ],\n [\n \"network_error\",\n [\"enotfound\", \"econnrefused\", \"econnreset\", \"getaddrinfo\", \"socket hang up\"]\n ],\n [\n \"quota_or_rate_limit\",\n [\"upgrade your plan to continue\", \"add a payment method to continue\"]\n ]\n];\n\n/**\n * Some providers (notably Claude Code) report an environment failure — e.g. a\n * dropped login (401) — as a plain failed assistant message rather than a\n * structured visibleError, so it never gets the remediation card. This recovers\n * the env-fixable code from that message's text so the caller can still route the\n * user to the wizard. Returns null when the text isn't a recognized env failure\n * (so transient/unknown failures stay plain).\n */\nexport function classifyFailedAgentMessage(\n body: string | null | undefined\n): AgentRunErrorCode | null {\n if (!body) {\n return null;\n }\n const lower = body.toLowerCase();\n for (const [code, markers] of FAILED_MESSAGE_CODE_MARKERS) {\n if (markers.some((marker) => lower.includes(marker))) {\n return code;\n }\n }\n return null;\n}\n\nconst COMPLETED_AUTH_MESSAGE_MAX_LENGTH = 160;\nconst COMPLETED_AUTH_MESSAGE_PATTERN =\n /^not logged in\\s*(?:[·•:—-]|\\.)?\\s*please run\\s+\\/login[.!]?$/i;\n\n/**\n * Resolves a plain assistant message that should be recovered into a visible\n * error card. Failed messages keep the provider-agnostic fallback above.\n *\n * Claude Code demonstrates why completed messages need a narrow exception: its\n * SDK can return the standalone \"Not logged in · Please run /login\" notice\n * together with a successful result. Match the provider-owned output shape,\n * rather than branching on provider identity, and keep it short and\n * whole-message anchored so normal answers are not reclassified.\n */\nexport function classifyRecoverableAgentMessage(input: {\n body: string | null | undefined;\n statusKind: string | null | undefined;\n}): AgentRunErrorCode | null {\n if (input.statusKind === \"failed\") {\n return classifyFailedAgentMessage(input.body);\n }\n if (\n input.statusKind !== \"completed\" ||\n !input.body ||\n input.body.length > COMPLETED_AUTH_MESSAGE_MAX_LENGTH\n ) {\n return null;\n }\n return COMPLETED_AUTH_MESSAGE_PATTERN.test(input.body.trim())\n ? \"auth_required\"\n : null;\n}\n\n/** True when detail text is a provider plan/payment gate (not a generic quota). */\nexport function isProviderPlanLimitMessage(\n detail: string | null | undefined\n): boolean {\n const normalized = detail?.trim().toLowerCase() ?? \"\";\n if (!normalized) {\n return false;\n }\n const markers =\n FAILED_MESSAGE_CODE_MARKERS.find(\n ([code]) => code === \"quota_or_rate_limit\"\n )?.[1] ?? [];\n return markers.some((marker) => normalized.includes(marker));\n}\n","import type {\n AgentProviderActiveAction,\n AgentProviderActiveActionError,\n AgentProviderActiveActionPhase,\n AgentProviderActiveActionStep,\n AgentProviderActiveActionStepStatus,\n AgentProviderStatus\n} from \"@tutti-os/client-tuttid-ts\";\n\n// Compatibility aliases for the existing Agent Environment UI. The wire\n// contract is generated from OpenAPI; this module must not maintain a second\n// parser or enum vocabulary.\nexport type CodexSetupStepStatus = AgentProviderActiveActionStepStatus;\nexport type CodexSetupStep = AgentProviderActiveActionStep;\nexport type CodexSetupPhase = AgentProviderActiveActionPhase;\nexport type CodexSetupActiveActionError = AgentProviderActiveActionError;\nexport type CodexSetupActiveAction = AgentProviderActiveAction;\n\nexport function readCodexSetupActiveAction(\n status: Pick<AgentProviderStatus, \"activeAction\"> | null | undefined\n): AgentProviderActiveAction | null {\n return status?.activeAction ?? null;\n}\n","import type { AgentEnvPanelFocus } from \"./agentEnvPanelActions\";\nimport type {\n CodexSetupPhase,\n CodexSetupStepStatus\n} from \"./codexSetupContract\";\n\nexport type AgentSetupStageId =\n | \"detect\"\n | \"network\"\n | \"install\"\n | \"adapter\"\n | \"login\"\n | \"ready\";\n\nexport type StageDetailToken =\n | { kind: \"text\"; text: string }\n | { kind: \"version-floor\"; current: string; required: string }\n | { kind: \"version-mismatch\"; current: string; required: string };\n\n// Whether an availability reason code means the CLI itself is on an unsupported\n// version — as opposed to an ADAPTER version mismatch. The adapter reason code\n// `acp_adapter_version_mismatch` also contains the substring \"version\", so a\n// plain `includes(\"version\")` test wrongly paints the CLI step red (\"版本不受支持\")\n// when only the adapter is mismatched. Require \"version\" but exclude any adapter\n// reason so the CLI and adapter stages stay independent.\nexport function reasonCodeIndicatesCliVersionUnsupported(\n reasonCode: string | null | undefined\n): boolean {\n const lower = (reasonCode ?? \"\").toLowerCase();\n return lower.includes(\"version\") && !lower.includes(\"adapter\");\n}\n\nexport interface AgentSetupStage {\n id: AgentSetupStageId;\n label: string;\n status: CodexSetupStepStatus;\n detail: StageDetailToken | null;\n /**\n * Optional explicit problem token for a blocked stage that can't be inferred\n * from `status` alone. Today only the install stage sets it — when the codex\n * launcher is present but its platform subpackage is missing, the stage is\n * `pending` (the daemon repairs it via the install action) yet needs a distinct\n * \"platform package missing\" problem rather than the generic \"install-missing\".\n */\n problem?: StageProblem;\n authMethod?: string | null;\n}\n\nexport interface AgentSetupStageLabels {\n detect: string;\n network: string;\n install: string;\n adapter: string;\n login: string;\n ready: string;\n}\n\nexport interface DeriveAgentSetupStagesInput {\n detected: boolean;\n cliInstalled: boolean;\n versionTooOld: boolean;\n /**\n * The codex CLI launcher is resolved but its platform-specific optional\n * dependency subpackage (e.g. @openai/codex-darwin-arm64) is missing — the\n * binary spawns ENOENT. The daemon repairs this in place via the install\n * action, so the install stage is `pending` (not `ok`) with a distinct\n * \"platform package missing\" problem token.\n */\n platformPackageIncomplete?: boolean;\n adapterInstalled: boolean;\n adapterVersionMismatch: boolean;\n authenticated: boolean;\n authRequired: boolean;\n ready: boolean;\n activePhase: CodexSetupPhase | null;\n /**\n * Whether the daemon-driven install action is in flight. This is the\n * authoritative \"installing\" signal: the adapter (external-registry) installer\n * emits no activeAction phase, so without this an in-progress adapter install\n * would show no spinner.\n */\n installActionPending: boolean;\n /** Whether a provider CLI update is in flight. */\n updateActionPending: boolean;\n loginPending: boolean;\n /**\n * Active connectivity probe verdict: true (reachable), false (offline), or\n * null when the daemon reported no network info (older daemon / not probed) —\n * null is treated as \"don't block\".\n */\n networkReachable: boolean | null;\n cliVersionDetail: StageDetailToken | null;\n adapterDetail: StageDetailToken | null;\n accountDetail: StageDetailToken | null;\n authMethod: string | null;\n networkDetail: StageDetailToken | null;\n labels: AgentSetupStageLabels;\n}\n\nconst INSTALLING_PHASES: ReadonlySet<CodexSetupPhase> = new Set([\n \"install\",\n \"repair\",\n \"verify\"\n]);\n\n/**\n * Maps primitive provider-status flags onto the fixed 5-stage track the wizard\n * renders. Version verification folds into the install (CLI) stage (an\n * unsupported version means install is `error`, not `ok`). The adapter stage\n * covers any provider runtime component installed separately from its CLI,\n * such as an SDK sidecar; where no separate component exists it simply tracks\n * the CLI. Login `running` is driven\n * by the caller's pending flag because login runs as a terminal action, not via\n * the activeAction phase stream.\n */\nexport function deriveAgentSetupStages(\n input: DeriveAgentSetupStagesInput\n): AgentSetupStage[] {\n const installing =\n input.installActionPending ||\n (input.activePhase ? INSTALLING_PHASES.has(input.activePhase) : false);\n const updating = input.updateActionPending || input.activePhase === \"update\";\n\n const detectStatus: CodexSetupStepStatus = input.detected ? \"ok\" : \"running\";\n\n // Network is an independent live-connectivity check (registry + provider API),\n // so it is NOT folded into the `ready` short-circuit — a real outage shows even\n // when the CLI is otherwise configured. It can only be judged once detection\n // has run; `false` is the only blocking value (null = no daemon verdict).\n const networkStatus: CodexSetupStepStatus = !input.detected\n ? \"pending\"\n : input.networkReachable === false\n ? \"error\"\n : \"ok\";\n\n // A satisfied CLI stays checked even while an install runs, so the spinner\n // lands on the stage actually being worked on (e.g. the adapter during a\n // repair) rather than flipping every install-related stage back to running.\n // A present launcher with a missing platform subpackage is NOT ok — the\n // daemon repairs it via the install action, so it reads as a pending install.\n const cliOk =\n input.ready ||\n (input.cliInstalled &&\n !input.versionTooOld &&\n !input.platformPackageIncomplete);\n const installStatus: CodexSetupStepStatus = updating\n ? \"running\"\n : cliOk\n ? \"ok\"\n : installing\n ? \"running\"\n : input.versionTooOld\n ? \"error\"\n : \"pending\";\n const installProblem: StageProblem | undefined =\n input.platformPackageIncomplete && !cliOk\n ? \"install-platform-incomplete\"\n : undefined;\n\n const adapterOk =\n input.ready || (input.adapterInstalled && !input.adapterVersionMismatch);\n const adapterStatus: CodexSetupStepStatus = adapterOk\n ? \"ok\"\n : installing\n ? \"running\"\n : input.adapterVersionMismatch\n ? \"error\"\n : \"pending\";\n\n const loginStatus: CodexSetupStepStatus = input.authenticated\n ? \"ok\"\n : input.loginPending\n ? \"running\"\n : \"pending\";\n\n const readyStatus: CodexSetupStepStatus = input.ready ? \"ok\" : \"pending\";\n\n return [\n {\n id: \"detect\",\n label: input.labels.detect,\n status: detectStatus,\n detail: null\n },\n {\n id: \"network\",\n label: input.labels.network,\n status: networkStatus,\n detail: input.networkDetail\n },\n {\n id: \"install\",\n label: input.labels.install,\n status: installStatus,\n detail: input.cliVersionDetail,\n ...(installProblem ? { problem: installProblem } : {})\n },\n {\n id: \"adapter\",\n label: input.labels.adapter,\n status: adapterStatus,\n detail: input.adapterDetail\n },\n {\n id: \"login\",\n label: input.labels.login,\n status: loginStatus,\n detail: input.accountDetail,\n authMethod: input.authMethod\n },\n {\n id: \"ready\",\n label: input.labels.ready,\n status: readyStatus,\n detail: null\n }\n ];\n}\n\n/**\n * Step-by-step reveal: even when prerequisites are already satisfied, the wizard\n * walks a cursor down the track so each stage visibly \"checks off\" one at a time\n * instead of all flashing complete at once.\n *\n * `revealIndex` is the cursor position. Stages before it show their real status\n * (already revealed). The stage AT the cursor is shown as `running` when its\n * real status is terminal-ok (the brief \"working on it\" moment before it checks\n * off) and otherwise shows its real status (so a genuinely running install, an\n * error, or a blocked prerequisite are honest). Stages after the cursor are\n * dimmed to `pending`.\n */\nexport function projectRevealedStages(\n realStages: AgentSetupStage[],\n revealIndex: number\n): AgentSetupStage[] {\n return realStages.map((stage, index) => {\n if (index < revealIndex) {\n return stage;\n }\n if (index === revealIndex) {\n if (stage.status === \"ok\" || stage.status === \"skipped\") {\n return { ...stage, status: \"running\" };\n }\n return stage;\n }\n return { ...stage, status: \"pending\" };\n });\n}\n\n/**\n * The reveal cursor advances past a stage only once that stage is really done\n * (`ok`/`skipped`). It parks on a stage that is still `running` (a real install\n * in progress), `error`, or `pending` (a blocked prerequisite) — so the\n * animation never races ahead of reality.\n */\nexport function shouldAdvanceReveal(\n realStages: AgentSetupStage[],\n revealIndex: number\n): boolean {\n const cursor = realStages[revealIndex];\n if (!cursor) {\n return false;\n }\n return cursor.status === \"ok\" || cursor.status === \"skipped\";\n}\n\nexport type StageActionId = \"install\" | \"login\" | \"redetect\" | \"update\";\n\n/**\n * The problem token a blocked stage represents. The UI maps this to \"未xxx\"\n * copy; keeping it i18n-agnostic here lets the mapping stay tested without\n * pulling translation strings into the pure flow module.\n */\nexport type StageProblem =\n | \"network-unreachable\"\n | \"install-missing\"\n | \"install-outdated\"\n | \"install-platform-incomplete\"\n | \"adapter-missing\"\n | \"adapter-mismatch\"\n | \"login-missing\";\n\nexport interface StageRemediation {\n actionId: StageActionId;\n problem: StageProblem;\n}\n\n/**\n * For a stage the user must act on (idle `pending`/`error`, never `running` or\n * `ok`), returns what is wrong and which action fixes it. `detect`/`ready` never\n * carry their own remediation — they reflect prerequisites, not user actions.\n *\n * `error` means a version problem on the install/adapter stages (the only stages\n * derive marks `error`); `pending` means the step simply has not run yet.\n */\nexport function stageRemediation(\n stage: AgentSetupStage\n): StageRemediation | null {\n if (stage.status !== \"pending\" && stage.status !== \"error\") {\n return null;\n }\n switch (stage.id) {\n case \"network\":\n // Connectivity isn't fixed by an install/login action — re-running\n // detection (which re-probes the network) is the remediation.\n return { actionId: \"redetect\", problem: \"network-unreachable\" };\n case \"install\":\n // An explicit problem token (today: platform subpackage missing) takes\n // precedence — the daemon repairs it in place via the install action, so\n // route through install rather than the manual-upgrade error path.\n if (stage.problem) {\n return { actionId: \"install\", problem: stage.problem };\n }\n // A genuinely missing CLI is installed for the user; a present-but-\n // outdated CLI is NOT — we don't silently reinstall a binary the user\n // manages. Instead the panel shows the manual upgrade command and\n // re-detection confirms it once they've upgraded.\n return stage.status === \"error\"\n ? { actionId: \"redetect\", problem: \"install-outdated\" }\n : { actionId: \"install\", problem: \"install-missing\" };\n case \"adapter\":\n return {\n actionId: \"install\",\n problem:\n stage.status === \"error\" ? \"adapter-mismatch\" : \"adapter-missing\"\n };\n case \"login\":\n return { actionId: \"login\", problem: \"login-missing\" };\n default:\n return null;\n }\n}\n\nexport interface ResolveWizardAutoStartInput {\n focus: AgentEnvPanelFocus | null;\n detected: boolean;\n ready: boolean;\n installPending: boolean;\n loginPending: boolean;\n}\n\n/**\n * Decides whether opening the wizard with a remediation focus should auto-start\n * an action. Returns the action id to run, or null when nothing should run\n * (non-remediation focus, detection not settled, already ready, or already\n * pending). The caller is responsible for firing this at most once per open.\n */\nexport function resolveWizardAutoStartAction(\n input: ResolveWizardAutoStartInput\n): \"install\" | \"login\" | null {\n const candidate = autoStartCandidate(input.focus);\n if (!candidate) {\n return null;\n }\n if (!input.detected || input.ready) {\n return null;\n }\n if (candidate === \"install\" && input.installPending) {\n return null;\n }\n if (candidate === \"login\" && input.loginPending) {\n return null;\n }\n return candidate;\n}\n\nfunction autoStartCandidate(\n focus: AgentEnvPanelFocus | null\n): \"install\" | \"login\" | null {\n switch (focus) {\n case \"install\":\n case \"repair\":\n return \"install\";\n case \"upgrade\":\n // CLI upgrades are user-driven: opening the panel from a version error\n // shows the manual upgrade command rather than auto-running an install\n // (which can't upgrade an already-present binary anyway).\n return null;\n case \"auth\":\n return \"login\";\n default:\n return null;\n }\n}\n","import type {\n AgentProviderStatus,\n WorkspaceAgentProvider\n} from \"@tutti-os/client-tuttid-ts\";\nimport {\n deriveAgentSetupStages,\n projectRevealedStages,\n reasonCodeIndicatesCliVersionUnsupported,\n type AgentSetupStage,\n type AgentSetupStageId,\n type AgentSetupStageLabels,\n type StageDetailToken\n} from \"./agentEnvWizardFlow.ts\";\nimport type {\n CodexSetupActiveAction,\n CodexSetupActiveActionError,\n CodexSetupPhase\n} from \"./codexSetupContract.ts\";\n\nexport interface NetworkCheck {\n kind: \"registry\" | \"api\" | \"proxy\";\n reachable: boolean;\n host: string | null;\n configured?: boolean;\n}\n\nconst MANUAL_INSTALL_COMMANDS: Partial<Record<WorkspaceAgentProvider, string>> =\n {\n codex: \"npm install -g @openai/codex --include=optional\",\n \"claude-code\": \"curl -fsSL https://claude.ai/install.sh | bash\",\n cursor: \"curl https://cursor.com/install -fsS | bash\",\n opencode: \"curl -fsSL https://opencode.ai/install | bash\"\n };\n\nfunction endpointHost(endpoint: string | null | undefined): string | null {\n if (!endpoint) {\n return null;\n }\n return endpoint.replace(/^https?:\\/\\//, \"\").replace(/\\/.*$/, \"\") || null;\n}\n\n// A proxy URL may carry credentials (http://user:pass@host:port). Strip the\n// userinfo before it reaches the renderer/UI so proxy passwords are never\n// surfaced; the scheme + host:port are kept for display.\nfunction scrubProxyUrl(url: string | null | undefined): string | null {\n if (!url) {\n return null;\n }\n try {\n const parsed = new URL(url);\n parsed.username = \"\";\n parsed.password = \"\";\n return `${parsed.protocol}//${parsed.host}`;\n } catch {\n // Not a parseable URL — still strip a leading userinfo segment defensively.\n return url.replace(/\\/\\/[^/@]*@/, \"//\") || null;\n }\n}\n\nfunction textToken(text: string | null): StageDetailToken | null {\n return text ? { kind: \"text\", text } : null;\n}\n\nfunction joinDetail(parts: Array<string | null | undefined>): string | null {\n const joined = parts.filter((p): p is string => Boolean(p)).join(\" · \");\n return joined || null;\n}\n\nexport function deriveHasAnomaly(\n stages: AgentSetupStage[],\n activeActionError: CodexSetupActiveActionError | null\n): boolean {\n return stages.some((s) => s.status === \"error\") || Boolean(activeActionError);\n}\n\nexport interface AgentEnvWizardViewModelInput {\n provider: WorkspaceAgentProvider;\n status: AgentProviderStatus | null;\n isLoading: boolean;\n activeAction: CodexSetupActiveAction | null;\n installActionPending: boolean;\n updateActionPending: boolean;\n loginPending: boolean;\n revealIndex: number;\n stageLabels: AgentSetupStageLabels;\n}\n\nexport interface AgentEnvWizardViewModel {\n ready: boolean;\n busy: boolean;\n redetecting: boolean;\n displayStages: AgentSetupStage[];\n blockingStageId: AgentSetupStageId | null;\n networkChecks: NetworkCheck[];\n hasAnomaly: boolean;\n activePhase: CodexSetupPhase | null;\n log: string[];\n registry: string | null;\n error: CodexSetupActiveActionError | null;\n manualCommand: string | null;\n installPending: boolean;\n updateAvailable: boolean;\n updating: boolean;\n loginPending: boolean;\n}\n\nexport function buildAgentEnvWizardViewModel(\n input: AgentEnvWizardViewModelInput\n): AgentEnvWizardViewModel {\n const { status, activeAction, provider } = input;\n const ready = status?.availability.status === \"ready\";\n const installPending = input.installActionPending;\n const updatePending = input.updateActionPending;\n const loginPending = input.loginPending;\n const updating = updatePending || activeAction?.phase === \"update\";\n const busy =\n installPending ||\n updating ||\n activeAction?.phase === \"install\" ||\n activeAction?.phase === \"repair\" ||\n activeAction?.phase === \"verify\";\n\n const reasonCode = (status?.availability.reasonCode ?? \"\").toLowerCase();\n const versionTooOld = reasonCodeIndicatesCliVersionUnsupported(reasonCode);\n const cliBelowFloor = reasonCode.includes(\"codex_version_too_old\");\n // The codex launcher is present but its platform subpackage is missing — the\n // CLI spawns ENOENT. The daemon repairs this in place via the install action;\n // the wizard must NOT mark the install stage ok just because the launcher\n // resolved.\n const platformPackageIncomplete = reasonCode.includes(\n \"codex_platform_pkg_incomplete\"\n );\n const adapterVersionMismatch = reasonCode.includes(\n \"acp_adapter_version_mismatch\"\n );\n\n const cliDetail: StageDetailToken | null =\n cliBelowFloor && status?.cli.version && status.cli.minVersion\n ? {\n kind: \"version-floor\",\n current: status.cli.version,\n required: status.cli.minVersion\n }\n : status?.cli.installed\n ? textToken(joinDetail([status?.cli.version, status?.cli.binaryPath]))\n : textToken(status?.cli.version ?? null);\n\n const adapterDetail: StageDetailToken | null =\n adapterVersionMismatch &&\n status?.adapter.version &&\n status?.adapter.requiredVersion\n ? {\n kind: \"version-mismatch\",\n current: status.adapter.version,\n required: status.adapter.requiredVersion\n }\n : status?.adapter.installed\n ? textToken(\n joinDetail([status?.adapter.version, status?.adapter.binaryPath])\n )\n : textToken(\n status?.adapter.binaryPath ??\n (status?.adapter.command?.length\n ? status.adapter.command.join(\" \")\n : null)\n );\n\n const networkChecks: NetworkCheck[] = status?.network\n ? [\n {\n kind: \"registry\",\n reachable: status.network.registry.reachable,\n host: endpointHost(status.network.registry.endpoint)\n },\n ...(status.network.providerApi\n ? [\n {\n kind: \"api\" as const,\n reachable: status.network.providerApi.reachable,\n host: endpointHost(status.network.providerApi.endpoint)\n }\n ]\n : []),\n ...(status.network.proxy\n ? [\n {\n kind: \"proxy\" as const,\n reachable:\n !status.network.proxy.configured ||\n status.network.proxy.reachable,\n host: scrubProxyUrl(status.network.proxy.url),\n configured: status.network.proxy.configured\n }\n ]\n : [])\n ]\n : [];\n const networkReachable =\n networkChecks.length === 0 ? null : networkChecks.every((c) => c.reachable);\n\n const accountDetail: StageDetailToken | null = status?.auth.accountLabel\n ? { kind: \"text\", text: status.auth.accountLabel }\n : status?.auth.status === \"authenticated\"\n ? { kind: \"text\", text: \"__SIGNED_IN__\" }\n : null;\n const authMethod: string | null = status?.auth.authMethod ?? null;\n\n const stages = deriveAgentSetupStages({\n detected: status !== null,\n cliInstalled: status?.cli.installed ?? false,\n versionTooOld,\n platformPackageIncomplete,\n adapterInstalled: status?.adapter.installed ?? false,\n adapterVersionMismatch,\n authenticated: status?.auth.status === \"authenticated\",\n authRequired: status?.auth.status === \"required\",\n ready: Boolean(ready),\n activePhase: activeAction?.phase ?? null,\n installActionPending: installPending,\n updateActionPending: updatePending,\n loginPending,\n networkReachable,\n cliVersionDetail: cliDetail,\n adapterDetail,\n accountDetail,\n authMethod,\n networkDetail: null,\n labels: input.stageLabels\n });\n\n const registry = activeAction?.registry ?? null;\n const stagesWithDetail = registry\n ? stages.map((s) =>\n s.id === \"ready\"\n ? { ...s, detail: { kind: \"text\" as const, text: registry } }\n : s\n )\n : stages;\n const displayStages = projectRevealedStages(\n stagesWithDetail,\n input.revealIndex\n );\n\n const blockingIndex = stages.findIndex((s) => s.status !== \"ok\");\n const blockingStage = blockingIndex >= 0 ? stages[blockingIndex] : undefined;\n const blockingStageId: AgentSetupStageId | null =\n blockingStage && input.revealIndex >= blockingIndex\n ? blockingStage.id\n : null;\n\n return {\n ready: Boolean(ready),\n busy: Boolean(busy),\n redetecting: input.isLoading,\n displayStages,\n blockingStageId,\n networkChecks,\n hasAnomaly: deriveHasAnomaly(stages, activeAction?.error ?? null),\n activePhase: activeAction?.phase ?? null,\n log: activeAction?.log ?? [],\n registry,\n error: activeAction?.error ?? null,\n manualCommand: MANUAL_INSTALL_COMMANDS[provider] ?? null,\n installPending,\n updateAvailable:\n updatePending ||\n (status?.update?.updateAvailable === true &&\n status.actions.some((action) => action.id === \"update\")),\n updating,\n loginPending\n };\n}\n"],"mappings":";AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AAmBP,IAAM,6BACJ,cAA8C,IAAI;AAE7C,SAAS,4BAA4B;AAAA,EAC1C;AAAA,EACA;AACF,GAGiB;AACf,SAAO;AAAA,IACL,2BAA2B;AAAA,IAC3B,EAAE,OAAO,aAAa,KAAK;AAAA,IAC3B;AAAA,EACF;AACF;AAGO,SAAS,uBAAuD;AACrE,SAAO,WAAW,0BAA0B;AAC9C;;;ACDA,IAAM,SAAS,EAAE,OAAO,MAAM,WAAW,KAAK;AAK9C,IAAM,cAAc;AAAA,EAClB,YAAY;AAAA,EACZ,OAAO;AAAA,EACP,WAAW;AACb;AAEA,IAAM,gBAAmE;AAAA;AAAA,EAEvE,eAAe;AAAA,IACb,YAAY;AAAA,IACZ,OAAO;AAAA,IACP,WAAW;AAAA,EACb;AAAA,EACA,eAAe;AAAA,IACb,YAAY;AAAA,IACZ,OAAO;AAAA,IACP,WAAW;AAAA,EACb;AAAA,EACA,yBAAyB;AAAA,IACvB,YAAY;AAAA,IACZ,OAAO;AAAA,IACP,WAAW;AAAA,EACb;AAAA,EACA,eAAe;AAAA,IACb,YAAY;AAAA,IACZ,OAAO;AAAA,IACP,WAAW;AAAA,EACb;AAAA,EACA,qBAAqB;AAAA,IACnB,YAAY;AAAA,IACZ,OAAO;AAAA,IACP,WAAW;AAAA,EACb;AAAA;A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AAED,QAAM,WAAW,cAAc,YAAY;AAC3C,QAAM,mBAAmB,WACrB,OAAO;AAAA,IAAI,CAAC,MACV,EAAE,OAAO,UACL,EAAE,GAAG,GAAG,QAAQ,EAAE,MAAM,QAAiB,MAAM,SAAS,EAAE,IAC1D;AAAA,EACN,IACA;AACJ,QAAM,gBAAgB;AAAA,IACpB;AAAA,IACA,MAAM;AAAA,EACR;AAEA,QAAM,gBAAgB,OAAO,UAAU,CAAC,MAAM,EAAE,WAAW,IAAI;AAC/D,QAAM,gBAAgB,iBAAiB,IAAI,OAAO,aAAa,IAAI;AACnE,QAAM,kBACJ,iBAAiB,MAAM,eAAe,gBAClC,cAAc,KACd;AAEN,SAAO;AAAA,IACL,OAAO,QAAQ,KAAK;AAAA,IACpB,MAAM,QAAQ,IAAI;AAAA,IAClB,aAAa,MAAM;AAAA,IACnB;AAAA,IACA;AAAA,IACA;AAAA,IACA,YAAY,iBAAiB,QAAQ,cAAc,SAAS,IAAI;AAAA,IAChE,aAAa,cAAc,SAAS;AAAA,IACpC,KAAK,cAAc,OAAO,CAAC;AAAA,IAC3B;AAAA,IACA,OAAO,cAAc,SAAS;AAAA,IAC9B,eAAe,wBAAwB,QAAQ,KAAK;AAAA,IACpD;AAAA,IACA,iBACE,iBACC,QAAQ,QAAQ,oBAAoB,QACnC,OAAO,QAAQ,KAAK,CAAC,WAAW,OAAO,OAAO,QAAQ;AAAA,IAC1D;AAAA,IACA;AAAA,EACF;AACF;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../shared/agentEnv/agentEnvPanelActions.ts","../shared/agentEnv/agentErrorPresentation.ts","../shared/agentEnv/codexSetupContract.ts","../shared/agentEnv/agentEnvWizardFlow.ts","../shared/agentEnv/agentEnvViewModel.ts"],"sourcesContent":["import {\n createContext,\n createElement,\n useContext,\n type ReactElement,\n type ReactNode\n} from \"react\";\n\n/** Setup section requested by an AgentGUI remediation action. */\nexport type AgentEnvPanelFocus =\n | \"detect\"\n | \"install\"\n | \"repair\"\n | \"upgrade\"\n | \"auth\"\n | \"network\"\n | \"registry\";\n\nexport interface OpenAgentEnvPanelInput {\n provider?: string | null;\n focus?: AgentEnvPanelFocus | null;\n}\n\nexport type OpenAgentEnvPanelAction = (input?: OpenAgentEnvPanelInput) => void;\n\nconst AgentEnvPanelActionContext =\n createContext<OpenAgentEnvPanelAction | null>(null);\n\nexport function AgentEnvPanelActionProvider({\n children,\n openPanel\n}: {\n children: ReactNode;\n openPanel?: OpenAgentEnvPanelAction;\n}): ReactElement {\n return createElement(\n AgentEnvPanelActionContext.Provider,\n { value: openPanel ?? null },\n children\n );\n}\n\n/** Host-injected command; AgentGUI never owns the panel workflow state. */\nexport function useOpenAgentEnvPanel(): OpenAgentEnvPanelAction | null {\n return useContext(AgentEnvPanelActionContext);\n}\n","import type { AgentEnvPanelFocus } from \"./agentEnvPanelActions\";\n\n/**\n * Run-failure codes actually emitted by the daemon runtime classifier\n * (packages/agent/daemon/runtime/visible_error.go `visibleFailureCode`). These\n * are the codes the conversation error card really receives — unlike the\n * aspirational `CODEX_*` codes, which the run pipeline never produces.\n *\n * Keep this union aligned with the Go switch in `visibleFailureCode`.\n */\nexport type AgentRunErrorCode =\n | \"auth_required\"\n | \"cli_not_found\"\n | \"cli_version_unsupported\"\n | \"network_error\"\n | \"runtime_unavailable\"\n | \"request_timed_out\"\n | \"provider_config_timeout\"\n | \"provider_stream_disconnected\"\n | \"provider_concurrency_limit\"\n | \"insufficient_credits\"\n | \"quota_or_rate_limit\"\n | \"process_exited\"\n | \"provider_error\"\n | \"unknown\";\n\nexport interface AgentErrorPresentation {\n /**\n * i18n key for the one human sentence shown in the card, or null to let the\n * caller fall back to its phase-aware generic title.\n */\n messageKey: string | null;\n /**\n * Env-panel section the remediation button deep-links to, or null when the\n * failure is transient/server-side and the wizard cannot fix it — in which\n * case no call-to-action is shown (showing one would misrepresent reality).\n */\n focus: AgentEnvPanelFocus | null;\n /** i18n key for the remediation button. */\n actionKey: string | null;\n /** External remediation destination, when the action is account-level. */\n externalUrl?: string | null;\n}\n\nconst NO_CTA = { focus: null, actionKey: null } as const;\n\n// The escape hatch for hard failures whose cause is ambiguous from the message\n// alone (a non-zero exit, an unclassified provider error): send the user into\n// the wizard to self-detect, but keep the generic message.\nconst SELF_DETECT = {\n messageKey: null,\n focus: \"detect\" as const,\n actionKey: \"agentHost.agentGui.visibleErrorActionDetect\"\n};\n\nconst PRESENTATIONS: Record<AgentRunErrorCode, AgentErrorPresentation> = {\n // Environment problems the wizard can detect or repair → route to its step.\n auth_required: {\n messageKey: \"agentHost.agentGui.visibleErrorAuthRequired\",\n focus: \"auth\",\n actionKey: \"agentHost.agentGui.visibleErrorActionRelogin\"\n },\n cli_not_found: {\n messageKey: \"agentHost.agentGui.visibleErrorCliNotFound\",\n focus: \"install\",\n actionKey: \"agentHost.agentGui.visibleErrorActionInstall\"\n },\n cli_version_unsupported: {\n messageKey: \"agentHost.agentGui.visibleErrorVersionUnsupported\",\n focus: \"upgrade\",\n actionKey: \"agentHost.agentGui.visibleErrorActionUpgrade\"\n },\n network_error: {\n messageKey: \"agentHost.agentGui.visibleErrorNetwork\",\n focus: \"network\",\n actionKey: \"agentHost.agentGui.visibleErrorActionCheckNetwork\"\n },\n runtime_unavailable: {\n messageKey: \"agentHost.agentGui.visibleErrorRuntimeUnavailable\",\n focus: \"detect\",\n actionKey: \"agentHost.agentGui.visibleErrorActionDetect\"\n },\n // Transient / server-side failures: accurate copy, but no wizard CTA — it\n // cannot fix a rate limit or a dropped stream.\n request_timed_out: {\n messageKey: \"agentHost.agentGui.visibleErrorRequestTimedOut\",\n ...NO_CTA\n },\n provider_config_timeout: {\n messageKey: \"agentHost.agentGui.visibleErrorConfigTimeout\",\n ...NO_CTA\n },\n provider_stream_disconnected: {\n messageKey: \"agentHost.agentGui.visibleErrorStreamDisconnected\",\n ...NO_CTA\n },\n provider_concurrency_limit: {\n messageKey: \"agentHost.agentGui.visibleErrorConcurrencyLimit\",\n ...NO_CTA\n },\n insufficient_credits: {\n messageKey: \"agentHost.agentGui.visibleErrorInsufficientCredits\",\n focus: null,\n actionKey: \"agentHost.agentGui.visibleErrorActionViewPlans\",\n externalUrl: \"https://tutti.sh/profile/plan\"\n },\n quota_or_rate_limit: {\n messageKey: \"agentHost.agentGui.visibleErrorQuotaOrRateLimit\",\n ...NO_CTA\n },\n // Ambiguous hard failures → generic message + self-detect escape hatch.\n process_exited: SELF_DETECT,\n provider_error: SELF_DETECT,\n unknown: SELF_DETECT\n};\n\n/**\n * Resolves the card presentation for a run-failure code. Returns null for codes\n * outside the known vocabulary so the caller renders its plain generic card with\n * no call-to-action.\n */\nexport function resolveAgentErrorPresentation(\n code: string | null | undefined\n): AgentErrorPresentation | null {\n if (!code) {\n return null;\n }\n return PRESENTATIONS[code as AgentRunErrorCode] ?? null;\n}\n\nconst FAILED_MESSAGE_CODE_MARKERS: ReadonlyArray<\n readonly [AgentRunErrorCode, readonly string[]]\n> = [\n [\n \"auth_required\",\n [\n \"authentication_failed\",\n \"invalid authentication credentials\",\n \"401 invalid authentication\",\n \"unauthorized\",\n \"not logged in\",\n \"please run /login\",\n \"invalid api key\"\n ]\n ],\n [\n \"cli_version_unsupported\",\n [\"requires a newer version\", \"version is too old\", \"unsupported version\"]\n ],\n [\n \"cli_not_found\",\n [\n \"no such file or directory\",\n \"command not found\",\n \"enoent\",\n \"executable file not found\"\n ]\n ],\n [\n \"network_error\",\n [\"enotfound\", \"econnrefused\", \"econnreset\", \"getaddrinfo\", \"socket hang up\"]\n ],\n [\n \"quota_or_rate_limit\",\n [\"upgrade your plan to continue\", \"add a payment method to continue\"]\n ]\n];\n\n/**\n * Some providers (notably Claude Code) report an environment failure — e.g. a\n * dropped login (401) — as a plain failed assistant message rather than a\n * structured visibleError, so it never gets the remediation card. This recovers\n * the env-fixable code from that message's text so the caller can still route the\n * user to the wizard. Returns null when the text isn't a recognized env failure\n * (so transient/unknown failures stay plain).\n */\nexport function classifyFailedAgentMessage(\n body: string | null | undefined\n): AgentRunErrorCode | null {\n if (!body) {\n return null;\n }\n const lower = body.toLowerCase();\n for (const [code, markers] of FAILED_MESSAGE_CODE_MARKERS) {\n if (markers.some((marker) => lower.includes(marker))) {\n return code;\n }\n }\n return null;\n}\n\nconst COMPLETED_AUTH_MESSAGE_MAX_LENGTH = 160;\nconst COMPLETED_AUTH_MESSAGE_PATTERN =\n /^not logged in\\s*(?:[·•:—-]|\\.)?\\s*please run\\s+\\/login[.!]?$/i;\n\n/**\n * Resolves a plain assistant message that should be recovered into a visible\n * error card. Failed messages keep the provider-agnostic fallback above.\n *\n * Claude Code demonstrates why completed messages need a narrow exception: its\n * SDK can return the standalone \"Not logged in · Please run /login\" notice\n * together with a successful result. Match the provider-owned output shape,\n * rather than branching on provider identity, and keep it short and\n * whole-message anchored so normal answers are not reclassified.\n */\nexport function classifyRecoverableAgentMessage(input: {\n body: string | null | undefined;\n statusKind: string | null | undefined;\n}): AgentRunErrorCode | null {\n if (input.statusKind === \"failed\") {\n return classifyFailedAgentMessage(input.body);\n }\n if (\n input.statusKind !== \"completed\" ||\n !input.body ||\n input.body.length > COMPLETED_AUTH_MESSAGE_MAX_LENGTH\n ) {\n return null;\n }\n return COMPLETED_AUTH_MESSAGE_PATTERN.test(input.body.trim())\n ? \"auth_required\"\n : null;\n}\n\n/** True when detail text is a provider plan/payment gate (not a generic quota). */\nexport function isProviderPlanLimitMessage(\n detail: string | null | undefined\n): boolean {\n const normalized = detail?.trim().toLowerCase() ?? \"\";\n if (!normalized) {\n return false;\n }\n const markers =\n FAILED_MESSAGE_CODE_MARKERS.find(\n ([code]) => code === \"quota_or_rate_limit\"\n )?.[1] ?? [];\n return markers.some((marker) => normalized.includes(marker));\n}\n","import type {\n AgentProviderActiveAction,\n AgentProviderActiveActionError,\n AgentProviderActiveActionPhase,\n AgentProviderActiveActionStep,\n AgentProviderActiveActionStepStatus,\n AgentProviderStatus\n} from \"@tutti-os/client-tuttid-ts\";\n\n// Compatibility aliases for the existing Agent Environment UI. The wire\n// contract is generated from OpenAPI; this module must not maintain a second\n// parser or enum vocabulary.\nexport type CodexSetupStepStatus = AgentProviderActiveActionStepStatus;\nexport type CodexSetupStep = AgentProviderActiveActionStep;\nexport type CodexSetupPhase = AgentProviderActiveActionPhase;\nexport type CodexSetupActiveActionError = AgentProviderActiveActionError;\nexport type CodexSetupActiveAction = AgentProviderActiveAction;\n\nexport function readCodexSetupActiveAction(\n status: Pick<AgentProviderStatus, \"activeAction\"> | null | undefined\n): AgentProviderActiveAction | null {\n return status?.activeAction ?? null;\n}\n","import type { AgentEnvPanelFocus } from \"./agentEnvPanelActions\";\nimport type {\n CodexSetupPhase,\n CodexSetupStepStatus\n} from \"./codexSetupContract\";\n\nexport type AgentSetupStageId =\n | \"detect\"\n | \"network\"\n | \"install\"\n | \"adapter\"\n | \"login\"\n | \"ready\";\n\nexport type StageDetailToken =\n | { kind: \"text\"; text: string }\n | { kind: \"version-floor\"; current: string; required: string }\n | { kind: \"version-mismatch\"; current: string; required: string };\n\n// Whether an availability reason code means the CLI itself is on an unsupported\n// version — as opposed to an ADAPTER version mismatch. The adapter reason code\n// `acp_adapter_version_mismatch` also contains the substring \"version\", so a\n// plain `includes(\"version\")` test wrongly paints the CLI step red (\"版本不受支持\")\n// when only the adapter is mismatched. Require \"version\" but exclude any adapter\n// reason so the CLI and adapter stages stay independent.\nexport function reasonCodeIndicatesCliVersionUnsupported(\n reasonCode: string | null | undefined\n): boolean {\n const lower = (reasonCode ?? \"\").toLowerCase();\n return lower.includes(\"version\") && !lower.includes(\"adapter\");\n}\n\nexport interface AgentSetupStage {\n id: AgentSetupStageId;\n label: string;\n status: CodexSetupStepStatus;\n detail: StageDetailToken | null;\n /**\n * Optional explicit problem token for a blocked stage that can't be inferred\n * from `status` alone. Today only the install stage sets it — when the codex\n * launcher is present but its platform subpackage is missing, the stage is\n * `pending` (the daemon repairs it via the install action) yet needs a distinct\n * \"platform package missing\" problem rather than the generic \"install-missing\".\n */\n problem?: StageProblem;\n authMethod?: string | null;\n}\n\nexport interface AgentSetupStageLabels {\n detect: string;\n network: string;\n install: string;\n adapter: string;\n login: string;\n ready: string;\n}\n\nexport interface DeriveAgentSetupStagesInput {\n detected: boolean;\n cliInstalled: boolean;\n versionTooOld: boolean;\n /**\n * The codex CLI launcher is resolved but its platform-specific optional\n * dependency subpackage (e.g. @openai/codex-darwin-arm64) is missing — the\n * binary spawns ENOENT. The daemon repairs this in place via the install\n * action, so the install stage is `pending` (not `ok`) with a distinct\n * \"platform package missing\" problem token.\n */\n platformPackageIncomplete?: boolean;\n adapterInstalled: boolean;\n adapterVersionMismatch: boolean;\n authenticated: boolean;\n authRequired: boolean;\n ready: boolean;\n activePhase: CodexSetupPhase | null;\n /**\n * Whether the daemon-driven install action is in flight. This is the\n * authoritative \"installing\" signal: the adapter (external-registry) installer\n * emits no activeAction phase, so without this an in-progress adapter install\n * would show no spinner.\n */\n installActionPending: boolean;\n /** Whether a provider CLI update is in flight. */\n updateActionPending: boolean;\n loginPending: boolean;\n /**\n * Active connectivity probe verdict: true (reachable), false (offline), or\n * null when the daemon reported no network info (older daemon / not probed) —\n * null is treated as \"don't block\".\n */\n networkReachable: boolean | null;\n cliVersionDetail: StageDetailToken | null;\n adapterDetail: StageDetailToken | null;\n accountDetail: StageDetailToken | null;\n authMethod: string | null;\n networkDetail: StageDetailToken | null;\n labels: AgentSetupStageLabels;\n}\n\nconst INSTALLING_PHASES: ReadonlySet<CodexSetupPhase> = new Set([\n \"install\",\n \"repair\",\n \"verify\"\n]);\n\n/**\n * Maps primitive provider-status flags onto the fixed 5-stage track the wizard\n * renders. Version verification folds into the install (CLI) stage (an\n * unsupported version means install is `error`, not `ok`). The adapter stage\n * covers any provider runtime component installed separately from its CLI,\n * such as an SDK sidecar; where no separate component exists it simply tracks\n * the CLI. Login `running` is driven\n * by the caller's pending flag because login runs as a terminal action, not via\n * the activeAction phase stream.\n */\nexport function deriveAgentSetupStages(\n input: DeriveAgentSetupStagesInput\n): AgentSetupStage[] {\n const installing =\n input.installActionPending ||\n (input.activePhase ? INSTALLING_PHASES.has(input.activePhase) : false);\n const updating = input.updateActionPending || input.activePhase === \"update\";\n\n const detectStatus: CodexSetupStepStatus = input.detected ? \"ok\" : \"running\";\n\n // Network is an independent live-connectivity check (registry + provider API),\n // so it is NOT folded into the `ready` short-circuit — a real outage shows even\n // when the CLI is otherwise configured. It can only be judged once detection\n // has run; `false` is the only blocking value (null = no daemon verdict).\n const networkStatus: CodexSetupStepStatus = !input.detected\n ? \"pending\"\n : input.networkReachable === false\n ? \"error\"\n : \"ok\";\n\n // A satisfied CLI stays checked even while an install runs, so the spinner\n // lands on the stage actually being worked on (e.g. the adapter during a\n // repair) rather than flipping every install-related stage back to running.\n // A present launcher with a missing platform subpackage is NOT ok — the\n // daemon repairs it via the install action, so it reads as a pending install.\n const cliOk =\n input.ready ||\n (input.cliInstalled &&\n !input.versionTooOld &&\n !input.platformPackageIncomplete);\n const installStatus: CodexSetupStepStatus = updating\n ? \"running\"\n : cliOk\n ? \"ok\"\n : installing\n ? \"running\"\n : input.versionTooOld\n ? \"error\"\n : \"pending\";\n const installProblem: StageProblem | undefined =\n input.platformPackageIncomplete && !cliOk\n ? \"install-platform-incomplete\"\n : undefined;\n\n const adapterOk =\n input.ready || (input.adapterInstalled && !input.adapterVersionMismatch);\n const adapterStatus: CodexSetupStepStatus = adapterOk\n ? \"ok\"\n : installing\n ? \"running\"\n : input.adapterVersionMismatch\n ? \"error\"\n : \"pending\";\n\n const loginStatus: CodexSetupStepStatus = input.authenticated\n ? \"ok\"\n : input.loginPending\n ? \"running\"\n : \"pending\";\n\n const readyStatus: CodexSetupStepStatus = input.ready ? \"ok\" : \"pending\";\n\n return [\n {\n id: \"detect\",\n label: input.labels.detect,\n status: detectStatus,\n detail: null\n },\n {\n id: \"network\",\n label: input.labels.network,\n status: networkStatus,\n detail: input.networkDetail\n },\n {\n id: \"install\",\n label: input.labels.install,\n status: installStatus,\n detail: input.cliVersionDetail,\n ...(installProblem ? { problem: installProblem } : {})\n },\n {\n id: \"adapter\",\n label: input.labels.adapter,\n status: adapterStatus,\n detail: input.adapterDetail\n },\n {\n id: \"login\",\n label: input.labels.login,\n status: loginStatus,\n detail: input.accountDetail,\n authMethod: input.authMethod\n },\n {\n id: \"ready\",\n label: input.labels.ready,\n status: readyStatus,\n detail: null\n }\n ];\n}\n\n/**\n * Step-by-step reveal: even when prerequisites are already satisfied, the wizard\n * walks a cursor down the track so each stage visibly \"checks off\" one at a time\n * instead of all flashing complete at once.\n *\n * `revealIndex` is the cursor position. Stages before it show their real status\n * (already revealed). The stage AT the cursor is shown as `running` when its\n * real status is terminal-ok (the brief \"working on it\" moment before it checks\n * off) and otherwise shows its real status (so a genuinely running install, an\n * error, or a blocked prerequisite are honest). Stages after the cursor are\n * dimmed to `pending`.\n */\nexport function projectRevealedStages(\n realStages: AgentSetupStage[],\n revealIndex: number\n): AgentSetupStage[] {\n return realStages.map((stage, index) => {\n if (index < revealIndex) {\n return stage;\n }\n if (index === revealIndex) {\n if (stage.status === \"ok\" || stage.status === \"skipped\") {\n return { ...stage, status: \"running\" };\n }\n return stage;\n }\n return { ...stage, status: \"pending\" };\n });\n}\n\n/**\n * The reveal cursor advances past a stage only once that stage is really done\n * (`ok`/`skipped`). It parks on a stage that is still `running` (a real install\n * in progress), `error`, or `pending` (a blocked prerequisite) — so the\n * animation never races ahead of reality.\n */\nexport function shouldAdvanceReveal(\n realStages: AgentSetupStage[],\n revealIndex: number\n): boolean {\n const cursor = realStages[revealIndex];\n if (!cursor) {\n return false;\n }\n return cursor.status === \"ok\" || cursor.status === \"skipped\";\n}\n\nexport type StageActionId = \"install\" | \"login\" | \"redetect\" | \"update\";\n\n/**\n * The problem token a blocked stage represents. The UI maps this to \"未xxx\"\n * copy; keeping it i18n-agnostic here lets the mapping stay tested without\n * pulling translation strings into the pure flow module.\n */\nexport type StageProblem =\n | \"network-unreachable\"\n | \"install-missing\"\n | \"install-outdated\"\n | \"install-platform-incomplete\"\n | \"adapter-missing\"\n | \"adapter-mismatch\"\n | \"login-missing\";\n\nexport interface StageRemediation {\n actionId: StageActionId;\n problem: StageProblem;\n}\n\n/**\n * For a stage the user must act on (idle `pending`/`error`, never `running` or\n * `ok`), returns what is wrong and which action fixes it. `detect`/`ready` never\n * carry their own remediation — they reflect prerequisites, not user actions.\n *\n * `error` means a version problem on the install/adapter stages (the only stages\n * derive marks `error`); `pending` means the step simply has not run yet.\n */\nexport function stageRemediation(\n stage: AgentSetupStage\n): StageRemediation | null {\n if (stage.status !== \"pending\" && stage.status !== \"error\") {\n return null;\n }\n switch (stage.id) {\n case \"network\":\n // Connectivity isn't fixed by an install/login action — re-running\n // detection (which re-probes the network) is the remediation.\n return { actionId: \"redetect\", problem: \"network-unreachable\" };\n case \"install\":\n // An explicit problem token (today: platform subpackage missing) takes\n // precedence — the daemon repairs it in place via the install action, so\n // route through install rather than the manual-upgrade error path.\n if (stage.problem) {\n return { actionId: \"install\", problem: stage.problem };\n }\n // A genuinely missing CLI is installed for the user; a present-but-\n // outdated CLI is NOT — we don't silently reinstall a binary the user\n // manages. Instead the panel shows the manual upgrade command and\n // re-detection confirms it once they've upgraded.\n return stage.status === \"error\"\n ? { actionId: \"redetect\", problem: \"install-outdated\" }\n : { actionId: \"install\", problem: \"install-missing\" };\n case \"adapter\":\n return {\n actionId: \"install\",\n problem:\n stage.status === \"error\" ? \"adapter-mismatch\" : \"adapter-missing\"\n };\n case \"login\":\n return { actionId: \"login\", problem: \"login-missing\" };\n default:\n return null;\n }\n}\n\nexport interface ResolveWizardAutoStartInput {\n focus: AgentEnvPanelFocus | null;\n detected: boolean;\n ready: boolean;\n installPending: boolean;\n loginPending: boolean;\n}\n\n/**\n * Decides whether opening the wizard with a remediation focus should auto-start\n * an action. Returns the action id to run, or null when nothing should run\n * (non-remediation focus, detection not settled, already ready, or already\n * pending). The caller is responsible for firing this at most once per open.\n */\nexport function resolveWizardAutoStartAction(\n input: ResolveWizardAutoStartInput\n): \"install\" | \"login\" | null {\n const candidate = autoStartCandidate(input.focus);\n if (!candidate) {\n return null;\n }\n if (!input.detected || input.ready) {\n return null;\n }\n if (candidate === \"install\" && input.installPending) {\n return null;\n }\n if (candidate === \"login\" && input.loginPending) {\n return null;\n }\n return candidate;\n}\n\nfunction autoStartCandidate(\n focus: AgentEnvPanelFocus | null\n): \"install\" | \"login\" | null {\n switch (focus) {\n case \"install\":\n case \"repair\":\n return \"install\";\n case \"upgrade\":\n // CLI upgrades are user-driven: opening the panel from a version error\n // shows the manual upgrade command rather than auto-running an install\n // (which can't upgrade an already-present binary anyway).\n return null;\n case \"auth\":\n return \"login\";\n default:\n return null;\n }\n}\n","import type {\n AgentProviderStatus,\n WorkspaceAgentProvider\n} from \"@tutti-os/client-tuttid-ts\";\nimport {\n deriveAgentSetupStages,\n projectRevealedStages,\n reasonCodeIndicatesCliVersionUnsupported,\n type AgentSetupStage,\n type AgentSetupStageId,\n type AgentSetupStageLabels,\n type StageDetailToken\n} from \"./agentEnvWizardFlow.ts\";\nimport type {\n CodexSetupActiveAction,\n CodexSetupActiveActionError,\n CodexSetupPhase\n} from \"./codexSetupContract.ts\";\n\nexport interface NetworkCheck {\n kind: \"registry\" | \"api\" | \"proxy\";\n reachable: boolean;\n host: string | null;\n configured?: boolean;\n}\n\nconst MANUAL_INSTALL_COMMANDS: Partial<Record<WorkspaceAgentProvider, string>> =\n {\n codex: \"npm install -g @openai/codex --include=optional\",\n \"claude-code\": \"curl -fsSL https://claude.ai/install.sh | bash\",\n cursor: \"curl https://cursor.com/install -fsS | bash\",\n opencode: \"curl -fsSL https://opencode.ai/install | bash\"\n };\n\nfunction endpointHost(endpoint: string | null | undefined): string | null {\n if (!endpoint) {\n return null;\n }\n return endpoint.replace(/^https?:\\/\\//, \"\").replace(/\\/.*$/, \"\") || null;\n}\n\n// A proxy URL may carry credentials (http://user:pass@host:port). Strip the\n// userinfo before it reaches the renderer/UI so proxy passwords are never\n// surfaced; the scheme + host:port are kept for display.\nfunction scrubProxyUrl(url: string | null | undefined): string | null {\n if (!url) {\n return null;\n }\n try {\n const parsed = new URL(url);\n parsed.username = \"\";\n parsed.password = \"\";\n return `${parsed.protocol}//${parsed.host}`;\n } catch {\n // Not a parseable URL — still strip a leading userinfo segment defensively.\n return url.replace(/\\/\\/[^/@]*@/, \"//\") || null;\n }\n}\n\nfunction textToken(text: string | null): StageDetailToken | null {\n return text ? { kind: \"text\", text } : null;\n}\n\nfunction joinDetail(parts: Array<string | null | undefined>): string | null {\n const joined = parts.filter((p): p is string => Boolean(p)).join(\" · \");\n return joined || null;\n}\n\nexport function deriveHasAnomaly(\n stages: AgentSetupStage[],\n activeActionError: CodexSetupActiveActionError | null\n): boolean {\n return stages.some((s) => s.status === \"error\") || Boolean(activeActionError);\n}\n\nexport interface AgentEnvWizardViewModelInput {\n provider: WorkspaceAgentProvider;\n status: AgentProviderStatus | null;\n isLoading: boolean;\n activeAction: CodexSetupActiveAction | null;\n installActionPending: boolean;\n updateActionPending: boolean;\n loginPending: boolean;\n revealIndex: number;\n stageLabels: AgentSetupStageLabels;\n}\n\nexport interface AgentEnvWizardViewModel {\n ready: boolean;\n busy: boolean;\n redetecting: boolean;\n displayStages: AgentSetupStage[];\n blockingStageId: AgentSetupStageId | null;\n networkChecks: NetworkCheck[];\n hasAnomaly: boolean;\n activePhase: CodexSetupPhase | null;\n log: string[];\n registry: string | null;\n error: CodexSetupActiveActionError | null;\n manualCommand: string | null;\n installPending: boolean;\n updateAvailable: boolean;\n updating: boolean;\n loginPending: boolean;\n}\n\nexport function buildAgentEnvWizardViewModel(\n input: AgentEnvWizardViewModelInput\n): AgentEnvWizardViewModel {\n const { status, activeAction, provider } = input;\n const ready = status?.availability.status === \"ready\";\n const installPending = input.installActionPending;\n const updatePending = input.updateActionPending;\n const loginPending = input.loginPending;\n const updating = updatePending || activeAction?.phase === \"update\";\n const busy =\n installPending ||\n updating ||\n activeAction?.phase === \"install\" ||\n activeAction?.phase === \"repair\" ||\n activeAction?.phase === \"verify\";\n\n const reasonCode = (status?.availability.reasonCode ?? \"\").toLowerCase();\n const versionTooOld = reasonCodeIndicatesCliVersionUnsupported(reasonCode);\n const cliBelowFloor = versionTooOld;\n // The codex launcher is present but its platform subpackage is missing — the\n // CLI spawns ENOENT. The daemon repairs this in place via the install action;\n // the wizard must NOT mark the install stage ok just because the launcher\n // resolved.\n const platformPackageIncomplete = reasonCode.includes(\n \"codex_platform_pkg_incomplete\"\n );\n const adapterVersionMismatch = reasonCode.includes(\n \"acp_adapter_version_mismatch\"\n );\n\n const cliDetail: StageDetailToken | null =\n cliBelowFloor && status?.cli.version && status.cli.minVersion\n ? {\n kind: \"version-floor\",\n current: status.cli.version,\n required: status.cli.minVersion\n }\n : status?.cli.installed\n ? textToken(joinDetail([status?.cli.version, status?.cli.binaryPath]))\n : textToken(status?.cli.version ?? null);\n\n const adapterDetail: StageDetailToken | null =\n adapterVersionMismatch &&\n status?.adapter.version &&\n status?.adapter.requiredVersion\n ? {\n kind: \"version-mismatch\",\n current: status.adapter.version,\n required: status.adapter.requiredVersion\n }\n : status?.adapter.installed\n ? textToken(\n joinDetail([status?.adapter.version, status?.adapter.binaryPath])\n )\n : textToken(\n status?.adapter.binaryPath ??\n (status?.adapter.command?.length\n ? status.adapter.command.join(\" \")\n : null)\n );\n\n const networkChecks: NetworkCheck[] = status?.network\n ? [\n {\n kind: \"registry\",\n reachable: status.network.registry.reachable,\n host: endpointHost(status.network.registry.endpoint)\n },\n ...(status.network.providerApi\n ? [\n {\n kind: \"api\" as const,\n reachable: status.network.providerApi.reachable,\n host: endpointHost(status.network.providerApi.endpoint)\n }\n ]\n : []),\n ...(status.network.proxy\n ? [\n {\n kind: \"proxy\" as const,\n reachable:\n !status.network.proxy.configured ||\n status.network.proxy.reachable,\n host: scrubProxyUrl(status.network.proxy.url),\n configured: status.network.proxy.configured\n }\n ]\n : [])\n ]\n : [];\n const networkReachable =\n networkChecks.length === 0 ? null : networkChecks.every((c) => c.reachable);\n\n const accountDetail: StageDetailToken | null = status?.auth.accountLabel\n ? { kind: \"text\", text: status.auth.accountLabel }\n : status?.auth.status === \"authenticated\"\n ? { kind: \"text\", text: \"__SIGNED_IN__\" }\n : null;\n const authMethod: string | null = status?.auth.authMethod ?? null;\n\n const stages = deriveAgentSetupStages({\n detected: status !== null,\n cliInstalled: status?.cli.installed ?? false,\n versionTooOld,\n platformPackageIncomplete,\n adapterInstalled: status?.adapter.installed ?? false,\n adapterVersionMismatch,\n authenticated: status?.auth.status === \"authenticated\",\n authRequired: status?.auth.status === \"required\",\n ready: Boolean(ready),\n activePhase: activeAction?.phase ?? null,\n installActionPending: installPending,\n updateActionPending: updatePending,\n loginPending,\n networkReachable,\n cliVersionDetail: cliDetail,\n adapterDetail,\n accountDetail,\n authMethod,\n networkDetail: null,\n labels: input.stageLabels\n });\n\n const registry = activeAction?.registry ?? null;\n const stagesWithDetail = registry\n ? stages.map((s) =>\n s.id === \"ready\"\n ? { ...s, detail: { kind: \"text\" as const, text: registry } }\n : s\n )\n : stages;\n const displayStages = projectRevealedStages(\n stagesWithDetail,\n input.revealIndex\n );\n\n const blockingIndex = stages.findIndex((s) => s.status !== \"ok\");\n const blockingStage = blockingIndex >= 0 ? stages[blockingIndex] : undefined;\n const blockingStageId: AgentSetupStageId | null =\n blockingStage && input.revealIndex >= blockingIndex\n ? blockingStage.id\n : null;\n\n return {\n ready: Boolean(ready),\n busy: Boolean(busy),\n redetecting: input.isLoading,\n displayStages,\n blockingStageId,\n networkChecks,\n hasAnomaly: deriveHasAnomaly(stages, activeAction?.error ?? null),\n activePhase: activeAction?.phase ?? null,\n log: activeAction?.log ?? [],\n registry,\n error: activeAction?.error ?? null,\n manualCommand: MANUAL_INSTALL_COMMANDS[provider] ?? null,\n installPending,\n updateAvailable:\n updatePending ||\n (status?.update?.updateAvailable === true &&\n status.actions.some((action) => action.id === \"update\")),\n updating,\n loginPending\n };\n}\n"],"mappings":";AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AAmBP,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,QAAQ,KAAK;AAAA,IACpB,MAAM,QAAQ,IAAI;AAAA,IAClB,aAAa,MAAM;AAAA,IACnB;AAAA,IACA;AAAA,IACA;AAAA,IACA,YAAY,iBAAiB,QAAQ,cAAc,SAAS,IAAI;AAAA,IAChE,aAAa,cAAc,SAAS;AAAA,IACpC,KAAK,cAAc,OAAO,CAAC;AAAA,IAC3B;AAAA,IACA,OAAO,cAAc,SAAS;AAAA,IAC9B,eAAe,wBAAwB,QAAQ,KAAK;AAAA,IACpD;AAAA,IACA,iBACE,iBACC,QAAQ,QAAQ,oBAAoB,QACnC,OAAO,QAAQ,KAAK,CAAC,WAAW,OAAO,OAAO,QAAQ;AAAA,IAC1D;AAAA,IACA;AAAA,EACF;AACF;","names":[]}
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
setCurrentAgentGuiI18nRuntime,
|
|
7
7
|
translate,
|
|
8
8
|
translateInUiLanguage
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-I4ICM3U4.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-DKGFEIZ7.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
translateInUiLanguage
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-I4ICM3U4.js";
|
|
4
4
|
import {
|
|
5
5
|
normalizeAgentTitleText
|
|
6
6
|
} from "./chunk-MIJXEELH.js";
|
|
7
7
|
import {
|
|
8
8
|
resolveAgentGUIProviderCatalogIdentity
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-O433KXLK.js";
|
|
10
10
|
|
|
11
11
|
// contexts/settings/domain/agentSettings.providers.ts
|
|
12
12
|
var AGENT_PROVIDERS = [
|
|
@@ -374,4 +374,4 @@ export {
|
|
|
374
374
|
resolveAgentGuiWorkbenchHeaderTitle,
|
|
375
375
|
resolveAgentGuiWorkbenchSessionTitle
|
|
376
376
|
};
|
|
377
|
-
//# sourceMappingURL=chunk-
|
|
377
|
+
//# sourceMappingURL=chunk-DNHDR2YC.js.map
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
agentMentionFilterLabel,
|
|
6
6
|
agentMentionGroupLabel,
|
|
7
7
|
mentionGroupExpandCount
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-V2BMPPOE.js";
|
|
9
9
|
import {
|
|
10
10
|
resolveAgentMentionFileThumbnailUrl,
|
|
11
11
|
resolveAgentMentionFileVisualKind
|
|
@@ -13,13 +13,13 @@ import {
|
|
|
13
13
|
import {
|
|
14
14
|
userAvatarPlaceholderUrl,
|
|
15
15
|
workspaceAgentActivityStatusLabel
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-Z5Y3RB2U.js";
|
|
17
17
|
import {
|
|
18
18
|
managedAgentRoundedIconUrl
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-M6HTOCQK.js";
|
|
20
20
|
import {
|
|
21
21
|
translate
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-DKGFEIZ7.js";
|
|
23
23
|
|
|
24
24
|
// agent-gui/agentGuiNode/AgentFileMentionPalette.tsx
|
|
25
25
|
import {
|
|
@@ -517,4 +517,4 @@ export {
|
|
|
517
517
|
AgentFileMentionPalette,
|
|
518
518
|
AgentContextMentionPalette
|
|
519
519
|
};
|
|
520
|
-
//# sourceMappingURL=chunk-
|
|
520
|
+
//# sourceMappingURL=chunk-E2Y4FFQW.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
translate
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-DKGFEIZ7.js";
|
|
4
4
|
import {
|
|
5
5
|
agentGUIProviderIdentityDisplayName,
|
|
6
6
|
resolveMigratedAgentGUIProviderIdentity
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-O433KXLK.js";
|
|
8
8
|
|
|
9
9
|
// agentActivityRuntime.tsx
|
|
10
10
|
import {
|
|
@@ -213,4 +213,4 @@ export {
|
|
|
213
213
|
getOptionalAgentHostApi,
|
|
214
214
|
workspaceAgentProviderLabel
|
|
215
215
|
};
|
|
216
|
-
//# sourceMappingURL=chunk-
|
|
216
|
+
//# sourceMappingURL=chunk-FGD2K7AB.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../agentActivityRuntime.tsx","../agentActivityHost.tsx","../host/agentHostApi.ts","../shared/workspaceAgentProviderLabel.ts"],"sourcesContent":["import {\n createContext,\n useContext,\n useSyncExternalStore,\n type JSX,\n type PropsWithChildren\n} from \"react\";\nimport type {\n AgentActivityActivateSessionResult,\n AgentActivityCollaborationRun,\n AgentActivityGoalControlInput,\n AgentActivityGoalControlResult,\n AgentActivityCreateSessionInput,\n AgentActivityDeleteSessionInput,\n AgentActivityDeleteSessionResult,\n AgentActivityMessageOrder,\n AgentActivityMessagePage,\n AgentActivityRenameSessionInput,\n AgentActivitySendInput,\n AgentActivitySendInputResult,\n AgentActivitySession,\n AgentActivitySessionSettings,\n AgentActivitySetCollaborationAdoptionInput,\n AgentActivitySnapshot,\n AgentActivitySnapshotListener,\n AgentActivitySubmitInteractiveInput,\n AgentActivitySubmitInteractiveResult,\n AgentActivityUpdateTuttiModeActivationInput,\n AgentActivityUpdateTuttiModeActivationResult,\n AgentSessionEngine\n} from \"@tutti-os/agent-activity-core\";\nimport type {\n AgentHostAgentSessionComposerSettings,\n AgentHostUnactivateAgentSessionResult\n} from \"./shared/contracts/dto\";\nimport type { WorkspaceQueryCache } from \"./shared/query/workspaceQueryCache\";\n\nexport interface AgentActivityRuntimeUpdateSessionSettingsResult {\n agentSessionId: string;\n settings: AgentHostAgentSessionComposerSettings;\n session: AgentActivitySession;\n}\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 agentTargetIds?: readonly string[];\n cursor?: string;\n limit?: number;\n query?: string;\n sectionKey: string;\n signal?: AbortSignal;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeListSessionsPageInput {\n agentTargetId?: string | null;\n cursor?: string;\n limit?: number;\n searchQuery?: string;\n signal?: AbortSignal;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeSessionPageResult {\n hasMore: boolean;\n nextCursor?: string;\n sessions: AgentActivitySession[];\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeListSessionSectionsInput {\n agentTargetId?: string | null;\n limitPerSection?: number;\n signal?: AbortSignal;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeListSessionSectionPageInput {\n agentTargetId?: string | null;\n cursor?: string;\n limit?: number;\n sectionKey: string;\n signal?: AbortSignal;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeListPinnedSessionsPageInput {\n agentTargetId?: string | null;\n cursor?: string;\n limit?: number;\n signal?: AbortSignal;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeUserProject {\n createdAtUnixMs: number;\n id: string;\n label: string;\n lastUsedAtUnixMs?: number;\n path: string;\n pinnedAtUnixMs: number;\n sectionKey: string;\n updatedAtUnixMs: number;\n}\n\nexport interface AgentActivityRuntimeSessionSection {\n kind: \"conversations\" | \"project\";\n sectionKey: string;\n userProject?: AgentActivityRuntimeUserProject;\n sessions: AgentActivitySession[];\n hasMore: boolean;\n totalCount: number;\n nextCursor?: string;\n}\n\nexport interface AgentActivityRuntimeSessionPage {\n sessions: AgentActivitySession[];\n hasMore: boolean;\n totalCount: number;\n nextCursor?: string;\n}\n\nexport interface AgentActivityRuntimeSessionSectionsResult {\n pinned?: AgentActivityRuntimeSessionPage;\n sections: AgentActivityRuntimeSessionSection[];\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeGeneratedFile {\n label: string;\n path: string;\n}\n\nexport interface AgentActivityRuntimeGeneratedFileList {\n entries: AgentActivityRuntimeGeneratedFile[];\n hasMore?: boolean;\n nextCursor?: string;\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 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 AgentActivityRuntimeGetComposerOptionsInput {\n agentTargetId: string;\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 AgentActivityRuntimeDiagnosticInput {\n details?: Record<string, unknown>;\n event: string;\n level?: \"debug\" | \"info\" | \"warn\" | \"error\";\n source?: string;\n workspaceId?: string | null;\n}\n\ninterface AgentActivityRuntimeActivateSessionInputBase {\n agentSessionId: string;\n capabilityRefs?: AgentActivityCreateSessionInput[\"capabilityRefs\"];\n cwd?: string;\n initialContent?: AgentActivitySendInput[\"content\"];\n /** 仅展示用首轮文本(bundle 折叠成一个 chip);initialContent 仍带展开后的文件。 */\n initialDisplayPrompt?: string | null;\n submitDiagnostics?: AgentActivitySendInput[\"submitDiagnostics\"];\n settings?: AgentActivitySessionSettings;\n title?: string;\n visible?: boolean;\n workspaceId: string;\n signal?: AbortSignal;\n}\n\nexport type AgentActivityRuntimeActivateSessionInput =\n | (AgentActivityRuntimeActivateSessionInputBase & {\n agentTargetId: string;\n clientSubmitId: string;\n initialTuttiModeActivation?: AgentActivityCreateSessionInput[\"initialTuttiModeActivation\"];\n mode: \"new\";\n })\n | (AgentActivityRuntimeActivateSessionInputBase & {\n agentTargetId?: string | null;\n clientSubmitId?: never;\n mode: \"existing\";\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\n/**\n * Dedicated host boundary for turning an in-memory text paste into a local\n * prompt asset. The runtime owns persistence and returns a sendable host path;\n * AgentGUI must not infer this capability from generic file-upload support.\n */\nexport interface AgentActivityRuntimeStagePastedTextInput {\n name: string;\n text: string;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeStagePastedTextResult {\n name: string;\n path: string;\n sizeBytes: number;\n}\n\nexport interface AgentActivityRuntimeSessionSectionScopeInput {\n agentTargetId?: string | null;\n excludePinned?: boolean;\n sectionKey: string;\n signal?: AbortSignal;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeSessionSectionDeletionCandidates {\n agentTargetId?: string | null;\n excludePinned: boolean;\n sectionKey: string;\n sessionIds: string[];\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeDeleteSessionsBatchInput {\n sessionIds: string[];\n signal?: AbortSignal;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeDeleteSessionsBatchResult {\n cleanupFailedSessionIds: string[];\n removedMessages: number;\n removedSessionIds: string[];\n removedSessions: number;\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 /**\n * Stable identity of this runtime instance (e.g. a local origin vs a\n * shared/room origin). The runtime owns one session engine per workspace and\n * that engine verifies this origin as part of its injected identity. Runtime\n * consumers resolve only through the nearest React provider; module-global\n * runtime lookup and last-mounted fallback are forbidden. An absent origin\n * means the canonical local origin.\n */\n origin?: string;\n /**\n * The session cwd is not resolvable on the local filesystem (e.g. a\n * shared/cloud sandbox not mounted locally), so AgentGUI must not run its\n * local stat-based \"working directory missing\" existence check — it would\n * always false-positive. Absent/false (default) => local, legacy behaviour.\n * Only that one guard is gated; project selection/listing is unaffected.\n */\n projectPathIsRemote?: boolean;\n promptContentUploadSupport?: {\n file?: boolean;\n image?: boolean;\n };\n /** Set false to suppress AgentGUI diagnostics in development consoles. */\n devDiagnosticConsoleSink?: boolean;\n goalControl(\n input: AgentActivityGoalControlInput\n ): Promise<AgentActivityGoalControlResult>;\n createSession(\n input: AgentActivityCreateSessionInput\n ): Promise<AgentActivitySession>;\n deleteSession(\n input: AgentActivityDeleteSessionInput\n ): Promise<AgentActivityDeleteSessionResult>;\n activateSession(\n input: AgentActivityRuntimeActivateSessionInput\n ): Promise<AgentActivityActivateSessionResult>;\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<AgentActivityRuntimeUpdateSessionSettingsResult>;\n updateTuttiModeActivation(\n input: AgentActivityUpdateTuttiModeActivationInput\n ): Promise<AgentActivityUpdateTuttiModeActivationResult>;\n getSnapshot(workspaceId: string): AgentActivitySnapshot;\n getSessionEngine(workspaceId: string): AgentSessionEngine;\n getSessionSectionsQueryCache?(\n workspaceId: string\n ): WorkspaceQueryCache<unknown>;\n listSessionMessages(\n input: AgentActivityRuntimeListSessionMessagesInput\n ): Promise<AgentActivityMessagePage>;\n listAgentGeneratedFiles?(\n input: AgentActivityRuntimeListGeneratedFilesInput\n ): Promise<AgentActivityRuntimeGeneratedFileList>;\n listSessionsPage?(\n input: AgentActivityRuntimeListSessionsPageInput\n ): Promise<AgentActivityRuntimeSessionPageResult>;\n listSessionSections?(\n input: AgentActivityRuntimeListSessionSectionsInput\n ): Promise<AgentActivityRuntimeSessionSectionsResult>;\n listSessionSectionPage?(\n input: AgentActivityRuntimeListSessionSectionPageInput\n ): Promise<AgentActivityRuntimeSessionSection>;\n listSessionSectionDeletionCandidates?(\n input: AgentActivityRuntimeSessionSectionScopeInput\n ): Promise<AgentActivityRuntimeSessionSectionDeletionCandidates>;\n deleteSessionsBatch?(\n input: AgentActivityRuntimeDeleteSessionsBatchInput\n ): Promise<AgentActivityRuntimeDeleteSessionsBatchResult>;\n listPinnedSessionsPage?(\n input: AgentActivityRuntimeListPinnedSessionsPageInput\n ): Promise<AgentActivityRuntimeSessionPage>;\n load(\n workspaceId: string,\n signal?: AbortSignal\n ): Promise<AgentActivitySnapshot>;\n ensureSessionSynchronized?(\n input: AgentActivityRuntimeEnsureSessionSynchronizedInput\n ): () => void;\n sendInput(\n input: AgentActivitySendInput\n ): Promise<AgentActivitySendInputResult>;\n uploadPromptContent?(\n input: AgentActivityRuntimeUploadPromptContentInput\n ): Promise<AgentActivityRuntimeUploadPromptContentResult>;\n stagePastedText?(\n input: AgentActivityRuntimeStagePastedTextInput\n ): Promise<AgentActivityRuntimeStagePastedTextResult>;\n readSessionAttachment?(\n input: AgentActivityRuntimeReadSessionAttachmentInput\n ): Promise<AgentActivityRuntimeSessionAttachment>;\n readPromptAsset?(\n input: AgentActivityRuntimeReadPromptAssetInput\n ): Promise<AgentActivityRuntimePromptAsset>;\n renameSession(\n input: AgentActivityRenameSessionInput\n ): Promise<AgentActivitySession>;\n /**\n * Record whether a collaboration outcome was adopted.\n * Optional; hosts without support omit it and adoption controls stay hidden.\n */\n setCollaborationAdoption?(\n input: AgentActivitySetCollaborationAdoptionInput\n ): Promise<AgentActivityCollaborationRun>;\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<AgentActivitySubmitInteractiveResult>;\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\nfunction createTestAgentActivityRuntimeHolder(): {\n get: () => AgentActivityRuntime | null;\n set: (runtime: AgentActivityRuntime | null) => void;\n} {\n let runtime: AgentActivityRuntime | null = null;\n return {\n get: () => runtime,\n set: (nextRuntime) => {\n runtime = nextRuntime;\n }\n };\n}\n\nconst testAgentActivityRuntimeHolder = createTestAgentActivityRuntimeHolder();\n\nexport interface AgentActivityRuntimeProviderProps extends PropsWithChildren {\n runtime?: AgentActivityRuntime | null;\n}\n\nexport function AgentActivityRuntimeProvider({\n children,\n runtime\n}: AgentActivityRuntimeProviderProps): JSX.Element {\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 resetAgentActivityRuntimeForTests(): void {\n if (process.env.NODE_ENV === \"test\") {\n testAgentActivityRuntimeHolder.set(null);\n }\n}\n\nexport function setAgentActivityRuntimeForTests(\n runtime: AgentActivityRuntime | null\n): void {\n if (process.env.NODE_ENV === \"test\") {\n testAgentActivityRuntimeHolder.set(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 const testRuntimeOverride = testAgentActivityRuntimeHolder.get();\n if (testRuntimeOverride) {\n return testRuntimeOverride;\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 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 AgentHostListWorkspaceAgentProbesInput,\n AgentHostWorkspaceAgentProbesResult,\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;\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};\n\nexport interface AgentHostQuickPrompt {\n id: string;\n title: string;\n content: string;\n version: number;\n createdAtUnixMs: number;\n updatedAtUnixMs: number;\n}\n\nexport interface AgentHostQuickPromptSnapshot {\n enabled: boolean;\n status: \"idle\" | \"loading\" | \"ready\" | \"error\";\n prompts: readonly AgentHostQuickPrompt[];\n error: string | null;\n revision: number;\n pendingMutationIds: readonly string[];\n orderMutationPending?: boolean;\n}\n\nexport interface AgentHostQuickPromptsApi {\n ensureLoaded: (input?: { force?: boolean }) => AgentHostAsyncResult<void>;\n getSnapshot: () => AgentHostQuickPromptSnapshot;\n subscribe: (\n listener: (snapshot: AgentHostQuickPromptSnapshot) => void\n ) => AgentHostUnsubscribe;\n create: (input: {\n title: string;\n content: string;\n }) => AgentHostAsyncResult<AgentHostQuickPrompt>;\n update: (input: {\n id: string;\n title: string;\n content: string;\n expectedVersion: number;\n }) => AgentHostAsyncResult<AgentHostQuickPrompt>;\n remove: (input: {\n id: string;\n expectedVersion: number;\n }) => AgentHostAsyncResult<void>;\n move?: (input: {\n promptId: string;\n beforePromptId: string | null;\n expectedVersion: number;\n }) => AgentHostAsyncResult<readonly AgentHostQuickPrompt[]>;\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 AgentHostToastHandle = {\n /** Settles the toast to a neutral, non-error, non-success tone. */\n info: (title: string, description?: string) => void;\n /** Settles the toast to the destructive tone. */\n reject: (title: string, description?: string) => void;\n /** Settles the toast to the success tone. */\n resolve: (title: string, description?: string) => void;\n};\n\nexport type AgentHostToastApi = AgentHostRecord & {\n error: (title: string, description?: string) => void;\n info?: (title: string, description?: string) => void;\n /**\n * Opens one toast that stays mounted across async work: it shows busy\n * (spinner, no auto-dismiss) until the returned handle settles it in\n * place, at which point it starts auto-dismissing like any other toast.\n */\n loading?: (title: string) => AgentHostToastHandle;\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 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 agentSessions?: AgentHostAgentSessionsApi;\n agentTargetSetup?: AgentHostAgentTargetSetupApi;\n clipboard: AgentHostClipboardApi;\n debug?: AgentHostDebugApi;\n filesystem: AgentHostFilesystemApi;\n meta?: AgentHostMetaApi;\n onHostEvent?: (listener: (event: any) => void) => AgentHostUnsubscribe;\n persistence?: AgentHostPersistenceApi;\n quickPrompts?: AgentHostQuickPromptsApi;\n runtime?: AgentHostEnvironmentApi;\n toast?: AgentHostToastApi;\n userProjects?: AgentHostUserProjectsApi;\n workspace: AgentHostWorkspaceApi;\n workspaceAgentProbes?: AgentHostWorkspaceAgentProbesApi;\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 AgentHostWorkspaceAgentProbesApi = AgentHostRecord & {\n list: (\n input: AgentHostListWorkspaceAgentProbesInput\n ) => AgentHostAsyncResult<AgentHostWorkspaceAgentProbesResult>;\n};\n\nexport interface AgentHostAgentTargetInstallPlan {\n packageName: string;\n packageVersion: string;\n runner: \"npm\" | \"pnpm\" | \"uv\" | \"binary\";\n planDigest: string;\n installRoot: string;\n}\n\nexport interface AgentHostAgentTargetSetupAction {\n actionId: string;\n clientActionId: string;\n kind: \"install\" | \"authenticate\";\n status: \"queued\" | \"running\" | \"succeeded\" | \"failed\" | \"interrupted\";\n phase:\n | \"preparing\"\n | \"installing\"\n | \"verifying\"\n | \"probing\"\n | \"activating\"\n | \"authenticating\"\n | \"complete\";\n errorCode: string | null;\n errorMessage: string | null;\n}\n\nexport interface AgentHostAgentTargetSetupSnapshot {\n agentTargetId: string;\n status:\n | \"ready\"\n | \"auth_required\"\n | \"not_installed\"\n | \"installing\"\n | \"authenticating\"\n | \"failed\";\n runtimeSource: \"local\" | \"managed\" | null;\n runtimeVersion: string | null;\n reason: string | null;\n authMethods: AgentHostAgentTargetAuthMethod[];\n account: AgentHostAgentTargetAuthenticatedAccount | null;\n plan: AgentHostAgentTargetInstallPlan | null;\n action: AgentHostAgentTargetSetupAction | null;\n}\n\nexport interface AgentHostAgentTargetAuthenticatedAccount {\n id: string;\n displayName: string;\n authMethodId: string;\n organization: string | null;\n}\n\nexport interface AgentHostAgentTargetAuthMethod {\n id: string;\n name: string;\n description?: string | null;\n}\n\nexport interface AgentHostAgentTargetSetupState {\n snapshot: AgentHostAgentTargetSetupSnapshot | null;\n loading: boolean;\n failed: boolean;\n}\n\nexport interface AgentHostAgentTargetSetupWatch {\n getSnapshot: () => AgentHostAgentTargetSetupState;\n subscribe: (\n listener: (state: AgentHostAgentTargetSetupState) => void\n ) => AgentHostUnsubscribe;\n install: (input: {\n planDigest: string;\n clientActionId: string;\n }) => AgentHostAsyncResult<void>;\n authenticate: (input: {\n methodId: string;\n clientActionId: string;\n }) => AgentHostAsyncResult<void>;\n refresh: () => AgentHostAsyncResult<void>;\n}\n\nexport type AgentHostAgentTargetSetupApi = AgentHostRecord & {\n watch: (input: { agentTargetId: string }) => AgentHostAgentTargetSetupWatch;\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 pinnedAtUnixMs: number;\n sectionKey?: 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 move?: (input: {\n beforeProjectId: string | null;\n projectId: string;\n }) => AgentHostAsyncResult<void>;\n pin: (input: {\n pinned: boolean;\n projectId: string;\n }) => AgentHostAsyncResult<void>;\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 getComposerOptions?: (input: any) => AgentHostAsyncResult<any>;\n getState: (input: any) => AgentHostAsyncResult<any>;\n onEvent?: (listener: (event: any) => void) => AgentHostUnsubscribe;\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\nexport interface AgentHostRuntimeApi {\n account?: AgentHostAccountApi;\n agentTargetSetup?: AgentHostAgentTargetSetupApi;\n clipboard: AgentHostClipboardApi;\n debug?: AgentHostDebugApi;\n filesystem: AgentHostFilesystemApi;\n meta?: AgentHostMetaApi;\n onHostEvent?: (listener: (event: any) => void) => AgentHostUnsubscribe;\n persistence?: AgentHostPersistenceApi;\n quickPrompts?: AgentHostQuickPromptsApi;\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 agentTargetSetup: hostApi.agentTargetSetup,\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 quickPrompts: hostApi.quickPrompts,\n runtime: hostApi.runtime,\n toast: hostApi.toast,\n userProjects: hostApi.userProjects,\n workspace: hostApi.workspace,\n workspaceAgentProbes: hostApi.workspaceAgentProbes\n };\n}\n","import {\n agentGUIProviderIdentityDisplayName,\n resolveMigratedAgentGUIProviderIdentity\n} from \"../providerIdentityCatalog.ts\";\nimport { translate } from \"../i18n/index.ts\";\n\nexport function workspaceAgentProviderLabel(provider: string): string {\n const normalized = provider.trim().toLowerCase();\n const migratedIdentity = resolveMigratedAgentGUIProviderIdentity(normalized);\n if (migratedIdentity) {\n return agentGUIProviderIdentityDisplayName(migratedIdentity, translate);\n }\n return titleCase(provider);\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"],"mappings":";;;;;;;;;AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AAkfH;AA5BJ,IAAM,8BAA8B;AAAA,EAClC;AACF;AAEA,SAAS,uCAGP;AACA,MAAI,UAAuC;AAC3C,SAAO;AAAA,IACL,KAAK,MAAM;AAAA,IACX,KAAK,CAAC,gBAAgB;AACpB,gBAAU;AAAA,IACZ;AAAA,EACF;AACF;AAEA,IAAM,iCAAiC,qCAAqC;AAMrE,SAAS,6BAA6B;AAAA,EAC3C;AAAA,EACA;AACF,GAAmD;AACjD,SACE,oBAAC,4BAA4B,UAA5B,EAAqC,OAAO,WAAW,MACrD,UACH;AAEJ;AAEO,SAAS,0BAAgD;AAC9D,QAAM,UACJ,WAAW,2BAA2B,KAAK,4BAA4B;AACzE,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AACA,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AACxB,WAAO;AAAA,EACT;AACA,MAAI,qBAAqB;AACvB,WAAO;AAAA,EACT;AACA,QAAM,mBACJ,OAGA;AACF,SAAO,mBAAmB,sBAAsB,gBAAgB,IAAI;AACtE;AAEA,SAAS,oCAAgE;AACvE,MAAI,QAAQ,IAAI,aAAa,UAAU,OAAO,WAAW,aAAa;AACpE,WAAO;AAAA,EACT;AACA,QAAM,iBAAiB,OAAO;AAAA,IAC5B;AAAA,IACA;AAAA,EACF;AACA,MAAI,CAAC,kBAAkB,EAAE,WAAW,iBAAiB;AACnD,WAAO;AAAA,EACT;AACA,QAAM,mBAAmB,eAAe;AAIxC,SAAO,mBAAmB,sBAAsB,gBAAgB,IAAI;AACtE;;;AEtHO,SAAS,4BAA4B,UAA0B;AACpE,QAAM,aAAa,SAAS,KAAK,EAAE,YAAY;AAC/C,QAAM,mBAAmB,wCAAwC,UAAU;AAC3E,MAAI,kBAAkB;AACpB,WAAO,oCAAoC,kBAAkB,SAAS;AAAA,EACxE;AACA,SAAO,UAAU,QAAQ;AAC3B;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;","names":["createContext","useContext","jsx","createContext","useContext"]}
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-QNE2ZPPV.js";
|
|
4
4
|
import {
|
|
5
5
|
migratedAgentGUIProviderIdentityCatalog
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-O433KXLK.js";
|
|
7
7
|
|
|
8
8
|
// dockIcons.ts
|
|
9
9
|
var agentGuiDockIconUrls = createDockIconUrls();
|
|
@@ -20,4 +20,4 @@ export {
|
|
|
20
20
|
agentGuiDockIconUrls,
|
|
21
21
|
agentGuiDockIconUrl
|
|
22
22
|
};
|
|
23
|
-
//# sourceMappingURL=chunk-
|
|
23
|
+
//# sourceMappingURL=chunk-G7DS23D4.js.map
|