@amigo-ai/platform-sdk 0.1.0 → 0.2.1
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/README.md +114 -2
- package/dist/core/branded-types.js +1 -0
- package/dist/core/branded-types.js.map +1 -1
- package/dist/core/errors.js +43 -3
- package/dist/core/errors.js.map +1 -1
- package/dist/core/openapi-client.js +60 -48
- package/dist/core/openapi-client.js.map +1 -1
- package/dist/core/rate-limit.js +13 -0
- package/dist/core/rate-limit.js.map +1 -0
- package/dist/core/webhooks.js +17 -0
- package/dist/core/webhooks.js.map +1 -0
- package/dist/generated/api.js +2 -0
- package/dist/{types → generated}/api.js.map +1 -1
- package/dist/index.cjs +1668 -371
- package/dist/index.cjs.map +4 -4
- package/dist/index.js +59 -43
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1658 -371
- package/dist/index.mjs.map +4 -4
- package/dist/resources/actions.js +52 -0
- package/dist/resources/actions.js.map +1 -0
- package/dist/resources/agents.js +30 -30
- package/dist/resources/agents.js.map +1 -1
- package/dist/resources/analytics.js +34 -15
- package/dist/resources/analytics.js.map +1 -1
- package/dist/resources/api-keys.js +17 -19
- package/dist/resources/api-keys.js.map +1 -1
- package/dist/resources/audit.js +35 -0
- package/dist/resources/audit.js.map +1 -0
- package/dist/resources/base.js +12 -44
- package/dist/resources/base.js.map +1 -1
- package/dist/resources/billing.js +35 -7
- package/dist/resources/billing.js.map +1 -1
- package/dist/resources/calls.js +25 -9
- package/dist/resources/calls.js.map +1 -1
- package/dist/resources/compliance.js +19 -0
- package/dist/resources/compliance.js.map +1 -0
- package/dist/resources/context-graphs.js +46 -18
- package/dist/resources/context-graphs.js.map +1 -1
- package/dist/resources/data-sources.js +30 -12
- package/dist/resources/data-sources.js.map +1 -1
- package/dist/resources/functions.js +42 -0
- package/dist/resources/functions.js.map +1 -0
- package/dist/resources/integrations.js +32 -15
- package/dist/resources/integrations.js.map +1 -1
- package/dist/resources/memory.js +13 -4
- package/dist/resources/memory.js.map +1 -1
- package/dist/resources/operators.js +102 -0
- package/dist/resources/operators.js.map +1 -0
- package/dist/resources/personas.js +31 -0
- package/dist/resources/personas.js.map +1 -0
- package/dist/resources/phone-numbers.js +31 -16
- package/dist/resources/phone-numbers.js.map +1 -1
- package/dist/resources/recordings.js +19 -0
- package/dist/resources/recordings.js.map +1 -0
- package/dist/resources/review-queue.js +94 -0
- package/dist/resources/review-queue.js.map +1 -0
- package/dist/resources/safety.js +31 -0
- package/dist/resources/safety.js.map +1 -0
- package/dist/resources/services.js +18 -12
- package/dist/resources/services.js.map +1 -1
- package/dist/resources/settings.js +50 -24
- package/dist/resources/settings.js.map +1 -1
- package/dist/resources/simulations.js +23 -17
- package/dist/resources/simulations.js.map +1 -1
- package/dist/resources/skills.js +22 -16
- package/dist/resources/skills.js.map +1 -1
- package/dist/resources/triggers.js +51 -0
- package/dist/resources/triggers.js.map +1 -0
- package/dist/resources/webhook-destinations.js +44 -0
- package/dist/resources/webhook-destinations.js.map +1 -0
- package/dist/resources/workspaces.js +24 -38
- package/dist/resources/workspaces.js.map +1 -1
- package/dist/resources/world.js +58 -60
- package/dist/resources/world.js.map +1 -1
- package/dist/types/core/branded-types.d.ts +3 -0
- package/dist/types/core/branded-types.d.ts.map +1 -1
- package/dist/types/core/errors.d.ts +3 -0
- package/dist/types/core/errors.d.ts.map +1 -1
- package/dist/types/core/openapi-client.d.ts +13 -5
- package/dist/types/core/openapi-client.d.ts.map +1 -1
- package/dist/types/core/rate-limit.d.ts +8 -0
- package/dist/types/core/rate-limit.d.ts.map +1 -0
- package/dist/types/core/webhooks.d.ts +9 -0
- package/dist/types/core/webhooks.d.ts.map +1 -0
- package/dist/types/generated/api.d.ts +35120 -0
- package/dist/types/generated/api.d.ts.map +1 -0
- package/dist/types/index.d.ts +45 -43
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/resources/actions.d.ts +158 -0
- package/dist/types/resources/actions.d.ts.map +1 -0
- package/dist/types/resources/agents.d.ts +70 -22
- package/dist/types/resources/agents.d.ts.map +1 -1
- package/dist/types/resources/analytics.d.ts +100 -118
- package/dist/types/resources/analytics.d.ts.map +1 -1
- package/dist/types/resources/api-keys.d.ts +36 -7
- package/dist/types/resources/api-keys.d.ts.map +1 -1
- package/dist/types/resources/audit.d.ts +70 -0
- package/dist/types/resources/audit.d.ts.map +1 -0
- package/dist/types/resources/base.d.ts +13 -13
- package/dist/types/resources/base.d.ts.map +1 -1
- package/dist/types/resources/billing.d.ts +52 -12
- package/dist/types/resources/billing.d.ts.map +1 -1
- package/dist/types/resources/calls.d.ts +89 -35
- package/dist/types/resources/calls.d.ts.map +1 -1
- package/dist/types/resources/compliance.d.ts +45 -0
- package/dist/types/resources/compliance.d.ts.map +1 -0
- package/dist/types/resources/context-graphs.d.ts +77 -14
- package/dist/types/resources/context-graphs.d.ts.map +1 -1
- package/dist/types/resources/data-sources.d.ts +105 -9
- package/dist/types/resources/data-sources.d.ts.map +1 -1
- package/dist/types/resources/functions.d.ts +46 -0
- package/dist/types/resources/functions.d.ts.map +1 -0
- package/dist/types/resources/integrations.d.ts +83 -12
- package/dist/types/resources/integrations.d.ts.map +1 -1
- package/dist/types/resources/memory.d.ts +26 -73
- package/dist/types/resources/memory.d.ts.map +1 -1
- package/dist/types/resources/operators.d.ts +157 -0
- package/dist/types/resources/operators.d.ts.map +1 -0
- package/dist/types/resources/personas.d.ts +60 -0
- package/dist/types/resources/personas.d.ts.map +1 -0
- package/dist/types/resources/phone-numbers.d.ts +70 -10
- package/dist/types/resources/phone-numbers.d.ts.map +1 -1
- package/dist/types/resources/recordings.d.ts +29 -0
- package/dist/types/resources/recordings.d.ts.map +1 -0
- package/dist/types/resources/review-queue.d.ts +184 -0
- package/dist/types/resources/review-queue.d.ts.map +1 -0
- package/dist/types/resources/safety.d.ts +57 -0
- package/dist/types/resources/safety.d.ts.map +1 -0
- package/dist/types/resources/services.d.ts +85 -5
- package/dist/types/resources/services.d.ts.map +1 -1
- package/dist/types/resources/settings.d.ts +79 -78
- package/dist/types/resources/settings.d.ts.map +1 -1
- package/dist/types/resources/simulations.d.ts +41 -12
- package/dist/types/resources/simulations.d.ts.map +1 -1
- package/dist/types/resources/skills.d.ts +131 -6
- package/dist/types/resources/skills.d.ts.map +1 -1
- package/dist/types/resources/triggers.d.ts +129 -0
- package/dist/types/resources/triggers.d.ts.map +1 -0
- package/dist/types/resources/webhook-destinations.d.ts +75 -0
- package/dist/types/resources/webhook-destinations.d.ts.map +1 -0
- package/dist/types/resources/workspaces.d.ts +60 -15
- package/dist/types/resources/workspaces.d.ts.map +1 -1
- package/dist/types/resources/world.d.ts +152 -143
- package/dist/types/resources/world.d.ts.map +1 -1
- package/package.json +6 -3
- package/dist/types/api.js +0 -12
- package/dist/types/types/api.d.ts +0 -739
- package/dist/types/types/api.d.ts.map +0 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -21,6 +21,9 @@ import { WorkspacesResource } from './resources/workspaces.js';
|
|
|
21
21
|
import { ApiKeysResource } from './resources/api-keys.js';
|
|
22
22
|
import { AgentsResource } from './resources/agents.js';
|
|
23
23
|
import { SkillsResource } from './resources/skills.js';
|
|
24
|
+
import { ActionsResource } from './resources/actions.js';
|
|
25
|
+
import { OperatorsResource } from './resources/operators.js';
|
|
26
|
+
import { TriggersResource } from './resources/triggers.js';
|
|
24
27
|
import { ServicesResource } from './resources/services.js';
|
|
25
28
|
import { ContextGraphsResource } from './resources/context-graphs.js';
|
|
26
29
|
import { DataSourcesResource } from './resources/data-sources.js';
|
|
@@ -33,82 +36,81 @@ import { SimulationsResource } from './resources/simulations.js';
|
|
|
33
36
|
import { SettingsResource } from './resources/settings.js';
|
|
34
37
|
import { BillingResource } from './resources/billing.js';
|
|
35
38
|
import { MemoryResource } from './resources/memory.js';
|
|
39
|
+
import { PersonasResource } from './resources/personas.js';
|
|
40
|
+
import { ReviewQueueResource } from './resources/review-queue.js';
|
|
41
|
+
import { RecordingsResource } from './resources/recordings.js';
|
|
42
|
+
import { AuditResource } from './resources/audit.js';
|
|
43
|
+
import { WebhookDestinationsResource } from './resources/webhook-destinations.js';
|
|
44
|
+
import { SafetyResource } from './resources/safety.js';
|
|
45
|
+
import { ComplianceResource } from './resources/compliance.js';
|
|
46
|
+
import { FunctionsResource } from './resources/functions.js';
|
|
36
47
|
export declare const DEFAULT_BASE_URL = "https://api.platform.amigo.ai";
|
|
37
48
|
export interface AmigoClientConfig {
|
|
38
|
-
/**
|
|
39
|
-
* Your Amigo Platform API key.
|
|
40
|
-
* Create one at: Platform > Workspace Settings > API Keys
|
|
41
|
-
*/
|
|
49
|
+
/** API key created via POST /v1/{workspace_id}/api-keys */
|
|
42
50
|
apiKey: string;
|
|
43
|
-
/**
|
|
44
|
-
* Your workspace ID. All resource operations are scoped to this workspace.
|
|
45
|
-
*/
|
|
51
|
+
/** Workspace ID — all resource operations are scoped to this workspace */
|
|
46
52
|
workspaceId: string;
|
|
47
53
|
/**
|
|
48
54
|
* Override the base URL. Defaults to https://api.platform.amigo.ai
|
|
49
|
-
*
|
|
55
|
+
*
|
|
56
|
+
* For BFF proxy patterns (e.g., Next.js), point this at your proxy:
|
|
57
|
+
* ```ts
|
|
58
|
+
* new AmigoClient({ baseUrl: '/api/platform', ... })
|
|
59
|
+
* ```
|
|
50
60
|
*/
|
|
51
61
|
baseUrl?: string;
|
|
62
|
+
/** Retry configuration for failed requests */
|
|
63
|
+
retry?: RetryOptions;
|
|
52
64
|
/**
|
|
53
|
-
*
|
|
54
|
-
*
|
|
65
|
+
* Custom fetch implementation.
|
|
66
|
+
*
|
|
67
|
+
* Use for BFF proxy routing, server-side cookie forwarding,
|
|
68
|
+
* or test mocking. When provided, all HTTP requests flow
|
|
69
|
+
* through this function instead of globalThis.fetch.
|
|
55
70
|
*/
|
|
56
|
-
|
|
71
|
+
fetch?: typeof globalThis.fetch;
|
|
57
72
|
}
|
|
58
|
-
/**
|
|
59
|
-
* The main entry point for the Amigo Platform SDK.
|
|
60
|
-
*
|
|
61
|
-
* Instantiate once and reuse across your application.
|
|
62
|
-
*/
|
|
63
73
|
export declare class AmigoClient {
|
|
64
|
-
/** Workspace management */
|
|
65
74
|
readonly workspaces: WorkspacesResource;
|
|
66
|
-
/** API key management */
|
|
67
75
|
readonly apiKeys: ApiKeysResource;
|
|
68
|
-
/** Agent management — AI agents that handle calls */
|
|
69
76
|
readonly agents: AgentsResource;
|
|
70
|
-
/**
|
|
77
|
+
/** @deprecated Use `actions` instead */
|
|
71
78
|
readonly skills: SkillsResource;
|
|
72
|
-
|
|
79
|
+
readonly actions: ActionsResource;
|
|
80
|
+
readonly operators: OperatorsResource;
|
|
81
|
+
readonly triggers: TriggersResource;
|
|
73
82
|
readonly services: ServicesResource;
|
|
74
|
-
/** Context graph management — conversation flow structures */
|
|
75
83
|
readonly contextGraphs: ContextGraphsResource;
|
|
76
|
-
/** Data source management — external data connections */
|
|
77
84
|
readonly dataSources: DataSourcesResource;
|
|
78
|
-
/** World model — entities, events, and timelines */
|
|
79
85
|
readonly world: WorldResource;
|
|
80
|
-
/** Call records and intelligence */
|
|
81
86
|
readonly calls: CallsResource;
|
|
82
|
-
/** Phone number provisioning and management */
|
|
83
87
|
readonly phoneNumbers: PhoneNumbersResource;
|
|
84
|
-
/** Integration management — EHR, CRM, and other external systems */
|
|
85
88
|
readonly integrations: IntegrationsResource;
|
|
86
|
-
/** Analytics — aggregate metrics about calls and conversions */
|
|
87
89
|
readonly analytics: AnalyticsResource;
|
|
88
|
-
/** Simulation runs and interactive testing sessions */
|
|
89
90
|
readonly simulations: SimulationsResource;
|
|
90
|
-
/** Workspace-level settings (voice, branding, security, outreach, etc.) */
|
|
91
91
|
readonly settings: SettingsResource;
|
|
92
|
-
/** Billing — usage summaries and invoices */
|
|
93
92
|
readonly billing: BillingResource;
|
|
94
|
-
/** Agent Memory — structured long-term memory for entities */
|
|
95
93
|
readonly memory: MemoryResource;
|
|
94
|
+
readonly personas: PersonasResource;
|
|
95
|
+
readonly reviewQueue: ReviewQueueResource;
|
|
96
|
+
readonly recordings: RecordingsResource;
|
|
97
|
+
readonly audit: AuditResource;
|
|
98
|
+
readonly webhookDestinations: WebhookDestinationsResource;
|
|
99
|
+
readonly safety: SafetyResource;
|
|
100
|
+
readonly compliance: ComplianceResource;
|
|
101
|
+
readonly functions: FunctionsResource;
|
|
96
102
|
constructor(config: AmigoClientConfig);
|
|
97
103
|
}
|
|
98
104
|
export type { AmigoClientConfig as AmigoConfig };
|
|
99
105
|
export { AmigoError, BadRequestError, AuthenticationError, PermissionError, NotFoundError, ConflictError, ValidationError, RateLimitError, ServerError, ServiceUnavailableError, NetworkError, ParseError, ConfigurationError, isAmigoError, isNotFoundError, isRateLimitError, isAuthenticationError, } from './core/errors.js';
|
|
100
|
-
export type { WorkspaceId, ApiKeyId, AgentId, SkillId, ServiceId, ContextGraphId, CallId, PhoneNumberId, IntegrationId, EntityId, EventId, SimulationRunId, SimulationSessionId, DataSourceId, } from './core/branded-types.js';
|
|
101
|
-
export { workspaceId, apiKeyId, agentId, skillId, serviceId, contextGraphId, callId, phoneNumberId, integrationId, entityId, eventId, simulationRunId, simulationSessionId, dataSourceId, } from './core/branded-types.js';
|
|
106
|
+
export type { WorkspaceId, ApiKeyId, AgentId, PersonaId, SkillId, ActionId, ServiceId, ContextGraphId, CallId, PhoneNumberId, IntegrationId, EntityId, EventId, SimulationRunId, SimulationSessionId, FunctionId, DataSourceId, } from './core/branded-types.js';
|
|
107
|
+
export { workspaceId, apiKeyId, agentId, personaId, skillId, actionId, serviceId, contextGraphId, callId, phoneNumberId, integrationId, entityId, eventId, simulationRunId, simulationSessionId, functionId, dataSourceId, } from './core/branded-types.js';
|
|
102
108
|
export { paginate } from './core/utils.js';
|
|
103
109
|
export type { PaginatedList, ListParams } from './core/utils.js';
|
|
104
110
|
export type { RetryOptions } from './core/retry.js';
|
|
105
|
-
export
|
|
106
|
-
export type {
|
|
107
|
-
export
|
|
108
|
-
export type {
|
|
109
|
-
export type {
|
|
110
|
-
export type { CallDetail, CallIntelligence, CallTranscriptSegment, CallBenchmarks, } from './resources/calls.js';
|
|
111
|
-
export type { MetricWithDelta, AnalyticsDashboard, CallAnalytics, AgentAnalytics, AgentAnalyticsResponse, CallQualityMetrics, EmotionTrends, LatencyMetrics, ToolPerformance, DataQualityMetrics, AdvancedCallStats, CallComparison, AnalyticsQueryParams, } from './resources/analytics.js';
|
|
112
|
-
export type { DimensionScore, EntityDimensionsResponse, MemoryFact, EntityFactsResponse, DimensionAnalytics, MemoryAnalyticsResponse, } from './resources/memory.js';
|
|
113
|
-
export type { Workspace, CreateWorkspaceRequest, UpdateWorkspaceRequest, ApiKey, ApiKeyRole, CreateApiKeyRequest, CreateApiKeyResponse, RotateApiKeyResponse, AuthMeResponse, Agent, AgentVersion, AgentIdentity, AgentVoiceConfig, CreateAgentRequest, UpdateAgentRequest, CreateAgentVersionRequest, Skill, ExecutionTier, CreateSkillRequest, UpdateSkillRequest, SkillTestRequest, SkillTestResponse, Service, CreateServiceRequest, UpdateServiceRequest, ContextGraph, CreateContextGraphRequest, UpdateContextGraphRequest, DataSource, CreateDataSourceRequest, Entity, EntityType, WorldEvent, TimelineEntry, CreateEntityRequest, UpdateEntityRequest, EmitEventRequest, MergeEntitiesRequest, Call, CallDirection, ListCallsParams, PhoneNumber, PhoneNumberForwarding, ProvisionPhoneNumberRequest, UpdatePhoneNumberRequest, Integration, IntegrationEndpoint, CreateIntegrationRequest, UpdateIntegrationRequest, AgentPerformance, UsageMeter, ServiceVersionSet, ServiceTag, ServiceVoiceConfig, SimulationSession, SimulationSnapshot, SimulationStepResponse, SimulationStepObservation, CreateSimulationSessionRequest, UsageSummary, Invoice, PaginatedResponse, } from './types/api.js';
|
|
111
|
+
export { parseRateLimitHeaders } from './core/rate-limit.js';
|
|
112
|
+
export type { RateLimitInfo } from './core/rate-limit.js';
|
|
113
|
+
export { verifyWebhookSignature, parseWebhookEvent } from './core/webhooks.js';
|
|
114
|
+
export type { WebhookEvent } from './core/webhooks.js';
|
|
115
|
+
export type { paths, components, operations } from './generated/api.js';
|
|
114
116
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAIH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAA;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAA;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,y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BAAkB,CAAA;AAEzB,YAAY,EACV,WAAW,EACX,QAAQ,EACR,OAAO,EACP,SAAS,EACT,OAAO,EACP,QAAQ,EACR,SAAS,EACT,cAAc,EACd,MAAM,EACN,aAAa,EACb,aAAa,EACb,QAAQ,EACR,OAAO,EACP,eAAe,EACf,mBAAmB,EACnB,UAAU,EACV,YAAY,GACb,MAAM,yBAAyB,CAAA;AAEhC,OAAO,EACL,WAAW,EACX,QAAQ,EACR,OAAO,EACP,SAAS,EACT,OAAO,EACP,QAAQ,EACR,SAAS,EACT,cAAc,EACd,MAAM,EACN,aAAa,EACb,aAAa,EACb,QAAQ,EACR,OAAO,EACP,eAAe,EACf,mBAAmB,EACnB,UAAU,EACV,YAAY,GACb,MAAM,yBAAyB,CAAA;AAEhC,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAC1C,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAChE,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAEnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAC5D,YAAY,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEzD,OAAO,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAC9E,YAAY,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAGtD,YAAY,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA"}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import type { components } from '../generated/api.js';
|
|
2
|
+
import type { ActionId } from '../core/branded-types.js';
|
|
3
|
+
import { WorkspaceScopedResource } from './base.js';
|
|
4
|
+
import type { ListParams } from '../core/utils.js';
|
|
5
|
+
export interface ListActionsParams extends ListParams {
|
|
6
|
+
search?: string;
|
|
7
|
+
enabled?: boolean;
|
|
8
|
+
execution_tier?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Manage actions — reusable AI capabilities that agents can call.
|
|
12
|
+
* Actions define a structured input/output schema and an execution tier.
|
|
13
|
+
*
|
|
14
|
+
* Note: The underlying API paths use `/skills/` for backward compatibility.
|
|
15
|
+
*/
|
|
16
|
+
export declare class ActionsResource extends WorkspaceScopedResource {
|
|
17
|
+
/** Create a new action */
|
|
18
|
+
create(body: components['schemas']['CreateSkillRequest']): Promise<{
|
|
19
|
+
id: string;
|
|
20
|
+
workspace_id: string;
|
|
21
|
+
slug: string;
|
|
22
|
+
name: string;
|
|
23
|
+
description: string;
|
|
24
|
+
system_prompt: string;
|
|
25
|
+
input_schema: {
|
|
26
|
+
[key: string]: unknown;
|
|
27
|
+
};
|
|
28
|
+
result_schema: {
|
|
29
|
+
[key: string]: unknown;
|
|
30
|
+
} | null;
|
|
31
|
+
model: string;
|
|
32
|
+
max_tokens: number;
|
|
33
|
+
max_result_chars: number;
|
|
34
|
+
max_input_tokens: number | null;
|
|
35
|
+
timeout_s: number;
|
|
36
|
+
thinking_effort: ("low" | "medium" | "high") | null;
|
|
37
|
+
enable_caching: boolean;
|
|
38
|
+
enable_citations: boolean;
|
|
39
|
+
use_structured_output: boolean;
|
|
40
|
+
integration_tools: components["schemas"]["src__models__IntegrationToolRef"][];
|
|
41
|
+
static_tools: components["schemas"]["src__models__StaticToolDef"][];
|
|
42
|
+
delivery: "interrupt" | "queue";
|
|
43
|
+
urgency_keywords: string[];
|
|
44
|
+
enabled: boolean;
|
|
45
|
+
execution_tier: "direct" | "orchestrated" | "autonomous" | "browser" | "computer_use";
|
|
46
|
+
max_agent_turns: number;
|
|
47
|
+
checkpoint_enabled: boolean;
|
|
48
|
+
approval_required: boolean;
|
|
49
|
+
browser_start_url: string | null;
|
|
50
|
+
browser_allowed_domains: string[];
|
|
51
|
+
browser_auth_integration: string | null;
|
|
52
|
+
version: number;
|
|
53
|
+
created_at: string;
|
|
54
|
+
updated_at: string;
|
|
55
|
+
}>;
|
|
56
|
+
/** List actions in the workspace */
|
|
57
|
+
list(params?: ListActionsParams): Promise<{
|
|
58
|
+
items: components["schemas"]["SkillResponse"][];
|
|
59
|
+
has_more: boolean;
|
|
60
|
+
continuation_token?: number | null;
|
|
61
|
+
total?: number | null;
|
|
62
|
+
}>;
|
|
63
|
+
/** Get a single action */
|
|
64
|
+
get(actionId: ActionId | string): Promise<{
|
|
65
|
+
id: string;
|
|
66
|
+
workspace_id: string;
|
|
67
|
+
slug: string;
|
|
68
|
+
name: string;
|
|
69
|
+
description: string;
|
|
70
|
+
system_prompt: string;
|
|
71
|
+
input_schema: {
|
|
72
|
+
[key: string]: unknown;
|
|
73
|
+
};
|
|
74
|
+
result_schema: {
|
|
75
|
+
[key: string]: unknown;
|
|
76
|
+
} | null;
|
|
77
|
+
model: string;
|
|
78
|
+
max_tokens: number;
|
|
79
|
+
max_result_chars: number;
|
|
80
|
+
max_input_tokens: number | null;
|
|
81
|
+
timeout_s: number;
|
|
82
|
+
thinking_effort: ("low" | "medium" | "high") | null;
|
|
83
|
+
enable_caching: boolean;
|
|
84
|
+
enable_citations: boolean;
|
|
85
|
+
use_structured_output: boolean;
|
|
86
|
+
integration_tools: components["schemas"]["src__models__IntegrationToolRef"][];
|
|
87
|
+
static_tools: components["schemas"]["src__models__StaticToolDef"][];
|
|
88
|
+
delivery: "interrupt" | "queue";
|
|
89
|
+
urgency_keywords: string[];
|
|
90
|
+
enabled: boolean;
|
|
91
|
+
execution_tier: "direct" | "orchestrated" | "autonomous" | "browser" | "computer_use";
|
|
92
|
+
max_agent_turns: number;
|
|
93
|
+
checkpoint_enabled: boolean;
|
|
94
|
+
approval_required: boolean;
|
|
95
|
+
browser_start_url: string | null;
|
|
96
|
+
browser_allowed_domains: string[];
|
|
97
|
+
browser_auth_integration: string | null;
|
|
98
|
+
version: number;
|
|
99
|
+
created_at: string;
|
|
100
|
+
updated_at: string;
|
|
101
|
+
}>;
|
|
102
|
+
/** Update an action */
|
|
103
|
+
update(actionId: ActionId | string, body: components['schemas']['UpdateSkillRequest']): Promise<{
|
|
104
|
+
id: string;
|
|
105
|
+
workspace_id: string;
|
|
106
|
+
slug: string;
|
|
107
|
+
name: string;
|
|
108
|
+
description: string;
|
|
109
|
+
system_prompt: string;
|
|
110
|
+
input_schema: {
|
|
111
|
+
[key: string]: unknown;
|
|
112
|
+
};
|
|
113
|
+
result_schema: {
|
|
114
|
+
[key: string]: unknown;
|
|
115
|
+
} | null;
|
|
116
|
+
model: string;
|
|
117
|
+
max_tokens: number;
|
|
118
|
+
max_result_chars: number;
|
|
119
|
+
max_input_tokens: number | null;
|
|
120
|
+
timeout_s: number;
|
|
121
|
+
thinking_effort: ("low" | "medium" | "high") | null;
|
|
122
|
+
enable_caching: boolean;
|
|
123
|
+
enable_citations: boolean;
|
|
124
|
+
use_structured_output: boolean;
|
|
125
|
+
integration_tools: components["schemas"]["src__models__IntegrationToolRef"][];
|
|
126
|
+
static_tools: components["schemas"]["src__models__StaticToolDef"][];
|
|
127
|
+
delivery: "interrupt" | "queue";
|
|
128
|
+
urgency_keywords: string[];
|
|
129
|
+
enabled: boolean;
|
|
130
|
+
execution_tier: "direct" | "orchestrated" | "autonomous" | "browser" | "computer_use";
|
|
131
|
+
max_agent_turns: number;
|
|
132
|
+
checkpoint_enabled: boolean;
|
|
133
|
+
approval_required: boolean;
|
|
134
|
+
browser_start_url: string | null;
|
|
135
|
+
browser_allowed_domains: string[];
|
|
136
|
+
browser_auth_integration: string | null;
|
|
137
|
+
version: number;
|
|
138
|
+
created_at: string;
|
|
139
|
+
updated_at: string;
|
|
140
|
+
}>;
|
|
141
|
+
/** Delete an action */
|
|
142
|
+
delete(actionId: ActionId | string): Promise<void>;
|
|
143
|
+
/**
|
|
144
|
+
* Test an action with a sample input.
|
|
145
|
+
* Executes the action in a sandbox and returns the result.
|
|
146
|
+
*/
|
|
147
|
+
test(actionId: ActionId | string, body: components['schemas']['TestSkillRequest']): Promise<{
|
|
148
|
+
result: string;
|
|
149
|
+
duration_ms: number;
|
|
150
|
+
input_tokens: number;
|
|
151
|
+
output_tokens: number;
|
|
152
|
+
cached_tokens: number;
|
|
153
|
+
rounds: number;
|
|
154
|
+
sub_tool_logs: components["schemas"]["SubToolLog"][];
|
|
155
|
+
error?: string | null;
|
|
156
|
+
}>;
|
|
157
|
+
}
|
|
158
|
+
//# sourceMappingURL=actions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../src/resources/actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AACrD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AACxD,OAAO,EAAE,uBAAuB,EAAe,MAAM,WAAW,CAAA;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAElD,MAAM,WAAW,iBAAkB,SAAQ,UAAU;IACnD,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AAED;;;;;GAKG;AACH,qBAAa,eAAgB,SAAQ,uBAAuB;IAC1D,0BAA0B;IACpB,MAAM,CAAC,IAAI,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,oBAAoB,CAAC;;;;;;;;;;;;;;;;;;;;;;2BAyD8zle,qBAAsB;sBAAgG,qBAAsB;;;;;;;;;;;;;;;IAhDxgme,oCAAoC;IAC9B,IAAI,CAAC,MAAM,CAAC,EAAE,iBAAiB;eA+Cg9sa,qBAAsB;;;;;IAvC3gta,0BAA0B;IACpB,GAAG,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM;;;;;;;;;;;;;;;;;;;;;;2BAsCu1le,qBAAsB;sBAAgG,qBAAsB;;;;;;;;;;;;;;;IA9Bxgme,uBAAuB;IACjB,MAAM,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,EAAE,IAAI,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,oBAAoB,CAAC;;;;;;;;;;;;;;;;;;;;;;2BA6Biyle,qBAAsB;sBAAgG,qBAAsB;;;;;;;;;;;;;;;IApBxgme,uBAAuB;IACjB,MAAM,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAMxD;;;OAGG;IACG,IAAI,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,EAAE,IAAI,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC;;;;;;;uBASu/1f,qBAAsB;;;CADrm2f"}
|
|
@@ -1,32 +1,80 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { components } from '../generated/api.js';
|
|
2
2
|
import type { AgentId } from '../core/branded-types.js';
|
|
3
3
|
import { WorkspaceScopedResource } from './base.js';
|
|
4
4
|
import type { ListParams } from '../core/utils.js';
|
|
5
5
|
export interface ListAgentsParams extends ListParams {
|
|
6
6
|
search?: string;
|
|
7
7
|
}
|
|
8
|
-
export interface ListAgentVersionsParams extends ListParams {
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Manage agents — the AI personas that handle calls and interactions.
|
|
12
|
-
* Each agent can be assigned skills, a persona, and a model.
|
|
13
|
-
*/
|
|
14
8
|
export declare class AgentsResource extends WorkspaceScopedResource {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
9
|
+
create(body: components['schemas']['CreateAgentRequest']): Promise<{
|
|
10
|
+
id: string;
|
|
11
|
+
workspace_id: string;
|
|
12
|
+
name: string;
|
|
13
|
+
description: string;
|
|
14
|
+
latest_version?: number | null;
|
|
15
|
+
created_at: string;
|
|
16
|
+
updated_at: string;
|
|
17
|
+
}>;
|
|
18
|
+
list(params?: ListAgentsParams): Promise<{
|
|
19
|
+
items: components["schemas"]["AgentResponse"][];
|
|
20
|
+
has_more: boolean;
|
|
21
|
+
continuation_token?: number | null;
|
|
22
|
+
total?: number | null;
|
|
23
|
+
}>;
|
|
24
|
+
get(agentId: AgentId | string): Promise<{
|
|
25
|
+
id: string;
|
|
26
|
+
workspace_id: string;
|
|
27
|
+
name: string;
|
|
28
|
+
description: string;
|
|
29
|
+
latest_version?: number | null;
|
|
30
|
+
created_at: string;
|
|
31
|
+
updated_at: string;
|
|
32
|
+
}>;
|
|
33
|
+
update(agentId: AgentId | string, body: components['schemas']['UpdateAgentRequest']): Promise<{
|
|
34
|
+
id: string;
|
|
35
|
+
workspace_id: string;
|
|
36
|
+
name: string;
|
|
37
|
+
description: string;
|
|
38
|
+
latest_version?: number | null;
|
|
39
|
+
created_at: string;
|
|
40
|
+
updated_at: string;
|
|
41
|
+
}>;
|
|
24
42
|
delete(agentId: AgentId | string): Promise<void>;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
43
|
+
listVersions(agentId: AgentId | string, params?: ListParams): Promise<{
|
|
44
|
+
items: components["schemas"]["AgentVersionResponse"][];
|
|
45
|
+
has_more: boolean;
|
|
46
|
+
continuation_token?: number | null;
|
|
47
|
+
total?: number | null;
|
|
48
|
+
}>;
|
|
49
|
+
getVersion(agentId: AgentId | string, version: number | 'latest'): Promise<{
|
|
50
|
+
id: string;
|
|
51
|
+
workspace_id: string;
|
|
52
|
+
agent_id: string;
|
|
53
|
+
version: number;
|
|
54
|
+
name: string;
|
|
55
|
+
initials: string;
|
|
56
|
+
identity: components["schemas"]["Identity"];
|
|
57
|
+
voice_config: components["schemas"]["VoiceConfig"] | null;
|
|
58
|
+
background: string;
|
|
59
|
+
behaviors: string[];
|
|
60
|
+
communication_patterns: string[];
|
|
61
|
+
created_at: string;
|
|
62
|
+
updated_at: string;
|
|
63
|
+
}>;
|
|
64
|
+
createVersion(agentId: AgentId | string, body: components['schemas']['CreateAgentVersionRequest']): Promise<{
|
|
65
|
+
id: string;
|
|
66
|
+
workspace_id: string;
|
|
67
|
+
agent_id: string;
|
|
68
|
+
version: number;
|
|
69
|
+
name: string;
|
|
70
|
+
initials: string;
|
|
71
|
+
identity: components["schemas"]["Identity"];
|
|
72
|
+
voice_config: components["schemas"]["VoiceConfig"] | null;
|
|
73
|
+
background: string;
|
|
74
|
+
behaviors: string[];
|
|
75
|
+
communication_patterns: string[];
|
|
76
|
+
created_at: string;
|
|
77
|
+
updated_at: string;
|
|
78
|
+
}>;
|
|
31
79
|
}
|
|
32
80
|
//# sourceMappingURL=agents.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../../src/resources/agents.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../../src/resources/agents.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AACrD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAA;AACvD,OAAO,EAAE,uBAAuB,EAAe,MAAM,WAAW,CAAA;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAElD,MAAM,WAAW,gBAAiB,SAAQ,UAAU;IAClD,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,qBAAa,cAAe,SAAQ,uBAAuB;IACnD,MAAM,CAAC,IAAI,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,oBAAoB,CAAC;;;;;;;;;IASxD,IAAI,CAAC,MAAM,CAAC,EAAE,gBAAgB;eA6Dg48Z,qBAAsB;;;;;IArDp78Z,GAAG,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM;;;;;;;;;IAQ7B,MAAM,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,EAAE,IAAI,EAAE,UAAU,CAAC,SAAS,CAAC,C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