@promptbook/fake-llm 0.105.0-15 → 0.105.0-16
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 +455 -3
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/types.index.d.ts +2 -0
- package/esm/typings/src/book-2.0/agent-source/AgentBasicInformation.d.ts +1 -1
- package/esm/typings/src/book-2.0/agent-source/parseTeamCommitment.d.ts +28 -0
- package/esm/typings/src/book-components/Chat/utils/toolCallParsing.d.ts +23 -0
- package/esm/typings/src/book-components/icons/SettingsIcon.d.ts +11 -0
- package/esm/typings/src/commitments/TEAM/TEAM.d.ts +45 -0
- package/esm/typings/src/commitments/index.d.ts +2 -1
- package/esm/typings/src/llm-providers/openai/OpenAiAssistantExecutionTools.d.ts +1 -0
- package/esm/typings/src/version.d.ts +1 -1
- package/package.json +3 -2
- package/umd/index.umd.js +455 -2
- package/umd/index.umd.js.map +1 -1
|
@@ -21,6 +21,7 @@ import type { ChatToolCall } from '../book-components/Chat/types/ChatMessage';
|
|
|
21
21
|
import type { ChatMessage } from '../book-components/Chat/types/ChatMessage';
|
|
22
22
|
import type { ChatParticipant } from '../book-components/Chat/types/ChatParticipant';
|
|
23
23
|
import type { MessageButton } from '../book-components/Chat/utils/parseMessageButtons';
|
|
24
|
+
import type { TeamToolResult } from '../book-components/Chat/utils/toolCallParsing';
|
|
24
25
|
import type { QrCodeOptions } from '../book-components/Qr/useQrCode';
|
|
25
26
|
import type { AgentCollection } from '../collection/agent-collection/AgentCollection';
|
|
26
27
|
import type { AgentCollectionInSupabaseOptions } from '../collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabaseOptions';
|
|
@@ -403,6 +404,7 @@ export type { ChatToolCall };
|
|
|
403
404
|
export type { ChatMessage };
|
|
404
405
|
export type { ChatParticipant };
|
|
405
406
|
export type { MessageButton };
|
|
407
|
+
export type { TeamToolResult };
|
|
406
408
|
export type { QrCodeOptions };
|
|
407
409
|
export type { AgentCollection };
|
|
408
410
|
export type { AgentCollectionInSupabaseOptions };
|
|
@@ -31,7 +31,7 @@ export type AgentCapability = {
|
|
|
31
31
|
/**
|
|
32
32
|
* The type of the capability
|
|
33
33
|
*/
|
|
34
|
-
type: 'browser' | 'search-engine' | 'knowledge' | 'time' | 'inheritance' | 'import' | 'image-generator';
|
|
34
|
+
type: 'browser' | 'search-engine' | 'knowledge' | 'time' | 'inheritance' | 'import' | 'image-generator' | 'team';
|
|
35
35
|
/**
|
|
36
36
|
* The label to display for this capability
|
|
37
37
|
*/
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { string_agent_url } from '../../types/typeAliases';
|
|
2
|
+
/**
|
|
3
|
+
* Parsed TEAM teammate entry.
|
|
4
|
+
*
|
|
5
|
+
* @private
|
|
6
|
+
*/
|
|
7
|
+
export type TeamTeammate = {
|
|
8
|
+
url: string_agent_url;
|
|
9
|
+
label: string;
|
|
10
|
+
instructions: string;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Options for parsing TEAM commitment content.
|
|
14
|
+
*
|
|
15
|
+
* @private
|
|
16
|
+
*/
|
|
17
|
+
export type ParseTeamCommitmentOptions = {
|
|
18
|
+
strict?: boolean;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Parses TEAM commitment content into teammates with instructions.
|
|
22
|
+
*
|
|
23
|
+
* @private
|
|
24
|
+
*/
|
|
25
|
+
export declare function parseTeamCommitmentContent(content: string, options?: ParseTeamCommitmentOptions): TeamTeammate[];
|
|
26
|
+
/**
|
|
27
|
+
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
28
|
+
*/
|
|
@@ -16,12 +16,35 @@ type SearchResultsExtraction = {
|
|
|
16
16
|
results: Array<TODO_any>;
|
|
17
17
|
rawText: string | null;
|
|
18
18
|
};
|
|
19
|
+
export type TeamToolResult = {
|
|
20
|
+
teammate?: {
|
|
21
|
+
url?: string;
|
|
22
|
+
label?: string;
|
|
23
|
+
instructions?: string;
|
|
24
|
+
toolName?: string;
|
|
25
|
+
};
|
|
26
|
+
request?: string;
|
|
27
|
+
response?: string;
|
|
28
|
+
error?: string | null;
|
|
29
|
+
conversation?: Array<{
|
|
30
|
+
sender?: string;
|
|
31
|
+
name?: string;
|
|
32
|
+
role?: string;
|
|
33
|
+
content?: string;
|
|
34
|
+
}>;
|
|
35
|
+
};
|
|
19
36
|
/**
|
|
20
37
|
* @@@
|
|
21
38
|
*
|
|
22
39
|
* @private utility of `<Chat/>` component
|
|
23
40
|
*/
|
|
24
41
|
export declare function extractSearchResults(resultRaw: TODO_any): SearchResultsExtraction;
|
|
42
|
+
/**
|
|
43
|
+
* @@@
|
|
44
|
+
*
|
|
45
|
+
* @private utility of `<Chat/>` component
|
|
46
|
+
*/
|
|
47
|
+
export declare function parseTeamToolResult(resultRaw: TODO_any): TeamToolResult | null;
|
|
25
48
|
/**
|
|
26
49
|
* @@@
|
|
27
50
|
*
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Renders a settings (gear) icon.
|
|
4
|
+
*
|
|
5
|
+
* @param props - SVG properties augmented with an optional `size`
|
|
6
|
+
* @private internal subcomponent used by various components
|
|
7
|
+
*/
|
|
8
|
+
export declare function SettingsIcon({ size, color, ...props }: {
|
|
9
|
+
size?: number;
|
|
10
|
+
color?: string;
|
|
11
|
+
} & React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { string_javascript_name } from '../../_packages/types.index';
|
|
2
|
+
import type { AgentModelRequirements } from '../../book-2.0/agent-source/AgentModelRequirements';
|
|
3
|
+
import { ToolFunction } from '../../scripting/javascript/JavascriptExecutionToolsOptions';
|
|
4
|
+
import { BaseCommitmentDefinition } from '../_base/BaseCommitmentDefinition';
|
|
5
|
+
/**
|
|
6
|
+
* TEAM commitment definition
|
|
7
|
+
*
|
|
8
|
+
* The `TEAM` commitment defines teammates that the agent can consult via tools.
|
|
9
|
+
*
|
|
10
|
+
* Example usage in agent source:
|
|
11
|
+
*
|
|
12
|
+
* ```book
|
|
13
|
+
* TEAM https://agents.ptbk.ik/agents/joe-green
|
|
14
|
+
* TEAM You can talk with http://localhost:4440/agents/GMw67JN8TXxN7y to discuss the legal aspects.
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* @private [??] Maybe export the commitments through some package
|
|
18
|
+
*/
|
|
19
|
+
export declare class TeamCommitmentDefinition extends BaseCommitmentDefinition<'TEAM'> {
|
|
20
|
+
constructor();
|
|
21
|
+
/**
|
|
22
|
+
* Short one-line description of TEAM.
|
|
23
|
+
*/
|
|
24
|
+
get description(): string;
|
|
25
|
+
/**
|
|
26
|
+
* Icon for this commitment.
|
|
27
|
+
*/
|
|
28
|
+
get icon(): string;
|
|
29
|
+
/**
|
|
30
|
+
* Markdown documentation for TEAM commitment.
|
|
31
|
+
*/
|
|
32
|
+
get documentation(): string;
|
|
33
|
+
applyToAgentModelRequirements(requirements: AgentModelRequirements, content: string): AgentModelRequirements;
|
|
34
|
+
/**
|
|
35
|
+
* Gets human-readable titles for tool functions provided by this commitment.
|
|
36
|
+
*/
|
|
37
|
+
getToolTitles(): Record<string_javascript_name, string>;
|
|
38
|
+
/**
|
|
39
|
+
* Gets tool function implementations for teammate tools.
|
|
40
|
+
*/
|
|
41
|
+
getToolFunctions(): Record<string_javascript_name, ToolFunction>;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
45
|
+
*/
|
|
@@ -31,6 +31,7 @@ import { RuleCommitmentDefinition } from './RULE/RULE';
|
|
|
31
31
|
import { SampleCommitmentDefinition } from './SAMPLE/SAMPLE';
|
|
32
32
|
import { ScenarioCommitmentDefinition } from './SCENARIO/SCENARIO';
|
|
33
33
|
import { StyleCommitmentDefinition } from './STYLE/STYLE';
|
|
34
|
+
import { TeamCommitmentDefinition } from './TEAM/TEAM';
|
|
34
35
|
import { UseCommitmentDefinition } from './USE/USE';
|
|
35
36
|
import { UseBrowserCommitmentDefinition } from './USE_BROWSER/USE_BROWSER';
|
|
36
37
|
import { UseImageGeneratorCommitmentDefinition } from './USE_IMAGE_GENERATOR/USE_IMAGE_GENERATOR';
|
|
@@ -45,7 +46,7 @@ import { NotYetImplementedCommitmentDefinition } from './_base/NotYetImplemented
|
|
|
45
46
|
*
|
|
46
47
|
* @private Use functions to access commitments instead of this array directly
|
|
47
48
|
*/
|
|
48
|
-
export declare const COMMITMENT_REGISTRY: readonly [PersonaCommitmentDefinition, PersonaCommitmentDefinition, KnowledgeCommitmentDefinition, MemoryCommitmentDefinition, MemoryCommitmentDefinition, StyleCommitmentDefinition, StyleCommitmentDefinition, RuleCommitmentDefinition, RuleCommitmentDefinition, LanguageCommitmentDefinition, LanguageCommitmentDefinition, SampleCommitmentDefinition, SampleCommitmentDefinition, FormatCommitmentDefinition, FormatCommitmentDefinition, FromCommitmentDefinition, ImportCommitmentDefinition, ImportCommitmentDefinition, ModelCommitmentDefinition, ModelCommitmentDefinition, ActionCommitmentDefinition, ActionCommitmentDefinition, ComponentCommitmentDefinition, MetaImageCommitmentDefinition, MetaColorCommitmentDefinition, MetaFontCommitmentDefinition, MetaLinkCommitmentDefinition, MetaCommitmentDefinition, NoteCommitmentDefinition, NoteCommitmentDefinition, NoteCommitmentDefinition, NoteCommitmentDefinition, NoteCommitmentDefinition, GoalCommitmentDefinition, GoalCommitmentDefinition, InitialMessageCommitmentDefinition, UserMessageCommitmentDefinition, AgentMessageCommitmentDefinition, MessageCommitmentDefinition, MessageCommitmentDefinition, ScenarioCommitmentDefinition, ScenarioCommitmentDefinition, DeleteCommitmentDefinition, DeleteCommitmentDefinition, DeleteCommitmentDefinition, DeleteCommitmentDefinition, DictionaryCommitmentDefinition, OpenCommitmentDefinition, ClosedCommitmentDefinition, UseBrowserCommitmentDefinition, UseSearchEngineCommitmentDefinition, UseTimeCommitmentDefinition, UseImageGeneratorCommitmentDefinition, UseImageGeneratorCommitmentDefinition, UseImageGeneratorCommitmentDefinition, UseImageGeneratorCommitmentDefinition, UseImageGeneratorCommitmentDefinition, UseMcpCommitmentDefinition, UseCommitmentDefinition, NotYetImplementedCommitmentDefinition<"EXPECT">, NotYetImplementedCommitmentDefinition<"BEHAVIOUR">, NotYetImplementedCommitmentDefinition<"BEHAVIOURS">, NotYetImplementedCommitmentDefinition<"AVOID">, NotYetImplementedCommitmentDefinition<"AVOIDANCE">, NotYetImplementedCommitmentDefinition<"CONTEXT">];
|
|
49
|
+
export declare const COMMITMENT_REGISTRY: readonly [PersonaCommitmentDefinition, PersonaCommitmentDefinition, KnowledgeCommitmentDefinition, MemoryCommitmentDefinition, MemoryCommitmentDefinition, StyleCommitmentDefinition, StyleCommitmentDefinition, RuleCommitmentDefinition, RuleCommitmentDefinition, LanguageCommitmentDefinition, LanguageCommitmentDefinition, SampleCommitmentDefinition, SampleCommitmentDefinition, FormatCommitmentDefinition, FormatCommitmentDefinition, FromCommitmentDefinition, ImportCommitmentDefinition, ImportCommitmentDefinition, ModelCommitmentDefinition, ModelCommitmentDefinition, ActionCommitmentDefinition, ActionCommitmentDefinition, ComponentCommitmentDefinition, MetaImageCommitmentDefinition, MetaColorCommitmentDefinition, MetaFontCommitmentDefinition, MetaLinkCommitmentDefinition, MetaCommitmentDefinition, NoteCommitmentDefinition, NoteCommitmentDefinition, NoteCommitmentDefinition, NoteCommitmentDefinition, NoteCommitmentDefinition, GoalCommitmentDefinition, GoalCommitmentDefinition, InitialMessageCommitmentDefinition, UserMessageCommitmentDefinition, AgentMessageCommitmentDefinition, MessageCommitmentDefinition, MessageCommitmentDefinition, ScenarioCommitmentDefinition, ScenarioCommitmentDefinition, DeleteCommitmentDefinition, DeleteCommitmentDefinition, DeleteCommitmentDefinition, DeleteCommitmentDefinition, DictionaryCommitmentDefinition, OpenCommitmentDefinition, ClosedCommitmentDefinition, TeamCommitmentDefinition, UseBrowserCommitmentDefinition, UseSearchEngineCommitmentDefinition, UseTimeCommitmentDefinition, UseImageGeneratorCommitmentDefinition, UseImageGeneratorCommitmentDefinition, UseImageGeneratorCommitmentDefinition, UseImageGeneratorCommitmentDefinition, UseImageGeneratorCommitmentDefinition, UseMcpCommitmentDefinition, UseCommitmentDefinition, NotYetImplementedCommitmentDefinition<"EXPECT">, NotYetImplementedCommitmentDefinition<"BEHAVIOUR">, NotYetImplementedCommitmentDefinition<"BEHAVIOURS">, NotYetImplementedCommitmentDefinition<"AVOID">, NotYetImplementedCommitmentDefinition<"AVOIDANCE">, NotYetImplementedCommitmentDefinition<"CONTEXT">];
|
|
49
50
|
/**
|
|
50
51
|
* Gets a commitment definition by its type
|
|
51
52
|
* @param type The commitment type to look up
|
|
@@ -94,6 +94,7 @@ export declare class OpenAiAssistantExecutionTools extends OpenAiExecutionTools
|
|
|
94
94
|
static isOpenAiAssistantExecutionTools(llmExecutionTools: LlmExecutionTools): llmExecutionTools is OpenAiAssistantExecutionTools;
|
|
95
95
|
}
|
|
96
96
|
/**
|
|
97
|
+
* TODO: !!!!! [✨🥚] Knowledge should work both with and without scrapers
|
|
97
98
|
* TODO: [🙎] In `OpenAiAssistantExecutionTools` Allow to create abstract assistants with `isCreatingNewAssistantsAllowed`
|
|
98
99
|
* TODO: [🧠][🧙♂️] Maybe there can be some wizard for those who want to use just OpenAI
|
|
99
100
|
* TODO: Maybe make custom OpenAiError
|
|
@@ -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.105.0-
|
|
18
|
+
* It follows semantic versioning (e.g., `0.105.0-15`).
|
|
19
19
|
*
|
|
20
20
|
* @generated
|
|
21
21
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/fake-llm",
|
|
3
|
-
"version": "0.105.0-
|
|
3
|
+
"version": "0.105.0-16",
|
|
4
4
|
"description": "Promptbook: Turn your company's scattered knowledge into AI ready books",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
@@ -96,10 +96,11 @@
|
|
|
96
96
|
"module": "./esm/index.es.js",
|
|
97
97
|
"typings": "./esm/typings/src/_packages/fake-llm.index.d.ts",
|
|
98
98
|
"peerDependencies": {
|
|
99
|
-
"@promptbook/core": "0.105.0-
|
|
99
|
+
"@promptbook/core": "0.105.0-16"
|
|
100
100
|
},
|
|
101
101
|
"dependencies": {
|
|
102
102
|
"crypto": "1.0.1",
|
|
103
|
+
"crypto-js": "4.2.0",
|
|
103
104
|
"lorem-ipsum": "2.0.8",
|
|
104
105
|
"moment": "2.30.1",
|
|
105
106
|
"spacetrim": "0.11.60",
|