@promptbook/cli 0.112.0-108 → 0.112.0-109

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/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-108';
19
+ export const PROMPTBOOK_ENGINE_VERSION: string_promptbook_version = '0.112.0-109';
20
20
 
21
21
  /**
22
22
  * Represents the version string of the Promptbook engine.
23
- * It follows semantic versioning (e.g., `0.112.0-107`).
23
+ * It follows semantic versioning (e.g., `0.112.0-108`).
24
24
  *
25
25
  * @generated
26
26
  */
package/src/versions.txt CHANGED
@@ -1142,3 +1142,4 @@
1142
1142
  0.112.0-106
1143
1143
  0.112.0-107
1144
1144
  0.112.0-108
1145
+ 0.112.0-109
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-108';
63
+ const PROMPTBOOK_ENGINE_VERSION = '0.112.0-109';
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
@@ -34178,7 +34178,14 @@
34178
34178
  var _a;
34179
34179
  const delimiter = 'CODEX_PROMPT';
34180
34180
  const projectPath = toPosixPath(options.projectPath);
34181
- const loginMethodConfig = options.allowCredits ? '' : ' -c forced_login_method=chatgpt \\';
34181
+ const loginMethodConfig = options.allowCredits
34182
+ ? 'CODEX_LOGIN_METHOD_ARGUMENTS=()'
34183
+ : spaceTrim(`
34184
+ CODEX_LOGIN_METHOD_ARGUMENTS=(-c forced_login_method=chatgpt)
34185
+ if [ "\${PTBK_OPENAI_CODEX_USE_API_KEY:-0}" = "1" ] && [ -n "\${OPENAI_API_KEY:-}" ]; then
34186
+ CODEX_LOGIN_METHOD_ARGUMENTS=()
34187
+ fi
34188
+ `);
34182
34189
  const thinkingLevel = (_a = options.thinkingLevel) !== null && _a !== void 0 ? _a : DEFAULT_CODEX_THINKING_LEVEL;
34183
34190
  const modelReasoningEffortConfig = ` -c model_reasoning_effort="${thinkingLevel}" \\`;
34184
34191
  return spaceTrim((block) => `
@@ -34189,11 +34196,15 @@
34189
34196
  set +a
34190
34197
  fi
34191
34198
 
34199
+ ${loginMethodConfig}
34200
+
34201
+ if [ "\${PTBK_OPENAI_CODEX_USE_API_KEY:-0}" != "1" ] || [ -z "\${OPENAI_API_KEY:-}" ]; then
34192
34202
  unset OPENAI_API_KEY
34193
34203
  unset OPENAI_BASE_URL
34204
+ fi
34194
34205
 
34195
34206
  ${options.codexCommand} \\
34196
- ${loginMethodConfig}
34207
+ "\${CODEX_LOGIN_METHOD_ARGUMENTS[@]}" \\
34197
34208
  ${modelReasoningEffortConfig}
34198
34209
  --ask-for-approval ${options.askForApproval} \\
34199
34210
  exec --model ${options.model} \\