@proxysoul/soulforge 1.1.1 → 1.2.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 (2) hide show
  1. package/dist/index.js +113 -47
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -439203,9 +439203,63 @@ var init_InputBox = __esm(async () => {
439203
439203
  });
439204
439204
 
439205
439205
  // src/core/utils/syntax.ts
439206
- import { existsSync as existsSync31 } from "fs";
439206
+ import { existsSync as existsSync31, readdirSync as readdirSync8 } from "fs";
439207
439207
  import { homedir as homedir20 } from "os";
439208
439208
  import { dirname as dirname16, join as join41, resolve as resolve34 } from "path";
439209
+ function discoverParsers() {
439210
+ const parsers = [];
439211
+ let dirs;
439212
+ try {
439213
+ dirs = readdirSync8(coreAssetsDir, {
439214
+ withFileTypes: true
439215
+ }).filter((d3) => d3.isDirectory()).map((d3) => d3.name);
439216
+ } catch {
439217
+ return parsers;
439218
+ }
439219
+ for (const dir of dirs) {
439220
+ const langDir = resolve34(coreAssetsDir, dir);
439221
+ const wasmFiles = readdirSync8(langDir).filter((f3) => f3.endsWith(".wasm"));
439222
+ const wasmFile = wasmFiles[0];
439223
+ if (!wasmFile)
439224
+ continue;
439225
+ const highlights = resolve34(langDir, "highlights.scm");
439226
+ const injections = resolve34(langDir, "injections.scm");
439227
+ const hasHighlights = existsSync31(highlights);
439228
+ const hasInjections = existsSync31(injections);
439229
+ if (!hasHighlights)
439230
+ continue;
439231
+ const parser = {
439232
+ filetype: dir,
439233
+ queries: {
439234
+ highlights: [highlights],
439235
+ ...hasInjections ? {
439236
+ injections: [injections]
439237
+ } : {}
439238
+ },
439239
+ wasm: resolve34(langDir, wasmFile),
439240
+ ...TS_ALIASES[dir] ? {
439241
+ aliases: TS_ALIASES[dir]
439242
+ } : {},
439243
+ ...dir === "markdown" ? {
439244
+ injectionMapping: MARKDOWN_INJECTION_MAP
439245
+ } : {}
439246
+ };
439247
+ parsers.push(parser);
439248
+ const extras = EXTRA_FILETYPES[dir];
439249
+ if (extras) {
439250
+ for (const extra of extras) {
439251
+ parsers.push({
439252
+ ...extra,
439253
+ queries: {
439254
+ highlights: [highlights]
439255
+ },
439256
+ wasm: resolve34(langDir, wasmFile)
439257
+ });
439258
+ }
439259
+ }
439260
+ }
439261
+ return parsers;
439262
+ }
439209
439263
  function getSyntaxStyle() {
439210
439264
  if (!_syntaxStyle)
439211
439265
  _syntaxStyle = SyntaxStyle.fromTheme(theme);
@@ -439218,7 +439272,7 @@ function getTSClient() {
439218
439272
  }
439219
439273
  return _tsClient;
439220
439274
  }
439221
- var IS_BUNDLED3, bundledAssets, coreAssetsDir, tsHighlights, tsWasm, jsHighlights, jsWasm, aliases2, theme, _syntaxStyle = null, _tsClient = null, TREE_SITTER_LANGS;
439275
+ var IS_BUNDLED3, bundledAssets, coreAssetsDir, MARKDOWN_INJECTION_MAP, TS_ALIASES, EXTRA_FILETYPES, theme, _syntaxStyle = null, _tsClient = null, TREE_SITTER_LANGS;
439222
439276
  var init_syntax = __esm(async () => {
439223
439277
  await init_core4();
439224
439278
  IS_BUNDLED3 = import.meta.url.includes("$bunfs");
@@ -439234,48 +439288,57 @@ var init_syntax = __esm(async () => {
439234
439288
  if (!existsSync31(coreAssetsDir))
439235
439289
  coreAssetsDir = bundledAssets;
439236
439290
  }
439237
- tsHighlights = [resolve34(coreAssetsDir, "typescript/highlights.scm")];
439238
- tsWasm = resolve34(coreAssetsDir, "typescript/tree-sitter-typescript.wasm");
439239
- jsHighlights = [resolve34(coreAssetsDir, "javascript/highlights.scm")];
439240
- jsWasm = resolve34(coreAssetsDir, "javascript/tree-sitter-javascript.wasm");
439241
- aliases2 = [{
439242
- filetype: "ts",
439243
- queries: {
439244
- highlights: tsHighlights
439245
- },
439246
- wasm: tsWasm
439247
- }, {
439248
- filetype: "tsx",
439249
- queries: {
439250
- highlights: tsHighlights
439251
- },
439252
- wasm: tsWasm
439253
- }, {
439254
- filetype: "js",
439255
- queries: {
439256
- highlights: jsHighlights
439257
- },
439258
- wasm: jsWasm
439259
- }, {
439260
- filetype: "jsx",
439261
- queries: {
439262
- highlights: jsHighlights
439263
- },
439264
- wasm: jsWasm
439265
- }, {
439266
- filetype: "typescriptreact",
439267
- queries: {
439268
- highlights: tsHighlights
439269
- },
439270
- wasm: tsWasm
439271
- }, {
439272
- filetype: "javascriptreact",
439273
- queries: {
439274
- highlights: jsHighlights
439275
- },
439276
- wasm: jsWasm
439277
- }];
439278
- addDefaultParsers(aliases2);
439291
+ MARKDOWN_INJECTION_MAP = {
439292
+ nodeTypes: {
439293
+ inline: "markdown_inline",
439294
+ pipe_table_cell: "markdown_inline"
439295
+ },
439296
+ infoStringMap: {
439297
+ javascript: "javascript",
439298
+ js: "javascript",
439299
+ jsx: "javascriptreact",
439300
+ javascriptreact: "javascriptreact",
439301
+ typescript: "typescript",
439302
+ ts: "typescript",
439303
+ tsx: "typescriptreact",
439304
+ typescriptreact: "typescriptreact",
439305
+ markdown: "markdown",
439306
+ md: "markdown"
439307
+ }
439308
+ };
439309
+ TS_ALIASES = {
439310
+ typescript: ["typescriptreact"],
439311
+ javascript: ["javascriptreact"]
439312
+ };
439313
+ EXTRA_FILETYPES = {
439314
+ typescript: [{
439315
+ filetype: "ts",
439316
+ queries: {
439317
+ highlights: []
439318
+ },
439319
+ wasm: ""
439320
+ }, {
439321
+ filetype: "tsx",
439322
+ queries: {
439323
+ highlights: []
439324
+ },
439325
+ wasm: ""
439326
+ }],
439327
+ javascript: [{
439328
+ filetype: "js",
439329
+ queries: {
439330
+ highlights: []
439331
+ },
439332
+ wasm: ""
439333
+ }, {
439334
+ filetype: "jsx",
439335
+ queries: {
439336
+ highlights: []
439337
+ },
439338
+ wasm: ""
439339
+ }]
439340
+ };
439341
+ addDefaultParsers(discoverParsers());
439279
439342
  theme = [{
439280
439343
  scope: ["default"],
439281
439344
  style: {
@@ -466795,11 +466858,11 @@ function getAllPackageStatus(category) {
466795
466858
  function detectProjectLanguages(cwd2) {
466796
466859
  const languages = [];
466797
466860
  const {
466798
- readdirSync: readdirSync8
466861
+ readdirSync: readdirSync9
466799
466862
  } = __require("fs");
466800
466863
  let files;
466801
466864
  try {
466802
- files = readdirSync8(cwd2);
466865
+ files = readdirSync9(cwd2);
466803
466866
  } catch {
466804
466867
  return [];
466805
466868
  }
@@ -466855,7 +466918,10 @@ async function installPackage(pkg, onProgress) {
466855
466918
  });
466856
466919
  return "bun";
466857
466920
  } catch {
466858
- return process.execPath;
466921
+ const sfBin = join44(homedir21(), ".soulforge", "bin", "bun");
466922
+ if (existsSync32(sfBin))
466923
+ return sfBin;
466924
+ return "bun";
466859
466925
  }
466860
466926
  })();
466861
466927
  await runCommand(bunBin, ["add", "--cwd", SOULFORGE_LSP_DIR, fullName, ...extras], log, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proxysoul/soulforge",
3
- "version": "1.1.1",
3
+ "version": "1.2.0",
4
4
  "description": "Graph-powered code intelligence — multi-agent coding with codebase-aware AI",
5
5
  "repository": {
6
6
  "type": "git",