@owlmeans/server-entrypoint 0.1.18-rc.27 → 0.1.18-rc.29

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
@@ -10,7 +10,7 @@ and a browser app binds the same protocols with `@owlmeans/client-entrypoint` in
10
10
  ## Installation
11
11
 
12
12
  ```bash
13
- bun add @owlmeans/server-entrypoint@^0.1.18-rc.27
13
+ bun add @owlmeans/server-entrypoint@^0.1.18-rc.29
14
14
  ```
15
15
 
16
16
  ## Concepts
@@ -154,7 +154,7 @@ This package ships embedded agent skills under `agent-meta/`. After installing y
154
154
  your project's skill store (`.agents/skills/`):
155
155
 
156
156
  ```sh
157
- npx @owlmeans/agent-skills@^0.1.18-rc.28
157
+ npx @owlmeans/agent-skills@^0.1.18-rc.31
158
158
  ```
159
159
 
160
160
  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/server-entrypoint",
4
- "version": "0.1.18-rc.27",
5
- "generatedAt": "2026-09-17T08:16:11.228Z",
4
+ "version": "0.1.18-rc.29",
5
+ "generatedAt": "2026-09-21T21:54:22.960Z",
6
6
  "canonicalRepo": "https://github.com/owlmeans/common",
7
7
  "entries": [
8
8
  {
@@ -7,7 +7,7 @@ user-invocable: false
7
7
 
8
8
  # @owlmeans/server-entrypoint
9
9
 
10
- **Install:** `bun add @owlmeans/server-entrypoint@^0.1.18-rc.27`
10
+ **Install:** `bun add @owlmeans/server-entrypoint@^0.1.18-rc.29`
11
11
 
12
12
  Bind the imported protocol object to the implementation that serves it:
13
13
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@owlmeans/server-entrypoint",
3
- "version": "0.1.18-rc.27",
3
+ "version": "0.1.18-rc.29",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -21,10 +21,10 @@
21
21
  }
22
22
  },
23
23
  "dependencies": {
24
- "@owlmeans/context": "^0.1.18-rc.25",
25
- "@owlmeans/entrypoint": "^0.1.18-rc.28",
26
- "@owlmeans/route": "^0.1.18-rc.26",
27
- "@owlmeans/server-route": "^0.1.18-rc.25"
24
+ "@owlmeans/context": "^0.1.18-rc.27",
25
+ "@owlmeans/entrypoint": "^0.1.18-rc.30",
26
+ "@owlmeans/route": "^0.1.18-rc.28",
27
+ "@owlmeans/server-route": "^0.1.18-rc.27"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@owlmeans/dep-config": "workspace:*",
@@ -1,6 +0,0 @@
1
- import type { ServerRouteModel } from '@owlmeans/server-route';
2
- import type { ServerEntrypoint, EntrypointOptions, RefedEntrypointHandler } from './types.js';
3
- import type { CommonEntrypoint } from '@owlmeans/entrypoint';
4
- import type { RouteModel } from '@owlmeans/route';
5
- export declare const entrypoint: <R>(arg: CommonEntrypoint | ServerRouteModel<R> | RouteModel, handler?: RefedEntrypointHandler<R>, opts?: EntrypointOptions<R>) => ServerEntrypoint<R>;
6
- //# sourceMappingURL=entrypoint.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"entrypoint.d.ts","sourceRoot":"","sources":["../src/entrypoint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAC9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAiB,sBAAsB,EAAE,MAAM,YAAY,CAAA;AAG5G,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,eAAO,MAAM,UAAU,GAAI,CAAC,OACrB,gBAAgB,GAAG,gBAAgB,CAAC,CAAC,CAAC,GAAG,UAAU,YAAY,sBAAsB,CAAC,CAAC,CAAC,SAAS,iBAAiB,CAAC,CAAC,CAAC,KACzH,gBAAgB,CAAC,CAAC,CAmCpB,CAAA"}
@@ -1,36 +0,0 @@
1
- import { isEntrypoint, makeCommonEntrypoint } from './utils/entrypoint.js';
2
- import { isServerRouteModel, route } from '@owlmeans/server-route';
3
- export const entrypoint = (arg, handler, opts) => {
4
- const entrypointHandle = { ref: undefined };
5
- let _entrypoint;
6
- if (isEntrypoint(arg)) {
7
- // Elevating the same alias again is legal, so an intermediate route stays intermediate unless
8
- // this call says otherwise.
9
- const intermediate = opts?.intermediate
10
- ?? (isServerRouteModel(arg.route) ? arg.route.isIntermediate() : false);
11
- const routeModel = route(arg.route, intermediate, opts?.routeOptions);
12
- _entrypoint = arg;
13
- _entrypoint.route = routeModel;
14
- _entrypoint.filter = opts?.filter ?? arg.filter;
15
- // Elevating adds guards, it never swaps them: what the entrypoint declared still applies.
16
- _entrypoint.guards = [...new Set([...(arg.guards ?? []), ...(opts?.guards ?? [])])];
17
- _entrypoint.gate = opts?.gate ?? arg.gate;
18
- _entrypoint.gateParams = opts?.gateParams ?? arg.gateParams;
19
- }
20
- else if (isServerRouteModel(arg)) {
21
- _entrypoint = makeCommonEntrypoint(arg, { ...opts });
22
- _entrypoint.route = arg;
23
- }
24
- else {
25
- const _route = route(arg, opts?.intermediate ?? false, opts?.routeOptions);
26
- _entrypoint = makeCommonEntrypoint(_route, { ...opts });
27
- _entrypoint.route = _route;
28
- }
29
- _entrypoint.fixer = opts?.fixer ?? _entrypoint.fixer;
30
- if (handler != null) {
31
- _entrypoint.handle = handler(entrypointHandle);
32
- }
33
- entrypointHandle.ref = _entrypoint;
34
- return _entrypoint;
35
- };
36
- //# sourceMappingURL=entrypoint.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"entrypoint.js","sourceRoot":"","sources":["../src/entrypoint.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAA;AAC1E,OAAO,EAAE,kBAAkB,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAIlE,MAAM,CAAC,MAAM,UAA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AC;SAAM,CAAC;QACN,MAAM,MAAM,GAAG,KAAK,CAAC,GAAG,EAAE,IAAI,EAAE,YAAY,IAAI,KAAK,EAAE,IAAI,EAAE,YAAY,CAAC,CAAA;QAC1E,WAAW,GAAG,oBAAoB,CAAC,MAAM,EAAE,EAAE,GAAG,IAAI,EAAE,CAAwB,CAAA;QAC9E,WAAW,CAAC,KAAK,GAAG,MAAM,CAAA;IAC5B,CAAC;IAED,WAAW,CAAC,KAAK,GAAG,IAAI,EAAE,KAAK,IAAI,WAAW,CAAC,KAAK,CAAA;IACpD,IAAI,OAAO,IAAI,IAAI,EAAE,CAAC;QACpB,WAAW,CAAC,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAA;IAChD,CAAC;IAED,gBAAgB,CAAC,GAAG,GAAG,WAAW,CAAA;IAElC,OAAO,WAAW,CAAA;AACpB,CAAC,CAAA"}
package/build/helper.d.ts DELETED
@@ -1,13 +0,0 @@
1
- import type { BoundEntrypointHandler, ServerEntrypoint, EntrypointOptions, RefedEntrypointHandler, ServerProtocolEntrypoint } from './types.js';
2
- import type { CommonEntrypoint, EntrypointProtocolDeclaration } from '@owlmeans/entrypoint';
3
- /**
4
- * Replace the entrypoint declared under `alias` with its elevated counterpart. Elevating is
5
- * idempotent — calling it again simply replaces the element once more, and the guards it brings
6
- * are added to the ones already declared.
7
- *
8
- * @throws {SyntaxError} when no entrypoint carries the alias
9
- */
10
- export declare function elevate(declarations: EntrypointProtocolDeclaration[], implementations: readonly BoundEntrypointHandler<EntrypointProtocolDeclaration>[]): ServerProtocolEntrypoint<EntrypointProtocolDeclaration>[];
11
- export declare function elevate<R>(entrypoints: (CommonEntrypoint | ServerEntrypoint<R>)[], alias: string, handler?: RefedEntrypointHandler<R> | boolean | EntrypointOptions<R>, opts?: boolean | EntrypointOptions<R>): ServerEntrypoint<R>[];
12
- export declare const guard: <R>(guard: string, opts?: EntrypointOptions<R>) => EntrypointOptions<R>;
13
- //# sourceMappingURL=helper.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"helper.d.ts","sourceRoot":"","sources":["../src/helper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,sBAAsB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,sBAAsB,EACnF,wBAAwB,EACzB,MAAM,YAAY,CAAA;AAKnB,OAAO,KAAK,EAAE,gBAAgB,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAA;AAE3F;;;;;;GAMG;AACH,wBAAgB,OAAO,CACrB,YAAY,EAAE,6BAA6B,EAAE,EAC7C,eAAe,EAAE,SAAS,sBAAsB,CAAC,6BAA6B,CAAC,EAAE,GAChF,wBAAwB,CAAC,6BAA6B,CAAC,EAAE,CAAA;AAC5D,wBAAgB,OAAO,CAAC,CAAC,EACvB,WAAW,EAAE,CAAC,gBAAgB,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAC,EAAE,EACvD,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,sBAAsB,CAAC,CAAC,CAAC,GAAG,OAAO,GAAG,iBAAiB,CAAC,CAAC,CAAC,EACpE,IAAI,CAAC,EAAE,OAAO,GAAG,iBAAiB,CAAC,CAAC,CAAC,GACpC,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAA;AA4CxB,eAAO,MAAM,KAAK,GAAI,CAAC,SAAS,MAAM,SAAS,iBAAiB,CAAC,CAAC,CAAC,KAAG,iBAAiB,CAAC,CAAC,CACjD,CAAA"}
package/build/helper.js DELETED
@@ -1,35 +0,0 @@
1
- import { entrypoint } from './entrypoint.js';
2
- import { bind } from './protocol.js';
3
- import { createBasicGuard } from './utils/helper.js';
4
- import { isEntrypointProtocol } from '@owlmeans/entrypoint';
5
- export function elevate(entrypoints, target, handler, opts) {
6
- if (typeof target !== 'string') {
7
- return entrypoints.map((declaration) => {
8
- if (!isEntrypointProtocol(declaration)) {
9
- throw new SyntaxError('Protocol elevation accepts protocol declarations only');
10
- }
11
- const implementation = target.find(bound => bound.protocol === declaration);
12
- return bind(declaration, implementation);
13
- });
14
- }
15
- const idx = entrypoints.findIndex((candidate) => !isEntrypointProtocol(candidate) && candidate.route.route.alias === target);
16
- if (idx === -1) {
17
- throw new SyntaxError(`Entrypoint with alias ${target} not present`);
18
- }
19
- if (typeof handler === 'boolean') {
20
- opts = handler;
21
- handler = undefined;
22
- }
23
- if (typeof handler === 'object' && typeof handler !== 'function') {
24
- opts = handler;
25
- handler = undefined;
26
- }
27
- const declaration = entrypoints[idx];
28
- if (isEntrypointProtocol(declaration)) {
29
- throw new SyntaxError('String elevation accepts materialized entrypoints only');
30
- }
31
- entrypoints[idx] = entrypoint(declaration, handler, typeof opts === 'boolean' ? { intermediate: opts } : opts);
32
- return entrypoints;
33
- }
34
- export const guard = (guard, opts) => ({ ...createBasicGuard(guard, opts) });
35
- //# sourceMappingURL=helper.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"helper.js","sourceRoot":"","sources":["../src/helper.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAoB3D,MAAM,UAAU,OAAO,CACrB,WAAiE,EACjE,MAAiF,EACjF,OAAsE,EACtE,IAA0C;IAE1C,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;QAC/B,OAAO,WAAW,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE;YACrC,IAAI,CAAC,oBAAoB,CAAC,WAAW,CAAC,EAAE,CAAC;gBACvC,MAAM,IAAI,WAAW,CAAC,uDAAuD,CAAC,CAAA;YAChF,CAAC;YAED,MAAM,cAAc,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,KAAK,WAAW,CA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@
1
- export { entrypoint as makeCommonEntrypoint } from '@owlmeans/entrypoint';
2
- export { isEntrypoint } from '@owlmeans/entrypoint/utils';
3
- //# sourceMappingURL=entrypoint.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"entrypoint.d.ts","sourceRoot":"","sources":["../../src/utils/entrypoint.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,IAAI,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA"}
@@ -1,3 +0,0 @@
1
- export { entrypoint as makeCommonEntrypoint } from '@owlmeans/entrypoint';
2
- export { isEntrypoint } from '@owlmeans/entrypoint/utils';
3
- //# sourceMappingURL=entrypoint.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"entrypoint.js","sourceRoot":"","sources":["../../src/utils/entrypoint.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,IAAI,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA"}
@@ -1,2 +0,0 @@
1
- export { guard as createBasicGuard } from '@owlmeans/entrypoint';
2
- //# sourceMappingURL=helper.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"helper.d.ts","sourceRoot":"","sources":["../../src/utils/helper.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,IAAI,gBAAgB,EAAE,MAAM,sBAAsB,CAAA"}
@@ -1,2 +0,0 @@
1
- export { guard as createBasicGuard } from '@owlmeans/entrypoint';
2
- //# sourceMappingURL=helper.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"helper.js","sourceRoot":"","sources":["../../src/utils/helper.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,IAAI,gBAAgB,EAAE,MAAM,sBAAsB,CAAA"}