@ideascol/agents-generator-sdk 0.2.0 → 0.2.2

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/bin/cli.js CHANGED
@@ -1973,6 +1973,7 @@ class AgentClient {
1973
1973
  this.root = RootService;
1974
1974
  this.fileLibrary = FileLibraryService;
1975
1975
  this.credentials = CredentialsService;
1976
+ this.conversationsStream = ConversationsServiceStream;
1976
1977
  this.admin = {
1977
1978
  agents: AdminAgentsService,
1978
1979
  conversations: AdminConversationsService,
@@ -1982,9 +1983,8 @@ class AgentClient {
1982
1983
  };
1983
1984
  this.public = {
1984
1985
  agents: PublicAgentsService,
1985
- conversations: PublicConversationsService
1986
+ conversations: PublicConversationsServiceExtended
1986
1987
  };
1987
- this.conversationsStream = ConversationsServiceStream;
1988
1988
  this.ApiError = ApiError;
1989
1989
  this.CancelError = CancelError;
1990
1990
  this.CancelablePromise = CancelablePromise;
@@ -1997,7 +1997,7 @@ class AgentClient {
1997
1997
  return ConversationsServiceStream.addMessage(conversationId, requestBody, "text/plain");
1998
1998
  }
1999
1999
  }
2000
- var ConversationsServiceStream, lib_default;
2000
+ var ConversationsServiceStream, PublicConversationsServiceExtended, lib_default;
2001
2001
  var init_lib = __esm(() => {
2002
2002
  init_agents_generator();
2003
2003
  init_agents_generator();
@@ -2177,6 +2177,14 @@ var init_lib = __esm(() => {
2177
2177
  return () => controller.abort();
2178
2178
  }
2179
2179
  };
2180
+ PublicConversationsServiceExtended = class PublicConversationsServiceExtended extends PublicConversationsService {
2181
+ static sendMessageWithStreaming(conversationId, requestBody, callbacks) {
2182
+ return ConversationsServiceStream.addMessageConversationsConversationIdMessagesPostStream(conversationId, requestBody, callbacks);
2183
+ }
2184
+ static sendMessage(conversationId, requestBody) {
2185
+ return ConversationsServiceStream.addMessage(conversationId, requestBody);
2186
+ }
2187
+ };
2180
2188
  lib_default = AgentClient;
2181
2189
  });
2182
2190
 
@@ -2199,6 +2207,7 @@ var init_agentsCommand = __esm(() => {
2199
2207
  const agents = await client.agent.getAgents(0, 100);
2200
2208
  const agents2 = await client.admin.agents.getAgents(0, 100);
2201
2209
  const agent = await client.public.agents.getAgent("some-agent-id");
2210
+ const conversation = await client.public.conversations.sendMessageWithStreaming;
2202
2211
  console.log(agents);
2203
2212
  console.log(agents2);
2204
2213
  }
package/dist/index.js CHANGED
@@ -1541,6 +1541,7 @@ class AgentClient {
1541
1541
  this.root = RootService;
1542
1542
  this.fileLibrary = FileLibraryService;
1543
1543
  this.credentials = CredentialsService;
1544
+ this.conversationsStream = ConversationsServiceStream;
1544
1545
  this.admin = {
1545
1546
  agents: AdminAgentsService,
1546
1547
  conversations: AdminConversationsService,
@@ -1550,9 +1551,8 @@ class AgentClient {
1550
1551
  };
1551
1552
  this.public = {
1552
1553
  agents: PublicAgentsService,
1553
- conversations: PublicConversationsService
1554
+ conversations: PublicConversationsServiceExtended
1554
1555
  };
1555
- this.conversationsStream = ConversationsServiceStream;
1556
1556
  this.ApiError = ApiError;
1557
1557
  this.CancelError = CancelError;
1558
1558
  this.CancelablePromise = CancelablePromise;
@@ -1565,7 +1565,7 @@ class AgentClient {
1565
1565
  return ConversationsServiceStream.addMessage(conversationId, requestBody, "text/plain");
1566
1566
  }
1567
1567
  }
1568
- var ConversationsServiceStream, lib_default;
1568
+ var ConversationsServiceStream, PublicConversationsServiceExtended, lib_default;
1569
1569
  var init_lib = __esm(() => {
1570
1570
  init_agents_generator();
1571
1571
  init_agents_generator();
@@ -1745,6 +1745,14 @@ var init_lib = __esm(() => {
1745
1745
  return () => controller.abort();
1746
1746
  }
1747
1747
  };
1748
+ PublicConversationsServiceExtended = class PublicConversationsServiceExtended extends PublicConversationsService {
1749
+ static sendMessageWithStreaming(conversationId, requestBody, callbacks) {
1750
+ return ConversationsServiceStream.addMessageConversationsConversationIdMessagesPostStream(conversationId, requestBody, callbacks);
1751
+ }
1752
+ static sendMessage(conversationId, requestBody) {
1753
+ return ConversationsServiceStream.addMessage(conversationId, requestBody);
1754
+ }
1755
+ };
1748
1756
  lib_default = AgentClient;
1749
1757
  });
1750
1758
 
@@ -21,6 +21,14 @@ declare class ConversationsServiceStream extends ConversationsService {
21
21
  */
22
22
  static addMessageConversationsConversationIdMessagesPostStream(conversationId: string, requestBody: MessageCreate, callbacks: StreamCallbacks): () => void;
23
23
  }
24
+ declare class PublicConversationsServiceExtended extends PublicConversationsService {
25
+ static sendMessageWithStreaming(conversationId: string, requestBody: MessageCreate, callbacks: StreamCallbacks): () => void;
26
+ static sendMessage(conversationId: string, requestBody: MessageCreate): CancelablePromise<{
27
+ status: string;
28
+ message: string;
29
+ message_id?: string;
30
+ }>;
31
+ }
24
32
  export declare class AgentClient {
25
33
  admin: {
26
34
  agents: typeof AdminAgentsService;
@@ -31,7 +39,7 @@ export declare class AgentClient {
31
39
  };
32
40
  public: {
33
41
  agents: typeof PublicAgentsService;
34
- conversations: typeof PublicConversationsService;
42
+ conversations: typeof PublicConversationsServiceExtended;
35
43
  };
36
44
  /**
37
45
  * @deprecated agent: Use client.admin.agents
@@ -58,17 +66,24 @@ export declare class AgentClient {
58
66
  CancelError: typeof CancelError;
59
67
  CancelablePromise: typeof CancelablePromise;
60
68
  OpenAPI: typeof OpenAPI;
69
+ /**
70
+ * Conversations stream service
71
+ * @deprecated Use client.public.conversations.sendMessageWithStreaming instead
72
+ */
61
73
  conversationsStream: typeof ConversationsServiceStream;
62
74
  constructor({ apiUrl, apiToken, }: {
63
75
  apiUrl: string;
64
76
  apiToken: string;
65
77
  });
66
78
  /**
67
- * Envía un mensaje a una conversación con soporte para streaming
79
+ * sendMessageWithStreaming: Sent a message with streaming support to a conversation
80
+ * Use client.public.conversations.sendMessageWithStreaming instead
68
81
  */
69
82
  sendMessageWithStreaming(conversationId: string, requestBody: MessageCreate, callbacks: StreamCallbacks): () => void;
70
83
  /**
71
- * Envía un mensaje a una conversación sin streaming
84
+ * sendMessage: Sends a message to a conversation without streaming
85
+ * @returns CancelablePromise with the response
86
+ * Use client.public.conversations.sendMessage instead
72
87
  */
73
88
  sendMessage(conversationId: string, requestBody: MessageCreate): CancelablePromise<{
74
89
  status: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ideascol/agents-generator-sdk",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "main": "dist/index.js",
5
5
  "scripts": {
6
6
  "test": "bun test",