@xpert-ai/contracts 3.33.1 → 3.35.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 +545 -168
- package/index.esm.js +517 -169
- package/package.json +2 -2
- package/src/ai/ai.model.d.ts +1 -1
- package/src/ai/chat-group-entity.model.d.ts +1 -1
- package/src/ai/chat-group.model.d.ts +116 -3
- package/src/ai/conversation-trail.model.d.ts +2 -2
- package/src/ai/evolution/baseline.d.ts +12 -0
- package/src/ai/evolution/candidate.d.ts +20 -0
- package/src/ai/evolution/capability-version.d.ts +12 -0
- package/src/ai/evolution/change.d.ts +40 -2
- package/src/ai/evolution/evaluation.d.ts +26 -0
- package/src/ai/evolution/example.d.ts +5 -0
- package/src/ai/evolution/experience.d.ts +3 -0
- package/src/ai/evolution/governance.d.ts +29 -3
- package/src/ai/evolution/index.d.ts +1 -0
- package/src/ai/evolution/learning-event.d.ts +13 -0
- package/src/ai/evolution/learning-review.d.ts +61 -0
- package/src/ai/evolution/persistence.d.ts +7 -2
- package/src/ai/evolution/provider.d.ts +38 -0
- package/src/ai/evolution/release.d.ts +24 -6
- package/src/ai/evolution/runtime.d.ts +19 -0
- package/src/ai/evolution/strategy.d.ts +10 -0
- package/src/ai/evolution/target.d.ts +34 -6
- package/src/ai/execution-control-evidence.schema.d.ts +46 -4
- package/src/ai/index.d.ts +4 -0
- package/src/ai/model-execution.model.d.ts +2 -0
- package/src/ai/project-configuration-view.model.d.ts +77 -0
- package/src/ai/project-pipeline/analytics.d.ts +5 -33
- package/src/ai/project-pipeline/budget.schema.d.ts +38 -0
- package/src/ai/project-pipeline/commands.schema.d.ts +10 -10
- package/src/ai/project-pipeline/configuration-form.d.ts +2 -2
- package/src/ai/project-pipeline/index.d.ts +1 -0
- package/src/ai/project-pipeline/model-usage-statistics.d.ts +6 -26
- package/src/ai/project-pipeline/operation.schema.d.ts +370 -40
- package/src/ai/project-pipeline/plugin-deployment.schema.d.ts +152 -0
- package/src/ai/project-pipeline/portfolio.schema.d.ts +14 -86
- package/src/ai/project-pipeline/provider-actions.schema.d.ts +12 -12
- package/src/ai/project-pipeline/runtime.schema.d.ts +2 -2
- package/src/ai/project-pipeline/statistics.d.ts +5 -33
- package/src/ai/project-task-runtime.model.d.ts +1329 -78
- package/src/ai/project-type-configuration.model.d.ts +48 -0
- package/src/ai/xpert-agent-execution.model.d.ts +16 -2
- package/src/ai/xpert-project-type.model.d.ts +3 -0
- package/src/ai/xpert-project.model.d.ts +3 -1
- package/src/ai/xpert-task.model.d.ts +16 -0
- package/src/ai/xpert.model.d.ts +2 -0
- package/src/app-platform.d.ts +36 -36
- package/src/artifact-group-reference.model.d.ts +71 -0
- package/src/artifact-use-grant-command.d.ts +54 -0
- package/src/artifact-use-grant.model.d.ts +62 -0
- package/src/content-resource.model.d.ts +3 -0
- package/src/conversation-resource.model.d.ts +63 -0
- package/src/desktop-shell.model.d.ts +13 -1
- package/src/icon-definition.schema.d.ts +24 -0
- package/src/index.d.ts +6 -0
- package/src/plugin-management.d.ts +13 -0
- package/src/plugin.d.ts +2 -0
- package/src/resource-analysis.model.d.ts +140 -0
- package/src/runtime-control.d.ts +6 -0
- package/src/types.d.ts +1 -2
- package/src/user-notification.schema.d.ts +29 -0
- package/src/user.model.d.ts +11 -0
- package/src/view-extension/client-commands.d.ts +176 -0
- package/src/view-extension/context-event.d.ts +66 -0
- package/src/view-extension/index.d.ts +2 -0
- package/src/view-extension/model.d.ts +2 -158
- package/src/view-extension/workbench-open.d.ts +17 -2
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import type { AnalyticalDataset, AnalyticsField, AnalyticsParameter, AnalyticsValue } from './analytics-query.model';
|
|
2
|
+
/**
|
|
3
|
+
* Explicit consent to disclose bounded query results to every member of the receiving group.
|
|
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.
|
|
6
|
+
* Omit the policy entirely for view-only access; an empty dataset list is not a wildcard grant.
|
|
7
|
+
*/
|
|
8
|
+
export interface ResourceAnalysisPolicy {
|
|
9
|
+
/**
|
|
10
|
+
* bindings permits declared parameter values and field projection over published binding results.
|
|
11
|
+
* explore additionally permits query filters, grouping, aggregation and sorting within the same approved datasets.
|
|
12
|
+
* Neither mode permits arbitrary SQL, new tables/models, source browsing or writes.
|
|
13
|
+
*/
|
|
14
|
+
mode: 'bindings' | 'explore';
|
|
15
|
+
/** Nonempty allowlist of datasets in the pinned published resource; keys must be unique. */
|
|
16
|
+
datasets: Array<{
|
|
17
|
+
/** Published AnalyticsBinding.id, matching the provider's dataset key; not a label or output datasetId. */
|
|
18
|
+
key: string;
|
|
19
|
+
/** Nonempty, unique AnalyticsField.id allowlist used by projection, filters and aggregation. */
|
|
20
|
+
fields: string[];
|
|
21
|
+
/** Immutable AND predicates on allowed fields, applied before aggregation and disclosure to the Agent. */
|
|
22
|
+
filters: ResourceAnalysisFilter[];
|
|
23
|
+
}>;
|
|
24
|
+
/**
|
|
25
|
+
* Allows returning dataset rows without further aggregation. These may already be aggregated by the binding.
|
|
26
|
+
* false requires an aggregate query; bindings mode therefore requires true.
|
|
27
|
+
*/
|
|
28
|
+
allowDetails: boolean;
|
|
29
|
+
/** Maximum output rows per query (1–100), after filtering/aggregation; not a source-scan or per-turn budget. */
|
|
30
|
+
maxRows: number;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* One typed predicate on a declared dataset field. Predicate arrays combine with AND; in matches any listed value.
|
|
34
|
+
* Uses AnalyticsValue wire types: int64/decimal values are exact strings, not floating-point numbers.
|
|
35
|
+
* Null participates in eq/ne/in comparisons; ordered comparisons with null do not match.
|
|
36
|
+
*/
|
|
37
|
+
export interface ResourceAnalysisFilter {
|
|
38
|
+
/** AnalyticsField.id within the approved field allowlist, never a SQL expression. */
|
|
39
|
+
field: string;
|
|
40
|
+
/** Closed comparison vocabulary; additions require matching schema and execution support. */
|
|
41
|
+
operator: 'eq' | 'ne' | 'in' | 'gt' | 'gte' | 'lt' | 'lte';
|
|
42
|
+
/** Exactly one scalar except for in, which accepts a nonempty list; values must match the field's logical type. */
|
|
43
|
+
values: AnalyticsValue[];
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Normalized request for resource_query, scoped externally by the accepted group reference ID.
|
|
47
|
+
* Read ResourceAnalysisDescription first; keys and fields must come from that authorized description.
|
|
48
|
+
* The shared schema supplies empty collections for omitted wire fields. The server then validates the live policy.
|
|
49
|
+
* Extend schema, authorization checks and execution together when adding a query operation.
|
|
50
|
+
*/
|
|
51
|
+
export interface ResourceAnalysisQuery {
|
|
52
|
+
/** Approved published binding key, matching ResourceAnalysisDataset.key. */
|
|
53
|
+
datasetKey: string;
|
|
54
|
+
/** Declared parameter values keyed by AnalyticsParameter.controlId; source identities/payloads cannot be supplied. */
|
|
55
|
+
controls: Record<string, AnalyticsValue>;
|
|
56
|
+
/** Detail projection; [] selects all approved fields. Aggregate output instead consists of groupBy and aggregate keys. */
|
|
57
|
+
select: string[];
|
|
58
|
+
/** Additional AND predicates in explore mode; cannot replace or relax the policy's fixed filters. */
|
|
59
|
+
filters: ResourceAnalysisFilter[];
|
|
60
|
+
/** Approved field IDs for grouping; requires at least one aggregate. [] aggregates the whole filtered dataset. */
|
|
61
|
+
groupBy: string[];
|
|
62
|
+
/** Explore-only aggregates; incomplete/truncated input is rejected rather than reported as an exact aggregate. */
|
|
63
|
+
aggregates: Array<{
|
|
64
|
+
/** Omit for count (row count); sum/min/max require an approved numeric field. */
|
|
65
|
+
field?: string;
|
|
66
|
+
/** New output field ID, unique among aggregate/grouping keys and distinct from existing dataset field IDs. */
|
|
67
|
+
key: string;
|
|
68
|
+
/** Supported aggregate vocabulary; count counts rows, while numeric aggregates ignore null values. */
|
|
69
|
+
operation: 'count' | 'sum' | 'min' | 'max';
|
|
70
|
+
}>;
|
|
71
|
+
/** Explore-only sort, evaluated after projection/aggregation and before the output row limit. */
|
|
72
|
+
orderBy: Array<{
|
|
73
|
+
/** Output field ID: a projected field, grouping field or aggregate key. */
|
|
74
|
+
field: string;
|
|
75
|
+
/** Ordered entries are applied in sequence, allowing deterministic multi-column sorting. */
|
|
76
|
+
direction: 'asc' | 'desc';
|
|
77
|
+
}>;
|
|
78
|
+
/** Omission uses the grant's maxRows; explicit limits must be positive and may not exceed that budget. */
|
|
79
|
+
limit?: number;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Public metadata for one analyzable dataset in a fixed resource version, without rows or native query declarations.
|
|
83
|
+
* Authoring inspection can describe the resource's fields; group inspection exposes only the accepted field scope.
|
|
84
|
+
*/
|
|
85
|
+
export interface ResourceAnalysisDataset {
|
|
86
|
+
/** Stable key within this published resource, equal to its AnalyticsBinding.id; do not derive it from title. */
|
|
87
|
+
key: string;
|
|
88
|
+
/** Display text only; it need not be unique and cannot be used for authorization or query routing. */
|
|
89
|
+
title: string;
|
|
90
|
+
/** Typed dataset fields; use their IDs and logical types when constructing queries. */
|
|
91
|
+
fields: AnalyticsField[];
|
|
92
|
+
/** Declared control inputs; group descriptions may omit defaults and allowed-value lists to avoid disclosure. */
|
|
93
|
+
parameters: AnalyticsParameter[];
|
|
94
|
+
/**
|
|
95
|
+
* Authoring-only eligibility hint for the inspecting actor. Missing means unchecked; false may include unavailable support.
|
|
96
|
+
* This is not permission for a recipient to query; issuing and using the grant both revalidate their own authority.
|
|
97
|
+
*/
|
|
98
|
+
canShare?: boolean;
|
|
99
|
+
}
|
|
100
|
+
/** resource_describe response for a currently authorized group reference; contains no business rows or credentials. */
|
|
101
|
+
export interface ResourceAnalysisDescription {
|
|
102
|
+
/** Accepted reference ID to use for the subsequent query; not the source Artifact or grant ID. */
|
|
103
|
+
referenceId: string;
|
|
104
|
+
/** Resource title for display/citation only. */
|
|
105
|
+
title: string;
|
|
106
|
+
/** Pinned published version's display sequence, not a mutable latest-version pointer. */
|
|
107
|
+
versionNumber: number;
|
|
108
|
+
/** Effective, explicitly accepted scope; clients must not widen it when constructing requests. */
|
|
109
|
+
policy: ResourceAnalysisPolicy;
|
|
110
|
+
/** Only approved datasets and fields; absence of another dataset must not trigger source-catalog discovery. */
|
|
111
|
+
datasets: ResourceAnalysisDataset[];
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Authorized query output and provenance for group-visible answers.
|
|
115
|
+
* Consumers must inspect dataset.completeness and freshness before claiming totals or current source state.
|
|
116
|
+
* Evidence identifies an executed result; it is not a reusable authorization or a complete replayable query.
|
|
117
|
+
*/
|
|
118
|
+
export interface ResourceAnalysisResult {
|
|
119
|
+
/** Result after policy projection, fixed/request filters, permitted analysis and the output row limit. */
|
|
120
|
+
dataset: AnalyticalDataset;
|
|
121
|
+
/** Host-produced provenance for citations and traceability, without source credentials or native query payloads. */
|
|
122
|
+
evidence: {
|
|
123
|
+
/** Accepted group reference used for this execution. */
|
|
124
|
+
referenceId: string;
|
|
125
|
+
/** Original source Artifact that supplied the fixed resource definition. */
|
|
126
|
+
artifactId: string;
|
|
127
|
+
/** Published version actually queried; never substitute the resource's current latest version. */
|
|
128
|
+
versionId: string;
|
|
129
|
+
/** Audience authorized to receive this result; not permission to forward it to another group. */
|
|
130
|
+
groupId: string;
|
|
131
|
+
/** Approved published binding key that was queried. */
|
|
132
|
+
datasetKey: string;
|
|
133
|
+
/** Dataset freshness.executedAt as an ISO 8601 timestamp, not the time the chat answer was rendered. */
|
|
134
|
+
queriedAt: string;
|
|
135
|
+
/** Control values supplied in the request; provider defaults may not be expanded into this map. */
|
|
136
|
+
controls: Record<string, AnalyticsValue>;
|
|
137
|
+
/** Combined fixed grant restrictions and request predicates, with AND semantics. */
|
|
138
|
+
filters: ResourceAnalysisFilter[];
|
|
139
|
+
};
|
|
140
|
+
}
|
package/src/runtime-control.d.ts
CHANGED
|
@@ -8,6 +8,12 @@ export interface IRuntimeStreamInterruption {
|
|
|
8
8
|
/** Process-supervisor execution modes; neither implies Pod/deployment orchestration. */
|
|
9
9
|
export type RuntimeRestartMode = 'self-signal' | 'rolling-self-signal';
|
|
10
10
|
export type RuntimeRestartStatus = 'in_progress' | 'completed' | 'failed' | 'awaiting_restart';
|
|
11
|
+
/** Host-attested rejection before a plugin module enters the Nest container. */
|
|
12
|
+
export interface IRuntimePluginFailureIsolation {
|
|
13
|
+
stage: 'provider-preflight';
|
|
14
|
+
version: string;
|
|
15
|
+
runtimeRevision?: string;
|
|
16
|
+
}
|
|
11
17
|
export interface IRuntimePluginRequirement {
|
|
12
18
|
scopeKey: string;
|
|
13
19
|
pluginName: string;
|
package/src/types.d.ts
CHANGED
|
@@ -6,8 +6,7 @@ import type { I18nObject } from './i18n.model';
|
|
|
6
6
|
export type { AssistantAppearance as TAssistantAppearance, AssistantCharacterConfig as TAssistantCharacterConfig } from '@xpert-ai/chatkit-types';
|
|
7
7
|
export type { I18nObject, I18nText } from './i18n.model';
|
|
8
8
|
export { resolveI18nText } from './i18n.model';
|
|
9
|
-
declare const
|
|
10
|
-
export declare const uuid: (...args: Parameters<(typeof uuidGenerator)["randomUUID"]>) => string;
|
|
9
|
+
export declare const uuid: (...args: Parameters<ShortUniqueId["randomUUID"]>) => string;
|
|
11
10
|
/**
|
|
12
11
|
* @description
|
|
13
12
|
* An entity ID. Represents a unique identifier as a string.
|
|
@@ -310,6 +310,29 @@ export declare const notificationSourceSchema: z.ZodObject<{
|
|
|
310
310
|
taskId?: string;
|
|
311
311
|
assistantId?: string;
|
|
312
312
|
}>;
|
|
313
|
+
export declare const scheduledNotificationOriginSchema: z.ZodObject<{
|
|
314
|
+
type: z.ZodLiteral<"scheduled_task">;
|
|
315
|
+
taskId: z.ZodString;
|
|
316
|
+
executionId: z.ZodString;
|
|
317
|
+
assistantId: z.ZodString;
|
|
318
|
+
conversationId: z.ZodString;
|
|
319
|
+
} & {
|
|
320
|
+
threadId: z.ZodOptional<z.ZodString>;
|
|
321
|
+
}, "strict", z.ZodTypeAny, {
|
|
322
|
+
type?: "scheduled_task";
|
|
323
|
+
conversationId?: string;
|
|
324
|
+
executionId?: string;
|
|
325
|
+
taskId?: string;
|
|
326
|
+
threadId?: string;
|
|
327
|
+
assistantId?: string;
|
|
328
|
+
}, {
|
|
329
|
+
type?: "scheduled_task";
|
|
330
|
+
conversationId?: string;
|
|
331
|
+
executionId?: string;
|
|
332
|
+
taskId?: string;
|
|
333
|
+
threadId?: string;
|
|
334
|
+
assistantId?: string;
|
|
335
|
+
}>;
|
|
313
336
|
export declare const userNotificationSchema: z.ZodObject<{
|
|
314
337
|
id: z.ZodString;
|
|
315
338
|
kind: z.ZodLiteral<"agent.completed">;
|
|
@@ -670,17 +693,21 @@ export declare const notificationOutboxPayloadSchema: z.ZodDiscriminatedUnion<"t
|
|
|
670
693
|
executionId: z.ZodString;
|
|
671
694
|
assistantId: z.ZodString;
|
|
672
695
|
conversationId: z.ZodString;
|
|
696
|
+
} & {
|
|
697
|
+
threadId: z.ZodOptional<z.ZodString>;
|
|
673
698
|
}, "strict", z.ZodTypeAny, {
|
|
674
699
|
type?: "scheduled_task";
|
|
675
700
|
conversationId?: string;
|
|
676
701
|
executionId?: string;
|
|
677
702
|
taskId?: string;
|
|
703
|
+
threadId?: string;
|
|
678
704
|
assistantId?: string;
|
|
679
705
|
}, {
|
|
680
706
|
type?: "scheduled_task";
|
|
681
707
|
conversationId?: string;
|
|
682
708
|
executionId?: string;
|
|
683
709
|
taskId?: string;
|
|
710
|
+
threadId?: string;
|
|
684
711
|
assistantId?: string;
|
|
685
712
|
}>;
|
|
686
713
|
}, "strict", z.ZodTypeAny, {
|
|
@@ -690,6 +717,7 @@ export declare const notificationOutboxPayloadSchema: z.ZodDiscriminatedUnion<"t
|
|
|
690
717
|
conversationId?: string;
|
|
691
718
|
executionId?: string;
|
|
692
719
|
taskId?: string;
|
|
720
|
+
threadId?: string;
|
|
693
721
|
assistantId?: string;
|
|
694
722
|
};
|
|
695
723
|
}, {
|
|
@@ -699,6 +727,7 @@ export declare const notificationOutboxPayloadSchema: z.ZodDiscriminatedUnion<"t
|
|
|
699
727
|
conversationId?: string;
|
|
700
728
|
executionId?: string;
|
|
701
729
|
taskId?: string;
|
|
730
|
+
threadId?: string;
|
|
702
731
|
assistantId?: string;
|
|
703
732
|
};
|
|
704
733
|
}>]>;
|
package/src/user.model.d.ts
CHANGED
|
@@ -74,6 +74,17 @@ export interface IUserLoginInput {
|
|
|
74
74
|
email: string;
|
|
75
75
|
password: string;
|
|
76
76
|
}
|
|
77
|
+
export interface AccessTokenClaims {
|
|
78
|
+
/** Login tokens issued before purpose marking omit this claim. */
|
|
79
|
+
purpose?: 'access';
|
|
80
|
+
id: string;
|
|
81
|
+
thirdPartyId?: string;
|
|
82
|
+
tenantId?: string;
|
|
83
|
+
employeeId?: string | null;
|
|
84
|
+
username?: string;
|
|
85
|
+
role?: string | null;
|
|
86
|
+
permissions?: string[] | null;
|
|
87
|
+
}
|
|
77
88
|
export interface IAuthResponse {
|
|
78
89
|
user: IUser;
|
|
79
90
|
token: string;
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import type { I18nObject } from '../types';
|
|
2
|
+
import type { XpertViewScalar } from './model';
|
|
3
|
+
export declare const XPERT_REMOTE_COMPONENT_INVOKE_CLIENT_COMMAND_MESSAGE_TYPE = "invokeClientCommand";
|
|
4
|
+
export declare const ASSISTANT_CHAT_SEND_MESSAGE_COMMAND = "assistant.chat.send_message";
|
|
5
|
+
/** Append text selections to the current draft without sending or replacing it. */
|
|
6
|
+
export declare const ASSISTANT_COMPOSER_APPEND_REFERENCES_COMMAND = "assistant.composer.append_references";
|
|
7
|
+
/** Append editable context to the current composer. Never starts a run or changes thread. */
|
|
8
|
+
export declare const ASSISTANT_COMPOSER_INSERT_COMMAND = "assistant.composer.insert";
|
|
9
|
+
export declare const ASSISTANT_CONTEXT_SET_COMMAND = "assistant.context.set";
|
|
10
|
+
export declare const WORKBENCH_FILE_OPEN_COMMAND = "workbench.file.open";
|
|
11
|
+
export declare const WORKBENCH_NAVIGATION_OPEN_COMMAND = "workbench.navigation.open";
|
|
12
|
+
export declare const WORKBENCH_AGENT_EVOLUTION_TARGET = "agent-evolution.target";
|
|
13
|
+
export declare const WORKBENCH_AGENT_EVOLUTION_CHANGE_TARGET = "agent-evolution.change";
|
|
14
|
+
export declare const WORKBENCH_ASSISTANT_CONVERSATION_TARGET = "assistant.conversation";
|
|
15
|
+
/** Locate a public message in the currently open group; never opens an Assistant's private runtime. */
|
|
16
|
+
export declare const WORKBENCH_GROUP_MESSAGE_TARGET = "group.message";
|
|
17
|
+
/** Inspect an exact execution; embedded clients may open it without changing the active conversation. */
|
|
18
|
+
export declare const WORKBENCH_ASSISTANT_EXECUTION_TARGET = "assistant.execution";
|
|
19
|
+
/** Opens the current Assistant inside a Project-scoped workbench route. */
|
|
20
|
+
export declare const WORKBENCH_ASSISTANT_PROJECT_TARGET = "assistant.project";
|
|
21
|
+
export declare const WORKBENCH_EXTENSION_VIEW_TARGET = "workbench.view";
|
|
22
|
+
export declare const WORKBENCH_KNOWLEDGEBASE_DOCUMENTS_TARGET = "knowledgebase.documents";
|
|
23
|
+
/** Resolve the Project's application entry through its registered type and current access checks. */
|
|
24
|
+
export declare const WORKBENCH_PROJECT_APPLICATION_TARGET = "project.application";
|
|
25
|
+
/** Open full Project pipeline management in the configured platform. */
|
|
26
|
+
export declare const WORKBENCH_PROJECT_PIPELINES_TARGET = "project.pipelines";
|
|
27
|
+
export interface XpertViewClientCommandDefinition {
|
|
28
|
+
/** A host must implement this command before mounting the view. Optional actions may omit this. */
|
|
29
|
+
required?: boolean;
|
|
30
|
+
key: string;
|
|
31
|
+
label?: I18nObject;
|
|
32
|
+
description?: I18nObject;
|
|
33
|
+
permissions?: string[];
|
|
34
|
+
}
|
|
35
|
+
export interface AssistantComposerInsertPayload {
|
|
36
|
+
text: string;
|
|
37
|
+
workspaceFiles?: {
|
|
38
|
+
path: string;
|
|
39
|
+
name: string;
|
|
40
|
+
mimeType?: string;
|
|
41
|
+
size?: number;
|
|
42
|
+
}[];
|
|
43
|
+
/** Exact skill names resolved uniquely against the current assistant/project capability catalog. */
|
|
44
|
+
skillNames?: string[];
|
|
45
|
+
}
|
|
46
|
+
export interface WorkbenchOpenFileEvidenceBox {
|
|
47
|
+
x: number;
|
|
48
|
+
y: number;
|
|
49
|
+
width: number;
|
|
50
|
+
height: number;
|
|
51
|
+
}
|
|
52
|
+
export interface WorkbenchOpenFileEvidence {
|
|
53
|
+
observationId?: string;
|
|
54
|
+
attributeCode?: string;
|
|
55
|
+
displayValue?: string;
|
|
56
|
+
text?: string;
|
|
57
|
+
method?: string;
|
|
58
|
+
region?: string;
|
|
59
|
+
confidence?: number;
|
|
60
|
+
locator?: {
|
|
61
|
+
sourceType?: string;
|
|
62
|
+
page?: number;
|
|
63
|
+
coordinateSpace?: string;
|
|
64
|
+
recognitionRotation?: number;
|
|
65
|
+
orientationConfidence?: number;
|
|
66
|
+
box?: WorkbenchOpenFileEvidenceBox;
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
/** Payload accepted by the host-side `workbench.file.open` client command. */
|
|
70
|
+
export interface WorkbenchOpenFile {
|
|
71
|
+
id?: string;
|
|
72
|
+
fileId?: string;
|
|
73
|
+
fileAssetId?: string;
|
|
74
|
+
storageFileId?: string;
|
|
75
|
+
name: string;
|
|
76
|
+
mimeType?: string;
|
|
77
|
+
size?: number;
|
|
78
|
+
url: string;
|
|
79
|
+
previewUrl?: string;
|
|
80
|
+
evidence?: WorkbenchOpenFileEvidence;
|
|
81
|
+
}
|
|
82
|
+
export type WorkbenchNavigationOpenTarget = typeof WORKBENCH_AGENT_EVOLUTION_TARGET | typeof WORKBENCH_AGENT_EVOLUTION_CHANGE_TARGET | typeof WORKBENCH_KNOWLEDGEBASE_DOCUMENTS_TARGET | typeof WORKBENCH_ASSISTANT_CONVERSATION_TARGET | typeof WORKBENCH_GROUP_MESSAGE_TARGET | typeof WORKBENCH_ASSISTANT_EXECUTION_TARGET | typeof WORKBENCH_ASSISTANT_PROJECT_TARGET | typeof WORKBENCH_EXTENSION_VIEW_TARGET | typeof WORKBENCH_PROJECT_APPLICATION_TARGET | typeof WORKBENCH_PROJECT_PIPELINES_TARGET;
|
|
83
|
+
export interface WorkbenchNavigationOpenPayload {
|
|
84
|
+
target: WorkbenchNavigationOpenTarget;
|
|
85
|
+
targetId?: string;
|
|
86
|
+
/** Exact evolution request to select on the existing evaluation page. */
|
|
87
|
+
changeId?: string;
|
|
88
|
+
knowledgebaseId?: string;
|
|
89
|
+
documentId?: string;
|
|
90
|
+
parentId?: string;
|
|
91
|
+
/** Exact KnowledgeDocument chunk anchor for evidence navigation. */
|
|
92
|
+
chunkId?: string;
|
|
93
|
+
/** One-based source page anchor when the document has an analysis preview. */
|
|
94
|
+
page?: number;
|
|
95
|
+
/** Parser/OCR block anchors within the source page. */
|
|
96
|
+
sourceBlockIds?: string[];
|
|
97
|
+
/** Transient source excerpt used for context/highlighting; the host must not place it in the URL. */
|
|
98
|
+
evidenceText?: string;
|
|
99
|
+
/** For `group.message`, the current public group ID. Hosts reject navigation to a different group. */
|
|
100
|
+
conversationId?: string;
|
|
101
|
+
threadId?: string;
|
|
102
|
+
executionId?: string;
|
|
103
|
+
/** Untrusted Assistant hint; the host resolves the canonical owner from `conversationId`. */
|
|
104
|
+
xpertId?: string;
|
|
105
|
+
/** Platform Chat Project selected for Project-scoped Assistant navigation. */
|
|
106
|
+
projectId?: string;
|
|
107
|
+
/** Untrusted identity hint; Project application entry reauthorizes the current persisted node. */
|
|
108
|
+
pipelineNodeId?: string;
|
|
109
|
+
/** Read-only Project pipeline return focus, rechecked when the graph is read. */
|
|
110
|
+
pipelineInstanceId?: string;
|
|
111
|
+
pipelineRoundId?: string;
|
|
112
|
+
viewKey?: string;
|
|
113
|
+
selectionId?: string;
|
|
114
|
+
parameters?: Record<string, XpertViewScalar | XpertViewScalar[]>;
|
|
115
|
+
/** Exact visible message in the requested branch, or a public group message for `group.message`. */
|
|
116
|
+
messageId?: string;
|
|
117
|
+
/** Keep the originating Workbench view open during navigation. */
|
|
118
|
+
preserveView?: boolean;
|
|
119
|
+
}
|
|
120
|
+
export interface WorkbenchAssistantConversationOpenRequest {
|
|
121
|
+
conversationId: string;
|
|
122
|
+
threadId?: string;
|
|
123
|
+
executionId?: string;
|
|
124
|
+
/** Untrusted hint; the host must resolve the canonical Assistant from `conversationId`. */
|
|
125
|
+
xpertId?: string;
|
|
126
|
+
/** Untrusted hint; the host must resolve the canonical Project from `conversationId`. */
|
|
127
|
+
projectId?: string;
|
|
128
|
+
/** Exact visible message in the requested branch. */
|
|
129
|
+
messageId?: string;
|
|
130
|
+
/** Keep the originating Workbench view open during navigation. */
|
|
131
|
+
preserveView?: boolean;
|
|
132
|
+
}
|
|
133
|
+
/** Server-authorized runtime scope used to rebuild ChatKit for one persisted Assistant conversation. */
|
|
134
|
+
export interface WorkbenchAssistantConversationResolution {
|
|
135
|
+
conversationId: string;
|
|
136
|
+
threadId: string;
|
|
137
|
+
xpertId: string;
|
|
138
|
+
projectId: string | null;
|
|
139
|
+
isExternalAssistant: boolean;
|
|
140
|
+
messageId?: string;
|
|
141
|
+
}
|
|
142
|
+
export interface WorkbenchAssistantProjectOpenRequest {
|
|
143
|
+
/** Trusted platform Chat Project id; this is distinct from plugin business ids. */
|
|
144
|
+
projectId: string;
|
|
145
|
+
/** Inspect a View in this Project without changing the active conversation. */
|
|
146
|
+
view?: WorkbenchExtensionViewOpenRequest;
|
|
147
|
+
}
|
|
148
|
+
export interface WorkbenchExtensionViewOpenRequest {
|
|
149
|
+
viewKey: string;
|
|
150
|
+
selectionId?: string;
|
|
151
|
+
parameters?: Record<string, XpertViewScalar | XpertViewScalar[]>;
|
|
152
|
+
}
|
|
153
|
+
export interface XpertRemoteComponentInvokeClientCommandRequest {
|
|
154
|
+
type: typeof XPERT_REMOTE_COMPONENT_INVOKE_CLIENT_COMMAND_MESSAGE_TYPE;
|
|
155
|
+
requestId: string;
|
|
156
|
+
commandKey: string;
|
|
157
|
+
payload?: unknown;
|
|
158
|
+
}
|
|
159
|
+
export type AssistantComposerReference = {
|
|
160
|
+
id?: string;
|
|
161
|
+
label?: string;
|
|
162
|
+
text: string;
|
|
163
|
+
} & ({
|
|
164
|
+
type: 'code';
|
|
165
|
+
path: string;
|
|
166
|
+
startLine: number;
|
|
167
|
+
endLine: number;
|
|
168
|
+
language?: string;
|
|
169
|
+
} | {
|
|
170
|
+
type: 'quote';
|
|
171
|
+
source?: string;
|
|
172
|
+
messageId?: string;
|
|
173
|
+
});
|
|
174
|
+
export type AssistantComposerAppendReferencesPayload = {
|
|
175
|
+
references: AssistantComposerReference[];
|
|
176
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { z } from 'zod/v3';
|
|
2
|
+
/** Context revision and runtime scope delivered by an authorized Remote View host. */
|
|
3
|
+
export declare const viewContextEventSchema: z.ZodEffects<z.ZodObject<{
|
|
4
|
+
type: z.ZodLiteral<"view.context.changed">;
|
|
5
|
+
data: z.ZodObject<{
|
|
6
|
+
revision: z.ZodNumber;
|
|
7
|
+
runtimeScope: z.ZodObject<{
|
|
8
|
+
projectId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
9
|
+
conversationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
conversationId?: string;
|
|
12
|
+
projectId?: string;
|
|
13
|
+
}, {
|
|
14
|
+
conversationId?: string;
|
|
15
|
+
projectId?: string;
|
|
16
|
+
}>;
|
|
17
|
+
}, "strip", z.ZodTypeAny, {
|
|
18
|
+
revision?: number;
|
|
19
|
+
runtimeScope?: {
|
|
20
|
+
conversationId?: string;
|
|
21
|
+
projectId?: string;
|
|
22
|
+
};
|
|
23
|
+
}, {
|
|
24
|
+
revision?: number;
|
|
25
|
+
runtimeScope?: {
|
|
26
|
+
conversationId?: string;
|
|
27
|
+
projectId?: string;
|
|
28
|
+
};
|
|
29
|
+
}>;
|
|
30
|
+
}, "strip", z.ZodTypeAny, {
|
|
31
|
+
type?: "view.context.changed";
|
|
32
|
+
data?: {
|
|
33
|
+
revision?: number;
|
|
34
|
+
runtimeScope?: {
|
|
35
|
+
conversationId?: string;
|
|
36
|
+
projectId?: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
}, {
|
|
40
|
+
type?: "view.context.changed";
|
|
41
|
+
data?: {
|
|
42
|
+
revision?: number;
|
|
43
|
+
runtimeScope?: {
|
|
44
|
+
conversationId?: string;
|
|
45
|
+
projectId?: string;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
}>, {
|
|
49
|
+
type: "view.context.changed";
|
|
50
|
+
data: {
|
|
51
|
+
revision: number;
|
|
52
|
+
runtimeScope: {
|
|
53
|
+
conversationId?: string;
|
|
54
|
+
projectId?: string;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
}, {
|
|
58
|
+
type?: "view.context.changed";
|
|
59
|
+
data?: {
|
|
60
|
+
revision?: number;
|
|
61
|
+
runtimeScope?: {
|
|
62
|
+
conversationId?: string;
|
|
63
|
+
projectId?: string;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
}>;
|