@xpert-ai/contracts 3.19.0 → 3.21.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.
- package/index.cjs.js +425 -20
- package/index.esm.js +372 -22
- package/package.json +5 -2
- package/src/agent/ai-model.d.ts +1 -0
- package/src/agent/token.d.ts +4 -0
- package/src/ai/agent-output-delivery.model.d.ts +31 -0
- package/src/ai/agent-runtime.model.d.ts +53 -0
- package/src/ai/ai-model.model.d.ts +3 -0
- package/src/ai/assistant-binding.model.d.ts +3 -0
- package/src/ai/assistant-configuration.model.d.ts +31 -0
- package/src/ai/bosi.model.d.ts +73 -0
- package/src/ai/chat-group-entity.model.d.ts +93 -0
- package/src/ai/chat-group.model.d.ts +298 -0
- package/src/ai/chat-message-envelope.model.d.ts +55 -0
- package/src/ai/chat-message.model.d.ts +10 -0
- package/src/ai/chat.model.d.ts +26 -0
- package/src/ai/conversation-entry.model.d.ts +18 -0
- package/src/ai/execution-activity.model.d.ts +547 -0
- package/src/ai/index.d.ts +11 -0
- package/src/ai/mcp-capability.model.d.ts +5 -1
- package/src/ai/membership.model.d.ts +5 -0
- package/src/ai/model-execution.model.d.ts +265 -0
- package/src/ai/model-gateway.model.d.ts +15 -3
- package/src/ai/model-usage.model.d.ts +19 -0
- package/src/ai/project-task-graph.model.d.ts +12 -0
- package/src/ai/project-task-runtime.model.d.ts +1106 -0
- package/src/ai/project-task-type.model.d.ts +13 -0
- package/src/ai/prompt-workflow.model.d.ts +4 -0
- package/src/ai/realtime-voice.model.d.ts +90 -0
- package/src/ai/realtime-voice.transport.d.ts +54 -0
- package/src/ai/resource-card.d.ts +2 -0
- package/src/ai/sandbox-terminal.model.d.ts +1 -0
- package/src/ai/thread-activity.model.d.ts +14 -0
- package/src/ai/xpert-agent-execution.model.d.ts +4 -0
- package/src/ai/xpert-project.model.d.ts +21 -0
- package/src/ai/xpert-template.model.d.ts +23 -5
- package/src/ai/xpert-tool-mcp.model.d.ts +6 -0
- package/src/ai/xpert.model.d.ts +7 -2
- package/src/api-key.model.d.ts +37 -2
- package/src/default-agent-plugins.d.ts +19 -0
- package/src/i18n.model.d.ts +1 -0
- package/src/index.d.ts +5 -0
- package/src/plugin-application.d.ts +256 -0
- package/src/plugin-management.d.ts +112 -0
- package/src/plugin.d.ts +3 -319
- package/src/runtime-control.d.ts +13 -0
- package/src/secret-token.model.d.ts +8 -1
- package/src/setup-plugins.d.ts +75 -0
- package/src/types.d.ts +4 -0
- package/src/view-extension/model.d.ts +22 -1
- package/src/view-extension/workbench.d.ts +6 -2
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { I18nObject } from '../i18n.model';
|
|
2
|
+
/** Portable presentation tokens. Clients render their own trusted icon components. */
|
|
3
|
+
export declare const PROJECT_TASK_ICON_NAMES: readonly ["FileText", "FileScan", "FileSearch", "ListChecks", "ListTree", "ShieldCheck", "FilePenLine", "Workflow", "Images", "FolderInput", "FileOutput"];
|
|
4
|
+
export type ProjectTaskIconName = (typeof PROJECT_TASK_ICON_NAMES)[number];
|
|
5
|
+
export interface ProjectTaskTypePresentation {
|
|
6
|
+
label: I18nObject;
|
|
7
|
+
icon: ProjectTaskIconName;
|
|
8
|
+
}
|
|
9
|
+
export interface ProjectTaskTypeDefinition {
|
|
10
|
+
/** Namespaced by the owning task provider, for example bid.tasks.illustration. */
|
|
11
|
+
key: string;
|
|
12
|
+
presentation: ProjectTaskTypePresentation;
|
|
13
|
+
}
|
|
@@ -9,6 +9,7 @@ export declare function isPromptWorkflowScenarios(value: unknown): value is Prom
|
|
|
9
9
|
export type PromptWorkflowVisibility = 'private' | 'team' | 'tenant';
|
|
10
10
|
export type PromptWorkflowSourceType = 'xpert' | 'workspace_prompt_workflow' | 'skill';
|
|
11
11
|
export type PromptWorkflowCommandPriority = 'normal' | 'preferred';
|
|
12
|
+
export type PromptWorkflowActionType = 'insert_text' | 'insert_invocation' | 'submit_prompt';
|
|
12
13
|
export type TPromptWorkflow = {
|
|
13
14
|
name: string;
|
|
14
15
|
label?: string;
|
|
@@ -18,6 +19,8 @@ export type TPromptWorkflow = {
|
|
|
18
19
|
aliases?: string[];
|
|
19
20
|
argsHint?: string;
|
|
20
21
|
template: string;
|
|
22
|
+
/** insert_invocation inserts /name; insert_text expands the template; submit_prompt sends it. */
|
|
23
|
+
actionType?: PromptWorkflowActionType;
|
|
21
24
|
scenarios?: PromptWorkflowScenario[];
|
|
22
25
|
tags?: string[];
|
|
23
26
|
visibility?: PromptWorkflowVisibility;
|
|
@@ -54,6 +57,7 @@ export type TXpertCommandProfileEntry = {
|
|
|
54
57
|
aliases?: string[];
|
|
55
58
|
argsHint?: string;
|
|
56
59
|
template?: string;
|
|
60
|
+
actionType?: PromptWorkflowActionType;
|
|
57
61
|
runtimeCapabilities?: unknown;
|
|
58
62
|
availability?: SkillSlashCommandAvailability;
|
|
59
63
|
};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import type { TCopilotModel } from './copilot-model.model';
|
|
2
|
+
import type { VoiceTaskStatus } from './realtime-voice.transport';
|
|
3
|
+
/** Realtime is a separate model capability, not the Assistant's reasoning model. */
|
|
4
|
+
export interface RealtimeVoiceFeature {
|
|
5
|
+
enabled: boolean;
|
|
6
|
+
copilotModel?: TCopilotModel;
|
|
7
|
+
voice?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface RealtimeVoiceSelection {
|
|
10
|
+
modelId: string;
|
|
11
|
+
voice: string;
|
|
12
|
+
}
|
|
13
|
+
export interface RealtimeModelMetadata {
|
|
14
|
+
voices: {
|
|
15
|
+
id: string;
|
|
16
|
+
label: string;
|
|
17
|
+
}[];
|
|
18
|
+
defaultVoice: string;
|
|
19
|
+
notification: 'text' | 'next-turn';
|
|
20
|
+
}
|
|
21
|
+
export interface RealtimeModelOption extends RealtimeModelMetadata {
|
|
22
|
+
id: string;
|
|
23
|
+
label: string;
|
|
24
|
+
copilotModel: TCopilotModel;
|
|
25
|
+
}
|
|
26
|
+
export interface RealtimeToolCall {
|
|
27
|
+
id: string;
|
|
28
|
+
name: string;
|
|
29
|
+
arguments: string;
|
|
30
|
+
}
|
|
31
|
+
export interface RealtimeToolResult {
|
|
32
|
+
id: string;
|
|
33
|
+
output: string;
|
|
34
|
+
}
|
|
35
|
+
/** Latest authoritative task state, separate from historical tool response messages. */
|
|
36
|
+
export interface RealtimeTaskContext {
|
|
37
|
+
taskHandle: string;
|
|
38
|
+
status: VoiceTaskStatus;
|
|
39
|
+
result?: string;
|
|
40
|
+
}
|
|
41
|
+
export interface RealtimeUsage {
|
|
42
|
+
responseId: string;
|
|
43
|
+
inputText?: number;
|
|
44
|
+
inputAudio?: number;
|
|
45
|
+
outputText?: number;
|
|
46
|
+
outputAudio?: number;
|
|
47
|
+
cachedInputText?: number;
|
|
48
|
+
cachedInputAudio?: number;
|
|
49
|
+
}
|
|
50
|
+
/** Server-side diagnostics only; never include provider messages, headers or request bodies. */
|
|
51
|
+
export interface RealtimeProviderDiagnostic {
|
|
52
|
+
providerCode?: string;
|
|
53
|
+
providerType?: string;
|
|
54
|
+
eventId?: string;
|
|
55
|
+
}
|
|
56
|
+
export type RealtimeModelEvent = {
|
|
57
|
+
type: 'ready';
|
|
58
|
+
} | {
|
|
59
|
+
type: 'speech.started';
|
|
60
|
+
} | {
|
|
61
|
+
type: 'transcript';
|
|
62
|
+
role: 'user' | 'assistant';
|
|
63
|
+
id: string;
|
|
64
|
+
text: string;
|
|
65
|
+
final: boolean;
|
|
66
|
+
} | {
|
|
67
|
+
type: 'audio';
|
|
68
|
+
responseId: string;
|
|
69
|
+
audio: Uint8Array;
|
|
70
|
+
} | {
|
|
71
|
+
type: 'response.started';
|
|
72
|
+
responseId: string;
|
|
73
|
+
} | {
|
|
74
|
+
type: 'response.done';
|
|
75
|
+
responseId: string;
|
|
76
|
+
} | {
|
|
77
|
+
type: 'tools';
|
|
78
|
+
calls: RealtimeToolCall[];
|
|
79
|
+
} | {
|
|
80
|
+
type: 'usage';
|
|
81
|
+
usage: RealtimeUsage;
|
|
82
|
+
} | {
|
|
83
|
+
type: 'error';
|
|
84
|
+
code: string;
|
|
85
|
+
recoverable?: boolean;
|
|
86
|
+
diagnostic?: RealtimeProviderDiagnostic;
|
|
87
|
+
} | {
|
|
88
|
+
type: 'closed';
|
|
89
|
+
};
|
|
90
|
+
export * from './realtime-voice.transport';
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export type VoiceTaskStatus = 'queued' | 'running' | 'completed' | 'failed' | 'canceled' | 'waiting' | 'unknown';
|
|
2
|
+
export type { CallEndedContent, CompletedVoiceCall } from '@xpert-ai/chatkit-types';
|
|
3
|
+
export interface VoiceSessionTicket {
|
|
4
|
+
sessionId: string;
|
|
5
|
+
conversationId: string;
|
|
6
|
+
ticket: string;
|
|
7
|
+
path: string;
|
|
8
|
+
inputSampleRate: 16000;
|
|
9
|
+
outputSampleRate: 24000;
|
|
10
|
+
expiresAt: string;
|
|
11
|
+
}
|
|
12
|
+
export type VoiceClientControl = {
|
|
13
|
+
type: 'mute';
|
|
14
|
+
muted: boolean;
|
|
15
|
+
} | {
|
|
16
|
+
type: 'interrupt';
|
|
17
|
+
} | {
|
|
18
|
+
type: 'end';
|
|
19
|
+
} | {
|
|
20
|
+
type: 'ping';
|
|
21
|
+
} | {
|
|
22
|
+
type: 'playback.done';
|
|
23
|
+
responseId: string;
|
|
24
|
+
};
|
|
25
|
+
/** Raw audio travels in bounded binary frames; supplier events are never forwarded. */
|
|
26
|
+
export type VoiceServerControl = {
|
|
27
|
+
type: 'ready';
|
|
28
|
+
sessionId: string;
|
|
29
|
+
} | {
|
|
30
|
+
type: 'clear_audio';
|
|
31
|
+
} | {
|
|
32
|
+
type: 'response.started' | 'response.done';
|
|
33
|
+
responseId: string;
|
|
34
|
+
} | {
|
|
35
|
+
type: 'transcript';
|
|
36
|
+
role: 'user' | 'assistant';
|
|
37
|
+
id: string;
|
|
38
|
+
text: string;
|
|
39
|
+
final: boolean;
|
|
40
|
+
} | {
|
|
41
|
+
type: 'task';
|
|
42
|
+
action: 'send' | 'steer';
|
|
43
|
+
taskId: string;
|
|
44
|
+
status: VoiceTaskStatus;
|
|
45
|
+
text?: string;
|
|
46
|
+
} | {
|
|
47
|
+
type: 'error';
|
|
48
|
+
code: string;
|
|
49
|
+
message: string;
|
|
50
|
+
} | {
|
|
51
|
+
type: 'ended';
|
|
52
|
+
} | {
|
|
53
|
+
type: 'pong';
|
|
54
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { createResourceCardContent, isResourceCardContent, parseResourceCard, parseResourceCardContent, resourceCardId, upsertResourceCardContent } from '@xpert-ai/chatkit-types';
|
|
2
|
+
export type { ConversationResourceCard, ResourceCardContent, ResourceCardField, ResourceCardFile, ResourceCardFileReference, ResourceCardImage, ResourceCardOpenTarget, ResourceCardScalar, TMessageContentResourceCard } from '@xpert-ai/chatkit-types';
|
|
@@ -22,6 +22,7 @@ export declare enum SandboxTerminalClosedReason {
|
|
|
22
22
|
}
|
|
23
23
|
export declare enum SandboxTerminalErrorCode {
|
|
24
24
|
CloseFailed = "close_failed",
|
|
25
|
+
ComputerDesktopRequired = "computer_desktop_required",
|
|
25
26
|
ConversationNotFound = "conversation_not_found",
|
|
26
27
|
ConversationRequired = "conversation_required",
|
|
27
28
|
InputFailed = "input_failed",
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { TMessageContentResourceCard } from './resource-card';
|
|
2
|
+
/** Complete durable discovery snapshot. Tokens are delivered only by the per-run stream. */
|
|
3
|
+
export interface ThreadActivitySnapshot {
|
|
4
|
+
version: 1;
|
|
5
|
+
threadId: string;
|
|
6
|
+
runs: Array<{
|
|
7
|
+
id: string;
|
|
8
|
+
status: string;
|
|
9
|
+
updatedAt: string;
|
|
10
|
+
createdAt: string;
|
|
11
|
+
messageRevision: string;
|
|
12
|
+
}>;
|
|
13
|
+
cards: TMessageContentResourceCard[];
|
|
14
|
+
}
|
|
@@ -15,6 +15,8 @@ export type TXpertExecution = {
|
|
|
15
15
|
status?: XpertAgentExecutionStatusEnum;
|
|
16
16
|
error?: string;
|
|
17
17
|
elapsedTime?: number;
|
|
18
|
+
/** Wall-clock end of the current execution attempt; cleared when execution resumes. */
|
|
19
|
+
completedAt?: Date | null;
|
|
18
20
|
threadId?: string;
|
|
19
21
|
checkpointNs?: string;
|
|
20
22
|
checkpointId?: string;
|
|
@@ -97,6 +99,7 @@ export declare enum XpertAgentExecutionStatusEnum {
|
|
|
97
99
|
INTERRUPTED = "interrupted"
|
|
98
100
|
}
|
|
99
101
|
export type TAgentExecutionMetadata = {
|
|
102
|
+
businessOutcome?: import('@xpert-ai/chatkit-types').TAgentExecutionOutcome;
|
|
100
103
|
/** Recorded by the invocation boundary; never inferred from agent names. */
|
|
101
104
|
invocationKind?: 'external_assistant' | 'sub_agent';
|
|
102
105
|
/** Tool call in the parent execution that started this run. Omit for workflow-driven runs. */
|
|
@@ -142,6 +145,7 @@ export type TAgentExecutionMetadata = {
|
|
|
142
145
|
};
|
|
143
146
|
/** Public execution summary shared by live events and conversation history. */
|
|
144
147
|
export type TChatAgentRunSummary = {
|
|
148
|
+
businessOutcome?: import('@xpert-ai/chatkit-types').TAgentExecutionOutcome;
|
|
145
149
|
/** Identifies the main reply and its total duration without inferring identity from agent names. */
|
|
146
150
|
isRoot?: boolean;
|
|
147
151
|
id: string;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { AgentInvocationStatus } from './agent-runtime.model';
|
|
2
|
+
import type { ProjectTaskDecision, ProjectTaskExecutionPurpose, ProjectTaskSpecificationSnapshot } from './project-task-runtime.model';
|
|
1
3
|
import { IBasePerTenantAndOrganizationEntityModel } from '../base-entity.model';
|
|
2
4
|
import { IPagination } from '../core.model';
|
|
3
5
|
import { IIntegration } from '../integration.model';
|
|
@@ -10,6 +12,7 @@ import { IXpertToolset } from './xpert-toolset.model';
|
|
|
10
12
|
import { IXpertWorkspace } from './xpert-workspace.model';
|
|
11
13
|
import { IXpert, TXpertTeamDraft } from './xpert.model';
|
|
12
14
|
import type { XpertProjectClassification, XpertProjectTypeRef } from './xpert-project-type.model';
|
|
15
|
+
import type { ConversationResourceCard } from './resource-card';
|
|
13
16
|
export type TXpertProjectSettings = {
|
|
14
17
|
/** @deprecated Project instructions are stored in /project/<projectId>/project.md. */
|
|
15
18
|
instruction?: string;
|
|
@@ -20,6 +23,8 @@ export type TXpertProjectSettings = {
|
|
|
20
23
|
conversationId: string;
|
|
21
24
|
initialName: string;
|
|
22
25
|
nameResolved?: boolean;
|
|
26
|
+
resourceCards?: ConversationResourceCard[];
|
|
27
|
+
resourceCardMessageId?: string;
|
|
23
28
|
};
|
|
24
29
|
/** @deprecated Project Xperts are peers and no default Project Assistant is selected. */
|
|
25
30
|
projectAssistantId?: string;
|
|
@@ -215,6 +220,9 @@ export interface IBasePerXpertProjectEntityModel extends IBasePerTenantAndOrgani
|
|
|
215
220
|
project?: IXpertProject;
|
|
216
221
|
}
|
|
217
222
|
export interface IXpertProjectTask extends IBasePerXpertProjectEntityModel {
|
|
223
|
+
decisions?: ProjectTaskDecision[];
|
|
224
|
+
/** Measured completion percentage (0–100); null/omitted means unknown. */
|
|
225
|
+
progress?: number | null;
|
|
218
226
|
providerKey?: string | null;
|
|
219
227
|
sourceKey?: string | null;
|
|
220
228
|
sourceRevision?: string | null;
|
|
@@ -230,6 +238,9 @@ export interface IXpertProjectTask extends IBasePerXpertProjectEntityModel {
|
|
|
230
238
|
name: string;
|
|
231
239
|
title?: string;
|
|
232
240
|
description?: string;
|
|
241
|
+
/** Explicit completion requirements, independent of reported step progress. */
|
|
242
|
+
requirements?: string[];
|
|
243
|
+
/** Business task type. Provider projections use their registered namespaced taskType key. */
|
|
233
244
|
type?: string;
|
|
234
245
|
status: TXpertProjectTaskStatus | 'pending' | 'completed' | 'failed';
|
|
235
246
|
priority?: TXpertProjectTaskPriority;
|
|
@@ -257,9 +268,19 @@ export interface IXpertProjectTaskConversation extends IBasePerXpertProjectEntit
|
|
|
257
268
|
sourceExecutionId?: string;
|
|
258
269
|
}
|
|
259
270
|
export interface IXpertProjectTaskExecution extends IBasePerXpertProjectEntityModel {
|
|
271
|
+
/** Runtime-owned attempt. Distinct from a native Agent execution ID. */
|
|
272
|
+
invocationId?: string | null;
|
|
273
|
+
invocationStatus?: AgentInvocationStatus | null;
|
|
274
|
+
dispatchRequestId?: string | null;
|
|
275
|
+
dispatchState?: 'pending' | 'submitted' | null;
|
|
276
|
+
specificationSnapshot?: ProjectTaskSpecificationSnapshot | null;
|
|
277
|
+
purpose?: ProjectTaskExecutionPurpose | null;
|
|
260
278
|
/** Observed runtime status, independent from the business task acceptance status. */
|
|
261
279
|
runtimeStartedAt?: string | null;
|
|
262
280
|
runtimeCompletedAt?: string | null;
|
|
281
|
+
/** Authorized Invocation presentation, not persisted task state. */
|
|
282
|
+
runtimeProvider?: string;
|
|
283
|
+
runtimeToolId?: string;
|
|
263
284
|
runtimeStatus?: 'running' | 'success' | 'error' | 'pending' | 'timeout' | 'interrupted' | 'unknown';
|
|
264
285
|
sourceKey?: string | null;
|
|
265
286
|
taskId: string;
|
|
@@ -124,7 +124,29 @@ export interface AssistantCapabilityDeclaration {
|
|
|
124
124
|
/** Required capabilities cannot be disabled; optional capabilities default to off. */
|
|
125
125
|
required?: boolean;
|
|
126
126
|
}
|
|
127
|
+
/** Public model metadata for capability setup; never includes provider credentials or model configuration. */
|
|
128
|
+
export interface XpertTemplateModelOption {
|
|
129
|
+
/** Opaque selection key; clients must submit it unchanged rather than reconstructing it. */
|
|
130
|
+
id: string;
|
|
131
|
+
label: string;
|
|
132
|
+
/** Model reference for installation; setup responses only project copilotId, model and modelType. */
|
|
133
|
+
copilotModel: TCopilotModel;
|
|
134
|
+
/** Display grouping by provider, not a credential scope. Optional for older setup endpoints. */
|
|
135
|
+
provider?: {
|
|
136
|
+
id: string;
|
|
137
|
+
label: string;
|
|
138
|
+
};
|
|
139
|
+
/** Display name that distinguishes multiple configured connections for the same provider. */
|
|
140
|
+
connectionName?: string;
|
|
141
|
+
/** Declared model features for badges/recommendations; installation still validates compatibility. */
|
|
142
|
+
features?: ModelFeature[];
|
|
143
|
+
/** Context capacity in tokens, not usage; omitted when the provider does not declare it. */
|
|
144
|
+
contextWindow?: number;
|
|
145
|
+
}
|
|
127
146
|
export interface XpertTemplateSetup {
|
|
147
|
+
/** ID of a compatible organization default in `models`; absent if none qualifies. */
|
|
148
|
+
defaultModelId?: string;
|
|
149
|
+
realtimeModels?: import('./realtime-voice.model').RealtimeModelOption[];
|
|
128
150
|
requiresModel?: boolean;
|
|
129
151
|
optionalCapabilities: {
|
|
130
152
|
key: XpertTemplateCapability;
|
|
@@ -132,11 +154,7 @@ export interface XpertTemplateSetup {
|
|
|
132
154
|
description: string;
|
|
133
155
|
}[];
|
|
134
156
|
requiredModelFeatures: ModelFeature[];
|
|
135
|
-
models:
|
|
136
|
-
id: string;
|
|
137
|
-
label: string;
|
|
138
|
-
copilotModel: TCopilotModel;
|
|
139
|
-
}[];
|
|
157
|
+
models: XpertTemplateModelOption[];
|
|
140
158
|
canInstall: boolean;
|
|
141
159
|
reason?: string;
|
|
142
160
|
}
|
|
@@ -212,7 +212,13 @@ export type TMCPSchema = {
|
|
|
212
212
|
mcpServers?: Record<string, TMCPServer>;
|
|
213
213
|
};
|
|
214
214
|
export declare const MCP_APP_RESOURCE_MIME_TYPE = "text/html;profile=mcp-app";
|
|
215
|
+
/** Optional host refresh action. Arguments are fixed by the resource provider. */
|
|
216
|
+
export type TMcpAppRefresh = {
|
|
217
|
+
toolName: string;
|
|
218
|
+
arguments?: Record<string, import('../core.model').JSONValue>;
|
|
219
|
+
};
|
|
215
220
|
export type TMcpAppUiMeta = {
|
|
221
|
+
refresh?: TMcpAppRefresh;
|
|
216
222
|
resourceUri: string;
|
|
217
223
|
title?: string | I18nObject;
|
|
218
224
|
description?: string | I18nObject;
|
package/src/ai/xpert.model.d.ts
CHANGED
|
@@ -42,6 +42,7 @@ export type TXpertTitleFeature = {
|
|
|
42
42
|
instruction?: string;
|
|
43
43
|
};
|
|
44
44
|
export type TXpertFeatures = {
|
|
45
|
+
realtimeVoice?: import('./realtime-voice.model').RealtimeVoiceFeature;
|
|
45
46
|
/** Generate start-screen questions from recurring intents in conversation history. */
|
|
46
47
|
frequentQuestions?: {
|
|
47
48
|
enabled: boolean;
|
|
@@ -300,6 +301,10 @@ export type TXpertDataXpertOptions = {
|
|
|
300
301
|
[key: string]: unknown;
|
|
301
302
|
};
|
|
302
303
|
export type TXpertOptions = {
|
|
304
|
+
/** Default ChatKit message display for this Assistant. Omit to inherit the host application's default. */
|
|
305
|
+
messagePresentation?: {
|
|
306
|
+
mode?: 'transcript' | 'bubbles';
|
|
307
|
+
};
|
|
303
308
|
assistantCapabilities?: import('./assistant-configuration.model').AssistantCapabilityState;
|
|
304
309
|
/** Runtime-selectable Primary Agent models. The configured Primary model is added automatically. */
|
|
305
310
|
modelSelection?: {
|
|
@@ -310,8 +315,8 @@ export type TXpertOptions = {
|
|
|
310
315
|
workspaceScope?: {
|
|
311
316
|
/** Require an explicit Project, or prefer one while preserving the legacy fallback. */
|
|
312
317
|
mode: 'project-required' | 'project-preferred';
|
|
313
|
-
/**
|
|
314
|
-
onMissing?: 'create';
|
|
318
|
+
/** Create on first send, or defer creation until a human confirms the pending setup App. */
|
|
319
|
+
onMissing?: 'create' | 'confirm';
|
|
315
320
|
/** Explicit application context for discovery and governed Project creation. */
|
|
316
321
|
projectType?: import('./xpert-project-type.model').XpertProjectTypeRef;
|
|
317
322
|
};
|
package/src/api-key.model.d.ts
CHANGED
|
@@ -8,15 +8,19 @@ export interface IApiKey extends IBasePerTenantAndOrganizationEntityModel {
|
|
|
8
8
|
token: string;
|
|
9
9
|
name?: string;
|
|
10
10
|
/**
|
|
11
|
-
* Stable binding kind for resolving the technical principal behind this key.
|
|
11
|
+
* Stable persisted binding kind for resolving the technical principal behind this key.
|
|
12
|
+
* @deprecated Reading IApiPrincipal.apiKey.type for resource authorization is deprecated;
|
|
13
|
+
* use IApiPrincipal.resourceScope.kind. This persisted identity discriminator remains supported.
|
|
12
14
|
*/
|
|
13
15
|
type?: ApiKeyBindingType;
|
|
14
16
|
/**
|
|
15
|
-
*
|
|
17
|
+
* Persistence/technical-identity binding only. Examples:
|
|
16
18
|
* - assistant => xpertId
|
|
17
19
|
* - workspace => workspaceId
|
|
18
20
|
* - integration => integrationId
|
|
19
21
|
* - client => clientCode
|
|
22
|
+
* @deprecated Business authorization via IApiPrincipal.apiKey.entityId is deprecated;
|
|
23
|
+
* consume the authentication-normalized IApiPrincipal.resourceScope instead.
|
|
20
24
|
*/
|
|
21
25
|
entityId?: string;
|
|
22
26
|
validUntil?: Date;
|
|
@@ -48,8 +52,35 @@ export declare enum ApiKeyBindingType {
|
|
|
48
52
|
KNOWLEDGEBASE = "knowledgebase"
|
|
49
53
|
}
|
|
50
54
|
export type ApiPrincipalType = 'api_key' | 'client_secret';
|
|
55
|
+
/**
|
|
56
|
+
* Credential-bound resource audience restored by authentication. This is not a
|
|
57
|
+
* permission grant: tenant/organization, membership and operation checks still apply.
|
|
58
|
+
* Only explicit persisted bindings may produce a scope; request parameters cannot widen it.
|
|
59
|
+
*/
|
|
60
|
+
export type ApiPrincipalResourceScope =
|
|
61
|
+
/** One digital expert; thread/file operations must additionally match that expert. */
|
|
62
|
+
{
|
|
63
|
+
kind: 'assistant';
|
|
64
|
+
xpertId: string;
|
|
65
|
+
}
|
|
66
|
+
/** One workspace; membership and operation policy determine which resources are accessible. */
|
|
67
|
+
| {
|
|
68
|
+
kind: 'workspace';
|
|
69
|
+
workspaceId: string;
|
|
70
|
+
}
|
|
71
|
+
/** One shared conversation; never grants direct access to members' Assistant runtime threads. */
|
|
72
|
+
| {
|
|
73
|
+
kind: 'conversation';
|
|
74
|
+
conversationId: string;
|
|
75
|
+
};
|
|
51
76
|
export interface IApiPrincipal extends IUser {
|
|
52
77
|
principalType: ApiPrincipalType;
|
|
78
|
+
/**
|
|
79
|
+
* Backing credential metadata. Real API keys retain their persistence binding.
|
|
80
|
+
* @deprecated Reading apiKey.type/entityId for resource authorization, or using
|
|
81
|
+
* a synthetic API key as an audience, is deprecated. Use resourceScope instead.
|
|
82
|
+
* Synthetic Assistant keys remain temporarily for existing metadata consumers.
|
|
83
|
+
*/
|
|
53
84
|
apiKey?: IApiKey;
|
|
54
85
|
/**
|
|
55
86
|
* Binding target kind for short-lived client_secret principals.
|
|
@@ -63,6 +94,10 @@ export interface IApiPrincipal extends IUser {
|
|
|
63
94
|
*/
|
|
64
95
|
clientSecretBindingType?: SecretTokenBindingType | null;
|
|
65
96
|
clientSecretId?: string | null;
|
|
97
|
+
/** Canonical resource audience. Undefined means no normalized resource binding, not unrestricted permission. */
|
|
98
|
+
resourceScope?: ApiPrincipalResourceScope;
|
|
99
|
+
/** Absolute expiry for long-lived streams to recheck after the initial authentication. */
|
|
100
|
+
clientSecretExpiresAt?: Date;
|
|
66
101
|
/** Exact enterprise H5 channel carried by an enterprise client secret. */
|
|
67
102
|
enterpriseH5Scope?: TEnterpriseH5TokenScope | null;
|
|
68
103
|
/**
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** Official resource packages imported into the selected organization, without publishing workspace bindings. */
|
|
2
|
+
export declare const DEFAULT_AGENT_PLUGINS_SOURCE: {
|
|
3
|
+
readonly url: "https://github.com/xpert-ai/xpert-plugins.git";
|
|
4
|
+
readonly ref: "main";
|
|
5
|
+
readonly subdirectory: "agent-plugins";
|
|
6
|
+
readonly browseUrl: "https://github.com/xpert-ai/xpert-plugins/tree/main/agent-plugins";
|
|
7
|
+
};
|
|
8
|
+
export interface DefaultAgentPluginImportItem {
|
|
9
|
+
id: string;
|
|
10
|
+
status: 'imported' | 'existing' | 'failed';
|
|
11
|
+
packageId?: string;
|
|
12
|
+
title?: string;
|
|
13
|
+
diagnosticCount?: number;
|
|
14
|
+
error?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface DefaultAgentPluginsImportResult {
|
|
17
|
+
commit: string;
|
|
18
|
+
items: DefaultAgentPluginImportItem[];
|
|
19
|
+
}
|
package/src/i18n.model.d.ts
CHANGED
package/src/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from './types';
|
|
2
2
|
export * from './ai/project-task-graph.model';
|
|
3
|
+
export * from './ai/project-task-type.model';
|
|
3
4
|
export * from './ai/project-task-schedule';
|
|
4
5
|
export * from './utils';
|
|
5
6
|
export type { I18nObject, I18nText } from './i18n.model';
|
|
@@ -64,3 +65,7 @@ export * from './view-extension';
|
|
|
64
65
|
export * from './runtime-control';
|
|
65
66
|
export type { RuntimeResourceKind, RuntimeResourceStatus, RuntimeResourceReference, RuntimeResourcesSelection, AgentPluginDiagnostic, RuntimeResourceCatalogItem, RuntimeResourceView, RuntimeResourceCatalog, AgentPluginXpertExtension, AgentPluginConnectorAuth, AgentPluginConnectorBinding, RuntimeResourceDefinition, RuntimeResourceBindingInput, WorkspaceAgentPlugin, WorkspaceAgentPluginOptions, WorkspaceAgentPluginAddInput, WorkspaceAgentPluginAddResult } from './agent-plugin';
|
|
66
67
|
export * from './desktop-shell.model';
|
|
68
|
+
export * from './ai/agent-output-delivery.model';
|
|
69
|
+
export * from './ai/execution-activity.model';
|
|
70
|
+
export * from './setup-plugins';
|
|
71
|
+
export * from './default-agent-plugins';
|