@niroai/niro 0.17.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (177) hide show
  1. package/CHANGELOG.md +136 -0
  2. package/README.md +123 -302
  3. package/bin/niro.js +12 -1
  4. package/docs/agent-antigravity.md +37 -0
  5. package/docs/agent-claude-code.md +48 -0
  6. package/docs/agent-claude-desktop.md +47 -0
  7. package/docs/agent-cline.md +42 -0
  8. package/docs/agent-codex.md +45 -0
  9. package/docs/agent-copilot-cli.md +42 -0
  10. package/docs/agent-cursor.md +44 -0
  11. package/docs/agent-factory.md +42 -0
  12. package/docs/agent-gemini-cli.md +42 -0
  13. package/docs/agent-goose.md +42 -0
  14. package/docs/agent-kiro.md +37 -0
  15. package/docs/agent-opencode.md +37 -0
  16. package/docs/agent-vscode.md +45 -0
  17. package/docs/agent-windsurf.md +38 -0
  18. package/docs/answer-shapes.md +69 -0
  19. package/docs/builds-and-updates.md +68 -0
  20. package/docs/cloud-README.md +372 -0
  21. package/docs/configuring-a-folder.md +51 -0
  22. package/docs/connect-ci.md +24 -0
  23. package/docs/connect-overview.md +20 -0
  24. package/docs/connect-review-bots.md +17 -0
  25. package/docs/connect-team-server.md +12 -0
  26. package/docs/connect-terminal.md +49 -0
  27. package/docs/connect-web-agents.md +9 -0
  28. package/docs/connect-your-ai-assistant.md +59 -175
  29. package/docs/coverage-audit-and-consent.md +51 -0
  30. package/docs/evaluate-what-niro-did.md +271 -0
  31. package/docs/faq-assistants-and-mcp.md +122 -0
  32. package/docs/faq-feedback-and-receipts.md +33 -0
  33. package/docs/faq-indexing.md +127 -0
  34. package/docs/faq-install-and-setup.md +103 -0
  35. package/docs/faq-licence-and-plans.md +86 -0
  36. package/docs/faq-login-and-account.md +69 -0
  37. package/docs/faq-offline.md +34 -0
  38. package/docs/faq-performance.md +33 -0
  39. package/docs/faq-privacy-and-security.md +113 -0
  40. package/docs/faq-uninstall.md +47 -0
  41. package/docs/faq-updates.md +59 -0
  42. package/docs/faq-worktrees-and-branches.md +59 -0
  43. package/docs/faq-wrong-or-missing-answers.md +275 -0
  44. package/docs/hosted-only.md +33 -0
  45. package/docs/how-the-graph-works.md +47 -0
  46. package/docs/index.md +157 -0
  47. package/docs/licence-and-plans.md +72 -0
  48. package/docs/lifecycle-debug.md +48 -0
  49. package/docs/lifecycle-onboarding.md +32 -0
  50. package/docs/lifecycle-overview.md +77 -0
  51. package/docs/lifecycle-plan-and-design.md +44 -0
  52. package/docs/lifecycle-review.md +30 -0
  53. package/docs/lifecycle-security-and-privacy.md +35 -0
  54. package/docs/lifecycle-test.md +28 -0
  55. package/docs/lifecycle-write-code.md +35 -0
  56. package/docs/llms-full.txt +8015 -0
  57. package/docs/llms.txt +126 -0
  58. package/docs/playbook-add-a-feature.md +108 -0
  59. package/docs/playbook-change-safely.md +93 -0
  60. package/docs/playbook-data-and-events.md +107 -0
  61. package/docs/playbook-debug-after-a-change.md +96 -0
  62. package/docs/playbook-debug-config.md +95 -0
  63. package/docs/playbook-debug-exception.md +124 -0
  64. package/docs/playbook-debug-failing-service-call.md +119 -0
  65. package/docs/playbook-debug-slow-path.md +80 -0
  66. package/docs/playbook-debug-wrong-value.md +137 -0
  67. package/docs/playbook-onboard.md +95 -0
  68. package/docs/playbook-review-a-change.md +72 -0
  69. package/docs/playbook-test-a-change.md +73 -0
  70. package/docs/reference-cli.md +113 -0
  71. package/docs/reference-config-files.md +42 -0
  72. package/docs/reference-engine-commands.md +56 -0
  73. package/docs/reference-environment-variables.md +89 -0
  74. package/docs/reference-exit-codes.md +67 -0
  75. package/docs/reference-limits.md +75 -0
  76. package/docs/reference-mcp-tools.md +326 -0
  77. package/docs/reference-messages.md +180 -0
  78. package/docs/secrets-and-masking.md +48 -0
  79. package/docs/supported-c.md +130 -0
  80. package/docs/supported-cpp.md +157 -0
  81. package/docs/supported-csharp.md +211 -0
  82. package/docs/supported-go.md +258 -0
  83. package/docs/supported-java.md +226 -0
  84. package/docs/supported-javascript.md +223 -0
  85. package/docs/supported-kotlin.md +124 -0
  86. package/docs/supported-overview.md +89 -0
  87. package/docs/supported-php.md +157 -0
  88. package/docs/supported-python.md +224 -0
  89. package/docs/supported-ruby.md +162 -0
  90. package/docs/supported-rust.md +150 -0
  91. package/docs/supported-swift.md +133 -0
  92. package/docs/supported-typescript.md +220 -0
  93. package/docs/tokens-speed-and-accuracy.md +99 -0
  94. package/docs/troubleshooting.md +42 -0
  95. package/docs/uninstall.md +74 -0
  96. package/docs/what-leaves-your-machine.md +71 -0
  97. package/docs/where-things-are-stored.md +59 -0
  98. package/docs/worktrees-and-branches.md +55 -0
  99. package/package.json +5 -3
  100. package/src/commands/add-repo.js +5 -0
  101. package/src/commands/auditSend.js +67 -0
  102. package/src/commands/build.js +6 -0
  103. package/src/commands/docsSend.js +73 -0
  104. package/src/commands/engine.js +120 -0
  105. package/src/commands/engineRoutes.js +105 -0
  106. package/src/commands/guide.js +254 -0
  107. package/src/commands/init.js +6 -2
  108. package/src/commands/initLocal.js +96 -0
  109. package/src/commands/journalSend.js +47 -0
  110. package/src/commands/login.js +89 -12
  111. package/src/commands/mcp.js +22 -6
  112. package/src/commands/plan.js +99 -0
  113. package/src/commands/repoPush.js +33 -0
  114. package/src/commands/requestIntegration.js +38 -0
  115. package/src/commands/share.js +56 -0
  116. package/src/commands/start.js +451 -371
  117. package/src/commands/status.js +57 -0
  118. package/src/commands/takeover.js +6 -0
  119. package/src/commands/uninstall.js +180 -0
  120. package/src/commands/upgrade.js +38 -8
  121. package/src/commands/watch.js +420 -6
  122. package/src/index.js +174 -3
  123. package/src/lib/agentApi.js +32 -1
  124. package/src/lib/api.js +20 -6
  125. package/src/lib/auditUpload.js +293 -0
  126. package/src/lib/branchDrift.js +149 -0
  127. package/src/lib/choose.js +116 -0
  128. package/src/lib/cloudGuard.js +74 -0
  129. package/src/lib/credentials.js +2 -2
  130. package/src/lib/docsMarked.js +55 -0
  131. package/src/lib/docsState.js +213 -0
  132. package/src/lib/docsUpload.js +481 -0
  133. package/src/lib/engine.js +619 -0
  134. package/src/lib/folderSync.js +2 -1
  135. package/src/lib/graphCheck.js +40 -0
  136. package/src/lib/guide.js +293 -0
  137. package/src/lib/guideSearch.js +252 -0
  138. package/src/lib/integrationRequest.js +89 -0
  139. package/src/lib/journalUpload.js +147 -0
  140. package/src/lib/languages.js +129 -0
  141. package/src/lib/lease.js +375 -0
  142. package/src/lib/localBuild.js +285 -0
  143. package/src/lib/localEngine.js +210 -0
  144. package/src/lib/localOnboard.js +124 -0
  145. package/src/lib/localWorktrees.js +243 -0
  146. package/src/lib/machineCheck.js +58 -0
  147. package/src/lib/mcpClients.js +10 -1
  148. package/src/lib/migrationNotice.js +118 -0
  149. package/src/lib/modelFetch.js +153 -0
  150. package/src/lib/nestedOutput.js +23 -9
  151. package/src/lib/onboardingLog.js +34 -0
  152. package/src/lib/planUsage.js +165 -0
  153. package/src/lib/progressBar.js +46 -0
  154. package/src/lib/prompt.js +1 -1
  155. package/src/lib/redact.js +155 -0
  156. package/src/lib/release.js +33 -0
  157. package/src/lib/repoPush.js +495 -0
  158. package/src/lib/secret.js +1 -1
  159. package/src/lib/service.js +372 -63
  160. package/src/lib/shareCode.js +367 -0
  161. package/src/lib/shareExclusions.js +114 -0
  162. package/src/lib/shareFiles.js +129 -0
  163. package/src/lib/spinner.js +9 -5
  164. package/src/lib/watchDaemon.js +33 -10
  165. package/src/lib/watchState.js +12 -1
  166. package/src/lib/windowsPaths.js +67 -0
  167. package/src/mcp/lineCheck.js +382 -0
  168. package/src/mcp/lineName.js +92 -0
  169. package/src/mcp/localBackend.js +751 -0
  170. package/src/mcp/localMode.js +383 -0
  171. package/src/mcp/localSkill.js +189 -0
  172. package/src/mcp/server.js +610 -79
  173. package/src/mcp/setup.js +519 -131
  174. package/src/mcp/shellSearchHook.js +509 -0
  175. package/src/mcp/teardown.js +173 -91
  176. package/src/mcp/usingNiro.js +39 -0
  177. package/docs/working-on-branches.md +0 -162
@@ -0,0 +1,326 @@
1
+ # MCP tools reference
2
+
3
+ <!-- GENERATED by scripts/gen-mcp-tools-doc.js from the engine's own tools/list answer. Do not edit by hand: run the script again. -->
4
+ <!-- source: niro-local MCP server tools/list, answered by niro-local source at a38ac9c6, run from that source; tools registered in src/niro_local/mcp/server.py build_server -->
5
+
6
+ These are the tools a coding agent sees when it is connected to Niro. The list below is copied from what the engine itself serves, so it matches what your agent gets. Each tool's description is quoted exactly as the engine gives it to agents, so its wording is the engine's own.
7
+
8
+ **A few things that hold for every tool:**
9
+
10
+ - **Answers are text.** They are written for an agent to read, not as JSON fields.
11
+ - **Every answer starts with a line saying where it came from:** "Answered from the local graph on this machine (niro-local)."
12
+ <!-- source: niro-cli src/mcp/localBackend.js:189 -->
13
+ - **The tools answer for one folder:** the one your agent's session started in. To ask about another folder, run `niro ask` from that folder.
14
+ <!-- source: niro-cli src/mcp/localMode.js:61-64 -->
15
+ - **`purpose` changes the shape of an answer.** Many tools take it. The values are LOCATE, ORIENT, COMPREHEND, TRACE, DEBUG, PROPAGATE, ASSESS_RISK, VERIFY, IMPLEMENT, AUDIT and SCOUT:
16
+ - VERIFY gives names only;
17
+ - ASSESS_RISK gives counts;
18
+ - COMPREHEND and DEBUG add the source code of the method asked about.
19
+ <!-- source: niro-local src/niro_local/mcp/purpose.py:26-58 -->
20
+ - **Two tools are off in this release:** `find_reusable_code` and `find_known_issues`. They need LLM documentation, which this release does not include, so they are not in the list.
21
+ <!-- source: niro-local src/niro_local/reuse/__init__.py:37-40 (IN_THIS_RELEASE = False) -->
22
+ - **The engine offers no MCP resources or prompts,** only these tools.
23
+ <!-- source: niro-local src/niro_local/mcp (no resource or prompt registration) -->
24
+ - **While a full build rewrites the graph,** only `get_index_status`, `code_grep` and `get_source_code` answer. The others say a build is running.
25
+ <!-- source: niro-local src/niro_local/mcp/freshness.py:309 (GATE_EXEMPT) -->
26
+
27
+ You can try any tool from the terminal: `niro ask <tool> key=value`. With no tool named, `niro ask` lists them.
28
+ <!-- source: niro-cli src/commands/engineRoutes.js:28 -->
29
+
30
+ For the limits on answer sizes and page sizes, see [reference-limits.md](reference-limits.md).
31
+
32
+ ## The tools
33
+
34
+ - [`resolve_name`](#resolve_name)
35
+ - [`get_call_chain`](#get_call_chain)
36
+ - [`get_reverse_call_chain`](#get_reverse_call_chain)
37
+ - [`get_blast_radius`](#get_blast_radius)
38
+ - [`get_impact_analysis`](#get_impact_analysis)
39
+ - [`get_class_structure`](#get_class_structure)
40
+ - [`list_types`](#list_types)
41
+ - [`find_api_endpoints`](#find_api_endpoints)
42
+ - [`get_exception_flow`](#get_exception_flow)
43
+ - [`list_events`](#list_events)
44
+ - [`get_event_producers_and_handlers`](#get_event_producers_and_handlers)
45
+ - [`find_orphaned_events`](#find_orphaned_events)
46
+ - [`find_outbound_http_calls`](#find_outbound_http_calls)
47
+ - [`get_service_topology`](#get_service_topology)
48
+ - [`find_handler`](#find_handler)
49
+ - [`list_data_resources`](#list_data_resources)
50
+ - [`get_data_resource_usage`](#get_data_resource_usage)
51
+ - [`get_index_status`](#get_index_status)
52
+ - [`code_grep`](#code_grep)
53
+ - [`get_source_code`](#get_source_code)
54
+ - [`mark_task_complete`](#mark_task_complete)
55
+
56
+ ### resolve_name
57
+
58
+ List what a name matches in the graph, at most 25. Not a step before other tools: they take a short name themselves and say when it matched several things. Use this to choose among matches.
59
+
60
+ | Input | Type | Required | What it is |
61
+ |---|---|---|---|
62
+ | `entity_fqn` | string | yes | |
63
+
64
+ ### get_call_chain
65
+
66
+ Returns the call chain (callers, callees, or both) for a method. Accepts method_fqn (partial auto-resolves) or http_path. direction is both (default), callers or callees; scope='direct' (default) is one level, scope='transitive' with transitive_depth 2 or 3 goes further.
67
+
68
+ | Input | Type | Required | What it is |
69
+ |---|---|---|---|
70
+ | `method_fqn` | string | no | |
71
+ | `http_path` | string | no | |
72
+ | `direction` | string | no | |
73
+ | `scope` | string | no | |
74
+ | `transitive_depth` | integer | no | |
75
+ | `max_depth` | integer | no | |
76
+ | `depth` | integer | no | |
77
+ | `include_all` | boolean | no | |
78
+ | `from_line` | integer | no | |
79
+ | `purpose` | string | no | Why you are asking, which picks the answer's shape: VERIFY names only, ASSESS_RISK counts, PROPAGATE a flat list with file:line, ORIENT a summary (class structure), COMPREHEND or DEBUG adds source. Also accepted: LOCATE, TRACE, IMPLEMENT, AUDIT, SCOUT. Default: TRACE. |
80
+ | `include_source_code` | boolean | no | When true, the answer carries the numbered source of the method asked about, whole up to 150 lines (a longer one is marked as cut); listed methods carry their file and line only. On by default for purpose COMPREHEND or DEBUG; false turns it off. |
81
+ | `answer` | string | no | A shorter answer: exists (yes or no, with the total), count (numbers only), locations (file:line and exact id per entry, no code), names (one name per line). Use it when that is all you need; leave it out for the full answer. |
82
+
83
+ ### get_reverse_call_chain
84
+
85
+ Returns all callers (upstream) for a method or class. Accepts method_fqn, class_fqn, or http_path. For class-level impact use class_fqn — finds callers of all callable methods in one call. Up to 300 callers per answer; limit and offset page them.
86
+
87
+ | Input | Type | Required | What it is |
88
+ |---|---|---|---|
89
+ | `method_fqn` | string | no | |
90
+ | `http_path` | string | no | |
91
+ | `scope` | string | no | |
92
+ | `transitive_depth` | integer | no | |
93
+ | `max_depth` | integer | no | |
94
+ | `depth` | integer | no | |
95
+ | `include_all` | boolean | no | |
96
+ | `limit` | integer | no | |
97
+ | `offset` | integer | no | |
98
+ | `from_line` | integer | no | |
99
+ | `purpose` | string | no | Why you are asking, which picks the answer's shape: VERIFY names only, ASSESS_RISK counts, PROPAGATE a flat list with file:line, ORIENT a summary (class structure), COMPREHEND or DEBUG adds source. Also accepted: LOCATE, TRACE, IMPLEMENT, AUDIT, SCOUT. Default: PROPAGATE. |
100
+ | `include_source_code` | boolean | no | When true, the answer carries the numbered source of the method asked about, whole up to 150 lines (a longer one is marked as cut); listed methods carry their file and line only. On by default for purpose COMPREHEND or DEBUG; false turns it off. |
101
+ | `answer` | string | no | A shorter answer: exists (yes or no, with the total), count (numbers only), locations (file:line and exact id per entry, no code), names (one name per line). Use it when that is all you need; leave it out for the full answer. |
102
+
103
+ ### get_blast_radius
104
+
105
+ Returns the full blast radius for a code change: both upstream callers that break AND downstream callees that receive different input. Seeds can be a method, class, HTTP endpoint, or event. Default direction='both', depth 3. For coupling through a shared data resource use get_data_resource_usage. Single call, no chaining needed.
106
+
107
+ | Input | Type | Required | What it is |
108
+ |---|---|---|---|
109
+ | `method_fqn` | string | no | |
110
+ | `method_fqns` | list of string | no | Several methods analysed as ONE change, in one call. |
111
+ | `class_fqn` | string | no | |
112
+ | `http_path` | string | no | |
113
+ | `event_fqn` | string | no | Event name, event_source or topic; seeds every method that triggers, handles or registers for it. |
114
+ | `depth` | integer | no | Levels to walk, 1 to 5. Default 3. |
115
+ | `direction` | string | no | both (default), upstream (callers), downstream (callees). |
116
+ | `from_line` | integer | no | |
117
+ | `purpose` | string | no | Why you are asking, which picks the answer's shape: VERIFY names only, ASSESS_RISK counts, PROPAGATE a flat list with file:line, ORIENT a summary (class structure), COMPREHEND or DEBUG adds source. Also accepted: LOCATE, TRACE, IMPLEMENT, AUDIT, SCOUT. Default: ASSESS_RISK. |
118
+ | `include_source_code` | boolean | no | When true, the answer carries the source (numbered lines: the whole of the method asked about up to 150 lines, the first 12 of each other method; a longer method is marked as cut) of the method asked about and of up to 20 of the methods that depend on it or that it depends on. Purpose COMPREHEND or DEBUG alone adds only the method's own source. |
119
+ | `data_resource_fqn` | string | no | |
120
+ | `include_data_coupling` | boolean | no | |
121
+ | `include_http_candidates` | boolean | no | Also include CALLS_HTTP_CANDIDATE callers/callees — HTTP calls whose target base URL could not be resolved, so the method is one of several plausible targets rather than a confirmed one. Always shown in a separate section labeled inferred, never mixed into the confirmed cross-service list. Default true. |
122
+ | `answer` | string | no | A shorter answer: exists (yes or no, with the total), count (numbers only), locations (file:line and exact id per entry, no code), names (one name per line). Use it when that is all you need; leave it out for the full answer. |
123
+
124
+ ### get_impact_analysis
125
+
126
+ Analyzes what breaks if you change a method, class, HTTP endpoint, or event. Returns upstream callers across service boundaries (HTTP/events). Default direction='upstream'. For a data resource (firestore collection, SQL table, S3 bucket) use get_data_resource_usage. Single call — no chaining needed.
127
+
128
+ | Input | Type | Required | What it is |
129
+ |---|---|---|---|
130
+ | `method_fqn` | string | no | |
131
+ | `method_fqns` | list of string | no | Several methods analysed as ONE change, in one call. |
132
+ | `class_fqn` | string | no | |
133
+ | `http_path` | string | no | |
134
+ | `event_fqn` | string | no | Event name, event_source or topic; seeds every method that triggers, handles or registers for it. |
135
+ | `depth` | integer | no | Levels to walk, 1 to 5. Default 3. |
136
+ | `direction` | string | no | upstream (default, callers), downstream (callees), both. |
137
+ | `from_line` | integer | no | |
138
+ | `purpose` | string | no | Why you are asking, which picks the answer's shape: VERIFY names only, ASSESS_RISK counts, PROPAGATE a flat list with file:line, ORIENT a summary (class structure), COMPREHEND or DEBUG adds source. Also accepted: LOCATE, TRACE, IMPLEMENT, AUDIT, SCOUT. Default: ASSESS_RISK. |
139
+ | `include_source_code` | boolean | no | When true, the answer carries the source (numbered lines: the whole of the method asked about up to 150 lines, the first 12 of each other method; a longer method is marked as cut) of the method asked about and of up to 20 of the methods that depend on it or that it depends on. Purpose COMPREHEND or DEBUG alone adds only the method's own source. |
140
+ | `data_resource_fqn` | string | no | |
141
+ | `include_data_coupling` | boolean | no | |
142
+ | `include_http_candidates` | boolean | no | Also include CALLS_HTTP_CANDIDATE callers/callees — HTTP calls whose target base URL could not be resolved, so the method is one of several plausible targets rather than a confirmed one. Always shown in a separate section labeled inferred, never mixed into the confirmed cross-service list. Default true. |
143
+ | `answer` | string | no | A shorter answer: exists (yes or no, with the total), count (numbers only), locations (file:line and exact id per entry, no code), names (one name per line). Use it when that is all you need; leave it out for the full answer. |
144
+
145
+ ### get_class_structure
146
+
147
+ One type's methods, constructors, fields, constants, and what it extends or implements.
148
+
149
+ | Input | Type | Required | What it is |
150
+ |---|---|---|---|
151
+ | `class_fqn` | string | yes | |
152
+ | `from_line` | integer | no | |
153
+ | `purpose` | string | no | Why you are asking, which picks the answer's shape: VERIFY names only, ASSESS_RISK counts, PROPAGATE a flat list with file:line, ORIENT a summary (class structure), COMPREHEND or DEBUG adds source. Also accepted: LOCATE, TRACE, IMPLEMENT, AUDIT, SCOUT. Default: COMPREHEND. |
154
+ | `answer` | string | no | A shorter answer: exists (yes or no, with the total), count (members by kind), locations (file:line and exact id per member), names (one member per line). Leave it out for the full answer. |
155
+
156
+ ### list_types
157
+
158
+ Every class, interface and enum in this project, by name, with the file each lives in. Use it to see what the codebase contains before asking about anything in particular.
159
+
160
+ | Input | Type | Required | What it is |
161
+ |---|---|---|---|
162
+ | `kind` | string | no | |
163
+ | `limit` | integer | no | |
164
+ | `offset` | integer | no | |
165
+
166
+ ### find_api_endpoints
167
+
168
+ Returns the HTTP endpoints (REST APIs) this project declares and exposes. Use '/' as path_pattern for all of them, or a substring of a path to narrow it. Remote methods and sockets that are not plain HTTP (gRPC, WebSocket, XML-RPC, Go net/rpc, SignalR) are listed too, each marked with its protocol.
169
+
170
+ | Input | Type | Required | What it is |
171
+ |---|---|---|---|
172
+ | `path_pattern` | string | no | |
173
+ | `service_filter` | string | no | Optional: filter by service name (e.g., 'billing-svc'). Keeps a route only when the path of the file of the method that HANDLES it, or that method's repository id, contains this text, ignoring case: it names the service that serves the route. |
174
+ | `limit` | integer | no | |
175
+ | `offset` | integer | no | |
176
+ | `protocol` | string | no | Optional: keep only one protocol: 'http' (plain HTTP), or 'grpc', 'websocket', 'xmlrpc', 'netrpc', 'signalr'. Leave it out for every protocol; a line that is not plain HTTP ends with its protocol in brackets, and a remote method call shows the method in place of the path (RPC shipping.quote). |
177
+
178
+ ### get_exception_flow
179
+
180
+ Which exceptions can escape a method, and where they are thrown and caught. Reach for it before writing a caller's error handling, or to find who would have to handle a new checked exception.
181
+
182
+ | Input | Type | Required | What it is |
183
+ |---|---|---|---|
184
+ | `method_fqn` | string | yes | |
185
+ | `depth` | integer | no | |
186
+ | `direction` | string | no | 'downstream' (default): what escapes this method. 'upstream': which callers must handle or declare exception_type. |
187
+ | `exception_type` | string | no | For direction=upstream: the exception type (simple or qualified name) to trace up the callers. |
188
+ | `from_line` | integer | no | |
189
+ | `purpose` | string | no | Why you are asking, which picks the answer's shape: VERIFY names only, ASSESS_RISK counts, PROPAGATE a flat list with file:line, ORIENT a summary (class structure), COMPREHEND or DEBUG adds source. Also accepted: LOCATE, TRACE, IMPLEMENT, AUDIT, SCOUT. Default: COMPREHEND. |
190
+ | `include_source_code` | boolean | no | When true, the answer ends with the method's own source (numbered lines: the whole of the method asked about up to 150 lines, the first 12 of each other method; a longer method is marked as cut). On by default for purpose COMPREHEND or DEBUG; false turns it off. |
191
+
192
+ ### list_events
193
+
194
+ Every event this project publishes or subscribes to, with how many places do each. Use it to see what moves through the system without a direct call.
195
+
196
+ | Input | Type | Required | What it is |
197
+ |---|---|---|---|
198
+ | `event_source_pattern` | string | no | |
199
+ | `event_type` | string | no | |
200
+ | `limit` | integer | no | |
201
+ | `offset` | integer | no | |
202
+
203
+ ### get_event_producers_and_handlers
204
+
205
+ For one event, named by its topic or its full name, who publishes it and who handles it. Use it before changing either side.
206
+
207
+ | Input | Type | Required | What it is |
208
+ |---|---|---|---|
209
+ | `name` | string | no | |
210
+ | `type` | string | no | |
211
+ | `from_line` | integer | no | |
212
+
213
+ ### find_orphaned_events
214
+
215
+ Events with only one side: published and nothing listens, or listened for and nothing publishes. Each is either a real gap or a name that does not match.
216
+
217
+ | Input | Type | Required | What it is |
218
+ |---|---|---|---|
219
+ | `limit` | integer | no | |
220
+ | `offset` | integer | no | |
221
+
222
+ ### find_outbound_http_calls
223
+
224
+ Returns the outbound HTTP calls this project makes to other services, and where they land when the address could be worked out. Use it to see what a folder depends on over the network before changing either end. Calls that are not plain HTTP (gRPC, WebSocket, XML-RPC, Go net/rpc, SignalR) are listed too, each marked with its protocol.
225
+
226
+ | Input | Type | Required | What it is |
227
+ |---|---|---|---|
228
+ | `path_pattern` | string | no | |
229
+ | `service_filter` | string | no | Optional: filter by calling service name (e.g., 'orders-svc'). Keeps a call only when the path of the file that MAKES it contains this text (case-sensitive), so it names the calling service, never the service called. To find calls into a service, leave it out and look at where each call lands. |
230
+ | `limit` | integer | no | |
231
+ | `offset` | integer | no | |
232
+ | `protocol` | string | no | Optional: keep only one protocol: 'http' (plain HTTP), or 'grpc', 'websocket', 'xmlrpc', 'netrpc', 'signalr'. Leave it out for every protocol; a line that is not plain HTTP ends with its protocol in brackets, and a remote method call shows the method in place of the path (RPC shipping.quote). |
233
+
234
+ ### get_service_topology
235
+
236
+ Shows which folder of this project calls which, over HTTP, with the routes involved. Use it to get the shape of the system before looking at any one part of it.
237
+
238
+ | Input | Type | Required | What it is |
239
+ |---|---|---|---|
240
+ | `from_line` | integer | no | |
241
+
242
+ ### find_handler
243
+
244
+ Given a method, shows what answers the HTTP calls it makes. Use it when a call leaves the code you are reading and you need the code at the other end.
245
+
246
+ | Input | Type | Required | What it is |
247
+ |---|---|---|---|
248
+ | `fqn` | string | no | |
249
+ | `from_line` | integer | no | |
250
+ | `relationship_type` | string | no | Filter by edge type (e.g., CALLS_HTTP, CALLS_HTTP_CANDIDATE, TRIGGERS_EVENT, CALLS). Omit to return all handler relationships. |
251
+ | `include_http_candidates` | boolean | no | Also return CALLS_HTTP_CANDIDATE handlers: HTTP calls whose target base URL could not be resolved. Always labeled inferred and listed separately. Default true. |
252
+ | `purpose` | string | no | Why you are asking, which picks the answer's shape: VERIFY names only, ASSESS_RISK counts, PROPAGATE a flat list with file:line, ORIENT a summary (class structure), COMPREHEND or DEBUG adds source. Also accepted: LOCATE, TRACE, IMPLEMENT, AUDIT, SCOUT. Default: LOCATE. |
253
+ | `fqns` | list of string | no | Array of method FQNs for batch handler lookup. |
254
+
255
+ ### list_data_resources
256
+
257
+ Every database, cache or queue this project touches, with how many places touch each. Use it to see what the code stores before asking about any one of them. A cache key the code builds at run time is listed under its fixed start, marked (rest at run time). A stored procedure the code calls is listed with the kind procedure.
258
+
259
+ | Input | Type | Required | What it is |
260
+ |---|---|---|---|
261
+ | `limit` | integer | no | |
262
+ | `offset` | integer | no | |
263
+
264
+ ### get_data_resource_usage
265
+
266
+ What reads, writes or deletes one store. Give the plain name, such as 'orders', or the full 'mongodb:collection:orders'. Use it before changing a table or collection, to see who depends on it. A cache key built at run time is named by its fixed start, such as 'stock:'. A method whose SQL is in its annotation (@Query, @SqlQuery) is listed itself.
267
+
268
+ | Input | Type | Required | What it is |
269
+ |---|---|---|---|
270
+ | `resource_fqn` | string | yes | |
271
+ | `from_line` | integer | no | |
272
+
273
+ ### get_index_status
274
+
275
+ What is indexed for this folder, by kind. Use it when an answer looks empty or out of date, or to learn whether a folder that is not indexed can be.
276
+
277
+ It takes no inputs.
278
+
279
+ ### code_grep
280
+
281
+ Regex/literal search inside source file contents (lines, not file names). Supports match_mode (exact\|regex), case_sensitive, single or batch patterns. Returns matching file paths and line numbers. For multiple terms use 'patterns' array or regex alternation (foo\|bar). Each match also names the method_fqn and class_fqn that enclose it when the graph knows the line: pass method_fqn straight to get_blast_radius before changing that code, no second lookup needed. For class declarations by name use get_class_structure, not this tool. Searches the files the build reads plus config, build and text files (.yml, .json, .properties, .xml, .sql, .md, Dockerfile, .tf and the like), with secrets in those masked, source first. A PARTIAL answer gives continue_from to search the rest. 50 files per page by default: use limit and offset for more.
282
+
283
+ | Input | Type | Required | What it is |
284
+ |---|---|---|---|
285
+ | `pattern` | string | no | |
286
+ | `patterns` | list of string | no | |
287
+ | `path_pattern` | string | no | |
288
+ | `max_matches_per_file` | integer | no | |
289
+ | `match_mode` | string | no | |
290
+ | `case_sensitive` | boolean | no | |
291
+ | `limit` | integer | no | |
292
+ | `offset` | integer | no | |
293
+ | `continue_from` | integer | no | |
294
+ | `answer` | string | no | A shorter answer: exists (yes or no, with the total), count (numbers only), locations (file:line and enclosing method fqn per hit), names (the methods holding a hit), match (only the text the pattern matched). Leave it out for the full answer. |
295
+
296
+ ### get_source_code
297
+
298
+ Read source code for one or more files. Single mode: pass source_id with optional line range, or fqn for a method or class. Batch mode: pass 'sources' array to fetch multiple snippets in one call, much more efficient than separate calls when tracing execution paths. Accepts full paths or partial file names. Only files inside this worktree that the build reads, plus the config, build and text files code_grep searches, with secrets masked.
299
+
300
+ | Input | Type | Required | What it is |
301
+ |---|---|---|---|
302
+ | `source_id` | string | no | |
303
+ | `fqn` | string | no | |
304
+ | `target` | string | no | |
305
+ | `start_line` | integer | no | |
306
+ | `end_line` | integer | no | |
307
+ | `sources` | list of object or string | no | |
308
+ | `entity_fqns` | list of string | no | |
309
+
310
+ ### mark_task_complete
311
+
312
+ BEFORE YOU CALL THIS after changing code: for every method the task changed, and every MyBatis mapper statement it changed (a statement in mapper XML is its mapper interface method of the same id), call get_blast_radius on that method and check each caller it lists against the change: does the caller still get what it expects, and does it read a value the change now blanks, drops or reshapes? Do this even when the change looks local. Signal the end of a task and get back a one-line receipt saying what niro-local answered and what that replaced. Call it once at the end of every turn in which you either asked niro-local anything, or read, searched or edited this project's source with your own tools. A turn where you never asked it matters just as much to report: set searched_code_natively to true in that case. SHOW THE RECEIPT: when the answer is a line starting with '[NIRO-CLI]', reproduce it as the very last line of your reply, on its own line, wrapped in single backticks so it reads as a message from the tool rather than as your own prose. The backticks are the only thing you may add: the text between them must be character for character what came back. Do not reword it, expand it, or add your own commentary about how useful it was. If nothing comes back, print nothing. A reply without the line is unfinished: it is how the person sees what these tools did. Never write the line yourself: its numbers are measured by this server, so yours would be false. niro_helpfulness says whether niro-local's answers helped: helpful, partial, not_helpful, or not_used when you never asked it. task_outcome says whether the work itself finished: succeeded, partial or failed. A turn where it let you down is the most useful one to report. niro_did and without_niro_extra_tool_calls are required: the first is what the person reads, the second is the 'instead of ~N searches' part of the line, and 0 is a valid answer.
313
+
314
+ | Input | Type | Required | What it is |
315
+ |---|---|---|---|
316
+ | `niro_did` | string | yes | DISPLAY ONLY: this is the line the DEVELOPER sees at the end of the task. Write it in niro-local's voice, not yours. One clause, MAXIMUM 70 CHARACTERS, starting with a past-tense verb, saying what niro-local found for the user this turn and what finding it with grep and file reads would have taken. Name concrete things the tools actually returned: counts of callers, files, services, endpoints, events. Add the contrast only when it is factual, e.g. 'that a grep would have missed', 'across 8 files', 'in 3 services'. FORBIDDEN: adjectives of value (powerful, invaluable, huge, quickly); any claim about time or money saved; any claim about how good niro-local is; tool names; source code; file paths; praise. State the finding and let the reader draw the conclusion. GOOD: 'Mapped 29 callers across 8 files that a grep would have missed' \| 'Found 2 cross-service HTTP callers behind an unresolved base URL' \| 'Traced the write path to 3 services sharing one collection' \| 'Confirmed the 29-caller list was complete' BAD: 'niro-local brilliantly uncovered hidden dependencies' (praise) \| 'Saved you 20 minutes' (time claim) \| 'get_blast_radius returned 29 callers' (tool name) \| 'Would have missed the callers' (passive, and it is the assistant's voice). IF NIRO-LOCAL DID NOT HELP THIS TURN, SAY SO: 'Returned nothing useful here'. Do not invent a win. Those turns are the ones most worth seeing, and the line is dropped rather than shown when you answer this way. Kept to about 1,000 characters, cut at the last full sentence that fits, so write it short. Secrets in it are masked on this machine before it is stored. |
317
+ | `without_niro_extra_tool_calls` | integer | yes | Estimated ADDITIONAL native tool calls (Read, Grep, Bash, WebFetch, subagent delegations, etc.) you would have needed to reach the same answer if niro-local's tools did not exist this turn. HOW TO DERIVE IT: go through each niro-local tool call you actually made this turn and ask 'what native call(s) would I have substituted for this one, and how many?', e.g. one get_blast_radius call might substitute for roughly 6 grep/read calls across the caller graph; one get_call_chain might substitute for 3-4 dead-end file reads. Sum those substitutions across all the niro-local calls you made this turn. 0 is a valid and expected answer when you made no niro-local tool calls this turn, or niro-local made no material difference. This is a separate hypothetical total for the without-niro-local scenario: do not confuse it with total_tool_calls. |
318
+ | `searched_code_natively` | boolean | no | |
319
+ | `niro_helpfulness` | one of `helpful`, `partial`, `not_helpful`, `not_used` | no | |
320
+ | `helpfulness_reason` | string | no | Why niro-local's answers helped or did not. Kept to about 1,000 characters, cut at the last full sentence that fits, so write it short. Secrets in it are masked on this machine before it is stored. |
321
+ | `task_outcome` | one of `succeeded`, `partial`, `failed` | no | |
322
+ | `total_tool_calls` | integer | no | |
323
+ | `subagent_tool_calls` | integer | no | |
324
+ | `without_niro_gap` | string | no | What finding the same thing without niro-local would have taken. Kept to about 1,000 characters, cut at the last full sentence that fits, so write it short. Secrets in it are masked on this machine before it is stored. |
325
+ | `without_niro_call_types` | list of one of `grep_search`, `file_read`, `bash_exec`, `web_search`, `subagent_delegation`, `other` | no | |
326
+ | `summary` | string | no | What the task was and what was done, in plain words. Kept to about 1,000 characters, cut at the last full sentence that fits, so write it short. Secrets in it are masked on this machine before it is stored. |
@@ -0,0 +1,180 @@
1
+ # Messages you may see
2
+
3
+ <!-- GENERATED by scripts/gen-messages-doc.js from the headings of docs/faq-*.md. Do not edit by hand: add or change the FAQ entry, then run the script again. -->
4
+
5
+ **Paste the start of a message into your search, or look for it below.** Each message links to the page that explains it, and each explanation cites the code that prints the message. Parts in angle brackets, such as `<folder>`, stand for the value in your message.
6
+
7
+ ## FAQ: coding agents and MCP
8
+
9
+ See [faq-assistants-and-mcp.md](faq-assistants-and-mcp.md).
10
+
11
+ - "Unknown client: X"
12
+ - "Failed to register MCP server. Is the Codex CLI installed?" (or the same for Gemini, Copilot, droid or Claude Code)
13
+ - "Failed to write config ... Manually add to <path>" or "No config path known for <client>."
14
+ - What does "Answered from the local graph on this machine (niro-local)." mean?
15
+ - "The local engine could not answer: <message>"
16
+ - "the local engine did not answer <method> within Nms" or "Niro MCP request timed out"
17
+ - My agent says "THIS FOLDER IS NOT INDEXED" and offers to index it.
18
+ - Claude Code shows "Niro impact check, before you edit this file". How do I turn it off?
19
+ - "Niro is not set up in any AI assistant on this machine, so there is nothing to remove."
20
+ - "Invalid --url" or "Refusing to use MCP server URL ..."
21
+ - "MCP <label> wizard exited with code N"
22
+
23
+ ## FAQ: feedback and receipts
24
+
25
+ See [faq-feedback-and-receipts.md](faq-feedback-and-receipts.md).
26
+
27
+ - What is the "[NIRO-CLI]" line at the end of a task?
28
+ - "Nothing to report: no niro-local call answered this turn."
29
+ - "The end-of-task Niro line is switched off on this machine"
30
+
31
+ ## FAQ: indexing and builds
32
+
33
+ See [faq-indexing.md](faq-indexing.md).
34
+
35
+ - "This folder is not added yet. Run niro init to add it and build it."
36
+ - "Two folders were given (<a> and --path <b>). Give one."
37
+ - "This folder is not indexed on this machine. Run niro start here to set it up."
38
+ - A file is listed as one "whose parse passed the 20 s time limit".
39
+ - "SKIPPED: N source file(s) larger than 2 MB ... were not indexed"
40
+ - "another niro-local was writing the graph, and this gave up (it waits at most 120 s ...)"
41
+ - The watcher's log says "Could not rebuild <folder>: ... Edits are not reaching the graph."
42
+ - An answer says "NOTE FROM niro-local: ACTION REQUIRED. The following file(s) were modified after the last index build".
43
+ - An answer says "niro-local is rewriting this folder's code graph right now".
44
+ - "the graph at <path> is damaged ... It is rebuilt from what was indexed."
45
+ - "the graph was written by an older major version of niro-local; run niro build"
46
+ - "the graph ... was written by a newer major version of niro-local"
47
+ - "The niro-local home ... was last used by a newer niro-local ... Upgrade with: niro upgrade"
48
+
49
+ ## FAQ: install and setup
50
+
51
+ See [faq-install-and-setup.md](faq-install-and-setup.md).
52
+
53
+ - I am on Windows. Setup says "Niro Local runs on macOS and Linux. On Windows, use WSL 2."
54
+ - "Node vX. Niro needs Node 18 or newer."
55
+ - "N GB free. A large repository's graph may need more."
56
+ - "`niro start` is interactive and there is no terminal to prompt on."
57
+ - "Global install failed. Install it yourself, then run niro start"
58
+ - "<folder> is your home folder ... Niro will not index it."
59
+ - "<folder> does not exist." or "<folder> is a file, not a folder."
60
+ - "Nothing that looks like a project in <folder>."
61
+ - "It holds more than 60 repositories, too many to index as one folder."
62
+ - "It holds no source file niro-local can read."
63
+ - "The local engine is not installed. Run `niro start` once to set up this machine."
64
+ - "Downloading the local engine failed: HTTP n" or "The engine manifest came back incomplete."
65
+ - "The local engine that arrived is not the one Niro published, so it was not installed."
66
+ - "Another process has been downloading the local engine for too long."
67
+ - "There is no local engine for <platform> <arch>."
68
+ - The engine install ended with "Nothing was installed."
69
+ - "The local engine cannot open its graph on this machine" or "Make that folder writable, or set NIRO_LOCAL_HOME"
70
+ - "PM2 is not installed." / "PM2 install failed" / "PM2 was installed but [is not] runnable from this shell"
71
+ - "Could not set niro-watch to start on login"
72
+ - `niro status` says the background updates are "stopped", "not installed" or "OFF".
73
+
74
+ ## FAQ: licence and plans
75
+
76
+ See [faq-licence-and-plans.md](faq-licence-and-plans.md).
77
+
78
+ - "Not built: this machine already holds N lines of code, over the M line limit."
79
+ - "No room left under the limit, so a new folder will not be indexed. Folders already indexed still rebuild."
80
+ - "Not indexing: this machine already holds N lines ..." with a list ending "removing it frees nothing"
81
+ - What does "no line limit while you share" mean, and what is shared?
82
+ - "Could not read your plan from Niro. Check your connection, then run niro plan again."
83
+ - "Niro will not license the local engine: <reason>"
84
+ - "Could not renew the local engine's licence ... It keeps working offline for up to a day."
85
+ - "Working on an expired licence: N hours of offline allowance left"
86
+ - "Not indexing: ..." followed by "Reason given: ..."
87
+ - "The Niro CLI has not handed this engine its licence yet."
88
+ - A page opened in my browser by itself, at ".../limit".
89
+
90
+ ## FAQ: login and account
91
+
92
+ See [faq-login-and-account.md](faq-login-and-account.md).
93
+
94
+ - "Login timed out. Run niro login to try again."
95
+ - "You are on the list. We will email you when you are in."
96
+ - "Request sent. We reply within one business day."
97
+ - "This account cannot sign in to Niro."
98
+ - "The sign-in was not completed. Run niro start again to get a new code."
99
+ - "Not logged in", "Session expired" or "Token refresh failed"
100
+ - "Credentials rejected by server (401). Run niro login to refresh."
101
+ - I signed in with `--api-key` or `--password`, and `niro mcp install` says "Not signed in. Run niro login".
102
+ - A command says "`--api-url` ..." is not accepted.
103
+ - "Device flow not available on this server, falling back to API key login."
104
+ - "Invalid API key." or "Server did not return a token."
105
+
106
+ ## FAQ: offline use
107
+
108
+ See [faq-offline.md](faq-offline.md).
109
+
110
+ - "Network error calling <method> <path>"
111
+
112
+ ## FAQ: privacy and security
113
+
114
+ See [faq-privacy-and-security.md](faq-privacy-and-security.md).
115
+
116
+ - "N item(s) not sent: the local engine is too old to mask secrets. Run `niro upgrade`."
117
+ - What does "Share redacted code" send?
118
+ - "the Niro service cannot yet promise to delete this code when sharing is switched off, so nothing was sent"
119
+ - "Passwords and tokens are refused and never stored"
120
+ - "That is not a form of this command, and it is not repeated here in case it holds a secret."
121
+
122
+ ## FAQ: uninstall
123
+
124
+ See [faq-uninstall.md](faq-uninstall.md).
125
+
126
+ - "Nothing removed: there is no terminal to confirm on. Pass --yes to go ahead."
127
+ - "Niro is partly removed; see the problems above."
128
+ - "Could not send the waiting usage and audit records"
129
+ - "Niro is not installed on this machine, so there is nothing to remove."
130
+
131
+ ## FAQ: updates
132
+
133
+ See [faq-updates.md](faq-updates.md).
134
+
135
+ - "npm could not replace the package. The usual cause is that your npm global folder needs root"
136
+ - "Not upgrading: niro is npm-linked to a working copy" or "you are not running the globally installed niro"
137
+ - "npm reported success, but there is no niro in your npm global folder."
138
+ - "The version just installed does not support `niro upgrade --finish`"
139
+ - "N of M refreshed, K failed."
140
+ - "The local engine was not upgraded: <message>. Try again with niro engine install."
141
+ - "Heads up: you are not signed in, so each client's installer will stop without refreshing it."
142
+ - "Folders from Niro web: N folder(s) were set up with Niro web on this machine."
143
+
144
+ ## FAQ: worktrees and branches
145
+
146
+ See [faq-worktrees-and-branches.md](faq-worktrees-and-branches.md).
147
+
148
+ - "This folder is now on <branch>, which niro-local has not indexed."
149
+ - "this folder's index was copied from project P and has not been built from this folder's files yet"
150
+ - "A project's folders must all be on one branch."
151
+ - "This folder is on no named branch"
152
+ - "Gave up building <folder> after N tries; run `niro build` there to see why."
153
+ - A folder that came back still shows its old "missing since" date.
154
+ - "<path> is now on X; its part of this answer describes Y"
155
+
156
+ ## FAQ: wrong or missing answers
157
+
158
+ See [faq-wrong-or-missing-answers.md](faq-wrong-or-missing-answers.md).
159
+
160
+ - "Nothing in the graph is called '<name>'."
161
+ - "N files in this folder are not in the graph because they are larger than 2 MB ... rebuilding does not change that"
162
+ - What do "confidence: partial" and "has_more: true" mean?
163
+ - What do `[possible]`, `[test]` and "inferred, target unconfirmed" mean?
164
+ - "Not listed: N call(s) with this method's name on a receiver of unknown type"
165
+ - An implementation, or the interface that declares the method, shows "0 callers" when its callers use a child interface.
166
+ - A call goes to a "stand-in" instead of my code.
167
+ - "(no handler method)" or "(no handler in this project serves it)"
168
+ - An outbound call says "address not stated", or has no address.
169
+ - Any `.send("text")` is listed as a Kafka event.
170
+ - What does `find_orphaned_events` mean by "one side missing"?
171
+ - "Error: direction=upstream needs 'exception_type'"
172
+ - "Error: Unrecognised direction"
173
+ - Class structure gives a member count but no names, or says "no members".
174
+ - "WARNING: <path> has changed since the last build"
175
+ - "PARTIAL: the search stopped at its 1.5 s limit ... Call again with continue_from=N"
176
+ - "Refused: '<x>' is outside this worktree" or "leads outside this worktree through a symlink"
177
+ - "<tool> is not answered for this folder: it is indexed locally by niro-local, whose graph holds structure and not source text or documentation"
178
+ - "Nothing in this folder's graph serves <path>, so the question was not answered"
179
+ - "The first 10 of N names are answered above."
180
+ - A question about another folder gets "Nothing in the graph".
@@ -0,0 +1,48 @@
1
+ # Secrets and masking
2
+
3
+ **Niro hides secret values before it shows or sends anything.** Masking means replacing a value with a placeholder, such as `<MASK_PASSWORD_001>`. The name stays, so you can still see that `DB_PASSWORD` is set, but not to what.
4
+ <!-- source: niro-local src/niro_local/redact/mask.py:1-75 (placeholders <MASK_KIND_NNN>, the variable name is kept) -->
5
+
6
+ ## Where masking happens
7
+
8
+ - **In answers to your agent.** When `code_grep` or `get_source_code` reads a config, build or text file, every line is masked first. In a file of `key = value` lines, any value that is not clearly harmless is masked. Examples of such files: `.yml`, `.json`, `.properties`, `Dockerfile`, `go.mod`, `.tf`, `.md`.
9
+ <!-- source: niro-local src/niro_local/mcp/text_files.py; niro-local CLAUDE.md (2026-11-07 amendment) -->
10
+ - **Before anything is sent.** The coverage audit, the tool-usage record and a whole-repository push are all masked on your computer first.
11
+ <!-- source: niro-local src/niro_local/redact/mask.py:3-6; src/niro_local/redact/files.py -->
12
+ - **Names of people and companies.** In audit snippets, copyright holders, your email's company and the owner of the git remote become `<author>` and `<company>`.
13
+ <!-- source: src/lib/redact.js:1-18 -->
14
+
15
+ The masking rules are the same ones Niro's own service uses before anything reaches an AI model. The current rules are version 6.
16
+ <!-- source: niro-local src/niro_local/redact/mask.py:898 (MASKER_VERSION = "6"); profiles/data/masking/llm-gateway-rules.json -->
17
+
18
+ If your engine is too old to mask, nothing is sent. Items wait until you run `niro upgrade`.
19
+ <!-- source: src/commands/auditSend.js; src/lib/journalUpload.js ("the local engine is too old to mask secrets") -->
20
+
21
+ ## Files Niro never opens
22
+
23
+ | Kind | Examples |
24
+ |---|---|
25
+ | Environment files | `.env`, `.env.local`, `.env.production`. Only `.env.example`, `.env.sample` and `.env.template` are read |
26
+ | Private keys and key stores | `.pem`, `.key`, `.p12`, `.pfx`, `.jks`, `.keystore`, `.p8`, `.ppk`, and files named `id_rsa`, `id_dsa`, `id_ecdsa`, `id_ed25519` |
27
+ | Tool credential files | `.npmrc`, `.pypirc`, `.netrc`, `.pgpass`, `.git-credentials`, `.htpasswd`, `.yarnrc`, `.dockercfg` |
28
+ | Config and text files named as secrets | `credentials`, `secrets`, `secret`, `client_secret` (with any ending), for example `secrets.yaml` |
29
+ | Config and text files that `.gitignore` covers | Any config or text file your `.gitignore` names |
30
+ <!-- source: niro-local src/niro_local/mcp/text_files.py:186-202 (secret_named: the name rules are for config and text files); src/niro_local/mcp/source_tools.py:825-850 -->
31
+
32
+ **Source code is treated differently.** A source file the build reads is read whatever its name: `secrets.py` and `Credentials.java` are searched like any other code. And a source file that git tracks is read even when `.gitignore` names it, the way git itself treats it.
33
+ <!-- source: niro-local src/niro_local/mcp/text_files.py:191-193 ("`Credentials.java` and `secrets.py` are searched exactly as before"); niro-local CLAUDE.md, amendment of 2026-11-07 (a `.gitignore` rule does not apply to a file git tracks) -->
34
+
35
+ ## Seeing real config values on your own computer
36
+
37
+ If you need your agent to see real values in config files (not in `.env` files, which are never read), turn masking off for one folder. This setting belongs to the engine, and `niro` does not pass it on yet, so run the engine itself:
38
+
39
+ 1. Run `niro engine status`. The `engine` line shows where the engine program is.
40
+ 2. In the folder, run that program with `config set show-config-values on`.
41
+
42
+ Every answer then starts with a note saying values are not masked, and how to turn it back off (`config set show-config-values off`). This never changes what is sent. No tool argument can turn it on, but a coding agent may run the command through its shell, just as you can.
43
+ <!-- source: niro-local src/niro_local/folder_settings.py:1-59, :3-4 and :13-14 ("no MCP argument turns it on. Only the command does, run by a person or by an assistant through its shell"), :43-46; src/niro_local/config_cli.py:20-37; src/commands/engine.js:81-118 (engine status prints the engine path); src/commands/engineRoutes.js:27-46 (config is not a routed command) -->
44
+
45
+ ## Settings that hold secrets
46
+
47
+ `niro env` stores the addresses your code reads (for example `ORDERS_URL`), so the graph can link services. It refuses passwords and tokens, and never stores them. If you type a form of a command it does not know, it does not repeat what you typed, "in case it holds a secret".
48
+ <!-- source: niro-local src/niro_local/env_args.py:34, :76-88 -->