sealnet-mcp 0.13.0 → 0.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -20,7 +20,7 @@ When an MCP-connected AI agent (Claude Desktop, Cursor, Cline, etc.) creates a S
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
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 eight 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 eight words and connects; the chat then shows the inbox's eight words. After it `seal_share` sends to the inbox by default |
23
- | `seal_open(url\|item, mode='metadata'\|'file'\|'inline', dir?, password?\|password_file?)` | 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. A seal behind a password opens with `password` or `password_file`; one under an NDA is a browser's |
23
+ | `seal_open(url\|item, mode='metadata'\|'file'\|'inline', dir?, password?\|password_file?)` | 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. A seal behind a password opens with `password` or `password_file`; one under an NDA is a browser's. The handoff link of a seal this agent made itself is described, never downloaded (`own_seal`): its opens are the recipient's |
24
24
  | `seal_inbox(wait?)` | Seals other agents or people sent to this server's address: handles, the sender's eight 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 |
25
25
  | `seal_run(command, secrets, cwd?, timeout?)` | Run a program with secrets from links or inbox items in its environment, through the `seal` CLI (`seal run --redact`): every value is replaced with `[sealed:NAME]` in the output that comes back, and none enters this server. With `secrets=[]` the program runs under this machine's guard alone: its proxy and the stand-ins of the keys it holds (`run_no_guard` without a running guard). Needs the `seal` CLI, on PATH or where its installers put it (`run_cli_missing` otherwise). Not a sandbox: a program that prints a value transformed escapes the redaction |
26
26
  | `seal_list()` | List SEALs created by **this MCP server only** (scope: `state.json`; never reveals user's CLI seals): handle, name, secret or not, status, expiry, reads |
package/dist/cli.cjs CHANGED
@@ -2875,8 +2875,9 @@ var clientIdentity;
2875
2875
  function setClientIdentity(name2, version) {
2876
2876
  clientIdentity = `${name2}/${version}`;
2877
2877
  }
2878
+ var requestHeaders = () => void 0;
2878
2879
  function clientHeaders() {
2879
- return clientIdentity === void 0 ? {} : { [header]: clientIdentity };
2880
+ return { ...clientIdentity === void 0 ? {} : { [header]: clientIdentity }, ...requestHeaders() };
2880
2881
  }
2881
2882
  var BackendError = class extends Error {
2882
2883
  constructor(message, code, status, extra = {}) {
@@ -12468,7 +12469,7 @@ var seal_mcp_v1_default = {
12468
12469
  },
12469
12470
  seal_open: {
12470
12471
  title: "Open a SEAL link",
12471
- description: "Open a SEAL link. `metadata` shows name, size and expiry without consuming a read. `file` streams the content to disk and returns the path \u2014 use it for large files, secrets and anything you pass to a program. `inline` returns small JSON/CSV/plain text into the conversation and refuses secrets and HTML/PDF.",
12472
+ description: "Open a SEAL link. `metadata` shows name, size and expiry without consuming a read. `file` streams the content to disk and returns the path \u2014 use it for large files, secrets and anything you pass to a program. `inline` returns small JSON/CSV/plain text into the conversation and refuses secrets and HTML/PDF. The handoff link of a seal you made yourself with seal_share is not downloaded (`own_seal`): its opens are the recipient's.",
12472
12473
  annotations: { readOnlyHint: false, destructiveHint: false },
12473
12474
  annotations_note: "Set on the tool, not per mode: `inline` and `file` consume an open, so the tool as a whole is not read-only.",
12474
12475
  input: {
@@ -12985,6 +12986,7 @@ var seal_mcp_v1_default = {
12985
12986
  error_codes: {
12986
12987
  handoff_clipboard_unavailable: "Clipboard write failed (clipboardy threw). Server falls back to file channel automatically; this code is only surfaced if BOTH channels fail.",
12987
12988
  handoff_both_channels_failed: "Neither clipboard nor file channel worked. Tool returns error; user gets no URL. Better than silent leak.",
12989
+ own_seal: "seal_open in mode file or inline was given the handoff link of a seal this same agent made with seal_share (mode handoff): the download would spend the opens meant for its recipient. Nothing is downloaded; mode=metadata still describes it. The link usually reached the agent by a paste from the clipboard the handoff put it on. A seal addressed to the agent's own address (modes inbox, forward) is not refused.",
12988
12990
  forward_policy_violated: "mode=forward called without --to, or with expire > 30m, or with max_reads > 1.",
12989
12991
  bind_policy_violated: "seal_share `bind` without kind=secret (or `key`), without mode=forward and `to`, with class inprocess, with no host, or with `lease_days` outside 1..`limits.json::LEASE_MAX_DAYS`. Nothing was read, made or uploaded.",
12990
12992
  lease_failed: "seal_share `bind`: `POST /lease` failed; nothing was uploaded. Safe to retry.",
@@ -14685,6 +14687,7 @@ async function openSeal(ctx, input, deps, read) {
14685
14687
  } catch (err2) {
14686
14688
  throw asToolError(err2);
14687
14689
  }
14690
+ if (mode !== "metadata") await refuseOwnSeal(ctx, seal.sealId);
14688
14691
  if (mode === "file") return openToDisk(ctx, seal, handle, input, deps, await sessionOf(ctx, seal, input));
14689
14692
  const first = seal.files[0];
14690
14693
  if (mode === "inline") {
@@ -14747,6 +14750,17 @@ async function openSeal(ctx, input, deps, read) {
14747
14750
  expiresAt: seal.expiresAt
14748
14751
  };
14749
14752
  }
14753
+ async function refuseOwnSeal(ctx, sealId) {
14754
+ await ctx.update(() => false);
14755
+ const made = Object.entries(ctx.state.handles).find(
14756
+ ([, entry]) => entry.seal_id === sealId && entry.mode === "handoff" && !entry.revoked_at
14757
+ );
14758
+ if (!made) return;
14759
+ throw new ToolError(
14760
+ "own_seal",
14761
+ `this link is of a seal this agent made itself (handle ${made[0]}) to hand to someone else: a download here would spend its recipient's opens. Nothing was downloaded and the link still works. If the user pasted it here by mistake, tell them so: the link is the one on their clipboard; \`seal_link\` puts it there again.`
14762
+ );
14763
+ }
14750
14764
  async function openToDisk(ctx, seal, handle, input, deps, session) {
14751
14765
  const covered = seal.files.filter((f) => f.key !== null && f.sha256Hex !== null);
14752
14766
  if (covered.length === 0) {
@@ -15290,7 +15304,7 @@ function proFileGetOutputToWire(out) {
15290
15304
  }
15291
15305
 
15292
15306
  // src/server.ts
15293
- var SERVER_VERSION = "0.13.0";
15307
+ var SERVER_VERSION = "0.13.1";
15294
15308
  var toolMeta = (name2) => {
15295
15309
  const { title, description, annotations } = seal_mcp_v1_default.tools[name2];
15296
15310
  return { title, description, annotations };
package/dist/cli.js CHANGED
@@ -2841,8 +2841,9 @@ var clientIdentity;
2841
2841
  function setClientIdentity(name2, version) {
2842
2842
  clientIdentity = `${name2}/${version}`;
2843
2843
  }
2844
+ var requestHeaders = () => void 0;
2844
2845
  function clientHeaders() {
2845
- return clientIdentity === void 0 ? {} : { [header]: clientIdentity };
2846
+ return { ...clientIdentity === void 0 ? {} : { [header]: clientIdentity }, ...requestHeaders() };
2846
2847
  }
2847
2848
  var BackendError = class extends Error {
2848
2849
  constructor(message, code, status, extra = {}) {
@@ -12434,7 +12435,7 @@ var seal_mcp_v1_default = {
12434
12435
  },
12435
12436
  seal_open: {
12436
12437
  title: "Open a SEAL link",
12437
- description: "Open a SEAL link. `metadata` shows name, size and expiry without consuming a read. `file` streams the content to disk and returns the path \u2014 use it for large files, secrets and anything you pass to a program. `inline` returns small JSON/CSV/plain text into the conversation and refuses secrets and HTML/PDF.",
12438
+ description: "Open a SEAL link. `metadata` shows name, size and expiry without consuming a read. `file` streams the content to disk and returns the path \u2014 use it for large files, secrets and anything you pass to a program. `inline` returns small JSON/CSV/plain text into the conversation and refuses secrets and HTML/PDF. The handoff link of a seal you made yourself with seal_share is not downloaded (`own_seal`): its opens are the recipient's.",
12438
12439
  annotations: { readOnlyHint: false, destructiveHint: false },
12439
12440
  annotations_note: "Set on the tool, not per mode: `inline` and `file` consume an open, so the tool as a whole is not read-only.",
12440
12441
  input: {
@@ -12951,6 +12952,7 @@ var seal_mcp_v1_default = {
12951
12952
  error_codes: {
12952
12953
  handoff_clipboard_unavailable: "Clipboard write failed (clipboardy threw). Server falls back to file channel automatically; this code is only surfaced if BOTH channels fail.",
12953
12954
  handoff_both_channels_failed: "Neither clipboard nor file channel worked. Tool returns error; user gets no URL. Better than silent leak.",
12955
+ own_seal: "seal_open in mode file or inline was given the handoff link of a seal this same agent made with seal_share (mode handoff): the download would spend the opens meant for its recipient. Nothing is downloaded; mode=metadata still describes it. The link usually reached the agent by a paste from the clipboard the handoff put it on. A seal addressed to the agent's own address (modes inbox, forward) is not refused.",
12954
12956
  forward_policy_violated: "mode=forward called without --to, or with expire > 30m, or with max_reads > 1.",
12955
12957
  bind_policy_violated: "seal_share `bind` without kind=secret (or `key`), without mode=forward and `to`, with class inprocess, with no host, or with `lease_days` outside 1..`limits.json::LEASE_MAX_DAYS`. Nothing was read, made or uploaded.",
12956
12958
  lease_failed: "seal_share `bind`: `POST /lease` failed; nothing was uploaded. Safe to retry.",
@@ -14651,6 +14653,7 @@ async function openSeal(ctx, input, deps, read) {
14651
14653
  } catch (err2) {
14652
14654
  throw asToolError(err2);
14653
14655
  }
14656
+ if (mode !== "metadata") await refuseOwnSeal(ctx, seal.sealId);
14654
14657
  if (mode === "file") return openToDisk(ctx, seal, handle, input, deps, await sessionOf(ctx, seal, input));
14655
14658
  const first = seal.files[0];
14656
14659
  if (mode === "inline") {
@@ -14713,6 +14716,17 @@ async function openSeal(ctx, input, deps, read) {
14713
14716
  expiresAt: seal.expiresAt
14714
14717
  };
14715
14718
  }
14719
+ async function refuseOwnSeal(ctx, sealId) {
14720
+ await ctx.update(() => false);
14721
+ const made = Object.entries(ctx.state.handles).find(
14722
+ ([, entry]) => entry.seal_id === sealId && entry.mode === "handoff" && !entry.revoked_at
14723
+ );
14724
+ if (!made) return;
14725
+ throw new ToolError(
14726
+ "own_seal",
14727
+ `this link is of a seal this agent made itself (handle ${made[0]}) to hand to someone else: a download here would spend its recipient's opens. Nothing was downloaded and the link still works. If the user pasted it here by mistake, tell them so: the link is the one on their clipboard; \`seal_link\` puts it there again.`
14728
+ );
14729
+ }
14716
14730
  async function openToDisk(ctx, seal, handle, input, deps, session) {
14717
14731
  const covered = seal.files.filter((f) => f.key !== null && f.sha256Hex !== null);
14718
14732
  if (covered.length === 0) {
@@ -15256,7 +15270,7 @@ function proFileGetOutputToWire(out) {
15256
15270
  }
15257
15271
 
15258
15272
  // src/server.ts
15259
- var SERVER_VERSION = "0.13.0";
15273
+ var SERVER_VERSION = "0.13.1";
15260
15274
  var toolMeta = (name2) => {
15261
15275
  const { title, description, annotations } = seal_mcp_v1_default.tools[name2];
15262
15276
  return { title, description, annotations };
package/dist/index.cjs CHANGED
@@ -4440,7 +4440,7 @@ var seal_mcp_v1_default = {
4440
4440
  },
4441
4441
  seal_open: {
4442
4442
  title: "Open a SEAL link",
4443
- description: "Open a SEAL link. `metadata` shows name, size and expiry without consuming a read. `file` streams the content to disk and returns the path \u2014 use it for large files, secrets and anything you pass to a program. `inline` returns small JSON/CSV/plain text into the conversation and refuses secrets and HTML/PDF.",
4443
+ description: "Open a SEAL link. `metadata` shows name, size and expiry without consuming a read. `file` streams the content to disk and returns the path \u2014 use it for large files, secrets and anything you pass to a program. `inline` returns small JSON/CSV/plain text into the conversation and refuses secrets and HTML/PDF. The handoff link of a seal you made yourself with seal_share is not downloaded (`own_seal`): its opens are the recipient's.",
4444
4444
  annotations: { readOnlyHint: false, destructiveHint: false },
4445
4445
  annotations_note: "Set on the tool, not per mode: `inline` and `file` consume an open, so the tool as a whole is not read-only.",
4446
4446
  input: {
@@ -4957,6 +4957,7 @@ var seal_mcp_v1_default = {
4957
4957
  error_codes: {
4958
4958
  handoff_clipboard_unavailable: "Clipboard write failed (clipboardy threw). Server falls back to file channel automatically; this code is only surfaced if BOTH channels fail.",
4959
4959
  handoff_both_channels_failed: "Neither clipboard nor file channel worked. Tool returns error; user gets no URL. Better than silent leak.",
4960
+ own_seal: "seal_open in mode file or inline was given the handoff link of a seal this same agent made with seal_share (mode handoff): the download would spend the opens meant for its recipient. Nothing is downloaded; mode=metadata still describes it. The link usually reached the agent by a paste from the clipboard the handoff put it on. A seal addressed to the agent's own address (modes inbox, forward) is not refused.",
4960
4961
  forward_policy_violated: "mode=forward called without --to, or with expire > 30m, or with max_reads > 1.",
4961
4962
  bind_policy_violated: "seal_share `bind` without kind=secret (or `key`), without mode=forward and `to`, with class inprocess, with no host, or with `lease_days` outside 1..`limits.json::LEASE_MAX_DAYS`. Nothing was read, made or uploaded.",
4962
4963
  lease_failed: "seal_share `bind`: `POST /lease` failed; nothing was uploaded. Safe to retry.",
@@ -7887,8 +7888,9 @@ var clientIdentity;
7887
7888
  function setClientIdentity(name2, version) {
7888
7889
  clientIdentity = `${name2}/${version}`;
7889
7890
  }
7891
+ var requestHeaders = () => void 0;
7890
7892
  function clientHeaders() {
7891
- return clientIdentity === void 0 ? {} : { [header]: clientIdentity };
7893
+ return { ...clientIdentity === void 0 ? {} : { [header]: clientIdentity }, ...requestHeaders() };
7892
7894
  }
7893
7895
  var BackendError = class extends Error {
7894
7896
  constructor(message, code, status, extra = {}) {
@@ -14449,6 +14451,7 @@ async function openSeal(ctx, input, deps, read) {
14449
14451
  } catch (err2) {
14450
14452
  throw asToolError(err2);
14451
14453
  }
14454
+ if (mode !== "metadata") await refuseOwnSeal(ctx, seal.sealId);
14452
14455
  if (mode === "file") return openToDisk(ctx, seal, handle, input, deps, await sessionOf(ctx, seal, input));
14453
14456
  const first = seal.files[0];
14454
14457
  if (mode === "inline") {
@@ -14511,6 +14514,17 @@ async function openSeal(ctx, input, deps, read) {
14511
14514
  expiresAt: seal.expiresAt
14512
14515
  };
14513
14516
  }
14517
+ async function refuseOwnSeal(ctx, sealId) {
14518
+ await ctx.update(() => false);
14519
+ const made = Object.entries(ctx.state.handles).find(
14520
+ ([, entry]) => entry.seal_id === sealId && entry.mode === "handoff" && !entry.revoked_at
14521
+ );
14522
+ if (!made) return;
14523
+ throw new ToolError(
14524
+ "own_seal",
14525
+ `this link is of a seal this agent made itself (handle ${made[0]}) to hand to someone else: a download here would spend its recipient's opens. Nothing was downloaded and the link still works. If the user pasted it here by mistake, tell them so: the link is the one on their clipboard; \`seal_link\` puts it there again.`
14526
+ );
14527
+ }
14514
14528
  async function openToDisk(ctx, seal, handle, input, deps, session) {
14515
14529
  const covered = seal.files.filter((f) => f.key !== null && f.sha256Hex !== null);
14516
14530
  if (covered.length === 0) {
@@ -15054,7 +15068,7 @@ function proFileGetOutputToWire(out) {
15054
15068
  }
15055
15069
 
15056
15070
  // src/server.ts
15057
- var SERVER_VERSION = "0.13.0";
15071
+ var SERVER_VERSION = "0.13.1";
15058
15072
  var toolMeta = (name2) => {
15059
15073
  const { title, description, annotations } = seal_mcp_v1_default.tools[name2];
15060
15074
  return { title, description, annotations };
package/dist/index.d.cts CHANGED
@@ -420,6 +420,9 @@ interface SealMetaWire {
420
420
  files: SealFileWire[];
421
421
  /** The organization of an organization's seal, whose brand its share link shows; null for an anonymous seal. */
422
422
  org_id?: string | null;
423
+ /** Every open the seal allows is taken (single use, `max_opens`): nothing of it opens any more. Absent from an
424
+ * API before 17.11. */
425
+ spent?: boolean;
423
426
  }
424
427
  /** One file row of `GET /seal/{id}/owner` (includes revoked files). */
425
428
  interface OwnerFileWire extends SealFileWire {
@@ -1714,6 +1717,11 @@ declare function sealShare(ctx: ToolContext, input: SealShareInput, deps?: SealS
1714
1717
  * size. The model gets paths, sizes and plaintext digests, never content.
1715
1718
  * Each download counts against the seal like a browser's.
1716
1719
  *
1720
+ * A seal this agent handed off itself (mode handoff: the link for someone
1721
+ * else) is not downloaded here (`own_seal`): its opens are its recipient's.
1722
+ * Its metadata is read as any seal's; a seal addressed to this agent's own
1723
+ * address is its to open.
1724
+ *
1717
1725
  * Instead of a URL, `item` names an inbox item: a link addressed to this
1718
1726
  * server, its wrap the row's (`openInboxItem`), opened by the same reader —
1719
1727
  * with the seed its address is of (`inboxSeed`).
package/dist/index.d.ts CHANGED
@@ -420,6 +420,9 @@ interface SealMetaWire {
420
420
  files: SealFileWire[];
421
421
  /** The organization of an organization's seal, whose brand its share link shows; null for an anonymous seal. */
422
422
  org_id?: string | null;
423
+ /** Every open the seal allows is taken (single use, `max_opens`): nothing of it opens any more. Absent from an
424
+ * API before 17.11. */
425
+ spent?: boolean;
423
426
  }
424
427
  /** One file row of `GET /seal/{id}/owner` (includes revoked files). */
425
428
  interface OwnerFileWire extends SealFileWire {
@@ -1714,6 +1717,11 @@ declare function sealShare(ctx: ToolContext, input: SealShareInput, deps?: SealS
1714
1717
  * size. The model gets paths, sizes and plaintext digests, never content.
1715
1718
  * Each download counts against the seal like a browser's.
1716
1719
  *
1720
+ * A seal this agent handed off itself (mode handoff: the link for someone
1721
+ * else) is not downloaded here (`own_seal`): its opens are its recipient's.
1722
+ * Its metadata is read as any seal's; a seal addressed to this agent's own
1723
+ * address is its to open.
1724
+ *
1717
1725
  * Instead of a URL, `item` names an inbox item: a link addressed to this
1718
1726
  * server, its wrap the row's (`openInboxItem`), opened by the same reader —
1719
1727
  * with the seed its address is of (`inboxSeed`).
package/dist/index.js CHANGED
@@ -4356,7 +4356,7 @@ var seal_mcp_v1_default = {
4356
4356
  },
4357
4357
  seal_open: {
4358
4358
  title: "Open a SEAL link",
4359
- description: "Open a SEAL link. `metadata` shows name, size and expiry without consuming a read. `file` streams the content to disk and returns the path \u2014 use it for large files, secrets and anything you pass to a program. `inline` returns small JSON/CSV/plain text into the conversation and refuses secrets and HTML/PDF.",
4359
+ description: "Open a SEAL link. `metadata` shows name, size and expiry without consuming a read. `file` streams the content to disk and returns the path \u2014 use it for large files, secrets and anything you pass to a program. `inline` returns small JSON/CSV/plain text into the conversation and refuses secrets and HTML/PDF. The handoff link of a seal you made yourself with seal_share is not downloaded (`own_seal`): its opens are the recipient's.",
4360
4360
  annotations: { readOnlyHint: false, destructiveHint: false },
4361
4361
  annotations_note: "Set on the tool, not per mode: `inline` and `file` consume an open, so the tool as a whole is not read-only.",
4362
4362
  input: {
@@ -4873,6 +4873,7 @@ var seal_mcp_v1_default = {
4873
4873
  error_codes: {
4874
4874
  handoff_clipboard_unavailable: "Clipboard write failed (clipboardy threw). Server falls back to file channel automatically; this code is only surfaced if BOTH channels fail.",
4875
4875
  handoff_both_channels_failed: "Neither clipboard nor file channel worked. Tool returns error; user gets no URL. Better than silent leak.",
4876
+ own_seal: "seal_open in mode file or inline was given the handoff link of a seal this same agent made with seal_share (mode handoff): the download would spend the opens meant for its recipient. Nothing is downloaded; mode=metadata still describes it. The link usually reached the agent by a paste from the clipboard the handoff put it on. A seal addressed to the agent's own address (modes inbox, forward) is not refused.",
4876
4877
  forward_policy_violated: "mode=forward called without --to, or with expire > 30m, or with max_reads > 1.",
4877
4878
  bind_policy_violated: "seal_share `bind` without kind=secret (or `key`), without mode=forward and `to`, with class inprocess, with no host, or with `lease_days` outside 1..`limits.json::LEASE_MAX_DAYS`. Nothing was read, made or uploaded.",
4878
4879
  lease_failed: "seal_share `bind`: `POST /lease` failed; nothing was uploaded. Safe to retry.",
@@ -7803,8 +7804,9 @@ var clientIdentity;
7803
7804
  function setClientIdentity(name2, version) {
7804
7805
  clientIdentity = `${name2}/${version}`;
7805
7806
  }
7807
+ var requestHeaders = () => void 0;
7806
7808
  function clientHeaders() {
7807
- return clientIdentity === void 0 ? {} : { [header]: clientIdentity };
7809
+ return { ...clientIdentity === void 0 ? {} : { [header]: clientIdentity }, ...requestHeaders() };
7808
7810
  }
7809
7811
  var BackendError = class extends Error {
7810
7812
  constructor(message, code, status, extra = {}) {
@@ -14365,6 +14367,7 @@ async function openSeal(ctx, input, deps, read) {
14365
14367
  } catch (err2) {
14366
14368
  throw asToolError(err2);
14367
14369
  }
14370
+ if (mode !== "metadata") await refuseOwnSeal(ctx, seal.sealId);
14368
14371
  if (mode === "file") return openToDisk(ctx, seal, handle, input, deps, await sessionOf(ctx, seal, input));
14369
14372
  const first = seal.files[0];
14370
14373
  if (mode === "inline") {
@@ -14427,6 +14430,17 @@ async function openSeal(ctx, input, deps, read) {
14427
14430
  expiresAt: seal.expiresAt
14428
14431
  };
14429
14432
  }
14433
+ async function refuseOwnSeal(ctx, sealId) {
14434
+ await ctx.update(() => false);
14435
+ const made = Object.entries(ctx.state.handles).find(
14436
+ ([, entry]) => entry.seal_id === sealId && entry.mode === "handoff" && !entry.revoked_at
14437
+ );
14438
+ if (!made) return;
14439
+ throw new ToolError(
14440
+ "own_seal",
14441
+ `this link is of a seal this agent made itself (handle ${made[0]}) to hand to someone else: a download here would spend its recipient's opens. Nothing was downloaded and the link still works. If the user pasted it here by mistake, tell them so: the link is the one on their clipboard; \`seal_link\` puts it there again.`
14442
+ );
14443
+ }
14430
14444
  async function openToDisk(ctx, seal, handle, input, deps, session) {
14431
14445
  const covered = seal.files.filter((f) => f.key !== null && f.sha256Hex !== null);
14432
14446
  if (covered.length === 0) {
@@ -14970,7 +14984,7 @@ function proFileGetOutputToWire(out) {
14970
14984
  }
14971
14985
 
14972
14986
  // src/server.ts
14973
- var SERVER_VERSION = "0.13.0";
14987
+ var SERVER_VERSION = "0.13.1";
14974
14988
  var toolMeta = (name2) => {
14975
14989
  const { title, description, annotations } = seal_mcp_v1_default.tools[name2];
14976
14990
  return { title, description, annotations };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sealnet-mcp",
3
- "version": "0.13.0",
3
+ "version": "0.13.1",
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",