@cortexkit/aft-opencode 0.27.1 → 0.28.0
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 +47 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +309 -67
- package/dist/lsp-auto-install.d.ts.map +1 -1
- package/dist/lsp-npm-table.d.ts +14 -0
- package/dist/lsp-npm-table.d.ts.map +1 -1
- package/dist/lsp-project-relevance.d.ts +13 -0
- package/dist/lsp-project-relevance.d.ts.map +1 -1
- package/dist/notifications.d.ts +1 -1
- package/dist/notifications.d.ts.map +1 -1
- package/dist/tools/hoisted.d.ts.map +1 -1
- package/dist/tui.js +102 -90
- package/dist/workflow-hints.d.ts +5 -1
- package/dist/workflow-hints.d.ts.map +1 -1
- package/package.json +8 -7
- package/src/tui/index.tsx +21 -6
- package/src/tui/sidebar.tsx +92 -66
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lsp-auto-install.d.ts","sourceRoot":"","sources":["../src/lsp-auto-install.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;
|
|
1
|
+
{"version":3,"file":"lsp-auto-install.d.ts","sourceRoot":"","sources":["../src/lsp-auto-install.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AA4BH,+DAA+D;AAC/D,MAAM,WAAW,iBAAiB;IAChC,oCAAoC;IACpC,WAAW,EAAE,OAAO,CAAC;IACrB,6CAA6C;IAC7C,SAAS,EAAE,MAAM,CAAC;IAClB,8EAA8E;IAC9E,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC3C,kGAAkG;IAClG,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CAC/B;AAED,qCAAqC;AACrC,MAAM,WAAW,iBAAiB;IAChC,mFAAmF;IACnF,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,gDAAgD;IAChD,eAAe,EAAE,MAAM,CAAC;IACxB,yEAAyE;IACzE,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B;;;;;;;OAOG;IACH,OAAO,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC/C;;;;;;;;;OASG;IACH,gBAAgB,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;CACjC;AA8DD,wBAAsB,yBAAyB,IAAI,OAAO,CAAC,IAAI,CAAC,CAM/D;AAqXD;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAC5B,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,iBAAiB,EACzB,SAAS,GAAE,OAAO,KAAa,GAC9B,iBAAiB,CAwEnB"}
|
package/dist/lsp-npm-table.d.ts
CHANGED
|
@@ -22,6 +22,20 @@ export interface NpmServerSpec {
|
|
|
22
22
|
readonly extensions: readonly string[];
|
|
23
23
|
/** Project-root marker files (presence triggers install). Optional. */
|
|
24
24
|
readonly rootMarkers?: readonly string[];
|
|
25
|
+
/**
|
|
26
|
+
* Package names whose presence in `<projectRoot>/package.json` `dependencies`,
|
|
27
|
+
* `devDependencies`, or `peerDependencies` triggers auto-install. Useful for
|
|
28
|
+
* frameworks where the config file alone (`vite.config.ts`, etc.) doesn't
|
|
29
|
+
* reveal which language server is needed — e.g. a Vite project is only a
|
|
30
|
+
* Vue project if `vue` is in package.json. Optional.
|
|
31
|
+
*
|
|
32
|
+
* GitHub issue #48: Vue, Astro, and Svelte projects can have their .vue
|
|
33
|
+
* /.astro/.svelte files deep enough in a monorepo (or behind skipped
|
|
34
|
+
* directories like `apps/`) that the bounded extension walk misses them.
|
|
35
|
+
* Without rootMarkers OR this hint, auto-install never triggers and the
|
|
36
|
+
* user sees a recurring `lsp_binary_missing` warning.
|
|
37
|
+
*/
|
|
38
|
+
readonly packageJsonDeps?: readonly string[];
|
|
25
39
|
}
|
|
26
40
|
export declare const NPM_LSP_TABLE: readonly NpmServerSpec[];
|
|
27
41
|
/** Find an entry by AFT server id. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lsp-npm-table.d.ts","sourceRoot":"","sources":["../src/lsp-npm-table.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,MAAM,WAAW,aAAa;IAC5B,yFAAyF;IACzF,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,wBAAwB;IACxB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,wDAAwD;IACxD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,0FAA0F;IAC1F,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC,uEAAuE;IACvE,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"lsp-npm-table.d.ts","sourceRoot":"","sources":["../src/lsp-npm-table.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,MAAM,WAAW,aAAa;IAC5B,yFAAyF;IACzF,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,wBAAwB;IACxB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,wDAAwD;IACxD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,0FAA0F;IAC1F,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC,uEAAuE;IACvE,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACzC;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC9C;AAED,eAAO,MAAM,aAAa,EAAE,SAAS,aAAa,EAoFjD,CAAC;AAEF,sCAAsC;AACtC,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAEvE;AAED,oCAAoC;AACpC,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAE/E"}
|
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
export declare function hasRootMarker(projectRoot: string, rootMarkers?: readonly string[]): boolean;
|
|
2
|
+
/**
|
|
3
|
+
* True when `<projectRoot>/package.json` lists any name from `depNames`
|
|
4
|
+
* in its `dependencies`, `devDependencies`, or `peerDependencies` maps.
|
|
5
|
+
*
|
|
6
|
+
* GitHub issue #48: Vue/Astro/Svelte projects fail the bounded extension
|
|
7
|
+
* walk for monorepo layouts. Detecting them by package.json dep name
|
|
8
|
+
* catches Vite-based setups and other frameworks where no framework-
|
|
9
|
+
* specific config file exists at the project root.
|
|
10
|
+
*
|
|
11
|
+
* Reads package.json once per call. Failures (missing file, invalid JSON,
|
|
12
|
+
* I/O error) return false — this signal is additive, never blocking.
|
|
13
|
+
*/
|
|
14
|
+
export declare function hasPackageJsonDep(projectRoot: string, depNames?: readonly string[]): boolean;
|
|
2
15
|
/**
|
|
3
16
|
* Bounded extension scan for project relevance decisions.
|
|
4
17
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lsp-project-relevance.d.ts","sourceRoot":"","sources":["../src/lsp-project-relevance.ts"],"names":[],"mappings":"AAiBA,wBAAgB,aAAa,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAM3F;AAED;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CACzC,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAAC,GACvD,GAAG,CAAC,MAAM,CAAC,CAmCb"}
|
|
1
|
+
{"version":3,"file":"lsp-project-relevance.d.ts","sourceRoot":"","sources":["../src/lsp-project-relevance.ts"],"names":[],"mappings":"AAiBA,wBAAgB,aAAa,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAM3F;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAe5F;AAmBD;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CACzC,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAAC,GACvD,GAAG,CAAC,MAAM,CAAC,CAmCb"}
|
package/dist/notifications.d.ts
CHANGED
|
@@ -74,7 +74,7 @@ export declare function sendStatus(opts: NotificationOptions, message: string):
|
|
|
74
74
|
* Desktop: ignored message in the active session.
|
|
75
75
|
* TUI: toast with info variant.
|
|
76
76
|
*/
|
|
77
|
-
export declare function sendFeatureAnnouncement(opts: NotificationOptions, version: string, features: string[], storageDir?: string): Promise<void>;
|
|
77
|
+
export declare function sendFeatureAnnouncement(opts: NotificationOptions, version: string, features: string[], footer: string, storageDir?: string): Promise<void>;
|
|
78
78
|
export declare function deliverConfigureWarnings(opts: ConfigureWarningOptions, warnings: ConfigureWarning[]): Promise<void>;
|
|
79
79
|
/**
|
|
80
80
|
* Clean up stale AFT warning messages from previous runs.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notifications.d.ts","sourceRoot":"","sources":["../src/notifications.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAmI1D,KAAK,UAAU,GAAG;IAChB,IAAI,CAAC,EAAE;QAAE,EAAE,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAA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":"hoisted.d.ts","sourceRoot":"","sources":["../../src/tools/hoisted.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAK1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAuEjD,wEAAwE;AACxE,eAAO,MAAM,wBAAwB,GAAI,IAAI,MAAM,EAAE,QAAQ,MAAM,EAAE,OAAO,MAAM,KAAG,MAChD,CAAC;AAqRtC;;GAEG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,aAAa,GAAG,cAAc,CA+JjE;AAmmCD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAwB/E;AAMD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CA4FnF"}
|
package/dist/tui.js
CHANGED
|
@@ -4,7 +4,7 @@ import { createMemo as createMemo2, createSignal as createSignal2, onCleanup as
|
|
|
4
4
|
// package.json
|
|
5
5
|
var package_default = {
|
|
6
6
|
name: "@cortexkit/aft-opencode",
|
|
7
|
-
version: "0.
|
|
7
|
+
version: "0.28.0",
|
|
8
8
|
type: "module",
|
|
9
9
|
description: "OpenCode plugin for Agent File Tools (AFT) \u2014 tree-sitter and lsp powered code analysis",
|
|
10
10
|
main: "dist/index.js",
|
|
@@ -33,7 +33,7 @@ var package_default = {
|
|
|
33
33
|
},
|
|
34
34
|
dependencies: {
|
|
35
35
|
"@clack/prompts": "^1.2.0",
|
|
36
|
-
"@cortexkit/aft-bridge": "0.
|
|
36
|
+
"@cortexkit/aft-bridge": "0.28.0",
|
|
37
37
|
"@opencode-ai/plugin": "^1.15.5",
|
|
38
38
|
"@opencode-ai/sdk": "^1.15.5",
|
|
39
39
|
"comment-json": "^4.6.2",
|
|
@@ -41,11 +41,12 @@ var package_default = {
|
|
|
41
41
|
zod: "^4.1.8"
|
|
42
42
|
},
|
|
43
43
|
optionalDependencies: {
|
|
44
|
-
"@cortexkit/aft-darwin-arm64": "0.
|
|
45
|
-
"@cortexkit/aft-darwin-x64": "0.
|
|
46
|
-
"@cortexkit/aft-linux-arm64": "0.
|
|
47
|
-
"@cortexkit/aft-linux-x64": "0.
|
|
48
|
-
"@cortexkit/aft-win32-
|
|
44
|
+
"@cortexkit/aft-darwin-arm64": "0.28.0",
|
|
45
|
+
"@cortexkit/aft-darwin-x64": "0.28.0",
|
|
46
|
+
"@cortexkit/aft-linux-arm64": "0.28.0",
|
|
47
|
+
"@cortexkit/aft-linux-x64": "0.28.0",
|
|
48
|
+
"@cortexkit/aft-win32-arm64": "0.28.0",
|
|
49
|
+
"@cortexkit/aft-win32-x64": "0.28.0"
|
|
49
50
|
},
|
|
50
51
|
devDependencies: {
|
|
51
52
|
"@types/node": "^22.0.0",
|
|
@@ -595,6 +596,7 @@ var SidebarContent = (props) => {
|
|
|
595
596
|
});
|
|
596
597
|
}, { defer: false }));
|
|
597
598
|
const s = createMemo(() => status());
|
|
599
|
+
const notInitialized = () => s()?.cache_role === "not_initialized";
|
|
598
600
|
const searchStatus = () => statusDisplay(s()?.search_index?.status ?? "disabled");
|
|
599
601
|
const semanticStatus = () => statusDisplay(s()?.semantic_index?.status ?? "disabled");
|
|
600
602
|
const trigramBytes = () => s()?.disk?.trigram_disk_bytes ?? 0;
|
|
@@ -663,7 +665,7 @@ var SidebarContent = (props) => {
|
|
|
663
665
|
}, undefined, false, undefined, this)
|
|
664
666
|
]
|
|
665
667
|
}, undefined, true, undefined, this),
|
|
666
|
-
/* @__PURE__ */ jsxDEV("text", {
|
|
668
|
+
!notInitialized() && /* @__PURE__ */ jsxDEV("text", {
|
|
667
669
|
fg: props.theme.textMuted,
|
|
668
670
|
children: [
|
|
669
671
|
"v",
|
|
@@ -683,95 +685,99 @@ var SidebarContent = (props) => {
|
|
|
683
685
|
]
|
|
684
686
|
}, undefined, true, undefined, this)
|
|
685
687
|
}, undefined, false, undefined, this),
|
|
686
|
-
|
|
688
|
+
notInitialized() && /* @__PURE__ */ jsxDEV("box", {
|
|
687
689
|
marginTop: 1,
|
|
688
690
|
width: "100%",
|
|
689
691
|
children: /* @__PURE__ */ jsxDEV("text", {
|
|
690
692
|
fg: props.theme.textMuted,
|
|
691
|
-
children: s().message || "
|
|
693
|
+
children: s().message || "AFT bridge is now spawned lazily, information here will be populated after first tool call."
|
|
692
694
|
}, undefined, false, undefined, this)
|
|
693
695
|
}, undefined, false, undefined, this),
|
|
694
|
-
/* @__PURE__ */ jsxDEV(
|
|
695
|
-
theme: props.theme,
|
|
696
|
-
title: "Search Index"
|
|
697
|
-
}, undefined, false, undefined, this),
|
|
698
|
-
/* @__PURE__ */ jsxDEV(StatRow, {
|
|
699
|
-
theme: props.theme,
|
|
700
|
-
label: "Status",
|
|
701
|
-
value: searchStatus().label,
|
|
702
|
-
tone: searchStatus().tone
|
|
703
|
-
}, undefined, false, undefined, this),
|
|
704
|
-
(s()?.search_index?.files ?? null) != null && /* @__PURE__ */ jsxDEV(StatRow, {
|
|
705
|
-
theme: props.theme,
|
|
706
|
-
label: "Files",
|
|
707
|
-
value: formatCount(s().search_index.files),
|
|
708
|
-
tone: "muted"
|
|
709
|
-
}, undefined, false, undefined, this),
|
|
710
|
-
/* @__PURE__ */ jsxDEV(StatRow, {
|
|
711
|
-
theme: props.theme,
|
|
712
|
-
label: "Disk",
|
|
713
|
-
value: formatBytes2(trigramBytes()),
|
|
714
|
-
tone: "muted"
|
|
715
|
-
}, undefined, false, undefined, this),
|
|
716
|
-
/* @__PURE__ */ jsxDEV(SectionHeader, {
|
|
717
|
-
theme: props.theme,
|
|
718
|
-
title: "Semantic Index"
|
|
719
|
-
}, undefined, false, undefined, this),
|
|
720
|
-
/* @__PURE__ */ jsxDEV(StatRow, {
|
|
721
|
-
theme: props.theme,
|
|
722
|
-
label: "Status",
|
|
723
|
-
value: semanticStatus().label,
|
|
724
|
-
tone: semanticStatus().tone
|
|
725
|
-
}, undefined, false, undefined, this),
|
|
726
|
-
s()?.semantic_index?.status === "loading" && s()?.semantic_index?.entries_total != null && s().semantic_index.entries_total > 0 && /* @__PURE__ */ jsxDEV(StatRow, {
|
|
727
|
-
theme: props.theme,
|
|
728
|
-
label: "Progress",
|
|
729
|
-
value: `${formatCount(s().semantic_index.entries_done)} / ${formatCount(s().semantic_index.entries_total)}`,
|
|
730
|
-
tone: "warn"
|
|
731
|
-
}, undefined, false, undefined, this),
|
|
732
|
-
(s()?.semantic_index?.entries ?? null) != null && /* @__PURE__ */ jsxDEV(StatRow, {
|
|
733
|
-
theme: props.theme,
|
|
734
|
-
label: "Entries",
|
|
735
|
-
value: formatCount(s().semantic_index.entries),
|
|
736
|
-
tone: "muted"
|
|
737
|
-
}, undefined, false, undefined, this),
|
|
738
|
-
/* @__PURE__ */ jsxDEV(StatRow, {
|
|
739
|
-
theme: props.theme,
|
|
740
|
-
label: "Disk",
|
|
741
|
-
value: formatBytes2(semanticBytes()),
|
|
742
|
-
tone: "muted"
|
|
743
|
-
}, undefined, false, undefined, this),
|
|
744
|
-
compressionRows().length > 0 && /* @__PURE__ */ jsxDEV(Fragment, {
|
|
696
|
+
!notInitialized() && /* @__PURE__ */ jsxDEV(Fragment, {
|
|
745
697
|
children: [
|
|
746
698
|
/* @__PURE__ */ jsxDEV(SectionHeader, {
|
|
747
699
|
theme: props.theme,
|
|
748
|
-
title: "
|
|
700
|
+
title: "Search Index"
|
|
749
701
|
}, undefined, false, undefined, this),
|
|
750
|
-
|
|
751
|
-
width: "100%",
|
|
752
|
-
children: /* @__PURE__ */ jsxDEV("text", {
|
|
753
|
-
fg: props.theme.text,
|
|
754
|
-
children: row.label
|
|
755
|
-
}, undefined, false, undefined, this)
|
|
756
|
-
}, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV(StatRow, {
|
|
702
|
+
/* @__PURE__ */ jsxDEV(StatRow, {
|
|
757
703
|
theme: props.theme,
|
|
758
|
-
label:
|
|
759
|
-
value:
|
|
704
|
+
label: "Status",
|
|
705
|
+
value: searchStatus().label,
|
|
706
|
+
tone: searchStatus().tone
|
|
707
|
+
}, undefined, false, undefined, this),
|
|
708
|
+
(s()?.search_index?.files ?? null) != null && /* @__PURE__ */ jsxDEV(StatRow, {
|
|
709
|
+
theme: props.theme,
|
|
710
|
+
label: "Files",
|
|
711
|
+
value: formatCount(s().search_index.files),
|
|
760
712
|
tone: "muted"
|
|
761
|
-
}, undefined, false, undefined, this)
|
|
713
|
+
}, undefined, false, undefined, this),
|
|
714
|
+
/* @__PURE__ */ jsxDEV(StatRow, {
|
|
715
|
+
theme: props.theme,
|
|
716
|
+
label: "Disk",
|
|
717
|
+
value: formatBytes2(trigramBytes()),
|
|
718
|
+
tone: "muted"
|
|
719
|
+
}, undefined, false, undefined, this),
|
|
720
|
+
/* @__PURE__ */ jsxDEV(SectionHeader, {
|
|
721
|
+
theme: props.theme,
|
|
722
|
+
title: "Semantic Index"
|
|
723
|
+
}, undefined, false, undefined, this),
|
|
724
|
+
/* @__PURE__ */ jsxDEV(StatRow, {
|
|
725
|
+
theme: props.theme,
|
|
726
|
+
label: "Status",
|
|
727
|
+
value: semanticStatus().label,
|
|
728
|
+
tone: semanticStatus().tone
|
|
729
|
+
}, undefined, false, undefined, this),
|
|
730
|
+
s()?.semantic_index?.status === "loading" && s()?.semantic_index?.entries_total != null && s().semantic_index.entries_total > 0 && /* @__PURE__ */ jsxDEV(StatRow, {
|
|
731
|
+
theme: props.theme,
|
|
732
|
+
label: "Progress",
|
|
733
|
+
value: `${formatCount(s().semantic_index.entries_done)} / ${formatCount(s().semantic_index.entries_total)}`,
|
|
734
|
+
tone: "warn"
|
|
735
|
+
}, undefined, false, undefined, this),
|
|
736
|
+
(s()?.semantic_index?.entries ?? null) != null && /* @__PURE__ */ jsxDEV(StatRow, {
|
|
737
|
+
theme: props.theme,
|
|
738
|
+
label: "Entries",
|
|
739
|
+
value: formatCount(s().semantic_index.entries),
|
|
740
|
+
tone: "muted"
|
|
741
|
+
}, undefined, false, undefined, this),
|
|
742
|
+
/* @__PURE__ */ jsxDEV(StatRow, {
|
|
743
|
+
theme: props.theme,
|
|
744
|
+
label: "Disk",
|
|
745
|
+
value: formatBytes2(semanticBytes()),
|
|
746
|
+
tone: "muted"
|
|
747
|
+
}, undefined, false, undefined, this),
|
|
748
|
+
compressionRows().length > 0 && /* @__PURE__ */ jsxDEV(Fragment, {
|
|
749
|
+
children: [
|
|
750
|
+
/* @__PURE__ */ jsxDEV(SectionHeader, {
|
|
751
|
+
theme: props.theme,
|
|
752
|
+
title: "Compression"
|
|
753
|
+
}, undefined, false, undefined, this),
|
|
754
|
+
compressionRows().map((row) => row.kind === "scope" ? /* @__PURE__ */ jsxDEV("box", {
|
|
755
|
+
width: "100%",
|
|
756
|
+
children: /* @__PURE__ */ jsxDEV("text", {
|
|
757
|
+
fg: props.theme.text,
|
|
758
|
+
children: row.label
|
|
759
|
+
}, undefined, false, undefined, this)
|
|
760
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV(StatRow, {
|
|
761
|
+
theme: props.theme,
|
|
762
|
+
label: row.label,
|
|
763
|
+
value: row.value,
|
|
764
|
+
tone: "muted"
|
|
765
|
+
}, undefined, false, undefined, this))
|
|
766
|
+
]
|
|
767
|
+
}, undefined, true, undefined, this),
|
|
768
|
+
s()?.semantic_index?.status === "failed" && s()?.semantic_index?.error && /* @__PURE__ */ jsxDEV("box", {
|
|
769
|
+
marginTop: 1,
|
|
770
|
+
width: "100%",
|
|
771
|
+
children: /* @__PURE__ */ jsxDEV("text", {
|
|
772
|
+
fg: props.theme.error,
|
|
773
|
+
children: [
|
|
774
|
+
"\u26A0 ",
|
|
775
|
+
s().semantic_index.error
|
|
776
|
+
]
|
|
777
|
+
}, undefined, true, undefined, this)
|
|
778
|
+
}, undefined, false, undefined, this)
|
|
762
779
|
]
|
|
763
|
-
}, undefined, true, undefined, this)
|
|
764
|
-
s()?.semantic_index?.status === "failed" && s()?.semantic_index?.error && /* @__PURE__ */ jsxDEV("box", {
|
|
765
|
-
marginTop: 1,
|
|
766
|
-
width: "100%",
|
|
767
|
-
children: /* @__PURE__ */ jsxDEV("text", {
|
|
768
|
-
fg: props.theme.error,
|
|
769
|
-
children: [
|
|
770
|
-
"\u26A0 ",
|
|
771
|
-
s().semantic_index.error
|
|
772
|
-
]
|
|
773
|
-
}, undefined, true, undefined, this)
|
|
774
|
-
}, undefined, false, undefined, this)
|
|
780
|
+
}, undefined, true, undefined, this)
|
|
775
781
|
]
|
|
776
782
|
}, undefined, true, undefined, this);
|
|
777
783
|
};
|
|
@@ -914,7 +920,7 @@ var StatusDialog = (props) => {
|
|
|
914
920
|
children: "\u26A1 AFT Status"
|
|
915
921
|
}, undefined, false, undefined, this)
|
|
916
922
|
}, undefined, false, undefined, this),
|
|
917
|
-
/* @__PURE__ */ jsxDEV2("text", {
|
|
923
|
+
status()?.cache_role !== "not_initialized" && /* @__PURE__ */ jsxDEV2("text", {
|
|
918
924
|
fg: t().textMuted,
|
|
919
925
|
children: [
|
|
920
926
|
"v",
|
|
@@ -937,7 +943,7 @@ var StatusDialog = (props) => {
|
|
|
937
943
|
justifyContent: "center",
|
|
938
944
|
children: /* @__PURE__ */ jsxDEV2("text", {
|
|
939
945
|
fg: t().textMuted,
|
|
940
|
-
children: status().message || "
|
|
946
|
+
children: status().message || "AFT bridge is now spawned lazily, information here will be populated after first tool call."
|
|
941
947
|
}, undefined, false, undefined, this)
|
|
942
948
|
}, undefined, false, undefined, this) : null,
|
|
943
949
|
status() && status().cache_role !== "not_initialized" ? /* @__PURE__ */ jsxDEV2("box", {
|
|
@@ -963,7 +969,7 @@ var StatusDialog = (props) => {
|
|
|
963
969
|
}, undefined, false, undefined, this)
|
|
964
970
|
]
|
|
965
971
|
}, undefined, true, undefined, this) : null,
|
|
966
|
-
status() ? /* @__PURE__ */ jsxDEV2("box", {
|
|
972
|
+
status() && status().cache_role !== "not_initialized" ? /* @__PURE__ */ jsxDEV2("box", {
|
|
967
973
|
flexDirection: "row",
|
|
968
974
|
width: "100%",
|
|
969
975
|
gap: 4,
|
|
@@ -1289,11 +1295,17 @@ async function showStartupNotifications(api) {
|
|
|
1289
1295
|
if (announcement.show && announcement.version && announcement.features?.length) {
|
|
1290
1296
|
const featureText = announcement.features.map((f) => ` \u2022 ${f}`).join(`
|
|
1291
1297
|
`);
|
|
1298
|
+
const hasFooter = typeof announcement.footer === "string" && announcement.footer.trim().length > 0;
|
|
1299
|
+
const message = hasFooter ? `What's new:
|
|
1300
|
+
|
|
1301
|
+
${featureText}
|
|
1302
|
+
|
|
1303
|
+
${announcement.footer}` : `What's new:
|
|
1304
|
+
|
|
1305
|
+
${featureText}`;
|
|
1292
1306
|
api.ui.dialog.replace(() => /* @__PURE__ */ jsxDEV2(api.ui.DialogAlert, {
|
|
1293
1307
|
title: `AFT v${announcement.version}`,
|
|
1294
|
-
message
|
|
1295
|
-
|
|
1296
|
-
${featureText}`,
|
|
1308
|
+
message,
|
|
1297
1309
|
onConfirm: () => {
|
|
1298
1310
|
client.call("mark-announced", {});
|
|
1299
1311
|
}
|
package/dist/workflow-hints.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type AftConfig } from "./config.js";
|
|
2
2
|
export interface WorkflowHintsOpts {
|
|
3
3
|
/** `tool_surface` setting — controls which tools are registered. */
|
|
4
4
|
toolSurface: "minimal" | "recommended" | "all";
|
|
@@ -20,6 +20,10 @@ export declare function buildWorkflowHints(opts: WorkflowHintsOpts): string | nu
|
|
|
20
20
|
/**
|
|
21
21
|
* Resolve workflow-hints opts from a loaded AftConfig and the active
|
|
22
22
|
* disabled-tools set computed at registration time.
|
|
23
|
+
*
|
|
24
|
+
* Background-bash gating reads the resolved bash config so the new
|
|
25
|
+
* graduated `bash: true` / `bash: { background: true }` shapes enable the
|
|
26
|
+
* hint, not just the legacy `experimental.bash.background: true` path.
|
|
23
27
|
*/
|
|
24
28
|
export declare function buildHintsFromConfig(config: AftConfig, disabledTools: Set<string>): string | null;
|
|
25
29
|
//# sourceMappingURL=workflow-hints.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-hints.d.ts","sourceRoot":"","sources":["../src/workflow-hints.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"workflow-hints.d.ts","sourceRoot":"","sources":["../src/workflow-hints.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,SAAS,EAAqB,MAAM,aAAa,CAAC;AAEhE,MAAM,WAAW,iBAAiB;IAChC,oEAAoE;IACpE,WAAW,EAAE,SAAS,GAAG,aAAa,GAAG,KAAK,CAAC;IAC/C,4EAA4E;IAC5E,aAAa,EAAE,OAAO,CAAC;IACvB,mEAAmE;IACnE,eAAe,EAAE,OAAO,CAAC;IACzB,wEAAwE;IACxE,qBAAqB,EAAE,OAAO,CAAC;IAC/B,4DAA4D;IAC5D,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CAC5B;AAID;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,iBAAiB,GAAG,MAAM,GAAG,IAAI,CAmEzE;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,EAAE,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,MAAM,GAAG,IAAI,CAQjG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cortexkit/aft-opencode",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.28.0",
|
|
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",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@clack/prompts": "^1.2.0",
|
|
32
|
-
"@cortexkit/aft-bridge": "0.
|
|
32
|
+
"@cortexkit/aft-bridge": "0.28.0",
|
|
33
33
|
"@opencode-ai/plugin": "^1.15.5",
|
|
34
34
|
"@opencode-ai/sdk": "^1.15.5",
|
|
35
35
|
"comment-json": "^4.6.2",
|
|
@@ -37,11 +37,12 @@
|
|
|
37
37
|
"zod": "^4.1.8"
|
|
38
38
|
},
|
|
39
39
|
"optionalDependencies": {
|
|
40
|
-
"@cortexkit/aft-darwin-arm64": "0.
|
|
41
|
-
"@cortexkit/aft-darwin-x64": "0.
|
|
42
|
-
"@cortexkit/aft-linux-arm64": "0.
|
|
43
|
-
"@cortexkit/aft-linux-x64": "0.
|
|
44
|
-
"@cortexkit/aft-win32-
|
|
40
|
+
"@cortexkit/aft-darwin-arm64": "0.28.0",
|
|
41
|
+
"@cortexkit/aft-darwin-x64": "0.28.0",
|
|
42
|
+
"@cortexkit/aft-linux-arm64": "0.28.0",
|
|
43
|
+
"@cortexkit/aft-linux-x64": "0.28.0",
|
|
44
|
+
"@cortexkit/aft-win32-arm64": "0.28.0",
|
|
45
|
+
"@cortexkit/aft-win32-x64": "0.28.0"
|
|
45
46
|
},
|
|
46
47
|
"devDependencies": {
|
|
47
48
|
"@types/node": "^22.0.0",
|
package/src/tui/index.tsx
CHANGED
|
@@ -174,12 +174,16 @@ const StatusDialog = (props: StatusDialogProps) => {
|
|
|
174
174
|
paddingTop={1}
|
|
175
175
|
paddingBottom={1}
|
|
176
176
|
>
|
|
177
|
-
{/* Title
|
|
177
|
+
{/* Title. Hide version while the lazy-spawn placeholder is showing — users
|
|
178
|
+
read `vunknown` next to "AFT Status" as broken state instead of "AFT
|
|
179
|
+
has not been used yet for this project". */}
|
|
178
180
|
<box justifyContent="center" width="100%" marginBottom={1} flexDirection="row" gap={2}>
|
|
179
181
|
<text fg={t().accent}>
|
|
180
182
|
<b>⚡ AFT Status</b>
|
|
181
183
|
</text>
|
|
182
|
-
|
|
184
|
+
{status()?.cache_role !== "not_initialized" && (
|
|
185
|
+
<text fg={t().textMuted}>v{status()?.version ?? packageJson.version}</text>
|
|
186
|
+
)}
|
|
183
187
|
</box>
|
|
184
188
|
|
|
185
189
|
{/* Error / not-yet-ready state */}
|
|
@@ -197,7 +201,8 @@ const StatusDialog = (props: StatusDialogProps) => {
|
|
|
197
201
|
{status()?.cache_role === "not_initialized" ? (
|
|
198
202
|
<box width="100%" marginTop={1} justifyContent="center">
|
|
199
203
|
<text fg={t().textMuted}>
|
|
200
|
-
{status()!.message ||
|
|
204
|
+
{status()!.message ||
|
|
205
|
+
"AFT bridge is now spawned lazily, information here will be populated after first tool call."}
|
|
201
206
|
</text>
|
|
202
207
|
</box>
|
|
203
208
|
) : null}
|
|
@@ -224,8 +229,10 @@ const StatusDialog = (props: StatusDialogProps) => {
|
|
|
224
229
|
</box>
|
|
225
230
|
) : null}
|
|
226
231
|
|
|
227
|
-
{/* 2-column body
|
|
228
|
-
|
|
232
|
+
{/* 2-column body. Gate on cache_role too so a synthetic not_initialized
|
|
233
|
+
snapshot doesn't render an empty grid of "unknown" / "—" rows
|
|
234
|
+
alongside the lazy-spawn placeholder message above. */}
|
|
235
|
+
{status() && status()!.cache_role !== "not_initialized" ? (
|
|
229
236
|
<box flexDirection="row" width="100%" gap={4}>
|
|
230
237
|
{/* Left column */}
|
|
231
238
|
<box flexDirection="column" flexGrow={1} flexBasis={0}>
|
|
@@ -540,16 +547,24 @@ async function showStartupNotifications(api: TuiPluginApi): Promise<void> {
|
|
|
540
547
|
show?: boolean;
|
|
541
548
|
version?: string;
|
|
542
549
|
features?: string[];
|
|
550
|
+
footer?: string;
|
|
543
551
|
};
|
|
544
552
|
|
|
545
553
|
if (announcement.show && announcement.version && announcement.features?.length) {
|
|
546
554
|
const featureText = announcement.features.map((f: string) => ` • ${f}`).join("\n");
|
|
555
|
+
// Blank-line separator distinguishes the persistent footer (Discord
|
|
556
|
+
// invite, etc.) from the version-specific bullets.
|
|
557
|
+
const hasFooter =
|
|
558
|
+
typeof announcement.footer === "string" && announcement.footer.trim().length > 0;
|
|
559
|
+
const message = hasFooter
|
|
560
|
+
? `What's new:\n\n${featureText}\n\n${announcement.footer}`
|
|
561
|
+
: `What's new:\n\n${featureText}`;
|
|
547
562
|
|
|
548
563
|
api.ui.dialog.replace(
|
|
549
564
|
() => (
|
|
550
565
|
<api.ui.DialogAlert
|
|
551
566
|
title={`AFT v${announcement.version}`}
|
|
552
|
-
message={
|
|
567
|
+
message={message}
|
|
553
568
|
onConfirm={() => {
|
|
554
569
|
// Mark as announced so it doesn't show again
|
|
555
570
|
void client.call("mark-announced", {});
|