beam-protocol-cli 0.3.0 → 0.5.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/package.json +2 -2
- package/src/commands/browse.ts +61 -0
- package/src/commands/delegate.ts +52 -0
- package/src/commands/init.ts +6 -4
- package/src/commands/lookup.ts +6 -8
- package/src/commands/profile-update.ts +47 -0
- package/src/commands/register.ts +1 -1
- package/src/commands/report.ts +49 -0
- package/src/commands/search.ts +3 -6
- package/src/commands/send.ts +4 -9
- package/src/commands/stats.ts +40 -0
- package/src/commands/verify-check.ts +41 -0
- package/src/commands/verify-domain.ts +42 -0
- package/src/config.ts +16 -5
- package/src/index.ts +91 -12
- package/tsconfig.json +7 -2
- package/dist/commands/init.d.ts +0 -9
- package/dist/commands/init.d.ts.map +0 -1
- package/dist/commands/init.js +0 -45
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/lookup.d.ts +0 -7
- package/dist/commands/lookup.d.ts.map +0 -1
- package/dist/commands/lookup.js +0 -58
- package/dist/commands/lookup.js.map +0 -1
- package/dist/commands/register.d.ts +0 -8
- package/dist/commands/register.d.ts.map +0 -1
- package/dist/commands/register.js +0 -46
- package/dist/commands/register.js.map +0 -1
- package/dist/commands/search.d.ts +0 -11
- package/dist/commands/search.d.ts.map +0 -1
- package/dist/commands/search.js +0 -73
- package/dist/commands/search.js.map +0 -1
- package/dist/commands/send.d.ts +0 -8
- package/dist/commands/send.d.ts.map +0 -1
- package/dist/commands/send.js +0 -78
- package/dist/commands/send.js.map +0 -1
- package/dist/config.d.ts +0 -13
- package/dist/config.d.ts.map +0 -1
- package/dist/config.js +0 -26
- package/dist/config.js.map +0 -1
- package/dist/index.d.ts +0 -3
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -73
- package/dist/index.js.map +0 -1
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
package/dist/index.js
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { Command } from 'commander';
|
|
3
|
-
import chalk from 'chalk';
|
|
4
|
-
import { cmdInit } from './commands/init.js';
|
|
5
|
-
import { cmdRegister } from './commands/register.js';
|
|
6
|
-
import { cmdLookup } from './commands/lookup.js';
|
|
7
|
-
import { cmdSearch } from './commands/search.js';
|
|
8
|
-
import { cmdSend } from './commands/send.js';
|
|
9
|
-
const program = new Command();
|
|
10
|
-
program
|
|
11
|
-
.name('beam')
|
|
12
|
-
.description(chalk.bold('Beam Protocol CLI') + '\n' +
|
|
13
|
-
chalk.dim('SMTP for AI Agents — agent identity, registration & intent routing'))
|
|
14
|
-
.version('0.1.0');
|
|
15
|
-
// ─── beam init ────────────────────────────────────────────────────────────────
|
|
16
|
-
program
|
|
17
|
-
.command('init')
|
|
18
|
-
.description('Generate a new Beam identity (writes .beam/identity.json)')
|
|
19
|
-
.requiredOption('-a, --agent <name>', 'Agent name (e.g. jarvis)')
|
|
20
|
-
.requiredOption('-o, --org <name>', 'Organisation name (e.g. coppen)')
|
|
21
|
-
.option('-d, --directory <url>', 'Directory server URL', process.env['BEAM_DIRECTORY_URL'] ?? 'http://localhost:3100')
|
|
22
|
-
.option('-f, --force', 'Overwrite existing identity')
|
|
23
|
-
.action(async (opts) => {
|
|
24
|
-
await cmdInit(opts);
|
|
25
|
-
});
|
|
26
|
-
// ─── beam register ────────────────────────────────────────────────────────────
|
|
27
|
-
program
|
|
28
|
-
.command('register')
|
|
29
|
-
.description('Register this agent with a Beam directory')
|
|
30
|
-
.option('-n, --display-name <name>', 'Human-readable display name')
|
|
31
|
-
.option('-c, --capabilities <list>', 'Comma-separated capabilities (e.g. query,answer,write)')
|
|
32
|
-
.option('-d, --directory <url>', 'Override directory URL')
|
|
33
|
-
.action(async (opts) => {
|
|
34
|
-
await cmdRegister(opts);
|
|
35
|
-
});
|
|
36
|
-
// ─── beam lookup ──────────────────────────────────────────────────────────────
|
|
37
|
-
program
|
|
38
|
-
.command('lookup <beamId>')
|
|
39
|
-
.description('Look up an agent by Beam ID')
|
|
40
|
-
.option('-d, --directory <url>', 'Override directory URL')
|
|
41
|
-
.option('--json', 'Output raw JSON')
|
|
42
|
-
.action(async (beamId, opts) => {
|
|
43
|
-
await cmdLookup(beamId, opts);
|
|
44
|
-
});
|
|
45
|
-
// ─── beam search ──────────────────────────────────────────────────────────────
|
|
46
|
-
program
|
|
47
|
-
.command('search')
|
|
48
|
-
.description('Search for agents in the directory')
|
|
49
|
-
.option('--org <org>', 'Filter by organisation')
|
|
50
|
-
.option('--capability <cap>', 'Filter by capability')
|
|
51
|
-
.option('--min-trust <score>', 'Minimum trust score (0.0-1.0)')
|
|
52
|
-
.option('--limit <n>', 'Max results', '20')
|
|
53
|
-
.option('-d, --directory <url>', 'Override directory URL')
|
|
54
|
-
.option('--json', 'Output raw JSON')
|
|
55
|
-
.action(async (opts) => {
|
|
56
|
-
await cmdSearch(opts);
|
|
57
|
-
});
|
|
58
|
-
// ─── beam send ────────────────────────────────────────────────────────────────
|
|
59
|
-
program
|
|
60
|
-
.command('send <to> <intent> [params]')
|
|
61
|
-
.description('Send an intent to an agent and print the result')
|
|
62
|
-
.option('-d, --directory <url>', 'Override directory URL')
|
|
63
|
-
.option('-t, --timeout <seconds>', 'Timeout in seconds', '10')
|
|
64
|
-
.option('--json', 'Output raw JSON')
|
|
65
|
-
.action(async (to, intent, params, opts) => {
|
|
66
|
-
await cmdSend(to, intent, params, opts);
|
|
67
|
-
});
|
|
68
|
-
// ─── Error handling ───────────────────────────────────────────────────────────
|
|
69
|
-
program.configureOutput({
|
|
70
|
-
writeErr: str => process.stderr.write(chalk.red(str))
|
|
71
|
-
});
|
|
72
|
-
program.parse();
|
|
73
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","s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