@cortexkit/aft-opencode 0.39.1 → 0.39.2
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/bg-notifications.d.ts.map +1 -1
- package/dist/config.d.ts +12 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +97 -27
- package/dist/tools/search.d.ts.map +1 -1
- package/dist/tui.js +14 -11
- package/package.json +8 -8
- package/src/tui/sidebar.tsx +19 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bg-notifications.d.ts","sourceRoot":"","sources":["../src/bg-notifications.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAWhD,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,qEAAqE;IACrE,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAG3B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,IAAI,CAAC,EAAE,OAAO,GAAG,KAAK,GAAG,MAAM,CAAC;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MA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C,IAAI,CAAC,CAGf;AAyOD,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,SAAS,YAAY,EAAE,GAAG,MAAM,CASjF;AAED,wBAAgB,yBAAyB,CAAC,SAAS,EAAE,SAAS,qBAAqB,EAAE,GAAG,MAAM,CAQ7F;AAED,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,SAAS,iBAAiB,EAAE,GAAG,MAAM,CAWxF;AAcD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAcnE;AAED,wBAAgB,kCAAkC,IAAI,IAAI,CAKzD"}
|
package/dist/config.d.ts
CHANGED
|
@@ -136,6 +136,10 @@ export declare const AftConfigSchema: z.ZodObject<{
|
|
|
136
136
|
}, z.core.$strip>>;
|
|
137
137
|
max_callgraph_files: z.ZodOptional<z.ZodNumber>;
|
|
138
138
|
auto_update: z.ZodOptional<z.ZodBoolean>;
|
|
139
|
+
bridge: z.ZodOptional<z.ZodObject<{
|
|
140
|
+
request_timeout_ms: z.ZodOptional<z.ZodNumber>;
|
|
141
|
+
hang_threshold: z.ZodOptional<z.ZodNumber>;
|
|
142
|
+
}, z.core.$strip>>;
|
|
139
143
|
}, z.core.$strict>;
|
|
140
144
|
export type AftConfig = z.infer<typeof AftConfigSchema>;
|
|
141
145
|
export type LspServerConfig = z.infer<typeof LspServerSchema>;
|
|
@@ -244,6 +248,14 @@ export declare function migrateAftConfigFile(configPath: string, logger?: Logger
|
|
|
244
248
|
migrated: boolean;
|
|
245
249
|
oldKeys: string[];
|
|
246
250
|
};
|
|
251
|
+
/** Defaults for bridge transport when omitted from config. */
|
|
252
|
+
export declare const DEFAULT_BRIDGE_REQUEST_TIMEOUT_MS = 30000;
|
|
253
|
+
export declare const DEFAULT_BRIDGE_HANG_THRESHOLD = 2;
|
|
254
|
+
/** Resolved pool/bridge options from `config.bridge` (defaults 30000 / 2). */
|
|
255
|
+
export declare function resolveBridgePoolTransportOptions(config: AftConfig): {
|
|
256
|
+
timeoutMs: number;
|
|
257
|
+
hangThreshold: number;
|
|
258
|
+
};
|
|
247
259
|
/**
|
|
248
260
|
* Load AFT config using the same two-level pattern as oh-my-opencode:
|
|
249
261
|
*
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAgCxB,oGAAoG;AACpG,eAAO,MAAM,6BAA6B;;;;EAAmC,CAAC;AAC9E,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AA4CtF,eAAO,MAAM,eAAe;;;;;;;;;iBAE1B,CAAC;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAgCxB,oGAAoG;AACpG,eAAO,MAAM,6BAA6B;;;;EAAmC,CAAC;AAC9E,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AA4CtF,eAAO,MAAM,eAAe;;;;;;;;;iBAE1B,CAAC;AA2IH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAmGjB,CAAC;AAEZ,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE9D,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,2EAA2E;IAC3E,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ACH,yBAAyB,EAAE,MAAM,CAAC;CACnC;AAED,iEAAiE;AACjE,eAAO,MAAM,iCAAiC,OAAQ,CAAC;AACvD,4EAA4E;AAC5E,eAAO,MAAM,6BAA6B,OAAQ,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,GAAG,kBAAkB,CA0FvE;AAED,wBAAgB,qCAAqC,CACnD,MAAM,EAAE,SAAS,GAChB,8BAA8B,CAsBhC;AAED,KAAK,MAAM,GAAG;IACZ,GAAG,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACjC,CAAC;AAoMF,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,MAAM,EAClB,MAAM,GAAE,MAAsB,GAC7B;IAAE,QAAQ,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,CAwD1C;AA0YD,8DAA8D;AAC9D,eAAO,MAAM,iCAAiC,QAAS,CAAC;AACxD,eAAO,MAAM,6BAA6B,IAAI,CAAC;AAE/C,8EAA8E;AAC9E,wBAAgB,iCAAiC,CAAC,MAAM,EAAE,SAAS,GAAG;IACpE,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;CACvB,CAKA;AAqBD;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAiDjE"}
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAmNlD;;;;;;;;;;;;;;;;GAgBG;AAQH,QAAA,MAAM,MAAM,EAAE,MAA6D,CAAC;AAu5B5E,eAAe,MAAM,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -11939,6 +11939,11 @@ var LONG_RUNNING_COMMAND_TIMEOUT_MS = {
|
|
|
11939
11939
|
function timeoutForCommand(command) {
|
|
11940
11940
|
return LONG_RUNNING_COMMAND_TIMEOUT_MS[command];
|
|
11941
11941
|
}
|
|
11942
|
+
var PASSIVE_COMMANDS = new Set(["status"]);
|
|
11943
|
+
var PASSIVE_COMMAND_TIMEOUT_MS = 5000;
|
|
11944
|
+
function isPassiveCommand(command) {
|
|
11945
|
+
return PASSIVE_COMMANDS.has(command);
|
|
11946
|
+
}
|
|
11942
11947
|
|
|
11943
11948
|
// ../aft-bridge/dist/status-bar.js
|
|
11944
11949
|
var STATUS_BAR_HEARTBEAT_CALLS = 15;
|
|
@@ -12016,6 +12021,11 @@ function bashTaskIdFrom(response) {
|
|
|
12016
12021
|
function tagStderrLine(line) {
|
|
12017
12022
|
return /^\[aft(-\w+)?\] /.test(line) ? line : `[aft] ${line}`;
|
|
12018
12023
|
}
|
|
12024
|
+
var BENIGN_CPUINFO_PROC_CPUINFO_PARSE_FAILURE = "failed to parse processor information from /proc/cpuinfo";
|
|
12025
|
+
function shouldSurfaceStderrLine(line) {
|
|
12026
|
+
const normalized = line.trim();
|
|
12027
|
+
return !(normalized === `Error in cpuinfo: ${BENIGN_CPUINFO_PROC_CPUINFO_PARSE_FAILURE}` || normalized === BENIGN_CPUINFO_PROC_CPUINFO_PARSE_FAILURE);
|
|
12028
|
+
}
|
|
12019
12029
|
function compareSemver(a, b) {
|
|
12020
12030
|
const [aMain, aPre] = a.split("-", 2);
|
|
12021
12031
|
const [bMain, bPre] = b.split("-", 2);
|
|
@@ -12107,6 +12117,7 @@ class BinaryBridge {
|
|
|
12107
12117
|
_restartCount = 0;
|
|
12108
12118
|
_shuttingDown = false;
|
|
12109
12119
|
timeoutMs;
|
|
12120
|
+
hangThreshold;
|
|
12110
12121
|
maxRestarts;
|
|
12111
12122
|
configured = false;
|
|
12112
12123
|
_configurePromise = null;
|
|
@@ -12131,6 +12142,7 @@ class BinaryBridge {
|
|
|
12131
12142
|
this.binaryPath = binaryPath;
|
|
12132
12143
|
this.cwd = cwd;
|
|
12133
12144
|
this.timeoutMs = options?.timeoutMs ?? DEFAULT_BRIDGE_TIMEOUT_MS;
|
|
12145
|
+
this.hangThreshold = options?.hangThreshold ?? BRIDGE_HANG_TIMEOUT_THRESHOLD;
|
|
12134
12146
|
this.maxRestarts = options?.maxRestarts ?? 3;
|
|
12135
12147
|
this.configOverrides = clampSemanticTimeout(configOverrides ?? {}, this.timeoutMs);
|
|
12136
12148
|
this.minVersion = options?.minVersion;
|
|
@@ -12248,7 +12260,9 @@ class BinaryBridge {
|
|
|
12248
12260
|
if (requestSessionId && options?.configureWarningClient !== undefined) {
|
|
12249
12261
|
this.configureWarningClients.set(requestSessionId, options.configureWarningClient);
|
|
12250
12262
|
}
|
|
12251
|
-
const
|
|
12263
|
+
const passive = isPassiveCommand(command);
|
|
12264
|
+
const resolvedTimeoutMs = options?.transportTimeoutMs ?? options?.timeoutMs ?? this.timeoutMs;
|
|
12265
|
+
const effectiveTimeoutMs = passive ? Math.min(resolvedTimeoutMs, PASSIVE_COMMAND_TIMEOUT_MS) : resolvedTimeoutMs;
|
|
12252
12266
|
const implicitTransportOptions = {
|
|
12253
12267
|
...options?.transportTimeoutMs !== undefined || options?.timeoutMs !== undefined ? { transportTimeoutMs: effectiveTimeoutMs } : {},
|
|
12254
12268
|
markConfiguredOnSuccess: false
|
|
@@ -12298,7 +12312,7 @@ class BinaryBridge {
|
|
|
12298
12312
|
}
|
|
12299
12313
|
const line = `${JSON.stringify(request)}
|
|
12300
12314
|
`;
|
|
12301
|
-
const keepBridgeOnTimeout = options?.keepBridgeOnTimeout === true;
|
|
12315
|
+
const keepBridgeOnTimeout = passive || options?.keepBridgeOnTimeout === true;
|
|
12302
12316
|
let requestSentAt = Date.now();
|
|
12303
12317
|
const response = await new Promise((resolve2, reject) => {
|
|
12304
12318
|
const timer = setTimeout(() => {
|
|
@@ -12320,7 +12334,7 @@ class BinaryBridge {
|
|
|
12320
12334
|
const childActiveSinceRequest = this.lastChildActivityAt > requestSentAt;
|
|
12321
12335
|
const consecutiveTimeouts = this.consecutiveRequestTimeouts + 1;
|
|
12322
12336
|
this.consecutiveRequestTimeouts = consecutiveTimeouts;
|
|
12323
|
-
const keepWarm = childActiveSinceRequest || consecutiveTimeouts <
|
|
12337
|
+
const keepWarm = childActiveSinceRequest || consecutiveTimeouts < this.hangThreshold;
|
|
12324
12338
|
const restartSuffix = keepWarm ? " — bridge kept warm" : " — restarting bridge";
|
|
12325
12339
|
const timeoutMsg = `Request "${command}" (id=${id}) timed out after ${effectiveTimeoutMs}ms${restartSuffix}`;
|
|
12326
12340
|
if (requestSessionId) {
|
|
@@ -12615,7 +12629,7 @@ class BinaryBridge {
|
|
|
12615
12629
|
`)) !== -1) {
|
|
12616
12630
|
const line = this.stderrBuffer.slice(0, newlineIdx).replace(/\r$/, "");
|
|
12617
12631
|
this.stderrBuffer = this.stderrBuffer.slice(newlineIdx + 1);
|
|
12618
|
-
if (!line)
|
|
12632
|
+
if (!line || !shouldSurfaceStderrLine(line))
|
|
12619
12633
|
continue;
|
|
12620
12634
|
const tagged = tagStderrLine(line);
|
|
12621
12635
|
this.logVia(tagged);
|
|
@@ -12625,7 +12639,7 @@ class BinaryBridge {
|
|
|
12625
12639
|
flushStderrBuffer() {
|
|
12626
12640
|
const line = this.stderrBuffer.replace(/\r$/, "");
|
|
12627
12641
|
this.stderrBuffer = "";
|
|
12628
|
-
if (!line)
|
|
12642
|
+
if (!line || !shouldSurfaceStderrLine(line))
|
|
12629
12643
|
return;
|
|
12630
12644
|
const tagged = tagStderrLine(line);
|
|
12631
12645
|
this.logVia(tagged);
|
|
@@ -14961,6 +14975,7 @@ class BridgePool {
|
|
|
14961
14975
|
this.projectConfigLoader = options.projectConfigLoader;
|
|
14962
14976
|
this.bridgeOptions = {
|
|
14963
14977
|
timeoutMs: options.timeoutMs,
|
|
14978
|
+
hangThreshold: options.hangThreshold,
|
|
14964
14979
|
maxRestarts: options.maxRestarts,
|
|
14965
14980
|
minVersion: options.minVersion,
|
|
14966
14981
|
onVersionMismatch: options.onVersionMismatch,
|
|
@@ -15787,7 +15802,7 @@ async function triggerWakeIfPending(drainContext, skipDrain, includeDeferredComp
|
|
|
15787
15802
|
const promptContext = await resolvePromptContext(client, drainContext.sessionID);
|
|
15788
15803
|
const body = {
|
|
15789
15804
|
noReply: false,
|
|
15790
|
-
parts: [{ type: "text", text: reminder }]
|
|
15805
|
+
parts: [{ type: "text", text: reminder, synthetic: true }]
|
|
15791
15806
|
};
|
|
15792
15807
|
if (promptContext?.agent)
|
|
15793
15808
|
body.agent = promptContext.agent;
|
|
@@ -29871,6 +29886,10 @@ var BashFeaturesSchema = exports_external.object({
|
|
|
29871
29886
|
foreground_wait_window_ms: exports_external.number().int().positive().optional()
|
|
29872
29887
|
});
|
|
29873
29888
|
var BashConfigSchema = exports_external.union([exports_external.boolean(), BashFeaturesSchema]);
|
|
29889
|
+
var BridgeConfigSchema = exports_external.object({
|
|
29890
|
+
request_timeout_ms: exports_external.number().int().min(1000, { message: "bridge.request_timeout_ms must be at least 1000" }).optional(),
|
|
29891
|
+
hang_threshold: exports_external.number().int().min(1, { message: "bridge.hang_threshold must be at least 1" }).optional()
|
|
29892
|
+
});
|
|
29874
29893
|
var InspectConfigSchema = exports_external.object({
|
|
29875
29894
|
enabled: exports_external.boolean().optional(),
|
|
29876
29895
|
tier2_idle_minutes: exports_external.number().min(0).optional(),
|
|
@@ -29910,7 +29929,8 @@ var AftConfigSchema = exports_external.object({
|
|
|
29910
29929
|
url_fetch_allow_private: exports_external.boolean().optional(),
|
|
29911
29930
|
semantic: SemanticConfigSchema.optional(),
|
|
29912
29931
|
max_callgraph_files: exports_external.number().int().positive().optional(),
|
|
29913
|
-
auto_update: exports_external.boolean().optional()
|
|
29932
|
+
auto_update: exports_external.boolean().optional(),
|
|
29933
|
+
bridge: BridgeConfigSchema.optional()
|
|
29914
29934
|
}).strict();
|
|
29915
29935
|
function normalizeLspExtension(extension) {
|
|
29916
29936
|
return extension.trim().replace(/^\.+/, "");
|
|
@@ -30420,6 +30440,8 @@ function getStrippedTopLevelKeys(override) {
|
|
|
30420
30440
|
stripped.push("max_callgraph_files");
|
|
30421
30441
|
if (override.auto_update !== undefined)
|
|
30422
30442
|
stripped.push("auto_update");
|
|
30443
|
+
if (override.bridge !== undefined)
|
|
30444
|
+
stripped.push("bridge");
|
|
30423
30445
|
return stripped;
|
|
30424
30446
|
}
|
|
30425
30447
|
function mergeConfigs(base, override) {
|
|
@@ -30431,6 +30453,7 @@ function mergeConfigs(base, override) {
|
|
|
30431
30453
|
const experimental = mergeExperimentalConfig(base.experimental, override.experimental);
|
|
30432
30454
|
const bash = mergeBashConfig(base.bash, override.bash);
|
|
30433
30455
|
const inspect = mergeInspectConfig(base.inspect, override.inspect);
|
|
30456
|
+
const bridge = base.bridge;
|
|
30434
30457
|
const safeOverride = pickProjectSafeFields(override);
|
|
30435
30458
|
delete safeOverride.bash;
|
|
30436
30459
|
delete safeOverride.inspect;
|
|
@@ -30444,9 +30467,18 @@ function mergeConfigs(base, override) {
|
|
|
30444
30467
|
...inspect !== undefined ? { inspect } : {},
|
|
30445
30468
|
experimental,
|
|
30446
30469
|
semantic,
|
|
30470
|
+
...bridge !== undefined ? { bridge } : {},
|
|
30447
30471
|
...disabledTools.length > 0 ? { disabled_tools: [...new Set(disabledTools)] } : {}
|
|
30448
30472
|
};
|
|
30449
30473
|
}
|
|
30474
|
+
var DEFAULT_BRIDGE_REQUEST_TIMEOUT_MS = 30000;
|
|
30475
|
+
var DEFAULT_BRIDGE_HANG_THRESHOLD = 2;
|
|
30476
|
+
function resolveBridgePoolTransportOptions(config2) {
|
|
30477
|
+
return {
|
|
30478
|
+
timeoutMs: config2.bridge?.request_timeout_ms ?? DEFAULT_BRIDGE_REQUEST_TIMEOUT_MS,
|
|
30479
|
+
hangThreshold: config2.bridge?.hang_threshold ?? DEFAULT_BRIDGE_HANG_THRESHOLD
|
|
30480
|
+
};
|
|
30481
|
+
}
|
|
30450
30482
|
function getOpenCodeConfigDir() {
|
|
30451
30483
|
const envDir = process.env.OPENCODE_CONFIG_DIR?.trim();
|
|
30452
30484
|
if (envDir) {
|
|
@@ -38207,13 +38239,42 @@ function searchPathExists(projectRoot, target) {
|
|
|
38207
38239
|
}
|
|
38208
38240
|
function splitSearchPathArg(projectRoot, raw) {
|
|
38209
38241
|
if (searchPathExists(projectRoot, raw) || !/\s/.test(raw)) {
|
|
38210
|
-
return [raw];
|
|
38242
|
+
return { paths: [raw], missing: [] };
|
|
38211
38243
|
}
|
|
38212
38244
|
const fragments = raw.trim().split(/\s+/).filter(Boolean);
|
|
38213
|
-
if (fragments.length < 2
|
|
38214
|
-
return [raw];
|
|
38245
|
+
if (fragments.length < 2) {
|
|
38246
|
+
return { paths: [raw], missing: [] };
|
|
38247
|
+
}
|
|
38248
|
+
const existing = [];
|
|
38249
|
+
const missing = [];
|
|
38250
|
+
for (const fragment of fragments) {
|
|
38251
|
+
if (searchPathExists(projectRoot, fragment)) {
|
|
38252
|
+
existing.push(fragment);
|
|
38253
|
+
} else {
|
|
38254
|
+
missing.push(fragment);
|
|
38255
|
+
}
|
|
38256
|
+
}
|
|
38257
|
+
if (existing.length === 0) {
|
|
38258
|
+
return { paths: [raw], missing: [] };
|
|
38215
38259
|
}
|
|
38216
|
-
return
|
|
38260
|
+
return { paths: existing, missing };
|
|
38261
|
+
}
|
|
38262
|
+
function bridgeSearchPathArg(projectRoot, split) {
|
|
38263
|
+
return split.paths.map((target) => absoluteSearchPath(projectRoot, target)).join(" ");
|
|
38264
|
+
}
|
|
38265
|
+
function formatSkippedSearchPaths(missing) {
|
|
38266
|
+
if (missing.length === 0)
|
|
38267
|
+
return;
|
|
38268
|
+
const noun = missing.length === 1 ? "path" : "paths";
|
|
38269
|
+
return `Skipped ${missing.length} ${noun} not found: ${missing.join(", ")}`;
|
|
38270
|
+
}
|
|
38271
|
+
function appendSkippedSearchPaths(text, missing) {
|
|
38272
|
+
const note = formatSkippedSearchPaths(missing);
|
|
38273
|
+
if (!note)
|
|
38274
|
+
return text;
|
|
38275
|
+
return text.length > 0 ? `${text}
|
|
38276
|
+
|
|
38277
|
+
${note}` : note;
|
|
38217
38278
|
}
|
|
38218
38279
|
function searchPathKind(projectRoot, target, defaultKind) {
|
|
38219
38280
|
try {
|
|
@@ -38226,8 +38287,8 @@ function searchPathKind(projectRoot, target, defaultKind) {
|
|
|
38226
38287
|
return defaultKind;
|
|
38227
38288
|
}
|
|
38228
38289
|
}
|
|
38229
|
-
function searchPathTargets(projectRoot,
|
|
38230
|
-
return
|
|
38290
|
+
function searchPathTargets(projectRoot, split, defaultKind) {
|
|
38291
|
+
return split.paths.map((target) => {
|
|
38231
38292
|
const absoluteTarget = absoluteSearchPath(projectRoot, target);
|
|
38232
38293
|
return {
|
|
38233
38294
|
target: absoluteTarget,
|
|
@@ -38277,16 +38338,17 @@ function searchTools(ctx) {
|
|
|
38277
38338
|
const projectRoot = await resolveProjectRoot(ctx, context);
|
|
38278
38339
|
const pattern = String(args.pattern);
|
|
38279
38340
|
const includeArg = args.include ? String(args.include) : undefined;
|
|
38280
|
-
const pathArg = args.path ?
|
|
38281
|
-
const
|
|
38341
|
+
const pathArg = args.path ? String(args.path) : undefined;
|
|
38342
|
+
const pathSplit = pathArg ? splitSearchPathArg(projectRoot, pathArg) : undefined;
|
|
38343
|
+
const bridgePath = pathSplit ? bridgeSearchPathArg(projectRoot, pathSplit) : undefined;
|
|
38282
38344
|
const grepDenied = await askGrepPermission(context, pattern, {
|
|
38283
38345
|
path: bridgePath,
|
|
38284
38346
|
include: includeArg
|
|
38285
38347
|
});
|
|
38286
38348
|
if (grepDenied)
|
|
38287
38349
|
return permissionDeniedResponse(grepDenied);
|
|
38288
|
-
if (
|
|
38289
|
-
for (const target of searchPathTargets(projectRoot,
|
|
38350
|
+
if (pathSplit) {
|
|
38351
|
+
for (const target of searchPathTargets(projectRoot, pathSplit, "file")) {
|
|
38290
38352
|
const externalDenied = await assertExternalDirectoryPermission(context, target.target, {
|
|
38291
38353
|
kind: target.kind
|
|
38292
38354
|
});
|
|
@@ -38304,7 +38366,10 @@ function searchTools(ctx) {
|
|
|
38304
38366
|
if (response.success === false) {
|
|
38305
38367
|
throw new Error(response.message || "grep failed");
|
|
38306
38368
|
}
|
|
38307
|
-
|
|
38369
|
+
if (pathSplit && pathSplit.missing.length > 0) {
|
|
38370
|
+
response.complete = false;
|
|
38371
|
+
}
|
|
38372
|
+
return appendSkippedSearchPaths(formatGrepOutput(response), pathSplit?.missing ?? []);
|
|
38308
38373
|
}
|
|
38309
38374
|
};
|
|
38310
38375
|
const globTool = {
|
|
@@ -38316,7 +38381,7 @@ function searchTools(ctx) {
|
|
|
38316
38381
|
execute: async (args, context) => {
|
|
38317
38382
|
const projectRoot = await resolveProjectRoot(ctx, context);
|
|
38318
38383
|
let globPattern = expandTilde2(String(args.pattern));
|
|
38319
|
-
let globPath = args.path ?
|
|
38384
|
+
let globPath = args.path ? String(args.path) : undefined;
|
|
38320
38385
|
if (!globPath && globPattern.startsWith("/")) {
|
|
38321
38386
|
const metaIdx = globPattern.search(/[*?{}[\]]/);
|
|
38322
38387
|
if (metaIdx > 0) {
|
|
@@ -38330,12 +38395,13 @@ function searchTools(ctx) {
|
|
|
38330
38395
|
globPattern = path7.basename(globPattern);
|
|
38331
38396
|
}
|
|
38332
38397
|
}
|
|
38333
|
-
const
|
|
38398
|
+
const pathSplit = globPath ? splitSearchPathArg(projectRoot, globPath) : undefined;
|
|
38399
|
+
const bridgePath = pathSplit ? bridgeSearchPathArg(projectRoot, pathSplit) : undefined;
|
|
38400
|
+
const globDenied = await askGlobPermission(context, globPattern, { path: bridgePath });
|
|
38334
38401
|
if (globDenied)
|
|
38335
38402
|
return permissionDeniedResponse(globDenied);
|
|
38336
|
-
|
|
38337
|
-
|
|
38338
|
-
for (const target of searchPathTargets(projectRoot, globPath, "directory")) {
|
|
38403
|
+
if (pathSplit) {
|
|
38404
|
+
for (const target of searchPathTargets(projectRoot, pathSplit, "directory")) {
|
|
38339
38405
|
const externalDenied = await assertExternalDirectoryPermission(context, target.target, {
|
|
38340
38406
|
kind: target.kind
|
|
38341
38407
|
});
|
|
@@ -38350,14 +38416,17 @@ function searchTools(ctx) {
|
|
|
38350
38416
|
if (response.success === false) {
|
|
38351
38417
|
throw new Error(response.message || "glob failed");
|
|
38352
38418
|
}
|
|
38419
|
+
if (pathSplit && pathSplit.missing.length > 0) {
|
|
38420
|
+
response.complete = false;
|
|
38421
|
+
}
|
|
38353
38422
|
if (typeof response.text === "string") {
|
|
38354
|
-
return response.text;
|
|
38423
|
+
return appendSkippedSearchPaths(response.text, pathSplit?.missing ?? []);
|
|
38355
38424
|
}
|
|
38356
38425
|
if (Array.isArray(response.files)) {
|
|
38357
|
-
return response.files.join(`
|
|
38358
|
-
`);
|
|
38426
|
+
return appendSkippedSearchPaths(response.files.join(`
|
|
38427
|
+
`), pathSplit?.missing ?? []);
|
|
38359
38428
|
}
|
|
38360
|
-
return response.text || JSON.stringify(response);
|
|
38429
|
+
return appendSkippedSearchPaths(response.text || JSON.stringify(response), pathSplit?.missing ?? []);
|
|
38361
38430
|
}
|
|
38362
38431
|
};
|
|
38363
38432
|
const hoisting = ctx.config.hoist_builtin_tools !== false;
|
|
@@ -38672,6 +38741,7 @@ ${lines}
|
|
|
38672
38741
|
}
|
|
38673
38742
|
const versionUpgradePromises = new Map;
|
|
38674
38743
|
const poolOptions = {
|
|
38744
|
+
...resolveBridgePoolTransportOptions(aftConfig),
|
|
38675
38745
|
errorPrefix: "[aft-plugin]",
|
|
38676
38746
|
minVersion: PLUGIN_VERSION,
|
|
38677
38747
|
projectConfigLoader: (projectRoot) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../src/tools/search.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../src/tools/search.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAuJjD;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CA0BrD;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CA4J9E"}
|
package/dist/tui.js
CHANGED
|
@@ -7790,7 +7790,7 @@ var require_src2 = __commonJS((exports, module) => {
|
|
|
7790
7790
|
// src/tui/index.tsx
|
|
7791
7791
|
import { createMemo as createMemo2, createSignal as createSignal2, onCleanup as onCleanup2 } from "solid-js";
|
|
7792
7792
|
// package.json
|
|
7793
|
-
var version = "0.39.
|
|
7793
|
+
var version = "0.39.2";
|
|
7794
7794
|
|
|
7795
7795
|
// src/shared/rpc-client.ts
|
|
7796
7796
|
import { existsSync, readdirSync, readFileSync, unlinkSync } from "node:fs";
|
|
@@ -8584,6 +8584,19 @@ function collapsedCompressionValue(compression) {
|
|
|
8584
8584
|
const pct = original_tokens > 0 ? Math.round(savings_tokens / original_tokens * 100) : 0;
|
|
8585
8585
|
return `${formatCount(savings_tokens)} / ${pct}%`;
|
|
8586
8586
|
}
|
|
8587
|
+
function degradedReasonLabel(reason) {
|
|
8588
|
+
if (reason === "home_root") {
|
|
8589
|
+
return "project root is your home directory";
|
|
8590
|
+
}
|
|
8591
|
+
if (reason.startsWith("search_too_many_files:")) {
|
|
8592
|
+
const threshold = reason.split(":")[1] ?? "20000";
|
|
8593
|
+
return `project exceeds ${threshold} files`;
|
|
8594
|
+
}
|
|
8595
|
+
if (reason === "watcher_unavailable") {
|
|
8596
|
+
return "file watcher unavailable; continuing without live external-change invalidation";
|
|
8597
|
+
}
|
|
8598
|
+
return reason;
|
|
8599
|
+
}
|
|
8587
8600
|
function collapsedHealthLights(statusBar) {
|
|
8588
8601
|
if (!statusBar)
|
|
8589
8602
|
return null;
|
|
@@ -8795,16 +8808,6 @@ var SidebarContent = (props) => {
|
|
|
8795
8808
|
const semanticBytes = () => s()?.disk?.semantic_disk_bytes ?? 0;
|
|
8796
8809
|
const compressionRows = () => formatCompressionSidebarRows(s()?.compression);
|
|
8797
8810
|
const statusBar = () => s()?.status_bar;
|
|
8798
|
-
const degradedReasonLabel = (reason) => {
|
|
8799
|
-
if (reason === "home_root") {
|
|
8800
|
-
return "project root is your home directory";
|
|
8801
|
-
}
|
|
8802
|
-
if (reason.startsWith("search_too_many_files:")) {
|
|
8803
|
-
const threshold = reason.split(":")[1] ?? "20000";
|
|
8804
|
-
return `project exceeds ${threshold} files`;
|
|
8805
|
-
}
|
|
8806
|
-
return reason;
|
|
8807
|
-
};
|
|
8808
8811
|
const degradedSummary = () => {
|
|
8809
8812
|
const snap = s();
|
|
8810
8813
|
if (!snap?.degraded)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cortexkit/aft-opencode",
|
|
3
|
-
"version": "0.39.
|
|
3
|
+
"version": "0.39.2",
|
|
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",
|
|
@@ -30,19 +30,19 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@clack/prompts": "^1.2.0",
|
|
33
|
-
"@cortexkit/aft-bridge": "0.39.
|
|
33
|
+
"@cortexkit/aft-bridge": "0.39.2",
|
|
34
34
|
"@xterm/headless": "^5.5.0",
|
|
35
35
|
"comment-json": "^4.6.2",
|
|
36
36
|
"undici": "^7.25.0",
|
|
37
37
|
"zod": "^4.1.8"
|
|
38
38
|
},
|
|
39
39
|
"optionalDependencies": {
|
|
40
|
-
"@cortexkit/aft-darwin-arm64": "0.39.
|
|
41
|
-
"@cortexkit/aft-darwin-x64": "0.39.
|
|
42
|
-
"@cortexkit/aft-linux-arm64": "0.39.
|
|
43
|
-
"@cortexkit/aft-linux-x64": "0.39.
|
|
44
|
-
"@cortexkit/aft-win32-arm64": "0.39.
|
|
45
|
-
"@cortexkit/aft-win32-x64": "0.39.
|
|
40
|
+
"@cortexkit/aft-darwin-arm64": "0.39.2",
|
|
41
|
+
"@cortexkit/aft-darwin-x64": "0.39.2",
|
|
42
|
+
"@cortexkit/aft-linux-arm64": "0.39.2",
|
|
43
|
+
"@cortexkit/aft-linux-x64": "0.39.2",
|
|
44
|
+
"@cortexkit/aft-win32-arm64": "0.39.2",
|
|
45
|
+
"@cortexkit/aft-win32-x64": "0.39.2"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@opencode-ai/plugin": "^1.15.11",
|
package/src/tui/sidebar.tsx
CHANGED
|
@@ -194,6 +194,25 @@ export function collapsedCompressionValue(
|
|
|
194
194
|
|
|
195
195
|
export type HealthLightTone = "ok" | "warn" | "err";
|
|
196
196
|
|
|
197
|
+
// Degraded-mode reason → human-readable hint. Distinct strings per reason
|
|
198
|
+
// because the UX direction is different: "home_root" tells the user to open a
|
|
199
|
+
// real project subdirectory, "search_too_many_files" tells them the tree is too
|
|
200
|
+
// big for full indexing, and "watcher_unavailable" is an honest soft
|
|
201
|
+
// degradation (AFT continues without live external-change invalidation).
|
|
202
|
+
export function degradedReasonLabel(reason: string): string {
|
|
203
|
+
if (reason === "home_root") {
|
|
204
|
+
return "project root is your home directory";
|
|
205
|
+
}
|
|
206
|
+
if (reason.startsWith("search_too_many_files:")) {
|
|
207
|
+
const threshold = reason.split(":")[1] ?? "20000";
|
|
208
|
+
return `project exceeds ${threshold} files`;
|
|
209
|
+
}
|
|
210
|
+
if (reason === "watcher_unavailable") {
|
|
211
|
+
return "file watcher unavailable; continuing without live external-change invalidation";
|
|
212
|
+
}
|
|
213
|
+
return reason; // unknown reason — surface verbatim so users can grep logs
|
|
214
|
+
}
|
|
215
|
+
|
|
197
216
|
export interface HealthLights {
|
|
198
217
|
// Diagnostics: red if any errors, yellow if any warnings, else green.
|
|
199
218
|
diagnostics: HealthLightTone;
|
|
@@ -543,20 +562,6 @@ const SidebarContent = (props: {
|
|
|
543
562
|
const compressionRows = () => formatCompressionSidebarRows(s()?.compression);
|
|
544
563
|
const statusBar = () => s()?.status_bar;
|
|
545
564
|
|
|
546
|
-
// Degraded-mode reason → human-readable hint. Distinct strings per reason
|
|
547
|
-
// because the UX direction is different: "home_root" tells the user to
|
|
548
|
-
// open a real project subdirectory, "search_too_many_files" tells them the
|
|
549
|
-
// tree is too big for full indexing.
|
|
550
|
-
const degradedReasonLabel = (reason: string): string => {
|
|
551
|
-
if (reason === "home_root") {
|
|
552
|
-
return "project root is your home directory";
|
|
553
|
-
}
|
|
554
|
-
if (reason.startsWith("search_too_many_files:")) {
|
|
555
|
-
const threshold = reason.split(":")[1] ?? "20000";
|
|
556
|
-
return `project exceeds ${threshold} files`;
|
|
557
|
-
}
|
|
558
|
-
return reason; // unknown reason — surface verbatim so users can grep logs
|
|
559
|
-
};
|
|
560
565
|
const degradedSummary = () => {
|
|
561
566
|
const snap = s();
|
|
562
567
|
if (!snap?.degraded) return null;
|