@hawk.so/types 0.6.5 → 0.8.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.
- package/build/index.d.ts +1 -0
- package/build/index.js +1 -0
- package/build/src/ai/stream.d.ts +34 -0
- package/build/src/ai/stream.js +2 -0
- package/build/src/dbScheme/groupedEvent.d.ts +8 -0
- package/build/src/dbScheme/repetition.d.ts +4 -0
- package/index.ts +2 -0
- package/package.json +1 -1
- package/src/ai/stream.ts +39 -0
- package/src/dbScheme/groupedEvent.ts +10 -0
- package/src/dbScheme/repetition.ts +5 -0
- package/tsconfig.json +1 -1
package/build/index.d.ts
CHANGED
package/build/index.js
CHANGED
|
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./src/ai/stream"), exports);
|
|
17
18
|
__exportStar(require("./src/auth/tokensPair"), exports);
|
|
18
19
|
__exportStar(require("./src/base/businessOperation/businessOperation"), exports);
|
|
19
20
|
__exportStar(require("./src/billing/planProlongrationPayload"), exports);
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stream part that carries generated text.
|
|
3
|
+
*/
|
|
4
|
+
export type AiStreamTextDeltaPart = {
|
|
5
|
+
/**
|
|
6
|
+
* Discriminant of a text-carrying part.
|
|
7
|
+
*/
|
|
8
|
+
type: 'text-delta';
|
|
9
|
+
/**
|
|
10
|
+
* Text generated for this part.
|
|
11
|
+
*/
|
|
12
|
+
delta: string;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Stream part that carries a generation failure.
|
|
16
|
+
*/
|
|
17
|
+
export type AiStreamErrorPart = {
|
|
18
|
+
/**
|
|
19
|
+
* Discriminant of a failure-carrying part.
|
|
20
|
+
*/
|
|
21
|
+
type: 'error';
|
|
22
|
+
/**
|
|
23
|
+
* Description of the failure.
|
|
24
|
+
*/
|
|
25
|
+
errorText: string;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Discriminated union of parts an AI stream consists of.
|
|
29
|
+
*/
|
|
30
|
+
export type AiStreamPart = AiStreamTextDeltaPart | AiStreamErrorPart;
|
|
31
|
+
/**
|
|
32
|
+
* Asynchronous sequence of parts forming an AI-generated answer.
|
|
33
|
+
*/
|
|
34
|
+
export type AiStream = AsyncIterable<AiStreamPart>;
|
|
@@ -50,6 +50,14 @@ export interface GroupedEventDBScheme {
|
|
|
50
50
|
* (created by the Collector)
|
|
51
51
|
*/
|
|
52
52
|
timestamp: number;
|
|
53
|
+
/**
|
|
54
|
+
* First release in which the event stopped occurring
|
|
55
|
+
*/
|
|
56
|
+
resolvedInRelease?: string;
|
|
57
|
+
/**
|
|
58
|
+
* First release in which the resolved event occurred again
|
|
59
|
+
*/
|
|
60
|
+
regressionInRelease?: string;
|
|
53
61
|
/**
|
|
54
62
|
* Event marks for tracking status
|
|
55
63
|
*/
|
|
@@ -13,6 +13,10 @@ export interface RepetitionDBScheme {
|
|
|
13
13
|
* Hash for grouping similar events
|
|
14
14
|
*/
|
|
15
15
|
groupHash: string;
|
|
16
|
+
/**
|
|
17
|
+
* Release in which the repetition occurred
|
|
18
|
+
*/
|
|
19
|
+
release?: string;
|
|
16
20
|
/**
|
|
17
21
|
* @deprecated use delta instead
|
|
18
22
|
* And any of EventData field with diff
|
package/index.ts
CHANGED
package/package.json
CHANGED
package/src/ai/stream.ts
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stream part that carries generated text.
|
|
3
|
+
*/
|
|
4
|
+
export type AiStreamTextDeltaPart = {
|
|
5
|
+
/**
|
|
6
|
+
* Discriminant of a text-carrying part.
|
|
7
|
+
*/
|
|
8
|
+
type: 'text-delta';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Text generated for this part.
|
|
12
|
+
*/
|
|
13
|
+
delta: string;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Stream part that carries a generation failure.
|
|
18
|
+
*/
|
|
19
|
+
export type AiStreamErrorPart = {
|
|
20
|
+
/**
|
|
21
|
+
* Discriminant of a failure-carrying part.
|
|
22
|
+
*/
|
|
23
|
+
type: 'error';
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Description of the failure.
|
|
27
|
+
*/
|
|
28
|
+
errorText: string;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Discriminated union of parts an AI stream consists of.
|
|
33
|
+
*/
|
|
34
|
+
export type AiStreamPart = AiStreamTextDeltaPart | AiStreamErrorPart;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Asynchronous sequence of parts forming an AI-generated answer.
|
|
38
|
+
*/
|
|
39
|
+
export type AiStream = AsyncIterable<AiStreamPart>;
|
|
@@ -60,6 +60,16 @@ export interface GroupedEventDBScheme {
|
|
|
60
60
|
*/
|
|
61
61
|
timestamp: number;
|
|
62
62
|
|
|
63
|
+
/**
|
|
64
|
+
* First release in which the event stopped occurring
|
|
65
|
+
*/
|
|
66
|
+
resolvedInRelease?: string;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* First release in which the resolved event occurred again
|
|
70
|
+
*/
|
|
71
|
+
regressionInRelease?: string;
|
|
72
|
+
|
|
63
73
|
/**
|
|
64
74
|
* Event marks for tracking status
|
|
65
75
|
*/
|
package/tsconfig.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"compilerOptions": {
|
|
3
3
|
/* Basic Options */
|
|
4
4
|
// "incremental": true, /* Enable incremental compilation */
|
|
5
|
-
"target": "
|
|
5
|
+
"target": "es2018", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', 'ES2021', 'ES2022', 'ES2023', 'ES2024', or 'ESNEXT'. */
|
|
6
6
|
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
|
|
7
7
|
// "lib": [], /* Specify library files to be included in the compilation. */
|
|
8
8
|
// "allowJs": true, /* Allow javascript files to be compiled. */
|