@promptbook/node 0.114.0-0 → 0.114.0-2
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 +16 -15
- package/esm/index.es.js +11 -2
- package/esm/index.es.js.map +1 -1
- package/esm/src/book-2.0/book-language-documentation/BookLanguageManualDictionary.d.ts +1 -15
- package/esm/src/book-2.0/book-language-documentation/getBookLanguageManualCommitmentGroups.d.ts +1 -1
- package/esm/src/book-2.0/book-language-documentation/renderCommitmentCatalogSection.d.ts +0 -4
- package/esm/src/book-components/Chat/utils/renderMarkdown.d.ts +7 -0
- package/esm/src/cli/cli-commands/coder/agentCodingFile.d.ts +2 -3
- package/esm/src/cli/cli-commands/coder/ping.d.ts +13 -0
- package/esm/src/cli/cli-commands/coder/ping.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/coder.d.ts +1 -0
- package/package.json +2 -2
- package/umd/index.umd.js +11 -2
- package/umd/index.umd.js.map +1 -1
- package/umd/src/book-2.0/book-language-documentation/BookLanguageManualDictionary.d.ts +1 -15
- package/umd/src/book-2.0/book-language-documentation/getBookLanguageManualCommitmentGroups.d.ts +1 -1
- package/umd/src/book-2.0/book-language-documentation/renderCommitmentCatalogSection.d.ts +0 -4
- package/umd/src/book-components/Chat/utils/renderMarkdown.d.ts +7 -0
- package/umd/src/cli/cli-commands/coder/agentCodingFile.d.ts +2 -3
- package/umd/src/cli/cli-commands/coder/ping.d.ts +13 -0
- package/umd/src/cli/cli-commands/coder/ping.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/coder.d.ts +1 -0
package/README.md
CHANGED
|
@@ -562,26 +562,27 @@ ptbk coder verify
|
|
|
562
562
|
| ------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | ------ | ---- | ----- | ------------------------------------------------------------------------ |
|
|
563
563
|
| `ptbk coder init` | Creates `prompts/`, `prompts/done/`, the project-generic template files materialized in `prompts/templates/` (currently `common.md`), and a starter `AGENTS.md`; ensures `.env` contains `CODING_AGENT_GIT_NAME`, `CODING_AGENT_GIT_EMAIL`, and `CODING_AGENT_GIT_SIGNING_KEY`; adds helper coder scripts to `package.json`; ensures `.gitignore` contains `/.promptbook`; and configures `.vscode/settings.json` to save pasted prompt images into `prompts/screenshots/`. |
|
|
564
564
|
| `ptbk coder generate-boilerplates` | Creates new prompt markdown files with fresh emoji tags so you can quickly fill in coding tasks; `--template` accepts either a built-in alias or a markdown file path relative to the project root. |
|
|
565
|
-
| `ptbk coder run` | Picks the next ready prompt, appends optional context, runs it through the selected coding agent, can optionally verify each attempt with a shell test command and feed failing output back for retries, then marks success or failure, commits the result, and pushes only when `--auto-push` is enabled.
|
|
565
|
+
| `ptbk coder run` | Picks the next ready prompt, can run tests before coding to stop or repair pre-existing failures, appends optional context, runs it through the selected coding agent, can optionally verify each attempt with a shell test command and feed failing output back for retries, then marks success or failure, commits the result, and pushes only when `--auto-push` is enabled. |
|
|
566
566
|
| `ptbk coder find-refactor-candidates` | Scans the repository for oversized or overpacked files and writes prompt files for likely refactors; `--level <xlow | low | medium | high | xhigh | extreme>` ranges from a very benevolent scan to a very aggressive sweep. |
|
|
567
567
|
| `ptbk coder verify` | Walks through completed prompts, archives truly finished work, and adds follow-up repair prompts for unfinished results. |
|
|
568
568
|
|
|
569
569
|
#### Most useful `ptbk coder run` flags
|
|
570
570
|
|
|
571
|
-
| Flag | Purpose
|
|
572
|
-
| -------------------------- |
|
|
573
|
-
| `--harness <name>` | Selects the coding harness.
|
|
574
|
-
| `--model <model>` | Chooses the runner model; required for `openai-codex` and `gemini`, optional for `github-copilot`.
|
|
575
|
-
| `--context <text-or-file>` | Appends extra instructions inline or from a file like `AGENTS.md`.
|
|
576
|
-
| `--test <command>` | Runs a verification command after each prompt attempt and feeds failing output back for retries.
|
|
577
|
-
| `--
|
|
578
|
-
| `--
|
|
579
|
-
| `--
|
|
580
|
-
| `--
|
|
581
|
-
| `--
|
|
582
|
-
| `--
|
|
583
|
-
| `--
|
|
584
|
-
| `--auto-
|
|
571
|
+
| Flag | Purpose |
|
|
572
|
+
| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
573
|
+
| `--harness <name>` | Selects the coding harness. |
|
|
574
|
+
| `--model <model>` | Chooses the runner model; required for `openai-codex` and `gemini`, optional for `github-copilot`. |
|
|
575
|
+
| `--context <text-or-file>` | Appends extra instructions inline or from a file like `AGENTS.md`. |
|
|
576
|
+
| `--test <command>` | Runs a verification command after each prompt attempt and feeds failing output back for retries. |
|
|
577
|
+
| `--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`. |
|
|
578
|
+
| `--thinking-level <level>` | Sets reasoning effort for supported runners. |
|
|
579
|
+
| `--no-auto` | Waits for user confirmation before each prompt instead of running automatically through the queue. |
|
|
580
|
+
| `--ignore-git-changes` | Disables the clean-working-tree guard. |
|
|
581
|
+
| `--priority <n>` | Runs only prompts at or above the given priority. |
|
|
582
|
+
| `--dry-run` | Prints which prompts are ready instead of executing them. |
|
|
583
|
+
| `--allow-credits` | Lets OpenAI Codex spend credits when required. |
|
|
584
|
+
| `--auto-push` | Pushes each successful coding-agent commit to the configured remote. |
|
|
585
|
+
| `--auto-migrate` | Runs testing-server database migrations after each successful prompt. |
|
|
585
586
|
|
|
586
587
|
#### Typical usage pattern
|
|
587
588
|
|
package/esm/index.es.js
CHANGED
|
@@ -36,7 +36,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
|
|
|
36
36
|
* @generated
|
|
37
37
|
* @see https://github.com/webgptorg/promptbook
|
|
38
38
|
*/
|
|
39
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.114.0-
|
|
39
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.114.0-2';
|
|
40
40
|
/**
|
|
41
41
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
42
42
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -4314,6 +4314,7 @@ function buildCodexScript(options) {
|
|
|
4314
4314
|
` -c model_reasoning_effort="${thinkingLevel}" \\`,
|
|
4315
4315
|
` --ask-for-approval ${options.askForApproval} \\`,
|
|
4316
4316
|
` exec --model ${options.model} \\`,
|
|
4317
|
+
...(options.isMachineReadableProgressEnabled ? [' --json \\'] : []),
|
|
4317
4318
|
' --local-provider none \\',
|
|
4318
4319
|
` --sandbox ${options.sandbox} \\`,
|
|
4319
4320
|
` -C ${projectPath} \\`,
|
|
@@ -4630,6 +4631,10 @@ function matchesAnyPattern(text, patterns) {
|
|
|
4630
4631
|
* Output line that marks finished Codex usage summary.
|
|
4631
4632
|
*/
|
|
4632
4633
|
const CODEX_COMPLETION_LINE = /^\s*tokens used\b/i;
|
|
4634
|
+
/**
|
|
4635
|
+
* Output line that marks the completed Codex turn in JSONL output mode.
|
|
4636
|
+
*/
|
|
4637
|
+
const CODEX_JSON_COMPLETION_LINE = /^\s*\{"type":"turn\.(?:completed|failed)"/u;
|
|
4633
4638
|
/**
|
|
4634
4639
|
* Idle timeout after completion marker to capture trailing output.
|
|
4635
4640
|
*/
|
|
@@ -4706,6 +4711,7 @@ class OpenAiCodexRunner {
|
|
|
4706
4711
|
sandbox: this.options.sandbox,
|
|
4707
4712
|
askForApproval: this.options.askForApproval,
|
|
4708
4713
|
allowCredits: this.options.allowCredits,
|
|
4714
|
+
isMachineReadableProgressEnabled: this.options.isMachineReadableProgressEnabled,
|
|
4709
4715
|
codexCommand: this.options.codexCommand,
|
|
4710
4716
|
});
|
|
4711
4717
|
for (let retryIndex = 0;; retryIndex++) {
|
|
@@ -4720,7 +4726,9 @@ class OpenAiCodexRunner {
|
|
|
4720
4726
|
const output = await $runGoScriptUntilMarkerIdle({
|
|
4721
4727
|
scriptPath: options.scriptPath,
|
|
4722
4728
|
scriptContent,
|
|
4723
|
-
completionLineMatcher:
|
|
4729
|
+
completionLineMatcher: this.options.isMachineReadableProgressEnabled
|
|
4730
|
+
? CODEX_JSON_COMPLETION_LINE
|
|
4731
|
+
: CODEX_COMPLETION_LINE,
|
|
4724
4732
|
idleTimeoutMs: CODEX_COMPLETION_IDLE_MS,
|
|
4725
4733
|
logPath: options.logPath,
|
|
4726
4734
|
shouldPrintLiveOutput: options.shouldPrintLiveOutput,
|
|
@@ -4970,6 +4978,7 @@ function createOpenAiCodexRunnerResolution(options) {
|
|
|
4970
4978
|
sandbox: 'danger-full-access',
|
|
4971
4979
|
askForApproval: 'never',
|
|
4972
4980
|
allowCredits: options.allowCredits,
|
|
4981
|
+
isMachineReadableProgressEnabled: options.isMachineReadableProgressEnabled,
|
|
4973
4982
|
});
|
|
4974
4983
|
if (!options.allowCredits && options.isVerbose === true) {
|
|
4975
4984
|
console.info(colors.gray('OpenAI Codex credit spending is disabled. Use `--allow-credits` to explicitly opt in.'));
|