@promptbook/cli 0.112.0-110 → 0.112.0-111

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 (24) hide show
  1. package/apps/agents-server/src/app/agents/[agentName]/_utils.ts +7 -5
  2. package/apps/agents-server/src/app/agents/[agentName]/api/user-chats/[chatId]/stream/route.ts +4 -86
  3. package/apps/agents-server/src/components/ApplicationErrorPage/ApplicationErrorPage.tsx +118 -12
  4. package/apps/agents-server/src/utils/agentRouting/resolveAgentRouteTarget.ts +27 -62
  5. package/apps/agents-server/src/utils/errorReporting/applicationErrorHandling.ts +45 -0
  6. package/apps/agents-server/src/utils/errorReporting/refreshApplicationDocument.ts +10 -0
  7. package/apps/agents-server/src/utils/importAgent.ts +1 -57
  8. package/apps/agents-server/src/utils/importAgentWithFallback.ts +0 -10
  9. package/apps/agents-server/src/utils/userChat.ts +0 -1
  10. package/esm/index.es.js +18 -11
  11. package/esm/index.es.js.map +1 -1
  12. package/esm/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +22 -0
  13. package/esm/src/version.d.ts +1 -1
  14. package/package.json +1 -1
  15. package/src/cli/cli-commands/agents-server/startAgentsServer.ts +6 -1
  16. package/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.ts +91 -14
  17. package/src/other/templates/getTemplatesPipelineCollection.ts +920 -617
  18. package/src/version.ts +2 -2
  19. package/src/versions.txt +1 -0
  20. package/umd/index.umd.js +18 -11
  21. package/umd/index.umd.js.map +1 -1
  22. package/umd/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +22 -0
  23. package/umd/src/version.d.ts +1 -1
  24. package/apps/agents-server/src/utils/userChat/getUserChatRevision.ts +0 -145
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-110';
19
+ export const PROMPTBOOK_ENGINE_VERSION: string_promptbook_version = '0.112.0-111';
20
20
 
21
21
  /**
22
22
  * Represents the version string of the Promptbook engine.
23
- * It follows semantic versioning (e.g., `0.112.0-109`).
23
+ * It follows semantic versioning (e.g., `0.112.0-110`).
24
24
  *
25
25
  * @generated
26
26
  */
package/src/versions.txt CHANGED
@@ -1144,3 +1144,4 @@
1144
1144
  0.112.0-108
1145
1145
  0.112.0-109
1146
1146
  0.112.0-110
1147
+ 0.112.0-111
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-110';
63
+ const PROMPTBOOK_ENGINE_VERSION = '0.112.0-111';
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
@@ -34202,17 +34202,19 @@
34202
34202
  var _a;
34203
34203
  const delimiter = resolveShellHereDocumentDelimiter(CODEX_PROMPT_DELIMITER, options.prompt);
34204
34204
  const projectPath = toPosixPath(options.projectPath);
34205
- const loginMethodConfig = options.allowCredits
34206
- ? 'CODEX_LOGIN_METHOD_ARGUMENTS=()'
34207
- : spaceTrim(`
34208
- CODEX_LOGIN_METHOD_ARGUMENTS=(-c forced_login_method=chatgpt)
34209
- if [ "\${PTBK_OPENAI_CODEX_USE_API_KEY:-0}" = "1" ] && [ -n "\${OPENAI_API_KEY:-}" ]; then
34210
- CODEX_LOGIN_METHOD_ARGUMENTS=()
34211
- fi
34212
- `);
34205
+ const loginMethodConfig = spaceTrim(`
34206
+ ${options.allowCredits ? 'CODEX_LOGIN_METHOD_ARGUMENTS=()' : 'CODEX_LOGIN_METHOD_ARGUMENTS=(-c forced_login_method=chatgpt)'}
34207
+ if [ "\${PTBK_OPENAI_CODEX_USE_API_KEY:-0}" = "1" ] && [ -n "\${OPENAI_API_KEY:-}" ]; then
34208
+ CODEX_LOGIN_METHOD_ARGUMENTS=(-c forced_login_method=api)
34209
+ fi
34210
+ `);
34213
34211
  const thinkingLevel = (_a = options.thinkingLevel) !== null && _a !== void 0 ? _a : DEFAULT_CODEX_THINKING_LEVEL;
34214
34212
  const lines = [
34215
- 'if [ -f .env ]; then',
34213
+ 'if [ -n "${PTBK_AGENTS_SERVER_ENV_FILE:-}" ] && [ -f "${PTBK_AGENTS_SERVER_ENV_FILE}" ]; then',
34214
+ 'set -a',
34215
+ 'source "${PTBK_AGENTS_SERVER_ENV_FILE}"',
34216
+ 'set +a',
34217
+ 'elif [ -f .env ]; then',
34216
34218
  'set -a',
34217
34219
  'source .env',
34218
34220
  'set +a',
@@ -37429,7 +37431,12 @@
37429
37431
  var _a;
37430
37432
  const nextRuntimeModeLabel = describeAgentsServerNextRuntimeMode(options.options.nextRuntimeMode);
37431
37433
  logRunnerEvent(options.logStreams.runner, `Starting the Agents Server Next process in ${nextRuntimeModeLabel} mode.`);
37432
- const nextArguments = [options.nextCliPath, options.options.nextRuntimeMode, '--port', String(options.options.port)];
37434
+ const nextArguments = [
37435
+ options.nextCliPath,
37436
+ options.options.nextRuntimeMode,
37437
+ '--port',
37438
+ String(options.options.port),
37439
+ ];
37433
37440
  const hostname = (_a = options.childEnvironment[PTBK_HOSTNAME_ENV]) === null || _a === void 0 ? void 0 : _a.trim();
37434
37441
  if (hostname) {
37435
37442
  nextArguments.push('--hostname', hostname);