@ramex-labs/continuity-remote 0.3.0-preview.1 → 0.3.0-preview.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/BUILD-PROVENANCE.json +4 -4
- package/README.md +1 -1
- package/dist/remote-tools/client.mjs +3 -1
- package/package.json +1 -1
package/BUILD-PROVENANCE.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"sources": [
|
|
10
10
|
{
|
|
11
11
|
"path": "packages/remote-tools/client.mjs",
|
|
12
|
-
"sha256": "
|
|
12
|
+
"sha256": "fd8a9abadc9c0908476426a64147ad3745bcf3be4f0bb0cb302cab50ee9e4547"
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
"path": "packages/remote-tools/CONTRACT.md",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
"path": "packages/remote-tools/README.md",
|
|
48
|
-
"sha256": "
|
|
48
|
+
"sha256": "230617f3aab0f8e7f47e6571d815f7dcb6799d565a5b864a8c06813813bd573e"
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
51
|
"path": "packages/remote-tools/recovery.mjs",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"buildInputs": [
|
|
76
76
|
{
|
|
77
77
|
"path": "tools/remote-build/build.mjs",
|
|
78
|
-
"sha256": "
|
|
78
|
+
"sha256": "6b0c6094f793412dab26a3cd0fbddaf0c991eb131fcf545ea6ad32f1d1ce2598"
|
|
79
79
|
},
|
|
80
80
|
{
|
|
81
81
|
"path": "tools/remote-build/templates/attempts.d.mts",
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
},
|
|
139
139
|
{
|
|
140
140
|
"path": "dist/remote-tools/client.mjs",
|
|
141
|
-
"sha256": "
|
|
141
|
+
"sha256": "fd8a9abadc9c0908476426a64147ad3745bcf3be4f0bb0cb302cab50ee9e4547"
|
|
142
142
|
},
|
|
143
143
|
{
|
|
144
144
|
"path": "dist/remote-tools/destination.mjs",
|
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ Install this experimental preview from npm or the matching release archives. Use
|
|
|
12
12
|
mkdir continuity-example
|
|
13
13
|
cd continuity-example
|
|
14
14
|
npm init -y
|
|
15
|
-
npm install --ignore-scripts @ramex-labs/continuity-remote@0.3.0-preview.
|
|
15
|
+
npm install --ignore-scripts @ramex-labs/continuity-remote@0.3.0-preview.2
|
|
16
16
|
npm install --ignore-scripts viem@2.55.19
|
|
17
17
|
cp node_modules/@ramex-labs/continuity-remote/examples/walkthrough.mjs .
|
|
18
18
|
node walkthrough.mjs
|
|
@@ -18,7 +18,9 @@ export function createCooperativeClient({url,serviceId,coordinatorPrivateKey,ser
|
|
|
18
18
|
const call=async(operation,payload)=>{
|
|
19
19
|
const body=capture({version:'continuity-cooperative-request/1',serviceId,nonce:randomBytes(32).toString('hex'),operation,payload});
|
|
20
20
|
const envelope=signRequest(body,coordinatorPrivateKey),expectedDigest=canonicalDigest(body);
|
|
21
|
-
|
|
21
|
+
// Synchronous history replay can outlive an idle pooled socket. This local
|
|
22
|
+
// profile opens a fresh connection per signed request; it never auto-retries.
|
|
23
|
+
const response=await fetch(endpoint.origin+'/cooperative',{method:'POST',headers:{'content-type':'application/json',connection:'close'},
|
|
22
24
|
body:encodeTransport(envelope),redirect:'manual',signal:AbortSignal.timeout(timeoutMs)});
|
|
23
25
|
if(response.status!==200){await response.body?.cancel();throw Error('TRANSPORT_UNAVAILABLE');}
|
|
24
26
|
const parts=[];let length=0;
|