@promptbook/components 0.112.0-36 → 0.112.0-38

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 (124) hide show
  1. package/README.md +10 -6
  2. package/esm/index.es.js +357 -69
  3. package/esm/index.es.js.map +1 -1
  4. package/esm/src/_packages/components.index.d.ts +2 -0
  5. package/esm/src/_packages/types.index.d.ts +48 -46
  6. package/esm/src/book-components/Chat/Chat/ChatActionsBar.d.ts +7 -0
  7. package/esm/src/book-components/Chat/Chat/ChatActionsBar.test.d.ts +2 -0
  8. package/esm/src/book-components/Chat/Chat/ChatInputArea.d.ts +4 -0
  9. package/esm/src/book-components/Chat/Chat/ChatMessageItem.d.ts +8 -0
  10. package/esm/src/book-components/Chat/Chat/ChatMessageList.d.ts +2 -0
  11. package/esm/src/book-components/Chat/Chat/ChatProps.d.ts +50 -1
  12. package/esm/src/book-components/Chat/Chat/ChatReplyPreview.d.ts +19 -0
  13. package/esm/src/book-components/Chat/Chat/createProgressCardChecklistMarkdown.d.ts +2 -2
  14. package/esm/src/book-components/Chat/MockedChat/MockedChat.d.ts +1 -1
  15. package/esm/src/book-components/Chat/types/ChatMessage.d.ts +35 -0
  16. package/esm/src/book-components/Chat/utils/resolveChatMessageReplyPreviewText.d.ts +25 -0
  17. package/esm/src/book-components/Chat/utils/resolveChatMessageReplySenderLabel.d.ts +12 -0
  18. package/esm/src/cli/cli-commands/coder/agentCodingFile.d.ts +14 -0
  19. package/esm/src/cli/cli-commands/coder/agentsFile.d.ts +12 -0
  20. package/esm/src/cli/cli-commands/coder/appendBlock.d.ts +6 -0
  21. package/esm/src/cli/cli-commands/coder/boilerplateTemplates.d.ts +10 -0
  22. package/esm/src/cli/cli-commands/coder/ensureCoderEnvFile.d.ts +15 -0
  23. package/esm/src/cli/cli-commands/coder/ensureCoderGitignoreFile.d.ts +7 -0
  24. package/esm/src/cli/cli-commands/coder/ensureCoderMarkdownFile.d.ts +7 -0
  25. package/esm/src/cli/cli-commands/coder/ensureCoderPackageJsonFile.d.ts +7 -0
  26. package/esm/src/cli/cli-commands/coder/ensureCoderVscodeSettingsFile.d.ts +7 -0
  27. package/esm/src/cli/cli-commands/coder/ensureDirectory.d.ts +7 -0
  28. package/esm/src/cli/cli-commands/coder/find-refactor-candidates.d.ts +1 -1
  29. package/esm/src/cli/cli-commands/coder/find-refactor-candidates.test.d.ts +1 -0
  30. package/esm/src/cli/cli-commands/coder/formatDisplayPath.d.ts +6 -0
  31. package/esm/src/cli/cli-commands/coder/getDefaultCoderPackageJsonScripts.d.ts +6 -0
  32. package/esm/src/cli/cli-commands/coder/getDefaultCoderVscodeSettings.d.ts +6 -0
  33. package/esm/src/cli/cli-commands/coder/init.d.ts +3 -38
  34. package/esm/src/cli/cli-commands/coder/initializeCoderProjectConfiguration.d.ts +25 -0
  35. package/esm/src/cli/cli-commands/coder/mergeStringRecordJsonFile.d.ts +18 -0
  36. package/esm/src/cli/cli-commands/coder/printInitializationSummary.d.ts +7 -0
  37. package/esm/src/cli/cli-commands/coder/readTextFileIfExists.d.ts +6 -0
  38. package/esm/src/types/string_agent_url.d.ts +7 -0
  39. package/esm/src/types/string_agent_url_private.d.ts +9 -0
  40. package/esm/src/types/string_base64.d.ts +13 -0
  41. package/esm/src/types/string_base64_private.d.ts +2 -2
  42. package/esm/src/types/string_base_url.d.ts +7 -0
  43. package/esm/src/types/string_base_url_private.d.ts +9 -0
  44. package/esm/src/types/string_email.d.ts +13 -0
  45. package/esm/src/types/string_email_private.d.ts +2 -2
  46. package/esm/src/types/string_host.d.ts +42 -0
  47. package/esm/src/types/string_host_private.d.ts +7 -7
  48. package/esm/src/types/string_href.d.ts +19 -0
  49. package/esm/src/types/string_href_private.d.ts +24 -0
  50. package/esm/src/types/string_mime_type.d.ts +15 -0
  51. package/esm/src/types/string_mime_type_private.d.ts +2 -2
  52. package/esm/src/types/string_pipeline_root_url.d.ts +7 -0
  53. package/esm/src/types/string_pipeline_root_url_private.d.ts +9 -0
  54. package/esm/src/types/string_pipeline_url.d.ts +13 -0
  55. package/esm/src/types/string_pipeline_url_private.d.ts +17 -0
  56. package/esm/src/types/string_promptbook_server_url.d.ts +7 -0
  57. package/esm/src/types/string_promptbook_server_url_private.d.ts +9 -0
  58. package/esm/src/types/string_url.d.ts +14 -141
  59. package/esm/src/types/string_url_image.d.ts +7 -0
  60. package/esm/src/types/string_url_image_private.d.ts +9 -0
  61. package/esm/src/types/string_url_private.d.ts +0 -80
  62. package/esm/src/version.d.ts +1 -1
  63. package/package.json +1 -1
  64. package/umd/index.umd.js +356 -68
  65. package/umd/index.umd.js.map +1 -1
  66. package/umd/src/_packages/components.index.d.ts +2 -0
  67. package/umd/src/_packages/types.index.d.ts +48 -46
  68. package/umd/src/book-components/Chat/Chat/ChatActionsBar.d.ts +7 -0
  69. package/umd/src/book-components/Chat/Chat/ChatActionsBar.test.d.ts +2 -0
  70. package/umd/src/book-components/Chat/Chat/ChatInputArea.d.ts +4 -0
  71. package/umd/src/book-components/Chat/Chat/ChatMessageItem.d.ts +8 -0
  72. package/umd/src/book-components/Chat/Chat/ChatMessageList.d.ts +2 -0
  73. package/umd/src/book-components/Chat/Chat/ChatProps.d.ts +50 -1
  74. package/umd/src/book-components/Chat/Chat/ChatReplyPreview.d.ts +19 -0
  75. package/umd/src/book-components/Chat/Chat/createProgressCardChecklistMarkdown.d.ts +2 -2
  76. package/umd/src/book-components/Chat/MockedChat/MockedChat.d.ts +1 -1
  77. package/umd/src/book-components/Chat/types/ChatMessage.d.ts +35 -0
  78. package/umd/src/book-components/Chat/utils/resolveChatMessageReplyPreviewText.d.ts +25 -0
  79. package/umd/src/book-components/Chat/utils/resolveChatMessageReplySenderLabel.d.ts +12 -0
  80. package/umd/src/cli/cli-commands/coder/agentCodingFile.d.ts +14 -0
  81. package/umd/src/cli/cli-commands/coder/agentsFile.d.ts +12 -0
  82. package/umd/src/cli/cli-commands/coder/appendBlock.d.ts +6 -0
  83. package/umd/src/cli/cli-commands/coder/boilerplateTemplates.d.ts +10 -0
  84. package/umd/src/cli/cli-commands/coder/ensureCoderEnvFile.d.ts +15 -0
  85. package/umd/src/cli/cli-commands/coder/ensureCoderGitignoreFile.d.ts +7 -0
  86. package/umd/src/cli/cli-commands/coder/ensureCoderMarkdownFile.d.ts +7 -0
  87. package/umd/src/cli/cli-commands/coder/ensureCoderPackageJsonFile.d.ts +7 -0
  88. package/umd/src/cli/cli-commands/coder/ensureCoderVscodeSettingsFile.d.ts +7 -0
  89. package/umd/src/cli/cli-commands/coder/ensureDirectory.d.ts +7 -0
  90. package/umd/src/cli/cli-commands/coder/find-refactor-candidates.d.ts +1 -1
  91. package/umd/src/cli/cli-commands/coder/find-refactor-candidates.test.d.ts +1 -0
  92. package/umd/src/cli/cli-commands/coder/formatDisplayPath.d.ts +6 -0
  93. package/umd/src/cli/cli-commands/coder/getDefaultCoderPackageJsonScripts.d.ts +6 -0
  94. package/umd/src/cli/cli-commands/coder/getDefaultCoderVscodeSettings.d.ts +6 -0
  95. package/umd/src/cli/cli-commands/coder/init.d.ts +3 -38
  96. package/umd/src/cli/cli-commands/coder/initializeCoderProjectConfiguration.d.ts +25 -0
  97. package/umd/src/cli/cli-commands/coder/mergeStringRecordJsonFile.d.ts +18 -0
  98. package/umd/src/cli/cli-commands/coder/printInitializationSummary.d.ts +7 -0
  99. package/umd/src/cli/cli-commands/coder/readTextFileIfExists.d.ts +6 -0
  100. package/umd/src/types/string_agent_url.d.ts +7 -0
  101. package/umd/src/types/string_agent_url_private.d.ts +9 -0
  102. package/umd/src/types/string_base64.d.ts +13 -0
  103. package/umd/src/types/string_base64_private.d.ts +2 -2
  104. package/umd/src/types/string_base_url.d.ts +7 -0
  105. package/umd/src/types/string_base_url_private.d.ts +9 -0
  106. package/umd/src/types/string_email.d.ts +13 -0
  107. package/umd/src/types/string_email_private.d.ts +2 -2
  108. package/umd/src/types/string_host.d.ts +42 -0
  109. package/umd/src/types/string_host_private.d.ts +7 -7
  110. package/umd/src/types/string_href.d.ts +19 -0
  111. package/umd/src/types/string_href_private.d.ts +24 -0
  112. package/umd/src/types/string_mime_type.d.ts +15 -0
  113. package/umd/src/types/string_mime_type_private.d.ts +2 -2
  114. package/umd/src/types/string_pipeline_root_url.d.ts +7 -0
  115. package/umd/src/types/string_pipeline_root_url_private.d.ts +9 -0
  116. package/umd/src/types/string_pipeline_url.d.ts +13 -0
  117. package/umd/src/types/string_pipeline_url_private.d.ts +17 -0
  118. package/umd/src/types/string_promptbook_server_url.d.ts +7 -0
  119. package/umd/src/types/string_promptbook_server_url_private.d.ts +9 -0
  120. package/umd/src/types/string_url.d.ts +14 -141
  121. package/umd/src/types/string_url_image.d.ts +7 -0
  122. package/umd/src/types/string_url_image_private.d.ts +9 -0
  123. package/umd/src/types/string_url_private.d.ts +0 -80
  124. package/umd/src/version.d.ts +1 -1
package/README.md CHANGED
@@ -549,7 +549,7 @@ In short: tools like Claude Code, Codex, or GitHub Copilot are the **engines**;
549
549
 
550
550
  #### How the workflow works
551
551
 
552
- 1. `ptbk coder init` prepares the project for the coder workflow, seeds project-owned templates in `prompts/templates/`, adds helper `npm run coder:*` scripts, ensures `.gitignore` ignores `/.tmp`, and configures VS Code prompt screenshots in `prompts/screenshots/`.
552
+ 1. `ptbk coder init` prepares the project for the coder workflow, seeds project-owned generic templates in `prompts/templates/`, creates a starter `AGENTS.md` context file, adds helper `npm run coder:*` scripts, ensures `.gitignore` ignores `/.tmp`, and configures VS Code prompt screenshots in `prompts/screenshots/`.
553
553
  2. `ptbk coder generate-boilerplates` creates prompt files in `prompts/`.
554
554
  3. You replace placeholder `@@@` sections with real coding tasks.
555
555
  4. `ptbk coder run` sends the next ready `[ ]` prompt to the selected coding agent.
@@ -586,6 +586,8 @@ npx ts-node ./src/cli/test/ptbk.ts coder run --agent github-copilot --model gpt-
586
586
 
587
587
  npx ts-node ./src/cli/test/ptbk.ts coder find-refactor-candidates
588
588
 
589
+ npx ts-node ./src/cli/test/ptbk.ts coder find-refactor-candidates --level xhigh
590
+
589
591
  npx ts-node ./src/cli/test/ptbk.ts coder verify
590
592
  ```
591
593
 
@@ -600,7 +602,7 @@ ptbk coder init
600
602
 
601
603
  npx ptbk coder generate-boilerplates
602
604
 
603
- npx ptbk coder generate-boilerplates --template prompts/templates/agents-server.md
605
+ npx ptbk coder generate-boilerplates --template prompts/templates/common.md
604
606
 
605
607
  npx ptbk coder run --agent github-copilot --model gpt-5.4 --thinking-level xhigh --context AGENTS.md
606
608
 
@@ -608,19 +610,21 @@ npx ptbk coder run --agent github-copilot --model gpt-5.4 --thinking-level xhigh
608
610
 
609
611
  npx ptbk coder find-refactor-candidates
610
612
 
613
+ npx ptbk coder find-refactor-candidates --level xhigh
614
+
611
615
  npx ptbk coder verify
612
616
  ```
613
617
 
614
- `ptbk coder init` also bootstraps `package.json` scripts for the four main coder commands, adds the coder temp ignore to `.gitignore`, and configures `.vscode/settings.json` so pasted images from `prompts/*.md` land in `prompts/screenshots/`.
618
+ `ptbk coder init` also bootstraps a starter `AGENTS.md`, adds `package.json` scripts for the four main coder commands, adds the coder temp ignore to `.gitignore`, and configures `.vscode/settings.json` so pasted images from `prompts/*.md` land in `prompts/screenshots/`.
615
619
 
616
620
  #### What each command does
617
621
 
618
622
  | Command | What it does |
619
623
  | --- | --- |
620
- | `ptbk coder init` | Creates `prompts/`, `prompts/done/`, `prompts/templates/common.md`, `prompts/templates/agents-server.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 `/.tmp`, and configures `.vscode/settings.json` to save pasted prompt images into `prompts/screenshots/`. |
624
+ | `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 `/.tmp`; and configures `.vscode/settings.json` to save pasted prompt images into `prompts/screenshots/`. |
621
625
  | `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. |
622
626
  | `ptbk coder run` | Picks the next ready prompt, appends optional context, runs it through the selected coding agent, marks success or failure, then commits and pushes the result. |
623
- | `ptbk coder find-refactor-candidates` | Scans the repository for oversized or overpacked files and writes prompt files for likely refactors. |
627
+ | `ptbk coder find-refactor-candidates` | Scans the repository for oversized or overpacked files and writes prompt files for likely refactors; `--level <low|medium|high|xhigh>` makes the scan more or less aggressive. |
624
628
  | `ptbk coder verify` | Walks through completed prompts, archives truly finished work, and adds follow-up repair prompts for unfinished results. |
625
629
 
626
630
  #### Most useful `ptbk coder run` flags
@@ -642,7 +646,7 @@ npx ptbk coder verify
642
646
 
643
647
  1. Initialize once with `ptbk coder init`.
644
648
  2. Customize `prompts/templates/*.md` if needed, then create or write prompt files in `prompts/`.
645
- 3. Put repository-specific instructions in `AGENTS.md`, then pass `--context AGENTS.md`.
649
+ 3. Customize the starter `AGENTS.md` with repository-specific instructions, then pass `--context AGENTS.md`.
646
650
  4. Run one prompt at a time interactively, or use `--no-wait` for unattended batches.
647
651
  5. Finish with `ptbk coder verify` so resolved prompts are archived and broken ones get explicit repair follow-ups.
648
652