@tolinax/ayoune-interfaces 2026.16.0 → 2026.18.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.
Files changed (56) hide show
  1. package/data/modelNames.d.ts +21 -0
  2. package/data/modelNames.js +21 -0
  3. package/data/modelsAndRights.js +150 -0
  4. package/interfaces/IAIAgent.d.ts +65 -1
  5. package/interfaces/IAIAgentCalibrationLog.d.ts +16 -0
  6. package/interfaces/IAIAgentCalibrationLog.js +2 -0
  7. package/interfaces/IAIAgentExample.d.ts +24 -0
  8. package/interfaces/IAIAgentExample.js +2 -0
  9. package/interfaces/IAICommand.d.ts +36 -0
  10. package/interfaces/IAICommand.js +2 -0
  11. package/interfaces/IAIConversation.d.ts +16 -0
  12. package/interfaces/IAICostTracker.d.ts +29 -0
  13. package/interfaces/IAICostTracker.js +2 -0
  14. package/interfaces/IAICronJob.d.ts +25 -0
  15. package/interfaces/IAICronJob.js +2 -0
  16. package/interfaces/IAIEnterpriseControl.d.ts +37 -0
  17. package/interfaces/IAIEnterpriseControl.js +2 -0
  18. package/interfaces/IAIHook.d.ts +35 -0
  19. package/interfaces/IAIHook.js +2 -0
  20. package/interfaces/IAIKnowledgePack.d.ts +26 -0
  21. package/interfaces/IAIKnowledgePack.js +2 -0
  22. package/interfaces/IAILog.d.ts +9 -0
  23. package/interfaces/IAIMemory.d.ts +18 -0
  24. package/interfaces/IAIMemory.js +2 -0
  25. package/interfaces/IAIOutputStyle.d.ts +20 -0
  26. package/interfaces/IAIOutputStyle.js +2 -0
  27. package/interfaces/IAIPlugin.d.ts +29 -0
  28. package/interfaces/IAIPlugin.js +2 -0
  29. package/interfaces/IAITool.d.ts +40 -0
  30. package/interfaces/IAITool.js +2 -0
  31. package/interfaces/IAIWorkflow.d.ts +45 -0
  32. package/interfaces/IAIWorkflow.js +2 -0
  33. package/interfaces/IAIWorkflowRun.d.ts +34 -0
  34. package/interfaces/IAIWorkflowRun.js +2 -0
  35. package/interfaces/IAdCampaign.d.ts +16 -0
  36. package/interfaces/IAdGroup.d.ts +16 -0
  37. package/interfaces/IGoogleAdsAudienceSync.d.ts +13 -0
  38. package/interfaces/IGoogleAdsAudienceSync.js +2 -0
  39. package/interfaces/IGoogleAdsCampaignCriterion.d.ts +27 -0
  40. package/interfaces/IGoogleAdsCampaignCriterion.js +2 -0
  41. package/interfaces/IGoogleAdsChangeLog.d.ts +14 -0
  42. package/interfaces/IGoogleAdsChangeLog.js +2 -0
  43. package/interfaces/IGoogleAdsConversion.d.ts +17 -0
  44. package/interfaces/IGoogleAdsConversion.js +2 -0
  45. package/interfaces/IGoogleAdsSharedCriterion.d.ts +17 -0
  46. package/interfaces/IGoogleAdsSharedCriterion.js +2 -0
  47. package/interfaces/IGoogleAdsUserList.d.ts +20 -0
  48. package/interfaces/IGoogleAdsUserList.js +2 -0
  49. package/interfaces/IKnowledgeChunk.d.ts +48 -0
  50. package/interfaces/INotificationPreference.d.ts +8 -0
  51. package/interfaces/INotificationPreference.js +2 -0
  52. package/interfaces/IWebPage.d.ts +5 -0
  53. package/interfaces/IWebsite.d.ts +26 -0
  54. package/interfaces/index.d.ts +21 -0
  55. package/interfaces/index.js +21 -0
  56. package/package.json +1 -1
@@ -25,13 +25,27 @@ export declare enum aMN {
25
25
  AffViews = "AffViews",
26
26
  Agencies = "Agencies",
27
27
  AgendaJobs = "AgendaJobs",
28
+ AIAgentCalibrationLogs = "AIAgentCalibrationLogs",
29
+ AIAgentExamples = "AIAgentExamples",
28
30
  AIAgents = "AIAgents",
31
+ AICommands = "AICommands",
29
32
  AIConversations = "AIConversations",
33
+ AICostTrackers = "AICostTrackers",
34
+ AICronJobs = "AICronJobs",
35
+ AIEnterpriseControls = "AIEnterpriseControls",
36
+ AIHooks = "AIHooks",
37
+ AIKnowledgePacks = "AIKnowledgePacks",
30
38
  AILogs = "AILogs",
39
+ AIMemories = "AIMemories",
31
40
  AIMessages = "AIMessages",
32
41
  AIModelCatalog = "AIModelCatalog",
42
+ AIOutputStyles = "AIOutputStyles",
43
+ AIPlugins = "AIPlugins",
33
44
  AIProviders = "AIProviders",
34
45
  AIPrompts = "AIPrompts",
46
+ AITools = "AITools",
47
+ AIWorkflowRuns = "AIWorkflowRuns",
48
+ AIWorkflows = "AIWorkflows",
35
49
  Alerts = "Alerts",
36
50
  Announcements = "Announcements",
37
51
  APILogs = "APILogs",
@@ -294,6 +308,12 @@ export declare enum aMN {
294
308
  GratifyLoopViews = "GratifyLoopViews",
295
309
  GoodsReceipts = "GoodsReceipts",
296
310
  GoogleAssistantIntents = "GoogleAssistantIntents",
311
+ GoogleAdsAudienceSyncs = "GoogleAdsAudienceSyncs",
312
+ GoogleAdsCampaignCriteria = "GoogleAdsCampaignCriteria",
313
+ GoogleAdsChangeLogs = "GoogleAdsChangeLogs",
314
+ GoogleAdsConversions = "GoogleAdsConversions",
315
+ GoogleAdsSharedCriteria = "GoogleAdsSharedCriteria",
316
+ GoogleAdsUserLists = "GoogleAdsUserLists",
297
317
  HashTags = "HashTags",
298
318
  Hooks = "Hooks",
299
319
  HookTemplates = "HookTemplates",
@@ -406,6 +426,7 @@ export declare enum aMN {
406
426
  NewsSources = "NewsSources",
407
427
  Notifications = "Notifications",
408
428
  NotificationPolicies = "NotificationPolicies",
429
+ NotificationPreferences = "NotificationPreferences",
409
430
  OfferCalculations = "OfferCalculations",
410
431
  OfferCalculationSchemas = "OfferCalculationSchemas",
411
432
  Offers = "Offers",
@@ -29,13 +29,27 @@ var aMN;
29
29
  aMN["AffViews"] = "AffViews";
30
30
  aMN["Agencies"] = "Agencies";
31
31
  aMN["AgendaJobs"] = "AgendaJobs";
32
+ aMN["AIAgentCalibrationLogs"] = "AIAgentCalibrationLogs";
33
+ aMN["AIAgentExamples"] = "AIAgentExamples";
32
34
  aMN["AIAgents"] = "AIAgents";
35
+ aMN["AICommands"] = "AICommands";
33
36
  aMN["AIConversations"] = "AIConversations";
37
+ aMN["AICostTrackers"] = "AICostTrackers";
38
+ aMN["AICronJobs"] = "AICronJobs";
39
+ aMN["AIEnterpriseControls"] = "AIEnterpriseControls";
40
+ aMN["AIHooks"] = "AIHooks";
41
+ aMN["AIKnowledgePacks"] = "AIKnowledgePacks";
34
42
  aMN["AILogs"] = "AILogs";
43
+ aMN["AIMemories"] = "AIMemories";
35
44
  aMN["AIMessages"] = "AIMessages";
36
45
  aMN["AIModelCatalog"] = "AIModelCatalog";
46
+ aMN["AIOutputStyles"] = "AIOutputStyles";
47
+ aMN["AIPlugins"] = "AIPlugins";
37
48
  aMN["AIProviders"] = "AIProviders";
38
49
  aMN["AIPrompts"] = "AIPrompts";
50
+ aMN["AITools"] = "AITools";
51
+ aMN["AIWorkflowRuns"] = "AIWorkflowRuns";
52
+ aMN["AIWorkflows"] = "AIWorkflows";
39
53
  aMN["Alerts"] = "Alerts";
40
54
  aMN["Announcements"] = "Announcements";
41
55
  aMN["APILogs"] = "APILogs";
@@ -298,6 +312,12 @@ var aMN;
298
312
  aMN["GratifyLoopViews"] = "GratifyLoopViews";
299
313
  aMN["GoodsReceipts"] = "GoodsReceipts";
300
314
  aMN["GoogleAssistantIntents"] = "GoogleAssistantIntents";
315
+ aMN["GoogleAdsAudienceSyncs"] = "GoogleAdsAudienceSyncs";
316
+ aMN["GoogleAdsCampaignCriteria"] = "GoogleAdsCampaignCriteria";
317
+ aMN["GoogleAdsChangeLogs"] = "GoogleAdsChangeLogs";
318
+ aMN["GoogleAdsConversions"] = "GoogleAdsConversions";
319
+ aMN["GoogleAdsSharedCriteria"] = "GoogleAdsSharedCriteria";
320
+ aMN["GoogleAdsUserLists"] = "GoogleAdsUserLists";
301
321
  aMN["HashTags"] = "HashTags";
302
322
  aMN["Hooks"] = "Hooks";
303
323
  aMN["HookTemplates"] = "HookTemplates";
@@ -410,6 +430,7 @@ var aMN;
410
430
  aMN["NewsSources"] = "NewsSources";
411
431
  aMN["Notifications"] = "Notifications";
412
432
  aMN["NotificationPolicies"] = "NotificationPolicies";
433
+ aMN["NotificationPreferences"] = "NotificationPreferences";
413
434
  aMN["OfferCalculations"] = "OfferCalculations";
414
435
  aMN["OfferCalculationSchemas"] = "OfferCalculationSchemas";
415
436
  aMN["Offers"] = "Offers";
@@ -912,6 +912,146 @@ const modelsAndRights = [
912
912
  allowDuplicate: false,
913
913
  updateBy: "_id",
914
914
  },
915
+ {
916
+ plural: "AIAgentExamples",
917
+ singular: "AIAgentExample",
918
+ module: "ai",
919
+ right: "ai.aiagentexamples",
920
+ readOnly: false,
921
+ importable: false,
922
+ allowDuplicate: false,
923
+ updateBy: "_id",
924
+ },
925
+ {
926
+ plural: "AIAgentCalibrationLogs",
927
+ singular: "AIAgentCalibrationLog",
928
+ module: "ai",
929
+ right: "ai.aiagentcalibrationlogs",
930
+ readOnly: true,
931
+ importable: false,
932
+ allowDuplicate: false,
933
+ updateBy: "_id",
934
+ },
935
+ {
936
+ plural: "AIKnowledgePacks",
937
+ singular: "AIKnowledgePack",
938
+ module: "ai",
939
+ right: "ai.aiknowledgepacks",
940
+ readOnly: false,
941
+ importable: false,
942
+ allowDuplicate: true,
943
+ updateBy: "_id",
944
+ },
945
+ {
946
+ plural: "AIHooks",
947
+ singular: "AIHook",
948
+ module: "ai",
949
+ right: "ai.aihooks",
950
+ readOnly: false,
951
+ importable: false,
952
+ allowDuplicate: false,
953
+ updateBy: "_id",
954
+ },
955
+ {
956
+ plural: "AICommands",
957
+ singular: "AICommand",
958
+ module: "ai",
959
+ right: "ai.aicommands",
960
+ readOnly: false,
961
+ importable: false,
962
+ allowDuplicate: false,
963
+ updateBy: "_id",
964
+ },
965
+ {
966
+ plural: "AITools",
967
+ singular: "AITool",
968
+ module: "ai",
969
+ right: "ai.aitools",
970
+ readOnly: false,
971
+ importable: false,
972
+ allowDuplicate: false,
973
+ updateBy: "_id",
974
+ },
975
+ {
976
+ plural: "AIWorkflows",
977
+ singular: "AIWorkflow",
978
+ module: "ai",
979
+ right: "ai.aiworkflows",
980
+ readOnly: false,
981
+ importable: false,
982
+ allowDuplicate: true,
983
+ updateBy: "_id",
984
+ },
985
+ {
986
+ plural: "AIWorkflowRuns",
987
+ singular: "AIWorkflowRun",
988
+ module: "ai",
989
+ right: "ai.aiworkflowruns",
990
+ readOnly: true,
991
+ importable: false,
992
+ allowDuplicate: false,
993
+ updateBy: "_id",
994
+ },
995
+ {
996
+ plural: "AIPlugins",
997
+ singular: "AIPlugin",
998
+ module: "ai",
999
+ right: "ai.aiplugins",
1000
+ readOnly: false,
1001
+ importable: false,
1002
+ allowDuplicate: false,
1003
+ updateBy: "_id",
1004
+ },
1005
+ {
1006
+ plural: "AIEnterpriseControls",
1007
+ singular: "AIEnterpriseControl",
1008
+ module: "ai",
1009
+ right: "ai.aienterprisecontrols",
1010
+ readOnly: false,
1011
+ importable: false,
1012
+ allowDuplicate: false,
1013
+ updateBy: "_id",
1014
+ },
1015
+ {
1016
+ plural: "AIMemories",
1017
+ singular: "AIMemory",
1018
+ module: "ai",
1019
+ right: "ai.aimemories",
1020
+ readOnly: false,
1021
+ importable: false,
1022
+ allowDuplicate: false,
1023
+ updateBy: "_id",
1024
+ },
1025
+ {
1026
+ plural: "AICronJobs",
1027
+ singular: "AICronJob",
1028
+ module: "ai",
1029
+ right: "ai.aicronjobs",
1030
+ readOnly: false,
1031
+ importable: false,
1032
+ allowDuplicate: false,
1033
+ updateBy: "_id",
1034
+ },
1035
+ {
1036
+ plural: "AICostTrackers",
1037
+ singular: "AICostTracker",
1038
+ module: "ai",
1039
+ right: "ai.aicosttrackers",
1040
+ readOnly: true,
1041
+ importable: false,
1042
+ allowDuplicate: false,
1043
+ updateBy: "_id",
1044
+ },
1045
+ {
1046
+ plural: "AIOutputStyles",
1047
+ singular: "AIOutputStyle",
1048
+ module: "ai",
1049
+ right: "ai.aioutputstyles",
1050
+ readOnly: false,
1051
+ importable: false,
1052
+ allowDuplicate: true,
1053
+ updateBy: "_id",
1054
+ },
915
1055
  {
916
1056
  plural: "APILogs",
917
1057
  singular: "APILog",
@@ -4266,6 +4406,16 @@ const modelsAndRights = [
4266
4406
  allowDuplicate: true,
4267
4407
  updateBy: "_id",
4268
4408
  },
4409
+ {
4410
+ plural: "NotificationPreferences",
4411
+ singular: "NotificationPreference",
4412
+ module: "config",
4413
+ right: "config.notificationpreferences",
4414
+ readOnly: false,
4415
+ importable: false,
4416
+ allowDuplicate: false,
4417
+ updateBy: "_id",
4418
+ },
4269
4419
  {
4270
4420
  plural: "OfferCalculations",
4271
4421
  singular: "OfferCalculation",
@@ -7,7 +7,8 @@ export interface IAIAgent extends IDefaultFields {
7
7
  name?: string;
8
8
  description?: string;
9
9
  avatar?: string;
10
- department?: 'sales' | 'finance' | 'marketing' | 'hr' | 'support' | 'general' | 'ecommerce' | 'pm' | 'devops' | 'custom';
10
+ department?: 'sales' | 'finance' | 'marketing' | 'hr' | 'support' | 'general' | 'ecommerce' | 'pm' | 'devops' | 'legal' | 'security' | 'analytics' | 'operations' | 'engineering' | 'design' | 'research' | 'procurement' | 'quality' | 'compliance' | 'enablement' | 'customer-success' | 'customer-support' | 'partnerships' | 'automation' | 'ai-engineering' | 'executive' | 'custom';
11
+ customDepartment?: string;
11
12
  type?: 'internal' | 'consumer' | 'hybrid';
12
13
  status?: 'active' | 'inactive' | 'draft';
13
14
  systemPrompt?: string;
@@ -61,4 +62,67 @@ export interface IAIAgent extends IDefaultFields {
61
62
  isDefault?: boolean;
62
63
  global?: boolean;
63
64
  shared?: boolean;
65
+ mission?: string;
66
+ coreDuties?: string[];
67
+ ownership?: {
68
+ primary?: string[];
69
+ shared?: string[];
70
+ };
71
+ inputsNeeded?: string[];
72
+ outputsProduced?: string[];
73
+ qualityBar?: {
74
+ definitionOfDone?: string[];
75
+ rubricCriteria?: IAIAgentRubricCriterion[];
76
+ };
77
+ workingRules?: {
78
+ do?: string[];
79
+ dont?: string[];
80
+ };
81
+ handoffs?: {
82
+ upstream?: IAIAgentHandoff[];
83
+ downstream?: IAIAgentHandoff[];
84
+ };
85
+ escalationTriggers?: string[];
86
+ collaborationNotes?: string;
87
+ playbook?: string;
88
+ inputChecklist?: string[];
89
+ outputTemplate?: string;
90
+ orchestration?: {
91
+ canSpawnSubAgents?: boolean;
92
+ allowedSubAgents?: ObjectId[];
93
+ maxConcurrentTasks?: number;
94
+ parentAgent?: ObjectId;
95
+ delegationInstructions?: string;
96
+ };
97
+ permissionLevel?: 'read-only' | 'workspace-write' | 'full-access';
98
+ _allowedTools?: ObjectId[];
99
+ _allowedCommands?: ObjectId[];
100
+ memoryEnabled?: boolean;
101
+ memoryConfig?: {
102
+ maxMemories?: number;
103
+ memoryAgingDays?: number;
104
+ teamMemoryEnabled?: boolean;
105
+ };
106
+ costConfig?: {
107
+ maxTokensPerQuery?: number;
108
+ maxCostPerDayUSD?: number;
109
+ budgetAlertThreshold?: number;
110
+ };
111
+ outputStyle?: 'concise' | 'detailed' | 'structured' | 'conversational' | 'custom';
112
+ customOutputInstructions?: string;
113
+ version?: number;
114
+ versionNotes?: string;
115
+ _previousVersion?: ObjectId;
116
+ isTemplate?: boolean;
117
+ _clonedFrom?: ObjectId;
118
+ }
119
+ export interface IAIAgentRubricCriterion {
120
+ criterion: string;
121
+ weight: number;
122
+ passingScore: number;
123
+ description: string;
124
+ }
125
+ export interface IAIAgentHandoff {
126
+ _agent?: ObjectId;
127
+ description?: string;
64
128
  }
@@ -0,0 +1,16 @@
1
+ import { IDefaultFields } from "./IDefaultFields";
2
+ export interface IAIAgentCalibrationLog extends IDefaultFields {
3
+ _customerID: ObjectId;
4
+ _clientID?: ObjectId[];
5
+ _subID?: ObjectId[];
6
+ _agent: ObjectId;
7
+ changeType: 'prompt-update' | 'rubric-update' | 'example-added' | 'example-removed' | 'rule-added' | 'config-change' | 'feedback-correction';
8
+ description: string;
9
+ fieldChanged?: string;
10
+ previousValue?: any;
11
+ newValue?: any;
12
+ triggeringConversation?: ObjectId;
13
+ correctionRule?: string;
14
+ version?: number;
15
+ _changedBy?: ObjectId;
16
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,24 @@
1
+ import { IDefaultFields } from "./IDefaultFields";
2
+ export interface IAIAgentExample extends IDefaultFields {
3
+ _customerID: ObjectId;
4
+ _clientID?: ObjectId[];
5
+ _subID?: ObjectId[];
6
+ _agent: ObjectId;
7
+ type: 'gold' | 'bad' | 'testcase';
8
+ name: string;
9
+ description?: string;
10
+ input?: string;
11
+ expectedOutput?: string;
12
+ explanation?: string;
13
+ testInput?: string;
14
+ expectedBehavior?: string;
15
+ assertionType?: 'contains' | 'not-contains' | 'matches-rubric' | 'custom';
16
+ assertionValue?: string;
17
+ rubricScores?: {
18
+ criterion: string;
19
+ score: number;
20
+ }[];
21
+ sortOrder?: number;
22
+ status?: 'active' | 'inactive';
23
+ tags?: string[];
24
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,36 @@
1
+ import { IDefaultFields } from "./IDefaultFields";
2
+ export interface IAICommandVariable {
3
+ name: string;
4
+ type: 'string' | 'number' | 'boolean' | 'select';
5
+ options?: string[];
6
+ required?: boolean;
7
+ default?: string;
8
+ }
9
+ export interface IAICommand extends IDefaultFields {
10
+ _customerID: ObjectId;
11
+ _clientID?: ObjectId[];
12
+ _subID?: ObjectId[];
13
+ name?: string;
14
+ slug: string;
15
+ description?: string;
16
+ status?: 'active' | 'inactive';
17
+ category?: string;
18
+ commandType: 'prompt-template' | 'workflow' | 'agent-invoke' | 'data-query' | 'action-sequence';
19
+ promptTemplate?: string;
20
+ variables?: IAICommandVariable[];
21
+ _workflow?: ObjectId;
22
+ _agent?: ObjectId;
23
+ agentInstructions?: string;
24
+ dataQuery?: {
25
+ model: string;
26
+ pipeline?: any[];
27
+ outputFormat?: 'table' | 'json' | 'summary' | 'chart';
28
+ };
29
+ requiredRights?: string[];
30
+ _allowedRoles?: ObjectId[];
31
+ icon?: string;
32
+ shortcut?: string;
33
+ sortOrder?: number;
34
+ global?: boolean;
35
+ isTemplate?: boolean;
36
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -13,4 +13,20 @@ export interface IAIConversation extends IDefaultFields {
13
13
  mode?: 'text' | 'voice' | 'multimodal';
14
14
  provider?: string;
15
15
  modelName?: string;
16
+ sessionState?: 'active' | 'paused' | 'resumed' | 'compacted' | 'archived';
17
+ compactedSummary?: string;
18
+ _parentConversation?: ObjectId;
19
+ _workflow?: ObjectId;
20
+ _workflowRun?: ObjectId;
21
+ workflowPhase?: 'plan' | 'execute' | 'review' | 'deliver';
22
+ reviewGates?: IConversationReviewGate[];
23
+ planMode?: boolean;
24
+ planContent?: string;
25
+ }
26
+ export interface IConversationReviewGate {
27
+ gate: string;
28
+ status: 'pending' | 'passed' | 'failed';
29
+ reviewedBy?: ObjectId;
30
+ reviewedAt?: Date;
31
+ notes?: string;
16
32
  }
@@ -0,0 +1,29 @@
1
+ import { IDefaultFields } from "./IDefaultFields";
2
+ export interface IAICostBreakdown {
3
+ provider: string;
4
+ model: string;
5
+ tokens: number;
6
+ costUSD: number;
7
+ queries: number;
8
+ }
9
+ export interface IAICostTracker extends IDefaultFields {
10
+ _customerID: ObjectId;
11
+ _clientID?: ObjectId[];
12
+ _subID?: ObjectId[];
13
+ _agent?: ObjectId;
14
+ period: 'daily' | 'weekly' | 'monthly';
15
+ periodStart: Date;
16
+ periodEnd: Date;
17
+ totalTokensInput?: number;
18
+ totalTokensOutput?: number;
19
+ totalCostUSD?: number;
20
+ totalQueries?: number;
21
+ embeddingTokens?: number;
22
+ embeddingCostUSD?: number;
23
+ imageGenerations?: number;
24
+ imageCostUSD?: number;
25
+ budgetLimitUSD?: number;
26
+ budgetUsedPercent?: number;
27
+ alertSent?: boolean;
28
+ breakdown?: IAICostBreakdown[];
29
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,25 @@
1
+ import { IDefaultFields } from "./IDefaultFields";
2
+ export interface IAICronJob extends IDefaultFields {
3
+ _customerID: ObjectId;
4
+ _clientID?: ObjectId[];
5
+ _subID?: ObjectId[];
6
+ name?: string;
7
+ description?: string;
8
+ status?: 'active' | 'inactive' | 'paused';
9
+ schedule: string;
10
+ timezone?: string;
11
+ jobType: 'agent-query' | 'workflow' | 'command' | 'data-sync' | 'knowledge-sync';
12
+ _agent?: ObjectId;
13
+ _workflow?: ObjectId;
14
+ _command?: ObjectId;
15
+ taskPrompt?: string;
16
+ maxDurationMs?: number;
17
+ retryOnFailure?: boolean;
18
+ maxRetries?: number;
19
+ lastRunAt?: Date;
20
+ lastRunStatus?: 'success' | 'failure' | 'timeout';
21
+ nextRunAt?: Date;
22
+ notifyOnFailure?: boolean;
23
+ notifyChannels?: string[];
24
+ global?: boolean;
25
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,37 @@
1
+ import { IDefaultFields } from "./IDefaultFields";
2
+ export interface IAIEnterpriseControlRule {
3
+ ruleId: string;
4
+ description: string;
5
+ enforcement: 'block' | 'warn' | 'log' | 'require-approval';
6
+ conditions?: any;
7
+ _hook?: ObjectId;
8
+ }
9
+ export interface IAIEnterpriseControl extends IDefaultFields {
10
+ _customerID: ObjectId;
11
+ _clientID?: ObjectId[];
12
+ _subID?: ObjectId[];
13
+ category: 'rbac' | 'data-protection' | 'audit' | 'change-management' | 'incident-response' | 'dr-bcp' | 'vulnerability' | 'compliance' | 'template-governance' | 'outbound-approval' | 'break-glass' | 'data-residency' | 'cost-governance' | 'model-governance';
14
+ name?: string;
15
+ description?: string;
16
+ status?: 'active' | 'inactive' | 'draft';
17
+ policy?: {
18
+ rules?: IAIEnterpriseControlRule[];
19
+ };
20
+ complianceEvidence?: {
21
+ lastAuditDate?: Date;
22
+ nextAuditDate?: Date;
23
+ evidenceLinks?: string[];
24
+ certifications?: string[];
25
+ };
26
+ breakGlassConfig?: {
27
+ enabled?: boolean;
28
+ _approvers?: ObjectId[];
29
+ expiryMinutes?: number;
30
+ notifyOnActivation?: boolean;
31
+ };
32
+ _managedBy?: ObjectId;
33
+ reviewCycle?: 'monthly' | 'quarterly' | 'annually';
34
+ lastReviewedAt?: Date;
35
+ global?: boolean;
36
+ isTemplate?: boolean;
37
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,35 @@
1
+ import { IDefaultFields } from "./IDefaultFields";
2
+ export interface IAIHookValidationRule {
3
+ field: string;
4
+ operator: 'contains' | 'not-contains' | 'matches' | 'exceeds' | 'equals';
5
+ value: string;
6
+ blockMessage?: string;
7
+ }
8
+ export interface IAIHook extends IDefaultFields {
9
+ _customerID: ObjectId;
10
+ _clientID?: ObjectId[];
11
+ _subID?: ObjectId[];
12
+ name?: string;
13
+ description?: string;
14
+ status?: 'active' | 'inactive';
15
+ hookType: 'pre-tool' | 'post-tool' | 'pre-agent' | 'post-agent' | 'pre-workflow-step' | 'post-workflow-step' | 'pre-query' | 'post-query';
16
+ triggerOn?: {
17
+ tools?: string[];
18
+ agents?: ObjectId[];
19
+ events?: string[];
20
+ };
21
+ actionType: 'validate' | 'transform' | 'filter' | 'enrich' | 'block' | 'notify' | 'log' | 'webhook' | 'custom-function';
22
+ validationRules?: IAIHookValidationRule[];
23
+ transformTemplate?: string;
24
+ webhookConfig?: {
25
+ url: string;
26
+ method: 'GET' | 'POST';
27
+ headers?: Record<string, string>;
28
+ timeoutMs?: number;
29
+ };
30
+ _customFunction?: ObjectId;
31
+ onFailure?: 'allow' | 'deny' | 'warn';
32
+ sortOrder?: number;
33
+ global?: boolean;
34
+ isTemplate?: boolean;
35
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,26 @@
1
+ import { IDefaultFields } from "./IDefaultFields";
2
+ export type AIKnowledgePackEntryType = 'faq_objections' | 'processes_sops' | 'claims_nogo' | 'brand_voice' | 'icp_personas' | 'pricing_rules' | 'offer_catalog' | 'company_profile' | 'guardrails' | 'custom';
3
+ export interface IAIKnowledgePackEntry {
4
+ type: AIKnowledgePackEntryType;
5
+ title: string;
6
+ content: string;
7
+ sourcePriority?: number;
8
+ tags?: string[];
9
+ lastReviewedAt?: Date;
10
+ _reviewedBy?: ObjectId;
11
+ }
12
+ export interface IAIKnowledgePack extends IDefaultFields {
13
+ _customerID: ObjectId;
14
+ _clientID?: ObjectId[];
15
+ _subID?: ObjectId[];
16
+ name?: string;
17
+ description?: string;
18
+ status?: 'active' | 'inactive' | 'draft';
19
+ version?: number;
20
+ entries?: IAIKnowledgePackEntry[];
21
+ _agents?: ObjectId[];
22
+ autoInject?: boolean;
23
+ injectionPosition?: 'before-rag' | 'after-rag' | 'system-prompt-append';
24
+ isTemplate?: boolean;
25
+ global?: boolean;
26
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -18,4 +18,13 @@ export interface IAILog extends IDefaultFields {
18
18
  object?: string;
19
19
  note?: string;
20
20
  usage?: IUsage;
21
+ actionType?: 'agent-query' | 'hook-execution' | 'tool-invocation' | 'workflow-step' | 'command-execution' | 'memory-write' | 'cron-execution';
22
+ _agent?: ObjectId;
23
+ _workflow?: ObjectId;
24
+ _hook?: ObjectId;
25
+ _tool?: ObjectId;
26
+ _command?: ObjectId;
27
+ complianceFlags?: string[];
28
+ dataClassification?: 'public' | 'internal' | 'confidential' | 'restricted';
29
+ costUSD?: number;
21
30
  }
@@ -0,0 +1,18 @@
1
+ import { IDefaultFields } from "./IDefaultFields";
2
+ export interface IAIMemory extends IDefaultFields {
3
+ _customerID: ObjectId;
4
+ _clientID?: ObjectId[];
5
+ _subID?: ObjectId[];
6
+ _agent?: ObjectId;
7
+ memoryType: 'user' | 'feedback' | 'project' | 'reference' | 'agent-state';
8
+ name: string;
9
+ description: string;
10
+ content: string;
11
+ tags?: string[];
12
+ relevanceScore?: number;
13
+ lastAccessedAt?: Date;
14
+ expiresAt?: Date;
15
+ teamVisible?: boolean;
16
+ embedding?: number[];
17
+ embeddingModel?: string;
18
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });