bpmnlint-plugin-camunda-compat 2.59.0 → 2.59.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bpmnlint-plugin-camunda-compat",
3
- "version": "2.59.0",
3
+ "version": "2.59.1",
4
4
  "description": "A bpmnlint plug-in for Camunda compatibility",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -582,6 +582,22 @@ const TOOL_CONTAINER_PROPERTY = 'io.camunda.agenticai.toolContainer';
582
582
  // their AHSPs are agentic but carry no marker; the template id identifies them.
583
583
  const LEGACY_AI_AGENT_TEMPLATE = 'io.camunda.connectors.agenticai.aiagent.jobworker.v1';
584
584
 
585
+ // The job worker type Camunda's AI Agent job-worker template assigns to the
586
+ // AHSP's own zeebe:taskDefinition. Organizations sometimes publish a forked
587
+ // element template (own modelerTemplate id, so LEGACY_AI_AGENT_TEMPLATE
588
+ // doesn't match) while keeping the same job worker underneath, since the
589
+ // fork still needs a worker subscribing to that type to execute it (#259).
590
+ const AI_AGENT_JOB_WORKER_TYPE_PREFIX = 'io.camunda.agenticai:aiagent-job-worker:';
591
+
592
+ function hasAiAgentJobWorkerType(node) {
593
+ const taskDefinition = findExtensionElement(node, 'zeebe:TaskDefinition');
594
+ const type = taskDefinition && taskDefinition.get('type');
595
+
596
+ return !!type && type.startsWith(AI_AGENT_JOB_WORKER_TYPE_PREFIX);
597
+ }
598
+
599
+ module.exports.hasAiAgentJobWorkerType = hasAiAgentJobWorkerType;
600
+
585
601
  function hasToolContainerProperty(node) {
586
602
  const properties = findExtensionElement(node, 'zeebe:Properties');
587
603
 
@@ -611,7 +627,9 @@ module.exports.hasToolContainerProperty = hasToolContainerProperty;
611
627
  //
612
628
  // Older AI Agent job-worker templates predate the property marker; they are
613
629
  // still agentic and are recognized by their (version-agnostic) element template
614
- // id (see LEGACY_AI_AGENT_TEMPLATE).
630
+ // id (see LEGACY_AI_AGENT_TEMPLATE). Forked templates that don't carry that
631
+ // id are still recognized by the underlying job worker type prefix (see
632
+ // AI_AGENT_JOB_WORKER_TYPE_PREFIX), since that's what the fork must keep to run.
615
633
  function isAgenticAdHocSubProcess(ahsp, version) {
616
634
  if (hasToolContainerProperty(ahsp)) {
617
635
  return true;
@@ -621,6 +639,10 @@ function isAgenticAdHocSubProcess(ahsp, version) {
621
639
  return true;
622
640
  }
623
641
 
642
+ if (hasAiAgentJobWorkerType(ahsp)) {
643
+ return true;
644
+ }
645
+
624
646
  return !!version
625
647
  && greaterOrEqual(version, '8.10')
626
648
  && !!findExtensionElement(ahsp, 'zeebe:AgentDefinition');