@promptbook/markdown-utils 0.112.0-54 → 0.112.0-57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/index.es.js +3 -3
- package/esm/src/_packages/cli.index.d.ts +10 -0
- package/esm/src/_packages/core.index.d.ts +12 -0
- package/esm/src/_packages/types.index.d.ts +8 -0
- package/esm/src/_packages/wizard.index.d.ts +10 -0
- package/esm/src/avatars/index.d.ts +1 -1
- package/esm/src/avatars/types/AvatarVisualDefinition.d.ts +1 -1
- package/esm/src/avatars/visuals/avatarVisualRegistry.d.ts +12 -0
- package/esm/src/avatars/visuals/orbAvatarVisual.d.ts +48 -0
- package/esm/src/avatars/visuals/orbAvatarVisual.test.d.ts +1 -0
- package/esm/src/book-2.0/agent-source/AgentBasicInformation.d.ts +2 -0
- package/esm/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments/ParsedAgentSourceWithCommitments.d.ts +7 -0
- package/esm/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments/applyCommitmentsToAgentModelRequirements.d.ts +14 -0
- package/esm/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments/augmentAgentModelRequirementsFromSource.d.ts +14 -0
- package/esm/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments/filterCommitmentsForAgentModelRequirements.d.ts +10 -0
- package/esm/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments/materializeInlineKnowledgeSources.d.ts +12 -0
- package/esm/src/book-2.0/agent-source/parseAgentSource/ParseAgentSourceState.d.ts +10 -0
- package/esm/src/book-2.0/agent-source/parseAgentSource/ParsedAgentProfile.d.ts +7 -0
- package/esm/src/book-2.0/agent-source/parseAgentSource/applyMetaCommitment.d.ts +8 -0
- package/esm/src/book-2.0/agent-source/parseAgentSource/consumeConversationSampleCommitment.d.ts +8 -0
- package/esm/src/book-2.0/agent-source/parseAgentSource/createCapabilitiesFromCommitment.d.ts +9 -0
- package/esm/src/book-2.0/agent-source/parseAgentSource/ensureMetaFullname.d.ts +7 -0
- package/esm/src/book-2.0/agent-source/parseAgentSource/extractAgentProfileText.d.ts +8 -0
- package/esm/src/book-2.0/agent-source/parseAgentSource/extractInitialMessage.d.ts +7 -0
- package/esm/src/book-2.0/agent-source/parseAgentSource/extractParsedAgentProfile.d.ts +8 -0
- package/esm/src/book-2.0/agent-source/parseAgentSourceWithCommitments.use.test.d.ts +1 -0
- package/esm/src/book-components/BookEditor/createDeprecatedCommitmentDiagnostics.d.ts +9 -8
- package/esm/src/commitments/ACTION/ACTION.d.ts +8 -2
- package/esm/src/commitments/ACTION/ACTION.test.d.ts +1 -0
- package/esm/src/commitments/DELETE/DELETE.d.ts +7 -3
- package/esm/src/commitments/DELETE/DELETE.test.d.ts +1 -0
- package/esm/src/commitments/FORMAT/FORMAT.d.ts +10 -4
- package/esm/src/commitments/FORMAT/FORMAT.test.d.ts +1 -0
- package/esm/src/commitments/GOAL/GOAL.d.ts +4 -0
- package/esm/src/commitments/KNOWLEDGE/KNOWLEDGE.d.ts +4 -0
- package/esm/src/commitments/META/META.d.ts +2 -0
- package/esm/src/commitments/META_AVATAR/META_AVATAR.d.ts +26 -0
- package/esm/src/commitments/MODEL/MODEL.d.ts +4 -0
- package/esm/src/commitments/MODEL/MODEL.test.d.ts +1 -0
- package/esm/src/commitments/RULE/RULE.d.ts +4 -0
- package/esm/src/commitments/TEAM/TEAM.d.ts +4 -0
- package/esm/src/commitments/TEMPLATE/TEMPLATE.d.ts +10 -4
- package/esm/src/commitments/_base/BaseCommitmentDefinition.d.ts +12 -0
- package/esm/src/commitments/_base/CommitmentDefinition.d.ts +21 -1
- package/esm/src/commitments/_common/getAllCommitmentDefinitions.test.d.ts +1 -0
- package/esm/src/commitments/_common/getCommitmentNoticeMetadata.d.ts +51 -0
- package/esm/src/commitments/_common/getCommitmentNoticeMetadata.test.d.ts +1 -0
- package/esm/src/commitments/_common/getGroupedCommitmentDefinitions.openClosed.test.d.ts +1 -0
- package/esm/src/commitments/_common/getGroupedCommitmentDefinitions.order.test.d.ts +1 -0
- package/esm/src/commitments/_common/getGroupedCommitmentDefinitions.use.test.d.ts +1 -0
- package/esm/src/commitments/_common/sortCommitmentDefinitions.d.ts +31 -0
- package/esm/src/commitments/_common/teamInternalAgentAccess.d.ts +51 -0
- package/esm/src/commitments/_common/toolRuntimeContext.d.ts +4 -0
- package/esm/src/commitments/index.d.ts +2 -2
- package/esm/src/commitments/index.test.d.ts +1 -0
- package/esm/src/llm-providers/agent/Agent.d.ts +2 -0
- package/esm/src/llm-providers/agent/RemoteAgent.d.ts +1 -0
- package/esm/src/llm-providers/agent/RemoteAgentOptions.d.ts +4 -0
- package/esm/src/playground/playground.d.ts +1 -0
- package/esm/src/transpilers/_common/BookTranspilerOptions.d.ts +20 -0
- package/esm/src/transpilers/_common/TranspiledTeamExport.d.ts +80 -0
- package/esm/src/transpilers/_common/createTranspiledTeamRuntimeSection.d.ts +55 -0
- package/esm/src/transpilers/_common/createZodSchemaSource.d.ts +40 -0
- package/esm/src/transpilers/_common/formatUsedToolFunctions.d.ts +18 -0
- package/esm/src/transpilers/_common/formatUsedToolFunctions.test.d.ts +1 -0
- package/esm/src/transpilers/_common/prepareSdkTranspilerContext.d.ts +48 -0
- package/esm/src/transpilers/_common/resolveClaudeModelName.d.ts +12 -0
- package/esm/src/transpilers/_common/transpiledTeamTranspilers.test.d.ts +1 -0
- package/esm/src/transpilers/agent-os/AgentOsTranspiler.d.ts +16 -0
- package/esm/src/transpilers/agent-os/AgentOsTranspiler.test.d.ts +1 -0
- package/esm/src/transpilers/agent-os/register.d.ts +12 -0
- package/esm/src/transpilers/anthropic-claude-managed/AnthropicClaudeManagedTranspiler.d.ts +16 -0
- package/esm/src/transpilers/anthropic-claude-managed/AnthropicClaudeManagedTranspiler.test.d.ts +1 -0
- package/esm/src/transpilers/anthropic-claude-managed/register.d.ts +12 -0
- package/esm/src/transpilers/anthropic-claude-sdk/AnthropicClaudeSdkTranspiler.d.ts +16 -0
- package/esm/src/transpilers/anthropic-claude-sdk/AnthropicClaudeSdkTranspiler.test.d.ts +1 -0
- package/esm/src/transpilers/anthropic-claude-sdk/register.d.ts +12 -0
- package/esm/src/transpilers/e2b/E2BTranspiler.d.ts +16 -0
- package/esm/src/transpilers/e2b/E2BTranspiler.test.d.ts +1 -0
- package/esm/src/transpilers/e2b/register.d.ts +12 -0
- package/esm/src/transpilers/openai-agents/OpenAiAgentsTranspiler.d.ts +16 -0
- package/esm/src/transpilers/openai-agents/OpenAiAgentsTranspiler.test.d.ts +1 -0
- package/esm/src/transpilers/openai-agents/register.d.ts +12 -0
- package/esm/src/types/LlmToolDefinition.d.ts +17 -7
- package/esm/src/utils/agents/resolveAgentAvatarImageUrl.d.ts +15 -0
- package/esm/src/utils/markdown/humanizeAiTextEmdashed.d.ts +1 -1
- package/esm/src/version.d.ts +1 -1
- package/package.json +1 -1
- package/umd/index.umd.js +3 -3
- package/umd/src/_packages/cli.index.d.ts +10 -0
- package/umd/src/_packages/core.index.d.ts +12 -0
- package/umd/src/_packages/types.index.d.ts +8 -0
- package/umd/src/_packages/wizard.index.d.ts +10 -0
- package/umd/src/avatars/index.d.ts +1 -1
- package/umd/src/avatars/types/AvatarVisualDefinition.d.ts +1 -1
- package/umd/src/avatars/visuals/avatarVisualRegistry.d.ts +12 -0
- package/umd/src/avatars/visuals/orbAvatarVisual.d.ts +48 -0
- package/umd/src/avatars/visuals/orbAvatarVisual.test.d.ts +1 -0
- package/umd/src/book-2.0/agent-source/AgentBasicInformation.d.ts +2 -0
- package/umd/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments/ParsedAgentSourceWithCommitments.d.ts +7 -0
- package/umd/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments/applyCommitmentsToAgentModelRequirements.d.ts +14 -0
- package/umd/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments/augmentAgentModelRequirementsFromSource.d.ts +14 -0
- package/umd/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments/filterCommitmentsForAgentModelRequirements.d.ts +10 -0
- package/umd/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments/materializeInlineKnowledgeSources.d.ts +12 -0
- package/umd/src/book-2.0/agent-source/parseAgentSource/ParseAgentSourceState.d.ts +10 -0
- package/umd/src/book-2.0/agent-source/parseAgentSource/ParsedAgentProfile.d.ts +7 -0
- package/umd/src/book-2.0/agent-source/parseAgentSource/applyMetaCommitment.d.ts +8 -0
- package/umd/src/book-2.0/agent-source/parseAgentSource/consumeConversationSampleCommitment.d.ts +8 -0
- package/umd/src/book-2.0/agent-source/parseAgentSource/createCapabilitiesFromCommitment.d.ts +9 -0
- package/umd/src/book-2.0/agent-source/parseAgentSource/ensureMetaFullname.d.ts +7 -0
- package/umd/src/book-2.0/agent-source/parseAgentSource/extractAgentProfileText.d.ts +8 -0
- package/umd/src/book-2.0/agent-source/parseAgentSource/extractInitialMessage.d.ts +7 -0
- package/umd/src/book-2.0/agent-source/parseAgentSource/extractParsedAgentProfile.d.ts +8 -0
- package/umd/src/book-2.0/agent-source/parseAgentSourceWithCommitments.use.test.d.ts +1 -0
- package/umd/src/book-components/BookEditor/createDeprecatedCommitmentDiagnostics.d.ts +9 -8
- package/umd/src/commitments/ACTION/ACTION.d.ts +8 -2
- package/umd/src/commitments/ACTION/ACTION.test.d.ts +1 -0
- package/umd/src/commitments/DELETE/DELETE.d.ts +7 -3
- package/umd/src/commitments/DELETE/DELETE.test.d.ts +1 -0
- package/umd/src/commitments/FORMAT/FORMAT.d.ts +10 -4
- package/umd/src/commitments/FORMAT/FORMAT.test.d.ts +1 -0
- package/umd/src/commitments/GOAL/GOAL.d.ts +4 -0
- package/umd/src/commitments/KNOWLEDGE/KNOWLEDGE.d.ts +4 -0
- package/umd/src/commitments/META/META.d.ts +2 -0
- package/umd/src/commitments/META_AVATAR/META_AVATAR.d.ts +26 -0
- package/umd/src/commitments/MODEL/MODEL.d.ts +4 -0
- package/umd/src/commitments/MODEL/MODEL.test.d.ts +1 -0
- package/umd/src/commitments/RULE/RULE.d.ts +4 -0
- package/umd/src/commitments/TEAM/TEAM.d.ts +4 -0
- package/umd/src/commitments/TEMPLATE/TEMPLATE.d.ts +10 -4
- package/umd/src/commitments/_base/BaseCommitmentDefinition.d.ts +12 -0
- package/umd/src/commitments/_base/CommitmentDefinition.d.ts +21 -1
- package/umd/src/commitments/_common/getAllCommitmentDefinitions.test.d.ts +1 -0
- package/umd/src/commitments/_common/getCommitmentNoticeMetadata.d.ts +51 -0
- package/umd/src/commitments/_common/getCommitmentNoticeMetadata.test.d.ts +1 -0
- package/umd/src/commitments/_common/getGroupedCommitmentDefinitions.openClosed.test.d.ts +1 -0
- package/umd/src/commitments/_common/getGroupedCommitmentDefinitions.order.test.d.ts +1 -0
- package/umd/src/commitments/_common/getGroupedCommitmentDefinitions.use.test.d.ts +1 -0
- package/umd/src/commitments/_common/sortCommitmentDefinitions.d.ts +31 -0
- package/umd/src/commitments/_common/teamInternalAgentAccess.d.ts +51 -0
- package/umd/src/commitments/_common/toolRuntimeContext.d.ts +4 -0
- package/umd/src/commitments/index.d.ts +2 -2
- package/umd/src/commitments/index.test.d.ts +1 -0
- package/umd/src/llm-providers/agent/Agent.d.ts +2 -0
- package/umd/src/llm-providers/agent/RemoteAgent.d.ts +1 -0
- package/umd/src/llm-providers/agent/RemoteAgentOptions.d.ts +4 -0
- package/umd/src/playground/playground.d.ts +1 -0
- package/umd/src/transpilers/_common/BookTranspilerOptions.d.ts +20 -0
- package/umd/src/transpilers/_common/TranspiledTeamExport.d.ts +80 -0
- package/umd/src/transpilers/_common/createTranspiledTeamRuntimeSection.d.ts +55 -0
- package/umd/src/transpilers/_common/createZodSchemaSource.d.ts +40 -0
- package/umd/src/transpilers/_common/formatUsedToolFunctions.d.ts +18 -0
- package/umd/src/transpilers/_common/formatUsedToolFunctions.test.d.ts +1 -0
- package/umd/src/transpilers/_common/prepareSdkTranspilerContext.d.ts +48 -0
- package/umd/src/transpilers/_common/resolveClaudeModelName.d.ts +12 -0
- package/umd/src/transpilers/_common/transpiledTeamTranspilers.test.d.ts +1 -0
- package/umd/src/transpilers/agent-os/AgentOsTranspiler.d.ts +16 -0
- package/umd/src/transpilers/agent-os/AgentOsTranspiler.test.d.ts +1 -0
- package/umd/src/transpilers/agent-os/register.d.ts +12 -0
- package/umd/src/transpilers/anthropic-claude-managed/AnthropicClaudeManagedTranspiler.d.ts +16 -0
- package/umd/src/transpilers/anthropic-claude-managed/AnthropicClaudeManagedTranspiler.test.d.ts +1 -0
- package/umd/src/transpilers/anthropic-claude-managed/register.d.ts +12 -0
- package/umd/src/transpilers/anthropic-claude-sdk/AnthropicClaudeSdkTranspiler.d.ts +16 -0
- package/umd/src/transpilers/anthropic-claude-sdk/AnthropicClaudeSdkTranspiler.test.d.ts +1 -0
- package/umd/src/transpilers/anthropic-claude-sdk/register.d.ts +12 -0
- package/umd/src/transpilers/e2b/E2BTranspiler.d.ts +16 -0
- package/umd/src/transpilers/e2b/E2BTranspiler.test.d.ts +1 -0
- package/umd/src/transpilers/e2b/register.d.ts +12 -0
- package/umd/src/transpilers/openai-agents/OpenAiAgentsTranspiler.d.ts +16 -0
- package/umd/src/transpilers/openai-agents/OpenAiAgentsTranspiler.test.d.ts +1 -0
- package/umd/src/transpilers/openai-agents/register.d.ts +12 -0
- package/umd/src/types/LlmToolDefinition.d.ts +17 -7
- package/umd/src/utils/agents/resolveAgentAvatarImageUrl.d.ts +15 -0
- package/umd/src/utils/markdown/humanizeAiTextEmdashed.d.ts +1 -1
- package/umd/src/version.d.ts +1 -1
- package/esm/src/commitments/USE/USE.d.ts +0 -51
- package/umd/src/commitments/USE/USE.d.ts +0 -51
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Registration } from '../../utils/misc/$Register';
|
|
2
|
+
/**
|
|
3
|
+
* Registration of transpiler.
|
|
4
|
+
*
|
|
5
|
+
* Warning: This is not useful for the end user, it is just a side effect of the mechanism that handles all available LLM tools.
|
|
6
|
+
*
|
|
7
|
+
* TODO: [🧠] Which package should export this?
|
|
8
|
+
*
|
|
9
|
+
* @public exported from `@promptbook/wizard`
|
|
10
|
+
* @public exported from `@promptbook/cli`
|
|
11
|
+
*/
|
|
12
|
+
export declare const _AgentOsTranspilerRegistration: Registration;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { string_book } from '../../book-2.0/agent-source/string_book';
|
|
2
|
+
import type { ExecutionTools } from '../../execution/ExecutionTools';
|
|
3
|
+
import type { string_script } from '../../types/typeAliases';
|
|
4
|
+
import type { BookTranspilerOptions } from '../_common/BookTranspilerOptions';
|
|
5
|
+
/**
|
|
6
|
+
* Transpiler to JavaScript code using Anthropic Claude Agent SDK managed sessions.
|
|
7
|
+
*
|
|
8
|
+
* @public exported from `@promptbook/core`
|
|
9
|
+
*/
|
|
10
|
+
export declare const AnthropicClaudeManagedTranspiler: {
|
|
11
|
+
readonly name: "anthropic-claude-managed";
|
|
12
|
+
readonly title: "Anthropic Claude Managed";
|
|
13
|
+
readonly packageName: "@promptbook/core";
|
|
14
|
+
readonly className: "AnthropicClaudeManagedTranspiler";
|
|
15
|
+
readonly transpileBook: (book: string_book, tools: ExecutionTools, options?: BookTranspilerOptions) => Promise<string_script>;
|
|
16
|
+
};
|
package/esm/src/transpilers/anthropic-claude-managed/AnthropicClaudeManagedTranspiler.test.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Registration } from '../../utils/misc/$Register';
|
|
2
|
+
/**
|
|
3
|
+
* Registration of transpiler.
|
|
4
|
+
*
|
|
5
|
+
* Warning: This is not useful for the end user, it is just a side effect of the mechanism that handles all available LLM tools.
|
|
6
|
+
*
|
|
7
|
+
* TODO: [🧠] Which package should export this?
|
|
8
|
+
*
|
|
9
|
+
* @public exported from `@promptbook/wizard`
|
|
10
|
+
* @public exported from `@promptbook/cli`
|
|
11
|
+
*/
|
|
12
|
+
export declare const _AnthropicClaudeManagedTranspilerRegistration: Registration;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { string_book } from '../../book-2.0/agent-source/string_book';
|
|
2
|
+
import type { ExecutionTools } from '../../execution/ExecutionTools';
|
|
3
|
+
import type { string_script } from '../../types/typeAliases';
|
|
4
|
+
import type { BookTranspilerOptions } from '../_common/BookTranspilerOptions';
|
|
5
|
+
/**
|
|
6
|
+
* Transpiler to JavaScript code using Anthropic's Claude SDK.
|
|
7
|
+
*
|
|
8
|
+
* @public exported from `@promptbook/core`
|
|
9
|
+
*/
|
|
10
|
+
export declare const AnthropicClaudeSdkTranspiler: {
|
|
11
|
+
readonly name: "anthropic-claude-sdk";
|
|
12
|
+
readonly title: "Anthropic Claude SDK";
|
|
13
|
+
readonly packageName: "@promptbook/core";
|
|
14
|
+
readonly className: "AnthropicClaudeSdkTranspiler";
|
|
15
|
+
readonly transpileBook: (book: string_book, tools: ExecutionTools, options?: BookTranspilerOptions) => Promise<string_script>;
|
|
16
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Registration } from '../../utils/misc/$Register';
|
|
2
|
+
/**
|
|
3
|
+
* Registration of transpiler
|
|
4
|
+
*
|
|
5
|
+
* Warning: This is not useful for the end user, it is just a side effect of the mechanism that handles all available LLM tools
|
|
6
|
+
*
|
|
7
|
+
* TODO: [🧠] Which package should export this?
|
|
8
|
+
*
|
|
9
|
+
* @public exported from `@promptbook/wizard`
|
|
10
|
+
* @public exported from `@promptbook/cli`
|
|
11
|
+
*/
|
|
12
|
+
export declare const _AnthropicClaudeSdkTranspilerRegistration: Registration;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { string_book } from '../../book-2.0/agent-source/string_book';
|
|
2
|
+
import type { ExecutionTools } from '../../execution/ExecutionTools';
|
|
3
|
+
import type { string_script } from '../../types/typeAliases';
|
|
4
|
+
import type { BookTranspilerOptions } from '../_common/BookTranspilerOptions';
|
|
5
|
+
/**
|
|
6
|
+
* Transpiler to a JavaScript launcher that runs the exported agent inside an E2B sandbox.
|
|
7
|
+
*
|
|
8
|
+
* @public exported from `@promptbook/core`
|
|
9
|
+
*/
|
|
10
|
+
export declare const E2BTranspiler: {
|
|
11
|
+
readonly name: "e2b";
|
|
12
|
+
readonly title: "E2B";
|
|
13
|
+
readonly packageName: "@promptbook/core";
|
|
14
|
+
readonly className: "E2BTranspiler";
|
|
15
|
+
readonly transpileBook: (book: string_book, tools: ExecutionTools, options?: BookTranspilerOptions) => Promise<string_script>;
|
|
16
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Registration } from '../../utils/misc/$Register';
|
|
2
|
+
/**
|
|
3
|
+
* Registration of transpiler.
|
|
4
|
+
*
|
|
5
|
+
* Warning: This is not useful for the end user, it is just a side effect of the mechanism that handles all available LLM tools.
|
|
6
|
+
*
|
|
7
|
+
* TODO: [🧠] Which package should export this?
|
|
8
|
+
*
|
|
9
|
+
* @public exported from `@promptbook/wizard`
|
|
10
|
+
* @public exported from `@promptbook/cli`
|
|
11
|
+
*/
|
|
12
|
+
export declare const _E2BTranspilerRegistration: Registration;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { string_book } from '../../book-2.0/agent-source/string_book';
|
|
2
|
+
import type { ExecutionTools } from '../../execution/ExecutionTools';
|
|
3
|
+
import type { string_script } from '../../types/typeAliases';
|
|
4
|
+
import type { BookTranspilerOptions } from '../_common/BookTranspilerOptions';
|
|
5
|
+
/**
|
|
6
|
+
* Transpiler to JavaScript code using the OpenAI Agents SDK.
|
|
7
|
+
*
|
|
8
|
+
* @public exported from `@promptbook/core`
|
|
9
|
+
*/
|
|
10
|
+
export declare const OpenAiAgentsTranspiler: {
|
|
11
|
+
readonly name: "openai-agents";
|
|
12
|
+
readonly title: "OpenAI Agents SDK";
|
|
13
|
+
readonly packageName: "@promptbook/core";
|
|
14
|
+
readonly className: "OpenAiAgentsTranspiler";
|
|
15
|
+
readonly transpileBook: (book: string_book, tools: ExecutionTools, options?: BookTranspilerOptions) => Promise<string_script>;
|
|
16
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Registration } from '../../utils/misc/$Register';
|
|
2
|
+
/**
|
|
3
|
+
* Registration of transpiler.
|
|
4
|
+
*
|
|
5
|
+
* Warning: This is not useful for the end user, it is just a side effect of the mechanism that handles all available LLM tools.
|
|
6
|
+
*
|
|
7
|
+
* TODO: [🧠] Which package should export this?
|
|
8
|
+
*
|
|
9
|
+
* @public exported from `@promptbook/wizard`
|
|
10
|
+
* @public exported from `@promptbook/cli`
|
|
11
|
+
*/
|
|
12
|
+
export declare const _OpenAiAgentsTranspilerRegistration: Registration;
|
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
import type { string_markdown_text, string_name } from './typeAliases';
|
|
2
|
+
/**
|
|
3
|
+
* Minimal recursive JSON Schema entry used by tool definitions.
|
|
4
|
+
*
|
|
5
|
+
* Note: [🚉] This is fully serializable as JSON
|
|
6
|
+
*/
|
|
7
|
+
type LlmToolJsonSchema = {
|
|
8
|
+
type?: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
properties?: Record<string, LlmToolJsonSchema>;
|
|
11
|
+
required?: string[];
|
|
12
|
+
items?: LlmToolJsonSchema;
|
|
13
|
+
enum?: Array<string | number | boolean | null>;
|
|
14
|
+
additionalProperties?: boolean;
|
|
15
|
+
};
|
|
2
16
|
/**
|
|
3
17
|
* Definition of a tool that can be used by the model
|
|
4
18
|
*
|
|
@@ -16,13 +30,9 @@ export type LlmToolDefinition = {
|
|
|
16
30
|
/**
|
|
17
31
|
* Parameters of the tool in JSON Schema format
|
|
18
32
|
*/
|
|
19
|
-
readonly parameters: {
|
|
33
|
+
readonly parameters: LlmToolJsonSchema & {
|
|
20
34
|
readonly type: 'object';
|
|
21
|
-
readonly properties: Record<string,
|
|
22
|
-
type: string;
|
|
23
|
-
description?: string;
|
|
24
|
-
}>;
|
|
25
|
-
readonly required?: string[];
|
|
26
|
-
readonly additionalProperties?: boolean;
|
|
35
|
+
readonly properties: Record<string, LlmToolJsonSchema>;
|
|
27
36
|
};
|
|
28
37
|
};
|
|
38
|
+
export {};
|
|
@@ -21,6 +21,10 @@ export type ResolveAgentAvatarOptions = {
|
|
|
21
21
|
* Optional preferred avatar visual id coming from remote profile payloads.
|
|
22
22
|
*/
|
|
23
23
|
readonly avatarVisualId?: AvatarVisualId;
|
|
24
|
+
/**
|
|
25
|
+
* Optional server-wide fallback visual id forwarded by federated server payloads.
|
|
26
|
+
*/
|
|
27
|
+
readonly defaultAgentAvatarVisualId?: AvatarVisualId;
|
|
24
28
|
};
|
|
25
29
|
/**
|
|
26
30
|
* Optional base URL used to resolve relative meta images and placeholders.
|
|
@@ -52,6 +56,17 @@ export type ResolvedAgentAvatar = {
|
|
|
52
56
|
readonly avatarDefinition: AvatarDefinition;
|
|
53
57
|
readonly visualId: AvatarVisualId;
|
|
54
58
|
};
|
|
59
|
+
/**
|
|
60
|
+
* Resolves the avatar visual preferred by an agent, then falls back to a federated server default
|
|
61
|
+
* and finally to the caller/server default.
|
|
62
|
+
*
|
|
63
|
+
* @param agent Agent metadata and optional remote-profile visual id.
|
|
64
|
+
* @param defaultAvatarVisualId Optional metadata-resolved server default.
|
|
65
|
+
* @returns Supported avatar visual id.
|
|
66
|
+
*
|
|
67
|
+
* @private shared avatar contract
|
|
68
|
+
*/
|
|
69
|
+
export declare function resolveAgentAvatarVisualId(agent: ResolveAgentAvatarOptions['agent'], defaultAvatarVisualId?: AvatarVisualId): AvatarVisualId;
|
|
55
70
|
/**
|
|
56
71
|
* Resolve the fallback avatar URL for an agent.
|
|
57
72
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { string_markdown } from '../../types/typeAliases';
|
|
2
2
|
/**
|
|
3
|
-
* Change dash-like characters to regular dashes
|
|
3
|
+
* Change dash-like characters to regular dashes `-` -> `-` and remove soft hyphens
|
|
4
4
|
*
|
|
5
5
|
* Note: [🔂] This function is idempotent.
|
|
6
6
|
* Tip: If you want to do the full cleanup, look for `humanizeAiText` exported `@promptbook/markdown-utils`
|
package/esm/src/version.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export declare const BOOK_LANGUAGE_VERSION: string_semantic_version;
|
|
|
15
15
|
export declare const PROMPTBOOK_ENGINE_VERSION: string_promptbook_version;
|
|
16
16
|
/**
|
|
17
17
|
* Represents the version string of the Promptbook engine.
|
|
18
|
-
* It follows semantic versioning (e.g., `0.112.0-
|
|
18
|
+
* It follows semantic versioning (e.g., `0.112.0-56`).
|
|
19
19
|
*
|
|
20
20
|
* @generated
|
|
21
21
|
*/
|
package/package.json
CHANGED
package/umd/index.umd.js
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
* @generated
|
|
24
24
|
* @see https://github.com/webgptorg/promptbook
|
|
25
25
|
*/
|
|
26
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-
|
|
26
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-57';
|
|
27
27
|
/**
|
|
28
28
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
29
29
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -7970,7 +7970,7 @@
|
|
|
7970
7970
|
// Note: [🏂] This function is not tested by itself but together with other cleanup functions with `humanizeAiText`
|
|
7971
7971
|
|
|
7972
7972
|
/**
|
|
7973
|
-
* Change dash-like characters to regular dashes
|
|
7973
|
+
* Change dash-like characters to regular dashes `-` -> `-` and remove soft hyphens
|
|
7974
7974
|
*
|
|
7975
7975
|
* Note: [🔂] This function is idempotent.
|
|
7976
7976
|
* Tip: If you want to do the full cleanup, look for `humanizeAiText` exported `@promptbook/markdown-utils`
|
|
@@ -7978,7 +7978,7 @@
|
|
|
7978
7978
|
* @public exported from `@promptbook/markdown-utils`
|
|
7979
7979
|
*/
|
|
7980
7980
|
function humanizeAiTextEmdashed(aiText) {
|
|
7981
|
-
return aiText.replace(/\u00AD/g, '').replace(/[
|
|
7981
|
+
return aiText.replace(/\u00AD/g, '').replace(/[‐‑‒–-―−⁃﹣-]/g, '-');
|
|
7982
7982
|
}
|
|
7983
7983
|
// Note: [🏂] This function is not tested by itself but together with other cleanup functions with `humanizeAiText`
|
|
7984
7984
|
|
|
@@ -30,7 +30,12 @@ import { _PdfScraperRegistration } from '../scrapers/pdf/register-constructor';
|
|
|
30
30
|
import { _PdfScraperMetadataRegistration } from '../scrapers/pdf/register-metadata';
|
|
31
31
|
import { _WebsiteScraperRegistration } from '../scrapers/website/register-constructor';
|
|
32
32
|
import { _WebsiteScraperMetadataRegistration } from '../scrapers/website/register-metadata';
|
|
33
|
+
import { _AgentOsTranspilerRegistration } from '../transpilers/agent-os/register';
|
|
34
|
+
import { _AnthropicClaudeManagedTranspilerRegistration } from '../transpilers/anthropic-claude-managed/register';
|
|
35
|
+
import { _AnthropicClaudeSdkTranspilerRegistration } from '../transpilers/anthropic-claude-sdk/register';
|
|
36
|
+
import { _E2BTranspilerRegistration } from '../transpilers/e2b/register';
|
|
33
37
|
import { _FormattedBookInMarkdownTranspilerRegistration } from '../transpilers/formatted-book-in-markdown/register';
|
|
38
|
+
import { _OpenAiAgentsTranspilerRegistration } from '../transpilers/openai-agents/register';
|
|
34
39
|
import { _OpenAiSdkTranspilerRegistration } from '../transpilers/openai-sdk/register';
|
|
35
40
|
export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
|
|
36
41
|
export { _CLI };
|
|
@@ -64,5 +69,10 @@ export { _PdfScraperRegistration };
|
|
|
64
69
|
export { _PdfScraperMetadataRegistration };
|
|
65
70
|
export { _WebsiteScraperRegistration };
|
|
66
71
|
export { _WebsiteScraperMetadataRegistration };
|
|
72
|
+
export { _AgentOsTranspilerRegistration };
|
|
73
|
+
export { _AnthropicClaudeManagedTranspilerRegistration };
|
|
74
|
+
export { _AnthropicClaudeSdkTranspilerRegistration };
|
|
75
|
+
export { _E2BTranspilerRegistration };
|
|
67
76
|
export { _FormattedBookInMarkdownTranspilerRegistration };
|
|
77
|
+
export { _OpenAiAgentsTranspilerRegistration };
|
|
68
78
|
export { _OpenAiSdkTranspilerRegistration };
|
|
@@ -18,6 +18,7 @@ import { createPipelineCollectionFromPromise } from '../collection/pipeline-coll
|
|
|
18
18
|
import { createPipelineCollectionFromUrl } from '../collection/pipeline-collection/constructors/createPipelineCollectionFromUrl';
|
|
19
19
|
import { createPipelineSubcollection } from '../collection/pipeline-collection/constructors/createPipelineSubcollection';
|
|
20
20
|
import { pipelineCollectionToJson } from '../collection/pipeline-collection/pipelineCollectionToJson';
|
|
21
|
+
import type { CommitmentDefinition } from '../commitments/_base/CommitmentDefinition';
|
|
21
22
|
import { createEmptyAgentModelRequirements } from '../commitments/_base/createEmptyAgentModelRequirements';
|
|
22
23
|
import { createBasicAgentModelRequirements } from '../commitments/_base/createEmptyAgentModelRequirements';
|
|
23
24
|
import { NotYetImplementedCommitmentDefinition } from '../commitments/_base/NotYetImplementedCommitmentDefinition';
|
|
@@ -196,7 +197,12 @@ import { BlackholeStorage } from '../storage/blackhole/BlackholeStorage';
|
|
|
196
197
|
import { MemoryStorage } from '../storage/memory/MemoryStorage';
|
|
197
198
|
import { PrefixStorage } from '../storage/utils/PrefixStorage';
|
|
198
199
|
import { $bookTranspilersRegister } from '../transpilers/_common/register/$bookTranspilersRegister';
|
|
200
|
+
import { AgentOsTranspiler } from '../transpilers/agent-os/AgentOsTranspiler';
|
|
201
|
+
import { AnthropicClaudeManagedTranspiler } from '../transpilers/anthropic-claude-managed/AnthropicClaudeManagedTranspiler';
|
|
202
|
+
import { AnthropicClaudeSdkTranspiler } from '../transpilers/anthropic-claude-sdk/AnthropicClaudeSdkTranspiler';
|
|
203
|
+
import { E2BTranspiler } from '../transpilers/e2b/E2BTranspiler';
|
|
199
204
|
import { FormattedBookInMarkdownTranspiler } from '../transpilers/formatted-book-in-markdown/FormattedBookInMarkdownTranspiler';
|
|
205
|
+
import { OpenAiAgentsTranspiler } from '../transpilers/openai-agents/OpenAiAgentsTranspiler';
|
|
200
206
|
import { OpenAiSdkTranspiler } from '../transpilers/openai-sdk/OpenAiSdkTranspiler';
|
|
201
207
|
import { MODEL_VARIANTS } from '../types/ModelVariant';
|
|
202
208
|
import { NonTaskSectionTypes } from '../types/SectionType';
|
|
@@ -236,6 +242,7 @@ export { createPipelineCollectionFromPromise };
|
|
|
236
242
|
export { createPipelineCollectionFromUrl };
|
|
237
243
|
export { createPipelineSubcollection };
|
|
238
244
|
export { pipelineCollectionToJson };
|
|
245
|
+
export type { CommitmentDefinition };
|
|
239
246
|
export { createEmptyAgentModelRequirements };
|
|
240
247
|
export { createBasicAgentModelRequirements };
|
|
241
248
|
export { NotYetImplementedCommitmentDefinition };
|
|
@@ -414,7 +421,12 @@ export { BlackholeStorage };
|
|
|
414
421
|
export { MemoryStorage };
|
|
415
422
|
export { PrefixStorage };
|
|
416
423
|
export { $bookTranspilersRegister };
|
|
424
|
+
export { AgentOsTranspiler };
|
|
425
|
+
export { AnthropicClaudeManagedTranspiler };
|
|
426
|
+
export { AnthropicClaudeSdkTranspiler };
|
|
427
|
+
export { E2BTranspiler };
|
|
417
428
|
export { FormattedBookInMarkdownTranspiler };
|
|
429
|
+
export { OpenAiAgentsTranspiler };
|
|
418
430
|
export { OpenAiSdkTranspiler };
|
|
419
431
|
export { MODEL_VARIANTS };
|
|
420
432
|
export { NonTaskSectionTypes };
|
|
@@ -222,6 +222,10 @@ import type { FileCacheStorageOptions } from '../storage/file-cache-storage/File
|
|
|
222
222
|
import type { IndexedDbStorageOptions } from '../storage/local-storage/utils/IndexedDbStorageOptions';
|
|
223
223
|
import type { BookTranspiler } from '../transpilers/_common/BookTranspiler';
|
|
224
224
|
import type { BookTranspilerOptions } from '../transpilers/_common/BookTranspilerOptions';
|
|
225
|
+
import type { TranspiledTeamAgentModelRequirements } from '../transpilers/_common/TranspiledTeamExport';
|
|
226
|
+
import type { TranspiledTeamTeammate } from '../transpilers/_common/TranspiledTeamExport';
|
|
227
|
+
import type { TranspiledTeamAgent } from '../transpilers/_common/TranspiledTeamExport';
|
|
228
|
+
import type { TranspiledTeamExport } from '../transpilers/_common/TranspiledTeamExport';
|
|
225
229
|
import type { IntermediateFilesStrategy } from '../types/IntermediateFilesStrategy';
|
|
226
230
|
import type { LlmCall } from '../types/LlmCall';
|
|
227
231
|
import type { LlmToolDefinition } from '../types/LlmToolDefinition';
|
|
@@ -651,6 +655,10 @@ export type { FileCacheStorageOptions };
|
|
|
651
655
|
export type { IndexedDbStorageOptions };
|
|
652
656
|
export type { BookTranspiler };
|
|
653
657
|
export type { BookTranspilerOptions };
|
|
658
|
+
export type { TranspiledTeamAgentModelRequirements };
|
|
659
|
+
export type { TranspiledTeamTeammate };
|
|
660
|
+
export type { TranspiledTeamAgent };
|
|
661
|
+
export type { TranspiledTeamExport };
|
|
654
662
|
export type { IntermediateFilesStrategy };
|
|
655
663
|
export type { LlmCall };
|
|
656
664
|
export type { LlmToolDefinition };
|
|
@@ -29,7 +29,12 @@ import { _PdfScraperRegistration } from '../scrapers/pdf/register-constructor';
|
|
|
29
29
|
import { _PdfScraperMetadataRegistration } from '../scrapers/pdf/register-metadata';
|
|
30
30
|
import { _WebsiteScraperRegistration } from '../scrapers/website/register-constructor';
|
|
31
31
|
import { _WebsiteScraperMetadataRegistration } from '../scrapers/website/register-metadata';
|
|
32
|
+
import { _AgentOsTranspilerRegistration } from '../transpilers/agent-os/register';
|
|
33
|
+
import { _AnthropicClaudeManagedTranspilerRegistration } from '../transpilers/anthropic-claude-managed/register';
|
|
34
|
+
import { _AnthropicClaudeSdkTranspilerRegistration } from '../transpilers/anthropic-claude-sdk/register';
|
|
35
|
+
import { _E2BTranspilerRegistration } from '../transpilers/e2b/register';
|
|
32
36
|
import { _FormattedBookInMarkdownTranspilerRegistration } from '../transpilers/formatted-book-in-markdown/register';
|
|
37
|
+
import { _OpenAiAgentsTranspilerRegistration } from '../transpilers/openai-agents/register';
|
|
33
38
|
import { _OpenAiSdkTranspilerRegistration } from '../transpilers/openai-sdk/register';
|
|
34
39
|
import { wizard } from '../wizard/wizard';
|
|
35
40
|
export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
|
|
@@ -63,6 +68,11 @@ export { _PdfScraperRegistration };
|
|
|
63
68
|
export { _PdfScraperMetadataRegistration };
|
|
64
69
|
export { _WebsiteScraperRegistration };
|
|
65
70
|
export { _WebsiteScraperMetadataRegistration };
|
|
71
|
+
export { _AgentOsTranspilerRegistration };
|
|
72
|
+
export { _AnthropicClaudeManagedTranspilerRegistration };
|
|
73
|
+
export { _AnthropicClaudeSdkTranspilerRegistration };
|
|
74
|
+
export { _E2BTranspilerRegistration };
|
|
66
75
|
export { _FormattedBookInMarkdownTranspilerRegistration };
|
|
76
|
+
export { _OpenAiAgentsTranspilerRegistration };
|
|
67
77
|
export { _OpenAiSdkTranspilerRegistration };
|
|
68
78
|
export { wizard };
|
|
@@ -2,6 +2,6 @@ export { Avatar } from './Avatar';
|
|
|
2
2
|
export { AvatarOrImage } from './AvatarOrImage';
|
|
3
3
|
export { renderAvatarVisual } from './renderAvatarVisual';
|
|
4
4
|
export { createAvatarDefinitionFromAgentBasicInformation } from './avatarRenderingUtils';
|
|
5
|
-
export { AVATAR_VISUALS, getAvatarVisualById } from './visuals/avatarVisualRegistry';
|
|
5
|
+
export { AVATAR_VISUALS, getAvatarVisualById, resolveAvatarVisualId } from './visuals/avatarVisualRegistry';
|
|
6
6
|
export type { AvatarDefinition } from './types/AvatarDefinition';
|
|
7
7
|
export type { AvatarInteractionState, AvatarPalette, AvatarPointerType, AvatarProps, AvatarVisual, AvatarVisualDefinition, AvatarVisualId, AvatarVisualRenderContext, RenderAvatarVisualOptions, } from './types/AvatarVisualDefinition';
|
|
@@ -6,7 +6,7 @@ import type { AvatarDefinition } from './AvatarDefinition';
|
|
|
6
6
|
*
|
|
7
7
|
* @private shared contract for the avatar rendering system
|
|
8
8
|
*/
|
|
9
|
-
export type AvatarVisualId = 'pixel-art' | 'octopus' | 'octopus2' | 'octopus3' | 'ascii-octopus' | 'minecraft' | 'fractal';
|
|
9
|
+
export type AvatarVisualId = 'pixel-art' | 'octopus' | 'octopus2' | 'octopus3' | 'ascii-octopus' | 'minecraft' | 'fractal' | 'orb';
|
|
10
10
|
/**
|
|
11
11
|
* Derived color palette used by avatar visuals.
|
|
12
12
|
*
|
|
@@ -14,3 +14,15 @@ export declare const AVATAR_VISUALS: ReadonlyArray<AvatarVisualDefinition>;
|
|
|
14
14
|
* @private shared registry for the avatar rendering system
|
|
15
15
|
*/
|
|
16
16
|
export declare function getAvatarVisualById(visualId: AvatarVisualId): AvatarVisualDefinition;
|
|
17
|
+
/**
|
|
18
|
+
* Resolves a user-facing avatar visual value to a supported built-in visual id.
|
|
19
|
+
*
|
|
20
|
+
* The lookup is derived from `AVATAR_VISUALS`, so new visuals become selectable by
|
|
21
|
+
* adding them to the registry rather than updating parser-specific option lists.
|
|
22
|
+
*
|
|
23
|
+
* @param value Raw visual id/title, for example `PIXEL_ART`, `pixel art`, or `pixel-art`.
|
|
24
|
+
* @returns Matching visual id or `null` when the value is empty/unknown.
|
|
25
|
+
*
|
|
26
|
+
* @private shared registry for the avatar rendering system
|
|
27
|
+
*/
|
|
28
|
+
export declare function resolveAvatarVisualId(value: string | null | undefined): AvatarVisualId | null;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { AvatarVisualDefinition } from '../types/AvatarVisualDefinition';
|
|
2
|
+
/**
|
|
3
|
+
* Orb family labels used to keep the silhouette circle-based while still varying the rendering style.
|
|
4
|
+
*
|
|
5
|
+
* @private helper of `orbAvatarVisual`
|
|
6
|
+
*/
|
|
7
|
+
type OrbFamily = 'pearl' | 'nebula' | 'ember' | 'glacier';
|
|
8
|
+
/**
|
|
9
|
+
* Deterministic orb profile used to keep the orb recognizable while still varying its motion and shape.
|
|
10
|
+
*
|
|
11
|
+
* @private helper of `orbAvatarVisual`
|
|
12
|
+
*/
|
|
13
|
+
type OrbMorphologyProfile = {
|
|
14
|
+
family: OrbFamily;
|
|
15
|
+
baseRadiusRatio: number;
|
|
16
|
+
horizontalStretch: number;
|
|
17
|
+
verticalStretch: number;
|
|
18
|
+
wobbleAmplitude: number;
|
|
19
|
+
wobbleFrequencyOne: number;
|
|
20
|
+
wobbleFrequencyTwo: number;
|
|
21
|
+
wobbleFrequencyThree: number;
|
|
22
|
+
ringCount: number;
|
|
23
|
+
sparkleCount: number;
|
|
24
|
+
haloCount: number;
|
|
25
|
+
coreShiftX: number;
|
|
26
|
+
coreShiftY: number;
|
|
27
|
+
highlightAngle: number;
|
|
28
|
+
bandRotation: number;
|
|
29
|
+
pulseSpeed: number;
|
|
30
|
+
haloBlurRatio: number;
|
|
31
|
+
sheenStrength: number;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Built-in Orb avatar visual.
|
|
35
|
+
*
|
|
36
|
+
* @private built-in avatar visual
|
|
37
|
+
*/
|
|
38
|
+
export declare const orbAvatarVisual: AvatarVisualDefinition;
|
|
39
|
+
/**
|
|
40
|
+
* Builds the deterministic orb profile from the seeded avatar random factory.
|
|
41
|
+
*
|
|
42
|
+
* @param createRandom Seeded random factory.
|
|
43
|
+
* @returns Stable orb morphology profile.
|
|
44
|
+
*
|
|
45
|
+
* @private helper of `orbAvatarVisual`
|
|
46
|
+
*/
|
|
47
|
+
export declare function createOrbMorphologyProfile(createRandom: (salt: string) => () => number): OrbMorphologyProfile;
|
|
48
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { string_agent_hash, string_agent_name, string_agent_permanent_id, string_agent_url, string_color, string_fonts, string_url_image } from '../../types/typeAliases';
|
|
2
|
+
import type { AvatarVisualId } from '../../avatars/types/AvatarVisualDefinition';
|
|
2
3
|
/**
|
|
3
4
|
* Unified parameter representation that supports two different notations:
|
|
4
5
|
* 1. @Parameter - single word parameter starting with @
|
|
@@ -87,6 +88,7 @@ export type AgentBasicInformation = {
|
|
|
87
88
|
inputPlaceholder?: string;
|
|
88
89
|
messageSuffix?: string;
|
|
89
90
|
image?: string_url_image;
|
|
91
|
+
avatar?: AvatarVisualId;
|
|
90
92
|
domain?: string;
|
|
91
93
|
font?: string_fonts;
|
|
92
94
|
color?: string_color;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { parseAgentSourceWithCommitments } from '../parseAgentSourceWithCommitments';
|
|
2
|
+
/**
|
|
3
|
+
* Parsed agent source data produced by `parseAgentSourceWithCommitments`.
|
|
4
|
+
*
|
|
5
|
+
* @private internal type of `createAgentModelRequirementsWithCommitments`
|
|
6
|
+
*/
|
|
7
|
+
export type ParsedAgentSourceWithCommitments = ReturnType<typeof parseAgentSourceWithCommitments>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ParsedCommitment } from '../../../commitments/_base/ParsedCommitment';
|
|
2
|
+
import type { AgentModelRequirements } from '../AgentModelRequirements';
|
|
3
|
+
import type { CreateAgentModelRequirementsOptions } from '../CreateAgentModelRequirementsOptions';
|
|
4
|
+
/**
|
|
5
|
+
* Applies parsed commitments one by one while keeping the per-commitment steps focused and easy to follow.
|
|
6
|
+
*
|
|
7
|
+
* @param requirements - Current requirements snapshot.
|
|
8
|
+
* @param commitments - Commitments already filtered for DELETE-like invalidations.
|
|
9
|
+
* @param options - Optional reference and teammate resolvers.
|
|
10
|
+
* @returns Requirements after all applicable commitments are processed.
|
|
11
|
+
*
|
|
12
|
+
* @private function of `createAgentModelRequirementsWithCommitments`
|
|
13
|
+
*/
|
|
14
|
+
export declare function applyCommitmentsToAgentModelRequirements(requirements: AgentModelRequirements, commitments: ReadonlyArray<ParsedCommitment>, options?: CreateAgentModelRequirementsOptions): Promise<AgentModelRequirements>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { AgentModelRequirements } from '../AgentModelRequirements';
|
|
2
|
+
import type { string_book } from '../string_book';
|
|
3
|
+
import type { ParsedAgentSourceWithCommitments } from './ParsedAgentSourceWithCommitments';
|
|
4
|
+
/**
|
|
5
|
+
* Adds source-derived sections after commitments have been applied.
|
|
6
|
+
*
|
|
7
|
+
* @param requirements - Requirements after commitment application and USE aggregation.
|
|
8
|
+
* @param parseResult - Parsed source used to recover non-commitment prose and examples.
|
|
9
|
+
* @param agentSource - Original source used to recover MCP server declarations.
|
|
10
|
+
* @returns Requirements with source-derived sections appended.
|
|
11
|
+
*
|
|
12
|
+
* @private function of `createAgentModelRequirementsWithCommitments`
|
|
13
|
+
*/
|
|
14
|
+
export declare function augmentAgentModelRequirementsFromSource(requirements: AgentModelRequirements, parseResult: ParsedAgentSourceWithCommitments, agentSource: string_book): Promise<AgentModelRequirements>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ParsedCommitment } from '../../../commitments/_base/ParsedCommitment';
|
|
2
|
+
/**
|
|
3
|
+
* Applies the commitment filtering rules used before commitment definitions are executed.
|
|
4
|
+
*
|
|
5
|
+
* @param commitments - Parsed commitments in original source order.
|
|
6
|
+
* @returns Commitments after DELETE-like invalidation and overwritten-goal filtering.
|
|
7
|
+
*
|
|
8
|
+
* @private function of `createAgentModelRequirementsWithCommitments`
|
|
9
|
+
*/
|
|
10
|
+
export declare function filterCommitmentsForAgentModelRequirements(commitments: ReadonlyArray<ParsedCommitment>): ParsedCommitment[];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { InlineKnowledgeSourceUploader } from '../../../utils/knowledge/inlineKnowledgeSource';
|
|
2
|
+
import type { AgentModelRequirements } from '../AgentModelRequirements';
|
|
3
|
+
/**
|
|
4
|
+
* Converts staged inline knowledge files into the final knowledge source URLs stored on requirements.
|
|
5
|
+
*
|
|
6
|
+
* @param requirements - Current requirements snapshot.
|
|
7
|
+
* @param uploader - Optional uploader for inline knowledge files.
|
|
8
|
+
* @returns Requirements with inline knowledge converted into upload URLs or data URLs.
|
|
9
|
+
*
|
|
10
|
+
* @private function of `createAgentModelRequirementsWithCommitments`
|
|
11
|
+
*/
|
|
12
|
+
export declare function materializeInlineKnowledgeSources(requirements: AgentModelRequirements, uploader?: InlineKnowledgeSourceUploader): Promise<AgentModelRequirements>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ParsedAgentProfile } from './ParsedAgentProfile';
|
|
2
|
+
/**
|
|
3
|
+
* Mutable commitment-processing state used while collecting basic profile information.
|
|
4
|
+
*
|
|
5
|
+
* @private internal utility of `parseAgentSource`
|
|
6
|
+
*/
|
|
7
|
+
export type ParseAgentSourceState = ParsedAgentProfile & {
|
|
8
|
+
pendingUserMessage: string | null;
|
|
9
|
+
knownKnowledgeSourceUrls: Set<string>;
|
|
10
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { AgentBasicInformation } from '../AgentBasicInformation';
|
|
2
|
+
/**
|
|
3
|
+
* Parsed agent profile fields accumulated from commitments.
|
|
4
|
+
*
|
|
5
|
+
* @private internal utility of `parseAgentSource`
|
|
6
|
+
*/
|
|
7
|
+
export type ParsedAgentProfile = Pick<AgentBasicInformation, 'meta' | 'links' | 'capabilities' | 'samples' | 'knowledgeSources'>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ParsedCommitment } from '../../../commitments/_base/ParsedCommitment';
|
|
2
|
+
import type { ParseAgentSourceState } from './ParseAgentSourceState';
|
|
3
|
+
/**
|
|
4
|
+
* Applies META-style commitments that mutate parsed profile metadata.
|
|
5
|
+
*
|
|
6
|
+
* @private internal utility of `parseAgentSource`
|
|
7
|
+
*/
|
|
8
|
+
export declare function applyMetaCommitment(state: ParseAgentSourceState, commitment: ParsedCommitment): void;
|
package/umd/src/book-2.0/agent-source/parseAgentSource/consumeConversationSampleCommitment.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ParsedCommitment } from '../../../commitments/_base/ParsedCommitment';
|
|
2
|
+
import type { ParseAgentSourceState } from './ParseAgentSourceState';
|
|
3
|
+
/**
|
|
4
|
+
* Updates sample-conversation state for communication commitments.
|
|
5
|
+
*
|
|
6
|
+
* @private internal utility of `parseAgentSource`
|
|
7
|
+
*/
|
|
8
|
+
export declare function consumeConversationSampleCommitment(state: ParseAgentSourceState, commitment: ParsedCommitment): boolean;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ParsedCommitment } from '../../../commitments/_base/ParsedCommitment';
|
|
2
|
+
import type { AgentCapability } from '../AgentBasicInformation';
|
|
3
|
+
import type { ParseAgentSourceState } from './ParseAgentSourceState';
|
|
4
|
+
/**
|
|
5
|
+
* Creates the visible capabilities produced by one parsed commitment.
|
|
6
|
+
*
|
|
7
|
+
* @private internal utility of `parseAgentSource`
|
|
8
|
+
*/
|
|
9
|
+
export declare function createCapabilitiesFromCommitment(state: ParseAgentSourceState, commitment: ParsedCommitment): AgentCapability[];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { AgentBasicInformation } from '../AgentBasicInformation';
|
|
2
|
+
/**
|
|
3
|
+
* Ensures the parsed profile always exposes a fullname value.
|
|
4
|
+
*
|
|
5
|
+
* @private internal utility of `parseAgentSource`
|
|
6
|
+
*/
|
|
7
|
+
export declare function ensureMetaFullname(meta: AgentBasicInformation['meta'], fallbackFullname: string): void;
|