@rudderhq/server 0.1.0-canary.2 → 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/bootstrap/register-api-routes.js +1 -1
- package/dist/bootstrap/register-api-routes.js.map +1 -1
- package/dist/dev-server-status.d.ts +1 -7
- package/dist/dev-server-status.d.ts.map +1 -1
- package/dist/dev-server-status.js +1 -4
- package/dist/dev-server-status.js.map +1 -1
- package/dist/routes/agents.d.ts +2 -1
- package/dist/routes/agents.d.ts.map +1 -1
- package/dist/routes/agents.js +158 -1
- package/dist/routes/agents.js.map +1 -1
- package/dist/routes/chats.d.ts.map +1 -1
- package/dist/routes/chats.js +164 -21
- package/dist/routes/chats.js.map +1 -1
- package/dist/routes/dashboard.d.ts.map +1 -1
- package/dist/routes/dashboard.js +24 -0
- package/dist/routes/dashboard.js.map +1 -1
- package/dist/routes/health.d.ts.map +1 -1
- package/dist/routes/health.js +3 -12
- package/dist/routes/health.js.map +1 -1
- package/dist/routes/instance-settings.d.ts.map +1 -1
- package/dist/routes/instance-settings.js +1 -26
- package/dist/routes/instance-settings.js.map +1 -1
- package/dist/routes/issues.d.ts.map +1 -1
- package/dist/routes/issues.js +19 -17
- package/dist/routes/issues.js.map +1 -1
- package/dist/services/agent-run-context.d.ts +1 -1
- package/dist/services/agents.d.ts +13 -13
- 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 +244 -41
- package/dist/services/chat-assistant.js.map +1 -1
- package/dist/services/chat-generation-locks.d.ts +2 -1
- package/dist/services/chat-generation-locks.d.ts.map +1 -1
- package/dist/services/chat-generation-locks.js +12 -3
- package/dist/services/chat-generation-locks.js.map +1 -1
- package/dist/services/chats.d.ts +3 -3
- 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/costs.d.ts +1 -1
- package/dist/services/documents.d.ts +23 -0
- package/dist/services/documents.d.ts.map +1 -1
- package/dist/services/documents.js +17 -1
- package/dist/services/documents.js.map +1 -1
- package/dist/services/finance.d.ts +2 -2
- package/dist/services/heartbeat.d.ts +1 -1
- package/dist/services/heartbeat.d.ts.map +1 -1
- package/dist/services/heartbeat.js +1 -1
- package/dist/services/heartbeat.js.map +1 -1
- package/dist/services/instance-settings.d.ts +1 -3
- package/dist/services/instance-settings.d.ts.map +1 -1
- package/dist/services/instance-settings.js +1 -38
- package/dist/services/instance-settings.js.map +1 -1
- package/dist/services/messenger.d.ts +1 -1
- package/dist/services/messenger.d.ts.map +1 -1
- package/dist/services/messenger.js +59 -12
- package/dist/services/messenger.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 -881
- package/dist/services/runtime-kernel/heartbeat.d.ts.map +1 -1
- package/dist/services/runtime-kernel/heartbeat.js +1 -4344
- package/dist/services/runtime-kernel/heartbeat.js.map +1 -1
- package/dist/services/runtime-kernel/model-fallback.d.ts +10 -0
- package/dist/services/runtime-kernel/model-fallback.d.ts.map +1 -0
- package/dist/services/runtime-kernel/model-fallback.js +147 -0
- package/dist/services/runtime-kernel/model-fallback.js.map +1 -0
- 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 +14 -14
- package/resources/bundled-skills/rudder-create-agent/SKILL.md +1 -1
- package/resources/bundled-skills/rudder-create-agent/references/api-reference.md +4 -2
- package/resources/bundled-skills/rudder-create-agent/references/cli-reference.md +1 -1
- package/skills/rudder-create-agent/SKILL.md +1 -1
- package/skills/rudder-create-agent/references/api-reference.md +4 -2
- package/skills/rudder-create-agent/references/cli-reference.md +1 -1
- package/ui-dist/assets/{_basePickBy-C8ZhuJlI.js → _basePickBy-DAU2OOE3.js} +1 -1
- package/ui-dist/assets/{_baseUniq-BRCVYeJb.js → _baseUniq-BQLJfIXV.js} +1 -1
- package/ui-dist/assets/{arc-B1R0dxYm.js → arc-B2UTEkTB.js} +1 -1
- package/ui-dist/assets/{architectureDiagram-2XIMDMQ5-D7sRWBaf.js → architectureDiagram-2XIMDMQ5-DicHsSOp.js} +1 -1
- package/ui-dist/assets/{blockDiagram-WCTKOSBZ-Byw6t-Eq.js → blockDiagram-WCTKOSBZ-tbkC8ZCs.js} +1 -1
- package/ui-dist/assets/{c4Diagram-IC4MRINW-RsrU80Hc.js → c4Diagram-IC4MRINW-pPT_Xw2l.js} +1 -1
- package/ui-dist/assets/channel-D8qCsVGC.js +1 -0
- package/ui-dist/assets/{chunk-4BX2VUAB-D9oP4FJ_.js → chunk-4BX2VUAB-vX_EgGXp.js} +1 -1
- package/ui-dist/assets/{chunk-55IACEB6-DT8xQAKU.js → chunk-55IACEB6-DUyGlyCg.js} +1 -1
- package/ui-dist/assets/{chunk-FMBD7UC4-FwqsP6AV.js → chunk-FMBD7UC4-DPCYqV54.js} +1 -1
- package/ui-dist/assets/{chunk-JSJVCQXG-CTOvJxU3.js → chunk-JSJVCQXG-CRqpXPJG.js} +1 -1
- package/ui-dist/assets/{chunk-KX2RTZJC-8oze7Khf.js → chunk-KX2RTZJC-BWaSxc23.js} +1 -1
- package/ui-dist/assets/{chunk-NQ4KR5QH-D38LrSCR.js → chunk-NQ4KR5QH-BCIl9FTX.js} +1 -1
- package/ui-dist/assets/{chunk-QZHKN3VN-B3ZhJA7D.js → chunk-QZHKN3VN-BgTqyV62.js} +1 -1
- package/ui-dist/assets/{chunk-WL4C6EOR-CSTjCHX6.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-CI_3Qz62.js → cose-bilkent-S5V4N54A-Bbgtq4rD.js} +1 -1
- package/ui-dist/assets/{dagre-KLK3FWXG-BNakeJ5Q.js → dagre-KLK3FWXG-DgUnjcLS.js} +1 -1
- package/ui-dist/assets/{diagram-E7M64L7V-UubVu-IN.js → diagram-E7M64L7V-DC3DIXbu.js} +1 -1
- package/ui-dist/assets/{diagram-IFDJBPK2-DRu8FSPT.js → diagram-IFDJBPK2-qv7Ij_rH.js} +1 -1
- package/ui-dist/assets/{diagram-P4PSJMXO-t2_nA6WC.js → diagram-P4PSJMXO-Dw2WzhiN.js} +1 -1
- package/ui-dist/assets/{erDiagram-INFDFZHY-ET8QDHtO.js → erDiagram-INFDFZHY-BV5s3J3D.js} +1 -1
- package/ui-dist/assets/{flowDiagram-PKNHOUZH-QXQeM_4d.js → flowDiagram-PKNHOUZH-kmPgde9o.js} +1 -1
- package/ui-dist/assets/{ganttDiagram-A5KZAMGK-B6yFn5Hd.js → ganttDiagram-A5KZAMGK-C2hkJ2Th.js} +1 -1
- package/ui-dist/assets/{gitGraphDiagram-K3NZZRJ6-DZAeG6MG.js → gitGraphDiagram-K3NZZRJ6-K5e1NgIt.js} +1 -1
- package/ui-dist/assets/{graph-BaTTyfU1.js → graph-Cna3FnWY.js} +1 -1
- package/ui-dist/assets/{index-C7kEQtA_.js → index-6luhu7W5.js} +1 -1
- package/ui-dist/assets/index-B1iX9NWL.js +1364 -0
- package/ui-dist/assets/{index-D-mb6cn2.js → index-BdLts2oZ.js} +1 -1
- package/ui-dist/assets/{index-ym7ZDmXE.js → index-CBKnHGYE.js} +1 -1
- package/ui-dist/assets/{index-D_ZvBEXt.js → index-CDtBE3Ga.js} +1 -1
- package/ui-dist/assets/{index-Cftoq4bF.js → index-CFGJHREd.js} +1 -1
- package/ui-dist/assets/{index-Bo1sSJ7x.js → index-CTpC-gpc.js} +1 -1
- package/ui-dist/assets/{index-h_UqLbty.js → index-CVAmlnRr.js} +1 -1
- package/ui-dist/assets/{index-BWEA-ibM.js → index-CWbJ-pcg.js} +1 -1
- package/ui-dist/assets/{index-BSfIb9qw.js → index-ChU0nSCq.js} +1 -1
- package/ui-dist/assets/{index-DQeEMbWr.js → index-CypGJ__o.js} +1 -1
- package/ui-dist/assets/{index-BXxi8m3U.js → index-D-Fe0jjS.js} +1 -1
- package/ui-dist/assets/{index-BGOxzMvq.js → index-D8aBm25c.js} +1 -1
- package/ui-dist/assets/index-D9uKiQrM.css +1 -0
- package/ui-dist/assets/{index-DBsb_N5Q.js → index-DD0ggVK_.js} +1 -1
- package/ui-dist/assets/{index-MYVA1f40.js → index-DJecNMv2.js} +1 -1
- package/ui-dist/assets/{index-CAcJz5d9.js → index-DKSfpiAJ.js} +1 -1
- package/ui-dist/assets/{index-ZHLqhZdz.js → index-Dgj2bRIV.js} +1 -1
- package/ui-dist/assets/{index-DvQZ5FJk.js → index-DsydT3bX.js} +1 -1
- package/ui-dist/assets/{index-qVKE_HM2.js → index-U7gGuiCe.js} +1 -1
- package/ui-dist/assets/{index-CRtxHtSg.js → index-aL5hFrtS.js} +1 -1
- package/ui-dist/assets/{index-DPbDGs74.js → index-o_iEnzyw.js} +1 -1
- package/ui-dist/assets/{index-eessTUZm.js → index-qUFX4kXb.js} +1 -1
- package/ui-dist/assets/{index-C2T1FM7J.js → index-sV3mB3fg.js} +1 -1
- package/ui-dist/assets/{infoDiagram-LFFYTUFH-BOnKcq7S.js → infoDiagram-LFFYTUFH-BiQ6_Z3F.js} +1 -1
- package/ui-dist/assets/{ishikawaDiagram-PHBUUO56-etV-MroN.js → ishikawaDiagram-PHBUUO56-C_WqRu1B.js} +1 -1
- package/ui-dist/assets/{journeyDiagram-4ABVD52K-mvjGNrBx.js → journeyDiagram-4ABVD52K-BIpPercT.js} +1 -1
- package/ui-dist/assets/{kanban-definition-K7BYSVSG-CW-Dw_bU.js → kanban-definition-K7BYSVSG-DaFD_JyB.js} +1 -1
- package/ui-dist/assets/{layout-DUcWZ3H3.js → layout-Dj_oike0.js} +1 -1
- package/ui-dist/assets/{linear-B0r1V0oG.js → linear-tnVt1ugU.js} +1 -1
- package/ui-dist/assets/{mermaid.core-Bo_YuNee.js → mermaid.core-DflBh7Hv.js} +4 -4
- package/ui-dist/assets/{mindmap-definition-YRQLILUH-BmEjkBnz.js → mindmap-definition-YRQLILUH-C3H-gFSh.js} +1 -1
- package/ui-dist/assets/{pieDiagram-SKSYHLDU-BRER3VVx.js → pieDiagram-SKSYHLDU-DH53odzN.js} +1 -1
- package/ui-dist/assets/{quadrantDiagram-337W2JSQ-oYnSbQKi.js → quadrantDiagram-337W2JSQ-DCn4Dric.js} +1 -1
- package/ui-dist/assets/{requirementDiagram-Z7DCOOCP-BRLFZsts.js → requirementDiagram-Z7DCOOCP-KypOfBcY.js} +1 -1
- package/ui-dist/assets/{sankeyDiagram-WA2Y5GQK-YOKeMxIU.js → sankeyDiagram-WA2Y5GQK-DEmi0ryr.js} +1 -1
- package/ui-dist/assets/{sequenceDiagram-2WXFIKYE-Bj-YKQMs.js → sequenceDiagram-2WXFIKYE-sW6ojsVG.js} +1 -1
- package/ui-dist/assets/{stateDiagram-RAJIS63D-BYf-CeWe.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-CG6r3GP4.js → timeline-definition-YZTLITO2-CzJ5Y8YU.js} +1 -1
- package/ui-dist/assets/{treemap-KZPCXAKY-DCX4FLGH.js → treemap-KZPCXAKY-BwUNliTA.js} +1 -1
- package/ui-dist/assets/{vennDiagram-LZ73GAT5-CpbbhHdY.js → vennDiagram-LZ73GAT5-5A50aIn1.js} +1 -1
- package/ui-dist/assets/{xychartDiagram-JWTSCODW-Biq5EV_L.js → xychartDiagram-JWTSCODW-D9qTFskE.js} +1 -1
- package/ui-dist/index.html +2 -2
- package/ui-dist/assets/channel-BExT12GI.js +0 -1
- package/ui-dist/assets/classDiagram-VBA2DB6C-B3FSZmLP.js +0 -1
- package/ui-dist/assets/classDiagram-v2-RAHNMMFH-B3FSZmLP.js +0 -1
- package/ui-dist/assets/clone-DxXNeJhJ.js +0 -1
- package/ui-dist/assets/index-2Hx2TlnA.css +0 -1
- package/ui-dist/assets/index-wzjO7KZw.js +0 -1343
- package/ui-dist/assets/stateDiagram-v2-FVOUBMTO-g0byx18e.js +0 -1
|
@@ -0,0 +1,826 @@
|
|
|
1
|
+
import type { Db } from "@rudderhq/db";
|
|
2
|
+
import type { AgentSkillAnalytics } from "@rudderhq/shared";
|
|
3
|
+
import { type BudgetEnforcementScope } from "../budgets.js";
|
|
4
|
+
export { prioritizeProjectWorkspaceCandidatesForRun, type ResolvedWorkspaceForRun } from "../agent-run-context.js";
|
|
5
|
+
export { buildDateKeysBetween, buildRecentDateKeys, normalizeLoadedSkill, } from "./analytics.js";
|
|
6
|
+
export { normalizeAgentNameKey, readNonEmptyString, truncateDisplayId, } from "./common.js";
|
|
7
|
+
export { buildHeartbeatAdapterInvokePayload, buildHeartbeatRuntimeTraceMetadata, buildIssueRunTraceName, resolveHeartbeatObservabilitySurface, } from "./run-state.js";
|
|
8
|
+
export { buildExplicitResumeSessionOverride, formatRuntimeWorkspaceWarningLog, parseSessionCompactionPolicy, resolveRuntimeSessionParamsForWorkspace, shouldResetTaskSessionForWake, } from "./session-policy.js";
|
|
9
|
+
export { appendExcerpt, appendTranscriptEntriesFromChunk, } from "./execution.js";
|
|
10
|
+
export { isProcessAlive, isTrackedLocalChildProcessAdapter, terminateOrphanedProcess, } from "./recovery.js";
|
|
11
|
+
export { normalizeMaxConcurrentRuns, parseHeartbeatPolicy } from "./wakeup-queue.js";
|
|
12
|
+
interface WakeupOptions {
|
|
13
|
+
source?: "timer" | "assignment" | "on_demand" | "automation";
|
|
14
|
+
triggerDetail?: "manual" | "ping" | "callback" | "system";
|
|
15
|
+
reason?: string | null;
|
|
16
|
+
payload?: Record<string, unknown> | null;
|
|
17
|
+
idempotencyKey?: string | null;
|
|
18
|
+
requestedByActorType?: "user" | "agent" | "system";
|
|
19
|
+
requestedByActorId?: string | null;
|
|
20
|
+
contextSnapshot?: Record<string, unknown>;
|
|
21
|
+
existingWakeupRequestId?: string | null;
|
|
22
|
+
}
|
|
23
|
+
export declare function heartbeatService(db: Db): {
|
|
24
|
+
list: (orgId: string, agentId?: string, limit?: number) => Promise<{
|
|
25
|
+
resultJson: Record<string, unknown> | null;
|
|
26
|
+
id: string;
|
|
27
|
+
orgId: string;
|
|
28
|
+
agentId: string;
|
|
29
|
+
invocationSource: string;
|
|
30
|
+
triggerDetail: string | null;
|
|
31
|
+
status: string;
|
|
32
|
+
startedAt: Date | null;
|
|
33
|
+
finishedAt: Date | null;
|
|
34
|
+
error: string | null;
|
|
35
|
+
wakeupRequestId: string | null;
|
|
36
|
+
exitCode: number | null;
|
|
37
|
+
signal: string | null;
|
|
38
|
+
usageJson: Record<string, unknown> | null;
|
|
39
|
+
sessionIdBefore: string | null;
|
|
40
|
+
sessionIdAfter: string | null;
|
|
41
|
+
logStore: string | null;
|
|
42
|
+
logRef: string | null;
|
|
43
|
+
logBytes: number | null;
|
|
44
|
+
logSha256: string | null;
|
|
45
|
+
logCompressed: boolean;
|
|
46
|
+
stdoutExcerpt: string | null;
|
|
47
|
+
stderrExcerpt: string | null;
|
|
48
|
+
errorCode: string | null;
|
|
49
|
+
externalRunId: string | null;
|
|
50
|
+
processPid: number | null;
|
|
51
|
+
processStartedAt: Date | null;
|
|
52
|
+
retryOfRunId: string | null;
|
|
53
|
+
processLossRetryCount: number;
|
|
54
|
+
contextSnapshot: Record<string, unknown> | null;
|
|
55
|
+
createdAt: Date;
|
|
56
|
+
updatedAt: Date;
|
|
57
|
+
}[]>;
|
|
58
|
+
getAgentSkillAnalytics: (agentId: string, opts?: {
|
|
59
|
+
windowDays?: number;
|
|
60
|
+
now?: Date;
|
|
61
|
+
startDate?: string;
|
|
62
|
+
endDate?: string;
|
|
63
|
+
}) => Promise<AgentSkillAnalytics>;
|
|
64
|
+
getOrganizationSkillAnalytics: (orgId: string, opts?: {
|
|
65
|
+
windowDays?: number;
|
|
66
|
+
now?: Date;
|
|
67
|
+
startDate?: string;
|
|
68
|
+
endDate?: string;
|
|
69
|
+
}) => Promise<AgentSkillAnalytics>;
|
|
70
|
+
getRun: (runId: string) => Promise<{
|
|
71
|
+
error: string | null;
|
|
72
|
+
id: string;
|
|
73
|
+
status: string;
|
|
74
|
+
updatedAt: Date;
|
|
75
|
+
orgId: string;
|
|
76
|
+
startedAt: Date | null;
|
|
77
|
+
createdAt: Date;
|
|
78
|
+
triggerDetail: string | null;
|
|
79
|
+
agentId: string;
|
|
80
|
+
finishedAt: Date | null;
|
|
81
|
+
invocationSource: string;
|
|
82
|
+
wakeupRequestId: string | null;
|
|
83
|
+
exitCode: number | null;
|
|
84
|
+
signal: string | null;
|
|
85
|
+
usageJson: Record<string, unknown> | null;
|
|
86
|
+
resultJson: Record<string, unknown> | null;
|
|
87
|
+
sessionIdBefore: string | null;
|
|
88
|
+
sessionIdAfter: string | null;
|
|
89
|
+
logStore: string | null;
|
|
90
|
+
logRef: string | null;
|
|
91
|
+
logBytes: number | null;
|
|
92
|
+
logSha256: string | null;
|
|
93
|
+
logCompressed: boolean;
|
|
94
|
+
stdoutExcerpt: string | null;
|
|
95
|
+
stderrExcerpt: string | null;
|
|
96
|
+
errorCode: string | null;
|
|
97
|
+
externalRunId: string | null;
|
|
98
|
+
processPid: number | null;
|
|
99
|
+
processStartedAt: Date | null;
|
|
100
|
+
retryOfRunId: string | null;
|
|
101
|
+
processLossRetryCount: number;
|
|
102
|
+
contextSnapshot: Record<string, unknown> | null;
|
|
103
|
+
}>;
|
|
104
|
+
getRuntimeState: (agentId: string) => Promise<{
|
|
105
|
+
sessionDisplayId: string | null;
|
|
106
|
+
sessionParamsJson: Record<string, unknown> | null;
|
|
107
|
+
updatedAt: Date;
|
|
108
|
+
orgId: string;
|
|
109
|
+
createdAt: Date;
|
|
110
|
+
agentRuntimeType: string;
|
|
111
|
+
agentId: string;
|
|
112
|
+
lastError: string | null;
|
|
113
|
+
sessionId: string | null;
|
|
114
|
+
stateJson: Record<string, unknown>;
|
|
115
|
+
lastRunId: string | null;
|
|
116
|
+
lastRunStatus: string | null;
|
|
117
|
+
totalInputTokens: number;
|
|
118
|
+
totalOutputTokens: number;
|
|
119
|
+
totalCachedInputTokens: number;
|
|
120
|
+
totalCostCents: number;
|
|
121
|
+
} | null>;
|
|
122
|
+
listTaskSessions: (agentId: string) => Promise<{
|
|
123
|
+
id: string;
|
|
124
|
+
updatedAt: Date;
|
|
125
|
+
orgId: string;
|
|
126
|
+
createdAt: Date;
|
|
127
|
+
agentRuntimeType: string;
|
|
128
|
+
taskKey: string;
|
|
129
|
+
agentId: string;
|
|
130
|
+
lastError: string | null;
|
|
131
|
+
lastRunId: string | null;
|
|
132
|
+
sessionParamsJson: Record<string, unknown> | null;
|
|
133
|
+
sessionDisplayId: string | null;
|
|
134
|
+
}[]>;
|
|
135
|
+
resetRuntimeSession: (agentId: string, opts?: {
|
|
136
|
+
taskKey?: string | null;
|
|
137
|
+
}) => Promise<{
|
|
138
|
+
sessionDisplayId: null;
|
|
139
|
+
sessionParamsJson: null;
|
|
140
|
+
clearedTaskSessions: number;
|
|
141
|
+
agentId: string;
|
|
142
|
+
orgId: string;
|
|
143
|
+
agentRuntimeType: string;
|
|
144
|
+
sessionId: string | null;
|
|
145
|
+
stateJson: Record<string, unknown>;
|
|
146
|
+
lastRunId: string | null;
|
|
147
|
+
lastRunStatus: string | null;
|
|
148
|
+
totalInputTokens: number;
|
|
149
|
+
totalOutputTokens: number;
|
|
150
|
+
totalCachedInputTokens: number;
|
|
151
|
+
totalCostCents: number;
|
|
152
|
+
lastError: string | null;
|
|
153
|
+
createdAt: Date;
|
|
154
|
+
updatedAt: Date;
|
|
155
|
+
} | null>;
|
|
156
|
+
listEvents: (runId: string, afterSeq?: number, limit?: number) => Omit<import("drizzle-orm/pg-core").PgSelectBase<"heartbeat_run_events", {
|
|
157
|
+
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
158
|
+
name: "id";
|
|
159
|
+
tableName: "heartbeat_run_events";
|
|
160
|
+
dataType: "number";
|
|
161
|
+
columnType: "PgBigSerial53";
|
|
162
|
+
data: number;
|
|
163
|
+
driverParam: number;
|
|
164
|
+
notNull: true;
|
|
165
|
+
hasDefault: true;
|
|
166
|
+
isPrimaryKey: true;
|
|
167
|
+
isAutoincrement: false;
|
|
168
|
+
hasRuntimeDefault: false;
|
|
169
|
+
enumValues: undefined;
|
|
170
|
+
baseColumn: never;
|
|
171
|
+
identity: undefined;
|
|
172
|
+
generated: undefined;
|
|
173
|
+
}, {}, {}>;
|
|
174
|
+
orgId: import("drizzle-orm/pg-core").PgColumn<{
|
|
175
|
+
name: "org_id";
|
|
176
|
+
tableName: "heartbeat_run_events";
|
|
177
|
+
dataType: "string";
|
|
178
|
+
columnType: "PgUUID";
|
|
179
|
+
data: string;
|
|
180
|
+
driverParam: string;
|
|
181
|
+
notNull: true;
|
|
182
|
+
hasDefault: false;
|
|
183
|
+
isPrimaryKey: false;
|
|
184
|
+
isAutoincrement: false;
|
|
185
|
+
hasRuntimeDefault: false;
|
|
186
|
+
enumValues: undefined;
|
|
187
|
+
baseColumn: never;
|
|
188
|
+
identity: undefined;
|
|
189
|
+
generated: undefined;
|
|
190
|
+
}, {}, {}>;
|
|
191
|
+
runId: import("drizzle-orm/pg-core").PgColumn<{
|
|
192
|
+
name: "run_id";
|
|
193
|
+
tableName: "heartbeat_run_events";
|
|
194
|
+
dataType: "string";
|
|
195
|
+
columnType: "PgUUID";
|
|
196
|
+
data: string;
|
|
197
|
+
driverParam: string;
|
|
198
|
+
notNull: true;
|
|
199
|
+
hasDefault: false;
|
|
200
|
+
isPrimaryKey: false;
|
|
201
|
+
isAutoincrement: false;
|
|
202
|
+
hasRuntimeDefault: false;
|
|
203
|
+
enumValues: undefined;
|
|
204
|
+
baseColumn: never;
|
|
205
|
+
identity: undefined;
|
|
206
|
+
generated: undefined;
|
|
207
|
+
}, {}, {}>;
|
|
208
|
+
agentId: import("drizzle-orm/pg-core").PgColumn<{
|
|
209
|
+
name: "agent_id";
|
|
210
|
+
tableName: "heartbeat_run_events";
|
|
211
|
+
dataType: "string";
|
|
212
|
+
columnType: "PgUUID";
|
|
213
|
+
data: string;
|
|
214
|
+
driverParam: string;
|
|
215
|
+
notNull: true;
|
|
216
|
+
hasDefault: false;
|
|
217
|
+
isPrimaryKey: false;
|
|
218
|
+
isAutoincrement: false;
|
|
219
|
+
hasRuntimeDefault: false;
|
|
220
|
+
enumValues: undefined;
|
|
221
|
+
baseColumn: never;
|
|
222
|
+
identity: undefined;
|
|
223
|
+
generated: undefined;
|
|
224
|
+
}, {}, {}>;
|
|
225
|
+
seq: import("drizzle-orm/pg-core").PgColumn<{
|
|
226
|
+
name: "seq";
|
|
227
|
+
tableName: "heartbeat_run_events";
|
|
228
|
+
dataType: "number";
|
|
229
|
+
columnType: "PgInteger";
|
|
230
|
+
data: number;
|
|
231
|
+
driverParam: string | number;
|
|
232
|
+
notNull: true;
|
|
233
|
+
hasDefault: false;
|
|
234
|
+
isPrimaryKey: false;
|
|
235
|
+
isAutoincrement: false;
|
|
236
|
+
hasRuntimeDefault: false;
|
|
237
|
+
enumValues: undefined;
|
|
238
|
+
baseColumn: never;
|
|
239
|
+
identity: undefined;
|
|
240
|
+
generated: undefined;
|
|
241
|
+
}, {}, {}>;
|
|
242
|
+
eventType: import("drizzle-orm/pg-core").PgColumn<{
|
|
243
|
+
name: "event_type";
|
|
244
|
+
tableName: "heartbeat_run_events";
|
|
245
|
+
dataType: "string";
|
|
246
|
+
columnType: "PgText";
|
|
247
|
+
data: string;
|
|
248
|
+
driverParam: string;
|
|
249
|
+
notNull: true;
|
|
250
|
+
hasDefault: false;
|
|
251
|
+
isPrimaryKey: false;
|
|
252
|
+
isAutoincrement: false;
|
|
253
|
+
hasRuntimeDefault: false;
|
|
254
|
+
enumValues: [string, ...string[]];
|
|
255
|
+
baseColumn: never;
|
|
256
|
+
identity: undefined;
|
|
257
|
+
generated: undefined;
|
|
258
|
+
}, {}, {}>;
|
|
259
|
+
stream: import("drizzle-orm/pg-core").PgColumn<{
|
|
260
|
+
name: "stream";
|
|
261
|
+
tableName: "heartbeat_run_events";
|
|
262
|
+
dataType: "string";
|
|
263
|
+
columnType: "PgText";
|
|
264
|
+
data: string;
|
|
265
|
+
driverParam: string;
|
|
266
|
+
notNull: false;
|
|
267
|
+
hasDefault: false;
|
|
268
|
+
isPrimaryKey: false;
|
|
269
|
+
isAutoincrement: false;
|
|
270
|
+
hasRuntimeDefault: false;
|
|
271
|
+
enumValues: [string, ...string[]];
|
|
272
|
+
baseColumn: never;
|
|
273
|
+
identity: undefined;
|
|
274
|
+
generated: undefined;
|
|
275
|
+
}, {}, {}>;
|
|
276
|
+
level: import("drizzle-orm/pg-core").PgColumn<{
|
|
277
|
+
name: "level";
|
|
278
|
+
tableName: "heartbeat_run_events";
|
|
279
|
+
dataType: "string";
|
|
280
|
+
columnType: "PgText";
|
|
281
|
+
data: string;
|
|
282
|
+
driverParam: string;
|
|
283
|
+
notNull: false;
|
|
284
|
+
hasDefault: false;
|
|
285
|
+
isPrimaryKey: false;
|
|
286
|
+
isAutoincrement: false;
|
|
287
|
+
hasRuntimeDefault: false;
|
|
288
|
+
enumValues: [string, ...string[]];
|
|
289
|
+
baseColumn: never;
|
|
290
|
+
identity: undefined;
|
|
291
|
+
generated: undefined;
|
|
292
|
+
}, {}, {}>;
|
|
293
|
+
color: import("drizzle-orm/pg-core").PgColumn<{
|
|
294
|
+
name: "color";
|
|
295
|
+
tableName: "heartbeat_run_events";
|
|
296
|
+
dataType: "string";
|
|
297
|
+
columnType: "PgText";
|
|
298
|
+
data: string;
|
|
299
|
+
driverParam: string;
|
|
300
|
+
notNull: false;
|
|
301
|
+
hasDefault: false;
|
|
302
|
+
isPrimaryKey: false;
|
|
303
|
+
isAutoincrement: false;
|
|
304
|
+
hasRuntimeDefault: false;
|
|
305
|
+
enumValues: [string, ...string[]];
|
|
306
|
+
baseColumn: never;
|
|
307
|
+
identity: undefined;
|
|
308
|
+
generated: undefined;
|
|
309
|
+
}, {}, {}>;
|
|
310
|
+
message: import("drizzle-orm/pg-core").PgColumn<{
|
|
311
|
+
name: "message";
|
|
312
|
+
tableName: "heartbeat_run_events";
|
|
313
|
+
dataType: "string";
|
|
314
|
+
columnType: "PgText";
|
|
315
|
+
data: string;
|
|
316
|
+
driverParam: string;
|
|
317
|
+
notNull: false;
|
|
318
|
+
hasDefault: false;
|
|
319
|
+
isPrimaryKey: false;
|
|
320
|
+
isAutoincrement: false;
|
|
321
|
+
hasRuntimeDefault: false;
|
|
322
|
+
enumValues: [string, ...string[]];
|
|
323
|
+
baseColumn: never;
|
|
324
|
+
identity: undefined;
|
|
325
|
+
generated: undefined;
|
|
326
|
+
}, {}, {}>;
|
|
327
|
+
payload: import("drizzle-orm/pg-core").PgColumn<{
|
|
328
|
+
name: "payload";
|
|
329
|
+
tableName: "heartbeat_run_events";
|
|
330
|
+
dataType: "json";
|
|
331
|
+
columnType: "PgJsonb";
|
|
332
|
+
data: Record<string, unknown>;
|
|
333
|
+
driverParam: unknown;
|
|
334
|
+
notNull: false;
|
|
335
|
+
hasDefault: false;
|
|
336
|
+
isPrimaryKey: false;
|
|
337
|
+
isAutoincrement: false;
|
|
338
|
+
hasRuntimeDefault: false;
|
|
339
|
+
enumValues: undefined;
|
|
340
|
+
baseColumn: never;
|
|
341
|
+
identity: undefined;
|
|
342
|
+
generated: undefined;
|
|
343
|
+
}, {}, {
|
|
344
|
+
$type: Record<string, unknown>;
|
|
345
|
+
}>;
|
|
346
|
+
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
347
|
+
name: "created_at";
|
|
348
|
+
tableName: "heartbeat_run_events";
|
|
349
|
+
dataType: "date";
|
|
350
|
+
columnType: "PgTimestamp";
|
|
351
|
+
data: Date;
|
|
352
|
+
driverParam: string;
|
|
353
|
+
notNull: true;
|
|
354
|
+
hasDefault: true;
|
|
355
|
+
isPrimaryKey: false;
|
|
356
|
+
isAutoincrement: false;
|
|
357
|
+
hasRuntimeDefault: false;
|
|
358
|
+
enumValues: undefined;
|
|
359
|
+
baseColumn: never;
|
|
360
|
+
identity: undefined;
|
|
361
|
+
generated: undefined;
|
|
362
|
+
}, {}, {}>;
|
|
363
|
+
}, "single", Record<"heartbeat_run_events", "not-null">, false, "where" | "orderBy" | "limit", {
|
|
364
|
+
message: string | null;
|
|
365
|
+
id: number;
|
|
366
|
+
orgId: string;
|
|
367
|
+
createdAt: Date;
|
|
368
|
+
color: string | null;
|
|
369
|
+
payload: Record<string, unknown> | null;
|
|
370
|
+
agentId: string;
|
|
371
|
+
level: string | null;
|
|
372
|
+
runId: string;
|
|
373
|
+
seq: number;
|
|
374
|
+
eventType: string;
|
|
375
|
+
stream: string | null;
|
|
376
|
+
}[], {
|
|
377
|
+
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
378
|
+
name: "id";
|
|
379
|
+
tableName: "heartbeat_run_events";
|
|
380
|
+
dataType: "number";
|
|
381
|
+
columnType: "PgBigSerial53";
|
|
382
|
+
data: number;
|
|
383
|
+
driverParam: number;
|
|
384
|
+
notNull: true;
|
|
385
|
+
hasDefault: true;
|
|
386
|
+
isPrimaryKey: true;
|
|
387
|
+
isAutoincrement: false;
|
|
388
|
+
hasRuntimeDefault: false;
|
|
389
|
+
enumValues: undefined;
|
|
390
|
+
baseColumn: never;
|
|
391
|
+
identity: undefined;
|
|
392
|
+
generated: undefined;
|
|
393
|
+
}, {}, {}>;
|
|
394
|
+
orgId: import("drizzle-orm/pg-core").PgColumn<{
|
|
395
|
+
name: "org_id";
|
|
396
|
+
tableName: "heartbeat_run_events";
|
|
397
|
+
dataType: "string";
|
|
398
|
+
columnType: "PgUUID";
|
|
399
|
+
data: string;
|
|
400
|
+
driverParam: string;
|
|
401
|
+
notNull: true;
|
|
402
|
+
hasDefault: false;
|
|
403
|
+
isPrimaryKey: false;
|
|
404
|
+
isAutoincrement: false;
|
|
405
|
+
hasRuntimeDefault: false;
|
|
406
|
+
enumValues: undefined;
|
|
407
|
+
baseColumn: never;
|
|
408
|
+
identity: undefined;
|
|
409
|
+
generated: undefined;
|
|
410
|
+
}, {}, {}>;
|
|
411
|
+
runId: import("drizzle-orm/pg-core").PgColumn<{
|
|
412
|
+
name: "run_id";
|
|
413
|
+
tableName: "heartbeat_run_events";
|
|
414
|
+
dataType: "string";
|
|
415
|
+
columnType: "PgUUID";
|
|
416
|
+
data: string;
|
|
417
|
+
driverParam: string;
|
|
418
|
+
notNull: true;
|
|
419
|
+
hasDefault: false;
|
|
420
|
+
isPrimaryKey: false;
|
|
421
|
+
isAutoincrement: false;
|
|
422
|
+
hasRuntimeDefault: false;
|
|
423
|
+
enumValues: undefined;
|
|
424
|
+
baseColumn: never;
|
|
425
|
+
identity: undefined;
|
|
426
|
+
generated: undefined;
|
|
427
|
+
}, {}, {}>;
|
|
428
|
+
agentId: import("drizzle-orm/pg-core").PgColumn<{
|
|
429
|
+
name: "agent_id";
|
|
430
|
+
tableName: "heartbeat_run_events";
|
|
431
|
+
dataType: "string";
|
|
432
|
+
columnType: "PgUUID";
|
|
433
|
+
data: string;
|
|
434
|
+
driverParam: string;
|
|
435
|
+
notNull: true;
|
|
436
|
+
hasDefault: false;
|
|
437
|
+
isPrimaryKey: false;
|
|
438
|
+
isAutoincrement: false;
|
|
439
|
+
hasRuntimeDefault: false;
|
|
440
|
+
enumValues: undefined;
|
|
441
|
+
baseColumn: never;
|
|
442
|
+
identity: undefined;
|
|
443
|
+
generated: undefined;
|
|
444
|
+
}, {}, {}>;
|
|
445
|
+
seq: import("drizzle-orm/pg-core").PgColumn<{
|
|
446
|
+
name: "seq";
|
|
447
|
+
tableName: "heartbeat_run_events";
|
|
448
|
+
dataType: "number";
|
|
449
|
+
columnType: "PgInteger";
|
|
450
|
+
data: number;
|
|
451
|
+
driverParam: string | number;
|
|
452
|
+
notNull: true;
|
|
453
|
+
hasDefault: false;
|
|
454
|
+
isPrimaryKey: false;
|
|
455
|
+
isAutoincrement: false;
|
|
456
|
+
hasRuntimeDefault: false;
|
|
457
|
+
enumValues: undefined;
|
|
458
|
+
baseColumn: never;
|
|
459
|
+
identity: undefined;
|
|
460
|
+
generated: undefined;
|
|
461
|
+
}, {}, {}>;
|
|
462
|
+
eventType: import("drizzle-orm/pg-core").PgColumn<{
|
|
463
|
+
name: "event_type";
|
|
464
|
+
tableName: "heartbeat_run_events";
|
|
465
|
+
dataType: "string";
|
|
466
|
+
columnType: "PgText";
|
|
467
|
+
data: string;
|
|
468
|
+
driverParam: string;
|
|
469
|
+
notNull: true;
|
|
470
|
+
hasDefault: false;
|
|
471
|
+
isPrimaryKey: false;
|
|
472
|
+
isAutoincrement: false;
|
|
473
|
+
hasRuntimeDefault: false;
|
|
474
|
+
enumValues: [string, ...string[]];
|
|
475
|
+
baseColumn: never;
|
|
476
|
+
identity: undefined;
|
|
477
|
+
generated: undefined;
|
|
478
|
+
}, {}, {}>;
|
|
479
|
+
stream: import("drizzle-orm/pg-core").PgColumn<{
|
|
480
|
+
name: "stream";
|
|
481
|
+
tableName: "heartbeat_run_events";
|
|
482
|
+
dataType: "string";
|
|
483
|
+
columnType: "PgText";
|
|
484
|
+
data: string;
|
|
485
|
+
driverParam: string;
|
|
486
|
+
notNull: false;
|
|
487
|
+
hasDefault: false;
|
|
488
|
+
isPrimaryKey: false;
|
|
489
|
+
isAutoincrement: false;
|
|
490
|
+
hasRuntimeDefault: false;
|
|
491
|
+
enumValues: [string, ...string[]];
|
|
492
|
+
baseColumn: never;
|
|
493
|
+
identity: undefined;
|
|
494
|
+
generated: undefined;
|
|
495
|
+
}, {}, {}>;
|
|
496
|
+
level: import("drizzle-orm/pg-core").PgColumn<{
|
|
497
|
+
name: "level";
|
|
498
|
+
tableName: "heartbeat_run_events";
|
|
499
|
+
dataType: "string";
|
|
500
|
+
columnType: "PgText";
|
|
501
|
+
data: string;
|
|
502
|
+
driverParam: string;
|
|
503
|
+
notNull: false;
|
|
504
|
+
hasDefault: false;
|
|
505
|
+
isPrimaryKey: false;
|
|
506
|
+
isAutoincrement: false;
|
|
507
|
+
hasRuntimeDefault: false;
|
|
508
|
+
enumValues: [string, ...string[]];
|
|
509
|
+
baseColumn: never;
|
|
510
|
+
identity: undefined;
|
|
511
|
+
generated: undefined;
|
|
512
|
+
}, {}, {}>;
|
|
513
|
+
color: import("drizzle-orm/pg-core").PgColumn<{
|
|
514
|
+
name: "color";
|
|
515
|
+
tableName: "heartbeat_run_events";
|
|
516
|
+
dataType: "string";
|
|
517
|
+
columnType: "PgText";
|
|
518
|
+
data: string;
|
|
519
|
+
driverParam: string;
|
|
520
|
+
notNull: false;
|
|
521
|
+
hasDefault: false;
|
|
522
|
+
isPrimaryKey: false;
|
|
523
|
+
isAutoincrement: false;
|
|
524
|
+
hasRuntimeDefault: false;
|
|
525
|
+
enumValues: [string, ...string[]];
|
|
526
|
+
baseColumn: never;
|
|
527
|
+
identity: undefined;
|
|
528
|
+
generated: undefined;
|
|
529
|
+
}, {}, {}>;
|
|
530
|
+
message: import("drizzle-orm/pg-core").PgColumn<{
|
|
531
|
+
name: "message";
|
|
532
|
+
tableName: "heartbeat_run_events";
|
|
533
|
+
dataType: "string";
|
|
534
|
+
columnType: "PgText";
|
|
535
|
+
data: string;
|
|
536
|
+
driverParam: string;
|
|
537
|
+
notNull: false;
|
|
538
|
+
hasDefault: false;
|
|
539
|
+
isPrimaryKey: false;
|
|
540
|
+
isAutoincrement: false;
|
|
541
|
+
hasRuntimeDefault: false;
|
|
542
|
+
enumValues: [string, ...string[]];
|
|
543
|
+
baseColumn: never;
|
|
544
|
+
identity: undefined;
|
|
545
|
+
generated: undefined;
|
|
546
|
+
}, {}, {}>;
|
|
547
|
+
payload: import("drizzle-orm/pg-core").PgColumn<{
|
|
548
|
+
name: "payload";
|
|
549
|
+
tableName: "heartbeat_run_events";
|
|
550
|
+
dataType: "json";
|
|
551
|
+
columnType: "PgJsonb";
|
|
552
|
+
data: Record<string, unknown>;
|
|
553
|
+
driverParam: unknown;
|
|
554
|
+
notNull: false;
|
|
555
|
+
hasDefault: false;
|
|
556
|
+
isPrimaryKey: false;
|
|
557
|
+
isAutoincrement: false;
|
|
558
|
+
hasRuntimeDefault: false;
|
|
559
|
+
enumValues: undefined;
|
|
560
|
+
baseColumn: never;
|
|
561
|
+
identity: undefined;
|
|
562
|
+
generated: undefined;
|
|
563
|
+
}, {}, {
|
|
564
|
+
$type: Record<string, unknown>;
|
|
565
|
+
}>;
|
|
566
|
+
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
567
|
+
name: "created_at";
|
|
568
|
+
tableName: "heartbeat_run_events";
|
|
569
|
+
dataType: "date";
|
|
570
|
+
columnType: "PgTimestamp";
|
|
571
|
+
data: Date;
|
|
572
|
+
driverParam: string;
|
|
573
|
+
notNull: true;
|
|
574
|
+
hasDefault: true;
|
|
575
|
+
isPrimaryKey: false;
|
|
576
|
+
isAutoincrement: false;
|
|
577
|
+
hasRuntimeDefault: false;
|
|
578
|
+
enumValues: undefined;
|
|
579
|
+
baseColumn: never;
|
|
580
|
+
identity: undefined;
|
|
581
|
+
generated: undefined;
|
|
582
|
+
}, {}, {}>;
|
|
583
|
+
}>, "where" | "orderBy" | "limit">;
|
|
584
|
+
readLog: (runId: string, opts?: {
|
|
585
|
+
offset?: number;
|
|
586
|
+
limitBytes?: number;
|
|
587
|
+
}) => Promise<{
|
|
588
|
+
content: string;
|
|
589
|
+
endOffset: number;
|
|
590
|
+
eof: boolean;
|
|
591
|
+
nextOffset?: number;
|
|
592
|
+
runId: string;
|
|
593
|
+
store: string;
|
|
594
|
+
logRef: string;
|
|
595
|
+
}>;
|
|
596
|
+
invoke: (agentId: string, source?: "timer" | "assignment" | "on_demand" | "automation", contextSnapshot?: Record<string, unknown>, triggerDetail?: "manual" | "ping" | "callback" | "system", actor?: {
|
|
597
|
+
actorType?: "user" | "agent" | "system";
|
|
598
|
+
actorId?: string | null;
|
|
599
|
+
}) => Promise<{
|
|
600
|
+
error: string | null;
|
|
601
|
+
id: string;
|
|
602
|
+
status: string;
|
|
603
|
+
updatedAt: Date;
|
|
604
|
+
orgId: string;
|
|
605
|
+
startedAt: Date | null;
|
|
606
|
+
createdAt: Date;
|
|
607
|
+
triggerDetail: string | null;
|
|
608
|
+
agentId: string;
|
|
609
|
+
finishedAt: Date | null;
|
|
610
|
+
invocationSource: string;
|
|
611
|
+
wakeupRequestId: string | null;
|
|
612
|
+
exitCode: number | null;
|
|
613
|
+
signal: string | null;
|
|
614
|
+
usageJson: Record<string, unknown> | null;
|
|
615
|
+
resultJson: Record<string, unknown> | null;
|
|
616
|
+
sessionIdBefore: string | null;
|
|
617
|
+
sessionIdAfter: string | null;
|
|
618
|
+
logStore: string | null;
|
|
619
|
+
logRef: string | null;
|
|
620
|
+
logBytes: number | null;
|
|
621
|
+
logSha256: string | null;
|
|
622
|
+
logCompressed: boolean;
|
|
623
|
+
stdoutExcerpt: string | null;
|
|
624
|
+
stderrExcerpt: string | null;
|
|
625
|
+
errorCode: string | null;
|
|
626
|
+
externalRunId: string | null;
|
|
627
|
+
processPid: number | null;
|
|
628
|
+
processStartedAt: Date | null;
|
|
629
|
+
retryOfRunId: string | null;
|
|
630
|
+
processLossRetryCount: number;
|
|
631
|
+
contextSnapshot: Record<string, unknown> | null;
|
|
632
|
+
} | null>;
|
|
633
|
+
wakeup: (agentId: string, opts?: WakeupOptions) => Promise<{
|
|
634
|
+
error: string | null;
|
|
635
|
+
id: string;
|
|
636
|
+
status: string;
|
|
637
|
+
updatedAt: Date;
|
|
638
|
+
orgId: string;
|
|
639
|
+
startedAt: Date | null;
|
|
640
|
+
createdAt: Date;
|
|
641
|
+
triggerDetail: string | null;
|
|
642
|
+
agentId: string;
|
|
643
|
+
finishedAt: Date | null;
|
|
644
|
+
invocationSource: string;
|
|
645
|
+
wakeupRequestId: string | null;
|
|
646
|
+
exitCode: number | null;
|
|
647
|
+
signal: string | null;
|
|
648
|
+
usageJson: Record<string, unknown> | null;
|
|
649
|
+
resultJson: Record<string, unknown> | null;
|
|
650
|
+
sessionIdBefore: string | null;
|
|
651
|
+
sessionIdAfter: string | null;
|
|
652
|
+
logStore: string | null;
|
|
653
|
+
logRef: string | null;
|
|
654
|
+
logBytes: number | null;
|
|
655
|
+
logSha256: string | null;
|
|
656
|
+
logCompressed: boolean;
|
|
657
|
+
stdoutExcerpt: string | null;
|
|
658
|
+
stderrExcerpt: string | null;
|
|
659
|
+
errorCode: string | null;
|
|
660
|
+
externalRunId: string | null;
|
|
661
|
+
processPid: number | null;
|
|
662
|
+
processStartedAt: Date | null;
|
|
663
|
+
retryOfRunId: string | null;
|
|
664
|
+
processLossRetryCount: number;
|
|
665
|
+
contextSnapshot: Record<string, unknown> | null;
|
|
666
|
+
} | null>;
|
|
667
|
+
resumeDeferredWakeupsForAgent: (agentId: string) => Promise<{
|
|
668
|
+
replayed: number;
|
|
669
|
+
wakeupRequestIds: string[];
|
|
670
|
+
}>;
|
|
671
|
+
retryRun: (runId: string, opts?: {
|
|
672
|
+
requestedByActorType?: WakeupOptions["requestedByActorType"];
|
|
673
|
+
requestedByActorId?: string | null;
|
|
674
|
+
now?: Date;
|
|
675
|
+
}) => Promise<{
|
|
676
|
+
error: string | null;
|
|
677
|
+
id: string;
|
|
678
|
+
status: string;
|
|
679
|
+
updatedAt: Date;
|
|
680
|
+
orgId: string;
|
|
681
|
+
startedAt: Date | null;
|
|
682
|
+
createdAt: Date;
|
|
683
|
+
triggerDetail: string | null;
|
|
684
|
+
agentId: string;
|
|
685
|
+
finishedAt: Date | null;
|
|
686
|
+
invocationSource: string;
|
|
687
|
+
wakeupRequestId: string | null;
|
|
688
|
+
exitCode: number | null;
|
|
689
|
+
signal: string | null;
|
|
690
|
+
usageJson: Record<string, unknown> | null;
|
|
691
|
+
resultJson: Record<string, unknown> | null;
|
|
692
|
+
sessionIdBefore: string | null;
|
|
693
|
+
sessionIdAfter: string | null;
|
|
694
|
+
logStore: string | null;
|
|
695
|
+
logRef: string | null;
|
|
696
|
+
logBytes: number | null;
|
|
697
|
+
logSha256: string | null;
|
|
698
|
+
logCompressed: boolean;
|
|
699
|
+
stdoutExcerpt: string | null;
|
|
700
|
+
stderrExcerpt: string | null;
|
|
701
|
+
errorCode: string | null;
|
|
702
|
+
externalRunId: string | null;
|
|
703
|
+
processPid: number | null;
|
|
704
|
+
processStartedAt: Date | null;
|
|
705
|
+
retryOfRunId: string | null;
|
|
706
|
+
processLossRetryCount: number;
|
|
707
|
+
contextSnapshot: Record<string, unknown> | null;
|
|
708
|
+
}>;
|
|
709
|
+
reportRunActivity: (runId: string) => Promise<{
|
|
710
|
+
id: string;
|
|
711
|
+
orgId: string;
|
|
712
|
+
agentId: string;
|
|
713
|
+
invocationSource: string;
|
|
714
|
+
triggerDetail: string | null;
|
|
715
|
+
status: string;
|
|
716
|
+
startedAt: Date | null;
|
|
717
|
+
finishedAt: Date | null;
|
|
718
|
+
error: string | null;
|
|
719
|
+
wakeupRequestId: string | null;
|
|
720
|
+
exitCode: number | null;
|
|
721
|
+
signal: string | null;
|
|
722
|
+
usageJson: Record<string, unknown> | null;
|
|
723
|
+
resultJson: Record<string, unknown> | null;
|
|
724
|
+
sessionIdBefore: string | null;
|
|
725
|
+
sessionIdAfter: string | null;
|
|
726
|
+
logStore: string | null;
|
|
727
|
+
logRef: string | null;
|
|
728
|
+
logBytes: number | null;
|
|
729
|
+
logSha256: string | null;
|
|
730
|
+
logCompressed: boolean;
|
|
731
|
+
stdoutExcerpt: string | null;
|
|
732
|
+
stderrExcerpt: string | null;
|
|
733
|
+
errorCode: string | null;
|
|
734
|
+
externalRunId: string | null;
|
|
735
|
+
processPid: number | null;
|
|
736
|
+
processStartedAt: Date | null;
|
|
737
|
+
retryOfRunId: string | null;
|
|
738
|
+
processLossRetryCount: number;
|
|
739
|
+
contextSnapshot: Record<string, unknown> | null;
|
|
740
|
+
createdAt: Date;
|
|
741
|
+
updatedAt: Date;
|
|
742
|
+
} | null>;
|
|
743
|
+
reapOrphanedRuns: (opts?: {
|
|
744
|
+
staleThresholdMs?: number;
|
|
745
|
+
}) => Promise<{
|
|
746
|
+
reaped: number;
|
|
747
|
+
runIds: string[];
|
|
748
|
+
}>;
|
|
749
|
+
resumeQueuedRuns: () => Promise<void>;
|
|
750
|
+
tickTimers: (now?: Date) => Promise<{
|
|
751
|
+
checked: number;
|
|
752
|
+
enqueued: number;
|
|
753
|
+
skipped: number;
|
|
754
|
+
}>;
|
|
755
|
+
cancelRun: (runId: string) => Promise<{
|
|
756
|
+
error: string | null;
|
|
757
|
+
id: string;
|
|
758
|
+
status: string;
|
|
759
|
+
updatedAt: Date;
|
|
760
|
+
orgId: string;
|
|
761
|
+
startedAt: Date | null;
|
|
762
|
+
createdAt: Date;
|
|
763
|
+
triggerDetail: string | null;
|
|
764
|
+
agentId: string;
|
|
765
|
+
finishedAt: Date | null;
|
|
766
|
+
invocationSource: string;
|
|
767
|
+
wakeupRequestId: string | null;
|
|
768
|
+
exitCode: number | null;
|
|
769
|
+
signal: string | null;
|
|
770
|
+
usageJson: Record<string, unknown> | null;
|
|
771
|
+
resultJson: Record<string, unknown> | null;
|
|
772
|
+
sessionIdBefore: string | null;
|
|
773
|
+
sessionIdAfter: string | null;
|
|
774
|
+
logStore: string | null;
|
|
775
|
+
logRef: string | null;
|
|
776
|
+
logBytes: number | null;
|
|
777
|
+
logSha256: string | null;
|
|
778
|
+
logCompressed: boolean;
|
|
779
|
+
stdoutExcerpt: string | null;
|
|
780
|
+
stderrExcerpt: string | null;
|
|
781
|
+
errorCode: string | null;
|
|
782
|
+
externalRunId: string | null;
|
|
783
|
+
processPid: number | null;
|
|
784
|
+
processStartedAt: Date | null;
|
|
785
|
+
retryOfRunId: string | null;
|
|
786
|
+
processLossRetryCount: number;
|
|
787
|
+
contextSnapshot: Record<string, unknown> | null;
|
|
788
|
+
}>;
|
|
789
|
+
cancelActiveForAgent: (agentId: string) => Promise<number>;
|
|
790
|
+
cancelBudgetScopeWork: (scope: BudgetEnforcementScope) => Promise<void>;
|
|
791
|
+
getActiveRunForAgent: (agentId: string) => Promise<{
|
|
792
|
+
error: string | null;
|
|
793
|
+
id: string;
|
|
794
|
+
status: string;
|
|
795
|
+
updatedAt: Date;
|
|
796
|
+
orgId: string;
|
|
797
|
+
startedAt: Date | null;
|
|
798
|
+
createdAt: Date;
|
|
799
|
+
triggerDetail: string | null;
|
|
800
|
+
agentId: string;
|
|
801
|
+
finishedAt: Date | null;
|
|
802
|
+
invocationSource: string;
|
|
803
|
+
wakeupRequestId: string | null;
|
|
804
|
+
exitCode: number | null;
|
|
805
|
+
signal: string | null;
|
|
806
|
+
usageJson: Record<string, unknown> | null;
|
|
807
|
+
resultJson: Record<string, unknown> | null;
|
|
808
|
+
sessionIdBefore: string | null;
|
|
809
|
+
sessionIdAfter: string | null;
|
|
810
|
+
logStore: string | null;
|
|
811
|
+
logRef: string | null;
|
|
812
|
+
logBytes: number | null;
|
|
813
|
+
logSha256: string | null;
|
|
814
|
+
logCompressed: boolean;
|
|
815
|
+
stdoutExcerpt: string | null;
|
|
816
|
+
stderrExcerpt: string | null;
|
|
817
|
+
errorCode: string | null;
|
|
818
|
+
externalRunId: string | null;
|
|
819
|
+
processPid: number | null;
|
|
820
|
+
processStartedAt: Date | null;
|
|
821
|
+
retryOfRunId: string | null;
|
|
822
|
+
processLossRetryCount: number;
|
|
823
|
+
contextSnapshot: Record<string, unknown> | null;
|
|
824
|
+
}>;
|
|
825
|
+
};
|
|
826
|
+
//# sourceMappingURL=orchestrator.d.ts.map
|