@agentshouse/mdruntime 0.1.0-alpha.8 → 0.1.0-alpha.9
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/adapter.d.ts +76 -21
- package/dist/adapter.d.ts.map +1 -1
- package/dist/adapter.js.map +1 -1
- package/dist/bootstrap.d.ts +4 -1
- package/dist/bootstrap.d.ts.map +1 -1
- package/dist/bootstrap.js +4 -2
- package/dist/bootstrap.js.map +1 -1
- package/dist/client.d.ts +63 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +227 -0
- package/dist/client.js.map +1 -0
- package/dist/collection.d.ts +14 -4
- package/dist/collection.d.ts.map +1 -1
- package/dist/collection.js +60 -35
- package/dist/collection.js.map +1 -1
- package/dist/connection.d.ts +28 -7
- package/dist/connection.d.ts.map +1 -1
- package/dist/connection.js +603 -368
- package/dist/connection.js.map +1 -1
- package/dist/conversation.d.ts +57 -0
- package/dist/conversation.d.ts.map +1 -0
- package/dist/conversation.js +401 -0
- package/dist/conversation.js.map +1 -0
- package/dist/durability.d.ts +8 -3
- package/dist/durability.d.ts.map +1 -1
- package/dist/durability.js +5 -59
- package/dist/durability.js.map +1 -1
- package/dist/file.d.ts +20 -0
- package/dist/file.d.ts.map +1 -0
- package/dist/file.js +149 -0
- package/dist/file.js.map +1 -0
- package/dist/host.d.ts +9 -0
- package/dist/host.d.ts.map +1 -0
- package/dist/host.js +200 -0
- package/dist/host.js.map +1 -0
- package/dist/index.d.ts +7 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/memory.d.ts +14 -2
- package/dist/memory.d.ts.map +1 -1
- package/dist/memory.js +171 -11
- package/dist/memory.js.map +1 -1
- package/dist/outcome.d.ts +16 -9
- package/dist/outcome.d.ts.map +1 -1
- package/dist/outcome.js +10 -0
- package/dist/outcome.js.map +1 -1
- package/dist/query.d.ts +1 -0
- package/dist/query.d.ts.map +1 -1
- package/dist/query.js.map +1 -1
- package/dist/replica.d.ts +2 -1
- package/dist/replica.d.ts.map +1 -1
- package/dist/replica.js +16 -3
- package/dist/replica.js.map +1 -1
- package/dist/save.d.ts +3 -3
- package/dist/save.d.ts.map +1 -1
- package/dist/save.js +33 -14
- package/dist/save.js.map +1 -1
- package/dist/status.d.ts +11 -2
- package/dist/status.d.ts.map +1 -1
- package/dist/status.js +5 -4
- package/dist/status.js.map +1 -1
- package/dist/store.d.ts +32 -3
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +64 -7
- package/dist/store.js.map +1 -1
- package/dist/wire.d.ts +63 -0
- package/dist/wire.d.ts.map +1 -0
- package/dist/wire.js +139 -0
- package/dist/wire.js.map +1 -0
- package/package.json +10 -2
package/dist/file.js
ADDED
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
const PNG_SIGNATURE = [
|
|
2
|
+
0x89,
|
|
3
|
+
0x50,
|
|
4
|
+
0x4e,
|
|
5
|
+
0x47,
|
|
6
|
+
0x0d,
|
|
7
|
+
0x0a,
|
|
8
|
+
0x1a,
|
|
9
|
+
0x0a
|
|
10
|
+
];
|
|
11
|
+
const WEBP_SYNC = [
|
|
12
|
+
0x9d,
|
|
13
|
+
0x01,
|
|
14
|
+
0x2a
|
|
15
|
+
];
|
|
16
|
+
const SHAPELESS_JPEG_MARKERS = new Set([
|
|
17
|
+
0xc4,
|
|
18
|
+
0xc8,
|
|
19
|
+
0xcc
|
|
20
|
+
]);
|
|
21
|
+
const BMFF_CONTAINERS = new Set([
|
|
22
|
+
'meta',
|
|
23
|
+
'iprp',
|
|
24
|
+
'ipco'
|
|
25
|
+
]);
|
|
26
|
+
function starts(bytes, signature, at = 0) {
|
|
27
|
+
return signature.every((value, index)=>bytes[at + index] === value);
|
|
28
|
+
}
|
|
29
|
+
function text(bytes, at, length) {
|
|
30
|
+
return String.fromCharCode(...bytes.subarray(at, at + length));
|
|
31
|
+
}
|
|
32
|
+
function bigEndian(bytes, at, length) {
|
|
33
|
+
let value = 0;
|
|
34
|
+
for(let index = 0; index < length; index += 1)value = value * 256 + (bytes[at + index] ?? 0);
|
|
35
|
+
return value;
|
|
36
|
+
}
|
|
37
|
+
function littleEndian(bytes, at, length) {
|
|
38
|
+
let value = 0;
|
|
39
|
+
for(let index = length - 1; index >= 0; index -= 1)value = value * 256 + (bytes[at + index] ?? 0);
|
|
40
|
+
return value;
|
|
41
|
+
}
|
|
42
|
+
function pngExtent(bytes) {
|
|
43
|
+
if (bytes.length < 24 || !starts(bytes, PNG_SIGNATURE)) return null;
|
|
44
|
+
if (text(bytes, 12, 4) !== 'IHDR') return null;
|
|
45
|
+
return {
|
|
46
|
+
width: bigEndian(bytes, 16, 4),
|
|
47
|
+
height: bigEndian(bytes, 20, 4)
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
function gifExtent(bytes) {
|
|
51
|
+
if (bytes.length < 10 || text(bytes, 0, 3) !== 'GIF') return null;
|
|
52
|
+
return {
|
|
53
|
+
width: littleEndian(bytes, 6, 2),
|
|
54
|
+
height: littleEndian(bytes, 8, 2)
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
function jpegExtent(bytes) {
|
|
58
|
+
if (bytes.length < 4 || bytes[0] !== 0xff || bytes[1] !== 0xd8) return null;
|
|
59
|
+
let at = 2;
|
|
60
|
+
while(at + 9 < bytes.length){
|
|
61
|
+
if (bytes[at] !== 0xff) return null;
|
|
62
|
+
const marker = bytes[at + 1] ?? 0;
|
|
63
|
+
if (marker === 0xd8 || marker === 0x01 || marker >= 0xd0 && marker <= 0xd7) {
|
|
64
|
+
at += 2;
|
|
65
|
+
continue;
|
|
66
|
+
}
|
|
67
|
+
const length = bigEndian(bytes, at + 2, 2);
|
|
68
|
+
if (marker >= 0xc0 && marker <= 0xcf && !SHAPELESS_JPEG_MARKERS.has(marker)) {
|
|
69
|
+
return {
|
|
70
|
+
width: bigEndian(bytes, at + 7, 2),
|
|
71
|
+
height: bigEndian(bytes, at + 5, 2)
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
if (length < 2) return null;
|
|
75
|
+
at += 2 + length;
|
|
76
|
+
}
|
|
77
|
+
return null;
|
|
78
|
+
}
|
|
79
|
+
function webpExtent(bytes) {
|
|
80
|
+
if (bytes.length < 30 || text(bytes, 0, 4) !== 'RIFF' || text(bytes, 8, 4) !== 'WEBP') return null;
|
|
81
|
+
const chunk = text(bytes, 12, 4);
|
|
82
|
+
if (chunk === 'VP8X') {
|
|
83
|
+
return {
|
|
84
|
+
width: littleEndian(bytes, 24, 3) + 1,
|
|
85
|
+
height: littleEndian(bytes, 27, 3) + 1
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
if (chunk === 'VP8 ' && starts(bytes, WEBP_SYNC, 23)) {
|
|
89
|
+
return {
|
|
90
|
+
width: littleEndian(bytes, 26, 2) & 0x3fff,
|
|
91
|
+
height: littleEndian(bytes, 28, 2) & 0x3fff
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
if (chunk === 'VP8L' && bytes[20] === 0x2f) {
|
|
95
|
+
const packed = littleEndian(bytes, 21, 4);
|
|
96
|
+
return {
|
|
97
|
+
width: (packed & 0x3fff) + 1,
|
|
98
|
+
height: (packed >>> 14 & 0x3fff) + 1
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
return null;
|
|
102
|
+
}
|
|
103
|
+
function spatialExtent(bytes, from, to) {
|
|
104
|
+
let at = from;
|
|
105
|
+
while(at + 8 <= to){
|
|
106
|
+
const size = bigEndian(bytes, at, 4);
|
|
107
|
+
const name = text(bytes, at + 4, 4);
|
|
108
|
+
const end = size === 0 ? to : at + size;
|
|
109
|
+
if (size === 1 || end <= at || end > to) return null;
|
|
110
|
+
if (name === 'ispe') {
|
|
111
|
+
if (end < at + 20) return null;
|
|
112
|
+
return {
|
|
113
|
+
width: bigEndian(bytes, at + 12, 4),
|
|
114
|
+
height: bigEndian(bytes, at + 16, 4)
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
if (BMFF_CONTAINERS.has(name)) {
|
|
118
|
+
const inner = spatialExtent(bytes, at + (name === 'meta' ? 12 : 8), end);
|
|
119
|
+
if (inner !== null) return inner;
|
|
120
|
+
}
|
|
121
|
+
at = end;
|
|
122
|
+
}
|
|
123
|
+
return null;
|
|
124
|
+
}
|
|
125
|
+
function bmffExtent(bytes) {
|
|
126
|
+
if (bytes.length < 16 || text(bytes, 4, 4) !== 'ftyp') return null;
|
|
127
|
+
return spatialExtent(bytes, 0, bytes.length);
|
|
128
|
+
}
|
|
129
|
+
export function extentOf(bytes) {
|
|
130
|
+
return pngExtent(bytes) ?? jpegExtent(bytes) ?? gifExtent(bytes) ?? webpExtent(bytes) ?? bmffExtent(bytes);
|
|
131
|
+
}
|
|
132
|
+
export function hexDigest(digest) {
|
|
133
|
+
return [
|
|
134
|
+
...new Uint8Array(digest)
|
|
135
|
+
].map((value)=>value.toString(16).padStart(2, '0')).join('');
|
|
136
|
+
}
|
|
137
|
+
export async function declaredFile(file) {
|
|
138
|
+
const bytes = new Uint8Array(await file.blob.arrayBuffer());
|
|
139
|
+
const extent = file.blob.type.startsWith('image/') ? extentOf(bytes) : null;
|
|
140
|
+
return {
|
|
141
|
+
name: file.name,
|
|
142
|
+
mediaType: file.blob.type,
|
|
143
|
+
byteLength: bytes.byteLength,
|
|
144
|
+
contentHash: hexDigest(await crypto.subtle.digest('SHA-256', bytes)),
|
|
145
|
+
...extent === null ? {} : extent
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
//# sourceMappingURL=file.js.map
|
package/dist/file.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/workspace/packages/mdruntime/src/file.ts"],"sourcesContent":["export type InstructionFile = {\n name: string;\n blob: Blob;\n};\n\nexport type FileDeclaration = {\n name: string;\n mediaType: string;\n byteLength: number;\n contentHash: string;\n width?: number;\n height?: number;\n};\n\nexport type Extent = { width: number; height: number };\n\nconst PNG_SIGNATURE = [0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a];\nconst WEBP_SYNC = [0x9d, 0x01, 0x2a];\nconst SHAPELESS_JPEG_MARKERS = new Set([0xc4, 0xc8, 0xcc]);\nconst BMFF_CONTAINERS = new Set(['meta', 'iprp', 'ipco']);\n\nfunction starts(bytes: Uint8Array, signature: readonly number[], at = 0): boolean {\n return signature.every((value, index) => bytes[at + index] === value);\n}\n\nfunction text(bytes: Uint8Array, at: number, length: number): string {\n return String.fromCharCode(...bytes.subarray(at, at + length));\n}\n\nfunction bigEndian(bytes: Uint8Array, at: number, length: number): number {\n let value = 0;\n for (let index = 0; index < length; index += 1) value = value * 256 + (bytes[at + index] ?? 0);\n return value;\n}\n\nfunction littleEndian(bytes: Uint8Array, at: number, length: number): number {\n let value = 0;\n for (let index = length - 1; index >= 0; index -= 1)\n value = value * 256 + (bytes[at + index] ?? 0);\n return value;\n}\n\nfunction pngExtent(bytes: Uint8Array): Extent | null {\n if (bytes.length < 24 || !starts(bytes, PNG_SIGNATURE)) return null;\n if (text(bytes, 12, 4) !== 'IHDR') return null;\n return { width: bigEndian(bytes, 16, 4), height: bigEndian(bytes, 20, 4) };\n}\n\nfunction gifExtent(bytes: Uint8Array): Extent | null {\n if (bytes.length < 10 || text(bytes, 0, 3) !== 'GIF') return null;\n return { width: littleEndian(bytes, 6, 2), height: littleEndian(bytes, 8, 2) };\n}\n\nfunction jpegExtent(bytes: Uint8Array): Extent | null {\n if (bytes.length < 4 || bytes[0] !== 0xff || bytes[1] !== 0xd8) return null;\n let at = 2;\n while (at + 9 < bytes.length) {\n if (bytes[at] !== 0xff) return null;\n const marker = bytes[at + 1] ?? 0;\n if (marker === 0xd8 || marker === 0x01 || (marker >= 0xd0 && marker <= 0xd7)) {\n at += 2;\n continue;\n }\n const length = bigEndian(bytes, at + 2, 2);\n if (marker >= 0xc0 && marker <= 0xcf && !SHAPELESS_JPEG_MARKERS.has(marker)) {\n return { width: bigEndian(bytes, at + 7, 2), height: bigEndian(bytes, at + 5, 2) };\n }\n if (length < 2) return null;\n at += 2 + length;\n }\n return null;\n}\n\nfunction webpExtent(bytes: Uint8Array): Extent | null {\n if (bytes.length < 30 || text(bytes, 0, 4) !== 'RIFF' || text(bytes, 8, 4) !== 'WEBP')\n return null;\n const chunk = text(bytes, 12, 4);\n if (chunk === 'VP8X') {\n return {\n width: littleEndian(bytes, 24, 3) + 1,\n height: littleEndian(bytes, 27, 3) + 1,\n };\n }\n if (chunk === 'VP8 ' && starts(bytes, WEBP_SYNC, 23)) {\n return {\n width: littleEndian(bytes, 26, 2) & 0x3fff,\n height: littleEndian(bytes, 28, 2) & 0x3fff,\n };\n }\n if (chunk === 'VP8L' && bytes[20] === 0x2f) {\n const packed = littleEndian(bytes, 21, 4);\n return { width: (packed & 0x3fff) + 1, height: ((packed >>> 14) & 0x3fff) + 1 };\n }\n return null;\n}\n\nfunction spatialExtent(bytes: Uint8Array, from: number, to: number): Extent | null {\n let at = from;\n while (at + 8 <= to) {\n const size = bigEndian(bytes, at, 4);\n const name = text(bytes, at + 4, 4);\n const end = size === 0 ? to : at + size;\n if (size === 1 || end <= at || end > to) return null;\n if (name === 'ispe') {\n if (end < at + 20) return null;\n return { width: bigEndian(bytes, at + 12, 4), height: bigEndian(bytes, at + 16, 4) };\n }\n if (BMFF_CONTAINERS.has(name)) {\n const inner = spatialExtent(bytes, at + (name === 'meta' ? 12 : 8), end);\n if (inner !== null) return inner;\n }\n at = end;\n }\n return null;\n}\n\nfunction bmffExtent(bytes: Uint8Array): Extent | null {\n if (bytes.length < 16 || text(bytes, 4, 4) !== 'ftyp') return null;\n return spatialExtent(bytes, 0, bytes.length);\n}\n\nexport function extentOf(bytes: Uint8Array): Extent | null {\n return (\n pngExtent(bytes) ??\n jpegExtent(bytes) ??\n gifExtent(bytes) ??\n webpExtent(bytes) ??\n bmffExtent(bytes)\n );\n}\n\nexport function hexDigest(digest: ArrayBuffer): string {\n return [...new Uint8Array(digest)].map((value) => value.toString(16).padStart(2, '0')).join('');\n}\n\nexport async function declaredFile(file: InstructionFile): Promise<FileDeclaration> {\n const bytes = new Uint8Array(await file.blob.arrayBuffer());\n const extent = file.blob.type.startsWith('image/') ? extentOf(bytes) : null;\n return {\n name: file.name,\n mediaType: file.blob.type,\n byteLength: bytes.byteLength,\n contentHash: hexDigest(await crypto.subtle.digest('SHA-256', bytes)),\n ...(extent === null ? {} : extent),\n };\n}\n"],"names":["PNG_SIGNATURE","WEBP_SYNC","SHAPELESS_JPEG_MARKERS","Set","BMFF_CONTAINERS","starts","bytes","signature","at","every","value","index","text","length","String","fromCharCode","subarray","bigEndian","littleEndian","pngExtent","width","height","gifExtent","jpegExtent","marker","has","webpExtent","chunk","packed","spatialExtent","from","to","size","name","end","inner","bmffExtent","extentOf","hexDigest","digest","Uint8Array","map","toString","padStart","join","declaredFile","file","blob","arrayBuffer","extent","type","startsWith","mediaType","byteLength","contentHash","crypto","subtle"],"mappings":"AAgBA,MAAMA,gBAAgB;IAAC;IAAM;IAAM;IAAM;IAAM;IAAM;IAAM;IAAM;CAAK;AACtE,MAAMC,YAAY;IAAC;IAAM;IAAM;CAAK;AACpC,MAAMC,yBAAyB,IAAIC,IAAI;IAAC;IAAM;IAAM;CAAK;AACzD,MAAMC,kBAAkB,IAAID,IAAI;IAAC;IAAQ;IAAQ;CAAO;AAExD,SAASE,OAAOC,KAAiB,EAAEC,SAA4B,EAAEC,KAAK,CAAC;IACrE,OAAOD,UAAUE,KAAK,CAAC,CAACC,OAAOC,QAAUL,KAAK,CAACE,KAAKG,MAAM,KAAKD;AACjE;AAEA,SAASE,KAAKN,KAAiB,EAAEE,EAAU,EAAEK,MAAc;IACzD,OAAOC,OAAOC,YAAY,IAAIT,MAAMU,QAAQ,CAACR,IAAIA,KAAKK;AACxD;AAEA,SAASI,UAAUX,KAAiB,EAAEE,EAAU,EAAEK,MAAc;IAC9D,IAAIH,QAAQ;IACZ,IAAK,IAAIC,QAAQ,GAAGA,QAAQE,QAAQF,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MAAM,CAAC,WAAWjC;QAC7D,GAAI2C,WAAW,OAAO,CAAC,IAAIA,MAAM;IACnC;AACF"}
|
package/dist/host.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type MdRuntimeOptions } from './connection.js';
|
|
2
|
+
import { type RuntimePort } from './wire.js';
|
|
3
|
+
export type MdRuntimeHost = {
|
|
4
|
+
attach(port: RuntimePort, app: string): () => void;
|
|
5
|
+
endAuthorization(): Promise<void>;
|
|
6
|
+
};
|
|
7
|
+
export declare function serveMdRuntime(options: MdRuntimeOptions): MdRuntimeHost;
|
|
8
|
+
export type { RuntimePort } from './wire.js';
|
|
9
|
+
//# sourceMappingURL=host.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../src/host.ts"],"names":[],"mappings":"AAEA,OAAO,EAIL,KAAK,gBAAgB,EACtB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAML,KAAK,WAAW,EAKjB,MAAM,WAAW,CAAC;AAEnB,MAAM,MAAM,aAAa,GAAG;IAC1B,MAAM,CAAC,IAAI,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,IAAI,CAAC;IACnD,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACnC,CAAC;AA2GF,wBAAgB,cAAc,CAAC,OAAO,EAAE,gBAAgB,GAAG,aAAa,CAuFvE;AAED,YAAY,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC"}
|
package/dist/host.js
ADDED
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import { createMdRuntime } from './connection.js';
|
|
2
|
+
import { removeRuntimeStore } from './store.js';
|
|
3
|
+
import { AUTHORIZATION_ENDED, carried, envelope, PROTOCOL_MISMATCH, request } from './wire.js';
|
|
4
|
+
function answered(md, app, member, input) {
|
|
5
|
+
switch(member){
|
|
6
|
+
case 'rooms':
|
|
7
|
+
return md.rooms();
|
|
8
|
+
case 'query':
|
|
9
|
+
return md.query(input[0]);
|
|
10
|
+
case 'types':
|
|
11
|
+
return md.types(input[0]);
|
|
12
|
+
case 'syncStatus':
|
|
13
|
+
return md.syncStatus();
|
|
14
|
+
case 'save':
|
|
15
|
+
return md.save(input[0], input[1], input[2]);
|
|
16
|
+
case 'outcome':
|
|
17
|
+
return md.outcome(input[0]);
|
|
18
|
+
case 'history':
|
|
19
|
+
return md.history(input[0], input[1], input[2]);
|
|
20
|
+
case 'call':
|
|
21
|
+
return md.call(input[0], input[1]);
|
|
22
|
+
case 'log':
|
|
23
|
+
return md.log();
|
|
24
|
+
case 'storageLoss':
|
|
25
|
+
return md.storageLoss();
|
|
26
|
+
case 'persistence':
|
|
27
|
+
return md.persistence();
|
|
28
|
+
case 'reauthorize':
|
|
29
|
+
return md.reauthorize();
|
|
30
|
+
case 'draft.list':
|
|
31
|
+
return md.draft.list();
|
|
32
|
+
case 'draft.read':
|
|
33
|
+
return md.draft.read(input[0], input[1]);
|
|
34
|
+
case 'draft.replace':
|
|
35
|
+
return md.draft.replace(input[0], input[1], input[2]);
|
|
36
|
+
case 'draft.discard':
|
|
37
|
+
return md.draft.discard(input[0], input[1]);
|
|
38
|
+
case 'queue.discard':
|
|
39
|
+
return md.queue.discard(input[0], input[1]);
|
|
40
|
+
case 'presentation.read':
|
|
41
|
+
return md.presentation.read(app);
|
|
42
|
+
case 'presentation.write':
|
|
43
|
+
return md.presentation.write(app, input[0]);
|
|
44
|
+
case 'conversation.list':
|
|
45
|
+
return md.conversation.list();
|
|
46
|
+
case 'conversation.read':
|
|
47
|
+
return md.conversation.read(input[0]);
|
|
48
|
+
case 'conversation.older':
|
|
49
|
+
return md.conversation.older(input[0]);
|
|
50
|
+
case 'conversation.compose':
|
|
51
|
+
return md.conversation.compose(input[0], input[1]);
|
|
52
|
+
case 'conversation.discard':
|
|
53
|
+
return md.conversation.discard(input[0]);
|
|
54
|
+
case 'conversation.create':
|
|
55
|
+
return md.conversation.create(input[0]);
|
|
56
|
+
case 'conversation.send':
|
|
57
|
+
return md.conversation.send(input[0]);
|
|
58
|
+
case 'conversation.answer':
|
|
59
|
+
return md.conversation.answer(input[0], input[1]);
|
|
60
|
+
case 'conversation.interrupt':
|
|
61
|
+
return md.conversation.interrupt(input[0]);
|
|
62
|
+
case 'conversation.kill':
|
|
63
|
+
return md.conversation.kill(input[0]);
|
|
64
|
+
case 'conversation.cancel':
|
|
65
|
+
return md.conversation.cancel(input[0], input[1]);
|
|
66
|
+
case 'conversation.delete':
|
|
67
|
+
return md.conversation.delete(input[0]);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
function subscribed(md, app, topic, input, deliver) {
|
|
71
|
+
switch(topic){
|
|
72
|
+
case 'rooms':
|
|
73
|
+
return md.observe('rooms', deliver);
|
|
74
|
+
case 'connection-refusal':
|
|
75
|
+
return md.observe('connection-refusal', deliver);
|
|
76
|
+
case 'storage-loss':
|
|
77
|
+
return md.observe('storage-loss', deliver);
|
|
78
|
+
case 'sync-status':
|
|
79
|
+
return md.observe('sync-status', deliver);
|
|
80
|
+
case 'drafts':
|
|
81
|
+
return md.observe('drafts', deliver);
|
|
82
|
+
case 'queue':
|
|
83
|
+
return md.observe('queue', input[0], deliver);
|
|
84
|
+
case 'query':
|
|
85
|
+
return md.observe('query', input[0], deliver);
|
|
86
|
+
case 'presentation':
|
|
87
|
+
return md.observe('presentation', app, deliver);
|
|
88
|
+
case 'conversation':
|
|
89
|
+
return md.observe('conversation', input[0], deliver);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
export function serveMdRuntime(options) {
|
|
93
|
+
const stopping = new AbortController();
|
|
94
|
+
const stop = ()=>{
|
|
95
|
+
stopping.abort();
|
|
96
|
+
};
|
|
97
|
+
options.signal?.addEventListener('abort', stop, {
|
|
98
|
+
once: true
|
|
99
|
+
});
|
|
100
|
+
if (options.signal?.aborted === true) stop();
|
|
101
|
+
const md = createMdRuntime({
|
|
102
|
+
...options,
|
|
103
|
+
signal: stopping.signal
|
|
104
|
+
});
|
|
105
|
+
const attachments = new Map();
|
|
106
|
+
let authorized = true;
|
|
107
|
+
function attach(port, app) {
|
|
108
|
+
if (!authorized) throw new Error(AUTHORIZATION_ENDED);
|
|
109
|
+
const subscriptions = new Map();
|
|
110
|
+
let serving = true;
|
|
111
|
+
const send = (message)=>{
|
|
112
|
+
port.postMessage(envelope(message));
|
|
113
|
+
};
|
|
114
|
+
const detach = ()=>{
|
|
115
|
+
if (!serving) return;
|
|
116
|
+
serving = false;
|
|
117
|
+
for (const end of subscriptions.values())end();
|
|
118
|
+
subscriptions.clear();
|
|
119
|
+
attachments.delete(detach);
|
|
120
|
+
};
|
|
121
|
+
const serve = async (message)=>{
|
|
122
|
+
if (message.kind === 'hello') return;
|
|
123
|
+
if (message.kind === 'stop') {
|
|
124
|
+
subscriptions.get(message.id)?.();
|
|
125
|
+
subscriptions.delete(message.id);
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
try {
|
|
129
|
+
if (message.kind === 'observe') {
|
|
130
|
+
subscriptions.set(message.id, subscribed(md, app, message.topic, message.input, (value)=>{
|
|
131
|
+
if (serving) send({
|
|
132
|
+
kind: 'event',
|
|
133
|
+
id: message.id,
|
|
134
|
+
value
|
|
135
|
+
});
|
|
136
|
+
}));
|
|
137
|
+
if (serving) send({
|
|
138
|
+
kind: 'result',
|
|
139
|
+
id: message.id,
|
|
140
|
+
value: null
|
|
141
|
+
});
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
const value = await answered(md, app, message.member, message.input);
|
|
145
|
+
if (serving) send({
|
|
146
|
+
kind: 'result',
|
|
147
|
+
id: message.id,
|
|
148
|
+
value
|
|
149
|
+
});
|
|
150
|
+
} catch (error) {
|
|
151
|
+
if (serving) {
|
|
152
|
+
send({
|
|
153
|
+
kind: 'failure',
|
|
154
|
+
id: message.id,
|
|
155
|
+
message: error instanceof Error ? error.message : String(error)
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
port.addEventListener('message', (event)=>{
|
|
161
|
+
if (!serving) return;
|
|
162
|
+
const wire = carried(event.data);
|
|
163
|
+
if (wire === null) return;
|
|
164
|
+
if (!wire.matching) {
|
|
165
|
+
send({
|
|
166
|
+
kind: 'refusal',
|
|
167
|
+
refusal: PROTOCOL_MISMATCH
|
|
168
|
+
});
|
|
169
|
+
detach();
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
const message = request(wire.message);
|
|
173
|
+
if (message === null) return;
|
|
174
|
+
void serve(message);
|
|
175
|
+
});
|
|
176
|
+
port.addEventListener('close', detach);
|
|
177
|
+
port.start();
|
|
178
|
+
attachments.set(detach, send);
|
|
179
|
+
return detach;
|
|
180
|
+
}
|
|
181
|
+
return {
|
|
182
|
+
attach,
|
|
183
|
+
async endAuthorization () {
|
|
184
|
+
authorized = false;
|
|
185
|
+
for (const [detach, send] of [
|
|
186
|
+
...attachments
|
|
187
|
+
]){
|
|
188
|
+
send({
|
|
189
|
+
kind: 'ended'
|
|
190
|
+
});
|
|
191
|
+
detach();
|
|
192
|
+
}
|
|
193
|
+
stop();
|
|
194
|
+
await removeRuntimeStore();
|
|
195
|
+
await options.shell.dropGeneration();
|
|
196
|
+
}
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
//# sourceMappingURL=host.js.map
|
package/dist/host.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/workspace/packages/mdruntime/src/host.ts"],"sourcesContent":["import type { QueryOptions } from '@agentshouse/query';\nimport type { Change } from './change.js';\nimport {\n createMdRuntime,\n type HistoryQuery,\n type MdRuntime,\n type MdRuntimeOptions,\n} from './connection.js';\nimport type { UnsentInstruction } from './conversation.js';\nimport { removeRuntimeStore } from './store.js';\nimport {\n AUTHORIZATION_ENDED,\n carried,\n envelope,\n PROTOCOL_MISMATCH,\n request,\n type RuntimePort,\n type WireAnswer,\n type WireMember,\n type WireRequest,\n type WireTopic,\n} from './wire.js';\n\nexport type MdRuntimeHost = {\n attach(port: RuntimePort, app: string): () => void;\n endAuthorization(): Promise<void>;\n};\n\nfunction answered(\n md: MdRuntime,\n app: string,\n member: WireMember,\n input: readonly unknown[],\n): unknown {\n switch (member) {\n case 'rooms':\n return md.rooms();\n case 'query':\n return md.query(input[0] as QueryOptions | undefined);\n case 'types':\n return md.types(input[0] as string);\n case 'syncStatus':\n return md.syncStatus();\n case 'save':\n return md.save(\n input[0] as string,\n input[1] as readonly Change[],\n input[2] as string | undefined,\n );\n case 'outcome':\n return md.outcome(input[0] as string);\n case 'history':\n return md.history(input[0] as string, input[1] as string, input[2] as HistoryQuery);\n case 'call':\n return md.call(input[0] as string, input[1]);\n case 'log':\n return md.log();\n case 'storageLoss':\n return md.storageLoss();\n case 'persistence':\n return md.persistence();\n case 'reauthorize':\n return md.reauthorize();\n case 'draft.list':\n return md.draft.list();\n case 'draft.read':\n return md.draft.read(input[0] as string, input[1] as string);\n case 'draft.replace':\n return md.draft.replace(input[0] as string, input[1] as string, input[2]);\n case 'draft.discard':\n return md.draft.discard(input[0] as string, input[1] as string);\n case 'queue.discard':\n return md.queue.discard(input[0] as string, input[1] as string);\n case 'presentation.read':\n return md.presentation.read(app);\n case 'presentation.write':\n return md.presentation.write(app, input[0]);\n case 'conversation.list':\n return md.conversation.list();\n case 'conversation.read':\n return md.conversation.read(input[0] as string);\n case 'conversation.older':\n return md.conversation.older(input[0] as string);\n case 'conversation.compose':\n return md.conversation.compose(input[0] as string, input[1] as UnsentInstruction);\n case 'conversation.discard':\n return md.conversation.discard(input[0] as string);\n case 'conversation.create':\n return md.conversation.create(input[0]);\n case 'conversation.send':\n return md.conversation.send(input[0] as string);\n case 'conversation.answer':\n return md.conversation.answer(input[0] as string, input[1]);\n case 'conversation.interrupt':\n return md.conversation.interrupt(input[0] as string);\n case 'conversation.kill':\n return md.conversation.kill(input[0] as string);\n case 'conversation.cancel':\n return md.conversation.cancel(input[0] as string, input[1] as string);\n case 'conversation.delete':\n return md.conversation.delete(input[0] as string);\n }\n}\n\nfunction subscribed(\n md: MdRuntime,\n app: string,\n topic: WireTopic,\n input: readonly unknown[],\n deliver: (value: unknown) => void,\n): () => void {\n switch (topic) {\n case 'rooms':\n return md.observe('rooms', deliver);\n case 'connection-refusal':\n return md.observe('connection-refusal', deliver);\n case 'storage-loss':\n return md.observe('storage-loss', deliver);\n case 'sync-status':\n return md.observe('sync-status', deliver);\n case 'drafts':\n return md.observe('drafts', deliver);\n case 'queue':\n return md.observe('queue', input[0] as string, deliver);\n case 'query':\n return md.observe('query', input[0] as QueryOptions, deliver);\n case 'presentation':\n return md.observe('presentation', app, deliver);\n case 'conversation':\n return md.observe('conversation', input[0] as string, deliver);\n }\n}\n\nexport function serveMdRuntime(options: MdRuntimeOptions): MdRuntimeHost {\n const stopping = new AbortController();\n const stop = () => {\n stopping.abort();\n };\n options.signal?.addEventListener('abort', stop, { once: true });\n if (options.signal?.aborted === true) stop();\n const md = createMdRuntime({ ...options, signal: stopping.signal });\n const attachments = new Map<() => void, (message: WireAnswer) => void>();\n let authorized = true;\n\n function attach(port: RuntimePort, app: string): () => void {\n if (!authorized) throw new Error(AUTHORIZATION_ENDED);\n const subscriptions = new Map<number, () => void>();\n let serving = true;\n const send = (message: WireAnswer) => {\n port.postMessage(envelope(message));\n };\n const detach = () => {\n if (!serving) return;\n serving = false;\n for (const end of subscriptions.values()) end();\n subscriptions.clear();\n attachments.delete(detach);\n };\n const serve = async (message: WireRequest) => {\n if (message.kind === 'hello') return;\n if (message.kind === 'stop') {\n subscriptions.get(message.id)?.();\n subscriptions.delete(message.id);\n return;\n }\n try {\n if (message.kind === 'observe') {\n subscriptions.set(\n message.id,\n subscribed(md, app, message.topic, message.input, (value) => {\n if (serving) send({ kind: 'event', id: message.id, value });\n }),\n );\n if (serving) send({ kind: 'result', id: message.id, value: null });\n return;\n }\n const value = await answered(md, app, message.member, message.input);\n if (serving) send({ kind: 'result', id: message.id, value });\n } catch (error) {\n if (serving) {\n send({\n kind: 'failure',\n id: message.id,\n message: error instanceof Error ? error.message : String(error),\n });\n }\n }\n };\n port.addEventListener('message', (event) => {\n if (!serving) return;\n const wire = carried(event.data);\n if (wire === null) return;\n if (!wire.matching) {\n send({ kind: 'refusal', refusal: PROTOCOL_MISMATCH });\n detach();\n return;\n }\n const message = request(wire.message);\n if (message === null) return;\n void serve(message);\n });\n port.addEventListener('close', detach);\n port.start();\n attachments.set(detach, send);\n return detach;\n }\n\n return {\n attach,\n async endAuthorization() {\n authorized = false;\n for (const [detach, send] of [...attachments]) {\n send({ kind: 'ended' });\n detach();\n }\n stop();\n await removeRuntimeStore();\n await options.shell.dropGeneration();\n },\n };\n}\n\nexport type { RuntimePort } from './wire.js';\n"],"names":["createMdRuntime","removeRuntimeStore","AUTHORIZATION_ENDED","carried","envelope","PROTOCOL_MISMATCH","request","answered","md","app","member","input","rooms","query","types","syncStatus","save","outcome","history","call","log","storageLoss","persistence","reauthorize","draft","list","read","replace","discard","queue","presentation","write","conversation","older","compose","create","send","answer","interrupt","kill","cancel","delete","subscribed","topic","deliver","observe","serveMdRuntime","options","stopping","AbortController","stop","abort","signal","addEventListener","once","aborted","attachments","Map","authorized","attach","port","Error","subscriptions","serving","message","postMessage","detach","end","values","clear","serve","kind","get","id","set","value","error","String","event","wire","data","matching","refusal","start","endAuthorization","shell","dropGeneration"],"mappings":"AAEA,SACEA,eAAe,QAIV,kBAAkB;AAEzB,SAASC,kBAAkB,QAAQ,aAAa;AAChD,SACEC,mBAAmB,EACnBC,OAAO,EACPC,QAAQ,EACRC,iBAAiB,EACjBC,OAAO,QAMF,YAAY;AAOnB,SAASC,SACPC,EAAa,EACbC,GAAW,EACXC,MAAkB,EAClBC,KAAyB;IAEzB,OAAQD;QACN,KAAK;YACH,OAAOF,GAAGI,KAAK;QACjB,KAAK;YACH,OAAOJ,GAAGK,KAAK,CAACF,KAAK,CAAC,EAAE;QAC1B,KAAK;YACH,OAAOH,GA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C,SAASa;QAC/BN,KAAKuB,KAAK;QACV3B,YAAYkB,GAAG,CAACR,QAAQ9B;QACxB,OAAO8B;IACT;IAEA,OAAO;QACLP;QACA,MAAMyB;YACJ1B,aAAa;YACb,KAAK,MAAM,CAACQ,QAAQ9B,KAAK,IAAI;mBAAIoB;aAAY,CAAE;gBAC7CpB,KAAK;oBAAEmC,MAAM;gBAAQ;gBACrBL;YACF;YACAhB;YACA,MAAMjD;YACN,MAAM8C,QAAQsC,KAAK,CAACC,cAAc;QACpC;IACF;AACF"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
export type { ActionDeclaration, ActionRequest, ActionResult, Adapter, AdapterFailure, Authorization, BootstrapPage, BootstrapRequest, BootstrapResult, Capability, DiscoverResult, DiscoveredRoom, Discovery, HistoryRequest, HistoryResult, HistoryRetention, HistoryRevision, MdModelIdentity, MutationRequest, MutationResult, PageToken, ProviderLimit, RefreshPage, RefreshRequest, RefreshResult, Retention, RevokedAuthorization, RoomNotReadable, TransportUncertainty, } from './adapter.js';
|
|
1
|
+
export type { ActionDeclaration, ActionRequest, ActionResult, Adapter, AdapterFailure, Authorization, BootstrapPage, BootstrapRequest, BootstrapResult, Capability, ContractUnavailable, ConversationAction, ConversationCards, ConversationEvent, ConversationMessage, DiscoverResult, DiscoveredRoom, Discovery, HistoryRequest, HistoryResult, HistoryRetention, HistoryRevision, MdModelIdentity, ModelRequest, MutationRequest, MutationResult, PageToken, ProviderLimit, ProviderRefusal, RefreshPage, RefreshRequest, RefreshResult, Retention, RetryableRefusal, RevokedAuthorization, RoomNotReadable, RoomVersionNotification, SelectedRooms, TransportUncertainty, TypedSelection, ViewedConversations, } from './adapter.js';
|
|
2
2
|
export type { Change, ChangeBatch, Precondition } from './change.js';
|
|
3
|
+
export type { ConversationEntry, ConversationSurface, ConversationView, GrowingText, UnsentInstruction, } from './conversation.js';
|
|
4
|
+
export type { FileDeclaration, InstructionFile } from './file.js';
|
|
3
5
|
export type { MdType } from './collection.js';
|
|
4
|
-
export type { AppRoom,
|
|
5
|
-
export type { AcceptedOutcome, AffectedState, QueueEntry, QueueOutcome, SubmissionOutcome, } from './outcome.js';
|
|
6
|
+
export type { AppRoom, AppTypedSelection, ConnectionRefusal, ConnectionRefusalReason, DraftEntry, DraftSurface, HistoryQuery, MdRuntime, MdRuntimeOptions, PresentationSurface, QueueSurface, RoomTypes, SaveResult, } from './connection.js';
|
|
7
|
+
export type { AcceptedOutcome, AffectedState, CallResult, QueueEntry, QueueOutcome, SubmissionOutcome, } from './outcome.js';
|
|
6
8
|
export type { SaveRefusal } from './save.js';
|
|
7
9
|
export { createMdRuntime } from './connection.js';
|
|
8
|
-
export type {
|
|
10
|
+
export type { RuntimeShell } from './durability.js';
|
|
11
|
+
export type { AttentionEntry, SyncStatus } from './status.js';
|
|
9
12
|
export type { Backlink, QueryDocument, QueryGroup, QueryOptions, QueryResult, Selector, } from '@agentshouse/query';
|
|
10
13
|
export type { AttachedModelBinding, ModelIdentity, ModelSnapshot, ModelState, ModelResult, ModelValidation, TypesResult, ValidationReceipt, } from './model.js';
|
|
11
14
|
export type { OperationScopes, ReplicaAdmission, ScopedRefusal } from './adapter.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,OAAO,EACP,cAAc,EACd,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,UAAU,EACV,cAAc,EACd,cAAc,EACd,SAAS,EACT,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,eAAe,EACf,cAAc,EACd,SAAS,EACT,aAAa,EACb,WAAW,EACX,cAAc,EACd,aAAa,EACb,SAAS,EACT,oBAAoB,EACpB,eAAe,EACf,oBAAoB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,OAAO,EACP,cAAc,EACd,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,UAAU,EACV,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,SAAS,EACT,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,YAAY,EACZ,eAAe,EACf,cAAc,EACd,SAAS,EACT,aAAa,EACb,eAAe,EACf,WAAW,EACX,cAAc,EACd,aAAa,EACb,SAAS,EACT,gBAAgB,EAChB,oBAAoB,EACpB,eAAe,EACf,uBAAuB,EACvB,aAAa,EACb,oBAAoB,EACpB,cAAc,EACd,mBAAmB,GACpB,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACrE,YAAY,EACV,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAChB,WAAW,EACX,iBAAiB,GAClB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAClE,YAAY,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC9C,YAAY,EACV,OAAO,EACP,iBAAiB,EACjB,iBAAiB,EACjB,uBAAuB,EACvB,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,gBAAgB,EAChB,mBAAmB,EACnB,YAAY,EACZ,SAAS,EACT,UAAU,GACX,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,eAAe,EACf,aAAa,EACb,UAAU,EACV,UAAU,EACV,YAAY,EACZ,iBAAiB,GAClB,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,YAAY,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9D,YAAY,EACV,QAAQ,EACR,aAAa,EACb,UAAU,EACV,YAAY,EACZ,WAAW,EACX,QAAQ,GACT,MAAM,oBAAoB,CAAC;AAE5B,YAAY,EACV,oBAAoB,EACpB,aAAa,EACb,aAAa,EACb,UAAU,EACV,WAAW,EACX,eAAe,EACf,WAAW,EACX,iBAAiB,GAClB,MAAM,YAAY,CAAC;AACpB,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACrF,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/workspace/packages/mdruntime/src/index.ts"],"sourcesContent":["export type {\n ActionDeclaration,\n ActionRequest,\n ActionResult,\n Adapter,\n AdapterFailure,\n Authorization,\n BootstrapPage,\n BootstrapRequest,\n BootstrapResult,\n Capability,\n DiscoverResult,\n DiscoveredRoom,\n Discovery,\n HistoryRequest,\n HistoryResult,\n HistoryRetention,\n HistoryRevision,\n MdModelIdentity,\n MutationRequest,\n MutationResult,\n PageToken,\n ProviderLimit,\n RefreshPage,\n RefreshRequest,\n RefreshResult,\n Retention,\n RevokedAuthorization,\n RoomNotReadable,\n TransportUncertainty,\n} from './adapter.js';\nexport type { Change, ChangeBatch, Precondition } from './change.js';\nexport type { MdType } from './collection.js';\nexport type {\n AppRoom,\n
|
|
1
|
+
{"version":3,"sources":["/workspace/packages/mdruntime/src/index.ts"],"sourcesContent":["export type {\n ActionDeclaration,\n ActionRequest,\n ActionResult,\n Adapter,\n AdapterFailure,\n Authorization,\n BootstrapPage,\n BootstrapRequest,\n BootstrapResult,\n Capability,\n ContractUnavailable,\n ConversationAction,\n ConversationCards,\n ConversationEvent,\n ConversationMessage,\n DiscoverResult,\n DiscoveredRoom,\n Discovery,\n HistoryRequest,\n HistoryResult,\n HistoryRetention,\n HistoryRevision,\n MdModelIdentity,\n ModelRequest,\n MutationRequest,\n MutationResult,\n PageToken,\n ProviderLimit,\n ProviderRefusal,\n RefreshPage,\n RefreshRequest,\n RefreshResult,\n Retention,\n RetryableRefusal,\n RevokedAuthorization,\n RoomNotReadable,\n RoomVersionNotification,\n SelectedRooms,\n TransportUncertainty,\n TypedSelection,\n ViewedConversations,\n} from './adapter.js';\nexport type { Change, ChangeBatch, Precondition } from './change.js';\nexport type {\n ConversationEntry,\n ConversationSurface,\n ConversationView,\n GrowingText,\n UnsentInstruction,\n} from './conversation.js';\nexport type { FileDeclaration, InstructionFile } from './file.js';\nexport type { MdType } from './collection.js';\nexport type {\n AppRoom,\n AppTypedSelection,\n ConnectionRefusal,\n ConnectionRefusalReason,\n DraftEntry,\n DraftSurface,\n HistoryQuery,\n MdRuntime,\n MdRuntimeOptions,\n PresentationSurface,\n QueueSurface,\n RoomTypes,\n SaveResult,\n} from './connection.js';\nexport type {\n AcceptedOutcome,\n AffectedState,\n CallResult,\n QueueEntry,\n QueueOutcome,\n SubmissionOutcome,\n} from './outcome.js';\nexport type { SaveRefusal } from './save.js';\nexport { createMdRuntime } from './connection.js';\nexport type { RuntimeShell } from './durability.js';\nexport type { AttentionEntry, SyncStatus } from './status.js';\nexport type {\n Backlink,\n QueryDocument,\n QueryGroup,\n QueryOptions,\n QueryResult,\n Selector,\n} from '@agentshouse/query';\n\nexport type {\n AttachedModelBinding,\n ModelIdentity,\n ModelSnapshot,\n ModelState,\n ModelResult,\n ModelValidation,\n TypesResult,\n ValidationReceipt,\n} from './model.js';\nexport type { OperationScopes, ReplicaAdmission, ScopedRefusal } from './adapter.js';\nexport type { QueryBinding, QueryInput } from './query.js';\n"],"names":["createMdRuntime"],"mappings":"AA6EA,SAASA,eAAe,QAAQ,kBAAkB"}
|
package/dist/memory.d.ts
CHANGED
|
@@ -1,24 +1,36 @@
|
|
|
1
1
|
import type { ModelResult } from './model.js';
|
|
2
|
-
import { type Adapter, type Capability, type DiscoveredRoom, type MdModelIdentity, type ProviderLimit, type Retention } from './adapter.js';
|
|
2
|
+
import { type ActionResult, type Adapter, type Capability, type ConversationAction, type ConversationEvent, type ConversationMessage, type DiscoveredRoom, type MdModelIdentity, type ProviderLimit, type Retention, type RoomVersionNotification } from './adapter.js';
|
|
3
3
|
export type MemoryRoom = DiscoveredRoom & {
|
|
4
4
|
model?: ModelResult;
|
|
5
|
+
selectionModel?: ModelResult;
|
|
5
6
|
documents?: Readonly<Record<string, string>>;
|
|
6
7
|
revisions?: Readonly<Record<string, string>>;
|
|
7
8
|
binaryTargets?: readonly string[];
|
|
8
9
|
};
|
|
10
|
+
export type MemoryConversation = {
|
|
11
|
+
conversation: string;
|
|
12
|
+
messages?: readonly ConversationMessage[];
|
|
13
|
+
outcomes?: Partial<Record<ConversationAction, ActionResult>>;
|
|
14
|
+
};
|
|
9
15
|
export type MemoryAdapterOptions = {
|
|
10
16
|
rooms?: readonly MemoryRoom[];
|
|
17
|
+
conversations?: readonly MemoryConversation[];
|
|
18
|
+
historyPageSize?: number;
|
|
11
19
|
pageSize?: number;
|
|
12
20
|
mdModel?: MdModelIdentity;
|
|
13
21
|
supportedVersions?: readonly number[];
|
|
14
22
|
capabilities?: readonly Capability[];
|
|
15
23
|
providerLimits?: readonly ProviderLimit[];
|
|
16
24
|
retention?: Retention;
|
|
17
|
-
origins?: readonly string[];
|
|
18
25
|
};
|
|
19
26
|
export type MemoryAdapter = Adapter & {
|
|
20
27
|
setRooms(rooms: readonly MemoryRoom[]): void;
|
|
28
|
+
setConversations(conversations: readonly MemoryConversation[]): void;
|
|
21
29
|
script(operation: keyof Adapter, answer: unknown): void;
|
|
30
|
+
notifyRoomVersion(notification: RoomVersionNotification): void;
|
|
31
|
+
notifyConversation(event: ConversationEvent): void;
|
|
32
|
+
selectedRooms(): readonly string[];
|
|
33
|
+
viewedConversations(): readonly string[];
|
|
22
34
|
};
|
|
23
35
|
export declare function createMemoryAdapter(options?: MemoryAdapterOptions): MemoryAdapter;
|
|
24
36
|
//# sourceMappingURL=memory.d.ts.map
|
package/dist/memory.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../src/memory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,
|
|
1
|
+
{"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../src/memory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAGL,KAAK,YAAY,EACjB,KAAK,OAAO,EAIZ,KAAK,UAAU,EACf,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EAExB,KAAK,cAAc,EAGnB,KAAK,eAAe,EAGpB,KAAK,aAAa,EAGlB,KAAK,SAAS,EACd,KAAK,uBAAuB,EAC7B,MAAM,cAAc,CAAC;AAkBtB,MAAM,MAAM,UAAU,GAAG,cAAc,GAAG;IACxC,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,cAAc,CAAC,EAAE,WAAW,CAAC;IAC7B,SAAS,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC7C,SAAS,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC7C,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACnC,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,SAAS,mBAAmB,EAAE,CAAC;IAC1C,QAAQ,CAAC,EAAE,OAAO,CA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