@xpert-ai/plugin-sdk 3.35.0 → 3.37.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.
Files changed (65) hide show
  1. package/agent-results.cjs.js +5 -3
  2. package/agent-results.esm.js +2 -2
  3. package/analytics-result.cjs.js +64 -27
  4. package/analytics-result.esm.js +62 -28
  5. package/analytics.cjs.js +157 -15
  6. package/analytics.esm.js +154 -17
  7. package/artifact-document.cjs.js +9 -3
  8. package/artifact-document.esm.js +9 -3
  9. package/collaboration-client.cjs.js +274 -140
  10. package/collaboration-client.esm.js +273 -141
  11. package/docs/README.md +23 -0
  12. package/index.cjs.js +227 -10
  13. package/index.esm.js +198 -13
  14. package/package.json +8 -2
  15. package/remote-component.cjs.default.js +1 -0
  16. package/remote-component.cjs.js +143 -0
  17. package/remote-component.cjs.mjs +2 -0
  18. package/remote-component.d.ts +1 -0
  19. package/remote-component.esm.js +139 -0
  20. package/results.cjs.js +2 -14
  21. package/results.esm.js +2 -12
  22. package/src/analytics.d.ts +2 -0
  23. package/src/collaboration-client.d.ts +1 -0
  24. package/src/index.d.ts +1 -0
  25. package/src/lib/agent/handoff/agent-runtime-message.contract.d.ts +24 -24
  26. package/src/lib/agent/middleware/strategy.interface.d.ts +4 -0
  27. package/src/lib/agent/runtime/capability.d.ts +2 -0
  28. package/src/lib/agent/runtime/cli-model-profile.d.ts +14 -1
  29. package/src/lib/agent/runtime/dispatch.d.ts +79 -79
  30. package/src/lib/agent/runtime/execution-runner.d.ts +19 -10
  31. package/src/lib/agent/runtime/pipeline-scope.d.ts +4 -4
  32. package/src/lib/agent/runtime/results.d.ts +14 -234
  33. package/src/lib/agent/runtime/types.d.ts +19 -0
  34. package/src/lib/agent-event/index.d.ts +89 -0
  35. package/src/lib/agent-event/journal.d.ts +30 -0
  36. package/src/lib/artifact-document/dependencies.d.ts +3 -3
  37. package/src/lib/artifact-document/protocol.d.ts +2 -2
  38. package/src/lib/artifact-document/scheduler.d.ts +3 -0
  39. package/src/lib/artifact-type/definition.schema.d.ts +11 -39
  40. package/src/lib/assistant-capability/middleware.d.ts +2 -1
  41. package/src/lib/channel/strategy.interface.d.ts +20 -0
  42. package/src/lib/collaboration/client.d.ts +6 -59
  43. package/src/lib/collaboration/index.d.ts +1 -0
  44. package/src/lib/collaboration/operations-client.d.ts +23 -0
  45. package/src/lib/collaboration/presence.d.ts +36 -0
  46. package/src/lib/collaboration/provider.registry.d.ts +2 -2
  47. package/src/lib/collaboration/transport.d.ts +24 -0
  48. package/src/lib/collaboration/types.d.ts +57 -5
  49. package/src/lib/content-resource/catalog.d.ts +40 -2
  50. package/src/lib/content-resource/editor.d.ts +36 -1
  51. package/src/lib/data/analytics/analysis-evidence.d.ts +757 -0
  52. package/src/lib/data/analytics/analytics-certification.d.ts +64 -0
  53. package/src/lib/data/analytics/analytics-provider.d.ts +9 -0
  54. package/src/lib/data/analytics/analytics-value.d.ts +5 -0
  55. package/src/lib/data/analytics/index.d.ts +1 -0
  56. package/src/lib/evolution/runtime-capability.d.ts +1 -0
  57. package/src/lib/project-pipeline/adapters.d.ts +9 -2
  58. package/src/lib/project-pipeline/registry.d.ts +59 -48
  59. package/src/lib/project-task/acceptance.d.ts +13 -1
  60. package/src/lib/project-task/index.d.ts +4 -2
  61. package/src/lib/runtime/capabilities/project-configuration.d.ts +2 -0
  62. package/src/lib/view-extension/index.d.ts +1 -0
  63. package/src/lib/view-extension/provider.interface.d.ts +51 -0
  64. package/src/lib/view-extension/workbench-decision.d.ts +10 -0
  65. package/src/remote-component.d.ts +13 -0
package/results.cjs.js CHANGED
@@ -39,20 +39,8 @@ const common = {
39
39
  path: contracts.agentResultPathSchema
40
40
  })).strict()
41
41
  ]);
42
- /** Explicit final response envelope shared by adapters; ordinary prose is never classified heuristically. */ const agentTaskResultSchema = v3.z.object({
43
- version: v3.z.literal(1),
44
- summary: v3.z.string().max(64000),
45
- items: v3.z.array(agentResultItemSchema).max(32)
46
- }).strict().refine((value)=>new Set(value.items.map((item)=>item.id)).size === value.items.length, 'Result item IDs must be unique');
47
- /** Bound structured report transfer independently of the host's artifact-export quota. */ const AGENT_TASK_RESULT_FILE_MAX_BYTES = 4 * 1024 * 1024;
48
- /** Explicit final submission of an envelope file. Its digest pins bytes, not a business verdict. */ const agentTaskResultFileSchema = v3.z.object({
49
- version: v3.z.literal(1),
50
- path: contracts.agentResultPathSchema,
51
- sha256: v3.z.string().regex(/^[a-f0-9]{64}$/)
52
- }).strict();
42
+ /** Report bytes are transported independently of artifact quotas and business acceptance. */ const AGENT_TASK_REPORT_MAX_BYTES = 4 * 1024 * 1024;
53
43
 
44
+ exports.AGENT_TASK_REPORT_MAX_BYTES = AGENT_TASK_REPORT_MAX_BYTES;
54
45
  exports.AGENT_TASK_RESULTS_FEATURE = AGENT_TASK_RESULTS_FEATURE;
55
- exports.AGENT_TASK_RESULT_FILE_MAX_BYTES = AGENT_TASK_RESULT_FILE_MAX_BYTES;
56
46
  exports.agentResultItemSchema = agentResultItemSchema;
57
- exports.agentTaskResultFileSchema = agentTaskResultFileSchema;
58
- exports.agentTaskResultSchema = agentTaskResultSchema;
package/results.esm.js CHANGED
@@ -37,16 +37,6 @@ const common = {
37
37
  path: agentResultPathSchema
38
38
  })).strict()
39
39
  ]);
40
- /** Explicit final response envelope shared by adapters; ordinary prose is never classified heuristically. */ const agentTaskResultSchema = z.object({
41
- version: z.literal(1),
42
- summary: z.string().max(64000),
43
- items: z.array(agentResultItemSchema).max(32)
44
- }).strict().refine((value)=>new Set(value.items.map((item)=>item.id)).size === value.items.length, 'Result item IDs must be unique');
45
- /** Bound structured report transfer independently of the host's artifact-export quota. */ const AGENT_TASK_RESULT_FILE_MAX_BYTES = 4 * 1024 * 1024;
46
- /** Explicit final submission of an envelope file. Its digest pins bytes, not a business verdict. */ const agentTaskResultFileSchema = z.object({
47
- version: z.literal(1),
48
- path: agentResultPathSchema,
49
- sha256: z.string().regex(/^[a-f0-9]{64}$/)
50
- }).strict();
40
+ /** Report bytes are transported independently of artifact quotas and business acceptance. */ const AGENT_TASK_REPORT_MAX_BYTES = 4 * 1024 * 1024;
51
41
 
52
- export { AGENT_TASK_RESULTS_FEATURE as A, AGENT_TASK_RESULT_FILE_MAX_BYTES as a, agentResultItemSchema as b, agentTaskResultFileSchema as c, agentTaskResultSchema as d };
42
+ export { AGENT_TASK_REPORT_MAX_BYTES as A, AGENT_TASK_RESULTS_FEATURE as a, agentResultItemSchema as b };
@@ -2,3 +2,5 @@
2
2
  export * from './lib/data/analytics/analytics.schema';
3
3
  export * from './lib/data/analytics/analytics-result';
4
4
  export * from './lib/data/analytics/resource-analysis.schema';
5
+ export * from './lib/data/analytics/analytics-certification';
6
+ export * from './lib/data/analytics/analysis-evidence';
@@ -1,3 +1,4 @@
1
1
  /** Browser-safe collaboration client entry point without server-side SDK dependencies. */
2
2
  export * from './lib/collaboration/client';
3
3
  export type * from './lib/collaboration/types';
4
+ export * from './lib/collaboration/operations-client';
package/src/index.d.ts CHANGED
@@ -38,3 +38,4 @@ export * from './lib/project-task/index';
38
38
  export * from './lib/project-pipeline';
39
39
  export * from './lib/agent-plugin/import-default-agent-plugins.command';
40
40
  export * from './lib/execution-control';
41
+ export * from './lib/agent-event';
@@ -29,23 +29,23 @@ export declare const agentRuntimeEventSchema: z.ZodDiscriminatedUnion<"kind", [z
29
29
  }, "strict", z.ZodTypeAny, {
30
30
  source: "executor" | "host";
31
31
  observedAt: string;
32
- startedAt?: string | undefined;
33
- summary?: string | undefined;
34
32
  phase?: string | undefined;
33
+ startedAt?: string | undefined;
35
34
  steps?: {
36
35
  completed: number;
37
36
  total: number;
38
37
  } | undefined;
38
+ summary?: string | undefined;
39
39
  }, {
40
40
  source: "executor" | "host";
41
41
  observedAt: string;
42
- startedAt?: string | undefined;
43
- summary?: string | undefined;
44
42
  phase?: string | undefined;
43
+ startedAt?: string | undefined;
45
44
  steps?: {
46
45
  completed: number;
47
46
  total: number;
48
47
  } | undefined;
48
+ summary?: string | undefined;
49
49
  }>;
50
50
  version: z.ZodLiteral<1>;
51
51
  invocationId: z.ZodString;
@@ -65,47 +65,47 @@ export declare const agentRuntimeEventSchema: z.ZodDiscriminatedUnion<"kind", [z
65
65
  taskExecutionId: string;
66
66
  }>>;
67
67
  }, "strict", z.ZodTypeAny, {
68
- version?: 1;
69
68
  kind?: "progress";
69
+ version?: 1;
70
70
  progress?: {
71
71
  source: "executor" | "host";
72
72
  observedAt: string;
73
- startedAt?: string | undefined;
74
- summary?: string | undefined;
75
73
  phase?: string | undefined;
74
+ startedAt?: string | undefined;
76
75
  steps?: {
77
76
  completed: number;
78
77
  total: number;
79
78
  } | undefined;
79
+ summary?: string | undefined;
80
80
  };
81
+ revision?: number;
81
82
  projectTask?: {
82
83
  projectId: string;
83
84
  projectTaskId: string;
84
85
  taskExecutionId: string;
85
86
  };
86
87
  invocationId?: string;
87
- revision?: number;
88
88
  }, {
89
- version?: 1;
90
89
  kind?: "progress";
90
+ version?: 1;
91
91
  progress?: {
92
92
  source: "executor" | "host";
93
93
  observedAt: string;
94
- startedAt?: string | undefined;
95
- summary?: string | undefined;
96
94
  phase?: string | undefined;
95
+ startedAt?: string | undefined;
97
96
  steps?: {
98
97
  completed: number;
99
98
  total: number;
100
99
  } | undefined;
100
+ summary?: string | undefined;
101
101
  };
102
+ revision?: number;
102
103
  projectTask?: {
103
104
  projectId: string;
104
105
  projectTaskId: string;
105
106
  taskExecutionId: string;
106
107
  };
107
108
  invocationId?: string;
108
- revision?: number;
109
109
  }>, z.ZodObject<{
110
110
  kind: z.ZodLiteral<"result">;
111
111
  status: z.ZodEnum<["succeeded", "failed", "cancelled"]>;
@@ -128,26 +128,26 @@ export declare const agentRuntimeEventSchema: z.ZodDiscriminatedUnion<"kind", [z
128
128
  }>>;
129
129
  }, "strict", z.ZodTypeAny, {
130
130
  status?: "failed" | "succeeded" | "cancelled";
131
- version?: 1;
132
131
  kind?: "result";
132
+ version?: 1;
133
+ revision?: number;
133
134
  projectTask?: {
134
135
  projectId: string;
135
136
  projectTaskId: string;
136
137
  taskExecutionId: string;
137
138
  };
138
139
  invocationId?: string;
139
- revision?: number;
140
140
  }, {
141
141
  status?: "failed" | "succeeded" | "cancelled";
142
- version?: 1;
143
142
  kind?: "result";
143
+ version?: 1;
144
+ revision?: number;
144
145
  projectTask?: {
145
146
  projectId: string;
146
147
  projectTaskId: string;
147
148
  taskExecutionId: string;
148
149
  };
149
150
  invocationId?: string;
150
- revision?: number;
151
151
  }>, z.ZodObject<{
152
152
  kind: z.ZodLiteral<"input_request">;
153
153
  interactionId: z.ZodString;
@@ -169,26 +169,26 @@ export declare const agentRuntimeEventSchema: z.ZodDiscriminatedUnion<"kind", [z
169
169
  taskExecutionId: string;
170
170
  }>>;
171
171
  }, "strict", z.ZodTypeAny, {
172
- version?: 1;
173
172
  kind?: "input_request";
173
+ version?: 1;
174
+ revision?: number;
174
175
  projectTask?: {
175
176
  projectId: string;
176
177
  projectTaskId: string;
177
178
  taskExecutionId: string;
178
179
  };
179
180
  invocationId?: string;
180
- revision?: number;
181
181
  interactionId?: string;
182
182
  }, {
183
- version?: 1;
184
183
  kind?: "input_request";
184
+ version?: 1;
185
+ revision?: number;
185
186
  projectTask?: {
186
187
  projectId: string;
187
188
  projectTaskId: string;
188
189
  taskExecutionId: string;
189
190
  };
190
191
  invocationId?: string;
191
- revision?: number;
192
192
  interactionId?: string;
193
193
  }>]>;
194
194
  export type AgentRuntimeEvent = z.output<typeof agentRuntimeEventSchema>;
@@ -229,15 +229,15 @@ export declare const agentRuntimeResultClaimSchema: z.ZodObject<{
229
229
  threadId: z.ZodString;
230
230
  }, "strict", z.ZodTypeAny, {
231
231
  type?: "project_agent";
232
+ projectId?: string;
232
233
  threadId?: string;
233
234
  conversationId?: string;
234
- projectId?: string;
235
235
  agentKey?: "general_agent";
236
236
  }, {
237
237
  type?: "project_agent";
238
+ projectId?: string;
238
239
  threadId?: string;
239
240
  conversationId?: string;
240
- projectId?: string;
241
241
  agentKey?: "general_agent";
242
242
  }>]>;
243
243
  consumer: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
@@ -273,9 +273,9 @@ export declare const agentRuntimeResultClaimSchema: z.ZodObject<{
273
273
  agentKey?: string;
274
274
  } | {
275
275
  type?: "project_agent";
276
+ projectId?: string;
276
277
  threadId?: string;
277
278
  conversationId?: string;
278
- projectId?: string;
279
279
  agentKey?: "general_agent";
280
280
  };
281
281
  consumer?: {
@@ -297,9 +297,9 @@ export declare const agentRuntimeResultClaimSchema: z.ZodObject<{
297
297
  agentKey?: string;
298
298
  } | {
299
299
  type?: "project_agent";
300
+ projectId?: string;
300
301
  threadId?: string;
301
302
  conversationId?: string;
302
- projectId?: string;
303
303
  agentKey?: "general_agent";
304
304
  };
305
305
  consumer?: {
@@ -13,7 +13,11 @@ export interface IAgentMiddlewareContext {
13
13
  workspaceId?: string;
14
14
  projectId?: string;
15
15
  conversationId?: string;
16
+ /** Persisted input message for this turn, when available. */
17
+ inputMessageId?: string;
16
18
  executionId?: string;
19
+ /** Originating Event Inbox receipt of this authorized wake, including same-scope child agents. */
20
+ readonly eventReceiptId?: string;
17
21
  /** Omitted for legacy Assistant hosts. Project general agents must explicitly use project_agent. */
18
22
  callerType?: AgentInvocationScope['callerType'];
19
23
  threadId?: string;
@@ -16,6 +16,8 @@ export interface AgentInvocationApi {
16
16
  start(request: AgentInvocationRequest): Promise<AgentInvocation>;
17
17
  /** Refresh an existing invocation, possibly persisting provider observations. Never relaunches work. */
18
18
  inspect(invocationId: string): Promise<AgentInvocation>;
19
+ /** Retry requested file delivery without starting work; no pending delivery returns the current invocation. */
20
+ recoverDelivery?(invocationId: string, input: import('./results').AgentDeliveryRecovery): Promise<AgentInvocation>;
19
21
  /** Request supported cancellation; cancelling does not confirm termination. */
20
22
  cancel(invocationId: string): Promise<AgentInvocation>;
21
23
  /** Answer the current interaction using its exact ID and provider-defined response schema. */
@@ -31,6 +31,19 @@ export interface CliModelProfile {
31
31
  requiredCapabilities: ModelFeature[];
32
32
  /** Modes this profile explicitly implements; unsupported modes must not be silently ignored. */
33
33
  permissionModes?: readonly CliPermissionMode[];
34
+ /** Native authentication stays in the owner Computer; the host never receives credentials. */
35
+ native?: {
36
+ versions: readonly string[];
37
+ homeDirectory: string;
38
+ statusArguments: readonly string[];
39
+ loginArguments: readonly string[];
40
+ logoutArguments: readonly string[];
41
+ testArguments: readonly string[];
42
+ configure(input: {
43
+ home: string;
44
+ permissionMode: CliPermissionMode;
45
+ }): CliModelConfiguration;
46
+ };
34
47
  chatBridge?: {
35
48
  versions: readonly string[];
36
49
  requiredCapabilities: ModelFeature[];
@@ -58,5 +71,5 @@ export interface CliModelProfiles {
58
71
  export declare const CliModelProfilesCapability: import("../../core/runtime-capability").RuntimeCapabilityKey<CliModelProfiles>;
59
72
  /** Additional execution sources can validate lifecycle without making OS depend on Pro entities. */
60
73
  export declare const ShellModelExecutionSourceCapability: import("../../core/runtime-capability").RuntimeCapabilityKey<{
61
- assertCurrent(context: import("@xpert-ai/contracts").ModelExecutionContext, preparing?: boolean): Promise<void>;
74
+ assertCurrent(context: import("@xpert-ai/contracts").ExecutionSourceContext, preparing?: boolean): Promise<void>;
62
75
  }>;