@owlmeans/api-config-server 0.1.18-rc.15 → 0.1.18-rc.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -11,7 +11,7 @@ Server-side entrypoint that serves safe configuration values at `GET /assets/con
11
11
  ## Installation
12
12
 
13
13
  ```bash
14
- bun add @owlmeans/api-config-server
14
+ bun add @owlmeans/api-config-server@^0.1.18-rc.16
15
15
  ```
16
16
 
17
17
  ## Usage
@@ -42,7 +42,7 @@ This package ships embedded agent skills under `agent-meta/`. After installing y
42
42
  your project's skill store (`.agents/skills/`):
43
43
 
44
44
  ```sh
45
- npx @owlmeans/agent-skills
45
+ npx @owlmeans/agent-skills@^0.1.18-rc.12
46
46
  ```
47
47
 
48
48
  The embedded files are version-matched to this package release. Do not edit them
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
3
  "package": "@owlmeans/api-config-server",
4
- "version": "0.1.18-rc.15",
5
- "generatedAt": "2026-09-01T16:28:56.986Z",
4
+ "version": "0.1.18-rc.17",
5
+ "generatedAt": "2026-09-04T22:43:25.439Z",
6
6
  "canonicalRepo": "https://github.com/owlmeans/common",
7
7
  "entries": [
8
8
  {
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: api-config-server
3
- description: How to use @owlmeans/api-config-server — server-side modules that expose the API config endpoint consumed by api-config-client. Auto-invoked when serving API config from a server app.
3
+ description: How to use @owlmeans/api-config-server — the backend half of the runtime config flow, which answers the api-config endpoint with a redacted copy of the server config. Auto-invoked when serving API config from a server app or deciding what a backend advertises to its clients.
4
4
  user-invocable: false
5
5
  ---
6
6
  <!-- AUTO-GENERATED — do not edit. Regenerate via sync-agent-meta. -->
@@ -8,21 +8,62 @@ user-invocable: false
8
8
  # @owlmeans/api-config-server
9
9
 
10
10
  **Layer:** Server
11
- **Install:** `"@owlmeans/api-config-server": "^0.1.18-rc.15"` in `dependencies`
11
+ **Install:** `"@owlmeans/api-config-server": "^0.1.18-rc.17"` in `dependencies`
12
+
13
+ Answers the declaration shared by `@owlmeans/api-config`; the browser side that consumes it is
14
+ `@owlmeans/api-config-client`.
12
15
 
13
16
  ## Key Exports
14
17
 
15
18
  | Export | Description |
16
19
  |--------|-------------|
17
- | `modules` | Server-side api-config module declarations |
20
+ | `entrypoints` | The `API_CONFIG` declaration elevated with the advertise handler, ready to spread into the app's entrypoint list |
18
21
 
19
22
  ## Usage
20
23
 
21
24
  ```typescript
22
- import { modules as apiConfigServerModules } from '@owlmeans/api-config-server'
23
- export const appModules = [...modules, ...apiConfigServerModules, ...managerModules]
25
+ import { entrypoints as apiConfigEntrypoints } from '@owlmeans/api-config-server'
26
+ export const appEntrypoints = [...apiConfigEntrypoints, ...myEntrypoints]
24
27
  ```
25
28
 
29
+ An app built on `@owlmeans/server-app` already has it: the `entrypoints` that package exports
30
+ include this one, so spreading those is enough and adding this list again is redundant.
31
+
32
+ ## What is advertised
33
+
34
+ The handler answers with the server's own config, minus everything the shared redaction lists name:
35
+
36
+ - `debug` is always present (`{}` when the server sets none).
37
+ - `services` is reduced to `service`, `type`, `host`, `port` and `base` per entry. `internalHost`
38
+ and `internalPort` are dropped as **keys**, which is not the same as keeping the address private:
39
+ `sservice` mirrors them into `host` / `port` whenever those are unset, so a service declared with
40
+ the cluster address only advertises the cluster address under a different name. A peer whose
41
+ address must not be public needs its own public `host` / `port`.
42
+ - `plugins` keeps only the entries whose `type` is `AppType.Frontend`.
43
+ - Config records (`records`) keep only those whose `recordType` is in `allowedConfigRecords`.
44
+ - `oidc`, when configured, is rebuilt rather than copied: `clientCookie` plus the providers with
45
+ `secret` and `apiClientId` stripped, and providers marked `internal` dropped entirely.
46
+ - Every remaining config key is copied verbatim, except `debug`, `services`, `plugins` and the keys
47
+ in `notAdvertizedConfigKeys` (`dbs`, `trusted`, `ready`, `service`, `type`, `records`,
48
+ `webService`, `oidc`, `storageBuckets`, `secrets`). The answer is assembled in three layers — the
49
+ seeded keys above, then that verbatim copy, then the conditional `oidc` rebuild — so the verbatim
50
+ copy overwrites whichever seeded key it also carries. `brand` is on neither exclusion list, so it
51
+ is carried, and the server's own brand settings are what the client receives; the `{}` the handler
52
+ seeds survives only for a server that declares no brand at all.
53
+
54
+ The consequence is the rule to work by: **a backend config key is public unless a list says
55
+ otherwise.** Adding a credential, a connection string or an internal address to the config means
56
+ adding its key to `notAdvertizedConfigKeys` in `@owlmeans/api-config` in the same change; adding a
57
+ config-record type means listing it in `allowedConfigRecords` before a client can see it.
58
+
59
+ The endpoint carries no guard — it is fetched before the client has any credential — so nothing
60
+ that requires authorization to read belongs in the answer.
61
+
26
62
  ## Depends On
27
63
 
28
- - `@owlmeans/api-config`, `@owlmeans/server-entrypoint`, `@owlmeans/server-context`
64
+ Declared: `@owlmeans/api-config`, `@owlmeans/server-api`, `@owlmeans/server-entrypoint`,
65
+ `@owlmeans/server-context`.
66
+
67
+ Imported but **not** declared in this package's manifest: `@owlmeans/config` (`PLUGINS`, the plugin
68
+ config type) and `@owlmeans/context` (`AppType`, the config-record key). A workspace resolves them
69
+ anyway; a standalone install has to name them in its own dependencies.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@owlmeans/api-config-server",
3
- "version": "0.1.18-rc.15",
3
+ "version": "0.1.18-rc.17",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -21,10 +21,10 @@
21
21
  }
22
22
  },
23
23
  "dependencies": {
24
- "@owlmeans/api-config": "^0.1.18-rc.10",
25
- "@owlmeans/server-api": "^0.1.18-rc.15",
26
- "@owlmeans/server-context": "^0.1.18-rc.10",
27
- "@owlmeans/server-entrypoint": "^0.1.18-rc.9"
24
+ "@owlmeans/api-config": "^0.1.18-rc.12",
25
+ "@owlmeans/server-api": "^0.1.18-rc.17",
26
+ "@owlmeans/server-context": "^0.1.18-rc.12",
27
+ "@owlmeans/server-entrypoint": "^0.1.18-rc.11"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@owlmeans/dep-config": "workspace:*",