@promptbook/types 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
@@ -670,7 +670,7 @@ In short: tools like Claude Code, Codex, or GitHub Copilot are the **engines**;
670
670
  5. Promptbook Coder marks the prompt as done `[x]`, records runner metadata, then stages, commits, and pushes the resulting changes.
671
671
  6. `ptbk coder verify` reviews completed prompts, archives finished files to `prompts/done/`, and appends a repair prompt when more work is needed.
672
672
 
673
- 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.
673
+ 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.
674
674
 
675
675
  #### Features
676
676
 
@@ -678,7 +678,7 @@ Prompts marked with `[-]` are not ready yet, prompts containing `@@@` are treate
678
678
  - **Context injection:** `--agent agents/coding/developer.book --context AGENTS.md` or inline extra instructions
679
679
  - **Reasoning control:** `--thinking-level low|medium|high|xhigh` for supported runners
680
680
  - **Unattended or interactive runs:** default auto mode, or `--no-auto` to wait for user confirmation before each prompt
681
- - **Git safety:** clean working tree check by default, optional `--ignore-git-changes`
681
+ - **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
682
682
  - **Opt-in remote pushes:** commits stay local unless you explicitly pass `--auto-push`
683
683
  - **Prompt triage:** `--priority` to process only more important tasks first
684
684
  - **Failure logging:** failed runs write a neighboring `.error.log`
@@ -699,7 +699,7 @@ npx ts-node ./src/cli/test/ptbk.ts coder run --harness github-copilot --model gp
699
699
 
700
700
  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
701
701
 
702
- 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
702
+ 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
703
703
 
704
704
  npx ts-node ./src/cli/test/ptbk.ts coder find-refactor-candidates
705
705
 
@@ -725,7 +725,7 @@ ptbk coder run --harness github-copilot --model gpt-5.4 --thinking-level xhigh -
725
725
 
726
726
  ptbk coder run --harness github-copilot --model gpt-5.4 --thinking-level xhigh --agent agents/coding/developer.book --context AGENTS.md --auto-push
727
727
 
728
- 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
728
+ 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
729
729
 
730
730
  ptbk coder find-refactor-candidates
731
731
 
@@ -757,7 +757,7 @@ ptbk coder verify
757
757
  | `--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`. |
758
758
  | `--thinking-level <level>` | Sets reasoning effort for supported runners. |
759
759
  | `--no-auto` | Waits for user confirmation before each prompt instead of running automatically through the queue. |
760
- | `--ignore-git-changes` | Disables the clean-working-tree guard. |
760
+ | `--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. |
761
761
  | `--priority <n>` | Runs only prompts at or above the given priority. |
762
762
  | `--dry-run` | Prints which prompts are ready instead of executing them. |
763
763
  | `--allow-credits` | Lets OpenAI Codex spend credits when required. |
@@ -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/types",
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,
@@ -96,6 +96,6 @@
96
96
  "types": "./esm/src/_packages/types.index.d.ts",
97
97
  "typings": "./esm/src/_packages/types.index.d.ts",
98
98
  "peerDependencies": {
99
- "@promptbook/core": "0.114.0-19"
99
+ "@promptbook/core": "0.114.0-20"
100
100
  }
101
101
  }
@@ -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
  */