@nocobase/plugin-flow-engine 2.1.0-alpha.39 → 2.1.0-alpha.40
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/externalVersion.js +9 -9
- package/dist/node_modules/@ant-design/icons-svg/package.json +1 -1
- package/dist/node_modules/acorn/LICENSE +21 -0
- package/dist/node_modules/acorn/bin/acorn +4 -0
- package/dist/node_modules/acorn/dist/acorn.d.mts +857 -0
- package/dist/node_modules/acorn/dist/acorn.d.ts +857 -0
- package/dist/node_modules/acorn/dist/acorn.js +1 -0
- package/dist/node_modules/acorn/dist/bin.js +90 -0
- package/dist/node_modules/acorn/package.json +1 -0
- package/dist/node_modules/acorn-jsx/LICENSE +19 -0
- package/dist/node_modules/acorn-jsx/index.d.ts +12 -0
- package/dist/node_modules/acorn-jsx/index.js +1 -0
- package/dist/node_modules/acorn-jsx/package.json +1 -0
- package/dist/node_modules/acorn-jsx/xhtml.js +255 -0
- package/dist/node_modules/acorn-walk/LICENSE +21 -0
- package/dist/node_modules/acorn-walk/dist/walk.d.mts +177 -0
- package/dist/node_modules/acorn-walk/dist/walk.d.ts +177 -0
- package/dist/node_modules/acorn-walk/dist/walk.js +1 -0
- package/dist/node_modules/acorn-walk/node_modules/acorn/bin/acorn +4 -0
- package/dist/node_modules/acorn-walk/node_modules/acorn/dist/acorn.d.mts +866 -0
- package/dist/node_modules/acorn-walk/node_modules/acorn/dist/acorn.d.ts +866 -0
- package/dist/node_modules/acorn-walk/node_modules/acorn/dist/acorn.js +6174 -0
- package/dist/node_modules/acorn-walk/node_modules/acorn/dist/bin.js +90 -0
- package/dist/node_modules/acorn-walk/node_modules/acorn/package.json +50 -0
- package/dist/node_modules/acorn-walk/package.json +1 -0
- package/dist/node_modules/ses/package.json +1 -1
- package/dist/node_modules/zod/package.json +1 -1
- package/dist/server/flow-surfaces/action-scope.d.ts +2 -0
- package/dist/server/flow-surfaces/action-scope.js +8 -0
- package/dist/server/flow-surfaces/authoring-validation.d.ts +3 -0
- package/dist/server/flow-surfaces/authoring-validation.js +317 -9
- package/dist/server/flow-surfaces/blueprint/compile-blocks.js +143 -3
- package/dist/server/flow-surfaces/blueprint/public-types.d.ts +1 -1
- package/dist/server/flow-surfaces/builder.js +54 -1
- package/dist/server/flow-surfaces/catalog.js +148 -2
- package/dist/server/flow-surfaces/chart-config.d.ts +58 -54
- package/dist/server/flow-surfaces/chart-config.js +18 -5
- package/dist/server/flow-surfaces/compose-compiler.d.ts +1 -1
- package/dist/server/flow-surfaces/compose-runtime.d.ts +1 -0
- package/dist/server/flow-surfaces/compose-runtime.js +24 -6
- package/dist/server/flow-surfaces/configure-options.js +40 -1
- package/dist/server/flow-surfaces/default-block-actions.js +11 -0
- package/dist/server/flow-surfaces/index.js +4 -2
- package/dist/server/flow-surfaces/node-use-sets.js +2 -0
- package/dist/server/flow-surfaces/runjs-authoring/index.d.ts +14 -2
- package/dist/server/flow-surfaces/runjs-authoring/index.js +4213 -242
- package/dist/server/flow-surfaces/runjs-authoring/nested-runjs-stop/index.d.ts +10 -0
- package/dist/server/flow-surfaces/runjs-authoring/nested-runjs-stop/index.js +40 -0
- package/dist/server/flow-surfaces/runjs-authoring/rules.js +6 -0
- package/dist/server/flow-surfaces/runjs-authoring/source-limit-stop/index.d.ts +10 -0
- package/dist/server/flow-surfaces/runjs-authoring/source-limit-stop/index.js +40 -0
- package/dist/server/flow-surfaces/runjs-authoring/syntax-stop/index.d.ts +10 -0
- package/dist/server/flow-surfaces/runjs-authoring/syntax-stop/index.js +40 -0
- package/dist/server/flow-surfaces/runjs-authoring/types.d.ts +1 -1
- package/dist/server/flow-surfaces/service-utils.d.ts +1 -1
- package/dist/server/flow-surfaces/service-utils.js +3 -0
- package/dist/server/flow-surfaces/service.d.ts +61 -3
- package/dist/server/flow-surfaces/service.js +1199 -101
- package/dist/server/flow-surfaces/support-matrix.d.ts +1 -1
- package/dist/server/flow-surfaces/support-matrix.js +13 -1
- package/dist/server/flow-surfaces/surface-context.js +4 -13
- package/dist/swagger/flow-surfaces.d.ts +147 -0
- package/dist/swagger/flow-surfaces.examples.d.ts +194 -1
- package/dist/swagger/flow-surfaces.examples.js +75 -3
- package/dist/swagger/flow-surfaces.js +180 -7
- package/dist/swagger/index.d.ts +147 -0
- package/package.json +5 -2
|
@@ -6,7 +6,7 @@
|
|
|
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
|
-
export type FormalFlowSurfaceBlockKey = 'js-block' | 'table' | 'calendar' | 'kanban' | 'create-form' | 'edit-form' | 'details' | 'filter-form' | 'list' | 'grid-card' | 'markdown' | 'iframe' | 'map' | 'chart' | 'comments' | 'action-panel';
|
|
9
|
+
export type FormalFlowSurfaceBlockKey = 'js-block' | 'table' | 'calendar' | 'kanban' | 'create-form' | 'edit-form' | 'details' | 'filter-form' | 'list' | 'grid-card' | 'markdown' | 'iframe' | 'map' | 'chart' | 'comments' | 'record-history' | 'action-panel';
|
|
10
10
|
export type FlowSurfaceBlockSupportEntry = {
|
|
11
11
|
key: string;
|
|
12
12
|
formalKey?: FormalFlowSurfaceBlockKey;
|
|
@@ -225,7 +225,19 @@ const FLOW_SURFACE_BLOCK_SUPPORT_MATRIX = [
|
|
|
225
225
|
formalBuiltin: true,
|
|
226
226
|
fixtureCaptured: true,
|
|
227
227
|
readbackSupported: true,
|
|
228
|
-
createSupported:
|
|
228
|
+
createSupported: true
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
key: "recordHistory",
|
|
232
|
+
formalKey: "record-history",
|
|
233
|
+
label: "Record history",
|
|
234
|
+
modelUse: "RecordHistoryBlockModel",
|
|
235
|
+
ownerPlugin: "@nocobase/plugin-record-history",
|
|
236
|
+
topLevelAddable: true,
|
|
237
|
+
formalBuiltin: true,
|
|
238
|
+
fixtureCaptured: false,
|
|
239
|
+
readbackSupported: true,
|
|
240
|
+
createSupported: true
|
|
229
241
|
},
|
|
230
242
|
{
|
|
231
243
|
key: "actionPanel",
|
|
@@ -40,6 +40,7 @@ __export(surface_context_exports, {
|
|
|
40
40
|
});
|
|
41
41
|
module.exports = __toCommonJS(surface_context_exports);
|
|
42
42
|
var import_lodash = __toESM(require("lodash"));
|
|
43
|
+
var import_action_scope = require("./action-scope");
|
|
43
44
|
var import_catalog = require("./catalog");
|
|
44
45
|
var import_chart_config = require("./chart-config");
|
|
45
46
|
var import_errors = require("./errors");
|
|
@@ -54,12 +55,11 @@ const FILTER_TARGET_BLOCK_USES = /* @__PURE__ */ new Set([
|
|
|
54
55
|
"GridCardBlockModel",
|
|
55
56
|
"ChartBlockModel",
|
|
56
57
|
"MapBlockModel",
|
|
57
|
-
"CommentsBlockModel"
|
|
58
|
+
"CommentsBlockModel",
|
|
59
|
+
"RecordHistoryBlockModel"
|
|
58
60
|
]);
|
|
59
61
|
const DETAILS_CARD_BLOCK_USES = /* @__PURE__ */ new Set(["ListBlockModel", "GridCardBlockModel", "KanbanBlockModel"]);
|
|
60
62
|
const DETAILS_CARD_ITEM_USES = /* @__PURE__ */ new Set(["ListItemModel", "GridCardItemModel", "KanbanCardItemModel"]);
|
|
61
|
-
const RECORD_ACTION_ITEM_USES = /* @__PURE__ */ new Set(["ListItemModel", "GridCardItemModel"]);
|
|
62
|
-
const BLOCK_ACTION_CONTAINER_USES = /* @__PURE__ */ new Set(["ListBlockModel", "GridCardBlockModel", "KanbanBlockModel"]);
|
|
63
63
|
function getDefaultGridUse(ownerUse, fallbackUse) {
|
|
64
64
|
return (0, import_approval.getApprovalDefaultGridUse)(ownerUse) || fallbackUse;
|
|
65
65
|
}
|
|
@@ -334,16 +334,7 @@ class FlowSurfaceContextResolver {
|
|
|
334
334
|
var _a;
|
|
335
335
|
const resolved = await this.locator.resolve(target, { transaction });
|
|
336
336
|
const node = resolved.node || await this.repository.findModelById(resolved.uid, { transaction, includeAsyncNode: true });
|
|
337
|
-
if (
|
|
338
|
-
return {
|
|
339
|
-
parentUid: node.uid,
|
|
340
|
-
subKey: "actions",
|
|
341
|
-
subType: "array",
|
|
342
|
-
ownerUid: node.uid,
|
|
343
|
-
ownerUse: node.use
|
|
344
|
-
};
|
|
345
|
-
}
|
|
346
|
-
if ((0, import_placement.isFormBlockUse)(node == null ? void 0 : node.use) || (0, import_placement.isDetailsBlockUse)(node == null ? void 0 : node.use) || (0, import_placement.isFilterFormBlockUse)(node == null ? void 0 : node.use)) {
|
|
337
|
+
if ((0, import_action_scope.getActionContainerScope)(node == null ? void 0 : node.use) || (0, import_placement.isFormBlockUse)(node == null ? void 0 : node.use) || (0, import_placement.isDetailsBlockUse)(node == null ? void 0 : node.use) || (0, import_placement.isFilterFormBlockUse)(node == null ? void 0 : node.use)) {
|
|
347
338
|
return {
|
|
348
339
|
parentUid: node.uid,
|
|
349
340
|
subKey: "actions",
|
|
@@ -4448,6 +4448,153 @@ declare const _default: {
|
|
|
4448
4448
|
type: string;
|
|
4449
4449
|
additionalProperties: boolean;
|
|
4450
4450
|
};
|
|
4451
|
+
username: {
|
|
4452
|
+
type: string;
|
|
4453
|
+
description: string;
|
|
4454
|
+
};
|
|
4455
|
+
auto: {
|
|
4456
|
+
type: string;
|
|
4457
|
+
description: string;
|
|
4458
|
+
};
|
|
4459
|
+
workContext: {
|
|
4460
|
+
type: string;
|
|
4461
|
+
description: string;
|
|
4462
|
+
items: {
|
|
4463
|
+
type: string;
|
|
4464
|
+
required: string[];
|
|
4465
|
+
anyOf: {
|
|
4466
|
+
required: string[];
|
|
4467
|
+
}[];
|
|
4468
|
+
properties: {
|
|
4469
|
+
type: {
|
|
4470
|
+
type: string;
|
|
4471
|
+
enum: string[];
|
|
4472
|
+
example: string;
|
|
4473
|
+
};
|
|
4474
|
+
uid: {
|
|
4475
|
+
type: string;
|
|
4476
|
+
minLength: number;
|
|
4477
|
+
description: string;
|
|
4478
|
+
};
|
|
4479
|
+
target: {
|
|
4480
|
+
type: string;
|
|
4481
|
+
minLength: number;
|
|
4482
|
+
description: string;
|
|
4483
|
+
};
|
|
4484
|
+
};
|
|
4485
|
+
additionalProperties: boolean;
|
|
4486
|
+
};
|
|
4487
|
+
};
|
|
4488
|
+
tasks: {
|
|
4489
|
+
type: string;
|
|
4490
|
+
description: string;
|
|
4491
|
+
items: {
|
|
4492
|
+
type: string;
|
|
4493
|
+
properties: {
|
|
4494
|
+
title: {
|
|
4495
|
+
type: string;
|
|
4496
|
+
};
|
|
4497
|
+
message: {
|
|
4498
|
+
type: string;
|
|
4499
|
+
properties: {
|
|
4500
|
+
system: {
|
|
4501
|
+
type: string;
|
|
4502
|
+
};
|
|
4503
|
+
user: {
|
|
4504
|
+
type: string;
|
|
4505
|
+
};
|
|
4506
|
+
workContext: {
|
|
4507
|
+
type: string;
|
|
4508
|
+
items: {
|
|
4509
|
+
type: string;
|
|
4510
|
+
required: string[];
|
|
4511
|
+
anyOf: {
|
|
4512
|
+
required: string[];
|
|
4513
|
+
}[];
|
|
4514
|
+
properties: {
|
|
4515
|
+
type: {
|
|
4516
|
+
type: string;
|
|
4517
|
+
enum: string[];
|
|
4518
|
+
example: string;
|
|
4519
|
+
};
|
|
4520
|
+
uid: {
|
|
4521
|
+
type: string;
|
|
4522
|
+
minLength: number;
|
|
4523
|
+
};
|
|
4524
|
+
target: {
|
|
4525
|
+
type: string;
|
|
4526
|
+
minLength: number;
|
|
4527
|
+
};
|
|
4528
|
+
};
|
|
4529
|
+
additionalProperties: boolean;
|
|
4530
|
+
};
|
|
4531
|
+
};
|
|
4532
|
+
};
|
|
4533
|
+
additionalProperties: boolean;
|
|
4534
|
+
};
|
|
4535
|
+
autoSend: {
|
|
4536
|
+
type: string;
|
|
4537
|
+
};
|
|
4538
|
+
skillSettings: {
|
|
4539
|
+
type: string;
|
|
4540
|
+
nullable: boolean;
|
|
4541
|
+
properties: {
|
|
4542
|
+
skills: {
|
|
4543
|
+
type: string;
|
|
4544
|
+
items: {
|
|
4545
|
+
type: string;
|
|
4546
|
+
};
|
|
4547
|
+
};
|
|
4548
|
+
tools: {
|
|
4549
|
+
type: string;
|
|
4550
|
+
items: {
|
|
4551
|
+
type: string;
|
|
4552
|
+
};
|
|
4553
|
+
};
|
|
4554
|
+
skillsVersion: {
|
|
4555
|
+
type: string;
|
|
4556
|
+
};
|
|
4557
|
+
toolsVersion: {
|
|
4558
|
+
type: string;
|
|
4559
|
+
};
|
|
4560
|
+
};
|
|
4561
|
+
additionalProperties: boolean;
|
|
4562
|
+
};
|
|
4563
|
+
model: {
|
|
4564
|
+
type: string;
|
|
4565
|
+
nullable: boolean;
|
|
4566
|
+
required: string[];
|
|
4567
|
+
description: string;
|
|
4568
|
+
properties: {
|
|
4569
|
+
llmService: {
|
|
4570
|
+
type: string;
|
|
4571
|
+
};
|
|
4572
|
+
model: {
|
|
4573
|
+
type: string;
|
|
4574
|
+
};
|
|
4575
|
+
};
|
|
4576
|
+
additionalProperties: boolean;
|
|
4577
|
+
};
|
|
4578
|
+
webSearch: {
|
|
4579
|
+
type: string;
|
|
4580
|
+
};
|
|
4581
|
+
};
|
|
4582
|
+
additionalProperties: boolean;
|
|
4583
|
+
};
|
|
4584
|
+
};
|
|
4585
|
+
style: {
|
|
4586
|
+
type: string;
|
|
4587
|
+
description: string;
|
|
4588
|
+
properties: {
|
|
4589
|
+
size: {
|
|
4590
|
+
type: string;
|
|
4591
|
+
};
|
|
4592
|
+
mask: {
|
|
4593
|
+
type: string;
|
|
4594
|
+
};
|
|
4595
|
+
};
|
|
4596
|
+
additionalProperties: boolean;
|
|
4597
|
+
};
|
|
4451
4598
|
};
|
|
4452
4599
|
additionalProperties: boolean;
|
|
4453
4600
|
};
|
|
@@ -62,8 +62,42 @@ export declare const flowSurfaceExamples: {
|
|
|
62
62
|
span: number;
|
|
63
63
|
}[])[];
|
|
64
64
|
};
|
|
65
|
-
actions: string
|
|
65
|
+
actions: (string | {
|
|
66
|
+
key: string;
|
|
67
|
+
type: string;
|
|
68
|
+
settings: {
|
|
69
|
+
username: string;
|
|
70
|
+
auto: boolean;
|
|
71
|
+
workContext: {
|
|
72
|
+
type: string;
|
|
73
|
+
target: string;
|
|
74
|
+
}[];
|
|
75
|
+
tasks: {
|
|
76
|
+
title: string;
|
|
77
|
+
message: {
|
|
78
|
+
system: string;
|
|
79
|
+
user: string;
|
|
80
|
+
workContext: {
|
|
81
|
+
type: string;
|
|
82
|
+
target: string;
|
|
83
|
+
}[];
|
|
84
|
+
};
|
|
85
|
+
autoSend: boolean;
|
|
86
|
+
skillSettings: {
|
|
87
|
+
skills: any[];
|
|
88
|
+
tools: any[];
|
|
89
|
+
};
|
|
90
|
+
model: any;
|
|
91
|
+
webSearch: boolean;
|
|
92
|
+
}[];
|
|
93
|
+
style: {
|
|
94
|
+
size: number;
|
|
95
|
+
mask: boolean;
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
})[];
|
|
66
99
|
defaultFilter?: undefined;
|
|
100
|
+
recordActions?: undefined;
|
|
67
101
|
} | {
|
|
68
102
|
key: string;
|
|
69
103
|
type: string;
|
|
@@ -94,7 +128,74 @@ export declare const flowSurfaceExamples: {
|
|
|
94
128
|
key: string;
|
|
95
129
|
type: string;
|
|
96
130
|
settings?: undefined;
|
|
131
|
+
} | {
|
|
132
|
+
key: string;
|
|
133
|
+
type: string;
|
|
134
|
+
settings: {
|
|
135
|
+
username: string;
|
|
136
|
+
auto: boolean;
|
|
137
|
+
workContext: {
|
|
138
|
+
type: string;
|
|
139
|
+
target: string;
|
|
140
|
+
}[];
|
|
141
|
+
tasks: {
|
|
142
|
+
title: string;
|
|
143
|
+
message: {
|
|
144
|
+
system: string;
|
|
145
|
+
user: string;
|
|
146
|
+
workContext: {
|
|
147
|
+
type: string;
|
|
148
|
+
target: string;
|
|
149
|
+
}[];
|
|
150
|
+
};
|
|
151
|
+
autoSend: boolean;
|
|
152
|
+
skillSettings: {
|
|
153
|
+
skills: any[];
|
|
154
|
+
tools: any[];
|
|
155
|
+
};
|
|
156
|
+
model: any;
|
|
157
|
+
webSearch: boolean;
|
|
158
|
+
}[];
|
|
159
|
+
style: {
|
|
160
|
+
size: number;
|
|
161
|
+
mask: boolean;
|
|
162
|
+
};
|
|
163
|
+
};
|
|
97
164
|
})[];
|
|
165
|
+
recordActions: {
|
|
166
|
+
key: string;
|
|
167
|
+
type: string;
|
|
168
|
+
settings: {
|
|
169
|
+
username: string;
|
|
170
|
+
auto: boolean;
|
|
171
|
+
workContext: {
|
|
172
|
+
type: string;
|
|
173
|
+
target: string;
|
|
174
|
+
}[];
|
|
175
|
+
tasks: {
|
|
176
|
+
title: string;
|
|
177
|
+
message: {
|
|
178
|
+
system: string;
|
|
179
|
+
user: string;
|
|
180
|
+
workContext: {
|
|
181
|
+
type: string;
|
|
182
|
+
target: string;
|
|
183
|
+
}[];
|
|
184
|
+
};
|
|
185
|
+
autoSend: boolean;
|
|
186
|
+
skillSettings: {
|
|
187
|
+
skills: any[];
|
|
188
|
+
tools: any[];
|
|
189
|
+
};
|
|
190
|
+
model: any;
|
|
191
|
+
webSearch: boolean;
|
|
192
|
+
}[];
|
|
193
|
+
style: {
|
|
194
|
+
size: number;
|
|
195
|
+
mask: boolean;
|
|
196
|
+
};
|
|
197
|
+
};
|
|
198
|
+
}[];
|
|
98
199
|
fieldsLayout?: undefined;
|
|
99
200
|
})[];
|
|
100
201
|
layout: {
|
|
@@ -1161,6 +1262,42 @@ export declare const flowSurfaceExamples: {
|
|
|
1161
1262
|
code: string;
|
|
1162
1263
|
};
|
|
1163
1264
|
};
|
|
1265
|
+
addAIEmployeeAction: {
|
|
1266
|
+
target: {
|
|
1267
|
+
uid: string;
|
|
1268
|
+
};
|
|
1269
|
+
type: string;
|
|
1270
|
+
settings: {
|
|
1271
|
+
username: string;
|
|
1272
|
+
auto: boolean;
|
|
1273
|
+
workContext: {
|
|
1274
|
+
type: string;
|
|
1275
|
+
target: string;
|
|
1276
|
+
}[];
|
|
1277
|
+
tasks: {
|
|
1278
|
+
title: string;
|
|
1279
|
+
message: {
|
|
1280
|
+
system: string;
|
|
1281
|
+
user: string;
|
|
1282
|
+
workContext: {
|
|
1283
|
+
type: string;
|
|
1284
|
+
target: string;
|
|
1285
|
+
}[];
|
|
1286
|
+
};
|
|
1287
|
+
autoSend: boolean;
|
|
1288
|
+
skillSettings: {
|
|
1289
|
+
skills: any[];
|
|
1290
|
+
tools: any[];
|
|
1291
|
+
};
|
|
1292
|
+
model: any;
|
|
1293
|
+
webSearch: boolean;
|
|
1294
|
+
}[];
|
|
1295
|
+
style: {
|
|
1296
|
+
size: number;
|
|
1297
|
+
mask: boolean;
|
|
1298
|
+
};
|
|
1299
|
+
};
|
|
1300
|
+
};
|
|
1164
1301
|
addRecordAction: {
|
|
1165
1302
|
target: {
|
|
1166
1303
|
uid: string;
|
|
@@ -1258,6 +1395,42 @@ export declare const flowSurfaceExamples: {
|
|
|
1258
1395
|
code: string;
|
|
1259
1396
|
};
|
|
1260
1397
|
};
|
|
1398
|
+
addRecordAIEmployeeAction: {
|
|
1399
|
+
target: {
|
|
1400
|
+
uid: string;
|
|
1401
|
+
};
|
|
1402
|
+
type: string;
|
|
1403
|
+
settings: {
|
|
1404
|
+
username: string;
|
|
1405
|
+
auto: boolean;
|
|
1406
|
+
workContext: {
|
|
1407
|
+
type: string;
|
|
1408
|
+
target: string;
|
|
1409
|
+
}[];
|
|
1410
|
+
tasks: {
|
|
1411
|
+
title: string;
|
|
1412
|
+
message: {
|
|
1413
|
+
system: string;
|
|
1414
|
+
user: string;
|
|
1415
|
+
workContext: {
|
|
1416
|
+
type: string;
|
|
1417
|
+
target: string;
|
|
1418
|
+
}[];
|
|
1419
|
+
};
|
|
1420
|
+
autoSend: boolean;
|
|
1421
|
+
skillSettings: {
|
|
1422
|
+
skills: any[];
|
|
1423
|
+
tools: any[];
|
|
1424
|
+
};
|
|
1425
|
+
model: any;
|
|
1426
|
+
webSearch: boolean;
|
|
1427
|
+
}[];
|
|
1428
|
+
style: {
|
|
1429
|
+
size: number;
|
|
1430
|
+
mask: boolean;
|
|
1431
|
+
};
|
|
1432
|
+
};
|
|
1433
|
+
};
|
|
1261
1434
|
addBlocks: {
|
|
1262
1435
|
target: {
|
|
1263
1436
|
uid: string;
|
|
@@ -1449,6 +1622,26 @@ export declare const flowSurfaceExamples: {
|
|
|
1449
1622
|
};
|
|
1450
1623
|
};
|
|
1451
1624
|
};
|
|
1625
|
+
updateAIEmployeeSettings: {
|
|
1626
|
+
target: {
|
|
1627
|
+
uid: string;
|
|
1628
|
+
};
|
|
1629
|
+
tasks: {
|
|
1630
|
+
title: string;
|
|
1631
|
+
message: {
|
|
1632
|
+
user: string;
|
|
1633
|
+
workContext: {
|
|
1634
|
+
type: string;
|
|
1635
|
+
target: string;
|
|
1636
|
+
}[];
|
|
1637
|
+
};
|
|
1638
|
+
autoSend: boolean;
|
|
1639
|
+
webSearch: boolean;
|
|
1640
|
+
}[];
|
|
1641
|
+
style: {
|
|
1642
|
+
mask: boolean;
|
|
1643
|
+
};
|
|
1644
|
+
};
|
|
1452
1645
|
getEventFlowMeta: {
|
|
1453
1646
|
target: {
|
|
1454
1647
|
uid: string;
|
|
@@ -54,6 +54,26 @@ const makePublicBlockDefaultFilter = (items = [
|
|
|
54
54
|
logic: "$and",
|
|
55
55
|
items
|
|
56
56
|
});
|
|
57
|
+
const makeAIEmployeeActionSettings = (target = "self") => ({
|
|
58
|
+
username: "dex",
|
|
59
|
+
auto: false,
|
|
60
|
+
workContext: [{ type: "flow-model", target }],
|
|
61
|
+
tasks: [
|
|
62
|
+
{
|
|
63
|
+
title: "Analyze current context",
|
|
64
|
+
message: {
|
|
65
|
+
system: "Use the current UI context.",
|
|
66
|
+
user: "Analyze the current record and suggest next steps.",
|
|
67
|
+
workContext: [{ type: "flow-model", target }]
|
|
68
|
+
},
|
|
69
|
+
autoSend: false,
|
|
70
|
+
skillSettings: { skills: [], tools: [] },
|
|
71
|
+
model: null,
|
|
72
|
+
webSearch: false
|
|
73
|
+
}
|
|
74
|
+
],
|
|
75
|
+
style: { size: 40, mask: false }
|
|
76
|
+
});
|
|
57
77
|
const flowSurfaceExamples = {
|
|
58
78
|
catalog: {
|
|
59
79
|
target: {
|
|
@@ -132,7 +152,14 @@ const flowSurfaceExamples = {
|
|
|
132
152
|
["total"]
|
|
133
153
|
]
|
|
134
154
|
},
|
|
135
|
-
actions: [
|
|
155
|
+
actions: [
|
|
156
|
+
"submit",
|
|
157
|
+
{
|
|
158
|
+
key: "formAssistantAction",
|
|
159
|
+
type: "aiEmployee",
|
|
160
|
+
settings: makeAIEmployeeActionSettings()
|
|
161
|
+
}
|
|
162
|
+
]
|
|
136
163
|
},
|
|
137
164
|
{
|
|
138
165
|
key: "employeesTable",
|
|
@@ -193,6 +220,18 @@ const flowSurfaceExamples = {
|
|
|
193
220
|
{
|
|
194
221
|
key: "refreshAction",
|
|
195
222
|
type: "refresh"
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
key: "tableInsightAction",
|
|
226
|
+
type: "aiEmployee",
|
|
227
|
+
settings: makeAIEmployeeActionSettings("employeeForm")
|
|
228
|
+
}
|
|
229
|
+
],
|
|
230
|
+
recordActions: [
|
|
231
|
+
{
|
|
232
|
+
key: "recordInsightAction",
|
|
233
|
+
type: "aiEmployee",
|
|
234
|
+
settings: makeAIEmployeeActionSettings()
|
|
196
235
|
}
|
|
197
236
|
]
|
|
198
237
|
}
|
|
@@ -961,7 +1000,7 @@ const flowSurfaceExamples = {
|
|
|
961
1000
|
title: "Run diagnostics",
|
|
962
1001
|
type: "primary",
|
|
963
1002
|
version: "1.0.1",
|
|
964
|
-
code:
|
|
1003
|
+
code: 'ctx.console.log("diagnostics");'
|
|
965
1004
|
}
|
|
966
1005
|
},
|
|
967
1006
|
configureJsItemAction: {
|
|
@@ -1474,7 +1513,7 @@ const flowSurfaceExamples = {
|
|
|
1474
1513
|
title: "Run JS",
|
|
1475
1514
|
type: "primary",
|
|
1476
1515
|
version: "1.0.0",
|
|
1477
|
-
code:
|
|
1516
|
+
code: 'ctx.console.log("hello");'
|
|
1478
1517
|
}
|
|
1479
1518
|
},
|
|
1480
1519
|
addJsItemAction: {
|
|
@@ -1489,6 +1528,13 @@ const flowSurfaceExamples = {
|
|
|
1489
1528
|
code: 'const { Button } = ctx.antd;\n\nfunction JsItemAction() {\n return <Button onClick={() => ctx.message.success("Item JS complete")}>Run item JS</Button>;\n}\n\nctx.render(<JsItemAction />);'
|
|
1490
1529
|
}
|
|
1491
1530
|
},
|
|
1531
|
+
addAIEmployeeAction: {
|
|
1532
|
+
target: {
|
|
1533
|
+
uid: "table-block-uid"
|
|
1534
|
+
},
|
|
1535
|
+
type: "aiEmployee",
|
|
1536
|
+
settings: makeAIEmployeeActionSettings()
|
|
1537
|
+
},
|
|
1492
1538
|
addRecordAction: {
|
|
1493
1539
|
target: {
|
|
1494
1540
|
uid: "table-block-uid"
|
|
@@ -1592,6 +1638,13 @@ const flowSurfaceExamples = {
|
|
|
1592
1638
|
code: "return currentRecord?.id;"
|
|
1593
1639
|
}
|
|
1594
1640
|
},
|
|
1641
|
+
addRecordAIEmployeeAction: {
|
|
1642
|
+
target: {
|
|
1643
|
+
uid: "table-block-uid"
|
|
1644
|
+
},
|
|
1645
|
+
type: "aiEmployee",
|
|
1646
|
+
settings: makeAIEmployeeActionSettings()
|
|
1647
|
+
},
|
|
1595
1648
|
addBlocks: {
|
|
1596
1649
|
target: {
|
|
1597
1650
|
uid: "page-grid-uid"
|
|
@@ -1829,6 +1882,25 @@ const flowSurfaceExamples = {
|
|
|
1829
1882
|
}
|
|
1830
1883
|
}
|
|
1831
1884
|
},
|
|
1885
|
+
updateAIEmployeeSettings: {
|
|
1886
|
+
target: {
|
|
1887
|
+
uid: "ai-employee-action-uid"
|
|
1888
|
+
},
|
|
1889
|
+
tasks: [
|
|
1890
|
+
{
|
|
1891
|
+
title: "Generate table insights",
|
|
1892
|
+
message: {
|
|
1893
|
+
user: "Summarize the current table and identify risks.",
|
|
1894
|
+
workContext: [{ type: "flow-model", target: "self" }]
|
|
1895
|
+
},
|
|
1896
|
+
autoSend: true,
|
|
1897
|
+
webSearch: false
|
|
1898
|
+
}
|
|
1899
|
+
],
|
|
1900
|
+
style: {
|
|
1901
|
+
mask: true
|
|
1902
|
+
}
|
|
1903
|
+
},
|
|
1832
1904
|
getEventFlowMeta: {
|
|
1833
1905
|
target: {
|
|
1834
1906
|
uid: "submit-action-uid"
|