@karmaniverous/jeeves-server 3.3.1 → 3.4.0
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/.tsbuildinfo +1 -1
- package/CHANGELOG.md +11 -1
- package/dist/src/routes/api/index.js +0 -2
- package/dist/src/routes/{api/status.js → status.js} +4 -4
- package/dist/src/routes/{api/status.test.js → status.test.js} +3 -3
- package/dist/src/server.js +3 -3
- package/package.json +2 -2
- package/src/routes/api/index.ts +0 -3
- package/src/routes/{api/status.test.ts → status.test.ts} +3 -3
- package/src/routes/{api/status.ts → status.ts} +4 -4
- package/src/server.ts +3 -3
- package/dist/src/routes/health.js +0 -10
- package/src/routes/health.ts +0 -13
package/CHANGELOG.md
CHANGED
|
@@ -2,11 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. Dates are displayed in UTC.
|
|
4
4
|
|
|
5
|
-
#### [3.
|
|
5
|
+
#### [3.4.0](https://github.com/karmaniverous/jeeves-server/compare/service/3.3.1...3.4.0)
|
|
6
|
+
|
|
7
|
+
- Bump core to v0.3.0 and consolidate status endpoint [`#119`](https://github.com/karmaniverous/jeeves-server/pull/119)
|
|
8
|
+
- [117] feat: bump core to v0.3.0 and consolidate status endpoint (#117) [`c80be62`](https://github.com/karmaniverous/jeeves-server/commit/c80be62a3f512f7524c917b153ca6ecb053a6ce4)
|
|
9
|
+
- chore: release @karmaniverous/jeeves-server-openclaw v0.4.1 [`01a64b8`](https://github.com/karmaniverous/jeeves-server/commit/01a64b8693ffedb307022ed6d48ebd515aef10ab)
|
|
10
|
+
- [117] refactor(openclaw): use resolveOptionalPluginSetting for getPluginKey (#112) [`6b36937`](https://github.com/karmaniverous/jeeves-server/commit/6b3693725b3e6211fab250cdd935aa9e4a0091cc)
|
|
11
|
+
|
|
12
|
+
#### [service/3.3.1](https://github.com/karmaniverous/jeeves-server/compare/service/3.3.0...service/3.3.1)
|
|
13
|
+
|
|
14
|
+
> 22 March 2026
|
|
6
15
|
|
|
7
16
|
- Add configurable host bind + metaUrl service probe [`#114`](https://github.com/karmaniverous/jeeves-server/pull/114)
|
|
8
17
|
- chore: release @karmaniverous/jeeves-server-openclaw v0.4.0 [`566e438`](https://github.com/karmaniverous/jeeves-server/commit/566e438a5262e5f2e80db4690c9907b6658e5519)
|
|
9
18
|
- [113] feat: add host bind and metaUrl config options [`798d133`](https://github.com/karmaniverous/jeeves-server/commit/798d133825f99f5a5fc19bb0ba9093b757f62f0f)
|
|
19
|
+
- chore: release @karmaniverous/jeeves-server v3.3.1 [`bf01414`](https://github.com/karmaniverous/jeeves-server/commit/bf01414184cc7b1b64a46f955f3bb850ab8d6e92)
|
|
10
20
|
- npm audit fix [`a07adac`](https://github.com/karmaniverous/jeeves-server/commit/a07adac906ca032bedeef25b16b9e0c05231b4b0)
|
|
11
21
|
|
|
12
22
|
#### [service/3.3.0](https://github.com/karmaniverous/jeeves-server/compare/service/3.2.1...service/3.3.0)
|
|
@@ -13,7 +13,6 @@ import { rawRoutes } from './raw.js';
|
|
|
13
13
|
import { runnerRoutes } from './runner.js';
|
|
14
14
|
import { searchRoutes } from './search.js';
|
|
15
15
|
import { sharingRoutes } from './sharing.js';
|
|
16
|
-
import { statusRoutes } from './status.js';
|
|
17
16
|
export const apiRoute = async (fastify) => {
|
|
18
17
|
// Add auth hook directly to this context (not as a child plugin)
|
|
19
18
|
// so it applies to all routes registered below.
|
|
@@ -29,5 +28,4 @@ export const apiRoute = async (fastify) => {
|
|
|
29
28
|
await fastify.register(searchRoutes);
|
|
30
29
|
await fastify.register(sharingRoutes);
|
|
31
30
|
await fastify.register(authStatusRoutes);
|
|
32
|
-
await fastify.register(statusRoutes);
|
|
33
31
|
};
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* Returns version, uptime, port, connected services reachability,
|
|
5
5
|
* event schemas, insider count (no PII), and export capabilities.
|
|
6
6
|
*/
|
|
7
|
-
import { getConfig } from '
|
|
8
|
-
import { getRecentEvents } from '
|
|
9
|
-
import { packageVersion } from '
|
|
7
|
+
import { getConfig } from '../config/index.js';
|
|
8
|
+
import { getRecentEvents } from '../services/eventLog.js';
|
|
9
|
+
import { packageVersion } from '../util/packageVersion.js';
|
|
10
10
|
const startTime = Date.now();
|
|
11
11
|
async function checkService(url) {
|
|
12
12
|
// Try /status first (watcher), then /health (runner)
|
|
@@ -28,7 +28,7 @@ async function checkService(url) {
|
|
|
28
28
|
}
|
|
29
29
|
// eslint-disable-next-line @typescript-eslint/require-await
|
|
30
30
|
export const statusRoutes = async (fastify) => {
|
|
31
|
-
fastify.get('/
|
|
31
|
+
fastify.get('/status', async (request) => {
|
|
32
32
|
const config = getConfig();
|
|
33
33
|
const [watcher, runner, meta] = await Promise.all([
|
|
34
34
|
config.watcherUrl ? checkService(config.watcherUrl) : null,
|
|
@@ -21,12 +21,12 @@ const mockConfig = {
|
|
|
21
21
|
metaUrl: null,
|
|
22
22
|
exportFormats: ['pdf', 'docx', 'zip'],
|
|
23
23
|
};
|
|
24
|
-
vi.mock('
|
|
24
|
+
vi.mock('../config/index.js', () => ({
|
|
25
25
|
getConfig: () => mockConfig,
|
|
26
26
|
}));
|
|
27
27
|
// Must import AFTER mock
|
|
28
28
|
const { statusRoutes } = await import('./status.js');
|
|
29
|
-
describe('GET /
|
|
29
|
+
describe('GET /status', () => {
|
|
30
30
|
it('returns structured status', async () => {
|
|
31
31
|
// Create a minimal Fastify-like test harness
|
|
32
32
|
const routes = {};
|
|
@@ -36,7 +36,7 @@ describe('GET /api/status', () => {
|
|
|
36
36
|
},
|
|
37
37
|
};
|
|
38
38
|
await statusRoutes(fakeFastify, {});
|
|
39
|
-
const handler = routes['/
|
|
39
|
+
const handler = routes['/status'];
|
|
40
40
|
expect(handler).toBeDefined();
|
|
41
41
|
const result = await handler({ accessMode: 'insider', query: {} });
|
|
42
42
|
const status = result;
|
package/dist/src/server.js
CHANGED
|
@@ -13,10 +13,10 @@ import { apiRoute } from './routes/api/index.js';
|
|
|
13
13
|
import { authRoute } from './routes/auth.js';
|
|
14
14
|
import { registerConfigRoute } from './routes/config.js';
|
|
15
15
|
import { eventRoute } from './routes/event.js';
|
|
16
|
-
import { healthRoute } from './routes/health.js';
|
|
17
16
|
import { keysRoute } from './routes/keys.js';
|
|
18
17
|
import { pathRoute } from './routes/path/index.js';
|
|
19
18
|
import { staticRoutes } from './routes/static.js';
|
|
19
|
+
import { statusRoutes } from './routes/status.js';
|
|
20
20
|
import { initDiagramCache } from './services/diagramCache.js';
|
|
21
21
|
import { startQueueProcessor } from './services/eventQueue.js';
|
|
22
22
|
import { initExportCache } from './services/exportCache.js';
|
|
@@ -35,8 +35,8 @@ async function start() {
|
|
|
35
35
|
});
|
|
36
36
|
// Register routes
|
|
37
37
|
await fastify.register(staticRoutes);
|
|
38
|
-
await fastify.register(healthRoute);
|
|
39
38
|
registerConfigRoute(fastify);
|
|
39
|
+
await fastify.register(statusRoutes);
|
|
40
40
|
await fastify.register(authRoute);
|
|
41
41
|
await fastify.register(keysRoute);
|
|
42
42
|
await fastify.register(eventRoute);
|
|
@@ -79,7 +79,7 @@ async function start() {
|
|
|
79
79
|
console.log(` GET /api/export/* - PDF/DOCX/ZIP export`);
|
|
80
80
|
console.log(` POST /event - Event Gateway (key auth)`);
|
|
81
81
|
console.log(` GET /key - Compute path key (X-API-Key auth)`);
|
|
82
|
-
console.log(` GET /
|
|
82
|
+
console.log(` GET /status - Server status (no auth)`);
|
|
83
83
|
}
|
|
84
84
|
catch (err) {
|
|
85
85
|
console.error('Fatal startup error:', err);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@karmaniverous/jeeves-server",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0",
|
|
4
4
|
"description": "Secure file browser, markdown viewer, and webhook gateway with PDF/DOCX export and expiring share links",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fastify",
|
|
@@ -47,9 +47,9 @@
|
|
|
47
47
|
"license": "MIT",
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@commander-js/extra-typings": "^14.0.0",
|
|
50
|
-
"@karmaniverous/jeeves": "^0.2.0",
|
|
51
50
|
"@fastify/cookie": "^11.0.2",
|
|
52
51
|
"@fastify/static": "^8.3.0",
|
|
52
|
+
"@karmaniverous/jeeves": "^0.3.0",
|
|
53
53
|
"@karmaniverous/jsonmap": "^0.3.1",
|
|
54
54
|
"@mermaid-js/mermaid-cli": "^11.12.0",
|
|
55
55
|
"@turbodocx/html-to-docx": "^1.1.0",
|
package/src/routes/api/index.ts
CHANGED
|
@@ -16,8 +16,6 @@ import { rawRoutes } from './raw.js';
|
|
|
16
16
|
import { runnerRoutes } from './runner.js';
|
|
17
17
|
import { searchRoutes } from './search.js';
|
|
18
18
|
import { sharingRoutes } from './sharing.js';
|
|
19
|
-
import { statusRoutes } from './status.js';
|
|
20
|
-
|
|
21
19
|
export const apiRoute: FastifyPluginAsync = async (fastify) => {
|
|
22
20
|
// Add auth hook directly to this context (not as a child plugin)
|
|
23
21
|
// so it applies to all routes registered below.
|
|
@@ -33,5 +31,4 @@ export const apiRoute: FastifyPluginAsync = async (fastify) => {
|
|
|
33
31
|
await fastify.register(searchRoutes);
|
|
34
32
|
await fastify.register(sharingRoutes);
|
|
35
33
|
await fastify.register(authStatusRoutes);
|
|
36
|
-
await fastify.register(statusRoutes);
|
|
37
34
|
};
|
|
@@ -23,14 +23,14 @@ const mockConfig = {
|
|
|
23
23
|
exportFormats: ['pdf', 'docx', 'zip'],
|
|
24
24
|
};
|
|
25
25
|
|
|
26
|
-
vi.mock('
|
|
26
|
+
vi.mock('../config/index.js', () => ({
|
|
27
27
|
getConfig: () => mockConfig,
|
|
28
28
|
}));
|
|
29
29
|
|
|
30
30
|
// Must import AFTER mock
|
|
31
31
|
const { statusRoutes } = await import('./status.js');
|
|
32
32
|
|
|
33
|
-
describe('GET /
|
|
33
|
+
describe('GET /status', () => {
|
|
34
34
|
it('returns structured status', async () => {
|
|
35
35
|
// Create a minimal Fastify-like test harness
|
|
36
36
|
const routes: Record<string, (req: unknown) => Promise<unknown>> = {};
|
|
@@ -42,7 +42,7 @@ describe('GET /api/status', () => {
|
|
|
42
42
|
|
|
43
43
|
await statusRoutes(fakeFastify as never, {});
|
|
44
44
|
|
|
45
|
-
const handler = routes['/
|
|
45
|
+
const handler = routes['/status'];
|
|
46
46
|
expect(handler).toBeDefined();
|
|
47
47
|
|
|
48
48
|
const result = await handler({ accessMode: 'insider', query: {} });
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
|
|
8
8
|
import type { FastifyPluginAsync } from 'fastify';
|
|
9
9
|
|
|
10
|
-
import { getConfig } from '
|
|
11
|
-
import { getRecentEvents } from '
|
|
12
|
-
import { packageVersion } from '
|
|
10
|
+
import { getConfig } from '../config/index.js';
|
|
11
|
+
import { getRecentEvents } from '../services/eventLog.js';
|
|
12
|
+
import { packageVersion } from '../util/packageVersion.js';
|
|
13
13
|
|
|
14
14
|
const startTime = Date.now();
|
|
15
15
|
|
|
@@ -40,7 +40,7 @@ async function checkService(url: string): Promise<ServiceStatus> {
|
|
|
40
40
|
// eslint-disable-next-line @typescript-eslint/require-await
|
|
41
41
|
export const statusRoutes: FastifyPluginAsync = async (fastify) => {
|
|
42
42
|
fastify.get<{ Querystring: { events?: string } }>(
|
|
43
|
-
'/
|
|
43
|
+
'/status',
|
|
44
44
|
async (request) => {
|
|
45
45
|
const config = getConfig();
|
|
46
46
|
|
package/src/server.ts
CHANGED
|
@@ -16,10 +16,10 @@ import { apiRoute } from './routes/api/index.js';
|
|
|
16
16
|
import { authRoute } from './routes/auth.js';
|
|
17
17
|
import { registerConfigRoute } from './routes/config.js';
|
|
18
18
|
import { eventRoute } from './routes/event.js';
|
|
19
|
-
import { healthRoute } from './routes/health.js';
|
|
20
19
|
import { keysRoute } from './routes/keys.js';
|
|
21
20
|
import { pathRoute } from './routes/path/index.js';
|
|
22
21
|
import { staticRoutes } from './routes/static.js';
|
|
22
|
+
import { statusRoutes } from './routes/status.js';
|
|
23
23
|
import { initDiagramCache } from './services/diagramCache.js';
|
|
24
24
|
import { startQueueProcessor } from './services/eventQueue.js';
|
|
25
25
|
import { initExportCache } from './services/exportCache.js';
|
|
@@ -44,8 +44,8 @@ async function start() {
|
|
|
44
44
|
|
|
45
45
|
// Register routes
|
|
46
46
|
await fastify.register(staticRoutes);
|
|
47
|
-
await fastify.register(healthRoute);
|
|
48
47
|
registerConfigRoute(fastify);
|
|
48
|
+
await fastify.register(statusRoutes);
|
|
49
49
|
await fastify.register(authRoute);
|
|
50
50
|
await fastify.register(keysRoute);
|
|
51
51
|
await fastify.register(eventRoute);
|
|
@@ -95,7 +95,7 @@ async function start() {
|
|
|
95
95
|
console.log(` GET /api/export/* - PDF/DOCX/ZIP export`);
|
|
96
96
|
console.log(` POST /event - Event Gateway (key auth)`);
|
|
97
97
|
console.log(` GET /key - Compute path key (X-API-Key auth)`);
|
|
98
|
-
console.log(` GET /
|
|
98
|
+
console.log(` GET /status - Server status (no auth)`);
|
|
99
99
|
} catch (err) {
|
|
100
100
|
console.error('Fatal startup error:', err);
|
|
101
101
|
process.exit(1);
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Health check endpoint
|
|
3
|
-
*/
|
|
4
|
-
// eslint-disable-next-line @typescript-eslint/require-await
|
|
5
|
-
export const healthRoute = async (fastify) => {
|
|
6
|
-
// eslint-disable-next-line @typescript-eslint/require-await
|
|
7
|
-
fastify.get('/health', async () => {
|
|
8
|
-
return { ok: true, uptime: process.uptime() };
|
|
9
|
-
});
|
|
10
|
-
};
|
package/src/routes/health.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Health check endpoint
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import type { FastifyPluginAsync } from 'fastify';
|
|
6
|
-
|
|
7
|
-
// eslint-disable-next-line @typescript-eslint/require-await
|
|
8
|
-
export const healthRoute: FastifyPluginAsync = async (fastify) => {
|
|
9
|
-
// eslint-disable-next-line @typescript-eslint/require-await
|
|
10
|
-
fastify.get('/health', async () => {
|
|
11
|
-
return { ok: true, uptime: process.uptime() };
|
|
12
|
-
});
|
|
13
|
-
};
|