@owlmeans/server-context 0.1.18-rc.40 → 0.1.18-rc.42
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 +2 -2
- package/agent-meta/manifest.json +2 -2
- package/agent-meta/skills/server-context/SKILL.md +1 -1
- package/build/context.d.ts.map +1 -1
- package/build/context.js +3 -0
- package/build/context.js.map +1 -1
- package/build/utils/context.d.ts +1 -1
- package/build/utils/context.d.ts.map +1 -1
- package/build/utils/context.js.map +1 -1
- package/build/utils/types.local.d.ts +5 -0
- package/build/utils/types.local.d.ts.map +1 -0
- package/build/utils/types.local.js +2 -0
- package/build/utils/types.local.js.map +1 -0
- package/package.json +8 -7
- package/src/context.ts +3 -0
- package/src/utils/context.ts +2 -5
- package/src/utils/types.local.ts +5 -0
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ Server-side context factory with file-based config, trusted keys, and Ed25519 gu
|
|
|
12
12
|
## Installation
|
|
13
13
|
|
|
14
14
|
```bash
|
|
15
|
-
bun add @owlmeans/server-context@^0.1.18-rc.
|
|
15
|
+
bun add @owlmeans/server-context@^0.1.18-rc.42
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
## Usage
|
|
@@ -70,7 +70,7 @@ This package ships embedded agent skills under `agent-meta/`. After installing y
|
|
|
70
70
|
your project's skill store (`.agents/skills/`):
|
|
71
71
|
|
|
72
72
|
```sh
|
|
73
|
-
npx @owlmeans/agent-skills@^0.1.18-rc.
|
|
73
|
+
npx @owlmeans/agent-skills@^0.1.18-rc.48
|
|
74
74
|
```
|
|
75
75
|
|
|
76
76
|
The embedded files are version-matched to this package release. Do not edit them
|
package/agent-meta/manifest.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"package": "@owlmeans/server-context",
|
|
4
|
-
"version": "0.1.18-rc.
|
|
5
|
-
"generatedAt": "2026-10-
|
|
4
|
+
"version": "0.1.18-rc.42",
|
|
5
|
+
"generatedAt": "2026-10-05T08:32:19.110Z",
|
|
6
6
|
"canonicalRepo": "https://github.com/owlmeans/common",
|
|
7
7
|
"entries": [
|
|
8
8
|
{
|
package/build/context.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAOxD,eAAO,MAAM,iBAAiB,GAAI,CAAC,SAAS,YAAY,EAAE,CAAC,SAAS,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,KAAG,CAc9F,CAAA"}
|
package/build/context.js
CHANGED
|
@@ -3,9 +3,12 @@ import { fileConfigReader } from './utils/context.js';
|
|
|
3
3
|
import { makeBasicContext } from '@owlmeans/context';
|
|
4
4
|
import { PLUGINS, TRUSTED } from '@owlmeans/config';
|
|
5
5
|
import { authMiddleware, makeBasicEd25519Guard } from '@owlmeans/auth-common';
|
|
6
|
+
import { appendLog } from '@owlmeans/log';
|
|
6
7
|
export const makeServerContext = (cfg) => {
|
|
7
8
|
const context = makeBasicContext(cfg);
|
|
8
9
|
context.registerMiddleware(fileConfigReader);
|
|
10
|
+
// After the file reader, so a level given as `/etc/app-config/log-level` is applied resolved.
|
|
11
|
+
appendLog(context);
|
|
9
12
|
appendConfigResource(context);
|
|
10
13
|
appendConfigResource(context, TRUSTED, TRUSTED);
|
|
11
14
|
appendConfigResource(context, PLUGINS, PLUGIN_RECORD);
|
package/build/context.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAA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;AAChB,CAAC,CAAA"}
|
package/build/utils/context.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/utils/context.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/utils/context.ts"],"names":[],"mappings":"AACA,OAAO,EAAmC,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAIpF,eAAO,MAAM,gBAAgB,EAAE,UAO9B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/utils/context.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/utils/context.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,cAAc,EAAmB,MAAM,mBAAmB,CAAA;AACpF,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAGzD,MAAM,CAAC,MAAM,gBAAgB,GAAe;IAC1C,IAAI,EAAE,cAAc,CAAC,MAAM;IAC3B,KAAK,EAAE,eAAe,CAAC,aAAa;IACpC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;QACvB,MAAM,IAAI,GAAS,OAAO,CAAC,GAAsB,CAAA;QACjD,gBAAgB,CAAC,IAAI,CAAC,CAAA;IACxB,CAAC;CACF,CAAA;AAED,8BAA8B;AAC9B,MAAM,gBAAgB,GAAG,CAAC,IAAU,EAAE,EAAE,CACtC,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;IAC3D,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,MAAM,UAAU,GAAG,MAAM,CAAC,wBAAwB,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;QAC7D,IAAI,UAAU,EAAE,QAAQ,EAAE,CAAC;YACzB,IAAI,CAAC,GAAG,CAAC,GAAG,eAAe,CAAC,KAAK,CAAC,CAAA;QACpC,CAAC;IACH,CAAC;SAAM,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QAChC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,GAAG,gBAAgB,CAAC,IAAY,CAAC,CAAA,CAAC,CAAC,CAAC,CAAA;IAC3D,CAAC;SAAM,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QACrC,gBAAgB,CAAC,KAAa,CAAC,CAAA;IACjC,CAAC;AACH,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.local.d.ts","sourceRoot":"","sources":["../../src/utils/types.local.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAA;AAE9C,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,MAAM,CAAA;AAEzD,MAAM,WAAW,IAAK,SAAQ,MAAM,CAAC,OAAO,EAAE,SAAS,GAAG,IAAI,CAAC;CAAI"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.local.js","sourceRoot":"","sources":["../../src/utils/types.local.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@owlmeans/server-context",
|
|
3
|
-
"version": "0.1.18-rc.
|
|
3
|
+
"version": "0.1.18-rc.42",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -28,15 +28,16 @@
|
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@owlmeans/client-config": "^0.1.18-rc.
|
|
32
|
-
"@owlmeans/config": "^0.1.18-rc.
|
|
33
|
-
"@owlmeans/context": "^0.1.18-rc.
|
|
34
|
-
"@owlmeans/
|
|
35
|
-
"@owlmeans/
|
|
31
|
+
"@owlmeans/client-config": "^0.1.18-rc.43",
|
|
32
|
+
"@owlmeans/config": "^0.1.18-rc.43",
|
|
33
|
+
"@owlmeans/context": "^0.1.18-rc.33",
|
|
34
|
+
"@owlmeans/log": "^0.1.18-rc.1",
|
|
35
|
+
"@owlmeans/route": "^0.1.18-rc.34",
|
|
36
|
+
"@owlmeans/server-config": "^0.1.18-rc.42"
|
|
36
37
|
},
|
|
37
38
|
"devDependencies": {
|
|
38
39
|
"@owlmeans/dep-config": "workspace:*",
|
|
39
|
-
"@types/node": "^26.
|
|
40
|
+
"@types/node": "^26.6.4",
|
|
40
41
|
"nodemon": "^3.1.14",
|
|
41
42
|
"typescript": "^7.0.2"
|
|
42
43
|
},
|
package/src/context.ts
CHANGED
|
@@ -4,11 +4,14 @@ import { fileConfigReader } from './utils/context.js'
|
|
|
4
4
|
import { makeBasicContext } from '@owlmeans/context'
|
|
5
5
|
import { PLUGINS, TRUSTED } from '@owlmeans/config'
|
|
6
6
|
import { authMiddleware, makeBasicEd25519Guard } from '@owlmeans/auth-common'
|
|
7
|
+
import { appendLog } from '@owlmeans/log'
|
|
7
8
|
|
|
8
9
|
export const makeServerContext = <C extends ServerConfig, T extends ServerContext<C>>(cfg: C): T => {
|
|
9
10
|
const context = makeBasicContext(cfg) as T
|
|
10
11
|
|
|
11
12
|
context.registerMiddleware(fileConfigReader)
|
|
13
|
+
// After the file reader, so a level given as `/etc/app-config/log-level` is applied resolved.
|
|
14
|
+
appendLog(context)
|
|
12
15
|
|
|
13
16
|
appendConfigResource<C, T>(context)
|
|
14
17
|
appendConfigResource<C, T>(context, TRUSTED, TRUSTED)
|
package/src/utils/context.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
|
-
import { MiddlewareStage, MiddlewareType } from '@owlmeans/context'
|
|
3
|
-
import type { Middleware } from '@owlmeans/context'
|
|
2
|
+
import { MiddlewareStage, MiddlewareType, type Middleware } from '@owlmeans/context'
|
|
4
3
|
import { readConfigValue } from '@owlmeans/server-config'
|
|
4
|
+
import type { Tree } from './types.local.js'
|
|
5
5
|
|
|
6
6
|
export const fileConfigReader: Middleware = {
|
|
7
7
|
type: MiddlewareType.Config,
|
|
@@ -27,6 +27,3 @@ const visitConfigLeafs = (tree: Tree) =>
|
|
|
27
27
|
}
|
|
28
28
|
}) : tree
|
|
29
29
|
|
|
30
|
-
type TreeKey = string | number | symbol
|
|
31
|
-
type TreeValue = unknown | Array<unknown> | string
|
|
32
|
-
interface Tree extends Record<TreeKey, TreeValue | Tree> { }
|