@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
|
@@ -3,6 +3,8 @@ import type { PluginApplicationScope } from '../plugin-application';
|
|
|
3
3
|
import type { I18nObject, IconDefinition } from '../types';
|
|
4
4
|
import type { JsonSchemaObjectType } from '../ai/types';
|
|
5
5
|
import type { XpertViewAssistantIdentity } from './assistant-profile';
|
|
6
|
+
import type { XpertViewClientCommandDefinition } from './client-commands';
|
|
7
|
+
export * from './client-commands';
|
|
6
8
|
export type XpertViewHostType = 'integration' | 'knowledgebase' | 'agent' | 'project' | 'sandbox' | string;
|
|
7
9
|
export type XpertViewSlotMode = 'tabs' | 'sections' | 'widgets' | 'sidebar';
|
|
8
10
|
export type XpertViewSchemaType = 'stats' | 'table' | 'list' | 'detail' | 'raw_json' | 'remote_component';
|
|
@@ -327,14 +329,6 @@ export interface XpertViewActionDefinition {
|
|
|
327
329
|
permissions?: string[];
|
|
328
330
|
requiredHostAccess?: XpertViewHostAccessLevel;
|
|
329
331
|
}
|
|
330
|
-
export interface XpertViewClientCommandDefinition {
|
|
331
|
-
/** A host must implement this command before mounting the view. Optional actions may omit this. */
|
|
332
|
-
required?: boolean;
|
|
333
|
-
key: string;
|
|
334
|
-
label?: I18nObject;
|
|
335
|
-
description?: I18nObject;
|
|
336
|
-
permissions?: string[];
|
|
337
|
-
}
|
|
338
332
|
export interface XpertViewFileAccessDefinition {
|
|
339
333
|
purposes: XpertViewFileAccessPurpose[];
|
|
340
334
|
}
|
|
@@ -354,136 +348,6 @@ export interface XpertViewFileAccessGrantResult {
|
|
|
354
348
|
mimeType: string;
|
|
355
349
|
size?: number;
|
|
356
350
|
}
|
|
357
|
-
export declare const ASSISTANT_CHAT_SEND_MESSAGE_COMMAND = "assistant.chat.send_message";
|
|
358
|
-
export declare const ASSISTANT_CONTEXT_SET_COMMAND = "assistant.context.set";
|
|
359
|
-
export declare const WORKBENCH_FILE_OPEN_COMMAND = "workbench.file.open";
|
|
360
|
-
export declare const WORKBENCH_NAVIGATION_OPEN_COMMAND = "workbench.navigation.open";
|
|
361
|
-
export declare const WORKBENCH_AGENT_EVOLUTION_TARGET = "agent-evolution.target";
|
|
362
|
-
export declare const WORKBENCH_AGENT_EVOLUTION_CHANGE_TARGET = "agent-evolution.change";
|
|
363
|
-
export declare const WORKBENCH_KNOWLEDGEBASE_DOCUMENTS_TARGET = "knowledgebase.documents";
|
|
364
|
-
export declare const WORKBENCH_ASSISTANT_CONVERSATION_TARGET = "assistant.conversation";
|
|
365
|
-
/** Inspect an exact execution; embedded clients may open it without changing the active conversation. */
|
|
366
|
-
export declare const WORKBENCH_ASSISTANT_EXECUTION_TARGET = "assistant.execution";
|
|
367
|
-
/** Opens the current Assistant inside a Project-scoped workbench route. */
|
|
368
|
-
export declare const WORKBENCH_ASSISTANT_PROJECT_TARGET = "assistant.project";
|
|
369
|
-
export declare const WORKBENCH_EXTENSION_VIEW_TARGET = "workbench.view";
|
|
370
|
-
/** Resolve the Project's application entry through its registered type and current access checks. */
|
|
371
|
-
export declare const WORKBENCH_PROJECT_APPLICATION_TARGET = "project.application";
|
|
372
|
-
/** Open full Project pipeline management in the configured platform. */
|
|
373
|
-
export declare const WORKBENCH_PROJECT_PIPELINES_TARGET = "project.pipelines";
|
|
374
|
-
export declare const XPERT_REMOTE_COMPONENT_INVOKE_CLIENT_COMMAND_MESSAGE_TYPE = "invokeClientCommand";
|
|
375
|
-
export interface WorkbenchOpenFileEvidenceBox {
|
|
376
|
-
x: number;
|
|
377
|
-
y: number;
|
|
378
|
-
width: number;
|
|
379
|
-
height: number;
|
|
380
|
-
}
|
|
381
|
-
export interface WorkbenchOpenFileEvidence {
|
|
382
|
-
observationId?: string;
|
|
383
|
-
attributeCode?: string;
|
|
384
|
-
displayValue?: string;
|
|
385
|
-
text?: string;
|
|
386
|
-
method?: string;
|
|
387
|
-
region?: string;
|
|
388
|
-
confidence?: number;
|
|
389
|
-
locator?: {
|
|
390
|
-
sourceType?: string;
|
|
391
|
-
page?: number;
|
|
392
|
-
coordinateSpace?: string;
|
|
393
|
-
recognitionRotation?: number;
|
|
394
|
-
orientationConfidence?: number;
|
|
395
|
-
box?: WorkbenchOpenFileEvidenceBox;
|
|
396
|
-
};
|
|
397
|
-
}
|
|
398
|
-
/** Payload accepted by the host-side `workbench.file.open` client command. */
|
|
399
|
-
export interface WorkbenchOpenFile {
|
|
400
|
-
id?: string;
|
|
401
|
-
fileId?: string;
|
|
402
|
-
fileAssetId?: string;
|
|
403
|
-
storageFileId?: string;
|
|
404
|
-
name: string;
|
|
405
|
-
mimeType?: string;
|
|
406
|
-
size?: number;
|
|
407
|
-
url: string;
|
|
408
|
-
previewUrl?: string;
|
|
409
|
-
evidence?: WorkbenchOpenFileEvidence;
|
|
410
|
-
}
|
|
411
|
-
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_ASSISTANT_EXECUTION_TARGET | typeof WORKBENCH_ASSISTANT_PROJECT_TARGET | typeof WORKBENCH_EXTENSION_VIEW_TARGET | typeof WORKBENCH_PROJECT_APPLICATION_TARGET | typeof WORKBENCH_PROJECT_PIPELINES_TARGET;
|
|
412
|
-
export interface WorkbenchNavigationOpenPayload {
|
|
413
|
-
target: WorkbenchNavigationOpenTarget;
|
|
414
|
-
targetId?: string;
|
|
415
|
-
/** Exact evolution request to select on the existing evaluation page. */
|
|
416
|
-
changeId?: string;
|
|
417
|
-
knowledgebaseId?: string;
|
|
418
|
-
documentId?: string;
|
|
419
|
-
parentId?: string;
|
|
420
|
-
/** Exact KnowledgeDocument chunk anchor for evidence navigation. */
|
|
421
|
-
chunkId?: string;
|
|
422
|
-
/** One-based source page anchor when the document has an analysis preview. */
|
|
423
|
-
page?: number;
|
|
424
|
-
/** Parser/OCR block anchors within the source page. */
|
|
425
|
-
sourceBlockIds?: string[];
|
|
426
|
-
/** Transient source excerpt used for context/highlighting; the host must not place it in the URL. */
|
|
427
|
-
evidenceText?: string;
|
|
428
|
-
conversationId?: string;
|
|
429
|
-
threadId?: string;
|
|
430
|
-
executionId?: string;
|
|
431
|
-
/** Untrusted Assistant hint; the host resolves the canonical owner from `conversationId`. */
|
|
432
|
-
xpertId?: string;
|
|
433
|
-
/** Platform Chat Project selected for Project-scoped Assistant navigation. */
|
|
434
|
-
projectId?: string;
|
|
435
|
-
/** Untrusted identity hint; Project application entry reauthorizes the current persisted node. */
|
|
436
|
-
pipelineNodeId?: string;
|
|
437
|
-
/** Read-only Project pipeline return focus, rechecked when the graph is read. */
|
|
438
|
-
pipelineInstanceId?: string;
|
|
439
|
-
pipelineRoundId?: string;
|
|
440
|
-
viewKey?: string;
|
|
441
|
-
selectionId?: string;
|
|
442
|
-
parameters?: Record<string, XpertViewScalar | XpertViewScalar[]>;
|
|
443
|
-
/** Exact visible message in the requested branch. */
|
|
444
|
-
messageId?: string;
|
|
445
|
-
/** Keep the originating Workbench view open during navigation. */
|
|
446
|
-
preserveView?: boolean;
|
|
447
|
-
}
|
|
448
|
-
export interface WorkbenchAssistantConversationOpenRequest {
|
|
449
|
-
conversationId: string;
|
|
450
|
-
threadId?: string;
|
|
451
|
-
executionId?: string;
|
|
452
|
-
/** Untrusted hint; the host must resolve the canonical Assistant from `conversationId`. */
|
|
453
|
-
xpertId?: string;
|
|
454
|
-
/** Untrusted hint; the host must resolve the canonical Project from `conversationId`. */
|
|
455
|
-
projectId?: string;
|
|
456
|
-
/** Exact visible message in the requested branch. */
|
|
457
|
-
messageId?: string;
|
|
458
|
-
/** Keep the originating Workbench view open during navigation. */
|
|
459
|
-
preserveView?: boolean;
|
|
460
|
-
}
|
|
461
|
-
/** Server-authorized runtime scope used to rebuild ChatKit for one persisted Assistant conversation. */
|
|
462
|
-
export interface WorkbenchAssistantConversationResolution {
|
|
463
|
-
conversationId: string;
|
|
464
|
-
threadId: string;
|
|
465
|
-
xpertId: string;
|
|
466
|
-
projectId: string | null;
|
|
467
|
-
isExternalAssistant: boolean;
|
|
468
|
-
messageId?: string;
|
|
469
|
-
}
|
|
470
|
-
export interface WorkbenchAssistantProjectOpenRequest {
|
|
471
|
-
/** Trusted platform Chat Project id; this is distinct from plugin business ids. */
|
|
472
|
-
projectId: string;
|
|
473
|
-
/** Inspect a View in this Project without changing the active conversation. */
|
|
474
|
-
view?: WorkbenchExtensionViewOpenRequest;
|
|
475
|
-
}
|
|
476
|
-
export interface WorkbenchExtensionViewOpenRequest {
|
|
477
|
-
viewKey: string;
|
|
478
|
-
selectionId?: string;
|
|
479
|
-
parameters?: Record<string, XpertViewScalar | XpertViewScalar[]>;
|
|
480
|
-
}
|
|
481
|
-
export interface XpertRemoteComponentInvokeClientCommandRequest {
|
|
482
|
-
type: typeof XPERT_REMOTE_COMPONENT_INVOKE_CLIENT_COMMAND_MESSAGE_TYPE;
|
|
483
|
-
requestId: string;
|
|
484
|
-
commandKey: string;
|
|
485
|
-
payload?: unknown;
|
|
486
|
-
}
|
|
487
351
|
export declare const ASSISTANT_CITATION_OPEN_EVENT = "assistant.citation.open";
|
|
488
352
|
export declare const KNOWLEDGEBASE_OPEN_CITATION_EFFECT = "knowledgebase.open_citation";
|
|
489
353
|
/**
|
|
@@ -641,23 +505,3 @@ export interface XpertViewActionResult<TData = unknown> {
|
|
|
641
505
|
code: string;
|
|
642
506
|
};
|
|
643
507
|
}
|
|
644
|
-
/** Append text selections to the current draft without sending or replacing it. */
|
|
645
|
-
export declare const ASSISTANT_COMPOSER_APPEND_REFERENCES_COMMAND = "assistant.composer.append_references";
|
|
646
|
-
export type AssistantComposerReference = {
|
|
647
|
-
id?: string;
|
|
648
|
-
label?: string;
|
|
649
|
-
text: string;
|
|
650
|
-
} & ({
|
|
651
|
-
type: 'code';
|
|
652
|
-
path: string;
|
|
653
|
-
startLine: number;
|
|
654
|
-
endLine: number;
|
|
655
|
-
language?: string;
|
|
656
|
-
} | {
|
|
657
|
-
type: 'quote';
|
|
658
|
-
source?: string;
|
|
659
|
-
messageId?: string;
|
|
660
|
-
});
|
|
661
|
-
export type AssistantComposerAppendReferencesPayload = {
|
|
662
|
-
references: AssistantComposerReference[];
|
|
663
|
-
};
|
|
@@ -1,10 +1,25 @@
|
|
|
1
|
-
import type { WorkbenchExtensionViewOpenRequest } from './
|
|
1
|
+
import type { WorkbenchExtensionViewOpenRequest } from './client-commands';
|
|
2
2
|
/** Live-only UI request. Project scope is mandatory; history playback must not reopen Views. */
|
|
3
3
|
export declare const WORKBENCH_VIEW_OPEN_EVENT = "workbench.view.open";
|
|
4
|
+
/**
|
|
5
|
+
* Server-emitted instruction to open a declared View in the current Workbench context.
|
|
6
|
+
* Consumers verify Project/conversation scope and suppress stale or duplicate requests; the event grants no resource access.
|
|
7
|
+
* requestId and issuedAt are optional as a pair for legacy emitters; new navigation emitters should provide both.
|
|
8
|
+
*/
|
|
4
9
|
export interface WorkbenchViewOpenEvent extends WorkbenchExtensionViewOpenRequest {
|
|
10
|
+
/** Stable event discriminator; arbitrary logs and similarly shaped objects are not navigation requests. */
|
|
5
11
|
type: typeof WORKBENCH_VIEW_OPEN_EVENT;
|
|
12
|
+
/** Project that owns the navigation context; must match the active authorized Workbench scope. */
|
|
6
13
|
projectId: string;
|
|
14
|
+
/** Unique event deduplication ID, separate from the View's selectionId; supply together with issuedAt. */
|
|
15
|
+
requestId?: string;
|
|
16
|
+
/** Positive Unix epoch milliseconds used for freshness checks; supply together with requestId. */
|
|
17
|
+
issuedAt?: number;
|
|
18
|
+
/** Conversation restriction when present; consumers must not apply it to another conversation. */
|
|
7
19
|
conversationId?: string;
|
|
8
20
|
}
|
|
9
|
-
/**
|
|
21
|
+
/**
|
|
22
|
+
* Parse the public lg.chat.event shape and paired replay metadata, keeping arbitrary logs out of navigation.
|
|
23
|
+
* Returns null for invalid payloads. Shape validation does not perform access, active-scope or freshness checks.
|
|
24
|
+
*/
|
|
10
25
|
export declare function parseWorkbenchViewOpenEvent(value: unknown): WorkbenchViewOpenEvent | null;
|