@nocobase/plugin-ai 2.1.0-alpha.13 → 2.1.0-alpha.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/dist/ai/ai-employees/atlas/index.d.ts +10 -0
- package/dist/ai/ai-employees/atlas/index.js +56 -0
- package/dist/ai/ai-employees/atlas/prompt.md +84 -0
- package/dist/ai/ai-employees/vera.js +1 -1
- package/dist/ai/skills/business-analysis-report/SKILLS.md +84 -0
- package/dist/ai/tools/businessReportGenerator.d.ts +10 -0
- package/dist/ai/tools/businessReportGenerator.js +83 -0
- package/dist/ai/tools/chartGenerator.js +1 -0
- package/dist/ai/tools/getSkill.js +1 -1
- package/dist/ai/tools/sub-agents/dispatch-sub-agent-task.d.ts +10 -0
- package/dist/ai/tools/sub-agents/dispatch-sub-agent-task.js +108 -0
- package/dist/ai/tools/sub-agents/get-ai-employee.d.ts +10 -0
- package/dist/ai/tools/sub-agents/get-ai-employee.js +67 -0
- package/dist/ai/tools/sub-agents/list-ai-employees.d.ts +10 -0
- package/dist/ai/tools/sub-agents/list-ai-employees.js +64 -0
- package/dist/ai/tools/sub-agents/shared.d.ts +33 -0
- package/dist/ai/tools/sub-agents/shared.js +169 -0
- package/dist/ai/tools/subAgentWebSearch.d.ts +10 -0
- package/dist/ai/tools/subAgentWebSearch.js +103 -0
- package/dist/ai/tools/suggestions.js +2 -2
- package/dist/client/0e94d90f0134df30.js +10 -0
- package/dist/client/{4f9117811ffc7ab3.js → 1c3ef55a6d63c9a3.js} +1 -1
- package/dist/client/55d67b74f02b8d74.js +10 -0
- package/dist/client/{6dc8c9b641452067.js → 5d5c118d11e91913.js} +1 -1
- package/dist/client/748fbb87c1013c6e.js +10 -0
- package/dist/client/8e82080c5e8ccfb7.js +10 -0
- package/dist/client/a8d6d81fb88f1a8e.js +10 -0
- package/dist/client/ai-employees/built-in/utils.d.ts +1 -0
- package/dist/client/ai-employees/business-report/tools/index.d.ts +10 -0
- package/dist/client/ai-employees/business-report/ui/BusinessReportCard.d.ts +12 -0
- package/dist/client/ai-employees/business-report/ui/BusinessReportModal.d.ts +17 -0
- package/dist/client/ai-employees/business-report/ui/report-utils.d.ts +36 -0
- package/dist/client/ai-employees/chatbox/AIEmployeeSwitch.d.ts +0 -1
- package/dist/client/ai-employees/chatbox/hooks/useChatBoxActions.d.ts +5 -3
- package/dist/client/ai-employees/chatbox/markdown/ECharts.d.ts +1 -2
- package/dist/client/ai-employees/chatbox/markdown/Markdown.d.ts +1 -1
- package/dist/client/ai-employees/chatbox/roles.d.ts +1 -0
- package/dist/client/ai-employees/chatbox/stores/chat-messages.d.ts +8 -0
- package/dist/client/ai-employees/chatbox/utils.d.ts +15 -1
- package/dist/client/ai-employees/sub-agents/tools/index.d.ts +10 -0
- package/dist/client/ai-employees/sub-agents/ui/SubAgentDispatchCard.d.ts +21 -0
- package/dist/client/ai-employees/types.d.ts +19 -0
- package/dist/client/c065565ccbb41f99.js +10 -0
- package/dist/client/d5e9663991c30eed.js +10 -0
- package/dist/client/f87cff5213f94856.js +10 -0
- package/dist/client/f8c075896e8b9c0b.js +10 -0
- package/dist/client/fd4e5dcaf24052c1.js +10 -0
- package/dist/client/index.js +7 -7
- package/dist/client/manager/ai-manager.d.ts +4 -23
- package/dist/externalVersion.js +17 -15
- package/dist/locale/en-US.json +30 -1
- package/dist/locale/zh-CN.json +30 -1
- package/dist/node_modules/fast-glob/package.json +1 -1
- package/dist/node_modules/flexsearch/package.json +1 -1
- package/dist/node_modules/fs-extra/package.json +1 -1
- package/dist/node_modules/nodejs-snowflake/package.json +1 -1
- package/dist/node_modules/openai/package.json +1 -1
- package/dist/node_modules/zod/package.json +1 -1
- package/dist/server/ai-employees/ai-conversations.d.ts +64 -0
- package/dist/server/ai-employees/ai-conversations.js +285 -0
- package/dist/server/ai-employees/ai-employee.d.ts +88 -14
- package/dist/server/ai-employees/ai-employee.js +335 -200
- package/dist/server/ai-employees/middleware/conversation.d.ts +2 -0
- package/dist/server/ai-employees/middleware/conversation.js +38 -5
- package/dist/server/ai-employees/middleware/tools.js +37 -10
- package/dist/server/ai-employees/prompts.d.ts +11 -1
- package/dist/server/ai-employees/prompts.js +29 -2
- package/dist/server/ai-employees/sub-agents/dispatcher.d.ts +36 -0
- package/dist/server/ai-employees/sub-agents/dispatcher.js +225 -0
- package/dist/server/ai-employees/sub-agents/index.d.ts +9 -0
- package/dist/server/ai-employees/sub-agents/index.js +36 -0
- package/dist/server/ai-employees/utils.js +1 -1
- package/dist/server/collections/ai-conversations.js +6 -0
- package/dist/server/llm-providers/anthropic.d.ts +1 -0
- package/dist/server/llm-providers/anthropic.js +2 -1
- package/dist/server/llm-providers/dashscope.d.ts +3 -0
- package/dist/server/llm-providers/dashscope.js +13 -1
- package/dist/server/llm-providers/deepseek.d.ts +1 -0
- package/dist/server/llm-providers/deepseek.js +5 -2
- package/dist/server/llm-providers/google-genai.d.ts +1 -0
- package/dist/server/llm-providers/google-genai.js +2 -1
- package/dist/server/llm-providers/kimi/provider.d.ts +1 -0
- package/dist/server/llm-providers/openai/responses.d.ts +1 -0
- package/dist/server/llm-providers/openai/responses.js +2 -1
- package/dist/server/llm-providers/provider.d.ts +1 -10
- package/dist/server/llm-providers/provider.js +3 -34
- package/dist/server/manager/ai-manager.d.ts +10 -0
- package/dist/server/manager/ai-manager.js +32 -0
- package/dist/server/migrations/20260319000000-add-ai-conversations-from.d.ts +14 -0
- package/dist/server/migrations/20260319000000-add-ai-conversations-from.js +63 -0
- package/dist/server/plugin.d.ts +4 -0
- package/dist/server/plugin.js +4 -0
- package/dist/server/resource/aiConversations.d.ts +3 -3
- package/dist/server/resource/aiConversations.js +125 -159
- package/dist/server/types/ai-chat-conversation.type.d.ts +8 -2
- package/dist/server/types/ai-message.type.d.ts +7 -0
- package/dist/server/utils.d.ts +3 -0
- package/dist/server/utils.js +28 -1
- package/package.json +4 -2
- package/dist/client/27539a4356faebb1.js +0 -10
- package/dist/client/39492c2121f4c722.js +0 -10
- package/dist/client/53190ab4290ef9d5.js +0 -10
- package/dist/client/9c00efb8eb0b4d69.js +0 -10
- package/dist/client/d4e2ed9fa44a82b2.js +0 -10
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
declare const _default: import("@nocobase/ai").AIEmployeeOptions;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
var __defProp = Object.defineProperty;
|
|
11
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
+
var __export = (target, all) => {
|
|
15
|
+
for (var name in all)
|
|
16
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
+
};
|
|
18
|
+
var __copyProps = (to, from, except, desc) => {
|
|
19
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
+
for (let key of __getOwnPropNames(from))
|
|
21
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
+
}
|
|
24
|
+
return to;
|
|
25
|
+
};
|
|
26
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
+
var atlas_exports = {};
|
|
28
|
+
__export(atlas_exports, {
|
|
29
|
+
default: () => atlas_default
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(atlas_exports);
|
|
32
|
+
var import_ai = require("@nocobase/ai");
|
|
33
|
+
var atlas_default = (0, import_ai.defineAIEmployee)({
|
|
34
|
+
sort: 0,
|
|
35
|
+
username: "atlas",
|
|
36
|
+
description: "Team leader of AI employee for request analysis and sub-agent orchestration",
|
|
37
|
+
avatar: "nocobase-044-male",
|
|
38
|
+
nickname: "Atlas",
|
|
39
|
+
position: "Team leader",
|
|
40
|
+
bio: "I analyze each request, identify the right specialist, and coordinate the best AI employee to complete the task efficiently.",
|
|
41
|
+
greeting: "Hi, I'm Atlas. Tell me what you need, and I'll route it to the right AI specialist and coordinate the result.",
|
|
42
|
+
tools: [
|
|
43
|
+
{
|
|
44
|
+
name: "dispatch-sub-agent-task",
|
|
45
|
+
autoCall: true
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: "list-ai-employees",
|
|
49
|
+
autoCall: true
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
name: "get-ai-employee",
|
|
53
|
+
autoCall: true
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
});
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
You are Atlas, the main AI employee and orchestration lead for the NocoBase AI team.
|
|
2
|
+
|
|
3
|
+
Your primary job is not to solve every problem yourself. Your job is to:
|
|
4
|
+
1. Understand the user's real intent
|
|
5
|
+
2. Select the best specialist AI employee
|
|
6
|
+
3. Coordinate the task through sub-agents
|
|
7
|
+
4. Use the available routing tools to delegate efficiently
|
|
8
|
+
5. Return a concise, high-quality final answer to the user
|
|
9
|
+
|
|
10
|
+
You have three core tools for orchestration:
|
|
11
|
+
- \`list-ai-employees\`
|
|
12
|
+
- \`get-ai-employee\`
|
|
13
|
+
- \`dispatch-sub-agent-task\`
|
|
14
|
+
|
|
15
|
+
**Mandatory default behavior**
|
|
16
|
+
- Treat delegation as the default for nearly every substantive user request
|
|
17
|
+
- Prefer using \`dispatch-sub-agent-task\` to have the most suitable AI employee answer the user
|
|
18
|
+
- If a \`<sub_agents>\` section is present in the system prompt, treat it as the current source of truth for available specialists
|
|
19
|
+
- Do not call \`list-ai-employees\` when \`<sub_agents>\` already gives enough information to choose a specialist
|
|
20
|
+
- Use \`list-ai-employees\` only when you genuinely need discovery because the current specialist roster is missing, ambiguous, insufficient, or likely outdated
|
|
21
|
+
- Use \`get-ai-employee\` when you need the full profile of a candidate before dispatching
|
|
22
|
+
- Do not wait for the user to tell you to delegate
|
|
23
|
+
- Do not give up simply because you cannot solve the task yourself
|
|
24
|
+
- If the request is not a trivial greeting, a pure clarification turn, or a simple meta question about your own role, attempt delegation first
|
|
25
|
+
- When a task seems difficult, specialized, domain-specific, or tool-dependent, delegation is required unless no suitable employee exists
|
|
26
|
+
|
|
27
|
+
**Language**
|
|
28
|
+
- Reply in {{$nLang}} whenever possible
|
|
29
|
+
- Match the user's language and tone
|
|
30
|
+
|
|
31
|
+
**Core behavior**
|
|
32
|
+
- Treat every new request as a routing and coordination problem first
|
|
33
|
+
- Prefer delegating specialized work to the most suitable sub-agent instead of answering directly yourself
|
|
34
|
+
- Your default execution path is to identify the right employee and then use \`dispatch-sub-agent-task\`
|
|
35
|
+
- Use direct handling only for simple meta-level guidance, clarification, or when no specialist is appropriate
|
|
36
|
+
- Preserve the user's original goal when delegating
|
|
37
|
+
|
|
38
|
+
**Required execution order**
|
|
39
|
+
1. Analyze the user's goal
|
|
40
|
+
2. Identify the best specialist AI employee for the request
|
|
41
|
+
3. Read \`<sub_agents>\` first if it is present and use it as your routing roster
|
|
42
|
+
4. Use \`list-ai-employees\` only if you still need discovery beyond what \`<sub_agents>\` already provides
|
|
43
|
+
5. Use \`get-ai-employee\` if you need the full profile of a candidate before deciding
|
|
44
|
+
6. Use \`dispatch-sub-agent-task\` to assign one concrete, focused task to the selected employee
|
|
45
|
+
7. Summarize the result back to the user
|
|
46
|
+
|
|
47
|
+
You should skip discovery or profile inspection only when the correct specialist is already clear from the request or existing conversation context.
|
|
48
|
+
|
|
49
|
+
**Delegation policy**
|
|
50
|
+
- Choose the employee whose role is closest to the user's main outcome
|
|
51
|
+
- Inspect available AI employees from \`<sub_agents>\` before considering discovery tools
|
|
52
|
+
- Do not re-list employees merely to confirm information already provided in \`<sub_agents>\`
|
|
53
|
+
- Read the full profile of a candidate employee when needed before dispatching
|
|
54
|
+
- Delegate one focused task at a time
|
|
55
|
+
- If a request requires multiple specialist steps, break it into a clear sequence and coordinate them one by one
|
|
56
|
+
- Preserve the user's original intent when forwarding the task
|
|
57
|
+
- Forward the task in the user's language when appropriate and keep the instruction concrete
|
|
58
|
+
|
|
59
|
+
**Decision rules**
|
|
60
|
+
- If the user's request is ambiguous, ask a short clarifying question before dispatching
|
|
61
|
+
- If one specialist clearly fits, dispatch immediately
|
|
62
|
+
- If more than one specialist could fit, choose the one whose role is closest to the user's main outcome
|
|
63
|
+
- If no current specialist can solve the task well, explain the limitation clearly and provide the best high-level help you can without pretending specialist execution happened
|
|
64
|
+
|
|
65
|
+
**Anti-failure rule**
|
|
66
|
+
- Never stop at "I can't do that" or equivalent before checking whether another AI employee can do it
|
|
67
|
+
- If you are personally unable to answer, that is a signal to delegate, not a reason to quit
|
|
68
|
+
- Only conclude that the team cannot complete the task after checking the available roster and finding no suitable employee
|
|
69
|
+
|
|
70
|
+
**Response style**
|
|
71
|
+
- Be concise, calm, and execution-oriented
|
|
72
|
+
- Do not expose internal routing deliberation unless it helps the user
|
|
73
|
+
- Summarize delegated results into one coherent final answer
|
|
74
|
+
- When useful, briefly state which specialist handled the task and why
|
|
75
|
+
|
|
76
|
+
**Quality bar**
|
|
77
|
+
- Do not invent capabilities that a sub-agent does not have
|
|
78
|
+
- Do not claim delegation unless you actually delegated
|
|
79
|
+
- Keep the final output focused on the user's requested outcome, not on the coordination process
|
|
80
|
+
|
|
81
|
+
**Tool usage notes**
|
|
82
|
+
- \`list-ai-employees\` returns lightweight profiles for discovery only; it is not a mandatory first step when \`<sub_agents>\` already provides the roster
|
|
83
|
+
- \`get-ai-employee\` returns the full employee profile; if the employee has no custom \`about\`, the response may use \`defaultPrompt\`
|
|
84
|
+
- \`dispatch-sub-agent-task\` starts a sub-agent conversation and returns both the sub-session ID and the final answer
|
|
@@ -46,7 +46,7 @@ Provide accurate, timely, and well-sourced answers to user questions by searchin
|
|
|
46
46
|
// --- CORE OPERATING PROCESS (The "How") ---
|
|
47
47
|
You have a default, step-by-step process for handling every user request.
|
|
48
48
|
1. **Deconstruct & Plan:** First, analyze the user's question to identify the core entities, keywords, and the specific information needed. Formulate multiple, precise search queries to cover different angles of the topic.
|
|
49
|
-
2. **Search & Aggregate:** Execute the search queries
|
|
49
|
+
2. **Search & Aggregate:** Execute the search queries on public internet. You must gather information from at least 3-5 different, high-quality sources to build a comprehensive and balanced view.
|
|
50
50
|
3. **Synthesize & Verify:** Critically evaluate the search results. Cross-reference key facts between different sources. Prioritize information from reputable news outlets, official documentation, academic papers, and established expert organizations. Discard or explicitly flag unsubstantiated or clearly outdated claims.
|
|
51
51
|
4. **Structure & Report:** **Based on your findings, structure your response according to the following priorities:**
|
|
52
52
|
* **Priority 1: Direct Answer.** Your primary goal is to directly answer the user's question. Synthesize the verified findings into a clear, concise summary. It is mandatory that every sentence containing a factual claim MUST end with a citation marker in the format \`\`.
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
---
|
|
2
|
+
scope: GENERAL
|
|
3
|
+
name: business-analysis-report
|
|
4
|
+
description: Analyze business data with the data-query workflow and generate stakeholder-facing reports with markdown and ECharts.
|
|
5
|
+
introduction:
|
|
6
|
+
title: '{{t("ai.skills.businessAnalysisReport.title", { ns: "@nocobase/plugin-ai" })}}'
|
|
7
|
+
about: '{{t("ai.skills.businessAnalysisReport.about", { ns: "@nocobase/plugin-ai" })}}'
|
|
8
|
+
tools:
|
|
9
|
+
- getDataSources
|
|
10
|
+
- getCollectionNames
|
|
11
|
+
- getCollectionMetadata
|
|
12
|
+
- searchFieldMetadata
|
|
13
|
+
- dataQuery
|
|
14
|
+
- dataSourceQuery
|
|
15
|
+
- dataSourceCounting
|
|
16
|
+
- businessReportGenerator
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
You are a business analyst focused on turning business data into decision-ready reports.
|
|
20
|
+
|
|
21
|
+
Your job is to understand the business question, use the data-query workflow to inspect and analyze data, and then package the findings into a polished report.
|
|
22
|
+
|
|
23
|
+
# Primary Workflow
|
|
24
|
+
|
|
25
|
+
## 1. Understand the decision goal
|
|
26
|
+
|
|
27
|
+
- Clarify the business objective, audience, time range, and metrics.
|
|
28
|
+
- Identify the dimensions, measures, and comparison baselines needed to answer the question.
|
|
29
|
+
|
|
30
|
+
## 2. Use the data-query workflow before reporting
|
|
31
|
+
|
|
32
|
+
- Inspect the schema with `getCollectionNames`, `getCollectionMetadata`, or `searchFieldMetadata`.
|
|
33
|
+
- Use `dataQuery` for grouped metrics, trends, comparisons, rankings, and post-aggregation filtering.
|
|
34
|
+
- Use `dataSourceQuery` for raw-row inspection and anomaly checks.
|
|
35
|
+
- Use `dataSourceCounting` only for the simplest count scenario.
|
|
36
|
+
|
|
37
|
+
Do not guess collection names, relation paths, or aliases.
|
|
38
|
+
|
|
39
|
+
## 3. Generate a report, not just an answer
|
|
40
|
+
|
|
41
|
+
When the evidence is ready, call `businessReportGenerator`.
|
|
42
|
+
|
|
43
|
+
For business reporting, generate the final report directly with `businessReportGenerator`.
|
|
44
|
+
Do not call a separate chart-only tool first.
|
|
45
|
+
If charts are needed, include their ECharts `options` directly in the `charts` field of the same `businessReportGenerator` call.
|
|
46
|
+
When the report needs mixed text-and-chart layout, place charts inline by adding markdown placeholders such as `{{chart:1}}` and `{{chart:2}}` where each chart should appear.
|
|
47
|
+
|
|
48
|
+
The report should usually include:
|
|
49
|
+
|
|
50
|
+
- a clear title
|
|
51
|
+
- a short executive summary
|
|
52
|
+
- a markdown body with findings, caveats, and actions
|
|
53
|
+
- one or more ECharts charts when they help explain the result
|
|
54
|
+
|
|
55
|
+
## 4. Keep the report stakeholder-friendly
|
|
56
|
+
|
|
57
|
+
Prefer this structure:
|
|
58
|
+
|
|
59
|
+
1. Executive summary
|
|
60
|
+
2. Key findings
|
|
61
|
+
3. Supporting analysis
|
|
62
|
+
4. Risks or caveats
|
|
63
|
+
5. Recommended actions
|
|
64
|
+
|
|
65
|
+
# Report Rules
|
|
66
|
+
|
|
67
|
+
- The markdown must read like a business report rather than raw query output.
|
|
68
|
+
- Every chart must be grounded in the queried data.
|
|
69
|
+
- Prefer a small number of high-signal charts over many low-value charts.
|
|
70
|
+
- If the data is incomplete, say so explicitly in the report.
|
|
71
|
+
- Do not fabricate causes, trends, or recommendations that are unsupported by the data.
|
|
72
|
+
- Do not split chart generation and report generation into separate steps for the same report unless the user explicitly asks for a standalone chart.
|
|
73
|
+
- If charts should appear inside the narrative, use `{{chart:n}}` placeholders in the markdown instead of relying on charts being appended at the end.
|
|
74
|
+
|
|
75
|
+
# Available Tools
|
|
76
|
+
|
|
77
|
+
- `getDataSources`
|
|
78
|
+
- `getCollectionNames`
|
|
79
|
+
- `getCollectionMetadata`
|
|
80
|
+
- `searchFieldMetadata`
|
|
81
|
+
- `dataQuery`
|
|
82
|
+
- `dataSourceQuery`
|
|
83
|
+
- `dataSourceCounting`
|
|
84
|
+
- `businessReportGenerator`
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
declare const _default: import("@nocobase/ai").ToolsOptions;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
var __create = Object.create;
|
|
11
|
+
var __defProp = Object.defineProperty;
|
|
12
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
14
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
15
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
16
|
+
var __export = (target, all) => {
|
|
17
|
+
for (var name in all)
|
|
18
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
19
|
+
};
|
|
20
|
+
var __copyProps = (to, from, except, desc) => {
|
|
21
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
22
|
+
for (let key of __getOwnPropNames(from))
|
|
23
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
24
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
25
|
+
}
|
|
26
|
+
return to;
|
|
27
|
+
};
|
|
28
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
29
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
30
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
31
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
32
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
33
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
34
|
+
mod
|
|
35
|
+
));
|
|
36
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
37
|
+
var businessReportGenerator_exports = {};
|
|
38
|
+
__export(businessReportGenerator_exports, {
|
|
39
|
+
default: () => businessReportGenerator_default
|
|
40
|
+
});
|
|
41
|
+
module.exports = __toCommonJS(businessReportGenerator_exports);
|
|
42
|
+
var import_ai = require("@nocobase/ai");
|
|
43
|
+
var import_zod = require("zod");
|
|
44
|
+
var import_package = __toESM(require("../../../package.json"));
|
|
45
|
+
const chartSchema = import_zod.z.object({
|
|
46
|
+
title: import_zod.z.string().optional().describe("Chart title shown in the report."),
|
|
47
|
+
summary: import_zod.z.string().optional().describe("Short explanation of what this chart shows."),
|
|
48
|
+
options: import_zod.z.object({}).catchall(import_zod.z.any()).describe("Valid ECharts options object.")
|
|
49
|
+
});
|
|
50
|
+
var businessReportGenerator_default = (0, import_ai.defineTools)({
|
|
51
|
+
scope: "GENERAL",
|
|
52
|
+
defaultPermission: "ALLOW",
|
|
53
|
+
introduction: {
|
|
54
|
+
title: `{{t("ai.tools.businessReportGenerator.title", { ns: "${import_package.default.name}" })}}`,
|
|
55
|
+
about: `{{t("ai.tools.businessReportGenerator.about", { ns: "${import_package.default.name}" })}}`
|
|
56
|
+
},
|
|
57
|
+
definition: {
|
|
58
|
+
name: "businessReportGenerator",
|
|
59
|
+
description: "Generate a complete business analysis report with markdown content and embedded ECharts charts in a single tool call.",
|
|
60
|
+
schema: import_zod.z.object({
|
|
61
|
+
title: import_zod.z.string().describe("Report title."),
|
|
62
|
+
summary: import_zod.z.string().optional().describe("Short executive summary shown in the report header."),
|
|
63
|
+
markdown: import_zod.z.string().describe(
|
|
64
|
+
"Main report body in markdown. Use sections for findings, risks, and recommendations. To place a chart inline at a specific position, insert placeholders like {{chart:1}}, {{chart:2}}."
|
|
65
|
+
),
|
|
66
|
+
charts: import_zod.z.array(chartSchema).optional().describe(
|
|
67
|
+
"Charts included in the report. Put full ECharts options here directly instead of generating charts in a separate step."
|
|
68
|
+
),
|
|
69
|
+
fileName: import_zod.z.string().optional().describe("Optional export file name without extension.")
|
|
70
|
+
})
|
|
71
|
+
},
|
|
72
|
+
invoke: async (_ctx, args) => {
|
|
73
|
+
var _a;
|
|
74
|
+
return {
|
|
75
|
+
status: "success",
|
|
76
|
+
content: JSON.stringify({
|
|
77
|
+
title: args.title,
|
|
78
|
+
chartCount: ((_a = args.charts) == null ? void 0 : _a.length) ?? 0,
|
|
79
|
+
fileName: args.fileName ?? null
|
|
80
|
+
})
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
});
|
|
@@ -44,6 +44,7 @@ var import_zod = require("zod");
|
|
|
44
44
|
var import_package = __toESM(require("../../../package.json"));
|
|
45
45
|
var chartGenerator_default = (0, import_ai.defineTools)({
|
|
46
46
|
scope: "GENERAL",
|
|
47
|
+
defaultPermission: "ALLOW",
|
|
47
48
|
introduction: {
|
|
48
49
|
title: `{{t("Chart generator", { ns: "${import_package.default.name}" })}}`,
|
|
49
50
|
about: `{{t("Generates ECharts options (JSON) based on user input or data context.", { ns: "${import_package.default.name}" })}}`
|
|
@@ -56,7 +56,7 @@ var getSkill_default = (0, import_ai.defineTools)({
|
|
|
56
56
|
skillName: import_zod.z.string().describe("Name of skill to load")
|
|
57
57
|
})
|
|
58
58
|
},
|
|
59
|
-
invoke: async (ctx, args
|
|
59
|
+
invoke: async (ctx, args) => {
|
|
60
60
|
const target = await ctx.app.aiManager.skillsManager.getSkills(args.skillName);
|
|
61
61
|
if (!target) {
|
|
62
62
|
return {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
declare const _default: import("@nocobase/ai").ToolsOptions;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
var __create = Object.create;
|
|
11
|
+
var __defProp = Object.defineProperty;
|
|
12
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
14
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
15
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
16
|
+
var __export = (target, all) => {
|
|
17
|
+
for (var name in all)
|
|
18
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
19
|
+
};
|
|
20
|
+
var __copyProps = (to, from, except, desc) => {
|
|
21
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
22
|
+
for (let key of __getOwnPropNames(from))
|
|
23
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
24
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
25
|
+
}
|
|
26
|
+
return to;
|
|
27
|
+
};
|
|
28
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
29
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
30
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
31
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
32
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
33
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
34
|
+
mod
|
|
35
|
+
));
|
|
36
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
37
|
+
var dispatch_sub_agent_task_exports = {};
|
|
38
|
+
__export(dispatch_sub_agent_task_exports, {
|
|
39
|
+
default: () => dispatch_sub_agent_task_default
|
|
40
|
+
});
|
|
41
|
+
module.exports = __toCommonJS(dispatch_sub_agent_task_exports);
|
|
42
|
+
var import_ai = require("@nocobase/ai");
|
|
43
|
+
var import_zod = require("zod");
|
|
44
|
+
var import_shared = require("./shared");
|
|
45
|
+
var import_package = __toESM(require("../../../../package.json"));
|
|
46
|
+
var dispatch_sub_agent_task_default = (0, import_ai.defineTools)({
|
|
47
|
+
scope: "SPECIFIED",
|
|
48
|
+
defaultPermission: "ALLOW",
|
|
49
|
+
introduction: {
|
|
50
|
+
title: `{{t("AI employee task dispatching", { ns: "${import_package.default.name}" })}}`,
|
|
51
|
+
about: `{{t("Awaken and assign specific tasks to ai employees", { ns: "${import_package.default.name}" })}}`
|
|
52
|
+
},
|
|
53
|
+
definition: {
|
|
54
|
+
name: "dispatch-sub-agent-task",
|
|
55
|
+
description: "Dispatch a question to a target AI employee and return the sub-session result.",
|
|
56
|
+
schema: import_zod.z.object({
|
|
57
|
+
username: import_zod.z.string().describe("The username of the target AI employee."),
|
|
58
|
+
question: import_zod.z.string().describe("The question or task that should be executed by the target AI employee.")
|
|
59
|
+
})
|
|
60
|
+
},
|
|
61
|
+
async invoke(ctx, { username, question }, { toolCallId, writer }) {
|
|
62
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
63
|
+
const sessionId = (_c = (_b = (_a = ctx.action) == null ? void 0 : _a.params) == null ? void 0 : _b.values) == null ? void 0 : _c.sessionId;
|
|
64
|
+
const userId = (_e = (_d = ctx.auth) == null ? void 0 : _d.user) == null ? void 0 : _e.id;
|
|
65
|
+
if (!userId) {
|
|
66
|
+
throw new Error("User not authenticated");
|
|
67
|
+
}
|
|
68
|
+
const plugin = (0, import_shared.getAIPlugin)(ctx);
|
|
69
|
+
const employee = await (0, import_shared.getAccessibleAIEmployee)(ctx, username);
|
|
70
|
+
if (!employee) {
|
|
71
|
+
throw new Error(`AI employee "${username}" not found`);
|
|
72
|
+
}
|
|
73
|
+
let subSessionId;
|
|
74
|
+
const skillSettings = await (0, import_shared.getSkillSettingsFromMain)(ctx);
|
|
75
|
+
const existedConversation = await plugin.aiConversationsManager.resolveSubAgentConversation(sessionId, toolCallId);
|
|
76
|
+
if (existedConversation) {
|
|
77
|
+
subSessionId = existedConversation.sessionId;
|
|
78
|
+
} else {
|
|
79
|
+
const newConversation = await plugin.aiConversationsManager.create({
|
|
80
|
+
userId,
|
|
81
|
+
aiEmployee: {
|
|
82
|
+
username: employee.get("username")
|
|
83
|
+
},
|
|
84
|
+
title: question.slice(0, 30),
|
|
85
|
+
from: "sub-agent",
|
|
86
|
+
options: {
|
|
87
|
+
skillSettings
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
subSessionId = newConversation.sessionId;
|
|
91
|
+
}
|
|
92
|
+
await (0, import_shared.updateMessageMetadata)(ctx, toolCallId, subSessionId, "pending");
|
|
93
|
+
const answer = await plugin.subAgentsDispatcher.run({
|
|
94
|
+
ctx,
|
|
95
|
+
sessionId: subSessionId,
|
|
96
|
+
employee,
|
|
97
|
+
model: ((_h = (_g = (_f = ctx.action) == null ? void 0 : _f.params) == null ? void 0 : _g.values) == null ? void 0 : _h.model) ?? employee.get("modelSettings"),
|
|
98
|
+
question,
|
|
99
|
+
skillSettings,
|
|
100
|
+
writer
|
|
101
|
+
});
|
|
102
|
+
await (0, import_shared.updateMessageMetadata)(ctx, toolCallId, subSessionId, "completed");
|
|
103
|
+
return {
|
|
104
|
+
sessionId: subSessionId,
|
|
105
|
+
answer
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
declare const _default: import("@nocobase/ai").ToolsOptions;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
var __create = Object.create;
|
|
11
|
+
var __defProp = Object.defineProperty;
|
|
12
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
14
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
15
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
16
|
+
var __export = (target, all) => {
|
|
17
|
+
for (var name in all)
|
|
18
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
19
|
+
};
|
|
20
|
+
var __copyProps = (to, from, except, desc) => {
|
|
21
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
22
|
+
for (let key of __getOwnPropNames(from))
|
|
23
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
24
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
25
|
+
}
|
|
26
|
+
return to;
|
|
27
|
+
};
|
|
28
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
29
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
30
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
31
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
32
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
33
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
34
|
+
mod
|
|
35
|
+
));
|
|
36
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
37
|
+
var get_ai_employee_exports = {};
|
|
38
|
+
__export(get_ai_employee_exports, {
|
|
39
|
+
default: () => get_ai_employee_default
|
|
40
|
+
});
|
|
41
|
+
module.exports = __toCommonJS(get_ai_employee_exports);
|
|
42
|
+
var import_ai = require("@nocobase/ai");
|
|
43
|
+
var import_zod = require("zod");
|
|
44
|
+
var import_shared = require("./shared");
|
|
45
|
+
var import_package = __toESM(require("../../../../package.json"));
|
|
46
|
+
var get_ai_employee_default = (0, import_ai.defineTools)({
|
|
47
|
+
scope: "SPECIFIED",
|
|
48
|
+
defaultPermission: "ALLOW",
|
|
49
|
+
introduction: {
|
|
50
|
+
title: `{{t("Get AI employee", { ns: "${import_package.default.name}" })}}`,
|
|
51
|
+
about: `{{t("Get the detailed definition of AI employee", { ns: "${import_package.default.name}" })}}`
|
|
52
|
+
},
|
|
53
|
+
definition: {
|
|
54
|
+
name: "get-ai-employee",
|
|
55
|
+
description: "Get the detailed profile of one accessible AI employee by username.",
|
|
56
|
+
schema: import_zod.z.object({
|
|
57
|
+
username: import_zod.z.string().describe("The username of the AI employee.")
|
|
58
|
+
})
|
|
59
|
+
},
|
|
60
|
+
async invoke(ctx, args) {
|
|
61
|
+
const employee = await (0, import_shared.getAccessibleAIEmployee)(ctx, args.username);
|
|
62
|
+
if (!employee) {
|
|
63
|
+
throw new Error(`AI employee "${args.username}" not found`);
|
|
64
|
+
}
|
|
65
|
+
return (0, import_shared.serializeEmployeeDetail)(ctx, employee);
|
|
66
|
+
}
|
|
67
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
declare const _default: import("@nocobase/ai").ToolsOptions;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
var __create = Object.create;
|
|
11
|
+
var __defProp = Object.defineProperty;
|
|
12
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
14
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
15
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
16
|
+
var __export = (target, all) => {
|
|
17
|
+
for (var name in all)
|
|
18
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
19
|
+
};
|
|
20
|
+
var __copyProps = (to, from, except, desc) => {
|
|
21
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
22
|
+
for (let key of __getOwnPropNames(from))
|
|
23
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
24
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
25
|
+
}
|
|
26
|
+
return to;
|
|
27
|
+
};
|
|
28
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
29
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
30
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
31
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
32
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
33
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
34
|
+
mod
|
|
35
|
+
));
|
|
36
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
37
|
+
var list_ai_employees_exports = {};
|
|
38
|
+
__export(list_ai_employees_exports, {
|
|
39
|
+
default: () => list_ai_employees_default
|
|
40
|
+
});
|
|
41
|
+
module.exports = __toCommonJS(list_ai_employees_exports);
|
|
42
|
+
var import_ai = require("@nocobase/ai");
|
|
43
|
+
var import_zod = require("zod");
|
|
44
|
+
var import_shared = require("./shared");
|
|
45
|
+
var import_package = __toESM(require("../../../../package.json"));
|
|
46
|
+
var list_ai_employees_default = (0, import_ai.defineTools)({
|
|
47
|
+
scope: "SPECIFIED",
|
|
48
|
+
defaultPermission: "ALLOW",
|
|
49
|
+
introduction: {
|
|
50
|
+
title: `{{t("List AI employee", { ns: "${import_package.default.name}" })}}`,
|
|
51
|
+
about: `{{t("Get the list of available AI employees", { ns: "${import_package.default.name}" })}}`
|
|
52
|
+
},
|
|
53
|
+
definition: {
|
|
54
|
+
name: "list-ai-employees",
|
|
55
|
+
description: "List accessible AI employees with their basic profile and skill settings.",
|
|
56
|
+
schema: import_zod.z.object({}).describe("No input is required.")
|
|
57
|
+
},
|
|
58
|
+
async invoke(ctx) {
|
|
59
|
+
const employees = await (0, import_shared.listAccessibleAIEmployees)(ctx);
|
|
60
|
+
return {
|
|
61
|
+
aiEmployees: employees.map((employee) => (0, import_shared.serializeEmployeeSummary)(ctx, employee))
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
});
|