@bike4mind/cli 0.17.2 → 0.18.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.
package/README.md CHANGED
@@ -159,7 +159,10 @@ Authentication tokens are securely stored in your config file with restricted pe
159
159
 
160
160
  ### API Configuration
161
161
 
162
- By default, the CLI connects to the main Bike4Mind service at `https://app.bike4mind.com`.
162
+ By default, the published CLI connects to the main Bike4Mind service at `https://app.bike4mind.com`.
163
+ The default is baked in at build time from the hosted build environment — there is **no brand
164
+ fallback in source** (open-core, #9306/#9392), so a fresh clone ships empty. A fork publishes its
165
+ own CLI by setting `B4M_DEFAULT_API_URL` when building — see `tsdown.config.ts`.
163
166
 
164
167
  **Quick switch between local dev and production:** use the `b4m --dev` / `b4m --prod`
165
168
  launch flags (see [Switching environments](#switching-environments---dev----prod)).
@@ -171,7 +174,7 @@ and `/api-info` commands below operate on the same setting from inside a session
171
174
  If your organization runs a self-hosted Bike4Mind instance, connect to it using:
172
175
 
173
176
  ```bash
174
- /set-api https://your-company.bike4mind.com
177
+ /set-api https://app.your-instance.example.com
175
178
  ```
176
179
 
177
180
  To return to the main Bike4Mind service:
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
- import { $ as ProjectEvents, $t as parseRateLimitHeaders, A as GenerateImageToolCallSchema, At as dayjsConfig_default, B as InviteEvents, Bt as obfuscateApiKey, C as ElabsEvents, Ct as UnauthorizedError, D as ForbiddenError, Dt as VideoModels, E as FileEvents, Et as VideoGenerationUsageTransaction, F as ImageEditUsageTransaction, Ft as isGPTImageModel, G as ModalEvents, Gt as settingsMap, H as KnowledgeType, Ht as resolveNavigationIntents, I as ImageGenerationUsageTransaction, It as isModelAccessible, J as OpenAIEmbeddingModel, K as ModelBackend, Kt as substituteArguments$1, L as ImageModels, Lt as isSupportedEmbeddingModel, M as GenericCreditDeductTransaction, Mt as getMcpProviderMetadata, N as HTTPError, Nt as getViewById, O as FriendshipEvents, Ot as XAI_IMAGE_MODELS, P as HttpStatus, Pt as isGPTImage2Model, Q as ProfileEvents, Qt as isNearLimit, R as InboxEvents, Rt as isZodError, S as DashboardParamsSchema, St as UiNavigationEvents, T as FeedbackEvents, Tt as VIDEO_SIZE_CONSTRAINTS, U as LLMEvents, Ut as sanitizeTelemetryError, V as InviteType, Vt as parseSkillArguments, W as MiscEvents, Wt as secureParameters, X as Permission, Xt as buildRateLimitLogEntry, Y as OpenAIImageGenerationInput, Z as PermissionDeniedError, Zt as extractSnippetMeta, _ as ChatCompletionCreateInputSchema, _t as TaskScheduleHandler, a as ALERT_THRESHOLDS, at as ReceivedCreditTransaction, b as CompletionApiUsageTransaction, bt as ToolUsageTransaction, c as ApiKeyScope, ct as ResearchModeParamsSchema, d as ArtifactTypeSchema, dt as ResearchTaskType, en as CollectionType, et as PromptIntentSchema, f as AuthEvents, ft as SessionEvents, gt as TagType, h as BadRequestError, ht as SupportedFabFileMimeTypes, it as RealtimeVoiceUsageTransaction, j as GenericCreditAddTransaction, jt as getAccessibleDataLakes, k as GEMINI_IMAGE_MODELS, kt as b4mLLMTools, l as ApiKeyType, lt as ResearchTaskExecutionType, m as BFL_SAFETY_TOLERANCE, mt as SubscriptionCreditTransaction, n as logger, nt as PurchaseTransaction, o as AiEvents, ot as RechartsChartTypeList, p as BFL_IMAGE_MODELS, pt as SpeechToTextUsageTransaction, q as NotFoundError, qt as toDataLakeConfig, rt as QuestMasterParamsSchema, s as ApiKeyEvents, st as RegInviteEvents, t as ConfigStore, tt as PromptMetaZodSchema, u as AppFileEvents, ut as ResearchTaskPeriodicFrequencyType, v as ChatModels, vt as TextGenerationUsageTransaction, w as FavoriteDocumentType, wt as UnprocessableEntityError, x as CorruptedFileError, xt as TransferCreditTransaction, y as ClaudeArtifactMimeTypes, yt as TooManyRequestsError, z as InternalServerError, zt as mapMimeTypeToArtifactType } from "./ConfigStore-7kcIJ-ux.mjs";
2
+ import { $ as PermissionDeniedError, $t as extractSnippetMeta, A as FriendshipEvents, At as XAI_IMAGE_MODELS, B as InboxEvents, Bt as isZodError, C as CorruptedFileError, Ct as TransferCreditTransaction, D as FeedbackEvents, Dt as VIDEO_SIZE_CONSTRAINTS, E as FavoriteDocumentType, Et as UnprocessableEntityError, F as HTTPError, Ft as getViewById, G as LLMEvents, Gt as sanitizeTelemetryError, H as InviteEvents, Ht as obfuscateApiKey, I as HttpStatus, It as isGPTImage2Model, J as ModelBackend, Jt as substituteArguments$1, K as MiscEvents, Kt as secureParameters, L as ImageEditUsageTransaction, Lt as isGPTImageModel, M as GenerateImageToolCallSchema, Mt as dayjsConfig_default, N as GenericCreditAddTransaction, Nt as getAccessibleDataLakes, O as FileEvents, Ot as VideoGenerationUsageTransaction, P as GenericCreditDeductTransaction, Pt as getMcpProviderMetadata, Q as Permission, Qt as buildRateLimitLogEntry, R as ImageGenerationUsageTransaction, Rt as isModelAccessible, S as CompletionApiUsageTransaction, St as ToolUsageTransaction, T as ElabsEvents, Tt as UnauthorizedError, U as InviteType, Ut as parseSkillArguments, V as InternalServerError, Vt as mapMimeTypeToArtifactType, W as KnowledgeType, Wt as resolveNavigationIntents, X as OpenAIEmbeddingModel, Y as NotFoundError, Yt as toDataLakeConfig, Z as OpenAIImageGenerationInput, _ as BadRequestError, _t as SupportedFabFileMimeTypes, at as QuestMasterParamsSchema, b as ChatModels, bt as TextGenerationUsageTransaction, c as AiEvents, ct as RechartsChartTypeList, d as ApiKeyType, dt as ResearchTaskExecutionType, en as isNearLimit, et as ProfileEvents, f as AppFileEvents, ft as ResearchTaskPeriodicFrequencyType, g as BFL_SAFETY_TOLERANCE, gt as SubscriptionCreditTransaction, h as BFL_IMAGE_MODELS, ht as SpeechToTextUsageTransaction, it as PurchaseTransaction, j as GEMINI_IMAGE_MODELS, jt as b4mLLMTools, k as ForbiddenError, kt as VideoModels, l as ApiKeyEvents, lt as RegInviteEvents, m as AuthEvents, mt as SessionEvents, n as logger, nn as CollectionType, nt as PromptIntentSchema, ot as RealtimeVoiceUsageTransaction, p as ArtifactTypeSchema, pt as ResearchTaskType, q as ModalEvents, qt as settingsMap, rt as PromptMetaZodSchema, s as ALERT_THRESHOLDS, st as ReceivedCreditTransaction, t as ConfigStore, tn as parseRateLimitHeaders, tt as ProjectEvents, u as ApiKeyScope, ut as ResearchModeParamsSchema, vt as TagType, w as DashboardParamsSchema, wt as UiNavigationEvents, x as ClaudeArtifactMimeTypes, xt as TooManyRequestsError, y as ChatCompletionCreateInputSchema, yt as TaskScheduleHandler, z as ImageModels, zt as isSupportedEmbeddingModel } from "./ConfigStore-yJU1dxpP.mjs";
3
3
  import { a as isUserLockedOut, c as userCanDisableMFA, d as userRequiresMFA, f as verifyBackupCode, i as getLockoutTimeRemaining, l as userEligibleForMFA, n as generateBackupCodes, o as recordFailedAttempt, p as verifyTOTPToken, r as generateTOTPSetup, s as shouldResetFailedAttempts, t as clearFailedAttempts, u as userHasMFAConfigured } from "./utils-fqhJmuB8.mjs";
4
4
  import { n as isPathAllowed, t as assertPathAllowed } from "./pathValidation-D8tjkQXE-1HwvsuYT.mjs";
5
- import { t as version } from "./package-DLM23Ze7.mjs";
5
+ import { t as version } from "./package-B3f78bSl.mjs";
6
6
  import { execFile, execFileSync, spawn } from "child_process";
7
7
  import crypto, { createHash, randomBytes, randomUUID } from "crypto";
8
8
  import { existsSync, promises, readFileSync, readdirSync, rmSync, statSync, unlinkSync, writeFileSync } from "fs";
@@ -8843,6 +8843,36 @@ function sanitizeJsonStringWithMeta(jsonStr, options) {
8843
8843
  }
8844
8844
  //#endregion
8845
8845
  //#region ../../b4m-core/quantum/dist/index.mjs
8846
+ /**
8847
+ * Scheduling's objective is makespan (lower is better), rendered in time units.
8848
+ * This is the `ObjectiveMeta` every scheduling `SolverResult` carries so that
8849
+ * shared, family-agnostic UI can render scheduling results too.
8850
+ */
8851
+ const SCHEDULING_OBJECTIVE_META = {
8852
+ label: "makespan",
8853
+ unit: "t",
8854
+ direction: "min",
8855
+ format: { suffix: "t" }
8856
+ };
8857
+ /**
8858
+ * Build a scheduling `SolverResult` from the domain-native quantities a solver
8859
+ * produces (a schedule + its makespan), filling in the shared-contract fields.
8860
+ * Keeps the makespan→objective mapping in one place across all 11 solvers.
8861
+ */
8862
+ function makeSchedulingResult(args) {
8863
+ return {
8864
+ solverId: args.solverId,
8865
+ solverName: args.solverName,
8866
+ objective: args.makespan,
8867
+ internalCost: args.makespan,
8868
+ objectiveMeta: SCHEDULING_OBJECTIVE_META,
8869
+ solution: args.schedule,
8870
+ elapsedMs: args.elapsedMs,
8871
+ iterations: args.iterations,
8872
+ trace: args.trace,
8873
+ metadata: args.metadata
8874
+ };
8875
+ }
8846
8876
  const OperationSchema = z.object({
8847
8877
  jobId: z.number(),
8848
8878
  machineId: z.number(),
@@ -8920,19 +8950,19 @@ const greedySolver = {
8920
8950
  if (options?.onProgress) options.onProgress({
8921
8951
  solverId: "greedy",
8922
8952
  percentage: Math.round(opsScheduled / totalOps * 100),
8923
- bestMakespan: opEnd,
8953
+ bestObjective: opEnd,
8924
8954
  currentIteration: opsScheduled,
8925
8955
  totalIterations: totalOps
8926
8956
  });
8927
8957
  }
8928
- return {
8958
+ return makeSchedulingResult({
8929
8959
  solverId: "greedy",
8930
8960
  solverName: "Greedy (Earliest Start)",
8931
8961
  makespan: Math.max(...schedule.map((op) => op.endTime)),
8932
8962
  schedule,
8933
8963
  elapsedMs: performance.now() - startTime,
8934
8964
  iterations: totalOps
8935
- };
8965
+ });
8936
8966
  }
8937
8967
  };
8938
8968
  /**
@@ -9115,7 +9145,7 @@ const naiveSolver = {
9115
9145
  if (options?.onProgress && count % 100 === 0) options.onProgress({
9116
9146
  solverId: "naive",
9117
9147
  percentage: Math.min(99, Math.round(count / cappedTotal * 100)),
9118
- bestMakespan,
9148
+ bestObjective: bestMakespan,
9119
9149
  currentIteration: count,
9120
9150
  totalIterations: cappedTotal
9121
9151
  });
@@ -9123,18 +9153,18 @@ const naiveSolver = {
9123
9153
  options?.onProgress?.({
9124
9154
  solverId: "naive",
9125
9155
  percentage: 100,
9126
- bestMakespan,
9156
+ bestObjective: bestMakespan,
9127
9157
  currentIteration: count,
9128
9158
  totalIterations: cappedTotal
9129
9159
  });
9130
- return {
9160
+ return makeSchedulingResult({
9131
9161
  solverId: "naive",
9132
9162
  solverName: "Naive (Brute Force)",
9133
9163
  makespan: bestMakespan,
9134
9164
  schedule: bestSchedule,
9135
9165
  elapsedMs: performance.now() - startTime,
9136
9166
  iterations: count
9137
- };
9167
+ });
9138
9168
  }
9139
9169
  };
9140
9170
  function factorial(n) {
@@ -9187,19 +9217,19 @@ const randomRestartSolver = {
9187
9217
  options?.onProgress?.({
9188
9218
  solverId: "random-restart",
9189
9219
  percentage: Math.round((restart + 1) / RESTARTS * 100),
9190
- bestMakespan: globalBestMakespan,
9220
+ bestObjective: globalBestMakespan,
9191
9221
  currentIteration: restart + 1,
9192
9222
  totalIterations: RESTARTS
9193
9223
  });
9194
9224
  }
9195
- return {
9225
+ return makeSchedulingResult({
9196
9226
  solverId: "random-restart",
9197
9227
  solverName: "Random Restart Hill Climbing",
9198
9228
  makespan: globalBestMakespan,
9199
9229
  schedule: globalBestSchedule,
9200
9230
  elapsedMs: performance.now() - startTime,
9201
9231
  iterations: totalIterations
9202
- };
9232
+ });
9203
9233
  }
9204
9234
  };
9205
9235
  const SA_CONFIGS = [
@@ -9263,7 +9293,7 @@ function createSASolver(config) {
9263
9293
  if (options?.onProgress && i % progressInterval === 0) options.onProgress({
9264
9294
  solverId: config.id,
9265
9295
  percentage: Math.round(i / config.iterations * 100),
9266
- bestMakespan,
9296
+ bestObjective: bestMakespan,
9267
9297
  currentIteration: i,
9268
9298
  totalIterations: config.iterations
9269
9299
  });
@@ -9271,18 +9301,18 @@ function createSASolver(config) {
9271
9301
  options?.onProgress?.({
9272
9302
  solverId: config.id,
9273
9303
  percentage: 100,
9274
- bestMakespan,
9304
+ bestObjective: bestMakespan,
9275
9305
  currentIteration: config.iterations,
9276
9306
  totalIterations: config.iterations
9277
9307
  });
9278
- return {
9308
+ return makeSchedulingResult({
9279
9309
  solverId: config.id,
9280
9310
  solverName: config.name,
9281
9311
  makespan: bestMakespan,
9282
9312
  schedule: bestSchedule,
9283
9313
  elapsedMs: performance.now() - startTime,
9284
9314
  iterations: config.iterations
9285
- };
9315
+ });
9286
9316
  }
9287
9317
  };
9288
9318
  }
@@ -9349,7 +9379,7 @@ const tabuSolver = {
9349
9379
  if (options?.onProgress && iter % progressInterval === 0) options.onProgress({
9350
9380
  solverId: "tabu",
9351
9381
  percentage: Math.round(iter / ITERATIONS$1 * 100),
9352
- bestMakespan,
9382
+ bestObjective: bestMakespan,
9353
9383
  currentIteration: iter,
9354
9384
  totalIterations: ITERATIONS$1
9355
9385
  });
@@ -9357,18 +9387,18 @@ const tabuSolver = {
9357
9387
  options?.onProgress?.({
9358
9388
  solverId: "tabu",
9359
9389
  percentage: 100,
9360
- bestMakespan,
9390
+ bestObjective: bestMakespan,
9361
9391
  currentIteration: ITERATIONS$1,
9362
9392
  totalIterations: ITERATIONS$1
9363
9393
  });
9364
- return {
9394
+ return makeSchedulingResult({
9365
9395
  solverId: "tabu",
9366
9396
  solverName: "Tabu Search",
9367
9397
  makespan: bestMakespan,
9368
9398
  schedule: bestSchedule,
9369
9399
  elapsedMs: performance.now() - startTime,
9370
9400
  iterations: ITERATIONS$1
9371
- };
9401
+ });
9372
9402
  }
9373
9403
  };
9374
9404
  /**
@@ -9420,20 +9450,20 @@ const geneticAlgorithmSolver = {
9420
9450
  options?.onProgress?.({
9421
9451
  solverId: "genetic-algorithm",
9422
9452
  percentage: Math.round((gen + 1) / GENERATIONS * 100),
9423
- bestMakespan: bestIndividual.makespan,
9453
+ bestObjective: bestIndividual.makespan,
9424
9454
  currentIteration: gen + 1,
9425
9455
  totalIterations: GENERATIONS
9426
9456
  });
9427
9457
  }
9428
9458
  const bestSchedule = decodePermutation(bestIndividual.perm, problem);
9429
- return {
9459
+ return makeSchedulingResult({
9430
9460
  solverId: "genetic-algorithm",
9431
9461
  solverName: "Genetic Algorithm",
9432
9462
  makespan: bestIndividual.makespan,
9433
9463
  schedule: bestSchedule,
9434
9464
  elapsedMs: performance.now() - startTime,
9435
9465
  iterations: GENERATIONS * POPULATION_SIZE
9436
- };
9466
+ });
9437
9467
  }
9438
9468
  };
9439
9469
  function tournamentSelect(population, size, rng) {
@@ -9525,19 +9555,19 @@ const antColonySolver = {
9525
9555
  options?.onProgress?.({
9526
9556
  solverId: "ant-colony",
9527
9557
  percentage: Math.round((iter + 1) / ITERATIONS * 100),
9528
- bestMakespan,
9558
+ bestObjective: bestMakespan,
9529
9559
  currentIteration: iter + 1,
9530
9560
  totalIterations: ITERATIONS
9531
9561
  });
9532
9562
  }
9533
- return {
9563
+ return makeSchedulingResult({
9534
9564
  solverId: "ant-colony",
9535
9565
  solverName: "Ant Colony Optimization",
9536
9566
  makespan: bestMakespan,
9537
9567
  schedule: bestSchedule,
9538
9568
  elapsedMs: performance.now() - startTime,
9539
9569
  iterations: ITERATIONS * NUM_ANTS
9540
- };
9570
+ });
9541
9571
  }
9542
9572
  };
9543
9573
  /**
@@ -9813,7 +9843,7 @@ const highsSolver = {
9813
9843
  options?.onProgress?.({
9814
9844
  solverId: "highs",
9815
9845
  percentage,
9816
- bestMakespan
9846
+ bestObjective: bestMakespan
9817
9847
  });
9818
9848
  };
9819
9849
  reportProgress(0);
@@ -9863,14 +9893,14 @@ const highsSolver = {
9863
9893
  throw new Error(`[HiGHS] Solution validation failed: ${errorDetails}`);
9864
9894
  }
9865
9895
  reportProgress(100, makespan);
9866
- return {
9896
+ return makeSchedulingResult({
9867
9897
  solverId: "highs",
9868
9898
  solverName: "HiGHS (WASM)",
9869
9899
  makespan,
9870
9900
  schedule,
9871
9901
  elapsedMs: elapsed(startTime),
9872
9902
  iterations: 1
9873
- };
9903
+ });
9874
9904
  } catch (error) {
9875
9905
  reportProgress(0);
9876
9906
  throw error;
@@ -10517,26 +10547,27 @@ const allSolvers = [
10517
10547
  progress(0);
10518
10548
  const greedyResult = await greedySolver.solve(problem, {});
10519
10549
  progress(10);
10520
- const maxTime = greedyResult.makespan;
10521
- const encoded = encodeSchedulingWithMetadata(problem, maxTime);
10550
+ const greedyMakespan = greedyResult.objective;
10551
+ const greedySchedule = greedyResult.solution;
10552
+ const encoded = encodeSchedulingWithMetadata(problem, greedyMakespan);
10522
10553
  const numQubits = encoded.qubo.size;
10523
10554
  if (numQubits > MAX_QUBITS || numQubits === 0) {
10524
10555
  progress(100);
10525
- return {
10556
+ return makeSchedulingResult({
10526
10557
  solverId: "qaoa-local",
10527
10558
  solverName: "QAOA (Local)",
10528
- makespan: greedyResult.makespan,
10529
- schedule: greedyResult.schedule,
10559
+ makespan: greedyMakespan,
10560
+ schedule: greedySchedule,
10530
10561
  elapsedMs: elapsed(),
10531
10562
  metadata: {
10532
10563
  layers: LAYERS$1,
10533
10564
  shots: 0,
10534
10565
  gamma: 0,
10535
10566
  beta: 0,
10536
- rawMakespan: greedyResult.makespan,
10567
+ rawMakespan: greedyMakespan,
10537
10568
  usedFallback: true
10538
10569
  }
10539
- };
10570
+ });
10540
10571
  }
10541
10572
  const ising = quboToIsing(encoded.qubo);
10542
10573
  const backend = new LocalSimBackend();
@@ -10551,26 +10582,27 @@ const allSolvers = [
10551
10582
  const { probabilities } = await backend.run(numQubits, gates);
10552
10583
  const samples = sampleFromProbabilities(probabilities, FINAL_SHOTS$1);
10553
10584
  progress(90);
10554
- const candidates = [decodeFromArgmax(problem, encoded.variables, probabilities, greedyResult.schedule), decodeSamples(problem, encoded.variables, samples)].filter((d) => d !== null);
10585
+ const candidates = [decodeFromArgmax(problem, encoded.variables, probabilities, greedySchedule), decodeSamples(problem, encoded.variables, samples)].filter((d) => d !== null);
10555
10586
  const bestQuantum = candidates.length > 0 ? candidates.reduce((a, b) => b.makespan < a.makespan ? b : a) : null;
10556
- const usedFallback = bestQuantum === null || bestQuantum.makespan >= greedyResult.makespan;
10557
- const winner = usedFallback ? greedyResult : bestQuantum;
10587
+ const usedFallback = bestQuantum === null || bestQuantum.makespan >= greedyMakespan;
10588
+ const winnerMakespan = usedFallback ? greedyMakespan : bestQuantum.makespan;
10589
+ const winnerSchedule = usedFallback ? greedySchedule : bestQuantum.schedule;
10558
10590
  progress(100);
10559
- return {
10591
+ return makeSchedulingResult({
10560
10592
  solverId: "qaoa-local",
10561
10593
  solverName: "QAOA (Local)",
10562
- makespan: winner.makespan,
10563
- schedule: winner.schedule,
10594
+ makespan: winnerMakespan,
10595
+ schedule: winnerSchedule,
10564
10596
  elapsedMs: elapsed(),
10565
10597
  metadata: {
10566
10598
  layers: LAYERS$1,
10567
10599
  shots: FINAL_SHOTS$1,
10568
10600
  gamma,
10569
10601
  beta,
10570
- rawMakespan: bestQuantum?.makespan ?? greedyResult.makespan,
10602
+ rawMakespan: bestQuantum?.makespan ?? greedyMakespan,
10571
10603
  usedFallback
10572
10604
  }
10573
- };
10605
+ });
10574
10606
  }
10575
10607
  }
10576
10608
  ];
@@ -11249,7 +11281,7 @@ function continuousToy() {
11249
11281
  }
11250
11282
  schedulingToy(), routingToy(), packingToy(), assignmentToy(), networkToy(), partitioningToy(), selectionToy(), economicToy(), continuousToy();
11251
11283
  //#endregion
11252
- //#region ../../b4m-core/services/dist/tools-FLVnTwId.mjs
11284
+ //#region ../../b4m-core/services/dist/tools-B2RLL9dT.mjs
11253
11285
  async function performDeepResearch(context, params, config = {}) {
11254
11286
  const maxDepth = config.maxDepth || 7;
11255
11287
  const duration = config.duration || 4.5;
@@ -15278,13 +15310,13 @@ const knowledgeBaseRetrieveTool = {
15278
15310
  function formatResult$1(result) {
15279
15311
  const lines = [
15280
15312
  `Solver: ${result.solverName} (${result.solverId})`,
15281
- `Makespan: ${result.makespan}`,
15313
+ `Makespan: ${result.objective}`,
15282
15314
  `Elapsed: ${result.elapsedMs.toFixed(1)}ms`
15283
15315
  ];
15284
15316
  if (result.iterations !== void 0) lines.push(`Iterations: ${result.iterations}`);
15285
15317
  lines.push("Schedule:");
15286
15318
  const byMachine = /* @__PURE__ */ new Map();
15287
- for (const op of result.schedule) {
15319
+ for (const op of result.solution) {
15288
15320
  if (!byMachine.has(op.machineId)) byMachine.set(op.machineId, []);
15289
15321
  byMachine.get(op.machineId).push(op);
15290
15322
  }
@@ -15321,13 +15353,13 @@ async function runQuantumSchedule(params) {
15321
15353
  }
15322
15354
  }
15323
15355
  if (results.length === 0) return `Error: No solvers completed successfully.\n${errors.join("\n")}`;
15324
- results.sort((a, b) => a.makespan - b.makespan);
15356
+ results.sort((a, b) => a.objective - b.objective);
15325
15357
  const lines = [];
15326
15358
  lines.push(`## Scheduling Results for "${problem.name}"`);
15327
15359
  lines.push(`Problem: ${problem.jobs.length} jobs, ${problem.machines.length} machines, ${problem.jobs.reduce((s, j) => s + j.operations.length, 0)} operations`);
15328
15360
  lines.push("");
15329
15361
  if (results.length > 1) {
15330
- lines.push(`### Winner: ${results[0].solverName} (makespan: ${results[0].makespan})`);
15362
+ lines.push(`### Winner: ${results[0].solverName} (makespan: ${results[0].objective})`);
15331
15363
  lines.push("");
15332
15364
  }
15333
15365
  for (const result of results) {
@@ -1279,6 +1279,26 @@ let TagType = /* @__PURE__ */ function(TagType) {
1279
1279
  TagType["SESSION"] = "session";
1280
1280
  return TagType;
1281
1281
  }({});
1282
+ /**
1283
+ * SRE Agent Trio — Shared Types
1284
+ *
1285
+ * Types for the autonomous SRE pipeline:
1286
+ * Sentinel (error intake) → Diagnostician (LLM analysis) → Surgeon (automated fix)
1287
+ */
1288
+ let SreClassification = /* @__PURE__ */ function(SreClassification) {
1289
+ SreClassification["HIGH"] = "HIGH";
1290
+ SreClassification["MEDIUM"] = "MEDIUM";
1291
+ SreClassification["LOW"] = "LOW";
1292
+ SreClassification["SKIP"] = "SKIP";
1293
+ return SreClassification;
1294
+ }({});
1295
+ let SreSourceType = /* @__PURE__ */ function(SreSourceType) {
1296
+ SreSourceType["CLOUDWATCH"] = "CLOUDWATCH";
1297
+ SreSourceType["GITHUB_ISSUE"] = "GITHUB_ISSUE";
1298
+ return SreSourceType;
1299
+ }({});
1300
+ /** Default repo slug used for backward compatibility with existing data */
1301
+ const SRE_DEFAULT_REPO_SLUG = "MillionOnMars/lumina5";
1282
1302
  const SRE_BLOCKED_FILE_DEFAULTS = [
1283
1303
  "infra/**",
1284
1304
  "*.secret*",
@@ -1322,8 +1342,8 @@ const SreRepoConfigSchema = z.object({
1322
1342
  maxFixesPerDay: z.number().min(0).default(5),
1323
1343
  /** Max revision attempts before escalating to human */
1324
1344
  maxRevisions: z.number().int().min(0).max(10).default(2),
1325
- /** Max CI retry attempts before permanently failing (typecheck/apply-fix failures) */
1326
- maxCiRetries: z.number().int().min(0).max(3).default(1),
1345
+ /** Max CI retry attempts before permanently failing (typecheck/apply-fix/test failures) */
1346
+ maxCiRetries: z.number().int().min(0).max(3).default(2),
1327
1347
  /** Log actions without dispatching */
1328
1348
  dryRun: z.boolean().default(false),
1329
1349
  /** Comma-separated GitHub usernames to request as PR reviewers */
@@ -1461,6 +1481,67 @@ const SreAgentConfigSchema = z.preprocess((raw) => {
1461
1481
  return { repos: legacyRepo ? [legacyRepo] : [] };
1462
1482
  }, z.object({ repos: z.array(SreRepoConfigSchema).default([]) }));
1463
1483
  /**
1484
+ * Diagnosis payload as carried on the wire (revision requests embed it).
1485
+ * Named distinctly from `SreDiagnosisSchema` in @bike4mind/services (which validates
1486
+ * raw LLM output with min/max bounds + escalate fields) — this is the transport shape.
1487
+ */
1488
+ const SreWireDiagnosisSchema = z.object({
1489
+ rootCause: z.string(),
1490
+ proposedFix: z.string(),
1491
+ confidence: z.number(),
1492
+ riskAssessment: z.string(),
1493
+ affectedFiles: z.array(z.object({
1494
+ filePath: z.string(),
1495
+ before: z.string(),
1496
+ after: z.string(),
1497
+ kind: z.enum([
1498
+ "insert",
1499
+ "replace",
1500
+ "create"
1501
+ ]).default("replace")
1502
+ })).max(15),
1503
+ toolCalls: z.array(z.object({
1504
+ tool: z.string(),
1505
+ input: z.record(z.string(), z.unknown()),
1506
+ output: z.string()
1507
+ })).optional()
1508
+ });
1509
+ /** Analysis job payload (Sentinel → Diagnostician). */
1510
+ const SreEventPayloadSchema = z.object({
1511
+ source: z.nativeEnum(SreSourceType),
1512
+ fingerprint: z.string(),
1513
+ repoSlug: z.string().default(SRE_DEFAULT_REPO_SLUG),
1514
+ classification: z.nativeEnum(SreClassification),
1515
+ errorMessage: z.string(),
1516
+ stackTrace: z.string().optional(),
1517
+ functionName: z.string().optional(),
1518
+ logGroup: z.string().optional(),
1519
+ issueNumber: z.number().optional(),
1520
+ issueUrl: z.string().optional(),
1521
+ labels: z.array(z.string()).optional(),
1522
+ affectedUserIds: z.array(z.string()).optional(),
1523
+ dryRun: z.boolean().optional(),
1524
+ triggerAction: z.enum([
1525
+ "opened",
1526
+ "labeled",
1527
+ "reopened"
1528
+ ]).optional()
1529
+ });
1530
+ /** Revision job payload (PullRequestReviewHandler → Diagnostician re-run). */
1531
+ const SreRevisionRequestSchema = z.object({
1532
+ trackingId: z.string(),
1533
+ fingerprint: z.string(),
1534
+ repoSlug: z.string().default(SRE_DEFAULT_REPO_SLUG),
1535
+ branchName: z.string(),
1536
+ prNumber: z.number(),
1537
+ reviewBody: z.string().optional(),
1538
+ originalDiagnosis: SreWireDiagnosisSchema,
1539
+ source: z.nativeEnum(SreSourceType),
1540
+ issueNumber: z.number().optional(),
1541
+ ciFailureOutput: z.string().optional()
1542
+ });
1543
+ z.discriminatedUnion("jobType", [SreEventPayloadSchema.extend({ jobType: z.literal("analysis") }), SreRevisionRequestSchema.extend({ jobType: z.literal("revision") })]);
1544
+ /**
1464
1545
  * Configuration schema for the SecOps Triage feature.
1465
1546
  *
1466
1547
  * Controls automatic GitHub issue creation for critical/high ZAP scan findings.
@@ -10358,24 +10439,41 @@ dayjs.extend(localizedFormat);
10358
10439
  var dayjsConfig_default = dayjs;
10359
10440
  //#endregion
10360
10441
  //#region src/utils/apiUrl.ts
10361
- /** Bike4Mind production service (used when no customUrl is configured). */
10362
- const BIKE4MIND_URL = "https://app.bike4mind.com";
10442
+ /**
10443
+ * Default service endpoint, baked in at build time via tsdown's `env` option
10444
+ * (see `apps/cli/tsdown.config.ts`). The hosted publisher builds with its own
10445
+ * service as the default; a fork sets `B4M_DEFAULT_API_URL` to publish under a
10446
+ * different brand, so a fork's bundle never embeds the upstream brand literal.
10447
+ * Empty when unset — the user then supplies an endpoint via `/set-api` or the
10448
+ * `--dev` flag. (open-core, issue #9392)
10449
+ */
10450
+ function getDefaultApiUrl() {
10451
+ return "";
10452
+ }
10363
10453
  /** Local development server the `--dev` flag points the CLI at. */
10364
10454
  const LOCAL_DEV_URL = "http://localhost:3001";
10365
10455
  /**
10456
+ * Marketing/credits page shown when the user runs out of credits. Build-time
10457
+ * injected like {@link getDefaultApiUrl}; empty for an unbranded fork, in which
10458
+ * case the "purchase more credits" line is omitted entirely. (open-core #9392)
10459
+ */
10460
+ function getCreditsUrl() {
10461
+ return "";
10462
+ }
10463
+ /**
10366
10464
  * Resolve API URL based on configuration
10367
- * Returns custom URL if set, otherwise Bike4Mind main service
10465
+ * Returns custom URL if set, otherwise the build-time default service.
10368
10466
  */
10369
10467
  function getApiUrl(configApiConfig) {
10370
10468
  if (configApiConfig?.customUrl) return configApiConfig.customUrl;
10371
- return BIKE4MIND_URL;
10469
+ return getDefaultApiUrl();
10372
10470
  }
10373
10471
  /**
10374
10472
  * Get human-readable API type name
10375
10473
  */
10376
10474
  function getEnvironmentName(configApiConfig) {
10377
10475
  const url = configApiConfig?.customUrl;
10378
- if (!url) return "Production";
10476
+ if (!url) return getDefaultApiUrl() ? "Production" : "Unconfigured";
10379
10477
  if (/^https?:\/\/(localhost|127\.0\.0\.1)(:|\/|$)/i.test(url)) return "Local Dev";
10380
10478
  return "Self-Hosted";
10381
10479
  }
@@ -11358,8 +11456,8 @@ var ConfigStore = class {
11358
11456
  return (await this.load()).apiConfig;
11359
11457
  }
11360
11458
  /**
11361
- * Set custom API URL for self-hosted Bike4Mind instance
11362
- * Pass null to reset to Bike4Mind main service
11459
+ * Set custom API URL for a self-hosted instance.
11460
+ * Pass null to reset to the build-time default service.
11363
11461
  */
11364
11462
  async setCustomApiUrl(url) {
11365
11463
  const config = await this.load();
@@ -11373,7 +11471,7 @@ var ConfigStore = class {
11373
11471
  * return to an environment you've already authenticated.
11374
11472
  *
11375
11473
  * Targets:
11376
- * - 'prod' → Bike4Mind production (clears customUrl)
11474
+ * - 'prod' → the build-time default service (clears customUrl)
11377
11475
  * - 'dev' → local dev server (http://localhost:3001)
11378
11476
  * - { customUrl: '…' } → arbitrary self-hosted URL
11379
11477
  *
@@ -11383,11 +11481,11 @@ var ConfigStore = class {
11383
11481
  */
11384
11482
  async switchApiEnvironment(target) {
11385
11483
  const config = await this.load();
11386
- const prevKey = normalizeEnvKey(config.apiConfig?.customUrl || "https://app.bike4mind.com");
11484
+ const prevKey = normalizeEnvKey(config.apiConfig?.customUrl || getDefaultApiUrl());
11387
11485
  let newUrl;
11388
11486
  let newApiConfig;
11389
11487
  if (target === "prod") {
11390
- newUrl = BIKE4MIND_URL;
11488
+ newUrl = getDefaultApiUrl();
11391
11489
  newApiConfig = void 0;
11392
11490
  } else if (target === "dev") {
11393
11491
  newUrl = LOCAL_DEV_URL;
@@ -11534,4 +11632,4 @@ var ConfigStore = class {
11534
11632
  }
11535
11633
  };
11536
11634
  //#endregion
11537
- export { ProjectEvents as $, parseRateLimitHeaders as $t, GenerateImageToolCallSchema as A, dayjsConfig_default as At, InviteEvents as B, obfuscateApiKey as Bt, ElabsEvents as C, UnauthorizedError as Ct, ForbiddenError as D, VideoModels as Dt, FileEvents as E, VideoGenerationUsageTransaction as Et, ImageEditUsageTransaction as F, isGPTImageModel as Ft, ModalEvents as G, settingsMap as Gt, KnowledgeType as H, resolveNavigationIntents as Ht, ImageGenerationUsageTransaction as I, isModelAccessible as It, OpenAIEmbeddingModel as J, validateJupyterKernelName as Jt, ModelBackend as K, substituteArguments as Kt, ImageModels as L, isSupportedEmbeddingModel as Lt, GenericCreditDeductTransaction as M, getMcpProviderMetadata as Mt, HTTPError as N, getViewById as Nt, FriendshipEvents as O, XAI_IMAGE_MODELS as Ot, HttpStatus as P, isGPTImage2Model as Pt, ProfileEvents as Q, isNearLimit as Qt, InboxEvents as R, isZodError as Rt, DashboardParamsSchema as S, UiNavigationEvents as St, FeedbackEvents as T, VIDEO_SIZE_CONSTRAINTS as Tt, LLMEvents as U, sanitizeTelemetryError as Ut, InviteType as V, parseSkillArguments as Vt, MiscEvents as W, secureParameters as Wt, Permission as X, buildRateLimitLogEntry as Xt, OpenAIImageGenerationInput as Y, validateNotebookPath as Yt, PermissionDeniedError as Z, extractSnippetMeta as Zt, ChatCompletionCreateInputSchema as _, TaskScheduleHandler as _t, ALERT_THRESHOLDS as a, ReceivedCreditTransaction as at, CompletionApiUsageTransaction as b, ToolUsageTransaction as bt, ApiKeyScope as c, ResearchModeParamsSchema as ct, ArtifactTypeSchema as d, ResearchTaskType as dt, CollectionType as en, PromptIntentSchema as et, AuthEvents as f, SessionEvents as ft, CREDIT_DEDUCT_TRANSACTION_TYPES as g, TagType as gt, BadRequestError as h, SupportedFabFileMimeTypes as ht, getEnvironmentName as i, RealtimeVoiceUsageTransaction as it, GenericCreditAddTransaction as j, getAccessibleDataLakes as jt, GEMINI_IMAGE_MODELS as k, b4mLLMTools as kt, ApiKeyType as l, ResearchTaskExecutionType as lt, BFL_SAFETY_TOLERANCE as m, SubscriptionCreditTransaction as mt, logger as n, PurchaseTransaction as nt, AiEvents as o, RechartsChartTypeList as ot, BFL_IMAGE_MODELS as p, SpeechToTextUsageTransaction as pt, NotFoundError as q, toDataLakeConfig as qt, getApiUrl as r, QuestMasterParamsSchema as rt, ApiKeyEvents as s, RegInviteEvents as st, ConfigStore as t, PromptMetaZodSchema as tt, AppFileEvents as u, ResearchTaskPeriodicFrequencyType as ut, ChatModels as v, TextGenerationUsageTransaction as vt, FavoriteDocumentType as w, UnprocessableEntityError as wt, CorruptedFileError as x, TransferCreditTransaction as xt, ClaudeArtifactMimeTypes as y, TooManyRequestsError as yt, InternalServerError as z, mapMimeTypeToArtifactType as zt };
11635
+ export { PermissionDeniedError as $, extractSnippetMeta as $t, FriendshipEvents as A, XAI_IMAGE_MODELS as At, InboxEvents as B, isZodError as Bt, CorruptedFileError as C, TransferCreditTransaction as Ct, FeedbackEvents as D, VIDEO_SIZE_CONSTRAINTS as Dt, FavoriteDocumentType as E, UnprocessableEntityError as Et, HTTPError as F, getViewById as Ft, LLMEvents as G, sanitizeTelemetryError as Gt, InviteEvents as H, obfuscateApiKey as Ht, HttpStatus as I, isGPTImage2Model as It, ModelBackend as J, substituteArguments as Jt, MiscEvents as K, secureParameters as Kt, ImageEditUsageTransaction as L, isGPTImageModel as Lt, GenerateImageToolCallSchema as M, dayjsConfig_default as Mt, GenericCreditAddTransaction as N, getAccessibleDataLakes as Nt, FileEvents as O, VideoGenerationUsageTransaction as Ot, GenericCreditDeductTransaction as P, getMcpProviderMetadata as Pt, Permission as Q, buildRateLimitLogEntry as Qt, ImageGenerationUsageTransaction as R, isModelAccessible as Rt, CompletionApiUsageTransaction as S, ToolUsageTransaction as St, ElabsEvents as T, UnauthorizedError as Tt, InviteType as U, parseSkillArguments as Ut, InternalServerError as V, mapMimeTypeToArtifactType as Vt, KnowledgeType as W, resolveNavigationIntents as Wt, OpenAIEmbeddingModel as X, validateJupyterKernelName as Xt, NotFoundError as Y, toDataLakeConfig as Yt, OpenAIImageGenerationInput as Z, validateNotebookPath as Zt, BadRequestError as _, SupportedFabFileMimeTypes as _t, getDefaultApiUrl as a, QuestMasterParamsSchema as at, ChatModels as b, TextGenerationUsageTransaction as bt, AiEvents as c, RechartsChartTypeList as ct, ApiKeyType as d, ResearchTaskExecutionType as dt, isNearLimit as en, ProfileEvents as et, AppFileEvents as f, ResearchTaskPeriodicFrequencyType as ft, BFL_SAFETY_TOLERANCE as g, SubscriptionCreditTransaction as gt, BFL_IMAGE_MODELS as h, SpeechToTextUsageTransaction as ht, getCreditsUrl as i, PurchaseTransaction as it, GEMINI_IMAGE_MODELS as j, b4mLLMTools as jt, ForbiddenError as k, VideoModels as kt, ApiKeyEvents as l, RegInviteEvents as lt, AuthEvents as m, SessionEvents as mt, logger as n, CollectionType as nn, PromptIntentSchema as nt, getEnvironmentName as o, RealtimeVoiceUsageTransaction as ot, ArtifactTypeSchema as p, ResearchTaskType as pt, ModalEvents as q, settingsMap as qt, getApiUrl as r, PromptMetaZodSchema as rt, ALERT_THRESHOLDS as s, ReceivedCreditTransaction as st, ConfigStore as t, parseRateLimitHeaders as tn, ProjectEvents as tt, ApiKeyScope as u, ResearchModeParamsSchema as ut, CREDIT_DEDUCT_TRANSACTION_TYPES as v, TagType as vt, DashboardParamsSchema as w, UiNavigationEvents as wt, ClaudeArtifactMimeTypes as x, TooManyRequestsError as xt, ChatCompletionCreateInputSchema as y, TaskScheduleHandler as yt, ImageModels as z, isSupportedEmbeddingModel as zt };
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
- import { t as ConfigStore } from "../ConfigStore-7kcIJ-ux.mjs";
2
+ import { a as getDefaultApiUrl, t as ConfigStore } from "../ConfigStore-yJU1dxpP.mjs";
3
3
  //#region src/commands/apiCommand.ts
4
4
  /**
5
5
  * External API config command (--api-url / --reset-api)
6
6
  * Runs outside the interactive CLI session, before any auth flow.
7
7
  *
8
- * - `--reset-api`: clears customUrl, falling back to the Bike4Mind default
8
+ * - `--reset-api`: clears customUrl, falling back to the build-time default service
9
9
  * - `--api-url <url>`: sets a custom API URL (e.g. http://localhost:3000)
10
10
  *
11
11
  * Both clear auth tokens because they're bound to the old origin, and both
@@ -37,7 +37,8 @@ async function handleApiCommand(options) {
37
37
  }
38
38
  await configStore.setCustomApiUrl(null);
39
39
  await configStore.clearAuthTokens();
40
- console.log("\n✅ API URL reset to Bike4Mind main service");
40
+ const defaultUrl = getDefaultApiUrl();
41
+ console.log(`\n✅ API URL reset to the default service${defaultUrl ? ` (${defaultUrl})` : ""}`);
41
42
  console.log("🔓 Authentication cleared");
42
43
  console.log("💡 Run `b4m` to authenticate.\n");
43
44
  }
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as version } from "../package-DLM23Ze7.mjs";
2
+ import { t as version } from "../package-B3f78bSl.mjs";
3
3
  import { a as fetchLatestVersion, c as isNpmPrefixWritable, i as compareSemver } from "../updateChecker-C8xsNY2L.mjs";
4
4
  import { t as checkRipgrep } from "../ripgrepCheck-BmkyTK2i.mjs";
5
5
  import { execSync } from "child_process";
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as ConfigStore } from "../ConfigStore-7kcIJ-ux.mjs";
2
+ import { t as ConfigStore } from "../ConfigStore-yJU1dxpP.mjs";
3
3
  //#region src/commands/envCommand.ts
4
4
  /**
5
5
  * Environment switching for the `--dev` / `--prod` launch flags.
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import { C as createCoordinateTaskTool, D as FallbackLlmBackend, E as ApiClient, F as generateCliTools, G as ReActAgent, N as loadContextFiles, O as ServerLlmBackend, P as PermissionManager, Q as CheckpointStore, T as createAgentDelegateTool, W as setWebSocketToolExecutor, X as RemoteSkillSource, Y as isReadOnlyTool, Z as CustomCommandStore, _ as createGetFileStructureTool, a as WebSocketToolExecutor, b as createWriteTodosTool, et as SessionStore, i as McpManager, n as SubagentOrchestrator, o as WebSocketConnectionManager, q as buildSystemPrompt, r as AgentStore, s as WebSocketLlmBackend, t as BackgroundAgentManager, v as createFindDefinitionTool, w as createBackgroundAgentTools, x as createSkillTool, y as createTodoStore } from "../BackgroundAgentManager-DQjlUwRw.mjs";
3
- import { n as logger, r as getApiUrl, t as ConfigStore } from "../ConfigStore-7kcIJ-ux.mjs";
2
+ import { C as createCoordinateTaskTool, D as FallbackLlmBackend, E as ApiClient, F as generateCliTools, G as ReActAgent, N as loadContextFiles, O as ServerLlmBackend, P as PermissionManager, Q as CheckpointStore, T as createAgentDelegateTool, W as setWebSocketToolExecutor, X as RemoteSkillSource, Y as isReadOnlyTool, Z as CustomCommandStore, _ as createGetFileStructureTool, a as WebSocketToolExecutor, b as createWriteTodosTool, et as SessionStore, i as McpManager, n as SubagentOrchestrator, o as WebSocketConnectionManager, q as buildSystemPrompt, r as AgentStore, s as WebSocketLlmBackend, t as BackgroundAgentManager, v as createFindDefinitionTool, w as createBackgroundAgentTools, x as createSkillTool, y as createTodoStore } from "../BackgroundAgentManager-ChmoEU9H.mjs";
3
+ import { n as logger, r as getApiUrl, t as ConfigStore } from "../ConfigStore-yJU1dxpP.mjs";
4
4
  import { t as DEFAULT_SANDBOX_CONFIG } from "../types-LyRNHOiS.mjs";
5
5
  import { t as createSandboxRuntime } from "../SandboxRuntimeAdapter-ChGlxSGQ.mjs";
6
6
  import { t as SandboxOrchestrator } from "../SandboxOrchestrator-BoINxbX4.mjs";
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as ConfigStore } from "../ConfigStore-7kcIJ-ux.mjs";
2
+ import { t as ConfigStore } from "../ConfigStore-yJU1dxpP.mjs";
3
3
  //#region src/commands/mcpCommand.ts
4
4
  /**
5
5
  * External MCP commands (b4m mcp list, b4m mcp add, etc.)
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as version } from "../package-DLM23Ze7.mjs";
2
+ import { t as version } from "../package-B3f78bSl.mjs";
3
3
  import { c as isNpmPrefixWritable, l as setAutoUpdatePreference, n as REEXEC_GUARD_ENV, o as forceCheckForUpdate, r as checkForUpdate, s as getAutoUpdatePreference, t as INSTALL_CMD, u as shouldAttemptAutoUpdate } from "../updateChecker-C8xsNY2L.mjs";
4
4
  import { t as checkRipgrep } from "../ripgrepCheck-BmkyTK2i.mjs";
5
5
  import { execSync, spawnSync } from "child_process";
package/dist/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
- import { $ as CommandHistoryStore, A as substituteArguments, B as DEFAULT_RETRY_CONFIG, C as createCoordinateTaskTool, D as FallbackLlmBackend, E as ApiClient, F as generateCliTools, G as ReActAgent, H as clearFeatureModuleTools, I as getProcessHooks, J as buildSkillsPromptSection, K as getPlanModeFilePath, L as ALWAYS_DENIED_FOR_AGENTS, M as extractCompactInstructions, N as loadContextFiles, O as ServerLlmBackend, P as PermissionManager, Q as CheckpointStore, R as DEFAULT_AGENT_MODEL, S as parseAgentConfig, T as createAgentDelegateTool, U as registerFeatureModuleTools, V as DEFAULT_THOROUGHNESS, W as setWebSocketToolExecutor, X as RemoteSkillSource, Y as isReadOnlyTool, Z as CustomCommandStore, _ as createGetFileStructureTool, a as WebSocketToolExecutor, at as mergeCommands, b as createWriteTodosTool, c as createReviewGateStore, ct as warmFileCache, d as createBlockerStore, et as SessionStore, f as createBlockerTools, g as formatDecisionsOutput, h as createDecisionStore, i as McpManager, it as searchCommands, j as formatStep, k as isTransientNetworkError, l as createReviewGateTool, m as createDecisionLogTool, n as SubagentOrchestrator, nt as hasFileReferences, o as WebSocketConnectionManager, ot as formatFileSize, p as formatBlockersOutput, q as buildSystemPrompt, r as AgentStore, rt as processFileReferences, s as WebSocketLlmBackend, st as searchFiles, t as BackgroundAgentManager, tt as OAuthClient, u as formatReviewGatesOutput, v as createFindDefinitionTool, w as createBackgroundAgentTools, x as createSkillTool, y as createTodoStore, z as DEFAULT_MAX_ITERATIONS } from "./BackgroundAgentManager-DQjlUwRw.mjs";
2
+ import { $ as CommandHistoryStore, A as substituteArguments, B as DEFAULT_RETRY_CONFIG, C as createCoordinateTaskTool, D as FallbackLlmBackend, E as ApiClient, F as generateCliTools, G as ReActAgent, H as clearFeatureModuleTools, I as getProcessHooks, J as buildSkillsPromptSection, K as getPlanModeFilePath, L as ALWAYS_DENIED_FOR_AGENTS, M as extractCompactInstructions, N as loadContextFiles, O as ServerLlmBackend, P as PermissionManager, Q as CheckpointStore, R as DEFAULT_AGENT_MODEL, S as parseAgentConfig, T as createAgentDelegateTool, U as registerFeatureModuleTools, V as DEFAULT_THOROUGHNESS, W as setWebSocketToolExecutor, X as RemoteSkillSource, Y as isReadOnlyTool, Z as CustomCommandStore, _ as createGetFileStructureTool, a as WebSocketToolExecutor, at as mergeCommands, b as createWriteTodosTool, c as createReviewGateStore, ct as warmFileCache, d as createBlockerStore, et as SessionStore, f as createBlockerTools, g as formatDecisionsOutput, h as createDecisionStore, i as McpManager, it as searchCommands, j as formatStep, k as isTransientNetworkError, l as createReviewGateTool, m as createDecisionLogTool, n as SubagentOrchestrator, nt as hasFileReferences, o as WebSocketConnectionManager, ot as formatFileSize, p as formatBlockersOutput, q as buildSystemPrompt, r as AgentStore, rt as processFileReferences, s as WebSocketLlmBackend, st as searchFiles, t as BackgroundAgentManager, tt as OAuthClient, u as formatReviewGatesOutput, v as createFindDefinitionTool, w as createBackgroundAgentTools, x as createSkillTool, y as createTodoStore, z as DEFAULT_MAX_ITERATIONS } from "./BackgroundAgentManager-ChmoEU9H.mjs";
3
3
  import { n as useCliStore, t as selectActiveBackgroundAgents } from "./store-DV5s-qni.mjs";
4
- import { Jt as validateJupyterKernelName, Yt as validateNotebookPath$1, g as CREDIT_DEDUCT_TRANSACTION_TYPES, i as getEnvironmentName, n as logger, r as getApiUrl, t as ConfigStore, v as ChatModels } from "./ConfigStore-7kcIJ-ux.mjs";
5
- import { t as version } from "./package-DLM23Ze7.mjs";
4
+ import { Xt as validateJupyterKernelName, Zt as validateNotebookPath$1, b as ChatModels, i as getCreditsUrl, n as logger, o as getEnvironmentName, r as getApiUrl, t as ConfigStore, v as CREDIT_DEDUCT_TRANSACTION_TYPES } from "./ConfigStore-yJU1dxpP.mjs";
5
+ import { t as version } from "./package-B3f78bSl.mjs";
6
6
  import { r as checkForUpdate } from "./updateChecker-C8xsNY2L.mjs";
7
7
  import React, { useCallback, useEffect, useMemo, useReducer, useRef, useState } from "react";
8
8
  import { Box, Static, Text, render, useApp, useInput, usePaste, useStdout } from "ink";
@@ -8139,7 +8139,7 @@ Multi-line Input:
8139
8139
  console.log("Connect to a self-hosted Bike4Mind instance.");
8140
8140
  console.log("");
8141
8141
  console.log("Example:");
8142
- console.log(" /set-api https://bike4mind.mycompany.com");
8142
+ console.log(" /set-api https://app.your-instance.example.com");
8143
8143
  console.log("");
8144
8144
  return;
8145
8145
  }
@@ -8147,7 +8147,7 @@ Multi-line Input:
8147
8147
  new URL(url);
8148
8148
  } catch {
8149
8149
  console.log(`\n❌ Invalid URL: ${url}`);
8150
- console.log("Please provide a valid HTTPS URL (e.g., https://bike4mind.mycompany.com)\n");
8150
+ console.log("Please provide a valid HTTPS URL (e.g., https://app.your-instance.example.com)\n");
8151
8151
  return;
8152
8152
  }
8153
8153
  await state.configStore.setCustomApiUrl(url);
@@ -8569,7 +8569,8 @@ Multi-line Input:
8569
8569
  console.log(`Days Remaining: ${daysRemainingStr}`);
8570
8570
  if (currentCredits === 0) {
8571
8571
  console.log("\n⚠️ You have no credits remaining.");
8572
- console.log("💡 Visit bike4mind.io to purchase more credits.\n");
8572
+ const creditsUrl = getCreditsUrl();
8573
+ if (creditsUrl) console.log(`💡 Visit ${creditsUrl} to purchase more credits.\n`);
8573
8574
  break;
8574
8575
  }
8575
8576
  if (sortedModels.length > 0) {
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
2
  //#region package.json
3
- var version = "0.17.2";
3
+ var version = "0.18.0";
4
4
  //#endregion
5
5
  export { version as t };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bike4mind/cli",
3
- "version": "0.17.2",
3
+ "version": "0.18.0",
4
4
  "type": "module",
5
5
  "description": "Interactive CLI tool for Bike4Mind with ReAct agents",
6
6
  "license": "UNLICENSED",
@@ -107,8 +107,8 @@
107
107
  "zod": "^4.4.3",
108
108
  "zod-validation-error": "^5.0.0",
109
109
  "zustand": "^5.0.13",
110
- "@bike4mind/fab-pipeline": "0.4.2",
111
- "@bike4mind/llm-adapters": "0.6.0",
110
+ "@bike4mind/fab-pipeline": "0.4.4",
111
+ "@bike4mind/llm-adapters": "0.6.2",
112
112
  "@bike4mind/observability": "0.2.0"
113
113
  },
114
114
  "devDependencies": {
@@ -124,11 +124,11 @@
124
124
  "tsx": "^4.22.3",
125
125
  "typescript": "^5.9.3",
126
126
  "vitest": "^4.1.9",
127
- "@bike4mind/agents": "0.16.2",
128
- "@bike4mind/common": "2.114.0",
129
- "@bike4mind/mcp": "1.39.2",
130
- "@bike4mind/services": "2.98.0",
131
- "@bike4mind/utils": "2.25.2"
127
+ "@bike4mind/agents": "0.16.4",
128
+ "@bike4mind/common": "2.116.0",
129
+ "@bike4mind/mcp": "1.39.4",
130
+ "@bike4mind/services": "2.99.1",
131
+ "@bike4mind/utils": "2.25.4"
132
132
  },
133
133
  "optionalDependencies": {
134
134
  "@vscode/ripgrep": "^1.18.0"