@ai-agent-forge/plugin-lsp-diagnostics 0.85.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 +41 -0
- package/agent-forge.json +12 -0
- package/dist/capability.d.ts +5 -0
- package/dist/capability.d.ts.map +1 -0
- package/dist/capability.js +185 -0
- package/dist/capability.js.map +1 -0
- package/dist/entry.d.ts +12 -0
- package/dist/entry.d.ts.map +1 -0
- package/dist/entry.js +13 -0
- package/dist/entry.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/node-adapter.d.ts +13 -0
- package/dist/node-adapter.d.ts.map +1 -0
- package/dist/node-adapter.js +404 -0
- package/dist/node-adapter.js.map +1 -0
- package/dist/node-lsp-real-host.d.ts +38 -0
- package/dist/node-lsp-real-host.d.ts.map +1 -0
- package/dist/node-lsp-real-host.js +396 -0
- package/dist/node-lsp-real-host.js.map +1 -0
- package/dist/shell-utils.d.ts +15 -0
- package/dist/shell-utils.d.ts.map +1 -0
- package/dist/shell-utils.js +43 -0
- package/dist/shell-utils.js.map +1 -0
- package/dist/types.d.ts +105 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +6 -0
- package/dist/types.js.map +1 -0
- package/package.json +55 -0
- package/plugin.json +9 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAEnF,eAAO,MAAM,4BAA4B,sCAAgD,CAAC;AAC1F,eAAO,MAAM,qCAAqC,GAAa,CAAC;AAChE,eAAO,MAAM,kCAAkC,YAAsB,CAAC;AACtE,eAAO,MAAM,uCAAuC,SAAmB,CAAC;AACxE,eAAO,MAAM,4BAA4B,KAAe,CAAC;AAEzD,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EtC,MAAM,WAAW,uBAAuB;IACvC,QAAQ,CAAC,QAAQ,CAAC,EAAE,oBAAoB,CAAC;IACzC,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;IAC9B,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;CACnC;AAED,MAAM,WAAW,uBAAuB;IACvC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,GAAG,CAAC,OAAO,EAAE,uBAAuB,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;CAC7F;AAED,MAAM,WAAW,yBAAyB;IACzC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,MAAM,EAAE,yBAAyB,CAAC;CAC3C;AAED,MAAM,WAAW,8BAA8B;IAC9C,QAAQ,CAAC,EAAE,EAAE,OAAO,4BAA4B,CAAC;IACjD,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,UAAU,EAAE,GAAG,CAAC;IACzB,QAAQ,CAAC,cAAc,EAAE,SAAS,CAAC;QAAE,QAAQ,CAAC,EAAE,EAAE,iBAAiB,CAAC;QAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAA;KAAE,CAAC,CAAC;CAC5F","sourcesContent":["import type { PluginErrorV1, PluginResultStatusV1 } from \"@agent-forge/plugin-sdk\";\n\nexport const LSP_DIAGNOSTICS_PLUGIN_ID_V1 = \"agent-forge.plugin.lsp-diagnostics\" as const;\nexport const LSP_DIAGNOSTICS_CAPABILITY_VERSION_V1 = 1 as const;\nexport const LSP_DIAGNOSTICS_HOST_ADAPTER_ID_V1 = \"node-lsp\" as const;\nexport const LSP_DIAGNOSTICS_HOST_ADAPTER_VERSION_V1 = \"1.0.0\" as const;\nexport const LSP_DIAGNOSTICS_MAX_ITEMS_V1 = 128 as const;\n\nexport type LspDiagnosticSeverityV1 = \"error\" | \"warning\" | \"info\" | \"hint\";\n\nexport interface LspDiagnosticPositionV1 {\n\treadonly line: number;\n\treadonly column: number;\n}\n\nexport interface LspDiagnosticRangeV1 {\n\treadonly start: LspDiagnosticPositionV1;\n\treadonly end: LspDiagnosticPositionV1;\n}\n\n/** Opaque model request. The host resolves refs to a language-server session. */\nexport interface LspDiagnosticsRequestV1 {\n\treadonly version: 1;\n\treadonly operationId: string;\n\t/** Opaque host-owned workspace handle; never a path. */\n\treadonly workspaceRef: string;\n\treadonly language: string;\n\t/** Opaque host-owned document handle; never source text or a path. */\n\treadonly documentRef: string;\n\t/**\n\t * Workspace-relative file identifier the real host opens in the language\n\t * server. Optional: deterministic fixture hosts can ignore it, the real\n\t * host requires it, and it never carries an absolute or host path.\n\t */\n\treadonly documentPath?: string;\n\treadonly diagnosticsLimit?: number;\n}\n\n/** Model-visible diagnostic. `file` is a relative identifier, never a host path. */\nexport interface LspDiagnosticV1 {\n\treadonly file: string;\n\treadonly range: LspDiagnosticRangeV1;\n\treadonly severity: LspDiagnosticSeverityV1;\n\treadonly code?: string | number;\n\treadonly source?: string;\n\treadonly message: string;\n}\n\nexport interface LspDiagnosticsSummaryV1 {\n\treadonly total: number;\n\treadonly error: number;\n\treadonly warning: number;\n\treadonly info: number;\n\treadonly hint: number;\n}\n\nexport interface LspDiagnosticsResultV1 {\n\treadonly version: 1;\n\treadonly operationId: string;\n\treadonly status: PluginResultStatusV1;\n\treadonly summary: LspDiagnosticsSummaryV1;\n\treadonly diagnostics: readonly LspDiagnosticV1[];\n\treadonly diagnosticsTruncated: boolean;\n\treadonly reportArtifactRef?: string;\n\treadonly error?: PluginErrorV1;\n}\n\n/** Host-private session identity. It intentionally exposes no path, argv, cwd, or environment. */\nexport interface LspSessionV1 {\n\treadonly sessionRef: string;\n}\n\nexport interface LspSessionResolverV1 {\n\tresolve(request: LspDiagnosticsRequestV1, signal?: AbortSignal): Promise<LspSessionV1 | undefined>;\n}\n\nexport interface LspClientV1 {\n\tdiagnose(\n\t\tinput: {\n\t\t\treadonly session: LspSessionV1;\n\t\t\treadonly request: LspDiagnosticsRequestV1;\n\t\t},\n\t\tsignal?: AbortSignal,\n\t): Promise<LspHostDiagnosticResultV1>;\n}\n\n/** Host output before the adapter applies strict model-facing projection. */\nexport type LspHostDiagnosticResultV1 =\n\t| {\n\t\t\treadonly status: \"completed\";\n\t\t\treadonly diagnostics?: readonly unknown[];\n\t\t\treadonly reportArtifactRef?: unknown;\n\t }\n\t| { readonly status: \"unsupported\" };\n\nexport interface NodeLspAdapterOptionsV1 {\n\treadonly resolver?: LspSessionResolverV1;\n\treadonly client?: LspClientV1;\n\treadonly defaultTimeoutMs?: number;\n}\n\nexport interface LspDiagnosticsAdapterV1 {\n\treadonly adapterId: string;\n\treadonly adapterVersion: string;\n\trun(request: LspDiagnosticsRequestV1, signal?: AbortSignal): Promise<LspDiagnosticsResultV1>;\n}\n\nexport interface LspDeterministicFixtureV1 {\n\treadonly workspaceRef: string;\n\treadonly language: string;\n\treadonly documentRef: string;\n\treadonly result: LspHostDiagnosticResultV1;\n}\n\nexport interface LspDiagnosticsPluginManifestV1 {\n\treadonly id: typeof LSP_DIAGNOSTICS_PLUGIN_ID_V1;\n\treadonly pluginVersion: string;\n\treadonly apiVersion: \"1\";\n\treadonly capabilityRefs: readonly [{ readonly id: \"lsp.diagnostics\"; readonly version: 1 }];\n}\n"]}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export const LSP_DIAGNOSTICS_PLUGIN_ID_V1 = "agent-forge.plugin.lsp-diagnostics";
|
|
2
|
+
export const LSP_DIAGNOSTICS_CAPABILITY_VERSION_V1 = 1;
|
|
3
|
+
export const LSP_DIAGNOSTICS_HOST_ADAPTER_ID_V1 = "node-lsp";
|
|
4
|
+
export const LSP_DIAGNOSTICS_HOST_ADAPTER_VERSION_V1 = "1.0.0";
|
|
5
|
+
export const LSP_DIAGNOSTICS_MAX_ITEMS_V1 = 128;
|
|
6
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,4BAA4B,GAAG,oCAA6C,CAAC;AAC1F,MAAM,CAAC,MAAM,qCAAqC,GAAG,CAAU,CAAC;AAChE,MAAM,CAAC,MAAM,kCAAkC,GAAG,UAAmB,CAAC;AACtE,MAAM,CAAC,MAAM,uCAAuC,GAAG,OAAgB,CAAC;AACxE,MAAM,CAAC,MAAM,4BAA4B,GAAG,GAAY,CAAC","sourcesContent":["import type { PluginErrorV1, PluginResultStatusV1 } from \"@agent-forge/plugin-sdk\";\n\nexport const LSP_DIAGNOSTICS_PLUGIN_ID_V1 = \"agent-forge.plugin.lsp-diagnostics\" as const;\nexport const LSP_DIAGNOSTICS_CAPABILITY_VERSION_V1 = 1 as const;\nexport const LSP_DIAGNOSTICS_HOST_ADAPTER_ID_V1 = \"node-lsp\" as const;\nexport const LSP_DIAGNOSTICS_HOST_ADAPTER_VERSION_V1 = \"1.0.0\" as const;\nexport const LSP_DIAGNOSTICS_MAX_ITEMS_V1 = 128 as const;\n\nexport type LspDiagnosticSeverityV1 = \"error\" | \"warning\" | \"info\" | \"hint\";\n\nexport interface LspDiagnosticPositionV1 {\n\treadonly line: number;\n\treadonly column: number;\n}\n\nexport interface LspDiagnosticRangeV1 {\n\treadonly start: LspDiagnosticPositionV1;\n\treadonly end: LspDiagnosticPositionV1;\n}\n\n/** Opaque model request. The host resolves refs to a language-server session. */\nexport interface LspDiagnosticsRequestV1 {\n\treadonly version: 1;\n\treadonly operationId: string;\n\t/** Opaque host-owned workspace handle; never a path. */\n\treadonly workspaceRef: string;\n\treadonly language: string;\n\t/** Opaque host-owned document handle; never source text or a path. */\n\treadonly documentRef: string;\n\t/**\n\t * Workspace-relative file identifier the real host opens in the language\n\t * server. Optional: deterministic fixture hosts can ignore it, the real\n\t * host requires it, and it never carries an absolute or host path.\n\t */\n\treadonly documentPath?: string;\n\treadonly diagnosticsLimit?: number;\n}\n\n/** Model-visible diagnostic. `file` is a relative identifier, never a host path. */\nexport interface LspDiagnosticV1 {\n\treadonly file: string;\n\treadonly range: LspDiagnosticRangeV1;\n\treadonly severity: LspDiagnosticSeverityV1;\n\treadonly code?: string | number;\n\treadonly source?: string;\n\treadonly message: string;\n}\n\nexport interface LspDiagnosticsSummaryV1 {\n\treadonly total: number;\n\treadonly error: number;\n\treadonly warning: number;\n\treadonly info: number;\n\treadonly hint: number;\n}\n\nexport interface LspDiagnosticsResultV1 {\n\treadonly version: 1;\n\treadonly operationId: string;\n\treadonly status: PluginResultStatusV1;\n\treadonly summary: LspDiagnosticsSummaryV1;\n\treadonly diagnostics: readonly LspDiagnosticV1[];\n\treadonly diagnosticsTruncated: boolean;\n\treadonly reportArtifactRef?: string;\n\treadonly error?: PluginErrorV1;\n}\n\n/** Host-private session identity. It intentionally exposes no path, argv, cwd, or environment. */\nexport interface LspSessionV1 {\n\treadonly sessionRef: string;\n}\n\nexport interface LspSessionResolverV1 {\n\tresolve(request: LspDiagnosticsRequestV1, signal?: AbortSignal): Promise<LspSessionV1 | undefined>;\n}\n\nexport interface LspClientV1 {\n\tdiagnose(\n\t\tinput: {\n\t\t\treadonly session: LspSessionV1;\n\t\t\treadonly request: LspDiagnosticsRequestV1;\n\t\t},\n\t\tsignal?: AbortSignal,\n\t): Promise<LspHostDiagnosticResultV1>;\n}\n\n/** Host output before the adapter applies strict model-facing projection. */\nexport type LspHostDiagnosticResultV1 =\n\t| {\n\t\t\treadonly status: \"completed\";\n\t\t\treadonly diagnostics?: readonly unknown[];\n\t\t\treadonly reportArtifactRef?: unknown;\n\t }\n\t| { readonly status: \"unsupported\" };\n\nexport interface NodeLspAdapterOptionsV1 {\n\treadonly resolver?: LspSessionResolverV1;\n\treadonly client?: LspClientV1;\n\treadonly defaultTimeoutMs?: number;\n}\n\nexport interface LspDiagnosticsAdapterV1 {\n\treadonly adapterId: string;\n\treadonly adapterVersion: string;\n\trun(request: LspDiagnosticsRequestV1, signal?: AbortSignal): Promise<LspDiagnosticsResultV1>;\n}\n\nexport interface LspDeterministicFixtureV1 {\n\treadonly workspaceRef: string;\n\treadonly language: string;\n\treadonly documentRef: string;\n\treadonly result: LspHostDiagnosticResultV1;\n}\n\nexport interface LspDiagnosticsPluginManifestV1 {\n\treadonly id: typeof LSP_DIAGNOSTICS_PLUGIN_ID_V1;\n\treadonly pluginVersion: string;\n\treadonly apiVersion: \"1\";\n\treadonly capabilityRefs: readonly [{ readonly id: \"lsp.diagnostics\"; readonly version: 1 }];\n}\n"]}
|
package/package.json
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ai-agent-forge/plugin-lsp-diagnostics",
|
|
3
|
+
"version": "0.85.0",
|
|
4
|
+
"description": "LSP diagnostics capability plugin for Agent Forge (read-only lsp_diagnostics tool)",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist",
|
|
16
|
+
"agent-forge.json",
|
|
17
|
+
"plugin.json",
|
|
18
|
+
"README.md"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"clean": "shx rm -rf dist",
|
|
22
|
+
"build": "tsgo -p tsconfig.build.json",
|
|
23
|
+
"test": "vitest --run",
|
|
24
|
+
"prepublishOnly": "npm run clean && npm run build"
|
|
25
|
+
},
|
|
26
|
+
"keywords": [
|
|
27
|
+
"agent-forge",
|
|
28
|
+
"plugin",
|
|
29
|
+
"lsp",
|
|
30
|
+
"diagnostics"
|
|
31
|
+
],
|
|
32
|
+
"author": "Agent Forge contributors",
|
|
33
|
+
"license": "MIT",
|
|
34
|
+
"repository": {
|
|
35
|
+
"type": "git",
|
|
36
|
+
"url": "git+https://github.com/agent-forge/agent-forge.git",
|
|
37
|
+
"directory": "plugins/lsp-diagnostics"
|
|
38
|
+
},
|
|
39
|
+
"bugs": {
|
|
40
|
+
"url": "https://github.com/agent-forge/agent-forge/issues"
|
|
41
|
+
},
|
|
42
|
+
"homepage": "https://github.com/agent-forge/agent-forge#readme",
|
|
43
|
+
"engines": {
|
|
44
|
+
"node": ">=22.19.0"
|
|
45
|
+
},
|
|
46
|
+
"dependencies": {
|
|
47
|
+
"@agent-forge/plugin-sdk": "^0.85.0",
|
|
48
|
+
"typebox": "1.3.27"
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@agent-forge/agent-forge": "^0.85.0",
|
|
52
|
+
"shx": "0.4.0",
|
|
53
|
+
"vitest": "4.1.9"
|
|
54
|
+
}
|
|
55
|
+
}
|
package/plugin.json
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "agent-forge.plugin.lsp-diagnostics",
|
|
3
|
+
"version": "0.84.4",
|
|
4
|
+
"apiVersion": "1-draft",
|
|
5
|
+
"entry": "./dist/entry.js",
|
|
6
|
+
"hostVersion": ">=0.84.4",
|
|
7
|
+
"requiredCapabilities": ["tools"],
|
|
8
|
+
"provides": [{ "id": "lsp.diagnostics", "version": 1, "kind": "contribution" }]
|
|
9
|
+
}
|