@owlmeans/client-context 0.1.18-rc.11 → 0.1.18-rc.13

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
@@ -12,7 +12,7 @@ Client-side context factory extending `BasicContext` with API client and service
12
12
  ## Installation
13
13
 
14
14
  ```bash
15
- bun add @owlmeans/client-context
15
+ bun add @owlmeans/client-context@^0.1.18-rc.12
16
16
  ```
17
17
 
18
18
  ## Usage
@@ -57,7 +57,7 @@ This package ships embedded agent skills under `agent-meta/`. After installing y
57
57
  your project's skill store (`.agents/skills/`):
58
58
 
59
59
  ```sh
60
- npx @owlmeans/agent-skills
60
+ npx @owlmeans/agent-skills@^0.1.18-rc.12
61
61
  ```
62
62
 
63
63
  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/client-context",
4
- "version": "0.1.18-rc.11",
5
- "generatedAt": "2026-09-01T16:28:56.995Z",
4
+ "version": "0.1.18-rc.13",
5
+ "generatedAt": "2026-09-04T22:43:25.450Z",
6
6
  "canonicalRepo": "https://github.com/owlmeans/common",
7
7
  "entries": [
8
8
  {
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: client-context
3
- description: How to use @owlmeans/client-context — client-side context factory used as the base for web and native contexts. Auto-invoked when importing client context primitives.
3
+ description: How to use @owlmeans/client-context — makeClientContext(), the ClientConfig shape, config() and serviceRoute(alias, makeDefault?) — the platform-agnostic client context every web and native context is built from. Auto-invoked when building a client context, declaring a client config, or resolving a service route on the client.
4
4
  user-invocable: false
5
5
  ---
6
6
  <!-- AUTO-GENERATED — do not edit. Regenerate via sync-agent-meta. -->
@@ -8,28 +8,60 @@ user-invocable: false
8
8
  # @owlmeans/client-context
9
9
 
10
10
  **Layer:** Client
11
- **Install:** `"@owlmeans/client-context": "^0.1.18-rc.11"` in `dependencies`
11
+ **Install:** `"@owlmeans/client-context": "^0.1.18-rc.13"` in `dependencies`
12
12
 
13
13
  ## Key Exports
14
14
 
15
15
  | Export | Description |
16
16
  |--------|-------------|
17
- | `makeClientContext` | Client-side context factory (cross-platform) |
18
- | `ClientContext<C>` | Client Context interface — adds `serviceRoute(alias)` |
19
- | `ClientConfig`, `config()` | Client config shape and its factory |
20
- | `PLUGINS` | Alias of the plugins config resource |
17
+ | `makeClientContext(cfg)` | The base client context factory a basic context plus `serviceRoute` and a registered API client |
18
+ | `ClientContext<C>` | The context interface — `BasicContext` + `ConfigResourceAppend` + `serviceRoute(alias, makeDefault?)` |
19
+ | `ClientConfig` | `BasicClientConfig` + `services` (the service-route table) + optional `i18n` |
20
+ | `config(service, cfg?)` | Build a `ClientConfig` for `service` with `AppType.Frontend` already set |
21
+ | `PLUGINS` (`plugins`) | Alias of the second config resource, the one plugin records live in |
21
22
 
22
23
  ## Usage
23
24
 
24
- Most apps don't call this directly — `@owlmeans/web-panel` and native equivalents wrap it. A wrapper
25
- calls it once, applies its own idempotent `append*(context)` mixins, and returns that same context:
26
- one context per process, built by one factory.
25
+ Most apps never call this directly — `@owlmeans/client` wraps it (adding state, modal, debug and
26
+ the router accessor), and `@owlmeans/web-client`, `@owlmeans/web-panel` and their native
27
+ counterparts wrap that. A wrapper calls the layer below once, applies its own idempotent
28
+ `append*(context)` mixins, and returns the same context: one context per process, built by one
29
+ factory.
27
30
 
28
31
  ```typescript
29
- import { makeClientContext } from '@owlmeans/client-context'
32
+ import { makeClientContext, config } from '@owlmeans/client-context'
33
+
34
+ const cfg = config<Config>(MY_APP, { services: { ... } })
30
35
  const context = makeClientContext<Config, Context>(cfg)
31
36
  ```
32
37
 
38
+ `makeClientContext` appends the API client (`appendApiClient`) itself, so an entrypoint can make a
39
+ call as soon as the context is configured — nothing else has to register a carrier. Which carrier a
40
+ given call uses is `cfg.webService`, from `@owlmeans/client-config`.
41
+
42
+ ## Service routes
43
+
44
+ ```typescript
45
+ const route = context.serviceRoute(MANAGER, true) // and mark it the default one
46
+ ```
47
+
48
+ `serviceRoute` reads `cfg.services[alias]` and, with a boolean second argument, sets that route's
49
+ `default` flag — which is how an app says "unqualified addresses belong to this service". It
50
+ returns the live route object, so the flag is set on the config the rest of the context reads.
51
+
52
+ An unknown alias throws a `SyntaxError` that **names every registered service**. Expect to see it
53
+ during import, with a blank page and a stack pointing into the framework; the usual cause is a
54
+ route alias passed where a service alias belongs, since both are plain strings and nothing earlier
55
+ objects.
56
+
33
57
  ## Depends On
34
58
 
35
- - `@owlmeans/context`, `@owlmeans/client-config`, `@owlmeans/client-entrypoint`, `@owlmeans/client-route`
59
+ - `@owlmeans/context` — `makeBasicContext`, `AppType`, `makeBasicConfig`
60
+ - `@owlmeans/client-config` — `BasicClientConfig`
61
+ - `@owlmeans/api` — the API client appended into every client context
62
+ - `@owlmeans/route` (`CommonServiceRoute`), `@owlmeans/i18n`, `@owlmeans/config`
63
+
64
+ ## Related
65
+
66
+ - [[client]] — the React layer, whose own `makeClientContext` builds on this one
67
+ - [[client-config]] — `webService` and the rest of the base client config
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAE9C,eAAO,MAAM,MAAM,GAAI,CAAC,SAAS,YAAY,EAAE,SAAS,MAAM,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,KAAG,CAIlF,CAAA"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAE9C,eAAO,MAAM,MAAM,GAAI,CAAC,SAAS,YAAY,WAAW,MAAM,QAAQ,OAAO,CAAC,CAAC,CAAC,KAAG,CAIlF,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAG7D,eAAO,MAAM,iBAAiB,GAAI,CAAC,SAAS,YAAY,EAAE,CAAC,SAAS,aAAa,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,KAAG,CAmC9F,CAAA"}
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAG7D,eAAO,MAAM,iBAAiB,GAAI,CAAC,SAAS,YAAY,EAAE,CAAC,SAAS,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,KAAG,CAmC9F,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@owlmeans/client-context",
3
- "version": "0.1.18-rc.11",
3
+ "version": "0.1.18-rc.13",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -28,12 +28,12 @@
28
28
  }
29
29
  },
30
30
  "dependencies": {
31
- "@owlmeans/api": "^0.1.18-rc.11",
32
- "@owlmeans/client-config": "^0.1.18-rc.10",
33
- "@owlmeans/config": "^0.1.18-rc.10",
34
- "@owlmeans/context": "^0.1.18-rc.7",
35
- "@owlmeans/i18n": "^0.1.18-rc.7",
36
- "@owlmeans/route": "^0.1.18-rc.7"
31
+ "@owlmeans/api": "^0.1.18-rc.13",
32
+ "@owlmeans/client-config": "^0.1.18-rc.12",
33
+ "@owlmeans/config": "^0.1.18-rc.12",
34
+ "@owlmeans/context": "^0.1.18-rc.8",
35
+ "@owlmeans/i18n": "^0.1.18-rc.8",
36
+ "@owlmeans/route": "^0.1.18-rc.9"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@owlmeans/dep-config": "workspace:*",