@emseepea/create-resources-and-prompts-server 0.0.19 → 0.0.22

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
@@ -66,6 +66,22 @@ npm start
66
66
  The server listens on `http://127.0.0.1:3000/mcp` by default. Set `PORT` to
67
67
  choose another port.
68
68
 
69
+ ## Build a production container
70
+
71
+ Run `npm install` first so the project has a lockfile. Then run:
72
+
73
+ ```sh
74
+ npm run container:build
75
+ ```
76
+
77
+ The image is for a production deployment behind a trusted proxy. It starts with
78
+ the fail-closed production profile and needs a runtime-mounted deployment
79
+ configuration file. Keep secrets in your platform's runtime secret store, not in
80
+ the Dockerfile, build arguments, or deployment configuration file.
81
+
82
+ For the production proxy, runtime configuration, and hardening requirements, see
83
+ the [container guide](https://emseepea.github.io/emseepea/examples/#build-a-production-container).
84
+
69
85
  ## Add Feedback
70
86
 
71
87
  Install `@emseepea/feedback` when this server needs a detailed one-way
@@ -0,0 +1,17 @@
1
+ .env
2
+ .env.*
3
+ .git
4
+ .github
5
+ .npmrc
6
+ artifacts
7
+ coverage
8
+ dist
9
+ docs
10
+ eval
11
+ initializer-dist
12
+ node_modules
13
+ release-artifacts
14
+ test
15
+ test-support
16
+ *.log
17
+ *.tsbuildinfo
@@ -0,0 +1,19 @@
1
+ FROM docker.io/library/node:24.21.0-trixie-slim@sha256:db3ae80f5d8df06e04dabdf7b44cbf008d32de168205fa0294444aabbc08c590 AS build
2
+ WORKDIR /app
3
+ COPY . .
4
+ RUN test "$(node --version)" = "v24.21.0" \
5
+ && test -f package-lock.json \
6
+ && npm ci --ignore-scripts \
7
+ && npm run build \
8
+ && npm prune --omit=dev --ignore-scripts
9
+
10
+ FROM gcr.io/distroless/nodejs24-debian13:nonroot@sha256:7781e8b4fccf59240bd539af6738cccf8dad4be303165c3a1fa065c48699b937
11
+ WORKDIR /app
12
+ ENV EMSEEPEA_DEPLOYMENT_MODE=production-behind-proxy
13
+ COPY --from=build --chown=65532:65532 /app/package.json ./package.json
14
+ COPY --from=build --chown=65532:65532 /app/node_modules ./node_modules
15
+ COPY --from=build --chown=65532:65532 /app/dist ./dist
16
+ USER 65532:65532
17
+ EXPOSE 3000
18
+ HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 CMD ["/nodejs/bin/node", "-e", "const port=process.env.PORT||'3000';fetch(`http://127.0.0.1:${port}/healthz`).then((r)=>process.exit(r.ok?0:1),()=>process.exit(1));"]
19
+ CMD ["dist/server.js"]
@@ -47,6 +47,22 @@ npm start
47
47
  The server listens on `http://127.0.0.1:3000/mcp` by default. Set `PORT` to
48
48
  choose another port.
49
49
 
50
+ ## Build a production container
51
+
52
+ Run `npm install` first so the project has a lockfile. Then run:
53
+
54
+ ```sh
55
+ npm run container:build
56
+ ```
57
+
58
+ The image is for a production deployment behind a trusted proxy. It starts with
59
+ the fail-closed production profile and needs a runtime-mounted deployment
60
+ configuration file. Keep secrets in your platform's runtime secret store, not in
61
+ the Dockerfile, build arguments, or deployment configuration file.
62
+
63
+ For the production proxy, runtime configuration, and hardening requirements, see
64
+ the [container guide](https://emseepea.github.io/emseepea/examples/#build-a-production-container).
65
+
50
66
  ## Add Feedback
51
67
 
52
68
  Install `@emseepea/feedback` when this server needs a detailed one-way
@@ -11,11 +11,12 @@
11
11
  "test:built": "node --test test/*.test.mjs",
12
12
  "test:llm": "npm run build && npm run test:llm:built",
13
13
  "test:llm:built": "emseepea-test eval",
14
- "lint": "oxlint src test eval"
14
+ "lint": "oxlint src test eval",
15
+ "container:build": "docker build --tag emseepea-server:local ."
15
16
  },
16
17
  "devDependencies": {
17
- "@emseepea/feedback": "0.2.3",
18
- "@emseepea/testing": "0.9.6",
18
+ "@emseepea/feedback": "0.2.6",
19
+ "@emseepea/testing": "0.9.9",
19
20
  "@types/node": "24.13.3",
20
21
  "typescript": "6.0.3",
21
22
  "oxlint": "1.80.0"
@@ -25,7 +26,7 @@
25
26
  },
26
27
  "private": true,
27
28
  "dependencies": {
28
- "@emseepea/server": "0.8.1",
29
+ "@emseepea/server": "0.10.0",
29
30
  "zod": "4.4.3"
30
31
  }
31
32
  }
@@ -1,7 +1,7 @@
1
- import { serveEmseepea } from "@emseepea/server";
1
+ import { loadDeploymentProfile, serveEmseepea } from "@emseepea/server";
2
2
  import { createResourcesAndPromptsServer } from "./app.js";
3
3
 
4
- const running = await serveEmseepea(await createResourcesAndPromptsServer(), {
4
+ const running = await serveEmseepea(await createResourcesAndPromptsServer({ deployment: loadDeploymentProfile() }), {
5
5
  port: Number.parseInt(process.env.PORT ?? "3000", 10),
6
6
  });
7
7
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emseepea/create-resources-and-prompts-server",
3
- "version": "0.0.19",
3
+ "version": "0.0.22",
4
4
  "description": "Create an Em See Pea server with resources and prompts.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -18,10 +18,10 @@
18
18
  "prepack": "npm run build:initializer"
19
19
  },
20
20
  "devDependencies": {
21
- "@emseepea/feedback": "0.2.3",
22
- "@emseepea/server": "0.8.1",
21
+ "@emseepea/feedback": "0.2.6",
22
+ "@emseepea/server": "0.10.0",
23
23
  "zod": "4.4.3",
24
- "@emseepea/testing": "0.9.6",
24
+ "@emseepea/testing": "0.9.9",
25
25
  "@types/node": "24.13.3",
26
26
  "typescript": "6.0.3",
27
27
  "oxlint": "1.80.0"