@metad/contracts 3.6.2 → 3.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,10 +11,10 @@ import { IXpertToolset } from './xpert-toolset.model';
11
11
  import { IBasePerWorkspaceEntityModel } from './xpert-workspace.model';
12
12
  import { IIntegration } from '../integration.model';
13
13
  import { TChatFrom, TSensitiveOperation } from './chat.model';
14
- import { IWorkflowNode, TVariableAssigner, VariableOperationEnum } from './xpert-workflow.model';
14
+ import { IWorkflowNode, TVariableAssigner, TWFCase, VariableOperationEnum } from './xpert-workflow.model';
15
15
  import { IEnvironment } from './environment.model';
16
16
  import { IStorageFile } from '../storage-file.model';
17
- import { STATE_VARIABLE_HUMAN, TInterruptCommand } from '../agent';
17
+ import { STATE_VARIABLE_HUMAN, TInterruptCommand } from '../agent/graph';
18
18
  export type ToolCall = LToolCall;
19
19
  export declare enum XpertTypeEnum {
20
20
  /**
@@ -237,9 +237,13 @@ export type TXpertAgentConfig = {
237
237
  */
238
238
  mute?: string[][];
239
239
  /**
240
- * Recall params
240
+ * Recall knowledge params
241
241
  */
242
242
  recalls?: Record<string, TKBRecallParams>;
243
+ /**
244
+ * Retrieval params for every knowledgebase
245
+ */
246
+ retrievals?: Record<string, TKBRetrievalSettings>;
243
247
  /**
244
248
  * Summarize the title of the conversation
245
249
  */
@@ -329,7 +333,9 @@ export declare enum XpertParameterTypeEnum {
329
333
  NUMBER = "number",
330
334
  OBJECT = "object",
331
335
  SELECT = "select",
336
+ FILE = "file",
332
337
  ARRAY_STRING = "array[string]",
338
+ ARRAY_NUMBER = "array[number]",
333
339
  ARRAY = "array[object]",
334
340
  ARRAY_FILE = "array[file]",
335
341
  ARRAY_DOCUMENT = "array[document]",
@@ -527,3 +533,19 @@ export type TChatOptions = {
527
533
  */
528
534
  tools?: (StructuredToolInterface | RunnableToolLike)[];
529
535
  };
536
+ /**
537
+ * Knowledgebase retrieval settings
538
+ */
539
+ export type TKBRetrievalSettings = {
540
+ metadata: {
541
+ filtering_mode: "disabled" | "automatic" | "manual";
542
+ /**
543
+ * Conditions (filter) when mode is manual
544
+ */
545
+ filtering_conditions: TWFCase;
546
+ /**
547
+ * Parameter fields (tool call) when mode is automatic
548
+ */
549
+ fields: Record<string, object>;
550
+ };
551
+ };
@@ -3,8 +3,6 @@ import { IXpertAgent } from './xpert-agent.model';
3
3
  import { IXpert, TXpertTeamNode } from './xpert.model';
4
4
  export declare function omitXpertRelations(xpert: Partial<IXpert>): {
5
5
  environmentId?: string;
6
- environment?: import("./environment.model").IEnvironment;
7
- knowledgebase?: import("./knowledgebase.model").IKnowledgebase;
8
6
  workspaceId?: string;
9
7
  workspace?: import("./xpert-workspace.model").IXpertWorkspace;
10
8
  publishAt?: Date;
@@ -44,7 +42,6 @@ export declare function omitXpertRelations(xpert: Partial<IXpert>): {
44
42
  user?: import("..").IUser;
45
43
  copilotModel?: import("./copilot-model.model").ICopilotModel;
46
44
  copilotModelId?: string;
47
- integrations?: import("..").IIntegration<any>[];
48
45
  tags?: import("..").ITag[];
49
46
  };
50
47
  export declare function figureOutXpert(xpert: IXpert, isDraft: boolean): Partial<IXpert>;
@@ -3,6 +3,7 @@ export type TGatewayQueryEvent = {
3
3
  id: string;
4
4
  organizationId: string;
5
5
  dataSourceId: string;
6
+ tenantId?: string;
6
7
  modelId?: string;
7
8
  isDraft: boolean;
8
9
  body: {
@@ -47,6 +47,10 @@ export type TIndicator = {
47
47
  };
48
48
  businessAreaId?: string;
49
49
  };
50
+ /**
51
+ * Fields included in the draft of Indicator, please keep it in sync with TIndicator type
52
+ */
53
+ export declare const IndicatorDraftFields: Array<keyof IIndicator>;
50
54
  export type TIndicatorDraft = TIndicator & {
51
55
  checklist?: ChecklistItem[];
52
56
  version?: number;
@@ -54,12 +58,6 @@ export type TIndicatorDraft = TIndicator & {
54
58
  };
55
59
  export interface IIndicator extends IBasePerProjectEntityModel, TIndicator {
56
60
  draft?: TIndicatorDraft;
57
- /**
58
- * Is active: Activate / Deactivate
59
- *
60
- * @deprecated use status instead
61
- */
62
- isActive?: boolean;
63
61
  /**
64
62
  * Visibilty in public or secret or private
65
63
  */
@@ -72,6 +70,7 @@ export interface IIndicator extends IBasePerProjectEntityModel, TIndicator {
72
70
  status?: IndicatorStatusEnum;
73
71
  embeddingStatus?: EmbeddingStatusEnum;
74
72
  error?: string;
73
+ publishedAt?: Date;
75
74
  businessArea?: IBusinessArea;
76
75
  permissionApprovals?: IPermissionApproval[];
77
76
  tags?: ITag[];
@@ -20,6 +20,7 @@ export type SemanticModelEntityJob = {
20
20
  error?: string;
21
21
  createdAt?: Date;
22
22
  endAt?: Date;
23
+ tokens?: number;
23
24
  };
24
25
  export interface ISemanticModelEntity extends IBasePerTenantAndOrganizationEntityModel {
25
26
  name?: string;
@@ -19,6 +19,9 @@ export interface ISemanticModelMember extends IBasePerTenantAndOrganizationEntit
19
19
  memberType: number;
20
20
  levelNumber: number;
21
21
  parentUniqueName: string;
22
+ metadata?: {
23
+ tokens: number;
24
+ };
22
25
  vector?: boolean;
23
26
  }
24
27
  export declare function embeddingCubeCollectionName(modelKey: string, cube: string, isDraft?: boolean): string;
@@ -160,6 +160,14 @@ export declare enum SemanticModelStatusEnum {
160
160
  */
161
161
  Archived = "archived"
162
162
  }
163
+ export interface ISemanticModelCache extends IBasePerTenantAndOrganizationEntityModel {
164
+ key: string;
165
+ language?: string;
166
+ modelId?: string;
167
+ model?: ISemanticModel;
168
+ query?: string;
169
+ data?: string;
170
+ }
163
171
  /**
164
172
  * @deprecated Equivalent to `VirtualCube` in the ocap framework
165
173
  */
package/src/plugin.d.ts CHANGED
@@ -4,7 +4,7 @@ export interface PluginMeta {
4
4
  name: PluginName;
5
5
  version: string;
6
6
  icon?: IconDefinition;
7
- category: 'set' | 'doc-source' | 'agent' | 'tools' | 'model' | 'vlm' | 'vector-store' | 'integration' | 'datasource';
7
+ category: 'set' | 'doc-source' | 'agent' | 'tools' | 'model' | 'vlm' | 'vector-store' | 'integration' | 'datasource' | 'database' | 'middleware';
8
8
  displayName: string;
9
9
  description: string;
10
10
  keywords?: string[];
package/src/types.d.ts CHANGED
@@ -1,5 +1,6 @@
1
- import ShortUniqueId from 'short-unique-id';
2
- export declare const uuid: ShortUniqueId;
1
+ import type * as z3 from "zod/v3";
2
+ import type * as z4 from "zod/v4/core";
3
+ export declare const uuid: (uuidLength?: number) => string;
3
4
  /**
4
5
  * @description
5
6
  * An entity ID. Represents a unique identifier as a string.
@@ -239,3 +240,6 @@ export interface IconDefinition {
239
240
  */
240
241
  style?: Record<string, string>;
241
242
  }
243
+ export type ZodObjectV3 = z3.ZodObject<any, any, any, any>;
244
+ export type ZodObjectV4 = z4.$ZodObject;
245
+ export type InteropZodObject = ZodObjectV3 | ZodObjectV4;