@mycompbox/compbox-mcp 1.21.14 → 1.21.15

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/index.js +34 -16
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -457,7 +457,10 @@ function getModelDisplayName(id) {
457
457
  function isValidModelId(id) {
458
458
  return MODEL_CATALOG.some((m) => m.id === id);
459
459
  }
460
- var thinkingLevelValues, modelRecommendationSourceValues, MODEL_CATALOG;
460
+ function isConversationChatModel(value) {
461
+ return typeof value === "string" && CONVERSATION_CHAT_MODEL_IDS.includes(value);
462
+ }
463
+ var thinkingLevelValues, modelRecommendationSourceValues, MODEL_CATALOG, CONVERSATION_CHAT_MODELS, CONVERSATION_CHAT_MODEL_IDS, DEFAULT_CONVERSATION_CHAT_MODEL;
461
464
  var init_model_catalog = __esm({
462
465
  "../shared/dist/model-catalog.js"() {
463
466
  "use strict";
@@ -492,6 +495,14 @@ var init_model_catalog = __esm({
492
495
  costMultiplier: 7.5
493
496
  }
494
497
  ];
498
+ CONVERSATION_CHAT_MODELS = [
499
+ { id: "claude-haiku-5-5", label: "Haiku 5.5" },
500
+ { id: "claude-sonnet-5-5", label: "Sonnet 5.5" },
501
+ { id: "claude-opus-5-5", label: "Opus 5.5" },
502
+ { id: "claude-fable-5-1", label: "Fable 5.1" }
503
+ ];
504
+ CONVERSATION_CHAT_MODEL_IDS = CONVERSATION_CHAT_MODELS.map((m) => m.id);
505
+ DEFAULT_CONVERSATION_CHAT_MODEL = "claude-haiku-5-5";
495
506
  }
496
507
  });
497
508
 
@@ -1020,10 +1031,11 @@ async function runConversationStep(input, deps) {
1020
1031
  let createdHere = false;
1021
1032
  let qualityRounds = 0;
1022
1033
  let repairs = 0;
1034
+ let kind = "chat";
1023
1035
  for (; ; ) {
1024
1036
  let reply;
1025
1037
  try {
1026
- reply = await deps.reply(system, messages);
1038
+ reply = await deps.reply(system, messages, kind);
1027
1039
  } catch (error) {
1028
1040
  if (savedNow)
1029
1041
  return { kind: "saved", text: savedMessage(savedNow.saved, savedNow.created), ...savedNow };
@@ -1036,12 +1048,22 @@ Send another message (for example "try again") when you're ready and I'll pick u
1036
1048
  };
1037
1049
  }
1038
1050
  const draft = extractCompletionJson(reply);
1051
+ if (!draft && !looksLikeCompletionAttempt(reply)) {
1052
+ const text = reply.trim();
1053
+ if (savedNow) {
1054
+ return { kind: "saved", text: savedMessage(savedNow.saved, savedNow.created, text || void 0), ...savedNow };
1055
+ }
1056
+ if (!text)
1057
+ return { kind: "error", text: "I didn't get a reply that time. Send another message and I'll try again." };
1058
+ return { kind: "message", text };
1059
+ }
1039
1060
  if (draft) {
1040
1061
  if (lockReason) {
1041
1062
  const why = lockReason === "ownership" ? "Only the request's creator can change it, and I'm not its creator." : "That request is locked and can't be changed.";
1042
1063
  messages.push({ role: "assistant", content: reply }, { role: "user", content: `${why} Reply to me in plain text instead.` });
1043
1064
  if (++repairs > JSON_REPAIRS)
1044
1065
  return { kind: "error", text: lockedRequestMessage(lockReason) };
1066
+ kind = "repair";
1045
1067
  continue;
1046
1068
  }
1047
1069
  let saved;
@@ -1066,22 +1088,14 @@ Reply "try again" and I'll retry.` };
1066
1088
 
1067
1089
  The request IS already saved, and the person will be shown its score. If you ask them something, ask it as a way to improve the saved request; never say it hasn't been saved.`
1068
1090
  });
1091
+ kind = "save";
1069
1092
  continue;
1070
1093
  }
1071
- if (looksLikeCompletionAttempt(reply)) {
1072
- if (++repairs > JSON_REPAIRS) {
1073
- return savedNow ? { kind: "saved", text: savedMessage(savedNow.saved, savedNow.created), ...savedNow } : { kind: "error", text: `I had trouble writing up the request. Reply "try again" and I'll have another go.` };
1074
- }
1075
- messages.push({ role: "assistant", content: reply }, { role: "user", content: COMPLETION_REPAIR_INSTRUCTION });
1076
- continue;
1077
- }
1078
- const text = reply.trim();
1079
- if (savedNow) {
1080
- return { kind: "saved", text: savedMessage(savedNow.saved, savedNow.created, text || void 0), ...savedNow };
1094
+ if (++repairs > JSON_REPAIRS) {
1095
+ return savedNow ? { kind: "saved", text: savedMessage(savedNow.saved, savedNow.created), ...savedNow } : { kind: "error", text: `I had trouble writing up the request. Reply "try again" and I'll have another go.` };
1081
1096
  }
1082
- if (!text)
1083
- return { kind: "error", text: "I didn't get a reply that time. Send another message and I'll try again." };
1084
- return { kind: "message", text };
1097
+ messages.push({ role: "assistant", content: reply }, { role: "user", content: COMPLETION_REPAIR_INSTRUCTION });
1098
+ kind = "repair";
1085
1099
  }
1086
1100
  }
1087
1101
  function savedContextFromRecord(record, access) {
@@ -3004,8 +3018,11 @@ __export(dist_exports, {
3004
3018
  CLOUD_SQL_MONTHLY_ESTIMATE_USD: () => CLOUD_SQL_MONTHLY_ESTIMATE_USD,
3005
3019
  CLOUD_SQL_PROXY_VERSION: () => CLOUD_SQL_PROXY_VERSION,
3006
3020
  COMPLETION_REPAIR_INSTRUCTION: () => COMPLETION_REPAIR_INSTRUCTION,
3021
+ CONVERSATION_CHAT_MODELS: () => CONVERSATION_CHAT_MODELS,
3022
+ CONVERSATION_CHAT_MODEL_IDS: () => CONVERSATION_CHAT_MODEL_IDS,
3007
3023
  CONVERSATION_QUALITY_ROUNDS: () => CONVERSATION_QUALITY_ROUNDS,
3008
3024
  DATABASE_CHOICE_VALUES: () => DATABASE_CHOICE_VALUES,
3025
+ DEFAULT_CONVERSATION_CHAT_MODEL: () => DEFAULT_CONVERSATION_CHAT_MODEL,
3009
3026
  DESCRIPTION_MAX: () => DESCRIPTION_MAX,
3010
3027
  EMPTY_ARM_TEMPLATE: () => EMPTY_ARM_TEMPLATE,
3011
3028
  GCP_CONNECT_STEPS: () => GCP_CONNECT_STEPS,
@@ -3090,6 +3107,7 @@ __export(dist_exports, {
3090
3107
  isAzureLocation: () => isAzureLocation,
3091
3108
  isAzureResourceGroup: () => isAzureResourceGroup,
3092
3109
  isAzureStorageAccount: () => isAzureStorageAccount,
3110
+ isConversationChatModel: () => isConversationChatModel,
3093
3111
  isGcpProjectId: () => isGcpProjectId,
3094
3112
  isGcpProjectNumber: () => isGcpProjectNumber,
3095
3113
  isGcpRegion: () => isGcpRegion,
@@ -13418,7 +13436,7 @@ function withLegacyToolCallRewrite(transport) {
13418
13436
  var SERVER_NAME = "compbox-mcp";
13419
13437
  function resolveServerVersion() {
13420
13438
  if (true) {
13421
- return "1.21.14";
13439
+ return "1.21.15";
13422
13440
  }
13423
13441
  const require2 = createRequire(import.meta.url);
13424
13442
  for (const candidate of ["../package.json", "./package.json"]) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mycompbox/compbox-mcp",
3
- "version": "1.21.14",
3
+ "version": "1.21.15",
4
4
  "description": "CompBox MCP server - Uses HTTP API client (no direct database access)",
5
5
  "license": "MIT",
6
6
  "type": "module",