@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.
- package/CHANGELOG.md +136 -0
- package/README.md +123 -302
- package/bin/niro.js +12 -1
- package/docs/agent-antigravity.md +37 -0
- package/docs/agent-claude-code.md +48 -0
- package/docs/agent-claude-desktop.md +47 -0
- package/docs/agent-cline.md +42 -0
- package/docs/agent-codex.md +45 -0
- package/docs/agent-copilot-cli.md +42 -0
- package/docs/agent-cursor.md +44 -0
- package/docs/agent-factory.md +42 -0
- package/docs/agent-gemini-cli.md +42 -0
- package/docs/agent-goose.md +42 -0
- package/docs/agent-kiro.md +37 -0
- package/docs/agent-opencode.md +37 -0
- package/docs/agent-vscode.md +45 -0
- package/docs/agent-windsurf.md +38 -0
- package/docs/answer-shapes.md +69 -0
- package/docs/builds-and-updates.md +68 -0
- package/docs/cloud-README.md +372 -0
- package/docs/configuring-a-folder.md +51 -0
- package/docs/connect-ci.md +24 -0
- package/docs/connect-overview.md +20 -0
- package/docs/connect-review-bots.md +17 -0
- package/docs/connect-team-server.md +12 -0
- package/docs/connect-terminal.md +49 -0
- package/docs/connect-web-agents.md +9 -0
- package/docs/connect-your-ai-assistant.md +59 -175
- package/docs/coverage-audit-and-consent.md +51 -0
- package/docs/evaluate-what-niro-did.md +271 -0
- package/docs/faq-assistants-and-mcp.md +122 -0
- package/docs/faq-feedback-and-receipts.md +33 -0
- package/docs/faq-indexing.md +127 -0
- package/docs/faq-install-and-setup.md +103 -0
- package/docs/faq-licence-and-plans.md +86 -0
- package/docs/faq-login-and-account.md +69 -0
- package/docs/faq-offline.md +34 -0
- package/docs/faq-performance.md +33 -0
- package/docs/faq-privacy-and-security.md +113 -0
- package/docs/faq-uninstall.md +47 -0
- package/docs/faq-updates.md +59 -0
- package/docs/faq-worktrees-and-branches.md +59 -0
- package/docs/faq-wrong-or-missing-answers.md +275 -0
- package/docs/hosted-only.md +33 -0
- package/docs/how-the-graph-works.md +47 -0
- package/docs/index.md +157 -0
- package/docs/licence-and-plans.md +72 -0
- package/docs/lifecycle-debug.md +48 -0
- package/docs/lifecycle-onboarding.md +32 -0
- package/docs/lifecycle-overview.md +77 -0
- package/docs/lifecycle-plan-and-design.md +44 -0
- package/docs/lifecycle-review.md +30 -0
- package/docs/lifecycle-security-and-privacy.md +35 -0
- package/docs/lifecycle-test.md +28 -0
- package/docs/lifecycle-write-code.md +35 -0
- package/docs/llms-full.txt +8015 -0
- package/docs/llms.txt +126 -0
- package/docs/playbook-add-a-feature.md +108 -0
- package/docs/playbook-change-safely.md +93 -0
- package/docs/playbook-data-and-events.md +107 -0
- package/docs/playbook-debug-after-a-change.md +96 -0
- package/docs/playbook-debug-config.md +95 -0
- package/docs/playbook-debug-exception.md +124 -0
- package/docs/playbook-debug-failing-service-call.md +119 -0
- package/docs/playbook-debug-slow-path.md +80 -0
- package/docs/playbook-debug-wrong-value.md +137 -0
- package/docs/playbook-onboard.md +95 -0
- package/docs/playbook-review-a-change.md +72 -0
- package/docs/playbook-test-a-change.md +73 -0
- package/docs/reference-cli.md +113 -0
- package/docs/reference-config-files.md +42 -0
- package/docs/reference-engine-commands.md +56 -0
- package/docs/reference-environment-variables.md +89 -0
- package/docs/reference-exit-codes.md +67 -0
- package/docs/reference-limits.md +75 -0
- package/docs/reference-mcp-tools.md +326 -0
- package/docs/reference-messages.md +180 -0
- package/docs/secrets-and-masking.md +48 -0
- package/docs/supported-c.md +130 -0
- package/docs/supported-cpp.md +157 -0
- package/docs/supported-csharp.md +211 -0
- package/docs/supported-go.md +258 -0
- package/docs/supported-java.md +226 -0
- package/docs/supported-javascript.md +223 -0
- package/docs/supported-kotlin.md +124 -0
- package/docs/supported-overview.md +89 -0
- package/docs/supported-php.md +157 -0
- package/docs/supported-python.md +224 -0
- package/docs/supported-ruby.md +162 -0
- package/docs/supported-rust.md +150 -0
- package/docs/supported-swift.md +133 -0
- package/docs/supported-typescript.md +220 -0
- package/docs/tokens-speed-and-accuracy.md +99 -0
- package/docs/troubleshooting.md +42 -0
- package/docs/uninstall.md +74 -0
- package/docs/what-leaves-your-machine.md +71 -0
- package/docs/where-things-are-stored.md +59 -0
- package/docs/worktrees-and-branches.md +55 -0
- package/package.json +5 -3
- package/src/commands/add-repo.js +5 -0
- package/src/commands/auditSend.js +67 -0
- package/src/commands/build.js +6 -0
- package/src/commands/docsSend.js +73 -0
- package/src/commands/engine.js +120 -0
- package/src/commands/engineRoutes.js +105 -0
- package/src/commands/guide.js +254 -0
- package/src/commands/init.js +6 -2
- package/src/commands/initLocal.js +96 -0
- package/src/commands/journalSend.js +47 -0
- package/src/commands/login.js +89 -12
- package/src/commands/mcp.js +22 -6
- package/src/commands/plan.js +99 -0
- package/src/commands/repoPush.js +33 -0
- package/src/commands/requestIntegration.js +38 -0
- package/src/commands/share.js +56 -0
- package/src/commands/start.js +451 -371
- package/src/commands/status.js +57 -0
- package/src/commands/takeover.js +6 -0
- package/src/commands/uninstall.js +180 -0
- package/src/commands/upgrade.js +38 -8
- package/src/commands/watch.js +420 -6
- package/src/index.js +174 -3
- package/src/lib/agentApi.js +32 -1
- package/src/lib/api.js +20 -6
- package/src/lib/auditUpload.js +293 -0
- package/src/lib/branchDrift.js +149 -0
- package/src/lib/choose.js +116 -0
- package/src/lib/cloudGuard.js +74 -0
- package/src/lib/credentials.js +2 -2
- package/src/lib/docsMarked.js +55 -0
- package/src/lib/docsState.js +213 -0
- package/src/lib/docsUpload.js +481 -0
- package/src/lib/engine.js +619 -0
- package/src/lib/folderSync.js +2 -1
- package/src/lib/graphCheck.js +40 -0
- package/src/lib/guide.js +293 -0
- package/src/lib/guideSearch.js +252 -0
- package/src/lib/integrationRequest.js +89 -0
- package/src/lib/journalUpload.js +147 -0
- package/src/lib/languages.js +129 -0
- package/src/lib/lease.js +375 -0
- package/src/lib/localBuild.js +285 -0
- package/src/lib/localEngine.js +210 -0
- package/src/lib/localOnboard.js +124 -0
- package/src/lib/localWorktrees.js +243 -0
- package/src/lib/machineCheck.js +58 -0
- package/src/lib/mcpClients.js +10 -1
- package/src/lib/migrationNotice.js +118 -0
- package/src/lib/modelFetch.js +153 -0
- package/src/lib/nestedOutput.js +23 -9
- package/src/lib/onboardingLog.js +34 -0
- package/src/lib/planUsage.js +165 -0
- package/src/lib/progressBar.js +46 -0
- package/src/lib/prompt.js +1 -1
- package/src/lib/redact.js +155 -0
- package/src/lib/release.js +33 -0
- package/src/lib/repoPush.js +495 -0
- package/src/lib/secret.js +1 -1
- package/src/lib/service.js +372 -63
- package/src/lib/shareCode.js +367 -0
- package/src/lib/shareExclusions.js +114 -0
- package/src/lib/shareFiles.js +129 -0
- package/src/lib/spinner.js +9 -5
- package/src/lib/watchDaemon.js +33 -10
- package/src/lib/watchState.js +12 -1
- package/src/lib/windowsPaths.js +67 -0
- package/src/mcp/lineCheck.js +382 -0
- package/src/mcp/lineName.js +92 -0
- package/src/mcp/localBackend.js +751 -0
- package/src/mcp/localMode.js +383 -0
- package/src/mcp/localSkill.js +189 -0
- package/src/mcp/server.js +610 -79
- package/src/mcp/setup.js +519 -131
- package/src/mcp/shellSearchHook.js +509 -0
- package/src/mcp/teardown.js +173 -91
- package/src/mcp/usingNiro.js +39 -0
- package/docs/working-on-branches.md +0 -162
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
# FAQ: wrong or missing answers
|
|
2
|
+
|
|
3
|
+
**Niro's graph is read from the code, and some code does not say plainly what it calls.** This page lists the known cases where an answer is wrong or incomplete, and what to do about each. For how to read the marks in an answer, see [how-the-graph-works.md](how-the-graph-works.md).
|
|
4
|
+
|
|
5
|
+
## General
|
|
6
|
+
|
|
7
|
+
### "Nothing in the graph is called '<name>'."
|
|
8
|
+
Check three things, in this order:
|
|
9
|
+
|
|
10
|
+
1. **The spelling.** `resolve_name` lists close matches.
|
|
11
|
+
2. **The folder.** The code may be in a folder that is not indexed. The tools answer for the folder your agent started in.
|
|
12
|
+
3. **The graph's age.** It may be out of date: run `niro build`.
|
|
13
|
+
<!-- source: niro-local src/niro_local/mcp/server.py:894-899; src/mcp/localMode.js:39 (RELEASE_WORKTREE_SENTENCE) -->
|
|
14
|
+
|
|
15
|
+
### "N files in this folder are not in the graph because they are larger than 2 MB ... rebuilding does not change that"
|
|
16
|
+
The name may be in one of those files. Raise `NIRO_LOCAL_MAX_FILE_BYTES` and rebuild if they matter.
|
|
17
|
+
<!-- source: niro-local src/niro_local/mcp/server.py:981-985 -->
|
|
18
|
+
|
|
19
|
+
### What do "confidence: partial" and "has_more: true" mean?
|
|
20
|
+
- **"Partial":** Niro listed every caller it could place, and found others it could not tie to one target.
|
|
21
|
+
- **"has_more: true":** the answer is one page of a longer list.
|
|
22
|
+
<!-- source: niro-local src/niro_local/mcp/chains.py:2053; src/niro_local/mcp/impact.py:1060-1064 -->
|
|
23
|
+
|
|
24
|
+
### What do `[possible]`, `[test]` and "inferred, target unconfirmed" mean?
|
|
25
|
+
- **`[possible]`:** a caller that may reach the method, but not certainly.
|
|
26
|
+
- **`[test]`:** a caller in test code.
|
|
27
|
+
- **"Inferred, target unconfirmed":** an HTTP link whose address Niro could not work out. It is not counted in the risk.
|
|
28
|
+
|
|
29
|
+
With `purpose=VERIFY`, the `[possible]` and `[test]` marks are left out.
|
|
30
|
+
<!-- source: niro-local src/niro_local/mcp/chains.py:377; src/niro_local/mcp/impact.py:1018-1022, :1140; niro-local docs/NIRO-LOCAL-ISSUES.md entry "2026-11-06, a Java call whose argument comes from a record accessor is marked `[possible]` ... and `purpose=VERIFY` drops the `[possible]` and `[test]` marks" (OPEN) -->
|
|
31
|
+
|
|
32
|
+
### Answers changed between two builds of the same code.
|
|
33
|
+
A few answers can differ between builds of the same code. This is a known problem.
|
|
34
|
+
<!-- source: niro-local docs/NIRO-LOCAL-ISSUES.md:3914 (open) -->
|
|
35
|
+
|
|
36
|
+
### Answers differ from hosted Niro.
|
|
37
|
+
They can. The local engine:
|
|
38
|
+
|
|
39
|
+
- reads test code;
|
|
40
|
+
- fixes some mistakes hosted Niro makes (rather than copying them);
|
|
41
|
+
- has a few gaps of its own.
|
|
42
|
+
|
|
43
|
+
`get_impact_analysis` has known differences, for example in the error flags and entry-point tags.
|
|
44
|
+
<!-- source: niro-local TODO.md:297, :3679, :103; niro-local CLAUDE.md rule P13 (where Niro is wrong, niro-local does it right) -->
|
|
45
|
+
|
|
46
|
+
## Missing callers
|
|
47
|
+
|
|
48
|
+
### "Not listed: N call(s) with this method's name on a receiver of unknown type"
|
|
49
|
+
A receiver is the value a method is called on. When the code does not say its type, Niro cannot tell which method the call reaches, so it does not link it. The answer points at those calls: read them.
|
|
50
|
+
<!-- source: niro-local src/niro_local/mcp/chains.py:1945-1947 -->
|
|
51
|
+
|
|
52
|
+
### A method shows no callers, but a framework calls it.
|
|
53
|
+
Methods a framework calls for you (for example a route handler) have no caller in your code. The answer says "it is called by its framework".
|
|
54
|
+
<!-- source: niro-local src/niro_local/mcp/chains.py:2075; niro-local docs/NIRO-LOCAL-ISSUES.md:4646 -->
|
|
55
|
+
|
|
56
|
+
### A callback, or a function declared inside another function, shows no callers.
|
|
57
|
+
Such a function is reached through what the outer function returns or passes on. The answer says so. Some inner functions have no node at all yet.
|
|
58
|
+
<!-- source: niro-local src/niro_local/mcp/chains.py:2084-2093; niro-local docs/NIRO-LOCAL-ISSUES.md:1977, :2789, :4268 (open) -->
|
|
59
|
+
|
|
60
|
+
### A caller is missing where the call goes through a value typed `any`, `object` or untyped.
|
|
61
|
+
Niro cannot know the target, so it does not link the call.
|
|
62
|
+
<!-- source: niro-local docs/NIRO-LOCAL-ISSUES.md:289, :3137, :4061 (open) -->
|
|
63
|
+
|
|
64
|
+
### A caller is missing where the code imports a name under another name.
|
|
65
|
+
Imports under another name (aliases) are not always followed.
|
|
66
|
+
<!-- source: niro-local docs/NIRO-LOCAL-ISSUES.md:18, :1082, :3394, :3826 (open) -->
|
|
67
|
+
|
|
68
|
+
### A call inside a lambda (a small unnamed function) or a macro is missing.
|
|
69
|
+
Some calls inside lambdas, and inside Rust macro arguments, are not recorded.
|
|
70
|
+
<!-- source: niro-local docs/NIRO-LOCAL-ISSUES.md:1699, :3011, :4547 (open) -->
|
|
71
|
+
|
|
72
|
+
### `super.method()`, or a method of a parent interface, is not linked.
|
|
73
|
+
Some calls to a parent class or interface miss their target.
|
|
74
|
+
<!-- source: niro-local docs/NIRO-LOCAL-ISSUES.md:967, :1167, :2510, :5506 (open) -->
|
|
75
|
+
|
|
76
|
+
### An implementation, or the interface that declares the method, shows "0 callers" when its callers use a child interface.
|
|
77
|
+
In Java, if interface `B` extends interface `A`, and `A` declares `m()`, a call written on a `B` value (`b.m()`) is linked to a stand-in named `B.m`, not to `A.m`. So asking about `A.m`, or about a class that implements it, answers "0 callers, complete". Ask the name the callers use instead. Example in Keycloak: `JpaUserProvider.getUserByEmail` answers 0 callers, and `UserProvider.getUserByEmail` answers 17, because callers write `session.users().getUserByEmail(...)` and `getUserByEmail` is declared on `UserLookupProvider`, a parent of `UserProvider`. A known problem in this release.
|
|
78
|
+
<!-- source: niro-local docs/NIRO-LOCAL-ISSUES.md entry "2026-11-10: a call to an interface method inherited from a parent interface lands on a stand-in, so the declaring method and its implementations read '0 callers, complete'" (OPEN, committed f1a9fe59); scratchpad niro-cli-task-playbooks/runs/chg-03-impl-full.txt, chg-06-decl-count.txt, chg-07-iface-loc.txt; keycloak server-spi/.../UserProvider.java:33-37 -->
|
|
79
|
+
|
|
80
|
+
### A call on a value that was cast to another type is missing.
|
|
81
|
+
A cast is code that tells the compiler to treat a value as another type. Calls on cast values are not always linked.
|
|
82
|
+
<!-- source: niro-local docs/NIRO-LOCAL-ISSUES.md:1139, :5075 (open) -->
|
|
83
|
+
|
|
84
|
+
### Calls at the top of a file, or in a static block, are missing.
|
|
85
|
+
Some calls outside any method are not recorded.
|
|
86
|
+
<!-- source: niro-local docs/NIRO-LOCAL-ISSUES.md:1502, :2379 (open) -->
|
|
87
|
+
|
|
88
|
+
### A call goes to a "stand-in" instead of my code.
|
|
89
|
+
A stand-in is a placeholder for a target Niro could not find in your project. Known cases:
|
|
90
|
+
|
|
91
|
+
- a value made by a factory function;
|
|
92
|
+
- a struct literal in Go;
|
|
93
|
+
- a namespace import;
|
|
94
|
+
- an import from a sibling package in a workspace;
|
|
95
|
+
- a Go call to another package in the same module.
|
|
96
|
+
<!-- source: niro-local docs/NIRO-LOCAL-ISSUES.md:2263, :2402, :2570, :2613, :2963 (open) -->
|
|
97
|
+
|
|
98
|
+
### Known gaps by language
|
|
99
|
+
- **Python:** calls through a holder object's attribute; `cls()` in a class method; `X | None` types; module-level objects; parameters typed with a project generic; dotted imports of project modules; lookup tables; builtins linked to project methods; `@property` reads; dataclass members; Optional receivers.
|
|
100
|
+
- **TypeScript and JavaScript:** overload calls; bare calls to globals; fields typed only by a constructor assignment; arrow functions inside functions; anonymous default exports; functions taken from a React hook's return value.
|
|
101
|
+
- **Kotlin:** locals filled by a constructor; `with {}` and `apply {}`; chained calls recorded twice; bare calls guessed project-wide.
|
|
102
|
+
- **Swift:** parent types; collection calls; UserDefaults stores.
|
|
103
|
+
- **Go:** struct fields and embedded interfaces; aliases stored as parents; generic type methods; pointer receivers; dot imports.
|
|
104
|
+
- **Rust:** `impl Trait for` a standard type; `self.field` calls; trait implementers; `use crate::` and `super::` paths; an impl in another file.
|
|
105
|
+
- **PHP:** static calls; `$this` typed-property calls; routes registered by calls.
|
|
106
|
+
- **C#:** constructor calls to a base class; `global using`; calls through `var` locals.
|
|
107
|
+
- **C and C++:** by-value locals; `struct X *p` making a false class; client calls read as routes.
|
|
108
|
+
<!-- source: niro-local docs/NIRO-LOCAL-ISSUES.md: Python 187, 267, 510, 1026, 1196, 1420, 1747, 1774, 1872, 1887, 2591; TypeScript/JavaScript 1347, 1393, 1946, 1977, 2427, TODO.md:635; Kotlin 992, 1925, 4909, 5008; Swift 907, 1646, 2118; Go 2613, 2699, 2734, 2990, 5066; Rust 2052, 2634, 2676, 2806, 2831; PHP 1224, 1901, 565; C# 1113, 1481, 4432; C/C++ 1962, 3103, 710 (all open) -->
|
|
109
|
+
|
|
110
|
+
## Routes and calls between services
|
|
111
|
+
|
|
112
|
+
### A route is missing from `find_api_endpoints`.
|
|
113
|
+
Niro lists routes written as fixed text. A route built while the program runs, from computed values, is not in the graph, and the answer says so. If your framework is not recognised, see [supported-overview.md](supported-overview.md).
|
|
114
|
+
<!-- source: niro-local src/niro_local/mcp/server.py:3849-3857, :3876-3881, :3924 -->
|
|
115
|
+
|
|
116
|
+
### "(no handler method)" or "(no handler in this project serves it)"
|
|
117
|
+
- **"(no handler method)":** Niro found the route, but not the method that serves it.
|
|
118
|
+
- **"(no handler in this project serves it)":** a call goes to a route that no code in this project serves.
|
|
119
|
+
<!-- source: niro-local src/niro_local/mcp/server.py:3897, :4849 -->
|
|
120
|
+
|
|
121
|
+
### An outbound call says "address not stated", or has no address.
|
|
122
|
+
The address comes from a setting Niro does not know, such as an environment variable set only when the program is deployed. Tell Niro with `niro env set` or `niro base-url`. See [configuring-a-folder.md](configuring-a-folder.md).
|
|
123
|
+
<!-- source: niro-local docs/NIRO-LOCAL-ISSUES.md:362, :2067, :2085 (open) -->
|
|
124
|
+
|
|
125
|
+
### A call to another service is not linked to that service's route.
|
|
126
|
+
Run `niro route-rule unconnected` to see such calls, and add a rule with `niro route-rule add`. Known gaps:
|
|
127
|
+
|
|
128
|
+
- calls through a proxy such as nginx;
|
|
129
|
+
- calls through a shared send method that receives the address;
|
|
130
|
+
- calls between modules in one folder.
|
|
131
|
+
<!-- source: niro-local docs/NIRO-LOCAL-ISSUES.md:1582, :1724, :3864 (open); niro-local TODO.md:555; niro-local src/niro_local/route_rules_cli.py:33-54 -->
|
|
132
|
+
|
|
133
|
+
### Two services with the same route are shown as one.
|
|
134
|
+
This is a known problem.
|
|
135
|
+
<!-- source: niro-local docs/NIRO-LOCAL-ISSUES.md:467 (open) -->
|
|
136
|
+
|
|
137
|
+
### The service map shows only calls that start in my folder.
|
|
138
|
+
`get_service_topology` shows calls from the folder your agent started in.
|
|
139
|
+
<!-- source: niro-local docs/NIRO-LOCAL-ISSUES.md:3843 (open) -->
|
|
140
|
+
|
|
141
|
+
### Known false links: cases where Niro links code it should not
|
|
142
|
+
Niro's own test catalog checks that look-alike code is NOT linked. These cases fail, or are not tested yet:
|
|
143
|
+
|
|
144
|
+
- **Java: a home-made `@GetMapping`.** An annotation named `@GetMapping` from your own package, with no Spring import, is taken for a Spring route. (Test fails today.)
|
|
145
|
+
- **Java: one route on two services.** When two services declare the same path, a call meant for one can be linked to the other. (Test fails today.)
|
|
146
|
+
- **Kotlin: the same, with Retrofit.** A Retrofit call to one service is linked to another service that declares the same path. (Test fails today.)
|
|
147
|
+
- **C#: a hand-written class shaped like a gRPC base.** A class such as `BillingBase`, written by hand with no gRPC import, should give no route. Not tested yet.
|
|
148
|
+
- **C#: generated gRPC code checked into the repository.** Checked-in generated client and service code should add no route and no call of yours. Not tested yet.
|
|
149
|
+
|
|
150
|
+
Check such links by reading the code they point at.
|
|
151
|
+
<!-- source: coverage catalog (niro-coverage-corpus 607dff9) rows java.http-server.trap.lookalike-get-mapping and java.http-client.trap.same-route-two-services (measured: missed), kotlin.http-client.trap.same-route-two-services (missed), csharp.grpc.grpc.trap-lookalike-base and csharp.grpc.grpc.trap-generated-base (not-measured), all status pending -->
|
|
152
|
+
|
|
153
|
+
### Something that is not HTTP is listed as an HTTP call or route.
|
|
154
|
+
Some look-alike names are taken for HTTP clients or routes. Examples: a `@mock.patch` test read as a PATCH route, or a map's `put` read as an HTTP PUT. Check them by reading the code.
|
|
155
|
+
<!-- source: niro-local docs/NIRO-LOCAL-ISSUES.md:689, :730, :752, :2894, :5530 (open) -->
|
|
156
|
+
|
|
157
|
+
## Data and events
|
|
158
|
+
|
|
159
|
+
### A table or data store is missing.
|
|
160
|
+
Some libraries record no store. Known cases: drizzle queries, Swift UserDefaults, and file reads with fixed paths in Python.
|
|
161
|
+
<!-- source: niro-local docs/NIRO-LOCAL-ISSUES.md:2118, :2915, :3083 (open) -->
|
|
162
|
+
|
|
163
|
+
### A method that changes a loaded JPA entity is listed as a reader, not a writer.
|
|
164
|
+
JPA saves a change to an object it loaded (`em.find`, then setters) when the transaction ends, with no further call. Niro sees the `em.find` and lists the method under "read by", or not at all when the object was loaded elsewhere. Example in Keycloak: `get_data_resource_usage resource_fqn=CREDENTIAL` lists `JpaUserCredentialStore.updateCredential` only as a reader, and leaves out `moveCredentialTo`, which reorders priorities. Search the setters with `code_grep` (`answer=names`). A known problem in this release.
|
|
165
|
+
<!-- source: scratchpad niro-cli-task-playbooks/runs/data-02-usage.txt; keycloak model/jpa/.../JpaUserCredentialStore.java:63-75 (updateCredential), :245 (moveCredentialTo); niro-local docs/NIRO-LOCAL-ISSUES.md entry "2026-11-10: a write made by changing a loaded JPA entity is listed as a read, or not at all" (OPEN) -->
|
|
166
|
+
|
|
167
|
+
### A JPA named query is not listed as a read of its table.
|
|
168
|
+
`em.createNamedQuery("name", Entity.class)` is not linked to the entity's table, while `em.persist`, `em.find`, `em.remove`, `createQuery` and `createNativeQuery` are. Example in Keycloak: `get_data_resource_usage resource_fqn=CREDENTIAL` does not list `JpaUserCredentialStore.getStoredCredentialEntities`, which reads it through the named query `credentialByUser`. A known problem in this release.
|
|
169
|
+
<!-- source: niro-local docs/NIRO-LOCAL-ISSUES.md entry "2026-11-10: a JPA named query (`em.createNamedQuery("name", Entity.class)`) is not a read of the entity's table" (OPEN, committed f1a9fe59); scratchpad niro-cli-task-playbooks/runs/data-02-usage.txt -->
|
|
170
|
+
|
|
171
|
+
### A Kafka Streams topology or an Apache Camel route is not listed as a consumer.
|
|
172
|
+
`builder.stream("topic")` and `from("kafka:topic?...")` are not read yet, so `get_event_producers_and_handlers` lists fewer handlers than the topic has. Search the topic name with `code_grep` as well.
|
|
173
|
+
<!-- source: niro-coverage-corpus/catalog/java.json rows java.messaging.kafka-streams.builder and java.messaging.camel.route-uris (status pending, measured missed); scratchpad niro-cli-task-playbooks/runs/de-05-orders.txt (1 handler; java-mono has 3) -->
|
|
174
|
+
|
|
175
|
+
### Any `.send("text")` is listed as a Kafka event.
|
|
176
|
+
A known false match.
|
|
177
|
+
<!-- source: niro-local docs/NIRO-LOCAL-ISSUES.md:2938 (open) -->
|
|
178
|
+
|
|
179
|
+
### What does `find_orphaned_events` mean by "one side missing"?
|
|
180
|
+
An event that is sent but never handled, or handled but never sent. That can mean three things:
|
|
181
|
+
|
|
182
|
+
- the other side is outside this project;
|
|
183
|
+
- the names do not match;
|
|
184
|
+
- it is a real gap.
|
|
185
|
+
<!-- source: niro-local src/niro_local/mcp/server.py:4688 -->
|
|
186
|
+
|
|
187
|
+
### `get_impact_analysis` ignores `data_resource_fqn`, or `include_http_candidates=false`.
|
|
188
|
+
These two inputs are listed but not supported yet. Use `get_data_resource_usage` for a table.
|
|
189
|
+
<!-- source: niro-local docs/NIRO-LOCAL-ISSUES.md:336, :2158 (open); src/niro_local/mcp/impact.py:81; niro-local TODO.md:297 -->
|
|
190
|
+
|
|
191
|
+
## Exceptions, classes and source
|
|
192
|
+
|
|
193
|
+
### With `answer=names`, a deep call chain shows a direct callee at depth 2.
|
|
194
|
+
On `get_call_chain ... scope=transitive answer=names`, a method that is called directly and also by another direct callee can be labelled with the deeper depth. The count is right. Ask without `answer` when the depth matters.
|
|
195
|
+
<!-- source: niro-local docs/NIRO-LOCAL-ISSUES.md entry "2026-11-10: `get_call_chain ... scope=transitive answer=names` labels a direct callee '(depth 2)' when a direct callee also calls it" (OPEN, committed f1a9fe59); scratchpad niro-cli-task-playbooks/runs/slow-02-names.txt against runs/slow-03-full.txt -->
|
|
196
|
+
|
|
197
|
+
### Exception flow lists an exception that is caught and wrapped.
|
|
198
|
+
Known. A catch is matched only by the exact exception name.
|
|
199
|
+
<!-- source: niro-local docs/NIRO-LOCAL-ISSUES.md:1560, :3230 (open) -->
|
|
200
|
+
|
|
201
|
+
### "Error: direction=upstream needs 'exception_type'"
|
|
202
|
+
To ask which callers must handle an exception, name it with `exception_type`.
|
|
203
|
+
<!-- source: niro-local src/niro_local/mcp/server.py:2694 -->
|
|
204
|
+
|
|
205
|
+
### "Error: Unrecognised direction"
|
|
206
|
+
Use `both`, `upstream` or `downstream` (for chains: `callers` or `callees`).
|
|
207
|
+
<!-- source: niro-local src/niro_local/mcp/impact.py:91; src/niro_local/mcp/chains.py:84 -->
|
|
208
|
+
|
|
209
|
+
### Class structure gives a member count but no names, or says "no members".
|
|
210
|
+
Known for module files, Python dataclasses and Java enum constructors.
|
|
211
|
+
<!-- source: niro-local docs/NIRO-LOCAL-ISSUES.md:136, :165, :497, :1887 (open) -->
|
|
212
|
+
|
|
213
|
+
### Parameter lists look wrong outside Java.
|
|
214
|
+
Known.
|
|
215
|
+
<!-- source: niro-local docs/NIRO-LOCAL-ISSUES.md:4800 -->
|
|
216
|
+
|
|
217
|
+
### `get_source_code` printed the wrong file, or a whole test file.
|
|
218
|
+
This can happen when the name points at a stand-in. Ask by file and line instead.
|
|
219
|
+
<!-- source: niro-local docs/NIRO-LOCAL-ISSUES.md:2872, :3263 (open) -->
|
|
220
|
+
|
|
221
|
+
### "WARNING: <path> has changed since the last build"
|
|
222
|
+
The lines shown come from the file as it is now. They may not match the graph's line numbers until the next build.
|
|
223
|
+
<!-- source: niro-local src/niro_local/mcp/source_tools.py:2147 -->
|
|
224
|
+
|
|
225
|
+
## Search and reading files
|
|
226
|
+
|
|
227
|
+
### "PARTIAL: the search stopped at its 1.5 s limit ... Call again with continue_from=N"
|
|
228
|
+
The search ran out of time. Call again with the `continue_from` value it gives, or narrow the search with `path_pattern`.
|
|
229
|
+
<!-- source: niro-local src/niro_local/mcp/source_tools.py:1082-1167 -->
|
|
230
|
+
|
|
231
|
+
### `code_grep` in exact mode refuses my text.
|
|
232
|
+
Known: exact mode can refuse text that is not a valid regular expression (a search pattern). Escape the special characters.
|
|
233
|
+
<!-- source: niro-local docs/NIRO-LOCAL-ISSUES.md:4019 (open) -->
|
|
234
|
+
|
|
235
|
+
### "Refused: '<x>' is outside this worktree" or "leads outside this worktree through a symlink"
|
|
236
|
+
The tools read only files inside the folder they answer for.
|
|
237
|
+
<!-- source: niro-local src/niro_local/mcp/source_tools.py:907, :924 -->
|
|
238
|
+
|
|
239
|
+
### `get_source_code` refuses a file.
|
|
240
|
+
The answer gives one of these reasons:
|
|
241
|
+
|
|
242
|
+
- the name marks it as a secret or credential file;
|
|
243
|
+
- no service in the folder reads its folder;
|
|
244
|
+
- it is a symlink;
|
|
245
|
+
- it is not a file the tools read;
|
|
246
|
+
- the build skips it;
|
|
247
|
+
- `.gitignore` covers it;
|
|
248
|
+
- it is an editor scratch file.
|
|
249
|
+
<!-- source: niro-local src/niro_local/mcp/source_tools.py:825-850 -->
|
|
250
|
+
|
|
251
|
+
## Tools
|
|
252
|
+
|
|
253
|
+
### Where are `find_reusable_code` and `find_known_issues`?
|
|
254
|
+
They need LLM documentation, which this release does not include.
|
|
255
|
+
<!-- source: niro-local src/niro_local/reuse/__init__.py:37-40 -->
|
|
256
|
+
|
|
257
|
+
### "<tool> is not answered for this folder: it is indexed locally by niro-local, whose graph holds structure and not source text or documentation"
|
|
258
|
+
A tool from hosted Niro was asked, and the local graph has nothing for it.
|
|
259
|
+
<!-- source: src/mcp/localBackend.js:636-652 -->
|
|
260
|
+
|
|
261
|
+
### "Nothing in this folder's graph serves <path>, so the question was not answered"
|
|
262
|
+
No route in this folder matches the path asked about.
|
|
263
|
+
<!-- source: src/mcp/localBackend.js:416-428 -->
|
|
264
|
+
|
|
265
|
+
### "The first 10 of N names are answered above."
|
|
266
|
+
A batch question answers 10 names at most. Ask again for the rest.
|
|
267
|
+
<!-- source: src/mcp/localBackend.js:100, :501 -->
|
|
268
|
+
|
|
269
|
+
### A question about another folder gets "Nothing in the graph".
|
|
270
|
+
The tools answer for the folder your agent started in. Run `niro ask` from the other folder.
|
|
271
|
+
<!-- source: src/mcp/localMode.js:39 (RELEASE_WORKTREE_SENTENCE); niro-local docs/HOW-TO.md:644-692 -->
|
|
272
|
+
|
|
273
|
+
### How do I report a wrong answer?
|
|
274
|
+
Email help@niro.ai with the question, the answer and what you expected. The coverage audit also reports many gaps by itself. To check an answer before you report it, see [evaluate-what-niro-did.md](evaluate-what-niro-did.md).
|
|
275
|
+
<!-- source: help@niro.ai: Niraj, 2026-11-10; src/lib/auditUpload.js -->
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Features of hosted Niro
|
|
2
|
+
|
|
3
|
+
**Two features need hosted Niro: pull request review, and root cause analysis.** Hosted Niro runs on Niro's servers. This version of niro-cli answers everything from the graph on your own computer, and in Niro's own words, these two serve needs "which the local graph does not answer".
|
|
4
|
+
<!-- source: src/lib/cloudGuard.js:66-69; src/commands/takeover.js:43-46 -->
|
|
5
|
+
|
|
6
|
+
- **Pull request review.** Niro reviews each pull request against the full graph of your code: what the change reaches, routes removed, and calls across services. It is not a review bot, such as Cursor Bugbot.
|
|
7
|
+
<!-- source: ai-assistant InternalCodeReviewController (/internal/code-review/impact, /cross-impact, /removed-endpoints, /context, /neighbourhood), lines 39-142 -->
|
|
8
|
+
- **Root cause analysis (RCA).** Connect your alert sources (for example Sentry, Slack, Jira or CloudWatch). Niro traces each alert back to its likely cause in the code.
|
|
9
|
+
<!-- source: monorepo CLAUDE.md service map (niro-connectors: Sentry, Slack, Jira, CloudWatch/SNS, log shippers); docs/cloud-README.md:37-38; ai-assistant BugController /api/bugs, lines 44-307 -->
|
|
10
|
+
|
|
11
|
+
Agents in a web browser (such as Claude or ChatGPT on their websites) also need hosted Niro. See [connect-web-agents.md](connect-web-agents.md).
|
|
12
|
+
|
|
13
|
+
## Where to go
|
|
14
|
+
|
|
15
|
+
Sign up, or sign in, at **console.niroai.dev**. The old guide to the hosted product is kept in [cloud-README.md](cloud-README.md).
|
|
16
|
+
<!-- source: Niraj, 2026-11-10 (sign-up at console.niroai.dev); src/lib/planUsage.js:90-92 -->
|
|
17
|
+
|
|
18
|
+
## Questions
|
|
19
|
+
|
|
20
|
+
### Can I switch this `niro` to hosted mode?
|
|
21
|
+
No. This version is local only, by design: hosted mode is fixed in the package, and no setting turns it on.
|
|
22
|
+
<!-- source: src/lib/release.js:13-14, :33 -->
|
|
23
|
+
|
|
24
|
+
### Where did `niro new-temp-project`, `niro projects` and the other hosted commands go?
|
|
25
|
+
They belong to hosted Niro, and are not in this version. The local `niro projects` and `niro remove` work on your own graph.
|
|
26
|
+
<!-- source: src/index.js:474-487; src/commands/engineRoutes.js:42-45 -->
|
|
27
|
+
|
|
28
|
+
### "`niro watch <path>` syncs a folder to Niro's cloud, which this release does not include."
|
|
29
|
+
The background watcher (`niro service install`) keeps your local folders current instead.
|
|
30
|
+
<!-- source: src/commands/watch.js:130-135 -->
|
|
31
|
+
|
|
32
|
+
### Can I use local and hosted Niro together?
|
|
33
|
+
Not yet established. This guide will say when it is.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# How the graph works
|
|
2
|
+
|
|
3
|
+
**The graph is a map of your code made of things and links.** The things are parts of your code, such as methods, classes, files, routes, tables and events. The links say how they relate: this method calls that one, this class extends that one, this method writes to that table.
|
|
4
|
+
|
|
5
|
+
**An everyday comparison:** a family tree, but for code. You can start from any person and walk to their parents, their children, or their cousins.
|
|
6
|
+
|
|
7
|
+
## What is in it
|
|
8
|
+
|
|
9
|
+
| Things (nodes) | Links (edges) |
|
|
10
|
+
|---|---|
|
|
11
|
+
| Methods and constructors, classes, interfaces, enums, files (modules), outside libraries, outbound HTTP calls, data stores (tables, collections, queues), events | Calls; has-method; imports; uses-type; returns; extends; implements; overrides; reads-from, writes-to, deletes-from (data); calls-HTTP; handled-by (a route to the method that serves it); triggers-event and event-handled-by |
|
|
12
|
+
<!-- source: get_index_status on a built folder (niro-local, 2026-11-10): node labels METHOD, MODULE, CLASS, EXTERNAL_MODULE, HTTPCALL, CONSTRUCTOR, DATA_RESOURCE, INTERFACE, EVENT, ENUM; edge types CALLS, HAS_METHOD, IMPORTS, USES_TYPE, EXPORTS, RETURNS, READS_FROM, CALLS_HTTP, WRITES_TO, EXTENDS, HANDLED_BY, DELETES_FROM, TRIGGERS_EVENT, REGISTERS_HANDLER, OVERRIDES, CALLS_HTTP_CANDIDATE, EVENT_HANDLED_BY, IMPLEMENTS -->
|
|
13
|
+
|
|
14
|
+
**What is not in it: your source code.** The graph keeps names, places (file and line) and links. When a tool shows you code, it reads the file from disk at that moment.
|
|
15
|
+
<!-- source: niro-local src/niro_local/mcp/freshness.py:305-308 (of upstream Niro: "its source tools read the graph's stored copy and ours do not") -->
|
|
16
|
+
|
|
17
|
+
## How it is built
|
|
18
|
+
|
|
19
|
+
1. Niro reads each source file and works out its structure. This step is called parsing.
|
|
20
|
+
2. It then matches every name used to the thing it names, across the whole project. This step is called resolving. For example, it finds which `send` method a call to `send()` reaches.
|
|
21
|
+
3. It recognises routes, outbound calls, data access and events from tables of known libraries and frameworks.
|
|
22
|
+
<!-- source: niro-local CLAUDE.md "Three stores" and P4 (profile data); src/niro_local/profiles/ -->
|
|
23
|
+
|
|
24
|
+
Building and keeping it current: [builds-and-updates.md](builds-and-updates.md).
|
|
25
|
+
|
|
26
|
+
## How to read an answer
|
|
27
|
+
|
|
28
|
+
- **"confidence: partial"** means Niro listed everything it could place, and found some calls it could not. It says how many, and where to look. A common cause is a call made on a value whose type the code does not state.
|
|
29
|
+
<!-- source: niro-local src/niro_local/mcp/chains.py:1945-1947, :2053; src/niro_local/mcp/impact.py:1060 -->
|
|
30
|
+
- **"has_more: true"** means the answer was cut to a page. Ask again with `offset` or a narrower question.
|
|
31
|
+
<!-- source: niro-local src/niro_local/mcp/impact.py:1064 -->
|
|
32
|
+
- **`[possible]`** marks a caller that might reach the method, but not certainly.
|
|
33
|
+
- **"inferred, target unconfirmed"** marks an HTTP link where Niro could not work out the address being called. It is listed separately, and not counted in the risk.
|
|
34
|
+
<!-- source: niro-local src/niro_local/mcp/chains.py:377; src/niro_local/mcp/impact.py:1018-1022, :1140 -->
|
|
35
|
+
- **A stand-in** is a placeholder for code the graph could not place, for example a method of an outside library. A call that lands on a stand-in is real, but Niro did not find its target in your project.
|
|
36
|
+
- **"No code in the project calls it: it is called by its framework"** means a framework calls the method for you, for example a web route handler.
|
|
37
|
+
<!-- source: niro-local src/niro_local/mcp/chains.py:2075 -->
|
|
38
|
+
|
|
39
|
+
## What it cannot see
|
|
40
|
+
|
|
41
|
+
- **Routes and calls built while the program runs**, from values computed at that time.
|
|
42
|
+
<!-- source: niro-local src/niro_local/mcp/server.py:3876-3881, :3924 -->
|
|
43
|
+
- **Files over 2 MB, and files that take more than 20 seconds to read.** Both limits can be raised.
|
|
44
|
+
<!-- source: niro-local src/niro_local/walk.py:79; src/niro_local/build/parse_time_limit.py:44-57 -->
|
|
45
|
+
- **Languages it has no reader for.** See [supported-overview.md](supported-overview.md).
|
|
46
|
+
|
|
47
|
+
The known gaps, by kind, are in [faq-wrong-or-missing-answers.md](faq-wrong-or-missing-answers.md).
|
package/docs/index.md
ADDED
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
# Niro documentation
|
|
2
|
+
|
|
3
|
+
**Niro builds a map of your code on your own computer.** The map is called the code graph. It records which method calls which, which web addresses (routes) your services answer, which other services they call, and which tables and message topics they read and write. Coding agents ask the graph instead of searching through files, and you can ask it from the terminal.
|
|
4
|
+
<!-- source: README.md (user guide); src/lib/release.js:33 (cloud: false, so everything is answered on this machine); src/mcp/server.js:359 -->
|
|
5
|
+
|
|
6
|
+
This documentation ships inside the `@niroai/niro` package, so it is on your computer even when you are offline.
|
|
7
|
+
<!-- source: package.json "files" (docs/*.md) -->
|
|
8
|
+
|
|
9
|
+
## Start here
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
npm install -g @niroai/niro
|
|
13
|
+
cd your-project
|
|
14
|
+
niro start
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
`niro start` runs five steps:
|
|
18
|
+
|
|
19
|
+
1. It checks this computer.
|
|
20
|
+
2. It signs you in.
|
|
21
|
+
3. It installs the local engine (the program that builds and answers from the graph).
|
|
22
|
+
4. It builds the graph for the folder you are in.
|
|
23
|
+
5. It connects your coding agents.
|
|
24
|
+
|
|
25
|
+
If a step stops, run `niro start` again: it carries on from the first step that did not finish.
|
|
26
|
+
<!-- source: src/commands/start.js:1-27, :61 (steps machine, sign-in, engine, build, assistant) -->
|
|
27
|
+
|
|
28
|
+
## Find what you need
|
|
29
|
+
|
|
30
|
+
| You want to | Read |
|
|
31
|
+
|---|---|
|
|
32
|
+
| See where Niro helps in how you build software | [lifecycle-overview.md](lifecycle-overview.md) |
|
|
33
|
+
| Debug, change, review or test code, step by step | the playbooks, listed in [lifecycle-overview.md](lifecycle-overview.md) |
|
|
34
|
+
| See how Niro's savings are measured, and check them yourself | [tokens-speed-and-accuracy.md](tokens-speed-and-accuracy.md), [evaluate-what-niro-did.md](evaluate-what-niro-did.md) |
|
|
35
|
+
| Connect a coding agent, or use Niro from the terminal | [connect-overview.md](connect-overview.md) |
|
|
36
|
+
| Fix an error message | [troubleshooting.md](troubleshooting.md), then [reference-messages.md](reference-messages.md) |
|
|
37
|
+
| Know what leaves your computer | [what-leaves-your-machine.md](what-leaves-your-machine.md) |
|
|
38
|
+
| Check whether your language or framework is supported | [supported-overview.md](supported-overview.md) |
|
|
39
|
+
| Look up a command, a tool, a setting or a limit | [reference-cli.md](reference-cli.md), [reference-mcp-tools.md](reference-mcp-tools.md), [reference-environment-variables.md](reference-environment-variables.md), [reference-limits.md](reference-limits.md) |
|
|
40
|
+
| Understand plans and the line limit | [licence-and-plans.md](licence-and-plans.md) |
|
|
41
|
+
| Remove Niro | [uninstall.md](uninstall.md) |
|
|
42
|
+
| Get pull request review or root cause analysis | [hosted-only.md](hosted-only.md) |
|
|
43
|
+
|
|
44
|
+
## All pages
|
|
45
|
+
|
|
46
|
+
**Where Niro fits:**
|
|
47
|
+
- [lifecycle-overview.md](lifecycle-overview.md)
|
|
48
|
+
- [lifecycle-plan-and-design.md](lifecycle-plan-and-design.md)
|
|
49
|
+
- [lifecycle-write-code.md](lifecycle-write-code.md)
|
|
50
|
+
- [lifecycle-review.md](lifecycle-review.md)
|
|
51
|
+
- [lifecycle-test.md](lifecycle-test.md)
|
|
52
|
+
- [lifecycle-debug.md](lifecycle-debug.md)
|
|
53
|
+
- [lifecycle-onboarding.md](lifecycle-onboarding.md)
|
|
54
|
+
- [lifecycle-security-and-privacy.md](lifecycle-security-and-privacy.md)
|
|
55
|
+
- Playbooks:
|
|
56
|
+
- [debug an error message or a stack trace](playbook-debug-exception.md)
|
|
57
|
+
- [debug a wrong value](playbook-debug-wrong-value.md)
|
|
58
|
+
- [debug a failing call between services](playbook-debug-failing-service-call.md)
|
|
59
|
+
- ["it broke after my change"](playbook-debug-after-a-change.md)
|
|
60
|
+
- [debug config and environment](playbook-debug-config.md)
|
|
61
|
+
- [debug a slow path](playbook-debug-slow-path.md)
|
|
62
|
+
- [change code safely](playbook-change-safely.md)
|
|
63
|
+
- [add a feature](playbook-add-a-feature.md)
|
|
64
|
+
- [review a change](playbook-review-a-change.md)
|
|
65
|
+
- [test a change](playbook-test-a-change.md)
|
|
66
|
+
- [learn a new codebase](playbook-onboard.md)
|
|
67
|
+
- [data stores and events](playbook-data-and-events.md)
|
|
68
|
+
- [answer-shapes.md](answer-shapes.md): ask for less with `answer`
|
|
69
|
+
- [tokens-speed-and-accuracy.md](tokens-speed-and-accuracy.md)
|
|
70
|
+
- [evaluate-what-niro-did.md](evaluate-what-niro-did.md)
|
|
71
|
+
|
|
72
|
+
**Ways in:**
|
|
73
|
+
- [connect-overview.md](connect-overview.md)
|
|
74
|
+
- [connect-terminal.md](connect-terminal.md)
|
|
75
|
+
- [connect-your-ai-assistant.md](connect-your-ai-assistant.md)
|
|
76
|
+
- [connect-review-bots.md](connect-review-bots.md)
|
|
77
|
+
- [connect-web-agents.md](connect-web-agents.md)
|
|
78
|
+
- [connect-ci.md](connect-ci.md)
|
|
79
|
+
- [connect-team-server.md](connect-team-server.md)
|
|
80
|
+
- One page per agent:
|
|
81
|
+
- [agent-claude-code.md](agent-claude-code.md)
|
|
82
|
+
- [agent-codex.md](agent-codex.md)
|
|
83
|
+
- [agent-claude-desktop.md](agent-claude-desktop.md)
|
|
84
|
+
- [agent-cursor.md](agent-cursor.md)
|
|
85
|
+
- [agent-windsurf.md](agent-windsurf.md)
|
|
86
|
+
- [agent-vscode.md](agent-vscode.md)
|
|
87
|
+
- [agent-gemini-cli.md](agent-gemini-cli.md)
|
|
88
|
+
- [agent-copilot-cli.md](agent-copilot-cli.md)
|
|
89
|
+
- [agent-factory.md](agent-factory.md)
|
|
90
|
+
- [agent-goose.md](agent-goose.md)
|
|
91
|
+
- [agent-opencode.md](agent-opencode.md)
|
|
92
|
+
- [agent-cline.md](agent-cline.md)
|
|
93
|
+
- [agent-kiro.md](agent-kiro.md)
|
|
94
|
+
- [agent-antigravity.md](agent-antigravity.md)
|
|
95
|
+
|
|
96
|
+
**How it works:**
|
|
97
|
+
- [how-the-graph-works.md](how-the-graph-works.md)
|
|
98
|
+
- [builds-and-updates.md](builds-and-updates.md)
|
|
99
|
+
- [worktrees-and-branches.md](worktrees-and-branches.md)
|
|
100
|
+
- [where-things-are-stored.md](where-things-are-stored.md)
|
|
101
|
+
- [what-leaves-your-machine.md](what-leaves-your-machine.md)
|
|
102
|
+
- [secrets-and-masking.md](secrets-and-masking.md)
|
|
103
|
+
- [licence-and-plans.md](licence-and-plans.md)
|
|
104
|
+
- [coverage-audit-and-consent.md](coverage-audit-and-consent.md)
|
|
105
|
+
- [configuring-a-folder.md](configuring-a-folder.md)
|
|
106
|
+
- [uninstall.md](uninstall.md)
|
|
107
|
+
|
|
108
|
+
**What is supported:**
|
|
109
|
+
- [supported-overview.md](supported-overview.md)
|
|
110
|
+
- One page per language:
|
|
111
|
+
- [C](supported-c.md)
|
|
112
|
+
- [C++](supported-cpp.md)
|
|
113
|
+
- [C#](supported-csharp.md)
|
|
114
|
+
- [Go](supported-go.md)
|
|
115
|
+
- [Java](supported-java.md)
|
|
116
|
+
- [JavaScript](supported-javascript.md)
|
|
117
|
+
- [Kotlin](supported-kotlin.md)
|
|
118
|
+
- [PHP](supported-php.md)
|
|
119
|
+
- [Python](supported-python.md)
|
|
120
|
+
- [Ruby](supported-ruby.md)
|
|
121
|
+
- [Rust](supported-rust.md)
|
|
122
|
+
- [Swift](supported-swift.md)
|
|
123
|
+
- [TypeScript](supported-typescript.md)
|
|
124
|
+
|
|
125
|
+
**Reference:**
|
|
126
|
+
- [reference-cli.md](reference-cli.md)
|
|
127
|
+
- [reference-engine-commands.md](reference-engine-commands.md)
|
|
128
|
+
- [reference-mcp-tools.md](reference-mcp-tools.md)
|
|
129
|
+
- [reference-environment-variables.md](reference-environment-variables.md)
|
|
130
|
+
- [reference-config-files.md](reference-config-files.md)
|
|
131
|
+
- [reference-exit-codes.md](reference-exit-codes.md)
|
|
132
|
+
- [reference-messages.md](reference-messages.md)
|
|
133
|
+
- [reference-limits.md](reference-limits.md)
|
|
134
|
+
|
|
135
|
+
**Help:**
|
|
136
|
+
- [troubleshooting.md](troubleshooting.md)
|
|
137
|
+
- FAQ pages:
|
|
138
|
+
- [install and setup](faq-install-and-setup.md)
|
|
139
|
+
- [login and account](faq-login-and-account.md)
|
|
140
|
+
- [licence and plans](faq-licence-and-plans.md)
|
|
141
|
+
- [indexing](faq-indexing.md)
|
|
142
|
+
- [wrong or missing answers](faq-wrong-or-missing-answers.md)
|
|
143
|
+
- [assistants and MCP](faq-assistants-and-mcp.md)
|
|
144
|
+
- [worktrees and branches](faq-worktrees-and-branches.md)
|
|
145
|
+
- [privacy and security](faq-privacy-and-security.md)
|
|
146
|
+
- [performance](faq-performance.md)
|
|
147
|
+
- [updates](faq-updates.md)
|
|
148
|
+
- [uninstall](faq-uninstall.md)
|
|
149
|
+
- [offline use](faq-offline.md)
|
|
150
|
+
- [feedback and receipts](faq-feedback-and-receipts.md)
|
|
151
|
+
|
|
152
|
+
**Hosted Niro:**
|
|
153
|
+
- [hosted-only.md](hosted-only.md)
|
|
154
|
+
|
|
155
|
+
**For agents:**
|
|
156
|
+
- `llms.txt` is a short index of these pages.
|
|
157
|
+
- `llms-full.txt` is every page in one file.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Licence and plans
|
|
2
|
+
|
|
3
|
+
**Niro runs on your computer, but it needs a Niro account.** The account carries your plan, and the plan sets how many lines of code you can index. You sign up at **console.niroai.dev**.
|
|
4
|
+
<!-- source: sign-up at console.niroai.dev: Niraj, 2026-11-10; src/lib/planUsage.js:90-92 (console address) -->
|
|
5
|
+
|
|
6
|
+
## The plans
|
|
7
|
+
|
|
8
|
+
| Plan | Lines you can index |
|
|
9
|
+
|---|---|
|
|
10
|
+
| **Free** | 500,000 lines |
|
|
11
|
+
| **Free, with code sharing on** | No line limit |
|
|
12
|
+
| **Pro trial** | 30 days |
|
|
13
|
+
<!-- source: Free 500,000 lines, unlimited when sharing code, 30-day Pro trial: Niraj, 2026-11-10. The CLI reads the limit from the licence, as max_lines, and a missing max_lines means no limit: src/lib/planUsage.js:53-66 -->
|
|
14
|
+
|
|
15
|
+
`niro plan` shows your plan, the lines used, and the folders using them. The limit itself comes from your account, not from the `niro` command.
|
|
16
|
+
<!-- source: src/commands/plan.js:57-86; src/commands/plan.js:57-61 -->
|
|
17
|
+
|
|
18
|
+
### What "code sharing" means
|
|
19
|
+
|
|
20
|
+
**Code sharing is a switch on your account.** It is called "Share redacted code" and lives in the console, at **Settings, Privacy** (`console.niroai.dev/settings?tab=privacy`). It is not the same as the coverage audit, which is sent on every plan (see [coverage-audit-and-consent.md](coverage-audit-and-consent.md)).
|
|
21
|
+
<!-- source: src/commands/plan.js:63-67 (option text and the settings?tab=privacy address); src/lib/auditUpload.js:27-30 (the audit is sent on every plan) -->
|
|
22
|
+
|
|
23
|
+
With sharing on:
|
|
24
|
+
|
|
25
|
+
- **On the Free plan, there is no line limit.** `niro plan` shows "no line limit while you share".
|
|
26
|
+
- **The background watcher shares your code by itself.** Every 5 minutes it sends the files Niro indexes in each folder on your computer: the source files it parses and the config, build and text files it reads, never a gitignored file, a real `.env`, a key or `node_modules`. Secrets are masked and author and company names removed on your computer first. The first time, a folder's whole indexed set goes; after that, only files that changed. Turning sharing off in the console stops it: nothing more is sent after the next check.
|
|
27
|
+
- **You can keep a folder out** while sharing stays on: `niro share exclude <folder>` (and every folder inside it). `niro share` lists the folders kept out, `niro share include <folder>` shares one again, and `niro plan` lists them too.
|
|
28
|
+
- **You may also send one folder at once**, with `niro audit-push-repo`, and answer yes. It sends the same files with the same redaction, and refuses a folder you excluded.
|
|
29
|
+
<!-- source: src/lib/planUsage.js:53-66; src/lib/shareCode.js (background sharing), src/lib/shareFiles.js (which files, redaction), src/lib/shareExclusions.js and src/commands/share.js (exclusions); src/lib/repoPush.js -->
|
|
30
|
+
|
|
31
|
+
`niro plan` shows the switch in its "Help improve Niro" block.
|
|
32
|
+
<!-- source: src/lib/planUsage.js sharingBlock -->
|
|
33
|
+
|
|
34
|
+
## How lines are counted
|
|
35
|
+
|
|
36
|
+
- **Every line of every file Niro reads counts,** blank lines and comments included.
|
|
37
|
+
- **Two copies of the same repository count once,** by the larger. So branches and worktrees do not use up your plan.
|
|
38
|
+
- **Different repositories add up.**
|
|
39
|
+
- **A folder inside another indexed folder is counted once.**
|
|
40
|
+
<!-- source: niro-local src/niro_local/licence/limit.py:9-60; src/lib/planUsage.js:1-21; src/commands/plan.js:57 -->
|
|
41
|
+
|
|
42
|
+
## At the limit
|
|
43
|
+
|
|
44
|
+
1. **The build that crosses the limit finishes.**
|
|
45
|
+
2. **After that, a new folder is refused.** You see "Not built: this machine already holds N lines of code, over the M line limit", and a page in the console opens to help you choose what to do.
|
|
46
|
+
3. **Folders already indexed keep rebuilding.** So do new branches and worktrees of them.
|
|
47
|
+
<!-- source: src/lib/planUsage.js:71-87; src/commands/initLocal.js:59-62; src/commands/start.js:305-318 -->
|
|
48
|
+
|
|
49
|
+
Your three ways forward, as `niro plan` lists them:
|
|
50
|
+
|
|
51
|
+
1. **Turn on "Share redacted code"** in the console, for no line limit on the Free plan.
|
|
52
|
+
2. **Ask for a Pro free trial** at `console.niroai.dev/request?plan=pro`.
|
|
53
|
+
3. **Stay under the limit.** Stop indexing a folder with `niro plan remove <folder>`.
|
|
54
|
+
<!-- source: src/commands/plan.js:63-67, :76-86 -->
|
|
55
|
+
|
|
56
|
+
## How the licence works
|
|
57
|
+
|
|
58
|
+
**Every time the engine starts, niro-cli asks Niro's billing service for a short-lived licence (a lease).** It hands the licence to the engine directly, without writing it to disk, and renews it before it runs out.
|
|
59
|
+
<!-- source: src/lib/lease.js:9-25, :55-57, :136-148 -->
|
|
60
|
+
|
|
61
|
+
- **Offline:** if the service cannot be reached, the engine keeps working for up to a day. You see "Could not renew the local engine's licence: ... It keeps working offline for up to a day."
|
|
62
|
+
<!-- source: src/lib/lease.js:282-286; niro-local src/niro_local/licence/report.py:122 -->
|
|
63
|
+
- **Refused:** if the service refuses (for example, the account is closed), the engine stops at once, with "Niro will not license the local engine: <reason>".
|
|
64
|
+
<!-- source: src/lib/lease.js:271-276 -->
|
|
65
|
+
- **Typed by hand:** this is why `niro-local build` typed by hand is refused, and `niro build` is the command to use. The engine gets its licence only from niro-cli.
|
|
66
|
+
<!-- source: src/lib/release.js:25-31; niro-local src/niro_local/commands.py:1-72 -->
|
|
67
|
+
|
|
68
|
+
## Your account
|
|
69
|
+
|
|
70
|
+
- **Sign up:** console.niroai.dev.
|
|
71
|
+
- **Delete your account:** email help@niro.ai.
|
|
72
|
+
<!-- source: Niraj, 2026-11-10 -->
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Debug with Niro
|
|
2
|
+
|
|
3
|
+
**When something fails, you want facts about the code around the failure:** where an error comes from and who catches it, who writes a wrong value, which service answers a failing call, what a change reached, which setting a call depends on, and what a slow method does. Niro answers each of these from the code. The graph answers are the same every time on the same graph; a text search (`code_grep`) can stop early on a busy machine, and then says PARTIAL and how to carry on. An exception is an error a method throws, which a caller further up may catch.
|
|
4
|
+
<!-- source: niro-local docs/NIRO-LOCAL-ISSUES.md entry "2026-11-10: code_grep counts change with machine load ..." (OPEN, committed f1a9fe59); claim check round 1 reruns (59 of 59 graph answers byte-identical) -->
|
|
5
|
+
|
|
6
|
+
## Pick the playbook by symptom
|
|
7
|
+
|
|
8
|
+
| What you see | First tools (with the short `answer` form) | Playbook |
|
|
9
|
+
|---|---|---|
|
|
10
|
+
| An error message or a stack trace | `code_grep` for the message (`answer=locations`), `get_source_code`, `get_exception_flow` both ways | [playbook-debug-exception.md](playbook-debug-exception.md) |
|
|
11
|
+
| A wrong value in a table or a response | `get_data_resource_usage`, `code_grep` for the setter (`answer=names`), `get_impact_analysis` (`answer=names`) | [playbook-debug-wrong-value.md](playbook-debug-wrong-value.md) |
|
|
12
|
+
| A call to another service fails | `find_outbound_http_calls`, `find_handler`, `get_service_topology`, `niro route-rule unconnected` | [playbook-debug-failing-service-call.md](playbook-debug-failing-service-call.md) |
|
|
13
|
+
| It broke after a change | `get_blast_radius` with `method_fqns` (`answer=count`, then `names`) | [playbook-debug-after-a-change.md](playbook-debug-after-a-change.md) |
|
|
14
|
+
| It works here and not there | `niro env list`, `code_grep` over config files, `niro route-rule unconnected` | [playbook-debug-config.md](playbook-debug-config.md) |
|
|
15
|
+
| A path is slow | `get_call_chain direction=callees` (`answer=count`, then full), `get_data_resource_usage` | [playbook-debug-slow-path.md](playbook-debug-slow-path.md) |
|
|
16
|
+
| A message was sent and nothing happened | `get_event_producers_and_handlers`, `find_orphaned_events` | [playbook-data-and-events.md](playbook-data-and-events.md) |
|
|
17
|
+
<!-- source: the playbook pages linked, each run on Keycloak or the synthetic java-mono corpus with niro-local 43cce717 (2026-11-10) -->
|
|
18
|
+
|
|
19
|
+
Every playbook shows the real answers, says why they are complete or where they are not, and compares them with grep and file reads.
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## How
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
niro ask get_exception_flow method_fqn=PaymentService.charge
|
|
26
|
+
niro ask get_exception_flow method_fqn=PaymentService.charge direction=upstream exception_type=TimeoutException
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
- **Downstream** (the default) lists the exceptions that can leave the method, and where each is thrown and caught, 3 levels deep by default and 5 at most.
|
|
30
|
+
- **Upstream** lists which callers must handle a given exception. It needs `exception_type`. Without it, the answer is "Error: direction=upstream needs 'exception_type'".
|
|
31
|
+
<!-- source: niro-local src/niro_local/mcp/server.py:1754 (inputs), :2694 (the upstream error); src/niro_local/mcp/queries.py:2537-2538 (depth 3, max 5) -->
|
|
32
|
+
|
|
33
|
+
Two other tools help while debugging:
|
|
34
|
+
|
|
35
|
+
- `get_call_chain` with `purpose=DEBUG` adds the source code of the method you ask about.
|
|
36
|
+
- `find_handler` tells you which code answers a call to another service.
|
|
37
|
+
<!-- source: niro-local src/niro_local/mcp/purpose.py:41 (DEBUG turns source on); src/niro_local/mcp/server.py:1870 -->
|
|
38
|
+
|
|
39
|
+
## Known limits
|
|
40
|
+
|
|
41
|
+
- An exception that is caught and wrapped in another can still be listed as escaping.
|
|
42
|
+
- A catch is matched only by the exact exception name.
|
|
43
|
+
<!-- source: niro-local docs/NIRO-LOCAL-ISSUES.md:1560, :3230 (open) -->
|
|
44
|
+
|
|
45
|
+
## Root cause analysis
|
|
46
|
+
|
|
47
|
+
**Root cause analysis from your alerts (for example from Sentry, Slack or Jira) is a hosted Niro feature.** The local graph does not answer it. See [hosted-only.md](hosted-only.md).
|
|
48
|
+
<!-- source: src/commands/takeover.js:43-46; docs/cloud-README.md:37-38 -->
|