@adhdev/daemon-core 0.7.30 → 0.7.33
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 +4 -6
- package/dist/index.d.ts +4 -6
- package/dist/index.js +24 -19
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +24 -19
- package/dist/index.mjs.map +1 -1
- package/node_modules/@adhdev/session-host-core/dist/index.js +14 -1
- package/node_modules/@adhdev/session-host-core/dist/index.js.map +1 -1
- package/node_modules/@adhdev/session-host-core/dist/index.mjs +14 -1
- package/node_modules/@adhdev/session-host-core/dist/index.mjs.map +1 -1
- package/node_modules/@adhdev/session-host-core/package.json +1 -1
- package/package.json +1 -1
- package/src/cli-adapters/provider-cli-adapter.ts +10 -2
- package/src/commands/router.ts +1 -1
- package/src/detection/cli-detector.ts +4 -4
- package/src/providers/ide-provider-instance.ts +7 -4
- package/src/providers/provider-instance-manager.ts +7 -0
- package/src/providers/provider-instance.ts +2 -0
- package/src/providers/provider-loader.ts +0 -9
package/dist/index.d.mts
CHANGED
|
@@ -199,12 +199,6 @@ declare class ProviderLoader {
|
|
|
199
199
|
hasUpstream(): boolean;
|
|
200
200
|
/**
|
|
201
201
|
* Get raw provider metadata by type (NO scripts loaded).
|
|
202
|
-
* Use resolve() when you need scripts (readChat, listModels, etc).
|
|
203
|
-
* @deprecated Use getMeta() for metadata or resolve() for scripts.
|
|
204
|
-
*/
|
|
205
|
-
get(type: string): ProviderModule | undefined;
|
|
206
|
-
/**
|
|
207
|
-
* Get raw provider metadata by type (NO scripts loaded).
|
|
208
202
|
* Safe for: category checks, icon, displayName, targetFilter, cdpPorts.
|
|
209
203
|
* NOT safe for: script execution (readChat, listModels, sendMessage).
|
|
210
204
|
* Use resolve() when scripts are needed.
|
|
@@ -617,6 +611,10 @@ declare class ProviderInstanceManager {
|
|
|
617
611
|
*/
|
|
618
612
|
get size(): number;
|
|
619
613
|
/**
|
|
614
|
+
* All Instance IDs (for iteration without exposing the private Map)
|
|
615
|
+
*/
|
|
616
|
+
listInstanceIds(): string[];
|
|
617
|
+
/**
|
|
620
618
|
* all Instance's current status collect
|
|
621
619
|
* + Propagate pending events to event listeners
|
|
622
620
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -199,12 +199,6 @@ declare class ProviderLoader {
|
|
|
199
199
|
hasUpstream(): boolean;
|
|
200
200
|
/**
|
|
201
201
|
* Get raw provider metadata by type (NO scripts loaded).
|
|
202
|
-
* Use resolve() when you need scripts (readChat, listModels, etc).
|
|
203
|
-
* @deprecated Use getMeta() for metadata or resolve() for scripts.
|
|
204
|
-
*/
|
|
205
|
-
get(type: string): ProviderModule | undefined;
|
|
206
|
-
/**
|
|
207
|
-
* Get raw provider metadata by type (NO scripts loaded).
|
|
208
202
|
* Safe for: category checks, icon, displayName, targetFilter, cdpPorts.
|
|
209
203
|
* NOT safe for: script execution (readChat, listModels, sendMessage).
|
|
210
204
|
* Use resolve() when scripts are needed.
|
|
@@ -617,6 +611,10 @@ declare class ProviderInstanceManager {
|
|
|
617
611
|
*/
|
|
618
612
|
get size(): number;
|
|
619
613
|
/**
|
|
614
|
+
* All Instance IDs (for iteration without exposing the private Map)
|
|
615
|
+
*/
|
|
616
|
+
listInstanceIds(): string[];
|
|
617
|
+
/**
|
|
620
618
|
* all Instance's current status collect
|
|
621
619
|
* + Propagate pending events to event listeners
|
|
622
620
|
*/
|
package/dist/index.js
CHANGED
|
@@ -1277,8 +1277,12 @@ var init_provider_cli_adapter = __esm({
|
|
|
1277
1277
|
LOG.info("CLI", `[${this.cliType}] Using login shell (script shim or non-native binary)`);
|
|
1278
1278
|
}
|
|
1279
1279
|
shellCmd = isWin ? "cmd.exe" : process.env.SHELL || "/bin/zsh";
|
|
1280
|
-
|
|
1281
|
-
|
|
1280
|
+
if (isWin) {
|
|
1281
|
+
shellArgs = ["/c", binaryPath, ...allArgs];
|
|
1282
|
+
} else {
|
|
1283
|
+
const fullCmd = [binaryPath, ...allArgs].map(shSingleQuote).join(" ");
|
|
1284
|
+
shellArgs = ["-l", "-c", fullCmd];
|
|
1285
|
+
}
|
|
1282
1286
|
} else {
|
|
1283
1287
|
shellCmd = binaryPath;
|
|
1284
1288
|
shellArgs = allArgs;
|
|
@@ -2302,16 +2306,16 @@ async function detectCLIs(providerLoader) {
|
|
|
2302
2306
|
const results = await Promise.all(
|
|
2303
2307
|
cliList.map(async (cli) => {
|
|
2304
2308
|
try {
|
|
2305
|
-
const pathResult = await execAsync(`${whichCmd} ${cli.command}
|
|
2309
|
+
const pathResult = await execAsync(`${whichCmd} ${cli.command}`);
|
|
2306
2310
|
if (!pathResult) return { ...cli, installed: false };
|
|
2307
2311
|
const firstPath = pathResult.split("\n")[0];
|
|
2308
2312
|
let version;
|
|
2309
2313
|
try {
|
|
2310
2314
|
const versionCommands = [
|
|
2311
2315
|
cli.versionCommand,
|
|
2312
|
-
`${cli.command} --version
|
|
2313
|
-
`${cli.command} -V
|
|
2314
|
-
`${cli.command} -v
|
|
2316
|
+
`${cli.command} --version`,
|
|
2317
|
+
`${cli.command} -V`,
|
|
2318
|
+
`${cli.command} -v`
|
|
2315
2319
|
].filter((v) => !!v);
|
|
2316
2320
|
for (const versionCommand of versionCommands) {
|
|
2317
2321
|
const versionResult = await execAsync(versionCommand, 3e3);
|
|
@@ -4458,10 +4462,13 @@ var IdeProviderInstance = class {
|
|
|
4458
4462
|
if (result?.found && result.x != null && result.y != null) {
|
|
4459
4463
|
const x = result.x;
|
|
4460
4464
|
const y = result.y;
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
+
if (cdp.send) {
|
|
4466
|
+
await cdp.send("Input.dispatchMouseEvent", { type: "mousePressed", x, y, button: "left", clickCount: 1 });
|
|
4467
|
+
await cdp.send("Input.dispatchMouseEvent", { type: "mouseReleased", x, y, button: "left", clickCount: 1 });
|
|
4468
|
+
LOG.info("IdeInstance", `[IdeInstance:${this.type}] autoApprove: dispatched mouse event at ${x},${y}`);
|
|
4469
|
+
} else {
|
|
4470
|
+
LOG.warn("IdeInstance", `[IdeInstance:${this.type}] autoApprove: cdp.send() not available for coordinate click`);
|
|
4471
|
+
}
|
|
4465
4472
|
}
|
|
4466
4473
|
this.pushEvent({
|
|
4467
4474
|
event: "agent:auto_approved",
|
|
@@ -7119,14 +7126,6 @@ var ProviderLoader = class _ProviderLoader {
|
|
|
7119
7126
|
}
|
|
7120
7127
|
/**
|
|
7121
7128
|
* Get raw provider metadata by type (NO scripts loaded).
|
|
7122
|
-
* Use resolve() when you need scripts (readChat, listModels, etc).
|
|
7123
|
-
* @deprecated Use getMeta() for metadata or resolve() for scripts.
|
|
7124
|
-
*/
|
|
7125
|
-
get(type) {
|
|
7126
|
-
return this.providers.get(type);
|
|
7127
|
-
}
|
|
7128
|
-
/**
|
|
7129
|
-
* Get raw provider metadata by type (NO scripts loaded).
|
|
7130
7129
|
* Safe for: category checks, icon, displayName, targetFilter, cdpPorts.
|
|
7131
7130
|
* NOT safe for: script execution (readChat, listModels, sendMessage).
|
|
7132
7131
|
* Use resolve() when scripts are needed.
|
|
@@ -8712,7 +8711,7 @@ var DaemonCommandRouter = class {
|
|
|
8712
8711
|
}
|
|
8713
8712
|
}
|
|
8714
8713
|
const keysToRemove = [];
|
|
8715
|
-
for (const key of this.deps.instanceManager.
|
|
8714
|
+
for (const key of this.deps.instanceManager.listInstanceIds()) {
|
|
8716
8715
|
if (key === `ide:${ideType}` || typeof key === "string" && key.startsWith(`ide:${ideType}_`)) {
|
|
8717
8716
|
keysToRemove.push(key);
|
|
8718
8717
|
}
|
|
@@ -11227,6 +11226,12 @@ var ProviderInstanceManager = class {
|
|
|
11227
11226
|
get size() {
|
|
11228
11227
|
return this.instances.size;
|
|
11229
11228
|
}
|
|
11229
|
+
/**
|
|
11230
|
+
* All Instance IDs (for iteration without exposing the private Map)
|
|
11231
|
+
*/
|
|
11232
|
+
listInstanceIds() {
|
|
11233
|
+
return [...this.instances.keys()];
|
|
11234
|
+
}
|
|
11230
11235
|
// ─── State collect ────────────────────────────────
|
|
11231
11236
|
/**
|
|
11232
11237
|
* all Instance's current status collect
|