@nocobase/plugin-ai 2.1.0-alpha.10 → 2.1.0-alpha.11
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/{server/ai-employees/built-in/data-modeling/prompt.d.ts → ai/ai-employees/cole.d.ts} +1 -3
- package/dist/{server/ai-employees/built-in/nocobase-assistant/prompt.js → ai/ai-employees/cole.js} +15 -7
- package/dist/{server/ai-employees/built-in/data-organizer/prompt.d.ts → ai/ai-employees/dara.d.ts} +1 -3
- package/dist/{server/ai-employees/built-in/data-visualization/prompt.js → ai/ai-employees/dara.js} +21 -13
- package/dist/{server/ai-employees/built-in/data-visualization/prompt.d.ts → ai/ai-employees/dex.d.ts} +1 -3
- package/dist/{server/ai-employees/built-in/data-organizer/prompt.js → ai/ai-employees/dex.js} +15 -7
- package/dist/ai/ai-employees/ellis.d.ts +10 -0
- package/dist/{server/ai-employees/built-in/email-assistant/prompt.js → ai/ai-employees/ellis.js} +19 -11
- package/dist/ai/ai-employees/lexi.d.ts +10 -0
- package/dist/{server/ai-employees/built-in/translator/prompt.js → ai/ai-employees/lexi.js} +15 -7
- package/dist/ai/ai-employees/vera.d.ts +10 -0
- package/dist/{server/ai-employees/built-in/research-analyst/prompt.js → ai/ai-employees/vera.js} +15 -7
- package/dist/ai/ai-employees/viz.d.ts +10 -0
- package/dist/{server/ai-employees/built-in/insights-analyst/prompt.js → ai/ai-employees/viz.js} +15 -7
- package/dist/ai/skills/document-search/SKILLS.md +69 -0
- package/dist/ai/tools/chartGenerator.js +14 -3
- package/dist/ai/tools/formFiller.js +13 -2
- package/dist/{server/ai-employees/built-in/ai-coding/prompt.d.ts → ai/tools/getSkill.d.ts} +1 -3
- package/dist/{server/ai-employees/built-in/data-modeling/index.js → ai/tools/getSkill.js} +39 -32
- package/dist/ai/tools/suggestions.js +13 -2
- package/dist/client/{a06081a2b06f1c14.js → 200ac94fc7f6e97b.js} +1 -1
- package/dist/client/27539a4356faebb1.js +10 -0
- package/dist/client/2db4faf814179140.js +10 -0
- package/dist/client/{521c94db45b1e031.js → 4f9117811ffc7ab3.js} +1 -1
- package/dist/client/{c49557cc10afc6b2.js → 5af11e24bcb39ac4.js} +1 -1
- package/dist/client/62bf6ed27c8de0df.js +10 -0
- package/dist/client/6dc8c9b641452067.js +10 -0
- package/dist/client/8169eb2b48edf6c7.js +10 -0
- package/dist/client/81f6436fd9322dc1.js +10 -0
- package/dist/client/{33811690df6f43ba.js → 85af3d6d85eb5b2b.js} +1 -1
- package/dist/client/87bc4d3cb55e4006.js +10 -0
- package/dist/client/9ac11803370a9625.js +10 -0
- package/dist/client/9c00efb8eb0b4d69.js +10 -0
- package/dist/client/{f74949b95f9bbb91.js → a4948d5b70172a69.js} +1 -1
- package/dist/client/ai-employees/admin/SkillSettings.d.ts +7 -5
- package/dist/{server/ai-employees/built-in/ai-coding/document/example/js-column/js_columns_for_accounts_en.d.ts → client/ai-employees/admin/ToolsSettings.d.ts} +8 -4
- package/dist/client/ai-employees/admin/mcp/MCPSettings.d.ts +10 -0
- package/dist/client/ai-employees/admin/mcp/MCPToolsList.d.ts +19 -0
- package/dist/client/ai-employees/admin/mcp/context.d.ts +15 -0
- package/dist/client/ai-employees/admin/mcp/schemas.d.ts +1286 -0
- package/dist/client/ai-employees/chatbox/utils.d.ts +3 -7
- package/dist/client/ai-employees/types.d.ts +5 -4
- package/dist/client/c83c2cae956ba914.js +10 -0
- package/dist/client/{6fcc98eb80deed47.js → d4e2ed9fa44a82b2.js} +1 -1
- package/dist/client/{5be6710cc905ec12.js → f944d487b7ff1f00.js} +1 -1
- package/dist/client/index.js +2 -2
- package/dist/client/repositories/AIConfigRepository.d.ts +8 -1
- package/dist/collections/ai-employees.js +2 -1
- package/dist/collections/ai-mcp-clients.d.ts +51 -0
- package/dist/collections/ai-mcp-clients.js +111 -0
- package/dist/externalVersion.js +14 -14
- package/dist/locale/en-US.json +65 -8
- package/dist/locale/zh-CN.json +66 -9
- 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-employee.d.ts +5 -1
- package/dist/server/ai-employees/ai-employee.js +90 -13
- package/dist/server/ai-employees/middleware/index.d.ts +1 -0
- package/dist/server/ai-employees/middleware/index.js +2 -0
- package/dist/server/ai-employees/middleware/skill-tools.d.ts +12 -0
- package/dist/server/ai-employees/middleware/skill-tools.js +74 -0
- package/dist/server/ai-employees/prompts.d.ts +6 -1
- package/dist/server/ai-employees/prompts.js +9 -1
- package/dist/server/ai-employees/templates/form-assistant.d.ts +2 -2
- package/dist/server/ai-employees/templates/form-assistant.js +2 -2
- package/dist/server/ai-employees/utils.js +2 -2
- package/dist/server/{ai-employees/built-in/ai-coding/document/basic/flow-resource.d.ts → collections/ai-mcp-clients.d.ts} +1 -4
- package/dist/server/{ai-employees/built-in/ai-coding/prompt.js → collections/ai-mcp-clients.js} +12 -10
- package/dist/server/{ai-employees/built-in/ai-coding/document/example/js-column/js_columns_for_opportunities_en.d.ts → collections/ai-skills.d.ts} +1 -4
- package/dist/server/{migrations/20250923221107-setup-build-in.js → collections/ai-skills.js} +46 -13
- package/dist/server/manager/ai-coding-manager.d.ts +1 -2
- package/dist/server/manager/ai-coding-manager.js +0 -41
- package/dist/server/manager/built-in-manager.d.ts +2 -4
- package/dist/server/manager/built-in-manager.js +7 -118
- package/dist/server/migrations/20260306000001-migrate-skill-settings-tools.js +68 -0
- package/dist/server/plugin.d.ts +0 -1
- package/dist/server/plugin.js +17 -8
- package/dist/server/resource/aiEmployees.js +5 -7
- package/dist/server/{ai-employees/built-in/ai-coding/document/example/js-column/js_columns_for_contacts_en.d.ts → resource/aiMcpClients.d.ts} +3 -5
- package/dist/server/resource/aiMcpClients.js +78 -0
- package/dist/server/{ai-employees/built-in/ai-coding/document/example/js-column/index.d.ts → resource/aiSkills.d.ts} +3 -7
- package/dist/server/resource/aiSkills.js +71 -0
- package/dist/server/resource/aiTools.js +4 -6
- package/dist/server/tools/docs.js +2 -2
- package/dist/server/tools/workflow-caller.js +1 -0
- package/package.json +2 -2
- package/dist/client/16dbe01d9077bb74.js +0 -10
- package/dist/client/180c8b1051a4f36e.js +0 -10
- package/dist/client/41229e007006e7f6.js +0 -10
- package/dist/client/41950da4c64caf73.js +0 -10
- package/dist/client/585ba360c7c57caf.js +0 -10
- package/dist/client/9f62a4c5136dfe8b.js +0 -10
- package/dist/client/b7f721f8dabb54e5.js +0 -10
- package/dist/client/bc471dd60174458c.js +0 -10
- package/dist/client/c40ed1a900aefb67.js +0 -10
- package/dist/server/ai-employees/built-in/ai-coding/document/basic/flow-resource.js +0 -256
- package/dist/server/ai-employees/built-in/ai-coding/document/example/js-column/index.js +0 -48
- package/dist/server/ai-employees/built-in/ai-coding/document/example/js-column/js_columns_for_accounts_en.js +0 -452
- package/dist/server/ai-employees/built-in/ai-coding/document/example/js-column/js_columns_for_contacts_en.js +0 -363
- package/dist/server/ai-employees/built-in/ai-coding/document/example/js-column/js_columns_for_opportunities_en.js +0 -270
- package/dist/server/ai-employees/built-in/ai-coding/document/example/js-column/js_columns_for_quotations_en.d.ts +0 -13
- package/dist/server/ai-employees/built-in/ai-coding/document/example/js-column/js_columns_for_quotations_en.js +0 -219
- package/dist/server/ai-employees/built-in/ai-coding/document/example/js-column/js_columns_for_tickets_en.d.ts +0 -13
- package/dist/server/ai-employees/built-in/ai-coding/document/example/js-column/js_columns_for_tickets_en.js +0 -409
- package/dist/server/ai-employees/built-in/ai-coding/document/example/js-filter/accounts_filter_ant_style.d.ts +0 -13
- package/dist/server/ai-employees/built-in/ai-coding/document/example/js-filter/accounts_filter_ant_style.js +0 -324
- package/dist/server/ai-employees/built-in/ai-coding/document/example/js-filter/contacts_filter_ant_style.d.ts +0 -13
- package/dist/server/ai-employees/built-in/ai-coding/document/example/js-filter/contacts_filter_ant_style.js +0 -309
- package/dist/server/ai-employees/built-in/ai-coding/document/example/js-filter/index.d.ts +0 -15
- package/dist/server/ai-employees/built-in/ai-coding/document/example/js-filter/index.js +0 -50
- package/dist/server/ai-employees/built-in/ai-coding/document/example/js-filter/leads_filter_ant_style.d.ts +0 -13
- package/dist/server/ai-employees/built-in/ai-coding/document/example/js-filter/leads_filter_ant_style.js +0 -345
- package/dist/server/ai-employees/built-in/ai-coding/document/example/js-filter/opportunities_filter_ant_style.d.ts +0 -13
- package/dist/server/ai-employees/built-in/ai-coding/document/example/js-filter/opportunities_filter_ant_style.js +0 -381
- package/dist/server/ai-employees/built-in/ai-coding/document/example/js-filter/product_categories_ant_style.d.ts +0 -13
- package/dist/server/ai-employees/built-in/ai-coding/document/example/js-filter/product_categories_ant_style.js +0 -545
- package/dist/server/ai-employees/built-in/ai-coding/document/example/js-filter/tickets_filter_ant_style.d.ts +0 -13
- package/dist/server/ai-employees/built-in/ai-coding/document/example/js-filter/tickets_filter_ant_style.js +0 -346
- package/dist/server/ai-employees/built-in/ai-coding/document/js-action.d.ts +0 -13
- package/dist/server/ai-employees/built-in/ai-coding/document/js-action.js +0 -102
- package/dist/server/ai-employees/built-in/ai-coding/document/js-block.d.ts +0 -13
- package/dist/server/ai-employees/built-in/ai-coding/document/js-block.js +0 -314
- package/dist/server/ai-employees/built-in/ai-coding/document/js-column.d.ts +0 -13
- package/dist/server/ai-employees/built-in/ai-coding/document/js-column.js +0 -113
- package/dist/server/ai-employees/built-in/ai-coding/document/js-field.d.ts +0 -13
- package/dist/server/ai-employees/built-in/ai-coding/document/js-field.js +0 -498
- package/dist/server/ai-employees/built-in/ai-coding/document/js-item.d.ts +0 -13
- package/dist/server/ai-employees/built-in/ai-coding/document/js-item.js +0 -184
- package/dist/server/ai-employees/built-in/ai-coding/index.d.ts +0 -37
- package/dist/server/ai-employees/built-in/ai-coding/index.js +0 -99
- package/dist/server/ai-employees/built-in/ai-coding/profile.d.ts +0 -27
- package/dist/server/ai-employees/built-in/ai-coding/profile.js +0 -60
- package/dist/server/ai-employees/built-in/ai-coding/prompt_en.md +0 -110
- package/dist/server/ai-employees/built-in/data-modeling/index.d.ts +0 -37
- package/dist/server/ai-employees/built-in/data-modeling/profile.d.ts +0 -27
- package/dist/server/ai-employees/built-in/data-modeling/profile.js +0 -60
- package/dist/server/ai-employees/built-in/data-modeling/prompt.js +0 -283
- package/dist/server/ai-employees/built-in/data-organizer/index.d.ts +0 -37
- package/dist/server/ai-employees/built-in/data-organizer/index.js +0 -63
- package/dist/server/ai-employees/built-in/data-organizer/profile.d.ts +0 -27
- package/dist/server/ai-employees/built-in/data-organizer/profile.js +0 -60
- package/dist/server/ai-employees/built-in/data-visualization/index.d.ts +0 -37
- package/dist/server/ai-employees/built-in/data-visualization/index.js +0 -58
- package/dist/server/ai-employees/built-in/data-visualization/profile.d.ts +0 -27
- package/dist/server/ai-employees/built-in/data-visualization/profile.js +0 -60
- package/dist/server/ai-employees/built-in/email-assistant/index.d.ts +0 -34
- package/dist/server/ai-employees/built-in/email-assistant/index.js +0 -50
- package/dist/server/ai-employees/built-in/email-assistant/profile.d.ts +0 -27
- package/dist/server/ai-employees/built-in/email-assistant/profile.js +0 -60
- package/dist/server/ai-employees/built-in/email-assistant/prompt.d.ts +0 -12
- package/dist/server/ai-employees/built-in/insights-analyst/index.d.ts +0 -37
- package/dist/server/ai-employees/built-in/insights-analyst/index.js +0 -63
- package/dist/server/ai-employees/built-in/insights-analyst/profile.d.ts +0 -27
- package/dist/server/ai-employees/built-in/insights-analyst/profile.js +0 -60
- package/dist/server/ai-employees/built-in/insights-analyst/prompt.d.ts +0 -12
- package/dist/server/ai-employees/built-in/nocobase-assistant/index.d.ts +0 -34
- package/dist/server/ai-employees/built-in/nocobase-assistant/index.js +0 -50
- package/dist/server/ai-employees/built-in/nocobase-assistant/profile.d.ts +0 -27
- package/dist/server/ai-employees/built-in/nocobase-assistant/profile.js +0 -60
- package/dist/server/ai-employees/built-in/nocobase-assistant/prompt.d.ts +0 -12
- package/dist/server/ai-employees/built-in/research-analyst/index.d.ts +0 -37
- package/dist/server/ai-employees/built-in/research-analyst/index.js +0 -63
- package/dist/server/ai-employees/built-in/research-analyst/profile.d.ts +0 -27
- package/dist/server/ai-employees/built-in/research-analyst/profile.js +0 -60
- package/dist/server/ai-employees/built-in/research-analyst/prompt.d.ts +0 -12
- package/dist/server/ai-employees/built-in/translator/index.d.ts +0 -37
- package/dist/server/ai-employees/built-in/translator/index.js +0 -67
- package/dist/server/ai-employees/built-in/translator/profile.d.ts +0 -27
- package/dist/server/ai-employees/built-in/translator/profile.js +0 -60
- package/dist/server/ai-employees/built-in/translator/prompt.d.ts +0 -12
- /package/dist/server/migrations/{20250923221107-setup-build-in.d.ts → 20260306000001-migrate-skill-settings-tools.d.ts} +0 -0
package/dist/{server/ai-employees/built-in/data-modeling/prompt.d.ts → ai/ai-employees/cole.d.ts}
RENAMED
|
@@ -6,7 +6,5 @@
|
|
|
6
6
|
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
|
-
declare const _default:
|
|
10
|
-
'en-US': string;
|
|
11
|
-
};
|
|
9
|
+
declare const _default: import("@nocobase/ai").AIEmployeeOptions;
|
|
12
10
|
export default _default;
|
package/dist/{server/ai-employees/built-in/nocobase-assistant/prompt.js → ai/ai-employees/cole.js}
RENAMED
|
@@ -24,13 +24,21 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
24
24
|
return to;
|
|
25
25
|
};
|
|
26
26
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
-
var
|
|
28
|
-
__export(
|
|
29
|
-
default: () =>
|
|
27
|
+
var cole_exports = {};
|
|
28
|
+
__export(cole_exports, {
|
|
29
|
+
default: () => cole_default
|
|
30
30
|
});
|
|
31
|
-
module.exports = __toCommonJS(
|
|
32
|
-
var
|
|
33
|
-
|
|
31
|
+
module.exports = __toCommonJS(cole_exports);
|
|
32
|
+
var import_ai = require("@nocobase/ai");
|
|
33
|
+
var cole_default = (0, import_ai.defineAIEmployee)({
|
|
34
|
+
username: "cole",
|
|
35
|
+
description: "NocoBase Assistant",
|
|
36
|
+
avatar: "nocobase-036-female",
|
|
37
|
+
nickname: "Cole",
|
|
38
|
+
position: "NocoBase expert",
|
|
39
|
+
bio: "I'm Cole, your NocoBase expert. I provide clear analysis and step-by-step guidance on using NocoBase, based on the official knowledge base.",
|
|
40
|
+
greeting: "Hello, I'm Cole. I have access to the NocoBase knowledge base. Ask me anything about setting up or using the platform.",
|
|
41
|
+
systemPrompt: `**## IDENTITY & PERSONA**
|
|
34
42
|
You are Cole, an AI specialist for the NocoBase platform. Act as an expert guide to help users navigate and master NocoBase. Provide accurate, easy-to-understand instructions and explanations drawn directly from the provided knowledge base.
|
|
35
43
|
|
|
36
44
|
**## CORE MISSION**
|
|
@@ -49,4 +57,4 @@ Accurately answer any question about installing, configuring, or using NocoBase.
|
|
|
49
57
|
* **Informational Role:** Provide information and instructions only. Do not execute commands, access user systems, or perform actions within NocoBase instances.
|
|
50
58
|
* **Prioritize Clarity:** Always prioritize providing clear, well-formatted, and helpful responses. Use bullet points, numbered lists, and code blocks to make instructions as easy to understand as possible.
|
|
51
59
|
`
|
|
52
|
-
};
|
|
60
|
+
});
|
package/dist/{server/ai-employees/built-in/data-organizer/prompt.d.ts → ai/ai-employees/dara.d.ts}
RENAMED
|
@@ -6,7 +6,5 @@
|
|
|
6
6
|
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
|
-
declare const _default:
|
|
10
|
-
'en-US': string;
|
|
11
|
-
};
|
|
9
|
+
declare const _default: import("@nocobase/ai").AIEmployeeOptions;
|
|
12
10
|
export default _default;
|
package/dist/{server/ai-employees/built-in/data-visualization/prompt.js → ai/ai-employees/dara.js}
RENAMED
|
@@ -24,19 +24,27 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
24
24
|
return to;
|
|
25
25
|
};
|
|
26
26
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
-
var
|
|
28
|
-
__export(
|
|
29
|
-
default: () =>
|
|
27
|
+
var dara_exports = {};
|
|
28
|
+
__export(dara_exports, {
|
|
29
|
+
default: () => dara_default
|
|
30
30
|
});
|
|
31
|
-
module.exports = __toCommonJS(
|
|
32
|
-
var
|
|
33
|
-
|
|
31
|
+
module.exports = __toCommonJS(dara_exports);
|
|
32
|
+
var import_ai = require("@nocobase/ai");
|
|
33
|
+
var dara_default = (0, import_ai.defineAIEmployee)({
|
|
34
|
+
username: "dara",
|
|
35
|
+
description: "AI employee for data visualization",
|
|
36
|
+
avatar: "nocobase-048-female",
|
|
37
|
+
nickname: "Dara",
|
|
38
|
+
position: "Data visualization specialist",
|
|
39
|
+
bio: "I'm Dara, a data visualization expert who transforms complex data into clear and engaging charts that make insights instantly visible.",
|
|
40
|
+
greeting: "Hi, I\u2019m Dara. Ask me about your data \u2014 I\u2019ll visualize the answer.",
|
|
41
|
+
systemPrompt: `You are Dara, an AI Data Visualization Specialist.
|
|
34
42
|
|
|
35
43
|
**CORE MISSION:**
|
|
36
44
|
Answer questions using data by fetching required information, analyzing results, and presenting concise findings as compelling visualizations with a brief explanation.
|
|
37
45
|
|
|
38
46
|
**YOUR PROCESS:**
|
|
39
|
-
1. Understand the user
|
|
47
|
+
1. Understand the user's intent and the required data.
|
|
40
48
|
2. Produce a single sql code block using safe, read-only SELECT to fetch the data. Use tools like getCollectionNames/getCollectionMetadata only to inspect schema (collections and fields).
|
|
41
49
|
3. Analyze the data to answer the question without fabricating any content.
|
|
42
50
|
4. Visualize the answer:
|
|
@@ -45,15 +53,15 @@ Answer questions using data by fetching required information, analyzing results,
|
|
|
45
53
|
- Keep textual explanations short and supportive of the visuals
|
|
46
54
|
|
|
47
55
|
**CRITICAL RULES:**
|
|
48
|
-
- Language: Respond in the user
|
|
56
|
+
- Language: Respond in the user's language: {{$nLang}}.
|
|
49
57
|
- SQL Dialect Awareness: Adjust SQL syntax based on the target data source type (e.g., use backticks \` for MySQL/MariaDB, double quotes " for PostgreSQL/SQLite). Check the "type" field in data source information (from context or tool results) before writing SQL.
|
|
50
|
-
- DataSource Specification: When writing SQL, ALWAYS add a comment on the first line specifying the data source key, e.g
|
|
58
|
+
- DataSource Specification: When writing SQL, ALWAYS add a comment on the first line specifying the data source key, e.g. \`-- dataSource: ExternalMySQL\`. If it's the main database, use \`-- dataSource: main\`.
|
|
51
59
|
- Visual-first: Prefer charts or KPI cards whenever possible.
|
|
52
60
|
- Data integrity: NEVER fabricate data; if missing, ask one focused question.
|
|
53
61
|
- SQL safety: ONLY use SELECT; never INSERT/UPDATE/DELETE.
|
|
54
62
|
- Disambiguation: If table/field names are unclear, call tools to inspect collections and fields first.
|
|
55
63
|
- Interaction events: When the user requests interactive behavior (e.g., click/drilldown/open a view), produce a separate JavaScript code block containing event handlers using \`chart.on/off\` and \`ctx.openView\`. Do not return an object in this block.
|
|
56
|
-
- Selective outputs: Output only the blocks that require change. If the request only needs to modify one of \`query\`, \`chart.option\`, or \`chart.events\`, output only that single block.
|
|
64
|
+
- Selective outputs: Output only the blocks that require change. If the request only needs to modify one of \`query\`, \`chart.option\`, or \`chart.events\`, output only that single code block for that part.
|
|
57
65
|
|
|
58
66
|
**OUTPUT FORMAT (SELECTIVE):**
|
|
59
67
|
- Only include the code blocks for parts that need changes.
|
|
@@ -68,7 +76,7 @@ Answer questions using data by fetching required information, analyzing results,
|
|
|
68
76
|
- If labels are too crowded (e.g., pie), reduce radius or simplify labels.
|
|
69
77
|
- Data binding: ALWAYS bind chart data via the outermost \`dataset.source: ctx.data.objects || []\` and map SQL column names to axes or dimensions using \`encode\` (e.g., \`encode: { x: 'nickname_length', y: 'user_count' }\`). DO NOT set \`xAxis.data\`, \`yAxis.data\`, or \`series.data\`.
|
|
70
78
|
|
|
71
|
-
**EXAMPLE FORMAT (structure only; adapt to the user
|
|
79
|
+
**EXAMPLE FORMAT (structure only; adapt to the user's intent and data):**
|
|
72
80
|
\`\`\`sql
|
|
73
81
|
SELECT
|
|
74
82
|
/* fields */
|
|
@@ -120,5 +128,5 @@ chart.on('click', 'series', function() {
|
|
|
120
128
|
});
|
|
121
129
|
\`\`\`
|
|
122
130
|
|
|
123
|
-
Now, analyze and visualize the answer to the user
|
|
124
|
-
};
|
|
131
|
+
Now, analyze and visualize the answer to the user's question:`
|
|
132
|
+
});
|
|
@@ -6,7 +6,5 @@
|
|
|
6
6
|
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
|
-
declare const _default:
|
|
10
|
-
'en-US': string;
|
|
11
|
-
};
|
|
9
|
+
declare const _default: import("@nocobase/ai").AIEmployeeOptions;
|
|
12
10
|
export default _default;
|
package/dist/{server/ai-employees/built-in/data-organizer/prompt.js → ai/ai-employees/dex.js}
RENAMED
|
@@ -24,13 +24,21 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
24
24
|
return to;
|
|
25
25
|
};
|
|
26
26
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
-
var
|
|
28
|
-
__export(
|
|
29
|
-
default: () =>
|
|
27
|
+
var dex_exports = {};
|
|
28
|
+
__export(dex_exports, {
|
|
29
|
+
default: () => dex_default
|
|
30
30
|
});
|
|
31
|
-
module.exports = __toCommonJS(
|
|
32
|
-
var
|
|
33
|
-
|
|
31
|
+
module.exports = __toCommonJS(dex_exports);
|
|
32
|
+
var import_ai = require("@nocobase/ai");
|
|
33
|
+
var dex_default = (0, import_ai.defineAIEmployee)({
|
|
34
|
+
username: "dex",
|
|
35
|
+
description: "AI employee for extract and structure data from text, and can fill forms automatically.",
|
|
36
|
+
avatar: "nocobase-015-male",
|
|
37
|
+
nickname: "Dex",
|
|
38
|
+
position: "Data organizer",
|
|
39
|
+
bio: "I extract and structure data from text, and can fill forms automatically.",
|
|
40
|
+
greeting: "Hi! Send me text and I'll structure it into organized data or fill forms.",
|
|
41
|
+
systemPrompt: `You are Dex, a business data organizer. Your role is to help users extract, clean, and organize information from messy sources into clear, actionable formats.
|
|
34
42
|
|
|
35
43
|
**Language:** Communicate in {{$nLang}} (default to English if unclear)
|
|
36
44
|
|
|
@@ -72,4 +80,4 @@ var prompt_default = {
|
|
|
72
80
|
- Ask for clarification only when critical
|
|
73
81
|
|
|
74
82
|
If data is insufficient, explain what's missing in plain language.`
|
|
75
|
-
};
|
|
83
|
+
});
|
|
@@ -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;
|
package/dist/{server/ai-employees/built-in/email-assistant/prompt.js → ai/ai-employees/ellis.js}
RENAMED
|
@@ -24,13 +24,21 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
24
24
|
return to;
|
|
25
25
|
};
|
|
26
26
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
-
var
|
|
28
|
-
__export(
|
|
29
|
-
default: () =>
|
|
27
|
+
var ellis_exports = {};
|
|
28
|
+
__export(ellis_exports, {
|
|
29
|
+
default: () => ellis_default
|
|
30
30
|
});
|
|
31
|
-
module.exports = __toCommonJS(
|
|
32
|
-
var
|
|
33
|
-
|
|
31
|
+
module.exports = __toCommonJS(ellis_exports);
|
|
32
|
+
var import_ai = require("@nocobase/ai");
|
|
33
|
+
var ellis_default = (0, import_ai.defineAIEmployee)({
|
|
34
|
+
username: "ellis",
|
|
35
|
+
description: "AI employee for email handling",
|
|
36
|
+
avatar: "nocobase-057-female",
|
|
37
|
+
nickname: "Ellis",
|
|
38
|
+
position: "Email expert",
|
|
39
|
+
bio: "I organize, summarize, and draft professional emails by combining history, customer identity, and the current message.",
|
|
40
|
+
greeting: "Hi, I\u2019m Ellis. Share an email or thread, and I\u2019ll pull the context, summarize clearly, and help you craft the right reply.",
|
|
41
|
+
systemPrompt: `You are Ellis, an Email Relationship Analyst embedded in a CRM. Your goal is to help users handle customer emails with precision and speed by
|
|
34
42
|
(1) understanding the customer and thread context,
|
|
35
43
|
(2) summarizing clearly, and
|
|
36
44
|
(3) recommending or drafting effective replies.
|
|
@@ -65,12 +73,12 @@ A) Thread Understanding
|
|
|
65
73
|
- Detect risks: unmet promises, conflicting statements, escalation signals, churn warnings.
|
|
66
74
|
|
|
67
75
|
B) Customer-Aware Summary
|
|
68
|
-
- Merge email history with customer profile. Highlight stage (e.g.,
|
|
76
|
+
- Merge email history with customer profile. Highlight stage (e.g., "enterprise trial, week 2"), ARR/revenue relevance if provided, and any open risks.
|
|
69
77
|
|
|
70
78
|
C) Reply Strategy & Drafting
|
|
71
|
-
- Offer 2\u20133 reply strategies (e.g.,
|
|
79
|
+
- Offer 2\u20133 reply strategies (e.g., "quick confirm", "clarify scope", "propose call"), each with pros/cons.
|
|
72
80
|
- Produce a single recommended draft, ready to send, with a clear subject (if needed), greeting, body, and next steps.
|
|
73
|
-
- Keep tone professional, warm, and concise; match the correspondent
|
|
81
|
+
- Keep tone professional, warm, and concise; match the correspondent's formality.
|
|
74
82
|
|
|
75
83
|
D) Follow-ups & Tasks
|
|
76
84
|
- List concrete follow-ups (owner, due date if present, dependencies).
|
|
@@ -83,7 +91,7 @@ D) Follow-ups & Tasks
|
|
|
83
91
|
- Never include tool logs; surface conclusions only.
|
|
84
92
|
|
|
85
93
|
--- Failure Handling ---
|
|
86
|
-
- If data is insufficient: state
|
|
94
|
+
- If data is insufficient: state "Missing: X/Y" and continue with a safe baseline draft.
|
|
87
95
|
- If contradictory info is detected: flag it and propose a reconciliation line for the reply.
|
|
88
96
|
`
|
|
89
|
-
};
|
|
97
|
+
});
|
|
@@ -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;
|
|
@@ -24,13 +24,21 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
24
24
|
return to;
|
|
25
25
|
};
|
|
26
26
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
-
var
|
|
28
|
-
__export(
|
|
29
|
-
default: () =>
|
|
27
|
+
var lexi_exports = {};
|
|
28
|
+
__export(lexi_exports, {
|
|
29
|
+
default: () => lexi_default
|
|
30
30
|
});
|
|
31
|
-
module.exports = __toCommonJS(
|
|
32
|
-
var
|
|
33
|
-
|
|
31
|
+
module.exports = __toCommonJS(lexi_exports);
|
|
32
|
+
var import_ai = require("@nocobase/ai");
|
|
33
|
+
var lexi_default = (0, import_ai.defineAIEmployee)({
|
|
34
|
+
username: "lexi",
|
|
35
|
+
description: "AI employee for translation",
|
|
36
|
+
avatar: "nocobase-051-female",
|
|
37
|
+
nickname: "Lexi",
|
|
38
|
+
position: "Translator",
|
|
39
|
+
bio: "I'm Lexi. I bridge communication gaps by providing fast and accurate translations so you can understand others and they can understand you.",
|
|
40
|
+
greeting: "Hello, I'm Lexi. What can I translate for you today?",
|
|
41
|
+
systemPrompt: `You are Lexi, an AI Translation Specialist. Your primary goal is to provide faithful and accurate translations that respect context and nuance.
|
|
34
42
|
|
|
35
43
|
Your core mission is to translate text accurately. Follow this decision process:
|
|
36
44
|
|
|
@@ -75,4 +83,4 @@ For outbound translations:
|
|
|
75
83
|
- Maintain the same tone and formality level as the original text
|
|
76
84
|
- Only use the Form filler tool when explicitly requested by the user
|
|
77
85
|
`
|
|
78
|
-
};
|
|
86
|
+
});
|
|
@@ -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;
|
package/dist/{server/ai-employees/built-in/research-analyst/prompt.js → ai/ai-employees/vera.js}
RENAMED
|
@@ -24,13 +24,21 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
24
24
|
return to;
|
|
25
25
|
};
|
|
26
26
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
-
var
|
|
28
|
-
__export(
|
|
29
|
-
default: () =>
|
|
27
|
+
var vera_exports = {};
|
|
28
|
+
__export(vera_exports, {
|
|
29
|
+
default: () => vera_default
|
|
30
30
|
});
|
|
31
|
-
module.exports = __toCommonJS(
|
|
32
|
-
var
|
|
33
|
-
|
|
31
|
+
module.exports = __toCommonJS(vera_exports);
|
|
32
|
+
var import_ai = require("@nocobase/ai");
|
|
33
|
+
var vera_default = (0, import_ai.defineAIEmployee)({
|
|
34
|
+
username: "vera",
|
|
35
|
+
description: "AI employee for research and web search",
|
|
36
|
+
avatar: "nocobase-027-female",
|
|
37
|
+
nickname: "Vera",
|
|
38
|
+
position: "Research analyst",
|
|
39
|
+
bio: "I'm Vera, your research analyst. My job is to find the most current and accurate information from the internet to answer your questions. I sift through the noise to deliver reliable, sourced facts, so you can make decisions with confidence.",
|
|
40
|
+
greeting: "Hi, I'm Vera. What information can I help you find and verify today?",
|
|
41
|
+
systemPrompt: `You are Vera, a specialist AI Research Analyst.
|
|
34
42
|
|
|
35
43
|
**## CORE MISSION**
|
|
36
44
|
Provide accurate, timely, and well-sourced answers to user questions by searching the public internet. Serve as a reliable source of truth by distinguishing between high-quality, authoritative sources and low-quality or biased information, saving users time and protecting them from misinformation.
|
|
@@ -61,4 +69,4 @@ Sources:
|
|
|
61
69
|
[1] Australian Government. "About Australia." [URL], accessed on [Date].
|
|
62
70
|
[2] National Archives of Australia. "The Founding of a Capital." [URL], accessed on [Date].
|
|
63
71
|
`
|
|
64
|
-
};
|
|
72
|
+
});
|
|
@@ -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;
|
package/dist/{server/ai-employees/built-in/insights-analyst/prompt.js → ai/ai-employees/viz.js}
RENAMED
|
@@ -24,13 +24,21 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
24
24
|
return to;
|
|
25
25
|
};
|
|
26
26
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
-
var
|
|
28
|
-
__export(
|
|
29
|
-
default: () =>
|
|
27
|
+
var viz_exports = {};
|
|
28
|
+
__export(viz_exports, {
|
|
29
|
+
default: () => viz_default
|
|
30
30
|
});
|
|
31
|
-
module.exports = __toCommonJS(
|
|
32
|
-
var
|
|
33
|
-
|
|
31
|
+
module.exports = __toCommonJS(viz_exports);
|
|
32
|
+
var import_ai = require("@nocobase/ai");
|
|
33
|
+
var viz_default = (0, import_ai.defineAIEmployee)({
|
|
34
|
+
username: "viz",
|
|
35
|
+
description: "AI employee for data insights",
|
|
36
|
+
avatar: "nocobase-010-male",
|
|
37
|
+
nickname: "Viz",
|
|
38
|
+
position: "Insights analyst",
|
|
39
|
+
bio: "I'm Viz, your insights analyst. I find the stories in your data and bring them to life with clear charts and easy-to-understand explanations.",
|
|
40
|
+
greeting: "Hi, I'm Viz. Ask me a question about your data, and I'll help you see the story behind the numbers.",
|
|
41
|
+
systemPrompt: `You are Viz, an AI Insights Analyst.
|
|
34
42
|
|
|
35
43
|
**CORE MISSION:**
|
|
36
44
|
Your mission is to answer questions about data by querying necessary sources, analyzing results, and proactively presenting findings as clear, compelling visualizations (like charts and KPI cards) accompanied by concise explanations.
|
|
@@ -129,4 +137,4 @@ Here's how your responses should look:
|
|
|
129
137
|
JSON must contain **pure values only** \u2014 no \`function\`, no \`{d}\`, \`{b}\`, \`{c}\`, no dynamic \`formatter\`.
|
|
130
138
|
|
|
131
139
|
Now, please analyze and visualize the answer to this question:`
|
|
132
|
-
};
|
|
140
|
+
});
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
scope: GENERAL
|
|
3
|
+
name: document-search
|
|
4
|
+
description: helps users search and read documentation using keyword-based indexing and file browsing capabilities.
|
|
5
|
+
introduction:
|
|
6
|
+
title: '{{t("ai.skills.documentSearch.title", { ns: "@nocobase/plugin-ai" })}}'
|
|
7
|
+
about: '{{t("ai.skills.documentSearch.about", { ns: "@nocobase/plugin-ai" })}}'
|
|
8
|
+
tools: ['searchDocs', 'readDocEntry']
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
You are a professional documentation assistant for NocoBase.
|
|
12
|
+
|
|
13
|
+
You help users find relevant documentation by searching indexed content and reading specific files or directories.
|
|
14
|
+
|
|
15
|
+
# Primary Workflows
|
|
16
|
+
|
|
17
|
+
## Search Documentation
|
|
18
|
+
|
|
19
|
+
To find documentation on a specific topic:
|
|
20
|
+
|
|
21
|
+
1. **Identify Search Keywords**
|
|
22
|
+
- Extract key terms, API names, or module identifiers from the user's query.
|
|
23
|
+
- Focus on specific identifiers rather than full sentences.
|
|
24
|
+
|
|
25
|
+
2. **Search Using Keywords**
|
|
26
|
+
- Use the `searchDocs` tool to find matching documents.
|
|
27
|
+
- Provide a module key (e.g., `runjs`, `workflow`) and relevant keywords.
|
|
28
|
+
- Review the returned matches to identify relevant content.
|
|
29
|
+
|
|
30
|
+
3. **Read Matching Documents**
|
|
31
|
+
- Use the `readDocEntry` tool to read the content of matching files.
|
|
32
|
+
- Browse directories to explore the documentation structure if needed.
|
|
33
|
+
|
|
34
|
+
## Browse Documentation Structure
|
|
35
|
+
|
|
36
|
+
To explore available documentation:
|
|
37
|
+
|
|
38
|
+
1. **List Available Modules**
|
|
39
|
+
- Call `searchDocs` with any module key to see which modules are available.
|
|
40
|
+
- The response will include `availableModules` listing all indexed documentation.
|
|
41
|
+
|
|
42
|
+
2. **Explore Directory Contents**
|
|
43
|
+
- Use `readDocEntry` with a module path (e.g., `runjs` or `runjs/context`) to list directory contents.
|
|
44
|
+
- Navigate through the hierarchy by reading subdirectories.
|
|
45
|
+
|
|
46
|
+
# Available Tools
|
|
47
|
+
|
|
48
|
+
- `searchDocs`: Search indexed documentation using FlexSearch-based keyword indexing. Provide a module key and keywords to find matching documents. Returns file paths that can be read with `readDocEntry`.
|
|
49
|
+
- `readDocEntry`: Read files or list directories inside the documentation storage. Supports reading up to 3 paths per call. Returns file content or directory listings.
|
|
50
|
+
|
|
51
|
+
# Path Format
|
|
52
|
+
|
|
53
|
+
- Use canonical module-based paths: `moduleName/path/to/file.md`
|
|
54
|
+
- Examples: `runjs/context/router/index.md`, `workflow/triggers/manual.md`
|
|
55
|
+
- Leading slashes are optional: `/runjs/context` is equivalent to `runjs/context`
|
|
56
|
+
- Relative segments (`..`) and wildcards are not allowed for security reasons.
|
|
57
|
+
|
|
58
|
+
# Best Practices
|
|
59
|
+
|
|
60
|
+
- Use specific keywords (API names, function names, module terms) rather than natural language queries.
|
|
61
|
+
- Start with a narrow search and broaden if needed.
|
|
62
|
+
- After finding relevant files, read them to provide detailed answers.
|
|
63
|
+
- Use directory browsing to explore the documentation structure when the exact file is unknown.
|
|
64
|
+
|
|
65
|
+
# Notes
|
|
66
|
+
|
|
67
|
+
- Document indexes must be created first using the `ai:create-docs-index` command.
|
|
68
|
+
- If no indexes are available, inform the user to run the indexing command.
|
|
69
|
+
- Search results include a relevance score based on keyword matching.
|
|
@@ -7,9 +7,11 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
+
var __create = Object.create;
|
|
10
11
|
var __defProp = Object.defineProperty;
|
|
11
12
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
13
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
14
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
13
15
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
16
|
var __export = (target, all) => {
|
|
15
17
|
for (var name in all)
|
|
@@ -23,6 +25,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
23
25
|
}
|
|
24
26
|
return to;
|
|
25
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
|
+
));
|
|
26
36
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
37
|
var chartGenerator_exports = {};
|
|
28
38
|
__export(chartGenerator_exports, {
|
|
@@ -31,11 +41,12 @@ __export(chartGenerator_exports, {
|
|
|
31
41
|
module.exports = __toCommonJS(chartGenerator_exports);
|
|
32
42
|
var import_ai = require("@nocobase/ai");
|
|
33
43
|
var import_zod = require("zod");
|
|
44
|
+
var import_package = __toESM(require("../../../package.json"));
|
|
34
45
|
var chartGenerator_default = (0, import_ai.defineTools)({
|
|
35
|
-
scope: "
|
|
46
|
+
scope: "GENERAL",
|
|
36
47
|
introduction: {
|
|
37
|
-
title:
|
|
38
|
-
about:
|
|
48
|
+
title: `{{t("Chart generator", { ns: "${import_package.default.name}" })}}`,
|
|
49
|
+
about: `{{t("Generates ECharts options (JSON) based on user input or data context.", { ns: "${import_package.default.name}" })}}`
|
|
39
50
|
},
|
|
40
51
|
definition: {
|
|
41
52
|
name: "chartGenerator",
|
|
@@ -7,9 +7,11 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
+
var __create = Object.create;
|
|
10
11
|
var __defProp = Object.defineProperty;
|
|
11
12
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
13
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
14
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
13
15
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
16
|
var __export = (target, all) => {
|
|
15
17
|
for (var name in all)
|
|
@@ -23,6 +25,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
23
25
|
}
|
|
24
26
|
return to;
|
|
25
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
|
+
));
|
|
26
36
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
37
|
var formFiller_exports = {};
|
|
28
38
|
__export(formFiller_exports, {
|
|
@@ -31,13 +41,14 @@ __export(formFiller_exports, {
|
|
|
31
41
|
module.exports = __toCommonJS(formFiller_exports);
|
|
32
42
|
var import_ai = require("@nocobase/ai");
|
|
33
43
|
var import_zod = require("zod");
|
|
44
|
+
var import_package = __toESM(require("../../../package.json"));
|
|
34
45
|
var formFiller_default = (0, import_ai.defineTools)({
|
|
35
46
|
scope: "GENERAL",
|
|
36
47
|
defaultPermission: "ALLOW",
|
|
37
48
|
execution: "frontend",
|
|
38
49
|
introduction: {
|
|
39
|
-
title:
|
|
40
|
-
about:
|
|
50
|
+
title: `{{t("Form filler", { ns: "${import_package.default.name}" })}}`,
|
|
51
|
+
about: `{{t("Fill the form with the given content", { ns: "${import_package.default.name}" })}}`
|
|
41
52
|
},
|
|
42
53
|
definition: {
|
|
43
54
|
name: "formFiller",
|
|
@@ -6,7 +6,5 @@
|
|
|
6
6
|
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
|
-
declare const _default:
|
|
10
|
-
'en-US': string;
|
|
11
|
-
};
|
|
9
|
+
declare const _default: import("@nocobase/ai").ToolsOptions;
|
|
12
10
|
export default _default;
|
|
@@ -34,38 +34,45 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
34
34
|
mod
|
|
35
35
|
));
|
|
36
36
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
37
|
-
var
|
|
38
|
-
__export(
|
|
39
|
-
default: () =>
|
|
37
|
+
var getSkill_exports = {};
|
|
38
|
+
__export(getSkill_exports, {
|
|
39
|
+
default: () => getSkill_default
|
|
40
40
|
});
|
|
41
|
-
module.exports = __toCommonJS(
|
|
42
|
-
var
|
|
43
|
-
var
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
41
|
+
module.exports = __toCommonJS(getSkill_exports);
|
|
42
|
+
var import_ai = require("@nocobase/ai");
|
|
43
|
+
var import_zod = require("zod");
|
|
44
|
+
var import_package = __toESM(require("../../../package.json"));
|
|
45
|
+
var getSkill_default = (0, import_ai.defineTools)({
|
|
46
|
+
scope: "GENERAL",
|
|
47
|
+
defaultPermission: "ALLOW",
|
|
48
|
+
introduction: {
|
|
49
|
+
title: `{{t("Load specific SKILLS", { ns: "${import_package.default.name}" })}}`,
|
|
50
|
+
about: `{{t("Loading content of the specific SKILLS", { ns: "${import_package.default.name}" })}}`
|
|
51
|
+
},
|
|
52
|
+
definition: {
|
|
53
|
+
name: "getSkill",
|
|
54
|
+
description: "Get the content and related tools for a specified skill.",
|
|
55
|
+
schema: import_zod.z.object({
|
|
56
|
+
skillName: import_zod.z.string().describe("Name of skill to load")
|
|
57
|
+
})
|
|
58
|
+
},
|
|
59
|
+
invoke: async (ctx, args, id) => {
|
|
60
|
+
const target = await ctx.app.aiManager.skillsManager.getSkills(args.skillName);
|
|
61
|
+
if (!target) {
|
|
62
|
+
return {
|
|
63
|
+
status: "error",
|
|
64
|
+
content: {
|
|
65
|
+
message: "Skill not found"
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
return {
|
|
70
|
+
status: "success",
|
|
71
|
+
content: {
|
|
72
|
+
skillName: target.name,
|
|
73
|
+
skillContent: target.content,
|
|
74
|
+
activatedTools: target.tools
|
|
68
75
|
}
|
|
69
|
-
|
|
76
|
+
};
|
|
70
77
|
}
|
|
71
|
-
};
|
|
78
|
+
});
|