@xpert-ai/contracts 3.19.0 → 3.20.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 +393 -4
- package/index.esm.js +341 -6
- 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-message-envelope.model.d.ts +55 -0
- package/src/ai/chat-message.model.d.ts +4 -0
- package/src/ai/chat.model.d.ts +10 -0
- package/src/ai/execution-activity.model.d.ts +547 -0
- package/src/ai/index.d.ts +8 -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/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/i18n.model.d.ts +1 -0
- package/src/index.d.ts +3 -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';
|
|
@@ -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/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,5 @@ 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';
|
package/src/types.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import type { AssistantAppearance } from '@xpert-ai/chatkit-types';
|
|
1
2
|
import ShortUniqueId from 'short-unique-id';
|
|
2
3
|
import type * as z3 from 'zod/v3';
|
|
3
4
|
import type * as z4 from 'zod/v4/core';
|
|
4
5
|
import type { I18nObject } from './i18n.model';
|
|
6
|
+
export type { AssistantAppearance as TAssistantAppearance, AssistantCharacterConfig as TAssistantCharacterConfig } from '@xpert-ai/chatkit-types';
|
|
5
7
|
export type { I18nObject, I18nText } from './i18n.model';
|
|
6
8
|
export { resolveI18nText } from './i18n.model';
|
|
7
9
|
declare const uuidGenerator: ShortUniqueId;
|
|
@@ -15,6 +17,8 @@ export declare const uuid: (...args: Parameters<(typeof uuidGenerator)["randomUU
|
|
|
15
17
|
*/
|
|
16
18
|
export type ID = string;
|
|
17
19
|
export type TAvatar = {
|
|
20
|
+
/** Optional animated Assistant presentation; legacy renderers continue to use url/emoji. */
|
|
21
|
+
appearance?: AssistantAppearance;
|
|
18
22
|
emoji?: {
|
|
19
23
|
id: string;
|
|
20
24
|
set?: '' | 'apple' | 'google' | 'twitter' | 'facebook';
|
|
@@ -144,6 +144,8 @@ export interface XpertWorkbenchViewOptions {
|
|
|
144
144
|
* menu, navigation or live Agent request. This does not grant view access.
|
|
145
145
|
*/
|
|
146
146
|
openMode?: 'auto' | 'on-demand';
|
|
147
|
+
/** Opt into conversation changes while retaining the mounted Remote View. */
|
|
148
|
+
contextScope?: 'project' | 'conversation';
|
|
147
149
|
menu?: {
|
|
148
150
|
/** Controls the manual entry only; does not disable the view or navigation. */
|
|
149
151
|
enabled?: boolean;
|
|
@@ -409,6 +411,10 @@ export interface WorkbenchNavigationOpenPayload {
|
|
|
409
411
|
viewKey?: string;
|
|
410
412
|
selectionId?: string;
|
|
411
413
|
parameters?: Record<string, XpertViewScalar | XpertViewScalar[]>;
|
|
414
|
+
/** Exact visible message in the requested branch. */
|
|
415
|
+
messageId?: string;
|
|
416
|
+
/** Keep the originating Workbench view open during navigation. */
|
|
417
|
+
preserveView?: boolean;
|
|
412
418
|
}
|
|
413
419
|
export interface WorkbenchAssistantConversationOpenRequest {
|
|
414
420
|
conversationId: string;
|
|
@@ -418,6 +424,10 @@ export interface WorkbenchAssistantConversationOpenRequest {
|
|
|
418
424
|
xpertId?: string;
|
|
419
425
|
/** Untrusted hint; the host must resolve the canonical Project from `conversationId`. */
|
|
420
426
|
projectId?: string;
|
|
427
|
+
/** Exact visible message in the requested branch. */
|
|
428
|
+
messageId?: string;
|
|
429
|
+
/** Keep the originating Workbench view open during navigation. */
|
|
430
|
+
preserveView?: boolean;
|
|
421
431
|
}
|
|
422
432
|
/** Server-authorized runtime scope used to rebuild ChatKit for one persisted Assistant conversation. */
|
|
423
433
|
export interface WorkbenchAssistantConversationResolution {
|
|
@@ -426,11 +436,12 @@ export interface WorkbenchAssistantConversationResolution {
|
|
|
426
436
|
xpertId: string;
|
|
427
437
|
projectId: string | null;
|
|
428
438
|
isExternalAssistant: boolean;
|
|
439
|
+
messageId?: string;
|
|
429
440
|
}
|
|
430
441
|
export interface WorkbenchAssistantProjectOpenRequest {
|
|
431
442
|
/** Trusted platform Chat Project id; this is distinct from plugin business ids. */
|
|
432
443
|
projectId: string;
|
|
433
|
-
/**
|
|
444
|
+
/** Inspect a View in this Project without changing the active conversation. */
|
|
434
445
|
view?: WorkbenchExtensionViewOpenRequest;
|
|
435
446
|
}
|
|
436
447
|
export interface WorkbenchExtensionViewOpenRequest {
|
|
@@ -524,6 +535,16 @@ export interface XpertRemoteViewHostEventMessage {
|
|
|
524
535
|
/** Optional visualization metadata used by manifest filters and remote views. */
|
|
525
536
|
visualization?: XpertViewHostEventVisualization;
|
|
526
537
|
}
|
|
538
|
+
/** Sent to every mounted View after an authorized runtime context change, including hidden Views. */
|
|
539
|
+
export interface XpertRemoteViewContextChangedEvent extends XpertRemoteViewHostEventMessage {
|
|
540
|
+
type: 'view.context.changed';
|
|
541
|
+
data: {
|
|
542
|
+
/** Monotonic within this View instance; stale asynchronous results must be ignored. */
|
|
543
|
+
revision: number;
|
|
544
|
+
/** Complete target scope. Null means no binding, never a scope still being resolved. */
|
|
545
|
+
runtimeScope: Required<XpertViewRuntimeScopeInput>;
|
|
546
|
+
};
|
|
547
|
+
}
|
|
527
548
|
/**
|
|
528
549
|
* Host-internal event message. `hostType` and `hostId` are routing fields and
|
|
529
550
|
* must be stripped before forwarding to remote components.
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
export declare const AGENT_WORKBENCH_SLOT = "agent.workbench
|
|
1
|
+
/** Assistant Workbench slot; openMode controls initial tab opening separately. */
|
|
2
|
+
export declare const AGENT_WORKBENCH_SLOT = "agent.workbench";
|
|
3
|
+
/** Legacy plugin declarations and client requests; normalized to AGENT_WORKBENCH_SLOT by the host. */
|
|
4
|
+
export declare const LEGACY_AGENT_WORKBENCH_SLOTS: readonly ["agent.workbench.fixed", "agent.workbench.main"];
|
|
5
|
+
/** Platform-provided navigation, available without Assistant middleware. */
|
|
6
|
+
export declare const CONVERSATION_MAP_FEATURE = "platform.conversation-map";
|