@boxxy/dispatch 0.1.1 → 0.1.3
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/attempts/attempt-machine.d.ts +804 -0
- package/dist/attempts/attempt-moves.d.ts +2 -0
- package/dist/attempts/bind-attempt-session.d.ts +14 -0
- package/dist/attempts/build-attempt-change.d.ts +73 -0
- package/dist/attempts/build-attempt-fact.d.ts +3 -0
- package/dist/attempts/end-item-attempts.d.ts +18 -0
- package/dist/attempts/is-same-guard.d.ts +5 -0
- package/dist/attempts/pick-call-attempt.d.ts +10 -0
- package/dist/attempts/stop-stray-session.d.ts +11 -0
- package/dist/attempts/types.d.ts +142 -0
- package/dist/attempts/write-attempt-move.d.ts +7 -0
- package/dist/attempts/write-session-bind.d.ts +3 -0
- package/dist/claims/build-snapshot-hash.d.ts +2 -0
- package/dist/claims/claim-next.d.ts +6 -0
- package/dist/claims/pick-kept-session.d.ts +9 -0
- package/dist/claims/request-wake.d.ts +3 -0
- package/dist/claims/resume-claim.d.ts +3 -0
- package/dist/claims/start-claim.d.ts +3 -0
- package/dist/claims/types.d.ts +44 -0
- package/dist/closeouts/build-settle-plans.d.ts +17 -0
- package/dist/closeouts/close-out-attempt.d.ts +3 -0
- package/dist/closeouts/effect-handlers.d.ts +2 -0
- package/dist/closeouts/pick-settlement.d.ts +14 -0
- package/dist/closeouts/settle-attempt.d.ts +3 -0
- package/dist/closeouts/types.d.ts +50 -0
- package/dist/index.d.ts +38 -0
- package/dist/notices/constants.d.ts +4 -0
- package/dist/notices/create-null-notifier.d.ts +2 -0
- package/dist/notices/send-notices.d.ts +2 -0
- package/dist/notices/types.d.ts +11 -0
- package/dist/outbox/build-backoff-ms.d.ts +2 -0
- package/dist/outbox/build-initial-sender-state.d.ts +2 -0
- package/dist/outbox/build-outbox-status.d.ts +15 -0
- package/dist/outbox/constants.d.ts +2 -0
- package/dist/outbox/measure-wire-bytes.d.ts +2 -0
- package/dist/outbox/pick-sender-move.d.ts +10 -0
- package/dist/outbox/run-sender-once.d.ts +2 -0
- package/dist/outbox/take-batch.d.ts +3 -0
- package/dist/outbox/types.d.ts +61 -0
- package/dist/pull-requests/build-link-change.d.ts +11 -0
- package/dist/pull-requests/build-state-fact.d.ts +8 -0
- package/dist/pull-requests/collect-attempt-trailers.d.ts +2 -0
- package/dist/pull-requests/collect-seen-state.d.ts +7 -0
- package/dist/pull-requests/constants.d.ts +3 -0
- package/dist/pull-requests/link-pull-request.d.ts +2 -0
- package/dist/pull-requests/parse-pull-request-url.d.ts +2 -0
- package/dist/pull-requests/types.d.ts +37 -0
- package/dist/pull-requests/watch-pull-requests.d.ts +2 -0
- package/dist/readings/act-on-reading.d.ts +3 -0
- package/dist/readings/find-waiting-since.d.ts +9 -0
- package/dist/readings/pick-reading-action.d.ts +2 -0
- package/dist/readings/types.d.ts +79 -0
- package/dist/sessions/build-keep-writes.d.ts +9 -0
- package/dist/sessions/build-kept-clear.d.ts +2 -0
- package/dist/sessions/forget-sessions.d.ts +2 -0
- package/dist/sessions/is-kept-due.d.ts +2 -0
- package/dist/sessions/resume-kept-session.d.ts +6 -0
- package/dist/sessions/types.d.ts +19 -0
- package/dist/test-utils/apply-memory-change.d.ts +3 -0
- package/dist/test-utils/build-memory-reader.d.ts +3 -0
- package/dist/test-utils/build-mock-claim-change.d.ts +2 -2
- package/dist/test-utils/build-mock-new-id.d.ts +2 -0
- package/dist/test-utils/build-mock-note-change.d.ts +2 -0
- package/dist/test-utils/build-mock-pull-request-change.d.ts +1 -0
- package/dist/test-utils/{build-mock-link-change.d.ts → build-mock-relation-change.d.ts} +2 -2
- package/dist/test-utils/build-mock-running-reading.d.ts +6 -0
- package/dist/test-utils/build-mock-start-change.d.ts +2 -2
- package/dist/test-utils/claim-store-close-cases.d.ts +2 -0
- package/dist/test-utils/claim-store-copy-cases.d.ts +2 -0
- package/dist/test-utils/claim-store-outbox-cases.d.ts +2 -0
- package/dist/test-utils/claim-store-race-cases.d.ts +2 -0
- package/dist/test-utils/claim-store-seat-cases.d.ts +2 -0
- package/dist/test-utils/claim-store-session-cases.d.ts +2 -0
- package/dist/test-utils/collect-memory-limit-fills.d.ts +3 -0
- package/dist/test-utils/compare-text.d.ts +1 -0
- package/dist/test-utils/create-fake-backoff.d.ts +2 -0
- package/dist/test-utils/create-fake-clock.d.ts +5 -0
- package/dist/test-utils/create-fake-fact-sink.d.ts +8 -0
- package/dist/test-utils/create-fake-forge.d.ts +17 -0
- package/dist/test-utils/create-fake-worker.d.ts +42 -0
- package/dist/test-utils/create-memory-claim-store.d.ts +2 -2
- package/dist/test-utils/create-test-dispatch.d.ts +46 -0
- package/dist/test-utils/forge-contract.d.ts +15 -0
- package/dist/test-utils/is-same-held-seat.d.ts +2 -0
- package/dist/test-utils/types.d.ts +12 -2
- package/dist/test-utils/worker-contract.d.ts +14 -0
- package/dist/timeouts.d.ts +2 -0
- package/dist/types.d.ts +13 -0
- package/package.json +10 -3
- package/src/attempts/attempt-machine.ts +147 -0
- package/src/attempts/attempt-moves.ts +218 -0
- package/src/attempts/bind-attempt-session.ts +61 -0
- package/src/attempts/build-attempt-change.ts +540 -0
- package/src/attempts/build-attempt-fact.ts +135 -0
- package/src/attempts/end-item-attempts.ts +95 -0
- package/src/attempts/is-same-guard.ts +22 -0
- package/src/attempts/pick-call-attempt.ts +32 -0
- package/src/attempts/stop-stray-session.ts +48 -0
- package/src/attempts/types.ts +231 -0
- package/src/attempts/write-attempt-move.ts +41 -0
- package/src/attempts/write-session-bind.ts +47 -0
- package/src/claims/build-snapshot-hash.ts +9 -0
- package/src/claims/claim-next.ts +306 -0
- package/src/claims/pick-kept-session.ts +41 -0
- package/src/claims/request-wake.ts +17 -0
- package/src/claims/resume-claim.ts +56 -0
- package/src/claims/start-claim.ts +99 -0
- package/src/claims/types.ts +67 -0
- package/src/closeouts/build-settle-plans.ts +173 -0
- package/src/closeouts/close-out-attempt.ts +156 -0
- package/src/closeouts/effect-handlers.ts +232 -0
- package/src/closeouts/pick-settlement.ts +80 -0
- package/src/closeouts/settle-attempt.ts +161 -0
- package/src/closeouts/types.ts +87 -0
- package/src/index.ts +61 -0
- package/src/notices/constants.ts +7 -0
- package/src/notices/create-null-notifier.ts +6 -0
- package/src/notices/send-notices.ts +41 -0
- package/src/notices/types.ts +14 -0
- package/src/outbox/build-backoff-ms.ts +14 -0
- package/src/outbox/build-initial-sender-state.ts +14 -0
- package/src/outbox/build-outbox-status.ts +43 -0
- package/src/outbox/constants.ts +15 -0
- package/src/outbox/measure-wire-bytes.ts +31 -0
- package/src/outbox/pick-sender-move.ts +37 -0
- package/src/outbox/run-sender-once.ts +174 -0
- package/src/outbox/take-batch.ts +35 -0
- package/src/outbox/types.ts +76 -0
- package/src/pull-requests/build-link-change.ts +95 -0
- package/src/pull-requests/build-state-fact.ts +39 -0
- package/src/pull-requests/collect-attempt-trailers.ts +20 -0
- package/src/pull-requests/collect-seen-state.ts +19 -0
- package/src/pull-requests/constants.ts +5 -0
- package/src/pull-requests/link-pull-request.ts +119 -0
- package/src/pull-requests/parse-pull-request-url.ts +30 -0
- package/src/pull-requests/types.ts +63 -0
- package/src/pull-requests/watch-pull-requests.ts +308 -0
- package/src/readings/act-on-reading.ts +318 -0
- package/src/readings/find-waiting-since.ts +46 -0
- package/src/readings/pick-reading-action.ts +315 -0
- package/src/readings/types.ts +98 -0
- package/src/sessions/build-keep-writes.ts +55 -0
- package/src/sessions/build-kept-clear.ts +12 -0
- package/src/sessions/forget-sessions.ts +106 -0
- package/src/sessions/is-kept-due.ts +27 -0
- package/src/sessions/resume-kept-session.ts +25 -0
- package/src/sessions/types.ts +39 -0
- package/src/test-utils/apply-memory-change.ts +252 -0
- package/src/test-utils/build-memory-reader.ts +364 -0
- package/src/test-utils/build-mock-bind-change.ts +18 -11
- package/src/test-utils/build-mock-claim-change.ts +18 -8
- package/src/test-utils/build-mock-file-item-change.ts +3 -1
- package/src/test-utils/build-mock-new-id.ts +12 -0
- package/src/test-utils/build-mock-note-change.ts +18 -0
- package/src/test-utils/build-mock-pause-change.ts +2 -10
- package/src/test-utils/build-mock-pull-request-change.ts +19 -9
- package/src/test-utils/{build-mock-link-change.ts → build-mock-relation-change.ts} +6 -6
- package/src/test-utils/build-mock-running-reading.ts +19 -0
- package/src/test-utils/build-mock-settle-change.ts +18 -6
- package/src/test-utils/build-mock-start-change.ts +13 -6
- package/src/test-utils/claim-store-attempt-reader-cases.ts +163 -133
- package/src/test-utils/claim-store-claim-cases.ts +168 -85
- package/src/test-utils/claim-store-close-cases.ts +95 -0
- package/src/test-utils/claim-store-contract.ts +12 -2
- package/src/test-utils/claim-store-copy-cases.ts +100 -0
- package/src/test-utils/claim-store-exclusive-cases.ts +65 -19
- package/src/test-utils/claim-store-guard-cases.ts +92 -82
- package/src/test-utils/claim-store-item-reader-cases.ts +291 -77
- package/src/test-utils/claim-store-outbox-cases.ts +281 -0
- package/src/test-utils/claim-store-race-cases.ts +150 -0
- package/src/test-utils/claim-store-rollback-cases.ts +50 -50
- package/src/test-utils/claim-store-seat-cases.ts +270 -0
- package/src/test-utils/claim-store-session-cases.ts +289 -0
- package/src/test-utils/collect-memory-limit-fills.ts +15 -0
- package/src/test-utils/compare-text.ts +8 -0
- package/src/test-utils/create-fake-backoff.ts +16 -0
- package/src/test-utils/create-fake-clock.ts +20 -0
- package/src/test-utils/create-fake-fact-sink.ts +74 -0
- package/src/test-utils/create-fake-forge.ts +117 -0
- package/src/test-utils/create-fake-worker.ts +303 -0
- package/src/test-utils/create-memory-claim-store.ts +73 -484
- package/src/test-utils/create-test-dispatch.ts +597 -0
- package/src/test-utils/forge-contract.ts +171 -0
- package/src/test-utils/is-same-held-seat.ts +11 -0
- package/src/test-utils/types.ts +14 -2
- package/src/test-utils/worker-contract.ts +192 -0
- package/src/timeouts.ts +17 -0
- package/src/types.ts +32 -0
- package/dist/test-utils/claim-store-pool-cases.d.ts +0 -2
- package/src/test-utils/claim-store-pool-cases.ts +0 -178
|
@@ -0,0 +1,804 @@
|
|
|
1
|
+
import type { AttemptState, SessionMode } from '@boxxy/model';
|
|
2
|
+
import type { AttemptContext, AttemptMachineEvent, MoveEffect } from './types.ts';
|
|
3
|
+
export declare const attemptMachine: import("xstate").StateMachine<{
|
|
4
|
+
readonly mark: boolean;
|
|
5
|
+
readonly wakeRequested: boolean;
|
|
6
|
+
readonly mode: SessionMode;
|
|
7
|
+
readonly holdGen: number;
|
|
8
|
+
readonly closing: import("@boxxy/model").ClosingCause | null;
|
|
9
|
+
readonly hasSession: boolean;
|
|
10
|
+
readonly strayed: boolean;
|
|
11
|
+
readonly sessionStopped: boolean;
|
|
12
|
+
readonly sessionForgotten: boolean;
|
|
13
|
+
}, import("xstate").InferEvents<{
|
|
14
|
+
readonly started: import("xstate").TypeSchema<{
|
|
15
|
+
via: 'start' | 'reconcile';
|
|
16
|
+
}>;
|
|
17
|
+
readonly 'spawn-unanswered': import("xstate").TypeSchema<void>;
|
|
18
|
+
readonly 'session-seen': import("xstate").TypeSchema<void>;
|
|
19
|
+
readonly 'closed-out': import("xstate").TypeSchema<void>;
|
|
20
|
+
readonly 'timed-out': import("xstate").TypeSchema<void>;
|
|
21
|
+
readonly 'item-closed': import("xstate").TypeSchema<void>;
|
|
22
|
+
readonly 'turn-ended': import("xstate").TypeSchema<void>;
|
|
23
|
+
readonly stalled: import("xstate").TypeSchema<void>;
|
|
24
|
+
readonly 'skill-missing': import("xstate").TypeSchema<void>;
|
|
25
|
+
readonly 'usage-limited': import("xstate").TypeSchema<void>;
|
|
26
|
+
readonly 'suspend-asked': import("xstate").TypeSchema<void>;
|
|
27
|
+
readonly 'suspend-refused': import("xstate").TypeSchema<void>;
|
|
28
|
+
readonly slept: import("xstate").TypeSchema<void>;
|
|
29
|
+
readonly 'wake-requested': import("xstate").TypeSchema<void>;
|
|
30
|
+
readonly woken: import("xstate").TypeSchema<{
|
|
31
|
+
overCap: boolean;
|
|
32
|
+
}>;
|
|
33
|
+
readonly resumed: import("xstate").TypeSchema<void>;
|
|
34
|
+
readonly 'wake-refused': import("xstate").TypeSchema<void>;
|
|
35
|
+
readonly settled: import("xstate").TypeSchema<{
|
|
36
|
+
state: 'succeeded' | 'failed';
|
|
37
|
+
sessionStopped: boolean;
|
|
38
|
+
}>;
|
|
39
|
+
readonly 'stray-stopped': import("xstate").TypeSchema<void>;
|
|
40
|
+
readonly 'session-forgotten': import("xstate").TypeSchema<void>;
|
|
41
|
+
}>, {
|
|
42
|
+
[x: string]: import("xstate").AnyActor;
|
|
43
|
+
}, "closing" | "failed" | "reconciling" | "running" | "sleeping" | "starting" | "succeeded" | "waking", string, {
|
|
44
|
+
mode: SessionMode;
|
|
45
|
+
}, {}, {
|
|
46
|
+
effect: MoveEffect;
|
|
47
|
+
} & {
|
|
48
|
+
type: "effect";
|
|
49
|
+
}, never, {
|
|
50
|
+
readonly schemas: {
|
|
51
|
+
context: import("xstate").TypeSchema<AttemptContext>;
|
|
52
|
+
input: import("xstate").TypeSchema<{
|
|
53
|
+
mode: SessionMode;
|
|
54
|
+
}>;
|
|
55
|
+
events: {
|
|
56
|
+
started: import("xstate").TypeSchema<{
|
|
57
|
+
via: 'start' | 'reconcile';
|
|
58
|
+
}>;
|
|
59
|
+
'spawn-unanswered': import("xstate").TypeSchema<void>;
|
|
60
|
+
'session-seen': import("xstate").TypeSchema<void>;
|
|
61
|
+
'closed-out': import("xstate").TypeSchema<void>;
|
|
62
|
+
'timed-out': import("xstate").TypeSchema<void>;
|
|
63
|
+
'item-closed': import("xstate").TypeSchema<void>;
|
|
64
|
+
'turn-ended': import("xstate").TypeSchema<void>;
|
|
65
|
+
stalled: import("xstate").TypeSchema<void>;
|
|
66
|
+
'skill-missing': import("xstate").TypeSchema<void>;
|
|
67
|
+
'usage-limited': import("xstate").TypeSchema<void>;
|
|
68
|
+
'suspend-asked': import("xstate").TypeSchema<void>;
|
|
69
|
+
'suspend-refused': import("xstate").TypeSchema<void>;
|
|
70
|
+
slept: import("xstate").TypeSchema<void>;
|
|
71
|
+
'wake-requested': import("xstate").TypeSchema<void>;
|
|
72
|
+
woken: import("xstate").TypeSchema<{
|
|
73
|
+
overCap: boolean;
|
|
74
|
+
}>;
|
|
75
|
+
resumed: import("xstate").TypeSchema<void>;
|
|
76
|
+
'wake-refused': import("xstate").TypeSchema<void>;
|
|
77
|
+
settled: import("xstate").TypeSchema<{
|
|
78
|
+
state: 'succeeded' | 'failed';
|
|
79
|
+
sessionStopped: boolean;
|
|
80
|
+
}>;
|
|
81
|
+
'stray-stopped': import("xstate").TypeSchema<void>;
|
|
82
|
+
'session-forgotten': import("xstate").TypeSchema<void>;
|
|
83
|
+
};
|
|
84
|
+
emitted: {
|
|
85
|
+
effect: import("xstate").TypeSchema<{
|
|
86
|
+
effect: MoveEffect;
|
|
87
|
+
}>;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
readonly context: (args: {
|
|
91
|
+
spawn: import("xstate").Spawner;
|
|
92
|
+
actors: Record<string, import("xstate").AnyActorLogic>;
|
|
93
|
+
input: {
|
|
94
|
+
mode: SessionMode;
|
|
95
|
+
};
|
|
96
|
+
self: import("xstate").ActorSelf<import("xstate").MachineSnapshot<{
|
|
97
|
+
readonly mark: boolean;
|
|
98
|
+
readonly wakeRequested: boolean;
|
|
99
|
+
readonly mode: SessionMode;
|
|
100
|
+
readonly holdGen: number;
|
|
101
|
+
readonly closing: import("@boxxy/model").ClosingCause | null;
|
|
102
|
+
readonly hasSession: boolean;
|
|
103
|
+
readonly strayed: boolean;
|
|
104
|
+
readonly sessionStopped: boolean;
|
|
105
|
+
readonly sessionForgotten: boolean;
|
|
106
|
+
}, import("xstate").InferEvents<{
|
|
107
|
+
readonly started: import("xstate").TypeSchema<{
|
|
108
|
+
via: 'start' | 'reconcile';
|
|
109
|
+
}>;
|
|
110
|
+
readonly 'spawn-unanswered': import("xstate").TypeSchema<void>;
|
|
111
|
+
readonly 'session-seen': import("xstate").TypeSchema<void>;
|
|
112
|
+
readonly 'closed-out': import("xstate").TypeSchema<void>;
|
|
113
|
+
readonly 'timed-out': import("xstate").TypeSchema<void>;
|
|
114
|
+
readonly 'item-closed': import("xstate").TypeSchema<void>;
|
|
115
|
+
readonly 'turn-ended': import("xstate").TypeSchema<void>;
|
|
116
|
+
readonly stalled: import("xstate").TypeSchema<void>;
|
|
117
|
+
readonly 'skill-missing': import("xstate").TypeSchema<void>;
|
|
118
|
+
readonly 'usage-limited': import("xstate").TypeSchema<void>;
|
|
119
|
+
readonly 'suspend-asked': import("xstate").TypeSchema<void>;
|
|
120
|
+
readonly 'suspend-refused': import("xstate").TypeSchema<void>;
|
|
121
|
+
readonly slept: import("xstate").TypeSchema<void>;
|
|
122
|
+
readonly 'wake-requested': import("xstate").TypeSchema<void>;
|
|
123
|
+
readonly woken: import("xstate").TypeSchema<{
|
|
124
|
+
overCap: boolean;
|
|
125
|
+
}>;
|
|
126
|
+
readonly resumed: import("xstate").TypeSchema<void>;
|
|
127
|
+
readonly 'wake-refused': import("xstate").TypeSchema<void>;
|
|
128
|
+
readonly settled: import("xstate").TypeSchema<{
|
|
129
|
+
state: 'succeeded' | 'failed';
|
|
130
|
+
sessionStopped: boolean;
|
|
131
|
+
}>;
|
|
132
|
+
readonly 'stray-stopped': import("xstate").TypeSchema<void>;
|
|
133
|
+
readonly 'session-forgotten': import("xstate").TypeSchema<void>;
|
|
134
|
+
}>, Record<string, import("xstate").AnyActorRef | undefined>, import("xstate").StateValue, string, unknown, import("xstate").MetaObject, any>, import("xstate").InferEvents<{
|
|
135
|
+
readonly started: import("xstate").TypeSchema<{
|
|
136
|
+
via: 'start' | 'reconcile';
|
|
137
|
+
}>;
|
|
138
|
+
readonly 'spawn-unanswered': import("xstate").TypeSchema<void>;
|
|
139
|
+
readonly 'session-seen': import("xstate").TypeSchema<void>;
|
|
140
|
+
readonly 'closed-out': import("xstate").TypeSchema<void>;
|
|
141
|
+
readonly 'timed-out': import("xstate").TypeSchema<void>;
|
|
142
|
+
readonly 'item-closed': import("xstate").TypeSchema<void>;
|
|
143
|
+
readonly 'turn-ended': import("xstate").TypeSchema<void>;
|
|
144
|
+
readonly stalled: import("xstate").TypeSchema<void>;
|
|
145
|
+
readonly 'skill-missing': import("xstate").TypeSchema<void>;
|
|
146
|
+
readonly 'usage-limited': import("xstate").TypeSchema<void>;
|
|
147
|
+
readonly 'suspend-asked': import("xstate").TypeSchema<void>;
|
|
148
|
+
readonly 'suspend-refused': import("xstate").TypeSchema<void>;
|
|
149
|
+
readonly slept: import("xstate").TypeSchema<void>;
|
|
150
|
+
readonly 'wake-requested': import("xstate").TypeSchema<void>;
|
|
151
|
+
readonly woken: import("xstate").TypeSchema<{
|
|
152
|
+
overCap: boolean;
|
|
153
|
+
}>;
|
|
154
|
+
readonly resumed: import("xstate").TypeSchema<void>;
|
|
155
|
+
readonly 'wake-refused': import("xstate").TypeSchema<void>;
|
|
156
|
+
readonly settled: import("xstate").TypeSchema<{
|
|
157
|
+
state: 'succeeded' | 'failed';
|
|
158
|
+
sessionStopped: boolean;
|
|
159
|
+
}>;
|
|
160
|
+
readonly 'stray-stopped': import("xstate").TypeSchema<void>;
|
|
161
|
+
readonly 'session-forgotten': import("xstate").TypeSchema<void>;
|
|
162
|
+
}>, import("xstate").AnyEventObject, import("xstate").InferEvents<{
|
|
163
|
+
readonly started: import("xstate").TypeSchema<{
|
|
164
|
+
via: 'start' | 'reconcile';
|
|
165
|
+
}>;
|
|
166
|
+
readonly 'spawn-unanswered': import("xstate").TypeSchema<void>;
|
|
167
|
+
readonly 'session-seen': import("xstate").TypeSchema<void>;
|
|
168
|
+
readonly 'closed-out': import("xstate").TypeSchema<void>;
|
|
169
|
+
readonly 'timed-out': import("xstate").TypeSchema<void>;
|
|
170
|
+
readonly 'item-closed': import("xstate").TypeSchema<void>;
|
|
171
|
+
readonly 'turn-ended': import("xstate").TypeSchema<void>;
|
|
172
|
+
readonly stalled: import("xstate").TypeSchema<void>;
|
|
173
|
+
readonly 'skill-missing': import("xstate").TypeSchema<void>;
|
|
174
|
+
readonly 'usage-limited': import("xstate").TypeSchema<void>;
|
|
175
|
+
readonly 'suspend-asked': import("xstate").TypeSchema<void>;
|
|
176
|
+
readonly 'suspend-refused': import("xstate").TypeSchema<void>;
|
|
177
|
+
readonly slept: import("xstate").TypeSchema<void>;
|
|
178
|
+
readonly 'wake-requested': import("xstate").TypeSchema<void>;
|
|
179
|
+
readonly woken: import("xstate").TypeSchema<{
|
|
180
|
+
overCap: boolean;
|
|
181
|
+
}>;
|
|
182
|
+
readonly resumed: import("xstate").TypeSchema<void>;
|
|
183
|
+
readonly 'wake-refused': import("xstate").TypeSchema<void>;
|
|
184
|
+
readonly settled: import("xstate").TypeSchema<{
|
|
185
|
+
state: 'succeeded' | 'failed';
|
|
186
|
+
sessionStopped: boolean;
|
|
187
|
+
}>;
|
|
188
|
+
readonly 'stray-stopped': import("xstate").TypeSchema<void>;
|
|
189
|
+
readonly 'session-forgotten': import("xstate").TypeSchema<void>;
|
|
190
|
+
}>>;
|
|
191
|
+
}) => {
|
|
192
|
+
mark: false;
|
|
193
|
+
wakeRequested: false;
|
|
194
|
+
mode: SessionMode;
|
|
195
|
+
holdGen: number;
|
|
196
|
+
closing: null;
|
|
197
|
+
hasSession: false;
|
|
198
|
+
strayed: false;
|
|
199
|
+
sessionStopped: false;
|
|
200
|
+
sessionForgotten: false;
|
|
201
|
+
};
|
|
202
|
+
readonly entry: (_args: Omit<{
|
|
203
|
+
context: {
|
|
204
|
+
readonly mark: boolean;
|
|
205
|
+
readonly wakeRequested: boolean;
|
|
206
|
+
readonly mode: SessionMode;
|
|
207
|
+
readonly holdGen: number;
|
|
208
|
+
readonly closing: import("@boxxy/model").ClosingCause | null;
|
|
209
|
+
readonly hasSession: boolean;
|
|
210
|
+
readonly strayed: boolean;
|
|
211
|
+
readonly sessionStopped: boolean;
|
|
212
|
+
readonly sessionForgotten: boolean;
|
|
213
|
+
};
|
|
214
|
+
event: import("xstate").InferEvents<{
|
|
215
|
+
readonly started: import("xstate").TypeSchema<{
|
|
216
|
+
via: 'start' | 'reconcile';
|
|
217
|
+
}>;
|
|
218
|
+
readonly 'spawn-unanswered': import("xstate").TypeSchema<void>;
|
|
219
|
+
readonly 'session-seen': import("xstate").TypeSchema<void>;
|
|
220
|
+
readonly 'closed-out': import("xstate").TypeSchema<void>;
|
|
221
|
+
readonly 'timed-out': import("xstate").TypeSchema<void>;
|
|
222
|
+
readonly 'item-closed': import("xstate").TypeSchema<void>;
|
|
223
|
+
readonly 'turn-ended': import("xstate").TypeSchema<void>;
|
|
224
|
+
readonly stalled: import("xstate").TypeSchema<void>;
|
|
225
|
+
readonly 'skill-missing': import("xstate").TypeSchema<void>;
|
|
226
|
+
readonly 'usage-limited': import("xstate").TypeSchema<void>;
|
|
227
|
+
readonly 'suspend-asked': import("xstate").TypeSchema<void>;
|
|
228
|
+
readonly 'suspend-refused': import("xstate").TypeSchema<void>;
|
|
229
|
+
readonly slept: import("xstate").TypeSchema<void>;
|
|
230
|
+
readonly 'wake-requested': import("xstate").TypeSchema<void>;
|
|
231
|
+
readonly woken: import("xstate").TypeSchema<{
|
|
232
|
+
overCap: boolean;
|
|
233
|
+
}>;
|
|
234
|
+
readonly resumed: import("xstate").TypeSchema<void>;
|
|
235
|
+
readonly 'wake-refused': import("xstate").TypeSchema<void>;
|
|
236
|
+
readonly settled: import("xstate").TypeSchema<{
|
|
237
|
+
state: 'succeeded' | 'failed';
|
|
238
|
+
sessionStopped: boolean;
|
|
239
|
+
}>;
|
|
240
|
+
readonly 'stray-stopped': import("xstate").TypeSchema<void>;
|
|
241
|
+
readonly 'session-forgotten': import("xstate").TypeSchema<void>;
|
|
242
|
+
}>;
|
|
243
|
+
parent: import("xstate").AnyActorRef | undefined;
|
|
244
|
+
self: import("xstate").ActorSelf<import("xstate").MachineSnapshot<{
|
|
245
|
+
readonly mark: boolean;
|
|
246
|
+
readonly wakeRequested: boolean;
|
|
247
|
+
readonly mode: SessionMode;
|
|
248
|
+
readonly holdGen: number;
|
|
249
|
+
readonly closing: import("@boxxy/model").ClosingCause | null;
|
|
250
|
+
readonly hasSession: boolean;
|
|
251
|
+
readonly strayed: boolean;
|
|
252
|
+
readonly sessionStopped: boolean;
|
|
253
|
+
readonly sessionForgotten: boolean;
|
|
254
|
+
}, import("xstate").InferEvents<{
|
|
255
|
+
readonly started: import("xstate").TypeSchema<{
|
|
256
|
+
via: 'start' | 'reconcile';
|
|
257
|
+
}>;
|
|
258
|
+
readonly 'spawn-unanswered': import("xstate").TypeSchema<void>;
|
|
259
|
+
readonly 'session-seen': import("xstate").TypeSchema<void>;
|
|
260
|
+
readonly 'closed-out': import("xstate").TypeSchema<void>;
|
|
261
|
+
readonly 'timed-out': import("xstate").TypeSchema<void>;
|
|
262
|
+
readonly 'item-closed': import("xstate").TypeSchema<void>;
|
|
263
|
+
readonly 'turn-ended': import("xstate").TypeSchema<void>;
|
|
264
|
+
readonly stalled: import("xstate").TypeSchema<void>;
|
|
265
|
+
readonly 'skill-missing': import("xstate").TypeSchema<void>;
|
|
266
|
+
readonly 'usage-limited': import("xstate").TypeSchema<void>;
|
|
267
|
+
readonly 'suspend-asked': import("xstate").TypeSchema<void>;
|
|
268
|
+
readonly 'suspend-refused': import("xstate").TypeSchema<void>;
|
|
269
|
+
readonly slept: import("xstate").TypeSchema<void>;
|
|
270
|
+
readonly 'wake-requested': import("xstate").TypeSchema<void>;
|
|
271
|
+
readonly woken: import("xstate").TypeSchema<{
|
|
272
|
+
overCap: boolean;
|
|
273
|
+
}>;
|
|
274
|
+
readonly resumed: import("xstate").TypeSchema<void>;
|
|
275
|
+
readonly 'wake-refused': import("xstate").TypeSchema<void>;
|
|
276
|
+
readonly settled: import("xstate").TypeSchema<{
|
|
277
|
+
state: 'succeeded' | 'failed';
|
|
278
|
+
sessionStopped: boolean;
|
|
279
|
+
}>;
|
|
280
|
+
readonly 'stray-stopped': import("xstate").TypeSchema<void>;
|
|
281
|
+
readonly 'session-forgotten': import("xstate").TypeSchema<void>;
|
|
282
|
+
}>, Record<string, import("xstate").AnyActorRef | undefined>, import("xstate").StateValue, string, unknown, import("xstate").MetaObject, any>, import("xstate").InferEvents<{
|
|
283
|
+
readonly started: import("xstate").TypeSchema<{
|
|
284
|
+
via: 'start' | 'reconcile';
|
|
285
|
+
}>;
|
|
286
|
+
readonly 'spawn-unanswered': import("xstate").TypeSchema<void>;
|
|
287
|
+
readonly 'session-seen': import("xstate").TypeSchema<void>;
|
|
288
|
+
readonly 'closed-out': import("xstate").TypeSchema<void>;
|
|
289
|
+
readonly 'timed-out': import("xstate").TypeSchema<void>;
|
|
290
|
+
readonly 'item-closed': import("xstate").TypeSchema<void>;
|
|
291
|
+
readonly 'turn-ended': import("xstate").TypeSchema<void>;
|
|
292
|
+
readonly stalled: import("xstate").TypeSchema<void>;
|
|
293
|
+
readonly 'skill-missing': import("xstate").TypeSchema<void>;
|
|
294
|
+
readonly 'usage-limited': import("xstate").TypeSchema<void>;
|
|
295
|
+
readonly 'suspend-asked': import("xstate").TypeSchema<void>;
|
|
296
|
+
readonly 'suspend-refused': import("xstate").TypeSchema<void>;
|
|
297
|
+
readonly slept: import("xstate").TypeSchema<void>;
|
|
298
|
+
readonly 'wake-requested': import("xstate").TypeSchema<void>;
|
|
299
|
+
readonly woken: import("xstate").TypeSchema<{
|
|
300
|
+
overCap: boolean;
|
|
301
|
+
}>;
|
|
302
|
+
readonly resumed: import("xstate").TypeSchema<void>;
|
|
303
|
+
readonly 'wake-refused': import("xstate").TypeSchema<void>;
|
|
304
|
+
readonly settled: import("xstate").TypeSchema<{
|
|
305
|
+
state: 'succeeded' | 'failed';
|
|
306
|
+
sessionStopped: boolean;
|
|
307
|
+
}>;
|
|
308
|
+
readonly 'stray-stopped': import("xstate").TypeSchema<void>;
|
|
309
|
+
readonly 'session-forgotten': import("xstate").TypeSchema<void>;
|
|
310
|
+
}>, import("xstate").EventObject, import("xstate").InferEvents<{
|
|
311
|
+
readonly started: import("xstate").TypeSchema<{
|
|
312
|
+
via: 'start' | 'reconcile';
|
|
313
|
+
}>;
|
|
314
|
+
readonly 'spawn-unanswered': import("xstate").TypeSchema<void>;
|
|
315
|
+
readonly 'session-seen': import("xstate").TypeSchema<void>;
|
|
316
|
+
readonly 'closed-out': import("xstate").TypeSchema<void>;
|
|
317
|
+
readonly 'timed-out': import("xstate").TypeSchema<void>;
|
|
318
|
+
readonly 'item-closed': import("xstate").TypeSchema<void>;
|
|
319
|
+
readonly 'turn-ended': import("xstate").TypeSchema<void>;
|
|
320
|
+
readonly stalled: import("xstate").TypeSchema<void>;
|
|
321
|
+
readonly 'skill-missing': import("xstate").TypeSchema<void>;
|
|
322
|
+
readonly 'usage-limited': import("xstate").TypeSchema<void>;
|
|
323
|
+
readonly 'suspend-asked': import("xstate").TypeSchema<void>;
|
|
324
|
+
readonly 'suspend-refused': import("xstate").TypeSchema<void>;
|
|
325
|
+
readonly slept: import("xstate").TypeSchema<void>;
|
|
326
|
+
readonly 'wake-requested': import("xstate").TypeSchema<void>;
|
|
327
|
+
readonly woken: import("xstate").TypeSchema<{
|
|
328
|
+
overCap: boolean;
|
|
329
|
+
}>;
|
|
330
|
+
readonly resumed: import("xstate").TypeSchema<void>;
|
|
331
|
+
readonly 'wake-refused': import("xstate").TypeSchema<void>;
|
|
332
|
+
readonly settled: import("xstate").TypeSchema<{
|
|
333
|
+
state: 'succeeded' | 'failed';
|
|
334
|
+
sessionStopped: boolean;
|
|
335
|
+
}>;
|
|
336
|
+
readonly 'stray-stopped': import("xstate").TypeSchema<void>;
|
|
337
|
+
readonly 'session-forgotten': import("xstate").TypeSchema<void>;
|
|
338
|
+
}>>;
|
|
339
|
+
children: Record<string, import("xstate").AnyActor | undefined>;
|
|
340
|
+
actions: Record<string, (...args: any[]) => void | {
|
|
341
|
+
context?: any;
|
|
342
|
+
children?: any;
|
|
343
|
+
}>;
|
|
344
|
+
actors: Record<string, import("xstate").AnyActorLogic>;
|
|
345
|
+
guards: Record<string, Function>;
|
|
346
|
+
delays: Record<string, number | Function>;
|
|
347
|
+
system?: import("xstate").AnyActorSystem;
|
|
348
|
+
params: never;
|
|
349
|
+
}, "params"> & {
|
|
350
|
+
input: Record<string, unknown> | undefined;
|
|
351
|
+
stateNode: import("xstate").AnyStateNode;
|
|
352
|
+
}, enq: import("xstate").EnqueueObject<import("xstate").InferEvents<{
|
|
353
|
+
readonly started: import("xstate").TypeSchema<{
|
|
354
|
+
via: 'start' | 'reconcile';
|
|
355
|
+
}>;
|
|
356
|
+
readonly 'spawn-unanswered': import("xstate").TypeSchema<void>;
|
|
357
|
+
readonly 'session-seen': import("xstate").TypeSchema<void>;
|
|
358
|
+
readonly 'closed-out': import("xstate").TypeSchema<void>;
|
|
359
|
+
readonly 'timed-out': import("xstate").TypeSchema<void>;
|
|
360
|
+
readonly 'item-closed': import("xstate").TypeSchema<void>;
|
|
361
|
+
readonly 'turn-ended': import("xstate").TypeSchema<void>;
|
|
362
|
+
readonly stalled: import("xstate").TypeSchema<void>;
|
|
363
|
+
readonly 'skill-missing': import("xstate").TypeSchema<void>;
|
|
364
|
+
readonly 'usage-limited': import("xstate").TypeSchema<void>;
|
|
365
|
+
readonly 'suspend-asked': import("xstate").TypeSchema<void>;
|
|
366
|
+
readonly 'suspend-refused': import("xstate").TypeSchema<void>;
|
|
367
|
+
readonly slept: import("xstate").TypeSchema<void>;
|
|
368
|
+
readonly 'wake-requested': import("xstate").TypeSchema<void>;
|
|
369
|
+
readonly woken: import("xstate").TypeSchema<{
|
|
370
|
+
overCap: boolean;
|
|
371
|
+
}>;
|
|
372
|
+
readonly resumed: import("xstate").TypeSchema<void>;
|
|
373
|
+
readonly 'wake-refused': import("xstate").TypeSchema<void>;
|
|
374
|
+
readonly settled: import("xstate").TypeSchema<{
|
|
375
|
+
state: 'succeeded' | 'failed';
|
|
376
|
+
sessionStopped: boolean;
|
|
377
|
+
}>;
|
|
378
|
+
readonly 'stray-stopped': import("xstate").TypeSchema<void>;
|
|
379
|
+
readonly 'session-forgotten': import("xstate").TypeSchema<void>;
|
|
380
|
+
}>, {
|
|
381
|
+
effect: MoveEffect;
|
|
382
|
+
} & {
|
|
383
|
+
type: "effect";
|
|
384
|
+
}, import("xstate").SystemRegistry, Record<string, import("xstate").AnyActorLogic>, {
|
|
385
|
+
[x: string]: import("xstate").AnyActor;
|
|
386
|
+
}>) => void;
|
|
387
|
+
readonly initial: "starting";
|
|
388
|
+
readonly states: {
|
|
389
|
+
starting: {
|
|
390
|
+
on: Record<"closed-out" | "item-closed" | "resumed" | "session-forgotten" | "session-seen" | "settled" | "skill-missing" | "slept" | "spawn-unanswered" | "stalled" | "started" | "stray-stopped" | "suspend-asked" | "suspend-refused" | "timed-out" | "turn-ended" | "usage-limited" | "wake-refused" | "wake-requested" | "woken", MoveHandler>;
|
|
391
|
+
};
|
|
392
|
+
reconciling: {
|
|
393
|
+
on: Record<"closed-out" | "item-closed" | "resumed" | "session-forgotten" | "session-seen" | "settled" | "skill-missing" | "slept" | "spawn-unanswered" | "stalled" | "started" | "stray-stopped" | "suspend-asked" | "suspend-refused" | "timed-out" | "turn-ended" | "usage-limited" | "wake-refused" | "wake-requested" | "woken", MoveHandler>;
|
|
394
|
+
};
|
|
395
|
+
running: {
|
|
396
|
+
on: Record<"closed-out" | "item-closed" | "resumed" | "session-forgotten" | "session-seen" | "settled" | "skill-missing" | "slept" | "spawn-unanswered" | "stalled" | "started" | "stray-stopped" | "suspend-asked" | "suspend-refused" | "timed-out" | "turn-ended" | "usage-limited" | "wake-refused" | "wake-requested" | "woken", MoveHandler>;
|
|
397
|
+
};
|
|
398
|
+
sleeping: {
|
|
399
|
+
on: Record<"closed-out" | "item-closed" | "resumed" | "session-forgotten" | "session-seen" | "settled" | "skill-missing" | "slept" | "spawn-unanswered" | "stalled" | "started" | "stray-stopped" | "suspend-asked" | "suspend-refused" | "timed-out" | "turn-ended" | "usage-limited" | "wake-refused" | "wake-requested" | "woken", MoveHandler>;
|
|
400
|
+
};
|
|
401
|
+
waking: {
|
|
402
|
+
on: Record<"closed-out" | "item-closed" | "resumed" | "session-forgotten" | "session-seen" | "settled" | "skill-missing" | "slept" | "spawn-unanswered" | "stalled" | "started" | "stray-stopped" | "suspend-asked" | "suspend-refused" | "timed-out" | "turn-ended" | "usage-limited" | "wake-refused" | "wake-requested" | "woken", MoveHandler>;
|
|
403
|
+
};
|
|
404
|
+
closing: {
|
|
405
|
+
on: Record<"closed-out" | "item-closed" | "resumed" | "session-forgotten" | "session-seen" | "settled" | "skill-missing" | "slept" | "spawn-unanswered" | "stalled" | "started" | "stray-stopped" | "suspend-asked" | "suspend-refused" | "timed-out" | "turn-ended" | "usage-limited" | "wake-refused" | "wake-requested" | "woken", MoveHandler>;
|
|
406
|
+
};
|
|
407
|
+
succeeded: {
|
|
408
|
+
on: Record<"closed-out" | "item-closed" | "resumed" | "session-forgotten" | "session-seen" | "settled" | "skill-missing" | "slept" | "spawn-unanswered" | "stalled" | "started" | "stray-stopped" | "suspend-asked" | "suspend-refused" | "timed-out" | "turn-ended" | "usage-limited" | "wake-refused" | "wake-requested" | "woken", MoveHandler>;
|
|
409
|
+
};
|
|
410
|
+
failed: {
|
|
411
|
+
on: Record<"closed-out" | "item-closed" | "resumed" | "session-forgotten" | "session-seen" | "settled" | "skill-missing" | "slept" | "spawn-unanswered" | "stalled" | "started" | "stray-stopped" | "suspend-asked" | "suspend-refused" | "timed-out" | "turn-ended" | "usage-limited" | "wake-refused" | "wake-requested" | "woken", MoveHandler>;
|
|
412
|
+
};
|
|
413
|
+
};
|
|
414
|
+
}, Record<string, (...args: any[]) => void | {
|
|
415
|
+
context?: any;
|
|
416
|
+
children?: any;
|
|
417
|
+
}>, Record<string, import("xstate").AnyActorLogic>, Record<string, Function>, Record<string, number | Function>, never, never> & {
|
|
418
|
+
states: {
|
|
419
|
+
readonly schemas: {
|
|
420
|
+
context: import("xstate").TypeSchema<AttemptContext>;
|
|
421
|
+
input: import("xstate").TypeSchema<{
|
|
422
|
+
mode: SessionMode;
|
|
423
|
+
}>;
|
|
424
|
+
events: {
|
|
425
|
+
started: import("xstate").TypeSchema<{
|
|
426
|
+
via: 'start' | 'reconcile';
|
|
427
|
+
}>;
|
|
428
|
+
'spawn-unanswered': import("xstate").TypeSchema<void>;
|
|
429
|
+
'session-seen': import("xstate").TypeSchema<void>;
|
|
430
|
+
'closed-out': import("xstate").TypeSchema<void>;
|
|
431
|
+
'timed-out': import("xstate").TypeSchema<void>;
|
|
432
|
+
'item-closed': import("xstate").TypeSchema<void>;
|
|
433
|
+
'turn-ended': import("xstate").TypeSchema<void>;
|
|
434
|
+
stalled: import("xstate").TypeSchema<void>;
|
|
435
|
+
'skill-missing': import("xstate").TypeSchema<void>;
|
|
436
|
+
'usage-limited': import("xstate").TypeSchema<void>;
|
|
437
|
+
'suspend-asked': import("xstate").TypeSchema<void>;
|
|
438
|
+
'suspend-refused': import("xstate").TypeSchema<void>;
|
|
439
|
+
slept: import("xstate").TypeSchema<void>;
|
|
440
|
+
'wake-requested': import("xstate").TypeSchema<void>;
|
|
441
|
+
woken: import("xstate").TypeSchema<{
|
|
442
|
+
overCap: boolean;
|
|
443
|
+
}>;
|
|
444
|
+
resumed: import("xstate").TypeSchema<void>;
|
|
445
|
+
'wake-refused': import("xstate").TypeSchema<void>;
|
|
446
|
+
settled: import("xstate").TypeSchema<{
|
|
447
|
+
state: 'succeeded' | 'failed';
|
|
448
|
+
sessionStopped: boolean;
|
|
449
|
+
}>;
|
|
450
|
+
'stray-stopped': import("xstate").TypeSchema<void>;
|
|
451
|
+
'session-forgotten': import("xstate").TypeSchema<void>;
|
|
452
|
+
};
|
|
453
|
+
emitted: {
|
|
454
|
+
effect: import("xstate").TypeSchema<{
|
|
455
|
+
effect: MoveEffect;
|
|
456
|
+
}>;
|
|
457
|
+
};
|
|
458
|
+
};
|
|
459
|
+
readonly context: (args: {
|
|
460
|
+
spawn: import("xstate").Spawner;
|
|
461
|
+
actors: Record<string, import("xstate").AnyActorLogic>;
|
|
462
|
+
input: {
|
|
463
|
+
mode: SessionMode;
|
|
464
|
+
};
|
|
465
|
+
self: import("xstate").ActorSelf<import("xstate").MachineSnapshot<{
|
|
466
|
+
readonly mark: boolean;
|
|
467
|
+
readonly wakeRequested: boolean;
|
|
468
|
+
readonly mode: SessionMode;
|
|
469
|
+
readonly holdGen: number;
|
|
470
|
+
readonly closing: import("@boxxy/model").ClosingCause | null;
|
|
471
|
+
readonly hasSession: boolean;
|
|
472
|
+
readonly strayed: boolean;
|
|
473
|
+
readonly sessionStopped: boolean;
|
|
474
|
+
readonly sessionForgotten: boolean;
|
|
475
|
+
}, import("xstate").InferEvents<{
|
|
476
|
+
readonly started: import("xstate").TypeSchema<{
|
|
477
|
+
via: 'start' | 'reconcile';
|
|
478
|
+
}>;
|
|
479
|
+
readonly 'spawn-unanswered': import("xstate").TypeSchema<void>;
|
|
480
|
+
readonly 'session-seen': import("xstate").TypeSchema<void>;
|
|
481
|
+
readonly 'closed-out': import("xstate").TypeSchema<void>;
|
|
482
|
+
readonly 'timed-out': import("xstate").TypeSchema<void>;
|
|
483
|
+
readonly 'item-closed': import("xstate").TypeSchema<void>;
|
|
484
|
+
readonly 'turn-ended': import("xstate").TypeSchema<void>;
|
|
485
|
+
readonly stalled: import("xstate").TypeSchema<void>;
|
|
486
|
+
readonly 'skill-missing': import("xstate").TypeSchema<void>;
|
|
487
|
+
readonly 'usage-limited': import("xstate").TypeSchema<void>;
|
|
488
|
+
readonly 'suspend-asked': import("xstate").TypeSchema<void>;
|
|
489
|
+
readonly 'suspend-refused': import("xstate").TypeSchema<void>;
|
|
490
|
+
readonly slept: import("xstate").TypeSchema<void>;
|
|
491
|
+
readonly 'wake-requested': import("xstate").TypeSchema<void>;
|
|
492
|
+
readonly woken: import("xstate").TypeSchema<{
|
|
493
|
+
overCap: boolean;
|
|
494
|
+
}>;
|
|
495
|
+
readonly resumed: import("xstate").TypeSchema<void>;
|
|
496
|
+
readonly 'wake-refused': import("xstate").TypeSchema<void>;
|
|
497
|
+
readonly settled: import("xstate").TypeSchema<{
|
|
498
|
+
state: 'succeeded' | 'failed';
|
|
499
|
+
sessionStopped: boolean;
|
|
500
|
+
}>;
|
|
501
|
+
readonly 'stray-stopped': import("xstate").TypeSchema<void>;
|
|
502
|
+
readonly 'session-forgotten': import("xstate").TypeSchema<void>;
|
|
503
|
+
}>, Record<string, import("xstate").AnyActorRef | undefined>, import("xstate").StateValue, string, unknown, import("xstate").MetaObject, any>, import("xstate").InferEvents<{
|
|
504
|
+
readonly started: import("xstate").TypeSchema<{
|
|
505
|
+
via: 'start' | 'reconcile';
|
|
506
|
+
}>;
|
|
507
|
+
readonly 'spawn-unanswered': import("xstate").TypeSchema<void>;
|
|
508
|
+
readonly 'session-seen': import("xstate").TypeSchema<void>;
|
|
509
|
+
readonly 'closed-out': import("xstate").TypeSchema<void>;
|
|
510
|
+
readonly 'timed-out': import("xstate").TypeSchema<void>;
|
|
511
|
+
readonly 'item-closed': import("xstate").TypeSchema<void>;
|
|
512
|
+
readonly 'turn-ended': import("xstate").TypeSchema<void>;
|
|
513
|
+
readonly stalled: import("xstate").TypeSchema<void>;
|
|
514
|
+
readonly 'skill-missing': import("xstate").TypeSchema<void>;
|
|
515
|
+
readonly 'usage-limited': import("xstate").TypeSchema<void>;
|
|
516
|
+
readonly 'suspend-asked': import("xstate").TypeSchema<void>;
|
|
517
|
+
readonly 'suspend-refused': import("xstate").TypeSchema<void>;
|
|
518
|
+
readonly slept: import("xstate").TypeSchema<void>;
|
|
519
|
+
readonly 'wake-requested': import("xstate").TypeSchema<void>;
|
|
520
|
+
readonly woken: import("xstate").TypeSchema<{
|
|
521
|
+
overCap: boolean;
|
|
522
|
+
}>;
|
|
523
|
+
readonly resumed: import("xstate").TypeSchema<void>;
|
|
524
|
+
readonly 'wake-refused': import("xstate").TypeSchema<void>;
|
|
525
|
+
readonly settled: import("xstate").TypeSchema<{
|
|
526
|
+
state: 'succeeded' | 'failed';
|
|
527
|
+
sessionStopped: boolean;
|
|
528
|
+
}>;
|
|
529
|
+
readonly 'stray-stopped': import("xstate").TypeSchema<void>;
|
|
530
|
+
readonly 'session-forgotten': import("xstate").TypeSchema<void>;
|
|
531
|
+
}>, import("xstate").AnyEventObject, import("xstate").InferEvents<{
|
|
532
|
+
readonly started: import("xstate").TypeSchema<{
|
|
533
|
+
via: 'start' | 'reconcile';
|
|
534
|
+
}>;
|
|
535
|
+
readonly 'spawn-unanswered': import("xstate").TypeSchema<void>;
|
|
536
|
+
readonly 'session-seen': import("xstate").TypeSchema<void>;
|
|
537
|
+
readonly 'closed-out': import("xstate").TypeSchema<void>;
|
|
538
|
+
readonly 'timed-out': import("xstate").TypeSchema<void>;
|
|
539
|
+
readonly 'item-closed': import("xstate").TypeSchema<void>;
|
|
540
|
+
readonly 'turn-ended': import("xstate").TypeSchema<void>;
|
|
541
|
+
readonly stalled: import("xstate").TypeSchema<void>;
|
|
542
|
+
readonly 'skill-missing': import("xstate").TypeSchema<void>;
|
|
543
|
+
readonly 'usage-limited': import("xstate").TypeSchema<void>;
|
|
544
|
+
readonly 'suspend-asked': import("xstate").TypeSchema<void>;
|
|
545
|
+
readonly 'suspend-refused': import("xstate").TypeSchema<void>;
|
|
546
|
+
readonly slept: import("xstate").TypeSchema<void>;
|
|
547
|
+
readonly 'wake-requested': import("xstate").TypeSchema<void>;
|
|
548
|
+
readonly woken: import("xstate").TypeSchema<{
|
|
549
|
+
overCap: boolean;
|
|
550
|
+
}>;
|
|
551
|
+
readonly resumed: import("xstate").TypeSchema<void>;
|
|
552
|
+
readonly 'wake-refused': import("xstate").TypeSchema<void>;
|
|
553
|
+
readonly settled: import("xstate").TypeSchema<{
|
|
554
|
+
state: 'succeeded' | 'failed';
|
|
555
|
+
sessionStopped: boolean;
|
|
556
|
+
}>;
|
|
557
|
+
readonly 'stray-stopped': import("xstate").TypeSchema<void>;
|
|
558
|
+
readonly 'session-forgotten': import("xstate").TypeSchema<void>;
|
|
559
|
+
}>>;
|
|
560
|
+
}) => {
|
|
561
|
+
mark: false;
|
|
562
|
+
wakeRequested: false;
|
|
563
|
+
mode: SessionMode;
|
|
564
|
+
holdGen: number;
|
|
565
|
+
closing: null;
|
|
566
|
+
hasSession: false;
|
|
567
|
+
strayed: false;
|
|
568
|
+
sessionStopped: false;
|
|
569
|
+
sessionForgotten: false;
|
|
570
|
+
};
|
|
571
|
+
readonly entry: (_args: Omit<{
|
|
572
|
+
context: {
|
|
573
|
+
readonly mark: boolean;
|
|
574
|
+
readonly wakeRequested: boolean;
|
|
575
|
+
readonly mode: SessionMode;
|
|
576
|
+
readonly holdGen: number;
|
|
577
|
+
readonly closing: import("@boxxy/model").ClosingCause | null;
|
|
578
|
+
readonly hasSession: boolean;
|
|
579
|
+
readonly strayed: boolean;
|
|
580
|
+
readonly sessionStopped: boolean;
|
|
581
|
+
readonly sessionForgotten: boolean;
|
|
582
|
+
};
|
|
583
|
+
event: import("xstate").InferEvents<{
|
|
584
|
+
readonly started: import("xstate").TypeSchema<{
|
|
585
|
+
via: 'start' | 'reconcile';
|
|
586
|
+
}>;
|
|
587
|
+
readonly 'spawn-unanswered': import("xstate").TypeSchema<void>;
|
|
588
|
+
readonly 'session-seen': import("xstate").TypeSchema<void>;
|
|
589
|
+
readonly 'closed-out': import("xstate").TypeSchema<void>;
|
|
590
|
+
readonly 'timed-out': import("xstate").TypeSchema<void>;
|
|
591
|
+
readonly 'item-closed': import("xstate").TypeSchema<void>;
|
|
592
|
+
readonly 'turn-ended': import("xstate").TypeSchema<void>;
|
|
593
|
+
readonly stalled: import("xstate").TypeSchema<void>;
|
|
594
|
+
readonly 'skill-missing': import("xstate").TypeSchema<void>;
|
|
595
|
+
readonly 'usage-limited': import("xstate").TypeSchema<void>;
|
|
596
|
+
readonly 'suspend-asked': import("xstate").TypeSchema<void>;
|
|
597
|
+
readonly 'suspend-refused': import("xstate").TypeSchema<void>;
|
|
598
|
+
readonly slept: import("xstate").TypeSchema<void>;
|
|
599
|
+
readonly 'wake-requested': import("xstate").TypeSchema<void>;
|
|
600
|
+
readonly woken: import("xstate").TypeSchema<{
|
|
601
|
+
overCap: boolean;
|
|
602
|
+
}>;
|
|
603
|
+
readonly resumed: import("xstate").TypeSchema<void>;
|
|
604
|
+
readonly 'wake-refused': import("xstate").TypeSchema<void>;
|
|
605
|
+
readonly settled: import("xstate").TypeSchema<{
|
|
606
|
+
state: 'succeeded' | 'failed';
|
|
607
|
+
sessionStopped: boolean;
|
|
608
|
+
}>;
|
|
609
|
+
readonly 'stray-stopped': import("xstate").TypeSchema<void>;
|
|
610
|
+
readonly 'session-forgotten': import("xstate").TypeSchema<void>;
|
|
611
|
+
}>;
|
|
612
|
+
parent: import("xstate").AnyActorRef | undefined;
|
|
613
|
+
self: import("xstate").ActorSelf<import("xstate").MachineSnapshot<{
|
|
614
|
+
readonly mark: boolean;
|
|
615
|
+
readonly wakeRequested: boolean;
|
|
616
|
+
readonly mode: SessionMode;
|
|
617
|
+
readonly holdGen: number;
|
|
618
|
+
readonly closing: import("@boxxy/model").ClosingCause | null;
|
|
619
|
+
readonly hasSession: boolean;
|
|
620
|
+
readonly strayed: boolean;
|
|
621
|
+
readonly sessionStopped: boolean;
|
|
622
|
+
readonly sessionForgotten: boolean;
|
|
623
|
+
}, import("xstate").InferEvents<{
|
|
624
|
+
readonly started: import("xstate").TypeSchema<{
|
|
625
|
+
via: 'start' | 'reconcile';
|
|
626
|
+
}>;
|
|
627
|
+
readonly 'spawn-unanswered': import("xstate").TypeSchema<void>;
|
|
628
|
+
readonly 'session-seen': import("xstate").TypeSchema<void>;
|
|
629
|
+
readonly 'closed-out': import("xstate").TypeSchema<void>;
|
|
630
|
+
readonly 'timed-out': import("xstate").TypeSchema<void>;
|
|
631
|
+
readonly 'item-closed': import("xstate").TypeSchema<void>;
|
|
632
|
+
readonly 'turn-ended': import("xstate").TypeSchema<void>;
|
|
633
|
+
readonly stalled: import("xstate").TypeSchema<void>;
|
|
634
|
+
readonly 'skill-missing': import("xstate").TypeSchema<void>;
|
|
635
|
+
readonly 'usage-limited': import("xstate").TypeSchema<void>;
|
|
636
|
+
readonly 'suspend-asked': import("xstate").TypeSchema<void>;
|
|
637
|
+
readonly 'suspend-refused': import("xstate").TypeSchema<void>;
|
|
638
|
+
readonly slept: import("xstate").TypeSchema<void>;
|
|
639
|
+
readonly 'wake-requested': import("xstate").TypeSchema<void>;
|
|
640
|
+
readonly woken: import("xstate").TypeSchema<{
|
|
641
|
+
overCap: boolean;
|
|
642
|
+
}>;
|
|
643
|
+
readonly resumed: import("xstate").TypeSchema<void>;
|
|
644
|
+
readonly 'wake-refused': import("xstate").TypeSchema<void>;
|
|
645
|
+
readonly settled: import("xstate").TypeSchema<{
|
|
646
|
+
state: 'succeeded' | 'failed';
|
|
647
|
+
sessionStopped: boolean;
|
|
648
|
+
}>;
|
|
649
|
+
readonly 'stray-stopped': import("xstate").TypeSchema<void>;
|
|
650
|
+
readonly 'session-forgotten': import("xstate").TypeSchema<void>;
|
|
651
|
+
}>, Record<string, import("xstate").AnyActorRef | undefined>, import("xstate").StateValue, string, unknown, import("xstate").MetaObject, any>, import("xstate").InferEvents<{
|
|
652
|
+
readonly started: import("xstate").TypeSchema<{
|
|
653
|
+
via: 'start' | 'reconcile';
|
|
654
|
+
}>;
|
|
655
|
+
readonly 'spawn-unanswered': import("xstate").TypeSchema<void>;
|
|
656
|
+
readonly 'session-seen': import("xstate").TypeSchema<void>;
|
|
657
|
+
readonly 'closed-out': import("xstate").TypeSchema<void>;
|
|
658
|
+
readonly 'timed-out': import("xstate").TypeSchema<void>;
|
|
659
|
+
readonly 'item-closed': import("xstate").TypeSchema<void>;
|
|
660
|
+
readonly 'turn-ended': import("xstate").TypeSchema<void>;
|
|
661
|
+
readonly stalled: import("xstate").TypeSchema<void>;
|
|
662
|
+
readonly 'skill-missing': import("xstate").TypeSchema<void>;
|
|
663
|
+
readonly 'usage-limited': import("xstate").TypeSchema<void>;
|
|
664
|
+
readonly 'suspend-asked': import("xstate").TypeSchema<void>;
|
|
665
|
+
readonly 'suspend-refused': import("xstate").TypeSchema<void>;
|
|
666
|
+
readonly slept: import("xstate").TypeSchema<void>;
|
|
667
|
+
readonly 'wake-requested': import("xstate").TypeSchema<void>;
|
|
668
|
+
readonly woken: import("xstate").TypeSchema<{
|
|
669
|
+
overCap: boolean;
|
|
670
|
+
}>;
|
|
671
|
+
readonly resumed: import("xstate").TypeSchema<void>;
|
|
672
|
+
readonly 'wake-refused': import("xstate").TypeSchema<void>;
|
|
673
|
+
readonly settled: import("xstate").TypeSchema<{
|
|
674
|
+
state: 'succeeded' | 'failed';
|
|
675
|
+
sessionStopped: boolean;
|
|
676
|
+
}>;
|
|
677
|
+
readonly 'stray-stopped': import("xstate").TypeSchema<void>;
|
|
678
|
+
readonly 'session-forgotten': import("xstate").TypeSchema<void>;
|
|
679
|
+
}>, import("xstate").EventObject, import("xstate").InferEvents<{
|
|
680
|
+
readonly started: import("xstate").TypeSchema<{
|
|
681
|
+
via: 'start' | 'reconcile';
|
|
682
|
+
}>;
|
|
683
|
+
readonly 'spawn-unanswered': import("xstate").TypeSchema<void>;
|
|
684
|
+
readonly 'session-seen': import("xstate").TypeSchema<void>;
|
|
685
|
+
readonly 'closed-out': import("xstate").TypeSchema<void>;
|
|
686
|
+
readonly 'timed-out': import("xstate").TypeSchema<void>;
|
|
687
|
+
readonly 'item-closed': import("xstate").TypeSchema<void>;
|
|
688
|
+
readonly 'turn-ended': import("xstate").TypeSchema<void>;
|
|
689
|
+
readonly stalled: import("xstate").TypeSchema<void>;
|
|
690
|
+
readonly 'skill-missing': import("xstate").TypeSchema<void>;
|
|
691
|
+
readonly 'usage-limited': import("xstate").TypeSchema<void>;
|
|
692
|
+
readonly 'suspend-asked': import("xstate").TypeSchema<void>;
|
|
693
|
+
readonly 'suspend-refused': import("xstate").TypeSchema<void>;
|
|
694
|
+
readonly slept: import("xstate").TypeSchema<void>;
|
|
695
|
+
readonly 'wake-requested': import("xstate").TypeSchema<void>;
|
|
696
|
+
readonly woken: import("xstate").TypeSchema<{
|
|
697
|
+
overCap: boolean;
|
|
698
|
+
}>;
|
|
699
|
+
readonly resumed: import("xstate").TypeSchema<void>;
|
|
700
|
+
readonly 'wake-refused': import("xstate").TypeSchema<void>;
|
|
701
|
+
readonly settled: import("xstate").TypeSchema<{
|
|
702
|
+
state: 'succeeded' | 'failed';
|
|
703
|
+
sessionStopped: boolean;
|
|
704
|
+
}>;
|
|
705
|
+
readonly 'stray-stopped': import("xstate").TypeSchema<void>;
|
|
706
|
+
readonly 'session-forgotten': import("xstate").TypeSchema<void>;
|
|
707
|
+
}>>;
|
|
708
|
+
children: Record<string, import("xstate").AnyActor | undefined>;
|
|
709
|
+
actions: Record<string, (...args: any[]) => void | {
|
|
710
|
+
context?: any;
|
|
711
|
+
children?: any;
|
|
712
|
+
}>;
|
|
713
|
+
actors: Record<string, import("xstate").AnyActorLogic>;
|
|
714
|
+
guards: Record<string, Function>;
|
|
715
|
+
delays: Record<string, number | Function>;
|
|
716
|
+
system?: import("xstate").AnyActorSystem;
|
|
717
|
+
params: never;
|
|
718
|
+
}, "params"> & {
|
|
719
|
+
input: Record<string, unknown> | undefined;
|
|
720
|
+
stateNode: import("xstate").AnyStateNode;
|
|
721
|
+
}, enq: import("xstate").EnqueueObject<import("xstate").InferEvents<{
|
|
722
|
+
readonly started: import("xstate").TypeSchema<{
|
|
723
|
+
via: 'start' | 'reconcile';
|
|
724
|
+
}>;
|
|
725
|
+
readonly 'spawn-unanswered': import("xstate").TypeSchema<void>;
|
|
726
|
+
readonly 'session-seen': import("xstate").TypeSchema<void>;
|
|
727
|
+
readonly 'closed-out': import("xstate").TypeSchema<void>;
|
|
728
|
+
readonly 'timed-out': import("xstate").TypeSchema<void>;
|
|
729
|
+
readonly 'item-closed': import("xstate").TypeSchema<void>;
|
|
730
|
+
readonly 'turn-ended': import("xstate").TypeSchema<void>;
|
|
731
|
+
readonly stalled: import("xstate").TypeSchema<void>;
|
|
732
|
+
readonly 'skill-missing': import("xstate").TypeSchema<void>;
|
|
733
|
+
readonly 'usage-limited': import("xstate").TypeSchema<void>;
|
|
734
|
+
readonly 'suspend-asked': import("xstate").TypeSchema<void>;
|
|
735
|
+
readonly 'suspend-refused': import("xstate").TypeSchema<void>;
|
|
736
|
+
readonly slept: import("xstate").TypeSchema<void>;
|
|
737
|
+
readonly 'wake-requested': import("xstate").TypeSchema<void>;
|
|
738
|
+
readonly woken: import("xstate").TypeSchema<{
|
|
739
|
+
overCap: boolean;
|
|
740
|
+
}>;
|
|
741
|
+
readonly resumed: import("xstate").TypeSchema<void>;
|
|
742
|
+
readonly 'wake-refused': import("xstate").TypeSchema<void>;
|
|
743
|
+
readonly settled: import("xstate").TypeSchema<{
|
|
744
|
+
state: 'succeeded' | 'failed';
|
|
745
|
+
sessionStopped: boolean;
|
|
746
|
+
}>;
|
|
747
|
+
readonly 'stray-stopped': import("xstate").TypeSchema<void>;
|
|
748
|
+
readonly 'session-forgotten': import("xstate").TypeSchema<void>;
|
|
749
|
+
}>, {
|
|
750
|
+
effect: MoveEffect;
|
|
751
|
+
} & {
|
|
752
|
+
type: "effect";
|
|
753
|
+
}, import("xstate").SystemRegistry, Record<string, import("xstate").AnyActorLogic>, {
|
|
754
|
+
[x: string]: import("xstate").AnyActor;
|
|
755
|
+
}>) => void;
|
|
756
|
+
readonly initial: "starting";
|
|
757
|
+
readonly states: {
|
|
758
|
+
starting: {
|
|
759
|
+
on: Record<"closed-out" | "item-closed" | "resumed" | "session-forgotten" | "session-seen" | "settled" | "skill-missing" | "slept" | "spawn-unanswered" | "stalled" | "started" | "stray-stopped" | "suspend-asked" | "suspend-refused" | "timed-out" | "turn-ended" | "usage-limited" | "wake-refused" | "wake-requested" | "woken", MoveHandler>;
|
|
760
|
+
};
|
|
761
|
+
reconciling: {
|
|
762
|
+
on: Record<"closed-out" | "item-closed" | "resumed" | "session-forgotten" | "session-seen" | "settled" | "skill-missing" | "slept" | "spawn-unanswered" | "stalled" | "started" | "stray-stopped" | "suspend-asked" | "suspend-refused" | "timed-out" | "turn-ended" | "usage-limited" | "wake-refused" | "wake-requested" | "woken", MoveHandler>;
|
|
763
|
+
};
|
|
764
|
+
running: {
|
|
765
|
+
on: Record<"closed-out" | "item-closed" | "resumed" | "session-forgotten" | "session-seen" | "settled" | "skill-missing" | "slept" | "spawn-unanswered" | "stalled" | "started" | "stray-stopped" | "suspend-asked" | "suspend-refused" | "timed-out" | "turn-ended" | "usage-limited" | "wake-refused" | "wake-requested" | "woken", MoveHandler>;
|
|
766
|
+
};
|
|
767
|
+
sleeping: {
|
|
768
|
+
on: Record<"closed-out" | "item-closed" | "resumed" | "session-forgotten" | "session-seen" | "settled" | "skill-missing" | "slept" | "spawn-unanswered" | "stalled" | "started" | "stray-stopped" | "suspend-asked" | "suspend-refused" | "timed-out" | "turn-ended" | "usage-limited" | "wake-refused" | "wake-requested" | "woken", MoveHandler>;
|
|
769
|
+
};
|
|
770
|
+
waking: {
|
|
771
|
+
on: Record<"closed-out" | "item-closed" | "resumed" | "session-forgotten" | "session-seen" | "settled" | "skill-missing" | "slept" | "spawn-unanswered" | "stalled" | "started" | "stray-stopped" | "suspend-asked" | "suspend-refused" | "timed-out" | "turn-ended" | "usage-limited" | "wake-refused" | "wake-requested" | "woken", MoveHandler>;
|
|
772
|
+
};
|
|
773
|
+
closing: {
|
|
774
|
+
on: Record<"closed-out" | "item-closed" | "resumed" | "session-forgotten" | "session-seen" | "settled" | "skill-missing" | "slept" | "spawn-unanswered" | "stalled" | "started" | "stray-stopped" | "suspend-asked" | "suspend-refused" | "timed-out" | "turn-ended" | "usage-limited" | "wake-refused" | "wake-requested" | "woken", MoveHandler>;
|
|
775
|
+
};
|
|
776
|
+
succeeded: {
|
|
777
|
+
on: Record<"closed-out" | "item-closed" | "resumed" | "session-forgotten" | "session-seen" | "settled" | "skill-missing" | "slept" | "spawn-unanswered" | "stalled" | "started" | "stray-stopped" | "suspend-asked" | "suspend-refused" | "timed-out" | "turn-ended" | "usage-limited" | "wake-refused" | "wake-requested" | "woken", MoveHandler>;
|
|
778
|
+
};
|
|
779
|
+
failed: {
|
|
780
|
+
on: Record<"closed-out" | "item-closed" | "resumed" | "session-forgotten" | "session-seen" | "settled" | "skill-missing" | "slept" | "spawn-unanswered" | "stalled" | "started" | "stray-stopped" | "suspend-asked" | "suspend-refused" | "timed-out" | "turn-ended" | "usage-limited" | "wake-refused" | "wake-requested" | "woken", MoveHandler>;
|
|
781
|
+
};
|
|
782
|
+
};
|
|
783
|
+
};
|
|
784
|
+
} & {
|
|
785
|
+
readonly id: "";
|
|
786
|
+
readonly version: undefined;
|
|
787
|
+
};
|
|
788
|
+
interface MoveArgs {
|
|
789
|
+
readonly context: AttemptContext;
|
|
790
|
+
readonly event: AttemptMachineEvent;
|
|
791
|
+
}
|
|
792
|
+
interface EffectEvent {
|
|
793
|
+
type: 'effect';
|
|
794
|
+
effect: MoveEffect;
|
|
795
|
+
}
|
|
796
|
+
interface MoveEnqueue {
|
|
797
|
+
readonly emit: (event: EffectEvent) => void;
|
|
798
|
+
}
|
|
799
|
+
interface MoveTarget {
|
|
800
|
+
target?: AttemptState;
|
|
801
|
+
context?: Partial<AttemptContext>;
|
|
802
|
+
}
|
|
803
|
+
type MoveHandler = (args: MoveArgs, enq: MoveEnqueue) => MoveTarget | undefined;
|
|
804
|
+
export {};
|