github-router 0.3.331 → 0.3.333
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/README.md +4 -2
- package/dist/{aic-ledger-CsBx1crE.js → aic-ledger-D4fmThbS.js} +2 -2
- package/dist/{aic-ledger-CsBx1crE.js.map → aic-ledger-D4fmThbS.js.map} +1 -1
- package/dist/{attribution-settings-7dFpObGh.js → attribution-settings-Cu9cYRHf.js} +149 -98
- package/dist/attribution-settings-Cu9cYRHf.js.map +1 -0
- package/dist/{auth-xgFZGZbf.js → auth-DjKEIiqG.js} +4 -4
- package/dist/{auth-xgFZGZbf.js.map → auth-DjKEIiqG.js.map} +1 -1
- package/dist/balanced-profile-contract-CqFRoCUe.js +133 -0
- package/dist/balanced-profile-contract-CqFRoCUe.js.map +1 -0
- package/dist/bluebird-client-DpYl1YmJ.js +1163 -0
- package/dist/bluebird-client-DpYl1YmJ.js.map +1 -0
- package/dist/bluebird-client-bn9Yv6Cb.js +2 -0
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/{check-usage-vUDk6oV7.js → check-usage-B7UrDwD8.js} +4 -4
- package/dist/{check-usage-vUDk6oV7.js.map → check-usage-B7UrDwD8.js.map} +1 -1
- package/dist/{claude-C3-yBGzw.js → claude-BObYdG2J.js} +43 -34
- package/dist/claude-BObYdG2J.js.map +1 -0
- package/dist/{codex-C3hcVSOm.js → codex-JnNE58nu.js} +12 -8
- package/dist/codex-JnNE58nu.js.map +1 -0
- package/dist/{copilot-discount-0lG67i9O.js → copilot-discount-BcUa3f-k.js} +2 -2
- package/dist/{copilot-discount-0lG67i9O.js.map → copilot-discount-BcUa3f-k.js.map} +1 -1
- package/dist/{debug-a737qcCC.js → debug-CigFsS-h.js} +2 -2
- package/dist/{debug-a737qcCC.js.map → debug-CigFsS-h.js.map} +1 -1
- package/dist/engine-DApePSq4.js +2 -0
- package/dist/{exec-COUT4QsS.js → exec-MCU1H-KZ.js} +63 -13
- package/dist/exec-MCU1H-KZ.js.map +1 -0
- package/dist/{gate-discovery-BUhtwkyE.js → gate-discovery-CljRUZjm.js} +6 -6
- package/dist/{gate-discovery-BUhtwkyE.js.map → gate-discovery-CljRUZjm.js.map} +1 -1
- package/dist/{get-copilot-usage-VKU2IvuE.js → get-copilot-usage-CGaV01dC.js} +4 -3
- package/dist/{get-copilot-usage-VKU2IvuE.js.map → get-copilot-usage-CGaV01dC.js.map} +1 -1
- package/dist/hooks.mjs +142 -30
- package/dist/hooks.sha256 +1 -1
- package/dist/{index-cmd-k3oWl0n4.js → index-cmd-DXYWgKS6.js} +5 -5
- package/dist/{index-cmd-k3oWl0n4.js.map → index-cmd-DXYWgKS6.js.map} +1 -1
- package/dist/{internal-aic-status-Cfl5HiAN.js → internal-aic-status-Bma0r0ZS.js} +6 -5
- package/dist/internal-aic-status-Bma0r0ZS.js.map +1 -0
- package/dist/{internal-artifact-open-CX2fRP_D.js → internal-artifact-open-lta2UPnE.js} +2 -2
- package/dist/{internal-artifact-open-CX2fRP_D.js.map → internal-artifact-open-lta2UPnE.js.map} +1 -1
- package/dist/{internal-fast-dispatch-guard-Cxattkm4.js → internal-fast-dispatch-guard-BYRYbsFh.js} +1 -1
- package/dist/{internal-fast-dispatch-guard-BoTxjO6b.js → internal-fast-dispatch-guard-BuRlhFek.js} +27 -5
- package/dist/internal-fast-dispatch-guard-BuRlhFek.js.map +1 -0
- package/dist/{internal-first-mate-guard-D_JFcrl_.js → internal-first-mate-guard-BEwDjHfX.js} +3 -3
- package/dist/{internal-first-mate-guard-D_JFcrl_.js.map → internal-first-mate-guard-BEwDjHfX.js.map} +1 -1
- package/dist/{internal-first-mate-guard-97qsseTP.js → internal-first-mate-guard-CAefr6Ce.js} +1 -1
- package/dist/{internal-max-dispatch-guard-DQMyOds8.js → internal-max-dispatch-guard-6ZCEanI6.js} +1 -1
- package/dist/{internal-max-dispatch-guard-Cxe8h12x.js → internal-max-dispatch-guard-CtIO7pm1.js} +3 -3
- package/dist/{internal-max-dispatch-guard-Cxe8h12x.js.map → internal-max-dispatch-guard-CtIO7pm1.js.map} +1 -1
- package/dist/{internal-plan-review-O2dwnQv3.js → internal-plan-review-jIts3KYd.js} +3 -3
- package/dist/{internal-plan-review-O2dwnQv3.js.map → internal-plan-review-jIts3KYd.js.map} +1 -1
- package/dist/{internal-prompt-submit-CD0UFkT-.js → internal-prompt-submit-BfoWVyzs.js} +10 -7
- package/dist/internal-prompt-submit-BfoWVyzs.js.map +1 -0
- package/dist/{internal-session-bind-CHIOd5ys.js → internal-session-bind-IpZ5hJzR.js} +2 -2
- package/dist/{internal-session-bind-CHIOd5ys.js.map → internal-session-bind-IpZ5hJzR.js.map} +1 -1
- package/dist/{internal-stop-hook-DBrlosd0.js → internal-stop-hook-Cz88dW5S.js} +6 -6
- package/dist/{internal-stop-hook-DBrlosd0.js.map → internal-stop-hook-Cz88dW5S.js.map} +1 -1
- package/dist/{internal-stop-review-a3rpzzhd.js → internal-stop-review-BtGDVrv-.js} +2 -2
- package/dist/{internal-stop-review-a3rpzzhd.js.map → internal-stop-review-BtGDVrv-.js.map} +1 -1
- package/dist/{internal-worker-guard-BY5seBqp.js → internal-worker-guard-C0FJ4b29.js} +2 -2
- package/dist/{internal-worker-guard-BY5seBqp.js.map → internal-worker-guard-C0FJ4b29.js.map} +1 -1
- package/dist/{internal-workspace-header-CPZNphnk.js → internal-workspace-header-tvJVAXpv.js} +2 -2
- package/dist/{internal-workspace-header-CPZNphnk.js.map → internal-workspace-header-tvJVAXpv.js.map} +1 -1
- package/dist/{lifecycle-D8vQXfeC.js → lifecycle-BqWTXaeC.js} +3 -3
- package/dist/{lifecycle-D8vQXfeC.js.map → lifecycle-BqWTXaeC.js.map} +1 -1
- package/dist/lifecycle-DMRZswwc.js +2 -0
- package/dist/lifecycle-FT75ohVw.js +2 -0
- package/dist/{lifecycle-MmpJWRcl.js → lifecycle-kpLzHUgD.js} +2 -2
- package/dist/{lifecycle-MmpJWRcl.js.map → lifecycle-kpLzHUgD.js.map} +1 -1
- package/dist/main.js +21 -21
- package/dist/{max-profile-contract-Bl7I_EOC.js → max-profile-contract-MJJt0zm-.js} +2 -2
- package/dist/{max-profile-contract-Bl7I_EOC.js.map → max-profile-contract-MJJt0zm-.js.map} +1 -1
- package/dist/{mcp-workspace-header-DX_mD0JT.js → mcp-workspace-header-B77WqVFw.js} +2 -2
- package/dist/{mcp-workspace-header-DX_mD0JT.js.map → mcp-workspace-header-B77WqVFw.js.map} +1 -1
- package/dist/{models-BjCRO0AC.js → models-68HDOEPK.js} +3 -3
- package/dist/{models-BjCRO0AC.js.map → models-68HDOEPK.js.map} +1 -1
- package/dist/{orchestration-Dn5v8c0a.js → orchestration-Ccmfslh4.js} +3 -3
- package/dist/{orchestration-Dn5v8c0a.js.map → orchestration-Ccmfslh4.js.map} +1 -1
- package/dist/{paths-P5ajjpzU.js → paths-CpbTHKeP.js} +3 -3
- package/dist/{paths-P5ajjpzU.js.map → paths-CpbTHKeP.js.map} +1 -1
- package/dist/paths-Dfivvq21.js +2 -0
- package/dist/{peer-mcp-personas-Dztywua2.js → peer-mcp-personas-CorhWEhi.js} +211 -154
- package/dist/peer-mcp-personas-CorhWEhi.js.map +1 -0
- package/dist/{plan-review-hook-CfZBvsHd.js → plan-review-hook-ciat1jgZ.js} +4 -4
- package/dist/{plan-review-hook-CfZBvsHd.js.map → plan-review-hook-ciat1jgZ.js.map} +1 -1
- package/dist/{prompt-submit-hook-CRH6m7Vz.js → prompt-submit-hook-C8q_hDOv.js} +21 -17
- package/dist/prompt-submit-hook-C8q_hDOv.js.map +1 -0
- package/dist/{provision-CjBt5wEK.js → provision-DwNx-PZA.js} +7 -6
- package/dist/provision-DwNx-PZA.js.map +1 -0
- package/dist/{self-invocation-DBWyjvGm.js → self-invocation-DIUyoRgL.js} +2 -2
- package/dist/{self-invocation-DBWyjvGm.js.map → self-invocation-DIUyoRgL.js.map} +1 -1
- package/dist/{serve-C3LCkM-o.js → serve-Cu19zfEL.js} +33 -21
- package/dist/serve-Cu19zfEL.js.map +1 -0
- package/dist/{server-setup-DrSUlFZ_.js → server-setup-Dz7chd0b.js} +76 -37
- package/dist/server-setup-Dz7chd0b.js.map +1 -0
- package/dist/{service-backend-ByT0gUc8.js → service-backend-7SPDLUB9.js} +7 -7
- package/dist/service-backend-7SPDLUB9.js.map +1 -0
- package/dist/{start-CY1nnbB4.js → start-BvN5FA6O.js} +4 -4
- package/dist/{start-CY1nnbB4.js.map → start-BvN5FA6O.js.map} +1 -1
- package/dist/{state-BlMpEFAt.js → state-CVp30CBF.js} +7 -1
- package/dist/state-CVp30CBF.js.map +1 -0
- package/dist/{stop-gate-hook-BACb8dlj.js → stop-gate-hook-DZVfKoSh.js} +4 -4
- package/dist/{stop-gate-hook-BACb8dlj.js.map → stop-gate-hook-DZVfKoSh.js.map} +1 -1
- package/dist/{stop-gate-policy-D6jIeOXB.js → stop-gate-policy-Gd_cNT9-.js} +3 -3
- package/dist/{stop-gate-policy-D6jIeOXB.js.map → stop-gate-policy-Gd_cNT9-.js.map} +1 -1
- package/dist/{token-Dlb_84hW.js → token-DATA_OQK.js} +5 -383
- package/dist/token-DATA_OQK.js.map +1 -0
- package/dist/upstream-retry-i1k1Xai2.js +383 -0
- package/dist/upstream-retry-i1k1Xai2.js.map +1 -0
- package/dist/{worker-dispatch-DtjQchvM.js → worker-dispatch-lRhno09M.js} +2 -2
- package/dist/{worker-dispatch-DtjQchvM.js.map → worker-dispatch-lRhno09M.js.map} +1 -1
- package/docs/bluebird-search.md +338 -0
- package/package.json +3 -2
- package/dist/attribution-settings-7dFpObGh.js.map +0 -1
- package/dist/claude-C3-yBGzw.js.map +0 -1
- package/dist/codex-C3hcVSOm.js.map +0 -1
- package/dist/engine-CPdWX70n.js +0 -2
- package/dist/exec-COUT4QsS.js.map +0 -1
- package/dist/fast-profile-contract-DmsyQQrw.js +0 -61
- package/dist/fast-profile-contract-DmsyQQrw.js.map +0 -1
- package/dist/internal-aic-status-Cfl5HiAN.js.map +0 -1
- package/dist/internal-fast-dispatch-guard-BoTxjO6b.js.map +0 -1
- package/dist/internal-prompt-submit-CD0UFkT-.js.map +0 -1
- package/dist/lifecycle-B2eB8nRg.js +0 -2
- package/dist/lifecycle-Dz-Rq8pD.js +0 -2
- package/dist/paths-DVXBtLyo.js +0 -2
- package/dist/peer-mcp-personas-Dztywua2.js.map +0 -1
- package/dist/prompt-submit-hook-CRH6m7Vz.js.map +0 -1
- package/dist/provision-CjBt5wEK.js.map +0 -1
- package/dist/serve-C3LCkM-o.js.map +0 -1
- package/dist/server-setup-DrSUlFZ_.js.map +0 -1
- package/dist/service-backend-ByT0gUc8.js.map +0 -1
- package/dist/state-BlMpEFAt.js.map +0 -1
- package/dist/token-Dlb_84hW.js.map +0 -1
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
# Bluebird code search
|
|
2
|
+
|
|
3
|
+
`github-router claude --bluebird` routes the unified `code` tool's `semantic` and
|
|
4
|
+
`lexical` modes to the Bluebird MCP service. The local engine continues to own
|
|
5
|
+
`exact`, `regex`, and `ast` modes.
|
|
6
|
+
|
|
7
|
+
Bluebird and local ColBERT search are independent:
|
|
8
|
+
|
|
9
|
+
| Launch flags | Semantic | Lexical | Exact / regex / AST | Local ColBERT provisioning |
|
|
10
|
+
| --- | --- | --- | --- | --- |
|
|
11
|
+
| none | Local lexical fallback | Local | Local | No |
|
|
12
|
+
| `--search` | Local ColBERT, with lexical fallback | Local | Local | Yes |
|
|
13
|
+
| `--bluebird` | Bluebird semantic | Bluebird keyword | Local | No |
|
|
14
|
+
| `--bluebird --search` | Bluebird semantic | Bluebird keyword | Local | Yes |
|
|
15
|
+
|
|
16
|
+
When Bluebird owns a request, authentication, HTTP, JSON-RPC, MCP tool, and
|
|
17
|
+
response-shape failures are returned as `source: "error"`. They never silently
|
|
18
|
+
fall back to local search. Calls are bounded and cancellation-aware. Concurrent
|
|
19
|
+
callers share provisioning, initialization, token refresh, and expired-session
|
|
20
|
+
recovery, while one caller cancelling its wait does not cancel work needed by
|
|
21
|
+
other callers. Process shutdown aborts pending provisioning and MCP reads and
|
|
22
|
+
performs best-effort session teardown.
|
|
23
|
+
|
|
24
|
+
## Authentication and scope
|
|
25
|
+
|
|
26
|
+
The router obtains an Azure access token through Azure CLI for the Azure DevOps
|
|
27
|
+
resource. An operator may provide `BLUEBIRD_TOKEN` for controlled testing, but
|
|
28
|
+
the router strips that variable from Claude, Codex, and their descendants. Tokens
|
|
29
|
+
must never be logged, placed in request examples, or committed to fixtures.
|
|
30
|
+
|
|
31
|
+
The query workspace must be an absolute, accessible directory. Its local Git
|
|
32
|
+
remotes supply exactly one Azure DevOps organization, project, and repository
|
|
33
|
+
scope. Fetch and push entries for the same remote are collapsed. An Azure
|
|
34
|
+
`origin` fetch target is preferred; conflicting Azure `origin` targets are an
|
|
35
|
+
error. Without an Azure `origin`, exactly one distinct Azure repository is
|
|
36
|
+
accepted and multiple candidates are rejected as ambiguous. The router never
|
|
37
|
+
chooses the first remote arbitrarily and never broadens scope to other
|
|
38
|
+
repositories in the same project. The examples below use fictional names and
|
|
39
|
+
content.
|
|
40
|
+
|
|
41
|
+
Branch scope is also fail-closed. A normal checkout first probes whether its
|
|
42
|
+
current branch is indexed. Only a successful probe proving that branch absent
|
|
43
|
+
may trigger default-branch lookup. HTTP/authentication errors, malformed probe
|
|
44
|
+
responses, transport failures, timeouts, cancellation, Git failures, and Azure
|
|
45
|
+
CLI default-branch failures remain visible. Detached HEAD is the one case that
|
|
46
|
+
uses the default branch without a current-branch probe.
|
|
47
|
+
|
|
48
|
+
## MCP transport
|
|
49
|
+
|
|
50
|
+
Endpoint:
|
|
51
|
+
|
|
52
|
+
```text
|
|
53
|
+
https://mcp.bluebird-ai.net/
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Common request headers:
|
|
57
|
+
|
|
58
|
+
```http
|
|
59
|
+
Content-Type: application/json
|
|
60
|
+
Accept: application/json, text/event-stream
|
|
61
|
+
MCP-Protocol-Version: 2025-06-18
|
|
62
|
+
Authorization: Bearer <redacted Azure access token>
|
|
63
|
+
x-mcp-ec-organization: example-org
|
|
64
|
+
x-mcp-ec-project: example-project
|
|
65
|
+
x-mcp-ec-repository: example-repository
|
|
66
|
+
x-mcp-ec-branch: main
|
|
67
|
+
Mcp-Session-Id: <opaque session id, only when supplied by the server>
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
The client performs this sequence:
|
|
71
|
+
|
|
72
|
+
1. `initialize`
|
|
73
|
+
2. `notifications/initialized`
|
|
74
|
+
3. `tools/list`
|
|
75
|
+
4. `tools/call`
|
|
76
|
+
|
|
77
|
+
A server may be stateless and omit `Mcp-Session-Id`. Responses may be JSON or
|
|
78
|
+
SSE. Notification responses may have an empty body and status `202` or `204`.
|
|
79
|
+
|
|
80
|
+
### Initialize request
|
|
81
|
+
|
|
82
|
+
```json
|
|
83
|
+
{
|
|
84
|
+
"jsonrpc": "2.0",
|
|
85
|
+
"id": 1,
|
|
86
|
+
"method": "initialize",
|
|
87
|
+
"params": {
|
|
88
|
+
"protocolVersion": "2025-06-18",
|
|
89
|
+
"capabilities": {},
|
|
90
|
+
"clientInfo": {
|
|
91
|
+
"name": "github-router",
|
|
92
|
+
"version": "bluebird"
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Example response:
|
|
99
|
+
|
|
100
|
+
```json
|
|
101
|
+
{
|
|
102
|
+
"jsonrpc": "2.0",
|
|
103
|
+
"id": 1,
|
|
104
|
+
"result": {
|
|
105
|
+
"protocolVersion": "2025-06-18",
|
|
106
|
+
"capabilities": {
|
|
107
|
+
"tools": {}
|
|
108
|
+
},
|
|
109
|
+
"serverInfo": {
|
|
110
|
+
"name": "example-bluebird-server",
|
|
111
|
+
"version": "1.0.0"
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### Initialized notification
|
|
118
|
+
|
|
119
|
+
```json
|
|
120
|
+
{
|
|
121
|
+
"jsonrpc": "2.0",
|
|
122
|
+
"method": "notifications/initialized"
|
|
123
|
+
}
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### Tool discovery
|
|
127
|
+
|
|
128
|
+
Request:
|
|
129
|
+
|
|
130
|
+
```json
|
|
131
|
+
{
|
|
132
|
+
"jsonrpc": "2.0",
|
|
133
|
+
"id": 2,
|
|
134
|
+
"method": "tools/list",
|
|
135
|
+
"params": {}
|
|
136
|
+
}
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
The relevant deployed tool has this redacted, non-proprietary shape:
|
|
140
|
+
|
|
141
|
+
```json
|
|
142
|
+
{
|
|
143
|
+
"jsonrpc": "2.0",
|
|
144
|
+
"id": 2,
|
|
145
|
+
"result": {
|
|
146
|
+
"tools": [
|
|
147
|
+
{
|
|
148
|
+
"name": "code_search",
|
|
149
|
+
"description": "Search indexed source code.",
|
|
150
|
+
"inputSchema": {
|
|
151
|
+
"type": "object",
|
|
152
|
+
"required": ["method", "query"],
|
|
153
|
+
"properties": {
|
|
154
|
+
"method": {
|
|
155
|
+
"type": "string",
|
|
156
|
+
"enum": ["keyword", "semantic"]
|
|
157
|
+
},
|
|
158
|
+
"query": {
|
|
159
|
+
"type": "string"
|
|
160
|
+
},
|
|
161
|
+
"search_index": {
|
|
162
|
+
"type": "string",
|
|
163
|
+
"enum": ["General", "File", "Class", "Struct", "Function", "Macro"],
|
|
164
|
+
"default": "General"
|
|
165
|
+
},
|
|
166
|
+
"organization": { "type": "string" },
|
|
167
|
+
"project": { "type": "string" },
|
|
168
|
+
"repository": { "type": "string" },
|
|
169
|
+
"branch": { "type": "string" },
|
|
170
|
+
"ext": { "type": "string" },
|
|
171
|
+
"path": { "type": "string" },
|
|
172
|
+
"file": { "type": "string" },
|
|
173
|
+
"limit": { "type": "integer" }
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
]
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
The client reads the advertised schema rather than assuming optional fields.
|
|
183
|
+
For compatibility, it may use the legacy `do_vector_search` and
|
|
184
|
+
`search_file_content` tools only when both are advertised and `code_search` is
|
|
185
|
+
absent.
|
|
186
|
+
|
|
187
|
+
## Search requests
|
|
188
|
+
|
|
189
|
+
### Semantic
|
|
190
|
+
|
|
191
|
+
```json
|
|
192
|
+
{
|
|
193
|
+
"jsonrpc": "2.0",
|
|
194
|
+
"id": 3,
|
|
195
|
+
"method": "tools/call",
|
|
196
|
+
"params": {
|
|
197
|
+
"name": "code_search",
|
|
198
|
+
"arguments": {
|
|
199
|
+
"method": "semantic",
|
|
200
|
+
"query": "service that refreshes account sessions",
|
|
201
|
+
"search_index": "General",
|
|
202
|
+
"limit": 3
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
### Lexical
|
|
209
|
+
|
|
210
|
+
```json
|
|
211
|
+
{
|
|
212
|
+
"jsonrpc": "2.0",
|
|
213
|
+
"id": 4,
|
|
214
|
+
"method": "tools/call",
|
|
215
|
+
"params": {
|
|
216
|
+
"name": "code_search",
|
|
217
|
+
"arguments": {
|
|
218
|
+
"method": "keyword",
|
|
219
|
+
"query": "SessionRefreshService",
|
|
220
|
+
"limit": 3
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
`file_glob` is sent only when the advertised upstream schema contains an
|
|
227
|
+
explicit compatible glob field. It is not translated heuristically to `path` or
|
|
228
|
+
`file`, whose semantics differ.
|
|
229
|
+
|
|
230
|
+
## Search responses
|
|
231
|
+
|
|
232
|
+
A normal MCP tool result wraps one or more text blocks:
|
|
233
|
+
|
|
234
|
+
```json
|
|
235
|
+
{
|
|
236
|
+
"jsonrpc": "2.0",
|
|
237
|
+
"id": 3,
|
|
238
|
+
"result": {
|
|
239
|
+
"content": [
|
|
240
|
+
{
|
|
241
|
+
"type": "text",
|
|
242
|
+
"text": "[{\"SimilaritySearchResult\":[{\"node_name\":\"SessionRefreshService\",\"node_file_path\":\"/src/session-refresh.ts\",\"code_startRow\":12,\"code_endRow\":84,\"page_content\":\"Refreshes an account session.\",\"similarity_score\":0.73}]}]"
|
|
243
|
+
}
|
|
244
|
+
],
|
|
245
|
+
"isError": false
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
Semantic results use `SimilaritySearchResult`. Keyword results use
|
|
251
|
+
`FullTextSearchResult`:
|
|
252
|
+
|
|
253
|
+
```json
|
|
254
|
+
[
|
|
255
|
+
{
|
|
256
|
+
"FullTextSearchResult": [
|
|
257
|
+
{
|
|
258
|
+
"node_name": "/src/session-refresh.ts",
|
|
259
|
+
"node_file_path": "/src/session-refresh.ts",
|
|
260
|
+
"page_content": "Line 12: export class SessionRefreshService {",
|
|
261
|
+
"match_count": 1,
|
|
262
|
+
"total_matches": 1
|
|
263
|
+
}
|
|
264
|
+
]
|
|
265
|
+
}
|
|
266
|
+
]
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
The service can append human-readable guidance after the JSON value. The client
|
|
270
|
+
parses the leading JSON value and does not interpret the suffix as a result row.
|
|
271
|
+
An empty JSON array is a valid successful search with no hits. A malformed
|
|
272
|
+
wrapper is an error, not an empty result.
|
|
273
|
+
|
|
274
|
+
Normalized rows returned to the unified search layer have this shape:
|
|
275
|
+
|
|
276
|
+
```json
|
|
277
|
+
{
|
|
278
|
+
"file": "src/session-refresh.ts",
|
|
279
|
+
"line": 12,
|
|
280
|
+
"endLine": 84,
|
|
281
|
+
"name": "SessionRefreshService",
|
|
282
|
+
"snippet": "Refreshes an account session.",
|
|
283
|
+
"score": 0.73
|
|
284
|
+
}
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
Remote paths are normalized to repository-relative forward-slash paths. Drive
|
|
288
|
+
paths, UNC paths, NUL bytes, and parent-directory traversal are rejected.
|
|
289
|
+
|
|
290
|
+
Structural outlines are included by default for the returned files and augment,
|
|
291
|
+
rather than replace, these rows. Pass `summary: false` to omit outlines.
|
|
292
|
+
`scan: true` still requests a full-workspace structural map independently of
|
|
293
|
+
that result-summary setting.
|
|
294
|
+
|
|
295
|
+
## Error envelopes
|
|
296
|
+
|
|
297
|
+
JSON-RPC error:
|
|
298
|
+
|
|
299
|
+
```json
|
|
300
|
+
{
|
|
301
|
+
"jsonrpc": "2.0",
|
|
302
|
+
"id": 3,
|
|
303
|
+
"error": {
|
|
304
|
+
"code": -32602,
|
|
305
|
+
"message": "Invalid tool arguments"
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
MCP tool-level error:
|
|
311
|
+
|
|
312
|
+
```json
|
|
313
|
+
{
|
|
314
|
+
"jsonrpc": "2.0",
|
|
315
|
+
"id": 3,
|
|
316
|
+
"result": {
|
|
317
|
+
"content": [
|
|
318
|
+
{
|
|
319
|
+
"type": "text",
|
|
320
|
+
"text": "The search request could not be completed."
|
|
321
|
+
}
|
|
322
|
+
],
|
|
323
|
+
"isError": true
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
The router preserves the distinction between HTTP failures, JSON-RPC errors,
|
|
329
|
+
and MCP `isError` results while exposing an actionable, credential-free notice
|
|
330
|
+
to the caller.
|
|
331
|
+
|
|
332
|
+
## Testing policy
|
|
333
|
+
|
|
334
|
+
Unit and end-to-end tests must not call the real Bluebird endpoint, Azure DevOps,
|
|
335
|
+
or a real repository. Tests inject a fictional MCP URL, mock `fetch`, and use
|
|
336
|
+
synthetic paths, queries, snippets, session IDs, and tool schemas. Live Bluebird
|
|
337
|
+
checks are manual, read-only validation steps and must never print or inspect the
|
|
338
|
+
Azure access token.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "github-router",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.333",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "A reverse proxy that exposes GitHub Copilot as OpenAI and Anthropic compatible API endpoints.",
|
|
6
6
|
"keywords": [
|
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
"github-router": "dist/main.js"
|
|
26
26
|
},
|
|
27
27
|
"files": [
|
|
28
|
-
"dist"
|
|
28
|
+
"dist",
|
|
29
|
+
"docs/bluebird-search.md"
|
|
29
30
|
],
|
|
30
31
|
"scripts": {
|
|
31
32
|
"build": "tsdown && bun scripts/copy-browser-ext.ts && bun scripts/stamp-hooks-digest.ts",
|