c8ctl-plugin-nano 1.38.0 → 1.38.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/c8ctl-plugin.js +37 -7
- package/package.json +8 -8
package/c8ctl-plugin.js
CHANGED
|
@@ -2493,11 +2493,14 @@ function resolveAutoRestConfig(camunda, env = process.env) {
|
|
|
2493
2493
|
// verbatim — colon-named types are NOT forced through the agentic dot-grammar.
|
|
2494
2494
|
// ---------------------------------------------------------------------------
|
|
2495
2495
|
|
|
2496
|
-
// True iff a serviceTask body carries a `zeebe:
|
|
2497
|
-
//
|
|
2496
|
+
// True iff a serviceTask body carries a `zeebe:header` (inside its
|
|
2497
|
+
// `zeebe:taskHeaders`) under the agent-task
|
|
2498
|
+
// namespace — the LEGACY marker that distinguishes an agent task from a plain
|
|
2498
2499
|
// connector / record-keeper. Matches the exact `io.nanobpm.agentTask` key and
|
|
2499
2500
|
// any flattened `io.nanobpm.agentTask.*` dotpath key (element templates emit the
|
|
2500
|
-
// latter, e.g. `io.nanobpm.agentTask.task.prompt`).
|
|
2501
|
+
// latter, e.g. `io.nanobpm.agentTask.task.prompt`). Older deployments carry this;
|
|
2502
|
+
// the current `@nanobpm/workflow` toolchain emits the linked-prompt marker below
|
|
2503
|
+
// instead, so BOTH must be recognised (jwulf/c8ctl-plugin-nano#95).
|
|
2501
2504
|
function serviceTaskHasAgentHeader(body) {
|
|
2502
2505
|
const headerRe = /<zeebe:header\b[^>]*\bkey\s*=\s*"([^"]*)"/g;
|
|
2503
2506
|
let m;
|
|
@@ -2508,11 +2511,36 @@ function serviceTaskHasAgentHeader(body) {
|
|
|
2508
2511
|
return false;
|
|
2509
2512
|
}
|
|
2510
2513
|
|
|
2514
|
+
// True iff a serviceTask body links a prompt resource — the CURRENT canonical
|
|
2515
|
+
// agent-task marker emitted by `@nanobpm/workflow` / the Urban toolchain:
|
|
2516
|
+
// `<zeebe:linkedResource … resourceType="GenericScript" linkName="prompt" />`.
|
|
2517
|
+
// An agent task links the model/prompt the harness runs; a plain connector /
|
|
2518
|
+
// record-keeper does not. Matched by the `linkName="prompt"` binding (attribute
|
|
2519
|
+
// order-independent) so a compiled model with no `io.nanobpm.agentTask` header
|
|
2520
|
+
// is still discovered (jwulf/c8ctl-plugin-nano#95). Kept in lock-step with the
|
|
2521
|
+
// authored nano-workforce models (resources/processes/*.bpmn), where every
|
|
2522
|
+
// `senior:*` service task carries this binding and none carry the legacy header.
|
|
2523
|
+
// NOTE: this mirrors `@nanobpm/agentic@0.4.0`'s released `scanTaskDefinitions`
|
|
2524
|
+
// `agentic` flag (its internal `hasPromptLink`); #102 tracks replacing this local
|
|
2525
|
+
// copy by consuming that detector once the `^0.1.0 → ^0.4.0` bump is vetted.
|
|
2526
|
+
function serviceTaskHasLinkedPrompt(body) {
|
|
2527
|
+
const re = new RegExp(`<zeebe:linkedResource\\b[^>]*\\blinkName\\s*=\\s*"${DEFAULT_PROMPT_LINK_NAME}"`);
|
|
2528
|
+
return re.test(String(body || ''));
|
|
2529
|
+
}
|
|
2530
|
+
|
|
2531
|
+
// True iff a serviceTask is an *agent* task — by EITHER the legacy
|
|
2532
|
+
// `io.nanobpm.agentTask.*` header OR the current linked-prompt marker. Either
|
|
2533
|
+
// alone is sufficient; deployments in the wild carry one or the other.
|
|
2534
|
+
function serviceTaskIsAgentTask(body) {
|
|
2535
|
+
return serviceTaskHasAgentHeader(body) || serviceTaskHasLinkedPrompt(body);
|
|
2536
|
+
}
|
|
2537
|
+
|
|
2511
2538
|
// Scan one deployed BPMN document for its *agent* task-definition leaves: every
|
|
2512
2539
|
// `<bpmn:serviceTask>` carrying BOTH a non-empty `<zeebe:taskDefinition type>`
|
|
2513
|
-
// AND an `io.nanobpm.agentTask.`
|
|
2514
|
-
//
|
|
2515
|
-
//
|
|
2540
|
+
// AND an agent-task marker (legacy `io.nanobpm.agentTask.` header OR a
|
|
2541
|
+
// `linkName="prompt"` linked resource). Returns `{ taskType, process }` leaves in
|
|
2542
|
+
// first-occurrence order. This is the agent-aware extension of the demand
|
|
2543
|
+
// package's `scanTaskDefinitions` (which reads type/element/process only).
|
|
2516
2544
|
function scanAgentTaskLeaves(xml) {
|
|
2517
2545
|
const source = String(xml || '');
|
|
2518
2546
|
const procMatch = source.match(/<bpmn:process\b[^>]*\bid\s*=\s*"([^"]*)"/);
|
|
@@ -2527,7 +2555,7 @@ function scanAgentTaskLeaves(xml) {
|
|
|
2527
2555
|
const typeMatch = tdMatch[0].match(/\btype\s*=\s*"([^"]*)"/);
|
|
2528
2556
|
const taskType = typeMatch ? typeMatch[1] : '';
|
|
2529
2557
|
if (!taskType) continue;
|
|
2530
|
-
if (!
|
|
2558
|
+
if (!serviceTaskIsAgentTask(body)) continue;
|
|
2531
2559
|
out.push({ taskType, process: proc });
|
|
2532
2560
|
}
|
|
2533
2561
|
return out;
|
|
@@ -8882,6 +8910,8 @@ export {
|
|
|
8882
8910
|
diffJobTypes,
|
|
8883
8911
|
parseJobTypeFlags,
|
|
8884
8912
|
serviceTaskHasAgentHeader,
|
|
8913
|
+
serviceTaskHasLinkedPrompt,
|
|
8914
|
+
serviceTaskIsAgentTask,
|
|
8885
8915
|
scanAgentTaskLeaves,
|
|
8886
8916
|
readDeployedAgentJobTypes,
|
|
8887
8917
|
resolveAutoJobTypes,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "c8ctl-plugin-nano",
|
|
3
|
-
"version": "1.38.
|
|
3
|
+
"version": "1.38.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "c8ctl plugin to start, inspect, and stop a local Nano BPM (nanobpmn) cluster",
|
|
6
6
|
"main": "c8ctl-plugin.js",
|
|
@@ -57,12 +57,12 @@
|
|
|
57
57
|
},
|
|
58
58
|
"optionalDependencies": {
|
|
59
59
|
"node-pty": "^1.0.0",
|
|
60
|
-
"@nanobpm/c8ctl-plugin-nano-darwin-arm64": "1.38.
|
|
61
|
-
"@nanobpm/c8ctl-plugin-nano-darwin-x64": "1.38.
|
|
62
|
-
"@nanobpm/c8ctl-plugin-nano-linux-x64": "1.38.
|
|
63
|
-
"@nanobpm/c8ctl-plugin-nano-linux-arm64": "1.38.
|
|
64
|
-
"@nanobpm/c8ctl-plugin-nano-linux-armv7": "1.38.
|
|
65
|
-
"@nanobpm/c8ctl-plugin-nano-linux-armv6": "1.38.
|
|
66
|
-
"@nanobpm/c8ctl-plugin-nano-win32-x64": "1.38.
|
|
60
|
+
"@nanobpm/c8ctl-plugin-nano-darwin-arm64": "1.38.1",
|
|
61
|
+
"@nanobpm/c8ctl-plugin-nano-darwin-x64": "1.38.1",
|
|
62
|
+
"@nanobpm/c8ctl-plugin-nano-linux-x64": "1.38.1",
|
|
63
|
+
"@nanobpm/c8ctl-plugin-nano-linux-arm64": "1.38.1",
|
|
64
|
+
"@nanobpm/c8ctl-plugin-nano-linux-armv7": "1.38.1",
|
|
65
|
+
"@nanobpm/c8ctl-plugin-nano-linux-armv6": "1.38.1",
|
|
66
|
+
"@nanobpm/c8ctl-plugin-nano-win32-x64": "1.38.1"
|
|
67
67
|
}
|
|
68
68
|
}
|