@elqnt/agents 3.2.1 → 3.4.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-DLQlC7N6.d.mts → agent-models-D6WgsFMZ.d.mts} +14 -0
- package/dist/{agent-models-DLQlC7N6.d.ts → agent-models-D6WgsFMZ.d.ts} +14 -0
- package/dist/api/index.d.mts +19 -4
- package/dist/api/index.d.ts +19 -4
- package/dist/api/index.js +8 -2
- package/dist/api/index.js.map +1 -1
- package/dist/api/index.mjs +7 -1
- package/dist/api/server.d.mts +8 -2
- package/dist/api/server.d.ts +8 -2
- package/dist/api/server.js +8 -1
- package/dist/api/server.js.map +1 -1
- package/dist/api/server.mjs +7 -0
- package/dist/api/server.mjs.map +1 -1
- package/dist/{chunk-BH2FIDFK.js → chunk-3PFZRJ4A.js} +22 -3
- package/dist/chunk-3PFZRJ4A.js.map +1 -0
- package/dist/{chunk-2QL3LLC3.mjs → chunk-43FTKGM6.mjs} +72 -33
- package/dist/chunk-43FTKGM6.mjs.map +1 -0
- package/dist/{chunk-GOHHT3ET.mjs → chunk-L5FLJB3H.mjs} +20 -1
- package/dist/chunk-L5FLJB3H.mjs.map +1 -0
- package/dist/{chunk-AF4QJD73.js → chunk-RG42SHBX.js} +124 -85
- package/dist/chunk-RG42SHBX.js.map +1 -0
- package/dist/{chunk-ZK27UGO6.mjs → chunk-TY57JG3P.mjs} +1 -1
- package/dist/chunk-TY57JG3P.mjs.map +1 -0
- package/dist/{chunk-3VM5TCJR.js → chunk-XQ7LOAN3.js} +1 -1
- package/dist/chunk-XQ7LOAN3.js.map +1 -0
- package/dist/hooks/index.d.mts +35 -4
- package/dist/hooks/index.d.ts +35 -4
- package/dist/hooks/index.js +5 -3
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +4 -2
- package/dist/index.d.mts +5 -4
- package/dist/index.d.ts +5 -4
- package/dist/index.js +12 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -3
- package/dist/models/index.d.mts +2 -1
- package/dist/models/index.d.ts +2 -1
- package/dist/models/index.js +2 -2
- package/dist/models/index.mjs +1 -1
- package/dist/structured-Bs0IjwLD.d.mts +35 -0
- package/dist/structured-Bs0IjwLD.d.ts +35 -0
- package/dist/transport/index.d.mts +3 -3
- package/dist/transport/index.d.ts +3 -3
- package/dist/{types-k9PszCzt.d.ts → types-BBPz_6kK.d.ts} +1 -1
- package/dist/{types-C2qd5f-E.d.mts → types-BtfxlyHk.d.mts} +1 -1
- package/dist/utils/index.d.mts +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/package.json +4 -4
- package/dist/chunk-2QL3LLC3.mjs.map +0 -1
- package/dist/chunk-3VM5TCJR.js.map +0 -1
- package/dist/chunk-AF4QJD73.js.map +0 -1
- package/dist/chunk-BH2FIDFK.js.map +0 -1
- package/dist/chunk-GOHHT3ET.mjs.map +0 -1
- package/dist/chunk-ZK27UGO6.mjs.map +0 -1
|
@@ -745,6 +745,20 @@ interface TriggerBackgroundAgentRequest {
|
|
|
745
745
|
scope?: JobScope;
|
|
746
746
|
description?: string;
|
|
747
747
|
enableSSE?: boolean;
|
|
748
|
+
/**
|
|
749
|
+
* v2: when set, the run is anchored to a Done task. The agents service
|
|
750
|
+
* auto-attaches the done_tasks skill so the agent can call
|
|
751
|
+
* post_task_update / set_task_output / request_task_help even if its
|
|
752
|
+
* declared SkillNames doesn't include done_tasks.
|
|
753
|
+
*/
|
|
754
|
+
taskId?: string;
|
|
755
|
+
/**
|
|
756
|
+
* v2: when set, the run uses this library for knowledge_search by default.
|
|
757
|
+
* Sourced from the parent task's project.libraryId at dispatch time.
|
|
758
|
+
* The runtime injects this into knowledge_search tool calls; the agent
|
|
759
|
+
* does NOT need to pass library_id explicitly.
|
|
760
|
+
*/
|
|
761
|
+
libraryId?: string;
|
|
748
762
|
}
|
|
749
763
|
/**
|
|
750
764
|
* TriggerBackgroundAgentResponse is returned by the trigger_background_agent tool.
|
|
@@ -745,6 +745,20 @@ interface TriggerBackgroundAgentRequest {
|
|
|
745
745
|
scope?: JobScope;
|
|
746
746
|
description?: string;
|
|
747
747
|
enableSSE?: boolean;
|
|
748
|
+
/**
|
|
749
|
+
* v2: when set, the run is anchored to a Done task. The agents service
|
|
750
|
+
* auto-attaches the done_tasks skill so the agent can call
|
|
751
|
+
* post_task_update / set_task_output / request_task_help even if its
|
|
752
|
+
* declared SkillNames doesn't include done_tasks.
|
|
753
|
+
*/
|
|
754
|
+
taskId?: string;
|
|
755
|
+
/**
|
|
756
|
+
* v2: when set, the run uses this library for knowledge_search by default.
|
|
757
|
+
* Sourced from the parent task's project.libraryId at dispatch time.
|
|
758
|
+
* The runtime injects this into knowledge_search tool calls; the agent
|
|
759
|
+
* does NOT need to pass library_id explicitly.
|
|
760
|
+
*/
|
|
761
|
+
libraryId?: string;
|
|
748
762
|
}
|
|
749
763
|
/**
|
|
750
764
|
* TriggerBackgroundAgentResponse is returned by the trigger_background_agent tool.
|
package/dist/api/index.d.mts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { ApiClientOptions, ApiResponse } from '@elqnt/api-client';
|
|
2
2
|
import { ResponseMetadata } from '@elqnt/types';
|
|
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-
|
|
4
|
-
export { aI as AgentSummary, dD as SkillUserConfig } from '../agent-models-
|
|
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-D6WgsFMZ.mjs';
|
|
4
|
+
export { aI as AgentSummary, dD as SkillUserConfig } from '../agent-models-D6WgsFMZ.mjs';
|
|
5
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.mjs';
|
|
6
6
|
export { aW as Sandbox, ba as UserIntegration } from '../sandbox-DOxoM2Ge.mjs';
|
|
7
|
+
import { a as StructuredOutputRequest, b as StructuredOutputResponse } from '../structured-Bs0IjwLD.mjs';
|
|
8
|
+
export { S as StructuredOutputProvider, c as StructuredOutputUsage } from '../structured-Bs0IjwLD.mjs';
|
|
7
9
|
import { ChatMessage } from '@elqnt/chat/models';
|
|
8
10
|
export { Attachment, ChatMessage } from '@elqnt/chat/models';
|
|
9
11
|
|
|
@@ -25,6 +27,8 @@ declare function deleteAgentApi(agentId: string, options: ApiClientOptions): Pro
|
|
|
25
27
|
}>>;
|
|
26
28
|
declare function getDefaultAgentApi(options: ApiClientOptions): Promise<ApiResponse<AgentResponse>>;
|
|
27
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>>;
|
|
28
32
|
declare function listSkillsApi(options: ApiClientOptions): Promise<ApiResponse<SkillsListResponse>>;
|
|
29
33
|
declare function getSkillApi(skillId: string, options: ApiClientOptions): Promise<ApiResponse<SkillResponse>>;
|
|
30
34
|
declare function getSkillsByIdsApi(ids: string[], options: ApiClientOptions): Promise<ApiResponse<GetSkillsByIDsResponse>>;
|
|
@@ -89,6 +93,17 @@ declare function setDefaultWidgetApi(widgetId: string, agentId: string, options:
|
|
|
89
93
|
success: boolean;
|
|
90
94
|
metadata: ResponseMetadata;
|
|
91
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>>>;
|
|
92
107
|
interface DateFilter {
|
|
93
108
|
from?: string;
|
|
94
109
|
to?: string;
|
|
@@ -141,7 +156,7 @@ declare function deleteAgentJobApi(jobId: string, options: ApiClientOptions): Pr
|
|
|
141
156
|
}>>;
|
|
142
157
|
declare function pauseAgentJobApi(jobId: string, options: ApiClientOptions): Promise<ApiResponse<AgentJobResponse>>;
|
|
143
158
|
declare function resumeAgentJobApi(jobId: string, options: ApiClientOptions): Promise<ApiResponse<AgentJobResponse>>;
|
|
144
|
-
declare function triggerBackgroundAgentApi(request: Pick<TriggerBackgroundAgentRequest, "name" | "prompt" | "agentName" | "context" | "enableSSE" | "frequency" | "cron" | "timezone" | "scope" | "description">, options: ApiClientOptions): Promise<ApiResponse<TriggerBackgroundAgentResponse>>;
|
|
159
|
+
declare function triggerBackgroundAgentApi(request: Pick<TriggerBackgroundAgentRequest, "name" | "prompt" | "agentName" | "context" | "enableSSE" | "frequency" | "cron" | "timezone" | "scope" | "description" | "taskId" | "libraryId">, options: ApiClientOptions): Promise<ApiResponse<TriggerBackgroundAgentResponse>>;
|
|
145
160
|
declare function checkBackgroundAgentStatusApi(jobId: string, options: ApiClientOptions): Promise<ApiResponse<BackgroundAgentStatusResponse>>;
|
|
146
161
|
interface CreateBackgroundChatRequest {
|
|
147
162
|
agentName: string;
|
|
@@ -411,4 +426,4 @@ declare function resumeScheduleApi(scheduleId: string, options: ApiClientOptions
|
|
|
411
426
|
*/
|
|
412
427
|
declare function runScheduleApi(scheduleId: string, options: ApiClientOptions): Promise<ApiResponse<SchedulerScheduleResponse>>;
|
|
413
428
|
|
|
414
|
-
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, 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, 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, loadChatApi, pauseAgentJobApi, pauseScheduleApi, provisionAgentsApi, refreshIntegrationApi, resolveSkillConfigApi, resumeAgentJobApi, resumeScheduleApi, runEmailTriageApi, runScheduleApi, searchSkillsApi, sendChatMessageApi, setDefaultWidgetApi, snoozeSchedulerTaskApi, startSchedulerTaskApi, triggerBackgroundAgentApi, 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.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { ApiClientOptions, ApiResponse } from '@elqnt/api-client';
|
|
2
2
|
import { ResponseMetadata } from '@elqnt/types';
|
|
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-
|
|
4
|
-
export { aI as AgentSummary, dD as SkillUserConfig } from '../agent-models-
|
|
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-D6WgsFMZ.js';
|
|
4
|
+
export { aI as AgentSummary, dD as SkillUserConfig } from '../agent-models-D6WgsFMZ.js';
|
|
5
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
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';
|
|
7
9
|
import { ChatMessage } from '@elqnt/chat/models';
|
|
8
10
|
export { Attachment, ChatMessage } from '@elqnt/chat/models';
|
|
9
11
|
|
|
@@ -25,6 +27,8 @@ declare function deleteAgentApi(agentId: string, options: ApiClientOptions): Pro
|
|
|
25
27
|
}>>;
|
|
26
28
|
declare function getDefaultAgentApi(options: ApiClientOptions): Promise<ApiResponse<AgentResponse>>;
|
|
27
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>>;
|
|
28
32
|
declare function listSkillsApi(options: ApiClientOptions): Promise<ApiResponse<SkillsListResponse>>;
|
|
29
33
|
declare function getSkillApi(skillId: string, options: ApiClientOptions): Promise<ApiResponse<SkillResponse>>;
|
|
30
34
|
declare function getSkillsByIdsApi(ids: string[], options: ApiClientOptions): Promise<ApiResponse<GetSkillsByIDsResponse>>;
|
|
@@ -89,6 +93,17 @@ declare function setDefaultWidgetApi(widgetId: string, agentId: string, options:
|
|
|
89
93
|
success: boolean;
|
|
90
94
|
metadata: ResponseMetadata;
|
|
91
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>>>;
|
|
92
107
|
interface DateFilter {
|
|
93
108
|
from?: string;
|
|
94
109
|
to?: string;
|
|
@@ -141,7 +156,7 @@ declare function deleteAgentJobApi(jobId: string, options: ApiClientOptions): Pr
|
|
|
141
156
|
}>>;
|
|
142
157
|
declare function pauseAgentJobApi(jobId: string, options: ApiClientOptions): Promise<ApiResponse<AgentJobResponse>>;
|
|
143
158
|
declare function resumeAgentJobApi(jobId: string, options: ApiClientOptions): Promise<ApiResponse<AgentJobResponse>>;
|
|
144
|
-
declare function triggerBackgroundAgentApi(request: Pick<TriggerBackgroundAgentRequest, "name" | "prompt" | "agentName" | "context" | "enableSSE" | "frequency" | "cron" | "timezone" | "scope" | "description">, options: ApiClientOptions): Promise<ApiResponse<TriggerBackgroundAgentResponse>>;
|
|
159
|
+
declare function triggerBackgroundAgentApi(request: Pick<TriggerBackgroundAgentRequest, "name" | "prompt" | "agentName" | "context" | "enableSSE" | "frequency" | "cron" | "timezone" | "scope" | "description" | "taskId" | "libraryId">, options: ApiClientOptions): Promise<ApiResponse<TriggerBackgroundAgentResponse>>;
|
|
145
160
|
declare function checkBackgroundAgentStatusApi(jobId: string, options: ApiClientOptions): Promise<ApiResponse<BackgroundAgentStatusResponse>>;
|
|
146
161
|
interface CreateBackgroundChatRequest {
|
|
147
162
|
agentName: string;
|
|
@@ -411,4 +426,4 @@ declare function resumeScheduleApi(scheduleId: string, options: ApiClientOptions
|
|
|
411
426
|
*/
|
|
412
427
|
declare function runScheduleApi(scheduleId: string, options: ApiClientOptions): Promise<ApiResponse<SchedulerScheduleResponse>>;
|
|
413
428
|
|
|
414
|
-
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, 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, 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, loadChatApi, pauseAgentJobApi, pauseScheduleApi, provisionAgentsApi, refreshIntegrationApi, resolveSkillConfigApi, resumeAgentJobApi, resumeScheduleApi, runEmailTriageApi, runScheduleApi, searchSkillsApi, sendChatMessageApi, setDefaultWidgetApi, snoozeSchedulerTaskApi, startSchedulerTaskApi, triggerBackgroundAgentApi, 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
|
@@ -87,10 +87,10 @@
|
|
|
87
87
|
|
|
88
88
|
|
|
89
89
|
|
|
90
|
-
var _chunkBH2FIDFKjs = require('../chunk-BH2FIDFK.js');
|
|
91
90
|
|
|
92
91
|
|
|
93
92
|
|
|
93
|
+
var _chunk3PFZRJ4Ajs = require('../chunk-3PFZRJ4A.js');
|
|
94
94
|
|
|
95
95
|
|
|
96
96
|
|
|
@@ -176,5 +176,11 @@ var _chunkBH2FIDFKjs = require('../chunk-BH2FIDFK.js');
|
|
|
176
176
|
|
|
177
177
|
|
|
178
178
|
|
|
179
|
-
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
exports.checkBackgroundAgentStatusApi = _chunk3PFZRJ4Ajs.checkBackgroundAgentStatusApi; exports.completeSchedulerTaskApi = _chunk3PFZRJ4Ajs.completeSchedulerTaskApi; exports.connectIntegrationApi = _chunk3PFZRJ4Ajs.connectIntegrationApi; exports.createAgentApi = _chunk3PFZRJ4Ajs.createAgentApi; exports.createAgentJobApi = _chunk3PFZRJ4Ajs.createAgentJobApi; exports.createBackgroundChatApi = _chunk3PFZRJ4Ajs.createBackgroundChatApi; exports.createSandboxApi = _chunk3PFZRJ4Ajs.createSandboxApi; exports.createScheduleApi = _chunk3PFZRJ4Ajs.createScheduleApi; exports.createSchedulerTaskApi = _chunk3PFZRJ4Ajs.createSchedulerTaskApi; exports.createSkillApi = _chunk3PFZRJ4Ajs.createSkillApi; exports.createSubAgentApi = _chunk3PFZRJ4Ajs.createSubAgentApi; exports.createToolDefinitionApi = _chunk3PFZRJ4Ajs.createToolDefinitionApi; exports.createWidgetApi = _chunk3PFZRJ4Ajs.createWidgetApi; exports.deleteAgentApi = _chunk3PFZRJ4Ajs.deleteAgentApi; exports.deleteAgentJobApi = _chunk3PFZRJ4Ajs.deleteAgentJobApi; exports.deleteSandboxApi = _chunk3PFZRJ4Ajs.deleteSandboxApi; exports.deleteScheduleApi = _chunk3PFZRJ4Ajs.deleteScheduleApi; exports.deleteSchedulerTaskApi = _chunk3PFZRJ4Ajs.deleteSchedulerTaskApi; exports.deleteSkillApi = _chunk3PFZRJ4Ajs.deleteSkillApi; exports.deleteSkillUserConfigApi = _chunk3PFZRJ4Ajs.deleteSkillUserConfigApi; exports.deleteSubAgentApi = _chunk3PFZRJ4Ajs.deleteSubAgentApi; exports.deleteToolDefinitionApi = _chunk3PFZRJ4Ajs.deleteToolDefinitionApi; exports.deleteWidgetApi = _chunk3PFZRJ4Ajs.deleteWidgetApi; exports.disconnectIntegrationApi = _chunk3PFZRJ4Ajs.disconnectIntegrationApi; exports.exportAgentApi = _chunk3PFZRJ4Ajs.exportAgentApi; exports.getAgentApi = _chunk3PFZRJ4Ajs.getAgentApi; exports.getAgentByNameApi = _chunk3PFZRJ4Ajs.getAgentByNameApi; exports.getAgentCSATAnalyticsApi = _chunk3PFZRJ4Ajs.getAgentCSATAnalyticsApi; exports.getAgentChatsAnalyticsApi = _chunk3PFZRJ4Ajs.getAgentChatsAnalyticsApi; exports.getAgentJobApi = _chunk3PFZRJ4Ajs.getAgentJobApi; exports.getAgentListAnalyticsApi = _chunk3PFZRJ4Ajs.getAgentListAnalyticsApi; exports.getDefaultAgentApi = _chunk3PFZRJ4Ajs.getDefaultAgentApi; exports.getDefaultWidgetApi = _chunk3PFZRJ4Ajs.getDefaultWidgetApi; exports.getIntegrationApi = _chunk3PFZRJ4Ajs.getIntegrationApi; exports.getSandboxApi = _chunk3PFZRJ4Ajs.getSandboxApi; exports.getScheduleApi = _chunk3PFZRJ4Ajs.getScheduleApi; exports.getSchedulerTaskApi = _chunk3PFZRJ4Ajs.getSchedulerTaskApi; exports.getSkillApi = _chunk3PFZRJ4Ajs.getSkillApi; exports.getSkillCategoriesApi = _chunk3PFZRJ4Ajs.getSkillCategoriesApi; exports.getSkillUserConfigApi = _chunk3PFZRJ4Ajs.getSkillUserConfigApi; exports.getSkillsByIdsApi = _chunk3PFZRJ4Ajs.getSkillsByIdsApi; exports.getSubAgentApi = _chunk3PFZRJ4Ajs.getSubAgentApi; exports.getTaskOutcomesApi = _chunk3PFZRJ4Ajs.getTaskOutcomesApi; exports.getToolDefinitionApi = _chunk3PFZRJ4Ajs.getToolDefinitionApi; exports.getToolDefinitionsByIdsApi = _chunk3PFZRJ4Ajs.getToolDefinitionsByIdsApi; exports.getWidgetApi = _chunk3PFZRJ4Ajs.getWidgetApi; exports.getWidgetByWidgetIdApi = _chunk3PFZRJ4Ajs.getWidgetByWidgetIdApi; exports.importAgentApi = _chunk3PFZRJ4Ajs.importAgentApi; exports.integrationCallbackApi = _chunk3PFZRJ4Ajs.integrationCallbackApi; exports.listAgentJobsApi = _chunk3PFZRJ4Ajs.listAgentJobsApi; exports.listAgentsApi = _chunk3PFZRJ4Ajs.listAgentsApi; exports.listAgentsSummaryApi = _chunk3PFZRJ4Ajs.listAgentsSummaryApi; exports.listIntegrationsApi = _chunk3PFZRJ4Ajs.listIntegrationsApi; exports.listSandboxesApi = _chunk3PFZRJ4Ajs.listSandboxesApi; exports.listSchedulerTasksApi = _chunk3PFZRJ4Ajs.listSchedulerTasksApi; exports.listSchedulesApi = _chunk3PFZRJ4Ajs.listSchedulesApi; exports.listSkillUserConfigsApi = _chunk3PFZRJ4Ajs.listSkillUserConfigsApi; exports.listSkillsApi = _chunk3PFZRJ4Ajs.listSkillsApi; exports.listSubAgentsApi = _chunk3PFZRJ4Ajs.listSubAgentsApi; exports.listToolDefinitionsApi = _chunk3PFZRJ4Ajs.listToolDefinitionsApi; exports.listWidgetsApi = _chunk3PFZRJ4Ajs.listWidgetsApi; exports.loadChatApi = _chunk3PFZRJ4Ajs.loadChatApi; exports.pauseAgentJobApi = _chunk3PFZRJ4Ajs.pauseAgentJobApi; exports.pauseScheduleApi = _chunk3PFZRJ4Ajs.pauseScheduleApi; exports.provisionAgentsApi = _chunk3PFZRJ4Ajs.provisionAgentsApi; exports.refreshIntegrationApi = _chunk3PFZRJ4Ajs.refreshIntegrationApi; exports.resolveSkillConfigApi = _chunk3PFZRJ4Ajs.resolveSkillConfigApi; exports.resumeAgentJobApi = _chunk3PFZRJ4Ajs.resumeAgentJobApi; exports.resumeScheduleApi = _chunk3PFZRJ4Ajs.resumeScheduleApi; exports.runEmailTriageApi = _chunk3PFZRJ4Ajs.runEmailTriageApi; exports.runScheduleApi = _chunk3PFZRJ4Ajs.runScheduleApi; exports.searchSkillsApi = _chunk3PFZRJ4Ajs.searchSkillsApi; exports.sendChatMessageApi = _chunk3PFZRJ4Ajs.sendChatMessageApi; exports.setDefaultWidgetApi = _chunk3PFZRJ4Ajs.setDefaultWidgetApi; exports.snoozeSchedulerTaskApi = _chunk3PFZRJ4Ajs.snoozeSchedulerTaskApi; exports.startSchedulerTaskApi = _chunk3PFZRJ4Ajs.startSchedulerTaskApi; exports.structuredOutputApi = _chunk3PFZRJ4Ajs.structuredOutputApi; exports.triggerBackgroundAgentApi = _chunk3PFZRJ4Ajs.triggerBackgroundAgentApi; exports.updateAgentApi = _chunk3PFZRJ4Ajs.updateAgentApi; exports.updateAgentJobApi = _chunk3PFZRJ4Ajs.updateAgentJobApi; exports.updateIntegrationTriageApi = _chunk3PFZRJ4Ajs.updateIntegrationTriageApi; exports.updateSandboxApi = _chunk3PFZRJ4Ajs.updateSandboxApi; exports.updateScheduleApi = _chunk3PFZRJ4Ajs.updateScheduleApi; exports.updateSchedulerTaskApi = _chunk3PFZRJ4Ajs.updateSchedulerTaskApi; exports.updateSkillApi = _chunk3PFZRJ4Ajs.updateSkillApi; exports.updateSkillOrgConfigApi = _chunk3PFZRJ4Ajs.updateSkillOrgConfigApi; exports.updateSkillUserConfigApi = _chunk3PFZRJ4Ajs.updateSkillUserConfigApi; exports.updateSubAgentApi = _chunk3PFZRJ4Ajs.updateSubAgentApi; exports.updateToolDefinitionApi = _chunk3PFZRJ4Ajs.updateToolDefinitionApi; exports.updateWidgetApi = _chunk3PFZRJ4Ajs.updateWidgetApi;
|
|
180
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;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;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
|
@@ -24,6 +24,7 @@ import {
|
|
|
24
24
|
deleteToolDefinitionApi,
|
|
25
25
|
deleteWidgetApi,
|
|
26
26
|
disconnectIntegrationApi,
|
|
27
|
+
exportAgentApi,
|
|
27
28
|
getAgentApi,
|
|
28
29
|
getAgentByNameApi,
|
|
29
30
|
getAgentCSATAnalyticsApi,
|
|
@@ -46,6 +47,7 @@ import {
|
|
|
46
47
|
getToolDefinitionsByIdsApi,
|
|
47
48
|
getWidgetApi,
|
|
48
49
|
getWidgetByWidgetIdApi,
|
|
50
|
+
importAgentApi,
|
|
49
51
|
integrationCallbackApi,
|
|
50
52
|
listAgentJobsApi,
|
|
51
53
|
listAgentsApi,
|
|
@@ -74,6 +76,7 @@ import {
|
|
|
74
76
|
setDefaultWidgetApi,
|
|
75
77
|
snoozeSchedulerTaskApi,
|
|
76
78
|
startSchedulerTaskApi,
|
|
79
|
+
structuredOutputApi,
|
|
77
80
|
triggerBackgroundAgentApi,
|
|
78
81
|
updateAgentApi,
|
|
79
82
|
updateAgentJobApi,
|
|
@@ -87,7 +90,7 @@ import {
|
|
|
87
90
|
updateSubAgentApi,
|
|
88
91
|
updateToolDefinitionApi,
|
|
89
92
|
updateWidgetApi
|
|
90
|
-
} from "../chunk-
|
|
93
|
+
} from "../chunk-L5FLJB3H.mjs";
|
|
91
94
|
export {
|
|
92
95
|
checkBackgroundAgentStatusApi,
|
|
93
96
|
completeSchedulerTaskApi,
|
|
@@ -113,6 +116,7 @@ export {
|
|
|
113
116
|
deleteToolDefinitionApi,
|
|
114
117
|
deleteWidgetApi,
|
|
115
118
|
disconnectIntegrationApi,
|
|
119
|
+
exportAgentApi,
|
|
116
120
|
getAgentApi,
|
|
117
121
|
getAgentByNameApi,
|
|
118
122
|
getAgentCSATAnalyticsApi,
|
|
@@ -135,6 +139,7 @@ export {
|
|
|
135
139
|
getToolDefinitionsByIdsApi,
|
|
136
140
|
getWidgetApi,
|
|
137
141
|
getWidgetByWidgetIdApi,
|
|
142
|
+
importAgentApi,
|
|
138
143
|
integrationCallbackApi,
|
|
139
144
|
listAgentJobsApi,
|
|
140
145
|
listAgentsApi,
|
|
@@ -163,6 +168,7 @@ export {
|
|
|
163
168
|
setDefaultWidgetApi,
|
|
164
169
|
snoozeSchedulerTaskApi,
|
|
165
170
|
startSchedulerTaskApi,
|
|
171
|
+
structuredOutputApi,
|
|
166
172
|
triggerBackgroundAgentApi,
|
|
167
173
|
updateAgentApi,
|
|
168
174
|
updateAgentJobApi,
|
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 { 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-
|
|
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-D6WgsFMZ.mjs';
|
|
4
|
+
import { a as StructuredOutputRequest, b as StructuredOutputResponse } from '../structured-Bs0IjwLD.mjs';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Server-side Agents API
|
|
@@ -131,6 +132,11 @@ declare function pauseAgentJobServer(jobId: string, options: ServerApiOptions):
|
|
|
131
132
|
declare function resumeAgentJobServer(jobId: string, options: ServerApiOptions): Promise<ApiResponse<AgentJobResponse>>;
|
|
132
133
|
declare function triggerBackgroundAgentServer(request: Pick<TriggerBackgroundAgentRequest, "name" | "prompt" | "agentName" | "context" | "enableSSE" | "frequency" | "cron" | "timezone" | "scope" | "description">, options: ServerApiOptions): Promise<ApiResponse<TriggerBackgroundAgentResponse>>;
|
|
133
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>>>;
|
|
134
140
|
declare function listWidgetsServer(agentId: string, options: ServerApiOptions): Promise<ApiResponse<ListAgentWidgetsResponse>>;
|
|
135
141
|
declare function getDefaultWidgetServer(agentId: string, options: ServerApiOptions): Promise<ApiResponse<AgentWidgetResponse>>;
|
|
136
142
|
declare function createWidgetServer(agentId: string, widget: Partial<AgentWidget>, options: ServerApiOptions): Promise<ApiResponse<AgentWidgetResponse>>;
|
|
@@ -145,4 +151,4 @@ declare function setDefaultWidgetServer(widgetId: string, agentId: string, optio
|
|
|
145
151
|
metadata: ResponseMetadata;
|
|
146
152
|
}>>;
|
|
147
153
|
|
|
148
|
-
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, triggerBackgroundAgentServer, 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 { 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-
|
|
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-D6WgsFMZ.js';
|
|
4
|
+
import { a as StructuredOutputRequest, b as StructuredOutputResponse } from '../structured-Bs0IjwLD.js';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Server-side Agents API
|
|
@@ -131,6 +132,11 @@ declare function pauseAgentJobServer(jobId: string, options: ServerApiOptions):
|
|
|
131
132
|
declare function resumeAgentJobServer(jobId: string, options: ServerApiOptions): Promise<ApiResponse<AgentJobResponse>>;
|
|
132
133
|
declare function triggerBackgroundAgentServer(request: Pick<TriggerBackgroundAgentRequest, "name" | "prompt" | "agentName" | "context" | "enableSSE" | "frequency" | "cron" | "timezone" | "scope" | "description">, options: ServerApiOptions): Promise<ApiResponse<TriggerBackgroundAgentResponse>>;
|
|
133
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>>>;
|
|
134
140
|
declare function listWidgetsServer(agentId: string, options: ServerApiOptions): Promise<ApiResponse<ListAgentWidgetsResponse>>;
|
|
135
141
|
declare function getDefaultWidgetServer(agentId: string, options: ServerApiOptions): Promise<ApiResponse<AgentWidgetResponse>>;
|
|
136
142
|
declare function createWidgetServer(agentId: string, widget: Partial<AgentWidget>, options: ServerApiOptions): Promise<ApiResponse<AgentWidgetResponse>>;
|
|
@@ -145,4 +151,4 @@ declare function setDefaultWidgetServer(widgetId: string, agentId: string, optio
|
|
|
145
151
|
metadata: ResponseMetadata;
|
|
146
152
|
}>>;
|
|
147
153
|
|
|
148
|
-
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, triggerBackgroundAgentServer, 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
|
@@ -162,6 +162,12 @@ async function triggerBackgroundAgentServer(request, options) {
|
|
|
162
162
|
async function checkBackgroundAgentStatusServer(jobId, options) {
|
|
163
163
|
return _server.serverApiRequest.call(void 0, `/api/v1/agent-jobs/${jobId}/status`, buildRequestOptions(options, "GET"));
|
|
164
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
|
+
}
|
|
165
171
|
async function listWidgetsServer(agentId, options) {
|
|
166
172
|
return _server.serverApiRequest.call(void 0, `/api/v1/agents/${agentId}/widgets`, buildRequestOptions(options, "GET"));
|
|
167
173
|
}
|
|
@@ -230,5 +236,6 @@ async function setDefaultWidgetServer(widgetId, agentId, options) {
|
|
|
230
236
|
|
|
231
237
|
|
|
232
238
|
|
|
233
|
-
|
|
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;
|
|
234
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 TriggerBackgroundAgentRequest,\n TriggerBackgroundAgentResponse,\n BackgroundAgentStatusResponse,\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// 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
|
@@ -162,6 +162,12 @@ async function triggerBackgroundAgentServer(request, options) {
|
|
|
162
162
|
async function checkBackgroundAgentStatusServer(jobId, options) {
|
|
163
163
|
return serverApiRequest(`/api/v1/agent-jobs/${jobId}/status`, buildRequestOptions(options, "GET"));
|
|
164
164
|
}
|
|
165
|
+
async function structuredOutputServer(request, options) {
|
|
166
|
+
return serverApiRequest(
|
|
167
|
+
"/api/v1/agents/structured",
|
|
168
|
+
buildRequestOptions(options, "POST", request)
|
|
169
|
+
);
|
|
170
|
+
}
|
|
165
171
|
async function listWidgetsServer(agentId, options) {
|
|
166
172
|
return serverApiRequest(`/api/v1/agents/${agentId}/widgets`, buildRequestOptions(options, "GET"));
|
|
167
173
|
}
|
|
@@ -222,6 +228,7 @@ export {
|
|
|
222
228
|
resolveSkillConfigServer,
|
|
223
229
|
resumeAgentJobServer,
|
|
224
230
|
setDefaultWidgetServer,
|
|
231
|
+
structuredOutputServer,
|
|
225
232
|
triggerBackgroundAgentServer,
|
|
226
233
|
updateAgentJobServer,
|
|
227
234
|
updateAgentServer,
|