@adhdev/daemon-core 0.6.18 → 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 +1 -1
- package/src/daemon/dev-server.ts +11 -5
package/package.json
CHANGED
package/src/daemon/dev-server.ts
CHANGED
|
@@ -323,7 +323,7 @@ export class DevServer {
|
|
|
323
323
|
return;
|
|
324
324
|
}
|
|
325
325
|
|
|
326
|
-
const cdp = this.getCdp(scriptIdeType);
|
|
326
|
+
const cdp = this.getCdp(scriptIdeType || type);
|
|
327
327
|
if (!cdp) {
|
|
328
328
|
this.json(res, 503, { error: 'No CDP connection available' });
|
|
329
329
|
return;
|
|
@@ -2028,10 +2028,12 @@ export class DevServer {
|
|
|
2028
2028
|
let shellCmd: string;
|
|
2029
2029
|
|
|
2030
2030
|
if (command === 'claude') {
|
|
2031
|
-
// Claude Code: --print
|
|
2032
|
-
const args = [...baseArgs, '--
|
|
2031
|
+
// Claude Code: autonomous agent mode (no --print), skip permissions, prompt via meta-prompt
|
|
2032
|
+
const args = [...baseArgs, '--dangerously-skip-permissions'];
|
|
2033
|
+
if (model) args.push('--model', model);
|
|
2033
2034
|
const escapedArgs = args.map(a => `'${a.replace(/'/g, "'\\''")}'`).join(' ');
|
|
2034
|
-
|
|
2035
|
+
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.`;
|
|
2036
|
+
shellCmd = `${command} ${escapedArgs} -p "${metaPrompt}"`;
|
|
2035
2037
|
} else if (command === 'gemini') {
|
|
2036
2038
|
// Gemini CLI: non-interactive prompt mode
|
|
2037
2039
|
// We can't use @file syntax (causes Parts object parsing bug) or $(cat) (arg too long).
|
|
@@ -2051,7 +2053,7 @@ export class DevServer {
|
|
|
2051
2053
|
}
|
|
2052
2054
|
if (model) args.push('--model', model);
|
|
2053
2055
|
const escapedArgs = args.map(a => `'${a.replace(/'/g, "'\\''")}'`).join(' ');
|
|
2054
|
-
const metaPrompt = `Read the file at ${promptFile} and follow ALL
|
|
2056
|
+
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.`;
|
|
2055
2057
|
shellCmd = `${command} ${escapedArgs} "${metaPrompt}"`;
|
|
2056
2058
|
} else {
|
|
2057
2059
|
// Generic fallback: pipe prompt via stdin
|
|
@@ -2352,6 +2354,10 @@ export class DevServer {
|
|
|
2352
2354
|
lines.push('1. Edit the script files to implement working code');
|
|
2353
2355
|
lines.push('2. After editing, TEST each function using the DevConsole API (see below)');
|
|
2354
2356
|
lines.push('3. If a test fails, fix the implementation and re-test');
|
|
2357
|
+
lines.push('4. **IMPORTANT VERIFICATION LOGIC**: When verifying your implementation, beware of state contamination! You MUST perform strict Integration Testing:');
|
|
2358
|
+
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.');
|
|
2359
|
+
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.');
|
|
2360
|
+
lines.push(' - `switchSession`: Prove your switch was successful by subsequently calling `readChat` and explicitly checking that the chat context has actually changed.');
|
|
2355
2361
|
lines.push('');
|
|
2356
2362
|
|
|
2357
2363
|
// ── DevConsole API for verification ──
|