@mrclrchtr/supi-code-intelligence 1.1.3 → 1.3.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.
Files changed (37) hide show
  1. package/README.md +8 -1
  2. package/node_modules/@mrclrchtr/supi-core/README.md +9 -3
  3. package/node_modules/@mrclrchtr/supi-core/package.json +12 -2
  4. package/node_modules/@mrclrchtr/supi-core/src/api.ts +83 -0
  5. package/node_modules/@mrclrchtr/supi-core/src/extension.ts +1 -0
  6. package/node_modules/@mrclrchtr/supi-lsp/README.md +8 -3
  7. package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/README.md +9 -3
  8. package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/package.json +12 -2
  9. package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/api.ts +83 -0
  10. package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/extension.ts +1 -0
  11. package/node_modules/@mrclrchtr/supi-lsp/package.json +9 -4
  12. package/node_modules/@mrclrchtr/supi-lsp/src/api.ts +15 -0
  13. package/node_modules/@mrclrchtr/supi-lsp/src/config.ts +1 -1
  14. package/node_modules/@mrclrchtr/supi-lsp/src/extension.ts +1 -0
  15. package/node_modules/@mrclrchtr/supi-lsp/src/index.ts +1 -1
  16. package/node_modules/@mrclrchtr/supi-lsp/src/lsp.ts +1 -1
  17. package/node_modules/@mrclrchtr/supi-lsp/src/manager/manager-helpers.ts +1 -1
  18. package/node_modules/@mrclrchtr/supi-lsp/src/manager/manager.ts +1 -1
  19. package/node_modules/@mrclrchtr/supi-lsp/src/scanner.ts +1 -1
  20. package/node_modules/@mrclrchtr/supi-lsp/src/settings-registration.ts +1 -1
  21. package/node_modules/@mrclrchtr/supi-tree-sitter/README.md +9 -2
  22. package/node_modules/@mrclrchtr/supi-tree-sitter/package.json +8 -3
  23. package/node_modules/@mrclrchtr/supi-tree-sitter/src/api.ts +16 -0
  24. package/node_modules/@mrclrchtr/supi-tree-sitter/src/extension.ts +1 -0
  25. package/node_modules/@mrclrchtr/supi-tree-sitter/src/types.ts +1 -1
  26. package/package.json +11 -6
  27. package/src/actions/affected-action.ts +1 -1
  28. package/src/actions/brief-action.ts +1 -1
  29. package/src/actions/callees-action.ts +2 -2
  30. package/src/actions/callers-action.ts +1 -1
  31. package/src/actions/implementations-action.ts +1 -1
  32. package/src/api.ts +27 -0
  33. package/src/architecture.ts +1 -1
  34. package/src/extension.ts +1 -0
  35. package/src/pattern-structured.ts +1 -1
  36. package/src/prioritization-signals.ts +1 -1
  37. package/src/target-resolution.ts +7 -3
package/README.md CHANGED
@@ -44,12 +44,19 @@ pi install npm:@mrclrchtr/supi-code-intelligence
44
44
 
45
45
  Every result includes a confidence label (semantic / structural / heuristic) so the agent knows how much to trust the answer.
46
46
 
47
+ ## Package surfaces
48
+
49
+ - `@mrclrchtr/supi-code-intelligence/api` — reusable architecture/brief helpers
50
+ - `@mrclrchtr/supi-code-intelligence/extension` — pi extension entrypoint
51
+
52
+ `pi.extensions` still points at the real file path `./src/extension.ts` inside the package. The `/api` and `/extension` paths are consumer-facing package exports, not manifest aliases.
53
+
47
54
  ## For extension developers
48
55
 
49
56
  The architecture model and brief generator are exported for reuse:
50
57
 
51
58
  ```ts
52
- import { buildArchitectureModel, generateOverview } from "@mrclrchtr/supi-code-intelligence";
59
+ import { buildArchitectureModel, generateOverview } from "@mrclrchtr/supi-code-intelligence/api";
53
60
 
54
61
  const model = await buildArchitectureModel("/project");
55
62
  const overview = generateOverview(model);
@@ -12,7 +12,12 @@ pnpm add @mrclrchtr/supi-core
12
12
 
13
13
  ## Package role
14
14
 
15
- `@mrclrchtr/supi-core` is a library package. It does **not** register a pi extension and is not meant to be installed as a standalone pi package.
15
+ `@mrclrchtr/supi-core` now has two explicit surfaces:
16
+
17
+ - `@mrclrchtr/supi-core/api` — shared library helpers for other SuPi packages
18
+ - `@mrclrchtr/supi-core/extension` — a minimal pi extension that registers `/supi-settings`
19
+
20
+ `pi.extensions` still points at the real file path `./src/extension.ts` inside the package. The `/api` and `/extension` paths are consumer-facing package exports, not manifest aliases.
16
21
 
17
22
  ## What it provides
18
23
 
@@ -59,7 +64,7 @@ Main helpers:
59
64
  ## Example
60
65
 
61
66
  ```ts
62
- import { loadSupiConfig, registerConfigSettings, wrapExtensionContext } from "@mrclrchtr/supi-core";
67
+ import { loadSupiConfig, registerConfigSettings, wrapExtensionContext } from "@mrclrchtr/supi-core/api";
63
68
 
64
69
  const config = loadSupiConfig("my-extension", process.cwd(), {
65
70
  enabled: true,
@@ -87,4 +92,5 @@ const message = wrapExtensionContext("my-extension", "hello", {
87
92
 
88
93
  ## Source
89
94
 
90
- - Main exports: `src/index.ts`
95
+ - Library surface: `src/api.ts`
96
+ - Extension surface: `src/extension.ts`
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrclrchtr/supi-core",
3
- "version": "1.1.3",
3
+ "version": "1.3.0",
4
4
  "description": "SuPi core — shared infrastructure for SuPi extensions (XML context tags, config system)",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -30,5 +30,15 @@
30
30
  "optional": true
31
31
  }
32
32
  },
33
- "main": "src/index.ts"
33
+ "main": "src/api.ts",
34
+ "exports": {
35
+ "./api": "./src/api.ts",
36
+ "./extension": "./src/extension.ts",
37
+ "./package.json": "./package.json"
38
+ },
39
+ "pi": {
40
+ "extensions": [
41
+ "./src/extension.ts"
42
+ ]
43
+ }
34
44
  }
@@ -0,0 +1,83 @@
1
+ // supi-core — shared infrastructure for SuPi extensions.
2
+ // Provides XML context tag wrapping, unified config system, context-message utilities,
3
+ // and settings registry for supi-wide TUI settings.
4
+
5
+ export type { SupiConfigLocation, SupiConfigOptions } from "./config.ts";
6
+ export {
7
+ loadSupiConfig,
8
+ loadSupiConfigForScope,
9
+ removeSupiConfigKey,
10
+ writeSupiConfig,
11
+ } from "./config.ts";
12
+ export type { ConfigSettingsHelpers, ConfigSettingsOptions } from "./config-settings.ts";
13
+ export { registerConfigSettings } from "./config-settings.ts";
14
+ export type { ContextMessageLike } from "./context-messages.ts";
15
+ export {
16
+ findLastUserMessageIndex,
17
+ getContextToken,
18
+ getPromptContent,
19
+ pruneAndReorderContextMessages,
20
+ restorePromptContent,
21
+ } from "./context-messages.ts";
22
+ export type { ContextProvider } from "./context-provider-registry.ts";
23
+ export {
24
+ clearRegisteredContextProviders,
25
+ getRegisteredContextProviders,
26
+ registerContextProvider,
27
+ } from "./context-provider-registry.ts";
28
+ export { wrapExtensionContext } from "./context-tag.ts";
29
+ export type {
30
+ DebugAgentAccess,
31
+ DebugEvent,
32
+ DebugEventInput,
33
+ DebugEventQuery,
34
+ DebugEventQueryResult,
35
+ DebugEventView,
36
+ DebugLevel,
37
+ DebugNotifyLevel,
38
+ DebugRegistryConfig,
39
+ DebugSummary,
40
+ } from "./debug-registry.ts";
41
+ export {
42
+ clearDebugEvents,
43
+ configureDebugRegistry,
44
+ DEBUG_REGISTRY_DEFAULTS,
45
+ getDebugEvents,
46
+ getDebugRegistryConfig,
47
+ getDebugSummary,
48
+ recordDebugEvent,
49
+ redactDebugData,
50
+ resetDebugRegistry,
51
+ } from "./debug-registry.ts";
52
+ export type { KnownRootEntry } from "./project-roots.ts";
53
+ export {
54
+ buildKnownRootsMap,
55
+ byPathDepth,
56
+ dedupeTopmostRoots,
57
+ findProjectRoot,
58
+ isWithin,
59
+ isWithinOrEqual,
60
+ mergeKnownRoots,
61
+ resolveKnownRoot,
62
+ segmentCount,
63
+ sortRootsBySpecificity,
64
+ walkProject,
65
+ } from "./project-roots.ts";
66
+ export { getActiveBranchEntries } from "./session-utils.ts";
67
+ export { registerSettingsCommand } from "./settings-command.ts";
68
+ export type { SettingsScope, SettingsSection } from "./settings-registry.ts";
69
+ export {
70
+ clearRegisteredSettings,
71
+ getRegisteredSettings,
72
+ registerSettings,
73
+ } from "./settings-registry.ts";
74
+ export { createInputSubmenu, openSettingsOverlay } from "./settings-ui.ts";
75
+ export type { TitleTarget } from "./terminal.ts";
76
+ export {
77
+ DONE_SYMBOL,
78
+ formatTitle,
79
+ signalBell,
80
+ signalDone,
81
+ signalWaiting,
82
+ WAITING_SYMBOL,
83
+ } from "./terminal.ts";
@@ -0,0 +1 @@
1
+ export { registerSettingsCommand as default } from "./settings-command.ts";
@@ -49,12 +49,19 @@ Configure via `/supi-settings` (LSP panel):
49
49
 
50
50
  Settings are stored in `~/.pi/agent/supi/config.json` (global) or `.pi/supi/config.json` (project). The `/lsp-status` command shows active servers and outstanding diagnostics.
51
51
 
52
+ ## Package surfaces
53
+
54
+ - `@mrclrchtr/supi-lsp/api` — reusable library surface for peer extensions
55
+ - `@mrclrchtr/supi-lsp/extension` — pi extension entrypoint
56
+
57
+ `pi.extensions` still points at the real file path `./src/extension.ts` inside the package. The `/api` and `/extension` paths are consumer-facing package exports, not manifest aliases.
58
+
52
59
  ## For extension developers
53
60
 
54
61
  This package exports a reusable session-scoped LSP service. Peer extensions can query the same LSP runtime without starting duplicate servers:
55
62
 
56
63
  ```ts
57
- import { getSessionLspService, SessionLspService } from "@mrclrchtr/supi-lsp";
64
+ import { getSessionLspService, SessionLspService } from "@mrclrchtr/supi-lsp/api";
58
65
 
59
66
  const state = getSessionLspService("/project");
60
67
  if (state.kind === "ready") {
@@ -62,5 +69,3 @@ if (state.kind === "ready") {
62
69
  const refs = await state.service.references("src/index.ts", { line: 5, character: 10 });
63
70
  }
64
71
  ```
65
-
66
- Import from the package root — no need to reach into internal files.
@@ -12,7 +12,12 @@ pnpm add @mrclrchtr/supi-core
12
12
 
13
13
  ## Package role
14
14
 
15
- `@mrclrchtr/supi-core` is a library package. It does **not** register a pi extension and is not meant to be installed as a standalone pi package.
15
+ `@mrclrchtr/supi-core` now has two explicit surfaces:
16
+
17
+ - `@mrclrchtr/supi-core/api` — shared library helpers for other SuPi packages
18
+ - `@mrclrchtr/supi-core/extension` — a minimal pi extension that registers `/supi-settings`
19
+
20
+ `pi.extensions` still points at the real file path `./src/extension.ts` inside the package. The `/api` and `/extension` paths are consumer-facing package exports, not manifest aliases.
16
21
 
17
22
  ## What it provides
18
23
 
@@ -59,7 +64,7 @@ Main helpers:
59
64
  ## Example
60
65
 
61
66
  ```ts
62
- import { loadSupiConfig, registerConfigSettings, wrapExtensionContext } from "@mrclrchtr/supi-core";
67
+ import { loadSupiConfig, registerConfigSettings, wrapExtensionContext } from "@mrclrchtr/supi-core/api";
63
68
 
64
69
  const config = loadSupiConfig("my-extension", process.cwd(), {
65
70
  enabled: true,
@@ -87,4 +92,5 @@ const message = wrapExtensionContext("my-extension", "hello", {
87
92
 
88
93
  ## Source
89
94
 
90
- - Main exports: `src/index.ts`
95
+ - Library surface: `src/api.ts`
96
+ - Extension surface: `src/extension.ts`
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrclrchtr/supi-core",
3
- "version": "1.1.3",
3
+ "version": "1.3.0",
4
4
  "description": "SuPi core — shared infrastructure for SuPi extensions (XML context tags, config system)",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -30,5 +30,15 @@
30
30
  "optional": true
31
31
  }
32
32
  },
33
- "main": "src/index.ts"
33
+ "main": "src/api.ts",
34
+ "exports": {
35
+ "./api": "./src/api.ts",
36
+ "./extension": "./src/extension.ts",
37
+ "./package.json": "./package.json"
38
+ },
39
+ "pi": {
40
+ "extensions": [
41
+ "./src/extension.ts"
42
+ ]
43
+ }
34
44
  }
@@ -0,0 +1,83 @@
1
+ // supi-core — shared infrastructure for SuPi extensions.
2
+ // Provides XML context tag wrapping, unified config system, context-message utilities,
3
+ // and settings registry for supi-wide TUI settings.
4
+
5
+ export type { SupiConfigLocation, SupiConfigOptions } from "./config.ts";
6
+ export {
7
+ loadSupiConfig,
8
+ loadSupiConfigForScope,
9
+ removeSupiConfigKey,
10
+ writeSupiConfig,
11
+ } from "./config.ts";
12
+ export type { ConfigSettingsHelpers, ConfigSettingsOptions } from "./config-settings.ts";
13
+ export { registerConfigSettings } from "./config-settings.ts";
14
+ export type { ContextMessageLike } from "./context-messages.ts";
15
+ export {
16
+ findLastUserMessageIndex,
17
+ getContextToken,
18
+ getPromptContent,
19
+ pruneAndReorderContextMessages,
20
+ restorePromptContent,
21
+ } from "./context-messages.ts";
22
+ export type { ContextProvider } from "./context-provider-registry.ts";
23
+ export {
24
+ clearRegisteredContextProviders,
25
+ getRegisteredContextProviders,
26
+ registerContextProvider,
27
+ } from "./context-provider-registry.ts";
28
+ export { wrapExtensionContext } from "./context-tag.ts";
29
+ export type {
30
+ DebugAgentAccess,
31
+ DebugEvent,
32
+ DebugEventInput,
33
+ DebugEventQuery,
34
+ DebugEventQueryResult,
35
+ DebugEventView,
36
+ DebugLevel,
37
+ DebugNotifyLevel,
38
+ DebugRegistryConfig,
39
+ DebugSummary,
40
+ } from "./debug-registry.ts";
41
+ export {
42
+ clearDebugEvents,
43
+ configureDebugRegistry,
44
+ DEBUG_REGISTRY_DEFAULTS,
45
+ getDebugEvents,
46
+ getDebugRegistryConfig,
47
+ getDebugSummary,
48
+ recordDebugEvent,
49
+ redactDebugData,
50
+ resetDebugRegistry,
51
+ } from "./debug-registry.ts";
52
+ export type { KnownRootEntry } from "./project-roots.ts";
53
+ export {
54
+ buildKnownRootsMap,
55
+ byPathDepth,
56
+ dedupeTopmostRoots,
57
+ findProjectRoot,
58
+ isWithin,
59
+ isWithinOrEqual,
60
+ mergeKnownRoots,
61
+ resolveKnownRoot,
62
+ segmentCount,
63
+ sortRootsBySpecificity,
64
+ walkProject,
65
+ } from "./project-roots.ts";
66
+ export { getActiveBranchEntries } from "./session-utils.ts";
67
+ export { registerSettingsCommand } from "./settings-command.ts";
68
+ export type { SettingsScope, SettingsSection } from "./settings-registry.ts";
69
+ export {
70
+ clearRegisteredSettings,
71
+ getRegisteredSettings,
72
+ registerSettings,
73
+ } from "./settings-registry.ts";
74
+ export { createInputSubmenu, openSettingsOverlay } from "./settings-ui.ts";
75
+ export type { TitleTarget } from "./terminal.ts";
76
+ export {
77
+ DONE_SYMBOL,
78
+ formatTitle,
79
+ signalBell,
80
+ signalDone,
81
+ signalWaiting,
82
+ WAITING_SYMBOL,
83
+ } from "./terminal.ts";
@@ -0,0 +1 @@
1
+ export { registerSettingsCommand as default } from "./settings-command.ts";
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrclrchtr/supi-lsp",
3
- "version": "1.1.3",
3
+ "version": "1.3.0",
4
4
  "description": "SuPi LSP extension — Language Server Protocol integration for pi",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -21,7 +21,7 @@
21
21
  "!__tests__"
22
22
  ],
23
23
  "dependencies": {
24
- "@mrclrchtr/supi-core": "1.1.3"
24
+ "@mrclrchtr/supi-core": "1.3.0"
25
25
  },
26
26
  "bundledDependencies": [
27
27
  "@mrclrchtr/supi-core"
@@ -48,8 +48,13 @@
48
48
  },
49
49
  "pi": {
50
50
  "extensions": [
51
- "./src/lsp.ts"
51
+ "./src/extension.ts"
52
52
  ]
53
53
  },
54
- "main": "src/index.ts"
54
+ "main": "src/api.ts",
55
+ "exports": {
56
+ "./api": "./src/api.ts",
57
+ "./extension": "./src/extension.ts",
58
+ "./package.json": "./package.json"
59
+ }
55
60
  }
@@ -0,0 +1,15 @@
1
+ // Public API surface for the LSP session-scoped service.
2
+
3
+ export type { SessionLspServiceState } from "./service-registry.ts";
4
+ export { getSessionLspService, SessionLspService } from "./service-registry.ts";
5
+ export type {
6
+ Diagnostic,
7
+ DocumentSymbol,
8
+ Hover,
9
+ Location,
10
+ LocationLink,
11
+ Position,
12
+ ProjectServerInfo,
13
+ SymbolInformation,
14
+ WorkspaceSymbol,
15
+ } from "./types.ts";
@@ -2,7 +2,7 @@
2
2
 
3
3
  import * as fs from "node:fs";
4
4
  import * as path from "node:path";
5
- import { loadSupiConfigForScope } from "@mrclrchtr/supi-core";
5
+ import { loadSupiConfigForScope } from "@mrclrchtr/supi-core/api";
6
6
  import type { LspConfig, ServerConfig } from "./types.ts";
7
7
 
8
8
  // Load defaults at module level — resolve relative to this file.
@@ -0,0 +1 @@
1
+ export { default } from "./lsp.ts";
@@ -1,4 +1,4 @@
1
- // Public library entrypoint for @mrclrchtr/supi-lsp.
1
+ // Public library entrypoint for @mrclrchtr/supi-lsp/api.
2
2
  // Import from the package root to reuse session-scoped LSP services
3
3
  // without reaching into private implementation files.
4
4
 
@@ -6,7 +6,7 @@
6
6
  import * as path from "node:path";
7
7
  import { StringEnum } from "@earendil-works/pi-ai";
8
8
  import type { BeforeAgentStartEventResult, ExtensionAPI } from "@earendil-works/pi-coding-agent";
9
- import { pruneAndReorderContextMessages, restorePromptContent } from "@mrclrchtr/supi-core";
9
+ import { pruneAndReorderContextMessages, restorePromptContent } from "@mrclrchtr/supi-core/api";
10
10
  import { Type } from "typebox";
11
11
  import { loadConfig, resolveLanguageAlias } from "./config.ts";
12
12
  import { formatDiagnosticsDisplayContent } from "./diagnostics/diagnostic-display.ts";
@@ -1,5 +1,5 @@
1
1
  import * as path from "node:path";
2
- import * as projectRoots from "@mrclrchtr/supi-core";
2
+ import * as projectRoots from "@mrclrchtr/supi-core/api";
3
3
  import { isGlobMatch } from "../pattern-matcher.ts";
4
4
 
5
5
  /** Unique key for a client identified by server name and root. */
@@ -2,7 +2,7 @@
2
2
  // biome-ignore-all lint/nursery/noExcessiveLinesPerFile: LspManager stays cohesive; recovery and sync helpers are split into manager-*.ts modules.
3
3
  import * as fs from "node:fs";
4
4
  import * as path from "node:path";
5
- import * as projectRoots from "@mrclrchtr/supi-core";
5
+ import * as projectRoots from "@mrclrchtr/supi-core/api";
6
6
  import { LspClient } from "../client/client.ts";
7
7
  import { getServerForFile } from "../config.ts";
8
8
  import {
@@ -1,6 +1,6 @@
1
1
  import * as fs from "node:fs";
2
2
  import * as path from "node:path";
3
- import { dedupeTopmostRoots, walkProject } from "@mrclrchtr/supi-core";
3
+ import { dedupeTopmostRoots, walkProject } from "@mrclrchtr/supi-core/api";
4
4
  import type { LspManager } from "./manager/manager.ts";
5
5
  import type {
6
6
  DetectedProjectServer,
@@ -7,7 +7,7 @@ import {
7
7
  loadSupiConfig,
8
8
  loadSupiConfigForScope,
9
9
  registerConfigSettings,
10
- } from "@mrclrchtr/supi-core";
10
+ } from "@mrclrchtr/supi-core/api";
11
11
  import { loadConfig } from "./config.ts";
12
12
 
13
13
  // ── Types ────────────────────────────────────────────────────
@@ -40,12 +40,19 @@ The agent gets a `tree_sitter` tool with these actions:
40
40
 
41
41
  `outline`, `imports`, and `exports` are currently JavaScript/TypeScript only. `node_at`, `query`, and `callees` work across all 14 supported languages. Coordinates are 1-based, matching the `lsp` tool convention.
42
42
 
43
+ ## Package surfaces
44
+
45
+ - `@mrclrchtr/supi-tree-sitter/api` — reusable parsing/session API
46
+ - `@mrclrchtr/supi-tree-sitter/extension` — pi extension entrypoint
47
+
48
+ `pi.extensions` still points at the real file path `./src/extension.ts` inside the package. The `/api` and `/extension` paths are consumer-facing package exports, not manifest aliases.
49
+
43
50
  ## For extension developers
44
51
 
45
52
  This package exports a reusable session-scoped parsing service:
46
53
 
47
54
  ```ts
48
- import { createTreeSitterSession } from "@mrclrchtr/supi-tree-sitter";
55
+ import { createTreeSitterSession } from "@mrclrchtr/supi-tree-sitter/api";
49
56
 
50
57
  const session = createTreeSitterSession("/project");
51
58
 
@@ -62,4 +69,4 @@ const callees = await session.calleesAt("src/index.ts", 42, 10);
62
69
  session.dispose();
63
70
  ```
64
71
 
65
- Import from the package root. No internal imports needed. Call `dispose()` when done.
72
+ Call `dispose()` when done.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrclrchtr/supi-tree-sitter",
3
- "version": "1.1.3",
3
+ "version": "1.3.0",
4
4
  "description": "SuPi Tree-sitter extension — structural AST analysis for pi",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -43,10 +43,15 @@
43
43
  },
44
44
  "pi": {
45
45
  "extensions": [
46
- "./src/tree-sitter.ts"
46
+ "./src/extension.ts"
47
47
  ]
48
48
  },
49
- "main": "src/index.ts",
49
+ "main": "src/api.ts",
50
+ "exports": {
51
+ "./api": "./src/api.ts",
52
+ "./extension": "./src/extension.ts",
53
+ "./package.json": "./package.json"
54
+ },
50
55
  "scripts": {
51
56
  "vendor:wasm": "node scripts/vendor-wasm.mjs",
52
57
  "check:wasm": "node scripts/vendor-wasm.mjs --check",
@@ -0,0 +1,16 @@
1
+ // Public tree-sitter session factory and shared types.
2
+
3
+ export { createTreeSitterSession } from "./session.ts";
4
+ export type {
5
+ CalleesAtResult,
6
+ ExportRecord,
7
+ GrammarId,
8
+ ImportRecord,
9
+ NodeAtResult,
10
+ OutlineItem,
11
+ QueryCapture,
12
+ SourceRange,
13
+ SupportedExtension,
14
+ TreeSitterResult,
15
+ TreeSitterSession,
16
+ } from "./types.ts";
@@ -0,0 +1 @@
1
+ export { default } from "./tree-sitter.ts";
@@ -1,4 +1,4 @@
1
- // Public types for @mrclrchtr/supi-tree-sitter
1
+ // Public tree-sitter package types.
2
2
 
3
3
  /** 1-based source range compatible with LSP position convention. */
4
4
  export interface SourceRange {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrclrchtr/supi-code-intelligence",
3
- "version": "1.1.3",
3
+ "version": "1.3.0",
4
4
  "description": "SuPi Code Intelligence extension — architecture briefs, caller/callee analysis, impact assessment, and pattern search for pi",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -19,9 +19,9 @@
19
19
  "src/**/*.ts"
20
20
  ],
21
21
  "dependencies": {
22
- "@mrclrchtr/supi-core": "1.1.3",
23
- "@mrclrchtr/supi-lsp": "1.1.3",
24
- "@mrclrchtr/supi-tree-sitter": "1.1.3"
22
+ "@mrclrchtr/supi-tree-sitter": "1.3.0",
23
+ "@mrclrchtr/supi-lsp": "1.3.0",
24
+ "@mrclrchtr/supi-core": "1.3.0"
25
25
  },
26
26
  "bundledDependencies": [
27
27
  "@mrclrchtr/supi-core",
@@ -46,8 +46,13 @@
46
46
  },
47
47
  "pi": {
48
48
  "extensions": [
49
- "./src/code-intelligence.ts"
49
+ "./src/extension.ts"
50
50
  ]
51
51
  },
52
- "main": "src/index.ts"
52
+ "main": "src/api.ts",
53
+ "exports": {
54
+ "./api": "./src/api.ts",
55
+ "./extension": "./src/extension.ts",
56
+ "./package.json": "./package.json"
57
+ }
53
58
  }
@@ -2,7 +2,7 @@
2
2
  // biome-ignore-all lint/nursery/noExcessiveLinesPerFile: file-level and single-target affected flows share helpers to keep the blast-radius logic in one place
3
3
 
4
4
  import * as path from "node:path";
5
- import { getSessionLspService } from "@mrclrchtr/supi-lsp";
5
+ import { getSessionLspService } from "@mrclrchtr/supi-lsp/api";
6
6
  import { buildArchitectureModel, findModuleForPath, getDependents } from "../architecture.ts";
7
7
  import {
8
8
  appendPrioritySignalsSection,
@@ -2,7 +2,7 @@
2
2
 
3
3
  import * as fs from "node:fs";
4
4
  import * as path from "node:path";
5
- import { createTreeSitterSession } from "@mrclrchtr/supi-tree-sitter";
5
+ import { createTreeSitterSession } from "@mrclrchtr/supi-tree-sitter/api";
6
6
  import { buildArchitectureModel, findModuleForPath } from "../architecture.ts";
7
7
  import { generateFocusedBrief, generateProjectBrief } from "../brief.ts";
8
8
  import { normalizePath } from "../search-helpers.ts";
@@ -1,9 +1,9 @@
1
1
  // Callees action — structural outgoing call map via Tree-sitter.
2
2
  // Orchestrates target resolution and formatting; delegates grammar-aware
3
- // extraction to @mrclrchtr/supi-tree-sitter.
3
+ // extraction to @mrclrchtr/supi-tree-sitter/api.
4
4
 
5
5
  import * as path from "node:path";
6
- import { createTreeSitterSession } from "@mrclrchtr/supi-tree-sitter";
6
+ import { createTreeSitterSession } from "@mrclrchtr/supi-tree-sitter/api";
7
7
  import { resolveTarget } from "../resolve-target.ts";
8
8
  import { isResolvedTargetGroup } from "../semantic-action-helpers.ts";
9
9
  import type { ActionParams } from "../tool-actions.ts";
@@ -1,7 +1,7 @@
1
1
  // Callers action — find call sites for a symbol.
2
2
 
3
3
  import * as path from "node:path";
4
- import { getSessionLspService } from "@mrclrchtr/supi-lsp";
4
+ import { getSessionLspService } from "@mrclrchtr/supi-lsp/api";
5
5
  import { resolveTarget } from "../resolve-target.ts";
6
6
  import {
7
7
  escapeRegex,
@@ -1,7 +1,7 @@
1
1
  // Implementations action — find concrete implementations via LSP or heuristic.
2
2
 
3
3
  import * as path from "node:path";
4
- import { getSessionLspService } from "@mrclrchtr/supi-lsp";
4
+ import { getSessionLspService } from "@mrclrchtr/supi-lsp/api";
5
5
  import { resolveTarget } from "../resolve-target.ts";
6
6
  import {
7
7
  escapeRegex,
package/src/api.ts ADDED
@@ -0,0 +1,27 @@
1
+ // Reusable architecture and target-resolution helpers for peer extensions.
2
+
3
+ export type { ArchitectureModel, DependencyEdge, ModuleInfo } from "./architecture.ts";
4
+ export {
5
+ buildArchitectureModel,
6
+ findModuleForPath,
7
+ getDependencies,
8
+ getDependents,
9
+ } from "./architecture.ts";
10
+
11
+ export { generateFocusedBrief, generateOverview, generateProjectBrief } from "./brief.ts";
12
+ export type { ResolvedTarget, TargetResolutionResult } from "./target-resolution.ts";
13
+ export {
14
+ normalizePath,
15
+ resolveAnchoredTarget,
16
+ resolveSymbolTarget,
17
+ toZeroBased,
18
+ } from "./target-resolution.ts";
19
+
20
+ export type {
21
+ AffectedDetails,
22
+ BriefDetails,
23
+ CodeIntelResult,
24
+ ConfidenceMode,
25
+ DisambiguationCandidate,
26
+ SearchDetails,
27
+ } from "./types.ts";
@@ -3,7 +3,7 @@
3
3
 
4
4
  import * as fs from "node:fs";
5
5
  import * as path from "node:path";
6
- import { findProjectRoot, isWithinOrEqual, walkProject } from "@mrclrchtr/supi-core";
6
+ import { findProjectRoot, isWithinOrEqual, walkProject } from "@mrclrchtr/supi-core/api";
7
7
 
8
8
  // ── Types ─────────────────────────────────────────────────────────────
9
9
 
@@ -0,0 +1 @@
1
+ export { default } from "./code-intelligence.ts";
@@ -1,6 +1,6 @@
1
1
  import * as fs from "node:fs";
2
2
  import * as path from "node:path";
3
- import { createTreeSitterSession } from "@mrclrchtr/supi-tree-sitter";
3
+ import { createTreeSitterSession } from "@mrclrchtr/supi-tree-sitter/api";
4
4
  import type { ActionParams } from "./tool-actions.ts";
5
5
 
6
6
  export const STRUCTURED_PATTERN_FILE_CAP = 200;
@@ -1,6 +1,6 @@
1
1
  import * as fs from "node:fs";
2
2
  import * as path from "node:path";
3
- import { getSessionLspService } from "@mrclrchtr/supi-lsp";
3
+ import { getSessionLspService } from "@mrclrchtr/supi-lsp/api";
4
4
 
5
5
  export interface PrioritySignalsSummary {
6
6
  diagnosticsCount: number;
@@ -4,9 +4,13 @@
4
4
 
5
5
  import * as fs from "node:fs";
6
6
  import * as path from "node:path";
7
- import { isWithinOrEqual } from "@mrclrchtr/supi-core";
8
- import { getSessionLspService, type Position, type SessionLspService } from "@mrclrchtr/supi-lsp";
9
- import { createTreeSitterSession } from "@mrclrchtr/supi-tree-sitter";
7
+ import { isWithinOrEqual } from "@mrclrchtr/supi-core/api";
8
+ import {
9
+ getSessionLspService,
10
+ type Position,
11
+ type SessionLspService,
12
+ } from "@mrclrchtr/supi-lsp/api";
13
+ import { createTreeSitterSession } from "@mrclrchtr/supi-tree-sitter/api";
10
14
  import { escapeRegex, normalizePath } from "./search-helpers.ts";
11
15
  import { highestConfidence } from "./semantic-action-helpers.ts";
12
16
  import type { ConfidenceMode, DisambiguationCandidate } from "./types.ts";