@anuma/agents-registry 1.0.0-next.20260518155402
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/LICENSE +21 -0
- package/dist/index.cjs +56 -0
- package/dist/index.d.mts +23 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.mjs +29 -0
- package/package.json +49 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 ZetaChain
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
getAgent: () => getAgent,
|
|
24
|
+
getAgentSkillMeta: () => getAgentSkillMeta,
|
|
25
|
+
listAgents: () => listAgents
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(index_exports);
|
|
28
|
+
var import_agent_haven = require("@anuma/agent-haven");
|
|
29
|
+
var import_agent_sentinel = require("@anuma/agent-sentinel");
|
|
30
|
+
var AGENTS = {
|
|
31
|
+
haven: import_agent_haven.havenAgent,
|
|
32
|
+
sentinel: import_agent_sentinel.sentinelAgent
|
|
33
|
+
};
|
|
34
|
+
function getAgent(agentId) {
|
|
35
|
+
return AGENTS[agentId.toLowerCase()] ?? null;
|
|
36
|
+
}
|
|
37
|
+
function listAgents() {
|
|
38
|
+
return Object.values(AGENTS);
|
|
39
|
+
}
|
|
40
|
+
function getAgentSkillMeta(agentId, skillId) {
|
|
41
|
+
const agent = getAgent(agentId);
|
|
42
|
+
const skill = agent?.skills.find((s) => s.id === skillId);
|
|
43
|
+
if (!skill) return null;
|
|
44
|
+
return {
|
|
45
|
+
id: skill.id,
|
|
46
|
+
name: skill.name,
|
|
47
|
+
requiredVariables: skill.requiredVariables ?? [],
|
|
48
|
+
smsPrompts: skill.smsPrompts
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
52
|
+
0 && (module.exports = {
|
|
53
|
+
getAgent,
|
|
54
|
+
getAgentSkillMeta,
|
|
55
|
+
listAgents
|
|
56
|
+
});
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { AgentConfig } from '@anuma/sdk';
|
|
2
|
+
|
|
3
|
+
/** Look up an agent by id. Case-insensitive. Returns null when unknown. */
|
|
4
|
+
declare function getAgent(agentId: string): AgentConfig | null;
|
|
5
|
+
/** All registered agents. Order is not guaranteed. */
|
|
6
|
+
declare function listAgents(): AgentConfig[];
|
|
7
|
+
/** Public-safe skill metadata returned by `getAgentSkillMeta`. */
|
|
8
|
+
interface SkillMeta {
|
|
9
|
+
id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
requiredVariables: string[];
|
|
12
|
+
/** SMS-friendly question prompts keyed by variable name, when available. */
|
|
13
|
+
smsPrompts?: Record<string, string>;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Look up skill metadata by (agentId, skillId). Returns null when either is
|
|
17
|
+
* unknown. Use this when you only need `id` / `name` / `requiredVariables`
|
|
18
|
+
* / `smsPrompts` — for the full SkillConfig (including templates), import
|
|
19
|
+
* the agent package directly.
|
|
20
|
+
*/
|
|
21
|
+
declare function getAgentSkillMeta(agentId: string, skillId: string): SkillMeta | null;
|
|
22
|
+
|
|
23
|
+
export { type SkillMeta, getAgent, getAgentSkillMeta, listAgents };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { AgentConfig } from '@anuma/sdk';
|
|
2
|
+
|
|
3
|
+
/** Look up an agent by id. Case-insensitive. Returns null when unknown. */
|
|
4
|
+
declare function getAgent(agentId: string): AgentConfig | null;
|
|
5
|
+
/** All registered agents. Order is not guaranteed. */
|
|
6
|
+
declare function listAgents(): AgentConfig[];
|
|
7
|
+
/** Public-safe skill metadata returned by `getAgentSkillMeta`. */
|
|
8
|
+
interface SkillMeta {
|
|
9
|
+
id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
requiredVariables: string[];
|
|
12
|
+
/** SMS-friendly question prompts keyed by variable name, when available. */
|
|
13
|
+
smsPrompts?: Record<string, string>;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Look up skill metadata by (agentId, skillId). Returns null when either is
|
|
17
|
+
* unknown. Use this when you only need `id` / `name` / `requiredVariables`
|
|
18
|
+
* / `smsPrompts` — for the full SkillConfig (including templates), import
|
|
19
|
+
* the agent package directly.
|
|
20
|
+
*/
|
|
21
|
+
declare function getAgentSkillMeta(agentId: string, skillId: string): SkillMeta | null;
|
|
22
|
+
|
|
23
|
+
export { type SkillMeta, getAgent, getAgentSkillMeta, listAgents };
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// src/index.ts
|
|
2
|
+
import { havenAgent } from "@anuma/agent-haven";
|
|
3
|
+
import { sentinelAgent } from "@anuma/agent-sentinel";
|
|
4
|
+
var AGENTS = {
|
|
5
|
+
haven: havenAgent,
|
|
6
|
+
sentinel: sentinelAgent
|
|
7
|
+
};
|
|
8
|
+
function getAgent(agentId) {
|
|
9
|
+
return AGENTS[agentId.toLowerCase()] ?? null;
|
|
10
|
+
}
|
|
11
|
+
function listAgents() {
|
|
12
|
+
return Object.values(AGENTS);
|
|
13
|
+
}
|
|
14
|
+
function getAgentSkillMeta(agentId, skillId) {
|
|
15
|
+
const agent = getAgent(agentId);
|
|
16
|
+
const skill = agent?.skills.find((s) => s.id === skillId);
|
|
17
|
+
if (!skill) return null;
|
|
18
|
+
return {
|
|
19
|
+
id: skill.id,
|
|
20
|
+
name: skill.name,
|
|
21
|
+
requiredVariables: skill.requiredVariables ?? [],
|
|
22
|
+
smsPrompts: skill.smsPrompts
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export {
|
|
26
|
+
getAgent,
|
|
27
|
+
getAgentSkillMeta,
|
|
28
|
+
listAgents
|
|
29
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@anuma/agents-registry",
|
|
3
|
+
"version": "1.0.0-next.20260518155402",
|
|
4
|
+
"description": "Lookup helpers for Anuma agents (Haven, Sentinel) and their skill metadata",
|
|
5
|
+
"main": "./dist/index.cjs",
|
|
6
|
+
"module": "./dist/index.mjs",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.mjs",
|
|
12
|
+
"require": "./dist/index.cjs",
|
|
13
|
+
"default": "./dist/index.cjs"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist"
|
|
18
|
+
],
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "git+https://github.com/anuma-ai/sdk.git",
|
|
22
|
+
"directory": "packages/agents/registry"
|
|
23
|
+
},
|
|
24
|
+
"license": "ISC",
|
|
25
|
+
"bugs": {
|
|
26
|
+
"url": "https://github.com/anuma-ai/sdk/issues"
|
|
27
|
+
},
|
|
28
|
+
"homepage": "https://github.com/anuma-ai/sdk#readme",
|
|
29
|
+
"publishConfig": {
|
|
30
|
+
"access": "public"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@anuma/agent-haven": "1.0.0-next.20260518155402",
|
|
34
|
+
"@anuma/agent-sentinel": "1.0.0-next.20260518155402"
|
|
35
|
+
},
|
|
36
|
+
"peerDependencies": {
|
|
37
|
+
"@anuma/sdk": "1.0.0-next.20260518155402"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"tsup": "^8.5.1",
|
|
41
|
+
"typescript": "^5.9.3",
|
|
42
|
+
"vitest": "^4.0.14",
|
|
43
|
+
"@anuma/sdk": "1.0.0-next.20260518155402"
|
|
44
|
+
},
|
|
45
|
+
"scripts": {
|
|
46
|
+
"build": "tsup",
|
|
47
|
+
"test": "vitest run"
|
|
48
|
+
}
|
|
49
|
+
}
|