@inkeep/agents-core 0.59.2 → 0.59.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/dist/auth/auth-schema.d.ts +108 -108
- package/dist/auth/auth.d.ts +6 -6
- package/dist/auth/permissions.d.ts +13 -13
- package/dist/client-exports.d.ts +2 -2
- package/dist/client-exports.js +2 -2
- package/dist/constants/signoz-queries.d.ts +30 -106
- package/dist/constants/signoz-queries.js +55 -108
- package/dist/data-access/manage/subAgentRelations.d.ts +6 -6
- package/dist/data-access/manage/triggers.d.ts +2 -2
- package/dist/data-access/runtime/apiKeys.d.ts +4 -4
- package/dist/data-access/runtime/apps.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 +3 -3
- package/dist/data-access/runtime/tasks.d.ts +4 -4
- package/dist/data-access/runtime/triggerInvocations.d.ts +1 -1
- package/dist/db/manage/manage-schema.d.ts +453 -453
- package/dist/db/runtime/runtime-schema.d.ts +342 -342
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/utils/error.d.ts +51 -51
- package/dist/utils/index.d.ts +2 -2
- package/dist/utils/index.js +2 -2
- package/dist/utils/schema-conversion.d.ts +27 -1
- package/dist/utils/schema-conversion.js +68 -1
- package/dist/utils/work-app-mcp.js +4 -3
- package/dist/validation/dolt-schemas.d.ts +1 -1
- package/dist/validation/schemas.d.ts +1441 -1441
- package/package.json +1 -1
|
@@ -1,59 +1,55 @@
|
|
|
1
1
|
//#region src/constants/signoz-queries.ts
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
const REQUEST_TYPES = {
|
|
3
|
+
SCALAR: "scalar",
|
|
4
|
+
TIME_SERIES: "time_series",
|
|
5
|
+
RAW: "raw",
|
|
6
|
+
TRACE: "trace"
|
|
7
|
+
};
|
|
8
|
+
const QUERY_TYPES = { BUILDER_QUERY: "builder_query" };
|
|
9
|
+
const FIELD_CONTEXTS = {
|
|
10
|
+
RESOURCE: "resource",
|
|
11
|
+
ATTRIBUTE: "attribute",
|
|
12
|
+
SPAN: "span"
|
|
13
|
+
};
|
|
14
|
+
const FIELD_DATA_TYPES = {
|
|
4
15
|
STRING: "string",
|
|
5
16
|
INT64: "int64",
|
|
6
17
|
FLOAT64: "float64",
|
|
7
18
|
BOOL: "bool"
|
|
8
19
|
};
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
dataType: DATA_TYPES.INT64,
|
|
28
|
-
type: FIELD_TYPES.TAG,
|
|
29
|
-
isColumn: false
|
|
30
|
-
},
|
|
31
|
-
INT64_TAG_COLUMN: {
|
|
32
|
-
dataType: DATA_TYPES.INT64,
|
|
33
|
-
type: FIELD_TYPES.TAG,
|
|
34
|
-
isColumn: true
|
|
35
|
-
},
|
|
36
|
-
FLOAT64_TAG: {
|
|
37
|
-
dataType: DATA_TYPES.FLOAT64,
|
|
38
|
-
type: FIELD_TYPES.TAG,
|
|
39
|
-
isColumn: false
|
|
40
|
-
},
|
|
41
|
-
FLOAT64_TAG_COLUMN: {
|
|
42
|
-
dataType: DATA_TYPES.FLOAT64,
|
|
43
|
-
type: FIELD_TYPES.TAG,
|
|
44
|
-
isColumn: true
|
|
45
|
-
},
|
|
46
|
-
BOOL_TAG: {
|
|
47
|
-
dataType: DATA_TYPES.BOOL,
|
|
48
|
-
type: FIELD_TYPES.TAG,
|
|
49
|
-
isColumn: false
|
|
50
|
-
},
|
|
51
|
-
BOOL_TAG_COLUMN: {
|
|
52
|
-
dataType: DATA_TYPES.BOOL,
|
|
53
|
-
type: FIELD_TYPES.TAG,
|
|
54
|
-
isColumn: true
|
|
55
|
-
}
|
|
20
|
+
const SIGNALS = { TRACES: "traces" };
|
|
21
|
+
const OP_MAP = {
|
|
22
|
+
"=": "=",
|
|
23
|
+
"!=": "!=",
|
|
24
|
+
"<": "<",
|
|
25
|
+
">": ">",
|
|
26
|
+
"<=": "<=",
|
|
27
|
+
">=": ">=",
|
|
28
|
+
like: "LIKE",
|
|
29
|
+
nlike: "NOT LIKE",
|
|
30
|
+
contains: "CONTAINS",
|
|
31
|
+
ncontains: "NOT CONTAINS",
|
|
32
|
+
regex: "REGEX",
|
|
33
|
+
nregex: "NOT REGEX",
|
|
34
|
+
exists: "EXISTS",
|
|
35
|
+
nexists: "NOT EXISTS",
|
|
36
|
+
in: "IN",
|
|
37
|
+
nin: "NOT IN"
|
|
56
38
|
};
|
|
39
|
+
function quoteValue(value) {
|
|
40
|
+
if (typeof value === "string") return `'${value.replace(/'/g, "''")}'`;
|
|
41
|
+
if (typeof value === "boolean") return String(value);
|
|
42
|
+
return String(value);
|
|
43
|
+
}
|
|
44
|
+
function buildFilterExpression(items) {
|
|
45
|
+
return items.map(({ key, op, value }) => {
|
|
46
|
+
const v5op = OP_MAP[op] ?? op;
|
|
47
|
+
if (v5op === "EXISTS" || v5op === "NOT EXISTS") return `${key} ${v5op}`;
|
|
48
|
+
if (v5op === "IN" || v5op === "NOT IN") return `${key} ${v5op} (${(Array.isArray(value) ? value : [value]).map(quoteValue).join(", ")})`;
|
|
49
|
+
if (v5op === "CONTAINS" || v5op === "NOT CONTAINS") return `${key} ${v5op} ${quoteValue(value)}`;
|
|
50
|
+
return `${key} ${v5op} ${quoteValue(value)}`;
|
|
51
|
+
}).join(" AND ");
|
|
52
|
+
}
|
|
57
53
|
/** Query Operators */
|
|
58
54
|
const OPERATORS = {
|
|
59
55
|
EQUALS: "=",
|
|
@@ -64,12 +60,14 @@ const OPERATORS = {
|
|
|
64
60
|
GREATER_THAN_OR_EQUAL: ">=",
|
|
65
61
|
LIKE: "like",
|
|
66
62
|
NOT_LIKE: "nlike",
|
|
63
|
+
CONTAINS: "contains",
|
|
64
|
+
NOT_CONTAINS: "ncontains",
|
|
65
|
+
REGEX: "regex",
|
|
66
|
+
NOT_REGEX: "nregex",
|
|
67
67
|
EXISTS: "exists",
|
|
68
68
|
NOT_EXISTS: "nexists",
|
|
69
69
|
IN: "in",
|
|
70
|
-
NOT_IN: "nin"
|
|
71
|
-
AND: "AND",
|
|
72
|
-
OR: "OR"
|
|
70
|
+
NOT_IN: "nin"
|
|
73
71
|
};
|
|
74
72
|
/** Query Expressions */
|
|
75
73
|
const QUERY_EXPRESSIONS = {
|
|
@@ -82,85 +80,34 @@ const QUERY_EXPRESSIONS = {
|
|
|
82
80
|
PAGE_CONVERSATIONS: "pageConversations",
|
|
83
81
|
TOTAL_CONVERSATIONS: "totalConversations",
|
|
84
82
|
TOOLS: "tools",
|
|
85
|
-
TRANSFERS: "transfers",
|
|
86
|
-
DELEGATIONS: "delegations",
|
|
87
|
-
AI_CALLS: "aiCalls",
|
|
88
|
-
CONTEXT_ERRORS: "contextErrors",
|
|
89
|
-
AGENT_GENERATION_ERRORS: "agentGenerationErrors",
|
|
90
83
|
USER_MESSAGES: "userMessages",
|
|
91
84
|
UNIQUE_AGENTS: "uniqueAgents",
|
|
92
85
|
UNIQUE_MODELS: "uniqueModels",
|
|
93
86
|
TOOL_CALLS: "toolCalls",
|
|
94
|
-
CONTEXT_RESOLUTION: "contextResolution",
|
|
95
|
-
CONTEXT_HANDLE: "contextHandle",
|
|
96
87
|
AI_ASSISTANT_MESSAGES: "aiAssistantMessages",
|
|
97
|
-
AI_GENERATIONS: "aiGenerations",
|
|
98
|
-
AI_STREAMING_TEXT: "aiStreamingText",
|
|
99
88
|
CONTEXT_FETCHERS: "contextFetchers",
|
|
100
89
|
DURATION_SPANS: "durationSpans",
|
|
101
90
|
AGENT_GENERATIONS: "agentGenerations",
|
|
102
91
|
SPANS_WITH_ERRORS: "spansWithErrors",
|
|
103
92
|
ARTIFACT_PROCESSING: "artifactProcessing",
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
93
|
+
TOOL_APPROVALS: "toolApprovals",
|
|
94
|
+
CONTEXT_RESOLUTION_AND_HANDLE: "contextResolutionAndHandle",
|
|
95
|
+
AI_LLM_CALLS: "aiLlmCalls",
|
|
107
96
|
COMPRESSION: "compression",
|
|
108
97
|
MAX_STEPS_REACHED: "maxStepsReached",
|
|
109
98
|
STREAM_LIFETIME_EXCEEDED: "streamLifetimeExceeded"
|
|
110
99
|
};
|
|
111
|
-
/** Query Reduce Operations */
|
|
112
|
-
const REDUCE_OPERATIONS = {
|
|
113
|
-
SUM: "sum",
|
|
114
|
-
MAX: "max",
|
|
115
|
-
MIN: "min",
|
|
116
|
-
AVG: "avg",
|
|
117
|
-
COUNT: "count"
|
|
118
|
-
};
|
|
119
100
|
/** Query Order Directions */
|
|
120
101
|
const ORDER_DIRECTIONS = {
|
|
121
102
|
ASC: "asc",
|
|
122
103
|
DESC: "desc"
|
|
123
104
|
};
|
|
124
|
-
/** Query Types */
|
|
125
|
-
const QUERY_TYPES = {
|
|
126
|
-
BUILDER: "builder",
|
|
127
|
-
CLICKHOUSE: "clickhouse",
|
|
128
|
-
PROMQL: "promql"
|
|
129
|
-
};
|
|
130
|
-
/** Panel Types */
|
|
131
|
-
const PANEL_TYPES = {
|
|
132
|
-
LIST: "list",
|
|
133
|
-
TABLE: "table",
|
|
134
|
-
AGENT: "agent",
|
|
135
|
-
VALUE: "value"
|
|
136
|
-
};
|
|
137
|
-
/** Query Data Sources */
|
|
138
|
-
const DATA_SOURCES = {
|
|
139
|
-
TRACES: "traces",
|
|
140
|
-
METRICS: "metrics",
|
|
141
|
-
LOGS: "logs"
|
|
142
|
-
};
|
|
143
|
-
/** Aggregate Operators */
|
|
144
|
-
const AGGREGATE_OPERATORS = {
|
|
145
|
-
COUNT: "count",
|
|
146
|
-
COUNT_DISTINCT: "count_distinct",
|
|
147
|
-
SUM: "sum",
|
|
148
|
-
AVG: "avg",
|
|
149
|
-
MIN: "min",
|
|
150
|
-
MAX: "max",
|
|
151
|
-
NOOP: "noop"
|
|
152
|
-
};
|
|
153
105
|
/** Query Default Values */
|
|
154
106
|
const QUERY_DEFAULTS = {
|
|
155
|
-
STEP: 60,
|
|
156
107
|
STEP_INTERVAL: 60,
|
|
157
|
-
OFFSET: 0,
|
|
158
108
|
DISABLED: false,
|
|
159
|
-
|
|
160
|
-
LEGEND: "",
|
|
161
|
-
LIMIT_UNLIMITED: 1e4,
|
|
162
|
-
EMPTY_GROUP_BY: []
|
|
109
|
+
LIMIT_UNLIMITED: 1e4
|
|
163
110
|
};
|
|
164
111
|
|
|
165
112
|
//#endregion
|
|
166
|
-
export {
|
|
113
|
+
export { FIELD_CONTEXTS, FIELD_DATA_TYPES, OPERATORS, ORDER_DIRECTIONS, QUERY_DEFAULTS, QUERY_EXPRESSIONS, QUERY_TYPES, REQUEST_TYPES, SIGNALS, buildFilterExpression };
|
|
@@ -15,9 +15,9 @@ declare const getAgentRelationById: (db: AgentsManageDatabaseClient) => (params:
|
|
|
15
15
|
agentId: string;
|
|
16
16
|
createdAt: string;
|
|
17
17
|
updatedAt: string;
|
|
18
|
-
relationType: string | null;
|
|
19
18
|
sourceSubAgentId: string;
|
|
20
19
|
targetSubAgentId: string | null;
|
|
20
|
+
relationType: string | null;
|
|
21
21
|
} | undefined>;
|
|
22
22
|
declare const listAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
|
|
23
23
|
scopes: AgentScopeConfig;
|
|
@@ -50,9 +50,9 @@ declare const getAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
50
50
|
agentId: string;
|
|
51
51
|
createdAt: string;
|
|
52
52
|
updatedAt: string;
|
|
53
|
-
relationType: string | null;
|
|
54
53
|
sourceSubAgentId: string;
|
|
55
54
|
targetSubAgentId: string | null;
|
|
55
|
+
relationType: string | null;
|
|
56
56
|
}[]>;
|
|
57
57
|
declare const getAgentRelationsByAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
58
58
|
scopes: AgentScopeConfig;
|
|
@@ -63,9 +63,9 @@ declare const getAgentRelationsByAgent: (db: AgentsManageDatabaseClient) => (par
|
|
|
63
63
|
agentId: string;
|
|
64
64
|
createdAt: string;
|
|
65
65
|
updatedAt: string;
|
|
66
|
-
relationType: string | null;
|
|
67
66
|
sourceSubAgentId: string;
|
|
68
67
|
targetSubAgentId: string | null;
|
|
68
|
+
relationType: string | null;
|
|
69
69
|
}[]>;
|
|
70
70
|
declare const getAgentRelationsBySource: (db: AgentsManageDatabaseClient) => (params: {
|
|
71
71
|
scopes: AgentScopeConfig;
|
|
@@ -132,9 +132,9 @@ declare const createSubAgentRelation: (db: AgentsManageDatabaseClient) => (param
|
|
|
132
132
|
agentId: string;
|
|
133
133
|
createdAt: string;
|
|
134
134
|
updatedAt: string;
|
|
135
|
-
relationType: string | null;
|
|
136
135
|
sourceSubAgentId: string;
|
|
137
136
|
targetSubAgentId: string | null;
|
|
137
|
+
relationType: string | null;
|
|
138
138
|
}>;
|
|
139
139
|
/**
|
|
140
140
|
* Check if sub-agent relation exists by agent, source, target, and relation type
|
|
@@ -151,9 +151,9 @@ declare const getAgentRelationByParams: (db: AgentsManageDatabaseClient) => (par
|
|
|
151
151
|
agentId: string;
|
|
152
152
|
createdAt: string;
|
|
153
153
|
updatedAt: string;
|
|
154
|
-
relationType: string | null;
|
|
155
154
|
sourceSubAgentId: string;
|
|
156
155
|
targetSubAgentId: string | null;
|
|
156
|
+
relationType: string | null;
|
|
157
157
|
} | undefined>;
|
|
158
158
|
/**
|
|
159
159
|
* Upsert agent relation (create if it doesn't exist, no-op if it does)
|
|
@@ -165,9 +165,9 @@ declare const upsertSubAgentRelation: (db: AgentsManageDatabaseClient) => (param
|
|
|
165
165
|
agentId: string;
|
|
166
166
|
createdAt: string;
|
|
167
167
|
updatedAt: string;
|
|
168
|
-
relationType: string | null;
|
|
169
168
|
sourceSubAgentId: string;
|
|
170
169
|
targetSubAgentId: string | null;
|
|
170
|
+
relationType: string | null;
|
|
171
171
|
}>;
|
|
172
172
|
declare const updateAgentRelation: (db: AgentsManageDatabaseClient) => (params: {
|
|
173
173
|
scopes: AgentScopeConfig;
|
|
@@ -40,13 +40,13 @@ declare const listTriggersPaginated: (db: AgentsManageDatabaseClient) => (params
|
|
|
40
40
|
algorithm: "sha256" | "sha512" | "sha384" | "sha1" | "md5";
|
|
41
41
|
encoding: "hex" | "base64";
|
|
42
42
|
signature: {
|
|
43
|
-
source: "query" | "
|
|
43
|
+
source: "query" | "body" | "header";
|
|
44
44
|
key: string;
|
|
45
45
|
prefix?: string | undefined;
|
|
46
46
|
regex?: string | undefined;
|
|
47
47
|
};
|
|
48
48
|
signedComponents: {
|
|
49
|
-
source: "literal" | "
|
|
49
|
+
source: "literal" | "body" | "header";
|
|
50
50
|
required: boolean;
|
|
51
51
|
key?: string | undefined;
|
|
52
52
|
value?: string | undefined;
|
|
@@ -16,10 +16,10 @@ declare const getApiKeyById: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
16
16
|
createdAt: string;
|
|
17
17
|
updatedAt: string;
|
|
18
18
|
expiresAt: string | null;
|
|
19
|
+
lastUsedAt: string | null;
|
|
19
20
|
publicId: string;
|
|
20
21
|
keyHash: string;
|
|
21
22
|
keyPrefix: string;
|
|
22
|
-
lastUsedAt: string | null;
|
|
23
23
|
} | undefined>;
|
|
24
24
|
declare const getApiKeyByPublicId: (db: AgentsRunDatabaseClient) => (publicId: string) => Promise<{
|
|
25
25
|
id: string;
|
|
@@ -30,10 +30,10 @@ declare const getApiKeyByPublicId: (db: AgentsRunDatabaseClient) => (publicId: s
|
|
|
30
30
|
createdAt: string;
|
|
31
31
|
updatedAt: string;
|
|
32
32
|
expiresAt: string | null;
|
|
33
|
+
lastUsedAt: string | null;
|
|
33
34
|
publicId: string;
|
|
34
35
|
keyHash: string;
|
|
35
36
|
keyPrefix: string;
|
|
36
|
-
lastUsedAt: string | null;
|
|
37
37
|
} | undefined>;
|
|
38
38
|
declare const listApiKeys: (db: AgentsRunDatabaseClient) => (params: {
|
|
39
39
|
scopes: ProjectScopeConfig;
|
|
@@ -47,10 +47,10 @@ declare const listApiKeys: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
47
47
|
createdAt: string;
|
|
48
48
|
updatedAt: string;
|
|
49
49
|
expiresAt: string | null;
|
|
50
|
+
lastUsedAt: string | null;
|
|
50
51
|
publicId: string;
|
|
51
52
|
keyHash: string;
|
|
52
53
|
keyPrefix: string;
|
|
53
|
-
lastUsedAt: string | null;
|
|
54
54
|
}[]>;
|
|
55
55
|
declare const listApiKeysPaginated: (db: AgentsRunDatabaseClient) => (params: {
|
|
56
56
|
scopes: ProjectScopeConfig;
|
|
@@ -74,10 +74,10 @@ declare const createApiKey: (db: AgentsRunDatabaseClient) => (params: ApiKeyInse
|
|
|
74
74
|
createdAt: string;
|
|
75
75
|
updatedAt: string;
|
|
76
76
|
expiresAt: string | null;
|
|
77
|
+
lastUsedAt: string | null;
|
|
77
78
|
publicId: string;
|
|
78
79
|
keyHash: string;
|
|
79
80
|
keyPrefix: string;
|
|
80
|
-
lastUsedAt: string | null;
|
|
81
81
|
}>;
|
|
82
82
|
declare const updateApiKey: (db: AgentsRunDatabaseClient) => (params: {
|
|
83
83
|
scopes: ProjectScopeConfig;
|
|
@@ -23,9 +23,9 @@ declare const getAppById: (db: AgentsRunDatabaseClient) => (id: string) => Promi
|
|
|
23
23
|
type: "api";
|
|
24
24
|
api: Record<string, never>;
|
|
25
25
|
};
|
|
26
|
-
lastUsedAt: string | null;
|
|
27
|
-
defaultProjectId: string | null;
|
|
28
26
|
defaultAgentId: string | null;
|
|
27
|
+
defaultProjectId: string | null;
|
|
28
|
+
lastUsedAt: string | null;
|
|
29
29
|
} | undefined>;
|
|
30
30
|
declare const updateAppLastUsed: (db: AgentsRunDatabaseClient) => (id: string) => Promise<void>;
|
|
31
31
|
declare const getAppByIdForTenant: (db: AgentsRunDatabaseClient) => (params: {
|
|
@@ -70,9 +70,9 @@ declare const createApp: (db: AgentsRunDatabaseClient) => (params: AppInsert) =>
|
|
|
70
70
|
type: "api";
|
|
71
71
|
api: Record<string, never>;
|
|
72
72
|
};
|
|
73
|
-
lastUsedAt: string | null;
|
|
74
|
-
defaultProjectId: string | null;
|
|
75
73
|
defaultAgentId: string | null;
|
|
74
|
+
defaultProjectId: string | null;
|
|
75
|
+
lastUsedAt: string | null;
|
|
76
76
|
}>;
|
|
77
77
|
declare const updateAppForTenant: (db: AgentsRunDatabaseClient) => (params: {
|
|
78
78
|
scopes: TenantScopeConfig;
|
|
@@ -24,12 +24,12 @@ declare const createConversation: (db: AgentsRunDatabaseClient) => (params: Conv
|
|
|
24
24
|
createdAt: string;
|
|
25
25
|
updatedAt: string;
|
|
26
26
|
metadata: ConversationMetadata | null;
|
|
27
|
-
userId: string | null;
|
|
28
27
|
ref: {
|
|
29
|
-
type: "
|
|
28
|
+
type: "commit" | "tag" | "branch";
|
|
30
29
|
name: string;
|
|
31
30
|
hash: string;
|
|
32
31
|
} | null;
|
|
32
|
+
userId: string | null;
|
|
33
33
|
activeSubAgentId: string;
|
|
34
34
|
lastContextResolution: string | null;
|
|
35
35
|
}>;
|
|
@@ -44,7 +44,7 @@ declare const updateConversation: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
44
44
|
agentId: string | null;
|
|
45
45
|
activeSubAgentId: string;
|
|
46
46
|
ref: {
|
|
47
|
-
type: "
|
|
47
|
+
type: "commit" | "tag" | "branch";
|
|
48
48
|
name: string;
|
|
49
49
|
hash: string;
|
|
50
50
|
} | null;
|
|
@@ -70,7 +70,7 @@ declare const updateConversationActiveSubAgent: (db: AgentsRunDatabaseClient) =>
|
|
|
70
70
|
agentId: string | null;
|
|
71
71
|
activeSubAgentId: string;
|
|
72
72
|
ref: {
|
|
73
|
-
type: "
|
|
73
|
+
type: "commit" | "tag" | "branch";
|
|
74
74
|
name: string;
|
|
75
75
|
hash: string;
|
|
76
76
|
} | null;
|
|
@@ -93,12 +93,12 @@ declare const getConversation: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
93
93
|
createdAt: string;
|
|
94
94
|
updatedAt: string;
|
|
95
95
|
metadata: ConversationMetadata | null;
|
|
96
|
-
userId: string | null;
|
|
97
96
|
ref: {
|
|
98
|
-
type: "
|
|
97
|
+
type: "commit" | "tag" | "branch";
|
|
99
98
|
name: string;
|
|
100
99
|
hash: string;
|
|
101
100
|
} | null;
|
|
101
|
+
userId: string | null;
|
|
102
102
|
activeSubAgentId: string;
|
|
103
103
|
lastContextResolution: string | null;
|
|
104
104
|
} | undefined>;
|
|
@@ -108,7 +108,7 @@ declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input:
|
|
|
108
108
|
tenantId: string;
|
|
109
109
|
id: string;
|
|
110
110
|
ref: {
|
|
111
|
-
type: "
|
|
111
|
+
type: "commit" | "tag" | "branch";
|
|
112
112
|
name: string;
|
|
113
113
|
hash: string;
|
|
114
114
|
};
|
|
@@ -129,12 +129,12 @@ declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input:
|
|
|
129
129
|
createdAt: string;
|
|
130
130
|
updatedAt: string;
|
|
131
131
|
metadata: ConversationMetadata | null;
|
|
132
|
-
userId: string | null;
|
|
133
132
|
ref: {
|
|
134
|
-
type: "
|
|
133
|
+
type: "commit" | "tag" | "branch";
|
|
135
134
|
name: string;
|
|
136
135
|
hash: string;
|
|
137
136
|
} | null;
|
|
137
|
+
userId: string | null;
|
|
138
138
|
activeSubAgentId: string;
|
|
139
139
|
lastContextResolution: string | null;
|
|
140
140
|
}>;
|
|
@@ -161,12 +161,12 @@ declare const getActiveAgentForConversation: (db: AgentsRunDatabaseClient) => (p
|
|
|
161
161
|
createdAt: string;
|
|
162
162
|
updatedAt: string;
|
|
163
163
|
metadata: ConversationMetadata | null;
|
|
164
|
-
userId: string | null;
|
|
165
164
|
ref: {
|
|
166
|
-
type: "
|
|
165
|
+
type: "commit" | "tag" | "branch";
|
|
167
166
|
name: string;
|
|
168
167
|
hash: string;
|
|
169
168
|
} | null;
|
|
169
|
+
userId: string | null;
|
|
170
170
|
activeSubAgentId: string;
|
|
171
171
|
lastContextResolution: string | null;
|
|
172
172
|
} | undefined>;
|
|
@@ -18,18 +18,18 @@ declare const getMessageById: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
18
18
|
metadata: MessageMetadata | null;
|
|
19
19
|
content: MessageContent;
|
|
20
20
|
role: string;
|
|
21
|
-
conversationId: string;
|
|
22
21
|
fromSubAgentId: string | null;
|
|
23
22
|
toSubAgentId: string | null;
|
|
24
23
|
fromExternalAgentId: string | null;
|
|
25
24
|
toExternalAgentId: string | null;
|
|
25
|
+
taskId: string | null;
|
|
26
|
+
a2aTaskId: string | null;
|
|
27
|
+
conversationId: string;
|
|
26
28
|
fromTeamAgentId: string | null;
|
|
27
29
|
toTeamAgentId: string | null;
|
|
28
30
|
visibility: string;
|
|
29
31
|
messageType: string;
|
|
30
|
-
taskId: string | null;
|
|
31
32
|
parentMessageId: string | null;
|
|
32
|
-
a2aTaskId: string | null;
|
|
33
33
|
a2aSessionId: string | null;
|
|
34
34
|
} | undefined>;
|
|
35
35
|
declare const listMessages: (db: AgentsRunDatabaseClient) => (params: {
|
|
@@ -152,18 +152,18 @@ declare const createMessage: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
152
152
|
metadata: MessageMetadata | null;
|
|
153
153
|
content: MessageContent;
|
|
154
154
|
role: string;
|
|
155
|
-
conversationId: string;
|
|
156
155
|
fromSubAgentId: string | null;
|
|
157
156
|
toSubAgentId: string | null;
|
|
158
157
|
fromExternalAgentId: string | null;
|
|
159
158
|
toExternalAgentId: string | null;
|
|
159
|
+
taskId: string | null;
|
|
160
|
+
a2aTaskId: string | null;
|
|
161
|
+
conversationId: string;
|
|
160
162
|
fromTeamAgentId: string | null;
|
|
161
163
|
toTeamAgentId: string | null;
|
|
162
164
|
visibility: string;
|
|
163
165
|
messageType: string;
|
|
164
|
-
taskId: string | null;
|
|
165
166
|
parentMessageId: string | null;
|
|
166
|
-
a2aTaskId: string | null;
|
|
167
167
|
a2aSessionId: string | null;
|
|
168
168
|
}>;
|
|
169
169
|
declare const updateMessage: (db: AgentsRunDatabaseClient) => (params: {
|
|
@@ -205,18 +205,18 @@ declare const deleteMessage: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
205
205
|
metadata: MessageMetadata | null;
|
|
206
206
|
content: MessageContent;
|
|
207
207
|
role: string;
|
|
208
|
-
conversationId: string;
|
|
209
208
|
fromSubAgentId: string | null;
|
|
210
209
|
toSubAgentId: string | null;
|
|
211
210
|
fromExternalAgentId: string | null;
|
|
212
211
|
toExternalAgentId: string | null;
|
|
212
|
+
taskId: string | null;
|
|
213
|
+
a2aTaskId: string | null;
|
|
214
|
+
conversationId: string;
|
|
213
215
|
fromTeamAgentId: string | null;
|
|
214
216
|
toTeamAgentId: string | null;
|
|
215
217
|
visibility: string;
|
|
216
218
|
messageType: string;
|
|
217
|
-
taskId: string | null;
|
|
218
219
|
parentMessageId: string | null;
|
|
219
|
-
a2aTaskId: string | null;
|
|
220
220
|
a2aSessionId: string | null;
|
|
221
221
|
}>;
|
|
222
222
|
declare const countMessagesByConversation: (db: AgentsRunDatabaseClient) => (params: {
|
|
@@ -35,7 +35,7 @@ declare const listScheduledTriggerInvocationsPaginated: (db: AgentsRunDatabaseCl
|
|
|
35
35
|
data: {
|
|
36
36
|
scheduledTriggerId: string;
|
|
37
37
|
ref: {
|
|
38
|
-
type: "
|
|
38
|
+
type: "commit" | "tag" | "branch";
|
|
39
39
|
name: string;
|
|
40
40
|
hash: string;
|
|
41
41
|
} | null;
|
|
@@ -189,7 +189,7 @@ declare const listUpcomingInvocationsForAgentPaginated: (db: AgentsRunDatabaseCl
|
|
|
189
189
|
data: {
|
|
190
190
|
scheduledTriggerId: string;
|
|
191
191
|
ref: {
|
|
192
|
-
type: "
|
|
192
|
+
type: "commit" | "tag" | "branch";
|
|
193
193
|
name: string;
|
|
194
194
|
hash: string;
|
|
195
195
|
} | null;
|
|
@@ -228,7 +228,7 @@ declare const listProjectScheduledTriggerInvocationsPaginated: (db: AgentsRunDat
|
|
|
228
228
|
data: {
|
|
229
229
|
scheduledTriggerId: string;
|
|
230
230
|
ref: {
|
|
231
|
-
type: "
|
|
231
|
+
type: "commit" | "tag" | "branch";
|
|
232
232
|
name: string;
|
|
233
233
|
hash: string;
|
|
234
234
|
} | null;
|
|
@@ -14,14 +14,14 @@ declare const createTask: (db: AgentsRunDatabaseClient) => (params: TaskInsert)
|
|
|
14
14
|
createdAt: string;
|
|
15
15
|
updatedAt: string;
|
|
16
16
|
metadata: TaskMetadataConfig | null;
|
|
17
|
-
status: string;
|
|
18
17
|
ref: {
|
|
19
|
-
type: "
|
|
18
|
+
type: "commit" | "tag" | "branch";
|
|
20
19
|
name: string;
|
|
21
20
|
hash: string;
|
|
22
21
|
} | null;
|
|
23
|
-
|
|
22
|
+
status: string;
|
|
24
23
|
subAgentId: string;
|
|
24
|
+
contextId: string;
|
|
25
25
|
}>;
|
|
26
26
|
declare const getTask: (db: AgentsRunDatabaseClient) => (params: {
|
|
27
27
|
id: string;
|
|
@@ -39,7 +39,7 @@ declare const updateTask: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
39
39
|
updatedAt: string;
|
|
40
40
|
contextId: string;
|
|
41
41
|
ref: {
|
|
42
|
-
type: "
|
|
42
|
+
type: "commit" | "tag" | "branch";
|
|
43
43
|
name: string;
|
|
44
44
|
hash: string;
|
|
45
45
|
} | null;
|
|
@@ -29,7 +29,7 @@ declare const listTriggerInvocationsPaginated: (db: AgentsRunDatabaseClient) =>
|
|
|
29
29
|
triggerId: string;
|
|
30
30
|
conversationId: string | null;
|
|
31
31
|
ref: {
|
|
32
|
-
type: "
|
|
32
|
+
type: "commit" | "tag" | "branch";
|
|
33
33
|
name: string;
|
|
34
34
|
hash: string;
|
|
35
35
|
} | null;
|