@hawk.so/types 0.5.1 → 0.5.3
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/src/base/event/breadcrumb.d.ts +2 -2
- package/build/src/base/event/taskManagerItem.d.ts +33 -0
- package/build/src/base/event/taskManagerItem.js +2 -0
- package/build/src/dbScheme/groupedEvent.d.ts +5 -0
- package/package.json +1 -1
- package/src/base/event/breadcrumb.ts +2 -2
- package/src/base/event/taskManagerItem.ts +39 -0
- package/src/dbScheme/groupedEvent.ts +6 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { JsonNode } from '../../utils/index.ts';
|
|
2
2
|
/**
|
|
3
3
|
* Breadcrumb severity level
|
|
4
4
|
*/
|
|
@@ -52,5 +52,5 @@ export interface Breadcrumb {
|
|
|
52
52
|
/**
|
|
53
53
|
* Arbitrary key-value data associated with the breadcrumb
|
|
54
54
|
*/
|
|
55
|
-
data?: Record<string,
|
|
55
|
+
data?: Record<string, JsonNode>;
|
|
56
56
|
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Task Manager item linked to a particular Event (e.g., GitHub Issue)
|
|
3
|
+
*/
|
|
4
|
+
export interface TaskManagerItem {
|
|
5
|
+
/**
|
|
6
|
+
* Type of task manager item (currently only 'github-issue' is supported)
|
|
7
|
+
*/
|
|
8
|
+
type: 'github-issue';
|
|
9
|
+
/**
|
|
10
|
+
* Task number (e.g., GitHub Issue number)
|
|
11
|
+
*/
|
|
12
|
+
number: number;
|
|
13
|
+
/**
|
|
14
|
+
* URL to the task (e.g., GitHub Issue URL)
|
|
15
|
+
*/
|
|
16
|
+
url: string;
|
|
17
|
+
/**
|
|
18
|
+
* Task title
|
|
19
|
+
*/
|
|
20
|
+
title: string;
|
|
21
|
+
/**
|
|
22
|
+
* How the task was created (automatically by worker or manually by user)
|
|
23
|
+
*/
|
|
24
|
+
createdBy: 'auto' | 'manual';
|
|
25
|
+
/**
|
|
26
|
+
* Task creation timestamp
|
|
27
|
+
*/
|
|
28
|
+
createdAt: Date;
|
|
29
|
+
/**
|
|
30
|
+
* Agent assigned to the task (e.g., 'copilot' for GitHub Copilot)
|
|
31
|
+
*/
|
|
32
|
+
assignee: 'copilot' | null;
|
|
33
|
+
}
|
|
@@ -2,6 +2,7 @@ import type { ObjectId } from 'bson';
|
|
|
2
2
|
import type { DecodedEventData, EncodedEventData, EventData } from '../base/event/event.ts';
|
|
3
3
|
import type { UserDBScheme } from './user.ts';
|
|
4
4
|
import type { EventAddons } from '../base/event/addons/index.ts';
|
|
5
|
+
import type { TaskManagerItem } from '../base/event/taskManagerItem.ts';
|
|
5
6
|
/**
|
|
6
7
|
* Event marks interface for tracking event status
|
|
7
8
|
*/
|
|
@@ -53,6 +54,10 @@ export interface GroupedEventDBScheme {
|
|
|
53
54
|
* Event marks for tracking status
|
|
54
55
|
*/
|
|
55
56
|
marks?: EventMarks;
|
|
57
|
+
/**
|
|
58
|
+
* Task Manager item linked to this event (e.g., GitHub Issue)
|
|
59
|
+
*/
|
|
60
|
+
taskManagerItem?: TaskManagerItem;
|
|
56
61
|
}
|
|
57
62
|
/**
|
|
58
63
|
* Event where 'context' and 'addons' are decoded from json strings to objects
|
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { JsonNode } from '../../utils/index.ts';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Breadcrumb severity level
|
|
@@ -66,5 +66,5 @@ export interface Breadcrumb {
|
|
|
66
66
|
/**
|
|
67
67
|
* Arbitrary key-value data associated with the breadcrumb
|
|
68
68
|
*/
|
|
69
|
-
data?: Record<string,
|
|
69
|
+
data?: Record<string, JsonNode>;
|
|
70
70
|
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Task Manager item linked to a particular Event (e.g., GitHub Issue)
|
|
3
|
+
*/
|
|
4
|
+
export interface TaskManagerItem {
|
|
5
|
+
/**
|
|
6
|
+
* Type of task manager item (currently only 'github-issue' is supported)
|
|
7
|
+
*/
|
|
8
|
+
type: 'github-issue';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Task number (e.g., GitHub Issue number)
|
|
12
|
+
*/
|
|
13
|
+
number: number;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* URL to the task (e.g., GitHub Issue URL)
|
|
17
|
+
*/
|
|
18
|
+
url: string;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Task title
|
|
22
|
+
*/
|
|
23
|
+
title: string;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* How the task was created (automatically by worker or manually by user)
|
|
27
|
+
*/
|
|
28
|
+
createdBy: 'auto' | 'manual';
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Task creation timestamp
|
|
32
|
+
*/
|
|
33
|
+
createdAt: Date;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Agent assigned to the task (e.g., 'copilot' for GitHub Copilot)
|
|
37
|
+
*/
|
|
38
|
+
assignee: 'copilot' | null;
|
|
39
|
+
}
|
|
@@ -2,6 +2,7 @@ import type { ObjectId } from 'bson';
|
|
|
2
2
|
import type { DecodedEventData, EncodedEventData, EventData } from '../base/event/event.ts';
|
|
3
3
|
import type { UserDBScheme } from './user.ts';
|
|
4
4
|
import type { EventAddons } from '../base/event/addons/index.ts';
|
|
5
|
+
import type { TaskManagerItem } from '../base/event/taskManagerItem.ts';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* Event marks interface for tracking event status
|
|
@@ -63,6 +64,11 @@ export interface GroupedEventDBScheme {
|
|
|
63
64
|
* Event marks for tracking status
|
|
64
65
|
*/
|
|
65
66
|
marks?: EventMarks;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Task Manager item linked to this event (e.g., GitHub Issue)
|
|
70
|
+
*/
|
|
71
|
+
taskManagerItem?: TaskManagerItem;
|
|
66
72
|
}
|
|
67
73
|
|
|
68
74
|
/**
|