@mrclrchtr/supi-code-intelligence 7.4.0 → 8.0.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/README.md +6 -6
- package/node_modules/@mrclrchtr/supi-code-runtime/package.json +1 -1
- package/node_modules/@mrclrchtr/supi-code-runtime/src/api.ts +1 -1
- package/node_modules/@mrclrchtr/supi-code-runtime/src/query-result.ts +22 -4
- package/node_modules/@mrclrchtr/supi-core/package.json +1 -1
- package/node_modules/@mrclrchtr/supi-core/src/config/config.ts +110 -0
- package/node_modules/@mrclrchtr/supi-core/src/config.ts +6 -1
- package/node_modules/@mrclrchtr/supi-core/src/settings/settings-schema.ts +2 -1
- package/node_modules/@mrclrchtr/supi-lsp/README.md +29 -6
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/package.json +1 -1
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/src/api.ts +1 -1
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/src/query-result.ts +22 -4
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/package.json +1 -1
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/config/config.ts +110 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/config.ts +6 -1
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/settings/settings-schema.ts +2 -1
- package/node_modules/@mrclrchtr/supi-lsp/package.json +3 -3
- package/node_modules/@mrclrchtr/supi-lsp/src/api.ts +25 -3
- package/node_modules/@mrclrchtr/supi-lsp/src/client/client-diagnostic-host.ts +2 -1
- package/node_modules/@mrclrchtr/supi-lsp/src/client/client-diagnostic-refresh.ts +5 -2
- package/node_modules/@mrclrchtr/supi-lsp/src/client/client-diagnostics.ts +39 -6
- package/node_modules/@mrclrchtr/supi-lsp/src/client/client-document-sync.ts +82 -12
- package/node_modules/@mrclrchtr/supi-lsp/src/client/client-semantic-input-barrier.ts +28 -5
- package/node_modules/@mrclrchtr/supi-lsp/src/client/client.ts +606 -30
- package/node_modules/@mrclrchtr/supi-lsp/src/config/capabilities.ts +9 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/config/config.ts +69 -8
- package/node_modules/@mrclrchtr/supi-lsp/src/config/operation-support.ts +196 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/config/server-config.ts +15 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/config/types.ts +9 -1
- package/node_modules/@mrclrchtr/supi-lsp/src/manager/manager-project-info.ts +2 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/manager/manager-workspace-symbol.ts +31 -2
- package/node_modules/@mrclrchtr/supi-lsp/src/manager/manager.ts +72 -2
- package/node_modules/@mrclrchtr/supi-lsp/src/provider/lsp-refactor-provider.ts +9 -43
- package/node_modules/@mrclrchtr/supi-lsp/src/provider/refactor-planning.ts +102 -50
- package/node_modules/@mrclrchtr/supi-lsp/src/provider/semantic-edit-normalizer.ts +49 -3
- package/node_modules/@mrclrchtr/supi-lsp/src/session/runtime-controller.ts +78 -18
- package/node_modules/@mrclrchtr/supi-lsp/src/session/runtime-registry.ts +46 -2
- package/node_modules/@mrclrchtr/supi-lsp/src/session/workspace-lsp-runtime.ts +14 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/workspace-path-policy.ts +30 -4
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/package.json +1 -1
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/src/api.ts +1 -1
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/src/query-result.ts +22 -4
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/package.json +1 -1
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/config/config.ts +110 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/config.ts +6 -1
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/settings/settings-schema.ts +2 -1
- package/node_modules/@mrclrchtr/supi-tree-sitter/package.json +3 -3
- package/package.json +5 -5
- package/src/analysis/capability/capability-warnings.ts +64 -25
- package/src/analysis/health/server-status.ts +23 -1
- package/src/analysis/health/signals.ts +1 -0
- package/src/analysis/search/ast-scan.ts +42 -8
- package/src/analysis/search/pattern.ts +4 -0
- package/src/config.ts +64 -34
- package/src/extension.ts +29 -10
- package/src/headless.ts +1 -0
- package/src/session/find-types.ts +2 -1
- package/src/session/find-workflow.ts +5 -0
- package/src/session/health-types.ts +3 -0
- package/src/session/health-workflow.ts +10 -1
- package/src/session/session.ts +34 -2
- package/src/substrate/lsp/lifecycle.ts +2 -0
- package/src/substrate/lsp/recovery.ts +3 -3
- package/src/substrate/lsp/settings.ts +191 -108
- package/src/substrate/workspace-provider-host.ts +50 -12
- package/src/tool/code_find/markdown.ts +12 -0
- package/src/tool/code_find/render.ts +20 -0
- package/src/tool/code_find/result.ts +3 -0
- package/src/tool/code_health/markdown.ts +3 -0
- package/src/tool/code_health/result.ts +3 -1
- package/src/tool/result/types.ts +3 -1
- package/src/ui/status-command.ts +54 -6
- package/src/ui/status-overlay.ts +5 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/config/lsp-settings.ts +0 -22
package/src/ui/status-command.ts
CHANGED
|
@@ -4,8 +4,13 @@
|
|
|
4
4
|
import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
|
|
5
5
|
import { truncateToWidth } from "@earendil-works/pi-tui";
|
|
6
6
|
import { getDefaultWorkspaceRuntime } from "@mrclrchtr/supi-code-runtime/api";
|
|
7
|
-
import { getWorkspaceLspRuntime, type WorkspaceLspRuntimeState } from "@mrclrchtr/supi-lsp/api";
|
|
8
7
|
import {
|
|
8
|
+
type AutomaticLspPathPolicy,
|
|
9
|
+
getWorkspaceLspRuntime,
|
|
10
|
+
type WorkspaceLspRuntimeState,
|
|
11
|
+
} from "@mrclrchtr/supi-lsp/api";
|
|
12
|
+
import {
|
|
13
|
+
type CapabilityWarningMissingServerSource,
|
|
9
14
|
evaluateCapabilityWarnings,
|
|
10
15
|
gatherCapabilityWarningInput,
|
|
11
16
|
} from "../analysis/capability/capability-warnings.ts";
|
|
@@ -20,8 +25,20 @@ interface InspectorState {
|
|
|
20
25
|
close: (() => void) | null;
|
|
21
26
|
}
|
|
22
27
|
|
|
28
|
+
/** Owned LSP facts used by the status warning collector. */
|
|
29
|
+
export interface CiStatusWarningSource {
|
|
30
|
+
get(cwd: string): {
|
|
31
|
+
lspController: CapabilityWarningMissingServerSource | null;
|
|
32
|
+
automaticPathPolicy: AutomaticLspPathPolicy | null;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
|
|
23
36
|
/** Register the interactive /supi-ci-status overlay command. */
|
|
24
|
-
export function registerCiStatusCommand(
|
|
37
|
+
export function registerCiStatusCommand(
|
|
38
|
+
pi: ExtensionAPI,
|
|
39
|
+
homeDir?: string,
|
|
40
|
+
warningSource?: CiStatusWarningSource,
|
|
41
|
+
): void {
|
|
25
42
|
const inspector: InspectorState = { handle: null, close: null };
|
|
26
43
|
pi.registerCommand("supi-ci-status", {
|
|
27
44
|
description: "Toggle code intelligence status — LSP and structural analysis state",
|
|
@@ -31,7 +48,15 @@ export function registerCiStatusCommand(pi: ExtensionAPI): void {
|
|
|
31
48
|
return;
|
|
32
49
|
}
|
|
33
50
|
|
|
34
|
-
const dataRef = {
|
|
51
|
+
const dataRef = {
|
|
52
|
+
current: await gatherCiStatusData({
|
|
53
|
+
cwd: ctx.cwd,
|
|
54
|
+
pi,
|
|
55
|
+
projectTrusted: ctx.isProjectTrusted(),
|
|
56
|
+
homeDir,
|
|
57
|
+
warningSource,
|
|
58
|
+
}),
|
|
59
|
+
};
|
|
35
60
|
updateStatusAndWidget(ctx, dataRef.current);
|
|
36
61
|
|
|
37
62
|
// Custom footer while overlay is open — reads latest data via ref
|
|
@@ -56,7 +81,13 @@ export function registerCiStatusCommand(pi: ExtensionAPI): void {
|
|
|
56
81
|
return lspState.runtime.getOutstandingDiagnostics(maxSeverity).entries;
|
|
57
82
|
},
|
|
58
83
|
onRefresh: async () => {
|
|
59
|
-
const fresh = await gatherCiStatusData(
|
|
84
|
+
const fresh = await gatherCiStatusData({
|
|
85
|
+
cwd: ctx.cwd,
|
|
86
|
+
pi,
|
|
87
|
+
projectTrusted: ctx.isProjectTrusted(),
|
|
88
|
+
homeDir,
|
|
89
|
+
warningSource,
|
|
90
|
+
});
|
|
60
91
|
dataRef.current = fresh;
|
|
61
92
|
updateStatusAndWidget(ctx, fresh);
|
|
62
93
|
return fresh;
|
|
@@ -87,8 +118,18 @@ export function registerCiStatusCommand(pi: ExtensionAPI): void {
|
|
|
87
118
|
});
|
|
88
119
|
}
|
|
89
120
|
|
|
121
|
+
/** Inputs for one status dialog snapshot. */
|
|
122
|
+
interface GatherCiStatusOptions {
|
|
123
|
+
cwd: string;
|
|
124
|
+
pi: ExtensionAPI;
|
|
125
|
+
projectTrusted: boolean;
|
|
126
|
+
homeDir?: string;
|
|
127
|
+
warningSource?: CiStatusWarningSource;
|
|
128
|
+
}
|
|
129
|
+
|
|
90
130
|
/** Gather a snapshot of LSP and structural state for the dialog. */
|
|
91
|
-
async function gatherCiStatusData(
|
|
131
|
+
async function gatherCiStatusData(options: GatherCiStatusOptions): Promise<CiStatusData> {
|
|
132
|
+
const { cwd, pi, projectTrusted, homeDir, warningSource } = options;
|
|
92
133
|
const workspace = getDefaultWorkspaceRuntime().getWorkspace(cwd);
|
|
93
134
|
const lspState = getWorkspaceLspRuntime(cwd);
|
|
94
135
|
const serverInventoryAvailable = lspState.kind === "ready" || lspState.kind === "disabled";
|
|
@@ -118,7 +159,14 @@ async function gatherCiStatusData(cwd: string, pi: ExtensionAPI): Promise<CiStat
|
|
|
118
159
|
const activeTools = pi.getActiveTools().filter((t) => t.startsWith("code_"));
|
|
119
160
|
|
|
120
161
|
// Evaluate current Capability Warnings from available data.
|
|
121
|
-
const
|
|
162
|
+
const warningFacts = warningSource?.get(cwd);
|
|
163
|
+
const capabilityWarnings = evaluateCapabilityWarnings(
|
|
164
|
+
gatherCapabilityWarningInput(cwd, warningFacts?.lspController ?? null, {
|
|
165
|
+
projectTrusted,
|
|
166
|
+
homeDir,
|
|
167
|
+
automaticPathPolicy: warningFacts?.automaticPathPolicy ?? undefined,
|
|
168
|
+
}),
|
|
169
|
+
);
|
|
122
170
|
|
|
123
171
|
return {
|
|
124
172
|
workspaceRoot: cwd,
|
package/src/ui/status-overlay.ts
CHANGED
|
@@ -20,6 +20,7 @@ import type {
|
|
|
20
20
|
import type { CapabilityWarningReport } from "../analysis/capability/capability-warnings.ts";
|
|
21
21
|
import {
|
|
22
22
|
countProjectServerRouteStatuses,
|
|
23
|
+
formatProjectServerOperationSupport,
|
|
23
24
|
formatProjectServerRoot,
|
|
24
25
|
formatProjectServerStatusReason,
|
|
25
26
|
} from "../analysis/health/server-status.ts";
|
|
@@ -382,6 +383,10 @@ export class CiStatusDialog {
|
|
|
382
383
|
if (statusReason) {
|
|
383
384
|
container.addChild(new Text(t.fg("warning", ` ${statusReason}`), 0, 0));
|
|
384
385
|
}
|
|
386
|
+
const operationSupport = formatProjectServerOperationSupport(server.operationSupport);
|
|
387
|
+
if (operationSupport) {
|
|
388
|
+
container.addChild(new Text(t.fg("dim", ` ${operationSupport}`), 0, 0));
|
|
389
|
+
}
|
|
385
390
|
|
|
386
391
|
if (server.openFiles.length > 0) {
|
|
387
392
|
const shown = server.openFiles.slice(0, MAX_OPEN_FILES_SHOWN);
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
// LSP settings used by workspace lifecycle and automatic path policy.
|
|
2
|
-
|
|
3
|
-
import { loadSupiConfig } from "@mrclrchtr/supi-core/config";
|
|
4
|
-
|
|
5
|
-
/** Effective non-server LSP settings. */
|
|
6
|
-
export interface LspSettings {
|
|
7
|
-
exclude: string[];
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export const LSP_DEFAULTS: LspSettings = {
|
|
11
|
-
exclude: [],
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
/** Load effective LSP settings for one workspace. */
|
|
15
|
-
export function loadLspSettings(cwd: string, homeDir?: string): LspSettings {
|
|
16
|
-
const loaded = loadSupiConfig("lsp", cwd, LSP_DEFAULTS, { homeDir });
|
|
17
|
-
return {
|
|
18
|
-
exclude: Array.isArray(loaded.exclude)
|
|
19
|
-
? loaded.exclude.filter((entry): entry is string => typeof entry === "string")
|
|
20
|
-
: [],
|
|
21
|
-
};
|
|
22
|
-
}
|