@droz-js/sdk 0.19.22 → 0.19.24

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@droz-js/sdk",
3
3
  "description": "Droz SDK",
4
- "version": "0.19.22",
4
+ "version": "0.19.24",
5
5
  "private": false,
6
6
  "repository": {
7
7
  "type": "git",
package/src/drozai.d.ts CHANGED
@@ -33,6 +33,69 @@ declare const DrozAi_base: new (options?: import("./client/http").HttpClientOpti
33
33
  removeAiAgent(variables: import("./sdks/ai").Exact<{
34
34
  input: import("./sdks/ai").AiAgentRefInput;
35
35
  }>, options?: unknown): Promise<import("./sdks/ai").RemoveAiAgentMutation>;
36
+ listAiAgentUseCases(variables: import("./sdks/ai").Exact<{
37
+ agentId: import("./sdks/ai").Scalars["ID"]["input"];
38
+ }>, options?: unknown): Promise<import("./sdks/ai").ListAiAgentUseCasesQuery>;
39
+ listAiAgentProcedures(variables: import("./sdks/ai").Exact<{
40
+ agentId: import("./sdks/ai").Scalars["ID"]["input"];
41
+ }>, options?: unknown): Promise<import("./sdks/ai").ListAiAgentProceduresQuery>;
42
+ listAiAgentTools(variables?: import("./sdks/ai").Exact<{
43
+ [key: string]: never;
44
+ }>, options?: unknown): Promise<import("./sdks/ai").ListAiAgentToolsQuery>;
45
+ aiAgentUseCaseOverlap(variables: import("./sdks/ai").Exact<{
46
+ agentId: import("./sdks/ai").Scalars["ID"]["input"];
47
+ }>, options?: unknown): Promise<import("./sdks/ai").AiAgentUseCaseOverlapQuery>;
48
+ aiAgentTrace(variables: import("./sdks/ai").Exact<{
49
+ sessionId: import("./sdks/ai").Scalars["ID"]["input"];
50
+ }>, options?: unknown): Promise<import("./sdks/ai").AiAgentTraceQuery>;
51
+ listAiAgentScenarios(variables: import("./sdks/ai").Exact<{
52
+ agentId: import("./sdks/ai").Scalars["ID"]["input"];
53
+ }>, options?: unknown): Promise<import("./sdks/ai").ListAiAgentScenariosQuery>;
54
+ aiAgentRetentionPolicy(variables?: import("./sdks/ai").Exact<{
55
+ [key: string]: never;
56
+ }>, options?: unknown): Promise<import("./sdks/ai").AiAgentRetentionPolicyQuery>;
57
+ aiAgentConversationMetrics(variables: import("./sdks/ai").Exact<{
58
+ input: import("./sdks/ai").AiAgentMetricsInput;
59
+ }>, options?: unknown): Promise<import("./sdks/ai").AiAgentConversationMetricsQuery>;
60
+ aiAgentConversationOutcome(variables: import("./sdks/ai").Exact<{
61
+ sessionId: import("./sdks/ai").Scalars["ID"]["input"];
62
+ }>, options?: unknown): Promise<import("./sdks/ai").AiAgentConversationOutcomeQuery>;
63
+ saveAiAgentUseCase(variables: import("./sdks/ai").Exact<{
64
+ input: import("./sdks/ai").SaveAiAgentUseCaseInput;
65
+ }>, options?: unknown): Promise<import("./sdks/ai").SaveAiAgentUseCaseMutation>;
66
+ saveAiAgentProcedure(variables: import("./sdks/ai").Exact<{
67
+ input: import("./sdks/ai").SaveAiAgentProcedureInput;
68
+ }>, options?: unknown): Promise<import("./sdks/ai").SaveAiAgentProcedureMutation>;
69
+ removeAiAgentUseCase(variables: import("./sdks/ai").Exact<{
70
+ input: import("./sdks/ai").AiAgentAuthoringRefInput;
71
+ }>, options?: unknown): Promise<import("./sdks/ai").RemoveAiAgentUseCaseMutation>;
72
+ removeAiAgentProcedure(variables: import("./sdks/ai").Exact<{
73
+ input: import("./sdks/ai").AiAgentAuthoringRefInput;
74
+ }>, options?: unknown): Promise<import("./sdks/ai").RemoveAiAgentProcedureMutation>;
75
+ resolveAiAgentApproval(variables: import("./sdks/ai").Exact<{
76
+ input: import("./sdks/ai").ResolveAiAgentApprovalInput;
77
+ }>, options?: unknown): Promise<import("./sdks/ai").ResolveAiAgentApprovalMutation>;
78
+ registerAiAgentTool(variables: import("./sdks/ai").Exact<{
79
+ input: import("./sdks/ai").RegisterAiAgentToolInput;
80
+ }>, options?: unknown): Promise<import("./sdks/ai").RegisterAiAgentToolMutation>;
81
+ unregisterAiAgentTool(variables: import("./sdks/ai").Exact<{
82
+ input: import("./sdks/ai").UnregisterAiAgentToolInput;
83
+ }>, options?: unknown): Promise<import("./sdks/ai").UnregisterAiAgentToolMutation>;
84
+ saveAiAgentScenario(variables: import("./sdks/ai").Exact<{
85
+ input: import("./sdks/ai").SaveAiAgentScenarioInput;
86
+ }>, options?: unknown): Promise<import("./sdks/ai").SaveAiAgentScenarioMutation>;
87
+ checkAiAgentVersion(variables: import("./sdks/ai").Exact<{
88
+ input: import("./sdks/ai").CheckAiAgentVersionInput;
89
+ }>, options?: unknown): Promise<import("./sdks/ai").CheckAiAgentVersionMutation>;
90
+ aiAgentMetrics(variables: import("./sdks/ai").Exact<{
91
+ input: import("./sdks/ai").AiAgentMetricsInput;
92
+ }>, options?: unknown): Promise<import("./sdks/ai").AiAgentMetricsQuery>;
93
+ aiAgentVersionSpec(variables: import("./sdks/ai").Exact<{
94
+ agentId: import("./sdks/ai").Scalars["ID"]["input"];
95
+ }>, options?: unknown): Promise<import("./sdks/ai").AiAgentVersionSpecQuery>;
96
+ aiAgentRoutingPreview(variables: import("./sdks/ai").Exact<{
97
+ input: import("./sdks/ai").AiAgentRoutingPreviewInput;
98
+ }>, options?: unknown): Promise<import("./sdks/ai").AiAgentRoutingPreviewQuery>;
36
99
  extractImageMetadata(variables: import("./sdks/ai").Exact<{
37
100
  input: import("./sdks/ai").ExtractImageMetadataInput;
38
101
  }>, options?: unknown): Promise<import("./sdks/ai").ExtractImageMetadataMutation>;
package/src/sdks/ai.d.ts CHANGED
@@ -138,6 +138,11 @@ export type AiAgentBudget = {
138
138
  * que sempre vale.
139
139
  */
140
140
  maxCostMicroUsd?: Maybe<Scalars['Int']['output']>;
141
+ /**
142
+ * Teto de gasto do agente no periodo (mes calendario UTC), em micro-dolar. Ausente = sem teto de
143
+ * periodo. Independe de `maxCostMicroUsd`, que vale por conversa.
144
+ */
145
+ maxPeriodCostMicroUsd?: Maybe<Scalars['Int']['output']>;
141
146
  maxSteps: Scalars['Int']['output'];
142
147
  /** Teto de token da conversa inteira. Ausente = sem teto de token. */
143
148
  maxTokens?: Maybe<Scalars['Int']['output']>;
@@ -146,6 +151,7 @@ export type AiAgentBudget = {
146
151
  };
147
152
  export type AiAgentBudgetInput = {
148
153
  maxCostMicroUsd?: InputMaybe<Scalars['Int']['input']>;
154
+ maxPeriodCostMicroUsd?: InputMaybe<Scalars['Int']['input']>;
149
155
  maxSteps: Scalars['Int']['input'];
150
156
  maxTokens?: InputMaybe<Scalars['Int']['input']>;
151
157
  maxToolCalls: Scalars['Int']['input'];
@@ -199,9 +205,12 @@ export type AiAgentConversationOutcome = {
199
205
  * autor para dizer onde procura-la, em vez de prometer transferencia que nao acontece.
200
206
  */
201
207
  export type AiAgentHandoff = {
208
+ /** `human` ou `flow`. Ausente = nao declarado: a metrica conta a parte, sem supor destino. */
209
+ target?: Maybe<Scalars['String']['output']>;
202
210
  transition: Scalars['String']['output'];
203
211
  };
204
212
  export type AiAgentHandoffInput = {
213
+ target?: InputMaybe<Scalars['String']['input']>;
205
214
  transition: Scalars['String']['input'];
206
215
  };
207
216
  export type AiAgentIdentity = {
@@ -223,9 +232,24 @@ export type AiAgentIdentityInput = {
223
232
  export type AiAgentMetrics = {
224
233
  agentId: Scalars['ID']['output'];
225
234
  answeredTurns: Scalars['Number']['output'];
235
+ /**
236
+ * Turnos que responderam mesmo com uma conexao falha no meio. E a superficie de risco do guardrail de
237
+ * §4.7 — nao prova resposta inventada, mas e onde ela poderia acontecer.
238
+ */
239
+ answeredWithFailedConnectionTurns: Scalars['Number']['output'];
226
240
  avgLlmLatencyMs: Scalars['Number']['output'];
227
241
  avgTurnDurationMs: Scalars['Number']['output'];
242
+ /** Turnos cuja resposta foi bloqueada na validacao antes do envio. */
243
+ blockedTurns: Scalars['Number']['output'];
244
+ blocksByCategory: Array<AiAgentMetricsCount>;
228
245
  budgetExceededTurns: Scalars['Number']['output'];
246
+ /**
247
+ * Entrada servida pelo cache do proprio provedor: quanto do contexto nao foi pago a preco cheio.
248
+ * Provedor que nao reporta cache vale zero.
249
+ */
250
+ cachedInputTokens: Scalars['Number']['output'];
251
+ /** Turnos respondidos pelo cache, sem chamada ao modelo. E o ganho da otimizacao de §4.9. */
252
+ cachedTurns: Scalars['Number']['output'];
229
253
  conversations: Scalars['Number']['output'];
230
254
  /**
231
255
  * Conversas em que algum turno **pediu** uma pessoa. Pedido, nao confirmacao: o disparo da transicao
@@ -242,6 +266,20 @@ export type AiAgentMetrics = {
242
266
  conversationsResolved: Scalars['Number']['output'];
243
267
  /** Gasto da janela em micro-dolar (1e-6 USD), inteiro. */
244
268
  costMicroUsd: Scalars['Number']['output'];
269
+ /**
270
+ * Gasto da janela dividido pelas conversas resolvidas, em micro-dolar. **Ausente** quando nenhuma
271
+ * conversa resolveu no periodo — dividir por zero nao vira zero.
272
+ */
273
+ costMicroUsdPerResolvedConversation?: Maybe<Scalars['Number']['output']>;
274
+ /**
275
+ * Escalonou, mas a transicao nao tem destino declarado. Fica a parte de proposito: somar a um dos
276
+ * dois lados seria supor para onde o fluxo do tenant leva.
277
+ */
278
+ escalatedTargetUndeclared: Scalars['Number']['output'];
279
+ /** Escalonamentos cujo destino o autor declarou como fluxo. */
280
+ escalatedToFlow: Scalars['Number']['output'];
281
+ /** Escalonamentos cujo destino o autor declarou como pessoa. */
282
+ escalatedToHuman: Scalars['Number']['output'];
245
283
  from: Scalars['Number']['output'];
246
284
  haltReasons: Array<AiAgentMetricsCount>;
247
285
  haltedTurns: Scalars['Number']['output'];
@@ -272,11 +310,22 @@ export type AiAgentMetrics = {
272
310
  toolErrorsByClass: Array<AiAgentMetricsCount>;
273
311
  /** Falhas por conexao externa, identificada pelo host — responde "qual integracao esta caindo". */
274
312
  toolErrorsByConnection: Array<AiAgentMetricsCount>;
313
+ /** Assuntos mais frequentes da janela, escolhidos no conjunto fechado do `can` de cada agente. */
314
+ topTopics: Array<AiAgentMetricsCount>;
315
+ /** As perguntas mais frequentes sem resposta, agrupadas por texto normalizado. */
316
+ topUnansweredQuestions: Array<AiAgentMetricsCount>;
275
317
  totalTokens: Scalars['Number']['output'];
276
318
  /** true quando o teto de leitura foi atingido: os numeros cobrem parte do periodo. */
277
319
  truncated: Scalars['Boolean']['output'];
278
320
  turns: Scalars['Number']['output'];
279
321
  turnsByModel: Array<AiAgentMetricsCount>;
322
+ /**
323
+ * A regra aplicada para contar turno sem resposta, junto do numero, para ele nao ser lido como cada
324
+ * um quiser. Deterministica: qualidade da resposta nao e medivel aqui.
325
+ */
326
+ unansweredDefinition: Scalars['String']['output'];
327
+ /** Turnos sem resposta satisfatoria sob a regra declarada em `unansweredDefinition`. */
328
+ unansweredTurns: Scalars['Number']['output'];
280
329
  /**
281
330
  * Turnos com ao menos uma chamada ao modelo sem preco conhecido. Com isto > 0, `costMicroUsd` e
282
331
  * **piso**, nao total — nao decidir preco sem olhar este numero.
@@ -329,6 +378,26 @@ export type AiAgentRetentionPolicy = {
329
378
  days: AiAgentRetentionDays;
330
379
  masksPersonalData: Scalars['Boolean']['output'];
331
380
  };
381
+ export type AiAgentRoutedExample = {
382
+ /** `high`, `medium` ou `low`. */
383
+ confidence: Scalars['String']['output'];
384
+ message: Scalars['String']['output'];
385
+ score: Scalars['Number']['output'];
386
+ /** Ausente quando nenhum caso de uso reconheceu a mensagem. */
387
+ useCaseId?: Maybe<Scalars['ID']['output']>;
388
+ };
389
+ export type AiAgentRoutingPreview = {
390
+ examples: Array<AiAgentRoutedExample>;
391
+ /** Limiar de confianca alta. */
392
+ high: Scalars['Number']['output'];
393
+ /** Limiar de confianca media; abaixo dele a previa nao aponta caso de uso. */
394
+ medium: Scalars['Number']['output'];
395
+ };
396
+ export type AiAgentRoutingPreviewInput = {
397
+ agentId: Scalars['ID']['input'];
398
+ /** Mensagens que o autor quer testar. Vazio devolve previa vazia, nao erro. */
399
+ examples: Array<Scalars['String']['input']>;
400
+ };
332
401
  export type AiAgentScenario = {
333
402
  description: Scalars['String']['output'];
334
403
  expectations: Array<Scalars['JSON']['output']>;
@@ -517,6 +586,7 @@ export declare enum AppInstanceStatus {
517
586
  Inactive = "Inactive"
518
587
  }
519
588
  export declare enum BudgetExceededAction {
589
+ DegradeModel = "degrade_model",
520
590
  EndWithNotice = "end_with_notice",
521
591
  TransferToHuman = "transfer_to_human"
522
592
  }
@@ -727,6 +797,8 @@ export type Query = {
727
797
  * configurou a propria. Existe para a politica ser verificavel de fora, nao so estar escrita.
728
798
  */
729
799
  aiAgentRetentionPolicy: AiAgentRetentionPolicy;
800
+ /** Onde cada mensagem de exemplo cairia (§5.4). Os limiares saem no resultado: `medium` sem o limiar nao diz nada. */
801
+ aiAgentRoutingPreview: AiAgentRoutingPreview;
730
802
  /**
731
803
  * Os turnos de um atendimento, do primeiro ao ultimo. E o que responde "o que aconteceu nesta
732
804
  * conversa" sem depender de ler o DynamoDB por fora.
@@ -767,6 +839,9 @@ export type QueryAiAgentMetricsArgs = {
767
839
  export type QueryAiAgentMetricsByAgentArgs = {
768
840
  input: AiAgentMetricsWindowInput;
769
841
  };
842
+ export type QueryAiAgentRoutingPreviewArgs = {
843
+ input: AiAgentRoutingPreviewInput;
844
+ };
770
845
  export type QueryAiAgentTraceArgs = {
771
846
  sessionId: Scalars['ID']['input'];
772
847
  };
@@ -935,12 +1010,14 @@ export declare enum ToolParameterType {
935
1010
  String = "string"
936
1011
  }
937
1012
  export declare enum Typenames {
1013
+ AiAgentAnswerCache = "AiAgentAnswerCache",
938
1014
  AiAgentApproval = "AiAgentApproval",
939
1015
  AiAgentEvalReport = "AiAgentEvalReport",
940
1016
  AiAgentProcedure = "AiAgentProcedure",
941
1017
  AiAgentRetentionPolicy = "AiAgentRetentionPolicy",
942
1018
  AiAgentScenario = "AiAgentScenario",
943
1019
  AiAgentSession = "AiAgentSession",
1020
+ AiAgentSpend = "AiAgentSpend",
944
1021
  AiAgentTool = "AiAgentTool",
945
1022
  AiAgentTrace = "AiAgentTrace",
946
1023
  AiAgentUseCase = "AiAgentUseCase",
@@ -968,6 +1045,14 @@ export type UpdateQnAInstanceInput = {
968
1045
  };
969
1046
  export type AiAgentSummaryFragment = Pick<AiAgentSummary, 'agentId' | 'name' | 'liveVersion' | 'channels' | 'updatedAt' | 'queuedApprovals' | 'status'>;
970
1047
  export type AiAgentVersionFragment = Pick<AiAgentVersion, 'agentId' | 'version' | 'status' | 'createdAt'>;
1048
+ export type AiAgentSpecFragment = (Pick<AiAgentSpec, 'can' | 'cannot' | 'knowledgeBaseIds' | 'knowledgeFallback' | 'toolIds' | 'channels'> & {
1049
+ identity: Pick<AiAgentIdentity, 'displayName' | 'role' | 'tone' | 'toneNotes' | 'openingMessage' | 'outOfScopeBehaviour'>;
1050
+ budget: Pick<AiAgentBudget, 'maxSteps' | 'maxToolCalls' | 'maxTokens' | 'maxCostMicroUsd' | 'maxPeriodCostMicroUsd' | 'onExceeded'>;
1051
+ handoff?: Maybe<Pick<AiAgentHandoff, 'transition' | 'target'>>;
1052
+ });
1053
+ export type AiAgentVersionWithSpecFragment = (Pick<AiAgentVersion, 'agentId' | 'version' | 'status' | 'createdAt'> & {
1054
+ spec: AiAgentSpecFragment;
1055
+ });
971
1056
  export type AiAgentListingMetricsFragment = Pick<AiAgentMetrics, 'agentId' | 'conversations' | 'conversationsResolved' | 'conversationsHandoffRequested' | 'resolutionRate' | 'resolutionDefinition' | 'costMicroUsd'>;
972
1057
  export type ListAiAgentsQueryVariables = Exact<{
973
1058
  [key: string]: never;
@@ -1021,6 +1106,142 @@ export type RemoveAiAgentMutationVariables = Exact<{
1021
1106
  input: AiAgentRefInput;
1022
1107
  }>;
1023
1108
  export type RemoveAiAgentMutation = Pick<Mutation, 'removeAiAgent'>;
1109
+ export type AiAgentUseCaseFragment = Pick<AiAgentUseCase, 'id' | 'name' | 'subjectDescription' | 'procedureId' | 'status' | 'updatedAt'>;
1110
+ export type AiAgentProcedureFragment = Pick<AiAgentProcedure, 'id' | 'name' | 'guidanceSteps' | 'toolIds' | 'contingency' | 'executionAutonomy' | 'status' | 'updatedAt'>;
1111
+ export type AiAgentToolFragment = (Pick<AiAgentTool, 'toolId' | 'name' | 'description' | 'effect' | 'availability' | 'requiresAuthenticatedCustomer' | 'onFailure' | 'customerScope' | 'returns' | 'approval'> & {
1112
+ parameters: Array<Pick<AiAgentToolParameter, 'name' | 'type' | 'required' | 'description' | 'grounding'>>;
1113
+ });
1114
+ export type AiAgentTraceFragment = (Pick<AiAgentTrace, 'sessionId' | 'turn' | 'agentId' | 'agentVersion' | 'input' | 'promptBuilderVersion' | 'masterRuleVersion' | 'identificationRequired' | 'promptFingerprint' | 'knowledgeOrigins' | 'outcome' | 'haltReason' | 'steps' | 'answer' | 'startedAt'> & {
1115
+ toolCalls: Array<Pick<AiAgentTracedToolCall, 'toolId' | 'name' | 'result' | 'ok' | 'connection' | 'errorClass'>>;
1116
+ });
1117
+ export type AiAgentScenarioFragment = Pick<AiAgentScenario, 'scenarioId' | 'description' | 'turns' | 'expectations'>;
1118
+ export type ListAiAgentUseCasesQueryVariables = Exact<{
1119
+ agentId: Scalars['ID']['input'];
1120
+ }>;
1121
+ export type ListAiAgentUseCasesQuery = {
1122
+ listAiAgentUseCases: Array<AiAgentUseCaseFragment>;
1123
+ };
1124
+ export type ListAiAgentProceduresQueryVariables = Exact<{
1125
+ agentId: Scalars['ID']['input'];
1126
+ }>;
1127
+ export type ListAiAgentProceduresQuery = {
1128
+ listAiAgentProcedures: Array<AiAgentProcedureFragment>;
1129
+ };
1130
+ export type ListAiAgentToolsQueryVariables = Exact<{
1131
+ [key: string]: never;
1132
+ }>;
1133
+ export type ListAiAgentToolsQuery = {
1134
+ listAiAgentTools: Array<AiAgentToolFragment>;
1135
+ };
1136
+ export type AiAgentUseCaseOverlapQueryVariables = Exact<{
1137
+ agentId: Scalars['ID']['input'];
1138
+ }>;
1139
+ export type AiAgentUseCaseOverlapQuery = {
1140
+ aiAgentUseCaseOverlap: (Pick<AiAgentUseCaseOverlap, 'threshold'> & {
1141
+ pairs: Array<Pick<AiAgentCompetingPair, 'left' | 'right' | 'score'>>;
1142
+ });
1143
+ };
1144
+ export type AiAgentTraceQueryVariables = Exact<{
1145
+ sessionId: Scalars['ID']['input'];
1146
+ }>;
1147
+ export type AiAgentTraceQuery = {
1148
+ aiAgentTrace: Array<AiAgentTraceFragment>;
1149
+ };
1150
+ export type ListAiAgentScenariosQueryVariables = Exact<{
1151
+ agentId: Scalars['ID']['input'];
1152
+ }>;
1153
+ export type ListAiAgentScenariosQuery = {
1154
+ listAiAgentScenarios: Array<AiAgentScenarioFragment>;
1155
+ };
1156
+ export type AiAgentRetentionPolicyQueryVariables = Exact<{
1157
+ [key: string]: never;
1158
+ }>;
1159
+ export type AiAgentRetentionPolicyQuery = {
1160
+ aiAgentRetentionPolicy: (Pick<AiAgentRetentionPolicy, 'masksPersonalData'> & {
1161
+ days: Pick<AiAgentRetentionDays, 'transcript' | 'session_state' | 'long_term_memory'>;
1162
+ });
1163
+ };
1164
+ export type AiAgentConversationMetricsQueryVariables = Exact<{
1165
+ input: AiAgentMetricsInput;
1166
+ }>;
1167
+ export type AiAgentConversationMetricsQuery = {
1168
+ aiAgentConversationMetrics: Array<Pick<AiAgentConversationMetrics, 'sessionId' | 'channel' | 'turns' | 'startedAt' | 'lastTurnAt' | 'totalTokens' | 'costMicroUsd' | 'durationMs' | 'lastOutcome'>>;
1169
+ };
1170
+ export type AiAgentConversationOutcomeQueryVariables = Exact<{
1171
+ sessionId: Scalars['ID']['input'];
1172
+ }>;
1173
+ export type AiAgentConversationOutcomeQuery = {
1174
+ aiAgentConversationOutcome?: Maybe<Pick<AiAgentConversationOutcome, 'sessionId' | 'agentId' | 'agentVersion' | 'resolution' | 'resolutionDefinition' | 'collectedData' | 'collectedDataAvailable' | 'turns' | 'startedAt' | 'lastTurnAt' | 'haltReason'>>;
1175
+ };
1176
+ export type SaveAiAgentUseCaseMutationVariables = Exact<{
1177
+ input: SaveAiAgentUseCaseInput;
1178
+ }>;
1179
+ export type SaveAiAgentUseCaseMutation = {
1180
+ saveAiAgentUseCase: AiAgentUseCaseFragment;
1181
+ };
1182
+ export type SaveAiAgentProcedureMutationVariables = Exact<{
1183
+ input: SaveAiAgentProcedureInput;
1184
+ }>;
1185
+ export type SaveAiAgentProcedureMutation = {
1186
+ saveAiAgentProcedure: AiAgentProcedureFragment;
1187
+ };
1188
+ export type RemoveAiAgentUseCaseMutationVariables = Exact<{
1189
+ input: AiAgentAuthoringRefInput;
1190
+ }>;
1191
+ export type RemoveAiAgentUseCaseMutation = Pick<Mutation, 'removeAiAgentUseCase'>;
1192
+ export type RemoveAiAgentProcedureMutationVariables = Exact<{
1193
+ input: AiAgentAuthoringRefInput;
1194
+ }>;
1195
+ export type RemoveAiAgentProcedureMutation = Pick<Mutation, 'removeAiAgentProcedure'>;
1196
+ export type ResolveAiAgentApprovalMutationVariables = Exact<{
1197
+ input: ResolveAiAgentApprovalInput;
1198
+ }>;
1199
+ export type ResolveAiAgentApprovalMutation = Pick<Mutation, 'resolveAiAgentApproval'>;
1200
+ export type RegisterAiAgentToolMutationVariables = Exact<{
1201
+ input: RegisterAiAgentToolInput;
1202
+ }>;
1203
+ export type RegisterAiAgentToolMutation = {
1204
+ registerAiAgentTool?: Maybe<AiAgentToolFragment>;
1205
+ };
1206
+ export type UnregisterAiAgentToolMutationVariables = Exact<{
1207
+ input: UnregisterAiAgentToolInput;
1208
+ }>;
1209
+ export type UnregisterAiAgentToolMutation = Pick<Mutation, 'unregisterAiAgentTool'>;
1210
+ export type SaveAiAgentScenarioMutationVariables = Exact<{
1211
+ input: SaveAiAgentScenarioInput;
1212
+ }>;
1213
+ export type SaveAiAgentScenarioMutation = {
1214
+ saveAiAgentScenario?: Maybe<AiAgentScenarioFragment>;
1215
+ };
1216
+ export type CheckAiAgentVersionMutationVariables = Exact<{
1217
+ input: CheckAiAgentVersionInput;
1218
+ }>;
1219
+ export type CheckAiAgentVersionMutation = {
1220
+ checkAiAgentVersion?: Maybe<(Pick<AiAgentCheckResult, 'safeToPublish'> & {
1221
+ reports: Array<Pick<AiAgentScenarioReport, 'scenarioId' | 'runs' | 'passed' | 'rate'>>;
1222
+ regressions: Array<Pick<AiAgentRegression, 'scenarioId' | 'before' | 'after'>>;
1223
+ })>;
1224
+ };
1225
+ export type AiAgentMetricsQueryVariables = Exact<{
1226
+ input: AiAgentMetricsInput;
1227
+ }>;
1228
+ export type AiAgentMetricsQuery = {
1229
+ aiAgentMetrics: AiAgentListingMetricsFragment;
1230
+ };
1231
+ export type AiAgentVersionSpecQueryVariables = Exact<{
1232
+ agentId: Scalars['ID']['input'];
1233
+ }>;
1234
+ export type AiAgentVersionSpecQuery = {
1235
+ listAiAgentVersions: Array<AiAgentVersionWithSpecFragment>;
1236
+ };
1237
+ export type AiAgentRoutingPreviewQueryVariables = Exact<{
1238
+ input: AiAgentRoutingPreviewInput;
1239
+ }>;
1240
+ export type AiAgentRoutingPreviewQuery = {
1241
+ aiAgentRoutingPreview: (Pick<AiAgentRoutingPreview, 'high' | 'medium'> & {
1242
+ examples: Array<Pick<AiAgentRoutedExample, 'message' | 'useCaseId' | 'score' | 'confidence'>>;
1243
+ });
1244
+ };
1024
1245
  export type ExtractImageMetadataMutationVariables = Exact<{
1025
1246
  input: ExtractImageMetadataInput;
1026
1247
  }>;
@@ -1112,7 +1333,14 @@ export type RemoveQnAInstanceMutation = {
1112
1333
  };
1113
1334
  export declare const AiAgentSummaryFragmentDoc = "\n fragment aiAgentSummary on AiAgentSummary {\n agentId\n name\n liveVersion\n channels\n updatedAt\n queuedApprovals\n status\n}\n ";
1114
1335
  export declare const AiAgentVersionFragmentDoc = "\n fragment aiAgentVersion on AiAgentVersion {\n agentId\n version\n status\n createdAt\n}\n ";
1336
+ export declare const AiAgentSpecFragmentDoc = "\n fragment aiAgentSpec on AiAgentSpec {\n identity {\n displayName\n role\n tone\n toneNotes\n openingMessage\n outOfScopeBehaviour\n }\n can\n cannot\n knowledgeBaseIds\n knowledgeFallback\n toolIds\n budget {\n maxSteps\n maxToolCalls\n maxTokens\n maxCostMicroUsd\n maxPeriodCostMicroUsd\n onExceeded\n }\n handoff {\n transition\n target\n }\n channels\n}\n ";
1337
+ export declare const AiAgentVersionWithSpecFragmentDoc = "\n fragment aiAgentVersionWithSpec on AiAgentVersion {\n agentId\n version\n status\n createdAt\n spec {\n ...aiAgentSpec\n }\n}\n ";
1115
1338
  export declare const AiAgentListingMetricsFragmentDoc = "\n fragment aiAgentListingMetrics on AiAgentMetrics {\n agentId\n conversations\n conversationsResolved\n conversationsHandoffRequested\n resolutionRate\n resolutionDefinition\n costMicroUsd\n}\n ";
1339
+ export declare const AiAgentUseCaseFragmentDoc = "\n fragment aiAgentUseCase on AiAgentUseCase {\n id\n name\n subjectDescription\n procedureId\n status\n updatedAt\n}\n ";
1340
+ export declare const AiAgentProcedureFragmentDoc = "\n fragment aiAgentProcedure on AiAgentProcedure {\n id\n name\n guidanceSteps\n toolIds\n contingency\n executionAutonomy\n status\n updatedAt\n}\n ";
1341
+ export declare const AiAgentToolFragmentDoc = "\n fragment aiAgentTool on AiAgentTool {\n toolId\n name\n description\n effect\n availability\n requiresAuthenticatedCustomer\n onFailure\n customerScope\n returns\n approval\n parameters {\n name\n type\n required\n description\n grounding\n }\n}\n ";
1342
+ export declare const AiAgentTraceFragmentDoc = "\n fragment aiAgentTrace on AiAgentTrace {\n sessionId\n turn\n agentId\n agentVersion\n input\n promptBuilderVersion\n masterRuleVersion\n identificationRequired\n promptFingerprint\n knowledgeOrigins\n outcome\n haltReason\n steps\n answer\n startedAt\n toolCalls {\n toolId\n name\n result\n ok\n connection\n errorClass\n }\n}\n ";
1343
+ export declare const AiAgentScenarioFragmentDoc = "\n fragment aiAgentScenario on AiAgentScenario {\n scenarioId\n description\n turns\n expectations\n}\n ";
1116
1344
  export declare const NlpInstanceFragmentDoc = "\n fragment nlpInstance on NlpInstance {\n id\n name\n drn\n options {\n transition\n samples\n }\n createdAt\n updatedAt\n}\n ";
1117
1345
  export declare const QnaFragmentFragmentDoc = "\n fragment qnaFragment on QnAInstance {\n id\n name\n drn\n credentialsId\n tryToReplyOnTransition\n createdAt\n updatedAt\n}\n ";
1118
1346
  export declare const ListAiAgentsDocument = "\n query listAiAgents {\n listAiAgents {\n ...aiAgentSummary\n }\n}\n \n fragment aiAgentSummary on AiAgentSummary {\n agentId\n name\n liveVersion\n channels\n updatedAt\n queuedApprovals\n status\n}\n ";
@@ -1124,6 +1352,27 @@ export declare const UnpublishAiAgentVersionDocument = "\n mutation unpublish
1124
1352
  export declare const RollbackAiAgentVersionDocument = "\n mutation rollbackAiAgentVersion($input: AiAgentVersionRefInput!) {\n rollbackAiAgentVersion(input: $input) {\n ...aiAgentVersion\n }\n}\n \n fragment aiAgentVersion on AiAgentVersion {\n agentId\n version\n status\n createdAt\n}\n ";
1125
1353
  export declare const RemoveAiAgentVersionDocument = "\n mutation removeAiAgentVersion($input: AiAgentVersionRefInput!) {\n removeAiAgentVersion(input: $input) {\n ...aiAgentVersion\n }\n}\n \n fragment aiAgentVersion on AiAgentVersion {\n agentId\n version\n status\n createdAt\n}\n ";
1126
1354
  export declare const RemoveAiAgentDocument = "\n mutation removeAiAgent($input: AiAgentRefInput!) {\n removeAiAgent(input: $input)\n}\n ";
1355
+ export declare const ListAiAgentUseCasesDocument = "\n query listAiAgentUseCases($agentId: ID!) {\n listAiAgentUseCases(agentId: $agentId) {\n ...aiAgentUseCase\n }\n}\n \n fragment aiAgentUseCase on AiAgentUseCase {\n id\n name\n subjectDescription\n procedureId\n status\n updatedAt\n}\n ";
1356
+ export declare const ListAiAgentProceduresDocument = "\n query listAiAgentProcedures($agentId: ID!) {\n listAiAgentProcedures(agentId: $agentId) {\n ...aiAgentProcedure\n }\n}\n \n fragment aiAgentProcedure on AiAgentProcedure {\n id\n name\n guidanceSteps\n toolIds\n contingency\n executionAutonomy\n status\n updatedAt\n}\n ";
1357
+ export declare const ListAiAgentToolsDocument = "\n query listAiAgentTools {\n listAiAgentTools {\n ...aiAgentTool\n }\n}\n \n fragment aiAgentTool on AiAgentTool {\n toolId\n name\n description\n effect\n availability\n requiresAuthenticatedCustomer\n onFailure\n customerScope\n returns\n approval\n parameters {\n name\n type\n required\n description\n grounding\n }\n}\n ";
1358
+ export declare const AiAgentUseCaseOverlapDocument = "\n query aiAgentUseCaseOverlap($agentId: ID!) {\n aiAgentUseCaseOverlap(agentId: $agentId) {\n threshold\n pairs {\n left\n right\n score\n }\n }\n}\n ";
1359
+ export declare const AiAgentTraceDocument = "\n query aiAgentTrace($sessionId: ID!) {\n aiAgentTrace(sessionId: $sessionId) {\n ...aiAgentTrace\n }\n}\n \n fragment aiAgentTrace on AiAgentTrace {\n sessionId\n turn\n agentId\n agentVersion\n input\n promptBuilderVersion\n masterRuleVersion\n identificationRequired\n promptFingerprint\n knowledgeOrigins\n outcome\n haltReason\n steps\n answer\n startedAt\n toolCalls {\n toolId\n name\n result\n ok\n connection\n errorClass\n }\n}\n ";
1360
+ export declare const ListAiAgentScenariosDocument = "\n query listAiAgentScenarios($agentId: ID!) {\n listAiAgentScenarios(agentId: $agentId) {\n ...aiAgentScenario\n }\n}\n \n fragment aiAgentScenario on AiAgentScenario {\n scenarioId\n description\n turns\n expectations\n}\n ";
1361
+ export declare const AiAgentRetentionPolicyDocument = "\n query aiAgentRetentionPolicy {\n aiAgentRetentionPolicy {\n days {\n transcript\n session_state\n long_term_memory\n }\n masksPersonalData\n }\n}\n ";
1362
+ export declare const AiAgentConversationMetricsDocument = "\n query aiAgentConversationMetrics($input: AiAgentMetricsInput!) {\n aiAgentConversationMetrics(input: $input) {\n sessionId\n channel\n turns\n startedAt\n lastTurnAt\n totalTokens\n costMicroUsd\n durationMs\n lastOutcome\n }\n}\n ";
1363
+ export declare const AiAgentConversationOutcomeDocument = "\n query aiAgentConversationOutcome($sessionId: ID!) {\n aiAgentConversationOutcome(sessionId: $sessionId) {\n sessionId\n agentId\n agentVersion\n resolution\n resolutionDefinition\n collectedData\n collectedDataAvailable\n turns\n startedAt\n lastTurnAt\n haltReason\n }\n}\n ";
1364
+ export declare const SaveAiAgentUseCaseDocument = "\n mutation saveAiAgentUseCase($input: SaveAiAgentUseCaseInput!) {\n saveAiAgentUseCase(input: $input) {\n ...aiAgentUseCase\n }\n}\n \n fragment aiAgentUseCase on AiAgentUseCase {\n id\n name\n subjectDescription\n procedureId\n status\n updatedAt\n}\n ";
1365
+ export declare const SaveAiAgentProcedureDocument = "\n mutation saveAiAgentProcedure($input: SaveAiAgentProcedureInput!) {\n saveAiAgentProcedure(input: $input) {\n ...aiAgentProcedure\n }\n}\n \n fragment aiAgentProcedure on AiAgentProcedure {\n id\n name\n guidanceSteps\n toolIds\n contingency\n executionAutonomy\n status\n updatedAt\n}\n ";
1366
+ export declare const RemoveAiAgentUseCaseDocument = "\n mutation removeAiAgentUseCase($input: AiAgentAuthoringRefInput!) {\n removeAiAgentUseCase(input: $input)\n}\n ";
1367
+ export declare const RemoveAiAgentProcedureDocument = "\n mutation removeAiAgentProcedure($input: AiAgentAuthoringRefInput!) {\n removeAiAgentProcedure(input: $input)\n}\n ";
1368
+ export declare const ResolveAiAgentApprovalDocument = "\n mutation resolveAiAgentApproval($input: ResolveAiAgentApprovalInput!) {\n resolveAiAgentApproval(input: $input)\n}\n ";
1369
+ export declare const RegisterAiAgentToolDocument = "\n mutation registerAiAgentTool($input: RegisterAiAgentToolInput!) {\n registerAiAgentTool(input: $input) {\n ...aiAgentTool\n }\n}\n \n fragment aiAgentTool on AiAgentTool {\n toolId\n name\n description\n effect\n availability\n requiresAuthenticatedCustomer\n onFailure\n customerScope\n returns\n approval\n parameters {\n name\n type\n required\n description\n grounding\n }\n}\n ";
1370
+ export declare const UnregisterAiAgentToolDocument = "\n mutation unregisterAiAgentTool($input: UnregisterAiAgentToolInput!) {\n unregisterAiAgentTool(input: $input)\n}\n ";
1371
+ export declare const SaveAiAgentScenarioDocument = "\n mutation saveAiAgentScenario($input: SaveAiAgentScenarioInput!) {\n saveAiAgentScenario(input: $input) {\n ...aiAgentScenario\n }\n}\n \n fragment aiAgentScenario on AiAgentScenario {\n scenarioId\n description\n turns\n expectations\n}\n ";
1372
+ export declare const CheckAiAgentVersionDocument = "\n mutation checkAiAgentVersion($input: CheckAiAgentVersionInput!) {\n checkAiAgentVersion(input: $input) {\n safeToPublish\n reports {\n scenarioId\n runs\n passed\n rate\n }\n regressions {\n scenarioId\n before\n after\n }\n }\n}\n ";
1373
+ export declare const AiAgentMetricsDocument = "\n query aiAgentMetrics($input: AiAgentMetricsInput!) {\n aiAgentMetrics(input: $input) {\n ...aiAgentListingMetrics\n }\n}\n \n fragment aiAgentListingMetrics on AiAgentMetrics {\n agentId\n conversations\n conversationsResolved\n conversationsHandoffRequested\n resolutionRate\n resolutionDefinition\n costMicroUsd\n}\n ";
1374
+ export declare const AiAgentVersionSpecDocument = "\n query aiAgentVersionSpec($agentId: ID!) {\n listAiAgentVersions(agentId: $agentId) {\n ...aiAgentVersionWithSpec\n }\n}\n \n fragment aiAgentVersionWithSpec on AiAgentVersion {\n agentId\n version\n status\n createdAt\n spec {\n ...aiAgentSpec\n }\n}\n \n\n fragment aiAgentSpec on AiAgentSpec {\n identity {\n displayName\n role\n tone\n toneNotes\n openingMessage\n outOfScopeBehaviour\n }\n can\n cannot\n knowledgeBaseIds\n knowledgeFallback\n toolIds\n budget {\n maxSteps\n maxToolCalls\n maxTokens\n maxCostMicroUsd\n maxPeriodCostMicroUsd\n onExceeded\n }\n handoff {\n transition\n target\n }\n channels\n}\n ";
1375
+ export declare const AiAgentRoutingPreviewDocument = "\n query aiAgentRoutingPreview($input: AiAgentRoutingPreviewInput!) {\n aiAgentRoutingPreview(input: $input) {\n high\n medium\n examples {\n message\n useCaseId\n score\n confidence\n }\n }\n}\n ";
1127
1376
  export declare const ExtractImageMetadataDocument = "\n mutation extractImageMetadata($input: ExtractImageMetadataInput!) {\n extractImageMetadata(input: $input) {\n success\n model\n extractedMetadata\n tokenUsage {\n prompt\n completion\n total\n }\n }\n}\n ";
1128
1377
  export declare const GetNlpInstanceDocument = "\n query getNlpInstance($id: ID!) {\n getNlpInstance(id: $id) {\n ...nlpInstance\n }\n}\n \n fragment nlpInstance on NlpInstance {\n id\n name\n drn\n options {\n transition\n samples\n }\n createdAt\n updatedAt\n}\n ";
1129
1378
  export declare const ListNlpInstancesDocument = "\n query listNlpInstances {\n listNlpInstances {\n ...nlpInstance\n }\n}\n \n fragment nlpInstance on NlpInstance {\n id\n name\n drn\n options {\n transition\n samples\n }\n createdAt\n updatedAt\n}\n ";
@@ -1148,6 +1397,27 @@ export declare function getSdk<C>(requester: Requester<C>): {
1148
1397
  rollbackAiAgentVersion(variables: RollbackAiAgentVersionMutationVariables, options?: C): Promise<RollbackAiAgentVersionMutation>;
1149
1398
  removeAiAgentVersion(variables: RemoveAiAgentVersionMutationVariables, options?: C): Promise<RemoveAiAgentVersionMutation>;
1150
1399
  removeAiAgent(variables: RemoveAiAgentMutationVariables, options?: C): Promise<RemoveAiAgentMutation>;
1400
+ listAiAgentUseCases(variables: ListAiAgentUseCasesQueryVariables, options?: C): Promise<ListAiAgentUseCasesQuery>;
1401
+ listAiAgentProcedures(variables: ListAiAgentProceduresQueryVariables, options?: C): Promise<ListAiAgentProceduresQuery>;
1402
+ listAiAgentTools(variables?: ListAiAgentToolsQueryVariables, options?: C): Promise<ListAiAgentToolsQuery>;
1403
+ aiAgentUseCaseOverlap(variables: AiAgentUseCaseOverlapQueryVariables, options?: C): Promise<AiAgentUseCaseOverlapQuery>;
1404
+ aiAgentTrace(variables: AiAgentTraceQueryVariables, options?: C): Promise<AiAgentTraceQuery>;
1405
+ listAiAgentScenarios(variables: ListAiAgentScenariosQueryVariables, options?: C): Promise<ListAiAgentScenariosQuery>;
1406
+ aiAgentRetentionPolicy(variables?: AiAgentRetentionPolicyQueryVariables, options?: C): Promise<AiAgentRetentionPolicyQuery>;
1407
+ aiAgentConversationMetrics(variables: AiAgentConversationMetricsQueryVariables, options?: C): Promise<AiAgentConversationMetricsQuery>;
1408
+ aiAgentConversationOutcome(variables: AiAgentConversationOutcomeQueryVariables, options?: C): Promise<AiAgentConversationOutcomeQuery>;
1409
+ saveAiAgentUseCase(variables: SaveAiAgentUseCaseMutationVariables, options?: C): Promise<SaveAiAgentUseCaseMutation>;
1410
+ saveAiAgentProcedure(variables: SaveAiAgentProcedureMutationVariables, options?: C): Promise<SaveAiAgentProcedureMutation>;
1411
+ removeAiAgentUseCase(variables: RemoveAiAgentUseCaseMutationVariables, options?: C): Promise<RemoveAiAgentUseCaseMutation>;
1412
+ removeAiAgentProcedure(variables: RemoveAiAgentProcedureMutationVariables, options?: C): Promise<RemoveAiAgentProcedureMutation>;
1413
+ resolveAiAgentApproval(variables: ResolveAiAgentApprovalMutationVariables, options?: C): Promise<ResolveAiAgentApprovalMutation>;
1414
+ registerAiAgentTool(variables: RegisterAiAgentToolMutationVariables, options?: C): Promise<RegisterAiAgentToolMutation>;
1415
+ unregisterAiAgentTool(variables: UnregisterAiAgentToolMutationVariables, options?: C): Promise<UnregisterAiAgentToolMutation>;
1416
+ saveAiAgentScenario(variables: SaveAiAgentScenarioMutationVariables, options?: C): Promise<SaveAiAgentScenarioMutation>;
1417
+ checkAiAgentVersion(variables: CheckAiAgentVersionMutationVariables, options?: C): Promise<CheckAiAgentVersionMutation>;
1418
+ aiAgentMetrics(variables: AiAgentMetricsQueryVariables, options?: C): Promise<AiAgentMetricsQuery>;
1419
+ aiAgentVersionSpec(variables: AiAgentVersionSpecQueryVariables, options?: C): Promise<AiAgentVersionSpecQuery>;
1420
+ aiAgentRoutingPreview(variables: AiAgentRoutingPreviewQueryVariables, options?: C): Promise<AiAgentRoutingPreviewQuery>;
1151
1421
  extractImageMetadata(variables: ExtractImageMetadataMutationVariables, options?: C): Promise<ExtractImageMetadataMutation>;
1152
1422
  getNlpInstance(variables: GetNlpInstanceQueryVariables, options?: C): Promise<GetNlpInstanceQuery>;
1153
1423
  listNlpInstances(variables?: ListNlpInstancesQueryVariables, options?: C): Promise<ListNlpInstancesQuery>;
package/src/sdks/ai.js CHANGED
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  /* istanbul ignore file */
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.serviceName = exports.RemoveQnAInstanceDocument = exports.UpdateQnAInstanceDocument = exports.CreateQnAInstanceDocument = exports.TestQnAInstanceDocument = exports.ListQnAInstancesDocument = exports.GetQnAInstanceDocument = exports.TestNlpInstanceDocument = exports.RemoveNlpInstanceDocument = exports.UpdateNlpInstanceDocument = exports.CreateNlpInstanceDocument = exports.ListNlpInstancesDocument = exports.GetNlpInstanceDocument = exports.ExtractImageMetadataDocument = exports.RemoveAiAgentDocument = exports.RemoveAiAgentVersionDocument = exports.RollbackAiAgentVersionDocument = exports.UnpublishAiAgentVersionDocument = exports.PublishAiAgentVersionDocument = exports.DraftAiAgentDocument = exports.AiAgentMetricsByAgentDocument = exports.ListAiAgentVersionsDocument = exports.ListAiAgentsDocument = exports.QnaFragmentFragmentDoc = exports.NlpInstanceFragmentDoc = exports.AiAgentListingMetricsFragmentDoc = exports.AiAgentVersionFragmentDoc = exports.AiAgentSummaryFragmentDoc = exports.Typenames = exports.ToolParameterType = exports.ToolEffect = exports.ToolAvailability = exports.TonePreset = exports.ParameterGrounding = exports.Can = exports.BudgetExceededAction = exports.AppInstanceStatus = exports.AiAgentVersionStatus = void 0;
4
+ exports.AiAgentMetricsDocument = exports.CheckAiAgentVersionDocument = exports.SaveAiAgentScenarioDocument = exports.UnregisterAiAgentToolDocument = exports.RegisterAiAgentToolDocument = exports.ResolveAiAgentApprovalDocument = exports.RemoveAiAgentProcedureDocument = exports.RemoveAiAgentUseCaseDocument = exports.SaveAiAgentProcedureDocument = exports.SaveAiAgentUseCaseDocument = exports.AiAgentConversationOutcomeDocument = exports.AiAgentConversationMetricsDocument = exports.AiAgentRetentionPolicyDocument = exports.ListAiAgentScenariosDocument = exports.AiAgentTraceDocument = exports.AiAgentUseCaseOverlapDocument = exports.ListAiAgentToolsDocument = exports.ListAiAgentProceduresDocument = exports.ListAiAgentUseCasesDocument = exports.RemoveAiAgentDocument = exports.RemoveAiAgentVersionDocument = exports.RollbackAiAgentVersionDocument = exports.UnpublishAiAgentVersionDocument = exports.PublishAiAgentVersionDocument = exports.DraftAiAgentDocument = exports.AiAgentMetricsByAgentDocument = exports.ListAiAgentVersionsDocument = exports.ListAiAgentsDocument = exports.QnaFragmentFragmentDoc = exports.NlpInstanceFragmentDoc = exports.AiAgentScenarioFragmentDoc = exports.AiAgentTraceFragmentDoc = exports.AiAgentToolFragmentDoc = exports.AiAgentProcedureFragmentDoc = exports.AiAgentUseCaseFragmentDoc = exports.AiAgentListingMetricsFragmentDoc = exports.AiAgentVersionWithSpecFragmentDoc = exports.AiAgentSpecFragmentDoc = exports.AiAgentVersionFragmentDoc = exports.AiAgentSummaryFragmentDoc = exports.Typenames = exports.ToolParameterType = exports.ToolEffect = exports.ToolAvailability = exports.TonePreset = exports.ParameterGrounding = exports.Can = exports.BudgetExceededAction = exports.AppInstanceStatus = exports.AiAgentVersionStatus = void 0;
5
+ exports.serviceName = exports.RemoveQnAInstanceDocument = exports.UpdateQnAInstanceDocument = exports.CreateQnAInstanceDocument = exports.TestQnAInstanceDocument = exports.ListQnAInstancesDocument = exports.GetQnAInstanceDocument = exports.TestNlpInstanceDocument = exports.RemoveNlpInstanceDocument = exports.UpdateNlpInstanceDocument = exports.CreateNlpInstanceDocument = exports.ListNlpInstancesDocument = exports.GetNlpInstanceDocument = exports.ExtractImageMetadataDocument = exports.AiAgentRoutingPreviewDocument = exports.AiAgentVersionSpecDocument = void 0;
5
6
  exports.getSdk = getSdk;
6
7
  var AiAgentVersionStatus;
7
8
  (function (AiAgentVersionStatus) {
@@ -18,6 +19,7 @@ var AppInstanceStatus;
18
19
  })(AppInstanceStatus || (exports.AppInstanceStatus = AppInstanceStatus = {}));
19
20
  var BudgetExceededAction;
20
21
  (function (BudgetExceededAction) {
22
+ BudgetExceededAction["DegradeModel"] = "degrade_model";
21
23
  BudgetExceededAction["EndWithNotice"] = "end_with_notice";
22
24
  BudgetExceededAction["TransferToHuman"] = "transfer_to_human";
23
25
  })(BudgetExceededAction || (exports.BudgetExceededAction = BudgetExceededAction = {}));
@@ -59,12 +61,14 @@ var ToolParameterType;
59
61
  })(ToolParameterType || (exports.ToolParameterType = ToolParameterType = {}));
60
62
  var Typenames;
61
63
  (function (Typenames) {
64
+ Typenames["AiAgentAnswerCache"] = "AiAgentAnswerCache";
62
65
  Typenames["AiAgentApproval"] = "AiAgentApproval";
63
66
  Typenames["AiAgentEvalReport"] = "AiAgentEvalReport";
64
67
  Typenames["AiAgentProcedure"] = "AiAgentProcedure";
65
68
  Typenames["AiAgentRetentionPolicy"] = "AiAgentRetentionPolicy";
66
69
  Typenames["AiAgentScenario"] = "AiAgentScenario";
67
70
  Typenames["AiAgentSession"] = "AiAgentSession";
71
+ Typenames["AiAgentSpend"] = "AiAgentSpend";
68
72
  Typenames["AiAgentTool"] = "AiAgentTool";
69
73
  Typenames["AiAgentTrace"] = "AiAgentTrace";
70
74
  Typenames["AiAgentUseCase"] = "AiAgentUseCase";
@@ -95,6 +99,47 @@ exports.AiAgentVersionFragmentDoc = `
95
99
  createdAt
96
100
  }
97
101
  `;
102
+ exports.AiAgentSpecFragmentDoc = `
103
+ fragment aiAgentSpec on AiAgentSpec {
104
+ identity {
105
+ displayName
106
+ role
107
+ tone
108
+ toneNotes
109
+ openingMessage
110
+ outOfScopeBehaviour
111
+ }
112
+ can
113
+ cannot
114
+ knowledgeBaseIds
115
+ knowledgeFallback
116
+ toolIds
117
+ budget {
118
+ maxSteps
119
+ maxToolCalls
120
+ maxTokens
121
+ maxCostMicroUsd
122
+ maxPeriodCostMicroUsd
123
+ onExceeded
124
+ }
125
+ handoff {
126
+ transition
127
+ target
128
+ }
129
+ channels
130
+ }
131
+ `;
132
+ exports.AiAgentVersionWithSpecFragmentDoc = `
133
+ fragment aiAgentVersionWithSpec on AiAgentVersion {
134
+ agentId
135
+ version
136
+ status
137
+ createdAt
138
+ spec {
139
+ ...aiAgentSpec
140
+ }
141
+ }
142
+ `;
98
143
  exports.AiAgentListingMetricsFragmentDoc = `
99
144
  fragment aiAgentListingMetrics on AiAgentMetrics {
100
145
  agentId
@@ -106,6 +151,84 @@ exports.AiAgentListingMetricsFragmentDoc = `
106
151
  costMicroUsd
107
152
  }
108
153
  `;
154
+ exports.AiAgentUseCaseFragmentDoc = `
155
+ fragment aiAgentUseCase on AiAgentUseCase {
156
+ id
157
+ name
158
+ subjectDescription
159
+ procedureId
160
+ status
161
+ updatedAt
162
+ }
163
+ `;
164
+ exports.AiAgentProcedureFragmentDoc = `
165
+ fragment aiAgentProcedure on AiAgentProcedure {
166
+ id
167
+ name
168
+ guidanceSteps
169
+ toolIds
170
+ contingency
171
+ executionAutonomy
172
+ status
173
+ updatedAt
174
+ }
175
+ `;
176
+ exports.AiAgentToolFragmentDoc = `
177
+ fragment aiAgentTool on AiAgentTool {
178
+ toolId
179
+ name
180
+ description
181
+ effect
182
+ availability
183
+ requiresAuthenticatedCustomer
184
+ onFailure
185
+ customerScope
186
+ returns
187
+ approval
188
+ parameters {
189
+ name
190
+ type
191
+ required
192
+ description
193
+ grounding
194
+ }
195
+ }
196
+ `;
197
+ exports.AiAgentTraceFragmentDoc = `
198
+ fragment aiAgentTrace on AiAgentTrace {
199
+ sessionId
200
+ turn
201
+ agentId
202
+ agentVersion
203
+ input
204
+ promptBuilderVersion
205
+ masterRuleVersion
206
+ identificationRequired
207
+ promptFingerprint
208
+ knowledgeOrigins
209
+ outcome
210
+ haltReason
211
+ steps
212
+ answer
213
+ startedAt
214
+ toolCalls {
215
+ toolId
216
+ name
217
+ result
218
+ ok
219
+ connection
220
+ errorClass
221
+ }
222
+ }
223
+ `;
224
+ exports.AiAgentScenarioFragmentDoc = `
225
+ fragment aiAgentScenario on AiAgentScenario {
226
+ scenarioId
227
+ description
228
+ turns
229
+ expectations
230
+ }
231
+ `;
109
232
  exports.NlpInstanceFragmentDoc = `
110
233
  fragment nlpInstance on NlpInstance {
111
234
  id
@@ -191,6 +314,192 @@ exports.RemoveAiAgentDocument = `
191
314
  removeAiAgent(input: $input)
192
315
  }
193
316
  `;
317
+ exports.ListAiAgentUseCasesDocument = `
318
+ query listAiAgentUseCases($agentId: ID!) {
319
+ listAiAgentUseCases(agentId: $agentId) {
320
+ ...aiAgentUseCase
321
+ }
322
+ }
323
+ ${exports.AiAgentUseCaseFragmentDoc}`;
324
+ exports.ListAiAgentProceduresDocument = `
325
+ query listAiAgentProcedures($agentId: ID!) {
326
+ listAiAgentProcedures(agentId: $agentId) {
327
+ ...aiAgentProcedure
328
+ }
329
+ }
330
+ ${exports.AiAgentProcedureFragmentDoc}`;
331
+ exports.ListAiAgentToolsDocument = `
332
+ query listAiAgentTools {
333
+ listAiAgentTools {
334
+ ...aiAgentTool
335
+ }
336
+ }
337
+ ${exports.AiAgentToolFragmentDoc}`;
338
+ exports.AiAgentUseCaseOverlapDocument = `
339
+ query aiAgentUseCaseOverlap($agentId: ID!) {
340
+ aiAgentUseCaseOverlap(agentId: $agentId) {
341
+ threshold
342
+ pairs {
343
+ left
344
+ right
345
+ score
346
+ }
347
+ }
348
+ }
349
+ `;
350
+ exports.AiAgentTraceDocument = `
351
+ query aiAgentTrace($sessionId: ID!) {
352
+ aiAgentTrace(sessionId: $sessionId) {
353
+ ...aiAgentTrace
354
+ }
355
+ }
356
+ ${exports.AiAgentTraceFragmentDoc}`;
357
+ exports.ListAiAgentScenariosDocument = `
358
+ query listAiAgentScenarios($agentId: ID!) {
359
+ listAiAgentScenarios(agentId: $agentId) {
360
+ ...aiAgentScenario
361
+ }
362
+ }
363
+ ${exports.AiAgentScenarioFragmentDoc}`;
364
+ exports.AiAgentRetentionPolicyDocument = `
365
+ query aiAgentRetentionPolicy {
366
+ aiAgentRetentionPolicy {
367
+ days {
368
+ transcript
369
+ session_state
370
+ long_term_memory
371
+ }
372
+ masksPersonalData
373
+ }
374
+ }
375
+ `;
376
+ exports.AiAgentConversationMetricsDocument = `
377
+ query aiAgentConversationMetrics($input: AiAgentMetricsInput!) {
378
+ aiAgentConversationMetrics(input: $input) {
379
+ sessionId
380
+ channel
381
+ turns
382
+ startedAt
383
+ lastTurnAt
384
+ totalTokens
385
+ costMicroUsd
386
+ durationMs
387
+ lastOutcome
388
+ }
389
+ }
390
+ `;
391
+ exports.AiAgentConversationOutcomeDocument = `
392
+ query aiAgentConversationOutcome($sessionId: ID!) {
393
+ aiAgentConversationOutcome(sessionId: $sessionId) {
394
+ sessionId
395
+ agentId
396
+ agentVersion
397
+ resolution
398
+ resolutionDefinition
399
+ collectedData
400
+ collectedDataAvailable
401
+ turns
402
+ startedAt
403
+ lastTurnAt
404
+ haltReason
405
+ }
406
+ }
407
+ `;
408
+ exports.SaveAiAgentUseCaseDocument = `
409
+ mutation saveAiAgentUseCase($input: SaveAiAgentUseCaseInput!) {
410
+ saveAiAgentUseCase(input: $input) {
411
+ ...aiAgentUseCase
412
+ }
413
+ }
414
+ ${exports.AiAgentUseCaseFragmentDoc}`;
415
+ exports.SaveAiAgentProcedureDocument = `
416
+ mutation saveAiAgentProcedure($input: SaveAiAgentProcedureInput!) {
417
+ saveAiAgentProcedure(input: $input) {
418
+ ...aiAgentProcedure
419
+ }
420
+ }
421
+ ${exports.AiAgentProcedureFragmentDoc}`;
422
+ exports.RemoveAiAgentUseCaseDocument = `
423
+ mutation removeAiAgentUseCase($input: AiAgentAuthoringRefInput!) {
424
+ removeAiAgentUseCase(input: $input)
425
+ }
426
+ `;
427
+ exports.RemoveAiAgentProcedureDocument = `
428
+ mutation removeAiAgentProcedure($input: AiAgentAuthoringRefInput!) {
429
+ removeAiAgentProcedure(input: $input)
430
+ }
431
+ `;
432
+ exports.ResolveAiAgentApprovalDocument = `
433
+ mutation resolveAiAgentApproval($input: ResolveAiAgentApprovalInput!) {
434
+ resolveAiAgentApproval(input: $input)
435
+ }
436
+ `;
437
+ exports.RegisterAiAgentToolDocument = `
438
+ mutation registerAiAgentTool($input: RegisterAiAgentToolInput!) {
439
+ registerAiAgentTool(input: $input) {
440
+ ...aiAgentTool
441
+ }
442
+ }
443
+ ${exports.AiAgentToolFragmentDoc}`;
444
+ exports.UnregisterAiAgentToolDocument = `
445
+ mutation unregisterAiAgentTool($input: UnregisterAiAgentToolInput!) {
446
+ unregisterAiAgentTool(input: $input)
447
+ }
448
+ `;
449
+ exports.SaveAiAgentScenarioDocument = `
450
+ mutation saveAiAgentScenario($input: SaveAiAgentScenarioInput!) {
451
+ saveAiAgentScenario(input: $input) {
452
+ ...aiAgentScenario
453
+ }
454
+ }
455
+ ${exports.AiAgentScenarioFragmentDoc}`;
456
+ exports.CheckAiAgentVersionDocument = `
457
+ mutation checkAiAgentVersion($input: CheckAiAgentVersionInput!) {
458
+ checkAiAgentVersion(input: $input) {
459
+ safeToPublish
460
+ reports {
461
+ scenarioId
462
+ runs
463
+ passed
464
+ rate
465
+ }
466
+ regressions {
467
+ scenarioId
468
+ before
469
+ after
470
+ }
471
+ }
472
+ }
473
+ `;
474
+ exports.AiAgentMetricsDocument = `
475
+ query aiAgentMetrics($input: AiAgentMetricsInput!) {
476
+ aiAgentMetrics(input: $input) {
477
+ ...aiAgentListingMetrics
478
+ }
479
+ }
480
+ ${exports.AiAgentListingMetricsFragmentDoc}`;
481
+ exports.AiAgentVersionSpecDocument = `
482
+ query aiAgentVersionSpec($agentId: ID!) {
483
+ listAiAgentVersions(agentId: $agentId) {
484
+ ...aiAgentVersionWithSpec
485
+ }
486
+ }
487
+ ${exports.AiAgentVersionWithSpecFragmentDoc}
488
+ ${exports.AiAgentSpecFragmentDoc}`;
489
+ exports.AiAgentRoutingPreviewDocument = `
490
+ query aiAgentRoutingPreview($input: AiAgentRoutingPreviewInput!) {
491
+ aiAgentRoutingPreview(input: $input) {
492
+ high
493
+ medium
494
+ examples {
495
+ message
496
+ useCaseId
497
+ score
498
+ confidence
499
+ }
500
+ }
501
+ }
502
+ `;
194
503
  exports.ExtractImageMetadataDocument = `
195
504
  mutation extractImageMetadata($input: ExtractImageMetadataInput!) {
196
505
  extractImageMetadata(input: $input) {
@@ -325,6 +634,69 @@ function getSdk(requester) {
325
634
  removeAiAgent(variables, options) {
326
635
  return requester(exports.RemoveAiAgentDocument, variables, options);
327
636
  },
637
+ listAiAgentUseCases(variables, options) {
638
+ return requester(exports.ListAiAgentUseCasesDocument, variables, options);
639
+ },
640
+ listAiAgentProcedures(variables, options) {
641
+ return requester(exports.ListAiAgentProceduresDocument, variables, options);
642
+ },
643
+ listAiAgentTools(variables, options) {
644
+ return requester(exports.ListAiAgentToolsDocument, variables, options);
645
+ },
646
+ aiAgentUseCaseOverlap(variables, options) {
647
+ return requester(exports.AiAgentUseCaseOverlapDocument, variables, options);
648
+ },
649
+ aiAgentTrace(variables, options) {
650
+ return requester(exports.AiAgentTraceDocument, variables, options);
651
+ },
652
+ listAiAgentScenarios(variables, options) {
653
+ return requester(exports.ListAiAgentScenariosDocument, variables, options);
654
+ },
655
+ aiAgentRetentionPolicy(variables, options) {
656
+ return requester(exports.AiAgentRetentionPolicyDocument, variables, options);
657
+ },
658
+ aiAgentConversationMetrics(variables, options) {
659
+ return requester(exports.AiAgentConversationMetricsDocument, variables, options);
660
+ },
661
+ aiAgentConversationOutcome(variables, options) {
662
+ return requester(exports.AiAgentConversationOutcomeDocument, variables, options);
663
+ },
664
+ saveAiAgentUseCase(variables, options) {
665
+ return requester(exports.SaveAiAgentUseCaseDocument, variables, options);
666
+ },
667
+ saveAiAgentProcedure(variables, options) {
668
+ return requester(exports.SaveAiAgentProcedureDocument, variables, options);
669
+ },
670
+ removeAiAgentUseCase(variables, options) {
671
+ return requester(exports.RemoveAiAgentUseCaseDocument, variables, options);
672
+ },
673
+ removeAiAgentProcedure(variables, options) {
674
+ return requester(exports.RemoveAiAgentProcedureDocument, variables, options);
675
+ },
676
+ resolveAiAgentApproval(variables, options) {
677
+ return requester(exports.ResolveAiAgentApprovalDocument, variables, options);
678
+ },
679
+ registerAiAgentTool(variables, options) {
680
+ return requester(exports.RegisterAiAgentToolDocument, variables, options);
681
+ },
682
+ unregisterAiAgentTool(variables, options) {
683
+ return requester(exports.UnregisterAiAgentToolDocument, variables, options);
684
+ },
685
+ saveAiAgentScenario(variables, options) {
686
+ return requester(exports.SaveAiAgentScenarioDocument, variables, options);
687
+ },
688
+ checkAiAgentVersion(variables, options) {
689
+ return requester(exports.CheckAiAgentVersionDocument, variables, options);
690
+ },
691
+ aiAgentMetrics(variables, options) {
692
+ return requester(exports.AiAgentMetricsDocument, variables, options);
693
+ },
694
+ aiAgentVersionSpec(variables, options) {
695
+ return requester(exports.AiAgentVersionSpecDocument, variables, options);
696
+ },
697
+ aiAgentRoutingPreview(variables, options) {
698
+ return requester(exports.AiAgentRoutingPreviewDocument, variables, options);
699
+ },
328
700
  extractImageMetadata(variables, options) {
329
701
  return requester(exports.ExtractImageMetadataDocument, variables, options);
330
702
  },