@promptbook/editable 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.
@@ -31,19 +31,12 @@ export type CliAgentRunOptions = {
31
31
  *
32
32
  * @public exported from `@promptbook/node`
33
33
  */
34
- export type CliAgentOptions = BookNodeAgentSourceOptions & CliAgentRunOptions & {
35
- /**
36
- * Executable used for the wrapper command.
37
- *
38
- * @default ptbk
39
- */
40
- readonly command?: string;
41
- };
34
+ export type CliAgentOptions = BookNodeAgentSourceOptions & CliAgentRunOptions;
42
35
  /**
43
- * Lightweight JavaScript wrapper around `ptbk agent exec`.
36
+ * Lightweight JavaScript wrapper around the Promptbook agent execution pipeline.
44
37
  *
45
- * It uses the same CLI harnesses as Promptbook's agent command, making it the most faithful
46
- * way to run a local Book agent from Node.js when you want the CLI execution flow.
38
+ * It uses the same harnesses and execution path as `ptbk agent exec`, running the runner
39
+ * in-process instead of spawning a separate CLI process.
47
40
  *
48
41
  * @public exported from `@promptbook/node`
49
42
  */
@@ -52,15 +45,15 @@ export declare class CliAgent {
52
45
  private temporaryAgentPath;
53
46
  constructor(options: CliAgentOptions);
54
47
  /**
55
- * Runs one non-interactive agent turn through `ptbk agent exec`.
48
+ * Runs one non-interactive agent turn through the selected harness.
56
49
  *
57
50
  * @param message - User message sent to the agent.
58
- * @param options - Optional per-run CLI overrides.
59
- * @returns Raw stdout emitted by the CLI command.
51
+ * @param options - Optional per-run overrides.
52
+ * @returns Final agent answer.
60
53
  */
61
54
  run(message: string, options?: CliAgentRunOptions): Promise<string>;
62
55
  /**
63
- * Resolves the agent path passed to the CLI, materializing one temporary `.book` file when needed.
56
+ * Resolves the agent path passed to the runner, materializing one temporary `.book` file when needed.
64
57
  *
65
58
  * @private internal utility of `CliAgent`
66
59
  */
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Relative path to the local agent source used by the agent folder convention.
3
+ *
4
+ * @public exported from `@promptbook/node`
5
+ */
6
+ export declare const AGENT_BOOK_FILE_PATH = "agent.book";
7
+ /**
8
+ * Relative path to the message queue root used by the agent folder convention.
9
+ *
10
+ * @public exported from `@promptbook/node`
11
+ */
12
+ export declare const AGENT_MESSAGES_DIRECTORY_PATH = "messages";
13
+ /**
14
+ * Relative path to queued user messages consumed by the agent runner.
15
+ *
16
+ * @public exported from `@promptbook/node`
17
+ */
18
+ export declare const AGENT_QUEUED_MESSAGES_DIRECTORY_PATH: string;
19
+ /**
20
+ * Relative path to answered messages written by the agent runner.
21
+ *
22
+ * @public exported from `@promptbook/node`
23
+ */
24
+ export declare const AGENT_FINISHED_MESSAGES_DIRECTORY_PATH: string;
25
+ /**
26
+ * Relative path to messages that the agent runner stopped retrying.
27
+ *
28
+ * @public exported from `@promptbook/node`
29
+ */
30
+ export declare const AGENT_FAILED_MESSAGES_DIRECTORY_PATH: string;
@@ -0,0 +1,2 @@
1
+ export { NAME, CLAIM, PROMPTBOOK_LEGAL_ENTITY, IS_COST_PREVENTED, DEFAULT_IS_VERBOSE, DEFAULT_MAX_CONCURRENT_UPLOADS, PROMPTBOOK_SYNTAX_COLORS, } from '../../config';
2
+ export { PUBLIC_AGENTS_SERVERS } from '../../../servers';
@@ -0,0 +1,7 @@
1
+ import { BookEditorProps } from './BookEditor';
2
+ /**
3
+ * Renders a book editor
4
+ *
5
+ * @public exported from `@promptbook/components`
6
+ */
7
+ export declare function BookEditorForClient(props: BookEditorProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Browser-compatible stub for `createDeprecatedCommitmentDiagnostics`.
3
+ *
4
+ * In the browser build the full Node.js implementation is not available,
5
+ * so this stub always returns an empty array to keep the editor functional.
6
+ *
7
+ * @private internal utility of `BookEditorMonaco`
8
+ */
9
+ export declare function createDeprecatedCommitmentDiagnostics(_agentSource?: string): [];
@@ -1,39 +1,11 @@
1
- /**
2
- * Relative path to the local agent source initialized by `ptbk agent-folder init`.
3
- *
4
- * @private internal utility of `ptbk agent-folder`
5
- */
6
- export declare const AGENT_BOOK_FILE_PATH = "agent.book";
1
+ import { AGENT_BOOK_FILE_PATH, AGENT_FAILED_MESSAGES_DIRECTORY_PATH, AGENT_FINISHED_MESSAGES_DIRECTORY_PATH, AGENT_MESSAGES_DIRECTORY_PATH, AGENT_QUEUED_MESSAGES_DIRECTORY_PATH } from '../../../book-3.0/agentFolderPaths';
2
+ export { AGENT_BOOK_FILE_PATH, AGENT_FAILED_MESSAGES_DIRECTORY_PATH, AGENT_FINISHED_MESSAGES_DIRECTORY_PATH, AGENT_MESSAGES_DIRECTORY_PATH, AGENT_QUEUED_MESSAGES_DIRECTORY_PATH, };
7
3
  /**
8
4
  * Relative path to local knowledge files initialized by `ptbk agent-folder init`.
9
5
  *
10
6
  * @private internal utility of `ptbk agent-folder`
11
7
  */
12
8
  export declare const AGENT_KNOWLEDGE_DIRECTORY_PATH = "knowledge";
13
- /**
14
- * Relative path to the message queue root initialized by `ptbk agent-folder init`.
15
- *
16
- * @private internal utility of `ptbk agent-folder`
17
- */
18
- export declare const AGENT_MESSAGES_DIRECTORY_PATH = "messages";
19
- /**
20
- * Relative path to queued user messages consumed by `ptbk agent-folder run-once`.
21
- *
22
- * @private internal utility of `ptbk agent-folder`
23
- */
24
- export declare const AGENT_QUEUED_MESSAGES_DIRECTORY_PATH: string;
25
- /**
26
- * Relative path to answered messages written by `ptbk agent-folder run-once`.
27
- *
28
- * @private internal utility of `ptbk agent-folder`
29
- */
30
- export declare const AGENT_FINISHED_MESSAGES_DIRECTORY_PATH: string;
31
- /**
32
- * Relative path to messages that the agent runner stopped retrying.
33
- *
34
- * @private internal utility of `ptbk agent-folder`
35
- */
36
- export declare const AGENT_FAILED_MESSAGES_DIRECTORY_PATH: string;
37
9
  /**
38
10
  * Relative path to generated local agent documentation initialized by `ptbk agent-folder init`.
39
11
  *
@@ -1,7 +1,7 @@
1
- import { Converter as ShowdownConverter } from 'showdown';
1
+ import showdown from 'showdown';
2
2
  /**
3
3
  * Create a new showdown converter instance
4
4
  *
5
5
  * @private utility of `WebsiteScraper`
6
6
  */
7
- export declare function createShowdownConverter(): ShowdownConverter;
7
+ export declare function createShowdownConverter(): showdown.Converter;
@@ -15,7 +15,7 @@ export declare const BOOK_LANGUAGE_VERSION: string_semantic_version;
15
15
  export declare const PROMPTBOOK_ENGINE_VERSION: string_promptbook_version;
16
16
  /**
17
17
  * Represents the version string of the Promptbook engine.
18
- * It follows semantic versioning (e.g., `0.112.0-114`).
18
+ * It follows semantic versioning (e.g., `0.112.0-116`).
19
19
  *
20
20
  * @generated
21
21
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/editable",
3
- "version": "0.112.0-115",
3
+ "version": "0.112.0-117",
4
4
  "description": "Promptbook: Create persistent AI agents that turn your company's scattered knowledge into action",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -99,7 +99,7 @@
99
99
  "types": "./esm/src/_packages/editable.index.d.ts",
100
100
  "typings": "./esm/src/_packages/editable.index.d.ts",
101
101
  "peerDependencies": {
102
- "@promptbook/core": "0.112.0-115"
102
+ "@promptbook/core": "0.112.0-117"
103
103
  },
104
104
  "dependencies": {
105
105
  "crypto-js": "4.2.0",
package/umd/index.umd.js CHANGED
@@ -1,11 +1,13 @@
1
1
  (function (global, factory) {
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('spacetrim'), require('papaparse'), require('crypto-js'), require('crypto-js/enc-hex')) :
3
3
  typeof define === 'function' && define.amd ? define(['exports', 'spacetrim', 'papaparse', 'crypto-js', 'crypto-js/enc-hex'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["promptbook-editable"] = {}, global.spacetrim, global.papaparse, global.cryptoJs, global.hexEncoder));
5
- })(this, (function (exports, spacetrim, papaparse, cryptoJs, hexEncoder) { 'use strict';
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["promptbook-editable"] = {}, global.spacetrim, global.papaparse, global.CryptoJS, global.hexEncoder));
5
+ })(this, (function (exports, spacetrim, papaparse, CryptoJS, hexEncoder) { 'use strict';
6
6
 
7
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
8
 
9
+ var papaparse__default = /*#__PURE__*/_interopDefaultLegacy(papaparse);
10
+ var CryptoJS__default = /*#__PURE__*/_interopDefaultLegacy(CryptoJS);
9
11
  var hexEncoder__default = /*#__PURE__*/_interopDefaultLegacy(hexEncoder);
10
12
 
11
13
  // ⚠️ WARNING: This code has been generated so that any manual changes will be overwritten
@@ -22,7 +24,7 @@
22
24
  * @generated
23
25
  * @see https://github.com/webgptorg/promptbook
24
26
  */
25
- const PROMPTBOOK_ENGINE_VERSION = '0.112.0-115';
27
+ const PROMPTBOOK_ENGINE_VERSION = '0.112.0-117';
26
28
  /**
27
29
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
28
30
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -1813,7 +1815,7 @@
1813
1815
  console.warn('CSV string contains carriage return characters, but in the CSV settings the `newline` setting does not include them. Autohealing the CSV string.');
1814
1816
  value = value.replace(/\r\n/g, '\n').replace(/\r/g, '\n');
1815
1817
  }
1816
- const csv = papaparse.parse(value, settings);
1818
+ const csv = papaparse__default["default"].parse(value, settings);
1817
1819
  return csv;
1818
1820
  }
1819
1821
 
@@ -1898,10 +1900,10 @@
1898
1900
  i > index ? { ...row, [outputParameterName]: PENDING_VALUE_PLACEHOLDER } : row,
1899
1901
  );
1900
1902
  */
1901
- await onProgress(papaparse.unparse(mappedData, { ...settings, ...MANDATORY_CSV_SETTINGS }));
1903
+ await onProgress(papaparse__default["default"].unparse(mappedData, { ...settings, ...MANDATORY_CSV_SETTINGS }));
1902
1904
  }
1903
1905
  }
1904
- return papaparse.unparse(mappedData, { ...settings, ...MANDATORY_CSV_SETTINGS });
1906
+ return papaparse__default["default"].unparse(mappedData, { ...settings, ...MANDATORY_CSV_SETTINGS });
1905
1907
  },
1906
1908
  },
1907
1909
  {
@@ -1929,7 +1931,7 @@
1929
1931
  return /* not await */ mapCallback({ [key]: value }, index, array.length);
1930
1932
  }));
1931
1933
  }));
1932
- return papaparse.unparse(mappedData, { ...settings, ...MANDATORY_CSV_SETTINGS });
1934
+ return papaparse__default["default"].unparse(mappedData, { ...settings, ...MANDATORY_CSV_SETTINGS });
1933
1935
  },
1934
1936
  },
1935
1937
  ],
@@ -3747,7 +3749,7 @@
3747
3749
  * @public exported from `@promptbook/editable`
3748
3750
  */
3749
3751
  function knowledgeSourceContentToName(knowledgeSourceContent) {
3750
- const hash = cryptoJs.SHA256(hexEncoder__default["default"].parse(JSON.stringify(knowledgeSourceContent)))
3752
+ const hash = CryptoJS__default["default"].SHA256(hexEncoder__default["default"].parse(JSON.stringify(knowledgeSourceContent)))
3751
3753
  // <- TODO: [🥬] Encapsulate sha256 to some private utility function
3752
3754
  .toString( /* hex */)
3753
3755
  .substring(0, 20);