@promptbook/node 0.112.0-131 → 0.112.0-133
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 +15 -7
- package/esm/index.es.js.map +1 -1
- package/esm/scripts/run-codex-prompts/runners/claude-code/ClaudeCodeRunner.d.ts +3 -1
- package/esm/src/book-3.0/cliAgentEnv.d.ts +1 -1
- package/esm/src/cli/cli-commands/coder/ThinkingLevel.d.ts +1 -1
- package/esm/src/version.d.ts +1 -1
- package/package.json +2 -2
- package/umd/index.umd.js +15 -7
- package/umd/index.umd.js.map +1 -1
- package/umd/scripts/run-codex-prompts/runners/claude-code/ClaudeCodeRunner.d.ts +3 -1
- package/umd/src/book-3.0/cliAgentEnv.d.ts +1 -1
- package/umd/src/cli/cli-commands/coder/ThinkingLevel.d.ts +1 -1
- package/umd/src/version.d.ts +1 -1
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import type { PromptRunOptions } from '../types/PromptRunOptions';
|
|
2
2
|
import type { PromptRunResult } from '../types/PromptRunResult';
|
|
3
3
|
import type { PromptRunner } from '../types/PromptRunner';
|
|
4
|
+
import type { ClaudeCodeRunnerOptions } from './ClaudeCodeRunnerOptions';
|
|
4
5
|
/**
|
|
5
6
|
* Runs prompts via the Claude Code CLI.
|
|
6
7
|
*/
|
|
7
8
|
export declare class ClaudeCodeRunner implements PromptRunner {
|
|
9
|
+
private readonly options;
|
|
8
10
|
readonly name = "claude-code";
|
|
9
11
|
/**
|
|
10
12
|
* Creates a new Claude Code runner.
|
|
11
13
|
*/
|
|
12
|
-
constructor();
|
|
14
|
+
constructor(options?: ClaudeCodeRunnerOptions);
|
|
13
15
|
/**
|
|
14
16
|
* Runs the prompt using Claude Code and parses usage output.
|
|
15
17
|
*/
|
|
@@ -9,7 +9,7 @@ export declare const CLI_AGENT_HARNESS_NAMES: readonly ["openai-codex", "github-
|
|
|
9
9
|
*
|
|
10
10
|
* @public exported from `@promptbook/node`
|
|
11
11
|
*/
|
|
12
|
-
export declare const CLI_AGENT_THINKING_LEVEL_VALUES: readonly ["low", "medium", "high", "xhigh"];
|
|
12
|
+
export declare const CLI_AGENT_THINKING_LEVEL_VALUES: readonly ["low", "medium", "high", "xhigh", "max"];
|
|
13
13
|
/**
|
|
14
14
|
* Environment variable used as the default runner identifier when `--harness` is omitted or not set in `CliAgent`.
|
|
15
15
|
*
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @private internal shared utility of `ptbk coder run`
|
|
5
5
|
*/
|
|
6
|
-
export declare const THINKING_LEVEL_VALUES: readonly ["low", "medium", "high", "xhigh"];
|
|
6
|
+
export declare const THINKING_LEVEL_VALUES: readonly ["low", "medium", "high", "xhigh", "max"];
|
|
7
7
|
/**
|
|
8
8
|
* Supported reasoning effort values for coding-agent runners with configurable thinking levels.
|
|
9
9
|
*
|
package/esm/src/version.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export declare const BOOK_LANGUAGE_VERSION: string_semantic_version;
|
|
|
15
15
|
export declare const PROMPTBOOK_ENGINE_VERSION: string_promptbook_version;
|
|
16
16
|
/**
|
|
17
17
|
* Represents the version string of the Promptbook engine.
|
|
18
|
-
* It follows semantic versioning (e.g., `0.112.0-
|
|
18
|
+
* It follows semantic versioning (e.g., `0.112.0-132`).
|
|
19
19
|
*
|
|
20
20
|
* @generated
|
|
21
21
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/node",
|
|
3
|
-
"version": "0.112.0-
|
|
3
|
+
"version": "0.112.0-133",
|
|
4
4
|
"description": "Promptbook: Create persistent AI agents that turn your company's scattered knowledge into action",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"types": "./esm/src/_packages/node.index.d.ts",
|
|
98
98
|
"typings": "./esm/src/_packages/node.index.d.ts",
|
|
99
99
|
"peerDependencies": {
|
|
100
|
-
"@promptbook/core": "0.112.0-
|
|
100
|
+
"@promptbook/core": "0.112.0-133"
|
|
101
101
|
},
|
|
102
102
|
"dependencies": {
|
|
103
103
|
"@mozilla/readability": "0.6.0",
|
package/umd/index.umd.js
CHANGED
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
* @generated
|
|
52
52
|
* @see https://github.com/webgptorg/promptbook
|
|
53
53
|
*/
|
|
54
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-
|
|
54
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-133';
|
|
55
55
|
/**
|
|
56
56
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
57
57
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -3017,17 +3017,21 @@
|
|
|
3017
3017
|
});
|
|
3018
3018
|
}
|
|
3019
3019
|
|
|
3020
|
+
/**
|
|
3021
|
+
* Base delimiter used for passing large prompts through stdin.
|
|
3022
|
+
*/
|
|
3023
|
+
const CLAUDE_PROMPT_DELIMITER = 'CLAUDE_PROMPT';
|
|
3020
3024
|
/**
|
|
3021
3025
|
* Builds the shell script that runs Claude Code with the prompt and coding context.
|
|
3022
3026
|
*/
|
|
3023
3027
|
function buildClaudeScript(options) {
|
|
3024
|
-
const
|
|
3028
|
+
const THINKING_LEVEL_ARGUMENT = options.thinkingLevel ? ` --effort ${options.thinkingLevel}` : '';
|
|
3025
3029
|
return spaceTrim((block) => `
|
|
3026
|
-
claude --allowedTools "Bash,Read,Edit,Write" --output-format json --print <<'${
|
|
3030
|
+
claude --allowedTools "Bash,Read,Edit,Write"${THINKING_LEVEL_ARGUMENT} --output-format json --print <<'${CLAUDE_PROMPT_DELIMITER}'
|
|
3027
3031
|
|
|
3028
3032
|
${block(options.prompt)}
|
|
3029
3033
|
|
|
3030
|
-
${
|
|
3034
|
+
${CLAUDE_PROMPT_DELIMITER}
|
|
3031
3035
|
`);
|
|
3032
3036
|
}
|
|
3033
3037
|
|
|
@@ -3163,7 +3167,8 @@
|
|
|
3163
3167
|
/**
|
|
3164
3168
|
* Creates a new Claude Code runner.
|
|
3165
3169
|
*/
|
|
3166
|
-
constructor() {
|
|
3170
|
+
constructor(options = {}) {
|
|
3171
|
+
this.options = options;
|
|
3167
3172
|
this.name = 'claude-code';
|
|
3168
3173
|
}
|
|
3169
3174
|
/**
|
|
@@ -3172,6 +3177,7 @@
|
|
|
3172
3177
|
async runPrompt(options) {
|
|
3173
3178
|
const scriptContent = buildClaudeScript({
|
|
3174
3179
|
prompt: options.prompt,
|
|
3180
|
+
thinkingLevel: this.options.thinkingLevel,
|
|
3175
3181
|
});
|
|
3176
3182
|
const output = await $runGoScriptWithOutput({
|
|
3177
3183
|
scriptPath: options.scriptPath,
|
|
@@ -4421,7 +4427,9 @@
|
|
|
4421
4427
|
}), actualRunnerModel);
|
|
4422
4428
|
}
|
|
4423
4429
|
if (agentName === 'claude-code') {
|
|
4424
|
-
return createRunnerResolution(options, new ClaudeCodeRunner(
|
|
4430
|
+
return createRunnerResolution(options, new ClaudeCodeRunner({
|
|
4431
|
+
thinkingLevel: options.thinkingLevel,
|
|
4432
|
+
}));
|
|
4425
4433
|
}
|
|
4426
4434
|
if (agentName === 'opencode') {
|
|
4427
4435
|
return createRunnerResolution(options, new OpencodeRunner({
|
|
@@ -31032,7 +31040,7 @@
|
|
|
31032
31040
|
*
|
|
31033
31041
|
* @public exported from `@promptbook/node`
|
|
31034
31042
|
*/
|
|
31035
|
-
const CLI_AGENT_THINKING_LEVEL_VALUES = ['low', 'medium', 'high', 'xhigh'];
|
|
31043
|
+
const CLI_AGENT_THINKING_LEVEL_VALUES = ['low', 'medium', 'high', 'xhigh', 'max'];
|
|
31036
31044
|
/**
|
|
31037
31045
|
* Environment variable used as the default runner identifier when `--harness` is omitted or not set in `CliAgent`.
|
|
31038
31046
|
*
|