@inkeep/agents-core 0.47.5 → 0.48.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/README.md +1 -1
- package/dist/auth/auth-schema.d.ts +83 -83
- package/dist/auth/auth-validation-schemas.d.ts +148 -148
- package/dist/auth/auth.d.ts +58 -58
- package/dist/auth/permissions.d.ts +13 -13
- package/dist/client-exports.d.ts +13 -2
- package/dist/client-exports.js +5 -4
- package/dist/data-access/index.d.ts +6 -1
- package/dist/data-access/index.js +6 -1
- package/dist/data-access/manage/agentFull.js +154 -1
- package/dist/data-access/manage/agents.d.ts +4 -4
- package/dist/data-access/manage/agents.js +56 -4
- package/dist/data-access/manage/artifactComponents.d.ts +41 -5
- package/dist/data-access/manage/dataComponents.d.ts +2 -2
- package/dist/data-access/manage/functionTools.d.ts +3 -3
- package/dist/data-access/manage/projectFull.js +97 -0
- package/dist/data-access/manage/scheduledTriggers.d.ts +80 -0
- package/dist/data-access/manage/scheduledTriggers.js +76 -0
- package/dist/data-access/manage/scheduledWorkflows.d.ts +29 -0
- package/dist/data-access/manage/scheduledWorkflows.js +32 -0
- package/dist/data-access/manage/skills.d.ts +109 -0
- package/dist/data-access/manage/skills.js +122 -0
- package/dist/data-access/manage/subAgentRelations.d.ts +6 -6
- package/dist/data-access/manage/tools.d.ts +4 -4
- package/dist/data-access/runtime/conversations.d.ts +11 -11
- package/dist/data-access/runtime/messages.d.ts +9 -9
- package/dist/data-access/runtime/scheduledTriggerInvocations.d.ts +233 -0
- package/dist/data-access/runtime/scheduledTriggerInvocations.js +226 -0
- package/dist/data-access/runtime/tasks.d.ts +4 -4
- package/dist/data-access/runtime/workAppSlack.d.ts +55 -0
- package/dist/data-access/runtime/workAppSlack.js +146 -0
- package/dist/db/manage/manage-schema.d.ts +1436 -506
- package/dist/db/manage/manage-schema.js +240 -15
- package/dist/db/runtime/runtime-schema.d.ts +1244 -242
- package/dist/db/runtime/runtime-schema.js +108 -3
- package/dist/index.d.ts +15 -6
- package/dist/index.js +13 -5
- package/dist/types/entities.d.ts +15 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/utils/index.d.ts +5 -2
- package/dist/utils/index.js +5 -2
- package/dist/utils/slack-link-token.d.ts +57 -0
- package/dist/utils/slack-link-token.js +112 -0
- package/dist/utils/slack-user-token.d.ts +65 -0
- package/dist/utils/slack-user-token.js +129 -0
- package/dist/utils/sse-parser.d.ts +35 -0
- package/dist/utils/sse-parser.js +71 -0
- package/dist/utils/tracer-factory.d.ts +11 -2
- package/dist/utils/tracer-factory.js +24 -5
- package/dist/utils/tracer.d.ts +2 -2
- package/dist/utils/tracer.js +2 -2
- package/dist/utils/trigger-auth.d.ts +1 -1
- package/dist/validation/dolt-schemas.d.ts +1 -1
- package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
- package/dist/validation/extend-schemas.d.ts +34 -0
- package/dist/validation/extend-schemas.js +33 -0
- package/dist/validation/index.d.ts +2 -2
- package/dist/validation/index.js +2 -2
- package/dist/validation/json-schemas.d.ts +28 -0
- package/dist/validation/json-schemas.js +56 -0
- package/dist/validation/schemas.d.ts +5719 -2429
- package/dist/validation/schemas.js +159 -38
- package/dist/validation/stream-event-schemas.d.ts +0 -2
- package/dist/validation/stream-event-schemas.js +1 -2
- package/drizzle/manage/0007_nice_lilandra.sql +3 -0
- package/drizzle/manage/0008_friendly_mentallo.sql +32 -0
- package/drizzle/manage/0009_chilly_old_lace.sql +39 -0
- package/drizzle/manage/meta/0007_snapshot.json +3148 -0
- package/drizzle/manage/meta/0008_snapshot.json +3391 -0
- package/drizzle/manage/meta/0009_snapshot.json +3670 -0
- package/drizzle/manage/meta/_journal.json +21 -0
- package/drizzle/runtime/0012_greedy_hulk.sql +84 -0
- package/drizzle/runtime/0013_huge_white_queen.sql +19 -0
- package/drizzle/runtime/meta/0007_snapshot.json +1 -1
- package/drizzle/runtime/meta/0012_snapshot.json +3622 -0
- package/drizzle/runtime/meta/0013_snapshot.json +3746 -0
- package/drizzle/runtime/meta/_journal.json +14 -0
- package/package.json +1 -1
|
@@ -23,12 +23,12 @@ declare const createConversation: (db: AgentsRunDatabaseClient) => (params: Conv
|
|
|
23
23
|
createdAt: string;
|
|
24
24
|
updatedAt: string;
|
|
25
25
|
metadata: ConversationMetadata | null;
|
|
26
|
+
userId: string | null;
|
|
26
27
|
ref: {
|
|
27
|
-
type: "
|
|
28
|
+
type: "commit" | "tag" | "branch";
|
|
28
29
|
name: string;
|
|
29
30
|
hash: string;
|
|
30
31
|
} | null;
|
|
31
|
-
userId: string | null;
|
|
32
32
|
activeSubAgentId: string;
|
|
33
33
|
lastContextResolution: string | null;
|
|
34
34
|
}>;
|
|
@@ -43,7 +43,7 @@ declare const updateConversation: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
43
43
|
agentId: string | null;
|
|
44
44
|
activeSubAgentId: string;
|
|
45
45
|
ref: {
|
|
46
|
-
type: "
|
|
46
|
+
type: "commit" | "tag" | "branch";
|
|
47
47
|
name: string;
|
|
48
48
|
hash: string;
|
|
49
49
|
} | null;
|
|
@@ -69,7 +69,7 @@ declare const updateConversationActiveSubAgent: (db: AgentsRunDatabaseClient) =>
|
|
|
69
69
|
agentId: string | null;
|
|
70
70
|
activeSubAgentId: string;
|
|
71
71
|
ref: {
|
|
72
|
-
type: "
|
|
72
|
+
type: "commit" | "tag" | "branch";
|
|
73
73
|
name: string;
|
|
74
74
|
hash: string;
|
|
75
75
|
} | null;
|
|
@@ -92,12 +92,12 @@ declare const getConversation: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
92
92
|
createdAt: string;
|
|
93
93
|
updatedAt: string;
|
|
94
94
|
metadata: ConversationMetadata | null;
|
|
95
|
+
userId: string | null;
|
|
95
96
|
ref: {
|
|
96
|
-
type: "
|
|
97
|
+
type: "commit" | "tag" | "branch";
|
|
97
98
|
name: string;
|
|
98
99
|
hash: string;
|
|
99
100
|
} | null;
|
|
100
|
-
userId: string | null;
|
|
101
101
|
activeSubAgentId: string;
|
|
102
102
|
lastContextResolution: string | null;
|
|
103
103
|
} | undefined>;
|
|
@@ -107,7 +107,7 @@ declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input:
|
|
|
107
107
|
tenantId: string;
|
|
108
108
|
id: string;
|
|
109
109
|
ref: {
|
|
110
|
-
type: "
|
|
110
|
+
type: "commit" | "tag" | "branch";
|
|
111
111
|
name: string;
|
|
112
112
|
hash: string;
|
|
113
113
|
};
|
|
@@ -128,12 +128,12 @@ declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input:
|
|
|
128
128
|
createdAt: string;
|
|
129
129
|
updatedAt: string;
|
|
130
130
|
metadata: ConversationMetadata | null;
|
|
131
|
+
userId: string | null;
|
|
131
132
|
ref: {
|
|
132
|
-
type: "
|
|
133
|
+
type: "commit" | "tag" | "branch";
|
|
133
134
|
name: string;
|
|
134
135
|
hash: string;
|
|
135
136
|
} | null;
|
|
136
|
-
userId: string | null;
|
|
137
137
|
activeSubAgentId: string;
|
|
138
138
|
lastContextResolution: string | null;
|
|
139
139
|
}>;
|
|
@@ -160,12 +160,12 @@ declare const getActiveAgentForConversation: (db: AgentsRunDatabaseClient) => (p
|
|
|
160
160
|
createdAt: string;
|
|
161
161
|
updatedAt: string;
|
|
162
162
|
metadata: ConversationMetadata | null;
|
|
163
|
+
userId: string | null;
|
|
163
164
|
ref: {
|
|
164
|
-
type: "
|
|
165
|
+
type: "commit" | "tag" | "branch";
|
|
165
166
|
name: string;
|
|
166
167
|
hash: string;
|
|
167
168
|
} | null;
|
|
168
|
-
userId: string | null;
|
|
169
169
|
activeSubAgentId: string;
|
|
170
170
|
lastContextResolution: string | null;
|
|
171
171
|
} | undefined>;
|
|
@@ -17,18 +17,18 @@ declare const getMessageById: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
17
17
|
metadata: MessageMetadata | null;
|
|
18
18
|
content: MessageContent;
|
|
19
19
|
role: string;
|
|
20
|
+
conversationId: string;
|
|
20
21
|
fromSubAgentId: string | null;
|
|
21
22
|
toSubAgentId: string | null;
|
|
22
23
|
fromExternalAgentId: string | null;
|
|
23
24
|
toExternalAgentId: string | null;
|
|
24
|
-
taskId: string | null;
|
|
25
|
-
a2aTaskId: string | null;
|
|
26
|
-
conversationId: string;
|
|
27
25
|
fromTeamAgentId: string | null;
|
|
28
26
|
toTeamAgentId: string | null;
|
|
29
27
|
visibility: string;
|
|
30
28
|
messageType: string;
|
|
29
|
+
taskId: string | null;
|
|
31
30
|
parentMessageId: string | null;
|
|
31
|
+
a2aTaskId: string | null;
|
|
32
32
|
a2aSessionId: string | null;
|
|
33
33
|
} | undefined>;
|
|
34
34
|
declare const listMessages: (db: AgentsRunDatabaseClient) => (params: {
|
|
@@ -148,18 +148,18 @@ declare const createMessage: (db: AgentsRunDatabaseClient) => (params: MessageIn
|
|
|
148
148
|
metadata: MessageMetadata | null;
|
|
149
149
|
content: MessageContent;
|
|
150
150
|
role: string;
|
|
151
|
+
conversationId: string;
|
|
151
152
|
fromSubAgentId: string | null;
|
|
152
153
|
toSubAgentId: string | null;
|
|
153
154
|
fromExternalAgentId: string | null;
|
|
154
155
|
toExternalAgentId: string | null;
|
|
155
|
-
taskId: string | null;
|
|
156
|
-
a2aTaskId: string | null;
|
|
157
|
-
conversationId: string;
|
|
158
156
|
fromTeamAgentId: string | null;
|
|
159
157
|
toTeamAgentId: string | null;
|
|
160
158
|
visibility: string;
|
|
161
159
|
messageType: string;
|
|
160
|
+
taskId: string | null;
|
|
162
161
|
parentMessageId: string | null;
|
|
162
|
+
a2aTaskId: string | null;
|
|
163
163
|
a2aSessionId: string | null;
|
|
164
164
|
}>;
|
|
165
165
|
declare const updateMessage: (db: AgentsRunDatabaseClient) => (params: {
|
|
@@ -201,18 +201,18 @@ declare const deleteMessage: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
201
201
|
metadata: MessageMetadata | null;
|
|
202
202
|
content: MessageContent;
|
|
203
203
|
role: string;
|
|
204
|
+
conversationId: string;
|
|
204
205
|
fromSubAgentId: string | null;
|
|
205
206
|
toSubAgentId: string | null;
|
|
206
207
|
fromExternalAgentId: string | null;
|
|
207
208
|
toExternalAgentId: string | null;
|
|
208
|
-
taskId: string | null;
|
|
209
|
-
a2aTaskId: string | null;
|
|
210
|
-
conversationId: string;
|
|
211
209
|
fromTeamAgentId: string | null;
|
|
212
210
|
toTeamAgentId: string | null;
|
|
213
211
|
visibility: string;
|
|
214
212
|
messageType: string;
|
|
213
|
+
taskId: string | null;
|
|
215
214
|
parentMessageId: string | null;
|
|
215
|
+
a2aTaskId: string | null;
|
|
216
216
|
a2aSessionId: string | null;
|
|
217
217
|
}>;
|
|
218
218
|
declare const countMessagesByConversation: (db: AgentsRunDatabaseClient) => (params: {
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import { AgentScopeConfig, PaginationConfig } from "../../types/utility.js";
|
|
2
|
+
import { AgentsRunDatabaseClient } from "../../db/runtime/runtime-client.js";
|
|
3
|
+
import { ScheduledTriggerInvocation, ScheduledTriggerInvocationInsert, ScheduledTriggerInvocationStatus, ScheduledTriggerInvocationUpdate } from "../../validation/schemas.js";
|
|
4
|
+
|
|
5
|
+
//#region src/data-access/runtime/scheduledTriggerInvocations.d.ts
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Get a scheduled trigger invocation by ID (agent-scoped)
|
|
9
|
+
*/
|
|
10
|
+
declare const getScheduledTriggerInvocationById: (db: AgentsRunDatabaseClient) => (params: {
|
|
11
|
+
scopes: AgentScopeConfig;
|
|
12
|
+
scheduledTriggerId: string;
|
|
13
|
+
invocationId: string;
|
|
14
|
+
}) => Promise<ScheduledTriggerInvocation | undefined>;
|
|
15
|
+
/**
|
|
16
|
+
* Get a scheduled trigger invocation by idempotency key
|
|
17
|
+
* Used to check if an invocation already exists for a given schedule
|
|
18
|
+
*/
|
|
19
|
+
declare const getScheduledTriggerInvocationByIdempotencyKey: (db: AgentsRunDatabaseClient) => (params: {
|
|
20
|
+
idempotencyKey: string;
|
|
21
|
+
}) => Promise<ScheduledTriggerInvocation | undefined>;
|
|
22
|
+
/**
|
|
23
|
+
* List scheduled trigger invocations with optional filtering (agent-scoped)
|
|
24
|
+
*/
|
|
25
|
+
declare const listScheduledTriggerInvocationsPaginated: (db: AgentsRunDatabaseClient) => (params: {
|
|
26
|
+
scopes: AgentScopeConfig;
|
|
27
|
+
scheduledTriggerId: string;
|
|
28
|
+
pagination?: PaginationConfig;
|
|
29
|
+
filters?: {
|
|
30
|
+
status?: ScheduledTriggerInvocationStatus;
|
|
31
|
+
from?: string;
|
|
32
|
+
to?: string;
|
|
33
|
+
};
|
|
34
|
+
}) => Promise<{
|
|
35
|
+
data: {
|
|
36
|
+
scheduledTriggerId: string;
|
|
37
|
+
status: "pending" | "running" | "completed" | "failed" | "cancelled";
|
|
38
|
+
scheduledFor: string;
|
|
39
|
+
startedAt: string | null;
|
|
40
|
+
completedAt: string | null;
|
|
41
|
+
resolvedPayload: Record<string, unknown> | null;
|
|
42
|
+
conversationIds: string[] | null;
|
|
43
|
+
attemptNumber: number;
|
|
44
|
+
idempotencyKey: string;
|
|
45
|
+
createdAt: string;
|
|
46
|
+
agentId: string;
|
|
47
|
+
projectId: string;
|
|
48
|
+
tenantId: string;
|
|
49
|
+
id: string;
|
|
50
|
+
}[];
|
|
51
|
+
pagination: {
|
|
52
|
+
page: number;
|
|
53
|
+
limit: number;
|
|
54
|
+
total: number;
|
|
55
|
+
pages: number;
|
|
56
|
+
};
|
|
57
|
+
}>;
|
|
58
|
+
/**
|
|
59
|
+
* List pending invocations for a trigger, ordered by scheduledFor (earliest first)
|
|
60
|
+
* Used by workflow to get the next invocation to execute
|
|
61
|
+
*/
|
|
62
|
+
declare const listPendingScheduledTriggerInvocations: (db: AgentsRunDatabaseClient) => (params: {
|
|
63
|
+
scopes: AgentScopeConfig;
|
|
64
|
+
scheduledTriggerId: string;
|
|
65
|
+
limit?: number;
|
|
66
|
+
}) => Promise<ScheduledTriggerInvocation[]>;
|
|
67
|
+
/**
|
|
68
|
+
* Delete all pending invocations for a trigger
|
|
69
|
+
* Used when cron expression changes or trigger is disabled
|
|
70
|
+
*/
|
|
71
|
+
declare const deletePendingInvocationsForTrigger: (db: AgentsRunDatabaseClient) => (params: {
|
|
72
|
+
scopes: AgentScopeConfig;
|
|
73
|
+
scheduledTriggerId: string;
|
|
74
|
+
}) => Promise<number>;
|
|
75
|
+
/**
|
|
76
|
+
* Create a new scheduled trigger invocation (agent-scoped)
|
|
77
|
+
*/
|
|
78
|
+
declare const createScheduledTriggerInvocation: (db: AgentsRunDatabaseClient) => (params: ScheduledTriggerInvocationInsert) => Promise<ScheduledTriggerInvocation>;
|
|
79
|
+
/**
|
|
80
|
+
* Update scheduled trigger invocation status (agent-scoped)
|
|
81
|
+
*/
|
|
82
|
+
declare const updateScheduledTriggerInvocationStatus: (db: AgentsRunDatabaseClient) => (params: {
|
|
83
|
+
scopes: AgentScopeConfig;
|
|
84
|
+
scheduledTriggerId: string;
|
|
85
|
+
invocationId: string;
|
|
86
|
+
data: ScheduledTriggerInvocationUpdate;
|
|
87
|
+
}) => Promise<ScheduledTriggerInvocation>;
|
|
88
|
+
/**
|
|
89
|
+
* Mark invocation as running
|
|
90
|
+
*/
|
|
91
|
+
declare const markScheduledTriggerInvocationRunning: (db: AgentsRunDatabaseClient) => (params: {
|
|
92
|
+
scopes: AgentScopeConfig;
|
|
93
|
+
scheduledTriggerId: string;
|
|
94
|
+
invocationId: string;
|
|
95
|
+
}) => Promise<ScheduledTriggerInvocation>;
|
|
96
|
+
/**
|
|
97
|
+
* Mark invocation as completed
|
|
98
|
+
* Note: Will not update if status is already 'cancelled' to respect user cancellation
|
|
99
|
+
*/
|
|
100
|
+
declare const markScheduledTriggerInvocationCompleted: (db: AgentsRunDatabaseClient) => (params: {
|
|
101
|
+
scopes: AgentScopeConfig;
|
|
102
|
+
scheduledTriggerId: string;
|
|
103
|
+
invocationId: string;
|
|
104
|
+
}) => Promise<ScheduledTriggerInvocation | undefined>;
|
|
105
|
+
/**
|
|
106
|
+
* Mark invocation as failed
|
|
107
|
+
* Note: Will not update if status is already 'cancelled' to respect user cancellation
|
|
108
|
+
*/
|
|
109
|
+
declare const markScheduledTriggerInvocationFailed: (db: AgentsRunDatabaseClient) => (params: {
|
|
110
|
+
scopes: AgentScopeConfig;
|
|
111
|
+
scheduledTriggerId: string;
|
|
112
|
+
invocationId: string;
|
|
113
|
+
}) => Promise<ScheduledTriggerInvocation | undefined>;
|
|
114
|
+
/**
|
|
115
|
+
* Add a conversation ID to the invocation's conversationIds array
|
|
116
|
+
* Used to track all conversations created during retries
|
|
117
|
+
*/
|
|
118
|
+
declare const addConversationIdToInvocation: (db: AgentsRunDatabaseClient) => (params: {
|
|
119
|
+
scopes: AgentScopeConfig;
|
|
120
|
+
scheduledTriggerId: string;
|
|
121
|
+
invocationId: string;
|
|
122
|
+
conversationId: string;
|
|
123
|
+
}) => Promise<ScheduledTriggerInvocation | undefined>;
|
|
124
|
+
/**
|
|
125
|
+
* Mark invocation as cancelled
|
|
126
|
+
*/
|
|
127
|
+
declare const markScheduledTriggerInvocationCancelled: (db: AgentsRunDatabaseClient) => (params: {
|
|
128
|
+
scopes: AgentScopeConfig;
|
|
129
|
+
scheduledTriggerId: string;
|
|
130
|
+
invocationId: string;
|
|
131
|
+
}) => Promise<ScheduledTriggerInvocation>;
|
|
132
|
+
/**
|
|
133
|
+
* Cancel all pending invocations for a trigger
|
|
134
|
+
* Used when a trigger is deleted
|
|
135
|
+
*/
|
|
136
|
+
declare const cancelPendingInvocationsForTrigger: (db: AgentsRunDatabaseClient) => (params: {
|
|
137
|
+
scopes: AgentScopeConfig;
|
|
138
|
+
scheduledTriggerId: string;
|
|
139
|
+
}) => Promise<number>;
|
|
140
|
+
/**
|
|
141
|
+
* Cancel only PAST pending invocations for a trigger (scheduledFor <= now)
|
|
142
|
+
* Used when a trigger is disabled - keeps future invocations pending
|
|
143
|
+
*/
|
|
144
|
+
declare const cancelPastPendingInvocationsForTrigger: (db: AgentsRunDatabaseClient) => (params: {
|
|
145
|
+
scopes: AgentScopeConfig;
|
|
146
|
+
scheduledTriggerId: string;
|
|
147
|
+
}) => Promise<number>;
|
|
148
|
+
/**
|
|
149
|
+
* Get run info for multiple scheduled triggers in a single query
|
|
150
|
+
* Returns last run (completed/failed) and next pending run for each trigger
|
|
151
|
+
*/
|
|
152
|
+
declare const getScheduledTriggerRunInfoBatch: (db: AgentsRunDatabaseClient) => (params: {
|
|
153
|
+
scopes: Omit<AgentScopeConfig, "agentId">;
|
|
154
|
+
triggerIds: Array<{
|
|
155
|
+
agentId: string;
|
|
156
|
+
triggerId: string;
|
|
157
|
+
}>;
|
|
158
|
+
}) => Promise<Map<string, {
|
|
159
|
+
lastRunAt: string | null;
|
|
160
|
+
lastRunStatus: "completed" | "failed" | null;
|
|
161
|
+
lastRunConversationIds: string[];
|
|
162
|
+
nextRunAt: string | null;
|
|
163
|
+
}>>;
|
|
164
|
+
/**
|
|
165
|
+
* List upcoming invocations across ALL triggers for an agent with pagination
|
|
166
|
+
* Used for the upcoming runs dashboard with full pagination support
|
|
167
|
+
*/
|
|
168
|
+
declare const listUpcomingInvocationsForAgentPaginated: (db: AgentsRunDatabaseClient) => (params: {
|
|
169
|
+
scopes: Omit<AgentScopeConfig, "agentId"> & {
|
|
170
|
+
agentId: string;
|
|
171
|
+
};
|
|
172
|
+
pagination?: PaginationConfig;
|
|
173
|
+
includeRunning?: boolean;
|
|
174
|
+
}) => Promise<{
|
|
175
|
+
data: {
|
|
176
|
+
scheduledTriggerId: string;
|
|
177
|
+
status: "pending" | "running" | "completed" | "failed" | "cancelled";
|
|
178
|
+
scheduledFor: string;
|
|
179
|
+
startedAt: string | null;
|
|
180
|
+
completedAt: string | null;
|
|
181
|
+
resolvedPayload: Record<string, unknown> | null;
|
|
182
|
+
conversationIds: string[] | null;
|
|
183
|
+
attemptNumber: number;
|
|
184
|
+
idempotencyKey: string;
|
|
185
|
+
createdAt: string;
|
|
186
|
+
agentId: string;
|
|
187
|
+
projectId: string;
|
|
188
|
+
tenantId: string;
|
|
189
|
+
id: string;
|
|
190
|
+
}[];
|
|
191
|
+
pagination: {
|
|
192
|
+
page: number;
|
|
193
|
+
limit: number;
|
|
194
|
+
total: number;
|
|
195
|
+
pages: number;
|
|
196
|
+
};
|
|
197
|
+
}>;
|
|
198
|
+
/**
|
|
199
|
+
* List all invocations across ALL triggers for a PROJECT with pagination
|
|
200
|
+
* Used for the project-level invocations dashboard
|
|
201
|
+
*/
|
|
202
|
+
declare const listProjectScheduledTriggerInvocationsPaginated: (db: AgentsRunDatabaseClient) => (params: {
|
|
203
|
+
scopes: Omit<AgentScopeConfig, "agentId">;
|
|
204
|
+
pagination?: PaginationConfig;
|
|
205
|
+
filters?: {
|
|
206
|
+
status?: ScheduledTriggerInvocationStatus;
|
|
207
|
+
};
|
|
208
|
+
}) => Promise<{
|
|
209
|
+
data: {
|
|
210
|
+
scheduledTriggerId: string;
|
|
211
|
+
status: "pending" | "running" | "completed" | "failed" | "cancelled";
|
|
212
|
+
scheduledFor: string;
|
|
213
|
+
startedAt: string | null;
|
|
214
|
+
completedAt: string | null;
|
|
215
|
+
resolvedPayload: Record<string, unknown> | null;
|
|
216
|
+
conversationIds: string[] | null;
|
|
217
|
+
attemptNumber: number;
|
|
218
|
+
idempotencyKey: string;
|
|
219
|
+
createdAt: string;
|
|
220
|
+
agentId: string;
|
|
221
|
+
projectId: string;
|
|
222
|
+
tenantId: string;
|
|
223
|
+
id: string;
|
|
224
|
+
}[];
|
|
225
|
+
pagination: {
|
|
226
|
+
page: number;
|
|
227
|
+
limit: number;
|
|
228
|
+
total: number;
|
|
229
|
+
pages: number;
|
|
230
|
+
};
|
|
231
|
+
}>;
|
|
232
|
+
//#endregion
|
|
233
|
+
export { addConversationIdToInvocation, cancelPastPendingInvocationsForTrigger, cancelPendingInvocationsForTrigger, createScheduledTriggerInvocation, deletePendingInvocationsForTrigger, getScheduledTriggerInvocationById, getScheduledTriggerInvocationByIdempotencyKey, getScheduledTriggerRunInfoBatch, listPendingScheduledTriggerInvocations, listProjectScheduledTriggerInvocationsPaginated, listScheduledTriggerInvocationsPaginated, listUpcomingInvocationsForAgentPaginated, markScheduledTriggerInvocationCancelled, markScheduledTriggerInvocationCompleted, markScheduledTriggerInvocationFailed, markScheduledTriggerInvocationRunning, updateScheduledTriggerInvocationStatus };
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import { scheduledTriggerInvocations } from "../../db/runtime/runtime-schema.js";
|
|
2
|
+
import { and, asc, count, desc, eq, gte, inArray, lte, ne, sql } from "drizzle-orm";
|
|
3
|
+
|
|
4
|
+
//#region src/data-access/runtime/scheduledTriggerInvocations.ts
|
|
5
|
+
/**
|
|
6
|
+
* Get a scheduled trigger invocation by ID (agent-scoped)
|
|
7
|
+
*/
|
|
8
|
+
const getScheduledTriggerInvocationById = (db) => async (params) => {
|
|
9
|
+
return await db.query.scheduledTriggerInvocations.findFirst({ where: and(eq(scheduledTriggerInvocations.tenantId, params.scopes.tenantId), eq(scheduledTriggerInvocations.projectId, params.scopes.projectId), eq(scheduledTriggerInvocations.agentId, params.scopes.agentId), eq(scheduledTriggerInvocations.scheduledTriggerId, params.scheduledTriggerId), eq(scheduledTriggerInvocations.id, params.invocationId)) });
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Get a scheduled trigger invocation by idempotency key
|
|
13
|
+
* Used to check if an invocation already exists for a given schedule
|
|
14
|
+
*/
|
|
15
|
+
const getScheduledTriggerInvocationByIdempotencyKey = (db) => async (params) => {
|
|
16
|
+
return await db.query.scheduledTriggerInvocations.findFirst({ where: eq(scheduledTriggerInvocations.idempotencyKey, params.idempotencyKey) });
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* List scheduled trigger invocations with optional filtering (agent-scoped)
|
|
20
|
+
*/
|
|
21
|
+
const listScheduledTriggerInvocationsPaginated = (db) => async (params) => {
|
|
22
|
+
const page = params.pagination?.page || 1;
|
|
23
|
+
const limit = Math.min(params.pagination?.limit || 10, 100);
|
|
24
|
+
const offset = (page - 1) * limit;
|
|
25
|
+
const conditions = [
|
|
26
|
+
eq(scheduledTriggerInvocations.tenantId, params.scopes.tenantId),
|
|
27
|
+
eq(scheduledTriggerInvocations.projectId, params.scopes.projectId),
|
|
28
|
+
eq(scheduledTriggerInvocations.agentId, params.scopes.agentId),
|
|
29
|
+
eq(scheduledTriggerInvocations.scheduledTriggerId, params.scheduledTriggerId)
|
|
30
|
+
];
|
|
31
|
+
if (params.filters?.status) conditions.push(eq(scheduledTriggerInvocations.status, params.filters.status));
|
|
32
|
+
if (params.filters?.from) conditions.push(gte(scheduledTriggerInvocations.scheduledFor, params.filters.from));
|
|
33
|
+
if (params.filters?.to) conditions.push(lte(scheduledTriggerInvocations.scheduledFor, params.filters.to));
|
|
34
|
+
const whereClause = and(...conditions);
|
|
35
|
+
const [data, totalResult] = await Promise.all([db.select().from(scheduledTriggerInvocations).where(whereClause).limit(limit).offset(offset).orderBy(desc(scheduledTriggerInvocations.scheduledFor)), db.select({ count: count() }).from(scheduledTriggerInvocations).where(whereClause)]);
|
|
36
|
+
const total = totalResult[0]?.count || 0;
|
|
37
|
+
return {
|
|
38
|
+
data,
|
|
39
|
+
pagination: {
|
|
40
|
+
page,
|
|
41
|
+
limit,
|
|
42
|
+
total,
|
|
43
|
+
pages: Math.ceil(total / limit)
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* List pending invocations for a trigger, ordered by scheduledFor (earliest first)
|
|
49
|
+
* Used by workflow to get the next invocation to execute
|
|
50
|
+
*/
|
|
51
|
+
const listPendingScheduledTriggerInvocations = (db) => async (params) => {
|
|
52
|
+
const maxLimit = Math.min(params.limit || 10, 100);
|
|
53
|
+
return await db.select().from(scheduledTriggerInvocations).where(and(eq(scheduledTriggerInvocations.tenantId, params.scopes.tenantId), eq(scheduledTriggerInvocations.projectId, params.scopes.projectId), eq(scheduledTriggerInvocations.agentId, params.scopes.agentId), eq(scheduledTriggerInvocations.scheduledTriggerId, params.scheduledTriggerId), eq(scheduledTriggerInvocations.status, "pending"))).orderBy(asc(scheduledTriggerInvocations.scheduledFor)).limit(maxLimit);
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Delete all pending invocations for a trigger
|
|
57
|
+
* Used when cron expression changes or trigger is disabled
|
|
58
|
+
*/
|
|
59
|
+
const deletePendingInvocationsForTrigger = (db) => async (params) => {
|
|
60
|
+
return (await db.delete(scheduledTriggerInvocations).where(and(eq(scheduledTriggerInvocations.tenantId, params.scopes.tenantId), eq(scheduledTriggerInvocations.projectId, params.scopes.projectId), eq(scheduledTriggerInvocations.agentId, params.scopes.agentId), eq(scheduledTriggerInvocations.scheduledTriggerId, params.scheduledTriggerId), eq(scheduledTriggerInvocations.status, "pending"))).returning()).length;
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Create a new scheduled trigger invocation (agent-scoped)
|
|
64
|
+
*/
|
|
65
|
+
const createScheduledTriggerInvocation = (db) => async (params) => {
|
|
66
|
+
return (await db.insert(scheduledTriggerInvocations).values(params).returning())[0];
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* Update scheduled trigger invocation status (agent-scoped)
|
|
70
|
+
*/
|
|
71
|
+
const updateScheduledTriggerInvocationStatus = (db) => async (params) => {
|
|
72
|
+
return (await db.update(scheduledTriggerInvocations).set(params.data).where(and(eq(scheduledTriggerInvocations.tenantId, params.scopes.tenantId), eq(scheduledTriggerInvocations.projectId, params.scopes.projectId), eq(scheduledTriggerInvocations.agentId, params.scopes.agentId), eq(scheduledTriggerInvocations.scheduledTriggerId, params.scheduledTriggerId), eq(scheduledTriggerInvocations.id, params.invocationId))).returning())[0];
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* Mark invocation as running
|
|
76
|
+
*/
|
|
77
|
+
const markScheduledTriggerInvocationRunning = (db) => async (params) => {
|
|
78
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
79
|
+
return (await db.update(scheduledTriggerInvocations).set({
|
|
80
|
+
status: "running",
|
|
81
|
+
startedAt: sql`COALESCE(${scheduledTriggerInvocations.startedAt}, ${now})`
|
|
82
|
+
}).where(and(eq(scheduledTriggerInvocations.tenantId, params.scopes.tenantId), eq(scheduledTriggerInvocations.projectId, params.scopes.projectId), eq(scheduledTriggerInvocations.agentId, params.scopes.agentId), eq(scheduledTriggerInvocations.scheduledTriggerId, params.scheduledTriggerId), eq(scheduledTriggerInvocations.id, params.invocationId))).returning())[0];
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* Mark invocation as completed
|
|
86
|
+
* Note: Will not update if status is already 'cancelled' to respect user cancellation
|
|
87
|
+
*/
|
|
88
|
+
const markScheduledTriggerInvocationCompleted = (db) => async (params) => {
|
|
89
|
+
return (await db.update(scheduledTriggerInvocations).set({
|
|
90
|
+
status: "completed",
|
|
91
|
+
completedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
92
|
+
}).where(and(eq(scheduledTriggerInvocations.tenantId, params.scopes.tenantId), eq(scheduledTriggerInvocations.projectId, params.scopes.projectId), eq(scheduledTriggerInvocations.agentId, params.scopes.agentId), eq(scheduledTriggerInvocations.scheduledTriggerId, params.scheduledTriggerId), eq(scheduledTriggerInvocations.id, params.invocationId), ne(scheduledTriggerInvocations.status, "cancelled"))).returning())[0];
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* Mark invocation as failed
|
|
96
|
+
* Note: Will not update if status is already 'cancelled' to respect user cancellation
|
|
97
|
+
*/
|
|
98
|
+
const markScheduledTriggerInvocationFailed = (db) => async (params) => {
|
|
99
|
+
return (await db.update(scheduledTriggerInvocations).set({
|
|
100
|
+
status: "failed",
|
|
101
|
+
completedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
102
|
+
}).where(and(eq(scheduledTriggerInvocations.tenantId, params.scopes.tenantId), eq(scheduledTriggerInvocations.projectId, params.scopes.projectId), eq(scheduledTriggerInvocations.agentId, params.scopes.agentId), eq(scheduledTriggerInvocations.scheduledTriggerId, params.scheduledTriggerId), eq(scheduledTriggerInvocations.id, params.invocationId), ne(scheduledTriggerInvocations.status, "cancelled"))).returning())[0];
|
|
103
|
+
};
|
|
104
|
+
/**
|
|
105
|
+
* Add a conversation ID to the invocation's conversationIds array
|
|
106
|
+
* Used to track all conversations created during retries
|
|
107
|
+
*/
|
|
108
|
+
const addConversationIdToInvocation = (db) => async (params) => {
|
|
109
|
+
return (await db.update(scheduledTriggerInvocations).set({ conversationIds: sql`${scheduledTriggerInvocations.conversationIds} || ${JSON.stringify([params.conversationId])}::jsonb` }).where(and(eq(scheduledTriggerInvocations.tenantId, params.scopes.tenantId), eq(scheduledTriggerInvocations.projectId, params.scopes.projectId), eq(scheduledTriggerInvocations.agentId, params.scopes.agentId), eq(scheduledTriggerInvocations.scheduledTriggerId, params.scheduledTriggerId), eq(scheduledTriggerInvocations.id, params.invocationId))).returning())[0];
|
|
110
|
+
};
|
|
111
|
+
/**
|
|
112
|
+
* Mark invocation as cancelled
|
|
113
|
+
*/
|
|
114
|
+
const markScheduledTriggerInvocationCancelled = (db) => async (params) => {
|
|
115
|
+
return (await db.update(scheduledTriggerInvocations).set({
|
|
116
|
+
status: "cancelled",
|
|
117
|
+
completedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
118
|
+
}).where(and(eq(scheduledTriggerInvocations.tenantId, params.scopes.tenantId), eq(scheduledTriggerInvocations.projectId, params.scopes.projectId), eq(scheduledTriggerInvocations.agentId, params.scopes.agentId), eq(scheduledTriggerInvocations.scheduledTriggerId, params.scheduledTriggerId), eq(scheduledTriggerInvocations.id, params.invocationId))).returning())[0];
|
|
119
|
+
};
|
|
120
|
+
/**
|
|
121
|
+
* Cancel all pending invocations for a trigger
|
|
122
|
+
* Used when a trigger is deleted
|
|
123
|
+
*/
|
|
124
|
+
const cancelPendingInvocationsForTrigger = (db) => async (params) => {
|
|
125
|
+
return (await db.update(scheduledTriggerInvocations).set({
|
|
126
|
+
status: "cancelled",
|
|
127
|
+
completedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
128
|
+
}).where(and(eq(scheduledTriggerInvocations.tenantId, params.scopes.tenantId), eq(scheduledTriggerInvocations.projectId, params.scopes.projectId), eq(scheduledTriggerInvocations.agentId, params.scopes.agentId), eq(scheduledTriggerInvocations.scheduledTriggerId, params.scheduledTriggerId), inArray(scheduledTriggerInvocations.status, ["pending", "running"]))).returning()).length;
|
|
129
|
+
};
|
|
130
|
+
/**
|
|
131
|
+
* Cancel only PAST pending invocations for a trigger (scheduledFor <= now)
|
|
132
|
+
* Used when a trigger is disabled - keeps future invocations pending
|
|
133
|
+
*/
|
|
134
|
+
const cancelPastPendingInvocationsForTrigger = (db) => async (params) => {
|
|
135
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
136
|
+
return (await db.update(scheduledTriggerInvocations).set({
|
|
137
|
+
status: "cancelled",
|
|
138
|
+
completedAt: now
|
|
139
|
+
}).where(and(eq(scheduledTriggerInvocations.tenantId, params.scopes.tenantId), eq(scheduledTriggerInvocations.projectId, params.scopes.projectId), eq(scheduledTriggerInvocations.agentId, params.scopes.agentId), eq(scheduledTriggerInvocations.scheduledTriggerId, params.scheduledTriggerId), inArray(scheduledTriggerInvocations.status, ["pending", "running"]), lte(scheduledTriggerInvocations.scheduledFor, now))).returning()).length;
|
|
140
|
+
};
|
|
141
|
+
/**
|
|
142
|
+
* Get run info for multiple scheduled triggers in a single query
|
|
143
|
+
* Returns last run (completed/failed) and next pending run for each trigger
|
|
144
|
+
*/
|
|
145
|
+
const getScheduledTriggerRunInfoBatch = (db) => async (params) => {
|
|
146
|
+
if (params.triggerIds.length === 0) return /* @__PURE__ */ new Map();
|
|
147
|
+
const { tenantId, projectId } = params.scopes;
|
|
148
|
+
const allInvocations = await db.select({
|
|
149
|
+
scheduledTriggerId: scheduledTriggerInvocations.scheduledTriggerId,
|
|
150
|
+
status: scheduledTriggerInvocations.status,
|
|
151
|
+
scheduledFor: scheduledTriggerInvocations.scheduledFor,
|
|
152
|
+
completedAt: scheduledTriggerInvocations.completedAt,
|
|
153
|
+
conversationIds: scheduledTriggerInvocations.conversationIds
|
|
154
|
+
}).from(scheduledTriggerInvocations).where(and(eq(scheduledTriggerInvocations.tenantId, tenantId), eq(scheduledTriggerInvocations.projectId, projectId), inArray(scheduledTriggerInvocations.scheduledTriggerId, params.triggerIds.map((t) => t.triggerId)))).orderBy(desc(scheduledTriggerInvocations.completedAt));
|
|
155
|
+
const result = /* @__PURE__ */ new Map();
|
|
156
|
+
for (const trigger of params.triggerIds) result.set(trigger.triggerId, {
|
|
157
|
+
lastRunAt: null,
|
|
158
|
+
lastRunStatus: null,
|
|
159
|
+
lastRunConversationIds: [],
|
|
160
|
+
nextRunAt: null
|
|
161
|
+
});
|
|
162
|
+
for (const inv of allInvocations) {
|
|
163
|
+
const triggerInfo = result.get(inv.scheduledTriggerId);
|
|
164
|
+
if (!triggerInfo) continue;
|
|
165
|
+
if (inv.status === "pending" && !triggerInfo.nextRunAt) triggerInfo.nextRunAt = inv.scheduledFor;
|
|
166
|
+
if ((inv.status === "completed" || inv.status === "failed") && !triggerInfo.lastRunAt) {
|
|
167
|
+
triggerInfo.lastRunAt = inv.completedAt;
|
|
168
|
+
triggerInfo.lastRunStatus = inv.status;
|
|
169
|
+
triggerInfo.lastRunConversationIds = inv.conversationIds || [];
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
return result;
|
|
173
|
+
};
|
|
174
|
+
/**
|
|
175
|
+
* List upcoming invocations across ALL triggers for an agent with pagination
|
|
176
|
+
* Used for the upcoming runs dashboard with full pagination support
|
|
177
|
+
*/
|
|
178
|
+
const listUpcomingInvocationsForAgentPaginated = (db) => async (params) => {
|
|
179
|
+
const page = params.pagination?.page || 1;
|
|
180
|
+
const limit = Math.min(params.pagination?.limit || 20, 100);
|
|
181
|
+
const offset = (page - 1) * limit;
|
|
182
|
+
const statusCondition = params.includeRunning ? inArray(scheduledTriggerInvocations.status, ["pending", "running"]) : eq(scheduledTriggerInvocations.status, "pending");
|
|
183
|
+
const whereClause = and(...[
|
|
184
|
+
eq(scheduledTriggerInvocations.tenantId, params.scopes.tenantId),
|
|
185
|
+
eq(scheduledTriggerInvocations.projectId, params.scopes.projectId),
|
|
186
|
+
eq(scheduledTriggerInvocations.agentId, params.scopes.agentId),
|
|
187
|
+
statusCondition
|
|
188
|
+
]);
|
|
189
|
+
const [data, totalResult] = await Promise.all([db.select().from(scheduledTriggerInvocations).where(whereClause).limit(limit).offset(offset).orderBy(asc(scheduledTriggerInvocations.scheduledFor)), db.select({ count: count() }).from(scheduledTriggerInvocations).where(whereClause)]);
|
|
190
|
+
const total = totalResult[0]?.count || 0;
|
|
191
|
+
return {
|
|
192
|
+
data,
|
|
193
|
+
pagination: {
|
|
194
|
+
page,
|
|
195
|
+
limit,
|
|
196
|
+
total,
|
|
197
|
+
pages: Math.ceil(total / limit)
|
|
198
|
+
}
|
|
199
|
+
};
|
|
200
|
+
};
|
|
201
|
+
/**
|
|
202
|
+
* List all invocations across ALL triggers for a PROJECT with pagination
|
|
203
|
+
* Used for the project-level invocations dashboard
|
|
204
|
+
*/
|
|
205
|
+
const listProjectScheduledTriggerInvocationsPaginated = (db) => async (params) => {
|
|
206
|
+
const page = params.pagination?.page || 1;
|
|
207
|
+
const limit = Math.min(params.pagination?.limit || 20, 100);
|
|
208
|
+
const offset = (page - 1) * limit;
|
|
209
|
+
const conditions = [eq(scheduledTriggerInvocations.tenantId, params.scopes.tenantId), eq(scheduledTriggerInvocations.projectId, params.scopes.projectId)];
|
|
210
|
+
if (params.filters?.status) conditions.push(eq(scheduledTriggerInvocations.status, params.filters.status));
|
|
211
|
+
const whereClause = and(...conditions);
|
|
212
|
+
const [data, totalResult] = await Promise.all([db.select().from(scheduledTriggerInvocations).where(whereClause).limit(limit).offset(offset).orderBy(desc(scheduledTriggerInvocations.createdAt)), db.select({ count: count() }).from(scheduledTriggerInvocations).where(whereClause)]);
|
|
213
|
+
const total = totalResult[0]?.count || 0;
|
|
214
|
+
return {
|
|
215
|
+
data,
|
|
216
|
+
pagination: {
|
|
217
|
+
page,
|
|
218
|
+
limit,
|
|
219
|
+
total,
|
|
220
|
+
pages: Math.ceil(total / limit)
|
|
221
|
+
}
|
|
222
|
+
};
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
//#endregion
|
|
226
|
+
export { addConversationIdToInvocation, cancelPastPendingInvocationsForTrigger, cancelPendingInvocationsForTrigger, createScheduledTriggerInvocation, deletePendingInvocationsForTrigger, getScheduledTriggerInvocationById, getScheduledTriggerInvocationByIdempotencyKey, getScheduledTriggerRunInfoBatch, listPendingScheduledTriggerInvocations, listProjectScheduledTriggerInvocationsPaginated, listScheduledTriggerInvocationsPaginated, listUpcomingInvocationsForAgentPaginated, markScheduledTriggerInvocationCancelled, markScheduledTriggerInvocationCompleted, markScheduledTriggerInvocationFailed, markScheduledTriggerInvocationRunning, updateScheduledTriggerInvocationStatus };
|
|
@@ -13,13 +13,13 @@ declare const createTask: (db: AgentsRunDatabaseClient) => (params: TaskInsert)
|
|
|
13
13
|
createdAt: string;
|
|
14
14
|
updatedAt: string;
|
|
15
15
|
metadata: TaskMetadataConfig | null;
|
|
16
|
+
status: string;
|
|
17
|
+
subAgentId: string;
|
|
16
18
|
ref: {
|
|
17
|
-
type: "
|
|
19
|
+
type: "commit" | "tag" | "branch";
|
|
18
20
|
name: string;
|
|
19
21
|
hash: string;
|
|
20
22
|
} | null;
|
|
21
|
-
status: string;
|
|
22
|
-
subAgentId: string;
|
|
23
23
|
contextId: string;
|
|
24
24
|
}>;
|
|
25
25
|
declare const getTask: (db: AgentsRunDatabaseClient) => (params: {
|
|
@@ -36,7 +36,7 @@ declare const updateTask: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
36
36
|
updatedAt: string;
|
|
37
37
|
contextId: string;
|
|
38
38
|
ref: {
|
|
39
|
-
type: "
|
|
39
|
+
type: "commit" | "tag" | "branch";
|
|
40
40
|
name: string;
|
|
41
41
|
hash: string;
|
|
42
42
|
} | null;
|