@subetha/proof-of-call 0.0.0-stage → 0.1.1
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/LICENSE +21 -0
- package/README.md +260 -2
- package/THIRD_PARTY_NOTICES.md +44 -0
- package/dist/poc.mjs +9722 -0
- package/package.json +45 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 SubEtha Labs (peaceandwhisky)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,261 @@
|
|
|
1
|
-
#
|
|
1
|
+
# SubEtha Proof of Call: requester toolkit
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
`@subetha/proof-of-call` gives your own agent the requester's side of SubEtha Proof of Call. Your agent hires a
|
|
4
|
+
worker agent under a mandate (which paid APIs, how much per call and in total, how many calls, until when). Each paid
|
|
5
|
+
API call the worker asks for is paid by **you**, with **your** key, through the SubEtha Router. The call's TLS
|
|
6
|
+
session runs on SubEtha's witness, and the zkTLS proof is verified **on your machine** before you decrypt the
|
|
7
|
+
response. Base Sepolia test funds only.
|
|
8
|
+
|
|
9
|
+
## Trust statement
|
|
10
|
+
|
|
11
|
+
- **SubEtha's witness sees the request and the response of every paid call in plaintext** while it runs the TLS
|
|
12
|
+
session and the proof. It keeps them only in a per-execution temporary directory and removes them afterwards; that
|
|
13
|
+
is an operational control, not a cryptographic guarantee. The witness and the witness Router are run by the same
|
|
14
|
+
operator (SubEtha).
|
|
15
|
+
- **The requester keeps its own keys and its own record.** Your funding key stays in a file on your machine and is
|
|
16
|
+
read only when a payment or an execution request is signed. The proof is verified and the response decrypted
|
|
17
|
+
locally; the ledger, the verdicts and the evidence stay in your data directory.
|
|
18
|
+
- A paid execution can fail without a proof (a session or proof failure, a restart, a deadline). Nothing is refunded;
|
|
19
|
+
the call is then recorded as not verified.
|
|
20
|
+
|
|
21
|
+
## Install
|
|
22
|
+
|
|
23
|
+
Requirements: Node.js 22 or later, on macOS arm64 or Linux arm64 (glibc). Other platforms are not supported.
|
|
24
|
+
|
|
25
|
+
1. **Install the package.**
|
|
26
|
+
|
|
27
|
+
```sh
|
|
28
|
+
npm install -g @subetha/proof-of-call@0.1.1
|
|
29
|
+
poc --version
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
npm installs the prebuilt zkTLS `delivery` binary for your platform with it, as an optional dependency:
|
|
33
|
+
`@subetha/zktls-delivery-darwin-arm64` or `@subetha/zktls-delivery-linux-arm64`, both at exactly `0.1.0` (about
|
|
34
|
+
50 MB; do not install with `--omit=optional`). No Rust toolchain is needed. `poc setup` accepts the packaged binary
|
|
35
|
+
only when its sha256 equals the value pinned in this package:
|
|
36
|
+
|
|
37
|
+
| Platform | sha256 of `bin/delivery` | Built from `subetha-labs/subetha-router` commit |
|
|
38
|
+
|---|---|---|
|
|
39
|
+
| macOS arm64 | `fb330265653d23a8cfbfef05500b408d9e488a7f5d0ba84f2f23f77ac976c92e` | `9f111c3d2c604d39d72916421ae51752154847a3` (`main`) |
|
|
40
|
+
| Linux arm64 (glibc) | `adf6ab438ca36f4fadbc50f17df35b0511bdfeeebabd794d022b080e5caa522d` | `1213cc51b74f4f46e258ab5f0ae769812bee4bb9` (`9f111c3` plus the Linux build scripts) |
|
|
41
|
+
|
|
42
|
+
Without a global install, every command also runs as `npx @subetha/proof-of-call@0.1.1 <command>`. Use the same
|
|
43
|
+
package spec each time: the configuration records the absolute path of the binary and its sha256, and `poc mcp`
|
|
44
|
+
and `poc serve`, when they start on their own, refuse to start when the file at that path is gone or has another
|
|
45
|
+
sha256 (run `poc setup` again then).
|
|
46
|
+
|
|
47
|
+
2. **Fetch the SRS** (the BN254 structured reference string the binary proves and verifies with; it is in no package).
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
poc fetch-srs
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
This downloads the first 134,283,392 bytes of `https://crs.aztec.network/g1.dat` (the Aztec Ignition ceremony's G1
|
|
54
|
+
points, the same range `zktls/fetch-srs.sh` in the Router repository fetches) to a temporary file, checks the size
|
|
55
|
+
and the sha256 `7eaff8541602ab48adc5e15892610c1d7ecb1c7335c916c750886a1d3dc1fb25`, and only then moves it to
|
|
56
|
+
`~/.subetha-proof-of-call/srs/bn254_g1.dat`. A download that does not match is removed and refused (a file
|
|
57
|
+
already at the destination is left as it is). Progress goes to stderr. `--out <file>` writes it somewhere else
|
|
58
|
+
(then give that path to setup with `--srs`); the directory must be your own and not writable by group or
|
|
59
|
+
others (a directory of yours with the sticky bit set is accepted), and the destination must not be a symbolic
|
|
60
|
+
link. The download is staged in a private directory next to the destination. A file that is already there is
|
|
61
|
+
reported as verified only when it is your own regular file that no one else can write; `poc setup` checks the SRS
|
|
62
|
+
file it records the same way. Nothing else in the
|
|
63
|
+
toolkit downloads the SRS; `poc setup` only tells you this command when the file is missing.
|
|
64
|
+
|
|
65
|
+
3. **Put your secrets in files**, readable only by you. Never pass a key or token on the command line (`poc` refuses
|
|
66
|
+
an argument that looks like one).
|
|
67
|
+
|
|
68
|
+
```sh
|
|
69
|
+
umask 077
|
|
70
|
+
mkdir -p ~/.config/subetha
|
|
71
|
+
# one line: your Base Sepolia test key, 0x + 64 hex characters
|
|
72
|
+
$EDITOR ~/.config/subetha/funding.key
|
|
73
|
+
# the witness's published shared Router principal: {"principalId": "…", "token": "…"}
|
|
74
|
+
$EDITOR ~/.config/subetha/router-access.json
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
**Where to get the Router principal:** the two values of `router-access.json` for the public witness are published
|
|
78
|
+
in the repository README, section "Use the public witness":
|
|
79
|
+
<https://github.com/subetha-labs/subetha-proof-of-call#use-the-public-witness>. Copy the JSON line from there; it
|
|
80
|
+
is not repeated here.
|
|
81
|
+
|
|
82
|
+
**Test funds:** the address of your funding key needs Base Sepolia test USDC. Circle's testnet faucet gives it:
|
|
83
|
+
<https://faucet.circle.com> (choose USDC on Base Sepolia). `poc setup` prints the payer address to fund. It needs
|
|
84
|
+
no Base Sepolia ETH: the requester only signs a transfer authorization (x402, EIP-3009), and a facilitator
|
|
85
|
+
submits it on chain.
|
|
86
|
+
|
|
87
|
+
4. **Set up**: checks the prerequisites, shows your payer address and the testnet asset, reads
|
|
88
|
+
`GET <witness>/v1/witness` and shows the witness identity it will trust (its Router recipient address, executor
|
|
89
|
+
version, catalogue and disclosures), checks the delivery binary (its sha256, and that `delivery capabilities` offers
|
|
90
|
+
`proxy`) and the SRS, and writes `~/.subetha-proof-of-call/config.json` (paths and public values only). It spends
|
|
91
|
+
nothing and downloads nothing.
|
|
92
|
+
|
|
93
|
+
```sh
|
|
94
|
+
poc setup \
|
|
95
|
+
--witness https://witness.subethalabs.com \
|
|
96
|
+
--funding-key-file ~/.config/subetha/funding.key \
|
|
97
|
+
--router-access-file ~/.config/subetha/router-access.json \
|
|
98
|
+
--ens-rpc-url https://ethereum-sepolia-rpc.publicnode.com
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
`https://witness.subethalabs.com` is SubEtha's public witness; another witness has another origin and its own
|
|
102
|
+
access values. `--ens-rpc-url` is needed to hire workers by ENS name (more on it below).
|
|
103
|
+
|
|
104
|
+
Setup says which binary it uses: `the prebuilt binary of the npm package … is used`, with its sha256 marked
|
|
105
|
+
`(the pinned SubEtha build)`. It finds the SRS at the default location of `poc fetch-srs`; `--srs <file>` (or
|
|
106
|
+
`DELIVERY_SRS_DAT`) names another one.
|
|
107
|
+
|
|
108
|
+
A later `poc setup` keeps the choice the configuration records (`deliverySource`: `package` or `own`):
|
|
109
|
+
|
|
110
|
+
- A packaged binary must always have the pinned sha256; anything else is refused before it is run. "Packaged"
|
|
111
|
+
means: any path that passes through a `@subetha/zktls-delivery-*` package directory of any npm installation,
|
|
112
|
+
directly or through symbolic links (of the file or of a directory on the way).
|
|
113
|
+
- A configured own build that is gone is not replaced by the package: setup stops and says so. Rebuild it, name
|
|
114
|
+
another one with `--delivery-bin <path>`, or pass `--use-packaged-delivery` to switch to the npm package.
|
|
115
|
+
- A binary whose bytes differ from the ones the last setup recorded is refused, unrun, until you name it again
|
|
116
|
+
with `--delivery-bin <path>` (or switch with `--use-packaged-delivery`).
|
|
117
|
+
|
|
118
|
+
To hire workers by ENS name, also give a Sepolia JSON-RPC endpoint: `--ens-rpc-url https://<sepolia rpc>` (https,
|
|
119
|
+
no credentials in the URL's user part; one public endpoint that needs no key is
|
|
120
|
+
`https://ethereum-sepolia-rpc.publicnode.com`), and optionally `--ens-universal-resolver <address>` to override the Sepolia
|
|
121
|
+
Universal Resolver. Setup shows only the RPC's origin. The URL is kept in `config.json` (mode 600); if it carries an
|
|
122
|
+
API key you would rather not store, leave it out and set `ENS_RPC_URL` (and `ENS_UNIVERSAL_RESOLVER`) in the MCP
|
|
123
|
+
server's environment instead: `poc mcp` uses those when set, else the values from setup. There is no default RPC
|
|
124
|
+
and no default worker name.
|
|
125
|
+
|
|
126
|
+
5. **Add the MCP server** to Claude Code (it reads everything from the configuration; nothing secret on its command
|
|
127
|
+
line):
|
|
128
|
+
|
|
129
|
+
```sh
|
|
130
|
+
claude mcp add subetha-requester -- poc mcp
|
|
131
|
+
# without a global install:
|
|
132
|
+
claude mcp add subetha-requester -- npx -y @subetha/proof-of-call@0.1.1 mcp
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Alternative: your own build of the `delivery` binary
|
|
136
|
+
|
|
137
|
+
The binary's source is public (the SubEtha Router repository, directory `zktls/`). To use a binary you built instead
|
|
138
|
+
of the packaged one, build it and name it with `--delivery-bin` (or `SUBETHA_ZKTLS_DELIVERY_BIN`); building needs
|
|
139
|
+
rustup, git, curl and a C/C++ toolchain. The steps below are the macOS arm64 build, at the commit the pinned macOS
|
|
140
|
+
binary was built from (`9f111c3`, the source commit pinned in this package); `poc setup` prints them when it finds no
|
|
141
|
+
binary. On Linux arm64 these steps are not verified: the pinned Linux binary was built from commit `1213cc5`, which
|
|
142
|
+
adds the Linux build scripts, and its package's README has the Linux steps. Use the packaged binary there.
|
|
143
|
+
|
|
144
|
+
```sh
|
|
145
|
+
git clone https://github.com/subetha-labs/subetha-router.git subetha-router
|
|
146
|
+
cd subetha-router && git checkout 9f111c3d2c604d39d72916421ae51752154847a3
|
|
147
|
+
cd zktls && ./fetch-tlsn.sh && ./fetch-srs.sh && ./build.sh build
|
|
148
|
+
poc setup --delivery-bin "$PWD/runner/target/release/delivery" --srs "$PWD/srs/bn254_g1.dat" …
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
Your own build normally has another sha256 than SubEtha's (the binary is not reproducible across machines); setup
|
|
152
|
+
records the sha256 of the file you gave, and `poc mcp` / `poc serve` run only that file. Keep your build outside any
|
|
153
|
+
`@subetha/zktls-delivery-*` package directory: any path that passes through one, directly or through symbolic links
|
|
154
|
+
(of the file or of a directory on the way), is treated as the packaged binary and must match the pin.
|
|
155
|
+
|
|
156
|
+
The boundary of that rule: identity by path can never be complete. A binary you name yourself with `--delivery-bin`
|
|
157
|
+
(or `SUBETHA_ZKTLS_DELIVERY_BIN`) is your own choice and your own trust decision; setup always prints its sha256 and
|
|
158
|
+
says whether it is the pinned SubEtha build (`your own build, NOT the pinned SubEtha build` when it is not). The pin
|
|
159
|
+
is enforced for the binary the toolkit finds by itself and for any path that visibly passes through a delivery
|
|
160
|
+
package directory. Add `--pinned-build` to make setup refuse a `--delivery-bin` that is not byte-for-byte SubEtha's
|
|
161
|
+
pinned build.
|
|
162
|
+
|
|
163
|
+
### Alternative: build the toolkit from this repository
|
|
164
|
+
|
|
165
|
+
```sh
|
|
166
|
+
git clone https://github.com/subetha-labs/subetha-proof-of-call.git && cd subetha-proof-of-call
|
|
167
|
+
npm ci
|
|
168
|
+
cd packages/toolkit && npm pack # builds dist/poc.mjs and writes subetha-proof-of-call-0.1.1.tgz
|
|
169
|
+
npm install -g ./subetha-proof-of-call-0.1.1.tgz
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
## Commands
|
|
173
|
+
|
|
174
|
+
| Command | What it does |
|
|
175
|
+
|---|---|
|
|
176
|
+
| `poc setup` | Prerequisites, funding key file, Router access file, delivery binary and SRS checks, witness identity shown and trusted; writes the configuration. Spends nothing, downloads and builds nothing |
|
|
177
|
+
| `poc fetch-srs [--out <file>]` | Downloads the SRS (134,283,392 bytes) to `<data dir>/srs/bn254_g1.dat` or `--out`, and keeps it only when size and sha256 match the pinned values. Runs only when you ask for it |
|
|
178
|
+
| `poc mcp` | The requester MCP server over stdio. Started on its own, it re-checks the witness's Router recipient against the one trusted at setup and the delivery binary's sha256 before serving. While `poc serve` runs on the same data directory it is only that service's front end and makes no checks itself: the service made them when it started |
|
|
179
|
+
| `poc serve` | The requester as a long-running service on your own machine: hires keep running after the session that started them closes. See below |
|
|
180
|
+
| `poc serve submit …` / `status <taskId>` / `result <taskId>` | One request to the running service over its local socket |
|
|
181
|
+
| `poc audit <taskId>` | Read-only audit of a finished task from the saved evidence (re-decrypts with the local binary, re-checks digests, the proof check and the worker's signatures); asks no network service and adds nothing to the ledger |
|
|
182
|
+
|
|
183
|
+
Data directory: `--data-dir`, else `POC_DATA_DIR`, else `~/.subetha-proof-of-call`. Spending ceilings:
|
|
184
|
+
`REQUESTER_MAX_TOTAL_ATOMIC` (default 60000 = 0.06 test USDC for all hires together) and
|
|
185
|
+
`REQUESTER_MAX_PER_CALL_ATOMIC` (default 20000).
|
|
186
|
+
|
|
187
|
+
### `poc serve`: the requester as a service
|
|
188
|
+
|
|
189
|
+
`poc serve` runs the requester in the foreground until SIGTERM or SIGINT (it ignores SIGHUP, so closing the terminal
|
|
190
|
+
does not stop it). It makes the same checks as `poc mcp` at start, owns the data directory (one owner at a time),
|
|
191
|
+
resumes every unfinished task from its records without paying or reserving anything twice, and writes a size-capped
|
|
192
|
+
log to `<data dir>/serve.log`. It listens only on a Unix socket inside the data directory (`serve.sock`); nothing
|
|
193
|
+
listens on a network interface. On a stop request no new hire or call starts, and a call in flight is given up to two
|
|
194
|
+
minutes to finish.
|
|
195
|
+
|
|
196
|
+
```sh
|
|
197
|
+
poc serve # terminal 1, keeps running
|
|
198
|
+
|
|
199
|
+
poc serve submit --name research.subetha-agents.eth --task "Report the ETH reference price." \
|
|
200
|
+
--apis <provider id> --per-call 12000 --total 30000 --max-calls 2 --expires-min 30
|
|
201
|
+
poc serve status <taskId> --wait 50 # waits up to 50 s for the end
|
|
202
|
+
poc serve result <taskId>
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
`submit` resolves the ENS name, writes the mandate and commits the hire, as `create_mandate` and `hire_worker` do, and
|
|
206
|
+
prints the task id; `status` and `result` print what `task_status` and `get_result` return (JSON). Amounts are in the
|
|
207
|
+
token's smallest unit. Each of the three exits 1 when no service is running on the data directory. `poc mcp` started
|
|
208
|
+
on the same data directory while the service runs forwards its tools to it, so an agent session and the command line
|
|
209
|
+
see the same hires.
|
|
210
|
+
|
|
211
|
+
Delegated mode (the worker may hire sub-workers under the same mandate) is off unless asked for:
|
|
212
|
+
`poc serve submit … --delegated --max-children <n> --child-names <ens,…>`, with the sub-worker names allowed
|
|
213
|
+
beforehand in the configuration (`poc setup --child-names <ens,…>`).
|
|
214
|
+
|
|
215
|
+
## MCP tools
|
|
216
|
+
|
|
217
|
+
| Tool | What it does |
|
|
218
|
+
|---|---|
|
|
219
|
+
| `list_providers` | The paid APIs in the witness's public catalogue of enabled zkTLS profiles, with your ceilings applied (a profile priced above your per-call ceiling is left out). Costs nothing |
|
|
220
|
+
| `resolve_worker` | Read-only: resolves an ENS name on Sepolia at one pinned block (CCIP-Read off) and shows the snapshot a hire would record: name, chain, signing address, block number and hash, MCP endpoint, the worker's own agent-context text (untrusted). Writes nothing, contacts no worker |
|
|
221
|
+
| `create_mandate` | Writes the terms of a hire: allowed APIs, most per call and in total, how many calls, how long. Refused above your ceilings. Spends nothing |
|
|
222
|
+
| `hire_worker` | Hires a worker by its ENS name under a mandate. `worker` is always the object `{ "kind": "ens", "name": "<ENS name>" }`. The name is resolved again for this hire and its endpoint pinned (a name that does not resolve commits nothing); then the total cap is committed and the task id returned at once while the hire runs in the background. The worker must sign its acceptance with the resolved address before anything is paid; each call it asks for is checked against the mandate, paid with your key, run on the witness and verified by you |
|
|
223
|
+
| `task_status` | Progress of a hire: the ENS snapshot, the acceptance and answer signature checks (`pending`, `valid`, `invalid`), each request's state, refusals before payment, each call's verdict. `waitSeconds` (up to 50) waits for the end |
|
|
224
|
+
| `get_result` | The worker's answer (untrusted), the ENS snapshot recorded for the hire (name, block, address, endpoint, pinned address) with both signature checks, `reservedCalls`: every call your own ledger reserved budget for, with its zkTLS verdict (a reserved call is not necessarily signed or paid; `consumed` counts every reservation), quote matching, what was not checked, what was spent |
|
|
225
|
+
| `audit_task` | The read-only audit of `poc audit`, from the agent |
|
|
226
|
+
|
|
227
|
+
### Example flow
|
|
228
|
+
|
|
229
|
+
What an agent does with these tools (amounts in the token's smallest unit, 6 decimals; ids shortened):
|
|
230
|
+
|
|
231
|
+
1. `poc setup … --ens-rpc-url https://<sepolia rpc>` once, then `claude mcp add subetha-requester -- … mcp`.
|
|
232
|
+
2. `resolve_worker { "name": "research.subetha-agents.eth" }` →
|
|
233
|
+
`{ "ensName": "research.subetha-agents.eth", "chainId": 11155111, "address": "0x…", "blockNumber": "…", "endpoints": { "mcp": "https://…/mcp" }, "agentContext": { "untrusted": true, "text": "…" } }`.
|
|
234
|
+
Check the address and the endpoint before hiring.
|
|
235
|
+
3. `list_providers {}`, then `create_mandate { "allowedApis": ["<provider id>"], "perCallMax": "12000", "totalMax": "30000", "maxCalls": 2, "expiresInMinutes": 30 }` → `{ "mandateId": "mandate-…", "summary": "…" }`.
|
|
236
|
+
4. `hire_worker { "mandateId": "mandate-…", "task": "Report the ETH reference price.", "worker": { "kind": "ens", "name": "research.subetha-agents.eth" } }`
|
|
237
|
+
→ `{ "taskId": "task-…", "state": "queued", "worker": { "kind": "ens", "name": "…" }, "ensSnapshot": { "blockNumber": "…", "address": "0x…", "endpoint": "https://…/mcp", "pinnedAddress": "…" } }`.
|
|
238
|
+
5. `task_status { "taskId": "task-…", "waitSeconds": 50 }` until `state` is `done` or `failed`. While it runs, `hire.signatureChecks.acceptance` turns `valid` (or `invalid`: the task then fails `worker_not_authenticated` and nothing is paid) and `hire.requests` lists each request with its state.
|
|
239
|
+
6. `get_result { "taskId": "task-…" }` → `hire.ensSnapshot`, `hire.signatureChecks` (`acceptance`, `answer`), `reservedCalls` (each with `zkTlsVerdict`), `quotes` (each with `status`, `backed` when the quoted value is a whole value of the verified response), `answerFromWorker` (untrusted), `spent`.
|
|
240
|
+
7. `audit_task { "taskId": "task-…" }` re-derives every check from the saved evidence and reports the number of `disagreements` (0 when everything agrees).
|
|
241
|
+
|
|
242
|
+
### Restarting `poc mcp`
|
|
243
|
+
|
|
244
|
+
This is about `poc mcp` started on its own. When `poc serve` runs on the data directory, the hires belong to the
|
|
245
|
+
service: closing or restarting the MCP session does not touch them, and the service resumes unfinished tasks when it
|
|
246
|
+
starts again.
|
|
247
|
+
|
|
248
|
+
On its own, the MCP server keeps its list of hires in memory and does not resume them when it starts again. After a restart
|
|
249
|
+
(or a crash) `task_status`, `get_result` and `audit_task` answer `unknown_task` for hires started before it, and a hire
|
|
250
|
+
that was still running is not continued: a paid call whose result was not yet collected is not verified by the
|
|
251
|
+
toolkit, and its committed budget stays committed (nothing is paid twice). The hire's files stay in the data
|
|
252
|
+
directory (`tasks/<taskId>/`): `poc audit <taskId>` still re-checks a finished one from them. Let a hire reach `done`
|
|
253
|
+
or `failed` before stopping the server.
|
|
254
|
+
|
|
255
|
+
## Licences
|
|
256
|
+
|
|
257
|
+
MIT. The package bundles parts of the SubEtha Router's MIT client code (private-purchase client, x402 signing helper,
|
|
258
|
+
intent envelope) from `subetha-labs/subetha-router` at commit `9f111c3d2c604d39d72916421ae51752154847a3`; see
|
|
259
|
+
`THIRD_PARTY_NOTICES.md`. The `delivery` binary is not part of this package: it comes from the optional dependency for
|
|
260
|
+
your platform (`@subetha/zktls-delivery-<platform>`, MIT, with the licences of the code it links in its
|
|
261
|
+
`THIRD_PARTY_LICENSES`) or from your own build. The SRS is in no package; `poc fetch-srs` downloads it.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Third-party notices
|
|
2
|
+
|
|
3
|
+
`dist/poc.mjs` bundles code from the following source in addition to this package's own code.
|
|
4
|
+
|
|
5
|
+
## SubEtha Router client (MIT)
|
|
6
|
+
|
|
7
|
+
- Source: https://github.com/subetha-labs/subetha-router, commit `9f111c3d2c604d39d72916421ae51752154847a3`
|
|
8
|
+
- Files: `src/client/private.ts` and `tools/x402-payer.ts` (whole), the private-purchase operations of
|
|
9
|
+
`src/client/index.ts` and their types from `src/client/types.ts`, and `envelopeBytesOf` from `tools/private-payer.ts`
|
|
10
|
+
(in this repository: `packages/router-client/`, with a per-file provenance header).
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
MIT License
|
|
14
|
+
|
|
15
|
+
Copyright (c) 2026 SubEtha Labs (peaceandwhisky)
|
|
16
|
+
|
|
17
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
18
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
19
|
+
in the Software without restriction, including without limitation the rights
|
|
20
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
21
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
22
|
+
furnished to do so, subject to the following conditions:
|
|
23
|
+
|
|
24
|
+
The above copyright notice and this permission notice shall be included in all
|
|
25
|
+
copies or substantial portions of the Software.
|
|
26
|
+
|
|
27
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
28
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
29
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
30
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
31
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
32
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
33
|
+
SOFTWARE.
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Runtime dependencies (installed by npm, not bundled)
|
|
37
|
+
|
|
38
|
+
`@modelcontextprotocol/sdk`, `viem` and `zod`, each under its own licence (see its package).
|
|
39
|
+
|
|
40
|
+
## Not included
|
|
41
|
+
|
|
42
|
+
The zkTLS `delivery` binary and the SRS are not part of this package. `poc setup` prints the steps to build the
|
|
43
|
+
binary from its public source (the Router repository's `zktls/` directory at the commit above, with its own
|
|
44
|
+
`THIRD_PARTY.md`) and checks the file you point it at.
|