mcp-event-intelligence 0.1.1 → 0.2.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/CHANGELOG.md +72 -0
- package/README.md +79 -4
- package/bin/mcp-event-intelligence.mjs +1 -1
- package/dist/src/composite/derivedGraph.d.ts +4 -0
- package/dist/src/composite/derivedGraph.js +46 -0
- package/dist/src/composite/engine.d.ts +3 -64
- package/dist/src/composite/engine.js +26 -343
- package/dist/src/composite/matching.d.ts +8 -0
- package/dist/src/composite/matching.js +109 -0
- package/dist/src/composite/runtimeSupport.d.ts +24 -0
- package/dist/src/composite/runtimeSupport.js +176 -0
- package/dist/src/composite/store.d.ts +59 -0
- package/dist/src/composite/store.js +1 -0
- package/dist/src/intelligenceProtocol/schemas.d.ts +9 -7
- package/dist/src/intelligenceProtocol/schemas.js +1 -0
- package/dist/src/intelligenceProtocol/triggerSchemas.d.ts +6 -6
- package/dist/src/mcpEvents/erpnextProvider.d.ts +20 -0
- package/dist/src/mcpEvents/erpnextProvider.js +80 -0
- package/package.json +5 -1
- package/scripts/host-integration.d.mts +34 -4
- package/scripts/host-integration.mjs +44 -1
- package/scripts/lib/composite-wake-coordinator.mjs +233 -9
- package/scripts/lib/event-processor.mjs +235 -20
- package/scripts/lib/local-event-intelligence-runtime.mjs +238 -83
- package/scripts/lib/mcp-events-client.mjs +184 -66
- package/scripts/lib/persistent-event-store.mjs +320 -1
- package/scripts/lib/temporal-deadline-scheduler.mjs +12 -2
- package/scripts/lib/wake-retry-scheduler.mjs +104 -0
- package/scripts/mcp-stdio-server.mjs +1 -1
- package/scripts/service.mjs +20 -0
- package/server.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,78 @@
|
|
|
2
2
|
|
|
3
3
|
All notable public changes are documented here.
|
|
4
4
|
|
|
5
|
+
## [0.2.1] - 2026-09-20
|
|
6
|
+
|
|
7
|
+
Patch hardening for shutdown determinism and multi-tenant verification.
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- host shutdown now drains in-flight MCP polling, temporal/wake schedulers and persistent JSONL writes before returning;
|
|
12
|
+
- prevents background writes from racing temporary-directory cleanup and causing intermittent `ENOTEMPTY` failures;
|
|
13
|
+
- scoped isolation regression coverage now includes event source discovery, MCP client state/cursors, occurrences, audit records and wake visibility.
|
|
14
|
+
|
|
15
|
+
### Clarified
|
|
16
|
+
|
|
17
|
+
- the exported ERPNext helper is a typed MCP Events provider factory, not a credential-owning ERP connector;
|
|
18
|
+
- the production authenticated ERPNext implementation remains in `world-capability-mcp`, where real data access, tenant/company filtering, pagination, cursors and timezone handling are implemented.
|
|
19
|
+
|
|
20
|
+
## [0.2.0] - 2026-09-20
|
|
21
|
+
|
|
22
|
+
Production-hardening release for shared Event Intelligence hosts.
|
|
23
|
+
|
|
24
|
+
### Shared-host isolation
|
|
25
|
+
|
|
26
|
+
- explicit `scopeId` partitions for tenant/workspace isolation;
|
|
27
|
+
- scoped host views via `host.scope(scopeId)`;
|
|
28
|
+
- isolated triggers, matches, event sources, cursors, deadlines, derived events and wake delivery state;
|
|
29
|
+
- persistent scope restoration after restart;
|
|
30
|
+
- root host documented as a trusted operator/control-plane capability.
|
|
31
|
+
|
|
32
|
+
### Pluggable persistence
|
|
33
|
+
|
|
34
|
+
- `createEventIntelligenceHost({ store })` now accepts an external storage backend;
|
|
35
|
+
- `PersistentEventStore` remains the zero-dependency default;
|
|
36
|
+
- scoped custom backends can implement `forScope(scopeId)`;
|
|
37
|
+
- storage contract validates the operations required by Event Intelligence at startup.
|
|
38
|
+
|
|
39
|
+
### Durable wake delivery
|
|
40
|
+
|
|
41
|
+
- persisted wake-delivery state with `pending`, `claimed`, `retry_pending`, `delivered` and `dead_letter`;
|
|
42
|
+
- atomic claim/lease API for concurrent workers;
|
|
43
|
+
- bounded exponential retry and retry scheduler;
|
|
44
|
+
- restart recovery without a new provider event;
|
|
45
|
+
- reconciliation of a persisted runtime receipt after a crash without redelivering the wake;
|
|
46
|
+
- the direct `EventProcessor` path now uses the same durable retry semantics.
|
|
47
|
+
|
|
48
|
+
### Polling and load control
|
|
49
|
+
|
|
50
|
+
- single-flight polling per MCP connection;
|
|
51
|
+
- bounded `hasMore` page draining;
|
|
52
|
+
- cursor persistence after every drained page;
|
|
53
|
+
- explicit batch-limit reporting.
|
|
54
|
+
|
|
55
|
+
### Internal modularity
|
|
56
|
+
|
|
57
|
+
- composite store contracts extracted from `engine.ts`;
|
|
58
|
+
- matching/correlation helpers extracted into a dedicated module;
|
|
59
|
+
- derived-event cycle validation extracted into a graph module;
|
|
60
|
+
- lifecycle, deadline and audit support extracted from the engine.
|
|
61
|
+
|
|
62
|
+
### Provider coverage
|
|
63
|
+
|
|
64
|
+
- new `mcp-event-intelligence/provider/erpnext` export;
|
|
65
|
+
- provider-native ERPNext adapter for `erpnext.sales_invoice.submitted` and `erpnext.sales_order.created`;
|
|
66
|
+
- schema-validation and provider-generalization regression coverage.
|
|
67
|
+
|
|
68
|
+
### Verification
|
|
69
|
+
|
|
70
|
+
- tenant-isolation tests with identical trigger IDs in separate scopes;
|
|
71
|
+
- custom-store injection and restart persistence tests;
|
|
72
|
+
- polling single-flight and bounded-batching tests;
|
|
73
|
+
- retry, dead-letter, lease-contention and post-receipt crash-reconciliation tests;
|
|
74
|
+
- ERPNext provider adapter tests;
|
|
75
|
+
- CI, Security Scan, MCP Launch Check, Clean-room Smoke and Public Release Check green before release.
|
|
76
|
+
|
|
5
77
|
## [0.1.1] - 2026-09-20
|
|
6
78
|
|
|
7
79
|
Provider integration patch.
|
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
[](https://github.com/sarooo17/event-intelligence/actions/workflows/ci.yml)
|
|
6
6
|
[](https://www.npmjs.com/package/mcp-event-intelligence)
|
|
7
|
-
[](https://registry.modelcontextprotocol.io/?q=io.github.sarooo17%2Fevent-intelligence)
|
|
8
8
|
[](LICENSE)
|
|
9
9
|
|
|
10
10
|
MCP Event Intelligence is an experimental event runtime for agents that need to react to **future conditions over multiple event sources** without keeping an LLM or agent loop alive.
|
|
@@ -55,6 +55,38 @@ const ei = await createEventIntelligenceHost({
|
|
|
55
55
|
Event Intelligence enumerates the host registry automatically. GitHub, Gmail, private/company MCPs and future connections do not need to be configured again inside EI. Tools-only MCPs remain available to the agent and are ignored by the Events layer; Events-capable MCPs are attached automatically.
|
|
56
56
|
|
|
57
57
|
|
|
58
|
+
### Shared hosts, tenant isolation and storage
|
|
59
|
+
|
|
60
|
+
One EI host can serve many tenants/workspaces without sharing trigger state. Give each host-owned MCP connection a `scopeId` and give tenant-facing code only the corresponding scoped view:
|
|
61
|
+
|
|
62
|
+
```js
|
|
63
|
+
const tenant = await ei.scope('tenant-acme');
|
|
64
|
+
|
|
65
|
+
await tenant.triggerControl.createTrigger({
|
|
66
|
+
definition,
|
|
67
|
+
connectionIds: ['acme-erp'],
|
|
68
|
+
actor,
|
|
69
|
+
owner,
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
const acmeConnections = tenant.mcpStatus();
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
The default reference store physically namespaces non-default scopes under separate persistent store partitions. Trigger IDs, match IDs, cursors, event sources, deadlines, derived events and wake delivery state are therefore resolved inside a scope rather than filtered out of a global result after the fact. The root host object is the trusted operator/control-plane capability; tenant code should receive a scoped view.
|
|
76
|
+
|
|
77
|
+
Storage is injectable:
|
|
78
|
+
|
|
79
|
+
```js
|
|
80
|
+
const ei = await createEventIntelligenceHost({
|
|
81
|
+
store: myEventIntelligenceStore,
|
|
82
|
+
mcpRegistry,
|
|
83
|
+
wake,
|
|
84
|
+
});
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
`PersistentEventStore` remains the zero-dependency default. A custom backend can implement `forScope(scopeId)` to return an isolated tenant view. For horizontally scaled workers, its wake-delivery claim/lease operations must be atomic across processes; the bundled JSONL store provides serialized atomicity inside one process and is a reference backend, not a distributed database.
|
|
88
|
+
|
|
89
|
+
|
|
58
90
|
## Add Events to an MCP provider
|
|
59
91
|
|
|
60
92
|
Providers can expose the experimental Events boundary without reimplementing the generic JSON-RPC glue:
|
|
@@ -92,6 +124,36 @@ The package owns capability advertisement, `server/discover`, `events/list`, `ev
|
|
|
92
124
|
|
|
93
125
|
This adapter remains experimental compatibility work around MCP Events; it is not a claim of finalized MCP Events conformance.
|
|
94
126
|
|
|
127
|
+
|
|
128
|
+
An ERPNext-shaped **provider factory** is also exported:
|
|
129
|
+
|
|
130
|
+
```js
|
|
131
|
+
import {
|
|
132
|
+
createErpNextEventsProvider,
|
|
133
|
+
} from 'mcp-event-intelligence/provider/erpnext';
|
|
134
|
+
|
|
135
|
+
const events = createErpNextEventsProvider({
|
|
136
|
+
pollSalesInvoices: ({ cursor, maxEvents }) =>
|
|
137
|
+
erp.pollSubmittedInvoices({ cursor, maxEvents }),
|
|
138
|
+
pollSalesOrders: ({ cursor, maxEvents }) =>
|
|
139
|
+
erp.pollCreatedSalesOrders({ cursor, maxEvents }),
|
|
140
|
+
});
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
This helper owns the MCP Events descriptors, schemas and response validation for
|
|
144
|
+
`erpnext.sales_invoice.submitted` and `erpnext.sales_order.created`. It is
|
|
145
|
+
**not** a credential-owning ERPNext connector: the host/provider must supply the
|
|
146
|
+
actual data-access functions. That separation is intentional so Event
|
|
147
|
+
Intelligence never duplicates provider authentication.
|
|
148
|
+
|
|
149
|
+
The production proof that the abstraction works against a real ERP data layer
|
|
150
|
+
lives in `sarooo17/world-capability-mcp`: its ERP Events implementation uses
|
|
151
|
+
`createMcpEventsProvider` with authenticated ERPNext/Frappe record queries,
|
|
152
|
+
tenant/company filters, opaque replay-safe cursors, pagination/`hasMore`,
|
|
153
|
+
timezone normalization and deterministic occurrence IDs. The local factory in
|
|
154
|
+
this package should therefore be read as a typed convenience API, not as the
|
|
155
|
+
production ERP connector itself.
|
|
156
|
+
|
|
95
157
|
## What v0.1 implements
|
|
96
158
|
|
|
97
159
|
### Host-owned event sources
|
|
@@ -101,6 +163,8 @@ This adapter remains experimental compatibility work around MCP Events; it is no
|
|
|
101
163
|
- experimental MCP Events capability discovery;
|
|
102
164
|
- `events/list` and `events/poll`;
|
|
103
165
|
- persistent opaque cursors;
|
|
166
|
+
- per-scope source/cursor isolation for shared hosts;
|
|
167
|
+
- single-flight polling per connection plus bounded `hasMore` batch draining;
|
|
104
168
|
- automatic event-source registration;
|
|
105
169
|
- dynamic attach/detach of host MCP clients;
|
|
106
170
|
- provider-native compatibility adapters such as GitHub webhooks.
|
|
@@ -160,6 +224,8 @@ Derived event names are versioned contracts such as `release.ready@1`.
|
|
|
160
224
|
|
|
161
225
|
An embedded harness can provide one in-process wake dispatcher that routes by `target.runtime`, `target.kind` and `target.id`; runtime-specific handlers remain available as a lower-level option. A standalone deployment can instead use signed HMAC callbacks. Both paths return a stable `runtimeReceiptId`.
|
|
162
226
|
|
|
227
|
+
Runtime delivery is durable: a stable wake ID gets a persisted delivery record, a worker claims it with a lease, transient failures are retried with bounded exponential backoff, expired claims can be recovered after restart, and only an exhausted retry budget enters dead-letter. This prevents two workers sharing an atomic store from intentionally owning the same delivery at the same time. The runtime should still treat the stable wake ID as an idempotency key because no system can make an arbitrary external side effect transactionally exactly-once without cooperation from the receiver.
|
|
228
|
+
|
|
163
229
|
## Why this exists
|
|
164
230
|
|
|
165
231
|
MCP Events is concerned with the event transport/subscription boundary. Event Intelligence explores the layer **above transport**:
|
|
@@ -195,6 +261,10 @@ The v0.1 acceptance suite verifies:
|
|
|
195
261
|
- process shutdown while a temporal deadline is pending;
|
|
196
262
|
- restart on the same datastore after the deadline;
|
|
197
263
|
- wake recovery **without a new provider event**;
|
|
264
|
+
- retry-state recovery after process restart and lease-based concurrent-worker exclusion;
|
|
265
|
+
- shared-host tenant isolation with identical trigger IDs in different scopes;
|
|
266
|
+
- bounded/single-flight provider polling;
|
|
267
|
+
- provider-generalization coverage with ERPNext-shaped invoice/order events;
|
|
198
268
|
- hash-linked audit verification.
|
|
199
269
|
|
|
200
270
|
A separate live regression also verified real GitHub webhook ingress into the MCP EventOccurrence / composite fan-in path.
|
|
@@ -263,6 +333,11 @@ Standalone/core environment variables:
|
|
|
263
333
|
| `RUNTIME_WAKE_TARGETS_JSON` | no | signed standalone runtime callbacks |
|
|
264
334
|
| `GITHUB_WEBHOOK_SECRET` | no | verify GitHub webhook ingress |
|
|
265
335
|
| `TYPESAFE_API_KEY` | no | bundled TypeSafe Jev semantic evaluator |
|
|
336
|
+
| `WAKE_DELIVERY_MAX_ATTEMPTS` | no | maximum wake delivery attempts, default `5` |
|
|
337
|
+
| `WAKE_DELIVERY_LEASE_MS` | no | claim lease duration, default `30000` |
|
|
338
|
+
| `WAKE_RETRY_BASE_DELAY_MS` | no | first retry delay, default `1000` |
|
|
339
|
+
| `WAKE_RETRY_MAX_DELAY_MS` | no | retry backoff cap, default `60000` |
|
|
340
|
+
| `WAKE_RETRY_TICK_MS` | no | retry scheduler tick, default `1000` |
|
|
266
341
|
|
|
267
342
|
Embedded hosts pass one MCP registry adapter. Event Intelligence discovers already-connected clients from that registry; provider MCP connection settings are not duplicated inside EI.
|
|
268
343
|
|
|
@@ -286,7 +361,7 @@ Absence/deadline progression uses Event Intelligence processing time. This separ
|
|
|
286
361
|
|
|
287
362
|
The implementation does not claim theoretical distributed exactly-once delivery.
|
|
288
363
|
|
|
289
|
-
It uses stable wake IDs,
|
|
364
|
+
It uses stable wake IDs, persisted delivery state, atomic claim leases, bounded retries, runtime receipts and replay handling to provide effectively-once runtime activation in the validated reference scenarios.
|
|
290
365
|
|
|
291
366
|
### Derived event vs current state
|
|
292
367
|
|
|
@@ -298,7 +373,7 @@ v0.1 intentionally does not implement a mutable current-state/facts database.
|
|
|
298
373
|
|
|
299
374
|
Read [SECURITY.md](SECURITY.md) and [docs/SECURITY-MODEL.md](docs/SECURITY-MODEL.md).
|
|
300
375
|
|
|
301
|
-
In embedded mode, the host retains MCP authorization and credentials; Event Intelligence discovers only the client objects exposed through the host-provided MCP registry.
|
|
376
|
+
In embedded mode, the host retains MCP authorization and credentials; Event Intelligence discovers only the client objects exposed through the host-provided MCP registry. Tenant-facing callers should receive only `host.scope(scopeId)`. The reference JSONL store is scope-partitioned and single-process; distributed custom stores must preserve scope isolation and atomic wake claims.
|
|
302
377
|
|
|
303
378
|
## MCP compatibility status
|
|
304
379
|
|
|
@@ -319,7 +394,7 @@ io.github.sarooo17/event-intelligence
|
|
|
319
394
|
|
|
320
395
|
**v0.1 reference implementation / experimental.**
|
|
321
396
|
|
|
322
|
-
The architecture is implemented and exercised end-to-end. Remaining work is primarily production
|
|
397
|
+
The architecture is implemented and exercised end-to-end. Storage is now injectable and scoped, while the bundled JSONL backend remains a single-process reference implementation. Remaining work is primarily production database adapters/HA validation, scale benchmarks and upstream feedback.
|
|
323
398
|
|
|
324
399
|
## Example
|
|
325
400
|
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { CompositeTriggerDefinition } from '../intelligenceProtocol/triggerSchemas.js';
|
|
2
|
+
export declare function assertNoDerivedEventCycle(existing: CompositeTriggerDefinition[], candidate: CompositeTriggerDefinition, getState?: (triggerId: string, version: string) => {
|
|
3
|
+
status: string;
|
|
4
|
+
} | null): void;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
const DERIVED_SERVER_ID = 'event-intelligence:derived';
|
|
2
|
+
function eventNode(eventName, serverId) {
|
|
3
|
+
return `${serverId || DERIVED_SERVER_ID}::${eventName}`;
|
|
4
|
+
}
|
|
5
|
+
export function assertNoDerivedEventCycle(existing, candidate, getState) {
|
|
6
|
+
const definitions = [
|
|
7
|
+
...existing.filter((definition) => {
|
|
8
|
+
const state = getState?.(definition.triggerId, definition.version);
|
|
9
|
+
return !state || state.status === 'active' || state.status === 'paused';
|
|
10
|
+
}),
|
|
11
|
+
candidate,
|
|
12
|
+
].filter((definition) => definition.derivedEvent);
|
|
13
|
+
const graph = new Map();
|
|
14
|
+
for (const definition of definitions) {
|
|
15
|
+
const output = eventNode(definition.derivedEvent.name, DERIVED_SERVER_ID);
|
|
16
|
+
for (const clause of definition.clauses) {
|
|
17
|
+
const input = eventNode(clause.event, clause.serverId);
|
|
18
|
+
const edges = graph.get(input) ?? new Set();
|
|
19
|
+
edges.add(output);
|
|
20
|
+
graph.set(input, edges);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
const visiting = new Set();
|
|
24
|
+
const visited = new Set();
|
|
25
|
+
const dfs = (node) => {
|
|
26
|
+
if (visiting.has(node))
|
|
27
|
+
return true;
|
|
28
|
+
if (visited.has(node))
|
|
29
|
+
return false;
|
|
30
|
+
visiting.add(node);
|
|
31
|
+
for (const next of graph.get(node) ?? []) {
|
|
32
|
+
if (dfs(next))
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
visiting.delete(node);
|
|
36
|
+
visited.add(node);
|
|
37
|
+
return false;
|
|
38
|
+
};
|
|
39
|
+
for (const node of graph.keys()) {
|
|
40
|
+
if (dfs(node)) {
|
|
41
|
+
const error = new Error(`Derived event graph contains a cycle involving ${node}`);
|
|
42
|
+
error.code = 'TRIGGER_DERIVED_EVENT_CYCLE';
|
|
43
|
+
throw error;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -1,63 +1,7 @@
|
|
|
1
1
|
import type { SemanticEvaluator } from '../semantic/types.js';
|
|
2
2
|
import { type CompositeTriggerDefinition, type TriggerMatchRecord } from '../intelligenceProtocol/triggerSchemas.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
listTriggers(): CompositeTriggerDefinition[];
|
|
6
|
-
getTriggerState?(triggerId: string, version: string): {
|
|
7
|
-
status: 'active' | 'paused' | 'completed' | 'expired' | 'deleted';
|
|
8
|
-
owner?: unknown;
|
|
9
|
-
connectionIds?: string[];
|
|
10
|
-
fireCount?: number;
|
|
11
|
-
lastFiredAt?: string | null;
|
|
12
|
-
revision?: number;
|
|
13
|
-
} | null;
|
|
14
|
-
setTriggerState?(triggerId: string, version: string, status: 'active' | 'paused' | 'completed' | 'expired' | 'deleted', actor?: unknown, metadata?: Record<string, unknown>): Promise<unknown>;
|
|
15
|
-
appendTriggerMatch(record: TriggerMatchRecord): Promise<void>;
|
|
16
|
-
listTriggerMatches(triggerId?: string): TriggerMatchRecord[];
|
|
17
|
-
getTemporalDeadline?(deadlineId: string): {
|
|
18
|
-
deadlineId: string;
|
|
19
|
-
triggerId: string;
|
|
20
|
-
triggerVersion: string;
|
|
21
|
-
matchId: string;
|
|
22
|
-
conditionId: string;
|
|
23
|
-
dueAt: string;
|
|
24
|
-
status: 'pending' | 'cancelled' | 'fired';
|
|
25
|
-
} | null;
|
|
26
|
-
listTemporalDeadlines?(filter?: {
|
|
27
|
-
triggerId?: string;
|
|
28
|
-
matchId?: string;
|
|
29
|
-
status?: string;
|
|
30
|
-
}): Array<{
|
|
31
|
-
deadlineId: string;
|
|
32
|
-
triggerId: string;
|
|
33
|
-
triggerVersion: string;
|
|
34
|
-
matchId: string;
|
|
35
|
-
conditionId: string;
|
|
36
|
-
dueAt: string;
|
|
37
|
-
status: string;
|
|
38
|
-
}>;
|
|
39
|
-
putTemporalDeadline?(input: {
|
|
40
|
-
deadlineId: string;
|
|
41
|
-
triggerId: string;
|
|
42
|
-
triggerVersion: string;
|
|
43
|
-
matchId: string;
|
|
44
|
-
conditionId: string;
|
|
45
|
-
dueAt: string;
|
|
46
|
-
status: 'pending' | 'cancelled' | 'fired';
|
|
47
|
-
}): Promise<unknown>;
|
|
48
|
-
setTemporalDeadlineStatus?(deadlineId: string, status: 'pending' | 'cancelled' | 'fired'): Promise<unknown>;
|
|
49
|
-
}
|
|
50
|
-
export interface CompositeTriggerAudit {
|
|
51
|
-
appendAudit(input: {
|
|
52
|
-
auditId: string;
|
|
53
|
-
traceId: string;
|
|
54
|
-
timestamp: string;
|
|
55
|
-
kind: string;
|
|
56
|
-
entityType: 'trigger_match' | 'trigger';
|
|
57
|
-
entityId: string;
|
|
58
|
-
details?: Record<string, unknown>;
|
|
59
|
-
}): Promise<unknown>;
|
|
60
|
-
}
|
|
3
|
+
import type { CompositeTriggerAudit, CompositeTriggerStore } from './store.js';
|
|
4
|
+
export type { CompositeTriggerAudit, CompositeTriggerStore, } from './store.js';
|
|
61
5
|
export interface CompositeIngestResult {
|
|
62
6
|
triggerId: string;
|
|
63
7
|
match: TriggerMatchRecord | null;
|
|
@@ -68,6 +12,7 @@ export declare class CompositeTriggerEngine {
|
|
|
68
12
|
private readonly store;
|
|
69
13
|
private readonly evaluator;
|
|
70
14
|
private readonly now;
|
|
15
|
+
private readonly support;
|
|
71
16
|
constructor(store: CompositeTriggerStore & CompositeTriggerAudit, evaluator?: SemanticEvaluator | null, now?: () => Date);
|
|
72
17
|
register(definitionInput: unknown): Promise<CompositeTriggerDefinition>;
|
|
73
18
|
ingest(eventInput: unknown): Promise<CompositeIngestResult[]>;
|
|
@@ -76,12 +21,6 @@ export declare class CompositeTriggerEngine {
|
|
|
76
21
|
private ingestTimerEvent;
|
|
77
22
|
private applyEvent;
|
|
78
23
|
private finalizeEligible;
|
|
79
|
-
private scheduleDeadlines;
|
|
80
|
-
private cancelDeadlinesForMatch;
|
|
81
|
-
private advanceLifecycleAfterEffect;
|
|
82
|
-
private lifecycleAllows;
|
|
83
|
-
private auditTriggerLifecycle;
|
|
84
24
|
private newMatch;
|
|
85
25
|
private latestMatch;
|
|
86
|
-
private audit;
|
|
87
26
|
}
|