@promptbook/openai 0.82.0 → 0.83.0

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 (44) hide show
  1. package/esm/index.es.js +1 -1
  2. package/esm/index.es.js.map +1 -1
  3. package/esm/typings/src/_packages/editable.index.d.ts +74 -0
  4. package/esm/typings/src/_packages/types.index.d.ts +26 -0
  5. package/esm/typings/src/commands/BOOK_VERSION/BookVersionCommand.d.ts +1 -1
  6. package/esm/typings/src/commands/BOOK_VERSION/bookVersionCommandParser.d.ts +1 -1
  7. package/esm/typings/src/commands/EXPECT/expectCommandParser.d.ts +1 -1
  8. package/esm/typings/src/commands/FOREACH/ForeachCommand.d.ts +1 -1
  9. package/esm/typings/src/commands/FOREACH/foreachCommandParser.d.ts +1 -1
  10. package/esm/typings/src/commands/FORMAT/formatCommandParser.d.ts +1 -1
  11. package/esm/typings/src/commands/FORMFACTOR/FormfactorCommand.d.ts +1 -1
  12. package/esm/typings/src/commands/FORMFACTOR/formfactorCommandParser.d.ts +1 -1
  13. package/esm/typings/src/commands/JOKER/JokerCommand.d.ts +1 -1
  14. package/esm/typings/src/commands/JOKER/jokerCommandParser.d.ts +1 -1
  15. package/esm/typings/src/commands/KNOWLEDGE/KnowledgeCommand.d.ts +2 -2
  16. package/esm/typings/src/commands/KNOWLEDGE/knowledgeCommandParser.d.ts +1 -1
  17. package/esm/typings/src/commands/KNOWLEDGE/utils/{sourceContentToName.d.ts → knowledgeSourceContentToName.d.ts} +2 -2
  18. package/esm/typings/src/commands/MODEL/ModelCommand.d.ts +2 -1
  19. package/esm/typings/src/commands/MODEL/modelCommandParser.d.ts +2 -1
  20. package/esm/typings/src/commands/PARAMETER/ParameterCommand.d.ts +1 -1
  21. package/esm/typings/src/commands/PARAMETER/parameterCommandParser.d.ts +1 -1
  22. package/esm/typings/src/commands/PERSONA/PersonaCommand.d.ts +1 -1
  23. package/esm/typings/src/commands/PERSONA/personaCommandParser.d.ts +1 -1
  24. package/esm/typings/src/commands/POSTPROCESS/PostprocessCommand.d.ts +1 -1
  25. package/esm/typings/src/commands/POSTPROCESS/postprocessCommandParser.d.ts +1 -1
  26. package/esm/typings/src/commands/SECTION/SectionCommand.d.ts +1 -1
  27. package/esm/typings/src/commands/SECTION/sectionCommandParser.d.ts +1 -1
  28. package/esm/typings/src/commands/URL/UrlCommand.d.ts +1 -1
  29. package/esm/typings/src/commands/URL/urlCommandParser.d.ts +1 -1
  30. package/esm/typings/src/commands/X_ACTION/ActionCommand.d.ts +1 -1
  31. package/esm/typings/src/commands/X_ACTION/actionCommandParser.d.ts +1 -1
  32. package/esm/typings/src/commands/X_INSTRUMENT/InstrumentCommand.d.ts +1 -1
  33. package/esm/typings/src/commands/X_INSTRUMENT/instrumentCommandParser.d.ts +1 -1
  34. package/esm/typings/src/commands/_common/getParserForCommand.d.ts +1 -1
  35. package/esm/typings/src/commands/_common/parseCommand.d.ts +1 -1
  36. package/esm/typings/src/commands/_common/stringifyCommand.d.ts +1 -0
  37. package/esm/typings/src/commands/_common/types/CommandParser.d.ts +8 -0
  38. package/esm/typings/src/commands/_common/types/CommandUsagePlaces.d.ts +2 -0
  39. package/esm/typings/src/commands/index.d.ts +1 -1
  40. package/esm/typings/src/pipeline/PipelineJson/KnowledgeSourceJson.d.ts +1 -1
  41. package/package.json +2 -2
  42. package/umd/index.umd.js +1 -1
  43. package/umd/index.umd.js.map +1 -1
  44. /package/esm/typings/src/commands/KNOWLEDGE/utils/{sourceContentToName.test.d.ts → knowledgeSourceContentToName.test.d.ts} +0 -0
@@ -4,7 +4,7 @@ import type { KnowledgeCommand } from './KnowledgeCommand';
4
4
  * Parses the knowledge command
5
5
  *
6
6
  * @see `documentationUrl` for more details
7
- * @private within the commands folder
7
+ * @public exported from `@promptbook/editable`
8
8
  */
9
9
  export declare const knowledgeCommandParser: PipelineHeadCommandParser<KnowledgeCommand>;
10
10
  /**
@@ -3,9 +3,9 @@ import type { string_name } from '../../../types/typeAliases';
3
3
  /**
4
4
  * Creates unique name for the source
5
5
  *
6
- * @private within the repository
6
+ * @public exported from `@promptbook/editable`
7
7
  */
8
- export declare function sourceContentToName(sourceContent: string_knowledge_source_content): string_name;
8
+ export declare function knowledgeSourceContentToName(knowledgeSourceContent: string_knowledge_source_content): string_name;
9
9
  /**
10
10
  * TODO: [🐱‍🐉][🧠] Make some smart crop NOT source-i-m-pavol-a-develop-... BUT source-i-m-pavol-a-developer-...
11
11
  */
@@ -4,7 +4,8 @@ import type { TODO_any } from '../../utils/organization/TODO_any';
4
4
  * Parsed MODEL command
5
5
  *
6
6
  * @see ./modelCommandParser.ts for more details
7
- * @private within the commands folder
7
+ * @deprecated Option to manually set the model requirements is not recommended to use, use `PERSONA` instead
8
+ * @public exported from `@promptbook/editable`
8
9
  */
9
10
  export type ModelCommand = {
10
11
  readonly type: 'MODEL';
@@ -4,6 +4,7 @@ import type { ModelCommand } from './ModelCommand';
4
4
  * Parses the model command
5
5
  *
6
6
  * @see `documentationUrl` for more details
7
- * @private within the commands folder
7
+ * @deprecated Option to manually set the model requirements is not recommended to use, use `PERSONA` instead
8
+ * @public exported from `@promptbook/editable`
8
9
  */
9
10
  export declare const modelCommandParser: PipelineBothCommandParser<ModelCommand>;
@@ -4,7 +4,7 @@ import type { string_name } from '../../types/typeAliases';
4
4
  * Parsed PARAMETER command
5
5
  *
6
6
  * @see ./parameterCommandParser.ts for more details
7
- * @private within the commands folder
7
+ * @public exported from `@promptbook/editable`
8
8
  */
9
9
  export type ParameterCommand = {
10
10
  readonly type: 'PARAMETER';
@@ -4,6 +4,6 @@ import type { ParameterCommand } from './ParameterCommand';
4
4
  * Parses the parameter command
5
5
  *
6
6
  * @see `documentationUrl` for more details
7
- * @private within the commands folder
7
+ * @public exported from `@promptbook/editable`
8
8
  */
9
9
  export declare const parameterCommandParser: PipelineBothCommandParser<ParameterCommand>;
@@ -4,7 +4,7 @@ import type { string_persona_description } from '../../types/typeAliases';
4
4
  * Parsed PERSONA command
5
5
  *
6
6
  * @see ./personaCommandParser.ts for more details
7
- * @private within the commands folder
7
+ * @public exported from `@promptbook/editable`
8
8
  */
9
9
  export type PersonaCommand = {
10
10
  readonly type: 'PERSONA';
@@ -4,6 +4,6 @@ import type { PersonaCommand } from './PersonaCommand';
4
4
  * Parses the persona command
5
5
  *
6
6
  * @see `documentationUrl` for more details
7
- * @private within the commands folder
7
+ * @public exported from `@promptbook/editable`
8
8
  */
9
9
  export declare const personaCommandParser: PipelineBothCommandParser<PersonaCommand>;
@@ -3,7 +3,7 @@ import type { string_name } from '../../types/typeAliases';
3
3
  * Parsed POSTPROCESS command
4
4
  *
5
5
  * @see ./postprocessCommandParser.ts for more details
6
- * @private within the commands folder
6
+ * @public exported from `@promptbook/editable`
7
7
  */
8
8
  export type PostprocessCommand = {
9
9
  readonly type: 'POSTPROCESS';
@@ -4,6 +4,6 @@ import type { PostprocessCommand } from './PostprocessCommand';
4
4
  * Parses the postprocess command
5
5
  *
6
6
  * @see `documentationUrl` for more details
7
- * @private within the commands folder
7
+ * @public exported from `@promptbook/editable`
8
8
  */
9
9
  export declare const postprocessCommandParser: PipelineTaskCommandParser<PostprocessCommand>;
@@ -3,7 +3,7 @@ import type { SectionType } from '../../types/SectionType';
3
3
  * Parsed SECTION command
4
4
  *
5
5
  * @see ./sectionCommandParser.ts for more details
6
- * @private within the commands folder
6
+ * @public exported from `@promptbook/editable`
7
7
  */
8
8
  export type SectionCommand = {
9
9
  readonly type: 'SECTION';
@@ -4,7 +4,7 @@ import type { SectionCommand } from './SectionCommand';
4
4
  * Parses the section command
5
5
  *
6
6
  * @see `documentationUrl` for more details
7
- * @private within the commands folder
7
+ * @public exported from `@promptbook/editable`
8
8
  */
9
9
  export declare const sectionCommandParser: PipelineTaskCommandParser<SectionCommand>;
10
10
  /**
@@ -2,7 +2,7 @@
2
2
  * Parsed URL command
3
3
  *
4
4
  * @see ./urlCommandParser.ts for more details
5
- * @private within the commands folder
5
+ * @public exported from `@promptbook/editable`
6
6
  */
7
7
  export type UrlCommand = {
8
8
  readonly type: 'URL';
@@ -4,6 +4,6 @@ import type { UrlCommand } from './UrlCommand';
4
4
  * Parses the url command
5
5
  *
6
6
  * @see `documentationUrl` for more details
7
- * @private within the commands folder
7
+ * @public exported from `@promptbook/editable`
8
8
  */
9
9
  export declare const urlCommandParser: PipelineHeadCommandParser<UrlCommand>;
@@ -2,7 +2,7 @@
2
2
  * Parsed ACTION command
3
3
  *
4
4
  * @see ./actionCommandParser.ts for more details
5
- * @private within the commands folder
5
+ * @public exported from `@promptbook/editable`
6
6
  */
7
7
  export type ActionCommand = {
8
8
  readonly type: 'ACTION';
@@ -4,7 +4,7 @@ import type { ActionCommand } from './ActionCommand';
4
4
  * Parses the action command
5
5
  *
6
6
  * @see `documentationUrl` for more details
7
- * @private within the commands folder
7
+ * @public exported from `@promptbook/editable`
8
8
  */
9
9
  export declare const actionCommandParser: PipelineHeadCommandParser<ActionCommand>;
10
10
  /**
@@ -2,7 +2,7 @@
2
2
  * Parsed INSTRUMENT command
3
3
  *
4
4
  * @see ./instrumentCommandParser.ts for more details
5
- * @private within the commands folder
5
+ * @public exported from `@promptbook/editable`
6
6
  */
7
7
  export type InstrumentCommand = {
8
8
  readonly type: 'INSTRUMENT';
@@ -4,7 +4,7 @@ import type { InstrumentCommand } from './InstrumentCommand';
4
4
  * Parses the instrument command
5
5
  *
6
6
  * @see `documentationUrl` for more details
7
- * @private within the commands folder
7
+ * @public exported from `@promptbook/editable`
8
8
  */
9
9
  export declare const instrumentCommandParser: PipelineHeadCommandParser<InstrumentCommand>;
10
10
  /**
@@ -6,6 +6,6 @@ import type { CommandParser } from './types/CommandParser';
6
6
  * @returns the parser for the command
7
7
  * @throws {UnexpectedError} if the parser is not found
8
8
  *
9
- * @private within the compilePipeline
9
+ * @public exported from `@promptbook/editable`
10
10
  */
11
11
  export declare function getParserForCommand<TCommand extends Command>(command: TCommand): CommandParser<TCommand>;
@@ -7,6 +7,6 @@ import type { CommandUsagePlace } from './types/CommandUsagePlaces';
7
7
  * @returns parsed command object
8
8
  * @throws {ParseError} if the command is invalid
9
9
  *
10
- * @private within the compilePipeline
10
+ * @public exported from `@promptbook/editable`
11
11
  */
12
12
  export declare function parseCommand(raw: string_markdown_text, usagePlace: CommandUsagePlace): Command;
@@ -6,6 +6,7 @@ import type { Command } from './types/Command';
6
6
  * @returns stringified command
7
7
  * @throws {UnexpectedError} if the command is invalid
8
8
  *
9
+ * @deprecated Option to convert JSON back to string is outdated and will be removed
9
10
  * @private within the compilePipeline
10
11
  */
11
12
  export declare function stringifyCommand(command: Command): string_markdown_text;
@@ -17,6 +17,8 @@ export type CommandBase = {
17
17
  };
18
18
  /**
19
19
  * @@@
20
+ *
21
+ * @public exported from `@promptbook/editable`
20
22
  */
21
23
  export type CommandParser<TCommand extends CommandBase> = PipelineHeadCommandParser<TCommand> | PipelineTaskCommandParser<TCommand> | PipelineBothCommandParser<TCommand>;
22
24
  /**
@@ -71,10 +73,14 @@ export type CommonCommandParser<TCommand extends CommandBase> = {
71
73
  };
72
74
  /**
73
75
  * @@@
76
+ *
77
+ * @public exported from `@promptbook/editable`
74
78
  */
75
79
  export type PipelineBothCommandParser<TCommand extends CommandBase> = ___and___ & Omit<PipelineHeadCommandParser<TCommand>, 'isUsedInPipelineTask'> & Omit<PipelineTaskCommandParser<TCommand>, 'isUsedInPipelineHead'>;
76
80
  /**
77
81
  * @@@
82
+ *
83
+ * @public exported from `@promptbook/editable`
78
84
  */
79
85
  export type PipelineHeadCommandParser<TCommand extends CommandBase> = CommonCommandParser<TCommand> & {
80
86
  /**
@@ -101,6 +107,8 @@ export type PipelineHeadCommandParser<TCommand extends CommandBase> = CommonComm
101
107
  };
102
108
  /**
103
109
  * @@@
110
+ *
111
+ * @public exported from `@promptbook/editable`
104
112
  */
105
113
  export type PipelineTaskCommandParser<TCommand extends CommandBase> = CommonCommandParser<TCommand> & {
106
114
  /**
@@ -1,6 +1,8 @@
1
1
  import type { TupleToUnion } from 'type-fest';
2
2
  /**
3
3
  * Where the command can be used
4
+ *
5
+ * @public exported from `@promptbook/editable`
4
6
  */
5
7
  export type CommandUsagePlace = TupleToUnion<typeof CommandUsagePlaces>;
6
8
  /**
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * All available command parsers
3
3
  *
4
- * @private internal index of `parseCommand`
4
+ * @public exported from `@promptbook/editable`
5
5
  */
6
6
  export declare const COMMANDS: readonly [import("./_common/types/CommandParser").PipelineTaskCommandParser<import("./SECTION/SectionCommand").SectionCommand>, import("./_common/types/CommandParser").PipelineTaskCommandParser<import("./EXPECT/ExpectCommand").ExpectCommand>, import("./_common/types/CommandParser").PipelineTaskCommandParser<import("./FORMAT/FormatCommand").FormatCommand>, import("./_common/types/CommandParser").PipelineTaskCommandParser<import("./JOKER/JokerCommand").JokerCommand>, import("./_common/types/CommandParser").PipelineBothCommandParser<import("./MODEL/ModelCommand").ModelCommand>, import("./_common/types/CommandParser").PipelineBothCommandParser<import("./PARAMETER/ParameterCommand").ParameterCommand>, import("./_common/types/CommandParser").PipelineTaskCommandParser<import("./POSTPROCESS/PostprocessCommand").PostprocessCommand>, import("./_common/types/CommandParser").PipelineHeadCommandParser<import("./BOOK_VERSION/BookVersionCommand").BookVersionCommand>, import("./_common/types/CommandParser").PipelineHeadCommandParser<import("./FORMFACTOR/FormfactorCommand").FormfactorCommand>, import("./_common/types/CommandParser").PipelineHeadCommandParser<import("./URL/UrlCommand").UrlCommand>, import("./_common/types/CommandParser").PipelineHeadCommandParser<import("./KNOWLEDGE/KnowledgeCommand").KnowledgeCommand>, import("./_common/types/CommandParser").PipelineHeadCommandParser<import("./X_ACTION/ActionCommand").ActionCommand>, import("./_common/types/CommandParser").PipelineHeadCommandParser<import("./X_INSTRUMENT/InstrumentCommand").InstrumentCommand>, import("./_common/types/CommandParser").PipelineBothCommandParser<import("./PERSONA/PersonaCommand").PersonaCommand>, import("./_common/types/CommandParser").PipelineTaskCommandParser<import("./FOREACH/ForeachCommand").ForeachCommand>, import("./_common/types/CommandParser").PipelineBothCommandParser<import("./_BOILERPLATE/BoilerplateCommand").BoilerplateCommand>];
7
7
  /**
@@ -24,7 +24,7 @@ export type KnowledgeSourceJson = {
24
24
  * For example `"Pavol Hejný has web https://pavolhejny.com/"`
25
25
  * For example `"Pavol Hejný is web developer and creator of Promptbook and Collboard"`
26
26
  */
27
- readonly sourceContent: string_knowledge_source_content;
27
+ readonly knowledgeSourceContent: string_knowledge_source_content;
28
28
  };
29
29
  /**
30
30
  * Defines one source of knowledge in the pipeline after it has been prepared
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/openai",
3
- "version": "0.82.0",
3
+ "version": "0.83.0",
4
4
  "description": "It's time for a paradigm shift. The future of software in plain English, French or Latin",
5
5
  "--note-0": " <- [🐊]",
6
6
  "private": false,
@@ -54,7 +54,7 @@
54
54
  "module": "./esm/index.es.js",
55
55
  "typings": "./esm/typings/src/_packages/openai.index.d.ts",
56
56
  "peerDependencies": {
57
- "@promptbook/core": "0.82.0"
57
+ "@promptbook/core": "0.83.0"
58
58
  },
59
59
  "dependencies": {
60
60
  "colors": "1.4.0",
package/umd/index.umd.js CHANGED
@@ -24,7 +24,7 @@
24
24
  * @generated
25
25
  * @see https://github.com/webgptorg/promptbook
26
26
  */
27
- var PROMPTBOOK_ENGINE_VERSION = '0.82.0-3';
27
+ var PROMPTBOOK_ENGINE_VERSION = '0.82.0';
28
28
  /**
29
29
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
30
30
  * Note: [💞] Ignore a discrepancy between file name and entity name