@blue-labs/document-processor 1.37.3 → 2.0.0-rc.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/dist/api/document-processor.d.ts +38 -0
- package/dist/api/document-processor.d.ts.map +1 -0
- package/dist/constants/processor-contract-constants.d.ts +24 -0
- package/dist/constants/processor-contract-constants.d.ts.map +1 -0
- package/dist/constants/processor-pointer-constants.d.ts +21 -0
- package/dist/constants/processor-pointer-constants.d.ts.map +1 -0
- package/dist/engine/boundary-violation-exception.d.ts +4 -0
- package/dist/engine/boundary-violation-exception.d.ts.map +1 -0
- package/dist/engine/channel-runner.d.ts +27 -0
- package/dist/engine/channel-runner.d.ts.map +1 -0
- package/dist/engine/checkpoint-manager.d.ts +23 -0
- package/dist/engine/checkpoint-manager.d.ts.map +1 -0
- package/dist/engine/contract-bundle.d.ts +70 -0
- package/dist/engine/contract-bundle.d.ts.map +1 -0
- package/dist/engine/contract-loader.d.ts +17 -0
- package/dist/engine/contract-loader.d.ts.map +1 -0
- package/dist/engine/handler-registration-service.d.ts +27 -0
- package/dist/engine/handler-registration-service.d.ts.map +1 -0
- package/dist/engine/illegal-state-exception.d.ts +5 -0
- package/dist/engine/illegal-state-exception.d.ts.map +1 -0
- package/dist/engine/index.d.ts +11 -0
- package/dist/engine/index.d.ts.map +1 -0
- package/dist/engine/must-understand-failure.d.ts +4 -0
- package/dist/engine/must-understand-failure.d.ts.map +1 -0
- package/dist/engine/processor-engine.d.ts +66 -0
- package/dist/engine/processor-engine.d.ts.map +1 -0
- package/dist/engine/processor-execution-context.d.ts +38 -0
- package/dist/engine/processor-execution-context.d.ts.map +1 -0
- package/dist/engine/processor-fatal-error.d.ts +6 -0
- package/dist/engine/processor-fatal-error.d.ts.map +1 -0
- package/dist/engine/run-termination-error.d.ts +5 -0
- package/dist/engine/run-termination-error.d.ts.map +1 -0
- package/dist/engine/scope-executor.d.ts +60 -0
- package/dist/engine/scope-executor.d.ts.map +1 -0
- package/dist/engine/termination-service.d.ts +17 -0
- package/dist/engine/termination-service.d.ts.map +1 -0
- package/dist/index.d.ts +14 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3176 -9
- package/dist/merge/index.d.ts +2 -2
- package/dist/merge/index.d.ts.map +1 -1
- package/dist/merge/processors/index.d.ts +1 -1
- package/dist/merge/processors/index.d.ts.map +1 -1
- package/dist/model/channels/document-update-channel.d.ts +41 -0
- package/dist/model/channels/document-update-channel.d.ts.map +1 -0
- package/dist/model/channels/embedded-node-channel.d.ts +43 -0
- package/dist/model/channels/embedded-node-channel.d.ts.map +1 -0
- package/dist/model/channels/index.d.ts +7 -0
- package/dist/model/channels/index.d.ts.map +1 -0
- package/dist/model/channels/lifecycle-channel.d.ts +40 -0
- package/dist/model/channels/lifecycle-channel.d.ts.map +1 -0
- package/dist/model/channels/myos-timeline-channel.d.ts +52 -0
- package/dist/model/channels/myos-timeline-channel.d.ts.map +1 -0
- package/dist/model/channels/timeline-channel.d.ts +43 -0
- package/dist/model/channels/timeline-channel.d.ts.map +1 -0
- package/dist/model/channels/triggered-event-channel.d.ts +40 -0
- package/dist/model/channels/triggered-event-channel.d.ts.map +1 -0
- package/dist/model/events/document-update.d.ts +15 -0
- package/dist/model/events/document-update.d.ts.map +1 -0
- package/dist/model/handlers/index.d.ts +3 -0
- package/dist/model/handlers/index.d.ts.map +1 -0
- package/dist/model/handlers/sequential-workflow-operation.d.ts +61 -0
- package/dist/model/handlers/sequential-workflow-operation.d.ts.map +1 -0
- package/dist/model/handlers/sequential-workflow.d.ts +57 -0
- package/dist/model/handlers/sequential-workflow.d.ts.map +1 -0
- package/dist/model/index.d.ts +6 -0
- package/dist/model/index.d.ts.map +1 -0
- package/dist/model/markers/channel-event-checkpoint.d.ts +40 -0
- package/dist/model/markers/channel-event-checkpoint.d.ts.map +1 -0
- package/dist/model/markers/index.d.ts +6 -0
- package/dist/model/markers/index.d.ts.map +1 -0
- package/dist/model/markers/initialization-marker.d.ts +36 -0
- package/dist/model/markers/initialization-marker.d.ts.map +1 -0
- package/dist/model/markers/operation.d.ts +39 -0
- package/dist/model/markers/operation.d.ts.map +1 -0
- package/dist/model/markers/process-embedded.d.ts +36 -0
- package/dist/model/markers/process-embedded.d.ts.map +1 -0
- package/dist/model/markers/processing-terminated-marker.d.ts +39 -0
- package/dist/model/markers/processing-terminated-marker.d.ts.map +1 -0
- package/dist/model/shared/channel-contract-base.d.ts +30 -0
- package/dist/model/shared/channel-contract-base.d.ts.map +1 -0
- package/dist/model/shared/contract-base.d.ts +16 -0
- package/dist/model/shared/contract-base.d.ts.map +1 -0
- package/dist/model/shared/handler-contract-base.d.ts +29 -0
- package/dist/model/shared/handler-contract-base.d.ts.map +1 -0
- package/dist/model/shared/index.d.ts +6 -0
- package/dist/model/shared/index.d.ts.map +1 -0
- package/dist/model/shared/json-patch.d.ts +24 -0
- package/dist/model/shared/json-patch.d.ts.map +1 -0
- package/dist/model/shared/marker-contract-base.d.ts +23 -0
- package/dist/model/shared/marker-contract-base.d.ts.map +1 -0
- package/dist/model/types.d.ts +13 -0
- package/dist/model/types.d.ts.map +1 -0
- package/dist/registry/contract-processor-registry-builder.d.ts +11 -0
- package/dist/registry/contract-processor-registry-builder.d.ts.map +1 -0
- package/dist/registry/contract-processor-registry.d.ts +17 -0
- package/dist/registry/contract-processor-registry.d.ts.map +1 -0
- package/dist/registry/index.d.ts +4 -0
- package/dist/registry/index.d.ts.map +1 -0
- package/dist/registry/processors/myos-timeline-channel-processor.d.ts +59 -0
- package/dist/registry/processors/myos-timeline-channel-processor.d.ts.map +1 -0
- package/dist/registry/processors/operation-marker-processor.d.ts +43 -0
- package/dist/registry/processors/operation-marker-processor.d.ts.map +1 -0
- package/dist/registry/processors/sequential-workflow-operation-processor.d.ts +76 -0
- package/dist/registry/processors/sequential-workflow-operation-processor.d.ts.map +1 -0
- package/dist/registry/processors/sequential-workflow-processor.d.ts +64 -0
- package/dist/registry/processors/sequential-workflow-processor.d.ts.map +1 -0
- package/dist/registry/processors/steps/javascript-code-step-executor.d.ts +8 -0
- package/dist/registry/processors/steps/javascript-code-step-executor.d.ts.map +1 -0
- package/dist/registry/processors/steps/quickjs-step-bindings.d.ts +4 -0
- package/dist/registry/processors/steps/quickjs-step-bindings.d.ts.map +1 -0
- package/dist/registry/processors/steps/trigger-event-step-executor.d.ts +7 -0
- package/dist/registry/processors/steps/trigger-event-step-executor.d.ts.map +1 -0
- package/dist/registry/processors/steps/update-document-step-executor.d.ts +11 -0
- package/dist/registry/processors/steps/update-document-step-executor.d.ts.map +1 -0
- package/dist/registry/processors/timeline-channel-processor.d.ts +50 -0
- package/dist/registry/processors/timeline-channel-processor.d.ts.map +1 -0
- package/dist/registry/processors/utils/operation-utils.d.ts +6 -0
- package/dist/registry/processors/utils/operation-utils.d.ts.map +1 -0
- package/dist/registry/processors/workflow/operation-matcher.d.ts +17 -0
- package/dist/registry/processors/workflow/operation-matcher.d.ts.map +1 -0
- package/dist/registry/processors/workflow/step-runner.d.ts +28 -0
- package/dist/registry/processors/workflow/step-runner.d.ts.map +1 -0
- package/dist/registry/types.d.ts +71 -0
- package/dist/registry/types.d.ts.map +1 -0
- package/dist/runtime/document-processing-runtime.d.ts +31 -0
- package/dist/runtime/document-processing-runtime.d.ts.map +1 -0
- package/dist/runtime/emission-registry.d.ts +14 -0
- package/dist/runtime/emission-registry.d.ts.map +1 -0
- package/dist/runtime/gas-helpers.d.ts +9 -0
- package/dist/runtime/gas-helpers.d.ts.map +1 -0
- package/dist/runtime/gas-meter.d.ts +32 -0
- package/dist/runtime/gas-meter.d.ts.map +1 -0
- package/dist/runtime/index.d.ts +6 -0
- package/dist/runtime/index.d.ts.map +1 -0
- package/dist/runtime/patch-engine.d.ts +28 -0
- package/dist/runtime/patch-engine.d.ts.map +1 -0
- package/dist/runtime/scope-runtime-context.d.ts +31 -0
- package/dist/runtime/scope-runtime-context.d.ts.map +1 -0
- package/dist/test-support/blue.d.ts +27 -0
- package/dist/test-support/blue.d.ts.map +1 -0
- package/dist/test-support/workflow.d.ts +18 -0
- package/dist/test-support/workflow.d.ts.map +1 -0
- package/dist/types/document-processing-result.d.ts +13 -0
- package/dist/types/document-processing-result.d.ts.map +1 -0
- package/dist/types/errors.d.ts +42 -0
- package/dist/types/errors.d.ts.map +1 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/result.d.ts +23 -0
- package/dist/types/result.d.ts.map +1 -0
- package/dist/types/scope-contracts.d.ts +7 -0
- package/dist/types/scope-contracts.d.ts.map +1 -0
- package/dist/util/expression/exceptions.d.ts +6 -0
- package/dist/util/expression/exceptions.d.ts.map +1 -0
- package/dist/util/expression/quickjs-evaluator.d.ts +23 -0
- package/dist/util/expression/quickjs-evaluator.d.ts.map +1 -0
- package/dist/util/expression/quickjs-expression-utils.d.ts +29 -0
- package/dist/util/expression/quickjs-expression-utils.d.ts.map +1 -0
- package/dist/util/node-canonicalizer.d.ts +4 -0
- package/dist/util/node-canonicalizer.d.ts.map +1 -0
- package/dist/util/pointer-utils.d.ts +7 -0
- package/dist/util/pointer-utils.d.ts.map +1 -0
- package/package.json +21 -19
- package/dist/BlueDocumentProcessor.d.ts +0 -50
- package/dist/BlueDocumentProcessor.d.ts.map +0 -1
- package/dist/config.d.ts +0 -3
- package/dist/config.d.ts.map +0 -1
- package/dist/context.d.ts +0 -21
- package/dist/context.d.ts.map +0 -1
- package/dist/index.mjs +0 -1657
- package/dist/processors/BaseChannelProcessor.d.ts +0 -22
- package/dist/processors/BaseChannelProcessor.d.ts.map +0 -1
- package/dist/processors/ChannelEventCheckpointProcessor.d.ts +0 -13
- package/dist/processors/ChannelEventCheckpointProcessor.d.ts.map +0 -1
- package/dist/processors/CompositeTimelineChannelProcessor.d.ts +0 -9
- package/dist/processors/CompositeTimelineChannelProcessor.d.ts.map +0 -1
- package/dist/processors/DocumentUpdateChannelProcessor.d.ts +0 -9
- package/dist/processors/DocumentUpdateChannelProcessor.d.ts.map +0 -1
- package/dist/processors/EmbeddedNodeChannelProcessor.d.ts +0 -9
- package/dist/processors/EmbeddedNodeChannelProcessor.d.ts.map +0 -1
- package/dist/processors/InitializedMarkerProcessor.d.ts +0 -9
- package/dist/processors/InitializedMarkerProcessor.d.ts.map +0 -1
- package/dist/processors/LifecycleEventChannelProcessor.d.ts +0 -33
- package/dist/processors/LifecycleEventChannelProcessor.d.ts.map +0 -1
- package/dist/processors/MyOSAgentChannelProcessor.d.ts +0 -60
- package/dist/processors/MyOSAgentChannelProcessor.d.ts.map +0 -1
- package/dist/processors/MyOSTimelineChannelProcessor.d.ts +0 -9
- package/dist/processors/MyOSTimelineChannelProcessor.d.ts.map +0 -1
- package/dist/processors/OperationProcessor.d.ts +0 -13
- package/dist/processors/OperationProcessor.d.ts.map +0 -1
- package/dist/processors/ProcessEmbeddedProcessor.d.ts +0 -9
- package/dist/processors/ProcessEmbeddedProcessor.d.ts.map +0 -1
- package/dist/processors/SequentialWorkflowOperationProcessor.d.ts +0 -12
- package/dist/processors/SequentialWorkflowOperationProcessor.d.ts.map +0 -1
- package/dist/processors/SequentialWorkflowProcessor/SequentialWorkflowProcessor.d.ts +0 -19
- package/dist/processors/SequentialWorkflowProcessor/SequentialWorkflowProcessor.d.ts.map +0 -1
- package/dist/processors/SequentialWorkflowProcessor/index.d.ts +0 -2
- package/dist/processors/SequentialWorkflowProcessor/index.d.ts.map +0 -1
- package/dist/processors/SequentialWorkflowProcessor/steps/JavaScriptCodeExecutor.d.ts +0 -8
- package/dist/processors/SequentialWorkflowProcessor/steps/JavaScriptCodeExecutor.d.ts.map +0 -1
- package/dist/processors/SequentialWorkflowProcessor/steps/TriggerEventExecutor.d.ts +0 -8
- package/dist/processors/SequentialWorkflowProcessor/steps/TriggerEventExecutor.d.ts.map +0 -1
- package/dist/processors/SequentialWorkflowProcessor/steps/UpdateDocumentExecutor.d.ts +0 -14
- package/dist/processors/SequentialWorkflowProcessor/steps/UpdateDocumentExecutor.d.ts.map +0 -1
- package/dist/processors/SequentialWorkflowProcessor/types.d.ts +0 -7
- package/dist/processors/SequentialWorkflowProcessor/types.d.ts.map +0 -1
- package/dist/processors/SequentialWorkflowProcessor/utils/BindingsFactory.d.ts +0 -12
- package/dist/processors/SequentialWorkflowProcessor/utils/BindingsFactory.d.ts.map +0 -1
- package/dist/processors/SequentialWorkflowProcessor/utils/ExpressionEvaluator.d.ts +0 -61
- package/dist/processors/SequentialWorkflowProcessor/utils/ExpressionEvaluator.d.ts.map +0 -1
- package/dist/processors/SequentialWorkflowProcessor/utils/ExpressionResolver.d.ts +0 -8
- package/dist/processors/SequentialWorkflowProcessor/utils/ExpressionResolver.d.ts.map +0 -1
- package/dist/processors/TimelineChannelProcessor.d.ts +0 -9
- package/dist/processors/TimelineChannelProcessor.d.ts.map +0 -1
- package/dist/processors/TriggeredEventChannelProcessor.d.ts +0 -12
- package/dist/processors/TriggeredEventChannelProcessor.d.ts.map +0 -1
- package/dist/processors/index.d.ts +0 -15
- package/dist/processors/index.d.ts.map +0 -1
- package/dist/queue/TaskKey.d.ts +0 -22
- package/dist/queue/TaskKey.d.ts.map +0 -1
- package/dist/queue/TaskQueue.d.ts +0 -31
- package/dist/queue/TaskQueue.d.ts.map +0 -1
- package/dist/registry/ContractRegistry.d.ts +0 -47
- package/dist/registry/ContractRegistry.d.ts.map +0 -1
- package/dist/routing/EventRouter.d.ts +0 -51
- package/dist/routing/EventRouter.d.ts.map +0 -1
- package/dist/routing/buildContractEntries.d.ts +0 -3
- package/dist/routing/buildContractEntries.d.ts.map +0 -1
- package/dist/testUtils.d.ts +0 -15
- package/dist/testUtils.d.ts.map +0 -1
- package/dist/types.d.ts +0 -84
- package/dist/types.d.ts.map +0 -1
- package/dist/utils/CheckpointCache.d.ts +0 -10
- package/dist/utils/CheckpointCache.d.ts.map +0 -1
- package/dist/utils/EventTraceManager.d.ts +0 -47
- package/dist/utils/EventTraceManager.d.ts.map +0 -1
- package/dist/utils/TinyQueue.d.ts +0 -12
- package/dist/utils/TinyQueue.d.ts.map +0 -1
- package/dist/utils/checkpoint.d.ts +0 -4
- package/dist/utils/checkpoint.d.ts.map +0 -1
- package/dist/utils/document.d.ts +0 -29
- package/dist/utils/document.d.ts.map +0 -1
- package/dist/utils/eventFactories.d.ts +0 -37
- package/dist/utils/eventFactories.d.ts.map +0 -1
- package/dist/utils/exceptions.d.ts +0 -28
- package/dist/utils/exceptions.d.ts.map +0 -1
- package/dist/utils/expressionUtils.d.ts +0 -18
- package/dist/utils/expressionUtils.d.ts.map +0 -1
- package/dist/utils/initialized.d.ts +0 -5
- package/dist/utils/initialized.d.ts.map +0 -1
- package/dist/utils/logPatchError.d.ts +0 -3
- package/dist/utils/logPatchError.d.ts.map +0 -1
- package/dist/utils/path.d.ts +0 -2
- package/dist/utils/path.d.ts.map +0 -1
- package/dist/utils/typeGuard.d.ts +0 -5
- package/dist/utils/typeGuard.d.ts.map +0 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface QuickJSBindings {
|
|
2
|
+
readonly [key: string]: unknown;
|
|
3
|
+
}
|
|
4
|
+
export interface QuickJSEvaluationOptions {
|
|
5
|
+
readonly code: string;
|
|
6
|
+
readonly bindings?: QuickJSBindings;
|
|
7
|
+
readonly timeout?: number;
|
|
8
|
+
readonly memoryLimit?: number;
|
|
9
|
+
}
|
|
10
|
+
export declare class QuickJSEvaluator {
|
|
11
|
+
private modulePromise?;
|
|
12
|
+
private moduleInstance?;
|
|
13
|
+
evaluate({ code, bindings, timeout, memoryLimit, }: QuickJSEvaluationOptions): Promise<unknown>;
|
|
14
|
+
private ensureModule;
|
|
15
|
+
private wrapCode;
|
|
16
|
+
private installConsole;
|
|
17
|
+
private installDeterministicGlobals;
|
|
18
|
+
private installBindings;
|
|
19
|
+
private createOwnedHandle;
|
|
20
|
+
private createReturnHandle;
|
|
21
|
+
private resolveHandle;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=quickjs-evaluator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quickjs-evaluator.d.ts","sourceRoot":"","sources":["../../../src/util/expression/quickjs-evaluator.ts"],"names":[],"mappings":"AAWA,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACjC;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,CAAC,EAAE,eAAe,CAAC;IACpC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,aAAa,CAAC,CAA6B;IACnD,OAAO,CAAC,cAAc,CAAC,CAAoB;IAErC,QAAQ,CAAC,EACb,IAAI,EACJ,QAAQ,EACR,OAA4B,EAC5B,WAAwC,GACzC,EAAE,wBAAwB,GAAG,OAAO,CAAC,OAAO,CAAC;YA8ChC,YAAY;IAa1B,OAAO,CAAC,QAAQ;IAIhB,OAAO,CAAC,cAAc;IAkBtB,OAAO,CAAC,2BAA2B;IAMnC,OAAO,CAAC,eAAe;IAuCvB,OAAO,CAAC,iBAAiB;IAmCzB,OAAO,CAAC,kBAAkB;YAmCZ,aAAa;CA2E5B"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { BlueNode } from '@blue-labs/language';
|
|
2
|
+
import { ContractProcessorContext } from '../../registry/types.js';
|
|
3
|
+
import { QuickJSEvaluator, QuickJSBindings } from './quickjs-evaluator.js';
|
|
4
|
+
export declare function isExpression(value: unknown): value is string;
|
|
5
|
+
export declare function containsExpression(value: unknown): value is string;
|
|
6
|
+
export declare function extractExpressionContent(expression: string): string;
|
|
7
|
+
export declare function evaluateQuickJSExpression(evaluator: QuickJSEvaluator, expression: string, bindings: QuickJSBindings): Promise<unknown>;
|
|
8
|
+
export declare function resolveTemplateString(evaluator: QuickJSEvaluator, template: string, bindings: QuickJSBindings): Promise<string>;
|
|
9
|
+
export type ExpressionResolverPredicate = (pointer: string) => boolean;
|
|
10
|
+
export type PicomatchShouldResolveOptions = {
|
|
11
|
+
include: readonly string[];
|
|
12
|
+
exclude?: readonly string[];
|
|
13
|
+
options?: {
|
|
14
|
+
dot?: boolean;
|
|
15
|
+
nocase?: boolean;
|
|
16
|
+
noglobstar?: boolean;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export type ResolveNodeExpressionsOptions = {
|
|
20
|
+
evaluator: QuickJSEvaluator;
|
|
21
|
+
node: BlueNode;
|
|
22
|
+
bindings: QuickJSBindings;
|
|
23
|
+
shouldResolve: ExpressionResolverPredicate;
|
|
24
|
+
context: ContractProcessorContext;
|
|
25
|
+
pointer?: string;
|
|
26
|
+
};
|
|
27
|
+
export declare function createPicomatchShouldResolve({ include, exclude, options, }: PicomatchShouldResolveOptions): ExpressionResolverPredicate;
|
|
28
|
+
export declare function resolveNodeExpressions(options: ResolveNodeExpressionsOptions): Promise<BlueNode>;
|
|
29
|
+
//# sourceMappingURL=quickjs-expression-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quickjs-expression-utils.d.ts","sourceRoot":"","sources":["../../../src/util/expression/quickjs-expression-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAGxE,OAAO,EAAE,gBAAgB,EAAE,KAAK,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAShF,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAU5D;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAQlE;AAED,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAKnE;AAED,wBAAsB,yBAAyB,CAC7C,SAAS,EAAE,gBAAgB,EAC3B,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,eAAe,GACxB,OAAO,CAAC,OAAO,CAAC,CAOlB;AAED,wBAAsB,qBAAqB,CACzC,SAAS,EAAE,gBAAgB,EAC3B,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,eAAe,GACxB,OAAO,CAAC,MAAM,CAAC,CAoBjB;AAED,MAAM,MAAM,2BAA2B,GAAG,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC;AAEvE,MAAM,MAAM,6BAA6B,GAAG;IAC1C,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3B,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5B,OAAO,CAAC,EAAE;QACR,GAAG,CAAC,EAAE,OAAO,CAAC;QACd,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,UAAU,CAAC,EAAE,OAAO,CAAC;KACtB,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG;IAC1C,SAAS,EAAE,gBAAgB,CAAC;IAC5B,IAAI,EAAE,QAAQ,CAAC;IACf,QAAQ,EAAE,eAAe,CAAC;IAC1B,aAAa,EAAE,2BAA2B,CAAC;IAC3C,OAAO,EAAE,wBAAwB,CAAC;IAClC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,wBAAgB,4BAA4B,CAAC,EAC3C,OAAO,EACP,OAAY,EACZ,OAAO,GACR,EAAE,6BAA6B,GAAG,2BAA2B,CAe7D;AAED,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,6BAA6B,GACrC,OAAO,CAAC,QAAQ,CAAC,CAyEnB"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Blue, BlueNode } from '@blue-labs/language';
|
|
2
|
+
export declare function canonicalSignature(blue: Blue, node: BlueNode | null | undefined): string | null;
|
|
3
|
+
export declare function canonicalSize(blue: Blue, node: BlueNode | null | undefined): number;
|
|
4
|
+
//# sourceMappingURL=node-canonicalizer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-canonicalizer.d.ts","sourceRoot":"","sources":["../../src/util/node-canonicalizer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAYrD,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,QAAQ,GAAG,IAAI,GAAG,SAAS,GAChC,MAAM,GAAG,IAAI,CAKf;AAED,wBAAgB,aAAa,CAC3B,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,QAAQ,GAAG,IAAI,GAAG,SAAS,GAChC,MAAM,CAOR"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare function normalizeScope(scopePath: string | null | undefined): string;
|
|
2
|
+
export declare function normalizePointer(pointer: string | null | undefined): string;
|
|
3
|
+
export declare function stripSlashes(value: string | null | undefined): string;
|
|
4
|
+
export declare function joinRelativePointers(base: string | null | undefined, tail: string | null | undefined): string;
|
|
5
|
+
export declare function resolvePointer(scopePath: string | null | undefined, relativePointer: string | null | undefined): string;
|
|
6
|
+
export declare function relativizePointer(scopePath: string | null | undefined, absolutePath: string | null | undefined): string;
|
|
7
|
+
//# sourceMappingURL=pointer-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pointer-utils.d.ts","sourceRoot":"","sources":["../../src/util/pointer-utils.ts"],"names":[],"mappings":"AAMA,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAK3E;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAK3E;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAerE;AAED,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAC/B,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAC9B,MAAM,CAaR;AAED,wBAAgB,cAAc,CAC5B,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,eAAe,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GACzC,MAAM,CAaR;AAED,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GACtC,MAAM,CAiBR"}
|
package/package.json
CHANGED
|
@@ -1,19 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blue-labs/document-processor",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"@blue-labs/language": "1.37.3",
|
|
6
|
-
"@blue-labs/shared-utils": "1.37.3",
|
|
7
|
-
"isolated-vm": "^5.0.4"
|
|
8
|
-
},
|
|
3
|
+
"version": "2.0.0-rc.1",
|
|
4
|
+
"type": "module",
|
|
9
5
|
"main": "./dist/index.js",
|
|
10
|
-
"module": "./dist/index.
|
|
6
|
+
"module": "./dist/index.js",
|
|
11
7
|
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
"./package.json": "./package.json",
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js",
|
|
13
|
+
"default": "./dist/index.js"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
12
16
|
"files": [
|
|
13
17
|
"dist",
|
|
14
18
|
"!**/*.tsbuildinfo",
|
|
15
19
|
"!dist/package.json"
|
|
16
20
|
],
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"picomatch": "2.3.1",
|
|
23
|
+
"@blue-labs/language": "2.0.0-rc.1",
|
|
24
|
+
"@blue-labs/shared-utils": "2.0.0-rc.1",
|
|
25
|
+
"quickjs-emscripten": "0.31.0"
|
|
26
|
+
},
|
|
17
27
|
"license": "MIT",
|
|
18
28
|
"publishConfig": {
|
|
19
29
|
"access": "public"
|
|
@@ -22,18 +32,10 @@
|
|
|
22
32
|
"type": "git",
|
|
23
33
|
"url": "git+https://github.com/bluecontract/blue-js.git"
|
|
24
34
|
},
|
|
25
|
-
"exports": {
|
|
26
|
-
".": {
|
|
27
|
-
"types": "./dist/index.d.ts",
|
|
28
|
-
"import": "./dist/index.mjs",
|
|
29
|
-
"require": "./dist/index.js"
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
"nx": {
|
|
33
|
-
"name": "document-processor"
|
|
34
|
-
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"
|
|
37
|
-
"@blue-repository/
|
|
36
|
+
"zod": "^3.20.0",
|
|
37
|
+
"@blue-repository/conversation": ">=0.1.0 <1.0.0",
|
|
38
|
+
"@blue-repository/core": ">=0.1.0 <1.0.0",
|
|
39
|
+
"@blue-repository/myos": ">=0.1.0 <1.0.0"
|
|
38
40
|
}
|
|
39
41
|
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { ContractProcessor, DocumentNode, EventNodePayload, ProcessingResult } from './types';
|
|
2
|
-
import { Blue } from '@blue-labs/language';
|
|
3
|
-
/**
|
|
4
|
-
* BlueDocumentProcessor - Main orchestrator for document processing
|
|
5
|
-
*
|
|
6
|
-
* Orchestrates the document processing pipeline, managing state transitions
|
|
7
|
-
* and event propagation through the registered contract processors.
|
|
8
|
-
*/
|
|
9
|
-
export declare class BlueDocumentProcessor {
|
|
10
|
-
private readonly blue;
|
|
11
|
-
private taskCounter;
|
|
12
|
-
private eventCounter;
|
|
13
|
-
private readonly registry;
|
|
14
|
-
private readonly queue;
|
|
15
|
-
private readonly router;
|
|
16
|
-
private readonly checkpointCache;
|
|
17
|
-
/**
|
|
18
|
-
* Creates a new document processor
|
|
19
|
-
*
|
|
20
|
-
* @param processors - Initial list of processors to register
|
|
21
|
-
*/
|
|
22
|
-
constructor(blue: Blue, processors?: ContractProcessor[]);
|
|
23
|
-
/**
|
|
24
|
-
* Registers a new contract processor
|
|
25
|
-
*
|
|
26
|
-
* @param cp - The processor to register
|
|
27
|
-
* @param orderHint - Optional priority value for execution order
|
|
28
|
-
*/
|
|
29
|
-
register(cp: ContractProcessor, orderHint?: number): void;
|
|
30
|
-
/**
|
|
31
|
-
* Initializes a document by emitting a Document Processing Initiated event
|
|
32
|
-
*
|
|
33
|
-
* @param document - The document to initialize
|
|
34
|
-
* @returns Processing result with final state and emitted events
|
|
35
|
-
*/
|
|
36
|
-
initialize(document: DocumentNode): Promise<ProcessingResult>;
|
|
37
|
-
/**
|
|
38
|
-
* Processes a batch of events against the document
|
|
39
|
-
*
|
|
40
|
-
* @param document - The document to process events against
|
|
41
|
-
* @param incoming - List of event payloads to process
|
|
42
|
-
* @returns Processing result with final state and emitted events
|
|
43
|
-
*/
|
|
44
|
-
processEvents(document: DocumentNode, incoming: EventNodePayload[]): Promise<ProcessingResult>;
|
|
45
|
-
/**
|
|
46
|
-
* Drains the task queue and applies all actions
|
|
47
|
-
*/
|
|
48
|
-
private drainQueue;
|
|
49
|
-
}
|
|
50
|
-
//# sourceMappingURL=BlueDocumentProcessor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BlueDocumentProcessor.d.ts","sourceRoot":"","sources":["../src/BlueDocumentProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,YAAY,EAEZ,gBAAgB,EAChB,gBAAgB,EACjB,MAAM,SAAS,CAAC;AAmBjB,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAI3C;;;;;GAKG;AACH,qBAAa,qBAAqB;IAc9B,OAAO,CAAC,QAAQ,CAAC,IAAI;IAbvB,OAAO,CAAC,WAAW,CAAK;IACxB,OAAO,CAAC,YAAY,CAAK;IACzB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAmB;IAC5C,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAY;IAClC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAc;IACrC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAyB;IAEzD;;;;OAIG;gBAEgB,IAAI,EAAE,IAAI,EAC3B,UAAU,GAAE,iBAAiB,EAAsB;IAkBrD;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,EAAE,iBAAiB,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI;IAIzD;;;;;OAKG;IACG,UAAU,CAAC,QAAQ,EAAE,YAAY,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAyBnE;;;;;;OAMG;IACG,aAAa,CACjB,QAAQ,EAAE,YAAY,EACtB,QAAQ,EAAE,gBAAgB,EAAE,GAC3B,OAAO,CAAC,gBAAgB,CAAC;IA8B5B;;OAEG;YACW,UAAU;CAsFzB"}
|
package/dist/config.d.ts
DELETED
package/dist/config.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE5C,eAAO,MAAM,iBAAiB,EAAE,iBAAiB,EAoBhD,CAAC"}
|
package/dist/context.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { DocumentNode, ProcessingContext, EventNode, ProcessingAction, HandlerTask, BlueNodeGetResult } from './types';
|
|
2
|
-
import { Blue, BlueNodePatch } from '@blue-labs/language';
|
|
3
|
-
export declare class InternalContext implements ProcessingContext {
|
|
4
|
-
private getDocument;
|
|
5
|
-
private taskInfo;
|
|
6
|
-
private blue;
|
|
7
|
-
private onFlush?;
|
|
8
|
-
private readonly actions;
|
|
9
|
-
constructor(getDocument: () => DocumentNode, taskInfo: HandlerTask, blue: Blue, onFlush?: ((actions: ProcessingAction[]) => Promise<void>) | undefined);
|
|
10
|
-
get(path: string): BlueNodeGetResult;
|
|
11
|
-
addPatch(patch: BlueNodePatch): void;
|
|
12
|
-
emitEvent(event: EventNode): void;
|
|
13
|
-
flush(): Promise<ProcessingAction[]>;
|
|
14
|
-
getNodePath(): string;
|
|
15
|
-
resolvePath(path: string): string;
|
|
16
|
-
getTaskInfo(): HandlerTask | undefined;
|
|
17
|
-
getBlue(): Blue;
|
|
18
|
-
loadExternalModule(): Promise<string>;
|
|
19
|
-
loadBlueContent(blueId: string): Promise<string>;
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=context.d.ts.map
|
package/dist/context.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,SAAS,EACT,gBAAgB,EAChB,WAAW,EACX,iBAAiB,EAClB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAE1D,qBAAa,eAAgB,YAAW,iBAAiB;IAIrD,OAAO,CAAC,WAAW;IACnB,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,IAAI;IACZ,OAAO,CAAC,OAAO,CAAC;IANlB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA0B;gBAGxC,WAAW,EAAE,MAAM,YAAY,EAC/B,QAAQ,EAAE,WAAW,EACrB,IAAI,EAAE,IAAI,EACV,OAAO,CAAC,GAAE,CAAC,OAAO,EAAE,gBAAgB,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC,aAAA;IAGlE,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,iBAAiB;IAMpC,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI;IAUpC,SAAS,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI;IAe3B,KAAK,IAAI,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAQ1C,WAAW,IAAI,MAAM;IAIrB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAIjC,WAAW,IAAI,WAAW,GAAG,SAAS;IAItC,OAAO,IAAI,IAAI;IAKf,kBAAkB,IAAI,OAAO,CAAC,MAAM,CAAC;IAIrC,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAQjD"}
|