@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.
Files changed (66) hide show
  1. package/dist/bash-wait-detach.d.ts +14 -5
  2. package/dist/bash-wait-detach.d.ts.map +1 -1
  3. package/dist/bridge-bootstrap.d.ts +199 -0
  4. package/dist/bridge-bootstrap.d.ts.map +1 -0
  5. package/dist/config-error-surface.d.ts +23 -0
  6. package/dist/config-error-surface.d.ts.map +1 -0
  7. package/dist/config-live-reload.d.ts +315 -0
  8. package/dist/config-live-reload.d.ts.map +1 -0
  9. package/dist/config.d.ts +112 -54
  10. package/dist/config.d.ts.map +1 -1
  11. package/dist/entry/server.js +10449 -7872
  12. package/dist/hooks/auto-update-checker/checker.d.ts +1 -0
  13. package/dist/hooks/auto-update-checker/checker.d.ts.map +1 -1
  14. package/dist/hooks/auto-update-checker/index.d.ts +6 -0
  15. package/dist/hooks/auto-update-checker/index.d.ts.map +1 -1
  16. package/dist/index.d.ts +3 -2
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.js +10315 -7815
  19. package/dist/logger.d.ts.map +1 -1
  20. package/dist/lsp-auto-install.d.ts.map +1 -1
  21. package/dist/lsp-npm-table.d.ts +1 -1
  22. package/dist/lsp-npm-table.d.ts.map +1 -1
  23. package/dist/rpc/register.d.ts +7 -1
  24. package/dist/rpc/register.d.ts.map +1 -1
  25. package/dist/shared/read-vision.d.ts +10 -0
  26. package/dist/shared/read-vision.d.ts.map +1 -0
  27. package/dist/shared/status.d.ts +45 -0
  28. package/dist/shared/status.d.ts.map +1 -1
  29. package/dist/shared/subagent-detect.d.ts.map +1 -1
  30. package/dist/shutdown-hooks.d.ts +3 -9
  31. package/dist/shutdown-hooks.d.ts.map +1 -1
  32. package/dist/subc-tool-schemas.d.ts +9 -1
  33. package/dist/subc-tool-schemas.d.ts.map +1 -1
  34. package/dist/tool-perf.d.ts +1 -0
  35. package/dist/tool-perf.d.ts.map +1 -1
  36. package/dist/tool-registration.d.ts +19 -12
  37. package/dist/tool-registration.d.ts.map +1 -1
  38. package/dist/tools/ast.d.ts.map +1 -1
  39. package/dist/tools/bash.d.ts +1 -1
  40. package/dist/tools/bash.d.ts.map +1 -1
  41. package/dist/tools/bash_watch.d.ts +3 -0
  42. package/dist/tools/bash_watch.d.ts.map +1 -1
  43. package/dist/tools/definitions/v2.d.ts.map +1 -1
  44. package/dist/tools/hoisted.d.ts +9 -12
  45. package/dist/tools/hoisted.d.ts.map +1 -1
  46. package/dist/tools/inspect.d.ts +5 -7
  47. package/dist/tools/inspect.d.ts.map +1 -1
  48. package/dist/tools/permissions.d.ts.map +1 -1
  49. package/dist/tools/reading.d.ts.map +1 -1
  50. package/dist/tools/search.d.ts.map +1 -1
  51. package/dist/tui/v2-status.d.ts +1 -1
  52. package/dist/tui/v2-status.d.ts.map +1 -1
  53. package/dist/workflow-hints.d.ts +1 -7
  54. package/dist/workflow-hints.d.ts.map +1 -1
  55. package/package.json +8 -8
  56. package/src/entry/server-runtime.mjs +133 -34
  57. package/src/logger.ts +5 -6
  58. package/src/shared/read-vision.ts +100 -0
  59. package/src/shared/status.ts +83 -4
  60. package/src/shared/subagent-detect.ts +56 -1
  61. package/src/tui/index.tsx +4 -10
  62. package/src/tui/sidebar-view.tsx +36 -15
  63. package/src/tui/v2-status.ts +25 -4
  64. package/src/tui-compiled/index.tsx +3 -3
  65. package/src/tui-compiled/sidebar-view.tsx +168 -126
  66. package/src/tui-compiled/v2-status.ts +25 -4
@@ -1,9 +1,25 @@
1
- import type { AftStatusSnapshot, StatusBar } from "../shared/status";
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 E${count(bar.errors)} W${count(bar.warnings)} | ` +
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
- `E${count(bar.errors)} W${count(bar.warnings)} ` +
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 ? "AFT · DEGRADED" : "AFT",
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,