nervepay 1.0.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/dist/index.js ADDED
@@ -0,0 +1,449 @@
1
+ /**
2
+ * NervePay Plugin for OpenClaw
3
+ * Self-sovereign identity, vault, and multi-agent orchestration
4
+ */
5
+ import { NervePayClient } from './utils/client.js';
6
+ import * as identity from './tools/identity.js';
7
+ import * as gateway from './tools/gateway.js';
8
+ import * as vault from './tools/vault.js';
9
+ import * as orchestration from './tools/orchestration.js';
10
+ import { runSetup } from './setup.js';
11
+ export default function register(api) {
12
+ // Get plugin config from OpenClaw
13
+ const config = api.config || {};
14
+ const client = new NervePayClient({
15
+ apiUrl: config.apiUrl || 'https://api.nervepay.xyz',
16
+ agentDid: config.agentDid,
17
+ privateKey: config.privateKey,
18
+ });
19
+ // =========================================================================
20
+ // IDENTITY TOOLS
21
+ // =========================================================================
22
+ api.registerTool({
23
+ name: 'nervepay_register_identity',
24
+ description: 'Register a new agent identity with W3C DID and Ed25519 keys. Returns credentials that must be saved immediately.',
25
+ parameters: {
26
+ type: 'object',
27
+ required: ['name'],
28
+ properties: {
29
+ name: {
30
+ type: 'string',
31
+ description: 'Agent display name',
32
+ },
33
+ description: {
34
+ type: 'string',
35
+ description: 'Agent description/purpose',
36
+ },
37
+ },
38
+ },
39
+ handler: async (params) => {
40
+ const result = await identity.registerPendingIdentity(client, params);
41
+ // Update client config with new credentials
42
+ client.updateConfig({
43
+ agentDid: result.did,
44
+ privateKey: result.private_key,
45
+ });
46
+ return {
47
+ success: true,
48
+ ...result,
49
+ warning: '⚠️ SAVE THESE CREDENTIALS NOW - shown once only!',
50
+ };
51
+ },
52
+ });
53
+ api.registerTool({
54
+ name: 'nervepay_whoami',
55
+ description: 'Test authentication and get current agent info',
56
+ parameters: { type: 'object', properties: {} },
57
+ handler: async () => {
58
+ return await identity.whoami(client);
59
+ },
60
+ });
61
+ api.registerTool({
62
+ name: 'nervepay_verify_agent',
63
+ description: 'Verify another agent\'s identity by DID (public endpoint)',
64
+ parameters: {
65
+ type: 'object',
66
+ required: ['did'],
67
+ properties: {
68
+ did: {
69
+ type: 'string',
70
+ description: 'Agent DID to verify (did:nervepay:agent:xxx)',
71
+ },
72
+ },
73
+ },
74
+ handler: async (params) => {
75
+ return await identity.verifyAgent(client, params.did);
76
+ },
77
+ });
78
+ api.registerTool({
79
+ name: 'nervepay_resolve_did',
80
+ description: 'Resolve W3C DID document',
81
+ parameters: {
82
+ type: 'object',
83
+ required: ['did'],
84
+ properties: {
85
+ did: {
86
+ type: 'string',
87
+ description: 'DID to resolve',
88
+ },
89
+ },
90
+ },
91
+ handler: async (params) => {
92
+ return await identity.resolveDid(client, params.did);
93
+ },
94
+ });
95
+ // =========================================================================
96
+ // GATEWAY TOOLS
97
+ // =========================================================================
98
+ api.registerTool({
99
+ name: 'nervepay_pair_gateway',
100
+ description: 'Connect OpenClaw gateway to NervePay. Sends pairing request that requires human approval in Mission Control dashboard.',
101
+ parameters: {
102
+ type: 'object',
103
+ required: ['gateway_name', 'gateway_url'],
104
+ properties: {
105
+ gateway_name: {
106
+ type: 'string',
107
+ description: 'Gateway display name',
108
+ },
109
+ gateway_url: {
110
+ type: 'string',
111
+ description: 'Gateway URL (must be reachable by NervePay)',
112
+ },
113
+ max_concurrent_agents: {
114
+ type: 'number',
115
+ description: 'Max concurrent sub-agents',
116
+ default: 8,
117
+ },
118
+ default_timeout_seconds: {
119
+ type: 'number',
120
+ description: 'Default task timeout',
121
+ default: 3600,
122
+ },
123
+ },
124
+ },
125
+ handler: async (params) => {
126
+ // Send pairing request
127
+ const request = await gateway.createPairingRequest(client, params);
128
+ return {
129
+ request_id: request.request_id,
130
+ status: 'pending',
131
+ message: 'Pairing request sent. Approve in Mission Control > Pending Requests.',
132
+ next_step: `Check status with nervepay_check_pairing_status(request_id="${request.request_id}")`,
133
+ };
134
+ },
135
+ });
136
+ api.registerTool({
137
+ name: 'nervepay_check_pairing_status',
138
+ description: 'Check if pairing request has been approved',
139
+ parameters: {
140
+ type: 'object',
141
+ required: ['request_id'],
142
+ properties: {
143
+ request_id: {
144
+ type: 'string',
145
+ description: 'Pairing request ID',
146
+ },
147
+ },
148
+ },
149
+ handler: async (params) => {
150
+ return await gateway.getPairingRequestStatus(client, params.request_id);
151
+ },
152
+ });
153
+ api.registerTool({
154
+ name: 'nervepay_complete_pairing',
155
+ description: 'Complete gateway pairing after approval (sends gateway token)',
156
+ parameters: {
157
+ type: 'object',
158
+ required: ['pairing_code', 'gateway_url', 'gateway_token', 'gateway_name'],
159
+ properties: {
160
+ pairing_code: {
161
+ type: 'string',
162
+ description: 'Pairing code from approved request',
163
+ },
164
+ gateway_url: {
165
+ type: 'string',
166
+ description: 'Gateway URL',
167
+ },
168
+ gateway_token: {
169
+ type: 'string',
170
+ description: 'Gateway authentication token',
171
+ },
172
+ gateway_name: {
173
+ type: 'string',
174
+ description: 'Gateway name',
175
+ },
176
+ },
177
+ },
178
+ handler: async (params) => {
179
+ return await gateway.completePairing(client, params);
180
+ },
181
+ });
182
+ api.registerTool({
183
+ name: 'nervepay_list_gateways',
184
+ description: 'List all connected gateways',
185
+ parameters: { type: 'object', properties: {} },
186
+ handler: async () => {
187
+ return await gateway.listGateways(client);
188
+ },
189
+ });
190
+ api.registerTool({
191
+ name: 'nervepay_gateway_health',
192
+ description: 'Check gateway health',
193
+ parameters: {
194
+ type: 'object',
195
+ required: ['gateway_id'],
196
+ properties: {
197
+ gateway_id: {
198
+ type: 'string',
199
+ description: 'Gateway ID',
200
+ },
201
+ },
202
+ },
203
+ handler: async (params) => {
204
+ return await gateway.healthCheckGateway(client, params.gateway_id);
205
+ },
206
+ });
207
+ // =========================================================================
208
+ // VAULT TOOLS
209
+ // =========================================================================
210
+ api.registerTool({
211
+ name: 'nervepay_list_secrets',
212
+ description: 'List all secrets (metadata only, no values)',
213
+ parameters: { type: 'object', properties: {} },
214
+ handler: async () => {
215
+ return await vault.listSecrets(client);
216
+ },
217
+ });
218
+ api.registerTool({
219
+ name: 'nervepay_get_secret',
220
+ description: 'Get decrypted secret value by name',
221
+ parameters: {
222
+ type: 'object',
223
+ required: ['secret_name'],
224
+ properties: {
225
+ secret_name: {
226
+ type: 'string',
227
+ description: 'Secret name',
228
+ },
229
+ },
230
+ },
231
+ handler: async (params) => {
232
+ return await vault.getSecret(client, params.secret_name);
233
+ },
234
+ });
235
+ api.registerTool({
236
+ name: 'nervepay_get_secrets',
237
+ description: 'Get multiple secrets at once',
238
+ parameters: {
239
+ type: 'object',
240
+ required: ['secret_names'],
241
+ properties: {
242
+ secret_names: {
243
+ type: 'array',
244
+ items: { type: 'string' },
245
+ description: 'Array of secret names',
246
+ },
247
+ },
248
+ },
249
+ handler: async (params) => {
250
+ return await vault.getSecrets(client, params.secret_names);
251
+ },
252
+ });
253
+ // =========================================================================
254
+ // ORCHESTRATION TOOLS (if enabled)
255
+ // =========================================================================
256
+ if (config.enableOrchestration) {
257
+ api.registerTool({
258
+ name: 'nervepay_create_orchestration',
259
+ description: 'Create multi-agent orchestration from PRD (Product Requirements Document)',
260
+ parameters: {
261
+ type: 'object',
262
+ required: ['gateway_id', 'name', 'prd'],
263
+ properties: {
264
+ gateway_id: {
265
+ type: 'string',
266
+ description: 'Gateway ID to spawn agents on',
267
+ },
268
+ name: {
269
+ type: 'string',
270
+ description: 'Orchestration name',
271
+ },
272
+ prd: {
273
+ type: 'string',
274
+ description: 'Product Requirements Document (JSON or text)',
275
+ },
276
+ context: {
277
+ type: 'object',
278
+ description: 'Additional context data',
279
+ },
280
+ },
281
+ },
282
+ handler: async (params) => {
283
+ return await orchestration.createOrchestration(client, params);
284
+ },
285
+ });
286
+ api.registerTool({
287
+ name: 'nervepay_start_orchestration',
288
+ description: 'Start orchestration (decomposes PRD and spawns sub-agent tasks)',
289
+ parameters: {
290
+ type: 'object',
291
+ required: ['orchestration_id'],
292
+ properties: {
293
+ orchestration_id: {
294
+ type: 'string',
295
+ description: 'Orchestration ID',
296
+ },
297
+ },
298
+ },
299
+ handler: async (params) => {
300
+ return await orchestration.startOrchestration(client, params.orchestration_id);
301
+ },
302
+ });
303
+ api.registerTool({
304
+ name: 'nervepay_get_orchestration',
305
+ description: 'Get orchestration status and progress',
306
+ parameters: {
307
+ type: 'object',
308
+ required: ['orchestration_id'],
309
+ properties: {
310
+ orchestration_id: {
311
+ type: 'string',
312
+ description: 'Orchestration ID',
313
+ },
314
+ },
315
+ },
316
+ handler: async (params) => {
317
+ return await orchestration.getOrchestration(client, params.orchestration_id);
318
+ },
319
+ });
320
+ api.registerTool({
321
+ name: 'nervepay_list_tasks',
322
+ description: 'List tasks for an orchestration',
323
+ parameters: {
324
+ type: 'object',
325
+ required: ['orchestration_id'],
326
+ properties: {
327
+ orchestration_id: {
328
+ type: 'string',
329
+ description: 'Orchestration ID',
330
+ },
331
+ status: {
332
+ type: 'string',
333
+ enum: ['pending', 'running', 'completed', 'failed', 'blocked'],
334
+ description: 'Filter by status',
335
+ },
336
+ },
337
+ },
338
+ handler: async (params) => {
339
+ return await orchestration.listTasks(client, params.orchestration_id, {
340
+ status: params.status,
341
+ });
342
+ },
343
+ });
344
+ }
345
+ // =========================================================================
346
+ // GATEWAY RPC METHODS
347
+ // =========================================================================
348
+ api.registerGatewayMethod('nervepay.health', ({ respond }) => {
349
+ respond(true, { status: 'ok', plugin: 'nervepay', version: '1.0.0' });
350
+ });
351
+ api.registerGatewayMethod('nervepay.whoami', async ({ respond }) => {
352
+ try {
353
+ const result = await identity.whoami(client);
354
+ respond(true, result);
355
+ }
356
+ catch (error) {
357
+ respond(false, { error: error.message });
358
+ }
359
+ });
360
+ // =========================================================================
361
+ // CLI COMMANDS
362
+ // =========================================================================
363
+ api.registerCli(({ program }) => {
364
+ const nervepay = program.command('nervepay').description('NervePay identity and orchestration');
365
+ nervepay
366
+ .command('setup')
367
+ .description('Interactive setup wizard - register identity, pair gateway, configure everything')
368
+ .action(async () => {
369
+ try {
370
+ await runSetup(config.apiUrl || 'https://api.nervepay.xyz');
371
+ }
372
+ catch (error) {
373
+ console.error('Setup failed:', error.message);
374
+ process.exit(1);
375
+ }
376
+ });
377
+ nervepay
378
+ .command('whoami')
379
+ .description('Show agent identity')
380
+ .action(async () => {
381
+ try {
382
+ const result = await identity.whoami(client);
383
+ console.log(JSON.stringify(result, null, 2));
384
+ }
385
+ catch (error) {
386
+ console.error('Error:', error.message);
387
+ process.exit(1);
388
+ }
389
+ });
390
+ nervepay
391
+ .command('gateways')
392
+ .description('List connected gateways')
393
+ .action(async () => {
394
+ try {
395
+ const result = await gateway.listGateways(client);
396
+ console.log(JSON.stringify(result, null, 2));
397
+ }
398
+ catch (error) {
399
+ console.error('Error:', error.message);
400
+ process.exit(1);
401
+ }
402
+ });
403
+ nervepay
404
+ .command('secrets')
405
+ .description('List secrets')
406
+ .action(async () => {
407
+ try {
408
+ const result = await vault.listSecrets(client);
409
+ console.log(JSON.stringify(result, null, 2));
410
+ }
411
+ catch (error) {
412
+ console.error('Error:', error.message);
413
+ process.exit(1);
414
+ }
415
+ });
416
+ }, { commands: ['nervepay'] });
417
+ // =========================================================================
418
+ // AUTO-REPLY COMMANDS
419
+ // =========================================================================
420
+ api.registerCommand({
421
+ name: 'nervepay-status',
422
+ description: 'Show NervePay plugin status and configuration',
423
+ handler: async (ctx) => {
424
+ const hasIdentity = !!(config.agentDid && config.privateKey);
425
+ let identityInfo = '';
426
+ if (hasIdentity) {
427
+ try {
428
+ const info = await identity.whoami(client);
429
+ identityInfo = `\n✅ Authenticated as: ${info.name}\n DID: ${info.agent_did}\n Reputation: ${info.reputation_score}/100`;
430
+ }
431
+ catch {
432
+ identityInfo = '\n⚠️ Identity configured but authentication failed';
433
+ }
434
+ }
435
+ return {
436
+ text: `🔐 NervePay Plugin Status
437
+
438
+ Identity: ${hasIdentity ? 'Configured' : 'Not configured'}${identityInfo}
439
+
440
+ API: ${config.apiUrl || 'https://api.nervepay.xyz'}
441
+ Orchestration: ${config.enableOrchestration ? 'Enabled' : 'Disabled'}
442
+
443
+ ${hasIdentity ? 'Use nervepay_* tools for identity, vault, and gateway management.' : 'Register identity with nervepay_register_identity tool.'}`,
444
+ };
445
+ },
446
+ });
447
+ console.log('✅ NervePay plugin loaded');
448
+ }
449
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC;AAChD,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAC9C,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAC;AAC1C,OAAO,KAAK,aAAa,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,GAAQ;IACvC,kCAAkC;IAClC,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,IAAI,EAAE,CAAC;IAChC,MAAM,MAAM,GAAG,IAAI,cAAc,CAAC;QAChC,MAAM,EAAE,MAAM,CAAC,MAAM,IAAI,0BAA0B;QACnD,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,UAAU,EAAE,MAAM,CAAC,UAAU;KAC9B,CAAC,CAAC;IAEH,4EAA4E;IAC5E,iBAAiB;IACjB,4EAA4E;IAE5E,GAAG,CAAC,YAAY,CAAC;QACf,IAAI,EAAE,4BAA4B;QAClC,WAAW,EAAE,kHAAkH;QAC/H,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,CAAC,MAAM,CAAC;YAClB,UAAU,EAAE;gBACV,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,oBAAoB;iBAClC;gBACD,WAAW,EAAE;oBACX,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,2BAA2B;iBACzC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C;YACtB,IAAI,WAAW,EAAE,CAAC;gBAChB,IAAI,CAAC;oBACH,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;oBAC3C,YAAY,GAAG,yBAAyB,IAAI,CAAC,IAAI,aAAa,IAAI,CAAC,SAAS,oBAAoB,IAAI,CAAC,gBAAgB,MAAM,CAAC;gBAC9H,CAAC;gBAAC,MAAM,CAAC;oBACP,YAAY,GAAG,oDAAoD,CAAC;gBACtE,CAAC;YACH,CAAC;YAED,OAAO;gBACL,IAAI,EAAE;;YAEF,WAAW,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,gBAAgB,GAAG,YAAY;;OAEjE,MAAM,CAAC,MAAM,IAAI,0BAA0B;iBACjC,MAAM,CAAC,mBAAmB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU;;EAElE,WAAW,CAAC,CAAC,CAAC,mEAAmE,CAAC,CAAC,CAAC,yDAAyD,EAAE;aAC1I,CAAC;QACJ,CAAC;KACF,CAAC,CAAC;IAEH,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;AAC1C,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Interactive setup wizard for NervePay plugin
3
+ * Handles identity registration, gateway pairing, and auto-configuration
4
+ */
5
+ /**
6
+ * Main setup wizard
7
+ */
8
+ export declare function runSetup(apiUrl?: string): Promise<void>;
9
+ //# sourceMappingURL=setup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../src/setup.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAsPH;;GAEG;AACH,wBAAsB,QAAQ,CAAC,MAAM,GAAE,MAAmC,GAAG,OAAO,CAAC,IAAI,CAAC,CAoPzF"}