@promptbook/components 0.112.0-115 → 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 +353 -474
- 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 -3
- package/umd/index.umd.js +357 -472
- 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
package/umd/index.umd.js
CHANGED
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react/jsx-runtime'), require('spacetrim'), require('react'), require('crypto-js'), require('crypto-js/enc-hex'), require('path'), require('moment'), require('mime-types'), require('
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', 'react/jsx-runtime', 'spacetrim', 'react', 'crypto-js', 'crypto-js/enc-hex', 'path', 'moment', 'mime-types', '
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["promptbook-components"] = {}, global.jsxRuntime, global.spacetrim, global.react, global.
|
|
5
|
-
})(this, (function (exports, jsxRuntime, spacetrim, react,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react/jsx-runtime'), require('spacetrim'), require('react'), require('crypto-js'), require('crypto-js/enc-hex'), require('path'), require('moment'), require('mime-types'), require('react-dom'), require('@monaco-editor/react'), require('rxjs'), require('dompurify'), require('katex'), require('showdown'), require('html-to-image'), require('jspdf'), require('react-dom/client'), require('lucide-react'), require('moment/locale/cs'), require('waitasecond'), require('crypto-js/sha256'), require('papaparse'), require('@openai/agents'), require('colors'), require('bottleneck'), require('openai'), require('qrcode')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', 'react/jsx-runtime', 'spacetrim', 'react', 'crypto-js', 'crypto-js/enc-hex', 'path', 'moment', 'mime-types', 'react-dom', '@monaco-editor/react', 'rxjs', 'dompurify', 'katex', 'showdown', 'html-to-image', 'jspdf', 'react-dom/client', 'lucide-react', 'moment/locale/cs', 'waitasecond', 'crypto-js/sha256', 'papaparse', '@openai/agents', 'colors', 'bottleneck', 'openai', 'qrcode'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["promptbook-components"] = {}, global.jsxRuntime, global.spacetrim, global.react, global.CryptoJS, global.hexEncoder, global.path, global.moment, global.mimeTypes, global.reactDom, global.MonacoEditor, global.rxjs, global.createDOMPurify, global.katex, global.showdown, global.htmlToImage, global.jspdf, global.client, global.lucideReact, null, global.waitasecond, global.sha256, global.papaparse, global.agents, global.colors, global.Bottleneck, global.OpenAI, global.QRCode));
|
|
5
|
+
})(this, (function (exports, jsxRuntime, spacetrim, react, CryptoJS, hexEncoder, path, moment, mimeTypes, reactDom, MonacoEditor, rxjs, createDOMPurify, katex, showdown, htmlToImage, jspdf, client, lucideReact, cs, waitasecond, sha256, papaparse, agents, colors, Bottleneck, OpenAI, QRCode) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
9
|
+
var CryptoJS__default = /*#__PURE__*/_interopDefaultLegacy(CryptoJS);
|
|
9
10
|
var hexEncoder__default = /*#__PURE__*/_interopDefaultLegacy(hexEncoder);
|
|
10
11
|
var moment__default = /*#__PURE__*/_interopDefaultLegacy(moment);
|
|
11
12
|
var MonacoEditor__default = /*#__PURE__*/_interopDefaultLegacy(MonacoEditor);
|
|
12
13
|
var createDOMPurify__default = /*#__PURE__*/_interopDefaultLegacy(createDOMPurify);
|
|
13
14
|
var katex__default = /*#__PURE__*/_interopDefaultLegacy(katex);
|
|
15
|
+
var showdown__default = /*#__PURE__*/_interopDefaultLegacy(showdown);
|
|
14
16
|
var sha256__default = /*#__PURE__*/_interopDefaultLegacy(sha256);
|
|
17
|
+
var papaparse__default = /*#__PURE__*/_interopDefaultLegacy(papaparse);
|
|
15
18
|
var colors__default = /*#__PURE__*/_interopDefaultLegacy(colors);
|
|
16
19
|
var Bottleneck__default = /*#__PURE__*/_interopDefaultLegacy(Bottleneck);
|
|
17
20
|
var OpenAI__default = /*#__PURE__*/_interopDefaultLegacy(OpenAI);
|
|
@@ -31,7 +34,7 @@
|
|
|
31
34
|
* @generated
|
|
32
35
|
* @see https://github.com/webgptorg/promptbook
|
|
33
36
|
*/
|
|
34
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-
|
|
37
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-117';
|
|
35
38
|
/**
|
|
36
39
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
37
40
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -7062,7 +7065,7 @@
|
|
|
7062
7065
|
* @public exported from `@promptbook/utils`
|
|
7063
7066
|
*/
|
|
7064
7067
|
function computeHash(value) {
|
|
7065
|
-
return
|
|
7068
|
+
return CryptoJS__default["default"].SHA256(hexEncoder__default["default"].parse(spacetrim.spaceTrim(valueToString(value)))).toString( /* hex */);
|
|
7066
7069
|
}
|
|
7067
7070
|
// TODO: [🥬][🥬] Use this ACRY
|
|
7068
7071
|
|
|
@@ -18456,7 +18459,7 @@
|
|
|
18456
18459
|
* @private internal helper function
|
|
18457
18460
|
*/
|
|
18458
18461
|
function $randomToken(randomness) {
|
|
18459
|
-
return
|
|
18462
|
+
return CryptoJS__default["default"].lib.WordArray.random(randomness).toString(CryptoJS__default["default"].enc.Hex);
|
|
18460
18463
|
}
|
|
18461
18464
|
// TODO: [🤶] Maybe export through `@promptbook/utils` or `@promptbook/random` package
|
|
18462
18465
|
// TODO: Maybe use nanoid instead https://github.com/ai/nanoid
|
|
@@ -20577,7 +20580,7 @@
|
|
|
20577
20580
|
* Regex pattern to match horizontal lines (markdown thematic breaks)
|
|
20578
20581
|
* Matches 3 or more hyphens, underscores, or asterisks (with optional spaces between)
|
|
20579
20582
|
*/
|
|
20580
|
-
const HORIZONTAL_LINE_PATTERN$
|
|
20583
|
+
const HORIZONTAL_LINE_PATTERN$2 = /^[\s]*[-_*][\s]*[-_*][\s]*[-_*][\s]*[-_*]*[\s]*$/;
|
|
20581
20584
|
/**
|
|
20582
20585
|
* Parses agent source using the new commitment system with multiline support
|
|
20583
20586
|
* This function replaces the hardcoded commitment parsing in the original parseAgentSource
|
|
@@ -20666,7 +20669,7 @@
|
|
|
20666
20669
|
}
|
|
20667
20670
|
}
|
|
20668
20671
|
// Check if this is a horizontal line (ends any current commitment)
|
|
20669
|
-
const isHorizontalLine = HORIZONTAL_LINE_PATTERN$
|
|
20672
|
+
const isHorizontalLine = HORIZONTAL_LINE_PATTERN$2.test(line);
|
|
20670
20673
|
if (isHorizontalLine) {
|
|
20671
20674
|
// Save the current commitment if it exists
|
|
20672
20675
|
if (currentCommitment) {
|
|
@@ -21611,6 +21614,56 @@
|
|
|
21611
21614
|
// TODO: [🥴] Implement counting in formats - like JSON, CSV, XML,...
|
|
21612
21615
|
// TODO: [🧠][✌️] Make some Promptbook-native token system
|
|
21613
21616
|
|
|
21617
|
+
/**
|
|
21618
|
+
* Core Promptbook server configuration
|
|
21619
|
+
*
|
|
21620
|
+
* Used for "Adam" agent which is built in as default ancestor for new agents and other well known agents
|
|
21621
|
+
*
|
|
21622
|
+
* @public exported from `@promptbook/core`
|
|
21623
|
+
*/
|
|
21624
|
+
const CORE_AGENTS_SERVER = {
|
|
21625
|
+
title: 'Promptbook Core',
|
|
21626
|
+
description: `Core Promptbook server used for Adam agent which is built in as default ancestor for new agents and other well known agents.`,
|
|
21627
|
+
owner: PROMPTBOOK_LEGAL_ENTITY,
|
|
21628
|
+
url: 'https://core.ptbk.io/',
|
|
21629
|
+
};
|
|
21630
|
+
// <- TODO: [🆎] Allow to override (set) well-known agent names via Metadata
|
|
21631
|
+
/**
|
|
21632
|
+
* Available agents servers for the Promptbook
|
|
21633
|
+
*
|
|
21634
|
+
* Tip: 💡 If you are running your own server, you can add it to this list by creating a pull request!
|
|
21635
|
+
*
|
|
21636
|
+
* @public exported from `@promptbook/core`
|
|
21637
|
+
*/
|
|
21638
|
+
const PUBLIC_AGENTS_SERVERS = [
|
|
21639
|
+
CORE_AGENTS_SERVER,
|
|
21640
|
+
{
|
|
21641
|
+
title: 'Promptbook Gallery',
|
|
21642
|
+
description: `Gallery of ideas, AI professions,... like AI Agenta photobank.`,
|
|
21643
|
+
owner: PROMPTBOOK_LEGAL_ENTITY,
|
|
21644
|
+
url: 'https://gallery.ptbk.io/',
|
|
21645
|
+
},
|
|
21646
|
+
{
|
|
21647
|
+
title: 'Promptbook Testing server 6',
|
|
21648
|
+
description: `General-purpose testing server.`,
|
|
21649
|
+
owner: PROMPTBOOK_LEGAL_ENTITY,
|
|
21650
|
+
url: 'https://s6.ptbk.io/',
|
|
21651
|
+
},
|
|
21652
|
+
{
|
|
21653
|
+
title: 'Promptbook Testing server 7',
|
|
21654
|
+
description: `General-purpose testing server.`,
|
|
21655
|
+
owner: PROMPTBOOK_LEGAL_ENTITY,
|
|
21656
|
+
url: 'https://s7.ptbk.io/',
|
|
21657
|
+
},
|
|
21658
|
+
{
|
|
21659
|
+
title: 'Promptbook Testing server 8',
|
|
21660
|
+
description: `General-purpose testing server.`,
|
|
21661
|
+
owner: PROMPTBOOK_LEGAL_ENTITY,
|
|
21662
|
+
url: 'https://s8.ptbk.io/',
|
|
21663
|
+
},
|
|
21664
|
+
];
|
|
21665
|
+
// Note: [💞] Ignore a discrepancy between file name and entity name
|
|
21666
|
+
|
|
21614
21667
|
var css_248z$d = ".BookEditor-module_BookEditor__s-0PU{width:100%}.BookEditor-module_bookEditorContainer__wLMwM{box-sizing:border-box;height:100%;padding:10px 25px 0;position:relative;width:100%}.BookEditor-module_bookEditorContainer__wLMwM.BookEditor-module_isVerbose__VQ6iL{background-color:rgba(0,0,0,.05);outline:1px dotted rgba(0,0,0,.5)}.BookEditor-module_isVerbose__VQ6iL{outline:2px dotted #ff7526}.BookEditor-module_bookEditorWrapper__twppD{background-color:#fff;border:1px solid rgba(209,213,219,.8);border-radius:1rem;box-shadow:0 1px 2px 0 rgba(0,0,0,.05);overflow:hidden;padding-top:10px;transition:box-shadow .2s ease-in-out}.BookEditor-module_isVerbose__VQ6iL .BookEditor-module_bookEditorWrapper__twppD{overflow:visible}.BookEditor-module_bookEditorWrapper__twppD:hover{box-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -1px rgba(0,0,0,.06)}.BookEditor-module_BookEditor__s-0PU[data-book-editor-theme=dark] .BookEditor-module_bookEditorWrapper__twppD{background:linear-gradient(180deg,rgba(15,23,42,.98),rgba(8,15,28,.98));border-color:rgba(51,65,85,.92);box-shadow:0 20px 45px rgba(2,6,23,.4)}.BookEditor-module_BookEditor__s-0PU[data-book-editor-theme=dark] .BookEditor-module_bookEditorWrapper__twppD:hover{box-shadow:0 24px 50px rgba(2,6,23,.48)}.BookEditor-module_bookEditorWrapper__twppD.BookEditor-module_isBorderRadiusDisabled__h1I3v{border-radius:0}.BookEditor-module_dropOverlay__xWWoX{align-items:center;background-color:rgba(0,0,0,.5);bottom:0;color:#fff;display:flex;font-size:1.5rem;justify-content:center;left:0;pointer-events:none;position:absolute;right:0;top:0;z-index:100}.BookEditor-module_bookEditorActionbar__KW6dc{position:absolute;right:55px;top:10px;z-index:100}.BookEditor-module_fullscreen__rktsl{border:none;border-radius:0;bottom:0;box-shadow:none;height:100%;left:0;padding-top:50px;position:fixed;right:0;top:0;width:100%;z-index:9999}.BookEditor-module_button__hS390{align-items:center;background-color:#fff;border:1px solid #d1d5db;border-radius:.375rem;box-shadow:0 1px 2px 0 rgba(0,0,0,.05);color:#374151;cursor:pointer;display:inline-flex;gap:.5rem;padding:.5rem 1rem;transition:all .2s ease-in-out}.BookEditor-module_button__hS390:hover{background-color:#f9fafb;border-color:#b7bcce;box-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px 0 rgba(0,0,0,.06)}.BookEditor-module_BookEditor__s-0PU[data-book-editor-theme=dark] .BookEditor-module_button__hS390{background-color:rgba(15,23,42,.92);border-color:rgba(71,85,105,.9);box-shadow:0 1px 2px 0 rgba(2,6,23,.35);color:#e2e8f0}.BookEditor-module_BookEditor__s-0PU[data-book-editor-theme=dark] .BookEditor-module_button__hS390:hover{background-color:rgba(30,41,59,.98);border-color:rgba(125,211,252,.5);box-shadow:0 10px 24px rgba(2,6,23,.35)}.BookEditor-module_savedNotification__OiX9L{align-items:center;animation:BookEditor-module_fadeOut__q8JnR 2s forwards;background-color:rgba(0,0,0,.7);border-radius:.5rem;color:#fff;display:flex;font-size:1.25rem;gap:.5rem;left:50%;padding:1rem 2rem;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:1000}.BookEditor-module_BookEditor__s-0PU[data-book-editor-theme=dark] .BookEditor-module_savedNotification__OiX9L{background-color:rgba(2,6,23,.86);border:1px solid rgba(51,65,85,.9);color:#e2e8f0}.BookEditor-module_uploadPanel__2JJtD{background:hsla(0,0%,100%,.98);border:1px solid rgba(209,213,219,.9);border-radius:12px;bottom:20px;box-shadow:0 12px 30px rgba(15,23,42,.15);display:flex;flex-direction:column;gap:10px;max-width:calc(100% - 40px);padding:12px;position:absolute;right:20px;width:420px;z-index:220}.BookEditor-module_BookEditor__s-0PU[data-book-editor-theme=dark] .BookEditor-module_uploadPanel__2JJtD{background:rgba(8,15,28,.96);border-color:rgba(51,65,85,.9);box-shadow:0 18px 40px rgba(2,6,23,.45)}.BookEditor-module_uploadPanelHeader__pdJd2{align-items:center;display:flex;gap:12px;justify-content:space-between}.BookEditor-module_uploadPanelTitle__TJIVF{color:#111827;font-size:.95rem;font-weight:600}.BookEditor-module_BookEditor__s-0PU[data-book-editor-theme=dark] .BookEditor-module_uploadPanelTitle__TJIVF{color:#f8fafc}.BookEditor-module_uploadPanelHeaderMeta__Xw0uI{color:#6b7280;font-size:.75rem}.BookEditor-module_BookEditor__s-0PU[data-book-editor-theme=dark] .BookEditor-module_uploadPanelHeaderMeta__Xw0uI,.BookEditor-module_BookEditor__s-0PU[data-book-editor-theme=dark] .BookEditor-module_uploadPanelSummary__rwSbG,.BookEditor-module_BookEditor__s-0PU[data-book-editor-theme=dark] .BookEditor-module_uploadRowMeta__1lz9h,.BookEditor-module_BookEditor__s-0PU[data-book-editor-theme=dark] .BookEditor-module_uploadRowStatus__jsUb-{color:#94a3b8}.BookEditor-module_uploadPanelSummary__rwSbG{color:#6b7280;display:grid;font-size:.75rem;gap:4px 12px;grid-template-columns:1fr 1fr}.BookEditor-module_uploadPanelProgressBar__a6pjf{background:#e5e7eb;border-radius:999px;height:6px;overflow:hidden}.BookEditor-module_uploadPanelProgressFill__l-TKR{background:linear-gradient(90deg,#2563eb,#10b981);height:100%;transition:width .2s ease}.BookEditor-module_BookEditor__s-0PU[data-book-editor-theme=dark] .BookEditor-module_uploadPanelProgressBar__a6pjf,.BookEditor-module_BookEditor__s-0PU[data-book-editor-theme=dark] .BookEditor-module_uploadRowProgressBar__NoBA7{background:#1e293b}.BookEditor-module_uploadPanelList__VxEd5{display:flex;flex-direction:column;gap:8px;max-height:220px;overflow-y:auto;padding-right:4px}.BookEditor-module_uploadRow__QiSFg{background:#fff;border:1px solid #e5e7eb;border-radius:10px;display:flex;flex-direction:column;gap:6px;padding:8px}.BookEditor-module_BookEditor__s-0PU[data-book-editor-theme=dark] .BookEditor-module_uploadRow__QiSFg{background:rgba(15,23,42,.92);border-color:#334155}.BookEditor-module_uploadRowHeader__po0j5{align-items:center;display:flex;gap:8px;justify-content:space-between}.BookEditor-module_uploadRowName__doQRO{color:#111827;font-size:.8rem;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.BookEditor-module_BookEditor__s-0PU[data-book-editor-theme=dark] .BookEditor-module_uploadRowName__doQRO{color:#f8fafc}.BookEditor-module_uploadRowStatus__jsUb-{color:#6b7280;font-size:.7rem}.BookEditor-module_uploadRowMeta__1lz9h{color:#6b7280;display:flex;font-size:.7rem;justify-content:space-between}.BookEditor-module_uploadRowProgressBar__NoBA7{background:#e5e7eb;border-radius:999px;height:4px;overflow:hidden}.BookEditor-module_uploadRowProgressFill__TrP7e{background:#3b82f6;height:100%;transition:width .2s ease}.BookEditor-module_uploadRowActions__5Y1Mq{display:flex;gap:6px}.BookEditor-module_uploadActionButton__CqJrr{background:#f9fafb;border:1px solid #d1d5db;border-radius:6px;color:#374151;cursor:pointer;font-size:.7rem;padding:2px 8px;transition:all .15s ease-in-out}.BookEditor-module_uploadActionButton__CqJrr:hover{background:#eef2f7;border-color:#cbd5f5}.BookEditor-module_BookEditor__s-0PU[data-book-editor-theme=dark] .BookEditor-module_uploadActionButton__CqJrr{background:#0f172a;border-color:#475569;color:#e2e8f0}.BookEditor-module_BookEditor__s-0PU[data-book-editor-theme=dark] .BookEditor-module_uploadActionButton__CqJrr:hover{background:#1e293b;border-color:#7dd3fc}.BookEditor-module_uploadRowError__eEHWw{color:#b91c1c;font-size:.7rem}.BookEditor-module_aboutPromptbookInformation__eiBL0{color:#111827;font-family:var(--font-poppins,system-ui,-apple-system,BlinkMacSystemFont,\"Segoe UI\",sans-serif);font-size:.95rem;line-height:1.6;max-width:680px}.BookEditor-module_aboutPromptbookInformation__eiBL0>:first-child{margin-top:0}.BookEditor-module_aboutPromptbookInformation__eiBL0>:last-child{margin-bottom:0}.BookEditor-module_aboutPromptbookInformation__eiBL0 h1,.BookEditor-module_aboutPromptbookInformation__eiBL0 h2{color:#0f172a;font-weight:650;line-height:1.25}.BookEditor-module_aboutPromptbookInformation__eiBL0 h1{font-size:1.5rem;margin:0 0 .75rem}.BookEditor-module_aboutPromptbookInformation__eiBL0 h2{font-size:1.15rem;margin:1.35rem 0 .55rem}.BookEditor-module_aboutPromptbookInformation__eiBL0 p{margin:0 0 .9rem}.BookEditor-module_aboutPromptbookInformation__eiBL0 ol,.BookEditor-module_aboutPromptbookInformation__eiBL0 ul{display:grid;gap:.35rem;margin:.55rem 0 1rem;padding-left:1.35rem}.BookEditor-module_aboutPromptbookInformation__eiBL0 a{color:#2563eb;text-decoration:underline;text-underline-offset:.16em}.BookEditor-module_aboutPromptbookInformation__eiBL0 code{background:rgba(15,23,42,.06);border:1px solid rgba(15,23,42,.12);border-radius:6px;color:#111827;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,monospace;font-size:.9em;padding:.12em .34em}@keyframes BookEditor-module_fadeOut__q8JnR{0%{opacity:0}10%{opacity:1}70%{opacity:1}to{opacity:0}}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkJvb2tFZGl0b3IubW9kdWxlLmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxxQ0FFSSxVQUNKL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AgICB9XG4gICAgNzAlIHtcbiAgICAgICAgb3BhY2l0eTogMTtcbiAgICB9XG4gICAgMTAwJSB7XG4gICAgICAgIG9wYWNpdHk6IDA7XG4gICAgfVxufVxuIl19 */";
|
|
21615
21668
|
var styles$d = {"BookEditor":"BookEditor-module_BookEditor__s-0PU","bookEditorContainer":"BookEditor-module_bookEditorContainer__wLMwM","isVerbose":"BookEditor-module_isVerbose__VQ6iL","bookEditorWrapper":"BookEditor-module_bookEditorWrapper__twppD","isBorderRadiusDisabled":"BookEditor-module_isBorderRadiusDisabled__h1I3v","dropOverlay":"BookEditor-module_dropOverlay__xWWoX","bookEditorActionbar":"BookEditor-module_bookEditorActionbar__KW6dc","fullscreen":"BookEditor-module_fullscreen__rktsl","button":"BookEditor-module_button__hS390","savedNotification":"BookEditor-module_savedNotification__OiX9L","fadeOut":"BookEditor-module_fadeOut__q8JnR","uploadPanel":"BookEditor-module_uploadPanel__2JJtD","uploadPanelHeader":"BookEditor-module_uploadPanelHeader__pdJd2","uploadPanelTitle":"BookEditor-module_uploadPanelTitle__TJIVF","uploadPanelHeaderMeta":"BookEditor-module_uploadPanelHeaderMeta__Xw0uI","uploadPanelSummary":"BookEditor-module_uploadPanelSummary__rwSbG","uploadRowStatus":"BookEditor-module_uploadRowStatus__jsUb-","uploadRowMeta":"BookEditor-module_uploadRowMeta__1lz9h","uploadPanelProgressBar":"BookEditor-module_uploadPanelProgressBar__a6pjf","uploadPanelProgressFill":"BookEditor-module_uploadPanelProgressFill__l-TKR","uploadRowProgressBar":"BookEditor-module_uploadRowProgressBar__NoBA7","uploadPanelList":"BookEditor-module_uploadPanelList__VxEd5","uploadRow":"BookEditor-module_uploadRow__QiSFg","uploadRowHeader":"BookEditor-module_uploadRowHeader__po0j5","uploadRowName":"BookEditor-module_uploadRowName__doQRO","uploadRowProgressFill":"BookEditor-module_uploadRowProgressFill__TrP7e","uploadRowActions":"BookEditor-module_uploadRowActions__5Y1Mq","uploadActionButton":"BookEditor-module_uploadActionButton__CqJrr","uploadRowError":"BookEditor-module_uploadRowError__eEHWw","aboutPromptbookInformation":"BookEditor-module_aboutPromptbookInformation__eiBL0"};
|
|
21616
21669
|
styleInject(css_248z$d);
|
|
@@ -21642,135 +21695,6 @@
|
|
|
21642
21695
|
return (jsxRuntime.jsxs("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", ...props, children: [jsxRuntime.jsx("path", { d: "M4 17V7a3 3 0 0 1 3-3h10a3 3 0 0 1 3 3v7a3 3 0 0 1-3 3H7l-3 3z", fill: color, fillOpacity: "0.08", stroke: color }), jsxRuntime.jsx("path", { d: "M12 9v5", stroke: color }), jsxRuntime.jsx("path", { d: "M9.5 12.5L12 15l2.5-2.5", stroke: color })] }));
|
|
21643
21696
|
}
|
|
21644
21697
|
|
|
21645
|
-
/**
|
|
21646
|
-
* Detects if the code is running in a browser environment in main thread (Not in a web worker)
|
|
21647
|
-
*
|
|
21648
|
-
* Note: `$` is used to indicate that this function is not a pure function - it looks at the global object to determine the environment
|
|
21649
|
-
*
|
|
21650
|
-
* @public exported from `@promptbook/utils`
|
|
21651
|
-
*/
|
|
21652
|
-
function $isRunningInBrowser() {
|
|
21653
|
-
try {
|
|
21654
|
-
return typeof window !== 'undefined' && typeof window.document !== 'undefined';
|
|
21655
|
-
}
|
|
21656
|
-
catch (e) {
|
|
21657
|
-
return false;
|
|
21658
|
-
}
|
|
21659
|
-
}
|
|
21660
|
-
// TODO: [🎺]
|
|
21661
|
-
|
|
21662
|
-
/**
|
|
21663
|
-
* Converts Blob, File or MediaSource to url using URL.createObjectURL
|
|
21664
|
-
*
|
|
21665
|
-
* @public exported from `@promptbook/browser`
|
|
21666
|
-
*/
|
|
21667
|
-
class ObjectUrl extends destroyable.Registration {
|
|
21668
|
-
constructor(teardownLogic, src) {
|
|
21669
|
-
super(teardownLogic);
|
|
21670
|
-
this.src = src;
|
|
21671
|
-
}
|
|
21672
|
-
/**
|
|
21673
|
-
* Creates ObjectUrl from multiple input types
|
|
21674
|
-
* Note: DO NOT forget to call destroy() when you are done with it
|
|
21675
|
-
*/
|
|
21676
|
-
static from(source, mimeType) {
|
|
21677
|
-
if (typeof source === 'string') {
|
|
21678
|
-
return ObjectUrl.fromString(source, mimeType);
|
|
21679
|
-
}
|
|
21680
|
-
if ((source instanceof Blob || source instanceof File) && source.type !== mimeType) {
|
|
21681
|
-
throw new Error(`Source type ${source.type} does not match given mimeType ${mimeType}`);
|
|
21682
|
-
}
|
|
21683
|
-
return ObjectUrl.fromBlob(source);
|
|
21684
|
-
}
|
|
21685
|
-
/**
|
|
21686
|
-
* Creates ObjectUrl from string
|
|
21687
|
-
* Note: DO NOT forget to call destroy() when you are done with it
|
|
21688
|
-
*/
|
|
21689
|
-
static fromString(source, mimeType) {
|
|
21690
|
-
return ObjectUrl.fromBlob(new Blob([source], { type: mimeType }));
|
|
21691
|
-
}
|
|
21692
|
-
/**
|
|
21693
|
-
* Creates ObjectUrl
|
|
21694
|
-
* DO NOT forget to call destroy() when you are done with it
|
|
21695
|
-
*/
|
|
21696
|
-
static fromBlob(source) {
|
|
21697
|
-
const src = URL.createObjectURL(source);
|
|
21698
|
-
return new ObjectUrl(() => {
|
|
21699
|
-
URL.revokeObjectURL(src);
|
|
21700
|
-
}, src);
|
|
21701
|
-
}
|
|
21702
|
-
/**
|
|
21703
|
-
* Creates ObjectUrl:
|
|
21704
|
-
* 1) With functionality for Blobs, Files or MediaSources
|
|
21705
|
-
* 2) Just a wrapper for string urls
|
|
21706
|
-
*
|
|
21707
|
-
* DO NOT forget to call destroy() when you are done with it
|
|
21708
|
-
*/
|
|
21709
|
-
static fromBlobOrUrl(source) {
|
|
21710
|
-
if (typeof source === 'string' || source instanceof URL /* <- TODO: Probably check isValidUrl */) {
|
|
21711
|
-
return new ObjectUrl(() => {
|
|
21712
|
-
// Note: Nothing to do here
|
|
21713
|
-
}, source.toString());
|
|
21714
|
-
}
|
|
21715
|
-
else {
|
|
21716
|
-
return ObjectUrl.fromBlob(source);
|
|
21717
|
-
}
|
|
21718
|
-
}
|
|
21719
|
-
/**
|
|
21720
|
-
* Gets object url as string
|
|
21721
|
-
* @alias src
|
|
21722
|
-
*/
|
|
21723
|
-
get href() {
|
|
21724
|
-
return this.src;
|
|
21725
|
-
}
|
|
21726
|
-
/**
|
|
21727
|
-
* Gets object url as URL object
|
|
21728
|
-
*/
|
|
21729
|
-
get url() {
|
|
21730
|
-
return new URL(this.src);
|
|
21731
|
-
}
|
|
21732
|
-
}
|
|
21733
|
-
// Note: [🔵] Code for browser file helper [ObjectUrl](src/utils/files/ObjectUrl.ts) should never be published outside of `@promptbook/browser`
|
|
21734
|
-
|
|
21735
|
-
/**
|
|
21736
|
-
* Download a File in a browser
|
|
21737
|
-
*
|
|
21738
|
-
* Note: `$` is used to indicate that this function is not a pure function - its purpose is to cause a side effect (download a file)
|
|
21739
|
-
*
|
|
21740
|
-
* @public exported from `@promptbook/browser`
|
|
21741
|
-
*/
|
|
21742
|
-
async function $induceFileDownload(fileOrBlobOrUrl) {
|
|
21743
|
-
if (!$isRunningInBrowser()) {
|
|
21744
|
-
throw new Error('Function `$induceFileDownload` is available ONLY in browser');
|
|
21745
|
-
}
|
|
21746
|
-
const objectUrl = ObjectUrl.fromBlobOrUrl(fileOrBlobOrUrl);
|
|
21747
|
-
const link = window.document.createElement('a');
|
|
21748
|
-
link.href = objectUrl.href;
|
|
21749
|
-
link.download = fileOrBlobOrUrl.name || 'untitled' /* <- TODO: Add proper extension according to url */;
|
|
21750
|
-
link.click();
|
|
21751
|
-
await objectUrl.destroy();
|
|
21752
|
-
}
|
|
21753
|
-
// Note: [🔵] Code for browser file helper [$induceFileDownload](src/utils/files/$induceFileDownload.ts) should never be published outside of `@promptbook/browser`
|
|
21754
|
-
|
|
21755
|
-
/**
|
|
21756
|
-
* Download a Book in a browser
|
|
21757
|
-
*
|
|
21758
|
-
* Note: `$` is used to indicate that this function is not a pure function - its purpose is to cause a side effect (download a file)
|
|
21759
|
-
*
|
|
21760
|
-
* @public exported from `@promptbook/browser`
|
|
21761
|
-
*/
|
|
21762
|
-
async function $induceBookDownload(book) {
|
|
21763
|
-
if (!$isRunningInBrowser()) {
|
|
21764
|
-
throw new Error('Function `$induceBookDownload` is available ONLY in browser');
|
|
21765
|
-
}
|
|
21766
|
-
const { agentName } = parseAgentSource(book);
|
|
21767
|
-
const bookFile = new File([book], `${titleToName(agentName || 'AI Avatar')}.book`, {
|
|
21768
|
-
type: 'application/json',
|
|
21769
|
-
});
|
|
21770
|
-
return /* not await */ $induceFileDownload(bookFile);
|
|
21771
|
-
}
|
|
21772
|
-
// Note: [🔵] Code for browser file helper [$induceBookDownload](src/utils/files/$induceBookDownload.ts) should never be published outside of `@promptbook/browser`
|
|
21773
|
-
|
|
21774
21698
|
/**
|
|
21775
21699
|
* Renders an information/about icon.
|
|
21776
21700
|
*
|
|
@@ -21987,54 +21911,21 @@
|
|
|
21987
21911
|
}
|
|
21988
21912
|
|
|
21989
21913
|
/**
|
|
21990
|
-
*
|
|
21991
|
-
*
|
|
21992
|
-
* Used for "Adam" agent which is built in as default ancestor for new agents and other well known agents
|
|
21993
|
-
*
|
|
21994
|
-
* @public exported from `@promptbook/core`
|
|
21995
|
-
*/
|
|
21996
|
-
const CORE_AGENTS_SERVER = {
|
|
21997
|
-
title: 'Promptbook Core',
|
|
21998
|
-
description: `Core Promptbook server used for Adam agent which is built in as default ancestor for new agents and other well known agents.`,
|
|
21999
|
-
owner: PROMPTBOOK_LEGAL_ENTITY,
|
|
22000
|
-
url: 'https://core.ptbk.io/',
|
|
22001
|
-
};
|
|
22002
|
-
// <- TODO: [🆎] Allow to override (set) well-known agent names via Metadata
|
|
22003
|
-
/**
|
|
22004
|
-
* Available agents servers for the Promptbook
|
|
21914
|
+
* Detects if the code is running in a browser environment in main thread (Not in a web worker)
|
|
22005
21915
|
*
|
|
22006
|
-
*
|
|
21916
|
+
* Note: `$` is used to indicate that this function is not a pure function - it looks at the global object to determine the environment
|
|
22007
21917
|
*
|
|
22008
|
-
* @public exported from `@promptbook/
|
|
21918
|
+
* @public exported from `@promptbook/utils`
|
|
22009
21919
|
*/
|
|
22010
|
-
|
|
22011
|
-
|
|
22012
|
-
|
|
22013
|
-
|
|
22014
|
-
|
|
22015
|
-
|
|
22016
|
-
|
|
22017
|
-
|
|
22018
|
-
|
|
22019
|
-
title: 'Promptbook Testing server 6',
|
|
22020
|
-
description: `General-purpose testing server.`,
|
|
22021
|
-
owner: PROMPTBOOK_LEGAL_ENTITY,
|
|
22022
|
-
url: 'https://s6.ptbk.io/',
|
|
22023
|
-
},
|
|
22024
|
-
{
|
|
22025
|
-
title: 'Promptbook Testing server 7',
|
|
22026
|
-
description: `General-purpose testing server.`,
|
|
22027
|
-
owner: PROMPTBOOK_LEGAL_ENTITY,
|
|
22028
|
-
url: 'https://s7.ptbk.io/',
|
|
22029
|
-
},
|
|
22030
|
-
{
|
|
22031
|
-
title: 'Promptbook Testing server 8',
|
|
22032
|
-
description: `General-purpose testing server.`,
|
|
22033
|
-
owner: PROMPTBOOK_LEGAL_ENTITY,
|
|
22034
|
-
url: 'https://s8.ptbk.io/',
|
|
22035
|
-
},
|
|
22036
|
-
];
|
|
22037
|
-
// Note: [💞] Ignore a discrepancy between file name and entity name
|
|
21920
|
+
function $isRunningInBrowser() {
|
|
21921
|
+
try {
|
|
21922
|
+
return typeof window !== 'undefined' && typeof window.document !== 'undefined';
|
|
21923
|
+
}
|
|
21924
|
+
catch (e) {
|
|
21925
|
+
return false;
|
|
21926
|
+
}
|
|
21927
|
+
}
|
|
21928
|
+
// TODO: [🎺]
|
|
22038
21929
|
|
|
22039
21930
|
/**
|
|
22040
21931
|
* Detects if the code is running in jest environment
|
|
@@ -22124,9 +22015,32 @@
|
|
|
22124
22015
|
...$detectRuntimeEnvironment(),
|
|
22125
22016
|
isCostPrevented: IS_COST_PREVENTED,
|
|
22126
22017
|
};
|
|
22127
|
-
return (jsxRuntime.jsxs("div", { className: styles$d.aboutPromptbookInformation, children: [jsxRuntime.jsx("h1", { children: NAME }), jsxRuntime.jsx("p", { children: CLAIM }), jsxRuntime.jsxs("ul", { children: [jsxRuntime.jsx("li", { children: jsxRuntime.jsxs("a", { href: "https://github.com/webgptorg/promptbook", target: "_blank", rel: "noopener noreferrer", children: ["Promptbook engine version ", jsxRuntime.jsx("code", { children: PROMPTBOOK_ENGINE_VERSION })] }) }), jsxRuntime.jsx("li", { children: jsxRuntime.jsxs("a", { href: "https://github.com/webgptorg/book", target: "_blank", rel: "noopener noreferrer", children: ["Book language version ", jsxRuntime.jsx("code", { children: BOOK_LANGUAGE_VERSION })] }) })] }), isServersInfoIncluded && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("h2", { children: "Servers" }), jsxRuntime.jsx("ol", { children: PUBLIC_AGENTS_SERVERS.map(({ title, description, url }) => (jsxRuntime.jsxs("li", { children: [jsxRuntime.jsx("strong", { children: title }), " ", description, ' ', jsxRuntime.jsx("a", { href: url, target: "_blank", rel: "noopener noreferrer", children: url })] }, url))) })] })), isRuntimeEnvironmentInfoIncluded && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("h2", { children: "Environment" }), jsxRuntime.jsx("ul", { children: Object.entries(runtimeEnvironmentInfo).map(([key, value]) => (jsxRuntime.jsxs("li", { children: [jsxRuntime.jsxs("strong", { children: [key, ":"] }), " ",
|
|
22018
|
+
return (jsxRuntime.jsxs("div", { className: styles$d.aboutPromptbookInformation, children: [jsxRuntime.jsx("h1", { children: NAME }), jsxRuntime.jsx("p", { children: CLAIM }), jsxRuntime.jsxs("ul", { children: [jsxRuntime.jsx("li", { children: jsxRuntime.jsxs("a", { href: "https://github.com/webgptorg/promptbook", target: "_blank", rel: "noopener noreferrer", children: ["Promptbook engine version ", jsxRuntime.jsx("code", { children: PROMPTBOOK_ENGINE_VERSION })] }) }), jsxRuntime.jsx("li", { children: jsxRuntime.jsxs("a", { href: "https://github.com/webgptorg/book", target: "_blank", rel: "noopener noreferrer", children: ["Book language version ", jsxRuntime.jsx("code", { children: BOOK_LANGUAGE_VERSION })] }) })] }), isServersInfoIncluded && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("h2", { children: "Servers" }), jsxRuntime.jsx("ol", { children: PUBLIC_AGENTS_SERVERS.map(({ title, description, url }) => (jsxRuntime.jsxs("li", { children: [jsxRuntime.jsx("strong", { children: title }), " ", description, ' ', jsxRuntime.jsx("a", { href: url, target: "_blank", rel: "noopener noreferrer", children: url })] }, url))) })] })), isRuntimeEnvironmentInfoIncluded && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("h2", { children: "Environment" }), jsxRuntime.jsx("ul", { children: Object.entries(runtimeEnvironmentInfo).map(([key, value]) => (jsxRuntime.jsxs("li", { children: [jsxRuntime.jsxs("strong", { children: [key, ":"] }), " ", String(value)] }, key))) })] }))] }));
|
|
22128
22019
|
}
|
|
22129
22020
|
|
|
22021
|
+
function induceBookDownloadInBrowser(book) {
|
|
22022
|
+
const filename = `${normalizeBookDownloadName(extractBookTitle(book) || 'AI Avatar')}.book`;
|
|
22023
|
+
const objectUrl = URL.createObjectURL(new Blob([book], { type: 'application/json' }));
|
|
22024
|
+
const link = window.document.createElement('a');
|
|
22025
|
+
link.href = objectUrl;
|
|
22026
|
+
link.download = filename;
|
|
22027
|
+
link.click();
|
|
22028
|
+
URL.revokeObjectURL(objectUrl);
|
|
22029
|
+
}
|
|
22030
|
+
function extractBookTitle(book) {
|
|
22031
|
+
return (book
|
|
22032
|
+
.split(/\r?\n/)
|
|
22033
|
+
.map((line) => line.trim())
|
|
22034
|
+
.find(Boolean) || null);
|
|
22035
|
+
}
|
|
22036
|
+
function normalizeBookDownloadName(value) {
|
|
22037
|
+
return (value
|
|
22038
|
+
.normalize('NFD')
|
|
22039
|
+
.replace(/[\u0300-\u036f]/g, '')
|
|
22040
|
+
.replace(/[^\dA-Za-z]+/g, '-')
|
|
22041
|
+
.replace(/^-+|-+$/g, '')
|
|
22042
|
+
.toLowerCase() || 'ai-avatar');
|
|
22043
|
+
}
|
|
22130
22044
|
/**
|
|
22131
22045
|
* Handles book editor actionbar.
|
|
22132
22046
|
*
|
|
@@ -22143,7 +22057,7 @@
|
|
|
22143
22057
|
}, [value]);
|
|
22144
22058
|
const handleDownload = react.useCallback(() => {
|
|
22145
22059
|
const book = validateBook(valueRef.current || DEFAULT_BOOK);
|
|
22146
|
-
|
|
22060
|
+
induceBookDownloadInBrowser(book);
|
|
22147
22061
|
}, []);
|
|
22148
22062
|
const actions = react.useMemo(() => {
|
|
22149
22063
|
const _actions = [...(hoistedMenuItems || [])];
|
|
@@ -22258,144 +22172,15 @@
|
|
|
22258
22172
|
}
|
|
22259
22173
|
|
|
22260
22174
|
/**
|
|
22261
|
-
*
|
|
22175
|
+
* Browser-compatible stub for `createDeprecatedCommitmentDiagnostics`.
|
|
22262
22176
|
*
|
|
22263
|
-
*
|
|
22264
|
-
*
|
|
22265
|
-
*
|
|
22266
|
-
* @public exported from `@promptbook/core`
|
|
22267
|
-
*/
|
|
22268
|
-
function getCommitmentDefinition(type) {
|
|
22269
|
-
return COMMITMENT_REGISTRY.find((commitmentDefinition) => commitmentDefinition.type === type) || null;
|
|
22270
|
-
}
|
|
22271
|
-
|
|
22272
|
-
/**
|
|
22273
|
-
* Warning message used for unfinished commitments.
|
|
22274
|
-
*/
|
|
22275
|
-
const UNFINISHED_COMMITMENT_MESSAGE = 'This commitment is unfinished and not ready to use. Be careful when using it.';
|
|
22276
|
-
/**
|
|
22277
|
-
* Low-level warning message used for low-level commitments.
|
|
22278
|
-
*/
|
|
22279
|
-
const LOW_LEVEL_COMMITMENT_MESSAGE = 'This commitment is low-level and not used by most of the users. Be careful when using it.';
|
|
22280
|
-
/**
|
|
22281
|
-
* Short badge text used for deprecated commitments.
|
|
22282
|
-
*/
|
|
22283
|
-
const DEPRECATED_COMMITMENT_BADGE_LABEL = 'Deprecated';
|
|
22284
|
-
/**
|
|
22285
|
-
* Short badge text used for unfinished and low-level commitments.
|
|
22286
|
-
*/
|
|
22287
|
-
const LOW_LEVEL_COMMITMENT_BADGE_LABEL = 'Low-level';
|
|
22288
|
-
/**
|
|
22289
|
-
* Longer label used for deprecated commitments.
|
|
22290
|
-
*/
|
|
22291
|
-
const DEPRECATED_COMMITMENT_DETAIL_LABEL = 'Deprecated commitment';
|
|
22292
|
-
/**
|
|
22293
|
-
* Longer label used for unfinished and low-level commitments.
|
|
22294
|
-
*/
|
|
22295
|
-
const LOW_LEVEL_COMMITMENT_DETAIL_LABEL = 'Low-level commitment';
|
|
22296
|
-
/**
|
|
22297
|
-
* Prefix used when formatting replacement guidance.
|
|
22298
|
-
*/
|
|
22299
|
-
const PREFERRED_REPLACEMENT_LABEL = 'Preferred replacement';
|
|
22300
|
-
/**
|
|
22301
|
-
* Formats preferred replacement guidance for deprecated commitments.
|
|
22302
|
-
*
|
|
22303
|
-
* @param replacedBy - Preferred replacement commitment keywords.
|
|
22304
|
-
* @returns Optional replacement guidance sentence with leading space.
|
|
22305
|
-
*
|
|
22306
|
-
* @private internal utility of commitment catalog notices
|
|
22307
|
-
*/
|
|
22308
|
-
function formatCommitmentReplacementText(replacedBy) {
|
|
22309
|
-
if (!replacedBy || replacedBy.length === 0) {
|
|
22310
|
-
return '';
|
|
22311
|
-
}
|
|
22312
|
-
return ` ${PREFERRED_REPLACEMENT_LABEL}: ${replacedBy.map((type) => `\`${type}\``).join(', ')}.`;
|
|
22313
|
-
}
|
|
22314
|
-
/**
|
|
22315
|
-
* Resolves the notice metadata for deprecated, unfinished, or low-level commitments.
|
|
22316
|
-
*
|
|
22317
|
-
* @param definition - Commitment definition to inspect.
|
|
22318
|
-
* @returns Notice metadata when the commitment should be surfaced with caution.
|
|
22319
|
-
*
|
|
22320
|
-
* @private internal utility of commitment catalog notices
|
|
22321
|
-
*/
|
|
22322
|
-
function getCommitmentNoticeMetadata(definition) {
|
|
22323
|
-
if (definition.isUnfinished) {
|
|
22324
|
-
return {
|
|
22325
|
-
kind: 'unfinished',
|
|
22326
|
-
badgeLabel: LOW_LEVEL_COMMITMENT_BADGE_LABEL,
|
|
22327
|
-
detailLabel: LOW_LEVEL_COMMITMENT_DETAIL_LABEL,
|
|
22328
|
-
message: UNFINISHED_COMMITMENT_MESSAGE,
|
|
22329
|
-
};
|
|
22330
|
-
}
|
|
22331
|
-
if (definition.isLowLevel) {
|
|
22332
|
-
return {
|
|
22333
|
-
kind: 'lowLevel',
|
|
22334
|
-
badgeLabel: LOW_LEVEL_COMMITMENT_BADGE_LABEL,
|
|
22335
|
-
detailLabel: LOW_LEVEL_COMMITMENT_DETAIL_LABEL,
|
|
22336
|
-
message: LOW_LEVEL_COMMITMENT_MESSAGE,
|
|
22337
|
-
};
|
|
22338
|
-
}
|
|
22339
|
-
if (definition.deprecation) {
|
|
22340
|
-
return {
|
|
22341
|
-
kind: 'deprecated',
|
|
22342
|
-
badgeLabel: DEPRECATED_COMMITMENT_BADGE_LABEL,
|
|
22343
|
-
detailLabel: DEPRECATED_COMMITMENT_DETAIL_LABEL,
|
|
22344
|
-
message: definition.deprecation.message,
|
|
22345
|
-
};
|
|
22346
|
-
}
|
|
22347
|
-
return null;
|
|
22348
|
-
}
|
|
22349
|
-
|
|
22350
|
-
/**
|
|
22351
|
-
* Creates Book editor diagnostics for deprecated, unfinished, and low-level commitment keywords.
|
|
22352
|
-
*
|
|
22353
|
-
* The notice metadata is UI-only. This helper surfaces it in Monaco so legacy,
|
|
22354
|
-
* unfinished, and low-level commitments remain functional while still guiding
|
|
22355
|
-
* authors toward preferred replacements or cautioning them about low-level
|
|
22356
|
-
* usage.
|
|
22357
|
-
*
|
|
22358
|
-
* @param agentSource - Current editor content.
|
|
22359
|
-
* @returns Warning markers for deprecated, unfinished, and low-level commitment keywords.
|
|
22177
|
+
* In the browser build the full Node.js implementation is not available,
|
|
22178
|
+
* so this stub always returns an empty array to keep the editor functional.
|
|
22360
22179
|
*
|
|
22361
22180
|
* @private internal utility of `BookEditorMonaco`
|
|
22362
22181
|
*/
|
|
22363
|
-
function createDeprecatedCommitmentDiagnostics(
|
|
22364
|
-
|
|
22365
|
-
if (!(agentSource === null || agentSource === void 0 ? void 0 : agentSource.trim())) {
|
|
22366
|
-
return [];
|
|
22367
|
-
}
|
|
22368
|
-
const parsed = parseAgentSourceWithCommitments(agentSource);
|
|
22369
|
-
const diagnostics = [];
|
|
22370
|
-
for (const commitment of parsed.commitments) {
|
|
22371
|
-
const definition = getCommitmentDefinition(commitment.type);
|
|
22372
|
-
const notice = definition ? getCommitmentNoticeMetadata(definition) : null;
|
|
22373
|
-
if (!definition || !notice) {
|
|
22374
|
-
continue;
|
|
22375
|
-
}
|
|
22376
|
-
const typeMatch = definition.createTypeRegex().exec(commitment.originalLine);
|
|
22377
|
-
if (!((_a = typeMatch === null || typeMatch === void 0 ? void 0 : typeMatch.groups) === null || _a === void 0 ? void 0 : _a.type)) {
|
|
22378
|
-
continue;
|
|
22379
|
-
}
|
|
22380
|
-
const matchedType = typeMatch.groups.type;
|
|
22381
|
-
const leadingCharactersCount = typeMatch[0].length - matchedType.length;
|
|
22382
|
-
const startColumn = leadingCharactersCount + 1;
|
|
22383
|
-
const endColumn = startColumn + matchedType.length;
|
|
22384
|
-
// Keep the diagnostic sentence compact while reusing the shared notice copy.
|
|
22385
|
-
const message = notice.kind === 'deprecated'
|
|
22386
|
-
? `\`${commitment.type}\` is deprecated. ${notice.message}`
|
|
22387
|
-
: `\`${commitment.type}\` is ${notice.message.replace(/^This commitment is\s+/u, '')}`;
|
|
22388
|
-
diagnostics.push({
|
|
22389
|
-
startLineNumber: commitment.lineNumber,
|
|
22390
|
-
startColumn,
|
|
22391
|
-
endLineNumber: commitment.lineNumber,
|
|
22392
|
-
endColumn,
|
|
22393
|
-
message,
|
|
22394
|
-
source: 'Promptbook',
|
|
22395
|
-
severity: 'warning',
|
|
22396
|
-
});
|
|
22397
|
-
}
|
|
22398
|
-
return diagnostics;
|
|
22182
|
+
function createDeprecatedCommitmentDiagnostics(_agentSource) {
|
|
22183
|
+
return [];
|
|
22399
22184
|
}
|
|
22400
22185
|
|
|
22401
22186
|
/**
|
|
@@ -22754,103 +22539,6 @@
|
|
|
22754
22539
|
};
|
|
22755
22540
|
}
|
|
22756
22541
|
|
|
22757
|
-
/**
|
|
22758
|
-
* Priority order for the important commitments shown first in catalogues and intellisense.
|
|
22759
|
-
*
|
|
22760
|
-
* Canonical singular names stay ahead of their plural aliases so the most important
|
|
22761
|
-
* commitments remain easy to scan.
|
|
22762
|
-
*
|
|
22763
|
-
* @private internal constant of commitment catalog sorting
|
|
22764
|
-
*/
|
|
22765
|
-
const IMPORTANT_COMMITMENT_TYPE_SORT_ORDER = new Map([
|
|
22766
|
-
['GOAL', 0],
|
|
22767
|
-
['RULE', 1],
|
|
22768
|
-
['KNOWLEDGE', 2],
|
|
22769
|
-
['TEAM', 3],
|
|
22770
|
-
['GOALS', 4],
|
|
22771
|
-
['RULES', 5],
|
|
22772
|
-
]);
|
|
22773
|
-
/**
|
|
22774
|
-
* Sort rank used when unfinished, low-level, and deprecated commitments should be grouped last.
|
|
22775
|
-
*
|
|
22776
|
-
* @private internal constant of commitment catalog sorting
|
|
22777
|
-
*/
|
|
22778
|
-
const COMMITMENT_STATUS_SORT_ORDER = {
|
|
22779
|
-
normal: 0,
|
|
22780
|
-
deprecated: 1,
|
|
22781
|
-
unfinished: 2,
|
|
22782
|
-
lowLevel: 3,
|
|
22783
|
-
};
|
|
22784
|
-
/**
|
|
22785
|
-
* Resolves the relative sort rank of one commitment status.
|
|
22786
|
-
*
|
|
22787
|
-
* @param definition - Commitment definition to rank.
|
|
22788
|
-
* @param options - Sorting options.
|
|
22789
|
-
* @returns Relative sort rank for the definition.
|
|
22790
|
-
*
|
|
22791
|
-
* @private internal helper of commitment catalog sorting
|
|
22792
|
-
*/
|
|
22793
|
-
function resolveCommitmentStatusSortRank(definition, options) {
|
|
22794
|
-
let statusSortRank = COMMITMENT_STATUS_SORT_ORDER.normal;
|
|
22795
|
-
if (options.isDeprecatedLast && definition.deprecation) {
|
|
22796
|
-
statusSortRank = Math.max(statusSortRank, COMMITMENT_STATUS_SORT_ORDER.deprecated);
|
|
22797
|
-
}
|
|
22798
|
-
if (options.isUnfinishedLast && definition.isUnfinished) {
|
|
22799
|
-
statusSortRank = Math.max(statusSortRank, COMMITMENT_STATUS_SORT_ORDER.unfinished);
|
|
22800
|
-
}
|
|
22801
|
-
if (options.isLowLevelLast && definition.isLowLevel) {
|
|
22802
|
-
statusSortRank = Math.max(statusSortRank, COMMITMENT_STATUS_SORT_ORDER.lowLevel);
|
|
22803
|
-
}
|
|
22804
|
-
return statusSortRank;
|
|
22805
|
-
}
|
|
22806
|
-
/**
|
|
22807
|
-
* Sorts commitment definitions so the important ones stay at the top.
|
|
22808
|
-
*
|
|
22809
|
-
* @param commitmentDefinitions - Definitions to sort.
|
|
22810
|
-
* @param options - Sorting options.
|
|
22811
|
-
* @returns Sorted commitment definitions.
|
|
22812
|
-
*
|
|
22813
|
-
* @private internal helper of commitment catalog sorting
|
|
22814
|
-
*/
|
|
22815
|
-
function sortCommitmentDefinitions(commitmentDefinitions, options = {}) {
|
|
22816
|
-
return [...commitmentDefinitions]
|
|
22817
|
-
.map((definition, index) => ({
|
|
22818
|
-
definition,
|
|
22819
|
-
index,
|
|
22820
|
-
}))
|
|
22821
|
-
.sort((left, right) => {
|
|
22822
|
-
var _a, _b;
|
|
22823
|
-
if (left.definition.isImportant !== right.definition.isImportant) {
|
|
22824
|
-
return left.definition.isImportant ? -1 : 1;
|
|
22825
|
-
}
|
|
22826
|
-
if (left.definition.isImportant && right.definition.isImportant) {
|
|
22827
|
-
const leftPriority = (_a = IMPORTANT_COMMITMENT_TYPE_SORT_ORDER.get(left.definition.type)) !== null && _a !== void 0 ? _a : Number.MAX_SAFE_INTEGER;
|
|
22828
|
-
const rightPriority = (_b = IMPORTANT_COMMITMENT_TYPE_SORT_ORDER.get(right.definition.type)) !== null && _b !== void 0 ? _b : Number.MAX_SAFE_INTEGER;
|
|
22829
|
-
if (leftPriority !== rightPriority) {
|
|
22830
|
-
return leftPriority - rightPriority;
|
|
22831
|
-
}
|
|
22832
|
-
}
|
|
22833
|
-
const leftStatusSortRank = resolveCommitmentStatusSortRank(left.definition, options);
|
|
22834
|
-
const rightStatusSortRank = resolveCommitmentStatusSortRank(right.definition, options);
|
|
22835
|
-
if (leftStatusSortRank !== rightStatusSortRank) {
|
|
22836
|
-
return leftStatusSortRank - rightStatusSortRank;
|
|
22837
|
-
}
|
|
22838
|
-
return left.index - right.index;
|
|
22839
|
-
})
|
|
22840
|
-
.map(({ definition }) => definition);
|
|
22841
|
-
}
|
|
22842
|
-
|
|
22843
|
-
/**
|
|
22844
|
-
* Gets all available commitment definitions
|
|
22845
|
-
*
|
|
22846
|
-
* @returns Array of all commitment definitions
|
|
22847
|
-
*
|
|
22848
|
-
* @public exported from `@promptbook/core`
|
|
22849
|
-
*/
|
|
22850
|
-
function getAllCommitmentDefinitions() {
|
|
22851
|
-
return $deepFreeze(sortCommitmentDefinitions(COMMITMENT_REGISTRY, { isUnfinishedLast: true, isLowLevelLast: true }));
|
|
22852
|
-
}
|
|
22853
|
-
|
|
22854
22542
|
/**
|
|
22855
22543
|
* Regex source for absolute URL references inside TEAM/FROM/IMPORT commitments.
|
|
22856
22544
|
*
|
|
@@ -22874,12 +22562,38 @@
|
|
|
22874
22562
|
*
|
|
22875
22563
|
* @private function of BookEditorMonaco
|
|
22876
22564
|
*/
|
|
22877
|
-
const AGENT_REFERENCE_COMMITMENT_TYPES =
|
|
22565
|
+
const AGENT_REFERENCE_COMMITMENT_TYPES = ['FROM', 'IMPORT', 'IMPORTS', 'TEAM'];
|
|
22566
|
+
/**
|
|
22567
|
+
* Commitment types known to the browser editor tokenizer.
|
|
22568
|
+
*
|
|
22569
|
+
* @private function of BookEditorMonaco
|
|
22570
|
+
*/
|
|
22571
|
+
const BOOK_EDITOR_COMMITMENT_TYPES = [
|
|
22572
|
+
'PERSONA',
|
|
22573
|
+
'KNOWLEDGE',
|
|
22574
|
+
'TASK',
|
|
22575
|
+
'PROMPT',
|
|
22576
|
+
'EXPECT',
|
|
22577
|
+
'FORMAT',
|
|
22578
|
+
'MODEL',
|
|
22579
|
+
'SAMPLE',
|
|
22878
22580
|
'FROM',
|
|
22879
22581
|
'IMPORT',
|
|
22880
22582
|
'IMPORTS',
|
|
22881
22583
|
'TEAM',
|
|
22882
|
-
|
|
22584
|
+
'TODO',
|
|
22585
|
+
'NOTE',
|
|
22586
|
+
'NOTES',
|
|
22587
|
+
'NONCE',
|
|
22588
|
+
];
|
|
22589
|
+
/**
|
|
22590
|
+
* Regex pattern to match horizontal lines.
|
|
22591
|
+
*
|
|
22592
|
+
* @private function of BookEditorMonaco
|
|
22593
|
+
*/
|
|
22594
|
+
const HORIZONTAL_LINE_PATTERN$1 = /^[\s]*[-_*][\s]*[-_*][\s]*[-_*][\s]*[-_*]*[\s]*$/;
|
|
22595
|
+
const BOOK_EDITOR_COMMITMENT_LINE_REGEX = createCommitmentLineRegex(BOOK_EDITOR_COMMITMENT_TYPES);
|
|
22596
|
+
const AGENT_REFERENCE_COMMITMENT_LINE_REGEX = createCommitmentLineRegex(AGENT_REFERENCE_COMMITMENT_TYPES);
|
|
22883
22597
|
/**
|
|
22884
22598
|
* Agent reference helpers for `BookEditorMonaco`.
|
|
22885
22599
|
*
|
|
@@ -23034,26 +22748,60 @@
|
|
|
23034
22748
|
* @private function of BookEditorMonaco
|
|
23035
22749
|
*/
|
|
23036
22750
|
function collectAgentReferenceCommitmentLineRanges(content, sourceLines) {
|
|
23037
|
-
var _a, _b;
|
|
23038
|
-
const parsed = parseAgentSourceWithCommitments(content);
|
|
23039
22751
|
const ranges = [];
|
|
23040
|
-
|
|
23041
|
-
|
|
23042
|
-
|
|
22752
|
+
let activeRangeStartLineNumber = null;
|
|
22753
|
+
let isInsideCodeBlock = false;
|
|
22754
|
+
const startLineIndex = findBookBodyStartLineIndex(sourceLines);
|
|
22755
|
+
for (let lineIndex = startLineIndex; lineIndex < sourceLines.length; lineIndex++) {
|
|
22756
|
+
const line = sourceLines[lineIndex] || '';
|
|
22757
|
+
const trimmedLine = line.trim();
|
|
22758
|
+
if (trimmedLine.startsWith('```')) {
|
|
22759
|
+
isInsideCodeBlock = !isInsideCodeBlock;
|
|
22760
|
+
continue;
|
|
22761
|
+
}
|
|
22762
|
+
if (isInsideCodeBlock) {
|
|
22763
|
+
continue;
|
|
22764
|
+
}
|
|
22765
|
+
if (HORIZONTAL_LINE_PATTERN$1.test(line)) {
|
|
22766
|
+
if (activeRangeStartLineNumber !== null) {
|
|
22767
|
+
ranges.push({
|
|
22768
|
+
startLineNumber: activeRangeStartLineNumber,
|
|
22769
|
+
endLineNumber: lineIndex,
|
|
22770
|
+
});
|
|
22771
|
+
activeRangeStartLineNumber = null;
|
|
22772
|
+
}
|
|
23043
22773
|
continue;
|
|
23044
22774
|
}
|
|
23045
|
-
|
|
23046
|
-
const endLineNumber = Math.min(nextCommitmentStartLine - 1, sourceLines.length);
|
|
23047
|
-
if (commitment.lineNumber > endLineNumber) {
|
|
22775
|
+
if (!BOOK_EDITOR_COMMITMENT_LINE_REGEX.test(trimmedLine)) {
|
|
23048
22776
|
continue;
|
|
23049
22777
|
}
|
|
22778
|
+
if (activeRangeStartLineNumber !== null) {
|
|
22779
|
+
ranges.push({
|
|
22780
|
+
startLineNumber: activeRangeStartLineNumber,
|
|
22781
|
+
endLineNumber: lineIndex,
|
|
22782
|
+
});
|
|
22783
|
+
}
|
|
22784
|
+
activeRangeStartLineNumber = AGENT_REFERENCE_COMMITMENT_LINE_REGEX.test(trimmedLine) ? lineIndex + 1 : null;
|
|
22785
|
+
}
|
|
22786
|
+
if (activeRangeStartLineNumber !== null) {
|
|
23050
22787
|
ranges.push({
|
|
23051
|
-
startLineNumber:
|
|
23052
|
-
endLineNumber,
|
|
22788
|
+
startLineNumber: activeRangeStartLineNumber,
|
|
22789
|
+
endLineNumber: sourceLines.length,
|
|
23053
22790
|
});
|
|
23054
22791
|
}
|
|
23055
22792
|
return ranges;
|
|
23056
22793
|
}
|
|
22794
|
+
function createCommitmentLineRegex(commitmentTypes) {
|
|
22795
|
+
const commitmentPattern = [...commitmentTypes]
|
|
22796
|
+
.sort((a, b) => b.length - a.length)
|
|
22797
|
+
.map((type) => type.replace(/\s+/, '\\s+'))
|
|
22798
|
+
.join('|');
|
|
22799
|
+
return new RegExp(`^\\s*(${commitmentPattern})(?=\\s|$)`, 'i');
|
|
22800
|
+
}
|
|
22801
|
+
function findBookBodyStartLineIndex(sourceLines) {
|
|
22802
|
+
const titleLineIndex = sourceLines.findIndex((line) => line.trim().length > 0);
|
|
22803
|
+
return titleLineIndex === -1 ? 0 : titleLineIndex + 1;
|
|
22804
|
+
}
|
|
23057
22805
|
/**
|
|
23058
22806
|
* Agent reference helpers for `BookEditorMonaco`.
|
|
23059
22807
|
*
|
|
@@ -23281,19 +23029,26 @@
|
|
|
23281
23029
|
monacoWithLanguageState[BOOK_EDITOR_LANGUAGE_INITIALIZED_FLAG] = true;
|
|
23282
23030
|
monacoWithLanguageState[BOOK_EDITOR_THEME_MODE_FLAG] = renderedTheme;
|
|
23283
23031
|
monaco.languages.register({ id: BookEditorMonacoConstants.BOOK_LANGUAGE_ID });
|
|
23284
|
-
const
|
|
23285
|
-
|
|
23286
|
-
|
|
23287
|
-
|
|
23288
|
-
|
|
23289
|
-
|
|
23290
|
-
|
|
23291
|
-
|
|
23292
|
-
|
|
23293
|
-
|
|
23294
|
-
|
|
23295
|
-
|
|
23296
|
-
|
|
23032
|
+
const commitmentTypes = [
|
|
23033
|
+
'GOAL',
|
|
23034
|
+
'RULE',
|
|
23035
|
+
'PERSONA',
|
|
23036
|
+
'KNOWLEDGE',
|
|
23037
|
+
'TASK',
|
|
23038
|
+
'PROMPT',
|
|
23039
|
+
'EXPECT',
|
|
23040
|
+
'FORMAT',
|
|
23041
|
+
'MODEL',
|
|
23042
|
+
'SAMPLE',
|
|
23043
|
+
'FROM',
|
|
23044
|
+
'IMPORT',
|
|
23045
|
+
'IMPORTS',
|
|
23046
|
+
'TEAM',
|
|
23047
|
+
...TODO_COMMITMENT_TYPES,
|
|
23048
|
+
...NOTE_COMMITMENT_TYPES,
|
|
23049
|
+
'REMOVE',
|
|
23050
|
+
];
|
|
23051
|
+
const completionCommitmentTypes = [...commitmentTypes];
|
|
23297
23052
|
const noteLikeCommitmentTypeSet = new Set([...TODO_COMMITMENT_TYPES, ...NOTE_COMMITMENT_TYPES]);
|
|
23298
23053
|
const noteLikeCommitmentStates = createNoteLikeCommitmentStates(commitmentTypes);
|
|
23299
23054
|
const executableCommitmentTypes = commitmentTypes.filter((type) => !noteLikeCommitmentTypeSet.has(type.toUpperCase()));
|
|
@@ -23350,27 +23105,17 @@
|
|
|
23350
23105
|
startColumn: word.startColumn,
|
|
23351
23106
|
endColumn: word.endColumn,
|
|
23352
23107
|
};
|
|
23353
|
-
const suggestions = completionCommitmentTypes.map((type, index) => {
|
|
23354
|
-
|
|
23355
|
-
|
|
23356
|
-
|
|
23357
|
-
|
|
23358
|
-
|
|
23359
|
-
|
|
23360
|
-
|
|
23361
|
-
:
|
|
23362
|
-
|
|
23363
|
-
|
|
23364
|
-
kind: monaco.languages.CompletionItemKind.Keyword,
|
|
23365
|
-
insertText: type,
|
|
23366
|
-
range,
|
|
23367
|
-
sortText: index.toString().padStart(4, '0'),
|
|
23368
|
-
detail: (notice === null || notice === void 0 ? void 0 : notice.detailLabel) || 'Commitment',
|
|
23369
|
-
documentation: {
|
|
23370
|
-
value: completionDocumentation,
|
|
23371
|
-
},
|
|
23372
|
-
};
|
|
23373
|
-
});
|
|
23108
|
+
const suggestions = completionCommitmentTypes.map((type, index) => ({
|
|
23109
|
+
label: type,
|
|
23110
|
+
kind: monaco.languages.CompletionItemKind.Keyword,
|
|
23111
|
+
insertText: type,
|
|
23112
|
+
range,
|
|
23113
|
+
sortText: index.toString().padStart(4, '0'),
|
|
23114
|
+
detail: 'Commitment',
|
|
23115
|
+
documentation: {
|
|
23116
|
+
value: 'Book commitment',
|
|
23117
|
+
},
|
|
23118
|
+
}));
|
|
23374
23119
|
return { suggestions };
|
|
23375
23120
|
},
|
|
23376
23121
|
});
|
|
@@ -24656,7 +24401,7 @@
|
|
|
24656
24401
|
editor,
|
|
24657
24402
|
handleFiles,
|
|
24658
24403
|
});
|
|
24659
|
-
const combinedDiagnostics = [...(diagnostics || []), ...createDeprecatedCommitmentDiagnostics(
|
|
24404
|
+
const combinedDiagnostics = [...(diagnostics || []), ...createDeprecatedCommitmentDiagnostics()];
|
|
24660
24405
|
const isActionBarVisible = isBookEditorMonacoActionbarVisible({
|
|
24661
24406
|
hoistedMenuItems,
|
|
24662
24407
|
isUploadButtonShown,
|
|
@@ -24750,6 +24495,36 @@
|
|
|
24750
24495
|
return isFullscreen && typeof document !== 'undefined' ? reactDom.createPortal(editorContent, document.body) : editorContent;
|
|
24751
24496
|
}
|
|
24752
24497
|
|
|
24498
|
+
var BookEditor$1 = /*#__PURE__*/Object.freeze({
|
|
24499
|
+
__proto__: null,
|
|
24500
|
+
DEFAULT_BOOK_EDITOR_HEIGHT: DEFAULT_BOOK_EDITOR_HEIGHT,
|
|
24501
|
+
BookEditor: BookEditor
|
|
24502
|
+
});
|
|
24503
|
+
|
|
24504
|
+
/**
|
|
24505
|
+
* Renders a book editor
|
|
24506
|
+
*
|
|
24507
|
+
* @public exported from `@promptbook/components`
|
|
24508
|
+
*/
|
|
24509
|
+
function BookEditorForClient(props) {
|
|
24510
|
+
const [BookEditorComponent, setBookEditorComponent] = react.useState(null);
|
|
24511
|
+
react.useEffect(() => {
|
|
24512
|
+
let isCancelled = false;
|
|
24513
|
+
void Promise.resolve().then(function () { return BookEditor$1; }).then(({ BookEditor }) => {
|
|
24514
|
+
if (!isCancelled) {
|
|
24515
|
+
setBookEditorComponent(() => BookEditor);
|
|
24516
|
+
}
|
|
24517
|
+
});
|
|
24518
|
+
return () => {
|
|
24519
|
+
isCancelled = true;
|
|
24520
|
+
};
|
|
24521
|
+
}, []);
|
|
24522
|
+
if (!BookEditorComponent) {
|
|
24523
|
+
return jsxRuntime.jsx("div", { style: { minHeight: 260 } });
|
|
24524
|
+
}
|
|
24525
|
+
return jsxRuntime.jsx(BookEditorComponent, { ...props });
|
|
24526
|
+
}
|
|
24527
|
+
|
|
24753
24528
|
/**
|
|
24754
24529
|
* Restricts an Updatable to a (2) BehaviorSubject variant
|
|
24755
24530
|
*
|
|
@@ -26504,7 +26279,7 @@
|
|
|
26504
26279
|
function createChatMarkdownConverter(options) {
|
|
26505
26280
|
var _a;
|
|
26506
26281
|
const citationReferenceClassName = (_a = options === null || options === void 0 ? void 0 : options.citationReferenceClassName) !== null && _a !== void 0 ? _a : DEFAULT_CITATION_REFERENCE_CLASS_NAME;
|
|
26507
|
-
return new
|
|
26282
|
+
return new showdown__default["default"].Converter({
|
|
26508
26283
|
flavor: 'github',
|
|
26509
26284
|
tables: true,
|
|
26510
26285
|
strikethrough: true,
|
|
@@ -42678,6 +42453,103 @@
|
|
|
42678
42453
|
return toolCalls;
|
|
42679
42454
|
}
|
|
42680
42455
|
|
|
42456
|
+
/**
|
|
42457
|
+
* Priority order for the important commitments shown first in catalogues and intellisense.
|
|
42458
|
+
*
|
|
42459
|
+
* Canonical singular names stay ahead of their plural aliases so the most important
|
|
42460
|
+
* commitments remain easy to scan.
|
|
42461
|
+
*
|
|
42462
|
+
* @private internal constant of commitment catalog sorting
|
|
42463
|
+
*/
|
|
42464
|
+
const IMPORTANT_COMMITMENT_TYPE_SORT_ORDER = new Map([
|
|
42465
|
+
['GOAL', 0],
|
|
42466
|
+
['RULE', 1],
|
|
42467
|
+
['KNOWLEDGE', 2],
|
|
42468
|
+
['TEAM', 3],
|
|
42469
|
+
['GOALS', 4],
|
|
42470
|
+
['RULES', 5],
|
|
42471
|
+
]);
|
|
42472
|
+
/**
|
|
42473
|
+
* Sort rank used when unfinished, low-level, and deprecated commitments should be grouped last.
|
|
42474
|
+
*
|
|
42475
|
+
* @private internal constant of commitment catalog sorting
|
|
42476
|
+
*/
|
|
42477
|
+
const COMMITMENT_STATUS_SORT_ORDER = {
|
|
42478
|
+
normal: 0,
|
|
42479
|
+
deprecated: 1,
|
|
42480
|
+
unfinished: 2,
|
|
42481
|
+
lowLevel: 3,
|
|
42482
|
+
};
|
|
42483
|
+
/**
|
|
42484
|
+
* Resolves the relative sort rank of one commitment status.
|
|
42485
|
+
*
|
|
42486
|
+
* @param definition - Commitment definition to rank.
|
|
42487
|
+
* @param options - Sorting options.
|
|
42488
|
+
* @returns Relative sort rank for the definition.
|
|
42489
|
+
*
|
|
42490
|
+
* @private internal helper of commitment catalog sorting
|
|
42491
|
+
*/
|
|
42492
|
+
function resolveCommitmentStatusSortRank(definition, options) {
|
|
42493
|
+
let statusSortRank = COMMITMENT_STATUS_SORT_ORDER.normal;
|
|
42494
|
+
if (options.isDeprecatedLast && definition.deprecation) {
|
|
42495
|
+
statusSortRank = Math.max(statusSortRank, COMMITMENT_STATUS_SORT_ORDER.deprecated);
|
|
42496
|
+
}
|
|
42497
|
+
if (options.isUnfinishedLast && definition.isUnfinished) {
|
|
42498
|
+
statusSortRank = Math.max(statusSortRank, COMMITMENT_STATUS_SORT_ORDER.unfinished);
|
|
42499
|
+
}
|
|
42500
|
+
if (options.isLowLevelLast && definition.isLowLevel) {
|
|
42501
|
+
statusSortRank = Math.max(statusSortRank, COMMITMENT_STATUS_SORT_ORDER.lowLevel);
|
|
42502
|
+
}
|
|
42503
|
+
return statusSortRank;
|
|
42504
|
+
}
|
|
42505
|
+
/**
|
|
42506
|
+
* Sorts commitment definitions so the important ones stay at the top.
|
|
42507
|
+
*
|
|
42508
|
+
* @param commitmentDefinitions - Definitions to sort.
|
|
42509
|
+
* @param options - Sorting options.
|
|
42510
|
+
* @returns Sorted commitment definitions.
|
|
42511
|
+
*
|
|
42512
|
+
* @private internal helper of commitment catalog sorting
|
|
42513
|
+
*/
|
|
42514
|
+
function sortCommitmentDefinitions(commitmentDefinitions, options = {}) {
|
|
42515
|
+
return [...commitmentDefinitions]
|
|
42516
|
+
.map((definition, index) => ({
|
|
42517
|
+
definition,
|
|
42518
|
+
index,
|
|
42519
|
+
}))
|
|
42520
|
+
.sort((left, right) => {
|
|
42521
|
+
var _a, _b;
|
|
42522
|
+
if (left.definition.isImportant !== right.definition.isImportant) {
|
|
42523
|
+
return left.definition.isImportant ? -1 : 1;
|
|
42524
|
+
}
|
|
42525
|
+
if (left.definition.isImportant && right.definition.isImportant) {
|
|
42526
|
+
const leftPriority = (_a = IMPORTANT_COMMITMENT_TYPE_SORT_ORDER.get(left.definition.type)) !== null && _a !== void 0 ? _a : Number.MAX_SAFE_INTEGER;
|
|
42527
|
+
const rightPriority = (_b = IMPORTANT_COMMITMENT_TYPE_SORT_ORDER.get(right.definition.type)) !== null && _b !== void 0 ? _b : Number.MAX_SAFE_INTEGER;
|
|
42528
|
+
if (leftPriority !== rightPriority) {
|
|
42529
|
+
return leftPriority - rightPriority;
|
|
42530
|
+
}
|
|
42531
|
+
}
|
|
42532
|
+
const leftStatusSortRank = resolveCommitmentStatusSortRank(left.definition, options);
|
|
42533
|
+
const rightStatusSortRank = resolveCommitmentStatusSortRank(right.definition, options);
|
|
42534
|
+
if (leftStatusSortRank !== rightStatusSortRank) {
|
|
42535
|
+
return leftStatusSortRank - rightStatusSortRank;
|
|
42536
|
+
}
|
|
42537
|
+
return left.index - right.index;
|
|
42538
|
+
})
|
|
42539
|
+
.map(({ definition }) => definition);
|
|
42540
|
+
}
|
|
42541
|
+
|
|
42542
|
+
/**
|
|
42543
|
+
* Gets all available commitment definitions
|
|
42544
|
+
*
|
|
42545
|
+
* @returns Array of all commitment definitions
|
|
42546
|
+
*
|
|
42547
|
+
* @public exported from `@promptbook/core`
|
|
42548
|
+
*/
|
|
42549
|
+
function getAllCommitmentDefinitions() {
|
|
42550
|
+
return $deepFreeze(sortCommitmentDefinitions(COMMITMENT_REGISTRY, { isUnfinishedLast: true, isLowLevelLast: true }));
|
|
42551
|
+
}
|
|
42552
|
+
|
|
42681
42553
|
/**
|
|
42682
42554
|
* Gets all tool titles provided by all commitments
|
|
42683
42555
|
*
|
|
@@ -45352,7 +45224,7 @@
|
|
|
45352
45224
|
* @public exported from `@promptbook/editable`
|
|
45353
45225
|
*/
|
|
45354
45226
|
function knowledgeSourceContentToName(knowledgeSourceContent) {
|
|
45355
|
-
const hash =
|
|
45227
|
+
const hash = CryptoJS__default["default"].SHA256(hexEncoder__default["default"].parse(JSON.stringify(knowledgeSourceContent)))
|
|
45356
45228
|
// <- TODO: [🥬] Encapsulate sha256 to some private utility function
|
|
45357
45229
|
.toString( /* hex */)
|
|
45358
45230
|
.substring(0, 20);
|
|
@@ -46200,7 +46072,7 @@
|
|
|
46200
46072
|
console.warn('CSV string contains carriage return characters, but in the CSV settings the `newline` setting does not include them. Autohealing the CSV string.');
|
|
46201
46073
|
value = value.replace(/\r\n/g, '\n').replace(/\r/g, '\n');
|
|
46202
46074
|
}
|
|
46203
|
-
const csv =
|
|
46075
|
+
const csv = papaparse__default["default"].parse(value, settings);
|
|
46204
46076
|
return csv;
|
|
46205
46077
|
}
|
|
46206
46078
|
|
|
@@ -46285,10 +46157,10 @@
|
|
|
46285
46157
|
i > index ? { ...row, [outputParameterName]: PENDING_VALUE_PLACEHOLDER } : row,
|
|
46286
46158
|
);
|
|
46287
46159
|
*/
|
|
46288
|
-
await onProgress(
|
|
46160
|
+
await onProgress(papaparse__default["default"].unparse(mappedData, { ...settings, ...MANDATORY_CSV_SETTINGS }));
|
|
46289
46161
|
}
|
|
46290
46162
|
}
|
|
46291
|
-
return
|
|
46163
|
+
return papaparse__default["default"].unparse(mappedData, { ...settings, ...MANDATORY_CSV_SETTINGS });
|
|
46292
46164
|
},
|
|
46293
46165
|
},
|
|
46294
46166
|
{
|
|
@@ -46316,7 +46188,7 @@
|
|
|
46316
46188
|
return /* not await */ mapCallback({ [key]: value }, index, array.length);
|
|
46317
46189
|
}));
|
|
46318
46190
|
}));
|
|
46319
|
-
return
|
|
46191
|
+
return papaparse__default["default"].unparse(mappedData, { ...settings, ...MANDATORY_CSV_SETTINGS });
|
|
46320
46192
|
},
|
|
46321
46193
|
},
|
|
46322
46194
|
],
|
|
@@ -48333,6 +48205,18 @@
|
|
|
48333
48205
|
}
|
|
48334
48206
|
// TODO: [🐤] Deduplicate `AgentModelRequirements` and `ModelRequirements` model requirements
|
|
48335
48207
|
|
|
48208
|
+
/**
|
|
48209
|
+
* Gets a commitment definition by its type
|
|
48210
|
+
*
|
|
48211
|
+
* @param type The commitment type to look up
|
|
48212
|
+
* @returns The commitment definition or null if not found
|
|
48213
|
+
*
|
|
48214
|
+
* @public exported from `@promptbook/core`
|
|
48215
|
+
*/
|
|
48216
|
+
function getCommitmentDefinition(type) {
|
|
48217
|
+
return COMMITMENT_REGISTRY.find((commitmentDefinition) => commitmentDefinition.type === type) || null;
|
|
48218
|
+
}
|
|
48219
|
+
|
|
48336
48220
|
/**
|
|
48337
48221
|
* Commitment types whose content may contain compact agent references that must be resolved before applying the commitment.
|
|
48338
48222
|
*
|
|
@@ -54826,7 +54710,7 @@
|
|
|
54826
54710
|
* Computes one stable hash from a JSON-serializable value.
|
|
54827
54711
|
*/
|
|
54828
54712
|
function computeJsonHash$1(value) {
|
|
54829
|
-
return
|
|
54713
|
+
return CryptoJS__default["default"].SHA256(JSON.stringify(value)).toString();
|
|
54830
54714
|
}
|
|
54831
54715
|
/**
|
|
54832
54716
|
* Handles OpenAI AgentKit-backed executions for `AgentLlmExecutionTools`.
|
|
@@ -54984,7 +54868,7 @@
|
|
|
54984
54868
|
* Computes one stable hash from a JSON-serializable value.
|
|
54985
54869
|
*/
|
|
54986
54870
|
function computeJsonHash(value) {
|
|
54987
|
-
return
|
|
54871
|
+
return CryptoJS__default["default"].SHA256(JSON.stringify(value)).toString();
|
|
54988
54872
|
}
|
|
54989
54873
|
/**
|
|
54990
54874
|
* Removes assistant-managed requirements before the prompt is executed via OpenAI Assistants.
|
|
@@ -55840,7 +55724,7 @@
|
|
|
55840
55724
|
* Returns a virtual model name representing the agent behavior.
|
|
55841
55725
|
*/
|
|
55842
55726
|
get modelName() {
|
|
55843
|
-
const hash =
|
|
55727
|
+
const hash = CryptoJS__default["default"].SHA256(hexEncoder__default["default"].parse(this.options.agentSource)).toString( /* hex */);
|
|
55844
55728
|
const agentId = hash.substring(0, 10);
|
|
55845
55729
|
return (normalizeToKebabCase(this.title) + '-' + agentId);
|
|
55846
55730
|
}
|
|
@@ -59259,6 +59143,7 @@
|
|
|
59259
59143
|
exports.BLOCKY_FLOW = BLOCKY_FLOW;
|
|
59260
59144
|
exports.BOOK_LANGUAGE_VERSION = BOOK_LANGUAGE_VERSION;
|
|
59261
59145
|
exports.BookEditor = BookEditor;
|
|
59146
|
+
exports.BookEditorForClient = BookEditorForClient;
|
|
59262
59147
|
exports.BrandedQrCode = BrandedQrCode;
|
|
59263
59148
|
exports.CHAT_SAVE_FORMATS = CHAT_SAVE_FORMATS;
|
|
59264
59149
|
exports.Chat = Chat;
|