@adhdev/daemon-core 0.6.17 → 0.6.19
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.js +10 -4
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
- package/src/daemon/dev-server.ts +11 -5
package/dist/index.js
CHANGED
|
@@ -10411,7 +10411,7 @@ var DevServer = class _DevServer {
|
|
|
10411
10411
|
this.json(res, 400, { error: `Script '${scriptName}' not found in provider '${type}'`, available: provider.scripts ? Object.keys(provider.scripts) : [] });
|
|
10412
10412
|
return;
|
|
10413
10413
|
}
|
|
10414
|
-
const cdp = this.getCdp(scriptIdeType);
|
|
10414
|
+
const cdp = this.getCdp(scriptIdeType || type);
|
|
10415
10415
|
if (!cdp) {
|
|
10416
10416
|
this.json(res, 503, { error: "No CDP connection available" });
|
|
10417
10417
|
return;
|
|
@@ -12130,9 +12130,11 @@ var DevServer = class _DevServer {
|
|
|
12130
12130
|
const baseArgs = [...spawn3.args || []].filter((a) => !interactiveFlags.includes(a));
|
|
12131
12131
|
let shellCmd;
|
|
12132
12132
|
if (command === "claude") {
|
|
12133
|
-
const args = [...baseArgs, "--
|
|
12133
|
+
const args = [...baseArgs, "--dangerously-skip-permissions"];
|
|
12134
|
+
if (model) args.push("--model", model);
|
|
12134
12135
|
const escapedArgs = args.map((a) => `'${a.replace(/'/g, "'\\''")}'`).join(" ");
|
|
12135
|
-
|
|
12136
|
+
const metaPrompt = `Read the file at ${promptFile} and follow ALL the instructions. Implement the specific function requested, then test it via CDP curl targeting 127.0.0.1:19280, wait for confirmation of success, and then close. DO NOT start working on other features not listed in the prompt constraint.`;
|
|
12137
|
+
shellCmd = `${command} ${escapedArgs} -p "${metaPrompt}"`;
|
|
12136
12138
|
} else if (command === "gemini") {
|
|
12137
12139
|
const args = [...baseArgs, "-y", "-s", "false"];
|
|
12138
12140
|
if (model) args.push("-m", model);
|
|
@@ -12148,7 +12150,7 @@ var DevServer = class _DevServer {
|
|
|
12148
12150
|
}
|
|
12149
12151
|
if (model) args.push("--model", model);
|
|
12150
12152
|
const escapedArgs = args.map((a) => `'${a.replace(/'/g, "'\\''")}'`).join(" ");
|
|
12151
|
-
const metaPrompt = `Read the file at ${promptFile} and follow ALL
|
|
12153
|
+
const metaPrompt = `Read the file at ${promptFile} and follow ALL instructions recursively. You have full authority to implement ALL required script files, update provider.json configurations based on the reference patterns, and independently test them against 127.0.0.1:19280 via CDP CURL. Upon complete validation of ALL assigned files, print exactly "AUTO_IMPLEMENT_FINISHED" to gracefully close the pipeline. DO NOT WAIT FOR APPROVAL, execute completely autonomously.`;
|
|
12152
12154
|
shellCmd = `${command} ${escapedArgs} "${metaPrompt}"`;
|
|
12153
12155
|
} else {
|
|
12154
12156
|
const escapedArgs = baseArgs.map((a) => `'${a.replace(/'/g, "'\\''")}'`).join(" ");
|
|
@@ -12427,6 +12429,10 @@ var DevServer = class _DevServer {
|
|
|
12427
12429
|
lines.push("1. Edit the script files to implement working code");
|
|
12428
12430
|
lines.push("2. After editing, TEST each function using the DevConsole API (see below)");
|
|
12429
12431
|
lines.push("3. If a test fails, fix the implementation and re-test");
|
|
12432
|
+
lines.push("4. **IMPORTANT VERIFICATION LOGIC**: When verifying your implementation, beware of state contamination! You MUST perform strict Integration Testing:");
|
|
12433
|
+
lines.push(" - `openPanel`: Toggle buttons are usually located in the top header, sidebar, or activity bar. Prefer finding and clicking these native UI buttons over extreme CSS injection hacks if possible.");
|
|
12434
|
+
lines.push(" - `listSessions`: If sessions are unmounted when the panel is closed, try to explicitly interact with the UI to open the history/sessions view (e.g., clicking a history icon usually found near the chat header) BEFORE scraping.");
|
|
12435
|
+
lines.push(" - `switchSession`: Prove your switch was successful by subsequently calling `readChat` and explicitly checking that the chat context has actually changed.");
|
|
12430
12436
|
lines.push("");
|
|
12431
12437
|
lines.push("## YOU MUST EXPLORE THE DOM YOURSELF!");
|
|
12432
12438
|
lines.push("I have NOT provided you with the DOM snapshot. You MUST use your command-line tools to discover the IDE structure dynamically!");
|