@adhdev/daemon-core 0.7.29 → 0.7.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +91 -49
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +91 -49
- package/dist/index.mjs.map +1 -1
- package/node_modules/@adhdev/session-host-core/package.json +1 -1
- package/package.json +1 -1
- package/src/agent-stream/manager.ts +2 -2
- package/src/agent-stream/poller.ts +0 -1
- package/src/cdp/setup.ts +0 -2
- package/src/cli-adapters/terminal-screen.ts +27 -4
- package/src/commands/chat-commands.ts +76 -42
- package/src/commands/cli-manager.ts +0 -2
- package/src/providers/provider-instance-manager.ts +0 -1
- package/src/sessions/registry.ts +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -663,7 +663,6 @@ interface SessionRuntimeTarget {
|
|
|
663
663
|
sessionId: string;
|
|
664
664
|
parentSessionId: string | null;
|
|
665
665
|
providerType: string;
|
|
666
|
-
providerCategory: 'ide' | 'extension' | 'cli' | 'acp';
|
|
667
666
|
transport: SessionTransport;
|
|
668
667
|
cdpManagerKey?: string;
|
|
669
668
|
adapterKey?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -663,7 +663,6 @@ interface SessionRuntimeTarget {
|
|
|
663
663
|
sessionId: string;
|
|
664
664
|
parentSessionId: string | null;
|
|
665
665
|
providerType: string;
|
|
666
|
-
providerCategory: 'ide' | 'extension' | 'cli' | 'acp';
|
|
667
666
|
transport: SessionTransport;
|
|
668
667
|
cdpManagerKey?: string;
|
|
669
668
|
adapterKey?: string;
|
package/dist/index.js
CHANGED
|
@@ -778,21 +778,39 @@ var init_xterm_backend = __esm({
|
|
|
778
778
|
|
|
779
779
|
// src/cli-adapters/terminal-screen.ts
|
|
780
780
|
function createTerminalBackend(options, preference) {
|
|
781
|
+
const ghosttyAvailable = isGhosttyVtBackendAvailable();
|
|
781
782
|
if (preference === "ghostty-vt") {
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
783
|
+
const backend2 = new GhosttyVtTerminalBackend(options);
|
|
784
|
+
logTerminalBackendSelection(preference, ghosttyAvailable, backend2.kind);
|
|
785
|
+
return backend2;
|
|
786
|
+
}
|
|
787
|
+
if (preference === "auto" && ghosttyAvailable) {
|
|
788
|
+
const backend2 = new GhosttyVtTerminalBackend(options);
|
|
789
|
+
logTerminalBackendSelection(preference, ghosttyAvailable, backend2.kind);
|
|
790
|
+
return backend2;
|
|
791
|
+
}
|
|
792
|
+
const backend = new XtermTerminalBackend(options);
|
|
793
|
+
logTerminalBackendSelection(preference, ghosttyAvailable, backend.kind);
|
|
794
|
+
return backend;
|
|
795
|
+
}
|
|
796
|
+
function logTerminalBackendSelection(preference, ghosttyAvailable, backendKind) {
|
|
797
|
+
const key = `${preference}:${ghosttyAvailable}:${backendKind}`;
|
|
798
|
+
if (loggedTerminalBackends.has(key)) return;
|
|
799
|
+
loggedTerminalBackends.add(key);
|
|
800
|
+
LOG.info(
|
|
801
|
+
"Terminal",
|
|
802
|
+
`[terminal-screen] backend=${backendKind} preference=${preference} ghosttyAvailable=${ghosttyAvailable}`
|
|
803
|
+
);
|
|
788
804
|
}
|
|
789
|
-
var DEFAULT_SCROLLBACK, TerminalScreen;
|
|
805
|
+
var DEFAULT_SCROLLBACK, loggedTerminalBackends, TerminalScreen;
|
|
790
806
|
var init_terminal_screen = __esm({
|
|
791
807
|
"src/cli-adapters/terminal-screen.ts"() {
|
|
792
808
|
"use strict";
|
|
809
|
+
init_logger();
|
|
793
810
|
init_ghostty_vt_backend();
|
|
794
811
|
init_xterm_backend();
|
|
795
812
|
DEFAULT_SCROLLBACK = 2e3;
|
|
813
|
+
loggedTerminalBackends = /* @__PURE__ */ new Set();
|
|
796
814
|
TerminalScreen = class {
|
|
797
815
|
backendKind;
|
|
798
816
|
rows;
|
|
@@ -4491,7 +4509,6 @@ async function setupIdeInstance(ctx, opts) {
|
|
|
4491
4509
|
sessionId: ideInstance.getInstanceId(),
|
|
4492
4510
|
parentSessionId: null,
|
|
4493
4511
|
providerType: ideType,
|
|
4494
|
-
providerCategory: "ide",
|
|
4495
4512
|
transport: "cdp-page",
|
|
4496
4513
|
cdpManagerKey: managerKey,
|
|
4497
4514
|
instanceKey: `ide:${managerKey}`
|
|
@@ -4506,7 +4523,6 @@ async function setupIdeInstance(ctx, opts) {
|
|
|
4506
4523
|
sessionId: ext.getInstanceId(),
|
|
4507
4524
|
parentSessionId: ideInstance.getInstanceId(),
|
|
4508
4525
|
providerType: ext.type,
|
|
4509
|
-
providerCategory: "extension",
|
|
4510
4526
|
transport: "cdp-webview",
|
|
4511
4527
|
cdpManagerKey: managerKey,
|
|
4512
4528
|
instanceKey: `ide:${managerKey}`
|
|
@@ -5082,9 +5098,31 @@ function getCurrentManagerKey(h) {
|
|
|
5082
5098
|
function getTargetedCliAdapter(h, args, providerType) {
|
|
5083
5099
|
return h.getCliAdapter(args?.targetSessionId || providerType || h.currentSession?.providerType || h.currentManagerKey);
|
|
5084
5100
|
}
|
|
5101
|
+
function getTargetTransport(h, provider) {
|
|
5102
|
+
if (h.currentSession?.transport) return h.currentSession.transport;
|
|
5103
|
+
switch (provider?.category) {
|
|
5104
|
+
case "cli":
|
|
5105
|
+
return "pty";
|
|
5106
|
+
case "acp":
|
|
5107
|
+
return "acp";
|
|
5108
|
+
case "extension":
|
|
5109
|
+
return "cdp-webview";
|
|
5110
|
+
case "ide":
|
|
5111
|
+
return "cdp-page";
|
|
5112
|
+
default:
|
|
5113
|
+
return null;
|
|
5114
|
+
}
|
|
5115
|
+
}
|
|
5116
|
+
function isCliLikeTransport(transport) {
|
|
5117
|
+
return transport === "pty" || transport === "acp";
|
|
5118
|
+
}
|
|
5119
|
+
function isExtensionTransport(transport) {
|
|
5120
|
+
return transport === "cdp-webview";
|
|
5121
|
+
}
|
|
5085
5122
|
function buildRecentSendKey(h, args, provider, text) {
|
|
5123
|
+
const transport = getTargetTransport(h, provider) || "unknown";
|
|
5086
5124
|
const target = args?.targetSessionId || args?.agentType || h.currentSession?.providerType || h.currentProviderType || h.currentManagerKey || "unknown";
|
|
5087
|
-
return `${
|
|
5125
|
+
return `${transport}:${target}:${text.trim()}`;
|
|
5088
5126
|
}
|
|
5089
5127
|
function isRecentDuplicateSend(key) {
|
|
5090
5128
|
const now = Date.now();
|
|
@@ -5110,25 +5148,25 @@ async function handleChatHistory(h, args) {
|
|
|
5110
5148
|
}
|
|
5111
5149
|
async function handleReadChat(h, args) {
|
|
5112
5150
|
const provider = h.getProvider(args?.agentType);
|
|
5151
|
+
const transport = getTargetTransport(h, provider);
|
|
5113
5152
|
const _log = (msg) => LOG.debug("Command", `[read_chat] ${msg}`);
|
|
5114
|
-
if (
|
|
5115
|
-
const adapter = getTargetedCliAdapter(h, args, provider
|
|
5153
|
+
if (isCliLikeTransport(transport)) {
|
|
5154
|
+
const adapter = getTargetedCliAdapter(h, args, provider?.type);
|
|
5116
5155
|
if (adapter) {
|
|
5117
|
-
_log(`${
|
|
5156
|
+
_log(`${transport} adapter: ${adapter.cliType}`);
|
|
5118
5157
|
const status = adapter.getStatus?.();
|
|
5119
5158
|
if (status) {
|
|
5120
5159
|
return {
|
|
5121
5160
|
success: true,
|
|
5122
5161
|
messages: status.messages || [],
|
|
5123
5162
|
status: status.status,
|
|
5124
|
-
activeModal: status.activeModal
|
|
5125
|
-
terminalHistory: status.terminalHistory || ""
|
|
5163
|
+
activeModal: status.activeModal
|
|
5126
5164
|
};
|
|
5127
5165
|
}
|
|
5128
5166
|
}
|
|
5129
|
-
return { success: false, error: `${
|
|
5167
|
+
return { success: false, error: `${transport} adapter not found` };
|
|
5130
5168
|
}
|
|
5131
|
-
if (
|
|
5169
|
+
if (isExtensionTransport(transport)) {
|
|
5132
5170
|
try {
|
|
5133
5171
|
const evalResult = await h.evaluateProviderScript("readChat", void 0, 5e4);
|
|
5134
5172
|
if (evalResult?.result) {
|
|
@@ -5142,7 +5180,7 @@ async function handleReadChat(h, args) {
|
|
|
5142
5180
|
if (parsed && typeof parsed === "object") {
|
|
5143
5181
|
_log(`Extension OK: ${parsed.messages?.length || 0} msgs`);
|
|
5144
5182
|
h.historyWriter.appendNewMessages(
|
|
5145
|
-
provider
|
|
5183
|
+
provider?.type || "unknown_extension",
|
|
5146
5184
|
parsed.messages || [],
|
|
5147
5185
|
parsed.title,
|
|
5148
5186
|
args?.targetSessionId
|
|
@@ -5158,7 +5196,7 @@ async function handleReadChat(h, args) {
|
|
|
5158
5196
|
const parentSessionId = h.currentSession?.parentSessionId;
|
|
5159
5197
|
if (cdp2 && parentSessionId) {
|
|
5160
5198
|
const stream = await h.agentStream.collectActiveSession(cdp2, parentSessionId);
|
|
5161
|
-
if (stream?.agentType !== provider
|
|
5199
|
+
if (stream?.agentType !== provider?.type) {
|
|
5162
5200
|
return { success: true, messages: [], status: "idle" };
|
|
5163
5201
|
}
|
|
5164
5202
|
if (stream) {
|
|
@@ -5238,6 +5276,7 @@ async function handleSendChat(h, args) {
|
|
|
5238
5276
|
if (!text) return { success: false, error: "text required" };
|
|
5239
5277
|
const _log = (msg) => LOG.debug("Command", `[send_chat] ${msg}`);
|
|
5240
5278
|
const provider = h.getProvider(args?.agentType);
|
|
5279
|
+
const transport = getTargetTransport(h, provider);
|
|
5241
5280
|
const dedupeKey = buildRecentSendKey(h, args, provider, text);
|
|
5242
5281
|
const _logSendSuccess = (method, targetAgent) => {
|
|
5243
5282
|
h.historyWriter.appendNewMessages(
|
|
@@ -5253,20 +5292,20 @@ async function handleSendChat(h, args) {
|
|
|
5253
5292
|
_log(`Suppressed duplicate send for ${dedupeKey}`);
|
|
5254
5293
|
return { success: true, sent: false, deduplicated: true };
|
|
5255
5294
|
}
|
|
5256
|
-
if (
|
|
5257
|
-
const adapter = getTargetedCliAdapter(h, args, provider
|
|
5295
|
+
if (isCliLikeTransport(transport)) {
|
|
5296
|
+
const adapter = getTargetedCliAdapter(h, args, provider?.type);
|
|
5258
5297
|
if (adapter) {
|
|
5259
|
-
_log(`${
|
|
5298
|
+
_log(`${transport} adapter: ${adapter.cliType}`);
|
|
5260
5299
|
try {
|
|
5261
5300
|
await adapter.sendMessage(text);
|
|
5262
|
-
return _logSendSuccess(`${
|
|
5301
|
+
return _logSendSuccess(`${transport}-adapter`, adapter.cliType);
|
|
5263
5302
|
} catch (e) {
|
|
5264
|
-
return { success: false, error: `${
|
|
5303
|
+
return { success: false, error: `${transport} send failed: ${e.message}` };
|
|
5265
5304
|
}
|
|
5266
5305
|
}
|
|
5267
5306
|
}
|
|
5268
|
-
if (
|
|
5269
|
-
_log(`Extension: ${provider
|
|
5307
|
+
if (isExtensionTransport(transport)) {
|
|
5308
|
+
_log(`Extension: ${provider?.type || "unknown_extension"}`);
|
|
5270
5309
|
try {
|
|
5271
5310
|
const evalResult = await h.evaluateProviderScript("sendMessage", { MESSAGE: text }, 3e4);
|
|
5272
5311
|
if (evalResult?.result) {
|
|
@@ -5296,7 +5335,7 @@ async function handleSendChat(h, args) {
|
|
|
5296
5335
|
return _logSendSuccess("agent-stream");
|
|
5297
5336
|
}
|
|
5298
5337
|
}
|
|
5299
|
-
return { success: false, error: `Extension '${provider
|
|
5338
|
+
return { success: false, error: `Extension '${provider?.type || "unknown_extension"}' send failed` };
|
|
5300
5339
|
}
|
|
5301
5340
|
const targetCdp = h.getCdp();
|
|
5302
5341
|
if (!targetCdp?.isConnected) {
|
|
@@ -5422,7 +5461,8 @@ async function handleSendChat(h, args) {
|
|
|
5422
5461
|
}
|
|
5423
5462
|
async function handleListChats(h, args) {
|
|
5424
5463
|
const provider = h.getProvider(args?.agentType);
|
|
5425
|
-
|
|
5464
|
+
const transport = getTargetTransport(h, provider);
|
|
5465
|
+
if (isExtensionTransport(transport) && h.agentStream && h.getCdp() && h.currentSession?.sessionId) {
|
|
5426
5466
|
try {
|
|
5427
5467
|
const chats = await h.agentStream.listSessionChats(h.getCdp(), h.currentSession.sessionId);
|
|
5428
5468
|
LOG.info("Command", `[list_chats] Extension: ${chats.length} chats`);
|
|
@@ -5474,8 +5514,9 @@ async function handleListChats(h, args) {
|
|
|
5474
5514
|
}
|
|
5475
5515
|
async function handleNewChat(h, args) {
|
|
5476
5516
|
const provider = h.getProvider(args?.agentType);
|
|
5477
|
-
|
|
5478
|
-
|
|
5517
|
+
const transport = getTargetTransport(h, provider);
|
|
5518
|
+
if (transport === "pty") {
|
|
5519
|
+
const adapter = getTargetedCliAdapter(h, args, provider?.type);
|
|
5479
5520
|
if (!adapter) return { success: false, error: "CLI adapter not running" };
|
|
5480
5521
|
if (typeof adapter.clearHistory === "function") {
|
|
5481
5522
|
adapter.clearHistory();
|
|
@@ -5483,7 +5524,7 @@ async function handleNewChat(h, args) {
|
|
|
5483
5524
|
}
|
|
5484
5525
|
return { success: false, error: "new_chat not supported by this CLI provider" };
|
|
5485
5526
|
}
|
|
5486
|
-
if (
|
|
5527
|
+
if (isExtensionTransport(transport) && h.agentStream && h.getCdp() && h.currentSession?.sessionId) {
|
|
5487
5528
|
const ok = await h.agentStream.newSession(h.getCdp(), h.currentSession.sessionId);
|
|
5488
5529
|
return { success: ok };
|
|
5489
5530
|
}
|
|
@@ -5508,11 +5549,12 @@ async function handleNewChat(h, args) {
|
|
|
5508
5549
|
}
|
|
5509
5550
|
async function handleSwitchChat(h, args) {
|
|
5510
5551
|
const provider = h.getProvider(args?.agentType);
|
|
5552
|
+
const transport = getTargetTransport(h, provider);
|
|
5511
5553
|
const managerKey = getCurrentManagerKey(h);
|
|
5512
5554
|
const sessionId = args?.sessionId || args?.id || args?.chatId;
|
|
5513
5555
|
if (!sessionId) return { success: false, error: "sessionId required" };
|
|
5514
5556
|
LOG.info("Command", `[switch_chat] sessionId=${sessionId}, manager=${managerKey}`);
|
|
5515
|
-
if (
|
|
5557
|
+
if (isExtensionTransport(transport) && h.agentStream && h.getCdp() && h.currentSession?.sessionId) {
|
|
5516
5558
|
const ok = await h.agentStream.switchConversation(h.getCdp(), h.currentSession.sessionId, sessionId);
|
|
5517
5559
|
return { success: ok, result: ok ? "switched" : "failed" };
|
|
5518
5560
|
}
|
|
@@ -5602,9 +5644,10 @@ async function handleSwitchChat(h, args) {
|
|
|
5602
5644
|
}
|
|
5603
5645
|
async function handleSetMode(h, args) {
|
|
5604
5646
|
const provider = h.getProvider(args?.agentType);
|
|
5647
|
+
const transport = getTargetTransport(h, provider);
|
|
5605
5648
|
const mode = args?.mode || "agent";
|
|
5606
|
-
if (
|
|
5607
|
-
const adapter = getTargetedCliAdapter(h, args, provider
|
|
5649
|
+
if (transport === "acp") {
|
|
5650
|
+
const adapter = getTargetedCliAdapter(h, args, provider?.type);
|
|
5608
5651
|
if (adapter) {
|
|
5609
5652
|
const acpInstance = adapter._acpInstance;
|
|
5610
5653
|
if (acpInstance && typeof acpInstance.onEvent === "function") {
|
|
@@ -5657,10 +5700,11 @@ async function handleSetMode(h, args) {
|
|
|
5657
5700
|
}
|
|
5658
5701
|
async function handleChangeModel(h, args) {
|
|
5659
5702
|
const provider = h.getProvider(args?.agentType);
|
|
5703
|
+
const transport = getTargetTransport(h, provider);
|
|
5660
5704
|
const model = args?.model;
|
|
5661
|
-
LOG.info("Command", `[change_model] model=${model} provider=${provider?.type}
|
|
5662
|
-
if (
|
|
5663
|
-
const adapter = getTargetedCliAdapter(h, args, provider
|
|
5705
|
+
LOG.info("Command", `[change_model] model=${model} provider=${provider?.type} transport=${transport} manager=${getCurrentManagerKey(h)} providerType=${getCurrentProviderType(h)}`);
|
|
5706
|
+
if (transport === "acp") {
|
|
5707
|
+
const adapter = getTargetedCliAdapter(h, args, provider?.type);
|
|
5664
5708
|
LOG.info("Command", `[change_model] ACP adapter found: ${!!adapter}, type=${adapter?.cliType}, hasAcpInstance=${!!adapter?._acpInstance}`);
|
|
5665
5709
|
if (adapter) {
|
|
5666
5710
|
const acpInstance = adapter._acpInstance;
|
|
@@ -5718,15 +5762,16 @@ async function handleSetThoughtLevel(h, args) {
|
|
|
5718
5762
|
const value = args?.value;
|
|
5719
5763
|
if (!configId || !value) return { success: false, error: "configId and value required" };
|
|
5720
5764
|
const provider = h.getProvider(args?.agentType);
|
|
5721
|
-
|
|
5765
|
+
const transport = getTargetTransport(h, provider);
|
|
5766
|
+
if (transport !== "acp") {
|
|
5722
5767
|
return { success: false, error: "set_thought_level only for ACP providers" };
|
|
5723
5768
|
}
|
|
5724
|
-
const adapter = getTargetedCliAdapter(h, args, provider
|
|
5769
|
+
const adapter = getTargetedCliAdapter(h, args, provider?.type);
|
|
5725
5770
|
const acpInstance = adapter?._acpInstance;
|
|
5726
5771
|
if (!acpInstance) return { success: false, error: "ACP instance not found" };
|
|
5727
5772
|
try {
|
|
5728
5773
|
await acpInstance.setConfigOption(configId, value);
|
|
5729
|
-
LOG.info("Command", `[set_thought_level] ${configId}=${value} for ${provider
|
|
5774
|
+
LOG.info("Command", `[set_thought_level] ${configId}=${value} for ${provider?.type || "unknown_acp"}`);
|
|
5730
5775
|
return { success: true, configId, value };
|
|
5731
5776
|
} catch (e) {
|
|
5732
5777
|
return { success: false, error: e?.message };
|
|
@@ -5734,11 +5779,12 @@ async function handleSetThoughtLevel(h, args) {
|
|
|
5734
5779
|
}
|
|
5735
5780
|
async function handleResolveAction(h, args) {
|
|
5736
5781
|
const provider = h.getProvider(args?.agentType);
|
|
5782
|
+
const transport = getTargetTransport(h, provider);
|
|
5737
5783
|
const action = args?.action || "approve";
|
|
5738
5784
|
const button = args?.button || args?.buttonText || (action === "approve" ? "Accept" : action === "reject" ? "Reject" : "Accept");
|
|
5739
5785
|
LOG.info("Command", `[resolveAction] action=${action} button="${button}" provider=${provider?.type}`);
|
|
5740
|
-
if (
|
|
5741
|
-
const adapter = getTargetedCliAdapter(h, args, provider
|
|
5786
|
+
if (transport === "pty") {
|
|
5787
|
+
const adapter = getTargetedCliAdapter(h, args, provider?.type);
|
|
5742
5788
|
if (!adapter) return { success: false, error: "CLI adapter not running" };
|
|
5743
5789
|
if (args?.data && typeof adapter.resolveAction === "function") {
|
|
5744
5790
|
try {
|
|
@@ -5779,7 +5825,7 @@ async function handleResolveAction(h, args) {
|
|
|
5779
5825
|
LOG.info("Command", `[resolveAction] CLI PTY \u2192 buttonIndex=${buttonIndex} "${buttons[buttonIndex] ?? "?"}"`);
|
|
5780
5826
|
return { success: true, buttonIndex, button: buttons[buttonIndex] ?? button };
|
|
5781
5827
|
}
|
|
5782
|
-
if (
|
|
5828
|
+
if (isExtensionTransport(transport) && h.agentStream && h.getCdp() && h.currentSession?.sessionId) {
|
|
5783
5829
|
const ok = await h.agentStream.resolveSessionAction(h.getCdp(), h.currentSession.sessionId, action);
|
|
5784
5830
|
return { success: ok };
|
|
5785
5831
|
}
|
|
@@ -10190,7 +10236,6 @@ var DaemonCliManager = class {
|
|
|
10190
10236
|
sessionId: cliInstance.instanceId,
|
|
10191
10237
|
parentSessionId: null,
|
|
10192
10238
|
providerType: normalizedType,
|
|
10193
|
-
providerCategory: "cli",
|
|
10194
10239
|
transport: "pty",
|
|
10195
10240
|
adapterKey: key,
|
|
10196
10241
|
instanceKey: key
|
|
@@ -10240,7 +10285,6 @@ ${installInfo}`
|
|
|
10240
10285
|
sessionId,
|
|
10241
10286
|
parentSessionId: null,
|
|
10242
10287
|
providerType: normalizedType,
|
|
10243
|
-
providerCategory: "acp",
|
|
10244
10288
|
transport: "acp",
|
|
10245
10289
|
adapterKey: key,
|
|
10246
10290
|
instanceKey: key
|
|
@@ -10752,12 +10796,12 @@ var DaemonAgentStreamManager = class {
|
|
|
10752
10796
|
this.logFn(`[AgentStream] Active session (${parentSessionId}): ${sessionId || "none"}`);
|
|
10753
10797
|
}
|
|
10754
10798
|
resolveSessionIdForTarget(parentSessionId, agentType) {
|
|
10755
|
-
const child = (this.sessionRegistry?.listChildren(parentSessionId) || []).find((entry) => entry.
|
|
10799
|
+
const child = (this.sessionRegistry?.listChildren(parentSessionId) || []).find((entry) => entry.transport === "cdp-webview" && entry.providerType === agentType);
|
|
10756
10800
|
return child?.sessionId || null;
|
|
10757
10801
|
}
|
|
10758
10802
|
async connectManagedSession(cdp, parentSessionId, runtimeSessionId) {
|
|
10759
10803
|
const target = this.getSessionTarget(runtimeSessionId);
|
|
10760
|
-
if (!target || target.
|
|
10804
|
+
if (!target || target.transport !== "cdp-webview") return null;
|
|
10761
10805
|
const adapter = this.adaptersByType.get(target.providerType);
|
|
10762
10806
|
if (!adapter) return null;
|
|
10763
10807
|
const targets = await cdp.discoverAgentWebviews();
|
|
@@ -11042,7 +11086,6 @@ var AgentStreamPoller = class {
|
|
|
11042
11086
|
sessionId: extInstance.getInstanceId(),
|
|
11043
11087
|
parentSessionId,
|
|
11044
11088
|
providerType: extType,
|
|
11045
|
-
providerCategory: "extension",
|
|
11046
11089
|
transport: "cdp-webview",
|
|
11047
11090
|
cdpManagerKey: ideType,
|
|
11048
11091
|
instanceKey: `ide:${ideType}`
|
|
@@ -11258,7 +11301,6 @@ var ProviderInstanceManager = class {
|
|
|
11258
11301
|
providerType,
|
|
11259
11302
|
instanceId: state.instanceId,
|
|
11260
11303
|
targetSessionId: state.instanceId,
|
|
11261
|
-
providerCategory: state.category,
|
|
11262
11304
|
workspaceName: state.workspace || void 0,
|
|
11263
11305
|
...extra
|
|
11264
11306
|
});
|