@promptbook/javascript 0.114.0-19 → 0.114.0-20
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/README.md +5 -5
- package/esm/index.es.js +1 -1
- package/esm/src/cli/cli-commands/coder/GitChangesMode.d.ts +28 -0
- package/esm/src/cli/cli-commands/common/promptRunnerCliOptions.d.ts +9 -2
- package/esm/src/version.d.ts +1 -1
- package/package.json +2 -2
- package/umd/index.umd.js +1 -1
- package/umd/src/cli/cli-commands/coder/GitChangesMode.d.ts +28 -0
- package/umd/src/cli/cli-commands/common/promptRunnerCliOptions.d.ts +9 -2
- package/umd/src/version.d.ts +1 -1
package/README.md
CHANGED
|
@@ -470,7 +470,7 @@ In short: tools like Claude Code, Codex, or GitHub Copilot are the **engines**;
|
|
|
470
470
|
5. Promptbook Coder marks the prompt as done `[x]`, records runner metadata, then stages, commits, and pushes the resulting changes.
|
|
471
471
|
6. `ptbk coder verify` reviews completed prompts, archives finished files to `prompts/done/`, and appends a repair prompt when more work is needed.
|
|
472
472
|
|
|
473
|
-
Prompts marked with `[-]` are not ready yet, prompts containing `@@@` are treated as not fully written, and prompts with more `!` markers have higher priority. A prompt left as `[^]` was interrupted in the middle of its implementation — the in-progress status is never reverted, so a killed or crashed coder always leaves that signal behind.
|
|
473
|
+
Prompts marked with `[-]` are not ready yet, prompts containing `@@@` are treated as not fully written, and prompts with more `!` markers have higher priority. A prompt left as `[^]` was interrupted in the middle of its implementation — the in-progress status is never reverted, so a killed or crashed coder always leaves that signal behind, and `--git-changes continue` resumes exactly that prompt with its uncommitted changes still in place.
|
|
474
474
|
|
|
475
475
|
#### Features
|
|
476
476
|
|
|
@@ -478,7 +478,7 @@ Prompts marked with `[-]` are not ready yet, prompts containing `@@@` are treate
|
|
|
478
478
|
- **Context injection:** `--agent agents/coding/developer.book --context AGENTS.md` or inline extra instructions
|
|
479
479
|
- **Reasoning control:** `--thinking-level low|medium|high|xhigh` for supported runners
|
|
480
480
|
- **Unattended or interactive runs:** default auto mode, or `--no-auto` to wait for user confirmation before each prompt
|
|
481
|
-
- **Git safety:** clean working tree check by default,
|
|
481
|
+
- **Git safety:** clean working tree check by default, or `--git-changes ignore` to keep the changes and `--git-changes continue` to resume an interrupted prompt
|
|
482
482
|
- **Opt-in remote pushes:** commits stay local unless you explicitly pass `--auto-push`
|
|
483
483
|
- **Prompt triage:** `--priority` to process only more important tasks first
|
|
484
484
|
- **Failure logging:** failed runs write a neighboring `.error.log`
|
|
@@ -499,7 +499,7 @@ npx ts-node ./src/cli/test/ptbk.ts coder run --harness github-copilot --model gp
|
|
|
499
499
|
|
|
500
500
|
npx ts-node ./src/cli/test/ptbk.ts coder run --harness github-copilot --model gpt-5.4 --thinking-level xhigh --agent agents/coding/developer.book --context AGENTS.md --auto-push
|
|
501
501
|
|
|
502
|
-
npx ts-node ./src/cli/test/ptbk.ts coder run --harness github-copilot --model gpt-5.4 --thinking-level xhigh --agent agents/coding/developer.book --context AGENTS.md --
|
|
502
|
+
npx ts-node ./src/cli/test/ptbk.ts coder run --harness github-copilot --model gpt-5.4 --thinking-level xhigh --agent agents/coding/developer.book --context AGENTS.md --git-changes ignore
|
|
503
503
|
|
|
504
504
|
npx ts-node ./src/cli/test/ptbk.ts coder find-refactor-candidates
|
|
505
505
|
|
|
@@ -525,7 +525,7 @@ ptbk coder run --harness github-copilot --model gpt-5.4 --thinking-level xhigh -
|
|
|
525
525
|
|
|
526
526
|
ptbk coder run --harness github-copilot --model gpt-5.4 --thinking-level xhigh --agent agents/coding/developer.book --context AGENTS.md --auto-push
|
|
527
527
|
|
|
528
|
-
ptbk coder run --harness github-copilot --model gpt-5.4 --thinking-level xhigh --agent agents/coding/developer.book --context AGENTS.md --test npm run test --
|
|
528
|
+
ptbk coder run --harness github-copilot --model gpt-5.4 --thinking-level xhigh --agent agents/coding/developer.book --context AGENTS.md --test npm run test --git-changes ignore
|
|
529
529
|
|
|
530
530
|
ptbk coder find-refactor-candidates
|
|
531
531
|
|
|
@@ -557,7 +557,7 @@ ptbk coder verify
|
|
|
557
557
|
| `--test-before <mode>` | Runs tests before coding: `no` (default), `yes-and-fail` (stop with results), or `yes-and-fix` (create one repair prompt first); defaults to `npm test` when enabled without `--test`. |
|
|
558
558
|
| `--thinking-level <level>` | Sets reasoning effort for supported runners. |
|
|
559
559
|
| `--no-auto` | Waits for user confirmation before each prompt instead of running automatically through the queue. |
|
|
560
|
-
| `--
|
|
560
|
+
| `--git-changes <mode>` | Decides what happens with a dirty working tree: `fail` (default), `ignore` to keep the changes, or `continue` to resume the single interrupted `[^]` prompt with them. |
|
|
561
561
|
| `--priority <n>` | Runs only prompts at or above the given priority. |
|
|
562
562
|
| `--dry-run` | Prints which prompts are ready instead of executing them. |
|
|
563
563
|
| `--allow-credits` | Lets OpenAI Codex spend credits when required. |
|
package/esm/index.es.js
CHANGED
|
@@ -17,7 +17,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
|
|
|
17
17
|
* @generated
|
|
18
18
|
* @see https://github.com/webgptorg/promptbook
|
|
19
19
|
*/
|
|
20
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.114.0-
|
|
20
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.114.0-20';
|
|
21
21
|
/**
|
|
22
22
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
23
23
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Supported values of the `--git-changes` option, which decides what happens with a dirty working tree.
|
|
3
|
+
*
|
|
4
|
+
* - `fail` — refuse to start while the working tree has uncommitted changes
|
|
5
|
+
* - `ignore` — start anyway and leave the uncommitted changes where they are
|
|
6
|
+
* - `continue` — resume the single prompt which was left in the middle of its implementation
|
|
7
|
+
*
|
|
8
|
+
* @private internal shared utility of `ptbk coder run`
|
|
9
|
+
*/
|
|
10
|
+
export declare const GIT_CHANGES_MODE_VALUES: readonly ["fail", "ignore", "continue"];
|
|
11
|
+
/**
|
|
12
|
+
* Behavior requested for a working tree which has uncommitted changes.
|
|
13
|
+
*
|
|
14
|
+
* @private internal shared utility of `ptbk coder run`
|
|
15
|
+
*/
|
|
16
|
+
export type GitChangesMode = (typeof GIT_CHANGES_MODE_VALUES)[number];
|
|
17
|
+
/**
|
|
18
|
+
* Mode applied when `--git-changes` is not used at all.
|
|
19
|
+
*
|
|
20
|
+
* @private internal shared utility of `ptbk coder run`
|
|
21
|
+
*/
|
|
22
|
+
export declare const DEFAULT_GIT_CHANGES_MODE: GitChangesMode;
|
|
23
|
+
/**
|
|
24
|
+
* Checks whether a value is a supported `--git-changes` mode.
|
|
25
|
+
*
|
|
26
|
+
* @private internal shared utility of `ptbk coder run`
|
|
27
|
+
*/
|
|
28
|
+
export declare function isGitChangesMode(value: string): value is GitChangesMode;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Command as Program } from 'commander';
|
|
2
2
|
import { PTBK_HARNESS_ENV, PTBK_MODEL_ENV, PTBK_THINKING_LEVEL_ENV } from '../../../book-3.0/cliAgentEnv';
|
|
3
|
+
import type { GitChangesMode } from '../coder/GitChangesMode';
|
|
3
4
|
import type { ThinkingLevel } from '../coder/ThinkingLevel';
|
|
4
5
|
export { PTBK_HARNESS_ENV, PTBK_MODEL_ENV, PTBK_THINKING_LEVEL_ENV };
|
|
5
6
|
/**
|
|
@@ -25,7 +26,7 @@ export type PromptRunnerCliOptions = {
|
|
|
25
26
|
readonly ui: boolean;
|
|
26
27
|
readonly thinkingLevel?: ThinkingLevel;
|
|
27
28
|
readonly commit: boolean;
|
|
28
|
-
readonly
|
|
29
|
+
readonly gitChanges: GitChangesMode;
|
|
29
30
|
readonly allowCredits: boolean;
|
|
30
31
|
readonly normalizeLineEndings: boolean;
|
|
31
32
|
readonly autoPush: boolean;
|
|
@@ -48,7 +49,7 @@ export type NormalizedPromptRunnerCliOptions = {
|
|
|
48
49
|
readonly noUi: boolean;
|
|
49
50
|
readonly thinkingLevel?: ThinkingLevel;
|
|
50
51
|
readonly noCommit: boolean;
|
|
51
|
-
readonly
|
|
52
|
+
readonly gitChanges: GitChangesMode;
|
|
52
53
|
readonly allowCredits: boolean;
|
|
53
54
|
readonly normalizeLineEndings: boolean;
|
|
54
55
|
readonly autoPush: boolean;
|
|
@@ -78,6 +79,12 @@ export declare const PROMPT_RUNNER_HARNESS_OPTION_DESCRIPTION = "Select runner:
|
|
|
78
79
|
* @private internal utility of `promptbookCli`
|
|
79
80
|
*/
|
|
80
81
|
export declare const PROMPT_RUNNER_MODEL_OPTION_DESCRIPTION: string;
|
|
82
|
+
/**
|
|
83
|
+
* Commander description for the `--git-changes` option.
|
|
84
|
+
*
|
|
85
|
+
* @private internal utility of `promptbookCli`
|
|
86
|
+
*/
|
|
87
|
+
export declare const GIT_CHANGES_OPTION_DESCRIPTION: string;
|
|
81
88
|
/**
|
|
82
89
|
* Registers runner selection flags on a command.
|
|
83
90
|
*
|
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.114.0-
|
|
18
|
+
* It follows semantic versioning (e.g., `0.114.0-19`).
|
|
19
19
|
*
|
|
20
20
|
* @generated
|
|
21
21
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/javascript",
|
|
3
|
-
"version": "0.114.0-
|
|
3
|
+
"version": "0.114.0-20",
|
|
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,
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"types": "./esm/src/_packages/javascript.index.d.ts",
|
|
99
99
|
"typings": "./esm/src/_packages/javascript.index.d.ts",
|
|
100
100
|
"peerDependencies": {
|
|
101
|
-
"@promptbook/core": "0.114.0-
|
|
101
|
+
"@promptbook/core": "0.114.0-20"
|
|
102
102
|
},
|
|
103
103
|
"dependencies": {
|
|
104
104
|
"crypto-js": "4.2.0",
|
package/umd/index.umd.js
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
* @generated
|
|
24
24
|
* @see https://github.com/webgptorg/promptbook
|
|
25
25
|
*/
|
|
26
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.114.0-
|
|
26
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.114.0-20';
|
|
27
27
|
/**
|
|
28
28
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
29
29
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Supported values of the `--git-changes` option, which decides what happens with a dirty working tree.
|
|
3
|
+
*
|
|
4
|
+
* - `fail` — refuse to start while the working tree has uncommitted changes
|
|
5
|
+
* - `ignore` — start anyway and leave the uncommitted changes where they are
|
|
6
|
+
* - `continue` — resume the single prompt which was left in the middle of its implementation
|
|
7
|
+
*
|
|
8
|
+
* @private internal shared utility of `ptbk coder run`
|
|
9
|
+
*/
|
|
10
|
+
export declare const GIT_CHANGES_MODE_VALUES: readonly ["fail", "ignore", "continue"];
|
|
11
|
+
/**
|
|
12
|
+
* Behavior requested for a working tree which has uncommitted changes.
|
|
13
|
+
*
|
|
14
|
+
* @private internal shared utility of `ptbk coder run`
|
|
15
|
+
*/
|
|
16
|
+
export type GitChangesMode = (typeof GIT_CHANGES_MODE_VALUES)[number];
|
|
17
|
+
/**
|
|
18
|
+
* Mode applied when `--git-changes` is not used at all.
|
|
19
|
+
*
|
|
20
|
+
* @private internal shared utility of `ptbk coder run`
|
|
21
|
+
*/
|
|
22
|
+
export declare const DEFAULT_GIT_CHANGES_MODE: GitChangesMode;
|
|
23
|
+
/**
|
|
24
|
+
* Checks whether a value is a supported `--git-changes` mode.
|
|
25
|
+
*
|
|
26
|
+
* @private internal shared utility of `ptbk coder run`
|
|
27
|
+
*/
|
|
28
|
+
export declare function isGitChangesMode(value: string): value is GitChangesMode;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Command as Program } from 'commander';
|
|
2
2
|
import { PTBK_HARNESS_ENV, PTBK_MODEL_ENV, PTBK_THINKING_LEVEL_ENV } from '../../../book-3.0/cliAgentEnv';
|
|
3
|
+
import type { GitChangesMode } from '../coder/GitChangesMode';
|
|
3
4
|
import type { ThinkingLevel } from '../coder/ThinkingLevel';
|
|
4
5
|
export { PTBK_HARNESS_ENV, PTBK_MODEL_ENV, PTBK_THINKING_LEVEL_ENV };
|
|
5
6
|
/**
|
|
@@ -25,7 +26,7 @@ export type PromptRunnerCliOptions = {
|
|
|
25
26
|
readonly ui: boolean;
|
|
26
27
|
readonly thinkingLevel?: ThinkingLevel;
|
|
27
28
|
readonly commit: boolean;
|
|
28
|
-
readonly
|
|
29
|
+
readonly gitChanges: GitChangesMode;
|
|
29
30
|
readonly allowCredits: boolean;
|
|
30
31
|
readonly normalizeLineEndings: boolean;
|
|
31
32
|
readonly autoPush: boolean;
|
|
@@ -48,7 +49,7 @@ export type NormalizedPromptRunnerCliOptions = {
|
|
|
48
49
|
readonly noUi: boolean;
|
|
49
50
|
readonly thinkingLevel?: ThinkingLevel;
|
|
50
51
|
readonly noCommit: boolean;
|
|
51
|
-
readonly
|
|
52
|
+
readonly gitChanges: GitChangesMode;
|
|
52
53
|
readonly allowCredits: boolean;
|
|
53
54
|
readonly normalizeLineEndings: boolean;
|
|
54
55
|
readonly autoPush: boolean;
|
|
@@ -78,6 +79,12 @@ export declare const PROMPT_RUNNER_HARNESS_OPTION_DESCRIPTION = "Select runner:
|
|
|
78
79
|
* @private internal utility of `promptbookCli`
|
|
79
80
|
*/
|
|
80
81
|
export declare const PROMPT_RUNNER_MODEL_OPTION_DESCRIPTION: string;
|
|
82
|
+
/**
|
|
83
|
+
* Commander description for the `--git-changes` option.
|
|
84
|
+
*
|
|
85
|
+
* @private internal utility of `promptbookCli`
|
|
86
|
+
*/
|
|
87
|
+
export declare const GIT_CHANGES_OPTION_DESCRIPTION: string;
|
|
81
88
|
/**
|
|
82
89
|
* Registers runner selection flags on a command.
|
|
83
90
|
*
|
package/umd/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.114.0-
|
|
18
|
+
* It follows semantic versioning (e.g., `0.114.0-19`).
|
|
19
19
|
*
|
|
20
20
|
* @generated
|
|
21
21
|
*/
|