@xpert-ai/plugin-sdk 3.9.4 → 3.9.8

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/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @xpert-ai/plugin-sdk
2
2
 
3
+ ## 3.9.8
4
+
5
+ ### Patch Changes
6
+
7
+ - 2558760: updates
8
+ - Updated dependencies [2558760]
9
+ - @xpert-ai/contracts@3.9.8
10
+
11
+ ## 3.9.5
12
+
13
+ ### Patch Changes
14
+
15
+ - 9e37ff9: updates
16
+ - Updated dependencies [9e37ff9]
17
+ - @xpert-ai/contracts@3.9.5
18
+
3
19
  ## 3.9.4
4
20
 
5
21
  ### Patch Changes
package/index.cjs.js CHANGED
@@ -971,6 +971,18 @@ BuiltinToolset.provider = '';
971
971
  */ fullPath(filePath) {
972
972
  return path.join(this.basePath, filePath);
973
973
  }
974
+ /**
975
+ * Convert an absolute path under this file-system root back to a relative path.
976
+ */ relativePath(filePath) {
977
+ const relative = path.relative(this.basePath, path.resolve(filePath)).replace(/\\/g, '/');
978
+ if (!relative || relative === '.') {
979
+ return '';
980
+ }
981
+ if (relative.startsWith('..') || path.isAbsolute(relative)) {
982
+ return null;
983
+ }
984
+ return relative;
985
+ }
974
986
  /**
975
987
  * Get web url for a given file path in the file system.
976
988
  *
package/index.esm.js CHANGED
@@ -950,6 +950,18 @@ BuiltinToolset.provider = '';
950
950
  */ fullPath(filePath) {
951
951
  return path__default.join(this.basePath, filePath);
952
952
  }
953
+ /**
954
+ * Convert an absolute path under this file-system root back to a relative path.
955
+ */ relativePath(filePath) {
956
+ const relative = path__default.relative(this.basePath, path__default.resolve(filePath)).replace(/\\/g, '/');
957
+ if (!relative || relative === '.') {
958
+ return '';
959
+ }
960
+ if (relative.startsWith('..') || path__default.isAbsolute(relative)) {
961
+ return null;
962
+ }
963
+ return relative;
964
+ }
953
965
  /**
954
966
  * Get web url for a given file path in the file system.
955
967
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xpert-ai/plugin-sdk",
3
- "version": "3.9.4",
3
+ "version": "3.9.8",
4
4
  "license": "AGPL-3.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,14 +1,34 @@
1
1
  import { TChatOptions, TChatRequest } from '@xpert-ai/contracts';
2
2
  export declare const AGENT_CHAT_DISPATCH_MESSAGE_TYPE: import("./message-type").StructuredHandoffMessageType;
3
- export interface AgentChatCallbackTarget {
3
+ export interface AgentChatHandoffMessageCallbackTarget {
4
+ transport?: 'handoff-message';
4
5
  messageType: string;
5
6
  headers?: Record<string, string>;
6
7
  context?: Record<string, unknown>;
7
8
  }
9
+ export interface AgentChatRedisPubSubCallbackTarget {
10
+ transport: 'redis-pubsub';
11
+ context?: Record<string, unknown>;
12
+ }
13
+ export type AgentChatCallbackTarget = AgentChatHandoffMessageCallbackTarget | AgentChatRedisPubSubCallbackTarget;
8
14
  export interface AgentChatDispatchPayload extends Record<string, unknown> {
9
15
  request: TChatRequest;
10
- options: TChatOptions;
16
+ options: TChatOptions & {
17
+ xpertId?: string;
18
+ isDraft?: boolean;
19
+ from?: string;
20
+ fromEndUserId?: string;
21
+ execution?: {
22
+ id: string;
23
+ };
24
+ streamPersistence?: {
25
+ transport: 'redis-stream';
26
+ threadId?: string | null;
27
+ runId?: string | null;
28
+ };
29
+ };
11
30
  callback: AgentChatCallbackTarget;
31
+ executionId?: string;
12
32
  }
13
33
  export interface AgentChatCallbackEnvelopePayload extends Record<string, unknown> {
14
34
  kind: 'stream' | 'complete' | 'error';
@@ -23,6 +23,10 @@ export declare class XpFileSystem {
23
23
  * @returns Absolute file path
24
24
  */
25
25
  fullPath(filePath: string): string;
26
+ /**
27
+ * Convert an absolute path under this file-system root back to a relative path.
28
+ */
29
+ relativePath(filePath: string): string | null;
26
30
  /**
27
31
  * Get web url for a given file path in the file system.
28
32
  *