@superbee/core 0.4.10 → 0.4.11-pre.2
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 +3 -422
- package/dist/body-pages.js +2 -2
- package/dist/body-pages.js.map +1 -1
- package/dist/builtin-recipes/content.js +7 -7
- package/dist/builtin-recipes/content.js.map +1 -1
- package/dist/bundle-health/report.js +2 -2
- package/dist/bundle-health/report.js.map +1 -1
- package/dist/content-type.d.ts +1 -2
- package/dist/content-type.d.ts.map +1 -1
- package/dist/content-type.js +1 -2
- package/dist/content-type.js.map +1 -1
- package/dist/document-field-actions.js +1 -1
- package/dist/document-field-actions.js.map +1 -1
- package/dist/document-mutation.d.ts.map +1 -1
- package/dist/document-mutation.js +3 -4
- package/dist/document-mutation.js.map +1 -1
- package/dist/file-journaled-backend.d.ts.map +1 -1
- package/dist/file-journaled-backend.js +2 -3
- package/dist/file-journaled-backend.js.map +1 -1
- package/dist/hosted-transport/answer-rows.js +3 -3
- package/dist/hosted-transport/answer-rows.js.map +1 -1
- package/dist/hosted-transport/attribution.d.ts +3 -3
- package/dist/hosted-transport/attribution.d.ts.map +1 -1
- package/dist/hosted-transport/attribution.js +3 -3
- package/dist/hosted-transport/attribution.js.map +1 -1
- package/dist/hosted-transport/index.d.ts +1 -1
- package/dist/hosted-transport/index.js +1 -1
- package/dist/hosted-transport/port-run.d.ts +2 -2
- package/dist/hosted-transport/port-run.js +2 -2
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/indexeddb-backend.d.ts.map +1 -1
- package/dist/indexeddb-backend.js +2 -3
- package/dist/indexeddb-backend.js.map +1 -1
- package/dist/kinds.d.ts +4 -4
- package/dist/kinds.js +4 -4
- package/dist/kinds.js.map +1 -1
- package/dist/okf-authoring.d.ts.map +1 -1
- package/dist/okf-authoring.js +5 -2
- package/dist/okf-authoring.js.map +1 -1
- package/dist/portable-export.js +1 -1
- package/dist/portable-export.js.map +1 -1
- package/dist/portable-frontmatter.d.ts +3 -3
- package/dist/portable-frontmatter.d.ts.map +1 -1
- package/dist/portable-frontmatter.js +20 -5
- package/dist/portable-frontmatter.js.map +1 -1
- package/dist/recipe-lifecycle/evolution.d.ts.map +1 -1
- package/dist/recipe-lifecycle/evolution.js +22 -14
- package/dist/recipe-lifecycle/evolution.js.map +1 -1
- package/dist/recipe-lifecycle/install.d.ts.map +1 -1
- package/dist/recipe-lifecycle/install.js +21 -1
- package/dist/recipe-lifecycle/install.js.map +1 -1
- package/dist/recipe-lifecycle/legacy-aliases.js +1 -1
- package/dist/recipe-lifecycle/legacy-aliases.js.map +1 -1
- package/dist/recipe-sources.d.ts.map +1 -1
- package/dist/recipe-sources.js +3 -2
- package/dist/recipe-sources.js.map +1 -1
- package/dist/record-overlay/apply.d.ts.map +1 -1
- package/dist/record-overlay/apply.js +6 -3
- package/dist/record-overlay/apply.js.map +1 -1
- package/dist/remote.d.ts +1 -1
- package/dist/remote.d.ts.map +1 -1
- package/dist/remote.js +1 -1
- package/dist/remote.js.map +1 -1
- package/dist/validation.d.ts +1 -1
- package/dist/validation.js +1 -1
- package/package.json +1 -9
- package/dist/hosted-client/binding.d.ts +0 -7
- package/dist/hosted-client/binding.d.ts.map +0 -1
- package/dist/hosted-client/binding.js +0 -10
- package/dist/hosted-client/binding.js.map +0 -1
- package/dist/hosted-client/blob-delivery.d.ts +0 -68
- package/dist/hosted-client/blob-delivery.d.ts.map +0 -1
- package/dist/hosted-client/blob-delivery.js +0 -170
- package/dist/hosted-client/blob-delivery.js.map +0 -1
- package/dist/hosted-client/blob-write.d.ts +0 -387
- package/dist/hosted-client/blob-write.d.ts.map +0 -1
- package/dist/hosted-client/blob-write.js +0 -770
- package/dist/hosted-client/blob-write.js.map +0 -1
- package/dist/hosted-client/bundle-listing.d.ts +0 -46
- package/dist/hosted-client/bundle-listing.d.ts.map +0 -1
- package/dist/hosted-client/bundle-listing.js +0 -36
- package/dist/hosted-client/bundle-listing.js.map +0 -1
- package/dist/hosted-client/client.d.ts +0 -249
- package/dist/hosted-client/client.d.ts.map +0 -1
- package/dist/hosted-client/client.js +0 -381
- package/dist/hosted-client/client.js.map +0 -1
- package/dist/hosted-client/directory.d.ts +0 -46
- package/dist/hosted-client/directory.d.ts.map +0 -1
- package/dist/hosted-client/directory.js +0 -74
- package/dist/hosted-client/directory.js.map +0 -1
- package/dist/hosted-client/errors.d.ts +0 -26
- package/dist/hosted-client/errors.d.ts.map +0 -1
- package/dist/hosted-client/errors.js +0 -35
- package/dist/hosted-client/errors.js.map +0 -1
- package/dist/hosted-client/inbox.d.ts +0 -320
- package/dist/hosted-client/inbox.d.ts.map +0 -1
- package/dist/hosted-client/inbox.js +0 -379
- package/dist/hosted-client/inbox.js.map +0 -1
- package/dist/hosted-client/index.d.ts +0 -31
- package/dist/hosted-client/index.d.ts.map +0 -1
- package/dist/hosted-client/index.js +0 -33
- package/dist/hosted-client/index.js.map +0 -1
- package/dist/hosted-client/journal.d.ts +0 -103
- package/dist/hosted-client/journal.d.ts.map +0 -1
- package/dist/hosted-client/journal.js +0 -464
- package/dist/hosted-client/journal.js.map +0 -1
- package/dist/hosted-client/node.d.ts +0 -74
- package/dist/hosted-client/node.d.ts.map +0 -1
- package/dist/hosted-client/node.js +0 -219
- package/dist/hosted-client/node.js.map +0 -1
- package/dist/hosted-client/reference.d.ts +0 -12
- package/dist/hosted-client/reference.d.ts.map +0 -1
- package/dist/hosted-client/reference.js +0 -29
- package/dist/hosted-client/reference.js.map +0 -1
- package/dist/hosted-client/view-content.d.ts +0 -184
- package/dist/hosted-client/view-content.d.ts.map +0 -1
- package/dist/hosted-client/view-content.js +0 -268
- package/dist/hosted-client/view-content.js.map +0 -1
- package/dist/hosted-client/write.d.ts +0 -219
- package/dist/hosted-client/write.d.ts.map +0 -1
- package/dist/hosted-client/write.js +0 -419
- package/dist/hosted-client/write.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superbee/core",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.11-pre.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Superbee engine: reads and writes Open Knowledge Format (OKF) bundles, with Kinds, cross-links, derived backlinks, freshness and versioned writes.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -191,14 +191,6 @@
|
|
|
191
191
|
"types": "./dist/hosted-transport/index.d.ts",
|
|
192
192
|
"default": "./dist/hosted-transport/index.js"
|
|
193
193
|
},
|
|
194
|
-
"./hosted-client": {
|
|
195
|
-
"types": "./dist/hosted-client/index.d.ts",
|
|
196
|
-
"default": "./dist/hosted-client/index.js"
|
|
197
|
-
},
|
|
198
|
-
"./hosted-client/node": {
|
|
199
|
-
"types": "./dist/hosted-client/node.d.ts",
|
|
200
|
-
"default": "./dist/hosted-client/node.js"
|
|
201
|
-
},
|
|
202
194
|
"./storage": {
|
|
203
195
|
"types": "./dist/storage.d.ts",
|
|
204
196
|
"default": "./dist/storage.js"
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `sha256:<hex>` of a checkout's random id: the recovery binding (`X-Superbee-Checkout`) an
|
|
3
|
-
* identified write and its outcome lookup are pinned to, never the id itself. The CLI derives a
|
|
4
|
-
* checkout's binding with it, and a hosted client mints its own from a fresh id.
|
|
5
|
-
*/
|
|
6
|
-
export declare function checkoutBindingDigest(checkoutId: string): string;
|
|
7
|
-
//# sourceMappingURL=binding.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"binding.d.ts","sourceRoot":"","sources":["../../src/hosted-client/binding.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAEhE"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { sha256HexOfUtf8 } from "../sha256.js";
|
|
2
|
-
/**
|
|
3
|
-
* `sha256:<hex>` of a checkout's random id: the recovery binding (`X-Superbee-Checkout`) an
|
|
4
|
-
* identified write and its outcome lookup are pinned to, never the id itself. The CLI derives a
|
|
5
|
-
* checkout's binding with it, and a hosted client mints its own from a fresh id.
|
|
6
|
-
*/
|
|
7
|
-
export function checkoutBindingDigest(checkoutId) {
|
|
8
|
-
return `sha256:${sha256HexOfUtf8(checkoutId)}`;
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=binding.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"binding.js","sourceRoot":"","sources":["../../src/hosted-client/binding.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C;;;;GAIG;AACH,MAAM,UAAU,qBAAqB,CAAC,UAAkB;IACtD,OAAO,UAAU,eAAe,CAAC,UAAU,CAAC,EAAE,CAAC;AACjD,CAAC"}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
/** Typed delivery of an existing frozen blob journal intent. Persistence, fresh claims and
|
|
2
|
-
* checkout locking belong to the caller; this composition owns no retry or authorization policy. */
|
|
3
|
-
import { type BlobDeletionHold, type BlobIntentRecord, type BlobIntentPatch, type BlobReceipt, type BlobTargetScope } from "../blob-journal.js";
|
|
4
|
-
import { type RecordedWriteOptions, type OperationState } from "../uncertain-write.js";
|
|
5
|
-
import type { HostedBlobWriteAdapter } from "../hosted-transport/blob-write.js";
|
|
6
|
-
export interface HostedBlobDeliveryContext {
|
|
7
|
-
/** Separately trusted current checkout target, never selected from a journal record. */
|
|
8
|
-
scope: BlobTargetScope;
|
|
9
|
-
/** Trusted caller contract: close over that fixed target, scoped carrier and fresh capability
|
|
10
|
-
* provider; create an adapter bound to the supplied lifetime. The record supplies no authority. */
|
|
11
|
-
adapterFor(signal: AbortSignal): HostedBlobWriteAdapter;
|
|
12
|
-
}
|
|
13
|
-
export type HostedBlobDeliveryOptions = Omit<RecordedWriteOptions, "settlement"> & {
|
|
14
|
-
/** Admission only, for this delete submission. Never persisted or sent on lookup. */
|
|
15
|
-
acceptDeletes?: number;
|
|
16
|
-
};
|
|
17
|
-
export type HostedBlobDeliveryOutcome = {
|
|
18
|
-
kind: "committed";
|
|
19
|
-
receipt: Extract<BlobReceipt, {
|
|
20
|
-
result: {
|
|
21
|
-
ok: true;
|
|
22
|
-
};
|
|
23
|
-
}>;
|
|
24
|
-
} | {
|
|
25
|
-
kind: "conflict";
|
|
26
|
-
receipt: Extract<BlobReceipt, {
|
|
27
|
-
result: {
|
|
28
|
-
ok: false;
|
|
29
|
-
};
|
|
30
|
-
}>;
|
|
31
|
-
} | {
|
|
32
|
-
kind: "refused";
|
|
33
|
-
code: string;
|
|
34
|
-
message: string;
|
|
35
|
-
receipt: Extract<BlobReceipt, {
|
|
36
|
-
result: {
|
|
37
|
-
ok: false;
|
|
38
|
-
};
|
|
39
|
-
}>;
|
|
40
|
-
} | {
|
|
41
|
-
kind: "not-executed";
|
|
42
|
-
attempts: number;
|
|
43
|
-
details: BlobDeletionHold;
|
|
44
|
-
} | {
|
|
45
|
-
kind: "unknown";
|
|
46
|
-
};
|
|
47
|
-
export interface HostedBlobDeliveryResult {
|
|
48
|
-
attempts: number;
|
|
49
|
-
state: OperationState;
|
|
50
|
-
lookups: number;
|
|
51
|
-
outcome: HostedBlobDeliveryOutcome;
|
|
52
|
-
/** Pass only this patch to the existing full-guard updateBlobIntent transaction. */
|
|
53
|
-
patch: BlobIntentPatch;
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Refusals the host answers without writing and records under no identity (`recorded: "no"`): a
|
|
57
|
-
* grant without blob writes, a bundle the person cannot reach, the sync quota, and a create whose
|
|
58
|
-
* path folds onto an existing document or blob path. One of them on an attempt whose earlier
|
|
59
|
-
* attempts are all proven not applied settles the write as refused.
|
|
60
|
-
*/
|
|
61
|
-
export declare const BLOB_UNRECORDED_REFUSAL_CODES: readonly ["insufficient_scope", "bundle_not_found", "request_capacity", "path_collision"];
|
|
62
|
-
/** A submit-claimed call requires a freshly durable in_flight CAS under the checkout lock.
|
|
63
|
-
* Reopened/unclear claims MUST use lookup; absence never proves an older delivery cannot commit.
|
|
64
|
-
* This function persists nothing. The caller subsequently applies patch under its full guard.
|
|
65
|
-
* deadlineMs bounds each lookup as well as the primitive's submission deadline; without it,
|
|
66
|
-
* the supplied wire carrier retains its own deadline. Caller cancellation ends either path. */
|
|
67
|
-
export declare function performHostedBlobDelivery(context: HostedBlobDeliveryContext, record: BlobIntentRecord, options: HostedBlobDeliveryOptions): Promise<HostedBlobDeliveryResult>;
|
|
68
|
-
//# sourceMappingURL=blob-delivery.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"blob-delivery.d.ts","sourceRoot":"","sources":["../../src/hosted-client/blob-delivery.ts"],"names":[],"mappings":"AAAA;oGACoG;AACpG,OAAO,EAAwC,KAAK,gBAAgB,EAAqD,KAAK,gBAAgB,EAAE,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAEzO,OAAO,EAAyB,KAAK,oBAAoB,EAAc,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAG1H,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAEhF,MAAM,WAAW,yBAAyB;IACxC,wFAAwF;IACxF,KAAK,EAAE,eAAe,CAAC;IACvB;uGACmG;IACnG,UAAU,CAAC,MAAM,EAAE,WAAW,GAAG,sBAAsB,CAAC;CACzD;AACD,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAAC,oBAAoB,EAAE,YAAY,CAAC,GAAG;IACjF,qFAAqF;IACrF,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AACF,MAAM,MAAM,yBAAyB,GACjC;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC,WAAW,EAAE;QAAE,MAAM,EAAE;YAAE,EAAE,EAAE,IAAI,CAAA;SAAE,CAAA;KAAE,CAAC,CAAA;CAAE,GAC9E;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC,WAAW,EAAE;QAAE,MAAM,EAAE;YAAE,EAAE,EAAE,KAAK,CAAA;SAAE,CAAA;KAAE,CAAC,CAAA;CAAE,GAC9E;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC,WAAW,EAAE;QAAE,MAAM,EAAE;YAAE,EAAE,EAAE,KAAK,CAAA;SAAE,CAAA;KAAE,CAAC,CAAA;CAAE,GAC5G;IAAE,IAAI,EAAE,cAAc,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,gBAAgB,CAAA;CAAE,GACrE;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,CAAC;AACxB,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,cAAc,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,yBAAyB,CAAC;IACnC,oFAAoF;IACpF,KAAK,EAAE,eAAe,CAAC;CACxB;AAED;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,2FAA2G,CAAC;AAatJ;;;;+FAI+F;AAC/F,wBAAsB,yBAAyB,CAAC,OAAO,EAAE,yBAAyB,EAAE,MAAM,EAAE,gBAAgB,EAAE,OAAO,EAAE,yBAAyB,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAqGnL"}
|
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
/** Typed delivery of an existing frozen blob journal intent. Persistence, fresh claims and
|
|
2
|
-
* checkout locking belong to the caller; this composition owns no retry or authorization policy. */
|
|
3
|
-
import { blobReceipt, captureBlobDeletionHold, captureBlobIntentRecord, decodePreparedBlobIntent } from "../blob-journal.js";
|
|
4
|
-
import { captureJournalValue, equalJournalValue } from "../journaled-backend.js";
|
|
5
|
-
import { performUncertainWrite } from "../uncertain-write.js";
|
|
6
|
-
import { classifyBlobWriteAnswer } from "../hosted-transport/answer-rows.js";
|
|
7
|
-
import { isAcceptedDeletionCount } from "../hosted-transport/carrier.js";
|
|
8
|
-
const UNKNOWN = Object.freeze({ kind: "unknown" });
|
|
9
|
-
/**
|
|
10
|
-
* Refusals the host answers without writing and records under no identity (`recorded: "no"`): a
|
|
11
|
-
* grant without blob writes, a bundle the person cannot reach, the sync quota, and a create whose
|
|
12
|
-
* path folds onto an existing document or blob path. One of them on an attempt whose earlier
|
|
13
|
-
* attempts are all proven not applied settles the write as refused.
|
|
14
|
-
*/
|
|
15
|
-
export const BLOB_UNRECORDED_REFUSAL_CODES = Object.freeze(["insufficient_scope", "bundle_not_found", "request_capacity", "path_collision"]);
|
|
16
|
-
const UNRECORDED_REFUSALS = new Set(BLOB_UNRECORDED_REFUSAL_CODES);
|
|
17
|
-
function freeze(value) {
|
|
18
|
-
if (value && typeof value === "object") {
|
|
19
|
-
for (const nested of Object.values(value))
|
|
20
|
-
freeze(nested);
|
|
21
|
-
Object.freeze(value);
|
|
22
|
-
}
|
|
23
|
-
return value;
|
|
24
|
-
}
|
|
25
|
-
const sleepTimer = (ms, signal) => new Promise(resolve => {
|
|
26
|
-
if (signal?.aborted) {
|
|
27
|
-
resolve();
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
const done = () => { clearTimeout(timer); signal?.removeEventListener("abort", done); resolve(); };
|
|
31
|
-
const timer = setTimeout(done, ms);
|
|
32
|
-
signal?.addEventListener("abort", done, { once: true });
|
|
33
|
-
});
|
|
34
|
-
/** A submit-claimed call requires a freshly durable in_flight CAS under the checkout lock.
|
|
35
|
-
* Reopened/unclear claims MUST use lookup; absence never proves an older delivery cannot commit.
|
|
36
|
-
* This function persists nothing. The caller subsequently applies patch under its full guard.
|
|
37
|
-
* deadlineMs bounds each lookup as well as the primitive's submission deadline; without it,
|
|
38
|
-
* the supplied wire carrier retains its own deadline. Caller cancellation ends either path. */
|
|
39
|
-
export async function performHostedBlobDelivery(context, record, options) {
|
|
40
|
-
const row = captureBlobIntentRecord(record);
|
|
41
|
-
const prepared = freeze(decodePreparedBlobIntent(row.prepared));
|
|
42
|
-
const scope = captureJournalValue(context.scope), adapterFor = context.adapterFor;
|
|
43
|
-
const copied = { ...options };
|
|
44
|
-
if (!equalJournalValue(scope, prepared.scope))
|
|
45
|
-
throw new TypeError("blob delivery target does not match the trusted checkout scope");
|
|
46
|
-
if (typeof adapterFor !== "function" || row.receipt !== undefined)
|
|
47
|
-
throw new TypeError("blob delivery requires an adapter factory and an unsettled journal record");
|
|
48
|
-
if (Object.keys(copied).some(key => !["start", "signal", "deadlineMs", "maxLookups", "lookupDelayMs", "sleep", "acceptDeletes"].includes(key)))
|
|
49
|
-
throw new TypeError("unsupported blob delivery options");
|
|
50
|
-
const { start, signal, deadlineMs, maxLookups, lookupDelayMs, sleep, acceptDeletes } = copied;
|
|
51
|
-
for (const [name, value] of [["deadlineMs", deadlineMs], ["maxLookups", maxLookups], ["lookupDelayMs", lookupDelayMs]]) {
|
|
52
|
-
if (value !== undefined && (!Number.isSafeInteger(value) || value < (name === "maxLookups" ? 1 : 0)))
|
|
53
|
-
throw new TypeError("invalid blob delivery timing bound");
|
|
54
|
-
}
|
|
55
|
-
if (sleep !== undefined && typeof sleep !== "function")
|
|
56
|
-
throw new TypeError("invalid blob delivery timer");
|
|
57
|
-
if (acceptDeletes !== undefined && (start !== "submit-claimed" || prepared.intent.operationId !== "blobs.delete.v1" || !isAcceptedDeletionCount(acceptDeletes)))
|
|
58
|
-
throw new TypeError("acceptDeletes belongs only to this delete submission");
|
|
59
|
-
// Only a host deletion hold needs acceptance; a prefix proven by not-dispatched evidence alone resends as is.
|
|
60
|
-
if (start === "submit-claimed" && row.deletionHold !== undefined && (acceptDeletes === undefined || acceptDeletes < row.deletionHold.deletions))
|
|
61
|
-
throw new TypeError("held deletion continuation requires current invocation acceptance of its held count");
|
|
62
|
-
const bytes = prepared.bytesBase64 === undefined ? undefined : Uint8Array.from(atob(prepared.bytesBase64), c => c.charCodeAt(0));
|
|
63
|
-
// Each adapter receives one combined lifetime. Race cancellation even if a caller-supplied
|
|
64
|
-
// port hangs, and remove listeners/timers when that individual operation is finished.
|
|
65
|
-
async function call(attempt, lookup, work) {
|
|
66
|
-
const controller = new AbortController(), timer = new AbortController();
|
|
67
|
-
const watched = [...new Set([signal, attempt].filter((s) => s !== undefined))];
|
|
68
|
-
const abort = () => controller.abort();
|
|
69
|
-
for (const source of watched) {
|
|
70
|
-
if (source.aborted)
|
|
71
|
-
abort();
|
|
72
|
-
else
|
|
73
|
-
source.addEventListener("abort", abort, { once: true });
|
|
74
|
-
}
|
|
75
|
-
let interrupted;
|
|
76
|
-
try {
|
|
77
|
-
if (controller.signal.aborted)
|
|
78
|
-
throw new Error("blob delivery cancelled");
|
|
79
|
-
const cancelled = new Promise((_resolve, reject) => {
|
|
80
|
-
interrupted = () => reject(new Error("blob delivery cancelled or timed out"));
|
|
81
|
-
controller.signal.addEventListener("abort", interrupted, { once: true });
|
|
82
|
-
});
|
|
83
|
-
if (lookup && deadlineMs !== undefined) {
|
|
84
|
-
void Promise.resolve().then(() => (sleep ?? sleepTimer)(deadlineMs, timer.signal)).then(() => { if (!timer.signal.aborted)
|
|
85
|
-
abort(); }, abort);
|
|
86
|
-
}
|
|
87
|
-
const operation = Promise.resolve().then(() => {
|
|
88
|
-
if (controller.signal.aborted)
|
|
89
|
-
throw new Error("blob delivery cancelled");
|
|
90
|
-
return work(adapterFor(controller.signal));
|
|
91
|
-
});
|
|
92
|
-
return await Promise.race([operation, cancelled]);
|
|
93
|
-
}
|
|
94
|
-
finally {
|
|
95
|
-
timer.abort();
|
|
96
|
-
for (const source of watched)
|
|
97
|
-
source.removeEventListener("abort", abort);
|
|
98
|
-
if (interrupted)
|
|
99
|
-
controller.signal.removeEventListener("abort", interrupted);
|
|
100
|
-
controller.abort();
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
function candidate(raw) {
|
|
104
|
-
const receipt = freeze(blobReceipt(row.prepared, raw));
|
|
105
|
-
if (receipt.result.ok)
|
|
106
|
-
return freeze({ kind: "committed", receipt });
|
|
107
|
-
if (receipt.result.error.code === "version_conflict")
|
|
108
|
-
return freeze({ kind: "conflict", receipt });
|
|
109
|
-
return freeze({ kind: "refused", code: receipt.result.error.code, message: receipt.result.error.message, receipt });
|
|
110
|
-
}
|
|
111
|
-
const selected = await performUncertainWrite({
|
|
112
|
-
async submit(_intent, attempt) {
|
|
113
|
-
try {
|
|
114
|
-
const answer = await call(attempt?.signal, false, adapter => adapter.send(prepared.intent, { ...prepared.identity, ...(acceptDeletes === undefined ? {} : { acceptDeletes }) }, bytes));
|
|
115
|
-
if (answer.status === 428 && answer.result !== undefined && !answer.result.ok && prepared.intent.operationId === "blobs.delete.v1") {
|
|
116
|
-
const classified = classifyBlobWriteAnswer({ status: 428, body: { error: answer.result.error }, headers: new Headers() }, prepared.intent);
|
|
117
|
-
const captured = classified.result;
|
|
118
|
-
if (captured && !captured.ok && equalJournalValue(captured, answer.result) && classified.row.answer === "428 deletions_held" && equalJournalValue(classified.row, answer.row) && captured.error.writeState === "not_applied" && (row.notAppliedThrough ?? 0) === row.attempts - 1) {
|
|
119
|
-
return freeze({ kind: "not-executed", attempts: row.attempts, details: captureBlobDeletionHold({ deletions: captured.error.deletions, baseline: captured.error.baseline }) });
|
|
120
|
-
}
|
|
121
|
-
return UNKNOWN;
|
|
122
|
-
}
|
|
123
|
-
// A refusal the host answers before dispatch and never records (no grant, no bundle, the
|
|
124
|
-
// sync quota) proves this attempt did not execute. It settles the identity as refused only
|
|
125
|
-
// when every earlier attempt is proven not applied; otherwise an earlier delivery may still
|
|
126
|
-
// commit, and the identity stays unknown.
|
|
127
|
-
if (answer.status !== null && answer.result !== undefined && !answer.result.ok && UNRECORDED_REFUSALS.has(answer.result.error.code)) {
|
|
128
|
-
// Capture the evidence before reading the row, as the recorded path below does.
|
|
129
|
-
const classified = classifyBlobWriteAnswer({ status: answer.status, body: answer.status === 200 ? answer.result : { error: answer.result.error }, headers: new Headers() }, prepared.intent);
|
|
130
|
-
const captured = classified.result;
|
|
131
|
-
if (classified.row.recorded === "no") {
|
|
132
|
-
if (captured && !captured.ok && classified.row.answer === answer.row.answer && answer.row.recorded === "no" && captured.error.writeState === "not_applied" && (row.notAppliedThrough ?? 0) === row.attempts - 1)
|
|
133
|
-
return candidate(captured);
|
|
134
|
-
return UNKNOWN;
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
if (answer.status !== 200 || answer.result === undefined)
|
|
138
|
-
return UNKNOWN;
|
|
139
|
-
const classified = classifyBlobWriteAnswer({ status: 200, body: answer.result, headers: new Headers() }, prepared.intent);
|
|
140
|
-
if (classified.row.answer !== answer.row.answer || classified.row.recorded !== answer.row.recorded || classified.row.outcome !== answer.row.outcome ||
|
|
141
|
-
!(answer.row.recorded === "yes" || answer.row.recorded === "settled-only" && answer.settled === true))
|
|
142
|
-
return UNKNOWN;
|
|
143
|
-
return candidate(classified.result);
|
|
144
|
-
}
|
|
145
|
-
catch {
|
|
146
|
-
return UNKNOWN;
|
|
147
|
-
}
|
|
148
|
-
},
|
|
149
|
-
async lookup() {
|
|
150
|
-
// Availability failures remain failures for the existing bounded lookup owner. Absence
|
|
151
|
-
// and malformed terminal evidence are inconclusive outcomes, never resend permission.
|
|
152
|
-
const answer = await call(undefined, true, adapter => adapter.lookup(prepared.intent, prepared.identity));
|
|
153
|
-
try {
|
|
154
|
-
if (answer.status !== "committed" && answer.status !== "refused")
|
|
155
|
-
return UNKNOWN;
|
|
156
|
-
const outcome = candidate(answer.result);
|
|
157
|
-
if ((answer.status === "committed") !== (outcome.kind === "committed"))
|
|
158
|
-
return UNKNOWN;
|
|
159
|
-
return outcome;
|
|
160
|
-
}
|
|
161
|
-
catch {
|
|
162
|
-
return UNKNOWN;
|
|
163
|
-
}
|
|
164
|
-
},
|
|
165
|
-
}, { requestId: row.requestId, kind: prepared.intent.operationId, target: row.target, createdAt: prepared.createdAt, attempts: row.attempts, state: row.state, notAppliedThrough: row.notAppliedThrough ?? 0 }, { settlement: "recorded-only", start, signal, deadlineMs, maxLookups, lookupDelayMs, sleep });
|
|
166
|
-
const outcome = selected.outcome;
|
|
167
|
-
const patch = { state: selected.intent.state, attempts: selected.intent.attempts, ...(outcome.kind === "unknown" ? {} : outcome.kind === "not-executed" ? { notAppliedThrough: outcome.attempts, deletionHold: outcome.details } : { receipt: outcome.receipt }) };
|
|
168
|
-
return freeze({ attempts: selected.intent.attempts, state: selected.intent.state, lookups: selected.lookups, outcome, patch });
|
|
169
|
-
}
|
|
170
|
-
//# sourceMappingURL=blob-delivery.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"blob-delivery.js","sourceRoot":"","sources":["../../src/hosted-client/blob-delivery.ts"],"names":[],"mappings":"AAAA;oGACoG;AACpG,OAAO,EAAE,WAAW,EAAE,uBAAuB,EAAyB,uBAAuB,EAAE,wBAAwB,EAAuF,MAAM,oBAAoB,CAAC;AACzO,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjF,OAAO,EAAE,qBAAqB,EAA8D,MAAM,uBAAuB,CAAC;AAC1H,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AA4BzE,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,SAAkB,EAAE,CAAC,CAAC;AAC5D;;;;;GAKG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,oBAAoB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,gBAAgB,CAAU,CAAC,CAAC;AACtJ,MAAM,mBAAmB,GAAwB,IAAI,GAAG,CAAC,6BAA6B,CA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