@reppo/cli 0.12.2 → 0.12.3
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register-agent.d.ts","sourceRoot":"","sources":["../../src/commands/register-agent.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"register-agent.d.ts","sourceRoot":"","sources":["../../src/commands/register-agent.ts"],"names":[],"mappings":"AAgCA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAoBzC,qBAAa,oBAAqB,SAAQ,WAAW;IACnD,OAAgB,KAAK,aAAe;IAEpC,OAAgB,KAAK,4BAUlB;IAEH,SAAS,SAA0F;IACnG,WAAW,SAA0F;IACrG,WAAW,UAER;IAEG,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC;CAoFjC"}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `reppo register-agent --name <s> --description <s
|
|
3
|
-
* agent identity on the Reppo platform. Returns a
|
|
4
|
-
* id + apiKey (Bearer token).
|
|
2
|
+
* `reppo register-agent --name <s> --description <s> [--is-orquestra]` —
|
|
3
|
+
* register a new agent identity on the Reppo platform. Returns a
|
|
4
|
+
* persistent agent id + apiKey (Bearer token).
|
|
5
|
+
*
|
|
6
|
+
* `--is-orquestra` marks the agent as an Orquestra swarm node. The platform
|
|
7
|
+
* then resolves ON-CHAIN pod ids on the agent-scoped endpoints — without it,
|
|
8
|
+
* POST /agents/[id]/pods/[POD_ID]/votes only accepts platform pod ids
|
|
9
|
+
* (pod_...), so on-chain vote registration fails with 404 "Pod not found".
|
|
5
10
|
*
|
|
6
11
|
* Endpoint: `POST https://reppo.ai/api/v1/agents/register` (no auth).
|
|
7
12
|
* Spec: https://docs.reppo.ai/api/agent/custom-agents
|
|
@@ -41,10 +46,15 @@ export class RegisterAgentCommand extends BaseCommand {
|
|
|
41
46
|
'reppo register-agent --name "MyBot" --description "Posts pod summaries to X"'],
|
|
42
47
|
['JSON output (capture credentials programmatically)',
|
|
43
48
|
'reppo register-agent --name "MyBot" --description "..." --json'],
|
|
49
|
+
['Register an Orquestra node agent (on-chain pod ids on /votes)',
|
|
50
|
+
'reppo register-agent --name "my-node" --description "Orquestra swarm node" --is-orquestra'],
|
|
44
51
|
],
|
|
45
52
|
});
|
|
46
53
|
agentName = Option.String('--name', { required: true, description: 'Display name for the agent' });
|
|
47
54
|
description = Option.String('--description', { required: true, description: 'What the agent does' });
|
|
55
|
+
isOrquestra = Option.Boolean('--is-orquestra', false, {
|
|
56
|
+
description: 'Register as an Orquestra node agent — the platform then resolves on-chain pod ids on the agent endpoints (required for vote registration)',
|
|
57
|
+
});
|
|
48
58
|
async execute() {
|
|
49
59
|
try {
|
|
50
60
|
const trimmedName = this.agentName.trim();
|
|
@@ -61,7 +71,13 @@ export class RegisterAgentCommand extends BaseCommand {
|
|
|
61
71
|
response = await fetch(url, {
|
|
62
72
|
method: 'POST',
|
|
63
73
|
headers: { 'Content-Type': 'application/json' },
|
|
64
|
-
|
|
74
|
+
// isOrquestra only when set — the platform defaults it to false, and
|
|
75
|
+
// omitting it keeps the body byte-identical for existing callers.
|
|
76
|
+
body: JSON.stringify({
|
|
77
|
+
name: trimmedName,
|
|
78
|
+
description: trimmedDesc,
|
|
79
|
+
...(this.isOrquestra ? { isOrquestra: true } : {}),
|
|
80
|
+
}),
|
|
65
81
|
});
|
|
66
82
|
}
|
|
67
83
|
catch (e) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register-agent.js","sourceRoot":"","sources":["../../src/commands/register-agent.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"register-agent.js","sourceRoot":"","sources":["../../src/commands/register-agent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,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