@promptbook/website-crawler 0.112.0-21 → 0.112.0-23

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 CHANGED
@@ -27,7 +27,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
27
27
  * @generated
28
28
  * @see https://github.com/webgptorg/promptbook
29
29
  */
30
- const PROMPTBOOK_ENGINE_VERSION = '0.112.0-21';
30
+ const PROMPTBOOK_ENGINE_VERSION = '0.112.0-23';
31
31
  /**
32
32
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
33
33
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -54,6 +54,8 @@ import { mdSaveFormatDefinition } from '../book-components/Chat/save/markdown/md
54
54
  import { pdfSaveFormatDefinition } from '../book-components/Chat/save/pdf/pdfSaveFormatDefinition';
55
55
  import { reactSaveFormatDefinition } from '../book-components/Chat/save/react/reactSaveFormatDefinition';
56
56
  import { txtSaveFormatDefinition } from '../book-components/Chat/save/text/txtSaveFormatDefinition';
57
+ import type { ChatProgressItem } from '../book-components/Chat/types/ChatMessage';
58
+ import type { ChatProgressCard } from '../book-components/Chat/types/ChatMessage';
57
59
  import type { ChatMessage } from '../book-components/Chat/types/ChatMessage';
58
60
  import type { ChatParticipant } from '../book-components/Chat/types/ChatParticipant';
59
61
  import type { MessageButton } from '../book-components/Chat/utils/parseMessageButtons';
@@ -128,6 +130,8 @@ export { mdSaveFormatDefinition };
128
130
  export { pdfSaveFormatDefinition };
129
131
  export { reactSaveFormatDefinition };
130
132
  export { txtSaveFormatDefinition };
133
+ export type { ChatProgressItem };
134
+ export type { ChatProgressCard };
131
135
  export type { ChatMessage };
132
136
  export type { ChatParticipant };
133
137
  export type { MessageButton };
@@ -37,6 +37,8 @@ import type { ChatSaveFormatDefinition } from '../book-components/Chat/save/_com
37
37
  import type { string_chat_format_name } from '../book-components/Chat/save/_common/string_chat_format_name';
38
38
  import type { SourceChipProps } from '../book-components/Chat/SourceChip/SourceChip';
39
39
  import type { ChatToolCall } from '../book-components/Chat/types/ChatMessage';
40
+ import type { ChatProgressItem } from '../book-components/Chat/types/ChatMessage';
41
+ import type { ChatProgressCard } from '../book-components/Chat/types/ChatMessage';
40
42
  import type { ChatMessage } from '../book-components/Chat/types/ChatMessage';
41
43
  import type { ChatParticipant } from '../book-components/Chat/types/ChatParticipant';
42
44
  import type { ParsedCitation } from '../book-components/Chat/utils/parseCitationsFromContent';
@@ -458,6 +460,8 @@ export type { ChatSaveFormatDefinition };
458
460
  export type { string_chat_format_name };
459
461
  export type { SourceChipProps };
460
462
  export type { ChatToolCall };
463
+ export type { ChatProgressItem };
464
+ export type { ChatProgressCard };
461
465
  export type { ChatMessage };
462
466
  export type { ChatParticipant };
463
467
  export type { ParsedCitation };
@@ -2,6 +2,56 @@ import { Message } from '../../../types/Message';
2
2
  import type { ToolCall } from '../../../types/ToolCall';
3
3
  import type { id, string_date_iso8601, string_markdown } from '../../../types/typeAliases';
4
4
  export type ChatToolCall = ToolCall;
5
+ /**
6
+ * One item in a user-facing progress card shown while assistant response is still running.
7
+ *
8
+ * @public exported from `@promptbook/components`
9
+ */
10
+ export type ChatProgressItem = {
11
+ /**
12
+ * Stable item id used for incremental updates.
13
+ */
14
+ readonly id: string;
15
+ /**
16
+ * Item text in markdown.
17
+ */
18
+ readonly text: string_markdown;
19
+ /**
20
+ * Item status shown by the UI.
21
+ */
22
+ readonly status: 'pending' | 'completed';
23
+ };
24
+ /**
25
+ * Structured progress card rendered in place of generic thinking placeholders.
26
+ *
27
+ * @public exported from `@promptbook/components`
28
+ */
29
+ export type ChatProgressCard = {
30
+ /**
31
+ * Optional title shown at the top of the panel.
32
+ */
33
+ readonly title?: string_markdown;
34
+ /**
35
+ * Optional markdown section describing current work.
36
+ */
37
+ readonly now?: string_markdown;
38
+ /**
39
+ * Optional markdown section describing upcoming work.
40
+ */
41
+ readonly next?: string_markdown;
42
+ /**
43
+ * Ordered bullet items representing in-progress or completed tasks.
44
+ */
45
+ readonly items: ReadonlyArray<ChatProgressItem>;
46
+ /**
47
+ * Optional timestamp when this card was last updated.
48
+ */
49
+ readonly updatedAt?: string_date_iso8601;
50
+ /**
51
+ * Optional visibility flag allowing explicit panel hide before final answer.
52
+ */
53
+ readonly isVisible?: boolean;
54
+ };
5
55
  /**
6
56
  * Represents a single message within a chat interface.
7
57
  *
@@ -111,6 +161,10 @@ export type ChatMessage = Omit<Message<id>, 'direction' | 'recipients' | 'thread
111
161
  */
112
162
  excerpt?: string;
113
163
  }>;
164
+ /**
165
+ * Optional structured progress-card payload shown while a response is still in progress.
166
+ */
167
+ readonly progressCard?: ChatProgressCard;
114
168
  };
115
169
  /**
116
170
  * TODO: Make all fields readonly
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Shared bootstrap for Promptbook CLI used by both local `ts-node` and packaged `npx` entrypoints.
3
+ *
4
+ * @private internal utility of Promptbook CLI bootstrap
5
+ */
6
+ export declare function $runPromptbookCli(): Promise<void>;
7
+ /**
8
+ * Note: [🟡] Code in this file should never be published outside of `@promptbook/cli`
9
+ */
@@ -0,0 +1,14 @@
1
+ import type { Command as Program } from 'commander';
2
+ import type { $side_effect } from '../../../utils/organization/$side_effect';
3
+ /**
4
+ * Initializes `coder init` command for Promptbook CLI utilities.
5
+ *
6
+ * Note: `$` is used to indicate that this function is not a pure function - it registers a command in the CLI.
7
+ *
8
+ * @private internal function of `promptbookCli`
9
+ */
10
+ export declare function $initializeCoderInitCommand(program: Program): $side_effect;
11
+ /**
12
+ * Note: [💞] Ignore a discrepancy between file name and entity name
13
+ * Note: [🟡] Code in this file should never be published outside of `@promptbook/cli`
14
+ */
@@ -4,6 +4,7 @@ import type { $side_effect } from '../../utils/organization/$side_effect';
4
4
  * Initializes `coder` command with subcommands for Promptbook CLI utilities
5
5
  *
6
6
  * The coder command provides utilities for automated coding:
7
+ * - init: Initialize coder configuration in current project
7
8
  * - generate-boilerplates: Generate prompt boilerplate files
8
9
  * - find-refactor-candidates: Find files that need refactoring
9
10
  * - run: Run coding prompts with AI agents
@@ -1,4 +1,4 @@
1
- import { promptbookCli } from './promptbookCli';
1
+ import { $runPromptbookCli } from './$runPromptbookCli';
2
2
  /**
3
3
  * Note: [🔺] Purpose of this file is to export CLI for production environment
4
4
  */
@@ -8,7 +8,7 @@ import { promptbookCli } from './promptbookCli';
8
8
  * @public exported from `@promptbook/cli`
9
9
  */
10
10
  export declare const _CLI: {
11
- _initialize_promptbookCli: typeof promptbookCli;
11
+ _initialize_promptbookCli: typeof $runPromptbookCli;
12
12
  };
13
13
  /**
14
14
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -2,4 +2,4 @@
2
2
  /**
3
3
  * Note: [🔺] Purpose of this file is to test and use the current CLI in development environment
4
4
  */
5
- import '../../_packages/cli.index';
5
+ export {};
@@ -104,6 +104,10 @@ export type ToolRuntimeContext = {
104
104
  userId?: number;
105
105
  agentId?: string;
106
106
  agentName?: string;
107
+ /**
108
+ * Optional assistant message id currently being generated in durable web chat.
109
+ */
110
+ assistantMessageId?: string;
107
111
  parameters?: Record<string, string>;
108
112
  attachments?: ReadonlyArray<ChatAttachment>;
109
113
  };
@@ -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-20`).
18
+ * It follows semantic versioning (e.g., `0.112.0-22`).
19
19
  *
20
20
  * @generated
21
21
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/website-crawler",
3
- "version": "0.112.0-21",
3
+ "version": "0.112.0-23",
4
4
  "description": "Promptbook: Turn your company's scattered knowledge into AI ready books",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -98,7 +98,7 @@
98
98
  "module": "./esm/index.es.js",
99
99
  "typings": "./esm/typings/src/_packages/website-crawler.index.d.ts",
100
100
  "peerDependencies": {
101
- "@promptbook/core": "0.112.0-21"
101
+ "@promptbook/core": "0.112.0-23"
102
102
  },
103
103
  "dependencies": {
104
104
  "@mozilla/readability": "0.6.0",
package/umd/index.umd.js CHANGED
@@ -23,7 +23,7 @@
23
23
  * @generated
24
24
  * @see https://github.com/webgptorg/promptbook
25
25
  */
26
- const PROMPTBOOK_ENGINE_VERSION = '0.112.0-21';
26
+ const PROMPTBOOK_ENGINE_VERSION = '0.112.0-23';
27
27
  /**
28
28
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
29
29
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -54,6 +54,8 @@ import { mdSaveFormatDefinition } from '../book-components/Chat/save/markdown/md
54
54
  import { pdfSaveFormatDefinition } from '../book-components/Chat/save/pdf/pdfSaveFormatDefinition';
55
55
  import { reactSaveFormatDefinition } from '../book-components/Chat/save/react/reactSaveFormatDefinition';
56
56
  import { txtSaveFormatDefinition } from '../book-components/Chat/save/text/txtSaveFormatDefinition';
57
+ import type { ChatProgressItem } from '../book-components/Chat/types/ChatMessage';
58
+ import type { ChatProgressCard } from '../book-components/Chat/types/ChatMessage';
57
59
  import type { ChatMessage } from '../book-components/Chat/types/ChatMessage';
58
60
  import type { ChatParticipant } from '../book-components/Chat/types/ChatParticipant';
59
61
  import type { MessageButton } from '../book-components/Chat/utils/parseMessageButtons';
@@ -128,6 +130,8 @@ export { mdSaveFormatDefinition };
128
130
  export { pdfSaveFormatDefinition };
129
131
  export { reactSaveFormatDefinition };
130
132
  export { txtSaveFormatDefinition };
133
+ export type { ChatProgressItem };
134
+ export type { ChatProgressCard };
131
135
  export type { ChatMessage };
132
136
  export type { ChatParticipant };
133
137
  export type { MessageButton };
@@ -37,6 +37,8 @@ import type { ChatSaveFormatDefinition } from '../book-components/Chat/save/_com
37
37
  import type { string_chat_format_name } from '../book-components/Chat/save/_common/string_chat_format_name';
38
38
  import type { SourceChipProps } from '../book-components/Chat/SourceChip/SourceChip';
39
39
  import type { ChatToolCall } from '../book-components/Chat/types/ChatMessage';
40
+ import type { ChatProgressItem } from '../book-components/Chat/types/ChatMessage';
41
+ import type { ChatProgressCard } from '../book-components/Chat/types/ChatMessage';
40
42
  import type { ChatMessage } from '../book-components/Chat/types/ChatMessage';
41
43
  import type { ChatParticipant } from '../book-components/Chat/types/ChatParticipant';
42
44
  import type { ParsedCitation } from '../book-components/Chat/utils/parseCitationsFromContent';
@@ -458,6 +460,8 @@ export type { ChatSaveFormatDefinition };
458
460
  export type { string_chat_format_name };
459
461
  export type { SourceChipProps };
460
462
  export type { ChatToolCall };
463
+ export type { ChatProgressItem };
464
+ export type { ChatProgressCard };
461
465
  export type { ChatMessage };
462
466
  export type { ChatParticipant };
463
467
  export type { ParsedCitation };
@@ -2,6 +2,56 @@ import { Message } from '../../../types/Message';
2
2
  import type { ToolCall } from '../../../types/ToolCall';
3
3
  import type { id, string_date_iso8601, string_markdown } from '../../../types/typeAliases';
4
4
  export type ChatToolCall = ToolCall;
5
+ /**
6
+ * One item in a user-facing progress card shown while assistant response is still running.
7
+ *
8
+ * @public exported from `@promptbook/components`
9
+ */
10
+ export type ChatProgressItem = {
11
+ /**
12
+ * Stable item id used for incremental updates.
13
+ */
14
+ readonly id: string;
15
+ /**
16
+ * Item text in markdown.
17
+ */
18
+ readonly text: string_markdown;
19
+ /**
20
+ * Item status shown by the UI.
21
+ */
22
+ readonly status: 'pending' | 'completed';
23
+ };
24
+ /**
25
+ * Structured progress card rendered in place of generic thinking placeholders.
26
+ *
27
+ * @public exported from `@promptbook/components`
28
+ */
29
+ export type ChatProgressCard = {
30
+ /**
31
+ * Optional title shown at the top of the panel.
32
+ */
33
+ readonly title?: string_markdown;
34
+ /**
35
+ * Optional markdown section describing current work.
36
+ */
37
+ readonly now?: string_markdown;
38
+ /**
39
+ * Optional markdown section describing upcoming work.
40
+ */
41
+ readonly next?: string_markdown;
42
+ /**
43
+ * Ordered bullet items representing in-progress or completed tasks.
44
+ */
45
+ readonly items: ReadonlyArray<ChatProgressItem>;
46
+ /**
47
+ * Optional timestamp when this card was last updated.
48
+ */
49
+ readonly updatedAt?: string_date_iso8601;
50
+ /**
51
+ * Optional visibility flag allowing explicit panel hide before final answer.
52
+ */
53
+ readonly isVisible?: boolean;
54
+ };
5
55
  /**
6
56
  * Represents a single message within a chat interface.
7
57
  *
@@ -111,6 +161,10 @@ export type ChatMessage = Omit<Message<id>, 'direction' | 'recipients' | 'thread
111
161
  */
112
162
  excerpt?: string;
113
163
  }>;
164
+ /**
165
+ * Optional structured progress-card payload shown while a response is still in progress.
166
+ */
167
+ readonly progressCard?: ChatProgressCard;
114
168
  };
115
169
  /**
116
170
  * TODO: Make all fields readonly
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Shared bootstrap for Promptbook CLI used by both local `ts-node` and packaged `npx` entrypoints.
3
+ *
4
+ * @private internal utility of Promptbook CLI bootstrap
5
+ */
6
+ export declare function $runPromptbookCli(): Promise<void>;
7
+ /**
8
+ * Note: [🟡] Code in this file should never be published outside of `@promptbook/cli`
9
+ */
@@ -0,0 +1,14 @@
1
+ import type { Command as Program } from 'commander';
2
+ import type { $side_effect } from '../../../utils/organization/$side_effect';
3
+ /**
4
+ * Initializes `coder init` command for Promptbook CLI utilities.
5
+ *
6
+ * Note: `$` is used to indicate that this function is not a pure function - it registers a command in the CLI.
7
+ *
8
+ * @private internal function of `promptbookCli`
9
+ */
10
+ export declare function $initializeCoderInitCommand(program: Program): $side_effect;
11
+ /**
12
+ * Note: [💞] Ignore a discrepancy between file name and entity name
13
+ * Note: [🟡] Code in this file should never be published outside of `@promptbook/cli`
14
+ */
@@ -4,6 +4,7 @@ import type { $side_effect } from '../../utils/organization/$side_effect';
4
4
  * Initializes `coder` command with subcommands for Promptbook CLI utilities
5
5
  *
6
6
  * The coder command provides utilities for automated coding:
7
+ * - init: Initialize coder configuration in current project
7
8
  * - generate-boilerplates: Generate prompt boilerplate files
8
9
  * - find-refactor-candidates: Find files that need refactoring
9
10
  * - run: Run coding prompts with AI agents
@@ -1,4 +1,4 @@
1
- import { promptbookCli } from './promptbookCli';
1
+ import { $runPromptbookCli } from './$runPromptbookCli';
2
2
  /**
3
3
  * Note: [🔺] Purpose of this file is to export CLI for production environment
4
4
  */
@@ -8,7 +8,7 @@ import { promptbookCli } from './promptbookCli';
8
8
  * @public exported from `@promptbook/cli`
9
9
  */
10
10
  export declare const _CLI: {
11
- _initialize_promptbookCli: typeof promptbookCli;
11
+ _initialize_promptbookCli: typeof $runPromptbookCli;
12
12
  };
13
13
  /**
14
14
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -2,4 +2,4 @@
2
2
  /**
3
3
  * Note: [🔺] Purpose of this file is to test and use the current CLI in development environment
4
4
  */
5
- import '../../_packages/cli.index';
5
+ export {};
@@ -104,6 +104,10 @@ export type ToolRuntimeContext = {
104
104
  userId?: number;
105
105
  agentId?: string;
106
106
  agentName?: string;
107
+ /**
108
+ * Optional assistant message id currently being generated in durable web chat.
109
+ */
110
+ assistantMessageId?: string;
107
111
  parameters?: Record<string, string>;
108
112
  attachments?: ReadonlyArray<ChatAttachment>;
109
113
  };
@@ -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-20`).
18
+ * It follows semantic versioning (e.g., `0.112.0-22`).
19
19
  *
20
20
  * @generated
21
21
  */