@bike4mind/cli 0.2.11-fix-cli-socket-hangup-error-handling.17321 → 0.2.11-ja-fix-confluence-table-data-5752.17346
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/dist/{artifactExtractor-3KB44W7B.js → artifactExtractor-FNFWQEQU.js} +1 -1
- package/dist/{chunk-HPYQM2B7.js → chunk-FJM3L5N3.js} +2 -2
- package/dist/{chunk-3OX632TE.js → chunk-FQDYYJMI.js} +115 -30
- package/dist/{chunk-7ORA6KGN.js → chunk-LZXUR7SE.js} +2 -2
- package/dist/{chunk-JYH72REB.js → chunk-MNS37QTQ.js} +1 -1
- package/dist/{chunk-7JR6VASX.js → chunk-NBCK5RYI.js} +2 -2
- package/dist/{create-MSSVWSVO.js → create-2NDKBHAN.js} +3 -3
- package/dist/index.js +36 -97
- package/dist/{llmMarkdownGenerator-LCCZ76BQ.js → llmMarkdownGenerator-4HNYPA24.js} +1 -1
- package/dist/{markdownGenerator-4OF7GEBT.js → markdownGenerator-ZYSYZQOV.js} +1 -1
- package/dist/{mementoService-A6UR5AZY.js → mementoService-SGXIM4IA.js} +3 -3
- package/dist/{src-GFWGZLJE.js → src-HFFCVWXX.js} +2 -2
- package/dist/{src-7UYCXFTE.js → src-VSPXREOD.js} +7 -3
- package/dist/{subtractCredits-L52DZ3SP.js → subtractCredits-NJVQR2WJ.js} +3 -3
- package/package.json +6 -6
|
@@ -7,11 +7,11 @@ import {
|
|
|
7
7
|
getSettingsMap,
|
|
8
8
|
getSettingsValue,
|
|
9
9
|
secureParameters
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-MNS37QTQ.js";
|
|
11
11
|
import {
|
|
12
12
|
KnowledgeType,
|
|
13
13
|
SupportedFabFileMimeTypes
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-FQDYYJMI.js";
|
|
15
15
|
|
|
16
16
|
// ../../b4m-core/packages/services/dist/src/fabFileService/create.js
|
|
17
17
|
import { z } from "zod";
|
|
@@ -5052,6 +5052,74 @@ function formatUserList(users) {
|
|
|
5052
5052
|
}
|
|
5053
5053
|
|
|
5054
5054
|
// ../../b4m-core/packages/common/dist/src/jira/api.js
|
|
5055
|
+
function wikiMarkupToAdf(text) {
|
|
5056
|
+
const lines = text.split("\n");
|
|
5057
|
+
const content = [];
|
|
5058
|
+
let currentTableRows = [];
|
|
5059
|
+
let inTable = false;
|
|
5060
|
+
for (const line of lines) {
|
|
5061
|
+
const trimmedLine = line.trim();
|
|
5062
|
+
if (trimmedLine.startsWith("||") && trimmedLine.endsWith("||")) {
|
|
5063
|
+
inTable = true;
|
|
5064
|
+
const cells = trimmedLine.slice(2, -2).split("||").map((cell) => cell.trim());
|
|
5065
|
+
const headerRow = {
|
|
5066
|
+
type: "tableRow",
|
|
5067
|
+
content: cells.map((cell) => ({
|
|
5068
|
+
type: "tableHeader",
|
|
5069
|
+
attrs: {},
|
|
5070
|
+
content: [{ type: "paragraph", content: [{ type: "text", text: cell || " " }] }]
|
|
5071
|
+
}))
|
|
5072
|
+
};
|
|
5073
|
+
currentTableRows.push(headerRow);
|
|
5074
|
+
continue;
|
|
5075
|
+
}
|
|
5076
|
+
if (trimmedLine.startsWith("|") && trimmedLine.endsWith("|") && !trimmedLine.startsWith("||")) {
|
|
5077
|
+
inTable = true;
|
|
5078
|
+
const cells = trimmedLine.slice(1, -1).split("|").map((cell) => cell.trim());
|
|
5079
|
+
const dataRow = {
|
|
5080
|
+
type: "tableRow",
|
|
5081
|
+
content: cells.map((cell) => ({
|
|
5082
|
+
type: "tableCell",
|
|
5083
|
+
attrs: {},
|
|
5084
|
+
content: [{ type: "paragraph", content: [{ type: "text", text: cell || " " }] }]
|
|
5085
|
+
}))
|
|
5086
|
+
};
|
|
5087
|
+
currentTableRows.push(dataRow);
|
|
5088
|
+
continue;
|
|
5089
|
+
}
|
|
5090
|
+
if (inTable && currentTableRows.length > 0) {
|
|
5091
|
+
const table = {
|
|
5092
|
+
type: "table",
|
|
5093
|
+
attrs: { isNumberColumnEnabled: false, layout: "default" },
|
|
5094
|
+
content: currentTableRows
|
|
5095
|
+
};
|
|
5096
|
+
content.push(table);
|
|
5097
|
+
currentTableRows = [];
|
|
5098
|
+
inTable = false;
|
|
5099
|
+
}
|
|
5100
|
+
if (trimmedLine) {
|
|
5101
|
+
content.push({
|
|
5102
|
+
type: "paragraph",
|
|
5103
|
+
content: [{ type: "text", text: trimmedLine }]
|
|
5104
|
+
});
|
|
5105
|
+
}
|
|
5106
|
+
}
|
|
5107
|
+
if (currentTableRows.length > 0) {
|
|
5108
|
+
const table = {
|
|
5109
|
+
type: "table",
|
|
5110
|
+
attrs: { isNumberColumnEnabled: false, layout: "default" },
|
|
5111
|
+
content: currentTableRows
|
|
5112
|
+
};
|
|
5113
|
+
content.push(table);
|
|
5114
|
+
}
|
|
5115
|
+
if (content.length === 0) {
|
|
5116
|
+
content.push({ type: "paragraph", content: [{ type: "text", text: " " }] });
|
|
5117
|
+
}
|
|
5118
|
+
return { type: "doc", version: 1, content };
|
|
5119
|
+
}
|
|
5120
|
+
function containsWikiTable(text) {
|
|
5121
|
+
return /^\|\|.+\|\|$/m.test(text) || /^\|(?!\|).+\|$/m.test(text);
|
|
5122
|
+
}
|
|
5055
5123
|
var JiraApi = class {
|
|
5056
5124
|
config;
|
|
5057
5125
|
constructor(config) {
|
|
@@ -5131,16 +5199,21 @@ var JiraApi = class {
|
|
|
5131
5199
|
...customFields
|
|
5132
5200
|
};
|
|
5133
5201
|
if (description) {
|
|
5134
|
-
|
|
5135
|
-
|
|
5136
|
-
|
|
5137
|
-
|
|
5138
|
-
|
|
5139
|
-
|
|
5140
|
-
|
|
5141
|
-
|
|
5142
|
-
|
|
5143
|
-
|
|
5202
|
+
if (containsWikiTable(description)) {
|
|
5203
|
+
console.log("[JIRA-ADF] Converting wiki table to ADF", { length: description.length });
|
|
5204
|
+
fields.description = wikiMarkupToAdf(description);
|
|
5205
|
+
} else {
|
|
5206
|
+
fields.description = {
|
|
5207
|
+
type: "doc",
|
|
5208
|
+
version: 1,
|
|
5209
|
+
content: [
|
|
5210
|
+
{
|
|
5211
|
+
type: "paragraph",
|
|
5212
|
+
content: [{ type: "text", text: description }]
|
|
5213
|
+
}
|
|
5214
|
+
]
|
|
5215
|
+
};
|
|
5216
|
+
}
|
|
5144
5217
|
}
|
|
5145
5218
|
if (assignee) {
|
|
5146
5219
|
fields.assignee = { id: assignee };
|
|
@@ -5166,16 +5239,21 @@ var JiraApi = class {
|
|
|
5166
5239
|
fields.summary = summary;
|
|
5167
5240
|
}
|
|
5168
5241
|
if (description) {
|
|
5169
|
-
|
|
5170
|
-
|
|
5171
|
-
|
|
5172
|
-
|
|
5173
|
-
|
|
5174
|
-
|
|
5175
|
-
|
|
5176
|
-
|
|
5177
|
-
|
|
5178
|
-
|
|
5242
|
+
if (containsWikiTable(description)) {
|
|
5243
|
+
console.log("[JIRA-ADF] Converting wiki table to ADF (update)", { length: description.length });
|
|
5244
|
+
fields.description = wikiMarkupToAdf(description);
|
|
5245
|
+
} else {
|
|
5246
|
+
fields.description = {
|
|
5247
|
+
type: "doc",
|
|
5248
|
+
version: 1,
|
|
5249
|
+
content: [
|
|
5250
|
+
{
|
|
5251
|
+
type: "paragraph",
|
|
5252
|
+
content: [{ type: "text", text: description }]
|
|
5253
|
+
}
|
|
5254
|
+
]
|
|
5255
|
+
};
|
|
5256
|
+
}
|
|
5179
5257
|
}
|
|
5180
5258
|
if (labels) {
|
|
5181
5259
|
fields.labels = labels;
|
|
@@ -5335,16 +5413,21 @@ var JiraApi = class {
|
|
|
5335
5413
|
issuetype: { name: issueTypeName }
|
|
5336
5414
|
};
|
|
5337
5415
|
if (description) {
|
|
5338
|
-
|
|
5339
|
-
|
|
5340
|
-
|
|
5341
|
-
|
|
5342
|
-
|
|
5343
|
-
|
|
5344
|
-
|
|
5345
|
-
|
|
5346
|
-
|
|
5347
|
-
|
|
5416
|
+
if (containsWikiTable(description)) {
|
|
5417
|
+
console.log("[JIRA-ADF] Converting wiki table to ADF (bulk)", { length: description.length });
|
|
5418
|
+
fields.description = wikiMarkupToAdf(description);
|
|
5419
|
+
} else {
|
|
5420
|
+
fields.description = {
|
|
5421
|
+
type: "doc",
|
|
5422
|
+
version: 1,
|
|
5423
|
+
content: [
|
|
5424
|
+
{
|
|
5425
|
+
type: "paragraph",
|
|
5426
|
+
content: [{ type: "text", text: description }]
|
|
5427
|
+
}
|
|
5428
|
+
]
|
|
5429
|
+
};
|
|
5430
|
+
}
|
|
5348
5431
|
}
|
|
5349
5432
|
if (assignee) {
|
|
5350
5433
|
fields.assignee = { id: assignee };
|
|
@@ -6164,6 +6247,8 @@ export {
|
|
|
6164
6247
|
formatUser,
|
|
6165
6248
|
formatTransitionResult,
|
|
6166
6249
|
formatUserList,
|
|
6250
|
+
wikiMarkupToAdf,
|
|
6251
|
+
containsWikiTable,
|
|
6167
6252
|
JiraApi,
|
|
6168
6253
|
getErrorMessage,
|
|
6169
6254
|
getAtlassianConfig,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
BadRequestError,
|
|
4
4
|
secureParameters
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-MNS37QTQ.js";
|
|
6
6
|
import {
|
|
7
7
|
GenericCreditDeductTransaction,
|
|
8
8
|
ImageEditUsageTransaction,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
RealtimeVoiceUsageTransaction,
|
|
11
11
|
TextGenerationUsageTransaction,
|
|
12
12
|
TransferCreditTransaction
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-FQDYYJMI.js";
|
|
14
14
|
|
|
15
15
|
// ../../b4m-core/packages/services/dist/src/creditService/subtractCredits.js
|
|
16
16
|
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-FQDYYJMI.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";
|
|
@@ -6,12 +6,12 @@ import {
|
|
|
6
6
|
getSettingsByNames,
|
|
7
7
|
obfuscateApiKey,
|
|
8
8
|
secureParameters
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-MNS37QTQ.js";
|
|
10
10
|
import {
|
|
11
11
|
ApiKeyType,
|
|
12
12
|
MementoTier,
|
|
13
13
|
isSupportedEmbeddingModel
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-FQDYYJMI.js";
|
|
15
15
|
|
|
16
16
|
// ../../b4m-core/packages/services/dist/src/apiKeyService/get.js
|
|
17
17
|
import { z } from "zod";
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
createFabFile,
|
|
4
4
|
createFabFileSchema
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-FJM3L5N3.js";
|
|
6
|
+
import "./chunk-MNS37QTQ.js";
|
|
7
7
|
import "./chunk-AMDXHL6S.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-FQDYYJMI.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-NBCK5RYI.js";
|
|
8
|
+
import "./chunk-LZXUR7SE.js";
|
|
9
|
+
import "./chunk-FJM3L5N3.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-MNS37QTQ.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-FQDYYJMI.js";
|
|
77
77
|
import {
|
|
78
78
|
__require
|
|
79
79
|
} from "./chunk-PDX44BCA.js";
|
|
@@ -11253,8 +11253,7 @@ var ServerLlmBackend = class {
|
|
|
11253
11253
|
reject(error);
|
|
11254
11254
|
});
|
|
11255
11255
|
} catch (error) {
|
|
11256
|
-
|
|
11257
|
-
logger.error(`LLM completion failed: ${errorMsg}`);
|
|
11256
|
+
logger.error("LLM completion failed", error);
|
|
11258
11257
|
if (isAxiosError(error)) {
|
|
11259
11258
|
logger.debug(
|
|
11260
11259
|
`[ServerLlmBackend] Axios error details: ${JSON.stringify({
|
|
@@ -11297,8 +11296,8 @@ var ServerLlmBackend = class {
|
|
|
11297
11296
|
} catch (extractError) {
|
|
11298
11297
|
logger.error("[ServerLlmBackend] Error extracting response:", extractError);
|
|
11299
11298
|
}
|
|
11300
|
-
const
|
|
11301
|
-
reject(new Error(
|
|
11299
|
+
const errorMsg = errorDetails ? `403 Forbidden: ${errorDetails}` : "403 Forbidden - Request blocked by server. Check debug logs at ~/.bike4mind/debug/";
|
|
11300
|
+
reject(new Error(errorMsg));
|
|
11302
11301
|
return;
|
|
11303
11302
|
}
|
|
11304
11303
|
if (error.response) {
|
|
@@ -11317,12 +11316,6 @@ var ServerLlmBackend = class {
|
|
|
11317
11316
|
reject(new Error("Cannot connect to Bike4Mind server. Please check your internet connection."));
|
|
11318
11317
|
} else if (error.message.includes("Rate limit exceeded")) {
|
|
11319
11318
|
reject(error);
|
|
11320
|
-
} else if (error.message.includes("socket hang up")) {
|
|
11321
|
-
reject(
|
|
11322
|
-
new Error(
|
|
11323
|
-
"Connection to server was interrupted (socket hang up). This can happen due to server timeouts or network issues. Please try again."
|
|
11324
|
-
)
|
|
11325
|
-
);
|
|
11326
11319
|
} else {
|
|
11327
11320
|
reject(new Error(`Failed to complete LLM request: ${error.message}`));
|
|
11328
11321
|
}
|
|
@@ -11555,7 +11548,7 @@ import { isAxiosError as isAxiosError2 } from "axios";
|
|
|
11555
11548
|
// package.json
|
|
11556
11549
|
var package_default = {
|
|
11557
11550
|
name: "@bike4mind/cli",
|
|
11558
|
-
version: "0.2.11-fix-
|
|
11551
|
+
version: "0.2.11-ja-fix-confluence-table-data-5752.17346+899c98af0",
|
|
11559
11552
|
type: "module",
|
|
11560
11553
|
description: "Interactive CLI tool for Bike4Mind with ReAct agents",
|
|
11561
11554
|
license: "UNLICENSED",
|
|
@@ -11659,10 +11652,10 @@ var package_default = {
|
|
|
11659
11652
|
},
|
|
11660
11653
|
devDependencies: {
|
|
11661
11654
|
"@bike4mind/agents": "0.1.0",
|
|
11662
|
-
"@bike4mind/common": "2.40.1-fix-
|
|
11663
|
-
"@bike4mind/mcp": "1.20.5-fix-
|
|
11664
|
-
"@bike4mind/services": "2.35.1-fix-
|
|
11665
|
-
"@bike4mind/utils": "2.1.5-fix-
|
|
11655
|
+
"@bike4mind/common": "2.40.1-ja-fix-confluence-table-data-5752.17346+899c98af0",
|
|
11656
|
+
"@bike4mind/mcp": "1.20.5-ja-fix-confluence-table-data-5752.17346+899c98af0",
|
|
11657
|
+
"@bike4mind/services": "2.35.1-ja-fix-confluence-table-data-5752.17346+899c98af0",
|
|
11658
|
+
"@bike4mind/utils": "2.1.5-ja-fix-confluence-table-data-5752.17346+899c98af0",
|
|
11666
11659
|
"@types/better-sqlite3": "^7.6.13",
|
|
11667
11660
|
"@types/diff": "^5.0.9",
|
|
11668
11661
|
"@types/jsonwebtoken": "^9.0.4",
|
|
@@ -11675,7 +11668,7 @@ var package_default = {
|
|
|
11675
11668
|
typescript: "^5.9.3",
|
|
11676
11669
|
vitest: "^3.2.4"
|
|
11677
11670
|
},
|
|
11678
|
-
gitHead: "
|
|
11671
|
+
gitHead: "899c98af0bfb597fe554bd11a5b8555eeae79f70"
|
|
11679
11672
|
};
|
|
11680
11673
|
|
|
11681
11674
|
// src/config/constants.ts
|
|
@@ -11757,21 +11750,9 @@ var SubagentOrchestrator = class {
|
|
|
11757
11750
|
this.beforeRunCallback(subagent, type);
|
|
11758
11751
|
}
|
|
11759
11752
|
const startTime = Date.now();
|
|
11760
|
-
|
|
11761
|
-
|
|
11762
|
-
|
|
11763
|
-
maxIterations
|
|
11764
|
-
});
|
|
11765
|
-
} catch (error) {
|
|
11766
|
-
const duration2 = Date.now() - startTime;
|
|
11767
|
-
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
11768
|
-
this.deps.logger.error(`Subagent failed after ${duration2}ms: ${errorMessage}`);
|
|
11769
|
-
throw new Error(
|
|
11770
|
-
`Subagent execution failed: ${errorMessage}
|
|
11771
|
-
|
|
11772
|
-
This error occurred while running a ${type} subagent. The main conversation has been preserved, and you can retry or continue with other tasks.`
|
|
11773
|
-
);
|
|
11774
|
-
}
|
|
11753
|
+
const result = await subagent.run(task, {
|
|
11754
|
+
maxIterations
|
|
11755
|
+
});
|
|
11775
11756
|
const duration = Date.now() - startTime;
|
|
11776
11757
|
if (this.afterRunCallback) {
|
|
11777
11758
|
this.afterRunCallback(subagent, type);
|
|
@@ -11985,18 +11966,13 @@ function createSubagentDelegateTool(orchestrator, parentSessionId) {
|
|
|
11985
11966
|
}
|
|
11986
11967
|
const thoroughness = params.thoroughness || "medium";
|
|
11987
11968
|
const type = params.type;
|
|
11988
|
-
|
|
11989
|
-
|
|
11990
|
-
|
|
11991
|
-
|
|
11992
|
-
|
|
11993
|
-
|
|
11994
|
-
|
|
11995
|
-
return result.summary;
|
|
11996
|
-
} catch (error) {
|
|
11997
|
-
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
11998
|
-
throw new Error(`Failed to execute ${type} subagent: ${errorMessage}`);
|
|
11999
|
-
}
|
|
11969
|
+
const result = await orchestrator.delegateToSubagent({
|
|
11970
|
+
task: params.task,
|
|
11971
|
+
type,
|
|
11972
|
+
thoroughness,
|
|
11973
|
+
parentSessionId
|
|
11974
|
+
});
|
|
11975
|
+
return result.summary;
|
|
12000
11976
|
},
|
|
12001
11977
|
toolSchema: {
|
|
12002
11978
|
name: "subagent_delegate",
|
|
@@ -12635,13 +12611,6 @@ Remember: Use context from previous messages to understand follow-up questions.$
|
|
|
12635
12611
|
content: userMessageContent,
|
|
12636
12612
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
12637
12613
|
};
|
|
12638
|
-
const sessionWithUserMessage = {
|
|
12639
|
-
...state.session,
|
|
12640
|
-
messages: [...state.session.messages, userMessage],
|
|
12641
|
-
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
12642
|
-
};
|
|
12643
|
-
setState((prev) => ({ ...prev, session: sessionWithUserMessage }));
|
|
12644
|
-
setStoreSession(sessionWithUserMessage);
|
|
12645
12614
|
const pendingAssistantMessage = {
|
|
12646
12615
|
id: uuidv410(),
|
|
12647
12616
|
role: "assistant",
|
|
@@ -12649,9 +12618,15 @@ Remember: Use context from previous messages to understand follow-up questions.$
|
|
|
12649
12618
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
12650
12619
|
metadata: {
|
|
12651
12620
|
steps: []
|
|
12652
|
-
// Steps will be populated by the init handler's stepHandler
|
|
12653
12621
|
}
|
|
12654
12622
|
};
|
|
12623
|
+
const sessionWithUserMessage = {
|
|
12624
|
+
...state.session,
|
|
12625
|
+
messages: [...state.session.messages, userMessage],
|
|
12626
|
+
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
12627
|
+
};
|
|
12628
|
+
setState((prev) => ({ ...prev, session: sessionWithUserMessage }));
|
|
12629
|
+
setStoreSession(sessionWithUserMessage);
|
|
12655
12630
|
useCliStore.getState().addPendingMessage(pendingAssistantMessage);
|
|
12656
12631
|
const recentMessages = state.session.messages.slice(-20);
|
|
12657
12632
|
const previousMessages = recentMessages.filter((msg) => msg.role === "user" || msg.role === "assistant").map((msg) => ({
|
|
@@ -12698,51 +12673,15 @@ Remember: Use context from previous messages to understand follow-up questions.$
|
|
|
12698
12673
|
setStoreSession(updatedSession);
|
|
12699
12674
|
await state.sessionStore.save(updatedSession);
|
|
12700
12675
|
} catch (error) {
|
|
12701
|
-
|
|
12702
|
-
let displayMessage;
|
|
12676
|
+
useCliStore.getState().clearPendingMessages();
|
|
12703
12677
|
if (error instanceof Error) {
|
|
12704
12678
|
if (error.message.includes("Authentication failed") || error.message.includes("Authentication expired")) {
|
|
12705
|
-
|
|
12706
|
-
|
|
12707
|
-
|
|
12708
|
-
|
|
12709
|
-
${errorMessage}
|
|
12710
|
-
|
|
12711
|
-
\u{1F4A1} This is usually a temporary issue. Please try your request again.`;
|
|
12712
|
-
} else {
|
|
12713
|
-
displayMessage = `\u274C Error
|
|
12714
|
-
|
|
12715
|
-
${errorMessage}`;
|
|
12716
|
-
}
|
|
12717
|
-
} else {
|
|
12718
|
-
displayMessage = `\u274C Error
|
|
12719
|
-
|
|
12720
|
-
${errorMessage}`;
|
|
12721
|
-
}
|
|
12722
|
-
const { pendingMessages } = useCliStore.getState();
|
|
12723
|
-
const pendingMessage = pendingMessages[0];
|
|
12724
|
-
const capturedSteps = pendingMessage?.metadata?.steps || [];
|
|
12725
|
-
const errorAssistantMessage = {
|
|
12726
|
-
id: pendingMessage?.id || uuidv410(),
|
|
12727
|
-
role: "assistant",
|
|
12728
|
-
content: displayMessage,
|
|
12729
|
-
timestamp: pendingMessage?.timestamp || (/* @__PURE__ */ new Date()).toISOString(),
|
|
12730
|
-
metadata: {
|
|
12731
|
-
steps: capturedSteps
|
|
12732
|
-
// Include any steps that were completed before error
|
|
12679
|
+
console.log("\n\u274C Authentication failed");
|
|
12680
|
+
console.log("\u{1F4A1} Run /login to authenticate with your API environment.\n");
|
|
12681
|
+
return;
|
|
12733
12682
|
}
|
|
12734
|
-
};
|
|
12735
|
-
useCliStore.getState().completePendingMessage(0, errorAssistantMessage);
|
|
12736
|
-
const currentSession = useCliStore.getState().session;
|
|
12737
|
-
if (currentSession) {
|
|
12738
|
-
const updatedSession = {
|
|
12739
|
-
...currentSession,
|
|
12740
|
-
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
12741
|
-
};
|
|
12742
|
-
setState((prev) => ({ ...prev, session: updatedSession }));
|
|
12743
|
-
setStoreSession(updatedSession);
|
|
12744
|
-
await state.sessionStore.save(updatedSession);
|
|
12745
12683
|
}
|
|
12684
|
+
console.error("Error processing message:", error);
|
|
12746
12685
|
}
|
|
12747
12686
|
};
|
|
12748
12687
|
const handleBashCommand = useCallback(
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
findMostSimilarMemento,
|
|
4
4
|
getRelevantMementos
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-NBCK5RYI.js";
|
|
6
|
+
import "./chunk-MNS37QTQ.js";
|
|
7
7
|
import "./chunk-AMDXHL6S.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-FQDYYJMI.js";
|
|
9
9
|
import "./chunk-PDX44BCA.js";
|
|
10
10
|
export {
|
|
11
11
|
findMostSimilarMemento,
|
|
@@ -120,7 +120,7 @@ import {
|
|
|
120
120
|
validateMermaidSyntax,
|
|
121
121
|
warmUpSettingsCache,
|
|
122
122
|
withRetry
|
|
123
|
-
} from "./chunk-
|
|
123
|
+
} from "./chunk-MNS37QTQ.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-FQDYYJMI.js";
|
|
133
133
|
import "./chunk-PDX44BCA.js";
|
|
134
134
|
export {
|
|
135
135
|
AWSBackend,
|
|
@@ -229,6 +229,7 @@ import {
|
|
|
229
229
|
canUserDeleteArtifact,
|
|
230
230
|
canUserReadArtifact,
|
|
231
231
|
canUserWriteArtifact,
|
|
232
|
+
containsWikiTable,
|
|
232
233
|
createArtifactId,
|
|
233
234
|
createDefaultPermissions,
|
|
234
235
|
dayjsConfig_default,
|
|
@@ -292,8 +293,9 @@ import {
|
|
|
292
293
|
validateQuest,
|
|
293
294
|
validateQuestMasterArtifactV2,
|
|
294
295
|
validateReactArtifactV2,
|
|
295
|
-
validateSvgArtifactV2
|
|
296
|
-
|
|
296
|
+
validateSvgArtifactV2,
|
|
297
|
+
wikiMarkupToAdf
|
|
298
|
+
} from "./chunk-FQDYYJMI.js";
|
|
297
299
|
import "./chunk-PDX44BCA.js";
|
|
298
300
|
export {
|
|
299
301
|
ALL_IMAGE_MODELS,
|
|
@@ -525,6 +527,7 @@ export {
|
|
|
525
527
|
canUserDeleteArtifact,
|
|
526
528
|
canUserReadArtifact,
|
|
527
529
|
canUserWriteArtifact,
|
|
530
|
+
containsWikiTable,
|
|
528
531
|
createArtifactId,
|
|
529
532
|
createDefaultPermissions,
|
|
530
533
|
dayjsConfig_default as dayjs,
|
|
@@ -588,5 +591,6 @@ export {
|
|
|
588
591
|
validateQuest,
|
|
589
592
|
validateQuestMasterArtifactV2,
|
|
590
593
|
validateReactArtifactV2,
|
|
591
|
-
validateSvgArtifactV2
|
|
594
|
+
validateSvgArtifactV2,
|
|
595
|
+
wikiMarkupToAdf
|
|
592
596
|
};
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
SubtractCreditsSchema,
|
|
4
4
|
subtractCredits
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-LZXUR7SE.js";
|
|
6
|
+
import "./chunk-MNS37QTQ.js";
|
|
7
7
|
import "./chunk-AMDXHL6S.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-FQDYYJMI.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-fix-
|
|
3
|
+
"version": "0.2.11-ja-fix-confluence-table-data-5752.17346+899c98af0",
|
|
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-fix-
|
|
108
|
-
"@bike4mind/mcp": "1.20.5-fix-
|
|
109
|
-
"@bike4mind/services": "2.35.1-fix-
|
|
110
|
-
"@bike4mind/utils": "2.1.5-fix-
|
|
107
|
+
"@bike4mind/common": "2.40.1-ja-fix-confluence-table-data-5752.17346+899c98af0",
|
|
108
|
+
"@bike4mind/mcp": "1.20.5-ja-fix-confluence-table-data-5752.17346+899c98af0",
|
|
109
|
+
"@bike4mind/services": "2.35.1-ja-fix-confluence-table-data-5752.17346+899c98af0",
|
|
110
|
+
"@bike4mind/utils": "2.1.5-ja-fix-confluence-table-data-5752.17346+899c98af0",
|
|
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": "899c98af0bfb597fe554bd11a5b8555eeae79f70"
|
|
124
124
|
}
|