@segmentstream/ontology 0.186.0 → 0.187.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/CHANGELOG.md +7 -0
- package/README.md +1 -1
- package/dist/workflow.d.ts +2 -2
- package/dist/workflow.js +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.187.0
|
|
4
|
+
|
|
5
|
+
An ontology may declare 100 action triggers (`after(…)`), up from 50. `MAX_ACTION_TRIGGERS` is 100,
|
|
6
|
+
and `check` and publication report `workflow_trigger_limit_exceeded` above it. A workflow may carry
|
|
7
|
+
several action triggers, so the count can exceed the 50 workflows an ontology may declare. Each
|
|
8
|
+
trigger still adds its work to every action on its entity, inside that action's transaction.
|
|
9
|
+
|
|
3
10
|
## 0.186.0
|
|
4
11
|
|
|
5
12
|
The ontology's Slack messages, a post in either voice (`agent_chat.send`), a draft a member approves
|
package/README.md
CHANGED
|
@@ -627,7 +627,7 @@ export default workflow("remindStaleLeads", {
|
|
|
627
627
|
(`{ record, before, after }`, typed as the entity's records); `input` omitted means `{}`.
|
|
628
628
|
`changed(field, { from?, to? })` is a `when` for the common case. A workflow reacts to an action,
|
|
629
629
|
not to a field. The manifest records the kind, name, description, entity and action, never the
|
|
630
|
-
functions. At most
|
|
630
|
+
functions. At most 100 action triggers per ontology; `check` reports `invalid-trigger`,
|
|
631
631
|
`trigger_action_unknown`, `trigger_function_async` and `workflow_trigger_limit_exceeded`.
|
|
632
632
|
- `webhook(name, { description, signature?, headers? })` starts the workflow for each delivery a
|
|
633
633
|
provider pushes to `/api/webhooks/<name>`, whose wire name is unique across the ontology. The
|
package/dist/workflow.d.ts
CHANGED
|
@@ -16,9 +16,9 @@ export declare const MAX_WORKFLOWS = 50;
|
|
|
16
16
|
* action evaluates the triggers on its entity inside its own transaction, so this bounds the work
|
|
17
17
|
* one action can add: about 4 to 6 ms per trigger for a batch create of 100 records, nothing
|
|
18
18
|
* measurable for a single update. It does not bound the runs a bulk action starts, one per edited
|
|
19
|
-
* record.
|
|
19
|
+
* record. A workflow may carry several, so it exceeds the workflows an ontology may declare.
|
|
20
20
|
*/
|
|
21
|
-
export declare const MAX_ACTION_TRIGGERS =
|
|
21
|
+
export declare const MAX_ACTION_TRIGGERS = 100;
|
|
22
22
|
/**
|
|
23
23
|
* What a trigger listed in `defineOntology({ triggers })` runs instead of a workflow: one action,
|
|
24
24
|
* in a durable run retried like a step, as the trigger's own workflow user holding `role`. The
|
package/dist/workflow.js
CHANGED
|
@@ -10,9 +10,9 @@ export const MAX_WORKFLOWS = 50;
|
|
|
10
10
|
* action evaluates the triggers on its entity inside its own transaction, so this bounds the work
|
|
11
11
|
* one action can add: about 4 to 6 ms per trigger for a batch create of 100 records, nothing
|
|
12
12
|
* measurable for a single update. It does not bound the runs a bulk action starts, one per edited
|
|
13
|
-
* record.
|
|
13
|
+
* record. A workflow may carry several, so it exceeds the workflows an ontology may declare.
|
|
14
14
|
*/
|
|
15
|
-
export const MAX_ACTION_TRIGGERS =
|
|
15
|
+
export const MAX_ACTION_TRIGGERS = 100;
|
|
16
16
|
/** Declares a cron trigger; list it in `workflow(name, { triggers })`. UTC, five fields. */
|
|
17
17
|
export function cron(name, expression, options) {
|
|
18
18
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@segmentstream/ontology",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.187.0",
|
|
4
4
|
"description": "Define a SegmentStream workspace app's ontology: entities, relationships, roles and actions, written with Effect.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "SegmentStream",
|