@nocobase/plugin-flow-engine 2.2.0-beta.9 → 3.0.0-alpha.1
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/nathan/prompt.md +2 -0
- package/dist/ai/ai-employees/nathan/skills/frontend-developer/SKILLS.md +1 -0
- package/dist/ai/ai-employees/nathan/skills/frontend-developer/tools/getContextApis.js +2 -2
- package/dist/ai/ai-employees/nathan/skills/frontend-developer/tools/getContextEnvs.js +2 -2
- package/dist/ai/ai-employees/nathan/skills/frontend-developer/tools/getContextVars.js +2 -2
- package/dist/ai/ai-employees/nathan/skills/frontend-developer/tools/lintAndTestJS.js +2 -2
- package/dist/ai/ai-employees/nathan/skills/frontend-developer/tools/patchJSCode.js +4 -4
- package/dist/ai/ai-employees/nathan/skills/frontend-developer/tools/readJSCode.js +2 -2
- package/dist/ai/ai-employees/nathan/skills/frontend-developer/tools/writeJSCode.js +2 -2
- package/dist/ai/docs/runjs/context/ai.md +396 -0
- package/dist/externalVersion.js +9 -9
- package/dist/locale/en-US.json +2 -0
- package/dist/locale/index.d.ts +4 -0
- package/dist/locale/zh-CN.json +2 -0
- package/dist/node_modules/@ant-design/icons-svg/package.json +1 -1
- package/dist/node_modules/acorn/package.json +1 -1
- package/dist/node_modules/acorn-jsx/package.json +1 -1
- package/dist/node_modules/acorn-walk/package.json +1 -1
- package/dist/node_modules/ses/package.json +1 -1
- package/dist/node_modules/zod/package.json +1 -1
- package/dist/server/flow-surfaces/authoring-validation.d.ts +2 -1
- package/dist/server/flow-surfaces/authoring-validation.js +167 -19
- package/dist/server/flow-surfaces/blueprint/compile-blocks.js +7 -3
- package/dist/server/flow-surfaces/blueprint/compile-plan.js +19 -15
- package/dist/server/flow-surfaces/blueprint/normalize-document.js +18 -2
- package/dist/server/flow-surfaces/blueprint/public-types.d.ts +1 -0
- package/dist/server/flow-surfaces/builder.js +3 -0
- package/dist/server/flow-surfaces/constants.d.ts +9 -2
- package/dist/server/flow-surfaces/constants.js +1 -0
- package/dist/server/flow-surfaces/contract-guard.js +20 -10
- package/dist/server/flow-surfaces/errors.d.ts +2 -2
- package/dist/server/flow-surfaces/errors.js +4 -4
- package/dist/server/flow-surfaces/navigation-targets.d.ts +80 -0
- package/dist/server/flow-surfaces/navigation-targets.js +546 -0
- package/dist/server/flow-surfaces/runjs-authoring/runtime/constants.js +1 -0
- package/dist/server/flow-surfaces/service.d.ts +21 -2
- package/dist/server/flow-surfaces/service.js +610 -121
- package/dist/server/variables/records.js +7 -2
- package/dist/swagger/flow-surfaces.d.ts +96 -0
- package/dist/swagger/flow-surfaces.js +88 -7
- package/dist/swagger/index.d.ts +96 -0
- package/package.json +2 -2
|
@@ -98,6 +98,7 @@ Follow this exact order. Do NOT skip ahead to coding.
|
|
|
98
98
|
- If you need to inspect the current editor code, call `readJSCode`. Never use `searchDocs` for current editor code, and never say the current code cannot be read.
|
|
99
99
|
- Call `readJSCode` before complex edits, after any failed patch, or whenever the current editor structure is uncertain.
|
|
100
100
|
- If the current work context already contains code and the user asks to add, modify, remove, fix, or extend behavior, call `patchJSCode` with a minimal patch instead of rewriting the whole editor.
|
|
101
|
+
- Every `patchJSCode` hunk must use a valid unified diff header such as `@@ -10,3 +10,4 @@`. Never use a bare `@@` header.
|
|
101
102
|
- Call `writeJSCode` only when the editor is empty, the user asks for a complete replacement, or the change is truly a broad rewrite.
|
|
102
103
|
- For multiple independent localized edits, prefer sequential focused `patchJSCode` calls over one large patch.
|
|
103
104
|
- If a patch would change more than roughly 30 lines, replace a large function/component, or include large unchanged blocks, do not send a huge patch. Either split it into focused patches or use `writeJSCode` as a deliberate broad rewrite when the replacement is clearer than the diff.
|
|
@@ -118,6 +119,7 @@ Follow this exact order. Do NOT skip ahead to coding.
|
|
|
118
119
|
- When calling `searchDocs` after validation failure, use a compact Bash script that searches the exact error text and nearby concepts, then reads focused snippets from likely matches.
|
|
119
120
|
- If the tools and docs still do not confirm the fix, stop and ask the user instead of trying another unverified implementation.
|
|
120
121
|
- When calling `patchJSCode`, provide only the unified diff patch. The tool reads the current editor code directly.
|
|
122
|
+
- Every hunk header must include old and new line ranges, for example `@@ -10,3 +10,4 @@`; a bare `@@` header is invalid.
|
|
121
123
|
- Keep `patchJSCode` patches surgical: include only the changed lines plus the smallest necessary surrounding context.
|
|
122
124
|
- Do NOT rewrite the entire file, replace a whole component/function, or include unchanged large blocks in a patch unless the whole block genuinely changed.
|
|
123
125
|
- If more than roughly 30 lines would need to change, prefer `writeJSCode` only when this is a deliberate broad rewrite. For incremental requests, split into focused `patchJSCode` patches.
|
|
@@ -25,6 +25,7 @@ When helping users with JavaScript code, follow this process:
|
|
|
25
25
|
- Write clean, correct JavaScript/JSX code based on the user's requirements
|
|
26
26
|
- Use `readJSCode` before complex edits, after any patch failure, or whenever the current editor structure is uncertain. Never use documentation search to read current editor code.
|
|
27
27
|
- If the current work context already contains code and the user asks to add, modify, remove, fix, or extend behavior, use `patchJSCode` with a minimal patch instead of rewriting the whole editor
|
|
28
|
+
- Every `patchJSCode` hunk must use a valid unified diff header such as `@@ -10,3 +10,4 @@`. Never use a bare `@@` header.
|
|
28
29
|
- Use `writeJSCode` only when the editor is empty, the user asks for a complete replacement, or the change is truly a broad rewrite
|
|
29
30
|
- If an edit would require a large patch, split it into focused patches. If the change replaces a large function/component or the patch would be larger than the full replacement, use `writeJSCode` as a deliberate broad rewrite.
|
|
30
31
|
- Ensure the code follows best practices for NocoBase workflows
|
|
@@ -36,8 +36,8 @@ var getContextApis_default = (0, import_ai.defineTools)({
|
|
|
36
36
|
execution: "frontend",
|
|
37
37
|
defaultPermission: "ALLOW",
|
|
38
38
|
introduction: {
|
|
39
|
-
title: `{{t("ai.tools.getContextApis.title")}}`,
|
|
40
|
-
about: `{{t("ai.tools.getContextApis.about")}}`
|
|
39
|
+
title: `{{t("ai.tools.getContextApis.title", { ns: "@nocobase/plugin-ai" })}}`,
|
|
40
|
+
about: `{{t("ai.tools.getContextApis.about", { ns: "@nocobase/plugin-ai" })}}`
|
|
41
41
|
},
|
|
42
42
|
definition: {
|
|
43
43
|
name: "getContextApis",
|
|
@@ -36,8 +36,8 @@ var getContextEnvs_default = (0, import_ai.defineTools)({
|
|
|
36
36
|
execution: "frontend",
|
|
37
37
|
defaultPermission: "ALLOW",
|
|
38
38
|
introduction: {
|
|
39
|
-
title: `{{t("ai.tools.getContextEnvs.title")}}`,
|
|
40
|
-
about: `{{t("ai.tools.getContextEnvs.about")}}`
|
|
39
|
+
title: `{{t("ai.tools.getContextEnvs.title", { ns: "@nocobase/plugin-ai" })}}`,
|
|
40
|
+
about: `{{t("ai.tools.getContextEnvs.about", { ns: "@nocobase/plugin-ai" })}}`
|
|
41
41
|
},
|
|
42
42
|
definition: {
|
|
43
43
|
name: "getContextEnvs",
|
|
@@ -36,8 +36,8 @@ var getContextVars_default = (0, import_ai.defineTools)({
|
|
|
36
36
|
execution: "frontend",
|
|
37
37
|
defaultPermission: "ALLOW",
|
|
38
38
|
introduction: {
|
|
39
|
-
title: `{{t("ai.tools.getContextVars.title")}}`,
|
|
40
|
-
about: `{{t("ai.tools.getContextVars.about")}}`
|
|
39
|
+
title: `{{t("ai.tools.getContextVars.title", { ns: "@nocobase/plugin-ai" })}}`,
|
|
40
|
+
about: `{{t("ai.tools.getContextVars.about", { ns: "@nocobase/plugin-ai" })}}`
|
|
41
41
|
},
|
|
42
42
|
definition: {
|
|
43
43
|
name: "getContextVars",
|
|
@@ -36,8 +36,8 @@ var lintAndTestJS_default = (0, import_ai.defineTools)({
|
|
|
36
36
|
execution: "frontend",
|
|
37
37
|
defaultPermission: "ALLOW",
|
|
38
38
|
introduction: {
|
|
39
|
-
title: `{{t("ai.tools.lintAndTestJS.title")}}`,
|
|
40
|
-
about: `{{t("ai.tools.lintAndTestJS.about")}}`
|
|
39
|
+
title: `{{t("ai.tools.lintAndTestJS.title", { ns: "@nocobase/plugin-ai" })}}`,
|
|
40
|
+
about: `{{t("ai.tools.lintAndTestJS.about", { ns: "@nocobase/plugin-ai" })}}`
|
|
41
41
|
},
|
|
42
42
|
definition: {
|
|
43
43
|
name: "lintAndTestJS",
|
|
@@ -36,15 +36,15 @@ var patchJSCode_default = (0, import_ai.defineTools)({
|
|
|
36
36
|
execution: "frontend",
|
|
37
37
|
defaultPermission: "ALLOW",
|
|
38
38
|
introduction: {
|
|
39
|
-
title: `{{t("ai.tools.patchJSCode.title")}}`,
|
|
40
|
-
about: `{{t("ai.tools.patchJSCode.about")}}`
|
|
39
|
+
title: `{{t("ai.tools.patchJSCode.title", { ns: "@nocobase/plugin-ai" })}}`,
|
|
40
|
+
about: `{{t("ai.tools.patchJSCode.about", { ns: "@nocobase/plugin-ai" })}}`
|
|
41
41
|
},
|
|
42
42
|
definition: {
|
|
43
43
|
name: "patchJSCode",
|
|
44
|
-
description: "Apply a minimal unified diff patch to the code currently in the editor, then write the patched code back to the editor. Use this for adding, modifying, removing, fixing, or extending existing code. The tool reads the current editor code directly; only provide the patch. Keep patches surgical: include only changed lines plus the smallest necessary context, and do not include unchanged large blocks.",
|
|
44
|
+
description: "Apply a minimal unified diff patch to the code currently in the editor, then write the patched code back to the editor. Use this for adding, modifying, removing, fixing, or extending existing code. The tool reads the current editor code directly; only provide the patch. Every hunk must use a valid header such as `@@ -10,3 +10,4 @@`; bare `@@` headers are invalid. Keep patches surgical: include only changed lines plus the smallest necessary context, and do not include unchanged large blocks.",
|
|
45
45
|
schema: import_zod.z.object({
|
|
46
46
|
patch: import_zod.z.string().describe(
|
|
47
|
-
"Minimal unified diff patch to apply to the current editor code. Include only changed lines plus the smallest necessary context."
|
|
47
|
+
"Minimal unified diff patch to apply to the current editor code. Every hunk header must include old and new line ranges, for example `@@ -10,3 +10,4 @@`; do not use a bare `@@` header. Include only changed lines plus the smallest necessary context."
|
|
48
48
|
)
|
|
49
49
|
})
|
|
50
50
|
},
|
|
@@ -36,8 +36,8 @@ var readJSCode_default = (0, import_ai.defineTools)({
|
|
|
36
36
|
execution: "frontend",
|
|
37
37
|
defaultPermission: "ALLOW",
|
|
38
38
|
introduction: {
|
|
39
|
-
title: `{{t("ai.tools.readJSCode.title")}}`,
|
|
40
|
-
about: `{{t("ai.tools.readJSCode.about")}}`
|
|
39
|
+
title: `{{t("ai.tools.readJSCode.title", { ns: "@nocobase/plugin-ai" })}}`,
|
|
40
|
+
about: `{{t("ai.tools.readJSCode.about", { ns: "@nocobase/plugin-ai" })}}`
|
|
41
41
|
},
|
|
42
42
|
definition: {
|
|
43
43
|
name: "readJSCode",
|
|
@@ -36,8 +36,8 @@ var writeJSCode_default = (0, import_ai.defineTools)({
|
|
|
36
36
|
execution: "frontend",
|
|
37
37
|
defaultPermission: "ALLOW",
|
|
38
38
|
introduction: {
|
|
39
|
-
title: `{{t("ai.tools.writeJSCode.title")}}`,
|
|
40
|
-
about: `{{t("ai.tools.writeJSCode.about")}}`
|
|
39
|
+
title: `{{t("ai.tools.writeJSCode.title", { ns: "@nocobase/plugin-ai" })}}`,
|
|
40
|
+
about: `{{t("ai.tools.writeJSCode.about", { ns: "@nocobase/plugin-ai" })}}`
|
|
41
41
|
},
|
|
42
42
|
definition: {
|
|
43
43
|
name: "writeJSCode",
|
|
@@ -0,0 +1,396 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "ctx.ai"
|
|
3
|
+
description: "Use ctx.ai in RunJS to trigger AI employee tasks in the global conversation or a specified AI Chat Box, either with inline task content or with tasks configured on an AI employee action."
|
|
4
|
+
keywords: "ctx.ai,AI employee,uploadFile,attachments,triggerTask,triggerModelTask,onResponseLoadingChange,chatBoxUid,AI Chat Box,RunJS,NocoBase"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# ctx.ai
|
|
8
|
+
|
|
9
|
+
Use `ctx.ai` in RunJS to trigger **AI employee tasks**. It works well in JSBlock, JSAction, and other interactions where a button, form, or business flow needs to hand work to a specific AI employee.
|
|
10
|
+
|
|
11
|
+
`ctx.ai` uploads AI task attachments and triggers tasks. File uploads can be awaited, but task triggering does not return the execution result of the AI employee task. After the call, the task enters the AI employee conversation flow, and the result is handled by the AI employee session.
|
|
12
|
+
|
|
13
|
+
:::warning Note
|
|
14
|
+
|
|
15
|
+
`ctx.ai` is provided by the AI plugin. If the AI plugin is not enabled, or the current RunJS environment has not loaded the corresponding client capability, `ctx.ai` may not exist. You can check `ctx.ai?.uploadFile`, `ctx.ai?.triggerTask`, or `ctx.ai?.triggerModelTask` before calling it.
|
|
16
|
+
|
|
17
|
+
:::
|
|
18
|
+
|
|
19
|
+
## Methods
|
|
20
|
+
|
|
21
|
+
### ctx.ai.uploadFile()
|
|
22
|
+
|
|
23
|
+
Upload one file and return an attachment object that can be passed directly to an AI employee task.
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
const attachment = await ctx.ai.uploadFile(file, options);
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
| Parameter | Type | Description |
|
|
30
|
+
|------|------|------|
|
|
31
|
+
| `file` | `File` | Browser file object to upload. |
|
|
32
|
+
| `options.onProgress` | `(percent: number) => void` | Upload progress callback. `percent` ranges from `0` to `100`. |
|
|
33
|
+
| `options.signal` | `AbortSignal` | Signal used to cancel the upload. |
|
|
34
|
+
|
|
35
|
+
The upload uses the file storage configured by the AI plugin and creates a record in `aiFiles`. The returned object includes fields such as `id`, `filename`, `url`, and `source`:
|
|
36
|
+
|
|
37
|
+
```ts
|
|
38
|
+
const attachment = await ctx.ai.uploadFile(file, {
|
|
39
|
+
onProgress(percent) {
|
|
40
|
+
console.log('upload progress', percent);
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
// attachment can be placed directly in message.attachments
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
The Promise is rejected when the upload fails. Removing an attachment from the local UI does not delete the record already created in `aiFiles`, matching the behavior of the default AI chat window.
|
|
48
|
+
|
|
49
|
+
### ctx.ai.triggerTask()
|
|
50
|
+
|
|
51
|
+
Trigger an AI employee task directly.
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
ctx.ai.triggerTask(options: TriggerTaskOptions): void
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
| Parameter | Type | Description |
|
|
58
|
+
|------|------|------|
|
|
59
|
+
| `aiEmployee` | `string \| AIEmployee` | AI employee. When a string is passed, NocoBase matches `AIEmployee.username` exactly, and the AI employee must be accessible to the current user. |
|
|
60
|
+
| `tasks` | `Task[]` | Tasks to trigger. |
|
|
61
|
+
| `chatBoxUid` | `string` | FlowModel uid of the AI Chat Box block that should receive the task. |
|
|
62
|
+
| `open` | `boolean` | Whether to open the AI employee conversation panel. |
|
|
63
|
+
| `auto` | `boolean` | Whether to use the auto-trigger semantics of an AI employee action. |
|
|
64
|
+
| `onResponseLoadingChange` | `(loading: boolean) => void` | Model response loading callback. It only runs when this task is sent automatically. |
|
|
65
|
+
|
|
66
|
+
Common `Task` fields:
|
|
67
|
+
|
|
68
|
+
| Field | Type | Description |
|
|
69
|
+
|------|------|------|
|
|
70
|
+
| `title` | `string` | Task title. |
|
|
71
|
+
| `message.system` | `string` | System message, used to constrain the AI employee's role and output requirements. |
|
|
72
|
+
| `message.user` | `string` | User message, which is the main instruction for this task. |
|
|
73
|
+
| `message.attachments` | `Attachment[]` | Attachments used by the task, usually returned by `ctx.ai.uploadFile()`. |
|
|
74
|
+
| `message.workContext` | `ContextItem[]` | Page block context used by the task. |
|
|
75
|
+
| `autoSend` | `boolean` | Whether to send the task message automatically. |
|
|
76
|
+
| `webSearch` | `boolean` | Whether Web search is allowed for this task. |
|
|
77
|
+
| `model` | `{ llmService: string; model: string } \| null` | Model used by this task. |
|
|
78
|
+
| `skillSettings` | `SkillSettings` | Skills and tools available to this task. |
|
|
79
|
+
|
|
80
|
+
### Track the Response Loading State
|
|
81
|
+
|
|
82
|
+
Pass `onResponseLoadingChange` in the top-level options to track the model response loading state for this task. The callback receives `true` when NocoBase starts waiting for the model response, and `false` when the response completes, is canceled, or fails. If the React component has declared `setResponseLoading` with `useState`, you can write:
|
|
83
|
+
|
|
84
|
+
```tsx
|
|
85
|
+
ctx.ai.triggerTask({
|
|
86
|
+
aiEmployee: 'nathan',
|
|
87
|
+
open: true,
|
|
88
|
+
tasks: [
|
|
89
|
+
{
|
|
90
|
+
title: ctx.t('Review current page'),
|
|
91
|
+
message: {
|
|
92
|
+
user: 'Review the current page and summarize the main risks.',
|
|
93
|
+
},
|
|
94
|
+
autoSend: true,
|
|
95
|
+
},
|
|
96
|
+
],
|
|
97
|
+
onResponseLoadingChange(loading) {
|
|
98
|
+
setResponseLoading(loading);
|
|
99
|
+
},
|
|
100
|
+
});
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
`onResponseLoadingChange` only tracks the model response started directly by this `triggerTask()` call. With `autoSend: false`, the task is placed in the chat draft and the callback does not run. If the user sends the draft later, that manual send does not reuse this callback.
|
|
104
|
+
|
|
105
|
+
In a React component inside a JS block, this state update rerenders the component while it remains mounted.
|
|
106
|
+
|
|
107
|
+
### Target an AI Chat Box
|
|
108
|
+
|
|
109
|
+
Set `chatBoxUid` on the top-level `triggerTask()` options to trigger the task in a mounted AI Chat Box block instead of the global AI employee dialog.
|
|
110
|
+
|
|
111
|
+
```ts
|
|
112
|
+
ctx.ai.triggerTask({
|
|
113
|
+
aiEmployee: 'nathan',
|
|
114
|
+
chatBoxUid: 'AI_CHAT_BOX_BLOCK_UID',
|
|
115
|
+
open: true,
|
|
116
|
+
tasks: [
|
|
117
|
+
{
|
|
118
|
+
title: ctx.t('Review current page'),
|
|
119
|
+
message: {
|
|
120
|
+
user: 'Review the current page and summarize the main risks.',
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
],
|
|
124
|
+
});
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
The uid must belong to the outer AI Chat Box block currently mounted on the page. Do not put this routing value inside `tasks`. If the target block cannot be found, NocoBase reports an error and does not fall back to the global dialog. When `chatBoxUid` is omitted, the task uses the global AI employee dialog.
|
|
128
|
+
|
|
129
|
+
### Upload and Send Attachments in JSBlock
|
|
130
|
+
|
|
131
|
+
The following example renders file upload, task instructions, and a send button in JSBlock. Uploaded files are passed to the AI employee through `message.attachments`:
|
|
132
|
+
|
|
133
|
+
```tsx
|
|
134
|
+
if (!ctx.ai?.uploadFile || !ctx.ai?.triggerTask) {
|
|
135
|
+
ctx.message.error(ctx.t('AI employee task API is not available.'));
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
const { React } = ctx.libs;
|
|
140
|
+
const { useState } = React;
|
|
141
|
+
const { Button, Card, Input, Space, Upload } = ctx.libs.antd;
|
|
142
|
+
const { InboxOutlined, SendOutlined } = ctx.libs.antdIcons;
|
|
143
|
+
|
|
144
|
+
const AttachmentTask = () => {
|
|
145
|
+
const [prompt, setPrompt] = useState('');
|
|
146
|
+
const [fileList, setFileList] = useState([]);
|
|
147
|
+
|
|
148
|
+
const uploadAttachment = async ({ file, onError, onProgress, onSuccess }) => {
|
|
149
|
+
try {
|
|
150
|
+
const attachment = await ctx.ai.uploadFile(file, {
|
|
151
|
+
onProgress(percent) {
|
|
152
|
+
onProgress?.({ percent });
|
|
153
|
+
},
|
|
154
|
+
});
|
|
155
|
+
onSuccess?.(attachment);
|
|
156
|
+
} catch (error) {
|
|
157
|
+
onError?.(error instanceof Error ? error : new Error(ctx.t('File upload failed')));
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
const sendTask = () => {
|
|
162
|
+
const attachments = fileList
|
|
163
|
+
.filter((file) => file.status === 'done' && file.response)
|
|
164
|
+
.map((file) => file.response);
|
|
165
|
+
|
|
166
|
+
if (!prompt.trim()) {
|
|
167
|
+
ctx.message.warning(ctx.t('Enter task instructions'));
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
ctx.ai.triggerTask({
|
|
172
|
+
aiEmployee: 'viz',
|
|
173
|
+
open: true,
|
|
174
|
+
tasks: [
|
|
175
|
+
{
|
|
176
|
+
title: ctx.t('Analyze uploaded files'),
|
|
177
|
+
message: {
|
|
178
|
+
user: prompt.trim(),
|
|
179
|
+
attachments,
|
|
180
|
+
},
|
|
181
|
+
autoSend: true,
|
|
182
|
+
},
|
|
183
|
+
],
|
|
184
|
+
});
|
|
185
|
+
setPrompt('');
|
|
186
|
+
setFileList([]);
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
const uploading = fileList.some((file) => file.status === 'uploading');
|
|
190
|
+
|
|
191
|
+
return (
|
|
192
|
+
<Card title={ctx.t('AI file analysis')}>
|
|
193
|
+
<Space direction="vertical" size="middle" style={{ width: '100%' }}>
|
|
194
|
+
<Upload.Dragger
|
|
195
|
+
multiple
|
|
196
|
+
fileList={fileList}
|
|
197
|
+
customRequest={uploadAttachment}
|
|
198
|
+
onChange={({ fileList: nextFileList }) => setFileList(nextFileList)}
|
|
199
|
+
>
|
|
200
|
+
<p className="ant-upload-drag-icon"><InboxOutlined /></p>
|
|
201
|
+
<p>{ctx.t('Click or drag files here to upload')}</p>
|
|
202
|
+
</Upload.Dragger>
|
|
203
|
+
<Input.TextArea
|
|
204
|
+
value={prompt}
|
|
205
|
+
onChange={(event) => setPrompt(event.target.value)}
|
|
206
|
+
placeholder={ctx.t('Describe the task for the AI employee')}
|
|
207
|
+
autoSize={{ minRows: 3, maxRows: 8 }}
|
|
208
|
+
/>
|
|
209
|
+
<Button
|
|
210
|
+
type="primary"
|
|
211
|
+
icon={<SendOutlined />}
|
|
212
|
+
disabled={uploading || !prompt.trim()}
|
|
213
|
+
onClick={sendTask}
|
|
214
|
+
>
|
|
215
|
+
{ctx.t('Send to AI')}
|
|
216
|
+
</Button>
|
|
217
|
+
</Space>
|
|
218
|
+
</Card>
|
|
219
|
+
);
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
ctx.render(<AttachmentTask />);
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
With `autoSend: false`, the attachments and task instructions are placed in the AI chat draft instead of being sent immediately.
|
|
226
|
+
|
|
227
|
+
### Add Page Block Context
|
|
228
|
+
|
|
229
|
+
`message.workContext` currently passes page blocks. Put the FlowModel uid of the target page block into it:
|
|
230
|
+
|
|
231
|
+
```ts
|
|
232
|
+
message: {
|
|
233
|
+
user: 'Review the current users table and summarize operational risks.',
|
|
234
|
+
workContext: [
|
|
235
|
+
{
|
|
236
|
+
type: 'flow-model',
|
|
237
|
+
uid: 'USERS_TABLE_BLOCK_UID',
|
|
238
|
+
},
|
|
239
|
+
],
|
|
240
|
+
}
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
| Field | Description |
|
|
244
|
+
|------|------|
|
|
245
|
+
| `type` | Fixed to `flow-model`, meaning this item is a page block context. |
|
|
246
|
+
| `uid` | FlowModel uid of the page block, such as a table block, detail block, or chart block. |
|
|
247
|
+
|
|
248
|
+
If you want to use the current JSBlock itself as context, use the current model uid:
|
|
249
|
+
|
|
250
|
+
```ts
|
|
251
|
+
workContext: [
|
|
252
|
+
{
|
|
253
|
+
type: 'flow-model',
|
|
254
|
+
uid: ctx.model.uid,
|
|
255
|
+
},
|
|
256
|
+
],
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
Usually, `message.workContext` should be placed inside the `message` of a concrete task. `triggerModelTask()` reuses the task configured on the target AI employee action, so it also reads `message.workContext` from that task.
|
|
260
|
+
|
|
261
|
+
### Specify Model
|
|
262
|
+
|
|
263
|
+
`model` specifies the model for a single task. If omitted, the AI employee's default model configuration is used. Passing `null` means no task-level model is specified.
|
|
264
|
+
|
|
265
|
+
```ts
|
|
266
|
+
model: {
|
|
267
|
+
llmService: 'openai-main',
|
|
268
|
+
model: 'gpt-4.1',
|
|
269
|
+
}
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
### Configure Skills / Tools
|
|
273
|
+
|
|
274
|
+
`skillSettings` specifies the skills and tools available to a single task. If omitted, the AI employee's own capability configuration is used.
|
|
275
|
+
|
|
276
|
+
```ts
|
|
277
|
+
skillSettings: {
|
|
278
|
+
skillsVersion: 2,
|
|
279
|
+
toolsVersion: 2,
|
|
280
|
+
skills: ['business-analysis-report'],
|
|
281
|
+
tools: ['businessReportGenerator'],
|
|
282
|
+
}
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
To explicitly disable all skills or tools for this task, pass empty arrays and keep the version fields:
|
|
286
|
+
|
|
287
|
+
```ts
|
|
288
|
+
skillSettings: {
|
|
289
|
+
skillsVersion: 2,
|
|
290
|
+
toolsVersion: 2,
|
|
291
|
+
skills: [],
|
|
292
|
+
tools: [],
|
|
293
|
+
}
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
The following example asks `viz` to generate a handoff brief and opens the AI employee conversation panel:
|
|
297
|
+
|
|
298
|
+
```ts
|
|
299
|
+
if (!ctx.ai?.triggerTask) {
|
|
300
|
+
ctx.message.error(ctx.t('AI employee task API is not available.'));
|
|
301
|
+
return;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
ctx.ai.triggerTask({
|
|
305
|
+
aiEmployee: 'viz',
|
|
306
|
+
open: true,
|
|
307
|
+
tasks: [
|
|
308
|
+
{
|
|
309
|
+
title: ctx.t('Daily operations handoff brief'),
|
|
310
|
+
message: {
|
|
311
|
+
system:
|
|
312
|
+
'You prepare reusable daily operations handoff briefs. Focus on risks, blockers, decisions, owners, and next actions.',
|
|
313
|
+
user: [
|
|
314
|
+
"Prepare today's operations handoff brief.",
|
|
315
|
+
'Cover customer escalations, SLA risks, approvals, and follow-up owners.',
|
|
316
|
+
'Return a concise brief that can be posted to the team channel.',
|
|
317
|
+
].join('\n'),
|
|
318
|
+
},
|
|
319
|
+
autoSend: true,
|
|
320
|
+
webSearch: false,
|
|
321
|
+
},
|
|
322
|
+
],
|
|
323
|
+
});
|
|
324
|
+
|
|
325
|
+
ctx.message.success(ctx.t('AI employee task triggered.'));
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
If `aiEmployee` is a string, NocoBase matches accessible AI employees by `username` exactly. If no match is found, the task is not triggered and a warning is printed to the console.
|
|
329
|
+
|
|
330
|
+
### ctx.ai.triggerModelTask()
|
|
331
|
+
|
|
332
|
+
Read a task from an AI employee action model on the page and trigger it.
|
|
333
|
+
|
|
334
|
+
```ts
|
|
335
|
+
ctx.ai.triggerModelTask(uid: string, taskIndex: number, options?: TriggerModelTaskOptions): void
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
| Parameter | Type | Description |
|
|
339
|
+
|------|------|------|
|
|
340
|
+
| `uid` | `string` | FlowModel uid of the AI employee action. |
|
|
341
|
+
| `taskIndex` | `number` | Task index, starting from `0`. |
|
|
342
|
+
| `options.open` | `boolean` | Whether to open the AI employee conversation panel. |
|
|
343
|
+
| `options.auto` | `boolean` | Whether to use the auto-trigger semantics of an AI employee action. |
|
|
344
|
+
| `options.attachments` | `Attachment[]` | Attachments dynamically appended to the configured task. |
|
|
345
|
+
| `options.onResponseLoadingChange` | `(loading: boolean) => void` | Model response loading callback. It only runs when the configured task is sent automatically. |
|
|
346
|
+
|
|
347
|
+
This method reads the AI employee and task configuration from the target model. It is useful when the task has already been configured on an AI employee action on the page, and RunJS only needs to trigger it.
|
|
348
|
+
|
|
349
|
+
The public `triggerModelTask()` options do not accept `chatBoxUid`. To target an AI Chat Box, configure `chatBoxUid` on the preset task of the AI employee action. `triggerModelTask()` continues to reuse that preset value.
|
|
350
|
+
|
|
351
|
+
`options.onResponseLoadingChange` behaves the same as the option on `triggerTask()`. Whether it runs depends on the configured task's `autoSend` value. It does not run when that task uses `autoSend: false`.
|
|
352
|
+
|
|
353
|
+
```ts
|
|
354
|
+
if (!ctx.ai?.triggerModelTask) {
|
|
355
|
+
ctx.message.error(ctx.t('AI employee task API is not available.'));
|
|
356
|
+
return;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
const weeklyReviewActionUid = 'AI_EMPLOYEE_ACTION_MODEL_UID';
|
|
360
|
+
|
|
361
|
+
ctx.ai.triggerModelTask(weeklyReviewActionUid, 0, {
|
|
362
|
+
open: true,
|
|
363
|
+
attachments,
|
|
364
|
+
});
|
|
365
|
+
|
|
366
|
+
ctx.message.success(ctx.t('Configured AI employee task triggered.'));
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
If the target model does not exist, has no AI employee configured, or the specified index has no task, no task is triggered and a warning is printed to the console.
|
|
370
|
+
|
|
371
|
+
## Which Method to Use
|
|
372
|
+
|
|
373
|
+
| Scenario | Recommended method |
|
|
374
|
+
|------|------|
|
|
375
|
+
| Task content is assembled dynamically in RunJS, such as from form values. | `ctx.ai.triggerTask()` |
|
|
376
|
+
| The task has already been configured on an AI employee action on the page, and RunJS only triggers it. | `ctx.ai.triggerModelTask()` |
|
|
377
|
+
| Business users need to adjust task content without changing code. | `ctx.ai.triggerModelTask()` |
|
|
378
|
+
| The AI employee, prompt, or sending behavior needs to be decided at runtime. | `ctx.ai.triggerTask()` |
|
|
379
|
+
|
|
380
|
+
## Notes
|
|
381
|
+
|
|
382
|
+
- `triggerTask()` and `triggerModelTask()` are fire-and-forget. They do not return the execution result of the AI employee task.
|
|
383
|
+
- `uploadFile()` returns a Promise. Wait for the upload to finish before triggering a task that uses the attachment.
|
|
384
|
+
- `aiEmployee` strings only match `AIEmployee.username` exactly. They do not match nicknames, job titles, or translated names.
|
|
385
|
+
- `triggerModelTask()` uses a `0`-based `taskIndex`.
|
|
386
|
+
- `triggerModelTask()` reads task configuration from the target AI employee action model. If the task needs work context, configure `message.workContext` on that task.
|
|
387
|
+
- Top-level `triggerTask().chatBoxUid` must reference an AI Chat Box block currently mounted on the page.
|
|
388
|
+
- `triggerModelTask()` keeps using `chatBoxUid` configured on its preset task.
|
|
389
|
+
- Dynamic `triggerModelTask()` attachments are appended to the preset task's existing `message.attachments` without changing the saved task configuration.
|
|
390
|
+
- `onResponseLoadingChange` only tracks a model response automatically sent by the current call. It does not track a message the user sends manually later.
|
|
391
|
+
|
|
392
|
+
## Related
|
|
393
|
+
|
|
394
|
+
- [ctx.message](./message.md): Show lightweight prompts before and after triggering tasks.
|
|
395
|
+
- [ctx.render](./render.md): Render buttons or forms in JSBlock.
|
|
396
|
+
- [ctx.model](./model.md): Get current FlowModel information.
|
package/dist/externalVersion.js
CHANGED
|
@@ -8,16 +8,16 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
module.exports = {
|
|
11
|
-
"@nocobase/client": "
|
|
11
|
+
"@nocobase/client": "3.0.0-alpha.1",
|
|
12
12
|
"lodash": "4.18.1",
|
|
13
|
-
"@nocobase/database": "
|
|
14
|
-
"@nocobase/data-source-manager": "
|
|
15
|
-
"@nocobase/resourcer": "
|
|
16
|
-
"@nocobase/utils": "
|
|
17
|
-
"@nocobase/cache": "
|
|
18
|
-
"@nocobase/server": "
|
|
19
|
-
"@nocobase/actions": "
|
|
13
|
+
"@nocobase/database": "3.0.0-alpha.1",
|
|
14
|
+
"@nocobase/data-source-manager": "3.0.0-alpha.1",
|
|
15
|
+
"@nocobase/resourcer": "3.0.0-alpha.1",
|
|
16
|
+
"@nocobase/utils": "3.0.0-alpha.1",
|
|
17
|
+
"@nocobase/cache": "3.0.0-alpha.1",
|
|
18
|
+
"@nocobase/server": "3.0.0-alpha.1",
|
|
19
|
+
"@nocobase/actions": "3.0.0-alpha.1",
|
|
20
20
|
"sequelize": "6.35.2",
|
|
21
21
|
"@formily/json-schema": "2.3.7",
|
|
22
|
-
"@nocobase/ai": "
|
|
22
|
+
"@nocobase/ai": "3.0.0-alpha.1"
|
|
23
23
|
};
|
package/dist/locale/en-US.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"Add": "Add",
|
|
3
|
+
"Are you sure you want to perform the action?": "Are you sure you want to perform the action?",
|
|
3
4
|
"Are you sure you want to delete this item? This action cannot be undone.": "Are you sure you want to delete this item? This action cannot be undone.",
|
|
4
5
|
"Are you sure to convert this template block to copy mode?": "Are you sure you want to convert this template block to copy mode?",
|
|
5
6
|
"Array index out of bounds": "Array index {{index}} out of bounds for '{{subKey}}'",
|
|
@@ -53,6 +54,7 @@
|
|
|
53
54
|
"Other blocks": "Other blocks",
|
|
54
55
|
"Parent not found, cannot replace block": "Parent not found, cannot replace block",
|
|
55
56
|
"Previous step": "Previous step",
|
|
57
|
+
"Please Confirm": "Please Confirm",
|
|
56
58
|
"Replace current block with template?": "Replace current block with template?",
|
|
57
59
|
"Replaced with template block": "Replaced with template block",
|
|
58
60
|
"Render failed": "Render failed",
|
package/dist/locale/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
export declare const locales: {
|
|
10
10
|
'en-US': {
|
|
11
11
|
Add: string;
|
|
12
|
+
"Are you sure you want to perform the action?": string;
|
|
12
13
|
"Are you sure you want to delete this item? This action cannot be undone.": string;
|
|
13
14
|
"Are you sure to convert this template block to copy mode?": string;
|
|
14
15
|
"Array index out of bounds": string;
|
|
@@ -62,6 +63,7 @@ export declare const locales: {
|
|
|
62
63
|
"Other blocks": string;
|
|
63
64
|
"Parent not found, cannot replace block": string;
|
|
64
65
|
"Previous step": string;
|
|
66
|
+
"Please Confirm": string;
|
|
65
67
|
"Replace current block with template?": string;
|
|
66
68
|
"Replaced with template block": string;
|
|
67
69
|
"Render failed": string;
|
|
@@ -91,6 +93,7 @@ export declare const locales: {
|
|
|
91
93
|
};
|
|
92
94
|
'zh-CN': {
|
|
93
95
|
Add: string;
|
|
96
|
+
"Are you sure you want to perform the action?": string;
|
|
94
97
|
"Are you sure you want to delete this item? This action cannot be undone.": string;
|
|
95
98
|
"Are you sure to convert this template block to copy mode?": string;
|
|
96
99
|
"Array index out of bounds": string;
|
|
@@ -150,6 +153,7 @@ export declare const locales: {
|
|
|
150
153
|
OK: string;
|
|
151
154
|
"Other blocks": string;
|
|
152
155
|
"Previous step": string;
|
|
156
|
+
"Please Confirm": string;
|
|
153
157
|
"Render failed": string;
|
|
154
158
|
"Response record": string;
|
|
155
159
|
"Step configuration": string;
|
package/dist/locale/zh-CN.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"Add": "添加",
|
|
3
|
+
"Are you sure you want to perform the action?": "确定要执行此操作吗?",
|
|
3
4
|
"Are you sure you want to delete this item? This action cannot be undone.": "确定要删除此项吗?此操作不可撤销。",
|
|
4
5
|
"Are you sure to convert this template block to copy mode?": "确定将该模板区块转换为复制模式吗?",
|
|
5
6
|
"Array index out of bounds": "数组索引 {{index}} 超出 '{{subKey}}' 的边界",
|
|
@@ -59,6 +60,7 @@
|
|
|
59
60
|
"OK": "确定",
|
|
60
61
|
"Other blocks": "其他区块",
|
|
61
62
|
"Previous step": "上一步",
|
|
63
|
+
"Please Confirm": "请确认",
|
|
62
64
|
"Render failed": "渲染失败",
|
|
63
65
|
"Response record": "响应结果记录",
|
|
64
66
|
"Step configuration": "步骤配置",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@ant-design/icons-svg","version":"4.3.1","sideEffects":false,"description":"Abstract nodes for ant design icons.","contributors":["HeskeyBaozi <hezhiyu233@foxmail.com>"],"homepage":"https://github.com/ant-design/ant-design-icons/","license":"MIT","main":"lib/index.js","module":"es/index.js","files":["lib","es","inline-svg","inline-namespaced-svg"],"repository":{"type":"git","url":"git+https://github.com/ant-design/ant-design-icons.git"},"scripts":{"g":"npm run generate","generate":"cross-env NODE_ENV=production gulp --require ts-node/register/transpile-only","type-check":"tsc --noEmit","build:es":"tsc --project tsconfig.build.json --module esnext --outDir es","build:lib":"tsc --project tsconfig.build.json --module commonjs --outDir lib","build":"cross-env NODE_ENV=production && npm run build:es && npm run build:lib","test":"cross-env NODE_ENV=test && npm run test:unit","test:unit":"jest","prepublishOnly":"npm run test && npm run g && npm run build && npm run type-check && npm run digest","digest":"node scripts/digest.js"},"bugs":{"url":"https://github.com/ant-design/ant-design-icons/issues"},"devDependencies":{"@babel/core":"^7.8.6","@babel/preset-env":"^7.8.6","@babel/preset-typescript":"^7.8.3","@rgrove/parse-xml":"^2.0.2","@types/gulp":"^4.0.6","@types/gulp-concat":"^0.0.32","@types/gulp-rename":"^0.0.33","@types/jest":"^25.1.3","@types/lodash.camelcase":"^4.3.6","@types/lodash.template":"^4.4.6","@types/lodash.upperfirst":"^4.3.6","@types/node":"^13.9.3","@types/ramda":"^0.26.43","@types/rgrove__parse-xml":"^1.1.0","@types/svgo":"^1.3.1","@types/through2":"^2.0.34","@typescript-eslint/eslint-plugin":"^2.21.0","@typescript-eslint/parser":"^2.21.0","babel-jest":"^25.1.0","cross-env":"^7.0.0","del":"^5.1.0","eslint":"^7.16.0","globby":"^11.0.0","gulp":"^4.0.2","gulp-clone":"^2.0.1","gulp-concat":"^2.6.1","gulp-header":"^2.0.9","gulp-rename":"^2.0.0","jest":"^25.1.0","lodash.camelcase":"^4.3.0","lodash.template":"^4.5.0","lodash.upperfirst":"^4.3.1","ramda":"^0.27.0","svgo":"^1.3.2","through2":"^3.0.1","ts-node":"^8.6.2","typescript":"^4.0.0","vinyl":"^2.2.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_lastModified":"2026-07-
|
|
1
|
+
{"name":"@ant-design/icons-svg","version":"4.3.1","sideEffects":false,"description":"Abstract nodes for ant design icons.","contributors":["HeskeyBaozi <hezhiyu233@foxmail.com>"],"homepage":"https://github.com/ant-design/ant-design-icons/","license":"MIT","main":"lib/index.js","module":"es/index.js","files":["lib","es","inline-svg","inline-namespaced-svg"],"repository":{"type":"git","url":"git+https://github.com/ant-design/ant-design-icons.git"},"scripts":{"g":"npm run generate","generate":"cross-env NODE_ENV=production gulp --require ts-node/register/transpile-only","type-check":"tsc --noEmit","build:es":"tsc --project tsconfig.build.json --module esnext --outDir es","build:lib":"tsc --project tsconfig.build.json --module commonjs --outDir lib","build":"cross-env NODE_ENV=production && npm run build:es && npm run build:lib","test":"cross-env NODE_ENV=test && npm run test:unit","test:unit":"jest","prepublishOnly":"npm run test && npm run g && npm run build && npm run type-check && npm run digest","digest":"node scripts/digest.js"},"bugs":{"url":"https://github.com/ant-design/ant-design-icons/issues"},"devDependencies":{"@babel/core":"^7.8.6","@babel/preset-env":"^7.8.6","@babel/preset-typescript":"^7.8.3","@rgrove/parse-xml":"^2.0.2","@types/gulp":"^4.0.6","@types/gulp-concat":"^0.0.32","@types/gulp-rename":"^0.0.33","@types/jest":"^25.1.3","@types/lodash.camelcase":"^4.3.6","@types/lodash.template":"^4.4.6","@types/lodash.upperfirst":"^4.3.6","@types/node":"^13.9.3","@types/ramda":"^0.26.43","@types/rgrove__parse-xml":"^1.1.0","@types/svgo":"^1.3.1","@types/through2":"^2.0.34","@typescript-eslint/eslint-plugin":"^2.21.0","@typescript-eslint/parser":"^2.21.0","babel-jest":"^25.1.0","cross-env":"^7.0.0","del":"^5.1.0","eslint":"^7.16.0","globby":"^11.0.0","gulp":"^4.0.2","gulp-clone":"^2.0.1","gulp-concat":"^2.6.1","gulp-header":"^2.0.9","gulp-rename":"^2.0.0","jest":"^25.1.0","lodash.camelcase":"^4.3.0","lodash.template":"^4.5.0","lodash.upperfirst":"^4.3.1","ramda":"^0.27.0","svgo":"^1.3.2","through2":"^3.0.1","ts-node":"^8.6.2","typescript":"^4.0.0","vinyl":"^2.2.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_lastModified":"2026-07-30T03:55:35.636Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"acorn","description":"ECMAScript parser","homepage":"https://github.com/acornjs/acorn","main":"dist/acorn.js","types":"dist/acorn.d.ts","module":"dist/acorn.mjs","exports":{".":[{"import":"./dist/acorn.mjs","require":"./dist/acorn.js","default":"./dist/acorn.js"},"./dist/acorn.js"],"./package.json":"./package.json"},"version":"8.11.2","engines":{"node":">=0.4.0"},"maintainers":[{"name":"Marijn Haverbeke","email":"marijnh@gmail.com","web":"https://marijnhaverbeke.nl"},{"name":"Ingvar Stepanyan","email":"me@rreverser.com","web":"https://rreverser.com/"},{"name":"Adrian Heine","web":"http://adrianheine.de"}],"repository":{"type":"git","url":"https://github.com/acornjs/acorn.git"},"license":"MIT","scripts":{"prepare":"cd ..; npm run build:main"},"bin":{"acorn":"./bin/acorn"},"_lastModified":"2026-07-
|
|
1
|
+
{"name":"acorn","description":"ECMAScript parser","homepage":"https://github.com/acornjs/acorn","main":"dist/acorn.js","types":"dist/acorn.d.ts","module":"dist/acorn.mjs","exports":{".":[{"import":"./dist/acorn.mjs","require":"./dist/acorn.js","default":"./dist/acorn.js"},"./dist/acorn.js"],"./package.json":"./package.json"},"version":"8.11.2","engines":{"node":">=0.4.0"},"maintainers":[{"name":"Marijn Haverbeke","email":"marijnh@gmail.com","web":"https://marijnhaverbeke.nl"},{"name":"Ingvar Stepanyan","email":"me@rreverser.com","web":"https://rreverser.com/"},{"name":"Adrian Heine","web":"http://adrianheine.de"}],"repository":{"type":"git","url":"https://github.com/acornjs/acorn.git"},"license":"MIT","scripts":{"prepare":"cd ..; npm run build:main"},"bin":{"acorn":"./bin/acorn"},"_lastModified":"2026-07-30T03:55:36.698Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"acorn-jsx","description":"Modern, fast React.js JSX parser","homepage":"https://github.com/acornjs/acorn-jsx","version":"5.3.2","maintainers":[{"name":"Ingvar Stepanyan","email":"me@rreverser.com","web":"http://rreverser.com/"}],"repository":{"type":"git","url":"https://github.com/acornjs/acorn-jsx"},"license":"MIT","scripts":{"test":"node test/run.js"},"peerDependencies":{"acorn":"^6.0.0 || ^7.0.0 || ^8.0.0"},"devDependencies":{"acorn":"^8.0.1"},"_lastModified":"2026-07-
|
|
1
|
+
{"name":"acorn-jsx","description":"Modern, fast React.js JSX parser","homepage":"https://github.com/acornjs/acorn-jsx","version":"5.3.2","maintainers":[{"name":"Ingvar Stepanyan","email":"me@rreverser.com","web":"http://rreverser.com/"}],"repository":{"type":"git","url":"https://github.com/acornjs/acorn-jsx"},"license":"MIT","scripts":{"test":"node test/run.js"},"peerDependencies":{"acorn":"^6.0.0 || ^7.0.0 || ^8.0.0"},"devDependencies":{"acorn":"^8.0.1"},"_lastModified":"2026-07-30T03:55:37.093Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"acorn-walk","description":"ECMAScript (ESTree) AST walker","homepage":"https://github.com/acornjs/acorn","main":"dist/walk.js","types":"dist/walk.d.ts","module":"dist/walk.mjs","exports":{".":[{"import":"./dist/walk.mjs","require":"./dist/walk.js","default":"./dist/walk.js"},"./dist/walk.js"],"./package.json":"./package.json"},"version":"8.3.4","engines":{"node":">=0.4.0"},"dependencies":{"acorn":"^8.11.0"},"maintainers":[{"name":"Marijn Haverbeke","email":"marijnh@gmail.com","web":"https://marijnhaverbeke.nl"},{"name":"Ingvar Stepanyan","email":"me@rreverser.com","web":"https://rreverser.com/"},{"name":"Adrian Heine","web":"http://adrianheine.de"}],"repository":{"type":"git","url":"https://github.com/acornjs/acorn.git"},"scripts":{"prepare":"cd ..; npm run build:walk"},"license":"MIT","_lastModified":"2026-07-
|
|
1
|
+
{"name":"acorn-walk","description":"ECMAScript (ESTree) AST walker","homepage":"https://github.com/acornjs/acorn","main":"dist/walk.js","types":"dist/walk.d.ts","module":"dist/walk.mjs","exports":{".":[{"import":"./dist/walk.mjs","require":"./dist/walk.js","default":"./dist/walk.js"},"./dist/walk.js"],"./package.json":"./package.json"},"version":"8.3.4","engines":{"node":">=0.4.0"},"dependencies":{"acorn":"^8.11.0"},"maintainers":[{"name":"Marijn Haverbeke","email":"marijnh@gmail.com","web":"https://marijnhaverbeke.nl"},{"name":"Ingvar Stepanyan","email":"me@rreverser.com","web":"https://rreverser.com/"},{"name":"Adrian Heine","web":"http://adrianheine.de"}],"repository":{"type":"git","url":"https://github.com/acornjs/acorn.git"},"scripts":{"prepare":"cd ..; npm run build:walk"},"license":"MIT","_lastModified":"2026-07-30T03:55:37.197Z"}
|