@amalgm/shell 0.1.164-main.42113977564 → 0.1.164-main.42126762571
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.
|
Binary file
|
|
Binary file
|
|
@@ -11,6 +11,7 @@ import { Readable } from 'node:stream';
|
|
|
11
11
|
import { DatabaseSync } from 'node:sqlite';
|
|
12
12
|
import { Metadata, MetadataKind } from '@tufjs/models';
|
|
13
13
|
import { LAYOUT_VERSION } from '@amalgm/core/identity';
|
|
14
|
+
import { ENTITY_CLOUD_CONTRACT } from '@amalgm/live';
|
|
14
15
|
import { admitManagedRuntimeRelease } from '@amalgm/core/supervision';
|
|
15
16
|
import { runtimeRoot } from '../dist/updates/trust.js';
|
|
16
17
|
import { examineArchive, hashFile, runIsolated } from '../dist/updates/artifacts.js';
|
|
@@ -74,6 +75,15 @@ async function packageLayout(packageRoot) {
|
|
|
74
75
|
return version;
|
|
75
76
|
}
|
|
76
77
|
|
|
78
|
+
/** The cloud entity contract the Live an installed package carries speaks. */
|
|
79
|
+
async function packageContract(packageRoot) {
|
|
80
|
+
const live = path.join(packageRoot, 'node_modules', '@amalgm', 'live');
|
|
81
|
+
const entry = (await readJson(path.join(live, 'package.json'))).exports['.'].default;
|
|
82
|
+
const { ENTITY_CLOUD_CONTRACT: contract } = await import(pathToFileURL(path.join(live, entry)).href);
|
|
83
|
+
assert.ok(typeof contract === 'string' && contract.length > 0, 'An installed package must declare its cloud contract');
|
|
84
|
+
return contract;
|
|
85
|
+
}
|
|
86
|
+
|
|
77
87
|
/** Failure evidence observes existing owners without copying credentials or
|
|
78
88
|
* creating another update decision. Each input and output has a byte bound. */
|
|
79
89
|
export async function runtimeFailureEvidence(packageRoot, identity) {
|
|
@@ -237,15 +247,20 @@ test('the real native Shell service replaces its authorized package and survives
|
|
|
237
247
|
if (errors.length) throw new AggregateError(errors, 'Native runtime examination cleanup failed');
|
|
238
248
|
});
|
|
239
249
|
const packageRoot = await installArchive(artifact, temporary, examination);
|
|
240
|
-
// A
|
|
241
|
-
//
|
|
242
|
-
//
|
|
250
|
+
// A computer that cannot carry its state into the candidate starts again
|
|
251
|
+
// from a fresh install, so the baseline cannot adopt the candidate: a new
|
|
252
|
+
// on-disk layout has no migration, and a baseline speaking an earlier cloud
|
|
253
|
+
// contract cannot even sign in, because the authority moves before its
|
|
254
|
+
// clients. Certify that fresh install of the exact candidate instead.
|
|
243
255
|
const layout = { from: await packageLayout(packageRoot), to: LAYOUT_VERSION };
|
|
244
|
-
const
|
|
256
|
+
const contract = { from: await packageContract(packageRoot), to: ENTITY_CLOUD_CONTRACT };
|
|
257
|
+
const reset = layout.from !== layout.to || contract.from !== contract.to;
|
|
245
258
|
serviceRoot = reset ? await installArchive(nextArtifact, path.join(temporary, 'candidate'), examination) : packageRoot;
|
|
246
259
|
if (reset) {
|
|
247
260
|
assert.equal(await packageLayout(serviceRoot), LAYOUT_VERSION, 'The candidate archive must carry the examined layout');
|
|
248
|
-
|
|
261
|
+
assert.equal(await packageContract(serviceRoot), ENTITY_CLOUD_CONTRACT, 'The candidate archive must carry the examined cloud contract');
|
|
262
|
+
if (layout.from !== layout.to) proof.layoutReset = layout;
|
|
263
|
+
if (contract.from !== contract.to) proof.contractReset = contract;
|
|
249
264
|
}
|
|
250
265
|
const installed = reset ? { release: view.candidate, artifact: nextArtifact } : { release: view.baseline, artifact };
|
|
251
266
|
initializingFixtures = true;
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amalgm/shell",
|
|
3
|
-
"version": "0.1.164-main.
|
|
3
|
+
"version": "0.1.164-main.42126762571",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@amalgm/shell",
|
|
9
|
-
"version": "0.1.164-main.
|
|
9
|
+
"version": "0.1.164-main.42126762571",
|
|
10
10
|
"license": "UNLICENSED",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@amalgm/agents": "0.2.3-main.42036939860",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amalgm/shell",
|
|
3
|
-
"version": "0.1.164-main.
|
|
3
|
+
"version": "0.1.164-main.42126762571",
|
|
4
4
|
"description": "The Amalgm runtime host assembled from the published @amalgm SDK capabilities.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -170,11 +170,11 @@
|
|
|
170
170
|
}
|
|
171
171
|
]
|
|
172
172
|
},
|
|
173
|
-
"gitHead": "
|
|
173
|
+
"gitHead": "8fcc962324a97933ac1d6c2b896db27689c4cbe3",
|
|
174
174
|
"amalgmSource": {
|
|
175
175
|
"repository": "amalgm-inc/amalgm-shell",
|
|
176
176
|
"branch": "main",
|
|
177
|
-
"commit": "
|
|
178
|
-
"occurrence": "
|
|
177
|
+
"commit": "8fcc962324a97933ac1d6c2b896db27689c4cbe3",
|
|
178
|
+
"occurrence": "42126762571"
|
|
179
179
|
}
|
|
180
180
|
}
|