@droz-js/sdk 0.20.26 → 0.20.27

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.20.26",
4
+ "version": "0.20.27",
5
5
  "private": false,
6
6
  "repository": {
7
7
  "type": "git",
package/src/sdks/ai.d.ts CHANGED
@@ -127,6 +127,10 @@ export type AgentInfo = {
127
127
  name: Scalars['String']['output'];
128
128
  picture?: Maybe<Scalars['String']['output']>;
129
129
  };
130
+ export declare enum AiAgentAnalysisFailureReason {
131
+ InvalidReply = "invalid_reply",
132
+ ModelError = "model_error"
133
+ }
130
134
  export type AiAgentApproval = {
131
135
  agentId: Scalars['ID']['output'];
132
136
  args: Scalars['JSON']['output'];
@@ -174,6 +178,10 @@ export type AiAgentBudgetInput = {
174
178
  maxToolCalls: Scalars['Int']['input'];
175
179
  onExceeded: BudgetExceededAction;
176
180
  };
181
+ export declare enum AiAgentChannelType {
182
+ Web = "web",
183
+ Whatsapp = "whatsapp"
184
+ }
177
185
  export type AiAgentCheckLimits = {
178
186
  /** Já dividido pelos cenários deste agente: é o maior valor que a suíte dele sustenta. */
179
187
  maxRunsPerScenario: Scalars['Int']['output'];
@@ -219,30 +227,114 @@ export type AiAgentCompetingPair = {
219
227
  /** Similaridade entre as duas descricoes, de 0 a 1. */
220
228
  score: Scalars['Number']['output'];
221
229
  };
230
+ export type AiAgentContactReason = {
231
+ /** Nome do caso de uso publicado, item do `can`, `Outro` ou `Fora do escopo`. */
232
+ name: Scalars['String']['output'];
233
+ /** Mascarado quando a politica de retencao pede. */
234
+ other?: Maybe<Scalars['String']['output']>;
235
+ source: AiAgentContactReasonSource;
236
+ tag?: Maybe<Scalars['String']['output']>;
237
+ useCaseId?: Maybe<Scalars['ID']['output']>;
238
+ };
239
+ export declare enum AiAgentContactReasonSource {
240
+ Agent = "agent",
241
+ Analysis = "analysis"
242
+ }
243
+ export type AiAgentContactReasons = {
244
+ abandonment: Array<AiAgentMetricsCount>;
245
+ all: Array<AiAgentMetricsCount>;
246
+ handoff: Array<AiAgentMetricsCount>;
247
+ };
248
+ export type AiAgentConversationAction = {
249
+ at: Scalars['Number']['output'];
250
+ name: Scalars['String']['output'];
251
+ ok: Scalars['Boolean']['output'];
252
+ /** Campos que a ferramenta declarou devolver; mascarado quando a politica de retencao pede. */
253
+ result: Scalars['String']['output'];
254
+ toolId: Scalars['ID']['output'];
255
+ };
256
+ export type AiAgentConversationAnalysis = {
257
+ agentClarity?: Maybe<Scalars['Int']['output']>;
258
+ agentScore?: Maybe<Scalars['Int']['output']>;
259
+ /** `excelente` a partir de 85, `bom` de 60, `regular` de 40. */
260
+ agentScoreBand?: Maybe<AiAgentScoreBand>;
261
+ analysisVersion: Scalars['Int']['output'];
262
+ analyzedAt: Scalars['Number']['output'];
263
+ contactReason?: Maybe<Scalars['String']['output']>;
264
+ contactReasonId?: Maybe<Scalars['ID']['output']>;
265
+ contactReasonOther?: Maybe<Scalars['String']['output']>;
266
+ contactReasonSource?: Maybe<AiAgentContactReasonSource>;
267
+ contactReasonTag?: Maybe<Scalars['String']['output']>;
268
+ costMicroUsd?: Maybe<Scalars['Number']['output']>;
269
+ /** De 0 a 100; 100 e o cliente nao ter precisado se esforcar. */
270
+ customerEffortScore?: Maybe<Scalars['Int']['output']>;
271
+ /** Estimativa do modelo, de 1 a 5; nao e a pesquisa respondida pelo cliente. */
272
+ estimatedSatisfaction?: Maybe<Scalars['Int']['output']>;
273
+ failed?: Maybe<Scalars['Boolean']['output']>;
274
+ failureReason?: Maybe<AiAgentAnalysisFailureReason>;
275
+ humanRequests?: Maybe<Scalars['Int']['output']>;
276
+ /** Mascaradas quando a politica de retencao pede. */
277
+ knowledgeGaps: Array<Scalars['String']['output']>;
278
+ model?: Maybe<Scalars['String']['output']>;
279
+ repeatedInformation?: Maybe<Scalars['Boolean']['output']>;
280
+ riskAlerts: Array<AiAgentRiskAlert>;
281
+ sentimentEnd?: Maybe<AiAgentSentiment>;
282
+ sentimentStart?: Maybe<AiAgentSentiment>;
283
+ /** Mascarado quando a politica de retencao pede. */
284
+ summary?: Maybe<Scalars['String']['output']>;
285
+ };
286
+ export declare enum AiAgentConversationClass {
287
+ NaoElegivel = "NAO_ELEGIVEL",
288
+ NaoResolvida = "NAO_RESOLVIDA",
289
+ Resolvida = "RESOLVIDA"
290
+ }
291
+ export type AiAgentConversationClassification = {
292
+ /** Ausente enquanto a conversa esta em andamento. */
293
+ classification?: Maybe<AiAgentConversationClass>;
294
+ consumesAllowance: Scalars['Boolean']['output'];
295
+ definitionVersion: Scalars['String']['output'];
296
+ eligibleForResolution: Scalars['Boolean']['output'];
297
+ inactivityWindowMs: Scalars['Number']['output'];
298
+ state: AiAgentConversationState;
299
+ subcategory?: Maybe<AiAgentConversationSubcategory>;
300
+ technicalFailure?: Maybe<AiAgentTechnicalFailure>;
301
+ };
222
302
  export type AiAgentConversationMetrics = {
223
303
  channel?: Maybe<Scalars['String']['output']>;
304
+ channelType?: Maybe<AiAgentChannelType>;
305
+ contactReason?: Maybe<Scalars['String']['output']>;
306
+ contactReasonTag?: Maybe<Scalars['String']['output']>;
224
307
  costMicroUsd: Scalars['Number']['output'];
225
308
  durationMs: Scalars['Number']['output'];
226
309
  lastOutcome: Scalars['String']['output'];
227
310
  lastTurnAt: Scalars['Number']['output'];
228
311
  sessionId: Scalars['ID']['output'];
229
312
  startedAt: Scalars['Number']['output'];
313
+ state: AiAgentConversationState;
314
+ status?: Maybe<AiAgentConversationClass>;
315
+ subcategory?: Maybe<AiAgentConversationSubcategory>;
230
316
  totalTokens: Scalars['Number']['output'];
231
317
  turns: Scalars['Number']['output'];
232
318
  };
233
319
  export type AiAgentConversationOutcome = {
320
+ actions: Array<AiAgentConversationAction>;
234
321
  agentId: Scalars['ID']['output'];
235
322
  /** Escrito pelo modelo ao transferir ou encerrar; nao substitui o que foi medido. */
236
323
  agentSummary?: Maybe<Scalars['String']['output']>;
237
324
  agentVersion: Scalars['String']['output'];
325
+ /** Ausente ate a conversa encerrada ser analisada. */
326
+ analysis?: Maybe<AiAgentConversationAnalysis>;
327
+ channelType?: Maybe<AiAgentChannelType>;
328
+ classification: AiAgentConversationClassification;
238
329
  /** Fatos da sessao; chave e valor mascarados quando a politica de retencao pede. */
239
330
  collectedData: Scalars['JSON']['output'];
240
331
  /** false quando a retencao ja apagou a sessao. */
241
332
  collectedDataAvailable: Scalars['Boolean']['output'];
333
+ contactReason?: Maybe<AiAgentContactReason>;
242
334
  /** Motivo da parada do ultimo turno, quando houve. */
243
335
  haltReason?: Maybe<Scalars['String']['output']>;
244
336
  /** Motivo do ultimo pedido de pessoa, com os mesmos valores de `handoffsByReason`. */
245
- handoffReason?: Maybe<Scalars['String']['output']>;
337
+ handoffReason?: Maybe<AiAgentHandoffReason>;
246
338
  lastTurnAt: Scalars['Number']['output'];
247
339
  /** O que o agente disse ao consumidor que vai acontecer. */
248
340
  promisedNextStep?: Maybe<Scalars['String']['output']>;
@@ -252,6 +344,30 @@ export type AiAgentConversationOutcome = {
252
344
  startedAt: Scalars['Number']['output'];
253
345
  turns: Scalars['Number']['output'];
254
346
  };
347
+ export declare enum AiAgentConversationState {
348
+ EmAndamento = "EM_ANDAMENTO",
349
+ EncerradaPorConclusao = "ENCERRADA_POR_CONCLUSAO",
350
+ EncerradaPorFalhaTecnica = "ENCERRADA_POR_FALHA_TECNICA",
351
+ EncerradaPorInatividade = "ENCERRADA_POR_INATIVIDADE",
352
+ EncerradaPorTeto = "ENCERRADA_POR_TETO",
353
+ EncerradaPorTransbordo = "ENCERRADA_POR_TRANSBORDO"
354
+ }
355
+ export declare enum AiAgentConversationSubcategory {
356
+ AbandonoAposEsclarecimento = "ABANDONO_APOS_ESCLARECIMENTO",
357
+ EncerradaPorTeto = "ENCERRADA_POR_TETO",
358
+ FalhaTecnica = "FALHA_TECNICA",
359
+ Indefinido = "INDEFINIDO",
360
+ InterlocutorAutomatico = "INTERLOCUTOR_AUTOMATICO",
361
+ PromptInjection = "PROMPT_INJECTION",
362
+ ResolvidaConfirmada = "RESOLVIDA_CONFIRMADA",
363
+ ResolvidaPresumida = "RESOLVIDA_PRESUMIDA",
364
+ SaudacaoSemDemanda = "SAUDACAO_SEM_DEMANDA",
365
+ SemCobertura = "SEM_COBERTURA",
366
+ SemConhecimento = "SEM_CONHECIMENTO",
367
+ TransbordoPorAutodiagnostico = "TRANSBORDO_POR_AUTODIAGNOSTICO",
368
+ TransbordoPorNecessidadeCliente = "TRANSBORDO_POR_NECESSIDADE_CLIENTE",
369
+ TransbordoPorProcedimento = "TRANSBORDO_POR_PROCEDIMENTO"
370
+ }
255
371
  /**
256
372
  * Como este agente passa o atendimento para uma pessoa.
257
373
  *
@@ -269,6 +385,23 @@ export type AiAgentHandoffInput = {
269
385
  target?: InputMaybe<Scalars['String']['input']>;
270
386
  transition: Scalars['String']['input'];
271
387
  };
388
+ export declare enum AiAgentHandoffReason {
389
+ BudgetExceeded = "budget_exceeded",
390
+ CannotResolve = "cannot_resolve",
391
+ CustomerRequest = "customer_request",
392
+ KnowledgeGap = "knowledge_gap",
393
+ OutOfScope = "out_of_scope",
394
+ PeriodBudgetExceeded = "period_budget_exceeded",
395
+ PolicyRequiresHuman = "policy_requires_human",
396
+ ProviderUnavailable = "provider_unavailable",
397
+ ToolFailure = "tool_failure",
398
+ Undeclared = "undeclared",
399
+ Unresolved = "unresolved"
400
+ }
401
+ export type AiAgentHandoffReasonCount = {
402
+ count: Scalars['Number']['output'];
403
+ key: AiAgentHandoffReason;
404
+ };
272
405
  export type AiAgentIdentity = {
273
406
  displayName: Scalars['String']['output'];
274
407
  openingMessage?: Maybe<Scalars['String']['output']>;
@@ -291,7 +424,17 @@ export type AiAgentKnowledgeBase = {
291
424
  title: Scalars['String']['output'];
292
425
  };
293
426
  export type AiAgentMetrics = {
427
+ /** Pontos percentuais inteiros sobre `conversationsEligible`; ausente sem conversa elegível. */
428
+ abandonmentRate?: Maybe<Scalars['Number']['output']>;
429
+ agentClarityAvg?: Maybe<Scalars['Float']['output']>;
294
430
  agentId: Scalars['ID']['output'];
431
+ agentScoreAvg?: Maybe<Scalars['Float']['output']>;
432
+ agentScoreAvgBand?: Maybe<AiAgentScoreBand>;
433
+ agentScoreBands: Array<AiAgentScoreBandCount>;
434
+ /** true quando os numeros de analise cobrem so parte do periodo. */
435
+ analysesTruncated: Scalars['Boolean']['output'];
436
+ analysisCostMicroUsd: Scalars['Number']['output'];
437
+ analyzedConversations: Scalars['Number']['output'];
295
438
  answeredTurns: Scalars['Number']['output'];
296
439
  /**
297
440
  * Turnos que responderam mesmo com uma conexao falha no meio. E a superficie de risco do guardrail de
@@ -311,7 +454,11 @@ export type AiAgentMetrics = {
311
454
  cachedInputTokens: Scalars['Number']['output'];
312
455
  /** Turnos respondidos pelo cache, sem chamada ao modelo. E o ganho da otimizacao de §4.9. */
313
456
  cachedTurns: Scalars['Number']['output'];
457
+ classificationDefinitionVersion: Scalars['String']['output'];
458
+ contactReasons: AiAgentContactReasons;
314
459
  conversations: Scalars['Number']['output'];
460
+ conversationsByClassification: Array<AiAgentMetricsCount>;
461
+ conversationsEligible: Scalars['Number']['output'];
315
462
  /**
316
463
  * Conversas em que algum turno **pediu** uma pessoa. Pedido, nao confirmacao: o disparo da transicao
317
464
  * e best-effort, entao nem toda solicitacao virou transferencia de fato.
@@ -325,6 +472,7 @@ export type AiAgentMetrics = {
325
472
  conversationsInconclusive: Scalars['Number']['output'];
326
473
  /** Conversas resolvidas sob a regra declarada em `resolutionDefinition`. */
327
474
  conversationsResolved: Scalars['Number']['output'];
475
+ conversationsResolvedByDefinition: Scalars['Number']['output'];
328
476
  /** Gasto da janela em micro-dolar (1e-6 USD), inteiro. */
329
477
  costMicroUsd: Scalars['Number']['output'];
330
478
  /**
@@ -332,6 +480,7 @@ export type AiAgentMetrics = {
332
480
  * conversa resolveu no periodo — dividir por zero nao vira zero.
333
481
  */
334
482
  costMicroUsdPerResolvedConversation?: Maybe<Scalars['Number']['output']>;
483
+ customerEffortScoreAvg?: Maybe<Scalars['Float']['output']>;
335
484
  /**
336
485
  * Escalonou, mas a transicao nao tem destino declarado. Fica a parte de proposito: somar a um dos
337
486
  * dois lados seria supor para onde o fluxo do tenant leva.
@@ -341,16 +490,22 @@ export type AiAgentMetrics = {
341
490
  escalatedToFlow: Scalars['Number']['output'];
342
491
  /** Escalonamentos cujo destino o autor declarou como pessoa. */
343
492
  escalatedToHuman: Scalars['Number']['output'];
493
+ estimatedSatisfactionAvg?: Maybe<Scalars['Float']['output']>;
494
+ failedAnalyses: Scalars['Number']['output'];
344
495
  from: Scalars['Number']['output'];
345
496
  haltReasons: Array<AiAgentMetricsCount>;
346
497
  haltedTurns: Scalars['Number']['output'];
498
+ /** Pontos percentuais inteiros sobre `conversationsEligible`; ausente sem conversa elegível. */
499
+ handoffNeedRate?: Maybe<Scalars['Number']['output']>;
500
+ /** Pontos percentuais inteiros sobre `conversationsEligible`; ausente sem conversa elegível. */
501
+ handoffProcedureRate?: Maybe<Scalars['Number']['output']>;
347
502
  /**
348
503
  * Por que a pessoa foi pedida. Declarado pelo agente: `customer_request`, `out_of_scope`,
349
504
  * `knowledge_gap`, `policy_requires_human`, `cannot_resolve`, `tool_failure`; `undeclared` quando ele
350
505
  * transferiu sem declarar. Da plataforma: `tool_failure`, `provider_unavailable`, `budget_exceeded`,
351
506
  * `period_budget_exceeded` e `unresolved` quando o agente parou sem concluir.
352
507
  */
353
- handoffsByReason: Array<AiAgentMetricsCount>;
508
+ handoffsByReason: Array<AiAgentHandoffReasonCount>;
354
509
  /** Turnos que terminaram pedindo uma pessoa (pedido, nao transferencia). */
355
510
  humanRequestedTurns: Scalars['Number']['output'];
356
511
  /** Turnos que precisaram de cliente identificado e nao tinham um — a medida do atrito de identificacao. */
@@ -370,6 +525,11 @@ export type AiAgentMetrics = {
370
525
  * janela — sem dado e zero por cento nao sao a mesma coisa.
371
526
  */
372
527
  resolutionRate?: Maybe<Scalars['Number']['output']>;
528
+ /** Pontos percentuais inteiros sobre `conversationsEligible`; ausente sem conversa elegível. */
529
+ resolvedRate?: Maybe<Scalars['Number']['output']>;
530
+ riskAlerts: Array<AiAgentRiskAlertCount>;
531
+ sentimentAtEnd: Array<AiAgentSentimentCount>;
532
+ sentimentAtStart: Array<AiAgentSentimentCount>;
373
533
  to: Scalars['Number']['output'];
374
534
  toolCalls: Scalars['Number']['output'];
375
535
  /** Chamadas de ferramenta que falharam. */
@@ -378,6 +538,7 @@ export type AiAgentMetrics = {
378
538
  toolErrorsByClass: Array<AiAgentMetricsCount>;
379
539
  /** Falhas por conexao externa, identificada pelo host — responde "qual integracao esta caindo". */
380
540
  toolErrorsByConnection: Array<AiAgentMetricsCount>;
541
+ topKnowledgeGaps: Array<AiAgentMetricsCount>;
381
542
  /** Assuntos mais frequentes da janela, escolhidos no conjunto fechado do `can` de cada agente. */
382
543
  topTopics: Array<AiAgentMetricsCount>;
383
544
  /** As perguntas mais frequentes sem resposta, agrupadas por texto normalizado. */
@@ -399,6 +560,8 @@ export type AiAgentMetrics = {
399
560
  * **piso**, nao total — nao decidir preco sem olhar este numero.
400
561
  */
401
562
  unpricedTurns: Scalars['Number']['output'];
563
+ /** Pontos percentuais inteiros sobre `conversationsEligible`; ausente sem conversa elegível. */
564
+ unresolvedRate?: Maybe<Scalars['Number']['output']>;
402
565
  };
403
566
  export type AiAgentMetricsCount = {
404
567
  count: Scalars['Number']['output'];
@@ -455,6 +618,16 @@ export type AiAgentRetentionPolicyInput = {
455
618
  days: AiAgentRetentionDaysInput;
456
619
  masksPersonalData: Scalars['Boolean']['input'];
457
620
  };
621
+ export declare enum AiAgentRiskAlert {
622
+ Cancelamento = "cancelamento",
623
+ Justica = "justica",
624
+ Procon = "procon",
625
+ ReclameAqui = "reclame_aqui"
626
+ }
627
+ export type AiAgentRiskAlertCount = {
628
+ count: Scalars['Number']['output'];
629
+ key: AiAgentRiskAlert;
630
+ };
458
631
  export type AiAgentRoutedExample = {
459
632
  /** `high`, `medium` ou `low`. */
460
633
  confidence: Scalars['String']['output'];
@@ -524,6 +697,25 @@ export type AiAgentScenarioTurn = {
524
697
  /** 1 para o primeiro turno do cenário. */
525
698
  turn: Scalars['Int']['output'];
526
699
  };
700
+ export declare enum AiAgentScoreBand {
701
+ Bom = "bom",
702
+ Excelente = "excelente",
703
+ Regular = "regular",
704
+ Ruim = "ruim"
705
+ }
706
+ export type AiAgentScoreBandCount = {
707
+ count: Scalars['Number']['output'];
708
+ key: AiAgentScoreBand;
709
+ };
710
+ export declare enum AiAgentSentiment {
711
+ Negativo = "negativo",
712
+ Neutro = "neutro",
713
+ Positivo = "positivo"
714
+ }
715
+ export type AiAgentSentimentCount = {
716
+ count: Scalars['Number']['output'];
717
+ key: AiAgentSentiment;
718
+ };
527
719
  export type AiAgentSpec = {
528
720
  /** @deprecated Ignorado. O tipo da ferramenta sai do método do conector. O campo sai na próxima versão. */
529
721
  allowWriteTools?: Maybe<Scalars['Boolean']['output']>;
@@ -582,6 +774,12 @@ export type AiAgentSummary = {
582
774
  /** Momento da versao mais recente, no ar ou nao — o "ultima alteracao" da listagem. */
583
775
  updatedAt: Scalars['Number']['output'];
584
776
  };
777
+ export declare enum AiAgentTechnicalFailure {
778
+ Erro_5Xx = "ERRO_5XX",
779
+ FerramentaIndisponivel = "FERRAMENTA_INDISPONIVEL",
780
+ LimiteOperacional = "LIMITE_OPERACIONAL",
781
+ Timeout = "TIMEOUT"
782
+ }
585
783
  export type AiAgentTool = {
586
784
  /** `pre_approved` (padrao) ou `human_approval`. */
587
785
  approval?: Maybe<Scalars['String']['output']>;
@@ -644,6 +842,7 @@ export type AiAgentTrace = {
644
842
  agentId: Scalars['ID']['output'];
645
843
  agentVersion: Scalars['String']['output'];
646
844
  answer: Scalars['String']['output'];
845
+ channelType?: Maybe<AiAgentChannelType>;
647
846
  /** Ausente no turno que não selecionou ferramentas (cache, contraparte automática) e no registrado antes do campo existir. */
648
847
  excludedTools?: Maybe<Array<AiAgentToolExclusion>>;
649
848
  /** Presente so quando o turno parou por limite; ausente quando respondeu. */
@@ -689,6 +888,8 @@ export type AiAgentUseCase = {
689
888
  * produz roteamento ruim.
690
889
  */
691
890
  subjectDescription: Scalars['String']['output'];
891
+ /** Minusculas e digitos, separados por - ou _. */
892
+ tag?: Maybe<Scalars['String']['output']>;
692
893
  updatedAt: Scalars['Number']['output'];
693
894
  };
694
895
  export type AiAgentUseCaseOverlap = {
@@ -1126,6 +1327,8 @@ export type SaveAiAgentUseCaseInput = {
1126
1327
  procedureId?: InputMaybe<Scalars['ID']['input']>;
1127
1328
  status: Scalars['String']['input'];
1128
1329
  subjectDescription: Scalars['String']['input'];
1330
+ /** Ausente apaga a tag gravada. */
1331
+ tag?: InputMaybe<Scalars['String']['input']>;
1129
1332
  };
1130
1333
  export type SearchResultsFacet = {
1131
1334
  name: Scalars['String']['output'];
@@ -1218,6 +1421,7 @@ export declare enum Typenames {
1218
1421
  AiAgentAnswerCache = "AiAgentAnswerCache",
1219
1422
  AiAgentApproval = "AiAgentApproval",
1220
1423
  AiAgentCheckRun = "AiAgentCheckRun",
1424
+ AiAgentConversationAnalysis = "AiAgentConversationAnalysis",
1221
1425
  AiAgentEvalReport = "AiAgentEvalReport",
1222
1426
  AiAgentProcedure = "AiAgentProcedure",
1223
1427
  AiAgentRetentionPolicy = "AiAgentRetentionPolicy",
@@ -1318,7 +1522,7 @@ export type RemoveAiAgentMutationVariables = Exact<{
1318
1522
  input: AiAgentRefInput;
1319
1523
  }>;
1320
1524
  export type RemoveAiAgentMutation = Pick<Mutation, 'removeAiAgent'>;
1321
- export type AiAgentUseCaseFragment = Pick<AiAgentUseCase, 'id' | 'name' | 'subjectDescription' | 'procedureId' | 'status' | 'updatedAt'>;
1525
+ export type AiAgentUseCaseFragment = Pick<AiAgentUseCase, 'id' | 'name' | 'subjectDescription' | 'procedureId' | 'tag' | 'status' | 'updatedAt'>;
1322
1526
  export type AiAgentProcedureFragment = Pick<AiAgentProcedure, 'id' | 'name' | 'guidanceSteps' | 'toolIds' | 'contingency' | 'executionAutonomy' | 'status' | 'updatedAt'>;
1323
1527
  export type AiAgentToolFragment = (Pick<AiAgentTool, 'toolId' | 'name' | 'description' | 'effect' | 'availability' | 'requiresAuthenticatedCustomer' | 'onFailure' | 'customerScope' | 'returns' | 'approval'> & {
1324
1528
  parameters: Array<Pick<AiAgentToolParameter, 'name' | 'type' | 'required' | 'description' | 'grounding'>>;
@@ -1386,13 +1590,18 @@ export type AiAgentConversationMetricsQueryVariables = Exact<{
1386
1590
  input: AiAgentMetricsInput;
1387
1591
  }>;
1388
1592
  export type AiAgentConversationMetricsQuery = {
1389
- aiAgentConversationMetrics: Array<Pick<AiAgentConversationMetrics, 'sessionId' | 'channel' | 'turns' | 'startedAt' | 'lastTurnAt' | 'totalTokens' | 'costMicroUsd' | 'durationMs' | 'lastOutcome'>>;
1593
+ aiAgentConversationMetrics: Array<Pick<AiAgentConversationMetrics, 'sessionId' | 'channel' | 'turns' | 'startedAt' | 'lastTurnAt' | 'totalTokens' | 'costMicroUsd' | 'durationMs' | 'lastOutcome' | 'state' | 'status' | 'subcategory' | 'contactReason' | 'contactReasonTag' | 'channelType'>>;
1390
1594
  };
1391
1595
  export type AiAgentConversationOutcomeQueryVariables = Exact<{
1392
1596
  sessionId: Scalars['ID']['input'];
1393
1597
  }>;
1394
1598
  export type AiAgentConversationOutcomeQuery = {
1395
- aiAgentConversationOutcome?: Maybe<Pick<AiAgentConversationOutcome, 'sessionId' | 'agentId' | 'agentVersion' | 'resolution' | 'resolutionDefinition' | 'collectedData' | 'collectedDataAvailable' | 'turns' | 'startedAt' | 'lastTurnAt' | 'haltReason'>>;
1599
+ aiAgentConversationOutcome?: Maybe<(Pick<AiAgentConversationOutcome, 'sessionId' | 'agentId' | 'agentVersion' | 'resolution' | 'resolutionDefinition' | 'collectedData' | 'collectedDataAvailable' | 'turns' | 'startedAt' | 'lastTurnAt' | 'haltReason' | 'handoffReason' | 'agentSummary' | 'promisedNextStep' | 'channelType'> & {
1600
+ classification: Pick<AiAgentConversationClassification, 'state' | 'classification' | 'subcategory' | 'technicalFailure' | 'eligibleForResolution' | 'consumesAllowance' | 'inactivityWindowMs' | 'definitionVersion'>;
1601
+ actions: Array<Pick<AiAgentConversationAction, 'toolId' | 'name' | 'ok' | 'result' | 'at'>>;
1602
+ contactReason?: Maybe<Pick<AiAgentContactReason, 'name' | 'useCaseId' | 'tag' | 'other' | 'source'>>;
1603
+ analysis?: Maybe<Pick<AiAgentConversationAnalysis, 'analysisVersion' | 'failed' | 'failureReason' | 'sentimentStart' | 'sentimentEnd' | 'estimatedSatisfaction' | 'riskAlerts' | 'knowledgeGaps' | 'repeatedInformation' | 'humanRequests' | 'contactReason' | 'contactReasonId' | 'contactReasonTag' | 'contactReasonOther' | 'contactReasonSource' | 'summary' | 'agentScore' | 'agentScoreBand' | 'agentClarity' | 'customerEffortScore' | 'model' | 'costMicroUsd' | 'analyzedAt'>>;
1604
+ })>;
1396
1605
  };
1397
1606
  export type SaveAiAgentUseCaseMutationVariables = Exact<{
1398
1607
  input: SaveAiAgentUseCaseInput;
@@ -1482,8 +1691,19 @@ export type AiAgentCheckLimitsQueryVariables = Exact<{
1482
1691
  export type AiAgentCheckLimitsQuery = {
1483
1692
  aiAgentCheckLimits: Pick<AiAgentCheckLimits, 'minRunsPerScenario' | 'maxRunsPerScenario' | 'maxSuiteRuns' | 'scenarioCount'>;
1484
1693
  };
1485
- export type AiAgentMetricsReportFragment = (Pick<AiAgentMetrics, 'agentId' | 'from' | 'to' | 'truncated' | 'conversations' | 'conversationsResolved' | 'conversationsInconclusive' | 'conversationsHandoffRequested' | 'resolutionRate' | 'resolutionDefinition' | 'escalatedToHuman' | 'escalatedToFlow' | 'escalatedTargetUndeclared' | 'humanRequestedTurns' | 'costMicroUsd' | 'costMicroUsdPerResolvedConversation' | 'unpricedTurns' | 'inputTokens' | 'outputTokens' | 'totalTokens' | 'cachedInputTokens' | 'cachedTurns' | 'llmCalls' | 'avgTurnDurationMs' | 'p95TurnDurationMs' | 'avgLlmLatencyMs' | 'turns' | 'answeredTurns' | 'answeredWithFailedConnectionTurns' | 'unansweredTurns' | 'unansweredDefinition' | 'blockedTurns' | 'haltedTurns' | 'budgetExceededTurns' | 'identificationRequiredTurns' | 'toolCalls' | 'toolCallsFailed' | 'knowledgeRetrieved' | 'knowledgeEmpty' | 'knowledgeUnavailable' | 'knowledgeSkipped'> & {
1486
- handoffsByReason: Array<Pick<AiAgentMetricsCount, 'key' | 'count'>>;
1694
+ export type AiAgentMetricsReportFragment = (Pick<AiAgentMetrics, 'agentId' | 'from' | 'to' | 'truncated' | 'conversations' | 'conversationsResolved' | 'conversationsInconclusive' | 'conversationsHandoffRequested' | 'resolutionRate' | 'resolutionDefinition' | 'conversationsEligible' | 'conversationsResolvedByDefinition' | 'resolvedRate' | 'unresolvedRate' | 'handoffProcedureRate' | 'handoffNeedRate' | 'abandonmentRate' | 'classificationDefinitionVersion' | 'analyzedConversations' | 'estimatedSatisfactionAvg' | 'analysisCostMicroUsd' | 'failedAnalyses' | 'analysesTruncated' | 'agentScoreAvg' | 'agentScoreAvgBand' | 'agentClarityAvg' | 'customerEffortScoreAvg' | 'escalatedToHuman' | 'escalatedToFlow' | 'escalatedTargetUndeclared' | 'humanRequestedTurns' | 'costMicroUsd' | 'costMicroUsdPerResolvedConversation' | 'unpricedTurns' | 'inputTokens' | 'outputTokens' | 'totalTokens' | 'cachedInputTokens' | 'cachedTurns' | 'llmCalls' | 'avgTurnDurationMs' | 'p95TurnDurationMs' | 'avgLlmLatencyMs' | 'turns' | 'answeredTurns' | 'answeredWithFailedConnectionTurns' | 'unansweredTurns' | 'unansweredDefinition' | 'blockedTurns' | 'haltedTurns' | 'budgetExceededTurns' | 'identificationRequiredTurns' | 'toolCalls' | 'toolCallsFailed' | 'knowledgeRetrieved' | 'knowledgeEmpty' | 'knowledgeUnavailable' | 'knowledgeSkipped'> & {
1695
+ conversationsByClassification: Array<Pick<AiAgentMetricsCount, 'key' | 'count'>>;
1696
+ sentimentAtStart: Array<Pick<AiAgentSentimentCount, 'key' | 'count'>>;
1697
+ sentimentAtEnd: Array<Pick<AiAgentSentimentCount, 'key' | 'count'>>;
1698
+ riskAlerts: Array<Pick<AiAgentRiskAlertCount, 'key' | 'count'>>;
1699
+ topKnowledgeGaps: Array<Pick<AiAgentMetricsCount, 'key' | 'count'>>;
1700
+ agentScoreBands: Array<Pick<AiAgentScoreBandCount, 'key' | 'count'>>;
1701
+ contactReasons: {
1702
+ all: Array<Pick<AiAgentMetricsCount, 'key' | 'count'>>;
1703
+ handoff: Array<Pick<AiAgentMetricsCount, 'key' | 'count'>>;
1704
+ abandonment: Array<Pick<AiAgentMetricsCount, 'key' | 'count'>>;
1705
+ };
1706
+ handoffsByReason: Array<Pick<AiAgentHandoffReasonCount, 'key' | 'count'>>;
1487
1707
  turnsByModel: Array<Pick<AiAgentMetricsCount, 'key' | 'count'>>;
1488
1708
  topTopics: Array<Pick<AiAgentMetricsCount, 'key' | 'count'>>;
1489
1709
  topUnansweredQuestions: Array<Pick<AiAgentMetricsCount, 'key' | 'count'>>;
@@ -1613,14 +1833,14 @@ export declare const AiAgentSpecFragmentDoc = "\n fragment aiAgentSpec on AiA
1613
1833
  export declare const AiAgentToolExclusionFragmentDoc = "\n fragment aiAgentToolExclusion on AiAgentToolExclusion {\n toolId\n reason\n}\n ";
1614
1834
  export declare const AiAgentVersionWithSpecFragmentDoc = "\n fragment aiAgentVersionWithSpec on AiAgentVersion {\n agentId\n version\n status\n createdAt\n spec {\n ...aiAgentSpec\n }\n excludedTools {\n ...aiAgentToolExclusion\n }\n}\n ";
1615
1835
  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 ";
1616
- export declare const AiAgentUseCaseFragmentDoc = "\n fragment aiAgentUseCase on AiAgentUseCase {\n id\n name\n subjectDescription\n procedureId\n status\n updatedAt\n}\n ";
1836
+ export declare const AiAgentUseCaseFragmentDoc = "\n fragment aiAgentUseCase on AiAgentUseCase {\n id\n name\n subjectDescription\n procedureId\n tag\n status\n updatedAt\n}\n ";
1617
1837
  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 ";
1618
1838
  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 ";
1619
1839
  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 excludedTools {\n ...aiAgentToolExclusion\n }\n toolCalls {\n toolId\n name\n result\n ok\n connection\n errorClass\n }\n}\n ";
1620
1840
  export declare const AiAgentScenarioFragmentDoc = "\n fragment aiAgentScenario on AiAgentScenario {\n scenarioId\n description\n customerId\n turns\n expectations\n}\n ";
1621
1841
  export declare const AiAgentApprovalFragmentDoc = "\n fragment aiAgentApproval on AiAgentApproval {\n agentId\n sessionId\n toolId\n toolName\n args\n channelId\n customerId\n requestedAt\n expiresAt\n status\n decidedBy\n decidedAt\n}\n ";
1622
1842
  export declare const AiAgentCheckRunFragmentDoc = "\n fragment aiAgentCheckRun on AiAgentCheckRun {\n runId\n agentId\n version\n status\n requestedAt\n startedAt\n finishedAt\n totalRuns\n completedRuns\n error\n excludedTools {\n ...aiAgentToolExclusion\n }\n result {\n safeToPublish\n reports {\n scenarioId\n runs\n cut\n measured\n passed\n rate\n handoffReasons {\n key\n count\n }\n turns {\n turn\n runs\n answered\n grounded\n blocked\n identificationRequired\n toolNames {\n key\n count\n }\n blockCategories {\n key\n count\n }\n }\n }\n regressions {\n scenarioId\n before\n after\n }\n }\n}\n ";
1623
- export declare const AiAgentMetricsReportFragmentDoc = "\n fragment aiAgentMetricsReport on AiAgentMetrics {\n agentId\n from\n to\n truncated\n conversations\n conversationsResolved\n conversationsInconclusive\n conversationsHandoffRequested\n resolutionRate\n resolutionDefinition\n escalatedToHuman\n escalatedToFlow\n escalatedTargetUndeclared\n handoffsByReason {\n key\n count\n }\n humanRequestedTurns\n costMicroUsd\n costMicroUsdPerResolvedConversation\n unpricedTurns\n inputTokens\n outputTokens\n totalTokens\n cachedInputTokens\n cachedTurns\n llmCalls\n turnsByModel {\n key\n count\n }\n avgTurnDurationMs\n p95TurnDurationMs\n avgLlmLatencyMs\n turns\n answeredTurns\n answeredWithFailedConnectionTurns\n unansweredTurns\n unansweredDefinition\n topTopics {\n key\n count\n }\n topUnansweredQuestions {\n key\n count\n }\n blockedTurns\n blocksByCategory {\n key\n count\n }\n haltedTurns\n haltReasons {\n key\n count\n }\n budgetExceededTurns\n identificationRequiredTurns\n toolCalls\n toolCallsFailed\n toolErrorsByConnection {\n key\n count\n }\n toolErrorsByClass {\n key\n count\n }\n knowledgeRetrieved\n knowledgeEmpty\n knowledgeUnavailable\n knowledgeSkipped\n}\n ";
1843
+ export declare const AiAgentMetricsReportFragmentDoc = "\n fragment aiAgentMetricsReport on AiAgentMetrics {\n agentId\n from\n to\n truncated\n conversations\n conversationsResolved\n conversationsInconclusive\n conversationsHandoffRequested\n resolutionRate\n resolutionDefinition\n conversationsByClassification {\n key\n count\n }\n conversationsEligible\n conversationsResolvedByDefinition\n resolvedRate\n unresolvedRate\n handoffProcedureRate\n handoffNeedRate\n abandonmentRate\n classificationDefinitionVersion\n analyzedConversations\n estimatedSatisfactionAvg\n sentimentAtStart {\n key\n count\n }\n sentimentAtEnd {\n key\n count\n }\n riskAlerts {\n key\n count\n }\n topKnowledgeGaps {\n key\n count\n }\n analysisCostMicroUsd\n failedAnalyses\n analysesTruncated\n agentScoreAvg\n agentScoreAvgBand\n agentScoreBands {\n key\n count\n }\n agentClarityAvg\n customerEffortScoreAvg\n contactReasons {\n all {\n key\n count\n }\n handoff {\n key\n count\n }\n abandonment {\n key\n count\n }\n }\n escalatedToHuman\n escalatedToFlow\n escalatedTargetUndeclared\n handoffsByReason {\n key\n count\n }\n humanRequestedTurns\n costMicroUsd\n costMicroUsdPerResolvedConversation\n unpricedTurns\n inputTokens\n outputTokens\n totalTokens\n cachedInputTokens\n cachedTurns\n llmCalls\n turnsByModel {\n key\n count\n }\n avgTurnDurationMs\n p95TurnDurationMs\n avgLlmLatencyMs\n turns\n answeredTurns\n answeredWithFailedConnectionTurns\n unansweredTurns\n unansweredDefinition\n topTopics {\n key\n count\n }\n topUnansweredQuestions {\n key\n count\n }\n blockedTurns\n blocksByCategory {\n key\n count\n }\n haltedTurns\n haltReasons {\n key\n count\n }\n budgetExceededTurns\n identificationRequiredTurns\n toolCalls\n toolCallsFailed\n toolErrorsByConnection {\n key\n count\n }\n toolErrorsByClass {\n key\n count\n }\n knowledgeRetrieved\n knowledgeEmpty\n knowledgeUnavailable\n knowledgeSkipped\n}\n ";
1624
1844
  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 ";
1625
1845
  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 ";
1626
1846
  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 ";
@@ -1632,7 +1852,7 @@ export declare const UnpublishAiAgentVersionDocument = "\n mutation unpublish
1632
1852
  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 ";
1633
1853
  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 ";
1634
1854
  export declare const RemoveAiAgentDocument = "\n mutation removeAiAgent($input: AiAgentRefInput!) {\n removeAiAgent(input: $input)\n}\n ";
1635
- 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 ";
1855
+ 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 tag\n status\n updatedAt\n}\n ";
1636
1856
  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 ";
1637
1857
  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 ";
1638
1858
  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 ";
@@ -1640,9 +1860,9 @@ export declare const AiAgentTraceDocument = "\n query aiAgentTrace($sessionId
1640
1860
  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 customerId\n turns\n expectations\n}\n ";
1641
1861
  export declare const SetAiAgentRetentionPolicyDocument = "\n mutation setAiAgentRetentionPolicy($input: AiAgentRetentionPolicyInput!) {\n setAiAgentRetentionPolicy(input: $input) {\n days {\n transcript\n session_state\n long_term_memory\n }\n masksPersonalData\n }\n}\n ";
1642
1862
  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 ";
1643
- 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 ";
1644
- 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 ";
1645
- 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 ";
1863
+ 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 state\n status\n subcategory\n contactReason\n contactReasonTag\n channelType\n }\n}\n ";
1864
+ 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 handoffReason\n agentSummary\n promisedNextStep\n classification {\n state\n classification\n subcategory\n technicalFailure\n eligibleForResolution\n consumesAllowance\n inactivityWindowMs\n definitionVersion\n }\n channelType\n actions {\n toolId\n name\n ok\n result\n at\n }\n contactReason {\n name\n useCaseId\n tag\n other\n source\n }\n analysis {\n analysisVersion\n failed\n failureReason\n sentimentStart\n sentimentEnd\n estimatedSatisfaction\n riskAlerts\n knowledgeGaps\n repeatedInformation\n humanRequests\n contactReason\n contactReasonId\n contactReasonTag\n contactReasonOther\n contactReasonSource\n summary\n agentScore\n agentScoreBand\n agentClarity\n customerEffortScore\n model\n costMicroUsd\n analyzedAt\n }\n }\n}\n ";
1865
+ 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 tag\n status\n updatedAt\n}\n ";
1646
1866
  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 ";
1647
1867
  export declare const RemoveAiAgentUseCaseDocument = "\n mutation removeAiAgentUseCase($input: AiAgentAuthoringRefInput!) {\n removeAiAgentUseCase(input: $input)\n}\n ";
1648
1868
  export declare const RemoveAiAgentProcedureDocument = "\n mutation removeAiAgentProcedure($input: AiAgentAuthoringRefInput!) {\n removeAiAgentProcedure(input: $input)\n}\n ";
@@ -1656,7 +1876,7 @@ export declare const SaveAiAgentScenarioDocument = "\n mutation saveAiAgentSc
1656
1876
  export declare const CheckAiAgentVersionDocument = "\n mutation checkAiAgentVersion($input: CheckAiAgentVersionInput!) {\n checkAiAgentVersion(input: $input) {\n ...aiAgentCheckRun\n }\n}\n \n fragment aiAgentCheckRun on AiAgentCheckRun {\n runId\n agentId\n version\n status\n requestedAt\n startedAt\n finishedAt\n totalRuns\n completedRuns\n error\n excludedTools {\n ...aiAgentToolExclusion\n }\n result {\n safeToPublish\n reports {\n scenarioId\n runs\n cut\n measured\n passed\n rate\n handoffReasons {\n key\n count\n }\n turns {\n turn\n runs\n answered\n grounded\n blocked\n identificationRequired\n toolNames {\n key\n count\n }\n blockCategories {\n key\n count\n }\n }\n }\n regressions {\n scenarioId\n before\n after\n }\n }\n}\n \n\n fragment aiAgentToolExclusion on AiAgentToolExclusion {\n toolId\n reason\n}\n ";
1657
1877
  export declare const GetAiAgentCheckRunDocument = "\n query getAiAgentCheckRun($agentId: ID!, $runId: ID!) {\n getAiAgentCheckRun(agentId: $agentId, runId: $runId) {\n ...aiAgentCheckRun\n }\n}\n \n fragment aiAgentCheckRun on AiAgentCheckRun {\n runId\n agentId\n version\n status\n requestedAt\n startedAt\n finishedAt\n totalRuns\n completedRuns\n error\n excludedTools {\n ...aiAgentToolExclusion\n }\n result {\n safeToPublish\n reports {\n scenarioId\n runs\n cut\n measured\n passed\n rate\n handoffReasons {\n key\n count\n }\n turns {\n turn\n runs\n answered\n grounded\n blocked\n identificationRequired\n toolNames {\n key\n count\n }\n blockCategories {\n key\n count\n }\n }\n }\n regressions {\n scenarioId\n before\n after\n }\n }\n}\n \n\n fragment aiAgentToolExclusion on AiAgentToolExclusion {\n toolId\n reason\n}\n ";
1658
1878
  export declare const AiAgentCheckLimitsDocument = "\n query aiAgentCheckLimits($agentId: ID!) {\n aiAgentCheckLimits(agentId: $agentId) {\n minRunsPerScenario\n maxRunsPerScenario\n maxSuiteRuns\n scenarioCount\n }\n}\n ";
1659
- export declare const AiAgentMetricsDocument = "\n query aiAgentMetrics($input: AiAgentMetricsInput!) {\n aiAgentMetrics(input: $input) {\n ...aiAgentMetricsReport\n }\n}\n \n fragment aiAgentMetricsReport on AiAgentMetrics {\n agentId\n from\n to\n truncated\n conversations\n conversationsResolved\n conversationsInconclusive\n conversationsHandoffRequested\n resolutionRate\n resolutionDefinition\n escalatedToHuman\n escalatedToFlow\n escalatedTargetUndeclared\n handoffsByReason {\n key\n count\n }\n humanRequestedTurns\n costMicroUsd\n costMicroUsdPerResolvedConversation\n unpricedTurns\n inputTokens\n outputTokens\n totalTokens\n cachedInputTokens\n cachedTurns\n llmCalls\n turnsByModel {\n key\n count\n }\n avgTurnDurationMs\n p95TurnDurationMs\n avgLlmLatencyMs\n turns\n answeredTurns\n answeredWithFailedConnectionTurns\n unansweredTurns\n unansweredDefinition\n topTopics {\n key\n count\n }\n topUnansweredQuestions {\n key\n count\n }\n blockedTurns\n blocksByCategory {\n key\n count\n }\n haltedTurns\n haltReasons {\n key\n count\n }\n budgetExceededTurns\n identificationRequiredTurns\n toolCalls\n toolCallsFailed\n toolErrorsByConnection {\n key\n count\n }\n toolErrorsByClass {\n key\n count\n }\n knowledgeRetrieved\n knowledgeEmpty\n knowledgeUnavailable\n knowledgeSkipped\n}\n ";
1879
+ export declare const AiAgentMetricsDocument = "\n query aiAgentMetrics($input: AiAgentMetricsInput!) {\n aiAgentMetrics(input: $input) {\n ...aiAgentMetricsReport\n }\n}\n \n fragment aiAgentMetricsReport on AiAgentMetrics {\n agentId\n from\n to\n truncated\n conversations\n conversationsResolved\n conversationsInconclusive\n conversationsHandoffRequested\n resolutionRate\n resolutionDefinition\n conversationsByClassification {\n key\n count\n }\n conversationsEligible\n conversationsResolvedByDefinition\n resolvedRate\n unresolvedRate\n handoffProcedureRate\n handoffNeedRate\n abandonmentRate\n classificationDefinitionVersion\n analyzedConversations\n estimatedSatisfactionAvg\n sentimentAtStart {\n key\n count\n }\n sentimentAtEnd {\n key\n count\n }\n riskAlerts {\n key\n count\n }\n topKnowledgeGaps {\n key\n count\n }\n analysisCostMicroUsd\n failedAnalyses\n analysesTruncated\n agentScoreAvg\n agentScoreAvgBand\n agentScoreBands {\n key\n count\n }\n agentClarityAvg\n customerEffortScoreAvg\n contactReasons {\n all {\n key\n count\n }\n handoff {\n key\n count\n }\n abandonment {\n key\n count\n }\n }\n escalatedToHuman\n escalatedToFlow\n escalatedTargetUndeclared\n handoffsByReason {\n key\n count\n }\n humanRequestedTurns\n costMicroUsd\n costMicroUsdPerResolvedConversation\n unpricedTurns\n inputTokens\n outputTokens\n totalTokens\n cachedInputTokens\n cachedTurns\n llmCalls\n turnsByModel {\n key\n count\n }\n avgTurnDurationMs\n p95TurnDurationMs\n avgLlmLatencyMs\n turns\n answeredTurns\n answeredWithFailedConnectionTurns\n unansweredTurns\n unansweredDefinition\n topTopics {\n key\n count\n }\n topUnansweredQuestions {\n key\n count\n }\n blockedTurns\n blocksByCategory {\n key\n count\n }\n haltedTurns\n haltReasons {\n key\n count\n }\n budgetExceededTurns\n identificationRequiredTurns\n toolCalls\n toolCallsFailed\n toolErrorsByConnection {\n key\n count\n }\n toolErrorsByClass {\n key\n count\n }\n knowledgeRetrieved\n knowledgeEmpty\n knowledgeUnavailable\n knowledgeSkipped\n}\n ";
1660
1880
  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 excludedTools {\n ...aiAgentToolExclusion\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 \n\n fragment aiAgentToolExclusion on AiAgentToolExclusion {\n toolId\n reason\n}\n ";
1661
1881
  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 ";
1662
1882
  export declare const AiAgentKnowledgeBasesDocument = "\n query aiAgentKnowledgeBases {\n aiAgentKnowledgeBases {\n id\n title\n isPublic\n }\n}\n ";
package/src/sdks/ai.js CHANGED
@@ -1,9 +1,19 @@
1
1
  "use strict";
2
2
  /* istanbul ignore file */
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.RemoveAiAgentProcedureDocument = exports.RemoveAiAgentUseCaseDocument = exports.SaveAiAgentProcedureDocument = exports.SaveAiAgentUseCaseDocument = exports.AiAgentConversationOutcomeDocument = exports.AiAgentConversationMetricsDocument = exports.AiAgentRetentionPolicyDocument = exports.SetAiAgentRetentionPolicyDocument = 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.AiAgentMetricsReportFragmentDoc = exports.AiAgentCheckRunFragmentDoc = exports.AiAgentApprovalFragmentDoc = exports.AiAgentScenarioFragmentDoc = exports.AiAgentTraceFragmentDoc = exports.AiAgentToolFragmentDoc = exports.AiAgentProcedureFragmentDoc = exports.AiAgentUseCaseFragmentDoc = exports.AiAgentListingMetricsFragmentDoc = exports.AiAgentVersionWithSpecFragmentDoc = exports.AiAgentToolExclusionFragmentDoc = 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 = exports.AiAgentCheckRunStatus = 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.AiAgentKnowledgeBasesDocument = exports.AiAgentRoutingPreviewDocument = exports.AiAgentVersionSpecDocument = exports.AiAgentMetricsDocument = exports.AiAgentCheckLimitsDocument = exports.GetAiAgentCheckRunDocument = exports.CheckAiAgentVersionDocument = exports.SaveAiAgentScenarioDocument = exports.RemoveAiAgentScenarioDocument = exports.UnregisterAiAgentToolDocument = exports.RegisterAiAgentToolDocument = exports.ResolveAiAgentApprovalDocument = exports.ListAiAgentApprovalsDocument = exports.RememberAiAgentSessionFactsDocument = void 0;
4
+ 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.AiAgentMetricsReportFragmentDoc = exports.AiAgentCheckRunFragmentDoc = exports.AiAgentApprovalFragmentDoc = exports.AiAgentScenarioFragmentDoc = exports.AiAgentTraceFragmentDoc = exports.AiAgentToolFragmentDoc = exports.AiAgentProcedureFragmentDoc = exports.AiAgentUseCaseFragmentDoc = exports.AiAgentListingMetricsFragmentDoc = exports.AiAgentVersionWithSpecFragmentDoc = exports.AiAgentToolExclusionFragmentDoc = 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 = exports.AiAgentTechnicalFailure = exports.AiAgentSentiment = exports.AiAgentScoreBand = exports.AiAgentRiskAlert = exports.AiAgentHandoffReason = exports.AiAgentConversationSubcategory = exports.AiAgentConversationState = exports.AiAgentConversationClass = exports.AiAgentContactReasonSource = exports.AiAgentCheckRunStatus = exports.AiAgentChannelType = exports.AiAgentAnalysisFailureReason = 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.AiAgentKnowledgeBasesDocument = exports.AiAgentRoutingPreviewDocument = exports.AiAgentVersionSpecDocument = exports.AiAgentMetricsDocument = exports.AiAgentCheckLimitsDocument = exports.GetAiAgentCheckRunDocument = exports.CheckAiAgentVersionDocument = exports.SaveAiAgentScenarioDocument = exports.RemoveAiAgentScenarioDocument = exports.UnregisterAiAgentToolDocument = exports.RegisterAiAgentToolDocument = exports.ResolveAiAgentApprovalDocument = exports.ListAiAgentApprovalsDocument = exports.RememberAiAgentSessionFactsDocument = exports.RemoveAiAgentProcedureDocument = exports.RemoveAiAgentUseCaseDocument = exports.SaveAiAgentProcedureDocument = exports.SaveAiAgentUseCaseDocument = exports.AiAgentConversationOutcomeDocument = exports.AiAgentConversationMetricsDocument = exports.AiAgentRetentionPolicyDocument = exports.SetAiAgentRetentionPolicyDocument = exports.ListAiAgentScenariosDocument = exports.AiAgentTraceDocument = exports.AiAgentUseCaseOverlapDocument = void 0;
6
6
  exports.getSdk = getSdk;
7
+ var AiAgentAnalysisFailureReason;
8
+ (function (AiAgentAnalysisFailureReason) {
9
+ AiAgentAnalysisFailureReason["InvalidReply"] = "invalid_reply";
10
+ AiAgentAnalysisFailureReason["ModelError"] = "model_error";
11
+ })(AiAgentAnalysisFailureReason || (exports.AiAgentAnalysisFailureReason = AiAgentAnalysisFailureReason = {}));
12
+ var AiAgentChannelType;
13
+ (function (AiAgentChannelType) {
14
+ AiAgentChannelType["Web"] = "web";
15
+ AiAgentChannelType["Whatsapp"] = "whatsapp";
16
+ })(AiAgentChannelType || (exports.AiAgentChannelType = AiAgentChannelType = {}));
7
17
  var AiAgentCheckRunStatus;
8
18
  (function (AiAgentCheckRunStatus) {
9
19
  AiAgentCheckRunStatus["Failed"] = "failed";
@@ -11,6 +21,84 @@ var AiAgentCheckRunStatus;
11
21
  AiAgentCheckRunStatus["Running"] = "running";
12
22
  AiAgentCheckRunStatus["Succeeded"] = "succeeded";
13
23
  })(AiAgentCheckRunStatus || (exports.AiAgentCheckRunStatus = AiAgentCheckRunStatus = {}));
24
+ var AiAgentContactReasonSource;
25
+ (function (AiAgentContactReasonSource) {
26
+ AiAgentContactReasonSource["Agent"] = "agent";
27
+ AiAgentContactReasonSource["Analysis"] = "analysis";
28
+ })(AiAgentContactReasonSource || (exports.AiAgentContactReasonSource = AiAgentContactReasonSource = {}));
29
+ var AiAgentConversationClass;
30
+ (function (AiAgentConversationClass) {
31
+ AiAgentConversationClass["NaoElegivel"] = "NAO_ELEGIVEL";
32
+ AiAgentConversationClass["NaoResolvida"] = "NAO_RESOLVIDA";
33
+ AiAgentConversationClass["Resolvida"] = "RESOLVIDA";
34
+ })(AiAgentConversationClass || (exports.AiAgentConversationClass = AiAgentConversationClass = {}));
35
+ var AiAgentConversationState;
36
+ (function (AiAgentConversationState) {
37
+ AiAgentConversationState["EmAndamento"] = "EM_ANDAMENTO";
38
+ AiAgentConversationState["EncerradaPorConclusao"] = "ENCERRADA_POR_CONCLUSAO";
39
+ AiAgentConversationState["EncerradaPorFalhaTecnica"] = "ENCERRADA_POR_FALHA_TECNICA";
40
+ AiAgentConversationState["EncerradaPorInatividade"] = "ENCERRADA_POR_INATIVIDADE";
41
+ AiAgentConversationState["EncerradaPorTeto"] = "ENCERRADA_POR_TETO";
42
+ AiAgentConversationState["EncerradaPorTransbordo"] = "ENCERRADA_POR_TRANSBORDO";
43
+ })(AiAgentConversationState || (exports.AiAgentConversationState = AiAgentConversationState = {}));
44
+ var AiAgentConversationSubcategory;
45
+ (function (AiAgentConversationSubcategory) {
46
+ AiAgentConversationSubcategory["AbandonoAposEsclarecimento"] = "ABANDONO_APOS_ESCLARECIMENTO";
47
+ AiAgentConversationSubcategory["EncerradaPorTeto"] = "ENCERRADA_POR_TETO";
48
+ AiAgentConversationSubcategory["FalhaTecnica"] = "FALHA_TECNICA";
49
+ AiAgentConversationSubcategory["Indefinido"] = "INDEFINIDO";
50
+ AiAgentConversationSubcategory["InterlocutorAutomatico"] = "INTERLOCUTOR_AUTOMATICO";
51
+ AiAgentConversationSubcategory["PromptInjection"] = "PROMPT_INJECTION";
52
+ AiAgentConversationSubcategory["ResolvidaConfirmada"] = "RESOLVIDA_CONFIRMADA";
53
+ AiAgentConversationSubcategory["ResolvidaPresumida"] = "RESOLVIDA_PRESUMIDA";
54
+ AiAgentConversationSubcategory["SaudacaoSemDemanda"] = "SAUDACAO_SEM_DEMANDA";
55
+ AiAgentConversationSubcategory["SemCobertura"] = "SEM_COBERTURA";
56
+ AiAgentConversationSubcategory["SemConhecimento"] = "SEM_CONHECIMENTO";
57
+ AiAgentConversationSubcategory["TransbordoPorAutodiagnostico"] = "TRANSBORDO_POR_AUTODIAGNOSTICO";
58
+ AiAgentConversationSubcategory["TransbordoPorNecessidadeCliente"] = "TRANSBORDO_POR_NECESSIDADE_CLIENTE";
59
+ AiAgentConversationSubcategory["TransbordoPorProcedimento"] = "TRANSBORDO_POR_PROCEDIMENTO";
60
+ })(AiAgentConversationSubcategory || (exports.AiAgentConversationSubcategory = AiAgentConversationSubcategory = {}));
61
+ var AiAgentHandoffReason;
62
+ (function (AiAgentHandoffReason) {
63
+ AiAgentHandoffReason["BudgetExceeded"] = "budget_exceeded";
64
+ AiAgentHandoffReason["CannotResolve"] = "cannot_resolve";
65
+ AiAgentHandoffReason["CustomerRequest"] = "customer_request";
66
+ AiAgentHandoffReason["KnowledgeGap"] = "knowledge_gap";
67
+ AiAgentHandoffReason["OutOfScope"] = "out_of_scope";
68
+ AiAgentHandoffReason["PeriodBudgetExceeded"] = "period_budget_exceeded";
69
+ AiAgentHandoffReason["PolicyRequiresHuman"] = "policy_requires_human";
70
+ AiAgentHandoffReason["ProviderUnavailable"] = "provider_unavailable";
71
+ AiAgentHandoffReason["ToolFailure"] = "tool_failure";
72
+ AiAgentHandoffReason["Undeclared"] = "undeclared";
73
+ AiAgentHandoffReason["Unresolved"] = "unresolved";
74
+ })(AiAgentHandoffReason || (exports.AiAgentHandoffReason = AiAgentHandoffReason = {}));
75
+ var AiAgentRiskAlert;
76
+ (function (AiAgentRiskAlert) {
77
+ AiAgentRiskAlert["Cancelamento"] = "cancelamento";
78
+ AiAgentRiskAlert["Justica"] = "justica";
79
+ AiAgentRiskAlert["Procon"] = "procon";
80
+ AiAgentRiskAlert["ReclameAqui"] = "reclame_aqui";
81
+ })(AiAgentRiskAlert || (exports.AiAgentRiskAlert = AiAgentRiskAlert = {}));
82
+ var AiAgentScoreBand;
83
+ (function (AiAgentScoreBand) {
84
+ AiAgentScoreBand["Bom"] = "bom";
85
+ AiAgentScoreBand["Excelente"] = "excelente";
86
+ AiAgentScoreBand["Regular"] = "regular";
87
+ AiAgentScoreBand["Ruim"] = "ruim";
88
+ })(AiAgentScoreBand || (exports.AiAgentScoreBand = AiAgentScoreBand = {}));
89
+ var AiAgentSentiment;
90
+ (function (AiAgentSentiment) {
91
+ AiAgentSentiment["Negativo"] = "negativo";
92
+ AiAgentSentiment["Neutro"] = "neutro";
93
+ AiAgentSentiment["Positivo"] = "positivo";
94
+ })(AiAgentSentiment || (exports.AiAgentSentiment = AiAgentSentiment = {}));
95
+ var AiAgentTechnicalFailure;
96
+ (function (AiAgentTechnicalFailure) {
97
+ AiAgentTechnicalFailure["Erro_5Xx"] = "ERRO_5XX";
98
+ AiAgentTechnicalFailure["FerramentaIndisponivel"] = "FERRAMENTA_INDISPONIVEL";
99
+ AiAgentTechnicalFailure["LimiteOperacional"] = "LIMITE_OPERACIONAL";
100
+ AiAgentTechnicalFailure["Timeout"] = "TIMEOUT";
101
+ })(AiAgentTechnicalFailure || (exports.AiAgentTechnicalFailure = AiAgentTechnicalFailure = {}));
14
102
  var AiAgentVersionStatus;
15
103
  (function (AiAgentVersionStatus) {
16
104
  AiAgentVersionStatus["Draft"] = "draft";
@@ -71,6 +159,7 @@ var Typenames;
71
159
  Typenames["AiAgentAnswerCache"] = "AiAgentAnswerCache";
72
160
  Typenames["AiAgentApproval"] = "AiAgentApproval";
73
161
  Typenames["AiAgentCheckRun"] = "AiAgentCheckRun";
162
+ Typenames["AiAgentConversationAnalysis"] = "AiAgentConversationAnalysis";
74
163
  Typenames["AiAgentEvalReport"] = "AiAgentEvalReport";
75
164
  Typenames["AiAgentProcedure"] = "AiAgentProcedure";
76
165
  Typenames["AiAgentRetentionPolicy"] = "AiAgentRetentionPolicy";
@@ -174,6 +263,7 @@ exports.AiAgentUseCaseFragmentDoc = `
174
263
  name
175
264
  subjectDescription
176
265
  procedureId
266
+ tag
177
267
  status
178
268
  updatedAt
179
269
  }
@@ -331,6 +421,61 @@ exports.AiAgentMetricsReportFragmentDoc = `
331
421
  conversationsHandoffRequested
332
422
  resolutionRate
333
423
  resolutionDefinition
424
+ conversationsByClassification {
425
+ key
426
+ count
427
+ }
428
+ conversationsEligible
429
+ conversationsResolvedByDefinition
430
+ resolvedRate
431
+ unresolvedRate
432
+ handoffProcedureRate
433
+ handoffNeedRate
434
+ abandonmentRate
435
+ classificationDefinitionVersion
436
+ analyzedConversations
437
+ estimatedSatisfactionAvg
438
+ sentimentAtStart {
439
+ key
440
+ count
441
+ }
442
+ sentimentAtEnd {
443
+ key
444
+ count
445
+ }
446
+ riskAlerts {
447
+ key
448
+ count
449
+ }
450
+ topKnowledgeGaps {
451
+ key
452
+ count
453
+ }
454
+ analysisCostMicroUsd
455
+ failedAnalyses
456
+ analysesTruncated
457
+ agentScoreAvg
458
+ agentScoreAvgBand
459
+ agentScoreBands {
460
+ key
461
+ count
462
+ }
463
+ agentClarityAvg
464
+ customerEffortScoreAvg
465
+ contactReasons {
466
+ all {
467
+ key
468
+ count
469
+ }
470
+ handoff {
471
+ key
472
+ count
473
+ }
474
+ abandonment {
475
+ key
476
+ count
477
+ }
478
+ }
334
479
  escalatedToHuman
335
480
  escalatedToFlow
336
481
  escalatedTargetUndeclared
@@ -573,6 +718,12 @@ exports.AiAgentConversationMetricsDocument = `
573
718
  costMicroUsd
574
719
  durationMs
575
720
  lastOutcome
721
+ state
722
+ status
723
+ subcategory
724
+ contactReason
725
+ contactReasonTag
726
+ channelType
576
727
  }
577
728
  }
578
729
  `;
@@ -590,6 +741,59 @@ exports.AiAgentConversationOutcomeDocument = `
590
741
  startedAt
591
742
  lastTurnAt
592
743
  haltReason
744
+ handoffReason
745
+ agentSummary
746
+ promisedNextStep
747
+ classification {
748
+ state
749
+ classification
750
+ subcategory
751
+ technicalFailure
752
+ eligibleForResolution
753
+ consumesAllowance
754
+ inactivityWindowMs
755
+ definitionVersion
756
+ }
757
+ channelType
758
+ actions {
759
+ toolId
760
+ name
761
+ ok
762
+ result
763
+ at
764
+ }
765
+ contactReason {
766
+ name
767
+ useCaseId
768
+ tag
769
+ other
770
+ source
771
+ }
772
+ analysis {
773
+ analysisVersion
774
+ failed
775
+ failureReason
776
+ sentimentStart
777
+ sentimentEnd
778
+ estimatedSatisfaction
779
+ riskAlerts
780
+ knowledgeGaps
781
+ repeatedInformation
782
+ humanRequests
783
+ contactReason
784
+ contactReasonId
785
+ contactReasonTag
786
+ contactReasonOther
787
+ contactReasonSource
788
+ summary
789
+ agentScore
790
+ agentScoreBand
791
+ agentClarity
792
+ customerEffortScore
793
+ model
794
+ costMicroUsd
795
+ analyzedAt
796
+ }
593
797
  }
594
798
  }
595
799
  `;