bpmnlint-plugin-camunda-compat 2.58.0 → 2.58.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/package.json +1 -1
- package/rules/utils/element.js +15 -0
package/package.json
CHANGED
package/rules/utils/element.js
CHANGED
|
@@ -530,6 +530,13 @@ module.exports.findAncestorAdHocSubProcess = findAncestorAdHocSubProcess;
|
|
|
530
530
|
// both roles on the same element.
|
|
531
531
|
const TOOL_CONTAINER_PROPERTY = 'io.camunda.agenticai.toolContainer';
|
|
532
532
|
|
|
533
|
+
// The AI Agent job-worker template applied to an ad-hoc sub-process. Its id is
|
|
534
|
+
// stable across template versions (versioning is tracked separately via
|
|
535
|
+
// zeebe:modelerTemplateVersion), so matching it recognizes every version. Older
|
|
536
|
+
// versions of this template predate the TOOL_CONTAINER_PROPERTY marker, so
|
|
537
|
+
// their AHSPs are agentic but carry no marker; the template id identifies them.
|
|
538
|
+
const LEGACY_AI_AGENT_TEMPLATE = 'io.camunda.connectors.agenticai.aiagent.jobworker.v1';
|
|
539
|
+
|
|
533
540
|
function hasToolContainerRoleProperty(node) {
|
|
534
541
|
const properties = findExtensionElement(node, 'zeebe:Properties');
|
|
535
542
|
|
|
@@ -556,11 +563,19 @@ module.exports.hasToolContainerRoleProperty = hasToolContainerRoleProperty;
|
|
|
556
563
|
// Deliberately does not fall back to a bare `zeebe:AdHoc` extension: that
|
|
557
564
|
// extension is also carried by plain ad-hoc sub-processes using output
|
|
558
565
|
// collection, so it can't reliably distinguish agentic from non-agentic ones.
|
|
566
|
+
//
|
|
567
|
+
// Older AI Agent job-worker templates predate the property marker; they are
|
|
568
|
+
// still agentic and are recognized by their (version-agnostic) element template
|
|
569
|
+
// id (see LEGACY_AI_AGENT_TEMPLATE).
|
|
559
570
|
function isAgenticAdHocSubProcess(ahsp, version) {
|
|
560
571
|
if (hasToolContainerRoleProperty(ahsp)) {
|
|
561
572
|
return true;
|
|
562
573
|
}
|
|
563
574
|
|
|
575
|
+
if (ahsp.get('modelerTemplate') === LEGACY_AI_AGENT_TEMPLATE) {
|
|
576
|
+
return true;
|
|
577
|
+
}
|
|
578
|
+
|
|
564
579
|
return !!version
|
|
565
580
|
&& greaterOrEqual(version, '8.10')
|
|
566
581
|
&& !!findExtensionElement(ahsp, 'zeebe:AgentDefinition');
|