Build, refresh and check the index

Keep the index current with the working tree, and say plainly when it is not.

  1. Given a repository the server knows
  2. When an agent asks for a refresh
  3. Then clew rebuilds only what changed, or the whole index when it must
  4. When an agent asks for status
  5. Then clew names each way the index is stale: the data, the schema, or the server's code

Overview · 153 steps, 7 lanes

  1. step 2 · clew/mcp_server/server.py
  2. step 3 · clew/mcp_server/server.py
  3. steps 4–143 · clew/mcp_server/server.py, clew/mcp_server/state.py, clew/wiki/themes/clew/static/web.js +4
  4. steps 144–146 · clew/mcp_server/server.py
  5. steps 147–153 · clew/mcp_server/server.py, clew/mcp_server/state.py
callercallercallercallercallercallercallercallerclew/mcp_server/server.pyclew/mcp_server/server.pyclew/mcp_server/server.pyclew/mcp_server/server.pyclew/mcp_server/server.pyclew/mcp_server/server.pyclew/mcp_server/server.pyclew/mcp_server/server.pyclew/mcp_server/state.pyclew/mcp_server/state.pyclew/mcp_server/state.pyclew/mcp_server/state.pyclew/mcp_server/state.pyclew/mcp_server/state.pyclew/mcp_server/state.pyclew/mcp_server/state.pyclew/wiki/themes/clew/static/web.jsclew/wiki/themes/clew/static/web.jsclew/wiki/themes/clew/static/web.jsclew/wiki/themes/clew/static/web.jsclew/wiki/themes/clew/static/web.jsclew/wiki/themes/clew/static/web.jsclew/wiki/themes/clew/static/web.jsclew/wiki/themes/clew/static/web.jsclew/mcp_server/routing.pyclew/mcp_server/routing.pyclew/mcp_server/routing.pyclew/mcp_server/routing.pyclew/mcp_server/routing.pyclew/mcp_server/routing.pyclew/mcp_server/routing.pyclew/mcp_server/routing.pyclew/mcp_server/freshness.pyclew/mcp_server/freshness.pyclew/mcp_server/freshness.pyclew/mcp_server/freshness.pyclew/mcp_server/freshness.pyclew/mcp_server/freshness.pyclew/mcp_server/freshness.pyclew/mcp_server/freshness.pyclew/scope.pyclew/scope.pyclew/scope.pyclew/scope.pyclew/scope.pyclew/scope.pyclew/scope.pyclew/scope.pyother filesother filesother filesother filesother filesother filesother filesother filesloop (line 2353)loopopt (line 352)optopt (line 169)optloop (line 169)loopopt (line 171)optopt (line 172)optcatch (line 562)catchopt (line 1826)optopt (line 1874)optopt (line 1887)optopt (line 1904)optopt (line 1911)opttry (line 1003)tryloop (line 205)looploop (line 286)loopopt (line 2549)optopt (line 3032)optloop (line 2805)looploop (line 2807)loopindex1–9. index → _index_action1_index_action +8 more10. _roots_askable → roots_request_supported10roots_request_supported11–12. roots_request_supported → server_request_surface11server_request_surface +1 more13. _roots → list13list14. list → link14link15. _target_from_roots → root_uri_to_path15root_uri_to_path16. ensure_target → adopt16adopt17. adopt → repo_indexes17repo_indexes18. repo_indexes → target_for18target_for19–20. target_for → _safe_index_name19_safe_index_name +1 more21. repo_indexes → target_for21target_for22. adopt → target_for22target_for23–29. adopt → _sync_tier123_sync_tier1 +6 more30. _answering_with_refresh → refused30refused31. _answering_with_refresh → _take_context31_take_context32. _take_context → list32list33. register_query_tools → list33list34. adopt → db_status34db_status35–36. db_status → _options_meta35_options_meta +1 more37. _meta_section → meta_section37meta_section38. db_status → stated_options38stated_options39. db_status → read_build_signature39read_build_signature40–48. db_status → _source_drift40_source_drift +8 more49. db_status → list49list50–53. db_status → _diagnostics_meta50_diagnostics_meta +3 more54. db_status → code_identity54code_identity55–57. code_identity → source_fingerprint55source_fingerprint +2 more58. db_status → notices58notices59–67. notices → code_identity59code_identity +8 more68–69. _build_subject → resolve_target68resolve_target +1 more70. _indexes_for → repo_indexes70repo_indexes71. _indexes_for → repo_indexes71repo_indexes72. resolve_target → list72list73. resolve_target → target_for73target_for74–75. resolve_target → unknown_target_error74unknown_target_error +1 more76. resolve_target → unbuilt_refusal76unbuilt_refusal77–79. unbuilt_refusal → no_index_message77no_index_message +2 more80. unbuilt_refusal → describe_declaration80describe_declaration81. describe_declaration → _parsed_declaration81_parsed_declaration82. resolve_target → 82… 1 call not run83. _build_subject → target_for83target_for84. _build_subject → _sub_index_rejection84_sub_index_rejection85. _sub_index_rejection → first_party_sub_index85first_party_sub_index86–87. first_party_sub_index → whole_repo_scope86whole_repo_scope +1 more88. _gitignored_paths → git_argv88git_argv89. git_argv → _no_ext_diff89_no_ext_diff90. git_argv → list90list91. _gitignored_paths → git_env91git_env92. whole_repo_scope → list92list93–109. whole_repo_scope → nested_repo_roots93nested_repo_roots +16 more110–115. first_party_sub_index → _under_any110_under_any +5 more116. _sub_index_rejection → _buildable_sub_indexes116_buildable_sub_indexes117. _buildable_sub_indexes → derive_sub_indexes117derive_sub_indexes118–121. derive_sub_indexes → whole_repo_scope118whole_repo_scope +3 more122. _nested_trees_recursive → list122list123–124. _nested_trees_recursive → _gitignored_paths123_gitignored_paths +1 more125–130. derive_sub_indexes → _direct_parent125_direct_parent +5 more131. _sub_index_rejection → _offered_sub_indexes131_offered_sub_indexes132. _offered_sub_indexes → derive_sub_indexes132derive_sub_indexes133. _offered_sub_indexes → list133list134. build_or_refresh → code_identity134code_identity135. build_or_refresh → stale_code_refusal135stale_code_refusal136. stale_code_refusal → code_identity136code_identity137–138. build_or_refresh → _build_lock137_build_lock +1 more139. _build_once → db_status139db_status140–142. build_or_refresh → adopt140adopt +2 more143. build_or_refresh → db_status143db_status144–148. _index_action → read_comments144read_comments +4 more149. list_targets → db_status149db_status150–153. list_targets → _top_level_names150_top_level_names +3 more
All 153 steps
#callercalleewhat it doesrequirementsframescall site
1index_index_actionRun one index action and return its raw result.——clew/mcp_server/server.py:2953
2_index_actionregistry_wide_target_errorExplain that a registry-wide index action will not honour a supplied target.REQ-DDB-MCP-002if (line 3017)clew/mcp_server/server.py:3017
3_index_actionstatus—REQ-DDB-MCP-002if (line 3019)clew/mcp_server/server.py:3019
4_index_actionbuild_or_refreshBuild or refresh the active target's clew.db, then expose tier-1.
4 requirementsREQ-DDB-CONFIG-001 REQ-DDB-CONFIG-008 REQ-DDB-MCP-002 REQ-DDB-MCP-004
if (line 3021)clew/mcp_server/server.py:3021
5build_or_refresh_build_subjectThe repository a build call is about.REQ-DDB-MCP-001try (line 2509)clew/mcp_server/server.py:2509
6_build_subjectensure_targetThe active target, resolving one from the client's roots if needed.REQ-DDB-MCP-001if (line 2603)clew/mcp_server/server.py:2608
7ensure_target_target_from_rootsFirst usable repo root among the client's advertised roots.——clew/mcp_server/server.py:2187
8_target_from_roots_rootsRoots advertised by the client, or an empty list.—loop (line 2353)clew/mcp_server/server.py:2353
9_roots_roots_askableWhether this connection can be asked for its roots at all.——clew/mcp_server/server.py:2278
10_roots_askableroots_request_supportedWhether a standalone roots/list request is carriable at this protocol revision.——clew/mcp_server/server.py:2315
11roots_request_supportedserver_request_surfaceThe SDK's server-to-client request surface, or None when it cannot be read.——clew/mcp_server/state.py:155
12roots_request_supportedknown_protocol_versionsProtocol revisions the installed SDK recognises, or empty when unreadable.——clew/mcp_server/state.py:156
13_rootslist———clew/mcp_server/server.py:2287
14listlink———clew/wiki/themes/clew/static/web.js:85
15_target_from_rootsroot_uri_to_pathConvert one MCP root URI into a local directory path.REQ-DDB-MCP-001loop (line 2353)clew/mcp_server/server.py:2354
16ensure_targetadoptMake a repo the active target and expose its query tools.REQ-DDB-MCP-001—clew/mcp_server/server.py:2188
17adoptrepo_indexesCollect every known index of one repository without walking its tree.REQ-DDB-MCP-001—clew/mcp_server/server.py:2125
18repo_indexestarget_forAllocate the Target record for a repo path (pure; no I/O).REQ-DDB-MCP-001—clew/mcp_server/routing.py:163
19target_for_safe_index_nameReduce a declared sub-index name to something safe as a directory component.—if (line 352)clew/mcp_server/state.py:352
20target_forstate_homePer-user state root for built databases and the registry.REQ-DDB-MCP-001—clew/mcp_server/state.py:353
21repo_indexestarget_forAllocate the Target record for a repo path (pure; no I/O).REQ-DDB-MCP-001if (line 169), loop (line 169), if (line 171), if (line 172)clew/mcp_server/routing.py:172
22adopttarget_forAllocate the Target record for a repo path (pure; no I/O).REQ-DDB-MCP-001—clew/mcp_server/server.py:2125
23adopt_sync_tier1Bring tier-1 into line with whether this server knows of any repository.REQ-DDB-MCP-003—clew/mcp_server/server.py:2130
24_sync_tier1register_query_toolsAdd the tier-1 query tools to an MCP server instance.REQ-DDB-MCP-003 REQ-DDB-MCP-004if (line 2070)clew/mcp_server/server.py:2070
25register_query_tools_add_toolRegister one tool, then drop the schema's generated title keys.—loop (line 662)clew/mcp_server/server.py:664
26_add_tool_strip_titlesRemove title keys from a JSON schema, recursively, in place.—loop (line 693)clew/mcp_server/server.py:694
27_strip_titles_strip_titlesRemove title keys from a JSON schema, recursively, in place.—if (line 709), loop (line 717)clew/mcp_server/server.py:718
28_strip_titles_strip_titlesRemove title keys from a JSON schema, recursively, in place.—elif (line 720), loop (line 720)clew/mcp_server/server.py:721
29register_query_tools_answering_with_refreshWrap a synchronous query tool so a stale index is refreshed before it answers.REQ-DDB-MCP-004loop (line 662)clew/mcp_server/server.py:666
30_answering_with_refreshrefusedTag a deliberate refusal so a truncating client still shows the distinction.REQ-DDB-MCP-004catch (line 562)clew/mcp_server/server.py:576
31_answering_with_refresh_take_contextDeclare an injected ctx on a wrapper, outside its schema.REQ-DDB-WIKI-054—clew/mcp_server/server.py:578
32_take_contextlist———clew/mcp_server/server.py:600
33register_query_toolslist———clew/mcp_server/server.py:670
34adoptdb_statusFreshness/identity report for one target's database.
4 requirementsREQ-DDB-CONFIG-006 REQ-DDB-CONFIG-007 REQ-DDB-MCP-001 REQ-DDB-MCP-004
—clew/mcp_server/server.py:2131
35db_status_options_metaWhich precedence tier chose each layered setting this index was built with.REQ-DDB-CONFIG-006—clew/mcp_server/state.py:1181
36_options_meta_meta_sectionOne namespaced build_meta section, read without its key prefix.REQ-DDB-MCP-001—clew/mcp_server/state.py:1062
37_meta_sectionmeta_sectionOne namespaced build_meta section, read without its key prefix.REQ-DDB-MCP-001—clew/mcp_server/state.py:916
38db_statusstated_optionsWhich options the index carries an operator's own statement for.REQ-DDB-CONFIG-006—clew/mcp_server/state.py:1182
39db_statusread_build_signatureRead the build version stamped into a DB, or None if absent/unreadable.REQ-DDB-PIPE-005—clew/mcp_server/state.py:1183
40db_status_source_driftCount indexed source files modified since the database was built.——clew/mcp_server/state.py:1185
41db_status_meta_sectionOne namespaced build_meta section, read without its key prefix.REQ-DDB-MCP-001—clew/mcp_server/state.py:1189
42db_status_bounded_scope_metaBound the stored scope strings a status reply carries.——clew/mcp_server/state.py:1207
43db_status_scope_metaThe scope decision recorded at build time, if any.REQ-DDB-MCP-001—clew/mcp_server/state.py:1207
44_scope_meta_meta_sectionOne namespaced build_meta section, read without its key prefix.REQ-DDB-MCP-001—clew/mcp_server/state.py:936
45db_status_coverage_metaThe index-coverage measurement recorded at build time, if any.REQ-DDB-INDEX-003—clew/mcp_server/state.py:1209
46_coverage_meta_meta_sectionOne namespaced build_meta section, read without its key prefix.REQ-DDB-MCP-001—clew/mcp_server/state.py:1009
47db_status_refresh_metaWhat the last refresh of this index actually cost, if it was measured.REQ-DDB-MCP-004—clew/mcp_server/state.py:1213
48_refresh_meta_meta_sectionOne namespaced build_meta section, read without its key prefix.REQ-DDB-MCP-001—clew/mcp_server/state.py:1037
49db_statuslist———clew/mcp_server/state.py:1222
50db_status_diagnostics_metaWhat the build searched for and did NOT find, counts included when they are zero.REQ-DDB-CONFIG-007—clew/mcp_server/state.py:1226
51_diagnostics_meta_meta_sectionOne namespaced build_meta section, read without its key prefix.REQ-DDB-MCP-001—clew/mcp_server/state.py:1091
52db_status_data_model_metaThe generated data model the repository declares, and what was declined.REQ-DDB-CONFIG-007—clew/mcp_server/state.py:1234
53_data_model_meta_meta_sectionOne namespaced build_meta section, read without its key prefix.REQ-DDB-MCP-001—clew/mcp_server/state.py:1129
54db_statuscode_identityThe code identity the process is actually running.REQ-DDB-MCP-004—clew/mcp_server/state.py:1237
55code_identitysource_fingerprintFingerprint the package source's identity on disk.REQ-DDB-MCP-004—clew/mcp_server/freshness.py:244
56source_fingerprintpackage_source_rootThe installed package's source directory.——clew/mcp_server/freshness.py:168
57code_identitypackage_versionThe package version this process is running.——clew/mcp_server/freshness.py:247
58db_statusnoticesEvery staleness axis currently in play, with the action that clears it.REQ-DDB-MCP-004—clew/mcp_server/state.py:1239
59noticescode_identityThe code identity the process is actually running.REQ-DDB-MCP-004—clew/mcp_server/freshness.py:669
60notices_data_noticeThe data-axis notice, when the sources have drifted.——clew/mcp_server/freshness.py:671
61_data_notice_cost_clauseHuman phrasing for what a refresh of this target last cost.——clew/mcp_server/freshness.py:405
62_cost_clause_humanise_msSpell a millisecond count the way a reader would say it.——clew/mcp_server/freshness.py:325
63_cost_clause_dominant_clauseName the stage that dominated a refresh, from that refresh's own timings.——clew/mcp_server/freshness.py:342
64notices_schema_noticeThe schema-axis notice, when the stamped and expected versions disagree.——clew/mcp_server/freshness.py:672
65notices_partial_noticeThe partial-index notice, when doxygen failed and the C/C++ layer is missing.——clew/mcp_server/freshness.py:673
66notices_derived_noticeThe derived-axis notice, while a fast in-place refresh awaits its full refresh.——clew/mcp_server/freshness.py:674
67notices_code_noticeThe code-axis notice, when the source moved under a running process.——clew/mcp_server/freshness.py:675
68_build_subjectresolve_targetResolve a caller-supplied target string to a known repository.REQ-DDB-MCP-001—clew/mcp_server/server.py:2609
69resolve_target_indexes_forEvery index of the repository a target string names, or None when it names none.REQ-DDB-MCP-001—clew/mcp_server/server.py:1871
70_indexes_forrepo_indexesCollect every known index of one repository without walking its tree.REQ-DDB-MCP-001if (line 1826)clew/mcp_server/server.py:1826
71_indexes_forrepo_indexesCollect every known index of one repository without walking its tree.REQ-DDB-MCP-001—clew/mcp_server/server.py:1830
72resolve_targetlist———clew/mcp_server/server.py:1872
73resolve_targettarget_forAllocate the Target record for a repo path (pure; no I/O).REQ-DDB-MCP-001if (line 1874), if (line 1887)clew/mcp_server/server.py:1887
74resolve_targetunknown_target_errorExplain that a caller-supplied target string resolved to nothing.REQ-DDB-MCP-001if (line 1904)clew/mcp_server/server.py:1904
75resolve_target_background_noteThe background first build a refusal about this index should describe.—if (line 1911)clew/mcp_server/server.py:1912
76resolve_targetunbuilt_refusalThe one message for a query whose index does not exist.REQ-DDB-MCP-001if (line 1911)clew/mcp_server/server.py:1912
77unbuilt_refusalno_index_messageThe sentence every unbuilt-index refusal opens with.REQ-DDB-MCP-003—clew/mcp_server/routing.py:257
78unbuilt_refusallisted_namesRender a bounded list of sub-index names for a sentence.—if (line 260)clew/mcp_server/routing.py:260
79unbuilt_refusallisted_namesRender a bounded list of sub-index names for a sentence.—if (line 263)clew/mcp_server/routing.py:263
80unbuilt_refusaldescribe_declarationOne sentence on a repository's .clew.yaml and whether a build honours it.REQ-DDB-CONFIG-001—clew/mcp_server/routing.py:270
81describe_declaration_parsed_declarationParse a declaration file into (mapping, problem).——clew/declaration.py:726
82resolve_target… 1 not run————
83_build_subjecttarget_forAllocate the Target record for a repo path (pure; no I/O).REQ-DDB-MCP-001—clew/mcp_server/server.py:2619
84_build_subject_sub_index_rejectionWhy this sub-index cannot be built, or None when it can.——clew/mcp_server/server.py:2620
85_sub_index_rejectionfirst_party_sub_indexThe first-party sub-index of a split repository, without walking any vendored tree.REQ-DDB-INDEX-002—clew/mcp_server/server.py:1002
86first_party_sub_indexwhole_repo_scopeThe whole repository as one INPUT root, less only what git ignores.REQ-DDB-CONFIG-001—clew/scope.py:385
87whole_repo_scope_gitignored_pathsPaths the repo's own git configuration ignores.——clew/scope.py:733
88_gitignored_pathsgit_argvOne git argv with every command-valued configuration key disarmed.REQ-DDB-CONFIG-001—clew/scope.py:989
89git_argv_no_ext_diffInsert --no-ext-diff after a diff-family subcommand.REQ-DDB-CONFIG-001—clew/gitenv.py:110
90git_argvlist———clew/gitenv.py:110
91_gitignored_pathsgit_envThe current environment with git's hook-repository overrides removed.REQ-DDB-CONFIG-001try (line 1003)clew/scope.py:1008
92whole_repo_scopelist———clew/scope.py:734
93whole_repo_scopenested_repo_rootsDirectories holding their own git tree anywhere under a repo root.REQ-DDB-CONFIG-001—clew/scope.py:745
94nested_repo_roots_nested_repos_underDirectories holding a .git strictly beneath one declared root.—if (line 845)clew/scope.py:845
95_nested_repos_under_warn_unwalkableReport a directory the nested-repository check could not read.—loop (line 1239)clew/scope.py:1239
96_nested_repos_under_holds_git_treeWhether a directory owns a git tree, as a SUBMODULE or as a clone.—loop (line 1239)clew/scope.py:1241
97_nested_repos_under_skip_dirWhether a directory entry should be skipped outright by the walk.—loop (line 1239)clew/scope.py:1255
98nested_repo_roots_nested_repos_underDirectories holding a .git strictly beneath one declared root.—if (line 847)clew/scope.py:847
99whole_repo_scope_gitignored_pathsPaths the repo's own git configuration ignores.—loop (line 746)clew/scope.py:747
100whole_repo_scope_pruned_dirsDot and cache directories anywhere under a whole-repo root.——clew/scope.py:751
101_pruned_dirs_warn_unwalkableReport a directory the nested-repository check could not read.—loop (line 1055)clew/scope.py:1055
102_pruned_dirs_skip_dirWhether a directory entry should be skipped outright by the walk.—loop (line 1055), if (line 1075)clew/scope.py:1075
103_pruned_dirs_descendableSplit one directory's children into those worth walking and those to exclude.—loop (line 1055)clew/scope.py:1085
104_descendable_is_withinWhether a path is the same as, or inside, another.—loop (line 1117)clew/scope.py:1119
105_descendable_skip_dirWhether a directory entry should be skipped outright by the walk.—loop (line 1117)clew/scope.py:1121
106whole_repo_scope_declaration_noteWhere a declaration was looked for, phrased for a fallback reason.REQ-DDB-CONFIG-001—clew/scope.py:763
107whole_repo_scope_ignore_clauseThe scope reason's clause about ignored paths, true to what git actually answered.——clew/scope.py:764
108whole_repo_scope_vendored_clauseName the indexed trees that look vendored, and how to exclude them.——clew/scope.py:765
109whole_repo_scope_declaration_adviceHow to declare an index scope, in this build's own spelling.REQ-DDB-CONFIG-001—clew/scope.py:768
110first_party_sub_index_under_anyWhether a path is one of, or inside, any of the given roots.——clew/scope.py:387
111first_party_sub_indexnested_repo_rootsDirectories holding their own git tree anywhere under a repo root.REQ-DDB-CONFIG-001—clew/scope.py:387
112first_party_sub_index_first_partyThe first-party SubIndex from a repository's direct nested trees and its ignores.——clew/scope.py:391
113_first_party_own_ignoresOne tree's own gitignored paths, minus anything a child tree already excludes.——clew/scope.py:356
114_own_ignores_under_anyWhether a path is one of, or inside, any of the given roots.——clew/scope.py:334
115first_party_sub_index_gitignored_pathsPaths the repo's own git configuration ignores.——clew/scope.py:391
116_sub_index_rejection_buildable_sub_indexesEvery sub-index name this repository can be asked to build.——clew/mcp_server/server.py:1004
117_buildable_sub_indexesderive_sub_indexesSplit a repository into first-party and per-nested-tree indexes, at any depth.REQ-DDB-INDEX-002—clew/mcp_server/server.py:916
118derive_sub_indexeswhole_repo_scopeThe whole repository as one INPUT root, less only what git ignores.REQ-DDB-CONFIG-001—clew/scope.py:278
119derive_sub_indexes_nested_trees_recursiveEvery nested git tree under one root, at ANY depth.——clew/scope.py:279
120_nested_trees_recursive_under_anyWhether a path is one of, or inside, any of the given roots.——clew/scope.py:202
121_nested_trees_recursivenested_repo_rootsDirectories holding their own git tree anywhere under a repo root.REQ-DDB-CONFIG-001—clew/scope.py:202
122_nested_trees_recursivelist———clew/scope.py:204
123_nested_trees_recursive_gitignored_pathsPaths the repo's own git configuration ignores.—loop (line 205)clew/scope.py:206
124_nested_trees_recursive_nested_trees_recursiveEvery nested git tree under one root, at ANY depth.—loop (line 205)clew/scope.py:207
125derive_sub_indexes_direct_parentThe closest containing root for one nested tree, among a repo's own split.—loop (line 286)clew/scope.py:287
126derive_sub_indexes_gitignored_pathsPaths the repo's own git configuration ignores.——clew/scope.py:305
127derive_sub_indexes_gitignored_pathsPaths the repo's own git configuration ignores.—loop (line 306)clew/scope.py:307
128derive_sub_indexes_first_partyThe first-party SubIndex from a repository's direct nested trees and its ignores.——clew/scope.py:309
129derive_sub_indexes_sub_index_nameName a nested tree by its repo-relative path, safe as a directory component.—loop (line 311)clew/scope.py:315
130derive_sub_indexes_own_ignoresOne tree's own gitignored paths, minus anything a child tree already excludes.—loop (line 311)clew/scope.py:317
131_sub_index_rejection_offered_sub_indexesThe buildable names a refusal should OFFER, rendered for a reader.——clew/mcp_server/server.py:1013
132_offered_sub_indexesderive_sub_indexesSplit a repository into first-party and per-nested-tree indexes, at any depth.REQ-DDB-INDEX-002—clew/mcp_server/server.py:943
133_offered_sub_indexeslist———clew/mcp_server/server.py:943
134build_or_refreshcode_identityThe code identity the process is actually running.REQ-DDB-MCP-004—clew/mcp_server/server.py:2514
135build_or_refreshstale_code_refusalThe refusal a write path owes its caller when this process predates its source.REQ-DDB-MCP-004—clew/mcp_server/server.py:2515
136stale_code_refusalcode_identityThe code identity the process is actually running.REQ-DDB-MCP-004—clew/mcp_server/freshness.py:631
137build_or_refresh_build_lockThe build lock for one repository, allocated on first contention.REQ-DDB-MCP-002—clew/mcp_server/server.py:2518
138build_or_refresh_build_onceBuild one target, skipping when its index is already current.REQ-DDB-CONFIG-008 REQ-DDB-MCP-002—clew/mcp_server/server.py:2519
139_build_oncedb_statusFreshness/identity report for one target's database.
4 requirementsREQ-DDB-CONFIG-006 REQ-DDB-CONFIG-007 REQ-DDB-MCP-001 REQ-DDB-MCP-004
—clew/mcp_server/server.py:2666
140build_or_refreshadoptMake a repo the active target and expose its query tools.REQ-DDB-MCP-001if (line 2549)clew/mcp_server/server.py:2549
141build_or_refresh_activate_tier1Register tier-1 tools and notify the client of the change.REQ-DDB-MCP-003if (line 2553)clew/mcp_server/server.py:2557
142_activate_tier1register_query_toolsAdd the tier-1 query tools to an MCP server instance.REQ-DDB-MCP-003 REQ-DDB-MCP-004—clew/mcp_server/server.py:3100
143build_or_refreshdb_statusFreshness/identity report for one target's database.
4 requirementsREQ-DDB-CONFIG-006 REQ-DDB-CONFIG-007 REQ-DDB-MCP-001 REQ-DDB-MCP-004
—clew/mcp_server/server.py:2559
144_index_actionread_commentsRead the wiki comments waiting for a repository, and mark them read.REQ-DDB-WIKI-054if (line 3032)clew/mcp_server/server.py:3032
145read_commentsensure_targetThe active target, resolving one from the client's roots if needed.REQ-DDB-MCP-001—clew/mcp_server/server.py:2744
146read_commentsresolve_targetResolve a caller-supplied target string to a known repository.REQ-DDB-MCP-001—clew/mcp_server/server.py:2744
147_index_actionlist_targetsEvery known target with its database age and staleness.REQ-DDB-MCP-002—clew/mcp_server/server.py:3033
148list_targets_listing_rowReduce a full status dict to the listing row targets promises.REQ-DDB-MCP-002—clew/mcp_server/server.py:2803
149list_targetsdb_statusFreshness/identity report for one target's database.
4 requirementsREQ-DDB-CONFIG-006 REQ-DDB-CONFIG-007 REQ-DDB-MCP-001 REQ-DDB-MCP-004
—clew/mcp_server/server.py:2803
150list_targets_top_level_namesThe derived names that are not nested inside another derived name.—loop (line 2805), loop (line 2807)clew/mcp_server/server.py:2807
151list_targets_buildable_rowA row for a sub-index that could be built but has not been.—loop (line 2805), loop (line 2807)clew/mcp_server/server.py:2810
152list_targets_nested_underHow many recorded names sit under one top-level name.—loop (line 2805), loop (line 2807)clew/mcp_server/server.py:2810
153list_targets_capped_listingTrim a listing to the cap, disclosing what was dropped.——clew/mcp_server/server.py:2811

Functions

102 functions

This diagram as Mermaid · PlantUML · Graphviz DOT

Quick views

102 functions, each with its quick view