@xpert-ai/contracts 3.34.0 → 3.36.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 (106) hide show
  1. package/context-event.cjs.default.js +1 -0
  2. package/context-event.cjs.js +26 -0
  3. package/context-event.cjs.mjs +2 -0
  4. package/context-event.d.ts +1 -0
  5. package/context-event.esm.js +24 -0
  6. package/index.cjs.default.js +1 -0
  7. package/index.cjs.js +670 -319
  8. package/index.cjs.mjs +2 -0
  9. package/index.esm.js +637 -318
  10. package/package.json +18 -2
  11. package/src/agent-event.model.d.ts +88 -0
  12. package/src/agent-event.schema.d.ts +120 -0
  13. package/src/agent-plugin.d.ts +4 -29
  14. package/src/ai/agent-output-delivery.model.d.ts +22 -1
  15. package/src/ai/agent-runtime.model.d.ts +4 -4
  16. package/src/ai/assistant-capability.model.d.ts +0 -1
  17. package/src/ai/assistant-template-manifest.model.d.ts +316 -352
  18. package/src/ai/assistant-template-overview.model.d.ts +0 -4
  19. package/src/ai/assistant-template-setup.model.d.ts +8 -8
  20. package/src/ai/assistant-template.model.d.ts +0 -4
  21. package/src/ai/bosi.model.d.ts +1 -1
  22. package/src/ai/chat-activity.model.d.ts +8 -0
  23. package/src/ai/chat-message.model.d.ts +0 -11
  24. package/src/ai/chat.model.d.ts +1 -0
  25. package/src/ai/cli-execution.model.d.ts +88 -0
  26. package/src/ai/conversation-trail.model.d.ts +274 -274
  27. package/src/ai/copilot-store.model.d.ts +0 -13
  28. package/src/ai/evolution/entities.d.ts +164 -0
  29. package/src/ai/evolution/evaluation.d.ts +7 -0
  30. package/src/ai/evolution/execution-review.d.ts +68 -0
  31. package/src/ai/evolution/index.d.ts +2 -0
  32. package/src/ai/evolution/provider.d.ts +1 -0
  33. package/src/ai/evolution/target.d.ts +5 -0
  34. package/src/ai/execution-activity.model.d.ts +362 -362
  35. package/src/ai/execution-control-evidence.schema.d.ts +22 -22
  36. package/src/ai/execution-observability.model.d.ts +196 -196
  37. package/src/ai/execution-source.model.d.ts +45 -0
  38. package/src/ai/index.d.ts +4 -0
  39. package/src/ai/mcp-execution-control.schema.d.ts +2 -2
  40. package/src/ai/middleware.model.d.ts +1 -0
  41. package/src/ai/model-execution.model.d.ts +7 -108
  42. package/src/ai/model-replacement.model.d.ts +18 -18
  43. package/src/ai/project-configuration-view.model.d.ts +78 -0
  44. package/src/ai/project-pipeline/analytics.d.ts +192 -192
  45. package/src/ai/project-pipeline/budget.schema.d.ts +38 -0
  46. package/src/ai/project-pipeline/commands.schema.d.ts +543 -500
  47. package/src/ai/project-pipeline/configuration-form.d.ts +1980 -1836
  48. package/src/ai/project-pipeline/configuration.schema.d.ts +450 -413
  49. package/src/ai/project-pipeline/contribution.schema.d.ts +688 -639
  50. package/src/ai/project-pipeline/definition.schema.d.ts +400 -356
  51. package/src/ai/project-pipeline/execution-statistics.d.ts +18 -18
  52. package/src/ai/project-pipeline/graph.model.d.ts +5 -0
  53. package/src/ai/project-pipeline/human-wait-statistics.d.ts +2 -2
  54. package/src/ai/project-pipeline/index.d.ts +1 -0
  55. package/src/ai/project-pipeline/model-usage-statistics.d.ts +6 -6
  56. package/src/ai/project-pipeline/node.schema.d.ts +57 -44
  57. package/src/ai/project-pipeline/operation.schema.d.ts +338 -338
  58. package/src/ai/project-pipeline/plugin-deployment.schema.d.ts +152 -0
  59. package/src/ai/project-pipeline/portfolio.schema.d.ts +468 -468
  60. package/src/ai/project-pipeline/primitives.schema.d.ts +6 -6
  61. package/src/ai/project-pipeline/projection.schema.d.ts +609 -572
  62. package/src/ai/project-pipeline/provider-actions.schema.d.ts +112 -112
  63. package/src/ai/project-pipeline/queue-statistics.d.ts +10 -10
  64. package/src/ai/project-pipeline/runtime.schema.d.ts +62 -62
  65. package/src/ai/project-pipeline/statistics.d.ts +100 -100
  66. package/src/ai/project-task-runtime.model.d.ts +969 -242
  67. package/src/ai/project-type-configuration.model.d.ts +48 -0
  68. package/src/ai/sandbox-execution-control.schema.d.ts +6 -6
  69. package/src/ai/template-installation.model.d.ts +18 -18
  70. package/src/ai/template-lifecycle.model.d.ts +6 -6
  71. package/src/ai/thread-control-view.schema.d.ts +4 -4
  72. package/src/ai/xpert-agent-execution.model.d.ts +4 -0
  73. package/src/ai/xpert-project-type.model.d.ts +3 -0
  74. package/src/ai/xpert-project.model.d.ts +4 -1
  75. package/src/ai/xpert-task.model.d.ts +16 -0
  76. package/src/ai/xpert.model.d.ts +0 -34
  77. package/src/ai/xpert.utils.d.ts +0 -1
  78. package/src/analytics/analysis-evidence.model.d.ts +29 -0
  79. package/src/analytics/analytics-certification.model.d.ts +17 -0
  80. package/src/{analytics-definition.model.d.ts → analytics/analytics-definition.model.d.ts} +1 -1
  81. package/src/{analytics-diagnostic.d.ts → analytics/analytics-diagnostic.d.ts} +8 -8
  82. package/src/{analytics-query.model.d.ts → analytics/analytics-query.model.d.ts} +9 -1
  83. package/src/analytics/index.d.ts +7 -0
  84. package/src/{resource-analysis.model.d.ts → analytics/resource-analysis.model.d.ts} +6 -1
  85. package/src/app-platform.d.ts +16 -16
  86. package/src/{artifact-group-reference.model.d.ts → artifacts/artifact-group-reference.model.d.ts} +1 -1
  87. package/src/{artifact-presentation.model.d.ts → artifacts/artifact-presentation.model.d.ts} +1 -1
  88. package/src/{artifact-use-grant-command.d.ts → artifacts/artifact-use-grant-command.d.ts} +1 -1
  89. package/src/{artifact-use-grant.model.d.ts → artifacts/artifact-use-grant.model.d.ts} +2 -2
  90. package/src/{artifact.model.d.ts → artifacts/artifact.model.d.ts} +2 -2
  91. package/src/artifacts/index.d.ts +5 -0
  92. package/src/collaboration.model.d.ts +31 -11
  93. package/src/{content-document.model.d.ts → content/content-document.model.d.ts} +2 -0
  94. package/src/{content-resource.model.d.ts → content/content-resource.model.d.ts} +6 -3
  95. package/src/content/content-transfer.model.d.ts +21 -0
  96. package/src/content/index.d.ts +4 -0
  97. package/src/execution-control-admission.schema.d.ts +2 -2
  98. package/src/index.d.ts +5 -14
  99. package/src/plugin-management.d.ts +13 -0
  100. package/src/plugin.d.ts +2 -0
  101. package/src/user-notification.schema.d.ts +75 -28
  102. package/src/view-extension/client-commands.d.ts +24 -0
  103. package/src/view-extension/context-event.d.ts +66 -0
  104. package/src/view-extension/index.d.ts +1 -0
  105. /package/src/{analytics-source.model.d.ts → analytics/analytics-source.model.d.ts} +0 -0
  106. /package/src/{content-reference.model.d.ts → content/content-reference.model.d.ts} +0 -0
@@ -0,0 +1,48 @@
1
+ import { z } from 'zod/v3';
2
+ import type { JsonSchemaObjectType } from './types';
3
+ import type { XpertProjectTypeRef } from './xpert-project-type.model';
4
+ export type ProjectConfigurationValue = string | number | boolean | null | ProjectConfigurationValue[] | {
5
+ [key: string]: ProjectConfigurationValue;
6
+ };
7
+ export type ProjectConfigurationValues = {
8
+ [key: string]: ProjectConfigurationValue;
9
+ };
10
+ export declare const projectConfigurationValuesSchema: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodType<ProjectConfigurationValue, z.ZodTypeDef, ProjectConfigurationValue>>, Record<string, ProjectConfigurationValue>, Record<string, ProjectConfigurationValue>>;
11
+ export declare const projectConfigurationUpdateSchema: z.ZodObject<{
12
+ revision: z.ZodNumber;
13
+ values: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodType<ProjectConfigurationValue, z.ZodTypeDef, ProjectConfigurationValue>>, Record<string, ProjectConfigurationValue>, Record<string, ProjectConfigurationValue>>;
14
+ }, "strict", z.ZodTypeAny, {
15
+ values?: Record<string, ProjectConfigurationValue>;
16
+ revision?: number;
17
+ }, {
18
+ values?: Record<string, ProjectConfigurationValue>;
19
+ revision?: number;
20
+ }>;
21
+ export type ProjectConfigurationUpdate = z.output<typeof projectConfigurationUpdateSchema>;
22
+ /** Non-secret, type-defined settings. JSON Schema defaults are applied by the host. */
23
+ export interface XpertProjectTypeConfigurationDefinition {
24
+ schema: JsonSchemaObjectType;
25
+ }
26
+ export interface ProjectTaskDurationConfiguration {
27
+ projectType: XpertProjectTypeRef;
28
+ configurationRevision: number;
29
+ /** Absent preserves the tenant's default duration. */
30
+ maxDurationSeconds?: number;
31
+ }
32
+ export interface XpertProjectConfigurationView {
33
+ projectType: XpertProjectTypeRef;
34
+ revision: number;
35
+ schema?: JsonSchemaObjectType;
36
+ values: ProjectConfigurationValues;
37
+ effectiveValues: ProjectConfigurationValues;
38
+ canEdit: boolean;
39
+ taskExecution: {
40
+ configuredMaxDurationSeconds?: number;
41
+ defaultDurationSeconds: number;
42
+ tenantMaxDurationSeconds: number;
43
+ effectiveMaxDurationSeconds: number;
44
+ };
45
+ }
46
+ /** Reserved host setting; custom type settings remain uninterpreted by the runtime. */
47
+ export declare const projectTaskDurationSchema: z.ZodNumber;
48
+ export declare function projectTaskConfigurationSchema(defaultSeconds?: number): JsonSchemaObjectType;
@@ -9,16 +9,16 @@ export declare const sandboxRuntimeTargetSchema: z.ZodObject<{
9
9
  environmentId: z.ZodString;
10
10
  runtimeRef: z.ZodString;
11
11
  }, "strict", z.ZodTypeAny, {
12
- version?: 1;
13
12
  kind?: "host" | "engine";
13
+ version?: 1;
14
14
  provider?: string;
15
15
  generation?: string;
16
16
  environmentId?: string;
17
17
  runtimeProfile?: string;
18
18
  runtimeRef?: string;
19
19
  }, {
20
- version?: 1;
21
20
  kind?: "host" | "engine";
21
+ version?: 1;
22
22
  provider?: string;
23
23
  generation?: string;
24
24
  environmentId?: string;
@@ -38,16 +38,16 @@ export declare const sandboxRuntimeEvidenceSchema: z.ZodObject<{
38
38
  environmentId: z.ZodString;
39
39
  runtimeRef: z.ZodString;
40
40
  }, "strict", z.ZodTypeAny, {
41
- version?: 1;
42
41
  kind?: "host" | "engine";
42
+ version?: 1;
43
43
  provider?: string;
44
44
  generation?: string;
45
45
  environmentId?: string;
46
46
  runtimeProfile?: string;
47
47
  runtimeRef?: string;
48
48
  }, {
49
- version?: 1;
50
49
  kind?: "host" | "engine";
50
+ version?: 1;
51
51
  provider?: string;
52
52
  generation?: string;
53
53
  environmentId?: string;
@@ -59,8 +59,8 @@ export declare const sandboxRuntimeEvidenceSchema: z.ZodObject<{
59
59
  }, "strict", z.ZodTypeAny, {
60
60
  version?: 1;
61
61
  target?: {
62
- version?: 1;
63
62
  kind?: "host" | "engine";
63
+ version?: 1;
64
64
  provider?: string;
65
65
  generation?: string;
66
66
  environmentId?: string;
@@ -72,8 +72,8 @@ export declare const sandboxRuntimeEvidenceSchema: z.ZodObject<{
72
72
  }, {
73
73
  version?: 1;
74
74
  target?: {
75
- version?: 1;
76
75
  kind?: "host" | "engine";
76
+ version?: 1;
77
77
  provider?: string;
78
78
  generation?: string;
79
79
  environmentId?: string;
@@ -68,14 +68,14 @@ export declare const templateDependencyLocksSchema: z.ZodArray<z.ZodObject<{
68
68
  bindingId: z.ZodString;
69
69
  bindingVersion: z.ZodString;
70
70
  }, "strict", z.ZodTypeAny, {
71
- name?: string;
72
71
  kind?: "agent-plugin";
72
+ name?: string;
73
73
  digest?: string;
74
74
  bindingId?: string;
75
75
  bindingVersion?: string;
76
76
  }, {
77
- name?: string;
78
77
  kind?: "agent-plugin";
78
+ name?: string;
79
79
  digest?: string;
80
80
  bindingId?: string;
81
81
  bindingVersion?: string;
@@ -84,10 +84,10 @@ export declare const templateDependencyLocksSchema: z.ZodArray<z.ZodObject<{
84
84
  kind: z.ZodEnum<["middleware", "sandbox", "toolset"]>;
85
85
  key: z.ZodString;
86
86
  }, "strict", z.ZodTypeAny, {
87
- kind?: "middleware" | "toolset" | "sandbox";
87
+ kind?: "toolset" | "sandbox" | "middleware";
88
88
  key?: string;
89
89
  }, {
90
- kind?: "middleware" | "toolset" | "sandbox";
90
+ kind?: "toolset" | "sandbox" | "middleware";
91
91
  key?: string;
92
92
  }>, "many">>;
93
93
  components: z.ZodArray<z.ZodObject<{
@@ -95,24 +95,19 @@ export declare const templateDependencyLocksSchema: z.ZodArray<z.ZodObject<{
95
95
  key: z.ZodString;
96
96
  hash: z.ZodString;
97
97
  }, "strict", z.ZodTypeAny, {
98
- type?: "skill" | "toolset" | "app" | "asset" | "mcp_server" | "hook";
99
98
  key?: string;
99
+ type?: "toolset" | "skill" | "app" | "asset" | "mcp_server" | "hook";
100
100
  hash?: string;
101
101
  }, {
102
- type?: "skill" | "toolset" | "app" | "asset" | "mcp_server" | "hook";
103
102
  key?: string;
103
+ type?: "toolset" | "skill" | "app" | "asset" | "mcp_server" | "hook";
104
104
  hash?: string;
105
105
  }>, "many">;
106
106
  }, "strict", z.ZodTypeAny, {
107
107
  version?: string;
108
- components?: {
109
- type?: "skill" | "toolset" | "app" | "asset" | "mcp_server" | "hook";
110
- key?: string;
111
- hash?: string;
112
- }[];
113
108
  source?: {
114
- name?: string;
115
109
  kind?: "agent-plugin";
110
+ name?: string;
116
111
  digest?: string;
117
112
  bindingId?: string;
118
113
  bindingVersion?: string;
@@ -120,19 +115,19 @@ export declare const templateDependencyLocksSchema: z.ZodArray<z.ZodObject<{
120
115
  pluginName?: string;
121
116
  requiredVersion?: string;
122
117
  providers?: {
123
- kind?: "middleware" | "toolset" | "sandbox";
118
+ kind?: "toolset" | "sandbox" | "middleware";
124
119
  key?: string;
125
120
  }[];
126
- }, {
127
- version?: string;
128
121
  components?: {
129
- type?: "skill" | "toolset" | "app" | "asset" | "mcp_server" | "hook";
130
122
  key?: string;
123
+ type?: "toolset" | "skill" | "app" | "asset" | "mcp_server" | "hook";
131
124
  hash?: string;
132
125
  }[];
126
+ }, {
127
+ version?: string;
133
128
  source?: {
134
- name?: string;
135
129
  kind?: "agent-plugin";
130
+ name?: string;
136
131
  digest?: string;
137
132
  bindingId?: string;
138
133
  bindingVersion?: string;
@@ -140,9 +135,14 @@ export declare const templateDependencyLocksSchema: z.ZodArray<z.ZodObject<{
140
135
  pluginName?: string;
141
136
  requiredVersion?: string;
142
137
  providers?: {
143
- kind?: "middleware" | "toolset" | "sandbox";
138
+ kind?: "toolset" | "sandbox" | "middleware";
144
139
  key?: string;
145
140
  }[];
141
+ components?: {
142
+ key?: string;
143
+ type?: "toolset" | "skill" | "app" | "asset" | "mcp_server" | "hook";
144
+ hash?: string;
145
+ }[];
146
146
  }>, "many">;
147
147
  export type TemplateDependencyLock = z.output<typeof templateDependencyLocksSchema>[number];
148
148
  /** Advisory drift in an available runtime dependency; never a compatibility guarantee. */
@@ -6,16 +6,16 @@ export declare const templatePublicationInputSchema: z.ZodObject<{
6
6
  version: z.ZodString;
7
7
  releaseNotes: z.ZodDefault<z.ZodString>;
8
8
  }, "strict", z.ZodTypeAny, {
9
- version?: string;
10
- visibility?: "public" | "team";
11
9
  revision?: string;
10
+ version?: string;
12
11
  contentHash?: string;
12
+ visibility?: "public" | "team";
13
13
  releaseNotes?: string;
14
14
  }, {
15
- version?: string;
16
- visibility?: "public" | "team";
17
15
  revision?: string;
16
+ version?: string;
18
17
  contentHash?: string;
18
+ visibility?: "public" | "team";
19
19
  releaseNotes?: string;
20
20
  }>;
21
21
  export type TemplatePublicationInput = z.output<typeof templatePublicationInputSchema>;
@@ -43,12 +43,12 @@ export declare const templateUpgradeInputSchema: z.ZodObject<{
43
43
  revision?: string;
44
44
  sourceHash?: string;
45
45
  targetTemplateId?: string;
46
- choices?: Partial<Record<"definition" | "runtime" | "instructions" | "presentation", "replace" | "keep">>;
46
+ choices?: Partial<Record<"runtime" | "instructions" | "presentation" | "definition", "replace" | "keep">>;
47
47
  }, {
48
48
  revision?: string;
49
49
  sourceHash?: string;
50
50
  targetTemplateId?: string;
51
- choices?: Partial<Record<"definition" | "runtime" | "instructions" | "presentation", "replace" | "keep">>;
51
+ choices?: Partial<Record<"runtime" | "instructions" | "presentation" | "definition", "replace" | "keep">>;
52
52
  }>;
53
53
  export type TemplateUpgradeInput = z.output<typeof templateUpgradeInputSchema>;
54
54
  export interface TemplateUpgradeSource {
@@ -58,11 +58,11 @@ export declare const threadControlViewSchema: z.ZodObject<{
58
58
  }>;
59
59
  pauseId: z.ZodOptional<z.ZodString>;
60
60
  }, "strict", z.ZodTypeAny, {
61
- version?: 1;
62
61
  revision?: string;
62
+ version?: 1;
63
63
  threadId?: string;
64
64
  runId?: string;
65
- state?: "idle" | "completed" | "failed" | "pausing" | "paused" | "running" | "stopping" | "input_required" | "settling" | "confirming" | "stopped";
65
+ state?: "idle" | "pausing" | "paused" | "running" | "stopping" | "failed" | "completed" | "input_required" | "settling" | "confirming" | "stopped";
66
66
  actions?: {
67
67
  canPause?: boolean;
68
68
  canResume?: boolean;
@@ -74,11 +74,11 @@ export declare const threadControlViewSchema: z.ZodObject<{
74
74
  };
75
75
  pauseId?: string;
76
76
  }, {
77
- version?: 1;
78
77
  revision?: string;
78
+ version?: 1;
79
79
  threadId?: string;
80
80
  runId?: string;
81
- state?: "idle" | "completed" | "failed" | "pausing" | "paused" | "running" | "stopping" | "input_required" | "settling" | "confirming" | "stopped";
81
+ state?: "idle" | "pausing" | "paused" | "running" | "stopping" | "failed" | "completed" | "input_required" | "settling" | "confirming" | "stopped";
82
82
  actions?: {
83
83
  canPause?: boolean;
84
84
  canResume?: boolean;
@@ -113,6 +113,10 @@ export declare enum XpertAgentExecutionStatusEnum {
113
113
  INTERRUPTED = "interrupted"
114
114
  }
115
115
  export type TAgentExecutionMetadata = {
116
+ /** Host-created result continuation; its inbox claim proves the originating execution. */
117
+ runtimeContinuation?: {
118
+ inboxId: string;
119
+ };
116
120
  /** Written atomically with root checkpoints, not by message/execution finalizers. */
117
121
  recovery?: import('./chat-recovery.model').TChatExecutionRecovery;
118
122
  templateSource?: import('../agent-plugin').TemplateAgentSource;
@@ -1,4 +1,5 @@
1
1
  import type { I18nObject, IconDefinition } from '../types';
2
+ import type { XpertProjectTypeConfigurationDefinition } from './project-type-configuration.model';
2
3
  import type { XpertViewScalar } from '../view-extension/model';
3
4
  export interface XpertProjectViewSelection {
4
5
  viewKey: string;
@@ -23,6 +24,7 @@ export interface XpertProjectTypeDefinition {
23
24
  icon?: IconDefinition;
24
25
  /** Entity-backed applications enforce this policy in their business preparation/claim services. */
25
26
  taskConcurrency?: XpertProjectTaskConcurrency;
27
+ configuration?: XpertProjectTypeConfigurationDefinition;
26
28
  /** Entity types delegate creation and lifecycle to their registered provider. */
27
29
  binding: {
28
30
  kind: 'project';
@@ -37,6 +39,7 @@ export interface XpertProjectTypeSummary extends XpertProjectTypeRef {
37
39
  icon?: IconDefinition;
38
40
  binding: XpertProjectTypeDefinition['binding'];
39
41
  taskConcurrency?: XpertProjectTaskConcurrency;
42
+ configuration?: XpertProjectTypeConfigurationDefinition;
40
43
  available: boolean;
41
44
  }
42
45
  export interface XpertProjectClassification {
@@ -1,5 +1,5 @@
1
1
  import type { AgentInvocationStatus } from './agent-runtime.model';
2
- import type { ProjectTaskDecision, ProjectTaskExecutionPurpose, ProjectTaskSpecificationSnapshot } from './project-task-runtime.model';
2
+ import type { ProjectTaskDecision, ProjectTaskReviewSubject, ProjectTaskExecutionPurpose, ProjectTaskSpecificationSnapshot } from './project-task-runtime.model';
3
3
  import { IBasePerTenantAndOrganizationEntityModel } from '../base-entity.model';
4
4
  import { IPagination } from '../core.model';
5
5
  import { IIntegration } from '../integration.model';
@@ -63,6 +63,7 @@ export type TXpertProjectSkillSummary = {
63
63
  path: string;
64
64
  enabled: boolean;
65
65
  source: TXpertProjectSkillSource;
66
+ skillIndexId?: string;
66
67
  description?: string;
67
68
  version?: string;
68
69
  };
@@ -221,6 +222,7 @@ export interface IBasePerXpertProjectEntityModel extends IBasePerTenantAndOrgani
221
222
  project?: IXpertProject;
222
223
  }
223
224
  export interface IXpertProjectTask extends IBasePerXpertProjectEntityModel {
225
+ reviewSubject?: ProjectTaskReviewSubject | null;
224
226
  controlKind?: 'ordinary' | 'provider' | 'pipeline';
225
227
  pipelineInstanceId?: string | null;
226
228
  pipelineDisposition?: 'active' | 'removed' | 'excluded' | 'superseded' | null;
@@ -272,6 +274,7 @@ export interface IXpertProjectTaskConversation extends IBasePerXpertProjectEntit
272
274
  sourceExecutionId?: string;
273
275
  }
274
276
  export interface IXpertProjectTaskExecution extends IBasePerXpertProjectEntityModel {
277
+ reviewReportAvailable?: boolean;
275
278
  /** Runtime-owned attempt. Distinct from a native Agent execution ID. */
276
279
  invocationId?: string | null;
277
280
  invocationStatus?: AgentInvocationStatus | null;
@@ -26,7 +26,23 @@ export type TXpertTaskScheduleRuntimeState = {
26
26
  */
27
27
  export interface IXpertTask extends IBasePerTenantAndOrganizationEntityModel, XpertTaskType {
28
28
  }
29
+ export type ConversationScheduleMonitor = {
30
+ source: 'menu' | 'agent';
31
+ intervalMinutes: number;
32
+ anchorAt?: string;
33
+ observationRevision?: string;
34
+ notify: 'new-differences';
35
+ } & ({
36
+ target?: 'conversation';
37
+ conversationId: string;
38
+ threadId: string;
39
+ } | {
40
+ target: 'new_chat';
41
+ conversationId?: never;
42
+ threadId?: never;
43
+ });
29
44
  export type XpertTaskType = {
45
+ monitor?: ConversationScheduleMonitor | null;
30
46
  name?: string;
31
47
  schedule?: string;
32
48
  options?: TScheduleOptions;
@@ -77,13 +77,6 @@ export type TXpertFeatures = {
77
77
  * File upload feature
78
78
  */
79
79
  attachment?: TXpertAttachment;
80
- /**
81
- * Reply with memory(Q&A)
82
- */
83
- memoryReply?: {
84
- enabled: boolean;
85
- scoreThreshold?: number;
86
- };
87
80
  /**
88
81
  * Sandbox feature
89
82
  */
@@ -99,7 +92,6 @@ export type TXpertExportedTemplate = {
99
92
  filePath: string;
100
93
  exportedAt: string;
101
94
  isDraft: boolean;
102
- includeMemory: boolean;
103
95
  };
104
96
  export type XpertFrequentQuestionsRequest = {
105
97
  locale?: string | null;
@@ -178,10 +170,6 @@ export type TXpert = {
178
170
  * Config of summarize past conversations
179
171
  */
180
172
  summarize?: TSummarize;
181
- /**
182
- * @deprecated use memory middlewares
183
- */
184
- memory?: TLongTermMemory;
185
173
  features?: TXpertFeatures;
186
174
  commandProfile?: TXpertCommandProfile;
187
175
  marketplace?: TXpertMarketplaceProfile;
@@ -490,28 +478,6 @@ export type TSummarize = {
490
478
  */
491
479
  retainMessages?: number;
492
480
  };
493
- export declare enum LongTermMemoryTypeEnum {
494
- PROFILE = "profile",
495
- QA = "qa"
496
- }
497
- export type TLongTermMemoryConfig = {
498
- enabled?: boolean;
499
- /**
500
- * System prompt guide how to remember the key points of the conversation
501
- */
502
- prompt?: string;
503
- };
504
- /**
505
- * Config of long-term memory
506
- */
507
- export type TLongTermMemory = {
508
- enabled?: boolean;
509
- copilotModel?: TCopilotModel;
510
- profile?: TLongTermMemoryConfig & {
511
- afterSeconds?: number;
512
- };
513
- qa?: TLongTermMemoryConfig;
514
- };
515
481
  export type TXpertAttachmentType = 'document' | 'image' | 'audio' | 'video' | 'others';
516
482
  export type TXpertAttachment = {
517
483
  enabled?: boolean;
@@ -31,7 +31,6 @@ export declare function omitXpertRelations(xpert: Partial<IXpert>): {
31
31
  options?: import("./xpert.model").TXpertOptions;
32
32
  agentConfig?: import("./xpert.model").TXpertAgentConfig;
33
33
  summarize?: import("./xpert.model").TSummarize;
34
- memory?: import("./xpert.model").TLongTermMemory;
35
34
  features?: import("./xpert.model").TXpertFeatures;
36
35
  commandProfile?: import("./prompt-workflow.model").TXpertCommandProfile;
37
36
  marketplace?: import("./xpert-marketplace.model").TXpertMarketplaceProfile;
@@ -0,0 +1,29 @@
1
+ import type { AnalyticalDataset, AnalyticsValue } from './analytics-query.model';
2
+ /** Immutable query evidence. Certification and freshness describe capture time, never current authority.
3
+ * Readers must reauthorize the source; this document contains no query payload or credentials. */
4
+ export interface AnalysisEvidenceSnapshot {
5
+ schema: 'xpert.analysis-evidence@1';
6
+ id: string;
7
+ title: string;
8
+ capturedAt: string;
9
+ source: {
10
+ artifactId: string;
11
+ versionId: string;
12
+ projectId: string;
13
+ };
14
+ controls: Record<string, AnalyticsValue>;
15
+ /** A bounded, exact copy of normalized results, including units, completeness and source proofs. */
16
+ datasets: AnalyticalDataset[];
17
+ /** Facts cite exact cells. Interpretation is explicitly separate from observed data. */
18
+ statements: Array<{
19
+ kind: 'fact' | 'inference' | 'unverified';
20
+ text: string;
21
+ citations: Array<{
22
+ datasetId: string;
23
+ row: number;
24
+ field: string;
25
+ }>;
26
+ }>;
27
+ /** SHA-256 of the canonical snapshot excluding this field. Not a permission token. */
28
+ sha256: string;
29
+ }
@@ -0,0 +1,17 @@
1
+ /** Source-issued business approval checked for this execution, never a promise of future validity. */
2
+ export type AnalyticsCertification = {
3
+ kind: 'business_metric';
4
+ subjectId: string;
5
+ verifiedAt: string;
6
+ } & ({
7
+ status: 'legacy_unverified';
8
+ } | {
9
+ status: 'verified';
10
+ definitionHash: string;
11
+ dependency: {
12
+ id: string;
13
+ version: number;
14
+ };
15
+ certifiedBy: string;
16
+ certifiedAt: string;
17
+ });
@@ -1,5 +1,5 @@
1
1
  import type { AnalyticsProviderDescriptor } from './analytics-query.model';
2
- import type { JSONValue } from './core.model';
2
+ import type { JSONValue } from '../core.model';
3
3
  /** Configuration is owned by a provider; bindings contain only immutable source identities. */
4
4
  export type AnalyticsConfigurationEntry = {
5
5
  kind: 'definition';
@@ -10,38 +10,38 @@ export declare const analyticsDiagnosticSchema: z.ZodEffects<z.ZodObject<{
10
10
  upstreamExecutionId: z.ZodOptional<z.ZodString>;
11
11
  auditRef: z.ZodOptional<z.ZodString>;
12
12
  }, "strict", z.ZodTypeAny, {
13
- version?: 1;
14
13
  code?: string;
15
14
  message?: string;
15
+ version?: 1;
16
+ stage?: "validation" | "source" | "execution" | "request" | "result" | "dependency" | "authorization";
16
17
  schema?: "xpert.analytics.diagnostic";
17
- stage?: "validation" | "request" | "source" | "authorization" | "execution" | "result" | "dependency";
18
18
  retryable?: boolean;
19
19
  upstreamExecutionId?: string;
20
20
  auditRef?: string;
21
21
  }, {
22
- version?: 1;
23
22
  code?: string;
24
23
  message?: string;
24
+ version?: 1;
25
+ stage?: "validation" | "source" | "execution" | "request" | "result" | "dependency" | "authorization";
25
26
  schema?: "xpert.analytics.diagnostic";
26
- stage?: "validation" | "request" | "source" | "authorization" | "execution" | "result" | "dependency";
27
27
  retryable?: boolean;
28
28
  upstreamExecutionId?: string;
29
29
  auditRef?: string;
30
30
  }>, {
31
- version?: 1;
32
31
  code?: string;
33
32
  message?: string;
33
+ version?: 1;
34
+ stage?: "validation" | "source" | "execution" | "request" | "result" | "dependency" | "authorization";
34
35
  schema?: "xpert.analytics.diagnostic";
35
- stage?: "validation" | "request" | "source" | "authorization" | "execution" | "result" | "dependency";
36
36
  retryable?: boolean;
37
37
  upstreamExecutionId?: string;
38
38
  auditRef?: string;
39
39
  }, {
40
- version?: 1;
41
40
  code?: string;
42
41
  message?: string;
42
+ version?: 1;
43
+ stage?: "validation" | "source" | "execution" | "request" | "result" | "dependency" | "authorization";
43
44
  schema?: "xpert.analytics.diagnostic";
44
- stage?: "validation" | "request" | "source" | "authorization" | "execution" | "result" | "dependency";
45
45
  retryable?: boolean;
46
46
  upstreamExecutionId?: string;
47
47
  auditRef?: string;
@@ -1,5 +1,6 @@
1
1
  import type { AnalyticsSourceRef } from './analytics-source.model';
2
- import type { JSONValue } from './core.model';
2
+ import type { JSONValue } from '../core.model';
3
+ import type { AnalyticsCertification } from './analytics-certification.model';
3
4
  /** JSON-safe scalar shared by cells and controls; nested objects/arrays are not dataset cells. */
4
5
  export type AnalyticsValue = string | number | boolean | null;
5
6
  /** int64/decimal use exact strings; date uses YYYY-MM-DD; timestamp includes a timezone. */
@@ -69,6 +70,11 @@ export interface AnalyticsQueryRequest {
69
70
  binding: AnalyticsBinding;
70
71
  /** Values keyed by controlId; undeclared keys are rejected and absent keys resolve through defaults. */
71
72
  controls: Record<string, AnalyticsValue>;
73
+ /** Opt-in reuse, only when the Provider independently reauthorizes the exact query and source revision. */
74
+ cache?: {
75
+ maxAgeMs: number;
76
+ forceRefresh?: boolean;
77
+ };
72
78
  }
73
79
  /** Canonical, provider-independent result; consumers must inspect completeness before presenting totals. */
74
80
  export interface AnalyticalDataset {
@@ -110,6 +116,8 @@ export interface AnalyticalDataset {
110
116
  upstreamExecutionId?: string;
111
117
  /** Reference to governed audit evidence; do not embed secrets or full logs here. */
112
118
  auditRef?: string;
119
+ /** Business certification checked by the source for this query; absence means no certification claim. */
120
+ certification?: AnalyticsCertification;
113
121
  };
114
122
  }
115
123
  /** Public discovery metadata. Advertising a capability does not authorize its execution. */
@@ -0,0 +1,7 @@
1
+ export * from './analytics-query.model';
2
+ export * from './analytics-source.model';
3
+ export * from './analytics-definition.model';
4
+ export * from './analytics-diagnostic';
5
+ export * from './analytics-certification.model';
6
+ export * from './analysis-evidence.model';
7
+ export * from './resource-analysis.model';
@@ -2,10 +2,13 @@ import type { AnalyticalDataset, AnalyticsField, AnalyticsParameter, AnalyticsVa
2
2
  /**
3
3
  * Explicit consent to disclose bounded query results to every member of the receiving group.
4
4
  * The source manager proposes this scope and the group owner independently accepts it.
5
- * Each query still uses the requesting human's upstream data permissions, never the source author's credentials.
5
+ * Existing grants use the requesting human's upstream permissions. Explicit delegated_results grants
6
+ * restore the issuing human's current identity per query and disclose only the accepted result scope.
6
7
  * Omit the policy entirely for view-only access; an empty dataset list is not a wildcard grant.
7
8
  */
8
9
  export interface ResourceAnalysisPolicy {
10
+ /** Omission preserves viewer permissions; delegation requires explicit source and audience consent. */
11
+ execution?: 'viewer_permissions' | 'delegated_results';
9
12
  /**
10
13
  * bindings permits declared parameter values and field projection over published binding results.
11
14
  * explore additionally permits query filters, grouping, aggregation and sorting within the same approved datasets.
@@ -20,6 +23,8 @@ export interface ResourceAnalysisPolicy {
20
23
  fields: string[];
21
24
  /** Immutable AND predicates on allowed fields, applied before aggregation and disclosure to the Agent. */
22
25
  filters: ResourceAnalysisFilter[];
26
+ /** Delegated queries may vary only these controls within these values; other controls retain published defaults. */
27
+ controlValues?: Record<string, AnalyticsValue[]>;
23
28
  }>;
24
29
  /**
25
30
  * Allows returning dataset rows without further aggregation. These may already be aggregated by the binding.