@tikoci/centrs 0.1.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 (182) hide show
  1. package/CHANGELOG.md +207 -0
  2. package/GLOSSARY.txt +420 -0
  3. package/README.md +196 -0
  4. package/SECURITY.md +30 -0
  5. package/commands/AGENTS.md +50 -0
  6. package/commands/btest/README.md +257 -0
  7. package/commands/btest/examples.md +190 -0
  8. package/commands/check/README.md +59 -0
  9. package/commands/devices/README.md +405 -0
  10. package/commands/devices/examples.md +488 -0
  11. package/commands/discover/README.md +170 -0
  12. package/commands/discover/examples.md +98 -0
  13. package/commands/execute/README.md +208 -0
  14. package/commands/execute/examples.md +353 -0
  15. package/commands/mcp/README.md +260 -0
  16. package/commands/mcp/examples.md +158 -0
  17. package/commands/retrieve/README.md +209 -0
  18. package/commands/retrieve/examples.md +306 -0
  19. package/commands/settings/README.md +69 -0
  20. package/commands/stream/README.md +70 -0
  21. package/commands/terminal/README.md +177 -0
  22. package/commands/terminal/examples.md +144 -0
  23. package/commands/transfer/README.md +315 -0
  24. package/commands/transfer/examples.md +368 -0
  25. package/docs/CONSTITUTION.md +417 -0
  26. package/docs/MATRIX.md +224 -0
  27. package/docs/errors/README.md +74 -0
  28. package/docs/errors/auth/failed.md +9 -0
  29. package/docs/errors/cdb/already-exists.md +9 -0
  30. package/docs/errors/cdb/created.md +9 -0
  31. package/docs/errors/cdb/decrypt-failed.md +9 -0
  32. package/docs/errors/cdb/empty-group.md +9 -0
  33. package/docs/errors/cdb/invalid-option.md +9 -0
  34. package/docs/errors/cdb/invalid-record.md +9 -0
  35. package/docs/errors/cdb/not-found-target.md +9 -0
  36. package/docs/errors/cdb/not-found.md +9 -0
  37. package/docs/errors/cdb/override-applied.md +9 -0
  38. package/docs/errors/cdb/parse-failed.md +9 -0
  39. package/docs/errors/cdb/password-not-needed.md +9 -0
  40. package/docs/errors/cdb/password-required.md +9 -0
  41. package/docs/errors/cdb/reserved-key.md +9 -0
  42. package/docs/errors/cdb/reserved-option.md +9 -0
  43. package/docs/errors/cdb/target-not-registered.md +9 -0
  44. package/docs/errors/cdb/unknown-field.md +9 -0
  45. package/docs/errors/cdb/unknown-option.md +9 -0
  46. package/docs/errors/cdb/write-not-permitted.md +9 -0
  47. package/docs/errors/discover/broadcast-unavailable.md +9 -0
  48. package/docs/errors/discover/failed.md +9 -0
  49. package/docs/errors/identity/ambiguous.md +9 -0
  50. package/docs/errors/identity/no-match.md +9 -0
  51. package/docs/errors/input/invalid-command.md +9 -0
  52. package/docs/errors/input/invalid-match.md +9 -0
  53. package/docs/errors/input/invalid-path.md +9 -0
  54. package/docs/errors/input/invalid-routeros-path.md +9 -0
  55. package/docs/errors/input/invalid-target.md +9 -0
  56. package/docs/errors/input/local-file-not-found.md +9 -0
  57. package/docs/errors/input/mac-address.md +9 -0
  58. package/docs/errors/input/max-results-exceeded.md +9 -0
  59. package/docs/errors/internal/devices-failed.md +9 -0
  60. package/docs/errors/internal/mcp-start.md +9 -0
  61. package/docs/errors/internal/mcp-tool.md +9 -0
  62. package/docs/errors/internal/native-api-length.md +9 -0
  63. package/docs/errors/internal/unhandled.md +9 -0
  64. package/docs/errors/internal/unreachable.md +9 -0
  65. package/docs/errors/mndp/encode-failed.md +9 -0
  66. package/docs/errors/mndp/listen-failed.md +9 -0
  67. package/docs/errors/mndp/malformed.md +9 -0
  68. package/docs/errors/routeros/api-fatal.md +9 -0
  69. package/docs/errors/routeros/api-protocol.md +9 -0
  70. package/docs/errors/routeros/api-trap.md +9 -0
  71. package/docs/errors/routeros/btest-protocol.md +12 -0
  72. package/docs/errors/routeros/btest-too-many-sessions.md +9 -0
  73. package/docs/errors/routeros/command-failed.md +14 -0
  74. package/docs/errors/routeros/ec-srp5-protocol.md +11 -0
  75. package/docs/errors/routeros/error.md +9 -0
  76. package/docs/errors/routeros/invalid-value.md +14 -0
  77. package/docs/errors/routeros/mac-telnet-error.md +9 -0
  78. package/docs/errors/routeros/mac-telnet-not-ready.md +9 -0
  79. package/docs/errors/routeros/mac-telnet-protocol.md +9 -0
  80. package/docs/errors/routeros/mac-telnet-unsupported-auth.md +9 -0
  81. package/docs/errors/routeros/protocol-not-implemented.md +9 -0
  82. package/docs/errors/routeros/request-failed.md +9 -0
  83. package/docs/errors/routeros/session-closed.md +13 -0
  84. package/docs/errors/routeros/unknown-attribute.md +13 -0
  85. package/docs/errors/routeros/unknown-path.md +15 -0
  86. package/docs/errors/routeros/unsupported-capability.md +9 -0
  87. package/docs/errors/settings/invalid-boolean.md +9 -0
  88. package/docs/errors/settings/invalid-format.md +9 -0
  89. package/docs/errors/settings/invalid-integer.md +9 -0
  90. package/docs/errors/settings/invalid-timeout.md +9 -0
  91. package/docs/errors/settings/invalid-via.md +9 -0
  92. package/docs/errors/settings/unsafe-protocol-blocked.md +9 -0
  93. package/docs/errors/target/mac-not-in-arp.md +14 -0
  94. package/docs/errors/target/mac-required.md +23 -0
  95. package/docs/errors/target/mac-unresolved.md +17 -0
  96. package/docs/errors/target/unresolved.md +9 -0
  97. package/docs/errors/transport/auth-failed.md +9 -0
  98. package/docs/errors/transport/auto-method.md +9 -0
  99. package/docs/errors/transport/capability-unsupported.md +22 -0
  100. package/docs/errors/transport/checksum-unavailable.md +9 -0
  101. package/docs/errors/transport/connection-closed.md +9 -0
  102. package/docs/errors/transport/connection-refused.md +9 -0
  103. package/docs/errors/transport/dns.md +9 -0
  104. package/docs/errors/transport/host-key-mismatch.md +9 -0
  105. package/docs/errors/transport/incomplete-transfer.md +9 -0
  106. package/docs/errors/transport/insecure-trust.md +9 -0
  107. package/docs/errors/transport/local-tool-missing.md +11 -0
  108. package/docs/errors/transport/network.md +9 -0
  109. package/docs/errors/transport/timeout.md +9 -0
  110. package/docs/errors/transport/tls-certificate.md +9 -0
  111. package/docs/errors/transport/unreachable.md +9 -0
  112. package/docs/errors/transport/unsupported-operation.md +9 -0
  113. package/docs/errors/usage/confirmation-required.md +9 -0
  114. package/docs/errors/usage/conflicting-flags.md +9 -0
  115. package/docs/errors/usage/invalid-concurrency.md +9 -0
  116. package/docs/errors/usage/missing-group.md +9 -0
  117. package/docs/errors/usage/not-implemented.md +9 -0
  118. package/docs/errors/usage/target-exists.md +9 -0
  119. package/docs/errors/usage/timeout-out-of-range.md +9 -0
  120. package/docs/errors/validation/not-implemented.md +9 -0
  121. package/docs/errors/validation/option.md +9 -0
  122. package/docs/errors/validation/syntax.md +9 -0
  123. package/docs/errors/validation/unknown-attribute.md +9 -0
  124. package/docs/errors/validation/unknown-path.md +9 -0
  125. package/package.json +96 -0
  126. package/src/AGENTS.md +7 -0
  127. package/src/btest.ts +906 -0
  128. package/src/cli/btest.ts +455 -0
  129. package/src/cli/common.ts +53 -0
  130. package/src/cli/devices.ts +527 -0
  131. package/src/cli/discover.ts +186 -0
  132. package/src/cli/execute.ts +333 -0
  133. package/src/cli/mcp.ts +109 -0
  134. package/src/cli/retrieve.ts +383 -0
  135. package/src/cli/terminal.ts +303 -0
  136. package/src/cli/transfer.ts +471 -0
  137. package/src/cli.ts +115 -0
  138. package/src/core/envelope.ts +221 -0
  139. package/src/core/error-catalog.ts +469 -0
  140. package/src/core/routeros-errors.ts +268 -0
  141. package/src/data/AGENTS.md +11 -0
  142. package/src/data/dude-db.ts +0 -0
  143. package/src/data/mndp-cache.ts +132 -0
  144. package/src/data/mndp.ts +405 -0
  145. package/src/data/winbox-cdb-write.ts +200 -0
  146. package/src/data/winbox-cdb.ts +913 -0
  147. package/src/devices-schema.ts +107 -0
  148. package/src/devices.ts +1717 -0
  149. package/src/discover.ts +802 -0
  150. package/src/errors.ts +189 -0
  151. package/src/execute.ts +1350 -0
  152. package/src/index.ts +353 -0
  153. package/src/mcp/config.ts +66 -0
  154. package/src/mcp/resources.ts +98 -0
  155. package/src/mcp/safety.ts +119 -0
  156. package/src/mcp/server.ts +225 -0
  157. package/src/mcp/tools.ts +657 -0
  158. package/src/mcp.ts +33 -0
  159. package/src/protocols/AGENTS.md +14 -0
  160. package/src/protocols/adapter.ts +866 -0
  161. package/src/protocols/btest-session.ts +1493 -0
  162. package/src/protocols/btest.ts +447 -0
  163. package/src/protocols/ec-srp5.ts +466 -0
  164. package/src/protocols/index.ts +118 -0
  165. package/src/protocols/mac-telnet-console.ts +655 -0
  166. package/src/protocols/mac-telnet.ts +1299 -0
  167. package/src/protocols/mtwei.ts +47 -0
  168. package/src/protocols/native-api.ts +796 -0
  169. package/src/protocols/sftp.ts +427 -0
  170. package/src/protocols/ssh.ts +297 -0
  171. package/src/resolver/cdb.ts +580 -0
  172. package/src/resolver/comment-kv.ts +360 -0
  173. package/src/resolver/index.ts +74 -0
  174. package/src/resolver/mac.ts +227 -0
  175. package/src/resolver/settings.ts +228 -0
  176. package/src/resolver/target.ts +442 -0
  177. package/src/retrieve-fanout.ts +533 -0
  178. package/src/retrieve.ts +1215 -0
  179. package/src/terminal.ts +444 -0
  180. package/src/transfer.ts +1554 -0
  181. package/src/tui.ts +22 -0
  182. package/src/webproxy.ts +16 -0
@@ -0,0 +1,74 @@
1
+ # centrs error pages
2
+
3
+ Each `CentrsError` carries a `details_url` of the form
4
+ `https://tikoci.github.io/centrs/errors/<code>`. This directory holds the
5
+ human-readable page for each code, and is the home for the **error URL scheme**
6
+ and the **RouterOS-fault mapping** (below); the constitution keeps only the
7
+ one-line contract.
8
+
9
+ ## URL scheme
10
+
11
+ `details_url` is `https://tikoci.github.io/centrs/errors/<code>`, with `<code>`
12
+ the slash-namespaced code as-is (e.g.
13
+ `https://tikoci.github.io/centrs/errors/routeros/unsupported-path`).
14
+
15
+ - The URL is normalized; the GitHub Pages site routes it to a human page — **not**
16
+ the typedoc URL (typedoc lives elsewhere).
17
+ - Adding an error code requires adding a Pages entry under the same path: code and
18
+ page ship together, and a missing page is a centrs bug.
19
+ - The URL must stay **stable across centrs versions**; if a code is renamed, the
20
+ old URL must redirect.
21
+
22
+ ## Source of truth and the contributor contract
23
+
24
+ The enumerable list of every code lives in code, not here:
25
+ [`src/core/error-catalog.ts`](../../src/core/error-catalog.ts). The per-code
26
+ pages in this directory are generated from it (`bun run docs:errors`, which
27
+ only scaffolds missing pages and never overwrites hand-enriched ones).
28
+
29
+ When you introduce a new error code you must, in the same change:
30
+
31
+ 1. add an entry to `src/core/error-catalog.ts`, and
32
+ 2. add a `docs/errors/<code>.md` page (run `bun run docs:errors`).
33
+
34
+ `test/unit/error-pages.test.ts` enforces this three-way consistency — every live
35
+ `code:` literal is cataloged, every catalogued code has a page, and no page is
36
+ orphaned. A missing page is a centrs bug, so the guard fails the build.
37
+
38
+ ## Families
39
+
40
+ Codes are slash-namespaced `family/slug`. The families and where they originate:
41
+
42
+ - `auth/*` — credential rejection.
43
+ - `cdb/*` — WinBox CDB load, parse, decrypt, mutation, and allowlist policy
44
+ (`src/data/`, `src/devices.ts`, `src/resolver/cdb.ts`).
45
+ - `discover/*` — MNDP discovery (`src/discover.ts`).
46
+ - `identity/*` — target → CDB record resolution (`src/resolver/`).
47
+ - `input/*` — malformed caller input (paths, MACs, arguments).
48
+ - `internal/*` — centrs bugs / unreachable states.
49
+ - `mndp/*` — MNDP wire codec and listener (`src/data/mndp.ts`).
50
+ - `routeros/*` — RouterOS-surfaced faults mapped by the grounded vocabulary in
51
+ `src/core/routeros-errors.ts` (REST `detail` and native-api `!trap`, identical
52
+ on CHR 7.23).
53
+ - `settings/*` — settings/value parsing (`src/resolver/settings.ts`).
54
+ - `target/*` — turning a `<router>` into a transport endpoint.
55
+ - `transport/*` — connection, TLS, DNS, and timeout plumbing.
56
+ - `usage/*` — how a command was invoked (arity, conflicting flags, confirmation).
57
+ - `validation/*` — the canonicalize → validate gate (`:parse` + `/console/inspect`).
58
+
59
+ The hand-enriched pages (richer trigger strings and remediation) currently are
60
+ the `routeros/*` set produced by `src/core/routeros-errors.ts` and the
61
+ `target/*` MAC-resolution pages; the rest are generated stubs to be enriched as
62
+ each code is grounded.
63
+
64
+ ## RouterOS-fault mapping (`routeros/*`)
65
+
66
+ The authoritative vocabulary for `routeros/*` is the live router's own strings
67
+ (grounded on CHR 7.23): the REST `detail` field on HTTP ≥400 — shape
68
+ `{"detail":"<msg>","error":<http-status>,"message":"<http reason>"}` — and the
69
+ native-api `!trap` carry the **same** text for the same fault, so one shared
70
+ table (`src/core/routeros-errors.ts`) maps both transports. The original string
71
+ is always preserved — in `context.detail` for a matched rule, and in `cause` for
72
+ the catch-all (`routeros/request-failed`). Ground new mappings on CHR evidence,
73
+ not assumption (`tikoci/m2ir` is protocol-IR reference, not an accessible mapping
74
+ source — the router strings are).
@@ -0,0 +1,9 @@
1
+ # `auth/failed`
2
+
3
+ RouterOS rejected the stored credentials for the device.
4
+
5
+ ## Fix
6
+
7
+ See [`docs/CONSTITUTION.md`](../../CONSTITUTION.md) for the centrs error
8
+ contract. This stub will be expanded with the typical trigger and remediation
9
+ for `auth/failed`.
@@ -0,0 +1,9 @@
1
+ # `cdb/already-exists`
2
+
3
+ A CDB entry with that target already exists.
4
+
5
+ ## Fix
6
+
7
+ See [`docs/CONSTITUTION.md`](../../CONSTITUTION.md) for the centrs error
8
+ contract. This stub will be expanded with the typical trigger and remediation
9
+ for `cdb/already-exists`.
@@ -0,0 +1,9 @@
1
+ # `cdb/created`
2
+
3
+ A new CDB file was created at the resolved location.
4
+
5
+ ## Fix
6
+
7
+ See [`docs/CONSTITUTION.md`](../../CONSTITUTION.md) for the centrs error
8
+ contract. This stub will be expanded with the typical trigger and remediation
9
+ for `cdb/created`.
@@ -0,0 +1,9 @@
1
+ # `cdb/decrypt-failed`
2
+
3
+ The encrypted CDB could not be decrypted (wrong or missing password).
4
+
5
+ ## Fix
6
+
7
+ See [`docs/CONSTITUTION.md`](../../CONSTITUTION.md) for the centrs error
8
+ contract. This stub will be expanded with the typical trigger and remediation
9
+ for `cdb/decrypt-failed`.
@@ -0,0 +1,9 @@
1
+ # `cdb/empty-group`
2
+
3
+ The named CDB group contains no records.
4
+
5
+ ## Fix
6
+
7
+ See [`docs/CONSTITUTION.md`](../../CONSTITUTION.md) for the centrs error
8
+ contract. This stub will be expanded with the typical trigger and remediation
9
+ for `cdb/empty-group`.
@@ -0,0 +1,9 @@
1
+ # `cdb/invalid-option`
2
+
3
+ A comment kv-soup option carried an invalid value.
4
+
5
+ ## Fix
6
+
7
+ See [`docs/CONSTITUTION.md`](../../CONSTITUTION.md) for the centrs error
8
+ contract. This stub will be expanded with the typical trigger and remediation
9
+ for `cdb/invalid-option`.
@@ -0,0 +1,9 @@
1
+ # `cdb/invalid-record`
2
+
3
+ A device record failed schema validation (blank target or wrong field type).
4
+
5
+ ## Fix
6
+
7
+ See [`docs/CONSTITUTION.md`](../../CONSTITUTION.md) for the centrs error
8
+ contract. This stub will be expanded with the typical trigger and remediation
9
+ for `cdb/invalid-record`.
@@ -0,0 +1,9 @@
1
+ # `cdb/not-found-target`
2
+
3
+ No CDB entry matched the requested target string.
4
+
5
+ ## Fix
6
+
7
+ See [`docs/CONSTITUTION.md`](../../CONSTITUTION.md) for the centrs error
8
+ contract. This stub will be expanded with the typical trigger and remediation
9
+ for `cdb/not-found-target`.
@@ -0,0 +1,9 @@
1
+ # `cdb/not-found`
2
+
3
+ The CDB file could not be found.
4
+
5
+ ## Fix
6
+
7
+ See [`docs/CONSTITUTION.md`](../../CONSTITUTION.md) for the centrs error
8
+ contract. This stub will be expanded with the typical trigger and remediation
9
+ for `cdb/not-found`.
@@ -0,0 +1,9 @@
1
+ # `cdb/override-applied`
2
+
3
+ A comment kv-soup override replaced a resolved setting (informational).
4
+
5
+ ## Fix
6
+
7
+ See [`docs/CONSTITUTION.md`](../../CONSTITUTION.md) for the centrs error
8
+ contract. This stub will be expanded with the typical trigger and remediation
9
+ for `cdb/override-applied`.
@@ -0,0 +1,9 @@
1
+ # `cdb/parse-failed`
2
+
3
+ The CDB file could not be parsed.
4
+
5
+ ## Fix
6
+
7
+ See [`docs/CONSTITUTION.md`](../../CONSTITUTION.md) for the centrs error
8
+ contract. This stub will be expanded with the typical trigger and remediation
9
+ for `cdb/parse-failed`.
@@ -0,0 +1,9 @@
1
+ # `cdb/password-not-needed`
2
+
3
+ A --cdb-password was supplied for an unencrypted CDB and was ignored.
4
+
5
+ ## Fix
6
+
7
+ See [`docs/CONSTITUTION.md`](../../CONSTITUTION.md) for the centrs error
8
+ contract. This stub will be expanded with the typical trigger and remediation
9
+ for `cdb/password-not-needed`.
@@ -0,0 +1,9 @@
1
+ # `cdb/password-required`
2
+
3
+ The CDB is encrypted; a --cdb-password is required to read it.
4
+
5
+ ## Fix
6
+
7
+ See [`docs/CONSTITUTION.md`](../../CONSTITUTION.md) for the centrs error
8
+ contract. This stub will be expanded with the typical trigger and remediation
9
+ for `cdb/password-required`.
@@ -0,0 +1,9 @@
1
+ # `cdb/reserved-key`
2
+
3
+ Comment kv-soup cannot carry a first-class CDB field.
4
+
5
+ ## Fix
6
+
7
+ See [`docs/CONSTITUTION.md`](../../CONSTITUTION.md) for the centrs error
8
+ contract. This stub will be expanded with the typical trigger and remediation
9
+ for `cdb/reserved-key`.
@@ -0,0 +1,9 @@
1
+ # `cdb/reserved-option`
2
+
3
+ A reserved comment kv-soup option was rejected.
4
+
5
+ ## Fix
6
+
7
+ See [`docs/CONSTITUTION.md`](../../CONSTITUTION.md) for the centrs error
8
+ contract. This stub will be expanded with the typical trigger and remediation
9
+ for `cdb/reserved-option`.
@@ -0,0 +1,9 @@
1
+ # `cdb/target-not-registered`
2
+
3
+ The target is not on the CDB allowlist. Register it with centrs_devices (op add) first.
4
+
5
+ ## Fix
6
+
7
+ See [`docs/CONSTITUTION.md`](../../CONSTITUTION.md) for the centrs error
8
+ contract. This stub will be expanded with the typical trigger and remediation
9
+ for `cdb/target-not-registered`.
@@ -0,0 +1,9 @@
1
+ # `cdb/unknown-field`
2
+
3
+ An unknown CDB field name was referenced.
4
+
5
+ ## Fix
6
+
7
+ See [`docs/CONSTITUTION.md`](../../CONSTITUTION.md) for the centrs error
8
+ contract. This stub will be expanded with the typical trigger and remediation
9
+ for `cdb/unknown-field`.
@@ -0,0 +1,9 @@
1
+ # `cdb/unknown-option`
2
+
3
+ An unknown comment kv-soup option was encountered.
4
+
5
+ ## Fix
6
+
7
+ See [`docs/CONSTITUTION.md`](../../CONSTITUTION.md) for the centrs error
8
+ contract. This stub will be expanded with the typical trigger and remediation
9
+ for `cdb/unknown-option`.
@@ -0,0 +1,9 @@
1
+ # `cdb/write-not-permitted`
2
+
3
+ The device's CDB record is mcp=ro; MCP writes are not permitted until it is set to mcp=rw.
4
+
5
+ ## Fix
6
+
7
+ See [`docs/CONSTITUTION.md`](../../CONSTITUTION.md) for the centrs error
8
+ contract. This stub will be expanded with the typical trigger and remediation
9
+ for `cdb/write-not-permitted`.
@@ -0,0 +1,9 @@
1
+ # `discover/broadcast-unavailable`
2
+
3
+ The MNDP listener could not enable UDP broadcast; discovery continued passively without sending refresh probes.
4
+
5
+ ## Fix
6
+
7
+ See [`docs/CONSTITUTION.md`](../../CONSTITUTION.md) for the centrs error
8
+ contract. This stub will be expanded with the typical trigger and remediation
9
+ for `discover/broadcast-unavailable`.
@@ -0,0 +1,9 @@
1
+ # `discover/failed`
2
+
3
+ MNDP discovery failed.
4
+
5
+ ## Fix
6
+
7
+ See [`docs/CONSTITUTION.md`](../../CONSTITUTION.md) for the centrs error
8
+ contract. This stub will be expanded with the typical trigger and remediation
9
+ for `discover/failed`.
@@ -0,0 +1,9 @@
1
+ # `identity/ambiguous`
2
+
3
+ The target matches more than one CDB entry.
4
+
5
+ ## Fix
6
+
7
+ See [`docs/CONSTITUTION.md`](../../CONSTITUTION.md) for the centrs error
8
+ contract. This stub will be expanded with the typical trigger and remediation
9
+ for `identity/ambiguous`.
@@ -0,0 +1,9 @@
1
+ # `identity/no-match`
2
+
3
+ The target has no CDB entry matching the requested record type.
4
+
5
+ ## Fix
6
+
7
+ See [`docs/CONSTITUTION.md`](../../CONSTITUTION.md) for the centrs error
8
+ contract. This stub will be expanded with the typical trigger and remediation
9
+ for `identity/no-match`.
@@ -0,0 +1,9 @@
1
+ # `input/invalid-command`
2
+
3
+ The request shape was invalid (bad or missing arguments).
4
+
5
+ ## Fix
6
+
7
+ See [`docs/CONSTITUTION.md`](../../CONSTITUTION.md) for the centrs error
8
+ contract. This stub will be expanded with the typical trigger and remediation
9
+ for `input/invalid-command`.
@@ -0,0 +1,9 @@
1
+ # `input/invalid-match`
2
+
3
+ The --match value is not a known CDB record type.
4
+
5
+ ## Fix
6
+
7
+ See [`docs/CONSTITUTION.md`](../../CONSTITUTION.md) for the centrs error
8
+ contract. This stub will be expanded with the typical trigger and remediation
9
+ for `input/invalid-match`.
@@ -0,0 +1,9 @@
1
+ # `input/invalid-path`
2
+
3
+ A file path contains a character the transport cannot quote (e.g. a quote or newline).
4
+
5
+ ## Fix
6
+
7
+ See [`docs/CONSTITUTION.md`](../../CONSTITUTION.md) for the centrs error
8
+ contract. This stub will be expanded with the typical trigger and remediation
9
+ for `input/invalid-path`.
@@ -0,0 +1,9 @@
1
+ # `input/invalid-routeros-path`
2
+
3
+ The RouterOS path is malformed (it must be slash-prefixed).
4
+
5
+ ## Fix
6
+
7
+ See [`docs/CONSTITUTION.md`](../../CONSTITUTION.md) for the centrs error
8
+ contract. This stub will be expanded with the typical trigger and remediation
9
+ for `input/invalid-routeros-path`.
@@ -0,0 +1,9 @@
1
+ # `input/invalid-target`
2
+
3
+ The target string is invalid for the requested operation.
4
+
5
+ ## Fix
6
+
7
+ See [`docs/CONSTITUTION.md`](../../CONSTITUTION.md) for the centrs error
8
+ contract. This stub will be expanded with the typical trigger and remediation
9
+ for `input/invalid-target`.
@@ -0,0 +1,9 @@
1
+ # `input/local-file-not-found`
2
+
3
+ A local file required for the transfer could not be read.
4
+
5
+ ## Fix
6
+
7
+ See [`docs/CONSTITUTION.md`](../../CONSTITUTION.md) for the centrs error
8
+ contract. This stub will be expanded with the typical trigger and remediation
9
+ for `input/local-file-not-found`.
@@ -0,0 +1,9 @@
1
+ # `input/mac-address`
2
+
3
+ The value is not a valid 6-octet MAC address.
4
+
5
+ ## Fix
6
+
7
+ See [`docs/CONSTITUTION.md`](../../CONSTITUTION.md) for the centrs error
8
+ contract. This stub will be expanded with the typical trigger and remediation
9
+ for `input/mac-address`.
@@ -0,0 +1,9 @@
1
+ # `input/max-results-exceeded`
2
+
3
+ Output exceeded the requested byte budget.
4
+
5
+ ## Fix
6
+
7
+ See [`docs/CONSTITUTION.md`](../../CONSTITUTION.md) for the centrs error
8
+ contract. This stub will be expanded with the typical trigger and remediation
9
+ for `input/max-results-exceeded`.
@@ -0,0 +1,9 @@
1
+ # `internal/devices-failed`
2
+
3
+ The devices command failed with an unexpected internal error.
4
+
5
+ ## Fix
6
+
7
+ See [`docs/CONSTITUTION.md`](../../CONSTITUTION.md) for the centrs error
8
+ contract. This stub will be expanded with the typical trigger and remediation
9
+ for `internal/devices-failed`.
@@ -0,0 +1,9 @@
1
+ # `internal/mcp-start`
2
+
3
+ The MCP server failed to start.
4
+
5
+ ## Fix
6
+
7
+ See [`docs/CONSTITUTION.md`](../../CONSTITUTION.md) for the centrs error
8
+ contract. This stub will be expanded with the typical trigger and remediation
9
+ for `internal/mcp-start`.
@@ -0,0 +1,9 @@
1
+ # `internal/mcp-tool`
2
+
3
+ An MCP tool handler failed with an unexpected internal error.
4
+
5
+ ## Fix
6
+
7
+ See [`docs/CONSTITUTION.md`](../../CONSTITUTION.md) for the centrs error
8
+ contract. This stub will be expanded with the typical trigger and remediation
9
+ for `internal/mcp-tool`.
@@ -0,0 +1,9 @@
1
+ # `internal/native-api-length`
2
+
3
+ A native-API word length could not be encoded.
4
+
5
+ ## Fix
6
+
7
+ See [`docs/CONSTITUTION.md`](../../CONSTITUTION.md) for the centrs error
8
+ contract. This stub will be expanded with the typical trigger and remediation
9
+ for `internal/native-api-length`.
@@ -0,0 +1,9 @@
1
+ # `internal/unhandled`
2
+
3
+ An unexpected internal error occurred (this is a centrs bug).
4
+
5
+ ## Fix
6
+
7
+ See [`docs/CONSTITUTION.md`](../../CONSTITUTION.md) for the centrs error
8
+ contract. This stub will be expanded with the typical trigger and remediation
9
+ for `internal/unhandled`.
@@ -0,0 +1,9 @@
1
+ # `internal/unreachable`
2
+
3
+ An unreachable code path was reached (this is a centrs bug).
4
+
5
+ ## Fix
6
+
7
+ See [`docs/CONSTITUTION.md`](../../CONSTITUTION.md) for the centrs error
8
+ contract. This stub will be expanded with the typical trigger and remediation
9
+ for `internal/unreachable`.
@@ -0,0 +1,9 @@
1
+ # `mndp/encode-failed`
2
+
3
+ An MNDP field could not be encoded.
4
+
5
+ ## Fix
6
+
7
+ See [`docs/CONSTITUTION.md`](../../CONSTITUTION.md) for the centrs error
8
+ contract. This stub will be expanded with the typical trigger and remediation
9
+ for `mndp/encode-failed`.
@@ -0,0 +1,9 @@
1
+ # `mndp/listen-failed`
2
+
3
+ The MNDP UDP listener could not bind.
4
+
5
+ ## Fix
6
+
7
+ See [`docs/CONSTITUTION.md`](../../CONSTITUTION.md) for the centrs error
8
+ contract. This stub will be expanded with the typical trigger and remediation
9
+ for `mndp/listen-failed`.
@@ -0,0 +1,9 @@
1
+ # `mndp/malformed`
2
+
3
+ A received MNDP datagram could not be decoded.
4
+
5
+ ## Fix
6
+
7
+ See [`docs/CONSTITUTION.md`](../../CONSTITUTION.md) for the centrs error
8
+ contract. This stub will be expanded with the typical trigger and remediation
9
+ for `mndp/malformed`.
@@ -0,0 +1,9 @@
1
+ # `routeros/api-fatal`
2
+
3
+ The RouterOS native API returned a fatal sentence.
4
+
5
+ ## Fix
6
+
7
+ See [`docs/CONSTITUTION.md`](../../CONSTITUTION.md) for the centrs error
8
+ contract. This stub will be expanded with the typical trigger and remediation
9
+ for `routeros/api-fatal`.
@@ -0,0 +1,9 @@
1
+ # `routeros/api-protocol`
2
+
3
+ A RouterOS native API reply could not be parsed.
4
+
5
+ ## Fix
6
+
7
+ See [`docs/CONSTITUTION.md`](../../CONSTITUTION.md) for the centrs error
8
+ contract. This stub will be expanded with the typical trigger and remediation
9
+ for `routeros/api-protocol`.
@@ -0,0 +1,9 @@
1
+ # `routeros/api-trap`
2
+
3
+ The RouterOS native API returned a !trap with no more specific mapping.
4
+
5
+ ## Fix
6
+
7
+ See [`docs/CONSTITUTION.md`](../../CONSTITUTION.md) for the centrs error
8
+ contract. This stub will be expanded with the typical trigger and remediation
9
+ for `routeros/api-trap`.
@@ -0,0 +1,12 @@
1
+ # `routeros/btest-protocol`
2
+
3
+ A bandwidth-test (btest) packet could not be decoded.
4
+
5
+ ## Fix
6
+
7
+ The peer sent a malformed or unexpected btest control/data packet (a bad command
8
+ packet, EC-SRP5 auth frame, status message, or UDP datagram). Confirm the remote
9
+ end is a MikroTik `/tool/bandwidth-server` (or a btest client) on the expected
10
+ port, and that nothing else is answering on TCP/UDP 2000. See
11
+ [`docs/CONSTITUTION.md`](../../CONSTITUTION.md) for the centrs error contract and
12
+ `commands/btest/README.md` for the protocol.
@@ -0,0 +1,9 @@
1
+ # `routeros/btest-too-many-sessions`
2
+
3
+ The btest server refused a client because `max-sessions` is reached.
4
+
5
+ ## Fix
6
+
7
+ Wait for an in-flight bandwidth test to finish, or start the centrs btest server
8
+ with a higher `--max-sessions` (RouterOS allows `1..1000`, default `100`). See
9
+ `commands/btest/README.md` and [`docs/CONSTITUTION.md`](../../CONSTITUTION.md).
@@ -0,0 +1,14 @@
1
+ # `routeros/command-failed`
2
+
3
+ A generic RouterOS command failure. RouterOS reports these as a `failure: <msg>`
4
+ string; the inner message is preserved in `context.failure` and the original
5
+ string in `context.detail`.
6
+
7
+ ## Typical RouterOS strings
8
+
9
+ - `failure: <msg>` (for example, `failure: already have such entry`)
10
+
11
+ ## Fix
12
+
13
+ Inspect the RouterOS failure message, then adjust the path, attributes, or
14
+ request shape accordingly.
@@ -0,0 +1,11 @@
1
+ # `routeros/ec-srp5-protocol`
2
+
3
+ An EC-SRP5 authentication message or key could not be processed.
4
+
5
+ ## Fix
6
+
7
+ The peer sent a malformed EC-SRP5 public key, an out-of-range value, or the
8
+ shared-secret computation degenerated (the point at infinity). This is the shared
9
+ EC-SRP5 layer used by both MAC-Telnet (MTWEI) and the bandwidth test (btest);
10
+ confirm the remote end is a genuine MikroTik device and retry. See
11
+ [`docs/CONSTITUTION.md`](../../CONSTITUTION.md) for the centrs error contract.
@@ -0,0 +1,9 @@
1
+ # `routeros/error`
2
+
3
+ RouterOS returned an error executing the command.
4
+
5
+ ## Fix
6
+
7
+ See [`docs/CONSTITUTION.md`](../../CONSTITUTION.md) for the centrs error
8
+ contract. This stub will be expanded with the typical trigger and remediation
9
+ for `routeros/error`.
@@ -0,0 +1,14 @@
1
+ # `routeros/invalid-value`
2
+
3
+ RouterOS rejected the value supplied for an argument. The offending argument
4
+ name is captured in `context.argument`.
5
+
6
+ ## Typical RouterOS strings
7
+
8
+ - `invalid value for argument <name>`
9
+ - `invalid value of <name>`
10
+
11
+ ## Fix
12
+
13
+ Supply a value that matches the argument's expected type/format for this
14
+ RouterOS path.
@@ -0,0 +1,9 @@
1
+ # `routeros/mac-telnet-error`
2
+
3
+ The device reported a MAC-Telnet error.
4
+
5
+ ## Fix
6
+
7
+ See [`docs/CONSTITUTION.md`](../../CONSTITUTION.md) for the centrs error
8
+ contract. This stub will be expanded with the typical trigger and remediation
9
+ for `routeros/mac-telnet-error`.
@@ -0,0 +1,9 @@
1
+ # `routeros/mac-telnet-not-ready`
2
+
3
+ Input was sent before the MAC-Telnet session was ready.
4
+
5
+ ## Fix
6
+
7
+ See [`docs/CONSTITUTION.md`](../../CONSTITUTION.md) for the centrs error
8
+ contract. This stub will be expanded with the typical trigger and remediation
9
+ for `routeros/mac-telnet-not-ready`.