@promptbook/node 0.113.0-2 → 0.113.0-4
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/esm/index.es.js +7 -4
- package/esm/index.es.js.map +1 -1
- package/esm/src/version.d.ts +1 -1
- package/package.json +2 -2
- package/umd/index.umd.js +7 -4
- package/umd/index.umd.js.map +1 -1
- package/umd/src/version.d.ts +1 -1
package/esm/index.es.js
CHANGED
|
@@ -36,7 +36,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
|
|
|
36
36
|
* @generated
|
|
37
37
|
* @see https://github.com/webgptorg/promptbook
|
|
38
38
|
*/
|
|
39
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.113.0-
|
|
39
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.113.0-4';
|
|
40
40
|
/**
|
|
41
41
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
42
42
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -3010,9 +3010,10 @@ const CLAUDE_PROMPT_DELIMITER = 'CLAUDE_PROMPT';
|
|
|
3010
3010
|
* Builds the shell script that runs Claude Code with the prompt and coding context.
|
|
3011
3011
|
*/
|
|
3012
3012
|
function buildClaudeScript(options) {
|
|
3013
|
+
const MODEL_ARGUMENT = options.model ? ` --model ${options.model}` : '';
|
|
3013
3014
|
const THINKING_LEVEL_ARGUMENT = options.thinkingLevel ? ` --effort ${options.thinkingLevel}` : '';
|
|
3014
3015
|
return spaceTrim((block) => `
|
|
3015
|
-
claude --allowedTools "Bash,Read,Edit,Write"${THINKING_LEVEL_ARGUMENT} --output-format json --print <<'${CLAUDE_PROMPT_DELIMITER}'
|
|
3016
|
+
claude --allowedTools "Bash,Read,Edit,Write"${MODEL_ARGUMENT}${THINKING_LEVEL_ARGUMENT} --output-format json --print <<'${CLAUDE_PROMPT_DELIMITER}'
|
|
3016
3017
|
|
|
3017
3018
|
${block(options.prompt)}
|
|
3018
3019
|
|
|
@@ -3162,6 +3163,7 @@ class ClaudeCodeRunner {
|
|
|
3162
3163
|
async runPrompt(options) {
|
|
3163
3164
|
const scriptContent = buildClaudeScript({
|
|
3164
3165
|
prompt: options.prompt,
|
|
3166
|
+
model: this.options.model,
|
|
3165
3167
|
thinkingLevel: this.options.thinkingLevel,
|
|
3166
3168
|
});
|
|
3167
3169
|
const output = await $runGoScriptWithOutput({
|
|
@@ -4422,8 +4424,9 @@ function resolvePromptRunner(options) {
|
|
|
4422
4424
|
}
|
|
4423
4425
|
if (agentName === 'claude-code') {
|
|
4424
4426
|
return createRunnerResolution(options, new ClaudeCodeRunner({
|
|
4427
|
+
model: options.model,
|
|
4425
4428
|
thinkingLevel: options.thinkingLevel,
|
|
4426
|
-
}));
|
|
4429
|
+
}), options.model);
|
|
4427
4430
|
}
|
|
4428
4431
|
if (agentName === 'opencode') {
|
|
4429
4432
|
return createRunnerResolution(options, new OpencodeRunner({
|
|
@@ -4497,7 +4500,7 @@ function getRunnerMetadata(options, actualRunnerModel) {
|
|
|
4497
4500
|
if (options.agentName === 'cline') {
|
|
4498
4501
|
return { runnerName, modelName: CLINE_MODEL };
|
|
4499
4502
|
}
|
|
4500
|
-
if (options.agentName === 'opencode') {
|
|
4503
|
+
if (options.agentName === 'opencode' || options.agentName === 'claude-code') {
|
|
4501
4504
|
return { runnerName, modelName: options.model };
|
|
4502
4505
|
}
|
|
4503
4506
|
return { runnerName };
|