@promptbook/cli 0.112.0-43 → 0.112.0-44
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/esm/index.es.js +481 -111
- package/esm/index.es.js.map +1 -1
- package/esm/scripts/run-codex-prompts/common/runGoScript/$runGoScript.d.ts +1 -1
- package/esm/scripts/run-codex-prompts/common/runGoScript/$runGoScriptUntilMarkerIdle.d.ts +1 -1
- package/esm/scripts/run-codex-prompts/common/runGoScript/$runGoScriptWithOutput.d.ts +1 -1
- package/esm/scripts/run-codex-prompts/common/runGoScript/PromptRoundArtifacts.d.ts +35 -0
- package/esm/scripts/run-codex-prompts/common/runGoScript/buildScriptLogPath.d.ts +4 -0
- package/esm/scripts/run-codex-prompts/common/runGoScript/runBashScriptWithOutput.d.ts +5 -0
- package/esm/scripts/run-codex-prompts/common/runGoScript/scriptExecutionLog.d.ts +28 -0
- package/esm/scripts/run-codex-prompts/common/runGoScript/withPromptRuntimeLog.d.ts +5 -0
- package/esm/scripts/run-codex-prompts/common/runGoScript/withTempScript.d.ts +1 -1
- package/esm/scripts/run-codex-prompts/testing/runPromptTestCommand.d.ts +1 -0
- package/esm/src/book-2.0/agent-source/AgentBasicInformation.d.ts +2 -1
- package/esm/src/book-2.0/agent-source/TeammateProfileResolver.d.ts +2 -1
- package/esm/src/commitments/PERSONA/PERSONA.d.ts +7 -0
- package/esm/src/version.d.ts +1 -1
- package/package.json +1 -1
- package/umd/index.umd.js +480 -110
- package/umd/index.umd.js.map +1 -1
- package/umd/scripts/run-codex-prompts/common/runGoScript/$runGoScript.d.ts +1 -1
- package/umd/scripts/run-codex-prompts/common/runGoScript/$runGoScriptUntilMarkerIdle.d.ts +1 -1
- package/umd/scripts/run-codex-prompts/common/runGoScript/$runGoScriptWithOutput.d.ts +1 -1
- package/umd/scripts/run-codex-prompts/common/runGoScript/PromptRoundArtifacts.d.ts +35 -0
- package/umd/scripts/run-codex-prompts/common/runGoScript/buildScriptLogPath.d.ts +4 -0
- package/umd/scripts/run-codex-prompts/common/runGoScript/runBashScriptWithOutput.d.ts +5 -0
- package/umd/scripts/run-codex-prompts/common/runGoScript/scriptExecutionLog.d.ts +28 -0
- package/umd/scripts/run-codex-prompts/common/runGoScript/withPromptRuntimeLog.d.ts +5 -0
- package/umd/scripts/run-codex-prompts/common/runGoScript/withTempScript.d.ts +1 -1
- package/umd/scripts/run-codex-prompts/testing/runPromptTestCommand.d.ts +1 -0
- package/umd/src/book-2.0/agent-source/AgentBasicInformation.d.ts +2 -1
- package/umd/src/book-2.0/agent-source/TeammateProfileResolver.d.ts +2 -1
- package/umd/src/commitments/PERSONA/PERSONA.d.ts +7 -0
- package/umd/src/version.d.ts +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RunGoScriptOptions } from './RunGoScriptOptions';
|
|
2
2
|
/**
|
|
3
|
-
* Creates a temporary script file, runs it, and
|
|
3
|
+
* Creates a temporary script file, runs it, and cleans it up immediately unless a round tracker defers that cleanup.
|
|
4
4
|
*/
|
|
5
5
|
export declare function $runGoScript(options: RunGoScriptOptions): Promise<void>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { RunGoScriptUntilMarkerIdleOptions } from './RunGoScriptUntilMarkerIdleOptions';
|
|
2
2
|
/**
|
|
3
|
-
* Creates a temporary script file, runs it, waits for a completion marker and idle time, and
|
|
3
|
+
* Creates a temporary script file, runs it, waits for a completion marker and idle time, and defers cleanup when a round tracker is provided.
|
|
4
4
|
* Returns the captured output for post-processing.
|
|
5
5
|
*/
|
|
6
6
|
export declare function $runGoScriptUntilMarkerIdle(options: RunGoScriptUntilMarkerIdleOptions): Promise<string>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RunGoScriptOptions } from './RunGoScriptOptions';
|
|
2
2
|
/**
|
|
3
|
-
* Creates a temporary script file, runs it, captures output, and
|
|
3
|
+
* Creates a temporary script file, runs it, captures output, and cleans it up immediately unless a round tracker defers that cleanup.
|
|
4
4
|
*/
|
|
5
5
|
export declare function $runGoScriptWithOutput(options: RunGoScriptOptions): Promise<string>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Kind of temporary artifact created during one coder prompt round.
|
|
3
|
+
*/
|
|
4
|
+
export type PromptRoundArtifactKind = 'runner-script' | 'test-script' | 'runtime-log';
|
|
5
|
+
/**
|
|
6
|
+
* Final outcome of one coder prompt round.
|
|
7
|
+
*/
|
|
8
|
+
export type PromptRoundOutcome = 'success' | 'failure';
|
|
9
|
+
/**
|
|
10
|
+
* Tracks temporary prompt-round artifacts and deletes only those not preserved for the final round outcome.
|
|
11
|
+
*/
|
|
12
|
+
export declare class PromptRoundArtifacts {
|
|
13
|
+
private readonly preservedArtifactKindsByOutcome;
|
|
14
|
+
private readonly trackedArtifacts;
|
|
15
|
+
/**
|
|
16
|
+
* Creates a new prompt-round artifact tracker.
|
|
17
|
+
*/
|
|
18
|
+
constructor(preservedArtifactKindsByOutcome: Record<PromptRoundOutcome, ReadonlySet<PromptRoundArtifactKind>>);
|
|
19
|
+
/**
|
|
20
|
+
* Registers one temporary artifact for round-final cleanup.
|
|
21
|
+
*/
|
|
22
|
+
track(path: string, kind: PromptRoundArtifactKind): void;
|
|
23
|
+
/**
|
|
24
|
+
* Cleans up all tracked artifacts that should not survive the final round outcome.
|
|
25
|
+
*/
|
|
26
|
+
cleanup(outcome: PromptRoundOutcome): Promise<void>;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Creates the default artifact-retention policy used by `ptbk coder run`.
|
|
30
|
+
*/
|
|
31
|
+
export declare function createCoderRunPromptRoundArtifacts(isPreserveLogs: boolean): PromptRoundArtifacts;
|
|
32
|
+
/**
|
|
33
|
+
* Derives the tracked artifact kind from one temporary shell path.
|
|
34
|
+
*/
|
|
35
|
+
export declare function getPromptRoundArtifactKindFromScriptPath(scriptPath: string): PromptRoundArtifactKind;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { RunGoScriptOptions } from './RunGoScriptOptions';
|
|
2
|
+
/**
|
|
3
|
+
* Runs one temporary bash script, optionally mirroring its raw input/output into a live runtime log file.
|
|
4
|
+
*/
|
|
5
|
+
export declare function runBashScriptWithOutput(options: RunGoScriptOptions): Promise<string>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Environment variable read by the shell wrapper to tee live output into the temporary runtime log file.
|
|
3
|
+
*/
|
|
4
|
+
export declare const PTBK_CODER_LOG_FILE_ENV_NAME = "PTBK_CODER_LOG_FILE";
|
|
5
|
+
/**
|
|
6
|
+
* Shapes one bash invocation that optionally mirrors live script output into a temporary log file.
|
|
7
|
+
*/
|
|
8
|
+
export declare function buildLoggedBashExecution(scriptPath: string, logPath?: string): {
|
|
9
|
+
args: string[];
|
|
10
|
+
env?: Record<string, string>;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Appends one execution-start section with the raw script input before the shell begins producing output.
|
|
14
|
+
*/
|
|
15
|
+
export declare function appendScriptExecutionLogStart({ scriptPath, scriptContent, logPath, }: {
|
|
16
|
+
scriptPath: string;
|
|
17
|
+
scriptContent: string;
|
|
18
|
+
logPath?: string;
|
|
19
|
+
}): Promise<void>;
|
|
20
|
+
/**
|
|
21
|
+
* Appends one execution-finish section after the shell settles.
|
|
22
|
+
*/
|
|
23
|
+
export declare function appendScriptExecutionLogFinish({ scriptPath, logPath, status, details, }: {
|
|
24
|
+
scriptPath: string;
|
|
25
|
+
logPath?: string;
|
|
26
|
+
status: string;
|
|
27
|
+
details?: unknown;
|
|
28
|
+
}): Promise<void>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { PromptRoundArtifacts } from './PromptRoundArtifacts';
|
|
2
|
+
/**
|
|
3
|
+
* Runs one prompt-processing round with a dedicated temporary runtime log file and optionally defers cleanup to the round tracker.
|
|
4
|
+
*/
|
|
5
|
+
export declare function withPromptRuntimeLog<T>(scriptPath: string, handler: (logPath: string) => Promise<T>, promptRoundArtifacts?: PromptRoundArtifacts): Promise<T>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RunGoScriptOptions } from './RunGoScriptOptions';
|
|
2
2
|
/**
|
|
3
|
-
* Creates a temporary script file, runs a handler, and
|
|
3
|
+
* Creates a temporary script file, runs a handler, and either cleans it up immediately or defers cleanup to the round tracker.
|
|
4
4
|
*/
|
|
5
5
|
export declare function withTempScript<T>(options: RunGoScriptOptions, handler: (scriptPath: string) => Promise<T>): Promise<T>;
|
|
@@ -66,7 +66,8 @@ export type AgentBasicInformation = {
|
|
|
66
66
|
permanentId?: string_agent_permanent_id;
|
|
67
67
|
/**
|
|
68
68
|
* Optional description of the agent
|
|
69
|
-
* This is the
|
|
69
|
+
* This is derived from the last `GOAL` / `GOALS` commitment,
|
|
70
|
+
* falling back to deprecated `PERSONA` / `PERSONAE` for backward compatibility.
|
|
70
71
|
*/
|
|
71
72
|
personaDescription: string | null;
|
|
72
73
|
/**
|
|
@@ -9,7 +9,8 @@ export type TeammateProfile = {
|
|
|
9
9
|
*/
|
|
10
10
|
readonly agentName: string;
|
|
11
11
|
/**
|
|
12
|
-
* Short
|
|
12
|
+
* Short profile text for what the agent does, from the last GOAL commitment
|
|
13
|
+
* or deprecated PERSONA fallback.
|
|
13
14
|
*/
|
|
14
15
|
readonly personaDescription: string | null;
|
|
15
16
|
};
|
|
@@ -29,6 +29,13 @@ export declare class PersonaCommitmentDefinition extends BaseCommitmentDefinitio
|
|
|
29
29
|
* Short one-line description of PERSONA.
|
|
30
30
|
*/
|
|
31
31
|
get description(): string;
|
|
32
|
+
/**
|
|
33
|
+
* Optional UI/docs-only deprecation metadata.
|
|
34
|
+
*/
|
|
35
|
+
get deprecation(): {
|
|
36
|
+
readonly message: "Use `GOAL` for agent profile text and inheritance-safe rewrites.";
|
|
37
|
+
readonly replacedBy: readonly ["GOAL"];
|
|
38
|
+
};
|
|
32
39
|
/**
|
|
33
40
|
* Icon for this commitment.
|
|
34
41
|
*/
|
package/esm/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.112.0-
|
|
18
|
+
* It follows semantic versioning (e.g., `0.112.0-43`).
|
|
19
19
|
*
|
|
20
20
|
* @generated
|
|
21
21
|
*/
|