@promptbook/cli 0.103.0-54 → 0.103.0-56
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/apps/agents-server/config.ts +0 -2
- package/apps/agents-server/package-lock.json +1163 -0
- package/apps/agents-server/package.json +6 -0
- package/apps/agents-server/src/app/admin/chat-feedback/ChatFeedbackClient.tsx +79 -6
- package/apps/agents-server/src/app/admin/chat-history/ChatHistoryClient.tsx +171 -69
- package/apps/agents-server/src/app/agents/[agentName]/AgentChatWrapper.tsx +3 -1
- package/apps/agents-server/src/app/agents/[agentName]/AgentOptionsMenu.tsx +216 -0
- package/apps/agents-server/src/app/agents/[agentName]/AgentProfileChat.tsx +78 -0
- package/apps/agents-server/src/app/agents/[agentName]/AgentProfileView.tsx +233 -0
- package/apps/agents-server/src/app/agents/[agentName]/CloneAgentButton.tsx +4 -4
- package/apps/agents-server/src/app/agents/[agentName]/InstallPwaButton.tsx +2 -2
- package/apps/agents-server/src/app/agents/[agentName]/QrCodeModal.tsx +90 -0
- package/apps/agents-server/src/app/agents/[agentName]/agentLinks.tsx +80 -0
- package/apps/agents-server/src/app/agents/[agentName]/api/book/route.ts +3 -1
- package/apps/agents-server/src/app/agents/[agentName]/api/chat/route.ts +11 -1
- package/apps/agents-server/src/app/agents/[agentName]/api/mcp/route.ts +203 -0
- package/apps/agents-server/src/app/agents/[agentName]/api/modelRequirements/route.ts +3 -1
- package/apps/agents-server/src/app/agents/[agentName]/api/modelRequirements/systemMessage/route.ts +3 -1
- package/apps/agents-server/src/app/agents/[agentName]/api/openai/chat/completions/route.ts +3 -169
- package/apps/agents-server/src/app/agents/[agentName]/api/openai/models/route.ts +93 -0
- package/apps/agents-server/src/app/agents/[agentName]/api/openai/v1/chat/completions/route.ts +10 -0
- package/apps/agents-server/src/app/agents/[agentName]/api/openai/v1/models/route.ts +93 -0
- package/apps/agents-server/src/app/agents/[agentName]/api/openrouter/chat/completions/route.ts +10 -0
- package/apps/agents-server/src/app/agents/[agentName]/api/voice/route.ts +4 -0
- package/apps/agents-server/src/app/agents/[agentName]/chat/page.tsx +9 -2
- package/apps/agents-server/src/app/agents/[agentName]/integration/SdkCodeTabs.tsx +31 -0
- package/apps/agents-server/src/app/agents/[agentName]/integration/page.tsx +271 -30
- package/apps/agents-server/src/app/agents/[agentName]/links/page.tsx +182 -0
- package/apps/agents-server/src/app/agents/[agentName]/page.tsx +108 -165
- package/apps/agents-server/src/app/agents/[agentName]/website-integration/page.tsx +61 -0
- package/apps/agents-server/src/app/api/auth/change-password/route.ts +75 -0
- package/apps/agents-server/src/app/api/chat-feedback/export/route.ts +55 -0
- package/apps/agents-server/src/app/api/chat-history/export/route.ts +55 -0
- package/apps/agents-server/src/app/api/openai/v1/chat/completions/route.ts +6 -0
- package/apps/agents-server/src/app/api/openai/v1/models/route.ts +65 -0
- package/apps/agents-server/src/app/docs/[docId]/page.tsx +12 -32
- package/apps/agents-server/src/app/docs/page.tsx +42 -17
- package/apps/agents-server/src/app/globals.css +129 -0
- package/apps/agents-server/src/app/layout.tsx +8 -2
- package/apps/agents-server/src/app/manifest.ts +1 -1
- package/apps/agents-server/src/components/ChangePasswordDialog/ChangePasswordDialog.tsx +41 -0
- package/apps/agents-server/src/components/ChangePasswordForm/ChangePasswordForm.tsx +159 -0
- package/apps/agents-server/src/components/DocumentationContent/DocumentationContent.tsx +87 -0
- package/apps/agents-server/src/components/Header/Header.tsx +94 -38
- package/apps/agents-server/src/components/OpenMojiIcon/OpenMojiIcon.tsx +20 -0
- package/apps/agents-server/src/components/PrintButton/PrintButton.tsx +18 -0
- package/apps/agents-server/src/components/PrintHeader/PrintHeader.tsx +18 -0
- package/apps/agents-server/src/database/migrations/2025-12-0070-chat-history-source.sql +2 -0
- package/apps/agents-server/src/database/schema.ts +6 -0
- package/apps/agents-server/src/middleware.ts +1 -1
- package/apps/agents-server/src/utils/convertToCsv.ts +31 -0
- package/apps/agents-server/src/utils/handleChatCompletion.ts +355 -0
- package/apps/agents-server/src/utils/resolveInheritedAgentSource.ts +100 -0
- package/apps/agents-server/src/utils/validateApiKey.ts +128 -0
- package/apps/agents-server/tailwind.config.ts +1 -1
- package/esm/index.es.js +1188 -175
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/book-2.0/agent-source/AgentModelRequirements.d.ts +4 -0
- package/esm/typings/src/book-components/Chat/LlmChat/LlmChatProps.d.ts +5 -0
- package/esm/typings/src/commitments/CLOSED/CLOSED.d.ts +35 -0
- package/esm/typings/src/commitments/COMPONENT/COMPONENT.d.ts +28 -0
- package/esm/typings/src/commitments/FROM/FROM.d.ts +34 -0
- package/esm/typings/src/commitments/LANGUAGE/LANGUAGE.d.ts +35 -0
- package/esm/typings/src/commitments/META_COLOR/META_COLOR.d.ts +6 -0
- package/esm/typings/src/commitments/META_FONT/META_FONT.d.ts +42 -0
- package/esm/typings/src/commitments/OPEN/OPEN.d.ts +35 -0
- package/esm/typings/src/commitments/USE/USE.d.ts +53 -0
- package/esm/typings/src/commitments/USE_BROWSER/USE_BROWSER.d.ts +38 -0
- package/esm/typings/src/commitments/USE_BROWSER/USE_BROWSER.test.d.ts +1 -0
- package/esm/typings/src/commitments/USE_MCP/USE_MCP.d.ts +37 -0
- package/esm/typings/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.d.ts +38 -0
- package/esm/typings/src/commitments/index.d.ts +12 -1
- package/esm/typings/src/playground/playground.d.ts +3 -0
- package/esm/typings/src/utils/color/Color.d.ts +8 -0
- package/esm/typings/src/utils/color/css-colors.d.ts +1 -0
- package/esm/typings/src/version.d.ts +1 -1
- package/package.json +2 -2
- package/umd/index.umd.js +1180 -167
- package/umd/index.umd.js.map +1 -1
- package/esm/typings/src/playground/playground1.d.ts +0 -2
|
@@ -18,6 +18,10 @@ export type AgentModelRequirements = {
|
|
|
18
18
|
* Optional list of MCP servers that the agent can connect to
|
|
19
19
|
*/
|
|
20
20
|
readonly mcpServers?: ReadonlyArray<string>;
|
|
21
|
+
/**
|
|
22
|
+
* Optional link to the parent agent from which this agent inherits
|
|
23
|
+
*/
|
|
24
|
+
readonly parentAgentUrl?: string_knowledge_source_link;
|
|
21
25
|
/**
|
|
22
26
|
* Optional list of knowledge source links that the agent can use
|
|
23
27
|
*/
|
|
@@ -52,4 +52,9 @@ export type LlmChatProps = Omit<ChatProps, 'messages' | 'onMessage' | 'onChange'
|
|
|
52
52
|
* @default 'ASSISTANT'
|
|
53
53
|
*/
|
|
54
54
|
readonly llmParticipantName?: id;
|
|
55
|
+
/**
|
|
56
|
+
* Optional message to be automatically sent as if the user typed it.
|
|
57
|
+
* This is useful for seamless transitions from other pages.
|
|
58
|
+
*/
|
|
59
|
+
readonly autoExecuteMessage?: string;
|
|
55
60
|
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { AgentModelRequirements } from '../../book-2.0/agent-source/AgentModelRequirements';
|
|
2
|
+
import { BaseCommitmentDefinition } from '../_base/BaseCommitmentDefinition';
|
|
3
|
+
/**
|
|
4
|
+
* CLOSED commitment definition
|
|
5
|
+
*
|
|
6
|
+
* The CLOSED commitment specifies that the agent CANNOT be modified by conversation.
|
|
7
|
+
* It prevents the agent from learning from interactions and updating its source code.
|
|
8
|
+
*
|
|
9
|
+
* Example usage in agent source:
|
|
10
|
+
*
|
|
11
|
+
* ```book
|
|
12
|
+
* CLOSED
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* @private [🪔] Maybe export the commitments through some package
|
|
16
|
+
*/
|
|
17
|
+
export declare class ClosedCommitmentDefinition extends BaseCommitmentDefinition<'CLOSED'> {
|
|
18
|
+
constructor();
|
|
19
|
+
/**
|
|
20
|
+
* Short one-line description of CLOSED.
|
|
21
|
+
*/
|
|
22
|
+
get description(): string;
|
|
23
|
+
/**
|
|
24
|
+
* Icon for this commitment.
|
|
25
|
+
*/
|
|
26
|
+
get icon(): string;
|
|
27
|
+
/**
|
|
28
|
+
* Markdown documentation for CLOSED commitment.
|
|
29
|
+
*/
|
|
30
|
+
get documentation(): string;
|
|
31
|
+
applyToAgentModelRequirements(requirements: AgentModelRequirements, _content: string): AgentModelRequirements;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
35
|
+
*/
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { AgentModelRequirements } from '../../book-2.0/agent-source/AgentModelRequirements';
|
|
2
|
+
import { BaseCommitmentDefinition } from '../_base/BaseCommitmentDefinition';
|
|
3
|
+
/**
|
|
4
|
+
* COMPONENT commitment definition
|
|
5
|
+
*
|
|
6
|
+
* The COMPONENT commitment defines a UI component that the agent can render in the chat.
|
|
7
|
+
*
|
|
8
|
+
* @private [🪔] Maybe export the commitments through some package
|
|
9
|
+
*/
|
|
10
|
+
export declare class ComponentCommitmentDefinition extends BaseCommitmentDefinition<'COMPONENT'> {
|
|
11
|
+
constructor();
|
|
12
|
+
/**
|
|
13
|
+
* Short one-line description of COMPONENT.
|
|
14
|
+
*/
|
|
15
|
+
get description(): string;
|
|
16
|
+
/**
|
|
17
|
+
* Icon for this commitment.
|
|
18
|
+
*/
|
|
19
|
+
get icon(): string;
|
|
20
|
+
/**
|
|
21
|
+
* Markdown documentation for COMPONENT commitment.
|
|
22
|
+
*/
|
|
23
|
+
get documentation(): string;
|
|
24
|
+
applyToAgentModelRequirements(requirements: AgentModelRequirements, content: string): AgentModelRequirements;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
28
|
+
*/
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { AgentModelRequirements } from '../../book-2.0/agent-source/AgentModelRequirements';
|
|
2
|
+
import { BaseCommitmentDefinition } from '../_base/BaseCommitmentDefinition';
|
|
3
|
+
/**
|
|
4
|
+
* FROM commitment definition
|
|
5
|
+
*
|
|
6
|
+
* The FROM commitment tells the agent that its `agentSource` is inherited from another agent.
|
|
7
|
+
*
|
|
8
|
+
* Example usage in agent source:
|
|
9
|
+
*
|
|
10
|
+
* ```book
|
|
11
|
+
* FROM https://s6.ptbk.io/benjamin-white
|
|
12
|
+
* ```
|
|
13
|
+
*
|
|
14
|
+
* @private [🪔] Maybe export the commitments through some package
|
|
15
|
+
*/
|
|
16
|
+
export declare class FromCommitmentDefinition extends BaseCommitmentDefinition<'FROM'> {
|
|
17
|
+
constructor(type?: 'FROM');
|
|
18
|
+
/**
|
|
19
|
+
* Short one-line description of FROM.
|
|
20
|
+
*/
|
|
21
|
+
get description(): string;
|
|
22
|
+
/**
|
|
23
|
+
* Icon for this commitment.
|
|
24
|
+
*/
|
|
25
|
+
get icon(): string;
|
|
26
|
+
/**
|
|
27
|
+
* Markdown documentation for FROM commitment.
|
|
28
|
+
*/
|
|
29
|
+
get documentation(): string;
|
|
30
|
+
applyToAgentModelRequirements(requirements: AgentModelRequirements, content: string): AgentModelRequirements;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
34
|
+
*/
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { AgentModelRequirements } from '../../book-2.0/agent-source/AgentModelRequirements';
|
|
2
|
+
import { BaseCommitmentDefinition } from '../_base/BaseCommitmentDefinition';
|
|
3
|
+
/**
|
|
4
|
+
* LANGUAGE commitment definition
|
|
5
|
+
*
|
|
6
|
+
* The LANGUAGE/LANGUAGES commitment specifies the language(s) the agent should use in its responses.
|
|
7
|
+
*
|
|
8
|
+
* Example usage in agent source:
|
|
9
|
+
*
|
|
10
|
+
* ```book
|
|
11
|
+
* LANGUAGE English
|
|
12
|
+
* LANGUAGE French, English and Czech
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* @private [🪔] Maybe export the commitments through some package
|
|
16
|
+
*/
|
|
17
|
+
export declare class LanguageCommitmentDefinition extends BaseCommitmentDefinition<'LANGUAGE' | 'LANGUAGES'> {
|
|
18
|
+
constructor(type?: 'LANGUAGE' | 'LANGUAGES');
|
|
19
|
+
/**
|
|
20
|
+
* Short one-line description of LANGUAGE/LANGUAGES.
|
|
21
|
+
*/
|
|
22
|
+
get description(): string;
|
|
23
|
+
/**
|
|
24
|
+
* Icon for this commitment.
|
|
25
|
+
*/
|
|
26
|
+
get icon(): string;
|
|
27
|
+
/**
|
|
28
|
+
* Markdown documentation for LANGUAGE/LANGUAGES commitment.
|
|
29
|
+
*/
|
|
30
|
+
get documentation(): string;
|
|
31
|
+
applyToAgentModelRequirements(requirements: AgentModelRequirements, content: string): AgentModelRequirements;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
35
|
+
*/
|
|
@@ -14,6 +14,12 @@ import { BaseCommitmentDefinition } from '../_base/BaseCommitmentDefinition';
|
|
|
14
14
|
* META COLOR #00ff00
|
|
15
15
|
* ```
|
|
16
16
|
*
|
|
17
|
+
* You can also specify multiple colors separated by comma:
|
|
18
|
+
*
|
|
19
|
+
* ```book
|
|
20
|
+
* META COLOR #ff0000, #00ff00, #0000ff
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
17
23
|
* @private [🪔] Maybe export the commitments through some package
|
|
18
24
|
*/
|
|
19
25
|
export declare class MetaColorCommitmentDefinition extends BaseCommitmentDefinition<'META COLOR'> {
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { AgentModelRequirements } from '../../book-2.0/agent-source/AgentModelRequirements';
|
|
2
|
+
import { BaseCommitmentDefinition } from '../_base/BaseCommitmentDefinition';
|
|
3
|
+
/**
|
|
4
|
+
* META FONT commitment definition
|
|
5
|
+
*
|
|
6
|
+
* The META FONT commitment sets the agent's font.
|
|
7
|
+
* This commitment is special because it doesn't affect the system message,
|
|
8
|
+
* but is handled separately in the parsing logic.
|
|
9
|
+
*
|
|
10
|
+
* Example usage in agent source:
|
|
11
|
+
*
|
|
12
|
+
* ```book
|
|
13
|
+
* META FONT Poppins, Arial, sans-serif
|
|
14
|
+
* META FONT Roboto
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* @private [🪔] Maybe export the commitments through some package
|
|
18
|
+
*/
|
|
19
|
+
export declare class MetaFontCommitmentDefinition extends BaseCommitmentDefinition<'META FONT'> {
|
|
20
|
+
constructor();
|
|
21
|
+
/**
|
|
22
|
+
* Short one-line description of META FONT.
|
|
23
|
+
*/
|
|
24
|
+
get description(): string;
|
|
25
|
+
/**
|
|
26
|
+
* Icon for this commitment.
|
|
27
|
+
*/
|
|
28
|
+
get icon(): string;
|
|
29
|
+
/**
|
|
30
|
+
* Markdown documentation for META FONT commitment.
|
|
31
|
+
*/
|
|
32
|
+
get documentation(): string;
|
|
33
|
+
applyToAgentModelRequirements(requirements: AgentModelRequirements, content: string): AgentModelRequirements;
|
|
34
|
+
/**
|
|
35
|
+
* Extracts the font from the content
|
|
36
|
+
* This is used by the parsing logic
|
|
37
|
+
*/
|
|
38
|
+
extractProfileFont(content: string): string | null;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
42
|
+
*/
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { AgentModelRequirements } from '../../book-2.0/agent-source/AgentModelRequirements';
|
|
2
|
+
import { BaseCommitmentDefinition } from '../_base/BaseCommitmentDefinition';
|
|
3
|
+
/**
|
|
4
|
+
* OPEN commitment definition
|
|
5
|
+
*
|
|
6
|
+
* The OPEN commitment specifies that the agent can be modified by conversation.
|
|
7
|
+
* This is the default behavior.
|
|
8
|
+
*
|
|
9
|
+
* Example usage in agent source:
|
|
10
|
+
*
|
|
11
|
+
* ```book
|
|
12
|
+
* OPEN
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* @private [🪔] Maybe export the commitments through some package
|
|
16
|
+
*/
|
|
17
|
+
export declare class OpenCommitmentDefinition extends BaseCommitmentDefinition<'OPEN'> {
|
|
18
|
+
constructor();
|
|
19
|
+
/**
|
|
20
|
+
* Short one-line description of OPEN.
|
|
21
|
+
*/
|
|
22
|
+
get description(): string;
|
|
23
|
+
/**
|
|
24
|
+
* Icon for this commitment.
|
|
25
|
+
*/
|
|
26
|
+
get icon(): string;
|
|
27
|
+
/**
|
|
28
|
+
* Markdown documentation for OPEN commitment.
|
|
29
|
+
*/
|
|
30
|
+
get documentation(): string;
|
|
31
|
+
applyToAgentModelRequirements(requirements: AgentModelRequirements, _content: string): AgentModelRequirements;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
35
|
+
*/
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { AgentModelRequirements } from '../../book-2.0/agent-source/AgentModelRequirements';
|
|
2
|
+
import { BaseCommitmentDefinition } from '../_base/BaseCommitmentDefinition';
|
|
3
|
+
/**
|
|
4
|
+
* USE commitment definition
|
|
5
|
+
*
|
|
6
|
+
* The USE commitment indicates that the agent should utilize specific tools or capabilities
|
|
7
|
+
* to access and interact with external systems when necessary.
|
|
8
|
+
*
|
|
9
|
+
* Supported USE types:
|
|
10
|
+
* - USE BROWSER: Enables the agent to use a web browser tool
|
|
11
|
+
* - USE SEARCH ENGINE (future): Enables search engine access
|
|
12
|
+
* - USE FILE SYSTEM (future): Enables file system operations
|
|
13
|
+
* - USE MCP (future): Enables MCP server connections
|
|
14
|
+
*
|
|
15
|
+
* The content following the USE commitment is ignored (similar to NOTE).
|
|
16
|
+
*
|
|
17
|
+
* Example usage in agent source:
|
|
18
|
+
*
|
|
19
|
+
* ```book
|
|
20
|
+
* USE BROWSER
|
|
21
|
+
* USE SEARCH ENGINE
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* @private [🪔] Maybe export the commitments through some package
|
|
25
|
+
*/
|
|
26
|
+
export declare class UseCommitmentDefinition extends BaseCommitmentDefinition<`USE${string}`> {
|
|
27
|
+
constructor();
|
|
28
|
+
/**
|
|
29
|
+
* Short one-line description of USE commitments.
|
|
30
|
+
*/
|
|
31
|
+
get description(): string;
|
|
32
|
+
/**
|
|
33
|
+
* Icon for this commitment.
|
|
34
|
+
*/
|
|
35
|
+
get icon(): string;
|
|
36
|
+
/**
|
|
37
|
+
* Markdown documentation for USE commitment.
|
|
38
|
+
*/
|
|
39
|
+
get documentation(): string;
|
|
40
|
+
applyToAgentModelRequirements(requirements: AgentModelRequirements, content: string): AgentModelRequirements;
|
|
41
|
+
/**
|
|
42
|
+
* Extracts the tool type from the USE commitment
|
|
43
|
+
* This is used by the parsing logic
|
|
44
|
+
*/
|
|
45
|
+
extractToolType(content: string): string | null;
|
|
46
|
+
/**
|
|
47
|
+
* Checks if this is a known USE type
|
|
48
|
+
*/
|
|
49
|
+
isKnownUseType(useType: string): boolean;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
53
|
+
*/
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { AgentModelRequirements } from '../../book-2.0/agent-source/AgentModelRequirements';
|
|
2
|
+
import { BaseCommitmentDefinition } from '../_base/BaseCommitmentDefinition';
|
|
3
|
+
/**
|
|
4
|
+
* USE BROWSER commitment definition
|
|
5
|
+
*
|
|
6
|
+
* The `USE BROWSER` commitment indicates that the agent should utilize a web browser tool
|
|
7
|
+
* to access and retrieve up-to-date information from the internet when necessary.
|
|
8
|
+
*
|
|
9
|
+
* The content following `USE BROWSER` is ignored (similar to NOTE).
|
|
10
|
+
*
|
|
11
|
+
* Example usage in agent source:
|
|
12
|
+
*
|
|
13
|
+
* ```book
|
|
14
|
+
* USE BROWSER
|
|
15
|
+
* USE BROWSER This will be ignored
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* @private [🪔] Maybe export the commitments through some package
|
|
19
|
+
*/
|
|
20
|
+
export declare class UseBrowserCommitmentDefinition extends BaseCommitmentDefinition<'USE BROWSER'> {
|
|
21
|
+
constructor();
|
|
22
|
+
/**
|
|
23
|
+
* Short one-line description of USE BROWSER.
|
|
24
|
+
*/
|
|
25
|
+
get description(): string;
|
|
26
|
+
/**
|
|
27
|
+
* Icon for this commitment.
|
|
28
|
+
*/
|
|
29
|
+
get icon(): string;
|
|
30
|
+
/**
|
|
31
|
+
* Markdown documentation for USE BROWSER commitment.
|
|
32
|
+
*/
|
|
33
|
+
get documentation(): string;
|
|
34
|
+
applyToAgentModelRequirements(requirements: AgentModelRequirements, content: string): AgentModelRequirements;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
38
|
+
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { AgentModelRequirements } from '../../book-2.0/agent-source/AgentModelRequirements';
|
|
2
|
+
import { BaseCommitmentDefinition } from '../_base/BaseCommitmentDefinition';
|
|
3
|
+
/**
|
|
4
|
+
* USE MCP commitment definition
|
|
5
|
+
*
|
|
6
|
+
* The `USE MCP` commitment allows to specify an MCP server URL which the agent will connect to
|
|
7
|
+
* for retrieving additional instructions and actions.
|
|
8
|
+
*
|
|
9
|
+
* The content following `USE MCP` is the URL of the MCP server.
|
|
10
|
+
*
|
|
11
|
+
* Example usage in agent source:
|
|
12
|
+
*
|
|
13
|
+
* ```book
|
|
14
|
+
* USE MCP http://mcp-server-url.com
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* @private [🪔] Maybe export the commitments through some package
|
|
18
|
+
*/
|
|
19
|
+
export declare class UseMcpCommitmentDefinition extends BaseCommitmentDefinition<'USE MCP'> {
|
|
20
|
+
constructor();
|
|
21
|
+
/**
|
|
22
|
+
* Short one-line description of USE MCP.
|
|
23
|
+
*/
|
|
24
|
+
get description(): string;
|
|
25
|
+
/**
|
|
26
|
+
* Icon for this commitment.
|
|
27
|
+
*/
|
|
28
|
+
get icon(): string;
|
|
29
|
+
/**
|
|
30
|
+
* Markdown documentation for USE MCP commitment.
|
|
31
|
+
*/
|
|
32
|
+
get documentation(): string;
|
|
33
|
+
applyToAgentModelRequirements(requirements: AgentModelRequirements, content: string): AgentModelRequirements;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
37
|
+
*/
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { AgentModelRequirements } from '../../book-2.0/agent-source/AgentModelRequirements';
|
|
2
|
+
import { BaseCommitmentDefinition } from '../_base/BaseCommitmentDefinition';
|
|
3
|
+
/**
|
|
4
|
+
* USE SEARCH ENGINE commitment definition
|
|
5
|
+
*
|
|
6
|
+
* The `USE SEARCH ENGINE` commitment indicates that the agent should utilize a search engine tool
|
|
7
|
+
* to access and retrieve up-to-date information from the internet when necessary.
|
|
8
|
+
*
|
|
9
|
+
* The content following `USE SEARCH ENGINE` is ignored (similar to NOTE).
|
|
10
|
+
*
|
|
11
|
+
* Example usage in agent source:
|
|
12
|
+
*
|
|
13
|
+
* ```book
|
|
14
|
+
* USE SEARCH ENGINE
|
|
15
|
+
* USE SEARCH ENGINE This will be ignored
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* @private [🪔] Maybe export the commitments through some package
|
|
19
|
+
*/
|
|
20
|
+
export declare class UseSearchEngineCommitmentDefinition extends BaseCommitmentDefinition<'USE SEARCH ENGINE'> {
|
|
21
|
+
constructor();
|
|
22
|
+
/**
|
|
23
|
+
* Short one-line description of USE SEARCH ENGINE.
|
|
24
|
+
*/
|
|
25
|
+
get description(): string;
|
|
26
|
+
/**
|
|
27
|
+
* Icon for this commitment.
|
|
28
|
+
*/
|
|
29
|
+
get icon(): string;
|
|
30
|
+
/**
|
|
31
|
+
* Markdown documentation for USE SEARCH ENGINE commitment.
|
|
32
|
+
*/
|
|
33
|
+
get documentation(): string;
|
|
34
|
+
applyToAgentModelRequirements(requirements: AgentModelRequirements, content: string): AgentModelRequirements;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
38
|
+
*/
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import type { BookCommitment } from './_base/BookCommitment';
|
|
2
2
|
import type { CommitmentDefinition } from './_base/CommitmentDefinition';
|
|
3
3
|
import { ActionCommitmentDefinition } from './ACTION/ACTION';
|
|
4
|
+
import { ClosedCommitmentDefinition } from './CLOSED/CLOSED';
|
|
5
|
+
import { ComponentCommitmentDefinition } from './COMPONENT/COMPONENT';
|
|
4
6
|
import { DeleteCommitmentDefinition } from './DELETE/DELETE';
|
|
5
7
|
import { FormatCommitmentDefinition } from './FORMAT/FORMAT';
|
|
8
|
+
import { FromCommitmentDefinition } from './FROM/FROM';
|
|
6
9
|
import { GoalCommitmentDefinition } from './GOAL/GOAL';
|
|
7
10
|
import { KnowledgeCommitmentDefinition } from './KNOWLEDGE/KNOWLEDGE';
|
|
11
|
+
import { LanguageCommitmentDefinition } from './LANGUAGE/LANGUAGE';
|
|
8
12
|
import { MemoryCommitmentDefinition } from './MEMORY/MEMORY';
|
|
9
13
|
import { AgentMessageCommitmentDefinition } from './MESSAGE/AgentMessageCommitmentDefinition';
|
|
10
14
|
import { InitialMessageCommitmentDefinition } from './MESSAGE/InitialMessageCommitmentDefinition';
|
|
@@ -12,14 +16,21 @@ import { MessageCommitmentDefinition } from './MESSAGE/MESSAGE';
|
|
|
12
16
|
import { UserMessageCommitmentDefinition } from './MESSAGE/UserMessageCommitmentDefinition';
|
|
13
17
|
import { MetaCommitmentDefinition } from './META/META';
|
|
14
18
|
import { MetaColorCommitmentDefinition } from './META_COLOR/META_COLOR';
|
|
19
|
+
import { MetaFontCommitmentDefinition } from './META_FONT/META_FONT';
|
|
15
20
|
import { MetaImageCommitmentDefinition } from './META_IMAGE/META_IMAGE';
|
|
21
|
+
import { MetaLinkCommitmentDefinition } from './META_LINK/META_LINK';
|
|
16
22
|
import { ModelCommitmentDefinition } from './MODEL/MODEL';
|
|
17
23
|
import { NoteCommitmentDefinition } from './NOTE/NOTE';
|
|
24
|
+
import { OpenCommitmentDefinition } from './OPEN/OPEN';
|
|
18
25
|
import { PersonaCommitmentDefinition } from './PERSONA/PERSONA';
|
|
19
26
|
import { RuleCommitmentDefinition } from './RULE/RULE';
|
|
20
27
|
import { SampleCommitmentDefinition } from './SAMPLE/SAMPLE';
|
|
21
28
|
import { ScenarioCommitmentDefinition } from './SCENARIO/SCENARIO';
|
|
22
29
|
import { StyleCommitmentDefinition } from './STYLE/STYLE';
|
|
30
|
+
import { UseCommitmentDefinition } from './USE/USE';
|
|
31
|
+
import { UseBrowserCommitmentDefinition } from './USE_BROWSER/USE_BROWSER';
|
|
32
|
+
import { UseMcpCommitmentDefinition } from './USE_MCP/USE_MCP';
|
|
33
|
+
import { UseSearchEngineCommitmentDefinition } from './USE_SEARCH_ENGINE/USE_SEARCH_ENGINE';
|
|
23
34
|
import { NotYetImplementedCommitmentDefinition } from './_base/NotYetImplementedCommitmentDefinition';
|
|
24
35
|
/**
|
|
25
36
|
* Registry of all available commitment definitions
|
|
@@ -28,7 +39,7 @@ import { NotYetImplementedCommitmentDefinition } from './_base/NotYetImplemented
|
|
|
28
39
|
*
|
|
29
40
|
* @private Use functions to access commitments instead of this array directly
|
|
30
41
|
*/
|
|
31
|
-
export declare const COMMITMENT_REGISTRY: readonly [PersonaCommitmentDefinition, PersonaCommitmentDefinition, KnowledgeCommitmentDefinition, MemoryCommitmentDefinition, MemoryCommitmentDefinition, StyleCommitmentDefinition, StyleCommitmentDefinition, RuleCommitmentDefinition, RuleCommitmentDefinition, SampleCommitmentDefinition, SampleCommitmentDefinition, FormatCommitmentDefinition, FormatCommitmentDefinition, ModelCommitmentDefinition, ModelCommitmentDefinition, ActionCommitmentDefinition, ActionCommitmentDefinition, MetaImageCommitmentDefinition, MetaColorCommitmentDefinition, MetaCommitmentDefinition, NoteCommitmentDefinition, NoteCommitmentDefinition, NoteCommitmentDefinition, NoteCommitmentDefinition, GoalCommitmentDefinition, GoalCommitmentDefinition, InitialMessageCommitmentDefinition, UserMessageCommitmentDefinition, AgentMessageCommitmentDefinition, MessageCommitmentDefinition, MessageCommitmentDefinition, ScenarioCommitmentDefinition, ScenarioCommitmentDefinition, DeleteCommitmentDefinition, DeleteCommitmentDefinition, DeleteCommitmentDefinition, DeleteCommitmentDefinition, NotYetImplementedCommitmentDefinition<"EXPECT">, NotYetImplementedCommitmentDefinition<"BEHAVIOUR">, NotYetImplementedCommitmentDefinition<"BEHAVIOURS">, NotYetImplementedCommitmentDefinition<"AVOID">, NotYetImplementedCommitmentDefinition<"AVOIDANCE">, NotYetImplementedCommitmentDefinition<"CONTEXT">];
|
|
42
|
+
export declare const COMMITMENT_REGISTRY: readonly [PersonaCommitmentDefinition, PersonaCommitmentDefinition, KnowledgeCommitmentDefinition, MemoryCommitmentDefinition, MemoryCommitmentDefinition, StyleCommitmentDefinition, StyleCommitmentDefinition, RuleCommitmentDefinition, RuleCommitmentDefinition, LanguageCommitmentDefinition, LanguageCommitmentDefinition, SampleCommitmentDefinition, SampleCommitmentDefinition, FormatCommitmentDefinition, FormatCommitmentDefinition, FromCommitmentDefinition, ModelCommitmentDefinition, ModelCommitmentDefinition, ActionCommitmentDefinition, ActionCommitmentDefinition, ComponentCommitmentDefinition, MetaImageCommitmentDefinition, MetaColorCommitmentDefinition, MetaFontCommitmentDefinition, MetaLinkCommitmentDefinition, MetaCommitmentDefinition, NoteCommitmentDefinition, NoteCommitmentDefinition, NoteCommitmentDefinition, NoteCommitmentDefinition, GoalCommitmentDefinition, GoalCommitmentDefinition, InitialMessageCommitmentDefinition, UserMessageCommitmentDefinition, AgentMessageCommitmentDefinition, MessageCommitmentDefinition, MessageCommitmentDefinition, ScenarioCommitmentDefinition, ScenarioCommitmentDefinition, DeleteCommitmentDefinition, DeleteCommitmentDefinition, DeleteCommitmentDefinition, DeleteCommitmentDefinition, OpenCommitmentDefinition, ClosedCommitmentDefinition, UseBrowserCommitmentDefinition, UseSearchEngineCommitmentDefinition, UseMcpCommitmentDefinition, UseCommitmentDefinition, NotYetImplementedCommitmentDefinition<"EXPECT">, NotYetImplementedCommitmentDefinition<"BEHAVIOUR">, NotYetImplementedCommitmentDefinition<"BEHAVIOURS">, NotYetImplementedCommitmentDefinition<"AVOID">, NotYetImplementedCommitmentDefinition<"AVOIDANCE">, NotYetImplementedCommitmentDefinition<"CONTEXT">];
|
|
32
43
|
/**
|
|
33
44
|
* Gets a commitment definition by its type
|
|
34
45
|
* @param type The commitment type to look up
|
|
@@ -24,6 +24,14 @@ export declare class Color {
|
|
|
24
24
|
* @returns Color object
|
|
25
25
|
*/
|
|
26
26
|
static from(color: string_color | Color): WithTake<Color>;
|
|
27
|
+
/**
|
|
28
|
+
* Creates a new Color instance from miscellaneous formats
|
|
29
|
+
* It just does not throw error when it fails, it returns PROMPTBOOK_COLOR instead
|
|
30
|
+
*
|
|
31
|
+
* @param color
|
|
32
|
+
* @returns Color object
|
|
33
|
+
*/
|
|
34
|
+
static fromSafe(color: string_color | Color): WithTake<Color>;
|
|
27
35
|
/**
|
|
28
36
|
* Creates a new Color instance from miscellaneous string formats
|
|
29
37
|
*
|
|
@@ -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.103.0-
|
|
18
|
+
* It follows semantic versioning (e.g., `0.103.0-55`).
|
|
19
19
|
*
|
|
20
20
|
* @generated
|
|
21
21
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/cli",
|
|
3
|
-
"version": "0.103.0-
|
|
3
|
+
"version": "0.103.0-56",
|
|
4
4
|
"description": "Promptbook: Turn your company's scattered knowledge into AI ready books",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
},
|
|
90
90
|
"homepage": "https://ptbk.io/",
|
|
91
91
|
"engines": {
|
|
92
|
-
"node": ">=
|
|
92
|
+
"node": ">=18.18.0",
|
|
93
93
|
"npm": ">=8.0.0"
|
|
94
94
|
},
|
|
95
95
|
"dependencies": {
|