@ponythewhite/base-context 1.0.0 → 1.0.2
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/CHANGELOG.md +37 -0
- package/NOTICE +0 -5
- package/README.md +44 -27
- package/dist/NOTICE +0 -5
- package/dist/base-context-runtime/pyproject.toml +1 -1
- package/dist/base-context-runtime/src/rlm/__init__.py +7 -5
- package/dist/base-context-runtime/test/test_subagent_registry.py +28 -1
- package/dist/base-context-runtime/uv.lock +1 -1
- package/dist/build-info.json +1 -1
- package/dist/bundle/amazon-bedrock.js +21 -0
- package/dist/bundle/{anthropic-YY4S534V.js → anthropic-UV5GZDGU.js} +5 -5
- package/dist/bundle/{azure-openai-responses-JRP6MIM3.js → azure-openai-responses-WSNPXLYC.js} +6 -6
- package/dist/bundle/{bundled-modules-P5HARVZA.js → bundled-modules-PWOGKUQQ.js} +71 -16
- package/dist/bundle/chunk-27QCJ2AZ.js +2578 -0
- package/dist/bundle/{chunk-BYVP7LWV.js → chunk-44PEHPOG.js} +1916 -4689
- package/dist/bundle/{chunk-MZHTNNVA.js → chunk-4GXPNXOJ.js} +8 -0
- package/dist/bundle/{chunk-SC5KG5R4.js → chunk-DGNX7HQ3.js} +1 -7
- package/dist/bundle/{chunk-A53O363M.js → chunk-GRJFXLBM.js} +0 -1
- package/dist/bundle/chunk-HKINIBP4.js +29 -0
- package/dist/bundle/{chunk-73DCPU3D.js → chunk-IADCPVEI.js} +1019 -3427
- package/dist/bundle/{chunk-UDSW6FNG.js → chunk-KTNETTHI.js} +1 -1
- package/dist/bundle/{chunk-U7AUVG3B.js → chunk-VSIYFWYI.js} +24 -6
- package/dist/bundle/{chunk-IW77OXFS.js → chunk-W46VZFI6.js} +0 -2099
- package/dist/bundle/{cli-main-O4X7GFGY.js → cli-main-4DS7Y3PI.js} +8 -6
- package/dist/bundle/cli.js +2 -2
- package/dist/bundle/{google-AUTVGDGZ.js → google-T32FMD4G.js} +6 -6
- package/dist/bundle/{google-vertex-Q75D7RKS.js → google-vertex-56KP6I3B.js} +3 -3
- package/dist/bundle/{main-XKOW2BV6.js → main-SV7JLVEB.js} +7 -5
- package/dist/bundle/{mistral-7ESB7QUD.js → mistral-WGBMYIVU.js} +5 -5
- package/dist/bundle/{openai-codex-responses-LV3QRPN4.js → openai-codex-responses-PIV2RQ3G.js} +6 -6
- package/dist/bundle/{openai-completions-OJECLPXJ.js → openai-completions-64C3JPR4.js} +11 -22
- package/dist/bundle/{openai-responses-FN6HZMBC.js → openai-responses-UI7RSTDV.js} +6 -6
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +108 -59
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/daemon-ps.d.ts +4 -3
- package/dist/cli/daemon-ps.d.ts.map +1 -1
- package/dist/cli/daemon-ps.js +6 -1
- package/dist/cli/daemon-ps.js.map +1 -1
- package/dist/cli/product-doctor.d.ts +0 -1
- package/dist/cli/product-doctor.d.ts.map +1 -1
- package/dist/cli/product-doctor.js +6 -3
- package/dist/cli/product-doctor.js.map +1 -1
- package/dist/config.d.ts +0 -3
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +0 -8
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session-config.d.ts +1 -2
- package/dist/core/agent-session-config.d.ts.map +1 -1
- package/dist/core/agent-session-config.js +0 -3
- package/dist/core/agent-session-config.js.map +1 -1
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +5 -4
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session-services.d.ts +5 -3
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js +2 -27
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session.d.ts +10 -6
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +107 -107
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/auth-storage.d.ts +8 -35
- package/dist/core/auth-storage.d.ts.map +1 -1
- package/dist/core/auth-storage.js +33 -243
- package/dist/core/auth-storage.js.map +1 -1
- package/dist/core/cron-jobs.d.ts.map +1 -1
- package/dist/core/cron-jobs.js +7 -1
- package/dist/core/cron-jobs.js.map +1 -1
- package/dist/core/inference-coordinator.d.ts +6 -1
- package/dist/core/inference-coordinator.d.ts.map +1 -1
- package/dist/core/inference-coordinator.js +18 -2
- package/dist/core/inference-coordinator.js.map +1 -1
- package/dist/core/kernel/bootstrap.d.ts.map +1 -1
- package/dist/core/kernel/bootstrap.js +2 -2
- package/dist/core/kernel/bootstrap.js.map +1 -1
- package/dist/core/kernel/repl-manager.d.ts +2 -0
- package/dist/core/kernel/repl-manager.d.ts.map +1 -1
- package/dist/core/kernel/repl-manager.js +44 -1
- package/dist/core/kernel/repl-manager.js.map +1 -1
- package/dist/core/logging.d.ts +4 -3
- package/dist/core/logging.d.ts.map +1 -1
- package/dist/core/logging.js +6 -6
- package/dist/core/logging.js.map +1 -1
- package/dist/core/mcp/mcp-manager.d.ts.map +1 -1
- package/dist/core/mcp/mcp-manager.js +3 -3
- package/dist/core/mcp/mcp-manager.js.map +1 -1
- package/dist/core/model-registry.d.ts +1 -16
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +88 -196
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/model-resolver.d.ts +2 -19
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +36 -266
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/provider-contracts.d.ts +5 -6
- package/dist/core/provider-contracts.d.ts.map +1 -1
- package/dist/core/provider-contracts.js +25 -36
- package/dist/core/provider-contracts.js.map +1 -1
- package/dist/core/provider-display-names.d.ts.map +1 -1
- package/dist/core/provider-display-names.js +0 -2
- package/dist/core/provider-display-names.js.map +1 -1
- package/dist/core/rlm-max-subagents.d.ts +32 -0
- package/dist/core/rlm-max-subagents.d.ts.map +1 -0
- package/dist/core/rlm-max-subagents.js +50 -0
- package/dist/core/rlm-max-subagents.js.map +1 -0
- package/dist/core/rlm-runtime.d.ts +3 -3
- package/dist/core/rlm-runtime.d.ts.map +1 -1
- package/dist/core/rlm-runtime.js.map +1 -1
- package/dist/core/sdk.d.ts +4 -3
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +27 -14
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/settings-manager.d.ts +3 -16
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +12 -44
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +6 -6
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/installer.mjs +2 -3
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +39 -34
- package/dist/main.js.map +1 -1
- package/dist/modes/acp/acp-mode.d.ts.map +1 -1
- package/dist/modes/acp/acp-mode.js +1 -1
- package/dist/modes/acp/acp-mode.js.map +1 -1
- package/dist/modes/agent-connection/daemon-agent-connection.d.ts +6 -2
- package/dist/modes/agent-connection/daemon-agent-connection.d.ts.map +1 -1
- package/dist/modes/agent-connection/daemon-agent-connection.js +13 -2
- package/dist/modes/agent-connection/daemon-agent-connection.js.map +1 -1
- package/dist/modes/agent-connection/in-process-agent-connection.d.ts +2 -0
- package/dist/modes/agent-connection/in-process-agent-connection.d.ts.map +1 -1
- package/dist/modes/agent-connection/in-process-agent-connection.js +6 -0
- package/dist/modes/agent-connection/in-process-agent-connection.js.map +1 -1
- package/dist/modes/agent-connection/types.d.ts +3 -0
- package/dist/modes/agent-connection/types.d.ts.map +1 -1
- package/dist/modes/agent-connection/types.js.map +1 -1
- package/dist/modes/agents-view/agents-view-mode.d.ts.map +1 -1
- package/dist/modes/agents-view/agents-view-mode.js +2 -19
- package/dist/modes/agents-view/agents-view-mode.js.map +1 -1
- package/dist/modes/daemon/daemon-mode.d.ts +5 -0
- package/dist/modes/daemon/daemon-mode.d.ts.map +1 -1
- package/dist/modes/daemon/daemon-mode.js +107 -12
- package/dist/modes/daemon/daemon-mode.js.map +1 -1
- package/dist/modes/daemon/daemon-protocol.d.ts +194 -165
- package/dist/modes/daemon/daemon-protocol.d.ts.map +1 -1
- package/dist/modes/daemon/daemon-protocol.js +16 -11
- package/dist/modes/daemon/daemon-protocol.js.map +1 -1
- package/dist/modes/daemon/daemon-rlm-capacity-coordinator.d.ts +19 -0
- package/dist/modes/daemon/daemon-rlm-capacity-coordinator.d.ts.map +1 -0
- package/dist/modes/daemon/daemon-rlm-capacity-coordinator.js +74 -0
- package/dist/modes/daemon/daemon-rlm-capacity-coordinator.js.map +1 -0
- package/dist/modes/daemon/daemon-rlm-capacity.d.ts +19 -0
- package/dist/modes/daemon/daemon-rlm-capacity.d.ts.map +1 -0
- package/dist/modes/daemon/daemon-rlm-capacity.js +85 -0
- package/dist/modes/daemon/daemon-rlm-capacity.js.map +1 -0
- package/dist/modes/daemon/daemon-session-summarizer.d.ts +2 -3
- package/dist/modes/daemon/daemon-session-summarizer.d.ts.map +1 -1
- package/dist/modes/daemon/daemon-session-summarizer.js +32 -23
- package/dist/modes/daemon/daemon-session-summarizer.js.map +1 -1
- package/dist/modes/daemon/daemon-state-root.d.ts +15 -0
- package/dist/modes/daemon/daemon-state-root.d.ts.map +1 -0
- package/dist/modes/daemon/daemon-state-root.js +40 -0
- package/dist/modes/daemon/daemon-state-root.js.map +1 -0
- package/dist/modes/daemon/daemon-supervisor-ownership.d.ts +2 -0
- package/dist/modes/daemon/daemon-supervisor-ownership.d.ts.map +1 -1
- package/dist/modes/daemon/daemon-supervisor-ownership.js +27 -0
- package/dist/modes/daemon/daemon-supervisor-ownership.js.map +1 -1
- package/dist/modes/daemon/daemon-supervisor.d.ts +10 -1
- package/dist/modes/daemon/daemon-supervisor.d.ts.map +1 -1
- package/dist/modes/daemon/daemon-supervisor.js +213 -20
- package/dist/modes/daemon/daemon-supervisor.js.map +1 -1
- package/dist/modes/daemon/daemon-worker-protocol.d.ts +28 -1
- package/dist/modes/daemon/daemon-worker-protocol.d.ts.map +1 -1
- package/dist/modes/daemon/daemon-worker-protocol.js +16 -2
- package/dist/modes/daemon/daemon-worker-protocol.js.map +1 -1
- package/dist/modes/daemon/saved-session-catalog.d.ts.map +1 -1
- package/dist/modes/daemon/saved-session-catalog.js +2 -0
- package/dist/modes/daemon/saved-session-catalog.js.map +1 -1
- package/dist/modes/interactive/auth-flows.d.ts +0 -6
- package/dist/modes/interactive/auth-flows.d.ts.map +1 -1
- package/dist/modes/interactive/auth-flows.js +6 -126
- package/dist/modes/interactive/auth-flows.js.map +1 -1
- package/dist/modes/interactive/components/configuration-menu.d.ts +3 -0
- package/dist/modes/interactive/components/configuration-menu.d.ts.map +1 -1
- package/dist/modes/interactive/components/configuration-menu.js +13 -2
- package/dist/modes/interactive/components/configuration-menu.js.map +1 -1
- package/dist/modes/interactive/components/footer.d.ts +1 -1
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +2 -2
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/index.d.ts +0 -1
- package/dist/modes/interactive/components/index.d.ts.map +1 -1
- package/dist/modes/interactive/components/index.js +0 -1
- package/dist/modes/interactive/components/index.js.map +1 -1
- package/dist/modes/interactive/components/login-dialog.d.ts +0 -1
- package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
- package/dist/modes/interactive/components/login-dialog.js +3 -40
- package/dist/modes/interactive/components/login-dialog.js.map +1 -1
- package/dist/modes/interactive/components/model-selector.d.ts +2 -0
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-selector.js +13 -2
- package/dist/modes/interactive/components/model-selector.js.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.js +2 -11
- package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
- package/dist/modes/interactive/feature-hints.d.ts.map +1 -1
- package/dist/modes/interactive/feature-hints.js +0 -4
- package/dist/modes/interactive/feature-hints.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +3 -12
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +81 -507
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/onboarding.d.ts +0 -3
- package/dist/modes/interactive/onboarding.d.ts.map +1 -1
- package/dist/modes/interactive/onboarding.js +0 -17
- package/dist/modes/interactive/onboarding.js.map +1 -1
- package/dist/modes/rpc/rpc-client.d.ts +4 -1
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client.js +82 -42
- package/dist/modes/rpc/rpc-client.js.map +1 -1
- package/dist/node/amazon-bedrock.d.ts +2 -0
- package/dist/node/amazon-bedrock.d.ts.map +1 -0
- package/dist/node/amazon-bedrock.js +6 -0
- package/dist/node/amazon-bedrock.js.map +1 -0
- package/dist/product-identity.d.ts +0 -1
- package/dist/product-identity.d.ts.map +1 -1
- package/dist/product-identity.js +0 -1
- package/dist/product-identity.js.map +1 -1
- package/docs/development.md +1 -1
- package/docs/fork-philosophy.md +4 -8
- package/docs/installation.md +83 -62
- package/docs/providers.md +23 -25
- package/docs/quickstart.md +19 -10
- package/docs/rlm-runtime.md +13 -5
- package/docs/rpc.md +4 -4
- package/docs/sdk.md +20 -11
- package/docs/sessions.md +0 -1
- package/docs/settings.md +9 -42
- package/docs/skills.md +0 -1
- package/docs/upstream-0.9.5.md +171 -0
- package/docs/usage.md +14 -10
- package/package.json +4 -4
- package/dist/core/agent-traces.d.ts +0 -149
- package/dist/core/agent-traces.d.ts.map +0 -1
- package/dist/core/agent-traces.js +0 -904
- package/dist/core/agent-traces.js.map +0 -1
- package/dist/core/prime-inference-auth.d.ts +0 -70
- package/dist/core/prime-inference-auth.d.ts.map +0 -1
- package/dist/core/prime-inference-auth.js +0 -352
- package/dist/core/prime-inference-auth.js.map +0 -1
- package/dist/core/prime-inference-model-selection.d.ts +0 -16
- package/dist/core/prime-inference-model-selection.d.ts.map +0 -1
- package/dist/core/prime-inference-model-selection.js +0 -16
- package/dist/core/prime-inference-model-selection.js.map +0 -1
- package/dist/core/prime-inference-models.d.ts +0 -6
- package/dist/core/prime-inference-models.d.ts.map +0 -1
- package/dist/core/prime-inference-models.js +0 -62
- package/dist/core/prime-inference-models.js.map +0 -1
- package/dist/core/telemetry.d.ts +0 -95
- package/dist/core/telemetry.d.ts.map +0 -1
- package/dist/core/telemetry.js +0 -637
- package/dist/core/telemetry.js.map +0 -1
- package/dist/modes/interactive/components/prime-onboarding-splash.d.ts +0 -39
- package/dist/modes/interactive/components/prime-onboarding-splash.d.ts.map +0 -1
- package/dist/modes/interactive/components/prime-onboarding-splash.js +0 -286
- package/dist/modes/interactive/components/prime-onboarding-splash.js.map +0 -1
- package/dist/modes/interactive/components/prime-team-selector.d.ts +0 -30
- package/dist/modes/interactive/components/prime-team-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/prime-team-selector.js +0 -166
- package/dist/modes/interactive/components/prime-team-selector.js.map +0 -1
- package/dist/skills/prime-intellect/SKILL.md +0 -87
- package/dist/skills/prime-intellect/references/compute.md +0 -45
- package/dist/skills/prime-intellect/references/environments.md +0 -73
- package/dist/skills/prime-intellect/references/inference.md +0 -47
- package/dist/skills/prime-intellect/references/sandboxes.md +0 -75
- package/skills/prime-intellect/SKILL.md +0 -87
- package/skills/prime-intellect/references/compute.md +0 -45
- package/skills/prime-intellect/references/environments.md +0 -73
- package/skills/prime-intellect/references/inference.md +0 -47
- package/skills/prime-intellect/references/sandboxes.md +0 -75
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/modes/agent-connection/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EA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AAC,CAAC;IACtD,SAAS,CAAC,QAAQ,EAAE,4BAA4B,GAAG,MAAM,IAAI,CAAC;IAC9D,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,6BAA6B,GAAG,SAAS,CAAC,CAAC;IACpF,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACvB","sourcesContent":["import type { AgentEvent, AgentMessage, ThinkingLevel } from \"@ponythewhite/base-context-agent\";\nimport type {\n\tApi,\n\tImageContent,\n\tModel,\n\tServiceTier,\n\tTextContent,\n\tTransport,\n\tUsage,\n} from \"@ponythewhite/base-context-ai\";\nimport type { AgentSessionMessageReceipt, AgentSessionMessageSafetyStatus } from \"../../core/agent-messages.js\";\nimport type { AuthSourceToken } from \"../../core/auth-storage.js\";\nimport type { AgentAutonomousStatus } from \"../../core/autonomous.js\";\nimport type { BashResult } from \"../../core/bash-executor.js\";\nimport type { CompactionResult } from \"../../core/compaction/index.js\";\nimport type { ContextTreeNode } from \"../../core/context-tree.js\";\nimport type {\n\tAgentCronJob,\n\tAgentHeartbeatDeliveryMode,\n\tAgentHeartbeatManagementAction,\n\tAgentHeartbeatUpdateAction,\n} from \"../../core/cron-jobs.js\";\nimport type { ReplayBuiltInToolName } from \"../../core/extensions/index.js\";\nimport type { InputSource } from \"../../core/extensions/types.js\";\nimport type { GoalState } from \"../../core/goals.js\";\nimport type { KernelSentAgentMessage } from \"../../core/kernel/index.js\";\nimport type { AcpMcpServerConfig } from \"../../core/mcp/acp-mcp-types.js\";\nimport type { RefinementResult } from \"../../core/refinement/index.js\";\nimport type { RlmMaxDepthStatus, SetRlmMaxDepthResult } from \"../../core/rlm-max-depth.js\";\nimport type {\n\tQueuedMessageLane,\n\tQueuedMessageMutation,\n\tQueuedMessageMutationStatus,\n\tSessionActionSnapshot,\n} from \"../../core/session-action-store.js\";\nimport type { DeleteSessionFileResult } from \"../../core/session-file-actions.js\";\nimport type { SessionStats } from \"../../core/session-stats.js\";\nimport type { SessionUsageSummary } from \"../../core/usage.js\";\nimport type { SessionSummary } from \"../daemon/daemon-session-list.js\";\n\n/**\n * Client-side interaction boundary consumed by InteractiveMode.\n *\n * This is not the final hosted/gateway wire protocol. Local and future remote\n * adapters may implement this interface, but network transports should translate\n * at their edge to versioned DTOs with their own framing, sequencing, replay,\n * and command lifecycle semantics.\n *\n * Keep runtime ownership details out of this contract. InteractiveMode must not\n * receive AgentSessionRuntime, AgentSession, SessionManager, daemon socket\n * clients, in-process event emitters, or executable callbacks through\n * AgentConnection. Local-only compatibility hooks belong in adapter/service\n * layers such as InteractiveModeLocalSessionHost.\n *\n * Transitional note: AgentEvent and AgentMessage are still reused below so this\n * PR can move the TUI behind a boundary without rewriting the transcript\n * renderer and stream event model. Replace those aliases with stable\n * connection-owned/network DTOs before treating this surface as a remote wire\n * contract.\n */\nexport type AgentConnectionQueueMode = \"all\" | \"one-at-a-time\";\nexport type AgentConnectionModel = Model<Api>;\nexport interface AgentConnectionModelCatalog {\n\tmodels: AgentConnectionModel[];\n\tconfiguredProviders: string[];\n}\nexport type AgentConnectionSavedSessionScope = \"current\" | \"all\";\n\nexport interface AgentConnectionSessionHeader {\n\ttype: \"session\";\n\tversion?: number;\n\tid: string;\n\ttimestamp: string;\n\tcwd: string;\n\tparentSession?: string;\n\trlmDepth?: number;\n\tgit?: {\n\t\trepoUrl?: string;\n\t\tcommit?: string;\n\t\tbranch?: string;\n\t};\n}\n\nexport type AgentConnectionSavedSessionStateStatus = \"active\" | \"archived\" | \"crash\";\n\nexport type AgentConnectionSourceScope = \"user\" | \"project\" | \"temporary\";\nexport type AgentConnectionSourceOrigin = \"package\" | \"top-level\";\n\nexport interface AgentConnectionSourceInfo {\n\tpath: string;\n\tsource: string;\n\tscope: AgentConnectionSourceScope;\n\torigin: AgentConnectionSourceOrigin;\n\tbaseDir?: string;\n}\n\nexport interface AgentConnectionResourceCollision {\n\tresourceType: \"extension\" | \"skill\" | \"prompt\" | \"theme\";\n\tname: string;\n\twinnerPath: string;\n\tloserPath: string;\n\twinnerSource?: string;\n\tloserSource?: string;\n}\n\nexport interface AgentConnectionResourceDiagnostic {\n\ttype: \"warning\" | \"error\" | \"collision\";\n\tmessage: string;\n\tpath?: string;\n\tcollision?: AgentConnectionResourceCollision;\n}\n\nexport interface AgentConnectionSavedSessionState {\n\tstatus: AgentConnectionSavedSessionStateStatus;\n}\n\nexport interface AgentConnectionAgentStatus {\n\tsummary: string;\n\ttaskState?: \"needs_input\" | \"completed\";\n\tbasedOnMessageCount: number;\n}\n\n/**\n * Saved-session registry row for the current local TUI migration.\n *\n * Existing fields intentionally preserve local behavior, including filesystem\n * paths and Date objects. Do not add new TUI features that require these local\n * shapes through AgentConnection. Hosted/gateway work should introduce opaque\n * session/artifact identifiers and string timestamp DTOs before exposing this\n * data across a network.\n */\nexport interface AgentConnectionSavedSessionInfo {\n\tpath: string;\n\tid: string;\n\tcwd: string;\n\tname?: string;\n\tstate?: AgentConnectionSavedSessionState;\n\tparentSessionPath?: string;\n\trlmDepth?: number;\n\tcreated: Date;\n\tmodified: Date;\n\tmessageCount: number;\n\tfirstMessage: string;\n\tallMessagesText: string;\n\tagentStatus?: AgentConnectionAgentStatus;\n\tusage?: SessionUsageSummary;\n}\n\nexport type AgentConnectionSessionListProgress = (loaded: number, total: number) => void;\n\nexport interface AgentConnectionSessionListCallbacks {\n\tonProgress?: AgentConnectionSessionListProgress;\n\tonSession?: (session: AgentConnectionSavedSessionInfo) => void;\n}\n\nexport interface AgentConnectionSessionEntryBase {\n\ttype: string;\n\tid: string;\n\tparentId: string | null;\n\ttimestamp: string;\n}\n\nexport interface AgentConnectionSessionMessageEntry extends AgentConnectionSessionEntryBase {\n\ttype: \"message\";\n\tmessage: AgentMessage;\n}\n\nexport interface AgentConnectionThinkingLevelChangeEntry extends AgentConnectionSessionEntryBase {\n\ttype: \"thinking_level_change\";\n\tthinkingLevel: string;\n}\n\nexport interface AgentConnectionServiceTierChangeEntry extends AgentConnectionSessionEntryBase {\n\ttype: \"service_tier_change\";\n\tserviceTier: ServiceTier;\n}\n\nexport interface AgentConnectionModelChangeEntry extends AgentConnectionSessionEntryBase {\n\ttype: \"model_change\";\n\tprovider: string;\n\tmodelId: string;\n}\n\nexport interface AgentConnectionCompactionEntry extends AgentConnectionSessionEntryBase {\n\ttype: \"compaction\";\n\tsummary: string;\n\tfirstKeptEntryId: string;\n\ttokensBefore: number | null;\n\tdetails?: unknown;\n\tfromHook?: boolean;\n}\n\nexport interface AgentConnectionBranchSummaryEntry extends AgentConnectionSessionEntryBase {\n\ttype: \"branch_summary\";\n\tfromId: string;\n\tsummary: string;\n\tdetails?: unknown;\n\tfromHook?: boolean;\n}\n\nexport interface AgentConnectionCustomEntry extends AgentConnectionSessionEntryBase {\n\ttype: \"custom\";\n\tcustomType: string;\n\tdata?: unknown;\n}\n\nexport interface AgentConnectionChildUsageAttributionEntry extends AgentConnectionSessionEntryBase {\n\ttype: \"child_usage_attributed\";\n\ttargetId: string;\n\tchildUsage: Usage;\n\taggregateUsage: Usage;\n\torigin?: \"spawn_task\" | \"agent_message\" | \"direct_user\";\n}\n\nexport interface AgentConnectionCustomMessageEntry extends AgentConnectionSessionEntryBase {\n\ttype: \"custom_message\";\n\tcustomType: string;\n\tcontent: string | (TextContent | ImageContent)[];\n\tdetails?: unknown;\n\tdisplay: boolean;\n}\n\nexport interface AgentConnectionLabelEntry extends AgentConnectionSessionEntryBase {\n\ttype: \"label\";\n\ttargetId: string;\n\tlabel: string | undefined;\n}\n\nexport interface AgentConnectionSessionInfoEntry extends AgentConnectionSessionEntryBase {\n\ttype: \"session_info\";\n\tname?: string;\n}\n\nexport interface AgentConnectionSessionStateEntry extends AgentConnectionSessionEntryBase {\n\ttype: \"session_state\";\n\tstate: AgentConnectionSavedSessionState;\n}\n\nexport interface AgentConnectionAgentStatusEntry extends AgentConnectionSessionEntryBase {\n\ttype: \"agent_status\";\n\tstatus: AgentConnectionAgentStatus;\n}\n\nexport interface AgentConnectionGitStateEntry extends AgentConnectionSessionEntryBase {\n\ttype: \"git_state\";\n\tgit: {\n\t\trepoUrl?: string;\n\t\tcommit?: string;\n\t\tbranch?: string;\n\t};\n}\n\nexport type AgentConnectionSessionEntry =\n\t| AgentConnectionSessionMessageEntry\n\t| AgentConnectionThinkingLevelChangeEntry\n\t| AgentConnectionServiceTierChangeEntry\n\t| AgentConnectionModelChangeEntry\n\t| AgentConnectionCompactionEntry\n\t| AgentConnectionBranchSummaryEntry\n\t| AgentConnectionCustomEntry\n\t| AgentConnectionChildUsageAttributionEntry\n\t| AgentConnectionCustomMessageEntry\n\t| AgentConnectionLabelEntry\n\t| AgentConnectionSessionInfoEntry\n\t| AgentConnectionSessionStateEntry\n\t| AgentConnectionAgentStatusEntry\n\t| AgentConnectionGitStateEntry;\n\nexport interface AgentConnectionSessionTreeFlatNode {\n\tentry: AgentConnectionSessionEntry;\n\tlabel?: string;\n\tlabelTimestamp?: string;\n}\n\nexport interface AgentConnectionSessionTreeNode extends AgentConnectionSessionTreeFlatNode {\n\tchildren: AgentConnectionSessionTreeNode[];\n}\n\nexport interface AgentConnectionSessionContext {\n\tmessages: AgentMessage[];\n\tthinkingLevel: string;\n\tserviceTier: ServiceTier;\n\tmodel: { provider: string; modelId: string } | null;\n}\n\nexport type AgentConnectionReplayStatus = \"complete\" | \"partial\" | \"unavailable\";\n\nexport interface AgentConnectionReplayInfo {\n\tstatus: AgentConnectionReplayStatus;\n\tfromSequence?: number;\n\ttoSequence: number;\n\tfromCursor?: AgentConnectionEventCursor;\n\ttoCursor?: AgentConnectionEventCursor;\n\treason?: string;\n}\n\nexport interface AgentConnectionEventCursor {\n\tgeneration: string;\n\tsequence: number;\n}\n\nexport interface AgentConnectionParentMetadata {\n\tactiveSessionId?: string;\n\tsessionId?: string;\n\tnodeId?: string;\n\tchildId?: string;\n}\n\nexport interface AgentConnectionSnapshot {\n\tstate: AgentConnectionState;\n\tmessages: AgentMessage[];\n\t/** In-flight assistant message, separate from finalized transcript messages. */\n\tstreamingMessage?: AgentMessage;\n\tsessionContext?: AgentConnectionSessionContext;\n\tsessionTree?: { tree: AgentConnectionSessionTreeNode[]; leafId: string | null };\n\tparent?: AgentConnectionParentMetadata;\n\t/** Live RLM children, including descendants, known to the host at snapshot time. */\n\tchildren?: AgentConnectionRlmChildAgentSnapshot[];\n\tlastEventSequence?: number;\n\tlastEventCursor?: AgentConnectionEventCursor;\n\treplay?: AgentConnectionReplayInfo;\n}\n\nexport interface AgentConnectionScopedModel {\n\tmodel: AgentConnectionModel;\n\tthinkingLevel?: ThinkingLevel;\n}\n\nexport interface AgentConnectionModelCycleResult {\n\tmodel: AgentConnectionModel;\n\tthinkingLevel: ThinkingLevel;\n\tserviceTier: ServiceTier;\n\tisScoped: boolean;\n}\n\nexport interface AgentConnectionState {\n\tactiveSessionId?: string;\n\tcwd: string;\n\tmodel?: AgentConnectionModel;\n\tthinkingLevel: ThinkingLevel;\n\tserviceTier: ServiceTier;\n\tavailableThinkingLevels: ThinkingLevel[];\n\tisStreaming: boolean;\n\tisCompacting: boolean;\n\tisBashRunning: boolean;\n\tretryAttempt: number;\n\tsteeringMode: AgentConnectionQueueMode;\n\tfollowUpMode: AgentConnectionQueueMode;\n\tsessionFile?: string;\n\tsessionId: string;\n\tsessionName?: string;\n\tsessionDir?: string;\n\tleafId: string | null;\n\tautoCompactionEnabled: boolean;\n\tmessageCount: number;\n\tsessionActions: SessionActionSnapshot;\n\tcompactionCount: number;\n\tgoal: GoalState;\n\theartbeat?: AgentCronJob | null;\n\tscopedModels: AgentConnectionScopedModel[];\n\tactiveToolNames: string[];\n\tcontextUsage: SessionStats[\"contextUsage\"];\n\t/** One-line recent-work recap for the prompt UI. */\n\trecap?: string;\n}\n\nexport interface AgentConnectionSlashCommand {\n\tname: string;\n\tregisteredName?: string;\n\tdescription?: string;\n\targumentHint?: string;\n\tsource: \"extension\" | \"prompt\" | \"skill\";\n\tsourceInfo: AgentConnectionSourceInfo;\n}\n\nexport type AgentConnectionArtifactType = \"context_file\" | \"extension\" | \"prompt\" | \"skill\" | \"theme\";\n\nexport interface AgentConnectionArtifactReference {\n\tid: string;\n\tsessionId: string;\n\ttype: AgentConnectionArtifactType;\n\tlogicalPath: string;\n\trelativePath?: string;\n\tmimeType?: string;\n}\n\nexport interface AgentConnectionResourceContextFile {\n\tpath: string;\n\tartifact?: AgentConnectionArtifactReference;\n}\n\nexport interface AgentConnectionResourceSkill {\n\tname: string;\n\tdescription?: string;\n\tfilePath: string;\n\tsourceInfo?: AgentConnectionSourceInfo;\n\tartifact?: AgentConnectionArtifactReference;\n}\n\nexport interface AgentConnectionResourcePrompt {\n\tname: string;\n\tdescription?: string;\n\targumentHint?: string;\n\tfilePath: string;\n\tsourceInfo?: AgentConnectionSourceInfo;\n\tartifact?: AgentConnectionArtifactReference;\n}\n\nexport interface AgentConnectionResourceExtension {\n\tpath: string;\n\tsourceInfo?: AgentConnectionSourceInfo;\n\tartifact?: AgentConnectionArtifactReference;\n}\n\nexport interface AgentConnectionResourceTheme {\n\tname?: string;\n\tsourcePath?: string;\n\tsourceInfo?: AgentConnectionSourceInfo;\n\tartifact?: AgentConnectionArtifactReference;\n}\n\nexport interface AgentConnectionResourceDiagnostics {\n\tskills: AgentConnectionResourceDiagnostic[];\n\tprompts: AgentConnectionResourceDiagnostic[];\n\textensions: AgentConnectionResourceDiagnostic[];\n\tthemes: AgentConnectionResourceDiagnostic[];\n}\n\nexport interface AgentConnectionResourceSnapshot {\n\tcontextFiles: AgentConnectionResourceContextFile[];\n\tskills: AgentConnectionResourceSkill[];\n\tprompts: AgentConnectionResourcePrompt[];\n\textensions: AgentConnectionResourceExtension[];\n\tthemes: AgentConnectionResourceTheme[];\n\tdiagnostics: AgentConnectionResourceDiagnostics;\n}\n\nexport interface AgentConnectionToolDefinition {\n\tname: string;\n\tlabel: string;\n\tdescription: string;\n\tpromptSnippet?: string;\n\tpromptGuidelines?: string[];\n\tparameters: unknown;\n\trenderShell?: \"default\" | \"self\";\n\treplayBuiltInToolName?: ReplayBuiltInToolName;\n}\n\n/** Only confirmed cancellation makes prompt-admission failure retry-safe. */\nexport class AgentConnectionPromptAdmissionError extends Error {\n\treadonly cancelled: boolean;\n\n\tconstructor(\n\t\tmessage: string,\n\t\treadonly status: \"cancelled\" | \"owned\" | \"unknown\" | \"unsupported\",\n\t\toptions?: ErrorOptions,\n\t) {\n\t\tsuper(message, options);\n\t\tthis.cancelled = status === \"cancelled\";\n\t\tthis.name = \"AgentConnectionPromptAdmissionError\";\n\t}\n}\n\nexport interface AgentConnectionPromptOptions {\n\timages?: ImageContent[];\n\tstreamingBehavior?: \"steer\" | \"followUp\";\n\tqueueIfBusy?: boolean;\n\tsource?: InputSource;\n\t/** Cancels only while admission waits; accepted prompts remain session-owned. */\n\tsignal?: AbortSignal;\n}\n\nexport interface AgentConnectionSideQuestionEvent {\n\tid: string;\n\tquestion: string;\n\tanswer: string;\n\tstatus: \"running\" | \"complete\" | \"cancelled\" | \"error\";\n\terrorMessage?: string;\n}\n\nexport interface AgentConnectionSideQuestionTurn {\n\tquestion: string;\n\tanswer: string;\n}\n\nexport interface AgentConnectionExecuteBashOptions {\n\texcludeFromContext?: boolean;\n\t/** Side-conversation bash is not recorded into the session. */\n\ttransient?: boolean;\n\t/**\n\t * Caller-generated id echoed on the run's bash_start/bash_end events, so the\n\t * requesting client can tell its own run apart from other clients' runs\n\t * broadcast on the same session.\n\t */\n\trunId?: string;\n}\n\nexport interface AgentConnectionNewSessionOptions {\n\tparentSession?: string;\n}\n\nexport interface AgentConnectionForkOptions {\n\tposition?: \"before\" | \"at\";\n}\n\nexport interface AgentConnectionSwitchSessionOptions {\n\tcwdOverride?: string;\n}\n\nexport interface AgentConnectionNavigateTreeOptions {\n\tsummarize?: boolean;\n\tcustomInstructions?: string;\n\treplaceInstructions?: boolean;\n\tlabel?: string;\n}\n\nexport interface AgentConnectionNavigateTreeResult {\n\teditorText?: string;\n\tcancelled: boolean;\n\taborted?: boolean;\n}\n\nexport interface AgentConnectionUserMessage {\n\tentryId: string;\n\ttext: string;\n}\n\nexport interface AgentConnectionQueueState {\n\tsteering: string[];\n\tfollowUp: string[];\n}\n\nexport type AgentConnectionQueuedMessageLane = QueuedMessageLane;\nexport type AgentConnectionQueuedMessageMutation = QueuedMessageMutation;\n/** `unsupported` means an older remote daemon lacks queued-message mutation. */\nexport type AgentConnectionQueuedMessageMutationStatus = QueuedMessageMutationStatus | \"unsupported\";\n\nexport interface AgentConnectionHeartbeat {\n\tjob: AgentCronJob;\n\tsessionName?: string;\n\tfirstMessage?: string;\n}\n\nexport type AgentConnectionExtensionUiResponse = { value: string } | { confirmed: boolean } | { cancelled: true };\n\nexport interface AgentConnectionExtensionUiRequest {\n\tid: string;\n\tmethod: string;\n\tpayload: Record<string, unknown>;\n}\n\nexport type AgentConnectionRlmChildAgentStatus = \"queued\" | \"running\" | \"done\" | \"error\" | \"cancelled\";\n\nexport interface AgentConnectionRlmChildAgentActivity {\n\tkind: \"waiting\" | \"writing\" | \"executing\";\n\ttoolName?: string;\n}\n\nexport interface AgentConnectionRlmChildAgentSnapshot {\n\tid: string;\n\tparentId?: string;\n\t/** Child daemon active-session id, for direct attachment. */\n\tactiveSessionId?: string;\n\t/** Stable daemon-visible child name for addressing and display. */\n\tsessionName?: string;\n\t/** Exact provider/model selector used by the child. */\n\tmodel?: string;\n\tlabel: string;\n\tstatus: AgentConnectionRlmChildAgentStatus;\n\tdurationMs?: number;\n\tanswerPreview?: string;\n\trepliedSinceTask?: boolean;\n\ttoolUseCount?: number;\n\ttokenCount?: number;\n\trecap?: string;\n\tsessionDir: string;\n\tactivity?: AgentConnectionRlmChildAgentActivity;\n\terror?: string;\n}\n\nexport type AgentConnectionSessionEvent =\n\t| AgentEvent\n\t| { type: \"ipython_sent_agent_message\"; toolCallId: string; message: KernelSentAgentMessage }\n\t| { type: \"session_action_update\"; actions: SessionActionSnapshot }\n\t| {\n\t\t\ttype: \"compaction_start\";\n\t\t\treason: \"manual\" | \"threshold\" | \"overflow\" | \"requested\";\n\t\t\tcustomInstructions?: string;\n\t }\n\t| { type: \"session_info_changed\"; name: string | undefined }\n\t| { type: \"thinking_level_changed\"; level: ThinkingLevel }\n\t| { type: \"service_tier_changed\"; serviceTier: ServiceTier }\n\t| {\n\t\t\ttype: \"compaction_end\";\n\t\t\treason: \"manual\" | \"threshold\" | \"overflow\" | \"requested\";\n\t\t\tresult: CompactionResult | undefined;\n\t\t\taborted: boolean;\n\t\t\twillRetry: boolean;\n\t\t\terrorMessage?: string;\n\t\t\terrorSeverity?: \"warning\" | \"error\";\n\t\t\tcustomInstructions?: string;\n\t }\n\t| { type: \"auto_retry_start\"; attempt: number; maxAttempts?: number; delayMs: number; errorMessage: string }\n\t| { type: \"auto_retry_end\"; success: boolean; attempt: number; finalError?: string }\n\t| { type: \"auth_stale\"; provider: string; sourceTokens?: readonly AuthSourceToken[] }\n\t| { type: \"rlm_child_update\"; child: AgentConnectionRlmChildAgentSnapshot }\n\t| { type: \"recap_update\"; recap: string | undefined }\n\t| { type: \"goal_update\"; goal: GoalState }\n\t| { type: \"bash_start\"; command: string; excludeFromContext: boolean; transient?: boolean; runId?: string }\n\t| { type: \"bash_output\"; chunk: string }\n\t| {\n\t\t\ttype: \"bash_end\";\n\t\t\texitCode: number | undefined;\n\t\t\tcancelled: boolean;\n\t\t\ttruncated: boolean;\n\t\t\tfullOutputPath?: string;\n\t\t\terrorMessage?: string;\n\t\t\ttransient?: boolean;\n\t\t\trunId?: string;\n\t }\n\t| { type: \"refine_complete\"; result: RefinementResult }\n\t| { type: \"refine_failed\"; error: string };\n\nexport type AgentConnectionEvent =\n\t| { type: \"session_event\"; event: AgentConnectionSessionEvent }\n\t| { type: \"side_question_event\"; event: AgentConnectionSideQuestionEvent }\n\t| { type: \"session_replaced\"; state: AgentConnectionState; messages: AgentMessage[] }\n\t| { type: \"session_resynced\"; snapshot: AgentConnectionSnapshot }\n\t| { type: \"session_status\"; recap?: string }\n\t| { type: \"extension_ui_request\"; request: AgentConnectionExtensionUiRequest }\n\t| { type: \"extension_error\"; extensionPath: string; event: string; error: string }\n\t| { type: \"connection_status\"; status: \"reconnecting\" | \"connected\"; error?: string }\n\t| { type: \"heartbeats_changed\" }\n\t| { type: \"closed\"; error?: string };\n\nexport type AgentConnectionEventListener = (event: AgentConnectionEvent) => void | Promise<void>;\nexport type AgentConnectionBeforeSessionInvalidateListener = () => void;\n\nexport interface AgentConnectionHeadlessCompletionOptions {\n\t/** Wait for descendant terminal publication and the parent turns it triggers. */\n\twaitForRlmQuiescence?: boolean;\n}\n\nexport interface AgentConnectionSessionInputPause {\n\trelease(): Promise<void>;\n}\n\nexport interface AgentConnection {\n\tsubscribe(listener: AgentConnectionEventListener): () => void;\n\tonBeforeSessionInvalidate(listener: AgentConnectionBeforeSessionInvalidateListener): () => void;\n\n\tgetState(): Promise<AgentConnectionState>;\n\tgetInitialSnapshot(): Promise<AgentConnectionSnapshot>;\n\tgetRlmChildSnapshots(): Promise<AgentConnectionRlmChildAgentSnapshot[]>;\n\tgetMessages(): Promise<AgentMessage[]>;\n\tgetSessionHeader(): Promise<AgentConnectionSessionHeader | undefined>;\n\tgetCommands(): Promise<AgentConnectionSlashCommand[]>;\n\tgetResourceSnapshot(): Promise<AgentConnectionResourceSnapshot>;\n\tgetModelCatalog(): Promise<AgentConnectionModelCatalog>;\n\tgetAvailableModels(): Promise<AgentConnectionModel[]>;\n\tgetSessionStats(): Promise<SessionStats>;\n\tgetContextTree(): Promise<ContextTreeNode>;\n\tgetSessionContext(): Promise<AgentConnectionSessionContext>;\n\tgetSessionTree(): Promise<{ tree: AgentConnectionSessionTreeNode[]; leafId: string | null }>;\n\tlistSavedSessions(\n\t\tscope: AgentConnectionSavedSessionScope,\n\t\tcallbacks?: AgentConnectionSessionListCallbacks,\n\t): Promise<AgentConnectionSavedSessionInfo[]>;\n\tgetQueue(): Promise<AgentConnectionQueueState>;\n\tmutateQueuedMessage(\n\t\tlane: AgentConnectionQueuedMessageLane,\n\t\tindex: number,\n\t\texpectedText: string,\n\t\tmutation: AgentConnectionQueuedMessageMutation,\n\t): Promise<AgentConnectionQueuedMessageMutationStatus>;\n\tclearQueue(): Promise<AgentConnectionQueueState>;\n\tabortAndClearQueue(): Promise<AgentConnectionQueueState>;\n\tacquireSessionInputPause(leaseKey: string): Promise<AgentConnectionSessionInputPause>;\n\tlistCronJobs(options?: { includeInactive?: boolean }): Promise<AgentCronJob[]>;\n\tlistHeartbeats(): Promise<AgentConnectionHeartbeat[]>;\n\tmanageHeartbeat(\n\t\tactiveSessionId: string,\n\t\tjobId: string,\n\t\taction: AgentHeartbeatManagementAction,\n\t): Promise<AgentCronJob>;\n\taddCronJob(schedule: string, prompt: string): Promise<AgentCronJob>;\n\tcancelCronJob(jobId: string): Promise<AgentCronJob>;\n\tgetHeartbeat(): Promise<AgentCronJob | undefined>;\n\tsetHeartbeat(\n\t\tschedule: string,\n\t\tinstruction: string,\n\t\tdeliveryMode?: AgentHeartbeatDeliveryMode,\n\t): Promise<AgentCronJob>;\n\tupdateHeartbeat(action: AgentHeartbeatUpdateAction): Promise<AgentCronJob | undefined>;\n\tsendAgentMessage(targetActiveSessionId: string, message: string): Promise<AgentSessionMessageReceipt>;\n\tgetAgentMessageStatus(): Promise<AgentSessionMessageSafetyStatus>;\n\tpauseAgentMessages(): Promise<AgentSessionMessageSafetyStatus>;\n\tresumeAgentMessages(): Promise<AgentSessionMessageSafetyStatus>;\n\tclearAgentMessages(): Promise<number>;\n\tgetUserMessagesForForking(): Promise<AgentConnectionUserMessage[]>;\n\tgetLastAssistantText(): Promise<string | undefined>;\n\tgetSystemPrompt(): Promise<string>;\n\tgetToolDefinition(name: string): Promise<AgentConnectionToolDefinition | undefined>;\n\tsetSessionEntryLabel(entryId: string, label: string | undefined): Promise<void>;\n\trespondToExtensionUiRequest(requestId: string, response: AgentConnectionExtensionUiResponse): Promise<void>;\n\tsubscribeAgentRoster?(listener: () => void): Promise<{ summaries(): SessionSummary[]; dispose(): Promise<void> }>;\n\tsupportsAcpMcpServers?(): boolean;\n\treplaceAcpMcpServers?(servers: readonly AcpMcpServerConfig[], ownerId: string): Promise<void>;\n\treleaseAcpMcpServers?(ownerId: string, serverNames: readonly string[]): Promise<void>;\n\n\tprompt(message: string, options?: AgentConnectionPromptOptions): Promise<void>;\n\tpromptAndWait(message: string, options?: AgentConnectionPromptOptions): Promise<void>;\n\tstartSideQuestion(id: string, question: string, previousTurns?: AgentConnectionSideQuestionTurn[]): Promise<void>;\n\tabortSideQuestion(id: string): Promise<boolean>;\n\tsteer(message: string, images?: ImageContent[]): Promise<void>;\n\tfollowUp(message: string, images?: ImageContent[]): Promise<void>;\n\tabort(): Promise<void>;\n\tcancelRlmChild(childId: string): Promise<boolean>;\n\twaitForIdle(): Promise<void>;\n\twaitForHeadlessCompletion(options?: AgentConnectionHeadlessCompletionOptions): Promise<AgentAutonomousStatus>;\n\n\t/**\n\t * Run a user-initiated bash command (! / !! prefix). Resolution timing is\n\t * adapter-specific; rendering must be driven by the bash_start/bash_output/\n\t * bash_end session events, which reach every attached client.\n\t */\n\texecuteBash(command: string, options?: AgentConnectionExecuteBashOptions): Promise<void>;\n\texecuteBashAndWait(command: string): Promise<BashResult>;\n\tabortBash(): Promise<void>;\n\n\tsetModel(provider: string, modelId: string): Promise<AgentConnectionModel>;\n\tcycleModel(direction?: \"forward\" | \"backward\"): Promise<AgentConnectionModelCycleResult | undefined>;\n\tsetScopedModels(scopedModels: AgentConnectionScopedModel[]): Promise<void>;\n\tsetThinkingLevel(level: ThinkingLevel): Promise<void>;\n\tsetServiceTier(serviceTier: ServiceTier): Promise<void>;\n\tcycleThinkingLevel(): Promise<ThinkingLevel | undefined>;\n\tsetTransport(transport: Transport): Promise<void>;\n\tsetSteeringMode(mode: AgentConnectionQueueMode): Promise<void>;\n\tsetFollowUpMode(mode: AgentConnectionQueueMode): Promise<void>;\n\tsetAutoCompactionEnabled(enabled: boolean): Promise<void>;\n\tsetAutoRetryEnabled(enabled: boolean): Promise<void>;\n\n\tcompact(customInstructions?: string): Promise<CompactionResult>;\n\trefine(options?: { instructions?: string; rollbackId?: string; global?: boolean }): Promise<RefinementResult>;\n\tabortCompaction(): Promise<void>;\n\tabortBranchSummary(): Promise<void>;\n\tabortRetry(): Promise<void>;\n\n\treload(): Promise<void>;\n\tnewSession(options?: AgentConnectionNewSessionOptions): Promise<{ cancelled: boolean }>;\n\tswitchSession(sessionPath: string, options?: AgentConnectionSwitchSessionOptions): Promise<{ cancelled: boolean }>;\n\tfork(entryId: string, options?: AgentConnectionForkOptions): Promise<{ cancelled: boolean; selectedText?: string }>;\n\tnavigateTree(\n\t\ttargetId: string,\n\t\toptions?: AgentConnectionNavigateTreeOptions,\n\t): Promise<AgentConnectionNavigateTreeResult>;\n\timportFromJsonl(inputPath: string, cwdOverride?: string): Promise<{ cancelled: boolean }>;\n\texportToHtml(outputPath?: string): Promise<string>;\n\texportToJsonl(outputPath?: string): Promise<string>;\n\tsetSessionName(name: string): Promise<void>;\n\tgetRlmMaxDepthStatus(): Promise<RlmMaxDepthStatus>;\n\tsetRlmMaxDepth(maxDepth: number, options?: { global?: boolean }): Promise<SetRlmMaxDepthResult>;\n\trenameSavedSession(sessionPath: string, name: string): Promise<void>;\n\tdeleteSavedSession(sessionPath: string): Promise<DeleteSessionFileResult>;\n\n\t/** Read-only live-session watcher; unavailable transports return undefined. */\n\twatchSession(activeSessionId: string): Promise<AgentConnectionSessionWatcher | undefined>;\n\n\tdispose(): Promise<void>;\n}\n\nexport interface AgentConnectionSessionWatcher {\n\tgetMessages(): Promise<AgentMessage[]>;\n\tgetCommands(): Promise<AgentConnectionSlashCommand[]>;\n\tsubscribe(listener: AgentConnectionEventListener): () => void;\n\tgetToolDefinition(name: string): Promise<AgentConnectionToolDefinition | undefined>;\n\tclose(): Promise<void>;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/modes/agent-connection/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,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IAE1F,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACzB;AAED,MAAM,WAAW,6BAA6B;IAC7C,WAAW,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;IACvC,WAAW,IAAI,OAAO,CAAC,2BAA2B,EAAE,CAAC,CAAC;IACtD,SAAS,CAAC,QAAQ,EAAE,4BAA4B,GAAG,MAAM,IAAI,CAAC;IAC9D,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,6BAA6B,GAAG,SAAS,CAAC,CAAC;IACpF,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACvB","sourcesContent":["import type { AgentEvent, AgentMessage, ThinkingLevel } from \"@ponythewhite/base-context-agent\";\nimport type {\n\tApi,\n\tImageContent,\n\tModel,\n\tServiceTier,\n\tTextContent,\n\tTransport,\n\tUsage,\n} from \"@ponythewhite/base-context-ai\";\nimport type { AgentSessionMessageReceipt, AgentSessionMessageSafetyStatus } from \"../../core/agent-messages.js\";\nimport type { AuthSourceToken } from \"../../core/auth-storage.js\";\nimport type { AgentAutonomousStatus } from \"../../core/autonomous.js\";\nimport type { BashResult } from \"../../core/bash-executor.js\";\nimport type { CompactionResult } from \"../../core/compaction/index.js\";\nimport type { ContextTreeNode } from \"../../core/context-tree.js\";\nimport type {\n\tAgentCronJob,\n\tAgentHeartbeatDeliveryMode,\n\tAgentHeartbeatManagementAction,\n\tAgentHeartbeatUpdateAction,\n} from \"../../core/cron-jobs.js\";\nimport type { ReplayBuiltInToolName } from \"../../core/extensions/index.js\";\nimport type { InputSource } from \"../../core/extensions/types.js\";\nimport type { GoalState } from \"../../core/goals.js\";\nimport type { KernelSentAgentMessage } from \"../../core/kernel/index.js\";\nimport type { AcpMcpServerConfig } from \"../../core/mcp/acp-mcp-types.js\";\nimport type { RefinementResult } from \"../../core/refinement/index.js\";\nimport type { RlmMaxDepthStatus, SetRlmMaxDepthResult } from \"../../core/rlm-max-depth.js\";\nimport type { RlmMaxSubagentsStatus } from \"../../core/rlm-max-subagents.js\";\nimport type {\n\tQueuedMessageLane,\n\tQueuedMessageMutation,\n\tQueuedMessageMutationStatus,\n\tSessionActionSnapshot,\n} from \"../../core/session-action-store.js\";\nimport type { DeleteSessionFileResult } from \"../../core/session-file-actions.js\";\nimport type { SessionStats } from \"../../core/session-stats.js\";\nimport type { SessionUsageSummary } from \"../../core/usage.js\";\nimport type { SessionSummary } from \"../daemon/daemon-session-list.js\";\n\n/**\n * Client-side interaction boundary consumed by InteractiveMode.\n *\n * This is not the final hosted/gateway wire protocol. Local and future remote\n * adapters may implement this interface, but network transports should translate\n * at their edge to versioned DTOs with their own framing, sequencing, replay,\n * and command lifecycle semantics.\n *\n * Keep runtime ownership details out of this contract. InteractiveMode must not\n * receive AgentSessionRuntime, AgentSession, SessionManager, daemon socket\n * clients, in-process event emitters, or executable callbacks through\n * AgentConnection. Local-only compatibility hooks belong in adapter/service\n * layers such as InteractiveModeLocalSessionHost.\n *\n * Transitional note: AgentEvent and AgentMessage are still reused below so this\n * PR can move the TUI behind a boundary without rewriting the transcript\n * renderer and stream event model. Replace those aliases with stable\n * connection-owned/network DTOs before treating this surface as a remote wire\n * contract.\n */\nexport type AgentConnectionQueueMode = \"all\" | \"one-at-a-time\";\nexport type AgentConnectionModel = Model<Api>;\nexport interface AgentConnectionModelCatalog {\n\tmodels: AgentConnectionModel[];\n\tconfiguredProviders: string[];\n}\nexport type AgentConnectionSavedSessionScope = \"current\" | \"all\";\n\nexport interface AgentConnectionSessionHeader {\n\ttype: \"session\";\n\tversion?: number;\n\tid: string;\n\ttimestamp: string;\n\tcwd: string;\n\tparentSession?: string;\n\trlmDepth?: number;\n\tgit?: {\n\t\trepoUrl?: string;\n\t\tcommit?: string;\n\t\tbranch?: string;\n\t};\n}\n\nexport type AgentConnectionSavedSessionStateStatus = \"active\" | \"archived\" | \"crash\";\n\nexport type AgentConnectionSourceScope = \"user\" | \"project\" | \"temporary\";\nexport type AgentConnectionSourceOrigin = \"package\" | \"top-level\";\n\nexport interface AgentConnectionSourceInfo {\n\tpath: string;\n\tsource: string;\n\tscope: AgentConnectionSourceScope;\n\torigin: AgentConnectionSourceOrigin;\n\tbaseDir?: string;\n}\n\nexport interface AgentConnectionResourceCollision {\n\tresourceType: \"extension\" | \"skill\" | \"prompt\" | \"theme\";\n\tname: string;\n\twinnerPath: string;\n\tloserPath: string;\n\twinnerSource?: string;\n\tloserSource?: string;\n}\n\nexport interface AgentConnectionResourceDiagnostic {\n\ttype: \"warning\" | \"error\" | \"collision\";\n\tmessage: string;\n\tpath?: string;\n\tcollision?: AgentConnectionResourceCollision;\n}\n\nexport interface AgentConnectionSavedSessionState {\n\tstatus: AgentConnectionSavedSessionStateStatus;\n}\n\nexport interface AgentConnectionAgentStatus {\n\tsummary: string;\n\ttaskState?: \"needs_input\" | \"completed\";\n\tbasedOnMessageCount: number;\n}\n\n/**\n * Saved-session registry row for the current local TUI migration.\n *\n * Existing fields intentionally preserve local behavior, including filesystem\n * paths and Date objects. Do not add new TUI features that require these local\n * shapes through AgentConnection. Hosted/gateway work should introduce opaque\n * session/artifact identifiers and string timestamp DTOs before exposing this\n * data across a network.\n */\nexport interface AgentConnectionSavedSessionInfo {\n\tpath: string;\n\tid: string;\n\tcwd: string;\n\tname?: string;\n\tstate?: AgentConnectionSavedSessionState;\n\tparentSessionPath?: string;\n\trlmDepth?: number;\n\tcreated: Date;\n\tmodified: Date;\n\tmessageCount: number;\n\tfirstMessage: string;\n\tallMessagesText: string;\n\tagentStatus?: AgentConnectionAgentStatus;\n\tusage?: SessionUsageSummary;\n}\n\nexport type AgentConnectionSessionListProgress = (loaded: number, total: number) => void;\n\nexport interface AgentConnectionSessionListCallbacks {\n\tonProgress?: AgentConnectionSessionListProgress;\n\tonSession?: (session: AgentConnectionSavedSessionInfo) => void;\n}\n\nexport interface AgentConnectionSessionEntryBase {\n\ttype: string;\n\tid: string;\n\tparentId: string | null;\n\ttimestamp: string;\n}\n\nexport interface AgentConnectionSessionMessageEntry extends AgentConnectionSessionEntryBase {\n\ttype: \"message\";\n\tmessage: AgentMessage;\n}\n\nexport interface AgentConnectionThinkingLevelChangeEntry extends AgentConnectionSessionEntryBase {\n\ttype: \"thinking_level_change\";\n\tthinkingLevel: string;\n}\n\nexport interface AgentConnectionServiceTierChangeEntry extends AgentConnectionSessionEntryBase {\n\ttype: \"service_tier_change\";\n\tserviceTier: ServiceTier;\n}\n\nexport interface AgentConnectionModelChangeEntry extends AgentConnectionSessionEntryBase {\n\ttype: \"model_change\";\n\tprovider: string;\n\tmodelId: string;\n}\n\nexport interface AgentConnectionCompactionEntry extends AgentConnectionSessionEntryBase {\n\ttype: \"compaction\";\n\tsummary: string;\n\tfirstKeptEntryId: string;\n\ttokensBefore: number | null;\n\tdetails?: unknown;\n\tfromHook?: boolean;\n}\n\nexport interface AgentConnectionBranchSummaryEntry extends AgentConnectionSessionEntryBase {\n\ttype: \"branch_summary\";\n\tfromId: string;\n\tsummary: string;\n\tdetails?: unknown;\n\tfromHook?: boolean;\n}\n\nexport interface AgentConnectionCustomEntry extends AgentConnectionSessionEntryBase {\n\ttype: \"custom\";\n\tcustomType: string;\n\tdata?: unknown;\n}\n\nexport interface AgentConnectionChildUsageAttributionEntry extends AgentConnectionSessionEntryBase {\n\ttype: \"child_usage_attributed\";\n\ttargetId: string;\n\tchildUsage: Usage;\n\taggregateUsage: Usage;\n\torigin?: \"spawn_task\" | \"agent_message\" | \"direct_user\";\n}\n\nexport interface AgentConnectionCustomMessageEntry extends AgentConnectionSessionEntryBase {\n\ttype: \"custom_message\";\n\tcustomType: string;\n\tcontent: string | (TextContent | ImageContent)[];\n\tdetails?: unknown;\n\tdisplay: boolean;\n}\n\nexport interface AgentConnectionLabelEntry extends AgentConnectionSessionEntryBase {\n\ttype: \"label\";\n\ttargetId: string;\n\tlabel: string | undefined;\n}\n\nexport interface AgentConnectionSessionInfoEntry extends AgentConnectionSessionEntryBase {\n\ttype: \"session_info\";\n\tname?: string;\n}\n\nexport interface AgentConnectionSessionStateEntry extends AgentConnectionSessionEntryBase {\n\ttype: \"session_state\";\n\tstate: AgentConnectionSavedSessionState;\n}\n\nexport interface AgentConnectionAgentStatusEntry extends AgentConnectionSessionEntryBase {\n\ttype: \"agent_status\";\n\tstatus: AgentConnectionAgentStatus;\n}\n\nexport interface AgentConnectionGitStateEntry extends AgentConnectionSessionEntryBase {\n\ttype: \"git_state\";\n\tgit: {\n\t\trepoUrl?: string;\n\t\tcommit?: string;\n\t\tbranch?: string;\n\t};\n}\n\nexport type AgentConnectionSessionEntry =\n\t| AgentConnectionSessionMessageEntry\n\t| AgentConnectionThinkingLevelChangeEntry\n\t| AgentConnectionServiceTierChangeEntry\n\t| AgentConnectionModelChangeEntry\n\t| AgentConnectionCompactionEntry\n\t| AgentConnectionBranchSummaryEntry\n\t| AgentConnectionCustomEntry\n\t| AgentConnectionChildUsageAttributionEntry\n\t| AgentConnectionCustomMessageEntry\n\t| AgentConnectionLabelEntry\n\t| AgentConnectionSessionInfoEntry\n\t| AgentConnectionSessionStateEntry\n\t| AgentConnectionAgentStatusEntry\n\t| AgentConnectionGitStateEntry;\n\nexport interface AgentConnectionSessionTreeFlatNode {\n\tentry: AgentConnectionSessionEntry;\n\tlabel?: string;\n\tlabelTimestamp?: string;\n}\n\nexport interface AgentConnectionSessionTreeNode extends AgentConnectionSessionTreeFlatNode {\n\tchildren: AgentConnectionSessionTreeNode[];\n}\n\nexport interface AgentConnectionSessionContext {\n\tmessages: AgentMessage[];\n\tthinkingLevel: string;\n\tserviceTier: ServiceTier;\n\tmodel: { provider: string; modelId: string } | null;\n}\n\nexport type AgentConnectionReplayStatus = \"complete\" | \"partial\" | \"unavailable\";\n\nexport interface AgentConnectionReplayInfo {\n\tstatus: AgentConnectionReplayStatus;\n\tfromSequence?: number;\n\ttoSequence: number;\n\tfromCursor?: AgentConnectionEventCursor;\n\ttoCursor?: AgentConnectionEventCursor;\n\treason?: string;\n}\n\nexport interface AgentConnectionEventCursor {\n\tgeneration: string;\n\tsequence: number;\n}\n\nexport interface AgentConnectionParentMetadata {\n\tactiveSessionId?: string;\n\tsessionId?: string;\n\tnodeId?: string;\n\tchildId?: string;\n}\n\nexport interface AgentConnectionSnapshot {\n\tstate: AgentConnectionState;\n\tmessages: AgentMessage[];\n\t/** In-flight assistant message, separate from finalized transcript messages. */\n\tstreamingMessage?: AgentMessage;\n\tsessionContext?: AgentConnectionSessionContext;\n\tsessionTree?: { tree: AgentConnectionSessionTreeNode[]; leafId: string | null };\n\tparent?: AgentConnectionParentMetadata;\n\t/** Live RLM children, including descendants, known to the host at snapshot time. */\n\tchildren?: AgentConnectionRlmChildAgentSnapshot[];\n\tlastEventSequence?: number;\n\tlastEventCursor?: AgentConnectionEventCursor;\n\treplay?: AgentConnectionReplayInfo;\n}\n\nexport interface AgentConnectionScopedModel {\n\tmodel: AgentConnectionModel;\n\tthinkingLevel?: ThinkingLevel;\n}\n\nexport interface AgentConnectionModelCycleResult {\n\tmodel: AgentConnectionModel;\n\tthinkingLevel: ThinkingLevel;\n\tserviceTier: ServiceTier;\n\tisScoped: boolean;\n}\n\nexport interface AgentConnectionState {\n\tactiveSessionId?: string;\n\tcwd: string;\n\tmodel?: AgentConnectionModel;\n\tthinkingLevel: ThinkingLevel;\n\tserviceTier: ServiceTier;\n\tavailableThinkingLevels: ThinkingLevel[];\n\tisStreaming: boolean;\n\tisCompacting: boolean;\n\tisBashRunning: boolean;\n\tretryAttempt: number;\n\tsteeringMode: AgentConnectionQueueMode;\n\tfollowUpMode: AgentConnectionQueueMode;\n\tsessionFile?: string;\n\tsessionId: string;\n\tsessionName?: string;\n\tsessionDir?: string;\n\tleafId: string | null;\n\tautoCompactionEnabled: boolean;\n\tmessageCount: number;\n\tsessionActions: SessionActionSnapshot;\n\tcompactionCount: number;\n\tgoal: GoalState;\n\theartbeat?: AgentCronJob | null;\n\tscopedModels: AgentConnectionScopedModel[];\n\tactiveToolNames: string[];\n\tcontextUsage: SessionStats[\"contextUsage\"];\n\t/** One-line recent-work recap for the prompt UI. */\n\trecap?: string;\n}\n\nexport interface AgentConnectionSlashCommand {\n\tname: string;\n\tregisteredName?: string;\n\tdescription?: string;\n\targumentHint?: string;\n\tsource: \"extension\" | \"prompt\" | \"skill\";\n\tsourceInfo: AgentConnectionSourceInfo;\n}\n\nexport type AgentConnectionArtifactType = \"context_file\" | \"extension\" | \"prompt\" | \"skill\" | \"theme\";\n\nexport interface AgentConnectionArtifactReference {\n\tid: string;\n\tsessionId: string;\n\ttype: AgentConnectionArtifactType;\n\tlogicalPath: string;\n\trelativePath?: string;\n\tmimeType?: string;\n}\n\nexport interface AgentConnectionResourceContextFile {\n\tpath: string;\n\tartifact?: AgentConnectionArtifactReference;\n}\n\nexport interface AgentConnectionResourceSkill {\n\tname: string;\n\tdescription?: string;\n\tfilePath: string;\n\tsourceInfo?: AgentConnectionSourceInfo;\n\tartifact?: AgentConnectionArtifactReference;\n}\n\nexport interface AgentConnectionResourcePrompt {\n\tname: string;\n\tdescription?: string;\n\targumentHint?: string;\n\tfilePath: string;\n\tsourceInfo?: AgentConnectionSourceInfo;\n\tartifact?: AgentConnectionArtifactReference;\n}\n\nexport interface AgentConnectionResourceExtension {\n\tpath: string;\n\tsourceInfo?: AgentConnectionSourceInfo;\n\tartifact?: AgentConnectionArtifactReference;\n}\n\nexport interface AgentConnectionResourceTheme {\n\tname?: string;\n\tsourcePath?: string;\n\tsourceInfo?: AgentConnectionSourceInfo;\n\tartifact?: AgentConnectionArtifactReference;\n}\n\nexport interface AgentConnectionResourceDiagnostics {\n\tskills: AgentConnectionResourceDiagnostic[];\n\tprompts: AgentConnectionResourceDiagnostic[];\n\textensions: AgentConnectionResourceDiagnostic[];\n\tthemes: AgentConnectionResourceDiagnostic[];\n}\n\nexport interface AgentConnectionResourceSnapshot {\n\tcontextFiles: AgentConnectionResourceContextFile[];\n\tskills: AgentConnectionResourceSkill[];\n\tprompts: AgentConnectionResourcePrompt[];\n\textensions: AgentConnectionResourceExtension[];\n\tthemes: AgentConnectionResourceTheme[];\n\tdiagnostics: AgentConnectionResourceDiagnostics;\n}\n\nexport interface AgentConnectionToolDefinition {\n\tname: string;\n\tlabel: string;\n\tdescription: string;\n\tpromptSnippet?: string;\n\tpromptGuidelines?: string[];\n\tparameters: unknown;\n\trenderShell?: \"default\" | \"self\";\n\treplayBuiltInToolName?: ReplayBuiltInToolName;\n}\n\n/** Only confirmed cancellation makes prompt-admission failure retry-safe. */\nexport class AgentConnectionPromptAdmissionError extends Error {\n\treadonly cancelled: boolean;\n\n\tconstructor(\n\t\tmessage: string,\n\t\treadonly status: \"cancelled\" | \"owned\" | \"unknown\" | \"unsupported\",\n\t\toptions?: ErrorOptions,\n\t) {\n\t\tsuper(message, options);\n\t\tthis.cancelled = status === \"cancelled\";\n\t\tthis.name = \"AgentConnectionPromptAdmissionError\";\n\t}\n}\n\nexport interface AgentConnectionPromptOptions {\n\timages?: ImageContent[];\n\tstreamingBehavior?: \"steer\" | \"followUp\";\n\tqueueIfBusy?: boolean;\n\tsource?: InputSource;\n\t/** Cancels only while admission waits; accepted prompts remain session-owned. */\n\tsignal?: AbortSignal;\n}\n\nexport interface AgentConnectionSideQuestionEvent {\n\tid: string;\n\tquestion: string;\n\tanswer: string;\n\tstatus: \"running\" | \"complete\" | \"cancelled\" | \"error\";\n\terrorMessage?: string;\n}\n\nexport interface AgentConnectionSideQuestionTurn {\n\tquestion: string;\n\tanswer: string;\n}\n\nexport interface AgentConnectionExecuteBashOptions {\n\texcludeFromContext?: boolean;\n\t/** Side-conversation bash is not recorded into the session. */\n\ttransient?: boolean;\n\t/**\n\t * Caller-generated id echoed on the run's bash_start/bash_end events, so the\n\t * requesting client can tell its own run apart from other clients' runs\n\t * broadcast on the same session.\n\t */\n\trunId?: string;\n}\n\nexport interface AgentConnectionNewSessionOptions {\n\tparentSession?: string;\n}\n\nexport interface AgentConnectionForkOptions {\n\tposition?: \"before\" | \"at\";\n}\n\nexport interface AgentConnectionSwitchSessionOptions {\n\tcwdOverride?: string;\n}\n\nexport interface AgentConnectionNavigateTreeOptions {\n\tsummarize?: boolean;\n\tcustomInstructions?: string;\n\treplaceInstructions?: boolean;\n\tlabel?: string;\n}\n\nexport interface AgentConnectionNavigateTreeResult {\n\teditorText?: string;\n\tcancelled: boolean;\n\taborted?: boolean;\n}\n\nexport interface AgentConnectionUserMessage {\n\tentryId: string;\n\ttext: string;\n}\n\nexport interface AgentConnectionQueueState {\n\tsteering: string[];\n\tfollowUp: string[];\n}\n\nexport type AgentConnectionQueuedMessageLane = QueuedMessageLane;\nexport type AgentConnectionQueuedMessageMutation = QueuedMessageMutation;\n/** `unsupported` means an older remote daemon lacks queued-message mutation. */\nexport type AgentConnectionQueuedMessageMutationStatus = QueuedMessageMutationStatus | \"unsupported\";\n\nexport interface AgentConnectionHeartbeat {\n\tjob: AgentCronJob;\n\tsessionName?: string;\n\tfirstMessage?: string;\n}\n\nexport type AgentConnectionExtensionUiResponse = { value: string } | { confirmed: boolean } | { cancelled: true };\n\nexport interface AgentConnectionExtensionUiRequest {\n\tid: string;\n\tmethod: string;\n\tpayload: Record<string, unknown>;\n}\n\nexport type AgentConnectionRlmChildAgentStatus = \"queued\" | \"running\" | \"done\" | \"error\" | \"cancelled\";\n\nexport interface AgentConnectionRlmChildAgentActivity {\n\tkind: \"waiting\" | \"writing\" | \"executing\";\n\ttoolName?: string;\n}\n\nexport interface AgentConnectionRlmChildAgentSnapshot {\n\tid: string;\n\tparentId?: string;\n\t/** Child daemon active-session id, for direct attachment. */\n\tactiveSessionId?: string;\n\t/** Stable daemon-visible child name for addressing and display. */\n\tsessionName?: string;\n\t/** Exact provider/model selector used by the child. */\n\tmodel?: string;\n\tlabel: string;\n\tstatus: AgentConnectionRlmChildAgentStatus;\n\tdurationMs?: number;\n\tanswerPreview?: string;\n\trepliedSinceTask?: boolean;\n\ttoolUseCount?: number;\n\ttokenCount?: number;\n\trecap?: string;\n\tsessionDir: string;\n\tactivity?: AgentConnectionRlmChildAgentActivity;\n\terror?: string;\n}\n\nexport type AgentConnectionSessionEvent =\n\t| AgentEvent\n\t| { type: \"ipython_sent_agent_message\"; toolCallId: string; message: KernelSentAgentMessage }\n\t| { type: \"session_action_update\"; actions: SessionActionSnapshot }\n\t| {\n\t\t\ttype: \"compaction_start\";\n\t\t\treason: \"manual\" | \"threshold\" | \"overflow\" | \"requested\";\n\t\t\tcustomInstructions?: string;\n\t }\n\t| { type: \"session_info_changed\"; name: string | undefined }\n\t| { type: \"thinking_level_changed\"; level: ThinkingLevel }\n\t| { type: \"service_tier_changed\"; serviceTier: ServiceTier }\n\t| {\n\t\t\ttype: \"compaction_end\";\n\t\t\treason: \"manual\" | \"threshold\" | \"overflow\" | \"requested\";\n\t\t\tresult: CompactionResult | undefined;\n\t\t\taborted: boolean;\n\t\t\twillRetry: boolean;\n\t\t\terrorMessage?: string;\n\t\t\terrorSeverity?: \"warning\" | \"error\";\n\t\t\tcustomInstructions?: string;\n\t }\n\t| { type: \"auto_retry_start\"; attempt: number; maxAttempts?: number; delayMs: number; errorMessage: string }\n\t| { type: \"auto_retry_end\"; success: boolean; attempt: number; finalError?: string }\n\t| { type: \"auth_stale\"; provider: string; sourceTokens?: readonly AuthSourceToken[] }\n\t| { type: \"rlm_child_update\"; child: AgentConnectionRlmChildAgentSnapshot }\n\t| { type: \"recap_update\"; recap: string | undefined }\n\t| { type: \"goal_update\"; goal: GoalState }\n\t| { type: \"bash_start\"; command: string; excludeFromContext: boolean; transient?: boolean; runId?: string }\n\t| { type: \"bash_output\"; chunk: string }\n\t| {\n\t\t\ttype: \"bash_end\";\n\t\t\texitCode: number | undefined;\n\t\t\tcancelled: boolean;\n\t\t\ttruncated: boolean;\n\t\t\tfullOutputPath?: string;\n\t\t\terrorMessage?: string;\n\t\t\ttransient?: boolean;\n\t\t\trunId?: string;\n\t }\n\t| { type: \"refine_complete\"; result: RefinementResult }\n\t| { type: \"refine_failed\"; error: string };\n\nexport type AgentConnectionEvent =\n\t| { type: \"session_event\"; event: AgentConnectionSessionEvent }\n\t| { type: \"side_question_event\"; event: AgentConnectionSideQuestionEvent }\n\t| { type: \"session_replaced\"; state: AgentConnectionState; messages: AgentMessage[] }\n\t| { type: \"session_resynced\"; snapshot: AgentConnectionSnapshot }\n\t| { type: \"session_status\"; recap?: string }\n\t| { type: \"extension_ui_request\"; request: AgentConnectionExtensionUiRequest }\n\t| { type: \"extension_error\"; extensionPath: string; event: string; error: string }\n\t| { type: \"connection_status\"; status: \"reconnecting\" | \"connected\"; error?: string }\n\t| { type: \"heartbeats_changed\" }\n\t| { type: \"closed\"; error?: string };\n\nexport type AgentConnectionEventListener = (event: AgentConnectionEvent) => void | Promise<void>;\nexport type AgentConnectionBeforeSessionInvalidateListener = () => void;\n\nexport interface AgentConnectionHeadlessCompletionOptions {\n\t/** Wait for descendant terminal publication and the parent turns it triggers. */\n\twaitForRlmQuiescence?: boolean;\n}\n\nexport interface AgentConnectionSessionInputPause {\n\trelease(): Promise<void>;\n}\n\nexport interface AgentConnection {\n\tsubscribe(listener: AgentConnectionEventListener): () => void;\n\tonBeforeSessionInvalidate(listener: AgentConnectionBeforeSessionInvalidateListener): () => void;\n\n\tgetState(): Promise<AgentConnectionState>;\n\tgetInitialSnapshot(): Promise<AgentConnectionSnapshot>;\n\tgetRlmChildSnapshots(): Promise<AgentConnectionRlmChildAgentSnapshot[]>;\n\tgetMessages(): Promise<AgentMessage[]>;\n\tgetSessionHeader(): Promise<AgentConnectionSessionHeader | undefined>;\n\tgetCommands(): Promise<AgentConnectionSlashCommand[]>;\n\tgetResourceSnapshot(): Promise<AgentConnectionResourceSnapshot>;\n\tgetModelCatalog(): Promise<AgentConnectionModelCatalog>;\n\tgetAvailableModels(): Promise<AgentConnectionModel[]>;\n\tgetSessionStats(): Promise<SessionStats>;\n\tgetContextTree(): Promise<ContextTreeNode>;\n\tgetSessionContext(): Promise<AgentConnectionSessionContext>;\n\tgetSessionTree(): Promise<{ tree: AgentConnectionSessionTreeNode[]; leafId: string | null }>;\n\tlistSavedSessions(\n\t\tscope: AgentConnectionSavedSessionScope,\n\t\tcallbacks?: AgentConnectionSessionListCallbacks,\n\t): Promise<AgentConnectionSavedSessionInfo[]>;\n\tgetQueue(): Promise<AgentConnectionQueueState>;\n\tmutateQueuedMessage(\n\t\tlane: AgentConnectionQueuedMessageLane,\n\t\tindex: number,\n\t\texpectedText: string,\n\t\tmutation: AgentConnectionQueuedMessageMutation,\n\t): Promise<AgentConnectionQueuedMessageMutationStatus>;\n\tclearQueue(): Promise<AgentConnectionQueueState>;\n\tabortAndClearQueue(): Promise<AgentConnectionQueueState>;\n\tacquireSessionInputPause(leaseKey: string): Promise<AgentConnectionSessionInputPause>;\n\tlistCronJobs(options?: { includeInactive?: boolean }): Promise<AgentCronJob[]>;\n\tlistHeartbeats(): Promise<AgentConnectionHeartbeat[]>;\n\tmanageHeartbeat(\n\t\tactiveSessionId: string,\n\t\tjobId: string,\n\t\taction: AgentHeartbeatManagementAction,\n\t): Promise<AgentCronJob>;\n\taddCronJob(schedule: string, prompt: string): Promise<AgentCronJob>;\n\tcancelCronJob(jobId: string): Promise<AgentCronJob>;\n\tgetHeartbeat(): Promise<AgentCronJob | undefined>;\n\tsetHeartbeat(\n\t\tschedule: string,\n\t\tinstruction: string,\n\t\tdeliveryMode?: AgentHeartbeatDeliveryMode,\n\t): Promise<AgentCronJob>;\n\tupdateHeartbeat(action: AgentHeartbeatUpdateAction): Promise<AgentCronJob | undefined>;\n\tsendAgentMessage(targetActiveSessionId: string, message: string): Promise<AgentSessionMessageReceipt>;\n\tgetAgentMessageStatus(): Promise<AgentSessionMessageSafetyStatus>;\n\tpauseAgentMessages(): Promise<AgentSessionMessageSafetyStatus>;\n\tresumeAgentMessages(): Promise<AgentSessionMessageSafetyStatus>;\n\tclearAgentMessages(): Promise<number>;\n\tgetUserMessagesForForking(): Promise<AgentConnectionUserMessage[]>;\n\tgetLastAssistantText(): Promise<string | undefined>;\n\tgetSystemPrompt(): Promise<string>;\n\tgetToolDefinition(name: string): Promise<AgentConnectionToolDefinition | undefined>;\n\tsetSessionEntryLabel(entryId: string, label: string | undefined): Promise<void>;\n\trespondToExtensionUiRequest(requestId: string, response: AgentConnectionExtensionUiResponse): Promise<void>;\n\tsubscribeAgentRoster?(listener: () => void): Promise<{ summaries(): SessionSummary[]; dispose(): Promise<void> }>;\n\tsupportsAcpMcpServers?(): boolean;\n\treplaceAcpMcpServers?(servers: readonly AcpMcpServerConfig[], ownerId: string): Promise<void>;\n\treleaseAcpMcpServers?(ownerId: string, serverNames: readonly string[]): Promise<void>;\n\n\tprompt(message: string, options?: AgentConnectionPromptOptions): Promise<void>;\n\tpromptAndWait(message: string, options?: AgentConnectionPromptOptions): Promise<void>;\n\tstartSideQuestion(id: string, question: string, previousTurns?: AgentConnectionSideQuestionTurn[]): Promise<void>;\n\tabortSideQuestion(id: string): Promise<boolean>;\n\tsteer(message: string, images?: ImageContent[]): Promise<void>;\n\tfollowUp(message: string, images?: ImageContent[]): Promise<void>;\n\tabort(): Promise<void>;\n\tcancelRlmChild(childId: string): Promise<boolean>;\n\twaitForIdle(): Promise<void>;\n\twaitForHeadlessCompletion(options?: AgentConnectionHeadlessCompletionOptions): Promise<AgentAutonomousStatus>;\n\n\t/**\n\t * Run a user-initiated bash command (! / !! prefix). Resolution timing is\n\t * adapter-specific; rendering must be driven by the bash_start/bash_output/\n\t * bash_end session events, which reach every attached client.\n\t */\n\texecuteBash(command: string, options?: AgentConnectionExecuteBashOptions): Promise<void>;\n\texecuteBashAndWait(command: string): Promise<BashResult>;\n\tabortBash(): Promise<void>;\n\n\tsetModel(provider: string, modelId: string): Promise<AgentConnectionModel>;\n\tcycleModel(direction?: \"forward\" | \"backward\"): Promise<AgentConnectionModelCycleResult | undefined>;\n\tsetScopedModels(scopedModels: AgentConnectionScopedModel[]): Promise<void>;\n\tsetThinkingLevel(level: ThinkingLevel): Promise<void>;\n\tsetServiceTier(serviceTier: ServiceTier): Promise<void>;\n\tcycleThinkingLevel(): Promise<ThinkingLevel | undefined>;\n\tsetTransport(transport: Transport): Promise<void>;\n\tsetSteeringMode(mode: AgentConnectionQueueMode): Promise<void>;\n\tsetFollowUpMode(mode: AgentConnectionQueueMode): Promise<void>;\n\tsetAutoCompactionEnabled(enabled: boolean): Promise<void>;\n\tsetAutoRetryEnabled(enabled: boolean): Promise<void>;\n\n\tcompact(customInstructions?: string): Promise<CompactionResult>;\n\trefine(options?: { instructions?: string; rollbackId?: string; global?: boolean }): Promise<RefinementResult>;\n\tabortCompaction(): Promise<void>;\n\tabortBranchSummary(): Promise<void>;\n\tabortRetry(): Promise<void>;\n\n\treload(): Promise<void>;\n\tnewSession(options?: AgentConnectionNewSessionOptions): Promise<{ cancelled: boolean }>;\n\tswitchSession(sessionPath: string, options?: AgentConnectionSwitchSessionOptions): Promise<{ cancelled: boolean }>;\n\tfork(entryId: string, options?: AgentConnectionForkOptions): Promise<{ cancelled: boolean; selectedText?: string }>;\n\tnavigateTree(\n\t\ttargetId: string,\n\t\toptions?: AgentConnectionNavigateTreeOptions,\n\t): Promise<AgentConnectionNavigateTreeResult>;\n\timportFromJsonl(inputPath: string, cwdOverride?: string): Promise<{ cancelled: boolean }>;\n\texportToHtml(outputPath?: string): Promise<string>;\n\texportToJsonl(outputPath?: string): Promise<string>;\n\tsetSessionName(name: string): Promise<void>;\n\tgetRlmMaxSubagentsStatus(): Promise<RlmMaxSubagentsStatus>;\n\tsetRlmMaxSubagents(maxSubagents: number): Promise<RlmMaxSubagentsStatus>;\n\tgetRlmMaxDepthStatus(): Promise<RlmMaxDepthStatus>;\n\tsetRlmMaxDepth(maxDepth: number, options?: { global?: boolean }): Promise<SetRlmMaxDepthResult>;\n\trenameSavedSession(sessionPath: string, name: string): Promise<void>;\n\tdeleteSavedSession(sessionPath: string): Promise<DeleteSessionFileResult>;\n\n\t/** Read-only live-session watcher; unavailable transports return undefined. */\n\twatchSession(activeSessionId: string): Promise<AgentConnectionSessionWatcher | undefined>;\n\n\tdispose(): Promise<void>;\n}\n\nexport interface AgentConnectionSessionWatcher {\n\tgetMessages(): Promise<AgentMessage[]>;\n\tgetCommands(): Promise<AgentConnectionSlashCommand[]>;\n\tsubscribe(listener: AgentConnectionEventListener): () => void;\n\tgetToolDefinition(name: string): Promise<AgentConnectionToolDefinition | undefined>;\n\tclose(): Promise<void>;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/modes/agent-connection/types.ts"],"names":[],"mappings":"AAgcA,6EAA6E;AAC7E,MAAM,OAAO,mCAAoC,SAAQ,KAAK;IAKnD,MAAM;IAJP,SAAS,CAAU;IAE5B,YACC,OAAe,EACN,MAAyD,EAClE,OAAsB,EACrB;QACD,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;sBAHf,MAAM;QAIf,IAAI,CAAC,SAAS,GAAG,MAAM,KAAK,WAAW,CAAC;QACxC,IAAI,CAAC,IAAI,GAAG,qCAAqC,CAAC;IAAA,CAClD;CACD","sourcesContent":["import type { AgentEvent, AgentMessage, ThinkingLevel } from \"@ponythewhite/base-context-agent\";\nimport type {\n\tApi,\n\tImageContent,\n\tModel,\n\tServiceTier,\n\tTextContent,\n\tTransport,\n\tUsage,\n} from \"@ponythewhite/base-context-ai\";\nimport type { AgentSessionMessageReceipt, AgentSessionMessageSafetyStatus } from \"../../core/agent-messages.js\";\nimport type { AuthSourceToken } from \"../../core/auth-storage.js\";\nimport type { AgentAutonomousStatus } from \"../../core/autonomous.js\";\nimport type { BashResult } from \"../../core/bash-executor.js\";\nimport type { CompactionResult } from \"../../core/compaction/index.js\";\nimport type { ContextTreeNode } from \"../../core/context-tree.js\";\nimport type {\n\tAgentCronJob,\n\tAgentHeartbeatDeliveryMode,\n\tAgentHeartbeatManagementAction,\n\tAgentHeartbeatUpdateAction,\n} from \"../../core/cron-jobs.js\";\nimport type { ReplayBuiltInToolName } from \"../../core/extensions/index.js\";\nimport type { InputSource } from \"../../core/extensions/types.js\";\nimport type { GoalState } from \"../../core/goals.js\";\nimport type { KernelSentAgentMessage } from \"../../core/kernel/index.js\";\nimport type { AcpMcpServerConfig } from \"../../core/mcp/acp-mcp-types.js\";\nimport type { RefinementResult } from \"../../core/refinement/index.js\";\nimport type { RlmMaxDepthStatus, SetRlmMaxDepthResult } from \"../../core/rlm-max-depth.js\";\nimport type {\n\tQueuedMessageLane,\n\tQueuedMessageMutation,\n\tQueuedMessageMutationStatus,\n\tSessionActionSnapshot,\n} from \"../../core/session-action-store.js\";\nimport type { DeleteSessionFileResult } from \"../../core/session-file-actions.js\";\nimport type { SessionStats } from \"../../core/session-stats.js\";\nimport type { SessionUsageSummary } from \"../../core/usage.js\";\nimport type { SessionSummary } from \"../daemon/daemon-session-list.js\";\n\n/**\n * Client-side interaction boundary consumed by InteractiveMode.\n *\n * This is not the final hosted/gateway wire protocol. Local and future remote\n * adapters may implement this interface, but network transports should translate\n * at their edge to versioned DTOs with their own framing, sequencing, replay,\n * and command lifecycle semantics.\n *\n * Keep runtime ownership details out of this contract. InteractiveMode must not\n * receive AgentSessionRuntime, AgentSession, SessionManager, daemon socket\n * clients, in-process event emitters, or executable callbacks through\n * AgentConnection. Local-only compatibility hooks belong in adapter/service\n * layers such as InteractiveModeLocalSessionHost.\n *\n * Transitional note: AgentEvent and AgentMessage are still reused below so this\n * PR can move the TUI behind a boundary without rewriting the transcript\n * renderer and stream event model. Replace those aliases with stable\n * connection-owned/network DTOs before treating this surface as a remote wire\n * contract.\n */\nexport type AgentConnectionQueueMode = \"all\" | \"one-at-a-time\";\nexport type AgentConnectionModel = Model<Api>;\nexport interface AgentConnectionModelCatalog {\n\tmodels: AgentConnectionModel[];\n\tconfiguredProviders: string[];\n}\nexport type AgentConnectionSavedSessionScope = \"current\" | \"all\";\n\nexport interface AgentConnectionSessionHeader {\n\ttype: \"session\";\n\tversion?: number;\n\tid: string;\n\ttimestamp: string;\n\tcwd: string;\n\tparentSession?: string;\n\trlmDepth?: number;\n\tgit?: {\n\t\trepoUrl?: string;\n\t\tcommit?: string;\n\t\tbranch?: string;\n\t};\n}\n\nexport type AgentConnectionSavedSessionStateStatus = \"active\" | \"archived\" | \"crash\";\n\nexport type AgentConnectionSourceScope = \"user\" | \"project\" | \"temporary\";\nexport type AgentConnectionSourceOrigin = \"package\" | \"top-level\";\n\nexport interface AgentConnectionSourceInfo {\n\tpath: string;\n\tsource: string;\n\tscope: AgentConnectionSourceScope;\n\torigin: AgentConnectionSourceOrigin;\n\tbaseDir?: string;\n}\n\nexport interface AgentConnectionResourceCollision {\n\tresourceType: \"extension\" | \"skill\" | \"prompt\" | \"theme\";\n\tname: string;\n\twinnerPath: string;\n\tloserPath: string;\n\twinnerSource?: string;\n\tloserSource?: string;\n}\n\nexport interface AgentConnectionResourceDiagnostic {\n\ttype: \"warning\" | \"error\" | \"collision\";\n\tmessage: string;\n\tpath?: string;\n\tcollision?: AgentConnectionResourceCollision;\n}\n\nexport interface AgentConnectionSavedSessionState {\n\tstatus: AgentConnectionSavedSessionStateStatus;\n}\n\nexport interface AgentConnectionAgentStatus {\n\tsummary: string;\n\ttaskState?: \"needs_input\" | \"completed\";\n\tbasedOnMessageCount: number;\n}\n\n/**\n * Saved-session registry row for the current local TUI migration.\n *\n * Existing fields intentionally preserve local behavior, including filesystem\n * paths and Date objects. Do not add new TUI features that require these local\n * shapes through AgentConnection. Hosted/gateway work should introduce opaque\n * session/artifact identifiers and string timestamp DTOs before exposing this\n * data across a network.\n */\nexport interface AgentConnectionSavedSessionInfo {\n\tpath: string;\n\tid: string;\n\tcwd: string;\n\tname?: string;\n\tstate?: AgentConnectionSavedSessionState;\n\tparentSessionPath?: string;\n\trlmDepth?: number;\n\tcreated: Date;\n\tmodified: Date;\n\tmessageCount: number;\n\tfirstMessage: string;\n\tallMessagesText: string;\n\tagentStatus?: AgentConnectionAgentStatus;\n\tusage?: SessionUsageSummary;\n}\n\nexport type AgentConnectionSessionListProgress = (loaded: number, total: number) => void;\n\nexport interface AgentConnectionSessionListCallbacks {\n\tonProgress?: AgentConnectionSessionListProgress;\n\tonSession?: (session: AgentConnectionSavedSessionInfo) => void;\n}\n\nexport interface AgentConnectionSessionEntryBase {\n\ttype: string;\n\tid: string;\n\tparentId: string | null;\n\ttimestamp: string;\n}\n\nexport interface AgentConnectionSessionMessageEntry extends AgentConnectionSessionEntryBase {\n\ttype: \"message\";\n\tmessage: AgentMessage;\n}\n\nexport interface AgentConnectionThinkingLevelChangeEntry extends AgentConnectionSessionEntryBase {\n\ttype: \"thinking_level_change\";\n\tthinkingLevel: string;\n}\n\nexport interface AgentConnectionServiceTierChangeEntry extends AgentConnectionSessionEntryBase {\n\ttype: \"service_tier_change\";\n\tserviceTier: ServiceTier;\n}\n\nexport interface AgentConnectionModelChangeEntry extends AgentConnectionSessionEntryBase {\n\ttype: \"model_change\";\n\tprovider: string;\n\tmodelId: string;\n}\n\nexport interface AgentConnectionCompactionEntry extends AgentConnectionSessionEntryBase {\n\ttype: \"compaction\";\n\tsummary: string;\n\tfirstKeptEntryId: string;\n\ttokensBefore: number | null;\n\tdetails?: unknown;\n\tfromHook?: boolean;\n}\n\nexport interface AgentConnectionBranchSummaryEntry extends AgentConnectionSessionEntryBase {\n\ttype: \"branch_summary\";\n\tfromId: string;\n\tsummary: string;\n\tdetails?: unknown;\n\tfromHook?: boolean;\n}\n\nexport interface AgentConnectionCustomEntry extends AgentConnectionSessionEntryBase {\n\ttype: \"custom\";\n\tcustomType: string;\n\tdata?: unknown;\n}\n\nexport interface AgentConnectionChildUsageAttributionEntry extends AgentConnectionSessionEntryBase {\n\ttype: \"child_usage_attributed\";\n\ttargetId: string;\n\tchildUsage: Usage;\n\taggregateUsage: Usage;\n\torigin?: \"spawn_task\" | \"agent_message\" | \"direct_user\";\n}\n\nexport interface AgentConnectionCustomMessageEntry extends AgentConnectionSessionEntryBase {\n\ttype: \"custom_message\";\n\tcustomType: string;\n\tcontent: string | (TextContent | ImageContent)[];\n\tdetails?: unknown;\n\tdisplay: boolean;\n}\n\nexport interface AgentConnectionLabelEntry extends AgentConnectionSessionEntryBase {\n\ttype: \"label\";\n\ttargetId: string;\n\tlabel: string | undefined;\n}\n\nexport interface AgentConnectionSessionInfoEntry extends AgentConnectionSessionEntryBase {\n\ttype: \"session_info\";\n\tname?: string;\n}\n\nexport interface AgentConnectionSessionStateEntry extends AgentConnectionSessionEntryBase {\n\ttype: \"session_state\";\n\tstate: AgentConnectionSavedSessionState;\n}\n\nexport interface AgentConnectionAgentStatusEntry extends AgentConnectionSessionEntryBase {\n\ttype: \"agent_status\";\n\tstatus: AgentConnectionAgentStatus;\n}\n\nexport interface AgentConnectionGitStateEntry extends AgentConnectionSessionEntryBase {\n\ttype: \"git_state\";\n\tgit: {\n\t\trepoUrl?: string;\n\t\tcommit?: string;\n\t\tbranch?: string;\n\t};\n}\n\nexport type AgentConnectionSessionEntry =\n\t| AgentConnectionSessionMessageEntry\n\t| AgentConnectionThinkingLevelChangeEntry\n\t| AgentConnectionServiceTierChangeEntry\n\t| AgentConnectionModelChangeEntry\n\t| AgentConnectionCompactionEntry\n\t| AgentConnectionBranchSummaryEntry\n\t| AgentConnectionCustomEntry\n\t| AgentConnectionChildUsageAttributionEntry\n\t| AgentConnectionCustomMessageEntry\n\t| AgentConnectionLabelEntry\n\t| AgentConnectionSessionInfoEntry\n\t| AgentConnectionSessionStateEntry\n\t| AgentConnectionAgentStatusEntry\n\t| AgentConnectionGitStateEntry;\n\nexport interface AgentConnectionSessionTreeFlatNode {\n\tentry: AgentConnectionSessionEntry;\n\tlabel?: string;\n\tlabelTimestamp?: string;\n}\n\nexport interface AgentConnectionSessionTreeNode extends AgentConnectionSessionTreeFlatNode {\n\tchildren: AgentConnectionSessionTreeNode[];\n}\n\nexport interface AgentConnectionSessionContext {\n\tmessages: AgentMessage[];\n\tthinkingLevel: string;\n\tserviceTier: ServiceTier;\n\tmodel: { provider: string; modelId: string } | null;\n}\n\nexport type AgentConnectionReplayStatus = \"complete\" | \"partial\" | \"unavailable\";\n\nexport interface AgentConnectionReplayInfo {\n\tstatus: AgentConnectionReplayStatus;\n\tfromSequence?: number;\n\ttoSequence: number;\n\tfromCursor?: AgentConnectionEventCursor;\n\ttoCursor?: AgentConnectionEventCursor;\n\treason?: string;\n}\n\nexport interface AgentConnectionEventCursor {\n\tgeneration: string;\n\tsequence: number;\n}\n\nexport interface AgentConnectionParentMetadata {\n\tactiveSessionId?: string;\n\tsessionId?: string;\n\tnodeId?: string;\n\tchildId?: string;\n}\n\nexport interface AgentConnectionSnapshot {\n\tstate: AgentConnectionState;\n\tmessages: AgentMessage[];\n\t/** In-flight assistant message, separate from finalized transcript messages. */\n\tstreamingMessage?: AgentMessage;\n\tsessionContext?: AgentConnectionSessionContext;\n\tsessionTree?: { tree: AgentConnectionSessionTreeNode[]; leafId: string | null };\n\tparent?: AgentConnectionParentMetadata;\n\t/** Live RLM children, including descendants, known to the host at snapshot time. */\n\tchildren?: AgentConnectionRlmChildAgentSnapshot[];\n\tlastEventSequence?: number;\n\tlastEventCursor?: AgentConnectionEventCursor;\n\treplay?: AgentConnectionReplayInfo;\n}\n\nexport interface AgentConnectionScopedModel {\n\tmodel: AgentConnectionModel;\n\tthinkingLevel?: ThinkingLevel;\n}\n\nexport interface AgentConnectionModelCycleResult {\n\tmodel: AgentConnectionModel;\n\tthinkingLevel: ThinkingLevel;\n\tserviceTier: ServiceTier;\n\tisScoped: boolean;\n}\n\nexport interface AgentConnectionState {\n\tactiveSessionId?: string;\n\tcwd: string;\n\tmodel?: AgentConnectionModel;\n\tthinkingLevel: ThinkingLevel;\n\tserviceTier: ServiceTier;\n\tavailableThinkingLevels: ThinkingLevel[];\n\tisStreaming: boolean;\n\tisCompacting: boolean;\n\tisBashRunning: boolean;\n\tretryAttempt: number;\n\tsteeringMode: AgentConnectionQueueMode;\n\tfollowUpMode: AgentConnectionQueueMode;\n\tsessionFile?: string;\n\tsessionId: string;\n\tsessionName?: string;\n\tsessionDir?: string;\n\tleafId: string | null;\n\tautoCompactionEnabled: boolean;\n\tmessageCount: number;\n\tsessionActions: SessionActionSnapshot;\n\tcompactionCount: number;\n\tgoal: GoalState;\n\theartbeat?: AgentCronJob | null;\n\tscopedModels: AgentConnectionScopedModel[];\n\tactiveToolNames: string[];\n\tcontextUsage: SessionStats[\"contextUsage\"];\n\t/** One-line recent-work recap for the prompt UI. */\n\trecap?: string;\n}\n\nexport interface AgentConnectionSlashCommand {\n\tname: string;\n\tregisteredName?: string;\n\tdescription?: string;\n\targumentHint?: string;\n\tsource: \"extension\" | \"prompt\" | \"skill\";\n\tsourceInfo: AgentConnectionSourceInfo;\n}\n\nexport type AgentConnectionArtifactType = \"context_file\" | \"extension\" | \"prompt\" | \"skill\" | \"theme\";\n\nexport interface AgentConnectionArtifactReference {\n\tid: string;\n\tsessionId: string;\n\ttype: AgentConnectionArtifactType;\n\tlogicalPath: string;\n\trelativePath?: string;\n\tmimeType?: string;\n}\n\nexport interface AgentConnectionResourceContextFile {\n\tpath: string;\n\tartifact?: AgentConnectionArtifactReference;\n}\n\nexport interface AgentConnectionResourceSkill {\n\tname: string;\n\tdescription?: string;\n\tfilePath: string;\n\tsourceInfo?: AgentConnectionSourceInfo;\n\tartifact?: AgentConnectionArtifactReference;\n}\n\nexport interface AgentConnectionResourcePrompt {\n\tname: string;\n\tdescription?: string;\n\targumentHint?: string;\n\tfilePath: string;\n\tsourceInfo?: AgentConnectionSourceInfo;\n\tartifact?: AgentConnectionArtifactReference;\n}\n\nexport interface AgentConnectionResourceExtension {\n\tpath: string;\n\tsourceInfo?: AgentConnectionSourceInfo;\n\tartifact?: AgentConnectionArtifactReference;\n}\n\nexport interface AgentConnectionResourceTheme {\n\tname?: string;\n\tsourcePath?: string;\n\tsourceInfo?: AgentConnectionSourceInfo;\n\tartifact?: AgentConnectionArtifactReference;\n}\n\nexport interface AgentConnectionResourceDiagnostics {\n\tskills: AgentConnectionResourceDiagnostic[];\n\tprompts: AgentConnectionResourceDiagnostic[];\n\textensions: AgentConnectionResourceDiagnostic[];\n\tthemes: AgentConnectionResourceDiagnostic[];\n}\n\nexport interface AgentConnectionResourceSnapshot {\n\tcontextFiles: AgentConnectionResourceContextFile[];\n\tskills: AgentConnectionResourceSkill[];\n\tprompts: AgentConnectionResourcePrompt[];\n\textensions: AgentConnectionResourceExtension[];\n\tthemes: AgentConnectionResourceTheme[];\n\tdiagnostics: AgentConnectionResourceDiagnostics;\n}\n\nexport interface AgentConnectionToolDefinition {\n\tname: string;\n\tlabel: string;\n\tdescription: string;\n\tpromptSnippet?: string;\n\tpromptGuidelines?: string[];\n\tparameters: unknown;\n\trenderShell?: \"default\" | \"self\";\n\treplayBuiltInToolName?: ReplayBuiltInToolName;\n}\n\n/** Only confirmed cancellation makes prompt-admission failure retry-safe. */\nexport class AgentConnectionPromptAdmissionError extends Error {\n\treadonly cancelled: boolean;\n\n\tconstructor(\n\t\tmessage: string,\n\t\treadonly status: \"cancelled\" | \"owned\" | \"unknown\" | \"unsupported\",\n\t\toptions?: ErrorOptions,\n\t) {\n\t\tsuper(message, options);\n\t\tthis.cancelled = status === \"cancelled\";\n\t\tthis.name = \"AgentConnectionPromptAdmissionError\";\n\t}\n}\n\nexport interface AgentConnectionPromptOptions {\n\timages?: ImageContent[];\n\tstreamingBehavior?: \"steer\" | \"followUp\";\n\tqueueIfBusy?: boolean;\n\tsource?: InputSource;\n\t/** Cancels only while admission waits; accepted prompts remain session-owned. */\n\tsignal?: AbortSignal;\n}\n\nexport interface AgentConnectionSideQuestionEvent {\n\tid: string;\n\tquestion: string;\n\tanswer: string;\n\tstatus: \"running\" | \"complete\" | \"cancelled\" | \"error\";\n\terrorMessage?: string;\n}\n\nexport interface AgentConnectionSideQuestionTurn {\n\tquestion: string;\n\tanswer: string;\n}\n\nexport interface AgentConnectionExecuteBashOptions {\n\texcludeFromContext?: boolean;\n\t/** Side-conversation bash is not recorded into the session. */\n\ttransient?: boolean;\n\t/**\n\t * Caller-generated id echoed on the run's bash_start/bash_end events, so the\n\t * requesting client can tell its own run apart from other clients' runs\n\t * broadcast on the same session.\n\t */\n\trunId?: string;\n}\n\nexport interface AgentConnectionNewSessionOptions {\n\tparentSession?: string;\n}\n\nexport interface AgentConnectionForkOptions {\n\tposition?: \"before\" | \"at\";\n}\n\nexport interface AgentConnectionSwitchSessionOptions {\n\tcwdOverride?: string;\n}\n\nexport interface AgentConnectionNavigateTreeOptions {\n\tsummarize?: boolean;\n\tcustomInstructions?: string;\n\treplaceInstructions?: boolean;\n\tlabel?: string;\n}\n\nexport interface AgentConnectionNavigateTreeResult {\n\teditorText?: string;\n\tcancelled: boolean;\n\taborted?: boolean;\n}\n\nexport interface AgentConnectionUserMessage {\n\tentryId: string;\n\ttext: string;\n}\n\nexport interface AgentConnectionQueueState {\n\tsteering: string[];\n\tfollowUp: string[];\n}\n\nexport type AgentConnectionQueuedMessageLane = QueuedMessageLane;\nexport type AgentConnectionQueuedMessageMutation = QueuedMessageMutation;\n/** `unsupported` means an older remote daemon lacks queued-message mutation. */\nexport type AgentConnectionQueuedMessageMutationStatus = QueuedMessageMutationStatus | \"unsupported\";\n\nexport interface AgentConnectionHeartbeat {\n\tjob: AgentCronJob;\n\tsessionName?: string;\n\tfirstMessage?: string;\n}\n\nexport type AgentConnectionExtensionUiResponse = { value: string } | { confirmed: boolean } | { cancelled: true };\n\nexport interface AgentConnectionExtensionUiRequest {\n\tid: string;\n\tmethod: string;\n\tpayload: Record<string, unknown>;\n}\n\nexport type AgentConnectionRlmChildAgentStatus = \"queued\" | \"running\" | \"done\" | \"error\" | \"cancelled\";\n\nexport interface AgentConnectionRlmChildAgentActivity {\n\tkind: \"waiting\" | \"writing\" | \"executing\";\n\ttoolName?: string;\n}\n\nexport interface AgentConnectionRlmChildAgentSnapshot {\n\tid: string;\n\tparentId?: string;\n\t/** Child daemon active-session id, for direct attachment. */\n\tactiveSessionId?: string;\n\t/** Stable daemon-visible child name for addressing and display. */\n\tsessionName?: string;\n\t/** Exact provider/model selector used by the child. */\n\tmodel?: string;\n\tlabel: string;\n\tstatus: AgentConnectionRlmChildAgentStatus;\n\tdurationMs?: number;\n\tanswerPreview?: string;\n\trepliedSinceTask?: boolean;\n\ttoolUseCount?: number;\n\ttokenCount?: number;\n\trecap?: string;\n\tsessionDir: string;\n\tactivity?: AgentConnectionRlmChildAgentActivity;\n\terror?: string;\n}\n\nexport type AgentConnectionSessionEvent =\n\t| AgentEvent\n\t| { type: \"ipython_sent_agent_message\"; toolCallId: string; message: KernelSentAgentMessage }\n\t| { type: \"session_action_update\"; actions: SessionActionSnapshot }\n\t| {\n\t\t\ttype: \"compaction_start\";\n\t\t\treason: \"manual\" | \"threshold\" | \"overflow\" | \"requested\";\n\t\t\tcustomInstructions?: string;\n\t }\n\t| { type: \"session_info_changed\"; name: string | undefined }\n\t| { type: \"thinking_level_changed\"; level: ThinkingLevel }\n\t| { type: \"service_tier_changed\"; serviceTier: ServiceTier }\n\t| {\n\t\t\ttype: \"compaction_end\";\n\t\t\treason: \"manual\" | \"threshold\" | \"overflow\" | \"requested\";\n\t\t\tresult: CompactionResult | undefined;\n\t\t\taborted: boolean;\n\t\t\twillRetry: boolean;\n\t\t\terrorMessage?: string;\n\t\t\terrorSeverity?: \"warning\" | \"error\";\n\t\t\tcustomInstructions?: string;\n\t }\n\t| { type: \"auto_retry_start\"; attempt: number; maxAttempts?: number; delayMs: number; errorMessage: string }\n\t| { type: \"auto_retry_end\"; success: boolean; attempt: number; finalError?: string }\n\t| { type: \"auth_stale\"; provider: string; sourceTokens?: readonly AuthSourceToken[] }\n\t| { type: \"rlm_child_update\"; child: AgentConnectionRlmChildAgentSnapshot }\n\t| { type: \"recap_update\"; recap: string | undefined }\n\t| { type: \"goal_update\"; goal: GoalState }\n\t| { type: \"bash_start\"; command: string; excludeFromContext: boolean; transient?: boolean; runId?: string }\n\t| { type: \"bash_output\"; chunk: string }\n\t| {\n\t\t\ttype: \"bash_end\";\n\t\t\texitCode: number | undefined;\n\t\t\tcancelled: boolean;\n\t\t\ttruncated: boolean;\n\t\t\tfullOutputPath?: string;\n\t\t\terrorMessage?: string;\n\t\t\ttransient?: boolean;\n\t\t\trunId?: string;\n\t }\n\t| { type: \"refine_complete\"; result: RefinementResult }\n\t| { type: \"refine_failed\"; error: string };\n\nexport type AgentConnectionEvent =\n\t| { type: \"session_event\"; event: AgentConnectionSessionEvent }\n\t| { type: \"side_question_event\"; event: AgentConnectionSideQuestionEvent }\n\t| { type: \"session_replaced\"; state: AgentConnectionState; messages: AgentMessage[] }\n\t| { type: \"session_resynced\"; snapshot: AgentConnectionSnapshot }\n\t| { type: \"session_status\"; recap?: string }\n\t| { type: \"extension_ui_request\"; request: AgentConnectionExtensionUiRequest }\n\t| { type: \"extension_error\"; extensionPath: string; event: string; error: string }\n\t| { type: \"connection_status\"; status: \"reconnecting\" | \"connected\"; error?: string }\n\t| { type: \"heartbeats_changed\" }\n\t| { type: \"closed\"; error?: string };\n\nexport type AgentConnectionEventListener = (event: AgentConnectionEvent) => void | Promise<void>;\nexport type AgentConnectionBeforeSessionInvalidateListener = () => void;\n\nexport interface AgentConnectionHeadlessCompletionOptions {\n\t/** Wait for descendant terminal publication and the parent turns it triggers. */\n\twaitForRlmQuiescence?: boolean;\n}\n\nexport interface AgentConnectionSessionInputPause {\n\trelease(): Promise<void>;\n}\n\nexport interface AgentConnection {\n\tsubscribe(listener: AgentConnectionEventListener): () => void;\n\tonBeforeSessionInvalidate(listener: AgentConnectionBeforeSessionInvalidateListener): () => void;\n\n\tgetState(): Promise<AgentConnectionState>;\n\tgetInitialSnapshot(): Promise<AgentConnectionSnapshot>;\n\tgetRlmChildSnapshots(): Promise<AgentConnectionRlmChildAgentSnapshot[]>;\n\tgetMessages(): Promise<AgentMessage[]>;\n\tgetSessionHeader(): Promise<AgentConnectionSessionHeader | undefined>;\n\tgetCommands(): Promise<AgentConnectionSlashCommand[]>;\n\tgetResourceSnapshot(): Promise<AgentConnectionResourceSnapshot>;\n\tgetModelCatalog(): Promise<AgentConnectionModelCatalog>;\n\tgetAvailableModels(): Promise<AgentConnectionModel[]>;\n\tgetSessionStats(): Promise<SessionStats>;\n\tgetContextTree(): Promise<ContextTreeNode>;\n\tgetSessionContext(): Promise<AgentConnectionSessionContext>;\n\tgetSessionTree(): Promise<{ tree: AgentConnectionSessionTreeNode[]; leafId: string | null }>;\n\tlistSavedSessions(\n\t\tscope: AgentConnectionSavedSessionScope,\n\t\tcallbacks?: AgentConnectionSessionListCallbacks,\n\t): Promise<AgentConnectionSavedSessionInfo[]>;\n\tgetQueue(): Promise<AgentConnectionQueueState>;\n\tmutateQueuedMessage(\n\t\tlane: AgentConnectionQueuedMessageLane,\n\t\tindex: number,\n\t\texpectedText: string,\n\t\tmutation: AgentConnectionQueuedMessageMutation,\n\t): Promise<AgentConnectionQueuedMessageMutationStatus>;\n\tclearQueue(): Promise<AgentConnectionQueueState>;\n\tabortAndClearQueue(): Promise<AgentConnectionQueueState>;\n\tacquireSessionInputPause(leaseKey: string): Promise<AgentConnectionSessionInputPause>;\n\tlistCronJobs(options?: { includeInactive?: boolean }): Promise<AgentCronJob[]>;\n\tlistHeartbeats(): Promise<AgentConnectionHeartbeat[]>;\n\tmanageHeartbeat(\n\t\tactiveSessionId: string,\n\t\tjobId: string,\n\t\taction: AgentHeartbeatManagementAction,\n\t): Promise<AgentCronJob>;\n\taddCronJob(schedule: string, prompt: string): Promise<AgentCronJob>;\n\tcancelCronJob(jobId: string): Promise<AgentCronJob>;\n\tgetHeartbeat(): Promise<AgentCronJob | undefined>;\n\tsetHeartbeat(\n\t\tschedule: string,\n\t\tinstruction: string,\n\t\tdeliveryMode?: AgentHeartbeatDeliveryMode,\n\t): Promise<AgentCronJob>;\n\tupdateHeartbeat(action: AgentHeartbeatUpdateAction): Promise<AgentCronJob | undefined>;\n\tsendAgentMessage(targetActiveSessionId: string, message: string): Promise<AgentSessionMessageReceipt>;\n\tgetAgentMessageStatus(): Promise<AgentSessionMessageSafetyStatus>;\n\tpauseAgentMessages(): Promise<AgentSessionMessageSafetyStatus>;\n\tresumeAgentMessages(): Promise<AgentSessionMessageSafetyStatus>;\n\tclearAgentMessages(): Promise<number>;\n\tgetUserMessagesForForking(): Promise<AgentConnectionUserMessage[]>;\n\tgetLastAssistantText(): Promise<string | undefined>;\n\tgetSystemPrompt(): Promise<string>;\n\tgetToolDefinition(name: string): Promise<AgentConnectionToolDefinition | undefined>;\n\tsetSessionEntryLabel(entryId: string, label: string | undefined): Promise<void>;\n\trespondToExtensionUiRequest(requestId: string, response: AgentConnectionExtensionUiResponse): Promise<void>;\n\tsubscribeAgentRoster?(listener: () => void): Promise<{ summaries(): SessionSummary[]; dispose(): Promise<void> }>;\n\tsupportsAcpMcpServers?(): boolean;\n\treplaceAcpMcpServers?(servers: readonly AcpMcpServerConfig[], ownerId: string): Promise<void>;\n\treleaseAcpMcpServers?(ownerId: string, serverNames: readonly string[]): Promise<void>;\n\n\tprompt(message: string, options?: AgentConnectionPromptOptions): Promise<void>;\n\tpromptAndWait(message: string, options?: AgentConnectionPromptOptions): Promise<void>;\n\tstartSideQuestion(id: string, question: string, previousTurns?: AgentConnectionSideQuestionTurn[]): Promise<void>;\n\tabortSideQuestion(id: string): Promise<boolean>;\n\tsteer(message: string, images?: ImageContent[]): Promise<void>;\n\tfollowUp(message: string, images?: ImageContent[]): Promise<void>;\n\tabort(): Promise<void>;\n\tcancelRlmChild(childId: string): Promise<boolean>;\n\twaitForIdle(): Promise<void>;\n\twaitForHeadlessCompletion(options?: AgentConnectionHeadlessCompletionOptions): Promise<AgentAutonomousStatus>;\n\n\t/**\n\t * Run a user-initiated bash command (! / !! prefix). Resolution timing is\n\t * adapter-specific; rendering must be driven by the bash_start/bash_output/\n\t * bash_end session events, which reach every attached client.\n\t */\n\texecuteBash(command: string, options?: AgentConnectionExecuteBashOptions): Promise<void>;\n\texecuteBashAndWait(command: string): Promise<BashResult>;\n\tabortBash(): Promise<void>;\n\n\tsetModel(provider: string, modelId: string): Promise<AgentConnectionModel>;\n\tcycleModel(direction?: \"forward\" | \"backward\"): Promise<AgentConnectionModelCycleResult | undefined>;\n\tsetScopedModels(scopedModels: AgentConnectionScopedModel[]): Promise<void>;\n\tsetThinkingLevel(level: ThinkingLevel): Promise<void>;\n\tsetServiceTier(serviceTier: ServiceTier): Promise<void>;\n\tcycleThinkingLevel(): Promise<ThinkingLevel | undefined>;\n\tsetTransport(transport: Transport): Promise<void>;\n\tsetSteeringMode(mode: AgentConnectionQueueMode): Promise<void>;\n\tsetFollowUpMode(mode: AgentConnectionQueueMode): Promise<void>;\n\tsetAutoCompactionEnabled(enabled: boolean): Promise<void>;\n\tsetAutoRetryEnabled(enabled: boolean): Promise<void>;\n\n\tcompact(customInstructions?: string): Promise<CompactionResult>;\n\trefine(options?: { instructions?: string; rollbackId?: string; global?: boolean }): Promise<RefinementResult>;\n\tabortCompaction(): Promise<void>;\n\tabortBranchSummary(): Promise<void>;\n\tabortRetry(): Promise<void>;\n\n\treload(): Promise<void>;\n\tnewSession(options?: AgentConnectionNewSessionOptions): Promise<{ cancelled: boolean }>;\n\tswitchSession(sessionPath: string, options?: AgentConnectionSwitchSessionOptions): Promise<{ cancelled: boolean }>;\n\tfork(entryId: string, options?: AgentConnectionForkOptions): Promise<{ cancelled: boolean; selectedText?: string }>;\n\tnavigateTree(\n\t\ttargetId: string,\n\t\toptions?: AgentConnectionNavigateTreeOptions,\n\t): Promise<AgentConnectionNavigateTreeResult>;\n\timportFromJsonl(inputPath: string, cwdOverride?: string): Promise<{ cancelled: boolean }>;\n\texportToHtml(outputPath?: string): Promise<string>;\n\texportToJsonl(outputPath?: string): Promise<string>;\n\tsetSessionName(name: string): Promise<void>;\n\tgetRlmMaxDepthStatus(): Promise<RlmMaxDepthStatus>;\n\tsetRlmMaxDepth(maxDepth: number, options?: { global?: boolean }): Promise<SetRlmMaxDepthResult>;\n\trenameSavedSession(sessionPath: string, name: string): Promise<void>;\n\tdeleteSavedSession(sessionPath: string): Promise<DeleteSessionFileResult>;\n\n\t/** Read-only live-session watcher; unavailable transports return undefined. */\n\twatchSession(activeSessionId: string): Promise<AgentConnectionSessionWatcher | undefined>;\n\n\tdispose(): Promise<void>;\n}\n\nexport interface AgentConnectionSessionWatcher {\n\tgetMessages(): Promise<AgentMessage[]>;\n\tgetCommands(): Promise<AgentConnectionSlashCommand[]>;\n\tsubscribe(listener: AgentConnectionEventListener): () => void;\n\tgetToolDefinition(name: string): Promise<AgentConnectionToolDefinition | undefined>;\n\tclose(): Promise<void>;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/modes/agent-connection/types.ts"],"names":[],"mappings":"AAicA,6EAA6E;AAC7E,MAAM,OAAO,mCAAoC,SAAQ,KAAK;IAKnD,MAAM;IAJP,SAAS,CAAU;IAE5B,YACC,OAAe,EACN,MAAyD,EAClE,OAAsB,EACrB;QACD,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;sBAHf,MAAM;QAIf,IAAI,CAAC,SAAS,GAAG,MAAM,KAAK,WAAW,CAAC;QACxC,IAAI,CAAC,IAAI,GAAG,qCAAqC,CAAC;IAAA,CAClD;CACD","sourcesContent":["import type { AgentEvent, AgentMessage, ThinkingLevel } from \"@ponythewhite/base-context-agent\";\nimport type {\n\tApi,\n\tImageContent,\n\tModel,\n\tServiceTier,\n\tTextContent,\n\tTransport,\n\tUsage,\n} from \"@ponythewhite/base-context-ai\";\nimport type { AgentSessionMessageReceipt, AgentSessionMessageSafetyStatus } from \"../../core/agent-messages.js\";\nimport type { AuthSourceToken } from \"../../core/auth-storage.js\";\nimport type { AgentAutonomousStatus } from \"../../core/autonomous.js\";\nimport type { BashResult } from \"../../core/bash-executor.js\";\nimport type { CompactionResult } from \"../../core/compaction/index.js\";\nimport type { ContextTreeNode } from \"../../core/context-tree.js\";\nimport type {\n\tAgentCronJob,\n\tAgentHeartbeatDeliveryMode,\n\tAgentHeartbeatManagementAction,\n\tAgentHeartbeatUpdateAction,\n} from \"../../core/cron-jobs.js\";\nimport type { ReplayBuiltInToolName } from \"../../core/extensions/index.js\";\nimport type { InputSource } from \"../../core/extensions/types.js\";\nimport type { GoalState } from \"../../core/goals.js\";\nimport type { KernelSentAgentMessage } from \"../../core/kernel/index.js\";\nimport type { AcpMcpServerConfig } from \"../../core/mcp/acp-mcp-types.js\";\nimport type { RefinementResult } from \"../../core/refinement/index.js\";\nimport type { RlmMaxDepthStatus, SetRlmMaxDepthResult } from \"../../core/rlm-max-depth.js\";\nimport type { RlmMaxSubagentsStatus } from \"../../core/rlm-max-subagents.js\";\nimport type {\n\tQueuedMessageLane,\n\tQueuedMessageMutation,\n\tQueuedMessageMutationStatus,\n\tSessionActionSnapshot,\n} from \"../../core/session-action-store.js\";\nimport type { DeleteSessionFileResult } from \"../../core/session-file-actions.js\";\nimport type { SessionStats } from \"../../core/session-stats.js\";\nimport type { SessionUsageSummary } from \"../../core/usage.js\";\nimport type { SessionSummary } from \"../daemon/daemon-session-list.js\";\n\n/**\n * Client-side interaction boundary consumed by InteractiveMode.\n *\n * This is not the final hosted/gateway wire protocol. Local and future remote\n * adapters may implement this interface, but network transports should translate\n * at their edge to versioned DTOs with their own framing, sequencing, replay,\n * and command lifecycle semantics.\n *\n * Keep runtime ownership details out of this contract. InteractiveMode must not\n * receive AgentSessionRuntime, AgentSession, SessionManager, daemon socket\n * clients, in-process event emitters, or executable callbacks through\n * AgentConnection. Local-only compatibility hooks belong in adapter/service\n * layers such as InteractiveModeLocalSessionHost.\n *\n * Transitional note: AgentEvent and AgentMessage are still reused below so this\n * PR can move the TUI behind a boundary without rewriting the transcript\n * renderer and stream event model. Replace those aliases with stable\n * connection-owned/network DTOs before treating this surface as a remote wire\n * contract.\n */\nexport type AgentConnectionQueueMode = \"all\" | \"one-at-a-time\";\nexport type AgentConnectionModel = Model<Api>;\nexport interface AgentConnectionModelCatalog {\n\tmodels: AgentConnectionModel[];\n\tconfiguredProviders: string[];\n}\nexport type AgentConnectionSavedSessionScope = \"current\" | \"all\";\n\nexport interface AgentConnectionSessionHeader {\n\ttype: \"session\";\n\tversion?: number;\n\tid: string;\n\ttimestamp: string;\n\tcwd: string;\n\tparentSession?: string;\n\trlmDepth?: number;\n\tgit?: {\n\t\trepoUrl?: string;\n\t\tcommit?: string;\n\t\tbranch?: string;\n\t};\n}\n\nexport type AgentConnectionSavedSessionStateStatus = \"active\" | \"archived\" | \"crash\";\n\nexport type AgentConnectionSourceScope = \"user\" | \"project\" | \"temporary\";\nexport type AgentConnectionSourceOrigin = \"package\" | \"top-level\";\n\nexport interface AgentConnectionSourceInfo {\n\tpath: string;\n\tsource: string;\n\tscope: AgentConnectionSourceScope;\n\torigin: AgentConnectionSourceOrigin;\n\tbaseDir?: string;\n}\n\nexport interface AgentConnectionResourceCollision {\n\tresourceType: \"extension\" | \"skill\" | \"prompt\" | \"theme\";\n\tname: string;\n\twinnerPath: string;\n\tloserPath: string;\n\twinnerSource?: string;\n\tloserSource?: string;\n}\n\nexport interface AgentConnectionResourceDiagnostic {\n\ttype: \"warning\" | \"error\" | \"collision\";\n\tmessage: string;\n\tpath?: string;\n\tcollision?: AgentConnectionResourceCollision;\n}\n\nexport interface AgentConnectionSavedSessionState {\n\tstatus: AgentConnectionSavedSessionStateStatus;\n}\n\nexport interface AgentConnectionAgentStatus {\n\tsummary: string;\n\ttaskState?: \"needs_input\" | \"completed\";\n\tbasedOnMessageCount: number;\n}\n\n/**\n * Saved-session registry row for the current local TUI migration.\n *\n * Existing fields intentionally preserve local behavior, including filesystem\n * paths and Date objects. Do not add new TUI features that require these local\n * shapes through AgentConnection. Hosted/gateway work should introduce opaque\n * session/artifact identifiers and string timestamp DTOs before exposing this\n * data across a network.\n */\nexport interface AgentConnectionSavedSessionInfo {\n\tpath: string;\n\tid: string;\n\tcwd: string;\n\tname?: string;\n\tstate?: AgentConnectionSavedSessionState;\n\tparentSessionPath?: string;\n\trlmDepth?: number;\n\tcreated: Date;\n\tmodified: Date;\n\tmessageCount: number;\n\tfirstMessage: string;\n\tallMessagesText: string;\n\tagentStatus?: AgentConnectionAgentStatus;\n\tusage?: SessionUsageSummary;\n}\n\nexport type AgentConnectionSessionListProgress = (loaded: number, total: number) => void;\n\nexport interface AgentConnectionSessionListCallbacks {\n\tonProgress?: AgentConnectionSessionListProgress;\n\tonSession?: (session: AgentConnectionSavedSessionInfo) => void;\n}\n\nexport interface AgentConnectionSessionEntryBase {\n\ttype: string;\n\tid: string;\n\tparentId: string | null;\n\ttimestamp: string;\n}\n\nexport interface AgentConnectionSessionMessageEntry extends AgentConnectionSessionEntryBase {\n\ttype: \"message\";\n\tmessage: AgentMessage;\n}\n\nexport interface AgentConnectionThinkingLevelChangeEntry extends AgentConnectionSessionEntryBase {\n\ttype: \"thinking_level_change\";\n\tthinkingLevel: string;\n}\n\nexport interface AgentConnectionServiceTierChangeEntry extends AgentConnectionSessionEntryBase {\n\ttype: \"service_tier_change\";\n\tserviceTier: ServiceTier;\n}\n\nexport interface AgentConnectionModelChangeEntry extends AgentConnectionSessionEntryBase {\n\ttype: \"model_change\";\n\tprovider: string;\n\tmodelId: string;\n}\n\nexport interface AgentConnectionCompactionEntry extends AgentConnectionSessionEntryBase {\n\ttype: \"compaction\";\n\tsummary: string;\n\tfirstKeptEntryId: string;\n\ttokensBefore: number | null;\n\tdetails?: unknown;\n\tfromHook?: boolean;\n}\n\nexport interface AgentConnectionBranchSummaryEntry extends AgentConnectionSessionEntryBase {\n\ttype: \"branch_summary\";\n\tfromId: string;\n\tsummary: string;\n\tdetails?: unknown;\n\tfromHook?: boolean;\n}\n\nexport interface AgentConnectionCustomEntry extends AgentConnectionSessionEntryBase {\n\ttype: \"custom\";\n\tcustomType: string;\n\tdata?: unknown;\n}\n\nexport interface AgentConnectionChildUsageAttributionEntry extends AgentConnectionSessionEntryBase {\n\ttype: \"child_usage_attributed\";\n\ttargetId: string;\n\tchildUsage: Usage;\n\taggregateUsage: Usage;\n\torigin?: \"spawn_task\" | \"agent_message\" | \"direct_user\";\n}\n\nexport interface AgentConnectionCustomMessageEntry extends AgentConnectionSessionEntryBase {\n\ttype: \"custom_message\";\n\tcustomType: string;\n\tcontent: string | (TextContent | ImageContent)[];\n\tdetails?: unknown;\n\tdisplay: boolean;\n}\n\nexport interface AgentConnectionLabelEntry extends AgentConnectionSessionEntryBase {\n\ttype: \"label\";\n\ttargetId: string;\n\tlabel: string | undefined;\n}\n\nexport interface AgentConnectionSessionInfoEntry extends AgentConnectionSessionEntryBase {\n\ttype: \"session_info\";\n\tname?: string;\n}\n\nexport interface AgentConnectionSessionStateEntry extends AgentConnectionSessionEntryBase {\n\ttype: \"session_state\";\n\tstate: AgentConnectionSavedSessionState;\n}\n\nexport interface AgentConnectionAgentStatusEntry extends AgentConnectionSessionEntryBase {\n\ttype: \"agent_status\";\n\tstatus: AgentConnectionAgentStatus;\n}\n\nexport interface AgentConnectionGitStateEntry extends AgentConnectionSessionEntryBase {\n\ttype: \"git_state\";\n\tgit: {\n\t\trepoUrl?: string;\n\t\tcommit?: string;\n\t\tbranch?: string;\n\t};\n}\n\nexport type AgentConnectionSessionEntry =\n\t| AgentConnectionSessionMessageEntry\n\t| AgentConnectionThinkingLevelChangeEntry\n\t| AgentConnectionServiceTierChangeEntry\n\t| AgentConnectionModelChangeEntry\n\t| AgentConnectionCompactionEntry\n\t| AgentConnectionBranchSummaryEntry\n\t| AgentConnectionCustomEntry\n\t| AgentConnectionChildUsageAttributionEntry\n\t| AgentConnectionCustomMessageEntry\n\t| AgentConnectionLabelEntry\n\t| AgentConnectionSessionInfoEntry\n\t| AgentConnectionSessionStateEntry\n\t| AgentConnectionAgentStatusEntry\n\t| AgentConnectionGitStateEntry;\n\nexport interface AgentConnectionSessionTreeFlatNode {\n\tentry: AgentConnectionSessionEntry;\n\tlabel?: string;\n\tlabelTimestamp?: string;\n}\n\nexport interface AgentConnectionSessionTreeNode extends AgentConnectionSessionTreeFlatNode {\n\tchildren: AgentConnectionSessionTreeNode[];\n}\n\nexport interface AgentConnectionSessionContext {\n\tmessages: AgentMessage[];\n\tthinkingLevel: string;\n\tserviceTier: ServiceTier;\n\tmodel: { provider: string; modelId: string } | null;\n}\n\nexport type AgentConnectionReplayStatus = \"complete\" | \"partial\" | \"unavailable\";\n\nexport interface AgentConnectionReplayInfo {\n\tstatus: AgentConnectionReplayStatus;\n\tfromSequence?: number;\n\ttoSequence: number;\n\tfromCursor?: AgentConnectionEventCursor;\n\ttoCursor?: AgentConnectionEventCursor;\n\treason?: string;\n}\n\nexport interface AgentConnectionEventCursor {\n\tgeneration: string;\n\tsequence: number;\n}\n\nexport interface AgentConnectionParentMetadata {\n\tactiveSessionId?: string;\n\tsessionId?: string;\n\tnodeId?: string;\n\tchildId?: string;\n}\n\nexport interface AgentConnectionSnapshot {\n\tstate: AgentConnectionState;\n\tmessages: AgentMessage[];\n\t/** In-flight assistant message, separate from finalized transcript messages. */\n\tstreamingMessage?: AgentMessage;\n\tsessionContext?: AgentConnectionSessionContext;\n\tsessionTree?: { tree: AgentConnectionSessionTreeNode[]; leafId: string | null };\n\tparent?: AgentConnectionParentMetadata;\n\t/** Live RLM children, including descendants, known to the host at snapshot time. */\n\tchildren?: AgentConnectionRlmChildAgentSnapshot[];\n\tlastEventSequence?: number;\n\tlastEventCursor?: AgentConnectionEventCursor;\n\treplay?: AgentConnectionReplayInfo;\n}\n\nexport interface AgentConnectionScopedModel {\n\tmodel: AgentConnectionModel;\n\tthinkingLevel?: ThinkingLevel;\n}\n\nexport interface AgentConnectionModelCycleResult {\n\tmodel: AgentConnectionModel;\n\tthinkingLevel: ThinkingLevel;\n\tserviceTier: ServiceTier;\n\tisScoped: boolean;\n}\n\nexport interface AgentConnectionState {\n\tactiveSessionId?: string;\n\tcwd: string;\n\tmodel?: AgentConnectionModel;\n\tthinkingLevel: ThinkingLevel;\n\tserviceTier: ServiceTier;\n\tavailableThinkingLevels: ThinkingLevel[];\n\tisStreaming: boolean;\n\tisCompacting: boolean;\n\tisBashRunning: boolean;\n\tretryAttempt: number;\n\tsteeringMode: AgentConnectionQueueMode;\n\tfollowUpMode: AgentConnectionQueueMode;\n\tsessionFile?: string;\n\tsessionId: string;\n\tsessionName?: string;\n\tsessionDir?: string;\n\tleafId: string | null;\n\tautoCompactionEnabled: boolean;\n\tmessageCount: number;\n\tsessionActions: SessionActionSnapshot;\n\tcompactionCount: number;\n\tgoal: GoalState;\n\theartbeat?: AgentCronJob | null;\n\tscopedModels: AgentConnectionScopedModel[];\n\tactiveToolNames: string[];\n\tcontextUsage: SessionStats[\"contextUsage\"];\n\t/** One-line recent-work recap for the prompt UI. */\n\trecap?: string;\n}\n\nexport interface AgentConnectionSlashCommand {\n\tname: string;\n\tregisteredName?: string;\n\tdescription?: string;\n\targumentHint?: string;\n\tsource: \"extension\" | \"prompt\" | \"skill\";\n\tsourceInfo: AgentConnectionSourceInfo;\n}\n\nexport type AgentConnectionArtifactType = \"context_file\" | \"extension\" | \"prompt\" | \"skill\" | \"theme\";\n\nexport interface AgentConnectionArtifactReference {\n\tid: string;\n\tsessionId: string;\n\ttype: AgentConnectionArtifactType;\n\tlogicalPath: string;\n\trelativePath?: string;\n\tmimeType?: string;\n}\n\nexport interface AgentConnectionResourceContextFile {\n\tpath: string;\n\tartifact?: AgentConnectionArtifactReference;\n}\n\nexport interface AgentConnectionResourceSkill {\n\tname: string;\n\tdescription?: string;\n\tfilePath: string;\n\tsourceInfo?: AgentConnectionSourceInfo;\n\tartifact?: AgentConnectionArtifactReference;\n}\n\nexport interface AgentConnectionResourcePrompt {\n\tname: string;\n\tdescription?: string;\n\targumentHint?: string;\n\tfilePath: string;\n\tsourceInfo?: AgentConnectionSourceInfo;\n\tartifact?: AgentConnectionArtifactReference;\n}\n\nexport interface AgentConnectionResourceExtension {\n\tpath: string;\n\tsourceInfo?: AgentConnectionSourceInfo;\n\tartifact?: AgentConnectionArtifactReference;\n}\n\nexport interface AgentConnectionResourceTheme {\n\tname?: string;\n\tsourcePath?: string;\n\tsourceInfo?: AgentConnectionSourceInfo;\n\tartifact?: AgentConnectionArtifactReference;\n}\n\nexport interface AgentConnectionResourceDiagnostics {\n\tskills: AgentConnectionResourceDiagnostic[];\n\tprompts: AgentConnectionResourceDiagnostic[];\n\textensions: AgentConnectionResourceDiagnostic[];\n\tthemes: AgentConnectionResourceDiagnostic[];\n}\n\nexport interface AgentConnectionResourceSnapshot {\n\tcontextFiles: AgentConnectionResourceContextFile[];\n\tskills: AgentConnectionResourceSkill[];\n\tprompts: AgentConnectionResourcePrompt[];\n\textensions: AgentConnectionResourceExtension[];\n\tthemes: AgentConnectionResourceTheme[];\n\tdiagnostics: AgentConnectionResourceDiagnostics;\n}\n\nexport interface AgentConnectionToolDefinition {\n\tname: string;\n\tlabel: string;\n\tdescription: string;\n\tpromptSnippet?: string;\n\tpromptGuidelines?: string[];\n\tparameters: unknown;\n\trenderShell?: \"default\" | \"self\";\n\treplayBuiltInToolName?: ReplayBuiltInToolName;\n}\n\n/** Only confirmed cancellation makes prompt-admission failure retry-safe. */\nexport class AgentConnectionPromptAdmissionError extends Error {\n\treadonly cancelled: boolean;\n\n\tconstructor(\n\t\tmessage: string,\n\t\treadonly status: \"cancelled\" | \"owned\" | \"unknown\" | \"unsupported\",\n\t\toptions?: ErrorOptions,\n\t) {\n\t\tsuper(message, options);\n\t\tthis.cancelled = status === \"cancelled\";\n\t\tthis.name = \"AgentConnectionPromptAdmissionError\";\n\t}\n}\n\nexport interface AgentConnectionPromptOptions {\n\timages?: ImageContent[];\n\tstreamingBehavior?: \"steer\" | \"followUp\";\n\tqueueIfBusy?: boolean;\n\tsource?: InputSource;\n\t/** Cancels only while admission waits; accepted prompts remain session-owned. */\n\tsignal?: AbortSignal;\n}\n\nexport interface AgentConnectionSideQuestionEvent {\n\tid: string;\n\tquestion: string;\n\tanswer: string;\n\tstatus: \"running\" | \"complete\" | \"cancelled\" | \"error\";\n\terrorMessage?: string;\n}\n\nexport interface AgentConnectionSideQuestionTurn {\n\tquestion: string;\n\tanswer: string;\n}\n\nexport interface AgentConnectionExecuteBashOptions {\n\texcludeFromContext?: boolean;\n\t/** Side-conversation bash is not recorded into the session. */\n\ttransient?: boolean;\n\t/**\n\t * Caller-generated id echoed on the run's bash_start/bash_end events, so the\n\t * requesting client can tell its own run apart from other clients' runs\n\t * broadcast on the same session.\n\t */\n\trunId?: string;\n}\n\nexport interface AgentConnectionNewSessionOptions {\n\tparentSession?: string;\n}\n\nexport interface AgentConnectionForkOptions {\n\tposition?: \"before\" | \"at\";\n}\n\nexport interface AgentConnectionSwitchSessionOptions {\n\tcwdOverride?: string;\n}\n\nexport interface AgentConnectionNavigateTreeOptions {\n\tsummarize?: boolean;\n\tcustomInstructions?: string;\n\treplaceInstructions?: boolean;\n\tlabel?: string;\n}\n\nexport interface AgentConnectionNavigateTreeResult {\n\teditorText?: string;\n\tcancelled: boolean;\n\taborted?: boolean;\n}\n\nexport interface AgentConnectionUserMessage {\n\tentryId: string;\n\ttext: string;\n}\n\nexport interface AgentConnectionQueueState {\n\tsteering: string[];\n\tfollowUp: string[];\n}\n\nexport type AgentConnectionQueuedMessageLane = QueuedMessageLane;\nexport type AgentConnectionQueuedMessageMutation = QueuedMessageMutation;\n/** `unsupported` means an older remote daemon lacks queued-message mutation. */\nexport type AgentConnectionQueuedMessageMutationStatus = QueuedMessageMutationStatus | \"unsupported\";\n\nexport interface AgentConnectionHeartbeat {\n\tjob: AgentCronJob;\n\tsessionName?: string;\n\tfirstMessage?: string;\n}\n\nexport type AgentConnectionExtensionUiResponse = { value: string } | { confirmed: boolean } | { cancelled: true };\n\nexport interface AgentConnectionExtensionUiRequest {\n\tid: string;\n\tmethod: string;\n\tpayload: Record<string, unknown>;\n}\n\nexport type AgentConnectionRlmChildAgentStatus = \"queued\" | \"running\" | \"done\" | \"error\" | \"cancelled\";\n\nexport interface AgentConnectionRlmChildAgentActivity {\n\tkind: \"waiting\" | \"writing\" | \"executing\";\n\ttoolName?: string;\n}\n\nexport interface AgentConnectionRlmChildAgentSnapshot {\n\tid: string;\n\tparentId?: string;\n\t/** Child daemon active-session id, for direct attachment. */\n\tactiveSessionId?: string;\n\t/** Stable daemon-visible child name for addressing and display. */\n\tsessionName?: string;\n\t/** Exact provider/model selector used by the child. */\n\tmodel?: string;\n\tlabel: string;\n\tstatus: AgentConnectionRlmChildAgentStatus;\n\tdurationMs?: number;\n\tanswerPreview?: string;\n\trepliedSinceTask?: boolean;\n\ttoolUseCount?: number;\n\ttokenCount?: number;\n\trecap?: string;\n\tsessionDir: string;\n\tactivity?: AgentConnectionRlmChildAgentActivity;\n\terror?: string;\n}\n\nexport type AgentConnectionSessionEvent =\n\t| AgentEvent\n\t| { type: \"ipython_sent_agent_message\"; toolCallId: string; message: KernelSentAgentMessage }\n\t| { type: \"session_action_update\"; actions: SessionActionSnapshot }\n\t| {\n\t\t\ttype: \"compaction_start\";\n\t\t\treason: \"manual\" | \"threshold\" | \"overflow\" | \"requested\";\n\t\t\tcustomInstructions?: string;\n\t }\n\t| { type: \"session_info_changed\"; name: string | undefined }\n\t| { type: \"thinking_level_changed\"; level: ThinkingLevel }\n\t| { type: \"service_tier_changed\"; serviceTier: ServiceTier }\n\t| {\n\t\t\ttype: \"compaction_end\";\n\t\t\treason: \"manual\" | \"threshold\" | \"overflow\" | \"requested\";\n\t\t\tresult: CompactionResult | undefined;\n\t\t\taborted: boolean;\n\t\t\twillRetry: boolean;\n\t\t\terrorMessage?: string;\n\t\t\terrorSeverity?: \"warning\" | \"error\";\n\t\t\tcustomInstructions?: string;\n\t }\n\t| { type: \"auto_retry_start\"; attempt: number; maxAttempts?: number; delayMs: number; errorMessage: string }\n\t| { type: \"auto_retry_end\"; success: boolean; attempt: number; finalError?: string }\n\t| { type: \"auth_stale\"; provider: string; sourceTokens?: readonly AuthSourceToken[] }\n\t| { type: \"rlm_child_update\"; child: AgentConnectionRlmChildAgentSnapshot }\n\t| { type: \"recap_update\"; recap: string | undefined }\n\t| { type: \"goal_update\"; goal: GoalState }\n\t| { type: \"bash_start\"; command: string; excludeFromContext: boolean; transient?: boolean; runId?: string }\n\t| { type: \"bash_output\"; chunk: string }\n\t| {\n\t\t\ttype: \"bash_end\";\n\t\t\texitCode: number | undefined;\n\t\t\tcancelled: boolean;\n\t\t\ttruncated: boolean;\n\t\t\tfullOutputPath?: string;\n\t\t\terrorMessage?: string;\n\t\t\ttransient?: boolean;\n\t\t\trunId?: string;\n\t }\n\t| { type: \"refine_complete\"; result: RefinementResult }\n\t| { type: \"refine_failed\"; error: string };\n\nexport type AgentConnectionEvent =\n\t| { type: \"session_event\"; event: AgentConnectionSessionEvent }\n\t| { type: \"side_question_event\"; event: AgentConnectionSideQuestionEvent }\n\t| { type: \"session_replaced\"; state: AgentConnectionState; messages: AgentMessage[] }\n\t| { type: \"session_resynced\"; snapshot: AgentConnectionSnapshot }\n\t| { type: \"session_status\"; recap?: string }\n\t| { type: \"extension_ui_request\"; request: AgentConnectionExtensionUiRequest }\n\t| { type: \"extension_error\"; extensionPath: string; event: string; error: string }\n\t| { type: \"connection_status\"; status: \"reconnecting\" | \"connected\"; error?: string }\n\t| { type: \"heartbeats_changed\" }\n\t| { type: \"closed\"; error?: string };\n\nexport type AgentConnectionEventListener = (event: AgentConnectionEvent) => void | Promise<void>;\nexport type AgentConnectionBeforeSessionInvalidateListener = () => void;\n\nexport interface AgentConnectionHeadlessCompletionOptions {\n\t/** Wait for descendant terminal publication and the parent turns it triggers. */\n\twaitForRlmQuiescence?: boolean;\n}\n\nexport interface AgentConnectionSessionInputPause {\n\trelease(): Promise<void>;\n}\n\nexport interface AgentConnection {\n\tsubscribe(listener: AgentConnectionEventListener): () => void;\n\tonBeforeSessionInvalidate(listener: AgentConnectionBeforeSessionInvalidateListener): () => void;\n\n\tgetState(): Promise<AgentConnectionState>;\n\tgetInitialSnapshot(): Promise<AgentConnectionSnapshot>;\n\tgetRlmChildSnapshots(): Promise<AgentConnectionRlmChildAgentSnapshot[]>;\n\tgetMessages(): Promise<AgentMessage[]>;\n\tgetSessionHeader(): Promise<AgentConnectionSessionHeader | undefined>;\n\tgetCommands(): Promise<AgentConnectionSlashCommand[]>;\n\tgetResourceSnapshot(): Promise<AgentConnectionResourceSnapshot>;\n\tgetModelCatalog(): Promise<AgentConnectionModelCatalog>;\n\tgetAvailableModels(): Promise<AgentConnectionModel[]>;\n\tgetSessionStats(): Promise<SessionStats>;\n\tgetContextTree(): Promise<ContextTreeNode>;\n\tgetSessionContext(): Promise<AgentConnectionSessionContext>;\n\tgetSessionTree(): Promise<{ tree: AgentConnectionSessionTreeNode[]; leafId: string | null }>;\n\tlistSavedSessions(\n\t\tscope: AgentConnectionSavedSessionScope,\n\t\tcallbacks?: AgentConnectionSessionListCallbacks,\n\t): Promise<AgentConnectionSavedSessionInfo[]>;\n\tgetQueue(): Promise<AgentConnectionQueueState>;\n\tmutateQueuedMessage(\n\t\tlane: AgentConnectionQueuedMessageLane,\n\t\tindex: number,\n\t\texpectedText: string,\n\t\tmutation: AgentConnectionQueuedMessageMutation,\n\t): Promise<AgentConnectionQueuedMessageMutationStatus>;\n\tclearQueue(): Promise<AgentConnectionQueueState>;\n\tabortAndClearQueue(): Promise<AgentConnectionQueueState>;\n\tacquireSessionInputPause(leaseKey: string): Promise<AgentConnectionSessionInputPause>;\n\tlistCronJobs(options?: { includeInactive?: boolean }): Promise<AgentCronJob[]>;\n\tlistHeartbeats(): Promise<AgentConnectionHeartbeat[]>;\n\tmanageHeartbeat(\n\t\tactiveSessionId: string,\n\t\tjobId: string,\n\t\taction: AgentHeartbeatManagementAction,\n\t): Promise<AgentCronJob>;\n\taddCronJob(schedule: string, prompt: string): Promise<AgentCronJob>;\n\tcancelCronJob(jobId: string): Promise<AgentCronJob>;\n\tgetHeartbeat(): Promise<AgentCronJob | undefined>;\n\tsetHeartbeat(\n\t\tschedule: string,\n\t\tinstruction: string,\n\t\tdeliveryMode?: AgentHeartbeatDeliveryMode,\n\t): Promise<AgentCronJob>;\n\tupdateHeartbeat(action: AgentHeartbeatUpdateAction): Promise<AgentCronJob | undefined>;\n\tsendAgentMessage(targetActiveSessionId: string, message: string): Promise<AgentSessionMessageReceipt>;\n\tgetAgentMessageStatus(): Promise<AgentSessionMessageSafetyStatus>;\n\tpauseAgentMessages(): Promise<AgentSessionMessageSafetyStatus>;\n\tresumeAgentMessages(): Promise<AgentSessionMessageSafetyStatus>;\n\tclearAgentMessages(): Promise<number>;\n\tgetUserMessagesForForking(): Promise<AgentConnectionUserMessage[]>;\n\tgetLastAssistantText(): Promise<string | undefined>;\n\tgetSystemPrompt(): Promise<string>;\n\tgetToolDefinition(name: string): Promise<AgentConnectionToolDefinition | undefined>;\n\tsetSessionEntryLabel(entryId: string, label: string | undefined): Promise<void>;\n\trespondToExtensionUiRequest(requestId: string, response: AgentConnectionExtensionUiResponse): Promise<void>;\n\tsubscribeAgentRoster?(listener: () => void): Promise<{ summaries(): SessionSummary[]; dispose(): Promise<void> }>;\n\tsupportsAcpMcpServers?(): boolean;\n\treplaceAcpMcpServers?(servers: readonly AcpMcpServerConfig[], ownerId: string): Promise<void>;\n\treleaseAcpMcpServers?(ownerId: string, serverNames: readonly string[]): Promise<void>;\n\n\tprompt(message: string, options?: AgentConnectionPromptOptions): Promise<void>;\n\tpromptAndWait(message: string, options?: AgentConnectionPromptOptions): Promise<void>;\n\tstartSideQuestion(id: string, question: string, previousTurns?: AgentConnectionSideQuestionTurn[]): Promise<void>;\n\tabortSideQuestion(id: string): Promise<boolean>;\n\tsteer(message: string, images?: ImageContent[]): Promise<void>;\n\tfollowUp(message: string, images?: ImageContent[]): Promise<void>;\n\tabort(): Promise<void>;\n\tcancelRlmChild(childId: string): Promise<boolean>;\n\twaitForIdle(): Promise<void>;\n\twaitForHeadlessCompletion(options?: AgentConnectionHeadlessCompletionOptions): Promise<AgentAutonomousStatus>;\n\n\t/**\n\t * Run a user-initiated bash command (! / !! prefix). Resolution timing is\n\t * adapter-specific; rendering must be driven by the bash_start/bash_output/\n\t * bash_end session events, which reach every attached client.\n\t */\n\texecuteBash(command: string, options?: AgentConnectionExecuteBashOptions): Promise<void>;\n\texecuteBashAndWait(command: string): Promise<BashResult>;\n\tabortBash(): Promise<void>;\n\n\tsetModel(provider: string, modelId: string): Promise<AgentConnectionModel>;\n\tcycleModel(direction?: \"forward\" | \"backward\"): Promise<AgentConnectionModelCycleResult | undefined>;\n\tsetScopedModels(scopedModels: AgentConnectionScopedModel[]): Promise<void>;\n\tsetThinkingLevel(level: ThinkingLevel): Promise<void>;\n\tsetServiceTier(serviceTier: ServiceTier): Promise<void>;\n\tcycleThinkingLevel(): Promise<ThinkingLevel | undefined>;\n\tsetTransport(transport: Transport): Promise<void>;\n\tsetSteeringMode(mode: AgentConnectionQueueMode): Promise<void>;\n\tsetFollowUpMode(mode: AgentConnectionQueueMode): Promise<void>;\n\tsetAutoCompactionEnabled(enabled: boolean): Promise<void>;\n\tsetAutoRetryEnabled(enabled: boolean): Promise<void>;\n\n\tcompact(customInstructions?: string): Promise<CompactionResult>;\n\trefine(options?: { instructions?: string; rollbackId?: string; global?: boolean }): Promise<RefinementResult>;\n\tabortCompaction(): Promise<void>;\n\tabortBranchSummary(): Promise<void>;\n\tabortRetry(): Promise<void>;\n\n\treload(): Promise<void>;\n\tnewSession(options?: AgentConnectionNewSessionOptions): Promise<{ cancelled: boolean }>;\n\tswitchSession(sessionPath: string, options?: AgentConnectionSwitchSessionOptions): Promise<{ cancelled: boolean }>;\n\tfork(entryId: string, options?: AgentConnectionForkOptions): Promise<{ cancelled: boolean; selectedText?: string }>;\n\tnavigateTree(\n\t\ttargetId: string,\n\t\toptions?: AgentConnectionNavigateTreeOptions,\n\t): Promise<AgentConnectionNavigateTreeResult>;\n\timportFromJsonl(inputPath: string, cwdOverride?: string): Promise<{ cancelled: boolean }>;\n\texportToHtml(outputPath?: string): Promise<string>;\n\texportToJsonl(outputPath?: string): Promise<string>;\n\tsetSessionName(name: string): Promise<void>;\n\tgetRlmMaxSubagentsStatus(): Promise<RlmMaxSubagentsStatus>;\n\tsetRlmMaxSubagents(maxSubagents: number): Promise<RlmMaxSubagentsStatus>;\n\tgetRlmMaxDepthStatus(): Promise<RlmMaxDepthStatus>;\n\tsetRlmMaxDepth(maxDepth: number, options?: { global?: boolean }): Promise<SetRlmMaxDepthResult>;\n\trenameSavedSession(sessionPath: string, name: string): Promise<void>;\n\tdeleteSavedSession(sessionPath: string): Promise<DeleteSessionFileResult>;\n\n\t/** Read-only live-session watcher; unavailable transports return undefined. */\n\twatchSession(activeSessionId: string): Promise<AgentConnectionSessionWatcher | undefined>;\n\n\tdispose(): Promise<void>;\n}\n\nexport interface AgentConnectionSessionWatcher {\n\tgetMessages(): Promise<AgentMessage[]>;\n\tgetCommands(): Promise<AgentConnectionSlashCommand[]>;\n\tsubscribe(listener: AgentConnectionEventListener): () => void;\n\tgetToolDefinition(name: string): Promise<AgentConnectionToolDefinition | undefined>;\n\tclose(): Promise<void>;\n}\n"]}
|