nostr-bray 1.35.0 → 1.37.0
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 +7 -0
- package/dist/cli/index.js +22 -0
- package/dist/vault/tools.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,6 +16,13 @@ Install globally or run via npx:
|
|
|
16
16
|
npm install -g nostr-bray
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
+
New to Nostr? Mint a key first -- this works before anything is configured
|
|
20
|
+
and prints your npub plus a 24-word mnemonic (write it down; it is the key):
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npx nostr-bray create
|
|
24
|
+
```
|
|
25
|
+
|
|
19
26
|
Add to your MCP client config:
|
|
20
27
|
|
|
21
28
|
```json
|
package/dist/cli/index.js
CHANGED
|
@@ -234,6 +234,28 @@ if (command === 'help' || command === '--help' || command === '-h') {
|
|
|
234
234
|
console.log(HELP);
|
|
235
235
|
process.exit(0);
|
|
236
236
|
}
|
|
237
|
+
// `create` is pure key generation and must work before any key exists;
|
|
238
|
+
// every command below this point sits behind the config gate.
|
|
239
|
+
if (command === 'create') {
|
|
240
|
+
const { handleIdentityCreate } = await import('../exports.js');
|
|
241
|
+
const fresh = handleIdentityCreate();
|
|
242
|
+
const wantJson = args.includes('--json')
|
|
243
|
+
|| (process.env.NOSTR_BRAY_OUTPUT === 'json' && !args.includes('--human'));
|
|
244
|
+
if (wantJson) {
|
|
245
|
+
console.log(JSON.stringify(fresh, null, 2));
|
|
246
|
+
}
|
|
247
|
+
else {
|
|
248
|
+
console.log(`npub: ${fresh.npub}`);
|
|
249
|
+
console.log(`mnemonic: ${fresh.mnemonic}`);
|
|
250
|
+
console.error('');
|
|
251
|
+
console.error('The 24 words are the key. Write them down and keep them offline;');
|
|
252
|
+
console.error('they will not be shown again. To sign with this identity:');
|
|
253
|
+
console.error(' mkdir -p ~/.nostr && chmod 700 ~/.nostr');
|
|
254
|
+
console.error(' save the words to ~/.nostr/secret.key, then chmod 600 it');
|
|
255
|
+
console.error(' export NOSTR_SECRET_KEY_FILE=~/.nostr/secret.key');
|
|
256
|
+
}
|
|
257
|
+
process.exit(0);
|
|
258
|
+
}
|
|
237
259
|
// All other commands need config + ctx + pool
|
|
238
260
|
const config = await loadConfig();
|
|
239
261
|
const { configureHttpClient } = await import('../http-client.js');
|
package/dist/vault/tools.js
CHANGED
|
@@ -24,7 +24,7 @@ export function registerVaultTools(server, deps) {
|
|
|
24
24
|
},
|
|
25
25
|
annotations: { title: 'Vault Encrypt', readOnlyHint: true },
|
|
26
26
|
}, async (args) => {
|
|
27
|
-
const result = handleVaultEncrypt(deps.ctx, args);
|
|
27
|
+
const result = await handleVaultEncrypt(deps.ctx, args);
|
|
28
28
|
return jsonResponse(result);
|
|
29
29
|
});
|
|
30
30
|
server.registerTool('vault-share', {
|
|
@@ -49,7 +49,7 @@ export function registerVaultTools(server, deps) {
|
|
|
49
49
|
},
|
|
50
50
|
annotations: { title: 'Vault Read', readOnlyHint: true },
|
|
51
51
|
}, async (args) => {
|
|
52
|
-
const result = handleVaultRead(deps.ctx, args);
|
|
52
|
+
const result = await handleVaultRead(deps.ctx, args);
|
|
53
53
|
return jsonResponse(result);
|
|
54
54
|
});
|
|
55
55
|
server.registerTool('vault-read-shared', {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nostr-bray",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.37.0",
|
|
4
4
|
"mcpName": "dev.forgesworn/bray",
|
|
5
5
|
"description": "Trust-aware Nostr for AI and humans. Three dimensions of trust -- verification, proximity, and access -- woven into every interaction.",
|
|
6
6
|
"type": "module",
|