@promptbook/markdown-utils 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 +9 -10
- 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 -2
- package/umd/index.umd.js +13 -11
- 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
|
@@ -12,6 +12,7 @@ import type { BookEditorUploadProgressCallback } from '../book-components/BookEd
|
|
|
12
12
|
import type { BookEditorUploadOptions } from '../book-components/BookEditor/BookEditor';
|
|
13
13
|
import type { BookEditorProps } from '../book-components/BookEditor/BookEditor';
|
|
14
14
|
import { BookEditor } from '../book-components/BookEditor/BookEditor';
|
|
15
|
+
import { BookEditorForClient } from '../book-components/BookEditor/BookEditorForClient';
|
|
15
16
|
import { AgentChat } from '../book-components/Chat/AgentChat/AgentChat';
|
|
16
17
|
import type { AgentChatProps } from '../book-components/Chat/AgentChat/AgentChatProps';
|
|
17
18
|
import { Chat } from '../book-components/Chat/Chat/Chat';
|
|
@@ -95,6 +96,7 @@ export type { BookEditorUploadProgressCallback };
|
|
|
95
96
|
export type { BookEditorUploadOptions };
|
|
96
97
|
export type { BookEditorProps };
|
|
97
98
|
export { BookEditor };
|
|
99
|
+
export { BookEditorForClient };
|
|
98
100
|
export { AgentChat };
|
|
99
101
|
export type { AgentChatProps };
|
|
100
102
|
export { Chat };
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION } from '../version';
|
|
2
|
+
import { AGENT_BOOK_FILE_PATH } from '../book-3.0/agentFolderPaths';
|
|
3
|
+
import { AGENT_MESSAGES_DIRECTORY_PATH } from '../book-3.0/agentFolderPaths';
|
|
4
|
+
import { AGENT_QUEUED_MESSAGES_DIRECTORY_PATH } from '../book-3.0/agentFolderPaths';
|
|
5
|
+
import { AGENT_FINISHED_MESSAGES_DIRECTORY_PATH } from '../book-3.0/agentFolderPaths';
|
|
6
|
+
import { AGENT_FAILED_MESSAGES_DIRECTORY_PATH } from '../book-3.0/agentFolderPaths';
|
|
2
7
|
import type { BookNodeAgentSource } from '../book-3.0/BookNodeAgentSource';
|
|
3
8
|
import type { BookNodeAgentSourceOptions } from '../book-3.0/BookNodeAgentSource';
|
|
4
9
|
import type { CliAgentHarness } from '../book-3.0/CliAgent';
|
|
@@ -22,6 +27,11 @@ import { FileCacheStorage } from '../storage/file-cache-storage/FileCacheStorage
|
|
|
22
27
|
import { $execCommand } from '../utils/execCommand/$execCommand';
|
|
23
28
|
import { $execCommands } from '../utils/execCommand/$execCommands';
|
|
24
29
|
export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
|
|
30
|
+
export { AGENT_BOOK_FILE_PATH };
|
|
31
|
+
export { AGENT_MESSAGES_DIRECTORY_PATH };
|
|
32
|
+
export { AGENT_QUEUED_MESSAGES_DIRECTORY_PATH };
|
|
33
|
+
export { AGENT_FINISHED_MESSAGES_DIRECTORY_PATH };
|
|
34
|
+
export { AGENT_FAILED_MESSAGES_DIRECTORY_PATH };
|
|
25
35
|
export type { BookNodeAgentSource };
|
|
26
36
|
export type { BookNodeAgentSourceOptions };
|
|
27
37
|
export type { CliAgentHarness };
|
|
@@ -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
|
|
36
|
+
* Lightweight JavaScript wrapper around the Promptbook agent execution pipeline.
|
|
44
37
|
*
|
|
45
|
-
* It uses the same
|
|
46
|
-
*
|
|
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
|
|
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
|
|
59
|
-
* @returns
|
|
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
|
|
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,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
|
-
|
|
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
|
|
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():
|
|
7
|
+
export declare function createShowdownConverter(): showdown.Converter;
|
package/umd/src/version.d.ts
CHANGED
|
@@ -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-
|
|
18
|
+
* It follows semantic versioning (e.g., `0.112.0-116`).
|
|
19
19
|
*
|
|
20
20
|
* @generated
|
|
21
21
|
*/
|