agent-clinch 0.7.2 ā 0.7.4
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/cli.js +30 -9
- package/package.json +2 -2
package/cli.js
CHANGED
|
@@ -234,7 +234,7 @@ program
|
|
|
234
234
|
const existing = loadConfig();
|
|
235
235
|
if (existing) {
|
|
236
236
|
const overwrite = await prompt('Config already exists. Overwrite? (y/N): ');
|
|
237
|
-
if (overwrite.toLowerCase() !== 'y') { console.log('Aborted.');
|
|
237
|
+
if (overwrite.toLowerCase() !== 'y') { console.log('Aborted.'); process.exit(0); }
|
|
238
238
|
}
|
|
239
239
|
|
|
240
240
|
const registryUrl = opts.registry || 'https://everydaytok-agentq-core-logics.hf.space';
|
|
@@ -260,6 +260,13 @@ program
|
|
|
260
260
|
|
|
261
261
|
console.log('\n' + c.green('ā Agent initialized successfully'));
|
|
262
262
|
console.log(c.dim(` Public key: ${config.pubKey.substring(0,16)}...`));
|
|
263
|
+
|
|
264
|
+
console.log('\n' + c.bold('š Next Steps:'));
|
|
265
|
+
console.log(` 1. Start a natural language negotiation: ${c.cyan('clinch negotiate')}`);
|
|
266
|
+
console.log(` 2. Search the network for sellers: ${c.cyan('clinch query "electronics"')}`);
|
|
267
|
+
console.log(` 3. Manage blind API key vaults: ${c.cyan('clinch key')}`);
|
|
268
|
+
|
|
269
|
+
process.exit(0);
|
|
263
270
|
});
|
|
264
271
|
|
|
265
272
|
program
|
|
@@ -277,7 +284,10 @@ program
|
|
|
277
284
|
core.disconnect();
|
|
278
285
|
|
|
279
286
|
const sellers = results.results || [];
|
|
280
|
-
if (!sellers.length)
|
|
287
|
+
if (!sellers.length) {
|
|
288
|
+
console.log(c.yellow('No sellers found for this category.'));
|
|
289
|
+
process.exit(0);
|
|
290
|
+
}
|
|
281
291
|
|
|
282
292
|
console.log(c.bold(`Found ${sellers.length} seller(s):\n`));
|
|
283
293
|
sellers.forEach((s, i) => {
|
|
@@ -286,6 +296,8 @@ program
|
|
|
286
296
|
console.log(` ANP address: ${c.yellow('ANP/C.' + s.agent_id)}`);
|
|
287
297
|
console.log(` Modes: ${(s.supported_modes || []).join(', ')}`);
|
|
288
298
|
});
|
|
299
|
+
|
|
300
|
+
process.exit(0);
|
|
289
301
|
});
|
|
290
302
|
|
|
291
303
|
program
|
|
@@ -340,7 +352,7 @@ program
|
|
|
340
352
|
const sellers = results.results || [];
|
|
341
353
|
if (sellers.length === 0) {
|
|
342
354
|
console.log(c.yellow(`\nNo sellers found for "${parsed.category}".`));
|
|
343
|
-
targetAddress = await prompt("š Enter address manually (e.g. ANP/
|
|
355
|
+
targetAddress = await prompt("š Enter address manually (e.g. ANP/C.amazon.anp): ");
|
|
344
356
|
} else {
|
|
345
357
|
console.log(c.bold(`\nAvailable sellers:`));
|
|
346
358
|
sellers.forEach((s, idx) => console.log(` ${idx + 1}. ${c.cyan(s.agent_id)}`));
|
|
@@ -461,13 +473,18 @@ program
|
|
|
461
473
|
.action(() => {
|
|
462
474
|
const sessions = loadSessions();
|
|
463
475
|
const ids = Object.keys(sessions);
|
|
464
|
-
if (ids.length === 0)
|
|
476
|
+
if (ids.length === 0) {
|
|
477
|
+
console.log(c.yellow('No saved sessions found.'));
|
|
478
|
+
process.exit(0);
|
|
479
|
+
}
|
|
465
480
|
|
|
466
481
|
console.log(c.bold(`Found ${ids.length} session(s):\n`));
|
|
467
482
|
ids.forEach(id => {
|
|
468
483
|
const s = JSON.parse(sessions[id].state);
|
|
469
484
|
console.log(` ${c.cyan(id)} - Target: ${s.sellerId} | Status: ${c.bold(s.status)} | Turn: ${s.currentTurn}`);
|
|
470
485
|
});
|
|
486
|
+
|
|
487
|
+
process.exit(0);
|
|
471
488
|
});
|
|
472
489
|
|
|
473
490
|
program
|
|
@@ -528,18 +545,21 @@ program
|
|
|
528
545
|
} else {
|
|
529
546
|
console.log(c.yellow(`No credential found for domain: ${domain}`));
|
|
530
547
|
}
|
|
531
|
-
|
|
548
|
+
process.exit(0);
|
|
532
549
|
}
|
|
533
550
|
|
|
534
551
|
if (opts.list) {
|
|
535
552
|
const entries = Object.entries(secrets);
|
|
536
|
-
if (entries.length === 0)
|
|
553
|
+
if (entries.length === 0) {
|
|
554
|
+
console.log(c.yellow('Your Blind Key Pass vault is empty.'));
|
|
555
|
+
process.exit(0);
|
|
556
|
+
}
|
|
537
557
|
console.log(c.bold('\nš Registered Blind Key Credentials:\n'));
|
|
538
558
|
entries.forEach(([domain, s]) => {
|
|
539
559
|
console.log(` - ${c.cyan(domain)} (${c.dim(s.name || 'unnamed')})`);
|
|
540
560
|
});
|
|
541
561
|
console.log('');
|
|
542
|
-
|
|
562
|
+
process.exit(0);
|
|
543
563
|
}
|
|
544
564
|
|
|
545
565
|
// Default: Interactive configuration
|
|
@@ -547,17 +567,18 @@ program
|
|
|
547
567
|
console.log(c.dim(' Your credentials are AES-GCM encrypted and bound to this hardware locally.\n'));
|
|
548
568
|
|
|
549
569
|
const domain = await prompt('š Target Domain (e.g. apify.anp): ');
|
|
550
|
-
if (!domain)
|
|
570
|
+
if (!domain) process.exit(0);
|
|
551
571
|
const normalizedDomain = domain.toLowerCase().trim();
|
|
552
572
|
|
|
553
573
|
const name = await prompt('š Key Label (e.g. Apify Production Token): ');
|
|
554
574
|
const value = await prompt('š Secret Value / API Key: ');
|
|
555
|
-
if (!value)
|
|
575
|
+
if (!value) process.exit(0);
|
|
556
576
|
|
|
557
577
|
secrets[normalizedDomain] = { key: value, name: name || 'Unnamed Key' };
|
|
558
578
|
saveSecrets(secrets);
|
|
559
579
|
|
|
560
580
|
console.log(c.green(`\nā Key registered! Handshakes targeting ${normalizedDomain} will silently inject this token.`));
|
|
581
|
+
process.exit(0);
|
|
561
582
|
});
|
|
562
583
|
|
|
563
584
|
program
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
"name": "agent-clinch",
|
|
9
|
-
"version": "0.7.
|
|
9
|
+
"version": "0.7.4",
|
|
10
10
|
"description": "Clinch Protocol CLI ā agent negotiation from your terminal",
|
|
11
11
|
"main": "cli.js",
|
|
12
12
|
"bin": {
|
|
@@ -19,6 +19,6 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"commander": "^14.0.3",
|
|
21
21
|
"node-llama-cpp": "^3.18.1",
|
|
22
|
-
"clinch-core": "0.7.
|
|
22
|
+
"clinch-core": "0.7.3"
|
|
23
23
|
}
|
|
24
24
|
}
|