@xpert-ai/plugin-sdk 3.8.3 → 3.9.0-beta.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 (45) hide show
  1. package/index.cjs.js +543 -325
  2. package/index.esm.js +526 -298
  3. package/package.json +4 -3
  4. package/src/index.d.ts +1 -0
  5. package/src/lib/agent/handoff/handoff-processor.decorator.d.ts +1 -1
  6. package/src/lib/agent/index.d.ts +1 -0
  7. package/src/lib/agent/middleware/strategy.decorator.d.ts +1 -1
  8. package/src/lib/agent/skill/skill-source-provider.decorator.d.ts +1 -1
  9. package/src/lib/agent/skill/skill-source-provider.interface.d.ts +1 -1
  10. package/src/lib/ai-model/llm.d.ts +9 -0
  11. package/src/lib/channel/strategy.interface.d.ts +0 -2
  12. package/src/lib/core/context/request-context.d.ts +7 -4
  13. package/src/lib/core/context/request-context.middleware.d.ts +0 -1
  14. package/src/lib/core/file-system.d.ts +1 -3
  15. package/src/lib/core/permissions/analytics.d.ts +2 -3
  16. package/src/lib/core/permissions/general.d.ts +2 -1
  17. package/src/lib/data/datasource/strategy.decorator.d.ts +1 -1
  18. package/src/lib/data/datasource/types.d.ts +0 -3
  19. package/src/lib/file/file-storage/provider.decorator.d.ts +1 -1
  20. package/src/lib/file/file-storage/provider.interface.d.ts +0 -2
  21. package/src/lib/file/file-upload/strategy.decorator.d.ts +1 -1
  22. package/src/lib/file/file-upload/strategy.interface.d.ts +0 -2
  23. package/src/lib/integration/strategy.decorator.d.ts +1 -1
  24. package/src/lib/integration/strategy.interface.d.ts +15 -3
  25. package/src/lib/rag/image/strategy.decorator.d.ts +1 -1
  26. package/src/lib/rag/knowledge/knowledge-strategy.decorator.d.ts +1 -1
  27. package/src/lib/rag/retriever/strategy.decorator.d.ts +1 -1
  28. package/src/lib/rag/source/strategy.decorator.d.ts +1 -1
  29. package/src/lib/rag/textsplitter/strategy.decorator.d.ts +1 -1
  30. package/src/lib/rag/transformer/strategy.decorator.d.ts +1 -1
  31. package/src/lib/sandbox/protocol.d.ts +6 -8
  32. package/src/lib/sandbox/sandbox.d.ts +6 -0
  33. package/src/lib/sandbox/sandbox.decorator.d.ts +1 -1
  34. package/src/lib/sandbox/sandbox.interface.d.ts +7 -11
  35. package/src/lib/strategy.d.ts +3 -3
  36. package/src/lib/toolset/strategy.decorator.d.ts +1 -1
  37. package/src/lib/vectorstore/strategy.decorator.d.ts +1 -1
  38. package/src/lib/view-extension/index.d.ts +3 -0
  39. package/src/lib/view-extension/provider.decorator.d.ts +2 -0
  40. package/src/lib/view-extension/provider.interface.d.ts +7 -0
  41. package/src/lib/view-extension/provider.registry.d.ts +10 -0
  42. package/src/lib/workflow/node/strategy.decorator.d.ts +1 -1
  43. package/src/lib/workflow/trigger/strategy.decorator.d.ts +1 -1
  44. package/index.esm.d.ts +0 -1
  45. /package/{index.cjs.d.ts → index.d.ts} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xpert-ai/plugin-sdk",
3
- "version": "3.8.3",
3
+ "version": "3.9.0-beta.0",
4
4
  "license": "AGPL-3.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -37,5 +37,6 @@
37
37
  "stream": "*",
38
38
  "yaml": "*",
39
39
  "zod": "*"
40
- }
41
- }
40
+ },
41
+ "types": "./index.d.ts"
42
+ }
package/src/index.d.ts CHANGED
@@ -16,3 +16,4 @@ export * from './lib/channel/index';
16
16
  export * from './lib/file/index';
17
17
  export * from './lib/strategy';
18
18
  export * from './lib/sandbox/index';
19
+ export * from './lib/view-extension/index';
@@ -8,4 +8,4 @@ export declare const HANDOFF_PROCESSOR_STRATEGY = "HANDOFF_PROCESSOR_STRATEGY";
8
8
  * 1) Which message types it handles
9
9
  * 2) Default execution policy (lane/timeout)
10
10
  */
11
- export declare function HandoffProcessorStrategy(provider: string, metadata: HandoffProcessorMetadata): <TFunction extends Function, Y>(target: object | TFunction, propertyKey?: string | symbol, descriptor?: TypedPropertyDescriptor<Y>) => void;
11
+ export declare function HandoffProcessorStrategy(provider: string, metadata: HandoffProcessorMetadata): <TFunction extends Function, Y>(target: TFunction | object, propertyKey?: string | symbol, descriptor?: TypedPropertyDescriptor<Y>) => void;
@@ -1,2 +1,3 @@
1
+ export * from './skill/index';
1
2
  export * from './middleware';
2
3
  export * from './handoff';
@@ -1,2 +1,2 @@
1
1
  export declare const AGENT_MIDDLEWARE_STRATEGY = "AGENT_MIDDLEWARE_STRATEGY";
2
- export declare const AgentMiddlewareStrategy: (provider: string) => <TFunction extends Function, Y>(target: object | TFunction, propertyKey?: string | symbol, descriptor?: TypedPropertyDescriptor<Y>) => void;
2
+ export declare const AgentMiddlewareStrategy: (provider: string) => <TFunction extends Function, Y>(target: TFunction | object, propertyKey?: string | symbol, descriptor?: TypedPropertyDescriptor<Y>) => void;
@@ -1,2 +1,2 @@
1
1
  export declare const SKILL_SOURCE_PROVIDER = "SKILL_SOURCE_PROVIDER";
2
- export declare const SkillSourceProviderStrategy: (provider: string) => <TFunction extends Function, Y>(target: object | TFunction, propertyKey?: string | symbol, descriptor?: TypedPropertyDescriptor<Y>) => void;
2
+ export declare const SkillSourceProviderStrategy: (provider: string) => <TFunction extends Function, Y>(target: TFunction | object, propertyKey?: string | symbol, descriptor?: TypedPropertyDescriptor<Y>) => void;
@@ -1,4 +1,4 @@
1
- import { ISkillRepository, ISkillRepositoryIndex, TSkillSourceMeta } from "@metad/contracts";
1
+ import { ISkillRepository, ISkillRepositoryIndex, TSkillSourceMeta } from '@metad/contracts';
2
2
  export interface ISkillSourceProvider {
3
3
  type: string;
4
4
  meta: TSkillSourceMeta;
@@ -41,6 +41,15 @@ export declare abstract class LargeLanguageModel extends AIModel {
41
41
  handleLLMError: (err: any) => void;
42
42
  };
43
43
  protected getCustomizableModelSchemaFromCredentials(model: string, credentials: Record<string, any>): AIModelEntity | null;
44
+ protected createHandleVerboseCallbacks(enabled?: boolean, logger?: Logger): {
45
+ handleChatModelStart: (llm: any, messages: any, runId: any, parentRunId: any, extraParams: any, tags: any, metadata: any, runName: any) => void;
46
+ handleLLMStart: (llm: any, prompts: any, runId: any, parentRunId: any, extraParams: any, tags: any, metadata: any, runName: any) => void;
47
+ handleLLMEnd: (output: any, runId: any, parentRunId: any, tags: any, extraParams: any) => void;
48
+ handleLLMError: (err: any, runId: any, parentRunId: any, tags: any, extraParams: any) => void;
49
+ }[];
50
+ private formatVerboseLog;
51
+ private stringifyLogPayload;
52
+ private formatError;
44
53
  }
45
54
  export declare function calcTokenUsage(output: LLMResult): TTokenUsage;
46
55
  /**
@@ -1,5 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
1
  import { IIntegration } from '@metad/contracts';
4
2
  import { Request, Response, NextFunction } from 'express';
5
3
  /**
@@ -1,6 +1,4 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
- import { IUser, LanguagesEnum, PermissionsEnum, RolesEnum } from '@metad/contracts';
1
+ import { IApiKey, IRequestScopeContext, IUser, LanguagesEnum, PermissionsEnum, RolesEnum } from '@metad/contracts';
4
2
  import type { IncomingMessage, ServerResponse } from 'http';
5
3
  import { AsyncLocalStorage } from 'node:async_hooks';
6
4
  export declare class RequestContext {
@@ -12,6 +10,7 @@ export declare class RequestContext {
12
10
  constructor(request: IncomingMessage, response: ServerResponse, reqId: string, userId?: string, extras?: Record<string, any>);
13
11
  static currentRequestContext(): RequestContext;
14
12
  static currentRequest(): IncomingMessage;
13
+ static currentApiKey(): IApiKey | null;
15
14
  static currentTenantId(): string;
16
15
  static currentUserId(): string;
17
16
  static currentRoleId(): string;
@@ -22,7 +21,11 @@ export declare class RequestContext {
22
21
  * @returns The language code (LanguagesEnum) extracted from the headers, or the default language (ENGLISH) if not found.
23
22
  */
24
23
  static getLanguageCode(): LanguagesEnum;
25
- static getOrganizationId(): string;
24
+ static getScope(): IRequestScopeContext;
25
+ static getOrganizationId(): string | null;
26
+ static isTenantScope(): boolean;
27
+ static isOrganizationScope(): boolean;
28
+ static requireOrganizationScope(): string;
26
29
  static hasPermissions(findPermissions: Array<PermissionsEnum | string>, throwError?: boolean): boolean;
27
30
  static hasAnyPermission(findPermissions: PermissionsEnum[], throwError?: boolean): boolean;
28
31
  static currentToken(throwError?: boolean): any;
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { IUser } from '@metad/contracts';
3
2
  import { NestMiddleware } from '@nestjs/common';
4
3
  import { IncomingMessage, ServerResponse } from 'node:http';
@@ -1,5 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
1
  import { FileSystemPermission } from './permissions';
4
2
  /**
5
3
  * Restricted FileSystem based on granted permissions
@@ -35,7 +33,7 @@ export declare class XpFileSystem {
35
33
  /**
36
34
  * Read file contents
37
35
  */
38
- readFile(filePath: string, encoding?: BufferEncoding): Promise<Buffer>;
36
+ readFile(filePath: string, encoding?: BufferEncoding): Promise<NonSharedBuffer>;
39
37
  /**
40
38
  * Write file contents
41
39
  */
@@ -1,4 +1,3 @@
1
- import type { DSCoreService } from '@metad/ocap-core';
2
1
  import type { BasePermission } from './general';
3
2
  export type AnalyticsPermissionOperation = 'dscore' | 'query' | 'model' | 'indicator' | 'create_indicator';
4
3
  /**
@@ -37,9 +36,9 @@ export interface AnalyticsIndicatorValidationInput {
37
36
  /**
38
37
  * Analytics service exposed to plugins under permission control.
39
38
  */
40
- export interface AnalyticsPermissionService {
39
+ export interface AnalyticsPermissionService<TDSCoreService = unknown> {
41
40
  resolveChatBIModels(modelIds: string[]): Promise<AnalyticsResolvedChatBIModel[]>;
42
- getDSCoreService(input?: AnalyticsDSCoreInput): Promise<DSCoreService>;
41
+ getDSCoreService(input?: AnalyticsDSCoreInput): Promise<TDSCoreService>;
43
42
  visitChatBIModel(modelId: string, cubeName: string): Promise<void>;
44
43
  ensureCreateIndicatorAccess(): Promise<void>;
45
44
  validateIndicatorStatement(input: AnalyticsIndicatorValidationInput): Promise<void>;
@@ -1,4 +1,4 @@
1
- import type { IIntegration } from '@metad/contracts';
1
+ import type { IIntegration, IPagination } from '@metad/contracts';
2
2
  /**
3
3
  * Base Permission type
4
4
  */
@@ -68,4 +68,5 @@ export declare const INTEGRATION_PERMISSION_SERVICE_TOKEN = "XPERT_PLUGIN_INTEGR
68
68
  */
69
69
  export interface IntegrationPermissionService {
70
70
  read<TIntegration = IIntegration>(id: string, options?: Record<string, any>): Promise<TIntegration | null>;
71
+ findAll<TIntegration = IIntegration>(options?: Record<string, any>): Promise<IPagination<TIntegration>>;
71
72
  }
@@ -1,2 +1,2 @@
1
1
  export declare const DATASOURCE_STRATEGY = "DATASOURCE_STRATEGY";
2
- export declare const DataSourceStrategy: (provider: string) => <TFunction extends Function, Y>(target: object | TFunction, propertyKey?: string | symbol, descriptor?: TypedPropertyDescriptor<Y>) => void;
2
+ export declare const DataSourceStrategy: (provider: string) => <TFunction extends Function, Y>(target: TFunction | object, propertyKey?: string | symbol, descriptor?: TypedPropertyDescriptor<Y>) => void;
@@ -1,6 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
- /// <reference types="node" />
4
1
  import * as _axios from 'axios';
5
2
  import { Readable } from 'stream';
6
3
  import { IColumnDef, IDSSchema, IDSTable } from '@metad/contracts';
@@ -1,2 +1,2 @@
1
1
  export declare const FILE_STORAGE_PROVIDER = "FILE_STORAGE_PROVIDER";
2
- export declare const FileStorageProvider: (provider: string) => <TFunction extends Function, Y>(target: object | TFunction, propertyKey?: string | symbol, descriptor?: TypedPropertyDescriptor<Y>) => void;
2
+ export declare const FileStorageProvider: (provider: string) => <TFunction extends Function, Y>(target: TFunction | object, propertyKey?: string | symbol, descriptor?: TypedPropertyDescriptor<Y>) => void;
@@ -1,5 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
1
  import { FileStorageOption, FileSystem, UploadedFile } from '@metad/contracts';
4
2
  export interface IFileStorageProvider {
5
3
  readonly name: string;
@@ -1,2 +1,2 @@
1
1
  export declare const FILE_UPLOAD_TARGET_STRATEGY = "FILE_UPLOAD_TARGET_STRATEGY";
2
- export declare const FileUploadTargetStrategy: (type: string) => <TFunction extends Function, Y>(target: object | TFunction, propertyKey?: string | symbol, descriptor?: TypedPropertyDescriptor<Y>) => void;
2
+ export declare const FileUploadTargetStrategy: (type: string) => <TFunction extends Function, Y>(target: TFunction | object, propertyKey?: string | symbol, descriptor?: TypedPropertyDescriptor<Y>) => void;
@@ -1,5 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
1
  import { IFileAssetDestination, IFileAssetSource, IStorageFile, IUploadFileTarget } from '@metad/contracts';
4
2
  export type TFileUploadRequestContext = {
5
3
  tenantId?: string;
@@ -1,2 +1,2 @@
1
1
  export declare const INTEGRATION_STRATEGY = "INTEGRATION_STRATEGY";
2
- export declare const IntegrationStrategyKey: (provider: string) => <TFunction extends Function, Y>(target: object | TFunction, propertyKey?: string | symbol, descriptor?: TypedPropertyDescriptor<Y>) => void;
2
+ export declare const IntegrationStrategyKey: (provider: string) => <TFunction extends Function, Y>(target: TFunction | object, propertyKey?: string | symbol, descriptor?: TypedPropertyDescriptor<Y>) => void;
@@ -2,10 +2,22 @@ import { IIntegration, TIntegrationProvider } from '@metad/contracts';
2
2
  export type TIntegrationStrategyParams = {
3
3
  query: string;
4
4
  };
5
+ export type IntegrationTestProbe = {
6
+ connected?: boolean;
7
+ state?: string;
8
+ lastError?: string | null;
9
+ checkedAt?: number | null;
10
+ };
11
+ export type IntegrationTestResult = {
12
+ webhookUrl?: string;
13
+ mode?: string;
14
+ warnings?: string[];
15
+ probe?: IntegrationTestProbe;
16
+ } & Record<string, unknown>;
5
17
  export interface IntegrationStrategy<T = unknown> {
6
18
  meta: TIntegrationProvider;
7
19
  execute(integration: IIntegration<T>, payload: TIntegrationStrategyParams): Promise<any>;
8
- validateConfig?(config: T, integration?: IIntegration<T>): Promise<void | {
9
- webhookUrl: string;
10
- }>;
20
+ onUpdate?(previous: IIntegration<T>, current: IIntegration<any>): Promise<void> | void;
21
+ onDelete?(integration: IIntegration<T>): Promise<void> | void;
22
+ validateConfig?(config: T, integration?: IIntegration<T>): Promise<void | IntegrationTestResult>;
11
23
  }
@@ -2,4 +2,4 @@ export declare const IMAGE_UNDERSTANDING_STRATEGY = "IMAGE_UNDERSTANDING_STRATEG
2
2
  /**
3
3
  * Decorator to mark a provider as an Image Understanding Strategy
4
4
  */
5
- export declare const ImageUnderstandingStrategy: (provider: string) => <TFunction extends Function, Y>(target: object | TFunction, propertyKey?: string | symbol, descriptor?: TypedPropertyDescriptor<Y>) => void;
5
+ export declare const ImageUnderstandingStrategy: (provider: string) => <TFunction extends Function, Y>(target: TFunction | object, propertyKey?: string | symbol, descriptor?: TypedPropertyDescriptor<Y>) => void;
@@ -1,2 +1,2 @@
1
1
  export declare const KNOWLEDGE_STRATEGY = "KNOWLEDGE_STRATEGY";
2
- export declare const KnowledgeStrategyKey: (provider: string) => <TFunction extends Function, Y>(target: object | TFunction, propertyKey?: string | symbol, descriptor?: TypedPropertyDescriptor<Y>) => void;
2
+ export declare const KnowledgeStrategyKey: (provider: string) => <TFunction extends Function, Y>(target: TFunction | object, propertyKey?: string | symbol, descriptor?: TypedPropertyDescriptor<Y>) => void;
@@ -2,4 +2,4 @@ export declare const RETRIEVER_STRATEGY = "RETRIEVER_STRATEGY";
2
2
  /**
3
3
  * Decorator to mark a provider as a Retriever Strategy
4
4
  */
5
- export declare const RetrieverStrategy: (provider: string) => <TFunction extends Function, Y>(target: object | TFunction, propertyKey?: string | symbol, descriptor?: TypedPropertyDescriptor<Y>) => void;
5
+ export declare const RetrieverStrategy: (provider: string) => <TFunction extends Function, Y>(target: TFunction | object, propertyKey?: string | symbol, descriptor?: TypedPropertyDescriptor<Y>) => void;
@@ -2,4 +2,4 @@ export declare const DOCUMENT_SOURCE_STRATEGY = "DOCUMENT_SOURCE_STRATEGY";
2
2
  /**
3
3
  * Decorator to mark a provider as a Document Source Strategy
4
4
  */
5
- export declare const DocumentSourceStrategy: (provider: string) => <TFunction extends Function, Y>(target: object | TFunction, propertyKey?: string | symbol, descriptor?: TypedPropertyDescriptor<Y>) => void;
5
+ export declare const DocumentSourceStrategy: (provider: string) => <TFunction extends Function, Y>(target: TFunction | object, propertyKey?: string | symbol, descriptor?: TypedPropertyDescriptor<Y>) => void;
@@ -1,2 +1,2 @@
1
1
  export declare const TEXT_SPLITTER_STRATEGY = "TEXT_SPLITTER_STRATEGY";
2
- export declare const TextSplitterStrategy: (provider: string) => <TFunction extends Function, Y>(target: object | TFunction, propertyKey?: string | symbol, descriptor?: TypedPropertyDescriptor<Y>) => void;
2
+ export declare const TextSplitterStrategy: (provider: string) => <TFunction extends Function, Y>(target: TFunction | object, propertyKey?: string | symbol, descriptor?: TypedPropertyDescriptor<Y>) => void;
@@ -2,4 +2,4 @@ export declare const DOCUMENT_TRANSFORMER_STRATEGY = "DOCUMENT_TRANSFORMER_STRAT
2
2
  /**
3
3
  * Decorator to mark a provider as a Document Transformer Strategy
4
4
  */
5
- export declare const DocumentTransformerStrategy: (provider: string) => <TFunction extends Function, Y>(target: object | TFunction, propertyKey?: string | symbol, descriptor?: TypedPropertyDescriptor<Y>) => void;
5
+ export declare const DocumentTransformerStrategy: (provider: string) => <TFunction extends Function, Y>(target: TFunction | object, propertyKey?: string | symbol, descriptor?: TypedPropertyDescriptor<Y>) => void;
@@ -1,3 +1,4 @@
1
+ import { IBackendProtocol, TSandboxConfigurable } from '@metad/contracts';
1
2
  import type { SandboxExecutionOptions } from './execution';
2
3
  /**
3
4
  * Protocol definition for pluggable memory backends.
@@ -190,7 +191,7 @@ export interface FileUploadResponse {
190
191
  * Methods can return either direct values or Promises, allowing both
191
192
  * synchronous and asynchronous implementations.
192
193
  */
193
- export interface BackendProtocol {
194
+ export interface BackendProtocol extends IBackendProtocol {
194
195
  /**
195
196
  * Structured listing with file metadata.
196
197
  *
@@ -343,14 +344,11 @@ export interface SandboxBackendProtocol extends BackendProtocol {
343
344
  streamExecute?(command: string, onLine: (line: string) => void, options?: SandboxExecutionOptions): MaybePromise<ExecuteResponse>;
344
345
  /** Unique identifier for the sandbox backend instance */
345
346
  readonly id: string;
347
+ /** Canonical sandbox environment identifier bound to this backend */
348
+ readonly environmentId?: string | null;
346
349
  }
347
- /**
348
- * Type guard to check if a backend supports execution.
349
- *
350
- * @param backend - Backend instance to check
351
- * @returns True if the backend implements SandboxBackendProtocol
352
- */
353
- export declare function isSandboxBackend(backend: BackendProtocol): backend is SandboxBackendProtocol;
350
+ export declare function isSandboxBackend(backend: unknown): backend is SandboxBackendProtocol;
351
+ export declare function resolveSandboxBackend(sandbox: TSandboxConfigurable | SandboxBackendProtocol | null | undefined | unknown): SandboxBackendProtocol | null;
354
352
  /**
355
353
  * State and store container for backend initialization.
356
354
  *
@@ -22,6 +22,12 @@ export declare abstract class BaseSandbox implements SandboxBackendProtocol {
22
22
  workingDirectory: string;
23
23
  /** Unique identifier for the sandbox backend */
24
24
  abstract readonly id: string;
25
+ /**
26
+ * Internal hook for file/search operations. Concrete backends can override
27
+ * this to distinguish "background helper commands" from user-facing shell
28
+ * execute calls.
29
+ */
30
+ protected executeOperation(command: string, options?: SandboxExecutionOptions): MaybePromise<ExecuteResponse>;
25
31
  /**
26
32
  * Execute a command in the sandbox.
27
33
  * This is the only method concrete implementations must provide.
@@ -1,2 +1,2 @@
1
1
  export declare const SANDBOX_PROVIDER = "SANDBOX_PROVIDER";
2
- export declare const SandboxProviderStrategy: (provider: string) => <TFunction extends Function, Y>(target: object | TFunction, propertyKey?: string | symbol, descriptor?: TypedPropertyDescriptor<Y>) => void;
2
+ export declare const SandboxProviderStrategy: (provider: string) => <TFunction extends Function, Y>(target: TFunction | object, propertyKey?: string | symbol, descriptor?: TypedPropertyDescriptor<Y>) => void;
@@ -1,26 +1,22 @@
1
- import { TSandboxProviderMeta } from "@metad/contracts";
2
- import { SandboxBackendProtocol } from "./protocol";
1
+ import { TSandboxProviderMeta, TSandboxWorkForType } from '@metad/contracts';
2
+ import { SandboxBackendProtocol } from './protocol';
3
3
  export type SandboxProviderCreateOptions = {
4
4
  /**
5
5
  * Working space directory for the sandbox instance
6
6
  */
7
7
  workingDirectory?: string;
8
8
  /**
9
- * Sandbox container environment identifier
9
+ * Canonical sandbox environment identifier that owns the container lifecycle.
10
10
  */
11
11
  environmentId?: string;
12
12
  /**
13
13
  * Tenant identifier
14
14
  */
15
15
  tenantId?: string;
16
- /**
17
- * User identifier
18
- */
19
- userId?: string;
20
- /**
21
- * Project identifier
22
- */
23
- projectId?: string;
16
+ workFor: {
17
+ type: TSandboxWorkForType;
18
+ id: string;
19
+ };
24
20
  };
25
21
  export interface ISandboxProvider<T extends SandboxBackendProtocol = SandboxBackendProtocol> {
26
22
  type: string;
@@ -1,6 +1,6 @@
1
- import { OnModuleInit } from "@nestjs/common";
2
- import { DiscoveryService, Reflector } from "@nestjs/core";
3
- import { StrategyBus } from "./core/strategy-bus";
1
+ import { OnModuleInit } from '@nestjs/common';
2
+ import { DiscoveryService, Reflector } from '@nestjs/core';
3
+ import { StrategyBus } from './core/strategy-bus';
4
4
  export declare class BaseStrategyRegistry<S> implements OnModuleInit {
5
5
  protected readonly strategyKey: string;
6
6
  protected discoveryService: DiscoveryService;
@@ -2,4 +2,4 @@ export declare const TOOLSET_STRATEGY = "TOOLSET_STRATEGY";
2
2
  /**
3
3
  * Decorator to mark a provider as a Toolset Strategy
4
4
  */
5
- export declare const ToolsetStrategy: (provider: string) => <TFunction extends Function, Y>(target: object | TFunction, propertyKey?: string | symbol, descriptor?: TypedPropertyDescriptor<Y>) => void;
5
+ export declare const ToolsetStrategy: (provider: string) => <TFunction extends Function, Y>(target: TFunction | object, propertyKey?: string | symbol, descriptor?: TypedPropertyDescriptor<Y>) => void;
@@ -1,2 +1,2 @@
1
1
  export declare const VECTOR_STORE_STRATEGY = "VECTOR_STORE_STRATEGY";
2
- export declare const VectorStoreStrategy: (provider: string) => <TFunction extends Function, Y>(target: object | TFunction, propertyKey?: string | symbol, descriptor?: TypedPropertyDescriptor<Y>) => void;
2
+ export declare const VectorStoreStrategy: (provider: string) => <TFunction extends Function, Y>(target: TFunction | object, propertyKey?: string | symbol, descriptor?: TypedPropertyDescriptor<Y>) => void;
@@ -0,0 +1,3 @@
1
+ export * from './provider.decorator';
2
+ export * from './provider.interface';
3
+ export * from './provider.registry';
@@ -0,0 +1,2 @@
1
+ export declare const VIEW_EXTENSION_PROVIDER = "VIEW_EXTENSION_PROVIDER";
2
+ export declare const ViewExtensionProvider: (providerKey: string) => <TFunction extends Function, Y>(target: TFunction | object, propertyKey?: string | symbol, descriptor?: TypedPropertyDescriptor<Y>) => void;
@@ -0,0 +1,7 @@
1
+ import { XpertExtensionViewManifest, XpertResolvedViewHostContext, XpertViewActionRequest, XpertViewActionResult, XpertViewDataResult, XpertViewQuery } from '@metad/contracts';
2
+ export interface IXpertViewExtensionProvider {
3
+ supports(context: XpertResolvedViewHostContext): Promise<boolean> | boolean;
4
+ getViewManifests(context: XpertResolvedViewHostContext, slot: string): Promise<XpertExtensionViewManifest[]> | XpertExtensionViewManifest[];
5
+ getViewData(context: XpertResolvedViewHostContext, viewKey: string, query: XpertViewQuery): Promise<XpertViewDataResult> | XpertViewDataResult;
6
+ executeViewAction?(context: XpertResolvedViewHostContext, viewKey: string, actionKey: string, request: XpertViewActionRequest): Promise<XpertViewActionResult> | XpertViewActionResult;
7
+ }
@@ -0,0 +1,10 @@
1
+ import { DiscoveryService, Reflector } from '@nestjs/core';
2
+ import { BaseStrategyRegistry } from '../strategy';
3
+ import { IXpertViewExtensionProvider } from './provider.interface';
4
+ export declare class ViewExtensionProviderRegistry extends BaseStrategyRegistry<IXpertViewExtensionProvider> {
5
+ constructor(discoveryService: DiscoveryService, reflector: Reflector);
6
+ listEntries(organizationId?: string): Array<{
7
+ providerKey: string;
8
+ provider: IXpertViewExtensionProvider;
9
+ }>;
10
+ }
@@ -2,4 +2,4 @@ export declare const WORKFLOW_NODE_STRATEGY = "WORKFLOW_NODE_STRATEGY";
2
2
  /**
3
3
  * Decorator to mark a provider as a Workflow Node Strategy
4
4
  */
5
- export declare const WorkflowNodeStrategy: (provider: string) => <TFunction extends Function, Y>(target: object | TFunction, propertyKey?: string | symbol, descriptor?: TypedPropertyDescriptor<Y>) => void;
5
+ export declare const WorkflowNodeStrategy: (provider: string) => <TFunction extends Function, Y>(target: TFunction | object, propertyKey?: string | symbol, descriptor?: TypedPropertyDescriptor<Y>) => void;
@@ -1,2 +1,2 @@
1
1
  export declare const WORKFLOW_TRIGGER_STRATEGY = "WORKFLOW_TRIGGER_STRATEGY";
2
- export declare const WorkflowTriggerStrategy: (provider: string) => <TFunction extends Function, Y>(target: object | TFunction, propertyKey?: string | symbol, descriptor?: TypedPropertyDescriptor<Y>) => void;
2
+ export declare const WorkflowTriggerStrategy: (provider: string) => <TFunction extends Function, Y>(target: TFunction | object, propertyKey?: string | symbol, descriptor?: TypedPropertyDescriptor<Y>) => void;
package/index.esm.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from "./src/index";
File without changes