@mrclrchtr/supi-lsp 1.12.1 → 1.13.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-code-runtime/node_modules/@mrclrchtr/supi-core/package.json +2 -1
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/api.ts +2 -0
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/footer-registry.ts +57 -0
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/index.ts +2 -0
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/registry-utils.ts +8 -1
- package/node_modules/@mrclrchtr/supi-code-runtime/package.json +2 -2
- package/node_modules/@mrclrchtr/supi-core/package.json +2 -1
- package/node_modules/@mrclrchtr/supi-core/src/api.ts +2 -0
- package/node_modules/@mrclrchtr/supi-core/src/footer-registry.ts +57 -0
- package/node_modules/@mrclrchtr/supi-core/src/index.ts +2 -0
- package/node_modules/@mrclrchtr/supi-core/src/registry-utils.ts +8 -1
- package/package.json +3 -3
package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mrclrchtr/supi-core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.0",
|
|
4
4
|
"description": "SuPi core — shared infrastructure for SuPi extensions (XML context tags, config system)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
"./config": "./src/config.ts",
|
|
45
45
|
"./context": "./src/context.ts",
|
|
46
46
|
"./debug": "./src/debug-registry.ts",
|
|
47
|
+
"./footer-registry": "./src/footer-registry.ts",
|
|
47
48
|
"./llm": "./src/llm.ts",
|
|
48
49
|
"./package.json": "./package.json",
|
|
49
50
|
"./path": "./src/path.ts",
|
package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/api.ts
CHANGED
|
@@ -13,6 +13,8 @@ export * from "./context.ts";
|
|
|
13
13
|
// biome-ignore lint/performance/noReExportAll: intentional convenience barrel
|
|
14
14
|
export * from "./debug-registry.ts";
|
|
15
15
|
// biome-ignore lint/performance/noReExportAll: intentional convenience barrel
|
|
16
|
+
export * from "./footer-registry.ts";
|
|
17
|
+
// biome-ignore lint/performance/noReExportAll: intentional convenience barrel
|
|
16
18
|
export * from "./llm.ts";
|
|
17
19
|
// biome-ignore lint/performance/noReExportAll: intentional convenience barrel
|
|
18
20
|
export * from "./path.ts";
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// Shared footer contribution registry for SuPi extensions.
|
|
2
|
+
//
|
|
3
|
+
// Extensions register pre-styled text chunks with a placement hint
|
|
4
|
+
// ("stats" for the metrics line, "status" for the extension status line).
|
|
5
|
+
// The custom footer in supi-extras (or PI's built-in footer) reads these
|
|
6
|
+
// contributions and renders them alongside the built-in metrics.
|
|
7
|
+
|
|
8
|
+
import { createRegistry } from "./registry-utils.ts";
|
|
9
|
+
|
|
10
|
+
/** Where the contribution should appear in the footer. */
|
|
11
|
+
export type FooterPlacement = "stats" | "status";
|
|
12
|
+
|
|
13
|
+
/** A single footer contribution registered by an extension. */
|
|
14
|
+
export interface FooterContribution {
|
|
15
|
+
/** Unique key for this contribution. Re-registering with the same key replaces it. */
|
|
16
|
+
key: string;
|
|
17
|
+
/** Which footer line this belongs on. */
|
|
18
|
+
placement: FooterPlacement;
|
|
19
|
+
/**
|
|
20
|
+
* Sort order within the placement (lower values render further left). Default: 100.
|
|
21
|
+
* Priority 0 is reserved for the turn cache-hit part so it stays adjacent to CH.
|
|
22
|
+
*/
|
|
23
|
+
priority?: number;
|
|
24
|
+
/** Return the pre-styled text for this contribution. Called on every render. */
|
|
25
|
+
render: () => string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const registry = createRegistry<FooterContribution>("footer-contributions");
|
|
29
|
+
|
|
30
|
+
function sortByPriority(a: FooterContribution, b: FooterContribution): number {
|
|
31
|
+
return (a.priority ?? 100) - (b.priority ?? 100);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export const footerContributions = {
|
|
35
|
+
/** Register or replace a footer contribution. */
|
|
36
|
+
register(contribution: FooterContribution): void {
|
|
37
|
+
registry.register(contribution.key, contribution);
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
/** Remove a contribution (e.g. on session_shutdown or when disabled). */
|
|
41
|
+
unregister(key: string): void {
|
|
42
|
+
registry.unregister(key);
|
|
43
|
+
},
|
|
44
|
+
|
|
45
|
+
/** Get contributions for a specific placement, sorted by priority. */
|
|
46
|
+
getByPlacement(placement: FooterPlacement): FooterContribution[] {
|
|
47
|
+
return registry
|
|
48
|
+
.getAll()
|
|
49
|
+
.filter((c) => c.placement === placement)
|
|
50
|
+
.sort(sortByPriority);
|
|
51
|
+
},
|
|
52
|
+
|
|
53
|
+
/** Remove all contributions (primarily for tests). */
|
|
54
|
+
clear(): void {
|
|
55
|
+
registry.clear();
|
|
56
|
+
},
|
|
57
|
+
};
|
package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/index.ts
CHANGED
|
@@ -13,6 +13,8 @@ export * from "./context.ts";
|
|
|
13
13
|
// biome-ignore lint/performance/noReExportAll: intentional convenience barrel
|
|
14
14
|
export * from "./debug-registry.ts";
|
|
15
15
|
// biome-ignore lint/performance/noReExportAll: intentional convenience barrel
|
|
16
|
+
export * from "./footer-registry.ts";
|
|
17
|
+
// biome-ignore lint/performance/noReExportAll: intentional convenience barrel
|
|
16
18
|
export * from "./path.ts";
|
|
17
19
|
// biome-ignore lint/performance/noReExportAll: intentional convenience barrel
|
|
18
20
|
export * from "./project.ts";
|
|
@@ -27,7 +27,7 @@ function getGlobalRegistryMap<T>(name: string): Map<string, T> {
|
|
|
27
27
|
*
|
|
28
28
|
* @typeParam T - The value type stored in the registry.
|
|
29
29
|
* @param name - Unique registry name (used to construct the `Symbol.for` key).
|
|
30
|
-
* @returns An object with `register`, `getAll`, and `clear` functions.
|
|
30
|
+
* @returns An object with `register`, `unregister`, `getAll`, and `clear` functions.
|
|
31
31
|
*/
|
|
32
32
|
export function createRegistry<T>(name: string) {
|
|
33
33
|
const getMap = (): Map<string, T> => getGlobalRegistryMap<T>(name);
|
|
@@ -40,6 +40,13 @@ export function createRegistry<T>(name: string) {
|
|
|
40
40
|
getMap().set(id, value);
|
|
41
41
|
},
|
|
42
42
|
|
|
43
|
+
/**
|
|
44
|
+
* Remove a registration by id. No-op if not registered.
|
|
45
|
+
*/
|
|
46
|
+
unregister: (id: string): void => {
|
|
47
|
+
getMap().delete(id);
|
|
48
|
+
},
|
|
49
|
+
|
|
43
50
|
/**
|
|
44
51
|
* Get all registered values in registration order.
|
|
45
52
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mrclrchtr/supi-code-runtime",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.0",
|
|
4
4
|
"description": "SuPi code-runtime — shared workspace context, capability contracts, and canonical types for the code-understanding stack",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"!__tests__"
|
|
20
20
|
],
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@mrclrchtr/supi-core": "1.
|
|
22
|
+
"@mrclrchtr/supi-core": "1.13.0"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"@earendil-works/pi-coding-agent": "*"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mrclrchtr/supi-core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.0",
|
|
4
4
|
"description": "SuPi core — shared infrastructure for SuPi extensions (XML context tags, config system)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
"./config": "./src/config.ts",
|
|
45
45
|
"./context": "./src/context.ts",
|
|
46
46
|
"./debug": "./src/debug-registry.ts",
|
|
47
|
+
"./footer-registry": "./src/footer-registry.ts",
|
|
47
48
|
"./llm": "./src/llm.ts",
|
|
48
49
|
"./package.json": "./package.json",
|
|
49
50
|
"./path": "./src/path.ts",
|
|
@@ -13,6 +13,8 @@ export * from "./context.ts";
|
|
|
13
13
|
// biome-ignore lint/performance/noReExportAll: intentional convenience barrel
|
|
14
14
|
export * from "./debug-registry.ts";
|
|
15
15
|
// biome-ignore lint/performance/noReExportAll: intentional convenience barrel
|
|
16
|
+
export * from "./footer-registry.ts";
|
|
17
|
+
// biome-ignore lint/performance/noReExportAll: intentional convenience barrel
|
|
16
18
|
export * from "./llm.ts";
|
|
17
19
|
// biome-ignore lint/performance/noReExportAll: intentional convenience barrel
|
|
18
20
|
export * from "./path.ts";
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// Shared footer contribution registry for SuPi extensions.
|
|
2
|
+
//
|
|
3
|
+
// Extensions register pre-styled text chunks with a placement hint
|
|
4
|
+
// ("stats" for the metrics line, "status" for the extension status line).
|
|
5
|
+
// The custom footer in supi-extras (or PI's built-in footer) reads these
|
|
6
|
+
// contributions and renders them alongside the built-in metrics.
|
|
7
|
+
|
|
8
|
+
import { createRegistry } from "./registry-utils.ts";
|
|
9
|
+
|
|
10
|
+
/** Where the contribution should appear in the footer. */
|
|
11
|
+
export type FooterPlacement = "stats" | "status";
|
|
12
|
+
|
|
13
|
+
/** A single footer contribution registered by an extension. */
|
|
14
|
+
export interface FooterContribution {
|
|
15
|
+
/** Unique key for this contribution. Re-registering with the same key replaces it. */
|
|
16
|
+
key: string;
|
|
17
|
+
/** Which footer line this belongs on. */
|
|
18
|
+
placement: FooterPlacement;
|
|
19
|
+
/**
|
|
20
|
+
* Sort order within the placement (lower values render further left). Default: 100.
|
|
21
|
+
* Priority 0 is reserved for the turn cache-hit part so it stays adjacent to CH.
|
|
22
|
+
*/
|
|
23
|
+
priority?: number;
|
|
24
|
+
/** Return the pre-styled text for this contribution. Called on every render. */
|
|
25
|
+
render: () => string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const registry = createRegistry<FooterContribution>("footer-contributions");
|
|
29
|
+
|
|
30
|
+
function sortByPriority(a: FooterContribution, b: FooterContribution): number {
|
|
31
|
+
return (a.priority ?? 100) - (b.priority ?? 100);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export const footerContributions = {
|
|
35
|
+
/** Register or replace a footer contribution. */
|
|
36
|
+
register(contribution: FooterContribution): void {
|
|
37
|
+
registry.register(contribution.key, contribution);
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
/** Remove a contribution (e.g. on session_shutdown or when disabled). */
|
|
41
|
+
unregister(key: string): void {
|
|
42
|
+
registry.unregister(key);
|
|
43
|
+
},
|
|
44
|
+
|
|
45
|
+
/** Get contributions for a specific placement, sorted by priority. */
|
|
46
|
+
getByPlacement(placement: FooterPlacement): FooterContribution[] {
|
|
47
|
+
return registry
|
|
48
|
+
.getAll()
|
|
49
|
+
.filter((c) => c.placement === placement)
|
|
50
|
+
.sort(sortByPriority);
|
|
51
|
+
},
|
|
52
|
+
|
|
53
|
+
/** Remove all contributions (primarily for tests). */
|
|
54
|
+
clear(): void {
|
|
55
|
+
registry.clear();
|
|
56
|
+
},
|
|
57
|
+
};
|
|
@@ -13,6 +13,8 @@ export * from "./context.ts";
|
|
|
13
13
|
// biome-ignore lint/performance/noReExportAll: intentional convenience barrel
|
|
14
14
|
export * from "./debug-registry.ts";
|
|
15
15
|
// biome-ignore lint/performance/noReExportAll: intentional convenience barrel
|
|
16
|
+
export * from "./footer-registry.ts";
|
|
17
|
+
// biome-ignore lint/performance/noReExportAll: intentional convenience barrel
|
|
16
18
|
export * from "./path.ts";
|
|
17
19
|
// biome-ignore lint/performance/noReExportAll: intentional convenience barrel
|
|
18
20
|
export * from "./project.ts";
|
|
@@ -27,7 +27,7 @@ function getGlobalRegistryMap<T>(name: string): Map<string, T> {
|
|
|
27
27
|
*
|
|
28
28
|
* @typeParam T - The value type stored in the registry.
|
|
29
29
|
* @param name - Unique registry name (used to construct the `Symbol.for` key).
|
|
30
|
-
* @returns An object with `register`, `getAll`, and `clear` functions.
|
|
30
|
+
* @returns An object with `register`, `unregister`, `getAll`, and `clear` functions.
|
|
31
31
|
*/
|
|
32
32
|
export function createRegistry<T>(name: string) {
|
|
33
33
|
const getMap = (): Map<string, T> => getGlobalRegistryMap<T>(name);
|
|
@@ -40,6 +40,13 @@ export function createRegistry<T>(name: string) {
|
|
|
40
40
|
getMap().set(id, value);
|
|
41
41
|
},
|
|
42
42
|
|
|
43
|
+
/**
|
|
44
|
+
* Remove a registration by id. No-op if not registered.
|
|
45
|
+
*/
|
|
46
|
+
unregister: (id: string): void => {
|
|
47
|
+
getMap().delete(id);
|
|
48
|
+
},
|
|
49
|
+
|
|
43
50
|
/**
|
|
44
51
|
* Get all registered values in registration order.
|
|
45
52
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mrclrchtr/supi-lsp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.0",
|
|
4
4
|
"description": "SuPi LSP extension — Language Server Protocol integration for pi",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"vscode-jsonrpc": "^9.0.0",
|
|
27
27
|
"vscode-languageserver-protocol": "^3.17.5",
|
|
28
28
|
"vscode-languageserver-types": "^3.17.5",
|
|
29
|
-
"@mrclrchtr/supi-code-runtime": "1.
|
|
30
|
-
"@mrclrchtr/supi-core": "1.
|
|
29
|
+
"@mrclrchtr/supi-code-runtime": "1.13.0",
|
|
30
|
+
"@mrclrchtr/supi-core": "1.13.0"
|
|
31
31
|
},
|
|
32
32
|
"bundledDependencies": [
|
|
33
33
|
"@mrclrchtr/supi-code-runtime",
|