@promptbook/utils 0.114.0-2 → 0.114.0-3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/index.es.js +1 -1
- package/esm/src/book-components/Chat/utils/$provideServerDomWindow.d.ts +11 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/createAgentsServerRuntimeEnvironment.d.ts +7 -0
- package/esm/src/cli/cli-commands/coder/ping.d.ts +2 -5
- package/esm/src/cli/cli-commands/coder.d.ts +1 -1
- package/esm/src/cli/cli-commands/common/coderGitSyncCliOptions.d.ts +34 -0
- package/esm/src/cli/cli-commands/common/coderGitSyncCliOptions.test.d.ts +1 -0
- package/esm/src/cli/common/loadPromptsModule.d.ts +16 -0
- package/esm/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +1 -1
- package/esm/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.d.ts +1 -1
- package/esm/src/llm-providers/openai/OpenAiAgentKitExecutionTools.d.ts +1 -1
- package/esm/src/llm-providers/openai/OpenAiAgentKitExecutionToolsToolBuilder.d.ts +1 -1
- package/esm/src/llm-providers/openai/OpenAiAssistantExecutionToolsStreamRunner.d.ts +1 -1
- package/esm/src/llm-providers/openai/OpenAiAssistantExecutionToolsToolRunner.d.ts +1 -1
- package/esm/src/llm-providers/openai/OpenAiCompatibleNonChatPromptCaller.d.ts +1 -1
- package/esm/src/llm-providers/openai/OpenAiCompatibleRequestManager.d.ts +1 -1
- package/esm/src/llm-providers/openai/utils/callOpenAiCompatibleChatModel.d.ts +1 -1
- package/esm/src/llm-providers/openai/utils/loadOpenAiAgentsModule.d.ts +203 -0
- package/esm/src/llm-providers/openai/utils/uploadFilesToOpenAi.d.ts +1 -1
- package/esm/src/utils/misc/createLazyModuleLoader.d.ts +14 -0
- package/esm/src/version.d.ts +1 -1
- package/package.json +1 -1
- package/umd/index.umd.js +1 -1
- package/umd/src/book-components/Chat/utils/$provideServerDomWindow.d.ts +11 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/createAgentsServerRuntimeEnvironment.d.ts +7 -0
- package/umd/src/cli/cli-commands/coder/ping.d.ts +2 -5
- package/umd/src/cli/cli-commands/coder.d.ts +1 -1
- package/umd/src/cli/cli-commands/common/coderGitSyncCliOptions.d.ts +34 -0
- package/umd/src/cli/cli-commands/common/coderGitSyncCliOptions.test.d.ts +1 -0
- package/umd/src/cli/common/loadPromptsModule.d.ts +16 -0
- package/umd/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +1 -1
- package/umd/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.d.ts +1 -1
- package/umd/src/llm-providers/openai/OpenAiAgentKitExecutionTools.d.ts +1 -1
- package/umd/src/llm-providers/openai/OpenAiAgentKitExecutionToolsToolBuilder.d.ts +1 -1
- package/umd/src/llm-providers/openai/OpenAiAssistantExecutionToolsStreamRunner.d.ts +1 -1
- package/umd/src/llm-providers/openai/OpenAiAssistantExecutionToolsToolRunner.d.ts +1 -1
- package/umd/src/llm-providers/openai/OpenAiCompatibleNonChatPromptCaller.d.ts +1 -1
- package/umd/src/llm-providers/openai/OpenAiCompatibleRequestManager.d.ts +1 -1
- package/umd/src/llm-providers/openai/utils/callOpenAiCompatibleChatModel.d.ts +1 -1
- package/umd/src/llm-providers/openai/utils/loadOpenAiAgentsModule.d.ts +203 -0
- package/umd/src/llm-providers/openai/utils/uploadFilesToOpenAi.d.ts +1 -1
- package/umd/src/utils/misc/createLazyModuleLoader.d.ts +14 -0
- package/umd/src/version.d.ts +1 -1
package/esm/index.es.js
CHANGED
|
@@ -17,7 +17,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
|
|
|
17
17
|
* @generated
|
|
18
18
|
* @see https://github.com/webgptorg/promptbook
|
|
19
19
|
*/
|
|
20
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.114.0-
|
|
20
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.114.0-3';
|
|
21
21
|
/**
|
|
22
22
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
23
23
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { WindowLike as DomWindowLike } from 'dompurify';
|
|
2
|
+
/**
|
|
3
|
+
* Provides a DOM `window` for runtimes which do not have one, for example Node.js during server-side rendering
|
|
4
|
+
*
|
|
5
|
+
* Note: `$` is used to indicate that this function is not a pure function - it creates and caches one shared DOM window
|
|
6
|
+
*
|
|
7
|
+
* @returns DOM window which can back a DOM-dependent library like `DOMPurify`
|
|
8
|
+
* @throws {EnvironmentMismatchError} When the current runtime can not create a DOM window
|
|
9
|
+
* @private utility of `renderMarkdown`
|
|
10
|
+
*/
|
|
11
|
+
export declare function $provideServerDomWindow(): DomWindowLike;
|
|
@@ -18,6 +18,12 @@ export declare const PTBK_AGENTS_SERVER_BUILD_WORKER_COUNT_ENV = "PTBK_AGENTS_SE
|
|
|
18
18
|
* @private internal constant of `buildAgentsServer`
|
|
19
19
|
*/
|
|
20
20
|
export declare const PTBK_AGENTS_SERVER_IGNORE_NEXT_VALIDATION_ENV = "PTBK_AGENTS_SERVER_IGNORE_NEXT_VALIDATION";
|
|
21
|
+
/**
|
|
22
|
+
* Environment variable that disables throwaway webpack filesystem caches for CLI-owned production builds.
|
|
23
|
+
*
|
|
24
|
+
* @private internal constant of `buildAgentsServer`
|
|
25
|
+
*/
|
|
26
|
+
export declare const PTBK_AGENTS_SERVER_DISABLE_WEBPACK_FILESYSTEM_CACHE_ENV = "PTBK_AGENTS_SERVER_DISABLE_WEBPACK_FILESYSTEM_CACHE";
|
|
21
27
|
/**
|
|
22
28
|
* Adds dependency-resolution environment required by the materialized Agents Server runtime.
|
|
23
29
|
*
|
|
@@ -25,4 +31,5 @@ export declare const PTBK_AGENTS_SERVER_IGNORE_NEXT_VALIDATION_ENV = "PTBK_AGENT
|
|
|
25
31
|
*/
|
|
26
32
|
export declare function createAgentsServerRuntimeEnvironment(environment: NodeJS.ProcessEnv, nodeModulesPath: string, options?: {
|
|
27
33
|
readonly isNextValidationIgnored?: boolean;
|
|
34
|
+
readonly isWebpackFilesystemCacheDisabled?: boolean;
|
|
28
35
|
}): NodeJS.ProcessEnv;
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import type { Command as Program } from 'commander';
|
|
2
2
|
import type { $side_effect } from '../../../utils/organization/$side_effect';
|
|
3
3
|
/**
|
|
4
|
-
* Initializes `coder ping` command for Promptbook CLI utilities
|
|
4
|
+
* Initializes `coder ping` command for Promptbook CLI utilities
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
* and reports how long the harness/model turn took.
|
|
8
|
-
*
|
|
9
|
-
* Note: `$` is used to indicate that this function is not a pure function - it registers a command in the CLI.
|
|
6
|
+
* Note: `$` is used to indicate that this function is not a pure function - it registers a command in the CLI
|
|
10
7
|
*
|
|
11
8
|
* @private internal function of `promptbookCli`
|
|
12
9
|
*/
|
|
@@ -8,8 +8,8 @@ import type { $side_effect } from '../../utils/organization/$side_effect';
|
|
|
8
8
|
* - add: Add one ready-to-run prompt file to the queue
|
|
9
9
|
* - generate-boilerplates: Generate prompt boilerplate files
|
|
10
10
|
* - find-refactor-candidates: Find files that need refactoring
|
|
11
|
-
* - ping: Test one harness and model connection with a disposable task
|
|
12
11
|
* - run: Run coding prompts with AI agents
|
|
12
|
+
* - ping: Test one harness and model with a tiny dummy prompt
|
|
13
13
|
* - verify: Verify completed prompts
|
|
14
14
|
* - find-fresh-emoji-tags: Find unused emoji tags
|
|
15
15
|
*
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { Command as Program } from 'commander';
|
|
2
|
+
import type { CoderGitSyncOptions } from '../../../../scripts/run-codex-prompts/git/coderGitSync';
|
|
3
|
+
export type { CoderGitSyncOptions };
|
|
4
|
+
/**
|
|
5
|
+
* Commander option bag for the shared `ptbk coder` git synchronization flags.
|
|
6
|
+
*
|
|
7
|
+
* @private internal utility of `promptbookCli`
|
|
8
|
+
*/
|
|
9
|
+
export type CoderGitSyncCliOptions = {
|
|
10
|
+
readonly commit: boolean;
|
|
11
|
+
readonly autoPush: boolean;
|
|
12
|
+
readonly autoPull: boolean;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Description block shared by the `ptbk coder` commands which can synchronize their changes with git.
|
|
16
|
+
*
|
|
17
|
+
* @private internal utility of `promptbookCli`
|
|
18
|
+
*/
|
|
19
|
+
export declare const CODER_GIT_SYNC_DESCRIPTION: string;
|
|
20
|
+
/**
|
|
21
|
+
* Registers the shared `--commit`, `--auto-push` and `--auto-pull` flags on a `ptbk coder` command.
|
|
22
|
+
*
|
|
23
|
+
* Note: Unlike `ptbk coder run`, which commits by default and opts out through `--no-commit`,
|
|
24
|
+
* these commands never touch git unless the flags are used explicitly.
|
|
25
|
+
*
|
|
26
|
+
* @private internal utility of `promptbookCli`
|
|
27
|
+
*/
|
|
28
|
+
export declare function addCoderGitSyncOptions(command: Program): void;
|
|
29
|
+
/**
|
|
30
|
+
* Converts the Commander git synchronization flags into normalized git synchronization options.
|
|
31
|
+
*
|
|
32
|
+
* @private internal utility of `promptbookCli`
|
|
33
|
+
*/
|
|
34
|
+
export declare function normalizeCoderGitSyncCliOptions(cliOptions: CoderGitSyncCliOptions): CoderGitSyncOptions;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="prompts" />
|
|
2
|
+
/**
|
|
3
|
+
* Loads the interactive terminal prompt library (`prompts`) on demand
|
|
4
|
+
*
|
|
5
|
+
* Note: [🐌] Loaded lazily to keep the startup of the `ptbk` CLI utility fast - most commands never ask the user
|
|
6
|
+
* anything interactively
|
|
7
|
+
*
|
|
8
|
+
* @private internal utility of Promptbook CLI
|
|
9
|
+
*/
|
|
10
|
+
export declare const loadPromptsModule: () => Promise<{
|
|
11
|
+
default: typeof import("prompts");
|
|
12
|
+
inject: typeof import("prompts").inject;
|
|
13
|
+
override: typeof import("prompts").override;
|
|
14
|
+
prompt: any;
|
|
15
|
+
prompts: typeof import("prompts").prompts;
|
|
16
|
+
}>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Anthropic from '@anthropic-ai/sdk';
|
|
1
|
+
import type Anthropic from '@anthropic-ai/sdk';
|
|
2
2
|
import type { ChatParticipant } from '../../book-components/Chat/types/ChatParticipant';
|
|
3
3
|
import type { AvailableModel } from '../../execution/AvailableModel';
|
|
4
4
|
import type { LlmExecutionTools } from '../../execution/LlmExecutionTools';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OpenAIClient } from '@azure/openai';
|
|
1
|
+
import type { OpenAIClient } from '@azure/openai';
|
|
2
2
|
import type { ChatParticipant } from '../../book-components/Chat/types/ChatParticipant';
|
|
3
3
|
import type { AvailableModel } from '../../execution/AvailableModel';
|
|
4
4
|
import type { LlmExecutionTools } from '../../execution/LlmExecutionTools';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Agent as AgentFromKit } from '@openai/agents';
|
|
1
|
+
import type { Agent as AgentFromKit } from '@openai/agents';
|
|
2
2
|
import type { CallChatModelStreamOptions, LlmExecutionTools } from '../../execution/LlmExecutionTools';
|
|
3
3
|
import type { ChatPromptResult } from '../../execution/PromptResult';
|
|
4
4
|
import type { ModelRequirements } from '../../types/ModelRequirements';
|
|
@@ -38,7 +38,7 @@ export declare class OpenAiAgentKitExecutionToolsToolBuilder {
|
|
|
38
38
|
buildAgentKitTools(options: {
|
|
39
39
|
readonly tools?: ModelRequirements['tools'];
|
|
40
40
|
readonly vectorStoreId?: string;
|
|
41
|
-
}): Array<AgentKitTool
|
|
41
|
+
}): Promise<Array<AgentKitTool>>;
|
|
42
42
|
/**
|
|
43
43
|
* Resolves the stored Promptbook tool result for one AgentKit tool call.
|
|
44
44
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import OpenAI from 'openai';
|
|
1
|
+
import type OpenAI from 'openai';
|
|
2
2
|
import type { ChatPromptResult } from '../../execution/PromptResult';
|
|
3
3
|
import type { Prompt } from '../../types/Prompt';
|
|
4
4
|
import type { string_date_iso8601, string_token } from '../../types/string_token';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import OpenAI from 'openai';
|
|
1
|
+
import type OpenAI from 'openai';
|
|
2
2
|
import type { ChatPromptResult } from '../../execution/PromptResult';
|
|
3
3
|
import type { ScriptExecutionTools } from '../../execution/ScriptExecutionTools';
|
|
4
4
|
import type { Prompt } from '../../types/Prompt';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import OpenAI from 'openai';
|
|
1
|
+
import type OpenAI from 'openai';
|
|
2
2
|
import type { AvailableModel } from '../../execution/AvailableModel';
|
|
3
3
|
import type { CompletionPromptResult, EmbeddingPromptResult, ImagePromptResult } from '../../execution/PromptResult';
|
|
4
4
|
import type { Usage } from '../../execution/Usage';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import OpenAI from 'openai';
|
|
1
|
+
import type OpenAI from 'openai';
|
|
2
2
|
import type { OpenAiCompatibleExecutionToolsNonProxiedOptions } from './OpenAiCompatibleExecutionToolsOptions';
|
|
3
3
|
/**
|
|
4
4
|
* Manages OpenAI-compatible client creation plus shared retry and rate-limit behavior.
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/**
|
|
3
|
+
* Loads the OpenAI AgentKit SDK (`@openai/agents`) on demand
|
|
4
|
+
*
|
|
5
|
+
* Note: [🐌] The AgentKit SDK is one of the heaviest dependencies of Promptbook, loading it eagerly would slow down
|
|
6
|
+
* every single run of the `ptbk` CLI utility even when no AgentKit agent is used
|
|
7
|
+
*
|
|
8
|
+
* @private internal utility of `@promptbook/openai`
|
|
9
|
+
*/
|
|
10
|
+
export declare const loadOpenAiAgentsModule: () => Promise<{
|
|
11
|
+
default: typeof import("@openai/agents");
|
|
12
|
+
applyPatchTool: typeof import("@openai/agents").applyPatchTool;
|
|
13
|
+
shellTool: typeof import("@openai/agents").shellTool;
|
|
14
|
+
realtime: typeof import("@openai/agents-realtime");
|
|
15
|
+
RuntimeEventEmitter: typeof import("events");
|
|
16
|
+
Agent: typeof import("@openai/agents").Agent;
|
|
17
|
+
AgentsError: typeof import("@openai/agents").AgentsError;
|
|
18
|
+
GuardrailExecutionError: typeof import("@openai/agents").GuardrailExecutionError;
|
|
19
|
+
InputGuardrailTripwireTriggered: typeof import("@openai/agents").InputGuardrailTripwireTriggered;
|
|
20
|
+
MaxTurnsExceededError: typeof import("@openai/agents").MaxTurnsExceededError;
|
|
21
|
+
ModelBehaviorError: typeof import("@openai/agents").ModelBehaviorError;
|
|
22
|
+
OutputGuardrailTripwireTriggered: typeof import("@openai/agents").OutputGuardrailTripwireTriggered;
|
|
23
|
+
ToolInputGuardrailTripwireTriggered: typeof import("@openai/agents").ToolInputGuardrailTripwireTriggered;
|
|
24
|
+
ToolOutputGuardrailTripwireTriggered: typeof import("@openai/agents").ToolOutputGuardrailTripwireTriggered;
|
|
25
|
+
ToolCallError: typeof import("@openai/agents").ToolCallError;
|
|
26
|
+
ToolTimeoutError: typeof import("@openai/agents").ToolTimeoutError;
|
|
27
|
+
UserError: typeof import("@openai/agents").UserError;
|
|
28
|
+
SystemError: typeof import("@openai/agents").SystemError;
|
|
29
|
+
RunAgentUpdatedStreamEvent: typeof import("@openai/agents").RunAgentUpdatedStreamEvent;
|
|
30
|
+
RunRawModelStreamEvent: typeof import("@openai/agents").RunRawModelStreamEvent;
|
|
31
|
+
RunItemStreamEvent: typeof import("@openai/agents").RunItemStreamEvent;
|
|
32
|
+
defineOutputGuardrail: typeof import("@openai/agents").defineOutputGuardrail;
|
|
33
|
+
ToolGuardrailFunctionOutputFactory: {
|
|
34
|
+
allow(outputInfo?: any): import("@openai/agents").ToolGuardrailFunctionOutput;
|
|
35
|
+
rejectContent(message: string, outputInfo?: any): import("@openai/agents").ToolGuardrailFunctionOutput;
|
|
36
|
+
throwException(outputInfo?: any): import("@openai/agents").ToolGuardrailFunctionOutput;
|
|
37
|
+
};
|
|
38
|
+
defineToolInputGuardrail: typeof import("@openai/agents").defineToolInputGuardrail;
|
|
39
|
+
defineToolOutputGuardrail: typeof import("@openai/agents").defineToolOutputGuardrail;
|
|
40
|
+
resolveToolInputGuardrails: typeof import("@openai/agents").resolveToolInputGuardrails;
|
|
41
|
+
resolveToolOutputGuardrails: typeof import("@openai/agents").resolveToolOutputGuardrails;
|
|
42
|
+
getHandoff: typeof import("@openai/agents").getHandoff;
|
|
43
|
+
getTransferMessage: typeof import("@openai/agents").getTransferMessage;
|
|
44
|
+
Handoff: typeof import("@openai/agents").Handoff;
|
|
45
|
+
handoff: typeof import("@openai/agents").handoff;
|
|
46
|
+
assistant: typeof import("@openai/agents").assistant;
|
|
47
|
+
system: typeof import("@openai/agents").system;
|
|
48
|
+
user: typeof import("@openai/agents").user;
|
|
49
|
+
extractAllTextOutput: typeof import("@openai/agents").extractAllTextOutput;
|
|
50
|
+
RunHandoffCallItem: typeof import("@openai/agents").RunHandoffCallItem;
|
|
51
|
+
RunHandoffOutputItem: typeof import("@openai/agents").RunHandoffOutputItem;
|
|
52
|
+
RunMessageOutputItem: typeof import("@openai/agents").RunMessageOutputItem;
|
|
53
|
+
RunReasoningItem: typeof import("@openai/agents").RunReasoningItem;
|
|
54
|
+
RunToolApprovalItem: typeof import("@openai/agents").RunToolApprovalItem;
|
|
55
|
+
RunToolCallItem: typeof import("@openai/agents").RunToolCallItem;
|
|
56
|
+
RunToolCallOutputItem: typeof import("@openai/agents").RunToolCallOutputItem;
|
|
57
|
+
AgentHooks: typeof import("@openai/agents").AgentHooks;
|
|
58
|
+
getLogger: typeof import("@openai/agents").getLogger;
|
|
59
|
+
applyDiff: typeof import("@openai/agents").applyDiff;
|
|
60
|
+
getAllMcpTools: typeof import("@openai/agents").getAllMcpTools;
|
|
61
|
+
invalidateServerToolsCache: typeof import("@openai/agents").invalidateServerToolsCache;
|
|
62
|
+
mcpToFunctionTool: typeof import("@openai/agents").mcpToFunctionTool;
|
|
63
|
+
MCPServerStdio: typeof import("@openai/agents").MCPServerStdio;
|
|
64
|
+
MCPServerStreamableHttp: typeof import("@openai/agents").MCPServerStreamableHttp;
|
|
65
|
+
MCPServerSSE: typeof import("@openai/agents").MCPServerSSE;
|
|
66
|
+
MCPServers: typeof import("@openai/agents").MCPServers;
|
|
67
|
+
connectMcpServers: typeof import("@openai/agents").connectMcpServers;
|
|
68
|
+
createMCPToolStaticFilter: typeof import("@openai/agents").createMCPToolStaticFilter;
|
|
69
|
+
OPENAI_DEFAULT_MODEL_ENV_VARIABLE_NAME: "OPENAI_DEFAULT_MODEL";
|
|
70
|
+
gpt5ReasoningSettingsRequired: typeof import("@openai/agents").gpt5ReasoningSettingsRequired;
|
|
71
|
+
getDefaultModel: typeof import("@openai/agents").getDefaultModel;
|
|
72
|
+
getDefaultModelSettings: typeof import("@openai/agents").getDefaultModelSettings;
|
|
73
|
+
isGpt5Default: typeof import("@openai/agents").isGpt5Default;
|
|
74
|
+
setDefaultModelProvider: typeof import("@openai/agents").setDefaultModelProvider;
|
|
75
|
+
RunResult: typeof import("@openai/agents").RunResult;
|
|
76
|
+
StreamedRunResult: typeof import("@openai/agents").StreamedRunResult;
|
|
77
|
+
run: typeof import("@openai/agents").run;
|
|
78
|
+
Runner: typeof import("@openai/agents").Runner;
|
|
79
|
+
RunContext: typeof import("@openai/agents").RunContext;
|
|
80
|
+
RunState: typeof import("@openai/agents").RunState;
|
|
81
|
+
computerTool: typeof import("@openai/agents").computerTool;
|
|
82
|
+
hostedMcpTool: typeof import("@openai/agents").hostedMcpTool;
|
|
83
|
+
tool: typeof import("@openai/agents").tool;
|
|
84
|
+
invokeFunctionTool: typeof import("@openai/agents").invokeFunctionTool;
|
|
85
|
+
getGlobalTraceProvider: typeof import("@openai/agents").getGlobalTraceProvider;
|
|
86
|
+
TraceProvider: typeof import("@openai/agents").TraceProvider;
|
|
87
|
+
runToolInputGuardrails: typeof import("@openai/agents").runToolInputGuardrails;
|
|
88
|
+
runToolOutputGuardrails: typeof import("@openai/agents").runToolOutputGuardrails;
|
|
89
|
+
RequestUsage: typeof import("@openai/agents").RequestUsage;
|
|
90
|
+
Usage: typeof import("@openai/agents").Usage;
|
|
91
|
+
isOpenAIResponsesCompactionAwareSession: typeof import("@openai/agents").isOpenAIResponsesCompactionAwareSession;
|
|
92
|
+
MemorySession: typeof import("@openai/agents").MemorySession;
|
|
93
|
+
protocol: typeof import("@openai/agents-core/dist/types/protocol");
|
|
94
|
+
addTraceProcessor(processor: import("@openai/agents").TracingProcessor): void;
|
|
95
|
+
setTraceProcessors(processors: import("@openai/agents").TracingProcessor[]): void;
|
|
96
|
+
setTracingDisabled(disabled: boolean): void;
|
|
97
|
+
startTraceExportLoop(): void;
|
|
98
|
+
getCurrentSpan: typeof import("@openai/agents").getCurrentSpan;
|
|
99
|
+
getCurrentTrace: typeof import("@openai/agents").getCurrentTrace;
|
|
100
|
+
getOrCreateTrace: typeof import("@openai/agents").getOrCreateTrace;
|
|
101
|
+
resetCurrentSpan: typeof import("@openai/agents").resetCurrentSpan;
|
|
102
|
+
setCurrentSpan: typeof import("@openai/agents").setCurrentSpan;
|
|
103
|
+
withTrace: typeof import("@openai/agents").withTrace;
|
|
104
|
+
BatchTraceProcessor: typeof import("@openai/agents").BatchTraceProcessor;
|
|
105
|
+
ConsoleSpanExporter: typeof import("@openai/agents").ConsoleSpanExporter;
|
|
106
|
+
NoopSpan: typeof import("@openai/agents").NoopSpan;
|
|
107
|
+
Span: typeof import("@openai/agents").Span;
|
|
108
|
+
NoopTrace: typeof import("@openai/agents").NoopTrace;
|
|
109
|
+
Trace: typeof import("@openai/agents").Trace;
|
|
110
|
+
generateGroupId: typeof import("@openai/agents").generateGroupId;
|
|
111
|
+
generateSpanId: typeof import("@openai/agents").generateSpanId;
|
|
112
|
+
generateTraceId: typeof import("@openai/agents").generateTraceId;
|
|
113
|
+
createResponseSpan(options?: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").ResponseSpanData>> | undefined, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined): import("@openai/agents").Span<import("@openai/agents").ResponseSpanData>;
|
|
114
|
+
createAgentSpan(options?: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").AgentSpanData>> | undefined, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined): import("@openai/agents").Span<import("@openai/agents").AgentSpanData>;
|
|
115
|
+
createFunctionSpan(options: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").FunctionSpanData>> & {
|
|
116
|
+
data: {
|
|
117
|
+
name: string;
|
|
118
|
+
};
|
|
119
|
+
}, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined): import("@openai/agents").Span<import("@openai/agents").FunctionSpanData>;
|
|
120
|
+
createHandoffSpan(options?: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").HandoffSpanData>> | undefined, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined): import("@openai/agents").Span<import("@openai/agents").HandoffSpanData>;
|
|
121
|
+
createGenerationSpan(options?: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").GenerationSpanData>> | undefined, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined): import("@openai/agents").Span<import("@openai/agents").GenerationSpanData>;
|
|
122
|
+
createCustomSpan(options: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").CustomSpanData>> & {
|
|
123
|
+
data: {
|
|
124
|
+
name: string;
|
|
125
|
+
};
|
|
126
|
+
}, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined): import("@openai/agents").Span<import("@openai/agents").CustomSpanData>;
|
|
127
|
+
createGuardrailSpan(options: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").GuardrailSpanData>> & {
|
|
128
|
+
data: {
|
|
129
|
+
name: string;
|
|
130
|
+
};
|
|
131
|
+
}, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined): import("@openai/agents").Span<import("@openai/agents").GuardrailSpanData>;
|
|
132
|
+
createTranscriptionSpan(options: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").TranscriptionSpanData>> & {
|
|
133
|
+
data: {
|
|
134
|
+
input: {
|
|
135
|
+
data: string;
|
|
136
|
+
format: (string & {}) | "pcm";
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
}, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined): import("@openai/agents").Span<import("@openai/agents").TranscriptionSpanData>;
|
|
140
|
+
createSpeechSpan(options: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").SpeechSpanData>> & {
|
|
141
|
+
data: {
|
|
142
|
+
output: {
|
|
143
|
+
data: string;
|
|
144
|
+
format: (string & {}) | "pcm";
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
}, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined): import("@openai/agents").Span<import("@openai/agents").SpeechSpanData>;
|
|
148
|
+
createSpeechGroupSpan(options?: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").SpeechGroupSpanData>> | undefined, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined): import("@openai/agents").Span<import("@openai/agents").SpeechGroupSpanData>;
|
|
149
|
+
createMCPListToolsSpan(options?: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").MCPListToolsSpanData>> | undefined, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined): import("@openai/agents").Span<import("@openai/agents").MCPListToolsSpanData>;
|
|
150
|
+
withResponseSpan: <TOutput>(fn: (span: import("@openai/agents").Span<import("@openai/agents").ResponseSpanData>) => Promise<TOutput>, options?: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").ResponseSpanData>> | undefined, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined) => Promise<TOutput>;
|
|
151
|
+
withAgentSpan: <TOutput_1>(fn: (span: import("@openai/agents").Span<import("@openai/agents").AgentSpanData>) => Promise<TOutput_1>, options?: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").AgentSpanData>> | undefined, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined) => Promise<TOutput_1>;
|
|
152
|
+
withFunctionSpan: <TOutput_2>(fn: (span: import("@openai/agents").Span<import("@openai/agents").FunctionSpanData>) => Promise<TOutput_2>, options: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").FunctionSpanData>> & {
|
|
153
|
+
data: {
|
|
154
|
+
name: string;
|
|
155
|
+
};
|
|
156
|
+
}, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined) => Promise<TOutput_2>;
|
|
157
|
+
withHandoffSpan: <TOutput_3>(fn: (span: import("@openai/agents").Span<import("@openai/agents").HandoffSpanData>) => Promise<TOutput_3>, options?: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").HandoffSpanData>> | undefined, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined) => Promise<TOutput_3>;
|
|
158
|
+
withGenerationSpan: <TOutput_4>(fn: (span: import("@openai/agents").Span<import("@openai/agents").GenerationSpanData>) => Promise<TOutput_4>, options?: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").GenerationSpanData>> | undefined, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined) => Promise<TOutput_4>;
|
|
159
|
+
withCustomSpan: <TOutput_5>(fn: (span: import("@openai/agents").Span<import("@openai/agents").CustomSpanData>) => Promise<TOutput_5>, options: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").CustomSpanData>> & {
|
|
160
|
+
data: {
|
|
161
|
+
name: string;
|
|
162
|
+
};
|
|
163
|
+
}, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined) => Promise<TOutput_5>;
|
|
164
|
+
withGuardrailSpan: <TOutput_6>(fn: (span: import("@openai/agents").Span<import("@openai/agents").GuardrailSpanData>) => Promise<TOutput_6>, options: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").GuardrailSpanData>> & {
|
|
165
|
+
data: {
|
|
166
|
+
name: string;
|
|
167
|
+
};
|
|
168
|
+
}, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined) => Promise<TOutput_6>;
|
|
169
|
+
withTranscriptionSpan: <TOutput_7>(fn: (span: import("@openai/agents").Span<import("@openai/agents").TranscriptionSpanData>) => Promise<TOutput_7>, options: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").TranscriptionSpanData>> & {
|
|
170
|
+
data: {
|
|
171
|
+
input: {
|
|
172
|
+
data: string;
|
|
173
|
+
format: (string & {}) | "pcm";
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
}, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined) => Promise<TOutput_7>;
|
|
177
|
+
withSpeechSpan: <TOutput_8>(fn: (span: import("@openai/agents").Span<import("@openai/agents").SpeechSpanData>) => Promise<TOutput_8>, options: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").SpeechSpanData>> & {
|
|
178
|
+
data: {
|
|
179
|
+
output: {
|
|
180
|
+
data: string;
|
|
181
|
+
format: (string & {}) | "pcm";
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
}, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined) => Promise<TOutput_8>;
|
|
185
|
+
withSpeechGroupSpan: <TOutput_9>(fn: (span: import("@openai/agents").Span<import("@openai/agents").SpeechGroupSpanData>) => Promise<TOutput_9>, options?: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").SpeechGroupSpanData>> | undefined, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined) => Promise<TOutput_9>;
|
|
186
|
+
withMCPListToolsSpan: <TOutput_10>(fn: (span: import("@openai/agents").Span<import("@openai/agents").MCPListToolsSpanData>) => Promise<TOutput_10>, options?: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").MCPListToolsSpanData>> | undefined, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined) => Promise<TOutput_10>;
|
|
187
|
+
OpenAIProvider: typeof import("@openai/agents").OpenAIProvider;
|
|
188
|
+
OpenAIResponsesModel: typeof import("@openai/agents").OpenAIResponsesModel;
|
|
189
|
+
OpenAIChatCompletionsModel: typeof import("@openai/agents").OpenAIChatCompletionsModel;
|
|
190
|
+
setDefaultOpenAIClient: typeof import("@openai/agents").setDefaultOpenAIClient;
|
|
191
|
+
setOpenAIAPI: typeof import("@openai/agents").setOpenAIAPI;
|
|
192
|
+
setDefaultOpenAIKey: typeof import("@openai/agents").setDefaultOpenAIKey;
|
|
193
|
+
setTracingExportApiKey: typeof import("@openai/agents").setTracingExportApiKey;
|
|
194
|
+
setDefaultOpenAITracingExporter: typeof import("@openai/agents").setDefaultOpenAITracingExporter;
|
|
195
|
+
OpenAITracingExporter: typeof import("@openai/agents").OpenAITracingExporter;
|
|
196
|
+
webSearchTool: typeof import("@openai/agents").webSearchTool;
|
|
197
|
+
fileSearchTool: typeof import("@openai/agents").fileSearchTool;
|
|
198
|
+
codeInterpreterTool: typeof import("@openai/agents").codeInterpreterTool;
|
|
199
|
+
imageGenerationTool: typeof import("@openai/agents").imageGenerationTool;
|
|
200
|
+
OpenAIConversationsSession: typeof import("@openai/agents").OpenAIConversationsSession;
|
|
201
|
+
startOpenAIConversationsSession: typeof import("@openai/agents").startOpenAIConversationsSession;
|
|
202
|
+
OpenAIResponsesCompactionSession: typeof import("@openai/agents").OpenAIResponsesCompactionSession;
|
|
203
|
+
}>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates a loader which imports one module on the first call and reuses the very same module afterwards
|
|
3
|
+
*
|
|
4
|
+
* Note: [🐌] Heavy third-party dependencies are imported lazily to keep the startup of the Promptbook CLI fast.
|
|
5
|
+
* A statically imported dependency is loaded every single time the bundle is loaded, even when the running
|
|
6
|
+
* command never touches it. A lazily imported dependency is loaded only when the feature is really used.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* const loadJsdomModule = createLazyModuleLoader(() => import('jsdom'));
|
|
10
|
+
* const { JSDOM } = await loadJsdomModule();
|
|
11
|
+
*
|
|
12
|
+
* @private internal utility of Promptbook
|
|
13
|
+
*/
|
|
14
|
+
export declare function createLazyModuleLoader<TModule>(importModule: () => Promise<TModule>): () => Promise<TModule>;
|
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.
|
|
18
|
+
* It follows semantic versioning (e.g., `0.114.0-2`).
|
|
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.114.0-
|
|
26
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.114.0-3';
|
|
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
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { WindowLike as DomWindowLike } from 'dompurify';
|
|
2
|
+
/**
|
|
3
|
+
* Provides a DOM `window` for runtimes which do not have one, for example Node.js during server-side rendering
|
|
4
|
+
*
|
|
5
|
+
* Note: `$` is used to indicate that this function is not a pure function - it creates and caches one shared DOM window
|
|
6
|
+
*
|
|
7
|
+
* @returns DOM window which can back a DOM-dependent library like `DOMPurify`
|
|
8
|
+
* @throws {EnvironmentMismatchError} When the current runtime can not create a DOM window
|
|
9
|
+
* @private utility of `renderMarkdown`
|
|
10
|
+
*/
|
|
11
|
+
export declare function $provideServerDomWindow(): DomWindowLike;
|
|
@@ -18,6 +18,12 @@ export declare const PTBK_AGENTS_SERVER_BUILD_WORKER_COUNT_ENV = "PTBK_AGENTS_SE
|
|
|
18
18
|
* @private internal constant of `buildAgentsServer`
|
|
19
19
|
*/
|
|
20
20
|
export declare const PTBK_AGENTS_SERVER_IGNORE_NEXT_VALIDATION_ENV = "PTBK_AGENTS_SERVER_IGNORE_NEXT_VALIDATION";
|
|
21
|
+
/**
|
|
22
|
+
* Environment variable that disables throwaway webpack filesystem caches for CLI-owned production builds.
|
|
23
|
+
*
|
|
24
|
+
* @private internal constant of `buildAgentsServer`
|
|
25
|
+
*/
|
|
26
|
+
export declare const PTBK_AGENTS_SERVER_DISABLE_WEBPACK_FILESYSTEM_CACHE_ENV = "PTBK_AGENTS_SERVER_DISABLE_WEBPACK_FILESYSTEM_CACHE";
|
|
21
27
|
/**
|
|
22
28
|
* Adds dependency-resolution environment required by the materialized Agents Server runtime.
|
|
23
29
|
*
|
|
@@ -25,4 +31,5 @@ export declare const PTBK_AGENTS_SERVER_IGNORE_NEXT_VALIDATION_ENV = "PTBK_AGENT
|
|
|
25
31
|
*/
|
|
26
32
|
export declare function createAgentsServerRuntimeEnvironment(environment: NodeJS.ProcessEnv, nodeModulesPath: string, options?: {
|
|
27
33
|
readonly isNextValidationIgnored?: boolean;
|
|
34
|
+
readonly isWebpackFilesystemCacheDisabled?: boolean;
|
|
28
35
|
}): NodeJS.ProcessEnv;
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import type { Command as Program } from 'commander';
|
|
2
2
|
import type { $side_effect } from '../../../utils/organization/$side_effect';
|
|
3
3
|
/**
|
|
4
|
-
* Initializes `coder ping` command for Promptbook CLI utilities
|
|
4
|
+
* Initializes `coder ping` command for Promptbook CLI utilities
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
* and reports how long the harness/model turn took.
|
|
8
|
-
*
|
|
9
|
-
* Note: `$` is used to indicate that this function is not a pure function - it registers a command in the CLI.
|
|
6
|
+
* Note: `$` is used to indicate that this function is not a pure function - it registers a command in the CLI
|
|
10
7
|
*
|
|
11
8
|
* @private internal function of `promptbookCli`
|
|
12
9
|
*/
|
|
@@ -8,8 +8,8 @@ import type { $side_effect } from '../../utils/organization/$side_effect';
|
|
|
8
8
|
* - add: Add one ready-to-run prompt file to the queue
|
|
9
9
|
* - generate-boilerplates: Generate prompt boilerplate files
|
|
10
10
|
* - find-refactor-candidates: Find files that need refactoring
|
|
11
|
-
* - ping: Test one harness and model connection with a disposable task
|
|
12
11
|
* - run: Run coding prompts with AI agents
|
|
12
|
+
* - ping: Test one harness and model with a tiny dummy prompt
|
|
13
13
|
* - verify: Verify completed prompts
|
|
14
14
|
* - find-fresh-emoji-tags: Find unused emoji tags
|
|
15
15
|
*
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { Command as Program } from 'commander';
|
|
2
|
+
import type { CoderGitSyncOptions } from '../../../../scripts/run-codex-prompts/git/coderGitSync';
|
|
3
|
+
export type { CoderGitSyncOptions };
|
|
4
|
+
/**
|
|
5
|
+
* Commander option bag for the shared `ptbk coder` git synchronization flags.
|
|
6
|
+
*
|
|
7
|
+
* @private internal utility of `promptbookCli`
|
|
8
|
+
*/
|
|
9
|
+
export type CoderGitSyncCliOptions = {
|
|
10
|
+
readonly commit: boolean;
|
|
11
|
+
readonly autoPush: boolean;
|
|
12
|
+
readonly autoPull: boolean;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Description block shared by the `ptbk coder` commands which can synchronize their changes with git.
|
|
16
|
+
*
|
|
17
|
+
* @private internal utility of `promptbookCli`
|
|
18
|
+
*/
|
|
19
|
+
export declare const CODER_GIT_SYNC_DESCRIPTION: string;
|
|
20
|
+
/**
|
|
21
|
+
* Registers the shared `--commit`, `--auto-push` and `--auto-pull` flags on a `ptbk coder` command.
|
|
22
|
+
*
|
|
23
|
+
* Note: Unlike `ptbk coder run`, which commits by default and opts out through `--no-commit`,
|
|
24
|
+
* these commands never touch git unless the flags are used explicitly.
|
|
25
|
+
*
|
|
26
|
+
* @private internal utility of `promptbookCli`
|
|
27
|
+
*/
|
|
28
|
+
export declare function addCoderGitSyncOptions(command: Program): void;
|
|
29
|
+
/**
|
|
30
|
+
* Converts the Commander git synchronization flags into normalized git synchronization options.
|
|
31
|
+
*
|
|
32
|
+
* @private internal utility of `promptbookCli`
|
|
33
|
+
*/
|
|
34
|
+
export declare function normalizeCoderGitSyncCliOptions(cliOptions: CoderGitSyncCliOptions): CoderGitSyncOptions;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="prompts" />
|
|
2
|
+
/**
|
|
3
|
+
* Loads the interactive terminal prompt library (`prompts`) on demand
|
|
4
|
+
*
|
|
5
|
+
* Note: [🐌] Loaded lazily to keep the startup of the `ptbk` CLI utility fast - most commands never ask the user
|
|
6
|
+
* anything interactively
|
|
7
|
+
*
|
|
8
|
+
* @private internal utility of Promptbook CLI
|
|
9
|
+
*/
|
|
10
|
+
export declare const loadPromptsModule: () => Promise<{
|
|
11
|
+
default: typeof import("prompts");
|
|
12
|
+
inject: typeof import("prompts").inject;
|
|
13
|
+
override: typeof import("prompts").override;
|
|
14
|
+
prompt: any;
|
|
15
|
+
prompts: typeof import("prompts").prompts;
|
|
16
|
+
}>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Anthropic from '@anthropic-ai/sdk';
|
|
1
|
+
import type Anthropic from '@anthropic-ai/sdk';
|
|
2
2
|
import type { ChatParticipant } from '../../book-components/Chat/types/ChatParticipant';
|
|
3
3
|
import type { AvailableModel } from '../../execution/AvailableModel';
|
|
4
4
|
import type { LlmExecutionTools } from '../../execution/LlmExecutionTools';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OpenAIClient } from '@azure/openai';
|
|
1
|
+
import type { OpenAIClient } from '@azure/openai';
|
|
2
2
|
import type { ChatParticipant } from '../../book-components/Chat/types/ChatParticipant';
|
|
3
3
|
import type { AvailableModel } from '../../execution/AvailableModel';
|
|
4
4
|
import type { LlmExecutionTools } from '../../execution/LlmExecutionTools';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Agent as AgentFromKit } from '@openai/agents';
|
|
1
|
+
import type { Agent as AgentFromKit } from '@openai/agents';
|
|
2
2
|
import type { CallChatModelStreamOptions, LlmExecutionTools } from '../../execution/LlmExecutionTools';
|
|
3
3
|
import type { ChatPromptResult } from '../../execution/PromptResult';
|
|
4
4
|
import type { ModelRequirements } from '../../types/ModelRequirements';
|
|
@@ -38,7 +38,7 @@ export declare class OpenAiAgentKitExecutionToolsToolBuilder {
|
|
|
38
38
|
buildAgentKitTools(options: {
|
|
39
39
|
readonly tools?: ModelRequirements['tools'];
|
|
40
40
|
readonly vectorStoreId?: string;
|
|
41
|
-
}): Array<AgentKitTool
|
|
41
|
+
}): Promise<Array<AgentKitTool>>;
|
|
42
42
|
/**
|
|
43
43
|
* Resolves the stored Promptbook tool result for one AgentKit tool call.
|
|
44
44
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import OpenAI from 'openai';
|
|
1
|
+
import type OpenAI from 'openai';
|
|
2
2
|
import type { ChatPromptResult } from '../../execution/PromptResult';
|
|
3
3
|
import type { Prompt } from '../../types/Prompt';
|
|
4
4
|
import type { string_date_iso8601, string_token } from '../../types/string_token';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import OpenAI from 'openai';
|
|
1
|
+
import type OpenAI from 'openai';
|
|
2
2
|
import type { ChatPromptResult } from '../../execution/PromptResult';
|
|
3
3
|
import type { ScriptExecutionTools } from '../../execution/ScriptExecutionTools';
|
|
4
4
|
import type { Prompt } from '../../types/Prompt';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import OpenAI from 'openai';
|
|
1
|
+
import type OpenAI from 'openai';
|
|
2
2
|
import type { AvailableModel } from '../../execution/AvailableModel';
|
|
3
3
|
import type { CompletionPromptResult, EmbeddingPromptResult, ImagePromptResult } from '../../execution/PromptResult';
|
|
4
4
|
import type { Usage } from '../../execution/Usage';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import OpenAI from 'openai';
|
|
1
|
+
import type OpenAI from 'openai';
|
|
2
2
|
import type { OpenAiCompatibleExecutionToolsNonProxiedOptions } from './OpenAiCompatibleExecutionToolsOptions';
|
|
3
3
|
/**
|
|
4
4
|
* Manages OpenAI-compatible client creation plus shared retry and rate-limit behavior.
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/**
|
|
3
|
+
* Loads the OpenAI AgentKit SDK (`@openai/agents`) on demand
|
|
4
|
+
*
|
|
5
|
+
* Note: [🐌] The AgentKit SDK is one of the heaviest dependencies of Promptbook, loading it eagerly would slow down
|
|
6
|
+
* every single run of the `ptbk` CLI utility even when no AgentKit agent is used
|
|
7
|
+
*
|
|
8
|
+
* @private internal utility of `@promptbook/openai`
|
|
9
|
+
*/
|
|
10
|
+
export declare const loadOpenAiAgentsModule: () => Promise<{
|
|
11
|
+
default: typeof import("@openai/agents");
|
|
12
|
+
applyPatchTool: typeof import("@openai/agents").applyPatchTool;
|
|
13
|
+
shellTool: typeof import("@openai/agents").shellTool;
|
|
14
|
+
realtime: typeof import("@openai/agents-realtime");
|
|
15
|
+
RuntimeEventEmitter: typeof import("events");
|
|
16
|
+
Agent: typeof import("@openai/agents").Agent;
|
|
17
|
+
AgentsError: typeof import("@openai/agents").AgentsError;
|
|
18
|
+
GuardrailExecutionError: typeof import("@openai/agents").GuardrailExecutionError;
|
|
19
|
+
InputGuardrailTripwireTriggered: typeof import("@openai/agents").InputGuardrailTripwireTriggered;
|
|
20
|
+
MaxTurnsExceededError: typeof import("@openai/agents").MaxTurnsExceededError;
|
|
21
|
+
ModelBehaviorError: typeof import("@openai/agents").ModelBehaviorError;
|
|
22
|
+
OutputGuardrailTripwireTriggered: typeof import("@openai/agents").OutputGuardrailTripwireTriggered;
|
|
23
|
+
ToolInputGuardrailTripwireTriggered: typeof import("@openai/agents").ToolInputGuardrailTripwireTriggered;
|
|
24
|
+
ToolOutputGuardrailTripwireTriggered: typeof import("@openai/agents").ToolOutputGuardrailTripwireTriggered;
|
|
25
|
+
ToolCallError: typeof import("@openai/agents").ToolCallError;
|
|
26
|
+
ToolTimeoutError: typeof import("@openai/agents").ToolTimeoutError;
|
|
27
|
+
UserError: typeof import("@openai/agents").UserError;
|
|
28
|
+
SystemError: typeof import("@openai/agents").SystemError;
|
|
29
|
+
RunAgentUpdatedStreamEvent: typeof import("@openai/agents").RunAgentUpdatedStreamEvent;
|
|
30
|
+
RunRawModelStreamEvent: typeof import("@openai/agents").RunRawModelStreamEvent;
|
|
31
|
+
RunItemStreamEvent: typeof import("@openai/agents").RunItemStreamEvent;
|
|
32
|
+
defineOutputGuardrail: typeof import("@openai/agents").defineOutputGuardrail;
|
|
33
|
+
ToolGuardrailFunctionOutputFactory: {
|
|
34
|
+
allow(outputInfo?: any): import("@openai/agents").ToolGuardrailFunctionOutput;
|
|
35
|
+
rejectContent(message: string, outputInfo?: any): import("@openai/agents").ToolGuardrailFunctionOutput;
|
|
36
|
+
throwException(outputInfo?: any): import("@openai/agents").ToolGuardrailFunctionOutput;
|
|
37
|
+
};
|
|
38
|
+
defineToolInputGuardrail: typeof import("@openai/agents").defineToolInputGuardrail;
|
|
39
|
+
defineToolOutputGuardrail: typeof import("@openai/agents").defineToolOutputGuardrail;
|
|
40
|
+
resolveToolInputGuardrails: typeof import("@openai/agents").resolveToolInputGuardrails;
|
|
41
|
+
resolveToolOutputGuardrails: typeof import("@openai/agents").resolveToolOutputGuardrails;
|
|
42
|
+
getHandoff: typeof import("@openai/agents").getHandoff;
|
|
43
|
+
getTransferMessage: typeof import("@openai/agents").getTransferMessage;
|
|
44
|
+
Handoff: typeof import("@openai/agents").Handoff;
|
|
45
|
+
handoff: typeof import("@openai/agents").handoff;
|
|
46
|
+
assistant: typeof import("@openai/agents").assistant;
|
|
47
|
+
system: typeof import("@openai/agents").system;
|
|
48
|
+
user: typeof import("@openai/agents").user;
|
|
49
|
+
extractAllTextOutput: typeof import("@openai/agents").extractAllTextOutput;
|
|
50
|
+
RunHandoffCallItem: typeof import("@openai/agents").RunHandoffCallItem;
|
|
51
|
+
RunHandoffOutputItem: typeof import("@openai/agents").RunHandoffOutputItem;
|
|
52
|
+
RunMessageOutputItem: typeof import("@openai/agents").RunMessageOutputItem;
|
|
53
|
+
RunReasoningItem: typeof import("@openai/agents").RunReasoningItem;
|
|
54
|
+
RunToolApprovalItem: typeof import("@openai/agents").RunToolApprovalItem;
|
|
55
|
+
RunToolCallItem: typeof import("@openai/agents").RunToolCallItem;
|
|
56
|
+
RunToolCallOutputItem: typeof import("@openai/agents").RunToolCallOutputItem;
|
|
57
|
+
AgentHooks: typeof import("@openai/agents").AgentHooks;
|
|
58
|
+
getLogger: typeof import("@openai/agents").getLogger;
|
|
59
|
+
applyDiff: typeof import("@openai/agents").applyDiff;
|
|
60
|
+
getAllMcpTools: typeof import("@openai/agents").getAllMcpTools;
|
|
61
|
+
invalidateServerToolsCache: typeof import("@openai/agents").invalidateServerToolsCache;
|
|
62
|
+
mcpToFunctionTool: typeof import("@openai/agents").mcpToFunctionTool;
|
|
63
|
+
MCPServerStdio: typeof import("@openai/agents").MCPServerStdio;
|
|
64
|
+
MCPServerStreamableHttp: typeof import("@openai/agents").MCPServerStreamableHttp;
|
|
65
|
+
MCPServerSSE: typeof import("@openai/agents").MCPServerSSE;
|
|
66
|
+
MCPServers: typeof import("@openai/agents").MCPServers;
|
|
67
|
+
connectMcpServers: typeof import("@openai/agents").connectMcpServers;
|
|
68
|
+
createMCPToolStaticFilter: typeof import("@openai/agents").createMCPToolStaticFilter;
|
|
69
|
+
OPENAI_DEFAULT_MODEL_ENV_VARIABLE_NAME: "OPENAI_DEFAULT_MODEL";
|
|
70
|
+
gpt5ReasoningSettingsRequired: typeof import("@openai/agents").gpt5ReasoningSettingsRequired;
|
|
71
|
+
getDefaultModel: typeof import("@openai/agents").getDefaultModel;
|
|
72
|
+
getDefaultModelSettings: typeof import("@openai/agents").getDefaultModelSettings;
|
|
73
|
+
isGpt5Default: typeof import("@openai/agents").isGpt5Default;
|
|
74
|
+
setDefaultModelProvider: typeof import("@openai/agents").setDefaultModelProvider;
|
|
75
|
+
RunResult: typeof import("@openai/agents").RunResult;
|
|
76
|
+
StreamedRunResult: typeof import("@openai/agents").StreamedRunResult;
|
|
77
|
+
run: typeof import("@openai/agents").run;
|
|
78
|
+
Runner: typeof import("@openai/agents").Runner;
|
|
79
|
+
RunContext: typeof import("@openai/agents").RunContext;
|
|
80
|
+
RunState: typeof import("@openai/agents").RunState;
|
|
81
|
+
computerTool: typeof import("@openai/agents").computerTool;
|
|
82
|
+
hostedMcpTool: typeof import("@openai/agents").hostedMcpTool;
|
|
83
|
+
tool: typeof import("@openai/agents").tool;
|
|
84
|
+
invokeFunctionTool: typeof import("@openai/agents").invokeFunctionTool;
|
|
85
|
+
getGlobalTraceProvider: typeof import("@openai/agents").getGlobalTraceProvider;
|
|
86
|
+
TraceProvider: typeof import("@openai/agents").TraceProvider;
|
|
87
|
+
runToolInputGuardrails: typeof import("@openai/agents").runToolInputGuardrails;
|
|
88
|
+
runToolOutputGuardrails: typeof import("@openai/agents").runToolOutputGuardrails;
|
|
89
|
+
RequestUsage: typeof import("@openai/agents").RequestUsage;
|
|
90
|
+
Usage: typeof import("@openai/agents").Usage;
|
|
91
|
+
isOpenAIResponsesCompactionAwareSession: typeof import("@openai/agents").isOpenAIResponsesCompactionAwareSession;
|
|
92
|
+
MemorySession: typeof import("@openai/agents").MemorySession;
|
|
93
|
+
protocol: typeof import("@openai/agents-core/dist/types/protocol");
|
|
94
|
+
addTraceProcessor(processor: import("@openai/agents").TracingProcessor): void;
|
|
95
|
+
setTraceProcessors(processors: import("@openai/agents").TracingProcessor[]): void;
|
|
96
|
+
setTracingDisabled(disabled: boolean): void;
|
|
97
|
+
startTraceExportLoop(): void;
|
|
98
|
+
getCurrentSpan: typeof import("@openai/agents").getCurrentSpan;
|
|
99
|
+
getCurrentTrace: typeof import("@openai/agents").getCurrentTrace;
|
|
100
|
+
getOrCreateTrace: typeof import("@openai/agents").getOrCreateTrace;
|
|
101
|
+
resetCurrentSpan: typeof import("@openai/agents").resetCurrentSpan;
|
|
102
|
+
setCurrentSpan: typeof import("@openai/agents").setCurrentSpan;
|
|
103
|
+
withTrace: typeof import("@openai/agents").withTrace;
|
|
104
|
+
BatchTraceProcessor: typeof import("@openai/agents").BatchTraceProcessor;
|
|
105
|
+
ConsoleSpanExporter: typeof import("@openai/agents").ConsoleSpanExporter;
|
|
106
|
+
NoopSpan: typeof import("@openai/agents").NoopSpan;
|
|
107
|
+
Span: typeof import("@openai/agents").Span;
|
|
108
|
+
NoopTrace: typeof import("@openai/agents").NoopTrace;
|
|
109
|
+
Trace: typeof import("@openai/agents").Trace;
|
|
110
|
+
generateGroupId: typeof import("@openai/agents").generateGroupId;
|
|
111
|
+
generateSpanId: typeof import("@openai/agents").generateSpanId;
|
|
112
|
+
generateTraceId: typeof import("@openai/agents").generateTraceId;
|
|
113
|
+
createResponseSpan(options?: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").ResponseSpanData>> | undefined, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined): import("@openai/agents").Span<import("@openai/agents").ResponseSpanData>;
|
|
114
|
+
createAgentSpan(options?: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").AgentSpanData>> | undefined, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined): import("@openai/agents").Span<import("@openai/agents").AgentSpanData>;
|
|
115
|
+
createFunctionSpan(options: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").FunctionSpanData>> & {
|
|
116
|
+
data: {
|
|
117
|
+
name: string;
|
|
118
|
+
};
|
|
119
|
+
}, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined): import("@openai/agents").Span<import("@openai/agents").FunctionSpanData>;
|
|
120
|
+
createHandoffSpan(options?: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").HandoffSpanData>> | undefined, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined): import("@openai/agents").Span<import("@openai/agents").HandoffSpanData>;
|
|
121
|
+
createGenerationSpan(options?: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").GenerationSpanData>> | undefined, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined): import("@openai/agents").Span<import("@openai/agents").GenerationSpanData>;
|
|
122
|
+
createCustomSpan(options: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").CustomSpanData>> & {
|
|
123
|
+
data: {
|
|
124
|
+
name: string;
|
|
125
|
+
};
|
|
126
|
+
}, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined): import("@openai/agents").Span<import("@openai/agents").CustomSpanData>;
|
|
127
|
+
createGuardrailSpan(options: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").GuardrailSpanData>> & {
|
|
128
|
+
data: {
|
|
129
|
+
name: string;
|
|
130
|
+
};
|
|
131
|
+
}, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined): import("@openai/agents").Span<import("@openai/agents").GuardrailSpanData>;
|
|
132
|
+
createTranscriptionSpan(options: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").TranscriptionSpanData>> & {
|
|
133
|
+
data: {
|
|
134
|
+
input: {
|
|
135
|
+
data: string;
|
|
136
|
+
format: (string & {}) | "pcm";
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
}, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined): import("@openai/agents").Span<import("@openai/agents").TranscriptionSpanData>;
|
|
140
|
+
createSpeechSpan(options: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").SpeechSpanData>> & {
|
|
141
|
+
data: {
|
|
142
|
+
output: {
|
|
143
|
+
data: string;
|
|
144
|
+
format: (string & {}) | "pcm";
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
}, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined): import("@openai/agents").Span<import("@openai/agents").SpeechSpanData>;
|
|
148
|
+
createSpeechGroupSpan(options?: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").SpeechGroupSpanData>> | undefined, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined): import("@openai/agents").Span<import("@openai/agents").SpeechGroupSpanData>;
|
|
149
|
+
createMCPListToolsSpan(options?: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").MCPListToolsSpanData>> | undefined, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined): import("@openai/agents").Span<import("@openai/agents").MCPListToolsSpanData>;
|
|
150
|
+
withResponseSpan: <TOutput>(fn: (span: import("@openai/agents").Span<import("@openai/agents").ResponseSpanData>) => Promise<TOutput>, options?: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").ResponseSpanData>> | undefined, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined) => Promise<TOutput>;
|
|
151
|
+
withAgentSpan: <TOutput_1>(fn: (span: import("@openai/agents").Span<import("@openai/agents").AgentSpanData>) => Promise<TOutput_1>, options?: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").AgentSpanData>> | undefined, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined) => Promise<TOutput_1>;
|
|
152
|
+
withFunctionSpan: <TOutput_2>(fn: (span: import("@openai/agents").Span<import("@openai/agents").FunctionSpanData>) => Promise<TOutput_2>, options: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").FunctionSpanData>> & {
|
|
153
|
+
data: {
|
|
154
|
+
name: string;
|
|
155
|
+
};
|
|
156
|
+
}, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined) => Promise<TOutput_2>;
|
|
157
|
+
withHandoffSpan: <TOutput_3>(fn: (span: import("@openai/agents").Span<import("@openai/agents").HandoffSpanData>) => Promise<TOutput_3>, options?: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").HandoffSpanData>> | undefined, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined) => Promise<TOutput_3>;
|
|
158
|
+
withGenerationSpan: <TOutput_4>(fn: (span: import("@openai/agents").Span<import("@openai/agents").GenerationSpanData>) => Promise<TOutput_4>, options?: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").GenerationSpanData>> | undefined, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined) => Promise<TOutput_4>;
|
|
159
|
+
withCustomSpan: <TOutput_5>(fn: (span: import("@openai/agents").Span<import("@openai/agents").CustomSpanData>) => Promise<TOutput_5>, options: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").CustomSpanData>> & {
|
|
160
|
+
data: {
|
|
161
|
+
name: string;
|
|
162
|
+
};
|
|
163
|
+
}, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined) => Promise<TOutput_5>;
|
|
164
|
+
withGuardrailSpan: <TOutput_6>(fn: (span: import("@openai/agents").Span<import("@openai/agents").GuardrailSpanData>) => Promise<TOutput_6>, options: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").GuardrailSpanData>> & {
|
|
165
|
+
data: {
|
|
166
|
+
name: string;
|
|
167
|
+
};
|
|
168
|
+
}, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined) => Promise<TOutput_6>;
|
|
169
|
+
withTranscriptionSpan: <TOutput_7>(fn: (span: import("@openai/agents").Span<import("@openai/agents").TranscriptionSpanData>) => Promise<TOutput_7>, options: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").TranscriptionSpanData>> & {
|
|
170
|
+
data: {
|
|
171
|
+
input: {
|
|
172
|
+
data: string;
|
|
173
|
+
format: (string & {}) | "pcm";
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
}, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined) => Promise<TOutput_7>;
|
|
177
|
+
withSpeechSpan: <TOutput_8>(fn: (span: import("@openai/agents").Span<import("@openai/agents").SpeechSpanData>) => Promise<TOutput_8>, options: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").SpeechSpanData>> & {
|
|
178
|
+
data: {
|
|
179
|
+
output: {
|
|
180
|
+
data: string;
|
|
181
|
+
format: (string & {}) | "pcm";
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
}, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined) => Promise<TOutput_8>;
|
|
185
|
+
withSpeechGroupSpan: <TOutput_9>(fn: (span: import("@openai/agents").Span<import("@openai/agents").SpeechGroupSpanData>) => Promise<TOutput_9>, options?: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").SpeechGroupSpanData>> | undefined, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined) => Promise<TOutput_9>;
|
|
186
|
+
withMCPListToolsSpan: <TOutput_10>(fn: (span: import("@openai/agents").Span<import("@openai/agents").MCPListToolsSpanData>) => Promise<TOutput_10>, options?: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").MCPListToolsSpanData>> | undefined, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined) => Promise<TOutput_10>;
|
|
187
|
+
OpenAIProvider: typeof import("@openai/agents").OpenAIProvider;
|
|
188
|
+
OpenAIResponsesModel: typeof import("@openai/agents").OpenAIResponsesModel;
|
|
189
|
+
OpenAIChatCompletionsModel: typeof import("@openai/agents").OpenAIChatCompletionsModel;
|
|
190
|
+
setDefaultOpenAIClient: typeof import("@openai/agents").setDefaultOpenAIClient;
|
|
191
|
+
setOpenAIAPI: typeof import("@openai/agents").setOpenAIAPI;
|
|
192
|
+
setDefaultOpenAIKey: typeof import("@openai/agents").setDefaultOpenAIKey;
|
|
193
|
+
setTracingExportApiKey: typeof import("@openai/agents").setTracingExportApiKey;
|
|
194
|
+
setDefaultOpenAITracingExporter: typeof import("@openai/agents").setDefaultOpenAITracingExporter;
|
|
195
|
+
OpenAITracingExporter: typeof import("@openai/agents").OpenAITracingExporter;
|
|
196
|
+
webSearchTool: typeof import("@openai/agents").webSearchTool;
|
|
197
|
+
fileSearchTool: typeof import("@openai/agents").fileSearchTool;
|
|
198
|
+
codeInterpreterTool: typeof import("@openai/agents").codeInterpreterTool;
|
|
199
|
+
imageGenerationTool: typeof import("@openai/agents").imageGenerationTool;
|
|
200
|
+
OpenAIConversationsSession: typeof import("@openai/agents").OpenAIConversationsSession;
|
|
201
|
+
startOpenAIConversationsSession: typeof import("@openai/agents").startOpenAIConversationsSession;
|
|
202
|
+
OpenAIResponsesCompactionSession: typeof import("@openai/agents").OpenAIResponsesCompactionSession;
|
|
203
|
+
}>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates a loader which imports one module on the first call and reuses the very same module afterwards
|
|
3
|
+
*
|
|
4
|
+
* Note: [🐌] Heavy third-party dependencies are imported lazily to keep the startup of the Promptbook CLI fast.
|
|
5
|
+
* A statically imported dependency is loaded every single time the bundle is loaded, even when the running
|
|
6
|
+
* command never touches it. A lazily imported dependency is loaded only when the feature is really used.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* const loadJsdomModule = createLazyModuleLoader(() => import('jsdom'));
|
|
10
|
+
* const { JSDOM } = await loadJsdomModule();
|
|
11
|
+
*
|
|
12
|
+
* @private internal utility of Promptbook
|
|
13
|
+
*/
|
|
14
|
+
export declare function createLazyModuleLoader<TModule>(importModule: () => Promise<TModule>): () => Promise<TModule>;
|
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.
|
|
18
|
+
* It follows semantic versioning (e.g., `0.114.0-2`).
|
|
19
19
|
*
|
|
20
20
|
* @generated
|
|
21
21
|
*/
|