@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,11 @@
|
|
|
1
|
+
import { SequentialWorkflowStepExecutor, StepExecutionArgs } from '../workflow/step-runner.js';
|
|
2
|
+
export declare class UpdateDocumentStepExecutor implements SequentialWorkflowStepExecutor {
|
|
3
|
+
readonly supportedBlueIds: readonly ["BnnNLCnKF49TUJ1bRfZ5rSMaFw8SVfUNfnE4kJFG7HtM"];
|
|
4
|
+
private readonly evaluator;
|
|
5
|
+
execute(args: StepExecutionArgs): Promise<unknown>;
|
|
6
|
+
private extractChanges;
|
|
7
|
+
private createPatch;
|
|
8
|
+
private normalizeOperation;
|
|
9
|
+
private normalizePath;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=update-document-step-executor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-document-step-executor.d.ts","sourceRoot":"","sources":["../../../../src/registry/processors/steps/update-document-step-executor.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACV,8BAA8B,EAC9B,iBAAiB,EAClB,MAAM,4BAA4B,CAAC;AAWpC,qBAAa,0BACX,YAAW,8BAA8B;IAEzC,QAAQ,CAAC,gBAAgB,4DAAqD;IAE9E,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA0B;IAE9C,OAAO,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC;IA4BxD,OAAO,CAAC,cAAc;IAWtB,OAAO,CAAC,WAAW;IAenB,OAAO,CAAC,kBAAkB;IAgB1B,OAAO,CAAC,aAAa;CAetB"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { ChannelEvaluationContext, ChannelProcessor } from '../types.js';
|
|
2
|
+
import { BlueNode } from '@blue-labs/language';
|
|
3
|
+
import { TimelineChannel } from '../../model/index.js';
|
|
4
|
+
export declare class TimelineChannelProcessor implements ChannelProcessor<TimelineChannel> {
|
|
5
|
+
readonly kind: "channel";
|
|
6
|
+
readonly blueIds: readonly ["AAhZviH8oyst6aKJKUNJS99Q9MnMqtb9DuNRfqv4yFQN"];
|
|
7
|
+
readonly schema: import('zod').ZodObject<import("zod").objectUtil.extendShape<import("zod").objectUtil.extendShape<import("zod").objectUtil.extendShape<{
|
|
8
|
+
description: import('zod').ZodOptional<import('zod').ZodString>;
|
|
9
|
+
name: import('zod').ZodOptional<import('zod').ZodString>;
|
|
10
|
+
order: import('zod').ZodOptional<import('zod').ZodNumber>;
|
|
11
|
+
}, {
|
|
12
|
+
description: import('zod').ZodOptional<import('zod').ZodString>;
|
|
13
|
+
name: import('zod').ZodOptional<import('zod').ZodString>;
|
|
14
|
+
}>, {
|
|
15
|
+
description: import('zod').ZodOptional<import('zod').ZodString>;
|
|
16
|
+
name: import('zod').ZodOptional<import('zod').ZodString>;
|
|
17
|
+
timelineId: import('zod').ZodOptional<import('zod').ZodString>;
|
|
18
|
+
}>, import("zod").objectUtil.extendShape<import("zod").objectUtil.extendShape<import("zod").objectUtil.extendShape<{
|
|
19
|
+
description: import('zod').ZodOptional<import('zod').ZodString>;
|
|
20
|
+
name: import('zod').ZodOptional<import('zod').ZodString>;
|
|
21
|
+
order: import('zod').ZodOptional<import('zod').ZodNumber>;
|
|
22
|
+
}, {
|
|
23
|
+
description: import('zod').ZodOptional<import('zod').ZodString>;
|
|
24
|
+
name: import('zod').ZodOptional<import('zod').ZodString>;
|
|
25
|
+
}>, {
|
|
26
|
+
description: import('zod').ZodOptional<import('zod').ZodString>;
|
|
27
|
+
name: import('zod').ZodOptional<import('zod').ZodString>;
|
|
28
|
+
order: import('zod').ZodOptional<import('zod').ZodNumber>;
|
|
29
|
+
}>, {
|
|
30
|
+
path: import('zod').ZodOptional<import('zod').ZodString>;
|
|
31
|
+
definition: import('zod').ZodOptional<import('zod').ZodType<BlueNode, import('zod').ZodTypeDef, BlueNode>>;
|
|
32
|
+
}>>, "strip", import('zod').ZodTypeAny, {
|
|
33
|
+
path?: string | undefined;
|
|
34
|
+
description?: string | undefined;
|
|
35
|
+
name?: string | undefined;
|
|
36
|
+
order?: number | undefined;
|
|
37
|
+
definition?: BlueNode | undefined;
|
|
38
|
+
timelineId?: string | undefined;
|
|
39
|
+
}, {
|
|
40
|
+
path?: string | undefined;
|
|
41
|
+
description?: string | undefined;
|
|
42
|
+
name?: string | undefined;
|
|
43
|
+
order?: number | undefined;
|
|
44
|
+
definition?: BlueNode | undefined;
|
|
45
|
+
timelineId?: string | undefined;
|
|
46
|
+
}>;
|
|
47
|
+
matches(contract: TimelineChannel, context: ChannelEvaluationContext): boolean;
|
|
48
|
+
channelize(contract: TimelineChannel, context: ChannelEvaluationContext): BlueNode | null | undefined;
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=timeline-channel-processor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timeline-channel-processor.d.ts","sourceRoot":"","sources":["../../../src/registry/processors/timeline-channel-processor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC9E,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAG/C,OAAO,EAEL,KAAK,eAAe,EACrB,MAAM,sBAAsB,CAAC;AAE9B,qBAAa,wBACX,YAAW,gBAAgB,CAAC,eAAe,CAAC;IAE5C,QAAQ,CAAC,IAAI,EAAG,SAAS,CAAU;IACnC,QAAQ,CAAC,OAAO,4DAA0C;IAC1D,QAAQ,CAAC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAAyB;IAExC,OAAO,CACL,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,wBAAwB,GAChC,OAAO;IAkBV,UAAU,CACR,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,wBAAwB,GAChC,QAAQ,GAAG,IAAI,GAAG,SAAS;CAW/B"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BlueNode } from '@blue-labs/language';
|
|
2
|
+
import { Operation } from '@blue-repository/conversation';
|
|
3
|
+
import { ContractProcessorContext } from '../../types.js';
|
|
4
|
+
export declare function extractOperationChannelKey(operation: Operation): string | null;
|
|
5
|
+
export declare function extractPinnedDocumentBlueId(eventNode: BlueNode, context: ContractProcessorContext): string | null;
|
|
6
|
+
//# sourceMappingURL=operation-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operation-utils.d.ts","sourceRoot":"","sources":["../../../../src/registry/processors/utils/operation-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAE/D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAE/D,wBAAgB,0BAA0B,CACxC,SAAS,EAAE,SAAS,GACnB,MAAM,GAAG,IAAI,CAWf;AAED,wBAAgB,2BAA2B,CACzC,SAAS,EAAE,QAAQ,EACnB,OAAO,EAAE,wBAAwB,GAChC,MAAM,GAAG,IAAI,CAMf"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BlueNode, Blue } from '@blue-labs/language';
|
|
2
|
+
import { Operation } from '@blue-repository/conversation';
|
|
3
|
+
import { ContractProcessorContext } from '../../types.js';
|
|
4
|
+
import { SequentialWorkflowOperation } from '../../../model/index.js';
|
|
5
|
+
export type LoadedOperation = {
|
|
6
|
+
operationNode: BlueNode;
|
|
7
|
+
operation: Operation;
|
|
8
|
+
channelKey: string | null;
|
|
9
|
+
};
|
|
10
|
+
export declare function isOperationRequestForContract(contract: SequentialWorkflowOperation, eventNode: BlueNode, context: ContractProcessorContext): boolean;
|
|
11
|
+
export declare function loadOperation(contract: SequentialWorkflowOperation, context: ContractProcessorContext): LoadedOperation | null;
|
|
12
|
+
export declare function channelsCompatible(operationChannelKey: string | null, handlerChannel: string | null): boolean;
|
|
13
|
+
export declare function isRequestTypeCompatible(eventNode: BlueNode, operationNode: BlueNode, blue: Blue): boolean;
|
|
14
|
+
export declare function isPinnedDocumentAllowed(request: {
|
|
15
|
+
allowNewerVersion?: boolean;
|
|
16
|
+
} | null | undefined, eventNode: BlueNode, context: ContractProcessorContext): boolean;
|
|
17
|
+
//# sourceMappingURL=operation-matcher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operation-matcher.d.ts","sourceRoot":"","sources":["../../../../src/registry/processors/workflow/operation-matcher.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAKhD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAE/D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AAM3E,MAAM,MAAM,eAAe,GAAG;IAC5B,aAAa,EAAE,QAAQ,CAAC;IACxB,SAAS,EAAE,SAAS,CAAC;IACrB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B,CAAC;AAEF,wBAAgB,6BAA6B,CAC3C,QAAQ,EAAE,2BAA2B,EACrC,SAAS,EAAE,QAAQ,EACnB,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAsBT;AAED,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,2BAA2B,EACrC,OAAO,EAAE,wBAAwB,GAChC,eAAe,GAAG,IAAI,CAqBxB;AAED,wBAAgB,kBAAkB,CAChC,mBAAmB,EAAE,MAAM,GAAG,IAAI,EAClC,cAAc,EAAE,MAAM,GAAG,IAAI,GAC5B,OAAO,CAST;AAED,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,QAAQ,EACnB,aAAa,EAAE,QAAQ,EACvB,IAAI,EAAE,IAAI,GACT,OAAO,CAiBT;AAED,wBAAgB,uBAAuB,CACrC,OAAO,EAAE;IAAE,iBAAiB,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,IAAI,GAAG,SAAS,EAC3D,SAAS,EAAE,QAAQ,EACnB,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAwBT"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { BlueNode } from '@blue-labs/language';
|
|
2
|
+
import { ContractProcessorContext } from '../../types.js';
|
|
3
|
+
import { SequentialWorkflow } from '../../../model/index.js';
|
|
4
|
+
export type StepResultMap = Record<string, unknown>;
|
|
5
|
+
export interface StepExecutionArgs {
|
|
6
|
+
readonly workflow: SequentialWorkflow;
|
|
7
|
+
readonly stepNode: BlueNode;
|
|
8
|
+
readonly eventNode: BlueNode;
|
|
9
|
+
readonly context: ContractProcessorContext;
|
|
10
|
+
readonly stepResults: StepResultMap;
|
|
11
|
+
readonly stepIndex: number;
|
|
12
|
+
}
|
|
13
|
+
export interface SequentialWorkflowStepExecutor {
|
|
14
|
+
readonly supportedBlueIds: readonly string[];
|
|
15
|
+
execute(args: StepExecutionArgs): unknown | Promise<unknown>;
|
|
16
|
+
}
|
|
17
|
+
export declare const DEFAULT_STEP_EXECUTORS: readonly SequentialWorkflowStepExecutor[];
|
|
18
|
+
export declare class WorkflowStepRunner {
|
|
19
|
+
private readonly executorIndex;
|
|
20
|
+
constructor(executors?: readonly SequentialWorkflowStepExecutor[]);
|
|
21
|
+
run(args: {
|
|
22
|
+
workflow: SequentialWorkflow;
|
|
23
|
+
eventNode: BlueNode;
|
|
24
|
+
context: ContractProcessorContext;
|
|
25
|
+
}): Promise<StepResultMap>;
|
|
26
|
+
private stepResultKey;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=step-runner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"step-runner.d.ts","sourceRoot":"","sources":["../../../../src/registry/processors/workflow/step-runner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAG/C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAKlE,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEpD,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,QAAQ,EAAE,kBAAkB,CAAC;IACtC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,wBAAwB,CAAC;IAC3C,QAAQ,CAAC,WAAW,EAAE,aAAa,CAAC;IACpC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,8BAA8B;IAC7C,QAAQ,CAAC,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7C,OAAO,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAC9D;AAED,eAAO,MAAM,sBAAsB,EAAE,SAAS,8BAA8B,EAKzE,CAAC;AAEJ,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,QAAQ,CAAC,aAAa,CAG5B;gBAGA,SAAS,GAAE,SAAS,8BAA8B,EAA2B;IAWzE,GAAG,CAAC,IAAI,EAAE;QACd,QAAQ,EAAE,kBAAkB,CAAC;QAC7B,SAAS,EAAE,QAAQ,CAAC;QACpB,OAAO,EAAE,wBAAwB,CAAC;KACnC,GAAG,OAAO,CAAC,aAAa,CAAC;IA2C1B,OAAO,CAAC,aAAa;CAOtB"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { ZodType } from 'zod';
|
|
2
|
+
import { BlueNode, Blue } from '@blue-labs/language';
|
|
3
|
+
import { ScopeContractsIndex } from '../types/scope-contracts.js';
|
|
4
|
+
import { JsonPatch } from '../model/shared/json-patch.js';
|
|
5
|
+
import { MarkerContract } from '../model/index.js';
|
|
6
|
+
import { GasMeter } from '../runtime/gas-meter.js';
|
|
7
|
+
export type ContractProcessorKind = 'handler' | 'channel' | 'marker';
|
|
8
|
+
export interface ContractProcessor<TContract> {
|
|
9
|
+
readonly kind: ContractProcessorKind;
|
|
10
|
+
readonly blueIds: readonly string[];
|
|
11
|
+
readonly schema: ZodType<TContract>;
|
|
12
|
+
}
|
|
13
|
+
export interface ContractProcessorContext {
|
|
14
|
+
readonly scopePath: string;
|
|
15
|
+
readonly blue: Blue;
|
|
16
|
+
event(): BlueNode | null;
|
|
17
|
+
applyPatch(patch: JsonPatch): Promise<void>;
|
|
18
|
+
emitEvent(emission: BlueNode): void;
|
|
19
|
+
consumeGas(units: number): void;
|
|
20
|
+
gasMeter(): GasMeter;
|
|
21
|
+
throwFatal(reason: string): never;
|
|
22
|
+
resolvePointer(relativePointer: string): string;
|
|
23
|
+
documentAt(absolutePointer: string): BlueNode | null;
|
|
24
|
+
documentContains(absolutePointer: string): boolean;
|
|
25
|
+
terminateGracefully(reason: string | null): Promise<void>;
|
|
26
|
+
terminateFatally(reason: string | null): Promise<void>;
|
|
27
|
+
}
|
|
28
|
+
export interface HandlerProcessor<TContract> extends ContractProcessor<TContract> {
|
|
29
|
+
readonly kind: 'handler';
|
|
30
|
+
/**
|
|
31
|
+
* Optional sync hook to compute channel key when contract omitted it.
|
|
32
|
+
*/
|
|
33
|
+
deriveChannel?(contract: TContract, deps: {
|
|
34
|
+
blue: Blue;
|
|
35
|
+
scopeContracts: ScopeContractsIndex;
|
|
36
|
+
}): string | null | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Optional guard to determine whether the handler should execute
|
|
39
|
+
* for the provided event within the current context.
|
|
40
|
+
*/
|
|
41
|
+
matches?(contract: TContract, context: ContractProcessorContext): boolean | Promise<boolean>;
|
|
42
|
+
execute(contract: TContract, context: ContractProcessorContext): void | Promise<void>;
|
|
43
|
+
}
|
|
44
|
+
export interface ChannelEvaluationContext {
|
|
45
|
+
readonly scopePath: string;
|
|
46
|
+
readonly blue: Blue;
|
|
47
|
+
/**
|
|
48
|
+
* Mutable clone of the inbound event. Channel processors may adapt it in-place.
|
|
49
|
+
*/
|
|
50
|
+
readonly event: BlueNode | null;
|
|
51
|
+
readonly markers: ReadonlyMap<string, MarkerContract>;
|
|
52
|
+
/**
|
|
53
|
+
* Key assigned to the contract within the scope's contract map.
|
|
54
|
+
*/
|
|
55
|
+
readonly bindingKey: string;
|
|
56
|
+
}
|
|
57
|
+
export interface ChannelProcessor<TContract> extends ContractProcessor<TContract> {
|
|
58
|
+
readonly kind: 'channel';
|
|
59
|
+
matches(contract: TContract, context: ChannelEvaluationContext): boolean | Promise<boolean>;
|
|
60
|
+
/**
|
|
61
|
+
* Optional: Provide a channelized event for handlers without mutating the inbound event.
|
|
62
|
+
* When provided, the engine will deliver this node to handlers while computing
|
|
63
|
+
* checkpoint signatures and storage from the original external event.
|
|
64
|
+
*/
|
|
65
|
+
channelize?(contract: TContract, context: ChannelEvaluationContext): BlueNode | null | undefined;
|
|
66
|
+
}
|
|
67
|
+
export interface MarkerProcessor<TContract> extends ContractProcessor<TContract> {
|
|
68
|
+
readonly kind: 'marker';
|
|
69
|
+
}
|
|
70
|
+
export type AnyContractProcessor = HandlerProcessor<unknown> | ChannelProcessor<unknown> | MarkerProcessor<unknown>;
|
|
71
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/registry/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAEhD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAEvE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD,MAAM,MAAM,qBAAqB,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;AAErE,MAAM,WAAW,iBAAiB,CAAC,SAAS;IAC1C,QAAQ,CAAC,IAAI,EAAE,qBAAqB,CAAC;IACrC,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;CACrC;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;IACpB,KAAK,IAAI,QAAQ,GAAG,IAAI,CAAC;IACzB,UAAU,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;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G;IACH,QAAQ,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI,CAAC;IAChC,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IACtD;;OAEG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,gBAAgB,CAAC,SAAS,CACzC,SAAQ,iBAAiB,CAAC,SAAS,CAAC;IACpC,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,OAAO,CACL,QAAQ,EAAE,SAAS,EACnB,OAAO,EAAE,wBAAwB,GAChC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC9B;;;;OAIG;IACH,UAAU,CAAC,CACT,QAAQ,EAAE,SAAS,EACnB,OAAO,EAAE,wBAAwB,GAChC,QAAQ,GAAG,IAAI,GAAG,SAAS,CAAC;CAChC;AAED,MAAM,WAAW,eAAe,CAAC,SAAS,CACxC,SAAQ,iBAAiB,CAAC,SAAS,CAAC;IACpC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;CACzB;AAED,MAAM,MAAM,oBAAoB,GAC5B,gBAAgB,CAAC,OAAO,CAAC,GACzB,gBAAgB,CAAC,OAAO,CAAC,GACzB,eAAe,CAAC,OAAO,CAAC,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Blue, BlueNode } from '@blue-labs/language';
|
|
2
|
+
import { JsonPatch } from '../model/shared/json-patch.js';
|
|
3
|
+
import { PatchResult } from './patch-engine.js';
|
|
4
|
+
import { GasMeter } from './gas-meter.js';
|
|
5
|
+
import { ScopeRuntimeContext } from './scope-runtime-context.js';
|
|
6
|
+
export type DocumentUpdateData = PatchResult;
|
|
7
|
+
export declare class DocumentProcessingRuntime {
|
|
8
|
+
private readonly documentRef;
|
|
9
|
+
private readonly blueRef;
|
|
10
|
+
private readonly patchEngine;
|
|
11
|
+
private readonly emissionRegistry;
|
|
12
|
+
private readonly meter;
|
|
13
|
+
private runTerminated;
|
|
14
|
+
constructor(documentRef: BlueNode, blueRef: Blue);
|
|
15
|
+
document(): BlueNode;
|
|
16
|
+
scopes(): Map<string, ScopeRuntimeContext>;
|
|
17
|
+
scope(scopePath: string): ScopeRuntimeContext;
|
|
18
|
+
existingScope(scopePath: string): ScopeRuntimeContext | undefined;
|
|
19
|
+
rootEmissions(): readonly BlueNode[];
|
|
20
|
+
recordRootEmission(emission: BlueNode): void;
|
|
21
|
+
addGas(amount: number): void;
|
|
22
|
+
blue(): Blue;
|
|
23
|
+
gasMeter(): GasMeter;
|
|
24
|
+
totalGas(): number;
|
|
25
|
+
isRunTerminated(): boolean;
|
|
26
|
+
markRunTerminated(): void;
|
|
27
|
+
isScopeTerminated(scopePath: string): boolean;
|
|
28
|
+
directWrite(path: string, value: BlueNode | null): void;
|
|
29
|
+
applyPatch(originScopePath: string, patch: JsonPatch): DocumentUpdateData;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=document-processing-runtime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-processing-runtime.d.ts","sourceRoot":"","sources":["../../src/runtime/document-processing-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAe,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAElE,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEjE,MAAM,MAAM,kBAAkB,GAAG,WAAW,CAAC;AAE7C,qBAAa,yBAAyB;IAOlC,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,OAAO;IAP1B,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAc;IAC1C,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAA0B;IAC3D,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAW;IACjC,OAAO,CAAC,aAAa,CAAS;gBAGX,WAAW,EAAE,QAAQ,EACrB,OAAO,EAAE,IAAI;IAMhC,QAAQ,IAAI,QAAQ;IAIpB,MAAM,IAAI,GAAG,CAAC,MAAM,EAAE,mBAAmB,CAAC;IAI1C,KAAK,CAAC,SAAS,EAAE,MAAM,GAAG,mBAAmB;IAI7C,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,mBAAmB,GAAG,SAAS;IAIjE,aAAa,IAAI,SAAS,QAAQ,EAAE;IAIpC,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI;IAI5C,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAI5B,IAAI,IAAI,IAAI;IAIZ,QAAQ,IAAI,QAAQ;IAIpB,QAAQ,IAAI,MAAM;IAIlB,eAAe,IAAI,OAAO;IAI1B,iBAAiB,IAAI,IAAI;IAIzB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO;IAI7C,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,GAAG,IAAI,GAAG,IAAI;IAIvD,UAAU,CAAC,eAAe,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,GAAG,kBAAkB;CAG1E"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BlueNode } from '@blue-labs/language';
|
|
2
|
+
import { ScopeRuntimeContext } from './scope-runtime-context.js';
|
|
3
|
+
export declare class EmissionRegistry {
|
|
4
|
+
private readonly scopesMap;
|
|
5
|
+
private readonly rootEmissionList;
|
|
6
|
+
scopes(): Map<string, ScopeRuntimeContext>;
|
|
7
|
+
scope(scopePath: string): ScopeRuntimeContext;
|
|
8
|
+
existingScope(scopePath: string): ScopeRuntimeContext | undefined;
|
|
9
|
+
rootEmissions(): readonly BlueNode[];
|
|
10
|
+
recordRootEmission(emission: BlueNode): void;
|
|
11
|
+
isScopeTerminated(scopePath: string): boolean;
|
|
12
|
+
clearScope(scopePath: string): void;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=emission-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emission-registry.d.ts","sourceRoot":"","sources":["../../src/runtime/emission-registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEjE,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA0C;IACpE,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAkB;IAEnD,MAAM,IAAI,GAAG,CAAC,MAAM,EAAE,mBAAmB,CAAC;IAI1C,KAAK,CAAC,SAAS,EAAE,MAAM,GAAG,mBAAmB;IAS7C,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,mBAAmB,GAAG,SAAS;IAIjE,aAAa,IAAI,SAAS,QAAQ,EAAE;IAIpC,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI;IAI5C,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO;IAI7C,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;CAGpC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare function ceil100(n: number): number;
|
|
2
|
+
export declare function utf8(text: string): number;
|
|
3
|
+
export declare function pointerDepth(absPointer: string): number;
|
|
4
|
+
export declare function jsCodeBaseAmount(code: string): number;
|
|
5
|
+
export declare function updateDocumentBaseAmount(changesetLength: number): number;
|
|
6
|
+
export declare function expressionAmount(expression: string): number;
|
|
7
|
+
export declare function templateAmount(placeholderCount: number, template: string): number;
|
|
8
|
+
export declare function documentSnapshotAmount(absPointer: string, snapshotBytes: number): number;
|
|
9
|
+
//# sourceMappingURL=gas-helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gas-helpers.d.ts","sourceRoot":"","sources":["../../src/runtime/gas-helpers.ts"],"names":[],"mappings":"AAEA,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAEzC;AAED,wBAAgB,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEzC;AAED,wBAAgB,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAMvD;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAErD;AAED,wBAAgB,wBAAwB,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,CAExE;AAED,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAE3D;AAED,wBAAgB,cAAc,CAC5B,gBAAgB,EAAE,MAAM,EACxB,QAAQ,EAAE,MAAM,GACf,MAAM,CAER;AAED,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,MAAM,GACpB,MAAM,CAER"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Blue, BlueNode } from '@blue-labs/language';
|
|
2
|
+
export declare class GasMeter {
|
|
3
|
+
private readonly blue;
|
|
4
|
+
private total;
|
|
5
|
+
constructor(blue: Blue);
|
|
6
|
+
totalGas(): number;
|
|
7
|
+
add(amount: number): void;
|
|
8
|
+
chargeScopeEntry(scopePath: string): void;
|
|
9
|
+
chargeInitialization(): void;
|
|
10
|
+
chargeChannelMatchAttempt(): void;
|
|
11
|
+
chargeHandlerOverhead(): void;
|
|
12
|
+
chargeBoundaryCheck(): void;
|
|
13
|
+
chargePatchAddOrReplace(value: BlueNode | null | undefined): void;
|
|
14
|
+
chargePatchRemove(): void;
|
|
15
|
+
chargeCascadeRouting(scopeCount: number): void;
|
|
16
|
+
chargeEmitEvent(event: BlueNode | null | undefined): void;
|
|
17
|
+
chargeBridge(): void;
|
|
18
|
+
chargeDrainEvent(): void;
|
|
19
|
+
chargeCheckpointUpdate(): void;
|
|
20
|
+
chargeTerminationMarker(): void;
|
|
21
|
+
chargeLifecycleDelivery(): void;
|
|
22
|
+
chargeFatalTerminationOverhead(): void;
|
|
23
|
+
chargeJavaScriptCodeBase(code: string): void;
|
|
24
|
+
chargeTriggerEventBase(): void;
|
|
25
|
+
chargeUpdateDocumentBase(changesLen: number): void;
|
|
26
|
+
chargeExpression(expression: string): void;
|
|
27
|
+
chargeTemplate(placeholderCount: number, template: string): void;
|
|
28
|
+
chargeDocumentSnapshot(absPointer: string, snapshot: BlueNode | null | undefined): void;
|
|
29
|
+
private payloadSizeCharge;
|
|
30
|
+
private scopeDepth;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=gas-meter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gas-meter.d.ts","sourceRoot":"","sources":["../../src/runtime/gas-meter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAyCrD,qBAAa,QAAQ;IAGP,OAAO,CAAC,QAAQ,CAAC,IAAI;IAFjC,OAAO,CAAC,KAAK,CAAK;gBAEW,IAAI,EAAE,IAAI;IAEvC,QAAQ,IAAI,MAAM;IAIlB,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAIzB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAIzC,oBAAoB,IAAI,IAAI;IAI5B,yBAAyB,IAAI,IAAI;IAIjC,qBAAqB,IAAI,IAAI;IAI7B,mBAAmB,IAAI,IAAI;IAI3B,uBAAuB,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI;IAIjE,iBAAiB,IAAI,IAAI;IAIzB,oBAAoB,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IAM9C,eAAe,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI;IAIzD,YAAY,IAAI,IAAI;IAIpB,gBAAgB,IAAI,IAAI;IAIxB,sBAAsB,IAAI,IAAI;IAI9B,uBAAuB,IAAI,IAAI;IAI/B,uBAAuB,IAAI,IAAI;IAI/B,8BAA8B,IAAI,IAAI;IAItC,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAI5C,sBAAsB,IAAI,IAAI;IAI9B,wBAAwB,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IAIlD,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IAI1C,cAAc,CAAC,gBAAgB,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI;IAIhE,sBAAsB,CACpB,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,QAAQ,GAAG,IAAI,GAAG,SAAS,GACpC,IAAI;IAKP,OAAO,CAAC,iBAAiB;IAQzB,OAAO,CAAC,UAAU;CAanB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/runtime/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kCAAkC,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { BlueNode } from '@blue-labs/language';
|
|
2
|
+
import { JsonPatch } from '../model/shared/json-patch.js';
|
|
3
|
+
type PatchOp = 'add' | 'replace' | 'remove';
|
|
4
|
+
export interface PatchResult {
|
|
5
|
+
readonly path: string;
|
|
6
|
+
readonly before: BlueNode | null;
|
|
7
|
+
readonly after: BlueNode | null;
|
|
8
|
+
readonly op: PatchOp;
|
|
9
|
+
readonly originScope: string;
|
|
10
|
+
readonly cascadeScopes: readonly string[];
|
|
11
|
+
}
|
|
12
|
+
export declare class PatchEngine {
|
|
13
|
+
private document;
|
|
14
|
+
constructor(document: BlueNode);
|
|
15
|
+
applyPatch(originScopePath: string, patch: JsonPatch): PatchResult;
|
|
16
|
+
directWrite(path: string, value: BlueNode | null): void;
|
|
17
|
+
private directWriteArray;
|
|
18
|
+
private directWriteObject;
|
|
19
|
+
private resolveParent;
|
|
20
|
+
private getOrCreateChild;
|
|
21
|
+
private applyAdd;
|
|
22
|
+
private applyReplace;
|
|
23
|
+
private applyRemove;
|
|
24
|
+
private resolveParentForPatch;
|
|
25
|
+
private rollbackCreated;
|
|
26
|
+
}
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=patch-engine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"patch-engine.d.ts","sourceRoot":"","sources":["../../src/runtime/patch-engine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAK/D,KAAK,OAAO,GAAG,KAAK,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE5C,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,QAAQ,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI,CAAC;IAChC,QAAQ,CAAC,EAAE,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,aAAa,EAAE,SAAS,MAAM,EAAE,CAAC;CAC3C;AAED,qBAAa,WAAW;IACV,OAAO,CAAC,QAAQ;gBAAR,QAAQ,EAAE,QAAQ;IAEtC,UAAU,CAAC,eAAe,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,GAAG,WAAW;IA8BlE,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,GAAG,IAAI,GAAG,IAAI;IAsBvD,OAAO,CAAC,gBAAgB;IAiCxB,OAAO,CAAC,iBAAiB;IAiBzB,OAAO,CAAC,aAAa;IAerB,OAAO,CAAC,gBAAgB;IAsCxB,OAAO,CAAC,QAAQ;IA+ChB,OAAO,CAAC,YAAY;IAqCpB,OAAO,CAAC,WAAW;IAoCnB,OAAO,CAAC,qBAAqB;IAuD7B,OAAO,CAAC,eAAe;CAiBxB"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { BlueNode } from '@blue-labs/language';
|
|
2
|
+
export type TerminationKind = 'GRACEFUL' | 'FATAL';
|
|
3
|
+
export declare class ScopeRuntimeContext {
|
|
4
|
+
private readonly path;
|
|
5
|
+
private readonly triggeredQueue;
|
|
6
|
+
private readonly bridgeableEvents;
|
|
7
|
+
private terminated;
|
|
8
|
+
private terminationKindValue;
|
|
9
|
+
private terminationReasonValue;
|
|
10
|
+
private cutOff;
|
|
11
|
+
private triggeredLimit;
|
|
12
|
+
private bridgeableLimit;
|
|
13
|
+
constructor(path: string);
|
|
14
|
+
scopePath(): string;
|
|
15
|
+
enqueueTriggered(node: BlueNode): void;
|
|
16
|
+
pollTriggered(): BlueNode | undefined;
|
|
17
|
+
peekTriggered(): BlueNode | undefined;
|
|
18
|
+
clearTriggered(): void;
|
|
19
|
+
triggeredSize(): number;
|
|
20
|
+
triggeredIsEmpty(): boolean;
|
|
21
|
+
triggeredSnapshot(): readonly BlueNode[];
|
|
22
|
+
recordBridgeable(node: BlueNode): void;
|
|
23
|
+
drainBridgeableEvents(): BlueNode[];
|
|
24
|
+
isTerminated(): boolean;
|
|
25
|
+
terminationKind(): TerminationKind | null;
|
|
26
|
+
terminationReason(): string | null;
|
|
27
|
+
finalizeTermination(kind: TerminationKind, reason?: string | null): void;
|
|
28
|
+
markCutOff(): void;
|
|
29
|
+
isCutOff(): boolean;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=scope-runtime-context.d.ts.map
|
|
@@ -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
import { Blue } from '@blue-labs/language';
|
|
2
|
+
export declare function createBlue(): Blue;
|
|
3
|
+
export declare const blueIds: {
|
|
4
|
+
readonly Boolean: "4EzhSubEimSQD3zrYHRtobfPPWntUuhEz8YcdxHsi12u";
|
|
5
|
+
readonly Channel: "EF9xc9RMMXusRaumQebVUUhwtp1Do6QBYYo6URRhg2yv";
|
|
6
|
+
readonly 'Channel Event Checkpoint': "B7YQeYdQzUNuzaDQ4tNTd2iJqgd4YnVQkgz4QgymDWWU";
|
|
7
|
+
readonly Contract: "AERp8BWnuUsjoPciAeNXuUWS9fmqPNMdWbxmKn3tcitx";
|
|
8
|
+
readonly Dictionary: "G7fBT9PSod1RfHLHkpafAGBDVAJMrMhAMY51ERcyXNrj";
|
|
9
|
+
readonly 'Document Processing Initiated': "BrpmpNt5JkapeUvPqYcxgXZrHNZX3R757dRwuXXdfNM2";
|
|
10
|
+
readonly 'Document Processing Terminated': "5AJiAUgiSDwfCzv9rCYKNaAJu1hm8BXFu7eLNAEHNACr";
|
|
11
|
+
readonly 'Document Update': "7htwgHAXA9FjUGRytXFfwYMUZz4R3BDMfmeHeGvpscLP";
|
|
12
|
+
readonly 'Document Update Channel': "J5QdSiiU4zBjMeFYBn8EH4bsY4K5rrmiGfGswn9rwRz1";
|
|
13
|
+
readonly Double: "7pwXmXYCJtWnd348c2JQGBkm9C4renmZRwxbfaypsx5y";
|
|
14
|
+
readonly 'Embedded Node Channel': "BnyRD7rxxRV3G4co3tVvXTpuXT383UMuRoDsLvZcPsjD";
|
|
15
|
+
readonly Handler: "9ZE5pGjtSGJgWJG7iAVz4iPEz5CatceX3yb3qp5MpAKJ";
|
|
16
|
+
readonly Integer: "5WNMiV9Knz63B4dVY5JtMyh3FB4FSGqv7ceScvuapdE1";
|
|
17
|
+
readonly 'Json Patch Entry': "Bz49DbfqKC1yJeCfv5RYPZUKTfb7rtZnmreCaz4RsXn5";
|
|
18
|
+
readonly 'Lifecycle Event Channel': "Er9zZ7Yoii7D5j8PdvMYouH2TTVnHmcukFWVqJTam3To";
|
|
19
|
+
readonly List: "6aehfNAxHLC1PHHoDr3tYtFH3RWNbiWdFancJ1bypXEY";
|
|
20
|
+
readonly Marker: "7QACj919YMRvFCTELCf6jfQTp41RVhtHdE6bPazLUZQ6";
|
|
21
|
+
readonly 'Process Embedded': "Hu4XkfvyXLSdfFNUwuXebEu3oJeWcMyhBTcRV9AQyKPC";
|
|
22
|
+
readonly 'Processing Initialized Marker': "EVguxFmq5iFtMZaBQgHfjWDojaoesQ1vEXCQFZ59yL28";
|
|
23
|
+
readonly 'Processing Terminated Marker': "5NiEhupJ6uF54Q3vs4GwQX4UX4ExtwHpKRVvjKEHtvjR";
|
|
24
|
+
readonly Text: "DLRQwz7MQeCrzjy9bohPNwtCxKEBbKaMK65KBrwjfG6K";
|
|
25
|
+
readonly 'Triggered Event Channel': "716Uk7KPeunnc9PK48hNBDfRb9qsKrFCAZEcU92R169m";
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=blue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blue.d.ts","sourceRoot":"","sources":["../../src/test-support/blue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAQ3C,wBAAgB,UAAU,IAAI,IAAI,CAIjC;AAED,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;CAAc,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Blue, BlueNode } from '@blue-labs/language';
|
|
2
|
+
import { ProcessorExecution } from '../engine/processor-engine.js';
|
|
3
|
+
import { ContractBundle } from '../engine/contract-bundle.js';
|
|
4
|
+
import { ContractProcessorContext } from '../registry/types.js';
|
|
5
|
+
import { StepExecutionArgs } from '../registry/processors/workflow/step-runner.js';
|
|
6
|
+
export declare function createRealContext(blue: Blue, eventNode: BlueNode, document?: BlueNode | null): {
|
|
7
|
+
execution: ProcessorExecution;
|
|
8
|
+
bundle: ContractBundle;
|
|
9
|
+
context: ContractProcessorContext;
|
|
10
|
+
};
|
|
11
|
+
export declare function createArgs(options: {
|
|
12
|
+
context: ContractProcessorContext;
|
|
13
|
+
stepNode: BlueNode;
|
|
14
|
+
eventNode: BlueNode;
|
|
15
|
+
stepResults?: Record<string, unknown>;
|
|
16
|
+
stepIndex?: number;
|
|
17
|
+
}): StepExecutionArgs;
|
|
18
|
+
//# sourceMappingURL=workflow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../../src/test-support/workflow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAGrD,OAAO,EAEL,kBAAkB,EACnB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAC;AAExF,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,QAAQ,EACnB,QAAQ,CAAC,EAAE,QAAQ,GAAG,IAAI,GACzB;IACD,SAAS,EAAE,kBAAkB,CAAC;IAC9B,MAAM,EAAE,cAAc,CAAC;IACvB,OAAO,EAAE,wBAAwB,CAAC;CACnC,CAgBA;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE;IAClC,OAAO,EAAE,wBAAwB,CAAC;IAClC,QAAQ,EAAE,QAAQ,CAAC;IACnB,SAAS,EAAE,QAAQ,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,iBAAiB,CAmBpB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BlueNode } from '@blue-labs/language';
|
|
2
|
+
export interface DocumentProcessingResult {
|
|
3
|
+
readonly document: BlueNode;
|
|
4
|
+
readonly triggeredEvents: readonly BlueNode[];
|
|
5
|
+
readonly totalGas: number;
|
|
6
|
+
readonly capabilityFailure: boolean;
|
|
7
|
+
readonly failureReason: string | null;
|
|
8
|
+
}
|
|
9
|
+
export declare const DocumentProcessingResult: {
|
|
10
|
+
readonly of: (document: BlueNode, triggeredEvents: readonly BlueNode[], totalGas: number) => DocumentProcessingResult;
|
|
11
|
+
readonly capabilityFailure: (document: BlueNode, reason: string | null) => DocumentProcessingResult;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=document-processing-result.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-processing-result.d.ts","sourceRoot":"","sources":["../../src/types/document-processing-result.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,QAAQ,CAAC,eAAe,EAAE,SAAS,QAAQ,EAAE,CAAC;IAC9C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,iBAAiB,EAAE,OAAO,CAAC;IACpC,QAAQ,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;CACvC;AAmCD,eAAO,MAAM,wBAAwB;4BA3BvB,QAAQ,mBACD,SAAS,QAAQ,EAAE,YAC1B,MAAM,KACf,wBAAwB;2CAWf,QAAQ,UACV,MAAM,GAAG,IAAI,KACpB,wBAAwB;CAWoB,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export interface CapabilityFailureError {
|
|
2
|
+
readonly kind: 'CapabilityFailure';
|
|
3
|
+
readonly capability: string;
|
|
4
|
+
readonly reason: string;
|
|
5
|
+
readonly details?: unknown;
|
|
6
|
+
}
|
|
7
|
+
export interface BoundaryViolationError {
|
|
8
|
+
readonly kind: 'BoundaryViolation';
|
|
9
|
+
readonly pointer: string;
|
|
10
|
+
readonly reason: string;
|
|
11
|
+
}
|
|
12
|
+
export interface RuntimeFatalError {
|
|
13
|
+
readonly kind: 'RuntimeFatal';
|
|
14
|
+
readonly reason: string;
|
|
15
|
+
readonly cause?: unknown;
|
|
16
|
+
}
|
|
17
|
+
export interface InvalidContractError {
|
|
18
|
+
readonly kind: 'InvalidContract';
|
|
19
|
+
readonly contractId: string;
|
|
20
|
+
readonly reason: string;
|
|
21
|
+
readonly pointer?: string;
|
|
22
|
+
readonly details?: unknown;
|
|
23
|
+
}
|
|
24
|
+
export interface IllegalStateError {
|
|
25
|
+
readonly kind: 'IllegalState';
|
|
26
|
+
readonly reason: string;
|
|
27
|
+
}
|
|
28
|
+
export interface UnsupportedOpError {
|
|
29
|
+
readonly kind: 'UnsupportedOp';
|
|
30
|
+
readonly operation: string;
|
|
31
|
+
readonly reason?: string;
|
|
32
|
+
}
|
|
33
|
+
export type ProcessorError = CapabilityFailureError | BoundaryViolationError | RuntimeFatalError | InvalidContractError | IllegalStateError | UnsupportedOpError;
|
|
34
|
+
export declare const ProcessorErrors: {
|
|
35
|
+
readonly capabilityFailure: (capability: string, reason: string, details?: unknown) => CapabilityFailureError;
|
|
36
|
+
readonly boundaryViolation: (pointer: string, reason: string) => BoundaryViolationError;
|
|
37
|
+
readonly runtimeFatal: (reason: string, cause?: unknown) => RuntimeFatalError;
|
|
38
|
+
readonly invalidContract: (contractId: string, reason: string, pointer?: string, details?: unknown) => InvalidContractError;
|
|
39
|
+
readonly illegalState: (reason: string) => IllegalStateError;
|
|
40
|
+
readonly unsupported: (operation: string, reason?: string) => UnsupportedOpError;
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/types/errors.ts"],"names":[],"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B,eAAO,MAAM,eAAe;6CAEZ,MAAM,UACV,MAAM,YACJ,OAAO,KAChB,sBAAsB;0CAGE,MAAM,UAAU,MAAM,KAAG,sBAAsB;oCAGrD,MAAM,UAAU,OAAO,KAAG,iBAAiB;2CAIlD,MAAM,UACV,MAAM,YACJ,MAAM,YACN,OAAO,KAChB,oBAAoB;oCAGF,MAAM,KAAG,iBAAiB;sCAGxB,MAAM,WAAW,MAAM,KAAG,kBAAkB;CAG3D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,iCAAiC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface Ok<T> {
|
|
2
|
+
readonly ok: true;
|
|
3
|
+
readonly value: T;
|
|
4
|
+
}
|
|
5
|
+
export interface Err<E> {
|
|
6
|
+
readonly ok: false;
|
|
7
|
+
readonly error: E;
|
|
8
|
+
}
|
|
9
|
+
export type Result<T, E> = Ok<T> | Err<E>;
|
|
10
|
+
export declare function ok<T>(value: T): Ok<T>;
|
|
11
|
+
export declare function err<E>(error: E): Err<E>;
|
|
12
|
+
export declare function isOk<T, E>(result: Result<T, E>): result is Ok<T>;
|
|
13
|
+
export declare function isErr<T, E>(result: Result<T, E>): result is Err<E>;
|
|
14
|
+
export declare function map<T, E, U>(result: Result<T, E>, mapper: (value: T) => U): Result<U, E>;
|
|
15
|
+
export declare function mapErr<T, E, F>(result: Result<T, E>, mapper: (error: E) => F): Result<T, F>;
|
|
16
|
+
export declare function andThen<T, E, U>(result: Result<T, E>, mapper: (value: T) => Result<U, E>): Result<U, E>;
|
|
17
|
+
export declare function unwrapOr<T, E>(result: Result<T, E>, fallback: T): T;
|
|
18
|
+
export declare function unwrapOrElse<T, E>(result: Result<T, E>, getFallback: (error: E) => T): T;
|
|
19
|
+
export declare function match<T, E, U>(result: Result<T, E>, handlers: {
|
|
20
|
+
readonly ok: (value: T) => U;
|
|
21
|
+
readonly err: (error: E) => U;
|
|
22
|
+
}): U;
|
|
23
|
+
//# sourceMappingURL=result.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"result.d.ts","sourceRoot":"","sources":["../../src/types/result.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,EAAE,CAAC,CAAC;IACnB,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAClB,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC;CACnB;AAED,MAAM,WAAW,GAAG,CAAC,CAAC;IACpB,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IACnB,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC;CACnB;AAED,MAAM,MAAM,MAAM,CAAC,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;AAE1C,wBAAgB,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAErC;AAED,wBAAgB,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAEvC;AAED,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,MAAM,IAAI,EAAE,CAAC,CAAC,CAAC,CAEhE;AAED,wBAAgB,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,MAAM,IAAI,GAAG,CAAC,CAAC,CAAC,CAElE;AAED,wBAAgB,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EACzB,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EACpB,MAAM,EAAE,CAAC,KAAK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ractEntry {
|
|
3
|
+
readonly node: BlueNode;
|
|
4
|
+
readonly nodeTypeBlueId: string;
|
|
5
|
+
}
|
|
6
|
+
export type ScopeContractsIndex = ReadonlyMap<string, ScopeContractEntry>;
|
|
7
|
+
//# sourceMappingURL=scope-contracts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope-contracts.d.ts","sourceRoot":"","sources":["../../src/types/scope-contracts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;CACjC;AAED,MAAM,MAAM,mBAAmB,GAAG,WAAW,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exceptions.d.ts","sourceRoot":"","sources":["../../../src/util/expression/exceptions.ts"],"names":[],"mappings":"AASA,qBAAa,wBAAyB,SAAQ,KAAK;IAE/C,QAAQ,CAAC,IAAI,EAAE,MAAM;aACH,KAAK,CAAC,EAAE,OAAO;gBADxB,IAAI,EAAE,MAAM,EACH,KAAK,CAAC,EAAE,OAAO,YAAA;CAKpC"}
|