@promptbook/types 0.112.0-98 → 0.112.0

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.
Files changed (152) hide show
  1. package/README.md +37 -21
  2. package/esm/src/_packages/components.index.d.ts +4 -0
  3. package/esm/src/_packages/core.index.d.ts +0 -2
  4. package/esm/src/_packages/node.index.d.ts +40 -0
  5. package/esm/src/_packages/types.index.d.ts +18 -0
  6. package/esm/src/avatars/avatarAnimationScheduler.d.ts +4 -0
  7. package/esm/src/avatars/types/AvatarVisualDefinition.d.ts +1 -1
  8. package/esm/src/avatars/visuals/octopus3d3AvatarVisual.d.ts +7 -0
  9. package/esm/src/avatars/visuals/octopus3d4AvatarVisual.d.ts +7 -0
  10. package/esm/src/book-3.0/BookNodeAgentSource.d.ts +38 -0
  11. package/esm/src/book-3.0/CliAgent.d.ts +66 -0
  12. package/esm/src/book-3.0/CliAgent.test.d.ts +1 -0
  13. package/esm/src/book-3.0/LiteAgent.d.ts +68 -0
  14. package/esm/src/book-3.0/LiteAgent.test.d.ts +1 -0
  15. package/esm/src/book-3.0/agentFolderPaths.d.ts +30 -0
  16. package/esm/src/book-3.0/cliAgentEnv.d.ts +33 -0
  17. package/esm/src/book-components/BookEditor/BookEditor.d.ts +6 -5
  18. package/esm/src/book-components/BookEditor/BookEditorAboutPromptbookInformation.d.ts +12 -0
  19. package/esm/src/book-components/BookEditor/BookEditorBrowserConfig.d.ts +2 -0
  20. package/esm/src/book-components/BookEditor/BookEditorForClient.d.ts +7 -0
  21. package/esm/src/book-components/BookEditor/BookEditorMonacoTokenization.d.ts +1 -0
  22. package/esm/src/book-components/BookEditor/BookEditorTheme.d.ts +24 -0
  23. package/esm/src/book-components/BookEditor/createDeprecatedCommitmentDiagnostics.browser.d.ts +9 -0
  24. package/esm/src/book-components/BookEditor/useBookEditorMonacoLanguage.d.ts +1 -6
  25. package/esm/src/book-components/BookEditor/useBookEditorMonacoLifecycle.d.ts +1 -4
  26. package/esm/src/book-components/BookEditor/useBookEditorMonacoStyles.d.ts +2 -1
  27. package/esm/src/book-components/Chat/Chat/ChatCitationModal.d.ts +2 -0
  28. package/esm/src/book-components/Chat/Chat/ChatMessageItem.d.ts +4 -0
  29. package/esm/src/book-components/Chat/Chat/ChatMessageList.d.ts +4 -0
  30. package/esm/src/book-components/Chat/Chat/ChatProps.d.ts +5 -0
  31. package/esm/src/book-components/Chat/Chat/ChatToolCallModal.d.ts +2 -0
  32. package/esm/src/book-components/Chat/Chat/ChatToolCallModalContent.d.ts +3 -1
  33. package/esm/src/book-components/Chat/Chat/CitationIframePreview.d.ts +20 -0
  34. package/esm/src/book-components/Chat/Chat/TeamToolCallModalContent.d.ts +2 -0
  35. package/esm/src/book-components/Chat/MarkdownContent/MarkdownContent.d.ts +1 -0
  36. package/esm/src/book-components/Chat/SourceChip/SourceChip.d.ts +6 -1
  37. package/esm/src/book-components/Chat/hooks/useResolvedCitationLabel.d.ts +12 -0
  38. package/esm/src/book-components/Chat/types/ChatMessage.d.ts +4 -0
  39. package/esm/src/book-components/Chat/types/ChatParticipant.d.ts +1 -1
  40. package/esm/src/book-components/Chat/types/CitationLabelResolver.d.ts +8 -0
  41. package/esm/src/book-components/Chat/utils/citationHelpers.d.ts +9 -0
  42. package/esm/src/book-components/Chat/utils/decodeJsonUnicodeEscapesInMarkdownText.d.ts +14 -0
  43. package/esm/src/book-components/Chat/utils/decodeJsonUnicodeEscapesInMarkdownText.test.d.ts +1 -0
  44. package/esm/src/book-components/Chat/utils/isVisibleChatToolCall.d.ts +10 -0
  45. package/esm/src/book-components/Chat/utils/parseCitationsFromContent.d.ts +4 -0
  46. package/esm/src/book-components/_common/Dropdown/Dropdown.d.ts +1 -1
  47. package/esm/src/book-components/_common/MenuHoisting/MenuHoistingContext.d.ts +1 -1
  48. package/esm/src/book-components/_common/Modal/Modal.d.ts +1 -1
  49. package/esm/src/book-components/icons/AboutIcon.d.ts +1 -1
  50. package/esm/src/book-components/icons/DownloadIcon.d.ts +1 -1
  51. package/esm/src/book-components/icons/ExitFullscreenIcon.d.ts +1 -1
  52. package/esm/src/book-components/icons/FullscreenIcon.d.ts +1 -1
  53. package/esm/src/cli/cli-commands/agent/agentCliOptions.d.ts +38 -0
  54. package/esm/src/cli/cli-commands/agent/chat.d.ts +10 -0
  55. package/esm/src/cli/cli-commands/agent/exec.d.ts +10 -0
  56. package/esm/src/cli/cli-commands/agent/run.test.d.ts +1 -0
  57. package/esm/src/cli/cli-commands/agent-folder/agentProjectPaths.d.ts +2 -24
  58. package/esm/src/cli/cli-commands/agent.d.ts +14 -0
  59. package/esm/src/cli/cli-commands/agents-server/buildAgentsServer.d.ts +17 -1
  60. package/esm/src/cli/cli-commands/agents-server/run.d.ts +6 -0
  61. package/esm/src/cli/cli-commands/agents-server/startAgentsServer.d.ts +9 -2
  62. package/esm/src/cli/cli-commands/coder/ThinkingLevel.d.ts +1 -1
  63. package/esm/src/cli/cli-commands/coder/ensureCoderDeveloperAgentFile.d.ts +25 -0
  64. package/esm/src/cli/cli-commands/coder/find-unwritten.d.ts +10 -0
  65. package/esm/src/cli/cli-commands/coder/initializeCoderProjectConfiguration.d.ts +2 -0
  66. package/esm/src/cli/cli-commands/coder/server.d.ts +13 -0
  67. package/esm/src/cli/cli-commands/coder/waitOptions.d.ts +14 -0
  68. package/esm/src/cli/cli-commands/common/promptRunnerCliOptions.d.ts +9 -25
  69. package/esm/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +22 -0
  70. package/esm/src/commitments/_common/teamInternalAgentAccess.d.ts +9 -1
  71. package/esm/src/llm-providers/_common/register/$provideLlmToolsConfigurationFromEnv.d.ts +1 -1
  72. package/esm/src/llm-providers/_common/register/$provideLlmToolsFromEnv.d.ts +1 -1
  73. package/esm/src/scrapers/website/utils/createShowdownConverter.d.ts +2 -2
  74. package/esm/src/utils/isTimingSafeEqualString.d.ts +25 -0
  75. package/esm/src/utils/validators/url/isValidAgentUrl.d.ts +5 -0
  76. package/esm/src/version.d.ts +1 -1
  77. package/package.json +2 -2
  78. package/umd/src/_packages/components.index.d.ts +4 -0
  79. package/umd/src/_packages/core.index.d.ts +0 -2
  80. package/umd/src/_packages/node.index.d.ts +40 -0
  81. package/umd/src/_packages/types.index.d.ts +18 -0
  82. package/umd/src/avatars/avatarAnimationScheduler.d.ts +4 -0
  83. package/umd/src/avatars/types/AvatarVisualDefinition.d.ts +1 -1
  84. package/umd/src/avatars/visuals/octopus3d3AvatarVisual.d.ts +7 -0
  85. package/umd/src/avatars/visuals/octopus3d4AvatarVisual.d.ts +7 -0
  86. package/umd/src/book-3.0/BookNodeAgentSource.d.ts +38 -0
  87. package/umd/src/book-3.0/CliAgent.d.ts +66 -0
  88. package/umd/src/book-3.0/CliAgent.test.d.ts +1 -0
  89. package/umd/src/book-3.0/LiteAgent.d.ts +68 -0
  90. package/umd/src/book-3.0/LiteAgent.test.d.ts +1 -0
  91. package/umd/src/book-3.0/agentFolderPaths.d.ts +30 -0
  92. package/umd/src/book-3.0/cliAgentEnv.d.ts +33 -0
  93. package/umd/src/book-components/BookEditor/BookEditor.d.ts +6 -5
  94. package/umd/src/book-components/BookEditor/BookEditorAboutPromptbookInformation.d.ts +12 -0
  95. package/umd/src/book-components/BookEditor/BookEditorBrowserConfig.d.ts +2 -0
  96. package/umd/src/book-components/BookEditor/BookEditorForClient.d.ts +7 -0
  97. package/umd/src/book-components/BookEditor/BookEditorMonacoTokenization.d.ts +1 -0
  98. package/umd/src/book-components/BookEditor/BookEditorTheme.d.ts +24 -0
  99. package/umd/src/book-components/BookEditor/createDeprecatedCommitmentDiagnostics.browser.d.ts +9 -0
  100. package/umd/src/book-components/BookEditor/useBookEditorMonacoLanguage.d.ts +1 -6
  101. package/umd/src/book-components/BookEditor/useBookEditorMonacoLifecycle.d.ts +1 -4
  102. package/umd/src/book-components/BookEditor/useBookEditorMonacoStyles.d.ts +2 -1
  103. package/umd/src/book-components/Chat/Chat/ChatCitationModal.d.ts +2 -0
  104. package/umd/src/book-components/Chat/Chat/ChatMessageItem.d.ts +4 -0
  105. package/umd/src/book-components/Chat/Chat/ChatMessageList.d.ts +4 -0
  106. package/umd/src/book-components/Chat/Chat/ChatProps.d.ts +5 -0
  107. package/umd/src/book-components/Chat/Chat/ChatToolCallModal.d.ts +2 -0
  108. package/umd/src/book-components/Chat/Chat/ChatToolCallModalContent.d.ts +3 -1
  109. package/umd/src/book-components/Chat/Chat/CitationIframePreview.d.ts +20 -0
  110. package/umd/src/book-components/Chat/Chat/TeamToolCallModalContent.d.ts +2 -0
  111. package/umd/src/book-components/Chat/MarkdownContent/MarkdownContent.d.ts +1 -0
  112. package/umd/src/book-components/Chat/SourceChip/SourceChip.d.ts +6 -1
  113. package/umd/src/book-components/Chat/hooks/useResolvedCitationLabel.d.ts +12 -0
  114. package/umd/src/book-components/Chat/types/ChatMessage.d.ts +4 -0
  115. package/umd/src/book-components/Chat/types/ChatParticipant.d.ts +1 -1
  116. package/umd/src/book-components/Chat/types/CitationLabelResolver.d.ts +8 -0
  117. package/umd/src/book-components/Chat/utils/citationHelpers.d.ts +9 -0
  118. package/umd/src/book-components/Chat/utils/decodeJsonUnicodeEscapesInMarkdownText.d.ts +14 -0
  119. package/umd/src/book-components/Chat/utils/decodeJsonUnicodeEscapesInMarkdownText.test.d.ts +1 -0
  120. package/umd/src/book-components/Chat/utils/isVisibleChatToolCall.d.ts +10 -0
  121. package/umd/src/book-components/Chat/utils/parseCitationsFromContent.d.ts +4 -0
  122. package/umd/src/book-components/_common/Dropdown/Dropdown.d.ts +1 -1
  123. package/umd/src/book-components/_common/MenuHoisting/MenuHoistingContext.d.ts +1 -1
  124. package/umd/src/book-components/_common/Modal/Modal.d.ts +1 -1
  125. package/umd/src/book-components/icons/AboutIcon.d.ts +1 -1
  126. package/umd/src/book-components/icons/DownloadIcon.d.ts +1 -1
  127. package/umd/src/book-components/icons/ExitFullscreenIcon.d.ts +1 -1
  128. package/umd/src/book-components/icons/FullscreenIcon.d.ts +1 -1
  129. package/umd/src/cli/cli-commands/agent/agentCliOptions.d.ts +38 -0
  130. package/umd/src/cli/cli-commands/agent/chat.d.ts +10 -0
  131. package/umd/src/cli/cli-commands/agent/exec.d.ts +10 -0
  132. package/umd/src/cli/cli-commands/agent/run.test.d.ts +1 -0
  133. package/umd/src/cli/cli-commands/agent-folder/agentProjectPaths.d.ts +2 -24
  134. package/umd/src/cli/cli-commands/agent.d.ts +14 -0
  135. package/umd/src/cli/cli-commands/agents-server/buildAgentsServer.d.ts +17 -1
  136. package/umd/src/cli/cli-commands/agents-server/run.d.ts +6 -0
  137. package/umd/src/cli/cli-commands/agents-server/startAgentsServer.d.ts +9 -2
  138. package/umd/src/cli/cli-commands/coder/ThinkingLevel.d.ts +1 -1
  139. package/umd/src/cli/cli-commands/coder/ensureCoderDeveloperAgentFile.d.ts +25 -0
  140. package/umd/src/cli/cli-commands/coder/find-unwritten.d.ts +10 -0
  141. package/umd/src/cli/cli-commands/coder/initializeCoderProjectConfiguration.d.ts +2 -0
  142. package/umd/src/cli/cli-commands/coder/server.d.ts +13 -0
  143. package/umd/src/cli/cli-commands/coder/waitOptions.d.ts +14 -0
  144. package/umd/src/cli/cli-commands/common/promptRunnerCliOptions.d.ts +9 -25
  145. package/umd/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +22 -0
  146. package/umd/src/commitments/_common/teamInternalAgentAccess.d.ts +9 -1
  147. package/umd/src/llm-providers/_common/register/$provideLlmToolsConfigurationFromEnv.d.ts +1 -1
  148. package/umd/src/llm-providers/_common/register/$provideLlmToolsFromEnv.d.ts +1 -1
  149. package/umd/src/scrapers/website/utils/createShowdownConverter.d.ts +2 -2
  150. package/umd/src/utils/isTimingSafeEqualString.d.ts +25 -0
  151. package/umd/src/utils/validators/url/isValidAgentUrl.d.ts +5 -0
  152. package/umd/src/version.d.ts +1 -1
package/README.md CHANGED
@@ -27,11 +27,27 @@ Create persistent AI agents that turn your company's scattered knowledge into ac
27
27
 
28
28
 
29
29
 
30
+ ### Standalone VPS
31
+
32
+ Run the standalone VPS installer only on a fresh server. Interactive mode asks for the installation values:
33
+
34
+ ```bash
35
+ sudo curl -fsSL https://raw.githubusercontent.com/webgptorg/promptbook/refs/heads/main/other/vps/install.sh | bash
36
+ ```
37
+
38
+ Non-interactive mode takes defaults from command-line options. When `--openai-api-key` is provided with the default OpenAI Codex runner, the installer installs and configures Codex automatically; other runner authentication can be configured later from the UI or SSH:
39
+
40
+ ```bash
41
+ sudo curl -fsSL https://raw.githubusercontent.com/webgptorg/promptbook/refs/heads/main/other/vps/install.sh | bash -s -- \
42
+ --non-interactive \
43
+ --yes-i-understand-that-script-should-be-run-on-fresh-server \
44
+ --domain s24.ptbk.io \
45
+ --openai-api-key sk-proj-abcdef \
46
+ --sentry-dsn https://abc@def.ingest.de.sentry.io/123 \
47
+ --admin-password xxx
48
+ ```
30
49
 
31
50
 
32
- <blockquote style="color: #ff8811">
33
- <b>⚠ Warning:</b> This is a pre-release version of the library. It is not yet ready for production use. Please look at <a href="https://www.npmjs.com/package/@promptbook/core?activeTab=versions">latest stable release</a>.
34
- </blockquote>
35
51
 
36
52
  ## 📦 Package `@promptbook/types`
37
53
 
@@ -666,9 +682,9 @@ Prompts marked with `[-]` are not ready yet, prompts containing `@@@` are treate
666
682
  #### Features
667
683
 
668
684
  - **Multi-runner execution:** `openai-codex`, `github-copilot`, `cline`, `claude-code`, `opencode`, `gemini`
669
- - **Context injection:** `--context AGENTS.md` or inline extra instructions
685
+ - **Context injection:** `--agent agents/coding/developer.book --context AGENTS.md` or inline extra instructions
670
686
  - **Reasoning control:** `--thinking-level low|medium|high|xhigh` for supported runners
671
- - **Interactive or unattended runs:** default wait mode, or `--no-wait` for batch execution
687
+ - **Unattended or interactive runs:** default auto mode, or `--no-auto` to wait for user confirmation before each prompt
672
688
  - **Git safety:** clean working tree check by default, optional `--ignore-git-changes`
673
689
  - **Opt-in remote pushes:** commits stay local unless you explicitly pass `--auto-push`
674
690
  - **Prompt triage:** `--priority` to process only more important tasks first
@@ -686,11 +702,11 @@ npx ts-node ./src/cli/test/ptbk.ts coder generate-boilerplates --template prompt
686
702
 
687
703
  npx ts-node ./src/cli/test/ptbk.ts coder generate-boilerplates --template prompts/templates/agents-server.md
688
704
 
689
- npx ts-node ./src/cli/test/ptbk.ts coder run --agent github-copilot --model gpt-5.4 --thinking-level xhigh --context AGENTS.md
705
+ npx ts-node ./src/cli/test/ptbk.ts coder run --harness github-copilot --model gpt-5.4 --thinking-level xhigh --agent agents/coding/developer.book --context AGENTS.md
690
706
 
691
- npx ts-node ./src/cli/test/ptbk.ts coder run --agent github-copilot --model gpt-5.4 --thinking-level xhigh --context AGENTS.md --auto-push
707
+ npx ts-node ./src/cli/test/ptbk.ts coder run --harness github-copilot --model gpt-5.4 --thinking-level xhigh --agent agents/coding/developer.book --context AGENTS.md --auto-push
692
708
 
693
- npx ts-node ./src/cli/test/ptbk.ts coder run --agent github-copilot --model gpt-5.4 --thinking-level xhigh --context AGENTS.md --ignore-git-changes --no-wait
709
+ npx ts-node ./src/cli/test/ptbk.ts coder run --harness github-copilot --model gpt-5.4 --thinking-level xhigh --agent agents/coding/developer.book --context AGENTS.md --ignore-git-changes
694
710
 
695
711
  npx ts-node ./src/cli/test/ptbk.ts coder find-refactor-candidates
696
712
 
@@ -712,11 +728,11 @@ ptbk coder generate-boilerplates
712
728
 
713
729
  ptbk coder generate-boilerplates --template prompts/templates/common.md
714
730
 
715
- ptbk coder run --agent github-copilot --model gpt-5.4 --thinking-level xhigh --context AGENTS.md --test npm run test
731
+ ptbk coder run --harness github-copilot --model gpt-5.4 --thinking-level xhigh --agent agents/coding/developer.book --context AGENTS.md --test npm run test
716
732
 
717
- ptbk coder run --agent github-copilot --model gpt-5.4 --thinking-level xhigh --context AGENTS.md --auto-push
733
+ ptbk coder run --harness github-copilot --model gpt-5.4 --thinking-level xhigh --agent agents/coding/developer.book --context AGENTS.md --auto-push
718
734
 
719
- ptbk coder run --agent github-copilot --model gpt-5.4 --thinking-level xhigh --context AGENTS.md --test npm run test --ignore-git-changes --no-wait
735
+ ptbk coder run --harness github-copilot --model gpt-5.4 --thinking-level xhigh --agent agents/coding/developer.book --context AGENTS.md --test npm run test --ignore-git-changes
720
736
 
721
737
  ptbk coder find-refactor-candidates
722
738
 
@@ -729,24 +745,24 @@ ptbk coder verify
729
745
 
730
746
  #### What each command does
731
747
 
732
- | Command | What it does |
733
- | ------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | ------ | ---- | ----- | ------------------------------------------------------------------------ |
748
+ | Command | What it does |
749
+ | ------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | ------ | ---- | ----- | ------------------------------------------------------------------------ |
734
750
  | `ptbk coder init` | Creates `prompts/`, `prompts/done/`, the project-generic template files materialized in `prompts/templates/` (currently `common.md`), and a starter `AGENTS.md`; ensures `.env` contains `CODING_AGENT_GIT_NAME`, `CODING_AGENT_GIT_EMAIL`, and `CODING_AGENT_GIT_SIGNING_KEY`; adds helper coder scripts to `package.json`; ensures `.gitignore` contains `/.promptbook`; and configures `.vscode/settings.json` to save pasted prompt images into `prompts/screenshots/`. |
735
- | `ptbk coder generate-boilerplates` | Creates new prompt markdown files with fresh emoji tags so you can quickly fill in coding tasks; `--template` accepts either a built-in alias or a markdown file path relative to the project root. |
736
- | `ptbk coder run` | Picks the next ready prompt, appends optional context, runs it through the selected coding agent, can optionally verify each attempt with a shell test command and feed failing output back for retries, then marks success or failure, commits the result, and pushes only when `--auto-push` is enabled. |
737
- | `ptbk coder find-refactor-candidates` | Scans the repository for oversized or overpacked files and writes prompt files for likely refactors; `--level <xlow | low | medium | high | xhigh | extreme>` ranges from a very benevolent scan to a very aggressive sweep. |
738
- | `ptbk coder verify` | Walks through completed prompts, archives truly finished work, and adds follow-up repair prompts for unfinished results. |
751
+ | `ptbk coder generate-boilerplates` | Creates new prompt markdown files with fresh emoji tags so you can quickly fill in coding tasks; `--template` accepts either a built-in alias or a markdown file path relative to the project root. |
752
+ | `ptbk coder run` | Picks the next ready prompt, appends optional context, runs it through the selected coding agent, can optionally verify each attempt with a shell test command and feed failing output back for retries, then marks success or failure, commits the result, and pushes only when `--auto-push` is enabled. |
753
+ | `ptbk coder find-refactor-candidates` | Scans the repository for oversized or overpacked files and writes prompt files for likely refactors; `--level <xlow | low | medium | high | xhigh | extreme>` ranges from a very benevolent scan to a very aggressive sweep. |
754
+ | `ptbk coder verify` | Walks through completed prompts, archives truly finished work, and adds follow-up repair prompts for unfinished results. |
739
755
 
740
756
  #### Most useful `ptbk coder run` flags
741
757
 
742
758
  | Flag | Purpose |
743
759
  | -------------------------- | -------------------------------------------------------------------------------------------------- |
744
- | `--agent <name>` | Selects the coding backend. |
760
+ | `--harness <name>` | Selects the coding harness. |
745
761
  | `--model <model>` | Chooses the runner model; required for `openai-codex` and `gemini`, optional for `github-copilot`. |
746
762
  | `--context <text-or-file>` | Appends extra instructions inline or from a file like `AGENTS.md`. |
747
763
  | `--test <command>` | Runs a verification command after each prompt attempt and feeds failing output back for retries. |
748
764
  | `--thinking-level <level>` | Sets reasoning effort for supported runners. |
749
- | `--no-wait` | Skips interactive pauses between prompts for unattended execution. |
765
+ | `--no-auto` | Waits for user confirmation before each prompt instead of running automatically through the queue. |
750
766
  | `--ignore-git-changes` | Disables the clean-working-tree guard. |
751
767
  | `--priority <n>` | Runs only prompts at or above the given priority. |
752
768
  | `--dry-run` | Prints which prompts are ready instead of executing them. |
@@ -758,8 +774,8 @@ ptbk coder verify
758
774
 
759
775
  1. Initialize once with `ptbk coder init`.
760
776
  2. Customize `prompts/templates/*.md` if needed, then create or write prompt files in `prompts/`.
761
- 3. Customize the starter `AGENTS.md` with repository-specific instructions, then pass `--context AGENTS.md`.
762
- 4. Run one prompt at a time interactively, or use `--no-wait` for unattended batches.
777
+ 3. Customize the starter `AGENTS.md` with repository-specific instructions, then pass `--agent agents/coding/developer.book --context AGENTS.md`.
778
+ 4. Run unattended batches by default, or pass `--no-auto` to confirm each prompt interactively.
763
779
  5. Finish with `ptbk coder verify` so resolved prompts are archived and broken ones get explicit repair follow-ups.
764
780
 
765
781
 
@@ -12,6 +12,7 @@ import type { BookEditorUploadProgressCallback } from '../book-components/BookEd
12
12
  import type { BookEditorUploadOptions } from '../book-components/BookEditor/BookEditor';
13
13
  import type { BookEditorProps } from '../book-components/BookEditor/BookEditor';
14
14
  import { BookEditor } from '../book-components/BookEditor/BookEditor';
15
+ import { BookEditorForClient } from '../book-components/BookEditor/BookEditorForClient';
15
16
  import { AgentChat } from '../book-components/Chat/AgentChat/AgentChat';
16
17
  import type { AgentChatProps } from '../book-components/Chat/AgentChat/AgentChatProps';
17
18
  import { Chat } from '../book-components/Chat/Chat/Chat';
@@ -65,6 +66,7 @@ import type { ChatProgressCard } from '../book-components/Chat/types/ChatMessage
65
66
  import type { ChatMessageReplyingTo } from '../book-components/Chat/types/ChatMessage';
66
67
  import type { ChatMessage } from '../book-components/Chat/types/ChatMessage';
67
68
  import type { ChatParticipant } from '../book-components/Chat/types/ChatParticipant';
69
+ import type { CitationLabelResolver } from '../book-components/Chat/types/CitationLabelResolver';
68
70
  import type { MessageButton } from '../book-components/Chat/utils/parseMessageButtons';
69
71
  import { parseMessageButtons } from '../book-components/Chat/utils/parseMessageButtons';
70
72
  import { ArrowIcon } from '../book-components/icons/ArrowIcon';
@@ -95,6 +97,7 @@ export type { BookEditorUploadProgressCallback };
95
97
  export type { BookEditorUploadOptions };
96
98
  export type { BookEditorProps };
97
99
  export { BookEditor };
100
+ export { BookEditorForClient };
98
101
  export { AgentChat };
99
102
  export type { AgentChatProps };
100
103
  export { Chat };
@@ -148,6 +151,7 @@ export type { ChatProgressCard };
148
151
  export type { ChatMessageReplyingTo };
149
152
  export type { ChatMessage };
150
153
  export type { ChatParticipant };
154
+ export type { CitationLabelResolver };
151
155
  export type { MessageButton };
152
156
  export { parseMessageButtons };
153
157
  export { ArrowIcon };
@@ -221,7 +221,6 @@ import { normalizeChatAttachments } from '../utils/chat/chatAttachments/normaliz
221
221
  import { resolveChatAttachmentContents } from '../utils/chat/chatAttachments/resolveChatAttachmentContents';
222
222
  import { aboutPromptbookInformation } from '../utils/misc/aboutPromptbookInformation';
223
223
  import { $generateBookBoilerplate } from '../utils/random/$generateBookBoilerplate';
224
- import { CORE_AGENTS_SERVER } from '../../servers';
225
224
  import { CORE_AGENTS_SERVER_WELL_KNOWN_AGENT_NAMES } from '../../servers';
226
225
  import { PUBLIC_AGENTS_SERVERS } from '../../servers';
227
226
  export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
@@ -447,6 +446,5 @@ export { normalizeChatAttachments };
447
446
  export { resolveChatAttachmentContents };
448
447
  export { aboutPromptbookInformation };
449
448
  export { $generateBookBoilerplate };
450
- export { CORE_AGENTS_SERVER };
451
449
  export { CORE_AGENTS_SERVER_WELL_KNOWN_AGENT_NAMES };
452
450
  export { PUBLIC_AGENTS_SERVERS };
@@ -1,4 +1,24 @@
1
1
  import { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION } from '../version';
2
+ import { AGENT_BOOK_FILE_PATH } from '../book-3.0/agentFolderPaths';
3
+ import { AGENT_MESSAGES_DIRECTORY_PATH } from '../book-3.0/agentFolderPaths';
4
+ import { AGENT_QUEUED_MESSAGES_DIRECTORY_PATH } from '../book-3.0/agentFolderPaths';
5
+ import { AGENT_FINISHED_MESSAGES_DIRECTORY_PATH } from '../book-3.0/agentFolderPaths';
6
+ import { AGENT_FAILED_MESSAGES_DIRECTORY_PATH } from '../book-3.0/agentFolderPaths';
7
+ import type { BookNodeAgentSource } from '../book-3.0/BookNodeAgentSource';
8
+ import type { BookNodeAgentSourceOptions } from '../book-3.0/BookNodeAgentSource';
9
+ import type { CliAgentHarness } from '../book-3.0/CliAgent';
10
+ import type { CliAgentThinkingLevel } from '../book-3.0/CliAgent';
11
+ import type { CliAgentRunOptions } from '../book-3.0/CliAgent';
12
+ import type { CliAgentOptions } from '../book-3.0/CliAgent';
13
+ import { CliAgent } from '../book-3.0/CliAgent';
14
+ import { CLI_AGENT_HARNESS_NAMES } from '../book-3.0/cliAgentEnv';
15
+ import { CLI_AGENT_THINKING_LEVEL_VALUES } from '../book-3.0/cliAgentEnv';
16
+ import { PTBK_HARNESS_ENV } from '../book-3.0/cliAgentEnv';
17
+ import { PTBK_MODEL_ENV } from '../book-3.0/cliAgentEnv';
18
+ import { PTBK_THINKING_LEVEL_ENV } from '../book-3.0/cliAgentEnv';
19
+ import type { LiteAgentOptions } from '../book-3.0/LiteAgent';
20
+ import type { LiteAgentRunOptions } from '../book-3.0/LiteAgent';
21
+ import { LiteAgent } from '../book-3.0/LiteAgent';
2
22
  import { createPipelineCollectionFromDirectory } from '../collection/pipeline-collection/constructors/createPipelineCollectionFromDirectory';
3
23
  import { getAllCommitmentsToolFunctionsForNode } from '../commitments/_common/getAllCommitmentsToolFunctionsForNode';
4
24
  import { $provideExecutablesForNode } from '../executables/$provideExecutablesForNode';
@@ -12,6 +32,26 @@ import { FileCacheStorage } from '../storage/file-cache-storage/FileCacheStorage
12
32
  import { $execCommand } from '../utils/execCommand/$execCommand';
13
33
  import { $execCommands } from '../utils/execCommand/$execCommands';
14
34
  export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
35
+ export { AGENT_BOOK_FILE_PATH };
36
+ export { AGENT_MESSAGES_DIRECTORY_PATH };
37
+ export { AGENT_QUEUED_MESSAGES_DIRECTORY_PATH };
38
+ export { AGENT_FINISHED_MESSAGES_DIRECTORY_PATH };
39
+ export { AGENT_FAILED_MESSAGES_DIRECTORY_PATH };
40
+ export type { BookNodeAgentSource };
41
+ export type { BookNodeAgentSourceOptions };
42
+ export type { CliAgentHarness };
43
+ export type { CliAgentThinkingLevel };
44
+ export type { CliAgentRunOptions };
45
+ export type { CliAgentOptions };
46
+ export { CliAgent };
47
+ export { CLI_AGENT_HARNESS_NAMES };
48
+ export { CLI_AGENT_THINKING_LEVEL_VALUES };
49
+ export { PTBK_HARNESS_ENV };
50
+ export { PTBK_MODEL_ENV };
51
+ export { PTBK_THINKING_LEVEL_ENV };
52
+ export type { LiteAgentOptions };
53
+ export type { LiteAgentRunOptions };
54
+ export { LiteAgent };
15
55
  export { createPipelineCollectionFromDirectory };
16
56
  export { getAllCommitmentsToolFunctionsForNode };
17
57
  export { $provideExecutablesForNode };
@@ -4,6 +4,14 @@ import type { AgentBasicInformation } from '../book-2.0/agent-source/AgentBasicI
4
4
  import type { AgentModelRequirements } from '../book-2.0/agent-source/AgentModelRequirements';
5
5
  import type { CreateAgentModelRequirementsOptions } from '../book-2.0/agent-source/CreateAgentModelRequirementsOptions';
6
6
  import type { string_book } from '../book-2.0/agent-source/string_book';
7
+ import type { BookNodeAgentSource } from '../book-3.0/BookNodeAgentSource';
8
+ import type { BookNodeAgentSourceOptions } from '../book-3.0/BookNodeAgentSource';
9
+ import type { CliAgentHarness } from '../book-3.0/CliAgent';
10
+ import type { CliAgentThinkingLevel } from '../book-3.0/CliAgent';
11
+ import type { CliAgentRunOptions } from '../book-3.0/CliAgent';
12
+ import type { CliAgentOptions } from '../book-3.0/CliAgent';
13
+ import type { LiteAgentOptions } from '../book-3.0/LiteAgent';
14
+ import type { LiteAgentRunOptions } from '../book-3.0/LiteAgent';
7
15
  import type { AvatarChipProps } from '../book-components/AvatarProfile/AvatarChip/AvatarChip';
8
16
  import type { AvatarChipFromSourceProps } from '../book-components/AvatarProfile/AvatarChip/AvatarChipFromSource';
9
17
  import type { AvatarProfileProps } from '../book-components/AvatarProfile/AvatarProfile/AvatarProfile';
@@ -47,6 +55,7 @@ import type { ChatProgressCard } from '../book-components/Chat/types/ChatMessage
47
55
  import type { ChatMessageReplyingTo } from '../book-components/Chat/types/ChatMessage';
48
56
  import type { ChatMessage } from '../book-components/Chat/types/ChatMessage';
49
57
  import type { ChatParticipant } from '../book-components/Chat/types/ChatParticipant';
58
+ import type { CitationLabelResolver } from '../book-components/Chat/types/CitationLabelResolver';
50
59
  import type { ParsedCitation } from '../book-components/Chat/utils/parseCitationsFromContent';
51
60
  import type { MessageButton } from '../book-components/Chat/utils/parseMessageButtons';
52
61
  import type { TeamToolResult } from '../book-components/Chat/utils/toolCallParsing/TeamToolResult';
@@ -437,6 +446,14 @@ export type { AgentBasicInformation };
437
446
  export type { AgentModelRequirements };
438
447
  export type { CreateAgentModelRequirementsOptions };
439
448
  export type { string_book };
449
+ export type { BookNodeAgentSource };
450
+ export type { BookNodeAgentSourceOptions };
451
+ export type { CliAgentHarness };
452
+ export type { CliAgentThinkingLevel };
453
+ export type { CliAgentRunOptions };
454
+ export type { CliAgentOptions };
455
+ export type { LiteAgentOptions };
456
+ export type { LiteAgentRunOptions };
440
457
  export type { AvatarChipProps };
441
458
  export type { AvatarChipFromSourceProps };
442
459
  export type { AvatarProfileProps };
@@ -480,6 +497,7 @@ export type { ChatProgressCard };
480
497
  export type { ChatMessageReplyingTo };
481
498
  export type { ChatMessage };
482
499
  export type { ChatParticipant };
500
+ export type { CitationLabelResolver };
483
501
  export type { ParsedCitation };
484
502
  export type { MessageButton };
485
503
  export type { TeamToolResult };
@@ -7,6 +7,10 @@ type AvatarAnimationListener = (now: number) => void;
7
7
  /**
8
8
  * Registers one avatar animation callback in the shared animation loop.
9
9
  *
10
+ * Each listener is staggered at registration time so it does not fire on the same animation
11
+ * frame as the existing listeners, and the shared loop further caps how many listeners run
12
+ * per frame, keeping the main thread responsive when many avatars are mounted.
13
+ *
10
14
  * @param avatarAnimationListener Frame callback invoked on every animation frame.
11
15
  * @returns Cleanup function that unregisters the callback.
12
16
  *
@@ -7,7 +7,7 @@ import type { AvatarDefinition } from './AvatarDefinition';
7
7
  *
8
8
  * @private shared contract for the avatar rendering system
9
9
  */
10
- export type AvatarVisualId = 'pixel-art' | 'octopus' | 'octopus2' | 'octopus3' | 'octopus3d' | 'octopus3d2' | 'ascii-octopus' | 'minecraft' | 'minecraft2' | 'fractal' | 'orb';
10
+ export type AvatarVisualId = 'pixel-art' | 'octopus' | 'octopus2' | 'octopus3' | 'octopus3d' | 'octopus3d2' | 'octopus3d3' | 'octopus3d4' | 'ascii-octopus' | 'minecraft' | 'minecraft2' | 'fractal' | 'orb';
11
11
  /**
12
12
  * Derived color palette used by avatar visuals.
13
13
  *
@@ -0,0 +1,7 @@
1
+ import type { AvatarVisualDefinition } from '../types/AvatarVisualDefinition';
2
+ /**
3
+ * Octopus 3D 3 avatar visual.
4
+ *
5
+ * @private built-in avatar visual
6
+ */
7
+ export declare const octopus3d3AvatarVisual: AvatarVisualDefinition;
@@ -0,0 +1,7 @@
1
+ import type { AvatarVisualDefinition } from '../types/AvatarVisualDefinition';
2
+ /**
3
+ * Octopus 3D 4 avatar visual.
4
+ *
5
+ * @private built-in avatar visual
6
+ */
7
+ export declare const octopus3d4AvatarVisual: AvatarVisualDefinition;
@@ -0,0 +1,38 @@
1
+ import type { string_book } from '../book-2.0/agent-source/string_book';
2
+ import { Book } from './Book';
3
+ /**
4
+ * Book source value accepted by Node-backed Book agents.
5
+ *
6
+ * @public exported from `@promptbook/node`
7
+ */
8
+ export type BookNodeAgentSource = Book | string_book;
9
+ /**
10
+ * Common source options shared by Node-backed Book agents.
11
+ *
12
+ * Provide either `agentPath` or `book`.
13
+ *
14
+ * @public exported from `@promptbook/node`
15
+ */
16
+ export type BookNodeAgentSourceOptions = {
17
+ readonly agentPath?: string;
18
+ readonly book?: string | BookNodeAgentSource;
19
+ readonly currentWorkingDirectory?: string;
20
+ };
21
+ /**
22
+ * Normalized source snapshot used internally by Node-backed Book agents.
23
+ *
24
+ * @private internal utility of `CliAgent` and `LiteAgent`
25
+ */
26
+ export type ResolvedBookNodeAgentSource = {
27
+ readonly agentName: string;
28
+ readonly agentPath: string | null;
29
+ readonly agentSource: string_book;
30
+ readonly currentWorkingDirectory: string;
31
+ readonly sourceDirectoryPath: string;
32
+ };
33
+ /**
34
+ * Resolves shared Node-backed Book source options into one normalized source snapshot.
35
+ *
36
+ * @private internal utility of `CliAgent` and `LiteAgent`
37
+ */
38
+ export declare function resolveBookNodeAgentSource(options: BookNodeAgentSourceOptions): Promise<ResolvedBookNodeAgentSource>;
@@ -0,0 +1,66 @@
1
+ import type { BookNodeAgentSourceOptions } from './BookNodeAgentSource';
2
+ import { CLI_AGENT_HARNESS_NAMES, CLI_AGENT_THINKING_LEVEL_VALUES } from './cliAgentEnv';
3
+ /**
4
+ * CLI harness names supported by `ptbk agent exec`.
5
+ *
6
+ * @public exported from `@promptbook/node`
7
+ */
8
+ export type CliAgentHarness = (typeof CLI_AGENT_HARNESS_NAMES)[number];
9
+ /**
10
+ * Thinking levels supported by CLI coding harnesses.
11
+ *
12
+ * @public exported from `@promptbook/node`
13
+ */
14
+ export type CliAgentThinkingLevel = (typeof CLI_AGENT_THINKING_LEVEL_VALUES)[number];
15
+ /**
16
+ * Per-run CLI options exposed by `CliAgent`.
17
+ *
18
+ * `noUi` defaults to `true` so command output stays suitable for JavaScript callers.
19
+ *
20
+ * @public exported from `@promptbook/node`
21
+ */
22
+ export type CliAgentRunOptions = {
23
+ readonly allowCredits?: boolean;
24
+ readonly context?: string;
25
+ readonly harness?: CliAgentHarness;
26
+ readonly isVerbose?: boolean;
27
+ readonly model?: string;
28
+ readonly noUi?: boolean;
29
+ readonly thinkingLevel?: CliAgentThinkingLevel;
30
+ };
31
+ /**
32
+ * Constructor options for `CliAgent`.
33
+ *
34
+ * @public exported from `@promptbook/node`
35
+ */
36
+ export type CliAgentOptions = BookNodeAgentSourceOptions & CliAgentRunOptions;
37
+ /**
38
+ * Lightweight JavaScript wrapper around the Promptbook agent execution pipeline.
39
+ *
40
+ * It uses the same harnesses and execution path as `ptbk agent exec`, running the runner
41
+ * in-process instead of spawning a separate CLI process.
42
+ *
43
+ * When no `harness` is provided in the constructor or per-run options, `CliAgent` falls back
44
+ * to the `PTBK_HARNESS` environment variable, mirroring `ptbk agent exec` behavior.
45
+ *
46
+ * @public exported from `@promptbook/node`
47
+ */
48
+ export declare class CliAgent {
49
+ private readonly options;
50
+ private temporaryAgentPath;
51
+ constructor(options: CliAgentOptions);
52
+ /**
53
+ * Runs one non-interactive agent turn through the selected harness.
54
+ *
55
+ * @param message - User message sent to the agent.
56
+ * @param options - Optional per-run overrides.
57
+ * @returns Final agent answer.
58
+ */
59
+ run(message: string, options?: CliAgentRunOptions): Promise<string>;
60
+ /**
61
+ * Resolves the agent path passed to the runner, materializing one temporary `.book` file when needed.
62
+ *
63
+ * @private internal utility of `CliAgent`
64
+ */
65
+ private resolveExecutableAgentPath;
66
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,68 @@
1
+ import type { CreateAgentModelRequirementsOptions } from '../book-2.0/agent-source/CreateAgentModelRequirementsOptions';
2
+ import type { ScriptExecutionTools } from '../execution/ScriptExecutionTools';
3
+ import type { string_model_name } from '../types/string_model_name';
4
+ import type { BookNodeAgentSourceOptions } from './BookNodeAgentSource';
5
+ /**
6
+ * Options for constructing one `LiteAgent`.
7
+ *
8
+ * `LiteAgent` is intentionally smaller than the CLI harnesses. It runs the Book through the
9
+ * OpenAI Agents SDK directly, while keeping Promptbook tool definitions and hosted knowledge
10
+ * whenever those features fit inside the lighter runtime.
11
+ *
12
+ * @public exported from `@promptbook/node`
13
+ */
14
+ export type LiteAgentOptions = BookNodeAgentSourceOptions & {
15
+ readonly apiKey?: string;
16
+ readonly baseURL?: string;
17
+ readonly createAgentModelRequirementsOptions?: CreateAgentModelRequirementsOptions;
18
+ readonly isVerbose?: boolean;
19
+ readonly maxRequestsPerMinute?: number;
20
+ readonly modelName?: string_model_name;
21
+ readonly organization?: string;
22
+ readonly project?: string;
23
+ readonly scriptExecutionTools?: ScriptExecutionTools | ReadonlyArray<ScriptExecutionTools>;
24
+ readonly userId?: string;
25
+ };
26
+ /**
27
+ * Per-run options for `LiteAgent`.
28
+ *
29
+ * @public exported from `@promptbook/node`
30
+ */
31
+ export type LiteAgentRunOptions = {
32
+ readonly context?: string;
33
+ readonly signal?: AbortSignal;
34
+ };
35
+ /**
36
+ * Lightweight Node.js wrapper around the OpenAI Agents SDK for Promptbook Books.
37
+ *
38
+ * This path is intentionally simpler than `ptbk agent exec`: it prepares one SDK agent in-process
39
+ * and reuses it across calls, which keeps JavaScript integration small while still honoring the
40
+ * compiled Promptbook system message, prompt suffix, tools, and hosted knowledge when supported.
41
+ *
42
+ * @public exported from `@promptbook/node`
43
+ */
44
+ export declare class LiteAgent {
45
+ private readonly options;
46
+ private preparedAgentPromise;
47
+ constructor(options: LiteAgentOptions);
48
+ /**
49
+ * Runs one user message through the prepared OpenAI Agents SDK agent.
50
+ *
51
+ * @param message - User message sent to the agent.
52
+ * @param options - Optional context and cancellation signal.
53
+ * @returns Final text returned by the SDK agent.
54
+ */
55
+ run(message: string, options?: LiteAgentRunOptions): Promise<string>;
56
+ /**
57
+ * Lazily prepares and caches the underlying OpenAI Agents SDK runtime.
58
+ *
59
+ * @private internal utility of `LiteAgent`
60
+ */
61
+ private prepareAgent;
62
+ /**
63
+ * Builds the in-process OpenAI Agents SDK runtime from the Book source.
64
+ *
65
+ * @private internal utility of `LiteAgent`
66
+ */
67
+ private createPreparedAgent;
68
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Relative path to the local agent source used by the agent folder convention.
3
+ *
4
+ * @public exported from `@promptbook/node`
5
+ */
6
+ export declare const AGENT_BOOK_FILE_PATH = "agent.book";
7
+ /**
8
+ * Relative path to the message queue root used by the agent folder convention.
9
+ *
10
+ * @public exported from `@promptbook/node`
11
+ */
12
+ export declare const AGENT_MESSAGES_DIRECTORY_PATH = "messages";
13
+ /**
14
+ * Relative path to queued user messages consumed by the agent runner.
15
+ *
16
+ * @public exported from `@promptbook/node`
17
+ */
18
+ export declare const AGENT_QUEUED_MESSAGES_DIRECTORY_PATH: string;
19
+ /**
20
+ * Relative path to answered messages written by the agent runner.
21
+ *
22
+ * @public exported from `@promptbook/node`
23
+ */
24
+ export declare const AGENT_FINISHED_MESSAGES_DIRECTORY_PATH: string;
25
+ /**
26
+ * Relative path to messages that the agent runner stopped retrying.
27
+ *
28
+ * @public exported from `@promptbook/node`
29
+ */
30
+ export declare const AGENT_FAILED_MESSAGES_DIRECTORY_PATH: string;
@@ -0,0 +1,33 @@
1
+ /**
2
+ * All CLI harness names supported by `CliAgent` and `ptbk agent exec`.
3
+ *
4
+ * @public exported from `@promptbook/node`
5
+ */
6
+ export declare const CLI_AGENT_HARNESS_NAMES: readonly ["openai-codex", "github-copilot", "cline", "claude-code", "opencode", "gemini"];
7
+ /**
8
+ * All supported thinking-level values for CLI coding-agent runners.
9
+ *
10
+ * @public exported from `@promptbook/node`
11
+ */
12
+ export declare const CLI_AGENT_THINKING_LEVEL_VALUES: readonly ["low", "medium", "high", "xhigh", "max"];
13
+ /**
14
+ * Environment variable used as the default runner identifier when `--harness` is omitted or not set in `CliAgent`.
15
+ *
16
+ * Set this to one of the harness names (`openai-codex`, `github-copilot`, `cline`, `claude-code`, `opencode`, `gemini`)
17
+ * so that `CliAgent` and `ptbk agent exec` can run without an explicit `harness` option.
18
+ *
19
+ * @public exported from `@promptbook/node`
20
+ */
21
+ export declare const PTBK_HARNESS_ENV = "PTBK_HARNESS";
22
+ /**
23
+ * Environment variable used as the default runner model when `--model` is omitted or not set in `CliAgent`.
24
+ *
25
+ * @public exported from `@promptbook/node`
26
+ */
27
+ export declare const PTBK_MODEL_ENV = "PTBK_MODEL";
28
+ /**
29
+ * Environment variable used as the default thinking level when `--thinking-level` is omitted or not set in `CliAgent`.
30
+ *
31
+ * @public exported from `@promptbook/node`
32
+ */
33
+ export declare const PTBK_THINKING_LEVEL_ENV = "PTBK_THINKING_LEVEL";
@@ -1,4 +1,4 @@
1
- import { CSSProperties } from 'react';
1
+ import { type CSSProperties } from 'react';
2
2
  import type { Promisable } from 'type-fest';
3
3
  import type { string_book } from '../../book-2.0/agent-source/string_book';
4
4
  import type { number_percent } from '../../types/number_percent';
@@ -6,6 +6,7 @@ import type { number_positive } from '../../types/number_positive';
6
6
  import type { string_knowledge_source_content } from '../../types/string_knowledge_source_content';
7
7
  import type { string_css_value } from '../../types/string_markdown';
8
8
  import type { HoistedMenuItem } from '../_common/MenuHoisting/MenuHoistingContext';
9
+ import type { BookEditorTheme } from './BookEditorTheme';
9
10
  /**
10
11
  * Monaco diagnostic shown inside `BookEditor`.
11
12
  *
@@ -94,14 +95,14 @@ export type BookEditorProps = {
94
95
  */
95
96
  readonly style?: CSSProperties;
96
97
  /**
97
- * Resolved visual theme used for the editor wrapper and Monaco instance.
98
+ * Resolved host application theme.
98
99
  *
99
- * Host applications should pass the final light/dark theme instead of relying on
100
- * browser media-query inference inside `<BookEditor/>`.
100
+ * `<BookEditor/>` accepts this for integration compatibility, but the notebook
101
+ * editor itself is intentionally rendered as light paper in every app theme.
101
102
  *
102
103
  * @default 'LIGHT'
103
104
  */
104
- readonly theme?: 'LIGHT' | 'DARK';
105
+ readonly theme?: BookEditorTheme;
105
106
  /**
106
107
  * Height of the `BookEditor` component
107
108
  *
@@ -0,0 +1,12 @@
1
+ import type { AboutPromptbookInformationOptions } from '../../utils/misc/aboutPromptbookInformation';
2
+ /**
3
+ * Browser-safe Promptbook information used by `BookEditor`.
4
+ *
5
+ * The shared `AboutPromptbookInformation` component renders markdown through the
6
+ * chat markdown pipeline, which has a server-side JSDOM sanitizer path. Keeping
7
+ * this component plain JSX prevents BookEditor from pulling JSDOM into client
8
+ * bundles.
9
+ *
10
+ * @private Internal component used by `BookEditorActionbar`
11
+ */
12
+ export declare function BookEditorAboutPromptbookInformation(props?: AboutPromptbookInformationOptions): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { NAME, CLAIM, PROMPTBOOK_LEGAL_ENTITY, IS_COST_PREVENTED, DEFAULT_IS_VERBOSE, DEFAULT_MAX_CONCURRENT_UPLOADS, PROMPTBOOK_SYNTAX_COLORS, } from '../../config';
2
+ export { PUBLIC_AGENTS_SERVERS } from '../../../servers';
@@ -0,0 +1,7 @@
1
+ import type { BookEditorProps } from './BookEditor';
2
+ /**
3
+ * Renders a book editor
4
+ *
5
+ * @public exported from `@promptbook/components`
6
+ */
7
+ export declare function BookEditorForClient(props: BookEditorProps): import("react/jsx-runtime").JSX.Element;
@@ -15,6 +15,7 @@ type AgentReferenceMatch = {
15
15
  * @private function of BookEditorMonaco
16
16
  */
17
17
  export declare const BookEditorMonacoTokenization: {
18
+ DYNAMIC_COMMITMENT_REGEX: RegExp;
18
19
  AGENT_URL_REFERENCE_REGEX: RegExp;
19
20
  AGENT_REFERENCE_TOKEN_REGEX: RegExp;
20
21
  AGENT_REFERENCE_BRACED_REGEX: RegExp;