feat: panproto v0.31.0 - grammar-driven scope detection via tags.scm Upgrade panproto to v0.31.0. The walker now uses tree-sitter's canonical queries/tags.scm files for scope detection, replacing the hardcoded SCOPE_INTRODUCING_KINDS list. 198/248 bundled grammars ship tags.scm queries - the same primitive that drives GitHub code navigation, Helix, and tree-sitter tags CLI. Scope kinds now use the standard tags.scm vocabulary: function, method, class, module, interface, type, macro, or Other. Rust fn items are now correctly detected as function scopes, along with Haskell, Elixir, OCaml, and every other grammar with tags.scm. Frontend: added scopeSymbol() helper that maps tags.scm kinds to visual symbols (f/m/C/I/M/T/#) in the structure map, showing semantic categories instead of raw AST node kinds.

Author: Aaron Steven White
Commit 91e79a02a2e57f33c93bfb77071cbdad78533e59
Parent: 1d7f380764
Structural diff unavailable

These commits were pushed via plain git push, so no pre-parsed schemas are available. Install git-remote-cospan and re-push via panproto:// to see scope-level changes, breaking change detection, and semantic diffs.

brew install panproto/tap/git-remote-cospan
3 files changed +100 -56
@@ -2492,8 +2492,8 @@ dependencies = [
24922492 
24932493 [[package]]
24942494 name = "panproto-check"
2495-version = "0.30.0"
2496-source = "git+https://github.com/panproto/panproto.git?tag=v0.30.0#bab395e7ccd7af2375d5d505f0ac70e81060b8a9"
2495+version = "0.31.0"
2496+source = "git+https://github.com/panproto/panproto.git?tag=v0.31.0#5f92669f0b0aaa45d545179bbc6a80833aa52c9d"
24972497 dependencies = [
24982498  "memchr",
24992499  "panproto-gat",
@@ -2508,8 +2508,8 @@ dependencies = [
25082508 
25092509 [[package]]
25102510 name = "panproto-core"
2511-version = "0.30.0"
2512-source = "git+https://github.com/panproto/panproto.git?tag=v0.30.0#bab395e7ccd7af2375d5d505f0ac70e81060b8a9"
2511+version = "0.31.0"
2512+source = "git+https://github.com/panproto/panproto.git?tag=v0.31.0#5f92669f0b0aaa45d545179bbc6a80833aa52c9d"
25132513 dependencies = [
25142514  "panproto-check",
25152515  "panproto-gat",
@@ -2524,8 +2524,8 @@ dependencies = [
25242524 
25252525 [[package]]
25262526 name = "panproto-expr"
2527-version = "0.30.0"
2528-source = "git+https://github.com/panproto/panproto.git?tag=v0.30.0#bab395e7ccd7af2375d5d505f0ac70e81060b8a9"
2527+version = "0.31.0"
2528+source = "git+https://github.com/panproto/panproto.git?tag=v0.31.0#5f92669f0b0aaa45d545179bbc6a80833aa52c9d"
25292529 dependencies = [
25302530  "rustc-hash",
25312531  "serde",
@@ -2534,8 +2534,8 @@ dependencies = [
25342534 
25352535 [[package]]
25362536 name = "panproto-expr-parser"
2537-version = "0.30.0"
2538-source = "git+https://github.com/panproto/panproto.git?tag=v0.30.0#bab395e7ccd7af2375d5d505f0ac70e81060b8a9"
2537+version = "0.31.0"
2538+source = "git+https://github.com/panproto/panproto.git?tag=v0.31.0#5f92669f0b0aaa45d545179bbc6a80833aa52c9d"
25392539 dependencies = [
25402540  "chumsky",
25412541  "logos 0.16.1",
@@ -2544,8 +2544,8 @@ dependencies = [
25442544 
25452545 [[package]]
25462546 name = "panproto-gat"
2547-version = "0.30.0"
2548-source = "git+https://github.com/panproto/panproto.git?tag=v0.30.0#bab395e7ccd7af2375d5d505f0ac70e81060b8a9"
2547+version = "0.31.0"
2548+source = "git+https://github.com/panproto/panproto.git?tag=v0.31.0#5f92669f0b0aaa45d545179bbc6a80833aa52c9d"
25492549 dependencies = [
25502550  "panproto-expr",
25512551  "rustc-hash",
@@ -2555,8 +2555,8 @@ dependencies = [
25552555 
25562556 [[package]]
25572557 name = "panproto-git"
2558-version = "0.30.0"
2559-source = "git+https://github.com/panproto/panproto.git?tag=v0.30.0#bab395e7ccd7af2375d5d505f0ac70e81060b8a9"
2558+version = "0.31.0"
2559+source = "git+https://github.com/panproto/panproto.git?tag=v0.31.0#5f92669f0b0aaa45d545179bbc6a80833aa52c9d"
25602560 dependencies = [
25612561  "git2",
25622562  "miette",
@@ -2573,8 +2573,8 @@ dependencies = [
25732573 
25742574 [[package]]
25752575 name = "panproto-grammars"
2576-version = "0.30.0"
2577-source = "git+https://github.com/panproto/panproto.git?tag=v0.30.0#bab395e7ccd7af2375d5d505f0ac70e81060b8a9"
2576+version = "0.31.0"
2577+source = "git+https://github.com/panproto/panproto.git?tag=v0.31.0#5f92669f0b0aaa45d545179bbc6a80833aa52c9d"
25782578 dependencies = [
25792579  "cc",
25802580  "serde",
@@ -2585,8 +2585,8 @@ dependencies = [
25852585 
25862586 [[package]]
25872587 name = "panproto-inst"
2588-version = "0.30.0"
2589-source = "git+https://github.com/panproto/panproto.git?tag=v0.30.0#bab395e7ccd7af2375d5d505f0ac70e81060b8a9"
2588+version = "0.31.0"
2589+source = "git+https://github.com/panproto/panproto.git?tag=v0.31.0#5f92669f0b0aaa45d545179bbc6a80833aa52c9d"
25902590 dependencies = [
25912591  "bumpalo",
25922592  "panproto-expr",
@@ -2601,8 +2601,8 @@ dependencies = [
26012601 
26022602 [[package]]
26032603 name = "panproto-io"
2604-version = "0.30.0"
2605-source = "git+https://github.com/panproto/panproto.git?tag=v0.30.0#bab395e7ccd7af2375d5d505f0ac70e81060b8a9"
2604+version = "0.31.0"
2605+source = "git+https://github.com/panproto/panproto.git?tag=v0.31.0#5f92669f0b0aaa45d545179bbc6a80833aa52c9d"
26062606 dependencies = [
26072607  "bumpalo",
26082608  "memchr",
@@ -2624,8 +2624,8 @@ dependencies = [
26242624 
26252625 [[package]]
26262626 name = "panproto-lens"
2627-version = "0.30.0"
2628-source = "git+https://github.com/panproto/panproto.git?tag=v0.30.0#bab395e7ccd7af2375d5d505f0ac70e81060b8a9"
2627+version = "0.31.0"
2628+source = "git+https://github.com/panproto/panproto.git?tag=v0.31.0#5f92669f0b0aaa45d545179bbc6a80833aa52c9d"
26292629 dependencies = [
26302630  "panproto-expr",
26312631  "panproto-gat",
@@ -2641,8 +2641,8 @@ dependencies = [
26412641 
26422642 [[package]]
26432643 name = "panproto-lens-dsl"
2644-version = "0.30.0"
2645-source = "git+https://github.com/panproto/panproto.git?tag=v0.30.0#bab395e7ccd7af2375d5d505f0ac70e81060b8a9"
2644+version = "0.31.0"
2645+source = "git+https://github.com/panproto/panproto.git?tag=v0.31.0#5f92669f0b0aaa45d545179bbc6a80833aa52c9d"
26462646 dependencies = [
26472647  "miette",
26482648  "nickel-lang",
@@ -2660,8 +2660,8 @@ dependencies = [
26602660 
26612661 [[package]]
26622662 name = "panproto-mig"
2663-version = "0.30.0"
2664-source = "git+https://github.com/panproto/panproto.git?tag=v0.30.0#bab395e7ccd7af2375d5d505f0ac70e81060b8a9"
2663+version = "0.31.0"
2664+source = "git+https://github.com/panproto/panproto.git?tag=v0.31.0#5f92669f0b0aaa45d545179bbc6a80833aa52c9d"
26652665 dependencies = [
26662666  "panproto-expr",
26672667  "panproto-gat",
@@ -2674,8 +2674,8 @@ dependencies = [
26742674 
26752675 [[package]]
26762676 name = "panproto-parse"
2677-version = "0.30.0"
2678-source = "git+https://github.com/panproto/panproto.git?tag=v0.30.0#bab395e7ccd7af2375d5d505f0ac70e81060b8a9"
2677+version = "0.31.0"
2678+source = "git+https://github.com/panproto/panproto.git?tag=v0.31.0#5f92669f0b0aaa45d545179bbc6a80833aa52c9d"
26792679 dependencies = [
26802680  "memchr",
26812681  "miette",
@@ -2689,12 +2689,13 @@ dependencies = [
26892689  "smallvec 2.0.0-alpha.12",
26902690  "thiserror",
26912691  "tree-sitter",
2692+ "tree-sitter-tags",
26922693 ]
26932694 
26942695 [[package]]
26952696 name = "panproto-project"
2696-version = "0.30.0"
2697-source = "git+https://github.com/panproto/panproto.git?tag=v0.30.0#bab395e7ccd7af2375d5d505f0ac70e81060b8a9"
2697+version = "0.31.0"
2698+source = "git+https://github.com/panproto/panproto.git?tag=v0.31.0#5f92669f0b0aaa45d545179bbc6a80833aa52c9d"
26982699 dependencies = [
26992700  "blake3",
27002701  "globset",
@@ -2713,8 +2714,8 @@ dependencies = [
27132714 
27142715 [[package]]
27152716 name = "panproto-protocols"
2716-version = "0.30.0"
2717-source = "git+https://github.com/panproto/panproto.git?tag=v0.30.0#bab395e7ccd7af2375d5d505f0ac70e81060b8a9"
2717+version = "0.31.0"
2718+source = "git+https://github.com/panproto/panproto.git?tag=v0.31.0#5f92669f0b0aaa45d545179bbc6a80833aa52c9d"
27182719 dependencies = [
27192720  "blake3",
27202721  "panproto-gat",
@@ -2728,8 +2729,8 @@ dependencies = [
27282729 
27292730 [[package]]
27302731 name = "panproto-schema"
2731-version = "0.30.0"
2732-source = "git+https://github.com/panproto/panproto.git?tag=v0.30.0#bab395e7ccd7af2375d5d505f0ac70e81060b8a9"
2732+version = "0.31.0"
2733+source = "git+https://github.com/panproto/panproto.git?tag=v0.31.0#5f92669f0b0aaa45d545179bbc6a80833aa52c9d"
27332734 dependencies = [
27342735  "panproto-expr",
27352736  "panproto-gat",
@@ -2741,8 +2742,8 @@ dependencies = [
27412742 
27422743 [[package]]
27432744 name = "panproto-vcs"
2744-version = "0.30.0"
2745-source = "git+https://github.com/panproto/panproto.git?tag=v0.30.0#bab395e7ccd7af2375d5d505f0ac70e81060b8a9"
2745+version = "0.31.0"
2746+source = "git+https://github.com/panproto/panproto.git?tag=v0.31.0#5f92669f0b0aaa45d545179bbc6a80833aa52c9d"
27462747 dependencies = [
27472748  "blake3",
27482749  "panproto-check",
@@ -2762,8 +2763,8 @@ dependencies = [
27622763 
27632764 [[package]]
27642765 name = "panproto-xrpc"
2765-version = "0.30.0"
2766-source = "git+https://github.com/panproto/panproto.git?tag=v0.30.0#bab395e7ccd7af2375d5d505f0ac70e81060b8a9"
2766+version = "0.31.0"
2767+source = "git+https://github.com/panproto/panproto.git?tag=v0.31.0#5f92669f0b0aaa45d545179bbc6a80833aa52c9d"
27672768 dependencies = [
27682769  "hex",
27692770  "miette",
@@ -4715,6 +4716,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
47154716 checksum = "009994f150cc0cd50ff54917d5bc8bffe8cad10ca10d81c34da2ec421ae61782"
47164717 
47174718 [[package]]
4719+name = "tree-sitter-tags"
4720+version = "0.25.10"
4721+source = "registry+https://github.com/rust-lang/crates.io-index"
4722+checksum = "0d0f6406e002baae5cc53e41a12c8ae582a8dc8237a1fd3a5f3edf9fa06be7d0"
4723+dependencies = [
4724+ "memchr",
4725+ "regex",
4726+ "streaming-iterator",
4727+ "thiserror",
4728+ "tree-sitter",
4729+]
4730+
4731+[[package]]
47184732 name = "try-lock"
47194733 version = "0.2.5"
47204734 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -13,24 +13,24 @@ license = "AGPL-3.0-or-later"
1313 repository = "https://github.com/cospan-dev/cospan"
1414 
1515 [workspace.dependencies]
16-# panproto v0.30.0
17-panproto-core = { git = "https://github.com/panproto/panproto.git", tag = "v0.30.0" }
18-panproto-vcs = { git = "https://github.com/panproto/panproto.git", tag = "v0.30.0" }
19-panproto-schema = { git = "https://github.com/panproto/panproto.git", tag = "v0.30.0" }
20-panproto-check = { git = "https://github.com/panproto/panproto.git", tag = "v0.30.0" }
21-panproto-lens = { git = "https://github.com/panproto/panproto.git", tag = "v0.30.0" }
22-panproto-lens-dsl = { git = "https://github.com/panproto/panproto.git", tag = "v0.30.0" }
23-panproto-protocols = { git = "https://github.com/panproto/panproto.git", tag = "v0.30.0" }
24-panproto-io = { git = "https://github.com/panproto/panproto.git", tag = "v0.30.0" }
25-panproto-inst = { git = "https://github.com/panproto/panproto.git", tag = "v0.30.0" }
26-panproto-gat = { git = "https://github.com/panproto/panproto.git", tag = "v0.30.0" }
27-panproto-mig = { git = "https://github.com/panproto/panproto.git", tag = "v0.30.0" }
28-panproto-expr = { git = "https://github.com/panproto/panproto.git", tag = "v0.30.0" }
29-panproto-expr-parser = { git = "https://github.com/panproto/panproto.git", tag = "v0.30.0" }
30-panproto-xrpc = { git = "https://github.com/panproto/panproto.git", tag = "v0.30.0" }
31-panproto-parse = { git = "https://github.com/panproto/panproto.git", tag = "v0.30.0", features = ["group-all"] }
32-panproto-git = { git = "https://github.com/panproto/panproto.git", tag = "v0.30.0" }
33-panproto-project = { git = "https://github.com/panproto/panproto.git", tag = "v0.30.0" }
16+# panproto v0.31.0
17+panproto-core = { git = "https://github.com/panproto/panproto.git", tag = "v0.31.0" }
18+panproto-vcs = { git = "https://github.com/panproto/panproto.git", tag = "v0.31.0" }
19+panproto-schema = { git = "https://github.com/panproto/panproto.git", tag = "v0.31.0" }
20+panproto-check = { git = "https://github.com/panproto/panproto.git", tag = "v0.31.0" }
21+panproto-lens = { git = "https://github.com/panproto/panproto.git", tag = "v0.31.0" }
22+panproto-lens-dsl = { git = "https://github.com/panproto/panproto.git", tag = "v0.31.0" }
23+panproto-protocols = { git = "https://github.com/panproto/panproto.git", tag = "v0.31.0" }
24+panproto-io = { git = "https://github.com/panproto/panproto.git", tag = "v0.31.0" }
25+panproto-inst = { git = "https://github.com/panproto/panproto.git", tag = "v0.31.0" }
26+panproto-gat = { git = "https://github.com/panproto/panproto.git", tag = "v0.31.0" }
27+panproto-mig = { git = "https://github.com/panproto/panproto.git", tag = "v0.31.0" }
28+panproto-expr = { git = "https://github.com/panproto/panproto.git", tag = "v0.31.0" }
29+panproto-expr-parser = { git = "https://github.com/panproto/panproto.git", tag = "v0.31.0" }
30+panproto-xrpc = { git = "https://github.com/panproto/panproto.git", tag = "v0.31.0" }
31+panproto-parse = { git = "https://github.com/panproto/panproto.git", tag = "v0.31.0", features = ["group-all"] }
32+panproto-git = { git = "https://github.com/panproto/panproto.git", tag = "v0.31.0" }
33+panproto-project = { git = "https://github.com/panproto/panproto.git", tag = "v0.31.0" }
3434 git2 = "0.20"
3535 
3636 # Web framework
@@ -122,6 +122,28 @@
122122 		}
123123 	}
124124 
125+	// Map tree-sitter tags.scm canonical categories to visual symbols.
126+	// Since panproto v0.31.0 the walker uses tags.scm queries, so kind
127+	// is one of: "function", "method", "class", "module", "interface",
128+	// "type", "macro", or "Other:<custom>" for grammar-specific extensions.
129+	function scopeSymbol(kind: string): { symbol: string; label: string } {
130+		switch (kind.toLowerCase()) {
131+			case 'function': return { symbol: 'f', label: 'function' };
132+			case 'method':   return { symbol: 'm', label: 'method' };
133+			case 'class':    return { symbol: 'C', label: 'class' };
134+			case 'interface':return { symbol: 'I', label: 'interface' };
135+			case 'module':   return { symbol: 'M', label: 'module' };
136+			case 'type':     return { symbol: 'T', label: 'type' };
137+			case 'macro':    return { symbol: '#', label: 'macro' };
138+			default: {
139+				if (kind.toLowerCase().startsWith('other:')) {
140+					return { symbol: '.', label: kind.slice(6) };
141+				}
142+				return { symbol: '.', label: kind };
143+			}
144+		}
145+	}
146+
125147 	function elementStatusLabel(status: string): string {
126148 		switch (status) {
127149 			case 'Added': return 'added';
@@ -269,12 +291,16 @@
269291 									</summary>
270292 									<div class="divide-y divide-border/30">
271293 										{#each changed as el (el.id)}
294+											{@const sym = scopeSymbol(el.kind)}
272295 											<div class="flex items-center gap-2 px-3 py-1.5 text-sm">
273296 												<span class="w-20 shrink-0 text-[10px] font-mono {elementStatusColor(el.status)}">
274297 													{elementStatusLabel(el.status)}
275298 												</span>
299+												<span class="w-4 text-center font-mono text-[11px] text-text-muted" title={sym.label}>
300+													{sym.symbol}
301+												</span>
276302 												<code class="font-mono text-sm text-text-primary">{el.name}</code>
277-												<span class="text-[10px] text-text-muted">{el.kind}</span>
303+												<span class="text-[10px] text-text-muted">{sym.label}</span>
278304 												{#if el.start_line}
279305 													<span class="ml-auto text-[10px] text-text-muted font-mono">:{el.start_line}</span>
280306 												{/if}
@@ -286,10 +312,14 @@
286312 													{unchanged.length} unchanged elements
287313 												</summary>
288314 												{#each unchanged as el (el.id)}
315+													{@const sym = scopeSymbol(el.kind)}
289316 													<div class="flex items-center gap-2 px-3 py-1 text-sm text-text-muted">
290317 														<span class="w-20 shrink-0 text-[10px] font-mono"></span>
318+														<span class="w-4 text-center font-mono text-[11px]" title={sym.label}>
319+															{sym.symbol}
320+														</span>
291321 														<code class="font-mono text-sm">{el.name}</code>
292-														<span class="text-[10px]">{el.kind}</span>
322+														<span class="text-[10px]">{sym.label}</span>
293323 														{#if el.start_line}
294324 															<span class="ml-auto text-[10px] font-mono">:{el.start_line}</span>
295325 														{/if}
cospan · schematic version control on atproto built on AT Protocol