@xpert-ai/contracts 3.21.3 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xpert-ai/contracts",
3
- "version": "3.21.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.14.2",
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
+ }
@@ -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
  }
@@ -79,6 +112,10 @@ export interface RuntimeResourceCatalog {
79
112
  export interface AgentPluginXpertExtension {
80
113
  /** Extension schema version, independent of the Agent Plugins spec version. */
81
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>;
82
119
  /** Version 2: package-contained Assistant DSL; runtime state is never packaged. */
83
120
  templates?: Array<{
84
121
  key: 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;
@@ -89,7 +89,7 @@ export declare const executionActivityItemSchema: z.ZodObject<{
89
89
  }[];
90
90
  }>]>>;
91
91
  }, "strict", z.ZodTypeAny, {
92
- status?: "unknown" | "succeeded" | "failed" | "running";
92
+ status?: "failed" | "unknown" | "succeeded" | "running";
93
93
  name?: string;
94
94
  input?: string;
95
95
  output?: string;
@@ -114,7 +114,7 @@ export declare const executionActivityItemSchema: z.ZodObject<{
114
114
  key?: string;
115
115
  };
116
116
  }, {
117
- status?: "unknown" | "succeeded" | "failed" | "running";
117
+ status?: "failed" | "unknown" | "succeeded" | "running";
118
118
  name?: string;
119
119
  input?: string;
120
120
  output?: string;
@@ -157,7 +157,7 @@ export declare const executionActivityItemSchema: z.ZodObject<{
157
157
  text?: string;
158
158
  kind?: "message";
159
159
  } | {
160
- status?: "unknown" | "succeeded" | "failed" | "running";
160
+ status?: "failed" | "unknown" | "succeeded" | "running";
161
161
  name?: string;
162
162
  input?: string;
163
163
  output?: string;
@@ -193,7 +193,7 @@ export declare const executionActivityItemSchema: z.ZodObject<{
193
193
  text?: string;
194
194
  kind?: "message";
195
195
  } | {
196
- status?: "unknown" | "succeeded" | "failed" | "running";
196
+ status?: "failed" | "unknown" | "succeeded" | "running";
197
197
  name?: string;
198
198
  input?: string;
199
199
  output?: string;
@@ -304,7 +304,7 @@ export declare const executionActivityBatchSchema: z.ZodObject<{
304
304
  }[];
305
305
  }>]>>;
306
306
  }, "strict", z.ZodTypeAny, {
307
- status?: "unknown" | "succeeded" | "failed" | "running";
307
+ status?: "failed" | "unknown" | "succeeded" | "running";
308
308
  name?: string;
309
309
  input?: string;
310
310
  output?: string;
@@ -329,7 +329,7 @@ export declare const executionActivityBatchSchema: z.ZodObject<{
329
329
  key?: string;
330
330
  };
331
331
  }, {
332
- status?: "unknown" | "succeeded" | "failed" | "running";
332
+ status?: "failed" | "unknown" | "succeeded" | "running";
333
333
  name?: string;
334
334
  input?: string;
335
335
  output?: string;
@@ -372,7 +372,7 @@ export declare const executionActivityBatchSchema: z.ZodObject<{
372
372
  text?: string;
373
373
  kind?: "message";
374
374
  } | {
375
- status?: "unknown" | "succeeded" | "failed" | "running";
375
+ status?: "failed" | "unknown" | "succeeded" | "running";
376
376
  name?: string;
377
377
  input?: string;
378
378
  output?: string;
@@ -408,7 +408,7 @@ export declare const executionActivityBatchSchema: z.ZodObject<{
408
408
  text?: string;
409
409
  kind?: "message";
410
410
  } | {
411
- status?: "unknown" | "succeeded" | "failed" | "running";
411
+ status?: "failed" | "unknown" | "succeeded" | "running";
412
412
  name?: string;
413
413
  input?: string;
414
414
  output?: string;
@@ -451,7 +451,7 @@ export declare const executionActivityBatchSchema: z.ZodObject<{
451
451
  text?: string;
452
452
  kind?: "message";
453
453
  } | {
454
- status?: "unknown" | "succeeded" | "failed" | "running";
454
+ status?: "failed" | "unknown" | "succeeded" | "running";
455
455
  name?: string;
456
456
  input?: string;
457
457
  output?: string;
@@ -493,7 +493,7 @@ export declare const executionActivityBatchSchema: z.ZodObject<{
493
493
  text?: string;
494
494
  kind?: "message";
495
495
  } | {
496
- status?: "unknown" | "succeeded" | "failed" | "running";
496
+ status?: "failed" | "unknown" | "succeeded" | "running";
497
497
  name?: string;
498
498
  input?: string;
499
499
  output?: string;
@@ -607,13 +607,13 @@ export declare const projectTaskDispatchReceiptSchema: z.ZodObject<{
607
607
  invocationId: z.ZodString;
608
608
  status: z.ZodEnum<["queued", "running", "waiting", "cancelling", "succeeded", "failed", "cancelled", "unknown"]>;
609
609
  }, "strict", z.ZodTypeAny, {
610
- status?: "unknown" | "succeeded" | "failed" | "running" | "queued" | "waiting" | "cancelled" | "cancelling";
610
+ status?: "failed" | "unknown" | "succeeded" | "running" | "queued" | "waiting" | "cancelled" | "cancelling";
611
611
  projectId?: string;
612
612
  invocationId?: string;
613
613
  projectTaskId?: string;
614
614
  taskExecutionId?: string;
615
615
  }, {
616
- status?: "unknown" | "succeeded" | "failed" | "running" | "queued" | "waiting" | "cancelled" | "cancelling";
616
+ status?: "failed" | "unknown" | "succeeded" | "running" | "queued" | "waiting" | "cancelled" | "cancelling";
617
617
  projectId?: string;
618
618
  invocationId?: string;
619
619
  projectTaskId?: string;
@@ -99,6 +99,7 @@ export declare enum XpertAgentExecutionStatusEnum {
99
99
  INTERRUPTED = "interrupted"
100
100
  }
101
101
  export type TAgentExecutionMetadata = {
102
+ templateSource?: import('../agent-plugin').TemplateAgentSource;
102
103
  businessOutcome?: import('@xpert-ai/chatkit-types').TAgentExecutionOutcome;
103
104
  /** Recorded by the invocation boundary; never inferred from agent names. */
104
105
  invocationKind?: 'external_assistant' | 'sub_agent';
@@ -7,7 +7,7 @@ export declare const DEFAULT_AGENT_PLUGINS_SOURCE: {
7
7
  };
8
8
  export interface DefaultAgentPluginImportItem {
9
9
  id: string;
10
- status: 'imported' | 'existing' | 'failed';
10
+ status: 'imported' | 'existing' | 'repaired' | 'failed';
11
11
  packageId?: string;
12
12
  title?: string;
13
13
  diagnosticCount?: number;
@@ -17,3 +17,14 @@ export interface DefaultAgentPluginsImportResult {
17
17
  commit: string;
18
18
  items: DefaultAgentPluginImportItem[];
19
19
  }
20
+ /** Scope-owned receipt for a background import; completed items survive API restarts. */
21
+ export interface DefaultAgentPluginsImportProgress {
22
+ operationId: string | null;
23
+ phase: 'idle' | 'fetching' | 'importing' | 'completed' | 'failed';
24
+ commit: string | null;
25
+ total: number;
26
+ currentId: string | null;
27
+ items: DefaultAgentPluginImportItem[];
28
+ updatedAt: string;
29
+ error?: string;
30
+ }
package/src/index.d.ts CHANGED
@@ -65,9 +65,10 @@ export * from './plain-object.model';
65
65
  export * from './plugin';
66
66
  export * from './view-extension';
67
67
  export * from './runtime-control';
68
- export type { RuntimeResourceKind, RuntimeResourceStatus, RuntimeResourceReference, RuntimeResourcesSelection, AgentPluginDiagnostic, RuntimeResourceCatalogItem, RuntimeResourceView, RuntimeResourceCatalog, AgentPluginXpertExtension, AgentPluginConnectorAuth, AgentPluginConnectorBinding, RuntimeResourceDefinition, RuntimeResourceBindingInput, WorkspaceAgentPlugin, WorkspaceAgentPluginOptions, WorkspaceAgentPluginAddInput, WorkspaceAgentPluginAddResult, InstalledAgentPlugin } from './agent-plugin';
68
+ export type { RuntimeResourceKind, AgentPluginRole, RuntimeResourceCatalogPurpose, RuntimeResourceStatus, RuntimeResourceReference, TemplateAgentSource, RuntimeResourcesSelection, AgentPluginDiagnostic, RuntimeResourceCatalogItem, RuntimeResourceView, RuntimeResourceCatalog, AgentPluginXpertExtension, AgentPluginCommand, AgentPluginCommandPresentation, RuntimeResourceCommand, RuntimeResourceSkillReference, AgentPluginConnectorAuth, AgentPluginConnectorBinding, RuntimeResourceDefinition, RuntimeResourceBindingInput, WorkspaceAgentPlugin, WorkspaceAgentPluginOptions, WorkspaceAgentPluginAddInput, WorkspaceAgentPluginAddResult, InstalledAgentPlugin } from './agent-plugin';
69
69
  export * from './desktop-shell.model';
70
70
  export * from './ai/agent-output-delivery.model';
71
71
  export * from './ai/execution-activity.model';
72
72
  export * from './setup-plugins';
73
73
  export * from './default-agent-plugins';
74
+ export * from './agent-plugin-maintenance';
@@ -35,6 +35,8 @@ export interface XpertViewHostCapabilities {
35
35
  featureProviders?: Record<string, XpertViewFeatureProvider[]>;
36
36
  }
37
37
  export interface XpertViewRuntimeScopeInput {
38
+ /** Route through the group boundary; the server resolves and validates its runtime. */
39
+ groupId?: string | null;
38
40
  projectId?: string | null;
39
41
  conversationId?: string | null;
40
42
  }