plugin-agent-orchestrator 1.0.15 → 1.0.17

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 (66) hide show
  1. package/README.md +96 -0
  2. package/dist/externalVersion.js +6 -6
  3. package/dist/server/plugin.js +11 -1
  4. package/dist/server/services/SkillManager.js +0 -39
  5. package/dist/server/skill-hub/plugin.js +3 -3
  6. package/dist/server/tools/delegate-task.js +60 -4
  7. package/dist/server/tools/external-rag-search.js +140 -0
  8. package/dist/server/tools/skill-execute.js +1 -2
  9. package/package.json +2 -2
  10. package/src/server/plugin.ts +104 -94
  11. package/src/server/services/SkillManager.ts +13 -53
  12. package/src/server/skill-hub/plugin.ts +3 -3
  13. package/src/server/tools/delegate-task.ts +77 -6
  14. package/src/server/tools/external-rag-search.ts +128 -0
  15. package/src/server/tools/skill-execute.ts +1 -2
  16. package/dist/client/AIEmployeeSelect.d.ts +0 -11
  17. package/dist/client/AIEmployeesContext.d.ts +0 -30
  18. package/dist/client/OrchestratorSettings.d.ts +0 -3
  19. package/dist/client/RulesTab.d.ts +0 -2
  20. package/dist/client/TracingTab.d.ts +0 -2
  21. package/dist/client/index.d.ts +0 -1
  22. package/dist/client/plugin.d.ts +0 -6
  23. package/dist/client/skill-hub/components/ExecutionHistory.d.ts +0 -2
  24. package/dist/client/skill-hub/components/ExecutionProgress.d.ts +0 -20
  25. package/dist/client/skill-hub/components/GitSkillImport.d.ts +0 -7
  26. package/dist/client/skill-hub/components/SkillEditor.d.ts +0 -7
  27. package/dist/client/skill-hub/components/SkillManager.d.ts +0 -2
  28. package/dist/client/skill-hub/components/SkillMetrics.d.ts +0 -2
  29. package/dist/client/skill-hub/components/SkillTestPanel.d.ts +0 -7
  30. package/dist/client/skill-hub/index.d.ts +0 -10
  31. package/dist/client/skill-hub/locale.d.ts +0 -3
  32. package/dist/client/skill-hub/tools/InteractionSchemasProvider.d.ts +0 -19
  33. package/dist/client/skill-hub/tools/SkillHubCard.d.ts +0 -3
  34. package/dist/client/skill-hub/utils/jsonFields.d.ts +0 -3
  35. package/dist/index.d.ts +0 -2
  36. package/dist/server/collections/agent-execution-spans.d.ts +0 -9
  37. package/dist/server/collections/orchestrator-config.d.ts +0 -2
  38. package/dist/server/collections/orchestrator-logs.d.ts +0 -8
  39. package/dist/server/collections/skill-definitions.d.ts +0 -2
  40. package/dist/server/collections/skill-executions.d.ts +0 -2
  41. package/dist/server/collections/skill-worker-configs.d.ts +0 -2
  42. package/dist/server/index.d.ts +0 -1
  43. package/dist/server/migrations/20260423000000-add-progress-fields.d.ts +0 -4
  44. package/dist/server/migrations/20260425000000-add-interaction-schema.d.ts +0 -4
  45. package/dist/server/migrations/20260427000000-add-tracing-detail-fields.d.ts +0 -7
  46. package/dist/server/migrations/20260427000000-change-packages-to-text.d.ts +0 -4
  47. package/dist/server/migrations/20260427000001-change-other-json-to-text.d.ts +0 -4
  48. package/dist/server/migrations/20260429000000-add-llm-fields.d.ts +0 -7
  49. package/dist/server/migrations/20260429000000-fix-inputargs-json-to-text.d.ts +0 -16
  50. package/dist/server/migrations/20260503000000-add-orchestrator-trace-fields.d.ts +0 -7
  51. package/dist/server/plugin.d.ts +0 -14
  52. package/dist/server/resources/tracing.d.ts +0 -7
  53. package/dist/server/services/CodeValidator.d.ts +0 -32
  54. package/dist/server/services/ExecutionSpanService.d.ts +0 -44
  55. package/dist/server/services/FileManager.d.ts +0 -28
  56. package/dist/server/services/SandboxRunner.d.ts +0 -41
  57. package/dist/server/services/SkillManager.d.ts +0 -6
  58. package/dist/server/services/SkillRepositoryService.d.ts +0 -22
  59. package/dist/server/services/WorkerEnvManager.d.ts +0 -26
  60. package/dist/server/skill-hub/actions/git-import.d.ts +0 -21
  61. package/dist/server/skill-hub/mcp/McpController.d.ts +0 -15
  62. package/dist/server/skill-hub/plugin.d.ts +0 -58
  63. package/dist/server/skill-hub/tasks/SkillExecutionTask.d.ts +0 -16
  64. package/dist/server/skill-hub/utils/json-fields.d.ts +0 -7
  65. package/dist/server/tools/delegate-task.d.ts +0 -19
  66. package/dist/server/tools/skill-execute.d.ts +0 -36
@@ -1,20 +0,0 @@
1
- import React from 'react';
2
- interface ExecutionProgressProps {
3
- execId: string;
4
- skillName: string;
5
- percent: number;
6
- log: string;
7
- }
8
- /**
9
- * Progress component rendered inside chat UI when receiving
10
- * SSE custom event: {action: "skillProgress", body: {...}}
11
- *
12
- * Usage in chat message renderer:
13
- * ```
14
- * if (event.action === 'skillProgress') {
15
- * return <ExecutionProgress {...event.body} />;
16
- * }
17
- * ```
18
- */
19
- export declare const ExecutionProgress: React.FC<ExecutionProgressProps>;
20
- export {};
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- interface GitSkillImportProps {
3
- open: boolean;
4
- onClose: (synced?: boolean) => void;
5
- }
6
- export declare const GitSkillImport: React.FC<GitSkillImportProps>;
7
- export {};
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- interface SkillEditorProps {
3
- skill: any | null;
4
- onClose: (saved?: boolean) => void;
5
- }
6
- export declare const SkillEditor: React.FC<SkillEditorProps>;
7
- export {};
@@ -1,2 +0,0 @@
1
- import React from 'react';
2
- export declare const SkillManager: React.FC;
@@ -1,2 +0,0 @@
1
- import React from 'react';
2
- export declare const SkillMetrics: React.FC;
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- interface SkillTestPanelProps {
3
- skill: any;
4
- onClose: () => void;
5
- }
6
- export declare const SkillTestPanel: React.FC<SkillTestPanelProps>;
7
- export {};
@@ -1,10 +0,0 @@
1
- import { Plugin } from '@nocobase/client';
2
- import { SkillManager } from './components/SkillManager';
3
- import { ExecutionHistory } from './components/ExecutionHistory';
4
- import { SkillMetrics } from './components/SkillMetrics';
5
- export declare class PluginSkillHubClient extends Plugin {
6
- load(): Promise<void>;
7
- private registerSkillUiCards;
8
- }
9
- export { SkillManager, ExecutionHistory, SkillMetrics };
10
- export default PluginSkillHubClient;
@@ -1,3 +0,0 @@
1
- export declare const namespace = "plugin-agent-orchestrator";
2
- export declare function useT(): (str: string, options?: any) => string;
3
- export declare function tStr(key: string): string;
@@ -1,19 +0,0 @@
1
- import React from 'react';
2
- export type InteractionSchema = {
3
- type: 'form' | 'select' | 'confirm';
4
- prompt: string;
5
- options?: {
6
- label: string;
7
- value: string | number;
8
- }[];
9
- fields?: Record<string, {
10
- type?: string;
11
- title?: string;
12
- required?: boolean;
13
- enum?: any[];
14
- }>;
15
- };
16
- export declare const useInteractionSchemas: () => Map<string, InteractionSchema>;
17
- export declare const InteractionSchemasProvider: React.FC<{
18
- children?: React.ReactNode;
19
- }>;
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- import { ToolsUIProperties } from '@nocobase/client';
3
- export declare const SkillHubCard: React.FC<ToolsUIProperties>;
@@ -1,3 +0,0 @@
1
- export declare function parseJsonText<T = any>(value: any, fallback: T): T;
2
- export declare function formatJsonText(value: any, fallback?: any): string;
3
- export declare function stringifyJsonText(value: any, fallback?: any): string;
package/dist/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from './server';
2
- export { default } from './server';
@@ -1,9 +0,0 @@
1
- /**
2
- * Unified execution graph for agent orchestration.
3
- *
4
- * A root run can contain sub-agent spans and child tool/skill spans. Skill Hub
5
- * keeps its own sandbox execution records; this collection stores the flow
6
- * relationship and links to those records when applicable.
7
- */
8
- declare const _default: any;
9
- export default _default;
@@ -1,2 +0,0 @@
1
- declare const _default: any;
2
- export default _default;
@@ -1,8 +0,0 @@
1
- /**
2
- * Stores delegation execution logs for Swarm Tracing (Phase 5).
3
- *
4
- * Since createReactAgent doesn't create aiConversation records,
5
- * we log delegation events to a dedicated table for observability.
6
- */
7
- declare const _default: any;
8
- export default _default;
@@ -1,2 +0,0 @@
1
- declare const _default: CollectionOptions;
2
- export default _default;
@@ -1,2 +0,0 @@
1
- declare const _default: CollectionOptions;
2
- export default _default;
@@ -1,2 +0,0 @@
1
- declare const _default: CollectionOptions;
2
- export default _default;
@@ -1 +0,0 @@
1
- export { default } from './plugin';
@@ -1,4 +0,0 @@
1
- import { Migration } from '@nocobase/server';
2
- export default class AddProgressFieldsMigration extends Migration {
3
- up(): Promise<void>;
4
- }
@@ -1,4 +0,0 @@
1
- import { Migration } from '@nocobase/server';
2
- export default class AddInteractionSchemaMigration extends Migration {
3
- up(): Promise<void>;
4
- }
@@ -1,7 +0,0 @@
1
- import { Migration } from '@nocobase/server';
2
- export default class AddTracingDetailFieldsMigration extends Migration {
3
- on: string;
4
- appVersion: string;
5
- up(): Promise<void>;
6
- down(): Promise<void>;
7
- }
@@ -1,4 +0,0 @@
1
- import { Migration } from '@nocobase/server';
2
- export default class ChangePackagesToTextMigration extends Migration {
3
- up(): Promise<void>;
4
- }
@@ -1,4 +0,0 @@
1
- import { Migration } from '@nocobase/server';
2
- export default class ChangeOtherJsonToTextMigration extends Migration {
3
- up(): Promise<void>;
4
- }
@@ -1,7 +0,0 @@
1
- import { Migration } from '@nocobase/server';
2
- export default class AddLlmFieldsToOrchestratorConfig extends Migration {
3
- on: string;
4
- appVersion: string;
5
- up(): Promise<void>;
6
- down(): Promise<void>;
7
- }
@@ -1,16 +0,0 @@
1
- import { Migration } from '@nocobase/server';
2
- /**
3
- * Fix: inputArgs column in skillExecutions was json type but should be text.
4
- *
5
- * Root cause: The column was created as `json` from an older schema version,
6
- * but the collection defines it as `text`. The `stringifyJsonText()` utility
7
- * wraps values in markdown code fences (```json\n...\n```) which PostgreSQL
8
- * rejects as invalid JSON syntax, causing SequelizeDatabaseError on every
9
- * skill execution attempt.
10
- */
11
- export default class FixInputArgsJsonToText extends Migration {
12
- on: string;
13
- appVersion: string;
14
- up(): Promise<void>;
15
- down(): Promise<void>;
16
- }
@@ -1,7 +0,0 @@
1
- import { Migration } from '@nocobase/server';
2
- export default class AddOrchestratorTraceFieldsToSkillExecutions extends Migration {
3
- on: string;
4
- appVersion: string;
5
- up(): Promise<void>;
6
- down(): Promise<void>;
7
- }
@@ -1,14 +0,0 @@
1
- import { Plugin } from '@nocobase/server';
2
- import SkillHubSubFeature from './skill-hub/plugin';
3
- export declare class PluginAgentOrchestratorServer extends Plugin {
4
- skillHub: SkillHubSubFeature;
5
- afterAdd(): Promise<void>;
6
- beforeLoad(): Promise<void>;
7
- load(): Promise<void>;
8
- install(): Promise<void>;
9
- afterEnable(): Promise<void>;
10
- afterDisable(): Promise<void>;
11
- remove(): Promise<void>;
12
- beforeStop(): Promise<void>;
13
- }
14
- export default PluginAgentOrchestratorServer;
@@ -1,7 +0,0 @@
1
- import { Plugin } from '@nocobase/server';
2
- /**
3
- * Custom resource for the Swarm Tracing admin UI (Phase 5).
4
- * Queries the dedicated orchestratorLogs collection instead of
5
- * filtering aiConversations by JSONB (P2 fix: DB-engine agnostic).
6
- */
7
- export declare function registerTracingResource(plugin: Plugin): void;
@@ -1,32 +0,0 @@
1
- export declare class CodeValidator {
2
- /**
3
- * Check code against forbidden patterns (dangerous modules/functions).
4
- * @throws CodeValidationError if a forbidden pattern is found.
5
- */
6
- validate(code: string, language: 'node' | 'python'): void;
7
- /**
8
- * Validate that code only imports packages in the whitelist.
9
- * Called after the basic forbidden pattern check.
10
- * Skips validation if whitelist is empty (env not initialized yet).
11
- *
12
- * @param code - The code to validate
13
- * @param language - 'node' or 'python'
14
- * @param whitelist - Array of allowed package names (from skillWorkerConfigs.packageWhitelist)
15
- */
16
- validateImports(code: string, language: 'node' | 'python', whitelist: string[]): void;
17
- /**
18
- * Check Node.js require() calls against the whitelist.
19
- * Built-in modules (fs, path, etc.) are always allowed.
20
- */
21
- private validateNodeImports;
22
- /**
23
- * Check Python import/from statements against the whitelist.
24
- * Built-in modules (os, sys, json, etc.) are always allowed.
25
- * Handles PyPI→import name mapping (e.g., python-docx → docx, Pillow → PIL).
26
- */
27
- private validatePythonImports;
28
- }
29
- export declare class CodeValidationError extends Error {
30
- matchedPattern: string;
31
- constructor(message: string, matchedPattern: string);
32
- }
@@ -1,44 +0,0 @@
1
- export declare const ORCHESTRATOR_TRACE_CONTEXT_KEY = "__orchestratorTraceContext";
2
- export type OrchestratorTraceContext = {
3
- rootRunId: string;
4
- spanId?: string;
5
- parentSpanId?: string;
6
- toolCallId?: string;
7
- leaderUsername?: string;
8
- employeeUsername?: string;
9
- toolName?: string;
10
- };
11
- type SpanValues = {
12
- rootRunId: string;
13
- parentSpanId?: string;
14
- type: string;
15
- status: string;
16
- leaderUsername?: string;
17
- employeeUsername?: string;
18
- toolName?: string;
19
- title?: string;
20
- input?: any;
21
- output?: string;
22
- error?: string;
23
- durationMs?: number;
24
- startedAt?: Date;
25
- endedAt?: Date;
26
- orchestratorLogId?: string | number;
27
- skillExecutionId?: string | number;
28
- metadata?: any;
29
- userId?: string | number;
30
- };
31
- export declare class ExecutionSpanService {
32
- private readonly plugin;
33
- constructor(plugin: any);
34
- create(values: SpanValues): Promise<any>;
35
- update(spanId: string | number | undefined, values: Record<string, any>): Promise<{
36
- id: string | number;
37
- }>;
38
- finish(spanId: string | number | undefined, status: 'success' | 'error' | 'canceled' | 'timeout', startedAt: number, values?: Record<string, any>): Promise<{
39
- id: string | number;
40
- }>;
41
- }
42
- export declare function getOrchestratorTraceContext(ctx: any): OrchestratorTraceContext | null;
43
- export declare function setOrchestratorTraceContext(ctx: any, traceContext: OrchestratorTraceContext): any;
44
- export {};
@@ -1,28 +0,0 @@
1
- export interface OutputFileInfo {
2
- name: string;
3
- size: number;
4
- mimeType: string;
5
- }
6
- export declare class FileManager {
7
- private storagePath;
8
- private executionsDir;
9
- constructor(storagePath: string);
10
- createExecDir(execId: string): string;
11
- getExecDir(execId: string): string;
12
- getOutputDir(execId: string): string;
13
- /**
14
- * Returns absolute path to an output file, or null if invalid/not found.
15
- * Includes path traversal protection.
16
- */
17
- getOutputFilePath(execId: string, filename: string): string | null;
18
- listOutputFiles(execId: string): OutputFileInfo[];
19
- getTotalOutputSize(execId: string): number;
20
- /**
21
- * Remove a specific execution directory by execId.
22
- */
23
- removeExecDir(execId: string): void;
24
- /**
25
- * Remove execution directories older than maxAgeMs.
26
- */
27
- cleanupOlderThan(maxAgeMs: number): number;
28
- }
@@ -1,41 +0,0 @@
1
- import { FileManager, OutputFileInfo } from './FileManager';
2
- export interface ExecuteOptions {
3
- language: 'node' | 'python';
4
- code: string;
5
- execId: string;
6
- timeoutSeconds?: number;
7
- maxOutputSizeMb?: number;
8
- onProgress?: (progress: ProgressUpdate) => void;
9
- /** AbortSignal — when aborted, the child process is killed */
10
- signal?: {
11
- addEventListener(event: string, listener: () => void): void;
12
- };
13
- /** Package whitelist for import validation (from skillWorkerConfigs) */
14
- packageWhitelist?: string[];
15
- /** Optional installed/copied skill package root exposed to the runtime as SKILL_DIR. */
16
- skillDir?: string;
17
- }
18
- export interface ProgressUpdate {
19
- percent: number;
20
- log: string;
21
- }
22
- export interface ExecutionResult {
23
- success: boolean;
24
- stdout: string;
25
- stderr: string;
26
- files: OutputFileInfo[];
27
- durationMs: number;
28
- /** true if execution was canceled by user */
29
- canceled?: boolean;
30
- /** true if execution timed out */
31
- timedOut?: boolean;
32
- }
33
- export declare class SandboxRunner {
34
- private fileManager;
35
- private logger;
36
- private storagePath;
37
- private validator;
38
- private sandboxWorkspace;
39
- constructor(fileManager: FileManager, logger: any, storagePath: string);
40
- execute(options: ExecuteOptions): Promise<ExecutionResult>;
41
- }
@@ -1,6 +0,0 @@
1
- import { Database } from '@nocobase/database';
2
- export declare class SkillManager {
3
- private db;
4
- constructor(db: Database);
5
- seedDefaults(): Promise<void>;
6
- }
@@ -1,22 +0,0 @@
1
- export interface SkillPackageMetadata {
2
- path: string;
3
- metadata: Record<string, any>;
4
- instructions: string;
5
- code: string | null;
6
- }
7
- export declare class SkillRepositoryService {
8
- private baseDir;
9
- constructor(storagePath: string);
10
- /**
11
- * Extract a zip file to the repository.
12
- * Returns parsed metadata from SKILL.md / skill.yaml
13
- */
14
- extractSkillPackage(skillName: string, zipFilePath: string): Promise<SkillPackageMetadata>;
15
- getSkillPath(skillName: string): string;
16
- getSkillCode(skillName: string): string | null;
17
- copySkillPackageTo(skillName: string, destDir: string): void;
18
- readSkillPackage(packageDir: string): SkillPackageMetadata;
19
- copyDirectoryTo(srcDir: string, destDir: string): void;
20
- private getSkillCodeFromDir;
21
- private aggregateOtherMarkdownFiles;
22
- }
@@ -1,26 +0,0 @@
1
- import Application from '@nocobase/server';
2
- import { Database } from '@nocobase/database';
3
- type WorkerEnvConfig = {
4
- npmRegistryUrl?: string;
5
- npmAuthToken?: string;
6
- pypiIndexUrl?: string;
7
- pypiTrustedHost?: string;
8
- aptMirrorUrl?: string;
9
- aptGpgKeyUrl?: string;
10
- customPackages?: {
11
- python?: string[];
12
- node?: string[];
13
- apt?: string[];
14
- };
15
- };
16
- export declare class WorkerEnvManager {
17
- private readonly app;
18
- private readonly db;
19
- private readonly storagePath;
20
- constructor(app: Application, db: Database, storagePath: string);
21
- getOrCreateConfig(): Promise<any>;
22
- initEnvironment(config: WorkerEnvConfig): Promise<string>;
23
- executeInit(payload: WorkerEnvConfig): Promise<void>;
24
- parsePackageWhitelist(config: any): Record<"node" | "python" | "apt", string[]>;
25
- }
26
- export {};
@@ -1,21 +0,0 @@
1
- import { Context } from '@nocobase/actions';
2
- /**
3
- * Git integration actions for skill-hub.
4
- *
5
- * Supported manifest shape:
6
- * {
7
- * "skills": [
8
- * { "folder": "my-skill", "name": "my-skill", "language": "python" },
9
- * { "name": "pptx-advanced-export", "storageType": "plugin", "pluginSource": "pptx-advanced-export" }
10
- * ]
11
- * }
12
- */
13
- export declare function gitListSkills(ctx: Context, next: () => Promise<void>): Promise<void>;
14
- /**
15
- * Sync selected skills from git into skillDefinitions.
16
- *
17
- * Code is optional. Regular git skills may provide code via codeTemplate,
18
- * codeFile, or conventional files under skills/<folder>. Plugin skills only
19
- * need storageType=plugin and pluginSource.
20
- */
21
- export declare function gitSyncSkills(ctx: Context, next: () => Promise<void>): Promise<void>;
@@ -1,15 +0,0 @@
1
- import type PluginSkillHubServer from '../plugin';
2
- export declare class McpController {
3
- private plugin;
4
- constructor(plugin: PluginSkillHubServer);
5
- /**
6
- * List all enabled skills in standard MCP format.
7
- * Route: GET /api/skillHub:mcpListTools
8
- */
9
- listTools(ctx: any, next: any): Promise<void>;
10
- /**
11
- * Execute a skill in standard MCP format.
12
- * Route: POST /api/skillHub:mcpCallTool
13
- */
14
- callTool(ctx: any, next: any): Promise<void>;
15
- }
@@ -1,58 +0,0 @@
1
- import { SandboxRunner } from '../services/SandboxRunner';
2
- import { FileManager } from '../services/FileManager';
3
- import { SkillManager } from '../services/SkillManager';
4
- import { WorkerEnvManager } from '../services/WorkerEnvManager';
5
- export declare class SkillHubSubFeature {
6
- private plugin;
7
- sandboxRunner: SandboxRunner;
8
- fileManager: FileManager;
9
- skillManager: SkillManager;
10
- workerEnvManager: WorkerEnvManager;
11
- private cleanupInterval;
12
- private initEnvDoneCallback;
13
- private initEnvProgressCallback;
14
- private mcpController;
15
- private skillRepoService;
16
- private rateLimiter;
17
- private skillTemplates;
18
- constructor(plugin: any);
19
- get app(): any;
20
- get db(): any;
21
- get name(): any;
22
- load(): Promise<void>;
23
- private onQueueTask;
24
- /**
25
- * Execute skill — called by both AI tool and REST test endpoint.
26
- * Dispatches to worker via EventQueue, waits for result via PubSub.
27
- * Pushes progress to SSE via runtime.writer (if within AI tool context).
28
- * Includes rate limiting and graceful abort propagation.
29
- */
30
- executeSkill(skill: any, inputArgs: Record<string, any>, ctx?: any): Promise<any>;
31
- private handleDownload;
32
- private handleTest;
33
- /**
34
- * Handle Init Environment request from admin UI.
35
- * Dispatches init task to all workers via EventQueue.
36
- */
37
- private handleInitEnv;
38
- /**
39
- * Subscribe to init-env done AND progress PubSub channels.
40
- * When a worker finishes init, auto-update the DB with status.
41
- */
42
- private subscribeInitEnvDone;
43
- private registerAITools;
44
- private startCleanupInterval;
45
- beforeStop(): Promise<void>;
46
- private handleClearStorage;
47
- private handleListTemplates;
48
- /**
49
- * Register a skill template into memory for UI importing.
50
- */
51
- registerSkillTemplate(pluginName: string, skillDef: any): void;
52
- resolveSkillTemplate(templateName: string): any;
53
- getSkillDescriptionForAI(skill: any): Promise<string>;
54
- getSkillInstructions(skill: any): Promise<any>;
55
- private hydrateSkillTemplate;
56
- install(): Promise<void>;
57
- }
58
- export default SkillHubSubFeature;
@@ -1,16 +0,0 @@
1
- import Application from '@nocobase/server';
2
- import { SandboxRunner } from '../../services/SandboxRunner';
3
- import { FileManager } from '../../services/FileManager';
4
- import { SkillRepositoryService } from '../../services/SkillRepositoryService';
5
- export declare class SkillExecutionTask {
6
- private execution;
7
- private sandboxRunner;
8
- private fileManager;
9
- private skillRepoService;
10
- private app;
11
- constructor(execution: any, sandboxRunner: SandboxRunner, fileManager: FileManager, skillRepoService: SkillRepositoryService, app: Application);
12
- run(): Promise<void>;
13
- private renderTemplate;
14
- private installGeneratedSkillIfRequested;
15
- private validateGeneratedSkillPackages;
16
- }
@@ -1,7 +0,0 @@
1
- export declare function parseJsonText<T = any>(value: any, fallback: T): T;
2
- export declare function stringifyJsonText(value: any, fallback?: any): string;
3
- export declare function parseJsonLike(value: any, fallback: any): any;
4
- export declare function parseSkillMarkdown(markdown: string): {
5
- metadata: Record<string, any>;
6
- body: string;
7
- };
@@ -1,19 +0,0 @@
1
- /**
2
- * Creates one dynamic tool per configured sub-agent for a given leader.
3
- * Uses Strategy B (Per-SubAgent Tool): each sub-agent becomes a separate tool
4
- * with its own name and description, making LLM tool selection natural.
5
- *
6
- * Architecture:
7
- * - Uses createReactAgent (public LangGraph API) for agent execution
8
- * - Uses plugin-ai's getLLMService() for LLM model resolution
9
- * - Uses core app.aiManager.toolsManager.listTools() for tool resolution
10
- * (same manager that AIEmployee uses — see ai-employee.ts:1286)
11
- * - Depth enforcement via ctx metadata tracking
12
- * - Per-leader scoping via invoke-time check (core ToolsOptions has no
13
- * leaderUsername field, so scoping is enforced in the invoke callback)
14
- */
15
- export declare function createDelegateToolsProvider(plugin: any): (register: any) => Promise<void>;
16
- /**
17
- * Test/internal helper to drop the in-memory tool cache (e.g., from a CLI op).
18
- */
19
- export declare function invalidateDelegateToolsCache(): void;
@@ -1,36 +0,0 @@
1
- export declare function createSkillExecuteTool(plugin: any): {
2
- scope: string;
3
- execution: string;
4
- defaultPermission: string;
5
- introduction: {
6
- title: string;
7
- about: string;
8
- };
9
- definition: {
10
- name: string;
11
- description: string;
12
- schema: {
13
- type: string;
14
- properties: {
15
- action: {
16
- type: string;
17
- enum: string[];
18
- description: string;
19
- };
20
- skillName: {
21
- type: string;
22
- description: string;
23
- };
24
- input: {
25
- type: string;
26
- description: string;
27
- };
28
- };
29
- required: string[];
30
- };
31
- };
32
- invoke(args: Record<string, any>, options?: any): Promise<{
33
- status: string;
34
- content: string;
35
- }>;
36
- };