@smeltjs/core 0.2.0 → 0.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.
- package/README.md +3 -3
- package/dist/apply.d.ts.map +1 -1
- package/dist/apply.js.map +1 -1
- package/dist/cache/prefix.d.ts.map +1 -1
- package/dist/cache/prefix.js.map +1 -1
- package/dist/cli/args.d.ts +16 -70
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +18 -338
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/bin.d.ts.map +1 -1
- package/dist/cli/bin.js.map +1 -1
- package/dist/cli/config.d.ts +40 -0
- package/dist/cli/config.d.ts.map +1 -1
- package/dist/cli/config.js +55 -1
- package/dist/cli/config.js.map +1 -1
- package/dist/cli/hooks.d.ts +33 -38
- package/dist/cli/hooks.d.ts.map +1 -1
- package/dist/cli/hooks.js +140 -485
- package/dist/cli/hooks.js.map +1 -1
- package/dist/cli/init.d.ts +30 -15
- package/dist/cli/init.d.ts.map +1 -1
- package/dist/cli/init.js +167 -38
- package/dist/cli/init.js.map +1 -1
- package/dist/cli/report.d.ts.map +1 -1
- package/dist/cli/report.js +2 -2
- package/dist/cli/report.js.map +1 -1
- package/dist/cli/run.d.ts +25 -88
- package/dist/cli/run.d.ts.map +1 -1
- package/dist/cli/run.js +32 -341
- package/dist/cli/run.js.map +1 -1
- package/dist/cli/shell.d.ts +106 -0
- package/dist/cli/shell.d.ts.map +1 -0
- package/dist/cli/shell.js +100 -0
- package/dist/cli/shell.js.map +1 -0
- package/dist/cli/subcommands/flags.d.ts +141 -0
- package/dist/cli/subcommands/flags.d.ts.map +1 -0
- package/dist/cli/subcommands/flags.js +208 -0
- package/dist/cli/subcommands/flags.js.map +1 -0
- package/dist/cli/subcommands/hooks.d.ts +18 -0
- package/dist/cli/subcommands/hooks.d.ts.map +1 -0
- package/dist/cli/subcommands/hooks.js +64 -0
- package/dist/cli/subcommands/hooks.js.map +1 -0
- package/dist/cli/subcommands/init.d.ts +19 -0
- package/dist/cli/subcommands/init.d.ts.map +1 -0
- package/dist/cli/subcommands/init.js +44 -0
- package/dist/cli/subcommands/init.js.map +1 -0
- package/dist/cli/subcommands/map.d.ts +75 -0
- package/dist/cli/subcommands/map.d.ts.map +1 -0
- package/dist/cli/subcommands/map.js +132 -0
- package/dist/cli/subcommands/map.js.map +1 -0
- package/dist/cli/subcommands/registry.d.ts +80 -0
- package/dist/cli/subcommands/registry.d.ts.map +1 -0
- package/dist/cli/subcommands/registry.js +138 -0
- package/dist/cli/subcommands/registry.js.map +1 -0
- package/dist/cli/subcommands/retrieve.d.ts +74 -0
- package/dist/cli/subcommands/retrieve.d.ts.map +1 -0
- package/dist/cli/subcommands/retrieve.js +84 -0
- package/dist/cli/subcommands/retrieve.js.map +1 -0
- package/dist/cli/subcommands/smelt.d.ts +107 -0
- package/dist/cli/subcommands/smelt.d.ts.map +1 -0
- package/dist/cli/subcommands/smelt.js +304 -0
- package/dist/cli/subcommands/smelt.js.map +1 -0
- package/dist/cli/subcommands/stats.d.ts +43 -0
- package/dist/cli/subcommands/stats.d.ts.map +1 -0
- package/dist/cli/subcommands/stats.js +62 -0
- package/dist/cli/subcommands/stats.js.map +1 -0
- package/dist/cli/subcommands/subcommand.d.ts +113 -0
- package/dist/cli/subcommands/subcommand.d.ts.map +1 -0
- package/dist/cli/subcommands/subcommand.js +3 -0
- package/dist/cli/subcommands/subcommand.js.map +1 -0
- package/dist/cli/usage.d.ts +3 -0
- package/dist/cli/usage.d.ts.map +1 -0
- package/dist/cli/usage.js +95 -0
- package/dist/cli/usage.js.map +1 -0
- package/dist/detect.d.ts.map +1 -1
- package/dist/detect.js.map +1 -1
- package/dist/errors.d.ts +21 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +33 -1
- package/dist/errors.js.map +1 -1
- package/dist/harness/aider.d.ts +10 -0
- package/dist/harness/aider.d.ts.map +1 -0
- package/dist/harness/aider.js +21 -0
- package/dist/harness/aider.js.map +1 -0
- package/dist/harness/claude-code.d.ts +3 -0
- package/dist/harness/claude-code.d.ts.map +1 -0
- package/dist/harness/claude-code.js +68 -0
- package/dist/harness/claude-code.js.map +1 -0
- package/dist/harness/cline.d.ts +3 -0
- package/dist/harness/cline.d.ts.map +1 -0
- package/dist/harness/cline.js +54 -0
- package/dist/harness/cline.js.map +1 -0
- package/dist/harness/codex.d.ts +3 -0
- package/dist/harness/codex.d.ts.map +1 -0
- package/dist/harness/codex.js +91 -0
- package/dist/harness/codex.js.map +1 -0
- package/dist/harness/cursor.d.ts +3 -0
- package/dist/harness/cursor.d.ts.map +1 -0
- package/dist/harness/cursor.js +54 -0
- package/dist/harness/cursor.js.map +1 -0
- package/dist/harness/gemini.d.ts +3 -0
- package/dist/harness/gemini.d.ts.map +1 -0
- package/dist/harness/gemini.js +59 -0
- package/dist/harness/gemini.js.map +1 -0
- package/dist/harness/grok.d.ts +3 -0
- package/dist/harness/grok.d.ts.map +1 -0
- package/dist/harness/grok.js +46 -0
- package/dist/harness/grok.js.map +1 -0
- package/dist/harness/hermes.d.ts +3 -0
- package/dist/harness/hermes.d.ts.map +1 -0
- package/dist/harness/hermes.js +71 -0
- package/dist/harness/hermes.js.map +1 -0
- package/dist/harness/kilocode.d.ts +3 -0
- package/dist/harness/kilocode.d.ts.map +1 -0
- package/dist/harness/kilocode.js +35 -0
- package/dist/harness/kilocode.js.map +1 -0
- package/dist/harness/opencode.d.ts +3 -0
- package/dist/harness/opencode.d.ts.map +1 -0
- package/dist/harness/opencode.js +97 -0
- package/dist/harness/opencode.js.map +1 -0
- package/dist/harness/paths.d.ts +17 -0
- package/dist/harness/paths.d.ts.map +1 -0
- package/dist/harness/paths.js +45 -0
- package/dist/harness/paths.js.map +1 -0
- package/dist/harness/profile.d.ts +184 -0
- package/dist/harness/profile.d.ts.map +1 -0
- package/dist/harness/profile.js +26 -0
- package/dist/harness/profile.js.map +1 -0
- package/dist/harness/registry.d.ts +51 -0
- package/dist/harness/registry.d.ts.map +1 -0
- package/dist/harness/registry.js +87 -0
- package/dist/harness/registry.js.map +1 -0
- package/dist/harness/snippet.d.ts +19 -0
- package/dist/harness/snippet.d.ts.map +1 -0
- package/dist/harness/snippet.js +41 -0
- package/dist/harness/snippet.js.map +1 -0
- package/dist/hash.d.ts.map +1 -1
- package/dist/hash.js.map +1 -1
- package/dist/hooks/guard-core.d.ts +14 -14
- package/dist/hooks/guard-core.d.ts.map +1 -1
- package/dist/hooks/guard-core.js +15 -37
- package/dist/hooks/guard-core.js.map +1 -1
- package/dist/hooks/shim.d.ts +95 -4
- package/dist/hooks/shim.d.ts.map +1 -1
- package/dist/hooks/shim.js +87 -2
- package/dist/hooks/shim.js.map +1 -1
- package/dist/hooks/shims/claude-code.d.ts +5 -18
- package/dist/hooks/shims/claude-code.d.ts.map +1 -1
- package/dist/hooks/shims/claude-code.js +9 -56
- package/dist/hooks/shims/claude-code.js.map +1 -1
- package/dist/hooks/shims/cline.d.ts +5 -12
- package/dist/hooks/shims/cline.d.ts.map +1 -1
- package/dist/hooks/shims/cline.js +9 -34
- package/dist/hooks/shims/cline.js.map +1 -1
- package/dist/hooks/shims/codex.d.ts +5 -18
- package/dist/hooks/shims/codex.d.ts.map +1 -1
- package/dist/hooks/shims/codex.js +9 -51
- package/dist/hooks/shims/codex.js.map +1 -1
- package/dist/hooks/shims/cursor.d.ts +5 -14
- package/dist/hooks/shims/cursor.d.ts.map +1 -1
- package/dist/hooks/shims/cursor.js +9 -42
- package/dist/hooks/shims/cursor.js.map +1 -1
- package/dist/hooks/shims/gemini.d.ts +5 -18
- package/dist/hooks/shims/gemini.d.ts.map +1 -1
- package/dist/hooks/shims/gemini.js +9 -48
- package/dist/hooks/shims/gemini.js.map +1 -1
- package/dist/hooks/shims/grok.d.ts +5 -13
- package/dist/hooks/shims/grok.d.ts.map +1 -1
- package/dist/hooks/shims/grok.js +9 -32
- package/dist/hooks/shims/grok.js.map +1 -1
- package/dist/hooks/shims/hermes.d.ts +5 -17
- package/dist/hooks/shims/hermes.d.ts.map +1 -1
- package/dist/hooks/shims/hermes.js +9 -45
- package/dist/hooks/shims/hermes.js.map +1 -1
- package/dist/index.d.ts +33 -76
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -67
- package/dist/index.js.map +1 -1
- package/dist/lang/bash.d.ts.map +1 -1
- package/dist/lang/bash.js.map +1 -1
- package/dist/lang/c.d.ts.map +1 -1
- package/dist/lang/c.js.map +1 -1
- package/dist/lang/c_sharp.d.ts.map +1 -1
- package/dist/lang/c_sharp.js.map +1 -1
- package/dist/lang/cpp.d.ts.map +1 -1
- package/dist/lang/cpp.js.map +1 -1
- package/dist/lang/go.d.ts.map +1 -1
- package/dist/lang/go.js.map +1 -1
- package/dist/lang/java.d.ts.map +1 -1
- package/dist/lang/java.js.map +1 -1
- package/dist/lang/javascript.d.ts.map +1 -1
- package/dist/lang/javascript.js.map +1 -1
- package/dist/lang/kotlin.d.ts.map +1 -1
- package/dist/lang/kotlin.js.map +1 -1
- package/dist/lang/php.d.ts.map +1 -1
- package/dist/lang/php.js.map +1 -1
- package/dist/lang/profile.d.ts.map +1 -1
- package/dist/lang/profile.js.map +1 -1
- package/dist/lang/python.d.ts.map +1 -1
- package/dist/lang/python.js.map +1 -1
- package/dist/lang/registry.d.ts.map +1 -1
- package/dist/lang/registry.js.map +1 -1
- package/dist/lang/ruby.d.ts.map +1 -1
- package/dist/lang/ruby.js.map +1 -1
- package/dist/lang/rust.d.ts.map +1 -1
- package/dist/lang/rust.js.map +1 -1
- package/dist/lang/swift.d.ts.map +1 -1
- package/dist/lang/swift.js.map +1 -1
- package/dist/lang/tsx.d.ts.map +1 -1
- package/dist/lang/tsx.js.map +1 -1
- package/dist/lang/typescript.d.ts.map +1 -1
- package/dist/lang/typescript.js.map +1 -1
- package/dist/net/policy.d.ts +18 -1
- package/dist/net/policy.d.ts.map +1 -1
- package/dist/net/policy.js +6 -4
- package/dist/net/policy.js.map +1 -1
- package/dist/ops/index.d.ts +39 -0
- package/dist/ops/index.d.ts.map +1 -0
- package/dist/ops/index.js +37 -0
- package/dist/ops/index.js.map +1 -0
- package/dist/ops/inputs.d.ts +170 -0
- package/dist/ops/inputs.d.ts.map +1 -0
- package/dist/ops/inputs.js +142 -0
- package/dist/ops/inputs.js.map +1 -0
- package/dist/ops/verbs.d.ts +136 -0
- package/dist/ops/verbs.d.ts.map +1 -0
- package/dist/ops/verbs.js +76 -0
- package/dist/ops/verbs.js.map +1 -0
- package/dist/plan/auto.d.ts +69 -0
- package/dist/plan/auto.d.ts.map +1 -0
- package/dist/plan/auto.js +70 -0
- package/dist/plan/auto.js.map +1 -0
- package/dist/plan/budget.d.ts +21 -0
- package/dist/plan/budget.d.ts.map +1 -0
- package/dist/plan/budget.js +26 -0
- package/dist/plan/budget.js.map +1 -0
- package/dist/plan/grammar.d.ts +14 -0
- package/dist/plan/grammar.d.ts.map +1 -1
- package/dist/plan/grammar.js +47 -6
- package/dist/plan/grammar.js.map +1 -1
- package/dist/plan/lexical.d.ts.map +1 -1
- package/dist/plan/lexical.js +1 -7
- package/dist/plan/lexical.js.map +1 -1
- package/dist/plan/planners.d.ts +35 -2
- package/dist/plan/planners.d.ts.map +1 -1
- package/dist/plan/planners.js +35 -2
- package/dist/plan/planners.js.map +1 -1
- package/dist/plan/structural.d.ts +19 -5
- package/dist/plan/structural.d.ts.map +1 -1
- package/dist/plan/structural.js +180 -33
- package/dist/plan/structural.js.map +1 -1
- package/dist/repomap/cache.d.ts +48 -0
- package/dist/repomap/cache.d.ts.map +1 -1
- package/dist/repomap/cache.js +112 -13
- package/dist/repomap/cache.js.map +1 -1
- package/dist/repomap/io.d.ts +24 -0
- package/dist/repomap/io.d.ts.map +1 -0
- package/dist/repomap/io.js +34 -0
- package/dist/repomap/io.js.map +1 -0
- package/dist/repomap/map.d.ts +69 -6
- package/dist/repomap/map.d.ts.map +1 -1
- package/dist/repomap/map.js +104 -22
- package/dist/repomap/map.js.map +1 -1
- package/dist/repomap/rank.d.ts +26 -2
- package/dist/repomap/rank.d.ts.map +1 -1
- package/dist/repomap/rank.js +20 -0
- package/dist/repomap/rank.js.map +1 -1
- package/dist/repomap/reader.d.ts +73 -0
- package/dist/repomap/reader.d.ts.map +1 -0
- package/dist/repomap/reader.js +30 -0
- package/dist/repomap/reader.js.map +1 -0
- package/dist/repomap/tags.d.ts.map +1 -1
- package/dist/repomap/tags.js.map +1 -1
- package/dist/retrieve.d.ts +8 -0
- package/dist/retrieve.d.ts.map +1 -1
- package/dist/retrieve.js +12 -1
- package/dist/retrieve.js.map +1 -1
- package/dist/smelter.d.ts +79 -0
- package/dist/smelter.d.ts.map +1 -0
- package/dist/smelter.js +65 -0
- package/dist/smelter.js.map +1 -0
- package/dist/stages.d.ts.map +1 -1
- package/dist/stages.js +2 -2
- package/dist/stages.js.map +1 -1
- package/dist/stats.d.ts +2 -1
- package/dist/stats.d.ts.map +1 -1
- package/dist/stats.js +2 -1
- package/dist/stats.js.map +1 -1
- package/dist/store-dir.d.ts +43 -4
- package/dist/store-dir.d.ts.map +1 -1
- package/dist/store-dir.js +48 -5
- package/dist/store-dir.js.map +1 -1
- package/dist/store.d.ts +6 -0
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +6 -0
- package/dist/store.js.map +1 -1
- package/dist/types.d.ts +35 -3
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/grammars/tree-sitter-bash.wasm +0 -0
- package/grammars/tree-sitter-c.wasm +0 -0
- package/grammars/tree-sitter-c_sharp.wasm +0 -0
- package/grammars/tree-sitter-cpp.wasm +0 -0
- package/grammars/tree-sitter-go.wasm +0 -0
- package/grammars/tree-sitter-java.wasm +0 -0
- package/grammars/tree-sitter-javascript.wasm +0 -0
- package/grammars/tree-sitter-kotlin.wasm +0 -0
- package/grammars/tree-sitter-php.wasm +0 -0
- package/grammars/tree-sitter-python.wasm +0 -0
- package/grammars/tree-sitter-ruby.wasm +0 -0
- package/grammars/tree-sitter-rust.wasm +0 -0
- package/grammars/tree-sitter-swift.wasm +0 -0
- package/grammars/tree-sitter-tsx.wasm +0 -0
- package/grammars/tree-sitter-typescript.wasm +0 -0
- package/package.json +11 -11
- package/dist/cli/resolve.d.ts +0 -103
- package/dist/cli/resolve.d.ts.map +0 -1
- package/dist/cli/resolve.js +0 -106
- package/dist/cli/resolve.js.map +0 -1
package/dist/lang/java.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"java.d.ts","sourceRoot":"","sources":["../../src/lang/java.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,eAAO,MAAM,IAAI,EAAE,eAgClB,CAAC"}
|
|
1
|
+
{"version":3,"file":"java.d.ts","sourceRoot":"","sources":["../../src/lang/java.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,eAAO,MAAM,IAAI,EAAE,eAgClB,CAAC","sourcesContent":["import type { LanguageProfile } from './profile.ts';\n\nexport const java: LanguageProfile = {\n id: 'java',\n extensions: ['java'],\n wasm: 'tree-sitter-java.wasm',\n markerLeader: '// ',\n structure: {\n // `//` is line_comment, `/** … */` javadoc is block_comment — both attach.\n commentTypes: new Set(['line_comment', 'block_comment']),\n attributeTypes: new Set(),\n wrapperTypes: {},\n kindLabels: {\n class_declaration: 'class',\n interface_declaration: 'interface',\n enum_declaration: 'enum',\n record_declaration: 'record',\n annotation_type_declaration: 'annotation type',\n package_declaration: 'package declaration',\n import_declaration: 'import declaration',\n module_declaration: 'module declaration',\n },\n },\n repomap: {\n defKinds: {\n class_declaration: 'class',\n interface_declaration: 'interface',\n enum_declaration: 'enum',\n record_declaration: 'record',\n annotation_type_declaration: 'annotation type',\n method_declaration: 'method',\n },\n refTypes: ['identifier', 'type_identifier'],\n },\n};\n"]}
|
package/dist/lang/java.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"java.js","sourceRoot":"","sources":["../../src/lang/java.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,IAAI,GAAoB;IACnC,EAAE,EAAE,MAAM;IACV,UAAU,EAAE,CAAC,MAAM,CAAC;IACpB,IAAI,EAAE,uBAAuB;IAC7B,YAAY,EAAE,KAAK;IACnB,SAAS,EAAE;QACT,2EAA2E;QAC3E,YAAY,EAAE,IAAI,GAAG,CAAC,CAAC,cAAc,EAAE,eAAe,CAAC,CAAC;QACxD,cAAc,EAAE,IAAI,GAAG,EAAE;QACzB,YAAY,EAAE,EAAE;QAChB,UAAU,EAAE;YACV,iBAAiB,EAAE,OAAO;YAC1B,qBAAqB,EAAE,WAAW;YAClC,gBAAgB,EAAE,MAAM;YACxB,kBAAkB,EAAE,QAAQ;YAC5B,2BAA2B,EAAE,iBAAiB;YAC9C,mBAAmB,EAAE,qBAAqB;YAC1C,kBAAkB,EAAE,oBAAoB;YACxC,kBAAkB,EAAE,oBAAoB;SACzC;KACF;IACD,OAAO,EAAE;QACP,QAAQ,EAAE;YACR,iBAAiB,EAAE,OAAO;YAC1B,qBAAqB,EAAE,WAAW;YAClC,gBAAgB,EAAE,MAAM;YACxB,kBAAkB,EAAE,QAAQ;YAC5B,2BAA2B,EAAE,iBAAiB;YAC9C,kBAAkB,EAAE,QAAQ;SAC7B;QACD,QAAQ,EAAE,CAAC,YAAY,EAAE,iBAAiB,CAAC;KAC5C;CACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"java.js","sourceRoot":"","sources":["../../src/lang/java.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,IAAI,GAAoB;IACnC,EAAE,EAAE,MAAM;IACV,UAAU,EAAE,CAAC,MAAM,CAAC;IACpB,IAAI,EAAE,uBAAuB;IAC7B,YAAY,EAAE,KAAK;IACnB,SAAS,EAAE;QACT,2EAA2E;QAC3E,YAAY,EAAE,IAAI,GAAG,CAAC,CAAC,cAAc,EAAE,eAAe,CAAC,CAAC;QACxD,cAAc,EAAE,IAAI,GAAG,EAAE;QACzB,YAAY,EAAE,EAAE;QAChB,UAAU,EAAE;YACV,iBAAiB,EAAE,OAAO;YAC1B,qBAAqB,EAAE,WAAW;YAClC,gBAAgB,EAAE,MAAM;YACxB,kBAAkB,EAAE,QAAQ;YAC5B,2BAA2B,EAAE,iBAAiB;YAC9C,mBAAmB,EAAE,qBAAqB;YAC1C,kBAAkB,EAAE,oBAAoB;YACxC,kBAAkB,EAAE,oBAAoB;SACzC;KACF;IACD,OAAO,EAAE;QACP,QAAQ,EAAE;YACR,iBAAiB,EAAE,OAAO;YAC1B,qBAAqB,EAAE,WAAW;YAClC,gBAAgB,EAAE,MAAM;YACxB,kBAAkB,EAAE,QAAQ;YAC5B,2BAA2B,EAAE,iBAAiB;YAC9C,kBAAkB,EAAE,QAAQ;SAC7B;QACD,QAAQ,EAAE,CAAC,YAAY,EAAE,iBAAiB,CAAC;KAC5C;CACF,CAAC","sourcesContent":["import type { LanguageProfile } from './profile.ts';\n\nexport const java: LanguageProfile = {\n id: 'java',\n extensions: ['java'],\n wasm: 'tree-sitter-java.wasm',\n markerLeader: '// ',\n structure: {\n // `//` is line_comment, `/** … */` javadoc is block_comment — both attach.\n commentTypes: new Set(['line_comment', 'block_comment']),\n attributeTypes: new Set(),\n wrapperTypes: {},\n kindLabels: {\n class_declaration: 'class',\n interface_declaration: 'interface',\n enum_declaration: 'enum',\n record_declaration: 'record',\n annotation_type_declaration: 'annotation type',\n package_declaration: 'package declaration',\n import_declaration: 'import declaration',\n module_declaration: 'module declaration',\n },\n },\n repomap: {\n defKinds: {\n class_declaration: 'class',\n interface_declaration: 'interface',\n enum_declaration: 'enum',\n record_declaration: 'record',\n annotation_type_declaration: 'annotation type',\n method_declaration: 'method',\n },\n refTypes: ['identifier', 'type_identifier'],\n },\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"javascript.d.ts","sourceRoot":"","sources":["../../src/lang/javascript.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAGpD,eAAO,MAAM,UAAU,EAAE,eAyBxB,CAAC"}
|
|
1
|
+
{"version":3,"file":"javascript.d.ts","sourceRoot":"","sources":["../../src/lang/javascript.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAGpD,eAAO,MAAM,UAAU,EAAE,eAyBxB,CAAC","sourcesContent":["import type { LanguageProfile } from './profile.ts';\nimport { TS_DEF_KINDS, TS_REF_TYPES } from './typescript.ts';\n\nexport const javascript: LanguageProfile = {\n id: 'javascript',\n extensions: ['js', 'mjs', 'cjs', 'jsx'],\n wasm: 'tree-sitter-javascript.wasm',\n markerLeader: '// ',\n structure: {\n commentTypes: new Set(['comment']),\n attributeTypes: new Set(),\n // `#!/usr/bin/env node` parses as a hash_bang_line node, and it decides how the\n // file executes — a collapse that swallowed it would break every direct invocation.\n pinnedTypes: new Set(['hash_bang_line']),\n wrapperTypes: { export_statement: 'export' },\n kindLabels: {\n function_declaration: 'function',\n generator_function_declaration: 'function',\n class_declaration: 'class',\n lexical_declaration: 'variable',\n variable_declaration: 'variable',\n import_statement: 'import statement',\n expression_statement: 'statement',\n hash_bang_line: 'shebang',\n comment: 'comment',\n },\n },\n repomap: { defKinds: TS_DEF_KINDS, refTypes: TS_REF_TYPES },\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"javascript.js","sourceRoot":"","sources":["../../src/lang/javascript.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE7D,MAAM,CAAC,MAAM,UAAU,GAAoB;IACzC,EAAE,EAAE,YAAY;IAChB,UAAU,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;IACvC,IAAI,EAAE,6BAA6B;IACnC,YAAY,EAAE,KAAK;IACnB,SAAS,EAAE;QACT,YAA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,UAAU;YAC1C,iBAAiB,EAAE,OAAO;YAC1B,mBAAmB,EAAE,UAAU;YAC/B,oBAAoB,EAAE,UAAU;YAChC,gBAAgB,EAAE,kBAAkB;YACpC,oBAAoB,EAAE,WAAW;YACjC,cAAc,EAAE,SAAS;YACzB,OAAO,EAAE,SAAS;SACnB;KACF;IACD,OAAO,EAAE,EAAE,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,YAAY,EAAE;CAC5D,CAAC","sourcesContent":["import type { LanguageProfile } from './profile.ts';\nimport { TS_DEF_KINDS, TS_REF_TYPES } from './typescript.ts';\n\nexport const javascript: LanguageProfile = {\n id: 'javascript',\n extensions: ['js', 'mjs', 'cjs', 'jsx'],\n wasm: 'tree-sitter-javascript.wasm',\n markerLeader: '// ',\n structure: {\n commentTypes: new Set(['comment']),\n attributeTypes: new Set(),\n // `#!/usr/bin/env node` parses as a hash_bang_line node, and it decides how the\n // file executes — a collapse that swallowed it would break every direct invocation.\n pinnedTypes: new Set(['hash_bang_line']),\n wrapperTypes: { export_statement: 'export' },\n kindLabels: {\n function_declaration: 'function',\n generator_function_declaration: 'function',\n class_declaration: 'class',\n lexical_declaration: 'variable',\n variable_declaration: 'variable',\n import_statement: 'import statement',\n expression_statement: 'statement',\n hash_bang_line: 'shebang',\n comment: 'comment',\n },\n },\n repomap: { defKinds: TS_DEF_KINDS, refTypes: TS_REF_TYPES },\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kotlin.d.ts","sourceRoot":"","sources":["../../src/lang/kotlin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,eAAO,MAAM,MAAM,EAAE,eAmCpB,CAAC"}
|
|
1
|
+
{"version":3,"file":"kotlin.d.ts","sourceRoot":"","sources":["../../src/lang/kotlin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,eAAO,MAAM,MAAM,EAAE,eAmCpB,CAAC","sourcesContent":["import type { LanguageProfile } from './profile.ts';\n\nexport const kotlin: LanguageProfile = {\n id: 'kotlin',\n extensions: ['kt', 'kts'],\n wasm: 'tree-sitter-kotlin.wasm',\n markerLeader: '// ',\n structure: {\n // `//` is line_comment; `/** … */` KDoc is multiline_comment.\n commentTypes: new Set(['line_comment', 'multiline_comment']),\n attributeTypes: new Set(),\n // `#!/usr/bin/env kotlin` parses as a shebang_line node; same law as the rest.\n pinnedTypes: new Set(['shebang_line']),\n // tree-sitter-kotlin extends import_list over a doc comment that directly\n // follows it — the KDoc of the first documented declaration after the imports.\n // Split it back out, or that declaration loses its doc to the import collapse.\n trailingCommentSplitTypes: new Set(['import_list']),\n wrapperTypes: {},\n kindLabels: {\n function_declaration: 'function',\n // tree-sitter-kotlin parses class, interface and enum headers all as\n // class_declaration — \"type declaration\" is the honest word for the union.\n class_declaration: 'type declaration',\n object_declaration: 'object',\n property_declaration: 'property',\n type_alias: 'type alias',\n package_header: 'package header',\n import_list: 'import list',\n shebang_line: 'shebang',\n },\n },\n // No def kinds: tree-sitter-kotlin's declarations carry no identifier `name`\n // field the extraction walk can read, so kotlin symbols are omitted, not guessed.\n repomap: {\n defKinds: {},\n refTypes: ['simple_identifier', 'type_identifier'],\n },\n};\n"]}
|
package/dist/lang/kotlin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kotlin.js","sourceRoot":"","sources":["../../src/lang/kotlin.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,MAAM,GAAoB;IACrC,EAAE,EAAE,QAAQ;IACZ,UAAU,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC;IACzB,IAAI,EAAE,yBAAyB;IAC/B,YAAY,EAAE,KAAK;IACnB,SAAS,EAAE;QACT,8DAA8D;QAC9D,YAAY,EAAE,IAAI,GAAG,CAAC,CAAC,cAAc,EAAE,mBAAmB,CAAC,CAAC;QAC5D,cAAc,EA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E,EAAE;QAChB,UAAU,EAAE;YACV,oBAAoB,EAAE,UAAU;YAChC,qEAAqE;YACrE,2EAA2E;YAC3E,iBAAiB,EAAE,kBAAkB;YACrC,kBAAkB,EAAE,QAAQ;YAC5B,oBAAoB,EAAE,UAAU;YAChC,UAAU,EAAE,YAAY;YACxB,cAAc,EAAE,gBAAgB;YAChC,WAAW,EAAE,aAAa;YAC1B,YAAY,EAAE,SAAS;SACxB;KACF;IACD,6EAA6E;IAC7E,kFAAkF;IAClF,OAAO,EAAE;QACP,QAAQ,EAAE,EAAE;QACZ,QAAQ,EAAE,CAAC,mBAAmB,EAAE,iBAAiB,CAAC;KACnD;CACF,CAAC","sourcesContent":["import type { LanguageProfile } from './profile.ts';\n\nexport const kotlin: LanguageProfile = {\n id: 'kotlin',\n extensions: ['kt', 'kts'],\n wasm: 'tree-sitter-kotlin.wasm',\n markerLeader: '// ',\n structure: {\n // `//` is line_comment; `/** … */` KDoc is multiline_comment.\n commentTypes: new Set(['line_comment', 'multiline_comment']),\n attributeTypes: new Set(),\n // `#!/usr/bin/env kotlin` parses as a shebang_line node; same law as the rest.\n pinnedTypes: new Set(['shebang_line']),\n // tree-sitter-kotlin extends import_list over a doc comment that directly\n // follows it — the KDoc of the first documented declaration after the imports.\n // Split it back out, or that declaration loses its doc to the import collapse.\n trailingCommentSplitTypes: new Set(['import_list']),\n wrapperTypes: {},\n kindLabels: {\n function_declaration: 'function',\n // tree-sitter-kotlin parses class, interface and enum headers all as\n // class_declaration — \"type declaration\" is the honest word for the union.\n class_declaration: 'type declaration',\n object_declaration: 'object',\n property_declaration: 'property',\n type_alias: 'type alias',\n package_header: 'package header',\n import_list: 'import list',\n shebang_line: 'shebang',\n },\n },\n // No def kinds: tree-sitter-kotlin's declarations carry no identifier `name`\n // field the extraction walk can read, so kotlin symbols are omitted, not guessed.\n repomap: {\n defKinds: {},\n refTypes: ['simple_identifier', 'type_identifier'],\n },\n};\n"]}
|
package/dist/lang/php.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"php.d.ts","sourceRoot":"","sources":["../../src/lang/php.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,eAAO,MAAM,GAAG,EAAE,eAmCjB,CAAC"}
|
|
1
|
+
{"version":3,"file":"php.d.ts","sourceRoot":"","sources":["../../src/lang/php.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,eAAO,MAAM,GAAG,EAAE,eAmCjB,CAAC","sourcesContent":["import type { LanguageProfile } from './profile.ts';\n\nexport const php: LanguageProfile = {\n id: 'php',\n extensions: ['php'],\n wasm: 'tree-sitter-php.wasm',\n markerLeader: '// ',\n structure: {\n // `//`, `#` and `/** … */` PHPDoc are all comment nodes.\n commentTypes: new Set(['comment']),\n attributeTypes: new Set(),\n // `<?php` is what makes the rest of the file php at all.\n pinnedTypes: new Set(['php_tag']),\n wrapperTypes: {},\n kindLabels: {\n function_definition: 'function',\n class_declaration: 'class',\n interface_declaration: 'interface',\n trait_declaration: 'trait',\n enum_declaration: 'enum',\n const_declaration: 'constant',\n namespace_definition: 'namespace',\n namespace_use_declaration: 'use declaration',\n expression_statement: 'statement',\n php_tag: 'php tag',\n // Raw markup between `?>` and `<?php` — calling it a declaration would be the\n // marker lying about the tree.\n text: 'html section',\n text_interpolation: 'html section',\n },\n },\n // No def kinds: php names its definitions with `name` nodes, not identifiers, and\n // an omitted kind means fewer symbols on the map, never wrong ones.\n repomap: {\n defKinds: {},\n refTypes: ['name', 'variable_name'],\n },\n};\n"]}
|
package/dist/lang/php.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"php.js","sourceRoot":"","sources":["../../src/lang/php.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,GAAG,GAAoB;IAClC,EAAE,EAAE,KAAK;IACT,UAAU,EAAE,CAAC,KA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jC,YAAY,EAAE,EAAE;QAChB,UAAU,EAAE;YACV,mBAAmB,EAAE,UAAU;YAC/B,iBAAiB,EAAE,OAAO;YAC1B,qBAAqB,EAAE,WAAW;YAClC,iBAAiB,EAAE,OAAO;YAC1B,gBAAgB,EAAE,MAAM;YACxB,iBAAiB,EAAE,UAAU;YAC7B,oBAAoB,EAAE,WAAW;YACjC,yBAAyB,EAAE,iBAAiB;YAC5C,oBAAoB,EAAE,WAAW;YACjC,OAAO,EAAE,SAAS;YAClB,8EAA8E;YAC9E,+BAA+B;YAC/B,IAAI,EAAE,cAAc;YACpB,kBAAkB,EAAE,cAAc;SACnC;KACF;IACD,kFAAkF;IAClF,oEAAoE;IACpE,OAAO,EAAE;QACP,QAAQ,EAAE,EAAE;QACZ,QAAQ,EAAE,CAAC,MAAM,EAAE,eAAe,CAAC;KACpC;CACF,CAAC","sourcesContent":["import type { LanguageProfile } from './profile.ts';\n\nexport const php: LanguageProfile = {\n id: 'php',\n extensions: ['php'],\n wasm: 'tree-sitter-php.wasm',\n markerLeader: '// ',\n structure: {\n // `//`, `#` and `/** … */` PHPDoc are all comment nodes.\n commentTypes: new Set(['comment']),\n attributeTypes: new Set(),\n // `<?php` is what makes the rest of the file php at all.\n pinnedTypes: new Set(['php_tag']),\n wrapperTypes: {},\n kindLabels: {\n function_definition: 'function',\n class_declaration: 'class',\n interface_declaration: 'interface',\n trait_declaration: 'trait',\n enum_declaration: 'enum',\n const_declaration: 'constant',\n namespace_definition: 'namespace',\n namespace_use_declaration: 'use declaration',\n expression_statement: 'statement',\n php_tag: 'php tag',\n // Raw markup between `?>` and `<?php` — calling it a declaration would be the\n // marker lying about the tree.\n text: 'html section',\n text_interpolation: 'html section',\n },\n },\n // No def kinds: php names its definitions with `name` nodes, not identifiers, and\n // an omitted kind means fewer symbols on the map, never wrong ones.\n repomap: {\n defKinds: {},\n refTypes: ['name', 'variable_name'],\n },\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"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E,MAAM,CAAC;IACvC;;;;;OAKG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC3C;;;;;OAKG;IACH,QAAQ,CAAC,oBAAoB,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACjE;;;;;;;OAOG;IACH,QAAQ,CAAC,kBAAkB,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAClD;;;;;;OAMG;IACH,QAAQ,CAAC,yBAAyB,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACzD;;;;OAIG;IACH,QAAQ,CAAC,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACxD;;;;;;OAMG;IACH,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CACvD;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,YAAY;IAC3B,uFAAuF;IACvF,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACpD,wCAAwC;IACxC,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;CACtC","sourcesContent":["import type { LanguageId } from '../types.ts';\n\n/**\n * Everything smelt knows about one language, in one place.\n *\n * Before this module existed, a language's facts lived in seven tables across five\n * modules — the extension map in `detect.ts`, the grammar file in `plan/grammar.ts`,\n * the marker leader in `apply.ts`, the structural node kinds and pins in\n * `plan/structural.ts`, and the repo-map tag tables in `repomap/tags.ts`. Adding a\n * language meant editing all five, and forgetting one produced a language that half\n * works: detected but unparsable, parsable but with a syntax-breaking marker.\n *\n * A `LanguageProfile` is the single adapter carrying every per-language fact, and the\n * registry (`registry.ts`) is `Record<LanguageId, LanguageProfile>` so totality stays\n * a compile error: a new `LanguageId` without a profile does not build. Consumers\n * *read* the registry — none of them owns a slice of it.\n *\n * The optional sections state capability, never invent it: a language is a\n * **structural language** exactly when its profile carries a {@link structure}\n * section, and it contributes repo-map symbols exactly when it carries a\n * {@link repomap} section. What a profile does not claim, smelt does not do.\n */\nexport interface LanguageProfile {\n readonly id: LanguageId;\n /** File extensions (lowercase, no dot) that detect as this language. */\n readonly extensions: readonly string[];\n /** The bundled grammar file, e.g. `'tree-sitter-python.wasm'`. */\n readonly wasm: string;\n /**\n * The line-comment leader the marker lands behind (`'// '`, `'# '`), so the\n * survivor still parses in this language's own syntax. A bare `<<smelt…>>` line was\n * measured to break the reparse non-locally in every grammar tested — see the doc\n * on `MARKER_LINE_COMMENT_LEADERS` in `src/apply.ts` for the failure classes.\n * Absent only for a language whose survivors have no syntax to break.\n */\n readonly markerLeader?: string;\n /**\n * What the structural planner needs to parse this language honestly. Present iff\n * the language is claimed by `structural/v1`; the derived `STRUCTURAL_LANGUAGES`\n * list is exactly the profiles that carry this section.\n */\n readonly structure?: LanguageStructure;\n /** What the repo map's tag extraction reads. See {@link RepoMapFacts}. */\n readonly repomap?: RepoMapFacts;\n}\n\n/**\n * What the structural planner needs to know about a language, beyond its grammar:\n * which node types are comments (so a doc comment travels with its declaration),\n * which node types merely wrap the declaration that should be named\n * (`export function f()` is a function, `@cached def f()` is a function), and the\n * human word for each top-level node kind.\n */\nexport interface LanguageStructure {\n /** Top-level node types that are comments, in this grammar's vocabulary. */\n readonly commentTypes: ReadonlySet<string>;\n /**\n * Top-level node types that are outer attributes — parsed as siblings of the item\n * they decorate, but attached forward to it unconditionally by the planner's\n * `unitsOf`, because that is what the attribute means in the language.\n */\n readonly attributeTypes: ReadonlySet<string>;\n /**\n * Comments matching this pattern are pinned to the file — never attached, never\n * collapsed. Go's `//go:build` governs which builds see the whole file, and the\n * spec's mandatory blank line after it means it could never attach; bash and ruby\n * shebang lines, and ruby's `# frozen_string_literal:` magic comment, govern how\n * the file executes at all.\n */\n readonly pinnedCommentPattern?: RegExp;\n /**\n * Non-comment node types pinned to the file the same way — php's `<?php` open tag,\n * a `#!` shebang line (javascript's `hash_bang_line`, kotlin and swift's\n * `shebang_line`). Each is its own uncollapsible unit: a run that swallowed one\n * would change what the survivor *is*, not just what it contains.\n */\n readonly pinnedTypes?: ReadonlySet<string>;\n /**\n * Per-node-type text patterns that pin a node the way {@link pinnedTypes} does —\n * for kinds where only *some* nodes govern the file. C and C++ parse every\n * `#pragma` as a `preproc_call`; only `#pragma once` changes what including the\n * survivor *means*, so only it is pinned.\n */\n readonly pinnedPatternsByType?: Readonly<Record<string, RegExp>>;\n /**\n * Node types that belong to the *preceding* statement despite being parsed as\n * top-level siblings — ruby's `heredoc_body`, which tree-sitter emits as a sibling\n * of the statement holding the heredoc opener. Such a node extends the previous\n * unit, so a collapse can never keep an opener while cutting its body (an\n * unterminated heredoc the reparse cannot even see — tree-sitter-ruby reports no\n * ERROR for a heredoc left open at EOF).\n */\n readonly ridesBackwardTypes?: ReadonlySet<string>;\n /**\n * Node types the grammar extends over trailing comments that belong to what\n * *follows* — kotlin's `import_list` swallows a KDoc that directly follows the\n * imports, which is the doc comment of the first declaration after them. The unit\n * for such a node ends at its last non-comment token; the trailing comments ride\n * forward and attach like any other comment block.\n */\n readonly trailingCommentSplitTypes?: ReadonlySet<string>;\n /**\n * Node types that wrap the declaration worth naming — the marker should say what is\n * inside, not name the wrapper. The value is the label to fall back to when nothing\n * nameable is found inside.\n */\n readonly wrapperTypes: Readonly<Record<string, string>>;\n /**\n * Human words per node type. What a language's map does not name, the planner\n * still labels honestly: an `ERROR` node is an `'unparsed region'`, any other\n * statement kind is a `'statement'`, and only what remains is called a\n * `'declaration'` — a marker that calls a parse error or a log line a declaration\n * would be lying about the tree.\n */\n readonly kindLabels: Readonly<Record<string, string>>;\n}\n\n/**\n * What the repo map's tag extraction (`repomap/tags.ts`) knows about a language.\n *\n * `defKinds` lists only node kinds whose `name` field is an *identifier* node,\n * because that is what the extraction walk reads — a kind whose name is spelled\n * differently (php's `name` nodes, ruby's `constant` class names, bash's `word`\n * function names, kotlin's field-less declarations) is *omitted*, not guessed at. An\n * omitted kind means fewer symbols on the map, never wrong ones.\n */\nexport interface RepoMapFacts {\n /** Declaration node type → human kind word. Absent from the map = not a definition. */\n readonly defKinds: Readonly<Record<string, string>>;\n /** Node types counted as references. */\n readonly refTypes: readonly string[];\n}\n"]}
|
package/dist/lang/profile.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile.js","sourceRoot":"","sources":["../../src/lang/profile.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"profile.js","sourceRoot":"","sources":["../../src/lang/profile.ts"],"names":[],"mappings":"","sourcesContent":["import type { LanguageId } from '../types.ts';\n\n/**\n * Everything smelt knows about one language, in one place.\n *\n * Before this module existed, a language's facts lived in seven tables across five\n * modules — the extension map in `detect.ts`, the grammar file in `plan/grammar.ts`,\n * the marker leader in `apply.ts`, the structural node kinds and pins in\n * `plan/structural.ts`, and the repo-map tag tables in `repomap/tags.ts`. Adding a\n * language meant editing all five, and forgetting one produced a language that half\n * works: detected but unparsable, parsable but with a syntax-breaking marker.\n *\n * A `LanguageProfile` is the single adapter carrying every per-language fact, and the\n * registry (`registry.ts`) is `Record<LanguageId, LanguageProfile>` so totality stays\n * a compile error: a new `LanguageId` without a profile does not build. Consumers\n * *read* the registry — none of them owns a slice of it.\n *\n * The optional sections state capability, never invent it: a language is a\n * **structural language** exactly when its profile carries a {@link structure}\n * section, and it contributes repo-map symbols exactly when it carries a\n * {@link repomap} section. What a profile does not claim, smelt does not do.\n */\nexport interface LanguageProfile {\n readonly id: LanguageId;\n /** File extensions (lowercase, no dot) that detect as this language. */\n readonly extensions: readonly string[];\n /** The bundled grammar file, e.g. `'tree-sitter-python.wasm'`. */\n readonly wasm: string;\n /**\n * The line-comment leader the marker lands behind (`'// '`, `'# '`), so the\n * survivor still parses in this language's own syntax. A bare `<<smelt…>>` line was\n * measured to break the reparse non-locally in every grammar tested — see the doc\n * on `MARKER_LINE_COMMENT_LEADERS` in `src/apply.ts` for the failure classes.\n * Absent only for a language whose survivors have no syntax to break.\n */\n readonly markerLeader?: string;\n /**\n * What the structural planner needs to parse this language honestly. Present iff\n * the language is claimed by `structural/v1`; the derived `STRUCTURAL_LANGUAGES`\n * list is exactly the profiles that carry this section.\n */\n readonly structure?: LanguageStructure;\n /** What the repo map's tag extraction reads. See {@link RepoMapFacts}. */\n readonly repomap?: RepoMapFacts;\n}\n\n/**\n * What the structural planner needs to know about a language, beyond its grammar:\n * which node types are comments (so a doc comment travels with its declaration),\n * which node types merely wrap the declaration that should be named\n * (`export function f()` is a function, `@cached def f()` is a function), and the\n * human word for each top-level node kind.\n */\nexport interface LanguageStructure {\n /** Top-level node types that are comments, in this grammar's vocabulary. */\n readonly commentTypes: ReadonlySet<string>;\n /**\n * Top-level node types that are outer attributes — parsed as siblings of the item\n * they decorate, but attached forward to it unconditionally by the planner's\n * `unitsOf`, because that is what the attribute means in the language.\n */\n readonly attributeTypes: ReadonlySet<string>;\n /**\n * Comments matching this pattern are pinned to the file — never attached, never\n * collapsed. Go's `//go:build` governs which builds see the whole file, and the\n * spec's mandatory blank line after it means it could never attach; bash and ruby\n * shebang lines, and ruby's `# frozen_string_literal:` magic comment, govern how\n * the file executes at all.\n */\n readonly pinnedCommentPattern?: RegExp;\n /**\n * Non-comment node types pinned to the file the same way — php's `<?php` open tag,\n * a `#!` shebang line (javascript's `hash_bang_line`, kotlin and swift's\n * `shebang_line`). Each is its own uncollapsible unit: a run that swallowed one\n * would change what the survivor *is*, not just what it contains.\n */\n readonly pinnedTypes?: ReadonlySet<string>;\n /**\n * Per-node-type text patterns that pin a node the way {@link pinnedTypes} does —\n * for kinds where only *some* nodes govern the file. C and C++ parse every\n * `#pragma` as a `preproc_call`; only `#pragma once` changes what including the\n * survivor *means*, so only it is pinned.\n */\n readonly pinnedPatternsByType?: Readonly<Record<string, RegExp>>;\n /**\n * Node types that belong to the *preceding* statement despite being parsed as\n * top-level siblings — ruby's `heredoc_body`, which tree-sitter emits as a sibling\n * of the statement holding the heredoc opener. Such a node extends the previous\n * unit, so a collapse can never keep an opener while cutting its body (an\n * unterminated heredoc the reparse cannot even see — tree-sitter-ruby reports no\n * ERROR for a heredoc left open at EOF).\n */\n readonly ridesBackwardTypes?: ReadonlySet<string>;\n /**\n * Node types the grammar extends over trailing comments that belong to what\n * *follows* — kotlin's `import_list` swallows a KDoc that directly follows the\n * imports, which is the doc comment of the first declaration after them. The unit\n * for such a node ends at its last non-comment token; the trailing comments ride\n * forward and attach like any other comment block.\n */\n readonly trailingCommentSplitTypes?: ReadonlySet<string>;\n /**\n * Node types that wrap the declaration worth naming — the marker should say what is\n * inside, not name the wrapper. The value is the label to fall back to when nothing\n * nameable is found inside.\n */\n readonly wrapperTypes: Readonly<Record<string, string>>;\n /**\n * Human words per node type. What a language's map does not name, the planner\n * still labels honestly: an `ERROR` node is an `'unparsed region'`, any other\n * statement kind is a `'statement'`, and only what remains is called a\n * `'declaration'` — a marker that calls a parse error or a log line a declaration\n * would be lying about the tree.\n */\n readonly kindLabels: Readonly<Record<string, string>>;\n}\n\n/**\n * What the repo map's tag extraction (`repomap/tags.ts`) knows about a language.\n *\n * `defKinds` lists only node kinds whose `name` field is an *identifier* node,\n * because that is what the extraction walk reads — a kind whose name is spelled\n * differently (php's `name` nodes, ruby's `constant` class names, bash's `word`\n * function names, kotlin's field-less declarations) is *omitted*, not guessed at. An\n * omitted kind means fewer symbols on the map, never wrong ones.\n */\nexport interface RepoMapFacts {\n /** Declaration node type → human kind word. Absent from the map = not a definition. */\n readonly defKinds: Readonly<Record<string, string>>;\n /** Node types counted as references. */\n readonly refTypes: readonly string[];\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"python.d.ts","sourceRoot":"","sources":["../../src/lang/python.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,eAAO,MAAM,MAAM,EAAE,eA+BpB,CAAC"}
|
|
1
|
+
{"version":3,"file":"python.d.ts","sourceRoot":"","sources":["../../src/lang/python.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,eAAO,MAAM,MAAM,EAAE,eA+BpB,CAAC","sourcesContent":["import type { LanguageProfile } from './profile.ts';\n\nexport const python: LanguageProfile = {\n id: 'python',\n extensions: ['py', 'pyi'],\n wasm: 'tree-sitter-python.wasm',\n markerLeader: '# ',\n structure: {\n // Docstrings are not comments — they live inside the definition's body, so a kept\n // definition keeps its docstring because units are kept whole. `#` comments above\n // a definition attach the same way `/** … */` does in TypeScript.\n commentTypes: new Set(['comment']),\n attributeTypes: new Set(),\n // `#!/usr/bin/env python3` parses as a plain comment node, but it decides which\n // interpreter runs the file — pinned the way the bash and ruby shebangs are.\n pinnedCommentPattern: /^#!/,\n wrapperTypes: { decorated_definition: 'declaration' },\n kindLabels: {\n function_definition: 'function',\n class_definition: 'class',\n import_statement: 'import statement',\n import_from_statement: 'import statement',\n future_import_statement: 'import statement',\n expression_statement: 'statement',\n },\n },\n repomap: {\n defKinds: {\n function_definition: 'function',\n class_definition: 'class',\n },\n refTypes: ['identifier'],\n },\n};\n"]}
|
package/dist/lang/python.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"python.js","sourceRoot":"","sources":["../../src/lang/python.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,MAAM,GAAoB;IACrC,EAAE,EAAE,QAAQ;IACZ,UAAU,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC;IACzB,IAAI,EAAE,yBAAyB;IAC/B,YAAY,EAAE,IAAI;IAClB,SAAS,EAAE;QACT,kFAAkF;QAClF,kFAAkF;QAClF,kEAAkE;QAClE,YAAY,EAAE,IAAI,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC;QAClC,cAAc,EAAE,IAA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,gBAAgB,EAAE,OAAO;SAC1B;QACD,QAAQ,EAAE,CAAC,YAAY,CAAC;KACzB;CACF,CAAC","sourcesContent":["import type { LanguageProfile } from './profile.ts';\n\nexport const python: LanguageProfile = {\n id: 'python',\n extensions: ['py', 'pyi'],\n wasm: 'tree-sitter-python.wasm',\n markerLeader: '# ',\n structure: {\n // Docstrings are not comments — they live inside the definition's body, so a kept\n // definition keeps its docstring because units are kept whole. `#` comments above\n // a definition attach the same way `/** … */` does in TypeScript.\n commentTypes: new Set(['comment']),\n attributeTypes: new Set(),\n // `#!/usr/bin/env python3` parses as a plain comment node, but it decides which\n // interpreter runs the file — pinned the way the bash and ruby shebangs are.\n pinnedCommentPattern: /^#!/,\n wrapperTypes: { decorated_definition: 'declaration' },\n kindLabels: {\n function_definition: 'function',\n class_definition: 'class',\n import_statement: 'import statement',\n import_from_statement: 'import statement',\n future_import_statement: 'import statement',\n expression_statement: 'statement',\n },\n },\n repomap: {\n defKinds: {\n function_definition: 'function',\n class_definition: 'class',\n },\n refTypes: ['identifier'],\n },\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/lang/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAiBpD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,MAAM,CAAC,UAAU,EAAE,eAAe,CAAC,CAgB3E,CAAC;AAEF,oFAAoF;AACpF,wBAAgB,UAAU,CAAC,EAAE,EAAE,UAAU,GAAG,eAAe,CAE1D;AAoBD;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,eAAe,GAAG,SAAS,CAMpF;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,SAAS,UAAU,EAAE,CAI3D"}
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/lang/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAiBpD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,MAAM,CAAC,UAAU,EAAE,eAAe,CAAC,CAgB3E,CAAC;AAEF,oFAAoF;AACpF,wBAAgB,UAAU,CAAC,EAAE,EAAE,UAAU,GAAG,eAAe,CAE1D;AAoBD;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,eAAe,GAAG,SAAS,CAMpF;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,SAAS,UAAU,EAAE,CAI3D","sourcesContent":["import type { LanguageId } from '../types.ts';\n\nimport type { LanguageProfile } from './profile.ts';\nimport { bash } from './bash.ts';\nimport { c } from './c.ts';\nimport { c_sharp } from './c_sharp.ts';\nimport { cpp } from './cpp.ts';\nimport { go } from './go.ts';\nimport { java } from './java.ts';\nimport { javascript } from './javascript.ts';\nimport { kotlin } from './kotlin.ts';\nimport { php } from './php.ts';\nimport { python } from './python.ts';\nimport { ruby } from './ruby.ts';\nimport { rust } from './rust.ts';\nimport { swift } from './swift.ts';\nimport { tsx } from './tsx.ts';\nimport { typescript } from './typescript.ts';\n\n/**\n * The registry — every language smelt knows, one {@link LanguageProfile} each.\n *\n * `Record<LanguageId, LanguageProfile>` on purpose: adding a `LanguageId` in\n * `types.ts` without writing its profile is a compile error, so the id list and the\n * facts cannot drift. Every derived view — `SUPPORTED_LANGUAGES`,\n * `WASM_BY_LANGUAGE`, `STRUCTURAL_LANGUAGES`, the extension map, the marker leaders,\n * the repo-map tag tables — is computed from this object, never written twice.\n *\n * Key order is meaningful: it is the order every rendered language list uses (the\n * `--language`/`--strategy` help, the init wizard, error messages), so keep it stable\n * and append new languages at the end.\n */\nexport const LANGUAGE_PROFILES: Readonly<Record<LanguageId, LanguageProfile>> = {\n typescript,\n tsx,\n javascript,\n rust,\n python,\n go,\n java,\n c,\n cpp,\n c_sharp,\n ruby,\n php,\n kotlin,\n swift,\n bash,\n};\n\n/** The profile for a language id. Total by construction — see the registry type. */\nexport function profileFor(id: LanguageId): LanguageProfile {\n return LANGUAGE_PROFILES[id];\n}\n\n/** Extension → profile, derived once. A duplicate claim would be a registry bug. */\nconst BY_EXTENSION: ReadonlyMap<string, LanguageProfile> = (() => {\n const index = new Map<string, LanguageProfile>();\n for (const profile of Object.values(LANGUAGE_PROFILES)) {\n for (const extension of profile.extensions) {\n const holder = index.get(extension);\n if (holder !== undefined) {\n throw new Error(\n `smelt: extension \".${extension}\" is claimed by both \"${holder.id}\" and ` +\n `\"${profile.id}\" — a path would detect as whichever loaded last.`,\n );\n }\n index.set(extension, profile);\n }\n }\n return index;\n})();\n\n/**\n * The profile a path's extension selects, or `undefined` for anything unmapped.\n * Deliberately not a content sniffer: guessing from bytes gets things wrong silently,\n * and `undefined` costs nothing here — `detectLanguage` turns it into `'unknown'`,\n * which selects the lexical planner, and that works on anything.\n */\nexport function profileForPath(path: string | undefined): LanguageProfile | undefined {\n if (path === undefined) return undefined;\n const base = path.replace(/\\\\/g, '/').split('/').pop() ?? '';\n const dot = base.lastIndexOf('.');\n if (dot <= 0) return undefined;\n return BY_EXTENSION.get(base.slice(dot + 1).toLowerCase());\n}\n\n/**\n * The languages the structural planner claims: exactly the profiles that carry a\n * `structure` section. In registry order, so every rendered list agrees.\n */\nexport function structuralLanguages(): readonly LanguageId[] {\n return Object.values(LANGUAGE_PROFILES)\n .filter((profile) => profile.structure !== undefined)\n .map((profile) => profile.id);\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/lang/registry.ts"],"names":[],"mappings":"AAGA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K,SAAS,CAAC;SACpD,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;AAClC,CAAC","sourcesContent":["import type { LanguageId } from '../types.ts';\n\nimport type { LanguageProfile } from './profile.ts';\nimport { bash } from './bash.ts';\nimport { c } from './c.ts';\nimport { c_sharp } from './c_sharp.ts';\nimport { cpp } from './cpp.ts';\nimport { go } from './go.ts';\nimport { java } from './java.ts';\nimport { javascript } from './javascript.ts';\nimport { kotlin } from './kotlin.ts';\nimport { php } from './php.ts';\nimport { python } from './python.ts';\nimport { ruby } from './ruby.ts';\nimport { rust } from './rust.ts';\nimport { swift } from './swift.ts';\nimport { tsx } from './tsx.ts';\nimport { typescript } from './typescript.ts';\n\n/**\n * The registry — every language smelt knows, one {@link LanguageProfile} each.\n *\n * `Record<LanguageId, LanguageProfile>` on purpose: adding a `LanguageId` in\n * `types.ts` without writing its profile is a compile error, so the id list and the\n * facts cannot drift. Every derived view — `SUPPORTED_LANGUAGES`,\n * `WASM_BY_LANGUAGE`, `STRUCTURAL_LANGUAGES`, the extension map, the marker leaders,\n * the repo-map tag tables — is computed from this object, never written twice.\n *\n * Key order is meaningful: it is the order every rendered language list uses (the\n * `--language`/`--strategy` help, the init wizard, error messages), so keep it stable\n * and append new languages at the end.\n */\nexport const LANGUAGE_PROFILES: Readonly<Record<LanguageId, LanguageProfile>> = {\n typescript,\n tsx,\n javascript,\n rust,\n python,\n go,\n java,\n c,\n cpp,\n c_sharp,\n ruby,\n php,\n kotlin,\n swift,\n bash,\n};\n\n/** The profile for a language id. Total by construction — see the registry type. */\nexport function profileFor(id: LanguageId): LanguageProfile {\n return LANGUAGE_PROFILES[id];\n}\n\n/** Extension → profile, derived once. A duplicate claim would be a registry bug. */\nconst BY_EXTENSION: ReadonlyMap<string, LanguageProfile> = (() => {\n const index = new Map<string, LanguageProfile>();\n for (const profile of Object.values(LANGUAGE_PROFILES)) {\n for (const extension of profile.extensions) {\n const holder = index.get(extension);\n if (holder !== undefined) {\n throw new Error(\n `smelt: extension \".${extension}\" is claimed by both \"${holder.id}\" and ` +\n `\"${profile.id}\" — a path would detect as whichever loaded last.`,\n );\n }\n index.set(extension, profile);\n }\n }\n return index;\n})();\n\n/**\n * The profile a path's extension selects, or `undefined` for anything unmapped.\n * Deliberately not a content sniffer: guessing from bytes gets things wrong silently,\n * and `undefined` costs nothing here — `detectLanguage` turns it into `'unknown'`,\n * which selects the lexical planner, and that works on anything.\n */\nexport function profileForPath(path: string | undefined): LanguageProfile | undefined {\n if (path === undefined) return undefined;\n const base = path.replace(/\\\\/g, '/').split('/').pop() ?? '';\n const dot = base.lastIndexOf('.');\n if (dot <= 0) return undefined;\n return BY_EXTENSION.get(base.slice(dot + 1).toLowerCase());\n}\n\n/**\n * The languages the structural planner claims: exactly the profiles that carry a\n * `structure` section. In registry order, so every rendered list agrees.\n */\nexport function structuralLanguages(): readonly LanguageId[] {\n return Object.values(LANGUAGE_PROFILES)\n .filter((profile) => profile.structure !== undefined)\n .map((profile) => profile.id);\n}\n"]}
|
package/dist/lang/ruby.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ruby.d.ts","sourceRoot":"","sources":["../../src/lang/ruby.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,eAAO,MAAM,IAAI,EAAE,eA6ClB,CAAC"}
|
|
1
|
+
{"version":3,"file":"ruby.d.ts","sourceRoot":"","sources":["../../src/lang/ruby.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,eAAO,MAAM,IAAI,EAAE,eA6ClB,CAAC","sourcesContent":["import type { LanguageProfile } from './profile.ts';\n\nexport const ruby: LanguageProfile = {\n id: 'ruby',\n extensions: ['rb'],\n wasm: 'tree-sitter-ruby.wasm',\n markerLeader: '# ',\n structure: {\n commentTypes: new Set(['comment']),\n attributeTypes: new Set(),\n // The shebang and the `# frozen_string_literal:` magic comment both govern how\n // the whole file executes; neither may collapse into a run.\n pinnedCommentPattern: /^#(?:!|\\s*frozen_string_literal:)/,\n // A heredoc's body is a top-level sibling of the statement holding its opener —\n // it extends that statement's unit, or a collapse could keep the opener and cut\n // the body, leaving an unterminated heredoc that swallows every declaration\n // after it (and tree-sitter-ruby reports no ERROR for it at EOF).\n ridesBackwardTypes: new Set(['heredoc_body']),\n wrapperTypes: {},\n kindLabels: {\n method: 'method',\n singleton_method: 'method',\n class: 'class',\n module: 'module',\n // Top-level `require \"json\"` and `CONSTANT = 1` are expression nodes in\n // tree-sitter-ruby; \"statement\" is the honest generic word for both — and for\n // top-level control-flow blocks, which are expressions here too.\n call: 'statement',\n assignment: 'statement',\n if: 'statement',\n unless: 'statement',\n case: 'statement',\n while: 'statement',\n until: 'statement',\n for: 'statement',\n begin: 'statement',\n heredoc_body: 'heredoc body',\n comment: 'comment',\n },\n },\n repomap: {\n defKinds: {\n method: 'method',\n singleton_method: 'method',\n },\n refTypes: ['identifier', 'constant'],\n },\n};\n"]}
|
package/dist/lang/ruby.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ruby.js","sourceRoot":"","sources":["../../src/lang/ruby.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,IAAI,GAAoB;IACnC,EAAE,EAAE,MAAM;IACV,UAAU,EAAE,CAAC,IAAI,CAAC;IAClB,IAAI,EAAE,uBAAuB;IAC7B,YAAY,EAAE,IAAI;IAClB,SAAS,EAAE;QACT,YAAY,EAAE,IAAI,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC;QAClC,cAAc,EAAE,IAAI,GAAG,EAAE;QACzB,+EAA+E;QAC/E,4DAA4D;QAC5D,oBAAoB,EAAE,mCAAmC;QACzD,gFAAgF;QAChF,gFAAgF;QAChF,4EAA4E;QAC5E,kEAAkE;QAClE,kBAAkB,EAAE,IAAI,GAAG,CAAC,CAAC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;YAChB,gBAAgB,EAAE,QAAQ;YAC1B,KAAK,EAAE,OAAO;YACd,MAAM,EAAE,QAAQ;YAChB,wEAAwE;YACxE,8EAA8E;YAC9E,iEAAiE;YACjE,IAAI,EAAE,WAAW;YACjB,UAAU,EAAE,WAAW;YACvB,EAAE,EAAE,WAAW;YACf,MAAM,EAAE,WAAW;YACnB,IAAI,EAAE,WAAW;YACjB,KAAK,EAAE,WAAW;YAClB,KAAK,EAAE,WAAW;YAClB,GAAG,EAAE,WAAW;YAChB,KAAK,EAAE,WAAW;YAClB,YAAY,EAAE,cAAc;YAC5B,OAAO,EAAE,SAAS;SACnB;KACF;IACD,OAAO,EAAE;QACP,QAAQ,EAAE;YACR,MAAM,EAAE,QAAQ;YAChB,gBAAgB,EAAE,QAAQ;SAC3B;QACD,QAAQ,EAAE,CAAC,YAAY,EAAE,UAAU,CAAC;KACrC;CACF,CAAC","sourcesContent":["import type { LanguageProfile } from './profile.ts';\n\nexport const ruby: LanguageProfile = {\n id: 'ruby',\n extensions: ['rb'],\n wasm: 'tree-sitter-ruby.wasm',\n markerLeader: '# ',\n structure: {\n commentTypes: new Set(['comment']),\n attributeTypes: new Set(),\n // The shebang and the `# frozen_string_literal:` magic comment both govern how\n // the whole file executes; neither may collapse into a run.\n pinnedCommentPattern: /^#(?:!|\\s*frozen_string_literal:)/,\n // A heredoc's body is a top-level sibling of the statement holding its opener —\n // it extends that statement's unit, or a collapse could keep the opener and cut\n // the body, leaving an unterminated heredoc that swallows every declaration\n // after it (and tree-sitter-ruby reports no ERROR for it at EOF).\n ridesBackwardTypes: new Set(['heredoc_body']),\n wrapperTypes: {},\n kindLabels: {\n method: 'method',\n singleton_method: 'method',\n class: 'class',\n module: 'module',\n // Top-level `require \"json\"` and `CONSTANT = 1` are expression nodes in\n // tree-sitter-ruby; \"statement\" is the honest generic word for both — and for\n // top-level control-flow blocks, which are expressions here too.\n call: 'statement',\n assignment: 'statement',\n if: 'statement',\n unless: 'statement',\n case: 'statement',\n while: 'statement',\n until: 'statement',\n for: 'statement',\n begin: 'statement',\n heredoc_body: 'heredoc body',\n comment: 'comment',\n },\n },\n repomap: {\n defKinds: {\n method: 'method',\n singleton_method: 'method',\n },\n refTypes: ['identifier', 'constant'],\n },\n};\n"]}
|
package/dist/lang/rust.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rust.d.ts","sourceRoot":"","sources":["../../src/lang/rust.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,eAAO,MAAM,IAAI,EAAE,eA2ClB,CAAC"}
|
|
1
|
+
{"version":3,"file":"rust.d.ts","sourceRoot":"","sources":["../../src/lang/rust.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,eAAO,MAAM,IAAI,EAAE,eA2ClB,CAAC","sourcesContent":["import type { LanguageProfile } from './profile.ts';\n\nexport const rust: LanguageProfile = {\n id: 'rust',\n extensions: ['rs'],\n wasm: 'tree-sitter-rust.wasm',\n markerLeader: '// ',\n structure: {\n // `///` and `//!` doc comments are line_comment nodes; `/** … */` is block_comment.\n commentTypes: new Set(['line_comment', 'block_comment']),\n // `#[…]` is a top-level sibling in tree-sitter-rust; it rides forward to its item.\n attributeTypes: new Set(['attribute_item']),\n wrapperTypes: {},\n kindLabels: {\n function_item: 'function',\n struct_item: 'struct',\n enum_item: 'enum',\n union_item: 'union',\n trait_item: 'trait',\n impl_item: 'impl block',\n mod_item: 'module',\n macro_definition: 'macro',\n type_item: 'type alias',\n const_item: 'constant',\n static_item: 'static item',\n use_declaration: 'use declaration',\n extern_crate_declaration: 'extern crate declaration',\n attribute_item: 'attribute',\n foreign_mod_item: 'extern block',\n },\n },\n repomap: {\n defKinds: {\n function_item: 'function',\n struct_item: 'struct',\n enum_item: 'enum',\n trait_item: 'trait',\n mod_item: 'module',\n const_item: 'constant',\n static_item: 'static',\n type_item: 'type alias',\n union_item: 'union',\n },\n refTypes: ['identifier', 'type_identifier'],\n },\n};\n"]}
|
package/dist/lang/rust.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rust.js","sourceRoot":"","sources":["../../src/lang/rust.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,IAAI,GAAoB;IACnC,EAAE,EAAE,MAAM;IACV,UAAU,EAAE,CAAC,IAAI,CAAC;IAClB,IAAI,EAAE,uBAAuB;IAC7B,YAAY,EAAE,KAAK;IACnB,SAAS,EAAE;QACT,oFAAoF;QACpF,YAAY,EAAE,IAAI,GAAG,CAAC,CAAC,cAAc,EAAE,eAAe,CAAC,CAAC;QACxD,mFAAmF;QACnF,cAAc,EAAE,IAAI,GAAG,CAAC,CAAC,gBAAgB,CAAC,CAAC;QAC3C,YAAY,EAAE,EAAE;QAChB,UAAU,EAAE;YACV,aAAa,EAAE,UAAU;YACzB,WAAW,EAAE,QAAQ;YACrB,SAAS,EAAE,MAAM;YACjB,UAAU,EAAE,OAAO;YACnB,UAAU,EAAE,OAAO;YACnB,SAAS,EAAE,YAAY;YACvB,QAAQ,EAAE,QAAQ;YAClB,gBAAgB,EAAE,OAAO;YACzB,SAAS,EAAE,YAAY;YACvB,UAAU,EAAE,UAAU;YACtB,WAAW,EAAE,aAAa;YAC1B,eAAe,EAAE,iBAAiB;YAClC,wBAAwB,EAAE,0BAA0B;YACpD,cAAc,EAAE,WAAW;YAC3B,gBAAgB,EAAE,cAAc;SACjC;KACF;IACD,OAAO,EAAE;QACP,QAAQ,EAAE;YACR,aAAa,EAAE,UAAU;YACzB,WAAW,EAAE,QAAQ;YACrB,SAAS,EAAE,MAAM;YACjB,UAAU,EAAE,OAAO;YACnB,QAAQ,EAAE,QAAQ;YAClB,UAAU,EAAE,UAAU;YACtB,WAAW,EAAE,QAAQ;YACrB,SAAS,EAAE,YAAY;YACvB,UAAU,EAAE,OAAO;SACpB;QACD,QAAQ,EAAE,CAAC,YAAY,EAAE,iBAAiB,CAAC;KAC5C;CACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"rust.js","sourceRoot":"","sources":["../../src/lang/rust.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,IAAI,GAAoB;IACnC,EAAE,EAAE,MAAM;IACV,UAAU,EAAE,CAAC,IAAI,CAAC;IAClB,IAAI,EAAE,uBAAuB;IAC7B,YAAY,EAAE,KAAK;IACnB,SAAS,EAAE;QACT,oFAAoF;QACpF,YAAY,EAAE,IAAI,GAAG,CAAC,CAAC,cAAc,EAAE,eAAe,CAAC,CAAC;QACxD,mFAAmF;QACnF,cAAc,EAAE,IAAI,GAAG,CAAC,CAAC,gBAAgB,CAAC,CAAC;QAC3C,YAAY,EAAE,EAAE;QAChB,UAAU,EAAE;YACV,aAAa,EAAE,UAAU;YACzB,WAAW,EAAE,QAAQ;YACrB,SAAS,EAAE,MAAM;YACjB,UAAU,EAAE,OAAO;YACnB,UAAU,EAAE,OAAO;YACnB,SAAS,EAAE,YAAY;YACvB,QAAQ,EAAE,QAAQ;YAClB,gBAAgB,EAAE,OAAO;YACzB,SAAS,EAAE,YAAY;YACvB,UAAU,EAAE,UAAU;YACtB,WAAW,EAAE,aAAa;YAC1B,eAAe,EAAE,iBAAiB;YAClC,wBAAwB,EAAE,0BAA0B;YACpD,cAAc,EAAE,WAAW;YAC3B,gBAAgB,EAAE,cAAc;SACjC;KACF;IACD,OAAO,EAAE;QACP,QAAQ,EAAE;YACR,aAAa,EAAE,UAAU;YACzB,WAAW,EAAE,QAAQ;YACrB,SAAS,EAAE,MAAM;YACjB,UAAU,EAAE,OAAO;YACnB,QAAQ,EAAE,QAAQ;YAClB,UAAU,EAAE,UAAU;YACtB,WAAW,EAAE,QAAQ;YACrB,SAAS,EAAE,YAAY;YACvB,UAAU,EAAE,OAAO;SACpB;QACD,QAAQ,EAAE,CAAC,YAAY,EAAE,iBAAiB,CAAC;KAC5C;CACF,CAAC","sourcesContent":["import type { LanguageProfile } from './profile.ts';\n\nexport const rust: LanguageProfile = {\n id: 'rust',\n extensions: ['rs'],\n wasm: 'tree-sitter-rust.wasm',\n markerLeader: '// ',\n structure: {\n // `///` and `//!` doc comments are line_comment nodes; `/** … */` is block_comment.\n commentTypes: new Set(['line_comment', 'block_comment']),\n // `#[…]` is a top-level sibling in tree-sitter-rust; it rides forward to its item.\n attributeTypes: new Set(['attribute_item']),\n wrapperTypes: {},\n kindLabels: {\n function_item: 'function',\n struct_item: 'struct',\n enum_item: 'enum',\n union_item: 'union',\n trait_item: 'trait',\n impl_item: 'impl block',\n mod_item: 'module',\n macro_definition: 'macro',\n type_item: 'type alias',\n const_item: 'constant',\n static_item: 'static item',\n use_declaration: 'use declaration',\n extern_crate_declaration: 'extern crate declaration',\n attribute_item: 'attribute',\n foreign_mod_item: 'extern block',\n },\n },\n repomap: {\n defKinds: {\n function_item: 'function',\n struct_item: 'struct',\n enum_item: 'enum',\n trait_item: 'trait',\n mod_item: 'module',\n const_item: 'constant',\n static_item: 'static',\n type_item: 'type alias',\n union_item: 'union',\n },\n refTypes: ['identifier', 'type_identifier'],\n },\n};\n"]}
|
package/dist/lang/swift.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"swift.d.ts","sourceRoot":"","sources":["../../src/lang/swift.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,eAAO,MAAM,KAAK,EAAE,eAgCnB,CAAC"}
|
|
1
|
+
{"version":3,"file":"swift.d.ts","sourceRoot":"","sources":["../../src/lang/swift.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,eAAO,MAAM,KAAK,EAAE,eAgCnB,CAAC","sourcesContent":["import type { LanguageProfile } from './profile.ts';\n\nexport const swift: LanguageProfile = {\n id: 'swift',\n extensions: ['swift'],\n wasm: 'tree-sitter-swift.wasm',\n markerLeader: '// ',\n structure: {\n // `//` and `///` are comment nodes; `/* … */` is multiline_comment.\n commentTypes: new Set(['comment', 'multiline_comment']),\n attributeTypes: new Set(),\n // `#!/usr/bin/env swift` parses as a shebang_line node; same law as the rest.\n pinnedTypes: new Set(['shebang_line']),\n wrapperTypes: {},\n kindLabels: {\n function_declaration: 'function',\n // tree-sitter-swift parses struct, class, enum and extension declarations all\n // as class_declaration — \"type declaration\" is the honest word for the union.\n class_declaration: 'type declaration',\n protocol_declaration: 'protocol',\n property_declaration: 'property',\n typealias_declaration: 'type alias',\n import_declaration: 'import declaration',\n shebang_line: 'shebang',\n },\n },\n repomap: {\n defKinds: {\n class_declaration: 'type',\n protocol_declaration: 'protocol',\n function_declaration: 'function',\n },\n refTypes: ['simple_identifier', 'type_identifier'],\n },\n};\n"]}
|
package/dist/lang/swift.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"swift.js","sourceRoot":"","sources":["../../src/lang/swift.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,KAAK,GAAoB;IACpC,EAAE,EAAE,OAAO;IACX,UAAU,EAAE,CAAC,OAAO,CAAC;IACrB,IAAI,EAAE,wBAAwB;IAC9B,YAAY,EAAE,KAAK;IACnB,SAAS,EAAE;QACT,oEAAoE;QACpE,YAAY,EAAE,IAAI,GAAG,CAAC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC;QACvD,cAAc,EAAE,IAAI,GAAG,EAAE;QACzB,8EAA8E;QAC9E,WAAW,EAAE,IAAI,GAAG,CAAC,CAAC,cAAc,CAAC,CAAC;QACtC,YAAY,EAAE,EAAE;QAChB,UAAU,EAAE;YACV,oBAAoB,EAAE,UAAU;YAChC,8EAA8E;YAC9E,8EAA8E;YAC9E,iBAAiB,EAAE,kBAAkB;YACrC,oBAAoB,EAAE,UAAU;YAChC,oBAAoB,EAAE,UAAU;YAChC,qBAAqB,EAAE,YAAY;YACnC,kBAAkB,EAAE,oBAAoB;YACxC,YAAY,EAAE,SAAS;SACxB;KACF;IACD,OAAO,EAAE;QACP,QAAQ,EAAE;YACR,iBAAiB,EAAE,MAAM;YACzB,oBAAoB,EAAE,UAAU;YAChC,oBAAoB,EAAE,UAAU;SACjC;QACD,QAAQ,EAAE,CAAC,mBAAmB,EAAE,iBAAiB,CAAC;KACnD;CACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"swift.js","sourceRoot":"","sources":["../../src/lang/swift.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,KAAK,GAAoB;IACpC,EAAE,EAAE,OAAO;IACX,UAAU,EAAE,CAAC,OAAO,CAAC;IACrB,IAAI,EAAE,wBAAwB;IAC9B,YAAY,EAAE,KAAK;IACnB,SAAS,EAAE;QACT,oEAAoE;QACpE,YAAY,EAAE,IAAI,GAAG,CAAC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC;QACvD,cAAc,EAAE,IAAI,GAAG,EAAE;QACzB,8EAA8E;QAC9E,WAAW,EAAE,IAAI,GAAG,CAAC,CAAC,cAAc,CAAC,CAAC;QACtC,YAAY,EAAE,EAAE;QAChB,UAAU,EAAE;YACV,oBAAoB,EAAE,UAAU;YAChC,8EAA8E;YAC9E,8EAA8E;YAC9E,iBAAiB,EAAE,kBAAkB;YACrC,oBAAoB,EAAE,UAAU;YAChC,oBAAoB,EAAE,UAAU;YAChC,qBAAqB,EAAE,YAAY;YACnC,kBAAkB,EAAE,oBAAoB;YACxC,YAAY,EAAE,SAAS;SACxB;KACF;IACD,OAAO,EAAE;QACP,QAAQ,EAAE;YACR,iBAAiB,EAAE,MAAM;YACzB,oBAAoB,EAAE,UAAU;YAChC,oBAAoB,EAAE,UAAU;SACjC;QACD,QAAQ,EAAE,CAAC,mBAAmB,EAAE,iBAAiB,CAAC;KACnD;CACF,CAAC","sourcesContent":["import type { LanguageProfile } from './profile.ts';\n\nexport const swift: LanguageProfile = {\n id: 'swift',\n extensions: ['swift'],\n wasm: 'tree-sitter-swift.wasm',\n markerLeader: '// ',\n structure: {\n // `//` and `///` are comment nodes; `/* … */` is multiline_comment.\n commentTypes: new Set(['comment', 'multiline_comment']),\n attributeTypes: new Set(),\n // `#!/usr/bin/env swift` parses as a shebang_line node; same law as the rest.\n pinnedTypes: new Set(['shebang_line']),\n wrapperTypes: {},\n kindLabels: {\n function_declaration: 'function',\n // tree-sitter-swift parses struct, class, enum and extension declarations all\n // as class_declaration — \"type declaration\" is the honest word for the union.\n class_declaration: 'type declaration',\n protocol_declaration: 'protocol',\n property_declaration: 'property',\n typealias_declaration: 'type alias',\n import_declaration: 'import declaration',\n shebang_line: 'shebang',\n },\n },\n repomap: {\n defKinds: {\n class_declaration: 'type',\n protocol_declaration: 'protocol',\n function_declaration: 'function',\n },\n refTypes: ['simple_identifier', 'type_identifier'],\n },\n};\n"]}
|
package/dist/lang/tsx.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tsx.d.ts","sourceRoot":"","sources":["../../src/lang/tsx.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAGpD,qFAAqF;AACrF,eAAO,MAAM,GAAG,EAAE,eAOjB,CAAC"}
|
|
1
|
+
{"version":3,"file":"tsx.d.ts","sourceRoot":"","sources":["../../src/lang/tsx.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAGpD,qFAAqF;AACrF,eAAO,MAAM,GAAG,EAAE,eAOjB,CAAC","sourcesContent":["import type { LanguageProfile } from './profile.ts';\nimport { TS_DEF_KINDS, TS_REF_TYPES, TS_STRUCTURE } from './typescript.ts';\n\n/** TSX is the typescript grammar family's second id — same structure, same facts. */\nexport const tsx: LanguageProfile = {\n id: 'tsx',\n extensions: ['tsx'],\n wasm: 'tree-sitter-tsx.wasm',\n markerLeader: '// ',\n structure: TS_STRUCTURE,\n repomap: { defKinds: TS_DEF_KINDS, refTypes: TS_REF_TYPES },\n};\n"]}
|
package/dist/lang/tsx.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tsx.js","sourceRoot":"","sources":["../../src/lang/tsx.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE3E,qFAAqF;AACrF,MAAM,CAAC,MAAM,GAAG,GAAoB;IAClC,EAAE,EAAE,KAAK;IACT,UAAU,EAAE,CAAC,KAAK,CAAC;IACnB,IAAI,EAAE,sBAAsB;IAC5B,YAAY,EAAE,KAAK;IACnB,SAAS,EAAE,YAAY;IACvB,OAAO,EAAE,EAAE,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,YAAY,EAAE;CAC5D,CAAC"}
|
|
1
|
+
{"version":3,"file":"tsx.js","sourceRoot":"","sources":["../../src/lang/tsx.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE3E,qFAAqF;AACrF,MAAM,CAAC,MAAM,GAAG,GAAoB;IAClC,EAAE,EAAE,KAAK;IACT,UAAU,EAAE,CAAC,KAAK,CAAC;IACnB,IAAI,EAAE,sBAAsB;IAC5B,YAAY,EAAE,KAAK;IACnB,SAAS,EAAE,YAAY;IACvB,OAAO,EAAE,EAAE,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,YAAY,EAAE;CAC5D,CAAC","sourcesContent":["import type { LanguageProfile } from './profile.ts';\nimport { TS_DEF_KINDS, TS_REF_TYPES, TS_STRUCTURE } from './typescript.ts';\n\n/** TSX is the typescript grammar family's second id — same structure, same facts. */\nexport const tsx: LanguageProfile = {\n id: 'tsx',\n extensions: ['tsx'],\n wasm: 'tree-sitter-tsx.wasm',\n markerLeader: '// ',\n structure: TS_STRUCTURE,\n repomap: { defKinds: TS_DEF_KINDS, refTypes: TS_REF_TYPES },\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typescript.d.ts","sourceRoot":"","sources":["../../src/lang/typescript.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEvE;;;;GAIG;AACH,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAkB3D,CAAC;AAEF,mFAAmF;AACnF,eAAO,MAAM,YAAY,EAAE,iBAQ1B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAWzD,CAAC;AAEF,uEAAuE;AACvE,eAAO,MAAM,YAAY,EAAE,SAAS,MAAM,EAAsC,CAAC;AAEjF,eAAO,MAAM,UAAU,EAAE,eAOxB,CAAC"}
|
|
1
|
+
{"version":3,"file":"typescript.d.ts","sourceRoot":"","sources":["../../src/lang/typescript.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEvE;;;;GAIG;AACH,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAkB3D,CAAC;AAEF,mFAAmF;AACnF,eAAO,MAAM,YAAY,EAAE,iBAQ1B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAWzD,CAAC;AAEF,uEAAuE;AACvE,eAAO,MAAM,YAAY,EAAE,SAAS,MAAM,EAAsC,CAAC;AAEjF,eAAO,MAAM,UAAU,EAAE,eAOxB,CAAC","sourcesContent":["import type { LanguageProfile, LanguageStructure } from './profile.ts';\n\n/**\n * Human words for the tree-sitter node types the structural planner expects at the\n * top level of a TypeScript or TSX file. What the map does not name, the planner\n * still labels honestly — see {@link LanguageStructure.kindLabels}.\n */\nexport const TS_KIND_LABELS: Readonly<Record<string, string>> = {\n function_declaration: 'function',\n generator_function_declaration: 'function',\n function_signature: 'function',\n class_declaration: 'class',\n abstract_class_declaration: 'class',\n interface_declaration: 'interface',\n type_alias_declaration: 'type alias',\n enum_declaration: 'enum',\n lexical_declaration: 'variable',\n variable_declaration: 'variable',\n import_statement: 'import statement',\n internal_module: 'namespace',\n module: 'namespace',\n ambient_declaration: 'ambient declaration',\n expression_statement: 'statement',\n hash_bang_line: 'shebang',\n comment: 'comment',\n};\n\n/** One grammar family, two ids: the tsx profile shares this structure verbatim. */\nexport const TS_STRUCTURE: LanguageStructure = {\n commentTypes: new Set(['comment']),\n attributeTypes: new Set(),\n // `#!/usr/bin/env -S npx tsx` parses as a hash_bang_line here too — same node, same\n // law as javascript's: collapsing it changes which interpreter runs the file.\n pinnedTypes: new Set(['hash_bang_line']),\n wrapperTypes: { export_statement: 'export' },\n kindLabels: TS_KIND_LABELS,\n};\n\n/**\n * Repo-map definition kinds for the typescript grammar family — shared by the\n * typescript, tsx and javascript profiles, exactly as the extraction treats them.\n */\nexport const TS_DEF_KINDS: Readonly<Record<string, string>> = {\n function_declaration: 'function',\n generator_function_declaration: 'function',\n function_signature: 'function',\n class_declaration: 'class',\n abstract_class_declaration: 'class',\n interface_declaration: 'interface',\n type_alias_declaration: 'type alias',\n enum_declaration: 'enum',\n method_definition: 'method',\n variable_declarator: 'variable',\n};\n\n/** Repo-map reference node types for the typescript grammar family. */\nexport const TS_REF_TYPES: readonly string[] = ['identifier', 'type_identifier'];\n\nexport const typescript: LanguageProfile = {\n id: 'typescript',\n extensions: ['ts', 'mts', 'cts'],\n wasm: 'tree-sitter-typescript.wasm',\n markerLeader: '// ',\n structure: TS_STRUCTURE,\n repomap: { defKinds: TS_DEF_KINDS, refTypes: TS_REF_TYPES },\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typescript.js","sourceRoot":"","sources":["../../src/lang/typescript.ts"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;IAC5C,UAAU,EAAE,cAAc;CAC3B,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAqC;IAC5D,oBAAoB,EAAE,UAAU;IAChC,8BAA8B,EAAE,UAAU;IAC1C,kBAAkB,EAAE,UAAU;IAC9B,iBAAiB,EAAE,OAAO;IAC1B,0BAA0B,EAAE,OAAO;IACnC,qBAAqB,EAAE,WAAW;IAClC,sBAAsB,EAAE,YAAY;IACpC,gBAAgB,EAAE,MAAM;IACxB,iBAAiB,EAAE,QAAQ;IAC3B,mBAAmB,EAAE,UAAU;CAChC,CAAC;AAEF,uEAAuE;AACvE,MAAM,CAAC,MAAM,YAAY,GAAsB,CAAC,YAAY,EAAE,iBAAiB,CAAC,CAAC;AAEjF,MAAM,CAAC,MAAM,UAAU,GAAoB;IACzC,EAAE,EAAE,YAAY;IAChB,UAAU,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC;IAChC,IAAI,EAAE,6BAA6B;IACnC,YAAY,EAAE,KAAK;IACnB,SAAS,EAAE,YAAY;IACvB,OAAO,EAAE,EAAE,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,YAAY,EAAE;CAC5D,CAAC","sourcesContent":["import type { LanguageProfile, LanguageStructure } from './profile.ts';\n\n/**\n * Human words for the tree-sitter node types the structural planner expects at the\n * top level of a TypeScript or TSX file. What the map does not name, the planner\n * still labels honestly — see {@link LanguageStructure.kindLabels}.\n */\nexport const TS_KIND_LABELS: Readonly<Record<string, string>> = {\n function_declaration: 'function',\n generator_function_declaration: 'function',\n function_signature: 'function',\n class_declaration: 'class',\n abstract_class_declaration: 'class',\n interface_declaration: 'interface',\n type_alias_declaration: 'type alias',\n enum_declaration: 'enum',\n lexical_declaration: 'variable',\n variable_declaration: 'variable',\n import_statement: 'import statement',\n internal_module: 'namespace',\n module: 'namespace',\n ambient_declaration: 'ambient declaration',\n expression_statement: 'statement',\n hash_bang_line: 'shebang',\n comment: 'comment',\n};\n\n/** One grammar family, two ids: the tsx profile shares this structure verbatim. */\nexport const TS_STRUCTURE: LanguageStructure = {\n commentTypes: new Set(['comment']),\n attributeTypes: new Set(),\n // `#!/usr/bin/env -S npx tsx` parses as a hash_bang_line here too — same node, same\n // law as javascript's: collapsing it changes which interpreter runs the file.\n pinnedTypes: new Set(['hash_bang_line']),\n wrapperTypes: { export_statement: 'export' },\n kindLabels: TS_KIND_LABELS,\n};\n\n/**\n * Repo-map definition kinds for the typescript grammar family — shared by the\n * typescript, tsx and javascript profiles, exactly as the extraction treats them.\n */\nexport const TS_DEF_KINDS: Readonly<Record<string, string>> = {\n function_declaration: 'function',\n generator_function_declaration: 'function',\n function_signature: 'function',\n class_declaration: 'class',\n abstract_class_declaration: 'class',\n interface_declaration: 'interface',\n type_alias_declaration: 'type alias',\n enum_declaration: 'enum',\n method_definition: 'method',\n variable_declarator: 'variable',\n};\n\n/** Repo-map reference node types for the typescript grammar family. */\nexport const TS_REF_TYPES: readonly string[] = ['identifier', 'type_identifier'];\n\nexport const typescript: LanguageProfile = {\n id: 'typescript',\n extensions: ['ts', 'mts', 'cts'],\n wasm: 'tree-sitter-typescript.wasm',\n markerLeader: '// ',\n structure: TS_STRUCTURE,\n repomap: { defKinds: TS_DEF_KINDS, refTypes: TS_REF_TYPES },\n};\n"]}
|
package/dist/net/policy.d.ts
CHANGED
|
@@ -40,10 +40,27 @@ export declare const ALLOWED_PACKAGES: readonly string[];
|
|
|
40
40
|
* Every resource smelt hands to a loader goes through {@link assertLocalResource} first.
|
|
41
41
|
*/
|
|
42
42
|
export declare const ALLOWED_URL_SCHEMES: readonly string[];
|
|
43
|
+
/**
|
|
44
|
+
* The parsed resource {@link assertLocalResource} takes and hands back.
|
|
45
|
+
*
|
|
46
|
+
* A WHATWG `URL` satisfies it, and one is what comes back at runtime — but `URL` is
|
|
47
|
+
* *stated* structurally here, for the reason `AnswerStream` is not
|
|
48
|
+
* `NodeJS.ReadableStream` and `RepoReader.read` returns `Uint8Array`: `URL` is a
|
|
49
|
+
* global that only a compilation which pulled in `@types/node` (or the DOM lib) has,
|
|
50
|
+
* so naming it in an exported signature put two errors into the shipped `.d.ts` for
|
|
51
|
+
* every consumer building with `skipLibCheck: false` and no such types of their own.
|
|
52
|
+
* These are the two members the policy reads and the two its callers use.
|
|
53
|
+
*/
|
|
54
|
+
export interface LocalResource {
|
|
55
|
+
/** The scheme, with its colon — `'file:'`. */
|
|
56
|
+
readonly protocol: string;
|
|
57
|
+
/** The whole URL, as a string. `fileURLToPath` takes it directly. */
|
|
58
|
+
readonly href: string;
|
|
59
|
+
}
|
|
43
60
|
/**
|
|
44
61
|
* Reject anything that is not a local file, and return the resolved `file:` URL.
|
|
45
62
|
*
|
|
46
63
|
* @throws {NetworkPolicyError} if the input names a remote scheme.
|
|
47
64
|
*/
|
|
48
|
-
export declare function assertLocalResource(input: string |
|
|
65
|
+
export declare function assertLocalResource(input: string | LocalResource): LocalResource;
|
|
49
66
|
//# sourceMappingURL=policy.d.ts.map
|
package/dist/net/policy.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"policy.d.ts","sourceRoot":"","sources":["../../src/net/policy.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,sBAAsB,EAAE,SAAS,MAAM,EAenD,CAAC;AAEF,uFAAuF;AACvF,eAAO,MAAM,kBAAkB,EAAE,SAAS,MAAM,EAU/C,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAAS,MAAM,EAQ9C,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,EAAE,SAAS,MAAM,
|
|
1
|
+
{"version":3,"file":"policy.d.ts","sourceRoot":"","sources":["../../src/net/policy.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,sBAAsB,EAAE,SAAS,MAAM,EAenD,CAAC;AAEF,uFAAuF;AACvF,eAAO,MAAM,kBAAkB,EAAE,SAAS,MAAM,EAU/C,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAAS,MAAM,EAQ9C,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,EAAE,SAAS,MAAM,EAYlD,CAAC;AAEF,yFAAyF;AACzF,eAAO,MAAM,gBAAgB,EAAE,SAAS,MAAM,EAG7C,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,EAAE,SAAS,MAAM,EAAc,CAAC;AAEhE;;;;;;;;;;GAUG;AACH,MAAM,WAAW,aAAa;IAC5B,8CAA8C;IAC9C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,qEAAqE;IACrE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa,GAAG,aAAa,CAShF","sourcesContent":["import { NetworkPolicyError } from '../errors.ts';\n\n/**\n * Law 1 — zero network in v1 — written down once, in one place, so that the guard\n * test and the runtime check cannot drift apart. `test/guards/no-network.test.ts`\n * imports these lists and fails if any module reachable from the public entrypoint\n * imports one of them.\n *\n * This is a *partition of a discovered set*, not an allowlist over an assumed one:\n * the guard walks the real import graph and classifies every edge it finds. A new\n * transport nobody thought of still gets classified — as an unknown bare import,\n * which the guard reports rather than ignores.\n */\nexport const FORBIDDEN_NODE_MODULES: readonly string[] = [\n 'http',\n 'https',\n 'http2',\n 'net',\n 'tls',\n 'dgram',\n 'dns',\n 'node:http',\n 'node:https',\n 'node:http2',\n 'node:net',\n 'node:tls',\n 'node:dgram',\n 'node:dns',\n];\n\n/** Third-party transports. A dependency that pulls one in is a Law 1 violation too. */\nexport const FORBIDDEN_PACKAGES: readonly string[] = [\n 'undici',\n 'axios',\n 'node-fetch',\n 'got',\n 'ky',\n 'superagent',\n 'ws',\n 'socket.io-client',\n 'eventsource',\n];\n\n/**\n * Globals that reach the network without an import. Grepped for by the guard — both\n * bare (`fetch(…)`) and qualified through a global object (`globalThis.fetch(…)`),\n * which is why `globalThis` and `global` are themselves on the list: an access\n * routed through the global object is the escape hatch around a bare-name grep.\n */\nexport const FORBIDDEN_GLOBALS: readonly string[] = [\n 'fetch',\n 'XMLHttpRequest',\n 'WebSocket',\n 'EventSource',\n 'navigator',\n 'globalThis',\n 'global',\n];\n\n/**\n * The other half of the partition.\n *\n * A forbidden-list alone is an allowlist over an assumed set: it can only catch\n * transports somebody already thought of. So the guard classifies *every* import edge\n * it discovers, and an edge that matches neither the forbidden lists nor these\n * permitted ones **fails the build**. Adding a dependency therefore requires adding it\n * here, in a diff, next to the reason — which is the point.\n */\nexport const ALLOWED_NODE_BUILTINS: readonly string[] = [\n 'node:crypto', // content hashing for the elision store\n 'node:fs', // reading grammar .wasm files off disk\n 'node:fs/promises',\n 'node:path',\n 'node:url',\n 'node:buffer',\n 'node:module', // web-tree-sitter's own loader shim needs createRequire\n 'node:util', // parseArgs, for the CLI. Argument parsing with zero dependencies.\n 'node:process', // argv, stdin/stdout/stderr and the exit code, for the CLI\n 'node:os', // homedir(), for `smelt hooks install` harness detection — reads a path, opens nothing\n 'node:tty', // isatty(0) for the CLI's TTY check — a plain syscall, no stream, no socket\n];\n\n/** Third-party packages any smelt module may import. Keep this list boring and short. */\nexport const ALLOWED_PACKAGES: readonly string[] = [\n 'web-tree-sitter', // WASM parsers. No native build step, no download at runtime.\n 'tree-sitter-wasms', // prebuilt grammar .wasm blobs, resolved to local file paths\n];\n\n/**\n * The only URL schemes any smelt code path may resolve.\n *\n * This is not paranoia about our own code. `web-tree-sitter`'s `Language.load()`\n * accepts a `string | URL`, and an `https:` URL there would fetch a grammar over the\n * wire — a real network call inside the elision path, from a dependency's happy path.\n * Every resource smelt hands to a loader goes through {@link assertLocalResource} first.\n */\nexport const ALLOWED_URL_SCHEMES: readonly string[] = ['file:'];\n\n/**\n * The parsed resource {@link assertLocalResource} takes and hands back.\n *\n * A WHATWG `URL` satisfies it, and one is what comes back at runtime — but `URL` is\n * *stated* structurally here, for the reason `AnswerStream` is not\n * `NodeJS.ReadableStream` and `RepoReader.read` returns `Uint8Array`: `URL` is a\n * global that only a compilation which pulled in `@types/node` (or the DOM lib) has,\n * so naming it in an exported signature put two errors into the shipped `.d.ts` for\n * every consumer building with `skipLibCheck: false` and no such types of their own.\n * These are the two members the policy reads and the two its callers use.\n */\nexport interface LocalResource {\n /** The scheme, with its colon — `'file:'`. */\n readonly protocol: string;\n /** The whole URL, as a string. `fileURLToPath` takes it directly. */\n readonly href: string;\n}\n\n/**\n * Reject anything that is not a local file, and return the resolved `file:` URL.\n *\n * @throws {NetworkPolicyError} if the input names a remote scheme.\n */\nexport function assertLocalResource(input: string | LocalResource): LocalResource {\n const url = toUrl(input);\n if (!ALLOWED_URL_SCHEMES.includes(url.protocol)) {\n throw new NetworkPolicyError(\n `refusing to load \"${resourceLabel(input)}\": scheme \"${url.protocol}\" is not local. ` +\n `v1 makes zero network calls; only ${ALLOWED_URL_SCHEMES.join(', ')} is allowed.`,\n );\n }\n return url;\n}\n\nconst resourceLabel = (input: string | LocalResource): string =>\n typeof input === 'string' ? input : input.href;\n\nfunction toUrl(input: string | LocalResource): URL {\n // Structural in, structural out: anything carrying an `href` is re-parsed from it,\n // which covers a real `URL` and a `URL` from another realm identically.\n if (typeof input !== 'string') return new URL(input.href);\n // A bare path is a local path. Anything with a scheme is parsed as-is so that\n // \"https://evil/grammar.wasm\" is caught rather than treated as a relative path.\n if (/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(input)) {\n try {\n return new URL(input);\n } catch {\n throw new NetworkPolicyError(`refusing to load \"${input}\": not a parseable URL or path.`);\n }\n }\n return new URL(`file://${input.startsWith('/') ? '' : '/'}${input}`);\n}\n"]}
|
package/dist/net/policy.js
CHANGED
|
@@ -73,7 +73,6 @@ export const ALLOWED_NODE_BUILTINS = [
|
|
|
73
73
|
'node:util', // parseArgs, for the CLI. Argument parsing with zero dependencies.
|
|
74
74
|
'node:process', // argv, stdin/stdout/stderr and the exit code, for the CLI
|
|
75
75
|
'node:os', // homedir(), for `smelt hooks install` harness detection — reads a path, opens nothing
|
|
76
|
-
'node:readline/promises', // line-by-line answers for `smelt init` — reads streams it is handed, opens nothing
|
|
77
76
|
'node:tty', // isatty(0) for the CLI's TTY check — a plain syscall, no stream, no socket
|
|
78
77
|
];
|
|
79
78
|
/** Third-party packages any smelt module may import. Keep this list boring and short. */
|
|
@@ -98,14 +97,17 @@ export const ALLOWED_URL_SCHEMES = ['file:'];
|
|
|
98
97
|
export function assertLocalResource(input) {
|
|
99
98
|
const url = toUrl(input);
|
|
100
99
|
if (!ALLOWED_URL_SCHEMES.includes(url.protocol)) {
|
|
101
|
-
throw new NetworkPolicyError(`refusing to load "${
|
|
100
|
+
throw new NetworkPolicyError(`refusing to load "${resourceLabel(input)}": scheme "${url.protocol}" is not local. ` +
|
|
102
101
|
`v1 makes zero network calls; only ${ALLOWED_URL_SCHEMES.join(', ')} is allowed.`);
|
|
103
102
|
}
|
|
104
103
|
return url;
|
|
105
104
|
}
|
|
105
|
+
const resourceLabel = (input) => typeof input === 'string' ? input : input.href;
|
|
106
106
|
function toUrl(input) {
|
|
107
|
-
|
|
108
|
-
|
|
107
|
+
// Structural in, structural out: anything carrying an `href` is re-parsed from it,
|
|
108
|
+
// which covers a real `URL` and a `URL` from another realm identically.
|
|
109
|
+
if (typeof input !== 'string')
|
|
110
|
+
return new URL(input.href);
|
|
109
111
|
// A bare path is a local path. Anything with a scheme is parsed as-is so that
|
|
110
112
|
// "https://evil/grammar.wasm" is caught rather than treated as a relative path.
|
|
111
113
|
if (/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(input)) {
|
package/dist/net/policy.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"policy.js","sourceRoot":"","sources":["../../src/net/policy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAElD;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAsB;IACvD,MAAM;IACN,OAAO;IACP,OAAO;IACP,KAAK;IACL,KAAK;IACL,OAAO;IACP,KAAK;IACL,WAAW;IACX,YAAY;IACZ,YAAY;IACZ,UAAU;IACV,UAAU;IACV,YAAY;IACZ,UAAU;CACX,CAAC;AAEF,uFAAuF;AACvF,MAAM,CAAC,MAAM,kBAAkB,GAAsB;IACnD,QAAQ;IACR,OAAO;IACP,YAAY;IACZ,KAAK;IACL,IAAI;IACJ,YAAY;IACZ,IAAI;IACJ,kBAAkB;IAClB,aAAa;CACd,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAsB;IAClD,OAAO;IACP,gBAAgB;IAChB,WAAW;IACX,aAAa;IACb,WAAW;IACX,YAAY;IACZ,QAAQ;CACT,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAsB;IACtD,aAAa,EAAE,wCAAwC;IACvD,SAAS,EAAE,uCAAuC;IAClD,kBAAkB;IAClB,WAAW;IACX,UAAU;IACV,aAAa;IACb,aAAa,EAAE,wDAAwD;IACvE,WAAW,EAAE,mEAAmE;IAChF,cAAc,EAAE,2DAA2D;IAC3E,SAAS,EAAE,uFAAuF;IAClG,
|
|
1
|
+
{"version":3,"file":"policy.js","sourceRoot":"","sources":["../../src/net/policy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAElD;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAsB;IACvD,MAAM;IACN,OAAO;IACP,OAAO;IACP,KAAK;IACL,KAAK;IACL,OAAO;IACP,KAAK;IACL,WAAW;IACX,YAAY;IACZ,YAAY;IACZ,UAAU;IACV,UAAU;IACV,YAAY;IACZ,UAAU;CACX,CAAC;AAEF,uFAAuF;AACvF,MAAM,CAAC,MAAM,kBAAkB,GA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AAU,EAAE,CAC9D,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC;AAEjD,SAAS,KAAK,CAAC,KAA6B;IAC1C,mFAAmF;IACnF,wEAAwE;IACxE,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,IAAI,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC1D,8EAA8E;IAC9E,gFAAgF;IAChF,IAAI,2BAA2B,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QAC5C,IAAI,CAAC;YACH,OAAO,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC;QACxB,CAAC;QAAC,MAAM,CAAC;YACP,MAAM,IAAI,kBAAkB,CAAC,qBAAqB,KAAK,iCAAiC,CAAC,CAAC;QAC5F,CAAC;IACH,CAAC;IACD,OAAO,IAAI,GAAG,CAAC,UAAU,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,GAAG,KAAK,EAAE,CAAC,CAAC;AACvE,CAAC","sourcesContent":["import { NetworkPolicyError } from '../errors.ts';\n\n/**\n * Law 1 — zero network in v1 — written down once, in one place, so that the guard\n * test and the runtime check cannot drift apart. `test/guards/no-network.test.ts`\n * imports these lists and fails if any module reachable from the public entrypoint\n * imports one of them.\n *\n * This is a *partition of a discovered set*, not an allowlist over an assumed one:\n * the guard walks the real import graph and classifies every edge it finds. A new\n * transport nobody thought of still gets classified — as an unknown bare import,\n * which the guard reports rather than ignores.\n */\nexport const FORBIDDEN_NODE_MODULES: readonly string[] = [\n 'http',\n 'https',\n 'http2',\n 'net',\n 'tls',\n 'dgram',\n 'dns',\n 'node:http',\n 'node:https',\n 'node:http2',\n 'node:net',\n 'node:tls',\n 'node:dgram',\n 'node:dns',\n];\n\n/** Third-party transports. A dependency that pulls one in is a Law 1 violation too. */\nexport const FORBIDDEN_PACKAGES: readonly string[] = [\n 'undici',\n 'axios',\n 'node-fetch',\n 'got',\n 'ky',\n 'superagent',\n 'ws',\n 'socket.io-client',\n 'eventsource',\n];\n\n/**\n * Globals that reach the network without an import. Grepped for by the guard — both\n * bare (`fetch(…)`) and qualified through a global object (`globalThis.fetch(…)`),\n * which is why `globalThis` and `global` are themselves on the list: an access\n * routed through the global object is the escape hatch around a bare-name grep.\n */\nexport const FORBIDDEN_GLOBALS: readonly string[] = [\n 'fetch',\n 'XMLHttpRequest',\n 'WebSocket',\n 'EventSource',\n 'navigator',\n 'globalThis',\n 'global',\n];\n\n/**\n * The other half of the partition.\n *\n * A forbidden-list alone is an allowlist over an assumed set: it can only catch\n * transports somebody already thought of. So the guard classifies *every* import edge\n * it discovers, and an edge that matches neither the forbidden lists nor these\n * permitted ones **fails the build**. Adding a dependency therefore requires adding it\n * here, in a diff, next to the reason — which is the point.\n */\nexport const ALLOWED_NODE_BUILTINS: readonly string[] = [\n 'node:crypto', // content hashing for the elision store\n 'node:fs', // reading grammar .wasm files off disk\n 'node:fs/promises',\n 'node:path',\n 'node:url',\n 'node:buffer',\n 'node:module', // web-tree-sitter's own loader shim needs createRequire\n 'node:util', // parseArgs, for the CLI. Argument parsing with zero dependencies.\n 'node:process', // argv, stdin/stdout/stderr and the exit code, for the CLI\n 'node:os', // homedir(), for `smelt hooks install` harness detection — reads a path, opens nothing\n 'node:tty', // isatty(0) for the CLI's TTY check — a plain syscall, no stream, no socket\n];\n\n/** Third-party packages any smelt module may import. Keep this list boring and short. */\nexport const ALLOWED_PACKAGES: readonly string[] = [\n 'web-tree-sitter', // WASM parsers. No native build step, no download at runtime.\n 'tree-sitter-wasms', // prebuilt grammar .wasm blobs, resolved to local file paths\n];\n\n/**\n * The only URL schemes any smelt code path may resolve.\n *\n * This is not paranoia about our own code. `web-tree-sitter`'s `Language.load()`\n * accepts a `string | URL`, and an `https:` URL there would fetch a grammar over the\n * wire — a real network call inside the elision path, from a dependency's happy path.\n * Every resource smelt hands to a loader goes through {@link assertLocalResource} first.\n */\nexport const ALLOWED_URL_SCHEMES: readonly string[] = ['file:'];\n\n/**\n * The parsed resource {@link assertLocalResource} takes and hands back.\n *\n * A WHATWG `URL` satisfies it, and one is what comes back at runtime — but `URL` is\n * *stated* structurally here, for the reason `AnswerStream` is not\n * `NodeJS.ReadableStream` and `RepoReader.read` returns `Uint8Array`: `URL` is a\n * global that only a compilation which pulled in `@types/node` (or the DOM lib) has,\n * so naming it in an exported signature put two errors into the shipped `.d.ts` for\n * every consumer building with `skipLibCheck: false` and no such types of their own.\n * These are the two members the policy reads and the two its callers use.\n */\nexport interface LocalResource {\n /** The scheme, with its colon — `'file:'`. */\n readonly protocol: string;\n /** The whole URL, as a string. `fileURLToPath` takes it directly. */\n readonly href: string;\n}\n\n/**\n * Reject anything that is not a local file, and return the resolved `file:` URL.\n *\n * @throws {NetworkPolicyError} if the input names a remote scheme.\n */\nexport function assertLocalResource(input: string | LocalResource): LocalResource {\n const url = toUrl(input);\n if (!ALLOWED_URL_SCHEMES.includes(url.protocol)) {\n throw new NetworkPolicyError(\n `refusing to load \"${resourceLabel(input)}\": scheme \"${url.protocol}\" is not local. ` +\n `v1 makes zero network calls; only ${ALLOWED_URL_SCHEMES.join(', ')} is allowed.`,\n );\n }\n return url;\n}\n\nconst resourceLabel = (input: string | LocalResource): string =>\n typeof input === 'string' ? input : input.href;\n\nfunction toUrl(input: string | LocalResource): URL {\n // Structural in, structural out: anything carrying an `href` is re-parsed from it,\n // which covers a real `URL` and a `URL` from another realm identically.\n if (typeof input !== 'string') return new URL(input.href);\n // A bare path is a local path. Anything with a scheme is parsed as-is so that\n // \"https://evil/grammar.wasm\" is caught rather than treated as a relative path.\n if (/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(input)) {\n try {\n return new URL(input);\n } catch {\n throw new NetworkPolicyError(`refusing to load \"${input}\": not a parseable URL or path.`);\n }\n }\n return new URL(`file://${input.startsWith('/') ? '' : '/'}${input}`);\n}\n"]}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The operations seam: what `smelt` *does*, under every door that asks it to.
|
|
3
|
+
*
|
|
4
|
+
* smelt has two front doors — the `smelt` binary in this package and the
|
|
5
|
+
* `@smeltjs/mcp` server next to it — and they are not two products. They are two
|
|
6
|
+
* conventions for saying the same four things: cut this blob, map this tree, give
|
|
7
|
+
* those bytes back, read the counters. The difference between them is entirely at the
|
|
8
|
+
* edges: one reads argv and writes to two streams and returns an exit code, the other
|
|
9
|
+
* validates a JSON Schema and returns a `CallToolResult`.
|
|
10
|
+
*
|
|
11
|
+
* The middle was duplicated anyway. Both packages had their own copy of *the budget is
|
|
12
|
+
* a positive integer with no default*, *an explicit strategy beats a configured one
|
|
13
|
+
* and `lexical` fills last*, *a tree reader refuses a file*, *read a path or fail
|
|
14
|
+
* naming it*, and *a config decides a store*. Five laws, ten implementations — and the
|
|
15
|
+
* mechanical cause is visible in one line of history: `resolveStoreRun` was never
|
|
16
|
+
* exported, so the package that needed the store law could not import it and wrote its
|
|
17
|
+
* own. A restatement leaked across a package boundary because the seam it needed sat
|
|
18
|
+
* on the wrong side of a barrel.
|
|
19
|
+
*
|
|
20
|
+
* So this module is the seam, below both doors:
|
|
21
|
+
*
|
|
22
|
+
* - **`ops/verbs.ts`** — {@link smeltBlob}, {@link mapTree}, {@link retrieveBytes},
|
|
23
|
+
* {@link readCounters}. The verbs over already-resolved inputs, returning data.
|
|
24
|
+
* - **`ops/inputs.ts`** — the laws an input must satisfy to *be* resolved, each
|
|
25
|
+
* stating its rule once and taking the caller's naming as an argument.
|
|
26
|
+
*
|
|
27
|
+
* A front door is now an adapter: **parse and resolve, call an op, render.** The CLI
|
|
28
|
+
* subcommand bodies do that with flags, a config file and an exit code; the MCP tools
|
|
29
|
+
* do it with a JSON Schema and a result envelope. What each may still keep is what is
|
|
30
|
+
* genuinely its own — its error type, its exit code, its wording, and any policy it
|
|
31
|
+
* deliberately does not share. (`smelt retrieve` refuses a memory store; the MCP
|
|
32
|
+
* server accepts one and says so when it bites. That divergence is intentional, it is
|
|
33
|
+
* documented on both sides, and it lives in the adapters — never here.)
|
|
34
|
+
*/
|
|
35
|
+
export { budgetFault, budgetMalformed, budgetRequired, openStore, readBlob, readTree, resolveStrategy, } from './inputs.ts';
|
|
36
|
+
export type { BudgetFault, BudgetNaming, ResolvedStrategy, Ruling, StrategySource, TreeNaming, } from './inputs.ts';
|
|
37
|
+
export { mapTree, readCounters, retrieveBytes, smeltBlob } from './verbs.ts';
|
|
38
|
+
export type { MapTreeOp, ReadCountersOp, RetrieveBytesOp, SmeltBlobOp, SmeltBlobOutcome, } from './verbs.ts';
|
|
39
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ops/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,EACL,WAAW,EACX,eAAe,EACf,cAAc,EACd,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,eAAe,GAChB,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,WAAW,EACX,YAAY,EACZ,gBAAgB,EAChB,MAAM,EACN,cAAc,EACd,UAAU,GACX,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC7E,YAAY,EACV,SAAS,EACT,cAAc,EACd,eAAe,EACf,WAAW,EACX,gBAAgB,GACjB,MAAM,YAAY,CAAC","sourcesContent":["/**\n * The operations seam: what `smelt` *does*, under every door that asks it to.\n *\n * smelt has two front doors — the `smelt` binary in this package and the\n * `@smeltjs/mcp` server next to it — and they are not two products. They are two\n * conventions for saying the same four things: cut this blob, map this tree, give\n * those bytes back, read the counters. The difference between them is entirely at the\n * edges: one reads argv and writes to two streams and returns an exit code, the other\n * validates a JSON Schema and returns a `CallToolResult`.\n *\n * The middle was duplicated anyway. Both packages had their own copy of *the budget is\n * a positive integer with no default*, *an explicit strategy beats a configured one\n * and `lexical` fills last*, *a tree reader refuses a file*, *read a path or fail\n * naming it*, and *a config decides a store*. Five laws, ten implementations — and the\n * mechanical cause is visible in one line of history: `resolveStoreRun` was never\n * exported, so the package that needed the store law could not import it and wrote its\n * own. A restatement leaked across a package boundary because the seam it needed sat\n * on the wrong side of a barrel.\n *\n * So this module is the seam, below both doors:\n *\n * - **`ops/verbs.ts`** — {@link smeltBlob}, {@link mapTree}, {@link retrieveBytes},\n * {@link readCounters}. The verbs over already-resolved inputs, returning data.\n * - **`ops/inputs.ts`** — the laws an input must satisfy to *be* resolved, each\n * stating its rule once and taking the caller's naming as an argument.\n *\n * A front door is now an adapter: **parse and resolve, call an op, render.** The CLI\n * subcommand bodies do that with flags, a config file and an exit code; the MCP tools\n * do it with a JSON Schema and a result envelope. What each may still keep is what is\n * genuinely its own — its error type, its exit code, its wording, and any policy it\n * deliberately does not share. (`smelt retrieve` refuses a memory store; the MCP\n * server accepts one and says so when it bites. That divergence is intentional, it is\n * documented on both sides, and it lives in the adapters — never here.)\n */\n\nexport {\n budgetFault,\n budgetMalformed,\n budgetRequired,\n openStore,\n readBlob,\n readTree,\n resolveStrategy,\n} from './inputs.ts';\nexport type {\n BudgetFault,\n BudgetNaming,\n ResolvedStrategy,\n Ruling,\n StrategySource,\n TreeNaming,\n} from './inputs.ts';\nexport { mapTree, readCounters, retrieveBytes, smeltBlob } from './verbs.ts';\nexport type {\n MapTreeOp,\n ReadCountersOp,\n RetrieveBytesOp,\n SmeltBlobOp,\n SmeltBlobOutcome,\n} from './verbs.ts';\n"]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The operations seam: what `smelt` *does*, under every door that asks it to.
|
|
3
|
+
*
|
|
4
|
+
* smelt has two front doors — the `smelt` binary in this package and the
|
|
5
|
+
* `@smeltjs/mcp` server next to it — and they are not two products. They are two
|
|
6
|
+
* conventions for saying the same four things: cut this blob, map this tree, give
|
|
7
|
+
* those bytes back, read the counters. The difference between them is entirely at the
|
|
8
|
+
* edges: one reads argv and writes to two streams and returns an exit code, the other
|
|
9
|
+
* validates a JSON Schema and returns a `CallToolResult`.
|
|
10
|
+
*
|
|
11
|
+
* The middle was duplicated anyway. Both packages had their own copy of *the budget is
|
|
12
|
+
* a positive integer with no default*, *an explicit strategy beats a configured one
|
|
13
|
+
* and `lexical` fills last*, *a tree reader refuses a file*, *read a path or fail
|
|
14
|
+
* naming it*, and *a config decides a store*. Five laws, ten implementations — and the
|
|
15
|
+
* mechanical cause is visible in one line of history: `resolveStoreRun` was never
|
|
16
|
+
* exported, so the package that needed the store law could not import it and wrote its
|
|
17
|
+
* own. A restatement leaked across a package boundary because the seam it needed sat
|
|
18
|
+
* on the wrong side of a barrel.
|
|
19
|
+
*
|
|
20
|
+
* So this module is the seam, below both doors:
|
|
21
|
+
*
|
|
22
|
+
* - **`ops/verbs.ts`** — {@link smeltBlob}, {@link mapTree}, {@link retrieveBytes},
|
|
23
|
+
* {@link readCounters}. The verbs over already-resolved inputs, returning data.
|
|
24
|
+
* - **`ops/inputs.ts`** — the laws an input must satisfy to *be* resolved, each
|
|
25
|
+
* stating its rule once and taking the caller's naming as an argument.
|
|
26
|
+
*
|
|
27
|
+
* A front door is now an adapter: **parse and resolve, call an op, render.** The CLI
|
|
28
|
+
* subcommand bodies do that with flags, a config file and an exit code; the MCP tools
|
|
29
|
+
* do it with a JSON Schema and a result envelope. What each may still keep is what is
|
|
30
|
+
* genuinely its own — its error type, its exit code, its wording, and any policy it
|
|
31
|
+
* deliberately does not share. (`smelt retrieve` refuses a memory store; the MCP
|
|
32
|
+
* server accepts one and says so when it bites. That divergence is intentional, it is
|
|
33
|
+
* documented on both sides, and it lives in the adapters — never here.)
|
|
34
|
+
*/
|
|
35
|
+
export { budgetFault, budgetMalformed, budgetRequired, openStore, readBlob, readTree, resolveStrategy, } from './inputs.js';
|
|
36
|
+
export { mapTree, readCounters, retrieveBytes, smeltBlob } from './verbs.js';
|
|
37
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ops/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,EACL,WAAW,EACX,eAAe,EACf,cAAc,EACd,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,eAAe,GAChB,MAAM,aAAa,CAAC;AASrB,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC","sourcesContent":["/**\n * The operations seam: what `smelt` *does*, under every door that asks it to.\n *\n * smelt has two front doors — the `smelt` binary in this package and the\n * `@smeltjs/mcp` server next to it — and they are not two products. They are two\n * conventions for saying the same four things: cut this blob, map this tree, give\n * those bytes back, read the counters. The difference between them is entirely at the\n * edges: one reads argv and writes to two streams and returns an exit code, the other\n * validates a JSON Schema and returns a `CallToolResult`.\n *\n * The middle was duplicated anyway. Both packages had their own copy of *the budget is\n * a positive integer with no default*, *an explicit strategy beats a configured one\n * and `lexical` fills last*, *a tree reader refuses a file*, *read a path or fail\n * naming it*, and *a config decides a store*. Five laws, ten implementations — and the\n * mechanical cause is visible in one line of history: `resolveStoreRun` was never\n * exported, so the package that needed the store law could not import it and wrote its\n * own. A restatement leaked across a package boundary because the seam it needed sat\n * on the wrong side of a barrel.\n *\n * So this module is the seam, below both doors:\n *\n * - **`ops/verbs.ts`** — {@link smeltBlob}, {@link mapTree}, {@link retrieveBytes},\n * {@link readCounters}. The verbs over already-resolved inputs, returning data.\n * - **`ops/inputs.ts`** — the laws an input must satisfy to *be* resolved, each\n * stating its rule once and taking the caller's naming as an argument.\n *\n * A front door is now an adapter: **parse and resolve, call an op, render.** The CLI\n * subcommand bodies do that with flags, a config file and an exit code; the MCP tools\n * do it with a JSON Schema and a result envelope. What each may still keep is what is\n * genuinely its own — its error type, its exit code, its wording, and any policy it\n * deliberately does not share. (`smelt retrieve` refuses a memory store; the MCP\n * server accepts one and says so when it bites. That divergence is intentional, it is\n * documented on both sides, and it lives in the adapters — never here.)\n */\n\nexport {\n budgetFault,\n budgetMalformed,\n budgetRequired,\n openStore,\n readBlob,\n readTree,\n resolveStrategy,\n} from './inputs.ts';\nexport type {\n BudgetFault,\n BudgetNaming,\n ResolvedStrategy,\n Ruling,\n StrategySource,\n TreeNaming,\n} from './inputs.ts';\nexport { mapTree, readCounters, retrieveBytes, smeltBlob } from './verbs.ts';\nexport type {\n MapTreeOp,\n ReadCountersOp,\n RetrieveBytesOp,\n SmeltBlobOp,\n SmeltBlobOutcome,\n} from './verbs.ts';\n"]}
|