@flowcore/sdk 1.24.4 → 1.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/README.md +208 -0
- package/esm/commands/ai-agent-coordinator/context-add-item.command.d.ts +28 -0
- package/esm/commands/ai-agent-coordinator/context-add-item.command.d.ts.map +1 -0
- package/esm/commands/ai-agent-coordinator/context-add-item.command.js +34 -0
- package/esm/commands/ai-agent-coordinator/context-remove-item.command.d.ts +28 -0
- package/esm/commands/ai-agent-coordinator/context-remove-item.command.d.ts.map +1 -0
- package/esm/commands/ai-agent-coordinator/context-remove-item.command.js +32 -0
- package/esm/commands/ai-agent-coordinator/conversation-delete.command.d.ts +25 -0
- package/esm/commands/ai-agent-coordinator/conversation-delete.command.d.ts.map +1 -0
- package/esm/commands/ai-agent-coordinator/conversation-delete.command.js +30 -0
- package/esm/commands/ai-agent-coordinator/conversation-get.command.d.ts +27 -0
- package/esm/commands/ai-agent-coordinator/conversation-get.command.d.ts.map +1 -0
- package/esm/commands/ai-agent-coordinator/conversation-get.command.js +36 -0
- package/esm/commands/ai-agent-coordinator/conversation-list.command.d.ts +23 -0
- package/esm/commands/ai-agent-coordinator/conversation-list.command.d.ts.map +1 -0
- package/esm/commands/ai-agent-coordinator/conversation-list.command.js +29 -0
- package/esm/commands/ai-agent-coordinator/conversation-stream.command.d.ts +30 -0
- package/esm/commands/ai-agent-coordinator/conversation-stream.command.d.ts.map +1 -0
- package/esm/commands/ai-agent-coordinator/conversation-stream.command.js +36 -0
- package/esm/commands/ai-agent-coordinator/mod.d.ts +7 -0
- package/esm/commands/ai-agent-coordinator/mod.d.ts.map +1 -0
- package/esm/commands/ai-agent-coordinator/mod.js +6 -0
- package/esm/common/command.d.ts.map +1 -1
- package/esm/common/command.js +3 -2
- package/esm/common/websocket-client.d.ts +109 -0
- package/esm/common/websocket-client.d.ts.map +1 -0
- package/esm/common/websocket-client.js +391 -0
- package/esm/common/websocket-command.d.ts +54 -0
- package/esm/common/websocket-command.d.ts.map +1 -0
- package/esm/common/websocket-command.js +1 -0
- package/esm/contracts/ai-agent-coordinator-stream.d.ts +85 -0
- package/esm/contracts/ai-agent-coordinator-stream.d.ts.map +1 -0
- package/esm/contracts/ai-agent-coordinator-stream.js +1 -0
- package/esm/contracts/ai-agent-coordinator.d.ts +41 -0
- package/esm/contracts/ai-agent-coordinator.d.ts.map +1 -0
- package/esm/contracts/ai-agent-coordinator.js +1 -0
- package/esm/mod.d.ts +8 -2
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +8 -2
- package/package.json +1 -1
- package/script/commands/ai-agent-coordinator/context-add-item.command.d.ts +28 -0
- package/script/commands/ai-agent-coordinator/context-add-item.command.d.ts.map +1 -0
- package/script/commands/ai-agent-coordinator/context-add-item.command.js +38 -0
- package/script/commands/ai-agent-coordinator/context-remove-item.command.d.ts +28 -0
- package/script/commands/ai-agent-coordinator/context-remove-item.command.d.ts.map +1 -0
- package/script/commands/ai-agent-coordinator/context-remove-item.command.js +36 -0
- package/script/commands/ai-agent-coordinator/conversation-delete.command.d.ts +25 -0
- package/script/commands/ai-agent-coordinator/conversation-delete.command.d.ts.map +1 -0
- package/script/commands/ai-agent-coordinator/conversation-delete.command.js +34 -0
- package/script/commands/ai-agent-coordinator/conversation-get.command.d.ts +27 -0
- package/script/commands/ai-agent-coordinator/conversation-get.command.d.ts.map +1 -0
- package/script/commands/ai-agent-coordinator/conversation-get.command.js +40 -0
- package/script/commands/ai-agent-coordinator/conversation-list.command.d.ts +23 -0
- package/script/commands/ai-agent-coordinator/conversation-list.command.d.ts.map +1 -0
- package/script/commands/ai-agent-coordinator/conversation-list.command.js +33 -0
- package/script/commands/ai-agent-coordinator/conversation-stream.command.d.ts +30 -0
- package/script/commands/ai-agent-coordinator/conversation-stream.command.d.ts.map +1 -0
- package/script/commands/ai-agent-coordinator/conversation-stream.command.js +40 -0
- package/script/commands/ai-agent-coordinator/mod.d.ts +7 -0
- package/script/commands/ai-agent-coordinator/mod.d.ts.map +1 -0
- package/script/commands/ai-agent-coordinator/mod.js +22 -0
- package/script/common/command.d.ts.map +1 -1
- package/script/common/command.js +27 -3
- package/script/common/websocket-client.d.ts +109 -0
- package/script/common/websocket-client.d.ts.map +1 -0
- package/script/common/websocket-client.js +418 -0
- package/script/common/websocket-command.d.ts +54 -0
- package/script/common/websocket-command.d.ts.map +1 -0
- package/script/common/websocket-command.js +2 -0
- package/script/contracts/ai-agent-coordinator-stream.d.ts +85 -0
- package/script/contracts/ai-agent-coordinator-stream.d.ts.map +1 -0
- package/script/contracts/ai-agent-coordinator-stream.js +2 -0
- package/script/contracts/ai-agent-coordinator.d.ts +41 -0
- package/script/contracts/ai-agent-coordinator.d.ts.map +1 -0
- package/script/contracts/ai-agent-coordinator.js +2 -0
- package/script/mod.d.ts +8 -2
- package/script/mod.d.ts.map +1 -1
- package/script/mod.js +11 -2
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import type { ContextItem } from "./ai-agent-coordinator.js";
|
|
2
|
+
/**
|
|
3
|
+
* Configuration for initiating an AI Agent Coordinator stream.
|
|
4
|
+
*/
|
|
5
|
+
export interface AiStreamConfig {
|
|
6
|
+
/** The ID of the conversation to stream. */
|
|
7
|
+
conversationId: string;
|
|
8
|
+
}
|
|
9
|
+
export interface MarkdownDeltaChunk {
|
|
10
|
+
type: "markdown_delta";
|
|
11
|
+
/** The chunk of markdown text. */
|
|
12
|
+
content: string;
|
|
13
|
+
}
|
|
14
|
+
export interface ToolStartChunk {
|
|
15
|
+
type: "tool_start";
|
|
16
|
+
/** The name of the tool being executed. */
|
|
17
|
+
tool_name: string;
|
|
18
|
+
}
|
|
19
|
+
export interface ToolInputChunk {
|
|
20
|
+
type: "tool_input";
|
|
21
|
+
/** The input provided to the tool (can be any JSON structure). */
|
|
22
|
+
content: unknown;
|
|
23
|
+
}
|
|
24
|
+
export interface ToolOutputChunk {
|
|
25
|
+
type: "tool_output";
|
|
26
|
+
/** The output received from the tool (can be any JSON structure). */
|
|
27
|
+
content: unknown;
|
|
28
|
+
}
|
|
29
|
+
export interface ToolErrorChunk {
|
|
30
|
+
type: "tool_error";
|
|
31
|
+
content: {
|
|
32
|
+
/** A summary error message. */
|
|
33
|
+
error_message: string;
|
|
34
|
+
/** Optional additional details about the error. */
|
|
35
|
+
details?: string | unknown;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
export interface ContextAddItemChunk {
|
|
39
|
+
type: "context_add_item";
|
|
40
|
+
/** The full context item that was added. */
|
|
41
|
+
item: ContextItem;
|
|
42
|
+
}
|
|
43
|
+
export interface TitleUpdateChunk {
|
|
44
|
+
type: "title_update";
|
|
45
|
+
/** The new suggested title for the conversation. */
|
|
46
|
+
title: string;
|
|
47
|
+
}
|
|
48
|
+
export interface ArtifactStartChunk {
|
|
49
|
+
type: "artifact_start";
|
|
50
|
+
artifactId: string;
|
|
51
|
+
artifactType: string;
|
|
52
|
+
title: string;
|
|
53
|
+
}
|
|
54
|
+
export interface ArtifactContentDeltaChunk {
|
|
55
|
+
type: "artifact_content_delta";
|
|
56
|
+
artifactId: string;
|
|
57
|
+
/** The chunk of artifact text content. */
|
|
58
|
+
content: string;
|
|
59
|
+
}
|
|
60
|
+
export interface ArtifactDataChunk {
|
|
61
|
+
type: "artifact_data";
|
|
62
|
+
artifactId: string;
|
|
63
|
+
/** The complete JSON data for the artifact. */
|
|
64
|
+
data: unknown;
|
|
65
|
+
}
|
|
66
|
+
export interface ArtifactUrlChunk {
|
|
67
|
+
type: "artifact_url";
|
|
68
|
+
artifactId: string;
|
|
69
|
+
/** The URL pointing to the artifact content. */
|
|
70
|
+
url: string;
|
|
71
|
+
}
|
|
72
|
+
export interface ArtifactEndChunk {
|
|
73
|
+
type: "artifact_end";
|
|
74
|
+
artifactId: string;
|
|
75
|
+
}
|
|
76
|
+
export interface ConversationCreatedChunk {
|
|
77
|
+
type: "conversation_created";
|
|
78
|
+
/** The ID of the newly created conversation. */
|
|
79
|
+
conversationId: string;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* A discriminated union of all possible chunk types streamed from the backend.
|
|
83
|
+
*/
|
|
84
|
+
export type StreamChunk = MarkdownDeltaChunk | ToolStartChunk | ToolInputChunk | ToolOutputChunk | ToolErrorChunk | ContextAddItemChunk | TitleUpdateChunk | ArtifactStartChunk | ArtifactContentDeltaChunk | ArtifactDataChunk | ArtifactUrlChunk | ArtifactEndChunk | ConversationCreatedChunk;
|
|
85
|
+
//# sourceMappingURL=ai-agent-coordinator-stream.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-agent-coordinator-stream.d.ts","sourceRoot":"","sources":["../../src/contracts/ai-agent-coordinator-stream.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAI5D;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,4CAA4C;IAC5C,cAAc,EAAE,MAAM,CAAA;CAEvB;AAID,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,gBAAgB,CAAA;IACtB,kCAAkC;IAClC,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,YAAY,CAAA;IAClB,2CAA2C;IAC3C,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,YAAY,CAAA;IAClB,kEAAkE;IAClE,OAAO,EAAE,OAAO,CAAA;CACjB;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,aAAa,CAAA;IACnB,qEAAqE;IACrE,OAAO,EAAE,OAAO,CAAA;CACjB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,YAAY,CAAA;IAClB,OAAO,EAAE;QACP,+BAA+B;QAC/B,aAAa,EAAE,MAAM,CAAA;QACrB,mDAAmD;QACnD,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;KAC3B,CAAA;CACF;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,kBAAkB,CAAA;IACxB,4CAA4C;IAC5C,IAAI,EAAE,WAAW,CAAA;CAClB;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,cAAc,CAAA;IACpB,oDAAoD;IACpD,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,gBAAgB,CAAA;IACtB,UAAU,EAAE,MAAM,CAAA;IAClB,YAAY,EAAE,MAAM,CAAA;IACpB,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,wBAAwB,CAAA;IAC9B,UAAU,EAAE,MAAM,CAAA;IAClB,0CAA0C;IAC1C,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,eAAe,CAAA;IACrB,UAAU,EAAE,MAAM,CAAA;IAClB,+CAA+C;IAC/C,IAAI,EAAE,OAAO,CAAA;CACd;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,cAAc,CAAA;IACpB,UAAU,EAAE,MAAM,CAAA;IAClB,gDAAgD;IAChD,GAAG,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,cAAc,CAAA;IACpB,UAAU,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,sBAAsB,CAAA;IAC5B,gDAAgD;IAChD,cAAc,EAAE,MAAM,CAAA;CACvB;AAED;;GAEG;AACH,MAAM,MAAM,WAAW,GACnB,kBAAkB,GAClB,cAAc,GACd,cAAc,GACd,eAAe,GACf,cAAc,GACd,mBAAmB,GACnB,gBAAgB,GAChB,kBAAkB,GAClB,yBAAyB,GACzB,iBAAiB,GACjB,gBAAgB,GAChB,gBAAgB,GAChB,wBAAwB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export interface ContextItem {
|
|
2
|
+
type: "tenant" | "dataCore" | "flowType" | "eventType" | string;
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
}
|
|
7
|
+
export interface Message {
|
|
8
|
+
id: string;
|
|
9
|
+
role: "user" | "ai";
|
|
10
|
+
content: string;
|
|
11
|
+
timestamp: string;
|
|
12
|
+
}
|
|
13
|
+
export interface ConversationMetadata {
|
|
14
|
+
id: string;
|
|
15
|
+
title: string;
|
|
16
|
+
lastUpdated: string;
|
|
17
|
+
}
|
|
18
|
+
export interface Conversation extends ConversationMetadata {
|
|
19
|
+
context: ContextItem[];
|
|
20
|
+
messages: Message[];
|
|
21
|
+
}
|
|
22
|
+
export interface ConversationListResponse {
|
|
23
|
+
conversations: ConversationMetadata[];
|
|
24
|
+
}
|
|
25
|
+
export interface ConversationDeleteResponse {
|
|
26
|
+
message: string;
|
|
27
|
+
}
|
|
28
|
+
export interface ContextUpdateResponse {
|
|
29
|
+
context: ContextItem[];
|
|
30
|
+
}
|
|
31
|
+
export interface AddContextItem {
|
|
32
|
+
type: string;
|
|
33
|
+
id: string;
|
|
34
|
+
}
|
|
35
|
+
export interface AddContextItemsRequest {
|
|
36
|
+
items: AddContextItem[];
|
|
37
|
+
}
|
|
38
|
+
export interface RemoveContextItemRequest {
|
|
39
|
+
itemId: string;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=ai-agent-coordinator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-agent-coordinator.d.ts","sourceRoot":"","sources":["../../src/contracts/ai-agent-coordinator.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,QAAQ,GAAG,UAAU,GAAG,UAAU,GAAG,WAAW,GAAG,MAAM,CAAA;IAC/D,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,YAAa,SAAQ,oBAAoB;IACxD,OAAO,EAAE,WAAW,EAAE,CAAA;IACtB,QAAQ,EAAE,OAAO,EAAE,CAAA;CACpB;AAED,MAAM,WAAW,wBAAwB;IACvC,aAAa,EAAE,oBAAoB,EAAE,CAAA;CACtC;AAED,MAAM,WAAW,0BAA0B;IACzC,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,WAAW,EAAE,CAAA;CACvB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAA;IACZ,EAAE,EAAE,MAAM,CAAA;CACX;AAED,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,cAAc,EAAE,CAAA;CACxB;AAED,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,MAAM,CAAA;CACf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/esm/mod.d.ts
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
|
+
export * from "./commands/ai-agent-coordinator/mod.js";
|
|
1
2
|
export * from "./commands/index.js";
|
|
2
|
-
export * from "./common/command.js";
|
|
3
3
|
export * from "./common/command-custom.js";
|
|
4
4
|
export * from "./common/command-graphql.js";
|
|
5
|
+
export * from "./common/command.js";
|
|
5
6
|
export * from "./common/flowcore-client.js";
|
|
6
|
-
export
|
|
7
|
+
export { NotificationClient, type NotificationClientOptions, type NotificationEvent, } from "./common/notification-client.js";
|
|
8
|
+
export * from "./common/websocket-client.js";
|
|
9
|
+
export { type OidcClient, WebSocketClient, type WebSocketClientOptions } from "./common/websocket-client.js";
|
|
10
|
+
export * from "./common/websocket-command.js";
|
|
11
|
+
export * from "./contracts/ai-agent-coordinator-stream.js";
|
|
12
|
+
export * from "./contracts/ai-agent-coordinator.js";
|
|
7
13
|
export * from "./contracts/index.js";
|
|
8
14
|
export * from "./exceptions/index.js";
|
|
9
15
|
export * from "./utils/parse-response-helper.js";
|
package/esm/mod.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AAAA,cAAc,wCAAwC,CAAA;AACtD,cAAc,qBAAqB,CAAA;AACnC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,qBAAqB,CAAA;AACnC,cAAc,6BAA6B,CAAA;AAC3C,OAAO,EACL,kBAAkB,EAClB,KAAK,yBAAyB,EAC9B,KAAK,iBAAiB,GACvB,MAAM,iCAAiC,CAAA;AACxC,cAAc,8BAA8B,CAAA;AAC5C,OAAO,EAAE,KAAK,UAAU,EAAE,eAAe,EAAE,KAAK,sBAAsB,EAAE,MAAM,8BAA8B,CAAA;AAC5G,cAAc,+BAA+B,CAAA;AAC7C,cAAc,4CAA4C,CAAA;AAC1D,cAAc,qCAAqC,CAAA;AACnD,cAAc,sBAAsB,CAAA;AACpC,cAAc,uBAAuB,CAAA;AACrC,cAAc,kCAAkC,CAAA"}
|
package/esm/mod.js
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
|
+
export * from "./commands/ai-agent-coordinator/mod.js";
|
|
1
2
|
export * from "./commands/index.js";
|
|
2
|
-
export * from "./common/command.js";
|
|
3
3
|
export * from "./common/command-custom.js";
|
|
4
4
|
export * from "./common/command-graphql.js";
|
|
5
|
+
export * from "./common/command.js";
|
|
5
6
|
export * from "./common/flowcore-client.js";
|
|
6
|
-
export
|
|
7
|
+
export { NotificationClient, } from "./common/notification-client.js";
|
|
8
|
+
export * from "./common/websocket-client.js";
|
|
9
|
+
export { WebSocketClient } from "./common/websocket-client.js";
|
|
10
|
+
export * from "./common/websocket-command.js";
|
|
11
|
+
export * from "./contracts/ai-agent-coordinator-stream.js";
|
|
12
|
+
export * from "./contracts/ai-agent-coordinator.js";
|
|
7
13
|
export * from "./contracts/index.js";
|
|
8
14
|
export * from "./exceptions/index.js";
|
|
9
15
|
export * from "./utils/parse-response-helper.js";
|
package/package.json
CHANGED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { Command } from "../../common/command.js";
|
|
2
|
+
import { Command as BaseCommandClass } from "../../common/command.js";
|
|
3
|
+
import type { AddContextItem, ContextUpdateResponse } from "../../contracts/ai-agent-coordinator.js";
|
|
4
|
+
/**
|
|
5
|
+
* Input for adding items to a conversation's context.
|
|
6
|
+
*/
|
|
7
|
+
export type ContextAddItemCommandInput = {
|
|
8
|
+
/** The ID of the conversation to modify. */
|
|
9
|
+
conversationId: string;
|
|
10
|
+
/** An array of context items (type and ID) to add. */
|
|
11
|
+
items: AddContextItem[];
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Output containing the updated context array after adding items.
|
|
15
|
+
*/
|
|
16
|
+
export type ContextAddItemCommandOutput = ContextUpdateResponse;
|
|
17
|
+
/**
|
|
18
|
+
* Command to add one or more items to the context of a specific conversation.
|
|
19
|
+
*/
|
|
20
|
+
export declare class ContextAddItemCommand extends BaseCommandClass<ContextAddItemCommandInput, ContextAddItemCommandOutput> implements Command<ContextAddItemCommandInput, ContextAddItemCommandOutput> {
|
|
21
|
+
constructor(input: ContextAddItemCommandInput);
|
|
22
|
+
protected getBaseUrl(): string;
|
|
23
|
+
protected getMethod(): string;
|
|
24
|
+
protected getPath(): string;
|
|
25
|
+
protected getBody(): Record<string, unknown>;
|
|
26
|
+
protected parseResponse(response: unknown): ContextAddItemCommandOutput;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=context-add-item.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-add-item.command.d.ts","sourceRoot":"","sources":["../../../src/commands/ai-agent-coordinator/context-add-item.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACtD,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AACrE,OAAO,KAAK,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAA;AAKpG;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG;IACvC,4CAA4C;IAC5C,cAAc,EAAE,MAAM,CAAA;IACtB,sDAAsD;IACtD,KAAK,EAAE,cAAc,EAAE,CAAA;CACxB,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,qBAAqB,CAAA;AAE/D;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,gBAAgB,CAAC,0BAA0B,EAAE,2BAA2B,CACjH,YAAW,OAAO,CAAC,0BAA0B,EAAE,2BAA2B,CAAC;gBAC/D,KAAK,EAAE,0BAA0B;cAI1B,UAAU,IAAI,MAAM;cAIpB,SAAS,IAAI,MAAM;cAInB,OAAO,IAAI,MAAM;cAIjB,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;cAMlC,aAAa,CAAC,QAAQ,EAAE,OAAO,GAAG,2BAA2B;CASjF"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ContextAddItemCommand = void 0;
|
|
4
|
+
const command_js_1 = require("../../common/command.js");
|
|
5
|
+
const service = "ai-coordinator";
|
|
6
|
+
const baseUrl = `https://${service}.api.flowcore.io`;
|
|
7
|
+
/**
|
|
8
|
+
* Command to add one or more items to the context of a specific conversation.
|
|
9
|
+
*/
|
|
10
|
+
class ContextAddItemCommand extends command_js_1.Command {
|
|
11
|
+
constructor(input) {
|
|
12
|
+
super(input);
|
|
13
|
+
}
|
|
14
|
+
getBaseUrl() {
|
|
15
|
+
return baseUrl;
|
|
16
|
+
}
|
|
17
|
+
getMethod() {
|
|
18
|
+
return "POST";
|
|
19
|
+
}
|
|
20
|
+
getPath() {
|
|
21
|
+
return `/api/v1/conversations/${this.input.conversationId}/context/add`;
|
|
22
|
+
}
|
|
23
|
+
getBody() {
|
|
24
|
+
return { items: this.input.items };
|
|
25
|
+
}
|
|
26
|
+
// Headers will be handled by base class based on getBody()
|
|
27
|
+
parseResponse(response) {
|
|
28
|
+
const data = response;
|
|
29
|
+
// Add more robust checking if necessary
|
|
30
|
+
if (data && Array.isArray(data.context)) {
|
|
31
|
+
return data;
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
throw new Error("Invalid response format for ContextAddItemCommand");
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.ContextAddItemCommand = ContextAddItemCommand;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { Command } from "../../common/command.js";
|
|
2
|
+
import { Command as BaseCommandClass } from "../../common/command.js";
|
|
3
|
+
import type { ContextUpdateResponse } from "../../contracts/ai-agent-coordinator.js";
|
|
4
|
+
/**
|
|
5
|
+
* Input for removing an item from a conversation's context.
|
|
6
|
+
*/
|
|
7
|
+
export type ContextRemoveItemCommandInput = {
|
|
8
|
+
/** The ID of the conversation to modify. */
|
|
9
|
+
conversationId: string;
|
|
10
|
+
/** The unique ID of the context item instance to remove. */
|
|
11
|
+
itemId: string;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Output containing the updated context array after removing the item.
|
|
15
|
+
*/
|
|
16
|
+
export type ContextRemoveItemCommandOutput = ContextUpdateResponse;
|
|
17
|
+
/**
|
|
18
|
+
* Command to remove a specific item from the context of a conversation.
|
|
19
|
+
*/
|
|
20
|
+
export declare class ContextRemoveItemCommand extends BaseCommandClass<ContextRemoveItemCommandInput, ContextRemoveItemCommandOutput> implements Command<ContextRemoveItemCommandInput, ContextRemoveItemCommandOutput> {
|
|
21
|
+
constructor(input: ContextRemoveItemCommandInput);
|
|
22
|
+
protected getBaseUrl(): string;
|
|
23
|
+
protected getMethod(): string;
|
|
24
|
+
protected getPath(): string;
|
|
25
|
+
protected getBody(): Record<string, unknown>;
|
|
26
|
+
protected parseResponse(response: unknown): ContextRemoveItemCommandOutput;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=context-remove-item.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-remove-item.command.d.ts","sourceRoot":"","sources":["../../../src/commands/ai-agent-coordinator/context-remove-item.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACtD,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AACrE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAA;AAKpF;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG;IAC1C,4CAA4C;IAC5C,cAAc,EAAE,MAAM,CAAA;IACtB,4DAA4D;IAC5D,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,qBAAqB,CAAA;AAElE;;GAEG;AACH,qBAAa,wBACX,SAAQ,gBAAgB,CAAC,6BAA6B,EAAE,8BAA8B,CACtF,YAAW,OAAO,CAAC,6BAA6B,EAAE,8BAA8B,CAAC;gBACrE,KAAK,EAAE,6BAA6B;cAI7B,UAAU,IAAI,MAAM;cAIpB,SAAS,IAAI,MAAM;cAInB,OAAO,IAAI,MAAM;cAIjB,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;cAIlC,aAAa,CAAC,QAAQ,EAAE,OAAO,GAAG,8BAA8B;CAQpF"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ContextRemoveItemCommand = void 0;
|
|
4
|
+
const command_js_1 = require("../../common/command.js");
|
|
5
|
+
const service = "ai-coordinator";
|
|
6
|
+
const baseUrl = `https://${service}.api.flowcore.io`;
|
|
7
|
+
/**
|
|
8
|
+
* Command to remove a specific item from the context of a conversation.
|
|
9
|
+
*/
|
|
10
|
+
class ContextRemoveItemCommand extends command_js_1.Command {
|
|
11
|
+
constructor(input) {
|
|
12
|
+
super(input);
|
|
13
|
+
}
|
|
14
|
+
getBaseUrl() {
|
|
15
|
+
return baseUrl;
|
|
16
|
+
}
|
|
17
|
+
getMethod() {
|
|
18
|
+
return "POST";
|
|
19
|
+
}
|
|
20
|
+
getPath() {
|
|
21
|
+
return `/api/v1/conversations/${this.input.conversationId}/context/remove`;
|
|
22
|
+
}
|
|
23
|
+
getBody() {
|
|
24
|
+
return { itemId: this.input.itemId };
|
|
25
|
+
}
|
|
26
|
+
parseResponse(response) {
|
|
27
|
+
const data = response;
|
|
28
|
+
if (data && Array.isArray(data.context)) {
|
|
29
|
+
return data;
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
throw new Error("Invalid response format for ContextRemoveItemCommand");
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.ContextRemoveItemCommand = ContextRemoveItemCommand;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Command } from "../../common/command.js";
|
|
2
|
+
import { Command as BaseCommandClass } from "../../common/command.js";
|
|
3
|
+
import type { ConversationDeleteResponse } from "../../contracts/ai-agent-coordinator.js";
|
|
4
|
+
/**
|
|
5
|
+
* Input for deleting a specific conversation.
|
|
6
|
+
*/
|
|
7
|
+
export type ConversationDeleteCommandInput = {
|
|
8
|
+
/** The unique ID of the conversation to delete. */
|
|
9
|
+
conversationId: string;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Output confirming the deletion of the conversation.
|
|
13
|
+
*/
|
|
14
|
+
export type ConversationDeleteCommandOutput = ConversationDeleteResponse;
|
|
15
|
+
/**
|
|
16
|
+
* Command to delete a specific conversation by its ID.
|
|
17
|
+
*/
|
|
18
|
+
export declare class ConversationDeleteCommand extends BaseCommandClass<ConversationDeleteCommandInput, ConversationDeleteCommandOutput> implements Command<ConversationDeleteCommandInput, ConversationDeleteCommandOutput> {
|
|
19
|
+
constructor(input: ConversationDeleteCommandInput);
|
|
20
|
+
protected getBaseUrl(): string;
|
|
21
|
+
protected getMethod(): string;
|
|
22
|
+
protected getPath(): string;
|
|
23
|
+
protected parseResponse(response: unknown): ConversationDeleteCommandOutput;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=conversation-delete.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversation-delete.command.d.ts","sourceRoot":"","sources":["../../../src/commands/ai-agent-coordinator/conversation-delete.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACtD,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AACrE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAA;AAKzF;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG;IAC3C,mDAAmD;IACnD,cAAc,EAAE,MAAM,CAAA;CACvB,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG,0BAA0B,CAAA;AAExE;;GAEG;AACH,qBAAa,yBACX,SAAQ,gBAAgB,CAAC,8BAA8B,EAAE,+BAA+B,CACxF,YAAW,OAAO,CAAC,8BAA8B,EAAE,+BAA+B,CAAC;gBACvE,KAAK,EAAE,8BAA8B;cAI9B,UAAU,IAAI,MAAM;cAIpB,SAAS,IAAI,MAAM;cAInB,OAAO,IAAI,MAAM;cAMjB,aAAa,CAAC,QAAQ,EAAE,OAAO,GAAG,+BAA+B;CAUrF"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConversationDeleteCommand = void 0;
|
|
4
|
+
const command_js_1 = require("../../common/command.js");
|
|
5
|
+
const service = "ai-coordinator";
|
|
6
|
+
const baseUrl = `https://${service}.api.flowcore.io`;
|
|
7
|
+
/**
|
|
8
|
+
* Command to delete a specific conversation by its ID.
|
|
9
|
+
*/
|
|
10
|
+
class ConversationDeleteCommand extends command_js_1.Command {
|
|
11
|
+
constructor(input) {
|
|
12
|
+
super(input);
|
|
13
|
+
}
|
|
14
|
+
getBaseUrl() {
|
|
15
|
+
return baseUrl;
|
|
16
|
+
}
|
|
17
|
+
getMethod() {
|
|
18
|
+
return "DELETE";
|
|
19
|
+
}
|
|
20
|
+
getPath() {
|
|
21
|
+
return `/api/v1/conversations/${this.input.conversationId}`;
|
|
22
|
+
}
|
|
23
|
+
// No need to override getBody or getHeaders for DELETE with no body
|
|
24
|
+
parseResponse(response) {
|
|
25
|
+
const data = response;
|
|
26
|
+
if (data && data.message) {
|
|
27
|
+
return data;
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
throw new Error("Invalid response format for ConversationDeleteCommand");
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.ConversationDeleteCommand = ConversationDeleteCommand;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Command } from "../../common/command.js";
|
|
2
|
+
import { Command as BaseCommandClass } from "../../common/command.js";
|
|
3
|
+
import type { Conversation } from "../../contracts/ai-agent-coordinator.js";
|
|
4
|
+
import type { ClientError } from "../../exceptions/client-error.js";
|
|
5
|
+
/**
|
|
6
|
+
* Input for fetching a specific conversation.
|
|
7
|
+
*/
|
|
8
|
+
export type ConversationGetCommandInput = {
|
|
9
|
+
/** The unique ID of the conversation to fetch. */
|
|
10
|
+
conversationId: string;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Output containing the full details of the fetched conversation.
|
|
14
|
+
*/
|
|
15
|
+
export type ConversationGetCommandOutput = Conversation;
|
|
16
|
+
/**
|
|
17
|
+
* Command to fetch the details of a specific conversation by its ID.
|
|
18
|
+
*/
|
|
19
|
+
export declare class ConversationGetCommand extends BaseCommandClass<ConversationGetCommandInput, ConversationGetCommandOutput> implements Command<ConversationGetCommandInput, ConversationGetCommandOutput> {
|
|
20
|
+
constructor(input: ConversationGetCommandInput);
|
|
21
|
+
protected getBaseUrl(): string;
|
|
22
|
+
protected getMethod(): string;
|
|
23
|
+
protected getPath(): string;
|
|
24
|
+
protected parseResponse(response: unknown): ConversationGetCommandOutput;
|
|
25
|
+
protected handleClientError(error: ClientError): void;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=conversation-get.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversation-get.command.d.ts","sourceRoot":"","sources":["../../../src/commands/ai-agent-coordinator/conversation-get.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACtD,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AACrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAA;AAC3E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AAMnE;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG;IACxC,kDAAkD;IAClD,cAAc,EAAE,MAAM,CAAA;CACvB,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,4BAA4B,GAAG,YAAY,CAAA;AAEvD;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,gBAAgB,CAAC,2BAA2B,EAAE,4BAA4B,CACpH,YAAW,OAAO,CAAC,2BAA2B,EAAE,4BAA4B,CAAC;gBACjE,KAAK,EAAE,2BAA2B;cAI3B,UAAU,IAAI,MAAM;cAIpB,SAAS,IAAI,MAAM;cAInB,OAAO,IAAI,MAAM;cAIjB,aAAa,CAAC,QAAQ,EAAE,OAAO,GAAG,4BAA4B;cAS9D,iBAAiB,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI;CAS/D"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConversationGetCommand = void 0;
|
|
4
|
+
const command_js_1 = require("../../common/command.js");
|
|
5
|
+
const index_js_1 = require("../../exceptions/index.js");
|
|
6
|
+
const service = "ai-coordinator";
|
|
7
|
+
const baseUrl = `https://${service}.api.flowcore.io`;
|
|
8
|
+
/**
|
|
9
|
+
* Command to fetch the details of a specific conversation by its ID.
|
|
10
|
+
*/
|
|
11
|
+
class ConversationGetCommand extends command_js_1.Command {
|
|
12
|
+
constructor(input) {
|
|
13
|
+
super(input);
|
|
14
|
+
}
|
|
15
|
+
getBaseUrl() {
|
|
16
|
+
return baseUrl;
|
|
17
|
+
}
|
|
18
|
+
getMethod() {
|
|
19
|
+
return "GET";
|
|
20
|
+
}
|
|
21
|
+
getPath() {
|
|
22
|
+
return `/api/v1/conversations/${this.input.conversationId}`;
|
|
23
|
+
}
|
|
24
|
+
parseResponse(response) {
|
|
25
|
+
const data = response;
|
|
26
|
+
if (data && data.id) {
|
|
27
|
+
return data;
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
throw new Error("Invalid response format for ConversationGetCommand");
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
handleClientError(error) {
|
|
34
|
+
if (error.status === 404) {
|
|
35
|
+
throw new index_js_1.NotFoundException("Conversation", { conversationId: this.input.conversationId });
|
|
36
|
+
}
|
|
37
|
+
throw error;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.ConversationGetCommand = ConversationGetCommand;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Command } from "../../common/command.js";
|
|
2
|
+
import { Command as BaseCommandClass } from "../../common/command.js";
|
|
3
|
+
import type { ConversationMetadata } from "../../contracts/ai-agent-coordinator.js";
|
|
4
|
+
/**
|
|
5
|
+
* Input for listing conversations.
|
|
6
|
+
* Currently empty as no filters are supported.
|
|
7
|
+
*/
|
|
8
|
+
export type ConversationListCommandInput = Record<string, never>;
|
|
9
|
+
/**
|
|
10
|
+
* Output containing a list of conversation metadata.
|
|
11
|
+
*/
|
|
12
|
+
export type ConversationListCommandOutput = ConversationMetadata[];
|
|
13
|
+
/**
|
|
14
|
+
* Command to list all conversations accessible by the user.
|
|
15
|
+
*/
|
|
16
|
+
export declare class ConversationListCommand extends BaseCommandClass<ConversationListCommandInput, ConversationListCommandOutput> implements Command<ConversationListCommandInput, ConversationListCommandOutput> {
|
|
17
|
+
constructor();
|
|
18
|
+
protected getBaseUrl(): string;
|
|
19
|
+
protected getMethod(): string;
|
|
20
|
+
protected getPath(): string;
|
|
21
|
+
protected parseResponse(response: unknown): ConversationListCommandOutput;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=conversation-list.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversation-list.command.d.ts","sourceRoot":"","sources":["../../../src/commands/ai-agent-coordinator/conversation-list.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACtD,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AACrE,OAAO,KAAK,EAA4B,oBAAoB,EAAE,MAAM,yCAAyC,CAAA;AAK7G;;;GAGG;AACH,MAAM,MAAM,4BAA4B,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;AAEhE;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,oBAAoB,EAAE,CAAA;AAElE;;GAEG;AACH,qBAAa,uBACX,SAAQ,gBAAgB,CAAC,4BAA4B,EAAE,6BAA6B,CACpF,YAAW,OAAO,CAAC,4BAA4B,EAAE,6BAA6B,CAAC;;cAK5D,UAAU,IAAI,MAAM;cAIpB,SAAS,IAAI,MAAM;cAInB,OAAO,IAAI,MAAM;cAIjB,aAAa,CAAC,QAAQ,EAAE,OAAO,GAAG,6BAA6B;CAQnF"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConversationListCommand = void 0;
|
|
4
|
+
const command_js_1 = require("../../common/command.js");
|
|
5
|
+
const service = "ai-coordinator";
|
|
6
|
+
const baseUrl = `https://${service}.api.flowcore.io`;
|
|
7
|
+
/**
|
|
8
|
+
* Command to list all conversations accessible by the user.
|
|
9
|
+
*/
|
|
10
|
+
class ConversationListCommand extends command_js_1.Command {
|
|
11
|
+
constructor() {
|
|
12
|
+
super({});
|
|
13
|
+
}
|
|
14
|
+
getBaseUrl() {
|
|
15
|
+
return baseUrl;
|
|
16
|
+
}
|
|
17
|
+
getMethod() {
|
|
18
|
+
return "GET";
|
|
19
|
+
}
|
|
20
|
+
getPath() {
|
|
21
|
+
return `/api/v1/conversations`;
|
|
22
|
+
}
|
|
23
|
+
parseResponse(response) {
|
|
24
|
+
const data = response;
|
|
25
|
+
if (data && Array.isArray(data.conversations)) {
|
|
26
|
+
return data.conversations;
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
throw new Error("Invalid response format for ConversationListCommand");
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.ConversationListCommand = ConversationListCommand;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { WebSocketCommand } from "../../common/websocket-command.js";
|
|
2
|
+
/**
|
|
3
|
+
* Configuration for the Conversation Stream.
|
|
4
|
+
* Only requires the conversationId.
|
|
5
|
+
*/
|
|
6
|
+
export interface ConversationStreamConfig {
|
|
7
|
+
conversationId: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Payload type for messages sent *to* the Conversation Stream.
|
|
11
|
+
*/
|
|
12
|
+
export interface ConversationStreamSendPayload {
|
|
13
|
+
content: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Command to stream conversation events for a specific agent.
|
|
17
|
+
*/
|
|
18
|
+
export declare class ConversationStreamCommand implements WebSocketCommand<ConversationStreamConfig, ConversationStreamSendPayload> {
|
|
19
|
+
private config;
|
|
20
|
+
constructor(config: ConversationStreamConfig);
|
|
21
|
+
/** Get the configuration object for the command. */
|
|
22
|
+
getConfig(): ConversationStreamConfig;
|
|
23
|
+
/** Get the base WebSocket URL. */
|
|
24
|
+
getWebSocketBaseUrl(): string;
|
|
25
|
+
/** Get the WebSocket path segment. */
|
|
26
|
+
getWebSocketPathSegment(config: ConversationStreamConfig): string;
|
|
27
|
+
/** Serializer function for outgoing payloads. */
|
|
28
|
+
serializeSendPayload(payload: ConversationStreamSendPayload): string;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=conversation-stream.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversation-stream.command.d.ts","sourceRoot":"","sources":["../../../src/commands/ai-agent-coordinator/conversation-stream.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAA;AAEzE;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACvC,cAAc,EAAE,MAAM,CAAA;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C,OAAO,EAAE,MAAM,CAAA;CAChB;AAED;;GAEG;AACH,qBAAa,yBACX,YAAW,gBAAgB,CAAC,wBAAwB,EAAE,6BAA6B,CAAC;IACpF,OAAO,CAAC,MAAM,CAA0B;gBAE5B,MAAM,EAAE,wBAAwB;IAO5C,oDAAoD;IACpD,SAAS,IAAI,wBAAwB;IAIrC,kCAAkC;IAClC,mBAAmB,IAAI,MAAM;IAK7B,sCAAsC;IACtC,uBAAuB,CAAC,MAAM,EAAE,wBAAwB,GAAG,MAAM;IAKjE,iDAAiD;IACjD,oBAAoB,CAAC,OAAO,EAAE,6BAA6B,GAAG,MAAM;CAIrE"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConversationStreamCommand = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Command to stream conversation events for a specific agent.
|
|
6
|
+
*/
|
|
7
|
+
class ConversationStreamCommand {
|
|
8
|
+
constructor(config) {
|
|
9
|
+
Object.defineProperty(this, "config", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
configurable: true,
|
|
12
|
+
writable: true,
|
|
13
|
+
value: void 0
|
|
14
|
+
});
|
|
15
|
+
if (!config.conversationId) {
|
|
16
|
+
throw new Error("conversationId is required in the config for ConversationStreamCommand");
|
|
17
|
+
}
|
|
18
|
+
this.config = config;
|
|
19
|
+
}
|
|
20
|
+
/** Get the configuration object for the command. */
|
|
21
|
+
getConfig() {
|
|
22
|
+
return this.config;
|
|
23
|
+
}
|
|
24
|
+
/** Get the base WebSocket URL. */
|
|
25
|
+
getWebSocketBaseUrl() {
|
|
26
|
+
// Specific base URL for AI Coordinator streams
|
|
27
|
+
return "wss://ai-coordinator.api.flowcore.io";
|
|
28
|
+
}
|
|
29
|
+
/** Get the WebSocket path segment. */
|
|
30
|
+
getWebSocketPathSegment(config) {
|
|
31
|
+
// Updated path segment based on likely API structure
|
|
32
|
+
return `/api/v1/stream/conversations/${config.conversationId}`;
|
|
33
|
+
}
|
|
34
|
+
/** Serializer function for outgoing payloads. */
|
|
35
|
+
serializeSendPayload(payload) {
|
|
36
|
+
// Default JSON serialization
|
|
37
|
+
return JSON.stringify(payload);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.ConversationStreamCommand = ConversationStreamCommand;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from "./context-add-item.command.js";
|
|
2
|
+
export * from "./context-remove-item.command.js";
|
|
3
|
+
export * from "./conversation-delete.command.js";
|
|
4
|
+
export * from "./conversation-get.command.js";
|
|
5
|
+
export * from "./conversation-list.command.js";
|
|
6
|
+
export * from "./conversation-stream.command.js";
|
|
7
|
+
//# sourceMappingURL=mod.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../src/commands/ai-agent-coordinator/mod.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAA;AAC7C,cAAc,kCAAkC,CAAA;AAChD,cAAc,kCAAkC,CAAA;AAChD,cAAc,+BAA+B,CAAA;AAC7C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,kCAAkC,CAAA"}
|