@shajara/kernel 0.1.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 +28 -0
- package/README.md +67 -0
- package/dist/.vite/license.md +27 -0
- package/dist/contracts/context-key.d.ts +10 -0
- package/dist/contracts/context-key.d.ts.map +1 -0
- package/dist/contracts/failure.d.ts +5 -0
- package/dist/contracts/failure.d.ts.map +1 -0
- package/dist/contracts/future-key.d.ts +16 -0
- package/dist/contracts/future-key.d.ts.map +1 -0
- package/dist/contracts/index.d.ts +11 -0
- package/dist/contracts/index.d.ts.map +1 -0
- package/dist/contracts/message-key.d.ts +10 -0
- package/dist/contracts/message-key.d.ts.map +1 -0
- package/dist/contracts/process.d.ts +7 -0
- package/dist/contracts/process.d.ts.map +1 -0
- package/dist/contracts/scope.d.ts +7 -0
- package/dist/contracts/scope.d.ts.map +1 -0
- package/dist/contracts/sigil.d.ts +7 -0
- package/dist/contracts/sigil.d.ts.map +1 -0
- package/dist/contracts/suppressor.d.ts +4 -0
- package/dist/contracts/suppressor.d.ts.map +1 -0
- package/dist/contracts/token.d.ts +4 -0
- package/dist/contracts/token.d.ts.map +1 -0
- package/dist/contracts/wisp.d.ts +19 -0
- package/dist/contracts/wisp.d.ts.map +1 -0
- package/dist/executor/autonomy.d.ts +24 -0
- package/dist/executor/autonomy.d.ts.map +1 -0
- package/dist/executor/domain-interpreter.d.ts +15 -0
- package/dist/executor/domain-interpreter.d.ts.map +1 -0
- package/dist/executor/domains/domain.d.ts +14 -0
- package/dist/executor/domains/domain.d.ts.map +1 -0
- package/dist/executor/domains/index.d.ts +4 -0
- package/dist/executor/domains/index.d.ts.map +1 -0
- package/dist/executor/domains/reaper.d.ts +26 -0
- package/dist/executor/domains/reaper.d.ts.map +1 -0
- package/dist/executor/domains/scheduler.d.ts +15 -0
- package/dist/executor/domains/scheduler.d.ts.map +1 -0
- package/dist/executor/execution-scope.d.ts +7 -0
- package/dist/executor/execution-scope.d.ts.map +1 -0
- package/dist/executor/executor-driver.d.ts +14 -0
- package/dist/executor/executor-driver.d.ts.map +1 -0
- package/dist/executor/executor.d.ts +13 -0
- package/dist/executor/executor.d.ts.map +1 -0
- package/dist/executor/fault-sink.d.ts +12 -0
- package/dist/executor/fault-sink.d.ts.map +1 -0
- package/dist/executor/index.d.ts +8 -0
- package/dist/executor/index.d.ts.map +1 -0
- package/dist/executor/launch-handle.d.ts +33 -0
- package/dist/executor/launch-handle.d.ts.map +1 -0
- package/dist/executor/pacer.d.ts +9 -0
- package/dist/executor/pacer.d.ts.map +1 -0
- package/dist/executor/primitives/autonomy.d.ts +4 -0
- package/dist/executor/primitives/autonomy.d.ts.map +1 -0
- package/dist/executor/primitives/index.d.ts +2 -0
- package/dist/executor/primitives/index.d.ts.map +1 -0
- package/dist/executor/processor.d.ts +9 -0
- package/dist/executor/processor.d.ts.map +1 -0
- package/dist/executor/round-limit-reaper.d.ts +11 -0
- package/dist/executor/round-limit-reaper.d.ts.map +1 -0
- package/dist/failures/canceled.d.ts +6 -0
- package/dist/failures/canceled.d.ts.map +1 -0
- package/dist/failures/external.d.ts +7 -0
- package/dist/failures/external.d.ts.map +1 -0
- package/dist/failures/index.d.ts +10 -0
- package/dist/failures/index.d.ts.map +1 -0
- package/dist/failures/interrupted.d.ts +7 -0
- package/dist/failures/interrupted.d.ts.map +1 -0
- package/dist/failures/scope.d.ts +19 -0
- package/dist/failures/scope.d.ts.map +1 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1986 -0
- package/dist/internal/fp/index.d.ts +6 -0
- package/dist/internal/fp/index.d.ts.map +1 -0
- package/dist/internal/fp/lifting.d.ts +21 -0
- package/dist/internal/fp/lifting.d.ts.map +1 -0
- package/dist/internal/fp/sigil.d.ts +11 -0
- package/dist/internal/fp/sigil.d.ts.map +1 -0
- package/dist/internal/fp/wisp-either.d.ts +53 -0
- package/dist/internal/fp/wisp-either.d.ts.map +1 -0
- package/dist/internal/fp/wisp-option.d.ts +52 -0
- package/dist/internal/fp/wisp-option.d.ts.map +1 -0
- package/dist/internal/fp/wisp.d.ts +37 -0
- package/dist/internal/fp/wisp.d.ts.map +1 -0
- package/dist/interpreter/index.d.ts +4 -0
- package/dist/interpreter/index.d.ts.map +1 -0
- package/dist/interpreter/interpreter.d.ts +48 -0
- package/dist/interpreter/interpreter.d.ts.map +1 -0
- package/dist/interpreter/process-step.d.ts +21 -0
- package/dist/interpreter/process-step.d.ts.map +1 -0
- package/dist/interpreter/runtime-future.d.ts +14 -0
- package/dist/interpreter/runtime-future.d.ts.map +1 -0
- package/dist/interpreter/runtime-process/handle.d.ts +9 -0
- package/dist/interpreter/runtime-process/handle.d.ts.map +1 -0
- package/dist/interpreter/runtime-process/index.d.ts +5 -0
- package/dist/interpreter/runtime-process/index.d.ts.map +1 -0
- package/dist/interpreter/runtime-process/keeper.d.ts +39 -0
- package/dist/interpreter/runtime-process/keeper.d.ts.map +1 -0
- package/dist/interpreter/runtime-process/process.d.ts +54 -0
- package/dist/interpreter/runtime-process/process.d.ts.map +1 -0
- package/dist/interpreter/runtime-process/runner.d.ts +45 -0
- package/dist/interpreter/runtime-process/runner.d.ts.map +1 -0
- package/dist/interpreter/runtime-process/stepper.d.ts +9 -0
- package/dist/interpreter/runtime-process/stepper.d.ts.map +1 -0
- package/dist/interpreter/runtime-scope/index.d.ts +2 -0
- package/dist/interpreter/runtime-scope/index.d.ts.map +1 -0
- package/dist/interpreter/runtime-scope/runtime-mailbox.d.ts +11 -0
- package/dist/interpreter/runtime-scope/runtime-mailbox.d.ts.map +1 -0
- package/dist/interpreter/runtime-scope/runtime-scope.d.ts +58 -0
- package/dist/interpreter/runtime-scope/runtime-scope.d.ts.map +1 -0
- package/dist/interpreter/runtime-scope/scope-failure-draft.d.ts +12 -0
- package/dist/interpreter/runtime-scope/scope-failure-draft.d.ts.map +1 -0
- package/dist/interpreter/scope-zone.d.ts +6 -0
- package/dist/interpreter/scope-zone.d.ts.map +1 -0
- package/dist/primitives/all.d.ts +7 -0
- package/dist/primitives/all.d.ts.map +1 -0
- package/dist/primitives/bind.d.ts +3 -0
- package/dist/primitives/bind.d.ts.map +1 -0
- package/dist/primitives/cancel.d.ts +3 -0
- package/dist/primitives/cancel.d.ts.map +1 -0
- package/dist/primitives/cede.d.ts +3 -0
- package/dist/primitives/cede.d.ts.map +1 -0
- package/dist/primitives/defer.d.ts +3 -0
- package/dist/primitives/defer.d.ts.map +1 -0
- package/dist/primitives/enclose.d.ts +4 -0
- package/dist/primitives/enclose.d.ts.map +1 -0
- package/dist/primitives/future.d.ts +3 -0
- package/dist/primitives/future.d.ts.map +1 -0
- package/dist/primitives/guard.d.ts +6 -0
- package/dist/primitives/guard.d.ts.map +1 -0
- package/dist/primitives/halt.d.ts +3 -0
- package/dist/primitives/halt.d.ts.map +1 -0
- package/dist/primitives/index.d.ts +21 -0
- package/dist/primitives/index.d.ts.map +1 -0
- package/dist/primitives/lookup.d.ts +4 -0
- package/dist/primitives/lookup.d.ts.map +1 -0
- package/dist/primitives/park.d.ts +3 -0
- package/dist/primitives/park.d.ts.map +1 -0
- package/dist/primitives/poll.d.ts +4 -0
- package/dist/primitives/poll.d.ts.map +1 -0
- package/dist/primitives/race.d.ts +8 -0
- package/dist/primitives/race.d.ts.map +1 -0
- package/dist/primitives/resource.d.ts +5 -0
- package/dist/primitives/resource.d.ts.map +1 -0
- package/dist/primitives/resumable.d.ts +3 -0
- package/dist/primitives/resumable.d.ts.map +1 -0
- package/dist/primitives/self.d.ts +5 -0
- package/dist/primitives/self.d.ts.map +1 -0
- package/dist/primitives/settle.d.ts +3 -0
- package/dist/primitives/settle.d.ts.map +1 -0
- package/dist/primitives/spawn.d.ts +3 -0
- package/dist/primitives/spawn.d.ts.map +1 -0
- package/dist/primitives/unbind.d.ts +3 -0
- package/dist/primitives/unbind.d.ts.map +1 -0
- package/dist/primitives/wait.d.ts +3 -0
- package/dist/primitives/wait.d.ts.map +1 -0
- package/dist/primitives-kit/index.d.ts +3 -0
- package/dist/primitives-kit/index.d.ts.map +1 -0
- package/dist/primitives-kit/process.d.ts +7 -0
- package/dist/primitives-kit/process.d.ts.map +1 -0
- package/dist/primitives-kit/resumable.d.ts +9 -0
- package/dist/primitives-kit/resumable.d.ts.map +1 -0
- package/dist/primitives.d.ts +2 -0
- package/dist/primitives.d.ts.map +1 -0
- package/dist/sigils/bind.d.ts +9 -0
- package/dist/sigils/bind.d.ts.map +1 -0
- package/dist/sigils/branch.d.ts +17 -0
- package/dist/sigils/branch.d.ts.map +1 -0
- package/dist/sigils/cancel.d.ts +7 -0
- package/dist/sigils/cancel.d.ts.map +1 -0
- package/dist/sigils/cede.d.ts +7 -0
- package/dist/sigils/cede.d.ts.map +1 -0
- package/dist/sigils/defer.d.ts +8 -0
- package/dist/sigils/defer.d.ts.map +1 -0
- package/dist/sigils/future.d.ts +7 -0
- package/dist/sigils/future.d.ts.map +1 -0
- package/dist/sigils/halt.d.ts +8 -0
- package/dist/sigils/halt.d.ts.map +1 -0
- package/dist/sigils/index.d.ts +34 -0
- package/dist/sigils/index.d.ts.map +1 -0
- package/dist/sigils/lookup.d.ts +9 -0
- package/dist/sigils/lookup.d.ts.map +1 -0
- package/dist/sigils/poll.d.ts +9 -0
- package/dist/sigils/poll.d.ts.map +1 -0
- package/dist/sigils/receive.d.ts +8 -0
- package/dist/sigils/receive.d.ts.map +1 -0
- package/dist/sigils/self.d.ts +11 -0
- package/dist/sigils/self.d.ts.map +1 -0
- package/dist/sigils/send.d.ts +10 -0
- package/dist/sigils/send.d.ts.map +1 -0
- package/dist/sigils/settle.d.ts +9 -0
- package/dist/sigils/settle.d.ts.map +1 -0
- package/dist/sigils/spawn.d.ts +13 -0
- package/dist/sigils/spawn.d.ts.map +1 -0
- package/dist/sigils/unbind.d.ts +8 -0
- package/dist/sigils/unbind.d.ts.map +1 -0
- package/dist/sigils/wait.d.ts +8 -0
- package/dist/sigils/wait.d.ts.map +1 -0
- package/dist/sigils.cjs +1 -0
- package/dist/sigils.d.ts +2 -0
- package/dist/sigils.d.ts.map +1 -0
- package/dist/sigils.js +125 -0
- package/dist/utils/disposer.d.ts +2 -0
- package/dist/utils/disposer.d.ts.map +1 -0
- package/dist/utils/either.d.ts +2 -0
- package/dist/utils/either.d.ts.map +1 -0
- package/dist/utils/iife.d.ts +2 -0
- package/dist/utils/iife.d.ts.map +1 -0
- package/dist/utils/index.d.ts +8 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/narrow.d.ts +4 -0
- package/dist/utils/narrow.d.ts.map +1 -0
- package/dist/utils/noop.d.ts +2 -0
- package/dist/utils/noop.d.ts.map +1 -0
- package/dist/utils/option.d.ts +2 -0
- package/dist/utils/option.d.ts.map +1 -0
- package/dist/utils/unreachable.d.ts +2 -0
- package/dist/utils/unreachable.d.ts.map +1 -0
- package/dist/utils-O8j9DzUQ.cjs +1 -0
- package/dist/utils-PwEUjNtC.js +327 -0
- package/dist/utils.cjs +1 -0
- package/dist/utils.d.ts +2 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +2 -0
- package/package.json +73 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026, iplaylf2
|
|
4
|
+
|
|
5
|
+
Redistribution and use in source and binary forms, with or without
|
|
6
|
+
modification, are permitted provided that the following conditions are met:
|
|
7
|
+
|
|
8
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
9
|
+
list of conditions and the following disclaimer.
|
|
10
|
+
|
|
11
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
12
|
+
this list of conditions and the following disclaimer in the documentation
|
|
13
|
+
and/or other materials provided with the distribution.
|
|
14
|
+
|
|
15
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
16
|
+
contributors may be used to endorse or promote products derived from
|
|
17
|
+
this software without specific prior written permission.
|
|
18
|
+
|
|
19
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
20
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
21
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
22
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
23
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
24
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
25
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
26
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
27
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
28
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
package/README.md
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# @shajara/kernel
|
|
2
|
+
|
|
3
|
+
`@shajara/kernel` is the low-level package in shajara.
|
|
4
|
+
|
|
5
|
+
In shajara, structured concurrency is both an orchestration style and a foundational model that must be defined and driven explicitly. `@shajara/kernel` carries that model itself.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
npm install @shajara/kernel
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Role in shajara
|
|
14
|
+
|
|
15
|
+
This package carries the semantic baseline, failure model, primitives, and execution environment.
|
|
16
|
+
|
|
17
|
+
It defines what the concurrency model is and how the execution environment advances it, rather than organizing the host-facing API used directly in application code.
|
|
18
|
+
|
|
19
|
+
## What this package provides
|
|
20
|
+
|
|
21
|
+
- core contracts: `Wisp`, `Ritual`, `ScopeRef`, `ProcessRef`, `FutureKey`
|
|
22
|
+
- failure model: `Failure` and its failure constructors
|
|
23
|
+
- kernel primitives
|
|
24
|
+
- execution environment: `createExecutor`, `ExecutionScopeRef`, `LaunchHandle`, `Pacer`
|
|
25
|
+
- supplemental entries: `@shajara/kernel/sigils`, `@shajara/kernel/utils`
|
|
26
|
+
|
|
27
|
+
Together, these capabilities define shajara's computation carrier, structured concurrency boundaries, failure convergence rules, and the execution environment that drives them.
|
|
28
|
+
|
|
29
|
+
## Example
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
import { cede, createExecutor } from "@shajara/kernel";
|
|
33
|
+
|
|
34
|
+
const executor = createExecutor((flushTurn) => {
|
|
35
|
+
globalThis.setInterval(flushTurn, 0);
|
|
36
|
+
|
|
37
|
+
return {
|
|
38
|
+
beginSlice: () => ({
|
|
39
|
+
shouldYield: () => false,
|
|
40
|
+
}),
|
|
41
|
+
continueLater(work) {
|
|
42
|
+
queueMicrotask(work);
|
|
43
|
+
return () => {};
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
const launched = executor.launch(executor.scope, cede);
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
This example shows where `@shajara/kernel` sits: first provide an execution environment, then launch a lower-level `Ritual` into it.
|
|
52
|
+
|
|
53
|
+
## When to use this package
|
|
54
|
+
|
|
55
|
+
Use this package when you need direct access to shajara's underlying semantics and execution environment.
|
|
56
|
+
|
|
57
|
+
It fits better for work such as:
|
|
58
|
+
|
|
59
|
+
- building a new runtime or host adaptation layer
|
|
60
|
+
- consuming `Wisp`, `Ritual`, or executor capabilities directly
|
|
61
|
+
- experimenting with integrations around the semantic baseline
|
|
62
|
+
|
|
63
|
+
## Public entries
|
|
64
|
+
|
|
65
|
+
- `@shajara/kernel`
|
|
66
|
+
- `@shajara/kernel/sigils`
|
|
67
|
+
- `@shajara/kernel/utils`
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Licenses
|
|
2
|
+
|
|
3
|
+
The app bundles dependencies which contain the following licenses:
|
|
4
|
+
|
|
5
|
+
## fp-ts - 2.16.11 (MIT)
|
|
6
|
+
|
|
7
|
+
MIT License
|
|
8
|
+
|
|
9
|
+
Copyright (c) 2017-present Giulio Canti
|
|
10
|
+
|
|
11
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
12
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
13
|
+
in the Software without restriction, including without limitation the rights
|
|
14
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
15
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
16
|
+
furnished to do so, subject to the following conditions:
|
|
17
|
+
|
|
18
|
+
The above copyright notice and this permission notice shall be included in all
|
|
19
|
+
copies or substantial portions of the Software.
|
|
20
|
+
|
|
21
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
22
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
23
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
24
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
25
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
26
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
27
|
+
SOFTWARE.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { KEY_TOKEN } from './token';
|
|
2
|
+
declare const VALUE_TOKEN: unique symbol;
|
|
3
|
+
export type ContextKeyValue<K extends ContextKey<unknown>> = K extends ContextKey<infer Value> ? Value : never;
|
|
4
|
+
export declare function contextKey<Value>(): ContextKey<Value>;
|
|
5
|
+
export interface ContextKey<Value> {
|
|
6
|
+
readonly [KEY_TOKEN]: "context";
|
|
7
|
+
readonly [VALUE_TOKEN]?: readonly [Value];
|
|
8
|
+
}
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=context-key.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-key.d.ts","sourceRoot":"","sources":["../../src/contracts/context-key.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,OAAO,CAAC,MAAM,WAAW,EAAE,OAAO,MAAM,CAAC;AAGzC,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,UAAU,CAAC,OAAO,CAAC,IACvD,CAAC,SAAS,UAAU,CAAC,MAAM,KAAK,CAAC,GAAG,KAAK,GAAG,KAAK,CAAC;AAEpD,wBAAgB,UAAU,CAAC,KAAK,KAAK,UAAU,CAAC,KAAK,CAAC,CAErD;AAED,MAAM,WAAW,UAAU,CAAC,KAAK;IAC/B,QAAQ,CAAC,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC;IAChC,QAAQ,CAAC,CAAC,WAAW,CAAC,CAAC,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC;CAC3C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"failure.d.ts","sourceRoot":"","sources":["../../src/contracts/failure.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Either } from '../utils';
|
|
2
|
+
import { FailureShape } from './failure';
|
|
3
|
+
import { KEY_TOKEN } from './token';
|
|
4
|
+
export interface FutureKey<Result> {
|
|
5
|
+
readonly [KEY_TOKEN]: "future";
|
|
6
|
+
readonly [RESULT_TOKEN]?: readonly [FutureResult<Result>];
|
|
7
|
+
}
|
|
8
|
+
export interface FutureSettleKey<Result> {
|
|
9
|
+
readonly [KEY_TOKEN]: "future-settle";
|
|
10
|
+
readonly [RESULT_TOKEN]?: readonly [FutureResult<Result>];
|
|
11
|
+
}
|
|
12
|
+
export type FutureResult<Result> = Either<FailureShape, Result>;
|
|
13
|
+
export type FutureHandle<Result> = readonly [FutureKey<Result>, FutureSettleKey<Result>];
|
|
14
|
+
declare const RESULT_TOKEN: unique symbol;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=future-key.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"future-key.d.ts","sourceRoot":"","sources":["../../src/contracts/future-key.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,MAAM,WAAW,SAAS,CAAC,MAAM;IAC/B,QAAQ,CAAC,CAAC,SAAS,CAAC,EAAE,QAAQ,CAAC;IAC/B,QAAQ,CAAC,CAAC,YAAY,CAAC,CAAC,EAAE,SAAS,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC;CAC3D;AAED,MAAM,WAAW,eAAe,CAAC,MAAM;IACrC,QAAQ,CAAC,CAAC,SAAS,CAAC,EAAE,eAAe,CAAC;IACtC,QAAQ,CAAC,CAAC,YAAY,CAAC,CAAC,EAAE,SAAS,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC;CAC3D;AAED,MAAM,MAAM,YAAY,CAAC,MAAM,IAAI,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;AAChE,MAAM,MAAM,YAAY,CAAC,MAAM,IAAI,SAAS,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC;AAEzF,OAAO,CAAC,MAAM,YAAY,EAAE,OAAO,MAAM,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from './failure';
|
|
2
|
+
export * from './wisp';
|
|
3
|
+
export * from './process';
|
|
4
|
+
export * from './scope';
|
|
5
|
+
export * from './message-key';
|
|
6
|
+
export * from './context-key';
|
|
7
|
+
export * from './future-key';
|
|
8
|
+
export * from './suppressor';
|
|
9
|
+
export * from './sigil';
|
|
10
|
+
export * from './token';
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/contracts/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { KEY_TOKEN } from './token';
|
|
2
|
+
declare const VALUE_TOKEN: unique symbol;
|
|
3
|
+
export type MessageKeyValue<K extends MessageKey<unknown>> = K extends MessageKey<infer Value> ? Value : never;
|
|
4
|
+
export declare function messageKey<Value>(): MessageKey<Value>;
|
|
5
|
+
export interface MessageKey<Value> {
|
|
6
|
+
readonly [KEY_TOKEN]: "message";
|
|
7
|
+
readonly [VALUE_TOKEN]?: readonly [Value];
|
|
8
|
+
}
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=message-key.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message-key.d.ts","sourceRoot":"","sources":["../../src/contracts/message-key.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,OAAO,CAAC,MAAM,WAAW,EAAE,OAAO,MAAM,CAAC;AAGzC,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,UAAU,CAAC,OAAO,CAAC,IACvD,CAAC,SAAS,UAAU,CAAC,MAAM,KAAK,CAAC,GAAG,KAAK,GAAG,KAAK,CAAC;AAEpD,wBAAgB,UAAU,CAAC,KAAK,KAAK,UAAU,CAAC,KAAK,CAAC,CAErD;AAED,MAAM,WAAW,UAAU,CAAC,KAAK;IAC/B,QAAQ,CAAC,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC;IAChC,QAAQ,CAAC,CAAC,WAAW,CAAC,CAAC,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC;CAC3C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"process.d.ts","sourceRoot":"","sources":["../../src/contracts/process.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,MAAM,WAAW,UAAU,CAAC,KAAK;IAC/B,QAAQ,CAAC,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC;IAChC,QAAQ,CAAC,UAAU,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC;CACvC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope.d.ts","sourceRoot":"","sources":["../../src/contracts/scope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,MAAM,WAAW,QAAQ,CAAC,KAAK;IAC7B,QAAQ,CAAC,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,UAAU,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC;CACvC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ECHO_TOKEN } from './token';
|
|
2
|
+
export type Echo<Sigil extends SigilShape> = NonNullable<Sigil[typeof ECHO_TOKEN]> extends readonly [infer EchoValue] ? EchoValue : never;
|
|
3
|
+
export interface SigilShape {
|
|
4
|
+
readonly kind: string;
|
|
5
|
+
readonly [ECHO_TOKEN]?: readonly [unknown];
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=sigil.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sigil.d.ts","sourceRoot":"","sources":["../../src/contracts/sigil.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,MAAM,MAAM,IAAI,CAAC,KAAK,SAAS,UAAU,IACvC,WAAW,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC,SAAS,SAAS,CAAC,MAAM,SAAS,CAAC,GAAG,SAAS,GAAG,KAAK,CAAC;AAE/F,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,CAAC,UAAU,CAAC,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;CAC5C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suppressor.d.ts","sourceRoot":"","sources":["../../src/contracts/suppressor.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,UAAU;IACzB,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;CAC/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"token.d.ts","sourceRoot":"","sources":["../../src/contracts/token.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,CAAC,MAAM,UAAU,EAAE,OAAO,MAAM,CAAC;AAC/C,MAAM,CAAC,OAAO,CAAC,MAAM,SAAS,EAAE,OAAO,MAAM,CAAC;AAC9C,MAAM,CAAC,OAAO,CAAC,MAAM,SAAS,EAAE,OAAO,MAAM,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Echo, SigilShape } from './sigil';
|
|
2
|
+
import { UnknownArray } from 'type-fest';
|
|
3
|
+
export declare function stirringWisp<Sigil extends SigilShape, Relic>(sigil: Sigil, resonate: Resonance<Sigil, Relic>): StirringWisp<Sigil, Relic>;
|
|
4
|
+
export declare function restingWisp<Relic>(relic: Relic): RestingWisp<Relic>;
|
|
5
|
+
export declare function evoke<Sigil extends SigilShape>(sigil: Sigil): Wisp<Echo<Sigil>>;
|
|
6
|
+
export type Ritual<Relic> = Incantation<[], Relic>;
|
|
7
|
+
export type Incantation<Args extends UnknownArray, Relic> = (...args: Args) => Wisp<Relic>;
|
|
8
|
+
export type Wisp<Relic> = StirringWisp<SigilShape, Relic> | RestingWisp<Relic>;
|
|
9
|
+
export interface StirringWisp<Sigil extends SigilShape, Relic> {
|
|
10
|
+
readonly bearing: "stirring";
|
|
11
|
+
readonly sigil: Sigil;
|
|
12
|
+
readonly resonate: Resonance<Sigil, Relic>;
|
|
13
|
+
}
|
|
14
|
+
export interface RestingWisp<Relic> {
|
|
15
|
+
readonly bearing: "resting";
|
|
16
|
+
readonly relic: Relic;
|
|
17
|
+
}
|
|
18
|
+
export type Resonance<Sigil extends SigilShape, Relic> = Incantation<[echo: Echo<Sigil>], Relic>;
|
|
19
|
+
//# sourceMappingURL=wisp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wisp.d.ts","sourceRoot":"","sources":["../../src/contracts/wisp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE9C,wBAAgB,YAAY,CAAC,KAAK,SAAS,UAAU,EAAE,KAAK,EAC1D,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,GAChC,YAAY,CAAC,KAAK,EAAE,KAAK,CAAC,CAE5B;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC,CAEnE;AAED,wBAAgB,KAAK,CAAC,KAAK,SAAS,UAAU,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAE/E;AAED,MAAM,MAAM,MAAM,CAAC,KAAK,IAAI,WAAW,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;AAEnD,MAAM,MAAM,WAAW,CAAC,IAAI,SAAS,YAAY,EAAE,KAAK,IAAI,CAAC,GAAG,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC,KAAK,CAAC,CAAC;AAE3F,MAAM,MAAM,IAAI,CAAC,KAAK,IAAI,YAAY,CAAC,UAAU,EAAE,KAAK,CAAC,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC;AAE/E,MAAM,WAAW,YAAY,CAAC,KAAK,SAAS,UAAU,EAAE,KAAK;IAC3D,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC;IAC7B,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;CAC5C;AAED,MAAM,WAAW,WAAW,CAAC,KAAK;IAChC,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;CACvB;AAED,MAAM,MAAM,SAAS,CAAC,KAAK,SAAS,UAAU,EAAE,KAAK,IAAI,WAAW,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ProcessRef, ScopeRef, Wisp } from '../contracts';
|
|
2
|
+
import { Failure } from '../failures';
|
|
3
|
+
import { Option } from '../utils';
|
|
4
|
+
import { Processor } from './processor';
|
|
5
|
+
import { ScopeDescriptor } from '../sigils';
|
|
6
|
+
export declare function withAutonomy(options: AutonomyOptions): AutonomyScopeDescriptor;
|
|
7
|
+
export declare function autonomyOf(descriptor: ScopeDescriptor): AutonomyOptions | null;
|
|
8
|
+
export interface AutonomyScopeDescriptor extends ScopeDescriptor {
|
|
9
|
+
readonly autonomy: AutonomyOptions;
|
|
10
|
+
}
|
|
11
|
+
export type AutonomyOptions = SchedulerOption | ReaperOption | (SchedulerOption & ReaperOption);
|
|
12
|
+
export interface SchedulerOption {
|
|
13
|
+
readonly scheduler: Scheduler;
|
|
14
|
+
}
|
|
15
|
+
export interface ReaperOption {
|
|
16
|
+
readonly reaper: Reaper;
|
|
17
|
+
}
|
|
18
|
+
export interface Scheduler {
|
|
19
|
+
assign(process: ProcessRef<unknown>): Processor;
|
|
20
|
+
}
|
|
21
|
+
export interface Reaper {
|
|
22
|
+
adjudicate(scope: ScopeRef<unknown>): Wisp<Option<Failure>>;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=autonomy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autonomy.d.ts","sourceRoot":"","sources":["../../src/executor/autonomy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAC9D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD,wBAAgB,YAAY,CAAC,OAAO,EAAE,eAAe,GAAG,uBAAuB,CAK9E;AAED,wBAAgB,UAAU,CAAC,UAAU,EAAE,eAAe,GAAG,eAAe,GAAG,IAAI,CAM9E;AAED,MAAM,WAAW,uBAAwB,SAAQ,eAAe;IAC9D,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC;CACpC;AAED,MAAM,MAAM,eAAe,GAAG,eAAe,GAAG,YAAY,GAAG,CAAC,eAAe,GAAG,YAAY,CAAC,CAAC;AAEhG,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;CAC/B;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,SAAS;IACxB,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,OAAO,CAAC,GAAG,SAAS,CAAC;CACjD;AAED,MAAM,WAAW,MAAM;IACrB,UAAU,CAAC,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;CAC7D"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReaperOption, SchedulerOption } from './autonomy';
|
|
2
|
+
import { ProcessRef, Ritual, ScopeRef, Suppressor } from '../contracts';
|
|
3
|
+
import { option } from 'fp-ts';
|
|
4
|
+
import { Failure } from '../failures';
|
|
5
|
+
import { Interpreter, ScopeZone } from '../interpreter';
|
|
6
|
+
import { ScopeDescriptor } from '../sigils';
|
|
7
|
+
export declare class DomainInterpreter extends Interpreter {
|
|
8
|
+
#private;
|
|
9
|
+
static createByAutonomy(entry: Ritual<unknown>, autonomy: SchedulerOption & ReaperOption): DomainInterpreter;
|
|
10
|
+
startReaperTasks(suppressor: Suppressor): Iterable<readonly [ScopeRef<unknown>, ProcessRef<option.Option<Failure>>]>;
|
|
11
|
+
protected constructor(entry: Ritual<unknown>, autonomy: SchedulerOption & ReaperOption);
|
|
12
|
+
protected initialize(): void;
|
|
13
|
+
protected scopeBranch(scope: ScopeRef<unknown>, entry: Ritual<unknown>, descriptor: ScopeDescriptor, zone: ScopeZone, suppressor: Suppressor): ScopeRef<unknown>;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=domain-interpreter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"domain-interpreter.d.ts","sourceRoot":"","sources":["../../src/executor/domain-interpreter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAmB,YAAY,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AACjF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE5E,OAAO,EAAE,MAAM,EAAiB,MAAM,OAAO,CAAC;AAC9C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAI/C,qBAAa,iBAAkB,SAAQ,WAAW;;WAClC,gBAAgB,CAC5B,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,EACtB,QAAQ,EAAE,eAAe,GAAG,YAAY,GACvC,iBAAiB;IAMZ,gBAAgB,CACtB,UAAU,EAAE,UAAU,GACrB,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAuB7E,SAAS,aAAa,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,eAAe,GAAG,YAAY;cAsBnE,UAAU,IAAI,IAAI;cAOlB,WAAW,CAC5B,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC,EACxB,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,EACtB,UAAU,EAAE,eAAe,EAC3B,IAAI,EAAE,SAAS,EACf,UAAU,EAAE,UAAU,GACrB,QAAQ,CAAC,OAAO,CAAC;CAiKrB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AbstractClass, ConditionalExcept } from 'type-fest';
|
|
2
|
+
export declare abstract class Domain<DerivedDomain extends Domain<DerivedDomain>> {
|
|
3
|
+
#private;
|
|
4
|
+
private readonly parent;
|
|
5
|
+
static domains<Instance extends Domain<Instance>>(this: DomainClass<Instance>, root: Instance): Iterable<Instance>;
|
|
6
|
+
protected static sentinel<Instance extends Domain<Instance>>(this: DomainClass<Instance>): Instance;
|
|
7
|
+
protected constructor(parent: DerivedDomain);
|
|
8
|
+
close(): void;
|
|
9
|
+
protected addChild(child: DerivedDomain): void;
|
|
10
|
+
protected removeChild(child: DerivedDomain): void;
|
|
11
|
+
protected get isRoot(): boolean;
|
|
12
|
+
}
|
|
13
|
+
export type DomainClass<DerivedDomain extends Domain<DerivedDomain>> = ConditionalExcept<typeof Domain<DerivedDomain>, AbstractClass<typeof Domain<DerivedDomain>>>;
|
|
14
|
+
//# sourceMappingURL=domain.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"domain.d.ts","sourceRoot":"","sources":["../../../src/executor/domains/domain.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAElE,8BAAsB,MAAM,CAAC,aAAa,SAAS,MAAM,CAAC,aAAa,CAAC;;IAkBhD,OAAO,CAAC,QAAQ,CAAC,MAAM;WAjB9B,OAAO,CAAC,QAAQ,SAAS,MAAM,CAAC,QAAQ,CAAC,EACtD,IAAI,EAAE,WAAW,CAAC,QAAQ,CAAC,EAC3B,IAAI,EAAE,QAAQ,GACb,QAAQ,CAAC,QAAQ,CAAC;IAQrB,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,SAAS,MAAM,CAAC,QAAQ,CAAC,EACzD,IAAI,EAAE,WAAW,CAAC,QAAQ,CAAC,GAC1B,QAAQ;IAIX,SAAS,aAA8B,MAAM,EAAE,aAAa;IAErD,KAAK,IAAI,IAAI;IAIpB,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI;IAI9C,SAAS,CAAC,WAAW,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI;IAIjD,SAAS,KAAK,MAAM,IAAI,OAAO,CAE9B;CAMF;AAED,MAAM,MAAM,WAAW,CAAC,aAAa,SAAS,MAAM,CAAC,aAAa,CAAC,IAAI,iBAAiB,CACtF,OAAO,MAAM,CAAC,aAAa,CAAC,EAC5B,aAAa,CAAC,OAAO,MAAM,CAAC,aAAa,CAAC,CAAC,CAC5C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/executor/domains/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Ritual, ScopeRef } from '../../contracts';
|
|
2
|
+
import { Domain } from './domain';
|
|
3
|
+
import { Failure } from '../../failures';
|
|
4
|
+
import { Option } from '../../utils';
|
|
5
|
+
import { Reaper } from '../autonomy';
|
|
6
|
+
import { ScopeState } from '../../interpreter';
|
|
7
|
+
export declare class ReaperDomain extends Domain<ReaperDomain> {
|
|
8
|
+
#private;
|
|
9
|
+
private readonly reaper;
|
|
10
|
+
static root(reaper: Reaper): ReaperDomain;
|
|
11
|
+
nest(reaper: Reaper): ReaperDomain;
|
|
12
|
+
setScopeRoot(scope: ScopeRef<unknown>): void;
|
|
13
|
+
addLeafScope(scope: ScopeRef<unknown>): void;
|
|
14
|
+
removeLeafScope(scope: ScopeRef<unknown>): void;
|
|
15
|
+
trackScope(scope: ScopeRef<unknown>, state: ScopeState): void;
|
|
16
|
+
createWorkers(scopeState: (scope: ScopeRef<unknown>) => ScopeState): Iterable<ReaperWorker>;
|
|
17
|
+
close(): void;
|
|
18
|
+
get hasClosingScope(): boolean;
|
|
19
|
+
get scopeRoot(): ScopeRef<unknown>;
|
|
20
|
+
private constructor();
|
|
21
|
+
}
|
|
22
|
+
export interface ReaperWorker {
|
|
23
|
+
worker: Ritual<Option<Failure>>;
|
|
24
|
+
scope: ScopeRef<unknown>;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=reaper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reaper.d.ts","sourceRoot":"","sources":["../../../src/executor/domains/reaper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAGhD,qBAAa,YAAa,SAAQ,MAAM,CAAC,YAAY,CAAC;;IA6DlD,OAAO,CAAC,QAAQ,CAAC,MAAM;WA5DX,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY;IAIzC,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY;IAMlC,YAAY,CAAC,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC,GAAG,IAAI;IAK5C,YAAY,CAAC,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC,GAAG,IAAI;IAI5C,eAAe,CAAC,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC,GAAG,IAAI;IAI/C,UAAU,CAAC,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,UAAU,GAAG,IAAI;IAQ5D,aAAa,CACnB,UAAU,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC,KAAK,UAAU,GACnD,QAAQ,CAAC,YAAY,CAAC;IAWT,KAAK,IAAI,IAAI;IAM7B,IAAW,eAAe,IAAI,OAAO,CAEpC;IAED,IAAW,SAAS,IAAI,QAAQ,CAAC,OAAO,CAAC,CAExC;IAED,OAAO;CAUR;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;IAChC,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;CAC1B"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Domain } from './domain';
|
|
2
|
+
import { ProcessRef } from '../../contracts';
|
|
3
|
+
import { ProcessState } from '../../interpreter';
|
|
4
|
+
import { ProcessorTask } from '../processor';
|
|
5
|
+
import { Scheduler } from '../autonomy';
|
|
6
|
+
export declare class SchedulerDomain extends Domain<SchedulerDomain> {
|
|
7
|
+
private readonly scheduler;
|
|
8
|
+
private readonly createTask;
|
|
9
|
+
static root(scheduler: Scheduler, createTask: SchedulerTaskFactory): SchedulerDomain;
|
|
10
|
+
nest(scheduler: Scheduler, createTask: SchedulerTaskFactory): SchedulerDomain;
|
|
11
|
+
admitProcess(process: ProcessRef<unknown>, state: ProcessState): void;
|
|
12
|
+
private constructor();
|
|
13
|
+
}
|
|
14
|
+
export type SchedulerTaskFactory = (process: ProcessRef<unknown>) => ProcessorTask;
|
|
15
|
+
//# sourceMappingURL=scheduler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scheduler.d.ts","sourceRoot":"","sources":["../../../src/executor/domains/scheduler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD,qBAAa,eAAgB,SAAQ,MAAM,CAAC,eAAe,CAAC;IAmBxD,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,UAAU;WAnBf,IAAI,CAAC,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,oBAAoB,GAAG,eAAe;IAIpF,IAAI,CAAC,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,oBAAoB,GAAG,eAAe;IAM7E,YAAY,CAAC,OAAO,EAAE,UAAU,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,YAAY,GAAG,IAAI;IAM5E,OAAO;CAOR;AAED,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,EAAE,UAAU,CAAC,OAAO,CAAC,KAAK,aAAa,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ScopeRef } from '../contracts';
|
|
2
|
+
export interface ExecutionScopeRef<Relic> extends ScopeRef<Relic> {
|
|
3
|
+
readonly [SCOPE_REF_TOKEN]: "execution-scope";
|
|
4
|
+
}
|
|
5
|
+
declare const SCOPE_REF_TOKEN: unique symbol;
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=execution-scope.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execution-scope.d.ts","sourceRoot":"","sources":["../../src/executor/execution-scope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,WAAW,iBAAiB,CAAC,KAAK,CAAE,SAAQ,QAAQ,CAAC,KAAK,CAAC;IAC/D,QAAQ,CAAC,CAAC,eAAe,CAAC,EAAE,iBAAiB,CAAC;CAC/C;AAED,OAAO,CAAC,MAAM,eAAe,EAAE,OAAO,MAAM,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Processor } from './processor';
|
|
2
|
+
import { Pacer } from './pacer';
|
|
3
|
+
import { ProcessRef } from '../contracts';
|
|
4
|
+
import { ProcessStep } from '../interpreter';
|
|
5
|
+
export declare class ExecutorDriver {
|
|
6
|
+
#private;
|
|
7
|
+
private readonly pacer;
|
|
8
|
+
private readonly stepProcess;
|
|
9
|
+
stop(): void;
|
|
10
|
+
driveSyncUnsafely<Result>(process: ProcessRef<Result>): ProcessStep<Result>;
|
|
11
|
+
constructor(pacer: Pacer, stepProcess: <Result>(process: ProcessRef<Result>) => ProcessStep<Result>);
|
|
12
|
+
get processor(): Processor;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=executor-driver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"executor-driver.d.ts","sourceRoot":"","sources":["../../src/executor/executor-driver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAiB,MAAM,aAAa,CAAC;AAE5D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAGjD,qBAAa,cAAc;;IAuBvB,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,WAAW;IAvBvB,IAAI,IAAI,IAAI;IAIZ,iBAAiB,CAAC,MAAM,EAAE,OAAO,EAAE,UAAU,CAAC,MAAM,CAAC,GAAG,WAAW,CAAC,MAAM,CAAC;gBAkB/D,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,UAAU,CAAC,MAAM,CAAC,KAAK,WAAW,CAAC,MAAM,CAAC;IAG5F,IAAW,SAAS,IAAI,SAAS,CAEhC;CAsEF"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Option } from '../utils';
|
|
2
|
+
import { FutureResult, FutureSettleKey, Ritual } from '../contracts';
|
|
3
|
+
import { LaunchHandle } from './launch-handle';
|
|
4
|
+
import { ExecutionScopeRef } from './execution-scope';
|
|
5
|
+
import { Pacer } from './pacer';
|
|
6
|
+
export type BindTurn = (flushTurn: () => void) => Pacer;
|
|
7
|
+
export declare function createExecutor(bindTurn: BindTurn): Executor;
|
|
8
|
+
export interface Executor extends LaunchHandle<never> {
|
|
9
|
+
launch<Result>(scope: ExecutionScopeRef<unknown>, ritual: Ritual<Result>): Option<LaunchHandle<Result>>;
|
|
10
|
+
settle<Result>(futureSettle: FutureSettleKey<Result>, result: FutureResult<Result>): boolean;
|
|
11
|
+
cancel(scope: ExecutionScopeRef<unknown>): boolean;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=executor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../../src/executor/executor.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAY,MAAM,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,KAAK,EAAgB,YAAY,EAAE,eAAe,EAAE,MAAM,EAAY,MAAM,aAAa,CAAC;AACjG,OAAO,KAAK,EAAE,YAAY,EAA8B,MAAM,iBAAiB,CAAC;AAMhF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAI3D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAQrC,MAAM,MAAM,QAAQ,GAAG,CAAC,SAAS,EAAE,MAAM,IAAI,KAAK,KAAK,CAAC;AAExD,wBAAgB,cAAc,CAAC,QAAQ,EAAE,QAAQ,GAAG,QAAQ,CAE3D;AAED,MAAM,WAAW,QAAS,SAAQ,YAAY,CAAC,KAAK,CAAC;IACnD,MAAM,CAAC,MAAM,EACX,KAAK,EAAE,iBAAiB,CAAC,OAAO,CAAC,EACjC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,GACrB,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC;IAChC,MAAM,CAAC,MAAM,EAAE,YAAY,EAAE,eAAe,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,YAAY,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC;IAC7F,MAAM,CAAC,KAAK,EAAE,iBAAiB,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;CACpD"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Suppressor } from '../contracts';
|
|
2
|
+
import { option } from 'fp-ts';
|
|
3
|
+
export declare class FaultSink implements Disposable, Suppressor {
|
|
4
|
+
#private;
|
|
5
|
+
private readonly message;
|
|
6
|
+
constructor(message: string);
|
|
7
|
+
capture(error: unknown): void;
|
|
8
|
+
drain(): option.Option<unknown>;
|
|
9
|
+
throwIfAny(): void;
|
|
10
|
+
[Symbol.dispose](): void;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=fault-sink.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fault-sink.d.ts","sourceRoot":"","sources":["../../src/executor/fault-sink.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE/B,qBAAa,SAAU,YAAW,UAAU,EAAE,UAAU;;IACnC,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,MAAM;IAE5C,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI;IAI7B,KAAK,IAAI,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC;IAiB/B,UAAU,IAAI,IAAI;IAOlB,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,IAAI;CAKhC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './execution-scope';
|
|
2
|
+
export * from './executor';
|
|
3
|
+
export * from './pacer';
|
|
4
|
+
export * from './primitives';
|
|
5
|
+
export * from './processor';
|
|
6
|
+
export type * from './autonomy';
|
|
7
|
+
export type * from './launch-handle';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/executor/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,mBAAmB,YAAY,CAAC;AAChC,mBAAmB,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Disposer } from '../utils';
|
|
2
|
+
import { ExecutionScopeRef } from './execution-scope';
|
|
3
|
+
import { Failure } from '../failures';
|
|
4
|
+
import { ScopeRef } from '../contracts';
|
|
5
|
+
import { TaggedUnion } from 'type-fest';
|
|
6
|
+
export declare class RuntimeLaunchHandle<Result> implements LaunchHandle<Result> {
|
|
7
|
+
private readonly executionScope;
|
|
8
|
+
private readonly lifecycle;
|
|
9
|
+
onSettled(listener: (result: LaunchResult<Result>) => void): Disposer;
|
|
10
|
+
constructor(executionScope: ExecutionScopeRef<Result>, lifecycle: LaunchLifecycle<Result>);
|
|
11
|
+
get scope(): ExecutionScopeRef<Result>;
|
|
12
|
+
get status(): LaunchStatus;
|
|
13
|
+
}
|
|
14
|
+
export interface LaunchHandle<Result> {
|
|
15
|
+
onSettled(listener: (result: LaunchResult<Result>) => void): Disposer;
|
|
16
|
+
readonly scope: ExecutionScopeRef<Result>;
|
|
17
|
+
readonly status: LaunchStatus;
|
|
18
|
+
}
|
|
19
|
+
export type LaunchResult<Result> = TaggedUnion<"kind", {
|
|
20
|
+
canceled: {};
|
|
21
|
+
failure: {
|
|
22
|
+
readonly failure: Failure;
|
|
23
|
+
};
|
|
24
|
+
success: {
|
|
25
|
+
readonly result: Result;
|
|
26
|
+
};
|
|
27
|
+
}>;
|
|
28
|
+
export type LaunchStatus = "open" | "closing" | "closed";
|
|
29
|
+
export interface LaunchLifecycle<Result> {
|
|
30
|
+
status(scope: ScopeRef<Result>): LaunchStatus;
|
|
31
|
+
onSettled(scope: ScopeRef<Result>, listener: (result: LaunchResult<Result>) => void): Disposer;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=launch-handle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"launch-handle.d.ts","sourceRoot":"","sources":["../../src/executor/launch-handle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAE7C,qBAAa,mBAAmB,CAAC,MAAM,CAAE,YAAW,YAAY,CAAC,MAAM,CAAC;IAMpE,OAAO,CAAC,QAAQ,CAAC,cAAc;IAC/B,OAAO,CAAC,QAAQ,CAAC,SAAS;IANrB,SAAS,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,YAAY,CAAC,MAAM,CAAC,KAAK,IAAI,GAAG,QAAQ;gBAKzD,cAAc,EAAE,iBAAiB,CAAC,MAAM,CAAC,EACzC,SAAS,EAAE,eAAe,CAAC,MAAM,CAAC;IAGrD,IAAW,KAAK,IAAI,iBAAiB,CAAC,MAAM,CAAC,CAE5C;IAED,IAAW,MAAM,IAAI,YAAY,CAEhC;CACF;AAED,MAAM,WAAW,YAAY,CAAC,MAAM;IAClC,SAAS,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,YAAY,CAAC,MAAM,CAAC,KAAK,IAAI,GAAG,QAAQ,CAAC;IAEtE,QAAQ,CAAC,KAAK,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAC1C,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;CAC/B;AAED,MAAM,MAAM,YAAY,CAAC,MAAM,IAAI,WAAW,CAC5C,MAAM,EACN;IACE,QAAQ,EAAE,EAAE,CAAC;IACb,OAAO,EAAE;QAAE,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC;IACvC,OAAO,EAAE;QAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;CACtC,CACF,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,CAAC;AAEzD,MAAM,WAAW,eAAe,CAAC,MAAM;IACrC,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,YAAY,CAAC;IAC9C,SAAS,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,CAAC,MAAM,EAAE,YAAY,CAAC,MAAM,CAAC,KAAK,IAAI,GAAG,QAAQ,CAAC;CAChG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pacer.d.ts","sourceRoot":"","sources":["../../src/executor/pacer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,MAAM,WAAW,KAAK;IACpB,UAAU,IAAI,KAAK,CAAC;IACpB,aAAa,CAAC,IAAI,EAAE,MAAM,IAAI,GAAG,QAAQ,CAAC;CAC3C;AAED,MAAM,WAAW,KAAK;IACpB,WAAW,IAAI,OAAO,CAAC;CACxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autonomy.d.ts","sourceRoot":"","sources":["../../../src/executor/primitives/autonomy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAM3D,wBAAgB,QAAQ,CAAC,KAAK,EAC5B,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,EACpB,OAAO,EAAE,eAAe,GACvB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAMxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/executor/primitives/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Suppressor } from '../contracts';
|
|
2
|
+
export interface Processor {
|
|
3
|
+
admit(task: ProcessorTask): void;
|
|
4
|
+
}
|
|
5
|
+
export interface ProcessorTask {
|
|
6
|
+
step(suppressor: Suppressor): ProcessorTaskStatus;
|
|
7
|
+
}
|
|
8
|
+
export type ProcessorTaskStatus = "cede" | "exited" | "ready" | "waiting";
|
|
9
|
+
//# sourceMappingURL=processor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"processor.d.ts","sourceRoot":"","sources":["../../src/executor/processor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C,MAAM,WAAW,SAAS;IACxB,KAAK,CAAC,IAAI,EAAE,aAAa,GAAG,IAAI,CAAC;CAClC;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,UAAU,EAAE,UAAU,GAAG,mBAAmB,CAAC;CACnD;AAED,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ScopeRef, Wisp } from '../contracts';
|
|
2
|
+
import { Failure } from '../failures';
|
|
3
|
+
import { Option } from '../utils';
|
|
4
|
+
import { Reaper } from './autonomy';
|
|
5
|
+
export declare class RoundLimitReaper implements Reaper {
|
|
6
|
+
#private;
|
|
7
|
+
private readonly roundLimit;
|
|
8
|
+
constructor(roundLimit: number);
|
|
9
|
+
adjudicate(closingScope: ScopeRef<unknown>): Wisp<Option<Failure>>;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=round-limit-reaper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"round-limit-reaper.d.ts","sourceRoot":"","sources":["../../src/executor/round-limit-reaper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAKzC,qBAAa,gBAAiB,YAAW,MAAM;;IAC1B,OAAO,CAAC,QAAQ,CAAC,UAAU;gBAAV,UAAU,EAAE,MAAM;IAE/C,UAAU,CAAC,YAAY,EAAE,QAAQ,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;CAyB1E"}
|