@cortexkit/aft-opencode 0.47.1 → 0.47.3
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/config.d.ts +5 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/index.js +141 -62
- package/dist/shared/status.d.ts +5 -0
- package/dist/shared/status.d.ts.map +1 -1
- package/dist/tools/bash.d.ts.map +1 -1
- package/dist/tools/bash_watch.d.ts +1 -0
- package/dist/tools/bash_watch.d.ts.map +1 -1
- package/package.json +8 -8
- package/src/shared/status.ts +11 -0
package/dist/config.d.ts
CHANGED
|
@@ -71,6 +71,11 @@ export declare const AftConfigSchema: z.ZodPreprocess<z.ZodObject<{
|
|
|
71
71
|
max_depth: z.ZodOptional<z.ZodNumber>;
|
|
72
72
|
max_file_size: z.ZodOptional<z.ZodNumber>;
|
|
73
73
|
}, z.core.$strip>>;
|
|
74
|
+
sandbox: z.ZodOptional<z.ZodObject<{
|
|
75
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
76
|
+
write_allow: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
77
|
+
read_deny: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
78
|
+
}, z.core.$strip>>;
|
|
74
79
|
bash: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
75
80
|
rewrite: z.ZodOptional<z.ZodBoolean>;
|
|
76
81
|
compress: z.ZodOptional<z.ZodBoolean>;
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,4BAA4B,EACjC,KAAK,UAAU,EAQhB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAiCxB,oGAAoG;AACpG,eAAO,MAAM,6BAA6B;;;;EAAmC,CAAC;AAC9E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SAAS,CAoCjE"}
|
package/dist/index.js
CHANGED
|
@@ -14328,6 +14328,9 @@ class SubcTransportPool {
|
|
|
14328
14328
|
if (record.routeEntry === entry2) {
|
|
14329
14329
|
entry2.closed = true;
|
|
14330
14330
|
record.routeEntry = null;
|
|
14331
|
+
if (entry2.handle != null) {
|
|
14332
|
+
safeCloseRoute(entry2.client, entry2.handle);
|
|
14333
|
+
}
|
|
14331
14334
|
}
|
|
14332
14335
|
};
|
|
14333
14336
|
const handleRequestFailure = (err, entry2) => {
|
|
@@ -30137,6 +30140,11 @@ var BashFeaturesSchema = exports_external.object({
|
|
|
30137
30140
|
foreground_wait_window_ms: exports_external.number().int().positive().optional()
|
|
30138
30141
|
});
|
|
30139
30142
|
var BashConfigSchema = exports_external.union([exports_external.boolean(), BashFeaturesSchema]);
|
|
30143
|
+
var SandboxConfigSchema = exports_external.object({
|
|
30144
|
+
enabled: exports_external.boolean().optional(),
|
|
30145
|
+
write_allow: exports_external.array(exports_external.string()).optional(),
|
|
30146
|
+
read_deny: exports_external.array(exports_external.string()).optional()
|
|
30147
|
+
});
|
|
30140
30148
|
var BridgeConfigSchema = exports_external.object({
|
|
30141
30149
|
request_timeout_ms: exports_external.number().int().min(1000, { message: "bridge.request_timeout_ms must be at least 1000" }).optional(),
|
|
30142
30150
|
hang_threshold: exports_external.number().int().min(1, { message: "bridge.hang_threshold must be at least 1" }).optional()
|
|
@@ -30178,6 +30186,7 @@ var AftConfigSchema = exports_external.preprocess((value) => stripHarnessSpecifi
|
|
|
30178
30186
|
callgraph_chunk_size: exports_external.number().optional(),
|
|
30179
30187
|
inspect: InspectConfigSchema.optional(),
|
|
30180
30188
|
backup: BackupConfigSchema.optional(),
|
|
30189
|
+
sandbox: SandboxConfigSchema.optional(),
|
|
30181
30190
|
bash: BashConfigSchema.optional(),
|
|
30182
30191
|
experimental: ExperimentalConfigSchema.optional(),
|
|
30183
30192
|
lsp: LspConfigSchema.optional(),
|
|
@@ -30511,6 +30520,15 @@ function mergeInspectConfig(baseInspect, overrideInspect) {
|
|
|
30511
30520
|
}
|
|
30512
30521
|
return Object.fromEntries(Object.entries(inspect).filter(([, value]) => value !== undefined));
|
|
30513
30522
|
}
|
|
30523
|
+
function mergeSandboxConfig(base, project) {
|
|
30524
|
+
const readDeny = [...new Set([...base?.read_deny ?? [], ...project?.read_deny ?? []])];
|
|
30525
|
+
const merged = {
|
|
30526
|
+
...base,
|
|
30527
|
+
...readDeny.length > 0 ? { read_deny: readDeny } : {},
|
|
30528
|
+
...project?.enabled === true ? { enabled: true } : {}
|
|
30529
|
+
};
|
|
30530
|
+
return Object.keys(merged).length > 0 ? merged : undefined;
|
|
30531
|
+
}
|
|
30514
30532
|
function mergeBashConfig(baseBash, overrideBash) {
|
|
30515
30533
|
if (baseBash === undefined && overrideBash === undefined)
|
|
30516
30534
|
return;
|
|
@@ -30599,6 +30617,10 @@ function getStrippedTopLevelKeys(override) {
|
|
|
30599
30617
|
stripped.push("bridge");
|
|
30600
30618
|
if (override.backup !== undefined)
|
|
30601
30619
|
stripped.push("backup");
|
|
30620
|
+
if (override.sandbox?.enabled === false)
|
|
30621
|
+
stripped.push("sandbox.enabled");
|
|
30622
|
+
if (override.sandbox?.write_allow !== undefined)
|
|
30623
|
+
stripped.push("sandbox.write_allow");
|
|
30602
30624
|
if (override.subc !== undefined)
|
|
30603
30625
|
stripped.push("subc");
|
|
30604
30626
|
if (override.disabled_tools?.includes("aft_safety"))
|
|
@@ -30617,6 +30639,7 @@ function mergeConfigs(base, override) {
|
|
|
30617
30639
|
const experimental = mergeExperimentalConfig(base.experimental, override.experimental);
|
|
30618
30640
|
const bash = mergeBashConfig(base.bash, override.bash);
|
|
30619
30641
|
const inspect = mergeInspectConfig(base.inspect, override.inspect);
|
|
30642
|
+
const sandbox = mergeSandboxConfig(base.sandbox, override.sandbox);
|
|
30620
30643
|
const bridge = base.bridge;
|
|
30621
30644
|
const safeOverride = pickProjectSafeFields(override);
|
|
30622
30645
|
delete safeOverride.bash;
|
|
@@ -30629,6 +30652,7 @@ function mergeConfigs(base, override) {
|
|
|
30629
30652
|
...lsp ? { lsp } : {},
|
|
30630
30653
|
...bash !== undefined ? { bash } : {},
|
|
30631
30654
|
...inspect !== undefined ? { inspect } : {},
|
|
30655
|
+
...sandbox !== undefined ? { sandbox } : {},
|
|
30632
30656
|
experimental,
|
|
30633
30657
|
semantic,
|
|
30634
30658
|
...bridge !== undefined ? { bridge } : {},
|
|
@@ -34324,6 +34348,7 @@ function coerceAftStatus(response) {
|
|
|
34324
34348
|
};
|
|
34325
34349
|
const disk = asRecord(response.disk);
|
|
34326
34350
|
const symbolCache = asRecord(response.symbol_cache);
|
|
34351
|
+
const runtime = asRecord(response.runtime);
|
|
34327
34352
|
const session = asRecord(response.session);
|
|
34328
34353
|
return {
|
|
34329
34354
|
version: readString(response.version, "unknown"),
|
|
@@ -34363,6 +34388,11 @@ function coerceAftStatus(response) {
|
|
|
34363
34388
|
semantic_disk_bytes: readNumber(disk.semantic_disk_bytes)
|
|
34364
34389
|
},
|
|
34365
34390
|
lsp_servers: readNumber(response.lsp_servers),
|
|
34391
|
+
runtime: {
|
|
34392
|
+
live_watchers: readNumber(runtime.live_watchers),
|
|
34393
|
+
live_actor_roots: readNumber(runtime.live_actor_roots),
|
|
34394
|
+
open_routes: readNumber(runtime.open_routes)
|
|
34395
|
+
},
|
|
34366
34396
|
symbol_cache: {
|
|
34367
34397
|
local_entries: readNumber(symbolCache.local_entries),
|
|
34368
34398
|
warm_entries: readNumber(symbolCache.warm_entries)
|
|
@@ -35104,8 +35134,8 @@ function groupBashPermissionAsks(asks) {
|
|
|
35104
35134
|
bashAsk = { kind: "bash", patterns: [], always: [] };
|
|
35105
35135
|
grouped.push(bashAsk);
|
|
35106
35136
|
}
|
|
35107
|
-
pushUnique(bashAsk.patterns, ask.patterns);
|
|
35108
|
-
pushUnique(bashAsk.always, ask.always);
|
|
35137
|
+
pushUnique(bashAsk.patterns ?? [], ask.patterns ?? []);
|
|
35138
|
+
pushUnique(bashAsk.always ?? [], ask.always ?? []);
|
|
35109
35139
|
continue;
|
|
35110
35140
|
}
|
|
35111
35141
|
grouped.push(ask);
|
|
@@ -35113,27 +35143,53 @@ function groupBashPermissionAsks(asks) {
|
|
|
35113
35143
|
return grouped;
|
|
35114
35144
|
}
|
|
35115
35145
|
function permissionsGrantedForRetry(asks) {
|
|
35116
|
-
return asks.flatMap((ask) =>
|
|
35146
|
+
return asks.flatMap((ask) => {
|
|
35147
|
+
if (ask.kind === "escalation")
|
|
35148
|
+
return ask.grant_id ? [ask.grant_id] : [];
|
|
35149
|
+
const always = ask.always ?? [];
|
|
35150
|
+
return always.length > 0 ? always : ask.patterns ?? [];
|
|
35151
|
+
});
|
|
35152
|
+
}
|
|
35153
|
+
function escalationAskText(ask) {
|
|
35154
|
+
return `This command will run UNSANDBOXED on the host.
|
|
35155
|
+
|
|
35156
|
+
Exact command:
|
|
35157
|
+
${ask.command ?? ""}
|
|
35158
|
+
|
|
35159
|
+
Working directory:
|
|
35160
|
+
${ask.cwd ?? ""}`;
|
|
35117
35161
|
}
|
|
35118
35162
|
async function withPermissionLoop(ctx, runtime, params, bridgeCall, options) {
|
|
35119
|
-
const
|
|
35120
|
-
|
|
35121
|
-
|
|
35122
|
-
|
|
35123
|
-
|
|
35124
|
-
const
|
|
35125
|
-
|
|
35126
|
-
permission
|
|
35127
|
-
|
|
35128
|
-
|
|
35129
|
-
|
|
35130
|
-
|
|
35131
|
-
|
|
35132
|
-
|
|
35133
|
-
|
|
35134
|
-
|
|
35163
|
+
const granted = Array.isArray(params.permissions_granted) ? params.permissions_granted.filter((value) => typeof value === "string") : [];
|
|
35164
|
+
let response = await bridgeCall(ctx, runtime, "bash", params, options);
|
|
35165
|
+
for (let round = 0;round < 8; round++) {
|
|
35166
|
+
if (response.success !== false || response.code !== "permission_required")
|
|
35167
|
+
return response;
|
|
35168
|
+
const asks = Array.isArray(response.asks) ? response.asks : [];
|
|
35169
|
+
if (asks.length === 0)
|
|
35170
|
+
throw new Error("bash permission retry failed: no asks returned");
|
|
35171
|
+
for (const ask of groupBashPermissionAsks(asks)) {
|
|
35172
|
+
const permission = ask.kind === "external_directory" ? "external_directory" : "bash";
|
|
35173
|
+
const escalation = ask.kind === "escalation";
|
|
35174
|
+
await runAsk(runtime.ask({
|
|
35175
|
+
permission,
|
|
35176
|
+
patterns: escalation ? [escalationAskText(ask)] : ask.patterns ?? [],
|
|
35177
|
+
always: escalation ? [] : ask.always ?? [],
|
|
35178
|
+
metadata: escalation ? {
|
|
35179
|
+
command: ask.command ?? "",
|
|
35180
|
+
cwd: ask.cwd ?? "",
|
|
35181
|
+
grant_id: ask.grant_id ?? "",
|
|
35182
|
+
unsandboxed: true
|
|
35183
|
+
} : {}
|
|
35184
|
+
}));
|
|
35185
|
+
}
|
|
35186
|
+
for (const grant of permissionsGrantedForRetry(asks)) {
|
|
35187
|
+
if (!granted.includes(grant))
|
|
35188
|
+
granted.push(grant);
|
|
35189
|
+
}
|
|
35190
|
+
response = await bridgeCall(ctx, runtime, "bash", { ...params, permissions_granted: granted }, options);
|
|
35135
35191
|
}
|
|
35136
|
-
|
|
35192
|
+
throw new Error("bash permission retry failed: too many rounds");
|
|
35137
35193
|
}
|
|
35138
35194
|
function createBashTool(ctx, aftSearchRegisteredOverride) {
|
|
35139
35195
|
const initialBashCfg = resolveBashConfig(ctx.config);
|
|
@@ -35151,6 +35207,7 @@ function createBashTool(ctx, aftSearchRegisteredOverride) {
|
|
|
35151
35207
|
workdir: z4.string().optional().describe("Working directory for command execution. Relative paths resolve through the bridge; defaults to the current tool context/project root when omitted."),
|
|
35152
35208
|
description: z4.string().optional().describe("Short 5-10 word human-readable summary shown in OpenCode UI metadata instead of raw shell syntax."),
|
|
35153
35209
|
wait: z4.boolean().optional().describe("When true, run in the foreground without auto-promoting and wait until the command finishes or reaches its timeout; if you send a new message, the wait detaches to background. Use only when you know the result is required before doing anything else."),
|
|
35210
|
+
sandbox: z4.literal("host").optional().describe("Request one-command approval to run unsandboxed on the host; use only when native sandboxing blocks required work, and note that it is a no-op when sandboxing is disabled."),
|
|
35154
35211
|
...backgroundFlagArg,
|
|
35155
35212
|
compressed: z4.boolean().optional().describe("When true or omitted, return compressed output with noisy terminal control sequences reduced. Set to false for raw output."),
|
|
35156
35213
|
...ptyArgs
|
|
@@ -35213,7 +35270,8 @@ function createBashTool(ctx, aftSearchRegisteredOverride) {
|
|
|
35213
35270
|
permissions_requested: true,
|
|
35214
35271
|
foreground_orchestrate: true,
|
|
35215
35272
|
block_to_completion: blockToCompletion,
|
|
35216
|
-
wait: requestedWait
|
|
35273
|
+
wait: requestedWait,
|
|
35274
|
+
sandbox: args2.sandbox
|
|
35217
35275
|
}, callBashBridge, {
|
|
35218
35276
|
transportTimeoutMs: orchestratedTransportTimeoutMs(blockToCompletion, requestedWait, effectiveTimeout, foregroundWaitMs),
|
|
35219
35277
|
onProgress: ({ text }) => {
|
|
@@ -35509,8 +35567,9 @@ function formatWatchResultText(taskId, data, waited) {
|
|
|
35509
35567
|
let text = `Task ${taskId}: ${status}${exit}${dur}`;
|
|
35510
35568
|
if (waited) {
|
|
35511
35569
|
if (waited.reason === "matched") {
|
|
35570
|
+
const stream = waited.match_stream ? ` in ${waited.match_stream}` : "";
|
|
35512
35571
|
text += `
|
|
35513
|
-
Waited ${waited.elapsed_ms}ms; matched ${JSON.stringify(waited.match ?? "")} at offset ${waited.match_offset ?? 0}.`;
|
|
35572
|
+
Waited ${waited.elapsed_ms}ms; matched ${JSON.stringify(waited.match ?? "")}${stream} at offset ${waited.match_offset ?? 0}.`;
|
|
35514
35573
|
} else if (waited.reason === "timeout") {
|
|
35515
35574
|
text += `
|
|
35516
35575
|
Waited ${waited.elapsed_ms}ms; timeout reached without match.`;
|
|
@@ -35540,9 +35599,11 @@ async function bashStatusSnapshot2(ctx, runtime, taskId, outputMode, options) {
|
|
|
35540
35599
|
async function waitForBashStatus(ctx, runtime, taskId, outputMode, waitFor, effectiveWaitMs) {
|
|
35541
35600
|
const startedAt = Date.now();
|
|
35542
35601
|
const deadline = startedAt + effectiveWaitMs;
|
|
35543
|
-
let spillCursor = { output: 0, stderr: 0
|
|
35544
|
-
|
|
35545
|
-
|
|
35602
|
+
let spillCursor = { output: 0, stderr: 0 };
|
|
35603
|
+
const scanState = {
|
|
35604
|
+
output: { text: "", baseOffset: 0 },
|
|
35605
|
+
stderr: { text: "", baseOffset: 0 }
|
|
35606
|
+
};
|
|
35546
35607
|
const bridgeOptions = {};
|
|
35547
35608
|
if (waitFor?.kind === "regex") {
|
|
35548
35609
|
await validateWaitRegex(ctx, runtime, waitFor);
|
|
@@ -35580,32 +35641,37 @@ async function waitForBashStatus(ctx, runtime, taskId, outputMode, waitFor, effe
|
|
|
35580
35641
|
const scan = await readNewTaskOutput(data, spillCursor);
|
|
35581
35642
|
if (scan) {
|
|
35582
35643
|
spillCursor = scan.nextCursor;
|
|
35583
|
-
|
|
35584
|
-
|
|
35585
|
-
|
|
35586
|
-
|
|
35587
|
-
|
|
35588
|
-
|
|
35589
|
-
|
|
35590
|
-
|
|
35591
|
-
|
|
35592
|
-
|
|
35593
|
-
|
|
35594
|
-
|
|
35595
|
-
|
|
35596
|
-
|
|
35597
|
-
|
|
35598
|
-
|
|
35599
|
-
|
|
35600
|
-
|
|
35601
|
-
|
|
35602
|
-
|
|
35603
|
-
|
|
35604
|
-
|
|
35605
|
-
|
|
35606
|
-
|
|
35607
|
-
|
|
35608
|
-
|
|
35644
|
+
for (const chunk of scan.chunks) {
|
|
35645
|
+
const state = scanState[chunk.stream];
|
|
35646
|
+
if (state.text.length === 0)
|
|
35647
|
+
state.baseOffset = chunk.baseOffset;
|
|
35648
|
+
state.text += chunk.text;
|
|
35649
|
+
if (waitFor.kind === "regex") {
|
|
35650
|
+
const trimmed = trimWaitScanBuffer(state.text, state.baseOffset, waitFor);
|
|
35651
|
+
state.text = trimmed.text;
|
|
35652
|
+
state.baseOffset = trimmed.baseOffset;
|
|
35653
|
+
}
|
|
35654
|
+
const match = await findWaitMatch(ctx, runtime, state.text, waitFor);
|
|
35655
|
+
if (match) {
|
|
35656
|
+
if (terminal) {
|
|
35657
|
+
sawTerminal = true;
|
|
35658
|
+
consumeBgCompletion(runtime.sessionID, taskId);
|
|
35659
|
+
await markBgCompletionDelivered({ ctx, directory: projectRootFor(runtime), sessionID: runtime.sessionID }, taskId);
|
|
35660
|
+
}
|
|
35661
|
+
const matchStream = data.mode === "pty" ? undefined : chunk.stream === "output" ? "stdout" : "stderr";
|
|
35662
|
+
return withWaited(data, {
|
|
35663
|
+
reason: "matched",
|
|
35664
|
+
elapsed_ms: Date.now() - startedAt,
|
|
35665
|
+
match: match.text,
|
|
35666
|
+
match_offset: state.baseOffset + match.byteOffset,
|
|
35667
|
+
match_stream: matchStream
|
|
35668
|
+
});
|
|
35669
|
+
}
|
|
35670
|
+
if (waitFor.kind === "substring") {
|
|
35671
|
+
const trimmed = trimWaitScanBuffer(state.text, state.baseOffset, waitFor);
|
|
35672
|
+
state.text = trimmed.text;
|
|
35673
|
+
state.baseOffset = trimmed.baseOffset;
|
|
35674
|
+
}
|
|
35609
35675
|
}
|
|
35610
35676
|
}
|
|
35611
35677
|
}
|
|
@@ -35638,13 +35704,26 @@ async function readNewTaskOutput(data, cursor) {
|
|
|
35638
35704
|
const bytesRead = stdoutBytes.length + stderrBytes.length;
|
|
35639
35705
|
if (bytesRead === 0)
|
|
35640
35706
|
return;
|
|
35707
|
+
const chunks = [];
|
|
35708
|
+
if (stdoutBytes.length > 0) {
|
|
35709
|
+
chunks.push({
|
|
35710
|
+
stream: "output",
|
|
35711
|
+
text: stdoutBytes.toString("utf8"),
|
|
35712
|
+
baseOffset: cursor.output
|
|
35713
|
+
});
|
|
35714
|
+
}
|
|
35715
|
+
if (stderrBytes.length > 0) {
|
|
35716
|
+
chunks.push({
|
|
35717
|
+
stream: "stderr",
|
|
35718
|
+
text: stderrBytes.toString("utf8"),
|
|
35719
|
+
baseOffset: cursor.stderr
|
|
35720
|
+
});
|
|
35721
|
+
}
|
|
35641
35722
|
return {
|
|
35642
|
-
|
|
35643
|
-
baseOffset: cursor.combined,
|
|
35723
|
+
chunks,
|
|
35644
35724
|
nextCursor: {
|
|
35645
35725
|
output: cursor.output + stdoutBytes.length,
|
|
35646
|
-
stderr: cursor.stderr + stderrBytes.length
|
|
35647
|
-
combined: cursor.combined + bytesRead
|
|
35726
|
+
stderr: cursor.stderr + stderrBytes.length
|
|
35648
35727
|
}
|
|
35649
35728
|
};
|
|
35650
35729
|
}
|
|
@@ -37675,14 +37754,14 @@ var PLUGIN_VERSION = (() => {
|
|
|
37675
37754
|
return "0.0.0";
|
|
37676
37755
|
}
|
|
37677
37756
|
})();
|
|
37678
|
-
var ANNOUNCEMENT_VERSION = "0.47.
|
|
37757
|
+
var ANNOUNCEMENT_VERSION = "0.47.3";
|
|
37679
37758
|
var ANNOUNCEMENT_FEATURES = [
|
|
37680
|
-
"Fixed:
|
|
37681
|
-
"Fixed:
|
|
37682
|
-
"Fixed:
|
|
37683
|
-
"Fixed:
|
|
37684
|
-
"
|
|
37685
|
-
"Faster
|
|
37759
|
+
"Fixed: aft_search could return zero results when a match existed — hidden test files consumed the result cap before source files were reached.",
|
|
37760
|
+
"Fixed: aft_import removing one name from a comma-separated PHP use (use A, B) deleted the sibling; Java static-member removal is fixed the same way.",
|
|
37761
|
+
"Fixed: aft_safety restore now preserves Unix permission bits (including the executable bit); aft_conflicts keeps conflicts with non-ASCII filenames.",
|
|
37762
|
+
"Fixed: aft_inspect no longer counts TODO markers inside strings and now reports self-import cycles; trace_data no longer reports a flow after the variable is overwritten.",
|
|
37763
|
+
"Long-running daemon sessions fully reclaim idle projects (lower memory), and daemon restarts no longer trigger a re-embedding storm.",
|
|
37764
|
+
"Faster indexed search, tool dispatch, call trees, and duplicate scans across the board."
|
|
37686
37765
|
];
|
|
37687
37766
|
var ANNOUNCEMENT_FOOTER = "Join us on Discord: https://discord.gg/DSa65w8wuf";
|
|
37688
37767
|
var plugin = async (input) => initializePluginForDirectory(input);
|
package/dist/shared/status.d.ts
CHANGED
|
@@ -72,6 +72,11 @@ export interface AftStatusSnapshot {
|
|
|
72
72
|
semantic_disk_bytes: number;
|
|
73
73
|
};
|
|
74
74
|
lsp_servers: number;
|
|
75
|
+
runtime: {
|
|
76
|
+
live_watchers: number;
|
|
77
|
+
live_actor_roots: number;
|
|
78
|
+
open_routes: number;
|
|
79
|
+
};
|
|
75
80
|
symbol_cache: {
|
|
76
81
|
local_entries: number;
|
|
77
82
|
warm_entries: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/shared/status.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,0BAA0B;IACzC,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,0BAA0B,CAAC;IACpC,OAAO,EAAE,0BAA0B,CAAC;CACrC;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB;;;;;;;OAOG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB,+EAA+E;IAC/E,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,QAAQ,EAAE;QACR,cAA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qB,CAAC;AAMvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAuCjD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,mBAAmB,CACjC,mBAAmB,EAAE,OAAO,EAC5B,aAAa,EAAE,OAAO,EACtB,YAAY,EAAE,OAAO,GACpB,MAAM,CAaR;
|
|
1
|
+
{"version":3,"file":"bash.d.ts","sourceRoot":"","sources":["../../src/tools/bash.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAe,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAMvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAuCjD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,mBAAmB,CACjC,mBAAmB,EAAE,OAAO,EAC5B,aAAa,EAAE,OAAO,EACtB,YAAY,EAAE,OAAO,GACpB,MAAM,CAaR;AAwGD,wBAAgB,cAAc,CAC5B,GAAG,EAAE,aAAa,EAClB,2BAA2B,CAAC,EAAE,OAAO,GACpC,cAAc,CAkOhB;AAED,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,aAAa,GAAG,cAAc,CA2BvE;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,aAAa,GAAG,cAAc,CAwBrE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bash_watch.d.ts","sourceRoot":"","sources":["../../src/tools/bash_watch.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAavE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AASjD,MAAM,MAAM,eAAe,GACvB;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACpC;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AACtC,MAAM,MAAM,gBAAgB,GAAG;IAC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O,CAAC,kBAAkB,CAAC,CAoH7B;AA2DD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,eAAe,GAAG,SAAS,CAI5E;AAkGD,wBAAgB,4BAA4B,CAC1C,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,eAAe,GACvB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAEtC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cortexkit/aft-opencode",
|
|
3
|
-
"version": "0.47.
|
|
3
|
+
"version": "0.47.3",
|
|
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",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@clack/prompts": "^1.6.0",
|
|
37
|
-
"@cortexkit/aft-bridge": "0.47.
|
|
37
|
+
"@cortexkit/aft-bridge": "0.47.3",
|
|
38
38
|
"@opentui/core": "0.4.3",
|
|
39
39
|
"@opentui/solid": "0.4.3",
|
|
40
40
|
"comment-json": "^4.6.2",
|
|
@@ -43,12 +43,12 @@
|
|
|
43
43
|
"zod": "^4.4.3"
|
|
44
44
|
},
|
|
45
45
|
"optionalDependencies": {
|
|
46
|
-
"@cortexkit/aft-darwin-arm64": "0.47.
|
|
47
|
-
"@cortexkit/aft-darwin-x64": "0.47.
|
|
48
|
-
"@cortexkit/aft-linux-arm64": "0.47.
|
|
49
|
-
"@cortexkit/aft-linux-x64": "0.47.
|
|
50
|
-
"@cortexkit/aft-win32-arm64": "0.47.
|
|
51
|
-
"@cortexkit/aft-win32-x64": "0.47.
|
|
46
|
+
"@cortexkit/aft-darwin-arm64": "0.47.3",
|
|
47
|
+
"@cortexkit/aft-darwin-x64": "0.47.3",
|
|
48
|
+
"@cortexkit/aft-linux-arm64": "0.47.3",
|
|
49
|
+
"@cortexkit/aft-linux-x64": "0.47.3",
|
|
50
|
+
"@cortexkit/aft-win32-arm64": "0.47.3",
|
|
51
|
+
"@cortexkit/aft-win32-x64": "0.47.3"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@opencode-ai/plugin": "^1.17.11",
|
package/src/shared/status.ts
CHANGED
|
@@ -75,6 +75,11 @@ export interface AftStatusSnapshot {
|
|
|
75
75
|
semantic_disk_bytes: number;
|
|
76
76
|
};
|
|
77
77
|
lsp_servers: number;
|
|
78
|
+
runtime: {
|
|
79
|
+
live_watchers: number;
|
|
80
|
+
live_actor_roots: number;
|
|
81
|
+
open_routes: number;
|
|
82
|
+
};
|
|
78
83
|
symbol_cache: {
|
|
79
84
|
local_entries: number;
|
|
80
85
|
warm_entries: number;
|
|
@@ -212,6 +217,7 @@ export function coerceAftStatus(response: Record<string, unknown>): AftStatusSna
|
|
|
212
217
|
};
|
|
213
218
|
const disk = asRecord(response.disk);
|
|
214
219
|
const symbolCache = asRecord(response.symbol_cache);
|
|
220
|
+
const runtime = asRecord(response.runtime);
|
|
215
221
|
const session = asRecord(response.session);
|
|
216
222
|
|
|
217
223
|
return {
|
|
@@ -256,6 +262,11 @@ export function coerceAftStatus(response: Record<string, unknown>): AftStatusSna
|
|
|
256
262
|
semantic_disk_bytes: readNumber(disk.semantic_disk_bytes),
|
|
257
263
|
},
|
|
258
264
|
lsp_servers: readNumber(response.lsp_servers),
|
|
265
|
+
runtime: {
|
|
266
|
+
live_watchers: readNumber(runtime.live_watchers),
|
|
267
|
+
live_actor_roots: readNumber(runtime.live_actor_roots),
|
|
268
|
+
open_routes: readNumber(runtime.open_routes),
|
|
269
|
+
},
|
|
259
270
|
symbol_cache: {
|
|
260
271
|
local_entries: readNumber(symbolCache.local_entries),
|
|
261
272
|
warm_entries: readNumber(symbolCache.warm_entries),
|