@xpert-ai/contracts 3.21.2 → 3.22.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 +569 -96
- package/index.esm.js +553 -97
- package/package.json +2 -2
- package/src/agent-plugin-maintenance.d.ts +24 -0
- package/src/agent-plugin.d.ts +55 -5
- package/src/ai/agent-runtime.model.d.ts +6 -6
- package/src/ai/assistant-capability.model.d.ts +24 -0
- package/src/ai/assistant-template-dependencies.model.d.ts +51 -0
- package/src/ai/assistant-template-manifest.model.d.ts +1826 -0
- package/src/ai/assistant-template-overview.model.d.ts +44 -0
- package/src/ai/assistant-template-setup.model.d.ts +193 -0
- package/src/ai/assistant-template.model.d.ts +16 -0
- package/src/ai/assistant-user-preference.model.d.ts +4 -0
- package/src/ai/execution-activity.model.d.ts +10 -10
- package/src/ai/index.d.ts +9 -0
- package/src/ai/project-task-runtime.model.d.ts +31 -31
- package/src/ai/template-activity.model.d.ts +24 -0
- package/src/ai/template-installation.model.d.ts +131 -0
- package/src/ai/template-lifecycle.model.d.ts +89 -0
- package/src/ai/template-manifest.model.d.ts +3 -0
- package/src/ai/xpert-agent-execution.model.d.ts +1 -0
- package/src/ai/xpert-template.model.d.ts +12 -8
- package/src/ai/xpert.model.d.ts +8 -0
- package/src/api-key.model.d.ts +12 -5
- package/src/default-agent-plugins.d.ts +12 -1
- package/src/index.d.ts +4 -1
- package/src/personal-api-key.model.d.ts +21 -0
- package/src/plugin-application.d.ts +8 -0
- package/src/plugin.d.ts +2 -37
- package/src/role-permission-modules.d.ts +3 -0
- package/src/view-extension/model.d.ts +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xpert-ai/contracts",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.22.0",
|
|
4
4
|
"license": "AGPL-3.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@octokit/types": "13.10.0",
|
|
23
23
|
"@types/json-schema": "^7.0.15",
|
|
24
|
-
"@xpert-ai/chatkit-types": "0.
|
|
24
|
+
"@xpert-ai/chatkit-types": "0.15.0",
|
|
25
25
|
"zod-to-json-schema": "^3.25.2"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** Updates follow a Git branch; existing runtime selections remain pinned. */
|
|
2
|
+
export interface AgentPluginUpdateProgress {
|
|
3
|
+
operationId: string | null;
|
|
4
|
+
packageId: string | null;
|
|
5
|
+
branch: string | null;
|
|
6
|
+
commit: string | null;
|
|
7
|
+
phase: 'idle' | 'updating' | 'completed' | 'failed';
|
|
8
|
+
result?: {
|
|
9
|
+
packageId: string;
|
|
10
|
+
status: 'imported' | 'existing' | 'repaired';
|
|
11
|
+
};
|
|
12
|
+
error?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface AgentPluginCleanupItem {
|
|
15
|
+
packageId: string;
|
|
16
|
+
version: string;
|
|
17
|
+
reason: 'current' | 'updating' | 'configured' | 'referenced' | 'unreferenced';
|
|
18
|
+
}
|
|
19
|
+
export interface AgentPluginCleanupResult {
|
|
20
|
+
targetPackageId: string;
|
|
21
|
+
items: AgentPluginCleanupItem[];
|
|
22
|
+
deleted: string[];
|
|
23
|
+
pendingFileCleanup: number;
|
|
24
|
+
}
|
package/src/agent-plugin.d.ts
CHANGED
|
@@ -6,6 +6,10 @@ import type { I18nText } from './i18n.model';
|
|
|
6
6
|
* agent_plugin is distinct from a native server-code plugin.
|
|
7
7
|
*/
|
|
8
8
|
export type RuntimeResourceKind = 'agent_plugin' | 'middleware' | 'external_xpert';
|
|
9
|
+
/** Package usage role; omission preserves legacy ChatKit visibility. */
|
|
10
|
+
export type AgentPluginRole = 'capability' | 'assistant' | 'subagent';
|
|
11
|
+
/** Selection lookup retains metadata for existing references hidden from discovery. */
|
|
12
|
+
export type RuntimeResourceCatalogPurpose = 'browse' | 'selection';
|
|
9
13
|
/**
|
|
10
14
|
* Availability in the current user/project context; execution still revalidates access.
|
|
11
15
|
* partial means some components are usable; requires_auth needs Connector authorization;
|
|
@@ -19,6 +23,33 @@ export interface RuntimeResourceReference {
|
|
|
19
23
|
/** Opaque resource version; existing selections must not silently upgrade. */
|
|
20
24
|
version: string;
|
|
21
25
|
}
|
|
26
|
+
/** Presentation only. Executable instructions stay in the referenced SKILL.md. */
|
|
27
|
+
export interface AgentPluginCommandPresentation {
|
|
28
|
+
label?: I18nText;
|
|
29
|
+
description?: I18nText;
|
|
30
|
+
argsHint?: string;
|
|
31
|
+
}
|
|
32
|
+
export interface AgentPluginCommand extends AgentPluginCommandPresentation {
|
|
33
|
+
/** Arguments interpreted by the skill, not separately executable commands. */
|
|
34
|
+
subcommands?: Record<string, AgentPluginCommandPresentation>;
|
|
35
|
+
}
|
|
36
|
+
/** A skill in an exact selected plugin version; never a workspace skill authorization. */
|
|
37
|
+
export interface RuntimeResourceSkillReference extends RuntimeResourceReference {
|
|
38
|
+
skillKey: string;
|
|
39
|
+
}
|
|
40
|
+
export interface RuntimeResourceCommand {
|
|
41
|
+
skill: RuntimeResourceSkillReference;
|
|
42
|
+
packageName: string;
|
|
43
|
+
description: string;
|
|
44
|
+
command: AgentPluginCommand;
|
|
45
|
+
}
|
|
46
|
+
/** Immutable template identity used by task-level Agent executions. */
|
|
47
|
+
export interface TemplateAgentSource extends RuntimeResourceReference {
|
|
48
|
+
kind: 'agent_plugin_template';
|
|
49
|
+
packageName: string;
|
|
50
|
+
digest: string;
|
|
51
|
+
templateKey: string;
|
|
52
|
+
}
|
|
22
53
|
/**
|
|
23
54
|
* Complete conversation selection, independent of graph runtimeCapabilities.
|
|
24
55
|
* Updates apply to the next execution without changing the Assistant graph.
|
|
@@ -53,7 +84,9 @@ export interface RuntimeResourceCatalogItem extends RuntimeResourceReference {
|
|
|
53
84
|
/** Package components and their individual availability. Plugins are selected as a whole. */
|
|
54
85
|
components: Array<{
|
|
55
86
|
key: string;
|
|
56
|
-
kind: 'skill' | 'mcp' | 'middleware' | 'external_xpert';
|
|
87
|
+
kind: 'skill' | 'mcp' | 'middleware' | 'external_xpert' | 'assistant_template';
|
|
88
|
+
title?: string;
|
|
89
|
+
description?: string;
|
|
57
90
|
status: RuntimeResourceStatus;
|
|
58
91
|
}>;
|
|
59
92
|
}
|
|
@@ -78,10 +111,27 @@ export interface RuntimeResourceCatalog {
|
|
|
78
111
|
*/
|
|
79
112
|
export interface AgentPluginXpertExtension {
|
|
80
113
|
/** Extension schema version, independent of the Agent Plugins spec version. */
|
|
81
|
-
version: 1;
|
|
114
|
+
version: 1 | 2;
|
|
115
|
+
/** Only assistant is excluded from ChatKit discovery; template availability is independent. */
|
|
116
|
+
role?: AgentPluginRole;
|
|
117
|
+
/** Skill-keyed shortcuts. Omitted skills have no command shortcut. */
|
|
118
|
+
commands?: Record<string, AgentPluginCommand>;
|
|
119
|
+
/** Version 2: package-contained Assistant DSL; runtime state is never packaged. */
|
|
120
|
+
templates?: Array<{
|
|
121
|
+
key: string;
|
|
122
|
+
path: string;
|
|
123
|
+
/** Marketplace category identifier for this Assistant template. Defaults to assistant. */
|
|
124
|
+
category?: string;
|
|
125
|
+
/** Localized catalog copy; does not change the packaged DSL or skill content. */
|
|
126
|
+
presentation?: {
|
|
127
|
+
title?: I18nText;
|
|
128
|
+
description?: I18nText;
|
|
129
|
+
pluginDisplayName?: I18nText;
|
|
130
|
+
};
|
|
131
|
+
}>;
|
|
82
132
|
interface?: {
|
|
83
|
-
displayName?:
|
|
84
|
-
description?:
|
|
133
|
+
displayName?: I18nText;
|
|
134
|
+
description?: I18nText;
|
|
85
135
|
icon?: string;
|
|
86
136
|
};
|
|
87
137
|
/** Presets for already installed middleware providers. */
|
|
@@ -166,7 +216,7 @@ export interface WorkspaceAgentPlugin {
|
|
|
166
216
|
version: string;
|
|
167
217
|
status: 'available' | 'not_published' | 'disabled';
|
|
168
218
|
components: Array<{
|
|
169
|
-
kind: 'skill' | 'mcp' | 'middleware' | 'external_xpert';
|
|
219
|
+
kind: 'skill' | 'mcp' | 'middleware' | 'external_xpert' | 'assistant_template';
|
|
170
220
|
name: string;
|
|
171
221
|
}>;
|
|
172
222
|
expertReferences: string[];
|
|
@@ -17,25 +17,25 @@ export declare const agentRuntimeProgressSchema: z.ZodObject<{
|
|
|
17
17
|
completed: z.ZodNumber;
|
|
18
18
|
total: z.ZodNumber;
|
|
19
19
|
}, "strict", z.ZodTypeAny, {
|
|
20
|
-
total?: number;
|
|
21
20
|
completed?: number;
|
|
22
|
-
}, {
|
|
23
21
|
total?: number;
|
|
22
|
+
}, {
|
|
24
23
|
completed?: number;
|
|
25
|
-
}>, {
|
|
26
24
|
total?: number;
|
|
25
|
+
}>, {
|
|
27
26
|
completed?: number;
|
|
28
|
-
}, {
|
|
29
27
|
total?: number;
|
|
28
|
+
}, {
|
|
30
29
|
completed?: number;
|
|
30
|
+
total?: number;
|
|
31
31
|
}>>;
|
|
32
32
|
}, "strict", z.ZodTypeAny, {
|
|
33
33
|
source?: "executor" | "host";
|
|
34
34
|
startedAt?: string;
|
|
35
35
|
summary?: string;
|
|
36
36
|
steps?: {
|
|
37
|
-
total?: number;
|
|
38
37
|
completed?: number;
|
|
38
|
+
total?: number;
|
|
39
39
|
};
|
|
40
40
|
observedAt?: string;
|
|
41
41
|
phase?: string;
|
|
@@ -44,8 +44,8 @@ export declare const agentRuntimeProgressSchema: z.ZodObject<{
|
|
|
44
44
|
startedAt?: string;
|
|
45
45
|
summary?: string;
|
|
46
46
|
steps?: {
|
|
47
|
-
total?: number;
|
|
48
47
|
completed?: number;
|
|
48
|
+
total?: number;
|
|
49
49
|
};
|
|
50
50
|
observedAt?: string;
|
|
51
51
|
phase?: string;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface AssistantCapabilityDeclaration {
|
|
2
|
+
key: string;
|
|
3
|
+
/** Required capabilities cannot be disabled; optional capabilities default to off. */
|
|
4
|
+
required?: boolean;
|
|
5
|
+
}
|
|
6
|
+
/** Structural template preview, never an authorization decision for a running user. */
|
|
7
|
+
export interface AssistantCapabilitySummary {
|
|
8
|
+
agents: {
|
|
9
|
+
key: string;
|
|
10
|
+
label: string;
|
|
11
|
+
middleware: {
|
|
12
|
+
provider: string;
|
|
13
|
+
toolNames: string[];
|
|
14
|
+
}[];
|
|
15
|
+
}[];
|
|
16
|
+
skills: {
|
|
17
|
+
pluginName: string;
|
|
18
|
+
source?: import('./assistant-template-dependencies.model').AgentPluginTemplateDependencySource;
|
|
19
|
+
componentKey: string;
|
|
20
|
+
targetAgentKey?: string;
|
|
21
|
+
}[];
|
|
22
|
+
seedMemoryCount: number;
|
|
23
|
+
sandbox: boolean;
|
|
24
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { PluginName, XpertPluginMcpServerPolicy } from '../plugin';
|
|
2
|
+
/** Portable package identity. The installer pins an omitted digest before writing an Assistant. */
|
|
3
|
+
export interface AgentPluginTemplateDependencySource {
|
|
4
|
+
kind: 'agent-plugin';
|
|
5
|
+
name: string;
|
|
6
|
+
digest?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface AssistantTemplateSkillDependency {
|
|
9
|
+
pluginName?: PluginName;
|
|
10
|
+
source?: AgentPluginTemplateDependencySource;
|
|
11
|
+
componentKey: string;
|
|
12
|
+
targetAgentKey?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface AssistantTemplateMcpServerDependency {
|
|
15
|
+
pluginName?: PluginName;
|
|
16
|
+
source?: AgentPluginTemplateDependencySource;
|
|
17
|
+
componentKey: string;
|
|
18
|
+
targetAgentKey?: string;
|
|
19
|
+
policyOverrides?: XpertPluginMcpServerPolicy;
|
|
20
|
+
}
|
|
21
|
+
export interface AssistantTemplateHookDependency {
|
|
22
|
+
pluginName?: PluginName;
|
|
23
|
+
componentKey: string;
|
|
24
|
+
targetAgentKey?: string;
|
|
25
|
+
events?: string[];
|
|
26
|
+
}
|
|
27
|
+
export interface AssistantTemplateAppDependency {
|
|
28
|
+
pluginName?: PluginName;
|
|
29
|
+
componentKey: string;
|
|
30
|
+
auth?: 'on_install' | 'on_first_use';
|
|
31
|
+
}
|
|
32
|
+
export interface AssistantTemplateToolsetDependency {
|
|
33
|
+
pluginName?: PluginName;
|
|
34
|
+
provider: string;
|
|
35
|
+
templateNodeKey: string;
|
|
36
|
+
targetAgentKey?: string;
|
|
37
|
+
instanceName?: string;
|
|
38
|
+
}
|
|
39
|
+
export interface AssistantTemplateDependencies {
|
|
40
|
+
/** Exact compatible versions; the active version is pinned at installation. */
|
|
41
|
+
versions?: {
|
|
42
|
+
pluginName: PluginName;
|
|
43
|
+
version: string;
|
|
44
|
+
}[];
|
|
45
|
+
plugins?: PluginName[];
|
|
46
|
+
skills?: AssistantTemplateSkillDependency[];
|
|
47
|
+
mcpServers?: AssistantTemplateMcpServerDependency[];
|
|
48
|
+
hooks?: AssistantTemplateHookDependency[];
|
|
49
|
+
apps?: AssistantTemplateAppDependency[];
|
|
50
|
+
toolsets?: AssistantTemplateToolsetDependency[];
|
|
51
|
+
}
|