@agentshouse/mdruntime-adapter 0.1.0-cca5d676bc88e → 0.1.0-cd59fd8945dcb
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/AGENTS.md +88 -29
- package/dist/actions.d.ts +40 -2
- package/dist/actions.d.ts.map +1 -1
- package/dist/actions.js +104 -122
- package/dist/adapter.d.ts.map +1 -1
- package/dist/adapter.js +77 -52
- package/dist/discovery.d.ts +3 -4
- package/dist/discovery.d.ts.map +1 -1
- package/dist/discovery.js +22 -12
- package/dist/gather.d.ts +1 -0
- package/dist/gather.d.ts.map +1 -1
- package/dist/gather.js +11 -6
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/model.d.ts +1 -0
- package/dist/model.d.ts.map +1 -1
- package/dist/model.js +23 -6
- package/dist/read.d.ts +6 -1
- package/dist/read.d.ts.map +1 -1
- package/dist/read.js +17 -34
- package/dist/refusal.d.ts +5 -9
- package/dist/refusal.d.ts.map +1 -1
- package/dist/refusal.js +30 -17
- package/dist/site.d.ts.map +1 -1
- package/dist/site.js +17 -9
- package/dist/stream.d.ts +1 -0
- package/dist/stream.d.ts.map +1 -1
- package/dist/stream.js +5 -0
- package/dist/transport.d.ts +3 -6
- package/dist/transport.d.ts.map +1 -1
- package/dist/transport.js +0 -1
- package/dist/write.d.ts +1 -0
- package/dist/write.d.ts.map +1 -1
- package/dist/write.js +39 -15
- package/package.json +4 -4
package/dist/refusal.d.ts
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import type { AdapterFailure, DiscoverResult, ProviderRefusal, ScopedRefusal } from '@agentshouse/mdruntime';
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export declare function
|
|
6
|
-
export declare function scopedRefusal(locator: string, scope: ScopedRefusal['scope'], refusal: DoorRefusal): ScopedRefusal;
|
|
7
|
-
export declare function classifyDoor(status: number, body: unknown, locator: string): AdapterFailure | {
|
|
2
|
+
export declare function doorRefusal(body: unknown): ProviderRefusal | null;
|
|
3
|
+
export declare function scopedRefusal(locator: string, scope: ScopedRefusal['scope'], refusal: ProviderRefusal): ScopedRefusal;
|
|
4
|
+
export declare function classifyDoor(status: number, body: unknown, locator: string): AdapterFailure | null;
|
|
5
|
+
export declare function classifyRead(status: number, body: unknown, locator: string): AdapterFailure | {
|
|
8
6
|
kind: 'beyond-horizon';
|
|
9
7
|
} | null;
|
|
10
|
-
export declare function discoveryFailure(
|
|
11
|
-
kind: 'beyond-horizon';
|
|
12
|
-
}): DiscoverResult;
|
|
8
|
+
export declare function discoveryFailure(status: number, body: unknown): DiscoverResult | null;
|
|
13
9
|
//# sourceMappingURL=refusal.d.ts.map
|
package/dist/refusal.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refusal.d.ts","sourceRoot":"","sources":["../src/refusal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,cAAc,EACd,eAAe,EACf,aAAa,EACd,MAAM,wBAAwB,CAAC;AAEhC,
|
|
1
|
+
{"version":3,"file":"refusal.d.ts","sourceRoot":"","sources":["../src/refusal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,cAAc,EACd,eAAe,EACf,aAAa,EACd,MAAM,wBAAwB,CAAC;AAEhC,wBAAgB,WAAW,CAAC,IAAI,EAAE,OAAO,GAAG,eAAe,GAAG,IAAI,CAOjE;AAED,wBAAgB,aAAa,CAC3B,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,aAAa,CAAC,OAAO,CAAC,EAC7B,OAAO,EAAE,eAAe,GACvB,aAAa,CAEf;AAmBD,wBAAgB,YAAY,CAC1B,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,OAAO,EACb,OAAO,EAAE,MAAM,GACd,cAAc,GAAG,IAAI,CAMvB;AAED,wBAAgB,YAAY,CAC1B,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,OAAO,EACb,OAAO,EAAE,MAAM,GACd,cAAc,GAAG;IAAE,IAAI,EAAE,gBAAgB,CAAA;CAAE,GAAG,IAAI,CAGpD;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,cAAc,GAAG,IAAI,CAQrF"}
|
package/dist/refusal.js
CHANGED
|
@@ -6,13 +6,13 @@ export function doorRefusal(body) {
|
|
|
6
6
|
const error = body.error;
|
|
7
7
|
if (typeof error.code !== 'string')
|
|
8
8
|
return null;
|
|
9
|
-
const { code, ...fields } = error;
|
|
10
|
-
return { code, fields, retryable:
|
|
9
|
+
const { code, retryable, ...fields } = error;
|
|
10
|
+
return { code, fields, retryable: retryable === true };
|
|
11
11
|
}
|
|
12
12
|
export function scopedRefusal(locator, scope, refusal) {
|
|
13
|
-
return { kind: 'scoped-refusal', locator, scope,
|
|
13
|
+
return { kind: 'scoped-refusal', locator, scope, ...refusal };
|
|
14
14
|
}
|
|
15
|
-
|
|
15
|
+
function doorFailure(status, body) {
|
|
16
16
|
if (status === 0)
|
|
17
17
|
return { kind: 'transport-uncertainty' };
|
|
18
18
|
const refusal = doorRefusal(body);
|
|
@@ -20,24 +20,37 @@ export function classifyDoor(status, body, locator) {
|
|
|
20
20
|
return { kind: 'revoked-authorization' };
|
|
21
21
|
if (refusal?.retryable === true)
|
|
22
22
|
return { kind: 'transport-uncertainty' };
|
|
23
|
-
if (
|
|
24
|
-
return { kind: '
|
|
25
|
-
if (status === 404 || refusal?.code === 'room_not_found') {
|
|
26
|
-
return { kind: 'room-not-readable', locator };
|
|
27
|
-
}
|
|
23
|
+
if (status === 404 || refusal?.code === 'room_not_found')
|
|
24
|
+
return { kind: 'room-not-readable' };
|
|
28
25
|
if (status < 400)
|
|
29
26
|
return null;
|
|
30
27
|
if (refusal === null)
|
|
31
28
|
return { kind: 'transport-uncertainty' };
|
|
32
|
-
|
|
33
|
-
return scopedRefusal(locator, 'operation', refusal);
|
|
34
|
-
return scopedRefusal(locator, 'undisclosed', refusal);
|
|
29
|
+
return { kind: 'refused', scope: status === 403 ? 'operation' : 'undisclosed', refusal };
|
|
35
30
|
}
|
|
36
|
-
export function
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
31
|
+
export function classifyDoor(status, body, locator) {
|
|
32
|
+
const failure = doorFailure(status, body);
|
|
33
|
+
if (failure === null)
|
|
34
|
+
return null;
|
|
35
|
+
if (failure.kind === 'room-not-readable')
|
|
36
|
+
return { kind: 'room-not-readable', locator };
|
|
37
|
+
if (failure.kind === 'refused')
|
|
38
|
+
return scopedRefusal(locator, failure.scope, failure.refusal);
|
|
39
|
+
return failure;
|
|
40
|
+
}
|
|
41
|
+
export function classifyRead(status, body, locator) {
|
|
42
|
+
if (doorRefusal(body)?.code === 'expired')
|
|
43
|
+
return { kind: 'beyond-horizon' };
|
|
44
|
+
return classifyDoor(status, body, locator);
|
|
45
|
+
}
|
|
46
|
+
export function discoveryFailure(status, body) {
|
|
47
|
+
const failure = doorFailure(status, body);
|
|
48
|
+
if (failure === null)
|
|
49
|
+
return null;
|
|
50
|
+
if (failure.kind === 'revoked-authorization')
|
|
51
|
+
return failure;
|
|
52
|
+
if (failure.kind === 'refused') {
|
|
53
|
+
return { kind: 'contract-unavailable', ...failure.refusal };
|
|
41
54
|
}
|
|
42
55
|
return { kind: 'transport-uncertainty' };
|
|
43
56
|
}
|
package/dist/site.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"site.d.ts","sourceRoot":"","sources":["../src/site.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EAMR,MAAM,wBAAwB,CAAC;AAsBhC,OAAO,
|
|
1
|
+
{"version":3,"file":"site.d.ts","sourceRoot":"","sources":["../src/site.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EAMR,MAAM,wBAAwB,CAAC;AAsBhC,OAAO,EAKL,KAAK,kBAAkB,EACxB,MAAM,gBAAgB,CAAC;AAgCxB,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,kBAAkB,GAAG,OAAO,CAwIxE"}
|
package/dist/site.js
CHANGED
|
@@ -2,15 +2,16 @@ import { actionOutcome } from './actions.js';
|
|
|
2
2
|
import { mapDiscovery, parseSiteDiscovery, siteCapabilities, siteTracked, } from './discovery.js';
|
|
3
3
|
import { scopeModels, streamedModels, viewModels } from './model.js';
|
|
4
4
|
import { advancedScope, bootstrapOf, parseEnumeration, parseSiteBootstrap, refreshFrom, viewOf, } from './read.js';
|
|
5
|
-
import { classifyDoor, discoveryFailure } from './refusal.js';
|
|
5
|
+
import { classifyDoor, classifyRead, discoveryFailure } from './refusal.js';
|
|
6
6
|
import { houseNotifications } from './stream.js';
|
|
7
|
-
import {
|
|
7
|
+
import { SITE_DOOR_BOOTSTRAP, SITE_DOOR_DISCOVER, SITE_DOOR_ENUMERATE, SITE_DOOR_SUBMIT, } from './transport.js';
|
|
8
8
|
import { followsVersion, logPosition, presented, reachedVersion, roomVersion, } from './version.js';
|
|
9
9
|
const UNCERTAIN = { kind: 'transport-uncertainty' };
|
|
10
10
|
function siteRoom(tracked) {
|
|
11
11
|
return {
|
|
12
12
|
name: tracked.handle,
|
|
13
13
|
locator: tracked.locator,
|
|
14
|
+
handle: tracked.handle,
|
|
14
15
|
roomVersion: roomVersion(tracked),
|
|
15
16
|
operations: { read: [''], sync: [''], write: [], delete: [] },
|
|
16
17
|
replica: { selection: tracked.locator, admission: 'admitted' },
|
|
@@ -27,7 +28,7 @@ export function createSiteAdapter(transport) {
|
|
|
27
28
|
const answer = await transport.door(SITE_DOOR_ENUMERATE, {
|
|
28
29
|
positions: [presented(entry.authority, from)],
|
|
29
30
|
});
|
|
30
|
-
const classified =
|
|
31
|
+
const classified = classifyRead(answer.status, answer.body, entry.locator);
|
|
31
32
|
if (classified !== null)
|
|
32
33
|
return classified;
|
|
33
34
|
return parseEnumeration(answer.body, 'site') ?? UNCERTAIN;
|
|
@@ -36,7 +37,7 @@ export function createSiteAdapter(transport) {
|
|
|
36
37
|
const answer = await transport.read(`${SITE_DOOR_BOOTSTRAP}${entry.authority}`);
|
|
37
38
|
const classified = classifyDoor(answer.status, answer.body, entry.locator);
|
|
38
39
|
if (classified !== null)
|
|
39
|
-
return { failure:
|
|
40
|
+
return { failure: classified };
|
|
40
41
|
const scope = parseSiteBootstrap(answer.body);
|
|
41
42
|
if (scope === null)
|
|
42
43
|
return { failure: UNCERTAIN };
|
|
@@ -73,14 +74,15 @@ export function createSiteAdapter(transport) {
|
|
|
73
74
|
return models === undefined ? answer : { ...answer, models };
|
|
74
75
|
}
|
|
75
76
|
return {
|
|
77
|
+
localSaves: true,
|
|
76
78
|
async authorize() {
|
|
77
79
|
return {};
|
|
78
80
|
},
|
|
79
81
|
async discover() {
|
|
80
82
|
const answer = await transport.read(SITE_DOOR_DISCOVER);
|
|
81
|
-
const
|
|
82
|
-
if (
|
|
83
|
-
return
|
|
83
|
+
const failed = discoveryFailure(answer.status, answer.body);
|
|
84
|
+
if (failed !== null)
|
|
85
|
+
return failed;
|
|
84
86
|
const document = parseSiteDiscovery(answer.body);
|
|
85
87
|
if (document === null)
|
|
86
88
|
return UNCERTAIN;
|
|
@@ -113,7 +115,7 @@ export function createSiteAdapter(transport) {
|
|
|
113
115
|
return refreshed(entry, request.fromRoomVersion);
|
|
114
116
|
},
|
|
115
117
|
async mutate() {
|
|
116
|
-
return { kind: 'rejected', affected: {}, code: 'write-grant', fields: {} };
|
|
118
|
+
return { kind: 'rejected', affected: {}, code: 'write-grant', fields: {}, retryable: false };
|
|
117
119
|
},
|
|
118
120
|
async history() {
|
|
119
121
|
return { kind: 'no-history' };
|
|
@@ -126,7 +128,12 @@ export function createSiteAdapter(transport) {
|
|
|
126
128
|
},
|
|
127
129
|
async action(_authorization, request) {
|
|
128
130
|
if (request.name !== 'submit') {
|
|
129
|
-
return {
|
|
131
|
+
return {
|
|
132
|
+
kind: 'rejected',
|
|
133
|
+
code: 'action-unimplemented',
|
|
134
|
+
fields: { name: request.name },
|
|
135
|
+
retryable: false,
|
|
136
|
+
};
|
|
130
137
|
}
|
|
131
138
|
if (!transport.online())
|
|
132
139
|
return UNCERTAIN;
|
|
@@ -143,6 +150,7 @@ export function createSiteAdapter(transport) {
|
|
|
143
150
|
return [presented(entry.authority, at)];
|
|
144
151
|
}));
|
|
145
152
|
},
|
|
153
|
+
reopen: notifications.reopen,
|
|
146
154
|
observe: notifications.observe,
|
|
147
155
|
},
|
|
148
156
|
serviceMode: notifications.serviceMode,
|
package/dist/stream.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export type HouseNotifications = {
|
|
|
12
12
|
runtime: string;
|
|
13
13
|
observe(notify: (event: RoomStreamEvent) => void): () => void;
|
|
14
14
|
send(rooms: readonly HouseHeldRoom[]): void;
|
|
15
|
+
reopen(): void;
|
|
15
16
|
track(authorities: readonly TrackedAuthority[]): void;
|
|
16
17
|
reach(authority: string, at: LogPosition): void;
|
|
17
18
|
advance(tracked: TrackedAuthority, from: LogPosition, holds?: HeldRevision): StreamedAdvancement | null;
|
package/dist/stream.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stream.d.ts","sourceRoot":"","sources":["../src/stream.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,kBAAkB,EAElB,WAAW,EACX,eAAe,EAEf,iBAAiB,EAElB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEvD,OAAO,KAAK,EACV,SAAS,EACT,aAAa,EAEb,SAAS,EAET,gBAAgB,EAEjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAe,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAgB7D,MAAM,MAAM,YAAY,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC;AAEvE,MAAM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AY,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC;AAEvE,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,WAAW,CAAC;IAClB,OAAO,EAAE,SAAS,gBAAgB,EAAE,CAAC;IACrC,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;CAChD,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,GAAG,MAAM,IAAI,CAAC;IAC9D,IAAI,CAAC,KAAK,EAAE,SAAS,aAAa,EAAE,GAAG,IAAI,CAAC;IAC5C,MAAM,IAAI,IAAI,CAAC;IACf,KAAK,CAAC,WAAW,EAAE,SAAS,gBAAgB,EAAE,GAAG,IAAI,CAAC;IACtD,KAAK,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,WAAW,GAAG,IAAI,CAAC;IAChD,OAAO,CACL,OAAO,EAAE,gBAAgB,EACzB,IAAI,EAAE,WAAW,EACjB,KAAK,CAAC,EAAE,YAAY,GACnB,mBAAmB,GAAG,IAAI,CAAC;IAC9B,aAAa,EAAE,kBAAkB,CAAC;IAClC,WAAW,EAAE,iBAAiB,CAAC;CAChC,CAAC;AAuBF,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,GAAG,kBAAkB,CAyS5F"}
|
package/dist/stream.js
CHANGED
|
@@ -222,6 +222,11 @@ export function houseNotifications(transport, mode) {
|
|
|
222
222
|
opening = null;
|
|
223
223
|
current?.hold(rooms, runtime);
|
|
224
224
|
},
|
|
225
|
+
reopen() {
|
|
226
|
+
const current = opening;
|
|
227
|
+
opening = null;
|
|
228
|
+
current?.close();
|
|
229
|
+
},
|
|
225
230
|
track(entries) {
|
|
226
231
|
locators.clear();
|
|
227
232
|
for (const entry of entries) {
|
package/dist/transport.d.ts
CHANGED
|
@@ -9,21 +9,17 @@ export declare const SITE_DOOR_DISCOVER = "/_house/door/discover";
|
|
|
9
9
|
export declare const SITE_DOOR_BOOTSTRAP = "/_house/door/bootstrap/";
|
|
10
10
|
export declare const SITE_DOOR_ENUMERATE = "/_house/door/enumerate";
|
|
11
11
|
export declare const SITE_DOOR_SUBMIT = "/_house/door/submit";
|
|
12
|
-
export declare const PRIVATE_LOCATOR = "private";
|
|
13
12
|
export type HouseMode = 'credential' | 'site';
|
|
14
13
|
export type HouseDoorAnswer = {
|
|
15
14
|
status: number;
|
|
16
15
|
body: unknown;
|
|
17
16
|
};
|
|
18
|
-
export type HouseByteAct = '
|
|
17
|
+
export type HouseByteAct = 'authored_batch_upload' | 'conversation_file_upload';
|
|
19
18
|
export type HouseByteBody = string | ArrayBuffer | Uint8Array;
|
|
20
|
-
export type HouseByteAnswer = 'json' | 'bytes';
|
|
21
19
|
export type HouseByteTransfer = {
|
|
22
20
|
act: HouseByteAct;
|
|
23
|
-
method: 'GET' | 'POST';
|
|
24
21
|
url: string;
|
|
25
|
-
|
|
26
|
-
body?: HouseByteBody;
|
|
22
|
+
body: HouseByteBody;
|
|
27
23
|
operation?: string;
|
|
28
24
|
};
|
|
29
25
|
export type HouseStreamEntry = {
|
|
@@ -106,6 +102,7 @@ export type HouseHeldRoom = {
|
|
|
106
102
|
};
|
|
107
103
|
export type HouseOpening = {
|
|
108
104
|
hold(rooms: readonly HouseHeldRoom[], runtime: string): void;
|
|
105
|
+
close(): void;
|
|
109
106
|
};
|
|
110
107
|
export type HouseStream = {
|
|
111
108
|
observe(receive: (frame: HouseStreamFrame) => void): () => void;
|
package/dist/transport.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../src/transport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,wBAAw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AAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,CAAC,KAAK,EAAE,SAAS,aAAa,EAAE,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7D,KAAK,IAAI,IAAI,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,GAAG,MAAM,IAAI,CAAC;IAChE,MAAM,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,IAAI,GAAG,MAAM,IAAI,CAAC;IAC5D,MAAM,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,GAAG,MAAM,IAAI,CAAC;CACxD,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IAC7D,MAAM,EAAE,WAAW,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG;IACvC,QAAQ,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;CAChE,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG;IAC3C,MAAM,IAAI,OAAO,CAAC;IAClB,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;CAC/C,CAAC"}
|
package/dist/transport.js
CHANGED
|
@@ -8,4 +8,3 @@ export const SITE_DOOR_DISCOVER = '/_house/door/discover';
|
|
|
8
8
|
export const SITE_DOOR_BOOTSTRAP = '/_house/door/bootstrap/';
|
|
9
9
|
export const SITE_DOOR_ENUMERATE = '/_house/door/enumerate';
|
|
10
10
|
export const SITE_DOOR_SUBMIT = '/_house/door/submit';
|
|
11
|
-
export const PRIVATE_LOCATOR = 'private';
|
package/dist/write.d.ts
CHANGED
package/dist/write.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"write.d.ts","sourceRoot":"","sources":["../src/write.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,WAAW,EAEX,aAAa,EAEb,cAAc,EAEd,cAAc,EACf,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAOlD,MAAM,MAAM,cAAc,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAE/D,MAAM,MAAM,aAAa,GACrB;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,SAAS,cAAc,EAAE,CAAA;CAAE,GACvD;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAuGrD,wBAAgB,YAAY,CAAC,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,GAAG,aAAa,CAQ9E;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,wBAAgB,aAAa,CAAC,KAAK,EAAE,WAAW,GAAG,aAAa,CAK/D;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,SAAS,cAAc,EAAE,GAAG,SAAS,MAAM,EAAE,CAQhF;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,SAAS,cAAc,EAAE,GAAG,MAAM,CAEpE;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEhD;AAED,wBAAgB,UAAU,C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,cAAc,CAC5B,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,OAAO,EACb,OAAO,EAAE,MAAM,EACf,OAAO,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,GAC3C,aAAa,CAiDf"}
|
package/dist/write.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { headChange } from './read.js';
|
|
2
2
|
import { sha256Hex, textBytes } from './digest.js';
|
|
3
3
|
import { nativePath, roomLocalPath } from './map.js';
|
|
4
4
|
import { classifyDoor, doorRefusal, scopedRefusal } from './refusal.js';
|
|
@@ -138,6 +138,9 @@ function material(value, handle) {
|
|
|
138
138
|
return null;
|
|
139
139
|
if (file.revision !== null && file.revision !== undefined && typeof file.revision !== 'string')
|
|
140
140
|
return null;
|
|
141
|
+
const head = headChange(file);
|
|
142
|
+
if (head === null)
|
|
143
|
+
return null;
|
|
141
144
|
let path;
|
|
142
145
|
try {
|
|
143
146
|
path = roomLocalPath(file.path, handle);
|
|
@@ -149,6 +152,7 @@ function material(value, handle) {
|
|
|
149
152
|
path,
|
|
150
153
|
content: file.content,
|
|
151
154
|
revision: typeof file.revision === 'string' ? file.revision : null,
|
|
155
|
+
...(head === undefined ? {} : { head }),
|
|
152
156
|
});
|
|
153
157
|
}
|
|
154
158
|
return held;
|
|
@@ -166,12 +170,18 @@ export function mutationOutcome(status, body, locator, handle) {
|
|
|
166
170
|
if (refusal !== null && refusal.code === 'service_mode_write_halted') {
|
|
167
171
|
return { kind: 'write-halted' };
|
|
168
172
|
}
|
|
169
|
-
if (refusal !== null && refusal.code === '
|
|
173
|
+
if (refusal !== null && refusal.code === 'expired')
|
|
170
174
|
return { kind: 'expired' };
|
|
171
175
|
if (refusal !== null && refusal.code === 'edit_conflict') {
|
|
172
176
|
const { current, ...fields } = refusal.fields;
|
|
173
177
|
const held = material(current, handle) ?? [];
|
|
174
|
-
return {
|
|
178
|
+
return {
|
|
179
|
+
kind: 'conflicted',
|
|
180
|
+
affected: affectedOf(held),
|
|
181
|
+
code: refusal.code,
|
|
182
|
+
fields,
|
|
183
|
+
retryable: refusal.retryable,
|
|
184
|
+
};
|
|
175
185
|
}
|
|
176
186
|
if (refusal !== null && status === 404) {
|
|
177
187
|
return scopedRefusal(locator, 'undisclosed', refusal);
|
|
@@ -181,15 +191,26 @@ export function mutationOutcome(status, body, locator, handle) {
|
|
|
181
191
|
if (refusal?.retryable === true &&
|
|
182
192
|
typeof reset === 'string' &&
|
|
183
193
|
classified?.kind === 'transport-uncertainty') {
|
|
184
|
-
return {
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
194
|
+
return {
|
|
195
|
+
kind: 'retryable-refusal',
|
|
196
|
+
code: refusal.code,
|
|
197
|
+
fields: refusal.fields,
|
|
198
|
+
retryable: true,
|
|
199
|
+
reset,
|
|
200
|
+
};
|
|
188
201
|
}
|
|
202
|
+
if (classified !== null && classified.kind !== 'scoped-refusal')
|
|
203
|
+
return classified;
|
|
189
204
|
if (classified !== null && status === 403)
|
|
190
205
|
return classified;
|
|
191
206
|
if (refusal !== null && status >= 400) {
|
|
192
|
-
return {
|
|
207
|
+
return {
|
|
208
|
+
kind: 'rejected',
|
|
209
|
+
affected: {},
|
|
210
|
+
code: refusal.code,
|
|
211
|
+
fields: refusal.fields,
|
|
212
|
+
retryable: refusal.retryable,
|
|
213
|
+
};
|
|
193
214
|
}
|
|
194
215
|
if (status !== 200 || typeof body !== 'object' || body === null) {
|
|
195
216
|
return { kind: 'transport-uncertainty' };
|
|
@@ -201,11 +222,9 @@ export function mutationOutcome(status, body, locator, handle) {
|
|
|
201
222
|
const contents = material(held.contents, handle);
|
|
202
223
|
if (contents === null)
|
|
203
224
|
return { kind: 'transport-uncertainty' };
|
|
204
|
-
const originals = parseOriginals(held.originals);
|
|
205
|
-
if (originals === null)
|
|
206
|
-
return { kind: 'transport-uncertainty' };
|
|
207
225
|
const documents = {};
|
|
208
226
|
const revisions = {};
|
|
227
|
+
const changes = {};
|
|
209
228
|
const removals = [];
|
|
210
229
|
for (const entry of contents) {
|
|
211
230
|
if (entry.content === null || entry.revision === null) {
|
|
@@ -214,14 +233,17 @@ export function mutationOutcome(status, body, locator, handle) {
|
|
|
214
233
|
}
|
|
215
234
|
documents[entry.path] = entry.content;
|
|
216
235
|
revisions[entry.path] = entry.revision;
|
|
236
|
+
if (entry.head !== undefined)
|
|
237
|
+
changes[entry.path] = entry.head;
|
|
217
238
|
}
|
|
218
239
|
return {
|
|
219
240
|
kind: 'accepted',
|
|
220
241
|
roomVersion: roomVersion(at),
|
|
221
242
|
documents,
|
|
222
243
|
revisions,
|
|
244
|
+
changes,
|
|
223
245
|
removals: removals.sort(),
|
|
224
|
-
originals,
|
|
246
|
+
originals: [],
|
|
225
247
|
};
|
|
226
248
|
}
|
|
227
249
|
export function rejectedMapping(mapping) {
|
|
@@ -230,6 +252,7 @@ export function rejectedMapping(mapping) {
|
|
|
230
252
|
affected: {},
|
|
231
253
|
code: mapping.rule,
|
|
232
254
|
fields: { path: mapping.path },
|
|
255
|
+
retryable: false,
|
|
233
256
|
};
|
|
234
257
|
}
|
|
235
258
|
export function revisionBody(input) {
|
|
@@ -253,9 +276,8 @@ function revisionAuthor(entry) {
|
|
|
253
276
|
}
|
|
254
277
|
export function historyOutcome(status, body, locator, request) {
|
|
255
278
|
const classified = classifyDoor(status, body, locator);
|
|
256
|
-
if (classified !== null)
|
|
257
|
-
return classified
|
|
258
|
-
}
|
|
279
|
+
if (classified !== null)
|
|
280
|
+
return classified;
|
|
259
281
|
if (status !== 200 || typeof body !== 'object' || body === null) {
|
|
260
282
|
return { kind: 'transport-uncertainty' };
|
|
261
283
|
}
|
|
@@ -279,6 +301,7 @@ export function historyOutcome(status, body, locator, request) {
|
|
|
279
301
|
scope: 'content',
|
|
280
302
|
code: 'retained_history_unavailable',
|
|
281
303
|
fields: { path: request.path, revision: request.revision },
|
|
304
|
+
retryable: false,
|
|
282
305
|
};
|
|
283
306
|
}
|
|
284
307
|
if (typeof named.content !== 'string')
|
|
@@ -302,5 +325,6 @@ export function historyOutcome(status, body, locator, request) {
|
|
|
302
325
|
kind: 'history',
|
|
303
326
|
revisions,
|
|
304
327
|
...(typeof next === 'number' ? { pageToken: String(next) } : {}),
|
|
328
|
+
...(held.deleted === true ? { deleted: true } : {}),
|
|
305
329
|
};
|
|
306
330
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentshouse/mdruntime-adapter",
|
|
3
|
-
"version": "0.1.0-
|
|
3
|
+
"version": "0.1.0-cd59fd8945dcb",
|
|
4
4
|
"description": "Agents House Adapter for the MD Runtime",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"exports": {
|
|
15
15
|
".": {
|
|
16
16
|
"types": "./dist/index.d.ts",
|
|
17
|
-
"
|
|
17
|
+
"default": "./dist/index.js"
|
|
18
18
|
},
|
|
19
19
|
"./package.json": "./package.json"
|
|
20
20
|
},
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"LICENSE"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@agentshouse/mdmodel": "0.1.0-
|
|
29
|
-
"@agentshouse/mdruntime": "0.1.0-
|
|
28
|
+
"@agentshouse/mdmodel": "0.1.0-cc9fa0498a7f7",
|
|
29
|
+
"@agentshouse/mdruntime": "0.1.0-cd3486bd400ed"
|
|
30
30
|
}
|
|
31
31
|
}
|