@owlmeans/server-app 0.1.18-rc.33 → 0.1.18-rc.35
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-app/SKILL.md +1 -1
- package/package.json +16 -16
- package/build/boot-state.d.ts +0 -55
- package/build/boot-state.d.ts.map +0 -1
- package/build/boot-state.js +0 -46
- package/build/boot-state.js.map +0 -1
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ target. Do not use it in a shared `common` package that only declares protocols
|
|
|
13
13
|
## Installation
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
bun add @owlmeans/server-app@^0.1.18-rc.
|
|
16
|
+
bun add @owlmeans/server-app@^0.1.18-rc.35
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
## Concepts
|
|
@@ -310,7 +310,7 @@ This package ships embedded agent skills under `agent-meta/`. After installing y
|
|
|
310
310
|
your project's skill store (`.agents/skills/`):
|
|
311
311
|
|
|
312
312
|
```sh
|
|
313
|
-
npx @owlmeans/agent-skills@^0.1.18-rc.
|
|
313
|
+
npx @owlmeans/agent-skills@^0.1.18-rc.31
|
|
314
314
|
```
|
|
315
315
|
|
|
316
316
|
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-app",
|
|
4
|
-
"version": "0.1.18-rc.
|
|
5
|
-
"generatedAt": "2026-09-
|
|
4
|
+
"version": "0.1.18-rc.35",
|
|
5
|
+
"generatedAt": "2026-09-21T21:54:22.961Z",
|
|
6
6
|
"canonicalRepo": "https://github.com/owlmeans/common",
|
|
7
7
|
"entries": [
|
|
8
8
|
{
|
|
@@ -6,7 +6,7 @@ description: Build OwlMeans server applications from immutable entrypoint protoc
|
|
|
6
6
|
|
|
7
7
|
# Server application entrypoints
|
|
8
8
|
|
|
9
|
-
**Install:** `bun add @owlmeans/server-app@^0.1.18-rc.
|
|
9
|
+
**Install:** `bun add @owlmeans/server-app@^0.1.18-rc.35`
|
|
10
10
|
|
|
11
11
|
Declare routes and request/response contracts in a shared package with `protocol()` or
|
|
12
12
|
`openProtocol()`. A server package supplies local implementations with `bind()` and `handlers()`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@owlmeans/server-app",
|
|
3
|
-
"version": "0.1.18-rc.
|
|
3
|
+
"version": "0.1.18-rc.35",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -21,21 +21,21 @@
|
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@owlmeans/api": "^0.1.18-rc.
|
|
25
|
-
"@owlmeans/client-config": "^0.1.18-rc.
|
|
26
|
-
"@owlmeans/client-entrypoint": "^0.1.18-rc.
|
|
27
|
-
"@owlmeans/config": "^0.1.18-rc.
|
|
28
|
-
"@owlmeans/context": "^0.1.18-rc.
|
|
29
|
-
"@owlmeans/kluster": "^0.1.18-rc.
|
|
30
|
-
"@owlmeans/entrypoint": "^0.1.18-rc.
|
|
31
|
-
"@owlmeans/route": "^0.1.18-rc.
|
|
32
|
-
"@owlmeans/server-api": "^0.1.18-rc.
|
|
33
|
-
"@owlmeans/server-auth": "^0.1.18-rc.
|
|
34
|
-
"@owlmeans/server-context": "^0.1.18-rc.
|
|
35
|
-
"@owlmeans/server-entrypoint": "^0.1.18-rc.
|
|
36
|
-
"@owlmeans/server-route": "^0.1.18-rc.
|
|
37
|
-
"@owlmeans/server-socket": "^0.1.18-rc.
|
|
38
|
-
"@owlmeans/static-resource": "^0.1.18-rc.
|
|
24
|
+
"@owlmeans/api": "^0.1.18-rc.31",
|
|
25
|
+
"@owlmeans/client-config": "^0.1.18-rc.31",
|
|
26
|
+
"@owlmeans/client-entrypoint": "^0.1.18-rc.31",
|
|
27
|
+
"@owlmeans/config": "^0.1.18-rc.31",
|
|
28
|
+
"@owlmeans/context": "^0.1.18-rc.27",
|
|
29
|
+
"@owlmeans/kluster": "^0.1.18-rc.30",
|
|
30
|
+
"@owlmeans/entrypoint": "^0.1.18-rc.30",
|
|
31
|
+
"@owlmeans/route": "^0.1.18-rc.28",
|
|
32
|
+
"@owlmeans/server-api": "^0.1.18-rc.35",
|
|
33
|
+
"@owlmeans/server-auth": "^0.1.18-rc.37",
|
|
34
|
+
"@owlmeans/server-context": "^0.1.18-rc.30",
|
|
35
|
+
"@owlmeans/server-entrypoint": "^0.1.18-rc.29",
|
|
36
|
+
"@owlmeans/server-route": "^0.1.18-rc.27",
|
|
37
|
+
"@owlmeans/server-socket": "^0.1.18-rc.37",
|
|
38
|
+
"@owlmeans/static-resource": "^0.1.18-rc.27"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@owlmeans/dep-config": "workspace:*",
|
package/build/boot-state.d.ts
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import type { ApiPortHoldOptions } from '@owlmeans/server-api';
|
|
2
|
-
/**
|
|
3
|
-
* Boot phase of the process.
|
|
4
|
-
*
|
|
5
|
-
* An app binds its port before it initializes, so that a failure has somewhere to be reported
|
|
6
|
-
* from. Without a listener the only thing anyone sees is a connection refused at the edge — an
|
|
7
|
-
* opaque 503 that names neither the app nor the cause. This phase is what the health path answers
|
|
8
|
-
* with, and what the platform reads to tell "still starting" from "gave up, and here is why".
|
|
9
|
-
*/
|
|
10
|
-
export type BootPhase = 'initializing' | 'ready' | 'failed';
|
|
11
|
-
export interface BootHealth extends Record<string, unknown> {
|
|
12
|
-
status: 'OK' | 'FAILED';
|
|
13
|
-
phase: BootPhase;
|
|
14
|
-
ok: boolean;
|
|
15
|
-
/** Whatever `setBootPhase` was given — the failure message, or the step being waited on. */
|
|
16
|
-
reason?: string;
|
|
17
|
-
/**
|
|
18
|
-
* Identity, not health: a supervisor passes the id to the child it spawns and compares it
|
|
19
|
-
* here, so an answer carrying another id means the port is held by a leftover process and the
|
|
20
|
-
* health it reports describes code nobody asked for. Empty when nothing supplied one.
|
|
21
|
-
*/
|
|
22
|
-
bootId: string;
|
|
23
|
-
pid: number;
|
|
24
|
-
}
|
|
25
|
-
/** Env var a supervisor stamps the spawned process with; surfaced as `bootId`. */
|
|
26
|
-
export declare const BOOT_ID_ENV = "OWLMEANS_BOOT_ID";
|
|
27
|
-
export declare const getBootPhase: () => BootPhase;
|
|
28
|
-
export declare const getBootDetail: () => string | undefined;
|
|
29
|
-
/**
|
|
30
|
-
* `detail` is free text, and is kept for every phase — a boot that is merely slow is as worth
|
|
31
|
-
* explaining as one that failed.
|
|
32
|
-
*/
|
|
33
|
-
export declare const setBootPhase: (phase: BootPhase, detail?: string) => void;
|
|
34
|
-
/**
|
|
35
|
-
* The body the health path answers with, from either server.
|
|
36
|
-
*
|
|
37
|
-
* The port hold and the app's own handler both build it here, so a consumer polling through the
|
|
38
|
-
* handover never sees the shape change under it — which is why the keys are unconditional and
|
|
39
|
-
* only `reason` comes and goes with the state it describes.
|
|
40
|
-
*/
|
|
41
|
-
export declare const bootHealthPayload: () => BootHealth;
|
|
42
|
-
/**
|
|
43
|
-
* Hold options wired to this module — the bind-first boot in one line:
|
|
44
|
-
*
|
|
45
|
-
* const hold = await holdApiPort(ctx.cfg, bootHold(HEALTH_PATH))
|
|
46
|
-
* try { await init() } catch (e) { setBootPhase('failed', message); return }
|
|
47
|
-
* await hold.release()
|
|
48
|
-
* setBootPhase('ready')
|
|
49
|
-
* await ctx.getApiServer().listen()
|
|
50
|
-
*
|
|
51
|
-
* The hold evaluates `payload` per request, so the phase set after a failure is reported live by
|
|
52
|
-
* the listener that is already bound rather than needing a server that will never start.
|
|
53
|
-
*/
|
|
54
|
-
export declare const bootHold: (okPath?: string) => ApiPortHoldOptions;
|
|
55
|
-
//# sourceMappingURL=boot-state.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"boot-state.d.ts","sourceRoot":"","sources":["../src/boot-state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAE9D;;;;;;;GAOG;AACH,MAAM,MAAM,SAAS,GAAG,cAAc,GAAG,OAAO,GAAG,QAAQ,CAAA;AAE3D,MAAM,WAAW,UAAW,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACzD,MAAM,EAAE,IAAI,GAAG,QAAQ,CAAA;IACvB,KAAK,EAAE,SAAS,CAAA;IAChB,EAAE,EAAE,OAAO,CAAA;IACX,4FAA4F;IAC5F,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAA;IACd,GAAG,EAAE,MAAM,CAAA;CACZ;AAED,kFAAkF;AAClF,eAAO,MAAM,WAAW,qBAAqB,CAAA;AAK7C,eAAO,MAAM,YAAY,QAAO,SAAmB,CAAA;AAEnD,eAAO,MAAM,aAAa,QAAO,MAAM,GAAG,SAAoB,CAAA;AAE9D;;;GAGG;AACH,eAAO,MAAM,YAAY,UAAW,SAAS,WAAW,MAAM,KAAG,IAGhE,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,QAAO,UAOnC,CAAA;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,QAAQ,YAAa,MAAM,KAAG,kBAGzC,CAAA"}
|
package/build/boot-state.js
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/** Env var a supervisor stamps the spawned process with; surfaced as `bootId`. */
|
|
2
|
-
export const BOOT_ID_ENV = 'OWLMEANS_BOOT_ID';
|
|
3
|
-
let _phase = 'initializing';
|
|
4
|
-
let _detail;
|
|
5
|
-
export const getBootPhase = () => _phase;
|
|
6
|
-
export const getBootDetail = () => _detail;
|
|
7
|
-
/**
|
|
8
|
-
* `detail` is free text, and is kept for every phase — a boot that is merely slow is as worth
|
|
9
|
-
* explaining as one that failed.
|
|
10
|
-
*/
|
|
11
|
-
export const setBootPhase = (phase, detail) => {
|
|
12
|
-
_phase = phase;
|
|
13
|
-
_detail = detail;
|
|
14
|
-
};
|
|
15
|
-
/**
|
|
16
|
-
* The body the health path answers with, from either server.
|
|
17
|
-
*
|
|
18
|
-
* The port hold and the app's own handler both build it here, so a consumer polling through the
|
|
19
|
-
* handover never sees the shape change under it — which is why the keys are unconditional and
|
|
20
|
-
* only `reason` comes and goes with the state it describes.
|
|
21
|
-
*/
|
|
22
|
-
export const bootHealthPayload = () => ({
|
|
23
|
-
status: _phase === 'failed' ? 'FAILED' : 'OK',
|
|
24
|
-
phase: _phase,
|
|
25
|
-
ok: _phase === 'ready',
|
|
26
|
-
...(_detail != null ? { reason: _detail } : {}),
|
|
27
|
-
bootId: process.env[BOOT_ID_ENV] ?? '',
|
|
28
|
-
pid: process.pid
|
|
29
|
-
});
|
|
30
|
-
/**
|
|
31
|
-
* Hold options wired to this module — the bind-first boot in one line:
|
|
32
|
-
*
|
|
33
|
-
* const hold = await holdApiPort(ctx.cfg, bootHold(HEALTH_PATH))
|
|
34
|
-
* try { await init() } catch (e) { setBootPhase('failed', message); return }
|
|
35
|
-
* await hold.release()
|
|
36
|
-
* setBootPhase('ready')
|
|
37
|
-
* await ctx.getApiServer().listen()
|
|
38
|
-
*
|
|
39
|
-
* The hold evaluates `payload` per request, so the phase set after a failure is reported live by
|
|
40
|
-
* the listener that is already bound rather than needing a server that will never start.
|
|
41
|
-
*/
|
|
42
|
-
export const bootHold = (okPath) => ({
|
|
43
|
-
...(okPath != null ? { okPath } : {}),
|
|
44
|
-
payload: bootHealthPayload
|
|
45
|
-
});
|
|
46
|
-
//# sourceMappingURL=boot-state.js.map
|
package/build/boot-state.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"boot-state.js","sourceRoot":"","sources":["../src/boot-state.ts"],"names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