@promptbook/node 0.114.0-3 → 0.114.0-5
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/README.md +4 -12
- package/esm/index.es.js +508 -4664
- package/esm/index.es.js.map +1 -1
- package/esm/src/book-2.0/agent-source/AgentBasicInformation.d.ts +3 -3
- package/esm/src/cli/cli-commands/coder/boilerplateCount.d.ts +52 -0
- package/esm/src/cli/cli-commands/coder/generate-boilerplates.d.ts +3 -2
- package/esm/src/cli/cli-commands/coder/verify.d.ts +1 -1
- package/esm/src/commitments/{COMPONENT/COMPONENT.d.ts → META_FULLNAME/META_FULLNAME.d.ts} +8 -5
- package/esm/src/commitments/META_ID/META_ID.d.ts +32 -0
- package/esm/src/commitments/index.d.ts +4 -12
- package/esm/src/llm-providers/agent/Agent.d.ts +1 -1
- package/esm/src/llm-providers/openai/OpenAiAgentKitExecutionToolsToolBuilder.d.ts +1 -1
- package/esm/src/{commitments/USE_BROWSER → scrapers/_common/utils}/fetchUrlContent.d.ts +2 -3
- package/esm/src/version.d.ts +1 -1
- package/package.json +2 -5
- package/umd/index.umd.js +511 -4667
- package/umd/index.umd.js.map +1 -1
- package/umd/src/book-2.0/agent-source/AgentBasicInformation.d.ts +3 -3
- package/umd/src/cli/cli-commands/coder/boilerplateCount.d.ts +52 -0
- package/umd/src/cli/cli-commands/coder/generate-boilerplates.d.ts +3 -2
- package/umd/src/cli/cli-commands/coder/verify.d.ts +1 -1
- package/umd/src/commitments/{COMPONENT/COMPONENT.d.ts → META_FULLNAME/META_FULLNAME.d.ts} +8 -5
- package/umd/src/commitments/META_ID/META_ID.d.ts +32 -0
- package/umd/src/commitments/index.d.ts +4 -12
- package/umd/src/llm-providers/agent/Agent.d.ts +1 -1
- package/umd/src/llm-providers/openai/OpenAiAgentKitExecutionToolsToolBuilder.d.ts +1 -1
- package/umd/src/{commitments/USE_BROWSER → scrapers/_common/utils}/fetchUrlContent.d.ts +2 -3
- package/umd/src/version.d.ts +1 -1
- package/esm/src/commitments/MEMORY/MEMORY.d.ts +0 -48
- package/esm/src/commitments/MEMORY/MemoryToolNames.d.ts +0 -11
- package/esm/src/commitments/MEMORY/MemoryToolRuntimeAdapter.d.ts +0 -149
- package/esm/src/commitments/MEMORY/createMemorySystemMessage.d.ts +0 -6
- package/esm/src/commitments/MEMORY/createMemoryToolFunctions.d.ts +0 -8
- package/esm/src/commitments/MEMORY/createMemoryTools.d.ts +0 -14
- package/esm/src/commitments/MEMORY/getMemoryCommitmentDocumentation.d.ts +0 -6
- package/esm/src/commitments/MEMORY/getMemoryToolRuntimeAdapterOrDisabledResult.d.ts +0 -17
- package/esm/src/commitments/MEMORY/getMemoryToolTitles.d.ts +0 -7
- package/esm/src/commitments/MEMORY/parseMemoryToolArgs.d.ts +0 -61
- package/esm/src/commitments/MEMORY/resolveMemoryRuntimeContext.d.ts +0 -8
- package/esm/src/commitments/MEMORY/setMemoryToolRuntimeAdapter.d.ts +0 -13
- package/esm/src/commitments/META/META.d.ts +0 -65
- package/esm/src/commitments/USE/aggregateUseCommitmentSystemMessages.d.ts +0 -32
- package/esm/src/commitments/USE_BROWSER/USE_BROWSER.d.ts +0 -58
- package/esm/src/commitments/USE_BROWSER/fetchUrlContentViaBrowser.d.ts +0 -13
- package/esm/src/commitments/USE_BROWSER/resolveRunBrowserToolForNode.d.ts +0 -10
- package/esm/src/commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.d.ts +0 -47
- package/esm/src/commitments/USE_EMAIL/USE_EMAIL.d.ts +0 -38
- package/esm/src/commitments/USE_EMAIL/parseUseEmailCommitmentContent.d.ts +0 -21
- package/esm/src/commitments/USE_EMAIL/parseUseEmailCommitmentContent.test.d.ts +0 -1
- package/esm/src/commitments/USE_EMAIL/resolveSendEmailToolForNode.d.ts +0 -11
- package/esm/src/commitments/USE_EMAIL/sendEmailViaBrowser.d.ts +0 -13
- package/esm/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.d.ts +0 -46
- package/esm/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.test.d.ts +0 -1
- package/esm/src/commitments/USE_SPAWN/USE_SPAWN.d.ts +0 -38
- package/esm/src/commitments/USE_SPAWN/USE_SPAWN.test.d.ts +0 -1
- package/esm/src/commitments/USE_SPAWN/resolveSpawnAgentToolForNode.d.ts +0 -9
- package/esm/src/commitments/USE_SPAWN/spawnAgentViaBrowser.d.ts +0 -12
- package/esm/src/commitments/USE_TIME/USE_TIME.d.ts +0 -43
- package/esm/src/commitments/USE_TIME/USE_TIME.test.d.ts +0 -1
- package/esm/src/commitments/USE_TIMEOUT/TimeoutToolNames.d.ts +0 -11
- package/esm/src/commitments/USE_TIMEOUT/TimeoutToolRuntimeAdapter.d.ts +0 -212
- package/esm/src/commitments/USE_TIMEOUT/USE_TIMEOUT.d.ts +0 -38
- package/esm/src/commitments/USE_TIMEOUT/USE_TIMEOUT.test.d.ts +0 -1
- package/esm/src/commitments/USE_TIMEOUT/createTimeoutSystemMessage.d.ts +0 -6
- package/esm/src/commitments/USE_TIMEOUT/createTimeoutToolFunctions.d.ts +0 -8
- package/esm/src/commitments/USE_TIMEOUT/createTimeoutTools.d.ts +0 -7
- package/esm/src/commitments/USE_TIMEOUT/getTimeoutToolRuntimeAdapterOrDisabledResult.d.ts +0 -17
- package/esm/src/commitments/USE_TIMEOUT/parseTimeoutToolArgs.d.ts +0 -78
- package/esm/src/commitments/USE_TIMEOUT/resolveTimeoutRuntimeContext.d.ts +0 -8
- package/esm/src/commitments/USE_TIMEOUT/setTimeoutToolRuntimeAdapter.d.ts +0 -13
- package/esm/src/commitments/WALLET/WALLET.d.ts +0 -21
- package/esm/src/commitments/WALLET/WALLET.test.d.ts +0 -1
- package/esm/src/commitments/WALLET/WalletToolNames.d.ts +0 -12
- package/esm/src/commitments/WALLET/WalletToolRuntimeAdapter.d.ts +0 -163
- package/esm/src/commitments/WALLET/createWalletSystemMessage.d.ts +0 -6
- package/esm/src/commitments/WALLET/createWalletToolFunctions.d.ts +0 -8
- package/esm/src/commitments/WALLET/createWalletTools.d.ts +0 -7
- package/esm/src/commitments/WALLET/getWalletCommitmentDocumentation.d.ts +0 -6
- package/esm/src/commitments/WALLET/getWalletToolRuntimeAdapterOrDisabledResult.d.ts +0 -16
- package/esm/src/commitments/WALLET/getWalletToolTitles.d.ts +0 -7
- package/esm/src/commitments/WALLET/parseWalletToolArgs.d.ts +0 -51
- package/esm/src/commitments/WALLET/resolveWalletRuntimeContext.d.ts +0 -8
- package/esm/src/commitments/WALLET/setWalletToolRuntimeAdapter.d.ts +0 -13
- package/esm/src/commitments/_common/createSerpSearchToolFunction.d.ts +0 -12
- package/umd/src/book-2.0/agent-source/createAgentModelRequirements.useCommitmentAggregation.test.d.ts +0 -1
- package/umd/src/commitments/MEMORY/MEMORY.d.ts +0 -48
- package/umd/src/commitments/MEMORY/MEMORY.test.d.ts +0 -1
- package/umd/src/commitments/MEMORY/MemoryToolNames.d.ts +0 -11
- package/umd/src/commitments/MEMORY/MemoryToolRuntimeAdapter.d.ts +0 -149
- package/umd/src/commitments/MEMORY/createMemorySystemMessage.d.ts +0 -6
- package/umd/src/commitments/MEMORY/createMemoryToolFunctions.d.ts +0 -8
- package/umd/src/commitments/MEMORY/createMemoryTools.d.ts +0 -14
- package/umd/src/commitments/MEMORY/getMemoryCommitmentDocumentation.d.ts +0 -6
- package/umd/src/commitments/MEMORY/getMemoryToolRuntimeAdapterOrDisabledResult.d.ts +0 -17
- package/umd/src/commitments/MEMORY/getMemoryToolTitles.d.ts +0 -7
- package/umd/src/commitments/MEMORY/parseMemoryToolArgs.d.ts +0 -61
- package/umd/src/commitments/MEMORY/resolveMemoryRuntimeContext.d.ts +0 -8
- package/umd/src/commitments/MEMORY/setMemoryToolRuntimeAdapter.d.ts +0 -13
- package/umd/src/commitments/META/META.d.ts +0 -65
- package/umd/src/commitments/USE/aggregateUseCommitmentSystemMessages.d.ts +0 -32
- package/umd/src/commitments/USE_BROWSER/USE_BROWSER.d.ts +0 -58
- package/umd/src/commitments/USE_BROWSER/USE_BROWSER.test.d.ts +0 -1
- package/umd/src/commitments/USE_BROWSER/fetchUrlContentViaBrowser.d.ts +0 -13
- package/umd/src/commitments/USE_BROWSER/resolveRunBrowserToolForNode.d.ts +0 -10
- package/umd/src/commitments/USE_BROWSER/resolveRunBrowserToolForNode.test.d.ts +0 -1
- package/umd/src/commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.d.ts +0 -47
- package/umd/src/commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.test.d.ts +0 -1
- package/umd/src/commitments/USE_EMAIL/USE_EMAIL.d.ts +0 -38
- package/umd/src/commitments/USE_EMAIL/USE_EMAIL.test.d.ts +0 -1
- package/umd/src/commitments/USE_EMAIL/parseUseEmailCommitmentContent.d.ts +0 -21
- package/umd/src/commitments/USE_EMAIL/parseUseEmailCommitmentContent.test.d.ts +0 -1
- package/umd/src/commitments/USE_EMAIL/resolveSendEmailToolForNode.d.ts +0 -11
- package/umd/src/commitments/USE_EMAIL/sendEmailViaBrowser.d.ts +0 -13
- package/umd/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.d.ts +0 -46
- package/umd/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.test.d.ts +0 -1
- package/umd/src/commitments/USE_SPAWN/USE_SPAWN.d.ts +0 -38
- package/umd/src/commitments/USE_SPAWN/USE_SPAWN.test.d.ts +0 -1
- package/umd/src/commitments/USE_SPAWN/resolveSpawnAgentToolForNode.d.ts +0 -9
- package/umd/src/commitments/USE_SPAWN/spawnAgentViaBrowser.d.ts +0 -12
- package/umd/src/commitments/USE_TIME/USE_TIME.d.ts +0 -43
- package/umd/src/commitments/USE_TIME/USE_TIME.test.d.ts +0 -1
- package/umd/src/commitments/USE_TIMEOUT/TimeoutToolNames.d.ts +0 -11
- package/umd/src/commitments/USE_TIMEOUT/TimeoutToolRuntimeAdapter.d.ts +0 -212
- package/umd/src/commitments/USE_TIMEOUT/USE_TIMEOUT.d.ts +0 -38
- package/umd/src/commitments/USE_TIMEOUT/USE_TIMEOUT.test.d.ts +0 -1
- package/umd/src/commitments/USE_TIMEOUT/createTimeoutSystemMessage.d.ts +0 -6
- package/umd/src/commitments/USE_TIMEOUT/createTimeoutToolFunctions.d.ts +0 -8
- package/umd/src/commitments/USE_TIMEOUT/createTimeoutTools.d.ts +0 -7
- package/umd/src/commitments/USE_TIMEOUT/getTimeoutToolRuntimeAdapterOrDisabledResult.d.ts +0 -17
- package/umd/src/commitments/USE_TIMEOUT/parseTimeoutToolArgs.d.ts +0 -78
- package/umd/src/commitments/USE_TIMEOUT/resolveTimeoutRuntimeContext.d.ts +0 -8
- package/umd/src/commitments/USE_TIMEOUT/setTimeoutToolRuntimeAdapter.d.ts +0 -13
- package/umd/src/commitments/WALLET/WALLET.d.ts +0 -21
- package/umd/src/commitments/WALLET/WALLET.test.d.ts +0 -1
- package/umd/src/commitments/WALLET/WalletToolNames.d.ts +0 -12
- package/umd/src/commitments/WALLET/WalletToolRuntimeAdapter.d.ts +0 -163
- package/umd/src/commitments/WALLET/createWalletSystemMessage.d.ts +0 -6
- package/umd/src/commitments/WALLET/createWalletToolFunctions.d.ts +0 -8
- package/umd/src/commitments/WALLET/createWalletTools.d.ts +0 -7
- package/umd/src/commitments/WALLET/getWalletCommitmentDocumentation.d.ts +0 -6
- package/umd/src/commitments/WALLET/getWalletToolRuntimeAdapterOrDisabledResult.d.ts +0 -16
- package/umd/src/commitments/WALLET/getWalletToolTitles.d.ts +0 -7
- package/umd/src/commitments/WALLET/parseWalletToolArgs.d.ts +0 -51
- package/umd/src/commitments/WALLET/resolveWalletRuntimeContext.d.ts +0 -8
- package/umd/src/commitments/WALLET/setWalletToolRuntimeAdapter.d.ts +0 -13
- package/umd/src/commitments/_common/createSerpSearchToolFunction.d.ts +0 -12
- /package/esm/src/book-2.0/agent-source/{createAgentModelRequirements.useCommitmentAggregation.test.d.ts → createAgentModelRequirements.commitmentAggregation.test.d.ts} +0 -0
- /package/esm/src/{commitments/MEMORY/MEMORY.test.d.ts → cli/cli-commands/coder/boilerplateCount.test.d.ts} +0 -0
- /package/esm/src/{commitments/USE_BROWSER/USE_BROWSER.test.d.ts → cli/cli-commands/coder/generate-boilerplates.test.d.ts} +0 -0
- /package/esm/src/commitments/{META → META_DESCRIPTION}/META_DESCRIPTION.d.ts +0 -0
- /package/{esm/src/commitments/USE_BROWSER/resolveRunBrowserToolForNode.test.d.ts → umd/src/book-2.0/agent-source/createAgentModelRequirements.commitmentAggregation.test.d.ts} +0 -0
- /package/{esm/src/commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.test.d.ts → umd/src/cli/cli-commands/coder/boilerplateCount.test.d.ts} +0 -0
- /package/{esm/src/commitments/USE_EMAIL/USE_EMAIL.test.d.ts → umd/src/cli/cli-commands/coder/generate-boilerplates.test.d.ts} +0 -0
- /package/umd/src/commitments/{META → META_DESCRIPTION}/META_DESCRIPTION.d.ts +0 -0
|
@@ -31,13 +31,13 @@ export type BookParameter = {
|
|
|
31
31
|
};
|
|
32
32
|
/**
|
|
33
33
|
* Capability of the agent
|
|
34
|
-
* This is parsed from commitments like USE
|
|
34
|
+
* This is parsed from commitments like USE CALENDAR, USE PROJECT, KNOWLEDGE, etc.
|
|
35
35
|
*/
|
|
36
36
|
export type AgentCapability = {
|
|
37
37
|
/**
|
|
38
38
|
* The type of the capability
|
|
39
39
|
*/
|
|
40
|
-
type: '
|
|
40
|
+
type: 'knowledge' | 'user-location' | 'inheritance' | 'import' | 'image-generator' | 'team' | 'popup' | 'privacy' | 'project' | 'calendar';
|
|
41
41
|
/**
|
|
42
42
|
* The label to display for this capability
|
|
43
43
|
*/
|
|
@@ -122,7 +122,7 @@ export type AgentBasicInformation = {
|
|
|
122
122
|
parameters: Array<BookParameter>;
|
|
123
123
|
/**
|
|
124
124
|
* Capabilities of the agent
|
|
125
|
-
* This is parsed from commitments like USE
|
|
125
|
+
* This is parsed from commitments like USE CALENDAR, USE PROJECT, KNOWLEDGE, etc.
|
|
126
126
|
*/
|
|
127
127
|
capabilities: Array<AgentCapability>;
|
|
128
128
|
/**
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How many prompt boilerplate files are generated and how many prompts each of them contains.
|
|
3
|
+
*
|
|
4
|
+
* @private internal utility of `ptbk coder`
|
|
5
|
+
*/
|
|
6
|
+
export type BoilerplateCount = {
|
|
7
|
+
/**
|
|
8
|
+
* Number of generated prompt boilerplate files.
|
|
9
|
+
*/
|
|
10
|
+
readonly filesCount: number;
|
|
11
|
+
/**
|
|
12
|
+
* Number of prompts written into each generated file.
|
|
13
|
+
*
|
|
14
|
+
* Note: More than one prompt per file is an advanced option - each prompt is one separate
|
|
15
|
+
* coding task separated by `---` and tagged with its own fresh emoji tag.
|
|
16
|
+
*/
|
|
17
|
+
readonly promptsPerFileCount: number;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Number of prompt boilerplate files and prompts per file used when `--count` is not provided.
|
|
21
|
+
*
|
|
22
|
+
* @private internal utility of `ptbk coder`
|
|
23
|
+
*/
|
|
24
|
+
export declare const DEFAULT_BOILERPLATE_COUNT: BoilerplateCount;
|
|
25
|
+
/**
|
|
26
|
+
* Formats one boilerplate count back into the `N*M` notation of the `--count` option.
|
|
27
|
+
*
|
|
28
|
+
* @private internal utility of `ptbk coder`
|
|
29
|
+
*/
|
|
30
|
+
export declare function formatBoilerplateCount({ filesCount, promptsPerFileCount }: BoilerplateCount): string;
|
|
31
|
+
/**
|
|
32
|
+
* Default value of the `--count` option rendered in the `N*M` notation, for example `5*1`.
|
|
33
|
+
*
|
|
34
|
+
* @private internal utility of `ptbk coder`
|
|
35
|
+
*/
|
|
36
|
+
export declare const DEFAULT_BOILERPLATE_COUNT_OPTION_VALUE: string;
|
|
37
|
+
/**
|
|
38
|
+
* Description of the `--count` option shared by all commands which generate prompt boilerplates.
|
|
39
|
+
*
|
|
40
|
+
* @private internal utility of `ptbk coder`
|
|
41
|
+
*/
|
|
42
|
+
export declare const BOILERPLATE_COUNT_OPTION_DESCRIPTION: string;
|
|
43
|
+
/**
|
|
44
|
+
* Parses the `--count` option value into the number of files and the number of prompts in each of them.
|
|
45
|
+
*
|
|
46
|
+
* Both notations are supported:
|
|
47
|
+
* - `N` and `N*1` => N files with one prompt each
|
|
48
|
+
* - `N*M` => N files with M prompts each
|
|
49
|
+
*
|
|
50
|
+
* @private internal utility of `ptbk coder`
|
|
51
|
+
*/
|
|
52
|
+
export declare function parseBoilerplateCount(countOption: string): BoilerplateCount;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Command as Program } from 'commander';
|
|
2
2
|
import type { $side_effect } from '../../../utils/organization/$side_effect';
|
|
3
|
+
import type { BoilerplateCount } from './boilerplateCount';
|
|
3
4
|
/**
|
|
4
5
|
* Initializes `coder generate-boilerplates` command for Promptbook CLI utilities
|
|
5
6
|
*
|
|
@@ -13,8 +14,8 @@ export declare function $initializeCoderGenerateBoilerplatesCommand(program: Pro
|
|
|
13
14
|
*
|
|
14
15
|
* @private internal function of `generatePromptBoilerplate` command
|
|
15
16
|
*/
|
|
16
|
-
export declare function generatePromptBoilerplate({ projectPath,
|
|
17
|
+
export declare function generatePromptBoilerplate({ projectPath, boilerplateCount, templateOption, }: {
|
|
17
18
|
readonly projectPath: string;
|
|
18
|
-
readonly
|
|
19
|
+
readonly boilerplateCount: BoilerplateCount;
|
|
19
20
|
readonly templateOption?: string;
|
|
20
21
|
}): Promise<void>;
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import type { AgentModelRequirements } from '../../book-2.0/agent-source/AgentModelRequirements';
|
|
2
2
|
import { BaseCommitmentDefinition } from '../_base/BaseCommitmentDefinition';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* META FULLNAME commitment definition
|
|
5
5
|
*
|
|
6
|
-
* The
|
|
6
|
+
* The `META FULLNAME` commitment sets the full display name of the agent, which can differ
|
|
7
|
+
* from the agent name on the first line of the agent source, for example when the agent
|
|
8
|
+
* should be presented with academic titles.
|
|
9
|
+
* This commitment is metadata-only and does not modify model requirements.
|
|
7
10
|
*
|
|
8
11
|
* @private [🪔] Maybe export the commitments through some package
|
|
9
12
|
*/
|
|
10
|
-
export declare class
|
|
13
|
+
export declare class MetaFullnameCommitmentDefinition extends BaseCommitmentDefinition<'META FULLNAME'> {
|
|
11
14
|
constructor();
|
|
12
15
|
/**
|
|
13
|
-
* Short one-line description of
|
|
16
|
+
* Short one-line description of META FULLNAME.
|
|
14
17
|
*/
|
|
15
18
|
get description(): string;
|
|
16
19
|
/**
|
|
@@ -18,7 +21,7 @@ export declare class ComponentCommitmentDefinition extends BaseCommitmentDefinit
|
|
|
18
21
|
*/
|
|
19
22
|
get icon(): string;
|
|
20
23
|
/**
|
|
21
|
-
* Markdown documentation for
|
|
24
|
+
* Markdown documentation for META FULLNAME commitment.
|
|
22
25
|
*/
|
|
23
26
|
get documentation(): string;
|
|
24
27
|
applyToAgentModelRequirements(requirements: AgentModelRequirements, content: string): AgentModelRequirements;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { AgentModelRequirements } from '../../book-2.0/agent-source/AgentModelRequirements';
|
|
2
|
+
import { BaseCommitmentDefinition } from '../_base/BaseCommitmentDefinition';
|
|
3
|
+
/**
|
|
4
|
+
* META ID commitment definition
|
|
5
|
+
*
|
|
6
|
+
* The `META ID` commitment carries the permanent id of the agent when an agent source is moved
|
|
7
|
+
* between systems. It is a low-level commitment which is normally written and stripped by the
|
|
8
|
+
* persistence layer instead of being written by hand.
|
|
9
|
+
* This commitment is metadata-only and does not modify model requirements.
|
|
10
|
+
*
|
|
11
|
+
* @private [🪔] Maybe export the commitments through some package
|
|
12
|
+
*/
|
|
13
|
+
export declare class MetaIdCommitmentDefinition extends BaseCommitmentDefinition<'META ID'> {
|
|
14
|
+
constructor();
|
|
15
|
+
/**
|
|
16
|
+
* Short one-line description of META ID.
|
|
17
|
+
*/
|
|
18
|
+
get description(): string;
|
|
19
|
+
/**
|
|
20
|
+
* Icon for this commitment.
|
|
21
|
+
*/
|
|
22
|
+
get icon(): string;
|
|
23
|
+
/**
|
|
24
|
+
* `META ID` is written by the persistence layer, not by agent authors.
|
|
25
|
+
*/
|
|
26
|
+
get isLowLevel(): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Markdown documentation for META ID commitment.
|
|
29
|
+
*/
|
|
30
|
+
get documentation(): string;
|
|
31
|
+
applyToAgentModelRequirements(requirements: AgentModelRequirements, content: string): AgentModelRequirements;
|
|
32
|
+
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ActionCommitmentDefinition } from './ACTION/ACTION';
|
|
2
2
|
import { ClosedCommitmentDefinition } from './CLOSED/CLOSED';
|
|
3
|
-
import { ComponentCommitmentDefinition } from './COMPONENT/COMPONENT';
|
|
4
3
|
import { DeleteCommitmentDefinition } from './DELETE/DELETE';
|
|
5
4
|
import { DictionaryCommitmentDefinition } from './DICTIONARY/DICTIONARY';
|
|
6
5
|
import { FormatCommitmentDefinition } from './FORMAT/FORMAT';
|
|
@@ -9,19 +8,20 @@ import { GoalCommitmentDefinition } from './GOAL/GOAL';
|
|
|
9
8
|
import { ImportCommitmentDefinition } from './IMPORT/IMPORT';
|
|
10
9
|
import { KnowledgeCommitmentDefinition } from './KNOWLEDGE/KNOWLEDGE';
|
|
11
10
|
import { LanguageCommitmentDefinition } from './LANGUAGE/LANGUAGE';
|
|
12
|
-
import { MemoryCommitmentDefinition } from './MEMORY/MEMORY';
|
|
13
11
|
import { AgentMessageCommitmentDefinition } from './MESSAGE/AgentMessageCommitmentDefinition';
|
|
14
12
|
import { InitialMessageCommitmentDefinition } from './MESSAGE/InitialMessageCommitmentDefinition';
|
|
15
13
|
import { InternalMessageCommitmentDefinition } from './MESSAGE/InternalMessageCommitmentDefinition';
|
|
16
14
|
import { MessageCommitmentDefinition } from './MESSAGE/MESSAGE';
|
|
17
15
|
import { UserMessageCommitmentDefinition } from './MESSAGE/UserMessageCommitmentDefinition';
|
|
18
16
|
import { MessageSuffixCommitmentDefinition } from './MESSAGE_SUFFIX/MESSAGE_SUFFIX';
|
|
19
|
-
import { MetaCommitmentDefinition } from './META/META';
|
|
20
17
|
import { MetaAvatarCommitmentDefinition } from './META_AVATAR/META_AVATAR';
|
|
21
18
|
import { MetaColorCommitmentDefinition } from './META_COLOR/META_COLOR';
|
|
19
|
+
import { MetaDescriptionCommitmentDefinition } from './META_DESCRIPTION/META_DESCRIPTION';
|
|
22
20
|
import { MetaDomainCommitmentDefinition } from './META_DOMAIN/META_DOMAIN';
|
|
23
21
|
import { MetaDisclaimerCommitmentDefinition } from './META_DISCLAIMER/META_DISCLAIMER';
|
|
24
22
|
import { MetaFontCommitmentDefinition } from './META_FONT/META_FONT';
|
|
23
|
+
import { MetaFullnameCommitmentDefinition } from './META_FULLNAME/META_FULLNAME';
|
|
24
|
+
import { MetaIdCommitmentDefinition } from './META_ID/META_ID';
|
|
25
25
|
import { MetaImageCommitmentDefinition } from './META_IMAGE/META_IMAGE';
|
|
26
26
|
import { MetaInputPlaceholderCommitmentDefinition } from './META_INPUT_PLACEHOLDER/META_INPUT_PLACEHOLDER';
|
|
27
27
|
import { MetaLinkCommitmentDefinition } from './META_LINK/META_LINK';
|
|
@@ -38,21 +38,13 @@ import { ScenarioCommitmentDefinition } from './SCENARIO/SCENARIO';
|
|
|
38
38
|
import { StyleCommitmentDefinition } from './STYLE/STYLE';
|
|
39
39
|
import { TeamCommitmentDefinition } from './TEAM/TEAM';
|
|
40
40
|
import { TemplateCommitmentDefinition } from './TEMPLATE/TEMPLATE';
|
|
41
|
-
import { UseBrowserCommitmentDefinition } from './USE_BROWSER/USE_BROWSER';
|
|
42
41
|
import { UseCalendarCommitmentDefinition } from './USE_CALENDAR/USE_CALENDAR';
|
|
43
|
-
import { UseDeepSearchCommitmentDefinition } from './USE_DEEPSEARCH/USE_DEEPSEARCH';
|
|
44
|
-
import { UseEmailCommitmentDefinition } from './USE_EMAIL/USE_EMAIL';
|
|
45
42
|
import { UseImageGeneratorCommitmentDefinition } from './USE_IMAGE_GENERATOR/USE_IMAGE_GENERATOR';
|
|
46
43
|
import { UseMcpCommitmentDefinition } from './USE_MCP/USE_MCP';
|
|
47
44
|
import { UsePopupCommitmentDefinition } from './USE_POPUP/USE_POPUP';
|
|
48
45
|
import { UsePrivacyCommitmentDefinition } from './USE_PRIVACY/USE_PRIVACY';
|
|
49
46
|
import { UseProjectCommitmentDefinition } from './USE_PROJECT/USE_PROJECT';
|
|
50
|
-
import { UseSearchEngineCommitmentDefinition } from './USE_SEARCH_ENGINE/USE_SEARCH_ENGINE';
|
|
51
|
-
import { UseSpawnCommitmentDefinition } from './USE_SPAWN/USE_SPAWN';
|
|
52
|
-
import { UseTimeoutCommitmentDefinition } from './USE_TIMEOUT/USE_TIMEOUT';
|
|
53
|
-
import { UseTimeCommitmentDefinition } from './USE_TIME/USE_TIME';
|
|
54
47
|
import { UseUserLocationCommitmentDefinition } from './USE_USER_LOCATION/USE_USER_LOCATION';
|
|
55
|
-
import { WalletCommitmentDefinition } from './WALLET/WALLET';
|
|
56
48
|
import { WritingRulesCommitmentDefinition } from './WRITING_RULES/WRITING_RULES';
|
|
57
49
|
import { WritingSampleCommitmentDefinition } from './WRITING_SAMPLE/WRITING_SAMPLE';
|
|
58
50
|
import { NotYetImplementedCommitmentDefinition } from './_base/NotYetImplementedCommitmentDefinition';
|
|
@@ -63,4 +55,4 @@ import { NotYetImplementedCommitmentDefinition } from './_base/NotYetImplemented
|
|
|
63
55
|
*
|
|
64
56
|
* @private Use functions to access commitments instead of this array directly
|
|
65
57
|
*/
|
|
66
|
-
export declare const COMMITMENT_REGISTRY: readonly [PersonaCommitmentDefinition, PersonaCommitmentDefinition, KnowledgeCommitmentDefinition,
|
|
58
|
+
export declare const COMMITMENT_REGISTRY: readonly [PersonaCommitmentDefinition, PersonaCommitmentDefinition, KnowledgeCommitmentDefinition, StyleCommitmentDefinition, StyleCommitmentDefinition, RuleCommitmentDefinition, RuleCommitmentDefinition, LanguageCommitmentDefinition, LanguageCommitmentDefinition, WritingSampleCommitmentDefinition, WritingRulesCommitmentDefinition, SampleCommitmentDefinition, SampleCommitmentDefinition, FormatCommitmentDefinition, FormatCommitmentDefinition, TemplateCommitmentDefinition, TemplateCommitmentDefinition, FromCommitmentDefinition, ImportCommitmentDefinition, ImportCommitmentDefinition, ModelCommitmentDefinition, ModelCommitmentDefinition, ActionCommitmentDefinition, ActionCommitmentDefinition, MetaAvatarCommitmentDefinition, MetaAvatarCommitmentDefinition, MetaImageCommitmentDefinition, MetaColorCommitmentDefinition, MetaFontCommitmentDefinition, MetaLinkCommitmentDefinition, MetaDomainCommitmentDefinition, MetaDescriptionCommitmentDefinition, MetaDisclaimerCommitmentDefinition, MetaFullnameCommitmentDefinition, MetaIdCommitmentDefinition, MetaInputPlaceholderCommitmentDefinition, MetaThinkingMessageCommitmentDefinition, MetaVisibilityCommitmentDefinition, MetaVoiceCommitmentDefinition, NoteCommitmentDefinition, NoteCommitmentDefinition, NoteCommitmentDefinition, NoteCommitmentDefinition, NoteCommitmentDefinition, GoalCommitmentDefinition, GoalCommitmentDefinition, InitialMessageCommitmentDefinition, UserMessageCommitmentDefinition, InternalMessageCommitmentDefinition, AgentMessageCommitmentDefinition, MessageSuffixCommitmentDefinition, MessageCommitmentDefinition, MessageCommitmentDefinition, ScenarioCommitmentDefinition, ScenarioCommitmentDefinition, DeleteCommitmentDefinition, DeleteCommitmentDefinition, DeleteCommitmentDefinition, DeleteCommitmentDefinition, DictionaryCommitmentDefinition, OpenCommitmentDefinition, ClosedCommitmentDefinition, TeamCommitmentDefinition, UseUserLocationCommitmentDefinition, UseCalendarCommitmentDefinition, UsePopupCommitmentDefinition, UseImageGeneratorCommitmentDefinition, UseMcpCommitmentDefinition, UsePrivacyCommitmentDefinition, UseProjectCommitmentDefinition, NotYetImplementedCommitmentDefinition<"EXPECT">, NotYetImplementedCommitmentDefinition<"BEHAVIOUR">, NotYetImplementedCommitmentDefinition<"BEHAVIOURS">, NotYetImplementedCommitmentDefinition<"AVOID">, NotYetImplementedCommitmentDefinition<"AVOIDANCE">, NotYetImplementedCommitmentDefinition<"CONTEXT">];
|
|
@@ -45,7 +45,7 @@ export declare class Agent extends AgentLlmExecutionTools implements LlmExecutio
|
|
|
45
45
|
links: Array<string_agent_url>;
|
|
46
46
|
/**
|
|
47
47
|
* Capabilities of the agent
|
|
48
|
-
* This is parsed from commitments like USE
|
|
48
|
+
* This is parsed from commitments like USE CALENDAR, USE PROJECT, KNOWLEDGE, etc.
|
|
49
49
|
*/
|
|
50
50
|
capabilities: Array<AgentCapability>;
|
|
51
51
|
/**
|
|
@@ -73,7 +73,7 @@ export declare class OpenAiAgentKitExecutionToolsToolBuilder {
|
|
|
73
73
|
*/
|
|
74
74
|
private normalizeAgentKitToolParameters;
|
|
75
75
|
/**
|
|
76
|
-
* Creates the native Agent SDK tool used for
|
|
76
|
+
* Creates the native Agent SDK tool used for the DeepSearch capability.
|
|
77
77
|
*/
|
|
78
78
|
private createDeepSearchAgentKitTool;
|
|
79
79
|
/**
|
|
@@ -8,12 +8,11 @@
|
|
|
8
8
|
* 4. Returns the scraped markdown content
|
|
9
9
|
*
|
|
10
10
|
* WARNING: This function should NOT be used directly in browser environments.
|
|
11
|
-
* For browser environments,
|
|
12
|
-
* the Agents Server API endpoint at /api/scrape
|
|
11
|
+
* For browser environments, proxy the request through the Agents Server API endpoint at /api/scrape
|
|
13
12
|
*
|
|
14
13
|
* @param url The URL to fetch and scrape
|
|
15
14
|
* @returns Markdown content from the URL
|
|
16
15
|
*
|
|
17
|
-
* @private internal utility
|
|
16
|
+
* @private internal scraping utility
|
|
18
17
|
*/
|
|
19
18
|
export declare function fetchUrlContent(url: string): Promise<string>;
|
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.114.0-
|
|
18
|
+
* It follows semantic versioning (e.g., `0.114.0-4`).
|
|
19
19
|
*
|
|
20
20
|
* @generated
|
|
21
21
|
*/
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import type { AgentModelRequirements } from '../../book-2.0/agent-source/AgentModelRequirements';
|
|
2
|
-
import type { ToolFunction } from '../../scripting/javascript/JavascriptExecutionToolsOptions';
|
|
3
|
-
import type { string_javascript_name } from '../../types/string_person_fullname';
|
|
4
|
-
import { BaseCommitmentDefinition } from '../_base/BaseCommitmentDefinition';
|
|
5
|
-
export type { MemoryToolRecord, MemoryToolRuntimeAdapter, MemoryToolRuntimeContext } from './MemoryToolRuntimeAdapter';
|
|
6
|
-
export { setMemoryToolRuntimeAdapter } from './setMemoryToolRuntimeAdapter';
|
|
7
|
-
/**
|
|
8
|
-
* MEMORY commitment definition
|
|
9
|
-
*
|
|
10
|
-
* The MEMORY commitment is similar to KNOWLEDGE but has a focus on remembering past
|
|
11
|
-
* interactions and user preferences. It helps the agent maintain context about the
|
|
12
|
-
* user's history, preferences, and previous conversations.
|
|
13
|
-
*
|
|
14
|
-
* Example usage in agent source:
|
|
15
|
-
*
|
|
16
|
-
* ```book
|
|
17
|
-
* MEMORY User prefers detailed technical explanations
|
|
18
|
-
* MEMORY Previously worked on React projects
|
|
19
|
-
* MEMORY Timezone: UTC-5 (Eastern Time)
|
|
20
|
-
* ```
|
|
21
|
-
*
|
|
22
|
-
* @private [🪔] Maybe export the commitments through some package
|
|
23
|
-
*/
|
|
24
|
-
export declare class MemoryCommitmentDefinition extends BaseCommitmentDefinition<'MEMORY' | 'MEMORIES'> {
|
|
25
|
-
constructor(type?: 'MEMORY' | 'MEMORIES');
|
|
26
|
-
get requiresContent(): boolean;
|
|
27
|
-
/**
|
|
28
|
-
* Short one-line description of MEMORY.
|
|
29
|
-
*/
|
|
30
|
-
get description(): string;
|
|
31
|
-
/**
|
|
32
|
-
* Icon for this commitment.
|
|
33
|
-
*/
|
|
34
|
-
get icon(): string;
|
|
35
|
-
/**
|
|
36
|
-
* Markdown documentation for MEMORY commitment.
|
|
37
|
-
*/
|
|
38
|
-
get documentation(): string;
|
|
39
|
-
applyToAgentModelRequirements(requirements: AgentModelRequirements, content: string): AgentModelRequirements;
|
|
40
|
-
/**
|
|
41
|
-
* Gets human-readable titles for MEMORY tool functions.
|
|
42
|
-
*/
|
|
43
|
-
getToolTitles(): Record<string_javascript_name, string>;
|
|
44
|
-
/**
|
|
45
|
-
* Gets MEMORY tool function implementations.
|
|
46
|
-
*/
|
|
47
|
-
getToolFunctions(): Record<string_javascript_name, ToolFunction>;
|
|
48
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Names of tools used by the MEMORY commitment.
|
|
3
|
-
*
|
|
4
|
-
* @private function of MemoryCommitmentDefinition
|
|
5
|
-
*/
|
|
6
|
-
export declare const MemoryToolNames: {
|
|
7
|
-
readonly retrieve: string;
|
|
8
|
-
readonly store: string;
|
|
9
|
-
readonly update: string;
|
|
10
|
-
readonly delete: string;
|
|
11
|
-
};
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
import type { TODO_any } from '../../utils/organization/TODO_any';
|
|
2
|
-
/**
|
|
3
|
-
* Tool arguments for retrieving memory.
|
|
4
|
-
*
|
|
5
|
-
* @private type of MemoryCommitmentDefinition
|
|
6
|
-
*/
|
|
7
|
-
export type RetrieveMemoryToolArgs = {
|
|
8
|
-
query?: string;
|
|
9
|
-
limit?: number;
|
|
10
|
-
[key: string]: TODO_any;
|
|
11
|
-
};
|
|
12
|
-
/**
|
|
13
|
-
* Tool arguments for storing memory.
|
|
14
|
-
*
|
|
15
|
-
* @private type of MemoryCommitmentDefinition
|
|
16
|
-
*/
|
|
17
|
-
export type StoreMemoryToolArgs = {
|
|
18
|
-
content?: string;
|
|
19
|
-
isGlobal?: boolean;
|
|
20
|
-
[key: string]: TODO_any;
|
|
21
|
-
};
|
|
22
|
-
/**
|
|
23
|
-
* Tool arguments for updating memory.
|
|
24
|
-
*
|
|
25
|
-
* @private type of MemoryCommitmentDefinition
|
|
26
|
-
*/
|
|
27
|
-
export type UpdateMemoryToolArgs = {
|
|
28
|
-
memoryId?: string;
|
|
29
|
-
content?: string;
|
|
30
|
-
isGlobal?: boolean;
|
|
31
|
-
[key: string]: TODO_any;
|
|
32
|
-
};
|
|
33
|
-
/**
|
|
34
|
-
* Tool arguments for deleting memory.
|
|
35
|
-
*
|
|
36
|
-
* @private type of MemoryCommitmentDefinition
|
|
37
|
-
*/
|
|
38
|
-
export type DeleteMemoryToolArgs = {
|
|
39
|
-
memoryId?: string;
|
|
40
|
-
[key: string]: TODO_any;
|
|
41
|
-
};
|
|
42
|
-
/**
|
|
43
|
-
* Memory record returned by runtime adapters.
|
|
44
|
-
*
|
|
45
|
-
* @private type of MemoryCommitmentDefinition
|
|
46
|
-
*/
|
|
47
|
-
export type MemoryToolRecord = {
|
|
48
|
-
id?: string;
|
|
49
|
-
content: string;
|
|
50
|
-
isGlobal: boolean;
|
|
51
|
-
createdAt?: string;
|
|
52
|
-
updatedAt?: string;
|
|
53
|
-
};
|
|
54
|
-
/**
|
|
55
|
-
* Runtime context for MEMORY tools resolved from hidden tool arguments.
|
|
56
|
-
*
|
|
57
|
-
* @private type of MemoryCommitmentDefinition
|
|
58
|
-
*/
|
|
59
|
-
export type MemoryToolRuntimeContext = {
|
|
60
|
-
readonly enabled: boolean;
|
|
61
|
-
readonly userId?: number;
|
|
62
|
-
readonly username?: string;
|
|
63
|
-
readonly agentId?: string;
|
|
64
|
-
readonly agentName?: string;
|
|
65
|
-
readonly isTeamConversation: boolean;
|
|
66
|
-
readonly isPrivateMode: boolean;
|
|
67
|
-
};
|
|
68
|
-
/**
|
|
69
|
-
* Result payload returned by retrieve memory tool.
|
|
70
|
-
*
|
|
71
|
-
* @private type of MemoryCommitmentDefinition
|
|
72
|
-
*/
|
|
73
|
-
export type RetrieveMemoryToolResult = {
|
|
74
|
-
action: 'retrieve';
|
|
75
|
-
status: 'ok' | 'disabled' | 'error';
|
|
76
|
-
query?: string;
|
|
77
|
-
memories: MemoryToolRecord[];
|
|
78
|
-
message?: string;
|
|
79
|
-
};
|
|
80
|
-
/**
|
|
81
|
-
* Result payload returned by store memory tool.
|
|
82
|
-
*
|
|
83
|
-
* @private type of MemoryCommitmentDefinition
|
|
84
|
-
*/
|
|
85
|
-
export type StoreMemoryToolResult = {
|
|
86
|
-
action: 'store';
|
|
87
|
-
status: 'stored' | 'disabled' | 'error';
|
|
88
|
-
memory?: MemoryToolRecord;
|
|
89
|
-
message?: string;
|
|
90
|
-
};
|
|
91
|
-
/**
|
|
92
|
-
* Result payload returned by update memory tool.
|
|
93
|
-
*
|
|
94
|
-
* @private type of MemoryCommitmentDefinition
|
|
95
|
-
*/
|
|
96
|
-
export type UpdateMemoryToolResult = {
|
|
97
|
-
action: 'update';
|
|
98
|
-
status: 'updated' | 'disabled' | 'error';
|
|
99
|
-
memory?: MemoryToolRecord;
|
|
100
|
-
message?: string;
|
|
101
|
-
};
|
|
102
|
-
/**
|
|
103
|
-
* Result payload returned by delete memory tool.
|
|
104
|
-
*
|
|
105
|
-
* @private type of MemoryCommitmentDefinition
|
|
106
|
-
*/
|
|
107
|
-
export type DeleteMemoryToolResult = {
|
|
108
|
-
action: 'delete';
|
|
109
|
-
status: 'deleted' | 'disabled' | 'error';
|
|
110
|
-
memoryId?: string;
|
|
111
|
-
message?: string;
|
|
112
|
-
};
|
|
113
|
-
/**
|
|
114
|
-
* Union of all MEMORY tool actions.
|
|
115
|
-
*
|
|
116
|
-
* @private type of MemoryCommitmentDefinition
|
|
117
|
-
*/
|
|
118
|
-
export type MemoryToolAction = RetrieveMemoryToolResult['action'] | StoreMemoryToolResult['action'] | UpdateMemoryToolResult['action'] | DeleteMemoryToolResult['action'];
|
|
119
|
-
/**
|
|
120
|
-
* Union of all MEMORY tool result payloads.
|
|
121
|
-
*
|
|
122
|
-
* @private type of MemoryCommitmentDefinition
|
|
123
|
-
*/
|
|
124
|
-
export type MemoryToolResult = RetrieveMemoryToolResult | StoreMemoryToolResult | UpdateMemoryToolResult | DeleteMemoryToolResult;
|
|
125
|
-
/**
|
|
126
|
-
* Runtime adapter interface used by MEMORY tools.
|
|
127
|
-
*
|
|
128
|
-
* @private type of MemoryCommitmentDefinition
|
|
129
|
-
*/
|
|
130
|
-
export type MemoryToolRuntimeAdapter = {
|
|
131
|
-
retrieveMemories(args: {
|
|
132
|
-
query?: string;
|
|
133
|
-
limit?: number;
|
|
134
|
-
}, runtimeContext: MemoryToolRuntimeContext): Promise<MemoryToolRecord[]>;
|
|
135
|
-
storeMemory(args: {
|
|
136
|
-
content: string;
|
|
137
|
-
isGlobal: boolean;
|
|
138
|
-
}, runtimeContext: MemoryToolRuntimeContext): Promise<MemoryToolRecord>;
|
|
139
|
-
updateMemory(args: {
|
|
140
|
-
memoryId: string;
|
|
141
|
-
content: string;
|
|
142
|
-
isGlobal?: boolean;
|
|
143
|
-
}, runtimeContext: MemoryToolRuntimeContext): Promise<MemoryToolRecord>;
|
|
144
|
-
deleteMemory(args: {
|
|
145
|
-
memoryId: string;
|
|
146
|
-
}, runtimeContext: MemoryToolRuntimeContext): Promise<{
|
|
147
|
-
id?: string;
|
|
148
|
-
}>;
|
|
149
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { ToolFunction } from '../../scripting/javascript/JavascriptExecutionToolsOptions';
|
|
2
|
-
import type { string_javascript_name } from '../../types/string_person_fullname';
|
|
3
|
-
/**
|
|
4
|
-
* Gets MEMORY tool function implementations.
|
|
5
|
-
*
|
|
6
|
-
* @private function of MemoryCommitmentDefinition
|
|
7
|
-
*/
|
|
8
|
-
export declare function createMemoryToolFunctions(): Record<string_javascript_name, ToolFunction>;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { AgentModelRequirements } from '../../book-2.0/agent-source/AgentModelRequirements';
|
|
2
|
-
/**
|
|
3
|
-
* Concrete type of tool definitions in `AgentModelRequirements`.
|
|
4
|
-
*
|
|
5
|
-
* @private type of MemoryCommitmentDefinition
|
|
6
|
-
*/
|
|
7
|
-
type AgentModelTools = NonNullable<AgentModelRequirements['tools']>;
|
|
8
|
-
/**
|
|
9
|
-
* Creates MEMORY tool definitions while preserving already-registered tools.
|
|
10
|
-
*
|
|
11
|
-
* @private function of MemoryCommitmentDefinition
|
|
12
|
-
*/
|
|
13
|
-
export declare function createMemoryTools(existingTools: AgentModelRequirements['tools']): AgentModelTools;
|
|
14
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { DeleteMemoryToolResult, MemoryToolAction, MemoryToolRuntimeAdapter, MemoryToolRuntimeContext, RetrieveMemoryToolResult, StoreMemoryToolResult, UpdateMemoryToolResult } from './MemoryToolRuntimeAdapter';
|
|
2
|
-
/**
|
|
3
|
-
* Return type of MEMORY adapter resolution helper.
|
|
4
|
-
*
|
|
5
|
-
* @private type of MemoryCommitmentDefinition
|
|
6
|
-
*/
|
|
7
|
-
type MemoryToolRuntimeAdapterResolution = {
|
|
8
|
-
adapter: MemoryToolRuntimeAdapter | null;
|
|
9
|
-
disabledResult: RetrieveMemoryToolResult | StoreMemoryToolResult | UpdateMemoryToolResult | DeleteMemoryToolResult | null;
|
|
10
|
-
};
|
|
11
|
-
/**
|
|
12
|
-
* Gets the runtime adapter and returns a disabled result when unavailable.
|
|
13
|
-
*
|
|
14
|
-
* @private function of MemoryCommitmentDefinition
|
|
15
|
-
*/
|
|
16
|
-
export declare function getMemoryToolRuntimeAdapterOrDisabledResult(action: MemoryToolAction, runtimeContext: MemoryToolRuntimeContext): MemoryToolRuntimeAdapterResolution;
|
|
17
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { string_javascript_name } from '../../types/string_person_fullname';
|
|
2
|
-
/**
|
|
3
|
-
* Gets human-readable titles for MEMORY tool functions.
|
|
4
|
-
*
|
|
5
|
-
* @private function of MemoryCommitmentDefinition
|
|
6
|
-
*/
|
|
7
|
-
export declare function getMemoryToolTitles(): Record<string_javascript_name, string>;
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import type { DeleteMemoryToolArgs, RetrieveMemoryToolArgs, StoreMemoryToolArgs, UpdateMemoryToolArgs } from './MemoryToolRuntimeAdapter';
|
|
2
|
-
/**
|
|
3
|
-
* Parsed retrieve memory arguments.
|
|
4
|
-
*
|
|
5
|
-
* @private type of MemoryCommitmentDefinition
|
|
6
|
-
*/
|
|
7
|
-
type ParsedRetrieveMemoryArgs = {
|
|
8
|
-
query?: string;
|
|
9
|
-
limit?: number;
|
|
10
|
-
};
|
|
11
|
-
/**
|
|
12
|
-
* Parsed store memory arguments.
|
|
13
|
-
*
|
|
14
|
-
* @private type of MemoryCommitmentDefinition
|
|
15
|
-
*/
|
|
16
|
-
type ParsedStoreMemoryArgs = {
|
|
17
|
-
content: string;
|
|
18
|
-
isGlobal: boolean;
|
|
19
|
-
};
|
|
20
|
-
/**
|
|
21
|
-
* Parsed update memory arguments.
|
|
22
|
-
*
|
|
23
|
-
* @private type of MemoryCommitmentDefinition
|
|
24
|
-
*/
|
|
25
|
-
type ParsedUpdateMemoryArgs = {
|
|
26
|
-
memoryId: string;
|
|
27
|
-
content: string;
|
|
28
|
-
isGlobal?: boolean;
|
|
29
|
-
};
|
|
30
|
-
/**
|
|
31
|
-
* Parsed delete memory arguments.
|
|
32
|
-
*
|
|
33
|
-
* @private type of MemoryCommitmentDefinition
|
|
34
|
-
*/
|
|
35
|
-
type ParsedDeleteMemoryArgs = {
|
|
36
|
-
memoryId: string;
|
|
37
|
-
};
|
|
38
|
-
/**
|
|
39
|
-
* Collection of MEMORY tool argument parsers.
|
|
40
|
-
*
|
|
41
|
-
* @private function of MemoryCommitmentDefinition
|
|
42
|
-
*/
|
|
43
|
-
export declare const parseMemoryToolArgs: {
|
|
44
|
-
/**
|
|
45
|
-
* Parses retrieve memory arguments.
|
|
46
|
-
*/
|
|
47
|
-
retrieve(args: RetrieveMemoryToolArgs): ParsedRetrieveMemoryArgs;
|
|
48
|
-
/**
|
|
49
|
-
* Parses store memory arguments.
|
|
50
|
-
*/
|
|
51
|
-
store(args: StoreMemoryToolArgs): ParsedStoreMemoryArgs;
|
|
52
|
-
/**
|
|
53
|
-
* Parses update memory arguments.
|
|
54
|
-
*/
|
|
55
|
-
update(args: UpdateMemoryToolArgs): ParsedUpdateMemoryArgs;
|
|
56
|
-
/**
|
|
57
|
-
* Parses delete memory arguments.
|
|
58
|
-
*/
|
|
59
|
-
delete(args: DeleteMemoryToolArgs): ParsedDeleteMemoryArgs;
|
|
60
|
-
};
|
|
61
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { TODO_any } from '../../utils/organization/TODO_any';
|
|
2
|
-
import type { MemoryToolRuntimeContext } from './MemoryToolRuntimeAdapter';
|
|
3
|
-
/**
|
|
4
|
-
* Resolves runtime context from hidden tool arguments.
|
|
5
|
-
*
|
|
6
|
-
* @private function of MemoryCommitmentDefinition
|
|
7
|
-
*/
|
|
8
|
-
export declare function resolveMemoryRuntimeContext(args: Record<string, TODO_any>): MemoryToolRuntimeContext;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { MemoryToolRuntimeAdapter } from './MemoryToolRuntimeAdapter';
|
|
2
|
-
/**
|
|
3
|
-
* Sets runtime adapter used by MEMORY commitment tools.
|
|
4
|
-
*
|
|
5
|
-
* @private function of MemoryCommitmentDefinition
|
|
6
|
-
*/
|
|
7
|
-
export declare function setMemoryToolRuntimeAdapter(adapter: MemoryToolRuntimeAdapter | null): void;
|
|
8
|
-
/**
|
|
9
|
-
* Gets runtime adapter used by MEMORY commitment tools.
|
|
10
|
-
*
|
|
11
|
-
* @private function of MemoryCommitmentDefinition
|
|
12
|
-
*/
|
|
13
|
-
export declare function getMemoryToolRuntimeAdapter(): MemoryToolRuntimeAdapter | null;
|