@agentshouse/mdruntime 0.1.0-cb1f56e16291b → 0.1.0-cb3bb3b233fa1
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/README.md +21 -19
- package/dist/acceptance.d.ts +3 -0
- package/dist/acceptance.d.ts.map +1 -0
- package/dist/acceptance.js +299 -0
- package/dist/act-lanes.d.ts +30 -0
- package/dist/act-lanes.d.ts.map +1 -0
- package/dist/act-lanes.js +225 -0
- package/dist/actions.d.ts +26 -0
- package/dist/actions.d.ts.map +1 -0
- package/dist/actions.js +302 -0
- package/dist/adapter.d.ts +113 -81
- package/dist/adapter.d.ts.map +1 -1
- package/dist/attached-model.d.ts +3 -11
- package/dist/attached-model.d.ts.map +1 -1
- package/dist/attached-model.js +20 -60
- package/dist/authored.d.ts +88 -0
- package/dist/authored.d.ts.map +1 -0
- package/dist/authored.js +345 -0
- package/dist/bootstrap.d.ts +9 -5
- package/dist/bootstrap.d.ts.map +1 -1
- package/dist/bootstrap.js +204 -85
- package/dist/cell.d.ts +6 -0
- package/dist/cell.d.ts.map +1 -0
- package/dist/cell.js +9 -0
- package/dist/chain.d.ts +2 -1
- package/dist/chain.d.ts.map +1 -1
- package/dist/change-set.d.ts +4 -0
- package/dist/change-set.d.ts.map +1 -1
- package/dist/change-set.js +6 -0
- package/dist/change.d.ts +5 -0
- package/dist/change.d.ts.map +1 -1
- package/dist/change.js +7 -2
- package/dist/chat-types.d.ts +3 -0
- package/dist/chat-types.d.ts.map +1 -0
- package/dist/chat-types.js +11 -0
- package/dist/client.d.ts +30 -22
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +39 -20
- package/dist/collection.d.ts +26 -4
- package/dist/collection.d.ts.map +1 -1
- package/dist/collection.js +19 -2
- package/dist/column.d.ts +5 -0
- package/dist/column.d.ts.map +1 -0
- package/dist/column.js +9 -0
- package/dist/compile.d.ts +9 -7
- package/dist/compile.d.ts.map +1 -1
- package/dist/compile.js +252 -318
- package/dist/connection.d.ts +5 -141
- package/dist/connection.d.ts.map +1 -1
- package/dist/connection.js +111 -5282
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +1 -1
- package/dist/conversation-live.d.ts +150 -0
- package/dist/conversation-live.d.ts.map +1 -0
- package/dist/conversation-live.js +259 -0
- package/dist/conversation-row.d.ts +40 -0
- package/dist/conversation-row.d.ts.map +1 -0
- package/dist/conversation-row.js +66 -0
- package/dist/conversation.d.ts +62 -43
- package/dist/conversation.d.ts.map +1 -1
- package/dist/conversation.js +987 -902
- package/dist/declaration.d.ts +10 -0
- package/dist/declaration.d.ts.map +1 -0
- package/dist/declaration.js +24 -0
- package/dist/discovery.d.ts +10 -0
- package/dist/discovery.d.ts.map +1 -0
- package/dist/discovery.js +150 -0
- package/dist/durability.d.ts +19 -0
- package/dist/durability.d.ts.map +1 -1
- package/dist/durability.js +4 -0
- package/dist/entry.d.ts +2 -2
- package/dist/entry.d.ts.map +1 -1
- package/dist/entry.js +18 -9
- package/dist/expectation.d.ts +26 -13
- package/dist/expectation.d.ts.map +1 -1
- package/dist/expectation.js +72 -19
- package/dist/failure.d.ts +3 -0
- package/dist/failure.d.ts.map +1 -1
- package/dist/failure.js +6 -0
- package/dist/figures.d.ts +49 -0
- package/dist/figures.d.ts.map +1 -0
- package/dist/figures.js +199 -0
- package/dist/file.d.ts +1 -1
- package/dist/file.d.ts.map +1 -1
- package/dist/file.js +3 -2
- package/dist/holdings.d.ts +29 -0
- package/dist/holdings.d.ts.map +1 -0
- package/dist/holdings.js +95 -0
- package/dist/host.d.ts +20 -4
- package/dist/host.d.ts.map +1 -1
- package/dist/host.js +72 -28
- package/dist/identity.d.ts +0 -1
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +0 -3
- package/dist/index.d.ts +32 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -5
- package/dist/install.d.ts +60 -0
- package/dist/install.d.ts.map +1 -0
- package/dist/install.js +537 -0
- package/dist/lifecycle.d.ts +7 -0
- package/dist/lifecycle.d.ts.map +1 -0
- package/dist/lifecycle.js +282 -0
- package/dist/listing.d.ts +52 -0
- package/dist/listing.d.ts.map +1 -0
- package/dist/listing.js +152 -0
- package/dist/live.d.ts +8 -6
- package/dist/live.d.ts.map +1 -1
- package/dist/live.js +110 -31
- package/dist/loaded.d.ts +5 -0
- package/dist/loaded.d.ts.map +1 -0
- package/dist/loaded.js +40 -0
- package/dist/locks.d.ts +7 -0
- package/dist/locks.d.ts.map +1 -0
- package/dist/locks.js +32 -0
- package/dist/lost.d.ts +5 -0
- package/dist/lost.d.ts.map +1 -0
- package/dist/lost.js +49 -0
- package/dist/media.d.ts +6 -1
- package/dist/media.d.ts.map +1 -1
- package/dist/media.js +68 -17
- package/dist/memory.d.ts +11 -3
- package/dist/memory.d.ts.map +1 -1
- package/dist/memory.js +132 -33
- package/dist/messages.d.ts +33 -3
- package/dist/messages.d.ts.map +1 -1
- package/dist/messages.js +98 -27
- package/dist/model.d.ts +2 -10
- package/dist/model.d.ts.map +1 -1
- package/dist/model.js +0 -14
- package/dist/models.d.ts +10 -0
- package/dist/models.d.ts.map +1 -0
- package/dist/models.js +153 -0
- package/dist/observation.d.ts +27 -12
- package/dist/observation.d.ts.map +1 -1
- package/dist/observation.js +184 -85
- package/dist/opened.d.ts +1 -1
- package/dist/opened.d.ts.map +1 -1
- package/dist/opened.js +5 -5
- package/dist/opening.d.ts +4 -0
- package/dist/opening.d.ts.map +1 -0
- package/dist/opening.js +53 -0
- package/dist/outcome.d.ts +17 -2
- package/dist/outcome.d.ts.map +1 -1
- package/dist/outcome.js +35 -2
- package/dist/overlay.d.ts +7 -2
- package/dist/overlay.d.ts.map +1 -1
- package/dist/overlay.js +48 -24
- package/dist/page-metadata.d.ts +8 -0
- package/dist/page-metadata.d.ts.map +1 -0
- package/dist/page-metadata.js +19 -0
- package/dist/parts.d.ts +4 -0
- package/dist/parts.d.ts.map +1 -0
- package/dist/parts.js +13 -0
- package/dist/paths.d.ts +1 -0
- package/dist/paths.d.ts.map +1 -1
- package/dist/paths.js +22 -0
- package/dist/preparation.d.ts +41 -0
- package/dist/preparation.d.ts.map +1 -0
- package/dist/preparation.js +314 -0
- package/dist/presence.d.ts +58 -0
- package/dist/presence.d.ts.map +1 -0
- package/dist/presence.js +231 -0
- package/dist/queries.d.ts +16 -0
- package/dist/queries.d.ts.map +1 -0
- package/dist/queries.js +308 -0
- package/dist/query.d.ts +13 -213
- package/dist/query.d.ts.map +1 -1
- package/dist/query.js +3 -524
- package/dist/questions.d.ts +30 -0
- package/dist/questions.d.ts.map +1 -0
- package/dist/questions.js +116 -0
- package/dist/queue.d.ts +40 -0
- package/dist/queue.d.ts.map +1 -0
- package/dist/queue.js +480 -0
- package/dist/reach.d.ts +10 -10
- package/dist/reach.d.ts.map +1 -1
- package/dist/reach.js +235 -120
- package/dist/react.d.ts +17 -3
- package/dist/react.d.ts.map +1 -1
- package/dist/react.js +33 -1
- package/dist/read.d.ts +7 -0
- package/dist/read.d.ts.map +1 -0
- package/dist/read.js +17 -0
- package/dist/readiness.d.ts +9 -4
- package/dist/readiness.d.ts.map +1 -1
- package/dist/readiness.js +3 -5
- package/dist/reads.d.ts +39 -0
- package/dist/reads.d.ts.map +1 -0
- package/dist/reads.js +178 -0
- package/dist/recovery.d.ts +3 -1
- package/dist/recovery.d.ts.map +1 -1
- package/dist/recovery.js +38 -8
- package/dist/refresh.d.ts +1 -1
- package/dist/refresh.d.ts.map +1 -1
- package/dist/refresh.js +10 -22
- package/dist/refusal.d.ts +5 -0
- package/dist/refusal.d.ts.map +1 -0
- package/dist/refusal.js +55 -0
- package/dist/replica.d.ts +11 -16
- package/dist/replica.d.ts.map +1 -1
- package/dist/replica.js +66 -35
- package/dist/retried.d.ts +30 -0
- package/dist/retried.d.ts.map +1 -0
- package/dist/retried.js +72 -0
- package/dist/room-draft.d.ts +32 -9
- package/dist/room-draft.d.ts.map +1 -1
- package/dist/room-draft.js +273 -66
- package/dist/room-drafts.d.ts +24 -0
- package/dist/room-drafts.d.ts.map +1 -0
- package/dist/room-drafts.js +220 -0
- package/dist/room-list.d.ts +10 -0
- package/dist/room-list.d.ts.map +1 -0
- package/dist/room-list.js +45 -0
- package/dist/rows.d.ts +16 -23
- package/dist/rows.d.ts.map +1 -1
- package/dist/rows.js +49 -191
- package/dist/runtime.d.ts +34 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +1 -0
- package/dist/save.d.ts +42 -86
- package/dist/save.d.ts.map +1 -1
- package/dist/save.js +332 -228
- package/dist/saves.d.ts +34 -0
- package/dist/saves.d.ts.map +1 -0
- package/dist/saves.js +437 -0
- package/dist/search.d.ts.map +1 -1
- package/dist/search.js +1 -1
- package/dist/seed.d.ts +11 -2
- package/dist/seed.d.ts.map +1 -1
- package/dist/seed.js +71 -1
- package/dist/shared.d.ts +1 -6
- package/dist/shared.d.ts.map +1 -1
- package/dist/shared.js +13 -95
- package/dist/shown.d.ts +33 -0
- package/dist/shown.d.ts.map +1 -0
- package/dist/shown.js +309 -0
- package/dist/socket/admission.d.ts +7 -0
- package/dist/socket/admission.d.ts.map +1 -0
- package/dist/socket/admission.js +39 -0
- package/dist/socket/answers.d.ts +6 -0
- package/dist/socket/answers.d.ts.map +1 -0
- package/dist/socket/answers.js +20 -0
- package/dist/socket/lanes.d.ts +28 -0
- package/dist/socket/lanes.d.ts.map +1 -0
- package/dist/socket/lanes.js +103 -0
- package/dist/socket/reads.d.ts +10 -0
- package/dist/socket/reads.d.ts.map +1 -0
- package/dist/socket/reads.js +31 -0
- package/dist/socket/session.d.ts +38 -0
- package/dist/socket/session.d.ts.map +1 -0
- package/dist/socket/session.js +23 -0
- package/dist/socket.d.ts +67 -0
- package/dist/socket.d.ts.map +1 -0
- package/dist/socket.js +164 -0
- package/dist/source.d.ts +59 -0
- package/dist/source.d.ts.map +1 -0
- package/dist/source.js +93 -0
- package/dist/status.d.ts +0 -2
- package/dist/status.d.ts.map +1 -1
- package/dist/status.js +0 -6
- package/dist/store/installs.d.ts +30 -0
- package/dist/store/installs.d.ts.map +1 -0
- package/dist/store/installs.js +40 -0
- package/dist/store/readiness.d.ts +11 -0
- package/dist/store/readiness.d.ts.map +1 -0
- package/dist/store/readiness.js +68 -0
- package/dist/store/records.d.ts +223 -0
- package/dist/store/records.d.ts.map +1 -0
- package/dist/store/records.js +465 -0
- package/dist/store/room-held.d.ts +8 -0
- package/dist/store/room-held.d.ts.map +1 -0
- package/dist/store/room-held.js +17 -0
- package/dist/store/rooms-shown.d.ts +8 -0
- package/dist/store/rooms-shown.d.ts.map +1 -0
- package/dist/store/rooms-shown.js +13 -0
- package/dist/store/space.d.ts +11 -0
- package/dist/store/space.d.ts.map +1 -0
- package/dist/store/space.js +41 -0
- package/dist/store/watchers.d.ts +17 -0
- package/dist/store/watchers.d.ts.map +1 -0
- package/dist/store/watchers.js +56 -0
- package/dist/store/writes.d.ts +24 -0
- package/dist/store/writes.d.ts.map +1 -0
- package/dist/store/writes.js +125 -0
- package/dist/store.d.ts +115 -152
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +171 -395
- package/dist/stored.d.ts +72 -67
- package/dist/stored.d.ts.map +1 -1
- package/dist/stored.js +317 -166
- package/dist/surface.d.ts +90 -0
- package/dist/surface.d.ts.map +1 -0
- package/dist/surface.js +225 -0
- package/dist/sync.d.ts +19 -0
- package/dist/sync.d.ts.map +1 -0
- package/dist/sync.js +536 -0
- package/dist/tables.d.ts +112 -89
- package/dist/tables.d.ts.map +1 -1
- package/dist/tables.js +197 -283
- package/dist/tallies.d.ts +18 -0
- package/dist/tallies.d.ts.map +1 -0
- package/dist/tallies.js +128 -0
- package/dist/validation.d.ts.map +1 -1
- package/dist/validation.js +9 -12
- package/dist/windows.d.ts +1 -12
- package/dist/windows.d.ts.map +1 -1
- package/dist/windows.js +2 -75
- package/dist/wire.d.ts +68 -7
- package/dist/wire.d.ts.map +1 -1
- package/dist/wire.js +23 -4
- package/package.json +3 -2
- package/dist/attempt.d.ts +0 -16
- package/dist/attempt.d.ts.map +0 -1
- package/dist/attempt.js +0 -70
- package/dist/fence.d.ts +0 -6
- package/dist/fence.d.ts.map +0 -1
- package/dist/fence.js +0 -10
- package/dist/job.d.ts +0 -14
- package/dist/job.d.ts.map +0 -1
- package/dist/job.js +0 -28
- package/dist/log.d.ts +0 -5
- package/dist/log.d.ts.map +0 -1
- package/dist/log.js +0 -14
- package/dist/phrase.d.ts +0 -3
- package/dist/phrase.d.ts.map +0 -1
- package/dist/phrase.js +0 -8
package/dist/replica.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type TypedPath } from '@agentshouse/mdmodel';
|
|
2
|
+
import type { BootstrapInventory, SavedFacts, MutationResult, RoomDeclaration, TypedSelection } from './adapter.js';
|
|
2
3
|
import { type ChangeBatch, type Precondition } from './change.js';
|
|
3
4
|
import { type Collection, type Composition } from './collection.js';
|
|
4
5
|
import { type ModelState } from './model.js';
|
|
@@ -6,13 +7,8 @@ import { type Layer } from './overlay.js';
|
|
|
6
7
|
import type { HeldEntry, OverlayEntry, StoredEntry } from './tables.js';
|
|
7
8
|
export type ReplicaRecord = {
|
|
8
9
|
readonly locator: string;
|
|
9
|
-
readonly
|
|
10
|
-
readonly handle: string;
|
|
11
|
-
readonly operations: OperationScopes;
|
|
12
|
-
readonly replica: ReplicaAdmission;
|
|
10
|
+
readonly declaration: RoomDeclaration;
|
|
13
11
|
readonly model: ModelState;
|
|
14
|
-
readonly typedSelection: TypedSelection | null;
|
|
15
|
-
readonly providerOwnedPaths: readonly string[];
|
|
16
12
|
readonly roomVersion: string;
|
|
17
13
|
readonly transfer: string;
|
|
18
14
|
readonly inventory: BootstrapInventory;
|
|
@@ -22,23 +18,22 @@ export type HeldReplica = {
|
|
|
22
18
|
readonly record: ReplicaRecord;
|
|
23
19
|
readonly queue: readonly ChangeBatch[];
|
|
24
20
|
readonly overlaid: ReadonlySet<string>;
|
|
25
|
-
readonly count: number;
|
|
26
|
-
readonly confirmed: number;
|
|
27
|
-
readonly indexed: boolean;
|
|
28
21
|
};
|
|
29
22
|
export type VisibleLayer = Layer & {
|
|
30
23
|
readonly collection: Collection;
|
|
31
24
|
};
|
|
32
25
|
export type Slice = Layer & {
|
|
33
26
|
readonly written: Readonly<Record<string, string>>;
|
|
27
|
+
readonly facts: Readonly<Record<string, SavedFacts>>;
|
|
34
28
|
readonly held: ReadonlySet<string>;
|
|
35
29
|
};
|
|
36
|
-
export declare function compositionOf(
|
|
30
|
+
export declare function compositionOf(model: ModelState, typedSelection: TypedSelection | null, builtIn: ModelState, typedPaths: readonly TypedPath[]): Composition;
|
|
37
31
|
export declare function storedRecord(record: ReplicaRecord): string;
|
|
38
32
|
export declare function slicing(entries: readonly HeldEntry[], paths: Iterable<string>): Generator<number, Slice, void>;
|
|
33
|
+
export type LayerEntry = Omit<StoredEntry, 'facts'>;
|
|
39
34
|
export declare function entryAt(layer: Layer & {
|
|
40
35
|
readonly written?: Readonly<Record<string, string>>;
|
|
41
|
-
}, path: string):
|
|
36
|
+
}, path: string): LayerEntry | null;
|
|
42
37
|
export declare function slicingWith(slice: Slice, set: readonly StoredEntry[], removed: readonly string[]): Generator<number, Slice, void>;
|
|
43
38
|
export declare function touchedBy(queue: readonly ChangeBatch[]): Set<string>;
|
|
44
39
|
export declare function movedBy(queue: readonly ChangeBatch[], locator: string): Set<string>;
|
|
@@ -47,9 +42,9 @@ export type Replayed = {
|
|
|
47
42
|
readonly touched: ReadonlySet<string>;
|
|
48
43
|
};
|
|
49
44
|
export declare function replaying(confirmed: Slice, queue: readonly ChangeBatch[], locator: string, composition: Composition): Generator<number, Replayed, void>;
|
|
50
|
-
export declare function overlayOf(visible:
|
|
51
|
-
export declare function holds(layer: Layer, preconditions: readonly Precondition[]): boolean;
|
|
52
|
-
export declare function landed(batch: ChangeBatch, confirmed: Layer, current?: Readonly<Record<string, string>>): boolean;
|
|
45
|
+
export declare function overlayOf(visible: VisibleLayer, touched: Iterable<string>): Generator<number, OverlayEntry[], void>;
|
|
46
|
+
export declare function holds(layer: Layer, preconditions: readonly Precondition[], composition: Composition): boolean;
|
|
47
|
+
export declare function landed(batch: ChangeBatch, confirmed: Layer, composition: Composition, current?: Readonly<Record<string, string>>): boolean;
|
|
53
48
|
export type Standing = {
|
|
54
49
|
readonly withdrawn: readonly ChangeBatch[];
|
|
55
50
|
readonly kept: readonly ChangeBatch[];
|
|
@@ -63,6 +58,6 @@ export type Returned = {
|
|
|
63
58
|
readonly removed: readonly string[];
|
|
64
59
|
};
|
|
65
60
|
export declare function returnedPaths(submitted: ChangeBatch, accepted: Accepted): Set<string>;
|
|
66
|
-
export declare function returning(confirmed: Slice, submitted: ChangeBatch, accepted: Accepted, writtenAt: string): Generator<number, Returned, void>;
|
|
61
|
+
export declare function returning(confirmed: Slice, submitted: ChangeBatch, accepted: Accepted, writtenAt: string, composition: Composition): Generator<number, Returned, void>;
|
|
67
62
|
export {};
|
|
68
63
|
//# sourceMappingURL=replica.d.ts.map
|
package/dist/replica.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"replica.d.ts","sourceRoot":"","sources":["../src/replica.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"replica.d.ts","sourceRoot":"","sources":["../src/replica.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoC,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACxF,OAAO,KAAK,EACV,kBAAkB,EAClB,UAAU,EAEV,cAAc,EACd,eAAe,EACf,cAAc,EACf,MAAM,cAAc,CAAC;AACtB,OAAO,EAKL,KAAK,WAAW,EAChB,KAAK,YAAY,EAClB,MAAM,aAAa,CAAC;AACrB,OAAO,EAA+B,KAAK,UAAU,EAAE,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACjG,OAAO,EAAe,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,EAAiD,KAAK,KAAK,EAAE,MAAM,cAAc,CAAC;AAI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BAAiB,SAAS,CACxB,SAAS,EAAE,KAAK,EAChB,SAAS,EAAE,WAAW,EACtB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,WAAW,GACvB,SAAS,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,CAAC,CA6FnC"}
|
package/dist/replica.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { equalValue, parse } from '@agentshouse/mdmodel';
|
|
2
|
-
import { immutable, landing } from './change.js';
|
|
3
|
-
import { collectionOf } from './collection.js';
|
|
2
|
+
import { immutable, isPart, landing, } from './change.js';
|
|
3
|
+
import { collectionOf, definitionsAt } from './collection.js';
|
|
4
4
|
import { storedModel } from './model.js';
|
|
5
5
|
import { acceptedBinaries, overlaying } from './overlay.js';
|
|
6
|
+
import { writtenFacts } from './rows.js';
|
|
6
7
|
import { effectiveIn, rewriting } from './save.js';
|
|
8
|
+
import { guarding } from './shared.js';
|
|
7
9
|
import { ROW_WEIGHT } from './turn.js';
|
|
8
|
-
export function compositionOf(
|
|
10
|
+
export function compositionOf(model, typedSelection, builtIn, typedPaths) {
|
|
9
11
|
return {
|
|
10
|
-
model
|
|
11
|
-
selection:
|
|
12
|
-
|
|
13
|
-
: { roots: record.typedSelection.roots, model: builtIn },
|
|
12
|
+
model,
|
|
13
|
+
selection: typedSelection === null ? null : { roots: typedSelection.roots, model: builtIn },
|
|
14
|
+
typedPaths,
|
|
14
15
|
};
|
|
15
16
|
}
|
|
16
17
|
export function storedRecord(record) {
|
|
@@ -35,7 +36,7 @@ function strict(values, held) {
|
|
|
35
36
|
throw new UnreadPath(property);
|
|
36
37
|
}
|
|
37
38
|
};
|
|
38
|
-
return
|
|
39
|
+
return guarding(values, {
|
|
39
40
|
get(target, property, receiver) {
|
|
40
41
|
guard(property);
|
|
41
42
|
return Reflect.get(target, property, receiver);
|
|
@@ -58,9 +59,13 @@ export function* slicing(entries, paths) {
|
|
|
58
59
|
const binaries = {};
|
|
59
60
|
const revisions = {};
|
|
60
61
|
const fileIds = {};
|
|
62
|
+
const created = {};
|
|
61
63
|
const changes = {};
|
|
62
64
|
const written = {};
|
|
65
|
+
const facts = {};
|
|
63
66
|
for (const entry of entries) {
|
|
67
|
+
if (entry.facts !== null)
|
|
68
|
+
facts[entry.path] = entry.facts;
|
|
64
69
|
if (entry.binary !== null)
|
|
65
70
|
binaries[entry.path] = entry.binary;
|
|
66
71
|
else if (entry.content !== null)
|
|
@@ -69,6 +74,8 @@ export function* slicing(entries, paths) {
|
|
|
69
74
|
revisions[entry.path] = entry.revision;
|
|
70
75
|
if (entry.fileId !== null)
|
|
71
76
|
fileIds[entry.path] = entry.fileId;
|
|
77
|
+
if (entry.created !== null)
|
|
78
|
+
created[entry.path] = entry.created;
|
|
72
79
|
if (entry.change !== null)
|
|
73
80
|
changes[entry.path] = entry.change;
|
|
74
81
|
if (entry.written !== null)
|
|
@@ -80,8 +87,10 @@ export function* slicing(entries, paths) {
|
|
|
80
87
|
binaries: strict(binaries, held),
|
|
81
88
|
revisions: strict(revisions, held),
|
|
82
89
|
fileIds: strict(fileIds, held),
|
|
90
|
+
created: strict(created, held),
|
|
83
91
|
changes: strict(changes, held),
|
|
84
92
|
written: strict(written, held),
|
|
93
|
+
facts: strict(facts, held),
|
|
85
94
|
held,
|
|
86
95
|
};
|
|
87
96
|
}
|
|
@@ -93,10 +102,10 @@ export function entryAt(layer, path) {
|
|
|
93
102
|
return {
|
|
94
103
|
path,
|
|
95
104
|
content: content ?? null,
|
|
96
|
-
outline: null,
|
|
97
105
|
binary: binary ?? null,
|
|
98
106
|
revision: layer.revisions[path] ?? null,
|
|
99
107
|
fileId: layer.fileIds[path] ?? null,
|
|
108
|
+
created: layer.created[path] ?? null,
|
|
100
109
|
change: layer.changes[path] ?? null,
|
|
101
110
|
written: layer.written?.[path] ?? null,
|
|
102
111
|
};
|
|
@@ -105,8 +114,9 @@ export function* slicingWith(slice, set, removed) {
|
|
|
105
114
|
const entries = new Map();
|
|
106
115
|
for (const path of slice.held) {
|
|
107
116
|
const entry = entryAt(slice, path);
|
|
108
|
-
if (entry !== null)
|
|
109
|
-
entries.set(path, { ...entry, type: null });
|
|
117
|
+
if (entry !== null) {
|
|
118
|
+
entries.set(path, { ...entry, type: null, facts: slice.facts[path] ?? null });
|
|
119
|
+
}
|
|
110
120
|
yield ROW_WEIGHT;
|
|
111
121
|
}
|
|
112
122
|
for (const path of removed)
|
|
@@ -159,7 +169,7 @@ export function* replaying(confirmed, queue, locator, composition) {
|
|
|
159
169
|
for (const change of effective.changes)
|
|
160
170
|
for (const path of changePaths(change))
|
|
161
171
|
touched.add(path);
|
|
162
|
-
layer = yield* overlaying(layer, [effective]);
|
|
172
|
+
layer = yield* overlaying(layer, [effective], composition);
|
|
163
173
|
yield ROW_WEIGHT;
|
|
164
174
|
}
|
|
165
175
|
return {
|
|
@@ -170,33 +180,40 @@ export function* replaying(confirmed, queue, locator, composition) {
|
|
|
170
180
|
export function* overlayOf(visible, touched) {
|
|
171
181
|
const rows = [];
|
|
172
182
|
for (const path of touched) {
|
|
173
|
-
yield ROW_WEIGHT;
|
|
174
183
|
const entry = entryAt(visible, path);
|
|
184
|
+
yield ROW_WEIGHT + (entry?.content?.length ?? 0);
|
|
185
|
+
const text = entry?.binary === null ? entry.content : null;
|
|
175
186
|
rows.push(entry === null
|
|
176
187
|
? {
|
|
177
188
|
path,
|
|
178
189
|
present: false,
|
|
179
190
|
content: null,
|
|
180
|
-
outline: null,
|
|
181
191
|
binary: null,
|
|
182
192
|
revision: null,
|
|
183
193
|
fileId: null,
|
|
194
|
+
created: null,
|
|
184
195
|
change: null,
|
|
185
196
|
written: null,
|
|
197
|
+
facts: null,
|
|
186
198
|
}
|
|
187
|
-
: {
|
|
199
|
+
: {
|
|
200
|
+
...entry,
|
|
201
|
+
written: null,
|
|
202
|
+
present: true,
|
|
203
|
+
facts: text === null ? null : writtenFacts(path, text, visible.collection.composition),
|
|
204
|
+
});
|
|
188
205
|
}
|
|
189
206
|
return rows;
|
|
190
207
|
}
|
|
191
208
|
function present(layer, path) {
|
|
192
209
|
return layer.documents[path] !== undefined || layer.binaries[path] !== undefined;
|
|
193
210
|
}
|
|
194
|
-
export function holds(layer, preconditions) {
|
|
211
|
+
export function holds(layer, preconditions, composition) {
|
|
195
212
|
const parsed = new Map();
|
|
196
213
|
const documentAt = (path) => {
|
|
197
214
|
if (!parsed.has(path)) {
|
|
198
215
|
const text = layer.documents[path];
|
|
199
|
-
const opened = text === undefined ? null : parse(text, path);
|
|
216
|
+
const opened = text === undefined ? null : parse(text, path, definitionsAt(composition, path));
|
|
200
217
|
parsed.set(path, opened?.ok === true ? opened.document : null);
|
|
201
218
|
}
|
|
202
219
|
return parsed.get(path) ?? null;
|
|
@@ -230,7 +247,7 @@ export function holds(layer, preconditions) {
|
|
|
230
247
|
}
|
|
231
248
|
function effects(change) {
|
|
232
249
|
const path = change.path;
|
|
233
|
-
if (change
|
|
250
|
+
if (isPart(change)) {
|
|
234
251
|
return [change];
|
|
235
252
|
}
|
|
236
253
|
if (change.kind === 'create' && !('content' in change)) {
|
|
@@ -256,11 +273,11 @@ function effects(change) {
|
|
|
256
273
|
{ kind: 'present', path: change.to },
|
|
257
274
|
];
|
|
258
275
|
}
|
|
259
|
-
if (change.kind === '
|
|
276
|
+
if (change.kind === 'arrival')
|
|
260
277
|
return [{ kind: 'present', path }];
|
|
261
278
|
return [{ kind: 'absent', path }];
|
|
262
279
|
}
|
|
263
|
-
export function landed(batch, confirmed, current = {}) {
|
|
280
|
+
export function landed(batch, confirmed, composition, current = {}) {
|
|
264
281
|
const documents = new Proxy(confirmed.documents, {
|
|
265
282
|
get(target, property, receiver) {
|
|
266
283
|
if (typeof property === 'string' && Object.hasOwn(current, property))
|
|
@@ -280,9 +297,9 @@ export function landed(batch, confirmed, current = {}) {
|
|
|
280
297
|
}
|
|
281
298
|
return effects(change).every((effect) => {
|
|
282
299
|
if (effect.kind === 'absent')
|
|
283
|
-
return holds(layer, [effect]);
|
|
300
|
+
return holds(layer, [effect], composition);
|
|
284
301
|
const at = landing(batch.changes, index, effect.path);
|
|
285
|
-
return at === null || holds(layer, [{ ...effect, path: at }]);
|
|
302
|
+
return at === null || holds(layer, [{ ...effect, path: at }], composition);
|
|
286
303
|
});
|
|
287
304
|
});
|
|
288
305
|
}
|
|
@@ -307,7 +324,7 @@ export function* standing(confirmed, queue, withdrawable, local, locator, compos
|
|
|
307
324
|
const withdrawn = [];
|
|
308
325
|
const kept = [];
|
|
309
326
|
for (const batch of queue) {
|
|
310
|
-
if (withdrawable(batch) && !holds(layer, batch.preconditions)) {
|
|
327
|
+
if (withdrawable(batch) && !holds(layer, batch.preconditions, composition)) {
|
|
311
328
|
withdrawn.push(batch);
|
|
312
329
|
continue;
|
|
313
330
|
}
|
|
@@ -318,7 +335,7 @@ export function* standing(confirmed, queue, withdrawable, local, locator, compos
|
|
|
318
335
|
})
|
|
319
336
|
: batch;
|
|
320
337
|
let unapplied = false;
|
|
321
|
-
const next = yield* overlaying(layer, [effective], () => {
|
|
338
|
+
const next = yield* overlaying(layer, [effective], composition, () => {
|
|
322
339
|
unapplied = true;
|
|
323
340
|
});
|
|
324
341
|
if (local && unapplied) {
|
|
@@ -349,17 +366,20 @@ export function returnedPaths(submitted, accepted) {
|
|
|
349
366
|
}
|
|
350
367
|
return paths;
|
|
351
368
|
}
|
|
352
|
-
export function* returning(confirmed, submitted, accepted, writtenAt) {
|
|
369
|
+
export function* returning(confirmed, submitted, accepted, writtenAt, composition) {
|
|
353
370
|
const documents = new Map();
|
|
354
371
|
const binaries = new Map();
|
|
355
372
|
const revisions = new Map();
|
|
356
373
|
const fileIds = new Map();
|
|
374
|
+
const created = new Map();
|
|
357
375
|
const changes = new Map();
|
|
358
376
|
const written = new Map();
|
|
377
|
+
const facts = new Map();
|
|
359
378
|
const read = (changed, held, path) => (changed.has(path) ? changed.get(path) : held[path]);
|
|
360
379
|
for (const [path, content] of Object.entries(accepted.documents)) {
|
|
361
|
-
yield ROW_WEIGHT;
|
|
380
|
+
yield ROW_WEIGHT + content.length;
|
|
362
381
|
documents.set(path, content);
|
|
382
|
+
facts.set(path, writtenFacts(path, content, composition));
|
|
363
383
|
fileIds.set(path, undefined);
|
|
364
384
|
written.set(path, writtenAt);
|
|
365
385
|
}
|
|
@@ -382,49 +402,60 @@ export function* returning(confirmed, submitted, accepted, writtenAt) {
|
|
|
382
402
|
written.set(path, undefined);
|
|
383
403
|
}
|
|
384
404
|
for (const change of submitted.changes) {
|
|
385
|
-
if (change.kind === 'arrival'
|
|
386
|
-
if (accepted.revisions[change.path]
|
|
405
|
+
if (change.kind === 'arrival') {
|
|
406
|
+
if (accepted.revisions[change.path] === undefined)
|
|
407
|
+
continue;
|
|
408
|
+
created.set(change.path, change.created);
|
|
409
|
+
if ('binary' in change)
|
|
387
410
|
binaries.set(change.path, { state: 'accepted', ...change.binary });
|
|
388
|
-
}
|
|
389
411
|
continue;
|
|
390
412
|
}
|
|
391
|
-
if (change.kind !== 'move')
|
|
413
|
+
if (change.kind !== 'move' || accepted.revisions[change.to] === undefined)
|
|
392
414
|
continue;
|
|
415
|
+
created.set(change.to, read(created, confirmed.created, change.path));
|
|
416
|
+
created.set(change.path, undefined);
|
|
393
417
|
const moved = read(binaries, confirmed.binaries, change.path);
|
|
394
|
-
if (moved === undefined
|
|
418
|
+
if (moved === undefined)
|
|
395
419
|
continue;
|
|
396
420
|
binaries.set(change.to, moved);
|
|
397
421
|
binaries.set(change.path, undefined);
|
|
398
422
|
}
|
|
399
423
|
for (const [path, binary] of acceptedBinaries(accepted.binaryFiles ?? {}))
|
|
400
424
|
binaries.set(path, binary);
|
|
401
|
-
for (const path of accepted.removals)
|
|
425
|
+
for (const path of accepted.removals) {
|
|
402
426
|
binaries.set(path, undefined);
|
|
427
|
+
created.set(path, undefined);
|
|
428
|
+
}
|
|
403
429
|
const paths = new Set([
|
|
404
430
|
...documents.keys(),
|
|
405
431
|
...binaries.keys(),
|
|
406
432
|
...revisions.keys(),
|
|
407
433
|
...fileIds.keys(),
|
|
434
|
+
...created.keys(),
|
|
408
435
|
...changes.keys(),
|
|
409
436
|
...written.keys(),
|
|
410
437
|
]);
|
|
411
438
|
const set = [];
|
|
412
439
|
const removed = [];
|
|
413
440
|
for (const path of paths) {
|
|
414
|
-
yield ROW_WEIGHT;
|
|
415
441
|
const content = read(documents, confirmed.documents, path);
|
|
416
442
|
const binary = read(binaries, confirmed.binaries, path);
|
|
443
|
+
yield ROW_WEIGHT;
|
|
417
444
|
if (content === undefined && binary === undefined) {
|
|
418
445
|
removed.push(path);
|
|
419
446
|
continue;
|
|
420
447
|
}
|
|
448
|
+
const text = binary === undefined ? (content ?? null) : null;
|
|
449
|
+
const fresh = confirmed.documents[path] === undefined && confirmed.binaries[path] === undefined;
|
|
421
450
|
set.push({
|
|
422
451
|
path,
|
|
423
|
-
content:
|
|
424
|
-
|
|
452
|
+
content: text,
|
|
453
|
+
facts: text === null ? null : (read(facts, confirmed.facts, path) ?? null),
|
|
425
454
|
binary: binary ?? null,
|
|
426
455
|
revision: read(revisions, confirmed.revisions, path) ?? null,
|
|
427
456
|
fileId: read(fileIds, confirmed.fileIds, path) ?? null,
|
|
457
|
+
created: read(created, confirmed.created, path) ??
|
|
458
|
+
(fresh ? (read(changes, confirmed.changes, path)?.time ?? null) : null),
|
|
428
459
|
change: read(changes, confirmed.changes, path) ?? null,
|
|
429
460
|
written: read(written, confirmed.written, path) ?? null,
|
|
430
461
|
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type RuntimeShell } from './durability.js';
|
|
2
|
+
export declare const STEPS: readonly ['database', 'sign_in', 'connection', 'code', 'download', 'conversations', 'sending', 'reading'];
|
|
3
|
+
export type Step = (typeof STEPS)[number];
|
|
4
|
+
export type RetriedFailure = {
|
|
5
|
+
readonly step: Step;
|
|
6
|
+
readonly answered: false;
|
|
7
|
+
} | {
|
|
8
|
+
readonly step: Step;
|
|
9
|
+
readonly answered: true;
|
|
10
|
+
readonly error: unknown;
|
|
11
|
+
};
|
|
12
|
+
export type Uncertain = {
|
|
13
|
+
readonly failure?: unknown;
|
|
14
|
+
};
|
|
15
|
+
export type Attempt = {
|
|
16
|
+
readonly step: Step;
|
|
17
|
+
readonly instance: string;
|
|
18
|
+
};
|
|
19
|
+
export declare class Unanswered extends Error {
|
|
20
|
+
}
|
|
21
|
+
export declare function uncertainError(uncertainty: Uncertain): unknown;
|
|
22
|
+
export type Retries = {
|
|
23
|
+
failed(step: Step, instance: string, error: unknown): void;
|
|
24
|
+
unanswered(step: Step, instance: string): void;
|
|
25
|
+
uncertain(step: Step, instance: string, uncertainty: Uncertain): void;
|
|
26
|
+
succeeded(step: Step, instance: string): void;
|
|
27
|
+
};
|
|
28
|
+
export declare function createRetries(shell: Pick<RuntimeShell, 'retried' | 'succeeded'>): Retries;
|
|
29
|
+
export declare function retrying<T>(retries: Retries, step: Step, instance: string, ask: () => Promise<T>): () => Promise<T>;
|
|
30
|
+
//# sourceMappingURL=retried.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retried.d.ts","sourceRoot":"","sources":["../src/retried.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAErE,eAAO,MAAM,KAAK,YAChB,UAAU,EACV,SAAS,EACT,YAAY,EACZ,MAAM,EACN,UAAU,EACV,eAAe,EACf,SAAS,EACT,SAAS,CACD,CAAC;AAEX,MAAM,MAAM,IAAI,GAAG,CAAC,OAAO,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1C,MAAM,MAAM,cAAc,GACtB;IAAE,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,KAAK,CAAA;CAAE,GACjD;IAAE,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,KAAK,EA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6
|
+
'code',
|
|
7
|
+
'download',
|
|
8
|
+
'conversations',
|
|
9
|
+
'sending',
|
|
10
|
+
'reading',
|
|
11
|
+
];
|
|
12
|
+
export class Unanswered extends Error {
|
|
13
|
+
}
|
|
14
|
+
export function uncertainError(uncertainty) {
|
|
15
|
+
return 'failure' in uncertainty ? uncertainty.failure : new Unanswered();
|
|
16
|
+
}
|
|
17
|
+
export function createRetries(shell) {
|
|
18
|
+
const failing = new Map();
|
|
19
|
+
const handedErrors = new WeakSet();
|
|
20
|
+
function failingIn(step, instance) {
|
|
21
|
+
const instances = failing.get(step) ?? new Set();
|
|
22
|
+
instances.add(instance);
|
|
23
|
+
failing.set(step, instances);
|
|
24
|
+
}
|
|
25
|
+
function handed(failure, instance) {
|
|
26
|
+
failingIn(failure.step, instance);
|
|
27
|
+
shell.retried?.(failure);
|
|
28
|
+
}
|
|
29
|
+
const retries = {
|
|
30
|
+
failed(step, instance, error) {
|
|
31
|
+
if (refusedForSpace(error))
|
|
32
|
+
return;
|
|
33
|
+
if (typeof error === 'object' && error !== null) {
|
|
34
|
+
if (handedErrors.has(error)) {
|
|
35
|
+
failingIn(step, instance);
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
handedErrors.add(error);
|
|
39
|
+
}
|
|
40
|
+
if (error instanceof Unanswered)
|
|
41
|
+
retries.unanswered(step, instance);
|
|
42
|
+
else
|
|
43
|
+
handed({ step, answered: true, error }, instance);
|
|
44
|
+
},
|
|
45
|
+
unanswered(step, instance) {
|
|
46
|
+
handed({ step, answered: false }, instance);
|
|
47
|
+
},
|
|
48
|
+
uncertain(step, instance, uncertainty) {
|
|
49
|
+
if ('failure' in uncertainty)
|
|
50
|
+
retries.failed(step, instance, uncertainty.failure);
|
|
51
|
+
else
|
|
52
|
+
retries.unanswered(step, instance);
|
|
53
|
+
},
|
|
54
|
+
succeeded(step, instance) {
|
|
55
|
+
const instances = failing.get(step);
|
|
56
|
+
if (instances === undefined || !instances.delete(instance) || instances.size > 0)
|
|
57
|
+
return;
|
|
58
|
+
failing.delete(step);
|
|
59
|
+
shell.succeeded?.(step);
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
return retries;
|
|
63
|
+
}
|
|
64
|
+
export function retrying(retries, step, instance, ask) {
|
|
65
|
+
return () => ask().then((answer) => {
|
|
66
|
+
retries.succeeded(step, instance);
|
|
67
|
+
return answer;
|
|
68
|
+
}, (error) => {
|
|
69
|
+
retries.failed(step, instance, error);
|
|
70
|
+
throw error;
|
|
71
|
+
});
|
|
72
|
+
}
|
package/dist/room-draft.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ApplyResult, type Definition, type DefinitionOf, type Document } from '@agentshouse/mdmodel';
|
|
2
|
+
import type { HeadChange, ProviderRefusal } from './adapter.js';
|
|
2
3
|
import type { Open } from './open.js';
|
|
3
|
-
import type { Change, Precondition } from './change.js';
|
|
4
|
+
import type { Change, PartChange, Precondition } from './change.js';
|
|
4
5
|
import type { VisibleLayer } from './replica.js';
|
|
5
6
|
export type FieldValue = {
|
|
6
7
|
readonly value: unknown;
|
|
@@ -90,15 +91,30 @@ type ChangedUnderneath = {
|
|
|
90
91
|
readonly file?: string | null;
|
|
91
92
|
};
|
|
92
93
|
export type ReturnReason = ProviderRefusal & {
|
|
93
|
-
readonly kind: Open<'conflicted' | 'rejected' | '
|
|
94
|
+
readonly kind: Open<'conflicted' | 'rejected' | 'withdrawn'>;
|
|
95
|
+
};
|
|
96
|
+
export declare function returnedBy(): ReturnReason;
|
|
97
|
+
type Mark = {
|
|
98
|
+
readonly change: HeadChange | null;
|
|
99
|
+
};
|
|
100
|
+
export type Marks = {
|
|
101
|
+
readonly fields?: Readonly<Record<string, Mark & {
|
|
102
|
+
readonly current: FieldValue;
|
|
103
|
+
}>>;
|
|
104
|
+
readonly sections?: Readonly<Record<string, Mark>>;
|
|
105
|
+
readonly preamble?: Mark;
|
|
106
|
+
readonly markdown?: Mark;
|
|
107
|
+
readonly file?: Mark & {
|
|
108
|
+
readonly current: string;
|
|
109
|
+
};
|
|
94
110
|
};
|
|
95
|
-
export declare function returnedBy(kind: 'expired' | 'withdrawn'): ReturnReason;
|
|
96
111
|
export type RoomDraft = {
|
|
97
112
|
readonly room: string;
|
|
98
113
|
readonly path: string;
|
|
99
114
|
readonly revision: string;
|
|
100
115
|
readonly parts: HeldParts;
|
|
101
116
|
readonly changedUnderneath: ChangedUnderneath;
|
|
117
|
+
readonly marks: Marks;
|
|
102
118
|
readonly returned: ReturnReason | null;
|
|
103
119
|
};
|
|
104
120
|
export type RoomDraftWrite = {
|
|
@@ -106,8 +122,6 @@ export type RoomDraftWrite = {
|
|
|
106
122
|
readonly roomDraft: RoomDraft | null;
|
|
107
123
|
} | {
|
|
108
124
|
readonly outcome: 'stale';
|
|
109
|
-
readonly code: string;
|
|
110
|
-
readonly retryable: boolean;
|
|
111
125
|
readonly current: RoomDraft | null;
|
|
112
126
|
};
|
|
113
127
|
export declare function staleWrite(current: RoomDraft | null): RoomDraftWrite;
|
|
@@ -121,6 +135,7 @@ export type RoomDraftRecord = {
|
|
|
121
135
|
readonly path: string;
|
|
122
136
|
readonly revision: string;
|
|
123
137
|
readonly parts: HeldParts;
|
|
138
|
+
readonly marks: Marks;
|
|
124
139
|
readonly returned: ReturnReason | null;
|
|
125
140
|
};
|
|
126
141
|
export type SavedDraft = {
|
|
@@ -134,6 +149,15 @@ export declare function underneath(parts: HeldParts, path: string, visible: Visi
|
|
|
134
149
|
export declare function heldFile(blob: Blob, base: string | null): Promise<HeldFile>;
|
|
135
150
|
export declare function binaryBase(visible: VisibleLayer | undefined, path: string): string | null;
|
|
136
151
|
export declare function changedParts(path: string, parts: HeldParts, visible: VisibleLayer | undefined): readonly ChangedPart[];
|
|
152
|
+
export declare function marksOver(kept: Marks, under: Marks): Marks;
|
|
153
|
+
export declare function heldMarks(marks: Marks, parts: HeldParts): Marks;
|
|
154
|
+
export declare function partsBetween(path: string, before: Document, after: Document): PartChange[];
|
|
155
|
+
export declare function applyParts(document: Document, changes: readonly Change[], definition: Definition | undefined): ApplyResult;
|
|
156
|
+
type Joined = {
|
|
157
|
+
readonly parts: HeldParts;
|
|
158
|
+
readonly marks: Marks;
|
|
159
|
+
};
|
|
160
|
+
export declare function joinedOver(parts: HeldParts, marks: Marks, path: string, visible: VisibleLayer): Joined | null;
|
|
137
161
|
export declare function lineEnded(text: string): string;
|
|
138
162
|
export type TextParts = {
|
|
139
163
|
readonly fields?: Readonly<Record<string, {
|
|
@@ -146,8 +170,8 @@ export type TextParts = {
|
|
|
146
170
|
readonly value: string;
|
|
147
171
|
};
|
|
148
172
|
};
|
|
149
|
-
export declare function partsAfter(markdown: string, parts: TextParts): string;
|
|
150
|
-
export declare function returnedInto(existing: HeldParts | undefined, returned: HeldParts): HeldParts;
|
|
173
|
+
export declare function partsAfter(markdown: string, parts: TextParts, definitions?: DefinitionOf): string | null;
|
|
174
|
+
export declare function returnedInto(existing: HeldParts | undefined, returned: HeldParts, definitions?: DefinitionOf): HeldParts | null;
|
|
151
175
|
export declare function moveTarget(move: {
|
|
152
176
|
readonly to: string;
|
|
153
177
|
}): string;
|
|
@@ -169,7 +193,6 @@ export declare function changesOf(path: string, parts: HeldParts): {
|
|
|
169
193
|
changes: readonly Change[];
|
|
170
194
|
bases: readonly Precondition[];
|
|
171
195
|
};
|
|
172
|
-
export declare function joinedDraft(carried: SavedDraft, saved: readonly SavedDraft[]): SavedDraft;
|
|
173
196
|
export declare function withdrawnDrafts(drafts: readonly SavedDraft[], changes: readonly Change[]): readonly SavedDraft[];
|
|
174
197
|
export {};
|
|
175
198
|
//# sourceMappingURL=room-draft.d.ts.map
|
package/dist/room-draft.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"room-draft.d.ts","sourceRoot":"","sources":["../src/room-draft.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"room-draft.d.ts","sourceRoot":"","sources":["../src/room-draft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