@promptbook/cli 0.112.0-91 → 0.112.0-93

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 (71) hide show
  1. package/apps/agents-server/src/app/layout.tsx +11 -5
  2. package/apps/agents-server/src/constants/themeMode.ts +27 -1
  3. package/apps/agents-server/src/database/$provideClientSql.ts +1 -1
  4. package/apps/agents-server/src/database/metadataDefaults.ts +10 -0
  5. package/apps/agents-server/src/database/migrations/2026-05-2600-default-theme.sql +16 -0
  6. package/apps/agents-server/src/utils/externalChatRunner/createExternalAgentRepositoryFiles.ts +2 -2
  7. package/apps/agents-server/src/utils/getAdminChatTasksResponse/getAdminChatTasks.ts +532 -1
  8. package/apps/agents-server/src/utils/userThemeModeSettings.ts +10 -2
  9. package/esm/index.es.js +65 -65
  10. package/esm/index.es.js.map +1 -1
  11. package/esm/scripts/run-agent-messages/main/agentIgnorePatterns.d.ts +2 -2
  12. package/esm/scripts/run-agent-messages/main/createCoderRunOptionsForAgent.d.ts +1 -1
  13. package/esm/scripts/run-agent-messages/main/runPersistentAgentWatch.d.ts +1 -1
  14. package/esm/scripts/run-agent-messages/main/tickAgentMessages.d.ts +1 -1
  15. package/esm/scripts/run-agent-messages/main/validateAgentRunOptions.d.ts +1 -1
  16. package/esm/scripts/run-agent-messages/ui/agentRunUiConstants.d.ts +1 -1
  17. package/esm/scripts/run-agent-messages/ui/buildAgentRunUiFrame.d.ts +1 -1
  18. package/esm/scripts/run-agent-messages/ui/initializeAgentRunUi.d.ts +1 -1
  19. package/esm/scripts/run-agent-messages/ui/loadAgentRunUiMetadata.d.ts +2 -2
  20. package/{umd/src/cli/cli-commands/agent → esm/src/cli/cli-commands/agent-folder}/agentProjectPaths.d.ts +16 -16
  21. package/{umd/src/cli/cli-commands/agent → esm/src/cli/cli-commands/agent-folder}/agentRunCliOptions.d.ts +5 -5
  22. package/{umd/src/cli/cli-commands/agent → esm/src/cli/cli-commands/agent-folder}/init.d.ts +1 -1
  23. package/{umd/src/cli/cli-commands/agent → esm/src/cli/cli-commands/agent-folder}/initializeAgentProjectConfiguration.d.ts +2 -2
  24. package/esm/src/cli/cli-commands/{agent → agent-folder}/initializeAgentRunnerCommand.d.ts +4 -4
  25. package/esm/src/cli/cli-commands/{agent → agent-folder}/printAgentInitializationSummary.d.ts +1 -1
  26. package/{umd/src/cli/cli-commands/agent → esm/src/cli/cli-commands/agent-folder}/run.d.ts +1 -1
  27. package/{umd/src/cli/cli-commands/agent → esm/src/cli/cli-commands/agent-folder}/runMultiple.d.ts +1 -1
  28. package/esm/src/cli/cli-commands/{agent → agent-folder}/tick.d.ts +1 -1
  29. package/esm/src/cli/cli-commands/{agent.d.ts → agent-folder.d.ts} +3 -3
  30. package/esm/src/version.d.ts +1 -1
  31. package/package.json +1 -1
  32. package/src/cli/cli-commands/{agent → agent-folder}/agentProjectPaths.ts +18 -18
  33. package/src/cli/cli-commands/{agent → agent-folder}/agentRunCliOptions.ts +7 -7
  34. package/src/cli/cli-commands/{agent → agent-folder}/init.ts +2 -2
  35. package/src/cli/cli-commands/{agent → agent-folder}/initializeAgentProjectConfiguration.ts +3 -3
  36. package/src/cli/cli-commands/{agent → agent-folder}/initializeAgentRunnerCommand.ts +6 -6
  37. package/src/cli/cli-commands/{agent → agent-folder}/printAgentInitializationSummary.ts +2 -2
  38. package/src/cli/cli-commands/{agent → agent-folder}/run.ts +2 -2
  39. package/src/cli/cli-commands/{agent → agent-folder}/runMultiple.ts +2 -2
  40. package/src/cli/cli-commands/{agent → agent-folder}/tick.ts +2 -2
  41. package/src/cli/cli-commands/{agent.ts → agent-folder.ts} +16 -16
  42. package/src/cli/promptbookCli.ts +2 -2
  43. package/src/other/templates/getTemplatesPipelineCollection.ts +865 -755
  44. package/src/version.ts +2 -2
  45. package/src/versions.txt +2 -1
  46. package/umd/index.umd.js +65 -65
  47. package/umd/index.umd.js.map +1 -1
  48. package/umd/scripts/run-agent-messages/main/agentIgnorePatterns.d.ts +2 -2
  49. package/umd/scripts/run-agent-messages/main/createCoderRunOptionsForAgent.d.ts +1 -1
  50. package/umd/scripts/run-agent-messages/main/runPersistentAgentWatch.d.ts +1 -1
  51. package/umd/scripts/run-agent-messages/main/tickAgentMessages.d.ts +1 -1
  52. package/umd/scripts/run-agent-messages/main/validateAgentRunOptions.d.ts +1 -1
  53. package/umd/scripts/run-agent-messages/ui/agentRunUiConstants.d.ts +1 -1
  54. package/umd/scripts/run-agent-messages/ui/buildAgentRunUiFrame.d.ts +1 -1
  55. package/umd/scripts/run-agent-messages/ui/initializeAgentRunUi.d.ts +1 -1
  56. package/umd/scripts/run-agent-messages/ui/loadAgentRunUiMetadata.d.ts +2 -2
  57. package/{esm/src/cli/cli-commands/agent → umd/src/cli/cli-commands/agent-folder}/agentProjectPaths.d.ts +16 -16
  58. package/{esm/src/cli/cli-commands/agent → umd/src/cli/cli-commands/agent-folder}/agentRunCliOptions.d.ts +5 -5
  59. package/{esm/src/cli/cli-commands/agent → umd/src/cli/cli-commands/agent-folder}/init.d.ts +1 -1
  60. package/{esm/src/cli/cli-commands/agent → umd/src/cli/cli-commands/agent-folder}/initializeAgentProjectConfiguration.d.ts +2 -2
  61. package/umd/src/cli/cli-commands/{agent → agent-folder}/initializeAgentRunnerCommand.d.ts +4 -4
  62. package/umd/src/cli/cli-commands/{agent → agent-folder}/printAgentInitializationSummary.d.ts +1 -1
  63. package/{esm/src/cli/cli-commands/agent → umd/src/cli/cli-commands/agent-folder}/run.d.ts +1 -1
  64. package/umd/src/cli/cli-commands/agent-folder/run.test.d.ts +1 -0
  65. package/{esm/src/cli/cli-commands/agent → umd/src/cli/cli-commands/agent-folder}/runMultiple.d.ts +1 -1
  66. package/umd/src/cli/cli-commands/{agent → agent-folder}/tick.d.ts +1 -1
  67. package/umd/src/cli/cli-commands/{agent.d.ts → agent-folder.d.ts} +3 -3
  68. package/umd/src/cli/other/vpsInstall.test.d.ts +1 -0
  69. package/umd/src/version.d.ts +1 -1
  70. /package/esm/src/cli/cli-commands/{agent → agent-folder}/run.test.d.ts +0 -0
  71. /package/{umd/src/cli/cli-commands/agent/run.test.d.ts → esm/src/cli/other/vpsInstall.test.d.ts} +0 -0
package/src/version.ts CHANGED
@@ -16,11 +16,11 @@ export const BOOK_LANGUAGE_VERSION: string_semantic_version = '2.0.0';
16
16
  * @generated
17
17
  * @see https://github.com/webgptorg/promptbook
18
18
  */
19
- export const PROMPTBOOK_ENGINE_VERSION: string_promptbook_version = '0.112.0-91';
19
+ export const PROMPTBOOK_ENGINE_VERSION: string_promptbook_version = '0.112.0-93';
20
20
 
21
21
  /**
22
22
  * Represents the version string of the Promptbook engine.
23
- * It follows semantic versioning (e.g., `0.112.0-90`).
23
+ * It follows semantic versioning (e.g., `0.112.0-92`).
24
24
  *
25
25
  * @generated
26
26
  */
package/src/versions.txt CHANGED
@@ -1127,4 +1127,5 @@
1127
1127
  0.112.0-88
1128
1128
  0.112.0-89
1129
1129
  0.112.0-90
1130
- 0.112.0-91
1130
+ 0.112.0-92
1131
+ 0.112.0-93
package/umd/index.umd.js CHANGED
@@ -60,7 +60,7 @@
60
60
  * @generated
61
61
  * @see https://github.com/webgptorg/promptbook
62
62
  */
63
- const PROMPTBOOK_ENGINE_VERSION = '0.112.0-91';
63
+ const PROMPTBOOK_ENGINE_VERSION = '0.112.0-93';
64
64
  /**
65
65
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
66
66
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -1721,51 +1721,51 @@
1721
1721
  // Note: [💞] Ignore a discrepancy between file name and entity name
1722
1722
 
1723
1723
  /**
1724
- * Relative path to the local agent source initialized by `ptbk agent init`.
1724
+ * Relative path to the local agent source initialized by `ptbk agent-folder init`.
1725
1725
  *
1726
- * @private internal utility of `ptbk agent`
1726
+ * @private internal utility of `ptbk agent-folder`
1727
1727
  */
1728
1728
  const AGENT_BOOK_FILE_PATH = 'agent.book';
1729
1729
  /**
1730
- * Relative path to local knowledge files initialized by `ptbk agent init`.
1730
+ * Relative path to local knowledge files initialized by `ptbk agent-folder init`.
1731
1731
  *
1732
- * @private internal utility of `ptbk agent`
1732
+ * @private internal utility of `ptbk agent-folder`
1733
1733
  */
1734
1734
  const AGENT_KNOWLEDGE_DIRECTORY_PATH = 'knowledge';
1735
1735
  /**
1736
- * Relative path to the message queue root initialized by `ptbk agent init`.
1736
+ * Relative path to the message queue root initialized by `ptbk agent-folder init`.
1737
1737
  *
1738
- * @private internal utility of `ptbk agent`
1738
+ * @private internal utility of `ptbk agent-folder`
1739
1739
  */
1740
1740
  const AGENT_MESSAGES_DIRECTORY_PATH = 'messages';
1741
1741
  /**
1742
- * Relative path to queued user messages consumed by `ptbk agent run-once`.
1742
+ * Relative path to queued user messages consumed by `ptbk agent-folder run-once`.
1743
1743
  *
1744
- * @private internal utility of `ptbk agent`
1744
+ * @private internal utility of `ptbk agent-folder`
1745
1745
  */
1746
1746
  const AGENT_QUEUED_MESSAGES_DIRECTORY_PATH = path.join(AGENT_MESSAGES_DIRECTORY_PATH, 'queued');
1747
1747
  /**
1748
- * Relative path to answered messages written by `ptbk agent run-once`.
1748
+ * Relative path to answered messages written by `ptbk agent-folder run-once`.
1749
1749
  *
1750
- * @private internal utility of `ptbk agent`
1750
+ * @private internal utility of `ptbk agent-folder`
1751
1751
  */
1752
1752
  const AGENT_FINISHED_MESSAGES_DIRECTORY_PATH = path.join(AGENT_MESSAGES_DIRECTORY_PATH, 'finished');
1753
1753
  /**
1754
- * Relative path to generated local agent documentation initialized by `ptbk agent init`.
1754
+ * Relative path to generated local agent documentation initialized by `ptbk agent-folder init`.
1755
1755
  *
1756
- * @private internal utility of `ptbk agent`
1756
+ * @private internal utility of `ptbk agent-folder`
1757
1757
  */
1758
1758
  const AGENT_DOCS_DIRECTORY_PATH = 'docs';
1759
1759
  /**
1760
- * Relative path to the local Book language manual initialized by `ptbk agent init`.
1760
+ * Relative path to the local Book language manual initialized by `ptbk agent-folder init`.
1761
1761
  *
1762
- * @private internal utility of `ptbk agent`
1762
+ * @private internal utility of `ptbk agent-folder`
1763
1763
  */
1764
1764
  const AGENT_BOOK_LANGUAGE_MANUAL_FILE_PATH = path.join(AGENT_DOCS_DIRECTORY_PATH, 'book-language-manual.md');
1765
1765
  /**
1766
1766
  * Returns the default local agent book content.
1767
1767
  *
1768
- * @private internal utility of `ptbk agent`
1768
+ * @private internal utility of `ptbk agent-folder`
1769
1769
  */
1770
1770
  function getDefaultAgentBookContent() {
1771
1771
  return _spaceTrim.spaceTrim(`
@@ -1782,7 +1782,7 @@
1782
1782
  /**
1783
1783
  * Returns the default local Book language manual content.
1784
1784
  *
1785
- * @private internal utility of `ptbk agent`
1785
+ * @private internal utility of `ptbk agent-folder`
1786
1786
  */
1787
1787
  function getDefaultBookLanguageManualContent() {
1788
1788
  return _spaceTrim.spaceTrim(`
@@ -1810,10 +1810,10 @@
1810
1810
  CLOSED
1811
1811
  \`\`\`
1812
1812
 
1813
- For \`ptbk agent\`, the CLI compiles \`agent.book\` into the coding-runner instructions, and the runner edits only the queued message file by appending an answer that starts with \`MESSAGE @Agent\`.
1813
+ For \`ptbk agent-folder\`, the CLI compiles \`agent.book\` into the coding-runner instructions, and the runner edits only the queued message file by appending an answer that starts with \`MESSAGE @Agent\`.
1814
1814
  `);
1815
1815
  }
1816
- // Note: [🟡] Code for CLI command [agent](src/cli/cli-commands/agent/agentProjectPaths.ts) should never be published outside of `@promptbook/cli`
1816
+ // Note: [🟡] Code for CLI command [agent](src/cli/cli-commands/agent-folder/agentProjectPaths.ts) should never be published outside of `@promptbook/cli`
1817
1817
  // Note: [💞] Ignore a discrepancy between file name and exported helper names
1818
1818
 
1819
1819
  /**
@@ -1872,7 +1872,7 @@
1872
1872
  /**
1873
1873
  * Creates local agent queue, knowledge, and instruction files in the current project.
1874
1874
  *
1875
- * @private internal utility of `ptbk agent init`
1875
+ * @private internal utility of `ptbk agent-folder init`
1876
1876
  */
1877
1877
  async function initializeAgentProjectConfiguration(projectPath) {
1878
1878
  const messagesDirectoryStatus = await ensureDirectory(projectPath, AGENT_MESSAGES_DIRECTORY_PATH);
@@ -1892,12 +1892,12 @@
1892
1892
  bookLanguageManualFileStatus,
1893
1893
  };
1894
1894
  }
1895
- // Note: [🟡] Code for CLI command [agent init](src/cli/cli-commands/agent/initializeAgentProjectConfiguration.ts) should never be published outside of `@promptbook/cli`
1895
+ // Note: [🟡] Code for CLI command [agent init](src/cli/cli-commands/agent-folder/initializeAgentProjectConfiguration.ts) should never be published outside of `@promptbook/cli`
1896
1896
 
1897
1897
  /**
1898
1898
  * Prints a readable summary of initialized local agent files.
1899
1899
  *
1900
- * @private internal utility of `ptbk agent init`
1900
+ * @private internal utility of `ptbk agent-folder init`
1901
1901
  */
1902
1902
  function printAgentInitializationSummary(summary) {
1903
1903
  console.info(colors__default["default"].green('Promptbook agent configuration initialized.'));
@@ -1927,10 +1927,10 @@
1927
1927
  function printInitializationStatusLine$2(relativePath, status) {
1928
1928
  console.info(colors__default["default"].gray(`✔ ${relativePath.replace(/\\/gu, '/')}: ${formatInitializationStatus$2(status)}`));
1929
1929
  }
1930
- // Note: [🟡] Code for CLI command [agent init](src/cli/cli-commands/agent/printAgentInitializationSummary.ts) should never be published outside of `@promptbook/cli`
1930
+ // Note: [🟡] Code for CLI command [agent init](src/cli/cli-commands/agent-folder/printAgentInitializationSummary.ts) should never be published outside of `@promptbook/cli`
1931
1931
 
1932
1932
  /**
1933
- * Initializes `agent init` command for Promptbook CLI utilities.
1933
+ * Initializes `agent-folder init` command for Promptbook CLI utilities.
1934
1934
  *
1935
1935
  * Note: `$` is used to indicate that this function is not a pure function - it registers a command in the CLI.
1936
1936
  *
@@ -1954,7 +1954,7 @@
1954
1954
  printAgentInitializationSummary(summary);
1955
1955
  }));
1956
1956
  }
1957
- // Note: [🟡] Code for CLI command [init](src/cli/cli-commands/agent/init.ts) should never be published outside of `@promptbook/cli`
1957
+ // Note: [🟡] Code for CLI command [init](src/cli/cli-commands/agent-folder/init.ts) should never be published outside of `@promptbook/cli`
1958
1958
  // Note: [💞] Ignore a discrepancy between file name and entity name
1959
1959
 
1960
1960
  /**
@@ -2132,7 +2132,7 @@
2132
2132
  /**
2133
2133
  * Converts Commander options into the `scripts/run-agent-messages` option shape.
2134
2134
  *
2135
- * @private internal utility of `ptbk agent`
2135
+ * @private internal utility of `ptbk agent-folder`
2136
2136
  */
2137
2137
  function createAgentRunOptionsFromCliOptions(cliOptions) {
2138
2138
  const runnerOptions = normalizePromptRunnerCliOptions(cliOptions, {
@@ -2147,19 +2147,19 @@
2147
2147
  /**
2148
2148
  * Normalizes one or more `--ignore` option values into a stable pattern list.
2149
2149
  *
2150
- * @private internal utility of `ptbk agent`
2150
+ * @private internal utility of `ptbk agent-folder`
2151
2151
  */
2152
2152
  function normalizeAgentIgnorePatterns(ignore) {
2153
2153
  const patterns = Array.isArray(ignore) ? ignore : ignore ? [ignore] : [];
2154
2154
  return patterns.map((pattern) => pattern.trim()).filter((pattern) => pattern.length > 0);
2155
2155
  }
2156
- // Note: [🟡] Code for CLI command [agent](src/cli/cli-commands/agent/agentRunCliOptions.ts) should never be published outside of `@promptbook/cli`
2156
+ // Note: [🟡] Code for CLI command [agent](src/cli/cli-commands/agent-folder/agentRunCliOptions.ts) should never be published outside of `@promptbook/cli`
2157
2157
  // Note: [💞] Ignore a discrepancy between file name and exported helper names
2158
2158
 
2159
2159
  /**
2160
- * Registers one runner-backed `ptbk agent` subcommand with the shared option and error handling flow.
2160
+ * Registers one runner-backed `ptbk agent-folder` subcommand with the shared option and error handling flow.
2161
2161
  *
2162
- * @private internal utility of `ptbk agent`
2162
+ * @private internal utility of `ptbk agent-folder`
2163
2163
  */
2164
2164
  function $initializeAgentRunnerCommand(program, options) {
2165
2165
  var _a;
@@ -2184,7 +2184,7 @@
2184
2184
  if (options.executionMode === 'watch') {
2185
2185
  const { runPersistentAgentWatch } = await Promise.resolve().then(function () { return runPersistentAgentWatch$1; });
2186
2186
  await runPersistentAgentWatch({
2187
- commandDisplayName: `ptbk agent ${options.commandName}`,
2187
+ commandDisplayName: `ptbk agent-folder ${options.commandName}`,
2188
2188
  logDirectoryPath: process.cwd(),
2189
2189
  runWatch: async () => {
2190
2190
  await execute(runOptions);
@@ -2205,11 +2205,11 @@
2205
2205
  isExitingOnSuccess: options.executionMode === 'once',
2206
2206
  }));
2207
2207
  }
2208
- // Note: [🟡] Code for CLI command [agent](src/cli/cli-commands/agent/initializeAgentRunnerCommand.ts) should never be published outside of `@promptbook/cli`
2208
+ // Note: [🟡] Code for CLI command [agent](src/cli/cli-commands/agent-folder/initializeAgentRunnerCommand.ts) should never be published outside of `@promptbook/cli`
2209
2209
  // Note: [💞] Ignore a discrepancy between file name and entity name
2210
2210
 
2211
2211
  /**
2212
- * Initializes `agent run-multiple` command for Promptbook CLI utilities.
2212
+ * Initializes `agent-folder run-multiple` command for Promptbook CLI utilities.
2213
2213
  *
2214
2214
  * Note: `$` is used to indicate that this function is not a pure function - it registers a command in the CLI.
2215
2215
  *
@@ -2236,11 +2236,11 @@
2236
2236
  },
2237
2237
  });
2238
2238
  }
2239
- // Note: [🟡] Code for CLI command [run-multiple](src/cli/cli-commands/agent/runMultiple.ts) should never be published outside of `@promptbook/cli`
2239
+ // Note: [🟡] Code for CLI command [run-multiple](src/cli/cli-commands/agent-folder/runMultiple.ts) should never be published outside of `@promptbook/cli`
2240
2240
  // Note: [💞] Ignore a discrepancy between file name and entity name
2241
2241
 
2242
2242
  /**
2243
- * Initializes `agent run` command for Promptbook CLI utilities.
2243
+ * Initializes `agent-folder run` command for Promptbook CLI utilities.
2244
2244
  *
2245
2245
  * Note: `$` is used to indicate that this function is not a pure function - it registers a command in the CLI.
2246
2246
  *
@@ -2266,11 +2266,11 @@
2266
2266
  },
2267
2267
  });
2268
2268
  }
2269
- // Note: [🟡] Code for CLI command [run](src/cli/cli-commands/agent/run.ts) should never be published outside of `@promptbook/cli`
2269
+ // Note: [🟡] Code for CLI command [run](src/cli/cli-commands/agent-folder/run.ts) should never be published outside of `@promptbook/cli`
2270
2270
  // Note: [💞] Ignore a discrepancy between file name and entity name
2271
2271
 
2272
2272
  /**
2273
- * Initializes `agent tick` command for Promptbook CLI utilities.
2273
+ * Initializes `agent-folder tick` command for Promptbook CLI utilities.
2274
2274
  *
2275
2275
  * Note: `$` is used to indicate that this function is not a pure function - it registers a command in the CLI.
2276
2276
  *
@@ -2295,13 +2295,13 @@
2295
2295
  },
2296
2296
  });
2297
2297
  }
2298
- // Note: [🟡] Code for CLI command [tick](src/cli/cli-commands/agent/tick.ts) should never be published outside of `@promptbook/cli`
2298
+ // Note: [🟡] Code for CLI command [tick](src/cli/cli-commands/agent-folder/tick.ts) should never be published outside of `@promptbook/cli`
2299
2299
  // Note: [💞] Ignore a discrepancy between file name and entity name
2300
2300
 
2301
2301
  /**
2302
- * Initializes `agent` command with subcommands for Promptbook CLI utilities.
2302
+ * Initializes `agent-folder` command with subcommands for Promptbook CLI utilities.
2303
2303
  *
2304
- * The agent command provides utilities for repository-backed message queues:
2304
+ * The agent-folder command provides utilities for repository-backed message queues:
2305
2305
  * - init: Initialize local agent queue and instruction files
2306
2306
  * - run-once (alias: tick): Answer one queued message and exit
2307
2307
  * - run-agent (alias: run): Watch one queue and answer messages one by one
@@ -2311,9 +2311,9 @@
2311
2311
  *
2312
2312
  * @private internal function of `promptbookCli`
2313
2313
  */
2314
- function $initializeAgentCommand(program) {
2315
- const agentCommand = program.command('agent');
2316
- agentCommand.description(_spaceTrim.spaceTrim(`
2314
+ function $initializeAgentFolderCommand(program) {
2315
+ const agentFolderCommand = program.command('agent-folder');
2316
+ agentFolderCommand.description(_spaceTrim.spaceTrim(`
2317
2317
  Non-coding agent utilities backed by repository message files
2318
2318
 
2319
2319
  Subcommands:
@@ -2322,17 +2322,17 @@
2322
2322
  - run-agent (alias: run): Watch one queue and answer messages one by one
2323
2323
  - run-multiple: Watch direct child agent repositories in one shared session
2324
2324
  `));
2325
- $initializeAgentInitCommand(agentCommand);
2326
- $initializeAgentTickCommand(agentCommand);
2327
- $initializeAgentRunCommand(agentCommand);
2328
- $initializeAgentRunMultipleCommand(agentCommand);
2329
- agentCommand.action(() => {
2325
+ $initializeAgentInitCommand(agentFolderCommand);
2326
+ $initializeAgentTickCommand(agentFolderCommand);
2327
+ $initializeAgentRunCommand(agentFolderCommand);
2328
+ $initializeAgentRunMultipleCommand(agentFolderCommand);
2329
+ agentFolderCommand.action(() => {
2330
2330
  console.info(colors__default["default"].yellow('Please specify a subcommand.'));
2331
2331
  console.info('');
2332
- agentCommand.help();
2332
+ agentFolderCommand.help();
2333
2333
  });
2334
2334
  }
2335
- // Note: [🟡] Code for CLI command [agent](src/cli/cli-commands/agent.ts) should never be published outside of `@promptbook/cli`
2335
+ // Note: [🟡] Code for CLI command [agent-folder](src/cli/cli-commands/agent-folder.ts) should never be published outside of `@promptbook/cli`
2336
2336
  // Note: [💞] Ignore a discrepancy between file name and entity name
2337
2337
 
2338
2338
  /**
@@ -4828,7 +4828,7 @@
4828
4828
  // Note: [💞] Ignore a discrepancy between file name and entity name
4829
4829
 
4830
4830
  /**
4831
- * Converts `ptbk agent` options into the shared runner option shape.
4831
+ * Converts `ptbk agent-folder` options into the shared runner option shape.
4832
4832
  */
4833
4833
  function createCoderRunOptionsForAgent(options) {
4834
4834
  return {
@@ -5676,7 +5676,7 @@
5676
5676
  throw new NotAllowed(_spaceTrim.spaceTrim(`
5677
5677
  Git working tree has changes outside of \`${normalizeGitPath(AGENT_QUEUED_MESSAGES_DIRECTORY_PATH)}/\`.
5678
5678
 
5679
- Please commit or stash unrelated changes before running \`ptbk agent\`
5679
+ Please commit or stash unrelated changes before running \`ptbk agent-folder\`
5680
5680
  OR run with \`--ignore-git-changes\`.
5681
5681
 
5682
5682
  Unrelated changed files:
@@ -33345,9 +33345,9 @@
33345
33345
  \`\`\`
33346
33346
 
33347
33347
  ### What to check
33348
- - Update to the newest \`ptbk\` package so \`ptbk agent run\` uses the compiled agent-system-message prompt shape.
33348
+ - Update to the newest \`ptbk\` package so \`ptbk agent-folder run\` uses the compiled agent-system-message prompt shape.
33349
33349
  - Keep the local agent instructions in \`agent.book\` reasonably compact.
33350
- - If needed, compare with the local source runner (\`ts-node src/cli/test/ptbk.ts agent run ...\`), which bypasses stale published bundles.
33350
+ - If needed, compare with the local source runner (\`ts-node src/cli/test/ptbk.ts agent-folder run ...\`), which bypasses stale published bundles.
33351
33351
  `));
33352
33352
  }
33353
33353
  /**
@@ -34525,7 +34525,7 @@
34525
34525
  }
34526
34526
 
34527
34527
  /**
34528
- * Shared idle placeholder rendered in the rich `ptbk agent` terminal UI.
34528
+ * Shared idle placeholder rendered in the rich `ptbk agent-folder` terminal UI.
34529
34529
  */
34530
34530
  const WAITING_FOR_MESSAGE_LABEL = 'Waiting for the message';
34531
34531
 
@@ -34558,7 +34558,7 @@
34558
34558
  */
34559
34559
  const AGENT_URL_COLUMN_RATIO = 0.38;
34560
34560
  /**
34561
- * Builds the complete boxed terminal frame for the rich `ptbk agent run` UI.
34561
+ * Builds the complete boxed terminal frame for the rich `ptbk agent-folder run` UI.
34562
34562
  */
34563
34563
  function buildAgentRunUiFrame(options) {
34564
34564
  const totalWidth = Math.max(MIN_FRAME_WIDTH, Math.min(options.terminalWidth, MAX_FRAME_WIDTH));
@@ -34731,7 +34731,7 @@
34731
34731
  };
34732
34732
  }
34733
34733
  /**
34734
- * Parses the multi-agent session label used by `ptbk agent run-multiple`.
34734
+ * Parses the multi-agent session label used by `ptbk agent-folder run-multiple`.
34735
34735
  */
34736
34736
  function parseMultiAgentSessionCount(localAgentName) {
34737
34737
  const match = /^(\d+) Agents?(?:\s+·\s+\d+ ignored)?$/u.exec(localAgentName || '');
@@ -35065,7 +35065,7 @@
35065
35065
  }
35066
35066
 
35067
35067
  /**
35068
- * Creates and seeds the persistent rich terminal UI used by `ptbk agent run`.
35068
+ * Creates and seeds the persistent rich terminal UI used by `ptbk agent-folder run`.
35069
35069
  */
35070
35070
  async function initializeAgentRunUi(projectPath, options, queueSnapshot) {
35071
35071
  if (options.noUi || !process.stdout.isTTY) {
@@ -35192,7 +35192,7 @@
35192
35192
  }
35193
35193
 
35194
35194
  /**
35195
- * Validates cross-flag constraints for `ptbk agent` runs.
35195
+ * Validates cross-flag constraints for `ptbk agent-folder` runs.
35196
35196
  */
35197
35197
  function validateAgentRunOptions(options) {
35198
35198
  if (!options.agentName) {
@@ -35527,7 +35527,7 @@
35527
35527
  async function runMultipleAgentMessages(options, controls = {}) {
35528
35528
  var _a;
35529
35529
  validateAgentRunOptions(options);
35530
- validateAgentWatchOptions('ptbk agent run-multiple', options);
35530
+ validateAgentWatchOptions('ptbk agent-folder run-multiple', options);
35531
35531
  const rootPath = process.cwd();
35532
35532
  const shouldContinue = controls.shouldContinue || (() => just(true));
35533
35533
  const ignoreMatcher = createAgentIgnoreMatcher(options.ignorePatterns);
@@ -35628,7 +35628,7 @@
35628
35628
  continue;
35629
35629
  }
35630
35630
  await handleAgentWatchError({
35631
- commandDisplayName: 'ptbk agent run-multiple',
35631
+ commandDisplayName: 'ptbk agent-folder run-multiple',
35632
35632
  logDirectoryPath: controls.watchErrorLogDirectoryPath || rootPath,
35633
35633
  error: tickResult.reason,
35634
35634
  });
@@ -35636,7 +35636,7 @@
35636
35636
  }
35637
35637
  catch (error) {
35638
35638
  await handleAgentWatchError({
35639
- commandDisplayName: 'ptbk agent run-multiple',
35639
+ commandDisplayName: 'ptbk agent-folder run-multiple',
35640
35640
  logDirectoryPath: controls.watchErrorLogDirectoryPath || rootPath,
35641
35641
  error,
35642
35642
  });
@@ -51073,7 +51073,7 @@
51073
51073
  $initializeListScrapersCommand(program);
51074
51074
  $initializeStartAgentsServerCommand(program);
51075
51075
  $initializeStartPipelinesServerCommand(program);
51076
- $initializeAgentCommand(program);
51076
+ $initializeAgentFolderCommand(program);
51077
51077
  $initializeAgentsServerCommand(program);
51078
51078
  $initializeCoderCommand(program);
51079
51079
  $deprecateTopLevelCommands(program);
@@ -61171,7 +61171,7 @@
61171
61171
  async function runAgentMessages(options, controls = {}) {
61172
61172
  var _a;
61173
61173
  validateAgentRunOptions(options);
61174
- validateAgentWatchOptions('ptbk agent run-agent', options);
61174
+ validateAgentWatchOptions('ptbk agent-folder run-agent', options);
61175
61175
  const projectPath = process.cwd();
61176
61176
  let autoPullTimestamp = options.autoPull ? Date.now() : undefined;
61177
61177
  const shouldContinue = controls.shouldContinue || (() => just(true));
@@ -61202,7 +61202,7 @@
61202
61202
  }
61203
61203
  catch (error) {
61204
61204
  await handleAgentWatchError({
61205
- commandDisplayName: 'ptbk agent run-agent',
61205
+ commandDisplayName: 'ptbk agent-folder run-agent',
61206
61206
  logDirectoryPath: projectPath,
61207
61207
  error,
61208
61208
  });