@bike4mind/cli 0.2.11-feat-api-key-rate-limiting.17321 → 0.2.11-feat-cli-no-project-config-flag.17320
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/bike4mind-cli.mjs +9 -1
- package/dist/{artifactExtractor-Z2P34J7I.js → artifactExtractor-3KB44W7B.js} +1 -1
- package/dist/{chunk-JS23EPWX.js → chunk-3OX632TE.js} +0 -11
- package/dist/{chunk-PCZVBQPE.js → chunk-7JR6VASX.js} +2 -2
- package/dist/{chunk-R3OGMLPO.js → chunk-7ORA6KGN.js} +2 -18
- package/dist/{chunk-OX6W5SJ7.js → chunk-HPYQM2B7.js} +2 -2
- package/dist/{chunk-4RN2B56U.js → chunk-JYH72REB.js} +1 -1
- package/dist/{create-2HOOSPE5.js → create-MSSVWSVO.js} +3 -3
- package/dist/index.js +21 -17
- package/dist/{llmMarkdownGenerator-OQA5GCN2.js → llmMarkdownGenerator-LCCZ76BQ.js} +1 -1
- package/dist/{markdownGenerator-2UXYZC2J.js → markdownGenerator-4OF7GEBT.js} +1 -1
- package/dist/{mementoService-NG6UDDII.js → mementoService-A6UR5AZY.js} +3 -3
- package/dist/{src-7O3STHAE.js → src-7UYCXFTE.js} +1 -3
- package/dist/{src-ZUR2CSS4.js → src-GFWGZLJE.js} +2 -2
- package/dist/{subtractCredits-CDF37PMP.js → subtractCredits-L52DZ3SP.js} +3 -3
- package/package.json +6 -6
package/bin/bike4mind-cli.mjs
CHANGED
|
@@ -36,16 +36,24 @@ const argv = yargs(hideBin(process.argv))
|
|
|
36
36
|
description: 'Show debug logs in console',
|
|
37
37
|
default: false,
|
|
38
38
|
})
|
|
39
|
+
.option('no-project-config', {
|
|
40
|
+
type: 'boolean',
|
|
41
|
+
description: 'Disable loading project-specific configuration (.bike4mind/)',
|
|
42
|
+
default: false,
|
|
43
|
+
})
|
|
39
44
|
.help()
|
|
40
45
|
.alias('help', 'h')
|
|
41
46
|
.version()
|
|
42
47
|
.alias('version', 'V')
|
|
43
48
|
.parse();
|
|
44
49
|
|
|
45
|
-
// Set environment
|
|
50
|
+
// Set environment variables from CLI flags
|
|
46
51
|
if (argv.verbose) {
|
|
47
52
|
process.env.B4M_VERBOSE = '1';
|
|
48
53
|
}
|
|
54
|
+
if (argv['no-project-config']) {
|
|
55
|
+
process.env.B4M_NO_PROJECT_CONFIG = '1';
|
|
56
|
+
}
|
|
49
57
|
|
|
50
58
|
// Auto-detect environment: prefer production mode when dist exists
|
|
51
59
|
const distPath = join(__dirname, '../dist/index.js');
|
|
@@ -672,14 +672,6 @@ var RealtimeVoiceUsageTransaction = BaseCreditTransaction.extend({
|
|
|
672
672
|
model: z7.string(),
|
|
673
673
|
sessionId: z7.string()
|
|
674
674
|
});
|
|
675
|
-
var CompletionApiUsageTransaction = BaseCreditTransaction.extend({
|
|
676
|
-
type: z7.literal("completion_api_usage"),
|
|
677
|
-
model: z7.string(),
|
|
678
|
-
apiKeyId: z7.string().optional(),
|
|
679
|
-
// Optional - present for API key auth, undefined for JWT
|
|
680
|
-
inputTokens: z7.number(),
|
|
681
|
-
outputTokens: z7.number()
|
|
682
|
-
});
|
|
683
675
|
var TransferCreditTransaction = BaseCreditTransaction.extend({
|
|
684
676
|
type: z7.literal("transfer_credit"),
|
|
685
677
|
recipientId: z7.string(),
|
|
@@ -694,7 +686,6 @@ var CreditTransaction = z7.discriminatedUnion("type", [
|
|
|
694
686
|
ImageGenerationUsageTransaction,
|
|
695
687
|
ImageEditUsageTransaction,
|
|
696
688
|
RealtimeVoiceUsageTransaction,
|
|
697
|
-
CompletionApiUsageTransaction,
|
|
698
689
|
TransferCreditTransaction,
|
|
699
690
|
ReceivedCreditTransaction
|
|
700
691
|
]);
|
|
@@ -709,7 +700,6 @@ var CREDIT_DEDUCT_TRANSACTION_TYPES = [
|
|
|
709
700
|
"image_generation_usage",
|
|
710
701
|
"image_edit_usage",
|
|
711
702
|
"realtime_voice_usage",
|
|
712
|
-
"completion_api_usage",
|
|
713
703
|
"transfer_credit",
|
|
714
704
|
"generic_deduct"
|
|
715
705
|
];
|
|
@@ -6011,7 +6001,6 @@ export {
|
|
|
6011
6001
|
ImageGenerationUsageTransaction,
|
|
6012
6002
|
ImageEditUsageTransaction,
|
|
6013
6003
|
RealtimeVoiceUsageTransaction,
|
|
6014
|
-
CompletionApiUsageTransaction,
|
|
6015
6004
|
TransferCreditTransaction,
|
|
6016
6005
|
CreditTransaction,
|
|
6017
6006
|
CREDIT_ADD_TRANSACTION_TYPES,
|
|
@@ -6,12 +6,12 @@ import {
|
|
|
6
6
|
getSettingsByNames,
|
|
7
7
|
obfuscateApiKey,
|
|
8
8
|
secureParameters
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-JYH72REB.js";
|
|
10
10
|
import {
|
|
11
11
|
ApiKeyType,
|
|
12
12
|
MementoTier,
|
|
13
13
|
isSupportedEmbeddingModel
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-3OX632TE.js";
|
|
15
15
|
|
|
16
16
|
// ../../b4m-core/packages/services/dist/src/apiKeyService/get.js
|
|
17
17
|
import { z } from "zod";
|
|
@@ -2,16 +2,15 @@
|
|
|
2
2
|
import {
|
|
3
3
|
BadRequestError,
|
|
4
4
|
secureParameters
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-JYH72REB.js";
|
|
6
6
|
import {
|
|
7
|
-
CompletionApiUsageTransaction,
|
|
8
7
|
GenericCreditDeductTransaction,
|
|
9
8
|
ImageEditUsageTransaction,
|
|
10
9
|
ImageGenerationUsageTransaction,
|
|
11
10
|
RealtimeVoiceUsageTransaction,
|
|
12
11
|
TextGenerationUsageTransaction,
|
|
13
12
|
TransferCreditTransaction
|
|
14
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-3OX632TE.js";
|
|
15
14
|
|
|
16
15
|
// ../../b4m-core/packages/services/dist/src/creditService/subtractCredits.js
|
|
17
16
|
import { z } from "zod";
|
|
@@ -21,7 +20,6 @@ var SubtractCreditsSchema = z.discriminatedUnion("type", [
|
|
|
21
20
|
ImageGenerationUsageTransaction.omit({ createdAt: true, updatedAt: true }),
|
|
22
21
|
RealtimeVoiceUsageTransaction.omit({ createdAt: true, updatedAt: true }),
|
|
23
22
|
ImageEditUsageTransaction.omit({ createdAt: true, updatedAt: true }),
|
|
24
|
-
CompletionApiUsageTransaction.omit({ createdAt: true, updatedAt: true }),
|
|
25
23
|
TransferCreditTransaction.omit({ createdAt: true, updatedAt: true })
|
|
26
24
|
]);
|
|
27
25
|
async function subtractCredits(parameters, { db, creditHolderMethods, skipBalanceUpdate, currentCreditHolder }) {
|
|
@@ -65,20 +63,6 @@ async function subtractCredits(parameters, { db, creditHolderMethods, skipBalanc
|
|
|
65
63
|
inputTokens: params.inputTokens,
|
|
66
64
|
outputTokens: params.outputTokens
|
|
67
65
|
});
|
|
68
|
-
} else if (type === "completion_api_usage") {
|
|
69
|
-
await db.creditTransactions.createTransaction("completion_api_usage", {
|
|
70
|
-
ownerId,
|
|
71
|
-
ownerType,
|
|
72
|
-
credits: -Math.abs(credits),
|
|
73
|
-
// Negative for usage
|
|
74
|
-
description: description || "Completion API usage",
|
|
75
|
-
metadata,
|
|
76
|
-
model: params.model,
|
|
77
|
-
apiKeyId: params.apiKeyId,
|
|
78
|
-
// Optional - present for API key auth, undefined for JWT
|
|
79
|
-
inputTokens: params.inputTokens,
|
|
80
|
-
outputTokens: params.outputTokens
|
|
81
|
-
});
|
|
82
66
|
} else if (type === "image_generation_usage") {
|
|
83
67
|
await db.creditTransactions.createTransaction("image_generation_usage", {
|
|
84
68
|
ownerId,
|
|
@@ -7,11 +7,11 @@ import {
|
|
|
7
7
|
getSettingsMap,
|
|
8
8
|
getSettingsValue,
|
|
9
9
|
secureParameters
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-JYH72REB.js";
|
|
11
11
|
import {
|
|
12
12
|
KnowledgeType,
|
|
13
13
|
SupportedFabFileMimeTypes
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-3OX632TE.js";
|
|
15
15
|
|
|
16
16
|
// ../../b4m-core/packages/services/dist/src/fabFileService/create.js
|
|
17
17
|
import { z } from "zod";
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
dayjsConfig_default,
|
|
17
17
|
extractSnippetMeta,
|
|
18
18
|
settingsMap
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-3OX632TE.js";
|
|
20
20
|
|
|
21
21
|
// ../../b4m-core/packages/utils/dist/src/storage/S3Storage.js
|
|
22
22
|
import { S3Client, PutObjectCommand, DeleteObjectCommand, GetObjectCommand, HeadObjectCommand } from "@aws-sdk/client-s3";
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
createFabFile,
|
|
4
4
|
createFabFileSchema
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-HPYQM2B7.js";
|
|
6
|
+
import "./chunk-JYH72REB.js";
|
|
7
7
|
import "./chunk-AMDXHL6S.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-3OX632TE.js";
|
|
9
9
|
import "./chunk-PDX44BCA.js";
|
|
10
10
|
export {
|
|
11
11
|
createFabFile,
|
package/dist/index.js
CHANGED
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
getEffectiveApiKey,
|
|
5
5
|
getOpenWeatherKey,
|
|
6
6
|
getSerperKey
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-7JR6VASX.js";
|
|
8
|
+
import "./chunk-7ORA6KGN.js";
|
|
9
|
+
import "./chunk-HPYQM2B7.js";
|
|
10
10
|
import {
|
|
11
11
|
BFLImageService,
|
|
12
12
|
BaseStorage,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
OpenAIBackend,
|
|
16
16
|
OpenAIImageService,
|
|
17
17
|
XAIImageService
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-JYH72REB.js";
|
|
19
19
|
import {
|
|
20
20
|
Logger
|
|
21
21
|
} from "./chunk-AMDXHL6S.js";
|
|
@@ -73,7 +73,7 @@ import {
|
|
|
73
73
|
XAI_IMAGE_MODELS,
|
|
74
74
|
b4mLLMTools,
|
|
75
75
|
getMcpProviderMetadata
|
|
76
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-3OX632TE.js";
|
|
77
77
|
import {
|
|
78
78
|
__require
|
|
79
79
|
} from "./chunk-PDX44BCA.js";
|
|
@@ -2381,15 +2381,19 @@ var ConfigStore = class {
|
|
|
2381
2381
|
throw error;
|
|
2382
2382
|
}
|
|
2383
2383
|
}
|
|
2384
|
-
this.projectConfigDir = findProjectConfigDir();
|
|
2385
2384
|
let projectConfig = null;
|
|
2386
2385
|
let projectLocalConfig = null;
|
|
2387
|
-
if (
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2386
|
+
if (process.env.B4M_NO_PROJECT_CONFIG !== "1") {
|
|
2387
|
+
this.projectConfigDir = findProjectConfigDir();
|
|
2388
|
+
if (this.projectConfigDir) {
|
|
2389
|
+
projectConfig = await loadProjectConfig(this.projectConfigDir);
|
|
2390
|
+
projectLocalConfig = await loadProjectLocalConfig(this.projectConfigDir);
|
|
2391
|
+
if (projectConfig) {
|
|
2392
|
+
console.log(`\u{1F4C1} Project config loaded from: ${this.projectConfigDir}/.bike4mind/`);
|
|
2393
|
+
}
|
|
2392
2394
|
}
|
|
2395
|
+
} else {
|
|
2396
|
+
this.projectConfigDir = null;
|
|
2393
2397
|
}
|
|
2394
2398
|
this.config = mergeConfigs(globalConfig, projectConfig, projectLocalConfig);
|
|
2395
2399
|
return this.config;
|
|
@@ -11548,7 +11552,7 @@ import { isAxiosError as isAxiosError2 } from "axios";
|
|
|
11548
11552
|
// package.json
|
|
11549
11553
|
var package_default = {
|
|
11550
11554
|
name: "@bike4mind/cli",
|
|
11551
|
-
version: "0.2.11-feat-
|
|
11555
|
+
version: "0.2.11-feat-cli-no-project-config-flag.17320+1968df1c7",
|
|
11552
11556
|
type: "module",
|
|
11553
11557
|
description: "Interactive CLI tool for Bike4Mind with ReAct agents",
|
|
11554
11558
|
license: "UNLICENSED",
|
|
@@ -11652,10 +11656,10 @@ var package_default = {
|
|
|
11652
11656
|
},
|
|
11653
11657
|
devDependencies: {
|
|
11654
11658
|
"@bike4mind/agents": "0.1.0",
|
|
11655
|
-
"@bike4mind/common": "2.40.1-feat-
|
|
11656
|
-
"@bike4mind/mcp": "1.20.5-feat-
|
|
11657
|
-
"@bike4mind/services": "2.35.1-feat-
|
|
11658
|
-
"@bike4mind/utils": "2.1.5-feat-
|
|
11659
|
+
"@bike4mind/common": "2.40.1-feat-cli-no-project-config-flag.17320+1968df1c7",
|
|
11660
|
+
"@bike4mind/mcp": "1.20.5-feat-cli-no-project-config-flag.17320+1968df1c7",
|
|
11661
|
+
"@bike4mind/services": "2.35.1-feat-cli-no-project-config-flag.17320+1968df1c7",
|
|
11662
|
+
"@bike4mind/utils": "2.1.5-feat-cli-no-project-config-flag.17320+1968df1c7",
|
|
11659
11663
|
"@types/better-sqlite3": "^7.6.13",
|
|
11660
11664
|
"@types/diff": "^5.0.9",
|
|
11661
11665
|
"@types/jsonwebtoken": "^9.0.4",
|
|
@@ -11668,7 +11672,7 @@ var package_default = {
|
|
|
11668
11672
|
typescript: "^5.9.3",
|
|
11669
11673
|
vitest: "^3.2.4"
|
|
11670
11674
|
},
|
|
11671
|
-
gitHead: "
|
|
11675
|
+
gitHead: "1968df1c7e973aac79e48cd2e6dc1c418b4d47d7"
|
|
11672
11676
|
};
|
|
11673
11677
|
|
|
11674
11678
|
// src/config/constants.ts
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
findMostSimilarMemento,
|
|
4
4
|
getRelevantMementos
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-7JR6VASX.js";
|
|
6
|
+
import "./chunk-JYH72REB.js";
|
|
7
7
|
import "./chunk-AMDXHL6S.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-3OX632TE.js";
|
|
9
9
|
import "./chunk-PDX44BCA.js";
|
|
10
10
|
export {
|
|
11
11
|
findMostSimilarMemento,
|
|
@@ -40,7 +40,6 @@ import {
|
|
|
40
40
|
CitableSourceSchema,
|
|
41
41
|
ClaudeArtifactMimeTypes,
|
|
42
42
|
CollectionType,
|
|
43
|
-
CompletionApiUsageTransaction,
|
|
44
43
|
CompletionRequestSchema,
|
|
45
44
|
ConfluenceApi,
|
|
46
45
|
CreateFabFileRequestInput,
|
|
@@ -294,7 +293,7 @@ import {
|
|
|
294
293
|
validateQuestMasterArtifactV2,
|
|
295
294
|
validateReactArtifactV2,
|
|
296
295
|
validateSvgArtifactV2
|
|
297
|
-
} from "./chunk-
|
|
296
|
+
} from "./chunk-3OX632TE.js";
|
|
298
297
|
import "./chunk-PDX44BCA.js";
|
|
299
298
|
export {
|
|
300
299
|
ALL_IMAGE_MODELS,
|
|
@@ -337,7 +336,6 @@ export {
|
|
|
337
336
|
CitableSourceSchema,
|
|
338
337
|
ClaudeArtifactMimeTypes,
|
|
339
338
|
CollectionType,
|
|
340
|
-
CompletionApiUsageTransaction,
|
|
341
339
|
CompletionRequestSchema,
|
|
342
340
|
ConfluenceApi,
|
|
343
341
|
CreateFabFileRequestInput,
|
|
@@ -120,7 +120,7 @@ import {
|
|
|
120
120
|
validateMermaidSyntax,
|
|
121
121
|
warmUpSettingsCache,
|
|
122
122
|
withRetry
|
|
123
|
-
} from "./chunk-
|
|
123
|
+
} from "./chunk-JYH72REB.js";
|
|
124
124
|
import {
|
|
125
125
|
Logger,
|
|
126
126
|
NotificationDeduplicator,
|
|
@@ -129,7 +129,7 @@ import {
|
|
|
129
129
|
postLowCreditsNotificationToSlack,
|
|
130
130
|
postMessageToSlack
|
|
131
131
|
} from "./chunk-AMDXHL6S.js";
|
|
132
|
-
import "./chunk-
|
|
132
|
+
import "./chunk-3OX632TE.js";
|
|
133
133
|
import "./chunk-PDX44BCA.js";
|
|
134
134
|
export {
|
|
135
135
|
AWSBackend,
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
SubtractCreditsSchema,
|
|
4
4
|
subtractCredits
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-7ORA6KGN.js";
|
|
6
|
+
import "./chunk-JYH72REB.js";
|
|
7
7
|
import "./chunk-AMDXHL6S.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-3OX632TE.js";
|
|
9
9
|
import "./chunk-PDX44BCA.js";
|
|
10
10
|
export {
|
|
11
11
|
SubtractCreditsSchema,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bike4mind/cli",
|
|
3
|
-
"version": "0.2.11-feat-
|
|
3
|
+
"version": "0.2.11-feat-cli-no-project-config-flag.17320+1968df1c7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Interactive CLI tool for Bike4Mind with ReAct agents",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -104,10 +104,10 @@
|
|
|
104
104
|
},
|
|
105
105
|
"devDependencies": {
|
|
106
106
|
"@bike4mind/agents": "0.1.0",
|
|
107
|
-
"@bike4mind/common": "2.40.1-feat-
|
|
108
|
-
"@bike4mind/mcp": "1.20.5-feat-
|
|
109
|
-
"@bike4mind/services": "2.35.1-feat-
|
|
110
|
-
"@bike4mind/utils": "2.1.5-feat-
|
|
107
|
+
"@bike4mind/common": "2.40.1-feat-cli-no-project-config-flag.17320+1968df1c7",
|
|
108
|
+
"@bike4mind/mcp": "1.20.5-feat-cli-no-project-config-flag.17320+1968df1c7",
|
|
109
|
+
"@bike4mind/services": "2.35.1-feat-cli-no-project-config-flag.17320+1968df1c7",
|
|
110
|
+
"@bike4mind/utils": "2.1.5-feat-cli-no-project-config-flag.17320+1968df1c7",
|
|
111
111
|
"@types/better-sqlite3": "^7.6.13",
|
|
112
112
|
"@types/diff": "^5.0.9",
|
|
113
113
|
"@types/jsonwebtoken": "^9.0.4",
|
|
@@ -120,5 +120,5 @@
|
|
|
120
120
|
"typescript": "^5.9.3",
|
|
121
121
|
"vitest": "^3.2.4"
|
|
122
122
|
},
|
|
123
|
-
"gitHead": "
|
|
123
|
+
"gitHead": "1968df1c7e973aac79e48cd2e6dc1c418b4d47d7"
|
|
124
124
|
}
|