@bike4mind/cli 0.20.1 → 0.21.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.
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ import { t as ProxyManager } from "./ProxyManager-C1-lgzEU.mjs";
3
+ export { ProxyManager };
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import { F as loadContextFiles, J as setWebSocketToolExecutor, L as generateCliTools, M as ReActAgent, X as buildSystemPrompt, Y as getPlanModeFilePath, a as McpManager, i as AgentStore, l as OllamaBackend, n as BackgroundAgentManager, o as createSseBackend, r as SubagentOrchestrator, s as ServerLlmBackend, t as AgentHistoryStore } from "./AgentHistoryStore-BQiATPsQ.mjs";
3
- import { n as logger } from "./ConfigStore-CNfbeaJf.mjs";
2
+ import { F as loadContextFiles, J as setWebSocketToolExecutor, L as generateCliTools, M as ReActAgent, X as buildSystemPrompt, Y as getPlanModeFilePath, a as McpManager, i as AgentStore, l as OllamaBackend, n as BackgroundAgentManager, o as createSseBackend, r as SubagentOrchestrator, s as ServerLlmBackend, t as AgentHistoryStore } from "./AgentHistoryStore-ucv6xXVT.mjs";
3
+ import { n as logger } from "./ConfigStore-CoY0l0gr.mjs";
4
4
  import { z as z$1 } from "zod";
5
5
  import WebSocket from "ws";
6
6
  //#region src/llm/NotifyingLlmBackend.ts
@@ -659,7 +659,7 @@ async function buildSandbox(input) {
659
659
  import("./SandboxRuntimeAdapter-CKelGICD.mjs"),
660
660
  import("./SandboxOrchestrator-BFPVpmB5.mjs"),
661
661
  import("./types-CqscS34o.mjs"),
662
- import("./ProxyManager-Bqr7Lmsd.mjs"),
662
+ import("./ProxyManager-B1jFWL7b.mjs"),
663
663
  import("./ViolationLogStore-byEhxa2A.mjs")
664
664
  ]);
665
665
  const sandboxConfig = config.sandbox ?? DEFAULT_SANDBOX_CONFIG;
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
- import { $ as RemoteSkillSource, A as FallbackLlmBackend, C as createWriteTodosTool, D as createResumeAgentTool, E as createCoordinateTaskTool, I as PermissionManager, J as setWebSocketToolExecutor, O as createBackgroundAgentTools, Q as isReadOnlyTool, S as createTodoStore, et as CustomCommandStore, k as createAgentDelegateTool, nt as SessionStore, tt as CheckpointStore, w as createSkillTool, x as createFindDefinitionTool, y as createGetFileStructureTool } from "../AgentHistoryStore-BQiATPsQ.mjs";
3
- import { c as requireApiUrl, n as logger, t as ConfigStore } from "../ConfigStore-CNfbeaJf.mjs";
4
- import { t as ApiClient } from "../ApiClient-BPmlalut.mjs";
5
- import { a as createToolSearchTool, i as buildLlmBackend, n as buildSupportingStores, o as deferredToolRegistry, r as buildSandbox, s as NotifyingLlmBackend, t as buildAgent } from "../buildAgent-DwPvcTpz.mjs";
2
+ import { $ as RemoteSkillSource, A as FallbackLlmBackend, C as createWriteTodosTool, D as createResumeAgentTool, E as createCoordinateTaskTool, I as PermissionManager, J as setWebSocketToolExecutor, O as createBackgroundAgentTools, Q as isReadOnlyTool, S as createTodoStore, et as CustomCommandStore, k as createAgentDelegateTool, nt as SessionStore, tt as CheckpointStore, w as createSkillTool, x as createFindDefinitionTool, y as createGetFileStructureTool } from "../AgentHistoryStore-ucv6xXVT.mjs";
3
+ import { c as requireApiUrl, n as logger, t as ConfigStore } from "../ConfigStore-CoY0l0gr.mjs";
4
+ import { t as ApiClient } from "../ApiClient-Ut1MXtOs.mjs";
5
+ import { a as createToolSearchTool, i as buildLlmBackend, n as buildSupportingStores, o as deferredToolRegistry, r as buildSandbox, s as NotifyingLlmBackend, t as buildAgent } from "../buildAgent-jZhBReAr.mjs";
6
6
  import { randomUUID } from "crypto";
7
7
  import { existsSync, realpathSync, statSync } from "fs";
8
8
  import { isAbsolute } from "path";
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { l as resolveApiEndpoint, s as parseApiUrl, t as ConfigStore } from "../ConfigStore-CNfbeaJf.mjs";
2
+ import { l as resolveApiEndpoint, s as parseApiUrl, t as ConfigStore } from "../ConfigStore-CoY0l0gr.mjs";
3
3
  //#region src/commands/apiCommand.ts
4
4
  /**
5
5
  * External API config command (--api-url / --reset-api)
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as version } from "../package-CxHSRXdp.mjs";
2
+ import { t as version } from "../package-CfIETbXd.mjs";
3
3
  import { a as fetchLatestVersion, c as isNpmPrefixWritable, i as compareSemver } from "../updateChecker-CQW8bxo6.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-CNfbeaJf.mjs";
2
+ import { t as ConfigStore } from "../ConfigStore-CoY0l0gr.mjs";
3
3
  //#region src/commands/envCommand.ts
4
4
  /**
5
5
  * Environment switching for the `--dev` / `--prod` launch flags.
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
- import { $ as RemoteSkillSource, A as FallbackLlmBackend, B as classifyCommandRisk, C as createWriteTodosTool, D as createResumeAgentTool, E as createCoordinateTaskTool, F as loadContextFiles, I as PermissionManager, J as setWebSocketToolExecutor, L as generateCliTools, M as ReActAgent, O as createBackgroundAgentTools, Q as isReadOnlyTool, S as createTodoStore, X as buildSystemPrompt, a as McpManager, b as createWorkItemTools, et as CustomCommandStore, i as AgentStore, k as createAgentDelegateTool, n as BackgroundAgentManager, nt as SessionStore, o as createSseBackend, r as SubagentOrchestrator, t as AgentHistoryStore, tt as CheckpointStore, w as createSkillTool, x as createFindDefinitionTool, y as createGetFileStructureTool, z as SHELL_LIKE_TOOL_COMMAND_FIELDS } from "../AgentHistoryStore-BQiATPsQ.mjs";
3
- import { c as requireApiUrl, n as logger, t as ConfigStore } from "../ConfigStore-CNfbeaJf.mjs";
4
- import { t as ApiClient } from "../ApiClient-BPmlalut.mjs";
2
+ import { $ as RemoteSkillSource, A as FallbackLlmBackend, B as classifyCommandRisk, C as createWriteTodosTool, D as createResumeAgentTool, E as createCoordinateTaskTool, F as loadContextFiles, I as PermissionManager, J as setWebSocketToolExecutor, L as generateCliTools, M as ReActAgent, O as createBackgroundAgentTools, Q as isReadOnlyTool, S as createTodoStore, X as buildSystemPrompt, a as McpManager, b as createWorkItemTools, et as CustomCommandStore, i as AgentStore, k as createAgentDelegateTool, n as BackgroundAgentManager, nt as SessionStore, o as createSseBackend, r as SubagentOrchestrator, t as AgentHistoryStore, tt as CheckpointStore, w as createSkillTool, x as createFindDefinitionTool, y as createGetFileStructureTool, z as SHELL_LIKE_TOOL_COMMAND_FIELDS } from "../AgentHistoryStore-ucv6xXVT.mjs";
3
+ import { c as requireApiUrl, n as logger, t as ConfigStore } from "../ConfigStore-CoY0l0gr.mjs";
4
+ import { t as ApiClient } from "../ApiClient-Ut1MXtOs.mjs";
5
5
  import { t as DEFAULT_SANDBOX_CONFIG } from "../types-LyRNHOiS.mjs";
6
6
  import { r as reconstructTurnBlocks, t as WorkItemsClient } from "../WorkItemsClient-Cow6nXx7.mjs";
7
7
  import { t as createSandboxRuntime } from "../SandboxRuntimeAdapter-ChGlxSGQ.mjs";
8
8
  import { t as SandboxOrchestrator } from "../SandboxOrchestrator-C8uleDn2.mjs";
9
- import { t as ProxyManager } from "../ProxyManager-C5H0pUyK.mjs";
9
+ import { t as ProxyManager } from "../ProxyManager-C1-lgzEU.mjs";
10
10
  import { randomBytes } from "crypto";
11
11
  import { v4 } from "uuid";
12
12
  import { readFile } from "fs/promises";
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import { t as ConfigStore } from "../ConfigStore-CNfbeaJf.mjs";
3
- import { t as version } from "../package-CxHSRXdp.mjs";
2
+ import { t as ConfigStore } from "../ConfigStore-CoY0l0gr.mjs";
3
+ import { t as version } from "../package-CfIETbXd.mjs";
4
4
  //#region src/commands/mcpCommand.ts
5
5
  /**
6
6
  * External MCP commands (b4m mcp list, b4m mcp add, etc.)
@@ -70,7 +70,7 @@ async function handleMcpCommand(subcommand, argv) {
70
70
  await handleDisable(config, argv.name, configStore);
71
71
  break;
72
72
  case "serve": {
73
- const { handleMcpServeCommand } = await import("../serve-Du3HiqAH.mjs");
73
+ const { handleMcpServeCommand } = await import("../serve-C9UDR5px.mjs");
74
74
  await handleMcpServeCommand({
75
75
  http: Boolean(argv.http),
76
76
  port: typeof argv.port === "number" ? argv.port : void 0,
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { n as getDefaultPluginsDir, r as isFeatureEnabled, t as PluginStore } from "../PluginStore-DwvOJ-G3.mjs";
3
- import { t as ConfigStore } from "../ConfigStore-CNfbeaJf.mjs";
3
+ import { t as ConfigStore } from "../ConfigStore-CoY0l0gr.mjs";
4
4
  import { execFileSync } from "child_process";
5
5
  import { promises } from "fs";
6
6
  import path from "path";
@@ -180,6 +180,8 @@ async function handleRemove(name, pluginsDir, configStore) {
180
180
  "uninstall",
181
181
  "--prefix",
182
182
  pluginsDir,
183
+ "--no-fund",
184
+ "--no-audit",
183
185
  plugin.name
184
186
  ], pluginsDir, "remove", plugin.name);
185
187
  if (plugin.valid) {
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as version } from "../package-CxHSRXdp.mjs";
2
+ import { t as version } from "../package-CfIETbXd.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-CQW8bxo6.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,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
- import { $ as RemoteSkillSource, A as FallbackLlmBackend, C as createWriteTodosTool, D as createResumeAgentTool, E as createCoordinateTaskTool, G as DEFAULT_THOROUGHNESS, H as DEFAULT_AGENT_MODEL, I as PermissionManager, J as setWebSocketToolExecutor, K as clearFeatureModuleTools, N as findIterationBoundary, O as createBackgroundAgentTools, P as extractCompactInstructions, Q as isReadOnlyTool, R as getProcessHooks, S as createTodoStore, T as parseAgentConfig, U as DEFAULT_MAX_ITERATIONS, V as ALWAYS_DENIED_FOR_AGENTS, W as DEFAULT_RETRY_CONFIG, X as buildSystemPrompt, Y as getPlanModeFilePath, Z as buildSkillsPromptSection, _ as createDecisionStore, at as searchCommands, b as createWorkItemTools, c as isTransientNetworkError, ct as searchFiles, d as createReviewGateTool, et as CustomCommandStore, f as formatReviewGatesOutput, ft as MAX_PASTE_SIZE, g as createDecisionLogTool, h as formatBlockersOutput, it as processFileReferences, j as substituteArguments, k as createAgentDelegateTool, lt as warmFileCache, m as createBlockerTools, nt as SessionStore, ot as mergeCommands, p as createBlockerStore, q as registerFeatureModuleTools, rt as hasFileReferences, st as formatFileSize, tt as CheckpointStore, u as createReviewGateStore, ut as COMPACTION_SUMMARY_MARKER, v as formatDecisionsOutput, w as createSkillTool, x as createFindDefinitionTool, y as createGetFileStructureTool } from "./AgentHistoryStore-BQiATPsQ.mjs";
2
+ import { $ as RemoteSkillSource, A as FallbackLlmBackend, C as createWriteTodosTool, D as createResumeAgentTool, E as createCoordinateTaskTool, G as DEFAULT_THOROUGHNESS, H as DEFAULT_AGENT_MODEL, I as PermissionManager, J as setWebSocketToolExecutor, K as clearFeatureModuleTools, N as findIterationBoundary, O as createBackgroundAgentTools, P as extractCompactInstructions, Q as isReadOnlyTool, R as getProcessHooks, S as createTodoStore, T as parseAgentConfig, U as DEFAULT_MAX_ITERATIONS, V as ALWAYS_DENIED_FOR_AGENTS, W as DEFAULT_RETRY_CONFIG, X as buildSystemPrompt, Y as getPlanModeFilePath, Z as buildSkillsPromptSection, _ as createDecisionStore, at as searchCommands, b as createWorkItemTools, c as isTransientNetworkError, ct as searchFiles, d as createReviewGateTool, et as CustomCommandStore, f as formatReviewGatesOutput, ft as MAX_PASTE_SIZE, g as createDecisionLogTool, h as formatBlockersOutput, it as processFileReferences, j as substituteArguments, k as createAgentDelegateTool, lt as warmFileCache, m as createBlockerTools, nt as SessionStore, ot as mergeCommands, p as createBlockerStore, q as registerFeatureModuleTools, rt as hasFileReferences, st as formatFileSize, tt as CheckpointStore, u as createReviewGateStore, ut as COMPACTION_SUMMARY_MARKER, v as formatDecisionsOutput, w as createSkillTool, x as createFindDefinitionTool, y as createGetFileStructureTool } from "./AgentHistoryStore-ucv6xXVT.mjs";
3
3
  import { a as selectLiveSubagentTokens, i as selectLiveSubagentCredits, n as selectActiveBackgroundShells, o as useCliStore, r as selectCompletedBackgroundShells, t as selectActiveBackgroundAgents } from "./store-CvjTpQPs.mjs";
4
4
  import { r as isFeatureEnabled, t as PluginStore } from "./PluginStore-DwvOJ-G3.mjs";
5
- import { a as getCreditsUrl, b as CREDIT_DEDUCT_TRANSACTION_TYPES, c as requireApiUrl, i as LOCAL_DEV_URL, l as resolveApiEndpoint, n as logger, o as getEnvironmentName, r as ApiEndpointUnconfiguredError, s as parseApiUrl, t as ConfigStore, x as ChatModels } from "./ConfigStore-CNfbeaJf.mjs";
5
+ import { Jt as ACTOR_COLOR_SLOTS, Qt as selfClaimedActorKindSchema, X as REVIEW_GATE_STATUS_VALUES, Xt as actorKindMarker, Yt as actorColorIndex, Z as SUBQUEST_STATUS_VALUES, Zt as actorKindSchema, a as getCreditsUrl, b as CREDIT_DEDUCT_TRANSACTION_TYPES, c as requireApiUrl, i as LOCAL_DEV_URL, l as resolveApiEndpoint, n as logger, o as getEnvironmentName, r as ApiEndpointUnconfiguredError, s as parseApiUrl, t as ConfigStore, x as ChatModels, yt as isEarlyStop } from "./ConfigStore-CoY0l0gr.mjs";
6
6
  import { t as getShellSessionManager } from "./ShellSessionManager-6o8KZzl1-vrbPAUTq.mjs";
7
- import { n as OAuthClient, t as ApiClient } from "./ApiClient-BPmlalut.mjs";
7
+ import { n as OAuthClient, t as ApiClient } from "./ApiClient-Ut1MXtOs.mjs";
8
8
  import { i as getTokenCounter, n as ConversationContext, r as reconstructTurnBlocks, t as WorkItemsClient } from "./WorkItemsClient-Cow6nXx7.mjs";
9
- import { a as createToolSearchTool, i as buildLlmBackend, n as buildSupportingStores, o as deferredToolRegistry, r as buildSandbox, s as NotifyingLlmBackend, t as buildAgent } from "./buildAgent-DwPvcTpz.mjs";
10
- import { t as version } from "./package-CxHSRXdp.mjs";
9
+ import { a as createToolSearchTool, i as buildLlmBackend, n as buildSupportingStores, o as deferredToolRegistry, r as buildSandbox, s as NotifyingLlmBackend, t as buildAgent } from "./buildAgent-jZhBReAr.mjs";
10
+ import { t as version } from "./package-CfIETbXd.mjs";
11
11
  import { r as checkForUpdate } from "./updateChecker-CQW8bxo6.mjs";
12
12
  import React, { useCallback, useEffect, useMemo, useReducer, useRef, useState, useSyncExternalStore } from "react";
13
13
  import { Box, Static, Text, render, useApp, useInput, usePaste, useStdout } from "ink";
@@ -22,10 +22,9 @@ import Spinner from "ink-spinner";
22
22
  import { useShallow } from "zustand/react/shallow";
23
23
  import TextInput from "ink-text-input";
24
24
  import { z as z$1 } from "zod";
25
+ import axios, { isAxiosError } from "axios";
25
26
  import { marked } from "marked";
26
27
  import { highlight } from "cli-highlight";
27
- import { ACTOR_COLOR_SLOTS, actorColorIndex, actorKindMarker, actorKindSchema, selfClaimedActorKindSchema } from "@bike4mind/hearth";
28
- import axios, { isAxiosError } from "axios";
29
28
  import SelectInput from "ink-select-input";
30
29
  import jwt from "jsonwebtoken";
31
30
  import open from "open";
@@ -1600,6 +1599,38 @@ const MAX_ITERATIONS_OPTIONS = [
1600
1599
  value: null
1601
1600
  }
1602
1601
  ];
1602
+ /**
1603
+ * 'Auto' (undefined) is first because it is the default and the right answer for almost
1604
+ * everyone: the server then sizes the output ceiling per model, which is what keeps
1605
+ * reasoning models from spending the whole budget on thinking and truncating the answer.
1606
+ * The explicit values exist for deliberately capping a run.
1607
+ */
1608
+ const MAX_TOKENS_OPTIONS = [
1609
+ {
1610
+ label: "Auto (sized for model)",
1611
+ value: void 0
1612
+ },
1613
+ {
1614
+ label: "4096",
1615
+ value: 4096
1616
+ },
1617
+ {
1618
+ label: "8192",
1619
+ value: 8192
1620
+ },
1621
+ {
1622
+ label: "16384",
1623
+ value: 16384
1624
+ },
1625
+ {
1626
+ label: "32000",
1627
+ value: 32e3
1628
+ },
1629
+ {
1630
+ label: "64000",
1631
+ value: 64e3
1632
+ }
1633
+ ];
1603
1634
  const THEME_OPTIONS = [{
1604
1635
  label: "dark",
1605
1636
  value: "dark"
@@ -1654,10 +1685,8 @@ function buildConfigItems(availableModels, pluginDescriptors = []) {
1654
1685
  }, {
1655
1686
  key: "maxTokens",
1656
1687
  label: "Max Tokens",
1657
- type: "number",
1658
- min: 256,
1659
- max: 128e3,
1660
- step: 256,
1688
+ type: "select",
1689
+ options: MAX_TOKENS_OPTIONS,
1661
1690
  getValue: (config) => config.preferences.maxTokens,
1662
1691
  setValue: (config, value) => ({
1663
1692
  ...config,
@@ -2389,7 +2418,7 @@ const MessageItem = React.memo(function MessageItem({ message, showThoughts = tr
2389
2418
  }, message.metadata?.permissionDenied ? /* @__PURE__ */ React.createElement(Text, { color: "yellow" }, "⚠️ ", message.content) : /* @__PURE__ */ React.createElement(MarkdownRenderer, {
2390
2419
  content: message.content,
2391
2420
  columns: terminalCols
2392
- })), !isUser && message.content !== "..." && message.metadata && /* @__PURE__ */ React.createElement(Box, {
2421
+ })), !isUser && message.metadata?.earlyStopReason && /* @__PURE__ */ React.createElement(Box, { paddingLeft: 2 }, /* @__PURE__ */ React.createElement(Text, { color: "yellow" }, message.metadata.earlyStopReason === "degenerate_repetition" ? "⚠ Response stopped early: it began repeating itself. Try rephrasing the request." : "⚠ Response was cut off at the output-token limit. Type \"continue\" to resume, or raise Max Tokens in /config.")), !isUser && message.content !== "..." && message.metadata && /* @__PURE__ */ React.createElement(Box, {
2393
2422
  paddingLeft: 2,
2394
2423
  marginBottom: 1
2395
2424
  }, (message.metadata.tokenUsage?.total || message.metadata.creditsUsed) && /* @__PURE__ */ React.createElement(Text, { dimColor: true }, "(", message.metadata.tokenUsage?.total ? `${message.metadata.tokenUsage.total.toLocaleString()} tokens` : "", message.metadata.creditsUsed && message.metadata.creditsUsed > 0 ? (message.metadata.tokenUsage?.total ? " • " : "") + `used ${message.metadata.creditsUsed.toLocaleString()} ${message.metadata.creditsUsed === 1 ? "credit" : "credits"}` : "", ")")));
@@ -4941,22 +4970,12 @@ z$1.object({
4941
4970
  const SubQuestSchema = z$1.object({
4942
4971
  id: z$1.string(),
4943
4972
  title: z$1.string(),
4944
- status: z$1.enum([
4945
- "not_started",
4946
- "in_progress",
4947
- "completed",
4948
- "skipped",
4949
- "deleted"
4950
- ]),
4973
+ status: z$1.enum(SUBQUEST_STATUS_VALUES),
4951
4974
  questId: z$1.string().optional(),
4952
4975
  startedAt: z$1.number().optional(),
4953
4976
  evidence: z$1.string().optional(),
4954
4977
  reviewGate: z$1.boolean().optional(),
4955
- reviewStatus: z$1.enum([
4956
- "pending",
4957
- "approved",
4958
- "rejected"
4959
- ]).optional(),
4978
+ reviewStatus: z$1.enum(REVIEW_GATE_STATUS_VALUES).optional(),
4960
4979
  reviewNote: z$1.string().optional()
4961
4980
  });
4962
4981
  /** Quest containing sub-quests */
@@ -5001,24 +5020,14 @@ z$1.object({
5001
5020
  planId: z$1.string(),
5002
5021
  questId: z$1.string(),
5003
5022
  subQuestId: z$1.string(),
5004
- reviewStatus: z$1.enum([
5005
- "pending",
5006
- "approved",
5007
- "rejected"
5008
- ]),
5023
+ reviewStatus: z$1.enum(REVIEW_GATE_STATUS_VALUES),
5009
5024
  reviewNote: z$1.string().optional()
5010
5025
  });
5011
5026
  z$1.object({
5012
5027
  planId: z$1.string(),
5013
5028
  questId: z$1.string(),
5014
5029
  subQuestId: z$1.string(),
5015
- status: z$1.enum([
5016
- "not_started",
5017
- "in_progress",
5018
- "completed",
5019
- "skipped",
5020
- "deleted"
5021
- ]).optional(),
5030
+ status: z$1.enum(SUBQUEST_STATUS_VALUES).optional(),
5022
5031
  evidence: z$1.string().optional(),
5023
5032
  timeSpent: z$1.number().optional()
5024
5033
  });
@@ -5079,24 +5088,14 @@ const UpdateReviewGateParamsSchema = z$1.object({
5079
5088
  plan_id: z$1.string().min(1),
5080
5089
  quest_id: z$1.string().min(1),
5081
5090
  sub_quest_id: z$1.string().min(1),
5082
- review_status: z$1.enum([
5083
- "pending",
5084
- "approved",
5085
- "rejected"
5086
- ]),
5091
+ review_status: z$1.enum(REVIEW_GATE_STATUS_VALUES),
5087
5092
  review_note: z$1.string().optional()
5088
5093
  });
5089
5094
  const UpdateQuestProgressParamsSchema = z$1.object({
5090
5095
  plan_id: z$1.string().min(1),
5091
5096
  quest_id: z$1.string().min(1),
5092
5097
  sub_quest_id: z$1.string().min(1),
5093
- status: z$1.enum([
5094
- "not_started",
5095
- "in_progress",
5096
- "completed",
5097
- "skipped",
5098
- "deleted"
5099
- ]).optional(),
5098
+ status: z$1.enum(SUBQUEST_STATUS_VALUES).optional(),
5100
5099
  evidence: z$1.string().optional(),
5101
5100
  time_spent: z$1.number().min(0).optional()
5102
5101
  });
@@ -5704,11 +5703,7 @@ function createUpdateReviewGateTool(service) {
5704
5703
  review_status: {
5705
5704
  type: "string",
5706
5705
  description: "The review decision",
5707
- enum: [
5708
- "pending",
5709
- "approved",
5710
- "rejected"
5711
- ]
5706
+ enum: [...REVIEW_GATE_STATUS_VALUES]
5712
5707
  },
5713
5708
  review_note: {
5714
5709
  type: "string",
@@ -5753,13 +5748,7 @@ function createUpdateQuestProgressTool(service) {
5753
5748
  status: {
5754
5749
  type: "string",
5755
5750
  description: "New status for the sub-quest",
5756
- enum: [
5757
- "not_started",
5758
- "in_progress",
5759
- "completed",
5760
- "skipped",
5761
- "deleted"
5762
- ]
5751
+ enum: [...SUBQUEST_STATUS_VALUES]
5763
5752
  },
5764
5753
  evidence: {
5765
5754
  type: "string",
@@ -7386,7 +7375,8 @@ async function runTurn(message, ctx) {
7386
7375
  },
7387
7376
  creditsUsed: result.completionInfo.totalCredits,
7388
7377
  steps: result.steps.map(formatStep),
7389
- permissionDenied
7378
+ permissionDenied,
7379
+ ...isEarlyStop(result.completionInfo.finishReason) ? { earlyStopReason: result.completionInfo.finishReason } : {}
7390
7380
  }
7391
7381
  };
7392
7382
  useCliStore.getState().completePendingMessage(0, finalAssistantMessage);
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
2
  //#region package.json
3
- var version = "0.20.1";
3
+ var version = "0.21.0";
4
4
  //#endregion
5
5
  export { version as t };
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import { c as requireApiUrl, d as AGENT_QUEST_MANIFEST, f as AGENT_QUEST_MCP_URI, n as logger, s as parseApiUrl, t as ConfigStore, u as AGENT_QUEST_ID } from "./ConfigStore-CNfbeaJf.mjs";
3
- import { t as ApiClient } from "./ApiClient-BPmlalut.mjs";
2
+ import { W as PROMPT_TEXT_MAX, c as requireApiUrl, d as AGENT_QUEST_MANIFEST, f as AGENT_QUEST_MCP_URI, n as logger, s as parseApiUrl, t as ConfigStore, u as AGENT_QUEST_ID } from "./ConfigStore-CoY0l0gr.mjs";
3
+ import { t as ApiClient } from "./ApiClient-Ut1MXtOs.mjs";
4
4
  import { z as z$1 } from "zod";
5
5
  import { isAxiosError } from "axios";
6
6
  import { Writable } from "node:stream";
@@ -54,6 +54,7 @@ var B4mApiClient = class {
54
54
  ...args.notebookId ? { sessionId: args.notebookId } : {},
55
55
  message: args.message,
56
56
  ...args.model ? { model: args.model } : {},
57
+ ...args.systemPrompt ? { systemPrompt: args.systemPrompt } : {},
57
58
  wait: true
58
59
  });
59
60
  }
@@ -280,7 +281,8 @@ const createNotebookShape = {
280
281
  const sendMessageShape = {
281
282
  message: z$1.string().describe("The message to send"),
282
283
  notebookId: z$1.string().optional().describe("Notebook to send to; defaults to the most recent"),
283
- model: z$1.string().optional().describe("Model id to use; defaults to the instance default")
284
+ model: z$1.string().optional().describe("Model id to use; defaults to the instance default"),
285
+ systemPrompt: z$1.string().max(PROMPT_TEXT_MAX).optional().describe("Caller-supplied system-prompt text for this message only; refines but never overrides other guidance")
284
286
  };
285
287
  const searchKnowledgeBaseShape = {
286
288
  query: z$1.string().describe("The search query"),
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@bike4mind/cli",
3
- "version": "0.20.1",
3
+ "version": "0.21.0",
4
+ "mcpName": "io.github.bike4mind/bike4mind",
4
5
  "type": "module",
5
6
  "description": "Interactive CLI tool for Bike4Mind with ReAct agents",
6
7
  "license": "UNLICENSED",
@@ -98,7 +99,7 @@
98
99
  "tldts": "^7.4.8",
99
100
  "tree-sitter-wasms": "^0.1.13",
100
101
  "turndown": "^7.2.4",
101
- "undici": "^7.28.0",
102
+ "undici": "^7.29.0",
102
103
  "unpdf": "^1.6.2",
103
104
  "uuid": "^14.0.1",
104
105
  "voyageai": "^0.4.0",
@@ -109,8 +110,7 @@
109
110
  "yauzl": "^3.4.0",
110
111
  "zod": "^4.4.3",
111
112
  "zod-validation-error": "^5.0.0",
112
- "zustand": "^5.0.13",
113
- "@bike4mind/hearth": "0.3.0"
113
+ "zustand": "^5.0.13"
114
114
  },
115
115
  "devDependencies": {
116
116
  "@types/better-sqlite3": "^7.6.13",
@@ -126,14 +126,15 @@
126
126
  "tsx": "^4.23.0",
127
127
  "typescript": "^5.9.3",
128
128
  "vitest": "^4.1.10",
129
- "@bike4mind/agents": "0.20.2",
130
- "@bike4mind/common": "5.0.0",
131
- "@bike4mind/fab-pipeline": "1.1.0",
132
- "@bike4mind/llm-adapters": "0.11.2",
133
- "@bike4mind/mcp": "1.41.3",
129
+ "@bike4mind/agents": "1.0.0",
130
+ "@bike4mind/common": "7.0.0",
131
+ "@bike4mind/fab-pipeline": "1.3.0",
132
+ "@bike4mind/hearth": "0.3.0",
133
+ "@bike4mind/llm-adapters": "0.12.1",
134
+ "@bike4mind/mcp": "2.0.0",
134
135
  "@bike4mind/observability": "0.2.0",
135
- "@bike4mind/services": "6.0.0",
136
- "@bike4mind/utils": "4.1.0"
136
+ "@bike4mind/services": "7.0.0",
137
+ "@bike4mind/utils": "5.0.0"
137
138
  },
138
139
  "optionalDependencies": {
139
140
  "@vscode/ripgrep": "^1.18.0"
@@ -150,6 +151,6 @@
150
151
  "test:all": "vitest run && vitest run --config vitest.e2e.config.ts",
151
152
  "start": "node dist/index.mjs",
152
153
  "eval:run": "tsx src/evals/cli.ts",
153
- "postinstall": "node -e \"try { require('better-sqlite3') } catch(e) { if(e.message.includes('bindings')) { console.log('\\n⚠️ Rebuilding better-sqlite3 native bindings...'); require('child_process').execSync('pnpm rebuild better-sqlite3', {stdio:'inherit'}) } }\""
154
+ "postinstall": "node -e \"try { require('better-sqlite3') } catch (e) { if (e.message.includes('bindings')) { console.log('\\n\\u26a0\\ufe0f Rebuilding better-sqlite3 native bindings...'); try { require('child_process').execSync('pnpm rebuild better-sqlite3', {stdio:'inherit'}) } catch { console.log('\\u26a0\\ufe0f Could not rebuild better-sqlite3 automatically. If the CLI reports a native-bindings error, run: npm rebuild better-sqlite3') } } }\""
154
155
  }
155
156
  }
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
- import { t as ProxyManager } from "./ProxyManager-C5H0pUyK.mjs";
3
- export { ProxyManager };
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import { EventEmitter } from "events";
3
2
  import http from "http";
3
+ import { EventEmitter } from "events";
4
4
  import net from "net";
5
5
  //#region src/sandbox/proxy/domainMatcher.ts
6
6
  /**