[{"data":1,"prerenderedAt":881},["ShallowReactive",2],{"navigation":3,"\u002Fdocs\u002Fgenerated":135,"\u002Fdocs\u002Fgenerated-surround":876},[4],{"title":5,"path":6,"stem":7,"children":8,"page":134},"Docs","\u002Fdocs","docs",[9,13,17,21,25,29,33,37,41,45,49,53,57,61,70,74,78,82,86,90,94,98,102,106,110,114,118,122,126,130],{"title":10,"path":11,"stem":12},"AI harnesses: LLM tools, MCP servers and agents","\u002Fdocs\u002Fai-tools","docs\u002Fai-tools",{"title":14,"path":15,"stem":16},"Architecture","\u002Fdocs\u002Farchitecture","docs\u002Farchitecture",{"title":18,"path":19,"stem":20},"Web \u002F native bridges","\u002Fdocs\u002Fbridges","docs\u002Fbridges",{"title":22,"path":23,"stem":24},"Broadcast channels and tests","\u002Fdocs\u002Fchannels-and-tests","docs\u002Fchannels-and-tests",{"title":26,"path":27,"stem":28},"CLI reference","\u002Fdocs\u002Fcli","docs\u002Fcli",{"title":30,"path":31,"stem":32},"Completeness: how far an answer reaches","\u002Fdocs\u002Fcompleteness","docs\u002Fcompleteness",{"title":34,"path":35,"stem":36},"Configuration","\u002Fdocs\u002Fconfiguration","docs\u002Fconfiguration",{"title":38,"path":39,"stem":40},"External systems","\u002Fdocs\u002Fexternal","docs\u002Fexternal",{"title":42,"path":43,"stem":44},"Generated, copied and vendored files","\u002Fdocs\u002Fgenerated","docs\u002Fgenerated",{"title":46,"path":47,"stem":48},"Installing and updating cg","\u002Fdocs\u002Finstall","docs\u002Finstall",{"title":50,"path":51,"stem":52},"Java","\u002Fdocs\u002Fjava","docs\u002Fjava",{"title":54,"path":55,"stem":56},"Kotlin","\u002Fdocs\u002Fkotlin","docs\u002Fkotlin",{"title":58,"path":59,"stem":60},"Known limitations","\u002Fdocs\u002Flimitations","docs\u002Flimitations",{"title":62,"path":63,"stem":64,"children":65},"MCP server","\u002Fdocs\u002Fmcp","docs\u002Fmcp",[66],{"title":67,"path":68,"stem":69},"code-graph MCP: sample outputs (real calls via the MCP Python SDK stdio client)","\u002Fdocs\u002Fmcp\u002Fsample_outputs","docs\u002Fmcp\u002Fsample_outputs",{"title":71,"path":72,"stem":73},"Rust, C and C++","\u002Fdocs\u002Fnative","docs\u002Fnative",{"title":75,"path":76,"stem":77},"Port gaps: cg parity","\u002Fdocs\u002Fparity","docs\u002Fparity",{"title":79,"path":80,"stem":81},"PHP","\u002Fdocs\u002Fphp","docs\u002Fphp",{"title":83,"path":84,"stem":85},"Planned changes","\u002Fdocs\u002Fplans","docs\u002Fplans",{"title":87,"path":88,"stem":89},"Platform-specific code","\u002Fdocs\u002Fplatforms","docs\u002Fplatforms",{"title":91,"path":92,"stem":93},"Protocol links","\u002Fdocs\u002Fprotocols","docs\u002Fprotocols",{"title":95,"path":96,"stem":97},"Python","\u002Fdocs\u002Fpython","docs\u002Fpython",{"title":99,"path":100,"stem":101},"Quick start","\u002Fdocs\u002Fquickstart","docs\u002Fquickstart",{"title":103,"path":104,"stem":105},"Graph schema","\u002Fdocs\u002Fschema","docs\u002Fschema",{"title":107,"path":108,"stem":109},"Attack surface","\u002Fdocs\u002Fsurface","docs\u002Fsurface",{"title":111,"path":112,"stem":113},"Swift","\u002Fdocs\u002Fswift","docs\u002Fswift",{"title":115,"path":116,"stem":117},"TypeScript \u002F JavaScript frameworks","\u002Fdocs\u002Fts-frameworks","docs\u002Fts-frameworks",{"title":119,"path":120,"stem":121},"How we validate","\u002Fdocs\u002Fvalidation","docs\u002Fvalidation",{"title":123,"path":124,"stem":125},"Validation log","\u002Fdocs\u002Fvalidation-log","docs\u002Fvalidation-log",{"title":127,"path":128,"stem":129},"Value facts and resolutions","\u002Fdocs\u002Fvalue-facts","docs\u002Fvalue-facts",{"title":131,"path":132,"stem":133},"Visual view","\u002Fdocs\u002Fviz","docs\u002Fviz",false,{"id":136,"title":42,"body":137,"description":870,"extension":871,"meta":872,"navigation":873,"path":43,"seo":874,"stem":44,"__hash__":875},"docs\u002Fdocs\u002Fgenerated.md",{"type":138,"value":139,"toc":866},"minimark",[140,149,164,392,399,404,410,420,430,650,672,706,715,719,742,748,762,844,862],[141,142,143,144,148],"p",{},"cg keeps generated files out of the graph by default and lists them in ",[145,146,147],"code",{},"cg coverage",". A copy\npoints back at the file you edit.",[141,150,151,152,155,156,159,160,163],{},"One classifier (",[145,153,154],{},"cg_code_graph\u002Fcore\u002Fgenerated.py",") runs at the start of ",[145,157,158],{},"cg index",". The first\nmatching rule wins. Built-in directory and file-name lists live in\n",[145,161,162],{},"cg_code_graph\u002Fpresets\u002Fcommon.yaml",".",[165,166,167,180],"table",{},[168,169,170],"thead",{},[171,172,173,177],"tr",{},[174,175,176],"th",{},"rule",[174,178,179],{},"result",[181,182,183,195,209,230,275,294,304,335,372],"tbody",{},[171,184,185,192],{},[186,187,188,191],"td",{},[145,189,190],{},"generated.keep"," globs",[186,193,194],{},"never classified",[171,196,197,206],{},[186,198,199,202,203],{},[145,200,201],{},"generated.paths"," \u002F ",[145,204,205],{},"generated.vendored",[186,207,208],{},"generated \u002F vendored",[171,210,211,223],{},[186,212,213,216,217,202,220],{},[145,214,215],{},".gitattributes"," ",[145,218,219],{},"linguist-generated",[145,221,222],{},"linguist-vendored",[186,224,225,226,229],{},"generated \u002F vendored. A deeper file and a later line win. ",[145,227,228],{},"-attr"," marks the file hand-written",[171,231,232,238],{},[186,233,234,235],{},"Capacitor ",[145,236,237],{},"webDir",[186,239,240,243,244,247,248,252,253,255,256,259,260,263,264,266,267,270,271,274],{},[145,241,242],{},"android\u002F...\u002Fassets\u002Fpublic\u002F"," and ",[145,245,246],{},"ios\u002FApp\u002FApp\u002Fpublic\u002F"," are ",[249,250,251],"strong",{},"copied"," from ",[145,254,237],{}," (",[145,257,258],{},"copy_of"," per file). ",[145,261,262],{},"cap sync"," output is generated. ",[145,265,237],{}," itself is build output when ",[145,268,269],{},".gitignore"," or ",[145,272,273],{},"angular.json"," says so",[171,276,277,283],{},[186,278,279,280],{},"Cordova ",[145,281,282],{},"\u003Cwidget>",[186,284,285,288,289,252,291],{},[145,286,287],{},"platforms\u002F\u003Cplatform>\u002Fwww\u002F"," is ",[249,290,251],{},[145,292,293],{},"www\u002F",[171,295,296,301],{},[186,297,298],{},[145,299,300],{},".openapi-generator\u002FFILES",[186,302,303],{},"every listed file",[171,305,306,309],{},[186,307,308],{},"build dirs",[186,310,311,314,315,314,318,314,321,314,324,327,328,243,331,334],{},[145,312,313],{},".nuxt\u002F",", ",[145,316,317],{},".output\u002F",[145,319,320],{},".next\u002F",[145,322,323],{},".svelte-kit\u002F",[145,325,326],{},".docusaurus\u002F",". ",[145,329,330],{},"dist\u002F",[145,332,333],{},"build\u002F"," are skipped by every walk",[171,336,337,340],{},[186,338,339],{},"file names",[186,341,342,314,345,314,348,314,351,354,355,358,359,314,362,314,365,314,368,371],{},[145,343,344],{},"*.g.dart",[145,346,347],{},"*.freezed.dart",[145,349,350],{},"*.mocks.dart",[145,352,353],{},"generated_plugin_registrant.*",", Flutter ",[145,356,357],{},"ephemeral\u002F",", protoc ",[145,360,361],{},"*_pb2.py",[145,363,364],{},"*.pb.go",[145,366,367],{},"*_pb.ts",[145,369,370],{},"*.pb.swift",", …",[171,373,374,377],{},[186,375,376],{},"leading comment",[186,378,379,314,382,314,385,314,388,391],{},[145,380,381],{},"@generated",[145,383,384],{},"DO NOT EDIT",[145,386,387],{},"DO NOT MODIFY BY HAND",[145,389,390],{},"\u003Cauto-generated>",", OpenAPI \u002F protoc \u002F Sourcery \u002F SwiftGen \u002F Mockolo banners",[141,393,394,395,398],{},"A banner counts only in the comment lines before the first line of code. Swift macro expansions\nare not files in the checkout. SwiftPM plugin output under ",[145,396,397],{},".build\u002Fplugins\u002Foutputs\u002F"," is skipped\nby every walk.",[400,401,403],"h2",{"id":402},"default","Default",[141,405,406,407,409],{},"Generated files are not parsed. A final pass drops any node whose file was classified, and its\nedges. ",[145,408,147],{}," lists them by reason:",[411,412,418],"pre",{"className":413,"code":415,"language":416,"meta":417},[414],"language-text","$ cg coverage --db out\u002Fapp.db\ncoverage app: typescript 140 exact | generated: 211 files excluded\n  generated: copy of www\u002F (Capacitor webDir) 107, web build output (Capacitor webDir) 104\n","text","",[145,419,415],{"__ignoreMap":417},[141,421,422,425,426,429],{},[145,423,424],{},"coverage(path=...)"," for one generated file names the reason, so an agent edits the source. The\nMCP ",[145,427,428],{},"coverage"," tool lists the same groups. Index stats repeat the count:",[411,431,435],{"className":432,"code":433,"language":434,"meta":417,"style":417},"language-json shiki shiki-themes cg-light cg-light cg-dark","\"generated\": {\"files\": 3, \"by_language\": {\"typescript\": 2, \"dart\": 1},\n  \"by_reason\": {\"OpenAPI Generator (.openapi-generator\u002FFILES)\": 2, \"build_runner output (*.g.dart)\": 1},\n  \"by_kind\": {\"generated\": 3}, \"mode\": \"excluded\",\n  \"files_with_dropped_nodes\": 1, \"nodes_dropped\": 2, \"edges_dropped\": 4}\n","json",[145,436,437,519,560,606],{"__ignoreMap":417},[438,439,442,446,450,452,456,459,461,465,467,470,474,477,480,483,485,487,490,492,495,497,499,502,504,506,509,511,513,516],"span",{"class":440,"line":441},"line",1,[438,443,445],{"class":444},"sZ_TN","\"",[438,447,449],{"class":448},"sha9Y","generated",[438,451,445],{"class":444},[438,453,455],{"class":454},"snmWg",": ",[438,457,458],{"class":444},"{",[438,460,445],{"class":444},[438,462,464],{"class":463},"sbOAO","files",[438,466,445],{"class":444},[438,468,469],{"class":444},":",[438,471,473],{"class":472},"sZWGQ"," 3",[438,475,476],{"class":444},",",[438,478,479],{"class":444}," \"",[438,481,482],{"class":463},"by_language",[438,484,445],{"class":444},[438,486,469],{"class":444},[438,488,489],{"class":444}," {",[438,491,445],{"class":444},[438,493,494],{"class":463},"typescript",[438,496,445],{"class":444},[438,498,469],{"class":444},[438,500,501],{"class":472}," 2",[438,503,476],{"class":444},[438,505,479],{"class":444},[438,507,508],{"class":463},"dart",[438,510,445],{"class":444},[438,512,469],{"class":444},[438,514,515],{"class":472}," 1",[438,517,518],{"class":444},"},\n",[438,520,522,525,528,530,532,534,536,539,541,543,545,547,549,552,554,556,558],{"class":440,"line":521},2,[438,523,524],{"class":444},"  \"",[438,526,527],{"class":463},"by_reason",[438,529,445],{"class":444},[438,531,469],{"class":444},[438,533,489],{"class":444},[438,535,445],{"class":444},[438,537,538],{"class":463},"OpenAPI Generator (.openapi-generator\u002FFILES)",[438,540,445],{"class":444},[438,542,469],{"class":444},[438,544,501],{"class":472},[438,546,476],{"class":444},[438,548,479],{"class":444},[438,550,551],{"class":463},"build_runner output (*.g.dart)",[438,553,445],{"class":444},[438,555,469],{"class":444},[438,557,515],{"class":472},[438,559,518],{"class":444},[438,561,563,565,568,570,572,574,576,578,580,582,584,587,589,592,594,596,598,601,603],{"class":440,"line":562},3,[438,564,524],{"class":444},[438,566,567],{"class":463},"by_kind",[438,569,445],{"class":444},[438,571,469],{"class":444},[438,573,489],{"class":444},[438,575,445],{"class":444},[438,577,449],{"class":463},[438,579,445],{"class":444},[438,581,469],{"class":444},[438,583,473],{"class":472},[438,585,586],{"class":444},"},",[438,588,479],{"class":444},[438,590,591],{"class":463},"mode",[438,593,445],{"class":444},[438,595,469],{"class":444},[438,597,479],{"class":444},[438,599,600],{"class":448},"excluded",[438,602,445],{"class":444},[438,604,605],{"class":444},",\n",[438,607,609,611,614,616,618,620,622,624,627,629,631,633,635,637,640,642,644,647],{"class":440,"line":608},4,[438,610,524],{"class":444},[438,612,613],{"class":463},"files_with_dropped_nodes",[438,615,445],{"class":444},[438,617,469],{"class":444},[438,619,515],{"class":472},[438,621,476],{"class":444},[438,623,479],{"class":444},[438,625,626],{"class":463},"nodes_dropped",[438,628,445],{"class":444},[438,630,469],{"class":444},[438,632,501],{"class":472},[438,634,476],{"class":444},[438,636,479],{"class":444},[438,638,639],{"class":463},"edges_dropped",[438,641,445],{"class":444},[438,643,469],{"class":444},[438,645,646],{"class":472}," 4",[438,648,649],{"class":444},"}\n",[141,651,652,654,655,657,658,661,662,314,665,668,669,163],{},[145,653,464],{}," counts every classified file, including the TypeScript and Dart files the extractors\nskip before parsing. ",[145,656,613],{}," is what the final pass removed. With\n",[145,659,660],{},"--include-generated"," the same object reports ",[145,663,664],{},"files_with_nodes",[145,666,667],{},"nodes_labelled"," and\n",[145,670,671],{},"copy_of_edges",[141,673,674,677,678,202,681,202,684,687,688,202,691,694,695,698,699,702,703,705],{},[249,675,676],{},"Generated tests stay in."," A generated file under ",[145,679,680],{},"test",[145,682,683],{},"tests",[145,685,686],{},"__tests__"," \u002F\n",[145,689,690],{},"androidTest",[145,692,693],{},"*Tests"," is indexed, with ",[145,696,697],{},"attrs.generated.test: true",", and ",[145,700,701],{},"cg tests"," lists\nit. Framework build directories and ",[145,704,201],{}," globs are never kept this way.",[141,707,708,709,711,712,714],{},"Files that only feed resolution are still read. Nuxt ",[145,710,313],{}," types resolve auto-imports, and\n",[145,713,344],{}," supplies json_serializable keys. Their functions do not become nodes.",[400,716,718],{"id":717},"include-them","Include them",[141,720,721,724,725,728,729,698,732,314,735,738,739,741],{},[145,722,723],{},"cg index --include-generated"," (or ",[145,726,727],{},"generated.include: true",") indexes the same files. Every\nnode from them carries ",[145,730,731],{},"attrs.generated = {kind, reason[, copy_of]}",[145,733,734],{},"impact",[145,736,737],{},"reaches","\nand the MCP ",[145,740,734],{}," tool label them:",[411,743,746],{"className":744,"code":745,"language":416,"meta":417},[414],"$ cg impact shop.service.place --db out\u002Fpy.db\ncallers (transitive): 3\n  d=1 [shop] shop.api.create\n  d=1 [shop] shop.orders_pb2.decode  [generated: protoc output (Python)]\n  d=1 [shop] shop.schema.run  [generated: 'Code generated... DO NOT EDIT.' header]\n",[145,747,745],{"__ignoreMap":417},[141,749,750,751,754,755,758,759,761],{},"A copied file's module gets a ",[145,752,753],{},"COPY_OF"," edge to the source module when both are indexed. A hit\nin a copy then points at the file to edit, and the copy is not counted as a second\nimplementation. The MCP ",[145,756,757],{},"index"," tool keeps ",[145,760,660],{}," across re-indexes.",[411,763,767],{"className":764,"code":765,"language":766,"meta":417,"style":417},"language-yaml shiki shiki-themes cg-light cg-light cg-dark","generated:\n  paths: [\"src\u002Fapi\u002Fgenerated\u002F**\"]\n  vendored: [\"third_party\u002F**\"]\n  keep: [\"src\u002Fschema.gen.ts\"]\n  include: false\n","yaml",[145,768,769,777,797,815,833],{"__ignoreMap":417},[438,770,771,774],{"class":440,"line":441},[438,772,449],{"class":773},"s4LKg",[438,775,776],{"class":444},":\n",[438,778,779,782,784,787,789,792,794],{"class":440,"line":521},[438,780,781],{"class":773},"  paths",[438,783,469],{"class":444},[438,785,786],{"class":444}," [",[438,788,445],{"class":444},[438,790,791],{"class":448},"src\u002Fapi\u002Fgenerated\u002F**",[438,793,445],{"class":444},[438,795,796],{"class":444},"]\n",[438,798,799,802,804,806,808,811,813],{"class":440,"line":562},[438,800,801],{"class":773},"  vendored",[438,803,469],{"class":444},[438,805,786],{"class":444},[438,807,445],{"class":444},[438,809,810],{"class":448},"third_party\u002F**",[438,812,445],{"class":444},[438,814,796],{"class":444},[438,816,817,820,822,824,826,829,831],{"class":440,"line":608},[438,818,819],{"class":773},"  keep",[438,821,469],{"class":444},[438,823,786],{"class":444},[438,825,445],{"class":444},[438,827,828],{"class":448},"src\u002Fschema.gen.ts",[438,830,445],{"class":444},[438,832,796],{"class":444},[438,834,836,839,841],{"class":440,"line":835},5,[438,837,838],{"class":773},"  include",[438,840,469],{"class":444},[438,842,843],{"class":472}," false\n",[141,845,846,849,850,855,856,858,859,861],{},[145,847,848],{},"cg config show"," lists the built-in rules and these keys. Public repos:\n",[851,852,854],"a",{"href":853},"\u002Fdocs\u002Fvalidation-log#generated-and-copied-files","generated and copied files",". Copied web assets are not\nbridge senders; only the source ",[145,857,237],{}," files are indexed (",[851,860,18],{"href":19},").",[863,864,865],"style",{},"html pre.shiki code .sZ_TN, html code.shiki .sZ_TN{--shiki-light:#71717A;--shiki-default:#71717A;--shiki-dark:#A1A1AA}html pre.shiki code .sha9Y, html code.shiki .sha9Y{--shiki-light:#9F8CFF;--shiki-default:#9F8CFF;--shiki-dark:#C4B5FD}html pre.shiki code .snmWg, html code.shiki .snmWg{--shiki-light:#27272A;--shiki-default:#27272A;--shiki-dark:#E4E4E7}html pre.shiki code .sbOAO, html code.shiki .sbOAO{--shiki-light:#3F6212;--shiki-default:#3F6212;--shiki-dark:#A3E635}html pre.shiki code .sZWGQ, html code.shiki .sZWGQ{--shiki-light:#8B5CF6;--shiki-default:#8B5CF6;--shiki-dark:#C4B5FD}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s4LKg, html code.shiki .s4LKg{--shiki-light:#4D7C0F;--shiki-default:#4D7C0F;--shiki-dark:#84CC16}",{"title":417,"searchDepth":608,"depth":521,"links":867},[868,869],{"id":402,"depth":521,"text":403},{"id":717,"depth":521,"text":718},"cg keeps generated files out of the graph by default and lists them in cg coverage. A copy\npoints back at the file you edit.","md",{},true,{"title":42,"description":870},"VFdUXGwWe-YHigKcDi2CydhV6hb0UWAVv2kV4oUL0so",[877,879],{"title":38,"path":39,"stem":40,"description":878,"children":-1},"A Postgres server, Redis, SMTP, LDAP, SFTP or S3 bucket is one node. The address usually lives\nin configuration, not in the call.",{"title":46,"path":47,"stem":48,"description":880,"children":-1},"cg is a Python package (Python 3.11+). The PyPI name is cg-code-graph; the commands are cg and cg-mcp. It installs as a user-level tool. No checkout and no sudo.",1792170234972]