@bike4mind/cli 0.21.0 → 1.0.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.
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import { n as logger, t as ConfigStore } from "./ConfigStore-CoY0l0gr.mjs";
3
- import { t as version } from "./package-CfIETbXd.mjs";
2
+ import { n as logger, t as ConfigStore } from "./ConfigStore-DHNgFdOu.mjs";
3
+ import { t as version } from "./package-7a45-Svr.mjs";
4
4
  import axios, { isAxiosError } from "axios";
5
5
  //#region src/auth/OAuthClient.ts
6
6
  /**
@@ -416,6 +416,7 @@ let ApiKeyType = /* @__PURE__ */ function(ApiKeyType) {
416
416
  ApiKeyType["ollama"] = "ollama";
417
417
  ApiKeyType["xai"] = "xai";
418
418
  ApiKeyType["kimi"] = "kimi";
419
+ ApiKeyType["deepseek"] = "deepseek";
419
420
  ApiKeyType["voyageai"] = "voyageai";
420
421
  return ApiKeyType;
421
422
  }({});
@@ -489,6 +490,16 @@ const FallbackInfoSchema = z$1.object({
489
490
  primaryModelName: z$1.string(),
490
491
  fallbackModel: z$1.string(),
491
492
  fallbackModelName: z$1.string(),
493
+ /**
494
+ * Backend of each side, so the badge can name the provider path without
495
+ * inferring it from the id - a bare `deepseek-*` slug is the direct API on a
496
+ * hosted deployment and an Ollama pull on a self-hosted one. Optional and
497
+ * loosely typed: these payloads are persisted in browser storage, so a record
498
+ * written by an older build has neither field and an unknown backend name from
499
+ * a newer one must not fail the parse.
500
+ */
501
+ primaryModelBackend: z$1.string().optional(),
502
+ fallbackModelBackend: z$1.string().optional(),
492
503
  timestamp: z$1.number()
493
504
  });
494
505
  const ArtifactMetadataSchema = z$1.object({
@@ -895,6 +906,7 @@ let ModelBackend = /* @__PURE__ */ function(ModelBackend) {
895
906
  ModelBackend["BFL"] = "bfl";
896
907
  ModelBackend["XAI"] = "xai";
897
908
  ModelBackend["Kimi"] = "kimi";
909
+ ModelBackend["DeepSeek"] = "deepseek";
898
910
  ModelBackend["VoyageAI"] = "voyageai";
899
911
  ModelBackend["AWS"] = "aws";
900
912
  ModelBackend["LocalImage"] = "local-image";
@@ -1093,6 +1105,8 @@ let ChatModels = /* @__PURE__ */ function(ChatModels) {
1093
1105
  ChatModels["KIMI_K2_5"] = "kimi-k2.5";
1094
1106
  ChatModels["KIMI_K2_5_BEDROCK"] = "moonshotai.kimi-k2.5";
1095
1107
  ChatModels["KIMI_K2_THINKING_BEDROCK"] = "moonshot.kimi-k2-thinking";
1108
+ ChatModels["DEEPSEEK_FLASH"] = "deepseek-flash";
1109
+ ChatModels["DEEPSEEK_V4_PRO"] = "deepseek-v4-pro";
1096
1110
  return ChatModels;
1097
1111
  }({});
1098
1112
  const CHAT_MODELS = Object.values(ChatModels);
@@ -1227,7 +1241,9 @@ const NO_TEMPERATURE_MODELS = /* @__PURE__ */ new Set([
1227
1241
  "kimi-k2.7-code",
1228
1242
  "kimi-k2.7-code-highspeed",
1229
1243
  "kimi-k2.6",
1230
- "kimi-k2.5"
1244
+ "kimi-k2.5",
1245
+ "deepseek-flash",
1246
+ "deepseek-v4-pro"
1231
1247
  ]);
1232
1248
  /**
1233
1249
  * Models whose safety classifiers can decline a request with `stop_reason: 'refusal'`
@@ -1716,6 +1732,7 @@ const ADAPTER_FAMILIES = [
1716
1732
  "gemini",
1717
1733
  "xai",
1718
1734
  "kimi",
1735
+ "deepseek",
1719
1736
  "ollama",
1720
1737
  "bfl",
1721
1738
  "local-image",
@@ -1966,6 +1983,7 @@ const MODEL_INFO_FIELD_GROUP_OF = {
1966
1983
  supportsImageVariation: "modalities",
1967
1984
  supportsSafetyTolerance: "modalities",
1968
1985
  deprecationDate: "lifecycle",
1986
+ replacedBy: "lifecycle",
1969
1987
  adapterFamily: "dispatch",
1970
1988
  dispatchProfile: "dispatch",
1971
1989
  description: "presentation",
@@ -2089,6 +2107,8 @@ z$1.object({
2089
2107
  }).optional(),
2090
2108
  /** Optional: a state row written before Phase 4 has none, and must keep parsing. */
2091
2109
  suggestion: ModelLifecycleSuggestion.optional(),
2110
+ /** Dispatch probes spent on this model, so one that always fails stops taking a budget slot. */
2111
+ probeAttempts: z$1.number().int().nonnegative().optional(),
2092
2112
  createdAt: z$1.date(),
2093
2113
  updatedAt: z$1.date()
2094
2114
  });
@@ -3130,6 +3150,7 @@ function toModelInfo(record) {
3130
3150
  disabled,
3131
3151
  disabledReason: record.disabledReason ?? record.autoDisabledReason ?? (retired ? "retired by the provider" : void 0),
3132
3152
  deprecationDate: record.lifecycle?.deprecationDate,
3153
+ replacedBy: record.lifecycle?.replacedBy,
3133
3154
  trainingCutoff: record.trainingCutoff,
3134
3155
  releaseDate: record.releaseDate,
3135
3156
  logoFile: record.logoFile,
@@ -3162,6 +3183,7 @@ const VENDOR_BY_BACKEND = {
3162
3183
  ["gemini"]: "google",
3163
3184
  ["xai"]: "xai",
3164
3185
  ["kimi"]: "moonshotai",
3186
+ ["deepseek"]: "deepseek",
3165
3187
  ["bfl"]: "black-forest-labs",
3166
3188
  ["aws"]: "amazon",
3167
3189
  ["voyageai"]: "voyageai",
@@ -3230,10 +3252,13 @@ function toModelRecord(info) {
3230
3252
  supportsTools: info.supportsTools,
3231
3253
  supportsImageVariation: info.supportsImageVariation,
3232
3254
  supportsSafetyTolerance: info.supportsSafetyTolerance,
3233
- lifecycle: info.deprecationDate ? {
3234
- status: "deprecated",
3235
- deprecationDate: info.deprecationDate
3236
- } : { status: "active" },
3255
+ lifecycle: {
3256
+ ...info.deprecationDate ? {
3257
+ status: "deprecated",
3258
+ deprecationDate: info.deprecationDate
3259
+ } : { status: "active" },
3260
+ ...info.replacedBy ? { replacedBy: info.replacedBy } : {}
3261
+ },
3237
3262
  description: info.description,
3238
3263
  logoFile: info.logoFile,
3239
3264
  rank: info.rank,
@@ -4016,6 +4041,7 @@ const QuestExportProgressAction = z$1.object({
4016
4041
  downloadUrl: z$1.string().optional(),
4017
4042
  filename: z$1.string().optional(),
4018
4043
  errorMessage: z$1.string().optional(),
4044
+ droppedQuestCount: z$1.number().optional(),
4019
4045
  clientId: z$1.string().optional()
4020
4046
  });
4021
4047
  const SpiderProgressUpdateAction = z$1.object({
@@ -6634,12 +6660,23 @@ let OllamaEmbeddingModel = /* @__PURE__ */ function(OllamaEmbeddingModel) {
6634
6660
  return OllamaEmbeddingModel;
6635
6661
  }({});
6636
6662
  /**
6637
- * The default embedding model for the current deployment. On self-host with a local Ollama
6638
- * server and no cloud embedding key, this is a local embedder, so RAG / knowledge search work
6639
- * out of the box with no AWS/OpenAI/Voyage credential; otherwise it is the cloud default. Read
6640
- * by the `defaultEmbeddingModel` admin-setting default and by the query-embedding fallback, so
6641
- * an operator who never opens admin settings still gets a working, keyless embedder instead of
6642
- * an unconfigured cloud model that fails with an opaque "security token" error.
6663
+ * The default embedding model this deployment advertises - the `defaultEmbeddingModel` admin-setting
6664
+ * default and the query-embedding fallback, so an operator who never opens admin settings still gets
6665
+ * a sensible model rather than an unconfigured one.
6666
+ *
6667
+ * Deliberately answers from the ENVIRONMENT only, and deliberately does NOT try to answer "can this
6668
+ * deployment actually reach that model". It cannot: on a hosted stage an SST secret arrives as a
6669
+ * linked Resource, never as process.env (see apps/client/server/modelDiscovery/adapters.ts), so an
6670
+ * absent OPENAI_API_KEY here means "unknown", not "no key" - it is absent on production too. This
6671
+ * function is also bundled into the browser via settingsMap, where every env read is undefined, so
6672
+ * any answer it gives must be one that is safe as a stage-neutral constant.
6673
+ *
6674
+ * Reachability is therefore decided where the resolved credentials are actually in hand, by
6675
+ * `resolveEmbeddingWithKeylessFallback` (fab-pipeline) - that is what lets a keyless cloud stage
6676
+ * embed on Bedrock without changing what any other stage advertises.
6677
+ *
6678
+ * The one arm that IS env-decidable: a self-host running Ollama has its base URL in real process.env
6679
+ * on both server and (absent) client, and no cloud credential can arrive by any other route.
6643
6680
  */
6644
6681
  function defaultEmbeddingModelForEnv() {
6645
6682
  const selfHost = process.env.B4M_SELF_HOST === "true";
@@ -6648,6 +6685,45 @@ function defaultEmbeddingModelForEnv() {
6648
6685
  if (selfHost && hasOllama && !hasCloudEmbeddingKey) return "qwen3-embedding:0.6b";
6649
6686
  return "text-embedding-ada-002";
6650
6687
  }
6688
+ /**
6689
+ * True when this deployment can embed with no provider API key at all: a cloud stage reaches
6690
+ * Bedrock through its task/execution role's AWS credentials.
6691
+ *
6692
+ * Requires POSITIVE evidence of an execution role rather than merely "not self-host". A plain
6693
+ * `next dev` session and a CI job both leave B4M_SELF_HOST unset while holding no AWS credentials
6694
+ * at all, so an absence test would send them to the Bedrock SDK for an opaque `CredentialsProvider
6695
+ * Error` in place of the actionable OPENAI_KEY_MISSING_MESSAGE naming the key to set - the same
6696
+ * actionable-to-opaque trade this fallback exists to avoid, just in a different keyless place.
6697
+ *
6698
+ * BOTH runtimes must be covered, and they carry different markers. The Lambdas (vectorize
6699
+ * subscriber, the crons, the Next API routes) get AWS_LAMBDA_FUNCTION_NAME; ChatCompletion is a
6700
+ * Fargate service (infra/chatCompletion.ts) and gets the ECS task-role URI instead. Since
6701
+ * knowledgeBaseSearch runs inside that container, keying on the Lambda marker alone would leave
6702
+ * chat knowledge-base search failing on exactly the keyless stages this fallback is for.
6703
+ *
6704
+ * SST_RESOURCE_App is the third arm and the one this repo can prove: SST sets it on anything it
6705
+ * links, Lambda and Service alike (infra/chatCompletion.ts:129 and infra/agentExecutor.ts:54 both
6706
+ * note that linking alone exposes SST_RESOURCE_*). It covers the Fargate task whether or not the
6707
+ * ECS credential URI is present, and it is absent from a plain `next dev` and from CI, which is
6708
+ * the case that matters. `sst dev` does set it - correctly, since that session runs against real
6709
+ * AWS credentials.
6710
+ *
6711
+ * Self-host is excluded outright because it has no such role - its keyless path is the local
6712
+ * Ollama embedder (`isLocalEmbedderAvailable` in toolAvailability.ts), not Bedrock.
6713
+ *
6714
+ * Answers "is Bedrock reachable here", NOT "should we use it" - a keyed stage is keyless-capable
6715
+ * too, so this must only ever be asked ALONGSIDE a resolved credential table that came back empty.
6716
+ * `resolveEmbeddingWithKeylessFallback` is where the two questions are paired for callers free to
6717
+ * choose the model, and is what such a caller should use instead of asking this directly. The
6718
+ * direct callers are the ones that additionally need the answer BEFORE resolving, to decide
6719
+ * policy: toolAvailability reports whether embedding-backed tools are usable at all, and
6720
+ * data-lakes/semantic-search decides whether a substitution is permitted for this request before
6721
+ * it knows whether one is needed. Both still pair it with the table.
6722
+ */
6723
+ function hasKeylessCloudEmbedder() {
6724
+ if (process.env.B4M_SELF_HOST === "true") return false;
6725
+ return !!(process.env.AWS_LAMBDA_FUNCTION_NAME || process.env.AWS_CONTAINER_CREDENTIALS_RELATIVE_URI || process.env.AWS_CONTAINER_CREDENTIALS_FULL_URI || process.env.SST_RESOURCE_App);
6726
+ }
6651
6727
  z$1.union([
6652
6728
  z$1.enum(OpenAIEmbeddingModel),
6653
6729
  z$1.enum(VoyageAIEmbeddingModel),
@@ -6655,6 +6731,18 @@ z$1.union([
6655
6731
  z$1.enum(OllamaEmbeddingModel)
6656
6732
  ]);
6657
6733
  /**
6734
+ * The measured per-space floors, rendered for an admin-facing description (e.g. "75 for
6735
+ * text-embedding-ada-002, 35 for text-embedding-3-small").
6736
+ *
6737
+ * Rendered rather than written out in prose because these numbers are expected to move - 35 is
6738
+ * provisional until it is re-derived against a production lake - and a description that restates
6739
+ * the table is a wrong number shown to operators the moment it drifts, with nothing failing.
6740
+ */
6741
+ const forcedRetrievalFloorsBySpaceSummary = Object.entries({
6742
+ ["text-embedding-ada-002"]: 75,
6743
+ ["text-embedding-3-small"]: 35
6744
+ }).map(([space, pct]) => `${pct} for ${space}`).join(", ");
6745
+ /**
6658
6746
  * Default text for the artifact-emission system prompt. Single source of truth used BOTH as the
6659
6747
  * `ArtifactEmissionPrompt` admin setting's default AND as the runtime fallback in
6660
6748
  * ChatCompletionProcess - so an unset/empty/cleared DB value reverts to this and never bricks
@@ -6847,6 +6935,7 @@ z$1.enum([
6847
6935
  "geminiDemoKey",
6848
6936
  "xaiApiKey",
6849
6937
  "moonshotApiKey",
6938
+ "deepseekApiKey",
6850
6939
  "voyageApiKey",
6851
6940
  "FirecrawlApiKey",
6852
6941
  "FirecrawlApiUrl",
@@ -6981,6 +7070,7 @@ z$1.enum([
6981
7070
  "defaultEmbeddingModel",
6982
7071
  "dataLakeSearchMaxFiles",
6983
7072
  "dataLakeSearchMaxChunks",
7073
+ "dataLakeSearchMaxChunksPerFile",
6984
7074
  "forcedRetrievalCharBudget",
6985
7075
  "lakeMemoryRecallK",
6986
7076
  "kbSearchDefaultResults",
@@ -7070,6 +7160,7 @@ z$1.enum([
7070
7160
  "modelDiscoveryAllowEgress",
7071
7161
  "modelDiscoveryPriceBandPct",
7072
7162
  "modelDiscoveryAutoRemap",
7163
+ "modelDiscoveryProbeNewModels",
7073
7164
  "prReportRepo",
7074
7165
  "prReportIdentityMap",
7075
7166
  "prReportWebhookUrl",
@@ -7841,6 +7932,10 @@ const API_SERVICE_GROUPS = {
7841
7932
  {
7842
7933
  key: "forcedRetrievalMinSimilarityPct",
7843
7934
  order: 10
7935
+ },
7936
+ {
7937
+ key: "dataLakeSearchMaxChunksPerFile",
7938
+ order: 11
7844
7939
  }
7845
7940
  ]
7846
7941
  },
@@ -7948,6 +8043,16 @@ const API_SERVICE_GROUPS = {
7948
8043
  order: 1
7949
8044
  }]
7950
8045
  },
8046
+ DEEPSEEK: {
8047
+ id: "deepseekAPIService",
8048
+ name: "DeepSeek Service",
8049
+ description: "DeepSeek API integration settings",
8050
+ icon: "AutoAwesome",
8051
+ settings: [{
8052
+ key: "deepseekApiKey",
8053
+ order: 1
8054
+ }]
8055
+ },
7951
8056
  ANTHROPIC: {
7952
8057
  id: "anthropicAPIService",
7953
8058
  name: "Anthropic Service",
@@ -8647,6 +8752,10 @@ const API_SERVICE_GROUPS = {
8647
8752
  {
8648
8753
  key: "modelDiscoveryAutoRemap",
8649
8754
  order: 6
8755
+ },
8756
+ {
8757
+ key: "modelDiscoveryProbeNewModels",
8758
+ order: 7
8650
8759
  }
8651
8760
  ]
8652
8761
  },
@@ -8732,6 +8841,16 @@ const settingsMap = {
8732
8841
  group: API_SERVICE_GROUPS.MOONSHOT.id,
8733
8842
  order: 1
8734
8843
  }),
8844
+ deepseekApiKey: makeStringSetting({
8845
+ key: "deepseekApiKey",
8846
+ name: "DeepSeek API Key",
8847
+ defaultValue: "",
8848
+ description: "The global API Key for DeepSeek.",
8849
+ isSensitive: true,
8850
+ category: "AI",
8851
+ group: API_SERVICE_GROUPS.DEEPSEEK.id,
8852
+ order: 1
8853
+ }),
8735
8854
  voyageApiKey: makeStringSetting({
8736
8855
  key: "voyageApiKey",
8737
8856
  name: "Voyage API Key",
@@ -10033,7 +10152,7 @@ const settingsMap = {
10033
10152
  userReadable: true,
10034
10153
  name: "Default Embedding Model",
10035
10154
  defaultValue: defaultEmbeddingModelForEnv(),
10036
- description: "The default embedding model to use",
10155
+ description: "The default embedding model to use. Changing it changes the SCALE of every similarity score in the system, so relevance floors do not carry across: a floor tuned for one model can sit above the entire range of another and reject everything. The server handles this for you on the floors it ships, applying the value measured for whichever model your documents are actually embedded with - but if you have set Forced Retrieval Absolute Floor by hand, re-measure it after changing this. Existing documents keep their old vectors and are only comparable to a query embedded the same way, so a change here needs a re-embed to take full effect; until then each set of documents is searched with the model it was indexed under.",
10037
10156
  category: "AI",
10038
10157
  group: API_SERVICE_GROUPS.EMBEDDING.id,
10039
10158
  options: [
@@ -10065,6 +10184,17 @@ const settingsMap = {
10065
10184
  order: 3,
10066
10185
  scope: { settableAt: ["organization", "owner"] }
10067
10186
  }),
10187
+ dataLakeSearchMaxChunksPerFile: makeNumberSetting({
10188
+ key: "dataLakeSearchMaxChunksPerFile",
10189
+ name: "Data Lake Search Max Chunks Per Document",
10190
+ defaultValue: 0,
10191
+ min: 0,
10192
+ description: "Most chunks from any ONE source document a data-lake semantic search may return in its top-K. A diversity guard for CONTESTED slots: where several documents answer the question, it stops the best-scoring one from taking slots the others could have filled. It is NOT a fix for severe crowding - the cap redistributes only among the candidates retrieval already returned, so a document that supplies enough of the top-scoring chunks to fill that pool on its own is one the cap cannot change at all. On a corpus of book-length documents, expect enabling this to change little beyond widening the vector-search request. 0 (default) disables the cap, byte-identical to behavior before this setting existed. The cap never SHRINKS a result set - once the spread-out picks are in, any slots still open are backfilled with the highest-scoring chunks the cap held back, so a lake whose only match is one document still returns a full top-K. A value at or above the result count is also a no-op, since nothing can ever be held back. Below it, each retrieval stream's candidate pool is widened to a fixed multiple of the result count so the cap has a spread to choose from. The scanned corpus itself does not grow (that is bounded separately), but the vector-search backends are asked for that many more matches, and a larger in-memory ranking pool costs some CPU. 2-3 is the useful range; 1 serves one passage per document, which suits a corpus of many short documents and starves a question whose answer spans one long one. The chat knowledge-base path ranks more passages than it serves, so it applies the cap a second time at the count it actually serves - otherwise the spread-out picks, which are by definition the lowest-scoring ones admitted, would land in the passages that path discards.",
10193
+ category: "AI",
10194
+ group: API_SERVICE_GROUPS.EMBEDDING.id,
10195
+ order: 11,
10196
+ scope: { settableAt: ["organization", "owner"] }
10197
+ }),
10068
10198
  forcedRetrievalCharBudget: makeNumberSetting({
10069
10199
  key: "forcedRetrievalCharBudget",
10070
10200
  name: "Forced Retrieval Char Budget",
@@ -10145,7 +10275,7 @@ const settingsMap = {
10145
10275
  min: 1,
10146
10276
  max: 100,
10147
10277
  int: true,
10148
- description: "Absolute minimum cosine similarity, as a percent, a chunk must clear to be injected on a Data-Lake-mode turn. This is a sanity floor for genuinely unrelated content, NOT the ranking gate - the relative floor above does the ranking. Measured over 166 injected chunks on a production lake the 75 default never once bound (the whole band sat between 80 and 91), so it currently reads like a quality gate while providing no protection. Lowering it toward 30-40 is the intended companion to raising the relative floor: it lets the relative rule govern a corpus whose band sits low, which a 75 line would otherwise reject wholesale. Cosine similarity is not comparable across embedding models, so a value tuned for one model does not transfer to another.",
10278
+ description: `Absolute minimum cosine similarity, as a percent, a chunk must clear to be injected on a Data-Lake-mode turn. This is a sanity floor for genuinely unrelated content, NOT the ranking gate - the relative floor above does the ranking. LEAVE IT AT 75 UNLESS YOU HAVE MEASURED YOUR OWN CORPUS: a raw cosine means nothing outside the embedding model it was fitted to, so while this reads 75 the server ignores it and applies the floor measured for whichever model your documents are actually embedded with (${forcedRetrievalFloorsBySpaceSummary}, and no absolute floor at all for a model nobody has measured - the relative floor still applies). Set any other value and the server uses exactly that, in every space, which is yours to get right: 75 against text-embedding-3-small sits above that band entirely and returns nothing on every query. Where this floor lands inside your band decides a lot - on one measured corpus 74 / 75 / 76 swung recall 91% / 65% / 40% - and the same 75 that is a cliff on one lake rejects nothing at all on another. Re-measure after changing the embedding model; the sweep tool is packages/scripts/retrieval/forcedFloorSweep.ts.`,
10149
10279
  category: "AI",
10150
10280
  group: API_SERVICE_GROUPS.EMBEDDING.id,
10151
10281
  order: 10,
@@ -10997,6 +11127,15 @@ const settingsMap = {
10997
11127
  group: API_SERVICE_GROUPS.MODEL_DISCOVERY.id,
10998
11128
  order: 6
10999
11129
  }),
11130
+ modelDiscoveryProbeNewModels: makeBooleanSetting({
11131
+ key: "modelDiscoveryProbeNewModels",
11132
+ name: "Probe New Models for Dispatch",
11133
+ defaultValue: true,
11134
+ description: "Lets a write-mode run spend a forced one-tool call on a newly discovered OpenAI model to verify which token parameter and tool transport it takes, and turn its tools on. Off leaves every new OpenAI model with tools withheld until an operator writes the dispatch profile by hand.",
11135
+ category: "AI",
11136
+ group: API_SERVICE_GROUPS.MODEL_DISCOVERY.id,
11137
+ order: 7
11138
+ }),
11000
11139
  prReportRepo: makeStringSetting({
11001
11140
  key: "prReportRepo",
11002
11141
  name: "PR Report Repository",
@@ -11089,7 +11228,8 @@ const ModelTelemetrySchema = z$1.object({
11089
11228
  "google",
11090
11229
  "xai",
11091
11230
  "ollama",
11092
- "moonshot"
11231
+ "moonshot",
11232
+ "deepseek"
11093
11233
  ]),
11094
11234
  fallbackUsed: z$1.boolean(),
11095
11235
  fallbackReason: z$1.string().optional(),
@@ -11769,6 +11909,31 @@ const RetrievalSummarySchema = z$1.object({
11769
11909
  /** Lakes resolved at the moment retrieval ran, stamped point-in-time (not read live from the session). */
11770
11910
  dataLakeTags: z$1.array(z$1.string()),
11771
11911
  /**
11912
+ * The lake scope the turn's retrieval surfaces WOULD have searched, resolved at the seed site
11913
+ * whether or not any of them ran: the caller's accessible lakes narrowed to the session
11914
+ * (narrowLakeAccessToSession), or empty where the corpus is personal and the lake arms are
11915
+ * suppressed. `dataLakeTags` is the other half of the pair and answers a different question -
11916
+ * which lakes retrieval ACTUALLY used - so on a turn where retrieval never ran that one is empty
11917
+ * while this one still names whatever was in scope.
11918
+ *
11919
+ * EXISTS FOR THE OFFLINE REPLAY. `answerability` is reconstructed after the fact, and without a
11920
+ * recorded scope the replay had to rebuild one from the session's `retrievalTags` as they stand
11921
+ * at replay time - a session whose lake selection had since changed was replayed against a
11922
+ * corpus its turn never had, with nothing to flag it. Recording it here removes that drift for
11923
+ * every turn seeded after this landed; `probedAt` still discloses the content drift, which no
11924
+ * amount of recording can fix.
11925
+ *
11926
+ * Absence means NOT RECORDED (a turn predating this, or one whose `retrieval` was written only
11927
+ * by a surface rather than by the seed) - never "no lakes in scope", which is present-and-empty.
11928
+ * The replay must keep those apart: probing an unrecorded turn would mean inventing a scope,
11929
+ * which is the approximation this field exists to end.
11930
+ *
11931
+ * Only the seed writes it, so mergeRetrievalSummary carries it first-writer-wins rather than
11932
+ * unioning: a later surface write asserting a narrower scope must not be able to widen the
11933
+ * recorded one, and a union across the two would mean neither.
11934
+ */
11935
+ lakeScope: z$1.array(z$1.string()).optional(),
11936
+ /**
11772
11937
  * Ids of the lakes whose `systemPrompt` was injected this turn (getAccessibleDataLakePrompts),
11773
11938
  * across every injection site (forced retrieval and the model-driven knowledge tools). NOT the
11774
11939
  * prompt text itself - that already reaches the model in the completion, and copying it here
@@ -11880,15 +12045,15 @@ const RetrievalSummarySchema = z$1.object({
11880
12045
  * (ChatCompletionFeatures' forced path, which has no ANN index) to exactly the turns that pay
11881
12046
  * nothing for retrieval today. The measurement is not worth that latency on live traffic.
11882
12047
  *
11883
- * BEING A RECONSTRUCTION, IT CARRIES TWO DRIFTS THE OTHER FIELDS DO NOT:
12048
+ * BEING A RECONSTRUCTION, IT CARRIES DRIFTS THE OTHER FIELDS DO NOT:
11884
12049
  * 1. Corpus CONTENT moves. A document added or reindexed between the turn and the replay is
11885
12050
  * scored as though it had been there. `probedAt` discloses the gap; a replay run long after
11886
12051
  * the window is weak evidence, not strong.
11887
- * 2. Corpus SCOPE is inferred, not recorded. The seed writes `dataLakeTags: []` on a turn where
11888
- * retrieval never ran (ChatCompletionProcess), so the replay reconstructs scope from the
11889
- * session's lakes as they stand at replay time. A session whose lake selection changed is
11890
- * replayed against a corpus the turn never had, and NOTHING here flags that. Recording real
11891
- * scope at seed time would fix it for future turns and is not done yet.
12052
+ * 2. Corpus SCOPE no longer drifts: the seed records the turn's resolved scope in `lakeScope`
12053
+ * and the replay probes that, so a session whose lake selection has since changed is still
12054
+ * scored against the lakes its turn actually had. The cost is coverage rather than accuracy -
12055
+ * a turn with no recorded scope is skipped instead of approximated, so every turn predating
12056
+ * the field is outside the measurement.
11892
12057
  * 3. The QUESTION can move out from under it. The probe is keyed to the quest, not to the
11893
12058
  * prompt text it scored, so a turn whose prompt is later rewritten in place keeps a probe
11894
12059
  * describing the question it used to ask. mergeRetrievalSummary preserves the probe across
@@ -11935,7 +12100,32 @@ const RetrievalSummarySchema = z$1.object({
11935
12100
  * non-empty value does not prove the admission is what made the injection possible. Absent means no
11936
12101
  * admitted id was among this turn's injections, including every turn on a session with none.
11937
12102
  */
11938
- preauthorizedLakeIdsUsed: z$1.array(z$1.string()).optional()
12103
+ preauthorizedLakeIdsUsed: z$1.array(z$1.string()).optional(),
12104
+ /**
12105
+ * Which of this turn's injected lake prompt ids the caller holds an owner/curator GRANT on - the
12106
+ * per-arm sibling of `preauthorizedLakeIdsUsed`, and the reason both exist: `injectedLakePromptIds`
12107
+ * records THAT a lake's systemPrompt entered the turn, these two record WHICH ARM admitted it.
12108
+ * A subset of injectedLakePromptIds, never a superset. Derived at both injection sites via
12109
+ * grantedLakeIdsUsedFor.
12110
+ *
12111
+ * THE ARM WORTH NAMING SEPARATELY: the grant arm (#2495) is the only one that can cross an org
12112
+ * boundary - `grantLakeAccess` can hand a CURATOR grant to an arbitrary cross-tenant user, and
12113
+ * that grant carries injection trust. The creator and org arms cannot reach past one org, and a
12114
+ * reader grant is excluded permanently, so a lake listed here is the case an operator auditing
12115
+ * cross-tenant prompt influence is actually looking for.
12116
+ *
12117
+ * MEMBERSHIP, NOT CAUSATION, the same caveat the field above carries: a granted lake its holder
12118
+ * could already reach (they created it, or they are in its org) injects through the ordinary
12119
+ * trust arm and is listed here anyway, so a non-empty value does not prove the grant is what
12120
+ * made the injection possible. The two fields OVERLAP for that reason - a lake can appear in
12121
+ * both - so they are not a partition of injectedLakePromptIds and must not be counted as one.
12122
+ *
12123
+ * Absent means no injected id was grant-reached, including every turn where the grant read
12124
+ * FAILED (it is fail-quiet by design - telemetry must not drop the injection it records), so
12125
+ * absence is weaker evidence than presence. Date-bound any rollup: turns predating this field
12126
+ * carry nothing, and no backfill is possible - a past turn's grant rows have moved on.
12127
+ */
12128
+ grantedLakeIdsUsed: z$1.array(z$1.string()).optional()
11939
12129
  });
11940
12130
  /**
11941
12131
  * Why a grounded turn's library scan stopped short of the whole library.
@@ -13929,6 +14119,19 @@ z$1.object({
13929
14119
  createdAt: z$1.union([z$1.string(), z$1.date()]).optional(),
13930
14120
  updatedAt: z$1.union([z$1.string(), z$1.date()]).optional()
13931
14121
  });
14122
+ /**
14123
+ * Length of `text` in Unicode CODE POINTS - the unit `IFabFileChunk.charLength` is stored in.
14124
+ * Matches MongoDB's `$strLenCP`, which is what lets the char-length backfill
14125
+ * (packages/scripts/datalake/backfill-chunk-char-length.ts) compute the same number server-side
14126
+ * without reading chunk text out of the database. Deliberately NOT `text.length` (UTF-16 code
14127
+ * units): the two differ on astral characters (surrogate pairs), and the write path and the
14128
+ * backfill must agree exactly.
14129
+ */
14130
+ const countCodePoints = (text) => {
14131
+ let count = 0;
14132
+ for (const _ch of text) count++;
14133
+ return count;
14134
+ };
13932
14135
  function isGPTImageModel(model) {
13933
14136
  if (!model) return false;
13934
14137
  return OPENAI_IMAGE_MODELS.includes(model) || model.startsWith("gpt-image-");
@@ -16541,4 +16744,4 @@ var ConfigStore = class {
16541
16744
  }
16542
16745
  };
16543
16746
  //#endregion
16544
- export { SupportedFabFileMimeTypes as $, buildRateLimitLogEntry as $t, HTTPError as A, isRenderableModelType as At, OPENAI_GPT_IMAGE_1_IMAGE_SIZES as B, resolveHistoryFetchLimit as Bt, DEFAULT_MUSIC_MODEL_ID as C, isGeminiModelId as Ct, FIXED_TEMPERATURE_MODELS as D, isModelAccessible as Dt, FIELD_GROUP_OF as E, isMediaModelType as Et, MODEL_INFO_FIELD_GROUP_OF as F, isZodError as Ft, PermissionDeniedError as G, usdToCredits as Gt, OllamaEmbeddingModel as H, settingsMap as Ht, McpServerName as I, mapMimeTypeToArtifactType as It, REFUSAL_FALLBACK_MODELS as J, ACTOR_COLOR_SLOTS as Jt, REASONING_EFFORT_INCOMPATIBLE_WITH_TOOLS_MODELS as K, usdToCreditsStochastic as Kt, ModelBackend as L, obfuscateApiKey as Lt, IMAGE_SIZE_CONSTRAINTS as M, isSupportedFabFileMimeType as Mt, ImageModels as N, isUnlimitedHistory as Nt, FORMAT_PROMPT_TEMPLATE as O, isModelDeprecated as Ot, InternalServerError as P, isUserInitiatedAbort as Pt, SpeechToTextModels as Q, selfClaimedActorKindSchema as Qt, NO_TEMPERATURE_MODELS as R, parseEmbeddingRateLimitHeaders as Rt, CorruptedFileError as S, isGPTImageModel as St, DEGENERATE_FINISH_REASON as T, isImageServeable as Tt, OpenAIEmbeddingModel as U, toModelInfo as Ut, OPENAI_GPT_IMAGE_2_IMAGE_SIZES as V, secureParameters as Vt, PROMPT_TEXT_MAX as W, toModelRecord as Wt, REVIEW_GATE_STATUS_VALUES as X, actorKindMarker as Xt, RESPONSES_API_TOOL_MODELS as Y, actorColorIndex as Yt, SUBQUEST_STATUS_VALUES as Z, actorKindSchema as Zt, BadRequestError as _, isChunkRebuildPending as _t, getCreditsUrl as a, VideoModels as at, CREDIT_DEDUCT_TRANSACTION_TYPES as b, isFieldGroup as bt, requireApiUrl as c, applyModelPriceCatalog as ct, AGENT_QUEST_MANIFEST as d, defaultEmbeddingModelForEnv as dt, extractSnippetMeta as en, TTS_MAX_INPUT_CHARS as et, AGENT_QUEST_MCP_URI as f, getMcpProviderMetadata as ft, BFL_SAFETY_TOLERANCE as g, isAudioMimeType as gt, BEDROCK_NO_PROMPT_CACHING_MODELS as h, hasUsableLimits as ht, LOCAL_DEV_URL as i, VIDEO_SIZE_CONSTRAINTS as it, HttpStatus as j, isRetryableError as jt, ForbiddenError as k, isPlaceholderApiKey as kt, resolveApiEndpoint as l, calculateRetryDelay as lt, ApiKeyType as m, getRetryAfterMs as mt, logger as n, parseRateLimitHeaders as nn, UnauthorizedError as nt, getEnvironmentName as o, VoyageAIEmbeddingModel as ot, ARTIFACT_ATTRS_PATTERN as p, getQuestErrorCode as pt, REASONING_SUPPORTED_MODELS as q, withRetry as qt, ApiEndpointUnconfiguredError as r, UnprocessableEntityError as rt, parseApiUrl as s, WORK_ITEM_STATUSES as st, ConfigStore as t, isNearLimit as tn, TooManyRequestsError as tt, AGENT_QUEST_ID as u, dayjsConfig_default as ut, BedrockEmbeddingModel as v, isChunkStalledFile as vt, DEFAULT_UNKNOWN_CONTEXT_WINDOW as w, isImageAttachment as wt, ChatModels as x, isGPTImage2Model as xt, CONTEXT_WINDOW_SAFETY_BUFFER_TOKENS as y, isEarlyStop as yt, NotFoundError as z, reservationOutputTokens as zt };
16747
+ export { SupportedFabFileMimeTypes as $, actorKindSchema as $t, HTTPError as A, isModelDeprecated as At, OPENAI_GPT_IMAGE_1_IMAGE_SIZES as B, parseEmbeddingRateLimitHeaders as Bt, DEFAULT_MUSIC_MODEL_ID as C, isGPTImage2Model as Ct, FIXED_TEMPERATURE_MODELS as D, isImageServeable as Dt, FIELD_GROUP_OF as E, isImageAttachment as Et, MODEL_INFO_FIELD_GROUP_OF as F, isUnlimitedHistory as Ft, PermissionDeniedError as G, toModelInfo as Gt, OllamaEmbeddingModel as H, resolveHistoryFetchLimit as Ht, McpServerName as I, isUserInitiatedAbort as It, REFUSAL_FALLBACK_MODELS as J, usdToCreditsStochastic as Jt, REASONING_EFFORT_INCOMPATIBLE_WITH_TOOLS_MODELS as K, toModelRecord as Kt, ModelBackend as L, isZodError as Lt, IMAGE_SIZE_CONSTRAINTS as M, isRenderableModelType as Mt, ImageModels as N, isRetryableError as Nt, FORMAT_PROMPT_TEMPLATE as O, isMediaModelType as Ot, InternalServerError as P, isSupportedFabFileMimeType as Pt, SpeechToTextModels as Q, actorKindMarker as Qt, NO_TEMPERATURE_MODELS as R, mapMimeTypeToArtifactType as Rt, CorruptedFileError as S, isFieldGroup as St, DEGENERATE_FINISH_REASON as T, isGeminiModelId as Tt, OpenAIEmbeddingModel as U, secureParameters as Ut, OPENAI_GPT_IMAGE_2_IMAGE_SIZES as V, reservationOutputTokens as Vt, PROMPT_TEXT_MAX as W, settingsMap as Wt, REVIEW_GATE_STATUS_VALUES as X, ACTOR_COLOR_SLOTS as Xt, RESPONSES_API_TOOL_MODELS as Y, withRetry as Yt, SUBQUEST_STATUS_VALUES as Z, actorColorIndex as Zt, BadRequestError as _, hasUsableLimits as _t, getCreditsUrl as a, VideoModels as at, CREDIT_DEDUCT_TRANSACTION_TYPES as b, isChunkStalledFile as bt, requireApiUrl as c, applyModelPriceCatalog as ct, AGENT_QUEST_MANIFEST as d, dayjsConfig_default as dt, selfClaimedActorKindSchema as en, TTS_MAX_INPUT_CHARS as et, AGENT_QUEST_MCP_URI as f, defaultEmbeddingModelForEnv as ft, BFL_SAFETY_TOLERANCE as g, hasKeylessCloudEmbedder as gt, BEDROCK_NO_PROMPT_CACHING_MODELS as h, getRetryAfterMs as ht, LOCAL_DEV_URL as i, parseRateLimitHeaders as in, VIDEO_SIZE_CONSTRAINTS as it, HttpStatus as j, isPlaceholderApiKey as jt, ForbiddenError as k, isModelAccessible as kt, resolveApiEndpoint as l, calculateRetryDelay as lt, ApiKeyType as m, getQuestErrorCode as mt, logger as n, extractSnippetMeta as nn, UnauthorizedError as nt, getEnvironmentName as o, VoyageAIEmbeddingModel as ot, ARTIFACT_ATTRS_PATTERN as p, getMcpProviderMetadata as pt, REASONING_SUPPORTED_MODELS as q, usdToCredits as qt, ApiEndpointUnconfiguredError as r, isNearLimit as rn, UnprocessableEntityError as rt, parseApiUrl as s, WORK_ITEM_STATUSES as st, ConfigStore as t, buildRateLimitLogEntry as tn, TooManyRequestsError as tt, AGENT_QUEST_ID as u, countCodePoints as ut, BedrockEmbeddingModel as v, isAudioMimeType as vt, DEFAULT_UNKNOWN_CONTEXT_WINDOW as w, isGPTImageModel as wt, ChatModels as x, isEarlyStop as xt, CONTEXT_WINDOW_SAFETY_BUFFER_TOKENS as y, isChunkRebuildPending as yt, NotFoundError as z, obfuscateApiKey as zt };
@@ -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-ucv6xXVT.mjs";
3
- import { n as logger } from "./ConfigStore-CoY0l0gr.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-CrRb8cMt.mjs";
3
+ import { n as logger } from "./ConfigStore-DHNgFdOu.mjs";
4
4
  import { z as z$1 } from "zod";
5
5
  import WebSocket from "ws";
6
6
  //#region src/llm/NotifyingLlmBackend.ts
@@ -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-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";
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-CrRb8cMt.mjs";
3
+ import { c as requireApiUrl, n as logger, t as ConfigStore } from "../ConfigStore-DHNgFdOu.mjs";
4
+ import { t as ApiClient } from "../ApiClient-EUTyn5yu.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-CJrkEG0M.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-CoY0l0gr.mjs";
2
+ import { l as resolveApiEndpoint, s as parseApiUrl, t as ConfigStore } from "../ConfigStore-DHNgFdOu.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-CfIETbXd.mjs";
2
+ import { t as version } from "../package-7a45-Svr.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-CoY0l0gr.mjs";
2
+ import { t as ConfigStore } from "../ConfigStore-DHNgFdOu.mjs";
3
3
  //#region src/commands/envCommand.ts
4
4
  /**
5
5
  * Environment switching for the `--dev` / `--prod` launch flags.
@@ -1,7 +1,7 @@
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-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";
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-CrRb8cMt.mjs";
3
+ import { c as requireApiUrl, n as logger, t as ConfigStore } from "../ConfigStore-DHNgFdOu.mjs";
4
+ import { t as ApiClient } from "../ApiClient-EUTyn5yu.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";
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import { t as ConfigStore } from "../ConfigStore-CoY0l0gr.mjs";
3
- import { t as version } from "../package-CfIETbXd.mjs";
2
+ import { t as ConfigStore } from "../ConfigStore-DHNgFdOu.mjs";
3
+ import { t as version } from "../package-7a45-Svr.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-C9UDR5px.mjs");
73
+ const { handleMcpServeCommand } = await import("../serve-CavAHPdQ.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-CoY0l0gr.mjs";
3
+ import { t as ConfigStore } from "../ConfigStore-DHNgFdOu.mjs";
4
4
  import { execFileSync } from "child_process";
5
5
  import { promises } from "fs";
6
6
  import path from "path";
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as version } from "../package-CfIETbXd.mjs";
2
+ import { t as version } from "../package-7a45-Svr.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-ucv6xXVT.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-CrRb8cMt.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 { 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";
5
+ import { $t as actorKindSchema, Qt as actorKindMarker, X as REVIEW_GATE_STATUS_VALUES, Xt as ACTOR_COLOR_SLOTS, Z as SUBQUEST_STATUS_VALUES, Zt as actorColorIndex, a as getCreditsUrl, b as CREDIT_DEDUCT_TRANSACTION_TYPES, c as requireApiUrl, en as selfClaimedActorKindSchema, 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, xt as isEarlyStop } from "./ConfigStore-DHNgFdOu.mjs";
6
6
  import { t as getShellSessionManager } from "./ShellSessionManager-6o8KZzl1-vrbPAUTq.mjs";
7
- import { n as OAuthClient, t as ApiClient } from "./ApiClient-Ut1MXtOs.mjs";
7
+ import { n as OAuthClient, t as ApiClient } from "./ApiClient-EUTyn5yu.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-jZhBReAr.mjs";
10
- import { t as version } from "./package-CfIETbXd.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-CJrkEG0M.mjs";
10
+ import { t as version } from "./package-7a45-Svr.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";
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
2
  //#region package.json
3
- var version = "0.21.0";
3
+ var version = "1.0.0";
4
4
  //#endregion
5
5
  export { version as t };