@promptbook/cli 0.114.0-1 → 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/README.md +16 -15
- package/apps/agents-server/next.config.ts +11 -0
- package/apps/agents-server/package.json +6 -4
- package/apps/agents-server/playwright.config.ts +28 -38
- package/apps/agents-server/scripts/build-agents-server.js +62 -0
- package/apps/agents-server/scripts/build-e2e.js +38 -0
- package/apps/agents-server/scripts/ensure-root-dependencies.js +86 -0
- package/apps/agents-server/scripts/prerender-homepage.js +1 -1
- package/apps/agents-server/scripts/run-e2e-tests.js +34 -0
- package/apps/agents-server/scripts/run-npm.js +42 -0
- package/apps/agents-server/src/app/admin/email-server/page.tsx +14 -6
- package/apps/agents-server/src/app/api/elevenlabs/tts/route.ts +3 -3
- package/apps/agents-server/src/app/api/onboarding/book/route.ts +7 -6
- package/apps/agents-server/src/app/layout.tsx +6 -0
- package/apps/agents-server/src/app/superadmin/servers/ServersRegistryTable.tsx +105 -102
- package/apps/agents-server/src/app/superadmin/servers/useServersRegistryState.ts +15 -7
- package/apps/agents-server/src/components/AgentProjectDnsInstructions/AgentProjectDnsInstructions.tsx +11 -11
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/ManGoBookEditor.tsx +82 -0
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/WizardShell.tsx +2 -2
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/steps/BookStep.tsx +13 -16
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/steps/ZadaniStep.tsx +4 -4
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/config/bookSections.ts +23 -16
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/lib/bookSource.ts +54 -0
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/services/bookService.ts +15 -8
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/services/createManGoAgentSource.ts +3 -37
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/services/createManGoOpenEditorRequest.ts +1 -1
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/state/OnboardingProvider.tsx +2 -2
- package/apps/agents-server/src/components/UsersList/CreateUserDialog.tsx +13 -22
- package/apps/agents-server/src/components/UsersList/PasswordGeneratorDialog.tsx +216 -0
- package/apps/agents-server/src/components/UsersList/UsersList.tsx +16 -11
- package/apps/agents-server/src/components/UsersList/generateSecurePassword.ts +112 -24
- package/apps/agents-server/src/components/UsersList/userDialogClassNames.ts +11 -0
- package/apps/agents-server/src/languages/ServerTranslationKeys.ts +11 -0
- package/apps/agents-server/src/languages/translations/czech.yaml +11 -0
- package/apps/agents-server/src/languages/translations/english.yaml +11 -0
- package/apps/agents-server/src/utils/agentProjects/agentProjectHrefs.ts +11 -0
- package/apps/agents-server/src/utils/agentProjects/createAgentProjectDnsRecords.ts +53 -7
- package/apps/agents-server/src/utils/agentProjects/createAgentProjectMarkdownReferences.ts +37 -27
- package/apps/agents-server/src/utils/manGoOnboarding/manGoOnboardingAgentBooks.ts +2 -13
- package/apps/agents-server/src/utils/manGoOnboarding/manGoOnboardingAgentRuntime.ts +21 -73
- package/apps/agents-server/src/utils/stalwart/createEmailDnsInstructions.ts +9 -5
- package/apps/agents-server/src/utils/stalwart/readStalwartEmailSnapshot.ts +23 -5
- package/apps/agents-server/src/utils/stalwart/stalwartBootstrap.ts +2 -1
- package/apps/agents-server/src/utils/stalwart/stalwartMailBridge.ts +7 -0
- package/apps/agents-server/tests/e2e/e2eEnvironment.cjs +49 -0
- package/esm/index.es.js +1105 -273
- package/esm/index.es.js.map +1 -1
- package/esm/scripts/run-codex-prompts/common/runGoScript/scriptExecutionLog.d.ts +7 -0
- package/esm/scripts/run-codex-prompts/git/coderGitSync.d.ts +43 -0
- package/esm/scripts/run-codex-prompts/git/commitChanges.d.ts +3 -0
- package/esm/scripts/run-codex-prompts/main/resolvePromptRunner.d.ts +8 -1
- package/esm/scripts/run-codex-prompts/ping/buildCoderPingPrompt.d.ts +20 -0
- package/esm/scripts/run-codex-prompts/ping/extractCoderPingAnswer.d.ts +9 -0
- package/esm/scripts/run-codex-prompts/ping/pingCoderHarness.d.ts +23 -0
- package/esm/scripts/run-codex-prompts/ping/printCoderPingResult.d.ts +5 -0
- package/esm/scripts/run-codex-prompts/prompts/findNextTodoPrompt.d.ts +2 -1
- package/esm/scripts/run-codex-prompts/prompts/isPromptCompatibleWithRunner.d.ts +27 -0
- package/esm/scripts/run-codex-prompts/prompts/listRunnablePrompts.d.ts +2 -1
- package/esm/scripts/run-codex-prompts/prompts/listUpcomingTasks.d.ts +2 -1
- package/esm/scripts/run-codex-prompts/prompts/replacePromptTodoStatusLine.d.ts +7 -0
- package/esm/scripts/run-codex-prompts/testing/TestBeforeMode.d.ts +16 -0
- package/esm/scripts/run-codex-prompts/testing/createTestBeforeRepairPrompt.d.ts +9 -0
- package/esm/scripts/run-codex-prompts/testing/limitTestOutput.d.ts +4 -0
- package/esm/scripts/run-codex-prompts/testing/runPromptTestCommand.d.ts +1 -2
- package/esm/scripts/run-codex-prompts/testing/runTestBefore.d.ts +24 -0
- package/esm/scripts/run-codex-prompts/ui/buildRunUiFrameShared.d.ts +1 -0
- package/esm/scripts/verify-prompts/verify-prompts.d.ts +5 -0
- package/esm/src/book-2.0/book-language-documentation/BookLanguageManualDictionary.d.ts +1 -15
- package/esm/src/book-2.0/book-language-documentation/getBookLanguageManualCommitmentGroups.d.ts +1 -1
- package/esm/src/book-2.0/book-language-documentation/renderCommitmentCatalogSection.d.ts +0 -4
- package/esm/src/book-components/Chat/utils/$provideServerDomWindow.d.ts +11 -0
- package/esm/src/book-components/Chat/utils/renderMarkdown.d.ts +7 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/createAgentsServerRuntimeEnvironment.d.ts +7 -0
- package/esm/src/cli/cli-commands/coder/agentCodingFile.d.ts +2 -3
- package/esm/src/cli/cli-commands/coder/ping.d.ts +10 -0
- package/esm/src/cli/cli-commands/coder/ping.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/coder.d.ts +1 -0
- 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/src/book-2.0/book-language-documentation/BookLanguageManualDictionary.ts +1 -15
- package/src/book-2.0/book-language-documentation/bookLanguageDocumentationExamples.ts +1 -2
- package/src/book-2.0/book-language-documentation/createStandaloneBookLanguageMarkdown.ts +92 -32
- package/src/book-2.0/book-language-documentation/czechBookLanguageManualDictionary.ts +16 -39
- package/src/book-2.0/book-language-documentation/englishBookLanguageManualDictionary.ts +16 -36
- package/src/book-2.0/book-language-documentation/getBookLanguageManualCommitmentGroups.ts +9 -1
- package/src/book-2.0/book-language-documentation/renderCommitmentCatalogSection.ts +4 -51
- package/src/book-2.0/book-language-documentation/renderGroupedCommitmentDocumentationMarkdown.ts +291 -4
- package/src/book-3.0/LiteAgent.ts +11 -9
- package/src/book-components/Chat/utils/$provideServerDomWindow.ts +77 -0
- package/src/book-components/Chat/utils/renderMarkdown.ts +135 -32
- package/src/cli/cli-commands/agents-server/buildAgentsServer/createAgentsServerRuntimeEnvironment.ts +14 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/ensureAgentsServerBuild.ts +1 -0
- package/src/cli/cli-commands/agents-server/startAgentsServer/createLocalAgentRunOptions.ts +1 -0
- package/src/cli/cli-commands/coder/add.ts +40 -12
- package/src/cli/cli-commands/coder/agentCodingFile.ts +6 -129
- package/src/cli/cli-commands/coder/generate-boilerplates.ts +31 -5
- package/src/cli/cli-commands/coder/getDefaultCoderPackageJsonScripts.ts +1 -1
- package/src/cli/cli-commands/coder/init.ts +27 -1
- package/src/cli/cli-commands/coder/initializeCoderProjectConfiguration.ts +1 -4
- package/src/cli/cli-commands/coder/ping.ts +72 -0
- package/src/cli/cli-commands/coder/run.ts +25 -2
- package/src/cli/cli-commands/coder/verify.ts +27 -12
- package/src/cli/cli-commands/coder.ts +4 -0
- package/src/cli/cli-commands/common/coderGitSyncCliOptions.ts +78 -0
- package/src/cli/cli-commands/run/prepareRunCommandResources.ts +2 -1
- package/src/cli/cli-commands/run/resolveRunInputParameters.ts +2 -1
- package/src/cli/cli-commands/runInteractiveChatbot.ts +2 -1
- package/src/cli/common/$provideLlmToolsForCli.ts +2 -1
- package/src/cli/common/loadPromptsModule.ts +13 -0
- package/src/conversion/archive/loadArchive.ts +2 -1
- package/src/conversion/archive/loadJsZipModule.ts +10 -0
- package/src/conversion/archive/saveArchive.ts +2 -1
- package/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.ts +13 -1
- package/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.ts +13 -1
- package/src/llm-providers/openai/OpenAiAgentKitExecutionTools.ts +6 -2
- package/src/llm-providers/openai/OpenAiAgentKitExecutionToolsToolBuilder.ts +7 -5
- package/src/llm-providers/openai/OpenAiAssistantExecutionTools.ts +1 -1
- package/src/llm-providers/openai/OpenAiAssistantExecutionToolsStreamRunner.ts +1 -1
- package/src/llm-providers/openai/OpenAiAssistantExecutionToolsToolRunner.ts +1 -1
- package/src/llm-providers/openai/OpenAiCompatibleNonChatPromptCaller.ts +1 -1
- package/src/llm-providers/openai/OpenAiCompatibleRequestManager.ts +12 -1
- package/src/llm-providers/openai/utils/callOpenAiCompatibleChatModel.ts +1 -1
- package/src/llm-providers/openai/utils/loadOpenAiAgentsModule.ts +11 -0
- package/src/llm-providers/openai/utils/uploadFilesToOpenAi.ts +1 -1
- package/src/other/templates/getTemplatesPipelineCollection.ts +731 -923
- package/src/remote-server/createRemoteClient.ts +12 -1
- package/src/scrapers/website/WebsiteScraper.ts +22 -2
- package/src/utils/agent-message-runtime/resolveAgentMessageRuntimeActivity.ts +101 -0
- package/src/utils/misc/createLazyModuleLoader.ts +27 -0
- package/src/version.ts +2 -2
- package/src/versions.txt +2 -1
- package/umd/index.umd.js +1180 -342
- package/umd/index.umd.js.map +1 -1
- package/umd/scripts/run-codex-prompts/common/runGoScript/scriptExecutionLog.d.ts +7 -0
- package/umd/scripts/run-codex-prompts/git/coderGitSync.d.ts +43 -0
- package/umd/scripts/run-codex-prompts/git/commitChanges.d.ts +3 -0
- package/umd/scripts/run-codex-prompts/main/resolvePromptRunner.d.ts +8 -1
- package/umd/scripts/run-codex-prompts/ping/buildCoderPingPrompt.d.ts +20 -0
- package/umd/scripts/run-codex-prompts/ping/extractCoderPingAnswer.d.ts +9 -0
- package/umd/scripts/run-codex-prompts/ping/pingCoderHarness.d.ts +23 -0
- package/umd/scripts/run-codex-prompts/ping/printCoderPingResult.d.ts +5 -0
- package/umd/scripts/run-codex-prompts/prompts/findNextTodoPrompt.d.ts +2 -1
- package/umd/scripts/run-codex-prompts/prompts/isPromptCompatibleWithRunner.d.ts +27 -0
- package/umd/scripts/run-codex-prompts/prompts/listRunnablePrompts.d.ts +2 -1
- package/umd/scripts/run-codex-prompts/prompts/listUpcomingTasks.d.ts +2 -1
- package/umd/scripts/run-codex-prompts/prompts/replacePromptTodoStatusLine.d.ts +7 -0
- package/umd/scripts/run-codex-prompts/testing/TestBeforeMode.d.ts +16 -0
- package/umd/scripts/run-codex-prompts/testing/createTestBeforeRepairPrompt.d.ts +9 -0
- package/umd/scripts/run-codex-prompts/testing/limitTestOutput.d.ts +4 -0
- package/umd/scripts/run-codex-prompts/testing/runPromptTestCommand.d.ts +1 -2
- package/umd/scripts/run-codex-prompts/testing/runTestBefore.d.ts +24 -0
- package/umd/scripts/run-codex-prompts/ui/buildRunUiFrameShared.d.ts +1 -0
- package/umd/scripts/verify-prompts/verify-prompts.d.ts +5 -0
- package/umd/src/book-2.0/book-language-documentation/BookLanguageManualDictionary.d.ts +1 -15
- package/umd/src/book-2.0/book-language-documentation/getBookLanguageManualCommitmentGroups.d.ts +1 -1
- package/umd/src/book-2.0/book-language-documentation/renderCommitmentCatalogSection.d.ts +0 -4
- package/umd/src/book-components/Chat/utils/$provideServerDomWindow.d.ts +11 -0
- package/umd/src/book-components/Chat/utils/renderMarkdown.d.ts +7 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/createAgentsServerRuntimeEnvironment.d.ts +7 -0
- package/umd/src/cli/cli-commands/coder/agentCodingFile.d.ts +2 -3
- package/umd/src/cli/cli-commands/coder/ping.d.ts +10 -0
- package/umd/src/cli/cli-commands/coder/ping.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/coder.d.ts +1 -0
- 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/apps/agents-server/src/app/api/onboarding/draft/route.ts +0 -23
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/BookLanguagePanel.tsx +0 -125
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/MarkdownBookEditor.tsx +0 -154
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/MarkdownPreview.tsx +0 -188
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/services/draftService.ts +0 -32
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
* Environment variable read by the shell wrapper to tee live output into the temporary runtime log file.
|
|
3
3
|
*/
|
|
4
4
|
export declare const PTBK_CODER_LOG_FILE_ENV_NAME = "PTBK_CODER_LOG_FILE";
|
|
5
|
+
/**
|
|
6
|
+
* Log line which separates the raw script input from the raw script output of one execution section.
|
|
7
|
+
*
|
|
8
|
+
* Readers of a runtime log split on this marker to look only at what the harness really produced,
|
|
9
|
+
* without the generated script and the prompt it embeds.
|
|
10
|
+
*/
|
|
11
|
+
export declare const SCRIPT_EXECUTION_LOG_RAW_OUTPUT_MARKER = "--- raw output ---";
|
|
5
12
|
/**
|
|
6
13
|
* Shapes one bash invocation that optionally mirrors live script output into a temporary log file.
|
|
7
14
|
*/
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Automatic git synchronization of the project changes made by one `ptbk coder` command.
|
|
3
|
+
*
|
|
4
|
+
* Note: This is the single place where pulling, committing and pushing of `ptbk coder` project changes is
|
|
5
|
+
* implemented, every command which offers `--commit`, `--auto-push` and `--auto-pull` reuses it.
|
|
6
|
+
*/
|
|
7
|
+
export type CoderGitSyncOptions = {
|
|
8
|
+
/**
|
|
9
|
+
* Commit the changes made by the command.
|
|
10
|
+
*/
|
|
11
|
+
readonly isCommitEnabled: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Push the created commit to the remote repository.
|
|
14
|
+
*/
|
|
15
|
+
readonly isAutoPushEnabled: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Pull the latest changes from the remote repository before the command changes anything.
|
|
18
|
+
*/
|
|
19
|
+
readonly isAutoPullEnabled: boolean;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Git synchronization which leaves the repository completely untouched.
|
|
23
|
+
*
|
|
24
|
+
* Note: This is the default for every command and helper which supports the git synchronization.
|
|
25
|
+
*/
|
|
26
|
+
export declare const DISABLED_CODER_GIT_SYNC_OPTIONS: CoderGitSyncOptions;
|
|
27
|
+
/**
|
|
28
|
+
* Pulls the latest repository changes before a `ptbk coder` command changes the project.
|
|
29
|
+
*/
|
|
30
|
+
export declare function $pullCoderChanges(options: {
|
|
31
|
+
readonly gitSync: CoderGitSyncOptions;
|
|
32
|
+
readonly projectPath?: string;
|
|
33
|
+
}): Promise<void>;
|
|
34
|
+
/**
|
|
35
|
+
* Commits - and when requested also pushes - the changes one `ptbk coder` command has just made.
|
|
36
|
+
*
|
|
37
|
+
* Note: A repository without any change is left alone instead of creating an empty commit.
|
|
38
|
+
*/
|
|
39
|
+
export declare function $commitCoderChanges(options: {
|
|
40
|
+
readonly gitSync: CoderGitSyncOptions;
|
|
41
|
+
readonly commitMessage: string;
|
|
42
|
+
readonly projectPath?: string;
|
|
43
|
+
}): Promise<void>;
|
|
@@ -4,6 +4,9 @@
|
|
|
4
4
|
* `options.includePaths` can restrict staging, `options.onlyPaths` can restrict the commit pathspec,
|
|
5
5
|
* `options.excludePaths` can keep temporary artifacts out of the created commit and
|
|
6
6
|
* `options.isEmptyCommitAllowed` keeps a round without any file change from failing.
|
|
7
|
+
*
|
|
8
|
+
* Note: The temporary commit message file is written inside the project, so it is always excluded from the commit
|
|
9
|
+
* itself for projects which do not keep the Promptbook temporary directory out of version control.
|
|
7
10
|
*/
|
|
8
11
|
export declare function commitChanges(message: string, options?: {
|
|
9
12
|
autoPush?: boolean;
|
|
@@ -7,6 +7,13 @@ type RunnerMetadata = {
|
|
|
7
7
|
runnerName: string;
|
|
8
8
|
modelName?: string;
|
|
9
9
|
};
|
|
10
|
+
/**
|
|
11
|
+
* Subset of `RunOptions` which decides which prompt runner is created and how it is labeled.
|
|
12
|
+
*
|
|
13
|
+
* Commands that only need one configured harness — such as `ptbk coder ping` — pass just these
|
|
14
|
+
* fields instead of assembling a complete `RunOptions` for a run they never start.
|
|
15
|
+
*/
|
|
16
|
+
export type PromptRunnerSelectionOptions = Pick<RunOptions, 'agentName' | 'model' | 'thinkingLevel' | 'allowCredits' | 'isVerbose' | 'isMachineReadableProgressEnabled'>;
|
|
10
17
|
/**
|
|
11
18
|
* Resolved runner setup used by `runCodexPrompts`.
|
|
12
19
|
*/
|
|
@@ -20,5 +27,5 @@ type PromptRunnerResolution = {
|
|
|
20
27
|
*
|
|
21
28
|
* @private function of runCodexPrompts
|
|
22
29
|
*/
|
|
23
|
-
export declare function resolvePromptRunner(options:
|
|
30
|
+
export declare function resolvePromptRunner(options: PromptRunnerSelectionOptions): PromptRunnerResolution;
|
|
24
31
|
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Marker the pinged harness is asked to prefix its answer with, so the reply can be recognized
|
|
3
|
+
* in the raw runner output of every supported harness.
|
|
4
|
+
*
|
|
5
|
+
* Note: The marker must stay free of regular-expression metacharacters, because
|
|
6
|
+
* `extractCoderPingAnswer` builds its pattern from it.
|
|
7
|
+
*/
|
|
8
|
+
export declare const CODER_PING_ANSWER_MARKER = "PTBK-CODER-PING-ANSWER";
|
|
9
|
+
/**
|
|
10
|
+
* Answer a working harness and model returns for the dummy work of `ptbk coder ping`.
|
|
11
|
+
*/
|
|
12
|
+
export declare const CODER_PING_EXPECTED_ANSWER: string;
|
|
13
|
+
/**
|
|
14
|
+
* Builds the dummy prompt sent by `ptbk coder ping`.
|
|
15
|
+
*
|
|
16
|
+
* The work is intentionally the smallest possible one that still reaches the model: it spends a
|
|
17
|
+
* negligible amount of the harness quota, it needs no tool and it explicitly forbids touching the
|
|
18
|
+
* project, so a ping leaves the project exactly as it was.
|
|
19
|
+
*/
|
|
20
|
+
export declare function buildCoderPingPrompt(): string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Extracts the answer of a pinged harness from the runtime log of its runner shell.
|
|
3
|
+
*
|
|
4
|
+
* Only the raw output of the last execution is searched, so the answer marker contained in the
|
|
5
|
+
* prompt of the raw input is never mistaken for the answer of the harness.
|
|
6
|
+
*
|
|
7
|
+
* @returns The answer of the harness, or `null` when the harness produced no recognizable answer
|
|
8
|
+
*/
|
|
9
|
+
export declare function extractCoderPingAnswer(runtimeLog: string): string | null;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { PromptRunnerSelectionOptions } from '../main/resolvePromptRunner';
|
|
2
|
+
import type { CoderPingResult } from './CoderPingResult';
|
|
3
|
+
/**
|
|
4
|
+
* Options for one `ptbk coder ping` round trip.
|
|
5
|
+
*/
|
|
6
|
+
export type PingCoderHarnessOptions = PromptRunnerSelectionOptions & {
|
|
7
|
+
/**
|
|
8
|
+
* Project the harness is started in. Defaults to the current working directory.
|
|
9
|
+
*/
|
|
10
|
+
readonly projectPath?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Mirrors the live harness output to the terminal instead of only reporting the compact result.
|
|
13
|
+
*/
|
|
14
|
+
readonly shouldPrintLiveOutput?: boolean;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Sends one tiny dummy prompt through the selected harness and model and measures the round trip.
|
|
18
|
+
*
|
|
19
|
+
* The ping reuses the very same runner the coding queue uses, so it really exercises the configured
|
|
20
|
+
* harness, model, thinking level and authentication — including the retry behavior on rate limits.
|
|
21
|
+
* Both temporary artifacts it creates are removed again, so the project is left as it was.
|
|
22
|
+
*/
|
|
23
|
+
export declare function pingCoderHarness(options: PingCoderHarnessOptions): Promise<CoderPingResult>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { PromptFile } from './types/PromptFile';
|
|
2
2
|
import type { PromptSelection } from './types/PromptSelection';
|
|
3
|
+
import type { PromptRunnerIdentity } from './isPromptCompatibleWithRunner';
|
|
3
4
|
import type { PriorityFilter } from './priorityFilter';
|
|
4
5
|
/**
|
|
5
6
|
* Selects the next runnable prompt based on priority.
|
|
6
7
|
*/
|
|
7
|
-
export declare function findNextTodoPrompt(files: PromptFile[], priorityFilter?: PriorityFilter): PromptSelection | undefined;
|
|
8
|
+
export declare function findNextTodoPrompt(files: PromptFile[], priorityFilter?: PriorityFilter, promptRunnerIdentity?: PromptRunnerIdentity): PromptSelection | undefined;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { PromptFile } from './types/PromptFile';
|
|
2
|
+
import type { PromptSection } from './types/PromptSection';
|
|
3
|
+
/**
|
|
4
|
+
* Names of the harness and model currently selected for a coder run.
|
|
5
|
+
*/
|
|
6
|
+
export type PromptRunnerIdentity = {
|
|
7
|
+
/**
|
|
8
|
+
* Stable harness identifier, for example `github-copilot`.
|
|
9
|
+
*/
|
|
10
|
+
readonly harnessName?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Effective model identifier, for example `gpt-5.5`.
|
|
13
|
+
*/
|
|
14
|
+
readonly modelName?: string;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Checks whether a prompt is unrestricted or matches the selected harness/model.
|
|
18
|
+
*
|
|
19
|
+
* A prompt status line can contain one or more backtick-delimited model or harness
|
|
20
|
+
* names. Matching is intentionally based on normalized substrings so a token such as
|
|
21
|
+
* `gpt` selects any `gpt-*` model and `opus` selects a `claude-opus-*` model.
|
|
22
|
+
*/
|
|
23
|
+
export declare function isPromptCompatibleWithRunner(file: PromptFile, section: PromptSection, promptRunnerIdentity?: PromptRunnerIdentity): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Extracts model and harness tokens from a prompt status line.
|
|
26
|
+
*/
|
|
27
|
+
export declare function extractPromptRunnerTokens(statusLine: string): string[];
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { PromptFile } from './types/PromptFile';
|
|
2
2
|
import type { PromptSelection } from './types/PromptSelection';
|
|
3
|
+
import { type PromptRunnerIdentity } from './isPromptCompatibleWithRunner';
|
|
3
4
|
import type { PriorityFilter } from './priorityFilter';
|
|
4
5
|
/**
|
|
5
6
|
* Lists todo prompts that are ready to run (no authoring placeholders).
|
|
6
7
|
*/
|
|
7
|
-
export declare function listRunnablePrompts(files: PromptFile[], priorityFilter?: PriorityFilter): PromptSelection[];
|
|
8
|
+
export declare function listRunnablePrompts(files: PromptFile[], priorityFilter?: PriorityFilter, promptRunnerIdentity?: PromptRunnerIdentity): PromptSelection[];
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { PromptFile } from './types/PromptFile';
|
|
2
2
|
import type { UpcomingTask } from './types/UpcomingTask';
|
|
3
|
+
import type { PromptRunnerIdentity } from './isPromptCompatibleWithRunner';
|
|
3
4
|
import type { PriorityFilter } from './priorityFilter';
|
|
4
5
|
/**
|
|
5
6
|
* Lists upcoming tasks that are ready to run (no authoring placeholders).
|
|
6
7
|
*/
|
|
7
|
-
export declare function listUpcomingTasks(files: PromptFile[], priorityFilter?: PriorityFilter): UpcomingTask[];
|
|
8
|
+
export declare function listUpcomingTasks(files: PromptFile[], priorityFilter?: PriorityFilter, promptRunnerIdentity?: PromptRunnerIdentity): UpcomingTask[];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Replaces the complete todo status line while preserving its indentation.
|
|
3
|
+
*
|
|
4
|
+
* The complete line is replaced because a todo status can contain a required
|
|
5
|
+
* model/harness token in addition to priority markers.
|
|
6
|
+
*/
|
|
7
|
+
export declare function replacePromptTodoStatusLine(line: string, replacementStatusLine: string): string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Modes supported by `ptbk coder run --test-before`.
|
|
3
|
+
*/
|
|
4
|
+
export declare const TEST_BEFORE_MODE_VALUES: readonly ["no", "yes-and-fail", "yes-and-fix"];
|
|
5
|
+
/**
|
|
6
|
+
* Behavior requested for the pre-coding verification run.
|
|
7
|
+
*/
|
|
8
|
+
export type TestBeforeMode = (typeof TEST_BEFORE_MODE_VALUES)[number];
|
|
9
|
+
/**
|
|
10
|
+
* Default verification command used when a pre-coding mode is enabled without an explicit `--test` command.
|
|
11
|
+
*/
|
|
12
|
+
export declare const DEFAULT_CODER_TEST_COMMAND = "npm test";
|
|
13
|
+
/**
|
|
14
|
+
* Checks whether a value is a supported `--test-before` mode.
|
|
15
|
+
*/
|
|
16
|
+
export declare function isTestBeforeMode(value: string): value is TestBeforeMode;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { PromptSelection } from '../prompts/types/PromptSelection';
|
|
2
|
+
/**
|
|
3
|
+
* Creates the one queue prompt used to repair a pre-existing test failure.
|
|
4
|
+
*/
|
|
5
|
+
export declare function createTestBeforeRepairPrompt(options: {
|
|
6
|
+
readonly projectPath: string;
|
|
7
|
+
readonly testCommand: string;
|
|
8
|
+
readonly testOutput: string;
|
|
9
|
+
}): Promise<PromptSelection>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Options for running one verification command after a coding attempt.
|
|
3
3
|
*/
|
|
4
|
-
type RunPromptTestCommandOptions = {
|
|
4
|
+
export type RunPromptTestCommandOptions = {
|
|
5
5
|
command: string;
|
|
6
6
|
projectPath: string;
|
|
7
7
|
scriptPath: string;
|
|
@@ -12,4 +12,3 @@ type RunPromptTestCommandOptions = {
|
|
|
12
12
|
* Runs the configured verification command inside the project root and returns its output.
|
|
13
13
|
*/
|
|
14
14
|
export declare function runPromptTestCommand(options: RunPromptTestCommandOptions): Promise<string>;
|
|
15
|
-
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { WaitForCoderRunPauseCheckpoint } from '../common/CoderRunPauseCheckpoint';
|
|
2
|
+
import { runPromptTestCommand } from './runPromptTestCommand';
|
|
3
|
+
/**
|
|
4
|
+
* Result of the verification command executed before coding starts.
|
|
5
|
+
*/
|
|
6
|
+
export type TestBeforeResult = {
|
|
7
|
+
/**
|
|
8
|
+
* Whether the verification command completed successfully.
|
|
9
|
+
*/
|
|
10
|
+
readonly isPassed: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Combined output produced by the verification command.
|
|
13
|
+
*/
|
|
14
|
+
readonly testOutput: string;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Runs the configured verification command before the first coding prompt.
|
|
18
|
+
*/
|
|
19
|
+
export declare function runTestBefore(options: {
|
|
20
|
+
readonly testCommand: string;
|
|
21
|
+
readonly projectPath: string;
|
|
22
|
+
readonly waitForPauseCheckpoint?: WaitForCoderRunPauseCheckpoint;
|
|
23
|
+
readonly runPromptTestCommandExecutor?: typeof runPromptTestCommand;
|
|
24
|
+
}): Promise<TestBeforeResult>;
|
|
@@ -67,6 +67,7 @@ export declare function buildControlPills(options: {
|
|
|
67
67
|
* Builds the coder-run control pills shown in the footer box.
|
|
68
68
|
*/
|
|
69
69
|
export declare function buildCoderRunControlPills(options: {
|
|
70
|
+
readonly phase: CoderRunPhase;
|
|
70
71
|
readonly pauseControl: string;
|
|
71
72
|
readonly pendingEnterLabel: string | undefined;
|
|
72
73
|
readonly isEndAfterCurrentPromptRequested: boolean;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { CoderGitSyncOptions } from '../run-codex-prompts/git/coderGitSync';
|
|
1
2
|
import type { PromptFile } from '../run-codex-prompts/prompts/types/PromptFile';
|
|
2
3
|
/**
|
|
3
4
|
* Options supported by the prompt verification helper.
|
|
@@ -11,6 +12,10 @@ export type VerifyPromptsOptions = {
|
|
|
11
12
|
* Ignore prompt files whose filename or first prompt line contains one of the provided values.
|
|
12
13
|
*/
|
|
13
14
|
readonly ignore?: ReadonlyArray<string>;
|
|
15
|
+
/**
|
|
16
|
+
* Automatic git synchronization applied around each single verification.
|
|
17
|
+
*/
|
|
18
|
+
readonly gitSync?: CoderGitSyncOptions;
|
|
14
19
|
};
|
|
15
20
|
/**
|
|
16
21
|
* Starts the verification loop and exits when no `[ ]` prompts remain.
|
|
@@ -86,9 +86,7 @@ export type BookLanguageManualDictionary = {
|
|
|
86
86
|
readonly metadataLabels: {
|
|
87
87
|
readonly bookLanguageVersion: string;
|
|
88
88
|
readonly generatedAt: string;
|
|
89
|
-
readonly
|
|
90
|
-
readonly implementedCommitments: string;
|
|
91
|
-
readonly placeholderCommitments: string;
|
|
89
|
+
readonly commitmentCount: string;
|
|
92
90
|
};
|
|
93
91
|
/**
|
|
94
92
|
* Heading of the table of contents.
|
|
@@ -128,7 +126,6 @@ export type BookLanguageManualDictionary = {
|
|
|
128
126
|
readonly primitivesSections: {
|
|
129
127
|
readonly coreSyntax: BookLanguageManualChapter;
|
|
130
128
|
readonly references: BookLanguageManualChapter;
|
|
131
|
-
readonly keywordsTitle: string;
|
|
132
129
|
};
|
|
133
130
|
/**
|
|
134
131
|
* Suffixes distinguishing a server-specific catalog from the portable one.
|
|
@@ -141,18 +138,7 @@ export type BookLanguageManualDictionary = {
|
|
|
141
138
|
* Labels used in every commitment catalog entry.
|
|
142
139
|
*/
|
|
143
140
|
readonly commitmentLabels: {
|
|
144
|
-
readonly status: string;
|
|
145
141
|
readonly aliases: string;
|
|
146
|
-
readonly semantics: string;
|
|
147
|
-
readonly typeSchema: string;
|
|
148
|
-
readonly blockSchema: string;
|
|
149
|
-
readonly lowLevelNotice: string;
|
|
150
|
-
readonly usage: string;
|
|
151
|
-
readonly usageOccurrence: string;
|
|
152
|
-
readonly usageOccurrences: string;
|
|
153
|
-
readonly statusImplemented: string;
|
|
154
|
-
readonly statusPlaceholder: string;
|
|
155
|
-
readonly noAliases: string;
|
|
156
142
|
};
|
|
157
143
|
/**
|
|
158
144
|
* Labels used by end-to-end example sections.
|
package/esm/src/book-2.0/book-language-documentation/getBookLanguageManualCommitmentGroups.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export type BookLanguageManualCommitmentGroups = {
|
|
|
16
16
|
*/
|
|
17
17
|
readonly documented: ReadonlyArray<BookLanguageManualCommitmentGroup>;
|
|
18
18
|
/**
|
|
19
|
-
* Low-level
|
|
19
|
+
* Low-level commitments documented in their own closing chapter.
|
|
20
20
|
*/
|
|
21
21
|
readonly lowLevel: ReadonlyArray<BookLanguageManualCommitmentGroup>;
|
|
22
22
|
};
|
|
@@ -10,10 +10,6 @@ export type RenderCommitmentCatalogSectionOptions = {
|
|
|
10
10
|
* Grouped commitment definition with aliases.
|
|
11
11
|
*/
|
|
12
12
|
readonly groupedCommitment: BookLanguageManualCommitmentGroup;
|
|
13
|
-
/**
|
|
14
|
-
* Number of uses across the selected server agents.
|
|
15
|
-
*/
|
|
16
|
-
readonly usageCount: number;
|
|
17
13
|
/**
|
|
18
14
|
* Translated labels of the manual.
|
|
19
15
|
*/
|
|
@@ -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;
|
|
@@ -25,6 +25,13 @@ export type MarkdownInlineReference = {
|
|
|
25
25
|
* Link target for the rendered reference.
|
|
26
26
|
*/
|
|
27
27
|
readonly href: string;
|
|
28
|
+
/**
|
|
29
|
+
* Markdown link destination prefixes that should render as this reference as well.
|
|
30
|
+
*
|
|
31
|
+
* This supports legacy links such as an Agents Server project file URL while keeping
|
|
32
|
+
* `reference` as the canonical `[[project]]` token.
|
|
33
|
+
*/
|
|
34
|
+
readonly sourceHrefPrefixes?: ReadonlyArray<string>;
|
|
28
35
|
/**
|
|
29
36
|
* Optional hover title for the rendered reference.
|
|
30
37
|
*/
|
|
@@ -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,3 +1,4 @@
|
|
|
1
|
+
import { string_markdown } from '../../../types/typeAliases';
|
|
1
2
|
/**
|
|
2
3
|
* Relative path to the Promptbook Coder quick-reference file initialized in project roots.
|
|
3
4
|
*
|
|
@@ -9,6 +10,4 @@ export declare const AGENT_CODING_FILE_PATH = "AGENT_CODING.md";
|
|
|
9
10
|
*
|
|
10
11
|
* @private internal utility of `ptbk coder`
|
|
11
12
|
*/
|
|
12
|
-
export declare function getDefaultCoderAgentCodingFileContent(
|
|
13
|
-
readonly packageJsonScripts: Readonly<Record<string, string>>;
|
|
14
|
-
}): string;
|
|
13
|
+
export declare function getDefaultCoderAgentCodingFileContent(): string_markdown;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Command as Program } from 'commander';
|
|
2
|
+
import type { $side_effect } from '../../../utils/organization/$side_effect';
|
|
3
|
+
/**
|
|
4
|
+
* Initializes `coder ping` command for Promptbook CLI utilities
|
|
5
|
+
*
|
|
6
|
+
* Note: `$` is used to indicate that this function is not a pure function - it registers a command in the CLI
|
|
7
|
+
*
|
|
8
|
+
* @private internal function of `promptbookCli`
|
|
9
|
+
*/
|
|
10
|
+
export declare function $initializeCoderPingCommand(program: Program): $side_effect;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -9,6 +9,7 @@ import type { $side_effect } from '../../utils/organization/$side_effect';
|
|
|
9
9
|
* - generate-boilerplates: Generate prompt boilerplate files
|
|
10
10
|
* - find-refactor-candidates: Find files that need refactoring
|
|
11
11
|
* - run: Run coding prompts with AI agents
|
|
12
|
+
* - ping: Test one harness and model with a tiny dummy prompt
|
|
12
13
|
* - verify: Verify completed prompts
|
|
13
14
|
* - find-fresh-emoji-tags: Find unused emoji tags
|
|
14
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.
|