@swirl-search/backstage-plugin-search-backend-module-swirl 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.
- package/LICENSE +202 -0
- package/README.md +160 -0
- package/config.schema.json +138 -0
- package/dist/alpha.cjs.js +10 -0
- package/dist/alpha.cjs.js.map +1 -0
- package/dist/alpha.d.ts +6 -0
- package/dist/collators/SwirlFederatedCollatorFactory.cjs.js +26 -0
- package/dist/collators/SwirlFederatedCollatorFactory.cjs.js.map +1 -0
- package/dist/engines/SwirlClient.cjs.js +69 -0
- package/dist/engines/SwirlClient.cjs.js.map +1 -0
- package/dist/engines/SwirlIndexer.cjs.js +171 -0
- package/dist/engines/SwirlIndexer.cjs.js.map +1 -0
- package/dist/engines/SwirlNoopIndexer.cjs.js +29 -0
- package/dist/engines/SwirlNoopIndexer.cjs.js.map +1 -0
- package/dist/engines/SwirlSearchEngine.cjs.js +377 -0
- package/dist/engines/SwirlSearchEngine.cjs.js.map +1 -0
- package/dist/engines/types.cjs.js +18 -0
- package/dist/engines/types.cjs.js.map +1 -0
- package/dist/index.cjs.js +30 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.d.ts +455 -0
- package/dist/module.cjs.js +62 -0
- package/dist/module.cjs.js.map +1 -0
- package/package.json +89 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "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
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright 2026 SWIRL AI Connect
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
# search-backend-module-swirl
|
|
2
|
+
|
|
3
|
+
A Backstage search backend module that puts [SWIRL](https://github.com/swirlai/swirl-search) behind the search plugin.
|
|
4
|
+
|
|
5
|
+
## What it does
|
|
6
|
+
|
|
7
|
+
The module registers two things with the search backend:
|
|
8
|
+
|
|
9
|
+
1. **A search engine.** Every document Backstage collates (catalog entities, TechDocs pages, anything else with a collator) is written to a SWIRL index instead of Lunr, Postgres or Elasticsearch, and every query is answered by SWIRL. Backstage keeps its own result rendering and its own permission filtering; only storage and relevance move.
|
|
10
|
+
2. **A `swirl-federated` document type.** SWIRL can fan a query out to systems that are not in Backstage at all - GitHub, Confluence, an internal wiki, a ticket tracker. Those results come back in the same response, under the `swirl-federated` type, and land in the normal search page next to catalog results. The type is declared by a collator that yields zero documents; nothing federated is ever indexed by Backstage.
|
|
11
|
+
|
|
12
|
+
Identity travels with the query. The search router mints a plugin token for each request whose `obo` claim carries the calling user, and the module forwards that token to SWIRL unchanged, so SWIRL applies the same user's access to the sources it federates to.
|
|
13
|
+
|
|
14
|
+
## Install
|
|
15
|
+
|
|
16
|
+
```sh
|
|
17
|
+
# from your Backstage root
|
|
18
|
+
yarn --cwd packages/backend add @swirl-search/backstage-plugin-search-backend-module-swirl
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Add it to the backend, after the search plugin:
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
// packages/backend/src/index.ts
|
|
25
|
+
backend.add(import('@backstage/plugin-search-backend'));
|
|
26
|
+
backend.add(
|
|
27
|
+
import('@swirl-search/backstage-plugin-search-backend-module-swirl'),
|
|
28
|
+
);
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
If your backend loads search modules conditionally, guard on the config key so the app still boots without SWIRL:
|
|
32
|
+
|
|
33
|
+
```ts
|
|
34
|
+
if (config.has('search.swirl')) {
|
|
35
|
+
yield import('@swirl-search/backstage-plugin-search-backend-module-swirl');
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
The module also skips registration on its own, with a logged warning, when `search.swirl` is absent. Your existing engine stays in place.
|
|
40
|
+
|
|
41
|
+
## Configuration
|
|
42
|
+
|
|
43
|
+
```yaml
|
|
44
|
+
search:
|
|
45
|
+
swirl:
|
|
46
|
+
# The only required key.
|
|
47
|
+
baseUrl: http://swirl:8000
|
|
48
|
+
|
|
49
|
+
# Backstage plugin id whose JWKS SWIRL trusts. Default "search".
|
|
50
|
+
audience: search
|
|
51
|
+
|
|
52
|
+
# Documents per ingest request. Default 500.
|
|
53
|
+
indexerBatchSize: 500
|
|
54
|
+
|
|
55
|
+
# Query timeout in ms. Default 8000.
|
|
56
|
+
queryTimeoutMs: 8000
|
|
57
|
+
|
|
58
|
+
federated:
|
|
59
|
+
# Register the swirl-federated document type. Default true.
|
|
60
|
+
enabled: true
|
|
61
|
+
# SWIRL provider tags to fan out to. Default ["backstage"].
|
|
62
|
+
providerTags: [backstage]
|
|
63
|
+
# Per-query federation timeout in ms, passed to SWIRL. Default 5000.
|
|
64
|
+
timeoutMs: 5000
|
|
65
|
+
|
|
66
|
+
# Relevance tuning, mirrored to SWIRL on startup.
|
|
67
|
+
tuning:
|
|
68
|
+
fieldBoosts:
|
|
69
|
+
titleExact: 3
|
|
70
|
+
titleNgram: 2
|
|
71
|
+
text: 1
|
|
72
|
+
ngram:
|
|
73
|
+
min: 4
|
|
74
|
+
max: 5
|
|
75
|
+
stemmer: en
|
|
76
|
+
stopwords: []
|
|
77
|
+
fuzzy:
|
|
78
|
+
enabled: true
|
|
79
|
+
distance: 1
|
|
80
|
+
bm25:
|
|
81
|
+
k1: 1.2
|
|
82
|
+
b: 0.75
|
|
83
|
+
|
|
84
|
+
highlight:
|
|
85
|
+
# Default true.
|
|
86
|
+
enabled: true
|
|
87
|
+
# Longest snippet returned per field, counted in visible characters
|
|
88
|
+
# rather than markup. Default 200.
|
|
89
|
+
maxChars: 200
|
|
90
|
+
# The marker pair SWIRL wraps hits in, from its
|
|
91
|
+
# SWIRL_HIGHLIGHT_START_CHAR and SWIRL_HIGHLIGHT_END_CHAR settings.
|
|
92
|
+
# Override both together if your SWIRL differs from the defaults.
|
|
93
|
+
startMarker: <em>
|
|
94
|
+
endMarker: </em>
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
The whole block is `@visibility backend`; none of it reaches the browser.
|
|
98
|
+
|
|
99
|
+
## How it talks to SWIRL
|
|
100
|
+
|
|
101
|
+
### Indexing
|
|
102
|
+
|
|
103
|
+
One generation per collator run, per document type:
|
|
104
|
+
|
|
105
|
+
| Call | When |
|
|
106
|
+
| ------------------------------------------ | --------------------------------------------------------------------------------------------- |
|
|
107
|
+
| `POST /swirl/index/<type>/begin/` | the indexer opens |
|
|
108
|
+
| `POST /swirl/index/<type>/<gen>/docs/` | once per batch, retried three times with backoff on 5xx and transport errors |
|
|
109
|
+
| `POST /swirl/index/<type>/<gen>/finalize/` | at the end of a run that produced at least one document; swaps the live generation atomically |
|
|
110
|
+
| `POST /swirl/index/<type>/<gen>/abort/` | a run that produced zero documents, or one that failed anywhere in the pipeline |
|
|
111
|
+
|
|
112
|
+
The zero-document abort is the guard every Backstage engine needs: a collator that comes back empty must not wipe the index that is currently being served. Because a failed run aborts its own generation rather than half-writing the live one, a crashed collator leaves search working on the last good index.
|
|
113
|
+
|
|
114
|
+
### Querying
|
|
115
|
+
|
|
116
|
+
Page 0 federates:
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
GET /swirl/search/?qs=<term>&providers=<tags>&backstage_types=<types>&backstage_filters=<json>&rag=false
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Page N is a database read in SWIRL, not a second federation, which keeps the paging loop in Backstage's `AuthorizedSearchEngine` cheap:
|
|
123
|
+
|
|
124
|
+
```
|
|
125
|
+
GET /swirl/results/?search_id=<id>&page=<n>
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
Both carry `Authorization: Bearer <plugin token>`. The page cursor Backstage passes around is base64 JSON, `{ "s": <swirl search id>, "p": <page> }`.
|
|
129
|
+
|
|
130
|
+
The federated lane joins a query when the caller asked for no types at all, or named `swirl-federated`. Under `permission.enabled` the router always passes the full list of registered types, which is exactly why the type has to be registered.
|
|
131
|
+
|
|
132
|
+
### Startup
|
|
133
|
+
|
|
134
|
+
On startup the module posts the `tuning` block to `POST /swirl/index/config/`, so relevance is configured in app-config and mirrored into SWIRL rather than maintained twice. A SWIRL that is down, or one that does not know the endpoint, is logged and stepped over; it never stops the backend from booting.
|
|
135
|
+
|
|
136
|
+
### Errors
|
|
137
|
+
|
|
138
|
+
When SWIRL reports that a requested type has no live index, the engine throws an error named `MissingIndexError` rather than returning an empty page, so the cause is visible instead of looking like a query that simply matched nothing. SWIRL reports this either as a `404` whose body is `{"error": "missing_index", "types": [...]}`, or as a structured `{"type": "__MISSING_INDEX__", "types": [...]}` entry in the response `messages` array.
|
|
139
|
+
|
|
140
|
+
## Highlighting
|
|
141
|
+
|
|
142
|
+
SWIRL marks hits in `title_hit_highlights` and `body_hit_highlights` with `<em>` and `</em>`, from its `SWIRL_HIGHLIGHT_START_CHAR` and `SWIRL_HIGHLIGHT_END_CHAR` settings. The engine rewrites those markers to a random per-instance tag pair before handing results to Backstage, the same way the Postgres engine does, so a document body containing a literal `<em>` cannot forge a highlight. A SWIRL configured with a different pair is handled by `highlight.startMarker` and `highlight.endMarker`.
|
|
143
|
+
|
|
144
|
+
`maxChars` budgets visible characters, not markup, and a snippet cut short inside a hit still closes it, so the engine never hands Backstage an unbalanced tag.
|
|
145
|
+
|
|
146
|
+
## Scores
|
|
147
|
+
|
|
148
|
+
SWIRL's `MappingResultProcessor` sweeps top level keys it does not recognise into `payload`, so the provider score arrives as `payload.searchprovider_score` rather than beside `swirl_score`. The engine reads it from there and falls back to `swirl_score`.
|
|
149
|
+
|
|
150
|
+
Ranks stay sequential in the order SWIRL returned, because the relevancy mixer has already ordered results across providers; the engine does not re-sort by score. The score is attached to `swirl-federated` documents as `score`, where it is the only ranking signal a renderer has. Indexed documents are handed back exactly as Backstage collated them.
|
|
151
|
+
|
|
152
|
+
## Development
|
|
153
|
+
|
|
154
|
+
```sh
|
|
155
|
+
yarn test
|
|
156
|
+
yarn lint
|
|
157
|
+
yarn tsc
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
`e2e/stub-swirl/` in the repository root serves the six endpoints this module calls, backed by an in-memory index, for manual checks without a SWIRL container.
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"search": {
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"swirl": {
|
|
9
|
+
"type": "object",
|
|
10
|
+
"properties": {
|
|
11
|
+
"baseUrl": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"description": "Base URL of the SWIRL for Backstage service, e.g. http://swirl:8000"
|
|
14
|
+
},
|
|
15
|
+
"audience": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "Backstage plugin id whose JWKS SWIRL trusts. Default \"search\"."
|
|
18
|
+
},
|
|
19
|
+
"indexerBatchSize": {
|
|
20
|
+
"type": "number",
|
|
21
|
+
"description": "Batch size for indexing. Default 500."
|
|
22
|
+
},
|
|
23
|
+
"queryTimeoutMs": {
|
|
24
|
+
"type": "number",
|
|
25
|
+
"description": "Request timeout in ms for query calls. Default 8000."
|
|
26
|
+
},
|
|
27
|
+
"federated": {
|
|
28
|
+
"type": "object",
|
|
29
|
+
"properties": {
|
|
30
|
+
"enabled": {
|
|
31
|
+
"type": "boolean",
|
|
32
|
+
"description": "Register the swirl-federated document type. Default true."
|
|
33
|
+
},
|
|
34
|
+
"providerTags": {
|
|
35
|
+
"type": "array",
|
|
36
|
+
"items": {
|
|
37
|
+
"type": "string"
|
|
38
|
+
},
|
|
39
|
+
"description": "SWIRL provider tags to fan out to. Default [\"backstage\"]."
|
|
40
|
+
},
|
|
41
|
+
"timeoutMs": {
|
|
42
|
+
"type": "number",
|
|
43
|
+
"description": "Per-query federation timeout in ms passed to SWIRL. Default 5000."
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"description": "Federated lane"
|
|
47
|
+
},
|
|
48
|
+
"tuning": {
|
|
49
|
+
"type": "object",
|
|
50
|
+
"properties": {
|
|
51
|
+
"fieldBoosts": {
|
|
52
|
+
"type": "object",
|
|
53
|
+
"properties": {
|
|
54
|
+
"titleExact": {
|
|
55
|
+
"type": "number"
|
|
56
|
+
},
|
|
57
|
+
"titleNgram": {
|
|
58
|
+
"type": "number"
|
|
59
|
+
},
|
|
60
|
+
"text": {
|
|
61
|
+
"type": "number"
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"ngram": {
|
|
66
|
+
"type": "object",
|
|
67
|
+
"properties": {
|
|
68
|
+
"min": {
|
|
69
|
+
"type": "number"
|
|
70
|
+
},
|
|
71
|
+
"max": {
|
|
72
|
+
"type": "number"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"stemmer": {
|
|
77
|
+
"type": "string"
|
|
78
|
+
},
|
|
79
|
+
"stopwords": {
|
|
80
|
+
"type": "array",
|
|
81
|
+
"items": {
|
|
82
|
+
"type": "string"
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"fuzzy": {
|
|
86
|
+
"type": "object",
|
|
87
|
+
"properties": {
|
|
88
|
+
"enabled": {
|
|
89
|
+
"type": "boolean"
|
|
90
|
+
},
|
|
91
|
+
"distance": {
|
|
92
|
+
"type": "number"
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"bm25": {
|
|
97
|
+
"type": "object",
|
|
98
|
+
"properties": {
|
|
99
|
+
"k1": {
|
|
100
|
+
"type": "number"
|
|
101
|
+
},
|
|
102
|
+
"b": {
|
|
103
|
+
"type": "number"
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
"description": "Relevance tuning, mirrored to SWIRL on startup"
|
|
109
|
+
},
|
|
110
|
+
"highlight": {
|
|
111
|
+
"type": "object",
|
|
112
|
+
"properties": {
|
|
113
|
+
"enabled": {
|
|
114
|
+
"type": "boolean"
|
|
115
|
+
},
|
|
116
|
+
"maxChars": {
|
|
117
|
+
"type": "number"
|
|
118
|
+
},
|
|
119
|
+
"startMarker": {
|
|
120
|
+
"type": "string",
|
|
121
|
+
"description": "The marker pair SWIRL wraps hits in, from its SWIRL_HIGHLIGHT_START_CHAR and SWIRL_HIGHLIGHT_END_CHAR settings. Defaults \"<em>\" and \"</em>\". Override both together if your SWIRL is configured with a different pair."
|
|
122
|
+
},
|
|
123
|
+
"endMarker": {
|
|
124
|
+
"type": "string"
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"required": [
|
|
130
|
+
"baseUrl"
|
|
131
|
+
],
|
|
132
|
+
"description": "Configuration for the SWIRL search engine.",
|
|
133
|
+
"visibility": "backend"
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alpha.cjs.js","sources":["../src/alpha.ts"],"sourcesContent":["/*\n * Copyright 2026 SWIRL AI Connect\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { searchModuleSwirlEngine as feature } from './module';\n\n/** @alpha */\nconst _feature = feature;\nexport default _feature;\n"],"names":["feature"],"mappings":";;;;;;AAmBA,MAAM,QAAA,GAAWA;;"}
|
package/dist/alpha.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var node_stream = require('node:stream');
|
|
4
|
+
var types = require('../engines/types.cjs.js');
|
|
5
|
+
|
|
6
|
+
class SwirlFederatedCollatorFactory {
|
|
7
|
+
type = types.SWIRL_FEDERATED_TYPE;
|
|
8
|
+
logger;
|
|
9
|
+
constructor(options) {
|
|
10
|
+
this.logger = options.logger;
|
|
11
|
+
}
|
|
12
|
+
static fromConfig(_config, options) {
|
|
13
|
+
return new SwirlFederatedCollatorFactory(options);
|
|
14
|
+
}
|
|
15
|
+
async getCollator() {
|
|
16
|
+
return node_stream.Readable.from(this.execute());
|
|
17
|
+
}
|
|
18
|
+
async *execute() {
|
|
19
|
+
this.logger.debug(
|
|
20
|
+
`The ${types.SWIRL_FEDERATED_TYPE} type is served at query time by SWIRL; nothing to index`
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
exports.SwirlFederatedCollatorFactory = SwirlFederatedCollatorFactory;
|
|
26
|
+
//# sourceMappingURL=SwirlFederatedCollatorFactory.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SwirlFederatedCollatorFactory.cjs.js","sources":["../../src/collators/SwirlFederatedCollatorFactory.ts"],"sourcesContent":["/*\n * Copyright 2026 SWIRL AI Connect\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Readable } from 'node:stream';\nimport { LoggerService } from '@backstage/backend-plugin-api';\nimport { Config } from '@backstage/config';\nimport {\n DocumentCollatorFactory,\n IndexableDocument,\n} from '@backstage/plugin-search-common';\nimport { SWIRL_FEDERATED_TYPE } from '../engines/types';\n\n/**\n * Options for {@link SwirlFederatedCollatorFactory}.\n *\n * @public\n */\nexport type SwirlFederatedCollatorFactoryOptions = {\n logger: LoggerService;\n};\n\n/**\n * A collator that yields no documents.\n *\n * Federated results are produced by SWIRL at query time and are never indexed\n * by Backstage, but they still need a registered document type: the type is\n * what makes them appear in `getDocumentTypes()`, survive\n * `AuthorizedSearchEngine` when permissions are on, and show up as a filter in\n * the search UI. Registering an empty collator is the cheapest way to declare\n * the type.\n *\n * @public\n */\nexport class SwirlFederatedCollatorFactory implements DocumentCollatorFactory {\n readonly type = SWIRL_FEDERATED_TYPE;\n\n private readonly logger: LoggerService;\n\n private constructor(options: SwirlFederatedCollatorFactoryOptions) {\n this.logger = options.logger;\n }\n\n static fromConfig(\n _config: Config,\n options: SwirlFederatedCollatorFactoryOptions,\n ): SwirlFederatedCollatorFactory {\n return new SwirlFederatedCollatorFactory(options);\n }\n\n async getCollator(): Promise<Readable> {\n return Readable.from(this.execute());\n }\n\n private async *execute(): AsyncGenerator<IndexableDocument> {\n this.logger.debug(\n `The ${SWIRL_FEDERATED_TYPE} type is served at query time by SWIRL; nothing to index`,\n );\n }\n}\n"],"names":["SWIRL_FEDERATED_TYPE","Readable"],"mappings":";;;;;AA8CO,MAAM,6BAAA,CAAiE;AAAA,EACnE,IAAA,GAAOA,0BAAA;AAAA,EAEC,MAAA;AAAA,EAET,YAAY,OAAA,EAA+C;AACjE,IAAA,IAAA,CAAK,SAAS,OAAA,CAAQ,MAAA;AAAA,EACxB;AAAA,EAEA,OAAO,UAAA,CACL,OAAA,EACA,OAAA,EAC+B;AAC/B,IAAA,OAAO,IAAI,8BAA8B,OAAO,CAAA;AAAA,EAClD;AAAA,EAEA,MAAM,WAAA,GAAiC;AACrC,IAAA,OAAOC,oBAAA,CAAS,IAAA,CAAK,IAAA,CAAK,OAAA,EAAS,CAAA;AAAA,EACrC;AAAA,EAEA,OAAe,OAAA,GAA6C;AAC1D,IAAA,IAAA,CAAK,MAAA,CAAO,KAAA;AAAA,MACV,OAAOD,0BAAoB,CAAA,wDAAA;AAAA,KAC7B;AAAA,EACF;AACF;;"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
class SwirlClient {
|
|
4
|
+
baseUrl;
|
|
5
|
+
auth;
|
|
6
|
+
audience;
|
|
7
|
+
timeoutMs;
|
|
8
|
+
fetchImpl;
|
|
9
|
+
constructor(options) {
|
|
10
|
+
this.baseUrl = options.baseUrl.replace(/\/+$/, "");
|
|
11
|
+
this.auth = options.auth;
|
|
12
|
+
this.audience = options.audience;
|
|
13
|
+
this.timeoutMs = options.timeoutMs;
|
|
14
|
+
this.fetchImpl = options.fetchImpl ?? ((...args) => fetch(...args));
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Mints a plugin token for SWIRL. Used by the indexer, by the startup
|
|
18
|
+
* tuning call, and by queries that arrive without a router supplied token.
|
|
19
|
+
*/
|
|
20
|
+
async mintToken(credentials) {
|
|
21
|
+
const onBehalfOf = credentials ?? await this.auth.getOwnServiceCredentials();
|
|
22
|
+
const { token } = await this.auth.getPluginRequestToken({
|
|
23
|
+
onBehalfOf,
|
|
24
|
+
targetPluginId: this.audience
|
|
25
|
+
});
|
|
26
|
+
return token;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Builds an absolute URL against the configured base URL. Undefined and
|
|
30
|
+
* null query values are dropped.
|
|
31
|
+
*/
|
|
32
|
+
url(path, query) {
|
|
33
|
+
const url = new URL(`${this.baseUrl}${path}`);
|
|
34
|
+
for (const [key, value] of Object.entries(query ?? {})) {
|
|
35
|
+
if (value === void 0 || value === null || value === "") {
|
|
36
|
+
continue;
|
|
37
|
+
}
|
|
38
|
+
url.searchParams.set(key, String(value));
|
|
39
|
+
}
|
|
40
|
+
return url.toString();
|
|
41
|
+
}
|
|
42
|
+
async request(options) {
|
|
43
|
+
const response = await this.fetchImpl(options.url, {
|
|
44
|
+
method: options.method,
|
|
45
|
+
headers: {
|
|
46
|
+
Authorization: `Bearer ${options.token}`,
|
|
47
|
+
Accept: "application/json",
|
|
48
|
+
...options.body === void 0 ? {} : { "Content-Type": "application/json" }
|
|
49
|
+
},
|
|
50
|
+
body: options.body === void 0 ? void 0 : JSON.stringify(options.body),
|
|
51
|
+
signal: AbortSignal.timeout(options.timeoutMs ?? this.timeoutMs)
|
|
52
|
+
});
|
|
53
|
+
let body;
|
|
54
|
+
if (response.status !== 204) {
|
|
55
|
+
const text = await response.text();
|
|
56
|
+
if (text) {
|
|
57
|
+
try {
|
|
58
|
+
body = JSON.parse(text);
|
|
59
|
+
} catch {
|
|
60
|
+
body = text;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return { status: response.status, ok: response.ok, body };
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
exports.SwirlClient = SwirlClient;
|
|
69
|
+
//# sourceMappingURL=SwirlClient.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SwirlClient.cjs.js","sources":["../../src/engines/SwirlClient.ts"],"sourcesContent":["/*\n * Copyright 2026 SWIRL AI Connect\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n AuthService,\n BackstageCredentials,\n} from '@backstage/backend-plugin-api';\n\n/**\n * Outcome of a single call to SWIRL. Non 2xx responses are returned rather\n * than thrown so that callers can decide what a status means; transport\n * failures still throw.\n *\n * @public\n */\nexport type SwirlRequestResult = {\n status: number;\n ok: boolean;\n body: any;\n};\n\n/**\n * Options for {@link SwirlClient}.\n *\n * @public\n */\nexport type SwirlClientOptions = {\n baseUrl: string;\n auth: AuthService;\n /** Plugin id whose JWKS SWIRL trusts. Tokens are minted for this target. */\n audience: string;\n /** Default request timeout in ms. */\n timeoutMs: number;\n /** Injectable for tests. Defaults to the global fetch. */\n fetchImpl?: typeof fetch;\n};\n\n/**\n * Thin HTTP client for the SWIRL for Backstage service. Owns URL building,\n * bearer handling and timeouts; knows nothing about search semantics.\n *\n * @public\n */\nexport class SwirlClient {\n private readonly baseUrl: string;\n private readonly auth: AuthService;\n private readonly audience: string;\n private readonly timeoutMs: number;\n private readonly fetchImpl: typeof fetch;\n\n constructor(options: SwirlClientOptions) {\n this.baseUrl = options.baseUrl.replace(/\\/+$/, '');\n this.auth = options.auth;\n this.audience = options.audience;\n this.timeoutMs = options.timeoutMs;\n this.fetchImpl = options.fetchImpl ?? ((...args) => fetch(...args));\n }\n\n /**\n * Mints a plugin token for SWIRL. Used by the indexer, by the startup\n * tuning call, and by queries that arrive without a router supplied token.\n */\n async mintToken(credentials?: BackstageCredentials): Promise<string> {\n const onBehalfOf =\n credentials ?? (await this.auth.getOwnServiceCredentials());\n const { token } = await this.auth.getPluginRequestToken({\n onBehalfOf,\n targetPluginId: this.audience,\n });\n return token;\n }\n\n /**\n * Builds an absolute URL against the configured base URL. Undefined and\n * null query values are dropped.\n */\n url(\n path: string,\n query?: Record<string, string | number | undefined>,\n ): string {\n const url = new URL(`${this.baseUrl}${path}`);\n for (const [key, value] of Object.entries(query ?? {})) {\n if (value === undefined || value === null || value === '') {\n continue;\n }\n url.searchParams.set(key, String(value));\n }\n return url.toString();\n }\n\n async request(options: {\n url: string;\n method: 'GET' | 'POST' | 'DELETE';\n token: string;\n body?: unknown;\n timeoutMs?: number;\n }): Promise<SwirlRequestResult> {\n const response = await this.fetchImpl(options.url, {\n method: options.method,\n headers: {\n Authorization: `Bearer ${options.token}`,\n Accept: 'application/json',\n ...(options.body === undefined\n ? {}\n : { 'Content-Type': 'application/json' }),\n },\n body:\n options.body === undefined ? undefined : JSON.stringify(options.body),\n signal: AbortSignal.timeout(options.timeoutMs ?? this.timeoutMs),\n });\n\n let body: any;\n if (response.status !== 204) {\n const text = await response.text();\n if (text) {\n try {\n body = JSON.parse(text);\n } catch {\n body = text;\n }\n }\n }\n\n return { status: response.status, ok: response.ok, body };\n }\n}\n"],"names":[],"mappings":"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"}
|