@promptbook/cli 0.112.0-50 → 0.112.0-52
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/esm/index.es.js +12 -11
- package/esm/index.es.js.map +1 -1
- package/esm/src/version.d.ts +1 -1
- package/package.json +1 -1
- package/umd/index.umd.js +12 -11
- package/umd/index.umd.js.map +1 -1
- package/umd/src/version.d.ts +1 -1
package/esm/index.es.js
CHANGED
|
@@ -58,7 +58,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
|
|
|
58
58
|
* @generated
|
|
59
59
|
* @see https://github.com/webgptorg/promptbook
|
|
60
60
|
*/
|
|
61
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-
|
|
61
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-52';
|
|
62
62
|
/**
|
|
63
63
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
64
64
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -2546,9 +2546,7 @@ function buildCoderGitignoreBlock(missingRules) {
|
|
|
2546
2546
|
* Detects whether `.gitignore` already covers one exact rule.
|
|
2547
2547
|
*/
|
|
2548
2548
|
function hasGitignoreRule(gitignoreContent, rule) {
|
|
2549
|
-
const normalizedRulePattern = rule.startsWith('/')
|
|
2550
|
-
? `/?${escapeRegExp$1(rule.slice(1))}`
|
|
2551
|
-
: escapeRegExp$1(rule);
|
|
2549
|
+
const normalizedRulePattern = rule.startsWith('/') ? `/?${escapeRegExp$1(rule.slice(1))}` : escapeRegExp$1(rule);
|
|
2552
2550
|
return new RegExp(`(^|[\\r\\n])${normalizedRulePattern}(?:[\\r\\n]|$)`, 'u').test(gitignoreContent);
|
|
2553
2551
|
}
|
|
2554
2552
|
// Note: [🟡] Code for coder init gitignore bootstrapping [ensureCoderGitignoreFile](src/cli/cli-commands/coder/ensureCoderGitignoreFile.ts) should never be published outside of `@promptbook/cli`
|
|
@@ -3144,7 +3142,11 @@ function normalizeCommandOptionValue(value) {
|
|
|
3144
3142
|
return undefined;
|
|
3145
3143
|
}
|
|
3146
3144
|
const parts = Array.isArray(value) ? value : [value];
|
|
3147
|
-
const normalizedValue = parts
|
|
3145
|
+
const normalizedValue = parts
|
|
3146
|
+
.map((part) => part.trim())
|
|
3147
|
+
.filter(Boolean)
|
|
3148
|
+
.join(' ')
|
|
3149
|
+
.trim();
|
|
3148
3150
|
return normalizedValue === '' ? undefined : normalizedValue;
|
|
3149
3151
|
}
|
|
3150
3152
|
// Note: [🟡] Code for CLI command [run](src/cli/cli-commands/coder/run.ts) should never be published outside of `@promptbook/cli`
|
|
@@ -25030,9 +25032,7 @@ function createSerpSearchToolFunction(toolName, resultLabel) {
|
|
|
25030
25032
|
const searchEngine = new SerpSearchEngine();
|
|
25031
25033
|
const results = await searchEngine.search(query, searchOptions);
|
|
25032
25034
|
return spaceTrim$1((block) => `
|
|
25033
|
-
${resultLabel} results for "${query}"${Object.keys(searchOptions).length === 0
|
|
25034
|
-
? ''
|
|
25035
|
-
: ` with options ${JSON.stringify(searchOptions)}`}:
|
|
25035
|
+
${resultLabel} results for "${query}"${Object.keys(searchOptions).length === 0 ? '' : ` with options ${JSON.stringify(searchOptions)}`}:
|
|
25036
25036
|
|
|
25037
25037
|
${block(results
|
|
25038
25038
|
.map((result) => spaceTrim$1(`
|
|
@@ -52081,7 +52081,9 @@ function createDeepSearchAgentInstructions(toolDescription) {
|
|
|
52081
52081
|
* @private helper of `OpenAiAgentKitExecutionTools`
|
|
52082
52082
|
*/
|
|
52083
52083
|
function buildDeepSearchToolInput(rawInput) {
|
|
52084
|
-
const input = rawInput && typeof rawInput === 'object'
|
|
52084
|
+
const input = rawInput && typeof rawInput === 'object'
|
|
52085
|
+
? rawInput
|
|
52086
|
+
: {};
|
|
52085
52087
|
const query = typeof input.query === 'string' ? input.query.trim() : '';
|
|
52086
52088
|
const additionalHints = Object.entries(input)
|
|
52087
52089
|
.filter(([key, value]) => key !== 'query' && value !== undefined && value !== null && String(value).trim() !== '')
|
|
@@ -53506,8 +53508,7 @@ class AgentLlmExecutionTools {
|
|
|
53506
53508
|
console.info('[🤰]', 'Prepared OpenAI Assistant prompt', {
|
|
53507
53509
|
agent: this.title,
|
|
53508
53510
|
toolNames: (_b = (_a = promptWithAgentModelRequirementsForOpenAiAssistantExecutionTools.modelRequirements.tools) === null || _a === void 0 ? void 0 : _a.map((tool) => tool.name)) !== null && _b !== void 0 ? _b : [],
|
|
53509
|
-
knowledgeSourcesCount: (_d = (_c = promptWithAgentModelRequirementsForOpenAiAssistantExecutionTools.modelRequirements
|
|
53510
|
-
.knowledgeSources) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0,
|
|
53511
|
+
knowledgeSourcesCount: (_d = (_c = promptWithAgentModelRequirementsForOpenAiAssistantExecutionTools.modelRequirements.knowledgeSources) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0,
|
|
53511
53512
|
});
|
|
53512
53513
|
}
|
|
53513
53514
|
return assistant.callChatModelStream(promptWithAgentModelRequirementsForOpenAiAssistantExecutionTools, options.onProgress, options.streamOptions);
|