@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,101 @@
|
|
|
1
|
+
import { BlueRepository } from '@blue-labs/language';
|
|
2
|
+
export * from './schema';
|
|
3
|
+
export { blueIds } from './blue-ids';
|
|
4
|
+
export declare const allSchemas: (import('zod').ZodObject<import("zod").objectUtil.extendShape<import("zod").objectUtil.extendShape<{
|
|
5
|
+
name: import('zod').ZodOptional<import('zod').ZodString>;
|
|
6
|
+
description: import('zod').ZodOptional<import('zod').ZodString>;
|
|
7
|
+
}, {
|
|
8
|
+
timelineId: import('zod').ZodOptional<import('zod').ZodString>;
|
|
9
|
+
}>, {
|
|
10
|
+
account: import('zod').ZodOptional<import('zod').ZodString>;
|
|
11
|
+
email: import('zod').ZodOptional<import('zod').ZodString>;
|
|
12
|
+
}>, "strip", import('zod').ZodTypeAny, {
|
|
13
|
+
name?: string | undefined;
|
|
14
|
+
description?: string | undefined;
|
|
15
|
+
timelineId?: string | undefined;
|
|
16
|
+
account?: string | undefined;
|
|
17
|
+
email?: string | undefined;
|
|
18
|
+
}, {
|
|
19
|
+
name?: string | undefined;
|
|
20
|
+
description?: string | undefined;
|
|
21
|
+
timelineId?: string | undefined;
|
|
22
|
+
account?: string | undefined;
|
|
23
|
+
email?: string | undefined;
|
|
24
|
+
}> | import('zod').ZodObject<import("zod").objectUtil.extendShape<{
|
|
25
|
+
timelineId: import('zod').ZodOptional<import('zod').ZodString>;
|
|
26
|
+
timelinePrev: import('zod').ZodOptional<import('zod').ZodString>;
|
|
27
|
+
thread: import('zod').ZodOptional<import('zod').ZodString>;
|
|
28
|
+
threadPrev: import('zod').ZodOptional<import('zod').ZodString>;
|
|
29
|
+
message: import('zod').ZodOptional<import('zod').ZodType<import('@blue-labs/language').BlueNode, import('zod').ZodTypeDef, import('@blue-labs/language').BlueNode>>;
|
|
30
|
+
signature: import('zod').ZodOptional<import('zod').ZodString>;
|
|
31
|
+
}, {
|
|
32
|
+
account: import('zod').ZodOptional<import('zod').ZodString>;
|
|
33
|
+
email: import('zod').ZodOptional<import('zod').ZodString>;
|
|
34
|
+
}>, "strip", import('zod').ZodTypeAny, {
|
|
35
|
+
message?: import('@blue-labs/language').BlueNode | undefined;
|
|
36
|
+
timelineId?: string | undefined;
|
|
37
|
+
timelinePrev?: string | undefined;
|
|
38
|
+
thread?: string | undefined;
|
|
39
|
+
threadPrev?: string | undefined;
|
|
40
|
+
signature?: string | undefined;
|
|
41
|
+
account?: string | undefined;
|
|
42
|
+
email?: string | undefined;
|
|
43
|
+
}, {
|
|
44
|
+
message?: import('@blue-labs/language').BlueNode | undefined;
|
|
45
|
+
timelineId?: string | undefined;
|
|
46
|
+
timelinePrev?: string | undefined;
|
|
47
|
+
thread?: string | undefined;
|
|
48
|
+
threadPrev?: string | undefined;
|
|
49
|
+
signature?: string | undefined;
|
|
50
|
+
account?: string | undefined;
|
|
51
|
+
email?: string | undefined;
|
|
52
|
+
}> | import('zod').ZodObject<{
|
|
53
|
+
agentId: import('zod').ZodOptional<import('zod').ZodString>;
|
|
54
|
+
}, "strip", import('zod').ZodTypeAny, {
|
|
55
|
+
agentId?: string | undefined;
|
|
56
|
+
}, {
|
|
57
|
+
agentId?: string | undefined;
|
|
58
|
+
}> | import('zod').ZodObject<import("zod").objectUtil.extendShape<{
|
|
59
|
+
name: import('zod').ZodOptional<import('zod').ZodString>;
|
|
60
|
+
description: import('zod').ZodOptional<import('zod').ZodString>;
|
|
61
|
+
}, {
|
|
62
|
+
agent: import('zod').ZodOptional<import('zod').ZodObject<{
|
|
63
|
+
agentId: import('zod').ZodOptional<import('zod').ZodString>;
|
|
64
|
+
}, "strip", import('zod').ZodTypeAny, {
|
|
65
|
+
agentId?: string | undefined;
|
|
66
|
+
}, {
|
|
67
|
+
agentId?: string | undefined;
|
|
68
|
+
}>>;
|
|
69
|
+
event: import('zod').ZodOptional<import('zod').ZodType<import('@blue-labs/language').BlueNode, import('zod').ZodTypeDef, import('@blue-labs/language').BlueNode>>;
|
|
70
|
+
}>, "strip", import('zod').ZodTypeAny, {
|
|
71
|
+
event?: import('@blue-labs/language').BlueNode | undefined;
|
|
72
|
+
name?: string | undefined;
|
|
73
|
+
description?: string | undefined;
|
|
74
|
+
agent?: {
|
|
75
|
+
agentId?: string | undefined;
|
|
76
|
+
} | undefined;
|
|
77
|
+
}, {
|
|
78
|
+
event?: import('@blue-labs/language').BlueNode | undefined;
|
|
79
|
+
name?: string | undefined;
|
|
80
|
+
description?: string | undefined;
|
|
81
|
+
agent?: {
|
|
82
|
+
agentId?: string | undefined;
|
|
83
|
+
} | undefined;
|
|
84
|
+
}> | import('zod').ZodObject<{
|
|
85
|
+
agentId: import('zod').ZodOptional<import('zod').ZodString>;
|
|
86
|
+
id: import('zod').ZodOptional<import('zod').ZodNumber>;
|
|
87
|
+
timestamp: import('zod').ZodOptional<import('zod').ZodNumber>;
|
|
88
|
+
event: import('zod').ZodOptional<import('zod').ZodType<import('@blue-labs/language').BlueNode, import('zod').ZodTypeDef, import('@blue-labs/language').BlueNode>>;
|
|
89
|
+
}, "strip", import('zod').ZodTypeAny, {
|
|
90
|
+
event?: import('@blue-labs/language').BlueNode | undefined;
|
|
91
|
+
agentId?: string | undefined;
|
|
92
|
+
id?: number | undefined;
|
|
93
|
+
timestamp?: number | undefined;
|
|
94
|
+
}, {
|
|
95
|
+
event?: import('@blue-labs/language').BlueNode | undefined;
|
|
96
|
+
agentId?: string | undefined;
|
|
97
|
+
id?: number | undefined;
|
|
98
|
+
timestamp?: number | undefined;
|
|
99
|
+
}>)[];
|
|
100
|
+
export declare const repository: BlueRepository;
|
|
101
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/repo/myos/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAIrD,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAAyB,CAAC;AAEjD,eAAO,MAAM,UAAU,EAAE,cAGxB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const MyOSAgentSchema: z.ZodObject<{
|
|
3
|
+
agentId: z.ZodOptional<z.ZodString>;
|
|
4
|
+
}, "strip", z.ZodTypeAny, {
|
|
5
|
+
agentId?: string | undefined;
|
|
6
|
+
}, {
|
|
7
|
+
agentId?: string | undefined;
|
|
8
|
+
}>;
|
|
9
|
+
export type MyOSAgent = z.infer<typeof MyOSAgentSchema>;
|
|
10
|
+
//# sourceMappingURL=MyOSAgent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MyOSAgent.d.ts","sourceRoot":"","sources":["../../../../src/repo/myos/schema/MyOSAgent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,eAAe;;;;;;EAI3B,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const MyOSAgentChannelSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
3
|
+
name: z.ZodOptional<z.ZodString>;
|
|
4
|
+
description: z.ZodOptional<z.ZodString>;
|
|
5
|
+
}, {
|
|
6
|
+
agent: z.ZodOptional<z.ZodObject<{
|
|
7
|
+
agentId: z.ZodOptional<z.ZodString>;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
agentId?: string | undefined;
|
|
10
|
+
}, {
|
|
11
|
+
agentId?: string | undefined;
|
|
12
|
+
}>>;
|
|
13
|
+
event: z.ZodOptional<z.ZodType<import('@blue-labs/language').BlueNode, z.ZodTypeDef, import('@blue-labs/language').BlueNode>>;
|
|
14
|
+
}>, "strip", z.ZodTypeAny, {
|
|
15
|
+
event?: import('@blue-labs/language').BlueNode | undefined;
|
|
16
|
+
name?: string | undefined;
|
|
17
|
+
description?: string | undefined;
|
|
18
|
+
agent?: {
|
|
19
|
+
agentId?: string | undefined;
|
|
20
|
+
} | undefined;
|
|
21
|
+
}, {
|
|
22
|
+
event?: import('@blue-labs/language').BlueNode | undefined;
|
|
23
|
+
name?: string | undefined;
|
|
24
|
+
description?: string | undefined;
|
|
25
|
+
agent?: {
|
|
26
|
+
agentId?: string | undefined;
|
|
27
|
+
} | undefined;
|
|
28
|
+
}>;
|
|
29
|
+
export type MyOSAgentChannel = z.infer<typeof MyOSAgentChannelSchema>;
|
|
30
|
+
//# sourceMappingURL=MyOSAgentChannel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MyOSAgentChannel.d.ts","sourceRoot":"","sources":["../../../../src/repo/myos/schema/MyOSAgentChannel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;EAOlC,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const MyOSAgentEventSchema: z.ZodObject<{
|
|
3
|
+
agentId: z.ZodOptional<z.ZodString>;
|
|
4
|
+
id: z.ZodOptional<z.ZodNumber>;
|
|
5
|
+
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
6
|
+
event: z.ZodOptional<z.ZodType<import('@blue-labs/language').BlueNode, z.ZodTypeDef, import('@blue-labs/language').BlueNode>>;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
event?: import('@blue-labs/language').BlueNode | undefined;
|
|
9
|
+
agentId?: string | undefined;
|
|
10
|
+
id?: number | undefined;
|
|
11
|
+
timestamp?: number | undefined;
|
|
12
|
+
}, {
|
|
13
|
+
event?: import('@blue-labs/language').BlueNode | undefined;
|
|
14
|
+
agentId?: string | undefined;
|
|
15
|
+
id?: number | undefined;
|
|
16
|
+
timestamp?: number | undefined;
|
|
17
|
+
}>;
|
|
18
|
+
export type MyOSAgentEvent = z.infer<typeof MyOSAgentEventSchema>;
|
|
19
|
+
//# sourceMappingURL=MyOSAgentEvent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MyOSAgentEvent.d.ts","sourceRoot":"","sources":["../../../../src/repo/myos/schema/MyOSAgentEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;EAOhC,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const MyOSTimelineChannelSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
3
|
+
name: z.ZodOptional<z.ZodString>;
|
|
4
|
+
description: z.ZodOptional<z.ZodString>;
|
|
5
|
+
}, {
|
|
6
|
+
timelineId: z.ZodOptional<z.ZodString>;
|
|
7
|
+
}>, {
|
|
8
|
+
account: z.ZodOptional<z.ZodString>;
|
|
9
|
+
email: z.ZodOptional<z.ZodString>;
|
|
10
|
+
}>, "strip", z.ZodTypeAny, {
|
|
11
|
+
name?: string | undefined;
|
|
12
|
+
description?: string | undefined;
|
|
13
|
+
timelineId?: string | undefined;
|
|
14
|
+
account?: string | undefined;
|
|
15
|
+
email?: string | undefined;
|
|
16
|
+
}, {
|
|
17
|
+
name?: string | undefined;
|
|
18
|
+
description?: string | undefined;
|
|
19
|
+
timelineId?: string | undefined;
|
|
20
|
+
account?: string | undefined;
|
|
21
|
+
email?: string | undefined;
|
|
22
|
+
}>;
|
|
23
|
+
export type MyOSTimelineChannel = z.infer<typeof MyOSTimelineChannelSchema>;
|
|
24
|
+
//# sourceMappingURL=MyOSTimelineChannel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MyOSTimelineChannel.d.ts","sourceRoot":"","sources":["../../../../src/repo/myos/schema/MyOSTimelineChannel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;EAOrC,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const MyOSTimelineEntrySchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
3
|
+
timelineId: z.ZodOptional<z.ZodString>;
|
|
4
|
+
timelinePrev: z.ZodOptional<z.ZodString>;
|
|
5
|
+
thread: z.ZodOptional<z.ZodString>;
|
|
6
|
+
threadPrev: z.ZodOptional<z.ZodString>;
|
|
7
|
+
message: z.ZodOptional<z.ZodType<import('@blue-labs/language').BlueNode, z.ZodTypeDef, import('@blue-labs/language').BlueNode>>;
|
|
8
|
+
signature: z.ZodOptional<z.ZodString>;
|
|
9
|
+
}, {
|
|
10
|
+
account: z.ZodOptional<z.ZodString>;
|
|
11
|
+
email: z.ZodOptional<z.ZodString>;
|
|
12
|
+
}>, "strip", z.ZodTypeAny, {
|
|
13
|
+
message?: import('@blue-labs/language').BlueNode | undefined;
|
|
14
|
+
timelineId?: string | undefined;
|
|
15
|
+
timelinePrev?: string | undefined;
|
|
16
|
+
thread?: string | undefined;
|
|
17
|
+
threadPrev?: string | undefined;
|
|
18
|
+
signature?: string | undefined;
|
|
19
|
+
account?: string | undefined;
|
|
20
|
+
email?: string | undefined;
|
|
21
|
+
}, {
|
|
22
|
+
message?: import('@blue-labs/language').BlueNode | undefined;
|
|
23
|
+
timelineId?: string | undefined;
|
|
24
|
+
timelinePrev?: string | undefined;
|
|
25
|
+
thread?: string | undefined;
|
|
26
|
+
threadPrev?: string | undefined;
|
|
27
|
+
signature?: string | undefined;
|
|
28
|
+
account?: string | undefined;
|
|
29
|
+
email?: string | undefined;
|
|
30
|
+
}>;
|
|
31
|
+
export type MyOSTimelineEntry = z.infer<typeof MyOSTimelineEntrySchema>;
|
|
32
|
+
//# sourceMappingURL=MyOSTimelineEntry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MyOSTimelineEntry.d.ts","sourceRoot":"","sources":["../../../../src/repo/myos/schema/MyOSTimelineEntry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOnC,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/repo/myos/schema/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { DocumentNode, EventNode } from '../types';
|
|
2
|
+
import { TaskQueue } from '../queue/TaskQueue';
|
|
3
|
+
import { ContractRegistry } from '../registry/ContractRegistry';
|
|
4
|
+
import { Blue } from '@blue-labs/language';
|
|
5
|
+
/**
|
|
6
|
+
* Routes events to matching contracts in the document tree
|
|
7
|
+
*/
|
|
8
|
+
export declare class EventRouter {
|
|
9
|
+
private readonly blue;
|
|
10
|
+
private readonly registry;
|
|
11
|
+
private readonly queue;
|
|
12
|
+
private readonly getNextTaskId;
|
|
13
|
+
private readonly getNextEventSeq;
|
|
14
|
+
private readonly traceManager;
|
|
15
|
+
/**
|
|
16
|
+
* Creates a new event router
|
|
17
|
+
*
|
|
18
|
+
* @param registry - Contract registry for looking up processors
|
|
19
|
+
* @param queue - Task queue for scheduling handlers
|
|
20
|
+
* @param getNextTaskId - Function to get the next task ID
|
|
21
|
+
* @param getNextEventSeq - Function to get the next event sequence number
|
|
22
|
+
*/
|
|
23
|
+
constructor(blue: Blue, registry: ContractRegistry, queue: TaskQueue, getNextTaskId: () => number, getNextEventSeq: () => number);
|
|
24
|
+
/**
|
|
25
|
+
* Routes an event to matching contracts in the document
|
|
26
|
+
*
|
|
27
|
+
* @param doc - The document to route events in
|
|
28
|
+
* @param pathSegments - Path segments to the current node
|
|
29
|
+
* @param event - The event to route
|
|
30
|
+
* @param afterTaskId - Minimum task ID to use
|
|
31
|
+
* @param inlineDepth - Current adapter recursion depth
|
|
32
|
+
*/
|
|
33
|
+
route(doc: DocumentNode, pathSegments: string[], event: EventNode, afterTaskId: number, inlineDepth?: number): Promise<void>;
|
|
34
|
+
/**
|
|
35
|
+
* Traverses contracts at the current node and routes to matching ones
|
|
36
|
+
*/
|
|
37
|
+
private traverseContracts;
|
|
38
|
+
/**
|
|
39
|
+
* Processes an adapter contract and routes any emitted events
|
|
40
|
+
*/
|
|
41
|
+
private processAdapter;
|
|
42
|
+
/**
|
|
43
|
+
* Schedules a handler contract for future execution
|
|
44
|
+
*/
|
|
45
|
+
private scheduleHandler;
|
|
46
|
+
/**
|
|
47
|
+
* Checks if an event should be skipped because it came from another channel node
|
|
48
|
+
*/
|
|
49
|
+
private shouldSkipForChannel;
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=EventRouter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventRouter.d.ts","sourceRoot":"","sources":["../../src/routing/EventRouter.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,YAAY,EACZ,SAAS,EAEV,MAAM,UAAU,CAAC;AAKlB,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE,OAAO,EAAE,IAAI,EAAe,MAAM,qBAAqB,CAAC;AAKxD;;GAEG;AACH,qBAAa,WAAW;IAYpB,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,eAAe;IAflC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAoB;IAEjD;;;;;;;OAOG;gBAEgB,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,gBAAgB,EAC1B,KAAK,EAAE,SAAS,EAChB,aAAa,EAAE,MAAM,MAAM,EAC3B,eAAe,EAAE,MAAM,MAAM;IAKhD;;;;;;;;OAQG;IACG,KAAK,CACT,GAAG,EAAE,YAAY,EACjB,YAAY,EAAE,MAAM,EAAE,EACtB,KAAK,EAAE,SAAS,EAChB,WAAW,EAAE,MAAM,EACnB,WAAW,SAAI,GACd,OAAO,CAAC,IAAI,CAAC;IAsChB;;OAEG;YACW,iBAAiB;IA0E/B;;OAEG;YACW,cAAc;IAkD5B;;OAEG;IACH,OAAO,CAAC,eAAe;IA4CvB;;OAEG;IACH,OAAO,CAAC,oBAAoB;CAO7B"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { Blue, BlueNode, BlueNodePatch } from '@blue-labs/language';
|
|
2
|
+
export type BlueId = string;
|
|
3
|
+
export type DocumentNode = BlueNode;
|
|
4
|
+
export interface EventNodePayload {
|
|
5
|
+
type?: string;
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
}
|
|
8
|
+
export interface EventNode<Payload = EventNodePayload> {
|
|
9
|
+
payload: Payload;
|
|
10
|
+
source?: 'channel' | 'external';
|
|
11
|
+
/** Absolute path of the document node that emitted this event */
|
|
12
|
+
originNodePath?: string;
|
|
13
|
+
/** Channel of the node that emitted this event */
|
|
14
|
+
channelName?: string;
|
|
15
|
+
/** Absolute path that hints the router where to start */
|
|
16
|
+
dispatchPath?: string;
|
|
17
|
+
/** Sequence number for event ordering */
|
|
18
|
+
seq?: number;
|
|
19
|
+
/** The very first event in the chain that led to this one */
|
|
20
|
+
rootEvent?: EventNode;
|
|
21
|
+
/** Linear path trace: each hop = "<absNodePath>#<contractName>" */
|
|
22
|
+
trace?: string[];
|
|
23
|
+
}
|
|
24
|
+
export interface ProcessingResult {
|
|
25
|
+
/** Final document state */
|
|
26
|
+
state: DocumentNode;
|
|
27
|
+
/** All emitted events */
|
|
28
|
+
emitted: EventNodePayload[];
|
|
29
|
+
}
|
|
30
|
+
export type ContractRole = 'adapter' | 'validator' | 'handler';
|
|
31
|
+
export interface ContractProcessor {
|
|
32
|
+
readonly contractType: string;
|
|
33
|
+
readonly contractBlueId: BlueId;
|
|
34
|
+
readonly role: ContractRole;
|
|
35
|
+
init?(node: DocumentNode): Promise<EventNode[]> | EventNode[];
|
|
36
|
+
supports(evt: EventNode, contractNode: DocumentNode, ctx: ProcessingContext, contractName: string): boolean;
|
|
37
|
+
handle(evt: EventNode, contractNode: DocumentNode, ctx: ProcessingContext, contractName: string): void;
|
|
38
|
+
}
|
|
39
|
+
export type ProcessingAction = {
|
|
40
|
+
kind: 'patch';
|
|
41
|
+
patch: BlueNodePatch;
|
|
42
|
+
} | {
|
|
43
|
+
kind: 'event';
|
|
44
|
+
event: EventNode;
|
|
45
|
+
};
|
|
46
|
+
export type BlueNodeGetResult = ReturnType<typeof BlueNode.prototype.get>;
|
|
47
|
+
export type ProcessingContext = {
|
|
48
|
+
get(path: string): BlueNodeGetResult;
|
|
49
|
+
addPatch(patch: BlueNodePatch): void;
|
|
50
|
+
getNodePath(): string;
|
|
51
|
+
resolvePath(path: string): string;
|
|
52
|
+
/**
|
|
53
|
+
* Emit an event for immediate processing
|
|
54
|
+
* @param event Event to be processed immediately
|
|
55
|
+
*/
|
|
56
|
+
emitEvent(event: EventNode): void;
|
|
57
|
+
/**
|
|
58
|
+
* Flush all pending patches and events
|
|
59
|
+
*/
|
|
60
|
+
flush(): Promise<ProcessingAction[]>;
|
|
61
|
+
/**
|
|
62
|
+
* Get the Blue instance
|
|
63
|
+
* @returns The Blue instance
|
|
64
|
+
*/
|
|
65
|
+
getBlue(): Blue;
|
|
66
|
+
/**
|
|
67
|
+
* Load external module
|
|
68
|
+
* @param url URL of the module to load
|
|
69
|
+
*/
|
|
70
|
+
loadExternalModule(url: string): Promise<string>;
|
|
71
|
+
/**
|
|
72
|
+
* Load blue content
|
|
73
|
+
* @param blueId ID of the blue to load
|
|
74
|
+
*/
|
|
75
|
+
loadBlueContent(blueId: string): Promise<string>;
|
|
76
|
+
};
|
|
77
|
+
export interface HandlerTask {
|
|
78
|
+
nodePath: string;
|
|
79
|
+
contractName: string;
|
|
80
|
+
contractNode: DocumentNode;
|
|
81
|
+
event: EventNode;
|
|
82
|
+
}
|
|
83
|
+
export interface Task extends HandlerTask {
|
|
84
|
+
key: [number, number, number, number, string, number];
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DocumentNode, EventNode } from '../types';
|
|
2
|
+
import { BlueNodePatch } from '@blue-labs/language';
|
|
3
|
+
export declare class CheckpointCache {
|
|
4
|
+
private firstSeen;
|
|
5
|
+
record(docBase: string, event: EventNode, eventBlueId: string): void;
|
|
6
|
+
/** Turn cached data into JSON-Patch ops */
|
|
7
|
+
flush(document: DocumentNode): BlueNodePatch[];
|
|
8
|
+
clear(): void;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=CheckpointCache.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CheckpointCache.d.ts","sourceRoot":"","sources":["../../src/utils/CheckpointCache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAEnD,OAAO,EAAY,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAQ9D,qBAAa,eAAe;IAC1B,OAAO,CAAC,SAAS,CAA4B;IAE7C,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM;IAO7D,2CAA2C;IAC3C,KAAK,CAAC,QAAQ,EAAE,YAAY,GAAG,aAAa,EAAE;IA+B9C,KAAK;CAGN"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { EventNode } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Manages event tracing functionality for the Blue Document Processor
|
|
4
|
+
*/
|
|
5
|
+
export declare class EventTraceManager {
|
|
6
|
+
private readonly isEnabled;
|
|
7
|
+
constructor();
|
|
8
|
+
/**
|
|
9
|
+
* Creates a hop entry for the trace
|
|
10
|
+
* @param nodePath - The path to the node
|
|
11
|
+
* @param contractName - The name of the contract
|
|
12
|
+
* @returns A formatted hop string
|
|
13
|
+
*/
|
|
14
|
+
private makeHop;
|
|
15
|
+
/**
|
|
16
|
+
* Checks if tracing is enabled
|
|
17
|
+
* @returns Whether tracing is enabled
|
|
18
|
+
*/
|
|
19
|
+
private shouldTrace;
|
|
20
|
+
/**
|
|
21
|
+
* Adds a hop to the event's trace if tracing is enabled
|
|
22
|
+
* @param event - The event to add the trace to
|
|
23
|
+
* @param nodePath - The path to the node
|
|
24
|
+
* @param contractName - The name of the contract
|
|
25
|
+
* @returns A new event with the updated trace
|
|
26
|
+
*/
|
|
27
|
+
addHop(event: EventNode, nodePath: string, contractName: string): EventNode;
|
|
28
|
+
/**
|
|
29
|
+
* Gets the current trace for an event
|
|
30
|
+
* @param event - The event to get the trace for
|
|
31
|
+
* @returns The current trace array or an empty array if none exists
|
|
32
|
+
*/
|
|
33
|
+
getTrace(event: EventNode): string[];
|
|
34
|
+
/**
|
|
35
|
+
* Clears the trace for an event
|
|
36
|
+
* @param event - The event to clear the trace for
|
|
37
|
+
* @returns A new event with an empty trace
|
|
38
|
+
*/
|
|
39
|
+
clearTrace(event: EventNode): EventNode;
|
|
40
|
+
/**
|
|
41
|
+
* Checks if tracing is enabled globally
|
|
42
|
+
* @returns Whether tracing is enabled
|
|
43
|
+
*/
|
|
44
|
+
isTracingEnabled(): boolean;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=EventTraceManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventTraceManager.d.ts","sourceRoot":"","sources":["../../src/utils/EventTraceManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC;;GAEG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAU;;IAMpC;;;;;OAKG;IACH,OAAO,CAAC,OAAO;IAIf;;;OAGG;IACH,OAAO,CAAC,WAAW;IAInB;;;;;;OAMG;IACH,MAAM,CAAC,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,SAAS;IAe3E;;;;OAIG;IACH,QAAQ,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,EAAE;IAIpC;;;;OAIG;IACH,UAAU,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS;IAOvC;;;OAGG;IACH,gBAAgB,IAAI,OAAO;CAG5B"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare class TinyQueue<T> {
|
|
2
|
+
data: T[];
|
|
3
|
+
length: number;
|
|
4
|
+
compare: (a: T, b: T) => number;
|
|
5
|
+
constructor(data?: T[], compare?: (a: T, b: T) => number);
|
|
6
|
+
push(item: T): void;
|
|
7
|
+
pop(): T | undefined;
|
|
8
|
+
peek(): T;
|
|
9
|
+
_up(pos: number): void;
|
|
10
|
+
_down(pos: number): void;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=TinyQueue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TinyQueue.d.ts","sourceRoot":"","sources":["../../src/utils/TinyQueue.ts"],"names":[],"mappings":"AAAA,qBAAa,SAAS,CAAC,CAAC;IACtB,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,MAAM,CAAC;gBAG9B,IAAI,GAAE,CAAC,EAAO,EACd,OAAO,GAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,MAA+C;IAW1E,IAAI,CAAC,IAAI,EAAE,CAAC;IAKZ,GAAG;IAcH,IAAI;IAIJ,GAAG,CAAC,GAAG,EAAE,MAAM;IAef,KAAK,CAAC,GAAG,EAAE,MAAM;CAoBlB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkpoint.d.ts","sourceRoot":"","sources":["../../src/utils/checkpoint.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAGxC,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAG3C,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,IAAI,0CA2CtE"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { DocumentNode } from '../types';
|
|
2
|
+
import { BlueNodePatch, Blue } from '@blue-labs/language';
|
|
3
|
+
export declare const ENABLE_IMMUTABILITY = true;
|
|
4
|
+
type EmbeddedSpec = {
|
|
5
|
+
absPath: string;
|
|
6
|
+
contractPath: string;
|
|
7
|
+
};
|
|
8
|
+
export declare function collectEmbeddedPaths(doc: DocumentNode, blue: Blue, base?: string, out?: EmbeddedSpec[]): EmbeddedSpec[];
|
|
9
|
+
export declare function isInside(target: string, root: string): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Apply a collection of patches to a document
|
|
12
|
+
*/
|
|
13
|
+
export declare function applyPatches(document: DocumentNode, patches: BlueNodePatch[]): DocumentNode;
|
|
14
|
+
/**
|
|
15
|
+
* Create an immutable copy of a document if immutability is enabled
|
|
16
|
+
*/
|
|
17
|
+
export declare function createImmutableDocument(document: DocumentNode): DocumentNode;
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=document.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document.d.ts","sourceRoot":"","sources":["../../src/utils/document.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAIxC,OAAO,EAEL,KAAK,aAAa,EAElB,IAAI,EACL,MAAM,qBAAqB,CAAC;AAI7B,eAAO,MAAM,mBAAmB,OAAO,CAAC;AAKxC,KAAK,YAAY,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,CAAC;AAE9D,wBAAgB,oBAAoB,CAClC,GAAG,EAAE,YAAY,EACjB,IAAI,EAAE,IAAI,EACV,IAAI,SAAM,EACV,GAAG,GAAE,YAAY,EAAO,GACvB,YAAY,EAAE,CA4BhB;AAKD,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAI9D;AAED;;GAEG;AACH,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,YAAY,EACtB,OAAO,EAAE,aAAa,EAAE,GACvB,YAAY,CAcd;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,YAAY,GAAG,YAAY,CAE5E"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { BlueNodePatch } from '@blue-labs/language';
|
|
2
|
+
/** Custom error gives you the offending patch for logging / alerting */
|
|
3
|
+
export declare class PatchApplicationError extends Error {
|
|
4
|
+
readonly patch: BlueNodePatch;
|
|
5
|
+
readonly cause?: unknown | undefined;
|
|
6
|
+
constructor(patch: BlueNodePatch, cause?: unknown | undefined);
|
|
7
|
+
}
|
|
8
|
+
/** Thrown when a patch targets a path protected by a Process Embedded contract */
|
|
9
|
+
export declare class EmbeddedDocumentModificationError extends Error {
|
|
10
|
+
readonly patch: BlueNodePatch;
|
|
11
|
+
readonly offendingPath: string;
|
|
12
|
+
readonly contractNodePath: string;
|
|
13
|
+
constructor(patch: BlueNodePatch, offendingPath: string, // the embedded path that was hit
|
|
14
|
+
contractNodePath: string);
|
|
15
|
+
}
|
|
16
|
+
/** Thrown when a document update expression fails to evaluate */
|
|
17
|
+
export declare class ExpressionEvaluationError extends Error {
|
|
18
|
+
readonly code: string;
|
|
19
|
+
readonly cause?: unknown | undefined;
|
|
20
|
+
constructor(code: string, cause?: unknown | undefined);
|
|
21
|
+
}
|
|
22
|
+
/** Thrown when a step code block fails to evaluate */
|
|
23
|
+
export declare class CodeBlockEvaluationError extends Error {
|
|
24
|
+
readonly code: string;
|
|
25
|
+
readonly cause?: unknown | undefined;
|
|
26
|
+
constructor(code: string, cause?: unknown | undefined);
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=exceptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exceptions.d.ts","sourceRoot":"","sources":["../../src/utils/exceptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,wEAAwE;AACxE,qBAAa,qBAAsB,SAAQ,KAAK;IAE5C,QAAQ,CAAC,KAAK,EAAE,aAAa;aACX,KAAK,CAAC,EAAE,OAAO;gBADxB,KAAK,EAAE,aAAa,EACX,KAAK,CAAC,EAAE,OAAO,YAAA;CAKpC;AAED,kFAAkF;AAClF,qBAAa,iCAAkC,SAAQ,KAAK;IAExD,QAAQ,CAAC,KAAK,EAAE,aAAa;IAC7B,QAAQ,CAAC,aAAa,EAAE,MAAM;IAC9B,QAAQ,CAAC,gBAAgB,EAAE,MAAM;gBAFxB,KAAK,EAAE,aAAa,EACpB,aAAa,EAAE,MAAM,EAAE,iCAAiC;IACxD,gBAAgB,EAAE,MAAM;CAWpC;AAED,iEAAiE;AACjE,qBAAa,yBAA0B,SAAQ,KAAK;IACtC,QAAQ,CAAC,IAAI,EAAE,MAAM;aAAoB,KAAK,CAAC,EAAE,OAAO;gBAA/C,IAAI,EAAE,MAAM,EAAoB,KAAK,CAAC,EAAE,OAAO,YAAA;CAIrE;AAED,sDAAsD;AACtD,qBAAa,wBAAyB,SAAQ,KAAK;IACrC,QAAQ,CAAC,IAAI,EAAE,MAAM;aAAoB,KAAK,CAAC,EAAE,OAAO;gBAA/C,IAAI,EAAE,MAAM,EAAoB,KAAK,CAAC,EAAE,OAAO,YAAA;CAIrE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetchText.d.ts","sourceRoot":"","sources":["../../src/utils/fetchText.ts"],"names":[],"mappings":"AAUA,wBAAsB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAe5D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logPatchError.d.ts","sourceRoot":"","sources":["../../src/utils/logPatchError.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,eAAO,MAAM,aAAa,iBACV,MAAM,SACb,SAAS,OACX,OAAO,SAYb,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../../src/utils/path.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,aAAc,MAAM,EAAE,WAkBf,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { DocumentNode } from '../types';
|
|
2
|
+
export declare function isNonNullable<T>(value: T): value is NonNullable<T>;
|
|
3
|
+
export declare function isString(value: unknown): value is string;
|
|
4
|
+
export declare function isDocumentNode(value: unknown): value is DocumentNode;
|
|
5
|
+
//# sourceMappingURL=typeGuard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typeGuard.d.ts","sourceRoot":"","sources":["../../src/utils/typeGuard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAGxC,wBAAgB,aAAa,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,KAAK,IAAI,WAAW,CAAC,CAAC,CAAC,CAElE;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAExD;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,YAAY,CAEpE"}
|
package/package.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@blue-labs/document-processor",
|
|
3
|
+
"version": "1.21.0",
|
|
4
|
+
"dependencies": {
|
|
5
|
+
"@blue-labs/language": "1.21.0",
|
|
6
|
+
"@blue-labs/shared-utils": "1.21.0",
|
|
7
|
+
"isolated-vm": "5.0.4",
|
|
8
|
+
"zod": "3.23.8"
|
|
9
|
+
},
|
|
10
|
+
"main": "./dist/index.js",
|
|
11
|
+
"module": "./dist/index.mjs",
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"files": [
|
|
14
|
+
"dist",
|
|
15
|
+
"!**/*.tsbuildinfo",
|
|
16
|
+
"!dist/package.json"
|
|
17
|
+
],
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"publishConfig": {
|
|
20
|
+
"access": "public"
|
|
21
|
+
},
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "git+https://github.com/bluecontract/blue-js.git"
|
|
25
|
+
},
|
|
26
|
+
"exports": {
|
|
27
|
+
".": {
|
|
28
|
+
"types": "./dist/index.d.ts",
|
|
29
|
+
"import": "./dist/index.mjs",
|
|
30
|
+
"require": "./dist/index.js"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"nx": {
|
|
34
|
+
"name": "document-processor"
|
|
35
|
+
},
|
|
36
|
+
"peerDependencies": {
|
|
37
|
+
"zod": "^3.20.0"
|
|
38
|
+
},
|
|
39
|
+
"peerDependenciesMeta": {
|
|
40
|
+
"zod": {
|
|
41
|
+
"optional": false
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|