@abgov/adsp-sdk-mcp-server 1.20.0 → 1.20.1

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.
@@ -53,7 +53,7 @@ Login failures are limited to 60 records per tenant per minute (event service `A
53
53
 
54
54
  Successful logins, token issuance, logouts, client updates, realm role mappings, group membership, password resets and federated identity links are not recorded.
55
55
 
56
- Set `AUDIT_ENABLED=false` on event service to turn recording off. Access events are then still consumed and acknowledged, so the queue does not back up, but no audit records are written. See [turn audit recording off](audit-service.md#turn-audit-recording-off).
56
+ Recording is controlled by the event service `ACCESS_AUDIT_ENABLED` environment variable. When it is unset, recording follows `AUDIT_ENABLED` and is on by default. Set `ACCESS_AUDIT_ENABLED=false` (or `0`) to turn recording off, or `true` to force it on even when `AUDIT_ENABLED=false`. When recording is off, access events are still consumed and acknowledged, so the queue does not back up, but no audit records are written. The action catalog is still registered, so turning recording back on needs only a restart. See [turn audit recording off](audit-service.md#turn-audit-recording-off).
57
57
 
58
58
  ## Concepts
59
59
 
@@ -27,6 +27,26 @@ File type represents a category of files with specific access roles. For example
27
27
  ### File
28
28
  A file represents an uploaded file and consists of a minimal metadata record and the actual file that was uploaded. File service provides minimal metadata and does not support extensible metadata; keep additional values in a domain record and reference it using `recordId`.
29
29
 
30
+ ## Audit actions
31
+ File service records audit events in the `file-service` namespace of the [audit service](audit-service.md). Records are written to the tenant of the file, with the file as the resource (`{ type: 'file', id: <file ID>, name: <filename> }`), the `recordId` of the file as the correlation ID, and the `filename`, file `type`, `recordId` and `size` in the metadata. All actions are version 1.
32
+
33
+ | action | category | severity | retention class | recorded when |
34
+ |:-|:-|:-|:-|:-|
35
+ | file.uploaded | data-access | info | compliance | A file is uploaded, even while its virus scan is pending, or a file is copied (with `sourceFileId` in the metadata). |
36
+ | file.downloaded | data-access | info | compliance | A scanned file is downloaded. A partial (range) download includes the `range` in the metadata. |
37
+ | file.unsafe-downloaded | data-access | warning | security | A file is downloaded with `unsafe=true` before its virus scan is completed. |
38
+ | file.deleted | administrative | warning | compliance | A file is deleted through the API, or by the retention job (with `reason: 'retention'` and `retentionDays` in the metadata). |
39
+ | file.scan-completed | runtime | info | standard | The virus scan result of a file is recorded, with `scanResult` of `clean` or `threat`. |
40
+ | file.scan-threat-found | security | critical | security | The virus scan detects a threat. Threat names are included as `threats` when the anti-virus provider reports them. |
41
+
42
+ Downloads of files of an `anonymousRead` type by users who are not signed in are recorded with the actor `{ id: 'anonymous', type: 'user' }`. Scan results and retention deletes are recorded with the system actor `file-service-job`. Scan results are recorded when the asynchronous scan completes, not when the file is uploaded.
43
+
44
+ Changes to file types are not recorded by file service, since file types are managed in the [configuration service](configuration-service.md); audit records of those changes are in the `configuration-service` namespace.
45
+
46
+ Downloads can be high volume, so file service sends audit events in batches of up to 100 events. Audit failures are logged by the SDK and do not fail the file operation. The file service account requires the `audit-writer` role of `urn:ads:platform:audit-service`.
47
+
48
+ Audit recording is on by default. Set the environment variable `FILE_AUDIT_ENABLED=false` on file service to turn it off, or `true` to turn it on regardless of the SDK `AUDIT_ENABLED` variable, which applies when `FILE_AUDIT_ENABLED` is not set. The action catalog is still registered while recording is off, so turning it back on needs only a restart.
49
+
30
50
  ## Code examples
31
51
  ### Configure a file type
32
52
  File types are configured using the [configuration service](configuration-service.md). Note that new configuration may take up to 15 mins to apply.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/adsp-sdk-mcp-server",
3
- "version": "1.20.0",
3
+ "version": "1.20.1",
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",
@@ -12,7 +12,7 @@
12
12
  "@modelcontextprotocol/sdk": "^1.29.0",
13
13
  "express": "^4.21.0",
14
14
  "tslib": "^2.3.0",
15
- "zod": "^3.25.76"
15
+ "zod": "^4.6.7"
16
16
  },
17
17
  "types": "./src/main.d.ts",
18
18
  "main": "./src/main.js",