byterover-cli 2.5.2 → 2.6.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.
Files changed (85) hide show
  1. package/.env.production +7 -0
  2. package/LICENSE +44 -0
  3. package/bin/dev.js +8 -1
  4. package/bin/run.js +8 -1
  5. package/dist/server/config/environment.d.ts +0 -19
  6. package/dist/server/config/environment.js +29 -38
  7. package/dist/server/constants.d.ts +0 -9
  8. package/dist/server/constants.js +0 -12
  9. package/dist/server/core/domain/errors/auth-error.d.ts +0 -6
  10. package/dist/server/core/domain/errors/auth-error.js +0 -12
  11. package/dist/server/core/domain/errors/task-error.d.ts +0 -3
  12. package/dist/server/core/domain/errors/task-error.js +0 -8
  13. package/dist/server/core/domain/errors/transport-error.d.ts +0 -31
  14. package/dist/server/core/domain/errors/transport-error.js +0 -50
  15. package/dist/server/infra/connectors/rules/rules-connector-config.d.ts +0 -4
  16. package/dist/server/infra/http/models-dev-client.d.ts +0 -4
  17. package/dist/server/infra/http/models-dev-client.js +0 -6
  18. package/dist/server/infra/http/openrouter-api-client.d.ts +0 -8
  19. package/dist/server/infra/http/openrouter-api-client.js +0 -13
  20. package/dist/server/infra/http/provider-model-fetcher-registry.d.ts +0 -5
  21. package/dist/server/infra/http/provider-model-fetcher-registry.js +0 -7
  22. package/dist/server/infra/provider/env-provider-detector.d.ts +0 -20
  23. package/dist/server/infra/provider/env-provider-detector.js +0 -27
  24. package/dist/server/infra/storage/file-provider-config-store.d.ts +0 -4
  25. package/dist/server/infra/storage/file-provider-config-store.js +0 -6
  26. package/dist/server/utils/file-content-reader.d.ts +2 -1
  27. package/dist/server/utils/file-helpers.d.ts +0 -24
  28. package/dist/server/utils/file-helpers.js +0 -81
  29. package/dist/server/utils/process-logger.d.ts +0 -13
  30. package/dist/server/utils/process-logger.js +1 -78
  31. package/node_modules/@campfirein/brv-transport-client/LICENSE +95 -0
  32. package/node_modules/@campfirein/brv-transport-client/README.md +3 -4
  33. package/node_modules/@campfirein/brv-transport-client/package.json +2 -2
  34. package/oclif.manifest.json +132 -132
  35. package/package.json +5 -3
  36. package/dist/server/core/domain/entities/bullet.d.ts +0 -51
  37. package/dist/server/core/domain/entities/bullet.js +0 -94
  38. package/dist/server/core/domain/entities/memory.d.ts +0 -55
  39. package/dist/server/core/domain/entities/memory.js +0 -90
  40. package/dist/server/core/domain/entities/playbook.d.ts +0 -80
  41. package/dist/server/core/domain/entities/playbook.js +0 -214
  42. package/dist/server/core/domain/entities/presigned-url.d.ts +0 -9
  43. package/dist/server/core/domain/entities/presigned-url.js +0 -18
  44. package/dist/server/core/domain/entities/presigned-urls-response.d.ts +0 -10
  45. package/dist/server/core/domain/entities/presigned-urls-response.js +0 -18
  46. package/dist/server/core/domain/entities/retrieve-result.d.ts +0 -35
  47. package/dist/server/core/domain/entities/retrieve-result.js +0 -35
  48. package/dist/server/core/domain/errors/headless-prompt-error.d.ts +0 -11
  49. package/dist/server/core/domain/errors/headless-prompt-error.js +0 -18
  50. package/dist/server/core/interfaces/services/i-legacy-rule-detector.d.ts +0 -56
  51. package/dist/server/core/interfaces/services/i-legacy-rule-detector.js +0 -1
  52. package/dist/server/core/interfaces/services/i-memory-retrieval-service.d.ts +0 -39
  53. package/dist/server/core/interfaces/services/i-memory-retrieval-service.js +0 -1
  54. package/dist/server/core/interfaces/services/i-memory-storage-service.d.ts +0 -53
  55. package/dist/server/core/interfaces/services/i-memory-storage-service.js +0 -1
  56. package/dist/server/core/interfaces/services/i-terminal.d.ts +0 -146
  57. package/dist/server/core/interfaces/services/i-terminal.js +0 -1
  58. package/dist/server/core/interfaces/services/i-workspace-detector-service.d.ts +0 -8
  59. package/dist/server/core/interfaces/services/i-workspace-detector-service.js +0 -1
  60. package/dist/server/core/interfaces/storage/i-onboarding-preference-store.d.ts +0 -20
  61. package/dist/server/core/interfaces/storage/i-onboarding-preference-store.js +0 -1
  62. package/dist/server/infra/connectors/rules/legacy-rule-detector.d.ts +0 -21
  63. package/dist/server/infra/connectors/rules/legacy-rule-detector.js +0 -106
  64. package/dist/server/infra/memory/http-memory-retrieval-service.d.ts +0 -18
  65. package/dist/server/infra/memory/http-memory-retrieval-service.js +0 -64
  66. package/dist/server/infra/memory/http-memory-storage-service.d.ts +0 -18
  67. package/dist/server/infra/memory/http-memory-storage-service.js +0 -72
  68. package/dist/server/infra/memory/memory-to-playbook-mapper.d.ts +0 -33
  69. package/dist/server/infra/memory/memory-to-playbook-mapper.js +0 -51
  70. package/dist/server/infra/storage/file-onboarding-preference-store.d.ts +0 -10
  71. package/dist/server/infra/storage/file-onboarding-preference-store.js +0 -45
  72. package/dist/server/infra/terminal/headless-terminal.d.ts +0 -91
  73. package/dist/server/infra/terminal/headless-terminal.js +0 -211
  74. package/dist/server/infra/workspace/workspace-detector-service.d.ts +0 -57
  75. package/dist/server/infra/workspace/workspace-detector-service.js +0 -165
  76. package/dist/server/utils/crash-log.d.ts +0 -14
  77. package/dist/server/utils/crash-log.js +0 -19
  78. package/dist/server/utils/emoji-helpers.d.ts +0 -38
  79. package/dist/server/utils/emoji-helpers.js +0 -42
  80. package/dist/server/utils/error-handler.d.ts +0 -51
  81. package/dist/server/utils/error-handler.js +0 -169
  82. package/dist/server/utils/oclif-error-helpers.d.ts +0 -40
  83. package/dist/server/utils/oclif-error-helpers.js +0 -46
  84. package/dist/server/utils/tool-display-formatter.d.ts +0 -53
  85. package/dist/server/utils/tool-display-formatter.js +0 -257
@@ -943,15 +943,50 @@
943
943
  "list.js"
944
944
  ]
945
945
  },
946
- "model": {
946
+ "providers:connect": {
947
947
  "aliases": [],
948
- "args": {},
949
- "description": "Show the active model",
948
+ "args": {
949
+ "provider": {
950
+ "description": "Provider ID to connect (e.g., anthropic, openai, openrouter)",
951
+ "name": "provider",
952
+ "required": true
953
+ }
954
+ },
955
+ "description": "Connect or switch to an LLM provider",
950
956
  "examples": [
951
- "<%= config.bin %> model",
952
- "<%= config.bin %> model --format json"
957
+ "<%= config.bin %> providers connect anthropic --api-key sk-xxx",
958
+ "<%= config.bin %> providers connect openai --api-key sk-xxx --model gpt-4.1",
959
+ "<%= config.bin %> providers connect openai --oauth",
960
+ "<%= config.bin %> providers connect byterover",
961
+ "<%= config.bin %> providers connect openai-compatible --base-url http://localhost:11434/v1",
962
+ "<%= config.bin %> providers connect openai-compatible --base-url http://localhost:11434/v1 --api-key sk-xxx --model llama3"
953
963
  ],
954
964
  "flags": {
965
+ "api-key": {
966
+ "char": "k",
967
+ "description": "API key for the provider",
968
+ "name": "api-key",
969
+ "hasDynamicHelp": false,
970
+ "multiple": false,
971
+ "type": "option"
972
+ },
973
+ "base-url": {
974
+ "char": "b",
975
+ "description": "Base URL for OpenAI-compatible providers (e.g., http://localhost:11434/v1)",
976
+ "name": "base-url",
977
+ "hasDynamicHelp": false,
978
+ "multiple": false,
979
+ "type": "option"
980
+ },
981
+ "code": {
982
+ "char": "c",
983
+ "description": "Authorization code for code-paste OAuth providers (e.g., Anthropic). Not applicable to browser-callback providers like OpenAI — use --oauth without --code instead.",
984
+ "hidden": true,
985
+ "name": "code",
986
+ "hasDynamicHelp": false,
987
+ "multiple": false,
988
+ "type": "option"
989
+ },
955
990
  "format": {
956
991
  "description": "Output format (text or json)",
957
992
  "name": "format",
@@ -963,11 +998,25 @@
963
998
  "json"
964
999
  ],
965
1000
  "type": "option"
1001
+ },
1002
+ "model": {
1003
+ "char": "m",
1004
+ "description": "Model to set as active after connecting",
1005
+ "name": "model",
1006
+ "hasDynamicHelp": false,
1007
+ "multiple": false,
1008
+ "type": "option"
1009
+ },
1010
+ "oauth": {
1011
+ "description": "Connect via OAuth (browser-based)",
1012
+ "name": "oauth",
1013
+ "allowNo": false,
1014
+ "type": "boolean"
966
1015
  }
967
1016
  },
968
1017
  "hasDynamicHelp": false,
969
1018
  "hiddenAliases": [],
970
- "id": "model",
1019
+ "id": "providers:connect",
971
1020
  "pluginAlias": "byterover-cli",
972
1021
  "pluginName": "byterover-cli",
973
1022
  "pluginType": "core",
@@ -978,17 +1027,23 @@
978
1027
  "dist",
979
1028
  "oclif",
980
1029
  "commands",
981
- "model",
982
- "index.js"
1030
+ "providers",
1031
+ "connect.js"
983
1032
  ]
984
1033
  },
985
- "model:list": {
1034
+ "providers:disconnect": {
986
1035
  "aliases": [],
987
- "args": {},
988
- "description": "List available models from all connected providers",
1036
+ "args": {
1037
+ "provider": {
1038
+ "description": "Provider ID to disconnect",
1039
+ "name": "provider",
1040
+ "required": true
1041
+ }
1042
+ },
1043
+ "description": "Disconnect an LLM provider",
989
1044
  "examples": [
990
- "<%= config.bin %> model list",
991
- "<%= config.bin %> model list --format json"
1045
+ "<%= config.bin %> providers disconnect anthropic",
1046
+ "<%= config.bin %> providers disconnect openai --format json"
992
1047
  ],
993
1048
  "flags": {
994
1049
  "format": {
@@ -1002,19 +1057,11 @@
1002
1057
  "json"
1003
1058
  ],
1004
1059
  "type": "option"
1005
- },
1006
- "provider": {
1007
- "char": "p",
1008
- "description": "Only list models for a specific provider",
1009
- "name": "provider",
1010
- "hasDynamicHelp": false,
1011
- "multiple": false,
1012
- "type": "option"
1013
1060
  }
1014
1061
  },
1015
1062
  "hasDynamicHelp": false,
1016
1063
  "hiddenAliases": [],
1017
- "id": "model:list",
1064
+ "id": "providers:disconnect",
1018
1065
  "pluginAlias": "byterover-cli",
1019
1066
  "pluginName": "byterover-cli",
1020
1067
  "pluginType": "core",
@@ -1025,24 +1072,17 @@
1025
1072
  "dist",
1026
1073
  "oclif",
1027
1074
  "commands",
1028
- "model",
1029
- "list.js"
1075
+ "providers",
1076
+ "disconnect.js"
1030
1077
  ]
1031
1078
  },
1032
- "model:switch": {
1079
+ "providers": {
1033
1080
  "aliases": [],
1034
- "args": {
1035
- "model": {
1036
- "description": "Model ID to switch to (e.g., claude-sonnet-4-5, gpt-4.1)",
1037
- "name": "model",
1038
- "required": true
1039
- }
1040
- },
1041
- "description": "Switch the active model",
1081
+ "args": {},
1082
+ "description": "Show active provider and model",
1042
1083
  "examples": [
1043
- "<%= config.bin %> model switch claude-sonnet-4-5",
1044
- "<%= config.bin %> model switch gpt-4.1 --provider openai",
1045
- "<%= config.bin %> model switch claude-sonnet-4-5 --format json"
1084
+ "<%= config.bin %> providers",
1085
+ "<%= config.bin %> providers --format json"
1046
1086
  ],
1047
1087
  "flags": {
1048
1088
  "format": {
@@ -1056,19 +1096,11 @@
1056
1096
  "json"
1057
1097
  ],
1058
1098
  "type": "option"
1059
- },
1060
- "provider": {
1061
- "char": "p",
1062
- "description": "Provider ID (defaults to active provider)",
1063
- "name": "provider",
1064
- "hasDynamicHelp": false,
1065
- "multiple": false,
1066
- "type": "option"
1067
1099
  }
1068
1100
  },
1069
1101
  "hasDynamicHelp": false,
1070
1102
  "hiddenAliases": [],
1071
- "id": "model:switch",
1103
+ "id": "providers",
1072
1104
  "pluginAlias": "byterover-cli",
1073
1105
  "pluginName": "byterover-cli",
1074
1106
  "pluginType": "core",
@@ -1079,54 +1111,19 @@
1079
1111
  "dist",
1080
1112
  "oclif",
1081
1113
  "commands",
1082
- "model",
1083
- "switch.js"
1114
+ "providers",
1115
+ "index.js"
1084
1116
  ]
1085
1117
  },
1086
- "providers:connect": {
1118
+ "providers:list": {
1087
1119
  "aliases": [],
1088
- "args": {
1089
- "provider": {
1090
- "description": "Provider ID to connect (e.g., anthropic, openai, openrouter)",
1091
- "name": "provider",
1092
- "required": true
1093
- }
1094
- },
1095
- "description": "Connect or switch to an LLM provider",
1120
+ "args": {},
1121
+ "description": "List all available providers and their connection status",
1096
1122
  "examples": [
1097
- "<%= config.bin %> providers connect anthropic --api-key sk-xxx",
1098
- "<%= config.bin %> providers connect openai --api-key sk-xxx --model gpt-4.1",
1099
- "<%= config.bin %> providers connect openai --oauth",
1100
- "<%= config.bin %> providers connect byterover",
1101
- "<%= config.bin %> providers connect openai-compatible --base-url http://localhost:11434/v1",
1102
- "<%= config.bin %> providers connect openai-compatible --base-url http://localhost:11434/v1 --api-key sk-xxx --model llama3"
1123
+ "<%= config.bin %> providers list",
1124
+ "<%= config.bin %> providers list --format json"
1103
1125
  ],
1104
1126
  "flags": {
1105
- "api-key": {
1106
- "char": "k",
1107
- "description": "API key for the provider",
1108
- "name": "api-key",
1109
- "hasDynamicHelp": false,
1110
- "multiple": false,
1111
- "type": "option"
1112
- },
1113
- "base-url": {
1114
- "char": "b",
1115
- "description": "Base URL for OpenAI-compatible providers (e.g., http://localhost:11434/v1)",
1116
- "name": "base-url",
1117
- "hasDynamicHelp": false,
1118
- "multiple": false,
1119
- "type": "option"
1120
- },
1121
- "code": {
1122
- "char": "c",
1123
- "description": "Authorization code for code-paste OAuth providers (e.g., Anthropic). Not applicable to browser-callback providers like OpenAI — use --oauth without --code instead.",
1124
- "hidden": true,
1125
- "name": "code",
1126
- "hasDynamicHelp": false,
1127
- "multiple": false,
1128
- "type": "option"
1129
- },
1130
1127
  "format": {
1131
1128
  "description": "Output format (text or json)",
1132
1129
  "name": "format",
@@ -1138,25 +1135,11 @@
1138
1135
  "json"
1139
1136
  ],
1140
1137
  "type": "option"
1141
- },
1142
- "model": {
1143
- "char": "m",
1144
- "description": "Model to set as active after connecting",
1145
- "name": "model",
1146
- "hasDynamicHelp": false,
1147
- "multiple": false,
1148
- "type": "option"
1149
- },
1150
- "oauth": {
1151
- "description": "Connect via OAuth (browser-based)",
1152
- "name": "oauth",
1153
- "allowNo": false,
1154
- "type": "boolean"
1155
1138
  }
1156
1139
  },
1157
1140
  "hasDynamicHelp": false,
1158
1141
  "hiddenAliases": [],
1159
- "id": "providers:connect",
1142
+ "id": "providers:list",
1160
1143
  "pluginAlias": "byterover-cli",
1161
1144
  "pluginName": "byterover-cli",
1162
1145
  "pluginType": "core",
@@ -1168,22 +1151,22 @@
1168
1151
  "oclif",
1169
1152
  "commands",
1170
1153
  "providers",
1171
- "connect.js"
1154
+ "list.js"
1172
1155
  ]
1173
1156
  },
1174
- "providers:disconnect": {
1157
+ "providers:switch": {
1175
1158
  "aliases": [],
1176
1159
  "args": {
1177
1160
  "provider": {
1178
- "description": "Provider ID to disconnect",
1161
+ "description": "Provider ID to switch to (e.g., anthropic, openai)",
1179
1162
  "name": "provider",
1180
1163
  "required": true
1181
1164
  }
1182
1165
  },
1183
- "description": "Disconnect an LLM provider",
1166
+ "description": "Switch the active provider",
1184
1167
  "examples": [
1185
- "<%= config.bin %> providers disconnect anthropic",
1186
- "<%= config.bin %> providers disconnect openai --format json"
1168
+ "<%= config.bin %> providers switch anthropic",
1169
+ "<%= config.bin %> providers switch openai --format json"
1187
1170
  ],
1188
1171
  "flags": {
1189
1172
  "format": {
@@ -1201,7 +1184,7 @@
1201
1184
  },
1202
1185
  "hasDynamicHelp": false,
1203
1186
  "hiddenAliases": [],
1204
- "id": "providers:disconnect",
1187
+ "id": "providers:switch",
1205
1188
  "pluginAlias": "byterover-cli",
1206
1189
  "pluginName": "byterover-cli",
1207
1190
  "pluginType": "core",
@@ -1213,16 +1196,16 @@
1213
1196
  "oclif",
1214
1197
  "commands",
1215
1198
  "providers",
1216
- "disconnect.js"
1199
+ "switch.js"
1217
1200
  ]
1218
1201
  },
1219
- "providers": {
1202
+ "model": {
1220
1203
  "aliases": [],
1221
1204
  "args": {},
1222
- "description": "Show active provider and model",
1205
+ "description": "Show the active model",
1223
1206
  "examples": [
1224
- "<%= config.bin %> providers",
1225
- "<%= config.bin %> providers --format json"
1207
+ "<%= config.bin %> model",
1208
+ "<%= config.bin %> model --format json"
1226
1209
  ],
1227
1210
  "flags": {
1228
1211
  "format": {
@@ -1240,7 +1223,7 @@
1240
1223
  },
1241
1224
  "hasDynamicHelp": false,
1242
1225
  "hiddenAliases": [],
1243
- "id": "providers",
1226
+ "id": "model",
1244
1227
  "pluginAlias": "byterover-cli",
1245
1228
  "pluginName": "byterover-cli",
1246
1229
  "pluginType": "core",
@@ -1251,17 +1234,17 @@
1251
1234
  "dist",
1252
1235
  "oclif",
1253
1236
  "commands",
1254
- "providers",
1237
+ "model",
1255
1238
  "index.js"
1256
1239
  ]
1257
1240
  },
1258
- "providers:list": {
1241
+ "model:list": {
1259
1242
  "aliases": [],
1260
1243
  "args": {},
1261
- "description": "List all available providers and their connection status",
1244
+ "description": "List available models from all connected providers",
1262
1245
  "examples": [
1263
- "<%= config.bin %> providers list",
1264
- "<%= config.bin %> providers list --format json"
1246
+ "<%= config.bin %> model list",
1247
+ "<%= config.bin %> model list --format json"
1265
1248
  ],
1266
1249
  "flags": {
1267
1250
  "format": {
@@ -1275,11 +1258,19 @@
1275
1258
  "json"
1276
1259
  ],
1277
1260
  "type": "option"
1261
+ },
1262
+ "provider": {
1263
+ "char": "p",
1264
+ "description": "Only list models for a specific provider",
1265
+ "name": "provider",
1266
+ "hasDynamicHelp": false,
1267
+ "multiple": false,
1268
+ "type": "option"
1278
1269
  }
1279
1270
  },
1280
1271
  "hasDynamicHelp": false,
1281
1272
  "hiddenAliases": [],
1282
- "id": "providers:list",
1273
+ "id": "model:list",
1283
1274
  "pluginAlias": "byterover-cli",
1284
1275
  "pluginName": "byterover-cli",
1285
1276
  "pluginType": "core",
@@ -1290,23 +1281,24 @@
1290
1281
  "dist",
1291
1282
  "oclif",
1292
1283
  "commands",
1293
- "providers",
1284
+ "model",
1294
1285
  "list.js"
1295
1286
  ]
1296
1287
  },
1297
- "providers:switch": {
1288
+ "model:switch": {
1298
1289
  "aliases": [],
1299
1290
  "args": {
1300
- "provider": {
1301
- "description": "Provider ID to switch to (e.g., anthropic, openai)",
1302
- "name": "provider",
1291
+ "model": {
1292
+ "description": "Model ID to switch to (e.g., claude-sonnet-4-5, gpt-4.1)",
1293
+ "name": "model",
1303
1294
  "required": true
1304
1295
  }
1305
1296
  },
1306
- "description": "Switch the active provider",
1297
+ "description": "Switch the active model",
1307
1298
  "examples": [
1308
- "<%= config.bin %> providers switch anthropic",
1309
- "<%= config.bin %> providers switch openai --format json"
1299
+ "<%= config.bin %> model switch claude-sonnet-4-5",
1300
+ "<%= config.bin %> model switch gpt-4.1 --provider openai",
1301
+ "<%= config.bin %> model switch claude-sonnet-4-5 --format json"
1310
1302
  ],
1311
1303
  "flags": {
1312
1304
  "format": {
@@ -1320,11 +1312,19 @@
1320
1312
  "json"
1321
1313
  ],
1322
1314
  "type": "option"
1315
+ },
1316
+ "provider": {
1317
+ "char": "p",
1318
+ "description": "Provider ID (defaults to active provider)",
1319
+ "name": "provider",
1320
+ "hasDynamicHelp": false,
1321
+ "multiple": false,
1322
+ "type": "option"
1323
1323
  }
1324
1324
  },
1325
1325
  "hasDynamicHelp": false,
1326
1326
  "hiddenAliases": [],
1327
- "id": "providers:switch",
1327
+ "id": "model:switch",
1328
1328
  "pluginAlias": "byterover-cli",
1329
1329
  "pluginName": "byterover-cli",
1330
1330
  "pluginType": "core",
@@ -1335,7 +1335,7 @@
1335
1335
  "dist",
1336
1336
  "oclif",
1337
1337
  "commands",
1338
- "providers",
1338
+ "model",
1339
1339
  "switch.js"
1340
1340
  ]
1341
1341
  },
@@ -1636,5 +1636,5 @@
1636
1636
  ]
1637
1637
  }
1638
1638
  },
1639
- "version": "2.5.2"
1639
+ "version": "2.6.0"
1640
1640
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "byterover-cli",
3
3
  "description": "ByteRover's CLI",
4
- "version": "2.5.2",
4
+ "version": "2.6.0",
5
5
  "author": "ByteRover",
6
6
  "bin": {
7
7
  "brv": "./bin/run.js"
@@ -22,7 +22,7 @@
22
22
  "@ai-sdk/vercel": "^1.0.33",
23
23
  "@ai-sdk/xai": "^2.0.57",
24
24
  "@anthropic-ai/sdk": "^0.70.1",
25
- "@campfirein/brv-transport-client": "github:campfirein/brv-transport-client#release/0.8.4",
25
+ "@campfirein/brv-transport-client": "github:campfirein/brv-transport-client#1.0.0",
26
26
  "@google/genai": "^1.29.0",
27
27
  "@inkjs/ui": "^2.0.0",
28
28
  "@inquirer/prompts": "^7.9.0",
@@ -36,6 +36,7 @@
36
36
  "ai": "^5.0.129",
37
37
  "axios": "1.14.0",
38
38
  "chalk": "^5.6.2",
39
+ "dotenv": "^17.3.1",
39
40
  "esbuild": "^0.27.2",
40
41
  "express": "^5.1.0",
41
42
  "fullscreen-ink": "^0.1.0",
@@ -110,12 +111,13 @@
110
111
  "node": ">=20.0.0"
111
112
  },
112
113
  "files": [
114
+ "./.env.production",
113
115
  "./bin",
114
116
  "./dist",
115
117
  "./oclif.manifest.json"
116
118
  ],
117
119
  "homepage": "https://www.byterover.dev/",
118
- "license": "UNLICENSED",
120
+ "license": "Elastic-2.0",
119
121
  "main": "dist/index.js",
120
122
  "type": "module",
121
123
  "oclif": {
@@ -1,51 +0,0 @@
1
- /**
2
- * Represents metadata associated with a bullet point
3
- */
4
- export interface BulletMetadata {
5
- relatedFiles: string[];
6
- tags: string[];
7
- timestamp: string;
8
- }
9
- export interface BulletJson {
10
- content?: string;
11
- id: string;
12
- memoryId?: string;
13
- metadata: {
14
- relatedFiles: string[];
15
- tags: string[];
16
- timestamp: string;
17
- };
18
- section: string;
19
- }
20
- /**
21
- * Represents a single knowledge entry in the playbook.
22
- * Bullets contain reusable insights, strategies, or lessons learned.
23
- */
24
- export declare class Bullet {
25
- readonly content: string;
26
- readonly id: string;
27
- readonly memoryId?: string;
28
- readonly metadata: BulletMetadata;
29
- readonly section: string;
30
- constructor(id: string, section: string, content: string, metadata: BulletMetadata, memoryId?: string);
31
- /**
32
- * Creates a Bullet instance from a JSON object.
33
- * The content parameter must be provided separately when content is stored in files.
34
- * @param json The JSON object containing bullet metadata
35
- * @param content Optional content string (required if json.content is undefined)
36
- */
37
- static fromJson(json: BulletJson, content?: string): Bullet;
38
- /**
39
- * Formats the bullet for display in a playbook
40
- */
41
- toDisplayString(): string;
42
- /**
43
- * Converts the bullet to a JSON object
44
- * @param includeContent If false, content field is omitted (for file-based storage)
45
- */
46
- toJson(includeContent?: boolean): BulletJson;
47
- /**
48
- * Creates a new bullet with updated content
49
- */
50
- withUpdatedContent(content: string): Bullet;
51
- }
@@ -1,94 +0,0 @@
1
- /**
2
- * Represents a single knowledge entry in the playbook.
3
- * Bullets contain reusable insights, strategies, or lessons learned.
4
- */
5
- export class Bullet {
6
- content;
7
- id;
8
- memoryId;
9
- metadata;
10
- section;
11
- // eslint-disable-next-line max-params
12
- constructor(id, section, content, metadata, memoryId) {
13
- if (id.trim().length === 0) {
14
- throw new Error('Bullet ID cannot be empty');
15
- }
16
- if (section.trim().length === 0) {
17
- throw new Error('Bullet section cannot be empty');
18
- }
19
- if (content.trim().length === 0) {
20
- throw new Error('Bullet content cannot be empty');
21
- }
22
- if (!metadata.timestamp || metadata.timestamp.trim().length === 0) {
23
- throw new Error('Bullet metadata timestamp cannot be empty');
24
- }
25
- if (!metadata.relatedFiles || !Array.isArray(metadata.relatedFiles)) {
26
- throw new Error('Bullet metadata relatedFiles must be an array');
27
- }
28
- if (!metadata.tags || metadata.tags.length === 0) {
29
- throw new Error('Bullet metadata tags cannot be empty');
30
- }
31
- this.id = id;
32
- this.section = section;
33
- this.content = content;
34
- this.metadata = metadata;
35
- this.memoryId = memoryId;
36
- }
37
- /**
38
- * Creates a Bullet instance from a JSON object.
39
- * The content parameter must be provided separately when content is stored in files.
40
- * @param json The JSON object containing bullet metadata
41
- * @param content Optional content string (required if json.content is undefined)
42
- */
43
- static fromJson(json, content) {
44
- const bulletContent = json.content ?? content;
45
- if (!bulletContent) {
46
- throw new Error(`Bullet content is required for bullet ${json.id}`);
47
- }
48
- return new Bullet(json.id, json.section, bulletContent, {
49
- relatedFiles: json.metadata.relatedFiles,
50
- tags: json.metadata.tags,
51
- timestamp: json.metadata.timestamp,
52
- }, json.memoryId);
53
- }
54
- /**
55
- * Formats the bullet for display in a playbook
56
- */
57
- toDisplayString() {
58
- const tags = this.metadata.tags.join(', ');
59
- const tagDisplay = `[Tags: ${tags}]`;
60
- const filesDisplay = this.metadata.relatedFiles.length > 0 ? `[Files: ${this.metadata.relatedFiles.join(', ')}]` : '[Files: none]';
61
- const timestampDisplay = `[Updated: ${this.metadata.timestamp}]`;
62
- const metadataDisplay = [tagDisplay, filesDisplay, timestampDisplay].join(' ');
63
- return `- [${this.id}] ${this.content}\n ${this.section}\n ${metadataDisplay}`;
64
- }
65
- /**
66
- * Converts the bullet to a JSON object
67
- * @param includeContent If false, content field is omitted (for file-based storage)
68
- */
69
- toJson(includeContent = true) {
70
- const json = {
71
- id: this.id,
72
- memoryId: this.memoryId,
73
- metadata: {
74
- relatedFiles: this.metadata.relatedFiles,
75
- tags: this.metadata.tags,
76
- timestamp: this.metadata.timestamp,
77
- },
78
- section: this.section,
79
- };
80
- if (includeContent) {
81
- json.content = this.content;
82
- }
83
- return json;
84
- }
85
- /**
86
- * Creates a new bullet with updated content
87
- */
88
- withUpdatedContent(content) {
89
- return new Bullet(this.id, this.section, content, {
90
- ...this.metadata,
91
- timestamp: new Date().toISOString(),
92
- }, this.memoryId);
93
- }
94
- }