callman-core 1.31.0 → 1.33.0
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/ai-packs/db-queries.md +1 -1
- package/ai-packs/scenario-nodes.md +89 -15
- package/dist/ai/prompts/scenario.d.ts +1 -1
- package/dist/ai/prompts/scenario.d.ts.map +1 -1
- package/dist/ai/prompts/scenario.js +6 -3
- package/dist/ai/prompts/scenario.js.map +1 -1
- package/dist/ai/prompts/scenarioNodeDefaults.d.ts.map +1 -1
- package/dist/ai/prompts/scenarioNodeDefaults.js +9 -0
- package/dist/ai/prompts/scenarioNodeDefaults.js.map +1 -1
- package/dist/ai/prompts/scenarioNodeReference.d.ts.map +1 -1
- package/dist/ai/prompts/scenarioNodeReference.js +136 -17
- package/dist/ai/prompts/scenarioNodeReference.js.map +1 -1
- package/dist/host/db/db-query-reference.js +1 -1
- package/dist/host/db/db-query-reference.js.map +1 -1
- package/dist/host/db/mongoAdapter.d.ts +1 -0
- package/dist/host/db/mongoAdapter.d.ts.map +1 -1
- package/dist/host/db/mongoAdapter.js +21 -0
- package/dist/host/db/mongoAdapter.js.map +1 -1
- package/dist/host/db/queryExecutor.js +2 -2
- package/dist/host/db/queryExecutor.js.map +1 -1
- package/dist/host/index.d.ts +3 -1
- package/dist/host/index.d.ts.map +1 -1
- package/dist/host/index.js +4 -1
- package/dist/host/index.js.map +1 -1
- package/dist/host/temporal/temporalService.d.ts +67 -0
- package/dist/host/temporal/temporalService.d.ts.map +1 -0
- package/dist/host/temporal/temporalService.js +1182 -0
- package/dist/host/temporal/temporalService.js.map +1 -0
- package/dist/host/temporal/types.d.ts +13 -0
- package/dist/host/temporal/types.d.ts.map +1 -0
- package/dist/host/temporal/types.js +5 -0
- package/dist/host/temporal/types.js.map +1 -0
- package/dist/scenario-runner/adapters/connection-config.d.ts +17 -1
- package/dist/scenario-runner/adapters/connection-config.d.ts.map +1 -1
- package/dist/scenario-runner/adapters/index.d.ts +4 -2
- package/dist/scenario-runner/adapters/index.d.ts.map +1 -1
- package/dist/scenario-runner/adapters/index.js +8 -0
- package/dist/scenario-runner/adapters/index.js.map +1 -1
- package/dist/scenario-runner/adapters/kafka-executor.d.ts +5 -0
- package/dist/scenario-runner/adapters/kafka-executor.d.ts.map +1 -1
- package/dist/scenario-runner/adapters/kafka-executor.js +12 -3
- package/dist/scenario-runner/adapters/kafka-executor.js.map +1 -1
- package/dist/scenario-runner/adapters/temporal-executor.d.ts +10 -0
- package/dist/scenario-runner/adapters/temporal-executor.d.ts.map +1 -0
- package/dist/scenario-runner/adapters/temporal-executor.js +186 -0
- package/dist/scenario-runner/adapters/temporal-executor.js.map +1 -0
- package/dist/scenario-runner/adapters/types.d.ts +17 -5
- package/dist/scenario-runner/adapters/types.d.ts.map +1 -1
- package/dist/scenario-runner/condition.d.ts.map +1 -1
- package/dist/scenario-runner/condition.js +73 -0
- package/dist/scenario-runner/condition.js.map +1 -1
- package/dist/scenario-runner/graphTraversal.d.ts +6 -0
- package/dist/scenario-runner/graphTraversal.d.ts.map +1 -1
- package/dist/scenario-runner/graphTraversal.js +9 -0
- package/dist/scenario-runner/graphTraversal.js.map +1 -1
- package/dist/scenario-runner/index.d.ts +4 -0
- package/dist/scenario-runner/index.d.ts.map +1 -1
- package/dist/scenario-runner/index.js +8 -0
- package/dist/scenario-runner/index.js.map +1 -1
- package/dist/scenario-runner/kafkaEvent.d.ts +3 -0
- package/dist/scenario-runner/kafkaEvent.d.ts.map +1 -0
- package/dist/scenario-runner/kafkaEvent.js +18 -0
- package/dist/scenario-runner/kafkaEvent.js.map +1 -0
- package/dist/scenario-runner/nodePolicy.d.ts +9 -2
- package/dist/scenario-runner/nodePolicy.d.ts.map +1 -1
- package/dist/scenario-runner/nodePolicy.js +53 -0
- package/dist/scenario-runner/nodePolicy.js.map +1 -1
- package/dist/scenario-runner/runScenario.d.ts.map +1 -1
- package/dist/scenario-runner/runScenario.js +115 -22
- package/dist/scenario-runner/runScenario.js.map +1 -1
- package/dist/scenario-runner/scenarioReference.d.ts +45 -0
- package/dist/scenario-runner/scenarioReference.d.ts.map +1 -0
- package/dist/scenario-runner/scenarioReference.js +151 -0
- package/dist/scenario-runner/scenarioReference.js.map +1 -0
- package/dist/scenario-runner/temporal.d.ts +73 -0
- package/dist/scenario-runner/temporal.d.ts.map +1 -0
- package/dist/scenario-runner/temporal.js +377 -0
- package/dist/scenario-runner/temporal.js.map +1 -0
- package/dist/scenario-runner/types.d.ts +211 -4
- package/dist/scenario-runner/types.d.ts.map +1 -1
- package/dist/ui-test/commands.d.ts.map +1 -1
- package/dist/ui-test/commands.js +71 -0
- package/dist/ui-test/commands.js.map +1 -1
- package/dist-cjs/ai/prompts/scenario.js +6 -3
- package/dist-cjs/ai/prompts/scenario.js.map +1 -1
- package/dist-cjs/ai/prompts/scenarioNodeDefaults.js +9 -0
- package/dist-cjs/ai/prompts/scenarioNodeDefaults.js.map +1 -1
- package/dist-cjs/ai/prompts/scenarioNodeReference.js +135 -16
- package/dist-cjs/ai/prompts/scenarioNodeReference.js.map +1 -1
- package/dist-cjs/host/db/db-query-reference.js +1 -1
- package/dist-cjs/host/db/db-query-reference.js.map +1 -1
- package/dist-cjs/host/db/mongoAdapter.js +23 -1
- package/dist-cjs/host/db/mongoAdapter.js.map +1 -1
- package/dist-cjs/host/db/queryExecutor.js +1 -1
- package/dist-cjs/host/db/queryExecutor.js.map +1 -1
- package/dist-cjs/host/index.js +21 -2
- package/dist-cjs/host/index.js.map +1 -1
- package/dist-cjs/host/temporal/temporalService.js +1200 -0
- package/dist-cjs/host/temporal/temporalService.js.map +1 -0
- package/dist-cjs/host/temporal/types.js +6 -0
- package/dist-cjs/host/temporal/types.js.map +1 -0
- package/dist-cjs/scenario-runner/adapters/index.js +17 -3
- package/dist-cjs/scenario-runner/adapters/index.js.map +1 -1
- package/dist-cjs/scenario-runner/adapters/kafka-executor.js +15 -4
- package/dist-cjs/scenario-runner/adapters/kafka-executor.js.map +1 -1
- package/dist-cjs/scenario-runner/adapters/temporal-executor.js +190 -0
- package/dist-cjs/scenario-runner/adapters/temporal-executor.js.map +1 -0
- package/dist-cjs/scenario-runner/condition.js +73 -0
- package/dist-cjs/scenario-runner/condition.js.map +1 -1
- package/dist-cjs/scenario-runner/graphTraversal.js +10 -1
- package/dist-cjs/scenario-runner/graphTraversal.js.map +1 -1
- package/dist-cjs/scenario-runner/index.js +24 -1
- package/dist-cjs/scenario-runner/index.js.map +1 -1
- package/dist-cjs/scenario-runner/kafkaEvent.js +22 -0
- package/dist-cjs/scenario-runner/kafkaEvent.js.map +1 -0
- package/dist-cjs/scenario-runner/nodePolicy.js +56 -1
- package/dist-cjs/scenario-runner/nodePolicy.js.map +1 -1
- package/dist-cjs/scenario-runner/runScenario.js +114 -21
- package/dist-cjs/scenario-runner/runScenario.js.map +1 -1
- package/dist-cjs/scenario-runner/scenarioReference.js +159 -0
- package/dist-cjs/scenario-runner/scenarioReference.js.map +1 -0
- package/dist-cjs/scenario-runner/temporal.js +386 -0
- package/dist-cjs/scenario-runner/temporal.js.map +1 -0
- package/dist-cjs/ui-test/commands.js +71 -0
- package/dist-cjs/ui-test/commands.js.map +1 -1
- package/package.json +2 -1
package/ai-packs/db-queries.md
CHANGED
|
@@ -20,7 +20,7 @@ const res = await pm.db.query({
|
|
|
20
20
|
pm.expect(res.rowCount).to.be.above(0); // existence check
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
Per-operation fields: `find`/`findOne` use `filter` (+ optional `projection`,`sort`,`limit`,`skip`); `aggregate` uses `pipeline` (array); `insertOne` uses `document`, `insertMany` uses `documents`; `updateOne`/`updateMany`/`findOneAndUpdate` use `filter`+`update` (Mongo update operators, e.g. `{ $set: { … } }`); `deleteOne`/`deleteMany` use `filter`; `findOneAndUpdate`/`findOneAndReplace` accept `returnDocument: "before"|"after"`.
|
|
23
|
+
Per-operation fields: `find`/`findOne` use `filter` (+ optional `projection`,`sort`,`limit`,`skip`); `aggregate` uses `pipeline` (array); `insertOne` uses `document`, `insertMany` uses `documents`; `updateOne`/`updateMany`/`findOneAndUpdate` use `filter`+`update` (Mongo update operators, e.g. `{ $set: { … } }`); `deleteOne`/`deleteMany` use `filter`; `findOneAndUpdate`/`findOneAndReplace` accept `returnDocument: "before"|"after"`. The command text is MongoDB Extended JSON (relaxed): `{ "$oid": "…" }`, `{ "$date": "2026-01-01T00:00:00Z" }`, `{ "$numberDecimal": "9.99" }` and `{ "$numberLong": "…" }` become real BSON values anywhere in the command; a 24-hex string in a filter is also coerced to ObjectId. Rows are in `res.rows`; write ops surface counts in `res.rowCount`.
|
|
24
24
|
|
|
25
25
|
## PostgreSQL / MySQL / Oracle (SQL)
|
|
26
26
|
`query` is plain SQL text. Because `pm.db.query` binds no params, inline the value and quote strings yourself (or use a `{{token}}`):
|
|
@@ -49,7 +49,7 @@ Compact form (what the MCP scenario tools take):
|
|
|
49
49
|
}
|
|
50
50
|
```
|
|
51
51
|
|
|
52
|
-
- Node `{ id?, type, label?, config?, position? }`. `id` defaults to n1, n2, …; `position` is
|
|
52
|
+
- Node `{ id?, type, label?, config?, position? }`. `id` defaults to n1, n2, …; when `position` is omitted the node is placed after the node it is connected from, clear of every existing node.
|
|
53
53
|
- `config` is deep-merged over the type's defaults (the Default column): objects merge key by key, arrays and scalars replace the default whole. Send only what you change — but an array you send (headers, checks, steps, rules, assignments) must be complete.
|
|
54
54
|
- Edge `{ id?, source, target, type? }`, `type` = `default` (or omitted) | `yes` | `no` | `error`. Edges have no label.
|
|
55
55
|
- `priority`: critical | high | medium | low. `environments[].variables`: `{ key, value, enabled? }[]`.
|
|
@@ -59,7 +59,7 @@ Req column: **yes** = rejected on save without a real value; **run** = saved, bu
|
|
|
59
59
|
|
|
60
60
|
## Connections
|
|
61
61
|
|
|
62
|
-
db, redis, kafka, notification and
|
|
62
|
+
db, redis, kafka, notification, ai and temporal nodes run on a workspace connection: `config.connectionId` is the id of a connection of type `database`, `redis`, `kafka`, `notification` (Slack), `ai` (managed) or `temporal` (a Temporal.io cluster / Temporal Cloud namespace). Use a real connection id from the workspace — never invent one. Only the ai node rejects an empty id on save; the others save with `""` and fail when run.
|
|
63
63
|
|
|
64
64
|
## Labels
|
|
65
65
|
|
|
@@ -86,7 +86,7 @@ Shared by condition, assertion, poll, websocket expect steps and `end.loopExitRu
|
|
|
86
86
|
- Operand `{ mode: "runtime" | "literal", valueType: "string" | "number" | "boolean" | "null" | "array", value, extract? }`. runtime: `value` is a bare path. literal: a JSON number for number, true/false for boolean, null for null, a JSON array for array.
|
|
87
87
|
- Binary operators: equals, not_equals, strict_equals, strict_not_equals, greater_than, less_than, greater_or_equal, less_or_equal, between, contains, not_contains, starts_with, ends_with, regex, in, not_in, contains_row, set_equals_unordered. `between` takes [min, max]; `in` / `not_in` an array; `regex` a JS regex source; `contains_row` checks that an array of rows has one matching every key of an object (a JSON-object string literal or a runtime path); `set_equals_unordered` compares two arrays as multisets.
|
|
88
88
|
- Unary operators (no `right`): exists, not_exists, is_empty, not_empty, is_null, not_null.
|
|
89
|
-
- `extract` `{ type: "jsonpath" | "regex", expression, flags?, group?, select?: "first" | "all" }` is applied to the resolved value first; a failed extraction behaves as not-exists.
|
|
89
|
+
- `extract` `{ type: "jsonpath" | "regex", expression, flags?, group?, select?: "first" | "all" }` is applied to the resolved value first; a failed extraction behaves as not-exists. JSONPath runs without script evaluation: `$.a.b`, `$['x-id']`, `$.items[*].id`, `$..id` and slices work; filter expressions (`[?(@.x == 1)]`) are rejected — filter in a script node.
|
|
90
90
|
|
|
91
91
|
Example: `{ "id": "r1", "type": "rule", "left": { "mode": "runtime", "valueType": "number", "value": "CreateOrder.status" }, "operator": "equals", "right": { "mode": "literal", "valueType": "number", "value": 201 } }`
|
|
92
92
|
|
|
@@ -102,10 +102,13 @@ Each rule's `rules` object may use ONLY these keys (omit the rest):
|
|
|
102
102
|
|
|
103
103
|
## Execution policy
|
|
104
104
|
|
|
105
|
-
Every node except condition takes `executionPolicy: { onFailure: "stop" | "continue", retry: { enabled, maxAttempts (0..100), delayMs (0..3600000), backoffMultiplier? (1..10), maxDelayMs? (0..3600000) } }` — onFailure and retry.enabled / maxAttempts / delayMs are required when you send the stored form.
|
|
105
|
+
Every node except condition takes `executionPolicy: { onFailure: "stop" | "continue", retry: { enabled, maxAttempts (0..100), delayMs (0..3600000), backoffMultiplier? (1..10), maxDelayMs? (0..3600000) }, expectFailure?: { messagePattern? } }` — onFailure and retry.enabled / maxAttempts / delayMs are required when you send the stored form.
|
|
106
106
|
- `maxAttempts` counts every attempt (an enabled retry makes at least 2). Delay before retry n = min(maxDelayMs, delayMs × backoffMultiplier^(n−1)). No policy = stop, no retry.
|
|
107
107
|
- stop: a failure ends the run; continue: the run goes on along the normal edges.
|
|
108
108
|
- `error` edges from the failing node win over both: the run follows them instead of the normal edges (after the retries).
|
|
109
|
+
- How the run ends: `success` only when no node failed. A failure that continued or was routed through an `error` edge marks that node `failed_continued` and the run ends `completed_with_failures` — never `success`. A stop failure ends it `failed`.
|
|
110
|
+
- `expectFailure: { messagePattern? }` turns the node into a negative test (`request`, `db`, `redis`, `kafka`, `websocket`, `script`, `assertion`, `poll`, `ai`, `temporal`, `notification`): an attempt that FAILS with a message matching `messagePattern` (a JS regex, ≤500 chars; omitted = any failure) makes the node succeed — normal edges run, the run can end `success`, and the output is `<Label>.expectedFailure.message`. An attempt that succeeds, or fails with another message, is a failure (retry and onFailure apply as usual, so retry can wait for something to start failing). Use it for absence checks (a Kafka event that must not appear, a poll that must time out, a request that must be refused). On a db node a non-empty `expectError` wins.
|
|
111
|
+
- Example: `"executionPolicy": { "onFailure": "stop", "retry": { "enabled": false, "maxAttempts": 0, "delayMs": 0 }, "expectFailure": { "messagePattern": "timed out" } }`.
|
|
109
112
|
|
|
110
113
|
## Node types
|
|
111
114
|
|
|
@@ -148,14 +151,14 @@ One query on a workspace connection of type `database`.
|
|
|
148
151
|
| Field | Type | Default | Req | Notes |
|
|
149
152
|
| --- | --- | --- | --- | --- |
|
|
150
153
|
| `connectionId` | string | `""` | run | `""` = not chosen yet: saved, but the run fails. |
|
|
151
|
-
| `query` | string (1..100000) | `"SELECT *\nFROM users\nWHERE id = {{env.userId}}"` | yes | Mongo: a
|
|
154
|
+
| `query` | string (1..100000) | `"SELECT *\nFROM users\nWHERE id = {{env.userId}}"` | yes | Mongo: a command object as MongoDB Extended JSON (relaxed) text (`{"collection":"orders","operation":"findOne","filter":{…}}`) — `{"$date":"2026-01-01T00:00:00Z"}`, `{"$oid":"…"}`, `{"$numberDecimal":"9.99"}` and `{"$numberLong":"…"}` become real BSON values; plain whole numbers are sent as int32/double (a `$numberLong` beyond 2^53 loses precision). A 24-hex string in `filter` is also matched as an ObjectId. SQL: plain SQL. Per-engine details: the DB query reference. The default is a placeholder — always send your own. |
|
|
152
155
|
| `params` | string[] (≤200) | — | | Positional binds, template-resolved: `$1` (Postgres), `?` (MySQL), `@p1…` (SQL Server). |
|
|
153
156
|
| `typedParams` | {value, type?}[] (≤200) | — | | Wins over params. type auto \| text \| int \| numeric \| boolean \| date \| timestamp \| json \| null: null binds SQL NULL, boolean a real boolean, the rest stay strings (cast in SQL). |
|
|
154
157
|
| `useSession` | boolean | — | | Postgres only: join the run's shared session (scenario-level `dbSettings.transactionMode`: none \| rollback \| commit). |
|
|
155
158
|
| `expectError` | {sqlState?, messagePattern?} | — | | Negative test: the node passes only if the query FAILS with that SQLSTATE and/or a message matching the regex. |
|
|
156
159
|
| `executionPolicy` | ExecutionPolicy | stop, no retry | | See Execution policy. |
|
|
157
160
|
|
|
158
|
-
Output: `<Label>.rows`, `<Label>.rowCount`; the rows are also `db.result`.
|
|
161
|
+
Output: `<Label>.rows`, `<Label>.rowCount`; the rows are also `db.result`. With `expectError` met: `<Label>.expectedError` {sqlState, message}, rows empty.
|
|
159
162
|
|
|
160
163
|
```json
|
|
161
164
|
{"id":"check","type":"db","label":"CheckOrder","config":{"connectionId":"<database connection id>","query":"SELECT status FROM orders WHERE id = $1","params":["{{CreateOrder.body.id}}"]}}
|
|
@@ -184,15 +187,24 @@ Consume (wait for a matching message) or publish, on a connection of type `kafka
|
|
|
184
187
|
| `connectionId` | string | `""` | run | |
|
|
185
188
|
| `topic` | string (1..500) | `""` | yes | |
|
|
186
189
|
| `mode` | consume \| publish | `"consume"` | | |
|
|
187
|
-
| `matchMode` | regex \| rules | `"regex"` | | consume. |
|
|
188
|
-
| `rules` | string[] | `[]` | | consume. regex: rules[0] is a regex tested against the whole message. rules: every entry is ONE comparison `left op right` (op ==, !=, ===, !==, >, <, >=, <=, contains) and all must hold, e.g. `kafkaEvent.orderId == '{{CreateOrder.body.id}}'`. Empty = the first message captured. |
|
|
190
|
+
| `matchMode` | regex \| rules | `"regex"` | | consume. The default is regex — when you write comparisons, set `"rules"` or rules[0] is read as a regex. |
|
|
191
|
+
| `rules` | string[] | `[]` | | consume. regex: rules[0] is a regex tested against the whole message. rules: every entry is ONE comparison `left op right` (op ==, !=, ===, !==, >, <, >=, <=, contains) and all must hold, e.g. `kafkaEvent.orderId == '{{CreateOrder.body.id}}'`. Empty = the first message captured (the node stops listening at that message). |
|
|
192
|
+
| `captureTimeoutMs` | integer 1000..120000 | 5000 (engine) | | consume. How long ONE attempt listens; capped by the host's per-node timeout (60 s on a default server). Retry multiplies it. |
|
|
189
193
|
| `publishValueFormat` | json \| raw | `"json"` | | publish. json fails the node when messageValue is not valid JSON after templating. |
|
|
190
194
|
| `messageKey` | string | `""` | | publish. |
|
|
191
195
|
| `messageValue` | string (≤1000000) | `""` | | publish payload, template-resolved. |
|
|
192
196
|
| `messageHeaders` | {key, value, enabled?}[] | `[]` | | publish. |
|
|
193
197
|
| `executionPolicy` | ExecutionPolicy | continue, retry ×3 every 2000 ms | | See Execution policy. |
|
|
194
198
|
|
|
195
|
-
Output: consume: the matched message — a JSON message's keys at the top level plus `meta` {value, text, key, partition, offset, timestamp, headers};
|
|
199
|
+
Output: consume: the matched message — a JSON-object message's keys at the top level plus `meta` {value, text, key, topic, partition, offset, timestamp, headers}; any other message (array, number, text) has those fields at the top level instead, without `meta`. Also `kafkaEvent.*`. publish: {topic, partition, offset, timestamp}.
|
|
200
|
+
|
|
201
|
+
**Where consuming starts.** A consume node sees records whose Kafka timestamp is at or after the scenario run's start — messages produced before the run are never seen, messages produced earlier in the same run (by a publish node or by the system under test) are. Timestamps are the producer's clock, so allow for skew. Messages from earlier loop iterations or foreach items of the same run can match too — make the rules specific (an id from this iteration).
|
|
202
|
+
|
|
203
|
+
**How long it waits.** One attempt listens for `captureTimeoutMs` (default 5000 ms) and stops early at the first matching message. The default executionPolicy is continue with retry ×3 every 2000 ms, so a node waits about 3 × 5 s + 2 × 2 s ≈ 19 s in total before failing. For a slow consumer raise `captureTimeoutMs` (and/or retry) rather than adding wait nodes.
|
|
204
|
+
|
|
205
|
+
**How rules read the message.** Rules are evaluated against the event shape above, NOT with JSONPath: each side is a plain dotted path (`kafkaEvent.orderId`, `kafkaEvent.meta.headers.traceparent`, `kafkaEvent.items[0].sku`) or a template. Header and key names with dashes work as plain dotted paths: `kafkaEvent.meta.headers.x-correlation-id == '{{CorrId}}'`. Brackets (`headers['x-id']`) and `$.` paths are not resolved — they compare as literal text and never match. A path segment that contains an operator word (`x-contains-id`) splits the rule at that word; avoid it or read it in a script node. Headers are UTF-8 strings; a header repeated on one record is joined with `, `. A topic, partition or offset is under `meta` (`kafkaEvent.meta.offset` is a string).
|
|
206
|
+
|
|
207
|
+
**Expecting no message.** A consume node FAILS when nothing matches in time. To assert that an event is NOT published, give the node `executionPolicy.expectFailure: {}` (see Execution policy) — the timeout then counts as success.
|
|
196
208
|
|
|
197
209
|
```json
|
|
198
210
|
{"id":"event","type":"kafka","label":"OrderCreated","config":{"connectionId":"<kafka connection id>","topic":"orders","mode":"consume","matchMode":"rules","rules":["kafkaEvent.orderId == '{{CreateOrder.body.id}}'"]}}
|
|
@@ -345,6 +357,61 @@ Output: The parsed JSON reply: `<Label>.<exampleKey>`.
|
|
|
345
357
|
{"id":"classify","type":"ai","label":"Classify","config":{"connectionId":"<ai connection id>","prompt":"Classify the sentiment of: {{GetReview.body.text}}","responseExample":"{\"sentiment\":\"positive\",\"score\":0.9}"}}
|
|
346
358
|
```
|
|
347
359
|
|
|
360
|
+
### temporal
|
|
361
|
+
One Temporal.io client operation (start / signal / query / update / await / describe / history / cancel / terminate / list / count / describeTaskQueue) on a workspace connection of type `temporal`.
|
|
362
|
+
|
|
363
|
+
| Field | Type | Default | Req | Notes |
|
|
364
|
+
| --- | --- | --- | --- | --- |
|
|
365
|
+
| `connectionId` | string | `""` | run | A connection of type `temporal`. |
|
|
366
|
+
| `operation` | "startWorkflow" \| "signal" \| "signalWithStart" \| "query" \| "update" \| "awaitResult" \| "describe" \| "history" \| "cancel" \| "terminate" \| "list" \| "count" \| "describeTaskQueue" | `"describe"` | yes | Required fields per operation: startWorkflow → workflowType + taskQueue; signal → workflowId + signalName; signalWithStart → workflowId + workflowType + taskQueue + signalName; query → workflowId + queryName; update → workflowId + updateName; awaitResult → workflowId; describe → workflowId; history → workflowId; cancel → workflowId; terminate → workflowId; list → query; count → query; describeTaskQueue → taskQueue. |
|
|
367
|
+
| `namespace` | string | — | | Overrides the connection's namespace. Template-resolved. |
|
|
368
|
+
| `workflowId` | string | `""` | | Template-resolved. On startWorkflow an empty id is generated (`callman-<label>-<uuid>`). |
|
|
369
|
+
| `runId` | string | — | | Optional everywhere; empty = the latest run. |
|
|
370
|
+
| `workflowType` | string | — | | startWorkflow / signalWithStart. |
|
|
371
|
+
| `taskQueue` | string | — | | startWorkflow / signalWithStart / describeTaskQueue. |
|
|
372
|
+
| `args` | string (JSON array) | `""` | | Workflow / signal / query / update arguments as a JSON ARRAY template string, e.g. `"[{\"orderId\":\"{{CreateOrder.body.id}}\"}]"`. A bare value is wrapped as one argument. |
|
|
373
|
+
| `waitForResult` | boolean | — | | startWorkflow: block until the workflow closes; `result` / `status` / `failure` are filled. |
|
|
374
|
+
| `idReusePolicy` | "ALLOW_DUPLICATE" \| "ALLOW_DUPLICATE_FAILED_ONLY" \| "REJECT_DUPLICATE" \| "TERMINATE_IF_RUNNING" | — | | |
|
|
375
|
+
| `idConflictPolicy` | "FAIL" \| "USE_EXISTING" \| "TERMINATE_EXISTING" | — | | `USE_EXISTING` makes startWorkflow attach to an already-running workflow instead of failing. |
|
|
376
|
+
| `memo` | string (JSON object) | — | | |
|
|
377
|
+
| `searchAttributes` | string (JSON object) | — | | |
|
|
378
|
+
| `workflowExecutionTimeoutMs` | integer | — | | |
|
|
379
|
+
| `workflowRunTimeoutMs` | integer | — | | |
|
|
380
|
+
| `workflowTaskTimeoutMs` | integer | — | | |
|
|
381
|
+
| `startDelayMs` | integer | — | | |
|
|
382
|
+
| `retryPolicy` | {maximumAttempts?, initialIntervalMs?, backoffCoefficient?, maximumIntervalMs?} | — | | |
|
|
383
|
+
| `signalName` | string | — | | signal / signalWithStart. |
|
|
384
|
+
| `signalArgs` | string (JSON array) | — | | signalWithStart: the signal's arguments (`args` are the start arguments). |
|
|
385
|
+
| `queryName` | string | — | | |
|
|
386
|
+
| `updateName` | string | — | | |
|
|
387
|
+
| `waitForStage` | "COMPLETED" \| "ACCEPTED" | "COMPLETED" (engine) | | update: ACCEPTED returns as soon as the update is admitted (`updateId`). |
|
|
388
|
+
| `followRuns` | boolean | true (engine) | | awaitResult: follow continue-as-new / retried runs to the final result. |
|
|
389
|
+
| `eventTypes` | string[] | — | | history: keep only these event types in `events[]` (names like "ActivityTaskCompleted"); counts cover the whole history. |
|
|
390
|
+
| `historyLimit` | integer 1..2000 | 500 (engine) | | history: max events kept (the LAST N); `truncatedHistory` says when it cut. |
|
|
391
|
+
| `reason` | string | — | | cancel / terminate. |
|
|
392
|
+
| `query` | string | — | | list / count: a Temporal visibility list filter, e.g. `WorkflowType = 'OrderWorkflow' AND ExecutionStatus = 'Running'` (`GROUP BY ExecutionStatus` allowed on count). |
|
|
393
|
+
| `pageSize` | integer 1..500 | 50 (engine) | | |
|
|
394
|
+
| `taskQueueType` | "workflow" \| "activity" | "workflow" (engine) | | |
|
|
395
|
+
| `timeoutMs` | integer 1000..600000 | 60000 (engine) | | Still capped by the host's per-node budget. A long awaitResult needs a raised node timeout or a poll node (actionType `temporal`). |
|
|
396
|
+
| `onTimeout` | "fail" \| "continue" | "fail" (engine) | | awaitResult / startWorkflow+waitForResult: `continue` marks the step partial_success with `timedOut: true` instead of failing. |
|
|
397
|
+
| `expect` | ConditionRule[] | `[]` | | Checks against the node's OWN output (operand paths `<Label>.status`, `<Label>.result.x`, `<Label>.eventCounts.ActivityTaskFailed`; `temporal.<path>` also works). A failed check fails the node. |
|
|
398
|
+
| `expectMatchMode` | "all" \| "any" | `"all"` | | |
|
|
399
|
+
| `executionPolicy` | ExecutionPolicy | stop, no retry | | See Execution policy. |
|
|
400
|
+
|
|
401
|
+
Output: Always the same keys (null / [] when not applicable): `<Label>.workflowId`, `.runId`, `.status` (RUNNING | COMPLETED | FAILED | CANCELED | TERMINATED | TIMED_OUT | CONTINUED_AS_NEW), `.result` (awaitResult / query / update / start+wait), `.failure` `{message, type, cause[]}`, `.workflowType`, `.taskQueue`, `.startTime`, `.closeTime`, `.historyLength`, `.memo`, `.searchAttributes`, `.activities[]` `{activityType, status, attempt, durationMs, failure}`, `.pendingChildren[]`, `.events[]` `{eventId, eventType, eventTime, attributes}`, `.eventCounts` `{ActivityTaskCompleted: 3, …}`, `.signals[]`, `.timers[]`, `.truncatedHistory`, `.executions[]` `{workflowId, runId, type, status}`, `.count`, `.groups[]`, `.pollers[]`, `.hasPollers`, `.updateId`, `.requested`, `.timedOut`, `.durationMs`.
|
|
402
|
+
|
|
403
|
+
A workflow that FAILED / was CANCELED is a result, not a node failure: `status` and `failure` are filled and the run goes on. Fail the node with an `expect` rule (`<Label>.status equals COMPLETED`) or `executionPolicy.expectFailure` for infrastructure errors.
|
|
404
|
+
|
|
405
|
+
Infrastructure errors fail the node: unreachable server (UNAVAILABLE), rejected credentials (UNAUTHENTICATED), unknown workflow (`Workflow not found: <id>`), rejected update, `WorkflowExecutionAlreadyStartedError` (unless `idConflictPolicy: USE_EXISTING`).
|
|
406
|
+
|
|
407
|
+
Typical chain: request → temporal describe `{{Req.body.workflowId}}` → signal → awaitResult (expect status COMPLETED) → history (expect eventCounts.ActivityTaskFailed equals 0).
|
|
408
|
+
|
|
409
|
+
Payloads use Temporal's default data converter (JSON). A payload it cannot decode is kept as `{encoding, data}` (base64).
|
|
410
|
+
|
|
411
|
+
```json
|
|
412
|
+
{"id":"await-order","type":"temporal","label":"AwaitOrder","config":{"connectionId":"<temporal connection id>","operation":"awaitResult","workflowId":"order-{{CreateOrder.body.id}}","timeoutMs":60000,"expect":[{"id":"r1","type":"rule","left":{"mode":"runtime","valueType":"string","value":"AwaitOrder.status"},"operator":"equals","right":{"mode":"literal","valueType":"string","value":"COMPLETED"}}]}}
|
|
413
|
+
```
|
|
414
|
+
|
|
348
415
|
### wait
|
|
349
416
|
Fixed delay.
|
|
350
417
|
|
|
@@ -427,17 +494,24 @@ Output: Its inner nodes publish under their own labels.
|
|
|
427
494
|
```
|
|
428
495
|
|
|
429
496
|
### scenario-ref
|
|
430
|
-
|
|
497
|
+
Links another scenario (shared setup / teardown) without copying it by hand: the node embeds a snapshot of the linked scenario's graph, and the run executes that snapshot.
|
|
431
498
|
|
|
432
499
|
| Field | Type | Default | Req | Notes |
|
|
433
500
|
| --- | --- | --- | --- | --- |
|
|
434
|
-
| `
|
|
435
|
-
| `
|
|
436
|
-
| `
|
|
437
|
-
| `
|
|
501
|
+
| `scenario` | string (compact form only) | — | yes | The scenario to link, by name or id. The server copies its current graph in (fresh ids) and adds its environments' missing variables to this scenario. Re-send it to re-sync. |
|
|
502
|
+
| `referencedScenarioId` | string | — | yes | Stored form. With `nodes: []` the server fills the snapshot (and the fields below) from that scenario. |
|
|
503
|
+
| `referencedScenarioVersion` | integer \| null | — | | Stored form; filled by the server. |
|
|
504
|
+
| `referencedScenarioName / lastSyncedAt` | string | — | | Stored form; filled by the server. |
|
|
505
|
+
| `nodes / edges` | stored node[] / stored edge[] | — | | The snapshot. Send `[]` to have it filled; a non-empty snapshot (as read) is kept as is. |
|
|
438
506
|
| `executionPolicy` | ExecutionPolicy | stop, no retry (engine) | | See Execution policy. |
|
|
439
507
|
|
|
440
|
-
Output: Its inner nodes publish under their own labels.
|
|
508
|
+
Output: Its inner nodes publish under their own labels — mind label clashes with this scenario's own nodes.
|
|
509
|
+
|
|
510
|
+
The linked scenario must be in the same workspace and readable by you. A scenario cannot link itself, nor a scenario whose graph links it back.
|
|
511
|
+
|
|
512
|
+
```json
|
|
513
|
+
{"id":"setup","type":"scenario-ref","label":"Setup","config":{"scenario":"Shared login setup"}}
|
|
514
|
+
```
|
|
441
515
|
|
|
442
516
|
## Graph rules
|
|
443
517
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ScenarioPromptInput } from "../types.js";
|
|
2
|
-
export declare const SCENARIO_AI_REFERENCE_TYPES: readonly ["request", "db", "redis", "kafka", "condition", "assertion", "script", "set-vars", "poll", "foreach", "websocket", "ai", "wait", "notification", "aggregator", "end"];
|
|
2
|
+
export declare const SCENARIO_AI_REFERENCE_TYPES: readonly ["request", "db", "redis", "kafka", "condition", "assertion", "script", "set-vars", "poll", "foreach", "websocket", "ai", "temporal", "wait", "notification", "aggregator", "end"];
|
|
3
3
|
export interface BuildScenarioSystemPromptOptions {
|
|
4
4
|
/**
|
|
5
5
|
* Canonical default config per node type shown in the reference. Hosts with
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scenario.d.ts","sourceRoot":"","sources":["../../../src/ai/prompts/scenario.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAOvD,eAAO,MAAM,2BAA2B,
|
|
1
|
+
{"version":3,"file":"scenario.d.ts","sourceRoot":"","sources":["../../../src/ai/prompts/scenario.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAOvD,eAAO,MAAM,2BAA2B,6LAkB9B,CAAC;AA0CX,MAAM,WAAW,gCAAgC;IAC/C;;;OAGG;IACH,gBAAgB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;CAC9C;AAqBD,eAAO,MAAM,yBAAyB,GACpC,UAAS,gCAAqC,KAC7C,MAyFW,CAAC;AAEf,eAAO,MAAM,uBAAuB,GAAI,OAAO,mBAAmB,KAAG,MA+CpE,CAAC"}
|
|
@@ -31,6 +31,7 @@ export const SCENARIO_AI_REFERENCE_TYPES = [
|
|
|
31
31
|
"foreach",
|
|
32
32
|
"websocket",
|
|
33
33
|
"ai",
|
|
34
|
+
"temporal",
|
|
34
35
|
"wait",
|
|
35
36
|
"notification",
|
|
36
37
|
"aggregator",
|
|
@@ -47,15 +48,16 @@ const NODE_NOTES = {
|
|
|
47
48
|
// Supported command list is derived from the runtime specs so it can
|
|
48
49
|
// never drift from what the runtime actually accepts.
|
|
49
50
|
`Run Redis commands on a stored connection. REQUIRED: connectionId (type=redis) + ≥1 non-empty entry in \`commands\`. Each entry is ONE command string; supported commands: ${Object.keys(REDIS_COMMAND_SPECS).join(", ")} — e.g. "GET order:{{CreateOrder.orderId}}", "HGETALL user:{{env.userId}}" or "SET key {{env.value}}". SCAN is Callman-managed: \`SCAN pattern [count]\` returns {keys,count,truncated}. Output exposed under the label + as redis.result.`,
|
|
50
|
-
kafka: "Consume OR publish (config.mode). CONSUME (mode:\"consume\"): REQUIRED connectionId (type=kafka) + topic + a matcher with ≥1 non-empty rule. TWO matchModes: (a) matchMode:\"regex\" → rules[0] is a single REGEX tested against the whole message, e.g. rules:[\"order.created\"]. (b) matchMode:\"rules\" → rules is a LIST OF EXPRESSIONS, each ONE comparison `left op right` (op ==, !=, ===, !==, >, <, >=, <=, contains), ALL must be true. Reference the captured event as kafkaEvent.<field>: for a JSON message its JSON keys are top-level, e.g. rules:[\"kafkaEvent.event == 'order.created'\", \"kafkaEvent.orderId == '{{CreateOrder.orderId}}'\"]. NEVER leave rules empty. PUBLISH (mode:\"publish\"): REQUIRED connectionId + topic + messageValue; optional messageKey, publishValueFormat \"json\"|\"raw\" (json validates the payload as JSON), messageHeaders:[{key,value,enabled:true}].",
|
|
51
|
+
kafka: "Consume OR publish (config.mode). CONSUME (mode:\"consume\"): REQUIRED connectionId (type=kafka) + topic + a matcher with ≥1 non-empty rule. TWO matchModes: (a) matchMode:\"regex\" → rules[0] is a single REGEX tested against the whole message, e.g. rules:[\"order.created\"]. (b) matchMode:\"rules\" → rules is a LIST OF EXPRESSIONS, each ONE comparison `left op right` (op ==, !=, ===, !==, >, <, >=, <=, contains), ALL must be true. Reference the captured event as kafkaEvent.<field>: for a JSON message its JSON keys are top-level, e.g. rules:[\"kafkaEvent.event == 'order.created'\", \"kafkaEvent.orderId == '{{CreateOrder.orderId}}'\"]. Rules are plain dotted paths, NOT JSONPath: headers are kafkaEvent.meta.headers.<name> (dashes are fine: kafkaEvent.meta.headers.x-correlation-id); never use brackets or $. A consume node only sees messages produced after the run started; one attempt listens captureTimeoutMs (default 5000, 1000..120000) — raise it for slow events. NEVER leave rules empty. PUBLISH (mode:\"publish\"): REQUIRED connectionId + topic + messageValue; optional messageKey, publishValueFormat \"json\"|\"raw\" (json validates the payload as JSON), messageHeaders:[{key,value,enabled:true}].",
|
|
51
52
|
condition: "The ONLY branching node and the ONLY node WITHOUT executionPolicy. Must have EXACTLY one outgoing edge type \"yes\" and one \"no\". TWO modes: mode:\"builder\" (default) uses rootGroup { operator:\"AND\"|\"OR\", children:[ rule | nested group ] } where each rule is { id, type:\"rule\", left, operator, right } (operands per the OPERANDS section); mode:\"expert\" uses expertExpression (ONLY read when mode is \"expert\"), a single string whose operands are {{path}} tokens — a bare path is a parse error — like \"{{Login.status}} == 200 && {{Login.body.token}} != ''\". Prefer builder mode.",
|
|
52
53
|
assertion: "Pass/fail checkpoint (does NOT branch; on failure executionPolicy decides stop/continue). config.matchMode:\"all\" (every enabled check passes) | \"any\" (≥1 passes). checks:[{ id, name, enabled:true, rule }] with ≥1 enabled check — each rule is { id, type:\"rule\", left, operator, right } (operands per the OPERANDS section).",
|
|
53
54
|
script: "JS sandbox (Postman pm.*). REQUIRED: non-empty, syntactically-valid `script`; its `return` value is exposed downstream by the node label. Optional timeoutMs (default 3000). Can pm.environment.set(...), pm.expect(...), pm.test(...), and await pm.db.query / pm.redis.command (same formats as the DB & REDIS section) for logic a plain db/redis node can't express.",
|
|
54
55
|
"set-vars": "No-code variable capture — prefer this over a script node for plain \"save X into a variable\" steps. config.assignments:[{ id, scope:\"environment\"|\"global\", key, value, enabled:true }] applied top-to-bottom (a later row can use an earlier row's variable). DEFAULT (template) row: `value` is template-resolved, e.g. \"{{CreateOrder.body.id}}\". EXTRACTOR row: add extractorType:\"jsonpath\"|\"regex\" + source + expression (`value` is then ignored). `source` is a BARE runtime dot-path WITHOUT braces (same semantics as condition operands), e.g. \"CreateOrder.body\". `expression` is a JSONPath like \"$.items[0].id\" or a JS regex source like \"ord-(\\\\d+)\". Regex rows may add `flags` (subset of \"gimsuy\") and `group` (capture group index, default: first group, else whole match). Optional select:\"first\" (default, writes one value) | \"all\" (writes a JSON array of every match). A failed extraction SKIPS that write and is reported in the node output — it does not fail the node.",
|
|
55
|
-
poll: "Wait-until: repeats ONE embedded action until a condition passes or the budget runs out — prefer this over wait+loop chains for \"poll until ready\" steps. REQUIRED: actionType:\"request\"|\"db\"|\"redis\"|\"script\" + the MATCHING embedded config object (`request` | `db` | `redis` | `script`, same shape as the standalone node of that type) + successCondition (a full condition config: { mode:\"builder\", rootGroup } — same shape as the condition node, evaluated after EVERY tick against the tick's result, e.g. left { mode:\"runtime\", valueType:\"number\", value:\"response.status\" } for a request action) + intervalMs (delay between ticks, ≤ 3600000). OPTIONAL: maxAttempts (default 30, max 1000), timeoutMs (wall-clock cap, ≤ 86400000), backoffMultiplier (1..10, exponential backoff on the interval), maxDelayMs (backoff cap), onTimeout:\"fail\" (default — normal failure path, error edges apply) | \"continue\" (mark degraded and continue). Action errors are polled through (a failing tick is retried, not fatal); per-node retry is force-disabled — the loop IS the retry. Output: { attempts, maxAttempts, elapsedMs, timedOut, conditionResult, lastTickError? }; the last tick's action result is ALSO published like the standalone node would (response.*, rows, redis.result).",
|
|
56
|
+
poll: "Wait-until: repeats ONE embedded action until a condition passes or the budget runs out — prefer this over wait+loop chains for \"poll until ready\" steps. REQUIRED: actionType:\"request\"|\"db\"|\"redis\"|\"script\"|\"temporal\" + the MATCHING embedded config object (`request` | `db` | `redis` | `script` | `temporal`, same shape as the standalone node of that type; a temporal tick publishes its output under this node's label, so the success condition reads <Label>.status / <Label>.result.x) + successCondition (a full condition config: { mode:\"builder\", rootGroup } — same shape as the condition node, evaluated after EVERY tick against the tick's result, e.g. left { mode:\"runtime\", valueType:\"number\", value:\"response.status\" } for a request action) + intervalMs (delay between ticks, ≤ 3600000). OPTIONAL: maxAttempts (default 30, max 1000), timeoutMs (wall-clock cap, ≤ 86400000), backoffMultiplier (1..10, exponential backoff on the interval), maxDelayMs (backoff cap), onTimeout:\"fail\" (default — normal failure path, error edges apply) | \"continue\" (mark degraded and continue). Action errors are polled through (a failing tick is retried, not fatal); per-node retry is force-disabled — the loop IS the retry. Output: { attempts, maxAttempts, elapsedMs, timedOut, conditionResult, lastTickError? }; the last tick's action result is ALSO published like the standalone node would (response.*, rows, redis.result).",
|
|
56
57
|
foreach: "Per-item loop container: runs an EMBEDDED body graph once per item of an array — the go-to node for \"do X for every user/order/row\". config = { nodes:[...], edges:[...], sourceMode:\"path\"|\"inline\", itemsPath?, itemsInline?, itemAlias?, maxIterations? (default 100, max 1000), delayMs? (pause between items, ms), onItemFailure:\"stop\" (default; first failed item fails this node) | \"continue\" (failed items degrade to partial success, loop keeps going), collectResults?:true }. ITEMS SOURCE: sourceMode:\"path\" + itemsPath = a BARE runtime dot-path WITHOUT braces resolving to an array (e.g. \"Users.body.items\" — or, inside an outer foreach, a path off the outer item/alias like \"customer.accounts\"); sourceMode:\"inline\" + itemsInline = a JSON array STRING ({{tokens}} inside resolve first). BODY: config.nodes/config.edges form a normal mini-graph (same node shapes, ids unique, EVERY label unique across the WHOLE scenario incl. all bodies; conditions still need exactly one yes + one no edge; do NOT add end nodes inside the body). PER-ITERATION TEMPLATE ROOTS available to body nodes: {{item}} = current item ({{item.id}}, {{item.name}}...), the alias root when itemAlias is set (e.g. itemAlias:\"user\" → {{user.id}} — set one whenever foreaches nest, the inner {{item}} shadows the outer), {{each.index}} (0-based), {{each.iteration}} (1-based), {{each.total}}, {{each.remaining}}, and {{eaches.<ThisForeachLabel>.iteration}} etc. for reaching an OUTER foreach's counters from inside an inner one. The same roots work as bare condition/assertion operand paths (item.tier, each.total). NESTING: a foreach node may appear inside another foreach's body (source the inner items from the outer item, e.g. itemsPath:\"customer.accounts\" with itemAlias:\"account\"). OUTPUT: { results:[ per-item snapshots — results[i].<ChildLabel>.body..., a failed item's child carries only results[i].<ChildLabel>.__meta.failed:true ], itemCount, processedCount, truncated, failedItems } — downstream nodes read e.g. <Label>.processedCount or <Label>.results[0].<ChildLabel>.body.id. Per-node retry is force-disabled (the item loop IS the repeat); with onItemFailure:\"continue\" a run with failed items ends completed-with-failures by design.",
|
|
57
58
|
websocket: "Live socket conversation as ONE scenario step: connect, run the steps in order, close. config = { url (ws:// or wss://, template-resolved), headers:[{key,value,enabled:true}], subprotocols:[string], connectTimeoutMs?, steps:[...], closeCode?, rejectUnauthorized?:false to accept self-signed TLS }. STEPS (ordered): { id, kind:\"send\", payload } sends one text frame (payload template-resolved; JSON payloads welcome); { id, kind:\"expect\", timeoutMs? (default 10000, max 300000), matchMode?:\"all\"|\"any\", rules:[ConditionRule,...] } waits for a frame matching the rules — each rule is the SAME { id, type:\"rule\", left, operator, right } shape as condition/assertion rules, with runtime paths over the CURRENT FRAME roots: ws.text (raw text), ws.json.<field> (parsed JSON), ws.direction, ws.index. Example rule: left { mode:\"runtime\", valueType:\"string\", value:\"ws.json.event\" }, operator:\"equals\", right { mode:\"literal\", valueType:\"string\", value:\"subscribed\" }; { id, kind:\"wait\", durationMs } pauses. A failed expect (timeout) fails the node — error edges / executionPolicy apply; retry re-runs the WHOLE conversation. Output: { connected, messages:[{text, direction, ...}], steps, closeCode, messageCount, failedSteps } — downstream reads <Label>.messages[0].text or bare paths like <Label>.messageCount in conditions.",
|
|
58
59
|
ai: "One LLM chat call as a step — create ONLY if a type=ai connection is available (managed AI connections). REQUIRED: connectionId (type=ai) + prompt (template-resolved, may embed {{Label.body.field}} references) + responseExample (a JSON OBJECT string describing the reply shape, e.g. \"{\\\"sentiment\\\":\\\"positive\\\",\\\"score\\\":0.9}\" — top-level keys become REQUIRED in the reply, extra keys allowed). Optional maxTokens (1..32000), timeoutMs (1000..300000). The parsed JSON reply IS the node output: downstream nodes read <Label>.<exampleKey> (e.g. <Label>.sentiment) in templates and condition operands.",
|
|
60
|
+
temporal: "One Temporal.io client operation — create ONLY if a type=temporal connection is available. REQUIRED: connectionId (type=temporal) + operation. OPERATIONS and their required fields: startWorkflow (workflowType + taskQueue; optional workflowId — empty = generated, args = JSON ARRAY string of workflow arguments e.g. \"[{\\\"orderId\\\":\\\"{{CreateOrder.body.id}}\\\"}]\", waitForResult:true to block for the result, idReusePolicy, idConflictPolicy, memo/searchAttributes = JSON OBJECT strings, workflowExecutionTimeoutMs, retryPolicy); signal (workflowId + signalName, args); signalWithStart (workflowId + workflowType + taskQueue + signalName, args, signalArgs); query (workflowId + queryName, args); update (workflowId + updateName, args, waitForStage \"COMPLETED\"|\"ACCEPTED\"); awaitResult (workflowId; followRuns default true; onTimeout \"fail\"|\"continue\"); describe (workflowId); history (workflowId; eventTypes filter list, historyLimit); cancel / terminate (workflowId, reason); list / count (query = Temporal visibility filter like \"WorkflowType = 'OrderWorkflow' AND ExecutionStatus = 'Running'\", pageSize); describeTaskQueue (taskQueue, taskQueueType). Every string field is template-resolved; runId is optional everywhere. timeoutMs (1000..600000) bounds the call — a long awaitResult needs a raised node timeout or a poll node with actionType:\"temporal\". OUTPUT (every key always present, null/[] when not applicable): workflowId, runId, status (RUNNING|COMPLETED|FAILED|CANCELED|TERMINATED|TIMED_OUT|CONTINUED_AS_NEW), result (awaitResult/query/update/start+wait payload), failure{message,type,cause[]}, workflowType, taskQueue, startTime, closeTime, historyLength, memo, searchAttributes, activities[{activityType,status,attempt,durationMs,failure}], events[{eventId,eventType,eventTime}], eventCounts{ActivityTaskCompleted:3,...}, signals[], timers[], executions[], count, groups[], pollers[], hasPollers, updateId, requested, timedOut. A FAILED workflow is NOT a node failure — assert on it: config.expect is a list of condition rules evaluated against the node's own output (operands use <Label>.status, <Label>.result.x, <Label>.eventCounts.ActivityTaskFailed …; expectMatchMode \"all\"|\"any\"); a failed expect fails the node (executionPolicy / error edges apply). Downstream nodes read <Label>.status, <Label>.result.<field>, <Label>.activities[0].status.",
|
|
59
61
|
wait: "Delay. durationMs milliseconds (1 .. 2147483647). Output: { configuredDurationMs, actualDurationMs, status }.",
|
|
60
62
|
notification: "Slack only — create ONLY if a type=notification (provider=slack) connection is available. REQUIRED: connectionId + messageTemplate. provider:\"slack\", severity:\"info\"|\"success\"|\"warning\"|\"error\", optional channelOverride, advanced.useRichBlocks.",
|
|
61
63
|
aggregator: "Merges upstream outputs into one JSON object. config.template MUST be valid JSON once tokens are filled, e.g. {\"userId\":\"{Login.data.id}\",\"total\":\"{CreateOrder.total}\"}. Output = the resolved object.",
|
|
@@ -114,6 +116,7 @@ export const buildScenarioSystemPrompt = (options = {}) => [
|
|
|
114
116
|
'{ "id": string (unique), "type": <one below>, "position": { "x": number, "y": number }, "data": { "label": string, "config": { ... } } }',
|
|
115
117
|
`- \`label\` is REQUIRED, non-empty, UNIQUE across the scenario, and must NOT be a reserved name (${RESERVED_SCENARIO_LABELS.map((label) => `"${label}"`).join(", ")}) — the engine drops such a node's output. Downstream nodes read a node's output by its label: {{Login.data.token}}.`,
|
|
116
118
|
"- Every config EXCEPT `condition` carries an `executionPolicy` object (see defaults below).",
|
|
119
|
+
"- NEGATIVE checks (\"this must NOT happen / must fail\"): set executionPolicy.expectFailure = { messagePattern?: regex } on the node (request, db, redis, kafka, websocket, script, assertion, poll, ai, notification) — it then PASSES only when it fails (e.g. a Kafka consume that must time out). Do not model them with error edges: an error-routed failure always ends the run completed_with_failures.",
|
|
117
120
|
"- position: the app AUTO-ARRANGES the whole graph (top-to-bottom flow, branches fanned out side-by-side, centered, never overlapping), so layout is NOT your concern — just give each node any distinct {x,y} (e.g. step y by 150). Focus on correct edges + config, not coordinates. Model the flow by EDGES (branches, merges), not by stacking every node in one long line.",
|
|
118
121
|
"",
|
|
119
122
|
"EDGES — { \"id\": string, \"source\": <node id>, \"target\": <node id>, \"type\"?: \"default\" | \"yes\" | \"no\" | \"error\" }.",
|
|
@@ -144,7 +147,7 @@ export const buildScenarioSystemPrompt = (options = {}) => [
|
|
|
144
147
|
"- Numeric example — “the order total is 40”: left { mode:\"runtime\", valueType:\"number\", value:\"CreateOrder.body.total\" }, operator:\"equals\", right { mode:\"literal\", valueType:\"number\", value:40 }.",
|
|
145
148
|
"- Text example — “the order body status is created”: left { mode:\"runtime\", valueType:\"string\", value:\"CreateOrder.body.status\" }, operator:\"equals\", right { mode:\"literal\", valueType:\"string\", value:\"created\" }.",
|
|
146
149
|
"- Operators: equals, not_equals, strict_equals, strict_not_equals, greater_than, less_than, greater_or_equal, less_or_equal, between (right = array of 2 numbers), contains, not_contains, starts_with, ends_with, regex, in, not_in (right = array). UNARY (no right operand): exists, not_exists, is_empty, not_empty, is_null, not_null.",
|
|
147
|
-
"- Optional operand `extract` — { type:\"jsonpath\"|\"regex\", expression, flags?, group?, select?:\"first\"|\"all\" } — applied to the RESOLVED operand value before valueType coercion. Use it when a dotted path can't reach the value (
|
|
150
|
+
"- Optional operand `extract` — { type:\"jsonpath\"|\"regex\", expression, flags?, group?, select?:\"first\"|\"all\" } — applied to the RESOLVED operand value before valueType coercion. Use it when a dotted path can't reach the value (wildcards, recursive descent, bracket names with dashes, or pulling a fragment out of a string). JSONPath runs without script evaluation: filters such as [?(@.x==1)] are NOT supported — filter in a script node. Example: left { mode:\"runtime\", valueType:\"string\", value:\"CreateOrder.body\", extract:{ type:\"jsonpath\", expression:\"$.items[*].id\", select:\"all\" } }. Regex: expression is a JS regex source (e.g. \"ord-(\\\\d+)\"), optional flags (subset of \"gimsuy\") and group (capture group index). select:\"all\" yields an array of every match. A failed extraction behaves as not-exists.",
|
|
148
151
|
"",
|
|
149
152
|
"CONNECTIONS — never invent ids. Use a connectionId ONLY from the AVAILABLE CONNECTIONS list in the user message (matching the node's type: db→database, redis→redis, kafka→kafka, notification→slack). If the needed connection isn't listed, still create the node with connectionId \"\" and tell the user in `reply` to pick a connection.",
|
|
150
153
|
"",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scenario.js","sourceRoot":"","sources":["../../../src/ai/prompts/scenario.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,wEAAwE;AACxE,2EAA2E;AAC3E,EAAE;AACF,0EAA0E;AAC1E,oEAAoE;AACpE,8EAA8E;AAC9E,EAAE;AACF,+EAA+E;AAC/E,6EAA6E;AAC7E,+EAA+E;AAC/E,6EAA6E;AAC7E,yCAAyC;AAEzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAE7E,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAE3E,iFAAiF;AACjF,gFAAgF;AAChF,mCAAmC;AACnC,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,SAAS;IACT,IAAI;IACJ,OAAO;IACP,OAAO;IACP,WAAW;IACX,WAAW;IACX,QAAQ;IACR,UAAU;IACV,MAAM;IACN,SAAS;IACT,WAAW;IACX,IAAI;IACJ,MAAM;IACN,cAAc;IACd,YAAY;IACZ,KAAK;CACG,CAAC;AAEX,iFAAiF;AACjF,iFAAiF;AACjF,+EAA+E;AAC/E,kDAAkD;AAClD,MAAM,UAAU,GAA2B;IACzC,OAAO,EACL,syEAAsyE;IAExyE,EAAE,EAAE,oaAAoa;IACxa,KAAK;IACH,qEAAqE;IACrE,sDAAsD;IACtD,8KAA8K,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,4OAA4O;IACvc,KAAK,EACH,
|
|
1
|
+
{"version":3,"file":"scenario.js","sourceRoot":"","sources":["../../../src/ai/prompts/scenario.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,wEAAwE;AACxE,2EAA2E;AAC3E,EAAE;AACF,0EAA0E;AAC1E,oEAAoE;AACpE,8EAA8E;AAC9E,EAAE;AACF,+EAA+E;AAC/E,6EAA6E;AAC7E,+EAA+E;AAC/E,6EAA6E;AAC7E,yCAAyC;AAEzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAE7E,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAE3E,iFAAiF;AACjF,gFAAgF;AAChF,mCAAmC;AACnC,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,SAAS;IACT,IAAI;IACJ,OAAO;IACP,OAAO;IACP,WAAW;IACX,WAAW;IACX,QAAQ;IACR,UAAU;IACV,MAAM;IACN,SAAS;IACT,WAAW;IACX,IAAI;IACJ,UAAU;IACV,MAAM;IACN,cAAc;IACd,YAAY;IACZ,KAAK;CACG,CAAC;AAEX,iFAAiF;AACjF,iFAAiF;AACjF,+EAA+E;AAC/E,kDAAkD;AAClD,MAAM,UAAU,GAA2B;IACzC,OAAO,EACL,syEAAsyE;IAExyE,EAAE,EAAE,oaAAoa;IACxa,KAAK;IACH,qEAAqE;IACrE,sDAAsD;IACtD,8KAA8K,MAAM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AAC,CAAC;IACjB,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;IAC5B,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACxB,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scenarioNodeDefaults.d.ts","sourceRoot":"","sources":["../../../src/ai/prompts/scenarioNodeDefaults.ts"],"names":[],"mappings":"AAsDA,eAAO,MAAM,6BAA6B,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"scenarioNodeDefaults.d.ts","sourceRoot":"","sources":["../../../src/ai/prompts/scenarioNodeDefaults.ts"],"names":[],"mappings":"AAsDA,eAAO,MAAM,6BAA6B,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CA2HjE,CAAC;AAEF,eAAO,MAAM,yBAAyB,GAAI,MAAM,MAAM,KAAG,OACZ,CAAC"}
|
|
@@ -136,6 +136,15 @@ export const SCENARIO_NODE_DEFAULT_CONFIGS = {
|
|
|
136
136
|
responseExample: "",
|
|
137
137
|
executionPolicy: STRICT_POLICY,
|
|
138
138
|
},
|
|
139
|
+
temporal: {
|
|
140
|
+
connectionId: "",
|
|
141
|
+
operation: "describe",
|
|
142
|
+
workflowId: "",
|
|
143
|
+
args: "",
|
|
144
|
+
expect: [],
|
|
145
|
+
expectMatchMode: "all",
|
|
146
|
+
executionPolicy: STRICT_POLICY,
|
|
147
|
+
},
|
|
139
148
|
wait: { durationMs: 5000, executionPolicy: STRICT_POLICY },
|
|
140
149
|
notification: {
|
|
141
150
|
provider: "slack",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scenarioNodeDefaults.js","sourceRoot":"","sources":["../../../src/ai/prompts/scenarioNodeDefaults.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,8EAA8E;AAC9E,8EAA8E;AAC9E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;KAC/B;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,IAAY,EAAW,EAAE,CACjE,6BAA6B,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scenarioNodeReference.d.ts","sourceRoot":"","sources":["../../../src/ai/prompts/scenarioNodeReference.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"scenarioNodeReference.d.ts","sourceRoot":"","sources":["../../../src/ai/prompts/scenarioNodeReference.ts"],"names":[],"mappings":"AAkDA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAYvE,MAAM,WAAW,kCAAkC;IACjD;;;OAGG;IACH,gBAAgB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;CAC9C;AA07BD;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,GACtC,UAAS,kCAAuC,KAC/C,MAyGF,CAAC;AAGF,eAAO,MAAM,6BAA6B,EAAE,SAAS,gBAAgB,EAAoB,CAAC"}
|