@cortexkit/aft-opencode 0.57.2 → 0.58.1
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/bash-wait-detach.d.ts +14 -5
- package/dist/bash-wait-detach.d.ts.map +1 -1
- package/dist/bridge-bootstrap.d.ts +199 -0
- package/dist/bridge-bootstrap.d.ts.map +1 -0
- package/dist/config-error-surface.d.ts +23 -0
- package/dist/config-error-surface.d.ts.map +1 -0
- package/dist/config-live-reload.d.ts +315 -0
- package/dist/config-live-reload.d.ts.map +1 -0
- package/dist/config.d.ts +112 -54
- package/dist/config.d.ts.map +1 -1
- package/dist/entry/server.js +10449 -7872
- package/dist/hooks/auto-update-checker/checker.d.ts +1 -0
- package/dist/hooks/auto-update-checker/checker.d.ts.map +1 -1
- package/dist/hooks/auto-update-checker/index.d.ts +6 -0
- package/dist/hooks/auto-update-checker/index.d.ts.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10315 -7815
- package/dist/logger.d.ts.map +1 -1
- package/dist/lsp-auto-install.d.ts.map +1 -1
- package/dist/lsp-npm-table.d.ts +1 -1
- package/dist/lsp-npm-table.d.ts.map +1 -1
- package/dist/rpc/register.d.ts +7 -1
- package/dist/rpc/register.d.ts.map +1 -1
- package/dist/shared/read-vision.d.ts +10 -0
- package/dist/shared/read-vision.d.ts.map +1 -0
- package/dist/shared/status.d.ts +45 -0
- package/dist/shared/status.d.ts.map +1 -1
- package/dist/shared/subagent-detect.d.ts.map +1 -1
- package/dist/shutdown-hooks.d.ts +3 -9
- package/dist/shutdown-hooks.d.ts.map +1 -1
- package/dist/subc-tool-schemas.d.ts +9 -1
- package/dist/subc-tool-schemas.d.ts.map +1 -1
- package/dist/tool-perf.d.ts +1 -0
- package/dist/tool-perf.d.ts.map +1 -1
- package/dist/tool-registration.d.ts +19 -12
- package/dist/tool-registration.d.ts.map +1 -1
- package/dist/tools/ast.d.ts.map +1 -1
- package/dist/tools/bash.d.ts +1 -1
- package/dist/tools/bash.d.ts.map +1 -1
- package/dist/tools/bash_watch.d.ts +3 -0
- package/dist/tools/bash_watch.d.ts.map +1 -1
- package/dist/tools/definitions/v2.d.ts.map +1 -1
- package/dist/tools/hoisted.d.ts +9 -12
- package/dist/tools/hoisted.d.ts.map +1 -1
- package/dist/tools/inspect.d.ts +5 -7
- package/dist/tools/inspect.d.ts.map +1 -1
- package/dist/tools/permissions.d.ts.map +1 -1
- package/dist/tools/reading.d.ts.map +1 -1
- package/dist/tools/search.d.ts.map +1 -1
- package/dist/tui/v2-status.d.ts +1 -1
- package/dist/tui/v2-status.d.ts.map +1 -1
- package/dist/workflow-hints.d.ts +1 -7
- package/dist/workflow-hints.d.ts.map +1 -1
- package/package.json +8 -8
- package/src/entry/server-runtime.mjs +133 -34
- package/src/logger.ts +5 -6
- package/src/shared/read-vision.ts +100 -0
- package/src/shared/status.ts +83 -4
- package/src/shared/subagent-detect.ts +56 -1
- package/src/tui/index.tsx +4 -10
- package/src/tui/sidebar-view.tsx +36 -15
- package/src/tui/v2-status.ts +25 -4
- package/src/tui-compiled/index.tsx +3 -3
- package/src/tui-compiled/sidebar-view.tsx +168 -126
- package/src/tui-compiled/v2-status.ts +25 -4
|
@@ -1,9 +1,25 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type AftStatusSnapshot, degradedHeaderMarker, type StatusBar } from "../shared/status";
|
|
2
2
|
|
|
3
3
|
function count(value: number | undefined): string {
|
|
4
4
|
return value === undefined ? "?" : String(value);
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* The errors/warnings part of the footer. With no language server running the
|
|
9
|
+
* counts will never arrive, so the footer says that instead of showing `E? W?`
|
|
10
|
+
* indefinitely.
|
|
11
|
+
*/
|
|
12
|
+
function diagnosticsPart(bar: StatusBar): string {
|
|
13
|
+
if (
|
|
14
|
+
bar.errors === undefined &&
|
|
15
|
+
bar.warnings === undefined &&
|
|
16
|
+
bar.diagnostics === "no_language_server"
|
|
17
|
+
) {
|
|
18
|
+
return "no LSP";
|
|
19
|
+
}
|
|
20
|
+
return `E${count(bar.errors)} W${count(bar.warnings)}`;
|
|
21
|
+
}
|
|
22
|
+
|
|
7
23
|
/**
|
|
8
24
|
* The V2 footer segment. "AFT starting…" is only true before the bridge has
|
|
9
25
|
* delivered a real snapshot. After that the footer shows every health category
|
|
@@ -12,11 +28,14 @@ function count(value: number | undefined): string {
|
|
|
12
28
|
* can leave the complete `status_bar` missing for the whole session.
|
|
13
29
|
*/
|
|
14
30
|
export function formatAftStatusSegment(status: AftStatusSnapshot | null): string {
|
|
31
|
+
// The config error state never produces a real snapshot; say so instead of
|
|
32
|
+
// "starting", which would suggest the bridge is on its way.
|
|
33
|
+
if (status?.config_error) return "AFT config error";
|
|
15
34
|
if (!status || status.cache_role === "not_initialized") return "AFT starting…";
|
|
16
35
|
const bar: StatusBar = status.status_bar ?? status.status_bar_values ?? {};
|
|
17
36
|
const stale = bar.tier2_stale ? "~" : "";
|
|
18
37
|
return (
|
|
19
|
-
`AFT
|
|
38
|
+
`AFT ${diagnosticsPart(bar)} | ` +
|
|
20
39
|
`${stale}D${count(bar.dead_code)} U${count(bar.unused_exports)} ` +
|
|
21
40
|
`C${count(bar.duplicates)} | T${count(bar.todos)}`
|
|
22
41
|
);
|
|
@@ -33,7 +52,7 @@ function healthSummary(bar: StatusBar | undefined): string {
|
|
|
33
52
|
if (!bar) return "health pending";
|
|
34
53
|
const stale = bar.tier2_stale ? "~" : "";
|
|
35
54
|
return (
|
|
36
|
-
|
|
55
|
+
`${diagnosticsPart(bar)} ` +
|
|
37
56
|
`${stale}D${count(bar.dead_code)} U${count(bar.unused_exports)} ` +
|
|
38
57
|
`C${count(bar.duplicates)} T${count(bar.todos)}`
|
|
39
58
|
);
|
|
@@ -61,7 +80,9 @@ export function summarizeAftSidebar(status: AftStatusSnapshot | null): AftSideba
|
|
|
61
80
|
? `${status.semantic_index.status} (${status.semantic_index.stage})`
|
|
62
81
|
: status.semantic_index.status;
|
|
63
82
|
return {
|
|
64
|
-
title: status.degraded
|
|
83
|
+
title: status.degraded
|
|
84
|
+
? `AFT · ${degradedHeaderMarker(status.degraded_reasons ?? []).text}`
|
|
85
|
+
: "AFT",
|
|
65
86
|
version: status.version || undefined,
|
|
66
87
|
search: status.search_index.status,
|
|
67
88
|
semantic,
|