@promptbook/remote-server 0.82.0 → 0.84.0-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 (52) hide show
  1. package/README.md +4 -0
  2. package/esm/index.es.js +16 -16
  3. package/esm/index.es.js.map +1 -1
  4. package/esm/typings/src/_packages/editable.index.d.ts +82 -2
  5. package/esm/typings/src/_packages/types.index.d.ts +26 -0
  6. package/esm/typings/src/commands/BOOK_VERSION/BookVersionCommand.d.ts +1 -1
  7. package/esm/typings/src/commands/BOOK_VERSION/bookVersionCommandParser.d.ts +1 -1
  8. package/esm/typings/src/commands/EXPECT/expectCommandParser.d.ts +1 -1
  9. package/esm/typings/src/commands/FOREACH/ForeachCommand.d.ts +1 -1
  10. package/esm/typings/src/commands/FOREACH/foreachCommandParser.d.ts +1 -1
  11. package/esm/typings/src/commands/FORMAT/formatCommandParser.d.ts +1 -1
  12. package/esm/typings/src/commands/FORMFACTOR/FormfactorCommand.d.ts +1 -1
  13. package/esm/typings/src/commands/FORMFACTOR/formfactorCommandParser.d.ts +1 -1
  14. package/esm/typings/src/commands/JOKER/JokerCommand.d.ts +1 -1
  15. package/esm/typings/src/commands/JOKER/jokerCommandParser.d.ts +1 -1
  16. package/esm/typings/src/commands/KNOWLEDGE/KnowledgeCommand.d.ts +2 -2
  17. package/esm/typings/src/commands/KNOWLEDGE/knowledgeCommandParser.d.ts +1 -1
  18. package/esm/typings/src/commands/KNOWLEDGE/utils/{sourceContentToName.d.ts → knowledgeSourceContentToName.d.ts} +2 -2
  19. package/esm/typings/src/commands/MODEL/ModelCommand.d.ts +2 -1
  20. package/esm/typings/src/commands/MODEL/modelCommandParser.d.ts +2 -1
  21. package/esm/typings/src/commands/PARAMETER/ParameterCommand.d.ts +1 -1
  22. package/esm/typings/src/commands/PARAMETER/parameterCommandParser.d.ts +1 -1
  23. package/esm/typings/src/commands/PERSONA/PersonaCommand.d.ts +1 -1
  24. package/esm/typings/src/commands/PERSONA/personaCommandParser.d.ts +1 -1
  25. package/esm/typings/src/commands/POSTPROCESS/PostprocessCommand.d.ts +1 -1
  26. package/esm/typings/src/commands/POSTPROCESS/postprocessCommandParser.d.ts +1 -1
  27. package/esm/typings/src/commands/SECTION/SectionCommand.d.ts +1 -1
  28. package/esm/typings/src/commands/SECTION/sectionCommandParser.d.ts +1 -1
  29. package/esm/typings/src/commands/URL/UrlCommand.d.ts +1 -1
  30. package/esm/typings/src/commands/URL/urlCommandParser.d.ts +1 -1
  31. package/esm/typings/src/commands/X_ACTION/ActionCommand.d.ts +1 -1
  32. package/esm/typings/src/commands/X_ACTION/actionCommandParser.d.ts +1 -1
  33. package/esm/typings/src/commands/X_INSTRUMENT/InstrumentCommand.d.ts +1 -1
  34. package/esm/typings/src/commands/X_INSTRUMENT/instrumentCommandParser.d.ts +1 -1
  35. package/esm/typings/src/commands/_common/getParserForCommand.d.ts +1 -1
  36. package/esm/typings/src/commands/_common/parseCommand.d.ts +1 -1
  37. package/esm/typings/src/commands/_common/stringifyCommand.d.ts +1 -0
  38. package/esm/typings/src/commands/_common/types/CommandParser.d.ts +8 -0
  39. package/esm/typings/src/commands/_common/types/CommandUsagePlaces.d.ts +2 -0
  40. package/esm/typings/src/commands/index.d.ts +1 -1
  41. package/esm/typings/src/pipeline/PipelineJson/KnowledgeSourceJson.d.ts +1 -1
  42. package/esm/typings/src/utils/editable/edit-pipeline-string/addPipelineCommand.d.ts +17 -0
  43. package/esm/typings/src/utils/editable/edit-pipeline-string/deflatePipeline.d.ts +10 -0
  44. package/esm/typings/src/utils/editable/{utils → edit-pipeline-string}/removePipelineCommand.d.ts +1 -1
  45. package/esm/typings/src/utils/editable/edit-pipeline-string/removePipelineCommand.test.d.ts +1 -0
  46. package/esm/typings/src/utils/editable/utils/isFlatPipeline.d.ts +7 -0
  47. package/esm/typings/src/utils/editable/utils/renamePipelineParameter.d.ts +3 -0
  48. package/package.json +2 -2
  49. package/umd/index.umd.js +16 -16
  50. package/umd/index.umd.js.map +1 -1
  51. /package/esm/typings/src/commands/KNOWLEDGE/utils/{sourceContentToName.test.d.ts → knowledgeSourceContentToName.test.d.ts} +0 -0
  52. /package/esm/typings/src/utils/editable/{utils/removePipelineCommand.test.d.ts → edit-pipeline-string/addPipelineCommand.test.d.ts} +0 -0
@@ -1,10 +1,90 @@
1
1
  import { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION } from '../version';
2
+ import { getParserForCommand } from '../commands/_common/getParserForCommand';
3
+ import { parseCommand } from '../commands/_common/parseCommand';
4
+ import type { CommandParser } from '../commands/_common/types/CommandParser';
5
+ import type { PipelineBothCommandParser } from '../commands/_common/types/CommandParser';
6
+ import type { PipelineHeadCommandParser } from '../commands/_common/types/CommandParser';
7
+ import type { PipelineTaskCommandParser } from '../commands/_common/types/CommandParser';
8
+ import type { CommandUsagePlace } from '../commands/_common/types/CommandUsagePlaces';
9
+ import type { BookVersionCommand } from '../commands/BOOK_VERSION/BookVersionCommand';
10
+ import { bookVersionCommandParser } from '../commands/BOOK_VERSION/bookVersionCommandParser';
11
+ import { expectCommandParser } from '../commands/EXPECT/expectCommandParser';
12
+ import type { ForeachCommand } from '../commands/FOREACH/ForeachCommand';
13
+ import { foreachCommandParser } from '../commands/FOREACH/foreachCommandParser';
14
+ import { formatCommandParser } from '../commands/FORMAT/formatCommandParser';
15
+ import type { FormfactorCommand } from '../commands/FORMFACTOR/FormfactorCommand';
16
+ import { formfactorCommandParser } from '../commands/FORMFACTOR/formfactorCommandParser';
17
+ import { COMMANDS } from '../commands/index';
18
+ import type { JokerCommand } from '../commands/JOKER/JokerCommand';
19
+ import { jokerCommandParser } from '../commands/JOKER/jokerCommandParser';
20
+ import type { KnowledgeCommand } from '../commands/KNOWLEDGE/KnowledgeCommand';
21
+ import { knowledgeCommandParser } from '../commands/KNOWLEDGE/knowledgeCommandParser';
22
+ import { knowledgeSourceContentToName } from '../commands/KNOWLEDGE/utils/knowledgeSourceContentToName';
23
+ import type { ModelCommand } from '../commands/MODEL/ModelCommand';
24
+ import { modelCommandParser } from '../commands/MODEL/modelCommandParser';
25
+ import type { ParameterCommand } from '../commands/PARAMETER/ParameterCommand';
26
+ import { parameterCommandParser } from '../commands/PARAMETER/parameterCommandParser';
27
+ import type { PersonaCommand } from '../commands/PERSONA/PersonaCommand';
28
+ import { personaCommandParser } from '../commands/PERSONA/personaCommandParser';
29
+ import type { PostprocessCommand } from '../commands/POSTPROCESS/PostprocessCommand';
30
+ import { postprocessCommandParser } from '../commands/POSTPROCESS/postprocessCommandParser';
31
+ import type { SectionCommand } from '../commands/SECTION/SectionCommand';
32
+ import { sectionCommandParser } from '../commands/SECTION/sectionCommandParser';
33
+ import type { UrlCommand } from '../commands/URL/UrlCommand';
34
+ import { urlCommandParser } from '../commands/URL/urlCommandParser';
35
+ import type { ActionCommand } from '../commands/X_ACTION/ActionCommand';
36
+ import { actionCommandParser } from '../commands/X_ACTION/actionCommandParser';
37
+ import type { InstrumentCommand } from '../commands/X_INSTRUMENT/InstrumentCommand';
38
+ import { instrumentCommandParser } from '../commands/X_INSTRUMENT/instrumentCommandParser';
39
+ import { addPipelineCommand } from '../utils/editable/edit-pipeline-string/addPipelineCommand';
40
+ import { deflatePipeline } from '../utils/editable/edit-pipeline-string/deflatePipeline';
41
+ import { removePipelineCommand } from '../utils/editable/edit-pipeline-string/removePipelineCommand';
2
42
  import type { PipelineEditableSerialized } from '../utils/editable/types/PipelineEditableSerialized';
3
- import { removePipelineCommand } from '../utils/editable/utils/removePipelineCommand';
43
+ import { isFlatPipeline } from '../utils/editable/utils/isFlatPipeline';
4
44
  import { renamePipelineParameter } from '../utils/editable/utils/renamePipelineParameter';
5
45
  import { stringifyPipelineJson } from '../utils/editable/utils/stringifyPipelineJson';
6
46
  export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
7
- export type { PipelineEditableSerialized };
47
+ export { getParserForCommand };
48
+ export { parseCommand };
49
+ export type { CommandParser };
50
+ export type { PipelineBothCommandParser };
51
+ export type { PipelineHeadCommandParser };
52
+ export type { PipelineTaskCommandParser };
53
+ export type { CommandUsagePlace };
54
+ export type { BookVersionCommand };
55
+ export { bookVersionCommandParser };
56
+ export { expectCommandParser };
57
+ export type { ForeachCommand };
58
+ export { foreachCommandParser };
59
+ export { formatCommandParser };
60
+ export type { FormfactorCommand };
61
+ export { formfactorCommandParser };
62
+ export { COMMANDS };
63
+ export type { JokerCommand };
64
+ export { jokerCommandParser };
65
+ export type { KnowledgeCommand };
66
+ export { knowledgeCommandParser };
67
+ export { knowledgeSourceContentToName };
68
+ export type { ModelCommand };
69
+ export { modelCommandParser };
70
+ export type { ParameterCommand };
71
+ export { parameterCommandParser };
72
+ export type { PersonaCommand };
73
+ export { personaCommandParser };
74
+ export type { PostprocessCommand };
75
+ export { postprocessCommandParser };
76
+ export type { SectionCommand };
77
+ export { sectionCommandParser };
78
+ export type { UrlCommand };
79
+ export { urlCommandParser };
80
+ export type { ActionCommand };
81
+ export { actionCommandParser };
82
+ export type { InstrumentCommand };
83
+ export { instrumentCommandParser };
84
+ export { addPipelineCommand };
85
+ export { deflatePipeline };
8
86
  export { removePipelineCommand };
87
+ export type { PipelineEditableSerialized };
88
+ export { isFlatPipeline };
9
89
  export { renamePipelineParameter };
10
90
  export { stringifyPipelineJson };
@@ -7,9 +7,22 @@ import type { PipelineTaskCommandParser } from '../commands/_common/types/Comman
7
7
  import type { CommandParserInput } from '../commands/_common/types/CommandParser';
8
8
  import type { CommandType } from '../commands/_common/types/CommandType';
9
9
  import type { CommandUsagePlace } from '../commands/_common/types/CommandUsagePlaces';
10
+ import type { BookVersionCommand } from '../commands/BOOK_VERSION/BookVersionCommand';
10
11
  import type { ExpectCommand } from '../commands/EXPECT/ExpectCommand';
12
+ import type { ForeachCommand } from '../commands/FOREACH/ForeachCommand';
11
13
  import type { ForeachJson } from '../commands/FOREACH/ForeachJson';
12
14
  import type { FormatCommand } from '../commands/FORMAT/FormatCommand';
15
+ import type { FormfactorCommand } from '../commands/FORMFACTOR/FormfactorCommand';
16
+ import type { JokerCommand } from '../commands/JOKER/JokerCommand';
17
+ import type { KnowledgeCommand } from '../commands/KNOWLEDGE/KnowledgeCommand';
18
+ import type { ModelCommand } from '../commands/MODEL/ModelCommand';
19
+ import type { ParameterCommand } from '../commands/PARAMETER/ParameterCommand';
20
+ import type { PersonaCommand } from '../commands/PERSONA/PersonaCommand';
21
+ import type { PostprocessCommand } from '../commands/POSTPROCESS/PostprocessCommand';
22
+ import type { SectionCommand } from '../commands/SECTION/SectionCommand';
23
+ import type { UrlCommand } from '../commands/URL/UrlCommand';
24
+ import type { ActionCommand } from '../commands/X_ACTION/ActionCommand';
25
+ import type { InstrumentCommand } from '../commands/X_INSTRUMENT/InstrumentCommand';
13
26
  import type { PrettifyOptions } from '../conversion/prettify/PrettifyOptions';
14
27
  import type { renderPipelineMermaidOptions } from '../conversion/prettify/renderPipelineMermaidOptions';
15
28
  import type { CallbackInterfaceToolsOptions } from '../dialogs/callback/CallbackInterfaceToolsOptions';
@@ -268,9 +281,22 @@ export type { PipelineTaskCommandParser };
268
281
  export type { CommandParserInput };
269
282
  export type { CommandType };
270
283
  export type { CommandUsagePlace };
284
+ export type { BookVersionCommand };
271
285
  export type { ExpectCommand };
286
+ export type { ForeachCommand };
272
287
  export type { ForeachJson };
273
288
  export type { FormatCommand };
289
+ export type { FormfactorCommand };
290
+ export type { JokerCommand };
291
+ export type { KnowledgeCommand };
292
+ export type { ModelCommand };
293
+ export type { ParameterCommand };
294
+ export type { PersonaCommand };
295
+ export type { PostprocessCommand };
296
+ export type { SectionCommand };
297
+ export type { UrlCommand };
298
+ export type { ActionCommand };
299
+ export type { InstrumentCommand };
274
300
  export type { PrettifyOptions };
275
301
  export type { renderPipelineMermaidOptions };
276
302
  export type { CallbackInterfaceToolsOptions };
@@ -3,7 +3,7 @@ import type { string_semantic_version } from '../../types/typeAliases';
3
3
  * Parsed BOOK_VERSION command
4
4
  *
5
5
  * @see ./bookVersionCommandParser.ts for more details
6
- * @private within the commands folder
6
+ * @public exported from `@promptbook/editable`
7
7
  */
8
8
  export type BookVersionCommand = {
9
9
  readonly type: 'BOOK_VERSION';
@@ -4,6 +4,6 @@ import type { BookVersionCommand } from './BookVersionCommand';
4
4
  * Parses the BOOK_VERSION 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 bookVersionCommandParser: PipelineHeadCommandParser<BookVersionCommand>;
@@ -4,6 +4,6 @@ import type { ExpectCommand } from './ExpectCommand';
4
4
  * Parses the expect 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 expectCommandParser: PipelineTaskCommandParser<ExpectCommand>;
@@ -3,7 +3,7 @@ import type { ForeachJson } from './ForeachJson';
3
3
  * Parsed FOREACH command which is used to iterate over a table of values
4
4
  *
5
5
  * @see ./foreachCommandParser.ts for more details
6
- * @private within the commands folder
6
+ * @public exported from `@promptbook/editable`
7
7
  */
8
8
  export type ForeachCommand = {
9
9
  readonly type: 'FOREACH';
@@ -6,7 +6,7 @@ import type { ForeachCommand } from './ForeachCommand';
6
6
  * Note: @@@ This command is used as foreach for new commands - it should NOT be used in any `.book.md` file
7
7
  *
8
8
  * @see `documentationUrl` for more details
9
- * @private within the commands folder
9
+ * @public exported from `@promptbook/editable`
10
10
  */
11
11
  export declare const foreachCommandParser: PipelineTaskCommandParser<ForeachCommand>;
12
12
  /**
@@ -4,6 +4,6 @@ import type { FormatCommand } from './FormatCommand';
4
4
  * Parses the format 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 formatCommandParser: PipelineTaskCommandParser<FormatCommand>;
@@ -3,7 +3,7 @@ import type { string_formfactor_name } from '../../formfactors/_common/string_fo
3
3
  * Parsed FORMFACTOR command
4
4
  *
5
5
  * @see ./formfactorCommandParser.ts for more details
6
- * @private within the commands folder
6
+ * @public exported from `@promptbook/editable`
7
7
  */
8
8
  export type FormfactorCommand = {
9
9
  readonly type: 'FORMFACTOR';
@@ -6,6 +6,6 @@ import type { FormfactorCommand } from './FormfactorCommand';
6
6
  * Note: @@@ This command is used as formfactor for new commands - it should NOT be used in any `.book.md` file
7
7
  *
8
8
  * @see `documentationUrl` for more details
9
- * @private within the commands folder
9
+ * @public exported from `@promptbook/editable`
10
10
  */
11
11
  export declare const formfactorCommandParser: PipelineHeadCommandParser<FormfactorCommand>;
@@ -3,7 +3,7 @@ import type { string_name } from '../../types/typeAliases';
3
3
  * Parsed JOKER command
4
4
  *
5
5
  * @see ./jokerCommandParser.ts for more details
6
- * @private within the commands folder
6
+ * @public exported from `@promptbook/editable`
7
7
  */
8
8
  export type JokerCommand = {
9
9
  readonly type: 'JOKER';
@@ -4,6 +4,6 @@ import type { JokerCommand } from './JokerCommand';
4
4
  * Parses the joker 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 jokerCommandParser: PipelineTaskCommandParser<JokerCommand>;
@@ -3,9 +3,9 @@ import type { string_knowledge_source_content } from '../../types/typeAliases';
3
3
  * Parsed KNOWLEDGE command
4
4
  *
5
5
  * @see ./knowledgeCommandParser.ts for more details
6
- * @private within the commands folder
6
+ * @public exported from `@promptbook/editable`
7
7
  */
8
8
  export type KnowledgeCommand = {
9
9
  readonly type: 'KNOWLEDGE';
10
- readonly sourceContent: string_knowledge_source_content;
10
+ readonly knowledgeSourceContent: string_knowledge_source_content;
11
11
  };
@@ -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
@@ -0,0 +1,17 @@
1
+ import type { PipelineString } from '../../../pipeline/PipelineString';
2
+ import type { string_markdown_text } from '../../../types/typeAliases';
3
+ type AddPipelineCommandOptions = {
4
+ commandString: string_markdown_text;
5
+ pipelineString: PipelineString;
6
+ };
7
+ /**
8
+ * @@@
9
+ *
10
+ * @public exported from `@promptbook/editable`
11
+ */
12
+ export declare function addPipelineCommand(options: AddPipelineCommandOptions): PipelineString;
13
+ export {};
14
+ /**
15
+ * TODO: [🧠] What is the better solution - `- xxx`, - `- xxx` or preserve (see also next TODO)
16
+ * TODO: When existing commands 1) as 2) number 3) list, add 4) new command as next number
17
+ */
@@ -0,0 +1,10 @@
1
+ import type { PipelineString } from '../../../pipeline/PipelineString';
2
+ /**
3
+ * @@@
4
+ *
5
+ * @public exported from `@promptbook/editable`
6
+ */
7
+ export declare function deflatePipeline(pipelineString: PipelineString): PipelineString;
8
+ /**
9
+ * TODO: Unit test
10
+ */
@@ -11,7 +11,7 @@ type RemovePipelineCommandOptions = {
11
11
  /**
12
12
  * Pipeline you want to remove command from
13
13
  */
14
- pipeline: PipelineString;
14
+ pipelineString: PipelineString;
15
15
  };
16
16
  /**
17
17
  * Function `removePipelineCommand` will remove one command from pipeline string
@@ -0,0 +1,7 @@
1
+ import type { PipelineString } from '../../../pipeline/PipelineString';
2
+ /**
3
+ * @@@
4
+ *
5
+ * @public exported from `@promptbook/editable`
6
+ */
7
+ export declare function isFlatPipeline(pipelineString: PipelineString): boolean;
@@ -24,3 +24,6 @@ type RenameParameterOptions = {
24
24
  */
25
25
  export declare function renamePipelineParameter(options: RenameParameterOptions): PipelineJson;
26
26
  export {};
27
+ /**
28
+ * TODO: Also variant for `edit-pipeline-string`
29
+ */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/remote-server",
3
- "version": "0.82.0",
3
+ "version": "0.84.0-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/remote-server.index.d.ts",
56
56
  "peerDependencies": {
57
- "@promptbook/core": "0.82.0"
57
+ "@promptbook/core": "0.84.0-0"
58
58
  },
59
59
  "dependencies": {
60
60
  "colors": "1.4.0",