@promptbook/wizard 0.100.0-13 → 0.100.0-15
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 +1 -1
- package/esm/typings/src/_packages/core.index.d.ts +14 -0
- package/esm/typings/src/_packages/types.index.d.ts +28 -0
- package/esm/typings/src/book-2.0/agent-source/parseAgentSource.d.ts +30 -0
- package/esm/typings/src/book-2.0/agent-source/parseAgentSource.test.d.ts +1 -0
- package/esm/typings/src/book-2.0/agent-source/string_agent_source.d.ts +42 -0
- package/esm/typings/src/book-2.0/commitments/ACTION/ACTION.d.ts +30 -0
- package/esm/typings/src/book-2.0/commitments/FORMAT/FORMAT.d.ts +31 -0
- package/esm/typings/src/book-2.0/commitments/KNOWLEDGE/FrontendRAGService.d.ts +48 -0
- package/esm/typings/src/book-2.0/commitments/KNOWLEDGE/KNOWLEDGE.d.ts +43 -0
- package/esm/typings/src/book-2.0/commitments/KNOWLEDGE/RAGService.d.ts +54 -0
- package/esm/typings/src/book-2.0/commitments/KNOWLEDGE/processors/BaseKnowledgeProcessor.d.ts +45 -0
- package/esm/typings/src/book-2.0/commitments/KNOWLEDGE/processors/PdfProcessor.d.ts +31 -0
- package/esm/typings/src/book-2.0/commitments/KNOWLEDGE/processors/ProcessorFactory.d.ts +23 -0
- package/esm/typings/src/book-2.0/commitments/KNOWLEDGE/processors/TextProcessor.d.ts +18 -0
- package/esm/typings/src/book-2.0/commitments/KNOWLEDGE/types.d.ts +56 -0
- package/esm/typings/src/book-2.0/commitments/KNOWLEDGE/utils/ragHelper.d.ts +34 -0
- package/esm/typings/src/book-2.0/commitments/META_IMAGE/META_IMAGE.d.ts +36 -0
- package/esm/typings/src/book-2.0/commitments/META_LINK/META_LINK.d.ts +48 -0
- package/esm/typings/src/book-2.0/commitments/MODEL/MODEL.d.ts +31 -0
- package/esm/typings/src/book-2.0/commitments/NOTE/NOTE.d.ts +41 -0
- package/esm/typings/src/book-2.0/commitments/PERSONA/PERSONA.d.ts +38 -0
- package/esm/typings/src/book-2.0/commitments/RULE/RULE.d.ts +36 -0
- package/esm/typings/src/book-2.0/commitments/SAMPLE/SAMPLE.d.ts +36 -0
- package/esm/typings/src/book-2.0/commitments/STYLE/STYLE.d.ts +30 -0
- package/esm/typings/src/book-2.0/commitments/_base/BaseCommitmentDefinition.d.ts +43 -0
- package/esm/typings/src/book-2.0/commitments/_base/BookCommitment.d.ts +5 -0
- package/esm/typings/src/book-2.0/commitments/_base/CommitmentDefinition.d.ts +37 -0
- package/esm/typings/src/book-2.0/commitments/_base/NotYetImplementedCommitmentDefinition.d.ts +15 -0
- package/esm/typings/src/book-2.0/commitments/_base/createEmptyAgentModelRequirements.d.ts +19 -0
- package/esm/typings/src/book-2.0/commitments/_misc/AgentModelRequirements.d.ts +37 -0
- package/esm/typings/src/book-2.0/commitments/_misc/AgentSourceParseResult.d.ts +18 -0
- package/esm/typings/src/book-2.0/commitments/_misc/ParsedCommitment.d.ts +22 -0
- package/esm/typings/src/book-2.0/commitments/_misc/createAgentModelRequirements.d.ts +61 -0
- package/esm/typings/src/book-2.0/commitments/_misc/createAgentModelRequirementsWithCommitments.d.ts +35 -0
- package/esm/typings/src/book-2.0/commitments/_misc/createCommitmentRegex.d.ts +20 -0
- package/esm/typings/src/book-2.0/commitments/_misc/parseAgentSourceWithCommitments.d.ts +24 -0
- package/esm/typings/src/book-2.0/commitments/_misc/removeCommentsFromSystemMessage.d.ts +11 -0
- package/esm/typings/src/book-2.0/commitments/index.d.ts +54 -0
- package/esm/typings/src/book-2.0/utils/profileImageUtils.d.ts +39 -0
- package/esm/typings/src/types/typeAliases.d.ts +6 -0
- package/esm/typings/src/version.d.ts +1 -1
- package/package.json +2 -2
- package/umd/index.umd.js +1 -1
@@ -0,0 +1,54 @@
|
|
1
|
+
import type { BookCommitment } from './_base/BookCommitment';
|
2
|
+
import type { CommitmentDefinition } from './_base/CommitmentDefinition';
|
3
|
+
/**
|
4
|
+
* Registry of all available commitment definitions
|
5
|
+
* This array contains instances of all commitment definitions
|
6
|
+
* This is the single source of truth for all commitments in the system
|
7
|
+
*
|
8
|
+
* @private TODO: Maybe should be public?
|
9
|
+
*/
|
10
|
+
export declare const COMMITMENT_REGISTRY: Array<CommitmentDefinition>;
|
11
|
+
/**
|
12
|
+
* Gets a commitment definition by its type
|
13
|
+
* @param type The commitment type to look up
|
14
|
+
* @returns The commitment definition or undefined if not found
|
15
|
+
*
|
16
|
+
* @private TODO: Maybe should be public?
|
17
|
+
*/
|
18
|
+
export declare function getCommitmentDefinition(type: BookCommitment): CommitmentDefinition | undefined;
|
19
|
+
/**
|
20
|
+
* Gets all available commitment definitions
|
21
|
+
* @returns Array of all commitment definitions
|
22
|
+
*
|
23
|
+
* @private TODO: Maybe should be public?
|
24
|
+
*/
|
25
|
+
export declare function getAllCommitmentDefinitions(): CommitmentDefinition[];
|
26
|
+
/**
|
27
|
+
* Gets all available commitment types
|
28
|
+
* @returns Array of all commitment types
|
29
|
+
*
|
30
|
+
* @private TODO: Maybe should be public?
|
31
|
+
*/
|
32
|
+
export declare function getAllCommitmentTypes(): BookCommitment[];
|
33
|
+
/**
|
34
|
+
* Checks if a commitment type is supported
|
35
|
+
* @param type The commitment type to check
|
36
|
+
* @returns True if the commitment type is supported
|
37
|
+
*
|
38
|
+
* @private
|
39
|
+
*/
|
40
|
+
export declare function isCommitmentSupported(type: BookCommitment): boolean;
|
41
|
+
/**
|
42
|
+
* Creates a custom commitment registry with only specified commitments
|
43
|
+
* This is useful for customers who want to disable certain commitments
|
44
|
+
*
|
45
|
+
* @param enabledCommitments Array of commitment types to enable
|
46
|
+
* @returns New registry with only the specified commitments
|
47
|
+
*
|
48
|
+
* @private
|
49
|
+
*/
|
50
|
+
export declare function createCustomCommitmentRegistry(enabledCommitments: BookCommitment[]): CommitmentDefinition[];
|
51
|
+
/**
|
52
|
+
* TODO: !!!! Maybe create through standardized $register
|
53
|
+
* Note: [💞] Ignore a discrepancy between file name and entity name
|
54
|
+
*/
|
@@ -0,0 +1,39 @@
|
|
1
|
+
import type { string_url_image } from '../../types/typeAliases';
|
2
|
+
/**
|
3
|
+
* Extracts profile image URL from agent definition text and returns cleaned system message
|
4
|
+
* @param systemMessage The original system message that may contain META IMAGE line
|
5
|
+
* @returns Object with profileImageUrl (if found) and cleanedSystemMessage (without META IMAGE line)
|
6
|
+
*
|
7
|
+
* @private - TODO: [🧠] Maybe should be public?
|
8
|
+
*/
|
9
|
+
export declare function extractProfileImageFromSystemMessage(systemMessage: string): {
|
10
|
+
profileImageUrl?: string_url_image;
|
11
|
+
cleanedSystemMessage: string;
|
12
|
+
};
|
13
|
+
/**
|
14
|
+
* Extracts persona, examples, and profile image from agent definition text
|
15
|
+
* @param systemMessage The original system message that may contain PERSONA, EXAMPLE, and META IMAGE lines
|
16
|
+
* @returns Object with extracted information and cleaned system message
|
17
|
+
*
|
18
|
+
* @private - TODO: [🧠] Maybe should be public?
|
19
|
+
*/
|
20
|
+
export declare function extractAgentMetadata(systemMessage: string): {
|
21
|
+
persona?: {
|
22
|
+
name: string;
|
23
|
+
description?: string;
|
24
|
+
};
|
25
|
+
examples: string[];
|
26
|
+
profileImageUrl?: string_url_image;
|
27
|
+
cleanedSystemMessage: string;
|
28
|
+
};
|
29
|
+
/**
|
30
|
+
* Generates a gravatar URL based on agent name for fallback avatar
|
31
|
+
* @param name The agent name to generate avatar for
|
32
|
+
* @returns Gravatar URL
|
33
|
+
*
|
34
|
+
* @private - TODO: [🧠] Maybe should be public?
|
35
|
+
*/
|
36
|
+
export declare function generateGravatarUrl(name?: string | null): string;
|
37
|
+
/**
|
38
|
+
* Note: [💞] Ignore a discrepancy between file name and entity name
|
39
|
+
*/
|
@@ -136,6 +136,12 @@ export type ReservedParameters = Record<string_reserved_parameter_name, string_p
|
|
136
136
|
* For example `"Ai*nautes"`
|
137
137
|
*/
|
138
138
|
export type string_title = string;
|
139
|
+
/**
|
140
|
+
* Semantic helper
|
141
|
+
*
|
142
|
+
* For example `"My AI Assistant"`
|
143
|
+
*/
|
144
|
+
export type string_agent_name = string;
|
139
145
|
/**
|
140
146
|
* Unstructured description of the persona
|
141
147
|
*
|
@@ -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.100.0-
|
18
|
+
* It follows semantic versioning (e.g., `0.100.0-14`).
|
19
19
|
*
|
20
20
|
* @generated
|
21
21
|
*/
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@promptbook/wizard",
|
3
|
-
"version": "0.100.0-
|
3
|
+
"version": "0.100.0-15",
|
4
4
|
"description": "Promptbook: Run AI apps in plain human language across multiple models and platforms",
|
5
5
|
"private": false,
|
6
6
|
"sideEffects": false,
|
@@ -95,7 +95,7 @@
|
|
95
95
|
"module": "./esm/index.es.js",
|
96
96
|
"typings": "./esm/typings/src/_packages/wizard.index.d.ts",
|
97
97
|
"peerDependencies": {
|
98
|
-
"@promptbook/core": "0.100.0-
|
98
|
+
"@promptbook/core": "0.100.0-15"
|
99
99
|
},
|
100
100
|
"dependencies": {
|
101
101
|
"@ai-sdk/deepseek": "0.1.6",
|
package/umd/index.umd.js
CHANGED
@@ -49,7 +49,7 @@
|
|
49
49
|
* @generated
|
50
50
|
* @see https://github.com/webgptorg/promptbook
|
51
51
|
*/
|
52
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.100.0-
|
52
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.100.0-15';
|
53
53
|
/**
|
54
54
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
55
55
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|