@rudderhq/server 0.3.6-canary.2 → 0.3.6-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/plugin-host-runtime.d.ts +12 -12
- package/dist/bundled-plugins/plugin-linear/dist/worker.js +48 -1
- package/dist/bundled-plugins/plugin-linear/dist/worker.js.map +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -1
- package/dist/routes/access.helpers.d.ts +1 -1
- package/dist/routes/activity.d.ts +1 -1
- package/dist/routes/activity.d.ts.map +1 -1
- package/dist/routes/activity.js +18 -5
- package/dist/routes/activity.js.map +1 -1
- package/dist/routes/agents.d.ts.map +1 -1
- package/dist/routes/agents.js +89 -2
- package/dist/routes/agents.js.map +1 -1
- package/dist/routes/agents.management-routes.d.ts.map +1 -1
- package/dist/routes/agents.management-routes.js +100 -22
- package/dist/routes/agents.management-routes.js.map +1 -1
- package/dist/routes/chats.d.ts.map +1 -1
- package/dist/routes/chats.js +171 -7
- package/dist/routes/chats.js.map +1 -1
- package/dist/routes/chats.stream-routes.d.ts.map +1 -1
- package/dist/routes/chats.stream-routes.js +84 -3
- package/dist/routes/chats.stream-routes.js.map +1 -1
- package/dist/routes/integrations.d.ts.map +1 -1
- package/dist/routes/integrations.js +21 -0
- package/dist/routes/integrations.js.map +1 -1
- package/dist/routes/issues.comments-attachments.d.ts.map +1 -1
- package/dist/routes/issues.comments-attachments.js +6 -3
- package/dist/routes/issues.comments-attachments.js.map +1 -1
- package/dist/routes/issues.d.ts.map +1 -1
- package/dist/routes/issues.js +4 -1
- package/dist/routes/issues.js.map +1 -1
- package/dist/routes/messenger.d.ts.map +1 -1
- package/dist/routes/messenger.js +7 -1
- package/dist/routes/messenger.js.map +1 -1
- package/dist/services/access.d.ts +7 -7
- package/dist/services/activity.d.ts +5 -5
- package/dist/services/activity.d.ts.map +1 -1
- package/dist/services/activity.js +1 -1
- package/dist/services/activity.js.map +1 -1
- package/dist/services/agent-run-context.d.ts +12 -0
- package/dist/services/agent-run-context.d.ts.map +1 -1
- package/dist/services/agent-run-context.js +91 -39
- package/dist/services/agent-run-context.js.map +1 -1
- package/dist/services/agent-startup-context.d.ts +84 -0
- package/dist/services/agent-startup-context.d.ts.map +1 -0
- package/dist/services/agent-startup-context.js +347 -0
- package/dist/services/agent-startup-context.js.map +1 -0
- package/dist/services/agents.d.ts +33 -20
- package/dist/services/agents.d.ts.map +1 -1
- package/dist/services/agents.js +16 -1
- package/dist/services/agents.js.map +1 -1
- package/dist/services/approvals.d.ts +5 -5
- package/dist/services/assets.d.ts +6 -6
- package/dist/services/automation-chat-output.d.ts +3 -3
- package/dist/services/automations.d.ts +13 -13
- package/dist/services/automations.d.ts.map +1 -1
- package/dist/services/automations.js +17 -28
- package/dist/services/automations.js.map +1 -1
- package/dist/services/board-auth.d.ts +2 -2
- package/dist/services/calendar.d.ts +6 -6
- package/dist/services/chat-agent-runs.d.ts +1 -0
- package/dist/services/chat-agent-runs.d.ts.map +1 -1
- package/dist/services/chat-agent-runs.js +5 -0
- package/dist/services/chat-agent-runs.js.map +1 -1
- package/dist/services/chat-assistant.d.ts.map +1 -1
- package/dist/services/chat-assistant.helpers.d.ts +1 -0
- package/dist/services/chat-assistant.helpers.d.ts.map +1 -1
- package/dist/services/chat-assistant.helpers.js +6 -9
- package/dist/services/chat-assistant.helpers.js.map +1 -1
- package/dist/services/chat-assistant.js +3 -0
- package/dist/services/chat-assistant.js.map +1 -1
- package/dist/services/chat-generation-locks.d.ts +6 -1
- package/dist/services/chat-generation-locks.d.ts.map +1 -1
- package/dist/services/chat-generation-locks.js +20 -2
- package/dist/services/chat-generation-locks.js.map +1 -1
- package/dist/services/chats.d.ts +391 -74
- package/dist/services/chats.d.ts.map +1 -1
- package/dist/services/chats.helpers.d.ts +2 -2
- package/dist/services/chats.js +341 -3
- package/dist/services/chats.js.map +1 -1
- package/dist/services/costs.d.ts +3 -3
- package/dist/services/finance.d.ts +6 -6
- package/dist/services/goals.d.ts +6 -6
- 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/integrations/agent-integrations.d.ts +26 -603
- package/dist/services/integrations/agent-integrations.d.ts.map +1 -1
- package/dist/services/integrations/agent-integrations.js +32 -2
- package/dist/services/integrations/agent-integrations.js.map +1 -1
- package/dist/services/integrations/feishu/callback-credentials.d.ts +9 -0
- package/dist/services/integrations/feishu/callback-credentials.d.ts.map +1 -0
- package/dist/services/integrations/feishu/callback-credentials.js +54 -0
- package/dist/services/integrations/feishu/callback-credentials.js.map +1 -0
- package/dist/services/integrations/feishu/event-verifier.d.ts +24 -0
- package/dist/services/integrations/feishu/event-verifier.d.ts.map +1 -0
- package/dist/services/integrations/feishu/event-verifier.js +70 -0
- package/dist/services/integrations/feishu/event-verifier.js.map +1 -0
- package/dist/services/integrations/feishu/inbound-dispatcher-db.d.ts +2 -0
- package/dist/services/integrations/feishu/inbound-dispatcher-db.d.ts.map +1 -1
- package/dist/services/integrations/feishu/inbound-dispatcher-db.js +14 -7
- package/dist/services/integrations/feishu/inbound-dispatcher-db.js.map +1 -1
- package/dist/services/integrations/feishu/inbound-dispatcher.d.ts +14 -1
- package/dist/services/integrations/feishu/inbound-dispatcher.d.ts.map +1 -1
- package/dist/services/integrations/feishu/inbound-dispatcher.js +33 -2
- package/dist/services/integrations/feishu/inbound-dispatcher.js.map +1 -1
- package/dist/services/integrations/feishu/runtime.d.ts +75 -0
- package/dist/services/integrations/feishu/runtime.d.ts.map +1 -0
- package/dist/services/integrations/feishu/runtime.js +362 -0
- package/dist/services/integrations/feishu/runtime.js.map +1 -0
- package/dist/services/issue-approvals.d.ts +2 -2
- package/dist/services/issues.comments-attachments.d.ts +18 -7
- package/dist/services/issues.comments-attachments.d.ts.map +1 -1
- package/dist/services/issues.comments-attachments.js +98 -13
- package/dist/services/issues.comments-attachments.js.map +1 -1
- package/dist/services/issues.d.ts +23 -12
- package/dist/services/issues.d.ts.map +1 -1
- package/dist/services/issues.helpers.d.ts +2 -0
- package/dist/services/issues.helpers.d.ts.map +1 -1
- package/dist/services/issues.helpers.js +23 -0
- package/dist/services/issues.helpers.js.map +1 -1
- package/dist/services/issues.js +3 -3
- package/dist/services/issues.js.map +1 -1
- package/dist/services/messenger.d.ts +10 -4
- package/dist/services/messenger.d.ts.map +1 -1
- package/dist/services/messenger.js +163 -24
- package/dist/services/messenger.js.map +1 -1
- package/dist/services/orgs.d.ts +1 -1
- package/dist/services/plugin-registry.d.ts +34 -34
- package/dist/services/projects.d.ts +1 -1
- package/dist/services/runtime-kernel/heartbeat.core.d.ts +20 -1
- package/dist/services/runtime-kernel/heartbeat.core.d.ts.map +1 -1
- package/dist/services/runtime-kernel/heartbeat.core.js +152 -12
- package/dist/services/runtime-kernel/heartbeat.core.js.map +1 -1
- package/dist/services/runtime-kernel/heartbeat.d.ts +10 -10
- package/dist/services/runtime-kernel/heartbeat.execute.d.ts.map +1 -1
- package/dist/services/runtime-kernel/heartbeat.execute.js +64 -16
- package/dist/services/runtime-kernel/heartbeat.execute.js.map +1 -1
- package/dist/services/runtime-kernel/heartbeat.sessions.d.ts.map +1 -1
- package/dist/services/runtime-kernel/heartbeat.sessions.js +81 -12
- package/dist/services/runtime-kernel/heartbeat.sessions.js.map +1 -1
- package/dist/services/secrets.d.ts +15 -15
- package/dist/services/workspace-runtime.services.d.ts +3 -3
- package/package.json +13 -13
- package/resources/bundled-skills/para-memory-files/SKILL.md +34 -8
- package/resources/bundled-skills/para-memory-files/evals/conversation-capture.md +26 -0
- package/resources/bundled-skills/para-memory-files/references/schemas.md +26 -0
- package/resources/bundled-skills/rudder/SKILL.md +9 -0
- package/resources/bundled-skills/rudder/references/cli-reference.md +6 -4
- package/skills/para-memory-files/SKILL.md +34 -8
- package/skills/para-memory-files/evals/conversation-capture.md +26 -0
- package/skills/para-memory-files/references/schemas.md +26 -0
- package/skills/rudder/SKILL.md +9 -0
- package/skills/rudder/references/cli-reference.md +6 -4
- package/ui-dist/assets/{_basePickBy-CcD8DFEo.js → _basePickBy-ISxvtQmh.js} +1 -1
- package/ui-dist/assets/{_baseUniq-Dol1zTsM.js → _baseUniq-DHI7TVxX.js} +1 -1
- package/ui-dist/assets/{arc-CIQpjNW4.js → arc-BUMdDwhB.js} +1 -1
- package/ui-dist/assets/{architectureDiagram-2XIMDMQ5-BAgSxOsl.js → architectureDiagram-2XIMDMQ5-C5L1JNhe.js} +1 -1
- package/ui-dist/assets/{blockDiagram-WCTKOSBZ-CGyFTorY.js → blockDiagram-WCTKOSBZ-BVufAfZ6.js} +1 -1
- package/ui-dist/assets/{c4Diagram-IC4MRINW-CEEqddDU.js → c4Diagram-IC4MRINW-BhHlEAZv.js} +1 -1
- package/ui-dist/assets/channel-CVNEMZd5.js +1 -0
- package/ui-dist/assets/{chunk-4BX2VUAB-BDGaHIF5.js → chunk-4BX2VUAB-v5kH5_-V.js} +1 -1
- package/ui-dist/assets/{chunk-55IACEB6-CSoZuI_8.js → chunk-55IACEB6-TNezZWhV.js} +1 -1
- package/ui-dist/assets/{chunk-FMBD7UC4-DrlPlIm5.js → chunk-FMBD7UC4-DJduihz6.js} +1 -1
- package/ui-dist/assets/{chunk-JSJVCQXG-DahVPShT.js → chunk-JSJVCQXG-B2jFwzBe.js} +1 -1
- package/ui-dist/assets/{chunk-KX2RTZJC-Dh5zWzM8.js → chunk-KX2RTZJC-CdDz3cqH.js} +1 -1
- package/ui-dist/assets/{chunk-NQ4KR5QH-BsxpsJJs.js → chunk-NQ4KR5QH-vhQQUT-L.js} +1 -1
- package/ui-dist/assets/{chunk-QZHKN3VN-uSnPNcZ5.js → chunk-QZHKN3VN-C4petxFG.js} +1 -1
- package/ui-dist/assets/{chunk-WL4C6EOR-Cb_ahVLl.js → chunk-WL4C6EOR-CxpSuOrC.js} +1 -1
- package/ui-dist/assets/classDiagram-VBA2DB6C-dXctjUNC.js +1 -0
- package/ui-dist/assets/classDiagram-v2-RAHNMMFH-dXctjUNC.js +1 -0
- package/ui-dist/assets/clone-DrfVa0Lm.js +1 -0
- package/ui-dist/assets/{cose-bilkent-S5V4N54A-DlJDGTnB.js → cose-bilkent-S5V4N54A-Cu-LUWwt.js} +1 -1
- package/ui-dist/assets/{dagre-KLK3FWXG-DvnLQute.js → dagre-KLK3FWXG-BznM_tXi.js} +1 -1
- package/ui-dist/assets/{diagram-E7M64L7V-CRdm9gWn.js → diagram-E7M64L7V-B9vbnF0G.js} +1 -1
- package/ui-dist/assets/{diagram-IFDJBPK2-DZOej-GY.js → diagram-IFDJBPK2-B0K7p5ip.js} +1 -1
- package/ui-dist/assets/{diagram-P4PSJMXO-L57zGtmq.js → diagram-P4PSJMXO-B317ppu9.js} +1 -1
- package/ui-dist/assets/{erDiagram-INFDFZHY-CSRy8XrP.js → erDiagram-INFDFZHY-DxQn1H79.js} +1 -1
- package/ui-dist/assets/{flowDiagram-PKNHOUZH-DDW1GdoS.js → flowDiagram-PKNHOUZH-BRlHfAhO.js} +1 -1
- package/ui-dist/assets/{ganttDiagram-A5KZAMGK-rdmcT7DC.js → ganttDiagram-A5KZAMGK-ZPQATwOp.js} +1 -1
- package/ui-dist/assets/{gitGraphDiagram-K3NZZRJ6-Dg6khMQq.js → gitGraphDiagram-K3NZZRJ6-2FSSHn2W.js} +1 -1
- package/ui-dist/assets/{graph-rJl07fmI.js → graph-CsZPLb0i.js} +1 -1
- package/ui-dist/assets/{index-6XT0f8SC.js → index-0pvUeq7z.js} +1 -1
- package/ui-dist/assets/{index-CiIjHYkZ.js → index-3-X7SqUg.js} +1 -1
- package/ui-dist/assets/{index-DQABP5G0.js → index-3ucNWY-Q.js} +1 -1
- package/ui-dist/assets/{index-Bl7ecGnt.js → index-8RSGq1Wg.js} +1 -1
- package/ui-dist/assets/{index-3z9gN6vz.js → index-B8mi4SQV.js} +1 -1
- package/ui-dist/assets/{index-BGauRcOh.js → index-BIqU1aGN.js} +1 -1
- package/ui-dist/assets/{index-DkiaQfyg.js → index-BWo8nSUI.js} +1 -1
- package/ui-dist/assets/index-Bgik3-sp.css +1 -0
- package/ui-dist/assets/{index-C65ndIIg.js → index-C1WpEOab.js} +1 -1
- package/ui-dist/assets/{index-CjBuwQCg.js → index-C9juwYGf.js} +1 -1
- package/ui-dist/assets/{index-BaDAStQB.js → index-CUK1YqbJ.js} +1 -1
- package/ui-dist/assets/{index-D_KtoLTQ.js → index-Cgj3Uagb.js} +1 -1
- package/ui-dist/assets/{index-CxS_-UO4.js → index-DJAdEjzj.js} +1 -1
- package/ui-dist/assets/{index-BfZsNU5h.js → index-DfWM3Q6p.js} +1 -1
- package/ui-dist/assets/{index-BEWhrdwh.js → index-DowAq2x5.js} +1 -1
- package/ui-dist/assets/{index-DGHRHBKO.js → index-DuTOtG2a.js} +1 -1
- package/ui-dist/assets/{index-CqfiMpHY.js → index-KNsGlYUl.js} +1 -1
- package/ui-dist/assets/{index-jadvIFpg.js → index-NFMzhEMm.js} +1 -1
- package/ui-dist/assets/{index-BlJROSd_.js → index-uK_jgMIY.js} +447 -442
- package/ui-dist/assets/{infoDiagram-LFFYTUFH-DEymHZr8.js → infoDiagram-LFFYTUFH-BgBXtPzj.js} +1 -1
- package/ui-dist/assets/{ishikawaDiagram-PHBUUO56-B1F9V87B.js → ishikawaDiagram-PHBUUO56-Br_xLiU5.js} +1 -1
- package/ui-dist/assets/{journeyDiagram-4ABVD52K-wXBUBo_k.js → journeyDiagram-4ABVD52K-BAuuTIbm.js} +1 -1
- package/ui-dist/assets/{kanban-definition-K7BYSVSG-Douzrzlt.js → kanban-definition-K7BYSVSG-8NU1bqkN.js} +1 -1
- package/ui-dist/assets/{layout-bPOlN3pV.js → layout-DVTXzgPf.js} +1 -1
- package/ui-dist/assets/{linear-6GPY4A_9.js → linear-BYaSYTI4.js} +1 -1
- package/ui-dist/assets/{mermaid.core-zeNDPCvd.js → mermaid.core-D4Wu9eUI.js} +4 -4
- package/ui-dist/assets/{mindmap-definition-YRQLILUH-BzOSHeev.js → mindmap-definition-YRQLILUH-c_2HEgE4.js} +1 -1
- package/ui-dist/assets/{pieDiagram-SKSYHLDU-BzeTtbMZ.js → pieDiagram-SKSYHLDU-CGRMShDr.js} +1 -1
- package/ui-dist/assets/{quadrantDiagram-337W2JSQ-BXuYu1eP.js → quadrantDiagram-337W2JSQ-CooS1cJi.js} +1 -1
- package/ui-dist/assets/{requirementDiagram-Z7DCOOCP-BXOk_5q0.js → requirementDiagram-Z7DCOOCP-PfB17V04.js} +1 -1
- package/ui-dist/assets/{sankeyDiagram-WA2Y5GQK-c5Oi3One.js → sankeyDiagram-WA2Y5GQK-S5EYlVvD.js} +1 -1
- package/ui-dist/assets/{sequenceDiagram-2WXFIKYE-83aGU0n9.js → sequenceDiagram-2WXFIKYE-Bl2xrmxE.js} +1 -1
- package/ui-dist/assets/{stateDiagram-RAJIS63D-DHQtOybw.js → stateDiagram-RAJIS63D-mqqvpOjv.js} +1 -1
- package/ui-dist/assets/stateDiagram-v2-FVOUBMTO-BvzZKEX9.js +1 -0
- package/ui-dist/assets/{timeline-definition-YZTLITO2-GpY269qE.js → timeline-definition-YZTLITO2-n9U6Vtk4.js} +1 -1
- package/ui-dist/assets/{treemap-KZPCXAKY-HNAJqXUS.js → treemap-KZPCXAKY-Dw__9-kb.js} +1 -1
- package/ui-dist/assets/{vennDiagram-LZ73GAT5-xnvz7co6.js → vennDiagram-LZ73GAT5-CetcOiXZ.js} +1 -1
- package/ui-dist/assets/{xychartDiagram-JWTSCODW-DLsulaPB.js → xychartDiagram-JWTSCODW-Drfx0k7A.js} +1 -1
- package/ui-dist/brands/cursor-app-icon.svg +4 -0
- package/ui-dist/index.html +2 -2
- package/ui-dist/assets/channel-BrjzfGTO.js +0 -1
- package/ui-dist/assets/classDiagram-VBA2DB6C-BHMaQipn.js +0 -1
- package/ui-dist/assets/classDiagram-v2-RAHNMMFH-BHMaQipn.js +0 -1
- package/ui-dist/assets/clone-PUUtvoP8.js +0 -1
- package/ui-dist/assets/index-Dv6aTCoB.css +0 -1
- package/ui-dist/assets/stateDiagram-v2-FVOUBMTO-BdRV3T4l.js +0 -1
package/dist/services/chats.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Db } from "@rudderhq/db";
|
|
2
|
-
import { approvals, chatConversations } from "@rudderhq/db";
|
|
3
|
-
import { type ChatStreamTranscriptEntry } from "@rudderhq/shared";
|
|
2
|
+
import { approvals, chatConversations, chatGenerations } from "@rudderhq/db";
|
|
3
|
+
import { type ChatQueuedMessagePayload, type ChatStreamTranscriptEntry } from "@rudderhq/shared";
|
|
4
|
+
type ChatGenerationRow = typeof chatGenerations.$inferSelect;
|
|
4
5
|
type ConversationSummaryCursor = {
|
|
5
6
|
activityAt: Date;
|
|
6
7
|
title: string;
|
|
@@ -35,6 +36,7 @@ export declare function chatService(db: Db): {
|
|
|
35
36
|
priority?: string | null;
|
|
36
37
|
href: string;
|
|
37
38
|
} | null;
|
|
39
|
+
conversationId: string;
|
|
38
40
|
id: string;
|
|
39
41
|
orgId: string;
|
|
40
42
|
createdAt: Date;
|
|
@@ -42,7 +44,6 @@ export declare function chatService(db: Db): {
|
|
|
42
44
|
entityType: string;
|
|
43
45
|
entityId: string;
|
|
44
46
|
metadata: Record<string, unknown> | null;
|
|
45
|
-
conversationId: string;
|
|
46
47
|
}[];
|
|
47
48
|
lastReadAt: Date | null;
|
|
48
49
|
isPinned: boolean;
|
|
@@ -51,10 +52,10 @@ export declare function chatService(db: Db): {
|
|
|
51
52
|
needsAttention: boolean;
|
|
52
53
|
id: string;
|
|
53
54
|
orgId: string;
|
|
54
|
-
|
|
55
|
+
status: string;
|
|
55
56
|
createdAt: Date;
|
|
56
57
|
updatedAt: Date;
|
|
57
|
-
|
|
58
|
+
createdByUserId: string | null;
|
|
58
59
|
title: string;
|
|
59
60
|
summary: string | null;
|
|
60
61
|
preferredAgentId: string | null;
|
|
@@ -81,10 +82,10 @@ export declare function chatService(db: Db): {
|
|
|
81
82
|
needsAttention: boolean;
|
|
82
83
|
id: string;
|
|
83
84
|
orgId: string;
|
|
84
|
-
|
|
85
|
+
status: string;
|
|
85
86
|
createdAt: Date;
|
|
86
87
|
updatedAt: Date;
|
|
87
|
-
|
|
88
|
+
createdByUserId: string | null;
|
|
88
89
|
title: string;
|
|
89
90
|
summary: string | null;
|
|
90
91
|
preferredAgentId: string | null;
|
|
@@ -106,10 +107,10 @@ export declare function chatService(db: Db): {
|
|
|
106
107
|
needsAttention: boolean;
|
|
107
108
|
id: string;
|
|
108
109
|
orgId: string;
|
|
109
|
-
|
|
110
|
+
status: string;
|
|
110
111
|
createdAt: Date;
|
|
111
112
|
updatedAt: Date;
|
|
112
|
-
|
|
113
|
+
createdByUserId: string | null;
|
|
113
114
|
title: string;
|
|
114
115
|
summary: string | null;
|
|
115
116
|
preferredAgentId: string | null;
|
|
@@ -131,10 +132,10 @@ export declare function chatService(db: Db): {
|
|
|
131
132
|
needsAttention: boolean;
|
|
132
133
|
id: string;
|
|
133
134
|
orgId: string;
|
|
134
|
-
|
|
135
|
+
status: string;
|
|
135
136
|
createdAt: Date;
|
|
136
137
|
updatedAt: Date;
|
|
137
|
-
|
|
138
|
+
createdByUserId: string | null;
|
|
138
139
|
title: string;
|
|
139
140
|
summary: string | null;
|
|
140
141
|
preferredAgentId: string | null;
|
|
@@ -168,6 +169,7 @@ export declare function chatService(db: Db): {
|
|
|
168
169
|
priority?: string | null;
|
|
169
170
|
href: string;
|
|
170
171
|
} | null;
|
|
172
|
+
conversationId: string;
|
|
171
173
|
id: string;
|
|
172
174
|
orgId: string;
|
|
173
175
|
createdAt: Date;
|
|
@@ -175,7 +177,6 @@ export declare function chatService(db: Db): {
|
|
|
175
177
|
entityType: string;
|
|
176
178
|
entityId: string;
|
|
177
179
|
metadata: Record<string, unknown> | null;
|
|
178
|
-
conversationId: string;
|
|
179
180
|
}[];
|
|
180
181
|
lastReadAt: Date | null;
|
|
181
182
|
isPinned: boolean;
|
|
@@ -184,10 +185,10 @@ export declare function chatService(db: Db): {
|
|
|
184
185
|
needsAttention: boolean;
|
|
185
186
|
id: string;
|
|
186
187
|
orgId: string;
|
|
187
|
-
|
|
188
|
+
status: string;
|
|
188
189
|
createdAt: Date;
|
|
189
190
|
updatedAt: Date;
|
|
190
|
-
|
|
191
|
+
createdByUserId: string | null;
|
|
191
192
|
title: string;
|
|
192
193
|
summary: string | null;
|
|
193
194
|
preferredAgentId: string | null;
|
|
@@ -233,6 +234,7 @@ export declare function chatService(db: Db): {
|
|
|
233
234
|
priority?: string | null;
|
|
234
235
|
href: string;
|
|
235
236
|
} | null;
|
|
237
|
+
conversationId: string;
|
|
236
238
|
id: string;
|
|
237
239
|
orgId: string;
|
|
238
240
|
createdAt: Date;
|
|
@@ -240,7 +242,6 @@ export declare function chatService(db: Db): {
|
|
|
240
242
|
entityType: string;
|
|
241
243
|
entityId: string;
|
|
242
244
|
metadata: Record<string, unknown> | null;
|
|
243
|
-
conversationId: string;
|
|
244
245
|
}[];
|
|
245
246
|
lastReadAt: Date | null;
|
|
246
247
|
isPinned: boolean;
|
|
@@ -249,10 +250,10 @@ export declare function chatService(db: Db): {
|
|
|
249
250
|
needsAttention: boolean;
|
|
250
251
|
id: string;
|
|
251
252
|
orgId: string;
|
|
252
|
-
|
|
253
|
+
status: string;
|
|
253
254
|
createdAt: Date;
|
|
254
255
|
updatedAt: Date;
|
|
255
|
-
|
|
256
|
+
createdByUserId: string | null;
|
|
256
257
|
title: string;
|
|
257
258
|
summary: string | null;
|
|
258
259
|
preferredAgentId: string | null;
|
|
@@ -286,6 +287,7 @@ export declare function chatService(db: Db): {
|
|
|
286
287
|
priority?: string | null;
|
|
287
288
|
href: string;
|
|
288
289
|
} | null;
|
|
290
|
+
conversationId: string;
|
|
289
291
|
id: string;
|
|
290
292
|
orgId: string;
|
|
291
293
|
createdAt: Date;
|
|
@@ -293,7 +295,6 @@ export declare function chatService(db: Db): {
|
|
|
293
295
|
entityType: string;
|
|
294
296
|
entityId: string;
|
|
295
297
|
metadata: Record<string, unknown> | null;
|
|
296
|
-
conversationId: string;
|
|
297
298
|
}[];
|
|
298
299
|
lastReadAt: Date | null;
|
|
299
300
|
isPinned: boolean;
|
|
@@ -302,10 +303,10 @@ export declare function chatService(db: Db): {
|
|
|
302
303
|
needsAttention: boolean;
|
|
303
304
|
id: string;
|
|
304
305
|
orgId: string;
|
|
305
|
-
|
|
306
|
+
status: string;
|
|
306
307
|
createdAt: Date;
|
|
307
308
|
updatedAt: Date;
|
|
308
|
-
|
|
309
|
+
createdByUserId: string | null;
|
|
309
310
|
title: string;
|
|
310
311
|
summary: string | null;
|
|
311
312
|
preferredAgentId: string | null;
|
|
@@ -339,6 +340,7 @@ export declare function chatService(db: Db): {
|
|
|
339
340
|
priority?: string | null;
|
|
340
341
|
href: string;
|
|
341
342
|
} | null;
|
|
343
|
+
conversationId: string;
|
|
342
344
|
id: string;
|
|
343
345
|
orgId: string;
|
|
344
346
|
createdAt: Date;
|
|
@@ -346,7 +348,6 @@ export declare function chatService(db: Db): {
|
|
|
346
348
|
entityType: string;
|
|
347
349
|
entityId: string;
|
|
348
350
|
metadata: Record<string, unknown> | null;
|
|
349
|
-
conversationId: string;
|
|
350
351
|
}[];
|
|
351
352
|
lastReadAt: Date | null;
|
|
352
353
|
isPinned: boolean;
|
|
@@ -355,10 +356,10 @@ export declare function chatService(db: Db): {
|
|
|
355
356
|
needsAttention: boolean;
|
|
356
357
|
id: string;
|
|
357
358
|
orgId: string;
|
|
358
|
-
|
|
359
|
+
status: string;
|
|
359
360
|
createdAt: Date;
|
|
360
361
|
updatedAt: Date;
|
|
361
|
-
|
|
362
|
+
createdByUserId: string | null;
|
|
362
363
|
title: string;
|
|
363
364
|
summary: string | null;
|
|
364
365
|
preferredAgentId: string | null;
|
|
@@ -392,6 +393,7 @@ export declare function chatService(db: Db): {
|
|
|
392
393
|
priority?: string | null;
|
|
393
394
|
href: string;
|
|
394
395
|
} | null;
|
|
396
|
+
conversationId: string;
|
|
395
397
|
id: string;
|
|
396
398
|
orgId: string;
|
|
397
399
|
createdAt: Date;
|
|
@@ -399,7 +401,6 @@ export declare function chatService(db: Db): {
|
|
|
399
401
|
entityType: string;
|
|
400
402
|
entityId: string;
|
|
401
403
|
metadata: Record<string, unknown> | null;
|
|
402
|
-
conversationId: string;
|
|
403
404
|
}[];
|
|
404
405
|
lastReadAt: Date | null;
|
|
405
406
|
isPinned: boolean;
|
|
@@ -408,10 +409,10 @@ export declare function chatService(db: Db): {
|
|
|
408
409
|
needsAttention: boolean;
|
|
409
410
|
id: string;
|
|
410
411
|
orgId: string;
|
|
411
|
-
|
|
412
|
+
status: string;
|
|
412
413
|
createdAt: Date;
|
|
413
414
|
updatedAt: Date;
|
|
414
|
-
|
|
415
|
+
createdByUserId: string | null;
|
|
415
416
|
title: string;
|
|
416
417
|
summary: string | null;
|
|
417
418
|
preferredAgentId: string | null;
|
|
@@ -431,10 +432,10 @@ export declare function chatService(db: Db): {
|
|
|
431
432
|
remove: (id: string) => Promise<{
|
|
432
433
|
id: string;
|
|
433
434
|
orgId: string;
|
|
434
|
-
|
|
435
|
+
status: string;
|
|
435
436
|
createdAt: Date;
|
|
436
437
|
updatedAt: Date;
|
|
437
|
-
|
|
438
|
+
createdByUserId: string | null;
|
|
438
439
|
title: string;
|
|
439
440
|
summary: string | null;
|
|
440
441
|
preferredAgentId: string | null;
|
|
@@ -468,6 +469,7 @@ export declare function chatService(db: Db): {
|
|
|
468
469
|
priority?: string | null;
|
|
469
470
|
href: string;
|
|
470
471
|
} | null;
|
|
472
|
+
conversationId: string;
|
|
471
473
|
id: string;
|
|
472
474
|
orgId: string;
|
|
473
475
|
createdAt: Date;
|
|
@@ -475,7 +477,6 @@ export declare function chatService(db: Db): {
|
|
|
475
477
|
entityType: string;
|
|
476
478
|
entityId: string;
|
|
477
479
|
metadata: Record<string, unknown> | null;
|
|
478
|
-
conversationId: string;
|
|
479
480
|
}[];
|
|
480
481
|
lastReadAt: Date | null;
|
|
481
482
|
isPinned: boolean;
|
|
@@ -484,10 +485,10 @@ export declare function chatService(db: Db): {
|
|
|
484
485
|
needsAttention: boolean;
|
|
485
486
|
id: string;
|
|
486
487
|
orgId: string;
|
|
487
|
-
|
|
488
|
+
status: string;
|
|
488
489
|
createdAt: Date;
|
|
489
490
|
updatedAt: Date;
|
|
490
|
-
|
|
491
|
+
createdByUserId: string | null;
|
|
491
492
|
title: string;
|
|
492
493
|
summary: string | null;
|
|
493
494
|
preferredAgentId: string | null;
|
|
@@ -499,35 +500,350 @@ export declare function chatService(db: Db): {
|
|
|
499
500
|
lastMessageAt: Date | null;
|
|
500
501
|
} | null>;
|
|
501
502
|
markRead: (conversationId: string, orgId: string, userId: string, readAt?: Date) => Promise<{
|
|
503
|
+
conversationId: string;
|
|
502
504
|
id: string;
|
|
503
505
|
orgId: string;
|
|
504
506
|
createdAt: Date;
|
|
505
507
|
updatedAt: Date;
|
|
506
|
-
conversationId: string;
|
|
507
508
|
userId: string;
|
|
508
509
|
lastReadAt: Date;
|
|
509
510
|
pinnedAt: Date | null;
|
|
510
511
|
}>;
|
|
511
512
|
markUnread: (conversationId: string, orgId: string, userId: string) => Promise<{
|
|
513
|
+
conversationId: string;
|
|
512
514
|
id: string;
|
|
513
515
|
orgId: string;
|
|
514
516
|
createdAt: Date;
|
|
515
517
|
updatedAt: Date;
|
|
516
|
-
conversationId: string;
|
|
517
518
|
userId: string;
|
|
518
519
|
lastReadAt: Date;
|
|
519
520
|
pinnedAt: Date | null;
|
|
520
521
|
}>;
|
|
521
522
|
setPinned: (conversationId: string, orgId: string, userId: string, pinned: boolean) => Promise<{
|
|
523
|
+
conversationId: string;
|
|
522
524
|
id: string;
|
|
523
525
|
orgId: string;
|
|
524
526
|
createdAt: Date;
|
|
525
527
|
updatedAt: Date;
|
|
526
|
-
conversationId: string;
|
|
527
528
|
userId: string;
|
|
528
529
|
lastReadAt: Date;
|
|
529
530
|
pinnedAt: Date | null;
|
|
530
531
|
}>;
|
|
532
|
+
createGeneration: (orgId: string, conversationId: string) => Promise<ChatGenerationRow>;
|
|
533
|
+
markGenerationTerminal: (generationId: string | null | undefined, status: "completed" | "failed" | "stopped" | "aborted") => Promise<{
|
|
534
|
+
id: string;
|
|
535
|
+
orgId: string;
|
|
536
|
+
conversationId: string;
|
|
537
|
+
status: string;
|
|
538
|
+
terminalReason: string | null;
|
|
539
|
+
startedAt: Date;
|
|
540
|
+
completedAt: Date | null;
|
|
541
|
+
createdAt: Date;
|
|
542
|
+
updatedAt: Date;
|
|
543
|
+
} | null>;
|
|
544
|
+
getLatestActiveGeneration: (conversationId: string) => Promise<{
|
|
545
|
+
conversationId: string;
|
|
546
|
+
id: string;
|
|
547
|
+
orgId: string;
|
|
548
|
+
status: string;
|
|
549
|
+
createdAt: Date;
|
|
550
|
+
updatedAt: Date;
|
|
551
|
+
startedAt: Date;
|
|
552
|
+
completedAt: Date | null;
|
|
553
|
+
terminalReason: string | null;
|
|
554
|
+
}>;
|
|
555
|
+
getLatestGeneration: (conversationId: string) => Promise<{
|
|
556
|
+
conversationId: string;
|
|
557
|
+
id: string;
|
|
558
|
+
orgId: string;
|
|
559
|
+
status: string;
|
|
560
|
+
createdAt: Date;
|
|
561
|
+
updatedAt: Date;
|
|
562
|
+
startedAt: Date;
|
|
563
|
+
completedAt: Date | null;
|
|
564
|
+
terminalReason: string | null;
|
|
565
|
+
}>;
|
|
566
|
+
getQueueSnapshot: (conversationId: string, activeGenerationId?: string | null) => Promise<{
|
|
567
|
+
activeGenerationId: string;
|
|
568
|
+
items: {
|
|
569
|
+
payload: ChatQueuedMessagePayload;
|
|
570
|
+
conversationId: string;
|
|
571
|
+
id: string;
|
|
572
|
+
orgId: string;
|
|
573
|
+
status: string;
|
|
574
|
+
createdAt: Date;
|
|
575
|
+
updatedAt: Date;
|
|
576
|
+
cancelledAt: Date | null;
|
|
577
|
+
clientMutationId: string;
|
|
578
|
+
expectedGenerationId: string | null;
|
|
579
|
+
version: number;
|
|
580
|
+
position: number;
|
|
581
|
+
activeGenerationId: string | null;
|
|
582
|
+
deliveryAttempts: number;
|
|
583
|
+
lastAttemptAt: Date | null;
|
|
584
|
+
lastDeliveryReason: string | null;
|
|
585
|
+
sourceMessageId: string | null;
|
|
586
|
+
deliveredMessageId: string | null;
|
|
587
|
+
steeredAt: Date | null;
|
|
588
|
+
dequeuedAt: Date | null;
|
|
589
|
+
}[];
|
|
590
|
+
}>;
|
|
591
|
+
listQueuedMessages: (conversationId: string) => Promise<{
|
|
592
|
+
payload: ChatQueuedMessagePayload;
|
|
593
|
+
conversationId: string;
|
|
594
|
+
id: string;
|
|
595
|
+
orgId: string;
|
|
596
|
+
status: string;
|
|
597
|
+
createdAt: Date;
|
|
598
|
+
updatedAt: Date;
|
|
599
|
+
cancelledAt: Date | null;
|
|
600
|
+
clientMutationId: string;
|
|
601
|
+
expectedGenerationId: string | null;
|
|
602
|
+
version: number;
|
|
603
|
+
position: number;
|
|
604
|
+
activeGenerationId: string | null;
|
|
605
|
+
deliveryAttempts: number;
|
|
606
|
+
lastAttemptAt: Date | null;
|
|
607
|
+
lastDeliveryReason: string | null;
|
|
608
|
+
sourceMessageId: string | null;
|
|
609
|
+
deliveredMessageId: string | null;
|
|
610
|
+
steeredAt: Date | null;
|
|
611
|
+
dequeuedAt: Date | null;
|
|
612
|
+
}[]>;
|
|
613
|
+
createQueuedMessage: (input: {
|
|
614
|
+
orgId: string;
|
|
615
|
+
conversationId: string;
|
|
616
|
+
clientMutationId: string;
|
|
617
|
+
payload: ChatQueuedMessagePayload;
|
|
618
|
+
expectedGenerationId?: string | null;
|
|
619
|
+
}) => Promise<{
|
|
620
|
+
payload: ChatQueuedMessagePayload;
|
|
621
|
+
conversationId: string;
|
|
622
|
+
id: string;
|
|
623
|
+
orgId: string;
|
|
624
|
+
status: string;
|
|
625
|
+
createdAt: Date;
|
|
626
|
+
updatedAt: Date;
|
|
627
|
+
cancelledAt: Date | null;
|
|
628
|
+
clientMutationId: string;
|
|
629
|
+
expectedGenerationId: string | null;
|
|
630
|
+
version: number;
|
|
631
|
+
position: number;
|
|
632
|
+
activeGenerationId: string | null;
|
|
633
|
+
deliveryAttempts: number;
|
|
634
|
+
lastAttemptAt: Date | null;
|
|
635
|
+
lastDeliveryReason: string | null;
|
|
636
|
+
sourceMessageId: string | null;
|
|
637
|
+
deliveredMessageId: string | null;
|
|
638
|
+
steeredAt: Date | null;
|
|
639
|
+
dequeuedAt: Date | null;
|
|
640
|
+
}>;
|
|
641
|
+
updateQueuedMessage: (input: {
|
|
642
|
+
conversationId: string;
|
|
643
|
+
itemId: string;
|
|
644
|
+
version: number;
|
|
645
|
+
payload: ChatQueuedMessagePayload;
|
|
646
|
+
}) => Promise<{
|
|
647
|
+
payload: ChatQueuedMessagePayload;
|
|
648
|
+
conversationId: string;
|
|
649
|
+
id: string;
|
|
650
|
+
orgId: string;
|
|
651
|
+
status: string;
|
|
652
|
+
createdAt: Date;
|
|
653
|
+
updatedAt: Date;
|
|
654
|
+
cancelledAt: Date | null;
|
|
655
|
+
clientMutationId: string;
|
|
656
|
+
expectedGenerationId: string | null;
|
|
657
|
+
version: number;
|
|
658
|
+
position: number;
|
|
659
|
+
activeGenerationId: string | null;
|
|
660
|
+
deliveryAttempts: number;
|
|
661
|
+
lastAttemptAt: Date | null;
|
|
662
|
+
lastDeliveryReason: string | null;
|
|
663
|
+
sourceMessageId: string | null;
|
|
664
|
+
deliveredMessageId: string | null;
|
|
665
|
+
steeredAt: Date | null;
|
|
666
|
+
dequeuedAt: Date | null;
|
|
667
|
+
}>;
|
|
668
|
+
cancelQueuedMessage: (input: {
|
|
669
|
+
conversationId: string;
|
|
670
|
+
itemId: string;
|
|
671
|
+
version?: number | null;
|
|
672
|
+
}) => Promise<{
|
|
673
|
+
payload: ChatQueuedMessagePayload;
|
|
674
|
+
conversationId: string;
|
|
675
|
+
id: string;
|
|
676
|
+
orgId: string;
|
|
677
|
+
status: string;
|
|
678
|
+
createdAt: Date;
|
|
679
|
+
updatedAt: Date;
|
|
680
|
+
cancelledAt: Date | null;
|
|
681
|
+
clientMutationId: string;
|
|
682
|
+
expectedGenerationId: string | null;
|
|
683
|
+
version: number;
|
|
684
|
+
position: number;
|
|
685
|
+
activeGenerationId: string | null;
|
|
686
|
+
deliveryAttempts: number;
|
|
687
|
+
lastAttemptAt: Date | null;
|
|
688
|
+
lastDeliveryReason: string | null;
|
|
689
|
+
sourceMessageId: string | null;
|
|
690
|
+
deliveredMessageId: string | null;
|
|
691
|
+
steeredAt: Date | null;
|
|
692
|
+
dequeuedAt: Date | null;
|
|
693
|
+
}>;
|
|
694
|
+
markQueuedMessageSteerFallback: (input: {
|
|
695
|
+
conversationId: string;
|
|
696
|
+
itemId: string;
|
|
697
|
+
reason: "unsupported" | "stale_generation" | "closing";
|
|
698
|
+
activeGenerationId?: string | null;
|
|
699
|
+
}) => Promise<{
|
|
700
|
+
payload: ChatQueuedMessagePayload;
|
|
701
|
+
conversationId: string;
|
|
702
|
+
id: string;
|
|
703
|
+
orgId: string;
|
|
704
|
+
status: string;
|
|
705
|
+
createdAt: Date;
|
|
706
|
+
updatedAt: Date;
|
|
707
|
+
cancelledAt: Date | null;
|
|
708
|
+
clientMutationId: string;
|
|
709
|
+
expectedGenerationId: string | null;
|
|
710
|
+
version: number;
|
|
711
|
+
position: number;
|
|
712
|
+
activeGenerationId: string | null;
|
|
713
|
+
deliveryAttempts: number;
|
|
714
|
+
lastAttemptAt: Date | null;
|
|
715
|
+
lastDeliveryReason: string | null;
|
|
716
|
+
sourceMessageId: string | null;
|
|
717
|
+
deliveredMessageId: string | null;
|
|
718
|
+
steeredAt: Date | null;
|
|
719
|
+
dequeuedAt: Date | null;
|
|
720
|
+
}>;
|
|
721
|
+
claimNextQueuedMessage: (conversationId: string) => Promise<{
|
|
722
|
+
payload: ChatQueuedMessagePayload;
|
|
723
|
+
conversationId: string;
|
|
724
|
+
id: string;
|
|
725
|
+
orgId: string;
|
|
726
|
+
status: string;
|
|
727
|
+
createdAt: Date;
|
|
728
|
+
updatedAt: Date;
|
|
729
|
+
cancelledAt: Date | null;
|
|
730
|
+
clientMutationId: string;
|
|
731
|
+
expectedGenerationId: string | null;
|
|
732
|
+
version: number;
|
|
733
|
+
position: number;
|
|
734
|
+
activeGenerationId: string | null;
|
|
735
|
+
deliveryAttempts: number;
|
|
736
|
+
lastAttemptAt: Date | null;
|
|
737
|
+
lastDeliveryReason: string | null;
|
|
738
|
+
sourceMessageId: string | null;
|
|
739
|
+
deliveredMessageId: string | null;
|
|
740
|
+
steeredAt: Date | null;
|
|
741
|
+
dequeuedAt: Date | null;
|
|
742
|
+
} | null>;
|
|
743
|
+
releaseQueuedMessageClaim: (input: {
|
|
744
|
+
conversationId: string;
|
|
745
|
+
itemId: string;
|
|
746
|
+
reason: "delivery_failed" | "delivery_aborted" | "claim_expired";
|
|
747
|
+
}) => Promise<{
|
|
748
|
+
payload: ChatQueuedMessagePayload;
|
|
749
|
+
conversationId: string;
|
|
750
|
+
id: string;
|
|
751
|
+
orgId: string;
|
|
752
|
+
status: string;
|
|
753
|
+
createdAt: Date;
|
|
754
|
+
updatedAt: Date;
|
|
755
|
+
cancelledAt: Date | null;
|
|
756
|
+
clientMutationId: string;
|
|
757
|
+
expectedGenerationId: string | null;
|
|
758
|
+
version: number;
|
|
759
|
+
position: number;
|
|
760
|
+
activeGenerationId: string | null;
|
|
761
|
+
deliveryAttempts: number;
|
|
762
|
+
lastAttemptAt: Date | null;
|
|
763
|
+
lastDeliveryReason: string | null;
|
|
764
|
+
sourceMessageId: string | null;
|
|
765
|
+
deliveredMessageId: string | null;
|
|
766
|
+
steeredAt: Date | null;
|
|
767
|
+
dequeuedAt: Date | null;
|
|
768
|
+
} | null>;
|
|
769
|
+
assertQueuedMessageClaimedForDelivery: (input: {
|
|
770
|
+
conversationId: string;
|
|
771
|
+
itemId: string;
|
|
772
|
+
body: string;
|
|
773
|
+
}) => Promise<{
|
|
774
|
+
payload: ChatQueuedMessagePayload;
|
|
775
|
+
conversationId: string;
|
|
776
|
+
id: string;
|
|
777
|
+
orgId: string;
|
|
778
|
+
status: string;
|
|
779
|
+
createdAt: Date;
|
|
780
|
+
updatedAt: Date;
|
|
781
|
+
cancelledAt: Date | null;
|
|
782
|
+
clientMutationId: string;
|
|
783
|
+
expectedGenerationId: string | null;
|
|
784
|
+
version: number;
|
|
785
|
+
position: number;
|
|
786
|
+
activeGenerationId: string | null;
|
|
787
|
+
deliveryAttempts: number;
|
|
788
|
+
lastAttemptAt: Date | null;
|
|
789
|
+
lastDeliveryReason: string | null;
|
|
790
|
+
sourceMessageId: string | null;
|
|
791
|
+
deliveredMessageId: string | null;
|
|
792
|
+
steeredAt: Date | null;
|
|
793
|
+
dequeuedAt: Date | null;
|
|
794
|
+
}>;
|
|
795
|
+
markQueuedMessageRunning: (input: {
|
|
796
|
+
conversationId: string;
|
|
797
|
+
itemId: string;
|
|
798
|
+
sourceMessageId: string;
|
|
799
|
+
}) => Promise<{
|
|
800
|
+
payload: ChatQueuedMessagePayload;
|
|
801
|
+
conversationId: string;
|
|
802
|
+
id: string;
|
|
803
|
+
orgId: string;
|
|
804
|
+
status: string;
|
|
805
|
+
createdAt: Date;
|
|
806
|
+
updatedAt: Date;
|
|
807
|
+
cancelledAt: Date | null;
|
|
808
|
+
clientMutationId: string;
|
|
809
|
+
expectedGenerationId: string | null;
|
|
810
|
+
version: number;
|
|
811
|
+
position: number;
|
|
812
|
+
activeGenerationId: string | null;
|
|
813
|
+
deliveryAttempts: number;
|
|
814
|
+
lastAttemptAt: Date | null;
|
|
815
|
+
lastDeliveryReason: string | null;
|
|
816
|
+
sourceMessageId: string | null;
|
|
817
|
+
deliveredMessageId: string | null;
|
|
818
|
+
steeredAt: Date | null;
|
|
819
|
+
dequeuedAt: Date | null;
|
|
820
|
+
}>;
|
|
821
|
+
markQueuedMessageDeliveryTerminal: (input: {
|
|
822
|
+
conversationId: string;
|
|
823
|
+
itemId: string;
|
|
824
|
+
status: "completed" | "failed" | "stopped" | "aborted";
|
|
825
|
+
}) => Promise<{
|
|
826
|
+
payload: ChatQueuedMessagePayload;
|
|
827
|
+
conversationId: string;
|
|
828
|
+
id: string;
|
|
829
|
+
orgId: string;
|
|
830
|
+
status: string;
|
|
831
|
+
createdAt: Date;
|
|
832
|
+
updatedAt: Date;
|
|
833
|
+
cancelledAt: Date | null;
|
|
834
|
+
clientMutationId: string;
|
|
835
|
+
expectedGenerationId: string | null;
|
|
836
|
+
version: number;
|
|
837
|
+
position: number;
|
|
838
|
+
activeGenerationId: string | null;
|
|
839
|
+
deliveryAttempts: number;
|
|
840
|
+
lastAttemptAt: Date | null;
|
|
841
|
+
lastDeliveryReason: string | null;
|
|
842
|
+
sourceMessageId: string | null;
|
|
843
|
+
deliveredMessageId: string | null;
|
|
844
|
+
steeredAt: Date | null;
|
|
845
|
+
dequeuedAt: Date | null;
|
|
846
|
+
} | null>;
|
|
531
847
|
listMessages: (conversationId: string, options?: {
|
|
532
848
|
includeTranscript?: boolean;
|
|
533
849
|
}) => Promise<{
|
|
@@ -537,10 +853,10 @@ export declare function chatService(db: Db): {
|
|
|
537
853
|
approval: {
|
|
538
854
|
id: string;
|
|
539
855
|
orgId: string;
|
|
856
|
+
status: string;
|
|
540
857
|
createdAt: Date;
|
|
541
858
|
updatedAt: Date;
|
|
542
859
|
type: string;
|
|
543
|
-
status: string;
|
|
544
860
|
decisionNote: string | null;
|
|
545
861
|
payload: Record<string, unknown>;
|
|
546
862
|
requestedByAgentId: string | null;
|
|
@@ -549,16 +865,16 @@ export declare function chatService(db: Db): {
|
|
|
549
865
|
decidedAt: Date | null;
|
|
550
866
|
} | null;
|
|
551
867
|
attachments: any[];
|
|
868
|
+
conversationId: string;
|
|
552
869
|
id: string;
|
|
553
|
-
kind: string;
|
|
554
870
|
orgId: string;
|
|
871
|
+
status: string;
|
|
555
872
|
createdAt: Date;
|
|
556
873
|
updatedAt: Date;
|
|
557
|
-
|
|
874
|
+
kind: string;
|
|
558
875
|
body: string;
|
|
559
876
|
role: string;
|
|
560
877
|
approvalId: string | null;
|
|
561
|
-
conversationId: string;
|
|
562
878
|
runId: string | null;
|
|
563
879
|
replyingAgentId: string | null;
|
|
564
880
|
chatTurnId: string | null;
|
|
@@ -589,10 +905,10 @@ export declare function chatService(db: Db): {
|
|
|
589
905
|
approval: {
|
|
590
906
|
id: string;
|
|
591
907
|
orgId: string;
|
|
908
|
+
status: string;
|
|
592
909
|
createdAt: Date;
|
|
593
910
|
updatedAt: Date;
|
|
594
911
|
type: string;
|
|
595
|
-
status: string;
|
|
596
912
|
decisionNote: string | null;
|
|
597
913
|
payload: Record<string, unknown>;
|
|
598
914
|
requestedByAgentId: string | null;
|
|
@@ -601,16 +917,16 @@ export declare function chatService(db: Db): {
|
|
|
601
917
|
decidedAt: Date | null;
|
|
602
918
|
} | null;
|
|
603
919
|
attachments: any[];
|
|
920
|
+
conversationId: string;
|
|
604
921
|
id: string;
|
|
605
|
-
kind: string;
|
|
606
922
|
orgId: string;
|
|
923
|
+
status: string;
|
|
607
924
|
createdAt: Date;
|
|
608
925
|
updatedAt: Date;
|
|
609
|
-
|
|
926
|
+
kind: string;
|
|
610
927
|
body: string;
|
|
611
928
|
role: string;
|
|
612
929
|
approvalId: string | null;
|
|
613
|
-
conversationId: string;
|
|
614
930
|
runId: string | null;
|
|
615
931
|
replyingAgentId: string | null;
|
|
616
932
|
chatTurnId: string | null;
|
|
@@ -633,10 +949,10 @@ export declare function chatService(db: Db): {
|
|
|
633
949
|
approval: {
|
|
634
950
|
id: string;
|
|
635
951
|
orgId: string;
|
|
952
|
+
status: string;
|
|
636
953
|
createdAt: Date;
|
|
637
954
|
updatedAt: Date;
|
|
638
955
|
type: string;
|
|
639
|
-
status: string;
|
|
640
956
|
decisionNote: string | null;
|
|
641
957
|
payload: Record<string, unknown>;
|
|
642
958
|
requestedByAgentId: string | null;
|
|
@@ -645,16 +961,16 @@ export declare function chatService(db: Db): {
|
|
|
645
961
|
decidedAt: Date | null;
|
|
646
962
|
} | null;
|
|
647
963
|
attachments: any[];
|
|
964
|
+
conversationId: string;
|
|
648
965
|
id: string;
|
|
649
|
-
kind: string;
|
|
650
966
|
orgId: string;
|
|
967
|
+
status: string;
|
|
651
968
|
createdAt: Date;
|
|
652
969
|
updatedAt: Date;
|
|
653
|
-
|
|
970
|
+
kind: string;
|
|
654
971
|
body: string;
|
|
655
972
|
role: string;
|
|
656
973
|
approvalId: string | null;
|
|
657
|
-
conversationId: string;
|
|
658
974
|
runId: string | null;
|
|
659
975
|
replyingAgentId: string | null;
|
|
660
976
|
chatTurnId: string | null;
|
|
@@ -668,10 +984,10 @@ export declare function chatService(db: Db): {
|
|
|
668
984
|
approval: {
|
|
669
985
|
id: string;
|
|
670
986
|
orgId: string;
|
|
987
|
+
status: string;
|
|
671
988
|
createdAt: Date;
|
|
672
989
|
updatedAt: Date;
|
|
673
990
|
type: string;
|
|
674
|
-
status: string;
|
|
675
991
|
decisionNote: string | null;
|
|
676
992
|
payload: Record<string, unknown>;
|
|
677
993
|
requestedByAgentId: string | null;
|
|
@@ -680,16 +996,16 @@ export declare function chatService(db: Db): {
|
|
|
680
996
|
decidedAt: Date | null;
|
|
681
997
|
} | null;
|
|
682
998
|
attachments: any[];
|
|
999
|
+
conversationId: string;
|
|
683
1000
|
id: string;
|
|
684
|
-
kind: string;
|
|
685
1001
|
orgId: string;
|
|
1002
|
+
status: string;
|
|
686
1003
|
createdAt: Date;
|
|
687
1004
|
updatedAt: Date;
|
|
688
|
-
|
|
1005
|
+
kind: string;
|
|
689
1006
|
body: string;
|
|
690
1007
|
role: string;
|
|
691
1008
|
approvalId: string | null;
|
|
692
|
-
conversationId: string;
|
|
693
1009
|
runId: string | null;
|
|
694
1010
|
replyingAgentId: string | null;
|
|
695
1011
|
chatTurnId: string | null;
|
|
@@ -705,10 +1021,10 @@ export declare function chatService(db: Db): {
|
|
|
705
1021
|
approval: {
|
|
706
1022
|
id: string;
|
|
707
1023
|
orgId: string;
|
|
1024
|
+
status: string;
|
|
708
1025
|
createdAt: Date;
|
|
709
1026
|
updatedAt: Date;
|
|
710
1027
|
type: string;
|
|
711
|
-
status: string;
|
|
712
1028
|
decisionNote: string | null;
|
|
713
1029
|
payload: Record<string, unknown>;
|
|
714
1030
|
requestedByAgentId: string | null;
|
|
@@ -717,16 +1033,16 @@ export declare function chatService(db: Db): {
|
|
|
717
1033
|
decidedAt: Date | null;
|
|
718
1034
|
} | null;
|
|
719
1035
|
attachments: any[];
|
|
1036
|
+
conversationId: string;
|
|
720
1037
|
id: string;
|
|
721
|
-
kind: string;
|
|
722
1038
|
orgId: string;
|
|
1039
|
+
status: string;
|
|
723
1040
|
createdAt: Date;
|
|
724
1041
|
updatedAt: Date;
|
|
725
|
-
|
|
1042
|
+
kind: string;
|
|
726
1043
|
body: string;
|
|
727
1044
|
role: string;
|
|
728
1045
|
approvalId: string | null;
|
|
729
|
-
conversationId: string;
|
|
730
1046
|
runId: string | null;
|
|
731
1047
|
replyingAgentId: string | null;
|
|
732
1048
|
chatTurnId: string | null;
|
|
@@ -749,6 +1065,7 @@ export declare function chatService(db: Db): {
|
|
|
749
1065
|
priority?: string | null;
|
|
750
1066
|
href: string;
|
|
751
1067
|
} | null;
|
|
1068
|
+
conversationId: string;
|
|
752
1069
|
id: string;
|
|
753
1070
|
orgId: string;
|
|
754
1071
|
createdAt: Date;
|
|
@@ -756,7 +1073,6 @@ export declare function chatService(db: Db): {
|
|
|
756
1073
|
entityType: string;
|
|
757
1074
|
entityId: string;
|
|
758
1075
|
metadata: Record<string, unknown> | null;
|
|
759
|
-
conversationId: string;
|
|
760
1076
|
} | null>;
|
|
761
1077
|
setProjectContextLink: (conversationId: string, orgId: string, projectId: string | null) => Promise<{
|
|
762
1078
|
primaryIssue: {
|
|
@@ -781,6 +1097,7 @@ export declare function chatService(db: Db): {
|
|
|
781
1097
|
priority?: string | null;
|
|
782
1098
|
href: string;
|
|
783
1099
|
} | null;
|
|
1100
|
+
conversationId: string;
|
|
784
1101
|
id: string;
|
|
785
1102
|
orgId: string;
|
|
786
1103
|
createdAt: Date;
|
|
@@ -788,7 +1105,6 @@ export declare function chatService(db: Db): {
|
|
|
788
1105
|
entityType: string;
|
|
789
1106
|
entityId: string;
|
|
790
1107
|
metadata: Record<string, unknown> | null;
|
|
791
|
-
conversationId: string;
|
|
792
1108
|
}[];
|
|
793
1109
|
lastReadAt: Date | null;
|
|
794
1110
|
isPinned: boolean;
|
|
@@ -797,10 +1113,10 @@ export declare function chatService(db: Db): {
|
|
|
797
1113
|
needsAttention: boolean;
|
|
798
1114
|
id: string;
|
|
799
1115
|
orgId: string;
|
|
800
|
-
|
|
1116
|
+
status: string;
|
|
801
1117
|
createdAt: Date;
|
|
802
1118
|
updatedAt: Date;
|
|
803
|
-
|
|
1119
|
+
createdByUserId: string | null;
|
|
804
1120
|
title: string;
|
|
805
1121
|
summary: string | null;
|
|
806
1122
|
preferredAgentId: string | null;
|
|
@@ -833,12 +1149,12 @@ export declare function chatService(db: Db): {
|
|
|
833
1149
|
createdByAgentId: string | null;
|
|
834
1150
|
createdByUserId: string | null;
|
|
835
1151
|
contentPath: string;
|
|
1152
|
+
conversationId: string;
|
|
1153
|
+
messageId: string;
|
|
836
1154
|
id: string;
|
|
837
1155
|
orgId: string;
|
|
838
1156
|
createdAt: Date;
|
|
839
1157
|
updatedAt: Date;
|
|
840
|
-
messageId: string;
|
|
841
|
-
conversationId: string;
|
|
842
1158
|
assetId: string;
|
|
843
1159
|
}>;
|
|
844
1160
|
convertToIssue: (conversationId: string, input: {
|
|
@@ -854,10 +1170,10 @@ export declare function chatService(db: Db): {
|
|
|
854
1170
|
approval: {
|
|
855
1171
|
id: string;
|
|
856
1172
|
orgId: string;
|
|
1173
|
+
status: string;
|
|
857
1174
|
createdAt: Date;
|
|
858
1175
|
updatedAt: Date;
|
|
859
1176
|
type: string;
|
|
860
|
-
status: string;
|
|
861
1177
|
decisionNote: string | null;
|
|
862
1178
|
payload: Record<string, unknown>;
|
|
863
1179
|
requestedByAgentId: string | null;
|
|
@@ -866,16 +1182,16 @@ export declare function chatService(db: Db): {
|
|
|
866
1182
|
decidedAt: Date | null;
|
|
867
1183
|
} | null;
|
|
868
1184
|
attachments: any[];
|
|
1185
|
+
conversationId: string;
|
|
869
1186
|
id: string;
|
|
870
|
-
kind: string;
|
|
871
1187
|
orgId: string;
|
|
1188
|
+
status: string;
|
|
872
1189
|
createdAt: Date;
|
|
873
1190
|
updatedAt: Date;
|
|
874
|
-
|
|
1191
|
+
kind: string;
|
|
875
1192
|
body: string;
|
|
876
1193
|
role: string;
|
|
877
1194
|
approvalId: string | null;
|
|
878
|
-
conversationId: string;
|
|
879
1195
|
runId: string | null;
|
|
880
1196
|
replyingAgentId: string | null;
|
|
881
1197
|
chatTurnId: string | null;
|
|
@@ -886,10 +1202,10 @@ export declare function chatService(db: Db): {
|
|
|
886
1202
|
permissions: import("./agent-permissions.js").NormalizedAgentPermissions;
|
|
887
1203
|
id: string;
|
|
888
1204
|
orgId: string;
|
|
1205
|
+
status: string;
|
|
889
1206
|
createdAt: Date;
|
|
890
1207
|
updatedAt: Date;
|
|
891
1208
|
name: string;
|
|
892
|
-
status: string;
|
|
893
1209
|
title: string | null;
|
|
894
1210
|
agentRuntimeType: string;
|
|
895
1211
|
metadata: Record<string, unknown> | null;
|
|
@@ -906,6 +1222,7 @@ export declare function chatService(db: Db): {
|
|
|
906
1222
|
workspaceKey: string | null;
|
|
907
1223
|
lastHeartbeatAt: Date | null;
|
|
908
1224
|
} & {
|
|
1225
|
+
shortRef: string;
|
|
909
1226
|
urlKey: string;
|
|
910
1227
|
}, "workspaceKey"> | import("./issues.helpers.js").IssueWithLabels | ({
|
|
911
1228
|
logoAssetId: string | null;
|
|
@@ -939,10 +1256,10 @@ export declare function chatService(db: Db): {
|
|
|
939
1256
|
}) => Promise<{
|
|
940
1257
|
id: string;
|
|
941
1258
|
orgId: string;
|
|
1259
|
+
status: string;
|
|
942
1260
|
createdAt: Date;
|
|
943
1261
|
updatedAt: Date;
|
|
944
1262
|
type: string;
|
|
945
|
-
status: string;
|
|
946
1263
|
decisionNote: string | null;
|
|
947
1264
|
payload: Record<string, unknown>;
|
|
948
1265
|
requestedByAgentId: string | null;
|
|
@@ -962,10 +1279,10 @@ export declare function chatService(db: Db): {
|
|
|
962
1279
|
approval: {
|
|
963
1280
|
id: string;
|
|
964
1281
|
orgId: string;
|
|
1282
|
+
status: string;
|
|
965
1283
|
createdAt: Date;
|
|
966
1284
|
updatedAt: Date;
|
|
967
1285
|
type: string;
|
|
968
|
-
status: string;
|
|
969
1286
|
decisionNote: string | null;
|
|
970
1287
|
payload: Record<string, unknown>;
|
|
971
1288
|
requestedByAgentId: string | null;
|
|
@@ -974,16 +1291,16 @@ export declare function chatService(db: Db): {
|
|
|
974
1291
|
decidedAt: Date | null;
|
|
975
1292
|
} | null;
|
|
976
1293
|
attachments: any[];
|
|
1294
|
+
conversationId: string;
|
|
977
1295
|
id: string;
|
|
978
|
-
kind: string;
|
|
979
1296
|
orgId: string;
|
|
1297
|
+
status: string;
|
|
980
1298
|
createdAt: Date;
|
|
981
1299
|
updatedAt: Date;
|
|
982
|
-
|
|
1300
|
+
kind: string;
|
|
983
1301
|
body: string;
|
|
984
1302
|
role: string;
|
|
985
1303
|
approvalId: string | null;
|
|
986
|
-
conversationId: string;
|
|
987
1304
|
runId: string | null;
|
|
988
1305
|
replyingAgentId: string | null;
|
|
989
1306
|
chatTurnId: string | null;
|
|
@@ -997,10 +1314,10 @@ export declare function chatService(db: Db): {
|
|
|
997
1314
|
approval: {
|
|
998
1315
|
id: string;
|
|
999
1316
|
orgId: string;
|
|
1317
|
+
status: string;
|
|
1000
1318
|
createdAt: Date;
|
|
1001
1319
|
updatedAt: Date;
|
|
1002
1320
|
type: string;
|
|
1003
|
-
status: string;
|
|
1004
1321
|
decisionNote: string | null;
|
|
1005
1322
|
payload: Record<string, unknown>;
|
|
1006
1323
|
requestedByAgentId: string | null;
|
|
@@ -1009,16 +1326,16 @@ export declare function chatService(db: Db): {
|
|
|
1009
1326
|
decidedAt: Date | null;
|
|
1010
1327
|
} | null;
|
|
1011
1328
|
attachments: any[];
|
|
1329
|
+
conversationId: string;
|
|
1012
1330
|
id: string;
|
|
1013
|
-
kind: string;
|
|
1014
1331
|
orgId: string;
|
|
1332
|
+
status: string;
|
|
1015
1333
|
createdAt: Date;
|
|
1016
1334
|
updatedAt: Date;
|
|
1017
|
-
|
|
1335
|
+
kind: string;
|
|
1018
1336
|
body: string;
|
|
1019
1337
|
role: string;
|
|
1020
1338
|
approvalId: string | null;
|
|
1021
|
-
conversationId: string;
|
|
1022
1339
|
runId: string | null;
|
|
1023
1340
|
replyingAgentId: string | null;
|
|
1024
1341
|
chatTurnId: string | null;
|