@cortexkit/aft-opencode 0.27.0 → 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 +67 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +371 -95
- package/dist/lsp-auto-install.d.ts +1 -1
- 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 +103 -90
- package/dist/workflow-hints.d.ts +5 -1
- package/dist/workflow-hints.d.ts.map +1 -1
- package/package.json +9 -7
- package/src/tui/index.tsx +21 -6
- package/src/tui/sidebar.tsx +92 -66
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* installed, log a warning and keep the existing version.
|
|
20
20
|
* Otherwise skip + warn.
|
|
21
21
|
*
|
|
22
|
-
* 3. Spawn `
|
|
22
|
+
* 3. Spawn `npm install --no-save <pkg>@<version> --ignore-scripts`
|
|
23
23
|
* in the background. Drop a lockfile while running. Log progress.
|
|
24
24
|
*
|
|
25
25
|
* 4. The newly-installed binary will be picked up on the user's NEXT
|
|
@@ -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,EAAE,MAAM,CAAA;KAAE,CAAC;IACtC,KAAK,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;CACpE,CAAC;AAyBF,eAAO,MAAM,sBAAsB,KAAK,CAAC;AAEzC;;;;GAIG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,OAAO,EACf,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,UAAU,EAAE,CAAC,CAqBvB;AAqED,MAAM,WAAW,mBAAmB;IAClC,8BAA8B;IAC9B,MAAM,EAAE,OAAO,CAAC;IAChB,iDAAiD;IACjD,SAAS,EAAE,MAAM,CAAC;IAClB,sEAAsE;IACtE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,yBAAyB,GAAG,uBAAuB,GAAG,oBAAoB,CAAC;IACjF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,IAAI,CAAC,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AAED;;;GAGG;AACH,wBAAsB,eAAe,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CA0C9E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hoisted.d.ts","sourceRoot":"","sources":["../../src/tools/hoisted.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"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",
|
|
@@ -28,11 +28,12 @@ var package_default = {
|
|
|
28
28
|
test: "bun test",
|
|
29
29
|
"test:e2e": "bun test src/__tests__/e2e/",
|
|
30
30
|
lint: "biome check src",
|
|
31
|
+
schema: "bun scripts/build-schema.ts",
|
|
31
32
|
prepublishOnly: "bun run build"
|
|
32
33
|
},
|
|
33
34
|
dependencies: {
|
|
34
35
|
"@clack/prompts": "^1.2.0",
|
|
35
|
-
"@cortexkit/aft-bridge": "0.
|
|
36
|
+
"@cortexkit/aft-bridge": "0.28.0",
|
|
36
37
|
"@opencode-ai/plugin": "^1.15.5",
|
|
37
38
|
"@opencode-ai/sdk": "^1.15.5",
|
|
38
39
|
"comment-json": "^4.6.2",
|
|
@@ -40,11 +41,12 @@ var package_default = {
|
|
|
40
41
|
zod: "^4.1.8"
|
|
41
42
|
},
|
|
42
43
|
optionalDependencies: {
|
|
43
|
-
"@cortexkit/aft-darwin-arm64": "0.
|
|
44
|
-
"@cortexkit/aft-darwin-x64": "0.
|
|
45
|
-
"@cortexkit/aft-linux-arm64": "0.
|
|
46
|
-
"@cortexkit/aft-linux-x64": "0.
|
|
47
|
-
"@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"
|
|
48
50
|
},
|
|
49
51
|
devDependencies: {
|
|
50
52
|
"@types/node": "^22.0.0",
|
|
@@ -594,6 +596,7 @@ var SidebarContent = (props) => {
|
|
|
594
596
|
});
|
|
595
597
|
}, { defer: false }));
|
|
596
598
|
const s = createMemo(() => status());
|
|
599
|
+
const notInitialized = () => s()?.cache_role === "not_initialized";
|
|
597
600
|
const searchStatus = () => statusDisplay(s()?.search_index?.status ?? "disabled");
|
|
598
601
|
const semanticStatus = () => statusDisplay(s()?.semantic_index?.status ?? "disabled");
|
|
599
602
|
const trigramBytes = () => s()?.disk?.trigram_disk_bytes ?? 0;
|
|
@@ -662,7 +665,7 @@ var SidebarContent = (props) => {
|
|
|
662
665
|
}, undefined, false, undefined, this)
|
|
663
666
|
]
|
|
664
667
|
}, undefined, true, undefined, this),
|
|
665
|
-
/* @__PURE__ */ jsxDEV("text", {
|
|
668
|
+
!notInitialized() && /* @__PURE__ */ jsxDEV("text", {
|
|
666
669
|
fg: props.theme.textMuted,
|
|
667
670
|
children: [
|
|
668
671
|
"v",
|
|
@@ -682,95 +685,99 @@ var SidebarContent = (props) => {
|
|
|
682
685
|
]
|
|
683
686
|
}, undefined, true, undefined, this)
|
|
684
687
|
}, undefined, false, undefined, this),
|
|
685
|
-
|
|
688
|
+
notInitialized() && /* @__PURE__ */ jsxDEV("box", {
|
|
686
689
|
marginTop: 1,
|
|
687
690
|
width: "100%",
|
|
688
691
|
children: /* @__PURE__ */ jsxDEV("text", {
|
|
689
692
|
fg: props.theme.textMuted,
|
|
690
|
-
children: s().message || "
|
|
693
|
+
children: s().message || "AFT bridge is now spawned lazily, information here will be populated after first tool call."
|
|
691
694
|
}, undefined, false, undefined, this)
|
|
692
695
|
}, undefined, false, undefined, this),
|
|
693
|
-
/* @__PURE__ */ jsxDEV(
|
|
694
|
-
theme: props.theme,
|
|
695
|
-
title: "Search Index"
|
|
696
|
-
}, undefined, false, undefined, this),
|
|
697
|
-
/* @__PURE__ */ jsxDEV(StatRow, {
|
|
698
|
-
theme: props.theme,
|
|
699
|
-
label: "Status",
|
|
700
|
-
value: searchStatus().label,
|
|
701
|
-
tone: searchStatus().tone
|
|
702
|
-
}, undefined, false, undefined, this),
|
|
703
|
-
(s()?.search_index?.files ?? null) != null && /* @__PURE__ */ jsxDEV(StatRow, {
|
|
704
|
-
theme: props.theme,
|
|
705
|
-
label: "Files",
|
|
706
|
-
value: formatCount(s().search_index.files),
|
|
707
|
-
tone: "muted"
|
|
708
|
-
}, undefined, false, undefined, this),
|
|
709
|
-
/* @__PURE__ */ jsxDEV(StatRow, {
|
|
710
|
-
theme: props.theme,
|
|
711
|
-
label: "Disk",
|
|
712
|
-
value: formatBytes2(trigramBytes()),
|
|
713
|
-
tone: "muted"
|
|
714
|
-
}, undefined, false, undefined, this),
|
|
715
|
-
/* @__PURE__ */ jsxDEV(SectionHeader, {
|
|
716
|
-
theme: props.theme,
|
|
717
|
-
title: "Semantic Index"
|
|
718
|
-
}, undefined, false, undefined, this),
|
|
719
|
-
/* @__PURE__ */ jsxDEV(StatRow, {
|
|
720
|
-
theme: props.theme,
|
|
721
|
-
label: "Status",
|
|
722
|
-
value: semanticStatus().label,
|
|
723
|
-
tone: semanticStatus().tone
|
|
724
|
-
}, undefined, false, undefined, this),
|
|
725
|
-
s()?.semantic_index?.status === "loading" && s()?.semantic_index?.entries_total != null && s().semantic_index.entries_total > 0 && /* @__PURE__ */ jsxDEV(StatRow, {
|
|
726
|
-
theme: props.theme,
|
|
727
|
-
label: "Progress",
|
|
728
|
-
value: `${formatCount(s().semantic_index.entries_done)} / ${formatCount(s().semantic_index.entries_total)}`,
|
|
729
|
-
tone: "warn"
|
|
730
|
-
}, undefined, false, undefined, this),
|
|
731
|
-
(s()?.semantic_index?.entries ?? null) != null && /* @__PURE__ */ jsxDEV(StatRow, {
|
|
732
|
-
theme: props.theme,
|
|
733
|
-
label: "Entries",
|
|
734
|
-
value: formatCount(s().semantic_index.entries),
|
|
735
|
-
tone: "muted"
|
|
736
|
-
}, undefined, false, undefined, this),
|
|
737
|
-
/* @__PURE__ */ jsxDEV(StatRow, {
|
|
738
|
-
theme: props.theme,
|
|
739
|
-
label: "Disk",
|
|
740
|
-
value: formatBytes2(semanticBytes()),
|
|
741
|
-
tone: "muted"
|
|
742
|
-
}, undefined, false, undefined, this),
|
|
743
|
-
compressionRows().length > 0 && /* @__PURE__ */ jsxDEV(Fragment, {
|
|
696
|
+
!notInitialized() && /* @__PURE__ */ jsxDEV(Fragment, {
|
|
744
697
|
children: [
|
|
745
698
|
/* @__PURE__ */ jsxDEV(SectionHeader, {
|
|
746
699
|
theme: props.theme,
|
|
747
|
-
title: "
|
|
700
|
+
title: "Search Index"
|
|
748
701
|
}, undefined, false, undefined, this),
|
|
749
|
-
|
|
750
|
-
width: "100%",
|
|
751
|
-
children: /* @__PURE__ */ jsxDEV("text", {
|
|
752
|
-
fg: props.theme.text,
|
|
753
|
-
children: row.label
|
|
754
|
-
}, undefined, false, undefined, this)
|
|
755
|
-
}, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV(StatRow, {
|
|
702
|
+
/* @__PURE__ */ jsxDEV(StatRow, {
|
|
756
703
|
theme: props.theme,
|
|
757
|
-
label:
|
|
758
|
-
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),
|
|
759
712
|
tone: "muted"
|
|
760
|
-
}, 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)
|
|
761
779
|
]
|
|
762
|
-
}, undefined, true, undefined, this)
|
|
763
|
-
s()?.semantic_index?.status === "failed" && s()?.semantic_index?.error && /* @__PURE__ */ jsxDEV("box", {
|
|
764
|
-
marginTop: 1,
|
|
765
|
-
width: "100%",
|
|
766
|
-
children: /* @__PURE__ */ jsxDEV("text", {
|
|
767
|
-
fg: props.theme.error,
|
|
768
|
-
children: [
|
|
769
|
-
"\u26A0 ",
|
|
770
|
-
s().semantic_index.error
|
|
771
|
-
]
|
|
772
|
-
}, undefined, true, undefined, this)
|
|
773
|
-
}, undefined, false, undefined, this)
|
|
780
|
+
}, undefined, true, undefined, this)
|
|
774
781
|
]
|
|
775
782
|
}, undefined, true, undefined, this);
|
|
776
783
|
};
|
|
@@ -913,7 +920,7 @@ var StatusDialog = (props) => {
|
|
|
913
920
|
children: "\u26A1 AFT Status"
|
|
914
921
|
}, undefined, false, undefined, this)
|
|
915
922
|
}, undefined, false, undefined, this),
|
|
916
|
-
/* @__PURE__ */ jsxDEV2("text", {
|
|
923
|
+
status()?.cache_role !== "not_initialized" && /* @__PURE__ */ jsxDEV2("text", {
|
|
917
924
|
fg: t().textMuted,
|
|
918
925
|
children: [
|
|
919
926
|
"v",
|
|
@@ -936,7 +943,7 @@ var StatusDialog = (props) => {
|
|
|
936
943
|
justifyContent: "center",
|
|
937
944
|
children: /* @__PURE__ */ jsxDEV2("text", {
|
|
938
945
|
fg: t().textMuted,
|
|
939
|
-
children: status().message || "
|
|
946
|
+
children: status().message || "AFT bridge is now spawned lazily, information here will be populated after first tool call."
|
|
940
947
|
}, undefined, false, undefined, this)
|
|
941
948
|
}, undefined, false, undefined, this) : null,
|
|
942
949
|
status() && status().cache_role !== "not_initialized" ? /* @__PURE__ */ jsxDEV2("box", {
|
|
@@ -962,7 +969,7 @@ var StatusDialog = (props) => {
|
|
|
962
969
|
}, undefined, false, undefined, this)
|
|
963
970
|
]
|
|
964
971
|
}, undefined, true, undefined, this) : null,
|
|
965
|
-
status() ? /* @__PURE__ */ jsxDEV2("box", {
|
|
972
|
+
status() && status().cache_role !== "not_initialized" ? /* @__PURE__ */ jsxDEV2("box", {
|
|
966
973
|
flexDirection: "row",
|
|
967
974
|
width: "100%",
|
|
968
975
|
gap: 4,
|
|
@@ -1288,11 +1295,17 @@ async function showStartupNotifications(api) {
|
|
|
1288
1295
|
if (announcement.show && announcement.version && announcement.features?.length) {
|
|
1289
1296
|
const featureText = announcement.features.map((f) => ` \u2022 ${f}`).join(`
|
|
1290
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}`;
|
|
1291
1306
|
api.ui.dialog.replace(() => /* @__PURE__ */ jsxDEV2(api.ui.DialogAlert, {
|
|
1292
1307
|
title: `AFT v${announcement.version}`,
|
|
1293
|
-
message
|
|
1294
|
-
|
|
1295
|
-
${featureText}`,
|
|
1308
|
+
message,
|
|
1296
1309
|
onConfirm: () => {
|
|
1297
1310
|
client.call("mark-announced", {});
|
|
1298
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",
|
|
@@ -24,11 +24,12 @@
|
|
|
24
24
|
"test": "bun test",
|
|
25
25
|
"test:e2e": "bun test src/__tests__/e2e/",
|
|
26
26
|
"lint": "biome check src",
|
|
27
|
+
"schema": "bun scripts/build-schema.ts",
|
|
27
28
|
"prepublishOnly": "bun run build"
|
|
28
29
|
},
|
|
29
30
|
"dependencies": {
|
|
30
31
|
"@clack/prompts": "^1.2.0",
|
|
31
|
-
"@cortexkit/aft-bridge": "0.
|
|
32
|
+
"@cortexkit/aft-bridge": "0.28.0",
|
|
32
33
|
"@opencode-ai/plugin": "^1.15.5",
|
|
33
34
|
"@opencode-ai/sdk": "^1.15.5",
|
|
34
35
|
"comment-json": "^4.6.2",
|
|
@@ -36,11 +37,12 @@
|
|
|
36
37
|
"zod": "^4.1.8"
|
|
37
38
|
},
|
|
38
39
|
"optionalDependencies": {
|
|
39
|
-
"@cortexkit/aft-darwin-arm64": "0.
|
|
40
|
-
"@cortexkit/aft-darwin-x64": "0.
|
|
41
|
-
"@cortexkit/aft-linux-arm64": "0.
|
|
42
|
-
"@cortexkit/aft-linux-x64": "0.
|
|
43
|
-
"@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"
|
|
44
46
|
},
|
|
45
47
|
"devDependencies": {
|
|
46
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", {});
|