enclave-link 0.2.6 → 0.2.8

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.
@@ -11858,7 +11858,7 @@ function openVault({
11858
11858
  const item = toItem(entry.content);
11859
11859
  const previous = before[entry.id];
11860
11860
  const existing = await store.get(previous?.name ?? target.name) ?? {};
11861
- const proton = new Set(previous?.fields ?? (saved ? Object.keys(existing) : []));
11861
+ const proton = new Set(previous ? previous.fields : saved ? Object.keys(existing) : []);
11862
11862
  const added = Object.entries(existing).filter(([field]) => !proton.has(field) && !(field in item));
11863
11863
  imported.set(target.name, { ...Object.fromEntries(added), ...item });
11864
11864
  target.fields = Object.keys(item);
package/dist/enclave.js CHANGED
@@ -2,10 +2,14 @@
2
2
  import {
3
3
  signRequest,
4
4
  vault
5
- } from "./chunk-RVHMWDDN.js";
6
- import "./chunk-7QIF4PCL.js";
5
+ } from "./chunk-KET6VDXZ.js";
6
+ import {
7
+ object,
8
+ string
9
+ } from "./chunk-7QIF4PCL.js";
7
10
 
8
11
  // src/cli.ts
12
+ import { readFileSync } from "node:fs";
9
13
  import { text } from "node:stream/consumers";
10
14
  var usage = `enclave: ask a person for a secret by one-time link, and use it without seeing it
11
15
 
@@ -20,6 +24,7 @@ var usage = `enclave: ask a person for a secret by one-time link, and use it wit
20
24
  enclave list [search] saved names and their fields, or the ones matching a name or site
21
25
  enclave rm <name> delete a saved item
22
26
  enclave mcp serve all of this to an agent over MCP (stdio)
27
+ enclave --version print the version
23
28
 
24
29
  A field named totp holds a 2FA setup key, and get gives its current code. A field named passkey
25
30
  holds a passkey: enclave signs with it and keeps its key.
@@ -30,6 +35,10 @@ var [command, name, ...rest] = process.argv.slice(2);
30
35
  try {
31
36
  if (!command || help.includes(command) || help.includes(name ?? "")) {
32
37
  console.log(usage);
38
+ } else if (command === "--version") {
39
+ console.log(
40
+ object({ version: string() }).parse(JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8"))).version
41
+ );
33
42
  } else if (name?.startsWith("-")) {
34
43
  throw new Error(`there's no ${name} option; enclave --help lists what there is`);
35
44
  } else if (command === "ask" && name) {
@@ -72,7 +81,7 @@ try {
72
81
  } else if (command === "rm" && name) {
73
82
  await vault.remove(name);
74
83
  } else if (command === "mcp") {
75
- const { serve } = await import("./mcp-LCCRAF42.js");
84
+ const { serve } = await import("./mcp-QBUQ5S63.js");
76
85
  await serve(vault);
77
86
  } else {
78
87
  console.error(usage);
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  Store,
3
3
  openVault,
4
4
  vault
5
- } from "./chunk-RVHMWDDN.js";
5
+ } from "./chunk-KET6VDXZ.js";
6
6
  import "./chunk-7QIF4PCL.js";
7
7
  export {
8
8
  Store,
@@ -16914,7 +16914,7 @@ var StdioServerTransport = class {
16914
16914
  // package.json
16915
16915
  var package_default = {
16916
16916
  name: "enclave-link",
16917
- version: "0.2.6",
16917
+ version: "0.2.8",
16918
16918
  description: "Your agent asks for a password by one-time link, not in chat, and uses it without seeing it.",
16919
16919
  license: "MIT",
16920
16920
  bin: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "enclave-link",
3
- "version": "0.2.6",
3
+ "version": "0.2.8",
4
4
  "description": "Your agent asks for a password by one-time link, not in chat, and uses it without seeing it.",
5
5
  "license": "MIT",
6
6
  "bin": {