codebolt 1.12.9 → 1.12.11
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/index.js +17 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -526525,6 +526525,10 @@ async function initializeDatabase() {
|
|
|
526525
526525
|
settingService_1.projectSetting.user_active_project_path = startupProjectPath;
|
|
526526
526526
|
appLogger_1.default.info(`[INIT] Overrode projectSetting.user_active_project_path with startup path: ${startupProjectPath}`);
|
|
526527
526527
|
}
|
|
526528
|
+
else if (startupProjectPath && !settingService_1.projectSetting) {
|
|
526529
|
+
// No-op: handled by threadFileStore fallback to getProjectPath()
|
|
526530
|
+
appLogger_1.default.info(`[INIT] No DB profile, startup path available: ${startupProjectPath}`);
|
|
526531
|
+
}
|
|
526528
526532
|
else if (!startupProjectPath && settingService_1.projectSetting?.user_active_project_path) {
|
|
526529
526533
|
// If no startup projectPath was provided (e.g. CLI mode), seed getProjectPath()
|
|
526530
526534
|
// from the DB value so that callers of getProjectPath() also work.
|
|
@@ -533993,7 +533997,7 @@ function hasClaim() {
|
|
|
533993
533997
|
* Forward an agent message as an ExecutionRequest to the claiming plugin.
|
|
533994
533998
|
* Returns a promise that resolves when the plugin sends a reply.
|
|
533995
533999
|
*/
|
|
533996
|
-
function forwardAsRequest(originalMessage, timeout =
|
|
534000
|
+
function forwardAsRequest(originalMessage, timeout = 0) {
|
|
533997
534001
|
if (!claimingPluginId) {
|
|
533998
534002
|
return Promise.reject(new Error('No plugin has claimed the ExecutionGateway'));
|
|
533999
534003
|
}
|
|
@@ -534004,10 +534008,12 @@ function forwardAsRequest(originalMessage, timeout = 30000) {
|
|
|
534004
534008
|
}
|
|
534005
534009
|
const requestId = (0, uuid_1.v4)();
|
|
534006
534010
|
return new Promise((resolve, reject) => {
|
|
534007
|
-
const timeoutHandle =
|
|
534008
|
-
|
|
534009
|
-
|
|
534010
|
-
|
|
534011
|
+
const timeoutHandle = timeout > 0
|
|
534012
|
+
? setTimeout(() => {
|
|
534013
|
+
pendingRequests.delete(requestId);
|
|
534014
|
+
reject(new Error(`ExecutionGateway request timed out after ${timeout}ms`));
|
|
534015
|
+
}, timeout)
|
|
534016
|
+
: null;
|
|
534011
534017
|
pendingRequests.set(requestId, { resolve, reject, timeoutHandle });
|
|
534012
534018
|
const request = {
|
|
534013
534019
|
type: 'executionGateway.request',
|
|
@@ -592890,12 +592896,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
592890
592896
|
};
|
|
592891
592897
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
592892
592898
|
exports.settingService = exports.clearAllTokens = exports.removeThreadToken = exports.getTokenFromThreadId = exports.getThreadIdFromToken = exports.generateThreadToken = exports.threadId = exports.activeAgentConfig = exports.activeAgent = exports.activeUser = exports.projectSetting = void 0;
|
|
592899
|
+
exports.setProjectSetting = setProjectSetting;
|
|
592893
592900
|
const db_1 = __importDefault(__webpack_require__(12202));
|
|
592894
592901
|
const uuid_1 = __webpack_require__(47333);
|
|
592895
592902
|
const appLogger_1 = __importDefault(__webpack_require__(8479));
|
|
592896
592903
|
const HookManager_1 = __webpack_require__(46994);
|
|
592897
592904
|
const categorizedLogger_1 = __webpack_require__(77819);
|
|
592898
592905
|
const focusedLogCategories_1 = __webpack_require__(54293);
|
|
592906
|
+
function setProjectSetting(setting) {
|
|
592907
|
+
exports.projectSetting = setting;
|
|
592908
|
+
}
|
|
592899
592909
|
// Token mapping storage: threadId -> token
|
|
592900
592910
|
const threadTokenMap = new Map();
|
|
592901
592911
|
// Reverse mapping: token -> threadId
|
|
@@ -621559,6 +621569,7 @@ const path_1 = __importDefault(__webpack_require__(16928));
|
|
|
621559
621569
|
const uuid_1 = __webpack_require__(47333);
|
|
621560
621570
|
const logger_1 = __webpack_require__(19622);
|
|
621561
621571
|
const settingService_1 = __webpack_require__(26152);
|
|
621572
|
+
const serverPaths_1 = __webpack_require__(52047);
|
|
621562
621573
|
const logger = (0, logger_1.createLogger)();
|
|
621563
621574
|
var ThreadStepStatus;
|
|
621564
621575
|
(function (ThreadStepStatus) {
|
|
@@ -622256,7 +622267,7 @@ class ThreadFileStore {
|
|
|
622256
622267
|
// ========================================================================
|
|
622257
622268
|
_ensureInitialized() {
|
|
622258
622269
|
if (!this._initialized) {
|
|
622259
|
-
const projectPath = settingService_1.projectSetting?.user_active_project_path;
|
|
622270
|
+
const projectPath = settingService_1.projectSetting?.user_active_project_path || (0, serverPaths_1.getProjectPath)();
|
|
622260
622271
|
if (projectPath) {
|
|
622261
622272
|
this.init(projectPath);
|
|
622262
622273
|
}
|