@promptbook/documents 0.114.0-49 → 0.114.0-50
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 +3 -3
- package/esm/index.es.js +3 -2
- package/esm/index.es.js.map +1 -1
- package/esm/src/cli/cli-commands/coder/add.d.ts +7 -2
- package/esm/src/cli/cli-commands/coder/ensureCoderGitattributesFile.d.ts +13 -0
- package/esm/src/cli/cli-commands/coder/ensureCoderGitignoreFile.d.ts +1 -1
- package/esm/src/cli/cli-commands/coder/fix.d.ts +7 -0
- package/esm/src/cli/cli-commands/coder/fix.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/coder/fixWorkflow.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/coder/initializeCoderProjectConfiguration.d.ts +1 -0
- package/esm/src/cli/cli-commands/coder.d.ts +1 -0
- package/esm/src/cli/cli-commands/common/coderCheckCliOptions.d.ts +1 -1
- package/esm/src/cli/cli-commands/common/ensureProjectTextFile.d.ts +7 -0
- package/esm/src/cli/cli-commands/common/harness/$ensureHarnessInstallations.d.ts +3 -1
- package/esm/src/cli/cli-commands/common/validateCoderRunOptions.d.ts +1 -1
- package/esm/src/cli/cli-commands/common/workspaceRepository.d.ts +12 -0
- package/esm/src/version.d.ts +1 -1
- package/package.json +2 -2
- package/umd/index.umd.js +3 -2
- package/umd/index.umd.js.map +1 -1
- package/umd/src/cli/cli-commands/coder/add.d.ts +7 -2
- package/umd/src/cli/cli-commands/coder/ensureCoderGitattributesFile.d.ts +13 -0
- package/umd/src/cli/cli-commands/coder/ensureCoderGitignoreFile.d.ts +1 -1
- package/umd/src/cli/cli-commands/coder/fix.d.ts +7 -0
- package/umd/src/cli/cli-commands/coder/fix.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/coder/fixWorkflow.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/coder/initializeCoderProjectConfiguration.d.ts +1 -0
- package/umd/src/cli/cli-commands/coder.d.ts +1 -0
- package/umd/src/cli/cli-commands/common/coderCheckCliOptions.d.ts +1 -1
- package/umd/src/cli/cli-commands/common/ensureProjectTextFile.d.ts +7 -0
- package/umd/src/cli/cli-commands/common/harness/$ensureHarnessInstallations.d.ts +3 -1
- package/umd/src/cli/cli-commands/common/validateCoderRunOptions.d.ts +1 -1
- package/umd/src/cli/cli-commands/common/workspaceRepository.d.ts +12 -0
- package/umd/src/version.d.ts +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Command as Program } from 'commander';
|
|
2
2
|
import type { $side_effect } from '../../../utils/organization/$side_effect';
|
|
3
|
+
import { type ResolvedCoderPromptTemplate } from './boilerplateTemplates';
|
|
3
4
|
/**
|
|
4
5
|
* Initializes `coder add` command for Promptbook CLI utilities
|
|
5
6
|
*
|
|
@@ -28,11 +29,13 @@ export type AddCoderPromptResult = {
|
|
|
28
29
|
*
|
|
29
30
|
* @private internal utility of `coder add` command
|
|
30
31
|
*/
|
|
31
|
-
export declare function addCoderPrompt({ projectPath, description, priority, templateOption, }: {
|
|
32
|
+
export declare function addCoderPrompt({ projectPath, description, priority, templateOption, promptTemplate, }: {
|
|
32
33
|
readonly projectPath: string;
|
|
33
34
|
readonly description: string;
|
|
34
35
|
readonly priority: number;
|
|
35
36
|
readonly templateOption?: string;
|
|
37
|
+
/** Internal authoring workflows may supply their own bounded instructions instead of the feature template. */
|
|
38
|
+
readonly promptTemplate?: ResolvedCoderPromptTemplate;
|
|
36
39
|
}): Promise<AddCoderPromptResult>;
|
|
37
40
|
/**
|
|
38
41
|
* Prepares a numbered, emoji-tagged prompt for preview without writing the prompt file.
|
|
@@ -40,13 +43,15 @@ export declare function addCoderPrompt({ projectPath, description, priority, tem
|
|
|
40
43
|
*
|
|
41
44
|
* @private internal utility shared by `coder add` and `coder plan`
|
|
42
45
|
*/
|
|
43
|
-
export declare function prepareCoderPrompt({ projectPath, description, priority, templateOption, numberOffset, reservedEmojiTag, }: {
|
|
46
|
+
export declare function prepareCoderPrompt({ projectPath, description, priority, templateOption, numberOffset, reservedEmojiTag, promptTemplate: providedPromptTemplate, }: {
|
|
44
47
|
readonly projectPath: string;
|
|
45
48
|
readonly description: string;
|
|
46
49
|
readonly priority: number;
|
|
47
50
|
readonly templateOption?: string;
|
|
48
51
|
readonly numberOffset?: number;
|
|
49
52
|
readonly reservedEmojiTag?: string;
|
|
53
|
+
/** Shared repair authoring preserves numbering and tags without appending ordinary implementation instructions. */
|
|
54
|
+
readonly promptTemplate?: ResolvedCoderPromptTemplate;
|
|
50
55
|
}): Promise<AddCoderPromptResult & {
|
|
51
56
|
readonly content: string;
|
|
52
57
|
}>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { InitializationStatus } from './boilerplateTemplates';
|
|
2
|
+
/**
|
|
3
|
+
* Project-relative path to the Git attributes initialized by Promptbook Coder.
|
|
4
|
+
*
|
|
5
|
+
* @private internal constant of `coder init`
|
|
6
|
+
*/
|
|
7
|
+
export declare const CODER_GITATTRIBUTES_FILE_PATH = ".gitattributes";
|
|
8
|
+
/**
|
|
9
|
+
* Creates default Git attributes when missing, preserving project-owned attributes.
|
|
10
|
+
*
|
|
11
|
+
* @private function of `initializeCoderProjectConfiguration`
|
|
12
|
+
*/
|
|
13
|
+
export declare function ensureCoderGitattributesFile(projectPath: string): Promise<InitializationStatus>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type PromptRunnerHarnessName } from '../common/promptRunnerCliOptions';
|
|
2
2
|
import type { InitializationStatus } from './boilerplateTemplates';
|
|
3
3
|
/**
|
|
4
|
-
* Ensures `.gitignore`
|
|
4
|
+
* Ensures `.gitignore` covers local dependencies, coder artifacts and every supported harness's local artifacts.
|
|
5
5
|
*
|
|
6
6
|
* @private function of `initializeCoderProjectConfiguration`
|
|
7
7
|
*/
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Command as Program } from 'commander';
|
|
2
|
+
import type { $side_effect } from '../../../utils/organization/$side_effect';
|
|
3
|
+
/**
|
|
4
|
+
* Registers a finite check-repair command with the shared parser, defaults and execution policy.
|
|
5
|
+
* @private internal CLI command registration
|
|
6
|
+
*/
|
|
7
|
+
export declare function $initializeCoderFixCommand(program: Program): $side_effect;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -15,6 +15,7 @@ export type CoderInitializationSummary = {
|
|
|
15
15
|
readonly adamAgentFileDiagnostic?: string;
|
|
16
16
|
readonly envFileStatus: InitializationStatus;
|
|
17
17
|
readonly gitignoreFileStatus: InitializationStatus;
|
|
18
|
+
readonly gitattributesFileStatus: InitializationStatus;
|
|
18
19
|
readonly packageJsonFileStatus: InitializationStatus;
|
|
19
20
|
readonly vscodeSettingsFileStatus: InitializationStatus;
|
|
20
21
|
readonly addedPackageJsonScriptNames: ReadonlyArray<string>;
|
|
@@ -11,6 +11,7 @@ import type { $side_effect } from '../../utils/organization/$side_effect';
|
|
|
11
11
|
* - find-refactor-candidates: Find files that need refactoring
|
|
12
12
|
* - list: List ready prompts in priority order without running them
|
|
13
13
|
* - run: Run coding prompts with AI agents
|
|
14
|
+
* - fix: Check and repair the project, then exit without processing the queue
|
|
14
15
|
* - ping: Test one harness and model with a tiny dummy prompt
|
|
15
16
|
* - verify: Verify completed prompts
|
|
16
17
|
* - find-fresh-emoji-tags: Find unused emoji tags
|
|
@@ -8,7 +8,7 @@ export declare const LEGACY_CODER_CHECK_OPTIONS: readonly [readonly ["--test", "
|
|
|
8
8
|
* Registers the shared project check command and rejects retired aggregate-test spellings.
|
|
9
9
|
* @private shared CLI registration for Coder execution
|
|
10
10
|
*/
|
|
11
|
-
export declare function addCoderCheckOptions(command: Command, isCheckBeforeSupported: boolean): void;
|
|
11
|
+
export declare function addCoderCheckOptions(command: Command, isCheckBeforeSupported: boolean, description?: string): void;
|
|
12
12
|
/**
|
|
13
13
|
* Builds the same actionable migration diagnostic for registered and direct-script entrypoints.
|
|
14
14
|
* @private shared CLI diagnostic for Coder execution
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ProjectInitializationStatus } from './projectInitialization';
|
|
2
|
+
/**
|
|
3
|
+
* Creates one project text file with default content, preserving any existing file.
|
|
4
|
+
*
|
|
5
|
+
* @private internal utility of Promptbook CLI project initialization
|
|
6
|
+
*/
|
|
7
|
+
export declare function ensureProjectTextFile(projectPath: string, relativeFilePath: string, fileContent: string): Promise<ProjectInitializationStatus>;
|
|
@@ -11,4 +11,6 @@ import type { NormalizedQuestionsCliOptions } from '../questionsCliOptions';
|
|
|
11
11
|
*
|
|
12
12
|
* @private internal utility of `promptbookCli`
|
|
13
13
|
*/
|
|
14
|
-
export declare function $ensureHarnessInstallations(harnessNames: ReadonlyArray<PromptRunnerHarnessName | undefined>, questionsOptions: NormalizedQuestionsCliOptions
|
|
14
|
+
export declare function $ensureHarnessInstallations(harnessNames: ReadonlyArray<PromptRunnerHarnessName | undefined>, questionsOptions: NormalizedQuestionsCliOptions, options?: {
|
|
15
|
+
readonly isRequired?: boolean;
|
|
16
|
+
}): Promise<void>;
|
|
@@ -3,4 +3,4 @@ import type { RunOptions } from '../../../../scripts/run-codex-prompts/cli/RunOp
|
|
|
3
3
|
* Validates cross-flag constraints before workspace setup or the run starts.
|
|
4
4
|
* @private shared validation for Coder execution commands
|
|
5
5
|
*/
|
|
6
|
-
export declare function validateCoderRunOptions(options: RunOptions): void;
|
|
6
|
+
export declare function validateCoderRunOptions(options: Pick<RunOptions, 'checkCommand' | 'checkBefore' | 'allowDestructiveAutoMigrate' | 'autoMigrate' | 'noCommit' | 'waitForUser' | 'gitChanges' | 'autoPull' | 'dryRun' | 'isIsolated' | 'limit'>): void;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/// <reference types="node" />
|
|
1
3
|
import type { NormalizedQuestionsCliOptions } from './questionsCliOptions';
|
|
2
4
|
/**
|
|
3
5
|
* Resolved project directory and its enclosing working tree. Project artifacts belong to `projectPath`;
|
|
@@ -34,3 +36,13 @@ export declare function $preflightWorkspaceRepository(options: {
|
|
|
34
36
|
readonly projectDirectory?: string;
|
|
35
37
|
readonly policy: WorkspaceRepositoryPolicy;
|
|
36
38
|
} & Partial<NormalizedQuestionsCliOptions>): Promise<WorkspaceRepositoryContext>;
|
|
39
|
+
/**
|
|
40
|
+
* Executes Git without a shell, optional index locks, or credential prompts, retaining raw output boundaries.
|
|
41
|
+
* Drains both output streams without execFile's fixed buffer limit so large repository listings remain complete.
|
|
42
|
+
* @private shared Git discovery and commit-scope inspection
|
|
43
|
+
*/
|
|
44
|
+
export declare function $runWorkspaceGit(projectPath: string, argumentsList: ReadonlyArray<string>, options?: {
|
|
45
|
+
readonly env?: Record<string, string>;
|
|
46
|
+
readonly signal?: AbortSignal;
|
|
47
|
+
readonly input?: string | Buffer;
|
|
48
|
+
}): Promise<string>;
|
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-49`).
|
|
19
19
|
*
|
|
20
20
|
* @generated
|
|
21
21
|
*/
|