sigild 0.0.9 → 0.0.11
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 -0
- package/THREAT_MODEL.md +12 -1
- package/dist/src/bin/sigil-mcp.js +62 -6
- package/dist/src/bin/sigil-mcp.js.map +1 -1
- package/dist/src/confirm/config.d.ts +34 -5
- package/dist/src/confirm/config.d.ts.map +1 -1
- package/dist/src/confirm/config.js +59 -3
- package/dist/src/confirm/config.js.map +1 -1
- package/dist/src/confirm/index.d.ts +1 -1
- package/dist/src/confirm/index.d.ts.map +1 -1
- package/dist/src/confirm/index.js +1 -1
- package/dist/src/confirm/index.js.map +1 -1
- package/dist/src/mcp/server.d.ts +8 -0
- package/dist/src/mcp/server.d.ts.map +1 -1
- package/dist/src/mcp/server.js +8 -1
- package/dist/src/mcp/server.js.map +1 -1
- package/dist/src/mcp/tools.js +1 -1
- package/dist/src/mcp/tools.js.map +1 -1
- package/dist/src/policy/evaluate.d.ts +3 -1
- package/dist/src/policy/evaluate.d.ts.map +1 -1
- package/dist/src/policy/evaluate.js +40 -13
- package/dist/src/policy/evaluate.js.map +1 -1
- package/dist/src/policy/loader.d.ts.map +1 -1
- package/dist/src/policy/loader.js +4 -0
- package/dist/src/policy/loader.js.map +1 -1
- package/dist/src/policy/template.d.ts +1 -1
- package/dist/src/policy/template.d.ts.map +1 -1
- package/dist/src/policy/template.js +7 -0
- package/dist/src/policy/template.js.map +1 -1
- package/dist/src/policy/types.d.ts +9 -0
- package/dist/src/policy/types.d.ts.map +1 -1
- package/dist/src/policy/types.js.map +1 -1
- package/dist/src/rpc/fill.d.ts +16 -0
- package/dist/src/rpc/fill.d.ts.map +1 -0
- package/dist/src/rpc/fill.js +202 -0
- package/dist/src/rpc/fill.js.map +1 -0
- package/dist/src/rpc/index.d.ts +4 -0
- package/dist/src/rpc/index.d.ts.map +1 -0
- package/dist/src/rpc/index.js +4 -0
- package/dist/src/rpc/index.js.map +1 -0
- package/dist/src/rpc/server.d.ts +63 -0
- package/dist/src/rpc/server.d.ts.map +1 -0
- package/dist/src/rpc/server.js +301 -0
- package/dist/src/rpc/server.js.map +1 -0
- package/dist/src/rpc/upstream.d.ts +48 -0
- package/dist/src/rpc/upstream.d.ts.map +1 -0
- package/dist/src/rpc/upstream.js +74 -0
- package/dist/src/rpc/upstream.js.map +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -161,6 +161,9 @@ allow_to = [] # allowed destination addresses (lower
|
|
|
161
161
|
max_value_wei = "0" # per-tx cap, in wei, as decimal string
|
|
162
162
|
allowed_selectors = [] # 4-byte function selectors, e.g. "0xa9059cbb"
|
|
163
163
|
|
|
164
|
+
allow_contract_creation = false # deploys (to = null); when true, every
|
|
165
|
+
# deploy still requires a confirm tap
|
|
166
|
+
|
|
164
167
|
allow_message_signing = false # EIP-191 personal_sign (e.g. SIWE)
|
|
165
168
|
allow_typed_data = false # EIP-712 (Permit, OpenSea — can be financial)
|
|
166
169
|
|
|
@@ -193,6 +196,40 @@ Install the ntfy app on your phone, subscribe to that topic, and you'll get a pu
|
|
|
193
196
|
|
|
194
197
|
If any policy file sets `require_confirm_above_wei` but no transport is configured, `sigil-mcp` refuses to start with a clear error rather than silently degrading every confirm-gated sign to a deny.
|
|
195
198
|
|
|
199
|
+
## JSON-RPC signing proxy (Foundry / Hardhat / any web3 tool)
|
|
200
|
+
|
|
201
|
+
sigil can expose a local JSON-RPC endpoint that makes any portal a drop-in signer for tooling that expects an unlocked node account — the same pattern Clef and web3signer use. Contract bytecode goes from `forge` straight into sigil; it never transits the agent's context or an MCP tool parameter.
|
|
202
|
+
|
|
203
|
+
Enable it in `~/.sigil/config.toml`:
|
|
204
|
+
|
|
205
|
+
```toml
|
|
206
|
+
[rpc]
|
|
207
|
+
portal = "evm:bot" # which portal signs
|
|
208
|
+
upstream = "https://sepolia.example/v3/KEY" # real node for everything else
|
|
209
|
+
token = "<openssl rand -hex 24>" # required — guards the endpoint
|
|
210
|
+
# port = 8547 # default 8547 (clear of anvil's 8545)
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
Then point any tool at it, with the token as the Basic-auth password:
|
|
214
|
+
|
|
215
|
+
```bash
|
|
216
|
+
forge script script/Deploy.s.sol \
|
|
217
|
+
--rpc-url "http://sigil:<token>@127.0.0.1:8547" \
|
|
218
|
+
--unlocked --sender 0xYourPortalAddress --broadcast
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
The proxy serves three things with the portal key and forwards everything else (`eth_call`, `eth_estimateGas`, `eth_getTransactionReceipt`, …) to the upstream:
|
|
222
|
+
|
|
223
|
+
- `eth_accounts` → the portal address (empty while locked)
|
|
224
|
+
- `eth_signTransaction` → fills nonce/gas/fees if missing, signs, returns the raw tx
|
|
225
|
+
- `eth_sendTransaction` → same, then broadcasts via the upstream and returns the hash
|
|
226
|
+
|
|
227
|
+
**Security properties.** The listener binds `127.0.0.1` only; every request must present the config token (constant-time compared) and a loopback `Host` header (DNS-rebinding defence). Signing runs through the *identical* daemon pipeline as the MCP tools — policy checks, the out-of-band confirm gate, and the hash-chained audit log all apply, so this surface adds a transport, not a privilege. The filled transaction carries the **upstream's** chain id, so a strict policy's `chain_ids` allowlist binds the proxy to the network you configured. Message/typed-data methods (`eth_sign`, `personal_sign`, `eth_signTypedData*`) are rejected on this surface — use the MCP tools, which have their own policy toggles. A strict policy with `allow_contract_creation = true` gives you confirm-gated `forge script` deploys: forge submits, your phone buzzes, the tx signs when you tap approve.
|
|
228
|
+
|
|
229
|
+
With multiple Claude windows open, each `sigil-mcp` tries to bind the port; the first wins and the rest log and continue — any one session's proxy serves the machine.
|
|
230
|
+
|
|
231
|
+
When the proxy is enabled, sigil-mcp advertises the endpoint — including the authenticated URL — in the `sigil_eth_sign_transaction` tool description, so the agent discovers it on its own and reaches for `forge --unlocked` instead of transcribing bytecode through the MCP tool. This is deliberate: the token gates other local software, not your agent (see THREAT_MODEL.md).
|
|
232
|
+
|
|
196
233
|
## Solana (SVM)
|
|
197
234
|
|
|
198
235
|
Every portal also controls a **Solana address**, derived from the *same secret*. EVM uses secp256k1; Solana uses ed25519 — different curves, so you can't share a public key. But the portal's raw 32-byte secret doubles as an ed25519 seed, yielding one secret → two addresses:
|
package/THREAT_MODEL.md
CHANGED
|
@@ -31,6 +31,17 @@ The unlock path:
|
|
|
31
31
|
|
|
32
32
|
This shape was chosen so the agent has no path to trigger unlock — only a human at the local TTY can. `sigil lock` zeroizes the in-memory table without killing the process; subsequent signs return `DAEMON_LOCKED` again until the next `sigil unlock`.
|
|
33
33
|
|
|
34
|
+
### The JSON-RPC signing proxy surface
|
|
35
|
+
|
|
36
|
+
With a `[rpc]` block in `~/.sigil/config.toml`, `sigil-mcp` additionally listens on `127.0.0.1:<port>` and serves `eth_accounts` / `eth_signTransaction` / `eth_sendTransaction` with the configured portal's key (proxying every other method to the configured upstream node). This is a deliberate second way to reach a key, added so Foundry/Hardhat-class tooling can sign without transaction payloads transiting the agent's context. Its containment:
|
|
37
|
+
|
|
38
|
+
- **Same pipeline, no proxy privilege.** Proxy signs are dispatched through the identical daemon path as the MCP tools — policy evaluation, the out-of-band confirm gate, and the hash-chained audit log all apply. There is no signing branch unique to the proxy.
|
|
39
|
+
- **Mandatory shared token.** Every request must present the config token (min 16 chars, constant-time compared) as a Bearer credential or the Basic-auth password. Without it, any local process could ask a permissive-mode portal to sign arbitrary transactions. The token lives in `~/.sigil/config.toml` (0700 home dir) — it gates *other software on the machine*, not the user's own agent: when the proxy is enabled, sigil-mcp deliberately advertises the authenticated URL in the `sigil_eth_sign_transaction` tool description so the agent can drive forge/hardhat against it (the ward hooks block it from reading the config file directly). The token therefore appears in agent context and transcripts; that is accepted — it is useless without local code execution, at which point the attacker already has the config file.
|
|
40
|
+
- **Loopback binding + Host allowlist.** The listener binds 127.0.0.1 only and rejects any request whose `Host` header is not a loopback name, which closes DNS-rebinding attacks from a browser tab even if the token leaks into a page-visible URL.
|
|
41
|
+
- **Chain binding.** The proxy fills transactions with the *upstream's* `eth_chainId`; a strict policy's `chain_ids` allowlist therefore pins the proxy to the intended network, and a client-supplied `chainId` that disagrees with the upstream is rejected outright.
|
|
42
|
+
- **Fail-closed inheritance.** Locked handle table, policy deny, confirm deny/timeout, missing confirm transport — each surfaces as a JSON-RPC error and no signature is produced. `eth_sign`/`personal_sign`/`eth_signTypedData*` are rejected on this surface entirely.
|
|
43
|
+
- **Residual risk, stated plainly:** with a **permissive** portal and the token, anything that can POST to loopback signs at will — same authority the MCP tools already grant the agent, now reachable by any tool the user (or agent) runs. Use a strict policy on any proxy-exposed portal that holds real value, and a confirm threshold for the rest. The upstream node also becomes an availability and privacy dependency: it sees every proxied call and the broadcast of every signed tx.
|
|
44
|
+
|
|
34
45
|
## In scope
|
|
35
46
|
|
|
36
47
|
### 1. Preventing key ingestion by the agent
|
|
@@ -56,6 +67,7 @@ The policy engine (per-portal `~/.sigil/policy/<handle>.toml`) is the layer that
|
|
|
56
67
|
- Chain ID allowlist (`chain_ids`).
|
|
57
68
|
- Per-tx value cap (`max_value_wei`).
|
|
58
69
|
- Function selector allowlist (`allowed_selectors`) — 4-byte selector match, no calldata decoding.
|
|
70
|
+
- Contract creation (`to: null`) denied by default; opt in with `allow_contract_creation = true`. Initcode is arbitrary code that no allowlist can vet, so even when enabled a deploy still respects `max_value_wei` and is **always routed to the out-of-band confirm gate** — never auto-allowed. sigil-mcp refuses to start if a strict policy enables it without a confirm transport configured.
|
|
59
71
|
- On/off toggles for personal_sign (`allow_message_signing`) and EIP-712 typed data (`allow_typed_data`).
|
|
60
72
|
- Append-only hash-chained audit log records both allow AND deny decisions. Denies are the prompt-injection canary.
|
|
61
73
|
- Runtime fail-closed when the policy file is missing for a portal — keys can't be used without an explicit decision.
|
|
@@ -67,7 +79,6 @@ The policy engine (per-portal `~/.sigil/policy/<handle>.toml`) is the layer that
|
|
|
67
79
|
- EIP-712 domain + primary-type allowlists (today `allow_typed_data` is binary; OpenSea-style approvals deserve finer control).
|
|
68
80
|
- Decoded-calldata arg checks ("allow `transfer(addr, amt)` only when `amt <= 100e18` and `addr in list`"). Needs a BYO-ABI registry per portal.
|
|
69
81
|
- Out-of-band human confirmation above a configurable value threshold (push to ntfy / Pushover / Telegram / Apple Push), [#4](https://github.com/cdrn/sigil/issues/4).
|
|
70
|
-
- `allow_contract_creation` toggle — currently strict mode always denies tx with `to: null`.
|
|
71
82
|
|
|
72
83
|
### 3. Supply chain compromise of `sigil` itself
|
|
73
84
|
|
|
@@ -7,6 +7,7 @@ import { startControlServer } from '../control/index.js';
|
|
|
7
7
|
import { HandleTable } from '../daemon/handles.js';
|
|
8
8
|
import { runMcpStdio } from '../mcp/server.js';
|
|
9
9
|
import { FileSystemPolicyResolver } from '../policy/index.js';
|
|
10
|
+
import { DEFAULT_RPC_PORT, startRpcServer } from '../rpc/index.js';
|
|
10
11
|
/**
|
|
11
12
|
* sigil-mcp: single-process MCP server for sigil. Spawned by Claude Code per
|
|
12
13
|
* session via the .claude/settings.json mcpServers entry.
|
|
@@ -67,6 +68,60 @@ async function main() {
|
|
|
67
68
|
const handles = new HandleTable();
|
|
68
69
|
const audit = new AuditWriter(paths.auditLog);
|
|
69
70
|
const policy = new FileSystemPolicyResolver(paths.policyDir);
|
|
71
|
+
const context = {
|
|
72
|
+
handles,
|
|
73
|
+
audit,
|
|
74
|
+
policy,
|
|
75
|
+
...(confirmGate ? { confirm: confirmGate } : {}),
|
|
76
|
+
};
|
|
77
|
+
// Local JSON-RPC signing proxy (forge/hardhat/cast integration). Shares
|
|
78
|
+
// `context` with the MCP loop, so its signs run the identical policy →
|
|
79
|
+
// confirm → audit pipeline. Multiple Claude windows each spawn a
|
|
80
|
+
// sigil-mcp; only the first binds the port — the others log and carry on,
|
|
81
|
+
// since any one session's proxy serves the machine.
|
|
82
|
+
let rpcServer;
|
|
83
|
+
let rpcProxyPort;
|
|
84
|
+
if (config.rpc) {
|
|
85
|
+
try {
|
|
86
|
+
rpcServer = await startRpcServer({
|
|
87
|
+
config: config.rpc,
|
|
88
|
+
ctx: context,
|
|
89
|
+
onLog: (e) => process.stderr.write(`rpc: ${JSON.stringify(e)}\n`),
|
|
90
|
+
});
|
|
91
|
+
rpcProxyPort = rpcServer.port;
|
|
92
|
+
const upstreamOrigin = new URL(config.rpc.upstream).origin;
|
|
93
|
+
process.stderr.write(`sigil-mcp: json-rpc signing proxy on ${rpcServer.url} ` +
|
|
94
|
+
`(portal "${config.rpc.portal}", upstream ${upstreamOrigin})\n`);
|
|
95
|
+
}
|
|
96
|
+
catch (err) {
|
|
97
|
+
if (err.code === 'EADDRINUSE') {
|
|
98
|
+
// Another session already serves the proxy on the configured port —
|
|
99
|
+
// still advertise it to the model below; it's the same config.
|
|
100
|
+
rpcProxyPort = config.rpc.port ?? DEFAULT_RPC_PORT;
|
|
101
|
+
process.stderr.write(`sigil-mcp: rpc port busy — another sigil-mcp session already serves the proxy\n`);
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
throw err;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
// Tell the model the proxy exists — tool descriptions are its only
|
|
109
|
+
// discovery channel. The authenticated URL is included on purpose: the
|
|
110
|
+
// token gates other local software, not the agent (which is the intended
|
|
111
|
+
// client and cannot read the config file past the ward hooks).
|
|
112
|
+
let toolNotes;
|
|
113
|
+
if (config.rpc && rpcProxyPort !== undefined) {
|
|
114
|
+
const authedUrl = `http://sigil:${config.rpc.token}@127.0.0.1:${rpcProxyPort}`;
|
|
115
|
+
toolNotes = {
|
|
116
|
+
sigil_eth_sign_transaction: `NOTE: sigil also serves a local JSON-RPC signing proxy for portal ` +
|
|
117
|
+
`"${config.rpc.portal}" at ${authedUrl} (chain per its configured upstream). ` +
|
|
118
|
+
`For Foundry/Hardhat/web3-tool workflows — especially contract deployments — ` +
|
|
119
|
+
`prefer that endpoint over transcribing calldata into this tool: e.g. ` +
|
|
120
|
+
`forge script <Script> --rpc-url '${authedUrl}' --unlocked --sender <portal address> --broadcast. ` +
|
|
121
|
+
`Its eth_sendTransaction fills nonce/gas/fees automatically, broadcasts via the ` +
|
|
122
|
+
`upstream, and runs the same policy, confirm, and audit pipeline as this tool.`,
|
|
123
|
+
};
|
|
124
|
+
}
|
|
70
125
|
let controlClosed = false;
|
|
71
126
|
let control = null;
|
|
72
127
|
try {
|
|
@@ -102,17 +157,16 @@ async function main() {
|
|
|
102
157
|
if (ackServer) {
|
|
103
158
|
ackServer.close().catch(() => { });
|
|
104
159
|
}
|
|
160
|
+
if (rpcServer) {
|
|
161
|
+
rpcServer.close().catch(() => { });
|
|
162
|
+
}
|
|
105
163
|
};
|
|
106
164
|
process.on('exit', shutdown);
|
|
107
165
|
process.on('SIGINT', () => process.exit(0));
|
|
108
166
|
process.on('SIGTERM', () => process.exit(0));
|
|
109
167
|
await runMcpStdio({
|
|
110
|
-
context
|
|
111
|
-
|
|
112
|
-
audit,
|
|
113
|
-
policy,
|
|
114
|
-
...(confirmGate ? { confirm: confirmGate } : {}),
|
|
115
|
-
},
|
|
168
|
+
context,
|
|
169
|
+
...(toolNotes ? { toolNotes } : {}),
|
|
116
170
|
stdin: process.stdin,
|
|
117
171
|
stdout: process.stdout,
|
|
118
172
|
onLog: (e) => process.stderr.write(JSON.stringify(e) + '\n'),
|
|
@@ -125,6 +179,8 @@ async function main() {
|
|
|
125
179
|
}
|
|
126
180
|
if (ackServer)
|
|
127
181
|
await ackServer.close();
|
|
182
|
+
if (rpcServer)
|
|
183
|
+
await rpcServer.close();
|
|
128
184
|
process.exit(0);
|
|
129
185
|
}
|
|
130
186
|
main().catch((err) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sigil-mcp.js","sourceRoot":"","sources":["../../../src/bin/sigil-mcp.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,YAAY,EA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AC;QAChB,OAAO;QACP,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACnC,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,KAAK,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;KAC7D,CAAC,CAAC;IAEH,wEAAwE;IACxE,6CAA6C;IAC7C,IAAI,OAAO,IAAI,CAAC,aAAa,EAAE,CAAC;QAC9B,aAAa,GAAG,IAAI,CAAC;QACrB,MAAM,OAAO,CAAC,KAAK,EAAE,CAAC;IACxB,CAAC;IACD,IAAI,SAAS;QAAE,MAAM,SAAS,CAAC,KAAK,EAAE,CAAC;IACvC,IAAI,SAAS;QAAE,MAAM,SAAS,CAAC,KAAK,EAAE,CAAC;IACvC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAU,EAAE,EAAE;IAC1B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,cAAc,GAAG,CAAC,OAAO,IAAI,CAAC,CAAC;IACpD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
|
@@ -1,17 +1,41 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* sigil config at ~/.sigil/config.toml.
|
|
3
|
-
*
|
|
2
|
+
* sigil config at ~/.sigil/config.toml. Carries the OOB confirm transport
|
|
3
|
+
* block and the optional local JSON-RPC signing proxy block.
|
|
4
4
|
*
|
|
5
5
|
* [confirm.ntfy]
|
|
6
6
|
* topic = "an-unguessable-string"
|
|
7
7
|
* server = "https://ntfy.sh" # optional, default https://ntfy.sh
|
|
8
8
|
*
|
|
9
|
+
* [rpc]
|
|
10
|
+
* portal = "evm:bot"
|
|
11
|
+
* upstream = "https://sepolia.example/v3/KEY"
|
|
12
|
+
* token = "an-unguessable-string-16+chars"
|
|
13
|
+
* port = 8547 # optional
|
|
14
|
+
*
|
|
9
15
|
* Missing file → SigilConfig with no transport configured. That's fine on
|
|
10
16
|
* its own; we only fail closed at startup if some policy actually depends
|
|
11
17
|
* on a transport (see `enforceConfirmTransportPresence`).
|
|
12
18
|
*/
|
|
13
19
|
export interface SigilConfig {
|
|
14
20
|
confirm?: ConfirmConfig;
|
|
21
|
+
rpc?: RpcConfigToml;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Local JSON-RPC signing proxy (`[rpc]` block). All of portal/upstream/token
|
|
25
|
+
* are required — the proxy never starts without an auth token, and a token
|
|
26
|
+
* under 16 chars is rejected at parse time rather than silently weakening
|
|
27
|
+
* the only thing standing between "any local process" and "signs with the
|
|
28
|
+
* portal key".
|
|
29
|
+
*/
|
|
30
|
+
export interface RpcConfigToml {
|
|
31
|
+
/** Portal handle whose key answers eth_accounts / signs eth_sendTransaction. */
|
|
32
|
+
portal: string;
|
|
33
|
+
/** Upstream JSON-RPC node everything else is proxied to. http(s) only. */
|
|
34
|
+
upstream: string;
|
|
35
|
+
/** Shared secret every request must present (Bearer or Basic password). */
|
|
36
|
+
token: string;
|
|
37
|
+
/** Listen port on 127.0.0.1. Default 8547 (clear of anvil's 8545). */
|
|
38
|
+
port?: number;
|
|
15
39
|
}
|
|
16
40
|
export interface ConfirmConfig {
|
|
17
41
|
/** Default timeout for any OOB confirm round-trip, in milliseconds.
|
|
@@ -32,6 +56,9 @@ export declare class SigilConfigError extends Error {
|
|
|
32
56
|
* file-not-found case is handled uniformly.
|
|
33
57
|
*/
|
|
34
58
|
export declare function parseConfig(source: string): SigilConfig;
|
|
59
|
+
/** Minimum length for the [rpc] auth token. Below this, brute force from a
|
|
60
|
+
* rebound browser page or a local process stops being fanciful. */
|
|
61
|
+
export declare const RPC_TOKEN_MIN_LENGTH = 16;
|
|
35
62
|
/**
|
|
36
63
|
* Load + parse the file at ~/.sigil/config.toml. Returns an empty config if
|
|
37
64
|
* the file is absent. Throws SigilConfigError on parse/schema errors.
|
|
@@ -39,9 +66,11 @@ export declare function parseConfig(source: string): SigilConfig;
|
|
|
39
66
|
export declare function loadConfig(path: string): SigilConfig;
|
|
40
67
|
/**
|
|
41
68
|
* Walk every *.toml under the policy dir, parse each, and return true if
|
|
42
|
-
* any of them
|
|
43
|
-
*
|
|
44
|
-
*
|
|
69
|
+
* any of them can route a sign to the confirm gate: require_confirm_above_wei,
|
|
70
|
+
* or strict-mode allow_contract_creation (deploys always confirm). A
|
|
71
|
+
* malformed policy file is skipped (it'll surface its own error at sign
|
|
72
|
+
* time); we only need to know whether some portal is *trying* to gate on
|
|
73
|
+
* confirm.
|
|
45
74
|
*/
|
|
46
75
|
export declare function anyPolicyRequiresConfirm(policyDir: string): boolean;
|
|
47
76
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/confirm/config.ts"],"names":[],"mappings":"AAKA
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/confirm/config.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,WAAW;IAC1B,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,GAAG,CAAC,EAAE,aAAa,CAAC;CACrB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,aAAa;IAC5B,gFAAgF;IAChF,MAAM,EAAE,MAAM,CAAC;IACf,0EAA0E;IAC1E,QAAQ,EAAE,MAAM,CAAC;IACjB,2EAA2E;IAC3E,KAAK,EAAE,MAAM,CAAC;IACd,sEAAsE;IACtE,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,aAAa;IAC5B;+DAC2D;IAC3D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,cAAc,CAAC;CACvB;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,qBAAa,gBAAiB,SAAQ,KAAK;gBAC7B,OAAO,EAAE,MAAM;CAI5B;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,WAAW,CA6CvD;AAED;oEACoE;AACpE,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAqDvC;;;GAGG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CASpD;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CA4BnE;AAED;;;;;GAKG;AACH,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,WAAW,EACnB,SAAS,EAAE,MAAM,GAChB,IAAI,CAWN"}
|
|
@@ -24,6 +24,9 @@ export function parseConfig(source) {
|
|
|
24
24
|
throw new SigilConfigError(`config: invalid TOML — ${err.message}`);
|
|
25
25
|
}
|
|
26
26
|
const out = {};
|
|
27
|
+
const rpc = parseRpcBlock(raw['rpc']);
|
|
28
|
+
if (rpc)
|
|
29
|
+
out.rpc = rpc;
|
|
27
30
|
const confirmRaw = raw['confirm'];
|
|
28
31
|
if (confirmRaw === undefined)
|
|
29
32
|
return out;
|
|
@@ -58,6 +61,55 @@ export function parseConfig(source) {
|
|
|
58
61
|
}
|
|
59
62
|
return out;
|
|
60
63
|
}
|
|
64
|
+
/** Minimum length for the [rpc] auth token. Below this, brute force from a
|
|
65
|
+
* rebound browser page or a local process stops being fanciful. */
|
|
66
|
+
export const RPC_TOKEN_MIN_LENGTH = 16;
|
|
67
|
+
function parseRpcBlock(rpcRaw) {
|
|
68
|
+
if (rpcRaw === undefined)
|
|
69
|
+
return undefined;
|
|
70
|
+
if (!isObject(rpcRaw)) {
|
|
71
|
+
throw new SigilConfigError(`config.rpc must be a table`);
|
|
72
|
+
}
|
|
73
|
+
const portal = rpcRaw['portal'];
|
|
74
|
+
if (typeof portal !== 'string' || portal.length === 0) {
|
|
75
|
+
throw new SigilConfigError(`config.rpc.portal is required and must be a portal handle`);
|
|
76
|
+
}
|
|
77
|
+
const upstream = rpcRaw['upstream'];
|
|
78
|
+
if (typeof upstream !== 'string' || upstream.length === 0) {
|
|
79
|
+
throw new SigilConfigError(`config.rpc.upstream is required and must be a JSON-RPC URL`);
|
|
80
|
+
}
|
|
81
|
+
let upstreamUrl;
|
|
82
|
+
try {
|
|
83
|
+
upstreamUrl = new URL(upstream);
|
|
84
|
+
}
|
|
85
|
+
catch {
|
|
86
|
+
throw new SigilConfigError(`config.rpc.upstream is not a valid URL`);
|
|
87
|
+
}
|
|
88
|
+
if (upstreamUrl.protocol !== 'http:' && upstreamUrl.protocol !== 'https:') {
|
|
89
|
+
throw new SigilConfigError(`config.rpc.upstream must be http(s), got ${upstreamUrl.protocol.replace(/:$/, '')}`);
|
|
90
|
+
}
|
|
91
|
+
const token = rpcRaw['token'];
|
|
92
|
+
if (typeof token !== 'string' || token.length === 0) {
|
|
93
|
+
throw new SigilConfigError(`config.rpc.token is required — generate one with: openssl rand -hex 24`);
|
|
94
|
+
}
|
|
95
|
+
if (token.length < RPC_TOKEN_MIN_LENGTH) {
|
|
96
|
+
throw new SigilConfigError(`config.rpc.token must be at least ${RPC_TOKEN_MIN_LENGTH} characters — ` +
|
|
97
|
+
`it is the only credential guarding the signing endpoint. ` +
|
|
98
|
+
`Generate one with: openssl rand -hex 24`);
|
|
99
|
+
}
|
|
100
|
+
const port = rpcRaw['port'];
|
|
101
|
+
if (port !== undefined) {
|
|
102
|
+
if (typeof port !== 'number' || !Number.isInteger(port) || port < 1 || port > 65535) {
|
|
103
|
+
throw new SigilConfigError(`config.rpc.port must be an integer in 1..65535`);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
return {
|
|
107
|
+
portal,
|
|
108
|
+
upstream,
|
|
109
|
+
token,
|
|
110
|
+
...(port !== undefined ? { port: port } : {}),
|
|
111
|
+
};
|
|
112
|
+
}
|
|
61
113
|
/**
|
|
62
114
|
* Load + parse the file at ~/.sigil/config.toml. Returns an empty config if
|
|
63
115
|
* the file is absent. Throws SigilConfigError on parse/schema errors.
|
|
@@ -76,9 +128,11 @@ export function loadConfig(path) {
|
|
|
76
128
|
}
|
|
77
129
|
/**
|
|
78
130
|
* Walk every *.toml under the policy dir, parse each, and return true if
|
|
79
|
-
* any of them
|
|
80
|
-
*
|
|
81
|
-
*
|
|
131
|
+
* any of them can route a sign to the confirm gate: require_confirm_above_wei,
|
|
132
|
+
* or strict-mode allow_contract_creation (deploys always confirm). A
|
|
133
|
+
* malformed policy file is skipped (it'll surface its own error at sign
|
|
134
|
+
* time); we only need to know whether some portal is *trying* to gate on
|
|
135
|
+
* confirm.
|
|
82
136
|
*/
|
|
83
137
|
export function anyPolicyRequiresConfirm(policyDir) {
|
|
84
138
|
let entries;
|
|
@@ -104,6 +158,8 @@ export function anyPolicyRequiresConfirm(policyDir) {
|
|
|
104
158
|
const p = parsePolicy(source);
|
|
105
159
|
if (p.requireConfirmAboveWei !== undefined)
|
|
106
160
|
return true;
|
|
161
|
+
if (p.mode === 'strict' && p.allowContractCreation)
|
|
162
|
+
return true;
|
|
107
163
|
}
|
|
108
164
|
catch (err) {
|
|
109
165
|
// Malformed policy file — not our problem here; the sign path will
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/confirm/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"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AC;IACzD,IAAI,aAAa;QAAE,OAAO;IAC1B,MAAM,IAAI,gBAAgB,CACxB,iCAAiC,SAAS,mCAAmC;QAC7E,8CAA8C;QAC9C,mEAAmE;QACnE,qEAAqE,CACtE,CAAC;AACJ,CAAC;AAED,SAAS,QAAQ,CAAC,CAAU;IAC1B,OAAO,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AAClE,CAAC"}
|
|
@@ -2,5 +2,5 @@ export { type ConfirmRequest, type ConfirmDecision, type ConfirmTransport, } fro
|
|
|
2
2
|
export { NtfyTransport, type NtfyConfig, type FetchLike } from './ntfy.js';
|
|
3
3
|
export { startAckServer, type AckServer, type AckOutcome, } from './ack-server.js';
|
|
4
4
|
export { ConfirmGate, type ConfirmGateOpts } from './gate.js';
|
|
5
|
-
export { type SigilConfig, type ConfirmConfig, type NtfyConfigToml, SigilConfigError, parseConfig, loadConfig, anyPolicyRequiresConfirm, enforceConfirmTransportPresence, } from './config.js';
|
|
5
|
+
export { type SigilConfig, type ConfirmConfig, type NtfyConfigToml, type RpcConfigToml, RPC_TOKEN_MIN_LENGTH, SigilConfigError, parseConfig, loadConfig, anyPolicyRequiresConfirm, enforceConfirmTransportPresence, } from './config.js';
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/confirm/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,gBAAgB,GACtB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,aAAa,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AAC3E,OAAO,EACL,cAAc,EACd,KAAK,SAAS,EACd,KAAK,UAAU,GAChB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,WAAW,EAAE,KAAK,eAAe,EAAE,MAAM,WAAW,CAAC;AAC9D,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,gBAAgB,EAChB,WAAW,EACX,UAAU,EACV,wBAAwB,EACxB,+BAA+B,GAChC,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/confirm/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,gBAAgB,GACtB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,aAAa,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AAC3E,OAAO,EACL,cAAc,EACd,KAAK,SAAS,EACd,KAAK,UAAU,GAChB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,WAAW,EAAE,KAAK,eAAe,EAAE,MAAM,WAAW,CAAC;AAC9D,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,oBAAoB,EACpB,gBAAgB,EAChB,WAAW,EACX,UAAU,EACV,wBAAwB,EACxB,+BAA+B,GAChC,MAAM,aAAa,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { NtfyTransport } from './ntfy.js';
|
|
2
2
|
export { startAckServer, } from './ack-server.js';
|
|
3
3
|
export { ConfirmGate } from './gate.js';
|
|
4
|
-
export { SigilConfigError, parseConfig, loadConfig, anyPolicyRequiresConfirm, enforceConfirmTransportPresence, } from './config.js';
|
|
4
|
+
export { RPC_TOKEN_MIN_LENGTH, SigilConfigError, parseConfig, loadConfig, anyPolicyRequiresConfirm, enforceConfirmTransportPresence, } from './config.js';
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/confirm/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAmC,MAAM,WAAW,CAAC;AAC3E,OAAO,EACL,cAAc,GAGf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,WAAW,EAAwB,MAAM,WAAW,CAAC;AAC9D,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/confirm/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAmC,MAAM,WAAW,CAAC;AAC3E,OAAO,EACL,cAAc,GAGf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,WAAW,EAAwB,MAAM,WAAW,CAAC;AAC9D,OAAO,EAKL,oBAAoB,EACpB,gBAAgB,EAChB,WAAW,EACX,UAAU,EACV,wBAAwB,EACxB,+BAA+B,GAChC,MAAM,aAAa,CAAC"}
|
package/dist/src/mcp/server.d.ts
CHANGED
|
@@ -6,6 +6,14 @@ export interface McpServerOpts {
|
|
|
6
6
|
* sign methods directly against this — no cross-process IPC.
|
|
7
7
|
*/
|
|
8
8
|
context: MethodContext;
|
|
9
|
+
/**
|
|
10
|
+
* Extra text appended to a tool's description at tools/list time, keyed by
|
|
11
|
+
* tool name. Tool descriptions are the only channel through which the
|
|
12
|
+
* model discovers capabilities, and the static definitions can't know
|
|
13
|
+
* runtime config — this is how sigil-mcp advertises the JSON-RPC signing
|
|
14
|
+
* proxy endpoint when the [rpc] block is enabled.
|
|
15
|
+
*/
|
|
16
|
+
toolNotes?: Readonly<Record<string, string>>;
|
|
9
17
|
/**
|
|
10
18
|
* Optional log sink for protocol-level events. Defaults to a no-op.
|
|
11
19
|
* The default binary entrypoint writes log events to stderr so they don't
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../src/mcp/server.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAWL,KAAK,KAAK,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EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,KAAK,GAAG,IAAI,CAAA;CAAE,GAClD;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,EAAE,EAAE,KAAK,CAAA;CAAE,GAC9B;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,EAAE,EAAE,KAAK,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAChE;IAAE,IAAI,EAAE,aAAa,CAAA;CAAE,CAAC;AAE5B;;;;;;;GAOG;AACH,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAkC1F;AAiDD,MAAM,WAAW,YAAa,SAAQ,aAAa;IACjD,KAAK,EAAE,MAAM,CAAC,cAAc,CAAC;IAC7B,MAAM,EAAE,MAAM,CAAC,cAAc,CAAC;CAC/B;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CA0B7D"}
|
package/dist/src/mcp/server.js
CHANGED
|
@@ -52,7 +52,14 @@ async function dispatch(req, opts) {
|
|
|
52
52
|
serverInfo: SERVER_INFO,
|
|
53
53
|
};
|
|
54
54
|
case 'tools/list':
|
|
55
|
-
return {
|
|
55
|
+
return {
|
|
56
|
+
tools: TOOLS.map((t) => {
|
|
57
|
+
const note = opts.toolNotes?.[t.definition.name];
|
|
58
|
+
return note === undefined
|
|
59
|
+
? t.definition
|
|
60
|
+
: { ...t.definition, description: `${t.definition.description}\n\n${note}` };
|
|
61
|
+
}),
|
|
62
|
+
};
|
|
56
63
|
case 'tools/call':
|
|
57
64
|
return await invokeTool(req.params, opts);
|
|
58
65
|
case 'ping':
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../../src/mcp/server.ts"],"names":[],"mappings":"AAAA,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: { type: 'string', description: 'Portal handle.' },
|
|
38
38
|
tx: {
|
|
39
39
|
type: 'object',
|
|
40
|
-
description: 'Transaction fields. type="legacy" requires {chainId, nonce, gasPrice, gasLimit, to, value, data}. type="eip1559" requires {chainId, nonce, maxPriorityFeePerGas, maxFeePerGas, gasLimit, to, value, data, accessList?}. Numbers may be supplied as JSON numbers or decimal strings.',
|
|
40
|
+
description: 'Transaction fields. type="legacy" requires {chainId, nonce, gasPrice, gasLimit, to, value, data}. type="eip1559" requires {chainId, nonce, maxPriorityFeePerGas, maxFeePerGas, gasLimit, to, value, data, accessList?}. To deploy a contract, set to=null (explicit JSON null, not omitted) and put the creation bytecode in data. Numbers may be supplied as JSON numbers or decimal strings.',
|
|
41
41
|
},
|
|
42
42
|
},
|
|
43
43
|
required: ['portal', 'tx'],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../../../src/mcp/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAsB,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACpF,OAAO,EAAE,kBAAkB,EAAwC,MAAM,eAAe,CAAC;AAWzF,8EAA8E;AAC9E,mBAAmB;AACnB,8EAA8E;AAE9E,MAAM,WAAW,GAAS;IACxB,UAAU,EAAE;QACV,IAAI,EAAE,oBAAoB;QAC1B,WAAW,EACT,+PAA+P;QACjQ,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,EAAE,oBAAoB,EAAE,KAAK,EAAE;KAC7E;IACD,OAAO,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,CAAC,UAAU,CAAC,oBAAoB,EAAE,IAAI,EAAE,GAAG,CAAC;CACpE,CAAC;AAEF,MAAM,cAAc,GAAS;IAC3B,UAAU,EAAE;QACV,IAAI,EAAE,wBAAwB;QAC9B,WAAW,EACT,0MAA0M;QAC5M,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YAC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AAI,CAAC,CAAC;QACvD,CAAC;QACD,MAAM,IAAI,SAAS,CAAC,kBAAkB,EAAE,aAAc,GAAa,CAAC,OAAO,EAAE,CAAC,CAAC;IACjF,CAAC;AACH,CAAC;AAED,SAAS,UAAU,CAAC,OAAgB;IAClC,8DAA8D;IAC9D,uEAAuE;IACvE,wDAAwD;IACxD,OAAO;QACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC;QAC1D,iBAAiB,EAAE,OAAO;KAC3B,CAAC;AACJ,CAAC"}
|
|
@@ -6,7 +6,9 @@ import type { Policy, PolicyDecision, PolicyRequest } from './types.js';
|
|
|
6
6
|
* as the RPC_POLICY_DENIED error message — write it for a human.
|
|
7
7
|
*
|
|
8
8
|
* Order of checks for transactions:
|
|
9
|
-
* 1. strict-mode static deny rules (chain,
|
|
9
|
+
* 1. strict-mode static deny rules (chain, contract creation, allow_to,
|
|
10
|
+
* value cap, selector) — an allowed contract creation short-circuits
|
|
11
|
+
* to a mandatory confirm here
|
|
10
12
|
* 2. require_confirm_above_wei — independent of mode
|
|
11
13
|
* 3. allow
|
|
12
14
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evaluate.d.ts","sourceRoot":"","sources":["../../../src/policy/evaluate.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,aAAa,EAAmB,MAAM,YAAY,CAAC;AAEzF
|
|
1
|
+
{"version":3,"file":"evaluate.d.ts","sourceRoot":"","sources":["../../../src/policy/evaluate.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,aAAa,EAAmB,MAAM,YAAY,CAAC;AAEzF;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,GAAG,cAAc,CAiD/E"}
|