@promptbook/utils 0.112.0-71 → 0.112.0-72

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.
Files changed (43) hide show
  1. package/esm/index.es.js +1 -1
  2. package/esm/src/book-3.0/Book.d.ts +6 -0
  3. package/esm/src/book-components/Chat/utils/getToolCallChipletInfo.test.d.ts +1 -0
  4. package/esm/src/cli/cli-commands/agent/agentRunCliOptions.d.ts +12 -2
  5. package/esm/src/cli/cli-commands/agent/initializeAgentRunnerCommand.d.ts +1 -0
  6. package/esm/src/cli/cli-commands/run/prepareRunCommandResources.d.ts +20 -0
  7. package/esm/src/cli/cli-commands/run/resolveRunInputParameters.d.ts +12 -0
  8. package/esm/src/cli/cli-commands/run/runCommandAction.d.ts +21 -0
  9. package/esm/src/cli/cli-commands/run/runPipelineExecution.d.ts +14 -0
  10. package/esm/src/cli/cli-commands/run.d.ts +1 -1
  11. package/esm/src/conversion/parsePipeline/applyPipelineHead.d.ts +8 -0
  12. package/esm/src/conversion/parsePipeline/createInitialPipelineJson.d.ts +8 -0
  13. package/esm/src/conversion/parsePipeline/createUniqueSectionNameResolver.d.ts +14 -0
  14. package/esm/src/conversion/parsePipeline/defineParameter.d.ts +8 -0
  15. package/esm/src/conversion/parsePipeline/extractPipelineDescription.d.ts +6 -0
  16. package/esm/src/conversion/parsePipeline/finalizeParsedPipeline.d.ts +8 -0
  17. package/esm/src/conversion/parsePipeline/getPipelineIdentification.d.ts +7 -0
  18. package/esm/src/conversion/parsePipeline/parsePreparedPipelineSections.d.ts +18 -0
  19. package/esm/src/conversion/parsePipeline/preparePipelineString.d.ts +8 -0
  20. package/esm/src/conversion/parsePipeline/processPipelineSection.d.ts +9 -0
  21. package/esm/src/version.d.ts +1 -1
  22. package/package.json +1 -1
  23. package/umd/index.umd.js +1 -1
  24. package/umd/src/book-3.0/Book.d.ts +6 -0
  25. package/umd/src/book-components/Chat/utils/getToolCallChipletInfo.test.d.ts +1 -0
  26. package/umd/src/cli/cli-commands/agent/agentRunCliOptions.d.ts +12 -2
  27. package/umd/src/cli/cli-commands/agent/initializeAgentRunnerCommand.d.ts +1 -0
  28. package/umd/src/cli/cli-commands/run/prepareRunCommandResources.d.ts +20 -0
  29. package/umd/src/cli/cli-commands/run/resolveRunInputParameters.d.ts +12 -0
  30. package/umd/src/cli/cli-commands/run/runCommandAction.d.ts +21 -0
  31. package/umd/src/cli/cli-commands/run/runPipelineExecution.d.ts +14 -0
  32. package/umd/src/cli/cli-commands/run.d.ts +1 -1
  33. package/umd/src/conversion/parsePipeline/applyPipelineHead.d.ts +8 -0
  34. package/umd/src/conversion/parsePipeline/createInitialPipelineJson.d.ts +8 -0
  35. package/umd/src/conversion/parsePipeline/createUniqueSectionNameResolver.d.ts +14 -0
  36. package/umd/src/conversion/parsePipeline/defineParameter.d.ts +8 -0
  37. package/umd/src/conversion/parsePipeline/extractPipelineDescription.d.ts +6 -0
  38. package/umd/src/conversion/parsePipeline/finalizeParsedPipeline.d.ts +8 -0
  39. package/umd/src/conversion/parsePipeline/getPipelineIdentification.d.ts +7 -0
  40. package/umd/src/conversion/parsePipeline/parsePreparedPipelineSections.d.ts +18 -0
  41. package/umd/src/conversion/parsePipeline/preparePipelineString.d.ts +8 -0
  42. package/umd/src/conversion/parsePipeline/processPipelineSection.d.ts +9 -0
  43. package/umd/src/version.d.ts +1 -1
package/esm/index.es.js CHANGED
@@ -18,7 +18,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
18
18
  * @generated
19
19
  * @see https://github.com/webgptorg/promptbook
20
20
  */
21
- const PROMPTBOOK_ENGINE_VERSION = '0.112.0-71';
21
+ const PROMPTBOOK_ENGINE_VERSION = '0.112.0-72';
22
22
  /**
23
23
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
24
24
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -24,6 +24,12 @@ export declare class Book {
24
24
  private constructor();
25
25
  stringify(): string_book;
26
26
  getMessages(): ReadonlyArray<ChatMessage>;
27
+ /**
28
+ * Gets the newest parsed chat message written by the given sender.
29
+ *
30
+ * @public exported from `@promptbook/core`
31
+ */
32
+ getLatestMessageBySender(sender: string): ChatMessage | null;
27
33
  }
28
34
  type Commitment = {
29
35
  type: string;
@@ -4,10 +4,20 @@ import type { NormalizedPromptRunnerCliOptions, PromptRunnerCliOptions } from '.
4
4
  *
5
5
  * @private internal utility of `ptbk agent`
6
6
  */
7
- export type AgentRunCliOptions = PromptRunnerCliOptions;
7
+ export type AgentRunCliOptions = PromptRunnerCliOptions & {
8
+ readonly autoClone?: boolean;
9
+ };
10
+ /**
11
+ * Normalized options passed from `ptbk agent` CLI commands to the message runner.
12
+ *
13
+ * @private internal utility of `ptbk agent`
14
+ */
15
+ export type NormalizedAgentRunCliOptions = NormalizedPromptRunnerCliOptions & {
16
+ readonly autoClone: boolean;
17
+ };
8
18
  /**
9
19
  * Converts Commander options into the `scripts/run-agent-messages` option shape.
10
20
  *
11
21
  * @private internal utility of `ptbk agent`
12
22
  */
13
- export declare function createAgentRunOptionsFromCliOptions(cliOptions: AgentRunCliOptions): NormalizedPromptRunnerCliOptions;
23
+ export declare function createAgentRunOptionsFromCliOptions(cliOptions: AgentRunCliOptions): NormalizedAgentRunCliOptions;
@@ -11,6 +11,7 @@ type InitializeAgentRunnerCommandOptions = {
11
11
  readonly aliases?: ReadonlyArray<string>;
12
12
  readonly summary: string;
13
13
  readonly featureLines: ReadonlyArray<string>;
14
+ readonly configureCommand?: (command: Program) => void;
14
15
  readonly loadExecutor: () => Promise<(runOptions: ReturnType<typeof createAgentRunOptionsFromCliOptions>) => Promise<unknown>>;
15
16
  };
16
17
  /**
@@ -0,0 +1,20 @@
1
+ import type { PipelineExecutor } from '../../../execution/PipelineExecutor';
2
+ import type { PipelineJson } from '../../../pipeline/PipelineJson/PipelineJson';
3
+ import type { PrepareAndScrapeOptions } from '../../../prepare/PrepareAndScrapeOptions';
4
+ import type { RunCommandCliOptions } from './runCommandAction';
5
+ /**
6
+ * Prepares the tools, pipeline, and executor required to run one `ptbk run` invocation.
7
+ *
8
+ * @private internal utility of `$initializeRunCommand`
9
+ */
10
+ export declare function prepareRunCommandResources(options: {
11
+ readonly pipelineSource?: string;
12
+ readonly cliOptions: RunCommandCliOptions;
13
+ readonly prepareAndScrapeOptions: Pick<PrepareAndScrapeOptions, 'isVerbose'> & {
14
+ readonly isCacheReloaded: boolean;
15
+ };
16
+ readonly logStage: (stage: string) => void;
17
+ }): Promise<{
18
+ readonly pipeline: PipelineJson;
19
+ readonly pipelineExecutor: PipelineExecutor;
20
+ }>;
@@ -0,0 +1,12 @@
1
+ import type { PipelineJson } from '../../../pipeline/PipelineJson/PipelineJson';
2
+ import type { string_parameter_name, string_parameter_value } from '../../../types/string_name';
3
+ /**
4
+ * Resolves all missing input parameters while keeping the current interactive and non-interactive behavior.
5
+ *
6
+ * @private internal utility of `$initializeRunCommand`
7
+ */
8
+ export declare function resolveRunInputParameters(options: {
9
+ readonly pipeline: PipelineJson;
10
+ readonly inputParameters: Record<string_parameter_name, string_parameter_value>;
11
+ readonly isInteractive: boolean;
12
+ }): Promise<Record<string_parameter_name, string_parameter_value>>;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * CLI options consumed by the `run` command action.
3
+ *
4
+ * @private internal utility of `$initializeRunCommand`
5
+ */
6
+ export type RunCommandCliOptions = {
7
+ readonly reload: boolean;
8
+ readonly interactive: boolean;
9
+ readonly formfactor: boolean;
10
+ readonly json?: string;
11
+ readonly verbose: boolean;
12
+ readonly saveReport?: string;
13
+ readonly provider: string;
14
+ readonly remoteServerUrl: string;
15
+ };
16
+ /**
17
+ * Runs the whole `ptbk run` flow as a top-down orchestration of focused steps.
18
+ *
19
+ * @private internal utility of `$initializeRunCommand`
20
+ */
21
+ export declare function runCommandAction(pipelineSource: string | undefined, cliOptions: RunCommandCliOptions): Promise<void | never>;
@@ -0,0 +1,14 @@
1
+ import type { PipelineExecutor } from '../../../execution/PipelineExecutor';
2
+ import type { string_parameter_name, string_parameter_value } from '../../../types/string_name';
3
+ /**
4
+ * Executes the pipeline, persists any requested report, and prints the final CLI output.
5
+ *
6
+ * @private internal utility of `$initializeRunCommand`
7
+ */
8
+ export declare function runPipelineExecution(options: {
9
+ readonly pipelineExecutor: PipelineExecutor;
10
+ readonly inputParameters: Record<string_parameter_name, string_parameter_value>;
11
+ readonly isVerbose: boolean;
12
+ readonly json?: string;
13
+ readonly saveReport?: string;
14
+ }): Promise<void>;
@@ -1,4 +1,4 @@
1
- import type { Command as Program } from 'commander';
1
+ import { Command as Program } from 'commander';
2
2
  import type { $side_effect } from '../../utils/organization/$side_effect';
3
3
  /**
4
4
  * Initializes `run` command for Promptbook CLI utilities
@@ -0,0 +1,8 @@
1
+ import type { $PipelineJson } from '../../commands/_common/types/CommandParser';
2
+ import type { MarkdownSection } from '../../utils/markdown/parseMarkdownSection';
3
+ /**
4
+ * Applies the pipeline head title, description, and head-level commands.
5
+ *
6
+ * @private internal utility of `parsePipeline`
7
+ */
8
+ export declare function applyPipelineHead(pipelineHead: MarkdownSection, $pipelineJson: $PipelineJson): void;
@@ -0,0 +1,8 @@
1
+ import type { $PipelineJson } from '../../commands/_common/types/CommandParser';
2
+ import type { PipelineString } from '../../pipeline/PipelineString';
3
+ /**
4
+ * Creates the mutable pipeline JSON structure used throughout parsing.
5
+ *
6
+ * @private internal utility of `parsePipeline`
7
+ */
8
+ export declare function createInitialPipelineJson(pipelineString: PipelineString): $PipelineJson;
@@ -0,0 +1,14 @@
1
+ import type { string_name } from '../../types/string_name';
2
+ import type { MarkdownSection } from '../../utils/markdown/parseMarkdownSection';
3
+ /**
4
+ * Resolves a unique task name for one parsed markdown section title.
5
+ *
6
+ * @private internal type of `parsePipeline`
7
+ */
8
+ export type UniqueSectionNameResolver = (title: string) => string_name;
9
+ /**
10
+ * Creates stable unique task names for duplicate section titles.
11
+ *
12
+ * @private internal utility of `parsePipeline`
13
+ */
14
+ export declare function createUniqueSectionNameResolver(pipelineSections: ReadonlyArray<MarkdownSection>): UniqueSectionNameResolver;
@@ -0,0 +1,8 @@
1
+ import type { ParameterCommand } from '../../commands/PARAMETER/ParameterCommand';
2
+ import type { $PipelineJson } from '../../commands/_common/types/CommandParser';
3
+ /**
4
+ * Merges one parameter declaration into the mutable pipeline parameter list.
5
+ *
6
+ * @private internal utility of `parsePipeline`
7
+ */
8
+ export declare function defineParameter($pipelineJson: $PipelineJson, parameterCommand: Omit<ParameterCommand, 'type'>): void;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Extracts the plain-text description from a head or task section body.
3
+ *
4
+ * @private internal utility of `parsePipeline`
5
+ */
6
+ export declare function extractPipelineDescription(sectionContent: string): string | undefined;
@@ -0,0 +1,8 @@
1
+ import type { $PipelineJson } from '../../commands/_common/types/CommandParser';
2
+ import type { PipelineJson } from '../../pipeline/PipelineJson/PipelineJson';
3
+ /**
4
+ * Applies postprocessing and exports the parsed pipeline JSON.
5
+ *
6
+ * @private internal utility of `parsePipeline`
7
+ */
8
+ export declare function finalizeParsedPipeline($pipelineJson: $PipelineJson): PipelineJson;
@@ -0,0 +1,7 @@
1
+ import type { $PipelineJson } from '../../commands/_common/types/CommandParser';
2
+ /**
3
+ * Builds a short file/url identification block for parse errors.
4
+ *
5
+ * @private internal utility of `parsePipeline`
6
+ */
7
+ export declare function getPipelineIdentification($pipelineJson: $PipelineJson): string;
@@ -0,0 +1,18 @@
1
+ import type { $PipelineJson } from '../../commands/_common/types/CommandParser';
2
+ import type { MarkdownSection } from '../../utils/markdown/parseMarkdownSection';
3
+ import type { PipelineString } from '../../pipeline/PipelineString';
4
+ /**
5
+ * Parsed markdown structure split into the pipeline head and task sections.
6
+ *
7
+ * @private internal type of `parsePipeline`
8
+ */
9
+ export type ParsedPipelineSections = {
10
+ readonly pipelineHead: MarkdownSection;
11
+ readonly pipelineSections: ReadonlyArray<MarkdownSection>;
12
+ };
13
+ /**
14
+ * Splits the prepared markdown into the pipeline head and task sections.
15
+ *
16
+ * @private internal utility of `parsePipeline`
17
+ */
18
+ export declare function parsePreparedPipelineSections(pipelineString: PipelineString, $pipelineJson: $PipelineJson): ParsedPipelineSections;
@@ -0,0 +1,8 @@
1
+ import type { $PipelineJson } from '../../commands/_common/types/CommandParser';
2
+ import type { PipelineString } from '../../pipeline/PipelineString';
3
+ /**
4
+ * Removes shebang/comments and normalizes markdown into a parseable pipeline form.
5
+ *
6
+ * @private internal utility of `parsePipeline`
7
+ */
8
+ export declare function preparePipelineString(pipelineString: PipelineString, $pipelineJson: $PipelineJson): PipelineString;
@@ -0,0 +1,9 @@
1
+ import type { $PipelineJson } from '../../commands/_common/types/CommandParser';
2
+ import type { MarkdownSection } from '../../utils/markdown/parseMarkdownSection';
3
+ import type { UniqueSectionNameResolver } from './createUniqueSectionNameResolver';
4
+ /**
5
+ * Parses, applies, and persists one h2 task section.
6
+ *
7
+ * @private internal utility of `parsePipeline`
8
+ */
9
+ export declare function processPipelineSection(pipelineSection: MarkdownSection, $pipelineJson: $PipelineJson, getUniqueSectionName: UniqueSectionNameResolver): void;
@@ -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-70`).
18
+ * It follows semantic versioning (e.g., `0.112.0-71`).
19
19
  *
20
20
  * @generated
21
21
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/utils",
3
- "version": "0.112.0-71",
3
+ "version": "0.112.0-72",
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,
package/umd/index.umd.js CHANGED
@@ -22,7 +22,7 @@
22
22
  * @generated
23
23
  * @see https://github.com/webgptorg/promptbook
24
24
  */
25
- const PROMPTBOOK_ENGINE_VERSION = '0.112.0-71';
25
+ const PROMPTBOOK_ENGINE_VERSION = '0.112.0-72';
26
26
  /**
27
27
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
28
28
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -24,6 +24,12 @@ export declare class Book {
24
24
  private constructor();
25
25
  stringify(): string_book;
26
26
  getMessages(): ReadonlyArray<ChatMessage>;
27
+ /**
28
+ * Gets the newest parsed chat message written by the given sender.
29
+ *
30
+ * @public exported from `@promptbook/core`
31
+ */
32
+ getLatestMessageBySender(sender: string): ChatMessage | null;
27
33
  }
28
34
  type Commitment = {
29
35
  type: string;
@@ -4,10 +4,20 @@ import type { NormalizedPromptRunnerCliOptions, PromptRunnerCliOptions } from '.
4
4
  *
5
5
  * @private internal utility of `ptbk agent`
6
6
  */
7
- export type AgentRunCliOptions = PromptRunnerCliOptions;
7
+ export type AgentRunCliOptions = PromptRunnerCliOptions & {
8
+ readonly autoClone?: boolean;
9
+ };
10
+ /**
11
+ * Normalized options passed from `ptbk agent` CLI commands to the message runner.
12
+ *
13
+ * @private internal utility of `ptbk agent`
14
+ */
15
+ export type NormalizedAgentRunCliOptions = NormalizedPromptRunnerCliOptions & {
16
+ readonly autoClone: boolean;
17
+ };
8
18
  /**
9
19
  * Converts Commander options into the `scripts/run-agent-messages` option shape.
10
20
  *
11
21
  * @private internal utility of `ptbk agent`
12
22
  */
13
- export declare function createAgentRunOptionsFromCliOptions(cliOptions: AgentRunCliOptions): NormalizedPromptRunnerCliOptions;
23
+ export declare function createAgentRunOptionsFromCliOptions(cliOptions: AgentRunCliOptions): NormalizedAgentRunCliOptions;
@@ -11,6 +11,7 @@ type InitializeAgentRunnerCommandOptions = {
11
11
  readonly aliases?: ReadonlyArray<string>;
12
12
  readonly summary: string;
13
13
  readonly featureLines: ReadonlyArray<string>;
14
+ readonly configureCommand?: (command: Program) => void;
14
15
  readonly loadExecutor: () => Promise<(runOptions: ReturnType<typeof createAgentRunOptionsFromCliOptions>) => Promise<unknown>>;
15
16
  };
16
17
  /**
@@ -0,0 +1,20 @@
1
+ import type { PipelineExecutor } from '../../../execution/PipelineExecutor';
2
+ import type { PipelineJson } from '../../../pipeline/PipelineJson/PipelineJson';
3
+ import type { PrepareAndScrapeOptions } from '../../../prepare/PrepareAndScrapeOptions';
4
+ import type { RunCommandCliOptions } from './runCommandAction';
5
+ /**
6
+ * Prepares the tools, pipeline, and executor required to run one `ptbk run` invocation.
7
+ *
8
+ * @private internal utility of `$initializeRunCommand`
9
+ */
10
+ export declare function prepareRunCommandResources(options: {
11
+ readonly pipelineSource?: string;
12
+ readonly cliOptions: RunCommandCliOptions;
13
+ readonly prepareAndScrapeOptions: Pick<PrepareAndScrapeOptions, 'isVerbose'> & {
14
+ readonly isCacheReloaded: boolean;
15
+ };
16
+ readonly logStage: (stage: string) => void;
17
+ }): Promise<{
18
+ readonly pipeline: PipelineJson;
19
+ readonly pipelineExecutor: PipelineExecutor;
20
+ }>;
@@ -0,0 +1,12 @@
1
+ import type { PipelineJson } from '../../../pipeline/PipelineJson/PipelineJson';
2
+ import type { string_parameter_name, string_parameter_value } from '../../../types/string_name';
3
+ /**
4
+ * Resolves all missing input parameters while keeping the current interactive and non-interactive behavior.
5
+ *
6
+ * @private internal utility of `$initializeRunCommand`
7
+ */
8
+ export declare function resolveRunInputParameters(options: {
9
+ readonly pipeline: PipelineJson;
10
+ readonly inputParameters: Record<string_parameter_name, string_parameter_value>;
11
+ readonly isInteractive: boolean;
12
+ }): Promise<Record<string_parameter_name, string_parameter_value>>;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * CLI options consumed by the `run` command action.
3
+ *
4
+ * @private internal utility of `$initializeRunCommand`
5
+ */
6
+ export type RunCommandCliOptions = {
7
+ readonly reload: boolean;
8
+ readonly interactive: boolean;
9
+ readonly formfactor: boolean;
10
+ readonly json?: string;
11
+ readonly verbose: boolean;
12
+ readonly saveReport?: string;
13
+ readonly provider: string;
14
+ readonly remoteServerUrl: string;
15
+ };
16
+ /**
17
+ * Runs the whole `ptbk run` flow as a top-down orchestration of focused steps.
18
+ *
19
+ * @private internal utility of `$initializeRunCommand`
20
+ */
21
+ export declare function runCommandAction(pipelineSource: string | undefined, cliOptions: RunCommandCliOptions): Promise<void | never>;
@@ -0,0 +1,14 @@
1
+ import type { PipelineExecutor } from '../../../execution/PipelineExecutor';
2
+ import type { string_parameter_name, string_parameter_value } from '../../../types/string_name';
3
+ /**
4
+ * Executes the pipeline, persists any requested report, and prints the final CLI output.
5
+ *
6
+ * @private internal utility of `$initializeRunCommand`
7
+ */
8
+ export declare function runPipelineExecution(options: {
9
+ readonly pipelineExecutor: PipelineExecutor;
10
+ readonly inputParameters: Record<string_parameter_name, string_parameter_value>;
11
+ readonly isVerbose: boolean;
12
+ readonly json?: string;
13
+ readonly saveReport?: string;
14
+ }): Promise<void>;
@@ -1,4 +1,4 @@
1
- import type { Command as Program } from 'commander';
1
+ import { Command as Program } from 'commander';
2
2
  import type { $side_effect } from '../../utils/organization/$side_effect';
3
3
  /**
4
4
  * Initializes `run` command for Promptbook CLI utilities
@@ -0,0 +1,8 @@
1
+ import type { $PipelineJson } from '../../commands/_common/types/CommandParser';
2
+ import type { MarkdownSection } from '../../utils/markdown/parseMarkdownSection';
3
+ /**
4
+ * Applies the pipeline head title, description, and head-level commands.
5
+ *
6
+ * @private internal utility of `parsePipeline`
7
+ */
8
+ export declare function applyPipelineHead(pipelineHead: MarkdownSection, $pipelineJson: $PipelineJson): void;
@@ -0,0 +1,8 @@
1
+ import type { $PipelineJson } from '../../commands/_common/types/CommandParser';
2
+ import type { PipelineString } from '../../pipeline/PipelineString';
3
+ /**
4
+ * Creates the mutable pipeline JSON structure used throughout parsing.
5
+ *
6
+ * @private internal utility of `parsePipeline`
7
+ */
8
+ export declare function createInitialPipelineJson(pipelineString: PipelineString): $PipelineJson;
@@ -0,0 +1,14 @@
1
+ import type { string_name } from '../../types/string_name';
2
+ import type { MarkdownSection } from '../../utils/markdown/parseMarkdownSection';
3
+ /**
4
+ * Resolves a unique task name for one parsed markdown section title.
5
+ *
6
+ * @private internal type of `parsePipeline`
7
+ */
8
+ export type UniqueSectionNameResolver = (title: string) => string_name;
9
+ /**
10
+ * Creates stable unique task names for duplicate section titles.
11
+ *
12
+ * @private internal utility of `parsePipeline`
13
+ */
14
+ export declare function createUniqueSectionNameResolver(pipelineSections: ReadonlyArray<MarkdownSection>): UniqueSectionNameResolver;
@@ -0,0 +1,8 @@
1
+ import type { ParameterCommand } from '../../commands/PARAMETER/ParameterCommand';
2
+ import type { $PipelineJson } from '../../commands/_common/types/CommandParser';
3
+ /**
4
+ * Merges one parameter declaration into the mutable pipeline parameter list.
5
+ *
6
+ * @private internal utility of `parsePipeline`
7
+ */
8
+ export declare function defineParameter($pipelineJson: $PipelineJson, parameterCommand: Omit<ParameterCommand, 'type'>): void;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Extracts the plain-text description from a head or task section body.
3
+ *
4
+ * @private internal utility of `parsePipeline`
5
+ */
6
+ export declare function extractPipelineDescription(sectionContent: string): string | undefined;
@@ -0,0 +1,8 @@
1
+ import type { $PipelineJson } from '../../commands/_common/types/CommandParser';
2
+ import type { PipelineJson } from '../../pipeline/PipelineJson/PipelineJson';
3
+ /**
4
+ * Applies postprocessing and exports the parsed pipeline JSON.
5
+ *
6
+ * @private internal utility of `parsePipeline`
7
+ */
8
+ export declare function finalizeParsedPipeline($pipelineJson: $PipelineJson): PipelineJson;
@@ -0,0 +1,7 @@
1
+ import type { $PipelineJson } from '../../commands/_common/types/CommandParser';
2
+ /**
3
+ * Builds a short file/url identification block for parse errors.
4
+ *
5
+ * @private internal utility of `parsePipeline`
6
+ */
7
+ export declare function getPipelineIdentification($pipelineJson: $PipelineJson): string;
@@ -0,0 +1,18 @@
1
+ import type { $PipelineJson } from '../../commands/_common/types/CommandParser';
2
+ import type { MarkdownSection } from '../../utils/markdown/parseMarkdownSection';
3
+ import type { PipelineString } from '../../pipeline/PipelineString';
4
+ /**
5
+ * Parsed markdown structure split into the pipeline head and task sections.
6
+ *
7
+ * @private internal type of `parsePipeline`
8
+ */
9
+ export type ParsedPipelineSections = {
10
+ readonly pipelineHead: MarkdownSection;
11
+ readonly pipelineSections: ReadonlyArray<MarkdownSection>;
12
+ };
13
+ /**
14
+ * Splits the prepared markdown into the pipeline head and task sections.
15
+ *
16
+ * @private internal utility of `parsePipeline`
17
+ */
18
+ export declare function parsePreparedPipelineSections(pipelineString: PipelineString, $pipelineJson: $PipelineJson): ParsedPipelineSections;
@@ -0,0 +1,8 @@
1
+ import type { $PipelineJson } from '../../commands/_common/types/CommandParser';
2
+ import type { PipelineString } from '../../pipeline/PipelineString';
3
+ /**
4
+ * Removes shebang/comments and normalizes markdown into a parseable pipeline form.
5
+ *
6
+ * @private internal utility of `parsePipeline`
7
+ */
8
+ export declare function preparePipelineString(pipelineString: PipelineString, $pipelineJson: $PipelineJson): PipelineString;
@@ -0,0 +1,9 @@
1
+ import type { $PipelineJson } from '../../commands/_common/types/CommandParser';
2
+ import type { MarkdownSection } from '../../utils/markdown/parseMarkdownSection';
3
+ import type { UniqueSectionNameResolver } from './createUniqueSectionNameResolver';
4
+ /**
5
+ * Parses, applies, and persists one h2 task section.
6
+ *
7
+ * @private internal utility of `parsePipeline`
8
+ */
9
+ export declare function processPipelineSection(pipelineSection: MarkdownSection, $pipelineJson: $PipelineJson, getUniqueSectionName: UniqueSectionNameResolver): void;
@@ -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-70`).
18
+ * It follows semantic versioning (e.g., `0.112.0-71`).
19
19
  *
20
20
  * @generated
21
21
  */