@promptbook/cli 0.114.0-35 → 0.114.0-38
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/apps/agents-server/package.json +1 -1
- package/apps/agents-server/scripts/build-agents-server.js +4 -0
- package/apps/agents-server/scripts/build-e2e.js +1 -1
- package/apps/agents-server/src/app/swagger/SwaggerPageClient.tsx +35 -19
- package/apps/agents-server/src/types/swagger-ui-dist.d.ts +5 -0
- package/esm/index.es.js +363 -98
- package/esm/index.es.js.map +1 -1
- package/esm/scripts/run-codex-prompts/common/resolveCoderAgent.d.ts +7 -0
- package/esm/scripts/run-codex-prompts/main/resolvePromptRunner.d.ts +5 -8
- package/esm/scripts/run-codex-prompts/main/runPromptRound.d.ts +2 -4
- package/esm/scripts/run-codex-prompts/prompts/buildPromptRunTraceContent.d.ts +5 -17
- package/esm/scripts/run-codex-prompts/prompts/buildPromptStatusDetails.d.ts +3 -15
- package/esm/scripts/run-codex-prompts/prompts/formatRunnerSignature.d.ts +14 -1
- package/esm/scripts/run-codex-prompts/prompts/markPromptFailed.d.ts +2 -9
- package/esm/src/book-2.0/agent-source/createAgentModelRequirements.deduplication.test.d.ts +1 -0
- package/esm/src/book-2.0/agent-source/deduplicateSystemMessage.d.ts +14 -0
- package/esm/src/book-2.0/agent-source/deduplicateSystemMessage.test.d.ts +1 -0
- package/esm/src/cli/$initializePromptbookCliProgram.d.ts +8 -0
- package/esm/src/version.d.ts +1 -1
- package/package.json +2 -3
- package/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments.ts +3 -2
- package/src/book-2.0/agent-source/deduplicateSystemMessage.ts +327 -0
- package/src/cli/$initializePromptbookCliProgram.ts +87 -0
- package/src/cli/promptbookCli.ts +2 -87
- package/src/other/templates/getTemplatesPipelineCollection.ts +787 -841
- package/src/version.ts +2 -2
- package/src/versions.txt +3 -0
- package/umd/index.umd.js +363 -98
- package/umd/index.umd.js.map +1 -1
- package/umd/scripts/run-codex-prompts/common/resolveCoderAgent.d.ts +7 -0
- package/umd/scripts/run-codex-prompts/main/resolvePromptRunner.d.ts +5 -8
- package/umd/scripts/run-codex-prompts/main/runPromptRound.d.ts +2 -4
- package/umd/scripts/run-codex-prompts/prompts/buildPromptRunTraceContent.d.ts +5 -17
- package/umd/scripts/run-codex-prompts/prompts/buildPromptStatusDetails.d.ts +3 -15
- package/umd/scripts/run-codex-prompts/prompts/formatRunnerSignature.d.ts +14 -1
- package/umd/scripts/run-codex-prompts/prompts/markPromptFailed.d.ts +2 -9
- package/umd/src/book-2.0/agent-source/createAgentModelRequirements.deduplication.test.d.ts +1 -0
- package/umd/src/book-2.0/agent-source/deduplicateSystemMessage.d.ts +14 -0
- package/umd/src/book-2.0/agent-source/deduplicateSystemMessage.test.d.ts +1 -0
- package/umd/src/cli/$initializePromptbookCliProgram.d.ts +8 -0
- package/umd/src/version.d.ts +1 -1
|
@@ -7,6 +7,13 @@ export type ResolvedCoderAgentBook = {
|
|
|
7
7
|
* Raw source of the agent `.book` file.
|
|
8
8
|
*/
|
|
9
9
|
readonly agentSource: string_book;
|
|
10
|
+
/**
|
|
11
|
+
* Human-readable name of the agent, as it is reported in prompt status lines and run traces.
|
|
12
|
+
*
|
|
13
|
+
* Comes from the `META FULLNAME` of the Book, or from the plain title on its first line, so it is the
|
|
14
|
+
* display name of the agent and not its normalized identifier.
|
|
15
|
+
*/
|
|
16
|
+
readonly agentName: string;
|
|
10
17
|
/**
|
|
11
18
|
* Equivalent references by which a prompt may target this agent.
|
|
12
19
|
*
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import type { RunOptions } from '../cli/RunOptions';
|
|
2
|
+
import type { PromptRunnerMetadata } from '../common/PromptRunnerMetadata';
|
|
2
3
|
import type { PromptRunner } from '../runners/types/PromptRunner';
|
|
3
|
-
/**
|
|
4
|
-
* Runner metadata used in prompt status lines.
|
|
5
|
-
*/
|
|
6
|
-
type RunnerMetadata = {
|
|
7
|
-
runnerName: string;
|
|
8
|
-
modelName?: string;
|
|
9
|
-
};
|
|
10
4
|
/**
|
|
11
5
|
* Subset of `RunOptions` which decides which prompt runner is created and how it is labeled.
|
|
12
6
|
*
|
|
@@ -20,7 +14,10 @@ export type PromptRunnerSelectionOptions = Pick<RunOptions, 'agentName' | 'model
|
|
|
20
14
|
type PromptRunnerResolution = {
|
|
21
15
|
runner: PromptRunner;
|
|
22
16
|
actualRunnerModel?: string;
|
|
23
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Harness half of the run metadata; the optional Book agent is added by the caller which resolves it.
|
|
19
|
+
*/
|
|
20
|
+
runnerMetadata: PromptRunnerMetadata;
|
|
24
21
|
};
|
|
25
22
|
/**
|
|
26
23
|
* Resolves the configured prompt runner together with status-line metadata.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { RunOptions } from '../cli/RunOptions';
|
|
2
2
|
import type { CliProgressDisplay } from '../common/cliProgressDisplay';
|
|
3
3
|
import type { WaitForCoderRunPauseCheckpoint } from '../common/CoderRunPauseCheckpoint';
|
|
4
|
+
import type { PromptRunnerMetadata } from '../common/PromptRunnerMetadata';
|
|
4
5
|
import type { PromptSelection } from '../prompts/types/PromptSelection';
|
|
5
6
|
import type { PromptRunner } from '../runners/types/PromptRunner';
|
|
6
7
|
import type { CoderRunUiHandle } from '../ui/renderCoderRunUi';
|
|
@@ -10,10 +11,7 @@ import type { CoderRunUiHandle } from '../ui/renderCoderRunUi';
|
|
|
10
11
|
export type RunPromptRoundOptions = {
|
|
11
12
|
options: RunOptions;
|
|
12
13
|
runner: PromptRunner;
|
|
13
|
-
runnerMetadata:
|
|
14
|
-
runnerName: string;
|
|
15
|
-
modelName?: string;
|
|
16
|
-
};
|
|
14
|
+
runnerMetadata: PromptRunnerMetadata;
|
|
17
15
|
nextPrompt: PromptSelection;
|
|
18
16
|
promptLabel: string;
|
|
19
17
|
resolvedCoderContext?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import moment from 'moment';
|
|
2
2
|
import { type CodexLoginMethod } from '../../../src/book-3.0/codexLoginMethod';
|
|
3
|
-
import type { ThinkingLevel } from '../../../src/cli/cli-commands/coder/ThinkingLevel';
|
|
4
3
|
import type { CoderRunStep } from '../common/CoderRunStep';
|
|
4
|
+
import { type FormatRunnerSignatureOptions } from './formatRunnerSignature';
|
|
5
5
|
import type { PromptFile } from './types/PromptFile';
|
|
6
6
|
import type { PromptSection } from './types/PromptSection';
|
|
7
7
|
/**
|
|
@@ -29,21 +29,9 @@ export type PromptRunTraceOutcome = {
|
|
|
29
29
|
/**
|
|
30
30
|
* Everything one run trace says about the prompt round it describes.
|
|
31
31
|
*/
|
|
32
|
-
export type BuildPromptRunTraceContentOptions = {
|
|
32
|
+
export type BuildPromptRunTraceContentOptions = FormatRunnerSignatureOptions & {
|
|
33
33
|
readonly file: PromptFile;
|
|
34
34
|
readonly section: PromptSection;
|
|
35
|
-
/**
|
|
36
|
-
* Harness which ran the prompt.
|
|
37
|
-
*/
|
|
38
|
-
readonly runnerName?: string;
|
|
39
|
-
/**
|
|
40
|
-
* Model the harness ran the prompt with.
|
|
41
|
-
*/
|
|
42
|
-
readonly modelName?: string;
|
|
43
|
-
/**
|
|
44
|
-
* Reasoning effort the harness ran the prompt with.
|
|
45
|
-
*/
|
|
46
|
-
readonly thinkingLevel?: ThinkingLevel;
|
|
47
35
|
/**
|
|
48
36
|
* Verification command the round ran after each coding attempt, when one is configured.
|
|
49
37
|
*/
|
|
@@ -70,8 +58,8 @@ export type BuildPromptRunTraceContentOptions = {
|
|
|
70
58
|
/**
|
|
71
59
|
* Renders the markdown run trace of one finished or failed prompt round.
|
|
72
60
|
*
|
|
73
|
-
* The trace pairs the metadata of the round - which harness, model and thinking level ran it, how long
|
|
74
|
-
* its steps took and what it cost - with the untouched runtime log, so a finished round can still be
|
|
75
|
-
* after its temporary artifacts are cleaned up.
|
|
61
|
+
* The trace pairs the metadata of the round - which agent, harness, model and thinking level ran it, how long
|
|
62
|
+
* each of its steps took and what it cost - with the untouched runtime log, so a finished round can still be
|
|
63
|
+
* analyzed after its temporary artifacts are cleaned up.
|
|
76
64
|
*/
|
|
77
65
|
export declare function buildPromptRunTraceContent(options: BuildPromptRunTraceContentOptions): string;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { type CodexLoginMethod } from '../../../src/book-3.0/codexLoginMethod';
|
|
2
|
-
import type { ThinkingLevel } from '../../../src/cli/cli-commands/coder/ThinkingLevel';
|
|
3
2
|
import type { CoderRunStep, CoderRunStepKind } from '../common/CoderRunStep';
|
|
3
|
+
import { type FormatRunnerSignatureOptions } from './formatRunnerSignature';
|
|
4
4
|
import { type PromptRunnerAttribution } from './promptRunnerAttribution';
|
|
5
5
|
/**
|
|
6
6
|
* Everything one prompt status line says after its checklist marker.
|
|
7
7
|
*/
|
|
8
|
-
export type BuildPromptStatusDetailsOptions = {
|
|
8
|
+
export type BuildPromptStatusDetailsOptions = FormatRunnerSignatureOptions & {
|
|
9
9
|
/**
|
|
10
10
|
* Steps of the prompt round which have already finished, each with its own price and duration.
|
|
11
11
|
*/
|
|
@@ -14,14 +14,6 @@ export type BuildPromptStatusDetailsOptions = {
|
|
|
14
14
|
* Step which has already started but has not finished yet, reported as `Implementation in progress`.
|
|
15
15
|
*/
|
|
16
16
|
readonly inProgressStepKind?: CoderRunStepKind;
|
|
17
|
-
/**
|
|
18
|
-
* Harness which runs the prompt.
|
|
19
|
-
*/
|
|
20
|
-
readonly runnerName: string | undefined;
|
|
21
|
-
/**
|
|
22
|
-
* Model the harness runs the prompt with.
|
|
23
|
-
*/
|
|
24
|
-
readonly modelName: string | undefined;
|
|
25
17
|
/**
|
|
26
18
|
* Chronological runner report read from a prompt left in the middle of its implementation.
|
|
27
19
|
*
|
|
@@ -37,15 +29,11 @@ export type BuildPromptStatusDetailsOptions = {
|
|
|
37
29
|
* Authentication method the harness reported, when it is already known.
|
|
38
30
|
*/
|
|
39
31
|
readonly loginMethod?: CodexLoginMethod;
|
|
40
|
-
/**
|
|
41
|
-
* Reasoning effort the harness runs the prompt with.
|
|
42
|
-
*/
|
|
43
|
-
readonly thinkingLevel?: ThinkingLevel;
|
|
44
32
|
};
|
|
45
33
|
/**
|
|
46
34
|
* Builds the shared body of a prompt status line, used by both the in-progress `[^]` and the done `[x]` status.
|
|
47
35
|
*
|
|
48
36
|
* Produces details such as
|
|
49
|
-
* ``by OpenAI Codex `gpt-5.6-luna` thinking `max` (ChatGPT account) - Implementation ~$0.2036 10 minutes``.
|
|
37
|
+
* ``by Developer on OpenAI Codex `gpt-5.6-luna` thinking `max` (ChatGPT account) - Implementation ~$0.2036 10 minutes``.
|
|
50
38
|
*/
|
|
51
39
|
export declare function buildPromptStatusDetails(options: BuildPromptStatusDetailsOptions): string;
|
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
import type { ThinkingLevel } from '../../../src/cli/cli-commands/coder/ThinkingLevel';
|
|
2
|
+
import type { PromptRunnerMetadata } from '../common/PromptRunnerMetadata';
|
|
3
|
+
/**
|
|
4
|
+
* Everything one runner signature can name, as far as it is known when the signature is formatted.
|
|
5
|
+
*/
|
|
6
|
+
export type FormatRunnerSignatureOptions = Partial<PromptRunnerMetadata> & {
|
|
7
|
+
/**
|
|
8
|
+
* Reasoning effort the harness runs the prompt with.
|
|
9
|
+
*/
|
|
10
|
+
readonly thinkingLevel?: ThinkingLevel;
|
|
11
|
+
};
|
|
2
12
|
/**
|
|
3
13
|
* Formats runner details for prompt status lines.
|
|
14
|
+
*
|
|
15
|
+
* Produces `` OpenAI Codex `gpt-5.6-luna` thinking `max` `` for a plain run and
|
|
16
|
+
* `` Developer on OpenAI Codex `gpt-5.6-luna` thinking `max` `` for a run personalized with `--agent`.
|
|
4
17
|
*/
|
|
5
|
-
export declare function formatRunnerSignature(
|
|
18
|
+
export declare function formatRunnerSignature(options: FormatRunnerSignatureOptions): string;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import moment from 'moment';
|
|
2
|
+
import { type FormatRunnerSignatureOptions } from './formatRunnerSignature';
|
|
2
3
|
import { type PromptRunnerAttribution } from './promptRunnerAttribution';
|
|
3
4
|
import type { PromptFile } from './types/PromptFile';
|
|
4
5
|
import type { PromptSection } from './types/PromptSection';
|
|
5
6
|
/**
|
|
6
7
|
* Input for marking one prompt section as failed.
|
|
7
8
|
*/
|
|
8
|
-
export type MarkPromptFailedOptions = {
|
|
9
|
+
export type MarkPromptFailedOptions = FormatRunnerSignatureOptions & {
|
|
9
10
|
/**
|
|
10
11
|
* Prompt file the marked section belongs to.
|
|
11
12
|
*/
|
|
@@ -14,14 +15,6 @@ export type MarkPromptFailedOptions = {
|
|
|
14
15
|
* Section which could not be implemented.
|
|
15
16
|
*/
|
|
16
17
|
readonly section: PromptSection;
|
|
17
|
-
/**
|
|
18
|
-
* Harness which ran the prompt.
|
|
19
|
-
*/
|
|
20
|
-
readonly runnerName: string | undefined;
|
|
21
|
-
/**
|
|
22
|
-
* Model the harness ran the prompt with.
|
|
23
|
-
*/
|
|
24
|
-
readonly modelName: string | undefined;
|
|
25
18
|
/**
|
|
26
19
|
* Chronological runner report read from a prompt left in the middle of its implementation.
|
|
27
20
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Removes duplicated instructions from a generated system message
|
|
3
|
+
*
|
|
4
|
+
* Commitments are applied one by one, so a commitment used multiple times in one book repeats its whole
|
|
5
|
+
* section, including the shared guidance preamble. For example two `WRITING RULES` commitments emit the
|
|
6
|
+
* `## Writing rules` heading and its guidance paragraph twice. This function merges all sections sharing
|
|
7
|
+
* one heading into the position of their first occurrence and keeps every identical block only once.
|
|
8
|
+
*
|
|
9
|
+
* @param systemMessage The assembled system message which may contain repeated sections and blocks
|
|
10
|
+
* @returns The system message where each section heading and each identical block appears exactly once
|
|
11
|
+
*
|
|
12
|
+
* @private internal utility of `createAgentModelRequirementsWithCommitments`
|
|
13
|
+
*/
|
|
14
|
+
export declare function deduplicateSystemMessage(systemMessage: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Command } from 'commander';
|
|
2
|
+
/**
|
|
3
|
+
* Registers the CLI commands on a fresh Commander program without parsing arguments or running an action.
|
|
4
|
+
* Tests can configure output and exit handling before registration, so subcommands inherit those settings.
|
|
5
|
+
*
|
|
6
|
+
* @private internal utility of `promptbookCli`
|
|
7
|
+
*/
|
|
8
|
+
export declare function $initializePromptbookCliProgram(program: Command): void;
|
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-37`).
|
|
19
19
|
*
|
|
20
20
|
* @generated
|
|
21
21
|
*/
|