byterover-cli 2.1.0 → 2.1.2

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.
@@ -112,9 +112,9 @@ export const LLM_REGISTRY = {
112
112
  supportedFileTypes: ['image', 'pdf'],
113
113
  },
114
114
  gemini: {
115
- defaultModel: 'gemini-3-flash-preview',
115
+ defaultModel: 'gemini-3.1-flash-lite-preview',
116
116
  models: [
117
- // Gemini 3 series (Preview)
117
+ // Gemini 3.1 series
118
118
  {
119
119
  capabilities: {
120
120
  supportsAudio: true,
@@ -126,6 +126,24 @@ export const LLM_REGISTRY = {
126
126
  },
127
127
  charsPerToken: 4,
128
128
  default: true,
129
+ displayName: 'Gemini 3.1 Flash Lite',
130
+ maxInputTokens: 1_000_000,
131
+ maxOutputTokens: 8192,
132
+ name: 'gemini-3.1-flash-lite-preview',
133
+ pricing: { inputPerM: 0.075, outputPerM: 0.3 },
134
+ supportedFileTypes: ['image', 'pdf', 'audio'],
135
+ },
136
+ // Gemini 3 series (Preview)
137
+ {
138
+ capabilities: {
139
+ supportsAudio: true,
140
+ supportsImages: true,
141
+ supportsMultimodalFunctionResponse: true,
142
+ supportsPdf: true,
143
+ supportsStreaming: true,
144
+ supportsThinking: true,
145
+ },
146
+ charsPerToken: 4,
129
147
  displayName: 'Gemini 3 Flash (Preview)',
130
148
  maxInputTokens: 1_000_000,
131
149
  maxOutputTokens: 8192,
@@ -839,7 +839,7 @@ export class CipherAgent extends BaseAgent {
839
839
  countTokens: (text) => mapGenerator.estimateTokensSync(text),
840
840
  };
841
841
  // Compute registry-clamped maxContextTokens
842
- const mapModel = sessionLLMConfig.model ?? 'gemini-3-flash-preview';
842
+ const mapModel = sessionLLMConfig.model ?? 'gemini-3.1-flash-lite-preview';
843
843
  const mapRegistryProvider = resolveRegistryProvider(mapModel, mapProvider);
844
844
  const effectiveMaxContextTokens = getEffectiveMaxInputTokens(mapRegistryProvider, mapModel, sessionLLMConfig.maxInputTokens);
845
845
  const mapLogger = new EventBasedLogger(this._agentEventBus, 'MapTools');
@@ -270,7 +270,7 @@ async function executePrompt(prompt, agent, state, eventBus) {
270
270
  */
271
271
  export async function startInteractiveLoop(agent, options) {
272
272
  // Display welcome message
273
- displayWelcome(options?.sessionId ?? 'agent-session', options?.model ?? 'gemini-3-flash-preview', options?.eventBus);
273
+ displayWelcome(options?.sessionId ?? 'agent-session', options?.model ?? 'gemini-3.1-flash-lite-preview', options?.eventBus);
274
274
  // Create readline interface
275
275
  const rl = readline.createInterface({
276
276
  input: process.stdin,
@@ -163,7 +163,7 @@ export async function createCipherAgentServices(config, agentEventBus) {
163
163
  const messageStorageService = messageStorage;
164
164
  const historyStorage = new GranularHistoryStorage(messageStorage);
165
165
  // CompactionService for context overflow management
166
- const tokenizer = new GeminiTokenizer(config.model ?? 'gemini-3-flash-preview');
166
+ const tokenizer = new GeminiTokenizer(config.model ?? 'gemini-3.1-flash-lite-preview');
167
167
  const compactionService = new CompactionService(messageStorage, tokenizer, {
168
168
  overflowThreshold: 0.85, // 85% triggers compaction check
169
169
  protectedTurns: 2, // Protect last 2 user turns from pruning
@@ -241,13 +241,13 @@ export function createSessionServices(sessionId, sharedServices, httpConfig, llm
241
241
  });
242
242
  const escalatedStrategy = new EscalatedCompressionStrategy({
243
243
  generator: compactionGenerator,
244
- model: llmConfig.model ?? 'gemini-3-flash-preview',
244
+ model: llmConfig.model ?? 'gemini-3.1-flash-lite-preview',
245
245
  });
246
246
  return new AgentLLMService(sessionId, generator, {
247
247
  maxInputTokens: llmConfig.maxInputTokens,
248
248
  maxIterations: llmConfig.maxIterations ?? 50,
249
249
  maxTokens: llmConfig.maxTokens ?? 8192,
250
- model: llmConfig.model ?? 'gemini-3-flash-preview',
250
+ model: llmConfig.model ?? 'gemini-3.1-flash-lite-preview',
251
251
  provider,
252
252
  temperature: llmConfig.temperature ?? 0.7,
253
253
  verbose: llmConfig.verbose ?? false,
@@ -27,7 +27,7 @@ export const byteroverProvider = {
27
27
  temperature: config.temperature,
28
28
  });
29
29
  },
30
- defaultModel: 'gemini-3-flash-preview',
30
+ defaultModel: 'gemini-3.1-flash-lite-preview',
31
31
  description: 'Internal ByteRover LLM',
32
32
  envVars: [],
33
33
  id: 'byterover',
@@ -30,7 +30,7 @@ export function isGemini2Model(model) {
30
30
  * @returns True if model is Gemini 3.x
31
31
  */
32
32
  export function isGemini3Model(model) {
33
- return model.startsWith('gemini-3-');
33
+ return /^gemini-3[.-]/.test(model);
34
34
  }
35
35
  /**
36
36
  * Check if model supports multimodal function responses
@@ -39,7 +39,7 @@ export function isGemini3Model(model) {
39
39
  * @returns True if model supports multimodal function responses
40
40
  */
41
41
  export function supportsMultimodalFunctionResponse(model) {
42
- return model.startsWith('gemini-3-');
42
+ return /^gemini-3[.-]/.test(model);
43
43
  }
44
44
  /**
45
45
  * Default thinking mode token budget
@@ -1,4 +1,5 @@
1
1
  import type { Hook } from '@oclif/core';
2
+ import { execSync } from 'node:child_process';
2
3
  /**
3
4
  * Check interval for update notifications (1 hour)
4
5
  */
@@ -28,10 +29,17 @@ export type UpdateNotifierDeps = {
28
29
  stdio: 'inherit';
29
30
  }) => void;
30
31
  exitFn: (code: number) => never;
32
+ isNpmGlobalInstalled: boolean;
31
33
  isTTY: boolean;
32
34
  log: (message: string) => void;
33
35
  notifier: NarrowedUpdateNotifier;
34
36
  };
37
+ /**
38
+ * Check whether byterover-cli is installed as a npm global package.
39
+ * @param execSyncFn
40
+ * @returns false for other installation methods.
41
+ */
42
+ export declare const isNpmGlobalInstall: (execSyncFn: typeof execSync) => boolean;
35
43
  /**
36
44
  * Core update notification logic, extracted for testability
37
45
  */
@@ -5,12 +5,26 @@ import updateNotifier from 'update-notifier';
5
5
  * Check interval for update notifications (1 hour)
6
6
  */
7
7
  export const UPDATE_CHECK_INTERVAL_MS = 1000 * 60 * 60;
8
+ /**
9
+ * Check whether byterover-cli is installed as a npm global package.
10
+ * @param execSyncFn
11
+ * @returns false for other installation methods.
12
+ */
13
+ export const isNpmGlobalInstall = (execSyncFn) => {
14
+ try {
15
+ execSyncFn('npm list -g byterover-cli --depth=0', { stdio: 'ignore' });
16
+ return true;
17
+ }
18
+ catch {
19
+ return false;
20
+ }
21
+ };
8
22
  /**
9
23
  * Core update notification logic, extracted for testability
10
24
  */
11
25
  export async function handleUpdateNotification(deps) {
12
- const { confirmPrompt, execSyncFn, exitFn, isTTY, log, notifier } = deps;
13
- if (!notifier.update || !isTTY) {
26
+ const { confirmPrompt, execSyncFn, exitFn, isNpmGlobalInstalled, isTTY, log, notifier } = deps;
27
+ if (!isNpmGlobalInstalled || !notifier.update || !isTTY) {
14
28
  return;
15
29
  }
16
30
  const { current, latest } = notifier.update;
@@ -40,10 +54,12 @@ export async function handleUpdateNotification(deps) {
40
54
  const hook = async function () {
41
55
  const pkgInfo = { name: this.config.name, version: this.config.version };
42
56
  const notifier = updateNotifier({ pkg: pkgInfo, updateCheckInterval: UPDATE_CHECK_INTERVAL_MS });
57
+ const isNpmGlobalInstalled = isNpmGlobalInstall(execSync);
43
58
  await handleUpdateNotification({
44
59
  confirmPrompt: confirm,
45
60
  execSyncFn: execSync,
46
61
  exitFn: process.exit,
62
+ isNpmGlobalInstalled,
47
63
  isTTY: process.stdout.isTTY ?? false,
48
64
  log: this.log.bind(this),
49
65
  notifier,
@@ -31,7 +31,7 @@ export declare const TRANSPORT_RECONNECTION_ATTEMPTS = 30;
31
31
  export declare const TRANSPORT_PING_INTERVAL_MS = 5000;
32
32
  export declare const TRANSPORT_PING_TIMEOUT_MS = 10000;
33
33
  export declare const TRANSPORT_DEFAULT_TRANSPORTS: ('polling' | 'websocket')[];
34
- export declare const DEFAULT_LLM_MODEL = "gemini-3-flash-preview";
34
+ export declare const DEFAULT_LLM_MODEL = "gemini-3.1-flash-lite-preview";
35
35
  export declare const PROJECT_ROOM_PREFIX = "project:";
36
36
  export declare const PROJECT_ROOM_SUFFIX = ":broadcast";
37
37
  export declare const GLOBAL_PROJECTS_DIR = "projects";
@@ -40,7 +40,7 @@ export const TRANSPORT_PING_TIMEOUT_MS = 10_000; // 10s timeout - avoid false di
40
40
  // HTTP polling may be blocked by IDE sandboxes causing "xhr poll error"
41
41
  export const TRANSPORT_DEFAULT_TRANSPORTS = ['websocket'];
42
42
  // LLM Model defaults
43
- export const DEFAULT_LLM_MODEL = 'gemini-3-flash-preview';
43
+ export const DEFAULT_LLM_MODEL = 'gemini-3.1-flash-lite-preview';
44
44
  // Project room naming convention
45
45
  export const PROJECT_ROOM_PREFIX = 'project:';
46
46
  export const PROJECT_ROOM_SUFFIX = ':broadcast';
@@ -997,104 +997,6 @@
997
997
  "switch.js"
998
998
  ]
999
999
  },
1000
- "space:list": {
1001
- "aliases": [],
1002
- "args": {},
1003
- "description": "List all teams and spaces",
1004
- "examples": [
1005
- "<%= config.bin %> space list",
1006
- "<%= config.bin %> space list --format json"
1007
- ],
1008
- "flags": {
1009
- "format": {
1010
- "char": "f",
1011
- "description": "Output format",
1012
- "name": "format",
1013
- "default": "text",
1014
- "hasDynamicHelp": false,
1015
- "multiple": false,
1016
- "options": [
1017
- "text",
1018
- "json"
1019
- ],
1020
- "type": "option"
1021
- }
1022
- },
1023
- "hasDynamicHelp": false,
1024
- "hiddenAliases": [],
1025
- "id": "space:list",
1026
- "pluginAlias": "byterover-cli",
1027
- "pluginName": "byterover-cli",
1028
- "pluginType": "core",
1029
- "strict": true,
1030
- "enableJsonFlag": false,
1031
- "isESM": true,
1032
- "relativePath": [
1033
- "dist",
1034
- "oclif",
1035
- "commands",
1036
- "space",
1037
- "list.js"
1038
- ]
1039
- },
1040
- "space:switch": {
1041
- "aliases": [],
1042
- "args": {},
1043
- "description": "Switch to a different space",
1044
- "examples": [
1045
- "<%= config.bin %> space switch --team acme --name my-space",
1046
- "<%= config.bin %> space switch --team acme --name my-space --format json"
1047
- ],
1048
- "flags": {
1049
- "format": {
1050
- "char": "f",
1051
- "description": "Output format",
1052
- "name": "format",
1053
- "default": "text",
1054
- "hasDynamicHelp": false,
1055
- "multiple": false,
1056
- "options": [
1057
- "text",
1058
- "json"
1059
- ],
1060
- "type": "option"
1061
- },
1062
- "name": {
1063
- "char": "n",
1064
- "description": "Name of the space to switch to",
1065
- "name": "name",
1066
- "required": true,
1067
- "hasDynamicHelp": false,
1068
- "multiple": false,
1069
- "type": "option"
1070
- },
1071
- "team": {
1072
- "char": "t",
1073
- "description": "Team name",
1074
- "name": "team",
1075
- "required": true,
1076
- "hasDynamicHelp": false,
1077
- "multiple": false,
1078
- "type": "option"
1079
- }
1080
- },
1081
- "hasDynamicHelp": false,
1082
- "hiddenAliases": [],
1083
- "id": "space:switch",
1084
- "pluginAlias": "byterover-cli",
1085
- "pluginName": "byterover-cli",
1086
- "pluginType": "core",
1087
- "strict": true,
1088
- "enableJsonFlag": false,
1089
- "isESM": true,
1090
- "relativePath": [
1091
- "dist",
1092
- "oclif",
1093
- "commands",
1094
- "space",
1095
- "switch.js"
1096
- ]
1097
- },
1098
1000
  "providers:connect": {
1099
1001
  "aliases": [],
1100
1002
  "args": {
@@ -1335,6 +1237,104 @@
1335
1237
  "switch.js"
1336
1238
  ]
1337
1239
  },
1240
+ "space:list": {
1241
+ "aliases": [],
1242
+ "args": {},
1243
+ "description": "List all teams and spaces",
1244
+ "examples": [
1245
+ "<%= config.bin %> space list",
1246
+ "<%= config.bin %> space list --format json"
1247
+ ],
1248
+ "flags": {
1249
+ "format": {
1250
+ "char": "f",
1251
+ "description": "Output format",
1252
+ "name": "format",
1253
+ "default": "text",
1254
+ "hasDynamicHelp": false,
1255
+ "multiple": false,
1256
+ "options": [
1257
+ "text",
1258
+ "json"
1259
+ ],
1260
+ "type": "option"
1261
+ }
1262
+ },
1263
+ "hasDynamicHelp": false,
1264
+ "hiddenAliases": [],
1265
+ "id": "space:list",
1266
+ "pluginAlias": "byterover-cli",
1267
+ "pluginName": "byterover-cli",
1268
+ "pluginType": "core",
1269
+ "strict": true,
1270
+ "enableJsonFlag": false,
1271
+ "isESM": true,
1272
+ "relativePath": [
1273
+ "dist",
1274
+ "oclif",
1275
+ "commands",
1276
+ "space",
1277
+ "list.js"
1278
+ ]
1279
+ },
1280
+ "space:switch": {
1281
+ "aliases": [],
1282
+ "args": {},
1283
+ "description": "Switch to a different space",
1284
+ "examples": [
1285
+ "<%= config.bin %> space switch --team acme --name my-space",
1286
+ "<%= config.bin %> space switch --team acme --name my-space --format json"
1287
+ ],
1288
+ "flags": {
1289
+ "format": {
1290
+ "char": "f",
1291
+ "description": "Output format",
1292
+ "name": "format",
1293
+ "default": "text",
1294
+ "hasDynamicHelp": false,
1295
+ "multiple": false,
1296
+ "options": [
1297
+ "text",
1298
+ "json"
1299
+ ],
1300
+ "type": "option"
1301
+ },
1302
+ "name": {
1303
+ "char": "n",
1304
+ "description": "Name of the space to switch to",
1305
+ "name": "name",
1306
+ "required": true,
1307
+ "hasDynamicHelp": false,
1308
+ "multiple": false,
1309
+ "type": "option"
1310
+ },
1311
+ "team": {
1312
+ "char": "t",
1313
+ "description": "Team name",
1314
+ "name": "team",
1315
+ "required": true,
1316
+ "hasDynamicHelp": false,
1317
+ "multiple": false,
1318
+ "type": "option"
1319
+ }
1320
+ },
1321
+ "hasDynamicHelp": false,
1322
+ "hiddenAliases": [],
1323
+ "id": "space:switch",
1324
+ "pluginAlias": "byterover-cli",
1325
+ "pluginName": "byterover-cli",
1326
+ "pluginType": "core",
1327
+ "strict": true,
1328
+ "enableJsonFlag": false,
1329
+ "isESM": true,
1330
+ "relativePath": [
1331
+ "dist",
1332
+ "oclif",
1333
+ "commands",
1334
+ "space",
1335
+ "switch.js"
1336
+ ]
1337
+ },
1338
1338
  "hub:registry:add": {
1339
1339
  "aliases": [],
1340
1340
  "args": {
@@ -1534,5 +1534,5 @@
1534
1534
  ]
1535
1535
  }
1536
1536
  },
1537
- "version": "2.1.0"
1537
+ "version": "2.1.2"
1538
1538
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "byterover-cli",
3
3
  "description": "ByteRover's CLI",
4
- "version": "2.1.0",
4
+ "version": "2.1.2",
5
5
  "author": "ByteRover",
6
6
  "bin": {
7
7
  "brv": "./bin/run.js"
@@ -154,6 +154,9 @@
154
154
  "s3": {
155
155
  "host": "https://storage.googleapis.com/brv-releases"
156
156
  },
157
+ "autoupdate": {
158
+ "debounce": 1
159
+ },
157
160
  "node": {
158
161
  "version": "24.13.1"
159
162
  }