@ens-node-metadata/agent 0.3.1 → 0.3.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.
- package/README.md +32 -2
- package/SKILL.md +31 -21
- package/dist/{chunk-3VTAAUSG.js → chunk-6IGJKB4W.js} +5 -0
- package/dist/{chunk-UDZL55XF.js → chunk-BPAT5BZR.js} +30 -8
- package/dist/chunk-DXAESRZH.js +1122 -0
- package/dist/chunk-X6M7WZJF.js +43 -0
- package/dist/chunk-YZFATT7X.js +9 -0
- package/dist/cli.js +6 -1
- package/dist/commands/metadata/set.js +264 -11
- package/dist/commands/metadata/template.js +2 -1
- package/dist/commands/metadata/validate.js +2 -1
- package/dist/commands/registration-file/publish.js +2 -1
- package/dist/commands/registration-file/template.js +2 -0
- package/dist/commands/registration-file/validate.js +2 -1
- package/dist/commands/registry/identity/index.d.ts +3 -0
- package/dist/commands/registry/identity/index.js +7 -0
- package/dist/commands/registry/identity/query.d.ts +19 -0
- package/dist/commands/registry/identity/query.js +74 -0
- package/dist/commands/registry/identity/register.d.ts +25 -0
- package/dist/commands/registry/identity/register.js +112 -0
- package/dist/commands/registry/identity/set-uri.d.ts +25 -0
- package/dist/commands/registry/identity/set-uri.js +113 -0
- package/dist/commands/registry/identity/set-wallet.d.ts +31 -0
- package/dist/commands/registry/identity/set-wallet.js +191 -0
- package/dist/commands/registry/identity/unset-wallet.d.ts +25 -0
- package/dist/commands/registry/identity/unset-wallet.js +108 -0
- package/dist/commands/skill.js +2 -0
- package/dist/index.d.ts +83 -6
- package/dist/index.js +2 -1
- package/dist/meta-2D4D777X.js +99 -0
- package/dist/meta-3V4ARLLT.js +90 -0
- package/dist/meta-4FOJTBXM.js +99 -0
- package/dist/meta-4WYOTBTO.js +99 -0
- package/dist/meta-6ZW4JGML.js +99 -0
- package/dist/meta-CVZI45M2.js +99 -0
- package/dist/meta-GPMB2YZD.js +99 -0
- package/dist/meta-KQ3IEVWD.js +99 -0
- package/dist/meta-OVOAMXLB.js +99 -0
- package/dist/meta-PRCHJBWX.js +99 -0
- package/dist/meta-Q27UTR4Z.js +99 -0
- package/dist/meta-VOM2POTX.js +99 -0
- package/dist/schema-533SFVLQ.js +70 -0
- package/dist/schema-5VKXCUCI.js +58 -0
- package/dist/schema-FGOA4QOU.js +86 -0
- package/dist/schema-JNRQYFPA.js +79 -0
- package/dist/schema-JWSXL7CR.js +51 -0
- package/dist/schema-NESH3IQS.js +90 -0
- package/dist/schema-O4SLAGNC.js +65 -0
- package/dist/schema-SFNY6GI4.js +95 -0
- package/dist/schema-WUU2T2HE.js +53 -0
- package/dist/schema-YRD3DNDN.js +97 -0
- package/dist/schema-Z7FM6RGM.js +84 -0
- package/dist/schema-ZCETI367.js +83 -0
- package/package.json +5 -2
- package/dist/commands/registry/identity.d.ts +0 -19
- package/dist/commands/registry/identity.js +0 -91
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import "./chunk-YZFATT7X.js";
|
|
2
|
+
|
|
3
|
+
// ../schemas/published/group/versions/0.1.4/schema.json
|
|
4
|
+
var $id = "https://github.com/0xLighthouse/ens-node-metadata/schemas/group/0.1.4";
|
|
5
|
+
var source = "https://github.com/0xLighthouse/ens-node-metadata";
|
|
6
|
+
var title = "Group";
|
|
7
|
+
var version = "0.1.4";
|
|
8
|
+
var description = "This node describes a group of individuals or entities with a shared purpose or responsibility.";
|
|
9
|
+
var type = "object";
|
|
10
|
+
var properties = {
|
|
11
|
+
class: {
|
|
12
|
+
type: "string",
|
|
13
|
+
default: "Group",
|
|
14
|
+
description: "High-level identifier of this node type",
|
|
15
|
+
examples: [
|
|
16
|
+
"Group",
|
|
17
|
+
"Committee",
|
|
18
|
+
"Council",
|
|
19
|
+
"Workgroup",
|
|
20
|
+
"Team"
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
name: {
|
|
24
|
+
type: "string",
|
|
25
|
+
description: "The name of the group"
|
|
26
|
+
},
|
|
27
|
+
avatar: {
|
|
28
|
+
type: "string",
|
|
29
|
+
description: "A URL to an image used as an avatar or logo"
|
|
30
|
+
},
|
|
31
|
+
description: {
|
|
32
|
+
type: "string",
|
|
33
|
+
description: "A description of the name"
|
|
34
|
+
},
|
|
35
|
+
url: {
|
|
36
|
+
type: "string",
|
|
37
|
+
format: "uri",
|
|
38
|
+
description: "URL of the group"
|
|
39
|
+
},
|
|
40
|
+
lead: {
|
|
41
|
+
type: "string",
|
|
42
|
+
description: "ENS name or address of the group leader"
|
|
43
|
+
},
|
|
44
|
+
"lead-title": {
|
|
45
|
+
type: "string",
|
|
46
|
+
description: "Title or role of the group leader",
|
|
47
|
+
examples: [
|
|
48
|
+
"Lead Steward",
|
|
49
|
+
"Chair",
|
|
50
|
+
"Manager",
|
|
51
|
+
"Owner"
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
"members-title": {
|
|
55
|
+
type: "string",
|
|
56
|
+
description: "Title or role of the group members",
|
|
57
|
+
examples: [
|
|
58
|
+
"Member",
|
|
59
|
+
"Steward",
|
|
60
|
+
"Contributor",
|
|
61
|
+
"Participant"
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
var required = [
|
|
66
|
+
"class"
|
|
67
|
+
];
|
|
68
|
+
var recommended = [
|
|
69
|
+
"name",
|
|
70
|
+
"lead",
|
|
71
|
+
"avatar",
|
|
72
|
+
"url",
|
|
73
|
+
"description"
|
|
74
|
+
];
|
|
75
|
+
var schema_default = {
|
|
76
|
+
$id,
|
|
77
|
+
source,
|
|
78
|
+
title,
|
|
79
|
+
version,
|
|
80
|
+
description,
|
|
81
|
+
type,
|
|
82
|
+
properties,
|
|
83
|
+
required,
|
|
84
|
+
recommended
|
|
85
|
+
};
|
|
86
|
+
export {
|
|
87
|
+
$id,
|
|
88
|
+
schema_default as default,
|
|
89
|
+
description,
|
|
90
|
+
properties,
|
|
91
|
+
recommended,
|
|
92
|
+
required,
|
|
93
|
+
source,
|
|
94
|
+
title,
|
|
95
|
+
type,
|
|
96
|
+
version
|
|
97
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import "./chunk-YZFATT7X.js";
|
|
2
|
+
|
|
3
|
+
// ../schemas/published/delegate/versions/1.0.0/schema.json
|
|
4
|
+
var $id = "https://github.com/0xLighthouse/ens-node-metadata/schemas/delegate/1.0.0";
|
|
5
|
+
var source = "https://github.com/0xLighthouse/ens-node-metadata";
|
|
6
|
+
var title = "Delegate";
|
|
7
|
+
var version = "1.0.0";
|
|
8
|
+
var description = "A delegate.";
|
|
9
|
+
var type = "object";
|
|
10
|
+
var properties = {
|
|
11
|
+
class: {
|
|
12
|
+
type: "string",
|
|
13
|
+
default: "Delegate",
|
|
14
|
+
description: "High-level identifier of this node type"
|
|
15
|
+
},
|
|
16
|
+
"legal-name": {
|
|
17
|
+
type: "string",
|
|
18
|
+
description: 'The full legal or preferred name of the delegate (e.g. "John Doe")'
|
|
19
|
+
},
|
|
20
|
+
"display-name": {
|
|
21
|
+
type: "string",
|
|
22
|
+
description: "A canonical display name for the delegate"
|
|
23
|
+
},
|
|
24
|
+
statement: {
|
|
25
|
+
type: "string",
|
|
26
|
+
description: "Generic delegate statement "
|
|
27
|
+
},
|
|
28
|
+
"conflict-of-interest": {
|
|
29
|
+
type: "string",
|
|
30
|
+
description: "Generic conflict of interest declaration "
|
|
31
|
+
},
|
|
32
|
+
"forum-handle": {
|
|
33
|
+
type: "string",
|
|
34
|
+
description: 'Default forum handle (e.g. "johndoe")'
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
var patternProperties = {
|
|
38
|
+
"^statement(\\[[^\\]]+\\])?$": {
|
|
39
|
+
type: "string",
|
|
40
|
+
description: "Delegate statement per organization (e.g. statement[dao.eth])"
|
|
41
|
+
},
|
|
42
|
+
"^conflict-of-interest(\\[[^\\]]+\\])?$": {
|
|
43
|
+
type: "string",
|
|
44
|
+
description: "Conflict of interest declaration per organization (e.g. conflict-of-interest[dao.eth])"
|
|
45
|
+
},
|
|
46
|
+
"^forum-handle(\\[[^\\]]+\\])?$": {
|
|
47
|
+
type: "string",
|
|
48
|
+
description: "Forum handle per organization (e.g. forum-handle[dao.eth])"
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
var required = [
|
|
52
|
+
"class"
|
|
53
|
+
];
|
|
54
|
+
var recommended = [
|
|
55
|
+
"display-name",
|
|
56
|
+
"statement",
|
|
57
|
+
"conflict-of-interest",
|
|
58
|
+
"forum-handle"
|
|
59
|
+
];
|
|
60
|
+
var schema_default = {
|
|
61
|
+
$id,
|
|
62
|
+
source,
|
|
63
|
+
title,
|
|
64
|
+
version,
|
|
65
|
+
description,
|
|
66
|
+
type,
|
|
67
|
+
properties,
|
|
68
|
+
patternProperties,
|
|
69
|
+
required,
|
|
70
|
+
recommended
|
|
71
|
+
};
|
|
72
|
+
export {
|
|
73
|
+
$id,
|
|
74
|
+
schema_default as default,
|
|
75
|
+
description,
|
|
76
|
+
patternProperties,
|
|
77
|
+
properties,
|
|
78
|
+
recommended,
|
|
79
|
+
required,
|
|
80
|
+
source,
|
|
81
|
+
title,
|
|
82
|
+
type,
|
|
83
|
+
version
|
|
84
|
+
};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import "./chunk-YZFATT7X.js";
|
|
2
|
+
|
|
3
|
+
// ../schemas/published/application/versions/1.0.0/schema.json
|
|
4
|
+
var $id = "https://github.com/0xLighthouse/ens-node-metadata/schemas/application/1.0.0";
|
|
5
|
+
var source = "https://github.com/0xLighthouse/ens-node-metadata";
|
|
6
|
+
var title = "Application";
|
|
7
|
+
var version = "1.0.0";
|
|
8
|
+
var description = "An application, service, or dApp within the organization.";
|
|
9
|
+
var type = "object";
|
|
10
|
+
var properties = {
|
|
11
|
+
class: {
|
|
12
|
+
type: "string",
|
|
13
|
+
default: "Application",
|
|
14
|
+
description: "High-level identifier of this node type",
|
|
15
|
+
examples: [
|
|
16
|
+
"Application",
|
|
17
|
+
"Service",
|
|
18
|
+
"Website"
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
name: {
|
|
22
|
+
type: "string",
|
|
23
|
+
description: "The name of the application"
|
|
24
|
+
},
|
|
25
|
+
description: {
|
|
26
|
+
type: "string",
|
|
27
|
+
description: "Description of the application's purpose and functionality"
|
|
28
|
+
},
|
|
29
|
+
url: {
|
|
30
|
+
type: "string",
|
|
31
|
+
format: "uri",
|
|
32
|
+
description: "URL where the application is hosted or accessed"
|
|
33
|
+
},
|
|
34
|
+
repository: {
|
|
35
|
+
type: "string",
|
|
36
|
+
description: "Source code repository URL"
|
|
37
|
+
},
|
|
38
|
+
version: {
|
|
39
|
+
type: "string",
|
|
40
|
+
description: "Current version of the application"
|
|
41
|
+
},
|
|
42
|
+
status: {
|
|
43
|
+
type: "string",
|
|
44
|
+
description: "Application status",
|
|
45
|
+
enum: [
|
|
46
|
+
"Active",
|
|
47
|
+
"Development",
|
|
48
|
+
"Deprecated"
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
var required = [
|
|
53
|
+
"class"
|
|
54
|
+
];
|
|
55
|
+
var recommended = [
|
|
56
|
+
"name",
|
|
57
|
+
"description",
|
|
58
|
+
"url",
|
|
59
|
+
"status"
|
|
60
|
+
];
|
|
61
|
+
var schema_default = {
|
|
62
|
+
$id,
|
|
63
|
+
source,
|
|
64
|
+
title,
|
|
65
|
+
version,
|
|
66
|
+
description,
|
|
67
|
+
type,
|
|
68
|
+
properties,
|
|
69
|
+
required,
|
|
70
|
+
recommended
|
|
71
|
+
};
|
|
72
|
+
export {
|
|
73
|
+
$id,
|
|
74
|
+
schema_default as default,
|
|
75
|
+
description,
|
|
76
|
+
properties,
|
|
77
|
+
recommended,
|
|
78
|
+
required,
|
|
79
|
+
source,
|
|
80
|
+
title,
|
|
81
|
+
type,
|
|
82
|
+
version
|
|
83
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ens-node-metadata/agent",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"description": "CLI for registering AI agents on ENS using ERC-8004",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -34,6 +34,8 @@
|
|
|
34
34
|
"@types/react": "^19.2.14",
|
|
35
35
|
"tsup": "^8.5.1",
|
|
36
36
|
"typescript": "^5",
|
|
37
|
+
"@ens-node-metadata/schemas": "0.1.0",
|
|
38
|
+
"@ens-node-metadata/shared": "0.1.0",
|
|
37
39
|
"tsconfig": "0.0.0"
|
|
38
40
|
},
|
|
39
41
|
"scripts": {
|
|
@@ -41,6 +43,7 @@
|
|
|
41
43
|
"version:minor": "pnpm version minor --no-git-tag-version",
|
|
42
44
|
"agent": "bun src/cli.ts",
|
|
43
45
|
"build": "tsup",
|
|
44
|
-
"lint": "biome check ."
|
|
46
|
+
"lint": "biome check .",
|
|
47
|
+
"test": "vitest run"
|
|
45
48
|
}
|
|
46
49
|
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
|
|
4
|
-
declare const description = "Query ERC-8004 registry for agent identity";
|
|
5
|
-
declare const options: z.ZodObject<{
|
|
6
|
-
chainName: z.ZodDefault<z.ZodEnum<["base", "mainnet"]>>;
|
|
7
|
-
}, "strip", z.ZodTypeAny, {
|
|
8
|
-
chainName: "base" | "mainnet";
|
|
9
|
-
}, {
|
|
10
|
-
chainName?: "base" | "mainnet" | undefined;
|
|
11
|
-
}>;
|
|
12
|
-
declare const args: z.ZodTuple<[z.ZodString], null>;
|
|
13
|
-
type Props = {
|
|
14
|
-
options: z.infer<typeof options>;
|
|
15
|
-
args: z.infer<typeof args>;
|
|
16
|
-
};
|
|
17
|
-
declare function RegistryIdentity({ options: { chainName }, args: [agentUri] }: Props): React.JSX.Element;
|
|
18
|
-
|
|
19
|
-
export { args, RegistryIdentity as default, description, options };
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
// src/commands/registry/identity.tsx
|
|
2
|
-
import { Box, Text, useApp } from "ink";
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { http, createPublicClient } from "viem";
|
|
5
|
-
import { base, mainnet } from "viem/chains";
|
|
6
|
-
import { z } from "zod";
|
|
7
|
-
var description = "Query ERC-8004 registry for agent identity";
|
|
8
|
-
var options = z.object({
|
|
9
|
-
chainName: z.enum(["base", "mainnet"]).default("mainnet").describe("Chain to query (base | mainnet)")
|
|
10
|
-
});
|
|
11
|
-
var args = z.tuple([z.string().describe("agent-uri")]);
|
|
12
|
-
var REGISTRY_ADDRESSES = {
|
|
13
|
-
mainnet: process.env.ERC8004_REGISTRY_MAINNET ?? "0x0000000000000000000000000000000000000000",
|
|
14
|
-
base: process.env.ERC8004_REGISTRY_BASE ?? "0x0000000000000000000000000000000000000000"
|
|
15
|
-
};
|
|
16
|
-
var ERC8004_REGISTRY_ABI = [
|
|
17
|
-
{
|
|
18
|
-
name: "agentOf",
|
|
19
|
-
type: "function",
|
|
20
|
-
stateMutability: "view",
|
|
21
|
-
inputs: [{ name: "agentUri", type: "string" }],
|
|
22
|
-
outputs: [
|
|
23
|
-
{ name: "owner", type: "address" },
|
|
24
|
-
{ name: "tokenId", type: "uint256" },
|
|
25
|
-
{ name: "agentUri", type: "string" }
|
|
26
|
-
]
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
name: "balanceOf",
|
|
30
|
-
type: "function",
|
|
31
|
-
stateMutability: "view",
|
|
32
|
-
inputs: [{ name: "owner", type: "address" }],
|
|
33
|
-
outputs: [{ name: "", type: "uint256" }]
|
|
34
|
-
}
|
|
35
|
-
];
|
|
36
|
-
function RegistryIdentity({ options: { chainName }, args: [agentUri] }) {
|
|
37
|
-
const { exit } = useApp();
|
|
38
|
-
const [state, setState] = React.useState({ status: "loading" });
|
|
39
|
-
React.useEffect(() => {
|
|
40
|
-
async function run() {
|
|
41
|
-
const chain = chainName === "base" ? base : mainnet;
|
|
42
|
-
const registryAddress = REGISTRY_ADDRESSES[chainName];
|
|
43
|
-
if (registryAddress === "0x0000000000000000000000000000000000000000") {
|
|
44
|
-
setState({
|
|
45
|
-
status: "error",
|
|
46
|
-
message: `No registry address configured for ${chainName}.
|
|
47
|
-
Set ERC8004_REGISTRY_${chainName.toUpperCase()} env var to the contract address.`
|
|
48
|
-
});
|
|
49
|
-
exit(new Error("no registry address"));
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
try {
|
|
53
|
-
const client = createPublicClient({
|
|
54
|
-
chain,
|
|
55
|
-
transport: http()
|
|
56
|
-
});
|
|
57
|
-
const result = await client.readContract({
|
|
58
|
-
address: registryAddress,
|
|
59
|
-
abi: ERC8004_REGISTRY_ABI,
|
|
60
|
-
functionName: "agentOf",
|
|
61
|
-
args: [agentUri]
|
|
62
|
-
});
|
|
63
|
-
setState({
|
|
64
|
-
status: "done",
|
|
65
|
-
identity: {
|
|
66
|
-
owner: result[0],
|
|
67
|
-
tokenId: result[1],
|
|
68
|
-
agentUri: result[2],
|
|
69
|
-
chain: chainName,
|
|
70
|
-
registryAddress
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
exit();
|
|
74
|
-
} catch (err) {
|
|
75
|
-
setState({
|
|
76
|
-
status: "error",
|
|
77
|
-
message: `Registry read failed: ${err.message}`
|
|
78
|
-
});
|
|
79
|
-
exit(new Error("registry read failed"));
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
run();
|
|
83
|
-
}, [exit, chainName, agentUri]);
|
|
84
|
-
return /* @__PURE__ */ React.createElement(Box, { flexDirection: "column" }, state.status === "loading" && /* @__PURE__ */ React.createElement(Text, { color: "cyan" }, "Querying ERC-8004 registry\u2026"), state.status === "done" && /* @__PURE__ */ React.createElement(Box, { flexDirection: "column" }, /* @__PURE__ */ React.createElement(Text, { color: "green" }, "\u2705 Agent Identity (", state.identity.chain, ")"), /* @__PURE__ */ React.createElement(Text, null, " Agent URI: ", state.identity.agentUri), /* @__PURE__ */ React.createElement(Text, null, " Owner: ", state.identity.owner), /* @__PURE__ */ React.createElement(Text, null, " Token ID: ", state.identity.tokenId.toString()), /* @__PURE__ */ React.createElement(Text, null, " Registry: ", state.identity.registryAddress)), state.status === "error" && /* @__PURE__ */ React.createElement(Text, { color: "red" }, "\u274C ", state.message));
|
|
85
|
-
}
|
|
86
|
-
export {
|
|
87
|
-
args,
|
|
88
|
-
RegistryIdentity as default,
|
|
89
|
-
description,
|
|
90
|
-
options
|
|
91
|
-
};
|