@blue-labs/document-processor 1.21.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/LICENSE +21 -0
- package/README.md +11 -0
- package/dist/BlueDocumentProcessor.d.ts +54 -0
- package/dist/BlueDocumentProcessor.d.ts.map +1 -0
- package/dist/config.d.ts +3 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/context.d.ts +21 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/index.mjs +1557 -0
- package/dist/processors/BaseChannelProcessor.d.ts +27 -0
- package/dist/processors/BaseChannelProcessor.d.ts.map +1 -0
- package/dist/processors/ChannelEventCheckpointProcessor.d.ts +13 -0
- package/dist/processors/ChannelEventCheckpointProcessor.d.ts.map +1 -0
- package/dist/processors/CompositeTimelineChannelProcessor.d.ts +9 -0
- package/dist/processors/CompositeTimelineChannelProcessor.d.ts.map +1 -0
- package/dist/processors/DocumentUpdateChannelProcessor.d.ts +9 -0
- package/dist/processors/DocumentUpdateChannelProcessor.d.ts.map +1 -0
- package/dist/processors/EmbeddedNodeChannelProcessor.d.ts +9 -0
- package/dist/processors/EmbeddedNodeChannelProcessor.d.ts.map +1 -0
- package/dist/processors/MyOSAgentChannelProcessor.d.ts +60 -0
- package/dist/processors/MyOSAgentChannelProcessor.d.ts.map +1 -0
- package/dist/processors/MyOSTimelineChannelProcessor.d.ts +9 -0
- package/dist/processors/MyOSTimelineChannelProcessor.d.ts.map +1 -0
- package/dist/processors/OperationProcessor.d.ts +11 -0
- package/dist/processors/OperationProcessor.d.ts.map +1 -0
- package/dist/processors/ProcessEmbeddedProcessor.d.ts +10 -0
- package/dist/processors/ProcessEmbeddedProcessor.d.ts.map +1 -0
- package/dist/processors/SequentialWorkflowOperationProcessor.d.ts +12 -0
- package/dist/processors/SequentialWorkflowOperationProcessor.d.ts.map +1 -0
- package/dist/processors/SequentialWorkflowProcessor/SequentialWorkflowProcessor.d.ts +15 -0
- package/dist/processors/SequentialWorkflowProcessor/SequentialWorkflowProcessor.d.ts.map +1 -0
- package/dist/processors/SequentialWorkflowProcessor/index.d.ts +2 -0
- package/dist/processors/SequentialWorkflowProcessor/index.d.ts.map +1 -0
- package/dist/processors/SequentialWorkflowProcessor/steps/JavaScriptCodeExecutor.d.ts +8 -0
- package/dist/processors/SequentialWorkflowProcessor/steps/JavaScriptCodeExecutor.d.ts.map +1 -0
- package/dist/processors/SequentialWorkflowProcessor/steps/TriggerEventExecutor.d.ts +8 -0
- package/dist/processors/SequentialWorkflowProcessor/steps/TriggerEventExecutor.d.ts.map +1 -0
- package/dist/processors/SequentialWorkflowProcessor/steps/UpdateDocumentExecutor.d.ts +12 -0
- package/dist/processors/SequentialWorkflowProcessor/steps/UpdateDocumentExecutor.d.ts.map +1 -0
- package/dist/processors/SequentialWorkflowProcessor/types.d.ts +7 -0
- package/dist/processors/SequentialWorkflowProcessor/types.d.ts.map +1 -0
- package/dist/processors/SequentialWorkflowProcessor/utils/BindingsFactory.d.ts +12 -0
- package/dist/processors/SequentialWorkflowProcessor/utils/BindingsFactory.d.ts.map +1 -0
- package/dist/processors/SequentialWorkflowProcessor/utils/ExpressionEvaluator.d.ts +59 -0
- package/dist/processors/SequentialWorkflowProcessor/utils/ExpressionEvaluator.d.ts.map +1 -0
- package/dist/processors/TimelineChannelProcessor.d.ts +9 -0
- package/dist/processors/TimelineChannelProcessor.d.ts.map +1 -0
- package/dist/processors/index.d.ts +12 -0
- package/dist/processors/index.d.ts.map +1 -0
- package/dist/queue/TaskKey.d.ts +22 -0
- package/dist/queue/TaskKey.d.ts.map +1 -0
- package/dist/queue/TaskQueue.d.ts +31 -0
- package/dist/queue/TaskQueue.d.ts.map +1 -0
- package/dist/registry/ContractRegistry.d.ts +47 -0
- package/dist/registry/ContractRegistry.d.ts.map +1 -0
- package/dist/repo/core/blue-ids/index.d.ts +21 -0
- package/dist/repo/core/blue-ids/index.d.ts.map +1 -0
- package/dist/repo/core/index.d.ts +199 -0
- package/dist/repo/core/index.d.ts.map +1 -0
- package/dist/repo/core/schema/Channel.d.ts +13 -0
- package/dist/repo/core/schema/Channel.d.ts.map +1 -0
- package/dist/repo/core/schema/CompositeTimelineChannel.d.ts +17 -0
- package/dist/repo/core/schema/CompositeTimelineChannel.d.ts.map +1 -0
- package/dist/repo/core/schema/DocumentUpdateChannel.d.ts +17 -0
- package/dist/repo/core/schema/DocumentUpdateChannel.d.ts.map +1 -0
- package/dist/repo/core/schema/EmbeddedNodeChannel.d.ts +17 -0
- package/dist/repo/core/schema/EmbeddedNodeChannel.d.ts.map +1 -0
- package/dist/repo/core/schema/JavaScriptCode.d.ts +10 -0
- package/dist/repo/core/schema/JavaScriptCode.d.ts.map +1 -0
- package/dist/repo/core/schema/JsonPatchEntry.d.ts +22 -0
- package/dist/repo/core/schema/JsonPatchEntry.d.ts.map +1 -0
- package/dist/repo/core/schema/Operation.d.ts +16 -0
- package/dist/repo/core/schema/Operation.d.ts.map +1 -0
- package/dist/repo/core/schema/OperationRequest.d.ts +29 -0
- package/dist/repo/core/schema/OperationRequest.d.ts.map +1 -0
- package/dist/repo/core/schema/ProcessEmbedded.d.ts +10 -0
- package/dist/repo/core/schema/ProcessEmbedded.d.ts.map +1 -0
- package/dist/repo/core/schema/SequentialWorkflow.d.ts +13 -0
- package/dist/repo/core/schema/SequentialWorkflow.d.ts.map +1 -0
- package/dist/repo/core/schema/SequentialWorkflowOperation.d.ts +15 -0
- package/dist/repo/core/schema/SequentialWorkflowOperation.d.ts.map +1 -0
- package/dist/repo/core/schema/SequentialWorkflowStep.d.ts +13 -0
- package/dist/repo/core/schema/SequentialWorkflowStep.d.ts.map +1 -0
- package/dist/repo/core/schema/TimelineChannel.d.ts +17 -0
- package/dist/repo/core/schema/TimelineChannel.d.ts.map +1 -0
- package/dist/repo/core/schema/TimelineEntry.d.ts +25 -0
- package/dist/repo/core/schema/TimelineEntry.d.ts.map +1 -0
- package/dist/repo/core/schema/TriggerEvent.d.ts +10 -0
- package/dist/repo/core/schema/TriggerEvent.d.ts.map +1 -0
- package/dist/repo/core/schema/UpdateDocument.d.ts +40 -0
- package/dist/repo/core/schema/UpdateDocument.d.ts.map +1 -0
- package/dist/repo/core/schema/index.d.ts +15 -0
- package/dist/repo/core/schema/index.d.ts.map +1 -0
- package/dist/repo/myos/blue-ids/index.d.ts +8 -0
- package/dist/repo/myos/blue-ids/index.d.ts.map +1 -0
- package/dist/repo/myos/index.d.ts +101 -0
- package/dist/repo/myos/index.d.ts.map +1 -0
- package/dist/repo/myos/schema/MyOSAgent.d.ts +10 -0
- package/dist/repo/myos/schema/MyOSAgent.d.ts.map +1 -0
- package/dist/repo/myos/schema/MyOSAgentChannel.d.ts +30 -0
- package/dist/repo/myos/schema/MyOSAgentChannel.d.ts.map +1 -0
- package/dist/repo/myos/schema/MyOSAgentEvent.d.ts +19 -0
- package/dist/repo/myos/schema/MyOSAgentEvent.d.ts.map +1 -0
- package/dist/repo/myos/schema/MyOSTimelineChannel.d.ts +24 -0
- package/dist/repo/myos/schema/MyOSTimelineChannel.d.ts.map +1 -0
- package/dist/repo/myos/schema/MyOSTimelineEntry.d.ts +32 -0
- package/dist/repo/myos/schema/MyOSTimelineEntry.d.ts.map +1 -0
- package/dist/repo/myos/schema/index.d.ts +6 -0
- package/dist/repo/myos/schema/index.d.ts.map +1 -0
- package/dist/routing/EventRouter.d.ts +51 -0
- package/dist/routing/EventRouter.d.ts.map +1 -0
- package/dist/types.d.ts +86 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/utils/CheckpointCache.d.ts +10 -0
- package/dist/utils/CheckpointCache.d.ts.map +1 -0
- package/dist/utils/EventTraceManager.d.ts +46 -0
- package/dist/utils/EventTraceManager.d.ts.map +1 -0
- package/dist/utils/TinyQueue.d.ts +12 -0
- package/dist/utils/TinyQueue.d.ts.map +1 -0
- package/dist/utils/checkpoint.d.ts +4 -0
- package/dist/utils/checkpoint.d.ts.map +1 -0
- package/dist/utils/document.d.ts +19 -0
- package/dist/utils/document.d.ts.map +1 -0
- package/dist/utils/exceptions.d.ts +28 -0
- package/dist/utils/exceptions.d.ts.map +1 -0
- package/dist/utils/fetchText.d.ts +2 -0
- package/dist/utils/fetchText.d.ts.map +1 -0
- package/dist/utils/logPatchError.d.ts +3 -0
- package/dist/utils/logPatchError.d.ts.map +1 -0
- package/dist/utils/path.d.ts +2 -0
- package/dist/utils/path.d.ts.map +1 -0
- package/dist/utils/typeGuard.d.ts +5 -0
- package/dist/utils/typeGuard.d.ts.map +1 -0
- package/package.json +44 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ContractProcessor, EventNode, DocumentNode, ProcessingContext, BlueId } from '../types';
|
|
2
|
+
export declare abstract class BaseChannelProcessor implements ContractProcessor {
|
|
3
|
+
abstract readonly contractType: string;
|
|
4
|
+
abstract readonly contractBlueId: BlueId;
|
|
5
|
+
readonly role = "adapter";
|
|
6
|
+
/**
|
|
7
|
+
* Base implementation of supports that checks if the event is not from a channel
|
|
8
|
+
* Derived classes should call this method first in their supports implementation
|
|
9
|
+
*/
|
|
10
|
+
protected baseSupports(event: EventNode): boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Abstract method that derived classes must implement
|
|
13
|
+
* Should contain specific logic for determining if the processor supports the event
|
|
14
|
+
*/
|
|
15
|
+
abstract supports(event: EventNode, node: DocumentNode, ctx: ProcessingContext, contractName?: string): boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Abstract method that derived classes must implement
|
|
18
|
+
* Should contain specific logic for handling the event
|
|
19
|
+
*/
|
|
20
|
+
abstract handle(event: EventNode, node: DocumentNode, ctx: ProcessingContext, contractName?: string): void | Promise<void>;
|
|
21
|
+
/**
|
|
22
|
+
* Base implementation that returns empty array
|
|
23
|
+
* Can be overridden by derived classes if needed
|
|
24
|
+
*/
|
|
25
|
+
init(): EventNode[];
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=BaseChannelProcessor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseChannelProcessor.d.ts","sourceRoot":"","sources":["../../src/processors/BaseChannelProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,SAAS,EACT,YAAY,EACZ,iBAAiB,EACjB,MAAM,EACP,MAAM,UAAU,CAAC;AAElB,8BAAsB,oBAAqB,YAAW,iBAAiB;IACrE,QAAQ,CAAC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IACvC,QAAQ,CAAC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IACzC,QAAQ,CAAC,IAAI,aAAa;IAE1B;;;OAGG;IACH,SAAS,CAAC,YAAY,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO;IAKjD;;;OAGG;IACH,QAAQ,CAAC,QAAQ,CACf,KAAK,EAAE,SAAS,EAChB,IAAI,EAAE,YAAY,EAClB,GAAG,EAAE,iBAAiB,EACtB,YAAY,CAAC,EAAE,MAAM,GACpB,OAAO;IAEV;;;OAGG;IACH,QAAQ,CAAC,MAAM,CACb,KAAK,EAAE,SAAS,EAChB,IAAI,EAAE,YAAY,EAClB,GAAG,EAAE,iBAAiB,EACtB,YAAY,CAAC,EAAE,MAAM,GACpB,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAEvB;;;OAGG;IACH,IAAI,IAAI,SAAS,EAAE;CAGpB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ContractProcessor, DocumentNode, EventNode, ProcessingContext } from '../types';
|
|
2
|
+
import { CheckpointCache } from '../utils/CheckpointCache';
|
|
3
|
+
export declare class ChannelEventCheckpointProcessor implements ContractProcessor {
|
|
4
|
+
private readonly cache;
|
|
5
|
+
readonly contractType = "Channel Event Checkpoint";
|
|
6
|
+
readonly contractBlueId: "o27B7fuxMkKoutPh3uDxZ7dr6E5qxkQCS1VAptiCPc2R";
|
|
7
|
+
readonly role = "handler";
|
|
8
|
+
constructor(cache: CheckpointCache);
|
|
9
|
+
supports(evt: EventNode): boolean;
|
|
10
|
+
handle(event: EventNode, node: DocumentNode, ctx: ProcessingContext): Promise<void>;
|
|
11
|
+
init(): EventNode[];
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=ChannelEventCheckpointProcessor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChannelEventCheckpointProcessor.d.ts","sourceRoot":"","sources":["../../src/processors/ChannelEventCheckpointProcessor.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,iBAAiB,EACjB,YAAY,EACZ,SAAS,EACT,iBAAiB,EAClB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAO3D,qBAAa,+BAAgC,YAAW,iBAAiB;IAK3D,OAAO,CAAC,QAAQ,CAAC,KAAK;IAJlC,QAAQ,CAAC,YAAY,8BAA8B;IACnD,QAAQ,CAAC,cAAc,iDAAuC;IAC9D,QAAQ,CAAC,IAAI,aAAa;gBAEG,KAAK,EAAE,eAAe;IAEnD,QAAQ,CAAC,GAAG,EAAE,SAAS,GAAG,OAAO;IAQ3B,MAAM,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,YAAY,EAAE,GAAG,EAAE,iBAAiB;IAYzE,IAAI,IAAI,SAAS,EAAE;CAGpB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { EventNode, DocumentNode, ProcessingContext } from '../types';
|
|
2
|
+
import { BaseChannelProcessor } from './BaseChannelProcessor';
|
|
3
|
+
export declare class CompositeTimelineChannelProcessor extends BaseChannelProcessor {
|
|
4
|
+
readonly contractType = "Composite Timeline Channel";
|
|
5
|
+
readonly contractBlueId: "qxkh3uMkKoutP5DxZ7dr6Eo27B7fuxQCS1VAptiCPc2R";
|
|
6
|
+
supports(event: EventNode, node: DocumentNode, ctx: ProcessingContext): boolean;
|
|
7
|
+
handle(event: EventNode, node: DocumentNode, ctx: ProcessingContext, path: string): void;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=CompositeTimelineChannelProcessor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CompositeTimelineChannelProcessor.d.ts","sourceRoot":"","sources":["../../src/processors/CompositeTimelineChannelProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAG9D,qBAAa,iCAAkC,SAAQ,oBAAoB;IACzE,QAAQ,CAAC,YAAY,gCAAgC;IACrD,QAAQ,CAAC,cAAc,iDAAyC;IAEhE,QAAQ,CACN,KAAK,EAAE,SAAS,EAChB,IAAI,EAAE,YAAY,EAClB,GAAG,EAAE,iBAAiB,GACrB,OAAO;IAWV,MAAM,CACJ,KAAK,EAAE,SAAS,EAChB,IAAI,EAAE,YAAY,EAClB,GAAG,EAAE,iBAAiB,EACtB,IAAI,EAAE,MAAM,GACX,IAAI;CAOR"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { EventNode, DocumentNode, ProcessingContext } from '../types';
|
|
2
|
+
import { BaseChannelProcessor } from './BaseChannelProcessor';
|
|
3
|
+
export declare class DocumentUpdateChannelProcessor extends BaseChannelProcessor {
|
|
4
|
+
readonly contractType = "Document Update Channel";
|
|
5
|
+
readonly contractBlueId: "MkKoutP5qxkh3uDQCS1VAptiCPc2xZ7dr6Eo27B7fux";
|
|
6
|
+
supports(event: EventNode, contractNode: DocumentNode, ctx: ProcessingContext, contractName: string): boolean;
|
|
7
|
+
handle(event: EventNode, contractNode: DocumentNode, ctx: ProcessingContext, contractName: string): void;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=DocumentUpdateChannelProcessor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DocumentUpdateChannelProcessor.d.ts","sourceRoot":"","sources":["../../src/processors/DocumentUpdateChannelProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAEtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAM9D,qBAAa,8BAA+B,SAAQ,oBAAoB;IACtE,QAAQ,CAAC,YAAY,6BAA6B;IAClD,QAAQ,CAAC,cAAc,gDAAsC;IAE7D,QAAQ,CACN,KAAK,EAAE,SAAS,EAChB,YAAY,EAAE,YAAY,EAC1B,GAAG,EAAE,iBAAiB,EACtB,YAAY,EAAE,MAAM,GACnB,OAAO;IAmBV,MAAM,CACJ,KAAK,EAAE,SAAS,EAChB,YAAY,EAAE,YAAY,EAC1B,GAAG,EAAE,iBAAiB,EACtB,YAAY,EAAE,MAAM,GACnB,IAAI;CAUR"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { EventNode, DocumentNode, ProcessingContext } from '../types';
|
|
2
|
+
import { BaseChannelProcessor } from './BaseChannelProcessor';
|
|
3
|
+
export declare class EmbeddedNodeChannelProcessor extends BaseChannelProcessor {
|
|
4
|
+
readonly contractType = "Embedded Node Channel";
|
|
5
|
+
readonly contractBlueId: "MkKoutP5qxkh3uDxZ7dr6Eo27B7fuxQCS1VAptiCPc2";
|
|
6
|
+
supports(event: EventNode, node: DocumentNode, ctx: ProcessingContext): boolean;
|
|
7
|
+
handle(event: EventNode, node: DocumentNode, ctx: ProcessingContext, path: string): void;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=EmbeddedNodeChannelProcessor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmbeddedNodeChannelProcessor.d.ts","sourceRoot":"","sources":["../../src/processors/EmbeddedNodeChannelProcessor.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAEtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAG9D,qBAAa,4BAA6B,SAAQ,oBAAoB;IACpE,QAAQ,CAAC,YAAY,2BAA2B;IAChD,QAAQ,CAAC,cAAc,gDAAoC;IAE3D,QAAQ,CACN,KAAK,EAAE,SAAS,EAChB,IAAI,EAAE,YAAY,EAClB,GAAG,EAAE,iBAAiB,GACrB,OAAO;IAaV,MAAM,CACJ,KAAK,EAAE,SAAS,EAChB,IAAI,EAAE,YAAY,EAClB,GAAG,EAAE,iBAAiB,EACtB,IAAI,EAAE,MAAM,GACX,IAAI;CAkBR"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { EventNode, DocumentNode, ProcessingContext } from '../types';
|
|
2
|
+
import { BaseChannelProcessor } from './BaseChannelProcessor';
|
|
3
|
+
/**
|
|
4
|
+
* Processes MyOS Agent Events by matching them against MyOS Agent Channel configurations.
|
|
5
|
+
*
|
|
6
|
+
* This processor:
|
|
7
|
+
* - Filters events by agent ID matching
|
|
8
|
+
* - Optionally filters by event pattern using deep containment matching
|
|
9
|
+
* - Emits matched events as channel events
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```typescript
|
|
13
|
+
* // Channel configuration
|
|
14
|
+
* {
|
|
15
|
+
* type: 'MyOS Agent Channel',
|
|
16
|
+
* agent: { agentId: 'agent-123' },
|
|
17
|
+
* event: { type: 'UserAction', payload: { action: 'click' } }
|
|
18
|
+
* }
|
|
19
|
+
*
|
|
20
|
+
* // Matching event
|
|
21
|
+
* {
|
|
22
|
+
* type: 'MyOS Agent Event',
|
|
23
|
+
* agentId: 'agent-123',
|
|
24
|
+
* event: { type: 'UserAction', payload: { action: 'click', target: 'button' } }
|
|
25
|
+
* }
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export declare class MyOSAgentChannelProcessor extends BaseChannelProcessor {
|
|
29
|
+
readonly contractType = "MyOS Agent Channel";
|
|
30
|
+
readonly contractBlueId: "AgentCh4nn3lBlu3Id7dr6Eo2MkKoutP5qxkh3uxQCS1V";
|
|
31
|
+
supports(event: EventNode, node: DocumentNode, ctx: ProcessingContext): boolean;
|
|
32
|
+
handle(event: EventNode, node: DocumentNode, ctx: ProcessingContext, path: string): void;
|
|
33
|
+
/**
|
|
34
|
+
* Parses and validates the event payload and channel configuration
|
|
35
|
+
* @throws {Error} If schema validation fails
|
|
36
|
+
*/
|
|
37
|
+
private parseEventAndChannel;
|
|
38
|
+
/**
|
|
39
|
+
* Checks if the agent IDs match between event and channel
|
|
40
|
+
* @param myosAgentEvent - The parsed agent event
|
|
41
|
+
* @param myosAgentChannel - The parsed agent channel configuration
|
|
42
|
+
* @returns true if both have valid agent IDs and they match
|
|
43
|
+
*/
|
|
44
|
+
private isAgentMatch;
|
|
45
|
+
/**
|
|
46
|
+
* Checks if the event pattern matches the channel's event filter
|
|
47
|
+
*
|
|
48
|
+
* @param myosAgentEvent - The parsed agent event
|
|
49
|
+
* @param myosAgentChannel - The parsed agent channel configuration
|
|
50
|
+
* @param ctx - Processing context for Blue instance access
|
|
51
|
+
* @returns true if the event matches the channel's filter criteria
|
|
52
|
+
*
|
|
53
|
+
* **Matching Logic:**
|
|
54
|
+
* - If no event pattern is specified in channel → matches all events
|
|
55
|
+
* - If channel has event pattern but incoming event has no event data → no match
|
|
56
|
+
* - Otherwise → uses deep containment matching (event must contain all channel pattern fields)
|
|
57
|
+
*/
|
|
58
|
+
private isEventPatternMatch;
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=MyOSAgentChannelProcessor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MyOSAgentChannelProcessor.d.ts","sourceRoot":"","sources":["../../src/processors/MyOSAgentChannelProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAEtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAa9D;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,qBAAa,yBAA0B,SAAQ,oBAAoB;IACjE,QAAQ,CAAC,YAAY,wBAAwB;IAC7C,QAAQ,CAAC,cAAc,kDAAiC;IAExD,QAAQ,CACN,KAAK,EAAE,SAAS,EAChB,IAAI,EAAE,YAAY,EAClB,GAAG,EAAE,iBAAiB,GACrB,OAAO;IAqBV,MAAM,CACJ,KAAK,EAAE,SAAS,EAChB,IAAI,EAAE,YAAY,EAClB,GAAG,EAAE,iBAAiB,EACtB,IAAI,EAAE,MAAM,GACX,IAAI;IAQP;;;OAGG;IACH,OAAO,CAAC,oBAAoB;IAqB5B;;;;;OAKG;IACH,OAAO,CAAC,YAAY;IAcpB;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,mBAAmB;CA8B5B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { EventNode, DocumentNode, ProcessingContext } from '../types';
|
|
2
|
+
import { BaseChannelProcessor } from './BaseChannelProcessor';
|
|
3
|
+
export declare class MyOSTimelineChannelProcessor extends BaseChannelProcessor {
|
|
4
|
+
readonly contractType = "MyOS Timeline Channel";
|
|
5
|
+
readonly contractBlueId: "MkKoutP5qxkh3uDxZ7dr6Eo27B7fuxQCS1VAptiCPc2R";
|
|
6
|
+
supports(event: EventNode, node: DocumentNode, ctx: ProcessingContext): boolean;
|
|
7
|
+
handle(event: EventNode, node: DocumentNode, ctx: ProcessingContext, path: string): void;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=MyOSTimelineChannelProcessor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MyOSTimelineChannelProcessor.d.ts","sourceRoot":"","sources":["../../src/processors/MyOSTimelineChannelProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAEtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAqB9D,qBAAa,4BAA6B,SAAQ,oBAAoB;IACpE,QAAQ,CAAC,YAAY,2BAA2B;IAChD,QAAQ,CAAC,cAAc,iDAAoC;IAE3D,QAAQ,CACN,KAAK,EAAE,SAAS,EAChB,IAAI,EAAE,YAAY,EAClB,GAAG,EAAE,iBAAiB,GACrB,OAAO;IAiCV,MAAM,CACJ,KAAK,EAAE,SAAS,EAChB,IAAI,EAAE,YAAY,EAClB,GAAG,EAAE,iBAAiB,EACtB,IAAI,EAAE,MAAM,GACX,IAAI;CASR"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ContractProcessor, DocumentNode, EventNode, ProcessingContext } from '../types';
|
|
2
|
+
export declare class OperationProcessor implements ContractProcessor {
|
|
3
|
+
readonly contractType = "Operation";
|
|
4
|
+
readonly contractBlueId: "OpKoutP5qxkh3uDxZ7dr6Eo27B7fuxQCS1VAptiCPc2R";
|
|
5
|
+
readonly role = "adapter";
|
|
6
|
+
supports(event: EventNode, node: DocumentNode, ctx: ProcessingContext, contractName: string): boolean;
|
|
7
|
+
handle(event: EventNode, node: DocumentNode, ctx: ProcessingContext, contractName?: string): Promise<void>;
|
|
8
|
+
init(): EventNode[];
|
|
9
|
+
private parseEventPayload;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=OperationProcessor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OperationProcessor.d.ts","sourceRoot":"","sources":["../../src/processors/OperationProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,YAAY,EACZ,SAAS,EACT,iBAAiB,EAClB,MAAM,UAAU,CAAC;AAUlB,qBAAa,kBAAmB,YAAW,iBAAiB;IAC1D,QAAQ,CAAC,YAAY,eAAe;IACpC,QAAQ,CAAC,cAAc,iDAAwB;IAC/C,QAAQ,CAAC,IAAI,aAAa;IAE1B,QAAQ,CACN,KAAK,EAAE,SAAS,EAChB,IAAI,EAAE,YAAY,EAClB,GAAG,EAAE,iBAAiB,EACtB,YAAY,EAAE,MAAM,GACnB,OAAO;IAgBJ,MAAM,CACV,KAAK,EAAE,SAAS,EAChB,IAAI,EAAE,YAAY,EAClB,GAAG,EAAE,iBAAiB,EACtB,YAAY,CAAC,EAAE,MAAM,GACpB,OAAO,CAAC,IAAI,CAAC;IAQhB,IAAI,IAAI,SAAS,EAAE;IAInB,OAAO,CAAC,iBAAiB;CAoB1B"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ContractProcessor, DocumentNode, EventNode, ProcessingContext } from '../types';
|
|
2
|
+
export declare class ProcessEmbeddedProcessor implements ContractProcessor {
|
|
3
|
+
readonly contractType = "Process Embedded";
|
|
4
|
+
readonly role = "adapter";
|
|
5
|
+
readonly contractBlueId: "DxZ7dr6EoMkKoutP5qxkh3u27B7fuxQCS1VAptiCPc2R";
|
|
6
|
+
supports(evt: EventNode): boolean;
|
|
7
|
+
handle(evt: EventNode, node: DocumentNode, ctx: ProcessingContext): void;
|
|
8
|
+
init(): never[];
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=ProcessEmbeddedProcessor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProcessEmbeddedProcessor.d.ts","sourceRoot":"","sources":["../../src/processors/ProcessEmbeddedProcessor.ts"],"names":[],"mappings":"AACA,OAAO,EACL,iBAAiB,EACjB,YAAY,EACZ,SAAS,EACT,iBAAiB,EAClB,MAAM,UAAU,CAAC;AAElB,qBAAa,wBAAyB,YAAW,iBAAiB;IAChE,QAAQ,CAAC,YAAY,sBAAsB;IAC3C,QAAQ,CAAC,IAAI,aAAa;IAC1B,QAAQ,CAAC,cAAc,iDAA+B;IAEtD,QAAQ,CAAC,GAAG,EAAE,SAAS,GAAG,OAAO;IAIjC,MAAM,CAAC,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,YAAY,EAAE,GAAG,EAAE,iBAAiB,GAAG,IAAI;IAaxE,IAAI;CAGL"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { EventNode, DocumentNode, ProcessingContext } from '../types';
|
|
2
|
+
import { SequentialWorkflowProcessor } from './SequentialWorkflowProcessor';
|
|
3
|
+
export declare class SequentialWorkflowOperationProcessor {
|
|
4
|
+
readonly contractType = "Sequential Workflow Operation";
|
|
5
|
+
readonly contractBlueId: "SeqOpKoutP5qxkh3uDxZ7dr6Eo27B7fuxQCS1VAptiC";
|
|
6
|
+
readonly role = "handler";
|
|
7
|
+
private sequentialWorkflowProcessor;
|
|
8
|
+
constructor(sequentialWorkflowProcessor?: SequentialWorkflowProcessor);
|
|
9
|
+
supports(event: EventNode, node: DocumentNode, ctx: ProcessingContext): boolean;
|
|
10
|
+
handle(event: EventNode, node: DocumentNode, context: ProcessingContext, path: string): Promise<void>;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=SequentialWorkflowOperationProcessor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SequentialWorkflowOperationProcessor.d.ts","sourceRoot":"","sources":["../../src/processors/SequentialWorkflowOperationProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AACtE,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAI5E,qBAAa,oCAAoC;IAC/C,QAAQ,CAAC,YAAY,mCAAmC;IACxD,QAAQ,CAAC,cAAc,gDAA4C;IACnE,QAAQ,CAAC,IAAI,aAAa;IAE1B,OAAO,CAAC,2BAA2B,CAA8B;gBAErD,2BAA2B,CAAC,EAAE,2BAA2B;IAKrE,QAAQ,CACN,KAAK,EAAE,SAAS,EAChB,IAAI,EAAE,YAAY,EAClB,GAAG,EAAE,iBAAiB,GACrB,OAAO;IAiBJ,MAAM,CACV,KAAK,EAAE,SAAS,EAChB,IAAI,EAAE,YAAY,EAClB,OAAO,EAAE,iBAAiB,EAC1B,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,IAAI,CAAC;CAWjB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ContractProcessor, EventNode, DocumentNode, ProcessingContext } from '../../types';
|
|
2
|
+
import { WorkflowStepExecutor } from './types';
|
|
3
|
+
export declare class SequentialWorkflowProcessor implements ContractProcessor {
|
|
4
|
+
readonly contractType = "Sequential Workflow";
|
|
5
|
+
readonly contractBlueId: "h3uDxZ7dr6Eo27B7fuxMkKoutP5qxkQCS1VAptiCPc2R";
|
|
6
|
+
readonly role = "handler";
|
|
7
|
+
private executors;
|
|
8
|
+
constructor(executors?: WorkflowStepExecutor[]);
|
|
9
|
+
/** allow registering custom step executors */
|
|
10
|
+
registerExecutor(ex: WorkflowStepExecutor): void;
|
|
11
|
+
supports(event: EventNode, node: DocumentNode, context: ProcessingContext): boolean;
|
|
12
|
+
handle(event: EventNode, node: DocumentNode, context: ProcessingContext, path: string): Promise<void>;
|
|
13
|
+
init(): EventNode[];
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=SequentialWorkflowProcessor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SequentialWorkflowProcessor.d.ts","sourceRoot":"","sources":["../../../src/processors/SequentialWorkflowProcessor/SequentialWorkflowProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,SAAS,EACT,YAAY,EACZ,iBAAiB,EAClB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAY/C,qBAAa,2BAA4B,YAAW,iBAAiB;IACnE,QAAQ,CAAC,YAAY,yBAAyB;IAC9C,QAAQ,CAAC,cAAc,iDAAkC;IACzD,QAAQ,CAAC,IAAI,aAAa;IAE1B,OAAO,CAAC,SAAS,CAA8B;gBAEnC,SAAS,GAAE,oBAAoB,EAAqB;IAIhE,8CAA8C;IAC9C,gBAAgB,CAAC,EAAE,EAAE,oBAAoB;IAIzC,QAAQ,CACN,KAAK,EAAE,SAAS,EAChB,IAAI,EAAE,YAAY,EAClB,OAAO,EAAE,iBAAiB,GACzB,OAAO;IAWJ,MAAM,CACV,KAAK,EAAE,SAAS,EAChB,IAAI,EAAE,YAAY,EAClB,OAAO,EAAE,iBAAiB,EAC1B,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,IAAI,CAAC;IAiChB,IAAI,IAAI,SAAS,EAAE;CAGpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/processors/SequentialWorkflowProcessor/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DocumentNode, EventNode, ProcessingContext } from '../../../types';
|
|
2
|
+
import { WorkflowStepExecutor } from '../types';
|
|
3
|
+
export declare class JavaScriptCodeExecutor implements WorkflowStepExecutor {
|
|
4
|
+
readonly stepType = "JavaScript Code";
|
|
5
|
+
supports(node: DocumentNode): boolean;
|
|
6
|
+
execute(step: DocumentNode, evt: EventNode, ctx: ProcessingContext, documentPath: string, stepResults: Record<string, unknown>): Promise<unknown>;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=JavaScriptCodeExecutor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JavaScriptCodeExecutor.d.ts","sourceRoot":"","sources":["../../../../src/processors/SequentialWorkflowProcessor/steps/JavaScriptCodeExecutor.ts"],"names":[],"mappings":"AACA,OAAO,EACL,YAAY,EACZ,SAAS,EAET,iBAAiB,EAClB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAUhD,qBAAa,sBAAuB,YAAW,oBAAoB;IACjE,QAAQ,CAAC,QAAQ,qBAAqB;IAEtC,QAAQ,CAAC,IAAI,EAAE,YAAY;IAIrB,OAAO,CACX,IAAI,EAAE,YAAY,EAClB,GAAG,EAAE,SAAS,EACd,GAAG,EAAE,iBAAiB,EACtB,YAAY,EAAE,MAAM,EACpB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACnC,OAAO,CAAC,OAAO,CAAC;CAsCpB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { EventNode, ProcessingContext, DocumentNode } from '../../../types';
|
|
2
|
+
import { WorkflowStepExecutor } from '../types';
|
|
3
|
+
export declare class TriggerEventExecutor implements WorkflowStepExecutor {
|
|
4
|
+
readonly stepType = "Trigger Event";
|
|
5
|
+
supports(node: DocumentNode): boolean;
|
|
6
|
+
execute(step: DocumentNode, event: EventNode, ctx: ProcessingContext): Promise<void>;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=TriggerEventExecutor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TriggerEventExecutor.d.ts","sourceRoot":"","sources":["../../../../src/processors/SequentialWorkflowProcessor/steps/TriggerEventExecutor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAoB,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAChF,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAGhD,qBAAa,oBAAqB,YAAW,oBAAoB;IAC/D,QAAQ,CAAC,QAAQ,mBAAmB;IAEpC,QAAQ,CAAC,IAAI,EAAE,YAAY;IAIrB,OAAO,CACX,IAAI,EAAE,YAAY,EAClB,KAAK,EAAE,SAAS,EAChB,GAAG,EAAE,iBAAiB,GACrB,OAAO,CAAC,IAAI,CAAC;CAkBjB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DocumentNode, EventNode, ProcessingContext } from '../../../types';
|
|
2
|
+
import { WorkflowStepExecutor } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Executor for "Update Document" workflow steps
|
|
5
|
+
*/
|
|
6
|
+
export declare class UpdateDocumentExecutor implements WorkflowStepExecutor {
|
|
7
|
+
readonly stepType = "Update Document";
|
|
8
|
+
supports(node: DocumentNode): boolean;
|
|
9
|
+
private evaluateChangeValue;
|
|
10
|
+
execute(step: DocumentNode, event: EventNode, ctx: ProcessingContext, documentPath: string, stepResults: Record<string, unknown>): Promise<void>;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=UpdateDocumentExecutor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UpdateDocumentExecutor.d.ts","sourceRoot":"","sources":["../../../../src/processors/SequentialWorkflowProcessor/steps/UpdateDocumentExecutor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAOhD;;GAEG;AACH,qBAAa,sBAAuB,YAAW,oBAAoB;IACjE,QAAQ,CAAC,QAAQ,qBAAqB;IAEtC,QAAQ,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO;YAIvB,mBAAmB;IA6B3B,OAAO,CACX,IAAI,EAAE,YAAY,EAClB,KAAK,EAAE,SAAS,EAChB,GAAG,EAAE,iBAAiB,EACtB,YAAY,EAAE,MAAM,EACpB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACnC,OAAO,CAAC,IAAI,CAAC;CA8CjB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DocumentNode, EventNode, ProcessingContext } from '../../types';
|
|
2
|
+
export interface WorkflowStepExecutor {
|
|
3
|
+
readonly stepType: string;
|
|
4
|
+
supports(step: DocumentNode): boolean;
|
|
5
|
+
execute(step: DocumentNode, event: EventNode, ctx: ProcessingContext, documentPath: string, steps?: Record<string, unknown>): Promise<unknown>;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/processors/SequentialWorkflowProcessor/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEzE,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC;IACtC,OAAO,CACL,IAAI,EAAE,YAAY,EAClB,KAAK,EAAE,SAAS,EAChB,GAAG,EAAE,iBAAiB,EACtB,YAAY,EAAE,MAAM,EACpB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC9B,OAAO,CAAC,OAAO,CAAC,CAAC;CACrB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ProcessingContext, EventNode } from '../../../types';
|
|
2
|
+
import { VMBindings } from './ExpressionEvaluator';
|
|
3
|
+
/**
|
|
4
|
+
* Factory for creating standardized bindings for ExpressionEvaluator.evaluate
|
|
5
|
+
*/
|
|
6
|
+
export declare class BindingsFactory {
|
|
7
|
+
/**
|
|
8
|
+
* Creates standard bindings for workflow step execution
|
|
9
|
+
*/
|
|
10
|
+
static createStandardBindings(ctx: ProcessingContext, event: EventNode, stepResults: Record<string, unknown>): VMBindings;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=BindingsFactory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BindingsFactory.d.ts","sourceRoot":"","sources":["../../../../src/processors/SequentialWorkflowProcessor/utils/BindingsFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAInD;;GAEG;AACH,qBAAa,eAAe;IAC1B;;OAEG;IACH,MAAM,CAAC,sBAAsB,CAC3B,GAAG,EAAE,iBAAiB,EACtB,KAAK,EAAE,SAAS,EAChB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACnC,UAAU;CAkBd"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { ProcessingContext } from '../../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Bindings that will be available inside the VM
|
|
4
|
+
*/
|
|
5
|
+
export interface VMBindings {
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
document?: (path: string) => unknown;
|
|
8
|
+
event?: unknown;
|
|
9
|
+
steps?: Record<string, unknown>;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* ExpressionEvaluator - Evaluates JavaScript code and expressions securely
|
|
13
|
+
*
|
|
14
|
+
* Features:
|
|
15
|
+
* - Plain expressions and code blocks evaluation
|
|
16
|
+
* - Support for ES modules with static import/export
|
|
17
|
+
* - Support for "blue:<blueId>" module specifiers
|
|
18
|
+
* - Support for HTTP/HTTPS URLs for external modules
|
|
19
|
+
*/
|
|
20
|
+
export declare class ExpressionEvaluator {
|
|
21
|
+
/**
|
|
22
|
+
* Main evaluation method - chooses between secure and simple evaluation strategies
|
|
23
|
+
*/
|
|
24
|
+
static evaluate({ code, ctx, bindings, options, }: {
|
|
25
|
+
code: string;
|
|
26
|
+
ctx: ProcessingContext;
|
|
27
|
+
bindings?: VMBindings;
|
|
28
|
+
options?: {
|
|
29
|
+
isCodeBlock?: boolean;
|
|
30
|
+
timeout?: number;
|
|
31
|
+
};
|
|
32
|
+
}): Promise<unknown>;
|
|
33
|
+
/**
|
|
34
|
+
* Fallback evaluation using Node's Function constructor
|
|
35
|
+
* Used when isolated-vm is not available
|
|
36
|
+
*/
|
|
37
|
+
private static evaluateSimple;
|
|
38
|
+
/**
|
|
39
|
+
* Secure evaluation using isolated-vm with support for ES modules
|
|
40
|
+
*/
|
|
41
|
+
private static evaluateSecure;
|
|
42
|
+
/**
|
|
43
|
+
* Setup the isolated VM environment with necessary host functions and data
|
|
44
|
+
*/
|
|
45
|
+
private static setupIsolateEnvironment;
|
|
46
|
+
/**
|
|
47
|
+
* Create module resolver function for handling imports
|
|
48
|
+
*/
|
|
49
|
+
private static createModuleResolver;
|
|
50
|
+
/**
|
|
51
|
+
* Evaluate code as a simple script (no imports/exports)
|
|
52
|
+
*/
|
|
53
|
+
private static evaluateSimpleScript;
|
|
54
|
+
/**
|
|
55
|
+
* Evaluate code as an ES module with import/export support
|
|
56
|
+
*/
|
|
57
|
+
private static evaluateESModule;
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=ExpressionEvaluator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpressionEvaluator.d.ts","sourceRoot":"","sources":["../../../../src/processors/SequentialWorkflowProcessor/utils/ExpressionEvaluator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AASnD;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;IACrC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjC;AAuBD;;;;;;;;GAQG;AACH,qBAAa,mBAAmB;IAC9B;;OAEG;WACU,QAAQ,CAAC,EACpB,IAAI,EACJ,GAAG,EACH,QAAa,EACb,OAAY,GACb,EAAE;QACD,IAAI,EAAE,MAAM,CAAC;QACb,GAAG,EAAE,iBAAiB,CAAC;QACvB,QAAQ,CAAC,EAAE,UAAU,CAAC;QACtB,OAAO,CAAC,EAAE;YAAE,WAAW,CAAC,EAAE,OAAO,CAAC;YAAC,OAAO,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;KACvD,GAAG,OAAO,CAAC,OAAO,CAAC;IAOpB;;;OAGG;mBACkB,cAAc;IAqCnC;;OAEG;mBACkB,cAAc;IAqDnC;;OAEG;mBACkB,uBAAuB;IAuB5C;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,oBAAoB;IAqDnC;;OAEG;mBACkB,oBAAoB;IAwBzC;;OAEG;mBACkB,gBAAgB;CA0CtC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { EventNode, DocumentNode, ProcessingContext } from '../types';
|
|
2
|
+
import { BaseChannelProcessor } from './BaseChannelProcessor';
|
|
3
|
+
export declare class TimelineChannelProcessor extends BaseChannelProcessor {
|
|
4
|
+
readonly contractType = "Timeline Channel";
|
|
5
|
+
readonly contractBlueId: "RMkKoutP5qxkh3uDxZ7dr6Eo27B7fuxQCS1VAptiCPc2";
|
|
6
|
+
supports(event: EventNode, node: DocumentNode, ctx: ProcessingContext): boolean;
|
|
7
|
+
handle(event: EventNode, node: DocumentNode, ctx: ProcessingContext, path: string): void;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=TimelineChannelProcessor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TimelineChannelProcessor.d.ts","sourceRoot":"","sources":["../../src/processors/TimelineChannelProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAEtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAgB9D,qBAAa,wBAAyB,SAAQ,oBAAoB;IAChE,QAAQ,CAAC,YAAY,sBAAsB;IAC3C,QAAQ,CAAC,cAAc,iDAA+B;IAEtD,QAAQ,CACN,KAAK,EAAE,SAAS,EAChB,IAAI,EAAE,YAAY,EAClB,GAAG,EAAE,iBAAiB,GACrB,OAAO;IAuBV,MAAM,CACJ,KAAK,EAAE,SAAS,EAChB,IAAI,EAAE,YAAY,EAClB,GAAG,EAAE,iBAAiB,EACtB,IAAI,EAAE,MAAM,GACX,IAAI;CASR"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from './ChannelEventCheckpointProcessor';
|
|
2
|
+
export * from './CompositeTimelineChannelProcessor';
|
|
3
|
+
export * from './DocumentUpdateChannelProcessor';
|
|
4
|
+
export * from './EmbeddedNodeChannelProcessor';
|
|
5
|
+
export * from './MyOSTimelineChannelProcessor';
|
|
6
|
+
export * from './MyOSAgentChannelProcessor';
|
|
7
|
+
export * from './OperationProcessor';
|
|
8
|
+
export * from './ProcessEmbeddedProcessor';
|
|
9
|
+
export * from './SequentialWorkflowOperationProcessor';
|
|
10
|
+
export * from './TimelineChannelProcessor';
|
|
11
|
+
export * from './SequentialWorkflowProcessor';
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/processors/index.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC;AAClD,cAAc,qCAAqC,CAAC;AACpD,cAAc,kCAAkC,CAAC;AACjD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wCAAwC,CAAC;AACvD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,+BAA+B,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Task } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Creates a task key for prioritization in the queue
|
|
4
|
+
*
|
|
5
|
+
* @param depth - Node depth in document (negated for priority)
|
|
6
|
+
* @param eventSeq - Event sequence number for causal ordering
|
|
7
|
+
* @param contractTypePriority - Priority based on contract type
|
|
8
|
+
* @param contractOrder - Priority specified on the contract
|
|
9
|
+
* @param contractName - Contract name for deterministic sorting
|
|
10
|
+
* @param taskId - Sequence number for preserving insertion order
|
|
11
|
+
* @returns Task key tuple for sorting
|
|
12
|
+
*/
|
|
13
|
+
export declare const makeTaskKey: (depth: number, eventSeq: number, contractTypePriority: number, contractOrder: number, contractName: string, taskId: number) => Task["key"];
|
|
14
|
+
/**
|
|
15
|
+
* Compares two tasks for sorting
|
|
16
|
+
*
|
|
17
|
+
* @param a - First task
|
|
18
|
+
* @param b - Second task
|
|
19
|
+
* @returns Negative if a < b, positive if a > b, 0 if equal
|
|
20
|
+
*/
|
|
21
|
+
export declare const compareTasks: (a: Task, b: Task) => number;
|
|
22
|
+
//# sourceMappingURL=TaskKey.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TaskKey.d.ts","sourceRoot":"","sources":["../../src/queue/TaskKey.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW,UACf,MAAM,YACH,MAAM,wBACM,MAAM,iBACb,MAAM,gBACP,MAAM,UACZ,MAAM,KACb,IAAI,CAAC,KAAK,CAOZ,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,MAAO,IAAI,KAAK,IAAI,KAAG,MAe/C,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Task } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Priority queue for tasks with deterministic ordering
|
|
4
|
+
*
|
|
5
|
+
* Wraps TinyQueue to provide a consistent interface for
|
|
6
|
+
* managing prioritized tasks in the document processor.
|
|
7
|
+
*/
|
|
8
|
+
export declare class TaskQueue {
|
|
9
|
+
private readonly queue;
|
|
10
|
+
/**
|
|
11
|
+
* Creates a new task queue with the task key comparator
|
|
12
|
+
*/
|
|
13
|
+
constructor();
|
|
14
|
+
/**
|
|
15
|
+
* Adds a task to the queue
|
|
16
|
+
*
|
|
17
|
+
* @param task - The task to add
|
|
18
|
+
*/
|
|
19
|
+
push(task: Task): void;
|
|
20
|
+
/**
|
|
21
|
+
* Removes and returns the highest priority task
|
|
22
|
+
*
|
|
23
|
+
* @returns The highest priority task or undefined if queue is empty
|
|
24
|
+
*/
|
|
25
|
+
pop(): Task | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Gets the number of tasks in the queue
|
|
28
|
+
*/
|
|
29
|
+
get length(): number;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=TaskQueue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TaskQueue.d.ts","sourceRoot":"","sources":["../../src/queue/TaskQueue.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAGhC;;;;;GAKG;AACH,qBAAa,SAAS;IACpB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAkB;IAExC;;OAEG;;IAKH;;;;OAIG;IACH,IAAI,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI;IAItB;;;;OAIG;IACH,GAAG,IAAI,IAAI,GAAG,SAAS;IAIvB;;OAEG;IACH,IAAI,MAAM,IAAI,MAAM,CAEnB;CACF"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { BlueNode } from '@blue-labs/language';
|
|
2
|
+
import { ContractProcessor } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Registry for contract processors with type ordering
|
|
5
|
+
*
|
|
6
|
+
* Manages the registration and lookup of contract processors
|
|
7
|
+
* while preserving order information for execution priority.
|
|
8
|
+
*/
|
|
9
|
+
export declare class ContractRegistry {
|
|
10
|
+
private readonly processors;
|
|
11
|
+
private readonly typeOrder;
|
|
12
|
+
/**
|
|
13
|
+
* Creates a new contract registry
|
|
14
|
+
*
|
|
15
|
+
* @param list - Initial list of processors to register
|
|
16
|
+
*/
|
|
17
|
+
constructor(list?: ContractProcessor[]);
|
|
18
|
+
/**
|
|
19
|
+
* Registers a new contract processor
|
|
20
|
+
*
|
|
21
|
+
* @param proc - The processor to register
|
|
22
|
+
* @param orderHint - Optional priority value for execution order
|
|
23
|
+
* @throws Error if a processor for the same contract type is already registered
|
|
24
|
+
*/
|
|
25
|
+
register(proc: ContractProcessor, orderHint?: number): void;
|
|
26
|
+
/**
|
|
27
|
+
* Gets a processor by contract type node
|
|
28
|
+
*
|
|
29
|
+
* @param typeNode - The contract type node
|
|
30
|
+
* @returns The associated processor or undefined
|
|
31
|
+
*/
|
|
32
|
+
get(typeNode?: BlueNode): ContractProcessor | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* Gets the order priority for a contract type node
|
|
35
|
+
*
|
|
36
|
+
* @param typeNode - The contract type node
|
|
37
|
+
* @returns The priority value (0 if not found)
|
|
38
|
+
*/
|
|
39
|
+
orderOf(typeNode?: BlueNode): number;
|
|
40
|
+
/**
|
|
41
|
+
* Gets all registered processors
|
|
42
|
+
*
|
|
43
|
+
* @returns Iterator of all registered processors
|
|
44
|
+
*/
|
|
45
|
+
values(): IterableIterator<ContractProcessor>;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=ContractRegistry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContractRegistry.d.ts","sourceRoot":"","sources":["../../src/registry/ContractRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C;;;;;GAKG;AACH,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAwC;IACnE,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA6B;IAEvD;;;;OAIG;gBACS,IAAI,GAAE,iBAAiB,EAAO;IAI1C;;;;;;OAMG;IACH,QAAQ,CAAC,IAAI,EAAE,iBAAiB,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI;IAU3D;;;;;OAKG;IACH,GAAG,CAAC,QAAQ,CAAC,EAAE,QAAQ,GAAG,iBAAiB,GAAG,SAAS;IAOvD;;;;;OAKG;IACH,OAAO,CAAC,QAAQ,CAAC,EAAE,QAAQ,GAAG,MAAM;IAOpC;;;;OAIG;IACH,MAAM,IAAI,gBAAgB,CAAC,iBAAiB,CAAC;CAG9C"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare const blueIds: {
|
|
2
|
+
readonly Channel: "2RMkKoutP5qxkh3uDxZ7dr6Eo27B7fuxQCS1VAptiCPc";
|
|
3
|
+
readonly 'Timeline Channel': "RMkKoutP5qxkh3uDxZ7dr6Eo27B7fuxQCS1VAptiCPc2";
|
|
4
|
+
readonly 'Composite Timeline Channel': "qxkh3uMkKoutP5DxZ7dr6Eo27B7fuxQCS1VAptiCPc2R";
|
|
5
|
+
readonly 'MyOS Timeline Channel': "MkKoutP5qxkh3uDxZ7dr6Eo27B7fuxQCS1VAptiCPc2R";
|
|
6
|
+
readonly 'Sequential Workflow': "h3uDxZ7dr6Eo27B7fuxMkKoutP5qxkQCS1VAptiCPc2R";
|
|
7
|
+
readonly 'Sequential Workflow Step': "6EoMkKoutP5DxZ7drqxkh3u27B7fuxQCS1VAptiCPc2R";
|
|
8
|
+
readonly 'Process Embedded': "DxZ7dr6EoMkKoutP5qxkh3u27B7fuxQCS1VAptiCPc2R";
|
|
9
|
+
readonly 'Embedded Node Channel': "MkKoutP5qxkh3uDxZ7dr6Eo27B7fuxQCS1VAptiCPc2";
|
|
10
|
+
readonly 'Document Update Channel': "MkKoutP5qxkh3uDQCS1VAptiCPc2xZ7dr6Eo27B7fux";
|
|
11
|
+
readonly 'Channel Event Checkpoint': "o27B7fuxMkKoutPh3uDxZ7dr6E5qxkQCS1VAptiCPc2R";
|
|
12
|
+
readonly 'Update Document': "7fuxMkKoutPh3uDxZ7dr6E5qxkQCS1VAptiCPc2R";
|
|
13
|
+
readonly 'Trigger Event': "kQCS1VAp7fuxMkKoutPh3uDxZ7dr6E5qxtiCPc2R";
|
|
14
|
+
readonly 'Json Patch Entry': "EnUQeMiMa2wHFW3JbeSPvdgfpL6qZYCR29m3SfeHsKSY";
|
|
15
|
+
readonly 'JavaScript Code': "MkKoutPDxZ7dr6Eo5qxkh3u27B7fuxQCS1VAptiCPc2R";
|
|
16
|
+
readonly 'Timeline Entry': "uDxZ7dr6Eo27B7fMkKoutP5qxkh3uxQCS1VAptiCPc2R";
|
|
17
|
+
readonly Operation: "OpKoutP5qxkh3uDxZ7dr6Eo27B7fuxQCS1VAptiCPc2R";
|
|
18
|
+
readonly 'Sequential Workflow Operation': "SeqOpKoutP5qxkh3uDxZ7dr6Eo27B7fuxQCS1VAptiC";
|
|
19
|
+
readonly 'Operation Request': "OpReqKoutP5qxkh3uDxZ7dr6Eo27B7fuxQCS1VAptiC";
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/repo/core/blue-ids/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;CAoBV,CAAC"}
|