@promptbook/node 0.112.0-132 → 0.112.0-134

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 CHANGED
@@ -35,7 +35,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
35
35
  * @generated
36
36
  * @see https://github.com/webgptorg/promptbook
37
37
  */
38
- const PROMPTBOOK_ENGINE_VERSION = '0.112.0-132';
38
+ const PROMPTBOOK_ENGINE_VERSION = '0.112.0-134';
39
39
  /**
40
40
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
41
41
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -3001,17 +3001,21 @@ async function $runGoScriptWithOutput(options) {
3001
3001
  });
3002
3002
  }
3003
3003
 
3004
+ /**
3005
+ * Base delimiter used for passing large prompts through stdin.
3006
+ */
3007
+ const CLAUDE_PROMPT_DELIMITER = 'CLAUDE_PROMPT';
3004
3008
  /**
3005
3009
  * Builds the shell script that runs Claude Code with the prompt and coding context.
3006
3010
  */
3007
3011
  function buildClaudeScript(options) {
3008
- const delimiter = 'CLAUDE_PROMPT';
3012
+ const THINKING_LEVEL_ARGUMENT = options.thinkingLevel ? ` --effort ${options.thinkingLevel}` : '';
3009
3013
  return spaceTrim((block) => `
3010
- claude --allowedTools "Bash,Read,Edit,Write" --output-format json --print <<'${delimiter}'
3014
+ claude --allowedTools "Bash,Read,Edit,Write"${THINKING_LEVEL_ARGUMENT} --output-format json --print <<'${CLAUDE_PROMPT_DELIMITER}'
3011
3015
 
3012
3016
  ${block(options.prompt)}
3013
3017
 
3014
- ${delimiter}
3018
+ ${CLAUDE_PROMPT_DELIMITER}
3015
3019
  `);
3016
3020
  }
3017
3021
 
@@ -3147,7 +3151,8 @@ class ClaudeCodeRunner {
3147
3151
  /**
3148
3152
  * Creates a new Claude Code runner.
3149
3153
  */
3150
- constructor() {
3154
+ constructor(options = {}) {
3155
+ this.options = options;
3151
3156
  this.name = 'claude-code';
3152
3157
  }
3153
3158
  /**
@@ -3156,6 +3161,7 @@ class ClaudeCodeRunner {
3156
3161
  async runPrompt(options) {
3157
3162
  const scriptContent = buildClaudeScript({
3158
3163
  prompt: options.prompt,
3164
+ thinkingLevel: this.options.thinkingLevel,
3159
3165
  });
3160
3166
  const output = await $runGoScriptWithOutput({
3161
3167
  scriptPath: options.scriptPath,
@@ -4405,7 +4411,9 @@ function resolvePromptRunner(options) {
4405
4411
  }), actualRunnerModel);
4406
4412
  }
4407
4413
  if (agentName === 'claude-code') {
4408
- return createRunnerResolution(options, new ClaudeCodeRunner());
4414
+ return createRunnerResolution(options, new ClaudeCodeRunner({
4415
+ thinkingLevel: options.thinkingLevel,
4416
+ }));
4409
4417
  }
4410
4418
  if (agentName === 'opencode') {
4411
4419
  return createRunnerResolution(options, new OpencodeRunner({
@@ -31016,7 +31024,7 @@ const CLI_AGENT_HARNESS_NAMES = [
31016
31024
  *
31017
31025
  * @public exported from `@promptbook/node`
31018
31026
  */
31019
- const CLI_AGENT_THINKING_LEVEL_VALUES = ['low', 'medium', 'high', 'xhigh'];
31027
+ const CLI_AGENT_THINKING_LEVEL_VALUES = ['low', 'medium', 'high', 'xhigh', 'max'];
31020
31028
  /**
31021
31029
  * Environment variable used as the default runner identifier when `--harness` is omitted or not set in `CliAgent`.
31022
31030
  *