@promptbook/cli 0.112.0-114 → 0.112.0-117
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 +35 -32
- package/esm/index.es.js.map +1 -1
- package/esm/src/_packages/components.index.d.ts +2 -0
- package/esm/src/_packages/node.index.d.ts +10 -0
- package/esm/src/book-3.0/CliAgent.d.ts +8 -15
- package/esm/src/book-3.0/agentFolderPaths.d.ts +30 -0
- package/esm/src/book-components/BookEditor/BookEditorBrowserConfig.d.ts +2 -0
- package/esm/src/book-components/BookEditor/BookEditorForClient.d.ts +7 -0
- package/esm/src/book-components/BookEditor/createDeprecatedCommitmentDiagnostics.browser.d.ts +9 -0
- package/esm/src/cli/cli-commands/agent-folder/agentProjectPaths.d.ts +2 -30
- package/esm/src/scrapers/website/utils/createShowdownConverter.d.ts +2 -2
- package/esm/src/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/_packages/components.index.ts +2 -0
- package/src/_packages/node.index.ts +10 -0
- package/src/book-3.0/CliAgent.ts +23 -85
- package/src/book-3.0/agentFolderPaths.ts +38 -0
- package/src/book-components/BookEditor/BookEditor.tsx +1 -1
- package/src/book-components/BookEditor/BookEditorAboutPromptbookInformation.tsx +2 -4
- package/src/book-components/BookEditor/BookEditorActionbar.tsx +32 -2
- package/src/book-components/BookEditor/BookEditorBrowserConfig.ts +11 -0
- package/src/book-components/BookEditor/BookEditorForClient.tsx +33 -0
- package/src/book-components/BookEditor/BookEditorMonaco.tsx +1 -1
- package/src/book-components/BookEditor/BookEditorMonacoTokenization.ts +83 -15
- package/src/book-components/BookEditor/createDeprecatedCommitmentDiagnostics.browser.ts +11 -0
- package/src/book-components/BookEditor/useBookEditorMonacoLanguage.ts +32 -46
- package/src/book-components/BookEditor/useBookEditorMonacoStyles.ts +1 -1
- package/src/book-components/BookEditor/useBookEditorMonacoUploads.ts +1 -1
- package/src/book-components/Chat/utils/renderMarkdown.ts +3 -2
- package/src/cli/cli-commands/agent-folder/agentProjectPaths.ts +15 -35
- package/src/commands/KNOWLEDGE/utils/knowledgeSourceContentToName.ts +2 -2
- package/src/commitments/_common/teamInternalAgentAccess.ts +2 -2
- package/src/formats/csv/CsvFormatParser.ts +4 -4
- package/src/formats/csv/utils/csvParse.ts +2 -2
- package/src/llm-providers/agent/AgentLlmExecutionTools.ts +2 -2
- package/src/llm-providers/agent/AgentLlmExecutionToolsAgentKitRunner.ts +2 -2
- package/src/llm-providers/agent/AgentLlmExecutionToolsOpenAiAssistantRunner.ts +2 -2
- package/src/other/templates/getTemplatesPipelineCollection.ts +719 -752
- package/src/scrapers/_common/utils/getScraperIntermediateSource.ts +2 -2
- package/src/scrapers/website/WebsiteScraper.ts +1 -1
- package/src/scrapers/website/utils/createShowdownConverter.ts +2 -2
- package/src/utils/misc/computeHash.ts +2 -2
- package/src/utils/random/$randomToken.ts +2 -2
- package/src/version.ts +2 -2
- package/src/versions.txt +3 -0
- package/umd/index.umd.js +37 -31
- package/umd/index.umd.js.map +1 -1
- package/umd/src/_packages/components.index.d.ts +2 -0
- package/umd/src/_packages/node.index.d.ts +10 -0
- package/umd/src/book-3.0/CliAgent.d.ts +8 -15
- package/umd/src/book-3.0/agentFolderPaths.d.ts +30 -0
- package/umd/src/book-components/BookEditor/BookEditorBrowserConfig.d.ts +2 -0
- package/umd/src/book-components/BookEditor/BookEditorForClient.d.ts +7 -0
- package/umd/src/book-components/BookEditor/createDeprecatedCommitmentDiagnostics.browser.d.ts +9 -0
- package/umd/src/cli/cli-commands/agent-folder/agentProjectPaths.d.ts +2 -30
- package/umd/src/scrapers/website/utils/createShowdownConverter.d.ts +2 -2
- package/umd/src/version.d.ts +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import CryptoJS from 'crypto-js';
|
|
2
2
|
import hexEncoder from 'crypto-js/enc-hex';
|
|
3
3
|
import { mkdir, rm } from 'fs/promises';
|
|
4
4
|
import { dirname, join } from 'path';
|
|
@@ -45,7 +45,7 @@ export async function getScraperIntermediateSource(
|
|
|
45
45
|
const { rootDirname, cacheDirname, intermediateFilesStrategy, extension, isVerbose } = options;
|
|
46
46
|
|
|
47
47
|
// TODO: [👬] DRY
|
|
48
|
-
const hash =
|
|
48
|
+
const hash = CryptoJS.SHA256(
|
|
49
49
|
// <- TODO: [🥬] Encapsulate sha256 to some private utility function
|
|
50
50
|
hexEncoder.parse(
|
|
51
51
|
sourceFilename || url || 'untitled',
|
|
@@ -6,7 +6,7 @@ import type { Scraper, ScraperSourceHandler } from '../_common/Scraper';
|
|
|
6
6
|
// import PipelineCollection from '../../../books/books';
|
|
7
7
|
import { Readability } from '@mozilla/readability';
|
|
8
8
|
import { JSDOM } from 'jsdom';
|
|
9
|
-
import { Converter as ShowdownConverter } from 'showdown';
|
|
9
|
+
import type { Converter as ShowdownConverter } from 'showdown';
|
|
10
10
|
import { DEFAULT_INTERMEDIATE_FILES_STRATEGY, DEFAULT_IS_VERBOSE, DEFAULT_SCRAPE_CACHE_DIRNAME } from '../../config';
|
|
11
11
|
import { EnvironmentMismatchError } from '../../errors/EnvironmentMismatchError';
|
|
12
12
|
import { KnowledgeScrapeError } from '../../errors/KnowledgeScrapeError';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import showdown from 'showdown';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Create a new showdown converter instance
|
|
@@ -6,7 +6,7 @@ import { Converter as ShowdownConverter } from 'showdown';
|
|
|
6
6
|
* @private utility of `WebsiteScraper`
|
|
7
7
|
*/
|
|
8
8
|
export function createShowdownConverter() {
|
|
9
|
-
return new
|
|
9
|
+
return new showdown.Converter({
|
|
10
10
|
flavor: 'github',
|
|
11
11
|
/*
|
|
12
12
|
> import showdownHighlight from 'showdown-highlight';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import CryptoJS from 'crypto-js';
|
|
2
2
|
import hexEncoder from 'crypto-js/enc-hex';
|
|
3
3
|
import { spaceTrim } from 'spacetrim';
|
|
4
4
|
import type { string_sha256 } from '../../types/string_sha256';
|
|
@@ -11,7 +11,7 @@ import { valueToString } from '../parameters/valueToString';
|
|
|
11
11
|
* @public exported from `@promptbook/utils`
|
|
12
12
|
*/
|
|
13
13
|
export function computeHash(value: really_unknown): string_sha256 {
|
|
14
|
-
return
|
|
14
|
+
return CryptoJS.SHA256(hexEncoder.parse(spaceTrim(valueToString(value)))).toString(/* hex */);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
// TODO: [🥬][🥬] Use this ACRY
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import CryptoJS from 'crypto-js';
|
|
2
2
|
import type { string_token } from '../../types/string_token';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -12,7 +12,7 @@ import type { string_token } from '../../types/string_token';
|
|
|
12
12
|
* @private internal helper function
|
|
13
13
|
*/
|
|
14
14
|
export function $randomToken(randomness: number): string_token {
|
|
15
|
-
return
|
|
15
|
+
return CryptoJS.lib.WordArray.random(randomness).toString(CryptoJS.enc.Hex);
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
// TODO: [🤶] Maybe export through `@promptbook/utils` or `@promptbook/random` package
|
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-
|
|
19
|
+
export const PROMPTBOOK_ENGINE_VERSION: string_promptbook_version = '0.112.0-117';
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* Represents the version string of the Promptbook engine.
|
|
23
|
-
* It follows semantic versioning (e.g., `0.112.0-
|
|
23
|
+
* It follows semantic versioning (e.g., `0.112.0-116`).
|
|
24
24
|
*
|
|
25
25
|
* @generated
|
|
26
26
|
*/
|
package/src/versions.txt
CHANGED
package/umd/index.umd.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('colors'), require('commander'), require('spacetrim'), require('fs/promises'), require('path'), require('child_process'), require('crypto'), require('fs'), require('dotenv'), require('moment'), require('waitasecond'), require('prompts'), require('crypto-js/enc-hex'), require('crypto-js/sha256'), require('socket.io-client'), require('jszip'), require('@mozilla/readability'), require('jsdom'), require('crypto-js'), require('showdown'), require('glob-promise'), require('http'), require('express'), require('socket.io'), require('express-openapi-validator'), require('swagger-ui-express'), require('react'), require('react-dom/server'), require('@anthropic-ai/sdk'), require('bottleneck'), require('@azure/openai'), require('rxjs'), require('mime-types'), require('papaparse'), require('@openai/agents'), require('openai'), require('typescript'), require('ignore'), require('readline'), require('url'), require('events'), require('pg'), require('@supabase/supabase-js')) :
|
|
3
3
|
typeof define === 'function' && define.amd ? define(['exports', 'colors', 'commander', 'spacetrim', 'fs/promises', 'path', 'child_process', 'crypto', 'fs', 'dotenv', 'moment', 'waitasecond', 'prompts', 'crypto-js/enc-hex', 'crypto-js/sha256', 'socket.io-client', 'jszip', '@mozilla/readability', 'jsdom', 'crypto-js', 'showdown', 'glob-promise', 'http', 'express', 'socket.io', 'express-openapi-validator', 'swagger-ui-express', 'react', 'react-dom/server', '@anthropic-ai/sdk', 'bottleneck', '@azure/openai', 'rxjs', 'mime-types', 'papaparse', '@openai/agents', 'openai', 'typescript', 'ignore', 'readline', 'url', 'events', 'pg', '@supabase/supabase-js'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["promptbook-cli"] = {}, global.colors, global.commander, global._spaceTrim, global.promises, global.path, global.child_process, global.crypto, global.fs, global.dotenv, global.moment, global.waitasecond, global.prompts, global.hexEncoder, global.sha256, global.socket_ioClient, global.JSZip, global.readability, global.jsdom, global.
|
|
5
|
-
})(this, (function (exports, colors, commander, _spaceTrim, promises, path, child_process, crypto, fs, dotenv, moment, waitasecond, prompts, hexEncoder, sha256, socket_ioClient, JSZip, readability, jsdom,
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["promptbook-cli"] = {}, global.colors, global.commander, global._spaceTrim, global.promises, global.path, global.child_process, global.crypto, global.fs, global.dotenv, global.moment, global.waitasecond, global.prompts, global.hexEncoder, global.sha256, global.socket_ioClient, global.JSZip, global.readability, global.jsdom, global.CryptoJS, global.showdown, global.glob, global.http, global.express, global.socket_io, global.OpenApiValidator, global.swaggerUi, global.react, global.server, global.Anthropic, global.Bottleneck, global.openai, global.rxjs, global.mimeTypes, global.papaparse, global.agents, global.OpenAI, global.ts, global.ignore, global.readline, global.url, global.events, global.pg));
|
|
5
|
+
})(this, (function (exports, colors, commander, _spaceTrim, promises, path, child_process, crypto, fs, dotenv, moment, waitasecond, prompts, hexEncoder, sha256, socket_ioClient, JSZip, readability, jsdom, CryptoJS, showdown, glob, http, express, socket_io, OpenApiValidator, swaggerUi, react, server, Anthropic, Bottleneck, openai, rxjs, mimeTypes, papaparse, agents, OpenAI, ts, ignore, readline, url, events, pg) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -34,6 +34,8 @@
|
|
|
34
34
|
var hexEncoder__default = /*#__PURE__*/_interopDefaultLegacy(hexEncoder);
|
|
35
35
|
var sha256__default = /*#__PURE__*/_interopDefaultLegacy(sha256);
|
|
36
36
|
var JSZip__default = /*#__PURE__*/_interopDefaultLegacy(JSZip);
|
|
37
|
+
var CryptoJS__default = /*#__PURE__*/_interopDefaultLegacy(CryptoJS);
|
|
38
|
+
var showdown__default = /*#__PURE__*/_interopDefaultLegacy(showdown);
|
|
37
39
|
var glob__default = /*#__PURE__*/_interopDefaultLegacy(glob);
|
|
38
40
|
var http__default = /*#__PURE__*/_interopDefaultLegacy(http);
|
|
39
41
|
var express__default = /*#__PURE__*/_interopDefaultLegacy(express);
|
|
@@ -41,6 +43,7 @@
|
|
|
41
43
|
var swaggerUi__default = /*#__PURE__*/_interopDefaultLegacy(swaggerUi);
|
|
42
44
|
var Anthropic__default = /*#__PURE__*/_interopDefaultLegacy(Anthropic);
|
|
43
45
|
var Bottleneck__default = /*#__PURE__*/_interopDefaultLegacy(Bottleneck);
|
|
46
|
+
var papaparse__default = /*#__PURE__*/_interopDefaultLegacy(papaparse);
|
|
44
47
|
var OpenAI__default = /*#__PURE__*/_interopDefaultLegacy(OpenAI);
|
|
45
48
|
var ts__namespace = /*#__PURE__*/_interopNamespace(ts);
|
|
46
49
|
var ignore__default = /*#__PURE__*/_interopDefaultLegacy(ignore);
|
|
@@ -60,7 +63,7 @@
|
|
|
60
63
|
* @generated
|
|
61
64
|
* @see https://github.com/webgptorg/promptbook
|
|
62
65
|
*/
|
|
63
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-
|
|
66
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-117';
|
|
64
67
|
/**
|
|
65
68
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
66
69
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -2056,42 +2059,44 @@
|
|
|
2056
2059
|
// Note: [🟡] Code for CLI command [agent](src/cli/cli-commands/agent.ts) should never be published outside of `@promptbook/cli`
|
|
2057
2060
|
// Note: [💞] Ignore a discrepancy between file name and entity name
|
|
2058
2061
|
|
|
2062
|
+
// Note: [💞] Ignore a discrepancy between file name and entity name
|
|
2059
2063
|
/**
|
|
2060
|
-
* Relative path to the local agent source
|
|
2064
|
+
* Relative path to the local agent source used by the agent folder convention.
|
|
2061
2065
|
*
|
|
2062
|
-
* @
|
|
2066
|
+
* @public exported from `@promptbook/node`
|
|
2063
2067
|
*/
|
|
2064
2068
|
const AGENT_BOOK_FILE_PATH = 'agent.book';
|
|
2065
2069
|
/**
|
|
2066
|
-
* Relative path to
|
|
2070
|
+
* Relative path to the message queue root used by the agent folder convention.
|
|
2067
2071
|
*
|
|
2068
|
-
* @
|
|
2069
|
-
*/
|
|
2070
|
-
const AGENT_KNOWLEDGE_DIRECTORY_PATH = 'knowledge';
|
|
2071
|
-
/**
|
|
2072
|
-
* Relative path to the message queue root initialized by `ptbk agent-folder init`.
|
|
2073
|
-
*
|
|
2074
|
-
* @private internal utility of `ptbk agent-folder`
|
|
2072
|
+
* @public exported from `@promptbook/node`
|
|
2075
2073
|
*/
|
|
2076
2074
|
const AGENT_MESSAGES_DIRECTORY_PATH = 'messages';
|
|
2077
2075
|
/**
|
|
2078
|
-
* Relative path to queued user messages consumed by
|
|
2076
|
+
* Relative path to queued user messages consumed by the agent runner.
|
|
2079
2077
|
*
|
|
2080
|
-
* @
|
|
2078
|
+
* @public exported from `@promptbook/node`
|
|
2081
2079
|
*/
|
|
2082
2080
|
const AGENT_QUEUED_MESSAGES_DIRECTORY_PATH = path.join(AGENT_MESSAGES_DIRECTORY_PATH, 'queued');
|
|
2083
2081
|
/**
|
|
2084
|
-
* Relative path to answered messages written by
|
|
2082
|
+
* Relative path to answered messages written by the agent runner.
|
|
2085
2083
|
*
|
|
2086
|
-
* @
|
|
2084
|
+
* @public exported from `@promptbook/node`
|
|
2087
2085
|
*/
|
|
2088
2086
|
const AGENT_FINISHED_MESSAGES_DIRECTORY_PATH = path.join(AGENT_MESSAGES_DIRECTORY_PATH, 'finished');
|
|
2089
2087
|
/**
|
|
2090
2088
|
* Relative path to messages that the agent runner stopped retrying.
|
|
2091
2089
|
*
|
|
2092
|
-
* @
|
|
2090
|
+
* @public exported from `@promptbook/node`
|
|
2093
2091
|
*/
|
|
2094
2092
|
const AGENT_FAILED_MESSAGES_DIRECTORY_PATH = path.join(AGENT_MESSAGES_DIRECTORY_PATH, 'failed');
|
|
2093
|
+
|
|
2094
|
+
/**
|
|
2095
|
+
* Relative path to local knowledge files initialized by `ptbk agent-folder init`.
|
|
2096
|
+
*
|
|
2097
|
+
* @private internal utility of `ptbk agent-folder`
|
|
2098
|
+
*/
|
|
2099
|
+
const AGENT_KNOWLEDGE_DIRECTORY_PATH = 'knowledge';
|
|
2095
2100
|
/**
|
|
2096
2101
|
* Relative path to generated local agent documentation initialized by `ptbk agent-folder init`.
|
|
2097
2102
|
*
|
|
@@ -6111,7 +6116,7 @@
|
|
|
6111
6116
|
* @public exported from `@promptbook/utils`
|
|
6112
6117
|
*/
|
|
6113
6118
|
function computeHash(value) {
|
|
6114
|
-
return
|
|
6119
|
+
return CryptoJS__default["default"].SHA256(hexEncoder__default["default"].parse(_spaceTrim.spaceTrim(valueToString(value)))).toString( /* hex */);
|
|
6115
6120
|
}
|
|
6116
6121
|
// TODO: [🥬][🥬] Use this ACRY
|
|
6117
6122
|
|
|
@@ -22117,7 +22122,7 @@
|
|
|
22117
22122
|
* @private internal helper function
|
|
22118
22123
|
*/
|
|
22119
22124
|
function $randomToken(randomness) {
|
|
22120
|
-
return
|
|
22125
|
+
return CryptoJS__default["default"].lib.WordArray.random(randomness).toString(CryptoJS__default["default"].enc.Hex);
|
|
22121
22126
|
}
|
|
22122
22127
|
// TODO: [🤶] Maybe export through `@promptbook/utils` or `@promptbook/random` package
|
|
22123
22128
|
// TODO: Maybe use nanoid instead https://github.com/ai/nanoid
|
|
@@ -28421,7 +28426,7 @@
|
|
|
28421
28426
|
askForApproval: 'never',
|
|
28422
28427
|
allowCredits: options.allowCredits,
|
|
28423
28428
|
});
|
|
28424
|
-
if (!options.allowCredits) {
|
|
28429
|
+
if (!options.allowCredits && options.isVerbose === true) {
|
|
28425
28430
|
console.info(colors__default["default"].gray('OpenAI Codex credit spending is disabled. Use `--allow-credits` to explicitly opt in.'));
|
|
28426
28431
|
}
|
|
28427
28432
|
return createRunnerResolution(options, runner, actualRunnerModel);
|
|
@@ -31358,7 +31363,7 @@
|
|
|
31358
31363
|
* @public exported from `@promptbook/editable`
|
|
31359
31364
|
*/
|
|
31360
31365
|
function knowledgeSourceContentToName(knowledgeSourceContent) {
|
|
31361
|
-
const hash =
|
|
31366
|
+
const hash = CryptoJS__default["default"].SHA256(hexEncoder__default["default"].parse(JSON.stringify(knowledgeSourceContent)))
|
|
31362
31367
|
// <- TODO: [🥬] Encapsulate sha256 to some private utility function
|
|
31363
31368
|
.toString( /* hex */)
|
|
31364
31369
|
.substring(0, 20);
|
|
@@ -32206,7 +32211,7 @@
|
|
|
32206
32211
|
console.warn('CSV string contains carriage return characters, but in the CSV settings the `newline` setting does not include them. Autohealing the CSV string.');
|
|
32207
32212
|
value = value.replace(/\r\n/g, '\n').replace(/\r/g, '\n');
|
|
32208
32213
|
}
|
|
32209
|
-
const csv =
|
|
32214
|
+
const csv = papaparse__default["default"].parse(value, settings);
|
|
32210
32215
|
return csv;
|
|
32211
32216
|
}
|
|
32212
32217
|
|
|
@@ -32291,10 +32296,10 @@
|
|
|
32291
32296
|
i > index ? { ...row, [outputParameterName]: PENDING_VALUE_PLACEHOLDER } : row,
|
|
32292
32297
|
);
|
|
32293
32298
|
*/
|
|
32294
|
-
await onProgress(
|
|
32299
|
+
await onProgress(papaparse__default["default"].unparse(mappedData, { ...settings, ...MANDATORY_CSV_SETTINGS }));
|
|
32295
32300
|
}
|
|
32296
32301
|
}
|
|
32297
|
-
return
|
|
32302
|
+
return papaparse__default["default"].unparse(mappedData, { ...settings, ...MANDATORY_CSV_SETTINGS });
|
|
32298
32303
|
},
|
|
32299
32304
|
},
|
|
32300
32305
|
{
|
|
@@ -32322,7 +32327,7 @@
|
|
|
32322
32327
|
return /* not await */ mapCallback({ [key]: value }, index, array.length);
|
|
32323
32328
|
}));
|
|
32324
32329
|
}));
|
|
32325
|
-
return
|
|
32330
|
+
return papaparse__default["default"].unparse(mappedData, { ...settings, ...MANDATORY_CSV_SETTINGS });
|
|
32326
32331
|
},
|
|
32327
32332
|
},
|
|
32328
32333
|
],
|
|
@@ -45338,7 +45343,7 @@
|
|
|
45338
45343
|
const { filename: sourceFilename, url } = source;
|
|
45339
45344
|
const { rootDirname, cacheDirname, intermediateFilesStrategy, extension, isVerbose } = options;
|
|
45340
45345
|
// TODO: [👬] DRY
|
|
45341
|
-
const hash =
|
|
45346
|
+
const hash = CryptoJS__default["default"].SHA256(
|
|
45342
45347
|
// <- TODO: [🥬] Encapsulate sha256 to some private utility function
|
|
45343
45348
|
hexEncoder__default["default"].parse(sourceFilename || url || 'untitled'))
|
|
45344
45349
|
.toString( /* hex */)
|
|
@@ -45429,7 +45434,7 @@
|
|
|
45429
45434
|
* @private utility of `WebsiteScraper`
|
|
45430
45435
|
*/
|
|
45431
45436
|
function createShowdownConverter() {
|
|
45432
|
-
return new
|
|
45437
|
+
return new showdown__default["default"].Converter({
|
|
45433
45438
|
flavor: 'github',
|
|
45434
45439
|
/*
|
|
45435
45440
|
> import showdownHighlight from 'showdown-highlight';
|
|
@@ -62794,6 +62799,7 @@
|
|
|
62794
62799
|
ignoreGitChanges: true,
|
|
62795
62800
|
normalizeLineEndings: false,
|
|
62796
62801
|
allowCredits: options.allowCredits,
|
|
62802
|
+
isVerbose: options.isVerbose,
|
|
62797
62803
|
autoMigrate: false,
|
|
62798
62804
|
allowDestructiveAutoMigrate: false,
|
|
62799
62805
|
autoPush: false,
|
|
@@ -64826,7 +64832,7 @@
|
|
|
64826
64832
|
* Computes one stable hash from a JSON-serializable value.
|
|
64827
64833
|
*/
|
|
64828
64834
|
function computeJsonHash$1(value) {
|
|
64829
|
-
return
|
|
64835
|
+
return CryptoJS__default["default"].SHA256(JSON.stringify(value)).toString();
|
|
64830
64836
|
}
|
|
64831
64837
|
/**
|
|
64832
64838
|
* Handles OpenAI AgentKit-backed executions for `AgentLlmExecutionTools`.
|
|
@@ -64984,7 +64990,7 @@
|
|
|
64984
64990
|
* Computes one stable hash from a JSON-serializable value.
|
|
64985
64991
|
*/
|
|
64986
64992
|
function computeJsonHash(value) {
|
|
64987
|
-
return
|
|
64993
|
+
return CryptoJS__default["default"].SHA256(JSON.stringify(value)).toString();
|
|
64988
64994
|
}
|
|
64989
64995
|
/**
|
|
64990
64996
|
* Removes assistant-managed requirements before the prompt is executed via OpenAI Assistants.
|
|
@@ -65786,7 +65792,7 @@
|
|
|
65786
65792
|
* Returns a virtual model name representing the agent behavior.
|
|
65787
65793
|
*/
|
|
65788
65794
|
get modelName() {
|
|
65789
|
-
const hash =
|
|
65795
|
+
const hash = CryptoJS__default["default"].SHA256(hexEncoder__default["default"].parse(this.options.agentSource)).toString( /* hex */);
|
|
65790
65796
|
const agentId = hash.substring(0, 10);
|
|
65791
65797
|
return (normalizeToKebabCase(this.title) + '-' + agentId);
|
|
65792
65798
|
}
|