@promptbook/types 0.114.0-30 → 0.114.0-31

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.
@@ -0,0 +1,9 @@
1
+ import type { PromptRunnerHarnessName } from '../common/promptRunnerCliOptions';
2
+ /**
3
+ * Offers to add missing project-local ignore rules for the selected coding harness.
4
+ *
5
+ * Note: `$` is used to indicate that this function is not a pure function - it may ask the user and update `.gitignore`.
6
+ *
7
+ * @private internal utility of `ptbk coder`
8
+ */
9
+ export declare function $ensureCoderHarnessGitignoreRules(projectPath: string, harnessName: PromptRunnerHarnessName | undefined): Promise<void>;
@@ -1,7 +1,20 @@
1
+ import { type PromptRunnerHarnessName } from '../common/promptRunnerCliOptions';
1
2
  import type { InitializationStatus } from './boilerplateTemplates';
2
3
  /**
3
- * Ensures `.gitignore` contains the standalone Promptbook temp entry.
4
+ * Ensures `.gitignore` contains Promptbook Coder's local artifacts and every supported harness's local artifacts.
4
5
  *
5
6
  * @private function of `initializeCoderProjectConfiguration`
6
7
  */
7
8
  export declare function ensureCoderGitignoreFile(projectPath: string): Promise<InitializationStatus>;
9
+ /**
10
+ * Lists missing project-local ignore rules for the selected harnesses.
11
+ *
12
+ * @private internal utility of `ptbk coder`
13
+ */
14
+ export declare function getMissingCoderHarnessGitignoreRules(projectPath: string, harnessNames: ReadonlyArray<PromptRunnerHarnessName>): Promise<ReadonlyArray<string>>;
15
+ /**
16
+ * Adds the given Promptbook Coder rules to a project's `.gitignore` file.
17
+ *
18
+ * @private internal utility of `ptbk coder`
19
+ */
20
+ export declare function ensureCoderGitignoreRules(projectPath: string, rules: ReadonlyArray<string>): Promise<InitializationStatus>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Asks the user in the terminal to confirm one optional change.
3
+ *
4
+ * Note: `$` is used to indicate that this function is not a pure function - it reads the answer from stdin.
5
+ *
6
+ * @returns `true` when the user confirms, `false` when the user declines or the terminal is not interactive.
7
+ * @private internal utility of `promptbookCli`
8
+ */
9
+ export declare function $askForConfirmation(question: string): Promise<boolean>;
@@ -45,6 +45,10 @@ export type HarnessDefinition = {
45
45
  * Extra environment variables required by the global npm installation of this harness.
46
46
  */
47
47
  readonly npmInstallEnvironment?: Readonly<Record<string, string>>;
48
+ /**
49
+ * Project-local files or directories which this harness can create and which should not be committed.
50
+ */
51
+ readonly projectGitignoreRules: ReadonlyArray<string>;
48
52
  /**
49
53
  * How a standalone installation of this harness is recognized and updated.
50
54
  *
@@ -64,3 +68,9 @@ export declare const HARNESS_DEFINITIONS: Readonly<Record<PromptRunnerHarnessNam
64
68
  * @private internal utility of `promptbookCli`
65
69
  */
66
70
  export declare function getHarnessDefinition(harnessName: PromptRunnerHarnessName): HarnessDefinition;
71
+ /**
72
+ * Lists the unique project ignore rules required by the selected harnesses, in selection order.
73
+ *
74
+ * @private internal utility of `promptbookCli`
75
+ */
76
+ export declare function getHarnessProjectGitignoreRules(harnessNames: ReadonlyArray<PromptRunnerHarnessName>): ReadonlyArray<string>;
@@ -50,6 +50,12 @@ export declare function ensureProjectEnvFile<TEnvVariable extends ProjectEnvVari
50
50
  * @private internal utility of Promptbook CLI project initialization
51
51
  */
52
52
  export declare function ensureProjectGitignoreFile({ projectPath, blockHeader, rules, }: EnsureProjectGitignoreFileOptions): Promise<ProjectInitializationStatus>;
53
+ /**
54
+ * Lists the ignore rules which are not yet present in a project's `.gitignore` file.
55
+ *
56
+ * @private internal utility of Promptbook CLI project initialization
57
+ */
58
+ export declare function getMissingProjectGitignoreRules(projectPath: string, rules: ReadonlyArray<string>): Promise<ReadonlyArray<string>>;
53
59
  /**
54
60
  * Reads one text file when it exists, otherwise returns `undefined`.
55
61
  *
@@ -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-29`).
18
+ * It follows semantic versioning (e.g., `0.114.0-30`).
19
19
  *
20
20
  * @generated
21
21
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/types",
3
- "version": "0.114.0-30",
3
+ "version": "0.114.0-31",
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,
@@ -96,6 +96,6 @@
96
96
  "types": "./esm/src/_packages/types.index.d.ts",
97
97
  "typings": "./esm/src/_packages/types.index.d.ts",
98
98
  "peerDependencies": {
99
- "@promptbook/core": "0.114.0-30"
99
+ "@promptbook/core": "0.114.0-31"
100
100
  }
101
101
  }
@@ -0,0 +1,9 @@
1
+ import type { PromptRunnerHarnessName } from '../common/promptRunnerCliOptions';
2
+ /**
3
+ * Offers to add missing project-local ignore rules for the selected coding harness.
4
+ *
5
+ * Note: `$` is used to indicate that this function is not a pure function - it may ask the user and update `.gitignore`.
6
+ *
7
+ * @private internal utility of `ptbk coder`
8
+ */
9
+ export declare function $ensureCoderHarnessGitignoreRules(projectPath: string, harnessName: PromptRunnerHarnessName | undefined): Promise<void>;
@@ -1,7 +1,20 @@
1
+ import { type PromptRunnerHarnessName } from '../common/promptRunnerCliOptions';
1
2
  import type { InitializationStatus } from './boilerplateTemplates';
2
3
  /**
3
- * Ensures `.gitignore` contains the standalone Promptbook temp entry.
4
+ * Ensures `.gitignore` contains Promptbook Coder's local artifacts and every supported harness's local artifacts.
4
5
  *
5
6
  * @private function of `initializeCoderProjectConfiguration`
6
7
  */
7
8
  export declare function ensureCoderGitignoreFile(projectPath: string): Promise<InitializationStatus>;
9
+ /**
10
+ * Lists missing project-local ignore rules for the selected harnesses.
11
+ *
12
+ * @private internal utility of `ptbk coder`
13
+ */
14
+ export declare function getMissingCoderHarnessGitignoreRules(projectPath: string, harnessNames: ReadonlyArray<PromptRunnerHarnessName>): Promise<ReadonlyArray<string>>;
15
+ /**
16
+ * Adds the given Promptbook Coder rules to a project's `.gitignore` file.
17
+ *
18
+ * @private internal utility of `ptbk coder`
19
+ */
20
+ export declare function ensureCoderGitignoreRules(projectPath: string, rules: ReadonlyArray<string>): Promise<InitializationStatus>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Asks the user in the terminal to confirm one optional change.
3
+ *
4
+ * Note: `$` is used to indicate that this function is not a pure function - it reads the answer from stdin.
5
+ *
6
+ * @returns `true` when the user confirms, `false` when the user declines or the terminal is not interactive.
7
+ * @private internal utility of `promptbookCli`
8
+ */
9
+ export declare function $askForConfirmation(question: string): Promise<boolean>;
@@ -45,6 +45,10 @@ export type HarnessDefinition = {
45
45
  * Extra environment variables required by the global npm installation of this harness.
46
46
  */
47
47
  readonly npmInstallEnvironment?: Readonly<Record<string, string>>;
48
+ /**
49
+ * Project-local files or directories which this harness can create and which should not be committed.
50
+ */
51
+ readonly projectGitignoreRules: ReadonlyArray<string>;
48
52
  /**
49
53
  * How a standalone installation of this harness is recognized and updated.
50
54
  *
@@ -64,3 +68,9 @@ export declare const HARNESS_DEFINITIONS: Readonly<Record<PromptRunnerHarnessNam
64
68
  * @private internal utility of `promptbookCli`
65
69
  */
66
70
  export declare function getHarnessDefinition(harnessName: PromptRunnerHarnessName): HarnessDefinition;
71
+ /**
72
+ * Lists the unique project ignore rules required by the selected harnesses, in selection order.
73
+ *
74
+ * @private internal utility of `promptbookCli`
75
+ */
76
+ export declare function getHarnessProjectGitignoreRules(harnessNames: ReadonlyArray<PromptRunnerHarnessName>): ReadonlyArray<string>;
@@ -50,6 +50,12 @@ export declare function ensureProjectEnvFile<TEnvVariable extends ProjectEnvVari
50
50
  * @private internal utility of Promptbook CLI project initialization
51
51
  */
52
52
  export declare function ensureProjectGitignoreFile({ projectPath, blockHeader, rules, }: EnsureProjectGitignoreFileOptions): Promise<ProjectInitializationStatus>;
53
+ /**
54
+ * Lists the ignore rules which are not yet present in a project's `.gitignore` file.
55
+ *
56
+ * @private internal utility of Promptbook CLI project initialization
57
+ */
58
+ export declare function getMissingProjectGitignoreRules(projectPath: string, rules: ReadonlyArray<string>): Promise<ReadonlyArray<string>>;
53
59
  /**
54
60
  * Reads one text file when it exists, otherwise returns `undefined`.
55
61
  *
@@ -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-29`).
18
+ * It follows semantic versioning (e.g., `0.114.0-30`).
19
19
  *
20
20
  * @generated
21
21
  */