@mycompbox/compbox-mcp 1.21.14 → 1.21.16

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 +61 -17
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -113,7 +113,7 @@ function normalizeGitRemote(raw) {
113
113
  path4 = path4.replace(/^\/+/, "").replace(/\/+$/, "").replace(/\.git$/, "");
114
114
  return `https://${host}/${path4}`;
115
115
  }
116
- var MACHINE_STATUSES, JOB_TYPES, JOB_STATUSES, TERMINAL_JOB_STATUSES, TURN_ROLES, START_EXECUTION_KINDS, MIN_CLI_FOR_REPLY_RESUME;
116
+ var MACHINE_STATUSES, JOB_TYPES, JOB_STATUSES, TERMINAL_JOB_STATUSES, TURN_ROLES, CHECK_MODES, START_EXECUTION_KINDS, MIN_CLI_FOR_REPLY_RESUME;
117
117
  var init_mailbox = __esm({
118
118
  "../shared/dist/types/mailbox.js"() {
119
119
  "use strict";
@@ -137,6 +137,7 @@ var init_mailbox = __esm({
137
137
  ];
138
138
  TERMINAL_JOB_STATUSES = ["done", "failed", "cancelled"];
139
139
  TURN_ROLES = ["agent", "user"];
140
+ CHECK_MODES = ["every", "smart", "end"];
140
141
  START_EXECUTION_KINDS = ["plan", "orchestrate", "refine", "follow_up"];
141
142
  MIN_CLI_FOR_REPLY_RESUME = "1.21.10";
142
143
  }
@@ -447,6 +448,13 @@ var init_ai_providers = __esm({
447
448
  }
448
449
  });
449
450
 
451
+ // ../shared/dist/cloud-runs.js
452
+ var init_cloud_runs = __esm({
453
+ "../shared/dist/cloud-runs.js"() {
454
+ "use strict";
455
+ }
456
+ });
457
+
450
458
  // ../shared/dist/model-catalog.js
451
459
  function getModelById(id) {
452
460
  return MODEL_CATALOG.find((m) => m.id === id);
@@ -457,7 +465,10 @@ function getModelDisplayName(id) {
457
465
  function isValidModelId(id) {
458
466
  return MODEL_CATALOG.some((m) => m.id === id);
459
467
  }
460
- var thinkingLevelValues, modelRecommendationSourceValues, MODEL_CATALOG;
468
+ function isConversationChatModel(value) {
469
+ return typeof value === "string" && CONVERSATION_CHAT_MODEL_IDS.includes(value);
470
+ }
471
+ var thinkingLevelValues, modelRecommendationSourceValues, MODEL_CATALOG, CONVERSATION_CHAT_MODELS, CONVERSATION_CHAT_MODEL_IDS, DEFAULT_CONVERSATION_CHAT_MODEL;
461
472
  var init_model_catalog = __esm({
462
473
  "../shared/dist/model-catalog.js"() {
463
474
  "use strict";
@@ -492,6 +503,14 @@ var init_model_catalog = __esm({
492
503
  costMultiplier: 7.5
493
504
  }
494
505
  ];
506
+ CONVERSATION_CHAT_MODELS = [
507
+ { id: "claude-haiku-5-5", label: "Haiku 5.5" },
508
+ { id: "claude-sonnet-5-5", label: "Sonnet 5.5" },
509
+ { id: "claude-opus-5-5", label: "Opus 5.5" },
510
+ { id: "claude-fable-5-1", label: "Fable 5.1" }
511
+ ];
512
+ CONVERSATION_CHAT_MODEL_IDS = CONVERSATION_CHAT_MODELS.map((m) => m.id);
513
+ DEFAULT_CONVERSATION_CHAT_MODEL = "claude-haiku-5-5";
495
514
  }
496
515
  });
497
516
 
@@ -1020,10 +1039,11 @@ async function runConversationStep(input, deps) {
1020
1039
  let createdHere = false;
1021
1040
  let qualityRounds = 0;
1022
1041
  let repairs = 0;
1042
+ let kind = "chat";
1023
1043
  for (; ; ) {
1024
1044
  let reply;
1025
1045
  try {
1026
- reply = await deps.reply(system, messages);
1046
+ reply = await deps.reply(system, messages, kind);
1027
1047
  } catch (error) {
1028
1048
  if (savedNow)
1029
1049
  return { kind: "saved", text: savedMessage(savedNow.saved, savedNow.created), ...savedNow };
@@ -1036,12 +1056,22 @@ Send another message (for example "try again") when you're ready and I'll pick u
1036
1056
  };
1037
1057
  }
1038
1058
  const draft = extractCompletionJson(reply);
1059
+ if (!draft && !looksLikeCompletionAttempt(reply)) {
1060
+ const text = reply.trim();
1061
+ if (savedNow) {
1062
+ return { kind: "saved", text: savedMessage(savedNow.saved, savedNow.created, text || void 0), ...savedNow };
1063
+ }
1064
+ if (!text)
1065
+ return { kind: "error", text: "I didn't get a reply that time. Send another message and I'll try again." };
1066
+ return { kind: "message", text };
1067
+ }
1039
1068
  if (draft) {
1040
1069
  if (lockReason) {
1041
1070
  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
1071
  messages.push({ role: "assistant", content: reply }, { role: "user", content: `${why} Reply to me in plain text instead.` });
1043
1072
  if (++repairs > JSON_REPAIRS)
1044
1073
  return { kind: "error", text: lockedRequestMessage(lockReason) };
1074
+ kind = "repair";
1045
1075
  continue;
1046
1076
  }
1047
1077
  let saved;
@@ -1066,22 +1096,14 @@ Reply "try again" and I'll retry.` };
1066
1096
 
1067
1097
  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
1098
  });
1099
+ kind = "save";
1069
1100
  continue;
1070
1101
  }
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 };
1102
+ if (++repairs > JSON_REPAIRS) {
1103
+ 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
1104
  }
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 };
1105
+ messages.push({ role: "assistant", content: reply }, { role: "user", content: COMPLETION_REPAIR_INSTRUCTION });
1106
+ kind = "repair";
1085
1107
  }
1086
1108
  }
1087
1109
  function savedContextFromRecord(record, access) {
@@ -2420,6 +2442,20 @@ function githubRepoKey(remote) {
2420
2442
  return null;
2421
2443
  return `${owner}/${name}`.toLowerCase();
2422
2444
  }
2445
+ function canonicalRemoteKey(remote) {
2446
+ if (typeof remote !== "string")
2447
+ return null;
2448
+ const normalized = normalizeGitRemote(remote);
2449
+ if (normalized === "")
2450
+ return null;
2451
+ return normalized.toLowerCase();
2452
+ }
2453
+ function sameGitRemote(a, b) {
2454
+ const keyA = canonicalRemoteKey(a);
2455
+ if (keyA === null)
2456
+ return false;
2457
+ return keyA === canonicalRemoteKey(b);
2458
+ }
2423
2459
  var init_github_repo = __esm({
2424
2460
  "../shared/dist/github-repo.js"() {
2425
2461
  "use strict";
@@ -3001,11 +3037,15 @@ __export(dist_exports, {
3001
3037
  APPEND_DESCRIPTION_MAX: () => APPEND_DESCRIPTION_MAX,
3002
3038
  AWS_REGIONS: () => AWS_REGIONS,
3003
3039
  AZURE_DEPLOY_IDENTITY: () => AZURE_DEPLOY_IDENTITY,
3040
+ CHECK_MODES: () => CHECK_MODES,
3004
3041
  CLOUD_SQL_MONTHLY_ESTIMATE_USD: () => CLOUD_SQL_MONTHLY_ESTIMATE_USD,
3005
3042
  CLOUD_SQL_PROXY_VERSION: () => CLOUD_SQL_PROXY_VERSION,
3006
3043
  COMPLETION_REPAIR_INSTRUCTION: () => COMPLETION_REPAIR_INSTRUCTION,
3044
+ CONVERSATION_CHAT_MODELS: () => CONVERSATION_CHAT_MODELS,
3045
+ CONVERSATION_CHAT_MODEL_IDS: () => CONVERSATION_CHAT_MODEL_IDS,
3007
3046
  CONVERSATION_QUALITY_ROUNDS: () => CONVERSATION_QUALITY_ROUNDS,
3008
3047
  DATABASE_CHOICE_VALUES: () => DATABASE_CHOICE_VALUES,
3048
+ DEFAULT_CONVERSATION_CHAT_MODEL: () => DEFAULT_CONVERSATION_CHAT_MODEL,
3009
3049
  DESCRIPTION_MAX: () => DESCRIPTION_MAX,
3010
3050
  EMPTY_ARM_TEMPLATE: () => EMPTY_ARM_TEMPLATE,
3011
3051
  GCP_CONNECT_STEPS: () => GCP_CONNECT_STEPS,
@@ -3059,6 +3099,7 @@ __export(dist_exports, {
3059
3099
  buildGcpSetupScript: () => buildGcpSetupScript,
3060
3100
  buildInterviewSystemPrompt: () => buildInterviewSystemPrompt,
3061
3101
  buildStackFiles: () => buildStackFiles,
3102
+ canonicalRemoteKey: () => canonicalRemoteKey,
3062
3103
  cloudRunUrl: () => cloudRunUrl,
3063
3104
  cloudSqlInstanceName: () => cloudSqlInstanceName,
3064
3105
  compareMachineVersions: () => compareMachineVersions,
@@ -3090,6 +3131,7 @@ __export(dist_exports, {
3090
3131
  isAzureLocation: () => isAzureLocation,
3091
3132
  isAzureResourceGroup: () => isAzureResourceGroup,
3092
3133
  isAzureStorageAccount: () => isAzureStorageAccount,
3134
+ isConversationChatModel: () => isConversationChatModel,
3093
3135
  isGcpProjectId: () => isGcpProjectId,
3094
3136
  isGcpProjectNumber: () => isGcpProjectNumber,
3095
3137
  isGcpRegion: () => isGcpRegion,
@@ -3141,6 +3183,7 @@ __export(dist_exports, {
3141
3183
  runStateSchema: () => runStateSchema,
3142
3184
  safeReturnTo: () => safeReturnTo,
3143
3185
  safeValidateSkillPackManifest: () => safeValidateSkillPackManifest,
3186
+ sameGitRemote: () => sameGitRemote,
3144
3187
  savedContextFromRecord: () => savedContextFromRecord,
3145
3188
  savedMessage: () => savedMessage,
3146
3189
  shannonEntropy: () => shannonEntropy,
@@ -3166,6 +3209,7 @@ var init_dist = __esm({
3166
3209
  init_utils();
3167
3210
  init_skill_packs();
3168
3211
  init_ai_providers();
3212
+ init_cloud_runs();
3169
3213
  init_model_catalog();
3170
3214
  init_pxpipe();
3171
3215
  init_interview_definition();
@@ -13418,7 +13462,7 @@ function withLegacyToolCallRewrite(transport) {
13418
13462
  var SERVER_NAME = "compbox-mcp";
13419
13463
  function resolveServerVersion() {
13420
13464
  if (true) {
13421
- return "1.21.14";
13465
+ return "1.21.16";
13422
13466
  }
13423
13467
  const require2 = createRequire(import.meta.url);
13424
13468
  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.16",
4
4
  "description": "CompBox MCP server - Uses HTTP API client (no direct database access)",
5
5
  "license": "MIT",
6
6
  "type": "module",