@cortexkit/aft-opencode 0.19.2 → 0.19.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/index.d.ts.map +1 -1
- package/dist/index.js +92 -38
- package/dist/tui.js +7 -7
- package/package.json +7 -7
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AA+JlD;;;;;;;;;;;;;;;;;;GAkBG;AACH,QAAA,MAAM,MAAM,EAAE,MAytBb,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -7805,7 +7805,7 @@ var require_src2 = __commonJS((exports, module) => {
|
|
|
7805
7805
|
// src/index.ts
|
|
7806
7806
|
import { existsSync as existsSync13, mkdirSync as mkdirSync10, readFileSync as readFileSync9, writeFileSync as writeFileSync10 } from "fs";
|
|
7807
7807
|
import { createRequire as createRequire2 } from "module";
|
|
7808
|
-
import { homedir as
|
|
7808
|
+
import { homedir as homedir11 } from "os";
|
|
7809
7809
|
import { join as join18 } from "path";
|
|
7810
7810
|
|
|
7811
7811
|
// ../aft-bridge/dist/active-logger.js
|
|
@@ -7837,9 +7837,15 @@ function error(message, meta) {
|
|
|
7837
7837
|
console.error(`[aft-bridge] ERROR: ${message}`);
|
|
7838
7838
|
}
|
|
7839
7839
|
}
|
|
7840
|
+
function sessionLog(sessionId, message) {
|
|
7841
|
+
log(message, sessionId ? { sessionId } : undefined);
|
|
7842
|
+
}
|
|
7840
7843
|
function sessionWarn(sessionId, message) {
|
|
7841
7844
|
warn(message, sessionId ? { sessionId } : undefined);
|
|
7842
7845
|
}
|
|
7846
|
+
function sessionError(sessionId, message) {
|
|
7847
|
+
error(message, sessionId ? { sessionId } : undefined);
|
|
7848
|
+
}
|
|
7843
7849
|
// ../aft-bridge/dist/bridge.js
|
|
7844
7850
|
import { spawn } from "child_process";
|
|
7845
7851
|
import { homedir } from "os";
|
|
@@ -7967,8 +7973,8 @@ class BinaryBridge {
|
|
|
7967
7973
|
if (Object.hasOwn(params, "id")) {
|
|
7968
7974
|
throw new Error("params cannot contain reserved key 'id'");
|
|
7969
7975
|
}
|
|
7970
|
-
this.ensureSpawned();
|
|
7971
7976
|
const requestSessionId = typeof params.session_id === "string" && params.session_id.length > 0 ? params.session_id : undefined;
|
|
7977
|
+
this.ensureSpawned(requestSessionId);
|
|
7972
7978
|
if (requestSessionId && options?.configureWarningClient !== undefined) {
|
|
7973
7979
|
this.configureWarningClients.set(requestSessionId, options.configureWarningClient);
|
|
7974
7980
|
}
|
|
@@ -8031,7 +8037,7 @@ class BinaryBridge {
|
|
|
8031
8037
|
}
|
|
8032
8038
|
reject(new Error(`${this.errorPrefix} Request "${command}" (id=${id}) timed out after ${effectiveTimeoutMs}ms`));
|
|
8033
8039
|
if (!keepBridgeOnTimeout) {
|
|
8034
|
-
this.handleTimeout();
|
|
8040
|
+
this.handleTimeout(requestSessionId);
|
|
8035
8041
|
}
|
|
8036
8042
|
}, effectiveTimeoutMs);
|
|
8037
8043
|
this.pending.set(id, { resolve, reject, timer, onProgress: options?.onProgress });
|
|
@@ -8126,13 +8132,17 @@ class BinaryBridge {
|
|
|
8126
8132
|
warn(`Version check failed: ${err.message}`);
|
|
8127
8133
|
}
|
|
8128
8134
|
}
|
|
8129
|
-
ensureSpawned() {
|
|
8135
|
+
ensureSpawned(triggeringSessionId) {
|
|
8130
8136
|
if (this.isAlive())
|
|
8131
8137
|
return;
|
|
8132
|
-
this.spawnProcess();
|
|
8138
|
+
this.spawnProcess(triggeringSessionId);
|
|
8133
8139
|
}
|
|
8134
|
-
spawnProcess() {
|
|
8135
|
-
|
|
8140
|
+
spawnProcess(triggeringSessionId) {
|
|
8141
|
+
if (triggeringSessionId) {
|
|
8142
|
+
sessionLog(triggeringSessionId, `Spawning binary: ${this.binaryPath} (cwd: ${this.cwd})`);
|
|
8143
|
+
} else {
|
|
8144
|
+
log(`Spawning binary: ${this.binaryPath} (cwd: ${this.cwd})`);
|
|
8145
|
+
}
|
|
8136
8146
|
const semantic = this.configOverrides.semantic;
|
|
8137
8147
|
const semanticBackend = (() => {
|
|
8138
8148
|
if (semantic && typeof semantic === "object" && !Array.isArray(semantic)) {
|
|
@@ -8280,7 +8290,7 @@ class BinaryBridge {
|
|
|
8280
8290
|
}
|
|
8281
8291
|
}
|
|
8282
8292
|
}
|
|
8283
|
-
handleTimeout() {
|
|
8293
|
+
handleTimeout(triggeringSessionId) {
|
|
8284
8294
|
if (this.process) {
|
|
8285
8295
|
this.process.kill("SIGKILL");
|
|
8286
8296
|
this.process = null;
|
|
@@ -8289,10 +8299,17 @@ class BinaryBridge {
|
|
|
8289
8299
|
this.configured = false;
|
|
8290
8300
|
const tail = this.formatStderrTail();
|
|
8291
8301
|
this.stderrTail = [];
|
|
8302
|
+
const killedMsg = tail ? `Bridge killed after timeout.${tail}` : `Bridge killed after timeout (see ${getLogFilePath()})`;
|
|
8292
8303
|
if (tail) {
|
|
8293
|
-
|
|
8304
|
+
if (triggeringSessionId) {
|
|
8305
|
+
sessionError(triggeringSessionId, killedMsg);
|
|
8306
|
+
} else {
|
|
8307
|
+
error(killedMsg);
|
|
8308
|
+
}
|
|
8309
|
+
} else if (triggeringSessionId) {
|
|
8310
|
+
sessionWarn(triggeringSessionId, killedMsg);
|
|
8294
8311
|
} else {
|
|
8295
|
-
warn(
|
|
8312
|
+
warn(killedMsg);
|
|
8296
8313
|
}
|
|
8297
8314
|
}
|
|
8298
8315
|
handleCrash(cause) {
|
|
@@ -8977,10 +8994,40 @@ function isProcessAlive(pid) {
|
|
|
8977
8994
|
}
|
|
8978
8995
|
// ../aft-bridge/dist/pool.js
|
|
8979
8996
|
import { realpathSync as realpathSync2 } from "fs";
|
|
8997
|
+
import { homedir as homedir3 } from "os";
|
|
8980
8998
|
var DEFAULT_IDLE_TIMEOUT_MS = Infinity;
|
|
8981
8999
|
var DEFAULT_MAX_POOL_SIZE = 8;
|
|
8982
9000
|
var CLEANUP_INTERVAL_MS = 60 * 1000;
|
|
8983
9001
|
|
|
9002
|
+
class HomeProjectRootError extends Error {
|
|
9003
|
+
projectRoot;
|
|
9004
|
+
constructor(projectRoot) {
|
|
9005
|
+
super(`aft refuses to spawn a bridge with project_root=${projectRoot} (user home directory). ` + `Open OpenCode/Pi from a project subdirectory instead, or set the session's ` + `directory to a real project root.`);
|
|
9006
|
+
this.projectRoot = projectRoot;
|
|
9007
|
+
this.name = "HomeProjectRootError";
|
|
9008
|
+
}
|
|
9009
|
+
}
|
|
9010
|
+
function canonicalHomeDir() {
|
|
9011
|
+
try {
|
|
9012
|
+
const home = homedir3();
|
|
9013
|
+
if (!home)
|
|
9014
|
+
return null;
|
|
9015
|
+
try {
|
|
9016
|
+
return realpathSync2(home);
|
|
9017
|
+
} catch {
|
|
9018
|
+
return home.replace(/[/\\]+$/, "");
|
|
9019
|
+
}
|
|
9020
|
+
} catch {
|
|
9021
|
+
return null;
|
|
9022
|
+
}
|
|
9023
|
+
}
|
|
9024
|
+
function isHomeDirectoryRoot(normalizedKey) {
|
|
9025
|
+
const home = canonicalHomeDir();
|
|
9026
|
+
if (!home)
|
|
9027
|
+
return false;
|
|
9028
|
+
return normalizedKey === home;
|
|
9029
|
+
}
|
|
9030
|
+
|
|
8984
9031
|
class BridgePool {
|
|
8985
9032
|
bridges = new Map;
|
|
8986
9033
|
binaryPath;
|
|
@@ -9017,6 +9064,9 @@ class BridgePool {
|
|
|
9017
9064
|
}
|
|
9018
9065
|
getBridge(projectRoot) {
|
|
9019
9066
|
const key = normalizeKey(projectRoot);
|
|
9067
|
+
if (isHomeDirectoryRoot(key)) {
|
|
9068
|
+
throw new HomeProjectRootError(key);
|
|
9069
|
+
}
|
|
9020
9070
|
const existing = this.bridges.get(key);
|
|
9021
9071
|
if (existing) {
|
|
9022
9072
|
existing.lastUsed = Date.now();
|
|
@@ -9095,7 +9145,7 @@ function normalizeKey(projectRoot) {
|
|
|
9095
9145
|
import { execSync, spawnSync } from "child_process";
|
|
9096
9146
|
import { chmodSync as chmodSync3, copyFileSync as copyFileSync2, existsSync as existsSync3, mkdirSync as mkdirSync3, renameSync } from "fs";
|
|
9097
9147
|
import { createRequire } from "module";
|
|
9098
|
-
import { homedir as
|
|
9148
|
+
import { homedir as homedir4 } from "os";
|
|
9099
9149
|
import { join as join4 } from "path";
|
|
9100
9150
|
function copyToVersionedCache(npmBinaryPath) {
|
|
9101
9151
|
try {
|
|
@@ -9175,7 +9225,7 @@ function findBinarySync(expectedVersion) {
|
|
|
9175
9225
|
if (result)
|
|
9176
9226
|
return result;
|
|
9177
9227
|
} catch {}
|
|
9178
|
-
const cargoPath = join4(
|
|
9228
|
+
const cargoPath = join4(homedir4(), ".cargo", "bin", `aft${ext}`);
|
|
9179
9229
|
if (existsSync3(cargoPath))
|
|
9180
9230
|
return cargoPath;
|
|
9181
9231
|
return null;
|
|
@@ -9645,24 +9695,24 @@ function warn2(message, data) {
|
|
|
9645
9695
|
function error2(message, data) {
|
|
9646
9696
|
write("ERROR", message, data);
|
|
9647
9697
|
}
|
|
9648
|
-
function
|
|
9698
|
+
function sessionLog2(sessionId, message, data) {
|
|
9649
9699
|
write("INFO", message, data, sessionId);
|
|
9650
9700
|
}
|
|
9651
9701
|
function sessionWarn2(sessionId, message, data) {
|
|
9652
9702
|
write("WARN", message, data, sessionId);
|
|
9653
9703
|
}
|
|
9654
|
-
function
|
|
9704
|
+
function sessionError2(sessionId, message, data) {
|
|
9655
9705
|
write("ERROR", message, data, sessionId);
|
|
9656
9706
|
}
|
|
9657
9707
|
var bridgeLogger = {
|
|
9658
9708
|
log(message, meta) {
|
|
9659
|
-
|
|
9709
|
+
sessionLog2(meta?.sessionId, message);
|
|
9660
9710
|
},
|
|
9661
9711
|
warn(message, meta) {
|
|
9662
9712
|
sessionWarn2(meta?.sessionId, message);
|
|
9663
9713
|
},
|
|
9664
9714
|
error(message, meta) {
|
|
9665
|
-
|
|
9715
|
+
sessionError2(meta?.sessionId, message);
|
|
9666
9716
|
},
|
|
9667
9717
|
getLogFilePath: () => logFile
|
|
9668
9718
|
};
|
|
@@ -10051,7 +10101,7 @@ function formatDuration(completion) {
|
|
|
10051
10101
|
// src/config.ts
|
|
10052
10102
|
var import_comment_json = __toESM(require_src2(), 1);
|
|
10053
10103
|
import { existsSync as existsSync5, readFileSync as readFileSync3, renameSync as renameSync2, unlinkSync as unlinkSync4, writeFileSync as writeFileSync3 } from "fs";
|
|
10054
|
-
import { homedir as
|
|
10104
|
+
import { homedir as homedir5 } from "os";
|
|
10055
10105
|
import { join as join7 } from "path";
|
|
10056
10106
|
|
|
10057
10107
|
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/external.js
|
|
@@ -24021,7 +24071,7 @@ function getOpenCodeConfigDir() {
|
|
|
24021
24071
|
if (envDir) {
|
|
24022
24072
|
return envDir;
|
|
24023
24073
|
}
|
|
24024
|
-
const xdgConfig = process.env.XDG_CONFIG_HOME || join7(
|
|
24074
|
+
const xdgConfig = process.env.XDG_CONFIG_HOME || join7(homedir5(), ".config");
|
|
24025
24075
|
return join7(xdgConfig, "opencode");
|
|
24026
24076
|
}
|
|
24027
24077
|
function loadAftConfig(projectDirectory) {
|
|
@@ -24064,27 +24114,27 @@ import { basename, dirname as dirname3, join as join10 } from "path";
|
|
|
24064
24114
|
// src/hooks/auto-update-checker/checker.ts
|
|
24065
24115
|
var import_comment_json2 = __toESM(require_src2(), 1);
|
|
24066
24116
|
import { existsSync as existsSync6, readFileSync as readFileSync4, statSync as statSync2, writeFileSync as writeFileSync4 } from "fs";
|
|
24067
|
-
import { homedir as
|
|
24117
|
+
import { homedir as homedir7 } from "os";
|
|
24068
24118
|
import { dirname as dirname2, isAbsolute, join as join9, resolve as resolve2 } from "path";
|
|
24069
24119
|
import { fileURLToPath } from "url";
|
|
24070
24120
|
|
|
24071
24121
|
// src/hooks/auto-update-checker/constants.ts
|
|
24072
|
-
import { homedir as
|
|
24122
|
+
import { homedir as homedir6, platform } from "os";
|
|
24073
24123
|
import { join as join8 } from "path";
|
|
24074
24124
|
var PACKAGE_NAME = "@cortexkit/aft-opencode";
|
|
24075
24125
|
var NPM_REGISTRY_URL = "https://registry.npmjs.org";
|
|
24076
24126
|
var NPM_FETCH_TIMEOUT = 1e4;
|
|
24077
24127
|
function getOpenCodeCacheRoot() {
|
|
24078
24128
|
if (platform() === "win32") {
|
|
24079
|
-
return join8(process.env.LOCALAPPDATA ??
|
|
24129
|
+
return join8(process.env.LOCALAPPDATA ?? homedir6(), "opencode");
|
|
24080
24130
|
}
|
|
24081
|
-
return join8(
|
|
24131
|
+
return join8(homedir6(), ".cache", "opencode");
|
|
24082
24132
|
}
|
|
24083
24133
|
function getOpenCodeConfigRoot() {
|
|
24084
24134
|
if (platform() === "win32") {
|
|
24085
|
-
return join8(process.env.APPDATA ?? join8(
|
|
24135
|
+
return join8(process.env.APPDATA ?? join8(homedir6(), "AppData", "Roaming"), "opencode");
|
|
24086
24136
|
}
|
|
24087
|
-
return join8(process.env.XDG_CONFIG_HOME ?? join8(
|
|
24137
|
+
return join8(process.env.XDG_CONFIG_HOME ?? join8(homedir6(), ".config"), "opencode");
|
|
24088
24138
|
}
|
|
24089
24139
|
var CACHE_DIR = join8(getOpenCodeCacheRoot(), "packages");
|
|
24090
24140
|
var USER_OPENCODE_CONFIG = join8(getOpenCodeConfigRoot(), "opencode.json");
|
|
@@ -24263,7 +24313,7 @@ function getCachedVersion(spec) {
|
|
|
24263
24313
|
getCurrentRuntimePackageJsonPath(),
|
|
24264
24314
|
spec ? getSpecCachePackageJsonPath(spec) : null,
|
|
24265
24315
|
getSpecCachePackageJsonPath(`${PACKAGE_NAME}@latest`),
|
|
24266
|
-
join9(
|
|
24316
|
+
join9(homedir7(), ".cache", "opencode", "node_modules", PACKAGE_NAME, "package.json")
|
|
24267
24317
|
].filter(isString);
|
|
24268
24318
|
for (const packageJsonPath of candidates) {
|
|
24269
24319
|
try {
|
|
@@ -24584,7 +24634,7 @@ import {
|
|
|
24584
24634
|
unlinkSync as unlinkSync5,
|
|
24585
24635
|
writeFileSync as writeFileSync6
|
|
24586
24636
|
} from "fs";
|
|
24587
|
-
import { homedir as
|
|
24637
|
+
import { homedir as homedir8 } from "os";
|
|
24588
24638
|
import { join as join11 } from "path";
|
|
24589
24639
|
function aftCacheBase() {
|
|
24590
24640
|
const override = process.env.AFT_CACHE_DIR;
|
|
@@ -24592,10 +24642,10 @@ function aftCacheBase() {
|
|
|
24592
24642
|
return override;
|
|
24593
24643
|
if (process.platform === "win32") {
|
|
24594
24644
|
const localAppData = process.env.LOCALAPPDATA || process.env.APPDATA;
|
|
24595
|
-
const base2 = localAppData || join11(
|
|
24645
|
+
const base2 = localAppData || join11(homedir8(), "AppData", "Local");
|
|
24596
24646
|
return join11(base2, "aft");
|
|
24597
24647
|
}
|
|
24598
|
-
const base = process.env.XDG_CACHE_HOME || join11(
|
|
24648
|
+
const base = process.env.XDG_CACHE_HOME || join11(homedir8(), ".cache");
|
|
24599
24649
|
return join11(base, "aft");
|
|
24600
24650
|
}
|
|
24601
24651
|
function lspCacheRoot() {
|
|
@@ -26050,7 +26100,7 @@ function normalizeToolMap(tools) {
|
|
|
26050
26100
|
|
|
26051
26101
|
// src/notifications.ts
|
|
26052
26102
|
import { existsSync as existsSync10, mkdirSync as mkdirSync7, readFileSync as readFileSync7, writeFileSync as writeFileSync7 } from "fs";
|
|
26053
|
-
import { homedir as
|
|
26103
|
+
import { homedir as homedir9, platform as platform2 } from "os";
|
|
26054
26104
|
import { join as join14 } from "path";
|
|
26055
26105
|
function isTuiMode() {
|
|
26056
26106
|
return process.env.OPENCODE_CLIENT === "cli";
|
|
@@ -26073,7 +26123,7 @@ var STATUS_MARKER = `${AFT_MARKER} \u2705`;
|
|
|
26073
26123
|
var WARNED_TOOLS_FILE = "warned_tools.json";
|
|
26074
26124
|
function getDesktopStatePath() {
|
|
26075
26125
|
const os2 = platform2();
|
|
26076
|
-
const home =
|
|
26126
|
+
const home = homedir9();
|
|
26077
26127
|
if (os2 === "darwin") {
|
|
26078
26128
|
return join14(home, "Library", "Application Support", "ai.opencode.desktop", "opencode.global.dat");
|
|
26079
26129
|
}
|
|
@@ -26156,7 +26206,7 @@ async function sendIgnoredMessage(client, sessionId, text) {
|
|
|
26156
26206
|
return true;
|
|
26157
26207
|
}
|
|
26158
26208
|
} catch (err) {
|
|
26159
|
-
|
|
26209
|
+
sessionLog2(sessionId, `[aft-plugin] notification send failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
26160
26210
|
}
|
|
26161
26211
|
return false;
|
|
26162
26212
|
}
|
|
@@ -26182,7 +26232,7 @@ async function sendWarning(opts, message) {
|
|
|
26182
26232
|
if (!sessionId)
|
|
26183
26233
|
return;
|
|
26184
26234
|
const text = `${WARNING_MARKER} ${message}`;
|
|
26185
|
-
|
|
26235
|
+
sessionLog2(sessionId, `[aft-plugin] sending warning to session ${sessionId}`);
|
|
26186
26236
|
await sendIgnoredMessage(opts.client, sessionId, text);
|
|
26187
26237
|
}
|
|
26188
26238
|
async function sendFeatureAnnouncement(opts, version2, features, storageDir) {
|
|
@@ -26205,7 +26255,7 @@ async function sendFeatureAnnouncement(opts, version2, features, storageDir) {
|
|
|
26205
26255
|
return;
|
|
26206
26256
|
const text = [`${FEATURE_MARKER} v${version2}:`, ...features.map((f) => ` \u2022 ${f}`)].join(`
|
|
26207
26257
|
`);
|
|
26208
|
-
|
|
26258
|
+
sessionLog2(sessionId, `[aft-plugin] sending feature announcement for v${version2}`);
|
|
26209
26259
|
await sendIgnoredMessage(opts.client, sessionId, text);
|
|
26210
26260
|
}
|
|
26211
26261
|
if (storageDir) {
|
|
@@ -26323,7 +26373,7 @@ async function cleanupWarnings(opts) {
|
|
|
26323
26373
|
}
|
|
26324
26374
|
if (warningIds.length === 0)
|
|
26325
26375
|
return;
|
|
26326
|
-
|
|
26376
|
+
sessionLog2(sessionId, `[aft-plugin] cleaning up ${warningIds.length} stale warning(s)`);
|
|
26327
26377
|
for (const id of warningIds) {
|
|
26328
26378
|
await deleteMessage(effectiveServerUrl, sessionId, id);
|
|
26329
26379
|
}
|
|
@@ -26680,7 +26730,7 @@ import { existsSync as existsSync11, mkdirSync as mkdirSync9, readFileSync as re
|
|
|
26680
26730
|
import { dirname as dirname6, join as join17 } from "path";
|
|
26681
26731
|
|
|
26682
26732
|
// src/shared/opencode-config-dir.ts
|
|
26683
|
-
import { homedir as
|
|
26733
|
+
import { homedir as homedir10 } from "os";
|
|
26684
26734
|
import { join as join16, resolve as resolve4 } from "path";
|
|
26685
26735
|
function getCliConfigDir() {
|
|
26686
26736
|
const envConfigDir = process.env.OPENCODE_CONFIG_DIR?.trim();
|
|
@@ -26688,9 +26738,9 @@ function getCliConfigDir() {
|
|
|
26688
26738
|
return resolve4(envConfigDir);
|
|
26689
26739
|
}
|
|
26690
26740
|
if (process.platform === "win32") {
|
|
26691
|
-
return join16(
|
|
26741
|
+
return join16(homedir10(), ".config", "opencode");
|
|
26692
26742
|
}
|
|
26693
|
-
return join16(process.env.XDG_CONFIG_HOME || join16(
|
|
26743
|
+
return join16(process.env.XDG_CONFIG_HOME || join16(homedir10(), ".config"), "opencode");
|
|
26694
26744
|
}
|
|
26695
26745
|
function getOpenCodeConfigDir2(_options) {
|
|
26696
26746
|
return getCliConfigDir();
|
|
@@ -29745,7 +29795,7 @@ var plugin = async (input) => {
|
|
|
29745
29795
|
if (aftConfig.max_callgraph_files !== undefined)
|
|
29746
29796
|
configOverrides.max_callgraph_files = aftConfig.max_callgraph_files;
|
|
29747
29797
|
const isFastembedSemanticBackend = (aftConfig.semantic?.backend ?? "fastembed") === "fastembed";
|
|
29748
|
-
const dataHome = process.env.XDG_DATA_HOME || join18(
|
|
29798
|
+
const dataHome = process.env.XDG_DATA_HOME || join18(homedir11(), ".local", "share");
|
|
29749
29799
|
configOverrides.storage_dir = join18(dataHome, "opencode", "storage", "plugin", "aft");
|
|
29750
29800
|
let onnxRuntimePromise = null;
|
|
29751
29801
|
if (aftConfig.semantic_search && isFastembedSemanticBackend) {
|
|
@@ -29889,6 +29939,10 @@ ${lines}
|
|
|
29889
29939
|
}
|
|
29890
29940
|
(async () => {
|
|
29891
29941
|
try {
|
|
29942
|
+
if (isHomeDirectoryRoot(input.directory)) {
|
|
29943
|
+
log2(`Eager configure skipped: input.directory=${input.directory} is the user home directory. ` + `The first real tool call from a session will warm the correct project bridge.`);
|
|
29944
|
+
return;
|
|
29945
|
+
}
|
|
29892
29946
|
if (onnxRuntimePromise) {
|
|
29893
29947
|
await Promise.race([
|
|
29894
29948
|
onnxRuntimePromise,
|
package/dist/tui.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// package.json
|
|
3
3
|
var package_default = {
|
|
4
4
|
name: "@cortexkit/aft-opencode",
|
|
5
|
-
version: "0.19.
|
|
5
|
+
version: "0.19.4",
|
|
6
6
|
type: "module",
|
|
7
7
|
description: "OpenCode plugin for Agent File Tools (AFT) \u2014 tree-sitter and lsp powered code analysis",
|
|
8
8
|
main: "dist/index.js",
|
|
@@ -30,7 +30,7 @@ var package_default = {
|
|
|
30
30
|
},
|
|
31
31
|
dependencies: {
|
|
32
32
|
"@clack/prompts": "^1.2.0",
|
|
33
|
-
"@cortexkit/aft-bridge": "0.19.
|
|
33
|
+
"@cortexkit/aft-bridge": "0.19.4",
|
|
34
34
|
"@opencode-ai/plugin": "^1.2.26",
|
|
35
35
|
"@opencode-ai/sdk": "^1.2.26",
|
|
36
36
|
"comment-json": "^4.6.2",
|
|
@@ -38,11 +38,11 @@ var package_default = {
|
|
|
38
38
|
zod: "^4.1.8"
|
|
39
39
|
},
|
|
40
40
|
optionalDependencies: {
|
|
41
|
-
"@cortexkit/aft-darwin-arm64": "0.19.
|
|
42
|
-
"@cortexkit/aft-darwin-x64": "0.19.
|
|
43
|
-
"@cortexkit/aft-linux-arm64": "0.19.
|
|
44
|
-
"@cortexkit/aft-linux-x64": "0.19.
|
|
45
|
-
"@cortexkit/aft-win32-x64": "0.19.
|
|
41
|
+
"@cortexkit/aft-darwin-arm64": "0.19.4",
|
|
42
|
+
"@cortexkit/aft-darwin-x64": "0.19.4",
|
|
43
|
+
"@cortexkit/aft-linux-arm64": "0.19.4",
|
|
44
|
+
"@cortexkit/aft-linux-x64": "0.19.4",
|
|
45
|
+
"@cortexkit/aft-win32-x64": "0.19.4"
|
|
46
46
|
},
|
|
47
47
|
devDependencies: {
|
|
48
48
|
"@types/node": "^22.0.0",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cortexkit/aft-opencode",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "OpenCode plugin for Agent File Tools (AFT) — tree-sitter and lsp powered code analysis",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@clack/prompts": "^1.2.0",
|
|
31
|
-
"@cortexkit/aft-bridge": "0.19.
|
|
31
|
+
"@cortexkit/aft-bridge": "0.19.4",
|
|
32
32
|
"@opencode-ai/plugin": "^1.2.26",
|
|
33
33
|
"@opencode-ai/sdk": "^1.2.26",
|
|
34
34
|
"comment-json": "^4.6.2",
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
"zod": "^4.1.8"
|
|
37
37
|
},
|
|
38
38
|
"optionalDependencies": {
|
|
39
|
-
"@cortexkit/aft-darwin-arm64": "0.19.
|
|
40
|
-
"@cortexkit/aft-darwin-x64": "0.19.
|
|
41
|
-
"@cortexkit/aft-linux-arm64": "0.19.
|
|
42
|
-
"@cortexkit/aft-linux-x64": "0.19.
|
|
43
|
-
"@cortexkit/aft-win32-x64": "0.19.
|
|
39
|
+
"@cortexkit/aft-darwin-arm64": "0.19.4",
|
|
40
|
+
"@cortexkit/aft-darwin-x64": "0.19.4",
|
|
41
|
+
"@cortexkit/aft-linux-arm64": "0.19.4",
|
|
42
|
+
"@cortexkit/aft-linux-x64": "0.19.4",
|
|
43
|
+
"@cortexkit/aft-win32-x64": "0.19.4"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/node": "^22.0.0",
|