@massa-ai/tools-api 1.51.0 → 1.52.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.
Files changed (2) hide show
  1. package/dist/index.js +19 -9
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -181998,8 +181998,8 @@ function buildStaticDirCandidates(moduleDir, cwd) {
181998
181998
  for (const root2 of [moduleDir, cwd]) {
181999
181999
  let dir = root2;
182000
182000
  for (let i = 0;i < 10; i++) {
182001
- candidates2.push(path39.resolve(dir, "apps/web-ui/src/static"));
182002
- candidates2.push(path39.resolve(dir, "web-ui/src/static"));
182001
+ candidates2.push(path39.resolve(dir, "apps/web-ui/dist/static"));
182002
+ candidates2.push(path39.resolve(dir, "web-ui/dist/static"));
182003
182003
  const parent = path39.dirname(dir);
182004
182004
  if (parent === dir)
182005
182005
  break;
@@ -182352,6 +182352,13 @@ var REGISTRY_DETAIL = {
182352
182352
  tags: ["model-registry"]
182353
182353
  };
182354
182354
  var OVERLAY_PATH = path41.join(configDir("massa-ai"), "model-profiles.json");
182355
+ var ZERO_OVERLAY_OVERRIDE_BREAKDOWN = {
182356
+ hostDefaults: 0,
182357
+ workflowTiers: 0,
182358
+ agentTiers: 0,
182359
+ tiers: 0,
182360
+ profiles: 0
182361
+ };
182355
182362
  var modelRegistryRoutes = new Elysia({ prefix: "/api/v1/model-registry" }).get("/", async ({ set: set3 }) => {
182356
182363
  const root2 = getDeploymentRoot();
182357
182364
  if (!root2) {
@@ -182368,6 +182375,7 @@ var modelRegistryRoutes = new Elysia({ prefix: "/api/v1/model-registry" }).get("
182368
182375
  registry: result.registry,
182369
182376
  source: result.source,
182370
182377
  overlayOverrideCount: result.overlayOverrideCount ?? 0,
182378
+ overlayOverrideBreakdown: result.overlayOverrideBreakdown ?? ZERO_OVERLAY_OVERRIDE_BREAKDOWN,
182371
182379
  ...result.overlayError ? { overlayError: result.overlayError } : {},
182372
182380
  agents,
182373
182381
  ...agentsError ? { agentsError } : {}
@@ -182377,7 +182385,7 @@ var modelRegistryRoutes = new Elysia({ prefix: "/api/v1/model-registry" }).get("
182377
182385
  detail: {
182378
182386
  ...REGISTRY_DETAIL,
182379
182387
  summary: "Get effective registry (builtin + overlay) with source attribution",
182380
- 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)."
182388
+ 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), overlayOverrideBreakdown (WUT-17 \u2014 the same count broken down per category: hostDefaults, workflowTiers, agentTiers, tiers, profiles), 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)."
182381
182389
  }
182382
182390
  }).put("/", ({ body, set: set3 }) => {
182383
182391
  const root2 = getDeploymentRoot();
@@ -182418,7 +182426,8 @@ var modelRegistryRoutes = new Elysia({ prefix: "/api/v1/model-registry" }).get("
182418
182426
  data: {
182419
182427
  registry: result.registry,
182420
182428
  source: result.source,
182421
- overlayOverrideCount: result.overlayOverrideCount ?? 0
182429
+ overlayOverrideCount: result.overlayOverrideCount ?? 0,
182430
+ overlayOverrideBreakdown: result.overlayOverrideBreakdown ?? ZERO_OVERLAY_OVERRIDE_BREAKDOWN
182422
182431
  }
182423
182432
  };
182424
182433
  }, {
@@ -182426,7 +182435,7 @@ var modelRegistryRoutes = new Elysia({ prefix: "/api/v1/model-registry" }).get("
182426
182435
  detail: {
182427
182436
  ...REGISTRY_DETAIL,
182428
182437
  summary: "Write overlay (full-replace, validated, atomic)",
182429
- description: "Accepts the full overlay object. Validates the merged result (builtin + overlay) via validateRegistry(). On success, writes atomically to ~/.config/massa-ai/model-profiles.json and returns the updated effective registry, including overlayOverrideCount (APCR-01.10). On failure, returns 400 with all violations."
182438
+ description: "Accepts the full overlay object. Validates the merged result (builtin + overlay) via validateRegistry(). On success, writes atomically to ~/.config/massa-ai/model-profiles.json and returns the updated effective registry, including overlayOverrideCount (APCR-01.10) and overlayOverrideBreakdown (WUT-17, per-category). On failure, returns 400 with all violations."
182430
182439
  }
182431
182440
  }).post("/regenerate", ({ set: set3 }) => {
182432
182441
  const root2 = getDeploymentRoot();
@@ -182631,16 +182640,17 @@ var configRoutes = new Elysia({ prefix: "/api/v1/config" }).get("/", ({ set: set
182631
182640
  const config3 = loadConfig();
182632
182641
  const masked = maskSensitive(config3);
182633
182642
  const restart = restartNeededSections(config3);
182643
+ const defaults2 = maskSensitive(defaultMassaAiConfig);
182634
182644
  set3.status = 200;
182635
182645
  return {
182636
182646
  success: true,
182637
- data: { config: masked, restartNeededSections: restart }
182647
+ data: { config: masked, restartNeededSections: restart, defaults: defaults2 }
182638
182648
  };
182639
182649
  }, {
182640
182650
  detail: {
182641
182651
  ...CONFIG_DETAIL,
182642
182652
  summary: "Get current config with sensitive fields masked",
182643
- description: "Returns the current config.json with security.apiKey, llm.apiKey, embedding.apiKey, and database.url masked to '***'. Includes restartNeededSections \u2014 the subset of [database, embedding, llm, security] present in the config."
182653
+ description: "Returns the current config.json with security.apiKey, llm.apiKey, embedding.apiKey, and database.url masked to '***'. Includes restartNeededSections \u2014 the subset of [database, embedding, llm, security] present in the config \u2014 and defaults, the shipped default config (also masked) the Config tab falls back to for any field the persisted file omits."
182644
182654
  }
182645
182655
  }).get("/reveal", ({ query, set: set3 }) => {
182646
182656
  const section = query.section;
@@ -183346,8 +183356,8 @@ var logsRoutes = new Elysia({ prefix: "/api/v1/logs" }).get("/", ({ query, set:
183346
183356
  }, {
183347
183357
  detail: {
183348
183358
  ...LOGS_DETAIL,
183349
- summary: "SSE tail of newly buffered log entries",
183350
- description: "Server-Sent Events stream emitting `data: <LogEntry JSON>` for every entry subsequently pushed into the in-process ring buffer, plus `: heartbeat` comments. Same heartbeat and max-duration auto-close behavior as GET /api/v1/events. Scoped to this server process \u2014 a separate range query over the file sink may contain entries this stream never showed (e.g. from the stdio MCP server)."
183359
+ summary: "SSE tail of newly appended log entries",
183360
+ description: "Server-Sent Events stream emitting `data: <LogEntry JSON>` for every entry subsequently appended, plus `: heartbeat` comments. Same heartbeat and max-duration auto-close behavior as GET /api/v1/events. Tails the shared file sink when one is readable \u2014 matching every massa-ai process, including the stdio MCP server, the same scope as GET /api/v1/logs \u2014 and falls back to the in-process ring buffer, scoped to this server process only, when no sink file is readable."
183351
183361
  }
183352
183362
  });
183353
183363
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@massa-ai/tools-api",
3
- "version": "1.51.0",
3
+ "version": "1.52.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.51.0",
25
- "@massa-ai/shared": "^1.51.0",
24
+ "@massa-ai/core": "^1.52.0",
25
+ "@massa-ai/shared": "^1.52.0",
26
26
  "elysia": "^1.2.25",
27
27
  "@elysiajs/swagger": "^1.2.0",
28
28
  "@elysiajs/cors": "^1.2.0",