sealnet-mcp 0.11.0 → 0.11.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/README.md CHANGED
@@ -18,7 +18,7 @@ When an MCP-connected AI agent (Claude Desktop, Cursor, Cline, etc.) creates a S
18
18
  |------|---------|
19
19
  | `seal_share(path, kind='file'\|'secret', key?, mode='inbox'\|'handoff'\|'forward', expire?, max_reads?, tier?)` / `seal_share(payment)` | Create a SEAL from a local file or folder (sent as one ZIP), streamed from disk. `kind='secret'` marks a password, key or token: the recipient's agent saves it and never reads it into a chat, a browser shows it hidden. `key` sends one value of a .env-style file as a secret, without writing it anywhere. Default: inbox once connected, else handoff; without `expire`, 1d in the inbox, 1h for a handoff, 5m forward, or 1d for one over 100 MB. Above the free limit the user pays once by card (smallest tier that fits, or `tier`): the payment page goes through URL-mode elicitation, or comes back as `payment_url` and a second call with `payment` finishes the upload into the same seal |
20
20
  | `seal_link(handle)` | Put the link of a handoff seal on the clipboard (or in its 0600 file) again, for a link lost on the way; the model never gets it |
21
- | `seal_request(what, kind='any'\|'secret'\|'file', where_url?, wait=true, from?, dir?)` / `seal_request(request)` | Ask the user for a file or a secret without it passing through the chat. On the user's computer the `seal` CLI draws the system dialog (`seal request --local --json`); otherwise the user answers at `seal.net/i/<id>`, sealed to this server's bundle, shown with three words of its address; once connected the request also waits in the user's inbox (`from=owner`, or `from=anyone` for a plain link). Returns the path of a 0600 file (in `dir`, or a private temp directory), never the value |
21
+ | `seal_request(what, kind='any'\|'secret'\|'file', where_url?, wait=true, from?, dir?)` / `seal_request(request)` | Ask the user for a file or a secret without it passing through the chat. The user answers at `seal.net/i/<id>`, sealed to this machine's guard or to this server, shown with three words of its address: on the user's computer the `seal` CLI opens the page in their browser (`seal request --local --json`); once connected the request also waits in the user's inbox (`from=owner`, or `from=anyone` for a plain link). Returns the path of a 0600 file (in `dir`, or a private temp directory), never the value |
22
22
  | `seal_pair(name?, wait=true)` | Connect this agent to the user's SEAL inbox, once: the user opens a page, compares three words and connects; the chat then shows the inbox's three words. After it `seal_share` sends to the inbox by default |
23
23
  | `seal_open(url\|item, mode='metadata'\|'file'\|'inline', dir?)` | Read metadata (default — no download, no counter consumption), save to disk (`file`: streamed, verified before it gets its name, 0600, returns paths) or inline parse (whitelisted MIMEs only, ≤100 KB, refuses secrets, HTML and binary). `item` is an inbox handle instead of a link |
24
24
  | `seal_inbox(wait?)` | Seals other agents or people sent to this server's address: handles, the sender's three words and name, never a link. `seal_share mode=forward to=<address>` puts a link there; `wait` (0 to 300 s) waits for something new |
package/dist/cli.cjs CHANGED
@@ -1999,7 +1999,7 @@ var seal_address_default = {
1999
1999
  guard: {
2000
2000
  kind: "guard",
2001
2001
  is: "a pair request whose requester is this machine's guard (SPEC agent egress \xA73.1): the same answer as `pair` (the pairing file), and the inbox marks the agent as a guard. A request for a secret whose recipient_bundle is a guard's is shown by the inbox as sealed to that guard; one whose bundle is no known guard's is answered only after the person types its three words (\xA76.1, T2\u0430).",
2002
- bind: "POST /intake may carry `bind`: what the agent proposes the key be bound to \u2014 {hosts: [<host>], place?: <place>, class?: outbound|inprocess} (secrets.json guard_note). The page shows it as the binding when no entry of secrets.json knows the key's form; the person confirms, narrows or removes it. At most 16 hosts of 253 characters; the server keeps it as given and never reads it."
2002
+ bind: "POST /intake may carry `bind`: what the agent proposes the key be bound to \u2014 {hosts: [<host>], place?: <place>, class?: outbound|inprocess} (secrets.json guard_note). `bind` is sent only when the recipient_bundle is a guard's, hosts proposed or not: its presence is what lets the page bind the key and lend it under a lease; without it the page says the value goes to the agent as it is. The page shows the proposal as the binding when no entry of secrets.json knows the key's form; the person confirms, narrows or removes it. At most 16 hosts of 253 characters, each a name of two labels or more (`*.` with two labels under it, three under secrets.json wildcard_public_second_level); the server checks the shape and keeps it as given."
2003
2003
  },
2004
2004
  payloads: {
2005
2005
  name_max: 80,
@@ -6193,6 +6193,8 @@ var secrets_default = {
6193
6193
  },
6194
6194
  patterns_note: "What a key looks like, for every reader: `seal doctor --transcripts`, the scanner of the Pro web page and the `sealfs` detector (C1 \u042039). `pattern` is an expression in the subset all three run alike \u2014 JS, Python `re`, Rust `regex`: no lookaround, no backreference, no inline flag; a boundary is `\\b` inside the expression. The flags are shared: case-insensitive and multiline. A match that contains a string of the entry's `allowlist` (case-insensitive) is no finding. A match of an entry with `checksum` is a finding only when it passes that sum: `luhn` \u2014 the Luhn sum of its digits is 0 modulo 10; `iban` \u2014 its characters but spaces, upper-cased, the first four moved to the end, each letter read as a number (A = 10 \u2026 Z = 35), are 1 modulo 97. A finding is shown masked: its first four characters, `\u2026`, its last two. `vectors.hit` holds a finding of the entry, `vectors.clean` none; every reader passes them. The scanner page does not take a file larger than `max_file_bytes`; `seal doctor` reads agent transcripts of any size, a line at a time \u2014 skipping a long transcript would hide its leak. Data, not code: a service is added with one entry.",
6195
6195
  max_file_bytes: 10485760,
6196
+ wildcard_public_second_level: ["ac", "co", "com", "edu", "gov", "go", "ne", "net", "or", "org", "mil", "int", "gob", "ltd", "plc", "me", "nom"],
6197
+ wildcard_note: "A proposed `*.<name>` binds a key only with two labels under it, three when the first is one of wildcard_public_second_level (`*.co.uk` would be a root for every .co.uk host); a bare name needs two labels (SPEC agent egress \xA74.2, review of phase 1).",
6196
6198
  guard_note: "What the guard does with a key of an entry (SPEC agent egress \xA74.1, read by `seal-client-core::guard`). `hosts`: where the key is a way in, the default binding a person confirms or narrows; `*.` is one label. `place`: where the guard puts the value \u2014 `bearer` (Authorization: Bearer), `header:<name>`, `query:<param>`, `basic_user`, `basic_pass`, `userinfo`, `url` (the secret is the request address itself, a webhook). `class`: `outbound` \u2014 a key a program enters a service with, the proxy puts it in; `inprocess` \u2014 a key a program works with itself (a webhook signing secret, a database password of a driver that uses no proxy, a private key, an assignment the pattern matches with its name): the program gets the value, by the person's word on the page. `surrogate`: the form of the stand-in the agent sees \u2014 `keep_prefix` (kept as it is), `alphabet` (`base62`, `base64url`, `hex`, `digits`, `base32`, `classes` \u2014 each character keeps its class and punctuation stays), `length` (a number, else the value's), `checksum` (`github_crc32`: the last six characters are the CRC32 of the body, base62), `parts` (`password`: of a connection URI only the password changes). An entry without `surrogate` is treated by classes. `provision_commands`: commands that write a key as data into a service's own store; a surrogate in their arguments or stdin is refused unless the binding's `provision` names the host (\xA75.4, \xA76.4). Data, not code: a service is added with one entry.",
6197
6199
  provision_commands: [
6198
6200
  { command: "wrangler secret put", host: "api.cloudflare.com" },
@@ -11734,26 +11736,26 @@ var seal_mcp_v1_default = {
11734
11736
  },
11735
11737
  seal_request: {
11736
11738
  title: "Ask the user for a file or a secret",
11737
- description: 'Ask the user for a file or a secret (API key, token, password) WITHOUT them pasting it into the chat. On their computer a system dialog appears; you can pass `where_url` (the page where that key is created) so they find it in one click. With `wait:true` you get the path of the saved 0600 file, never the value. Use this instead of "paste your key here" or "upload the file here".',
11739
+ description: 'Ask the user for a file or a secret (API key, token, password) WITHOUT them pasting it into the chat. They answer on a seal.net page: on their computer it opens in their browser by itself, elsewhere they get its link or a card in their inbox; you can pass `where_url` (the page where that key is created) so they find it in one click. With `wait:true` you get the path of the saved 0600 file, never the value. Use this instead of "paste your key here" or "upload the file here".',
11738
11740
  annotations: { destructiveHint: false, openWorldHint: true },
11739
11741
  input: {
11740
11742
  properties: {
11741
11743
  what: { type: "string", maxLength: 120, description: "What you ask for, as the user reads it: 'Brave API key', 'the call recordings folder'. Required unless `request` is given." },
11742
- kind: { type: "string", enum: ["secret", "file", "any"], default: "any", description: "`secret`: a password field; `file`: a file (on macOS also a folder); `any`: a secret, or a file when the field is left empty." },
11744
+ kind: { type: "string", enum: ["secret", "file", "any"], default: "any", description: "`secret`: a password field; `file`: a file; `any`: a secret, or a file when the field is left empty." },
11743
11745
  where_url: { type: "string", maxLength: 300, description: "https page where this key is created. The user sees its domain; known services are named, any other domain is marked as given by you." },
11744
11746
  wait: { type: "boolean", default: true, description: "Wait for the answer and return the saved path. Where the answer goes through a link and your client cannot show links itself, the link comes back first: show it and the three words to the user, then call again with `request`." },
11745
11747
  request: { type: "string", pattern: "^h_[A-Za-z0-9_-]{12,}$", description: "Handle of a request answered through a link: wait for it." },
11746
- from: { type: "string", enum: ["owner", "anyone"], description: "`owner`: a card in the connected owner's inbox (`owner_not_paired` without one); `anyone`: a link any person can answer. Without it: the dialog on this machine, else a card for the owner when connected, else the link." },
11747
- dir: { type: "string", description: "An answer through a link or a card: directory to save it into, created if missing; default a private 0700 directory in the system's temp folder. An existing file is never overwritten: the new one becomes `name (1).ext`. The dialog on this machine saves where the `seal` CLI does." },
11748
- bind: { type: "object", description: "kind=secret: where the key will be used, proposed to the person (seal_address.json guard.bind). The page or the dialog shows it when no entry of secrets.json knows the key's form; the person confirms, narrows or removes it. The guard then lets the key out only to these hosts.", properties: { hosts: { type: "array", maxItems: 16, items: { type: "string", maxLength: 253 } }, place: { type: "string", maxLength: 64 }, class: { type: "string", enum: ["outbound", "inprocess"] } }, required: ["hosts"] }
11748
+ from: { type: "string", enum: ["owner", "anyone"], description: "`owner`: a card in the connected owner's inbox (`owner_not_paired` without one); `anyone`: a link any person can answer. Without it: the page opens in this computer's browser when there is one, else a card for the owner when connected, else the link." },
11749
+ dir: { type: "string", description: "An answer through a link or a card: directory to save it into, created if missing; default a private 0700 directory in the system's temp folder. An existing file is never overwritten: the new one becomes `name (1).ext`. The page opened on this computer saves where the `seal` CLI does." },
11750
+ bind: { type: "object", description: "kind=secret: where the key will be used, proposed to the person (seal_address.json guard.bind). The page shows it when no entry of secrets.json knows the key's form; the person confirms, narrows or removes it. The guard then lets the key out only to these hosts.", properties: { hosts: { type: "array", maxItems: 16, items: { type: "string", maxLength: 253 } }, place: { type: "string", maxLength: 64 }, class: { type: "string", enum: ["outbound", "inprocess"] } }, required: ["hosts"] }
11749
11751
  }
11750
11752
  },
11751
11753
  flow: {
11752
- guard: "With this machine's guard running (`seal guard status`), a secret never reaches this server: the dialog is the guard's (the CLI asks the service over its socket), the link is made with the guard's bundle and the guard opens the answer (`seal guard take`); the saved 0600 file holds a surrogate of the key's form, and `bound` says so. The guard puts the real value in only at the hosts of the binding, for programs run through `seal_run`. Without a guard the file holds the value, as before, and `note` says that protection is off (`seal guard install`).",
11753
- order: "Without `from`: the local dialog, then a card in the connected owner's inbox, then the link. The wait is the same for all three (`waitForIntake`).",
11754
+ guard: "With this machine's guard running (`seal guard status`), a secret never reaches this server: the request is made with the guard's bundle and the guard opens the answer (`seal guard take`); the saved 0600 file holds a surrogate of the key's form, and `bound` says so. The guard puts the real value in only at the hosts of the binding, for programs run through `seal_run`. Without a guard the file holds the value, as before, and `note` says that protection is off (`seal guard install`).",
11755
+ order: "Without `from`: the page in this computer's browser, then a card in the connected owner's inbox, then the link. One page for all three (`/i/<id>`); the wait is the same (`waitForIntake`). There is no system dialog and no page on 127.0.0.1: a second window would be the same flow drawn twice, outside the site's design and without the binding (SPEC agent egress \u042015, 27.10).",
11754
11756
  card: "`POST /intake` with `to` = the owner's address: the request sits in the owner's inbox; the person answers from there on /i/<id>. The call returns `output_link` as for a link, its url being the same page.",
11755
- local: "On the user's computer the `seal` CLI draws the system dialog (`seal request --local --json`); nothing leaves the machine. A secret lands in a 0600 file, a picked file stays where it is. The dialog's `Ask someone else` button (where the system window has room for it) answers `request.ask_other`, and the request goes on through the link.",
11756
- link: "Otherwise (no screen, no `seal` CLI): `POST /intake` with this server's bundle (`recipient_bundle`); the user answers at `<public host>/i/<id>`, which checks the bundle and seals the answer to it. With URL-mode elicitation the client shows the link and this call waits; without it the call returns `output_link`. The answer is opened like `seal_open mode=file` into a private 0700 directory.",
11757
+ here: "On the user's computer the `seal` CLI makes the request and opens the page in their browser (`seal request --local --json`), waiting for the answer itself: `files` back, or `request.no_local` where no browser would show the page (SSH, a container), or `request.expired` when nobody answered in time.",
11758
+ link: "Otherwise (no browser here, no `seal` CLI): `POST /intake` with the recipient's bundle (`recipient_bundle`); the user answers at `<public host>/i/<id>`, which checks the bundle and seals the answer to it. With URL-mode elicitation the client shows the link and this call waits; without it the call returns `output_link`. The answer is opened like `seal_open mode=file` into a private 0700 directory.",
11757
11759
  words: "Three words of this server's address (`fingerprint_words.json`), shown in the chat and on the page; the user closes the page if they differ."
11758
11760
  },
11759
11761
  output_received: {
@@ -11761,7 +11763,7 @@ var seal_mcp_v1_default = {
11761
11763
  required: ["handle", "source", "files"],
11762
11764
  properties: {
11763
11765
  handle: { type: "string" },
11764
- source: { type: "string", enum: ["local", "link"] },
11766
+ source: { type: "string", enum: ["link"] },
11765
11767
  files: {
11766
11768
  type: "array",
11767
11769
  items: {
@@ -13682,16 +13684,17 @@ async function sealRequest(ctx, input, deps) {
13682
13684
  const cliArgs = ["request", "--local", "--json", "--kind", kind, "--what", what, "--label", deps.label];
13683
13685
  if (input.whereUrl) cliArgs.push("--where", input.whereUrl);
13684
13686
  if (input.bind) cliArgs.push("--bind", bindSpec(input.bind));
13685
- const local = await runCli(cliArgs);
13686
- if (local && "files" in local) {
13687
- await appendAudit(ctx, "seal_request", handle, "local");
13688
- return { handle, source: "local", files: local.files.map(cliFile), ...local.note ? { note: local.note } : {} };
13687
+ const here = await runCli(cliArgs);
13688
+ if (here && "files" in here) {
13689
+ await appendAudit(ctx, "seal_request", handle, "link");
13690
+ return { handle, source: "link", files: here.files.map(cliFile), ...here.note ? { note: here.note } : {} };
13689
13691
  }
13690
- if (local && local.error.code === "request.cancelled") {
13691
- throw new ToolError("request_cancelled", "the user closed the dialog");
13692
+ const code = here && "error" in here && typeof here.error?.code === "string" ? here.error.code : "request.no_local";
13693
+ if (code === "request.expired") {
13694
+ throw new ToolError("request_expired", here && "error" in here ? here.error.message : "nobody answered in time");
13692
13695
  }
13693
- if (local && local.error.code !== "request.no_local" && local.error.code !== "request.ask_other") {
13694
- throw new ToolError("request_failed", `seal request: ${local.error.message}`);
13696
+ if (code !== "request.no_local" && code !== "request.ask_other" && code !== "request.cancelled") {
13697
+ throw new ToolError("request_failed", `seal request: ${here && "error" in here ? here.error.message : code}`);
13695
13698
  }
13696
13699
  }
13697
13700
  const guard = kind === "file" ? null : await guardStatus(runCli);
@@ -13713,7 +13716,10 @@ async function sealRequest(ctx, input, deps) {
13713
13716
  whereUrl: input.whereUrl,
13714
13717
  kind,
13715
13718
  to: card && owner !== null ? owner.address : void 0,
13716
- bind: input.bind
13719
+ // A binding is the guard's to keep: the page shows one, and lends the key under a lease, only
13720
+ // when the request says a guard is its recipient — `bind` present, hosts proposed or not.
13721
+ // Without a guard the value lands in the file as it is, and the page says so (review of phase 1).
13722
+ bind: guard ? input.bind ?? { hosts: [] } : void 0
13717
13723
  });
13718
13724
  } catch (err2) {
13719
13725
  throw new ToolError("request_failed", `POST /intake failed: ${err2 instanceof Error ? err2.message : String(err2)}`, err2);
@@ -14427,7 +14433,7 @@ function proFileGetOutputToWire(out) {
14427
14433
  }
14428
14434
 
14429
14435
  // src/server.ts
14430
- var SERVER_VERSION = "0.11.0";
14436
+ var SERVER_VERSION = "0.11.2";
14431
14437
  var toolMeta = (name2) => {
14432
14438
  const { title, description, annotations } = seal_mcp_v1_default.tools[name2];
14433
14439
  return { title, description, annotations };
package/dist/cli.js CHANGED
@@ -1965,7 +1965,7 @@ var seal_address_default = {
1965
1965
  guard: {
1966
1966
  kind: "guard",
1967
1967
  is: "a pair request whose requester is this machine's guard (SPEC agent egress \xA73.1): the same answer as `pair` (the pairing file), and the inbox marks the agent as a guard. A request for a secret whose recipient_bundle is a guard's is shown by the inbox as sealed to that guard; one whose bundle is no known guard's is answered only after the person types its three words (\xA76.1, T2\u0430).",
1968
- bind: "POST /intake may carry `bind`: what the agent proposes the key be bound to \u2014 {hosts: [<host>], place?: <place>, class?: outbound|inprocess} (secrets.json guard_note). The page shows it as the binding when no entry of secrets.json knows the key's form; the person confirms, narrows or removes it. At most 16 hosts of 253 characters; the server keeps it as given and never reads it."
1968
+ bind: "POST /intake may carry `bind`: what the agent proposes the key be bound to \u2014 {hosts: [<host>], place?: <place>, class?: outbound|inprocess} (secrets.json guard_note). `bind` is sent only when the recipient_bundle is a guard's, hosts proposed or not: its presence is what lets the page bind the key and lend it under a lease; without it the page says the value goes to the agent as it is. The page shows the proposal as the binding when no entry of secrets.json knows the key's form; the person confirms, narrows or removes it. At most 16 hosts of 253 characters, each a name of two labels or more (`*.` with two labels under it, three under secrets.json wildcard_public_second_level); the server checks the shape and keeps it as given."
1969
1969
  },
1970
1970
  payloads: {
1971
1971
  name_max: 80,
@@ -6159,6 +6159,8 @@ var secrets_default = {
6159
6159
  },
6160
6160
  patterns_note: "What a key looks like, for every reader: `seal doctor --transcripts`, the scanner of the Pro web page and the `sealfs` detector (C1 \u042039). `pattern` is an expression in the subset all three run alike \u2014 JS, Python `re`, Rust `regex`: no lookaround, no backreference, no inline flag; a boundary is `\\b` inside the expression. The flags are shared: case-insensitive and multiline. A match that contains a string of the entry's `allowlist` (case-insensitive) is no finding. A match of an entry with `checksum` is a finding only when it passes that sum: `luhn` \u2014 the Luhn sum of its digits is 0 modulo 10; `iban` \u2014 its characters but spaces, upper-cased, the first four moved to the end, each letter read as a number (A = 10 \u2026 Z = 35), are 1 modulo 97. A finding is shown masked: its first four characters, `\u2026`, its last two. `vectors.hit` holds a finding of the entry, `vectors.clean` none; every reader passes them. The scanner page does not take a file larger than `max_file_bytes`; `seal doctor` reads agent transcripts of any size, a line at a time \u2014 skipping a long transcript would hide its leak. Data, not code: a service is added with one entry.",
6161
6161
  max_file_bytes: 10485760,
6162
+ wildcard_public_second_level: ["ac", "co", "com", "edu", "gov", "go", "ne", "net", "or", "org", "mil", "int", "gob", "ltd", "plc", "me", "nom"],
6163
+ wildcard_note: "A proposed `*.<name>` binds a key only with two labels under it, three when the first is one of wildcard_public_second_level (`*.co.uk` would be a root for every .co.uk host); a bare name needs two labels (SPEC agent egress \xA74.2, review of phase 1).",
6162
6164
  guard_note: "What the guard does with a key of an entry (SPEC agent egress \xA74.1, read by `seal-client-core::guard`). `hosts`: where the key is a way in, the default binding a person confirms or narrows; `*.` is one label. `place`: where the guard puts the value \u2014 `bearer` (Authorization: Bearer), `header:<name>`, `query:<param>`, `basic_user`, `basic_pass`, `userinfo`, `url` (the secret is the request address itself, a webhook). `class`: `outbound` \u2014 a key a program enters a service with, the proxy puts it in; `inprocess` \u2014 a key a program works with itself (a webhook signing secret, a database password of a driver that uses no proxy, a private key, an assignment the pattern matches with its name): the program gets the value, by the person's word on the page. `surrogate`: the form of the stand-in the agent sees \u2014 `keep_prefix` (kept as it is), `alphabet` (`base62`, `base64url`, `hex`, `digits`, `base32`, `classes` \u2014 each character keeps its class and punctuation stays), `length` (a number, else the value's), `checksum` (`github_crc32`: the last six characters are the CRC32 of the body, base62), `parts` (`password`: of a connection URI only the password changes). An entry without `surrogate` is treated by classes. `provision_commands`: commands that write a key as data into a service's own store; a surrogate in their arguments or stdin is refused unless the binding's `provision` names the host (\xA75.4, \xA76.4). Data, not code: a service is added with one entry.",
6163
6165
  provision_commands: [
6164
6166
  { command: "wrangler secret put", host: "api.cloudflare.com" },
@@ -11700,26 +11702,26 @@ var seal_mcp_v1_default = {
11700
11702
  },
11701
11703
  seal_request: {
11702
11704
  title: "Ask the user for a file or a secret",
11703
- description: 'Ask the user for a file or a secret (API key, token, password) WITHOUT them pasting it into the chat. On their computer a system dialog appears; you can pass `where_url` (the page where that key is created) so they find it in one click. With `wait:true` you get the path of the saved 0600 file, never the value. Use this instead of "paste your key here" or "upload the file here".',
11705
+ description: 'Ask the user for a file or a secret (API key, token, password) WITHOUT them pasting it into the chat. They answer on a seal.net page: on their computer it opens in their browser by itself, elsewhere they get its link or a card in their inbox; you can pass `where_url` (the page where that key is created) so they find it in one click. With `wait:true` you get the path of the saved 0600 file, never the value. Use this instead of "paste your key here" or "upload the file here".',
11704
11706
  annotations: { destructiveHint: false, openWorldHint: true },
11705
11707
  input: {
11706
11708
  properties: {
11707
11709
  what: { type: "string", maxLength: 120, description: "What you ask for, as the user reads it: 'Brave API key', 'the call recordings folder'. Required unless `request` is given." },
11708
- kind: { type: "string", enum: ["secret", "file", "any"], default: "any", description: "`secret`: a password field; `file`: a file (on macOS also a folder); `any`: a secret, or a file when the field is left empty." },
11710
+ kind: { type: "string", enum: ["secret", "file", "any"], default: "any", description: "`secret`: a password field; `file`: a file; `any`: a secret, or a file when the field is left empty." },
11709
11711
  where_url: { type: "string", maxLength: 300, description: "https page where this key is created. The user sees its domain; known services are named, any other domain is marked as given by you." },
11710
11712
  wait: { type: "boolean", default: true, description: "Wait for the answer and return the saved path. Where the answer goes through a link and your client cannot show links itself, the link comes back first: show it and the three words to the user, then call again with `request`." },
11711
11713
  request: { type: "string", pattern: "^h_[A-Za-z0-9_-]{12,}$", description: "Handle of a request answered through a link: wait for it." },
11712
- from: { type: "string", enum: ["owner", "anyone"], description: "`owner`: a card in the connected owner's inbox (`owner_not_paired` without one); `anyone`: a link any person can answer. Without it: the dialog on this machine, else a card for the owner when connected, else the link." },
11713
- dir: { type: "string", description: "An answer through a link or a card: directory to save it into, created if missing; default a private 0700 directory in the system's temp folder. An existing file is never overwritten: the new one becomes `name (1).ext`. The dialog on this machine saves where the `seal` CLI does." },
11714
- bind: { type: "object", description: "kind=secret: where the key will be used, proposed to the person (seal_address.json guard.bind). The page or the dialog shows it when no entry of secrets.json knows the key's form; the person confirms, narrows or removes it. The guard then lets the key out only to these hosts.", properties: { hosts: { type: "array", maxItems: 16, items: { type: "string", maxLength: 253 } }, place: { type: "string", maxLength: 64 }, class: { type: "string", enum: ["outbound", "inprocess"] } }, required: ["hosts"] }
11714
+ from: { type: "string", enum: ["owner", "anyone"], description: "`owner`: a card in the connected owner's inbox (`owner_not_paired` without one); `anyone`: a link any person can answer. Without it: the page opens in this computer's browser when there is one, else a card for the owner when connected, else the link." },
11715
+ dir: { type: "string", description: "An answer through a link or a card: directory to save it into, created if missing; default a private 0700 directory in the system's temp folder. An existing file is never overwritten: the new one becomes `name (1).ext`. The page opened on this computer saves where the `seal` CLI does." },
11716
+ bind: { type: "object", description: "kind=secret: where the key will be used, proposed to the person (seal_address.json guard.bind). The page shows it when no entry of secrets.json knows the key's form; the person confirms, narrows or removes it. The guard then lets the key out only to these hosts.", properties: { hosts: { type: "array", maxItems: 16, items: { type: "string", maxLength: 253 } }, place: { type: "string", maxLength: 64 }, class: { type: "string", enum: ["outbound", "inprocess"] } }, required: ["hosts"] }
11715
11717
  }
11716
11718
  },
11717
11719
  flow: {
11718
- guard: "With this machine's guard running (`seal guard status`), a secret never reaches this server: the dialog is the guard's (the CLI asks the service over its socket), the link is made with the guard's bundle and the guard opens the answer (`seal guard take`); the saved 0600 file holds a surrogate of the key's form, and `bound` says so. The guard puts the real value in only at the hosts of the binding, for programs run through `seal_run`. Without a guard the file holds the value, as before, and `note` says that protection is off (`seal guard install`).",
11719
- order: "Without `from`: the local dialog, then a card in the connected owner's inbox, then the link. The wait is the same for all three (`waitForIntake`).",
11720
+ guard: "With this machine's guard running (`seal guard status`), a secret never reaches this server: the request is made with the guard's bundle and the guard opens the answer (`seal guard take`); the saved 0600 file holds a surrogate of the key's form, and `bound` says so. The guard puts the real value in only at the hosts of the binding, for programs run through `seal_run`. Without a guard the file holds the value, as before, and `note` says that protection is off (`seal guard install`).",
11721
+ order: "Without `from`: the page in this computer's browser, then a card in the connected owner's inbox, then the link. One page for all three (`/i/<id>`); the wait is the same (`waitForIntake`). There is no system dialog and no page on 127.0.0.1: a second window would be the same flow drawn twice, outside the site's design and without the binding (SPEC agent egress \u042015, 27.10).",
11720
11722
  card: "`POST /intake` with `to` = the owner's address: the request sits in the owner's inbox; the person answers from there on /i/<id>. The call returns `output_link` as for a link, its url being the same page.",
11721
- local: "On the user's computer the `seal` CLI draws the system dialog (`seal request --local --json`); nothing leaves the machine. A secret lands in a 0600 file, a picked file stays where it is. The dialog's `Ask someone else` button (where the system window has room for it) answers `request.ask_other`, and the request goes on through the link.",
11722
- link: "Otherwise (no screen, no `seal` CLI): `POST /intake` with this server's bundle (`recipient_bundle`); the user answers at `<public host>/i/<id>`, which checks the bundle and seals the answer to it. With URL-mode elicitation the client shows the link and this call waits; without it the call returns `output_link`. The answer is opened like `seal_open mode=file` into a private 0700 directory.",
11723
+ here: "On the user's computer the `seal` CLI makes the request and opens the page in their browser (`seal request --local --json`), waiting for the answer itself: `files` back, or `request.no_local` where no browser would show the page (SSH, a container), or `request.expired` when nobody answered in time.",
11724
+ link: "Otherwise (no browser here, no `seal` CLI): `POST /intake` with the recipient's bundle (`recipient_bundle`); the user answers at `<public host>/i/<id>`, which checks the bundle and seals the answer to it. With URL-mode elicitation the client shows the link and this call waits; without it the call returns `output_link`. The answer is opened like `seal_open mode=file` into a private 0700 directory.",
11723
11725
  words: "Three words of this server's address (`fingerprint_words.json`), shown in the chat and on the page; the user closes the page if they differ."
11724
11726
  },
11725
11727
  output_received: {
@@ -11727,7 +11729,7 @@ var seal_mcp_v1_default = {
11727
11729
  required: ["handle", "source", "files"],
11728
11730
  properties: {
11729
11731
  handle: { type: "string" },
11730
- source: { type: "string", enum: ["local", "link"] },
11732
+ source: { type: "string", enum: ["link"] },
11731
11733
  files: {
11732
11734
  type: "array",
11733
11735
  items: {
@@ -13648,16 +13650,17 @@ async function sealRequest(ctx, input, deps) {
13648
13650
  const cliArgs = ["request", "--local", "--json", "--kind", kind, "--what", what, "--label", deps.label];
13649
13651
  if (input.whereUrl) cliArgs.push("--where", input.whereUrl);
13650
13652
  if (input.bind) cliArgs.push("--bind", bindSpec(input.bind));
13651
- const local = await runCli(cliArgs);
13652
- if (local && "files" in local) {
13653
- await appendAudit(ctx, "seal_request", handle, "local");
13654
- return { handle, source: "local", files: local.files.map(cliFile), ...local.note ? { note: local.note } : {} };
13653
+ const here = await runCli(cliArgs);
13654
+ if (here && "files" in here) {
13655
+ await appendAudit(ctx, "seal_request", handle, "link");
13656
+ return { handle, source: "link", files: here.files.map(cliFile), ...here.note ? { note: here.note } : {} };
13655
13657
  }
13656
- if (local && local.error.code === "request.cancelled") {
13657
- throw new ToolError("request_cancelled", "the user closed the dialog");
13658
+ const code = here && "error" in here && typeof here.error?.code === "string" ? here.error.code : "request.no_local";
13659
+ if (code === "request.expired") {
13660
+ throw new ToolError("request_expired", here && "error" in here ? here.error.message : "nobody answered in time");
13658
13661
  }
13659
- if (local && local.error.code !== "request.no_local" && local.error.code !== "request.ask_other") {
13660
- throw new ToolError("request_failed", `seal request: ${local.error.message}`);
13662
+ if (code !== "request.no_local" && code !== "request.ask_other" && code !== "request.cancelled") {
13663
+ throw new ToolError("request_failed", `seal request: ${here && "error" in here ? here.error.message : code}`);
13661
13664
  }
13662
13665
  }
13663
13666
  const guard = kind === "file" ? null : await guardStatus(runCli);
@@ -13679,7 +13682,10 @@ async function sealRequest(ctx, input, deps) {
13679
13682
  whereUrl: input.whereUrl,
13680
13683
  kind,
13681
13684
  to: card && owner !== null ? owner.address : void 0,
13682
- bind: input.bind
13685
+ // A binding is the guard's to keep: the page shows one, and lends the key under a lease, only
13686
+ // when the request says a guard is its recipient — `bind` present, hosts proposed or not.
13687
+ // Without a guard the value lands in the file as it is, and the page says so (review of phase 1).
13688
+ bind: guard ? input.bind ?? { hosts: [] } : void 0
13683
13689
  });
13684
13690
  } catch (err2) {
13685
13691
  throw new ToolError("request_failed", `POST /intake failed: ${err2 instanceof Error ? err2.message : String(err2)}`, err2);
@@ -14393,7 +14399,7 @@ function proFileGetOutputToWire(out) {
14393
14399
  }
14394
14400
 
14395
14401
  // src/server.ts
14396
- var SERVER_VERSION = "0.11.0";
14402
+ var SERVER_VERSION = "0.11.2";
14397
14403
  var toolMeta = (name2) => {
14398
14404
  const { title, description, annotations } = seal_mcp_v1_default.tools[name2];
14399
14405
  return { title, description, annotations };
package/dist/index.cjs CHANGED
@@ -4251,26 +4251,26 @@ var seal_mcp_v1_default = {
4251
4251
  },
4252
4252
  seal_request: {
4253
4253
  title: "Ask the user for a file or a secret",
4254
- description: 'Ask the user for a file or a secret (API key, token, password) WITHOUT them pasting it into the chat. On their computer a system dialog appears; you can pass `where_url` (the page where that key is created) so they find it in one click. With `wait:true` you get the path of the saved 0600 file, never the value. Use this instead of "paste your key here" or "upload the file here".',
4254
+ description: 'Ask the user for a file or a secret (API key, token, password) WITHOUT them pasting it into the chat. They answer on a seal.net page: on their computer it opens in their browser by itself, elsewhere they get its link or a card in their inbox; you can pass `where_url` (the page where that key is created) so they find it in one click. With `wait:true` you get the path of the saved 0600 file, never the value. Use this instead of "paste your key here" or "upload the file here".',
4255
4255
  annotations: { destructiveHint: false, openWorldHint: true },
4256
4256
  input: {
4257
4257
  properties: {
4258
4258
  what: { type: "string", maxLength: 120, description: "What you ask for, as the user reads it: 'Brave API key', 'the call recordings folder'. Required unless `request` is given." },
4259
- kind: { type: "string", enum: ["secret", "file", "any"], default: "any", description: "`secret`: a password field; `file`: a file (on macOS also a folder); `any`: a secret, or a file when the field is left empty." },
4259
+ kind: { type: "string", enum: ["secret", "file", "any"], default: "any", description: "`secret`: a password field; `file`: a file; `any`: a secret, or a file when the field is left empty." },
4260
4260
  where_url: { type: "string", maxLength: 300, description: "https page where this key is created. The user sees its domain; known services are named, any other domain is marked as given by you." },
4261
4261
  wait: { type: "boolean", default: true, description: "Wait for the answer and return the saved path. Where the answer goes through a link and your client cannot show links itself, the link comes back first: show it and the three words to the user, then call again with `request`." },
4262
4262
  request: { type: "string", pattern: "^h_[A-Za-z0-9_-]{12,}$", description: "Handle of a request answered through a link: wait for it." },
4263
- from: { type: "string", enum: ["owner", "anyone"], description: "`owner`: a card in the connected owner's inbox (`owner_not_paired` without one); `anyone`: a link any person can answer. Without it: the dialog on this machine, else a card for the owner when connected, else the link." },
4264
- dir: { type: "string", description: "An answer through a link or a card: directory to save it into, created if missing; default a private 0700 directory in the system's temp folder. An existing file is never overwritten: the new one becomes `name (1).ext`. The dialog on this machine saves where the `seal` CLI does." },
4265
- bind: { type: "object", description: "kind=secret: where the key will be used, proposed to the person (seal_address.json guard.bind). The page or the dialog shows it when no entry of secrets.json knows the key's form; the person confirms, narrows or removes it. The guard then lets the key out only to these hosts.", properties: { hosts: { type: "array", maxItems: 16, items: { type: "string", maxLength: 253 } }, place: { type: "string", maxLength: 64 }, class: { type: "string", enum: ["outbound", "inprocess"] } }, required: ["hosts"] }
4263
+ from: { type: "string", enum: ["owner", "anyone"], description: "`owner`: a card in the connected owner's inbox (`owner_not_paired` without one); `anyone`: a link any person can answer. Without it: the page opens in this computer's browser when there is one, else a card for the owner when connected, else the link." },
4264
+ dir: { type: "string", description: "An answer through a link or a card: directory to save it into, created if missing; default a private 0700 directory in the system's temp folder. An existing file is never overwritten: the new one becomes `name (1).ext`. The page opened on this computer saves where the `seal` CLI does." },
4265
+ bind: { type: "object", description: "kind=secret: where the key will be used, proposed to the person (seal_address.json guard.bind). The page shows it when no entry of secrets.json knows the key's form; the person confirms, narrows or removes it. The guard then lets the key out only to these hosts.", properties: { hosts: { type: "array", maxItems: 16, items: { type: "string", maxLength: 253 } }, place: { type: "string", maxLength: 64 }, class: { type: "string", enum: ["outbound", "inprocess"] } }, required: ["hosts"] }
4266
4266
  }
4267
4267
  },
4268
4268
  flow: {
4269
- guard: "With this machine's guard running (`seal guard status`), a secret never reaches this server: the dialog is the guard's (the CLI asks the service over its socket), the link is made with the guard's bundle and the guard opens the answer (`seal guard take`); the saved 0600 file holds a surrogate of the key's form, and `bound` says so. The guard puts the real value in only at the hosts of the binding, for programs run through `seal_run`. Without a guard the file holds the value, as before, and `note` says that protection is off (`seal guard install`).",
4270
- order: "Without `from`: the local dialog, then a card in the connected owner's inbox, then the link. The wait is the same for all three (`waitForIntake`).",
4269
+ guard: "With this machine's guard running (`seal guard status`), a secret never reaches this server: the request is made with the guard's bundle and the guard opens the answer (`seal guard take`); the saved 0600 file holds a surrogate of the key's form, and `bound` says so. The guard puts the real value in only at the hosts of the binding, for programs run through `seal_run`. Without a guard the file holds the value, as before, and `note` says that protection is off (`seal guard install`).",
4270
+ order: "Without `from`: the page in this computer's browser, then a card in the connected owner's inbox, then the link. One page for all three (`/i/<id>`); the wait is the same (`waitForIntake`). There is no system dialog and no page on 127.0.0.1: a second window would be the same flow drawn twice, outside the site's design and without the binding (SPEC agent egress \u042015, 27.10).",
4271
4271
  card: "`POST /intake` with `to` = the owner's address: the request sits in the owner's inbox; the person answers from there on /i/<id>. The call returns `output_link` as for a link, its url being the same page.",
4272
- local: "On the user's computer the `seal` CLI draws the system dialog (`seal request --local --json`); nothing leaves the machine. A secret lands in a 0600 file, a picked file stays where it is. The dialog's `Ask someone else` button (where the system window has room for it) answers `request.ask_other`, and the request goes on through the link.",
4273
- link: "Otherwise (no screen, no `seal` CLI): `POST /intake` with this server's bundle (`recipient_bundle`); the user answers at `<public host>/i/<id>`, which checks the bundle and seals the answer to it. With URL-mode elicitation the client shows the link and this call waits; without it the call returns `output_link`. The answer is opened like `seal_open mode=file` into a private 0700 directory.",
4272
+ here: "On the user's computer the `seal` CLI makes the request and opens the page in their browser (`seal request --local --json`), waiting for the answer itself: `files` back, or `request.no_local` where no browser would show the page (SSH, a container), or `request.expired` when nobody answered in time.",
4273
+ link: "Otherwise (no browser here, no `seal` CLI): `POST /intake` with the recipient's bundle (`recipient_bundle`); the user answers at `<public host>/i/<id>`, which checks the bundle and seals the answer to it. With URL-mode elicitation the client shows the link and this call waits; without it the call returns `output_link`. The answer is opened like `seal_open mode=file` into a private 0700 directory.",
4274
4274
  words: "Three words of this server's address (`fingerprint_words.json`), shown in the chat and on the page; the user closes the page if they differ."
4275
4275
  },
4276
4276
  output_received: {
@@ -4278,7 +4278,7 @@ var seal_mcp_v1_default = {
4278
4278
  required: ["handle", "source", "files"],
4279
4279
  properties: {
4280
4280
  handle: { type: "string" },
4281
- source: { type: "string", enum: ["local", "link"] },
4281
+ source: { type: "string", enum: ["link"] },
4282
4282
  files: {
4283
4283
  type: "array",
4284
4284
  items: {
@@ -6895,7 +6895,7 @@ var seal_address_default = {
6895
6895
  guard: {
6896
6896
  kind: "guard",
6897
6897
  is: "a pair request whose requester is this machine's guard (SPEC agent egress \xA73.1): the same answer as `pair` (the pairing file), and the inbox marks the agent as a guard. A request for a secret whose recipient_bundle is a guard's is shown by the inbox as sealed to that guard; one whose bundle is no known guard's is answered only after the person types its three words (\xA76.1, T2\u0430).",
6898
- bind: "POST /intake may carry `bind`: what the agent proposes the key be bound to \u2014 {hosts: [<host>], place?: <place>, class?: outbound|inprocess} (secrets.json guard_note). The page shows it as the binding when no entry of secrets.json knows the key's form; the person confirms, narrows or removes it. At most 16 hosts of 253 characters; the server keeps it as given and never reads it."
6898
+ bind: "POST /intake may carry `bind`: what the agent proposes the key be bound to \u2014 {hosts: [<host>], place?: <place>, class?: outbound|inprocess} (secrets.json guard_note). `bind` is sent only when the recipient_bundle is a guard's, hosts proposed or not: its presence is what lets the page bind the key and lend it under a lease; without it the page says the value goes to the agent as it is. The page shows the proposal as the binding when no entry of secrets.json knows the key's form; the person confirms, narrows or removes it. At most 16 hosts of 253 characters, each a name of two labels or more (`*.` with two labels under it, three under secrets.json wildcard_public_second_level); the server checks the shape and keeps it as given."
6899
6899
  },
6900
6900
  payloads: {
6901
6901
  name_max: 80,
@@ -11089,6 +11089,8 @@ var secrets_default = {
11089
11089
  },
11090
11090
  patterns_note: "What a key looks like, for every reader: `seal doctor --transcripts`, the scanner of the Pro web page and the `sealfs` detector (C1 \u042039). `pattern` is an expression in the subset all three run alike \u2014 JS, Python `re`, Rust `regex`: no lookaround, no backreference, no inline flag; a boundary is `\\b` inside the expression. The flags are shared: case-insensitive and multiline. A match that contains a string of the entry's `allowlist` (case-insensitive) is no finding. A match of an entry with `checksum` is a finding only when it passes that sum: `luhn` \u2014 the Luhn sum of its digits is 0 modulo 10; `iban` \u2014 its characters but spaces, upper-cased, the first four moved to the end, each letter read as a number (A = 10 \u2026 Z = 35), are 1 modulo 97. A finding is shown masked: its first four characters, `\u2026`, its last two. `vectors.hit` holds a finding of the entry, `vectors.clean` none; every reader passes them. The scanner page does not take a file larger than `max_file_bytes`; `seal doctor` reads agent transcripts of any size, a line at a time \u2014 skipping a long transcript would hide its leak. Data, not code: a service is added with one entry.",
11091
11091
  max_file_bytes: 10485760,
11092
+ wildcard_public_second_level: ["ac", "co", "com", "edu", "gov", "go", "ne", "net", "or", "org", "mil", "int", "gob", "ltd", "plc", "me", "nom"],
11093
+ wildcard_note: "A proposed `*.<name>` binds a key only with two labels under it, three when the first is one of wildcard_public_second_level (`*.co.uk` would be a root for every .co.uk host); a bare name needs two labels (SPEC agent egress \xA74.2, review of phase 1).",
11092
11094
  guard_note: "What the guard does with a key of an entry (SPEC agent egress \xA74.1, read by `seal-client-core::guard`). `hosts`: where the key is a way in, the default binding a person confirms or narrows; `*.` is one label. `place`: where the guard puts the value \u2014 `bearer` (Authorization: Bearer), `header:<name>`, `query:<param>`, `basic_user`, `basic_pass`, `userinfo`, `url` (the secret is the request address itself, a webhook). `class`: `outbound` \u2014 a key a program enters a service with, the proxy puts it in; `inprocess` \u2014 a key a program works with itself (a webhook signing secret, a database password of a driver that uses no proxy, a private key, an assignment the pattern matches with its name): the program gets the value, by the person's word on the page. `surrogate`: the form of the stand-in the agent sees \u2014 `keep_prefix` (kept as it is), `alphabet` (`base62`, `base64url`, `hex`, `digits`, `base32`, `classes` \u2014 each character keeps its class and punctuation stays), `length` (a number, else the value's), `checksum` (`github_crc32`: the last six characters are the CRC32 of the body, base62), `parts` (`password`: of a connection URI only the password changes). An entry without `surrogate` is treated by classes. `provision_commands`: commands that write a key as data into a service's own store; a surrogate in their arguments or stdin is refused unless the binding's `provision` names the host (\xA75.4, \xA76.4). Data, not code: a service is added with one entry.",
11093
11095
  provision_commands: [
11094
11096
  { command: "wrangler secret put", host: "api.cloudflare.com" },
@@ -13514,16 +13516,17 @@ async function sealRequest(ctx, input, deps) {
13514
13516
  const cliArgs = ["request", "--local", "--json", "--kind", kind, "--what", what, "--label", deps.label];
13515
13517
  if (input.whereUrl) cliArgs.push("--where", input.whereUrl);
13516
13518
  if (input.bind) cliArgs.push("--bind", bindSpec(input.bind));
13517
- const local = await runCli(cliArgs);
13518
- if (local && "files" in local) {
13519
- await appendAudit(ctx, "seal_request", handle, "local");
13520
- return { handle, source: "local", files: local.files.map(cliFile), ...local.note ? { note: local.note } : {} };
13519
+ const here = await runCli(cliArgs);
13520
+ if (here && "files" in here) {
13521
+ await appendAudit(ctx, "seal_request", handle, "link");
13522
+ return { handle, source: "link", files: here.files.map(cliFile), ...here.note ? { note: here.note } : {} };
13521
13523
  }
13522
- if (local && local.error.code === "request.cancelled") {
13523
- throw new ToolError("request_cancelled", "the user closed the dialog");
13524
+ const code = here && "error" in here && typeof here.error?.code === "string" ? here.error.code : "request.no_local";
13525
+ if (code === "request.expired") {
13526
+ throw new ToolError("request_expired", here && "error" in here ? here.error.message : "nobody answered in time");
13524
13527
  }
13525
- if (local && local.error.code !== "request.no_local" && local.error.code !== "request.ask_other") {
13526
- throw new ToolError("request_failed", `seal request: ${local.error.message}`);
13528
+ if (code !== "request.no_local" && code !== "request.ask_other" && code !== "request.cancelled") {
13529
+ throw new ToolError("request_failed", `seal request: ${here && "error" in here ? here.error.message : code}`);
13527
13530
  }
13528
13531
  }
13529
13532
  const guard = kind === "file" ? null : await guardStatus(runCli);
@@ -13545,7 +13548,10 @@ async function sealRequest(ctx, input, deps) {
13545
13548
  whereUrl: input.whereUrl,
13546
13549
  kind,
13547
13550
  to: card && owner !== null ? owner.address : void 0,
13548
- bind: input.bind
13551
+ // A binding is the guard's to keep: the page shows one, and lends the key under a lease, only
13552
+ // when the request says a guard is its recipient — `bind` present, hosts proposed or not.
13553
+ // Without a guard the value lands in the file as it is, and the page says so (review of phase 1).
13554
+ bind: guard ? input.bind ?? { hosts: [] } : void 0
13549
13555
  });
13550
13556
  } catch (err2) {
13551
13557
  throw new ToolError("request_failed", `POST /intake failed: ${err2 instanceof Error ? err2.message : String(err2)}`, err2);
@@ -14259,7 +14265,7 @@ function proFileGetOutputToWire(out) {
14259
14265
  }
14260
14266
 
14261
14267
  // src/server.ts
14262
- var SERVER_VERSION = "0.11.0";
14268
+ var SERVER_VERSION = "0.11.2";
14263
14269
  var toolMeta = (name2) => {
14264
14270
  const { title, description, annotations } = seal_mcp_v1_default.tools[name2];
14265
14271
  return { title, description, annotations };
package/dist/index.d.cts CHANGED
@@ -1096,7 +1096,7 @@ interface AuditEntry {
1096
1096
  * (`{ "type": ["string", "null"] }`) and the value carries
1097
1097
  * tool-specific meaning:
1098
1098
  * - seal_share → 'inbox' | 'handoff' | 'forward'
1099
- * - seal_request → 'local' | 'link' | 'card'
1099
+ * - seal_request → 'link' | 'card' (older state files may carry 'local', the page once opened here)
1100
1100
  * - seal_pair → 'paired'
1101
1101
  * - seal_open → 'metadata' | 'inline' | 'file'
1102
1102
  * - seal_list → null
package/dist/index.d.ts CHANGED
@@ -1096,7 +1096,7 @@ interface AuditEntry {
1096
1096
  * (`{ "type": ["string", "null"] }`) and the value carries
1097
1097
  * tool-specific meaning:
1098
1098
  * - seal_share → 'inbox' | 'handoff' | 'forward'
1099
- * - seal_request → 'local' | 'link' | 'card'
1099
+ * - seal_request → 'link' | 'card' (older state files may carry 'local', the page once opened here)
1100
1100
  * - seal_pair → 'paired'
1101
1101
  * - seal_open → 'metadata' | 'inline' | 'file'
1102
1102
  * - seal_list → null
package/dist/index.js CHANGED
@@ -4167,26 +4167,26 @@ var seal_mcp_v1_default = {
4167
4167
  },
4168
4168
  seal_request: {
4169
4169
  title: "Ask the user for a file or a secret",
4170
- description: 'Ask the user for a file or a secret (API key, token, password) WITHOUT them pasting it into the chat. On their computer a system dialog appears; you can pass `where_url` (the page where that key is created) so they find it in one click. With `wait:true` you get the path of the saved 0600 file, never the value. Use this instead of "paste your key here" or "upload the file here".',
4170
+ description: 'Ask the user for a file or a secret (API key, token, password) WITHOUT them pasting it into the chat. They answer on a seal.net page: on their computer it opens in their browser by itself, elsewhere they get its link or a card in their inbox; you can pass `where_url` (the page where that key is created) so they find it in one click. With `wait:true` you get the path of the saved 0600 file, never the value. Use this instead of "paste your key here" or "upload the file here".',
4171
4171
  annotations: { destructiveHint: false, openWorldHint: true },
4172
4172
  input: {
4173
4173
  properties: {
4174
4174
  what: { type: "string", maxLength: 120, description: "What you ask for, as the user reads it: 'Brave API key', 'the call recordings folder'. Required unless `request` is given." },
4175
- kind: { type: "string", enum: ["secret", "file", "any"], default: "any", description: "`secret`: a password field; `file`: a file (on macOS also a folder); `any`: a secret, or a file when the field is left empty." },
4175
+ kind: { type: "string", enum: ["secret", "file", "any"], default: "any", description: "`secret`: a password field; `file`: a file; `any`: a secret, or a file when the field is left empty." },
4176
4176
  where_url: { type: "string", maxLength: 300, description: "https page where this key is created. The user sees its domain; known services are named, any other domain is marked as given by you." },
4177
4177
  wait: { type: "boolean", default: true, description: "Wait for the answer and return the saved path. Where the answer goes through a link and your client cannot show links itself, the link comes back first: show it and the three words to the user, then call again with `request`." },
4178
4178
  request: { type: "string", pattern: "^h_[A-Za-z0-9_-]{12,}$", description: "Handle of a request answered through a link: wait for it." },
4179
- from: { type: "string", enum: ["owner", "anyone"], description: "`owner`: a card in the connected owner's inbox (`owner_not_paired` without one); `anyone`: a link any person can answer. Without it: the dialog on this machine, else a card for the owner when connected, else the link." },
4180
- dir: { type: "string", description: "An answer through a link or a card: directory to save it into, created if missing; default a private 0700 directory in the system's temp folder. An existing file is never overwritten: the new one becomes `name (1).ext`. The dialog on this machine saves where the `seal` CLI does." },
4181
- bind: { type: "object", description: "kind=secret: where the key will be used, proposed to the person (seal_address.json guard.bind). The page or the dialog shows it when no entry of secrets.json knows the key's form; the person confirms, narrows or removes it. The guard then lets the key out only to these hosts.", properties: { hosts: { type: "array", maxItems: 16, items: { type: "string", maxLength: 253 } }, place: { type: "string", maxLength: 64 }, class: { type: "string", enum: ["outbound", "inprocess"] } }, required: ["hosts"] }
4179
+ from: { type: "string", enum: ["owner", "anyone"], description: "`owner`: a card in the connected owner's inbox (`owner_not_paired` without one); `anyone`: a link any person can answer. Without it: the page opens in this computer's browser when there is one, else a card for the owner when connected, else the link." },
4180
+ dir: { type: "string", description: "An answer through a link or a card: directory to save it into, created if missing; default a private 0700 directory in the system's temp folder. An existing file is never overwritten: the new one becomes `name (1).ext`. The page opened on this computer saves where the `seal` CLI does." },
4181
+ bind: { type: "object", description: "kind=secret: where the key will be used, proposed to the person (seal_address.json guard.bind). The page shows it when no entry of secrets.json knows the key's form; the person confirms, narrows or removes it. The guard then lets the key out only to these hosts.", properties: { hosts: { type: "array", maxItems: 16, items: { type: "string", maxLength: 253 } }, place: { type: "string", maxLength: 64 }, class: { type: "string", enum: ["outbound", "inprocess"] } }, required: ["hosts"] }
4182
4182
  }
4183
4183
  },
4184
4184
  flow: {
4185
- guard: "With this machine's guard running (`seal guard status`), a secret never reaches this server: the dialog is the guard's (the CLI asks the service over its socket), the link is made with the guard's bundle and the guard opens the answer (`seal guard take`); the saved 0600 file holds a surrogate of the key's form, and `bound` says so. The guard puts the real value in only at the hosts of the binding, for programs run through `seal_run`. Without a guard the file holds the value, as before, and `note` says that protection is off (`seal guard install`).",
4186
- order: "Without `from`: the local dialog, then a card in the connected owner's inbox, then the link. The wait is the same for all three (`waitForIntake`).",
4185
+ guard: "With this machine's guard running (`seal guard status`), a secret never reaches this server: the request is made with the guard's bundle and the guard opens the answer (`seal guard take`); the saved 0600 file holds a surrogate of the key's form, and `bound` says so. The guard puts the real value in only at the hosts of the binding, for programs run through `seal_run`. Without a guard the file holds the value, as before, and `note` says that protection is off (`seal guard install`).",
4186
+ order: "Without `from`: the page in this computer's browser, then a card in the connected owner's inbox, then the link. One page for all three (`/i/<id>`); the wait is the same (`waitForIntake`). There is no system dialog and no page on 127.0.0.1: a second window would be the same flow drawn twice, outside the site's design and without the binding (SPEC agent egress \u042015, 27.10).",
4187
4187
  card: "`POST /intake` with `to` = the owner's address: the request sits in the owner's inbox; the person answers from there on /i/<id>. The call returns `output_link` as for a link, its url being the same page.",
4188
- local: "On the user's computer the `seal` CLI draws the system dialog (`seal request --local --json`); nothing leaves the machine. A secret lands in a 0600 file, a picked file stays where it is. The dialog's `Ask someone else` button (where the system window has room for it) answers `request.ask_other`, and the request goes on through the link.",
4189
- link: "Otherwise (no screen, no `seal` CLI): `POST /intake` with this server's bundle (`recipient_bundle`); the user answers at `<public host>/i/<id>`, which checks the bundle and seals the answer to it. With URL-mode elicitation the client shows the link and this call waits; without it the call returns `output_link`. The answer is opened like `seal_open mode=file` into a private 0700 directory.",
4188
+ here: "On the user's computer the `seal` CLI makes the request and opens the page in their browser (`seal request --local --json`), waiting for the answer itself: `files` back, or `request.no_local` where no browser would show the page (SSH, a container), or `request.expired` when nobody answered in time.",
4189
+ link: "Otherwise (no browser here, no `seal` CLI): `POST /intake` with the recipient's bundle (`recipient_bundle`); the user answers at `<public host>/i/<id>`, which checks the bundle and seals the answer to it. With URL-mode elicitation the client shows the link and this call waits; without it the call returns `output_link`. The answer is opened like `seal_open mode=file` into a private 0700 directory.",
4190
4190
  words: "Three words of this server's address (`fingerprint_words.json`), shown in the chat and on the page; the user closes the page if they differ."
4191
4191
  },
4192
4192
  output_received: {
@@ -4194,7 +4194,7 @@ var seal_mcp_v1_default = {
4194
4194
  required: ["handle", "source", "files"],
4195
4195
  properties: {
4196
4196
  handle: { type: "string" },
4197
- source: { type: "string", enum: ["local", "link"] },
4197
+ source: { type: "string", enum: ["link"] },
4198
4198
  files: {
4199
4199
  type: "array",
4200
4200
  items: {
@@ -6811,7 +6811,7 @@ var seal_address_default = {
6811
6811
  guard: {
6812
6812
  kind: "guard",
6813
6813
  is: "a pair request whose requester is this machine's guard (SPEC agent egress \xA73.1): the same answer as `pair` (the pairing file), and the inbox marks the agent as a guard. A request for a secret whose recipient_bundle is a guard's is shown by the inbox as sealed to that guard; one whose bundle is no known guard's is answered only after the person types its three words (\xA76.1, T2\u0430).",
6814
- bind: "POST /intake may carry `bind`: what the agent proposes the key be bound to \u2014 {hosts: [<host>], place?: <place>, class?: outbound|inprocess} (secrets.json guard_note). The page shows it as the binding when no entry of secrets.json knows the key's form; the person confirms, narrows or removes it. At most 16 hosts of 253 characters; the server keeps it as given and never reads it."
6814
+ bind: "POST /intake may carry `bind`: what the agent proposes the key be bound to \u2014 {hosts: [<host>], place?: <place>, class?: outbound|inprocess} (secrets.json guard_note). `bind` is sent only when the recipient_bundle is a guard's, hosts proposed or not: its presence is what lets the page bind the key and lend it under a lease; without it the page says the value goes to the agent as it is. The page shows the proposal as the binding when no entry of secrets.json knows the key's form; the person confirms, narrows or removes it. At most 16 hosts of 253 characters, each a name of two labels or more (`*.` with two labels under it, three under secrets.json wildcard_public_second_level); the server checks the shape and keeps it as given."
6815
6815
  },
6816
6816
  payloads: {
6817
6817
  name_max: 80,
@@ -11005,6 +11005,8 @@ var secrets_default = {
11005
11005
  },
11006
11006
  patterns_note: "What a key looks like, for every reader: `seal doctor --transcripts`, the scanner of the Pro web page and the `sealfs` detector (C1 \u042039). `pattern` is an expression in the subset all three run alike \u2014 JS, Python `re`, Rust `regex`: no lookaround, no backreference, no inline flag; a boundary is `\\b` inside the expression. The flags are shared: case-insensitive and multiline. A match that contains a string of the entry's `allowlist` (case-insensitive) is no finding. A match of an entry with `checksum` is a finding only when it passes that sum: `luhn` \u2014 the Luhn sum of its digits is 0 modulo 10; `iban` \u2014 its characters but spaces, upper-cased, the first four moved to the end, each letter read as a number (A = 10 \u2026 Z = 35), are 1 modulo 97. A finding is shown masked: its first four characters, `\u2026`, its last two. `vectors.hit` holds a finding of the entry, `vectors.clean` none; every reader passes them. The scanner page does not take a file larger than `max_file_bytes`; `seal doctor` reads agent transcripts of any size, a line at a time \u2014 skipping a long transcript would hide its leak. Data, not code: a service is added with one entry.",
11007
11007
  max_file_bytes: 10485760,
11008
+ wildcard_public_second_level: ["ac", "co", "com", "edu", "gov", "go", "ne", "net", "or", "org", "mil", "int", "gob", "ltd", "plc", "me", "nom"],
11009
+ wildcard_note: "A proposed `*.<name>` binds a key only with two labels under it, three when the first is one of wildcard_public_second_level (`*.co.uk` would be a root for every .co.uk host); a bare name needs two labels (SPEC agent egress \xA74.2, review of phase 1).",
11008
11010
  guard_note: "What the guard does with a key of an entry (SPEC agent egress \xA74.1, read by `seal-client-core::guard`). `hosts`: where the key is a way in, the default binding a person confirms or narrows; `*.` is one label. `place`: where the guard puts the value \u2014 `bearer` (Authorization: Bearer), `header:<name>`, `query:<param>`, `basic_user`, `basic_pass`, `userinfo`, `url` (the secret is the request address itself, a webhook). `class`: `outbound` \u2014 a key a program enters a service with, the proxy puts it in; `inprocess` \u2014 a key a program works with itself (a webhook signing secret, a database password of a driver that uses no proxy, a private key, an assignment the pattern matches with its name): the program gets the value, by the person's word on the page. `surrogate`: the form of the stand-in the agent sees \u2014 `keep_prefix` (kept as it is), `alphabet` (`base62`, `base64url`, `hex`, `digits`, `base32`, `classes` \u2014 each character keeps its class and punctuation stays), `length` (a number, else the value's), `checksum` (`github_crc32`: the last six characters are the CRC32 of the body, base62), `parts` (`password`: of a connection URI only the password changes). An entry without `surrogate` is treated by classes. `provision_commands`: commands that write a key as data into a service's own store; a surrogate in their arguments or stdin is refused unless the binding's `provision` names the host (\xA75.4, \xA76.4). Data, not code: a service is added with one entry.",
11009
11011
  provision_commands: [
11010
11012
  { command: "wrangler secret put", host: "api.cloudflare.com" },
@@ -13430,16 +13432,17 @@ async function sealRequest(ctx, input, deps) {
13430
13432
  const cliArgs = ["request", "--local", "--json", "--kind", kind, "--what", what, "--label", deps.label];
13431
13433
  if (input.whereUrl) cliArgs.push("--where", input.whereUrl);
13432
13434
  if (input.bind) cliArgs.push("--bind", bindSpec(input.bind));
13433
- const local = await runCli(cliArgs);
13434
- if (local && "files" in local) {
13435
- await appendAudit(ctx, "seal_request", handle, "local");
13436
- return { handle, source: "local", files: local.files.map(cliFile), ...local.note ? { note: local.note } : {} };
13435
+ const here = await runCli(cliArgs);
13436
+ if (here && "files" in here) {
13437
+ await appendAudit(ctx, "seal_request", handle, "link");
13438
+ return { handle, source: "link", files: here.files.map(cliFile), ...here.note ? { note: here.note } : {} };
13437
13439
  }
13438
- if (local && local.error.code === "request.cancelled") {
13439
- throw new ToolError("request_cancelled", "the user closed the dialog");
13440
+ const code = here && "error" in here && typeof here.error?.code === "string" ? here.error.code : "request.no_local";
13441
+ if (code === "request.expired") {
13442
+ throw new ToolError("request_expired", here && "error" in here ? here.error.message : "nobody answered in time");
13440
13443
  }
13441
- if (local && local.error.code !== "request.no_local" && local.error.code !== "request.ask_other") {
13442
- throw new ToolError("request_failed", `seal request: ${local.error.message}`);
13444
+ if (code !== "request.no_local" && code !== "request.ask_other" && code !== "request.cancelled") {
13445
+ throw new ToolError("request_failed", `seal request: ${here && "error" in here ? here.error.message : code}`);
13443
13446
  }
13444
13447
  }
13445
13448
  const guard = kind === "file" ? null : await guardStatus(runCli);
@@ -13461,7 +13464,10 @@ async function sealRequest(ctx, input, deps) {
13461
13464
  whereUrl: input.whereUrl,
13462
13465
  kind,
13463
13466
  to: card && owner !== null ? owner.address : void 0,
13464
- bind: input.bind
13467
+ // A binding is the guard's to keep: the page shows one, and lends the key under a lease, only
13468
+ // when the request says a guard is its recipient — `bind` present, hosts proposed or not.
13469
+ // Without a guard the value lands in the file as it is, and the page says so (review of phase 1).
13470
+ bind: guard ? input.bind ?? { hosts: [] } : void 0
13465
13471
  });
13466
13472
  } catch (err2) {
13467
13473
  throw new ToolError("request_failed", `POST /intake failed: ${err2 instanceof Error ? err2.message : String(err2)}`, err2);
@@ -14175,7 +14181,7 @@ function proFileGetOutputToWire(out) {
14175
14181
  }
14176
14182
 
14177
14183
  // src/server.ts
14178
- var SERVER_VERSION = "0.11.0";
14184
+ var SERVER_VERSION = "0.11.2";
14179
14185
  var toolMeta = (name2) => {
14180
14186
  const { title, description, annotations } = seal_mcp_v1_default.tools[name2];
14181
14187
  return { title, description, annotations };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sealnet-mcp",
3
- "version": "0.11.0",
3
+ "version": "0.11.2",
4
4
  "mcpName": "net.seal/mcp",
5
5
  "description": "Model Context Protocol server for SEAL: files go to the user's SEAL inbox once connected, else the link goes on the clipboard or in a 0600 file, never in the chat; explicit opt-in to forward mode with strict TTL/recipient policy.",
6
6
  "type": "module",