@promptbook/cli 0.112.0-26 → 0.112.0-27
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 +240 -61
- package/esm/index.es.js.map +1 -1
- package/esm/scripts/run-codex-prompts/git/agentGitIdentity.d.ts +13 -6
- package/esm/scripts/run-codex-prompts/git/commitChanges.d.ts +2 -1
- package/esm/src/book-2.0/agent-source/createAgentModelRequirements.useCommitmentAggregation.test.d.ts +1 -0
- package/esm/src/book-components/_common/MenuHoisting/MenuHoistingContext.d.ts +0 -47
- package/esm/src/commitments/USE/aggregateUseCommitmentSystemMessages.d.ts +30 -0
- package/esm/src/commitments/USE_BROWSER/USE_BROWSER.d.ts +3 -2
- package/esm/src/version.d.ts +1 -1
- package/package.json +1 -1
- package/umd/index.umd.js +240 -61
- package/umd/index.umd.js.map +1 -1
- package/umd/scripts/run-codex-prompts/git/agentGitIdentity.d.ts +13 -6
- package/umd/scripts/run-codex-prompts/git/commitChanges.d.ts +2 -1
- package/umd/src/book-2.0/agent-source/createAgentModelRequirements.useCommitmentAggregation.test.d.ts +1 -0
- package/umd/src/book-components/_common/MenuHoisting/MenuHoistingContext.d.ts +0 -47
- package/umd/src/commitments/USE/aggregateUseCommitmentSystemMessages.d.ts +30 -0
- package/umd/src/commitments/USE_BROWSER/USE_BROWSER.d.ts +3 -2
- package/umd/src/version.d.ts +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Git identity details that
|
|
2
|
+
* Git identity details that drive commits created by the coding agent.
|
|
3
3
|
*/
|
|
4
4
|
export type AgentGitIdentity = {
|
|
5
5
|
readonly name: string;
|
|
@@ -7,14 +7,21 @@ export type AgentGitIdentity = {
|
|
|
7
7
|
readonly signingKey: string;
|
|
8
8
|
};
|
|
9
9
|
/**
|
|
10
|
-
* Reads the
|
|
10
|
+
* Reads the optional agent identity values from the environment.
|
|
11
|
+
*
|
|
12
|
+
* Falls back to the user's default Git configuration whenever the dedicated coding-agent
|
|
13
|
+
* identity is only partially configured.
|
|
11
14
|
*/
|
|
12
|
-
export declare function getAgentGitIdentity(): AgentGitIdentity;
|
|
15
|
+
export declare function getAgentGitIdentity(): AgentGitIdentity | undefined;
|
|
13
16
|
/**
|
|
14
|
-
* Builds the environment overrides that ensure git commits use the agent identity instead of the primary user.
|
|
17
|
+
* Builds the environment overrides that ensure git commits use the dedicated agent identity instead of the primary user.
|
|
15
18
|
*/
|
|
16
|
-
export declare function buildAgentGitEnv(identity?: AgentGitIdentity): Record<string, string
|
|
19
|
+
export declare function buildAgentGitEnv(identity?: AgentGitIdentity | undefined): Record<string, string> | undefined;
|
|
17
20
|
/**
|
|
18
21
|
* Produces the git commit flag that enforces signing with the configured agent key.
|
|
19
22
|
*/
|
|
20
|
-
export declare function buildAgentGitSigningFlag(identity?: AgentGitIdentity): string;
|
|
23
|
+
export declare function buildAgentGitSigningFlag(identity?: AgentGitIdentity | undefined): string | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* Prints a one-time style tip when coding-agent commits fall back to the user's default Git configuration.
|
|
26
|
+
*/
|
|
27
|
+
export declare function printAgentGitIdentityTipIfNeeded(): void;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Commits staged changes with the provided message using the
|
|
2
|
+
* Commits staged changes with the provided message using the dedicated coding-agent identity when configured,
|
|
3
|
+
* otherwise falls back to the default Git configuration.
|
|
3
4
|
*/
|
|
4
5
|
export declare function commitChanges(message: string): Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -26,45 +26,6 @@ export type HoistedMenuItem = {
|
|
|
26
26
|
*/
|
|
27
27
|
isActive?: boolean;
|
|
28
28
|
};
|
|
29
|
-
/**
|
|
30
|
-
* Shared actions provided to hoisted mobile menu-section renderers.
|
|
31
|
-
*
|
|
32
|
-
* @private mechanism inside Promptbook
|
|
33
|
-
*/
|
|
34
|
-
export type HoistedMobileMenuSectionRenderOptions = {
|
|
35
|
-
/**
|
|
36
|
-
* Closes the owning mobile header menu.
|
|
37
|
-
*/
|
|
38
|
-
readonly closeMenu: () => void;
|
|
39
|
-
};
|
|
40
|
-
/**
|
|
41
|
-
* Mobile-only section hoisted into the shared application menu.
|
|
42
|
-
*
|
|
43
|
-
* @private mechanism inside Promptbook
|
|
44
|
-
*/
|
|
45
|
-
export type HoistedMobileMenuSection = {
|
|
46
|
-
/**
|
|
47
|
-
* Stable identifier used to preserve section open state.
|
|
48
|
-
*/
|
|
49
|
-
readonly key: string;
|
|
50
|
-
/**
|
|
51
|
-
* Visible section label rendered by the mobile menu.
|
|
52
|
-
*/
|
|
53
|
-
readonly label: ReactNode;
|
|
54
|
-
/**
|
|
55
|
-
* Whether the section should start expanded whenever the menu opens.
|
|
56
|
-
*/
|
|
57
|
-
readonly isDefaultOpen?: boolean;
|
|
58
|
-
/**
|
|
59
|
-
* Lazily renders section content inside the mobile header menu.
|
|
60
|
-
*/
|
|
61
|
-
readonly renderContent: (options: HoistedMobileMenuSectionRenderOptions) => ReactNode;
|
|
62
|
-
};
|
|
63
|
-
/**
|
|
64
|
-
* Value exposed through the shared menu-hoisting context.
|
|
65
|
-
*
|
|
66
|
-
* @private mechanism inside Promptbook
|
|
67
|
-
*/
|
|
68
29
|
type MenuHoistingContextType = {
|
|
69
30
|
/**
|
|
70
31
|
* The currently hoisted menu items
|
|
@@ -74,14 +35,6 @@ type MenuHoistingContextType = {
|
|
|
74
35
|
* Set the hoisted menu items
|
|
75
36
|
*/
|
|
76
37
|
setMenu: (items: HoistedMenuItem[]) => void;
|
|
77
|
-
/**
|
|
78
|
-
* Mobile-only sections hoisted into the shared application menu.
|
|
79
|
-
*/
|
|
80
|
-
mobileMenuSections: HoistedMobileMenuSection[];
|
|
81
|
-
/**
|
|
82
|
-
* Sets the mobile-only hoisted menu sections.
|
|
83
|
-
*/
|
|
84
|
-
setMobileMenuSections: (sections: HoistedMobileMenuSection[]) => void;
|
|
85
38
|
};
|
|
86
39
|
/**
|
|
87
40
|
* Provider for menu hoisting
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { AgentModelRequirements } from '../../book-2.0/agent-source/AgentModelRequirements';
|
|
2
|
+
import type { ParsedCommitment } from '../_base/ParsedCommitment';
|
|
3
|
+
/**
|
|
4
|
+
* `USE` commitment types whose system-message sections are aggregated after the
|
|
5
|
+
* commitment-by-commitment application step.
|
|
6
|
+
*
|
|
7
|
+
* @private internal utility of `createAgentModelRequirementsWithCommitments`
|
|
8
|
+
*/
|
|
9
|
+
type AggregatedUseCommitmentType = 'USE BROWSER' | 'USE SEARCH ENGINE' | 'USE TIME';
|
|
10
|
+
/**
|
|
11
|
+
* Adds the placeholder for an aggregated `USE` system-message section only once, preserving the section position from the first occurrence.
|
|
12
|
+
*
|
|
13
|
+
* @param requirements - Current model requirements.
|
|
14
|
+
* @param type - Aggregated `USE` commitment type being applied.
|
|
15
|
+
* @returns Requirements with the placeholder inserted when it was not already present.
|
|
16
|
+
* @private internal utility of `USE` commitments
|
|
17
|
+
*/
|
|
18
|
+
export declare function appendAggregatedUseCommitmentPlaceholder(requirements: AgentModelRequirements, type: AggregatedUseCommitmentType): AgentModelRequirements;
|
|
19
|
+
/**
|
|
20
|
+
* Replaces temporary `USE` placeholders with one aggregated system-message block per commitment type.
|
|
21
|
+
*
|
|
22
|
+
* Distinct additional-instruction blocks are merged in stable source order while the hard-coded section is emitted only once.
|
|
23
|
+
*
|
|
24
|
+
* @param requirements - Model requirements produced by commitment-by-commitment application.
|
|
25
|
+
* @param commitments - Filtered commitments in their original source order.
|
|
26
|
+
* @returns Requirements with aggregated `USE` system-message sections.
|
|
27
|
+
* @private internal utility of `createAgentModelRequirementsWithCommitments`
|
|
28
|
+
*/
|
|
29
|
+
export declare function aggregateUseCommitmentSystemMessages(requirements: AgentModelRequirements, commitments: ReadonlyArray<ParsedCommitment>): AgentModelRequirements;
|
|
30
|
+
export {};
|
|
@@ -12,13 +12,14 @@ import { BaseCommitmentDefinition } from '../_base/BaseCommitmentDefinition';
|
|
|
12
12
|
* 1. One-shot URL fetching: Simple function to fetch and scrape URL content
|
|
13
13
|
* 2. Running browser: For complex tasks like scrolling, clicking, form filling, etc.
|
|
14
14
|
*
|
|
15
|
-
* The content following `USE BROWSER` is
|
|
15
|
+
* The content following `USE BROWSER` is an arbitrary text that the agent should know
|
|
16
|
+
* (e.g. browsing scope or preferred sources).
|
|
16
17
|
*
|
|
17
18
|
* Example usage in agent source:
|
|
18
19
|
*
|
|
19
20
|
* ```book
|
|
20
21
|
* USE BROWSER
|
|
21
|
-
* USE BROWSER
|
|
22
|
+
* USE BROWSER Prefer official documentation and source websites.
|
|
22
23
|
* ```
|
|
23
24
|
*
|
|
24
25
|
* @private [🪔] Maybe export the commitments through some package
|
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.112.0-
|
|
18
|
+
* It follows semantic versioning (e.g., `0.112.0-26`).
|
|
19
19
|
*
|
|
20
20
|
* @generated
|
|
21
21
|
*/
|