@promptbook/markdown-utils 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 CHANGED
@@ -510,7 +510,7 @@ In short: tools like Claude Code, Codex, or GitHub Copilot are the **engines**;
510
510
  5. Promptbook Coder marks the prompt as done `[x]`, records runner metadata, then stages, commits, and pushes the resulting changes.
511
511
  6. `ptbk coder verify` reviews completed prompts, archives finished files to `prompts/done/`, and appends a repair prompt when more work is needed.
512
512
 
513
- 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.
513
+ 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.
514
514
 
515
515
  #### Features
516
516
 
@@ -518,7 +518,7 @@ Prompts marked with `[-]` are not ready yet, prompts containing `@@@` are treate
518
518
  - **Context injection:** `--agent agents/coding/developer.book --context AGENTS.md` or inline extra instructions
519
519
  - **Reasoning control:** `--thinking-level low|medium|high|xhigh` for supported runners
520
520
  - **Unattended or interactive runs:** default auto mode, or `--no-auto` to wait for user confirmation before each prompt
521
- - **Git safety:** clean working tree check by default, optional `--ignore-git-changes`
521
+ - **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
522
522
  - **Opt-in remote pushes:** commits stay local unless you explicitly pass `--auto-push`
523
523
  - **Prompt triage:** `--priority` to process only more important tasks first
524
524
  - **Failure logging:** failed runs write a neighboring `.error.log`
@@ -539,7 +539,7 @@ npx ts-node ./src/cli/test/ptbk.ts coder run --harness github-copilot --model gp
539
539
 
540
540
  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
541
541
 
542
- 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 --ignore-git-changes
542
+ 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
543
543
 
544
544
  npx ts-node ./src/cli/test/ptbk.ts coder find-refactor-candidates
545
545
 
@@ -565,7 +565,7 @@ ptbk coder run --harness github-copilot --model gpt-5.4 --thinking-level xhigh -
565
565
 
566
566
  ptbk coder run --harness github-copilot --model gpt-5.4 --thinking-level xhigh --agent agents/coding/developer.book --context AGENTS.md --auto-push
567
567
 
568
- 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 --ignore-git-changes
568
+ 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
569
569
 
570
570
  ptbk coder find-refactor-candidates
571
571
 
@@ -597,7 +597,7 @@ ptbk coder verify
597
597
  | `--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`. |
598
598
  | `--thinking-level <level>` | Sets reasoning effort for supported runners. |
599
599
  | `--no-auto` | Waits for user confirmation before each prompt instead of running automatically through the queue. |
600
- | `--ignore-git-changes` | Disables the clean-working-tree guard. |
600
+ | `--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. |
601
601
  | `--priority <n>` | Runs only prompts at or above the given priority. |
602
602
  | `--dry-run` | Prints which prompts are ready instead of executing them. |
603
603
  | `--allow-credits` | Lets OpenAI Codex spend credits when required. |
package/esm/index.es.js CHANGED
@@ -22,7 +22,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
22
22
  * @generated
23
23
  * @see https://github.com/webgptorg/promptbook
24
24
  */
25
- const PROMPTBOOK_ENGINE_VERSION = '0.114.0-19';
25
+ const PROMPTBOOK_ENGINE_VERSION = '0.114.0-20';
26
26
  /**
27
27
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
28
28
  * 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 ignoreGitChanges: boolean;
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 ignoreGitChanges: boolean;
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
  *
@@ -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`).
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/markdown-utils",
3
- "version": "0.114.0-19",
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,
package/umd/index.umd.js CHANGED
@@ -25,7 +25,7 @@
25
25
  * @generated
26
26
  * @see https://github.com/webgptorg/promptbook
27
27
  */
28
- const PROMPTBOOK_ENGINE_VERSION = '0.114.0-19';
28
+ const PROMPTBOOK_ENGINE_VERSION = '0.114.0-20';
29
29
  /**
30
30
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
31
31
  * 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 ignoreGitChanges: boolean;
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 ignoreGitChanges: boolean;
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
  *
@@ -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`).
18
+ * It follows semantic versioning (e.g., `0.114.0-19`).
19
19
  *
20
20
  * @generated
21
21
  */