@massa-ai/tools-api 1.43.0 → 1.44.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/dist/index.js +27 -3
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -181776,11 +181776,32 @@ function getRegistryHostDefaults() {
|
|
|
181776
181776
|
return;
|
|
181777
181777
|
}
|
|
181778
181778
|
}
|
|
181779
|
+
var _generatorLib = null;
|
|
181780
|
+
function generatorLib() {
|
|
181781
|
+
if (!_generatorLib) {
|
|
181782
|
+
const root2 = getDeploymentRoot();
|
|
181783
|
+
if (!root2) {
|
|
181784
|
+
throw new Error(deploymentUnavailableMessage("scripts/generate-subagent-artifacts.ts"));
|
|
181785
|
+
}
|
|
181786
|
+
const libPath = path39.join(root2, "scripts", "generate-subagent-artifacts.ts");
|
|
181787
|
+
_generatorLib = __require(libPath);
|
|
181788
|
+
}
|
|
181789
|
+
return _generatorLib;
|
|
181790
|
+
}
|
|
181791
|
+
async function loadAgentsInventory() {
|
|
181792
|
+
try {
|
|
181793
|
+
const gen = generatorLib();
|
|
181794
|
+
const charters = await gen.loadAllCharters();
|
|
181795
|
+
return { agents: charters.map((c) => ({ name: c.name, charterTier: c.modelTier })) };
|
|
181796
|
+
} catch (e) {
|
|
181797
|
+
return { agents: [], agentsError: e.message };
|
|
181798
|
+
}
|
|
181799
|
+
}
|
|
181779
181800
|
var REGISTRY_DETAIL = {
|
|
181780
181801
|
tags: ["model-registry"]
|
|
181781
181802
|
};
|
|
181782
181803
|
var OVERLAY_PATH = path39.join(configDir("massa-ai"), "model-profiles.json");
|
|
181783
|
-
var modelRegistryRoutes = new Elysia({ prefix: "/api/v1/model-registry" }).get("/", ({ set: set3 }) => {
|
|
181804
|
+
var modelRegistryRoutes = new Elysia({ prefix: "/api/v1/model-registry" }).get("/", async ({ set: set3 }) => {
|
|
181784
181805
|
const root2 = getDeploymentRoot();
|
|
181785
181806
|
if (!root2) {
|
|
181786
181807
|
set3.status = 501;
|
|
@@ -181788,6 +181809,7 @@ var modelRegistryRoutes = new Elysia({ prefix: "/api/v1/model-registry" }).get("
|
|
|
181788
181809
|
}
|
|
181789
181810
|
const lib = profilesLib();
|
|
181790
181811
|
const result = lib.loadEffectiveRegistry({ overlayPath: OVERLAY_PATH });
|
|
181812
|
+
const { agents, agentsError } = await loadAgentsInventory();
|
|
181791
181813
|
set3.status = 200;
|
|
181792
181814
|
return {
|
|
181793
181815
|
success: true,
|
|
@@ -181795,14 +181817,16 @@ var modelRegistryRoutes = new Elysia({ prefix: "/api/v1/model-registry" }).get("
|
|
|
181795
181817
|
registry: result.registry,
|
|
181796
181818
|
source: result.source,
|
|
181797
181819
|
overlayOverrideCount: result.overlayOverrideCount ?? 0,
|
|
181798
|
-
...result.overlayError ? { overlayError: result.overlayError } : {}
|
|
181820
|
+
...result.overlayError ? { overlayError: result.overlayError } : {},
|
|
181821
|
+
agents,
|
|
181822
|
+
...agentsError ? { agentsError } : {}
|
|
181799
181823
|
}
|
|
181800
181824
|
};
|
|
181801
181825
|
}, {
|
|
181802
181826
|
detail: {
|
|
181803
181827
|
...REGISTRY_DETAIL,
|
|
181804
181828
|
summary: "Get effective registry (builtin + overlay) with source attribution",
|
|
181805
|
-
description: "Returns the merged registry (builtin + overlay), source attribution (builtin, overlay, tombstoned), overlayOverrideCount (APCR-01.10 \u2014 count of overlay entries surviving normalization, so an operator can see how much of the registry their overlay is overriding),
|
|
181829
|
+
description: "Returns the merged registry (builtin + overlay), source attribution (builtin, overlay, tombstoned), overlayOverrideCount (APCR-01.10 \u2014 count of overlay entries surviving normalization, so an operator can see how much of the registry their overlay is overriding), overlayError if the overlay is corrupted, and agents (design D-3, APUX-03 \u2014 {name, charterTier} for every charter under skills/agents/, best-effort with agentsError on failure) (200 status, never fails)."
|
|
181806
181830
|
}
|
|
181807
181831
|
}).put("/", ({ body, set: set3 }) => {
|
|
181808
181832
|
const root2 = getDeploymentRoot();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@massa-ai/tools-api",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.44.0",
|
|
4
4
|
"author": "luizgmassa",
|
|
5
5
|
"description": "massa-ai REST API server - Semantic code search, memory, and context compression",
|
|
6
6
|
"type": "module",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"test": "bun scripts/run-tests-isolated.ts"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@massa-ai/core": "^1.
|
|
25
|
-
"@massa-ai/shared": "^1.
|
|
24
|
+
"@massa-ai/core": "^1.44.0",
|
|
25
|
+
"@massa-ai/shared": "^1.44.0",
|
|
26
26
|
"elysia": "^1.2.25",
|
|
27
27
|
"@elysiajs/swagger": "^1.2.0",
|
|
28
28
|
"@elysiajs/cors": "^1.2.0",
|