@sonenta/mcp 0.35.0 → 0.36.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.
@@ -16873,7 +16873,7 @@ async function unpack(res) {
16873
16873
  const text2 = await res.text().catch(() => "");
16874
16874
  let body = text2;
16875
16875
  try {
16876
- body = JSON.parse(text2);
16876
+ body = parse3(text2);
16877
16877
  } catch {
16878
16878
  }
16879
16879
  throw new SonentaApiError(res.status, body);
@@ -16909,7 +16909,14 @@ var init_client = __esm({
16909
16909
  const url = new URL(`${base}${path}`);
16910
16910
  if (params) {
16911
16911
  for (const [k, v] of Object.entries(params)) {
16912
- if (v !== void 0 && v !== null) url.searchParams.set(k, String(v));
16912
+ if (v === void 0 || v === null) continue;
16913
+ if (Array.isArray(v)) {
16914
+ for (const item of v) {
16915
+ if (item !== void 0 && item !== null) url.searchParams.append(k, String(item));
16916
+ }
16917
+ } else {
16918
+ url.searchParams.set(k, String(v));
16919
+ }
16913
16920
  }
16914
16921
  }
16915
16922
  return url.toString();
@@ -17053,6 +17060,7 @@ function pyRepr(v) {
17053
17060
  if (v === null || v === void 0) return "None";
17054
17061
  if (v === true) return "True";
17055
17062
  if (v === false) return "False";
17063
+ if (isLosslessNumber(v)) return v.toString();
17056
17064
  if (typeof v === "number") return String(v);
17057
17065
  if (typeof v === "string") {
17058
17066
  const esc2 = v.replace(/\\/g, "\\\\");
@@ -17079,6 +17087,7 @@ var ToolValidationError, ValueError;
17079
17087
  var init_errors3 = __esm({
17080
17088
  "src/errors.ts"() {
17081
17089
  "use strict";
17090
+ init_esm2();
17082
17091
  init_client();
17083
17092
  ToolValidationError = class extends Error {
17084
17093
  constructor(message) {
@@ -18207,6 +18216,17 @@ var init_schemas_generated = __esm({
18207
18216
  "minimum": 1,
18208
18217
  "maximum": 200,
18209
18218
  "default": 50
18219
+ },
18220
+ "name_prefix": {
18221
+ "type": "string",
18222
+ "description": 'Return only keys whose name starts with this prefix \u2014 a cheap scoped lookup (e.g. name_prefix="nav.").'
18223
+ },
18224
+ "key_uuids": {
18225
+ "type": "array",
18226
+ "items": {
18227
+ "type": "string"
18228
+ },
18229
+ "description": "Return only these specific keys, by UUID (repeated query param). Use for a cheap targeted fetch of a known set of keys."
18210
18230
  }
18211
18231
  },
18212
18232
  "additionalProperties": false
@@ -18289,7 +18309,7 @@ var init_schemas_generated = __esm({
18289
18309
  }
18290
18310
  },
18291
18311
  "list_source_duplicates": {
18292
- "description": "List groups of keys that SHARE an identical source-language value (Source Health duplicates, #1116). Each group = {source_value, key_count, key_names[], key_uuids[], status, note}. Duplicates inflate translation cost and drift (the same string translated N ways), so this is the worklist the sonenta-source-health agent repairs. Status is tracked PROJECT-WIDE per source_value: to_fix (needs attention; the default), allowed (intentional duplicate \u2014 listed+flagged but excluded from total_issues), resolved (already fixed \u2014 re-scan confirms). Filter by status to focus. When status=to_fix, a group may also carry a human-prepared `merge_plan` ({clusters: [{canonical_key_uuid, redundant_key_uuids[]}], survivor_outcome: allowed|differentiate}) authored in the dashboard \u2014 the consolidation an agent applies (merge each cluster onto its canonical key, then allow or differentiate whatever still shares the text). READ-ONLY.",
18312
+ "description": "List groups of keys that SHARE an identical source-language value (Source Health duplicates, #1116). PAGINATED: returns an envelope {items, total, offset, limit, has_more} \u2014 read `.items` (each group = {source_value, key_count, key_names[], key_uuids[], status, note}) and page with offset/limit (default 50, max 200) until has_more is false. Duplicates inflate translation cost and drift (the same string translated N ways), so this is the worklist the sonenta-source-health agent repairs. Status is tracked PROJECT-WIDE per source_value: neutral (UNTRIAGED \u2014 the default for a freshly-detected duplicate; this is the batch auto-diagnostic backlog), to_fix (triaged for fixing \u2014 carries a merge_plan to apply), allowed (intentional duplicate \u2014 listed+flagged but excluded from total_issues), resolved (already fixed \u2014 re-scan confirms). Filter by status to focus (e.g. status=neutral for the untriaged backlog). A to_fix group carries a human- or agent-prepared `merge_plan` ({clusters: [{canonical_key_uuid, redundant_key_uuids[]}], survivor_outcome: allowed|differentiate}) \u2014 the consolidation an agent applies (merge each cluster onto its canonical key, then allow or differentiate whatever still shares the text). READ-ONLY.",
18293
18313
  "inputSchema": {
18294
18314
  "type": "object",
18295
18315
  "properties": {
@@ -18300,15 +18320,29 @@ var init_schemas_generated = __esm({
18300
18320
  "status": {
18301
18321
  "type": "string",
18302
18322
  "enum": [
18303
- "to_fix",
18323
+ "neutral",
18304
18324
  "allowed",
18325
+ "to_fix",
18305
18326
  "resolved"
18306
18327
  ],
18307
- "description": "Filter to duplicate groups in this triage status. Omit for all."
18328
+ "description": "Filter to duplicate groups in this triage status: neutral (untriaged \u2014 the default), to_fix (triaged, carries a merge_plan), allowed (intentional), resolved (fixed). Omit for all."
18308
18329
  },
18309
18330
  "version_id": {
18310
18331
  "type": "string",
18311
18332
  "description": "Optional version UUID; defaults to the production version."
18333
+ },
18334
+ "offset": {
18335
+ "type": "integer",
18336
+ "minimum": 0,
18337
+ "default": 0,
18338
+ "description": "Pagination offset (0-based). Default 0."
18339
+ },
18340
+ "limit": {
18341
+ "type": "integer",
18342
+ "minimum": 1,
18343
+ "maximum": 200,
18344
+ "default": 50,
18345
+ "description": "Max groups per page (1..200). Default 50."
18312
18346
  }
18313
18347
  },
18314
18348
  "additionalProperties": false
@@ -19474,6 +19508,8 @@ var init_registry = __esm({
19474
19508
  namespace: args["namespace"],
19475
19509
  language_code: args["language_code"],
19476
19510
  status_filter: args["status_filter"],
19511
+ name_prefix: args["name_prefix"],
19512
+ key_uuids: Array.isArray(args["key_uuids"]) ? args["key_uuids"] : void 0,
19477
19513
  include_glossary_hints: truthy(args, "include_glossary_hints") ? "true" : void 0,
19478
19514
  cursor: args["cursor"],
19479
19515
  limit: args["limit"] ?? 50
@@ -19893,7 +19929,9 @@ var init_registry = __esm({
19893
19929
  const p = resolveProjectUuid(args, client);
19894
19930
  const params = {
19895
19931
  status: args["status"],
19896
- version_id: args["version_id"]
19932
+ version_id: args["version_id"],
19933
+ offset: args["offset"],
19934
+ limit: args["limit"]
19897
19935
  };
19898
19936
  return client.get(`/v1/mcp/projects/${p}/source-duplicates`, params);
19899
19937
  },