402mob-runtime 0.4.0 → 0.5.0
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 +37 -6
- package/SOURCE.json +71 -0
- package/checks/block-network.cjs +15 -0
- package/checks/recovery.mjs +28698 -0
- package/dist/runtime/cli.js +2414 -1628
- package/package.json +12 -2
- package/public/wallet/app.js +1 -1
- package/public/wallet/index.html +1 -1
package/README.md
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
# 402Mob runtime
|
|
2
2
|
|
|
3
|
-
An owner-controlled Base USDC signer, delegated buyer and
|
|
3
|
+
An owner-controlled Base USDC signer, delegated buyer and deterministic seller. Requires Node.js 24+ on Linux or macOS. The versioned tarball contains executable JavaScript and the local wallet console; no private repository checkout, TypeScript loader or build is needed.
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
7
7
|
Use Node.js 24+ on Linux or macOS. Check https://evidence.contact/agent-runtime-release.json for this version's publication status. Use the npm commands below only when it reports `npmPublished: true`; otherwise use the standalone download described below.
|
|
8
8
|
|
|
9
9
|
```sh
|
|
10
|
-
npm exec --yes --package=402mob-runtime@0.
|
|
10
|
+
npm exec --yes --package=402mob-runtime@0.5.0 -- 402mob-runtime wallet web \
|
|
11
11
|
--dir "$HOME/.local/share/402mob/runtime-owner"
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
For a persistent CLI, install into your own prefix:
|
|
15
15
|
|
|
16
16
|
```sh
|
|
17
|
-
npm install --prefix "$HOME/.local/share/402mob/runtime-cli" --ignore-scripts 402mob-runtime@0.
|
|
17
|
+
npm install --prefix "$HOME/.local/share/402mob/runtime-cli" --ignore-scripts 402mob-runtime@0.5.0
|
|
18
18
|
export PATH="$HOME/.local/share/402mob/runtime-cli/node_modules/.bin:$PATH"
|
|
19
19
|
```
|
|
20
20
|
|
|
@@ -66,7 +66,7 @@ Run `402mob-runtime --help` for all commands. Full guides: https://evidence.cont
|
|
|
66
66
|
|
|
67
67
|
`local_port_in_use` means another process already owns the named local port. If it is your signer, press Enter in its original terminal for a new pairing link, or stop it with Ctrl+C and restart with the same `--dir`. Do not start a second signer for the same wallet on different ports. The CLI preserves wallet state and closes any listener opened during a failed startup. Version 0.2.0 reported this condition as `adapter_failure`.
|
|
68
68
|
|
|
69
|
-
If the local console page returns `adapter_failure` while the hosted console works, upgrade from 0.2.0 or 0.2.1 to 0.
|
|
69
|
+
If the local console page returns `adapter_failure` while the hosted console works, upgrade from 0.2.0 or 0.2.1 to 0.5.0. Those versions incorrectly blocked page assets beneath hidden installation directories such as `.npm` and `.local`. Stop the old signer, restart the upgraded version with the same wallet `--dir`, and use its new pairing link.
|
|
70
70
|
|
|
71
71
|
## Recovery and custody
|
|
72
72
|
|
|
@@ -74,7 +74,7 @@ Retain original private directories, credential and request IDs. Do not copy a w
|
|
|
74
74
|
|
|
75
75
|
## Execute accepted text-statistics terms
|
|
76
76
|
|
|
77
|
-
Runtime 0.
|
|
77
|
+
Runtime 0.5.0 can consume an already accepted negotiation for `text-statistics-v1`. Both participants must enroll first; the buyer enrollment wallet must be the runtime wallet. Negotiate through HTTP or MCP: the runtime does not poll conversations or propose terms.
|
|
78
78
|
|
|
79
79
|
Agree `direct_prepayment`, `application/json`, the seller's configured price, and exactly this deliverable:
|
|
80
80
|
|
|
@@ -109,7 +109,7 @@ During negotiation binding, transport failures and HTTP 429/5xx responses from t
|
|
|
109
109
|
|
|
110
110
|
## Agent tool workflow
|
|
111
111
|
|
|
112
|
-
Runtime 0.
|
|
112
|
+
Runtime 0.5.0 adds agent tools around the existing task and payment journal. This is a local candidate until the release record confirms publication and deployment. It does not add arbitrary work execution, automatic bargaining or protected escrow to the local buyer.
|
|
113
113
|
|
|
114
114
|
```text
|
|
115
115
|
inspect exact offer / choose supported text work
|
|
@@ -215,3 +215,34 @@ Redacted diagnostics report lifecycle counters and sanitized errors, but do not
|
|
|
215
215
|
The local one-day task deadline blocks new commitments. After that deadline, a task can still reconcile its existing signed payment, retrieve its result and finish its receipt. Recovery must use the same task, delegation, checkout resource and saved authorization; it cannot sign a replacement payment. Existing retry, cycle and hosted retention limits still apply.
|
|
216
216
|
|
|
217
217
|
Owner retry checks deadline eligibility before consuming the retry allowance. An expired task without a bound signed payment stays stopped. Keep the original journal for paid or uncertain outcomes.
|
|
218
|
+
|
|
219
|
+
## Lookup by need (0.5.0)
|
|
220
|
+
|
|
221
|
+
Run `402mob-runtime buyer lookup --file need.json`, or call local MCP `lookup_resources`, with the input in the [lookup guide](https://evidence.contact/resource-lookup.md). This uses the existing buyer gateway credential and reads public candidates without spending. It does not filter by wallet policy or guarantee installed capability support. Inspect exact terms and check readiness before submitting a saved task. Public HTTP and hosted MCP lookup require no credential. Version 0.4.0 lacks this command.
|
|
222
|
+
|
|
223
|
+
## Retained buyer need
|
|
224
|
+
|
|
225
|
+
Runtime 0.5.0 candidate includes `create_intent`, `get_intent`, `lookup_intent`, `select_intent_candidate` and `prepare_intent_task` through the shared local command interface. Save a need, inspect a prepared candidate and retain one immutable task before using existing readiness/submission. These are local buyer commands, not hosted MCP tools. Lookup explicitly sends the need to the configured service. See [buyer intent workflow](https://evidence.contact/buyer-intents.md) for JSON inputs, revisions, deadlines and recovery.
|
|
226
|
+
|
|
227
|
+
## Work distribution
|
|
228
|
+
|
|
229
|
+
Runtime 0.5.0 candidate adds installed service descriptors, a JSON validation/normalization seller adapter, bounded invitations using existing negotiations, exact proposal selection, portable reference inspection and owned intent metrics. See [workflow and commands](https://evidence.contact/work-distribution.md) and [descriptor inventory](https://evidence.contact/service-descriptors.json). Fresh communication needs an owner-attached enrolled buyer identity matching the wallet; prepared purchases do not. No remote code is installed and no automatic seller substitution occurs.
|
|
230
|
+
|
|
231
|
+
### Reproduce release checks (0.5.0 candidate)
|
|
232
|
+
|
|
233
|
+
From the extracted package directory, run:
|
|
234
|
+
|
|
235
|
+
```sh
|
|
236
|
+
node --require ./checks/block-network.cjs ./bin/402mob-runtime --schema
|
|
237
|
+
node ./checks/recovery.mjs
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
The first command blocks Node network and subprocess calls and fails if any are attempted, even if the program catches the error. This is test instrumentation, not an operating-system sandbox. Discovery needs no wallet or credential.
|
|
241
|
+
|
|
242
|
+
The recovery fixture runs the actual buyer runtime in child processes with private temporary journals. It kills a process with `SIGKILL` after the mock service commits a payment but before the response, then repeats at the receipt boundary. Restart uses the same task, journal and signed payment. Its JSON report compares task, operation and receipt references and requires exactly one mock payment and one mock receipt per case. The fixture clock advances 121 seconds to expire the dead process's lease. Catalog, settlement, chain confirmation and receipt storage are mocked; this does not test mainnet settlement, the gateway `submit_task` transport, or a simultaneous service failure. Temporary wallets are unfunded and removed afterwards.
|
|
243
|
+
|
|
244
|
+
`SOURCE.json` records SHA-256 fingerprints of build inputs and the locked dependency file, alongside the source repository and package directory. Publication-status flags are normalized to the same snapshot used by the bundler. These are reproducibility fingerprints, not an npm provenance attestation or an independent security audit. The release JSON gives the archive checksum; dependency license notices are inside the archive.
|
|
245
|
+
|
|
246
|
+
### Wallet policy failures
|
|
247
|
+
|
|
248
|
+
`delegation_budget_exhausted` means a configured lifetime budget cannot cover the payment, including existing reservations. `payment_outside_delegation` means the payee, asset or per-payment amount violates policy. Merchant, capability, task-price and offer mismatches also retain their specific safe error codes. A stopped task returns `repair_configuration` for the owner, preserves the task and grants no new payment authority. Adding wallet funds does not raise a policy limit. Review the original policy and retained reservations; do not clear journals or create a replacement task to bypass them. Policy review is not an automatic limit increase or a promise that the existing grant can be edited.
|
package/SOURCE.json
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
{
|
|
2
|
+
"repository": "https://github.com/gggggggg424242/402mob",
|
|
3
|
+
"packageDirectory": "packages/agent-runtime",
|
|
4
|
+
"kind": "source-file-sha256-inventory",
|
|
5
|
+
"npmProvenanceAttestation": false,
|
|
6
|
+
"publicationFlagsNormalized": [
|
|
7
|
+
"src/runtime/distribution.ts"
|
|
8
|
+
],
|
|
9
|
+
"files": {
|
|
10
|
+
"deploy/build-runtime.mjs": "f63574562a45098e360e403489b27ca5ec7bd61bd5d9880a61969dd9df31292f",
|
|
11
|
+
"deploy/runtime-source.mjs": "b0a79f4185883617983d357fc03244d264b5ab2d2a8951160cf08c7dba8df7c3",
|
|
12
|
+
"package-lock.json": "0267f0cf91880b9b3d6b0cc8946af399d9a96905ce8e29a737361f42199a0e2f",
|
|
13
|
+
"packages/agent-runtime/checks/block-network.cjs": "a2b3531156af4820fe87ee5fd576842e952207caa068c3917df9115e0c87f807",
|
|
14
|
+
"packages/agent-runtime/package.json": "34e7efa1d9e09d4f89edfdd49b3bb9b3df552a449594bf7b43ad595c904eeb48",
|
|
15
|
+
"scripts/package-agent-runtime.mjs": "a81e06482640f7ce4085b375b28185db68b88e1cda7aee2274e9ee0b4301d486",
|
|
16
|
+
"src/business-routes.ts": "e2f74d10354c00dcd53996afcd7abdbbe00f61c3ecf62819f94f8f38b0118e16",
|
|
17
|
+
"src/crypto.ts": "45408e926808f467337f3f34f5f87c14d329bf3847819e5058d04da6c4df5b63",
|
|
18
|
+
"src/errors.ts": "3a18f0dc6f1b14ec881d84319bd4be33f472bd761350f2af02f7d7fe1f75430b",
|
|
19
|
+
"src/logging.ts": "657b5d6891e096828e8e126d684876ec64fb39558256e0cb6a5e22059bc5ee95",
|
|
20
|
+
"src/negotiations.ts": "9e869587220601edad4adb43cbede874f0757f614f58b7c8c62488ee416aa083",
|
|
21
|
+
"src/payments.ts": "c76880788206174b2283f773c8490605424a953f50b15749e3043d38f851c0bf",
|
|
22
|
+
"src/resource-lookup-schema.ts": "7b670d845ee6c4b0db8ccd0d3eb6da60a043cc36b1bbbb742532a59b0bc4b666",
|
|
23
|
+
"src/route-conformance-cases.ts": "bacb0d0548af3a67fbe3062e2ec0a419bca974b23593aa9ac569dbf8c2c747ce",
|
|
24
|
+
"src/route-conformance.ts": "d0688be3d3a48280959db076ebfa801d032c23d25fc5b18754644cc6fcb1727f",
|
|
25
|
+
"src/runtime/actions.ts": "2e2f67a3fc2f20405f6d97a36b3736236294401177910209babbb829e40ca1e4",
|
|
26
|
+
"src/runtime/artifact.ts": "a3a97963e4cef979b8d70fbdfa3a4a34ea25467aedef8257e18ccccd1f2ccbc6",
|
|
27
|
+
"src/runtime/buyer.ts": "91938771788cb493b9dcb82726cc92d093a195296b7dd4780390a50448760858",
|
|
28
|
+
"src/runtime/catalog.ts": "f1d3b44a106905d293e6e01ede53a945ea5a73550b4cc63410442f326f36a74d",
|
|
29
|
+
"src/runtime/chain.ts": "1c82ce5476dea6f7874d3b1091997ddcd5ec8e1d0bf6f295be096f0933bb27cd",
|
|
30
|
+
"src/runtime/cli.ts": "c92cb049dce66588f959c6886f781ca6a3347d749d935a87af546254cf68227c",
|
|
31
|
+
"src/runtime/commands.ts": "e7fa1b657a357e9489ed66af8ffa677ea9021815e58fad22299191c00f2104c3",
|
|
32
|
+
"src/runtime/common.ts": "1a7317979ca67c8f6b6b7a9c4710fc02052a7b0e44b13f768f785a200ff46985",
|
|
33
|
+
"src/runtime/core.ts": "240e469c416e48cc7ca3e3015a9248e24df02d55d55974ce1a5911b572db10cf",
|
|
34
|
+
"src/runtime/diagnostics.ts": "12c6cf9a120f5e601045a841259a4e3396036f2b22dd53f4e16bbe480ac6d29f",
|
|
35
|
+
"src/runtime/distribution.ts": "8eed8eef77b35e59a6161634b619fbb76c753e37c24211c07ce23fe7ad0d492d",
|
|
36
|
+
"src/runtime/http.ts": "6da3338a1da8b6b3dd692e7998835ea0f84c4253cdbbbc1bb83d00a13ccc95eb",
|
|
37
|
+
"src/runtime/intent-binding.ts": "4aeee52061d6d688fe79b6871511e79b38a4406e4d7edcee74401159f1936cc7",
|
|
38
|
+
"src/runtime/intents.ts": "4208ebf0594d74b5dc7796a21d0f2ea38243446ecb8813eb6be857fe8ce450f2",
|
|
39
|
+
"src/runtime/listener.ts": "bff86d476ec505dc047c7e8e3d40c7cae6b227c7b0ed79642a460cc5a881112d",
|
|
40
|
+
"src/runtime/mcp.ts": "1ef9e15d675c90d469b33190ba58f9692d11023f400a9f78aed860c054fa5b47",
|
|
41
|
+
"src/runtime/model.ts": "5eb5d838182250cce3c67f85ca48e75f69357f3afd7159a625f8273918a604b9",
|
|
42
|
+
"src/runtime/negotiation-identity.ts": "c39ad443d47f41ef36bc907ae0e82fabdb3f4b125d23ea1ccb2307096de146ba",
|
|
43
|
+
"src/runtime/portable-services.ts": "bef917bac0e6bfb059db9ff9f59860af80e35cd1b978a0cf89f66b71a92876cc",
|
|
44
|
+
"src/runtime/protocol.ts": "07c4866159d30482d99e632daf976cc9522009b06146ab5b9efba71dff495a3b",
|
|
45
|
+
"src/runtime/readiness.ts": "7842dbe43a9ec92e4a804a12444391c4baa3eb0005bd6467ab145c677d301933",
|
|
46
|
+
"src/runtime/recovery-check.ts": "c3cbe06bc4bb9f9a0553b36e75c816097ec4518de9e3c1d2f4c1f937f9ea52c3",
|
|
47
|
+
"src/runtime/seller.ts": "54e2f1cbe2c255f2a39e48b38dd9430cc2bf6ba1e69e538cb194bc06a41d694b",
|
|
48
|
+
"src/runtime/server.ts": "3f599c54411e483b4ea8c305649d880f4e9bd1f26c32d7c77c4f089a678294a5",
|
|
49
|
+
"src/runtime/service-adapters.ts": "f5ee789389c482eeea040302a3f50c6b8a606e32098573320a46a077b5ee2558",
|
|
50
|
+
"src/runtime/service-descriptors.ts": "5154b62ffad57f0f5226094d163224070b27bd8e76d46729a157693ad6daecf4",
|
|
51
|
+
"src/runtime/simulation.ts": "59cd8a888ea59a29c43a1573fed0288361d4bf65b920c3fe8ff80ddbf1255bfe",
|
|
52
|
+
"src/runtime/store.ts": "4bed874bb2c4ad7517849815a6d847190f7f9890de1d2de90081025537f1fe84",
|
|
53
|
+
"src/runtime/text-statistics.ts": "8a485a9c8f3ad1bde9f834bb5cb7956d067ef11202c1ff702647e42e05146e09",
|
|
54
|
+
"src/runtime/wallet.ts": "00210059d9155020e69bb10e8e1b9ed456ff5a1ad7c9156ddc78e3b7be7836c8",
|
|
55
|
+
"src/runtime/web-contract.ts": "d8884c7dce634774be2af6e85929da5ca9b9ed8002a05b28dc7cc48c51216420",
|
|
56
|
+
"src/runtime/web-launch.ts": "328e2fcae9a2dc146c603e88314d088712167779540ec57237919a60bf92b64e",
|
|
57
|
+
"src/runtime/web-server.ts": "091e5fa833cf9741d556f946c09d5d80c23cf5cd284960fd6b90d89f1d516226",
|
|
58
|
+
"src/runtime/web-service.ts": "3b0808a58845cfe944017c4ba6dcde2e425bed67f8470172f559d1e7ef016938",
|
|
59
|
+
"src/text-schemas.ts": "cf5164a028bab48dc94213dd058a3353dae7d1682efd97a02075b79ea7249ec1",
|
|
60
|
+
"src/transaction-evidence/client.ts": "4bd31bd79d383881d448b4f558005d6de70a9cc0326c908ce335d2d431c759b7",
|
|
61
|
+
"src/transaction-evidence/core.ts": "f05f13615b6207833fad129212fc80c60ae5b6456ab3840406d2aceba2e8ce7c",
|
|
62
|
+
"src/transaction-evidence/negotiation.ts": "c0aa6da4522edafd287be1fb9558bfb82d44199ec3228a93fedf3b6acf718634",
|
|
63
|
+
"src/transaction-evidence/offer-schema.ts": "7b0caae2950109eaa3266a3e127e962fe2ceb47c77b83e4cfbc770597a23ad2e",
|
|
64
|
+
"src/transaction-evidence/protected-format.ts": "9b0e0d83a701f6dea0d4e600346f1d01a9651684fea8c0fa8575d5d62df6d812",
|
|
65
|
+
"src/transaction-evidence/protected-specifications.ts": "2793268e89053d83a75ad3d8242b34d1235f2ad81c48e8be803e525633fcc9c1",
|
|
66
|
+
"src/transaction-evidence/records-schema.ts": "4abbcfee86a9d7982ea9667186a563dc9f9b01649ea72684aa42b6575891e770",
|
|
67
|
+
"src/transaction-evidence/records.ts": "cd37feef24335e44da69aad6a767c0286bfb3211cf35ce0bb7f26afb44361f5a",
|
|
68
|
+
"src/transaction-evidence/schema.ts": "28621f661d05d29432b71f35c95ca8d2e6f71d3f1d3212f1130f1cef4a740e50",
|
|
69
|
+
"src/worker-profiles.ts": "bcfd952377246d2a88c87b278600c1eaa5613f468bff9fa8fe1d4f89f8dbcb84"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Test instrumentation, not an operating-system security sandbox.
|
|
2
|
+
const { syncBuiltinESMExports } = require('node:module');
|
|
3
|
+
let attempts = 0;
|
|
4
|
+
const deny = () => { attempts++; throw new Error('Discovery network/subprocess access blocked'); };
|
|
5
|
+
globalThis.fetch = deny;
|
|
6
|
+
for (const [name, methods] of [
|
|
7
|
+
['node:net', ['connect', 'createConnection']],
|
|
8
|
+
['node:tls', ['connect']], ['node:http', ['request', 'get']], ['node:https', ['request', 'get']],
|
|
9
|
+
['node:dgram', ['createSocket']], ['node:dns', ['lookup', 'resolve', 'resolve4', 'resolve6']],
|
|
10
|
+
['node:child_process', ['spawn', 'spawnSync', 'exec', 'execSync', 'execFile', 'execFileSync', 'fork']],
|
|
11
|
+
]) { const mod = require(name); for (const key of methods) mod[key] = deny; }
|
|
12
|
+
require('node:net').Socket.prototype.connect = deny;
|
|
13
|
+
for (const key of Object.keys(require('node:dns').promises)) if (typeof require('node:dns').promises[key] === 'function') require('node:dns').promises[key] = deny;
|
|
14
|
+
syncBuiltinESMExports();
|
|
15
|
+
process.on('exit', () => { if (attempts) { process.stderr.write(`Blocked discovery access attempts: ${attempts}\n`); process.exitCode = 91; } });
|