@mrclrchtr/supi-review 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/node_modules/@mrclrchtr/supi-agent-runtime/README.md +2 -2
- package/node_modules/@mrclrchtr/supi-agent-runtime/node_modules/@mrclrchtr/supi-core/package.json +1 -1
- package/node_modules/@mrclrchtr/supi-agent-runtime/node_modules/@mrclrchtr/supi-core/src/config/config.ts +110 -0
- package/node_modules/@mrclrchtr/supi-agent-runtime/node_modules/@mrclrchtr/supi-core/src/config.ts +6 -1
- package/node_modules/@mrclrchtr/supi-agent-runtime/node_modules/@mrclrchtr/supi-core/src/settings/settings-schema.ts +2 -1
- package/node_modules/@mrclrchtr/supi-agent-runtime/package.json +2 -2
- package/node_modules/@mrclrchtr/supi-agent-runtime/src/lifecycle-trace.ts +5 -2
- package/node_modules/@mrclrchtr/supi-agent-runtime/src/run.ts +89 -17
- package/node_modules/@mrclrchtr/supi-agent-runtime/src/session/agent-run-registry-types.ts +1 -1
- package/node_modules/@mrclrchtr/supi-agent-runtime/src/session/agent-run-registry.ts +11 -11
- package/node_modules/@mrclrchtr/supi-agent-runtime/src/types.ts +8 -4
- package/node_modules/@mrclrchtr/supi-agent-runtime/src/ui/agents-overlay-data.ts +25 -3
- package/node_modules/@mrclrchtr/supi-agent-runtime/src/ui/agents-overlay.ts +5 -7
- package/node_modules/@mrclrchtr/supi-code-intelligence/README.md +6 -6
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-code-runtime/package.json +1 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-code-runtime/src/api.ts +1 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-code-runtime/src/query-result.ts +22 -4
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-core/package.json +1 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-core/src/config/config.ts +110 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-core/src/config.ts +6 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-core/src/settings/settings-schema.ts +2 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/README.md +29 -6
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/package.json +1 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/src/api.ts +1 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/src/query-result.ts +22 -4
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/package.json +1 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/config/config.ts +110 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/config.ts +6 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/settings/settings-schema.ts +2 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/package.json +3 -3
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/api.ts +25 -3
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/client/client-diagnostic-host.ts +2 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/client/client-diagnostic-refresh.ts +5 -2
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/client/client-diagnostics.ts +39 -6
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/client/client-document-sync.ts +82 -12
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/client/client-semantic-input-barrier.ts +28 -5
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/client/client.ts +606 -30
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/config/capabilities.ts +9 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/config/config.ts +69 -8
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/config/operation-support.ts +196 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/config/server-config.ts +15 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/config/types.ts +9 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/manager/manager-project-info.ts +2 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/manager/manager-workspace-symbol.ts +31 -2
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/manager/manager.ts +72 -2
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/provider/lsp-refactor-provider.ts +9 -43
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/provider/refactor-planning.ts +102 -50
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/provider/semantic-edit-normalizer.ts +49 -3
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/session/runtime-controller.ts +78 -18
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/session/runtime-registry.ts +46 -2
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/session/workspace-lsp-runtime.ts +14 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/workspace-path-policy.ts +30 -4
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/package.json +1 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/src/api.ts +1 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/src/query-result.ts +22 -4
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/package.json +1 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/config/config.ts +110 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/config.ts +6 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/settings/settings-schema.ts +2 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/package.json +3 -3
- package/node_modules/@mrclrchtr/supi-code-intelligence/package.json +5 -5
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/capability/capability-warnings.ts +64 -25
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/health/server-status.ts +23 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/health/signals.ts +1 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/search/ast-scan.ts +42 -8
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/search/pattern.ts +4 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/config.ts +64 -34
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/extension.ts +29 -10
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/headless.ts +1 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/find-types.ts +2 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/find-workflow.ts +5 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/health-types.ts +3 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/health-workflow.ts +10 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/session.ts +34 -2
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/substrate/lsp/lifecycle.ts +2 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/substrate/lsp/recovery.ts +3 -3
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/substrate/lsp/settings.ts +191 -108
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/substrate/workspace-provider-host.ts +50 -12
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_find/markdown.ts +12 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_find/render.ts +20 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_find/result.ts +3 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_health/markdown.ts +3 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_health/result.ts +3 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/result/types.ts +3 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/ui/status-command.ts +54 -6
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/ui/status-overlay.ts +5 -0
- 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/package.json +4 -4
- package/src/tool/review_run/spec.ts +2 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/config/lsp-settings.ts +0 -22
|
@@ -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,
|
|
@@ -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);
|
|
@@ -70,6 +70,116 @@ export interface SupiConfigOptions {
|
|
|
70
70
|
homeDir?: string;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
+
/** Options for loading automatic code-intelligence exclusions. */
|
|
74
|
+
export interface AutomaticExclusionOptions extends SupiConfigOptions {
|
|
75
|
+
/** Whether the project config is trusted and can apply. Defaults to true. */
|
|
76
|
+
projectTrusted?: boolean;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Load the one configured exclusion list shared by automatic LSP work and
|
|
81
|
+
* broad AST searches.
|
|
82
|
+
*
|
|
83
|
+
* Project values replace global values. An explicit empty project list clears
|
|
84
|
+
* the global list. The old `lsp.exclude` key is rejected in every applicable
|
|
85
|
+
* scope so automatic work cannot start without its former protection.
|
|
86
|
+
*/
|
|
87
|
+
export function loadAutomaticExclusionPatterns(
|
|
88
|
+
cwd: string,
|
|
89
|
+
options: AutomaticExclusionOptions = {},
|
|
90
|
+
): readonly string[] {
|
|
91
|
+
const projectTrusted = options.projectTrusted !== false;
|
|
92
|
+
const globalCodeIntelligence = loadSupiConfigSectionForScope("code-intelligence", cwd, {
|
|
93
|
+
scope: "global",
|
|
94
|
+
homeDir: options.homeDir,
|
|
95
|
+
});
|
|
96
|
+
const projectCodeIntelligence = projectTrusted
|
|
97
|
+
? loadSupiConfigSectionForScope("code-intelligence", cwd, { scope: "project" })
|
|
98
|
+
: null;
|
|
99
|
+
const globalLsp = loadSupiConfigSectionForScope("lsp", cwd, {
|
|
100
|
+
scope: "global",
|
|
101
|
+
homeDir: options.homeDir,
|
|
102
|
+
});
|
|
103
|
+
const projectLsp = projectTrusted
|
|
104
|
+
? loadSupiConfigSectionForScope("lsp", cwd, { scope: "project" })
|
|
105
|
+
: null;
|
|
106
|
+
|
|
107
|
+
const legacyPath = findLegacyExclusionPath(cwd, options, globalLsp, projectLsp);
|
|
108
|
+
if (legacyPath) {
|
|
109
|
+
throw new Error(
|
|
110
|
+
`Unsupported ${legacyPath.scope} configuration at ${legacyPath.path}: "lsp.exclude" was removed. Move its value to "code-intelligence.exclude". Automatic LSP and broad AST work did not start; reload after migration.`,
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
const source = findExclusionSource(cwd, options, {
|
|
115
|
+
projectTrusted,
|
|
116
|
+
globalCodeIntelligence,
|
|
117
|
+
projectCodeIntelligence,
|
|
118
|
+
});
|
|
119
|
+
return validateExclusionSource(source);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
interface ExclusionSource {
|
|
123
|
+
value: unknown;
|
|
124
|
+
path: string;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
interface LegacyExclusionPath {
|
|
128
|
+
scope: "global" | "project";
|
|
129
|
+
path: string;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
function findLegacyExclusionPath(
|
|
133
|
+
cwd: string,
|
|
134
|
+
options: AutomaticExclusionOptions,
|
|
135
|
+
globalLsp: Record<string, unknown> | null,
|
|
136
|
+
projectLsp: Record<string, unknown> | null,
|
|
137
|
+
): LegacyExclusionPath | null {
|
|
138
|
+
if (globalLsp && Object.hasOwn(globalLsp, "exclude")) {
|
|
139
|
+
return { scope: "global", path: getSupiConfigPath("global", cwd, options) };
|
|
140
|
+
}
|
|
141
|
+
if (projectLsp && Object.hasOwn(projectLsp, "exclude")) {
|
|
142
|
+
return { scope: "project", path: getSupiConfigPath("project", cwd) };
|
|
143
|
+
}
|
|
144
|
+
return null;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
function findExclusionSource(
|
|
148
|
+
cwd: string,
|
|
149
|
+
options: AutomaticExclusionOptions,
|
|
150
|
+
sections: {
|
|
151
|
+
projectTrusted: boolean;
|
|
152
|
+
globalCodeIntelligence: Record<string, unknown> | null;
|
|
153
|
+
projectCodeIntelligence: Record<string, unknown> | null;
|
|
154
|
+
},
|
|
155
|
+
): ExclusionSource | null {
|
|
156
|
+
const { projectTrusted, globalCodeIntelligence, projectCodeIntelligence } = sections;
|
|
157
|
+
if (
|
|
158
|
+
projectTrusted &&
|
|
159
|
+
projectCodeIntelligence &&
|
|
160
|
+
Object.hasOwn(projectCodeIntelligence, "exclude")
|
|
161
|
+
) {
|
|
162
|
+
return { value: projectCodeIntelligence.exclude, path: getSupiConfigPath("project", cwd) };
|
|
163
|
+
}
|
|
164
|
+
if (globalCodeIntelligence && Object.hasOwn(globalCodeIntelligence, "exclude")) {
|
|
165
|
+
return {
|
|
166
|
+
value: globalCodeIntelligence.exclude,
|
|
167
|
+
path: getSupiConfigPath("global", cwd, options),
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
return null;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
function validateExclusionSource(source: ExclusionSource | null): readonly string[] {
|
|
174
|
+
if (!source) return Object.freeze([]);
|
|
175
|
+
if (!Array.isArray(source.value) || !source.value.every((entry) => typeof entry === "string")) {
|
|
176
|
+
throw new Error(
|
|
177
|
+
`Invalid "code-intelligence.exclude" in ${source.path}: expected an array of gitignore-style strings. Automatic LSP and broad AST work did not start.`,
|
|
178
|
+
);
|
|
179
|
+
}
|
|
180
|
+
return Object.freeze([...source.value]);
|
|
181
|
+
}
|
|
182
|
+
|
|
73
183
|
/**
|
|
74
184
|
* Load and merge config for a given extension section.
|
|
75
185
|
*
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
// supi-core config domain — config loading.
|
|
2
|
-
export type {
|
|
2
|
+
export type {
|
|
3
|
+
AutomaticExclusionOptions,
|
|
4
|
+
SupiConfigLocation,
|
|
5
|
+
SupiConfigOptions,
|
|
6
|
+
} from "./config/config.ts";
|
|
3
7
|
export {
|
|
4
8
|
getSupiConfigPath,
|
|
9
|
+
loadAutomaticExclusionPatterns,
|
|
5
10
|
loadSupiConfig,
|
|
6
11
|
loadSupiConfigForScope,
|
|
7
12
|
loadSupiConfigSectionForScope,
|
|
@@ -151,6 +151,7 @@ export interface CustomField extends BaseField {
|
|
|
151
151
|
cwd: string,
|
|
152
152
|
action: SettingsAction,
|
|
153
153
|
helpers: ConfigHelpers,
|
|
154
|
+
ctx?: ExtensionContext,
|
|
154
155
|
) => void | Promise<void>;
|
|
155
156
|
}
|
|
156
157
|
|
|
@@ -404,7 +405,7 @@ async function applyConfigAction(
|
|
|
404
405
|
const helpers = createConfigHelpers(options.section, scope, cwd, options.homeDir);
|
|
405
406
|
let storedValue: unknown;
|
|
406
407
|
if (field.kind === "custom") {
|
|
407
|
-
await field.persist(scope, cwd, action, helpers);
|
|
408
|
+
await field.persist(scope, cwd, action, helpers, ctx);
|
|
408
409
|
storedValue = action.kind === "set" ? action.value : undefined;
|
|
409
410
|
} else if (action.kind === "set") {
|
|
410
411
|
storedValue = parseTypedValue(action.value, field);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mrclrchtr/supi-review",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0",
|
|
4
4
|
"description": "Parallel inspection-only reviews of exact Git targets",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
"README.md"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@mrclrchtr/supi-
|
|
35
|
-
"@mrclrchtr/supi-
|
|
36
|
-
"@mrclrchtr/supi-
|
|
34
|
+
"@mrclrchtr/supi-agent-runtime": "8.0.0",
|
|
35
|
+
"@mrclrchtr/supi-code-intelligence": "8.0.0",
|
|
36
|
+
"@mrclrchtr/supi-core": "8.0.0"
|
|
37
37
|
},
|
|
38
38
|
"bundledDependencies": [
|
|
39
39
|
"@mrclrchtr/supi-agent-runtime",
|
|
@@ -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
|
-
}
|