@rudderhq/server 0.1.0-canary.20 → 0.1.0-canary.21
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/routes/chats.d.ts.map +1 -1
- package/dist/routes/chats.js +15 -0
- package/dist/routes/chats.js.map +1 -1
- package/dist/routes/dashboard.js +1 -1
- package/dist/routes/dashboard.js.map +1 -1
- package/dist/services/chat-assistant.d.ts +1 -1
- package/dist/services/chat-assistant.d.ts.map +1 -1
- package/dist/services/chat-assistant.js +169 -26
- package/dist/services/chat-assistant.js.map +1 -1
- package/dist/services/chats.d.ts +2 -2
- package/dist/services/chats.d.ts.map +1 -1
- package/dist/services/chats.js +21 -2
- package/dist/services/chats.js.map +1 -1
- package/dist/services/runtime-kernel/analytics.d.ts +7 -0
- package/dist/services/runtime-kernel/analytics.d.ts.map +1 -0
- package/dist/services/runtime-kernel/analytics.js +46 -0
- package/dist/services/runtime-kernel/analytics.js.map +1 -0
- package/dist/services/runtime-kernel/common.d.ts +4 -0
- package/dist/services/runtime-kernel/common.d.ts.map +1 -0
- package/dist/services/runtime-kernel/common.js +15 -0
- package/dist/services/runtime-kernel/common.js.map +1 -0
- package/dist/services/runtime-kernel/execution.d.ts +11 -0
- package/dist/services/runtime-kernel/execution.d.ts.map +1 -0
- package/dist/services/runtime-kernel/execution.js +28 -0
- package/dist/services/runtime-kernel/execution.js.map +1 -0
- package/dist/services/runtime-kernel/heartbeat.d.ts +1 -896
- package/dist/services/runtime-kernel/heartbeat.d.ts.map +1 -1
- package/dist/services/runtime-kernel/heartbeat.js +1 -4387
- package/dist/services/runtime-kernel/heartbeat.js.map +1 -1
- package/dist/services/runtime-kernel/orchestrator.d.ts +826 -0
- package/dist/services/runtime-kernel/orchestrator.d.ts.map +1 -0
- package/dist/services/runtime-kernel/orchestrator.js +4044 -0
- package/dist/services/runtime-kernel/orchestrator.js.map +1 -0
- package/dist/services/runtime-kernel/recovery.d.ts +8 -0
- package/dist/services/runtime-kernel/recovery.d.ts.map +1 -0
- package/dist/services/runtime-kernel/recovery.js +101 -0
- package/dist/services/runtime-kernel/recovery.js.map +1 -0
- package/dist/services/runtime-kernel/run-state.d.ts +45 -0
- package/dist/services/runtime-kernel/run-state.d.ts.map +1 -0
- package/dist/services/runtime-kernel/run-state.js +45 -0
- package/dist/services/runtime-kernel/run-state.js.map +1 -0
- package/dist/services/runtime-kernel/session-policy.d.ts +42 -0
- package/dist/services/runtime-kernel/session-policy.d.ts.map +1 -0
- package/dist/services/runtime-kernel/session-policy.js +116 -0
- package/dist/services/runtime-kernel/session-policy.js.map +1 -0
- package/dist/services/runtime-kernel/types.d.ts +13 -0
- package/dist/services/runtime-kernel/types.d.ts.map +1 -0
- package/dist/services/runtime-kernel/types.js +2 -0
- package/dist/services/runtime-kernel/types.js.map +1 -0
- package/dist/services/runtime-kernel/wakeup-queue.d.ts +9 -0
- package/dist/services/runtime-kernel/wakeup-queue.d.ts.map +1 -0
- package/dist/services/runtime-kernel/wakeup-queue.js +19 -0
- package/dist/services/runtime-kernel/wakeup-queue.js.map +1 -0
- package/package.json +13 -13
- package/ui-dist/assets/{_basePickBy-8ndlG73I.js → _basePickBy-DAU2OOE3.js} +1 -1
- package/ui-dist/assets/{_baseUniq-CdTmd3cs.js → _baseUniq-BQLJfIXV.js} +1 -1
- package/ui-dist/assets/{arc-Dg3IWr1w.js → arc-B2UTEkTB.js} +1 -1
- package/ui-dist/assets/{architectureDiagram-2XIMDMQ5-CL4FzMl4.js → architectureDiagram-2XIMDMQ5-DicHsSOp.js} +1 -1
- package/ui-dist/assets/{blockDiagram-WCTKOSBZ-CPAHP8wf.js → blockDiagram-WCTKOSBZ-tbkC8ZCs.js} +1 -1
- package/ui-dist/assets/{c4Diagram-IC4MRINW-D9LRotnb.js → c4Diagram-IC4MRINW-pPT_Xw2l.js} +1 -1
- package/ui-dist/assets/channel-D8qCsVGC.js +1 -0
- package/ui-dist/assets/{chunk-4BX2VUAB-CXYF-alC.js → chunk-4BX2VUAB-vX_EgGXp.js} +1 -1
- package/ui-dist/assets/{chunk-55IACEB6-_6gEPxwb.js → chunk-55IACEB6-DUyGlyCg.js} +1 -1
- package/ui-dist/assets/{chunk-FMBD7UC4-DBztD7i6.js → chunk-FMBD7UC4-DPCYqV54.js} +1 -1
- package/ui-dist/assets/{chunk-JSJVCQXG-D_JITQMs.js → chunk-JSJVCQXG-CRqpXPJG.js} +1 -1
- package/ui-dist/assets/{chunk-KX2RTZJC-CDYC8R4t.js → chunk-KX2RTZJC-BWaSxc23.js} +1 -1
- package/ui-dist/assets/{chunk-NQ4KR5QH-CuyjnaxX.js → chunk-NQ4KR5QH-BCIl9FTX.js} +1 -1
- package/ui-dist/assets/{chunk-QZHKN3VN-BcmldUA2.js → chunk-QZHKN3VN-BgTqyV62.js} +1 -1
- package/ui-dist/assets/{chunk-WL4C6EOR-Csc-gUp3.js → chunk-WL4C6EOR-COlN9kxA.js} +1 -1
- package/ui-dist/assets/classDiagram-VBA2DB6C-Cm8BRWIa.js +1 -0
- package/ui-dist/assets/classDiagram-v2-RAHNMMFH-Cm8BRWIa.js +1 -0
- package/ui-dist/assets/clone-B0pIfwDy.js +1 -0
- package/ui-dist/assets/{cose-bilkent-S5V4N54A-AQtv05lK.js → cose-bilkent-S5V4N54A-Bbgtq4rD.js} +1 -1
- package/ui-dist/assets/{dagre-KLK3FWXG-qsyPc9zE.js → dagre-KLK3FWXG-DgUnjcLS.js} +1 -1
- package/ui-dist/assets/{diagram-E7M64L7V-D1y3CfX-.js → diagram-E7M64L7V-DC3DIXbu.js} +1 -1
- package/ui-dist/assets/{diagram-IFDJBPK2-CXddZqNx.js → diagram-IFDJBPK2-qv7Ij_rH.js} +1 -1
- package/ui-dist/assets/{diagram-P4PSJMXO-bH_AOwhx.js → diagram-P4PSJMXO-Dw2WzhiN.js} +1 -1
- package/ui-dist/assets/{erDiagram-INFDFZHY-Dm0NQ5o9.js → erDiagram-INFDFZHY-BV5s3J3D.js} +1 -1
- package/ui-dist/assets/{flowDiagram-PKNHOUZH-Bw0gdk4S.js → flowDiagram-PKNHOUZH-kmPgde9o.js} +1 -1
- package/ui-dist/assets/{ganttDiagram-A5KZAMGK-DDg3IOSh.js → ganttDiagram-A5KZAMGK-C2hkJ2Th.js} +1 -1
- package/ui-dist/assets/{gitGraphDiagram-K3NZZRJ6-COVQ396E.js → gitGraphDiagram-K3NZZRJ6-K5e1NgIt.js} +1 -1
- package/ui-dist/assets/{graph-bwl15Qpv.js → graph-Cna3FnWY.js} +1 -1
- package/ui-dist/assets/{index-CGKSC15M.js → index-6luhu7W5.js} +1 -1
- package/ui-dist/assets/{index-D7r_XRYD.js → index-B1iX9NWL.js} +310 -309
- package/ui-dist/assets/{index-B4zUm3gQ.js → index-BdLts2oZ.js} +1 -1
- package/ui-dist/assets/{index-9o_SvY62.js → index-CBKnHGYE.js} +1 -1
- package/ui-dist/assets/{index-BFOm-l2T.js → index-CDtBE3Ga.js} +1 -1
- package/ui-dist/assets/{index-Cej9C4tf.js → index-CFGJHREd.js} +1 -1
- package/ui-dist/assets/{index-DxMAOmox.js → index-CTpC-gpc.js} +1 -1
- package/ui-dist/assets/{index-BQMKQUTE.js → index-CVAmlnRr.js} +1 -1
- package/ui-dist/assets/{index-DTsttLIs.js → index-CWbJ-pcg.js} +1 -1
- package/ui-dist/assets/{index-DBLGXUKf.js → index-ChU0nSCq.js} +1 -1
- package/ui-dist/assets/{index-C_bGxC5L.js → index-CypGJ__o.js} +1 -1
- package/ui-dist/assets/{index-CUPVi6ek.js → index-D-Fe0jjS.js} +1 -1
- package/ui-dist/assets/{index-J1ga5P92.js → index-D8aBm25c.js} +1 -1
- package/ui-dist/assets/index-D9uKiQrM.css +1 -0
- package/ui-dist/assets/{index-WRD2om5d.js → index-DD0ggVK_.js} +1 -1
- package/ui-dist/assets/{index-CC_A8kzq.js → index-DJecNMv2.js} +1 -1
- package/ui-dist/assets/{index-RhFrB2n9.js → index-DKSfpiAJ.js} +1 -1
- package/ui-dist/assets/{index-stSzYVUi.js → index-Dgj2bRIV.js} +1 -1
- package/ui-dist/assets/{index-DozeI_ea.js → index-DsydT3bX.js} +1 -1
- package/ui-dist/assets/{index-B0lMF-6n.js → index-U7gGuiCe.js} +1 -1
- package/ui-dist/assets/{index--J4W4di0.js → index-aL5hFrtS.js} +1 -1
- package/ui-dist/assets/{index-dewwxxca.js → index-o_iEnzyw.js} +1 -1
- package/ui-dist/assets/{index-bWQpv8XB.js → index-qUFX4kXb.js} +1 -1
- package/ui-dist/assets/{index-DSuhUSKb.js → index-sV3mB3fg.js} +1 -1
- package/ui-dist/assets/{infoDiagram-LFFYTUFH-DjdShR-K.js → infoDiagram-LFFYTUFH-BiQ6_Z3F.js} +1 -1
- package/ui-dist/assets/{ishikawaDiagram-PHBUUO56-DXZf7GwF.js → ishikawaDiagram-PHBUUO56-C_WqRu1B.js} +1 -1
- package/ui-dist/assets/{journeyDiagram-4ABVD52K-70bcudq0.js → journeyDiagram-4ABVD52K-BIpPercT.js} +1 -1
- package/ui-dist/assets/{kanban-definition-K7BYSVSG-BCdouCZ4.js → kanban-definition-K7BYSVSG-DaFD_JyB.js} +1 -1
- package/ui-dist/assets/{layout-Mhq2HNeN.js → layout-Dj_oike0.js} +1 -1
- package/ui-dist/assets/{linear-6jA82SeB.js → linear-tnVt1ugU.js} +1 -1
- package/ui-dist/assets/{mermaid.core-Bytv0x0U.js → mermaid.core-DflBh7Hv.js} +4 -4
- package/ui-dist/assets/{mindmap-definition-YRQLILUH-DK1H9m3i.js → mindmap-definition-YRQLILUH-C3H-gFSh.js} +1 -1
- package/ui-dist/assets/{pieDiagram-SKSYHLDU-DOIMV3g5.js → pieDiagram-SKSYHLDU-DH53odzN.js} +1 -1
- package/ui-dist/assets/{quadrantDiagram-337W2JSQ-DTfxtKqh.js → quadrantDiagram-337W2JSQ-DCn4Dric.js} +1 -1
- package/ui-dist/assets/{requirementDiagram-Z7DCOOCP-DjXfzNQ_.js → requirementDiagram-Z7DCOOCP-KypOfBcY.js} +1 -1
- package/ui-dist/assets/{sankeyDiagram-WA2Y5GQK-DCIL8YBw.js → sankeyDiagram-WA2Y5GQK-DEmi0ryr.js} +1 -1
- package/ui-dist/assets/{sequenceDiagram-2WXFIKYE-DB7gJ2NE.js → sequenceDiagram-2WXFIKYE-sW6ojsVG.js} +1 -1
- package/ui-dist/assets/{stateDiagram-RAJIS63D-ByB0ZTgH.js → stateDiagram-RAJIS63D-CmrX9BEC.js} +1 -1
- package/ui-dist/assets/stateDiagram-v2-FVOUBMTO-DJuCnZbk.js +1 -0
- package/ui-dist/assets/{timeline-definition-YZTLITO2-BgCHIIAF.js → timeline-definition-YZTLITO2-CzJ5Y8YU.js} +1 -1
- package/ui-dist/assets/{treemap-KZPCXAKY-CN3Dkmq8.js → treemap-KZPCXAKY-BwUNliTA.js} +1 -1
- package/ui-dist/assets/{vennDiagram-LZ73GAT5-DoESURJl.js → vennDiagram-LZ73GAT5-5A50aIn1.js} +1 -1
- package/ui-dist/assets/{xychartDiagram-JWTSCODW-CRDlcdUc.js → xychartDiagram-JWTSCODW-D9qTFskE.js} +1 -1
- package/ui-dist/index.html +2 -2
- package/ui-dist/assets/channel-W_reUgPl.js +0 -1
- package/ui-dist/assets/classDiagram-VBA2DB6C-Z8KHPV3I.js +0 -1
- package/ui-dist/assets/classDiagram-v2-RAHNMMFH-Z8KHPV3I.js +0 -1
- package/ui-dist/assets/clone-C8TVMdfS.js +0 -1
- package/ui-dist/assets/index-C8zmIhnp.css +0 -1
- package/ui-dist/assets/stateDiagram-v2-FVOUBMTO-DHKGN5HJ.js +0 -1
|
@@ -1,897 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import type { AgentSkillAnalytics, ExecutionObservabilitySurface } from "@rudderhq/shared";
|
|
3
|
-
import { agents } from "@rudderhq/db";
|
|
4
|
-
import type { AgentRuntimeInvocationMeta, AgentRuntimeSessionCodec } from "../../agent-runtimes/index.js";
|
|
5
|
-
import { type BudgetEnforcementScope } from "../budgets.js";
|
|
6
|
-
import { type ResolvedWorkspaceForRun } from "../agent-run-context.js";
|
|
7
|
-
import { type SessionCompactionPolicy } from "@rudderhq/agent-runtime-utils";
|
|
8
|
-
export { prioritizeProjectWorkspaceCandidatesForRun, type ResolvedWorkspaceForRun } from "../agent-run-context.js";
|
|
9
|
-
interface WakeupOptions {
|
|
10
|
-
source?: "timer" | "assignment" | "on_demand" | "automation";
|
|
11
|
-
triggerDetail?: "manual" | "ping" | "callback" | "system";
|
|
12
|
-
reason?: string | null;
|
|
13
|
-
payload?: Record<string, unknown> | null;
|
|
14
|
-
idempotencyKey?: string | null;
|
|
15
|
-
requestedByActorType?: "user" | "agent" | "system";
|
|
16
|
-
requestedByActorId?: string | null;
|
|
17
|
-
contextSnapshot?: Record<string, unknown>;
|
|
18
|
-
existingWakeupRequestId?: string | null;
|
|
19
|
-
}
|
|
20
|
-
export declare function resolveHeartbeatObservabilitySurface(contextSnapshot: Record<string, unknown> | null | undefined): ExecutionObservabilitySurface;
|
|
21
|
-
export declare function buildIssueRunTraceName(input: {
|
|
22
|
-
issueTitle?: string | null;
|
|
23
|
-
issueId: string;
|
|
24
|
-
}): string;
|
|
25
|
-
export declare function buildHeartbeatRuntimeTraceMetadata(input: {
|
|
26
|
-
runtimeConfig: Record<string, unknown>;
|
|
27
|
-
runtimeSkills: Array<{
|
|
28
|
-
key: string;
|
|
29
|
-
runtimeName: string;
|
|
30
|
-
name: string | null;
|
|
31
|
-
description: string | null;
|
|
32
|
-
}>;
|
|
33
|
-
adapterMeta?: Pick<AgentRuntimeInvocationMeta, "agentRuntimeType" | "command" | "cwd" | "commandNotes" | "promptMetrics"> | null;
|
|
34
|
-
}): {
|
|
35
|
-
runtimeAgentType?: string | undefined;
|
|
36
|
-
runtimeCommand?: string | undefined;
|
|
37
|
-
runtimeCwd?: string | null | undefined;
|
|
38
|
-
runtimeCommandNotes?: string[] | undefined;
|
|
39
|
-
runtimePromptMetrics?: Record<string, number> | null | undefined;
|
|
40
|
-
loadedSkillCount: number;
|
|
41
|
-
loadedSkillKeys: string[];
|
|
42
|
-
loadedSkills: {
|
|
43
|
-
key: string;
|
|
44
|
-
runtimeName: string | null;
|
|
45
|
-
name: string | null;
|
|
46
|
-
description: string | null;
|
|
47
|
-
}[];
|
|
48
|
-
instructionsConfigured: boolean;
|
|
49
|
-
instructionsFilePath: string | null;
|
|
50
|
-
};
|
|
51
|
-
export declare function buildHeartbeatAdapterInvokePayload(input: {
|
|
52
|
-
meta: AgentRuntimeInvocationMeta;
|
|
53
|
-
runtimeSkills: Array<{
|
|
54
|
-
key: string;
|
|
55
|
-
runtimeName: string;
|
|
56
|
-
name: string | null;
|
|
57
|
-
description: string | null;
|
|
58
|
-
}>;
|
|
59
|
-
}): Record<string, unknown>;
|
|
60
|
-
type ResumeSessionRow = {
|
|
61
|
-
sessionParamsJson: Record<string, unknown> | null;
|
|
62
|
-
sessionDisplayId: string | null;
|
|
63
|
-
lastRunId: string | null;
|
|
64
|
-
};
|
|
65
|
-
export declare function buildExplicitResumeSessionOverride(input: {
|
|
66
|
-
resumeFromRunId: string;
|
|
67
|
-
resumeRunSessionIdBefore: string | null;
|
|
68
|
-
resumeRunSessionIdAfter: string | null;
|
|
69
|
-
taskSession: ResumeSessionRow | null;
|
|
70
|
-
sessionCodec: AgentRuntimeSessionCodec;
|
|
71
|
-
}): {
|
|
72
|
-
sessionDisplayId: string | null;
|
|
73
|
-
sessionParams: Record<string, unknown> | null;
|
|
74
|
-
} | null;
|
|
75
|
-
export declare function parseSessionCompactionPolicy(agent: typeof agents.$inferSelect): SessionCompactionPolicy;
|
|
76
|
-
export declare function resolveRuntimeSessionParamsForWorkspace(input: {
|
|
77
|
-
orgId: string;
|
|
78
|
-
agent: {
|
|
79
|
-
id: string;
|
|
80
|
-
name?: string | null;
|
|
81
|
-
workspaceKey?: string | null;
|
|
82
|
-
};
|
|
83
|
-
previousSessionParams: Record<string, unknown> | null;
|
|
84
|
-
resolvedWorkspace: ResolvedWorkspaceForRun;
|
|
85
|
-
}): {
|
|
86
|
-
sessionParams: Record<string, unknown> | null;
|
|
87
|
-
warning: string | null;
|
|
88
|
-
};
|
|
89
|
-
export declare function shouldResetTaskSessionForWake(contextSnapshot: Record<string, unknown> | null | undefined): boolean;
|
|
90
|
-
export declare function formatRuntimeWorkspaceWarningLog(warning: string): {
|
|
91
|
-
stream: "stdout";
|
|
92
|
-
chunk: string;
|
|
93
|
-
};
|
|
94
|
-
export declare function heartbeatService(db: Db): {
|
|
95
|
-
list: (orgId: string, agentId?: string, limit?: number) => Promise<{
|
|
96
|
-
resultJson: Record<string, unknown> | null;
|
|
97
|
-
id: string;
|
|
98
|
-
orgId: string;
|
|
99
|
-
agentId: string;
|
|
100
|
-
invocationSource: string;
|
|
101
|
-
triggerDetail: string | null;
|
|
102
|
-
status: string;
|
|
103
|
-
startedAt: Date | null;
|
|
104
|
-
finishedAt: Date | null;
|
|
105
|
-
error: string | null;
|
|
106
|
-
wakeupRequestId: string | null;
|
|
107
|
-
exitCode: number | null;
|
|
108
|
-
signal: string | null;
|
|
109
|
-
usageJson: Record<string, unknown> | null;
|
|
110
|
-
sessionIdBefore: string | null;
|
|
111
|
-
sessionIdAfter: string | null;
|
|
112
|
-
logStore: string | null;
|
|
113
|
-
logRef: string | null;
|
|
114
|
-
logBytes: number | null;
|
|
115
|
-
logSha256: string | null;
|
|
116
|
-
logCompressed: boolean;
|
|
117
|
-
stdoutExcerpt: string | null;
|
|
118
|
-
stderrExcerpt: string | null;
|
|
119
|
-
errorCode: string | null;
|
|
120
|
-
externalRunId: string | null;
|
|
121
|
-
processPid: number | null;
|
|
122
|
-
processStartedAt: Date | null;
|
|
123
|
-
retryOfRunId: string | null;
|
|
124
|
-
processLossRetryCount: number;
|
|
125
|
-
contextSnapshot: Record<string, unknown> | null;
|
|
126
|
-
createdAt: Date;
|
|
127
|
-
updatedAt: Date;
|
|
128
|
-
}[]>;
|
|
129
|
-
getAgentSkillAnalytics: (agentId: string, opts?: {
|
|
130
|
-
windowDays?: number;
|
|
131
|
-
now?: Date;
|
|
132
|
-
startDate?: string;
|
|
133
|
-
endDate?: string;
|
|
134
|
-
}) => Promise<AgentSkillAnalytics>;
|
|
135
|
-
getOrganizationSkillAnalytics: (orgId: string, opts?: {
|
|
136
|
-
windowDays?: number;
|
|
137
|
-
now?: Date;
|
|
138
|
-
startDate?: string;
|
|
139
|
-
endDate?: string;
|
|
140
|
-
}) => Promise<AgentSkillAnalytics>;
|
|
141
|
-
getRun: (runId: string) => Promise<{
|
|
142
|
-
error: string | null;
|
|
143
|
-
id: string;
|
|
144
|
-
status: string;
|
|
145
|
-
updatedAt: Date;
|
|
146
|
-
orgId: string;
|
|
147
|
-
startedAt: Date | null;
|
|
148
|
-
createdAt: Date;
|
|
149
|
-
triggerDetail: string | null;
|
|
150
|
-
agentId: string;
|
|
151
|
-
finishedAt: Date | null;
|
|
152
|
-
invocationSource: string;
|
|
153
|
-
wakeupRequestId: string | null;
|
|
154
|
-
exitCode: number | null;
|
|
155
|
-
signal: string | null;
|
|
156
|
-
usageJson: Record<string, unknown> | null;
|
|
157
|
-
resultJson: Record<string, unknown> | null;
|
|
158
|
-
sessionIdBefore: string | null;
|
|
159
|
-
sessionIdAfter: string | null;
|
|
160
|
-
logStore: string | null;
|
|
161
|
-
logRef: string | null;
|
|
162
|
-
logBytes: number | null;
|
|
163
|
-
logSha256: string | null;
|
|
164
|
-
logCompressed: boolean;
|
|
165
|
-
stdoutExcerpt: string | null;
|
|
166
|
-
stderrExcerpt: string | null;
|
|
167
|
-
errorCode: string | null;
|
|
168
|
-
externalRunId: string | null;
|
|
169
|
-
processPid: number | null;
|
|
170
|
-
processStartedAt: Date | null;
|
|
171
|
-
retryOfRunId: string | null;
|
|
172
|
-
processLossRetryCount: number;
|
|
173
|
-
contextSnapshot: Record<string, unknown> | null;
|
|
174
|
-
}>;
|
|
175
|
-
getRuntimeState: (agentId: string) => Promise<{
|
|
176
|
-
sessionDisplayId: string | null;
|
|
177
|
-
sessionParamsJson: Record<string, unknown> | null;
|
|
178
|
-
updatedAt: Date;
|
|
179
|
-
orgId: string;
|
|
180
|
-
createdAt: Date;
|
|
181
|
-
agentRuntimeType: string;
|
|
182
|
-
agentId: string;
|
|
183
|
-
lastError: string | null;
|
|
184
|
-
sessionId: string | null;
|
|
185
|
-
stateJson: Record<string, unknown>;
|
|
186
|
-
lastRunId: string | null;
|
|
187
|
-
lastRunStatus: string | null;
|
|
188
|
-
totalInputTokens: number;
|
|
189
|
-
totalOutputTokens: number;
|
|
190
|
-
totalCachedInputTokens: number;
|
|
191
|
-
totalCostCents: number;
|
|
192
|
-
} | null>;
|
|
193
|
-
listTaskSessions: (agentId: string) => Promise<{
|
|
194
|
-
id: string;
|
|
195
|
-
updatedAt: Date;
|
|
196
|
-
orgId: string;
|
|
197
|
-
createdAt: Date;
|
|
198
|
-
agentRuntimeType: string;
|
|
199
|
-
taskKey: string;
|
|
200
|
-
agentId: string;
|
|
201
|
-
lastError: string | null;
|
|
202
|
-
lastRunId: string | null;
|
|
203
|
-
sessionParamsJson: Record<string, unknown> | null;
|
|
204
|
-
sessionDisplayId: string | null;
|
|
205
|
-
}[]>;
|
|
206
|
-
resetRuntimeSession: (agentId: string, opts?: {
|
|
207
|
-
taskKey?: string | null;
|
|
208
|
-
}) => Promise<{
|
|
209
|
-
sessionDisplayId: null;
|
|
210
|
-
sessionParamsJson: null;
|
|
211
|
-
clearedTaskSessions: number;
|
|
212
|
-
agentId: string;
|
|
213
|
-
orgId: string;
|
|
214
|
-
agentRuntimeType: string;
|
|
215
|
-
sessionId: string | null;
|
|
216
|
-
stateJson: Record<string, unknown>;
|
|
217
|
-
lastRunId: string | null;
|
|
218
|
-
lastRunStatus: string | null;
|
|
219
|
-
totalInputTokens: number;
|
|
220
|
-
totalOutputTokens: number;
|
|
221
|
-
totalCachedInputTokens: number;
|
|
222
|
-
totalCostCents: number;
|
|
223
|
-
lastError: string | null;
|
|
224
|
-
createdAt: Date;
|
|
225
|
-
updatedAt: Date;
|
|
226
|
-
} | null>;
|
|
227
|
-
listEvents: (runId: string, afterSeq?: number, limit?: number) => Omit<import("drizzle-orm/pg-core").PgSelectBase<"heartbeat_run_events", {
|
|
228
|
-
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
229
|
-
name: "id";
|
|
230
|
-
tableName: "heartbeat_run_events";
|
|
231
|
-
dataType: "number";
|
|
232
|
-
columnType: "PgBigSerial53";
|
|
233
|
-
data: number;
|
|
234
|
-
driverParam: number;
|
|
235
|
-
notNull: true;
|
|
236
|
-
hasDefault: true;
|
|
237
|
-
isPrimaryKey: true;
|
|
238
|
-
isAutoincrement: false;
|
|
239
|
-
hasRuntimeDefault: false;
|
|
240
|
-
enumValues: undefined;
|
|
241
|
-
baseColumn: never;
|
|
242
|
-
identity: undefined;
|
|
243
|
-
generated: undefined;
|
|
244
|
-
}, {}, {}>;
|
|
245
|
-
orgId: import("drizzle-orm/pg-core").PgColumn<{
|
|
246
|
-
name: "org_id";
|
|
247
|
-
tableName: "heartbeat_run_events";
|
|
248
|
-
dataType: "string";
|
|
249
|
-
columnType: "PgUUID";
|
|
250
|
-
data: string;
|
|
251
|
-
driverParam: string;
|
|
252
|
-
notNull: true;
|
|
253
|
-
hasDefault: false;
|
|
254
|
-
isPrimaryKey: false;
|
|
255
|
-
isAutoincrement: false;
|
|
256
|
-
hasRuntimeDefault: false;
|
|
257
|
-
enumValues: undefined;
|
|
258
|
-
baseColumn: never;
|
|
259
|
-
identity: undefined;
|
|
260
|
-
generated: undefined;
|
|
261
|
-
}, {}, {}>;
|
|
262
|
-
runId: import("drizzle-orm/pg-core").PgColumn<{
|
|
263
|
-
name: "run_id";
|
|
264
|
-
tableName: "heartbeat_run_events";
|
|
265
|
-
dataType: "string";
|
|
266
|
-
columnType: "PgUUID";
|
|
267
|
-
data: string;
|
|
268
|
-
driverParam: string;
|
|
269
|
-
notNull: true;
|
|
270
|
-
hasDefault: false;
|
|
271
|
-
isPrimaryKey: false;
|
|
272
|
-
isAutoincrement: false;
|
|
273
|
-
hasRuntimeDefault: false;
|
|
274
|
-
enumValues: undefined;
|
|
275
|
-
baseColumn: never;
|
|
276
|
-
identity: undefined;
|
|
277
|
-
generated: undefined;
|
|
278
|
-
}, {}, {}>;
|
|
279
|
-
agentId: import("drizzle-orm/pg-core").PgColumn<{
|
|
280
|
-
name: "agent_id";
|
|
281
|
-
tableName: "heartbeat_run_events";
|
|
282
|
-
dataType: "string";
|
|
283
|
-
columnType: "PgUUID";
|
|
284
|
-
data: string;
|
|
285
|
-
driverParam: string;
|
|
286
|
-
notNull: true;
|
|
287
|
-
hasDefault: false;
|
|
288
|
-
isPrimaryKey: false;
|
|
289
|
-
isAutoincrement: false;
|
|
290
|
-
hasRuntimeDefault: false;
|
|
291
|
-
enumValues: undefined;
|
|
292
|
-
baseColumn: never;
|
|
293
|
-
identity: undefined;
|
|
294
|
-
generated: undefined;
|
|
295
|
-
}, {}, {}>;
|
|
296
|
-
seq: import("drizzle-orm/pg-core").PgColumn<{
|
|
297
|
-
name: "seq";
|
|
298
|
-
tableName: "heartbeat_run_events";
|
|
299
|
-
dataType: "number";
|
|
300
|
-
columnType: "PgInteger";
|
|
301
|
-
data: number;
|
|
302
|
-
driverParam: string | number;
|
|
303
|
-
notNull: true;
|
|
304
|
-
hasDefault: false;
|
|
305
|
-
isPrimaryKey: false;
|
|
306
|
-
isAutoincrement: false;
|
|
307
|
-
hasRuntimeDefault: false;
|
|
308
|
-
enumValues: undefined;
|
|
309
|
-
baseColumn: never;
|
|
310
|
-
identity: undefined;
|
|
311
|
-
generated: undefined;
|
|
312
|
-
}, {}, {}>;
|
|
313
|
-
eventType: import("drizzle-orm/pg-core").PgColumn<{
|
|
314
|
-
name: "event_type";
|
|
315
|
-
tableName: "heartbeat_run_events";
|
|
316
|
-
dataType: "string";
|
|
317
|
-
columnType: "PgText";
|
|
318
|
-
data: string;
|
|
319
|
-
driverParam: string;
|
|
320
|
-
notNull: true;
|
|
321
|
-
hasDefault: false;
|
|
322
|
-
isPrimaryKey: false;
|
|
323
|
-
isAutoincrement: false;
|
|
324
|
-
hasRuntimeDefault: false;
|
|
325
|
-
enumValues: [string, ...string[]];
|
|
326
|
-
baseColumn: never;
|
|
327
|
-
identity: undefined;
|
|
328
|
-
generated: undefined;
|
|
329
|
-
}, {}, {}>;
|
|
330
|
-
stream: import("drizzle-orm/pg-core").PgColumn<{
|
|
331
|
-
name: "stream";
|
|
332
|
-
tableName: "heartbeat_run_events";
|
|
333
|
-
dataType: "string";
|
|
334
|
-
columnType: "PgText";
|
|
335
|
-
data: string;
|
|
336
|
-
driverParam: string;
|
|
337
|
-
notNull: false;
|
|
338
|
-
hasDefault: false;
|
|
339
|
-
isPrimaryKey: false;
|
|
340
|
-
isAutoincrement: false;
|
|
341
|
-
hasRuntimeDefault: false;
|
|
342
|
-
enumValues: [string, ...string[]];
|
|
343
|
-
baseColumn: never;
|
|
344
|
-
identity: undefined;
|
|
345
|
-
generated: undefined;
|
|
346
|
-
}, {}, {}>;
|
|
347
|
-
level: import("drizzle-orm/pg-core").PgColumn<{
|
|
348
|
-
name: "level";
|
|
349
|
-
tableName: "heartbeat_run_events";
|
|
350
|
-
dataType: "string";
|
|
351
|
-
columnType: "PgText";
|
|
352
|
-
data: string;
|
|
353
|
-
driverParam: string;
|
|
354
|
-
notNull: false;
|
|
355
|
-
hasDefault: false;
|
|
356
|
-
isPrimaryKey: false;
|
|
357
|
-
isAutoincrement: false;
|
|
358
|
-
hasRuntimeDefault: false;
|
|
359
|
-
enumValues: [string, ...string[]];
|
|
360
|
-
baseColumn: never;
|
|
361
|
-
identity: undefined;
|
|
362
|
-
generated: undefined;
|
|
363
|
-
}, {}, {}>;
|
|
364
|
-
color: import("drizzle-orm/pg-core").PgColumn<{
|
|
365
|
-
name: "color";
|
|
366
|
-
tableName: "heartbeat_run_events";
|
|
367
|
-
dataType: "string";
|
|
368
|
-
columnType: "PgText";
|
|
369
|
-
data: string;
|
|
370
|
-
driverParam: string;
|
|
371
|
-
notNull: false;
|
|
372
|
-
hasDefault: false;
|
|
373
|
-
isPrimaryKey: false;
|
|
374
|
-
isAutoincrement: false;
|
|
375
|
-
hasRuntimeDefault: false;
|
|
376
|
-
enumValues: [string, ...string[]];
|
|
377
|
-
baseColumn: never;
|
|
378
|
-
identity: undefined;
|
|
379
|
-
generated: undefined;
|
|
380
|
-
}, {}, {}>;
|
|
381
|
-
message: import("drizzle-orm/pg-core").PgColumn<{
|
|
382
|
-
name: "message";
|
|
383
|
-
tableName: "heartbeat_run_events";
|
|
384
|
-
dataType: "string";
|
|
385
|
-
columnType: "PgText";
|
|
386
|
-
data: string;
|
|
387
|
-
driverParam: string;
|
|
388
|
-
notNull: false;
|
|
389
|
-
hasDefault: false;
|
|
390
|
-
isPrimaryKey: false;
|
|
391
|
-
isAutoincrement: false;
|
|
392
|
-
hasRuntimeDefault: false;
|
|
393
|
-
enumValues: [string, ...string[]];
|
|
394
|
-
baseColumn: never;
|
|
395
|
-
identity: undefined;
|
|
396
|
-
generated: undefined;
|
|
397
|
-
}, {}, {}>;
|
|
398
|
-
payload: import("drizzle-orm/pg-core").PgColumn<{
|
|
399
|
-
name: "payload";
|
|
400
|
-
tableName: "heartbeat_run_events";
|
|
401
|
-
dataType: "json";
|
|
402
|
-
columnType: "PgJsonb";
|
|
403
|
-
data: Record<string, unknown>;
|
|
404
|
-
driverParam: unknown;
|
|
405
|
-
notNull: false;
|
|
406
|
-
hasDefault: false;
|
|
407
|
-
isPrimaryKey: false;
|
|
408
|
-
isAutoincrement: false;
|
|
409
|
-
hasRuntimeDefault: false;
|
|
410
|
-
enumValues: undefined;
|
|
411
|
-
baseColumn: never;
|
|
412
|
-
identity: undefined;
|
|
413
|
-
generated: undefined;
|
|
414
|
-
}, {}, {
|
|
415
|
-
$type: Record<string, unknown>;
|
|
416
|
-
}>;
|
|
417
|
-
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
418
|
-
name: "created_at";
|
|
419
|
-
tableName: "heartbeat_run_events";
|
|
420
|
-
dataType: "date";
|
|
421
|
-
columnType: "PgTimestamp";
|
|
422
|
-
data: Date;
|
|
423
|
-
driverParam: string;
|
|
424
|
-
notNull: true;
|
|
425
|
-
hasDefault: true;
|
|
426
|
-
isPrimaryKey: false;
|
|
427
|
-
isAutoincrement: false;
|
|
428
|
-
hasRuntimeDefault: false;
|
|
429
|
-
enumValues: undefined;
|
|
430
|
-
baseColumn: never;
|
|
431
|
-
identity: undefined;
|
|
432
|
-
generated: undefined;
|
|
433
|
-
}, {}, {}>;
|
|
434
|
-
}, "single", Record<"heartbeat_run_events", "not-null">, false, "where" | "orderBy" | "limit", {
|
|
435
|
-
message: string | null;
|
|
436
|
-
id: number;
|
|
437
|
-
orgId: string;
|
|
438
|
-
createdAt: Date;
|
|
439
|
-
color: string | null;
|
|
440
|
-
payload: Record<string, unknown> | null;
|
|
441
|
-
agentId: string;
|
|
442
|
-
level: string | null;
|
|
443
|
-
runId: string;
|
|
444
|
-
seq: number;
|
|
445
|
-
eventType: string;
|
|
446
|
-
stream: string | null;
|
|
447
|
-
}[], {
|
|
448
|
-
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
449
|
-
name: "id";
|
|
450
|
-
tableName: "heartbeat_run_events";
|
|
451
|
-
dataType: "number";
|
|
452
|
-
columnType: "PgBigSerial53";
|
|
453
|
-
data: number;
|
|
454
|
-
driverParam: number;
|
|
455
|
-
notNull: true;
|
|
456
|
-
hasDefault: true;
|
|
457
|
-
isPrimaryKey: true;
|
|
458
|
-
isAutoincrement: false;
|
|
459
|
-
hasRuntimeDefault: false;
|
|
460
|
-
enumValues: undefined;
|
|
461
|
-
baseColumn: never;
|
|
462
|
-
identity: undefined;
|
|
463
|
-
generated: undefined;
|
|
464
|
-
}, {}, {}>;
|
|
465
|
-
orgId: import("drizzle-orm/pg-core").PgColumn<{
|
|
466
|
-
name: "org_id";
|
|
467
|
-
tableName: "heartbeat_run_events";
|
|
468
|
-
dataType: "string";
|
|
469
|
-
columnType: "PgUUID";
|
|
470
|
-
data: string;
|
|
471
|
-
driverParam: string;
|
|
472
|
-
notNull: true;
|
|
473
|
-
hasDefault: false;
|
|
474
|
-
isPrimaryKey: false;
|
|
475
|
-
isAutoincrement: false;
|
|
476
|
-
hasRuntimeDefault: false;
|
|
477
|
-
enumValues: undefined;
|
|
478
|
-
baseColumn: never;
|
|
479
|
-
identity: undefined;
|
|
480
|
-
generated: undefined;
|
|
481
|
-
}, {}, {}>;
|
|
482
|
-
runId: import("drizzle-orm/pg-core").PgColumn<{
|
|
483
|
-
name: "run_id";
|
|
484
|
-
tableName: "heartbeat_run_events";
|
|
485
|
-
dataType: "string";
|
|
486
|
-
columnType: "PgUUID";
|
|
487
|
-
data: string;
|
|
488
|
-
driverParam: string;
|
|
489
|
-
notNull: true;
|
|
490
|
-
hasDefault: false;
|
|
491
|
-
isPrimaryKey: false;
|
|
492
|
-
isAutoincrement: false;
|
|
493
|
-
hasRuntimeDefault: false;
|
|
494
|
-
enumValues: undefined;
|
|
495
|
-
baseColumn: never;
|
|
496
|
-
identity: undefined;
|
|
497
|
-
generated: undefined;
|
|
498
|
-
}, {}, {}>;
|
|
499
|
-
agentId: import("drizzle-orm/pg-core").PgColumn<{
|
|
500
|
-
name: "agent_id";
|
|
501
|
-
tableName: "heartbeat_run_events";
|
|
502
|
-
dataType: "string";
|
|
503
|
-
columnType: "PgUUID";
|
|
504
|
-
data: string;
|
|
505
|
-
driverParam: string;
|
|
506
|
-
notNull: true;
|
|
507
|
-
hasDefault: false;
|
|
508
|
-
isPrimaryKey: false;
|
|
509
|
-
isAutoincrement: false;
|
|
510
|
-
hasRuntimeDefault: false;
|
|
511
|
-
enumValues: undefined;
|
|
512
|
-
baseColumn: never;
|
|
513
|
-
identity: undefined;
|
|
514
|
-
generated: undefined;
|
|
515
|
-
}, {}, {}>;
|
|
516
|
-
seq: import("drizzle-orm/pg-core").PgColumn<{
|
|
517
|
-
name: "seq";
|
|
518
|
-
tableName: "heartbeat_run_events";
|
|
519
|
-
dataType: "number";
|
|
520
|
-
columnType: "PgInteger";
|
|
521
|
-
data: number;
|
|
522
|
-
driverParam: string | number;
|
|
523
|
-
notNull: true;
|
|
524
|
-
hasDefault: false;
|
|
525
|
-
isPrimaryKey: false;
|
|
526
|
-
isAutoincrement: false;
|
|
527
|
-
hasRuntimeDefault: false;
|
|
528
|
-
enumValues: undefined;
|
|
529
|
-
baseColumn: never;
|
|
530
|
-
identity: undefined;
|
|
531
|
-
generated: undefined;
|
|
532
|
-
}, {}, {}>;
|
|
533
|
-
eventType: import("drizzle-orm/pg-core").PgColumn<{
|
|
534
|
-
name: "event_type";
|
|
535
|
-
tableName: "heartbeat_run_events";
|
|
536
|
-
dataType: "string";
|
|
537
|
-
columnType: "PgText";
|
|
538
|
-
data: string;
|
|
539
|
-
driverParam: string;
|
|
540
|
-
notNull: true;
|
|
541
|
-
hasDefault: false;
|
|
542
|
-
isPrimaryKey: false;
|
|
543
|
-
isAutoincrement: false;
|
|
544
|
-
hasRuntimeDefault: false;
|
|
545
|
-
enumValues: [string, ...string[]];
|
|
546
|
-
baseColumn: never;
|
|
547
|
-
identity: undefined;
|
|
548
|
-
generated: undefined;
|
|
549
|
-
}, {}, {}>;
|
|
550
|
-
stream: import("drizzle-orm/pg-core").PgColumn<{
|
|
551
|
-
name: "stream";
|
|
552
|
-
tableName: "heartbeat_run_events";
|
|
553
|
-
dataType: "string";
|
|
554
|
-
columnType: "PgText";
|
|
555
|
-
data: string;
|
|
556
|
-
driverParam: string;
|
|
557
|
-
notNull: false;
|
|
558
|
-
hasDefault: false;
|
|
559
|
-
isPrimaryKey: false;
|
|
560
|
-
isAutoincrement: false;
|
|
561
|
-
hasRuntimeDefault: false;
|
|
562
|
-
enumValues: [string, ...string[]];
|
|
563
|
-
baseColumn: never;
|
|
564
|
-
identity: undefined;
|
|
565
|
-
generated: undefined;
|
|
566
|
-
}, {}, {}>;
|
|
567
|
-
level: import("drizzle-orm/pg-core").PgColumn<{
|
|
568
|
-
name: "level";
|
|
569
|
-
tableName: "heartbeat_run_events";
|
|
570
|
-
dataType: "string";
|
|
571
|
-
columnType: "PgText";
|
|
572
|
-
data: string;
|
|
573
|
-
driverParam: string;
|
|
574
|
-
notNull: false;
|
|
575
|
-
hasDefault: false;
|
|
576
|
-
isPrimaryKey: false;
|
|
577
|
-
isAutoincrement: false;
|
|
578
|
-
hasRuntimeDefault: false;
|
|
579
|
-
enumValues: [string, ...string[]];
|
|
580
|
-
baseColumn: never;
|
|
581
|
-
identity: undefined;
|
|
582
|
-
generated: undefined;
|
|
583
|
-
}, {}, {}>;
|
|
584
|
-
color: import("drizzle-orm/pg-core").PgColumn<{
|
|
585
|
-
name: "color";
|
|
586
|
-
tableName: "heartbeat_run_events";
|
|
587
|
-
dataType: "string";
|
|
588
|
-
columnType: "PgText";
|
|
589
|
-
data: string;
|
|
590
|
-
driverParam: string;
|
|
591
|
-
notNull: false;
|
|
592
|
-
hasDefault: false;
|
|
593
|
-
isPrimaryKey: false;
|
|
594
|
-
isAutoincrement: false;
|
|
595
|
-
hasRuntimeDefault: false;
|
|
596
|
-
enumValues: [string, ...string[]];
|
|
597
|
-
baseColumn: never;
|
|
598
|
-
identity: undefined;
|
|
599
|
-
generated: undefined;
|
|
600
|
-
}, {}, {}>;
|
|
601
|
-
message: import("drizzle-orm/pg-core").PgColumn<{
|
|
602
|
-
name: "message";
|
|
603
|
-
tableName: "heartbeat_run_events";
|
|
604
|
-
dataType: "string";
|
|
605
|
-
columnType: "PgText";
|
|
606
|
-
data: string;
|
|
607
|
-
driverParam: string;
|
|
608
|
-
notNull: false;
|
|
609
|
-
hasDefault: false;
|
|
610
|
-
isPrimaryKey: false;
|
|
611
|
-
isAutoincrement: false;
|
|
612
|
-
hasRuntimeDefault: false;
|
|
613
|
-
enumValues: [string, ...string[]];
|
|
614
|
-
baseColumn: never;
|
|
615
|
-
identity: undefined;
|
|
616
|
-
generated: undefined;
|
|
617
|
-
}, {}, {}>;
|
|
618
|
-
payload: import("drizzle-orm/pg-core").PgColumn<{
|
|
619
|
-
name: "payload";
|
|
620
|
-
tableName: "heartbeat_run_events";
|
|
621
|
-
dataType: "json";
|
|
622
|
-
columnType: "PgJsonb";
|
|
623
|
-
data: Record<string, unknown>;
|
|
624
|
-
driverParam: unknown;
|
|
625
|
-
notNull: false;
|
|
626
|
-
hasDefault: false;
|
|
627
|
-
isPrimaryKey: false;
|
|
628
|
-
isAutoincrement: false;
|
|
629
|
-
hasRuntimeDefault: false;
|
|
630
|
-
enumValues: undefined;
|
|
631
|
-
baseColumn: never;
|
|
632
|
-
identity: undefined;
|
|
633
|
-
generated: undefined;
|
|
634
|
-
}, {}, {
|
|
635
|
-
$type: Record<string, unknown>;
|
|
636
|
-
}>;
|
|
637
|
-
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
638
|
-
name: "created_at";
|
|
639
|
-
tableName: "heartbeat_run_events";
|
|
640
|
-
dataType: "date";
|
|
641
|
-
columnType: "PgTimestamp";
|
|
642
|
-
data: Date;
|
|
643
|
-
driverParam: string;
|
|
644
|
-
notNull: true;
|
|
645
|
-
hasDefault: true;
|
|
646
|
-
isPrimaryKey: false;
|
|
647
|
-
isAutoincrement: false;
|
|
648
|
-
hasRuntimeDefault: false;
|
|
649
|
-
enumValues: undefined;
|
|
650
|
-
baseColumn: never;
|
|
651
|
-
identity: undefined;
|
|
652
|
-
generated: undefined;
|
|
653
|
-
}, {}, {}>;
|
|
654
|
-
}>, "where" | "orderBy" | "limit">;
|
|
655
|
-
readLog: (runId: string, opts?: {
|
|
656
|
-
offset?: number;
|
|
657
|
-
limitBytes?: number;
|
|
658
|
-
}) => Promise<{
|
|
659
|
-
content: string;
|
|
660
|
-
endOffset: number;
|
|
661
|
-
eof: boolean;
|
|
662
|
-
nextOffset?: number;
|
|
663
|
-
runId: string;
|
|
664
|
-
store: string;
|
|
665
|
-
logRef: string;
|
|
666
|
-
}>;
|
|
667
|
-
invoke: (agentId: string, source?: "timer" | "assignment" | "on_demand" | "automation", contextSnapshot?: Record<string, unknown>, triggerDetail?: "manual" | "ping" | "callback" | "system", actor?: {
|
|
668
|
-
actorType?: "user" | "agent" | "system";
|
|
669
|
-
actorId?: string | null;
|
|
670
|
-
}) => Promise<{
|
|
671
|
-
error: string | null;
|
|
672
|
-
id: string;
|
|
673
|
-
status: string;
|
|
674
|
-
updatedAt: Date;
|
|
675
|
-
orgId: string;
|
|
676
|
-
startedAt: Date | null;
|
|
677
|
-
createdAt: Date;
|
|
678
|
-
triggerDetail: string | null;
|
|
679
|
-
agentId: string;
|
|
680
|
-
finishedAt: Date | null;
|
|
681
|
-
invocationSource: string;
|
|
682
|
-
wakeupRequestId: string | null;
|
|
683
|
-
exitCode: number | null;
|
|
684
|
-
signal: string | null;
|
|
685
|
-
usageJson: Record<string, unknown> | null;
|
|
686
|
-
resultJson: Record<string, unknown> | null;
|
|
687
|
-
sessionIdBefore: string | null;
|
|
688
|
-
sessionIdAfter: string | null;
|
|
689
|
-
logStore: string | null;
|
|
690
|
-
logRef: string | null;
|
|
691
|
-
logBytes: number | null;
|
|
692
|
-
logSha256: string | null;
|
|
693
|
-
logCompressed: boolean;
|
|
694
|
-
stdoutExcerpt: string | null;
|
|
695
|
-
stderrExcerpt: string | null;
|
|
696
|
-
errorCode: string | null;
|
|
697
|
-
externalRunId: string | null;
|
|
698
|
-
processPid: number | null;
|
|
699
|
-
processStartedAt: Date | null;
|
|
700
|
-
retryOfRunId: string | null;
|
|
701
|
-
processLossRetryCount: number;
|
|
702
|
-
contextSnapshot: Record<string, unknown> | null;
|
|
703
|
-
} | null>;
|
|
704
|
-
wakeup: (agentId: string, opts?: WakeupOptions) => Promise<{
|
|
705
|
-
error: string | null;
|
|
706
|
-
id: string;
|
|
707
|
-
status: string;
|
|
708
|
-
updatedAt: Date;
|
|
709
|
-
orgId: string;
|
|
710
|
-
startedAt: Date | null;
|
|
711
|
-
createdAt: Date;
|
|
712
|
-
triggerDetail: string | null;
|
|
713
|
-
agentId: string;
|
|
714
|
-
finishedAt: Date | null;
|
|
715
|
-
invocationSource: string;
|
|
716
|
-
wakeupRequestId: string | null;
|
|
717
|
-
exitCode: number | null;
|
|
718
|
-
signal: string | null;
|
|
719
|
-
usageJson: Record<string, unknown> | null;
|
|
720
|
-
resultJson: Record<string, unknown> | null;
|
|
721
|
-
sessionIdBefore: string | null;
|
|
722
|
-
sessionIdAfter: string | null;
|
|
723
|
-
logStore: string | null;
|
|
724
|
-
logRef: string | null;
|
|
725
|
-
logBytes: number | null;
|
|
726
|
-
logSha256: string | null;
|
|
727
|
-
logCompressed: boolean;
|
|
728
|
-
stdoutExcerpt: string | null;
|
|
729
|
-
stderrExcerpt: string | null;
|
|
730
|
-
errorCode: string | null;
|
|
731
|
-
externalRunId: string | null;
|
|
732
|
-
processPid: number | null;
|
|
733
|
-
processStartedAt: Date | null;
|
|
734
|
-
retryOfRunId: string | null;
|
|
735
|
-
processLossRetryCount: number;
|
|
736
|
-
contextSnapshot: Record<string, unknown> | null;
|
|
737
|
-
} | null>;
|
|
738
|
-
resumeDeferredWakeupsForAgent: (agentId: string) => Promise<{
|
|
739
|
-
replayed: number;
|
|
740
|
-
wakeupRequestIds: string[];
|
|
741
|
-
}>;
|
|
742
|
-
retryRun: (runId: string, opts?: {
|
|
743
|
-
requestedByActorType?: WakeupOptions["requestedByActorType"];
|
|
744
|
-
requestedByActorId?: string | null;
|
|
745
|
-
now?: Date;
|
|
746
|
-
}) => Promise<{
|
|
747
|
-
error: string | null;
|
|
748
|
-
id: string;
|
|
749
|
-
status: string;
|
|
750
|
-
updatedAt: Date;
|
|
751
|
-
orgId: string;
|
|
752
|
-
startedAt: Date | null;
|
|
753
|
-
createdAt: Date;
|
|
754
|
-
triggerDetail: string | null;
|
|
755
|
-
agentId: string;
|
|
756
|
-
finishedAt: Date | null;
|
|
757
|
-
invocationSource: string;
|
|
758
|
-
wakeupRequestId: string | null;
|
|
759
|
-
exitCode: number | null;
|
|
760
|
-
signal: string | null;
|
|
761
|
-
usageJson: Record<string, unknown> | null;
|
|
762
|
-
resultJson: Record<string, unknown> | null;
|
|
763
|
-
sessionIdBefore: string | null;
|
|
764
|
-
sessionIdAfter: string | null;
|
|
765
|
-
logStore: string | null;
|
|
766
|
-
logRef: string | null;
|
|
767
|
-
logBytes: number | null;
|
|
768
|
-
logSha256: string | null;
|
|
769
|
-
logCompressed: boolean;
|
|
770
|
-
stdoutExcerpt: string | null;
|
|
771
|
-
stderrExcerpt: string | null;
|
|
772
|
-
errorCode: string | null;
|
|
773
|
-
externalRunId: string | null;
|
|
774
|
-
processPid: number | null;
|
|
775
|
-
processStartedAt: Date | null;
|
|
776
|
-
retryOfRunId: string | null;
|
|
777
|
-
processLossRetryCount: number;
|
|
778
|
-
contextSnapshot: Record<string, unknown> | null;
|
|
779
|
-
}>;
|
|
780
|
-
reportRunActivity: (runId: string) => Promise<{
|
|
781
|
-
id: string;
|
|
782
|
-
orgId: string;
|
|
783
|
-
agentId: string;
|
|
784
|
-
invocationSource: string;
|
|
785
|
-
triggerDetail: string | null;
|
|
786
|
-
status: string;
|
|
787
|
-
startedAt: Date | null;
|
|
788
|
-
finishedAt: Date | null;
|
|
789
|
-
error: string | null;
|
|
790
|
-
wakeupRequestId: string | null;
|
|
791
|
-
exitCode: number | null;
|
|
792
|
-
signal: string | null;
|
|
793
|
-
usageJson: Record<string, unknown> | null;
|
|
794
|
-
resultJson: Record<string, unknown> | null;
|
|
795
|
-
sessionIdBefore: string | null;
|
|
796
|
-
sessionIdAfter: string | null;
|
|
797
|
-
logStore: string | null;
|
|
798
|
-
logRef: string | null;
|
|
799
|
-
logBytes: number | null;
|
|
800
|
-
logSha256: string | null;
|
|
801
|
-
logCompressed: boolean;
|
|
802
|
-
stdoutExcerpt: string | null;
|
|
803
|
-
stderrExcerpt: string | null;
|
|
804
|
-
errorCode: string | null;
|
|
805
|
-
externalRunId: string | null;
|
|
806
|
-
processPid: number | null;
|
|
807
|
-
processStartedAt: Date | null;
|
|
808
|
-
retryOfRunId: string | null;
|
|
809
|
-
processLossRetryCount: number;
|
|
810
|
-
contextSnapshot: Record<string, unknown> | null;
|
|
811
|
-
createdAt: Date;
|
|
812
|
-
updatedAt: Date;
|
|
813
|
-
} | null>;
|
|
814
|
-
reapOrphanedRuns: (opts?: {
|
|
815
|
-
staleThresholdMs?: number;
|
|
816
|
-
}) => Promise<{
|
|
817
|
-
reaped: number;
|
|
818
|
-
runIds: string[];
|
|
819
|
-
}>;
|
|
820
|
-
resumeQueuedRuns: () => Promise<void>;
|
|
821
|
-
tickTimers: (now?: Date) => Promise<{
|
|
822
|
-
checked: number;
|
|
823
|
-
enqueued: number;
|
|
824
|
-
skipped: number;
|
|
825
|
-
}>;
|
|
826
|
-
cancelRun: (runId: string) => Promise<{
|
|
827
|
-
error: string | null;
|
|
828
|
-
id: string;
|
|
829
|
-
status: string;
|
|
830
|
-
updatedAt: Date;
|
|
831
|
-
orgId: string;
|
|
832
|
-
startedAt: Date | null;
|
|
833
|
-
createdAt: Date;
|
|
834
|
-
triggerDetail: string | null;
|
|
835
|
-
agentId: string;
|
|
836
|
-
finishedAt: Date | null;
|
|
837
|
-
invocationSource: string;
|
|
838
|
-
wakeupRequestId: string | null;
|
|
839
|
-
exitCode: number | null;
|
|
840
|
-
signal: string | null;
|
|
841
|
-
usageJson: Record<string, unknown> | null;
|
|
842
|
-
resultJson: Record<string, unknown> | null;
|
|
843
|
-
sessionIdBefore: string | null;
|
|
844
|
-
sessionIdAfter: string | null;
|
|
845
|
-
logStore: string | null;
|
|
846
|
-
logRef: string | null;
|
|
847
|
-
logBytes: number | null;
|
|
848
|
-
logSha256: string | null;
|
|
849
|
-
logCompressed: boolean;
|
|
850
|
-
stdoutExcerpt: string | null;
|
|
851
|
-
stderrExcerpt: string | null;
|
|
852
|
-
errorCode: string | null;
|
|
853
|
-
externalRunId: string | null;
|
|
854
|
-
processPid: number | null;
|
|
855
|
-
processStartedAt: Date | null;
|
|
856
|
-
retryOfRunId: string | null;
|
|
857
|
-
processLossRetryCount: number;
|
|
858
|
-
contextSnapshot: Record<string, unknown> | null;
|
|
859
|
-
}>;
|
|
860
|
-
cancelActiveForAgent: (agentId: string) => Promise<number>;
|
|
861
|
-
cancelBudgetScopeWork: (scope: BudgetEnforcementScope) => Promise<void>;
|
|
862
|
-
getActiveRunForAgent: (agentId: string) => Promise<{
|
|
863
|
-
error: string | null;
|
|
864
|
-
id: string;
|
|
865
|
-
status: string;
|
|
866
|
-
updatedAt: Date;
|
|
867
|
-
orgId: string;
|
|
868
|
-
startedAt: Date | null;
|
|
869
|
-
createdAt: Date;
|
|
870
|
-
triggerDetail: string | null;
|
|
871
|
-
agentId: string;
|
|
872
|
-
finishedAt: Date | null;
|
|
873
|
-
invocationSource: string;
|
|
874
|
-
wakeupRequestId: string | null;
|
|
875
|
-
exitCode: number | null;
|
|
876
|
-
signal: string | null;
|
|
877
|
-
usageJson: Record<string, unknown> | null;
|
|
878
|
-
resultJson: Record<string, unknown> | null;
|
|
879
|
-
sessionIdBefore: string | null;
|
|
880
|
-
sessionIdAfter: string | null;
|
|
881
|
-
logStore: string | null;
|
|
882
|
-
logRef: string | null;
|
|
883
|
-
logBytes: number | null;
|
|
884
|
-
logSha256: string | null;
|
|
885
|
-
logCompressed: boolean;
|
|
886
|
-
stdoutExcerpt: string | null;
|
|
887
|
-
stderrExcerpt: string | null;
|
|
888
|
-
errorCode: string | null;
|
|
889
|
-
externalRunId: string | null;
|
|
890
|
-
processPid: number | null;
|
|
891
|
-
processStartedAt: Date | null;
|
|
892
|
-
retryOfRunId: string | null;
|
|
893
|
-
processLossRetryCount: number;
|
|
894
|
-
contextSnapshot: Record<string, unknown> | null;
|
|
895
|
-
}>;
|
|
896
|
-
};
|
|
1
|
+
export { buildExplicitResumeSessionOverride, buildHeartbeatAdapterInvokePayload, buildHeartbeatRuntimeTraceMetadata, buildIssueRunTraceName, formatRuntimeWorkspaceWarningLog, heartbeatService, parseSessionCompactionPolicy, prioritizeProjectWorkspaceCandidatesForRun, resolveHeartbeatObservabilitySurface, resolveRuntimeSessionParamsForWorkspace, shouldResetTaskSessionForWake, type ResolvedWorkspaceForRun, } from "./orchestrator.js";
|
|
897
2
|
//# sourceMappingURL=heartbeat.d.ts.map
|