@agentshouse/mdruntime 0.1.0-cf6041a06849c → 0.1.0-cf6e25bcd52f6
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 +23 -10
- package/dist/adapter.d.ts +144 -29
- package/dist/adapter.d.ts.map +1 -1
- package/dist/attached-model.d.ts +5 -1
- package/dist/attached-model.d.ts.map +1 -1
- package/dist/attached-model.js +53 -6
- package/dist/attempt.d.ts +16 -0
- package/dist/attempt.d.ts.map +1 -0
- package/dist/attempt.js +70 -0
- package/dist/binary.d.ts +18 -0
- package/dist/binary.d.ts.map +1 -0
- package/dist/binary.js +8 -0
- package/dist/bootstrap.d.ts +41 -6
- package/dist/bootstrap.d.ts.map +1 -1
- package/dist/bootstrap.js +224 -45
- package/dist/chain.d.ts +11 -0
- package/dist/chain.d.ts.map +1 -0
- package/dist/chain.js +64 -0
- package/dist/change-set.d.ts +9 -14
- package/dist/change-set.d.ts.map +1 -1
- package/dist/change-set.js +11 -56
- package/dist/change.d.ts +45 -0
- package/dist/change.d.ts.map +1 -1
- package/dist/change.js +34 -0
- package/dist/client.d.ts +35 -14
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +156 -19
- package/dist/collection.d.ts +14 -13
- package/dist/collection.d.ts.map +1 -1
- package/dist/collection.js +66 -54
- package/dist/compile.d.ts +16 -0
- package/dist/compile.d.ts.map +1 -0
- package/dist/compile.js +765 -0
- package/dist/connection.d.ts +63 -20
- package/dist/connection.d.ts.map +1 -1
- package/dist/connection.js +3889 -743
- package/dist/conversation.d.ts +42 -12
- package/dist/conversation.d.ts.map +1 -1
- package/dist/conversation.js +642 -188
- package/dist/digest.d.ts +7 -0
- package/dist/digest.d.ts.map +1 -0
- package/dist/digest.js +113 -0
- package/dist/durability.d.ts +5 -1
- package/dist/durability.d.ts.map +1 -1
- package/dist/durability.js +5 -0
- package/dist/entry.d.ts +19 -0
- package/dist/entry.d.ts.map +1 -0
- package/dist/entry.js +151 -0
- package/dist/expectation.d.ts +21 -0
- package/dist/expectation.d.ts.map +1 -0
- package/dist/expectation.js +70 -0
- package/dist/failure.d.ts +13 -0
- package/dist/failure.d.ts.map +1 -0
- package/dist/failure.js +19 -0
- package/dist/fence.d.ts +6 -0
- package/dist/fence.d.ts.map +1 -0
- package/dist/fence.js +10 -0
- package/dist/file.d.ts +2 -19
- package/dist/file.d.ts.map +1 -1
- package/dist/file.js +7 -122
- package/dist/fulltext.d.ts +27 -0
- package/dist/fulltext.d.ts.map +1 -0
- package/dist/fulltext.js +368 -0
- package/dist/host.d.ts +15 -2
- package/dist/host.d.ts.map +1 -1
- package/dist/host.js +134 -21
- package/dist/identity.d.ts +4 -0
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +16 -1
- package/dist/index.d.ts +19 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -0
- package/dist/live.d.ts +22 -0
- package/dist/live.d.ts.map +1 -0
- package/dist/live.js +124 -0
- package/dist/media.d.ts +8 -0
- package/dist/media.d.ts.map +1 -0
- package/dist/media.js +208 -0
- package/dist/memory.d.ts +13 -5
- package/dist/memory.d.ts.map +1 -1
- package/dist/memory.js +140 -31
- package/dist/messages.d.ts +28 -0
- package/dist/messages.d.ts.map +1 -0
- package/dist/messages.js +90 -0
- package/dist/model.d.ts +20 -4
- package/dist/model.d.ts.map +1 -1
- package/dist/model.js +19 -2
- package/dist/name.d.ts +4 -0
- package/dist/name.d.ts.map +1 -0
- package/dist/name.js +122 -0
- package/dist/observation.d.ts +20 -2
- package/dist/observation.d.ts.map +1 -1
- package/dist/observation.js +113 -12
- package/dist/open.d.ts +2 -0
- package/dist/open.d.ts.map +1 -0
- package/dist/open.js +1 -0
- package/dist/opened.d.ts +22 -0
- package/dist/opened.d.ts.map +1 -0
- package/dist/opened.js +107 -0
- package/dist/outcome.d.ts +73 -3
- package/dist/outcome.d.ts.map +1 -1
- package/dist/outcome.js +81 -1
- package/dist/overlay.d.ts +15 -5
- package/dist/overlay.d.ts.map +1 -1
- package/dist/overlay.js +136 -180
- package/dist/paths.d.ts +1 -1
- package/dist/paths.d.ts.map +1 -1
- package/dist/paths.js +4 -16
- package/dist/query.d.ts +71 -5
- package/dist/query.d.ts.map +1 -1
- package/dist/query.js +100 -26
- package/dist/reach.d.ts +18 -4
- package/dist/reach.d.ts.map +1 -1
- package/dist/reach.js +247 -84
- package/dist/react.d.ts +31 -19
- package/dist/react.d.ts.map +1 -1
- package/dist/react.js +13 -21
- package/dist/readiness.d.ts +64 -0
- package/dist/readiness.d.ts.map +1 -0
- package/dist/readiness.js +33 -0
- package/dist/reads.d.ts +11 -0
- package/dist/reads.d.ts.map +1 -0
- package/dist/reads.js +100 -0
- package/dist/recovery.d.ts +25 -0
- package/dist/recovery.d.ts.map +1 -0
- package/dist/recovery.js +198 -0
- package/dist/refresh.d.ts +19 -8
- package/dist/refresh.d.ts.map +1 -1
- package/dist/refresh.js +125 -57
- package/dist/replica.d.ts +59 -33
- package/dist/replica.d.ts.map +1 -1
- package/dist/replica.js +322 -155
- package/dist/room-draft.d.ts +41 -9
- package/dist/room-draft.d.ts.map +1 -1
- package/dist/room-draft.js +186 -37
- package/dist/rows.d.ts +39 -34
- package/dist/rows.d.ts.map +1 -1
- package/dist/rows.js +197 -80
- package/dist/save.d.ts +74 -4
- package/dist/save.d.ts.map +1 -1
- package/dist/save.js +900 -178
- package/dist/search.d.ts +41 -29
- package/dist/search.d.ts.map +1 -1
- package/dist/search.js +37 -105
- package/dist/seed.d.ts +16 -0
- package/dist/seed.d.ts.map +1 -0
- package/dist/seed.js +75 -0
- package/dist/shared.d.ts +16 -0
- package/dist/shared.d.ts.map +1 -0
- package/dist/shared.js +431 -0
- package/dist/status.d.ts +11 -2
- package/dist/status.d.ts.map +1 -1
- package/dist/status.js +3 -9
- package/dist/store.d.ts +132 -58
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +379 -344
- package/dist/stored.d.ts +154 -0
- package/dist/stored.d.ts.map +1 -0
- package/dist/stored.js +578 -0
- package/dist/tables.d.ts +362 -0
- package/dist/tables.d.ts.map +1 -0
- package/dist/tables.js +627 -0
- package/dist/turn.d.ts +9 -0
- package/dist/turn.d.ts.map +1 -0
- package/dist/turn.js +75 -0
- package/dist/validation.d.ts +30 -0
- package/dist/validation.d.ts.map +1 -0
- package/dist/validation.js +162 -0
- package/dist/windows.d.ts +22 -0
- package/dist/windows.d.ts.map +1 -0
- package/dist/windows.js +89 -0
- package/dist/wire.d.ts +173 -33
- package/dist/wire.d.ts.map +1 -1
- package/dist/wire.js +69 -31
- package/dist/words.d.ts +19 -0
- package/dist/words.d.ts.map +1 -0
- package/dist/words.js +156 -0
- package/package.json +26 -15
- package/AGENTS.md +0 -231
- package/dist/attachment.d.ts +0 -3
- package/dist/attachment.d.ts.map +0 -1
- package/dist/attachment.js +0 -8
- package/dist/read-side.d.ts +0 -18
- package/dist/read-side.d.ts.map +0 -1
- package/dist/read-side.js +0 -377
package/dist/turn.js
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
export function yielded() {
|
|
2
|
+
return new Promise((resolve) => {
|
|
3
|
+
const channel = new MessageChannel();
|
|
4
|
+
channel.port1.onmessage = () => {
|
|
5
|
+
channel.port1.close();
|
|
6
|
+
resolve();
|
|
7
|
+
};
|
|
8
|
+
structuredClone(channel.port2, { transfer: [channel.port2] }).postMessage(null);
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
const UNIT = 1 << 20;
|
|
12
|
+
// A unit of runtime work ends within one 60 Hz frame so a port's next message waits at most a frame.
|
|
13
|
+
const SLICE_MS = 16;
|
|
14
|
+
export const ROW_WEIGHT = 256;
|
|
15
|
+
export function after(value, next) {
|
|
16
|
+
return value instanceof Promise ? value.then(next) : next(value);
|
|
17
|
+
}
|
|
18
|
+
function spending() {
|
|
19
|
+
let spent = 0;
|
|
20
|
+
let since = performance.now();
|
|
21
|
+
return {
|
|
22
|
+
spend(weight) {
|
|
23
|
+
spent += weight;
|
|
24
|
+
return spent >= UNIT || performance.now() - since >= SLICE_MS;
|
|
25
|
+
},
|
|
26
|
+
restart() {
|
|
27
|
+
spent = 0;
|
|
28
|
+
since = performance.now();
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export function paced() {
|
|
33
|
+
const spent = spending();
|
|
34
|
+
return (weight) => (spent.spend(weight) ? yielded().then(() => spent.restart()) : undefined);
|
|
35
|
+
}
|
|
36
|
+
async function resumed(iterator, each, ended, paused) {
|
|
37
|
+
const spent = spending();
|
|
38
|
+
for (let due = true;;) {
|
|
39
|
+
if (due) {
|
|
40
|
+
await paused();
|
|
41
|
+
spent.restart();
|
|
42
|
+
}
|
|
43
|
+
const next = iterator.next();
|
|
44
|
+
if (next.done === true)
|
|
45
|
+
break;
|
|
46
|
+
due = spent.spend(each(next.value));
|
|
47
|
+
if (due)
|
|
48
|
+
ended();
|
|
49
|
+
}
|
|
50
|
+
ended();
|
|
51
|
+
}
|
|
52
|
+
export function inUnits(items, each, ended = () => { }, paused = yielded) {
|
|
53
|
+
const iterator = items[Symbol.iterator]();
|
|
54
|
+
const spent = spending();
|
|
55
|
+
for (let next = iterator.next(); next.done !== true; next = iterator.next()) {
|
|
56
|
+
if (spent.spend(each(next.value))) {
|
|
57
|
+
ended();
|
|
58
|
+
return resumed(iterator, each, ended, paused);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
ended();
|
|
62
|
+
}
|
|
63
|
+
export function finished(steps) {
|
|
64
|
+
for (let step = steps.next();; step = steps.next()) {
|
|
65
|
+
if (step.done === true)
|
|
66
|
+
return step.value;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
export function stepped(steps) {
|
|
70
|
+
let result;
|
|
71
|
+
const driven = function* () {
|
|
72
|
+
result = yield* steps;
|
|
73
|
+
};
|
|
74
|
+
return after(inUnits(driven(), (weight) => weight), () => result);
|
|
75
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type Validation } from '@agentshouse/mdmodel';
|
|
2
|
+
import { type Composition } from './collection.js';
|
|
3
|
+
type Examined = {
|
|
4
|
+
readonly path: string;
|
|
5
|
+
readonly content: string | null;
|
|
6
|
+
};
|
|
7
|
+
export type Typed = {
|
|
8
|
+
readonly type: string | undefined;
|
|
9
|
+
readonly binary: boolean;
|
|
10
|
+
};
|
|
11
|
+
export type Walk = (after: string | null) => Promise<{
|
|
12
|
+
readonly entries: readonly Examined[];
|
|
13
|
+
readonly next: string | null;
|
|
14
|
+
}>;
|
|
15
|
+
export type Lookup = (paths: readonly string[]) => Promise<ReadonlyMap<string, Typed>>;
|
|
16
|
+
export declare function validatedCollection(walk: Walk, lookup: Lookup, composition: Composition): Promise<Validation>;
|
|
17
|
+
export type Changed = {
|
|
18
|
+
readonly path: string;
|
|
19
|
+
readonly was: string | null | undefined;
|
|
20
|
+
readonly now: string | null | undefined;
|
|
21
|
+
};
|
|
22
|
+
type CleanSource = {
|
|
23
|
+
readonly lookup: Lookup;
|
|
24
|
+
readonly texts: (paths: readonly string[]) => Promise<ReadonlyMap<string, string | null>>;
|
|
25
|
+
readonly referrers: ((targets: readonly string[]) => Promise<readonly string[]>) | null;
|
|
26
|
+
};
|
|
27
|
+
export declare function sameComposition(left: Composition, right: Composition): boolean;
|
|
28
|
+
export declare function changedCleanly(changes: readonly Changed[], previous: Composition, composition: Composition, source: CleanSource): Promise<boolean>;
|
|
29
|
+
export {};
|
|
30
|
+
//# sourceMappingURL=validation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../src/validation.ts"],"names":[],"mappings":"AAAA,OAAO,EASL,KAAK,UAAU,EAGhB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAuB,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAMxE,KAAK,QAAQ,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO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I,CAAC;CACzF,CAAC;AAaF,wBAAgB,eAAe,CAAC,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,GAAG,OAAO,CAQ9E;AAqCD,wBAAsB,cAAc,CAClC,OAAO,EAAE,SAAS,OAAO,EAAE,EAC3B,QAAQ,EAAE,WAAW,EACrB,WAAW,EAAE,WAAW,EACxB,MAAM,EAAE,WAAW,GAClB,OAAO,CAAC,OAAO,CAAC,CAsDlB"}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { assess, checkDocument, parse, parseFrontmatter, resolves, verdicts, } from '@agentshouse/mdmodel';
|
|
2
|
+
import { governing, selected } from './collection.js';
|
|
3
|
+
import { sameTyping } from './model.js';
|
|
4
|
+
import { paced, ROW_WEIGHT, yielded } from './turn.js';
|
|
5
|
+
const NO_TYPES = { types: {} };
|
|
6
|
+
function modelOf(model) {
|
|
7
|
+
return model.status === 'unavailable' ? NO_TYPES : { types: model.types };
|
|
8
|
+
}
|
|
9
|
+
function typedText(content) {
|
|
10
|
+
const read = parse(content);
|
|
11
|
+
return read.ok && read.document.type !== undefined && read.document.type !== 'any';
|
|
12
|
+
}
|
|
13
|
+
function partVerdict(part) {
|
|
14
|
+
return part.unmodeled !== null
|
|
15
|
+
? { verdict: 'refuse', rule: 'model-unavailable', file: part.unmodeled }
|
|
16
|
+
: part.judged.verdict();
|
|
17
|
+
}
|
|
18
|
+
export async function validatedCollection(walk, lookup, composition) {
|
|
19
|
+
const collection = { model: composition.model, judged: verdicts(), unmodeled: null };
|
|
20
|
+
const selection = composition.selection === null
|
|
21
|
+
? null
|
|
22
|
+
: { model: composition.selection.model, judged: verdicts(), unmodeled: null };
|
|
23
|
+
const partOf = (path) => selection !== null && selected(composition, path) ? selection : collection;
|
|
24
|
+
const pace = paced();
|
|
25
|
+
for (let after = null;;) {
|
|
26
|
+
const { entries, next } = await walk(after);
|
|
27
|
+
const assessed = [];
|
|
28
|
+
for (const { path, content } of entries) {
|
|
29
|
+
if (content === null)
|
|
30
|
+
continue;
|
|
31
|
+
const part = partOf(path);
|
|
32
|
+
if (part.model.status === 'unavailable' && part.unmodeled === null && typedText(content)) {
|
|
33
|
+
part.unmodeled = path;
|
|
34
|
+
}
|
|
35
|
+
const assessment = assess(path, content, false, modelOf(part.model), { anyRoom: true });
|
|
36
|
+
assessed.push({ part, assessment });
|
|
37
|
+
await pace(content.length + assessment.targets.length * ROW_WEIGHT);
|
|
38
|
+
}
|
|
39
|
+
const targets = [...new Set(assessed.flatMap(({ assessment }) => assessment.targets))];
|
|
40
|
+
const known = await lookup(targets);
|
|
41
|
+
for (const { part, assessment } of assessed) {
|
|
42
|
+
const within = (path) => partOf(path) === part;
|
|
43
|
+
part.judged.add(assessment, (path) => (within(path) ? known.get(path)?.type : undefined), (path) => within(path) && known.get(path)?.binary === true);
|
|
44
|
+
await pace((assessment.targets.length + 1) * ROW_WEIGHT);
|
|
45
|
+
}
|
|
46
|
+
if (next === null)
|
|
47
|
+
break;
|
|
48
|
+
after = next;
|
|
49
|
+
await yielded();
|
|
50
|
+
}
|
|
51
|
+
const judged = [partVerdict(collection), ...(selection === null ? [] : [partVerdict(selection)])];
|
|
52
|
+
const refusals = judged.filter((verdict) => verdict.verdict === 'refuse');
|
|
53
|
+
if (refusals.length === 0)
|
|
54
|
+
return judged[0];
|
|
55
|
+
return refusals.find((refusal) => refusal.rule !== 'model-unavailable') ?? refusals[0];
|
|
56
|
+
}
|
|
57
|
+
function declared(content) {
|
|
58
|
+
if (content === undefined || content === null)
|
|
59
|
+
return undefined;
|
|
60
|
+
const read = parseFrontmatter(content);
|
|
61
|
+
return read.ok ? (read.frontmatter.type ?? 'any') : undefined;
|
|
62
|
+
}
|
|
63
|
+
function typedIn(content) {
|
|
64
|
+
const type = declared(content);
|
|
65
|
+
return type !== undefined && type !== 'any';
|
|
66
|
+
}
|
|
67
|
+
export function sameComposition(left, right) {
|
|
68
|
+
return (sameTyping(left.model, right.model) &&
|
|
69
|
+
(left.selection === null || right.selection === null
|
|
70
|
+
? left.selection === right.selection
|
|
71
|
+
: sameTyping(left.selection.model, right.selection.model)) &&
|
|
72
|
+
JSON.stringify(left.selection?.roots ?? null) === JSON.stringify(right.selection?.roots ?? null));
|
|
73
|
+
}
|
|
74
|
+
function checked(path, content, composition) {
|
|
75
|
+
const model = governing(composition, path);
|
|
76
|
+
return checkDocument(path, content, modelOf(model), { anyRoom: true });
|
|
77
|
+
}
|
|
78
|
+
async function reachingAll(checks, composition, next) {
|
|
79
|
+
const targets = [
|
|
80
|
+
...new Set(checks.flatMap(({ check }) => check.ok ? check.references.flatMap(({ target }) => (target === null ? [] : [target])) : [])),
|
|
81
|
+
];
|
|
82
|
+
const known = await next(targets);
|
|
83
|
+
const pace = paced();
|
|
84
|
+
for (const { path, check } of checks) {
|
|
85
|
+
if (!check.ok)
|
|
86
|
+
return false;
|
|
87
|
+
const part = (other) => selected(composition, other) === selected(composition, path);
|
|
88
|
+
const resolved = check.references.every((reference) => resolves(reference, (other) => (part(other) ? known.get(other)?.type : undefined), (other) => part(other) && known.get(other)?.binary === true));
|
|
89
|
+
if (!resolved)
|
|
90
|
+
return false;
|
|
91
|
+
await pace((check.references.length + 1) * ROW_WEIGHT);
|
|
92
|
+
}
|
|
93
|
+
return true;
|
|
94
|
+
}
|
|
95
|
+
export async function changedCleanly(changes, previous, composition, source) {
|
|
96
|
+
if (!sameComposition(previous, composition))
|
|
97
|
+
return false;
|
|
98
|
+
const changedAt = new Map(changes.map((change) => [change.path, change]));
|
|
99
|
+
const next = async (paths) => {
|
|
100
|
+
const asked = paths.filter((path) => !changedAt.has(path));
|
|
101
|
+
const known = new Map(await source.lookup(asked));
|
|
102
|
+
for (const path of paths) {
|
|
103
|
+
const change = changedAt.get(path);
|
|
104
|
+
if (change === undefined)
|
|
105
|
+
continue;
|
|
106
|
+
if (change.now === undefined)
|
|
107
|
+
known.delete(path);
|
|
108
|
+
else
|
|
109
|
+
known.set(path, { type: declared(change.now), binary: change.now === null });
|
|
110
|
+
}
|
|
111
|
+
return known;
|
|
112
|
+
};
|
|
113
|
+
const shifted = [];
|
|
114
|
+
const checks = [];
|
|
115
|
+
const pace = paced();
|
|
116
|
+
for (const { path, was, now } of changes) {
|
|
117
|
+
await pace((now?.length ?? 0) + (was?.length ?? 0) + ROW_WEIGHT);
|
|
118
|
+
const modeled = governing(composition, path).status !== 'unavailable';
|
|
119
|
+
if ((now === undefined) !== (was === undefined) ||
|
|
120
|
+
declared(now) !== declared(was) ||
|
|
121
|
+
(now === null) !== (was === null)) {
|
|
122
|
+
shifted.push(path);
|
|
123
|
+
}
|
|
124
|
+
if (!modeled && typedIn(was) && !typedIn(now))
|
|
125
|
+
return false;
|
|
126
|
+
if (now === undefined)
|
|
127
|
+
continue;
|
|
128
|
+
if (now === null)
|
|
129
|
+
return false;
|
|
130
|
+
if (!modeled) {
|
|
131
|
+
if (declared(now) === undefined)
|
|
132
|
+
return false;
|
|
133
|
+
if (typedIn(now))
|
|
134
|
+
continue;
|
|
135
|
+
const check = checked(path, now, composition);
|
|
136
|
+
if (!check.ok)
|
|
137
|
+
return false;
|
|
138
|
+
checks.push({ path, check });
|
|
139
|
+
continue;
|
|
140
|
+
}
|
|
141
|
+
checks.push({ path, check: checked(path, now, composition) });
|
|
142
|
+
}
|
|
143
|
+
if (!(await reachingAll(checks, composition, next)))
|
|
144
|
+
return false;
|
|
145
|
+
if (shifted.length === 0)
|
|
146
|
+
return true;
|
|
147
|
+
if (source.referrers === null)
|
|
148
|
+
return false;
|
|
149
|
+
const files = (await source.referrers(shifted)).filter((file) => !changedAt.has(file));
|
|
150
|
+
if (files.length === 0)
|
|
151
|
+
return true;
|
|
152
|
+
const texts = await source.texts(files);
|
|
153
|
+
const rechecked = [];
|
|
154
|
+
for (const file of files) {
|
|
155
|
+
const content = texts.get(file);
|
|
156
|
+
if (content === undefined || content === null)
|
|
157
|
+
return false;
|
|
158
|
+
await pace(content.length + ROW_WEIGHT);
|
|
159
|
+
rechecked.push({ path: file, check: checked(file, content, composition) });
|
|
160
|
+
}
|
|
161
|
+
return reachingAll(rechecked, composition, next);
|
|
162
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare const MAXIMUM_WINDOW = 1000;
|
|
2
|
+
export declare const FROM_START = "[]";
|
|
3
|
+
export declare function capped(limit: number | null | undefined): number;
|
|
4
|
+
export type Ordering = {
|
|
5
|
+
readonly direction: 'asc' | 'desc';
|
|
6
|
+
readonly nulls: 'first' | 'last';
|
|
7
|
+
readonly stringSort: 'lexical' | 'locale';
|
|
8
|
+
readonly locale: string | undefined;
|
|
9
|
+
readonly localeOptions: Intl.CollatorOptions | undefined;
|
|
10
|
+
};
|
|
11
|
+
interface Placed {
|
|
12
|
+
readonly position: string;
|
|
13
|
+
readonly identity: string;
|
|
14
|
+
}
|
|
15
|
+
export declare function messageOrder(left: Placed, right: Placed): number;
|
|
16
|
+
export declare function precedes(message: Placed, before: readonly [string, string] | null): boolean;
|
|
17
|
+
export declare function byCodePoint(left: string, right: string): number;
|
|
18
|
+
export declare function compared(left: unknown, right: unknown, ordering: Ordering): number;
|
|
19
|
+
export declare function cursorOf(values: readonly unknown[]): string;
|
|
20
|
+
export declare function decodedCursor(text: string): readonly unknown[] | null;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=windows.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"windows.d.ts","sourceRoot":"","sources":["../src/windows.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,OAAO,CAAC;AAEnC,eAAO,MAAM,UAAU,OAAO,CAAC;AAE/B,wBAAgB,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAE/D;AAED,MAAM,MAAM,QAAQ,GAAG;IACrB,QAAQ,CAAC,SAAS,EAAE,KAAK,GAAG,MAAM,CAAC;IACnC,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC;IACjC,QAAQ,CAAC,UAAU,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC1C,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,QAAQ,CAAC,aAAa,EAAE,IAAI,CAAC,eAAe,GAAG,SAAS,CAAC;CAC1D,CAAC;AAEF,UAAU,MAAM;IACd,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAIhE;AAED,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,GAAG,OAAO,CAE3F;AAaD,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAO/D;AA4BD,wBAAgB,QAAQ,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,GAAG,MAAM,CAMlF;AAED,wBAAgB,QAAQ,CAAC,MAAM,EAAE,SAAS,OAAO,EAAE,GAAG,MAAM,CAE3D;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,OAAO,EAAE,GAAG,IAAI,CAOrE"}
|
package/dist/windows.js
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
export const MAXIMUM_WINDOW = 1000;
|
|
2
|
+
export const FROM_START = '[]';
|
|
3
|
+
export function capped(limit) {
|
|
4
|
+
return limit == null ? MAXIMUM_WINDOW : Math.min(limit, MAXIMUM_WINDOW);
|
|
5
|
+
}
|
|
6
|
+
export function messageOrder(left, right) {
|
|
7
|
+
if (left.position !== right.position)
|
|
8
|
+
return left.position < right.position ? -1 : 1;
|
|
9
|
+
if (left.identity !== right.identity)
|
|
10
|
+
return left.identity < right.identity ? -1 : 1;
|
|
11
|
+
return 0;
|
|
12
|
+
}
|
|
13
|
+
export function precedes(message, before) {
|
|
14
|
+
return before === null || messageOrder(message, { position: before[0], identity: before[1] }) < 0;
|
|
15
|
+
}
|
|
16
|
+
function rank(value) {
|
|
17
|
+
if (typeof value === 'boolean' || typeof value === 'number')
|
|
18
|
+
return 1;
|
|
19
|
+
if (typeof value === 'string')
|
|
20
|
+
return 2;
|
|
21
|
+
return Array.isArray(value) ? 3 : 4;
|
|
22
|
+
}
|
|
23
|
+
function unit(code) {
|
|
24
|
+
if (code >= 0xd800 && code < 0xe000)
|
|
25
|
+
return code + 0x2000;
|
|
26
|
+
return code >= 0xe000 ? code - 0x800 : code;
|
|
27
|
+
}
|
|
28
|
+
export function byCodePoint(left, right) {
|
|
29
|
+
for (let at = 0; at < Math.min(left.length, right.length); at += 1) {
|
|
30
|
+
const ours = left.charCodeAt(at);
|
|
31
|
+
const theirs = right.charCodeAt(at);
|
|
32
|
+
if (ours !== theirs)
|
|
33
|
+
return unit(ours) - unit(theirs);
|
|
34
|
+
}
|
|
35
|
+
return left.length - right.length;
|
|
36
|
+
}
|
|
37
|
+
function ascending(left, right, ordering) {
|
|
38
|
+
if (left == null && right == null)
|
|
39
|
+
return 0;
|
|
40
|
+
if (left == null)
|
|
41
|
+
return ordering.nulls === 'first' ? -1 : 1;
|
|
42
|
+
if (right == null)
|
|
43
|
+
return ordering.nulls === 'first' ? 1 : -1;
|
|
44
|
+
const ranked = rank(left) - rank(right);
|
|
45
|
+
if (ranked !== 0)
|
|
46
|
+
return ranked;
|
|
47
|
+
if (typeof left === 'string' && typeof right === 'string') {
|
|
48
|
+
return ordering.stringSort === 'locale'
|
|
49
|
+
? left.localeCompare(right, ordering.locale, ordering.localeOptions)
|
|
50
|
+
: byCodePoint(left, right);
|
|
51
|
+
}
|
|
52
|
+
if (Array.isArray(left) && Array.isArray(right)) {
|
|
53
|
+
for (let at = 0; at < Math.min(left.length, right.length); at += 1) {
|
|
54
|
+
const result = ascending(left[at], right[at], ordering);
|
|
55
|
+
if (result !== 0)
|
|
56
|
+
return result;
|
|
57
|
+
}
|
|
58
|
+
return left.length - right.length;
|
|
59
|
+
}
|
|
60
|
+
if (typeof left === 'object')
|
|
61
|
+
return 0;
|
|
62
|
+
const held = left;
|
|
63
|
+
const other = right;
|
|
64
|
+
if (held < other)
|
|
65
|
+
return -1;
|
|
66
|
+
if (held > other)
|
|
67
|
+
return 1;
|
|
68
|
+
return 0;
|
|
69
|
+
}
|
|
70
|
+
export function compared(left, right, ordering) {
|
|
71
|
+
if (ordering.direction === 'asc')
|
|
72
|
+
return ascending(left, right, ordering);
|
|
73
|
+
return ascending(right, left, {
|
|
74
|
+
...ordering,
|
|
75
|
+
nulls: ordering.nulls === 'first' ? 'last' : 'first',
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
export function cursorOf(values) {
|
|
79
|
+
return JSON.stringify(values);
|
|
80
|
+
}
|
|
81
|
+
export function decodedCursor(text) {
|
|
82
|
+
try {
|
|
83
|
+
const decoded = JSON.parse(text);
|
|
84
|
+
return Array.isArray(decoded) ? decoded : null;
|
|
85
|
+
}
|
|
86
|
+
catch {
|
|
87
|
+
return null;
|
|
88
|
+
}
|
|
89
|
+
}
|
package/dist/wire.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ConnectionRefusal } from './connection.js';
|
|
2
|
+
import type { Described } from './failure.js';
|
|
2
3
|
export type RuntimePort = {
|
|
3
4
|
postMessage(message: unknown): void;
|
|
4
5
|
addEventListener(type: 'message' | 'close', listener: (event: {
|
|
@@ -7,52 +8,188 @@ export type RuntimePort = {
|
|
|
7
8
|
start(): void;
|
|
8
9
|
};
|
|
9
10
|
export type WireReach = 'within' | 'app' | 'runtime' | 'actions' | 'whole';
|
|
11
|
+
export type WireEffect = 'read' | 'write' | 'action';
|
|
12
|
+
export type WireCall = {
|
|
13
|
+
readonly reach: WireReach;
|
|
14
|
+
readonly effect: WireEffect;
|
|
15
|
+
};
|
|
10
16
|
declare const MEMBERS: {
|
|
11
|
-
readonly rooms:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
readonly
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
readonly
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
readonly
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
readonly
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
readonly
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
readonly
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
17
|
+
readonly rooms: {
|
|
18
|
+
readonly reach: 'within';
|
|
19
|
+
readonly effect: 'read';
|
|
20
|
+
};
|
|
21
|
+
readonly query: {
|
|
22
|
+
readonly reach: 'within';
|
|
23
|
+
readonly effect: 'read';
|
|
24
|
+
};
|
|
25
|
+
readonly search: {
|
|
26
|
+
readonly reach: 'within';
|
|
27
|
+
readonly effect: 'read';
|
|
28
|
+
};
|
|
29
|
+
readonly types: {
|
|
30
|
+
readonly reach: 'within';
|
|
31
|
+
readonly effect: 'read';
|
|
32
|
+
};
|
|
33
|
+
readonly save: {
|
|
34
|
+
readonly reach: 'within';
|
|
35
|
+
readonly effect: 'write';
|
|
36
|
+
};
|
|
37
|
+
readonly saveParts: {
|
|
38
|
+
readonly reach: 'within';
|
|
39
|
+
readonly effect: 'write';
|
|
40
|
+
};
|
|
41
|
+
readonly history: {
|
|
42
|
+
readonly reach: 'within';
|
|
43
|
+
readonly effect: 'read';
|
|
44
|
+
};
|
|
45
|
+
readonly resolve: {
|
|
46
|
+
readonly reach: 'within';
|
|
47
|
+
readonly effect: 'read';
|
|
48
|
+
};
|
|
49
|
+
readonly 'binaryFile.read': {
|
|
50
|
+
readonly reach: 'within';
|
|
51
|
+
readonly effect: 'read';
|
|
52
|
+
};
|
|
53
|
+
readonly 'binaryFile.link': {
|
|
54
|
+
readonly reach: 'within';
|
|
55
|
+
readonly effect: 'read';
|
|
56
|
+
};
|
|
57
|
+
readonly 'binaryFile.show': {
|
|
58
|
+
readonly reach: 'within';
|
|
59
|
+
readonly effect: 'read';
|
|
60
|
+
};
|
|
61
|
+
readonly 'binaryFile.attach': {
|
|
62
|
+
readonly reach: 'within';
|
|
63
|
+
readonly effect: 'action';
|
|
64
|
+
};
|
|
65
|
+
readonly 'binaryFile.part': {
|
|
66
|
+
readonly reach: 'within';
|
|
67
|
+
readonly effect: 'read';
|
|
68
|
+
};
|
|
69
|
+
readonly call: {
|
|
70
|
+
readonly reach: 'actions';
|
|
71
|
+
readonly effect: 'action';
|
|
72
|
+
};
|
|
73
|
+
readonly reached: {
|
|
74
|
+
readonly reach: 'within';
|
|
75
|
+
readonly effect: 'read';
|
|
76
|
+
};
|
|
77
|
+
readonly log: {
|
|
78
|
+
readonly reach: 'whole';
|
|
79
|
+
readonly effect: 'read';
|
|
80
|
+
};
|
|
81
|
+
readonly cleanUp: {
|
|
82
|
+
readonly reach: 'whole';
|
|
83
|
+
readonly effect: 'write';
|
|
84
|
+
};
|
|
85
|
+
readonly persistence: {
|
|
86
|
+
readonly reach: 'runtime';
|
|
87
|
+
readonly effect: 'read';
|
|
88
|
+
};
|
|
89
|
+
readonly retry: {
|
|
90
|
+
readonly reach: 'runtime';
|
|
91
|
+
readonly effect: 'write';
|
|
92
|
+
};
|
|
93
|
+
readonly reauthorize: {
|
|
94
|
+
readonly reach: 'runtime';
|
|
95
|
+
readonly effect: 'write';
|
|
96
|
+
};
|
|
97
|
+
readonly 'roomDraft.list': {
|
|
98
|
+
readonly reach: 'within';
|
|
99
|
+
readonly effect: 'read';
|
|
100
|
+
};
|
|
101
|
+
readonly 'roomDraft.read': {
|
|
102
|
+
readonly reach: 'within';
|
|
103
|
+
readonly effect: 'read';
|
|
104
|
+
};
|
|
105
|
+
readonly 'roomDraft.write': {
|
|
106
|
+
readonly reach: 'within';
|
|
107
|
+
readonly effect: 'write';
|
|
108
|
+
};
|
|
109
|
+
readonly 'roomDraft.discard': {
|
|
110
|
+
readonly reach: 'within';
|
|
111
|
+
readonly effect: 'write';
|
|
112
|
+
};
|
|
113
|
+
readonly 'presentation.read': {
|
|
114
|
+
readonly reach: 'app';
|
|
115
|
+
readonly effect: 'read';
|
|
116
|
+
};
|
|
117
|
+
readonly 'presentation.write': {
|
|
118
|
+
readonly reach: 'app';
|
|
119
|
+
readonly effect: 'write';
|
|
120
|
+
};
|
|
121
|
+
readonly 'presentation.edit': {
|
|
122
|
+
readonly reach: 'app';
|
|
123
|
+
readonly effect: 'write';
|
|
124
|
+
};
|
|
125
|
+
readonly 'conversation.list': {
|
|
126
|
+
readonly reach: 'within';
|
|
127
|
+
readonly effect: 'read';
|
|
128
|
+
};
|
|
129
|
+
readonly 'conversation.read': {
|
|
130
|
+
readonly reach: 'within';
|
|
131
|
+
readonly effect: 'read';
|
|
132
|
+
};
|
|
133
|
+
readonly 'conversation.create': {
|
|
134
|
+
readonly reach: 'within';
|
|
135
|
+
readonly effect: 'action';
|
|
136
|
+
};
|
|
137
|
+
readonly 'conversation.send': {
|
|
138
|
+
readonly reach: 'within';
|
|
139
|
+
readonly effect: 'action';
|
|
140
|
+
};
|
|
141
|
+
readonly 'conversation.answer': {
|
|
142
|
+
readonly reach: 'within';
|
|
143
|
+
readonly effect: 'action';
|
|
144
|
+
};
|
|
145
|
+
readonly 'conversation.interrupt': {
|
|
146
|
+
readonly reach: 'within';
|
|
147
|
+
readonly effect: 'action';
|
|
148
|
+
};
|
|
149
|
+
readonly 'conversation.kill': {
|
|
150
|
+
readonly reach: 'within';
|
|
151
|
+
readonly effect: 'action';
|
|
152
|
+
};
|
|
153
|
+
readonly 'conversation.cancel': {
|
|
154
|
+
readonly reach: 'within';
|
|
155
|
+
readonly effect: 'action';
|
|
156
|
+
};
|
|
157
|
+
readonly 'conversation.delete': {
|
|
158
|
+
readonly reach: 'within';
|
|
159
|
+
readonly effect: 'action';
|
|
160
|
+
};
|
|
161
|
+
readonly 'chatDraft.write': {
|
|
162
|
+
readonly reach: 'within';
|
|
163
|
+
readonly effect: 'write';
|
|
164
|
+
};
|
|
165
|
+
readonly 'chatDraft.prepend': {
|
|
166
|
+
readonly reach: 'within';
|
|
167
|
+
readonly effect: 'write';
|
|
168
|
+
};
|
|
169
|
+
readonly 'chatDraft.discard': {
|
|
170
|
+
readonly reach: 'within';
|
|
171
|
+
readonly effect: 'write';
|
|
172
|
+
};
|
|
39
173
|
};
|
|
40
174
|
declare const TOPICS: {
|
|
41
175
|
readonly rooms: 'within';
|
|
176
|
+
readonly readiness: 'within';
|
|
42
177
|
readonly 'connection-refusal': 'runtime';
|
|
43
178
|
readonly 'storage-loss': 'runtime';
|
|
44
179
|
readonly 'deployment-facts': 'runtime';
|
|
45
180
|
readonly 'sync-status': 'within';
|
|
46
181
|
readonly 'service-mode': 'runtime';
|
|
182
|
+
readonly member: 'runtime';
|
|
47
183
|
readonly query: 'within';
|
|
48
184
|
readonly queue: 'within';
|
|
49
185
|
readonly 'room-drafts': 'within';
|
|
50
186
|
readonly presentation: 'app';
|
|
51
187
|
readonly conversation: 'within';
|
|
52
188
|
readonly conversations: 'within';
|
|
189
|
+
readonly agents: 'within';
|
|
53
190
|
};
|
|
54
|
-
export declare const
|
|
55
|
-
readonly members: Readonly<Record<string,
|
|
191
|
+
export declare const WIRE: {
|
|
192
|
+
readonly members: Readonly<Record<string, WireCall>>;
|
|
56
193
|
readonly topics: Readonly<Record<string, WireReach>>;
|
|
57
194
|
};
|
|
58
195
|
export type WireMember = keyof typeof MEMBERS;
|
|
@@ -77,11 +214,10 @@ export type WireAnswer = {
|
|
|
77
214
|
kind: 'result';
|
|
78
215
|
id: number;
|
|
79
216
|
value: unknown;
|
|
80
|
-
} | {
|
|
217
|
+
} | ({
|
|
81
218
|
kind: 'failure';
|
|
82
219
|
id: number;
|
|
83
|
-
|
|
84
|
-
} | {
|
|
220
|
+
} & Described) | {
|
|
85
221
|
kind: 'event';
|
|
86
222
|
id: number;
|
|
87
223
|
value: unknown;
|
|
@@ -91,6 +227,10 @@ export type WireAnswer = {
|
|
|
91
227
|
} | {
|
|
92
228
|
kind: 'ended';
|
|
93
229
|
};
|
|
230
|
+
export declare function unanswered(call: {
|
|
231
|
+
readonly id: number;
|
|
232
|
+
readonly member: WireMember;
|
|
233
|
+
}): WireAnswer | null;
|
|
94
234
|
export declare const AUTHORIZATION_ENDED = "the host authorization ended";
|
|
95
235
|
export declare const PORT_CLOSED = "the port closed";
|
|
96
236
|
export declare function request(message: unknown): WireRequest | null;
|
package/dist/wire.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wire.d.ts","sourceRoot":"","sources":["../src/wire.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"wire.d.ts","sourceRoot":"","sources":["../src/wire.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9C,MAAM,MAAM,WAAW,GAAG;IACxB,WAAW,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IACpC,gBAAgB,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE;QAAE,IAAI,CAAC,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,GAAG,IAAI,CAAC;IACjG,KAAK,IAAI,IAAI,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AAE3E,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;AAErD,MAAM,MAAM,QAAQ,GAAG;IAAE,QAAQ,CAA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