@bike4mind/cli 0.2.4-feat-questmaster-external-integrations.17096 → 0.2.4
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-4IM3MJQF.js → artifactExtractor-GXQ5YZF7.js} +1 -1
- package/dist/{chunk-3BPXGCV5.js → chunk-6AJODFPC.js} +2 -2
- package/dist/chunk-AMDXHL6S.js +0 -0
- package/dist/chunk-BDQBOLYG.js +0 -0
- package/dist/chunk-BPFEGDC7.js +0 -0
- package/dist/{chunk-7OJVF5WR.js → chunk-LEG2UM5Q.js} +2 -2
- package/dist/{chunk-2IW5ZJXR.js → chunk-LYNNVNEC.js} +1 -1
- package/dist/chunk-PDX44BCA.js +0 -0
- package/dist/{chunk-UHTQGQB4.js → chunk-WNBKV4FX.js} +2 -2
- package/dist/{chunk-PVLFZFW3.js → chunk-WR6YZRQV.js} +0 -0
- package/dist/{create-RWWL6EXD.js → create-LOAAI36O.js} +3 -3
- package/dist/formatConverter-I7EIUVDY.js +0 -0
- package/dist/index.js +141 -535
- package/dist/{llmMarkdownGenerator-7UGLXJ5K.js → llmMarkdownGenerator-4ZR3FLEQ.js} +1 -1
- package/dist/{markdownGenerator-CPWWVGPS.js → markdownGenerator-7WE7WKME.js} +1 -1
- package/dist/{mementoService-QMM4Y5VF.js → mementoService-XGFAWC5F.js} +3 -3
- package/dist/notificationDeduplicator-UW7D75QS.js +0 -0
- package/dist/{src-GX3IH4MQ.js → src-32Z2VZMC.js} +2 -2
- package/dist/{src-EUJME44O.js → src-6J6LFPZ6.js} +1 -1
- package/dist/{subtractCredits-V7WHQTMA.js → subtractCredits-VMGWNJS7.js} +3 -3
- package/dist/utils-JPMDGUBL.js +0 -0
- package/package.json +16 -18
|
@@ -7,11 +7,11 @@ import {
|
|
|
7
7
|
getSettingsMap,
|
|
8
8
|
getSettingsValue,
|
|
9
9
|
secureParameters
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-LYNNVNEC.js";
|
|
11
11
|
import {
|
|
12
12
|
KnowledgeType,
|
|
13
13
|
SupportedFabFileMimeTypes
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-WR6YZRQV.js";
|
|
15
15
|
|
|
16
16
|
// ../../b4m-core/packages/services/dist/src/fabFileService/create.js
|
|
17
17
|
import { z } from "zod";
|
package/dist/chunk-AMDXHL6S.js
CHANGED
|
File without changes
|
package/dist/chunk-BDQBOLYG.js
CHANGED
|
File without changes
|
package/dist/chunk-BPFEGDC7.js
CHANGED
|
File without changes
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
BadRequestError,
|
|
4
4
|
secureParameters
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-LYNNVNEC.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-WR6YZRQV.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-WR6YZRQV.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";
|
package/dist/chunk-PDX44BCA.js
CHANGED
|
File without changes
|
|
@@ -6,12 +6,12 @@ import {
|
|
|
6
6
|
getSettingsByNames,
|
|
7
7
|
obfuscateApiKey,
|
|
8
8
|
secureParameters
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-LYNNVNEC.js";
|
|
10
10
|
import {
|
|
11
11
|
ApiKeyType,
|
|
12
12
|
MementoTier,
|
|
13
13
|
isSupportedEmbeddingModel
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-WR6YZRQV.js";
|
|
15
15
|
|
|
16
16
|
// ../../b4m-core/packages/services/dist/src/apiKeyService/get.js
|
|
17
17
|
import { z } from "zod";
|
|
File without changes
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
createFabFile,
|
|
4
4
|
createFabFileSchema
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-6AJODFPC.js";
|
|
6
|
+
import "./chunk-LYNNVNEC.js";
|
|
7
7
|
import "./chunk-AMDXHL6S.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-WR6YZRQV.js";
|
|
9
9
|
import "./chunk-PDX44BCA.js";
|
|
10
10
|
export {
|
|
11
11
|
createFabFile,
|
|
File without changes
|
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-WNBKV4FX.js";
|
|
8
|
+
import "./chunk-LEG2UM5Q.js";
|
|
9
|
+
import "./chunk-6AJODFPC.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-LYNNVNEC.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-WR6YZRQV.js";
|
|
77
77
|
import {
|
|
78
78
|
__require
|
|
79
79
|
} from "./chunk-PDX44BCA.js";
|
|
@@ -90,10 +90,8 @@ import { Box as Box9, Text as Text8, Static } from "ink";
|
|
|
90
90
|
// src/components/StatusBar.tsx
|
|
91
91
|
import React from "react";
|
|
92
92
|
import { Box, Text } from "ink";
|
|
93
|
-
var StatusBar = React.memo(function StatusBar2({ sessionName, model, tokenUsage
|
|
94
|
-
|
|
95
|
-
const syncIndicator = quest?.syncStatus === "offline" ? " \u26A0\uFE0F" : quest?.syncStatus === "pending" ? " \u23F3" : "";
|
|
96
|
-
return /* @__PURE__ */ React.createElement(Box, { borderStyle: "single", borderColor: "green", paddingX: 1 }, /* @__PURE__ */ React.createElement(Box, { flexDirection: "row", justifyContent: "space-between", width: "100%" }, /* @__PURE__ */ React.createElement(Box, { gap: 2 }, /* @__PURE__ */ React.createElement(Text, { color: "green", bold: true }, "\u{1F4DD} Session:"), /* @__PURE__ */ React.createElement(Text, null, sessionName)), /* @__PURE__ */ React.createElement(Box, { gap: 2 }, /* @__PURE__ */ React.createElement(Text, { color: "blue", bold: true }, "\u{1F916} Model:"), /* @__PURE__ */ React.createElement(Text, null, model)), /* @__PURE__ */ React.createElement(Box, { gap: 2 }, /* @__PURE__ */ React.createElement(Text, { color: "yellow", bold: true }, "\u{1F4CA} Tokens:"), /* @__PURE__ */ React.createElement(Text, null, tokenUsage.toLocaleString())), questDisplay && /* @__PURE__ */ React.createElement(Box, { gap: 2 }, /* @__PURE__ */ React.createElement(Text, { color: "magenta", bold: true }, "\u{1F3AF} Quest:"), /* @__PURE__ */ React.createElement(Text, null, questDisplay, syncIndicator))));
|
|
93
|
+
var StatusBar = React.memo(function StatusBar2({ sessionName, model, tokenUsage }) {
|
|
94
|
+
return /* @__PURE__ */ React.createElement(Box, { borderStyle: "single", borderColor: "green", paddingX: 1 }, /* @__PURE__ */ React.createElement(Box, { flexDirection: "row", justifyContent: "space-between", width: "100%" }, /* @__PURE__ */ React.createElement(Box, { gap: 2 }, /* @__PURE__ */ React.createElement(Text, { color: "green", bold: true }, "\u{1F4DD} Session:"), /* @__PURE__ */ React.createElement(Text, null, sessionName)), /* @__PURE__ */ React.createElement(Box, { gap: 2 }, /* @__PURE__ */ React.createElement(Text, { color: "blue", bold: true }, "\u{1F916} Model:"), /* @__PURE__ */ React.createElement(Text, null, model)), /* @__PURE__ */ React.createElement(Box, { gap: 2 }, /* @__PURE__ */ React.createElement(Text, { color: "yellow", bold: true }, "\u{1F4CA} Tokens:"), /* @__PURE__ */ React.createElement(Text, null, tokenUsage.toLocaleString()))));
|
|
97
95
|
});
|
|
98
96
|
|
|
99
97
|
// src/components/InputPrompt.tsx
|
|
@@ -391,25 +389,6 @@ var COMMANDS = [
|
|
|
391
389
|
name: "clear",
|
|
392
390
|
description: "Start a new session",
|
|
393
391
|
aliases: ["new"]
|
|
394
|
-
},
|
|
395
|
-
{
|
|
396
|
-
name: "quest",
|
|
397
|
-
description: "Load a quest into current session",
|
|
398
|
-
args: "<quest-id>",
|
|
399
|
-
aliases: ["q"]
|
|
400
|
-
},
|
|
401
|
-
{
|
|
402
|
-
name: "quest-status",
|
|
403
|
-
description: "Show current quest progress",
|
|
404
|
-
aliases: ["qs"]
|
|
405
|
-
},
|
|
406
|
-
{
|
|
407
|
-
name: "quest-unlink",
|
|
408
|
-
description: "Unlink quest from current session"
|
|
409
|
-
},
|
|
410
|
-
{
|
|
411
|
-
name: "plan",
|
|
412
|
-
description: "Create a QuestMaster plan from current context"
|
|
413
392
|
}
|
|
414
393
|
];
|
|
415
394
|
|
|
@@ -1019,7 +998,6 @@ function App({
|
|
|
1019
998
|
const sessionName = useCliStore((state) => state.session?.name || "New Session");
|
|
1020
999
|
const currentModel = useCliStore((state) => state.session?.model || "claude-sonnet-4-5-20250929");
|
|
1021
1000
|
const totalTokens = useCliStore((state) => state.session?.metadata.totalTokens || 0);
|
|
1022
|
-
const quest = useCliStore((state) => state.session?.quest);
|
|
1023
1001
|
const isThinking = useCliStore((state) => state.isThinking);
|
|
1024
1002
|
const permissionPrompt = useCliStore((state) => state.permissionPrompt);
|
|
1025
1003
|
const showConfigEditor = useCliStore((state) => state.showConfigEditor);
|
|
@@ -1055,7 +1033,7 @@ ${errorBlock}`;
|
|
|
1055
1033
|
},
|
|
1056
1034
|
[onMessage, onCommand, setIsThinking]
|
|
1057
1035
|
);
|
|
1058
|
-
return /* @__PURE__ */ React9.createElement(Box9, { flexDirection: "column" }, /* @__PURE__ */ React9.createElement(StatusBar, { sessionName, model: currentModel, tokenUsage: totalTokens
|
|
1036
|
+
return /* @__PURE__ */ React9.createElement(Box9, { flexDirection: "column" }, /* @__PURE__ */ React9.createElement(StatusBar, { sessionName, model: currentModel, tokenUsage: totalTokens }), showConfigEditor && config && onSaveConfig ? /* @__PURE__ */ React9.createElement(Box9, { flexDirection: "column", paddingX: 1 }, /* @__PURE__ */ React9.createElement(ConfigEditor, { config, onSave: onSaveConfig, onClose: () => setShowConfigEditor(false) })) : permissionPrompt ? /* @__PURE__ */ React9.createElement(Box9, { flexDirection: "column", paddingX: 1 }, /* @__PURE__ */ React9.createElement(
|
|
1059
1037
|
PermissionPrompt,
|
|
1060
1038
|
{
|
|
1061
1039
|
toolName: permissionPrompt.toolName,
|
|
@@ -4116,16 +4094,6 @@ var updateQuestStatusSchema = z134.object({
|
|
|
4116
4094
|
completionNote: z134.string().max(500).optional()
|
|
4117
4095
|
});
|
|
4118
4096
|
|
|
4119
|
-
// ../../b4m-core/packages/services/dist/src/questMasterService/syncToGitHub.js
|
|
4120
|
-
import { z as z135 } from "zod";
|
|
4121
|
-
var syncToGitHubSchema = z135.object({
|
|
4122
|
-
repository: z135.string().regex(/^[^/]+\/[^/]+$/, "Repository must be in owner/repo format"),
|
|
4123
|
-
questId: z135.string().optional(),
|
|
4124
|
-
// Optional: sync specific quest, otherwise sync entire plan
|
|
4125
|
-
labels: z135.array(z135.string()).optional(),
|
|
4126
|
-
assignees: z135.array(z135.string()).optional()
|
|
4127
|
-
});
|
|
4128
|
-
|
|
4129
4097
|
// ../../b4m-core/packages/services/dist/src/dataLakeService/opensearchClient.js
|
|
4130
4098
|
import { Client } from "@opensearch-project/opensearch";
|
|
4131
4099
|
import { defaultProvider } from "@aws-sdk/credential-provider-node";
|
|
@@ -4143,63 +4111,63 @@ import { v4 as uuidv44 } from "uuid";
|
|
|
4143
4111
|
import { randomUUID as randomUUID5 } from "crypto";
|
|
4144
4112
|
|
|
4145
4113
|
// ../../b4m-core/packages/services/dist/src/emailIngestionService/types.js
|
|
4146
|
-
import { z as
|
|
4147
|
-
var processIngestedEmailOptionsSchema =
|
|
4148
|
-
platformDomain:
|
|
4149
|
-
isNewsletter:
|
|
4114
|
+
import { z as z135 } from "zod";
|
|
4115
|
+
var processIngestedEmailOptionsSchema = z135.object({
|
|
4116
|
+
platformDomain: z135.string().optional(),
|
|
4117
|
+
isNewsletter: z135.boolean().optional()
|
|
4150
4118
|
}).optional();
|
|
4151
|
-
var emailAttachmentSchema =
|
|
4152
|
-
filename:
|
|
4153
|
-
contentType:
|
|
4154
|
-
contentDisposition:
|
|
4155
|
-
size:
|
|
4156
|
-
content:
|
|
4157
|
-
related:
|
|
4158
|
-
});
|
|
4159
|
-
var parsedEmailObjectSchema =
|
|
4160
|
-
messageId:
|
|
4161
|
-
inReplyTo:
|
|
4162
|
-
references:
|
|
4163
|
-
from:
|
|
4119
|
+
var emailAttachmentSchema = z135.object({
|
|
4120
|
+
filename: z135.string().optional(),
|
|
4121
|
+
contentType: z135.string().optional(),
|
|
4122
|
+
contentDisposition: z135.string().optional(),
|
|
4123
|
+
size: z135.number().min(0),
|
|
4124
|
+
content: z135.instanceof(Buffer),
|
|
4125
|
+
related: z135.boolean().optional()
|
|
4126
|
+
});
|
|
4127
|
+
var parsedEmailObjectSchema = z135.object({
|
|
4128
|
+
messageId: z135.string().optional(),
|
|
4129
|
+
inReplyTo: z135.string().optional(),
|
|
4130
|
+
references: z135.union([z135.string(), z135.array(z135.string())]).optional(),
|
|
4131
|
+
from: z135.any().optional(),
|
|
4164
4132
|
// Complex email address object
|
|
4165
|
-
to:
|
|
4166
|
-
cc:
|
|
4167
|
-
bcc:
|
|
4168
|
-
subject:
|
|
4169
|
-
date:
|
|
4170
|
-
text:
|
|
4171
|
-
html:
|
|
4172
|
-
attachments:
|
|
4173
|
-
});
|
|
4174
|
-
var processIngestedEmailSchema =
|
|
4133
|
+
to: z135.any().optional(),
|
|
4134
|
+
cc: z135.any().optional(),
|
|
4135
|
+
bcc: z135.any().optional(),
|
|
4136
|
+
subject: z135.string().optional(),
|
|
4137
|
+
date: z135.date().optional(),
|
|
4138
|
+
text: z135.string().optional(),
|
|
4139
|
+
html: z135.string().optional(),
|
|
4140
|
+
attachments: z135.array(emailAttachmentSchema).optional()
|
|
4141
|
+
});
|
|
4142
|
+
var processIngestedEmailSchema = z135.object({
|
|
4175
4143
|
parsedEmail: parsedEmailObjectSchema,
|
|
4176
|
-
rawEmailS3Key:
|
|
4144
|
+
rawEmailS3Key: z135.string().min(1, "rawEmailS3Key cannot be empty"),
|
|
4177
4145
|
options: processIngestedEmailOptionsSchema
|
|
4178
4146
|
});
|
|
4179
4147
|
|
|
4180
4148
|
// ../../b4m-core/packages/services/dist/src/emailAnalysisService/types.js
|
|
4181
|
-
import { z as
|
|
4182
|
-
var llmAnalysisResponseSchema =
|
|
4183
|
-
summary:
|
|
4184
|
-
entities:
|
|
4185
|
-
companies:
|
|
4186
|
-
people:
|
|
4187
|
-
products:
|
|
4188
|
-
technologies:
|
|
4149
|
+
import { z as z136 } from "zod";
|
|
4150
|
+
var llmAnalysisResponseSchema = z136.object({
|
|
4151
|
+
summary: z136.string().min(1, "Summary cannot be empty"),
|
|
4152
|
+
entities: z136.object({
|
|
4153
|
+
companies: z136.array(z136.string()).default([]),
|
|
4154
|
+
people: z136.array(z136.string()).default([]),
|
|
4155
|
+
products: z136.array(z136.string()).default([]),
|
|
4156
|
+
technologies: z136.array(z136.string()).default([])
|
|
4189
4157
|
}),
|
|
4190
|
-
sentiment:
|
|
4191
|
-
actionItems:
|
|
4192
|
-
description:
|
|
4193
|
-
deadline:
|
|
4158
|
+
sentiment: z136.enum(["positive", "neutral", "negative", "urgent"]),
|
|
4159
|
+
actionItems: z136.array(z136.object({
|
|
4160
|
+
description: z136.string(),
|
|
4161
|
+
deadline: z136.string().optional()
|
|
4194
4162
|
// ISO date string from LLM
|
|
4195
4163
|
})).default([]),
|
|
4196
|
-
privacyRecommendation:
|
|
4197
|
-
embargoDetected:
|
|
4198
|
-
suggestedTags:
|
|
4164
|
+
privacyRecommendation: z136.enum(["public", "team", "private"]),
|
|
4165
|
+
embargoDetected: z136.boolean().default(false),
|
|
4166
|
+
suggestedTags: z136.array(z136.string()).default([])
|
|
4199
4167
|
});
|
|
4200
4168
|
|
|
4201
4169
|
// ../../b4m-core/packages/services/dist/src/llm/ChatCompletion.js
|
|
4202
|
-
import { z as
|
|
4170
|
+
import { z as z138 } from "zod";
|
|
4203
4171
|
|
|
4204
4172
|
// ../../b4m-core/packages/services/dist/src/llm/ChatCompletionInvoke.js
|
|
4205
4173
|
import { fromZodError } from "zod-validation-error";
|
|
@@ -5259,17 +5227,17 @@ var rechartsTool = {
|
|
|
5259
5227
|
};
|
|
5260
5228
|
|
|
5261
5229
|
// ../../b4m-core/packages/services/dist/src/llm/tools/implementation/editFile/index.js
|
|
5262
|
-
import { z as
|
|
5230
|
+
import { z as z137 } from "zod";
|
|
5263
5231
|
import { diffLines as diffLines2 } from "diff";
|
|
5264
|
-
var editFileSchema =
|
|
5265
|
-
fileId:
|
|
5266
|
-
instruction:
|
|
5267
|
-
selection:
|
|
5268
|
-
start:
|
|
5269
|
-
end:
|
|
5232
|
+
var editFileSchema = z137.object({
|
|
5233
|
+
fileId: z137.string().describe("The ID of the file to edit"),
|
|
5234
|
+
instruction: z137.string().describe("Natural language instruction describing the changes to make"),
|
|
5235
|
+
selection: z137.object({
|
|
5236
|
+
start: z137.number().describe("Starting character position of the selection"),
|
|
5237
|
+
end: z137.number().describe("Ending character position of the selection")
|
|
5270
5238
|
}).optional().describe("Optional selection range to edit within the file"),
|
|
5271
|
-
preserveFormatting:
|
|
5272
|
-
returnDiff:
|
|
5239
|
+
preserveFormatting: z137.boolean().optional().default(true).describe("Whether to preserve the original formatting style"),
|
|
5240
|
+
returnDiff: z137.boolean().optional().default(true).describe("Whether to return a diff of the changes")
|
|
5273
5241
|
});
|
|
5274
5242
|
function generateSimpleDiff(original, modified) {
|
|
5275
5243
|
const differences = diffLines2(original, modified);
|
|
@@ -7028,8 +6996,8 @@ var getHeliocentricCoords = (planet, T) => {
|
|
|
7028
6996
|
const sinNode = Math.sin(longNode);
|
|
7029
6997
|
const x = r * (cosNode * cosOmega - sinNode * sinOmega * cosI);
|
|
7030
6998
|
const y = r * (sinNode * cosOmega + cosNode * sinOmega * cosI);
|
|
7031
|
-
const
|
|
7032
|
-
return { x, y, z:
|
|
6999
|
+
const z144 = r * sinOmega * sinI;
|
|
7000
|
+
return { x, y, z: z144, r };
|
|
7033
7001
|
};
|
|
7034
7002
|
var getGeocentricEcliptic = (planet, earth) => {
|
|
7035
7003
|
const dx = planet.x - earth.x;
|
|
@@ -8054,42 +8022,42 @@ var DISABLE_SERVER_THROTTLING = process.env.DISABLE_SERVER_THROTTLING === "true"
|
|
|
8054
8022
|
var questSaveMutex = new Mutex();
|
|
8055
8023
|
|
|
8056
8024
|
// ../../b4m-core/packages/services/dist/src/llm/ChatCompletion.js
|
|
8057
|
-
var QuestStartBodySchema =
|
|
8058
|
-
userId:
|
|
8059
|
-
sessionId:
|
|
8060
|
-
questId:
|
|
8061
|
-
message:
|
|
8062
|
-
messageFileIds:
|
|
8063
|
-
historyCount:
|
|
8064
|
-
fabFileIds:
|
|
8025
|
+
var QuestStartBodySchema = z138.object({
|
|
8026
|
+
userId: z138.string(),
|
|
8027
|
+
sessionId: z138.string(),
|
|
8028
|
+
questId: z138.string(),
|
|
8029
|
+
message: z138.string(),
|
|
8030
|
+
messageFileIds: z138.array(z138.string()),
|
|
8031
|
+
historyCount: z138.number(),
|
|
8032
|
+
fabFileIds: z138.array(z138.string()),
|
|
8065
8033
|
params: ChatCompletionCreateInputSchema,
|
|
8066
8034
|
dashboardParams: DashboardParamsSchema.optional(),
|
|
8067
|
-
enableQuestMaster:
|
|
8068
|
-
enableMementos:
|
|
8069
|
-
enableArtifacts:
|
|
8070
|
-
enableAgents:
|
|
8035
|
+
enableQuestMaster: z138.boolean().optional(),
|
|
8036
|
+
enableMementos: z138.boolean().optional(),
|
|
8037
|
+
enableArtifacts: z138.boolean().optional(),
|
|
8038
|
+
enableAgents: z138.boolean().optional(),
|
|
8071
8039
|
promptMeta: PromptMetaZodSchema,
|
|
8072
|
-
tools:
|
|
8073
|
-
mcpServers:
|
|
8074
|
-
projectId:
|
|
8075
|
-
organizationId:
|
|
8040
|
+
tools: z138.array(z138.union([b4mLLMTools, z138.string()])).optional(),
|
|
8041
|
+
mcpServers: z138.array(z138.string()).optional(),
|
|
8042
|
+
projectId: z138.string().optional(),
|
|
8043
|
+
organizationId: z138.string().nullable().optional(),
|
|
8076
8044
|
questMaster: QuestMasterParamsSchema.optional(),
|
|
8077
|
-
toolPromptId:
|
|
8045
|
+
toolPromptId: z138.string().optional(),
|
|
8078
8046
|
researchMode: ResearchModeParamsSchema.optional(),
|
|
8079
|
-
fallbackModel:
|
|
8080
|
-
embeddingModel:
|
|
8081
|
-
queryComplexity:
|
|
8047
|
+
fallbackModel: z138.string().optional(),
|
|
8048
|
+
embeddingModel: z138.string().optional(),
|
|
8049
|
+
queryComplexity: z138.string(),
|
|
8082
8050
|
imageConfig: GenerateImageToolCallSchema.optional(),
|
|
8083
|
-
deepResearchConfig:
|
|
8084
|
-
maxDepth:
|
|
8085
|
-
duration:
|
|
8051
|
+
deepResearchConfig: z138.object({
|
|
8052
|
+
maxDepth: z138.number().optional(),
|
|
8053
|
+
duration: z138.number().optional(),
|
|
8086
8054
|
// Note: searchers are passed via ToolContext and not through this API schema
|
|
8087
|
-
searchers:
|
|
8055
|
+
searchers: z138.array(z138.any()).optional()
|
|
8088
8056
|
}).optional(),
|
|
8089
|
-
extraContextMessages:
|
|
8090
|
-
role:
|
|
8091
|
-
content:
|
|
8092
|
-
fabFileIds:
|
|
8057
|
+
extraContextMessages: z138.array(z138.object({
|
|
8058
|
+
role: z138.enum(["user", "assistant", "system", "function", "tool"]),
|
|
8059
|
+
content: z138.union([z138.string(), z138.array(z138.any())]),
|
|
8060
|
+
fabFileIds: z138.array(z138.string()).optional()
|
|
8093
8061
|
})).optional()
|
|
8094
8062
|
});
|
|
8095
8063
|
|
|
@@ -8097,9 +8065,30 @@ var QuestStartBodySchema = z139.object({
|
|
|
8097
8065
|
import axios8 from "axios";
|
|
8098
8066
|
import { fileTypeFromBuffer as fileTypeFromBuffer4 } from "file-type";
|
|
8099
8067
|
import { v4 as uuidv47 } from "uuid";
|
|
8100
|
-
import { z as
|
|
8068
|
+
import { z as z139 } from "zod";
|
|
8101
8069
|
import { fromZodError as fromZodError2 } from "zod-validation-error";
|
|
8102
8070
|
var ImageGenerationBodySchema = OpenAIImageGenerationInput.extend({
|
|
8071
|
+
sessionId: z139.string(),
|
|
8072
|
+
questId: z139.string(),
|
|
8073
|
+
userId: z139.string(),
|
|
8074
|
+
prompt: z139.string(),
|
|
8075
|
+
safety_tolerance: z139.number().min(BFL_SAFETY_TOLERANCE.MIN).max(BFL_SAFETY_TOLERANCE.MAX).optional().default(BFL_SAFETY_TOLERANCE.DEFAULT),
|
|
8076
|
+
prompt_upsampling: z139.boolean().optional().default(false),
|
|
8077
|
+
seed: z139.number().nullable().optional(),
|
|
8078
|
+
output_format: z139.enum(["jpeg", "png"]).nullable().optional().default("png"),
|
|
8079
|
+
width: z139.number().optional(),
|
|
8080
|
+
height: z139.number().optional(),
|
|
8081
|
+
aspect_ratio: z139.string().optional(),
|
|
8082
|
+
fabFileIds: z139.array(z139.string()).optional()
|
|
8083
|
+
});
|
|
8084
|
+
|
|
8085
|
+
// ../../b4m-core/packages/services/dist/src/llm/ImageEdit.js
|
|
8086
|
+
import axios9 from "axios";
|
|
8087
|
+
import { fileTypeFromBuffer as fileTypeFromBuffer5 } from "file-type";
|
|
8088
|
+
import { v4 as uuidv48 } from "uuid";
|
|
8089
|
+
import { z as z140 } from "zod";
|
|
8090
|
+
import { fromZodError as fromZodError3 } from "zod-validation-error";
|
|
8091
|
+
var ImageEditBodySchema = OpenAIImageGenerationInput.extend({
|
|
8103
8092
|
sessionId: z140.string(),
|
|
8104
8093
|
questId: z140.string(),
|
|
8105
8094
|
userId: z140.string(),
|
|
@@ -8107,56 +8096,35 @@ var ImageGenerationBodySchema = OpenAIImageGenerationInput.extend({
|
|
|
8107
8096
|
safety_tolerance: z140.number().min(BFL_SAFETY_TOLERANCE.MIN).max(BFL_SAFETY_TOLERANCE.MAX).optional().default(BFL_SAFETY_TOLERANCE.DEFAULT),
|
|
8108
8097
|
prompt_upsampling: z140.boolean().optional().default(false),
|
|
8109
8098
|
seed: z140.number().nullable().optional(),
|
|
8110
|
-
output_format: z140.enum(["jpeg", "png"]).
|
|
8099
|
+
output_format: z140.enum(["jpeg", "png"]).optional().default("png"),
|
|
8111
8100
|
width: z140.number().optional(),
|
|
8112
8101
|
height: z140.number().optional(),
|
|
8113
8102
|
aspect_ratio: z140.string().optional(),
|
|
8114
|
-
|
|
8115
|
-
|
|
8116
|
-
|
|
8117
|
-
// ../../b4m-core/packages/services/dist/src/llm/ImageEdit.js
|
|
8118
|
-
import axios9 from "axios";
|
|
8119
|
-
import { fileTypeFromBuffer as fileTypeFromBuffer5 } from "file-type";
|
|
8120
|
-
import { v4 as uuidv48 } from "uuid";
|
|
8121
|
-
import { z as z141 } from "zod";
|
|
8122
|
-
import { fromZodError as fromZodError3 } from "zod-validation-error";
|
|
8123
|
-
var ImageEditBodySchema = OpenAIImageGenerationInput.extend({
|
|
8124
|
-
sessionId: z141.string(),
|
|
8125
|
-
questId: z141.string(),
|
|
8126
|
-
userId: z141.string(),
|
|
8127
|
-
prompt: z141.string(),
|
|
8128
|
-
safety_tolerance: z141.number().min(BFL_SAFETY_TOLERANCE.MIN).max(BFL_SAFETY_TOLERANCE.MAX).optional().default(BFL_SAFETY_TOLERANCE.DEFAULT),
|
|
8129
|
-
prompt_upsampling: z141.boolean().optional().default(false),
|
|
8130
|
-
seed: z141.number().nullable().optional(),
|
|
8131
|
-
output_format: z141.enum(["jpeg", "png"]).optional().default("png"),
|
|
8132
|
-
width: z141.number().optional(),
|
|
8133
|
-
height: z141.number().optional(),
|
|
8134
|
-
aspect_ratio: z141.string().optional(),
|
|
8135
|
-
size: z141.string().optional(),
|
|
8136
|
-
fabFileIds: z141.array(z141.string()).optional(),
|
|
8137
|
-
image: z141.string()
|
|
8103
|
+
size: z140.string().optional(),
|
|
8104
|
+
fabFileIds: z140.array(z140.string()).optional(),
|
|
8105
|
+
image: z140.string()
|
|
8138
8106
|
});
|
|
8139
8107
|
|
|
8140
8108
|
// ../../b4m-core/packages/services/dist/src/llm/refineText.js
|
|
8141
|
-
import { z as
|
|
8142
|
-
var refineTextLLMSchema =
|
|
8143
|
-
text:
|
|
8144
|
-
context:
|
|
8109
|
+
import { z as z141 } from "zod";
|
|
8110
|
+
var refineTextLLMSchema = z141.object({
|
|
8111
|
+
text: z141.string(),
|
|
8112
|
+
context: z141.string().optional()
|
|
8145
8113
|
// tone: z.enum(['formal', 'informal', 'neutral']).optional(),
|
|
8146
8114
|
// style: z.enum(['technical', 'creative', 'academic', 'business', 'narrative']).optional(),
|
|
8147
8115
|
});
|
|
8148
8116
|
|
|
8149
8117
|
// ../../b4m-core/packages/services/dist/src/llm/MementoEvaluationService.js
|
|
8150
|
-
import { z as
|
|
8151
|
-
var SingleMementoEvalSchema =
|
|
8152
|
-
importance:
|
|
8118
|
+
import { z as z142 } from "zod";
|
|
8119
|
+
var SingleMementoEvalSchema = z142.object({
|
|
8120
|
+
importance: z142.number().min(1).max(10),
|
|
8153
8121
|
// 1-10 scale for personal info importance
|
|
8154
|
-
summary:
|
|
8155
|
-
tags:
|
|
8122
|
+
summary: z142.string(),
|
|
8123
|
+
tags: z142.array(z142.string()).optional()
|
|
8156
8124
|
});
|
|
8157
|
-
var MementoEvalResponseSchema =
|
|
8158
|
-
isPersonal:
|
|
8159
|
-
mementos:
|
|
8125
|
+
var MementoEvalResponseSchema = z142.object({
|
|
8126
|
+
isPersonal: z142.boolean(),
|
|
8127
|
+
mementos: z142.array(SingleMementoEvalSchema).optional()
|
|
8160
8128
|
// Array of distinct personal information
|
|
8161
8129
|
});
|
|
8162
8130
|
|
|
@@ -8393,8 +8361,8 @@ function generateCliTools(userId, llm, model, permissionManager, showPermissionP
|
|
|
8393
8361
|
}
|
|
8394
8362
|
|
|
8395
8363
|
// src/config/toolSafety.ts
|
|
8396
|
-
import { z as
|
|
8397
|
-
var ToolCategorySchema =
|
|
8364
|
+
import { z as z143 } from "zod";
|
|
8365
|
+
var ToolCategorySchema = z143.enum([
|
|
8398
8366
|
"auto_approve",
|
|
8399
8367
|
// Safe tools that run automatically without permission
|
|
8400
8368
|
"prompt_always",
|
|
@@ -8402,9 +8370,9 @@ var ToolCategorySchema = z144.enum([
|
|
|
8402
8370
|
"prompt_default"
|
|
8403
8371
|
// Tools that prompt by default but can be trusted
|
|
8404
8372
|
]);
|
|
8405
|
-
var ToolSafetyConfigSchema =
|
|
8406
|
-
categories:
|
|
8407
|
-
trustedTools:
|
|
8373
|
+
var ToolSafetyConfigSchema = z143.object({
|
|
8374
|
+
categories: z143.record(z143.string(), ToolCategorySchema),
|
|
8375
|
+
trustedTools: z143.array(z143.string())
|
|
8408
8376
|
});
|
|
8409
8377
|
var DEFAULT_TOOL_CATEGORIES = {
|
|
8410
8378
|
// ===== AUTO APPROVE (Safe tools) =====
|
|
@@ -9048,197 +9016,6 @@ var McpManager = class {
|
|
|
9048
9016
|
}
|
|
9049
9017
|
};
|
|
9050
9018
|
|
|
9051
|
-
// src/utils/QuestTracker.ts
|
|
9052
|
-
var QuestTracker = class {
|
|
9053
|
-
constructor(apiClient) {
|
|
9054
|
-
this.apiClient = apiClient;
|
|
9055
|
-
this.pendingUpdates = [];
|
|
9056
|
-
this.cachedQuests = /* @__PURE__ */ new Map();
|
|
9057
|
-
}
|
|
9058
|
-
/**
|
|
9059
|
-
* Fetch a quest plan from the API
|
|
9060
|
-
*/
|
|
9061
|
-
async fetchQuestPlan(questPlanId) {
|
|
9062
|
-
try {
|
|
9063
|
-
const response = await this.apiClient.get(
|
|
9064
|
-
`/api/quest-plans/${questPlanId}`
|
|
9065
|
-
);
|
|
9066
|
-
if (response.success && response.questPlan) {
|
|
9067
|
-
this.cachedQuests.set(questPlanId, response.questPlan);
|
|
9068
|
-
return response.questPlan;
|
|
9069
|
-
}
|
|
9070
|
-
return null;
|
|
9071
|
-
} catch (error) {
|
|
9072
|
-
const cached = this.cachedQuests.get(questPlanId);
|
|
9073
|
-
if (cached) {
|
|
9074
|
-
console.log("\u26A0\uFE0F Using cached quest data (offline mode)");
|
|
9075
|
-
return cached;
|
|
9076
|
-
}
|
|
9077
|
-
throw error;
|
|
9078
|
-
}
|
|
9079
|
-
}
|
|
9080
|
-
/**
|
|
9081
|
-
* Create a SessionQuestLink from quest plan data
|
|
9082
|
-
*/
|
|
9083
|
-
createQuestLink(questPlan, questId) {
|
|
9084
|
-
const quest = questId ? questPlan.quests.find((q) => q.id === questId) : null;
|
|
9085
|
-
let total = 0;
|
|
9086
|
-
let completed = 0;
|
|
9087
|
-
if (quest) {
|
|
9088
|
-
total = quest.subQuests.length || 1;
|
|
9089
|
-
completed = quest.subQuests.filter((sq) => sq.status === "completed").length;
|
|
9090
|
-
if (quest.subQuests.length === 0 && quest.status === "completed") {
|
|
9091
|
-
completed = 1;
|
|
9092
|
-
}
|
|
9093
|
-
} else {
|
|
9094
|
-
total = questPlan.quests.length;
|
|
9095
|
-
completed = questPlan.quests.filter((q) => q.status === "completed").length;
|
|
9096
|
-
}
|
|
9097
|
-
return {
|
|
9098
|
-
questPlanId: questPlan.id,
|
|
9099
|
-
questPlanName: questPlan.goal.length > 40 ? questPlan.goal.substring(0, 37) + "..." : questPlan.goal,
|
|
9100
|
-
questId,
|
|
9101
|
-
questTitle: quest?.title,
|
|
9102
|
-
linkedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
9103
|
-
progress: { total, completed },
|
|
9104
|
-
syncStatus: "synced",
|
|
9105
|
-
lastSyncedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
9106
|
-
};
|
|
9107
|
-
}
|
|
9108
|
-
/**
|
|
9109
|
-
* Update quest status (queues for sync if offline)
|
|
9110
|
-
*/
|
|
9111
|
-
async updateQuestStatus(questPlanId, status, questId, subQuestId) {
|
|
9112
|
-
const update3 = {
|
|
9113
|
-
questPlanId,
|
|
9114
|
-
questId,
|
|
9115
|
-
subQuestId,
|
|
9116
|
-
newStatus: status,
|
|
9117
|
-
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
9118
|
-
};
|
|
9119
|
-
try {
|
|
9120
|
-
await this.syncUpdate(update3);
|
|
9121
|
-
return true;
|
|
9122
|
-
} catch (error) {
|
|
9123
|
-
this.pendingUpdates.push(update3);
|
|
9124
|
-
console.log("\u26A0\uFE0F Update queued for sync when online");
|
|
9125
|
-
return false;
|
|
9126
|
-
}
|
|
9127
|
-
}
|
|
9128
|
-
/**
|
|
9129
|
-
* Sync a single update to the server
|
|
9130
|
-
*/
|
|
9131
|
-
async syncUpdate(update3) {
|
|
9132
|
-
const endpoint = update3.subQuestId ? `/api/quest-plans/${update3.questPlanId}/quests/${update3.questId}/sub-quests/${update3.subQuestId}/status` : update3.questId ? `/api/quest-plans/${update3.questPlanId}/quests/${update3.questId}/status` : `/api/quest-plans/${update3.questPlanId}/status`;
|
|
9133
|
-
await this.apiClient.put(endpoint, { status: update3.newStatus });
|
|
9134
|
-
}
|
|
9135
|
-
/**
|
|
9136
|
-
* Sync all pending updates
|
|
9137
|
-
*/
|
|
9138
|
-
async syncPendingUpdates() {
|
|
9139
|
-
let synced = 0;
|
|
9140
|
-
let failed = 0;
|
|
9141
|
-
const remaining = [];
|
|
9142
|
-
for (const update3 of this.pendingUpdates) {
|
|
9143
|
-
try {
|
|
9144
|
-
await this.syncUpdate(update3);
|
|
9145
|
-
synced++;
|
|
9146
|
-
} catch {
|
|
9147
|
-
remaining.push(update3);
|
|
9148
|
-
failed++;
|
|
9149
|
-
}
|
|
9150
|
-
}
|
|
9151
|
-
this.pendingUpdates = remaining;
|
|
9152
|
-
return { synced, failed };
|
|
9153
|
-
}
|
|
9154
|
-
/**
|
|
9155
|
-
* Get pending update count
|
|
9156
|
-
*/
|
|
9157
|
-
getPendingCount() {
|
|
9158
|
-
return this.pendingUpdates.length;
|
|
9159
|
-
}
|
|
9160
|
-
/**
|
|
9161
|
-
* Check if there are pending updates
|
|
9162
|
-
*/
|
|
9163
|
-
hasPendingUpdates() {
|
|
9164
|
-
return this.pendingUpdates.length > 0;
|
|
9165
|
-
}
|
|
9166
|
-
/**
|
|
9167
|
-
* Update progress in a SessionQuestLink
|
|
9168
|
-
*/
|
|
9169
|
-
updateProgress(link, questPlan) {
|
|
9170
|
-
const quest = link.questId ? questPlan.quests.find((q) => q.id === link.questId) : null;
|
|
9171
|
-
let total = 0;
|
|
9172
|
-
let completed = 0;
|
|
9173
|
-
if (quest) {
|
|
9174
|
-
total = quest.subQuests.length || 1;
|
|
9175
|
-
completed = quest.subQuests.filter((sq) => sq.status === "completed").length;
|
|
9176
|
-
if (quest.subQuests.length === 0 && quest.status === "completed") {
|
|
9177
|
-
completed = 1;
|
|
9178
|
-
}
|
|
9179
|
-
} else {
|
|
9180
|
-
total = questPlan.quests.length;
|
|
9181
|
-
completed = questPlan.quests.filter((q) => q.status === "completed").length;
|
|
9182
|
-
}
|
|
9183
|
-
return {
|
|
9184
|
-
...link,
|
|
9185
|
-
progress: { total, completed },
|
|
9186
|
-
syncStatus: this.hasPendingUpdates() ? "pending" : "synced",
|
|
9187
|
-
lastSyncedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
9188
|
-
};
|
|
9189
|
-
}
|
|
9190
|
-
/**
|
|
9191
|
-
* Format quest plan for display
|
|
9192
|
-
*/
|
|
9193
|
-
formatQuestPlan(questPlan) {
|
|
9194
|
-
const lines = [];
|
|
9195
|
-
lines.push(`
|
|
9196
|
-
\u{1F3AF} Quest Plan: ${questPlan.goal}`);
|
|
9197
|
-
lines.push(` Status: ${this.formatStatus(questPlan.status)}`);
|
|
9198
|
-
lines.push("");
|
|
9199
|
-
questPlan.quests.forEach((quest, i) => {
|
|
9200
|
-
const statusIcon = this.getStatusIcon(quest.status);
|
|
9201
|
-
lines.push(` ${i + 1}. ${statusIcon} ${quest.title}`);
|
|
9202
|
-
if (quest.subQuests.length > 0) {
|
|
9203
|
-
quest.subQuests.forEach((sq) => {
|
|
9204
|
-
const sqIcon = this.getStatusIcon(sq.status);
|
|
9205
|
-
lines.push(` ${sqIcon} ${sq.title}`);
|
|
9206
|
-
});
|
|
9207
|
-
}
|
|
9208
|
-
});
|
|
9209
|
-
lines.push("");
|
|
9210
|
-
return lines.join("\n");
|
|
9211
|
-
}
|
|
9212
|
-
formatStatus(status) {
|
|
9213
|
-
switch (status) {
|
|
9214
|
-
case "planning":
|
|
9215
|
-
return "\u{1F4CB} Planning";
|
|
9216
|
-
case "in_progress":
|
|
9217
|
-
return "\u{1F504} In Progress";
|
|
9218
|
-
case "completed":
|
|
9219
|
-
return "\u2705 Completed";
|
|
9220
|
-
case "cancelled":
|
|
9221
|
-
return "\u274C Cancelled";
|
|
9222
|
-
default:
|
|
9223
|
-
return status;
|
|
9224
|
-
}
|
|
9225
|
-
}
|
|
9226
|
-
getStatusIcon(status) {
|
|
9227
|
-
switch (status) {
|
|
9228
|
-
case "pending":
|
|
9229
|
-
return "\u2B1C";
|
|
9230
|
-
case "in_progress":
|
|
9231
|
-
return "\u{1F504}";
|
|
9232
|
-
case "completed":
|
|
9233
|
-
return "\u2705";
|
|
9234
|
-
case "skipped":
|
|
9235
|
-
return "\u23ED\uFE0F";
|
|
9236
|
-
default:
|
|
9237
|
-
return "\u2B1C";
|
|
9238
|
-
}
|
|
9239
|
-
}
|
|
9240
|
-
};
|
|
9241
|
-
|
|
9242
9019
|
// src/llm/ServerLlmBackend.ts
|
|
9243
9020
|
import { createParser } from "eventsource-parser";
|
|
9244
9021
|
import { isAxiosError } from "axios";
|
|
@@ -9625,7 +9402,7 @@ import { isAxiosError as isAxiosError2 } from "axios";
|
|
|
9625
9402
|
// package.json
|
|
9626
9403
|
var package_default = {
|
|
9627
9404
|
name: "@bike4mind/cli",
|
|
9628
|
-
version: "0.2.4
|
|
9405
|
+
version: "0.2.4",
|
|
9629
9406
|
type: "module",
|
|
9630
9407
|
description: "Interactive CLI tool for Bike4Mind with ReAct agents",
|
|
9631
9408
|
license: "UNLICENSED",
|
|
@@ -9726,11 +9503,11 @@ var package_default = {
|
|
|
9726
9503
|
zustand: "^4.5.4"
|
|
9727
9504
|
},
|
|
9728
9505
|
devDependencies: {
|
|
9729
|
-
"@bike4mind/agents": "
|
|
9730
|
-
"@bike4mind/common": "
|
|
9731
|
-
"@bike4mind/mcp": "
|
|
9732
|
-
"@bike4mind/services": "
|
|
9733
|
-
"@bike4mind/utils": "
|
|
9506
|
+
"@bike4mind/agents": "workspace:*",
|
|
9507
|
+
"@bike4mind/common": "workspace:*",
|
|
9508
|
+
"@bike4mind/mcp": "workspace:*",
|
|
9509
|
+
"@bike4mind/services": "workspace:*",
|
|
9510
|
+
"@bike4mind/utils": "workspace:*",
|
|
9734
9511
|
"@types/diff": "^5.0.9",
|
|
9735
9512
|
"@types/jsonwebtoken": "^9.0.4",
|
|
9736
9513
|
"@types/node": "^22.9.0",
|
|
@@ -9741,8 +9518,7 @@ var package_default = {
|
|
|
9741
9518
|
tsx: "^4.21.0",
|
|
9742
9519
|
typescript: "^5.9.3",
|
|
9743
9520
|
vitest: "^3.2.4"
|
|
9744
|
-
}
|
|
9745
|
-
gitHead: "6c1c5e891a0b609968c2abb5a22b602af8f2a864"
|
|
9521
|
+
}
|
|
9746
9522
|
};
|
|
9747
9523
|
|
|
9748
9524
|
// src/config/constants.ts
|
|
@@ -10416,176 +10192,6 @@ No usage data available for the last ${USAGE_DAYS} days.`);
|
|
|
10416
10192
|
console.log("");
|
|
10417
10193
|
break;
|
|
10418
10194
|
}
|
|
10419
|
-
case "quest":
|
|
10420
|
-
case "q": {
|
|
10421
|
-
const questPlanId = args[0];
|
|
10422
|
-
if (!questPlanId) {
|
|
10423
|
-
console.log("\nUsage: /quest <quest-plan-id>");
|
|
10424
|
-
console.log("Example: /quest abc123");
|
|
10425
|
-
console.log("\nThis will load a quest plan into your current session.\n");
|
|
10426
|
-
break;
|
|
10427
|
-
}
|
|
10428
|
-
const questAuthTokens = await state.configStore.getAuthTokens();
|
|
10429
|
-
if (!questAuthTokens || new Date(questAuthTokens.expiresAt) <= /* @__PURE__ */ new Date()) {
|
|
10430
|
-
console.log("\n\u274C Authentication required. Run /login first.\n");
|
|
10431
|
-
break;
|
|
10432
|
-
}
|
|
10433
|
-
console.log("\nLoading quest plan...");
|
|
10434
|
-
try {
|
|
10435
|
-
const config = await state.configStore.get();
|
|
10436
|
-
const apiBaseURL = getApiUrl(config.apiConfig);
|
|
10437
|
-
const apiClient = new ApiClient(apiBaseURL, state.configStore);
|
|
10438
|
-
const questTracker = new QuestTracker(apiClient);
|
|
10439
|
-
const questPlan = await questTracker.fetchQuestPlan(questPlanId);
|
|
10440
|
-
if (!questPlan) {
|
|
10441
|
-
console.log("\n\u274C Quest plan not found.\n");
|
|
10442
|
-
break;
|
|
10443
|
-
}
|
|
10444
|
-
const questLink = questTracker.createQuestLink(questPlan);
|
|
10445
|
-
const updatedSession = {
|
|
10446
|
-
...state.session,
|
|
10447
|
-
quest: questLink,
|
|
10448
|
-
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
10449
|
-
};
|
|
10450
|
-
setState((prev) => ({ ...prev, session: updatedSession }));
|
|
10451
|
-
setStoreSession(updatedSession);
|
|
10452
|
-
await state.sessionStore.save(updatedSession);
|
|
10453
|
-
console.log(`
|
|
10454
|
-
\u2705 Quest loaded: ${questPlan.goal}`);
|
|
10455
|
-
console.log(questTracker.formatQuestPlan(questPlan));
|
|
10456
|
-
} catch (error) {
|
|
10457
|
-
if (isAxiosError2(error)) {
|
|
10458
|
-
if (error.response?.status === 404) {
|
|
10459
|
-
console.log("\n\u274C Quest plan not found.\n");
|
|
10460
|
-
} else if (error.response?.status === 403) {
|
|
10461
|
-
console.log("\n\u274C Access denied to this quest plan.\n");
|
|
10462
|
-
} else {
|
|
10463
|
-
console.log(`
|
|
10464
|
-
\u274C Error loading quest: ${error.message}
|
|
10465
|
-
`);
|
|
10466
|
-
}
|
|
10467
|
-
} else if (error instanceof Error) {
|
|
10468
|
-
console.log(`
|
|
10469
|
-
\u274C Error: ${error.message}
|
|
10470
|
-
`);
|
|
10471
|
-
}
|
|
10472
|
-
}
|
|
10473
|
-
break;
|
|
10474
|
-
}
|
|
10475
|
-
case "quest-status":
|
|
10476
|
-
case "qs": {
|
|
10477
|
-
if (!state.session?.quest) {
|
|
10478
|
-
console.log("\n\u26A0\uFE0F No quest linked to this session.");
|
|
10479
|
-
console.log("Use /quest <quest-id> to load a quest.\n");
|
|
10480
|
-
break;
|
|
10481
|
-
}
|
|
10482
|
-
const questLink = state.session.quest;
|
|
10483
|
-
console.log("\n\u{1F3AF} Current Quest Status:");
|
|
10484
|
-
console.log(` Plan: ${questLink.questPlanName}`);
|
|
10485
|
-
if (questLink.questTitle) {
|
|
10486
|
-
console.log(` Quest: ${questLink.questTitle}`);
|
|
10487
|
-
}
|
|
10488
|
-
console.log(` Progress: ${questLink.progress.completed}/${questLink.progress.total}`);
|
|
10489
|
-
console.log(
|
|
10490
|
-
` Sync: ${questLink.syncStatus === "synced" ? "\u2705 Synced" : questLink.syncStatus === "pending" ? "\u23F3 Pending" : "\u26A0\uFE0F Offline"}`
|
|
10491
|
-
);
|
|
10492
|
-
if (questLink.lastSyncedAt) {
|
|
10493
|
-
console.log(` Last Synced: ${new Date(questLink.lastSyncedAt).toLocaleString()}`);
|
|
10494
|
-
}
|
|
10495
|
-
try {
|
|
10496
|
-
const config = await state.configStore.get();
|
|
10497
|
-
const apiBaseURL = getApiUrl(config.apiConfig);
|
|
10498
|
-
const apiClient = new ApiClient(apiBaseURL, state.configStore);
|
|
10499
|
-
const questTracker = new QuestTracker(apiClient);
|
|
10500
|
-
const questPlan = await questTracker.fetchQuestPlan(questLink.questPlanId);
|
|
10501
|
-
if (questPlan) {
|
|
10502
|
-
console.log(questTracker.formatQuestPlan(questPlan));
|
|
10503
|
-
const updatedLink = questTracker.updateProgress(questLink, questPlan);
|
|
10504
|
-
if (updatedLink.progress.completed !== questLink.progress.completed || updatedLink.progress.total !== questLink.progress.total) {
|
|
10505
|
-
const updatedSession = {
|
|
10506
|
-
...state.session,
|
|
10507
|
-
quest: updatedLink,
|
|
10508
|
-
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
10509
|
-
};
|
|
10510
|
-
setState((prev) => ({ ...prev, session: updatedSession }));
|
|
10511
|
-
setStoreSession(updatedSession);
|
|
10512
|
-
await state.sessionStore.save(updatedSession);
|
|
10513
|
-
}
|
|
10514
|
-
}
|
|
10515
|
-
} catch {
|
|
10516
|
-
console.log("\n\u26A0\uFE0F Could not fetch latest quest data (showing cached info).\n");
|
|
10517
|
-
}
|
|
10518
|
-
break;
|
|
10519
|
-
}
|
|
10520
|
-
case "quest-unlink": {
|
|
10521
|
-
if (!state.session?.quest) {
|
|
10522
|
-
console.log("\n\u26A0\uFE0F No quest linked to this session.\n");
|
|
10523
|
-
break;
|
|
10524
|
-
}
|
|
10525
|
-
const questName = state.session.quest.questPlanName;
|
|
10526
|
-
const updatedSession = {
|
|
10527
|
-
...state.session,
|
|
10528
|
-
quest: void 0,
|
|
10529
|
-
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
10530
|
-
};
|
|
10531
|
-
setState((prev) => ({ ...prev, session: updatedSession }));
|
|
10532
|
-
setStoreSession(updatedSession);
|
|
10533
|
-
await state.sessionStore.save(updatedSession);
|
|
10534
|
-
console.log(`
|
|
10535
|
-
\u2705 Unlinked quest: ${questName}
|
|
10536
|
-
`);
|
|
10537
|
-
break;
|
|
10538
|
-
}
|
|
10539
|
-
case "plan": {
|
|
10540
|
-
const planAuthTokens = await state.configStore.getAuthTokens();
|
|
10541
|
-
if (!planAuthTokens || new Date(planAuthTokens.expiresAt) <= /* @__PURE__ */ new Date()) {
|
|
10542
|
-
console.log("\n\u274C Authentication required. Run /login first.\n");
|
|
10543
|
-
break;
|
|
10544
|
-
}
|
|
10545
|
-
if (!state.session || state.session.messages.length === 0) {
|
|
10546
|
-
console.log("\n\u26A0\uFE0F No conversation context to create a plan from.");
|
|
10547
|
-
console.log("Start a conversation first, then use /plan to generate a QuestMaster plan.\n");
|
|
10548
|
-
break;
|
|
10549
|
-
}
|
|
10550
|
-
console.log("\n\u{1F3AF} Creating QuestMaster plan from conversation context...");
|
|
10551
|
-
console.log("\u{1F4A1} This will analyze your conversation and create a structured plan.\n");
|
|
10552
|
-
try {
|
|
10553
|
-
const config = await state.configStore.get();
|
|
10554
|
-
const apiBaseURL = getApiUrl(config.apiConfig);
|
|
10555
|
-
const apiClient = new ApiClient(apiBaseURL, state.configStore);
|
|
10556
|
-
const contextMessages = state.session.messages.slice(-10).map((m) => ({
|
|
10557
|
-
role: m.role,
|
|
10558
|
-
content: m.content
|
|
10559
|
-
}));
|
|
10560
|
-
const response = await apiClient.post("/api/quest-plans", {
|
|
10561
|
-
context: contextMessages,
|
|
10562
|
-
sessionId: state.session.id
|
|
10563
|
-
});
|
|
10564
|
-
if (!response.success) {
|
|
10565
|
-
console.log(`
|
|
10566
|
-
\u274C Failed to create plan: ${response.error}
|
|
10567
|
-
`);
|
|
10568
|
-
break;
|
|
10569
|
-
}
|
|
10570
|
-
console.log(`
|
|
10571
|
-
\u2705 Quest plan created: ${response.questPlan.goal}`);
|
|
10572
|
-
console.log(` Plan ID: ${response.questPlan.id}`);
|
|
10573
|
-
console.log(`
|
|
10574
|
-
\u{1F4A1} Use /quest ${response.questPlan.id} to load this plan into your session.
|
|
10575
|
-
`);
|
|
10576
|
-
} catch (error) {
|
|
10577
|
-
if (isAxiosError2(error)) {
|
|
10578
|
-
console.log(`
|
|
10579
|
-
\u274C Error creating plan: ${error.response?.data?.error || error.message}
|
|
10580
|
-
`);
|
|
10581
|
-
} else if (error instanceof Error) {
|
|
10582
|
-
console.log(`
|
|
10583
|
-
\u274C Error: ${error.message}
|
|
10584
|
-
`);
|
|
10585
|
-
}
|
|
10586
|
-
}
|
|
10587
|
-
break;
|
|
10588
|
-
}
|
|
10589
10195
|
default:
|
|
10590
10196
|
console.log(`Unknown command: /${command}`);
|
|
10591
10197
|
console.log("Type /help for available commands");
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
findMostSimilarMemento,
|
|
4
4
|
getRelevantMementos
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-WNBKV4FX.js";
|
|
6
|
+
import "./chunk-LYNNVNEC.js";
|
|
7
7
|
import "./chunk-AMDXHL6S.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-WR6YZRQV.js";
|
|
9
9
|
import "./chunk-PDX44BCA.js";
|
|
10
10
|
export {
|
|
11
11
|
findMostSimilarMemento,
|
|
File without changes
|
|
@@ -120,7 +120,7 @@ import {
|
|
|
120
120
|
validateMermaidSyntax,
|
|
121
121
|
warmUpSettingsCache,
|
|
122
122
|
withRetry
|
|
123
|
-
} from "./chunk-
|
|
123
|
+
} from "./chunk-LYNNVNEC.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-WR6YZRQV.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-LEG2UM5Q.js";
|
|
6
|
+
import "./chunk-LYNNVNEC.js";
|
|
7
7
|
import "./chunk-AMDXHL6S.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-WR6YZRQV.js";
|
|
9
9
|
import "./chunk-PDX44BCA.js";
|
|
10
10
|
export {
|
|
11
11
|
SubtractCreditsSchema,
|
package/dist/utils-JPMDGUBL.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bike4mind/cli",
|
|
3
|
-
"version": "0.2.4
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Interactive CLI tool for Bike4Mind with ReAct agents",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -30,15 +30,6 @@
|
|
|
30
30
|
"dist",
|
|
31
31
|
"bin"
|
|
32
32
|
],
|
|
33
|
-
"scripts": {
|
|
34
|
-
"dev": "tsx src/index.tsx",
|
|
35
|
-
"build": "tsup",
|
|
36
|
-
"typecheck": "tsc --noEmit",
|
|
37
|
-
"test": "vitest run",
|
|
38
|
-
"test:watch": "vitest",
|
|
39
|
-
"start": "node dist/index.js",
|
|
40
|
-
"prepublishOnly": "pnpm build"
|
|
41
|
-
},
|
|
42
33
|
"dependencies": {
|
|
43
34
|
"@anthropic-ai/sdk": "^0.22.0",
|
|
44
35
|
"@aws-sdk/client-apigatewaymanagementapi": "3.654.0",
|
|
@@ -101,11 +92,6 @@
|
|
|
101
92
|
"zustand": "^4.5.4"
|
|
102
93
|
},
|
|
103
94
|
"devDependencies": {
|
|
104
|
-
"@bike4mind/agents": "0.1.0",
|
|
105
|
-
"@bike4mind/common": "2.37.1-feat-questmaster-external-integrations.17096+6c1c5e891",
|
|
106
|
-
"@bike4mind/mcp": "1.19.5-feat-questmaster-external-integrations.17096+6c1c5e891",
|
|
107
|
-
"@bike4mind/services": "2.32.1-feat-questmaster-external-integrations.17096+6c1c5e891",
|
|
108
|
-
"@bike4mind/utils": "2.1.1-feat-questmaster-external-integrations.17096+6c1c5e891",
|
|
109
95
|
"@types/diff": "^5.0.9",
|
|
110
96
|
"@types/jsonwebtoken": "^9.0.4",
|
|
111
97
|
"@types/node": "^22.9.0",
|
|
@@ -115,7 +101,19 @@
|
|
|
115
101
|
"tsup": "^8.5.1",
|
|
116
102
|
"tsx": "^4.21.0",
|
|
117
103
|
"typescript": "^5.9.3",
|
|
118
|
-
"vitest": "^3.2.4"
|
|
104
|
+
"vitest": "^3.2.4",
|
|
105
|
+
"@bike4mind/agents": "0.1.0",
|
|
106
|
+
"@bike4mind/mcp": "1.19.5",
|
|
107
|
+
"@bike4mind/services": "2.32.1",
|
|
108
|
+
"@bike4mind/utils": "2.1.0",
|
|
109
|
+
"@bike4mind/common": "2.37.0"
|
|
119
110
|
},
|
|
120
|
-
"
|
|
121
|
-
|
|
111
|
+
"scripts": {
|
|
112
|
+
"dev": "tsx src/index.tsx",
|
|
113
|
+
"build": "tsup",
|
|
114
|
+
"typecheck": "tsc --noEmit",
|
|
115
|
+
"test": "vitest run",
|
|
116
|
+
"test:watch": "vitest",
|
|
117
|
+
"start": "node dist/index.js"
|
|
118
|
+
}
|
|
119
|
+
}
|