@amalgm/shell 0.1.122 → 0.1.124
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/bundle-automations.d.ts +1 -1
- package/dist/bundle-automations.js +11 -2
- package/dist/bundle-automations.js.map +1 -1
- package/dist/content-direct.d.ts +11 -8
- package/dist/content-direct.js +82 -33
- package/dist/content-direct.js.map +1 -1
- package/dist/machine-host.js +5 -1
- package/dist/machine-host.js.map +1 -1
- package/dist/platform-product-host.d.ts +2 -0
- package/dist/platform-product-host.js +36 -56
- package/dist/platform-product-host.js.map +1 -1
- package/dist/user-ground-host.js +10 -9
- package/dist/user-ground-host.js.map +1 -1
- package/dist/wire-client.js +1 -1
- package/npm-shrinkwrap.json +10 -10
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform-product-host.js","sourceRoot":"","sources":["../src/platform-product-host.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,uBAAuB,GAGxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,oBAAoB,EAAuC,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"platform-product-host.js","sourceRoot":"","sources":["../src/platform-product-host.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,6BAA6B,EAC7B,uBAAuB,GAGxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,oBAAoB,EAAuC,MAAM,kBAAkB,CAAC;AAuB7F,MAAM,UAAU,yBAAyB,CAAC,OAAmC;IAC3E,MAAM,WAAW,GAAG,sBAAsB,CAAC;QACzC,OAAO,EAAE,OAAO,CAAC,kBAAkB;QACnC,OAAO,EAAE,UAAU,CAAC,OAAO,CAAC,aAAa,EAAE,oBAAoB,EAAE,gBAAgB,CAAC;QAClF,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,K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CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,MAAM,CAAC,SAAS,EAAE,CAAC;KAC3E,CAAC;AACJ,CAAC;AAED,SAAS,MAAM,CAAC,KAAc;IAC5B,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC;IAC3F,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC7D,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACrD,OAAO,OAAO,CAAC,KAAK,CAAC,IAAI,OAAO,KAAK,KAAK,QAAQ;WAC7C,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,KAAK,MAAM,CAAC,SAAS;WACjD,MAAM,CAAC,MAAM,CAAC,KAAgC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;AACrE,CAAC"}
|
package/dist/user-ground-host.js
CHANGED
|
@@ -3,7 +3,7 @@ import { existsSync, lstatSync, realpathSync, readFileSync, readdirSync, readlin
|
|
|
3
3
|
import { open, readFile } from "node:fs/promises";
|
|
4
4
|
import { basename, dirname, extname, isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
5
5
|
import { buildUserHomeManifest, buildUserManifest, liveMachineStateDir, scopedAmalgmDir, shippedUserHomeDeclaration, } from "@amalgm/core/identity";
|
|
6
|
-
import { CHUNK_BYTES, CONTENT_CONTRACT, INLINE_CARGO_MAX_BYTES, ENTITY_CLOUD_CONTRACT, ENTITY_CLOUD_SCHEMA_VERSION, artifactForRecord, canonicalVersion, checkContentManifest, classifyDirectory, classifyFile, classifyRegisteredRoot, createLocalEntityRecord, createEntityRecordAuthorityPort, convergeUserGround, decodeAcceptedEntityRecord, deriveUploadManifest, createUserGroundEnrollmentPolicy, isRepositoryMetadataEntry, indexRepositoryTerritory, downloadAll as downloadAllArtifacts, encodeEntityRecord, EntityApplyRail, EntityRecordRail, membershipHash, pathIsSuspect,
|
|
6
|
+
import { CHUNK_BYTES, CONTENT_CONTRACT, INLINE_CARGO_MAX_BYTES, ENTITY_CLOUD_CONTRACT, ENTITY_CLOUD_SCHEMA_VERSION, artifactForRecord, canonicalVersion, checkContentManifest, classifyDirectory, classifyFile, classifyRegisteredRoot, createLocalEntityRecord, createEntityRecordAuthorityPort, convergeUserGround, decodeAcceptedEntityRecord, deriveUploadManifest, createUserGroundEnrollmentPolicy, isRepositoryMetadataEntry, indexRepositoryTerritory, downloadAll as downloadAllArtifacts, encodeEntityRecord, EntityApplyRail, EntityRecordRail, membershipHash, pathIsSuspect, CONTENT_REFS_BATCH_OBJECTS, privateEntityResourceId, repositoryIdentityHash, sameRecords, snapshotFromRecords, stableJson, streamCargo, travelingRecords, upload as uploadArtifact, userGroundRecords, GRAPH_HEAD_OPERATION_KIND, } from "@amalgm/live";
|
|
7
7
|
import Database from "better-sqlite3";
|
|
8
8
|
import { atomicCopy, atomicWrite, ensurePrivateDir, ensureUserDir } from "./filesystem.js";
|
|
9
9
|
import { emitFilesStage, } from "./files-observability.js";
|
|
@@ -833,10 +833,10 @@ export class UserGroundHost {
|
|
|
833
833
|
throw new Error("entity Record rail already started");
|
|
834
834
|
await this.wire.open();
|
|
835
835
|
// One floor, no per-feature gates: this shell and its gateway release
|
|
836
|
-
// together, and the gateway ships first.
|
|
837
|
-
//
|
|
838
|
-
// resolve
|
|
839
|
-
if (this.wire.protocolVersion <
|
|
836
|
+
// together, and the gateway ships first. 14 = immutable content packs
|
|
837
|
+
// with a refs frame answering locations; an older gateway still speaks
|
|
838
|
+
// presign and cannot resolve a packed object at all.
|
|
839
|
+
if (this.wire.protocolVersion < 14) {
|
|
840
840
|
throw new Error("gateway speaks an older wire protocol than this shell");
|
|
841
841
|
}
|
|
842
842
|
this.adoptCloudDeliveryBaseline(identity, this.cloudState.deliveryWatermark);
|
|
@@ -1637,8 +1637,9 @@ export class UserGroundHost {
|
|
|
1637
1637
|
};
|
|
1638
1638
|
// Every storage object — the manifest and each block — is fetched
|
|
1639
1639
|
// straight from content storage over a presigned URL and opened locally;
|
|
1640
|
-
//
|
|
1641
|
-
//
|
|
1640
|
+
// packed objects arrive as merged byte ranges of their immutable pack.
|
|
1641
|
+
// The wire carries only the key handoff and refs requests. A retry asks
|
|
1642
|
+
// for a fresh ref every attempt.
|
|
1642
1643
|
const fetchObject = async (object) => {
|
|
1643
1644
|
requests += 1;
|
|
1644
1645
|
const bytes = await retryContent(() => this.direct.fetchObject(resourceId, object), true, retryAttempts);
|
|
@@ -2275,8 +2276,8 @@ export class UserGroundHost {
|
|
|
2275
2276
|
* frames; the answer is the only permission to skip an upload. */
|
|
2276
2277
|
async sealedContentHashes(resourceId, hashes) {
|
|
2277
2278
|
const batches = [];
|
|
2278
|
-
for (let start = 0; start < hashes.length; start +=
|
|
2279
|
-
batches.push(hashes.slice(start, start +
|
|
2279
|
+
for (let start = 0; start < hashes.length; start += CONTENT_REFS_BATCH_OBJECTS) {
|
|
2280
|
+
batches.push(hashes.slice(start, start + CONTENT_REFS_BATCH_OBJECTS));
|
|
2280
2281
|
}
|
|
2281
2282
|
const sealed = new Set();
|
|
2282
2283
|
const answers = await Promise.all(batches.map((batch) => retryContent(() => this.wire.request({
|