@promptbook/types 0.112.0-56 → 0.112.0-57
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/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments/ParsedAgentSourceWithCommitments.d.ts +7 -0
- package/esm/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments/applyCommitmentsToAgentModelRequirements.d.ts +14 -0
- package/esm/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments/augmentAgentModelRequirementsFromSource.d.ts +14 -0
- package/esm/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments/filterCommitmentsForAgentModelRequirements.d.ts +10 -0
- package/esm/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments/materializeInlineKnowledgeSources.d.ts +12 -0
- package/esm/src/book-2.0/agent-source/parseAgentSource/ParseAgentSourceState.d.ts +10 -0
- package/esm/src/book-2.0/agent-source/parseAgentSource/ParsedAgentProfile.d.ts +7 -0
- package/esm/src/book-2.0/agent-source/parseAgentSource/applyMetaCommitment.d.ts +8 -0
- package/esm/src/book-2.0/agent-source/parseAgentSource/consumeConversationSampleCommitment.d.ts +8 -0
- package/esm/src/book-2.0/agent-source/parseAgentSource/createCapabilitiesFromCommitment.d.ts +9 -0
- package/esm/src/book-2.0/agent-source/parseAgentSource/ensureMetaFullname.d.ts +7 -0
- package/esm/src/book-2.0/agent-source/parseAgentSource/extractAgentProfileText.d.ts +8 -0
- package/esm/src/book-2.0/agent-source/parseAgentSource/extractInitialMessage.d.ts +7 -0
- package/esm/src/book-2.0/agent-source/parseAgentSource/extractParsedAgentProfile.d.ts +8 -0
- package/esm/src/types/LlmToolDefinition.d.ts +17 -7
- package/esm/src/version.d.ts +1 -1
- package/package.json +2 -2
- package/umd/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments/ParsedAgentSourceWithCommitments.d.ts +7 -0
- package/umd/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments/applyCommitmentsToAgentModelRequirements.d.ts +14 -0
- package/umd/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments/augmentAgentModelRequirementsFromSource.d.ts +14 -0
- package/umd/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments/filterCommitmentsForAgentModelRequirements.d.ts +10 -0
- package/umd/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments/materializeInlineKnowledgeSources.d.ts +12 -0
- package/umd/src/book-2.0/agent-source/parseAgentSource/ParseAgentSourceState.d.ts +10 -0
- package/umd/src/book-2.0/agent-source/parseAgentSource/ParsedAgentProfile.d.ts +7 -0
- package/umd/src/book-2.0/agent-source/parseAgentSource/applyMetaCommitment.d.ts +8 -0
- package/umd/src/book-2.0/agent-source/parseAgentSource/consumeConversationSampleCommitment.d.ts +8 -0
- package/umd/src/book-2.0/agent-source/parseAgentSource/createCapabilitiesFromCommitment.d.ts +9 -0
- package/umd/src/book-2.0/agent-source/parseAgentSource/ensureMetaFullname.d.ts +7 -0
- package/umd/src/book-2.0/agent-source/parseAgentSource/extractAgentProfileText.d.ts +8 -0
- package/umd/src/book-2.0/agent-source/parseAgentSource/extractInitialMessage.d.ts +7 -0
- package/umd/src/book-2.0/agent-source/parseAgentSource/extractParsedAgentProfile.d.ts +8 -0
- package/umd/src/types/LlmToolDefinition.d.ts +17 -7
- package/umd/src/version.d.ts +1 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { parseAgentSourceWithCommitments } from '../parseAgentSourceWithCommitments';
|
|
2
|
+
/**
|
|
3
|
+
* Parsed agent source data produced by `parseAgentSourceWithCommitments`.
|
|
4
|
+
*
|
|
5
|
+
* @private internal type of `createAgentModelRequirementsWithCommitments`
|
|
6
|
+
*/
|
|
7
|
+
export type ParsedAgentSourceWithCommitments = ReturnType<typeof parseAgentSourceWithCommitments>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ParsedCommitment } from '../../../commitments/_base/ParsedCommitment';
|
|
2
|
+
import type { AgentModelRequirements } from '../AgentModelRequirements';
|
|
3
|
+
import type { CreateAgentModelRequirementsOptions } from '../CreateAgentModelRequirementsOptions';
|
|
4
|
+
/**
|
|
5
|
+
* Applies parsed commitments one by one while keeping the per-commitment steps focused and easy to follow.
|
|
6
|
+
*
|
|
7
|
+
* @param requirements - Current requirements snapshot.
|
|
8
|
+
* @param commitments - Commitments already filtered for DELETE-like invalidations.
|
|
9
|
+
* @param options - Optional reference and teammate resolvers.
|
|
10
|
+
* @returns Requirements after all applicable commitments are processed.
|
|
11
|
+
*
|
|
12
|
+
* @private function of `createAgentModelRequirementsWithCommitments`
|
|
13
|
+
*/
|
|
14
|
+
export declare function applyCommitmentsToAgentModelRequirements(requirements: AgentModelRequirements, commitments: ReadonlyArray<ParsedCommitment>, options?: CreateAgentModelRequirementsOptions): Promise<AgentModelRequirements>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { AgentModelRequirements } from '../AgentModelRequirements';
|
|
2
|
+
import type { string_book } from '../string_book';
|
|
3
|
+
import type { ParsedAgentSourceWithCommitments } from './ParsedAgentSourceWithCommitments';
|
|
4
|
+
/**
|
|
5
|
+
* Adds source-derived sections after commitments have been applied.
|
|
6
|
+
*
|
|
7
|
+
* @param requirements - Requirements after commitment application and USE aggregation.
|
|
8
|
+
* @param parseResult - Parsed source used to recover non-commitment prose and examples.
|
|
9
|
+
* @param agentSource - Original source used to recover MCP server declarations.
|
|
10
|
+
* @returns Requirements with source-derived sections appended.
|
|
11
|
+
*
|
|
12
|
+
* @private function of `createAgentModelRequirementsWithCommitments`
|
|
13
|
+
*/
|
|
14
|
+
export declare function augmentAgentModelRequirementsFromSource(requirements: AgentModelRequirements, parseResult: ParsedAgentSourceWithCommitments, agentSource: string_book): Promise<AgentModelRequirements>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ParsedCommitment } from '../../../commitments/_base/ParsedCommitment';
|
|
2
|
+
/**
|
|
3
|
+
* Applies the commitment filtering rules used before commitment definitions are executed.
|
|
4
|
+
*
|
|
5
|
+
* @param commitments - Parsed commitments in original source order.
|
|
6
|
+
* @returns Commitments after DELETE-like invalidation and overwritten-goal filtering.
|
|
7
|
+
*
|
|
8
|
+
* @private function of `createAgentModelRequirementsWithCommitments`
|
|
9
|
+
*/
|
|
10
|
+
export declare function filterCommitmentsForAgentModelRequirements(commitments: ReadonlyArray<ParsedCommitment>): ParsedCommitment[];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { InlineKnowledgeSourceUploader } from '../../../utils/knowledge/inlineKnowledgeSource';
|
|
2
|
+
import type { AgentModelRequirements } from '../AgentModelRequirements';
|
|
3
|
+
/**
|
|
4
|
+
* Converts staged inline knowledge files into the final knowledge source URLs stored on requirements.
|
|
5
|
+
*
|
|
6
|
+
* @param requirements - Current requirements snapshot.
|
|
7
|
+
* @param uploader - Optional uploader for inline knowledge files.
|
|
8
|
+
* @returns Requirements with inline knowledge converted into upload URLs or data URLs.
|
|
9
|
+
*
|
|
10
|
+
* @private function of `createAgentModelRequirementsWithCommitments`
|
|
11
|
+
*/
|
|
12
|
+
export declare function materializeInlineKnowledgeSources(requirements: AgentModelRequirements, uploader?: InlineKnowledgeSourceUploader): Promise<AgentModelRequirements>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ParsedAgentProfile } from './ParsedAgentProfile';
|
|
2
|
+
/**
|
|
3
|
+
* Mutable commitment-processing state used while collecting basic profile information.
|
|
4
|
+
*
|
|
5
|
+
* @private internal utility of `parseAgentSource`
|
|
6
|
+
*/
|
|
7
|
+
export type ParseAgentSourceState = ParsedAgentProfile & {
|
|
8
|
+
pendingUserMessage: string | null;
|
|
9
|
+
knownKnowledgeSourceUrls: Set<string>;
|
|
10
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { AgentBasicInformation } from '../AgentBasicInformation';
|
|
2
|
+
/**
|
|
3
|
+
* Parsed agent profile fields accumulated from commitments.
|
|
4
|
+
*
|
|
5
|
+
* @private internal utility of `parseAgentSource`
|
|
6
|
+
*/
|
|
7
|
+
export type ParsedAgentProfile = Pick<AgentBasicInformation, 'meta' | 'links' | 'capabilities' | 'samples' | 'knowledgeSources'>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ParsedCommitment } from '../../../commitments/_base/ParsedCommitment';
|
|
2
|
+
import type { ParseAgentSourceState } from './ParseAgentSourceState';
|
|
3
|
+
/**
|
|
4
|
+
* Applies META-style commitments that mutate parsed profile metadata.
|
|
5
|
+
*
|
|
6
|
+
* @private internal utility of `parseAgentSource`
|
|
7
|
+
*/
|
|
8
|
+
export declare function applyMetaCommitment(state: ParseAgentSourceState, commitment: ParsedCommitment): void;
|
package/esm/src/book-2.0/agent-source/parseAgentSource/consumeConversationSampleCommitment.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ParsedCommitment } from '../../../commitments/_base/ParsedCommitment';
|
|
2
|
+
import type { ParseAgentSourceState } from './ParseAgentSourceState';
|
|
3
|
+
/**
|
|
4
|
+
* Updates sample-conversation state for communication commitments.
|
|
5
|
+
*
|
|
6
|
+
* @private internal utility of `parseAgentSource`
|
|
7
|
+
*/
|
|
8
|
+
export declare function consumeConversationSampleCommitment(state: ParseAgentSourceState, commitment: ParsedCommitment): boolean;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ParsedCommitment } from '../../../commitments/_base/ParsedCommitment';
|
|
2
|
+
import type { AgentCapability } from '../AgentBasicInformation';
|
|
3
|
+
import type { ParseAgentSourceState } from './ParseAgentSourceState';
|
|
4
|
+
/**
|
|
5
|
+
* Creates the visible capabilities produced by one parsed commitment.
|
|
6
|
+
*
|
|
7
|
+
* @private internal utility of `parseAgentSource`
|
|
8
|
+
*/
|
|
9
|
+
export declare function createCapabilitiesFromCommitment(state: ParseAgentSourceState, commitment: ParsedCommitment): AgentCapability[];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { AgentBasicInformation } from '../AgentBasicInformation';
|
|
2
|
+
/**
|
|
3
|
+
* Ensures the parsed profile always exposes a fullname value.
|
|
4
|
+
*
|
|
5
|
+
* @private internal utility of `parseAgentSource`
|
|
6
|
+
*/
|
|
7
|
+
export declare function ensureMetaFullname(meta: AgentBasicInformation['meta'], fallbackFullname: string): void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ParsedCommitment } from '../../../commitments/_base/ParsedCommitment';
|
|
2
|
+
/**
|
|
3
|
+
* Resolves the public agent profile text from the last GOAL/GOALS commitment,
|
|
4
|
+
* falling back to the deprecated PERSONA/PERSONAE commitments when no goal exists.
|
|
5
|
+
*
|
|
6
|
+
* @private internal utility of `parseAgentSource`
|
|
7
|
+
*/
|
|
8
|
+
export declare function extractAgentProfileText(commitments: ReadonlyArray<ParsedCommitment>): string | null;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ParsedCommitment } from '../../../commitments/_base/ParsedCommitment';
|
|
2
|
+
/**
|
|
3
|
+
* Resolves the last INITIAL MESSAGE commitment, which is the public initial-message value.
|
|
4
|
+
*
|
|
5
|
+
* @private internal utility of `parseAgentSource`
|
|
6
|
+
*/
|
|
7
|
+
export declare function extractInitialMessage(commitments: ReadonlyArray<ParsedCommitment>): string | null;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ParsedCommitment } from '../../../commitments/_base/ParsedCommitment';
|
|
2
|
+
import type { ParsedAgentProfile } from './ParsedAgentProfile';
|
|
3
|
+
/**
|
|
4
|
+
* Collects capability, sample, meta, link, and knowledge-source data from commitments.
|
|
5
|
+
*
|
|
6
|
+
* @private internal utility of `parseAgentSource`
|
|
7
|
+
*/
|
|
8
|
+
export declare function extractParsedAgentProfile(commitments: ReadonlyArray<ParsedCommitment>): ParsedAgentProfile;
|
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
import type { string_markdown_text, string_name } from './typeAliases';
|
|
2
|
+
/**
|
|
3
|
+
* Minimal recursive JSON Schema entry used by tool definitions.
|
|
4
|
+
*
|
|
5
|
+
* Note: [🚉] This is fully serializable as JSON
|
|
6
|
+
*/
|
|
7
|
+
type LlmToolJsonSchema = {
|
|
8
|
+
type?: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
properties?: Record<string, LlmToolJsonSchema>;
|
|
11
|
+
required?: string[];
|
|
12
|
+
items?: LlmToolJsonSchema;
|
|
13
|
+
enum?: Array<string | number | boolean | null>;
|
|
14
|
+
additionalProperties?: boolean;
|
|
15
|
+
};
|
|
2
16
|
/**
|
|
3
17
|
* Definition of a tool that can be used by the model
|
|
4
18
|
*
|
|
@@ -16,13 +30,9 @@ export type LlmToolDefinition = {
|
|
|
16
30
|
/**
|
|
17
31
|
* Parameters of the tool in JSON Schema format
|
|
18
32
|
*/
|
|
19
|
-
readonly parameters: {
|
|
33
|
+
readonly parameters: LlmToolJsonSchema & {
|
|
20
34
|
readonly type: 'object';
|
|
21
|
-
readonly properties: Record<string,
|
|
22
|
-
type: string;
|
|
23
|
-
description?: string;
|
|
24
|
-
}>;
|
|
25
|
-
readonly required?: string[];
|
|
26
|
-
readonly additionalProperties?: boolean;
|
|
35
|
+
readonly properties: Record<string, LlmToolJsonSchema>;
|
|
27
36
|
};
|
|
28
37
|
};
|
|
38
|
+
export {};
|
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-56`).
|
|
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.112.0-
|
|
3
|
+
"version": "0.112.0-57",
|
|
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.112.0-
|
|
99
|
+
"@promptbook/core": "0.112.0-57"
|
|
100
100
|
}
|
|
101
101
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { parseAgentSourceWithCommitments } from '../parseAgentSourceWithCommitments';
|
|
2
|
+
/**
|
|
3
|
+
* Parsed agent source data produced by `parseAgentSourceWithCommitments`.
|
|
4
|
+
*
|
|
5
|
+
* @private internal type of `createAgentModelRequirementsWithCommitments`
|
|
6
|
+
*/
|
|
7
|
+
export type ParsedAgentSourceWithCommitments = ReturnType<typeof parseAgentSourceWithCommitments>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ParsedCommitment } from '../../../commitments/_base/ParsedCommitment';
|
|
2
|
+
import type { AgentModelRequirements } from '../AgentModelRequirements';
|
|
3
|
+
import type { CreateAgentModelRequirementsOptions } from '../CreateAgentModelRequirementsOptions';
|
|
4
|
+
/**
|
|
5
|
+
* Applies parsed commitments one by one while keeping the per-commitment steps focused and easy to follow.
|
|
6
|
+
*
|
|
7
|
+
* @param requirements - Current requirements snapshot.
|
|
8
|
+
* @param commitments - Commitments already filtered for DELETE-like invalidations.
|
|
9
|
+
* @param options - Optional reference and teammate resolvers.
|
|
10
|
+
* @returns Requirements after all applicable commitments are processed.
|
|
11
|
+
*
|
|
12
|
+
* @private function of `createAgentModelRequirementsWithCommitments`
|
|
13
|
+
*/
|
|
14
|
+
export declare function applyCommitmentsToAgentModelRequirements(requirements: AgentModelRequirements, commitments: ReadonlyArray<ParsedCommitment>, options?: CreateAgentModelRequirementsOptions): Promise<AgentModelRequirements>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { AgentModelRequirements } from '../AgentModelRequirements';
|
|
2
|
+
import type { string_book } from '../string_book';
|
|
3
|
+
import type { ParsedAgentSourceWithCommitments } from './ParsedAgentSourceWithCommitments';
|
|
4
|
+
/**
|
|
5
|
+
* Adds source-derived sections after commitments have been applied.
|
|
6
|
+
*
|
|
7
|
+
* @param requirements - Requirements after commitment application and USE aggregation.
|
|
8
|
+
* @param parseResult - Parsed source used to recover non-commitment prose and examples.
|
|
9
|
+
* @param agentSource - Original source used to recover MCP server declarations.
|
|
10
|
+
* @returns Requirements with source-derived sections appended.
|
|
11
|
+
*
|
|
12
|
+
* @private function of `createAgentModelRequirementsWithCommitments`
|
|
13
|
+
*/
|
|
14
|
+
export declare function augmentAgentModelRequirementsFromSource(requirements: AgentModelRequirements, parseResult: ParsedAgentSourceWithCommitments, agentSource: string_book): Promise<AgentModelRequirements>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ParsedCommitment } from '../../../commitments/_base/ParsedCommitment';
|
|
2
|
+
/**
|
|
3
|
+
* Applies the commitment filtering rules used before commitment definitions are executed.
|
|
4
|
+
*
|
|
5
|
+
* @param commitments - Parsed commitments in original source order.
|
|
6
|
+
* @returns Commitments after DELETE-like invalidation and overwritten-goal filtering.
|
|
7
|
+
*
|
|
8
|
+
* @private function of `createAgentModelRequirementsWithCommitments`
|
|
9
|
+
*/
|
|
10
|
+
export declare function filterCommitmentsForAgentModelRequirements(commitments: ReadonlyArray<ParsedCommitment>): ParsedCommitment[];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { InlineKnowledgeSourceUploader } from '../../../utils/knowledge/inlineKnowledgeSource';
|
|
2
|
+
import type { AgentModelRequirements } from '../AgentModelRequirements';
|
|
3
|
+
/**
|
|
4
|
+
* Converts staged inline knowledge files into the final knowledge source URLs stored on requirements.
|
|
5
|
+
*
|
|
6
|
+
* @param requirements - Current requirements snapshot.
|
|
7
|
+
* @param uploader - Optional uploader for inline knowledge files.
|
|
8
|
+
* @returns Requirements with inline knowledge converted into upload URLs or data URLs.
|
|
9
|
+
*
|
|
10
|
+
* @private function of `createAgentModelRequirementsWithCommitments`
|
|
11
|
+
*/
|
|
12
|
+
export declare function materializeInlineKnowledgeSources(requirements: AgentModelRequirements, uploader?: InlineKnowledgeSourceUploader): Promise<AgentModelRequirements>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ParsedAgentProfile } from './ParsedAgentProfile';
|
|
2
|
+
/**
|
|
3
|
+
* Mutable commitment-processing state used while collecting basic profile information.
|
|
4
|
+
*
|
|
5
|
+
* @private internal utility of `parseAgentSource`
|
|
6
|
+
*/
|
|
7
|
+
export type ParseAgentSourceState = ParsedAgentProfile & {
|
|
8
|
+
pendingUserMessage: string | null;
|
|
9
|
+
knownKnowledgeSourceUrls: Set<string>;
|
|
10
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { AgentBasicInformation } from '../AgentBasicInformation';
|
|
2
|
+
/**
|
|
3
|
+
* Parsed agent profile fields accumulated from commitments.
|
|
4
|
+
*
|
|
5
|
+
* @private internal utility of `parseAgentSource`
|
|
6
|
+
*/
|
|
7
|
+
export type ParsedAgentProfile = Pick<AgentBasicInformation, 'meta' | 'links' | 'capabilities' | 'samples' | 'knowledgeSources'>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ParsedCommitment } from '../../../commitments/_base/ParsedCommitment';
|
|
2
|
+
import type { ParseAgentSourceState } from './ParseAgentSourceState';
|
|
3
|
+
/**
|
|
4
|
+
* Applies META-style commitments that mutate parsed profile metadata.
|
|
5
|
+
*
|
|
6
|
+
* @private internal utility of `parseAgentSource`
|
|
7
|
+
*/
|
|
8
|
+
export declare function applyMetaCommitment(state: ParseAgentSourceState, commitment: ParsedCommitment): void;
|
package/umd/src/book-2.0/agent-source/parseAgentSource/consumeConversationSampleCommitment.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ParsedCommitment } from '../../../commitments/_base/ParsedCommitment';
|
|
2
|
+
import type { ParseAgentSourceState } from './ParseAgentSourceState';
|
|
3
|
+
/**
|
|
4
|
+
* Updates sample-conversation state for communication commitments.
|
|
5
|
+
*
|
|
6
|
+
* @private internal utility of `parseAgentSource`
|
|
7
|
+
*/
|
|
8
|
+
export declare function consumeConversationSampleCommitment(state: ParseAgentSourceState, commitment: ParsedCommitment): boolean;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ParsedCommitment } from '../../../commitments/_base/ParsedCommitment';
|
|
2
|
+
import type { AgentCapability } from '../AgentBasicInformation';
|
|
3
|
+
import type { ParseAgentSourceState } from './ParseAgentSourceState';
|
|
4
|
+
/**
|
|
5
|
+
* Creates the visible capabilities produced by one parsed commitment.
|
|
6
|
+
*
|
|
7
|
+
* @private internal utility of `parseAgentSource`
|
|
8
|
+
*/
|
|
9
|
+
export declare function createCapabilitiesFromCommitment(state: ParseAgentSourceState, commitment: ParsedCommitment): AgentCapability[];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { AgentBasicInformation } from '../AgentBasicInformation';
|
|
2
|
+
/**
|
|
3
|
+
* Ensures the parsed profile always exposes a fullname value.
|
|
4
|
+
*
|
|
5
|
+
* @private internal utility of `parseAgentSource`
|
|
6
|
+
*/
|
|
7
|
+
export declare function ensureMetaFullname(meta: AgentBasicInformation['meta'], fallbackFullname: string): void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ParsedCommitment } from '../../../commitments/_base/ParsedCommitment';
|
|
2
|
+
/**
|
|
3
|
+
* Resolves the public agent profile text from the last GOAL/GOALS commitment,
|
|
4
|
+
* falling back to the deprecated PERSONA/PERSONAE commitments when no goal exists.
|
|
5
|
+
*
|
|
6
|
+
* @private internal utility of `parseAgentSource`
|
|
7
|
+
*/
|
|
8
|
+
export declare function extractAgentProfileText(commitments: ReadonlyArray<ParsedCommitment>): string | null;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ParsedCommitment } from '../../../commitments/_base/ParsedCommitment';
|
|
2
|
+
/**
|
|
3
|
+
* Resolves the last INITIAL MESSAGE commitment, which is the public initial-message value.
|
|
4
|
+
*
|
|
5
|
+
* @private internal utility of `parseAgentSource`
|
|
6
|
+
*/
|
|
7
|
+
export declare function extractInitialMessage(commitments: ReadonlyArray<ParsedCommitment>): string | null;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ParsedCommitment } from '../../../commitments/_base/ParsedCommitment';
|
|
2
|
+
import type { ParsedAgentProfile } from './ParsedAgentProfile';
|
|
3
|
+
/**
|
|
4
|
+
* Collects capability, sample, meta, link, and knowledge-source data from commitments.
|
|
5
|
+
*
|
|
6
|
+
* @private internal utility of `parseAgentSource`
|
|
7
|
+
*/
|
|
8
|
+
export declare function extractParsedAgentProfile(commitments: ReadonlyArray<ParsedCommitment>): ParsedAgentProfile;
|
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
import type { string_markdown_text, string_name } from './typeAliases';
|
|
2
|
+
/**
|
|
3
|
+
* Minimal recursive JSON Schema entry used by tool definitions.
|
|
4
|
+
*
|
|
5
|
+
* Note: [🚉] This is fully serializable as JSON
|
|
6
|
+
*/
|
|
7
|
+
type LlmToolJsonSchema = {
|
|
8
|
+
type?: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
properties?: Record<string, LlmToolJsonSchema>;
|
|
11
|
+
required?: string[];
|
|
12
|
+
items?: LlmToolJsonSchema;
|
|
13
|
+
enum?: Array<string | number | boolean | null>;
|
|
14
|
+
additionalProperties?: boolean;
|
|
15
|
+
};
|
|
2
16
|
/**
|
|
3
17
|
* Definition of a tool that can be used by the model
|
|
4
18
|
*
|
|
@@ -16,13 +30,9 @@ export type LlmToolDefinition = {
|
|
|
16
30
|
/**
|
|
17
31
|
* Parameters of the tool in JSON Schema format
|
|
18
32
|
*/
|
|
19
|
-
readonly parameters: {
|
|
33
|
+
readonly parameters: LlmToolJsonSchema & {
|
|
20
34
|
readonly type: 'object';
|
|
21
|
-
readonly properties: Record<string,
|
|
22
|
-
type: string;
|
|
23
|
-
description?: string;
|
|
24
|
-
}>;
|
|
25
|
-
readonly required?: string[];
|
|
26
|
-
readonly additionalProperties?: boolean;
|
|
35
|
+
readonly properties: Record<string, LlmToolJsonSchema>;
|
|
27
36
|
};
|
|
28
37
|
};
|
|
38
|
+
export {};
|
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-56`).
|
|
19
19
|
*
|
|
20
20
|
* @generated
|
|
21
21
|
*/
|