@promptbook/cli 0.112.0-118 → 0.112.0-119
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/apps/agents-server/src/app/api/page-preview/check/route.ts +31 -0
- package/apps/agents-server/src/app/api/page-preview/screenshot/route.ts +57 -0
- package/apps/agents-server/src/app/api/upload/route.ts +10 -1
- package/apps/agents-server/src/app/s3/[first]/[second]/[hash]/[filename]/route.ts +52 -0
- package/apps/agents-server/src/database/$provideClientSql.ts +37 -0
- package/apps/agents-server/src/database/$provideSupabaseForServer.ts +41 -0
- package/apps/agents-server/src/tools/$provideCdnForServer.ts +24 -0
- package/apps/agents-server/src/utils/cdn/classes/DigitalOceanSpaces.ts +30 -2
- package/apps/agents-server/src/utils/cdn/utils/getUserFileCdnKey.ts +10 -3
- package/apps/agents-server/src/utils/iframe/checkIfUrlCanBeEmbedded.ts +68 -0
- package/esm/index.es.js +26 -3
- package/esm/index.es.js.map +1 -1
- package/esm/src/book-components/BookEditor/BookEditor.d.ts +1 -1
- package/esm/src/book-components/BookEditor/BookEditorForClient.d.ts +1 -1
- package/esm/src/book-components/Chat/Chat/CitationIframePreview.d.ts +20 -0
- package/esm/src/book-components/_common/Dropdown/Dropdown.d.ts +1 -1
- package/esm/src/book-components/_common/MenuHoisting/MenuHoistingContext.d.ts +1 -1
- package/esm/src/book-components/_common/Modal/Modal.d.ts +1 -1
- package/esm/src/book-components/icons/AboutIcon.d.ts +1 -1
- package/esm/src/book-components/icons/DownloadIcon.d.ts +1 -1
- package/esm/src/book-components/icons/ExitFullscreenIcon.d.ts +1 -1
- package/esm/src/book-components/icons/FullscreenIcon.d.ts +1 -1
- package/esm/src/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/book-3.0/LiteAgent.ts +1 -1
- package/src/book-components/BookEditor/BookEditor.tsx +6 -6
- package/src/book-components/BookEditor/BookEditorForClient.tsx +1 -1
- package/src/book-components/Chat/Chat/Chat.module.css +45 -0
- package/src/book-components/Chat/Chat/ChatCitationModal.tsx +2 -2
- package/src/book-components/Chat/Chat/CitationIframePreview.tsx +83 -0
- package/src/book-components/_common/Dropdown/Dropdown.tsx +1 -1
- package/src/book-components/_common/MenuHoisting/MenuHoistingContext.tsx +1 -1
- package/src/book-components/_common/Modal/Modal.tsx +1 -1
- package/src/book-components/icons/AboutIcon.tsx +1 -1
- package/src/book-components/icons/DownloadIcon.tsx +1 -1
- package/src/book-components/icons/ExitFullscreenIcon.tsx +1 -1
- package/src/book-components/icons/FullscreenIcon.tsx +1 -1
- package/src/cli/cli-commands/agents-server/buildAgentsServer.ts +31 -1
- package/src/execution/createPipelineExecutor/getKnowledgeForTask.ts +1 -1
- package/src/llm-providers/openai/OpenAiAgentKitExecutionToolsToolBuilder.ts +1 -1
- package/src/llm-providers/openai/OpenAiAssistantExecutionToolsToolRunner.ts +1 -1
- package/src/llm-providers/openai/OpenAiVectorStoreKnowledgeSourcePreparer.ts +1 -1
- package/src/other/templates/getTemplatesPipelineCollection.ts +732 -687
- package/src/scripting/javascript/JavascriptEvalExecutionTools.ts +1 -1
- package/src/version.ts +2 -2
- package/src/versions.txt +1 -0
- package/umd/index.umd.js +26 -3
- package/umd/index.umd.js.map +1 -1
- package/umd/src/book-components/BookEditor/BookEditor.d.ts +1 -1
- package/umd/src/book-components/BookEditor/BookEditorForClient.d.ts +1 -1
- package/umd/src/book-components/Chat/Chat/CitationIframePreview.d.ts +20 -0
- package/umd/src/book-components/_common/Dropdown/Dropdown.d.ts +1 -1
- package/umd/src/book-components/_common/MenuHoisting/MenuHoistingContext.d.ts +1 -1
- package/umd/src/book-components/_common/Modal/Modal.d.ts +1 -1
- package/umd/src/book-components/icons/AboutIcon.d.ts +1 -1
- package/umd/src/book-components/icons/DownloadIcon.d.ts +1 -1
- package/umd/src/book-components/icons/ExitFullscreenIcon.d.ts +1 -1
- package/umd/src/book-components/icons/FullscreenIcon.d.ts +1 -1
- package/umd/src/version.d.ts +1 -1
|
@@ -23,7 +23,7 @@ import { removeDiacritics as _removeDiacritics } from '../../utils/normalization
|
|
|
23
23
|
import { removeEmojis as _removeEmojis } from '../../utils/normalization/removeEmojis';
|
|
24
24
|
import { removeQuotes as _removeQuotes } from '../../utils/normalization/removeQuotes';
|
|
25
25
|
import { unwrapResult as _unwrapResult } from '../../utils/normalization/unwrapResult';
|
|
26
|
-
import { TODO_any } from '../../utils/organization/TODO_any';
|
|
26
|
+
import type { TODO_any } from '../../utils/organization/TODO_any';
|
|
27
27
|
import { $preserve } from '../../utils/organization/preserve';
|
|
28
28
|
import type { JavascriptExecutionToolsOptions } from './JavascriptExecutionToolsOptions';
|
|
29
29
|
|
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-119';
|
|
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-118`).
|
|
24
24
|
*
|
|
25
25
|
* @generated
|
|
26
26
|
*/
|
package/src/versions.txt
CHANGED
package/umd/index.umd.js
CHANGED
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
* @generated
|
|
64
64
|
* @see https://github.com/webgptorg/promptbook
|
|
65
65
|
*/
|
|
66
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-
|
|
66
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-119';
|
|
67
67
|
/**
|
|
68
68
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
69
69
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -3277,6 +3277,16 @@
|
|
|
3277
3277
|
* @private internal constant of `ptbk agents-server`
|
|
3278
3278
|
*/
|
|
3279
3279
|
const DEFAULT_AGENTS_SERVER_NEXT_DIST_DIRECTORY_NAME = '.next';
|
|
3280
|
+
/**
|
|
3281
|
+
* Node.js heap size limit (in MiB) injected into `NODE_OPTIONS` for the Next.js production build.
|
|
3282
|
+
*
|
|
3283
|
+
* Next.js webpack peaks at ~1.9 GiB on a fresh install; the Node.js default cap is ~1.7 GiB,
|
|
3284
|
+
* which causes an OOM crash on first-run VPS installations where swap is the primary resource.
|
|
3285
|
+
* Raising the limit lets the build complete on the first attempt.
|
|
3286
|
+
*
|
|
3287
|
+
* @private internal constant of `ptbk agents-server`
|
|
3288
|
+
*/
|
|
3289
|
+
const AGENTS_SERVER_BUILD_MAX_OLD_SPACE_MIB = 4096;
|
|
3280
3290
|
/**
|
|
3281
3291
|
* Environment variable passed to the bundled Next app so webpack can resolve dependencies
|
|
3282
3292
|
* installed beside `ptbk` even when the app sources are materialized into a project cache.
|
|
@@ -3674,7 +3684,10 @@
|
|
|
3674
3684
|
var _a, _b;
|
|
3675
3685
|
const buildProcess = child_process.spawn(process.execPath, [options.nextCliPath, 'build'], {
|
|
3676
3686
|
cwd: options.appPath,
|
|
3677
|
-
env:
|
|
3687
|
+
env: {
|
|
3688
|
+
...options.environment,
|
|
3689
|
+
NODE_OPTIONS: mergeNodeOptionsWithHeapSize(options.environment.NODE_OPTIONS, AGENTS_SERVER_BUILD_MAX_OLD_SPACE_MIB),
|
|
3690
|
+
},
|
|
3678
3691
|
stdio: ['ignore', 'pipe', 'pipe'],
|
|
3679
3692
|
});
|
|
3680
3693
|
(_a = buildProcess.stdout) === null || _a === void 0 ? void 0 : _a.on('data', (chunk) => {
|
|
@@ -3693,6 +3706,16 @@
|
|
|
3693
3706
|
});
|
|
3694
3707
|
});
|
|
3695
3708
|
}
|
|
3709
|
+
/**
|
|
3710
|
+
* Prepends `--max-old-space-size=<mib>` to `NODE_OPTIONS` unless the caller already set one.
|
|
3711
|
+
*/
|
|
3712
|
+
function mergeNodeOptionsWithHeapSize(existingNodeOptions, maxOldSpaceMib) {
|
|
3713
|
+
if (existingNodeOptions !== undefined && /--max-old-space-size[= ]/u.test(existingNodeOptions)) {
|
|
3714
|
+
return existingNodeOptions;
|
|
3715
|
+
}
|
|
3716
|
+
const heapFlag = `--max-old-space-size=${maxOldSpaceMib}`;
|
|
3717
|
+
return existingNodeOptions ? `${heapFlag} ${existingNodeOptions}` : heapFlag;
|
|
3718
|
+
}
|
|
3696
3719
|
/**
|
|
3697
3720
|
* Sends one Next build output chunk through the caller handler or to the foreground terminal.
|
|
3698
3721
|
*/
|
|
@@ -58464,7 +58487,7 @@
|
|
|
58464
58487
|
return { skippedReason: 'invalid_data_url' };
|
|
58465
58488
|
}
|
|
58466
58489
|
return {
|
|
58467
|
-
file: new File([parsed.buffer], parsed.filename, {
|
|
58490
|
+
file: new File([new Uint8Array(parsed.buffer)], parsed.filename, {
|
|
58468
58491
|
type: parsed.mimeType,
|
|
58469
58492
|
}),
|
|
58470
58493
|
sizeBytes: parsed.buffer.length,
|