@promptbook/types 0.103.0-53 → 0.103.0-55

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.
Files changed (37) hide show
  1. package/esm/typings/src/_packages/core.index.d.ts +8 -6
  2. package/esm/typings/src/_packages/types.index.d.ts +1 -1
  3. package/esm/typings/src/book-2.0/agent-source/AgentModelRequirements.d.ts +4 -0
  4. package/esm/typings/src/commitments/ACTION/ACTION.d.ts +4 -0
  5. package/esm/typings/src/commitments/CLOSED/CLOSED.d.ts +35 -0
  6. package/esm/typings/src/commitments/COMPONENT/COMPONENT.d.ts +28 -0
  7. package/esm/typings/src/commitments/DELETE/DELETE.d.ts +4 -0
  8. package/esm/typings/src/commitments/FORMAT/FORMAT.d.ts +4 -0
  9. package/esm/typings/src/commitments/FROM/FROM.d.ts +34 -0
  10. package/esm/typings/src/commitments/GOAL/GOAL.d.ts +4 -0
  11. package/esm/typings/src/commitments/IMPORTANT/IMPORTANT.d.ts +26 -0
  12. package/esm/typings/src/commitments/KNOWLEDGE/KNOWLEDGE.d.ts +4 -0
  13. package/esm/typings/src/commitments/LANGUAGE/LANGUAGE.d.ts +35 -0
  14. package/esm/typings/src/commitments/MEMORY/MEMORY.d.ts +4 -0
  15. package/esm/typings/src/commitments/MESSAGE/AgentMessageCommitmentDefinition.d.ts +4 -0
  16. package/esm/typings/src/commitments/MESSAGE/InitialMessageCommitmentDefinition.d.ts +4 -0
  17. package/esm/typings/src/commitments/MESSAGE/MESSAGE.d.ts +4 -0
  18. package/esm/typings/src/commitments/MESSAGE/UserMessageCommitmentDefinition.d.ts +4 -0
  19. package/esm/typings/src/commitments/META/META.d.ts +4 -0
  20. package/esm/typings/src/commitments/META_COLOR/META_COLOR.d.ts +4 -0
  21. package/esm/typings/src/commitments/META_IMAGE/META_IMAGE.d.ts +4 -0
  22. package/esm/typings/src/commitments/META_LINK/META_LINK.d.ts +4 -0
  23. package/esm/typings/src/commitments/MODEL/MODEL.d.ts +4 -0
  24. package/esm/typings/src/commitments/NOTE/NOTE.d.ts +4 -0
  25. package/esm/typings/src/commitments/OPEN/OPEN.d.ts +35 -0
  26. package/esm/typings/src/commitments/PERSONA/PERSONA.d.ts +4 -0
  27. package/esm/typings/src/commitments/RULE/RULE.d.ts +4 -0
  28. package/esm/typings/src/commitments/SAMPLE/SAMPLE.d.ts +4 -0
  29. package/esm/typings/src/commitments/SCENARIO/SCENARIO.d.ts +4 -0
  30. package/esm/typings/src/commitments/STYLE/STYLE.d.ts +4 -0
  31. package/esm/typings/src/commitments/_base/BaseCommitmentDefinition.d.ts +5 -0
  32. package/esm/typings/src/commitments/_base/CommitmentDefinition.d.ts +5 -0
  33. package/esm/typings/src/commitments/_base/NotYetImplementedCommitmentDefinition.d.ts +4 -0
  34. package/esm/typings/src/commitments/index.d.ts +1 -82
  35. package/esm/typings/src/commitments/registry.d.ts +68 -0
  36. package/esm/typings/src/version.d.ts +1 -1
  37. package/package.json +3 -3
@@ -21,12 +21,13 @@ import { pipelineCollectionToJson } from '../collection/pipeline-collection/pipe
21
21
  import { createEmptyAgentModelRequirements } from '../commitments/_base/createEmptyAgentModelRequirements';
22
22
  import { createBasicAgentModelRequirements } from '../commitments/_base/createEmptyAgentModelRequirements';
23
23
  import { NotYetImplementedCommitmentDefinition } from '../commitments/_base/NotYetImplementedCommitmentDefinition';
24
- import { getCommitmentDefinition } from '../commitments/index';
25
- import { getAllCommitmentDefinitions } from '../commitments/index';
26
- import { getAllCommitmentTypes } from '../commitments/index';
27
- import { isCommitmentSupported } from '../commitments/index';
28
- import type { GroupedCommitmentDefinition } from '../commitments/index';
29
- import { getGroupedCommitmentDefinitions } from '../commitments/index';
24
+ import { registerCommitment } from '../commitments/registry';
25
+ import { getCommitmentDefinition } from '../commitments/registry';
26
+ import { getAllCommitmentDefinitions } from '../commitments/registry';
27
+ import { getAllCommitmentTypes } from '../commitments/registry';
28
+ import { isCommitmentSupported } from '../commitments/registry';
29
+ import type { GroupedCommitmentDefinition } from '../commitments/registry';
30
+ import { getGroupedCommitmentDefinitions } from '../commitments/registry';
30
31
  import { NAME } from '../config';
31
32
  import { ADMIN_EMAIL } from '../config';
32
33
  import { ADMIN_GITHUB_NAME } from '../config';
@@ -216,6 +217,7 @@ export { pipelineCollectionToJson };
216
217
  export { createEmptyAgentModelRequirements };
217
218
  export { createBasicAgentModelRequirements };
218
219
  export { NotYetImplementedCommitmentDefinition };
220
+ export { registerCommitment };
219
221
  export { getCommitmentDefinition };
220
222
  export { getAllCommitmentDefinitions };
221
223
  export { getAllCommitmentTypes };
@@ -57,7 +57,7 @@ import type { InstrumentCommand } from '../commands/X_INSTRUMENT/InstrumentComma
57
57
  import type { BookCommitment } from '../commitments/_base/BookCommitment';
58
58
  import type { CommitmentDefinition } from '../commitments/_base/CommitmentDefinition';
59
59
  import type { ParsedCommitment } from '../commitments/_base/ParsedCommitment';
60
- import type { GroupedCommitmentDefinition } from '../commitments/index';
60
+ import type { GroupedCommitmentDefinition } from '../commitments/registry';
61
61
  import type { PrettifyOptions } from '../conversion/prettify/PrettifyOptions';
62
62
  import type { renderPipelineMermaidOptions } from '../conversion/prettify/renderPipelineMermaidOptions';
63
63
  import type { CallbackInterfaceToolsOptions } from '../dialogs/callback/CallbackInterfaceToolsOptions';
@@ -18,6 +18,10 @@ export type AgentModelRequirements = {
18
18
  * Optional list of MCP servers that the agent can connect to
19
19
  */
20
20
  readonly mcpServers?: ReadonlyArray<string>;
21
+ /**
22
+ * Optional link to the parent agent from which this agent inherits
23
+ */
24
+ readonly parentAgentUrl?: string_knowledge_source_link;
21
25
  /**
22
26
  * Optional list of knowledge source links that the agent can use
23
27
  */
@@ -21,6 +21,10 @@ export declare class ActionCommitmentDefinition extends BaseCommitmentDefinition
21
21
  * Short one-line description of ACTION.
22
22
  */
23
23
  get description(): string;
24
+ /**
25
+ * Icon for this commitment.
26
+ */
27
+ get icon(): string;
24
28
  /**
25
29
  * Markdown documentation for ACTION commitment.
26
30
  */
@@ -0,0 +1,35 @@
1
+ import type { AgentModelRequirements } from '../../book-2.0/agent-source/AgentModelRequirements';
2
+ import { BaseCommitmentDefinition } from '../_base/BaseCommitmentDefinition';
3
+ /**
4
+ * CLOSED commitment definition
5
+ *
6
+ * The CLOSED commitment specifies that the agent CANNOT be modified by conversation.
7
+ * It prevents the agent from learning from interactions and updating its source code.
8
+ *
9
+ * Example usage in agent source:
10
+ *
11
+ * ```book
12
+ * CLOSED
13
+ * ```
14
+ *
15
+ * @private [🪔] Maybe export the commitments through some package
16
+ */
17
+ export declare class ClosedCommitmentDefinition extends BaseCommitmentDefinition<'CLOSED'> {
18
+ constructor();
19
+ /**
20
+ * Short one-line description of CLOSED.
21
+ */
22
+ get description(): string;
23
+ /**
24
+ * Icon for this commitment.
25
+ */
26
+ get icon(): string;
27
+ /**
28
+ * Markdown documentation for CLOSED commitment.
29
+ */
30
+ get documentation(): string;
31
+ applyToAgentModelRequirements(requirements: AgentModelRequirements, _content: string): AgentModelRequirements;
32
+ }
33
+ /**
34
+ * Note: [💞] Ignore a discrepancy between file name and entity name
35
+ */
@@ -0,0 +1,28 @@
1
+ import type { AgentModelRequirements } from '../../book-2.0/agent-source/AgentModelRequirements';
2
+ import { BaseCommitmentDefinition } from '../_base/BaseCommitmentDefinition';
3
+ /**
4
+ * COMPONENT commitment definition
5
+ *
6
+ * The COMPONENT commitment defines a UI component that the agent can render in the chat.
7
+ *
8
+ * @private [🪔] Maybe export the commitments through some package
9
+ */
10
+ export declare class ComponentCommitmentDefinition extends BaseCommitmentDefinition<'COMPONENT'> {
11
+ constructor();
12
+ /**
13
+ * Short one-line description of COMPONENT.
14
+ */
15
+ get description(): string;
16
+ /**
17
+ * Icon for this commitment.
18
+ */
19
+ get icon(): string;
20
+ /**
21
+ * Markdown documentation for COMPONENT commitment.
22
+ */
23
+ get documentation(): string;
24
+ applyToAgentModelRequirements(requirements: AgentModelRequirements, content: string): AgentModelRequirements;
25
+ }
26
+ /**
27
+ * Note: [💞] Ignore a discrepancy between file name and entity name
28
+ */
@@ -24,6 +24,10 @@ export declare class DeleteCommitmentDefinition extends BaseCommitmentDefinition
24
24
  * Short one-line description of DELETE/CANCEL/DISCARD/REMOVE.
25
25
  */
26
26
  get description(): string;
27
+ /**
28
+ * Icon for this commitment.
29
+ */
30
+ get icon(): string;
27
31
  /**
28
32
  * Markdown documentation for DELETE commitment.
29
33
  */
@@ -22,6 +22,10 @@ export declare class FormatCommitmentDefinition extends BaseCommitmentDefinition
22
22
  * Short one-line description of FORMAT.
23
23
  */
24
24
  get description(): string;
25
+ /**
26
+ * Icon for this commitment.
27
+ */
28
+ get icon(): string;
25
29
  /**
26
30
  * Markdown documentation for FORMAT commitment.
27
31
  */
@@ -0,0 +1,34 @@
1
+ import type { AgentModelRequirements } from '../../book-2.0/agent-source/AgentModelRequirements';
2
+ import { BaseCommitmentDefinition } from '../_base/BaseCommitmentDefinition';
3
+ /**
4
+ * FROM commitment definition
5
+ *
6
+ * The FROM commitment tells the agent that its `agentSource` is inherited from another agent.
7
+ *
8
+ * Example usage in agent source:
9
+ *
10
+ * ```book
11
+ * FROM https://s6.ptbk.io/benjamin-white
12
+ * ```
13
+ *
14
+ * @private [🪔] Maybe export the commitments through some package
15
+ */
16
+ export declare class FromCommitmentDefinition extends BaseCommitmentDefinition<'FROM'> {
17
+ constructor(type?: 'FROM');
18
+ /**
19
+ * Short one-line description of FROM.
20
+ */
21
+ get description(): string;
22
+ /**
23
+ * Icon for this commitment.
24
+ */
25
+ get icon(): string;
26
+ /**
27
+ * Markdown documentation for FROM commitment.
28
+ */
29
+ get documentation(): string;
30
+ applyToAgentModelRequirements(requirements: AgentModelRequirements, content: string): AgentModelRequirements;
31
+ }
32
+ /**
33
+ * Note: [💞] Ignore a discrepancy between file name and entity name
34
+ */
@@ -22,6 +22,10 @@ export declare class GoalCommitmentDefinition extends BaseCommitmentDefinition<'
22
22
  * Short one-line description of GOAL.
23
23
  */
24
24
  get description(): string;
25
+ /**
26
+ * Icon for this commitment.
27
+ */
28
+ get icon(): string;
25
29
  /**
26
30
  * Markdown documentation for GOAL commitment.
27
31
  */
@@ -0,0 +1,26 @@
1
+ import type { AgentModelRequirements } from '../../book-2.0/agent-source/AgentModelRequirements';
2
+ import { BaseCommitmentDefinition } from '../_base/BaseCommitmentDefinition';
3
+ /**
4
+ * IMPORTANT co-commitment definition
5
+ *
6
+ * The IMPORTANT co-commitment modifies another commitment to emphasize its importance.
7
+ * It is typically used with RULE to mark it as critical.
8
+ *
9
+ * Example usage in agent source:
10
+ *
11
+ * ```book
12
+ * IMPORTANT RULE Never provide medical advice
13
+ * ```
14
+ *
15
+ * @private [🪔] Maybe export the commitments through some package
16
+ */
17
+ export declare class ImportantCommitmentDefinition extends BaseCommitmentDefinition<'IMPORTANT'> {
18
+ constructor();
19
+ get description(): string;
20
+ get icon(): string;
21
+ get documentation(): string;
22
+ applyToAgentModelRequirements(requirements: AgentModelRequirements, content: string): AgentModelRequirements;
23
+ }
24
+ /**
25
+ * Note: [💞] Ignore a discrepancy between file name and entity name
26
+ */
@@ -24,6 +24,10 @@ export declare class KnowledgeCommitmentDefinition extends BaseCommitmentDefinit
24
24
  * Short one-line description of KNOWLEDGE.
25
25
  */
26
26
  get description(): string;
27
+ /**
28
+ * Icon for this commitment.
29
+ */
30
+ get icon(): string;
27
31
  /**
28
32
  * Markdown documentation for KNOWLEDGE commitment.
29
33
  */
@@ -0,0 +1,35 @@
1
+ import type { AgentModelRequirements } from '../../book-2.0/agent-source/AgentModelRequirements';
2
+ import { BaseCommitmentDefinition } from '../_base/BaseCommitmentDefinition';
3
+ /**
4
+ * LANGUAGE commitment definition
5
+ *
6
+ * The LANGUAGE/LANGUAGES commitment specifies the language(s) the agent should use in its responses.
7
+ *
8
+ * Example usage in agent source:
9
+ *
10
+ * ```book
11
+ * LANGUAGE English
12
+ * LANGUAGE French, English and Czech
13
+ * ```
14
+ *
15
+ * @private [🪔] Maybe export the commitments through some package
16
+ */
17
+ export declare class LanguageCommitmentDefinition extends BaseCommitmentDefinition<'LANGUAGE' | 'LANGUAGES'> {
18
+ constructor(type?: 'LANGUAGE' | 'LANGUAGES');
19
+ /**
20
+ * Short one-line description of LANGUAGE/LANGUAGES.
21
+ */
22
+ get description(): string;
23
+ /**
24
+ * Icon for this commitment.
25
+ */
26
+ get icon(): string;
27
+ /**
28
+ * Markdown documentation for LANGUAGE/LANGUAGES commitment.
29
+ */
30
+ get documentation(): string;
31
+ applyToAgentModelRequirements(requirements: AgentModelRequirements, content: string): AgentModelRequirements;
32
+ }
33
+ /**
34
+ * Note: [💞] Ignore a discrepancy between file name and entity name
35
+ */
@@ -23,6 +23,10 @@ export declare class MemoryCommitmentDefinition extends BaseCommitmentDefinition
23
23
  * Short one-line description of MEMORY.
24
24
  */
25
25
  get description(): string;
26
+ /**
27
+ * Icon for this commitment.
28
+ */
29
+ get icon(): string;
26
30
  /**
27
31
  * Markdown documentation for MEMORY commitment.
28
32
  */
@@ -20,6 +20,10 @@ export declare class AgentMessageCommitmentDefinition extends BaseCommitmentDefi
20
20
  * Short one-line description of AGENT MESSAGE.
21
21
  */
22
22
  get description(): string;
23
+ /**
24
+ * Icon for this commitment.
25
+ */
26
+ get icon(): string;
23
27
  /**
24
28
  * Markdown documentation for AGENT MESSAGE commitment.
25
29
  */
@@ -20,6 +20,10 @@ export declare class InitialMessageCommitmentDefinition extends BaseCommitmentDe
20
20
  * Short one-line description of INITIAL MESSAGE.
21
21
  */
22
22
  get description(): string;
23
+ /**
24
+ * Icon for this commitment.
25
+ */
26
+ get icon(): string;
23
27
  /**
24
28
  * Markdown documentation for INITIAL MESSAGE commitment.
25
29
  */
@@ -24,6 +24,10 @@ export declare class MessageCommitmentDefinition extends BaseCommitmentDefinitio
24
24
  * Short one-line description of MESSAGE.
25
25
  */
26
26
  get description(): string;
27
+ /**
28
+ * Icon for this commitment.
29
+ */
30
+ get icon(): string;
27
31
  /**
28
32
  * Markdown documentation for MESSAGE commitment.
29
33
  */
@@ -20,6 +20,10 @@ export declare class UserMessageCommitmentDefinition extends BaseCommitmentDefin
20
20
  * Short one-line description of USER MESSAGE.
21
21
  */
22
22
  get description(): string;
23
+ /**
24
+ * Icon for this commitment.
25
+ */
26
+ get icon(): string;
23
27
  /**
24
28
  * Markdown documentation for USER MESSAGE commitment.
25
29
  */
@@ -32,6 +32,10 @@ export declare class MetaCommitmentDefinition extends BaseCommitmentDefinition<`
32
32
  * Short one-line description of META commitments.
33
33
  */
34
34
  get description(): string;
35
+ /**
36
+ * Icon for this commitment.
37
+ */
38
+ get icon(): string;
35
39
  /**
36
40
  * Markdown documentation for META commitment.
37
41
  */
@@ -22,6 +22,10 @@ export declare class MetaColorCommitmentDefinition extends BaseCommitmentDefinit
22
22
  * Short one-line description of META COLOR.
23
23
  */
24
24
  get description(): string;
25
+ /**
26
+ * Icon for this commitment.
27
+ */
28
+ get icon(): string;
25
29
  /**
26
30
  * Markdown documentation for META COLOR commitment.
27
31
  */
@@ -22,6 +22,10 @@ export declare class MetaImageCommitmentDefinition extends BaseCommitmentDefinit
22
22
  * Short one-line description of META IMAGE.
23
23
  */
24
24
  get description(): string;
25
+ /**
26
+ * Icon for this commitment.
27
+ */
28
+ get icon(): string;
25
29
  /**
26
30
  * Markdown documentation for META IMAGE commitment.
27
31
  */
@@ -30,6 +30,10 @@ export declare class MetaLinkCommitmentDefinition extends BaseCommitmentDefiniti
30
30
  * Short one-line description of META LINK.
31
31
  */
32
32
  get description(): string;
33
+ /**
34
+ * Icon for this commitment.
35
+ */
36
+ get icon(): string;
33
37
  /**
34
38
  * Markdown documentation for META LINK commitment.
35
39
  */
@@ -31,6 +31,10 @@ export declare class ModelCommitmentDefinition extends BaseCommitmentDefinition<
31
31
  * Short one-line description of MODEL.
32
32
  */
33
33
  get description(): string;
34
+ /**
35
+ * Icon for this commitment.
36
+ */
37
+ get icon(): string;
34
38
  /**
35
39
  * Markdown documentation for MODEL commitment.
36
40
  */
@@ -32,6 +32,10 @@ export declare class NoteCommitmentDefinition extends BaseCommitmentDefinition<'
32
32
  * Short one-line description of NOTE.
33
33
  */
34
34
  get description(): string;
35
+ /**
36
+ * Icon for this commitment.
37
+ */
38
+ get icon(): string;
35
39
  /**
36
40
  * Markdown documentation for NOTE commitment.
37
41
  */
@@ -0,0 +1,35 @@
1
+ import type { AgentModelRequirements } from '../../book-2.0/agent-source/AgentModelRequirements';
2
+ import { BaseCommitmentDefinition } from '../_base/BaseCommitmentDefinition';
3
+ /**
4
+ * OPEN commitment definition
5
+ *
6
+ * The OPEN commitment specifies that the agent can be modified by conversation.
7
+ * This is the default behavior.
8
+ *
9
+ * Example usage in agent source:
10
+ *
11
+ * ```book
12
+ * OPEN
13
+ * ```
14
+ *
15
+ * @private [🪔] Maybe export the commitments through some package
16
+ */
17
+ export declare class OpenCommitmentDefinition extends BaseCommitmentDefinition<'OPEN'> {
18
+ constructor();
19
+ /**
20
+ * Short one-line description of OPEN.
21
+ */
22
+ get description(): string;
23
+ /**
24
+ * Icon for this commitment.
25
+ */
26
+ get icon(): string;
27
+ /**
28
+ * Markdown documentation for OPEN commitment.
29
+ */
30
+ get documentation(): string;
31
+ applyToAgentModelRequirements(requirements: AgentModelRequirements, _content: string): AgentModelRequirements;
32
+ }
33
+ /**
34
+ * Note: [💞] Ignore a discrepancy between file name and entity name
35
+ */
@@ -29,6 +29,10 @@ export declare class PersonaCommitmentDefinition extends BaseCommitmentDefinitio
29
29
  * Short one-line description of PERSONA.
30
30
  */
31
31
  get description(): string;
32
+ /**
33
+ * Icon for this commitment.
34
+ */
35
+ get icon(): string;
32
36
  /**
33
37
  * Markdown documentation for PERSONA commitment.
34
38
  */
@@ -21,6 +21,10 @@ export declare class RuleCommitmentDefinition extends BaseCommitmentDefinition<'
21
21
  * Short one-line description of RULE/RULES.
22
22
  */
23
23
  get description(): string;
24
+ /**
25
+ * Icon for this commitment.
26
+ */
27
+ get icon(): string;
24
28
  /**
25
29
  * Markdown documentation for RULE/RULES commitment.
26
30
  */
@@ -21,6 +21,10 @@ export declare class SampleCommitmentDefinition extends BaseCommitmentDefinition
21
21
  * Short one-line description of SAMPLE/EXAMPLE.
22
22
  */
23
23
  get description(): string;
24
+ /**
25
+ * Icon for this commitment.
26
+ */
27
+ get icon(): string;
24
28
  /**
25
29
  * Markdown documentation for SAMPLE/EXAMPLE commitment.
26
30
  */
@@ -23,6 +23,10 @@ export declare class ScenarioCommitmentDefinition extends BaseCommitmentDefiniti
23
23
  * Short one-line description of SCENARIO.
24
24
  */
25
25
  get description(): string;
26
+ /**
27
+ * Icon for this commitment.
28
+ */
29
+ get icon(): string;
26
30
  /**
27
31
  * Markdown documentation for SCENARIO commitment.
28
32
  */
@@ -21,6 +21,10 @@ export declare class StyleCommitmentDefinition extends BaseCommitmentDefinition<
21
21
  * Short one-line description of STYLE.
22
22
  */
23
23
  get description(): string;
24
+ /**
25
+ * Icon for this commitment.
26
+ */
27
+ get icon(): string;
24
28
  /**
25
29
  * Markdown documentation for STYLE commitment.
26
30
  */
@@ -15,6 +15,11 @@ export declare abstract class BaseCommitmentDefinition<TBookCommitment extends s
15
15
  * Must be implemented by each concrete commitment.
16
16
  */
17
17
  abstract get description(): string;
18
+ /**
19
+ * Icon for this commitment.
20
+ * It should be a single emoji.
21
+ */
22
+ abstract get icon(): string;
18
23
  /**
19
24
  * Human-readable markdown documentation for this commitment, available at runtime.
20
25
  * Must be implemented by each concrete commitment.
@@ -16,6 +16,11 @@ export type CommitmentDefinition = {
16
16
  * Keep it concise; may use inline markdown like **bold** or *italic*.
17
17
  */
18
18
  readonly description: string;
19
+ /**
20
+ * Icon for this commitment.
21
+ * It should be a single emoji.
22
+ */
23
+ readonly icon: string;
19
24
  /**
20
25
  * Human-readable markdown documentation for this commitment.
21
26
  * Should explain what the commitment does and include example usage.
@@ -14,6 +14,10 @@ export declare class NotYetImplementedCommitmentDefinition<TBookCommitment exten
14
14
  * Short one-line description of a placeholder commitment.
15
15
  */
16
16
  get description(): string;
17
+ /**
18
+ * Icon for this commitment.
19
+ */
20
+ get icon(): string;
17
21
  /**
18
22
  * Markdown documentation available at runtime.
19
23
  */
@@ -1,82 +1 @@
1
- import type { BookCommitment } from './_base/BookCommitment';
2
- import type { CommitmentDefinition } from './_base/CommitmentDefinition';
3
- import { ActionCommitmentDefinition } from './ACTION/ACTION';
4
- import { DeleteCommitmentDefinition } from './DELETE/DELETE';
5
- import { FormatCommitmentDefinition } from './FORMAT/FORMAT';
6
- import { GoalCommitmentDefinition } from './GOAL/GOAL';
7
- import { KnowledgeCommitmentDefinition } from './KNOWLEDGE/KNOWLEDGE';
8
- import { MemoryCommitmentDefinition } from './MEMORY/MEMORY';
9
- import { AgentMessageCommitmentDefinition } from './MESSAGE/AgentMessageCommitmentDefinition';
10
- import { InitialMessageCommitmentDefinition } from './MESSAGE/InitialMessageCommitmentDefinition';
11
- import { MessageCommitmentDefinition } from './MESSAGE/MESSAGE';
12
- import { UserMessageCommitmentDefinition } from './MESSAGE/UserMessageCommitmentDefinition';
13
- import { MetaCommitmentDefinition } from './META/META';
14
- import { MetaColorCommitmentDefinition } from './META_COLOR/META_COLOR';
15
- import { MetaImageCommitmentDefinition } from './META_IMAGE/META_IMAGE';
16
- import { ModelCommitmentDefinition } from './MODEL/MODEL';
17
- import { NoteCommitmentDefinition } from './NOTE/NOTE';
18
- import { PersonaCommitmentDefinition } from './PERSONA/PERSONA';
19
- import { RuleCommitmentDefinition } from './RULE/RULE';
20
- import { SampleCommitmentDefinition } from './SAMPLE/SAMPLE';
21
- import { ScenarioCommitmentDefinition } from './SCENARIO/SCENARIO';
22
- import { StyleCommitmentDefinition } from './STYLE/STYLE';
23
- import { NotYetImplementedCommitmentDefinition } from './_base/NotYetImplementedCommitmentDefinition';
24
- /**
25
- * Registry of all available commitment definitions
26
- * This array contains instances of all commitment definitions
27
- * This is the single source of truth for all commitments in the system
28
- *
29
- * @private Use functions to access commitments instead of this array directly
30
- */
31
- export declare const COMMITMENT_REGISTRY: readonly [PersonaCommitmentDefinition, PersonaCommitmentDefinition, KnowledgeCommitmentDefinition, MemoryCommitmentDefinition, MemoryCommitmentDefinition, StyleCommitmentDefinition, StyleCommitmentDefinition, RuleCommitmentDefinition, RuleCommitmentDefinition, SampleCommitmentDefinition, SampleCommitmentDefinition, FormatCommitmentDefinition, FormatCommitmentDefinition, ModelCommitmentDefinition, ModelCommitmentDefinition, ActionCommitmentDefinition, ActionCommitmentDefinition, MetaImageCommitmentDefinition, MetaColorCommitmentDefinition, MetaCommitmentDefinition, NoteCommitmentDefinition, NoteCommitmentDefinition, NoteCommitmentDefinition, NoteCommitmentDefinition, GoalCommitmentDefinition, GoalCommitmentDefinition, InitialMessageCommitmentDefinition, UserMessageCommitmentDefinition, AgentMessageCommitmentDefinition, MessageCommitmentDefinition, MessageCommitmentDefinition, ScenarioCommitmentDefinition, ScenarioCommitmentDefinition, DeleteCommitmentDefinition, DeleteCommitmentDefinition, DeleteCommitmentDefinition, DeleteCommitmentDefinition, NotYetImplementedCommitmentDefinition<"EXPECT">, NotYetImplementedCommitmentDefinition<"BEHAVIOUR">, NotYetImplementedCommitmentDefinition<"BEHAVIOURS">, NotYetImplementedCommitmentDefinition<"AVOID">, NotYetImplementedCommitmentDefinition<"AVOIDANCE">, NotYetImplementedCommitmentDefinition<"CONTEXT">];
32
- /**
33
- * Gets a commitment definition by its type
34
- * @param type The commitment type to look up
35
- * @returns The commitment definition or null if not found
36
- *
37
- * @public exported from `@promptbook/core`
38
- */
39
- export declare function getCommitmentDefinition(type: BookCommitment): CommitmentDefinition | null;
40
- /**
41
- * Gets all available commitment definitions
42
- * @returns Array of all commitment definitions
43
- *
44
- * @public exported from `@promptbook/core`
45
- */
46
- export declare function getAllCommitmentDefinitions(): ReadonlyArray<CommitmentDefinition>;
47
- /**
48
- * Gets all available commitment types
49
- * @returns Array of all commitment types
50
- *
51
- * @public exported from `@promptbook/core`
52
- */
53
- export declare function getAllCommitmentTypes(): ReadonlyArray<BookCommitment>;
54
- /**
55
- * Checks if a commitment type is supported
56
- * @param type The commitment type to check
57
- * @returns True if the commitment type is supported
58
- *
59
- * @public exported from `@promptbook/core`
60
- */
61
- export declare function isCommitmentSupported(type: BookCommitment): boolean;
62
- /**
63
- * Grouped commitment definition
64
- *
65
- * @public exported from `@promptbook/core`
66
- */
67
- export type GroupedCommitmentDefinition = {
68
- primary: CommitmentDefinition;
69
- aliases: string[];
70
- };
71
- /**
72
- * Gets all commitment definitions grouped by their aliases
73
- *
74
- * @returns Array of grouped commitment definitions
75
- *
76
- * @public exported from `@promptbook/core`
77
- */
78
- export declare function getGroupedCommitmentDefinitions(): ReadonlyArray<GroupedCommitmentDefinition>;
79
- /**
80
- * TODO: [🧠] Maybe create through standardized $register
81
- * Note: [💞] Ignore a discrepancy between file name and entity name
82
- */
1
+ export * from './registry';
@@ -0,0 +1,68 @@
1
+ import type { BookCommitment } from './_base/BookCommitment';
2
+ import type { CommitmentDefinition } from './_base/CommitmentDefinition';
3
+ /**
4
+ * Registry of all available commitment definitions
5
+ * This array contains instances of all commitment definitions
6
+ * This is the single source of truth for all commitments in the system
7
+ *
8
+ * @private Use functions to access commitments instead of this array directly
9
+ */
10
+ export declare const COMMITMENT_REGISTRY: CommitmentDefinition[];
11
+ /**
12
+ * Registers a new commitment definition
13
+ * @param definition The commitment definition to register
14
+ *
15
+ * @public exported from `@promptbook/core`
16
+ */
17
+ export declare function registerCommitment(definition: CommitmentDefinition): void;
18
+ /**
19
+ * Gets a commitment definition by its type
20
+ * @param type The commitment type to look up
21
+ * @returns The commitment definition or null if not found
22
+ *
23
+ * @public exported from `@promptbook/core`
24
+ */
25
+ export declare function getCommitmentDefinition(type: BookCommitment): CommitmentDefinition | null;
26
+ /**
27
+ * Gets all available commitment definitions
28
+ * @returns Array of all commitment definitions
29
+ *
30
+ * @public exported from `@promptbook/core`
31
+ */
32
+ export declare function getAllCommitmentDefinitions(): ReadonlyArray<CommitmentDefinition>;
33
+ /**
34
+ * Gets all available commitment types
35
+ * @returns Array of all commitment types
36
+ *
37
+ * @public exported from `@promptbook/core`
38
+ */
39
+ export declare function getAllCommitmentTypes(): ReadonlyArray<BookCommitment>;
40
+ /**
41
+ * Checks if a commitment type is supported
42
+ * @param type The commitment type to check
43
+ * @returns True if the commitment type is supported
44
+ *
45
+ * @public exported from `@promptbook/core`
46
+ */
47
+ export declare function isCommitmentSupported(type: BookCommitment): boolean;
48
+ /**
49
+ * Grouped commitment definition
50
+ *
51
+ * @public exported from `@promptbook/core`
52
+ */
53
+ export type GroupedCommitmentDefinition = {
54
+ primary: CommitmentDefinition;
55
+ aliases: string[];
56
+ };
57
+ /**
58
+ * Gets all commitment definitions grouped by their aliases
59
+ *
60
+ * @returns Array of grouped commitment definitions
61
+ *
62
+ * @public exported from `@promptbook/core`
63
+ */
64
+ export declare function getGroupedCommitmentDefinitions(): ReadonlyArray<GroupedCommitmentDefinition>;
65
+ /**
66
+ * TODO: !!!! Proofread this file
67
+ * Note: [💞] Ignore a discrepancy between file name and entity name
68
+ */
@@ -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.103.0-52`).
18
+ * It follows semantic versioning (e.g., `0.103.0-54`).
19
19
  *
20
20
  * @generated
21
21
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/types",
3
- "version": "0.103.0-53",
3
+ "version": "0.103.0-55",
4
4
  "description": "Promptbook: Turn your company's scattered knowledge into AI ready books",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -87,11 +87,11 @@
87
87
  },
88
88
  "homepage": "https://ptbk.io/",
89
89
  "engines": {
90
- "node": ">=16.0.0",
90
+ "node": ">=18.18.0",
91
91
  "npm": ">=8.0.0"
92
92
  },
93
93
  "typings": "./esm/typings/src/_packages/types.index.d.ts",
94
94
  "peerDependencies": {
95
- "@promptbook/core": "0.103.0-53"
95
+ "@promptbook/core": "0.103.0-55"
96
96
  }
97
97
  }