@mrclrchtr/supi-code-intelligence 1.8.0 → 1.9.1
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 +17 -1
- package/node_modules/@mrclrchtr/supi-code-runtime/README.md +13 -0
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/README.md +97 -0
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/package.json +53 -0
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/api.ts +30 -0
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/config/config-settings.ts +76 -0
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/config/config.ts +186 -0
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/config.ts +11 -0
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/context/context-messages.ts +119 -0
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/context/context-provider-registry.ts +36 -0
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/context/context-tag.ts +31 -0
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/context.ts +16 -0
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/debug-registry.ts +255 -0
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/index.ts +30 -0
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/path-utils.ts +40 -0
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/path.ts +2 -0
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/project-roots.ts +170 -0
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/project.ts +15 -0
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/registry-utils.ts +86 -0
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/session-utils.ts +29 -0
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/session.ts +4 -0
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/settings/settings-command.ts +15 -0
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/settings/settings-registry.ts +41 -0
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/settings/settings-ui.ts +226 -0
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/settings-ui.ts +2 -0
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/settings.ts +9 -0
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/substrate-types.ts +11 -0
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/terminal.ts +60 -0
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/tool-framework.ts +116 -0
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/types.ts +2 -0
- package/node_modules/@mrclrchtr/supi-code-runtime/package.json +40 -0
- package/node_modules/@mrclrchtr/supi-code-runtime/src/api.ts +35 -0
- package/node_modules/@mrclrchtr/supi-code-runtime/src/capability/types.ts +68 -0
- package/node_modules/@mrclrchtr/supi-code-runtime/src/index.ts +31 -0
- package/node_modules/@mrclrchtr/supi-code-runtime/src/types.ts +110 -0
- package/node_modules/@mrclrchtr/supi-code-runtime/src/workspace/context.ts +41 -0
- package/node_modules/@mrclrchtr/supi-code-runtime/src/workspace/runtime.ts +170 -0
- package/node_modules/@mrclrchtr/supi-core/README.md +3 -13
- package/node_modules/@mrclrchtr/supi-core/package.json +1 -7
- package/node_modules/@mrclrchtr/supi-lsp/README.md +20 -2
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/README.md +13 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/README.md +97 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/package.json +57 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/api.ts +30 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/config/config-settings.ts +76 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/config/config.ts +186 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/config.ts +11 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/context/context-messages.ts +119 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/context/context-provider-registry.ts +36 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/context/context-tag.ts +31 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/context.ts +16 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/debug-registry.ts +255 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/index.ts +30 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/path-utils.ts +40 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/path.ts +2 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/project-roots.ts +170 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/project.ts +15 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/registry-utils.ts +86 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/session-utils.ts +29 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/session.ts +4 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/settings/settings-command.ts +15 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/settings/settings-registry.ts +41 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/settings/settings-ui.ts +226 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/settings-ui.ts +2 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/settings.ts +9 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/substrate-types.ts +11 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/terminal.ts +60 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/tool-framework.ts +116 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/types.ts +2 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/package.json +40 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/src/api.ts +35 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/src/capability/types.ts +68 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/src/index.ts +31 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/src/types.ts +110 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/src/workspace/context.ts +41 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/src/workspace/runtime.ts +170 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/README.md +3 -13
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/package.json +1 -7
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/ignore/LICENSE-MIT +21 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/ignore/README.md +452 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/ignore/index.d.ts +81 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/ignore/index.js +784 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/ignore/legacy.js +681 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/ignore/package.json +87 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/LICENSE.txt +55 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/README.md +50 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/SECURITY.md +39 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/ThirdPartyNoticeText.txt +193 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/bin/tsc +2 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/bin/tsserver +2 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/_tsc.js +134465 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/_tsserver.js +659 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/_typingsInstaller.js +222 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/cs/diagnosticMessages.generated.json +2129 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/de/diagnosticMessages.generated.json +2125 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/es/diagnosticMessages.generated.json +2129 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/fr/diagnosticMessages.generated.json +2129 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/it/diagnosticMessages.generated.json +2125 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/ja/diagnosticMessages.generated.json +2129 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/ko/diagnosticMessages.generated.json +2129 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.d.ts +20 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.decorators.d.ts +382 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.decorators.legacy.d.ts +20 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.dom.asynciterable.d.ts +18 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.dom.d.ts +45125 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.dom.iterable.d.ts +18 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2015.collection.d.ts +150 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2015.core.d.ts +595 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2015.d.ts +26 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2015.generator.d.ts +75 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2015.iterable.d.ts +603 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2015.promise.d.ts +79 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2015.proxy.d.ts +126 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2015.reflect.d.ts +142 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2015.symbol.d.ts +44 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts +324 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2016.array.include.d.ts +114 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2016.d.ts +19 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2016.full.d.ts +21 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2016.intl.d.ts +29 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts +19 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2017.d.ts +24 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2017.date.d.ts +29 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2017.full.d.ts +21 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2017.intl.d.ts +42 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2017.object.d.ts +47 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts +133 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2017.string.d.ts +43 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts +51 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts +75 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts +51 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2018.d.ts +22 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2018.full.d.ts +22 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2018.intl.d.ts +81 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2018.promise.d.ts +28 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2018.regexp.d.ts +35 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2019.array.d.ts +77 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2019.d.ts +22 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2019.full.d.ts +22 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2019.intl.d.ts +21 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2019.object.d.ts +31 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2019.string.d.ts +35 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2019.symbol.d.ts +22 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2020.bigint.d.ts +763 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2020.d.ts +25 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2020.date.d.ts +40 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2020.full.d.ts +22 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2020.intl.d.ts +472 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2020.number.d.ts +26 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2020.promise.d.ts +45 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts +97 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2020.string.d.ts +42 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts +39 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2021.d.ts +21 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2021.full.d.ts +22 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2021.intl.d.ts +164 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2021.promise.d.ts +46 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2021.string.d.ts +31 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2021.weakref.d.ts +76 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2022.array.d.ts +119 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2022.d.ts +23 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2022.error.d.ts +73 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2022.full.d.ts +22 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2022.intl.d.ts +143 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2022.object.d.ts +24 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2022.regexp.d.ts +37 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2022.string.d.ts +23 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2023.array.d.ts +922 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2023.collection.d.ts +19 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2023.d.ts +20 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2023.full.d.ts +22 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2023.intl.d.ts +62 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts +63 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2024.collection.d.ts +27 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2024.d.ts +24 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2024.full.d.ts +22 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2024.object.d.ts +27 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2024.promise.d.ts +33 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2024.regexp.d.ts +23 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts +66 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2024.string.d.ts +27 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2025.collection.d.ts +94 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2025.d.ts +23 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2025.float16.d.ts +443 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2025.full.d.ts +22 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2025.intl.d.ts +200 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2025.iterator.d.ts +146 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2025.promise.d.ts +32 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es2025.regexp.d.ts +30 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es5.d.ts +4599 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.es6.d.ts +21 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.esnext.array.d.ts +33 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.esnext.collection.d.ts +47 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.esnext.d.ts +27 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.esnext.date.d.ts +21 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.esnext.decorators.d.ts +26 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.esnext.disposable.d.ts +191 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.esnext.error.d.ts +22 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.esnext.full.d.ts +22 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.esnext.intl.d.ts +107 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.esnext.sharedmemory.d.ts +23 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.esnext.temporal.d.ts +485 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.esnext.typedarrays.d.ts +90 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.scripthost.d.ts +320 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.webworker.asynciterable.d.ts +18 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.webworker.d.ts +15606 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.webworker.importscripts.d.ts +21 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/lib.webworker.iterable.d.ts +18 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/pl/diagnosticMessages.generated.json +2129 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/pt-br/diagnosticMessages.generated.json +2129 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/ru/diagnosticMessages.generated.json +2125 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/tr/diagnosticMessages.generated.json +2129 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/tsc.js +8 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/tsserver.js +8 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/tsserverlibrary.d.ts +17 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/tsserverlibrary.js +21 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/typesMap.json +497 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/typescript.d.ts +11448 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/typescript.js +201039 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/typingsInstaller.js +8 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/watchGuard.js +53 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/zh-cn/diagnosticMessages.generated.json +2129 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/lib/zh-tw/diagnosticMessages.generated.json +2125 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/typescript/package.json +118 -0
- package/node_modules/@mrclrchtr/supi-lsp/package.json +11 -6
- package/node_modules/@mrclrchtr/supi-lsp/src/handlers/session-lifecycle.ts +17 -7
- package/node_modules/@mrclrchtr/supi-lsp/src/lsp.ts +3 -1
- package/node_modules/@mrclrchtr/supi-lsp/src/manager/capability-index.ts +24 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/manager/client-pool.ts +33 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/manager/diagnostic-store.ts +51 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/manager/recovery-coordinator.ts +37 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/manager/workspace-router.ts +44 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/provider/lsp-semantic-provider.ts +156 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/session/runtime-registration.ts +39 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/tool/register-tools.ts +0 -1
- package/node_modules/@mrclrchtr/supi-tree-sitter/README.md +18 -1
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/README.md +13 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/README.md +97 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/package.json +57 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/api.ts +30 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/config/config-settings.ts +76 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/config/config.ts +186 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/config.ts +11 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/context/context-messages.ts +119 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/context/context-provider-registry.ts +36 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/context/context-tag.ts +31 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/context.ts +16 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/debug-registry.ts +255 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/index.ts +30 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/path-utils.ts +40 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/path.ts +2 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/project-roots.ts +170 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/project.ts +15 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/registry-utils.ts +86 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/session-utils.ts +29 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/session.ts +4 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/settings/settings-command.ts +15 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/settings/settings-registry.ts +41 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/settings/settings-ui.ts +226 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/settings-ui.ts +2 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/settings.ts +9 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/substrate-types.ts +11 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/terminal.ts +60 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/tool-framework.ts +116 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/types.ts +2 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/package.json +40 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/src/api.ts +35 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/src/capability/types.ts +68 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/src/index.ts +31 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/src/types.ts +110 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/src/workspace/context.ts +41 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/src/workspace/runtime.ts +170 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/README.md +3 -13
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/package.json +1 -7
- package/node_modules/@mrclrchtr/supi-tree-sitter/package.json +9 -6
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/provider/tree-sitter-provider.ts +144 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/session/runtime-registration.ts +37 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/tree-sitter.ts +18 -8
- package/package.json +8 -6
- package/src/api.ts +31 -16
- package/src/brief-focused.ts +2 -2
- package/src/brief.ts +2 -2
- package/src/code-intelligence.ts +13 -1
- package/src/index.ts +29 -16
- package/src/{architecture.ts → model.ts} +20 -61
- package/src/presentation/markdown/brief.ts +2 -2
- package/src/substrates/types.ts +22 -105
- package/src/targeting/resolve-file.ts +4 -7
- package/src/tool/execute-affected.ts +25 -1
- package/src/tool/execute-brief.ts +5 -4
- package/src/tool/execute-pattern.ts +4 -3
- package/src/tool/execute-relations.ts +22 -1
- package/src/types.ts +101 -3
- package/src/use-case/build-overview.ts +1 -1
- package/src/use-case/generate-affected.ts +25 -7
- package/src/use-case/generate-brief.ts +31 -14
- package/src/use-case/generate-pattern.ts +9 -9
- package/src/use-case/generate-relations.ts +66 -20
- package/src/use-case/types.ts +3 -3
- package/src/workspace/request-context.ts +139 -0
- package/node_modules/@mrclrchtr/supi-core/src/extension.ts +0 -1
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/extension.ts +0 -1
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/extension.ts +0 -1
- package/src/substrates/lsp-adapter.ts +0 -197
- package/src/substrates/tree-sitter-adapter.ts +0 -173
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canonical shared types for the SuPi code-understanding stack.
|
|
3
|
+
*
|
|
4
|
+
* These types are package-agnostic and used across supi-lsp, supi-tree-sitter,
|
|
5
|
+
* and supi-code-intelligence for communicating code analysis results,
|
|
6
|
+
* capability availability, and structural data shapes.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
// ── Position and location types ────────────────────────────────────────
|
|
10
|
+
|
|
11
|
+
/** 0-based LSP position. */
|
|
12
|
+
export interface CodePosition {
|
|
13
|
+
line: number;
|
|
14
|
+
character: number;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/** A source range spanning two CodePositions. */
|
|
18
|
+
export interface SourceRange {
|
|
19
|
+
start: CodePosition;
|
|
20
|
+
end: CodePosition;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/** A code location (file URI + range). */
|
|
24
|
+
export interface CodeLocation {
|
|
25
|
+
uri: string;
|
|
26
|
+
range: SourceRange;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// ── Symbol types ───────────────────────────────────────────────────────
|
|
30
|
+
|
|
31
|
+
/** A discovered symbol / declaration. */
|
|
32
|
+
export interface CodeSymbol {
|
|
33
|
+
name: string;
|
|
34
|
+
kind: string;
|
|
35
|
+
file: string;
|
|
36
|
+
line: number;
|
|
37
|
+
character: number;
|
|
38
|
+
container?: string | null;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// ── Result types ───────────────────────────────────────────────────────
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Discriminated result union for provider operations.
|
|
45
|
+
*
|
|
46
|
+
* Used primarily by structural (tree-sitter-backed) operations that
|
|
47
|
+
* have explicit error and unsupported-language states. Semantic operations
|
|
48
|
+
* use `null` to signal absence.
|
|
49
|
+
*/
|
|
50
|
+
export type CodeResult<T> =
|
|
51
|
+
| { kind: "success"; data: T }
|
|
52
|
+
| { kind: "unsupported-language"; file: string; message: string }
|
|
53
|
+
| { kind: "file-access-error"; file: string; message: string }
|
|
54
|
+
| { kind: "validation-error"; message: string }
|
|
55
|
+
| { kind: "runtime-error"; message: string }
|
|
56
|
+
| { kind: "unavailable"; message: string };
|
|
57
|
+
|
|
58
|
+
/** Result confidence classification. */
|
|
59
|
+
export type ConfidenceMode = "semantic" | "structural" | "heuristic" | "unavailable";
|
|
60
|
+
|
|
61
|
+
// ── Structural data shapes (value types, range-flattened) ──────────────
|
|
62
|
+
|
|
63
|
+
export interface OutlineData {
|
|
64
|
+
name: string;
|
|
65
|
+
kind: string;
|
|
66
|
+
startLine: number;
|
|
67
|
+
startCharacter: number;
|
|
68
|
+
endLine: number;
|
|
69
|
+
endCharacter: number;
|
|
70
|
+
children?: OutlineData[];
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export interface ExportData {
|
|
74
|
+
name: string;
|
|
75
|
+
kind: string;
|
|
76
|
+
startLine: number;
|
|
77
|
+
startCharacter: number;
|
|
78
|
+
endLine: number;
|
|
79
|
+
endCharacter: number;
|
|
80
|
+
moduleSpecifier?: string;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export interface ImportData {
|
|
84
|
+
moduleSpecifier: string;
|
|
85
|
+
startLine: number;
|
|
86
|
+
startCharacter: number;
|
|
87
|
+
endLine: number;
|
|
88
|
+
endCharacter: number;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export interface NodeAtData {
|
|
92
|
+
type: string;
|
|
93
|
+
startLine: number;
|
|
94
|
+
startCharacter: number;
|
|
95
|
+
endLine: number;
|
|
96
|
+
endCharacter: number;
|
|
97
|
+
text: string;
|
|
98
|
+
ancestry: Array<{
|
|
99
|
+
type: string;
|
|
100
|
+
startLine: number;
|
|
101
|
+
startCharacter: number;
|
|
102
|
+
endLine: number;
|
|
103
|
+
endCharacter: number;
|
|
104
|
+
}>;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export interface CalleesData {
|
|
108
|
+
enclosingScope: { name: string; startLine: number; endLine: number };
|
|
109
|
+
callees: Array<{ name: string; startLine: number }>;
|
|
110
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typed request context helper for consumers that need a convenient view
|
|
3
|
+
* of the capability state for a workspace cwd.
|
|
4
|
+
*
|
|
5
|
+
* This is the primary way that `supi-code-intelligence` reads capability
|
|
6
|
+
* state from the shared runtime. Substrates register providers through
|
|
7
|
+
* {@link WorkspaceRuntime} directly.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import type { CapabilityState, SemanticProvider, StructuralProvider } from "../capability/types.ts";
|
|
11
|
+
import type { WorkspaceRuntime } from "./runtime.ts";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* A workspace-scoped request context that provides access to active
|
|
15
|
+
* semantic and structural capabilities along with their availability
|
|
16
|
+
* state and the cached project model.
|
|
17
|
+
*/
|
|
18
|
+
export interface WorkspaceContext {
|
|
19
|
+
/** The working directory this context is scoped to. */
|
|
20
|
+
cwd: string;
|
|
21
|
+
/** Semantic analysis capability state and provider. */
|
|
22
|
+
semantic: { state: CapabilityState; provider: SemanticProvider | null };
|
|
23
|
+
/** Structural analysis capability state and provider. */
|
|
24
|
+
structural: { state: CapabilityState; provider: StructuralProvider | null };
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Create a typed workspace context from the shared runtime.
|
|
29
|
+
*
|
|
30
|
+
* @param cwd - The working directory for this context.
|
|
31
|
+
* @param runtime - The shared workspace runtime instance.
|
|
32
|
+
* @returns A snapshot of the capability state for this workspace.
|
|
33
|
+
*/
|
|
34
|
+
export function createWorkspaceContext(cwd: string, runtime: WorkspaceRuntime): WorkspaceContext {
|
|
35
|
+
const ws = runtime.getWorkspace(cwd);
|
|
36
|
+
return {
|
|
37
|
+
cwd,
|
|
38
|
+
semantic: ws.semantic,
|
|
39
|
+
structural: ws.structural,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workspace-scoped capability registry.
|
|
3
|
+
*
|
|
4
|
+
* Substrates (LSP, tree-sitter) register their capabilities per cwd
|
|
5
|
+
* at session startup. Code-intelligence reads capability state from
|
|
6
|
+
* this registry instead of maintaining a local provider composition
|
|
7
|
+
* layer.
|
|
8
|
+
*
|
|
9
|
+
* Capabilities are independent: registering a semantic provider does not
|
|
10
|
+
* affect an already-registered structural provider for the same cwd.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import type { CapabilityState, SemanticProvider, StructuralProvider } from "../capability/types.ts";
|
|
14
|
+
|
|
15
|
+
// ── Public types ───────────────────────────────────────────────────────
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The combined capability state for a workspace.
|
|
19
|
+
* Each capability slot includes both the availability state and the
|
|
20
|
+
* provider instance (null when not ready).
|
|
21
|
+
*/
|
|
22
|
+
export interface WorkspaceCapabilities {
|
|
23
|
+
semantic: { state: CapabilityState; provider: SemanticProvider | null };
|
|
24
|
+
structural: { state: CapabilityState; provider: StructuralProvider | null };
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// ── Defaults ───────────────────────────────────────────────────────────
|
|
28
|
+
|
|
29
|
+
const DEFAULT_UNAVAILABLE_REASON = "No provider registered for this workspace";
|
|
30
|
+
|
|
31
|
+
function createDefaultCapabilities(): WorkspaceCapabilities {
|
|
32
|
+
return {
|
|
33
|
+
semantic: {
|
|
34
|
+
state: { kind: "unavailable", reason: DEFAULT_UNAVAILABLE_REASON },
|
|
35
|
+
provider: null,
|
|
36
|
+
},
|
|
37
|
+
structural: {
|
|
38
|
+
state: { kind: "unavailable", reason: DEFAULT_UNAVAILABLE_REASON },
|
|
39
|
+
provider: null,
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// ── Runtime ────────────────────────────────────────────────────────────
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Workspace-scoped capability registry keyed by cwd/project root.
|
|
48
|
+
*
|
|
49
|
+
* Each workspace stores independent capability state for semantic
|
|
50
|
+
* (LSP-backed) and structural (tree-sitter-backed) analysis. Substrates
|
|
51
|
+
* register their capabilities at session start; consumers read them
|
|
52
|
+
* as needed.
|
|
53
|
+
*
|
|
54
|
+
* The registry is intentionally unopinionated about which capabilities
|
|
55
|
+
* are required — a workspace may have only semantic, only structural,
|
|
56
|
+
* both, or neither.
|
|
57
|
+
*/
|
|
58
|
+
export class WorkspaceRuntime {
|
|
59
|
+
readonly #workspaces = new Map<string, WorkspaceCapabilities>();
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Get the capability state for a workspace cwd.
|
|
63
|
+
* Returns a default "unavailable" state if the workspace
|
|
64
|
+
* has never been registered.
|
|
65
|
+
*/
|
|
66
|
+
getWorkspace(cwd: string): WorkspaceCapabilities {
|
|
67
|
+
return this.#workspaces.get(cwd) ?? createDefaultCapabilities();
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Register a semantic provider for a workspace.
|
|
72
|
+
* Replaces any existing semantic provider for the same cwd
|
|
73
|
+
* without affecting the structural provider.
|
|
74
|
+
*/
|
|
75
|
+
registerSemantic(cwd: string, provider: SemanticProvider): void {
|
|
76
|
+
const existing = this.#workspaces.get(cwd);
|
|
77
|
+
if (existing) {
|
|
78
|
+
existing.semantic = { state: { kind: "ready" }, provider };
|
|
79
|
+
} else {
|
|
80
|
+
this.#workspaces.set(cwd, {
|
|
81
|
+
semantic: { state: { kind: "ready" }, provider },
|
|
82
|
+
structural: createDefaultCapabilities().structural,
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Register a structural provider for a workspace.
|
|
89
|
+
* Replaces any existing structural provider for the same cwd
|
|
90
|
+
* without affecting the semantic provider.
|
|
91
|
+
*/
|
|
92
|
+
registerStructural(cwd: string, provider: StructuralProvider): void {
|
|
93
|
+
const existing = this.#workspaces.get(cwd);
|
|
94
|
+
if (existing) {
|
|
95
|
+
existing.structural = { state: { kind: "ready" }, provider };
|
|
96
|
+
} else {
|
|
97
|
+
this.#workspaces.set(cwd, {
|
|
98
|
+
semantic: createDefaultCapabilities().semantic,
|
|
99
|
+
structural: { state: { kind: "ready" }, provider },
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Remove all capability state for a single workspace cwd.
|
|
106
|
+
*/
|
|
107
|
+
clearWorkspace(cwd: string): void {
|
|
108
|
+
this.#workspaces.delete(cwd);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Clear only the semantic capability slot for a workspace.
|
|
113
|
+
* Leaves the structural slot untouched.
|
|
114
|
+
*/
|
|
115
|
+
clearSemantic(cwd: string): void {
|
|
116
|
+
const ws = this.#workspaces.get(cwd);
|
|
117
|
+
if (!ws) return;
|
|
118
|
+
ws.semantic = createDefaultCapabilities().semantic;
|
|
119
|
+
// If both slots are now unavailable, remove the entire entry
|
|
120
|
+
if (ws.semantic.state.kind === "unavailable" && ws.structural.state.kind === "unavailable") {
|
|
121
|
+
this.#workspaces.delete(cwd);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Clear only the structural capability slot for a workspace.
|
|
127
|
+
* Leaves the semantic slot untouched.
|
|
128
|
+
*/
|
|
129
|
+
clearStructural(cwd: string): void {
|
|
130
|
+
const ws = this.#workspaces.get(cwd);
|
|
131
|
+
if (!ws) return;
|
|
132
|
+
ws.structural = createDefaultCapabilities().structural;
|
|
133
|
+
// If both slots are now unavailable, remove the entire entry
|
|
134
|
+
if (ws.semantic.state.kind === "unavailable" && ws.structural.state.kind === "unavailable") {
|
|
135
|
+
this.#workspaces.delete(cwd);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Remove all capability state for every workspace.
|
|
141
|
+
*/
|
|
142
|
+
clearAll(): void {
|
|
143
|
+
this.#workspaces.clear();
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// ── Default singleton ───────────────────────────────────────────────────
|
|
148
|
+
|
|
149
|
+
const RUNTIME_SYMBOL = Symbol.for("@mrclrchtr/supi-code-runtime/default-runtime");
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Get the shared default workspace runtime instance.
|
|
153
|
+
*
|
|
154
|
+
* Backed by `globalThis` + `Symbol.for` so that all jiti module instances
|
|
155
|
+
* (even duplicate loads through separate `node_modules` paths) share the
|
|
156
|
+
* same WorkspaceRuntime. Without this, standalone installs where
|
|
157
|
+
* `supi-lsp`, `supi-tree-sitter`, and `supi-code-intelligence` each bundle
|
|
158
|
+
* their own copy of `@mrclrchtr/supi-code-runtime` would get separate
|
|
159
|
+
* runtimes — LSP/tree-sitter would register capabilities into one while
|
|
160
|
+
* code-intelligence reads from another.
|
|
161
|
+
*/
|
|
162
|
+
export function getDefaultWorkspaceRuntime(): WorkspaceRuntime {
|
|
163
|
+
const g = globalThis as Record<symbol, unknown>;
|
|
164
|
+
let runtime = g[RUNTIME_SYMBOL] as WorkspaceRuntime | undefined;
|
|
165
|
+
if (!runtime) {
|
|
166
|
+
runtime = new WorkspaceRuntime();
|
|
167
|
+
g[RUNTIME_SYMBOL] = runtime;
|
|
168
|
+
}
|
|
169
|
+
return runtime;
|
|
170
|
+
}
|
package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/README.md
CHANGED
|
@@ -1,29 +1,20 @@
|
|
|
1
|
+

|
|
2
|
+
|
|
1
3
|
# @mrclrchtr/supi-core
|
|
2
4
|
|
|
3
5
|
Shared infrastructure for SuPi extensions.
|
|
4
6
|
|
|
5
|
-
This
|
|
7
|
+
This is a **pure library** — it does not register any pi commands or tools. The `/supi-settings` command is now available through `@mrclrchtr/supi-settings`.
|
|
6
8
|
|
|
7
9
|
## Install
|
|
8
10
|
|
|
9
|
-
### As a dependency for another extension
|
|
10
|
-
|
|
11
11
|
```bash
|
|
12
12
|
pnpm add @mrclrchtr/supi-core
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
### As a pi package
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
pi install npm:@mrclrchtr/supi-core
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
Installing it as a pi package adds the minimal `/supi-settings` extension surface.
|
|
22
|
-
|
|
23
15
|
## Package surfaces
|
|
24
16
|
|
|
25
17
|
- `@mrclrchtr/supi-core/api` — reusable helpers for other packages and extensions
|
|
26
|
-
- `@mrclrchtr/supi-core/extension` — minimal pi extension that registers `/supi-settings`
|
|
27
18
|
|
|
28
19
|
## What you get from the API
|
|
29
20
|
|
|
@@ -101,7 +92,6 @@ const message = wrapExtensionContext("my-extension", "hello", {
|
|
|
101
92
|
## Source
|
|
102
93
|
|
|
103
94
|
- `src/api.ts` — exported library surface
|
|
104
|
-
- `src/extension.ts` — minimal `/supi-settings` entrypoint
|
|
105
95
|
- `src/config.ts` — shared config loading and writing
|
|
106
96
|
- `src/config-settings.ts` — config-backed settings registration helper
|
|
107
97
|
- `src/settings-ui.ts` — shared settings overlay
|
package/node_modules/@mrclrchtr/supi-tree-sitter/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.9.1",
|
|
4
4
|
"description": "SuPi core — shared infrastructure for SuPi extensions (XML context tags, config system)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -40,7 +40,6 @@
|
|
|
40
40
|
"./config": "./src/config.ts",
|
|
41
41
|
"./context": "./src/context.ts",
|
|
42
42
|
"./debug": "./src/debug-registry.ts",
|
|
43
|
-
"./extension": "./src/extension.ts",
|
|
44
43
|
"./package.json": "./package.json",
|
|
45
44
|
"./path": "./src/path.ts",
|
|
46
45
|
"./project": "./src/project.ts",
|
|
@@ -50,10 +49,5 @@
|
|
|
50
49
|
"./terminal": "./src/terminal.ts",
|
|
51
50
|
"./tool-framework": "./src/tool-framework.ts",
|
|
52
51
|
"./types": "./src/types.ts"
|
|
53
|
-
},
|
|
54
|
-
"pi": {
|
|
55
|
-
"extensions": [
|
|
56
|
-
"./src/extension.ts"
|
|
57
|
-
]
|
|
58
52
|
}
|
|
59
53
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mrclrchtr/supi-tree-sitter",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.1",
|
|
4
4
|
"description": "SuPi Tree-sitter extension — structural AST analysis for pi",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"web-tree-sitter": "^0.26.8",
|
|
27
|
-
"@mrclrchtr/supi-
|
|
27
|
+
"@mrclrchtr/supi-code-runtime": "1.9.1",
|
|
28
|
+
"@mrclrchtr/supi-core": "1.9.1"
|
|
28
29
|
},
|
|
29
30
|
"peerDependencies": {
|
|
30
31
|
"@earendil-works/pi-ai": "*",
|
|
@@ -44,18 +45,20 @@
|
|
|
44
45
|
},
|
|
45
46
|
"pi": {
|
|
46
47
|
"extensions": [
|
|
47
|
-
"./src/extension.ts"
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
"./src/extension.ts"
|
|
49
|
+
],
|
|
50
|
+
"image": "https://raw.githubusercontent.com/mrclrchtr/supi/main/packages/supi-tree-sitter/assets/logo.png"
|
|
50
51
|
},
|
|
51
52
|
"bundledDependencies": [
|
|
53
|
+
"@mrclrchtr/supi-code-runtime",
|
|
52
54
|
"@mrclrchtr/supi-core"
|
|
53
55
|
],
|
|
54
56
|
"main": "src/api.ts",
|
|
55
57
|
"exports": {
|
|
56
58
|
"./api": "./src/api.ts",
|
|
57
59
|
"./extension": "./src/extension.ts",
|
|
58
|
-
"./package.json": "./package.json"
|
|
60
|
+
"./package.json": "./package.json",
|
|
61
|
+
"./provider/tree-sitter-provider": "./src/provider/tree-sitter-provider.ts"
|
|
59
62
|
},
|
|
60
63
|
"scripts": {
|
|
61
64
|
"vendor:wasm": "node scripts/vendor-wasm.mjs",
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
// Structural provider adapter — wraps TreeSitterService into the shared
|
|
2
|
+
// StructuralProvider contract from supi-code-runtime.
|
|
3
|
+
|
|
4
|
+
import type {
|
|
5
|
+
CalleesData,
|
|
6
|
+
CodeResult,
|
|
7
|
+
ExportData,
|
|
8
|
+
ImportData,
|
|
9
|
+
NodeAtData,
|
|
10
|
+
OutlineData,
|
|
11
|
+
StructuralProvider,
|
|
12
|
+
} from "@mrclrchtr/supi-code-runtime/api";
|
|
13
|
+
import type {
|
|
14
|
+
CalleesAtResult,
|
|
15
|
+
ExportRecord,
|
|
16
|
+
ImportRecord,
|
|
17
|
+
NodeAtResult,
|
|
18
|
+
OutlineItem,
|
|
19
|
+
TreeSitterResult,
|
|
20
|
+
TreeSitterService,
|
|
21
|
+
} from "../types.ts";
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Create a StructuralProvider backed by a TreeSitterService.
|
|
25
|
+
* Maps tree-sitter's nested `range` shapes into the flat range
|
|
26
|
+
* fields used by the shared code-runtime types.
|
|
27
|
+
*/
|
|
28
|
+
export function createTreeSitterProvider(service: TreeSitterService): StructuralProvider {
|
|
29
|
+
return {
|
|
30
|
+
async calleesAt(file, line, character) {
|
|
31
|
+
const result = await service.calleesAt(file, line, character);
|
|
32
|
+
return mapTreeSitterResult(result, mapCalleesAtResult);
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
async exports(file) {
|
|
36
|
+
const result = await service.exports(file);
|
|
37
|
+
return mapTreeSitterResult(result, mapExportRecords);
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
async outline(file) {
|
|
41
|
+
const result = await service.outline(file);
|
|
42
|
+
return mapTreeSitterResult(result, mapOutlineItems);
|
|
43
|
+
},
|
|
44
|
+
|
|
45
|
+
async imports(file) {
|
|
46
|
+
const result = await service.imports(file);
|
|
47
|
+
return mapTreeSitterResult(result, mapImportRecords);
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
async nodeAt(file, line, character) {
|
|
51
|
+
const result = await service.nodeAt(file, line, character);
|
|
52
|
+
return mapTreeSitterResult(result, mapNodeAtResult);
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// ── Generic result mapper ─────────────────────────────────────────────
|
|
58
|
+
|
|
59
|
+
function mapTreeSitterResult<T, U>(
|
|
60
|
+
result: TreeSitterResult<T>,
|
|
61
|
+
mapData: (data: T) => U,
|
|
62
|
+
): CodeResult<U> {
|
|
63
|
+
switch (result.kind) {
|
|
64
|
+
case "success":
|
|
65
|
+
return { kind: "success", data: mapData(result.data) };
|
|
66
|
+
case "unsupported-language":
|
|
67
|
+
return { kind: "unsupported-language", file: result.file, message: result.message };
|
|
68
|
+
case "file-access-error":
|
|
69
|
+
return { kind: "file-access-error", file: result.file, message: result.message };
|
|
70
|
+
case "validation-error":
|
|
71
|
+
return { kind: "validation-error", message: result.message };
|
|
72
|
+
case "runtime-error":
|
|
73
|
+
return { kind: "runtime-error", message: result.message };
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// ── Data mappers (nested range → flat fields) ─────────────────────────
|
|
78
|
+
|
|
79
|
+
type RangeLike = {
|
|
80
|
+
startLine: number;
|
|
81
|
+
startCharacter: number;
|
|
82
|
+
endLine: number;
|
|
83
|
+
endCharacter: number;
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
function takeRange(r: RangeLike) {
|
|
87
|
+
return {
|
|
88
|
+
startLine: r.startLine,
|
|
89
|
+
startCharacter: r.startCharacter,
|
|
90
|
+
endLine: r.endLine,
|
|
91
|
+
endCharacter: r.endCharacter,
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
function mapOutlineItems(items: OutlineItem[]): OutlineData[] {
|
|
96
|
+
return items.map((item) => ({
|
|
97
|
+
name: item.name,
|
|
98
|
+
kind: item.kind,
|
|
99
|
+
...takeRange(item.range),
|
|
100
|
+
children: item.children ? mapOutlineItems(item.children) : undefined,
|
|
101
|
+
}));
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function mapExportRecords(records: ExportRecord[]): ExportData[] {
|
|
105
|
+
return records.map((record) => ({
|
|
106
|
+
name: record.name,
|
|
107
|
+
kind: record.kind,
|
|
108
|
+
...takeRange(record.range),
|
|
109
|
+
moduleSpecifier: record.moduleSpecifier,
|
|
110
|
+
}));
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
function mapImportRecords(records: ImportRecord[]): ImportData[] {
|
|
114
|
+
return records.map((record) => ({
|
|
115
|
+
moduleSpecifier: record.moduleSpecifier,
|
|
116
|
+
...takeRange(record.range),
|
|
117
|
+
}));
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
function mapNodeAtResult(result: NodeAtResult): NodeAtData {
|
|
121
|
+
return {
|
|
122
|
+
type: result.type,
|
|
123
|
+
...takeRange(result.range),
|
|
124
|
+
text: result.text,
|
|
125
|
+
ancestry: result.ancestry.map((a) => ({
|
|
126
|
+
type: a.type,
|
|
127
|
+
...takeRange(a.range),
|
|
128
|
+
})),
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
function mapCalleesAtResult(result: CalleesAtResult): CalleesData {
|
|
133
|
+
return {
|
|
134
|
+
enclosingScope: {
|
|
135
|
+
name: result.enclosingScope.name,
|
|
136
|
+
startLine: result.enclosingScope.range.startLine,
|
|
137
|
+
endLine: result.enclosingScope.range.endLine,
|
|
138
|
+
},
|
|
139
|
+
callees: result.callees.map((c) => ({
|
|
140
|
+
name: c.name,
|
|
141
|
+
startLine: c.range.startLine,
|
|
142
|
+
})),
|
|
143
|
+
};
|
|
144
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tree-sitter-to-runtime capability registration.
|
|
3
|
+
*
|
|
4
|
+
* Adapts a TreeSitterService into the runtime's StructuralProvider interface
|
|
5
|
+
* via the existing tree-sitter-provider adapter, and registers/unregisters it
|
|
6
|
+
* with the shared WorkspaceRuntime at session lifecycle boundaries.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import type { WorkspaceRuntime } from "@mrclrchtr/supi-code-runtime/api";
|
|
10
|
+
import { createTreeSitterProvider } from "../provider/tree-sitter-provider.ts";
|
|
11
|
+
import type { TreeSitterService } from "../types.ts";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Register tree-sitter structural capabilities for a workspace cwd.
|
|
15
|
+
*
|
|
16
|
+
* Wraps TreeSitterService into a StructuralProvider via the existing
|
|
17
|
+
* structural adapter and publishes it into the shared workspace runtime.
|
|
18
|
+
*/
|
|
19
|
+
export function registerTreeSitterCapabilities(
|
|
20
|
+
runtime: WorkspaceRuntime,
|
|
21
|
+
cwd: string,
|
|
22
|
+
service: TreeSitterService,
|
|
23
|
+
): void {
|
|
24
|
+
const provider = createTreeSitterProvider(service);
|
|
25
|
+
runtime.registerStructural(cwd, provider);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Unregister tree-sitter structural capabilities for a workspace cwd.
|
|
30
|
+
*
|
|
31
|
+
* Clears only the structural capability slot — semantic (LSP) state
|
|
32
|
+
* is left intact so that a tree-sitter session restart does not wipe
|
|
33
|
+
* LSP capabilities that were registered earlier in the same lifecycle.
|
|
34
|
+
*/
|
|
35
|
+
export function unregisterTreeSitterCapabilities(runtime: WorkspaceRuntime, cwd: string): void {
|
|
36
|
+
runtime.clearStructural(cwd);
|
|
37
|
+
}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
// Tree-sitter extension entry point — registers 6 focused tree_sitter_* tools.
|
|
2
2
|
|
|
3
3
|
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
4
|
+
import { getDefaultWorkspaceRuntime } from "@mrclrchtr/supi-code-runtime/api";
|
|
4
5
|
import { TreeSitterRuntime } from "./session/runtime.ts";
|
|
6
|
+
import {
|
|
7
|
+
registerTreeSitterCapabilities,
|
|
8
|
+
unregisterTreeSitterCapabilities,
|
|
9
|
+
} from "./session/runtime-registration.ts";
|
|
5
10
|
import {
|
|
6
11
|
clearSessionTreeSitterService,
|
|
7
12
|
setSessionTreeSitterService,
|
|
@@ -10,28 +15,33 @@ import { createTreeSitterService } from "./session/session.ts";
|
|
|
10
15
|
import { registerFocusedTreeSitterTools } from "./tool/register-tools.ts";
|
|
11
16
|
|
|
12
17
|
export default function treeSitterExtension(pi: ExtensionAPI) {
|
|
13
|
-
let
|
|
18
|
+
let treeSitterRuntime: TreeSitterRuntime | undefined;
|
|
14
19
|
let activeCwd: string | null = null;
|
|
20
|
+
const workspaceRuntime = getDefaultWorkspaceRuntime();
|
|
15
21
|
|
|
16
|
-
registerFocusedTreeSitterTools(pi, () =>
|
|
22
|
+
registerFocusedTreeSitterTools(pi, () => treeSitterRuntime);
|
|
17
23
|
|
|
18
24
|
pi.on("session_start", (_event, ctx) => {
|
|
19
|
-
if (
|
|
25
|
+
if (treeSitterRuntime && activeCwd) {
|
|
26
|
+
unregisterTreeSitterCapabilities(workspaceRuntime, activeCwd);
|
|
20
27
|
clearSessionTreeSitterService(activeCwd);
|
|
21
|
-
|
|
28
|
+
treeSitterRuntime.dispose();
|
|
22
29
|
}
|
|
23
30
|
|
|
24
31
|
activeCwd = ctx.cwd;
|
|
25
|
-
|
|
26
|
-
|
|
32
|
+
treeSitterRuntime = new TreeSitterRuntime(ctx.cwd);
|
|
33
|
+
const service = createTreeSitterService(treeSitterRuntime);
|
|
34
|
+
setSessionTreeSitterService(ctx.cwd, service);
|
|
35
|
+
registerTreeSitterCapabilities(workspaceRuntime, ctx.cwd, service);
|
|
27
36
|
});
|
|
28
37
|
|
|
29
38
|
pi.on("session_shutdown", () => {
|
|
30
39
|
if (activeCwd) {
|
|
40
|
+
unregisterTreeSitterCapabilities(workspaceRuntime, activeCwd);
|
|
31
41
|
clearSessionTreeSitterService(activeCwd);
|
|
32
42
|
}
|
|
33
|
-
|
|
34
|
-
|
|
43
|
+
treeSitterRuntime?.dispose();
|
|
44
|
+
treeSitterRuntime = undefined;
|
|
35
45
|
activeCwd = null;
|
|
36
46
|
});
|
|
37
47
|
}
|