plugin-agent-orchestrator 1.0.13 → 1.0.15
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/README.md +16 -291
- package/dist/client/AIEmployeesContext.d.ts +7 -0
- package/dist/client/OrchestratorSettings.d.ts +2 -1
- package/dist/client/index.js +1 -1
- package/dist/client/plugin.d.ts +1 -0
- package/dist/client/skill-hub/components/ExecutionHistory.d.ts +2 -0
- package/dist/client/skill-hub/components/ExecutionProgress.d.ts +20 -0
- package/dist/client/skill-hub/components/GitSkillImport.d.ts +7 -0
- package/dist/client/skill-hub/components/SkillEditor.d.ts +7 -0
- package/dist/client/skill-hub/components/SkillManager.d.ts +2 -0
- package/dist/client/skill-hub/components/SkillMetrics.d.ts +2 -0
- package/dist/client/skill-hub/components/SkillTestPanel.d.ts +7 -0
- package/dist/client/skill-hub/index.d.ts +10 -0
- package/dist/client/skill-hub/locale.d.ts +3 -0
- package/dist/client/skill-hub/tools/InteractionSchemasProvider.d.ts +19 -0
- package/dist/client/skill-hub/tools/SkillHubCard.d.ts +3 -0
- package/dist/client/skill-hub/utils/jsonFields.d.ts +3 -0
- package/dist/externalVersion.js +6 -6
- package/dist/node_modules/adm-zip/LICENSE +21 -0
- package/dist/node_modules/adm-zip/adm-zip.js +1 -0
- package/dist/node_modules/adm-zip/headers/entryHeader.js +377 -0
- package/dist/node_modules/adm-zip/headers/index.js +2 -0
- package/dist/node_modules/adm-zip/headers/mainHeader.js +130 -0
- package/dist/node_modules/adm-zip/methods/deflater.js +33 -0
- package/dist/node_modules/adm-zip/methods/index.js +3 -0
- package/dist/node_modules/adm-zip/methods/inflater.js +34 -0
- package/dist/node_modules/adm-zip/methods/zipcrypto.js +175 -0
- package/dist/node_modules/adm-zip/package.json +1 -0
- package/dist/node_modules/adm-zip/util/constants.js +142 -0
- package/dist/node_modules/adm-zip/util/decoder.js +5 -0
- package/dist/node_modules/adm-zip/util/errors.js +63 -0
- package/dist/node_modules/adm-zip/util/fattr.js +76 -0
- package/dist/node_modules/adm-zip/util/index.js +5 -0
- package/dist/node_modules/adm-zip/util/utils.js +339 -0
- package/dist/node_modules/adm-zip/zipEntry.js +405 -0
- package/dist/node_modules/adm-zip/zipFile.js +446 -0
- package/dist/node_modules/simple-git/dist/cjs/index.js +7399 -0
- package/dist/node_modules/simple-git/dist/esm/index.js +4745 -0
- package/dist/node_modules/simple-git/dist/esm/package.json +3 -0
- package/dist/node_modules/simple-git/dist/src/lib/api.d.ts +13 -0
- package/dist/node_modules/simple-git/dist/src/lib/args/log-format.d.ts +9 -0
- package/dist/node_modules/simple-git/dist/src/lib/errors/git-construct-error.d.ts +15 -0
- package/dist/node_modules/simple-git/dist/src/lib/errors/git-error.d.ts +30 -0
- package/dist/node_modules/simple-git/dist/src/lib/errors/git-plugin-error.d.ts +7 -0
- package/dist/node_modules/simple-git/dist/src/lib/errors/git-response-error.d.ts +32 -0
- package/dist/node_modules/simple-git/dist/src/lib/errors/task-configuration-error.d.ts +12 -0
- package/dist/node_modules/simple-git/dist/src/lib/git-factory.d.ts +15 -0
- package/dist/node_modules/simple-git/dist/src/lib/git-logger.d.ts +21 -0
- package/dist/node_modules/simple-git/dist/src/lib/parsers/parse-branch-delete.d.ts +5 -0
- package/dist/node_modules/simple-git/dist/src/lib/parsers/parse-branch.d.ts +2 -0
- package/dist/node_modules/simple-git/dist/src/lib/parsers/parse-commit.d.ts +2 -0
- package/dist/node_modules/simple-git/dist/src/lib/parsers/parse-diff-summary.d.ts +3 -0
- package/dist/node_modules/simple-git/dist/src/lib/parsers/parse-fetch.d.ts +2 -0
- package/dist/node_modules/simple-git/dist/src/lib/parsers/parse-list-log-summary.d.ts +6 -0
- package/dist/node_modules/simple-git/dist/src/lib/parsers/parse-merge.d.ts +11 -0
- package/dist/node_modules/simple-git/dist/src/lib/parsers/parse-move.d.ts +2 -0
- package/dist/node_modules/simple-git/dist/src/lib/parsers/parse-pull.d.ts +6 -0
- package/dist/node_modules/simple-git/dist/src/lib/parsers/parse-push.d.ts +4 -0
- package/dist/node_modules/simple-git/dist/src/lib/parsers/parse-remote-messages.d.ts +5 -0
- package/dist/node_modules/simple-git/dist/src/lib/parsers/parse-remote-objects.d.ts +3 -0
- package/dist/node_modules/simple-git/dist/src/lib/plugins/abort-plugin.d.ts +3 -0
- package/dist/node_modules/simple-git/dist/src/lib/plugins/block-unsafe-operations-plugin.d.ts +3 -0
- package/dist/node_modules/simple-git/dist/src/lib/plugins/command-config-prefixing-plugin.d.ts +2 -0
- package/dist/node_modules/simple-git/dist/src/lib/plugins/completion-detection.plugin.d.ts +3 -0
- package/dist/node_modules/simple-git/dist/src/lib/plugins/custom-binary.plugin.d.ts +3 -0
- package/dist/node_modules/simple-git/dist/src/lib/plugins/error-detection.plugin.d.ts +7 -0
- package/dist/node_modules/simple-git/dist/src/lib/plugins/index.d.ts +11 -0
- package/dist/node_modules/simple-git/dist/src/lib/plugins/plugin-store.d.ts +11 -0
- package/dist/node_modules/simple-git/dist/src/lib/plugins/progress-monitor-plugin.d.ts +3 -0
- package/dist/node_modules/simple-git/dist/src/lib/plugins/simple-git-plugin.d.ts +48 -0
- package/dist/node_modules/simple-git/dist/src/lib/plugins/spawn-options-plugin.d.ts +3 -0
- package/dist/node_modules/simple-git/dist/src/lib/plugins/suffix-paths.plugin.d.ts +2 -0
- package/dist/node_modules/simple-git/dist/src/lib/plugins/timout-plugin.d.ts +3 -0
- package/dist/node_modules/simple-git/dist/src/lib/responses/BranchDeleteSummary.d.ts +12 -0
- package/dist/node_modules/simple-git/dist/src/lib/responses/BranchSummary.d.ts +14 -0
- package/dist/node_modules/simple-git/dist/src/lib/responses/CheckIgnore.d.ts +4 -0
- package/dist/node_modules/simple-git/dist/src/lib/responses/CleanSummary.d.ts +9 -0
- package/dist/node_modules/simple-git/dist/src/lib/responses/ConfigList.d.ts +13 -0
- package/dist/node_modules/simple-git/dist/src/lib/responses/DiffSummary.d.ts +10 -0
- package/dist/node_modules/simple-git/dist/src/lib/responses/FileStatusSummary.d.ts +9 -0
- package/dist/node_modules/simple-git/dist/src/lib/responses/GetRemoteSummary.d.ts +11 -0
- package/dist/node_modules/simple-git/dist/src/lib/responses/InitSummary.d.ts +9 -0
- package/dist/node_modules/simple-git/dist/src/lib/responses/MergeSummary.d.ts +16 -0
- package/dist/node_modules/simple-git/dist/src/lib/responses/PullSummary.d.ts +25 -0
- package/dist/node_modules/simple-git/dist/src/lib/responses/StatusSummary.d.ts +19 -0
- package/dist/node_modules/simple-git/dist/src/lib/responses/TagList.d.ts +7 -0
- package/dist/node_modules/simple-git/dist/src/lib/runners/git-executor-chain.d.ts +25 -0
- package/dist/node_modules/simple-git/dist/src/lib/runners/git-executor.d.ts +14 -0
- package/dist/node_modules/simple-git/dist/src/lib/runners/promise-wrapped.d.ts +2 -0
- package/dist/node_modules/simple-git/dist/src/lib/runners/scheduler.d.ts +11 -0
- package/dist/node_modules/simple-git/dist/src/lib/runners/tasks-pending-queue.d.ts +23 -0
- package/dist/node_modules/simple-git/dist/src/lib/simple-git-api.d.ts +20 -0
- package/dist/node_modules/simple-git/dist/src/lib/task-callback.d.ts +2 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/apply-patch.d.ts +3 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/branch.d.ts +7 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/change-working-directory.d.ts +2 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/check-ignore.d.ts +2 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/check-is-repo.d.ts +9 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/checkout.d.ts +2 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/clean.d.ts +25 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/clone.d.ts +9 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/commit.d.ts +4 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/config.d.ts +8 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/count-objects.d.ts +12 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/diff-name-status.d.ts +12 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/diff.d.ts +5 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/fetch.d.ts +4 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/first-commit.d.ts +2 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/grep.d.ts +12 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/hash-object.d.ts +5 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/init.d.ts +3 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/log.d.ts +32 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/merge.d.ts +4 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/move.d.ts +3 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/pull.d.ts +3 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/push.d.ts +9 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/remote.d.ts +8 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/reset.d.ts +11 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/show.d.ts +2 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/stash-list.d.ts +4 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/status.d.ts +3 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/sub-module.d.ts +5 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/tag.d.ts +18 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/task.d.ts +14 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/version.d.ts +9 -0
- package/dist/node_modules/simple-git/dist/src/lib/types/handlers.d.ts +21 -0
- package/dist/node_modules/simple-git/dist/src/lib/types/index.d.ts +136 -0
- package/dist/node_modules/simple-git/dist/src/lib/types/tasks.d.ts +19 -0
- package/dist/node_modules/simple-git/dist/src/lib/utils/argument-filters.d.ts +14 -0
- package/dist/node_modules/simple-git/dist/src/lib/utils/exit-codes.d.ts +10 -0
- package/dist/node_modules/simple-git/dist/src/lib/utils/git-output-streams.d.ts +7 -0
- package/dist/node_modules/simple-git/dist/src/lib/utils/index.d.ts +8 -0
- package/dist/node_modules/simple-git/dist/src/lib/utils/line-parser.d.ts +15 -0
- package/dist/node_modules/simple-git/dist/src/lib/utils/simple-git-options.d.ts +2 -0
- package/dist/node_modules/simple-git/dist/src/lib/utils/task-options.d.ts +13 -0
- package/dist/node_modules/simple-git/dist/src/lib/utils/task-parser.d.ts +5 -0
- package/dist/node_modules/simple-git/dist/src/lib/utils/util.d.ts +47 -0
- package/dist/node_modules/simple-git/dist/typings/errors.d.ts +5 -0
- package/dist/node_modules/simple-git/dist/typings/index.d.ts +14 -0
- package/dist/node_modules/simple-git/dist/typings/response.d.ts +556 -0
- package/dist/node_modules/simple-git/dist/typings/simple-git.d.ts +1033 -0
- package/dist/node_modules/simple-git/dist/typings/types.d.ts +22 -0
- package/dist/node_modules/simple-git/node_modules/debug/package.json +64 -0
- package/dist/node_modules/simple-git/node_modules/debug/src/browser.js +272 -0
- package/dist/node_modules/simple-git/node_modules/debug/src/common.js +292 -0
- package/dist/node_modules/simple-git/node_modules/debug/src/index.js +10 -0
- package/dist/node_modules/simple-git/node_modules/debug/src/node.js +263 -0
- package/dist/node_modules/simple-git/package.json +1 -0
- package/dist/node_modules/simple-git/promise.js +17 -0
- package/dist/server/collections/agent-execution-spans.d.ts +9 -0
- package/dist/server/collections/agent-execution-spans.js +152 -0
- package/dist/server/collections/orchestrator-config.d.ts +1 -1
- package/dist/server/collections/orchestrator-config.js +6 -0
- package/dist/server/collections/orchestrator-logs.d.ts +1 -1
- package/dist/server/collections/skill-definitions.d.ts +2 -0
- package/dist/server/collections/skill-definitions.js +158 -0
- package/dist/server/collections/skill-executions.d.ts +2 -0
- package/dist/server/collections/skill-executions.js +123 -0
- package/dist/server/collections/skill-worker-configs.d.ts +2 -0
- package/dist/server/collections/skill-worker-configs.js +115 -0
- package/dist/server/migrations/20260423000000-add-progress-fields.d.ts +4 -0
- package/dist/server/migrations/20260423000000-add-progress-fields.js +69 -0
- package/dist/server/migrations/20260425000000-add-interaction-schema.d.ts +4 -0
- package/dist/server/migrations/20260425000000-add-interaction-schema.js +61 -0
- package/dist/server/migrations/20260427000000-change-packages-to-text.d.ts +4 -0
- package/dist/server/migrations/20260427000000-change-packages-to-text.js +70 -0
- package/dist/server/migrations/20260427000001-change-other-json-to-text.d.ts +4 -0
- package/dist/server/migrations/20260427000001-change-other-json-to-text.js +80 -0
- package/dist/server/migrations/20260429000000-add-llm-fields.js +8 -0
- package/dist/server/migrations/20260429000000-fix-inputargs-json-to-text.d.ts +16 -0
- package/dist/server/migrations/20260429000000-fix-inputargs-json-to-text.js +51 -0
- package/dist/server/migrations/20260503000000-add-orchestrator-trace-fields.d.ts +7 -0
- package/dist/server/migrations/20260503000000-add-orchestrator-trace-fields.js +57 -0
- package/dist/server/plugin.d.ts +3 -0
- package/dist/server/plugin.js +37 -1
- package/dist/server/resources/tracing.js +154 -11
- package/dist/server/services/CodeValidator.d.ts +32 -0
- package/dist/server/services/CodeValidator.js +206 -0
- package/dist/server/services/ExecutionSpanService.d.ts +44 -0
- package/dist/server/services/ExecutionSpanService.js +104 -0
- package/dist/server/services/FileManager.d.ts +28 -0
- package/dist/server/services/FileManager.js +151 -0
- package/dist/server/services/SandboxRunner.d.ts +41 -0
- package/dist/server/services/SandboxRunner.js +167 -0
- package/dist/server/services/SkillManager.d.ts +6 -0
- package/dist/server/services/SkillManager.js +640 -0
- package/dist/server/services/SkillRepositoryService.d.ts +22 -0
- package/dist/server/services/SkillRepositoryService.js +157 -0
- package/dist/server/services/WorkerEnvManager.d.ts +26 -0
- package/dist/server/services/WorkerEnvManager.js +120 -0
- package/dist/server/skill-hub/actions/git-import.d.ts +21 -0
- package/dist/server/skill-hub/actions/git-import.js +413 -0
- package/dist/server/skill-hub/mcp/McpController.d.ts +15 -0
- package/dist/server/skill-hub/mcp/McpController.js +111 -0
- package/dist/server/skill-hub/plugin.d.ts +58 -0
- package/dist/server/skill-hub/plugin.js +694 -0
- package/dist/server/skill-hub/sandbox-config.json +6 -0
- package/dist/server/skill-hub/tasks/SkillExecutionTask.d.ts +16 -0
- package/dist/server/skill-hub/tasks/SkillExecutionTask.js +389 -0
- package/dist/server/skill-hub/utils/json-fields.d.ts +7 -0
- package/dist/server/skill-hub/utils/json-fields.js +88 -0
- package/dist/server/tools/delegate-task.d.ts +4 -0
- package/dist/server/tools/delegate-task.js +606 -104
- package/dist/server/tools/skill-execute.d.ts +36 -0
- package/dist/server/tools/skill-execute.js +167 -0
- package/package.json +3 -1
- package/src/client/AIEmployeeSelect.tsx +1 -3
- package/src/client/AIEmployeesContext.tsx +28 -13
- package/src/client/OrchestratorSettings.tsx +43 -5
- package/src/client/RulesTab.tsx +253 -32
- package/src/client/TracingTab.tsx +277 -213
- package/src/client/index.tsx +1 -1
- package/src/client/plugin.tsx +54 -15
- package/src/client/skill-hub/components/ExecutionHistory.tsx +201 -0
- package/src/client/skill-hub/components/ExecutionProgress.tsx +55 -0
- package/src/client/skill-hub/components/GitSkillImport.tsx +555 -0
- package/src/client/skill-hub/components/SkillEditor.tsx +456 -0
- package/src/client/skill-hub/components/SkillManager.tsx +181 -0
- package/src/client/skill-hub/components/SkillMetrics.tsx +124 -0
- package/src/client/skill-hub/components/SkillTestPanel.tsx +144 -0
- package/src/client/skill-hub/index.tsx +75 -0
- package/src/client/skill-hub/locale.ts +16 -0
- package/src/client/skill-hub/tools/InteractionSchemasProvider.tsx +59 -0
- package/src/client/skill-hub/tools/SkillHubCard.tsx +78 -0
- package/src/client/skill-hub/utils/jsonFields.ts +37 -0
- package/src/server/collections/agent-execution-spans.ts +129 -0
- package/src/server/collections/orchestrator-config.ts +7 -0
- package/src/server/collections/skill-definitions.ts +128 -0
- package/src/server/collections/skill-executions.ts +94 -0
- package/src/server/collections/skill-worker-configs.ts +86 -0
- package/src/server/migrations/20260423000000-add-progress-fields.ts +50 -0
- package/src/server/migrations/20260425000000-add-interaction-schema.ts +35 -0
- package/src/server/migrations/20260427000000-add-tracing-detail-fields.ts +5 -5
- package/src/server/migrations/20260427000000-change-packages-to-text.ts +47 -0
- package/src/server/migrations/20260427000001-change-other-json-to-text.ts +57 -0
- package/src/server/migrations/20260429000000-add-llm-fields.ts +11 -2
- package/src/server/migrations/20260429000000-fix-inputargs-json-to-text.ts +38 -0
- package/src/server/migrations/20260503000000-add-orchestrator-trace-fields.ts +32 -0
- package/src/server/plugin.ts +94 -46
- package/src/server/resources/tracing.ts +182 -15
- package/src/server/services/CodeValidator.ts +159 -0
- package/src/server/services/ExecutionSpanService.ts +106 -0
- package/src/server/services/FileManager.ts +144 -0
- package/src/server/services/SandboxRunner.ts +205 -0
- package/src/server/services/SkillManager.ts +623 -0
- package/src/server/services/SkillRepositoryService.ts +142 -0
- package/src/server/services/WorkerEnvManager.ts +113 -0
- package/src/server/skill-hub/actions/git-import.ts +486 -0
- package/src/server/skill-hub/mcp/McpController.ts +86 -0
- package/src/server/skill-hub/plugin.ts +771 -0
- package/src/server/skill-hub/sandbox-config.json +6 -0
- package/src/server/skill-hub/tasks/SkillExecutionTask.ts +443 -0
- package/src/server/skill-hub/utils/json-fields.ts +57 -0
- package/src/server/tools/delegate-task.ts +803 -127
- package/src/server/tools/skill-execute.ts +157 -0
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import React, { useState, useEffect, useCallback } from 'react';
|
|
2
|
+
import { Card, Table, Tag, Button, Typography, Space, Tooltip, Popconfirm, message } from 'antd';
|
|
3
|
+
import { ReloadOutlined, DownloadOutlined, DeleteOutlined } from '@ant-design/icons';
|
|
4
|
+
import { useAPIClient, Upload } from '@nocobase/client';
|
|
5
|
+
import { useT } from '../locale';
|
|
6
|
+
import { parseJsonText } from '../utils/jsonFields';
|
|
7
|
+
|
|
8
|
+
const STATUS_COLORS: Record<string, string> = {
|
|
9
|
+
pending: 'default',
|
|
10
|
+
running: 'processing',
|
|
11
|
+
succeeded: 'success',
|
|
12
|
+
failed: 'error',
|
|
13
|
+
canceled: 'warning',
|
|
14
|
+
timeout: 'error',
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const ExecutionHistory: React.FC = () => {
|
|
18
|
+
const api = useAPIClient();
|
|
19
|
+
const t = useT();
|
|
20
|
+
const [executions, setExecutions] = useState<any[]>([]);
|
|
21
|
+
const [loading, setLoading] = useState(false);
|
|
22
|
+
const [page, setPage] = useState(1);
|
|
23
|
+
const [total, setTotal] = useState(0);
|
|
24
|
+
const pageSize = 20;
|
|
25
|
+
|
|
26
|
+
const fetchExecutions = useCallback(async () => {
|
|
27
|
+
setLoading(true);
|
|
28
|
+
try {
|
|
29
|
+
const { data } = await api.request({
|
|
30
|
+
url: 'skillExecutions:list',
|
|
31
|
+
params: {
|
|
32
|
+
page,
|
|
33
|
+
pageSize,
|
|
34
|
+
sort: ['-createdAt'],
|
|
35
|
+
appends: ['skill', 'triggeredBy'],
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
const rawData = data?.data?.data ?? data?.data ?? [];
|
|
39
|
+
setExecutions(Array.isArray(rawData) ? rawData : []);
|
|
40
|
+
setTotal(data?.meta?.count || 0);
|
|
41
|
+
} catch {
|
|
42
|
+
// ignore
|
|
43
|
+
} finally {
|
|
44
|
+
setLoading(false);
|
|
45
|
+
}
|
|
46
|
+
}, [api, page]);
|
|
47
|
+
|
|
48
|
+
useEffect(() => {
|
|
49
|
+
fetchExecutions();
|
|
50
|
+
}, [fetchExecutions]);
|
|
51
|
+
|
|
52
|
+
const handleDelete = async (id: number) => {
|
|
53
|
+
try {
|
|
54
|
+
await api.request({
|
|
55
|
+
url: `skillExecutions:destroy`,
|
|
56
|
+
method: 'POST',
|
|
57
|
+
params: {
|
|
58
|
+
filterByTk: id
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
message.success(t('Deleted successfully'));
|
|
62
|
+
fetchExecutions();
|
|
63
|
+
} catch (err: any) {
|
|
64
|
+
message.error(err?.response?.data?.errors?.[0]?.message || t('Delete failed'));
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
const columns = [
|
|
69
|
+
{
|
|
70
|
+
title: 'ID',
|
|
71
|
+
dataIndex: 'id',
|
|
72
|
+
key: 'id',
|
|
73
|
+
width: 80,
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
title: t('Skill'),
|
|
77
|
+
dataIndex: ['skill', 'title'],
|
|
78
|
+
key: 'skill',
|
|
79
|
+
width: 180,
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
title: t('Status'),
|
|
83
|
+
dataIndex: 'status',
|
|
84
|
+
key: 'status',
|
|
85
|
+
width: 120,
|
|
86
|
+
render: (status: string) => (
|
|
87
|
+
<Tag color={STATUS_COLORS[status] || 'default'}>{status}</Tag>
|
|
88
|
+
),
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
title: t('Duration'),
|
|
92
|
+
dataIndex: 'durationMs',
|
|
93
|
+
key: 'duration',
|
|
94
|
+
width: 100,
|
|
95
|
+
render: (ms: number) => (ms ? `${(ms / 1000).toFixed(1)}s` : '-'),
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
title: t('Files'),
|
|
99
|
+
dataIndex: 'outputFiles',
|
|
100
|
+
key: 'files',
|
|
101
|
+
width: 250,
|
|
102
|
+
render: (files: any[], record: any) => {
|
|
103
|
+
files = parseJsonText(files, []);
|
|
104
|
+
if (!Array.isArray(files) || !files.length) return '-';
|
|
105
|
+
const formattedFiles = files.map((f, i) => ({
|
|
106
|
+
id: `${record.id}-${f.name}-${i}`,
|
|
107
|
+
title: f.name,
|
|
108
|
+
filename: f.name,
|
|
109
|
+
extname: f.name.includes('.') ? `.${f.name.split('.').pop()}` : '',
|
|
110
|
+
url: `/api/skillHub:download?execId=${record.id}&filename=${encodeURIComponent(f.name)}`,
|
|
111
|
+
status: 'done'
|
|
112
|
+
}));
|
|
113
|
+
return <Upload.ReadPretty value={formattedFiles} multiple={true} showFileName={true} />;
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
title: t('Triggered By'),
|
|
118
|
+
dataIndex: ['triggeredBy', 'nickname'],
|
|
119
|
+
key: 'triggeredBy',
|
|
120
|
+
width: 120,
|
|
121
|
+
render: (v: string) => v || '-',
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
title: t('Created At'),
|
|
125
|
+
dataIndex: 'createdAt',
|
|
126
|
+
key: 'createdAt',
|
|
127
|
+
width: 180,
|
|
128
|
+
render: (v: string) => (v ? new Date(v).toLocaleString() : '-'),
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
title: t('Output'),
|
|
132
|
+
key: 'output',
|
|
133
|
+
width: 200,
|
|
134
|
+
render: (_: any, record: any) => (
|
|
135
|
+
<Space direction="vertical" size={0}>
|
|
136
|
+
{record.stdout && (
|
|
137
|
+
<Tooltip title={record.stdout}>
|
|
138
|
+
<Typography.Text style={{ fontSize: 12, maxWidth: 200 }} ellipsis>
|
|
139
|
+
{record.stdout}
|
|
140
|
+
</Typography.Text>
|
|
141
|
+
</Tooltip>
|
|
142
|
+
)}
|
|
143
|
+
{record.stderr && (
|
|
144
|
+
<Tooltip title={record.stderr}>
|
|
145
|
+
<Typography.Text type="danger" style={{ fontSize: 12, maxWidth: 200 }} ellipsis>
|
|
146
|
+
{record.stderr}
|
|
147
|
+
</Typography.Text>
|
|
148
|
+
</Tooltip>
|
|
149
|
+
)}
|
|
150
|
+
</Space>
|
|
151
|
+
),
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
title: t('Actions'),
|
|
155
|
+
key: 'actions',
|
|
156
|
+
width: 80,
|
|
157
|
+
fixed: 'right' as const,
|
|
158
|
+
render: (_: any, record: any) => (
|
|
159
|
+
<Space size="middle">
|
|
160
|
+
<Popconfirm
|
|
161
|
+
title={t('Are you sure to delete this execution history and its files?')}
|
|
162
|
+
onConfirm={() => handleDelete(record.id)}
|
|
163
|
+
okText={t('Yes')}
|
|
164
|
+
cancelText={t('No')}
|
|
165
|
+
>
|
|
166
|
+
<Button type="text" danger icon={<DeleteOutlined />} size="small" />
|
|
167
|
+
</Popconfirm>
|
|
168
|
+
</Space>
|
|
169
|
+
),
|
|
170
|
+
},
|
|
171
|
+
];
|
|
172
|
+
|
|
173
|
+
return (
|
|
174
|
+
<Card
|
|
175
|
+
title={t('Execution History')}
|
|
176
|
+
extra={
|
|
177
|
+
<Space>
|
|
178
|
+
<Button icon={<ReloadOutlined />} onClick={fetchExecutions} loading={loading}>
|
|
179
|
+
{t('Refresh')}
|
|
180
|
+
</Button>
|
|
181
|
+
</Space>
|
|
182
|
+
}
|
|
183
|
+
>
|
|
184
|
+
<Table
|
|
185
|
+
dataSource={executions}
|
|
186
|
+
columns={columns}
|
|
187
|
+
rowKey="id"
|
|
188
|
+
loading={loading}
|
|
189
|
+
size="middle"
|
|
190
|
+
pagination={{
|
|
191
|
+
current: page,
|
|
192
|
+
pageSize,
|
|
193
|
+
total,
|
|
194
|
+
onChange: setPage,
|
|
195
|
+
showTotal: (t) => `Total: ${t}`,
|
|
196
|
+
}}
|
|
197
|
+
scroll={{ x: 1200 }}
|
|
198
|
+
/>
|
|
199
|
+
</Card>
|
|
200
|
+
);
|
|
201
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Progress, Typography } from 'antd';
|
|
3
|
+
import { LoadingOutlined, CheckCircleOutlined } from '@ant-design/icons';
|
|
4
|
+
|
|
5
|
+
interface ExecutionProgressProps {
|
|
6
|
+
execId: string;
|
|
7
|
+
skillName: string;
|
|
8
|
+
percent: number;
|
|
9
|
+
log: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Progress component rendered inside chat UI when receiving
|
|
14
|
+
* SSE custom event: {action: "skillProgress", body: {...}}
|
|
15
|
+
*
|
|
16
|
+
* Usage in chat message renderer:
|
|
17
|
+
* ```
|
|
18
|
+
* if (event.action === 'skillProgress') {
|
|
19
|
+
* return <ExecutionProgress {...event.body} />;
|
|
20
|
+
* }
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export const ExecutionProgress: React.FC<ExecutionProgressProps> = ({
|
|
24
|
+
skillName,
|
|
25
|
+
percent,
|
|
26
|
+
log,
|
|
27
|
+
}) => {
|
|
28
|
+
const isDone = percent >= 100;
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<div style={{ padding: '8px 12px', background: '#fafafa', borderRadius: 6, margin: '4px 0' }}>
|
|
32
|
+
<div style={{ display: 'flex', alignItems: 'center', gap: 8, marginBottom: 4 }}>
|
|
33
|
+
{isDone ? (
|
|
34
|
+
<CheckCircleOutlined style={{ color: '#52c41a' }} />
|
|
35
|
+
) : (
|
|
36
|
+
<LoadingOutlined style={{ color: '#1890ff' }} />
|
|
37
|
+
)}
|
|
38
|
+
<Typography.Text strong style={{ fontSize: 13 }}>
|
|
39
|
+
{skillName}
|
|
40
|
+
</Typography.Text>
|
|
41
|
+
</div>
|
|
42
|
+
<Progress
|
|
43
|
+
percent={percent}
|
|
44
|
+
size="small"
|
|
45
|
+
status={isDone ? 'success' : 'active'}
|
|
46
|
+
strokeColor={isDone ? '#52c41a' : '#1890ff'}
|
|
47
|
+
/>
|
|
48
|
+
{log && (
|
|
49
|
+
<Typography.Text type="secondary" style={{ fontSize: 12 }}>
|
|
50
|
+
{log}
|
|
51
|
+
</Typography.Text>
|
|
52
|
+
)}
|
|
53
|
+
</div>
|
|
54
|
+
);
|
|
55
|
+
};
|