@promptbook/types 0.77.0-6 → 0.77.1

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/README.md CHANGED
@@ -23,10 +23,6 @@
23
23
 
24
24
 
25
25
 
26
- <blockquote style="color: #ff8811">
27
- <b>⚠ Warning:</b> This is a pre-release version of the library. It is not yet ready for production use. Please look at <a href="https://www.npmjs.com/package/@promptbook/core?activeTab=versions">latest stable release</a>.
28
- </blockquote>
29
-
30
26
  ## 📦 Package `@promptbook/types`
31
27
 
32
28
  - Promptbooks are [divided into several](#-packages) packages, all are published from [single monorepo](https://github.com/webgptorg/promptbook).
@@ -35,7 +35,7 @@ import { validatePipeline } from '../conversion/validation/validatePipeline';
35
35
  import { CallbackInterfaceTools } from '../dialogs/callback/CallbackInterfaceTools';
36
36
  import type { CallbackInterfaceToolsOptions } from '../dialogs/callback/CallbackInterfaceToolsOptions';
37
37
  import { BoilerplateError } from '../errors/0-BoilerplateError';
38
- import { ERRORS } from '../errors/0-index';
38
+ import { PROMPTBOOK_ERRORS } from '../errors/0-index';
39
39
  import { AbstractFormatError } from '../errors/AbstractFormatError';
40
40
  import { CollectionError } from '../errors/CollectionError';
41
41
  import { EnvironmentMismatchError } from '../errors/EnvironmentMismatchError';
@@ -150,7 +150,7 @@ export { validatePipeline };
150
150
  export { CallbackInterfaceTools };
151
151
  export type { CallbackInterfaceToolsOptions };
152
152
  export { BoilerplateError };
153
- export { ERRORS };
153
+ export { PROMPTBOOK_ERRORS };
154
154
  export { AbstractFormatError };
155
155
  export { CollectionError };
156
156
  export { EnvironmentMismatchError };
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env ts-node
2
2
  /**
3
- * Note: [🔺] Purpose of this file is to test the CLI in development environment
3
+ * Note: [🔺] Purpose of this file is to test and use the current CLI in development environment
4
4
  */
5
5
  import '../../_packages/cli.index.ts';
@@ -18,7 +18,52 @@ import { UnexpectedError } from './UnexpectedError';
18
18
  *
19
19
  * @public exported from `@promptbook/core`
20
20
  */
21
- export declare const ERRORS: {
21
+ export declare const PROMPTBOOK_ERRORS: {
22
+ readonly AbstractFormatError: typeof AbstractFormatError;
23
+ readonly CsvFormatError: typeof CsvFormatError;
24
+ readonly CollectionError: typeof CollectionError;
25
+ readonly EnvironmentMismatchError: typeof EnvironmentMismatchError;
26
+ readonly ExpectError: typeof ExpectError;
27
+ readonly KnowledgeScrapeError: typeof KnowledgeScrapeError;
28
+ readonly LimitReachedError: typeof LimitReachedError;
29
+ readonly MissingToolsError: typeof MissingToolsError;
30
+ readonly NotFoundError: typeof NotFoundError;
31
+ readonly NotYetImplementedError: typeof NotYetImplementedError;
32
+ readonly ParseError: typeof ParseError;
33
+ readonly PipelineExecutionError: typeof PipelineExecutionError;
34
+ readonly PipelineLogicError: typeof PipelineLogicError;
35
+ readonly PipelineUrlError: typeof PipelineUrlError;
36
+ readonly UnexpectedError: typeof UnexpectedError;
37
+ };
38
+ /**
39
+ * Index of all javascript errors
40
+ *
41
+ * @private for internal usage
42
+ */
43
+ export declare const COMMON_JAVASCRIPT_ERRORS: {
44
+ readonly Error: ErrorConstructor;
45
+ readonly EvalError: EvalErrorConstructor;
46
+ readonly RangeError: RangeErrorConstructor;
47
+ readonly ReferenceError: ReferenceErrorConstructor;
48
+ readonly SyntaxError: SyntaxErrorConstructor;
49
+ readonly TypeError: TypeErrorConstructor;
50
+ readonly URIError: URIErrorConstructor;
51
+ readonly AggregateError: AggregateErrorConstructor;
52
+ };
53
+ /**
54
+ * Index of all errors
55
+ *
56
+ * @private for internal usage
57
+ */
58
+ export declare const ALL_ERRORS: {
59
+ readonly Error: ErrorConstructor;
60
+ readonly EvalError: EvalErrorConstructor;
61
+ readonly RangeError: RangeErrorConstructor;
62
+ readonly ReferenceError: ReferenceErrorConstructor;
63
+ readonly SyntaxError: SyntaxErrorConstructor;
64
+ readonly TypeError: TypeErrorConstructor;
65
+ readonly URIError: URIErrorConstructor;
66
+ readonly AggregateError: AggregateErrorConstructor;
22
67
  readonly AbstractFormatError: typeof AbstractFormatError;
23
68
  readonly CsvFormatError: typeof CsvFormatError;
24
69
  readonly CollectionError: typeof CollectionError;
@@ -1,4 +1,4 @@
1
- import type { ERRORS } from '../0-index';
1
+ import type { ALL_ERRORS } from '../0-index';
2
2
  /**
3
3
  * Represents a serialized error or custom Promptbook error
4
4
  *
@@ -8,7 +8,7 @@ export type ErrorJson = {
8
8
  /**
9
9
  * The type of the error
10
10
  */
11
- readonly name: keyof typeof ERRORS | 'Error';
11
+ readonly name: keyof typeof ALL_ERRORS;
12
12
  /**
13
13
  * The message of the error
14
14
  */
@@ -34,5 +34,5 @@ export type AvailableModel = {
34
34
  readonly modelDescription?: string_model_description;
35
35
  };
36
36
  /**
37
- * TODO: !!!!!! Put pricing information here
37
+ * TODO: (not only [🕘]) Put pricing information here
38
38
  */
@@ -10,9 +10,5 @@ export declare const createGoogleExecutionTools: ((options: GoogleExecutionTools
10
10
  className: string;
11
11
  };
12
12
  /**
13
- * TODO: [🧠][main] !!!! Make anonymous this with all LLM providers
14
- * TODO: [🧠][🧱][main] !!!! Maybe change all `new GoogleExecutionTools` -> `createGoogleExecutionTools` in manual
15
- * TODO: [🧠] Maybe auto-detect usage in browser and determine default value of `isProxied`
16
- * TODO: [🦺] Is there some way how to put `packageName` and `className` on top and function definition on bottom?
17
13
  * TODO: [🎶] Naming "constructor" vs "creator" vs "factory"
18
14
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/types",
3
- "version": "0.77.0-6",
3
+ "version": "0.77.1",
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,
@@ -52,6 +52,6 @@
52
52
  ],
53
53
  "typings": "./esm/typings/src/_packages/types.index.d.ts",
54
54
  "peerDependencies": {
55
- "@promptbook/core": "0.77.0-6"
55
+ "@promptbook/core": "0.77.1"
56
56
  }
57
57
  }