@xpert-ai/contracts 3.15.17 → 3.15.18
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 +12 -3
- package/index.esm.js +12 -3
- package/package.json +1 -1
- package/src/ai/middleware.model.d.ts +13 -1
- package/src/api-key.model.d.ts +4 -0
- package/src/plugin.d.ts +9 -7
- package/src/runtime-control.d.ts +3 -3
- package/src/secret-token.model.d.ts +14 -0
package/index.cjs.js
CHANGED
|
@@ -3332,6 +3332,7 @@ function genXpertDBSqlKey() {
|
|
|
3332
3332
|
|
|
3333
3333
|
var PLUGIN_LEVEL = {
|
|
3334
3334
|
SYSTEM: "system",
|
|
3335
|
+
TENANT: "tenant",
|
|
3335
3336
|
ORGANIZATION: "organization"
|
|
3336
3337
|
};
|
|
3337
3338
|
var PLUGIN_SOURCE = {
|
|
@@ -5598,10 +5599,18 @@ exports.OrganizationProjectBudgetTypeEnum = void 0;
|
|
|
5598
5599
|
OrganizationProjectBudgetTypeEnum["COST"] = "cost";
|
|
5599
5600
|
})(exports.OrganizationProjectBudgetTypeEnum || (exports.OrganizationProjectBudgetTypeEnum = {}));
|
|
5600
5601
|
|
|
5601
|
-
|
|
5602
|
+
/**
|
|
5603
|
+
* Selects how an opaque client secret is authorized and how entityId is
|
|
5604
|
+
* interpreted. createdById only records provenance; it does not distinguish
|
|
5605
|
+
* an API-key grant, a delegated user session, or a public assistant session.
|
|
5606
|
+
*/ exports.SecretTokenBindingType = void 0;
|
|
5602
5607
|
(function(SecretTokenBindingType) {
|
|
5603
|
-
SecretTokenBindingType["API_KEY"] = "api_key";
|
|
5604
|
-
|
|
5608
|
+
/** entityId is an ApiKey id and the request runs as that API principal. */ SecretTokenBindingType["API_KEY"] = "api_key";
|
|
5609
|
+
/**
|
|
5610
|
+
* entityId is the only Xpert this session may access; createdById is loaded
|
|
5611
|
+
* as the acting business user for the interactive ChatKit run.
|
|
5612
|
+
*/ SecretTokenBindingType["USER_XPERT"] = "user_xpert";
|
|
5613
|
+
/** entityId is a public Xpert id and public-app access rules apply. */ SecretTokenBindingType["PUBLIC_XPERT"] = "public_xpert";
|
|
5605
5614
|
})(exports.SecretTokenBindingType || (exports.SecretTokenBindingType = {}));
|
|
5606
5615
|
|
|
5607
5616
|
exports.Visibility = void 0;
|
package/index.esm.js
CHANGED
|
@@ -3330,6 +3330,7 @@ function genXpertDBSqlKey() {
|
|
|
3330
3330
|
|
|
3331
3331
|
var PLUGIN_LEVEL = {
|
|
3332
3332
|
SYSTEM: "system",
|
|
3333
|
+
TENANT: "tenant",
|
|
3333
3334
|
ORGANIZATION: "organization"
|
|
3334
3335
|
};
|
|
3335
3336
|
var PLUGIN_SOURCE = {
|
|
@@ -5596,10 +5597,18 @@ var OrganizationProjectBudgetTypeEnum;
|
|
|
5596
5597
|
OrganizationProjectBudgetTypeEnum["COST"] = "cost";
|
|
5597
5598
|
})(OrganizationProjectBudgetTypeEnum || (OrganizationProjectBudgetTypeEnum = {}));
|
|
5598
5599
|
|
|
5599
|
-
|
|
5600
|
+
/**
|
|
5601
|
+
* Selects how an opaque client secret is authorized and how entityId is
|
|
5602
|
+
* interpreted. createdById only records provenance; it does not distinguish
|
|
5603
|
+
* an API-key grant, a delegated user session, or a public assistant session.
|
|
5604
|
+
*/ var SecretTokenBindingType;
|
|
5600
5605
|
(function(SecretTokenBindingType) {
|
|
5601
|
-
SecretTokenBindingType["API_KEY"] = "api_key";
|
|
5602
|
-
|
|
5606
|
+
/** entityId is an ApiKey id and the request runs as that API principal. */ SecretTokenBindingType["API_KEY"] = "api_key";
|
|
5607
|
+
/**
|
|
5608
|
+
* entityId is the only Xpert this session may access; createdById is loaded
|
|
5609
|
+
* as the acting business user for the interactive ChatKit run.
|
|
5610
|
+
*/ SecretTokenBindingType["USER_XPERT"] = "user_xpert";
|
|
5611
|
+
/** entityId is a public Xpert id and public-app access rules apply. */ SecretTokenBindingType["PUBLIC_XPERT"] = "public_xpert";
|
|
5603
5612
|
})(SecretTokenBindingType || (SecretTokenBindingType = {}));
|
|
5604
5613
|
|
|
5605
5614
|
var Visibility;
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IWorkflowNode, WorkflowNodeTypeEnum } from './xpert-workflow.model';
|
|
2
|
-
import { I18nObject, IconDefinition } from '../types';
|
|
2
|
+
import { I18nObject, I18nText, IconDefinition } from '../types';
|
|
3
3
|
import { TXpertFeatureKey, TXpertGraph, TXpertTeamNode } from './xpert.model';
|
|
4
4
|
import { JsonSchemaObjectType } from './types';
|
|
5
5
|
import type { SkillSlashCommand } from './skill.model';
|
|
@@ -42,5 +42,17 @@ export type TAgentMiddlewareMeta = {
|
|
|
42
42
|
*/
|
|
43
43
|
deprecationMessage?: I18nObject;
|
|
44
44
|
};
|
|
45
|
+
export type TAgentMiddlewareSource = {
|
|
46
|
+
kind: 'builtin';
|
|
47
|
+
} | {
|
|
48
|
+
kind: 'plugin';
|
|
49
|
+
pluginName: string;
|
|
50
|
+
displayName: I18nText;
|
|
51
|
+
icon?: IconDefinition;
|
|
52
|
+
};
|
|
53
|
+
export type TAgentMiddlewareDescriptor = {
|
|
54
|
+
meta: TAgentMiddlewareMeta;
|
|
55
|
+
source: TAgentMiddlewareSource;
|
|
56
|
+
};
|
|
45
57
|
export declare function isUserAddableAgentMiddleware(meta?: Pick<TAgentMiddlewareMeta, 'builtin'> | null): boolean;
|
|
46
58
|
export declare function getAgentMiddlewareNodes(graph: TXpertGraph, agentKey: string): TXpertTeamNode[];
|
package/src/api-key.model.d.ts
CHANGED
|
@@ -53,8 +53,12 @@ export interface IApiPrincipal extends IUser {
|
|
|
53
53
|
apiKey?: IApiKey;
|
|
54
54
|
/**
|
|
55
55
|
* Binding target kind for short-lived client_secret principals.
|
|
56
|
+
* This is an authorization discriminator, not creator metadata: ownerUserId/
|
|
57
|
+
* createdById can be present for every binding type and must not be used to
|
|
58
|
+
* infer how secret_token.entityId should be resolved.
|
|
56
59
|
* Examples:
|
|
57
60
|
* - api_key => secret_token.entityId is the backing ApiKey id
|
|
61
|
+
* - user_xpert => secret_token.entityId is the user-authorized xpert id
|
|
58
62
|
* - public_xpert => secret_token.entityId is the public xpert id
|
|
59
63
|
*/
|
|
60
64
|
clientSecretBindingType?: SecretTokenBindingType | null;
|
package/src/plugin.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { IconDefinition, I18nObject } from './types';
|
|
|
7
7
|
export type PluginName = string;
|
|
8
8
|
export declare const PLUGIN_LEVEL: {
|
|
9
9
|
readonly SYSTEM: "system";
|
|
10
|
+
readonly TENANT: "tenant";
|
|
10
11
|
readonly ORGANIZATION: "organization";
|
|
11
12
|
};
|
|
12
13
|
export declare const PLUGIN_SOURCE: {
|
|
@@ -63,6 +64,7 @@ export declare const PLUGIN_RESOURCE_INSTALLATION_STATUS: {
|
|
|
63
64
|
/**
|
|
64
65
|
* Classifies plugin scope and governance.
|
|
65
66
|
* - `system`: built-in/platform-managed plugin that users cannot install/uninstall from org APIs.
|
|
67
|
+
* - `tenant`: tenant-owned plugin that may register process-global runtime artifacts and is activated after an API restart.
|
|
66
68
|
* - `organization`: tenant/org-managed plugin that can be installed and removed per organization.
|
|
67
69
|
*/
|
|
68
70
|
export type PluginLevel = (typeof PLUGIN_LEVEL)[keyof typeof PLUGIN_LEVEL];
|
|
@@ -318,8 +320,8 @@ export interface PluginMeta {
|
|
|
318
320
|
deprecationMessage?: I18nObject;
|
|
319
321
|
icon?: IconDefinition;
|
|
320
322
|
category: 'set' | 'doc-source' | 'agent' | 'tools' | 'model' | 'vlm' | 'vector-store' | 'integration' | 'datasource' | 'database' | 'middleware';
|
|
321
|
-
displayName: string;
|
|
322
|
-
description: string;
|
|
323
|
+
displayName: string | I18nObject;
|
|
324
|
+
description: string | I18nObject;
|
|
323
325
|
keywords?: string[];
|
|
324
326
|
author: string;
|
|
325
327
|
homepage?: string;
|
|
@@ -361,8 +363,8 @@ export interface PluginMarketplaceRegistryItem {
|
|
|
361
363
|
* When omitted, marketplace views may derive a default from the package name.
|
|
362
364
|
*/
|
|
363
365
|
artifactNamespace?: string | null;
|
|
364
|
-
displayName: string;
|
|
365
|
-
description: string;
|
|
366
|
+
displayName: string | I18nObject;
|
|
367
|
+
description: string | I18nObject;
|
|
366
368
|
category: string;
|
|
367
369
|
author: string;
|
|
368
370
|
icon?: IconDefinition | null;
|
|
@@ -390,8 +392,8 @@ export interface PluginMarketplaceRegistryItemInput {
|
|
|
390
392
|
* Keep it aligned with the plugin manifest/meta when the plugin declares one.
|
|
391
393
|
*/
|
|
392
394
|
artifactNamespace?: string | null;
|
|
393
|
-
displayName?: string;
|
|
394
|
-
description?: string;
|
|
395
|
+
displayName?: string | I18nObject;
|
|
396
|
+
description?: string | I18nObject;
|
|
395
397
|
category?: string;
|
|
396
398
|
author?: string;
|
|
397
399
|
icon?: IconDefinition | null;
|
|
@@ -516,7 +518,7 @@ export interface IPluginInstallResult {
|
|
|
516
518
|
currentVersion?: string;
|
|
517
519
|
/**
|
|
518
520
|
* The plugin package was installed and persisted, but the running API process
|
|
519
|
-
* intentionally did not activate it.
|
|
521
|
+
* intentionally did not activate it. Process-level system and tenant plugins require a graceful
|
|
520
522
|
* API restart (or a blue-green process replacement) before this version takes effect.
|
|
521
523
|
*/
|
|
522
524
|
restartRequired?: boolean;
|
package/src/runtime-control.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const RUNTIME_RESTART_CONFIRMATION: "RESTART";
|
|
2
|
-
export type RuntimeRestartMode = '
|
|
3
|
-
export type RuntimeRestartCapabilityReason = 'allowed' | 'interactive-auth-required' | 'super-admin-required' | 'default-tenant-required'
|
|
2
|
+
export type RuntimeRestartMode = 'self-signal';
|
|
3
|
+
export type RuntimeRestartCapabilityReason = 'allowed' | 'interactive-auth-required' | 'super-admin-required' | 'default-tenant-required';
|
|
4
4
|
export interface IRuntimeRestartCapability {
|
|
5
5
|
allowed: boolean;
|
|
6
6
|
mode: RuntimeRestartMode;
|
|
@@ -15,7 +15,7 @@ export interface IRuntimeRestartRequest {
|
|
|
15
15
|
export interface IRuntimeRestartResponse {
|
|
16
16
|
accepted: true;
|
|
17
17
|
restartId: string;
|
|
18
|
-
mode:
|
|
18
|
+
mode: RuntimeRestartMode;
|
|
19
19
|
instanceId: string;
|
|
20
20
|
requestedAt: string;
|
|
21
21
|
signalAfterMs: number;
|
|
@@ -1,10 +1,24 @@
|
|
|
1
1
|
import { IBasePerTenantAndOrganizationEntityModel } from './base-entity.model';
|
|
2
|
+
/**
|
|
3
|
+
* Selects how an opaque client secret is authorized and how entityId is
|
|
4
|
+
* interpreted. createdById only records provenance; it does not distinguish
|
|
5
|
+
* an API-key grant, a delegated user session, or a public assistant session.
|
|
6
|
+
*/
|
|
2
7
|
export declare enum SecretTokenBindingType {
|
|
8
|
+
/** entityId is an ApiKey id and the request runs as that API principal. */
|
|
3
9
|
API_KEY = "api_key",
|
|
10
|
+
/**
|
|
11
|
+
* entityId is the only Xpert this session may access; createdById is loaded
|
|
12
|
+
* as the acting business user for the interactive ChatKit run.
|
|
13
|
+
*/
|
|
14
|
+
USER_XPERT = "user_xpert",
|
|
15
|
+
/** entityId is a public Xpert id and public-app access rules apply. */
|
|
4
16
|
PUBLIC_XPERT = "public_xpert"
|
|
5
17
|
}
|
|
6
18
|
export interface ISecretToken extends IBasePerTenantAndOrganizationEntityModel {
|
|
19
|
+
/** Polymorphic binding id; interpret it only through type. */
|
|
7
20
|
entityId?: string;
|
|
21
|
+
/** Explicit grant/binding semantics for this opaque token. */
|
|
8
22
|
type?: SecretTokenBindingType;
|
|
9
23
|
token: string;
|
|
10
24
|
validUntil?: Date;
|