@mycompbox/compbox-mcp 1.21.8 → 1.21.10

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 +625 -22
  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;
116
+ var MACHINE_STATUSES, JOB_TYPES, JOB_STATUSES, TERMINAL_JOB_STATUSES, TURN_ROLES, 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";
@@ -129,6 +129,7 @@ var init_mailbox = __esm({
129
129
  "claimed",
130
130
  "running",
131
131
  "awaiting_input",
132
+ "waiting",
132
133
  "cancelling",
133
134
  "done",
134
135
  "failed",
@@ -137,6 +138,7 @@ var init_mailbox = __esm({
137
138
  TERMINAL_JOB_STATUSES = ["done", "failed", "cancelled"];
138
139
  TURN_ROLES = ["agent", "user"];
139
140
  START_EXECUTION_KINDS = ["plan", "orchestrate", "refine"];
141
+ MIN_CLI_FOR_REPLY_RESUME = "1.21.10";
140
142
  }
141
143
  });
142
144
 
@@ -1157,6 +1159,10 @@ function gcpServiceAccountEmail(projectId) {
1157
1159
  function gcpWorkloadProvider(projectNumber) {
1158
1160
  return `projects/${projectNumber}/locations/global/workloadIdentityPools/${GCP_IDENTITY_POOL}/providers/${GCP_IDENTITY_PROVIDER}`;
1159
1161
  }
1162
+ function gcpAttributeCondition(githubOwners) {
1163
+ const owners = [...new Set(githubOwners)];
1164
+ return `assertion.repository_owner in [${owners.map((o) => `'${o}'`).join(", ")}]`;
1165
+ }
1160
1166
  function gcpStateBucket(projectId) {
1161
1167
  return `${projectId}-compbox-tfstate`;
1162
1168
  }
@@ -1172,7 +1178,7 @@ function buildGcpSetupScript(input) {
1172
1178
  throw new Error(`Not a GitHub account name: ${owner}`);
1173
1179
  }
1174
1180
  const owners = [...new Set(input.githubOwners)];
1175
- const condition = `assertion.repository_owner in [${owners.map((o) => `'${o}'`).join(", ")}]`;
1181
+ const condition = gcpAttributeCondition(owners);
1176
1182
  const pool = `--location=global --workload-identity-pool=${GCP_IDENTITY_POOL}`;
1177
1183
  const oidc = [
1178
1184
  "--issuer-uri=https://token.actions.githubusercontent.com",
@@ -1711,6 +1717,12 @@ function stackEnvironments(tier) {
1711
1717
  function deployRunTitle(environment) {
1712
1718
  return `Deploy to ${environment}`;
1713
1719
  }
1720
+ function teardownRunTitle(environment) {
1721
+ return `Tear down ${environment}`;
1722
+ }
1723
+ function teardownConfirmation(app, environment) {
1724
+ return `${app}-${environment}`;
1725
+ }
1714
1726
  function cloudRunUrl(service, projectNumber, region) {
1715
1727
  return `https://${service}-${projectNumber}.${region}.run.app`;
1716
1728
  }
@@ -1726,8 +1738,8 @@ function cloudSqlInstanceName(app, environment) {
1726
1738
  function databaseSecretName(app, environment, database) {
1727
1739
  return `${app}-${environment}-${database === "cloudsql" ? "cloudsql-url" : "database-url"}`;
1728
1740
  }
1729
- function envSettings(env) {
1730
- return env === "prod" ? { min: 0, max: 10 } : { min: 0, max: 2 };
1741
+ function stackEnvSettings(tier) {
1742
+ return stackEnvironments(tier).map((environment) => environment === "prod" ? { environment, minInstances: 0, maxInstances: 10 } : { environment, minInstances: 0, maxInstances: 2 });
1731
1743
  }
1732
1744
  function buildStackFiles(input) {
1733
1745
  const { tier, app, defaultBranch, cloud } = input;
@@ -1742,6 +1754,16 @@ function buildStackFiles(input) {
1742
1754
  const envs = stackEnvironments(tier);
1743
1755
  const registry = `${cloud.region}-docker.pkg.dev/${cloud.projectId}/${app}`;
1744
1756
  const files = [];
1757
+ const stateBucket = gcpStateBucket(cloud.projectId);
1758
+ const cloudSetupSteps = ` - uses: google-github-actions/auth@v2
1759
+ with:
1760
+ workload_identity_provider: ${cloud.workloadProvider}
1761
+ service_account: ${cloud.serviceAccountEmail}
1762
+
1763
+ - uses: google-github-actions/setup-gcloud@v2
1764
+
1765
+ - uses: hashicorp/setup-terraform@v3`;
1766
+ const terraformInit = `terraform init -input=false -backend-config="bucket=$STATE_BUCKET" -backend-config="prefix=$APP/$ENVIRONMENT"`;
1745
1767
  files.push({
1746
1768
  path: "infra/versions.tf",
1747
1769
  content: `# Managed by CompBox. Changes here are applied on the next deploy.
@@ -1948,16 +1970,16 @@ output "database_instance" {
1948
1970
  `
1949
1971
  });
1950
1972
  }
1951
- for (const env of envs) {
1952
- const s = envSettings(env);
1973
+ for (const s of stackEnvSettings(tier)) {
1974
+ const env = s.environment;
1953
1975
  files.push({
1954
1976
  path: `infra/envs/${env}.tfvars`,
1955
1977
  content: `project_id = "${cloud.projectId}"
1956
1978
  region = "${cloud.region}"
1957
1979
  app = "${app}"
1958
1980
  environment = "${env}"
1959
- min_instances = ${String(s.min)}
1960
- max_instances = ${String(s.max)}
1981
+ min_instances = ${String(s.minInstances)}
1982
+ max_instances = ${String(s.maxInstances)}
1961
1983
  `
1962
1984
  });
1963
1985
  }
@@ -2025,7 +2047,7 @@ env:
2025
2047
  REGION: ${cloud.region}
2026
2048
  APP: ${app}
2027
2049
  IMAGE: ${registry}/app:\${{ github.sha }}
2028
- STATE_BUCKET: ${gcpStateBucket(cloud.projectId)}
2050
+ STATE_BUCKET: ${stateBucket}
2029
2051
 
2030
2052
  jobs:
2031
2053
  build:
@@ -2038,19 +2060,12 @@ jobs:
2038
2060
  steps:
2039
2061
  - uses: actions/checkout@v4
2040
2062
 
2041
- - uses: google-github-actions/auth@v2
2042
- with:
2043
- workload_identity_provider: ${cloud.workloadProvider}
2044
- service_account: ${cloud.serviceAccountEmail}
2045
-
2046
- - uses: google-github-actions/setup-gcloud@v2
2047
-
2048
- - uses: hashicorp/setup-terraform@v3
2063
+ ${cloudSetupSteps}
2049
2064
 
2050
2065
  - name: Infrastructure
2051
2066
  working-directory: infra
2052
2067
  run: |
2053
- terraform init -input=false -backend-config="bucket=$STATE_BUCKET" -backend-config="prefix=$APP/$ENVIRONMENT"
2068
+ ${terraformInit}
2054
2069
  terraform apply -input=false -auto-approve -var-file="envs/$ENVIRONMENT.tfvars"
2055
2070
 
2056
2071
  ${cloudSql ? ` - name: Database secret
@@ -2176,6 +2191,85 @@ ${cloudSql ? ` - name: Database secret
2176
2191
  echo "### Live at $URL" >> "$GITHUB_STEP_SUMMARY"
2177
2192
  `
2178
2193
  });
2194
+ if (tier === "full") {
2195
+ files.push({
2196
+ path: `.github/workflows/${TEARDOWN_WORKFLOW}`,
2197
+ content: `# Managed by CompBox. Destroys stage or prod; dev is never torn down here.
2198
+ # Start it from CompBox, or Actions \u2192 CompBox teardown \u2192 Run workflow and type "${app}-<environment>".
2199
+ name: CompBox teardown
2200
+ run-name: Tear down \${{ inputs.environment }}
2201
+
2202
+ on:
2203
+ workflow_dispatch:
2204
+ inputs:
2205
+ environment:
2206
+ description: What to tear down
2207
+ type: choice
2208
+ options:
2209
+ ${TEARDOWN_ENVIRONMENTS.map((e) => ` - ${e}`).join("\n")}
2210
+ confirm:
2211
+ description: Type ${app}-<environment> to confirm
2212
+ type: string
2213
+ required: true
2214
+
2215
+ permissions:
2216
+ contents: read
2217
+ id-token: write
2218
+
2219
+ concurrency:
2220
+ group: compbox-\${{ inputs.environment }}
2221
+ cancel-in-progress: false
2222
+
2223
+ jobs:
2224
+ teardown:
2225
+ runs-on: ubuntu-latest
2226
+ environment:
2227
+ name: \${{ inputs.environment }}
2228
+ env:
2229
+ ENVIRONMENT: \${{ inputs.environment }}
2230
+ CONFIRM: \${{ inputs.confirm }}
2231
+ APP: ${app}
2232
+ STATE_BUCKET: ${stateBucket}
2233
+ steps:
2234
+ - name: Confirm
2235
+ run: |
2236
+ case "$ENVIRONMENT" in
2237
+ stage|prod) ;;
2238
+ *) echo "::error::Only stage and prod can be torn down."; exit 1 ;;
2239
+ esac
2240
+ if [ "$CONFIRM" != "$APP-$ENVIRONMENT" ]; then
2241
+ echo "::error::Type $APP-$ENVIRONMENT to confirm the teardown."
2242
+ exit 1
2243
+ fi
2244
+
2245
+ - uses: actions/checkout@v4
2246
+
2247
+ ${cloudSetupSteps}
2248
+
2249
+ - name: Init
2250
+ working-directory: infra
2251
+ run: ${terraformInit}
2252
+
2253
+ # main.tf keeps prod's service protected; a Terraform override file
2254
+ # (created only on the runner, never committed) lifts that for this run.
2255
+ - name: Turn off deletion protection
2256
+ if: inputs.environment == 'prod'
2257
+ working-directory: infra
2258
+ run: |
2259
+ printf '%s\\n' 'resource "google_cloud_run_v2_service" "app" {' ' deletion_protection = false' '}' > compbox_teardown_override.tf
2260
+ terraform apply -input=false -auto-approve -var-file="envs/$ENVIRONMENT.tfvars" -target=google_cloud_run_v2_service.app
2261
+
2262
+ - name: Destroy
2263
+ working-directory: infra
2264
+ run: terraform destroy -input=false -auto-approve -var-file="envs/$ENVIRONMENT.tfvars"
2265
+
2266
+ - name: Remove state
2267
+ run: |
2268
+ gcloud storage rm -r "gs://$STATE_BUCKET/$APP/$ENVIRONMENT"
2269
+ echo "### $APP-$ENVIRONMENT torn down" >> "$GITHUB_STEP_SUMMARY"
2270
+ `
2271
+ });
2272
+ }
2179
2273
  files.push({
2180
2274
  path: "infra/README.md",
2181
2275
  content: `# Infrastructure (managed by CompBox)
@@ -2191,7 +2285,7 @@ This project deploys to Google Cloud project \`${cloud.projectId}\` (${cloud.reg
2191
2285
  });
2192
2286
  return files;
2193
2287
  }
2194
- var STACK_TIERS, STACK_WORKFLOW, CLOUD_SQL_PROXY_VERSION, APP, BRANCH;
2288
+ var STACK_TIERS, STACK_WORKFLOW, TEARDOWN_WORKFLOW, TEARDOWN_ENVIRONMENTS, CLOUD_SQL_PROXY_VERSION, APP, BRANCH;
2195
2289
  var init_stack_files = __esm({
2196
2290
  "../shared/dist/stack-files.js"() {
2197
2291
  "use strict";
@@ -2201,12 +2295,102 @@ var init_stack_files = __esm({
2201
2295
  full: { label: "Dev, stage and prod", environments: ["dev", "stage", "prod"] }
2202
2296
  };
2203
2297
  STACK_WORKFLOW = "compbox.yml";
2298
+ TEARDOWN_WORKFLOW = "compbox-teardown.yml";
2299
+ TEARDOWN_ENVIRONMENTS = ["stage", "prod"];
2204
2300
  CLOUD_SQL_PROXY_VERSION = "v2.14.1";
2205
2301
  APP = /^[a-z][a-z0-9-]{1,19}$/;
2206
2302
  BRANCH = /^[A-Za-z0-9._/-]{1,200}$/;
2207
2303
  }
2208
2304
  });
2209
2305
 
2306
+ // ../shared/dist/stack-cost.js
2307
+ function lowUsage() {
2308
+ const busySeconds = LOW_REQUESTS * LOW_REQUEST_SECONDS;
2309
+ return {
2310
+ vcpuSeconds: busySeconds * INSTANCE_VCPU,
2311
+ gibSeconds: busySeconds * INSTANCE_GIB,
2312
+ requests: LOW_REQUESTS,
2313
+ imagesGb: LOW_IMAGES_GB
2314
+ };
2315
+ }
2316
+ function highUsage(maxInstances) {
2317
+ const busySeconds = maxInstances * MONTH_SECONDS * HIGH_BUSY_SHARE;
2318
+ return {
2319
+ vcpuSeconds: busySeconds * INSTANCE_VCPU,
2320
+ gibSeconds: busySeconds * INSTANCE_GIB,
2321
+ requests: busySeconds * HIGH_REQUESTS_PER_SECOND,
2322
+ imagesGb: HIGH_IMAGES_GB
2323
+ };
2324
+ }
2325
+ function cost(usage, free, p) {
2326
+ const take = (key) => {
2327
+ const covered = Math.min(usage[key], free[key]);
2328
+ free[key] -= covered;
2329
+ return usage[key] - covered;
2330
+ };
2331
+ return take("vcpuSeconds") * p.cloudRunVcpuSecond + take("gibSeconds") * p.cloudRunGibSecond + take("requests") / 1e6 * p.cloudRunPerMillionRequests + usage.imagesGb * p.artifactRegistryGbMonth + STATE_GB * p.storageGbMonth;
2332
+ }
2333
+ function estimateStackCost(tier, cloud) {
2334
+ if (cloud.provider !== "gcp")
2335
+ return null;
2336
+ const p = STACK_PRICING.gcp;
2337
+ const settings = stackEnvSettings(tier);
2338
+ const lowFree = { ...p.freeTier };
2339
+ const highFree = { ...p.freeTier };
2340
+ const environments = settings.map((s) => ({
2341
+ environment: s.environment,
2342
+ low: Math.round(cost(lowUsage(), lowFree, p)),
2343
+ high: Math.round(cost(highUsage(s.maxInstances), highFree, p))
2344
+ }));
2345
+ const total = environments.reduce((t, e) => ({ low: t.low + e.low, high: t.high + e.high }), { low: 0, high: 0 });
2346
+ const busyHours = Math.round(MONTH_SECONDS * HIGH_BUSY_SHARE / 3600);
2347
+ return {
2348
+ currency: p.currency,
2349
+ pricesAsOf: p.pricesAsOf,
2350
+ calculatorUrl: p.calculatorUrl,
2351
+ environments,
2352
+ total,
2353
+ assumptions: [
2354
+ `List prices for Google Cloud as of ${p.pricesAsOf}, for a Tier 1 region; ${cloud.region} may cost more if it is a Tier 2 region.`,
2355
+ `Each instance has ${String(INSTANCE_VCPU)} vCPU and ${String(INSTANCE_GIB * 1024)} MiB of memory and is billed only while handling requests.`,
2356
+ `Low: light traffic \u2014 about ${LOW_REQUESTS.toLocaleString("en-US")} requests a month per environment, ${String(LOW_REQUEST_SECONDS * 1e3)} ms each; the app scales to zero when idle.`,
2357
+ `High: every allowed instance (${settings.map((s) => `${s.environment} ${String(s.maxInstances)}`).join(", ")}) busy for ${String(HIGH_BUSY_SHARE * 100)}% of the month (about ${String(busyHours)} hours), serving ${String(HIGH_REQUESTS_PER_SECOND)} requests a second each.`,
2358
+ `Google's monthly free tier (${p.freeTier.vcpuSeconds.toLocaleString("en-US")} vCPU-seconds, ${p.freeTier.gibSeconds.toLocaleString("en-US")} GiB-seconds, ${(p.freeTier.requests / 1e6).toLocaleString("en-US")} million requests) is counted once for the whole stack.`,
2359
+ `Includes ${String(LOW_IMAGES_GB)}\u2013${String(HIGH_IMAGES_GB)} GB of stored container images per environment; databases, networking and other services you add are not included.`
2360
+ ]
2361
+ };
2362
+ }
2363
+ var STACK_PRICING, INSTANCE_VCPU, INSTANCE_GIB, MONTH_SECONDS, LOW_REQUESTS, LOW_REQUEST_SECONDS, LOW_IMAGES_GB, HIGH_BUSY_SHARE, HIGH_REQUESTS_PER_SECOND, HIGH_IMAGES_GB, STATE_GB;
2364
+ var init_stack_cost = __esm({
2365
+ "../shared/dist/stack-cost.js"() {
2366
+ "use strict";
2367
+ init_stack_files();
2368
+ STACK_PRICING = {
2369
+ gcp: {
2370
+ pricesAsOf: "2026-05-11",
2371
+ calculatorUrl: "https://cloud.google.com/products/calculator",
2372
+ currency: "USD",
2373
+ cloudRunVcpuSecond: 24e-6,
2374
+ cloudRunGibSecond: 25e-7,
2375
+ cloudRunPerMillionRequests: 0.4,
2376
+ freeTier: { vcpuSeconds: 18e4, gibSeconds: 36e4, requests: 2e6 },
2377
+ artifactRegistryGbMonth: 0.1,
2378
+ storageGbMonth: 0.02
2379
+ }
2380
+ };
2381
+ INSTANCE_VCPU = 1;
2382
+ INSTANCE_GIB = 0.5;
2383
+ MONTH_SECONDS = 30 * 24 * 60 * 60;
2384
+ LOW_REQUESTS = 1e4;
2385
+ LOW_REQUEST_SECONDS = 0.2;
2386
+ LOW_IMAGES_GB = 0.5;
2387
+ HIGH_BUSY_SHARE = 0.25;
2388
+ HIGH_REQUESTS_PER_SECOND = 20;
2389
+ HIGH_IMAGES_GB = 2;
2390
+ STATE_GB = 0.01;
2391
+ }
2392
+ });
2393
+
2210
2394
  // ../shared/dist/github-repo.js
2211
2395
  function githubRepoKey(remote) {
2212
2396
  if (typeof remote !== "string")
@@ -2264,6 +2448,388 @@ var init_return_to = __esm({
2264
2448
  }
2265
2449
  });
2266
2450
 
2451
+ // ../shared/dist/machineVersion.js
2452
+ function currentEnv2(env) {
2453
+ if (env)
2454
+ return env;
2455
+ return typeof process !== "undefined" ? process.env : {};
2456
+ }
2457
+ function parseMachineVersion(value) {
2458
+ if (typeof value !== "string")
2459
+ return null;
2460
+ const m = SEMVER_RE.exec(value.trim());
2461
+ if (!m)
2462
+ return null;
2463
+ return {
2464
+ major: Number(m[1]),
2465
+ minor: Number(m[2]),
2466
+ patch: Number(m[3]),
2467
+ prerelease: m[4] ? m[4].split(".") : []
2468
+ };
2469
+ }
2470
+ function compareIdentifiers(a, b) {
2471
+ const aNum = /^\d+$/.test(a);
2472
+ const bNum = /^\d+$/.test(b);
2473
+ if (aNum && bNum)
2474
+ return Math.sign(Number(a) - Number(b));
2475
+ if (aNum)
2476
+ return -1;
2477
+ if (bNum)
2478
+ return 1;
2479
+ return a < b ? -1 : a > b ? 1 : 0;
2480
+ }
2481
+ function compareParsed(a, b) {
2482
+ for (const key of ["major", "minor", "patch"]) {
2483
+ if (a[key] !== b[key])
2484
+ return a[key] < b[key] ? -1 : 1;
2485
+ }
2486
+ if (a.prerelease.length === 0 && b.prerelease.length === 0)
2487
+ return 0;
2488
+ if (a.prerelease.length === 0)
2489
+ return 1;
2490
+ if (b.prerelease.length === 0)
2491
+ return -1;
2492
+ const len = Math.max(a.prerelease.length, b.prerelease.length);
2493
+ for (let i = 0; i < len; i++) {
2494
+ const x = a.prerelease[i];
2495
+ const y = b.prerelease[i];
2496
+ if (x === void 0)
2497
+ return -1;
2498
+ if (y === void 0)
2499
+ return 1;
2500
+ const c = compareIdentifiers(x, y);
2501
+ if (c !== 0)
2502
+ return c;
2503
+ }
2504
+ return 0;
2505
+ }
2506
+ function compareMachineVersions(a, b) {
2507
+ const pa = parseMachineVersion(a);
2508
+ const pb = parseMachineVersion(b);
2509
+ if (!pa || !pb)
2510
+ return null;
2511
+ return compareParsed(pa, pb);
2512
+ }
2513
+ function isValidVersion(value) {
2514
+ return typeof value === "string" && parseMachineVersion(value) !== null;
2515
+ }
2516
+ function parseMinMachineVersionOverride(raw) {
2517
+ if (typeof raw !== "string")
2518
+ return null;
2519
+ const trimmed = raw.trim();
2520
+ if (!trimmed)
2521
+ return null;
2522
+ if (trimmed.startsWith("{")) {
2523
+ let parsed;
2524
+ try {
2525
+ parsed = JSON.parse(trimmed);
2526
+ } catch {
2527
+ return null;
2528
+ }
2529
+ if (!parsed || typeof parsed !== "object" || Array.isArray(parsed))
2530
+ return null;
2531
+ const out = {};
2532
+ for (const [key, value] of Object.entries(parsed)) {
2533
+ if (isValidVersion(value))
2534
+ out[key] = value.trim();
2535
+ }
2536
+ return Object.keys(out).length > 0 ? out : null;
2537
+ }
2538
+ return isValidVersion(trimmed) ? { [MIN_MACHINE_VERSION_DEFAULT_KEY]: trimmed } : null;
2539
+ }
2540
+ function getMinimumFor(jobKind, env) {
2541
+ const override = parseMinMachineVersionOverride(currentEnv2(env).MIN_MACHINE_VERSION);
2542
+ const builtIn = MIN_MACHINE_VERSION;
2543
+ return override?.[jobKind] ?? override?.[MIN_MACHINE_VERSION_DEFAULT_KEY] ?? builtIn[jobKind] ?? MIN_MACHINE_VERSION.default;
2544
+ }
2545
+ function meetsMinimum(version, jobKind, env) {
2546
+ const current = parseMachineVersion(version);
2547
+ if (!current)
2548
+ return true;
2549
+ const minimum = parseMachineVersion(getMinimumFor(jobKind, env));
2550
+ if (!minimum)
2551
+ return true;
2552
+ return compareParsed(current, minimum) >= 0;
2553
+ }
2554
+ var MIN_MACHINE_VERSION_DEFAULT_KEY, MACHINE_UPDATE_COMMAND, MIN_MACHINE_VERSION, SEMVER_RE, MIN_MACHINE_VERSION_JOB_KINDS;
2555
+ var init_machineVersion = __esm({
2556
+ "../shared/dist/machineVersion.js"() {
2557
+ "use strict";
2558
+ init_mailbox();
2559
+ MIN_MACHINE_VERSION_DEFAULT_KEY = "default";
2560
+ MACHINE_UPDATE_COMMAND = "compbox update";
2561
+ MIN_MACHINE_VERSION = Object.freeze({
2562
+ default: "0.0.0",
2563
+ epic_request: "0.0.0",
2564
+ interview_reply: "0.0.0",
2565
+ start_execution: "0.0.0",
2566
+ connect_repo: "0.0.0"
2567
+ });
2568
+ SEMVER_RE = /^v?(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*)?$/;
2569
+ MIN_MACHINE_VERSION_JOB_KINDS = JOB_TYPES;
2570
+ }
2571
+ });
2572
+
2573
+ // ../shared/dist/needs-input.js
2574
+ function isNeedsInputKind(value) {
2575
+ return value === "merge_approval" || value === "cloud_preflight";
2576
+ }
2577
+ function isStringArray(value) {
2578
+ return Array.isArray(value) && value.every((v) => typeof v === "string");
2579
+ }
2580
+ function isPlainObject(value) {
2581
+ return value !== null && typeof value === "object" && !Array.isArray(value);
2582
+ }
2583
+ function isOption(value) {
2584
+ if (!isPlainObject(value))
2585
+ return false;
2586
+ if (typeof value.label !== "string" || !isStringArray(value.steps))
2587
+ return false;
2588
+ return value.onMachine === void 0 || typeof value.onMachine === "boolean";
2589
+ }
2590
+ function isOwnerItem(value) {
2591
+ return isPlainObject(value) && typeof value.title === "string" && typeof value.how === "string";
2592
+ }
2593
+ function isNeedsInputRequest(value) {
2594
+ if (!isPlainObject(value))
2595
+ return false;
2596
+ if (typeof value.question !== "string" || value.question.trim() === "")
2597
+ return false;
2598
+ if (value.why !== void 0 && typeof value.why !== "string")
2599
+ return false;
2600
+ if (value.steps !== void 0 && !isStringArray(value.steps))
2601
+ return false;
2602
+ if (value.options !== void 0 && !(Array.isArray(value.options) && value.options.every(isOption))) {
2603
+ return false;
2604
+ }
2605
+ if (value.afterAnswer !== void 0 && typeof value.afterAnswer !== "string")
2606
+ return false;
2607
+ if (value.ownerItems !== void 0 && !(Array.isArray(value.ownerItems) && value.ownerItems.every(isOwnerItem))) {
2608
+ return false;
2609
+ }
2610
+ if (value.ownerTaskIds !== void 0 && !isStringArray(value.ownerTaskIds))
2611
+ return false;
2612
+ if (value.kind !== void 0 && !isNeedsInputKind(value.kind))
2613
+ return false;
2614
+ if (value.prNumber !== void 0 && !(typeof value.prNumber === "number" && Number.isInteger(value.prNumber) && value.prNumber > 0)) {
2615
+ return false;
2616
+ }
2617
+ return true;
2618
+ }
2619
+ function utf8ByteLength(text) {
2620
+ let bytes = 0;
2621
+ for (let i = 0; i < text.length; i++) {
2622
+ const code = text.charCodeAt(i);
2623
+ if (code < 128)
2624
+ bytes += 1;
2625
+ else if (code < 2048)
2626
+ bytes += 2;
2627
+ else if (code >= 55296 && code <= 56319 && i + 1 < text.length) {
2628
+ bytes += 4;
2629
+ i++;
2630
+ } else
2631
+ bytes += 3;
2632
+ }
2633
+ return bytes;
2634
+ }
2635
+ function normalize(req) {
2636
+ const out = { question: req.question };
2637
+ if (req.why !== void 0)
2638
+ out.why = req.why;
2639
+ if (req.steps !== void 0)
2640
+ out.steps = [...req.steps];
2641
+ if (req.options !== void 0) {
2642
+ out.options = req.options.map((o) => {
2643
+ const option = { label: o.label, steps: [...o.steps] };
2644
+ if (o.onMachine !== void 0)
2645
+ option.onMachine = o.onMachine;
2646
+ return option;
2647
+ });
2648
+ }
2649
+ if (req.afterAnswer !== void 0)
2650
+ out.afterAnswer = req.afterAnswer;
2651
+ if (req.ownerItems !== void 0) {
2652
+ out.ownerItems = req.ownerItems.map((i) => ({ title: i.title, how: i.how }));
2653
+ }
2654
+ if (req.ownerTaskIds !== void 0)
2655
+ out.ownerTaskIds = [...req.ownerTaskIds];
2656
+ if (req.kind !== void 0)
2657
+ out.kind = req.kind;
2658
+ if (req.prNumber !== void 0)
2659
+ out.prNumber = req.prNumber;
2660
+ return out;
2661
+ }
2662
+ function stripRunnerOnlyFields(req) {
2663
+ const { kind: _kind, prNumber: _prNumber, ...rest } = req;
2664
+ return rest;
2665
+ }
2666
+ function parseNeedsInputMarker(output) {
2667
+ if (typeof output !== "string" || output === "")
2668
+ return null;
2669
+ const lines = output.split(/\r?\n/);
2670
+ let last;
2671
+ for (let i = lines.length - 1; i >= 0; i--) {
2672
+ const line2 = lines[i];
2673
+ if (line2 !== void 0 && line2.trim() !== "") {
2674
+ last = line2;
2675
+ break;
2676
+ }
2677
+ }
2678
+ if (last === void 0)
2679
+ return null;
2680
+ const line = last.replace(/^[ \t]+/, "");
2681
+ if (!line.startsWith(NEEDS_INPUT_MARKER))
2682
+ return null;
2683
+ const rest = line.slice(NEEDS_INPUT_MARKER.length);
2684
+ if (!/^[ \t]/.test(rest))
2685
+ return null;
2686
+ const json = rest.trim();
2687
+ if (!json.startsWith("{") || !json.endsWith("}"))
2688
+ return null;
2689
+ if (utf8ByteLength(json) > NEEDS_INPUT_MAX_JSON_BYTES)
2690
+ return null;
2691
+ let parsed;
2692
+ try {
2693
+ parsed = JSON.parse(json);
2694
+ } catch {
2695
+ return null;
2696
+ }
2697
+ return isNeedsInputRequest(parsed) ? stripRunnerOnlyFields(normalize(parsed)) : null;
2698
+ }
2699
+ function formatNeedsInputText(req) {
2700
+ const out = [req.question.trim()];
2701
+ if (req.why?.trim())
2702
+ out.push("", `Why: ${req.why.trim()}`);
2703
+ if (req.steps && req.steps.length > 0) {
2704
+ out.push("", "Steps:");
2705
+ req.steps.forEach((s, i) => out.push(` ${String(i + 1)}. ${s}`));
2706
+ }
2707
+ if (req.options && req.options.length > 0) {
2708
+ out.push("", "Options (quickest first):");
2709
+ req.options.forEach((o, i) => {
2710
+ out.push(` Option ${String(i + 1)}: ${o.label}${o.onMachine ? " (runs on your machine)" : ""}`);
2711
+ o.steps.forEach((s, j) => out.push(` ${String(j + 1)}. ${s}`));
2712
+ });
2713
+ }
2714
+ if (req.ownerItems && req.ownerItems.length > 0) {
2715
+ out.push("", "Also waiting on you:");
2716
+ for (const item of req.ownerItems)
2717
+ out.push(` - ${item.title}: ${item.how}`);
2718
+ }
2719
+ if (req.afterAnswer?.trim()) {
2720
+ out.push("", `After you answer: ${req.afterAnswer.trim()}`);
2721
+ }
2722
+ out.push("", "Never paste secret values in your reply. Store them as GitHub environment secrets or in your cloud secret manager and reply with where you put them.");
2723
+ return out.join("\n");
2724
+ }
2725
+ function shannonEntropy(text) {
2726
+ if (text.length === 0)
2727
+ return 0;
2728
+ const counts = /* @__PURE__ */ new Map();
2729
+ let len = 0;
2730
+ for (const ch of text) {
2731
+ counts.set(ch, (counts.get(ch) ?? 0) + 1);
2732
+ len++;
2733
+ }
2734
+ let bits = 0;
2735
+ for (const n of counts.values()) {
2736
+ const p = n / len;
2737
+ bits -= p * Math.log2(p);
2738
+ }
2739
+ return bits;
2740
+ }
2741
+ function looksLikePathOrResource(token) {
2742
+ if (RESOURCE_PREFIX_RE.test(token))
2743
+ return true;
2744
+ const segments = token.split("/").filter((s) => s.length > 0);
2745
+ return segments.length >= 2 && segments.every((s) => PATH_SEGMENT_RE.test(s));
2746
+ }
2747
+ function isAwsSecretToken(token) {
2748
+ if (!AWS_SECRET_RE.test(token))
2749
+ return false;
2750
+ if (RESOURCE_PREFIX_RE.test(token))
2751
+ return false;
2752
+ if (!/[A-Z]/.test(token) || !/[a-z]/.test(token) || !/[0-9]/.test(token))
2753
+ return false;
2754
+ return shannonEntropy(token) > HIGH_ENTROPY_THRESHOLD;
2755
+ }
2756
+ function isHighEntropyToken(token) {
2757
+ if (token.length < HIGH_ENTROPY_MIN_LENGTH)
2758
+ return false;
2759
+ if (token.includes("/") && looksLikePathOrResource(token))
2760
+ return false;
2761
+ if (UUID_RE.test(token))
2762
+ return false;
2763
+ if (!/[0-9]/.test(token) || !/[A-Za-z]/.test(token))
2764
+ return false;
2765
+ return shannonEntropy(token) > HIGH_ENTROPY_THRESHOLD;
2766
+ }
2767
+ function looksLikeSecret(text) {
2768
+ if (typeof text !== "string" || text.trim() === "")
2769
+ return { secret: false };
2770
+ for (const { re, reason } of SECRET_PATTERNS) {
2771
+ if (re.test(text))
2772
+ return { secret: true, reason: `Looks like ${reason}.` };
2773
+ }
2774
+ for (const raw of text.split(/[\s"'`,;()<>[\]{}|]+/)) {
2775
+ const token = raw.replace(/^[.!?*]+|[.!?*]+$/g, "");
2776
+ if (token.length < HIGH_ENTROPY_MIN_LENGTH)
2777
+ continue;
2778
+ if (URL_RE.test(token) || EMAIL_RE.test(token))
2779
+ continue;
2780
+ if (isAwsSecretToken(token)) {
2781
+ return { secret: true, reason: "Looks like an AWS secret access key (40 chars)." };
2782
+ }
2783
+ for (const part of token.split(/[=:]+/)) {
2784
+ if (isHighEntropyToken(part)) {
2785
+ return {
2786
+ secret: true,
2787
+ reason: `Looks like a high-entropy token (${String(part.length)} chars starting "${part.slice(0, 4)}...").`
2788
+ };
2789
+ }
2790
+ }
2791
+ }
2792
+ return { secret: false };
2793
+ }
2794
+ var NEEDS_INPUT_MARKER, NEEDS_INPUT_MAX_JSON_BYTES, SECRET_PATTERNS, HIGH_ENTROPY_MIN_LENGTH, HIGH_ENTROPY_THRESHOLD, UUID_RE, URL_RE, EMAIL_RE, RESOURCE_PREFIX_RE, PATH_SEGMENT_RE, AWS_SECRET_RE;
2795
+ var init_needs_input = __esm({
2796
+ "../shared/dist/needs-input.js"() {
2797
+ "use strict";
2798
+ NEEDS_INPUT_MARKER = "COMPBOX_NEEDS_INPUT";
2799
+ NEEDS_INPUT_MAX_JSON_BYTES = 32 * 1024;
2800
+ SECRET_PATTERNS = [
2801
+ { re: /-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----/, reason: "a private key block (-----BEGIN ... PRIVATE KEY-----)" },
2802
+ { re: /(?<![A-Za-z0-9])sk-ant-[A-Za-z0-9_-]{16,}/, reason: "an Anthropic API key (sk-ant-)" },
2803
+ { re: /(?<![A-Za-z0-9])sk-[A-Za-z0-9_-]{16,}/, reason: "an API key starting with sk-" },
2804
+ { re: /(?<![A-Za-z0-9])[sr]k_(?:live|test)_[A-Za-z0-9]{16,}/, reason: "a Stripe secret key (sk_live_/sk_test_)" },
2805
+ { re: /(?<![A-Za-z0-9])github_pat_[A-Za-z0-9_]{20,}/, reason: "a GitHub fine-grained token (github_pat_)" },
2806
+ { re: /(?<![A-Za-z0-9])ghp_[A-Za-z0-9]{20,}/, reason: "a GitHub personal access token (ghp_)" },
2807
+ { re: /(?<![A-Za-z0-9])gho_[A-Za-z0-9]{20,}/, reason: "a GitHub OAuth token (gho_)" },
2808
+ { re: /(?<![A-Za-z0-9])gh[sur]_[A-Za-z0-9]{20,}/, reason: "a GitHub app or refresh token (ghs_/ghu_/ghr_)" },
2809
+ { re: /(?<![A-Za-z0-9])glpat-[A-Za-z0-9_-]{20,}/, reason: "a GitLab personal access token (glpat-)" },
2810
+ { re: /(?<![A-Za-z0-9])npm_[A-Za-z0-9]{30,}/, reason: "an npm access token (npm_)" },
2811
+ { re: /(?<![A-Za-z0-9])AKIA[0-9A-Z]{16}(?![A-Za-z0-9])/, reason: "an AWS access key id (AKIA...)" },
2812
+ {
2813
+ re: /aws_secret_access_key["']?\s*[=:]\s*["']?[A-Za-z0-9/+]{40}(?![A-Za-z0-9/+])/i,
2814
+ reason: "an AWS secret access key (aws_secret_access_key=...)"
2815
+ },
2816
+ { re: /(?<![A-Za-z0-9])xox[abp]-[A-Za-z0-9-]{10,}/, reason: "a Slack token (xoxa-/xoxb-/xoxp-)" },
2817
+ {
2818
+ re: /[a-z][a-z0-9+.-]*:\/\/[^\s/:@]+:[^\s/@]+@[^\s/@]+/i,
2819
+ reason: "a URL with an embedded password (scheme://user:password@host)"
2820
+ }
2821
+ ];
2822
+ HIGH_ENTROPY_MIN_LENGTH = 32;
2823
+ HIGH_ENTROPY_THRESHOLD = 4;
2824
+ UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
2825
+ URL_RE = /^[a-z][a-z0-9+.-]*:\/\//i;
2826
+ EMAIL_RE = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
2827
+ RESOURCE_PREFIX_RE = /^(?:(?:projects|organizations|folders|billingAccounts|locations|subscriptions)\/|arn:)/i;
2828
+ PATH_SEGMENT_RE = /^[a-z0-9._~-]{1,40}$/i;
2829
+ AWS_SECRET_RE = /^[A-Za-z0-9/+]{40}$/;
2830
+ }
2831
+ });
2832
+
2267
2833
  // ../shared/dist/index.js
2268
2834
  var dist_exports = {};
2269
2835
  __export(dist_exports, {
@@ -2293,10 +2859,18 @@ __export(dist_exports, {
2293
2859
  JOB_STATUSES: () => JOB_STATUSES,
2294
2860
  JOB_TYPES: () => JOB_TYPES,
2295
2861
  MACHINE_STATUSES: () => MACHINE_STATUSES,
2862
+ MACHINE_UPDATE_COMMAND: () => MACHINE_UPDATE_COMMAND,
2863
+ MIN_CLI_FOR_REPLY_RESUME: () => MIN_CLI_FOR_REPLY_RESUME,
2864
+ MIN_MACHINE_VERSION: () => MIN_MACHINE_VERSION,
2865
+ MIN_MACHINE_VERSION_DEFAULT_KEY: () => MIN_MACHINE_VERSION_DEFAULT_KEY,
2866
+ MIN_MACHINE_VERSION_JOB_KINDS: () => MIN_MACHINE_VERSION_JOB_KINDS,
2296
2867
  MODEL_CATALOG: () => MODEL_CATALOG,
2868
+ NEEDS_INPUT_MARKER: () => NEEDS_INPUT_MARKER,
2869
+ NEEDS_INPUT_MAX_JSON_BYTES: () => NEEDS_INPUT_MAX_JSON_BYTES,
2297
2870
  ORG_ROLES: () => ORG_ROLES,
2298
2871
  PXPIPE_DEFAULT_PROXY_URL: () => PXPIPE_DEFAULT_PROXY_URL,
2299
2872
  RETURN_TO_MAX_LENGTH: () => RETURN_TO_MAX_LENGTH,
2873
+ STACK_PRICING: () => STACK_PRICING,
2300
2874
  STACK_TIERS: () => STACK_TIERS,
2301
2875
  STACK_WORKFLOW: () => STACK_WORKFLOW,
2302
2876
  START_EXECUTION_KINDS: () => START_EXECUTION_KINDS,
@@ -2304,6 +2878,8 @@ __export(dist_exports, {
2304
2878
  SUMMARY_MAX: () => SUMMARY_MAX,
2305
2879
  SessionEventType: () => SessionEventType,
2306
2880
  TARGET_COMPLIANCE_TIER: () => TARGET_COMPLIANCE_TIER,
2881
+ TEARDOWN_ENVIRONMENTS: () => TEARDOWN_ENVIRONMENTS,
2882
+ TEARDOWN_WORKFLOW: () => TEARDOWN_WORKFLOW,
2307
2883
  TERMINAL_JOB_STATUSES: () => TERMINAL_JOB_STATUSES,
2308
2884
  TURN_ROLES: () => TURN_ROLES,
2309
2885
  agentSchema: () => agentSchema,
@@ -2321,15 +2897,20 @@ __export(dist_exports, {
2321
2897
  buildStackFiles: () => buildStackFiles,
2322
2898
  cloudRunUrl: () => cloudRunUrl,
2323
2899
  cloudSqlInstanceName: () => cloudSqlInstanceName,
2900
+ compareMachineVersions: () => compareMachineVersions,
2324
2901
  complianceFromRecord: () => complianceFromRecord,
2325
2902
  databaseSecretName: () => databaseSecretName,
2326
2903
  deployRunTitle: () => deployRunTitle,
2327
2904
  err: () => err,
2905
+ estimateStackCost: () => estimateStackCost,
2328
2906
  extractCompletionJson: () => extractCompletionJson,
2907
+ formatNeedsInputText: () => formatNeedsInputText,
2908
+ gcpAttributeCondition: () => gcpAttributeCondition,
2329
2909
  gcpServiceAccountEmail: () => gcpServiceAccountEmail,
2330
2910
  gcpStateBucket: () => gcpStateBucket,
2331
2911
  gcpWorkloadProvider: () => gcpWorkloadProvider,
2332
2912
  getAnthropicProxyUrl: () => getAnthropicProxyUrl,
2913
+ getMinimumFor: () => getMinimumFor,
2333
2914
  getModelById: () => getModelById,
2334
2915
  getModelDisplayName: () => getModelDisplayName,
2335
2916
  getOpenAiProxyUrl: () => getOpenAiProxyUrl,
@@ -2352,6 +2933,8 @@ __export(dist_exports, {
2352
2933
  isJobStatus: () => isJobStatus,
2353
2934
  isJobType: () => isJobType,
2354
2935
  isMachineStatus: () => isMachineStatus,
2936
+ isNeedsInputKind: () => isNeedsInputKind,
2937
+ isNeedsInputRequest: () => isNeedsInputRequest,
2355
2938
  isOrgRole: () => isOrgRole,
2356
2939
  isPxpipeEnabled: () => isPxpipeEnabled,
2357
2940
  isS3BucketName: () => isS3BucketName,
@@ -2367,13 +2950,18 @@ __export(dist_exports, {
2367
2950
  isValidModelId: () => isValidModelId,
2368
2951
  lockedRequestMessage: () => lockedRequestMessage,
2369
2952
  looksLikeCompletionAttempt: () => looksLikeCompletionAttempt,
2953
+ looksLikeSecret: () => looksLikeSecret,
2370
2954
  mcpConfigSchema: () => mcpConfigSchema,
2371
2955
  mcpServerConfigSchema: () => mcpServerConfigSchema,
2372
2956
  meetsComplianceTarget: () => meetsComplianceTarget,
2957
+ meetsMinimum: () => meetsMinimum,
2373
2958
  modelRecommendationSourceValues: () => modelRecommendationSourceValues,
2374
2959
  normalizeDatabaseChoice: () => normalizeDatabaseChoice,
2375
2960
  normalizeGitRemote: () => normalizeGitRemote,
2376
2961
  ok: () => ok,
2962
+ parseMachineVersion: () => parseMachineVersion,
2963
+ parseMinMachineVersionOverride: () => parseMinMachineVersionOverride,
2964
+ parseNeedsInputMarker: () => parseNeedsInputMarker,
2377
2965
  probeProxyHealth: () => probeProxyHealth,
2378
2966
  renderConversationPrompt: () => renderConversationPrompt,
2379
2967
  requestLockReason: () => requestLockReason,
@@ -2383,11 +2971,16 @@ __export(dist_exports, {
2383
2971
  safeValidateSkillPackManifest: () => safeValidateSkillPackManifest,
2384
2972
  savedContextFromRecord: () => savedContextFromRecord,
2385
2973
  savedMessage: () => savedMessage,
2974
+ shannonEntropy: () => shannonEntropy,
2386
2975
  skillPackManifestSchema: () => skillPackManifestSchema,
2387
2976
  skillSchema: () => skillSchema,
2388
2977
  sleep: () => sleep,
2389
2978
  stackAppName: () => stackAppName,
2979
+ stackEnvSettings: () => stackEnvSettings,
2390
2980
  stackEnvironments: () => stackEnvironments,
2981
+ stripRunnerOnlyFields: () => stripRunnerOnlyFields,
2982
+ teardownConfirmation: () => teardownConfirmation,
2983
+ teardownRunTitle: () => teardownRunTitle,
2391
2984
  thinkingLevelValues: () => thinkingLevelValues,
2392
2985
  toConversationMessages: () => toConversationMessages,
2393
2986
  validatePackName: () => validatePackName,
@@ -2408,8 +3001,11 @@ var init_dist = __esm({
2408
3001
  init_cloud_setup();
2409
3002
  init_cloud_connect();
2410
3003
  init_stack_files();
3004
+ init_stack_cost();
2411
3005
  init_github_repo();
2412
3006
  init_return_to();
3007
+ init_machineVersion();
3008
+ init_needs_input();
2413
3009
  }
2414
3010
  });
2415
3011
 
@@ -10816,6 +11412,11 @@ function isUuid(value) {
10816
11412
 
10817
11413
  // src/tools/teams.ts
10818
11414
  import { z as z20 } from "zod";
11415
+ function gcpKeylessGuidance(k) {
11416
+ const auth = k.workloadProvider ? `In GitHub Actions, sign in with google-github-actions/auth using workload_identity_provider "${k.workloadProvider}" and the deploy service account; never ask the owner for the workload provider, it is given here.` : "The Workload Identity provider is missing for this connection, so keyless sign-in can't be configured yet; don't ask the owner to type it in \u2014 an organization admin should reconnect Google Cloud in Settings -> Cloud.";
11417
+ const missing = k.missing.length > 0 ? ` Missing: ${k.missing.join(" ")}` : "";
11418
+ return `${auth} Only repositories owned by ${k.allowedGithubOwners.join(", ") || "(no connected GitHub account)"} can deploy. deployRoles are the roles CompBox's setup grants (expected, not verified).${missing}`;
11419
+ }
10819
11420
  function registerTeamTools(server2) {
10820
11421
  server2.registerTool(
10821
11422
  "compbox__list_teams",
@@ -10848,7 +11449,7 @@ function registerTeamTools(server2) {
10848
11449
  server2.registerTool(
10849
11450
  "compbox__get_project_cloud",
10850
11451
  {
10851
- description: "Get the cloud a project (team) deploys to: provider (gcp/aws/azure), cloud project or account ID, region and deploy identity, and whether it is the project's own choice or the organization's default. A team's cloudConnectionId of null means it FOLLOWS THE ORG DEFAULT, not that it has no cloud; always call this before planning hosting, databases or deployment. Returns cloud: null only when the organization has no cloud connected.",
11452
+ description: "Get the cloud a project (team) deploys to: provider (gcp/aws/azure), cloud project or account ID, region and deploy identity, and whether it is the project's own choice or the organization's default. A team's cloudConnectionId of null means it FOLLOWS THE ORG DEFAULT, not that it has no cloud; always call this before planning hosting, databases or deployment. Returns cloud: null only when the organization has no cloud connected. For Google Cloud it also returns gcpKeyless: projectNumber, workloadProvider (pass it as workload_identity_provider to google-github-actions/auth), identityPool, attributeCondition, allowedGithubOwners, deployRoles and requiredApis \u2014 everything a keyless deploy needs.",
10852
11453
  inputSchema: {
10853
11454
  team: z20.string().min(1).describe("The project/team: UUID, name or key (e.g. 'SAISUD').")
10854
11455
  }
@@ -10862,6 +11463,7 @@ function registerTeamTools(server2) {
10862
11463
  }
10863
11464
  const { data } = await apiClient.getProjectCloud(found.data.id);
10864
11465
  const cloud = data.cloud;
11466
+ const keyless = data.gcpKeyless ?? null;
10865
11467
  return createResponse({
10866
11468
  team: { id: found.data.id, name: found.data.name, key: found.data.key },
10867
11469
  hasCloud: cloud !== null,
@@ -10875,7 +11477,8 @@ function registerTeamTools(server2) {
10875
11477
  stateStore: cloud.stateStore,
10876
11478
  consoleUrl: cloud.consoleUrl
10877
11479
  },
10878
- guidance: cloud === null ? "No cloud is connected. An organization admin can connect one in Settings -> Cloud; until then don't assume a hosting provider." : `Plan hosting, databases and storage on ${cloud.provider.toUpperCase()} (${cloud.projectId}, ${cloud.region}). CompBox stacks deploy through GitHub Actions with keyless sign-in, so never plan stored cloud keys.`
11480
+ gcpKeyless: keyless,
11481
+ guidance: cloud === null ? "No cloud is connected. An organization admin can connect one in Settings -> Cloud; until then don't assume a hosting provider." : `Plan hosting, databases and storage on ${cloud.provider.toUpperCase()} (${cloud.projectId}, ${cloud.region}). CompBox stacks deploy through GitHub Actions with keyless sign-in, so never plan stored cloud keys.` + (keyless ? ` ${gcpKeylessGuidance(keyless)}` : "")
10879
11482
  });
10880
11483
  } catch (error) {
10881
11484
  return createErrorResponse(error);
@@ -12636,7 +13239,7 @@ function withLegacyToolCallRewrite(transport) {
12636
13239
  var SERVER_NAME = "compbox-mcp";
12637
13240
  function resolveServerVersion() {
12638
13241
  if (true) {
12639
- return "1.21.8";
13242
+ return "1.21.10";
12640
13243
  }
12641
13244
  const require2 = createRequire(import.meta.url);
12642
13245
  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.8",
3
+ "version": "1.21.10",
4
4
  "description": "CompBox MCP server - Uses HTTP API client (no direct database access)",
5
5
  "license": "MIT",
6
6
  "type": "module",