@abgov/adsp-sdk-mcp-server 1.24.0 → 1.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/README.md +24 -12
  2. package/assets/docs/getting-started.md +6 -5
  3. package/assets/docs/platform/deployment.md +1 -1
  4. package/assets/docs/platform/getting-started.md +3 -18
  5. package/assets/docs/platform/platform-flask-sdk.md +44 -0
  6. package/assets/docs/platform/platform-node-sdk.md +6 -5
  7. package/assets/docs/services/access-service.md +10 -12
  8. package/assets/docs/services/agent-service.md +49 -8
  9. package/assets/docs/services/audit-service.md +252 -133
  10. package/assets/docs/services/configuration-service.md +163 -59
  11. package/assets/docs/services/event-service.md +138 -33
  12. package/assets/docs/services/form-service.md +152 -12
  13. package/assets/docs/services/notification-service.md +2 -0
  14. package/assets/docs/services/pdf-service.md +7 -7
  15. package/assets/docs/services/pii-service.md +16 -0
  16. package/assets/docs/services/project-planner-service.md +11 -11
  17. package/assets/docs/services/push-service.md +3 -3
  18. package/assets/docs/services/services.md +44 -0
  19. package/assets/docs/services/status-service.md +162 -6
  20. package/assets/docs/services/token-handler.md +68 -10
  21. package/assets/docs/services/value-service.md +95 -9
  22. package/assets/docs/services/verify-service.md +20 -1
  23. package/assets/docs/tutorials/access-service/themes.md +1 -1
  24. package/assets/docs/tutorials/form-service/ai-agent.md +1 -1
  25. package/assets/docs/tutorials/form-service/building-forms.md +1 -1
  26. package/assets/docs/tutorials/form-service/cheat-sheet.md +1 -1
  27. package/assets/docs/tutorials/form-service/form-app.md +1 -1
  28. package/assets/docs/tutorials/form-service/form-submissions.md +1 -1
  29. package/assets/docs/tutorials/form-service/introduction.md +1 -1
  30. package/assets/docs/tutorials/form-service/security.md +1 -1
  31. package/assets/docs/tutorials/status-service/health.md +1 -1
  32. package/assets/docs/tutorials/status-service/status.md +2 -2
  33. package/package.json +1 -1
  34. package/src/docs/docsRepository.js +1 -5
  35. package/src/docs/docsRepository.js.map +1 -1
  36. package/src/metrics.js +2 -11
  37. package/src/metrics.js.map +1 -1
  38. package/src/sdk-reference/search.js +1 -1
  39. package/src/sdk-reference/search.js.map +1 -1
  40. package/src/search/aliases.d.ts +6 -0
  41. package/src/search/aliases.js +20 -0
  42. package/src/search/aliases.js.map +1 -0
  43. package/src/search/textSearch.d.ts +5 -0
  44. package/src/search/textSearch.js +15 -0
  45. package/src/search/textSearch.js.map +1 -1
  46. package/src/server.js +2 -1
  47. package/src/server.js.map +1 -1
  48. package/src/tools/registerDocsTools.js +63 -3
  49. package/src/tools/registerDocsTools.js.map +1 -1
  50. package/src/version.d.ts +7 -0
  51. package/src/version.js +20 -0
  52. package/src/version.js.map +1 -0
@@ -16,6 +16,34 @@ client `urn:ads:platform:token-handler`
16
16
  |:-|:-|
17
17
  | token-handler-admin | Administrator role for token handler allowed to register clients. |
18
18
 
19
+ ## Tenancy
20
+
21
+ - **Administration endpoints.** The client endpoints that take a bearer token act on the tenant of the token, and need the `token-handler-admin` role in that tenant. Only tokens from tenant realms are accepted; core (platform) tokens respond 401, and there is no `tenantId` parameter.
22
+ - **Sign in.** The sign in endpoint is anonymous, so the tenant is given by the `X-ADSP-TENANT` header (for example set by the app's reverse proxy) or the `tenant` query parameter, as a tenant name or tenant URN. The header is used if both are set. The tenant is kept in the session, so the callback uses the tenant that sign in was started with, unless the header is set. Without a tenant, sign in responds 400, and an unknown tenant responds 404.
23
+ - **Sessions and targets.** After sign in, the session belongs to the tenant of the client that the user signed in with. Session information, logout, and target requests use that session; they take no tenant parameter.
24
+ - **Platform and tenant clients.** A tenant has its own clients and the clients of the core configuration. When both have a client with the same ID, the core client is used, so a tenant cannot change or replace it. Each tenant registers core clients separately, in its own realm. See [Core (platform) clients](#core-platform-clients).
25
+ - **Isolation.** A client ID that is not configured for the tenant or in the core configuration responds 404. A target ID that is not a target of the session's client responds 404.
26
+
27
+ ## API overview
28
+
29
+ The API is under `/token-handler/v1` on the token handler host; the examples use `https://token-handler.example.ca` as a placeholder for it. Frontend applications call the browser endpoints through a reverse proxy on their own site (see [Reverse proxy](#reverse-proxy)), not at this URL. See the [API documentation](https://api.adsp.alberta.ca) for request and response schemas.
30
+
31
+ | Endpoint | Purpose | Access |
32
+ | :- | :- | :- |
33
+ | `GET /token-handler/v1/clients` | List the clients of the tenant and the core configuration, with their registration status. | `token-handler-admin` |
34
+ | `GET /token-handler/v1/clients/{clientId}` | Get a client and its registration. | `token-handler-admin` |
35
+ | `POST /token-handler/v1/clients/{clientId}` | Register a client in access service. | `token-handler-admin` |
36
+ | `PUT /token-handler/v1/clients/{clientId}` | Update the redirect URIs of a registered client. | `token-handler-admin` |
37
+ | `GET /token-handler/v1/clients/{clientId}/auth` | Start sign in; redirects (302) to access service. | Anonymous (browser) |
38
+ | `GET /token-handler/v1/clients/{clientId}/callback` | Complete sign in; starts the session and redirects (302) to the client's success or failure URL. | Anonymous (browser) |
39
+ | `GET /token-handler/v1/clients/{clientId}/logout` | End the session; redirects (302) to the site root or access service. | Signed in user (session cookie) |
40
+ | `GET /token-handler/v1/sessions` | Get the session of the signed in user. | Signed in user (session cookie) |
41
+ | `GET`, `POST`, `PUT`, `PATCH`, `DELETE /token-handler/v1/targets/{targetId}/*` | Proxy a request to the upstream of a target, with the user's access token. | Signed in user (session cookie), plus the `X-XSRF-TOKEN` header for requests other than `GET` |
42
+
43
+ The sign in, callback, and logout endpoints are rate limited to 100 requests per 5 minutes per client IP address, and respond 429 above it. Responses of target requests are the responses of the upstream; the token handler only adds 400 (invalid CSRF token, path, or upstream), 401 (no session), and 404 (unknown target). The OpenAPI documentation shows target paths as a single `{targetPath}` parameter, because OpenAPI cannot express a path with any number of segments.
44
+
45
+ Clients and targets are configured in the [configuration service](configuration-service.md); token handler has no endpoints of its own for changing them.
46
+
19
47
  ## Concepts
20
48
 
21
49
  ### Clients
@@ -107,6 +135,14 @@ There are some special considerations for local development workflows when using
107
135
  }
108
136
  ```
109
137
 
138
+ ## Events
139
+
140
+ | Event | Description |
141
+ | :- | :- |
142
+ | `token-handler:client-registered` | Sent when a client is registered (`POST /token-handler/v1/clients/{clientId}`), and when its redirect URIs are updated (`PUT /token-handler/v1/clients/{clientId}`). The payload has the `client` (`id`, `name`, `clientId`, `authCallbackUrl`) and `registeredBy` (`id`, `name`). |
143
+
144
+ Token handler does not consume domain events of its own, but it receives configuration updates from the [configuration service](configuration-service.md) to invalidate its cached configuration, so changes to clients and targets take effect without a restart.
145
+
110
146
  ## Code examples
111
147
 
112
148
  ### Register a client
@@ -114,7 +150,7 @@ Registering a client creates a confidential client in access service and securel
114
150
 
115
151
  ```typescript
116
152
  const response = await fetch(
117
- `https://adsp.alberta.ca/api/token-handler/v1/clients/${clientId}`,
153
+ `https://token-handler.example.ca/token-handler/v1/clients/${clientId}`,
118
154
  {
119
155
  method: 'POST',
120
156
  headers: {
@@ -138,7 +174,7 @@ Updating a client's registration allows changing the registered redirect URIs in
138
174
 
139
175
  ```typescript
140
176
  const response = await fetch(
141
- `https://adsp.alberta.ca/api/token-handler/v1/clients/${clientId}`,
177
+ `https://token-handler.example.ca/token-handler/v1/clients/${clientId}`,
142
178
  {
143
179
  method: 'PUT',
144
180
  headers: {
@@ -160,15 +196,37 @@ Updating a client's registration allows changing the registered redirect URIs in
160
196
  ```
161
197
 
162
198
  ### Retrieving session information
163
- Frontend application can determine if the user is logged in and access their session information via the sessions endpoint.
199
+ Frontend applications can find out if the user is signed in, and who they are, with the sessions endpoint through their reverse proxy. The session cookie is sent by the browser. The endpoint responds 401 when no user is signed in.
164
200
 
165
201
  ```typescript
166
- const response = await fetch(
167
- '/sessions',
168
- {
169
- method: 'GET',
170
- }
171
- );
202
+ const response = await fetch('/token-handler/sessions');
203
+
204
+ if (response.status === 401) {
205
+ // Not signed in; navigate to sign in.
206
+ window.location.href =
207
+ `/token-handler/clients/${clientId}/auth?tenant=my-tenant&callbackUrl=${encodeURIComponent(callbackUrl)}`;
208
+ } else {
209
+ const [{ id, name, email, roles, expiry }] = await response.json();
210
+ }
211
+ ```
172
212
 
173
- const [session] = await response.json();
213
+ ### Making a request to a target
214
+ Frontend applications make API requests to a target through their reverse proxy. The token handler adds the user's access token. Requests other than `GET` need the value of the `XSRF-TOKEN` cookie in the `X-XSRF-TOKEN` header.
215
+
216
+ ```typescript
217
+ const csrfToken = document.cookie
218
+ .split('; ')
219
+ .find((cookie) => cookie.startsWith('XSRF-TOKEN='))
220
+ ?.split('=')[1];
221
+
222
+ const response = await fetch('/token-handler/targets/form-service/form/v1/forms', {
223
+ method: 'POST',
224
+ headers: {
225
+ 'Content-Type': 'application/json',
226
+ 'X-XSRF-TOKEN': csrfToken,
227
+ },
228
+ body: JSON.stringify({ definitionId: 'my-form-definition' }),
229
+ });
230
+
231
+ const { id, status } = await response.json();
174
232
  ```
@@ -6,7 +6,7 @@ parent: Services
6
6
 
7
7
  # Value service
8
8
 
9
- Value service provides an append only time series data store. It serves as the underlying store for the event log.
9
+ Value service provides an append only time series data store. It serves as the underlying store for the event log: [event service](event-service.md) writes every logged domain event as a record of a value.
10
10
 
11
11
  ## Client roles
12
12
 
@@ -20,11 +20,53 @@ client `urn:ads:platform:value-service`
20
20
 
21
21
  The export service's `urn:ads:platform:export-service:export-job` role can also read values, so that export jobs can read the event log.
22
22
 
23
+ ## Tenancy
24
+
25
+ Values, metrics and value definitions belong to a tenant. Every record is stored with the tenant it was written to, and reads only return records of the tenant they act on.
26
+
27
+ - **Which tenant is used.** Tenant users and service accounts always act on the tenant of their token. Core (platform) users act on the tenant set by the `tenantId` query parameter; writes also accept `tenantId` in the body. An invalid `tenantId` responds 400.
28
+ - **Writing values.** Tenant users write to their own tenant; setting a `tenantId` for another tenant responds 403. Core users must set a tenant, otherwise the write responds 400. Event service writes the event log this way, as a core service account.
29
+ - **Reading records.** `GET /value/v1/{namespace}/values/{name}` responds 400 for a tenant user without a tenant context. Core users with `value-reader` can leave out `tenantId` to read the records of all tenants.
30
+ - **Counts and metrics.** Counting records and reading metrics require a tenant context, so core users must set `tenantId`; without it the request responds 400.
31
+ - **Platform metrics.** `GET /value/v1/{namespace}/values/{name}/platform-metrics` is the only endpoint that combines tenants in one response. It needs a core user with `value-platform-metrics-reader`, and labels each interval with its tenant.
32
+ - **Latest values of a namespace.** `GET /value/v1/{namespace}/values` acts on the tenant of the caller's token. Core users reading a tenant should read each value with `tenantId` instead.
33
+ - **Platform versus tenant definitions.** Value definitions come from the tenant's configuration and from core (platform) configuration. When reading a single definition, a tenant definition takes precedence over a core definition with the same namespace and name. Tenants can't change core definitions through this API, and can't create a definition whose namespace and name are already used by a core definition (409).
34
+ - **Isolation.** Records of other tenants are never returned, and definitions of other tenants respond 404.
35
+ - **Role scope.** Roles are checked in the tenant being acted on. Core users with the same role are also allowed.
36
+
37
+ ## API overview
38
+
39
+ All endpoints are under `https://value-service.adsp.alberta.ca/value/v1`. See the [API documentation](https://api.adsp.alberta.ca) for request and response schemas.
40
+
41
+ | Endpoint | Purpose | Required role |
42
+ | :--------------------------------------------------------- | :----------------------------------------------------------- | :------------------------------------------------ |
43
+ | `POST /value/v1/{namespace}/values/{name}` | Write one or more records of a value, with optional metrics. | `value-writer` |
44
+ | `GET /value/v1/{namespace}/values/{name}` | Read records of a value, newest first, with filters. | `value-reader`, or export service `export-job` |
45
+ | `GET /value/v1/{namespace}/values/{name}/count` | Count records of a value. | `value-reader` |
46
+ | `GET /value/v1/{namespace}/values` | Read the latest record of each defined value in a namespace. | `value-reader` |
47
+ | `GET /value/v1/{namespace}/values/{name}/metrics` | Read interval aggregates of a value's metrics. | `value-reader` |
48
+ | `GET /value/v1/{namespace}/values/{name}/metrics/{metric}` | Read interval aggregates of one metric. | `value-reader` |
49
+ | `GET /value/v1/{namespace}/values/{name}/platform-metrics` | Read a value's metrics across all tenants. | `value-platform-metrics-reader` (core users only) |
50
+ | `POST /value/v1/service-metric-rollups/run` | Run the service metric rollup for completed days. | `value-writer` |
51
+ | `GET /value/v1/definitions` | List tenant and core value definitions. | `value-reader` or `value-writer` |
52
+ | `POST /value/v1/definitions` | Create a tenant value definition. | `value-writer` |
53
+ | `GET /value/v1/definitions/{namespace}/{name}` | Get a value definition (tenant, otherwise core). | `value-reader` or `value-writer` |
54
+ | `PATCH /value/v1/definitions/{namespace}/{name}` | Update a tenant value definition. | `value-writer` |
55
+ | `DELETE /value/v1/definitions/{namespace}/{name}` | Delete a tenant value definition. | `value-writer` |
56
+
57
+ The event log has no endpoints of its own in value service. Event log consumers should use the [event service](event-service.md) API, which reads and counts the event log value for them.
58
+
23
59
  ## Concepts
24
60
 
61
+ ### Value
62
+
63
+ A value represents a particular time series stream, identified by a namespace and name (for example `support` and `application-stats`). Each write results in a new record with a timestamp. It differs from a typical transactional record in that the record has no unique identity; instead it represents another entry in the set of entries for the value. Consumers can write scalars or json objects to values.
64
+
65
+ A record has a `timestamp` (the time of the write unless set), an optional `correlationId` that links related records, an optional `context` object used to filter reads, and the `value` itself. Writing does not require a value definition. A write can be a full record, a bare JSON object that is written as the value, or an array of either.
66
+
25
67
  ### Value definition
26
68
 
27
- Value definition is an optional metadata description for a particular _value_ (identified by a specific namespace and name). The definition provides write-time validation via json schema, and can enable a `value-written` event on each write with `sendWriteEvent`.
69
+ Value definition is an optional metadata description for a particular _value_ (identified by a specific namespace and name). The definition provides write-time validation via json schema, and can enable a `value-written` event on each write with `sendWriteEvent`. Records that fail validation are skipped, and the rest of the write goes ahead. Only values with a definition are returned when reading the latest values of a namespace.
28
70
 
29
71
  Value definitions are managed through the value service definitions API (`/value/v1/definitions`). The value service checks the user's roles and then stores the definitions in the [configuration service](configuration-service.md) under the `platform:value-service` namespace and name, using its own service account. Clients do not need configuration service roles to manage value definitions.
30
72
 
@@ -34,23 +76,23 @@ Value definitions are managed through the value service definitions API (`/value
34
76
  - Creating a definition adds its namespace if it does not exist, and fails with a 409 if a tenant or core definition with the same namespace and name already exists.
35
77
  - Deleting the last definition in a namespace removes the namespace.
36
78
 
79
+ ### Event log
80
+
81
+ The event log is a value written by [event service](event-service.md): every logged domain event is written as a record of the `event` value in the `event-service` namespace (`/value/v1/event-service/values/event`), to the tenant of the event. The record's `context` holds the event's context plus its `namespace`, `name` and `trace`, and its `value` is `{ payload }`. Event service also writes metrics with each record: `total:count`, `{namespace}:{name}:count`, and, for event definitions with an interval, a `:duration` metric in seconds since the event that started the interval.
82
+
37
83
  > Counting events in the event log is exposed by the [event service](event-service.md#count-events-in-the-event-log).
38
84
  > Consumers of the event log count should use that API rather than calling value service directly.
39
85
 
40
- Event log reads support exact payload searching with either `payloadPath` and `payloadValue`, or a JSON object in
86
+ Reads of the event log support exact payload searching with either `payloadPath` and `payloadValue`, or a JSON object in
41
87
  `payload`. Both `timestampMin` and `timestampMax` are required for payload searches, and the two search forms are
42
88
  mutually exclusive. Every property in a multi-condition `payload` object must match (`AND`). See
43
89
  [Search the event log](event-service.md#search-the-event-log) for examples and scalar type handling.
44
90
 
45
- ### Value
46
-
47
- A value represents a particular time series stream. Each write results in a new record with a timestamp. It differs from a typical transactional record in that the record has no unique identity; instead it represents another entry in the set of entries for the value. Consumers can write scalars or json objects to values.
48
-
49
91
  ### Metrics
50
92
 
51
- Metrics are numeric values that can be included in value writes as a `metrics` object of metric name to number. They are aggregated into time intervals (`one_minute`, `five_minutes`, `hourly`, `daily`, `weekly` and `monthly`) with `sum`, `avg`, `min`, `max` and `count` for each interval, and can be used for basic KPIs.
93
+ Metrics are numeric values that can be included in value writes as a `metrics` object of metric name to number; non-numeric entries are ignored, and metrics are not returned with the record. For a value with a definition, a `metrics` property inside the written `value` object is also moved into the record's metrics. Metrics are aggregated into time intervals (`one_minute`, `five_minutes`, `hourly`, `daily`, `weekly` and `monthly`) with `sum`, `avg`, `min`, `max` and `count` for each interval, and can be used for basic KPIs.
52
94
 
53
- Read a value's metrics from `/value/v1/{namespace}/values/{name}/metrics`, or a single metric from `/value/v1/{namespace}/values/{name}/metrics/{metric}`. The `interval` defaults to `daily`, and the JSON `criteria` accepts `intervalMin`, `intervalMax` and (for all metrics) `metricLike`. Without a range, the last month is read.
95
+ Read a value's metrics from `/value/v1/{namespace}/values/{name}/metrics`, or a single metric from `/value/v1/{namespace}/values/{name}/metrics/{metric}`. The `interval` defaults to `daily`; any value other than the six intervals responds 400. The `criteria` query parameter is a JSON object that accepts `intervalMin`, `intervalMax` and (for all metrics) `metricLike`, and must be valid JSON. Without a range, the last month is read. Results are newest first and paged `top` interval rows at a time (default 100, maximum 5000); pass `page.next` back as `after` for the next page.
54
96
 
55
97
  Core users with the `value-platform-metrics-reader` role can read a value's metrics across all tenants, labelled by tenant, from `/value/v1/{namespace}/values/{name}/platform-metrics`. This only reads the materialised rollups described below and is not paginated.
56
98
 
@@ -92,6 +134,16 @@ The job is off by default. Set `SERVICE_METRIC_ROLLUP_JOB_ENABLED=true` to run i
92
134
 
93
135
  A rollup can also be run on demand with `POST /value/v1/service-metric-rollups/run` and the `value-writer` role. The body can set `start` and `end` dates, which default to the trailing days. Core users can set `tenantId` or leave it out to roll up all tenants; tenant users always roll up their own tenant. The current partial day and future days are rejected.
94
136
 
137
+ ## Events
138
+
139
+ Value service sends one domain event:
140
+
141
+ | Event | Sent when |
142
+ | :-------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
143
+ | `value-written` | A record is written to a value whose definition has `sendWriteEvent` set. The payload has `timestamp`, `value` and `writtenBy`, and the context has the record's context plus `namespace` and `name`. |
144
+
145
+ `value-written` events are not written to the event log. Value service doesn't consume domain events; event service writes the event log by calling the value service API, not through an event subscription.
146
+
95
147
  ## Audit
96
148
 
97
149
  Value service records audit events for administrative changes through the [audit service](audit-service.md), under the `value-service` namespace. Each record includes the actor and the affected resource. Actions do not set a retention class; the audit service derives it from the category (`compliance` for administrative and data-access actions, `standard` for runtime actions), as shown in the table.
@@ -153,6 +205,39 @@ const { page, ...result } = await response.json();
153
205
  const records = result[namespace][name];
154
206
  ```
155
207
 
208
+ ### Read the latest values of a namespace
209
+
210
+ ```typescript
211
+ const namespace = 'support';
212
+ const response = await fetch(
213
+ `https://value-service.adsp.alberta.ca/value/v1/${namespace}/values?names=application-stats`,
214
+ {
215
+ method: 'GET',
216
+ headers: { Authorization: `Bearer ${accessToken}` },
217
+ },
218
+ );
219
+
220
+ // Keyed by namespace, then name; each is the latest record.
221
+ const { [namespace]: latest } = await response.json();
222
+ const { timestamp, value } = latest['application-stats'];
223
+ ```
224
+
225
+ ### Count records
226
+
227
+ ```typescript
228
+ const namespace = 'support';
229
+ const name = 'application-stats';
230
+ const response = await fetch(
231
+ `https://value-service.adsp.alberta.ca/value/v1/${namespace}/values/${name}/count?timestampMin=2026-09-01T00:00:00Z`,
232
+ {
233
+ method: 'GET',
234
+ headers: { Authorization: `Bearer ${accessToken}` },
235
+ },
236
+ );
237
+
238
+ const { count } = await response.json();
239
+ ```
240
+
156
241
  ### Read metrics
157
242
 
158
243
  ```typescript
@@ -168,6 +253,7 @@ const response = await fetch(
168
253
  );
169
254
 
170
255
  // Keyed by metric name; each has values of { interval, sum, avg, min, max, count }, newest first.
256
+ // page.intervalMax is the end of the window actually read.
171
257
  const { page, ...metrics } = await response.json();
172
258
  ```
173
259
 
@@ -19,7 +19,7 @@ client `urn:ads:platform:verify-service`
19
19
 
20
20
  ## Tenancy
21
21
 
22
- - **Which tenant is used.** Tenant users and service accounts generate and verify codes in the tenant of their token, and need the role in that tenant. Core (platform) users with the role in the core realm use a separate core namespace. Verify service doesn't support the `tenantId` query parameter.
22
+ - **Which tenant is used.** Tenant users and service accounts generate and verify codes in the tenant of their token, and need the role in that tenant. Core (platform) users with the role in the core realm use a separate core namespace. Core users can set the `tenantId` query parameter to the tenant that the [audit records](#audit-actions) of the operation are attributed to, for example the tenant of the subscriber that notification service verifies; it doesn't change the core namespace of the code. Tenant users can't set it; their records are attributed to the tenant of their token.
23
23
  - **Isolation.** Keys are unique within a tenant, so two tenants can use the same key without conflict. A code generated in one tenant can't be verified from another tenant; the verification responds 200 with `verified: false`, as it does for a key that has no code.
24
24
 
25
25
  ## API overview
@@ -45,6 +45,25 @@ A code is a random 6 character string of characters that are easy to tell apart.
45
45
 
46
46
  Verify service does not send or consume domain events.
47
47
 
48
+ ## Audit actions
49
+
50
+ Verify service records audit events in the `verify-service` namespace of the [audit service](audit-service.md). The actor is the user or service account that calls the API, for example the notification service account; never the person the code was sent to. The key is the resource (`{ type: 'verify-code', id: <key> }`) and is included as `codeKey` in the metadata. The code value is never recorded. Keys are recorded as given, so prefer keys without personal data, such as a generated ID; notification service uses a random UUID. All actions are version 1, in the `security` category and retention class.
51
+
52
+ | action | category | severity | retention class | recorded when |
53
+ | :----------------------------- | :------- | :------- | :-------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
54
+ | code.generated | security | info | security | A new code is generated at a key, with its `expiresAt` in the metadata. |
55
+ | code.verified | security | info | security | A submitted code matches the code at the key (`verified: true`). |
56
+ | code.rejected | security | warning | security | A submitted code fails verification (`verified: false`, status `failure`), with `reason` of `mismatch`, or `not-found` when the code expired, was cleared or never existed. |
57
+ | code.attempts-exceeded-cleared | security | warning | security | The code at a key is cleared after 10 failed verifications (`maxFailedVerifications` in the metadata), in addition to the `code.rejected` of the last attempt. |
58
+
59
+ Multiple `code.rejected` records and a `code.attempts-exceeded-cleared` on the same key in a short window can indicate a brute-force attempt.
60
+
61
+ Expired codes are removed by Redis without verify service being involved, so expiry isn't recorded on its own. A verification after expiry is recorded as `code.rejected` with `reason: 'not-found'`. Requests rejected for validation or missing roles aren't recorded.
62
+
63
+ Records are written to the tenant of the caller's token. Core users set the tenant with the `tenantId` query parameter; operations of core users without it have no tenant to be recorded to and aren't recorded. Audit failures are logged by the SDK and do not fail the operation. The verify service account requires the `audit-writer` role of `urn:ads:platform:audit-service`.
64
+
65
+ Audit recording is on by default. Set the environment variable `VERIFY_AUDIT_ENABLED=false` on verify service to turn it off, or `true` to turn it on regardless of the SDK `AUDIT_ENABLED` variable, which applies when `VERIFY_AUDIT_ENABLED` is not set. The action catalog is still registered while recording is off, so turning it back on needs only a restart.
66
+
48
67
  ## Code examples
49
68
 
50
69
  ### Generate a code
@@ -40,4 +40,4 @@ Probably the easiest way to build and test a new theme is:
40
40
  - clone the Access service repository, and
41
41
  - follow the instructions in the repository to build, test, and deploy your new templates.
42
42
 
43
- The Access service repository is maintained by the ADSP team in a private Government of Alberta organization, so you will need to request access before you can clone it. Please contact the ADSP team on slack (#adsp-connect) or email us at [ADSP Support](adsp@gov.ab.ca) to request access, or if you have any questions.
43
+ The Access service repository is maintained by the ADSP team in a private Government of Alberta organization, so you will need to request access before you can clone it. Please contact the ADSP team on slack (#adsp-connect) or email us at [ADSP Support](mailto:adsp@gov.ab.ca) to request access, or if you have any questions.
@@ -359,7 +359,7 @@ The agent creates display-only help blocks using Markdown:
359
359
  > **You:**
360
360
  > "Add a help block at the top of the form that says: '## Community Event Permit\nUse this form to apply for a permit to host an event on public property. **All fields marked with an asterisk are required.**\n\nFor questions, contact [permits@edmonton.ca](mailto:permits@edmonton.ca).'"
361
361
 
362
- Supports: headings, **bold**, _italic_, [links](url), bullet lists, numbered lists, and images.
362
+ Supports: headings, **bold**, _italic_, links (`[text](url)`), bullet lists, numbered lists, and images.
363
363
 
364
364
  ### Collapsible Details
365
365
 
@@ -262,7 +262,7 @@ For additional examples and option reference material, see the [cheat sheet](/ad
262
262
  ADSP has added several enhancements to the form builder in order to help designers and developers create professional looking forms. These include:
263
263
 
264
264
  - Adding [text, images, and links](/adsp-monorepo/tutorials/form-service/instructions.html) to forms in order to help clarify the information that is needed from end-users when filling them out.
265
- - A [file upload widget](/adsp-monorepo/tutorials/form-service/file-uploader.md)
265
+ - A [file upload widget](/adsp-monorepo/tutorials/form-service/file-uploader.html)
266
266
  - Data registries
267
267
 
268
268
  ## Learn More
@@ -1264,7 +1264,7 @@ As of **Jan. 2025** you can use markdown for help content, significantly simplif
1264
1264
 
1265
1265
  ### File Uploads {#target-uploads}
1266
1266
 
1267
- For when the user needs to upload supporting documentation. For a more complete description of file uploads, see [the documentation](/adsp-monorepo/tutorials/form-service/file-uploader.md).
1267
+ For when the user needs to upload supporting documentation. For a more complete description of file uploads, see [the documentation](/adsp-monorepo/tutorials/form-service/file-uploader.html).
1268
1268
 
1269
1269
  <table>
1270
1270
  <tr>
@@ -26,7 +26,7 @@ However, you can also configure a form to allow anonymous access. Anyone will be
26
26
 
27
27
  ### Security
28
28
 
29
- Developers can define the roles that are required to create, review and disposition their forms, as described in the [security section](/adsp-monorepo/tutorials/task-service/security.html) of the tutorial. In addition, they will need the ADSP-specific roles for accessing a form. The former should be specific to your _Tenant_ and _Form Definition_, as they will lock down access so that only your users can log-in and fill in the information. For the _Form App_, a user will need to be an _applicant_. _Clerks_ and _assessors_ will be able to review and disposition this forms through the [Task App](/adsp-monorepo/tutorials/task-service/task-app.html).
29
+ Developers can define the roles that are required to create, review and disposition their forms, as described in the [security section](/adsp-monorepo/tutorials/form-service/security.html) of the tutorial. In addition, they will need the ADSP-specific roles for accessing a form. The former should be specific to your _Tenant_ and _Form Definition_, as they will lock down access so that only your users can log-in and fill in the information. For the _Form App_, a user will need to be an _applicant_. _Clerks_ and _assessors_ will be able to review and disposition this forms through the [Task App](/adsp-monorepo/tutorials/task-service/task-app.html).
30
30
 
31
31
  #### Client Security
32
32
 
@@ -34,7 +34,7 @@ _Submission records_ can be used to help manage _Form Disposition_; that is, the
34
34
 
35
35
  ### Submission Queues
36
36
 
37
- In addition, developers can also opt-in to have the submission record placed in a [Task Queue](/adsp-monorepo/tutorials/task-service.html) for further processing:
37
+ In addition, developers can also opt-in to have the submission record placed in a [Task Queue](/adsp-monorepo/tutorials/task-service/task-queues.html) for further processing:
38
38
 
39
39
  ![](/adsp-monorepo/assets/form-service/submissionQueue.png){: width="400" }
40
40
 
@@ -18,7 +18,7 @@ Jsonforms provides a declarative means for creating new form definitions. Develo
18
18
 
19
19
  ### Rendering
20
20
 
21
- Currently the Form Service only supports rendering forms in React applications through a Jsonforms React component. [Adding it to your application](/adsp-monorepo/tutorials/form-service/integration.html) enables it to:
21
+ Currently the Form Service only supports rendering forms in React applications through a Jsonforms React component. [Adding it to your application](/adsp-monorepo/tutorials/form-service/Integration.html) enables it to:
22
22
 
23
23
  - render the form,
24
24
  - secure access to it,
@@ -28,7 +28,7 @@ There are several roles that may be required for users to access the form servic
28
28
 
29
29
  ![](/adsp-monorepo/assets/form-service/form-service-roles.png){: width="600" }
30
30
 
31
- Applicants will need the _form-admin_ and _intake-application_ role to create and fill out forms, respectively. If the form requires files to be uploaded they will also need:
31
+ Applicants create and fill out forms with the applicant roles of the _Form Definition_, and need the _form-applicant_ role to receive updates in the form app. The _form-admin_ role is for form administrators, and the _intake-application_ role is for service accounts that create and submit forms on behalf of anonymous applicants. If the form requires files to be uploaded applicants will also need:
32
32
 
33
33
  - _form-file-reader_
34
34
  - _form-file-uploader_
@@ -40,7 +40,7 @@ Click _start health check_ to begin the pinging. The status bar will update ever
40
40
 
41
41
  ### APIs
42
42
 
43
- You can also monitor and control the pings via the [Status Service APIs](https://api.adsp-uat.alberta.ca/autotest/?urls.primaryName=Status%20service), from another application. This would only be necessary if you wished to automate control, provide your own interface to keep user's notified, or perhaps to perform automated diagnostic on the application in question. The [Tenant Management Webapp](https://adsp.alberta.ca) provides basic capabilities for doing these things manually.
43
+ You can also monitor and control the pings via the [Status Service APIs](https://api.adsp.alberta.ca), from another application. This would only be necessary if you wished to automate control, provide your own interface to keep user's notified, or perhaps to perform automated diagnostic on the application in question. The [Tenant Management Webapp](https://adsp.alberta.ca) provides basic capabilities for doing these things manually.
44
44
 
45
45
  ## Learn More
46
46
 
@@ -8,7 +8,7 @@ grand_parent: Tutorials
8
8
 
9
9
  ## Application Status
10
10
 
11
- Application status is the _operational status_ of your application that can be set manually through the Status Service page on the [Tenant Admin Webapp](https://adsp.alberta.ca) or automatically, by integrating the [status service APIs](https://api.adsp-uat.alberta.ca/autotest/?urls.primaryName=Status%20service) with your application. Operational status can take on one of four values:
11
+ Application status is the _operational status_ of your application that can be set manually through the Status Service page on the [Tenant Admin Webapp](https://adsp.alberta.ca) or automatically, by integrating the [status service APIs](https://api.adsp.alberta.ca) with your application. Operational status can take on one of four values:
12
12
 
13
13
  - Operational: The application is up and running,
14
14
  - Maintenance: The application is undergoing routine maintenance,
@@ -26,7 +26,7 @@ Changing an application's status can affect users in a couple of ways. It will
26
26
  - update the status on the public static webpage provided for your tenant, and
27
27
  - notify anyone who has subscribed for notification of change. This includes end users.
28
28
 
29
- The public status page for your tenant can be found at at https://status.adsp.alberta.ca/{tenant-name}. Linking to this will give your users information about your tenant applications, including any [notices](/adsp-monorepo/tutorials/status-service/notifications.html) you may have posted. The latter gives you the ability to post information about a status change, including expected times. This is useful, for example, to inform users of upcoming maintenance windows or current outages.
29
+ The public status page for your tenant can be found at at https://status.adsp.alberta.ca/{tenant-name}. Linking to this will give your users information about your tenant applications, including any [notices](/adsp-monorepo/tutorials/status-service/notices.html) you may have posted. The latter gives you the ability to post information about a status change, including expected times. This is useful, for example, to inform users of upcoming maintenance windows or current outages.
30
30
 
31
31
  ## Learn More
32
32
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/adsp-sdk-mcp-server",
3
- "version": "1.24.0",
3
+ "version": "1.25.0",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Government of Alberta - MCP server for ADSP documentation and Node SDK reference lookup.",
6
6
  "repository": "https://github.com/GovAlta/adsp-monorepo",
@@ -14,10 +14,6 @@ const EXCLUDED_DOC_PATHS = new Set([
14
14
  'platform/platform-flask-sdk.md',
15
15
  'platform/platform-spring-sdk.md',
16
16
  ]);
17
- const STOP_WORDS = new Set([
18
- 'a', 'an', 'the', 'to', 'of', 'in', 'on', 'for', 'and', 'or', 'is', 'are',
19
- 'how', 'do', 'does', 'i', 'what', 'with', 'from', 'this', 'that', 'it', 'be',
20
- ]);
21
17
  function parseFrontmatter(raw) {
22
18
  const match = /^---\r?\n([\s\S]*?)\r?\n---\r?\n?/.exec(raw);
23
19
  if (!match) {
@@ -83,7 +79,7 @@ class DocsRepository {
83
79
  return doc && { path: doc.path, title: doc.title, content: doc.content };
84
80
  }
85
81
  search(query, limit = 5) {
86
- const terms = (0, textSearch_1.tokenize)(query).filter((term) => !STOP_WORDS.has(term));
82
+ const terms = (0, textSearch_1.queryTerms)(query);
87
83
  if (terms.length === 0) {
88
84
  return [];
89
85
  }
@@ -1 +1 @@
1
- {"version":3,"file":"docsRepository.js","sourceRoot":"","sources":["../../../../../libs/adsp-sdk-mcp-server/src/docs/docsRepository.ts"],"names":[],"mappings":";;;AAqFA,4BASC;AA9FD,2BAA+C;AAC/C,+BAA2C;AAC3C,qDAAkF;AAelF;;GAEG;AACH,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAC;IACjC,iCAAiC;IACjC,iCAAiC;IACjC,gCAAgC;IAChC,iCAAiC;CAClC,CAAC,CAAC;AAEH,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC;IACzB,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK;IACzE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI;CAC7E,CAAC,CAAC;AAOH,SAAS,gBAAgB,CAAC,GAAW;IACnC,MAAM,KAAK,GAAG,mCAAmC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC5D,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;IACvB,CAAC;IAED,MAAM,UAAU,GAAG,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACrD,MAAM,KAAK,GAAG,UAAU,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;IAEjE,OAAO,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CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC;aACjC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC;aACf,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,cAAc,CAAC,GAAG,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;IAChE,CAAC;CACF;AAjCD,wCAiCC"}
package/src/metrics.js CHANGED
@@ -4,9 +4,8 @@ exports.getMetrics = getMetrics;
4
4
  exports.installMetrics = installMetrics;
5
5
  exports.startMetricsFromEnv = startMetricsFromEnv;
6
6
  exports.bucketMcpMethod = bucketMcpMethod;
7
- const fs_1 = require("fs");
8
- const path_1 = require("path");
9
7
  const perf_hooks_1 = require("perf_hooks");
8
+ const version_1 = require("./version");
10
9
  const NOOP_METRICS = {
11
10
  addInFlight: () => undefined,
12
11
  recordRejection: () => undefined,
@@ -93,14 +92,6 @@ function installMetrics(meterProvider) {
93
92
  }
94
93
  const DEFAULT_EXPORT_INTERVAL_MS = 60_000;
95
94
  const EXPORT_TIMEOUT_MS = 30_000;
96
- function readPackageVersion() {
97
- try {
98
- return JSON.parse((0, fs_1.readFileSync)((0, path_1.join)(__dirname, '..', 'package.json'), 'utf8')).version ?? 'unknown';
99
- }
100
- catch {
101
- return 'unknown';
102
- }
103
- }
104
95
  function readExportIntervalMs(env) {
105
96
  const interval = parseInt(env['OTEL_METRIC_EXPORT_INTERVAL'] ?? '', 10);
106
97
  return interval > 0 ? interval : DEFAULT_EXPORT_INTERVAL_MS;
@@ -117,7 +108,7 @@ async function startMetricsFromEnv(env = process.env) {
117
108
  const { defaultResource, resourceFromAttributes } = await Promise.resolve().then(() => require('@opentelemetry/resources'));
118
109
  const exportIntervalMillis = readExportIntervalMs(env);
119
110
  const provider = new MeterProvider({
120
- resource: defaultResource().merge(resourceFromAttributes({ 'service.name': 'adsp-sdk-mcp-server', 'service.version': readPackageVersion() })),
111
+ resource: defaultResource().merge(resourceFromAttributes({ 'service.name': 'adsp-sdk-mcp-server', 'service.version': (0, version_1.readPackageVersion)() })),
121
112
  readers: [
122
113
  new PeriodicExportingMetricReader({
123
114
  exporter: new OTLPMetricExporter({ url: `${endpoint}/v1/metrics` }),
@@ -1 +1 @@
1
- {"version":3,"file":"metrics.js","sourceRoot":"","sources":["../../../../libs/adsp-sdk-mcp-server/src/metrics.ts"],"names":[],"mappings":";;AAoCA,gCAEC;AAMD,wCAoFC;AAsBD,kDAuCC;AAsBD,0CASC;AA3ND,2BAAkC;AAClC,+BAA4B;AAC5B,2CAAmD;AAsBnD,MAAM,YAAY,GAAe;IAC/B,WAAW,EAAE,GAAG,EAAE,CAAC,SAAS;IAC5B,eAAe,EAAE,GAAG,EAAE,CAAC,SAAS;IAChC,aAAa,EAAE,GAAG,EAAE,CAAC,SAAS;IAC9B,cAAc,EAAE,GAAG,EAAE,CAAC,SAAS;IAC/B,mBAAmB,EAAE,GAAG,EAAE,CAAC,SAAS;IACpC,oBAAoB,EAAE,GAAG,EAAE,CAAC,SAAS;CACtC,CAAC;AAEF,IAAI,OAAO,GAAe,YAAY,CAAC;AAEvC,SAAgB,UAAU;IACxB,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,MAAM,wBAAwB,GAAG,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;AAC3F,MAAM,sBAAsB,GAAG,GAAG,CAAC;AACnC,MAAM,wBAAwB,GAAG,EAAE,CAAC;AAEpC,SAAgB,cAAc,CAAC,aAA4B;IACzD,MAAM,KAAK,GAAG,aAAa,CAAC,QAAQ,CAAC,qBAAqB,CAAC,CAAC;IAC5D,MAAM,cAAc,GAAG,EAAE,MAAM,EAAE,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,EAAE,CAAC;IAE1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29
  return [];
30
30
  }
31
- const terms = (0, textSearch_1.tokenize)(query);
31
+ const terms = (0, textSearch_1.queryTerms)(query);
32
32
  return reference_1.SDK_REFERENCE.map((symbol) => ({ symbol, score: scoreSymbol(symbol, normalizedQuery, terms) }))
33
33
  .filter(({ score }) => score > 0)
34
34
  .sort((a, b) => b.score - a.score)
@@ -1 +1 @@
1
- {"version":3,"file":"search.js","sourceRoot":"","sources":["../../../../../libs/adsp-sdk-mcp-server/src/sdk-reference/search.ts"],"names":[],"mappings":";;AAyBA,gDAaC;AAtCD,qDAAkF;AAClF,2CAA0D;AAE1D,SAAS,cAAc,CAAC,IAAY,EAAE,eAAuB;IAC3D,IAAI,IAAI,KAAK,eAAe,EAAE,CAAC;QAC7B,OAAO,GAAG,CAAC;IACb,CAAC;IACD,IAAI,IAAI,CAAC,UAAU,CAAC,eAAe,CAAC,EAAE,CAAC;QACrC,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,IAAI,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC;QACnC,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,OAAO,CAAC,CAAC;AACX,CAAC;AAED,SAAS,WAAW,CAAC,MAAoB,EAAE,eAAuB,EAAE,KAAe;IACjF,MAAM,cAAc,GAAG,IAAA,uBAAU,EAAC,IAAA,qBAAQ,EAAC,GAAG,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,OAAO,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC;IAC1G,OAAO,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,eAAe,CAAC,GAAG,IAAA,iCAAoB,EAAC,KAAK,EAAE,cAAc,CAAC,CAAC;AAClH,CAAC;AAED;;;GAGG;AACH,SAAgB,kBAAkB,CAAC,KAAa,EAAE,KAAK,GAAG,CAAC;IACzD,MAAM,eAAe,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;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,EAAC,GAAG,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,OAAO,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC;IAC1G,OAAO,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,eAAe,CAAC,GAAG,IAAA,iCAAoB,EAAC,KAAK,EAAE,cAAc,CAAC,CAAC;AAClH,CAAC;AAED;;;GAGG;AACH,SAAgB,kBAAkB,CAAC,KAAa,EAAE,KAAK,GAAG,CAAC;IACzD,MAAM,eAAe,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IACnD,IAAI,CAAC,eAAe,EAAE,CAAC;QACrB,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,MAAM,KAAK,GAAG,IAAA,uBAAU,EAAC,KAAK,CAAC,CAAC;IAEhC,OAAO,yBAAa,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC;SACnG,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,GAAG,CAAC,CAAC;SAChC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC;SACjC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC;SACf,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC;AACjC,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Query term → extra terms searched along with it, for words people use that the docs don't (or use rarely).
3
+ * Keys and values are single lowercase tokens, as produced by `tokenize`. Expansion is one way: searching a value
4
+ * does not add its key.
5
+ */
6
+ export declare const SEARCH_ALIASES: Readonly<Record<string, readonly string[]>>;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SEARCH_ALIASES = void 0;
4
+ /**
5
+ * Query term → extra terms searched along with it, for words people use that the docs don't (or use rarely).
6
+ * Keys and values are single lowercase tokens, as produced by `tokenize`. Expansion is one way: searching a value
7
+ * does not add its key.
8
+ */
9
+ exports.SEARCH_ALIASES = {
10
+ auth: ['authentication', 'authorization', 'keycloak', 'login', 'access'],
11
+ authentication: ['keycloak', 'login', 'access'],
12
+ sso: ['keycloak', 'login', 'access'],
13
+ websocket: ['socket', 'push', 'stream'],
14
+ websockets: ['websocket', 'socket', 'push', 'stream'],
15
+ realtime: ['push', 'stream', 'socket'],
16
+ upload: ['file'],
17
+ email: ['notification'],
18
+ notify: ['notification'],
19
+ };
20
+ //# sourceMappingURL=aliases.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aliases.js","sourceRoot":"","sources":["../../../../../libs/adsp-sdk-mcp-server/src/search/aliases.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACU,QAAA,cAAc,GAAgD;IACzE,IAAI,EAAE,CAAC,gBAAgB,EAAE,eAAe,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,CAAC;IACxE,cAAc,EAAE,CAAC,UAAU,EAAE,OAAO,EAAE,QAAQ,CAAC;IAC/C,GAAG,EAAE,CAAC,UAAU,EAAE,OAAO,EAAE,QAAQ,CAAC;IACpC,SAAS,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC;IACvC,UAAU,EAAE,CAAC,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC;IACrD,QAAQ,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,QAAQ,CAAC;IACtC,MAAM,EAAE,CAAC,MAAM,CAAC;IAChB,KAAK,EAAE,CAAC,cAAc,CAAC;IACvB,MAAM,EAAE,CAAC,cAAc,CAAC;CACzB,CAAC"}