@sheaf-labs/kya 0.1.0 → 0.2.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 +9 -3
- package/bin/kya.mjs +22 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -20,9 +20,15 @@ The first command makes your owner key. You sign for your agents with it. The se
|
|
|
20
20
|
the agent, signs its ID as its owner, and enters it on the register. It prints the agent's ID, its
|
|
21
21
|
fingerprint and the page where anyone can look it up.
|
|
22
22
|
|
|
23
|
-
The agent is now **identified, owner on record**.
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
The agent is now **identified, owner on record**. Anyone can look it up or find you by name. To become a
|
|
24
|
+
**verified** owner, listed on the owners page and counted on the front page, prove you control your domain:
|
|
25
|
+
|
|
26
|
+
```sh
|
|
27
|
+
npx @sheaf-labs/kya verify acme.example # prints a token to put in DNS or at /.well-known/traceable-agents.txt
|
|
28
|
+
npx @sheaf-labs/kya verify-check # the register looks for it
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
See [owner verification](https://traceableagents.org/format.html#verification).
|
|
26
32
|
|
|
27
33
|
## The handshake
|
|
28
34
|
|
package/bin/kya.mjs
CHANGED
|
@@ -79,6 +79,8 @@ const HELP = `kya: Know Your Agent. The Register of Traceable Agents from the co
|
|
|
79
79
|
payment / approved or email / sent. Three kinds have meaning for the Record Score: held (a person
|
|
80
80
|
stopped it), released (a person let it go), rejected (a person refused it). The register keeps
|
|
81
81
|
a hash of the action, never the text.
|
|
82
|
+
kya verify <domain> Claim your domain: prints the token to put in DNS or on your site.
|
|
83
|
+
kya verify-check Ask the register to look for the token. Passing makes you a verified owner.
|
|
82
84
|
kya retire <agent> [--reason "…"] End the agent's life. Its record stays.
|
|
83
85
|
kya revoke <agent> [--reason "…"] Withdraw the agent for cause. Its record stays.
|
|
84
86
|
kya record <agent> The agent's Record of Action and Record Score, from the register.
|
|
@@ -193,6 +195,25 @@ async function standing(status) {
|
|
|
193
195
|
out(`${name} is ${r.agent.status}. Its record stays at ${REGISTER}/a/${a.fingerprint}`);
|
|
194
196
|
}
|
|
195
197
|
|
|
198
|
+
async function verify() {
|
|
199
|
+
const o = owner(); const domain = rest[0];
|
|
200
|
+
if (!domain) die("kya verify <domain>: the domain you control, for example acme.example");
|
|
201
|
+
const r = await post("/api/v1/register/owners/verify", signed(o.key, { type: "traceable-verify", owner: didOf(o.key), domain, at: now() }));
|
|
202
|
+
const v = r.verification || {}; const tok = v.domainToken || v.token || (v.domain && v.domain.token);
|
|
203
|
+
out(`Claimed ${domain}. Put this where only the domain's controller can:`);
|
|
204
|
+
out(` DNS: _traceableagents.${domain} TXT "traceableagents-verify=${tok}"`);
|
|
205
|
+
out(` or: https://${domain}/.well-known/traceable-agents.txt containing the line traceableagents-verify=${tok}`);
|
|
206
|
+
out(`Then run: kya verify-check`);
|
|
207
|
+
if (flags.json) out(r);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
async function verifyCheck() {
|
|
211
|
+
const o = owner();
|
|
212
|
+
const r = await post("/api/v1/register/owners/verify/check", signed(o.key, { type: "traceable-verify-check", owner: didOf(o.key), at: now() }));
|
|
213
|
+
out(r.tier === "verified" ? `Verified. You are a verified owner on the register. ${REGISTER}/o/${didOf(o.key)}` : `Not verified yet (${r.tier || "unverified"}).`);
|
|
214
|
+
if (flags.json) out(r);
|
|
215
|
+
}
|
|
216
|
+
|
|
196
217
|
async function record() {
|
|
197
218
|
const a = agent(safeName(rest[0]));
|
|
198
219
|
const j = await get(`/api/v1/register/agents/${a.id}/record`);
|
|
@@ -201,7 +222,7 @@ async function record() {
|
|
|
201
222
|
if (flags.json) out(j);
|
|
202
223
|
}
|
|
203
224
|
|
|
204
|
-
const run = { init, join, whoami, prove, check, challenge, receipt, record, retire: () => standing("retired"), revoke: () => standing("revoked") };
|
|
225
|
+
const run = { init, join, whoami, prove, check, challenge, receipt, record, verify, "verify-check": verifyCheck, retire: () => standing("retired"), revoke: () => standing("revoked") };
|
|
205
226
|
if (!cmd || cmd === "help" || flags.help) { out(HELP); process.exit(0); }
|
|
206
227
|
if (!run[cmd]) die(`Unknown command "${cmd}".\n\n${HELP}`);
|
|
207
228
|
run[cmd]().catch(e => die(e && e.message ? e.message : String(e)));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sheaf-labs/kya",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Know Your Agent. Put an AI agent on the Register of Traceable Agents, prove who it is, write its record, and check other agents before dealing with them.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": { "kya": "bin/kya.mjs" },
|
|
@@ -8,6 +8,6 @@
|
|
|
8
8
|
"engines": { "node": ">=18" },
|
|
9
9
|
"keywords": ["kya", "know-your-agent", "ai-agents", "agent-identity", "did", "ed25519", "traceable-agents", "register"],
|
|
10
10
|
"homepage": "https://traceableagents.org",
|
|
11
|
-
"repository": { "type": "git", "url": "https://github.com/
|
|
11
|
+
"repository": { "type": "git", "url": "https://github.com/jackmitchelwidman/traceable-agents" },
|
|
12
12
|
"license": "Apache-2.0"
|
|
13
13
|
}
|