@promptbook/utils 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 +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 +1 -1
- package/umd/index.umd.js +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
|
@@ -807,26 +807,27 @@ ptbk coder verify
|
|
|
807
807
|
| ------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | ------ | ---- | ----- | ------------------------------------------------------------------------ |
|
|
808
808
|
| `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/`. |
|
|
809
809
|
| `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. |
|
|
810
|
-
| `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.
|
|
810
|
+
| `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. |
|
|
811
811
|
| `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. |
|
|
812
812
|
| `ptbk coder verify` | Walks through completed prompts, archives truly finished work, and adds follow-up repair prompts for unfinished results. |
|
|
813
813
|
|
|
814
814
|
#### Most useful `ptbk coder run` flags
|
|
815
815
|
|
|
816
|
-
| Flag | Purpose
|
|
817
|
-
| -------------------------- |
|
|
818
|
-
| `--harness <name>` | Selects the coding harness.
|
|
819
|
-
| `--model <model>` | Chooses the runner model; required for `openai-codex` and `gemini`, optional for `github-copilot`.
|
|
820
|
-
| `--context <text-or-file>` | Appends extra instructions inline or from a file like `AGENTS.md`.
|
|
821
|
-
| `--test <command>` | Runs a verification command after each prompt attempt and feeds failing output back for retries.
|
|
822
|
-
| `--
|
|
823
|
-
| `--
|
|
824
|
-
| `--
|
|
825
|
-
| `--
|
|
826
|
-
| `--
|
|
827
|
-
| `--
|
|
828
|
-
| `--
|
|
829
|
-
| `--auto-
|
|
816
|
+
| Flag | Purpose |
|
|
817
|
+
| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
818
|
+
| `--harness <name>` | Selects the coding harness. |
|
|
819
|
+
| `--model <model>` | Chooses the runner model; required for `openai-codex` and `gemini`, optional for `github-copilot`. |
|
|
820
|
+
| `--context <text-or-file>` | Appends extra instructions inline or from a file like `AGENTS.md`. |
|
|
821
|
+
| `--test <command>` | Runs a verification command after each prompt attempt and feeds failing output back for retries. |
|
|
822
|
+
| `--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`. |
|
|
823
|
+
| `--thinking-level <level>` | Sets reasoning effort for supported runners. |
|
|
824
|
+
| `--no-auto` | Waits for user confirmation before each prompt instead of running automatically through the queue. |
|
|
825
|
+
| `--ignore-git-changes` | Disables the clean-working-tree guard. |
|
|
826
|
+
| `--priority <n>` | Runs only prompts at or above the given priority. |
|
|
827
|
+
| `--dry-run` | Prints which prompts are ready instead of executing them. |
|
|
828
|
+
| `--allow-credits` | Lets OpenAI Codex spend credits when required. |
|
|
829
|
+
| `--auto-push` | Pushes each successful coding-agent commit to the configured remote. |
|
|
830
|
+
| `--auto-migrate` | Runs testing-server database migrations after each successful prompt. |
|
|
830
831
|
|
|
831
832
|
#### Typical usage pattern
|
|
832
833
|
|
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-2';
|
|
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
|
|
@@ -86,9 +86,7 @@ export type BookLanguageManualDictionary = {
|
|
|
86
86
|
readonly metadataLabels: {
|
|
87
87
|
readonly bookLanguageVersion: string;
|
|
88
88
|
readonly generatedAt: string;
|
|
89
|
-
readonly
|
|
90
|
-
readonly implementedCommitments: string;
|
|
91
|
-
readonly placeholderCommitments: string;
|
|
89
|
+
readonly commitmentCount: string;
|
|
92
90
|
};
|
|
93
91
|
/**
|
|
94
92
|
* Heading of the table of contents.
|
|
@@ -128,7 +126,6 @@ export type BookLanguageManualDictionary = {
|
|
|
128
126
|
readonly primitivesSections: {
|
|
129
127
|
readonly coreSyntax: BookLanguageManualChapter;
|
|
130
128
|
readonly references: BookLanguageManualChapter;
|
|
131
|
-
readonly keywordsTitle: string;
|
|
132
129
|
};
|
|
133
130
|
/**
|
|
134
131
|
* Suffixes distinguishing a server-specific catalog from the portable one.
|
|
@@ -141,18 +138,7 @@ export type BookLanguageManualDictionary = {
|
|
|
141
138
|
* Labels used in every commitment catalog entry.
|
|
142
139
|
*/
|
|
143
140
|
readonly commitmentLabels: {
|
|
144
|
-
readonly status: string;
|
|
145
141
|
readonly aliases: string;
|
|
146
|
-
readonly semantics: string;
|
|
147
|
-
readonly typeSchema: string;
|
|
148
|
-
readonly blockSchema: string;
|
|
149
|
-
readonly lowLevelNotice: string;
|
|
150
|
-
readonly usage: string;
|
|
151
|
-
readonly usageOccurrence: string;
|
|
152
|
-
readonly usageOccurrences: string;
|
|
153
|
-
readonly statusImplemented: string;
|
|
154
|
-
readonly statusPlaceholder: string;
|
|
155
|
-
readonly noAliases: string;
|
|
156
142
|
};
|
|
157
143
|
/**
|
|
158
144
|
* Labels used by end-to-end example sections.
|
package/esm/src/book-2.0/book-language-documentation/getBookLanguageManualCommitmentGroups.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export type BookLanguageManualCommitmentGroups = {
|
|
|
16
16
|
*/
|
|
17
17
|
readonly documented: ReadonlyArray<BookLanguageManualCommitmentGroup>;
|
|
18
18
|
/**
|
|
19
|
-
* Low-level
|
|
19
|
+
* Low-level commitments documented in their own closing chapter.
|
|
20
20
|
*/
|
|
21
21
|
readonly lowLevel: ReadonlyArray<BookLanguageManualCommitmentGroup>;
|
|
22
22
|
};
|
|
@@ -10,10 +10,6 @@ export type RenderCommitmentCatalogSectionOptions = {
|
|
|
10
10
|
* Grouped commitment definition with aliases.
|
|
11
11
|
*/
|
|
12
12
|
readonly groupedCommitment: BookLanguageManualCommitmentGroup;
|
|
13
|
-
/**
|
|
14
|
-
* Number of uses across the selected server agents.
|
|
15
|
-
*/
|
|
16
|
-
readonly usageCount: number;
|
|
17
13
|
/**
|
|
18
14
|
* Translated labels of the manual.
|
|
19
15
|
*/
|
|
@@ -25,6 +25,13 @@ export type MarkdownInlineReference = {
|
|
|
25
25
|
* Link target for the rendered reference.
|
|
26
26
|
*/
|
|
27
27
|
readonly href: string;
|
|
28
|
+
/**
|
|
29
|
+
* Markdown link destination prefixes that should render as this reference as well.
|
|
30
|
+
*
|
|
31
|
+
* This supports legacy links such as an Agents Server project file URL while keeping
|
|
32
|
+
* `reference` as the canonical `[[project]]` token.
|
|
33
|
+
*/
|
|
34
|
+
readonly sourceHrefPrefixes?: ReadonlyArray<string>;
|
|
28
35
|
/**
|
|
29
36
|
* Optional hover title for the rendered reference.
|
|
30
37
|
*/
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { string_markdown } from '../../../types/typeAliases';
|
|
1
2
|
/**
|
|
2
3
|
* Relative path to the Promptbook Coder quick-reference file initialized in project roots.
|
|
3
4
|
*
|
|
@@ -9,6 +10,4 @@ export declare const AGENT_CODING_FILE_PATH = "AGENT_CODING.md";
|
|
|
9
10
|
*
|
|
10
11
|
* @private internal utility of `ptbk coder`
|
|
11
12
|
*/
|
|
12
|
-
export declare function getDefaultCoderAgentCodingFileContent(
|
|
13
|
-
readonly packageJsonScripts: Readonly<Record<string, string>>;
|
|
14
|
-
}): string;
|
|
13
|
+
export declare function getDefaultCoderAgentCodingFileContent(): string_markdown;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Command as Program } from 'commander';
|
|
2
|
+
import type { $side_effect } from '../../../utils/organization/$side_effect';
|
|
3
|
+
/**
|
|
4
|
+
* Initializes `coder ping` command for Promptbook CLI utilities.
|
|
5
|
+
*
|
|
6
|
+
* The command makes one small, isolated harness/model call, prints its result
|
|
7
|
+
* and reports how long the harness/model turn took.
|
|
8
|
+
*
|
|
9
|
+
* Note: `$` is used to indicate that this function is not a pure function - it registers a command in the CLI.
|
|
10
|
+
*
|
|
11
|
+
* @private internal function of `promptbookCli`
|
|
12
|
+
*/
|
|
13
|
+
export declare function $initializeCoderPingCommand(program: Program): $side_effect;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -8,6 +8,7 @@ import type { $side_effect } from '../../utils/organization/$side_effect';
|
|
|
8
8
|
* - add: Add one ready-to-run prompt file to the queue
|
|
9
9
|
* - generate-boilerplates: Generate prompt boilerplate files
|
|
10
10
|
* - find-refactor-candidates: Find files that need refactoring
|
|
11
|
+
* - ping: Test one harness and model connection with a disposable task
|
|
11
12
|
* - run: Run coding prompts with AI agents
|
|
12
13
|
* - verify: Verify completed prompts
|
|
13
14
|
* - find-fresh-emoji-tags: Find unused emoji tags
|
package/package.json
CHANGED
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-2';
|
|
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
|
|
@@ -86,9 +86,7 @@ export type BookLanguageManualDictionary = {
|
|
|
86
86
|
readonly metadataLabels: {
|
|
87
87
|
readonly bookLanguageVersion: string;
|
|
88
88
|
readonly generatedAt: string;
|
|
89
|
-
readonly
|
|
90
|
-
readonly implementedCommitments: string;
|
|
91
|
-
readonly placeholderCommitments: string;
|
|
89
|
+
readonly commitmentCount: string;
|
|
92
90
|
};
|
|
93
91
|
/**
|
|
94
92
|
* Heading of the table of contents.
|
|
@@ -128,7 +126,6 @@ export type BookLanguageManualDictionary = {
|
|
|
128
126
|
readonly primitivesSections: {
|
|
129
127
|
readonly coreSyntax: BookLanguageManualChapter;
|
|
130
128
|
readonly references: BookLanguageManualChapter;
|
|
131
|
-
readonly keywordsTitle: string;
|
|
132
129
|
};
|
|
133
130
|
/**
|
|
134
131
|
* Suffixes distinguishing a server-specific catalog from the portable one.
|
|
@@ -141,18 +138,7 @@ export type BookLanguageManualDictionary = {
|
|
|
141
138
|
* Labels used in every commitment catalog entry.
|
|
142
139
|
*/
|
|
143
140
|
readonly commitmentLabels: {
|
|
144
|
-
readonly status: string;
|
|
145
141
|
readonly aliases: string;
|
|
146
|
-
readonly semantics: string;
|
|
147
|
-
readonly typeSchema: string;
|
|
148
|
-
readonly blockSchema: string;
|
|
149
|
-
readonly lowLevelNotice: string;
|
|
150
|
-
readonly usage: string;
|
|
151
|
-
readonly usageOccurrence: string;
|
|
152
|
-
readonly usageOccurrences: string;
|
|
153
|
-
readonly statusImplemented: string;
|
|
154
|
-
readonly statusPlaceholder: string;
|
|
155
|
-
readonly noAliases: string;
|
|
156
142
|
};
|
|
157
143
|
/**
|
|
158
144
|
* Labels used by end-to-end example sections.
|
package/umd/src/book-2.0/book-language-documentation/getBookLanguageManualCommitmentGroups.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export type BookLanguageManualCommitmentGroups = {
|
|
|
16
16
|
*/
|
|
17
17
|
readonly documented: ReadonlyArray<BookLanguageManualCommitmentGroup>;
|
|
18
18
|
/**
|
|
19
|
-
* Low-level
|
|
19
|
+
* Low-level commitments documented in their own closing chapter.
|
|
20
20
|
*/
|
|
21
21
|
readonly lowLevel: ReadonlyArray<BookLanguageManualCommitmentGroup>;
|
|
22
22
|
};
|
|
@@ -10,10 +10,6 @@ export type RenderCommitmentCatalogSectionOptions = {
|
|
|
10
10
|
* Grouped commitment definition with aliases.
|
|
11
11
|
*/
|
|
12
12
|
readonly groupedCommitment: BookLanguageManualCommitmentGroup;
|
|
13
|
-
/**
|
|
14
|
-
* Number of uses across the selected server agents.
|
|
15
|
-
*/
|
|
16
|
-
readonly usageCount: number;
|
|
17
13
|
/**
|
|
18
14
|
* Translated labels of the manual.
|
|
19
15
|
*/
|
|
@@ -25,6 +25,13 @@ export type MarkdownInlineReference = {
|
|
|
25
25
|
* Link target for the rendered reference.
|
|
26
26
|
*/
|
|
27
27
|
readonly href: string;
|
|
28
|
+
/**
|
|
29
|
+
* Markdown link destination prefixes that should render as this reference as well.
|
|
30
|
+
*
|
|
31
|
+
* This supports legacy links such as an Agents Server project file URL while keeping
|
|
32
|
+
* `reference` as the canonical `[[project]]` token.
|
|
33
|
+
*/
|
|
34
|
+
readonly sourceHrefPrefixes?: ReadonlyArray<string>;
|
|
28
35
|
/**
|
|
29
36
|
* Optional hover title for the rendered reference.
|
|
30
37
|
*/
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { string_markdown } from '../../../types/typeAliases';
|
|
1
2
|
/**
|
|
2
3
|
* Relative path to the Promptbook Coder quick-reference file initialized in project roots.
|
|
3
4
|
*
|
|
@@ -9,6 +10,4 @@ export declare const AGENT_CODING_FILE_PATH = "AGENT_CODING.md";
|
|
|
9
10
|
*
|
|
10
11
|
* @private internal utility of `ptbk coder`
|
|
11
12
|
*/
|
|
12
|
-
export declare function getDefaultCoderAgentCodingFileContent(
|
|
13
|
-
readonly packageJsonScripts: Readonly<Record<string, string>>;
|
|
14
|
-
}): string;
|
|
13
|
+
export declare function getDefaultCoderAgentCodingFileContent(): string_markdown;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Command as Program } from 'commander';
|
|
2
|
+
import type { $side_effect } from '../../../utils/organization/$side_effect';
|
|
3
|
+
/**
|
|
4
|
+
* Initializes `coder ping` command for Promptbook CLI utilities.
|
|
5
|
+
*
|
|
6
|
+
* The command makes one small, isolated harness/model call, prints its result
|
|
7
|
+
* and reports how long the harness/model turn took.
|
|
8
|
+
*
|
|
9
|
+
* Note: `$` is used to indicate that this function is not a pure function - it registers a command in the CLI.
|
|
10
|
+
*
|
|
11
|
+
* @private internal function of `promptbookCli`
|
|
12
|
+
*/
|
|
13
|
+
export declare function $initializeCoderPingCommand(program: Program): $side_effect;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -8,6 +8,7 @@ import type { $side_effect } from '../../utils/organization/$side_effect';
|
|
|
8
8
|
* - add: Add one ready-to-run prompt file to the queue
|
|
9
9
|
* - generate-boilerplates: Generate prompt boilerplate files
|
|
10
10
|
* - find-refactor-candidates: Find files that need refactoring
|
|
11
|
+
* - ping: Test one harness and model connection with a disposable task
|
|
11
12
|
* - run: Run coding prompts with AI agents
|
|
12
13
|
* - verify: Verify completed prompts
|
|
13
14
|
* - find-fresh-emoji-tags: Find unused emoji tags
|