@droz-js/sdk 0.19.24 → 0.19.26
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 +1 -1
- package/src/drozai.d.ts +3 -0
- package/src/sdks/ai.d.ts +35 -3
- package/src/sdks/ai.js +13 -1
package/package.json
CHANGED
package/src/drozai.d.ts
CHANGED
|
@@ -96,6 +96,9 @@ declare const DrozAi_base: new (options?: import("./client/http").HttpClientOpti
|
|
|
96
96
|
aiAgentRoutingPreview(variables: import("./sdks/ai").Exact<{
|
|
97
97
|
input: import("./sdks/ai").AiAgentRoutingPreviewInput;
|
|
98
98
|
}>, options?: unknown): Promise<import("./sdks/ai").AiAgentRoutingPreviewQuery>;
|
|
99
|
+
aiAgentKnowledgeBases(variables: import("./sdks/ai").Exact<{
|
|
100
|
+
credentialRef: import("./sdks/ai").Scalars["ID"]["input"];
|
|
101
|
+
}>, options?: unknown): Promise<import("./sdks/ai").AiAgentKnowledgeBasesQuery>;
|
|
99
102
|
extractImageMetadata(variables: import("./sdks/ai").Exact<{
|
|
100
103
|
input: import("./sdks/ai").ExtractImageMetadataInput;
|
|
101
104
|
}>, options?: unknown): Promise<import("./sdks/ai").ExtractImageMetadataMutation>;
|
package/src/sdks/ai.d.ts
CHANGED
|
@@ -229,6 +229,10 @@ export type AiAgentIdentityInput = {
|
|
|
229
229
|
tone: TonePreset;
|
|
230
230
|
toneNotes?: InputMaybe<Scalars['String']['input']>;
|
|
231
231
|
};
|
|
232
|
+
export type AiAgentKnowledgeBase = {
|
|
233
|
+
id: Scalars['ID']['output'];
|
|
234
|
+
title: Scalars['String']['output'];
|
|
235
|
+
};
|
|
232
236
|
export type AiAgentMetrics = {
|
|
233
237
|
agentId: Scalars['ID']['output'];
|
|
234
238
|
answeredTurns: Scalars['Number']['output'];
|
|
@@ -422,7 +426,13 @@ export type AiAgentSpec = {
|
|
|
422
426
|
channels?: Maybe<Array<Scalars['String']['output']>>;
|
|
423
427
|
handoff?: Maybe<AiAgentHandoff>;
|
|
424
428
|
identity: AiAgentIdentity;
|
|
429
|
+
/**
|
|
430
|
+
* §4.8: bases do Droz Base vinculadas — ids de **space**, nao de credencial. A consulta e recortada
|
|
431
|
+
* por elas; sem recorte o agente varreria o acervo inteiro do tenant.
|
|
432
|
+
*/
|
|
425
433
|
knowledgeBaseIds: Array<Scalars['ID']['output']>;
|
|
434
|
+
/** Credencial do Droz Base. Obrigatoria quando ha base vinculada. */
|
|
435
|
+
knowledgeCredentialRef?: Maybe<Scalars['ID']['output']>;
|
|
426
436
|
/** `inform_limitation` (default) ou `general_knowledge`; ausente vale o mais restritivo. */
|
|
427
437
|
knowledgeFallback?: Maybe<Scalars['String']['output']>;
|
|
428
438
|
toolIds: Array<Scalars['ID']['output']>;
|
|
@@ -434,7 +444,13 @@ export type AiAgentSpecInput = {
|
|
|
434
444
|
channels?: InputMaybe<Array<Scalars['String']['input']>>;
|
|
435
445
|
handoff?: InputMaybe<AiAgentHandoffInput>;
|
|
436
446
|
identity: AiAgentIdentityInput;
|
|
447
|
+
/**
|
|
448
|
+
* §4.8: bases do Droz Base vinculadas — ids de **space**, nao de credencial. A consulta e recortada
|
|
449
|
+
* por elas; sem recorte o agente varreria o acervo inteiro do tenant.
|
|
450
|
+
*/
|
|
437
451
|
knowledgeBaseIds: Array<Scalars['ID']['input']>;
|
|
452
|
+
/** Credencial do Droz Base. Obrigatoria quando ha base vinculada. */
|
|
453
|
+
knowledgeCredentialRef?: InputMaybe<Scalars['ID']['input']>;
|
|
438
454
|
/** `inform_limitation` (default) ou `general_knowledge`; ausente vale o mais restritivo. */
|
|
439
455
|
knowledgeFallback?: InputMaybe<Scalars['String']['input']>;
|
|
440
456
|
toolIds: Array<Scalars['ID']['input']>;
|
|
@@ -789,6 +805,11 @@ export type QnAInstance = {
|
|
|
789
805
|
export type Query = {
|
|
790
806
|
aiAgentConversationMetrics: Array<AiAgentConversationMetrics>;
|
|
791
807
|
aiAgentConversationOutcome?: Maybe<AiAgentConversationOutcome>;
|
|
808
|
+
/**
|
|
809
|
+
* §4.8: as bases do Droz Base que a credencial enxerga. Quem lista e quem consulta e a mesma
|
|
810
|
+
* credencial — o autor escolhe o que o agente vai alcancar, nao uma lista maior.
|
|
811
|
+
*/
|
|
812
|
+
aiAgentKnowledgeBases: Array<AiAgentKnowledgeBase>;
|
|
792
813
|
aiAgentMetrics: AiAgentMetrics;
|
|
793
814
|
/** As metricas da janela para todos os agentes, numa ida so. Agente sem rastro vem com zeros. */
|
|
794
815
|
aiAgentMetricsByAgent: Array<AiAgentMetrics>;
|
|
@@ -833,6 +854,9 @@ export type QueryAiAgentConversationMetricsArgs = {
|
|
|
833
854
|
export type QueryAiAgentConversationOutcomeArgs = {
|
|
834
855
|
sessionId: Scalars['ID']['input'];
|
|
835
856
|
};
|
|
857
|
+
export type QueryAiAgentKnowledgeBasesArgs = {
|
|
858
|
+
credentialRef: Scalars['ID']['input'];
|
|
859
|
+
};
|
|
836
860
|
export type QueryAiAgentMetricsArgs = {
|
|
837
861
|
input: AiAgentMetricsInput;
|
|
838
862
|
};
|
|
@@ -1045,7 +1069,7 @@ export type UpdateQnAInstanceInput = {
|
|
|
1045
1069
|
};
|
|
1046
1070
|
export type AiAgentSummaryFragment = Pick<AiAgentSummary, 'agentId' | 'name' | 'liveVersion' | 'channels' | 'updatedAt' | 'queuedApprovals' | 'status'>;
|
|
1047
1071
|
export type AiAgentVersionFragment = Pick<AiAgentVersion, 'agentId' | 'version' | 'status' | 'createdAt'>;
|
|
1048
|
-
export type AiAgentSpecFragment = (Pick<AiAgentSpec, 'can' | 'cannot' | 'knowledgeBaseIds' | 'knowledgeFallback' | 'toolIds' | 'channels'> & {
|
|
1072
|
+
export type AiAgentSpecFragment = (Pick<AiAgentSpec, 'can' | 'cannot' | 'knowledgeBaseIds' | 'knowledgeCredentialRef' | 'knowledgeFallback' | 'toolIds' | 'channels'> & {
|
|
1049
1073
|
identity: Pick<AiAgentIdentity, 'displayName' | 'role' | 'tone' | 'toneNotes' | 'openingMessage' | 'outOfScopeBehaviour'>;
|
|
1050
1074
|
budget: Pick<AiAgentBudget, 'maxSteps' | 'maxToolCalls' | 'maxTokens' | 'maxCostMicroUsd' | 'maxPeriodCostMicroUsd' | 'onExceeded'>;
|
|
1051
1075
|
handoff?: Maybe<Pick<AiAgentHandoff, 'transition' | 'target'>>;
|
|
@@ -1242,6 +1266,12 @@ export type AiAgentRoutingPreviewQuery = {
|
|
|
1242
1266
|
examples: Array<Pick<AiAgentRoutedExample, 'message' | 'useCaseId' | 'score' | 'confidence'>>;
|
|
1243
1267
|
});
|
|
1244
1268
|
};
|
|
1269
|
+
export type AiAgentKnowledgeBasesQueryVariables = Exact<{
|
|
1270
|
+
credentialRef: Scalars['ID']['input'];
|
|
1271
|
+
}>;
|
|
1272
|
+
export type AiAgentKnowledgeBasesQuery = {
|
|
1273
|
+
aiAgentKnowledgeBases: Array<Pick<AiAgentKnowledgeBase, 'id' | 'title'>>;
|
|
1274
|
+
};
|
|
1245
1275
|
export type ExtractImageMetadataMutationVariables = Exact<{
|
|
1246
1276
|
input: ExtractImageMetadataInput;
|
|
1247
1277
|
}>;
|
|
@@ -1333,7 +1363,7 @@ export type RemoveQnAInstanceMutation = {
|
|
|
1333
1363
|
};
|
|
1334
1364
|
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 ";
|
|
1335
1365
|
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 ";
|
|
1366
|
+
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 knowledgeCredentialRef\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
1367
|
export declare const AiAgentVersionWithSpecFragmentDoc = "\n fragment aiAgentVersionWithSpec on AiAgentVersion {\n agentId\n version\n status\n createdAt\n spec {\n ...aiAgentSpec\n }\n}\n ";
|
|
1338
1368
|
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
1369
|
export declare const AiAgentUseCaseFragmentDoc = "\n fragment aiAgentUseCase on AiAgentUseCase {\n id\n name\n subjectDescription\n procedureId\n status\n updatedAt\n}\n ";
|
|
@@ -1371,8 +1401,9 @@ export declare const UnregisterAiAgentToolDocument = "\n mutation unregisterA
|
|
|
1371
1401
|
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
1402
|
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
1403
|
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 ";
|
|
1404
|
+
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 knowledgeCredentialRef\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
1405
|
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 ";
|
|
1406
|
+
export declare const AiAgentKnowledgeBasesDocument = "\n query aiAgentKnowledgeBases($credentialRef: ID!) {\n aiAgentKnowledgeBases(credentialRef: $credentialRef) {\n id\n title\n }\n}\n ";
|
|
1376
1407
|
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 ";
|
|
1377
1408
|
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 ";
|
|
1378
1409
|
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 ";
|
|
@@ -1418,6 +1449,7 @@ export declare function getSdk<C>(requester: Requester<C>): {
|
|
|
1418
1449
|
aiAgentMetrics(variables: AiAgentMetricsQueryVariables, options?: C): Promise<AiAgentMetricsQuery>;
|
|
1419
1450
|
aiAgentVersionSpec(variables: AiAgentVersionSpecQueryVariables, options?: C): Promise<AiAgentVersionSpecQuery>;
|
|
1420
1451
|
aiAgentRoutingPreview(variables: AiAgentRoutingPreviewQueryVariables, options?: C): Promise<AiAgentRoutingPreviewQuery>;
|
|
1452
|
+
aiAgentKnowledgeBases(variables: AiAgentKnowledgeBasesQueryVariables, options?: C): Promise<AiAgentKnowledgeBasesQuery>;
|
|
1421
1453
|
extractImageMetadata(variables: ExtractImageMetadataMutationVariables, options?: C): Promise<ExtractImageMetadataMutation>;
|
|
1422
1454
|
getNlpInstance(variables: GetNlpInstanceQueryVariables, options?: C): Promise<GetNlpInstanceQuery>;
|
|
1423
1455
|
listNlpInstances(variables?: ListNlpInstancesQueryVariables, options?: C): Promise<ListNlpInstancesQuery>;
|
package/src/sdks/ai.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* istanbul ignore file */
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
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
|
+
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 = void 0;
|
|
6
6
|
exports.getSdk = getSdk;
|
|
7
7
|
var AiAgentVersionStatus;
|
|
8
8
|
(function (AiAgentVersionStatus) {
|
|
@@ -112,6 +112,7 @@ exports.AiAgentSpecFragmentDoc = `
|
|
|
112
112
|
can
|
|
113
113
|
cannot
|
|
114
114
|
knowledgeBaseIds
|
|
115
|
+
knowledgeCredentialRef
|
|
115
116
|
knowledgeFallback
|
|
116
117
|
toolIds
|
|
117
118
|
budget {
|
|
@@ -500,6 +501,14 @@ exports.AiAgentRoutingPreviewDocument = `
|
|
|
500
501
|
}
|
|
501
502
|
}
|
|
502
503
|
`;
|
|
504
|
+
exports.AiAgentKnowledgeBasesDocument = `
|
|
505
|
+
query aiAgentKnowledgeBases($credentialRef: ID!) {
|
|
506
|
+
aiAgentKnowledgeBases(credentialRef: $credentialRef) {
|
|
507
|
+
id
|
|
508
|
+
title
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
`;
|
|
503
512
|
exports.ExtractImageMetadataDocument = `
|
|
504
513
|
mutation extractImageMetadata($input: ExtractImageMetadataInput!) {
|
|
505
514
|
extractImageMetadata(input: $input) {
|
|
@@ -697,6 +706,9 @@ function getSdk(requester) {
|
|
|
697
706
|
aiAgentRoutingPreview(variables, options) {
|
|
698
707
|
return requester(exports.AiAgentRoutingPreviewDocument, variables, options);
|
|
699
708
|
},
|
|
709
|
+
aiAgentKnowledgeBases(variables, options) {
|
|
710
|
+
return requester(exports.AiAgentKnowledgeBasesDocument, variables, options);
|
|
711
|
+
},
|
|
700
712
|
extractImageMetadata(variables, options) {
|
|
701
713
|
return requester(exports.ExtractImageMetadataDocument, variables, options);
|
|
702
714
|
},
|