PluginProbe
Extendify / 3.2.1
Extendify v3.2.1
3.2.1 3.2.0 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.6 3.0.5 3.0.4 trunk 0.1.0 0.10.0 0.10.1 0.10.2 0.11.0 0.11.1 0.2.0 0.3.0 0.3.1 0.4.0 0.5.0 0.6.0 All 127 releases
← All changes | src/Agent/workflows/workflows.js +15 -2 3.1.33.2.1 View file →
@@ -1,14 +1,27 @@
1 1 const workflowContext = require.context(
2 2 '.',
3 3 true,
4 - // Exclude this file and anything in tools/ or components/
5 - /^(?!.*\/(tools|components)\/)(?!\.\/workflows\.js$).*\.js$/,
4 + // Anything not excluded here ships to find-agent as an eligible workflow.
5 + /^(?!.*\/(tools|components|overrides)\/)(?!\.\/workflows\.js$).*\.js$/,
6 6 );
7 7 export const workflows = workflowContext
8 8 .keys()
9 9 .filter((key) => key !== './workflows.js')
10 10 .map((key) => workflowContext(key).default || workflowContext(key));
11 +
12 +// Merged over the workflow the backend sent, never offered to find-agent.
13 +const abilityContext = require.context(
14 + '.',
15 + true,
16 + /abilities\/overrides\/.*\.js$/,
17 +);
18 +export const abilityWorkflows = Object.fromEntries(
19 + abilityContext.keys().map((key) => {
20 + const workflow = abilityContext(key).default || abilityContext(key);
21 + return [workflow.id, workflow];
22 + }),
23 +);
11 24
12 25 // Dynamically pull in all tools
13 26 const toolContext = require.context('.', true, /tools\/.*\.js$/);
14 27 export const tools = toolContext.keys().reduce((acc, key) => {