@monoes/routing 1.0.2 → 1.0.4
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/LICENSE +191 -0
- package/README.md +156 -0
- package/dist/capability-index.d.ts +0 -0
- package/dist/capability-index.d.ts.map +0 -0
- package/dist/capability-index.js +0 -0
- package/dist/capability-index.js.map +0 -0
- package/dist/cosine.d.ts +0 -0
- package/dist/cosine.d.ts.map +0 -0
- package/dist/cosine.js +0 -0
- package/dist/cosine.js.map +0 -0
- package/dist/encoder.d.ts +0 -0
- package/dist/encoder.d.ts.map +0 -0
- package/dist/encoder.js +0 -0
- package/dist/encoder.js.map +0 -0
- package/dist/index.d.ts +0 -0
- package/dist/index.d.ts.map +0 -0
- package/dist/index.js +0 -0
- package/dist/index.js.map +0 -0
- package/dist/keyword-pre-filter.d.ts +0 -0
- package/dist/keyword-pre-filter.d.ts.map +0 -0
- package/dist/keyword-pre-filter.js +0 -0
- package/dist/keyword-pre-filter.js.map +0 -0
- package/dist/llm-fallback.d.ts +0 -0
- package/dist/llm-fallback.d.ts.map +0 -0
- package/dist/llm-fallback.js +0 -0
- package/dist/llm-fallback.js.map +0 -0
- package/dist/prompts/classify.d.ts +0 -0
- package/dist/prompts/classify.d.ts.map +0 -0
- package/dist/prompts/classify.js +0 -0
- package/dist/prompts/classify.js.map +0 -0
- package/dist/route-layer.d.ts +0 -0
- package/dist/route-layer.d.ts.map +1 -1
- package/dist/route-layer.js +15 -4
- package/dist/route-layer.js.map +1 -1
- package/dist/routes/core.route.d.ts +0 -0
- package/dist/routes/core.route.d.ts.map +0 -0
- package/dist/routes/core.route.js +0 -0
- package/dist/routes/core.route.js.map +0 -0
- package/dist/routes/design.route.d.ts +0 -0
- package/dist/routes/design.route.d.ts.map +0 -0
- package/dist/routes/design.route.js +0 -0
- package/dist/routes/design.route.js.map +0 -0
- package/dist/routes/engineering.route.d.ts +0 -0
- package/dist/routes/engineering.route.d.ts.map +0 -0
- package/dist/routes/engineering.route.js +0 -0
- package/dist/routes/engineering.route.js.map +0 -0
- package/dist/routes/game-dev.route.d.ts +0 -0
- package/dist/routes/game-dev.route.d.ts.map +0 -0
- package/dist/routes/game-dev.route.js +0 -0
- package/dist/routes/game-dev.route.js.map +0 -0
- package/dist/routes/index.d.ts +0 -0
- package/dist/routes/index.d.ts.map +0 -0
- package/dist/routes/index.js +0 -0
- package/dist/routes/index.js.map +0 -0
- package/dist/routes/marketing.route.d.ts +0 -0
- package/dist/routes/marketing.route.d.ts.map +0 -0
- package/dist/routes/marketing.route.js +0 -0
- package/dist/routes/marketing.route.js.map +0 -0
- package/dist/routes/product.route.d.ts +0 -0
- package/dist/routes/product.route.d.ts.map +0 -0
- package/dist/routes/product.route.js +0 -0
- package/dist/routes/product.route.js.map +0 -0
- package/dist/routes/security.route.d.ts +0 -0
- package/dist/routes/security.route.d.ts.map +0 -0
- package/dist/routes/security.route.js +0 -0
- package/dist/routes/security.route.js.map +0 -0
- package/dist/routes/specialized.route.d.ts +0 -0
- package/dist/routes/specialized.route.d.ts.map +0 -0
- package/dist/routes/specialized.route.js +0 -0
- package/dist/routes/specialized.route.js.map +0 -0
- package/dist/routes/testing.route.d.ts +0 -0
- package/dist/routes/testing.route.d.ts.map +0 -0
- package/dist/routes/testing.route.js +0 -0
- package/dist/routes/testing.route.js.map +0 -0
- package/dist/types.d.ts +0 -0
- package/dist/types.d.ts.map +0 -0
- package/dist/types.js +0 -0
- package/dist/types.js.map +0 -0
- package/package.json +9 -11
package/LICENSE
ADDED
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to the Licensor for inclusion in the Work by the copyright
|
|
52
|
+
owner or by an individual or Legal Entity authorized to submit on
|
|
53
|
+
behalf of the copyright owner. For the purposes of this definition,
|
|
54
|
+
"submitted" means any form of electronic, verbal, or written
|
|
55
|
+
communication sent to the Licensor or its representatives, including
|
|
56
|
+
but not limited to communication on electronic mailing lists, source
|
|
57
|
+
code control systems, and issue tracking systems that are managed by,
|
|
58
|
+
or on behalf of, the Licensor for the purpose of discussing and
|
|
59
|
+
improving the Work, but excluding communication that is conspicuously
|
|
60
|
+
marked or otherwise designated in writing by the copyright owner as
|
|
61
|
+
"Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
Copyright 2026 monoes
|
|
180
|
+
|
|
181
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
182
|
+
you may not use this file except in compliance with the License.
|
|
183
|
+
You may obtain a copy of the License at
|
|
184
|
+
|
|
185
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
186
|
+
|
|
187
|
+
Unless required by applicable law or agreed to in writing, software
|
|
188
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
189
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
190
|
+
See the License for the specific language governing permissions and
|
|
191
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/monoes/monomind/main/assets/packages/routing.png" alt="@monoes/routing" width="600" />
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
# @monoes/routing
|
|
6
|
+
|
|
7
|
+
[](https://www.npmjs.com/package/@monoes/routing)
|
|
8
|
+
[](https://github.com/monoes/monomind/blob/main/LICENSE)
|
|
9
|
+
[](https://nodejs.org)
|
|
10
|
+
|
|
11
|
+
> **Semantic task-to-agent routing** for Monomind (`@monoes/routing` `v1.0.3` / Monomind CLI `v2.9.0`).
|
|
12
|
+
|
|
13
|
+
Part of the [Monomind](https://github.com/monoes/monomind) ecosystem. Handles deterministic keyword filtering, vector centroid embedding matching, neural routing, and LLM fallback classification to route user tasks to specialized agent roles.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## 🏗 Task-to-Agent Cascade Architecture
|
|
18
|
+
|
|
19
|
+
When a task description is processed, `@monoes/routing` executes a multi-tier cascade flow (fast deterministic $\rightarrow$ embedding similarity $\rightarrow$ neural augmentation $\rightarrow$ LLM fallback):
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
Task Description
|
|
23
|
+
│
|
|
24
|
+
▼
|
|
25
|
+
┌───────────────────────────┐
|
|
26
|
+
│ Tier 1: Keyword Pre-Filter │ ── Match ──▶ confidence: 1.0 (method: 'keyword')
|
|
27
|
+
│ (30+ rules, < 1ms) │
|
|
28
|
+
└───────────────────────────┘
|
|
29
|
+
│ No Match
|
|
30
|
+
▼
|
|
31
|
+
┌───────────────────────────┐
|
|
32
|
+
│ Tier 2: Cosine Centroid │ ── Sim >= 0.5 ──▶ confidence: cosine (method: 'semantic')
|
|
33
|
+
│ (256-D MD5/HNSW Vector) │
|
|
34
|
+
└───────────────────────────┘
|
|
35
|
+
│ Below Threshold
|
|
36
|
+
▼
|
|
37
|
+
┌───────────────────────────┐
|
|
38
|
+
│ Tier 3: Neural & LanceDB │ ── Score = 0.65*neural + 0.35*keyword
|
|
39
|
+
│ (Vector Rerank) │
|
|
40
|
+
└───────────────────────────┘
|
|
41
|
+
│ Below Threshold
|
|
42
|
+
▼
|
|
43
|
+
┌───────────────────────────┐
|
|
44
|
+
│ Tier 4: LLM Fallback │ ── Classify ──▶ confidence: 0.85 (method: 'llm_fallback')
|
|
45
|
+
│ (Claude Haiku / Degraded) │
|
|
46
|
+
└───────────────────────────┘
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### 1. Tier 1: Deterministic Keyword Pre-Filter
|
|
50
|
+
- **Source**: [`keyword-pre-filter.ts:18-93`](file:///Users/morteza/Desktop/tools/monomind/packages/@monomind/routing/src/keyword-pre-filter.ts#L18-L93)
|
|
51
|
+
- Evaluates tasks using fast regular expression matching against 30+ default rule definitions (e.g., CVE security checks, unit test files, Docker/DevOps configs, Solidity/ZK contracts, MCP tools).
|
|
52
|
+
- Returns immediate match with `confidence: 1.0` and `method: 'keyword'`.
|
|
53
|
+
|
|
54
|
+
### 2. Tier 2: Cosine Centroid Embedding Match
|
|
55
|
+
- **Source**: [`route-layer.ts:73-106`](file:///Users/morteza/Desktop/tools/monomind/packages/@monomind/routing/src/route-layer.ts#L73-L106), [`cosine.ts:5-20`](file:///Users/morteza/Desktop/tools/monomind/packages/@monomind/routing/src/cosine.ts#L5-L20)
|
|
56
|
+
- Computes cosine similarity between task vector embeddings and agent route centroid vectors.
|
|
57
|
+
- Supports lightweight 256-D MD5/SHA-256 hash embeddings (`LocalEncoder`) or transformer embeddings (`HNSWEncoder`).
|
|
58
|
+
- If similarity $\ge \text{threshold}$ (default: 0.5), routes task with `method: 'semantic'`.
|
|
59
|
+
|
|
60
|
+
### 3. Tier 3: Neural & LanceDB Vector Reranking
|
|
61
|
+
- **Source**: [`hooks-routing.ts:293-391`](file:///Users/morteza/Desktop/tools/monomind/packages/@monomind/cli/src/mcp-tools/hooks-routing.ts#L293-L391)
|
|
62
|
+
- Blends neural model score with keyword match score: $\text{FinalScore} = 0.65 \times \text{neuralScore} + 0.35 \times \text{keywordMatchScore}$.
|
|
63
|
+
- Consults local LanceDB vector indices for past successful route outcomes.
|
|
64
|
+
|
|
65
|
+
### 4. Tier 4: LLM Fallback Classification
|
|
66
|
+
- **Source**: [`llm-fallback.ts:20-88`](file:///Users/morteza/Desktop/tools/monomind/packages/@monomind/routing/src/llm-fallback.ts#L20-L88), [`prompts/classify.ts:4-28`](file:///Users/morteza/Desktop/tools/monomind/packages/@monomind/routing/src/prompts/classify.ts#L4-L28)
|
|
67
|
+
- Constructs a compact capability prompt (max 8,000 chars) detailing candidate agent descriptions and returns classification with `confidence: 0.85` and `method: 'llm_fallback'`.
|
|
68
|
+
- On API failure or missing key, degrades gracefully to the default route with `method: 'semantic_degraded'`.
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## 💻 CLI Command Reference (`monomind route`)
|
|
73
|
+
|
|
74
|
+
The Monomind CLI provides 9 subcommands under `monomind route` (defined in [`src/commands/route.ts:80-800`](file:///Users/morteza/Desktop/tools/monomind/packages/@monomind/cli/src/commands/route.ts#L80-L800)):
|
|
75
|
+
|
|
76
|
+
| Subcommand | Usage | Description | Key Flags |
|
|
77
|
+
|---|---|---|---|
|
|
78
|
+
| `task` | `monomind route task "<prompt>"` | Primary CLI entry point. Routes a task prompt to the best agent slug. | `--json`, `--verbose` |
|
|
79
|
+
| `semantic` | `monomind route semantic "<prompt>"` | Executes full `@monoes/routing` embedding + centroid pipeline. | `--threshold N`, `--json` |
|
|
80
|
+
| `list-agents` | `monomind route list-agents` | Displays all registered agents, capabilities, and keyword patterns. | `--format json` |
|
|
81
|
+
| `stats` | `monomind route stats` | Displays routing performance metrics, cache hits, and tier usage breakdown. | `--reset` |
|
|
82
|
+
| `feedback` | `monomind route feedback <id> <correct_agent>` | Records user feedback to update local neural/LanceDB routing weights. | `--weight N` |
|
|
83
|
+
| `reset` | `monomind route reset` | Resets cached route centroids, outcomes, and feedback data. | `--force` |
|
|
84
|
+
| `export` | `monomind route export --out <file>` | Exports learned routing centroids and capability index to JSON. | `--out` |
|
|
85
|
+
| `import` | `monomind route import --in <file>` | Imports routing centroids and rules from external JSON file. | `--in`, `--merge` |
|
|
86
|
+
| `coverage` / `cov` | `monomind route coverage` | Runs benchmark coverage test across sample task prompts. | `--min-score N` |
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## ⚡ Task Complexity Scoring Rules
|
|
91
|
+
|
|
92
|
+
Task complexity is dynamically calculated to estimate execution duration, budget allocation, and agent delegation hierarchy:
|
|
93
|
+
|
|
94
|
+
- **High Complexity** ("2–4 hours"): Prompts containing architecture refactoring, full stack migrations, multi-package dependencies, or text length $> 500$ chars.
|
|
95
|
+
- **Medium Complexity** ("30–60 min"): Standard feature implementations, multi-file bugfixes, API integration, or text length $> 150$ chars.
|
|
96
|
+
- **Complexity Scoring**:
|
|
97
|
+
- `High` (Estimated 2-4 hours): Task description contains `'complex'` or `'architecture'` OR character `length > 200` ([`hooks-routing.ts:395-400`](file:///Users/morteza/Desktop/tools/monomind/packages/@monomind/cli/src/mcp-tools/hooks-routing.ts#L395-L400)).
|
|
98
|
+
- `Low` (Estimated 10-30 min): Task description contains `'simple'` or `'fix'` OR character `length < 50`.
|
|
99
|
+
- `Medium` (Estimated 30-60 min): All other standard task prompts.
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## Test Suites
|
|
104
|
+
|
|
105
|
+
Vitest test suites are located in [`packages/@monomind/routing/__tests__/`](file:///Users/morteza/Desktop/tools/monomind/packages/@monomind/routing/__tests__/):
|
|
106
|
+
- `route-layer.test.ts`: Cascade evaluation, thresholds, and fallback behavior.
|
|
107
|
+
- `keyword-pre-filter.test.ts`: Regex rule precedence and pattern matching.
|
|
108
|
+
- `encoder.test.ts`: 256-D MD5/SHA-256 local encoding and LRU cache eviction.
|
|
109
|
+
- `llm-fallback.test.ts`: LLM prompt construction, candidate hint parsing, and error recovery.
|
|
110
|
+
- `cosine.test.ts`: Validates vector dot product calculation and centroid position aggregation.
|
|
111
|
+
- `capability-index.test.ts`: Ensures agent capability indexing stays under the 8,000-character context budget.
|
|
112
|
+
|
|
113
|
+
Run unit tests via:
|
|
114
|
+
```bash
|
|
115
|
+
pnpm --filter @monoes/routing test
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## 🚀 Usage Example
|
|
121
|
+
|
|
122
|
+
```typescript
|
|
123
|
+
import { RouteLayer } from '@monoes/routing';
|
|
124
|
+
|
|
125
|
+
const router = new RouteLayer({
|
|
126
|
+
routes: [
|
|
127
|
+
{ name: 'coder', agentSlug: 'coder', utterances: ['implement feature', 'build api'], threshold: 0.5 },
|
|
128
|
+
{ name: 'tester', agentSlug: 'tester', utterances: ['write unit test', 'add coverage'], threshold: 0.5 },
|
|
129
|
+
{ name: 'security', agentSlug: 'security-engineer', utterances: ['fix cve', 'audit vulnerability'], threshold: 0.5 },
|
|
130
|
+
],
|
|
131
|
+
enableKeywordFilter: true,
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
await router.initialize();
|
|
135
|
+
|
|
136
|
+
// Tier 1 Match (<1ms)
|
|
137
|
+
const res1 = await router.route('Fix CVE-2024-12345 vulnerability');
|
|
138
|
+
// { agentSlug: 'security-engineer', confidence: 1.0, method: 'keyword' }
|
|
139
|
+
|
|
140
|
+
// Tier 2 Match (Embedding Centroid)
|
|
141
|
+
const res2 = await router.route('Create new REST endpoint for user profiles');
|
|
142
|
+
// { agentSlug: 'coder', confidence: 0.82, method: 'semantic' }
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## 🔗 Links
|
|
148
|
+
|
|
149
|
+
- [GitHub Repository](https://github.com/monoes/monomind)
|
|
150
|
+
- [Documentation Site](https://monoes.github.io/monomind/)
|
|
151
|
+
- [Monomind CLI Command Reference](https://monoes.github.io/monomind/#routing)
|
|
152
|
+
|
|
153
|
+
## 📄 License
|
|
154
|
+
|
|
155
|
+
MIT
|
|
156
|
+
|
|
File without changes
|
|
File without changes
|
package/dist/capability-index.js
CHANGED
|
File without changes
|
|
File without changes
|
package/dist/cosine.d.ts
CHANGED
|
File without changes
|
package/dist/cosine.d.ts.map
CHANGED
|
File without changes
|
package/dist/cosine.js
CHANGED
|
File without changes
|
package/dist/cosine.js.map
CHANGED
|
File without changes
|
package/dist/encoder.d.ts
CHANGED
|
File without changes
|
package/dist/encoder.d.ts.map
CHANGED
|
File without changes
|
package/dist/encoder.js
CHANGED
|
File without changes
|
package/dist/encoder.js.map
CHANGED
|
File without changes
|
package/dist/index.d.ts
CHANGED
|
File without changes
|
package/dist/index.d.ts.map
CHANGED
|
File without changes
|
package/dist/index.js
CHANGED
|
File without changes
|
package/dist/index.js.map
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/llm-fallback.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
package/dist/llm-fallback.js
CHANGED
|
File without changes
|
package/dist/llm-fallback.js.map
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/prompts/classify.js
CHANGED
|
File without changes
|
|
File without changes
|
package/dist/route-layer.d.ts
CHANGED
|
File without changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"route-layer.d.ts","sourceRoot":"","sources":["../src/route-layer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAWlE,qBAAa,UAAU;IACrB,OAAO,CAAC,SAAS,CAAuB;IACxC,OAAO,CAAC,OAAO,CAAU;IACzB,OAAO,CAAC,MAAM,CAAmB;IACjC,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,WAAW,CAAC,CAAoB;IACxC,OAAO,CAAC,aAAa,CAAC,CAAmB;IAEzC,YAAY,MAAM,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"route-layer.d.ts","sourceRoot":"","sources":["../src/route-layer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAWlE,qBAAa,UAAU;IACrB,OAAO,CAAC,SAAS,CAAuB;IACxC,OAAO,CAAC,OAAO,CAAU;IACzB,OAAO,CAAC,MAAM,CAAmB;IACjC,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,WAAW,CAAC,CAAoB;IACxC,OAAO,CAAC,aAAa,CAAC,CAAmB;IAEzC,YAAY,MAAM,EAAE,gBAAgB,EAqBnC;IAED;;;OAGG;IACG,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,CAuBhC;IAED;;;OAGG;IACG,KAAK,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CA0EzD;IAED;;OAEG;IACG,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,CAe1C;CACF"}
|
package/dist/route-layer.js
CHANGED
|
@@ -10,7 +10,10 @@ export class RouteLayer {
|
|
|
10
10
|
llmFallback;
|
|
11
11
|
keywordFilter;
|
|
12
12
|
constructor(config) {
|
|
13
|
-
|
|
13
|
+
// PKG-4: defensive copy of routes so addRoute()'s push does not mutate
|
|
14
|
+
// the caller's array. Two RouteLayers built from one shared config would
|
|
15
|
+
// otherwise leak additions into each other.
|
|
16
|
+
this.config = { ...config, routes: [...config.routes] };
|
|
14
17
|
// A real injected embedder (or explicit 'hnsw') uses HNSWEncoder; otherwise
|
|
15
18
|
// the deterministic hash-based LocalEncoder. When embeddingGenerator is
|
|
16
19
|
// present, HNSWEncoder embeds with it exclusively (no dimension mixing).
|
|
@@ -98,7 +101,7 @@ export class RouteLayer {
|
|
|
98
101
|
if (belowThreshold && this.llmFallback) {
|
|
99
102
|
const fallbackResult = await this.llmFallback.classify(taskDescription, this.config.routes, scores);
|
|
100
103
|
if (this.config.debug) {
|
|
101
|
-
fallbackResult.allScores = scores.map(s => ({
|
|
104
|
+
fallbackResult.allScores = scores.map((s) => ({
|
|
102
105
|
routeName: s.routeName,
|
|
103
106
|
agentSlug: s.agentSlug,
|
|
104
107
|
score: s.score,
|
|
@@ -113,7 +116,7 @@ export class RouteLayer {
|
|
|
113
116
|
routeName: best.routeName,
|
|
114
117
|
};
|
|
115
118
|
if (this.config.debug) {
|
|
116
|
-
result.allScores = scores.map(s => ({
|
|
119
|
+
result.allScores = scores.map((s) => ({
|
|
117
120
|
routeName: s.routeName,
|
|
118
121
|
agentSlug: s.agentSlug,
|
|
119
122
|
score: s.score,
|
|
@@ -129,8 +132,16 @@ export class RouteLayer {
|
|
|
129
132
|
const centroid = computeCentroid(vectors);
|
|
130
133
|
this.centroids.push({ route, centroid });
|
|
131
134
|
this.config.routes.push(route);
|
|
132
|
-
|
|
135
|
+
// Only mark initialized when centroids cover every configured route. If
|
|
136
|
+
// addRoute() runs before initialize() on a non-empty route table, the
|
|
137
|
+
// pre-existing config.routes still lack centroids — setting initialized
|
|
138
|
+
// here would make initialize() return early and silently drop the whole
|
|
139
|
+
// configured table. Leaving it false lets the next initialize() (called
|
|
140
|
+
// automatically by route()) compute centroids for all routes, including
|
|
141
|
+
// this one.
|
|
142
|
+
if (!this.initialized && this.centroids.length === this.config.routes.length) {
|
|
133
143
|
this.initialized = true;
|
|
144
|
+
}
|
|
134
145
|
}
|
|
135
146
|
}
|
|
136
147
|
//# sourceMappingURL=route-layer.js.map
|
package/dist/route-layer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"route-layer.js","sourceRoot":"","sources":["../src/route-layer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,WAAW,EAAW,MAAM,cAAc,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAO3D,MAAM,OAAO,UAAU;IACb,SAAS,GAAoB,EAAE,CAAC;IAChC,OAAO,CAAU;IACjB,MAAM,CAAmB;IACzB,WAAW,GAAG,KAAK,CAAC;IACpB,WAAW,CAAqB;IAChC,aAAa,CAAoB;IAEzC,YAAY,MAAwB;QAClC,IAAI,CAAC,MAAM,GAAG,MAA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C;IAChB,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,QAAQ,CAAC,KAAY;QACzB,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QAC/D,MAAM,QAAQ,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC;QAC1C,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;QACzC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC/B,wEAAwE;QACxE,sEAAsE;QACtE,wEAAwE;QACxE,wEAAwE;QACxE,wEAAwE;QACxE,wEAAwE;QACxE,YAAY;QACZ,IAAI,CAAC,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,SAAS,CAAC,MAAM,KAAK,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;YAC7E,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;QAC1B,CAAC;IACH,CAAC;CACF"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/routes/index.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
package/dist/routes/index.js
CHANGED
|
File without changes
|
package/dist/routes/index.js.map
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/types.d.ts
CHANGED
|
File without changes
|
package/dist/types.d.ts.map
CHANGED
|
File without changes
|
package/dist/types.js
CHANGED
|
File without changes
|
package/dist/types.js.map
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@monoes/routing",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "Semantic task-to-agent routing for monomind",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -15,15 +15,7 @@
|
|
|
15
15
|
"files": [
|
|
16
16
|
"dist"
|
|
17
17
|
],
|
|
18
|
-
"
|
|
19
|
-
"build": "tsc",
|
|
20
|
-
"test": "vitest run",
|
|
21
|
-
"test:coverage": "vitest run --coverage",
|
|
22
|
-
"prepublishOnly": "rm -f tsconfig.tsbuildinfo && npm run build"
|
|
23
|
-
},
|
|
24
|
-
"dependencies": {
|
|
25
|
-
"zod": "^3.22.0"
|
|
26
|
-
},
|
|
18
|
+
"dependencies": {},
|
|
27
19
|
"devDependencies": {
|
|
28
20
|
"typescript": "^7.0.2",
|
|
29
21
|
"@types/node": "^20.0.0",
|
|
@@ -31,5 +23,11 @@
|
|
|
31
23
|
},
|
|
32
24
|
"publishConfig": {
|
|
33
25
|
"access": "public"
|
|
26
|
+
},
|
|
27
|
+
"scripts": {
|
|
28
|
+
"prebuild": "node ../../../scripts/build-fs.mjs clean dist tsconfig.tsbuildinfo",
|
|
29
|
+
"build": "tsc",
|
|
30
|
+
"test": "vitest run",
|
|
31
|
+
"test:coverage": "vitest run --coverage"
|
|
34
32
|
}
|
|
35
|
-
}
|
|
33
|
+
}
|