@promptbook/templates 0.100.0-22 → 0.100.0-24

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
@@ -16,7 +16,7 @@ const BOOK_LANGUAGE_VERSION = '1.0.0';
16
16
  * @generated
17
17
  * @see https://github.com/webgptorg/promptbook
18
18
  */
19
- const PROMPTBOOK_ENGINE_VERSION = '0.100.0-22';
19
+ const PROMPTBOOK_ENGINE_VERSION = '0.100.0-24';
20
20
  /**
21
21
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
22
22
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -1559,7 +1559,7 @@ function getTemplatesPipelineCollection() {
1559
1559
  "preparations": [
1560
1560
  {
1561
1561
  "id": 1,
1562
- "promptbookVersion": "0.100.0-21",
1562
+ "promptbookVersion": "0.100.0-23",
1563
1563
  "usage": {
1564
1564
  "price": {
1565
1565
  "value": 0.026725000000000002
@@ -2112,7 +2112,7 @@ function getTemplatesPipelineCollection() {
2112
2112
  "preparations": [
2113
2113
  {
2114
2114
  "id": 1,
2115
- "promptbookVersion": "0.100.0-21",
2115
+ "promptbookVersion": "0.100.0-23",
2116
2116
  "usage": {
2117
2117
  "price": {
2118
2118
  "value": 0.026725000000000002
@@ -2806,7 +2806,7 @@ function getTemplatesPipelineCollection() {
2806
2806
  "preparations": [
2807
2807
  {
2808
2808
  "id": 1,
2809
- "promptbookVersion": "0.100.0-21",
2809
+ "promptbookVersion": "0.100.0-23",
2810
2810
  "usage": {
2811
2811
  "price": {
2812
2812
  "value": 0.0262975
@@ -2948,7 +2948,7 @@ function getTemplatesPipelineCollection() {
2948
2948
  "preparations": [
2949
2949
  {
2950
2950
  "id": 1,
2951
- "promptbookVersion": "0.100.0-21",
2951
+ "promptbookVersion": "0.100.0-23",
2952
2952
  "usage": {
2953
2953
  "price": {
2954
2954
  "value": 0.0279975
@@ -3044,7 +3044,7 @@ function getTemplatesPipelineCollection() {
3044
3044
  "preparations": [
3045
3045
  {
3046
3046
  "id": 1,
3047
- "promptbookVersion": "0.100.0-21",
3047
+ "promptbookVersion": "0.100.0-23",
3048
3048
  "usage": {
3049
3049
  "price": {
3050
3050
  "value": 0
@@ -3181,7 +3181,7 @@ function getTemplatesPipelineCollection() {
3181
3181
  "preparations": [
3182
3182
  {
3183
3183
  "id": 1,
3184
- "promptbookVersion": "0.100.0-21",
3184
+ "promptbookVersion": "0.100.0-23",
3185
3185
  "usage": {
3186
3186
  "price": {
3187
3187
  "value": 0.027682500000000002
@@ -3331,7 +3331,7 @@ function getTemplatesPipelineCollection() {
3331
3331
  "preparations": [
3332
3332
  {
3333
3333
  "id": 1,
3334
- "promptbookVersion": "0.100.0-21",
3334
+ "promptbookVersion": "0.100.0-23",
3335
3335
  "usage": {
3336
3336
  "price": {
3337
3337
  "value": 0.027307500000000002
@@ -3658,7 +3658,7 @@ function getTemplatesPipelineCollection() {
3658
3658
  "preparations": [
3659
3659
  {
3660
3660
  "id": 1,
3661
- "promptbookVersion": "0.100.0-21",
3661
+ "promptbookVersion": "0.100.0-23",
3662
3662
  "usage": {
3663
3663
  "price": {
3664
3664
  "value": 0.02756
@@ -3793,7 +3793,7 @@ function getTemplatesPipelineCollection() {
3793
3793
  "preparations": [
3794
3794
  {
3795
3795
  "id": 1,
3796
- "promptbookVersion": "0.100.0-21",
3796
+ "promptbookVersion": "0.100.0-23",
3797
3797
  "usage": {
3798
3798
  "price": {
3799
3799
  "value": 0.026932500000000005
@@ -0,0 +1,4 @@
1
+ import { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION } from '../version';
2
+ import { BookEditor } from '../book-components/BookEditor/BookEditor';
3
+ export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
4
+ export { BookEditor };
@@ -11,6 +11,7 @@ import type { KnowledgeChunk } from '../book-2.0/commitments/KNOWLEDGE/types';
11
11
  import type { KnowledgeBase } from '../book-2.0/commitments/KNOWLEDGE/types';
12
12
  import type { RetrievalResult } from '../book-2.0/commitments/KNOWLEDGE/types';
13
13
  import type { RAGConfig } from '../book-2.0/commitments/KNOWLEDGE/types';
14
+ import type { BookEditorProps } from '../book-components/BookEditor/BookEditor';
14
15
  import type { PipelineCollection } from '../collection/PipelineCollection';
15
16
  import type { Command } from '../commands/_common/types/Command';
16
17
  import type { CommandParser } from '../commands/_common/types/CommandParser';
@@ -329,6 +330,7 @@ export type { KnowledgeChunk };
329
330
  export type { KnowledgeBase };
330
331
  export type { RetrievalResult };
331
332
  export type { RAGConfig };
333
+ export type { BookEditorProps };
332
334
  export type { PipelineCollection };
333
335
  export type { Command };
334
336
  export type { CommandParser };
@@ -18,9 +18,13 @@ import type { AgentModelRequirements } from '../_misc/AgentModelRequirements';
18
18
  export declare class ActionCommitmentDefinition extends BaseCommitmentDefinition<'ACTION'> {
19
19
  constructor();
20
20
  /**
21
- * Markdown documentation for ACTION commitment.
21
+ * Short one-line description of ACTION.
22
22
  */
23
23
  get description(): string;
24
+ /**
25
+ * Markdown documentation for ACTION commitment.
26
+ */
27
+ get documentation(): string;
24
28
  applyToAgentModelRequirements(requirements: AgentModelRequirements, content: string): AgentModelRequirements;
25
29
  }
26
30
  /**
@@ -19,9 +19,13 @@ import type { AgentModelRequirements } from '../_misc/AgentModelRequirements';
19
19
  export declare class FormatCommitmentDefinition extends BaseCommitmentDefinition<'FORMAT'> {
20
20
  constructor();
21
21
  /**
22
- * Markdown documentation for FORMAT commitment.
22
+ * Short one-line description of FORMAT.
23
23
  */
24
24
  get description(): string;
25
+ /**
26
+ * Markdown documentation for FORMAT commitment.
27
+ */
28
+ get documentation(): string;
25
29
  applyToAgentModelRequirements(requirements: AgentModelRequirements, content: string): AgentModelRequirements;
26
30
  }
27
31
  /**
@@ -23,9 +23,13 @@ export declare class KnowledgeCommitmentDefinition extends BaseCommitmentDefinit
23
23
  private ragService;
24
24
  constructor();
25
25
  /**
26
- * Markdown documentation for KNOWLEDGE commitment.
26
+ * Short one-line description of KNOWLEDGE.
27
27
  */
28
28
  get description(): string;
29
+ /**
30
+ * Markdown documentation for KNOWLEDGE commitment.
31
+ */
32
+ get documentation(): string;
29
33
  applyToAgentModelRequirements(requirements: AgentModelRequirements, content: string): AgentModelRequirements;
30
34
  /**
31
35
  * Check if content is a URL
@@ -19,9 +19,13 @@ import type { AgentModelRequirements } from '../_misc/AgentModelRequirements';
19
19
  export declare class MetaImageCommitmentDefinition extends BaseCommitmentDefinition<'META IMAGE'> {
20
20
  constructor();
21
21
  /**
22
- * Markdown documentation for META IMAGE commitment.
22
+ * Short one-line description of META IMAGE.
23
23
  */
24
24
  get description(): string;
25
+ /**
26
+ * Markdown documentation for META IMAGE commitment.
27
+ */
28
+ get documentation(): string;
25
29
  applyToAgentModelRequirements(requirements: AgentModelRequirements, content: string): AgentModelRequirements;
26
30
  /**
27
31
  * Extracts the profile image URL from the content
@@ -27,9 +27,13 @@ import type { AgentModelRequirements } from '../_misc/AgentModelRequirements';
27
27
  export declare class MetaLinkCommitmentDefinition extends BaseCommitmentDefinition<'META LINK'> {
28
28
  constructor();
29
29
  /**
30
- * Markdown documentation for META LINK commitment.
30
+ * Short one-line description of META LINK.
31
31
  */
32
32
  get description(): string;
33
+ /**
34
+ * Markdown documentation for META LINK commitment.
35
+ */
36
+ get documentation(): string;
33
37
  applyToAgentModelRequirements(requirements: AgentModelRequirements, content: string): AgentModelRequirements;
34
38
  /**
35
39
  * Extracts the profile link URL from the content
@@ -19,9 +19,13 @@ import type { AgentModelRequirements } from '../_misc/AgentModelRequirements';
19
19
  export declare class ModelCommitmentDefinition extends BaseCommitmentDefinition<'MODEL'> {
20
20
  constructor();
21
21
  /**
22
- * Markdown documentation for MODEL commitment.
22
+ * Short one-line description of MODEL.
23
23
  */
24
24
  get description(): string;
25
+ /**
26
+ * Markdown documentation for MODEL commitment.
27
+ */
28
+ get documentation(): string;
25
29
  applyToAgentModelRequirements(requirements: AgentModelRequirements, content: string): AgentModelRequirements;
26
30
  }
27
31
  /**
@@ -29,9 +29,13 @@ import type { AgentModelRequirements } from '../_misc/AgentModelRequirements';
29
29
  export declare class NoteCommitmentDefinition extends BaseCommitmentDefinition<'NOTE'> {
30
30
  constructor();
31
31
  /**
32
- * Markdown documentation for NOTE commitment.
32
+ * Short one-line description of NOTE.
33
33
  */
34
34
  get description(): string;
35
+ /**
36
+ * Markdown documentation for NOTE commitment.
37
+ */
38
+ get documentation(): string;
35
39
  applyToAgentModelRequirements(requirements: AgentModelRequirements, content: string): AgentModelRequirements;
36
40
  }
37
41
  /**
@@ -26,9 +26,13 @@ import type { AgentModelRequirements } from '../_misc/AgentModelRequirements';
26
26
  export declare class PersonaCommitmentDefinition extends BaseCommitmentDefinition<'PERSONA'> {
27
27
  constructor();
28
28
  /**
29
- * Markdown documentation for PERSONA commitment.
29
+ * Short one-line description of PERSONA.
30
30
  */
31
31
  get description(): string;
32
+ /**
33
+ * Markdown documentation for PERSONA commitment.
34
+ */
35
+ get documentation(): string;
32
36
  applyToAgentModelRequirements(requirements: AgentModelRequirements, content: string): AgentModelRequirements;
33
37
  }
34
38
  /**
@@ -18,9 +18,13 @@ import type { AgentModelRequirements } from '../_misc/AgentModelRequirements';
18
18
  export declare class RuleCommitmentDefinition extends BaseCommitmentDefinition<'RULE' | 'RULES'> {
19
19
  constructor(type?: 'RULE' | 'RULES');
20
20
  /**
21
- * Markdown documentation for RULE/RULES commitment.
21
+ * Short one-line description of RULE/RULES.
22
22
  */
23
23
  get description(): string;
24
+ /**
25
+ * Markdown documentation for RULE/RULES commitment.
26
+ */
27
+ get documentation(): string;
24
28
  applyToAgentModelRequirements(requirements: AgentModelRequirements, content: string): AgentModelRequirements;
25
29
  }
26
30
  /**
@@ -18,9 +18,13 @@ import type { AgentModelRequirements } from '../_misc/AgentModelRequirements';
18
18
  export declare class SampleCommitmentDefinition extends BaseCommitmentDefinition<'SAMPLE' | 'EXAMPLE'> {
19
19
  constructor(type?: 'SAMPLE' | 'EXAMPLE');
20
20
  /**
21
- * Markdown documentation for SAMPLE/EXAMPLE commitment.
21
+ * Short one-line description of SAMPLE/EXAMPLE.
22
22
  */
23
23
  get description(): string;
24
+ /**
25
+ * Markdown documentation for SAMPLE/EXAMPLE commitment.
26
+ */
27
+ get documentation(): string;
24
28
  applyToAgentModelRequirements(requirements: AgentModelRequirements, content: string): AgentModelRequirements;
25
29
  }
26
30
  /**
@@ -18,9 +18,13 @@ import type { AgentModelRequirements } from '../_misc/AgentModelRequirements';
18
18
  export declare class StyleCommitmentDefinition extends BaseCommitmentDefinition<'STYLE'> {
19
19
  constructor();
20
20
  /**
21
- * Markdown documentation for STYLE commitment.
21
+ * Short one-line description of STYLE.
22
22
  */
23
23
  get description(): string;
24
+ /**
25
+ * Markdown documentation for STYLE commitment.
26
+ */
27
+ get documentation(): string;
24
28
  applyToAgentModelRequirements(requirements: AgentModelRequirements, content: string): AgentModelRequirements;
25
29
  }
26
30
  /**
@@ -10,10 +10,15 @@ export declare abstract class BaseCommitmentDefinition<TBookCommitment extends s
10
10
  readonly type: TBookCommitment;
11
11
  constructor(type: TBookCommitment);
12
12
  /**
13
- * Human-readable markdown documentation for this commitment, available at runtime.
13
+ * Short one-line markdown description; concise, may use inline **markdown**.
14
14
  * Must be implemented by each concrete commitment.
15
15
  */
16
16
  abstract get description(): string;
17
+ /**
18
+ * Human-readable markdown documentation for this commitment, available at runtime.
19
+ * Must be implemented by each concrete commitment.
20
+ */
21
+ abstract get documentation(): string;
17
22
  /**
18
23
  * Creates a regex pattern to match this commitment in agent source
19
24
  * Uses the existing createCommitmentRegex function as internal helper
@@ -11,12 +11,17 @@ export interface CommitmentDefinition {
11
11
  * The type/name of this commitment (e.g., 'PERSONA', 'KNOWLEDGE', etc.)
12
12
  */
13
13
  readonly type: string;
14
+ /**
15
+ * Short one-line markdown description of this commitment (no lists or code blocks).
16
+ * Keep it concise; may use inline markdown like **bold** or *italic*.
17
+ */
18
+ readonly description: string;
14
19
  /**
15
20
  * Human-readable markdown documentation for this commitment.
16
21
  * Should explain what the commitment does and include example usage.
17
22
  * This is available at runtime for UIs, docs, and tooling.
18
23
  */
19
- readonly description: string;
24
+ readonly documentation: string;
20
25
  /**
21
26
  * Creates a regex pattern to match this commitment in agent source
22
27
  * This regex should capture the commitment content in a 'contents' named group
@@ -11,8 +11,12 @@ import { BaseCommitmentDefinition } from './BaseCommitmentDefinition';
11
11
  export declare class NotYetImplementedCommitmentDefinition<TBookCommitment extends string> extends BaseCommitmentDefinition<TBookCommitment> {
12
12
  constructor(type: TBookCommitment);
13
13
  /**
14
- * Markdown documentation available at runtime.
14
+ * Short one-line description of a placeholder commitment.
15
15
  */
16
16
  get description(): string;
17
+ /**
18
+ * Markdown documentation available at runtime.
19
+ */
20
+ get documentation(): string;
17
21
  applyToAgentModelRequirements(requirements: AgentModelRequirements, content: string): AgentModelRequirements;
18
22
  }
@@ -0,0 +1,26 @@
1
+ import type { string_book } from '../../book-2.0/agent-source/string_book';
2
+ export interface BookEditorProps {
3
+ /**
4
+ * Additional CSS classes to apply to the editor container.
5
+ */
6
+ className?: string;
7
+ /**
8
+ * CSS className for a font (e.g. from next/font) to style the editor text.
9
+ * If omitted, defaults to system fonts.
10
+ */
11
+ fontClassName?: string;
12
+ /**
13
+ * The book which is being edited.
14
+ */
15
+ value?: string_book;
16
+ /**
17
+ * Callback function to handle changes in the book content.
18
+ */
19
+ onChange?: (value: string_book) => void;
20
+ }
21
+ /**
22
+ * Renders a book editor
23
+ *
24
+ * @public exported from `@promptbook/components`
25
+ */
26
+ export declare function BookEditor(props: BookEditorProps): import("react/jsx-runtime").JSX.Element;
@@ -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.100.0-21`).
18
+ * It follows semantic versioning (e.g., `0.100.0-23`).
19
19
  *
20
20
  * @generated
21
21
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/templates",
3
- "version": "0.100.0-22",
3
+ "version": "0.100.0-24",
4
4
  "description": "Promptbook: Run AI apps in plain human language across multiple models and platforms",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -95,7 +95,7 @@
95
95
  "module": "./esm/index.es.js",
96
96
  "typings": "./esm/typings/src/_packages/templates.index.d.ts",
97
97
  "peerDependencies": {
98
- "@promptbook/core": "0.100.0-22"
98
+ "@promptbook/core": "0.100.0-24"
99
99
  },
100
100
  "dependencies": {
101
101
  "prettier": "2.8.1",
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.100.0-22';
26
+ const PROMPTBOOK_ENGINE_VERSION = '0.100.0-24';
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
@@ -1566,7 +1566,7 @@
1566
1566
  "preparations": [
1567
1567
  {
1568
1568
  "id": 1,
1569
- "promptbookVersion": "0.100.0-21",
1569
+ "promptbookVersion": "0.100.0-23",
1570
1570
  "usage": {
1571
1571
  "price": {
1572
1572
  "value": 0.026725000000000002
@@ -2119,7 +2119,7 @@
2119
2119
  "preparations": [
2120
2120
  {
2121
2121
  "id": 1,
2122
- "promptbookVersion": "0.100.0-21",
2122
+ "promptbookVersion": "0.100.0-23",
2123
2123
  "usage": {
2124
2124
  "price": {
2125
2125
  "value": 0.026725000000000002
@@ -2813,7 +2813,7 @@
2813
2813
  "preparations": [
2814
2814
  {
2815
2815
  "id": 1,
2816
- "promptbookVersion": "0.100.0-21",
2816
+ "promptbookVersion": "0.100.0-23",
2817
2817
  "usage": {
2818
2818
  "price": {
2819
2819
  "value": 0.0262975
@@ -2955,7 +2955,7 @@
2955
2955
  "preparations": [
2956
2956
  {
2957
2957
  "id": 1,
2958
- "promptbookVersion": "0.100.0-21",
2958
+ "promptbookVersion": "0.100.0-23",
2959
2959
  "usage": {
2960
2960
  "price": {
2961
2961
  "value": 0.0279975
@@ -3051,7 +3051,7 @@
3051
3051
  "preparations": [
3052
3052
  {
3053
3053
  "id": 1,
3054
- "promptbookVersion": "0.100.0-21",
3054
+ "promptbookVersion": "0.100.0-23",
3055
3055
  "usage": {
3056
3056
  "price": {
3057
3057
  "value": 0
@@ -3188,7 +3188,7 @@
3188
3188
  "preparations": [
3189
3189
  {
3190
3190
  "id": 1,
3191
- "promptbookVersion": "0.100.0-21",
3191
+ "promptbookVersion": "0.100.0-23",
3192
3192
  "usage": {
3193
3193
  "price": {
3194
3194
  "value": 0.027682500000000002
@@ -3338,7 +3338,7 @@
3338
3338
  "preparations": [
3339
3339
  {
3340
3340
  "id": 1,
3341
- "promptbookVersion": "0.100.0-21",
3341
+ "promptbookVersion": "0.100.0-23",
3342
3342
  "usage": {
3343
3343
  "price": {
3344
3344
  "value": 0.027307500000000002
@@ -3665,7 +3665,7 @@
3665
3665
  "preparations": [
3666
3666
  {
3667
3667
  "id": 1,
3668
- "promptbookVersion": "0.100.0-21",
3668
+ "promptbookVersion": "0.100.0-23",
3669
3669
  "usage": {
3670
3670
  "price": {
3671
3671
  "value": 0.02756
@@ -3800,7 +3800,7 @@
3800
3800
  "preparations": [
3801
3801
  {
3802
3802
  "id": 1,
3803
- "promptbookVersion": "0.100.0-21",
3803
+ "promptbookVersion": "0.100.0-23",
3804
3804
  "usage": {
3805
3805
  "price": {
3806
3806
  "value": 0.026932500000000005