@elqnt/agents 3.2.0 → 3.3.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/dist/{agent-models-C36pvpUb.d.mts → agent-models-DLQlC7N6.d.mts} +143 -2
- package/dist/{agent-models-C36pvpUb.d.ts → agent-models-DLQlC7N6.d.ts} +143 -2
- package/dist/api/index.d.mts +67 -5
- package/dist/api/index.d.ts +67 -5
- package/dist/api/index.js +18 -2
- package/dist/api/index.js.map +1 -1
- package/dist/api/index.mjs +17 -1
- package/dist/api/server.d.mts +10 -2
- package/dist/api/server.d.ts +10 -2
- package/dist/api/server.js +16 -1
- package/dist/api/server.js.map +1 -1
- package/dist/api/server.mjs +15 -0
- package/dist/api/server.mjs.map +1 -1
- package/dist/chunk-2JDVRL35.js +133 -0
- package/dist/chunk-2JDVRL35.js.map +1 -0
- package/dist/chunk-3EHE4O57.mjs +133 -0
- package/dist/chunk-3EHE4O57.mjs.map +1 -0
- package/dist/{chunk-FR422IHO.mjs → chunk-BT33DRUI.mjs} +67 -1
- package/dist/chunk-BT33DRUI.mjs.map +1 -0
- package/dist/{chunk-SXYTVNKJ.mjs → chunk-JCPMUFOP.mjs} +7 -1
- package/dist/{chunk-SXYTVNKJ.mjs.map → chunk-JCPMUFOP.mjs.map} +1 -1
- package/dist/{chunk-IUKM3T2S.js → chunk-KA7N4YTF.js} +69 -3
- package/dist/chunk-KA7N4YTF.js.map +1 -0
- package/dist/{chunk-V5GHDXSW.mjs → chunk-MNFZXJ2Y.mjs} +500 -157
- package/dist/chunk-MNFZXJ2Y.mjs.map +1 -0
- package/dist/chunk-PKLT6GDN.js +1114 -0
- package/dist/chunk-PKLT6GDN.js.map +1 -0
- package/dist/{chunk-TPQS2XAW.js → chunk-VGWUFWOE.js} +8 -2
- package/dist/chunk-VGWUFWOE.js.map +1 -0
- package/dist/hooks/index.d.mts +158 -70
- package/dist/hooks/index.d.ts +158 -70
- package/dist/hooks/index.js +4 -3
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +7 -6
- package/dist/index.d.mts +7 -4
- package/dist/index.d.ts +7 -4
- package/dist/index.js +27 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +30 -7
- package/dist/models/index.d.mts +3 -2
- package/dist/models/index.d.ts +3 -2
- package/dist/models/index.js +8 -2
- package/dist/models/index.js.map +1 -1
- package/dist/models/index.mjs +7 -1
- package/dist/{sandbox-BHeWPjLU.d.mts → sandbox-DOxoM2Ge.d.mts} +1 -0
- package/dist/{sandbox-BHeWPjLU.d.ts → sandbox-DOxoM2Ge.d.ts} +1 -0
- package/dist/structured-Bs0IjwLD.d.mts +35 -0
- package/dist/structured-Bs0IjwLD.d.ts +35 -0
- package/dist/transport/index.d.mts +36 -0
- package/dist/transport/index.d.ts +36 -0
- package/dist/transport/index.js +8 -0
- package/dist/transport/index.js.map +1 -0
- package/dist/transport/index.mjs +8 -0
- package/dist/transport/index.mjs.map +1 -0
- package/dist/types-C2qd5f-E.d.mts +51 -0
- package/dist/types-k9PszCzt.d.ts +51 -0
- package/dist/utils/index.d.mts +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/package.json +11 -5
- package/dist/chunk-FR422IHO.mjs.map +0 -1
- package/dist/chunk-IUKM3T2S.js.map +0 -1
- package/dist/chunk-RGVWAFZP.js +0 -771
- package/dist/chunk-RGVWAFZP.js.map +0 -1
- package/dist/chunk-TPQS2XAW.js.map +0 -1
- package/dist/chunk-V5GHDXSW.mjs.map +0 -1
package/dist/api/index.d.ts
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { ApiClientOptions, ApiResponse } from '@elqnt/api-client';
|
|
2
2
|
import { ResponseMetadata } from '@elqnt/types';
|
|
3
|
-
import { A as Agent, ai as AgentResponse, Z as AgentJob, a4 as AgentJobResponse,
|
|
4
|
-
export {
|
|
5
|
-
import { ap as IntegrationProviderTS, aA as IntegrationTypeTS, e as ConnectIntegrationResponse, h as CreateSandboxRequest, i as CreateSandboxResponse, m as DeleteSandboxResponse, r as DisconnectIntegrationResponse, R as GetUserIntegrationResponse, O as GetSandboxResponse, ai as IntegrationCallbackResponse, aL as ListUserIntegrationsResponse, aJ as ListSandboxesResponse, aT as RefreshIntegrationResponse, aV as RunEmailTriageResponse, b9 as UpdateTriageEnabledResponse, b5 as UpdateSandboxRequest, b6 as UpdateSandboxResponse } from '../sandbox-
|
|
6
|
-
export { aW as Sandbox, ba as UserIntegration } from '../sandbox-
|
|
3
|
+
import { A as Agent, bc as BackgroundAgentStatusResponse, ai as AgentResponse, Z as AgentJob, a4 as AgentJobResponse, ds as Skill, dC as SkillResponse, dV as SubAgent, dW as SubAgentResponse, eh as ToolDefinition, ei as ToolDefinitionResponse, a$ as AgentWidget, b0 as AgentWidgetResponse, dI as SkillUserConfigResponse, c4 as GetSkillsByIDsResponse, ca as GetToolDefinitionsByIDsResponse, aa as AgentJobsListResponse, cJ as ListAgentsResponse, cL as ListAgentsSummaryResponse, dG as SkillUserConfigListResponse, dQ as SkillsListResponse, e2 as SubAgentsListResponse, eq as ToolDefinitionsListResponse, cH as ListAgentWidgetsResponse, dk as ResolveSkillConfigResponse, eG as TriggerBackgroundAgentRequest, eH as TriggerBackgroundAgentResponse } from '../agent-models-DLQlC7N6.js';
|
|
4
|
+
export { aI as AgentSummary, dD as SkillUserConfig } from '../agent-models-DLQlC7N6.js';
|
|
5
|
+
import { ap as IntegrationProviderTS, aA as IntegrationTypeTS, e as ConnectIntegrationResponse, h as CreateSandboxRequest, i as CreateSandboxResponse, m as DeleteSandboxResponse, r as DisconnectIntegrationResponse, R as GetUserIntegrationResponse, O as GetSandboxResponse, ai as IntegrationCallbackResponse, aL as ListUserIntegrationsResponse, aJ as ListSandboxesResponse, aT as RefreshIntegrationResponse, aV as RunEmailTriageResponse, b9 as UpdateTriageEnabledResponse, b5 as UpdateSandboxRequest, b6 as UpdateSandboxResponse } from '../sandbox-DOxoM2Ge.js';
|
|
6
|
+
export { aW as Sandbox, ba as UserIntegration } from '../sandbox-DOxoM2Ge.js';
|
|
7
|
+
import { a as StructuredOutputRequest, b as StructuredOutputResponse } from '../structured-Bs0IjwLD.js';
|
|
8
|
+
export { S as StructuredOutputProvider, c as StructuredOutputUsage } from '../structured-Bs0IjwLD.js';
|
|
9
|
+
import { ChatMessage } from '@elqnt/chat/models';
|
|
10
|
+
export { Attachment, ChatMessage } from '@elqnt/chat/models';
|
|
7
11
|
|
|
8
12
|
/**
|
|
9
13
|
* Agents API functions
|
|
@@ -23,6 +27,8 @@ declare function deleteAgentApi(agentId: string, options: ApiClientOptions): Pro
|
|
|
23
27
|
}>>;
|
|
24
28
|
declare function getDefaultAgentApi(options: ApiClientOptions): Promise<ApiResponse<AgentResponse>>;
|
|
25
29
|
declare function getAgentByNameApi(name: string, options: ApiClientOptions): Promise<ApiResponse<AgentResponse>>;
|
|
30
|
+
declare function exportAgentApi(agentId: string, options: ApiClientOptions): Promise<Agent>;
|
|
31
|
+
declare function importAgentApi(agent: Agent, options: ApiClientOptions): Promise<ApiResponse<AgentResponse>>;
|
|
26
32
|
declare function listSkillsApi(options: ApiClientOptions): Promise<ApiResponse<SkillsListResponse>>;
|
|
27
33
|
declare function getSkillApi(skillId: string, options: ApiClientOptions): Promise<ApiResponse<SkillResponse>>;
|
|
28
34
|
declare function getSkillsByIdsApi(ids: string[], options: ApiClientOptions): Promise<ApiResponse<GetSkillsByIDsResponse>>;
|
|
@@ -87,6 +93,17 @@ declare function setDefaultWidgetApi(widgetId: string, agentId: string, options:
|
|
|
87
93
|
success: boolean;
|
|
88
94
|
metadata: ResponseMetadata;
|
|
89
95
|
}>>;
|
|
96
|
+
/**
|
|
97
|
+
* Call the one-shot structured-output LLM primitive.
|
|
98
|
+
*
|
|
99
|
+
* Sends `{ provider, model, prompts, schema }` through the API Gateway and
|
|
100
|
+
* returns a typed JSON object matching the supplied schema. No tool use, no
|
|
101
|
+
* streaming, no persistence — a single LLM roundtrip.
|
|
102
|
+
*
|
|
103
|
+
* @see docs/agents/structured-output.md
|
|
104
|
+
* @typeParam T - Shape of the expected output (inferred from schema).
|
|
105
|
+
*/
|
|
106
|
+
declare function structuredOutputApi<T = unknown>(request: StructuredOutputRequest, options: ApiClientOptions): Promise<ApiResponse<StructuredOutputResponse<T>>>;
|
|
90
107
|
interface DateFilter {
|
|
91
108
|
from?: string;
|
|
92
109
|
to?: string;
|
|
@@ -139,6 +156,51 @@ declare function deleteAgentJobApi(jobId: string, options: ApiClientOptions): Pr
|
|
|
139
156
|
}>>;
|
|
140
157
|
declare function pauseAgentJobApi(jobId: string, options: ApiClientOptions): Promise<ApiResponse<AgentJobResponse>>;
|
|
141
158
|
declare function resumeAgentJobApi(jobId: string, options: ApiClientOptions): Promise<ApiResponse<AgentJobResponse>>;
|
|
159
|
+
declare function triggerBackgroundAgentApi(request: Pick<TriggerBackgroundAgentRequest, "name" | "prompt" | "agentName" | "context" | "enableSSE" | "frequency" | "cron" | "timezone" | "scope" | "description">, options: ApiClientOptions): Promise<ApiResponse<TriggerBackgroundAgentResponse>>;
|
|
160
|
+
declare function checkBackgroundAgentStatusApi(jobId: string, options: ApiClientOptions): Promise<ApiResponse<BackgroundAgentStatusResponse>>;
|
|
161
|
+
interface CreateBackgroundChatRequest {
|
|
162
|
+
agentName: string;
|
|
163
|
+
background: boolean;
|
|
164
|
+
metadata?: Record<string, unknown>;
|
|
165
|
+
}
|
|
166
|
+
interface CreateBackgroundChatResponse {
|
|
167
|
+
chatKey: string;
|
|
168
|
+
}
|
|
169
|
+
interface SendChatMessageRequest {
|
|
170
|
+
chatKey: string;
|
|
171
|
+
message: {
|
|
172
|
+
role: string;
|
|
173
|
+
content: string;
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
interface SendChatMessageResponse {
|
|
177
|
+
success: boolean;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
interface LoadChatResponse {
|
|
181
|
+
chat: {
|
|
182
|
+
key: string;
|
|
183
|
+
orgId: string;
|
|
184
|
+
title?: string;
|
|
185
|
+
status?: string;
|
|
186
|
+
messages?: ChatMessage[];
|
|
187
|
+
metadata?: Record<string, unknown>;
|
|
188
|
+
lastUpdated?: number;
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Create a background chat session via the chat service.
|
|
193
|
+
* Uses the existing /v1/chat/create endpoint with background agent metadata.
|
|
194
|
+
*/
|
|
195
|
+
declare function createBackgroundChatApi(request: CreateBackgroundChatRequest, options: ApiClientOptions): Promise<ApiResponse<CreateBackgroundChatResponse>>;
|
|
196
|
+
/**
|
|
197
|
+
* Send a message to a chat session via the chat service.
|
|
198
|
+
*/
|
|
199
|
+
declare function sendChatMessageApi(request: SendChatMessageRequest, options: ApiClientOptions): Promise<ApiResponse<SendChatMessageResponse>>;
|
|
200
|
+
/**
|
|
201
|
+
* Load a chat session including its messages via the chat service.
|
|
202
|
+
*/
|
|
203
|
+
declare function loadChatApi(chatKey: string, options: ApiClientOptions): Promise<ApiResponse<LoadChatResponse>>;
|
|
142
204
|
interface SkillCategoriesResponse {
|
|
143
205
|
categories: string[];
|
|
144
206
|
metadata: ResponseMetadata;
|
|
@@ -364,4 +426,4 @@ declare function resumeScheduleApi(scheduleId: string, options: ApiClientOptions
|
|
|
364
426
|
*/
|
|
365
427
|
declare function runScheduleApi(scheduleId: string, options: ApiClientOptions): Promise<ApiResponse<SchedulerScheduleResponse>>;
|
|
366
428
|
|
|
367
|
-
export { Agent, AgentJob, AgentJobResponse, AgentJobsListResponse, AgentWidget, type AnalyticsDataResponse, ConnectIntegrationResponse, CreateSandboxRequest, CreateSandboxResponse, type DateFilter, DeleteSandboxResponse, DisconnectIntegrationResponse, GetSandboxResponse, GetToolDefinitionsByIDsResponse, GetUserIntegrationResponse, IntegrationCallbackResponse, IntegrationProviderTS, IntegrationTypeTS, ListSandboxesResponse, ListUserIntegrationsResponse, type ProvisionAgentsResponse, RefreshIntegrationResponse, ResolveSkillConfigResponse, RunEmailTriageResponse, type SchedulerSchedule, type SchedulerScheduleListResponse, type SchedulerScheduleResponse, type SchedulerTask, type SchedulerTaskListResponse, type SchedulerTaskResponse, Skill, type SkillCategoriesResponse, SkillUserConfigListResponse, SkillUserConfigResponse, SubAgent, ToolDefinition, ToolDefinitionResponse, ToolDefinitionsListResponse, UpdateSandboxRequest, UpdateSandboxResponse, UpdateTriageEnabledResponse, completeSchedulerTaskApi, connectIntegrationApi, createAgentApi, createAgentJobApi, createSandboxApi, createScheduleApi, createSchedulerTaskApi, createSkillApi, createSubAgentApi, createToolDefinitionApi, createWidgetApi, deleteAgentApi, deleteAgentJobApi, deleteSandboxApi, deleteScheduleApi, deleteSchedulerTaskApi, deleteSkillApi, deleteSkillUserConfigApi, deleteSubAgentApi, deleteToolDefinitionApi, deleteWidgetApi, disconnectIntegrationApi, getAgentApi, getAgentByNameApi, getAgentCSATAnalyticsApi, getAgentChatsAnalyticsApi, getAgentJobApi, getAgentListAnalyticsApi, getDefaultAgentApi, getDefaultWidgetApi, getIntegrationApi, getSandboxApi, getScheduleApi, getSchedulerTaskApi, getSkillApi, getSkillCategoriesApi, getSkillUserConfigApi, getSkillsByIdsApi, getSubAgentApi, getTaskOutcomesApi, getToolDefinitionApi, getToolDefinitionsByIdsApi, getWidgetApi, getWidgetByWidgetIdApi, integrationCallbackApi, listAgentJobsApi, listAgentsApi, listAgentsSummaryApi, listIntegrationsApi, listSandboxesApi, listSchedulerTasksApi, listSchedulesApi, listSkillUserConfigsApi, listSkillsApi, listSubAgentsApi, listToolDefinitionsApi, listWidgetsApi, pauseAgentJobApi, pauseScheduleApi, provisionAgentsApi, refreshIntegrationApi, resolveSkillConfigApi, resumeAgentJobApi, resumeScheduleApi, runEmailTriageApi, runScheduleApi, searchSkillsApi, setDefaultWidgetApi, snoozeSchedulerTaskApi, startSchedulerTaskApi, updateAgentApi, updateAgentJobApi, updateIntegrationTriageApi, updateSandboxApi, updateScheduleApi, updateSchedulerTaskApi, updateSkillApi, updateSkillOrgConfigApi, updateSkillUserConfigApi, updateSubAgentApi, updateToolDefinitionApi, updateWidgetApi };
|
|
429
|
+
export { Agent, AgentJob, AgentJobResponse, AgentJobsListResponse, AgentWidget, type AnalyticsDataResponse, ConnectIntegrationResponse, type CreateBackgroundChatRequest, type CreateBackgroundChatResponse, CreateSandboxRequest, CreateSandboxResponse, type DateFilter, DeleteSandboxResponse, DisconnectIntegrationResponse, GetSandboxResponse, GetToolDefinitionsByIDsResponse, GetUserIntegrationResponse, IntegrationCallbackResponse, IntegrationProviderTS, IntegrationTypeTS, ListSandboxesResponse, ListUserIntegrationsResponse, type LoadChatResponse, type ProvisionAgentsResponse, RefreshIntegrationResponse, ResolveSkillConfigResponse, RunEmailTriageResponse, type SchedulerSchedule, type SchedulerScheduleListResponse, type SchedulerScheduleResponse, type SchedulerTask, type SchedulerTaskListResponse, type SchedulerTaskResponse, type SendChatMessageRequest, type SendChatMessageResponse, Skill, type SkillCategoriesResponse, SkillUserConfigListResponse, SkillUserConfigResponse, StructuredOutputRequest, StructuredOutputResponse, SubAgent, ToolDefinition, ToolDefinitionResponse, ToolDefinitionsListResponse, UpdateSandboxRequest, UpdateSandboxResponse, UpdateTriageEnabledResponse, checkBackgroundAgentStatusApi, completeSchedulerTaskApi, connectIntegrationApi, createAgentApi, createAgentJobApi, createBackgroundChatApi, createSandboxApi, createScheduleApi, createSchedulerTaskApi, createSkillApi, createSubAgentApi, createToolDefinitionApi, createWidgetApi, deleteAgentApi, deleteAgentJobApi, deleteSandboxApi, deleteScheduleApi, deleteSchedulerTaskApi, deleteSkillApi, deleteSkillUserConfigApi, deleteSubAgentApi, deleteToolDefinitionApi, deleteWidgetApi, disconnectIntegrationApi, exportAgentApi, getAgentApi, getAgentByNameApi, getAgentCSATAnalyticsApi, getAgentChatsAnalyticsApi, getAgentJobApi, getAgentListAnalyticsApi, getDefaultAgentApi, getDefaultWidgetApi, getIntegrationApi, getSandboxApi, getScheduleApi, getSchedulerTaskApi, getSkillApi, getSkillCategoriesApi, getSkillUserConfigApi, getSkillsByIdsApi, getSubAgentApi, getTaskOutcomesApi, getToolDefinitionApi, getToolDefinitionsByIdsApi, getWidgetApi, getWidgetByWidgetIdApi, importAgentApi, integrationCallbackApi, listAgentJobsApi, listAgentsApi, listAgentsSummaryApi, listIntegrationsApi, listSandboxesApi, listSchedulerTasksApi, listSchedulesApi, listSkillUserConfigsApi, listSkillsApi, listSubAgentsApi, listToolDefinitionsApi, listWidgetsApi, loadChatApi, pauseAgentJobApi, pauseScheduleApi, provisionAgentsApi, refreshIntegrationApi, resolveSkillConfigApi, resumeAgentJobApi, resumeScheduleApi, runEmailTriageApi, runScheduleApi, searchSkillsApi, sendChatMessageApi, setDefaultWidgetApi, snoozeSchedulerTaskApi, startSchedulerTaskApi, structuredOutputApi, triggerBackgroundAgentApi, updateAgentApi, updateAgentJobApi, updateIntegrationTriageApi, updateSandboxApi, updateScheduleApi, updateSchedulerTaskApi, updateSkillApi, updateSkillOrgConfigApi, updateSkillUserConfigApi, updateSubAgentApi, updateToolDefinitionApi, updateWidgetApi };
|
package/dist/api/index.js
CHANGED
|
@@ -82,7 +82,6 @@
|
|
|
82
82
|
|
|
83
83
|
|
|
84
84
|
|
|
85
|
-
var _chunkIUKM3T2Sjs = require('../chunk-IUKM3T2S.js');
|
|
86
85
|
|
|
87
86
|
|
|
88
87
|
|
|
@@ -91,6 +90,7 @@ var _chunkIUKM3T2Sjs = require('../chunk-IUKM3T2S.js');
|
|
|
91
90
|
|
|
92
91
|
|
|
93
92
|
|
|
93
|
+
var _chunkKA7N4YTFjs = require('../chunk-KA7N4YTF.js');
|
|
94
94
|
|
|
95
95
|
|
|
96
96
|
|
|
@@ -166,5 +166,21 @@ var _chunkIUKM3T2Sjs = require('../chunk-IUKM3T2S.js');
|
|
|
166
166
|
|
|
167
167
|
|
|
168
168
|
|
|
169
|
-
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
exports.checkBackgroundAgentStatusApi = _chunkKA7N4YTFjs.checkBackgroundAgentStatusApi; exports.completeSchedulerTaskApi = _chunkKA7N4YTFjs.completeSchedulerTaskApi; exports.connectIntegrationApi = _chunkKA7N4YTFjs.connectIntegrationApi; exports.createAgentApi = _chunkKA7N4YTFjs.createAgentApi; exports.createAgentJobApi = _chunkKA7N4YTFjs.createAgentJobApi; exports.createBackgroundChatApi = _chunkKA7N4YTFjs.createBackgroundChatApi; exports.createSandboxApi = _chunkKA7N4YTFjs.createSandboxApi; exports.createScheduleApi = _chunkKA7N4YTFjs.createScheduleApi; exports.createSchedulerTaskApi = _chunkKA7N4YTFjs.createSchedulerTaskApi; exports.createSkillApi = _chunkKA7N4YTFjs.createSkillApi; exports.createSubAgentApi = _chunkKA7N4YTFjs.createSubAgentApi; exports.createToolDefinitionApi = _chunkKA7N4YTFjs.createToolDefinitionApi; exports.createWidgetApi = _chunkKA7N4YTFjs.createWidgetApi; exports.deleteAgentApi = _chunkKA7N4YTFjs.deleteAgentApi; exports.deleteAgentJobApi = _chunkKA7N4YTFjs.deleteAgentJobApi; exports.deleteSandboxApi = _chunkKA7N4YTFjs.deleteSandboxApi; exports.deleteScheduleApi = _chunkKA7N4YTFjs.deleteScheduleApi; exports.deleteSchedulerTaskApi = _chunkKA7N4YTFjs.deleteSchedulerTaskApi; exports.deleteSkillApi = _chunkKA7N4YTFjs.deleteSkillApi; exports.deleteSkillUserConfigApi = _chunkKA7N4YTFjs.deleteSkillUserConfigApi; exports.deleteSubAgentApi = _chunkKA7N4YTFjs.deleteSubAgentApi; exports.deleteToolDefinitionApi = _chunkKA7N4YTFjs.deleteToolDefinitionApi; exports.deleteWidgetApi = _chunkKA7N4YTFjs.deleteWidgetApi; exports.disconnectIntegrationApi = _chunkKA7N4YTFjs.disconnectIntegrationApi; exports.exportAgentApi = _chunkKA7N4YTFjs.exportAgentApi; exports.getAgentApi = _chunkKA7N4YTFjs.getAgentApi; exports.getAgentByNameApi = _chunkKA7N4YTFjs.getAgentByNameApi; exports.getAgentCSATAnalyticsApi = _chunkKA7N4YTFjs.getAgentCSATAnalyticsApi; exports.getAgentChatsAnalyticsApi = _chunkKA7N4YTFjs.getAgentChatsAnalyticsApi; exports.getAgentJobApi = _chunkKA7N4YTFjs.getAgentJobApi; exports.getAgentListAnalyticsApi = _chunkKA7N4YTFjs.getAgentListAnalyticsApi; exports.getDefaultAgentApi = _chunkKA7N4YTFjs.getDefaultAgentApi; exports.getDefaultWidgetApi = _chunkKA7N4YTFjs.getDefaultWidgetApi; exports.getIntegrationApi = _chunkKA7N4YTFjs.getIntegrationApi; exports.getSandboxApi = _chunkKA7N4YTFjs.getSandboxApi; exports.getScheduleApi = _chunkKA7N4YTFjs.getScheduleApi; exports.getSchedulerTaskApi = _chunkKA7N4YTFjs.getSchedulerTaskApi; exports.getSkillApi = _chunkKA7N4YTFjs.getSkillApi; exports.getSkillCategoriesApi = _chunkKA7N4YTFjs.getSkillCategoriesApi; exports.getSkillUserConfigApi = _chunkKA7N4YTFjs.getSkillUserConfigApi; exports.getSkillsByIdsApi = _chunkKA7N4YTFjs.getSkillsByIdsApi; exports.getSubAgentApi = _chunkKA7N4YTFjs.getSubAgentApi; exports.getTaskOutcomesApi = _chunkKA7N4YTFjs.getTaskOutcomesApi; exports.getToolDefinitionApi = _chunkKA7N4YTFjs.getToolDefinitionApi; exports.getToolDefinitionsByIdsApi = _chunkKA7N4YTFjs.getToolDefinitionsByIdsApi; exports.getWidgetApi = _chunkKA7N4YTFjs.getWidgetApi; exports.getWidgetByWidgetIdApi = _chunkKA7N4YTFjs.getWidgetByWidgetIdApi; exports.importAgentApi = _chunkKA7N4YTFjs.importAgentApi; exports.integrationCallbackApi = _chunkKA7N4YTFjs.integrationCallbackApi; exports.listAgentJobsApi = _chunkKA7N4YTFjs.listAgentJobsApi; exports.listAgentsApi = _chunkKA7N4YTFjs.listAgentsApi; exports.listAgentsSummaryApi = _chunkKA7N4YTFjs.listAgentsSummaryApi; exports.listIntegrationsApi = _chunkKA7N4YTFjs.listIntegrationsApi; exports.listSandboxesApi = _chunkKA7N4YTFjs.listSandboxesApi; exports.listSchedulerTasksApi = _chunkKA7N4YTFjs.listSchedulerTasksApi; exports.listSchedulesApi = _chunkKA7N4YTFjs.listSchedulesApi; exports.listSkillUserConfigsApi = _chunkKA7N4YTFjs.listSkillUserConfigsApi; exports.listSkillsApi = _chunkKA7N4YTFjs.listSkillsApi; exports.listSubAgentsApi = _chunkKA7N4YTFjs.listSubAgentsApi; exports.listToolDefinitionsApi = _chunkKA7N4YTFjs.listToolDefinitionsApi; exports.listWidgetsApi = _chunkKA7N4YTFjs.listWidgetsApi; exports.loadChatApi = _chunkKA7N4YTFjs.loadChatApi; exports.pauseAgentJobApi = _chunkKA7N4YTFjs.pauseAgentJobApi; exports.pauseScheduleApi = _chunkKA7N4YTFjs.pauseScheduleApi; exports.provisionAgentsApi = _chunkKA7N4YTFjs.provisionAgentsApi; exports.refreshIntegrationApi = _chunkKA7N4YTFjs.refreshIntegrationApi; exports.resolveSkillConfigApi = _chunkKA7N4YTFjs.resolveSkillConfigApi; exports.resumeAgentJobApi = _chunkKA7N4YTFjs.resumeAgentJobApi; exports.resumeScheduleApi = _chunkKA7N4YTFjs.resumeScheduleApi; exports.runEmailTriageApi = _chunkKA7N4YTFjs.runEmailTriageApi; exports.runScheduleApi = _chunkKA7N4YTFjs.runScheduleApi; exports.searchSkillsApi = _chunkKA7N4YTFjs.searchSkillsApi; exports.sendChatMessageApi = _chunkKA7N4YTFjs.sendChatMessageApi; exports.setDefaultWidgetApi = _chunkKA7N4YTFjs.setDefaultWidgetApi; exports.snoozeSchedulerTaskApi = _chunkKA7N4YTFjs.snoozeSchedulerTaskApi; exports.startSchedulerTaskApi = _chunkKA7N4YTFjs.startSchedulerTaskApi; exports.structuredOutputApi = _chunkKA7N4YTFjs.structuredOutputApi; exports.triggerBackgroundAgentApi = _chunkKA7N4YTFjs.triggerBackgroundAgentApi; exports.updateAgentApi = _chunkKA7N4YTFjs.updateAgentApi; exports.updateAgentJobApi = _chunkKA7N4YTFjs.updateAgentJobApi; exports.updateIntegrationTriageApi = _chunkKA7N4YTFjs.updateIntegrationTriageApi; exports.updateSandboxApi = _chunkKA7N4YTFjs.updateSandboxApi; exports.updateScheduleApi = _chunkKA7N4YTFjs.updateScheduleApi; exports.updateSchedulerTaskApi = _chunkKA7N4YTFjs.updateSchedulerTaskApi; exports.updateSkillApi = _chunkKA7N4YTFjs.updateSkillApi; exports.updateSkillOrgConfigApi = _chunkKA7N4YTFjs.updateSkillOrgConfigApi; exports.updateSkillUserConfigApi = _chunkKA7N4YTFjs.updateSkillUserConfigApi; exports.updateSubAgentApi = _chunkKA7N4YTFjs.updateSubAgentApi; exports.updateToolDefinitionApi = _chunkKA7N4YTFjs.updateToolDefinitionApi; exports.updateWidgetApi = _chunkKA7N4YTFjs.updateWidgetApi;
|
|
170
186
|
//# sourceMappingURL=index.js.map
|
package/dist/api/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/eloquent/eloquent/packages/@elqnt/agents/dist/api/index.js"],"names":[],"mappings":"AAAA,qFAAY;AACZ;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,uDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/eloquent/eloquent/packages/@elqnt/agents/dist/api/index.js"],"names":[],"mappings":"AAAA,qFAAY;AACZ;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,uDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,u2LAAC","file":"/home/runner/work/eloquent/eloquent/packages/@elqnt/agents/dist/api/index.js"}
|
package/dist/api/index.mjs
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
|
+
checkBackgroundAgentStatusApi,
|
|
3
4
|
completeSchedulerTaskApi,
|
|
4
5
|
connectIntegrationApi,
|
|
5
6
|
createAgentApi,
|
|
6
7
|
createAgentJobApi,
|
|
8
|
+
createBackgroundChatApi,
|
|
7
9
|
createSandboxApi,
|
|
8
10
|
createScheduleApi,
|
|
9
11
|
createSchedulerTaskApi,
|
|
@@ -22,6 +24,7 @@ import {
|
|
|
22
24
|
deleteToolDefinitionApi,
|
|
23
25
|
deleteWidgetApi,
|
|
24
26
|
disconnectIntegrationApi,
|
|
27
|
+
exportAgentApi,
|
|
25
28
|
getAgentApi,
|
|
26
29
|
getAgentByNameApi,
|
|
27
30
|
getAgentCSATAnalyticsApi,
|
|
@@ -44,6 +47,7 @@ import {
|
|
|
44
47
|
getToolDefinitionsByIdsApi,
|
|
45
48
|
getWidgetApi,
|
|
46
49
|
getWidgetByWidgetIdApi,
|
|
50
|
+
importAgentApi,
|
|
47
51
|
integrationCallbackApi,
|
|
48
52
|
listAgentJobsApi,
|
|
49
53
|
listAgentsApi,
|
|
@@ -57,6 +61,7 @@ import {
|
|
|
57
61
|
listSubAgentsApi,
|
|
58
62
|
listToolDefinitionsApi,
|
|
59
63
|
listWidgetsApi,
|
|
64
|
+
loadChatApi,
|
|
60
65
|
pauseAgentJobApi,
|
|
61
66
|
pauseScheduleApi,
|
|
62
67
|
provisionAgentsApi,
|
|
@@ -67,9 +72,12 @@ import {
|
|
|
67
72
|
runEmailTriageApi,
|
|
68
73
|
runScheduleApi,
|
|
69
74
|
searchSkillsApi,
|
|
75
|
+
sendChatMessageApi,
|
|
70
76
|
setDefaultWidgetApi,
|
|
71
77
|
snoozeSchedulerTaskApi,
|
|
72
78
|
startSchedulerTaskApi,
|
|
79
|
+
structuredOutputApi,
|
|
80
|
+
triggerBackgroundAgentApi,
|
|
73
81
|
updateAgentApi,
|
|
74
82
|
updateAgentJobApi,
|
|
75
83
|
updateIntegrationTriageApi,
|
|
@@ -82,12 +90,14 @@ import {
|
|
|
82
90
|
updateSubAgentApi,
|
|
83
91
|
updateToolDefinitionApi,
|
|
84
92
|
updateWidgetApi
|
|
85
|
-
} from "../chunk-
|
|
93
|
+
} from "../chunk-BT33DRUI.mjs";
|
|
86
94
|
export {
|
|
95
|
+
checkBackgroundAgentStatusApi,
|
|
87
96
|
completeSchedulerTaskApi,
|
|
88
97
|
connectIntegrationApi,
|
|
89
98
|
createAgentApi,
|
|
90
99
|
createAgentJobApi,
|
|
100
|
+
createBackgroundChatApi,
|
|
91
101
|
createSandboxApi,
|
|
92
102
|
createScheduleApi,
|
|
93
103
|
createSchedulerTaskApi,
|
|
@@ -106,6 +116,7 @@ export {
|
|
|
106
116
|
deleteToolDefinitionApi,
|
|
107
117
|
deleteWidgetApi,
|
|
108
118
|
disconnectIntegrationApi,
|
|
119
|
+
exportAgentApi,
|
|
109
120
|
getAgentApi,
|
|
110
121
|
getAgentByNameApi,
|
|
111
122
|
getAgentCSATAnalyticsApi,
|
|
@@ -128,6 +139,7 @@ export {
|
|
|
128
139
|
getToolDefinitionsByIdsApi,
|
|
129
140
|
getWidgetApi,
|
|
130
141
|
getWidgetByWidgetIdApi,
|
|
142
|
+
importAgentApi,
|
|
131
143
|
integrationCallbackApi,
|
|
132
144
|
listAgentJobsApi,
|
|
133
145
|
listAgentsApi,
|
|
@@ -141,6 +153,7 @@ export {
|
|
|
141
153
|
listSubAgentsApi,
|
|
142
154
|
listToolDefinitionsApi,
|
|
143
155
|
listWidgetsApi,
|
|
156
|
+
loadChatApi,
|
|
144
157
|
pauseAgentJobApi,
|
|
145
158
|
pauseScheduleApi,
|
|
146
159
|
provisionAgentsApi,
|
|
@@ -151,9 +164,12 @@ export {
|
|
|
151
164
|
runEmailTriageApi,
|
|
152
165
|
runScheduleApi,
|
|
153
166
|
searchSkillsApi,
|
|
167
|
+
sendChatMessageApi,
|
|
154
168
|
setDefaultWidgetApi,
|
|
155
169
|
snoozeSchedulerTaskApi,
|
|
156
170
|
startSchedulerTaskApi,
|
|
171
|
+
structuredOutputApi,
|
|
172
|
+
triggerBackgroundAgentApi,
|
|
157
173
|
updateAgentApi,
|
|
158
174
|
updateAgentJobApi,
|
|
159
175
|
updateIntegrationTriageApi,
|
package/dist/api/server.d.mts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ApiResponse } from '@elqnt/api-client';
|
|
2
2
|
import { ResponseMetadata } from '@elqnt/types';
|
|
3
|
-
import { Z as AgentJob, a4 as AgentJobResponse, A as Agent, ai as AgentResponse,
|
|
3
|
+
import { bc as BackgroundAgentStatusResponse, Z as AgentJob, a4 as AgentJobResponse, A as Agent, ai as AgentResponse, ds as Skill, dC as SkillResponse, dV as SubAgent, dW as SubAgentResponse, eh as ToolDefinition, ei as ToolDefinitionResponse, a$ as AgentWidget, b0 as AgentWidgetResponse, dI as SkillUserConfigResponse, c4 as GetSkillsByIDsResponse, ca as GetToolDefinitionsByIDsResponse, aa as AgentJobsListResponse, cJ as ListAgentsResponse, cL as ListAgentsSummaryResponse, dG as SkillUserConfigListResponse, dQ as SkillsListResponse, e2 as SubAgentsListResponse, eq as ToolDefinitionsListResponse, cH as ListAgentWidgetsResponse, dk as ResolveSkillConfigResponse, eG as TriggerBackgroundAgentRequest, eH as TriggerBackgroundAgentResponse } from '../agent-models-DLQlC7N6.mjs';
|
|
4
|
+
import { a as StructuredOutputRequest, b as StructuredOutputResponse } from '../structured-Bs0IjwLD.mjs';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Server-side Agents API
|
|
@@ -129,6 +130,13 @@ declare function deleteAgentJobServer(jobId: string, options: ServerApiOptions):
|
|
|
129
130
|
}>>;
|
|
130
131
|
declare function pauseAgentJobServer(jobId: string, options: ServerApiOptions): Promise<ApiResponse<AgentJobResponse>>;
|
|
131
132
|
declare function resumeAgentJobServer(jobId: string, options: ServerApiOptions): Promise<ApiResponse<AgentJobResponse>>;
|
|
133
|
+
declare function triggerBackgroundAgentServer(request: Pick<TriggerBackgroundAgentRequest, "name" | "prompt" | "agentName" | "context" | "enableSSE" | "frequency" | "cron" | "timezone" | "scope" | "description">, options: ServerApiOptions): Promise<ApiResponse<TriggerBackgroundAgentResponse>>;
|
|
134
|
+
declare function checkBackgroundAgentStatusServer(jobId: string, options: ServerApiOptions): Promise<ApiResponse<BackgroundAgentStatusResponse>>;
|
|
135
|
+
/**
|
|
136
|
+
* Server-side twin of `structuredOutputApi`. Use inside Next.js server actions
|
|
137
|
+
* or API routes. See docs/agents/structured-output.md.
|
|
138
|
+
*/
|
|
139
|
+
declare function structuredOutputServer<T = unknown>(request: StructuredOutputRequest, options: ServerApiOptions): Promise<ApiResponse<StructuredOutputResponse<T>>>;
|
|
132
140
|
declare function listWidgetsServer(agentId: string, options: ServerApiOptions): Promise<ApiResponse<ListAgentWidgetsResponse>>;
|
|
133
141
|
declare function getDefaultWidgetServer(agentId: string, options: ServerApiOptions): Promise<ApiResponse<AgentWidgetResponse>>;
|
|
134
142
|
declare function createWidgetServer(agentId: string, widget: Partial<AgentWidget>, options: ServerApiOptions): Promise<ApiResponse<AgentWidgetResponse>>;
|
|
@@ -143,4 +151,4 @@ declare function setDefaultWidgetServer(widgetId: string, agentId: string, optio
|
|
|
143
151
|
metadata: ResponseMetadata;
|
|
144
152
|
}>>;
|
|
145
153
|
|
|
146
|
-
export { Agent, AgentJob, AgentJobResponse, AgentJobsListResponse, AgentResponse, AgentWidget, AgentWidgetResponse, ListAgentWidgetsResponse, ListAgentsResponse, ListAgentsSummaryResponse, type ServerApiOptions, Skill, type SkillCategoriesResponse, SkillResponse, SkillsListResponse, SubAgent, SubAgentResponse, SubAgentsListResponse, ToolDefinition, ToolDefinitionResponse, ToolDefinitionsListResponse, createAgentJobServer, createAgentServer, createSkillServer, createSubAgentServer, createToolDefinitionServer, createWidgetServer, deleteAgentJobServer, deleteAgentServer, deleteSkillServer, deleteSkillUserConfigServer, deleteSubAgentServer, deleteToolDefinitionServer, deleteWidgetServer, getAgentJobServer, getAgentServer, getDefaultAgentServer, getDefaultWidgetServer, getSkillCategoriesServer, getSkillServer, getSkillUserConfigServer, getSkillsByIdsServer, getSubAgentServer, getToolDefinitionServer, getToolDefinitionsByIdsServer, getWidgetServer, listAgentJobsServer, listAgentsServer, listAgentsSummaryServer, listSkillUserConfigsServer, listSkillsServer, listSubAgentsServer, listToolDefinitionsServer, listWidgetsServer, pauseAgentJobServer, resolveSkillConfigServer, resumeAgentJobServer, setDefaultWidgetServer, updateAgentJobServer, updateAgentServer, updateSkillServer, updateSkillUserConfigServer, updateSubAgentServer, updateToolDefinitionServer, updateWidgetServer };
|
|
154
|
+
export { Agent, AgentJob, AgentJobResponse, AgentJobsListResponse, AgentResponse, AgentWidget, AgentWidgetResponse, ListAgentWidgetsResponse, ListAgentsResponse, ListAgentsSummaryResponse, type ServerApiOptions, Skill, type SkillCategoriesResponse, SkillResponse, SkillsListResponse, SubAgent, SubAgentResponse, SubAgentsListResponse, ToolDefinition, ToolDefinitionResponse, ToolDefinitionsListResponse, checkBackgroundAgentStatusServer, createAgentJobServer, createAgentServer, createSkillServer, createSubAgentServer, createToolDefinitionServer, createWidgetServer, deleteAgentJobServer, deleteAgentServer, deleteSkillServer, deleteSkillUserConfigServer, deleteSubAgentServer, deleteToolDefinitionServer, deleteWidgetServer, getAgentJobServer, getAgentServer, getDefaultAgentServer, getDefaultWidgetServer, getSkillCategoriesServer, getSkillServer, getSkillUserConfigServer, getSkillsByIdsServer, getSubAgentServer, getToolDefinitionServer, getToolDefinitionsByIdsServer, getWidgetServer, listAgentJobsServer, listAgentsServer, listAgentsSummaryServer, listSkillUserConfigsServer, listSkillsServer, listSubAgentsServer, listToolDefinitionsServer, listWidgetsServer, pauseAgentJobServer, resolveSkillConfigServer, resumeAgentJobServer, setDefaultWidgetServer, structuredOutputServer, triggerBackgroundAgentServer, updateAgentJobServer, updateAgentServer, updateSkillServer, updateSkillUserConfigServer, updateSubAgentServer, updateToolDefinitionServer, updateWidgetServer };
|
package/dist/api/server.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ApiResponse } from '@elqnt/api-client';
|
|
2
2
|
import { ResponseMetadata } from '@elqnt/types';
|
|
3
|
-
import { Z as AgentJob, a4 as AgentJobResponse, A as Agent, ai as AgentResponse,
|
|
3
|
+
import { bc as BackgroundAgentStatusResponse, Z as AgentJob, a4 as AgentJobResponse, A as Agent, ai as AgentResponse, ds as Skill, dC as SkillResponse, dV as SubAgent, dW as SubAgentResponse, eh as ToolDefinition, ei as ToolDefinitionResponse, a$ as AgentWidget, b0 as AgentWidgetResponse, dI as SkillUserConfigResponse, c4 as GetSkillsByIDsResponse, ca as GetToolDefinitionsByIDsResponse, aa as AgentJobsListResponse, cJ as ListAgentsResponse, cL as ListAgentsSummaryResponse, dG as SkillUserConfigListResponse, dQ as SkillsListResponse, e2 as SubAgentsListResponse, eq as ToolDefinitionsListResponse, cH as ListAgentWidgetsResponse, dk as ResolveSkillConfigResponse, eG as TriggerBackgroundAgentRequest, eH as TriggerBackgroundAgentResponse } from '../agent-models-DLQlC7N6.js';
|
|
4
|
+
import { a as StructuredOutputRequest, b as StructuredOutputResponse } from '../structured-Bs0IjwLD.js';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Server-side Agents API
|
|
@@ -129,6 +130,13 @@ declare function deleteAgentJobServer(jobId: string, options: ServerApiOptions):
|
|
|
129
130
|
}>>;
|
|
130
131
|
declare function pauseAgentJobServer(jobId: string, options: ServerApiOptions): Promise<ApiResponse<AgentJobResponse>>;
|
|
131
132
|
declare function resumeAgentJobServer(jobId: string, options: ServerApiOptions): Promise<ApiResponse<AgentJobResponse>>;
|
|
133
|
+
declare function triggerBackgroundAgentServer(request: Pick<TriggerBackgroundAgentRequest, "name" | "prompt" | "agentName" | "context" | "enableSSE" | "frequency" | "cron" | "timezone" | "scope" | "description">, options: ServerApiOptions): Promise<ApiResponse<TriggerBackgroundAgentResponse>>;
|
|
134
|
+
declare function checkBackgroundAgentStatusServer(jobId: string, options: ServerApiOptions): Promise<ApiResponse<BackgroundAgentStatusResponse>>;
|
|
135
|
+
/**
|
|
136
|
+
* Server-side twin of `structuredOutputApi`. Use inside Next.js server actions
|
|
137
|
+
* or API routes. See docs/agents/structured-output.md.
|
|
138
|
+
*/
|
|
139
|
+
declare function structuredOutputServer<T = unknown>(request: StructuredOutputRequest, options: ServerApiOptions): Promise<ApiResponse<StructuredOutputResponse<T>>>;
|
|
132
140
|
declare function listWidgetsServer(agentId: string, options: ServerApiOptions): Promise<ApiResponse<ListAgentWidgetsResponse>>;
|
|
133
141
|
declare function getDefaultWidgetServer(agentId: string, options: ServerApiOptions): Promise<ApiResponse<AgentWidgetResponse>>;
|
|
134
142
|
declare function createWidgetServer(agentId: string, widget: Partial<AgentWidget>, options: ServerApiOptions): Promise<ApiResponse<AgentWidgetResponse>>;
|
|
@@ -143,4 +151,4 @@ declare function setDefaultWidgetServer(widgetId: string, agentId: string, optio
|
|
|
143
151
|
metadata: ResponseMetadata;
|
|
144
152
|
}>>;
|
|
145
153
|
|
|
146
|
-
export { Agent, AgentJob, AgentJobResponse, AgentJobsListResponse, AgentResponse, AgentWidget, AgentWidgetResponse, ListAgentWidgetsResponse, ListAgentsResponse, ListAgentsSummaryResponse, type ServerApiOptions, Skill, type SkillCategoriesResponse, SkillResponse, SkillsListResponse, SubAgent, SubAgentResponse, SubAgentsListResponse, ToolDefinition, ToolDefinitionResponse, ToolDefinitionsListResponse, createAgentJobServer, createAgentServer, createSkillServer, createSubAgentServer, createToolDefinitionServer, createWidgetServer, deleteAgentJobServer, deleteAgentServer, deleteSkillServer, deleteSkillUserConfigServer, deleteSubAgentServer, deleteToolDefinitionServer, deleteWidgetServer, getAgentJobServer, getAgentServer, getDefaultAgentServer, getDefaultWidgetServer, getSkillCategoriesServer, getSkillServer, getSkillUserConfigServer, getSkillsByIdsServer, getSubAgentServer, getToolDefinitionServer, getToolDefinitionsByIdsServer, getWidgetServer, listAgentJobsServer, listAgentsServer, listAgentsSummaryServer, listSkillUserConfigsServer, listSkillsServer, listSubAgentsServer, listToolDefinitionsServer, listWidgetsServer, pauseAgentJobServer, resolveSkillConfigServer, resumeAgentJobServer, setDefaultWidgetServer, updateAgentJobServer, updateAgentServer, updateSkillServer, updateSkillUserConfigServer, updateSubAgentServer, updateToolDefinitionServer, updateWidgetServer };
|
|
154
|
+
export { Agent, AgentJob, AgentJobResponse, AgentJobsListResponse, AgentResponse, AgentWidget, AgentWidgetResponse, ListAgentWidgetsResponse, ListAgentsResponse, ListAgentsSummaryResponse, type ServerApiOptions, Skill, type SkillCategoriesResponse, SkillResponse, SkillsListResponse, SubAgent, SubAgentResponse, SubAgentsListResponse, ToolDefinition, ToolDefinitionResponse, ToolDefinitionsListResponse, checkBackgroundAgentStatusServer, createAgentJobServer, createAgentServer, createSkillServer, createSubAgentServer, createToolDefinitionServer, createWidgetServer, deleteAgentJobServer, deleteAgentServer, deleteSkillServer, deleteSkillUserConfigServer, deleteSubAgentServer, deleteToolDefinitionServer, deleteWidgetServer, getAgentJobServer, getAgentServer, getDefaultAgentServer, getDefaultWidgetServer, getSkillCategoriesServer, getSkillServer, getSkillUserConfigServer, getSkillsByIdsServer, getSubAgentServer, getToolDefinitionServer, getToolDefinitionsByIdsServer, getWidgetServer, listAgentJobsServer, listAgentsServer, listAgentsSummaryServer, listSkillUserConfigsServer, listSkillsServer, listSubAgentsServer, listToolDefinitionsServer, listWidgetsServer, pauseAgentJobServer, resolveSkillConfigServer, resumeAgentJobServer, setDefaultWidgetServer, structuredOutputServer, triggerBackgroundAgentServer, updateAgentJobServer, updateAgentServer, updateSkillServer, updateSkillUserConfigServer, updateSubAgentServer, updateToolDefinitionServer, updateWidgetServer };
|
package/dist/api/server.js
CHANGED
|
@@ -156,6 +156,18 @@ async function pauseAgentJobServer(jobId, options) {
|
|
|
156
156
|
async function resumeAgentJobServer(jobId, options) {
|
|
157
157
|
return _server.serverApiRequest.call(void 0, `/api/v1/agent-jobs/${jobId}/resume`, buildRequestOptions(options, "POST"));
|
|
158
158
|
}
|
|
159
|
+
async function triggerBackgroundAgentServer(request, options) {
|
|
160
|
+
return _server.serverApiRequest.call(void 0, "/api/v1/agent-jobs/trigger", buildRequestOptions(options, "POST", request));
|
|
161
|
+
}
|
|
162
|
+
async function checkBackgroundAgentStatusServer(jobId, options) {
|
|
163
|
+
return _server.serverApiRequest.call(void 0, `/api/v1/agent-jobs/${jobId}/status`, buildRequestOptions(options, "GET"));
|
|
164
|
+
}
|
|
165
|
+
async function structuredOutputServer(request, options) {
|
|
166
|
+
return _server.serverApiRequest.call(void 0,
|
|
167
|
+
"/api/v1/agents/structured",
|
|
168
|
+
buildRequestOptions(options, "POST", request)
|
|
169
|
+
);
|
|
170
|
+
}
|
|
159
171
|
async function listWidgetsServer(agentId, options) {
|
|
160
172
|
return _server.serverApiRequest.call(void 0, `/api/v1/agents/${agentId}/widgets`, buildRequestOptions(options, "GET"));
|
|
161
173
|
}
|
|
@@ -222,5 +234,8 @@ async function setDefaultWidgetServer(widgetId, agentId, options) {
|
|
|
222
234
|
|
|
223
235
|
|
|
224
236
|
|
|
225
|
-
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
exports.checkBackgroundAgentStatusServer = checkBackgroundAgentStatusServer; exports.createAgentJobServer = createAgentJobServer; exports.createAgentServer = createAgentServer; exports.createSkillServer = createSkillServer; exports.createSubAgentServer = createSubAgentServer; exports.createToolDefinitionServer = createToolDefinitionServer; exports.createWidgetServer = createWidgetServer; exports.deleteAgentJobServer = deleteAgentJobServer; exports.deleteAgentServer = deleteAgentServer; exports.deleteSkillServer = deleteSkillServer; exports.deleteSkillUserConfigServer = deleteSkillUserConfigServer; exports.deleteSubAgentServer = deleteSubAgentServer; exports.deleteToolDefinitionServer = deleteToolDefinitionServer; exports.deleteWidgetServer = deleteWidgetServer; exports.getAgentJobServer = getAgentJobServer; exports.getAgentServer = getAgentServer; exports.getDefaultAgentServer = getDefaultAgentServer; exports.getDefaultWidgetServer = getDefaultWidgetServer; exports.getSkillCategoriesServer = getSkillCategoriesServer; exports.getSkillServer = getSkillServer; exports.getSkillUserConfigServer = getSkillUserConfigServer; exports.getSkillsByIdsServer = getSkillsByIdsServer; exports.getSubAgentServer = getSubAgentServer; exports.getToolDefinitionServer = getToolDefinitionServer; exports.getToolDefinitionsByIdsServer = getToolDefinitionsByIdsServer; exports.getWidgetServer = getWidgetServer; exports.listAgentJobsServer = listAgentJobsServer; exports.listAgentsServer = listAgentsServer; exports.listAgentsSummaryServer = listAgentsSummaryServer; exports.listSkillUserConfigsServer = listSkillUserConfigsServer; exports.listSkillsServer = listSkillsServer; exports.listSubAgentsServer = listSubAgentsServer; exports.listToolDefinitionsServer = listToolDefinitionsServer; exports.listWidgetsServer = listWidgetsServer; exports.pauseAgentJobServer = pauseAgentJobServer; exports.resolveSkillConfigServer = resolveSkillConfigServer; exports.resumeAgentJobServer = resumeAgentJobServer; exports.setDefaultWidgetServer = setDefaultWidgetServer; exports.structuredOutputServer = structuredOutputServer; exports.triggerBackgroundAgentServer = triggerBackgroundAgentServer; exports.updateAgentJobServer = updateAgentJobServer; exports.updateAgentServer = updateAgentServer; exports.updateSkillServer = updateSkillServer; exports.updateSkillUserConfigServer = updateSkillUserConfigServer; exports.updateSubAgentServer = updateSubAgentServer; exports.updateToolDefinitionServer = updateToolDefinitionServer; exports.updateWidgetServer = updateWidgetServer;
|
|
226
241
|
//# sourceMappingURL=server.js.map
|
package/dist/api/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/eloquent/eloquent/packages/@elqnt/agents/dist/api/server.js","../../api/server.ts"],"names":[],"mappings":"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","file":"/home/runner/work/eloquent/eloquent/packages/@elqnt/agents/dist/api/server.js","sourcesContent":[null,"/**\n * Server-side Agents API\n *\n * API functions for server-side usage (Server Actions, API routes, SSR).\n * Uses serverApiRequest which generates JWT tokens internally.\n *\n * @example\n * ```ts\n * // In a Next.js Server Action\n * \"use server\";\n * import { listAgentsServer, getAgentServer } from \"@elqnt/agents/api/server\";\n *\n * export async function getAgentsList(orgId: string) {\n * const response = await listAgentsServer({\n * gatewayUrl: process.env.API_GATEWAY_URL!,\n * jwtSecret: process.env.JWT_SECRET!,\n * orgId,\n * });\n * return response.data?.agents || [];\n * }\n * ```\n */\n\nimport { serverApiRequest, type ServerRequestOptions } from \"@elqnt/api-client/server\";\nimport type { ApiResponse } from \"@elqnt/api-client\";\nimport type { ResponseMetadata } from \"@elqnt/types\";\nimport type {\n Agent,\n AgentResponse,\n ListAgentsResponse,\n ListAgentsSummaryResponse,\n Skill,\n SkillResponse,\n SkillsListResponse,\n GetSkillsByIDsResponse,\n SubAgent,\n SubAgentResponse,\n SubAgentsListResponse,\n AgentWidget,\n AgentWidgetResponse,\n ListAgentWidgetsResponse,\n SkillUserConfigResponse,\n SkillUserConfigListResponse,\n ResolveSkillConfigResponse,\n ToolDefinition,\n ToolDefinitionResponse,\n ToolDefinitionsListResponse,\n GetToolDefinitionsByIDsResponse,\n AgentJob,\n AgentJobResponse,\n AgentJobsListResponse,\n} from \"../models\";\n\n// =============================================================================\n// TYPES\n// =============================================================================\n\nexport interface ServerApiOptions {\n /** API Gateway URL */\n gatewayUrl: string;\n /** JWT secret for token generation */\n jwtSecret: string;\n /** Organization ID */\n orgId: string;\n /** User ID (defaults to \"system\") */\n userId?: string;\n /** User email */\n userEmail?: string;\n /** Request timeout in ms */\n timeout?: number;\n /** Cache strategy */\n cache?: RequestCache;\n}\n\ntype RequestOpts = ServerRequestOptions & { gatewayUrl: string; jwtSecret: string };\n\nfunction buildRequestOptions(options: ServerApiOptions, method: ServerRequestOptions[\"method\"] = \"GET\", body?: unknown): RequestOpts {\n return {\n gatewayUrl: options.gatewayUrl,\n jwtSecret: options.jwtSecret,\n orgId: options.orgId,\n userId: options.userId,\n userEmail: options.userEmail,\n timeout: options.timeout,\n cache: options.cache,\n method,\n body,\n };\n}\n\n// =============================================================================\n// AGENTS\n// =============================================================================\n\nexport async function listAgentsServer(options: ServerApiOptions): Promise<ApiResponse<ListAgentsResponse>> {\n return serverApiRequest(\"/api/v1/agents\", buildRequestOptions(options, \"GET\"));\n}\n\nexport async function listAgentsSummaryServer(options: ServerApiOptions): Promise<ApiResponse<ListAgentsSummaryResponse>> {\n return serverApiRequest(\"/api/v1/agents/summary\", buildRequestOptions(options, \"GET\"));\n}\n\nexport async function getAgentServer(agentId: string, options: ServerApiOptions): Promise<ApiResponse<AgentResponse>> {\n return serverApiRequest(`/api/v1/agents/${agentId}`, buildRequestOptions(options, \"GET\"));\n}\n\nexport async function createAgentServer(agent: Partial<Agent>, options: ServerApiOptions): Promise<ApiResponse<AgentResponse>> {\n return serverApiRequest(\"/api/v1/agents\", buildRequestOptions(options, \"POST\", { agent }));\n}\n\nexport async function updateAgentServer(agentId: string, agent: Partial<Agent>, options: ServerApiOptions): Promise<ApiResponse<AgentResponse>> {\n return serverApiRequest(`/api/v1/agents/${agentId}`, buildRequestOptions(options, \"PUT\", { agent }));\n}\n\nexport async function deleteAgentServer(agentId: string, options: ServerApiOptions): Promise<ApiResponse<{ success: boolean; metadata: ResponseMetadata }>> {\n return serverApiRequest(`/api/v1/agents/${agentId}`, buildRequestOptions(options, \"DELETE\"));\n}\n\nexport async function getDefaultAgentServer(options: ServerApiOptions): Promise<ApiResponse<AgentResponse>> {\n return serverApiRequest(\"/api/v1/agents/default\", buildRequestOptions(options, \"GET\"));\n}\n\n// =============================================================================\n// SKILLS\n// =============================================================================\n\nexport async function listSkillsServer(options: ServerApiOptions): Promise<ApiResponse<SkillsListResponse>> {\n return serverApiRequest(\"/api/v1/skills\", buildRequestOptions(options, \"GET\"));\n}\n\nexport async function getSkillServer(skillId: string, options: ServerApiOptions): Promise<ApiResponse<SkillResponse>> {\n return serverApiRequest(`/api/v1/skills/${skillId}`, buildRequestOptions(options, \"GET\"));\n}\n\nexport async function getSkillsByIdsServer(ids: string[], options: ServerApiOptions): Promise<ApiResponse<GetSkillsByIDsResponse>> {\n return serverApiRequest(\"/api/v1/skills/by-ids\", buildRequestOptions(options, \"POST\", { ids }));\n}\n\nexport async function createSkillServer(skill: Partial<Skill>, options: ServerApiOptions): Promise<ApiResponse<SkillResponse>> {\n return serverApiRequest(\"/api/v1/skills\", buildRequestOptions(options, \"POST\", { skill }));\n}\n\nexport async function updateSkillServer(skillId: string, skill: Partial<Skill>, options: ServerApiOptions): Promise<ApiResponse<SkillResponse>> {\n return serverApiRequest(`/api/v1/skills/${skillId}`, buildRequestOptions(options, \"PUT\", { skill }));\n}\n\nexport async function deleteSkillServer(skillId: string, options: ServerApiOptions): Promise<ApiResponse<{ success: boolean; metadata: ResponseMetadata }>> {\n return serverApiRequest(`/api/v1/skills/${skillId}`, buildRequestOptions(options, \"DELETE\"));\n}\n\nexport interface SkillCategoriesResponse {\n categories: string[];\n metadata: ResponseMetadata;\n}\n\nexport async function getSkillCategoriesServer(options: ServerApiOptions): Promise<ApiResponse<SkillCategoriesResponse>> {\n return serverApiRequest(\"/api/v1/skills/categories\", buildRequestOptions(options, \"GET\"));\n}\n\n// =============================================================================\n// SKILL USER CONFIG\n// =============================================================================\n\nexport async function getSkillUserConfigServer(\n skillId: string,\n options: ServerApiOptions & { agentId?: string }\n): Promise<ApiResponse<SkillUserConfigResponse>> {\n const params = new URLSearchParams();\n if (options.agentId) params.set(\"agentId\", options.agentId);\n const query = params.toString();\n return serverApiRequest(`/api/v1/skills/${skillId}/user-config${query ? `?${query}` : \"\"}`, buildRequestOptions(options, \"GET\"));\n}\n\nexport async function updateSkillUserConfigServer(\n skillId: string,\n data: {\n enabled?: boolean;\n displayOrder?: number;\n config?: Record<string, unknown>;\n agentId?: string;\n },\n options: ServerApiOptions\n): Promise<ApiResponse<SkillUserConfigResponse>> {\n return serverApiRequest(`/api/v1/skills/${skillId}/user-config`, buildRequestOptions(options, \"PUT\", data));\n}\n\nexport async function deleteSkillUserConfigServer(\n skillId: string,\n options: ServerApiOptions & { agentId?: string }\n): Promise<ApiResponse<{ success: boolean; metadata: ResponseMetadata }>> {\n const params = new URLSearchParams();\n if (options.agentId) params.set(\"agentId\", options.agentId);\n const query = params.toString();\n return serverApiRequest(`/api/v1/skills/${skillId}/user-config${query ? `?${query}` : \"\"}`, buildRequestOptions(options, \"DELETE\"));\n}\n\nexport async function listSkillUserConfigsServer(\n options: ServerApiOptions & { agentId?: string; limit?: number; offset?: number }\n): Promise<ApiResponse<SkillUserConfigListResponse>> {\n const params = new URLSearchParams();\n if (options.agentId) params.set(\"agentId\", options.agentId);\n if (options.limit) params.set(\"limit\", String(options.limit));\n if (options.offset) params.set(\"offset\", String(options.offset));\n const query = params.toString();\n return serverApiRequest(`/api/v1/skills/user-configs${query ? `?${query}` : \"\"}`, buildRequestOptions(options, \"GET\"));\n}\n\nexport async function resolveSkillConfigServer(\n skillId: string,\n agentId: string,\n options: ServerApiOptions\n): Promise<ApiResponse<ResolveSkillConfigResponse>> {\n return serverApiRequest(`/api/v1/skills/${skillId}/resolve-config?agentId=${agentId}`, buildRequestOptions(options, \"GET\"));\n}\n\n// =============================================================================\n// SUB-AGENTS\n// =============================================================================\n\nexport async function listSubAgentsServer(\n options: ServerApiOptions & { onlySystem?: boolean; enabled?: boolean }\n): Promise<ApiResponse<SubAgentsListResponse>> {\n const params = new URLSearchParams();\n if (options.onlySystem !== undefined) params.set(\"onlySystem\", String(options.onlySystem));\n if (options.enabled !== undefined) params.set(\"enabled\", String(options.enabled));\n const queryString = params.toString();\n return serverApiRequest(`/api/v1/subagents${queryString ? `?${queryString}` : \"\"}`, buildRequestOptions(options, \"GET\"));\n}\n\nexport async function getSubAgentServer(subAgentId: string, options: ServerApiOptions): Promise<ApiResponse<SubAgentResponse>> {\n return serverApiRequest(`/api/v1/subagents/${subAgentId}`, buildRequestOptions(options, \"GET\"));\n}\n\nexport async function createSubAgentServer(subAgent: Partial<SubAgent>, options: ServerApiOptions): Promise<ApiResponse<SubAgentResponse>> {\n return serverApiRequest(\"/api/v1/subagents\", buildRequestOptions(options, \"POST\", { subAgent }));\n}\n\nexport async function updateSubAgentServer(subAgentId: string, subAgent: Partial<SubAgent>, options: ServerApiOptions): Promise<ApiResponse<SubAgentResponse>> {\n return serverApiRequest(`/api/v1/subagents/${subAgentId}`, buildRequestOptions(options, \"PUT\", { subAgent }));\n}\n\nexport async function deleteSubAgentServer(subAgentId: string, options: ServerApiOptions): Promise<ApiResponse<{ success: boolean; metadata: ResponseMetadata }>> {\n return serverApiRequest(`/api/v1/subagents/${subAgentId}`, buildRequestOptions(options, \"DELETE\"));\n}\n\n// =============================================================================\n// TOOL DEFINITIONS\n// =============================================================================\n\nexport async function listToolDefinitionsServer(\n options: ServerApiOptions & { onlySystem?: boolean; enabled?: boolean; limit?: number; offset?: number }\n): Promise<ApiResponse<ToolDefinitionsListResponse>> {\n const params = new URLSearchParams();\n if (options.onlySystem !== undefined) params.set(\"onlySystem\", String(options.onlySystem));\n if (options.enabled !== undefined) params.set(\"enabled\", String(options.enabled));\n if (options.limit !== undefined) params.set(\"limit\", String(options.limit));\n if (options.offset !== undefined) params.set(\"offset\", String(options.offset));\n const queryString = params.toString();\n return serverApiRequest(`/api/v1/tool-definitions${queryString ? `?${queryString}` : \"\"}`, buildRequestOptions(options, \"GET\"));\n}\n\nexport async function getToolDefinitionServer(toolDefId: string, options: ServerApiOptions): Promise<ApiResponse<ToolDefinitionResponse>> {\n return serverApiRequest(`/api/v1/tool-definitions/${toolDefId}`, buildRequestOptions(options, \"GET\"));\n}\n\nexport async function getToolDefinitionsByIdsServer(ids: string[], options: ServerApiOptions): Promise<ApiResponse<GetToolDefinitionsByIDsResponse>> {\n return serverApiRequest(\"/api/v1/tool-definitions/by-ids\", buildRequestOptions(options, \"POST\", { ids }));\n}\n\nexport async function createToolDefinitionServer(toolDefinition: Partial<ToolDefinition>, options: ServerApiOptions): Promise<ApiResponse<ToolDefinitionResponse>> {\n return serverApiRequest(\"/api/v1/tool-definitions\", buildRequestOptions(options, \"POST\", { toolDefinition }));\n}\n\nexport async function updateToolDefinitionServer(toolDefId: string, toolDefinition: Partial<ToolDefinition>, options: ServerApiOptions): Promise<ApiResponse<ToolDefinitionResponse>> {\n return serverApiRequest(`/api/v1/tool-definitions/${toolDefId}`, buildRequestOptions(options, \"PUT\", { toolDefinition }));\n}\n\nexport async function deleteToolDefinitionServer(toolDefId: string, options: ServerApiOptions): Promise<ApiResponse<{ success: boolean; metadata: ResponseMetadata }>> {\n return serverApiRequest(`/api/v1/tool-definitions/${toolDefId}`, buildRequestOptions(options, \"DELETE\"));\n}\n\n// =============================================================================\n// AGENT JOBS\n// =============================================================================\n\nexport async function listAgentJobsServer(\n options: ServerApiOptions & {\n agentId?: string;\n ownerId?: string;\n scope?: string;\n status?: string;\n frequency?: string;\n limit?: number;\n offset?: number;\n }\n): Promise<ApiResponse<AgentJobsListResponse>> {\n const params = new URLSearchParams();\n if (options.agentId) params.set(\"agentId\", options.agentId);\n if (options.ownerId) params.set(\"ownerId\", options.ownerId);\n if (options.scope) params.set(\"scope\", options.scope);\n if (options.status) params.set(\"status\", options.status);\n if (options.frequency) params.set(\"frequency\", options.frequency);\n if (options.limit !== undefined) params.set(\"limit\", String(options.limit));\n if (options.offset !== undefined) params.set(\"offset\", String(options.offset));\n const queryString = params.toString();\n return serverApiRequest(`/api/v1/agent-jobs${queryString ? `?${queryString}` : \"\"}`, buildRequestOptions(options, \"GET\"));\n}\n\nexport async function getAgentJobServer(jobId: string, options: ServerApiOptions): Promise<ApiResponse<AgentJobResponse>> {\n return serverApiRequest(`/api/v1/agent-jobs/${jobId}`, buildRequestOptions(options, \"GET\"));\n}\n\nexport async function createAgentJobServer(job: Partial<AgentJob>, options: ServerApiOptions): Promise<ApiResponse<AgentJobResponse>> {\n return serverApiRequest(\"/api/v1/agent-jobs\", buildRequestOptions(options, \"POST\", { job }));\n}\n\nexport async function updateAgentJobServer(jobId: string, job: Partial<AgentJob>, options: ServerApiOptions): Promise<ApiResponse<AgentJobResponse>> {\n return serverApiRequest(`/api/v1/agent-jobs/${jobId}`, buildRequestOptions(options, \"PUT\", { job }));\n}\n\nexport async function deleteAgentJobServer(jobId: string, options: ServerApiOptions): Promise<ApiResponse<{ success: boolean; metadata: ResponseMetadata }>> {\n return serverApiRequest(`/api/v1/agent-jobs/${jobId}`, buildRequestOptions(options, \"DELETE\"));\n}\n\nexport async function pauseAgentJobServer(jobId: string, options: ServerApiOptions): Promise<ApiResponse<AgentJobResponse>> {\n return serverApiRequest(`/api/v1/agent-jobs/${jobId}/pause`, buildRequestOptions(options, \"POST\"));\n}\n\nexport async function resumeAgentJobServer(jobId: string, options: ServerApiOptions): Promise<ApiResponse<AgentJobResponse>> {\n return serverApiRequest(`/api/v1/agent-jobs/${jobId}/resume`, buildRequestOptions(options, \"POST\"));\n}\n\n// =============================================================================\n// WIDGETS\n// =============================================================================\n\nexport async function listWidgetsServer(agentId: string, options: ServerApiOptions): Promise<ApiResponse<ListAgentWidgetsResponse>> {\n return serverApiRequest(`/api/v1/agents/${agentId}/widgets`, buildRequestOptions(options, \"GET\"));\n}\n\nexport async function getDefaultWidgetServer(agentId: string, options: ServerApiOptions): Promise<ApiResponse<AgentWidgetResponse>> {\n return serverApiRequest(`/api/v1/agents/${agentId}/widgets/default`, buildRequestOptions(options, \"GET\"));\n}\n\nexport async function createWidgetServer(agentId: string, widget: Partial<AgentWidget>, options: ServerApiOptions): Promise<ApiResponse<AgentWidgetResponse>> {\n return serverApiRequest(`/api/v1/agents/${agentId}/widgets`, buildRequestOptions(options, \"POST\", { widget }));\n}\n\nexport async function getWidgetServer(widgetId: string, options: ServerApiOptions): Promise<ApiResponse<AgentWidgetResponse>> {\n return serverApiRequest(`/api/v1/widgets/${widgetId}`, buildRequestOptions(options, \"GET\"));\n}\n\nexport async function updateWidgetServer(widgetId: string, widget: Partial<AgentWidget>, options: ServerApiOptions): Promise<ApiResponse<AgentWidgetResponse>> {\n return serverApiRequest(`/api/v1/widgets/${widgetId}`, buildRequestOptions(options, \"PUT\", { widget }));\n}\n\nexport async function deleteWidgetServer(widgetId: string, options: ServerApiOptions): Promise<ApiResponse<{ success: boolean; metadata: ResponseMetadata }>> {\n return serverApiRequest(`/api/v1/widgets/${widgetId}`, buildRequestOptions(options, \"DELETE\"));\n}\n\nexport async function setDefaultWidgetServer(widgetId: string, agentId: string, options: ServerApiOptions): Promise<ApiResponse<{ success: boolean; metadata: ResponseMetadata }>> {\n return serverApiRequest(`/api/v1/widgets/${widgetId}/default`, buildRequestOptions(options, \"POST\", { agentId }));\n}\n\n// Re-export types\nexport type {\n Agent,\n AgentResponse,\n ListAgentsResponse,\n ListAgentsSummaryResponse,\n Skill,\n SkillResponse,\n SkillsListResponse,\n SubAgent,\n SubAgentResponse,\n SubAgentsListResponse,\n AgentWidget,\n AgentWidgetResponse,\n ListAgentWidgetsResponse,\n ToolDefinition,\n ToolDefinitionResponse,\n ToolDefinitionsListResponse,\n AgentJob,\n AgentJobResponse,\n AgentJobsListResponse,\n} from \"../models\";\n"]}
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/eloquent/eloquent/packages/@elqnt/agents/dist/api/server.js","../../api/server.ts"],"names":[],"mappings":"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","file":"/home/runner/work/eloquent/eloquent/packages/@elqnt/agents/dist/api/server.js","sourcesContent":[null,"/**\n * Server-side Agents API\n *\n * API functions for server-side usage (Server Actions, API routes, SSR).\n * Uses serverApiRequest which generates JWT tokens internally.\n *\n * @example\n * ```ts\n * // In a Next.js Server Action\n * \"use server\";\n * import { listAgentsServer, getAgentServer } from \"@elqnt/agents/api/server\";\n *\n * export async function getAgentsList(orgId: string) {\n * const response = await listAgentsServer({\n * gatewayUrl: process.env.API_GATEWAY_URL!,\n * jwtSecret: process.env.JWT_SECRET!,\n * orgId,\n * });\n * return response.data?.agents || [];\n * }\n * ```\n */\n\nimport { serverApiRequest, type ServerRequestOptions } from \"@elqnt/api-client/server\";\nimport type { ApiResponse } from \"@elqnt/api-client\";\nimport type { ResponseMetadata } from \"@elqnt/types\";\nimport type {\n Agent,\n AgentResponse,\n ListAgentsResponse,\n ListAgentsSummaryResponse,\n Skill,\n SkillResponse,\n SkillsListResponse,\n GetSkillsByIDsResponse,\n SubAgent,\n SubAgentResponse,\n SubAgentsListResponse,\n AgentWidget,\n AgentWidgetResponse,\n ListAgentWidgetsResponse,\n SkillUserConfigResponse,\n SkillUserConfigListResponse,\n ResolveSkillConfigResponse,\n ToolDefinition,\n ToolDefinitionResponse,\n ToolDefinitionsListResponse,\n GetToolDefinitionsByIDsResponse,\n AgentJob,\n AgentJobResponse,\n AgentJobsListResponse,\n TriggerBackgroundAgentRequest,\n TriggerBackgroundAgentResponse,\n BackgroundAgentStatusResponse,\n StructuredOutputRequest,\n StructuredOutputResponse,\n} from \"../models\";\n\n// =============================================================================\n// TYPES\n// =============================================================================\n\nexport interface ServerApiOptions {\n /** API Gateway URL */\n gatewayUrl: string;\n /** JWT secret for token generation */\n jwtSecret: string;\n /** Organization ID */\n orgId: string;\n /** User ID (defaults to \"system\") */\n userId?: string;\n /** User email */\n userEmail?: string;\n /** Request timeout in ms */\n timeout?: number;\n /** Cache strategy */\n cache?: RequestCache;\n}\n\ntype RequestOpts = ServerRequestOptions & { gatewayUrl: string; jwtSecret: string };\n\nfunction buildRequestOptions(options: ServerApiOptions, method: ServerRequestOptions[\"method\"] = \"GET\", body?: unknown): RequestOpts {\n return {\n gatewayUrl: options.gatewayUrl,\n jwtSecret: options.jwtSecret,\n orgId: options.orgId,\n userId: options.userId,\n userEmail: options.userEmail,\n timeout: options.timeout,\n cache: options.cache,\n method,\n body,\n };\n}\n\n// =============================================================================\n// AGENTS\n// =============================================================================\n\nexport async function listAgentsServer(options: ServerApiOptions): Promise<ApiResponse<ListAgentsResponse>> {\n return serverApiRequest(\"/api/v1/agents\", buildRequestOptions(options, \"GET\"));\n}\n\nexport async function listAgentsSummaryServer(options: ServerApiOptions): Promise<ApiResponse<ListAgentsSummaryResponse>> {\n return serverApiRequest(\"/api/v1/agents/summary\", buildRequestOptions(options, \"GET\"));\n}\n\nexport async function getAgentServer(agentId: string, options: ServerApiOptions): Promise<ApiResponse<AgentResponse>> {\n return serverApiRequest(`/api/v1/agents/${agentId}`, buildRequestOptions(options, \"GET\"));\n}\n\nexport async function createAgentServer(agent: Partial<Agent>, options: ServerApiOptions): Promise<ApiResponse<AgentResponse>> {\n return serverApiRequest(\"/api/v1/agents\", buildRequestOptions(options, \"POST\", { agent }));\n}\n\nexport async function updateAgentServer(agentId: string, agent: Partial<Agent>, options: ServerApiOptions): Promise<ApiResponse<AgentResponse>> {\n return serverApiRequest(`/api/v1/agents/${agentId}`, buildRequestOptions(options, \"PUT\", { agent }));\n}\n\nexport async function deleteAgentServer(agentId: string, options: ServerApiOptions): Promise<ApiResponse<{ success: boolean; metadata: ResponseMetadata }>> {\n return serverApiRequest(`/api/v1/agents/${agentId}`, buildRequestOptions(options, \"DELETE\"));\n}\n\nexport async function getDefaultAgentServer(options: ServerApiOptions): Promise<ApiResponse<AgentResponse>> {\n return serverApiRequest(\"/api/v1/agents/default\", buildRequestOptions(options, \"GET\"));\n}\n\n// =============================================================================\n// SKILLS\n// =============================================================================\n\nexport async function listSkillsServer(options: ServerApiOptions): Promise<ApiResponse<SkillsListResponse>> {\n return serverApiRequest(\"/api/v1/skills\", buildRequestOptions(options, \"GET\"));\n}\n\nexport async function getSkillServer(skillId: string, options: ServerApiOptions): Promise<ApiResponse<SkillResponse>> {\n return serverApiRequest(`/api/v1/skills/${skillId}`, buildRequestOptions(options, \"GET\"));\n}\n\nexport async function getSkillsByIdsServer(ids: string[], options: ServerApiOptions): Promise<ApiResponse<GetSkillsByIDsResponse>> {\n return serverApiRequest(\"/api/v1/skills/by-ids\", buildRequestOptions(options, \"POST\", { ids }));\n}\n\nexport async function createSkillServer(skill: Partial<Skill>, options: ServerApiOptions): Promise<ApiResponse<SkillResponse>> {\n return serverApiRequest(\"/api/v1/skills\", buildRequestOptions(options, \"POST\", { skill }));\n}\n\nexport async function updateSkillServer(skillId: string, skill: Partial<Skill>, options: ServerApiOptions): Promise<ApiResponse<SkillResponse>> {\n return serverApiRequest(`/api/v1/skills/${skillId}`, buildRequestOptions(options, \"PUT\", { skill }));\n}\n\nexport async function deleteSkillServer(skillId: string, options: ServerApiOptions): Promise<ApiResponse<{ success: boolean; metadata: ResponseMetadata }>> {\n return serverApiRequest(`/api/v1/skills/${skillId}`, buildRequestOptions(options, \"DELETE\"));\n}\n\nexport interface SkillCategoriesResponse {\n categories: string[];\n metadata: ResponseMetadata;\n}\n\nexport async function getSkillCategoriesServer(options: ServerApiOptions): Promise<ApiResponse<SkillCategoriesResponse>> {\n return serverApiRequest(\"/api/v1/skills/categories\", buildRequestOptions(options, \"GET\"));\n}\n\n// =============================================================================\n// SKILL USER CONFIG\n// =============================================================================\n\nexport async function getSkillUserConfigServer(\n skillId: string,\n options: ServerApiOptions & { agentId?: string }\n): Promise<ApiResponse<SkillUserConfigResponse>> {\n const params = new URLSearchParams();\n if (options.agentId) params.set(\"agentId\", options.agentId);\n const query = params.toString();\n return serverApiRequest(`/api/v1/skills/${skillId}/user-config${query ? `?${query}` : \"\"}`, buildRequestOptions(options, \"GET\"));\n}\n\nexport async function updateSkillUserConfigServer(\n skillId: string,\n data: {\n enabled?: boolean;\n displayOrder?: number;\n config?: Record<string, unknown>;\n agentId?: string;\n },\n options: ServerApiOptions\n): Promise<ApiResponse<SkillUserConfigResponse>> {\n return serverApiRequest(`/api/v1/skills/${skillId}/user-config`, buildRequestOptions(options, \"PUT\", data));\n}\n\nexport async function deleteSkillUserConfigServer(\n skillId: string,\n options: ServerApiOptions & { agentId?: string }\n): Promise<ApiResponse<{ success: boolean; metadata: ResponseMetadata }>> {\n const params = new URLSearchParams();\n if (options.agentId) params.set(\"agentId\", options.agentId);\n const query = params.toString();\n return serverApiRequest(`/api/v1/skills/${skillId}/user-config${query ? `?${query}` : \"\"}`, buildRequestOptions(options, \"DELETE\"));\n}\n\nexport async function listSkillUserConfigsServer(\n options: ServerApiOptions & { agentId?: string; limit?: number; offset?: number }\n): Promise<ApiResponse<SkillUserConfigListResponse>> {\n const params = new URLSearchParams();\n if (options.agentId) params.set(\"agentId\", options.agentId);\n if (options.limit) params.set(\"limit\", String(options.limit));\n if (options.offset) params.set(\"offset\", String(options.offset));\n const query = params.toString();\n return serverApiRequest(`/api/v1/skills/user-configs${query ? `?${query}` : \"\"}`, buildRequestOptions(options, \"GET\"));\n}\n\nexport async function resolveSkillConfigServer(\n skillId: string,\n agentId: string,\n options: ServerApiOptions\n): Promise<ApiResponse<ResolveSkillConfigResponse>> {\n return serverApiRequest(`/api/v1/skills/${skillId}/resolve-config?agentId=${agentId}`, buildRequestOptions(options, \"GET\"));\n}\n\n// =============================================================================\n// SUB-AGENTS\n// =============================================================================\n\nexport async function listSubAgentsServer(\n options: ServerApiOptions & { onlySystem?: boolean; enabled?: boolean }\n): Promise<ApiResponse<SubAgentsListResponse>> {\n const params = new URLSearchParams();\n if (options.onlySystem !== undefined) params.set(\"onlySystem\", String(options.onlySystem));\n if (options.enabled !== undefined) params.set(\"enabled\", String(options.enabled));\n const queryString = params.toString();\n return serverApiRequest(`/api/v1/subagents${queryString ? `?${queryString}` : \"\"}`, buildRequestOptions(options, \"GET\"));\n}\n\nexport async function getSubAgentServer(subAgentId: string, options: ServerApiOptions): Promise<ApiResponse<SubAgentResponse>> {\n return serverApiRequest(`/api/v1/subagents/${subAgentId}`, buildRequestOptions(options, \"GET\"));\n}\n\nexport async function createSubAgentServer(subAgent: Partial<SubAgent>, options: ServerApiOptions): Promise<ApiResponse<SubAgentResponse>> {\n return serverApiRequest(\"/api/v1/subagents\", buildRequestOptions(options, \"POST\", { subAgent }));\n}\n\nexport async function updateSubAgentServer(subAgentId: string, subAgent: Partial<SubAgent>, options: ServerApiOptions): Promise<ApiResponse<SubAgentResponse>> {\n return serverApiRequest(`/api/v1/subagents/${subAgentId}`, buildRequestOptions(options, \"PUT\", { subAgent }));\n}\n\nexport async function deleteSubAgentServer(subAgentId: string, options: ServerApiOptions): Promise<ApiResponse<{ success: boolean; metadata: ResponseMetadata }>> {\n return serverApiRequest(`/api/v1/subagents/${subAgentId}`, buildRequestOptions(options, \"DELETE\"));\n}\n\n// =============================================================================\n// TOOL DEFINITIONS\n// =============================================================================\n\nexport async function listToolDefinitionsServer(\n options: ServerApiOptions & { onlySystem?: boolean; enabled?: boolean; limit?: number; offset?: number }\n): Promise<ApiResponse<ToolDefinitionsListResponse>> {\n const params = new URLSearchParams();\n if (options.onlySystem !== undefined) params.set(\"onlySystem\", String(options.onlySystem));\n if (options.enabled !== undefined) params.set(\"enabled\", String(options.enabled));\n if (options.limit !== undefined) params.set(\"limit\", String(options.limit));\n if (options.offset !== undefined) params.set(\"offset\", String(options.offset));\n const queryString = params.toString();\n return serverApiRequest(`/api/v1/tool-definitions${queryString ? `?${queryString}` : \"\"}`, buildRequestOptions(options, \"GET\"));\n}\n\nexport async function getToolDefinitionServer(toolDefId: string, options: ServerApiOptions): Promise<ApiResponse<ToolDefinitionResponse>> {\n return serverApiRequest(`/api/v1/tool-definitions/${toolDefId}`, buildRequestOptions(options, \"GET\"));\n}\n\nexport async function getToolDefinitionsByIdsServer(ids: string[], options: ServerApiOptions): Promise<ApiResponse<GetToolDefinitionsByIDsResponse>> {\n return serverApiRequest(\"/api/v1/tool-definitions/by-ids\", buildRequestOptions(options, \"POST\", { ids }));\n}\n\nexport async function createToolDefinitionServer(toolDefinition: Partial<ToolDefinition>, options: ServerApiOptions): Promise<ApiResponse<ToolDefinitionResponse>> {\n return serverApiRequest(\"/api/v1/tool-definitions\", buildRequestOptions(options, \"POST\", { toolDefinition }));\n}\n\nexport async function updateToolDefinitionServer(toolDefId: string, toolDefinition: Partial<ToolDefinition>, options: ServerApiOptions): Promise<ApiResponse<ToolDefinitionResponse>> {\n return serverApiRequest(`/api/v1/tool-definitions/${toolDefId}`, buildRequestOptions(options, \"PUT\", { toolDefinition }));\n}\n\nexport async function deleteToolDefinitionServer(toolDefId: string, options: ServerApiOptions): Promise<ApiResponse<{ success: boolean; metadata: ResponseMetadata }>> {\n return serverApiRequest(`/api/v1/tool-definitions/${toolDefId}`, buildRequestOptions(options, \"DELETE\"));\n}\n\n// =============================================================================\n// AGENT JOBS\n// =============================================================================\n\nexport async function listAgentJobsServer(\n options: ServerApiOptions & {\n agentId?: string;\n ownerId?: string;\n scope?: string;\n status?: string;\n frequency?: string;\n limit?: number;\n offset?: number;\n }\n): Promise<ApiResponse<AgentJobsListResponse>> {\n const params = new URLSearchParams();\n if (options.agentId) params.set(\"agentId\", options.agentId);\n if (options.ownerId) params.set(\"ownerId\", options.ownerId);\n if (options.scope) params.set(\"scope\", options.scope);\n if (options.status) params.set(\"status\", options.status);\n if (options.frequency) params.set(\"frequency\", options.frequency);\n if (options.limit !== undefined) params.set(\"limit\", String(options.limit));\n if (options.offset !== undefined) params.set(\"offset\", String(options.offset));\n const queryString = params.toString();\n return serverApiRequest(`/api/v1/agent-jobs${queryString ? `?${queryString}` : \"\"}`, buildRequestOptions(options, \"GET\"));\n}\n\nexport async function getAgentJobServer(jobId: string, options: ServerApiOptions): Promise<ApiResponse<AgentJobResponse>> {\n return serverApiRequest(`/api/v1/agent-jobs/${jobId}`, buildRequestOptions(options, \"GET\"));\n}\n\nexport async function createAgentJobServer(job: Partial<AgentJob>, options: ServerApiOptions): Promise<ApiResponse<AgentJobResponse>> {\n return serverApiRequest(\"/api/v1/agent-jobs\", buildRequestOptions(options, \"POST\", { job }));\n}\n\nexport async function updateAgentJobServer(jobId: string, job: Partial<AgentJob>, options: ServerApiOptions): Promise<ApiResponse<AgentJobResponse>> {\n return serverApiRequest(`/api/v1/agent-jobs/${jobId}`, buildRequestOptions(options, \"PUT\", { job }));\n}\n\nexport async function deleteAgentJobServer(jobId: string, options: ServerApiOptions): Promise<ApiResponse<{ success: boolean; metadata: ResponseMetadata }>> {\n return serverApiRequest(`/api/v1/agent-jobs/${jobId}`, buildRequestOptions(options, \"DELETE\"));\n}\n\nexport async function pauseAgentJobServer(jobId: string, options: ServerApiOptions): Promise<ApiResponse<AgentJobResponse>> {\n return serverApiRequest(`/api/v1/agent-jobs/${jobId}/pause`, buildRequestOptions(options, \"POST\"));\n}\n\nexport async function resumeAgentJobServer(jobId: string, options: ServerApiOptions): Promise<ApiResponse<AgentJobResponse>> {\n return serverApiRequest(`/api/v1/agent-jobs/${jobId}/resume`, buildRequestOptions(options, \"POST\"));\n}\n\n// =============================================================================\n// BACKGROUND AGENT TRIGGER\n// =============================================================================\n\nexport async function triggerBackgroundAgentServer(\n request: Pick<TriggerBackgroundAgentRequest, \"name\" | \"prompt\" | \"agentName\" | \"context\" | \"enableSSE\" | \"frequency\" | \"cron\" | \"timezone\" | \"scope\" | \"description\">,\n options: ServerApiOptions\n): Promise<ApiResponse<TriggerBackgroundAgentResponse>> {\n return serverApiRequest(\"/api/v1/agent-jobs/trigger\", buildRequestOptions(options, \"POST\", request));\n}\n\nexport async function checkBackgroundAgentStatusServer(\n jobId: string,\n options: ServerApiOptions\n): Promise<ApiResponse<BackgroundAgentStatusResponse>> {\n return serverApiRequest(`/api/v1/agent-jobs/${jobId}/status`, buildRequestOptions(options, \"GET\"));\n}\n\n// =============================================================================\n// STRUCTURED OUTPUT\n// =============================================================================\n\n/**\n * Server-side twin of `structuredOutputApi`. Use inside Next.js server actions\n * or API routes. See docs/agents/structured-output.md.\n */\nexport async function structuredOutputServer<T = unknown>(\n request: StructuredOutputRequest,\n options: ServerApiOptions\n): Promise<ApiResponse<StructuredOutputResponse<T>>> {\n return serverApiRequest<StructuredOutputResponse<T>>(\n \"/api/v1/agents/structured\",\n buildRequestOptions(options, \"POST\", request)\n );\n}\n\n// =============================================================================\n// WIDGETS\n// =============================================================================\n\nexport async function listWidgetsServer(agentId: string, options: ServerApiOptions): Promise<ApiResponse<ListAgentWidgetsResponse>> {\n return serverApiRequest(`/api/v1/agents/${agentId}/widgets`, buildRequestOptions(options, \"GET\"));\n}\n\nexport async function getDefaultWidgetServer(agentId: string, options: ServerApiOptions): Promise<ApiResponse<AgentWidgetResponse>> {\n return serverApiRequest(`/api/v1/agents/${agentId}/widgets/default`, buildRequestOptions(options, \"GET\"));\n}\n\nexport async function createWidgetServer(agentId: string, widget: Partial<AgentWidget>, options: ServerApiOptions): Promise<ApiResponse<AgentWidgetResponse>> {\n return serverApiRequest(`/api/v1/agents/${agentId}/widgets`, buildRequestOptions(options, \"POST\", { widget }));\n}\n\nexport async function getWidgetServer(widgetId: string, options: ServerApiOptions): Promise<ApiResponse<AgentWidgetResponse>> {\n return serverApiRequest(`/api/v1/widgets/${widgetId}`, buildRequestOptions(options, \"GET\"));\n}\n\nexport async function updateWidgetServer(widgetId: string, widget: Partial<AgentWidget>, options: ServerApiOptions): Promise<ApiResponse<AgentWidgetResponse>> {\n return serverApiRequest(`/api/v1/widgets/${widgetId}`, buildRequestOptions(options, \"PUT\", { widget }));\n}\n\nexport async function deleteWidgetServer(widgetId: string, options: ServerApiOptions): Promise<ApiResponse<{ success: boolean; metadata: ResponseMetadata }>> {\n return serverApiRequest(`/api/v1/widgets/${widgetId}`, buildRequestOptions(options, \"DELETE\"));\n}\n\nexport async function setDefaultWidgetServer(widgetId: string, agentId: string, options: ServerApiOptions): Promise<ApiResponse<{ success: boolean; metadata: ResponseMetadata }>> {\n return serverApiRequest(`/api/v1/widgets/${widgetId}/default`, buildRequestOptions(options, \"POST\", { agentId }));\n}\n\n// Re-export types\nexport type {\n Agent,\n AgentResponse,\n ListAgentsResponse,\n ListAgentsSummaryResponse,\n Skill,\n SkillResponse,\n SkillsListResponse,\n SubAgent,\n SubAgentResponse,\n SubAgentsListResponse,\n AgentWidget,\n AgentWidgetResponse,\n ListAgentWidgetsResponse,\n ToolDefinition,\n ToolDefinitionResponse,\n ToolDefinitionsListResponse,\n AgentJob,\n AgentJobResponse,\n AgentJobsListResponse,\n} from \"../models\";\n"]}
|
package/dist/api/server.mjs
CHANGED
|
@@ -156,6 +156,18 @@ async function pauseAgentJobServer(jobId, options) {
|
|
|
156
156
|
async function resumeAgentJobServer(jobId, options) {
|
|
157
157
|
return serverApiRequest(`/api/v1/agent-jobs/${jobId}/resume`, buildRequestOptions(options, "POST"));
|
|
158
158
|
}
|
|
159
|
+
async function triggerBackgroundAgentServer(request, options) {
|
|
160
|
+
return serverApiRequest("/api/v1/agent-jobs/trigger", buildRequestOptions(options, "POST", request));
|
|
161
|
+
}
|
|
162
|
+
async function checkBackgroundAgentStatusServer(jobId, options) {
|
|
163
|
+
return serverApiRequest(`/api/v1/agent-jobs/${jobId}/status`, buildRequestOptions(options, "GET"));
|
|
164
|
+
}
|
|
165
|
+
async function structuredOutputServer(request, options) {
|
|
166
|
+
return serverApiRequest(
|
|
167
|
+
"/api/v1/agents/structured",
|
|
168
|
+
buildRequestOptions(options, "POST", request)
|
|
169
|
+
);
|
|
170
|
+
}
|
|
159
171
|
async function listWidgetsServer(agentId, options) {
|
|
160
172
|
return serverApiRequest(`/api/v1/agents/${agentId}/widgets`, buildRequestOptions(options, "GET"));
|
|
161
173
|
}
|
|
@@ -178,6 +190,7 @@ async function setDefaultWidgetServer(widgetId, agentId, options) {
|
|
|
178
190
|
return serverApiRequest(`/api/v1/widgets/${widgetId}/default`, buildRequestOptions(options, "POST", { agentId }));
|
|
179
191
|
}
|
|
180
192
|
export {
|
|
193
|
+
checkBackgroundAgentStatusServer,
|
|
181
194
|
createAgentJobServer,
|
|
182
195
|
createAgentServer,
|
|
183
196
|
createSkillServer,
|
|
@@ -215,6 +228,8 @@ export {
|
|
|
215
228
|
resolveSkillConfigServer,
|
|
216
229
|
resumeAgentJobServer,
|
|
217
230
|
setDefaultWidgetServer,
|
|
231
|
+
structuredOutputServer,
|
|
232
|
+
triggerBackgroundAgentServer,
|
|
218
233
|
updateAgentJobServer,
|
|
219
234
|
updateAgentServer,
|
|
220
235
|
updateSkillServer,
|