@redaksjon/protokoll 1.0.21 → 1.0.22-dev.20260227214704.08e3d54
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/.dockerignore +42 -0
- package/.gcloudignore +43 -0
- package/deploy/cloud-run/Dockerfile +35 -0
- package/deploy/cloud-run/env.example.yaml +47 -0
- package/dist/configDiscovery.js +999 -40
- package/dist/configDiscovery.js.map +1 -1
- package/dist/mcp/server-hono.js +372 -121
- package/dist/mcp/server-hono.js.map +1 -1
- package/dist/mcp/server.js +4 -2
- package/dist/mcp/server.js.map +1 -1
- package/docs/gcs-authentication.md +70 -0
- package/docs/mcp-session-recovery.md +30 -0
- package/docs/storage-backends.md +79 -0
- package/guide/cloud-run.md +150 -0
- package/guide/index.md +1 -0
- package/package.json +4 -1
- package/scripts/ensure-executable-bins.mjs +29 -0
package/.dockerignore
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# VCS
|
|
2
|
+
.git
|
|
3
|
+
.gitignore
|
|
4
|
+
|
|
5
|
+
# Ignore local dependencies and build output from host
|
|
6
|
+
node_modules
|
|
7
|
+
dist
|
|
8
|
+
coverage
|
|
9
|
+
|
|
10
|
+
# Editor/system
|
|
11
|
+
.DS_Store
|
|
12
|
+
.idea
|
|
13
|
+
.vscode
|
|
14
|
+
|
|
15
|
+
# Logs
|
|
16
|
+
*.log
|
|
17
|
+
npm-debug.log*
|
|
18
|
+
yarn-debug.log*
|
|
19
|
+
yarn-error.log*
|
|
20
|
+
pnpm-debug.log*
|
|
21
|
+
|
|
22
|
+
# Env/secrets
|
|
23
|
+
.env
|
|
24
|
+
.env.*
|
|
25
|
+
!.env.example
|
|
26
|
+
*.pem
|
|
27
|
+
*.key
|
|
28
|
+
*.p12
|
|
29
|
+
*.pfx
|
|
30
|
+
|
|
31
|
+
# Runtime/local data (large and not needed for image build)
|
|
32
|
+
recordings
|
|
33
|
+
inbound
|
|
34
|
+
activity
|
|
35
|
+
notes
|
|
36
|
+
processed
|
|
37
|
+
context
|
|
38
|
+
uploads
|
|
39
|
+
tmp
|
|
40
|
+
temp
|
|
41
|
+
.cache
|
|
42
|
+
|
package/.gcloudignore
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
.git
|
|
2
|
+
.gitignore
|
|
3
|
+
.gcloudignore
|
|
4
|
+
.dockerignore
|
|
5
|
+
|
|
6
|
+
# Node/build artifacts
|
|
7
|
+
node_modules/
|
|
8
|
+
dist/
|
|
9
|
+
coverage/
|
|
10
|
+
*.log
|
|
11
|
+
npm-debug.log*
|
|
12
|
+
yarn-debug.log*
|
|
13
|
+
yarn-error.log*
|
|
14
|
+
pnpm-debug.log*
|
|
15
|
+
|
|
16
|
+
# Local editor/system files
|
|
17
|
+
.DS_Store
|
|
18
|
+
.idea/
|
|
19
|
+
.vscode/
|
|
20
|
+
|
|
21
|
+
# Local runtime/config secrets
|
|
22
|
+
.env
|
|
23
|
+
.env.*
|
|
24
|
+
!.env.example
|
|
25
|
+
*.pem
|
|
26
|
+
*.key
|
|
27
|
+
*.p12
|
|
28
|
+
*.pfx
|
|
29
|
+
|
|
30
|
+
# Local Protokoll data directories (avoid uploading large data)
|
|
31
|
+
recordings/
|
|
32
|
+
inbound/
|
|
33
|
+
activity/
|
|
34
|
+
notes/
|
|
35
|
+
processed/
|
|
36
|
+
context/
|
|
37
|
+
uploads/
|
|
38
|
+
|
|
39
|
+
# Misc caches/temp
|
|
40
|
+
.cache/
|
|
41
|
+
tmp/
|
|
42
|
+
temp/
|
|
43
|
+
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
FROM node:24-bookworm-slim AS builder
|
|
2
|
+
|
|
3
|
+
WORKDIR /app
|
|
4
|
+
|
|
5
|
+
# Native modules (e.g. better-sqlite3) may compile on Node 24 in CI.
|
|
6
|
+
RUN apt-get update \
|
|
7
|
+
&& apt-get install -y --no-install-recommends python3 make g++ \
|
|
8
|
+
&& rm -rf /var/lib/apt/lists/*
|
|
9
|
+
|
|
10
|
+
COPY package*.json ./
|
|
11
|
+
COPY scripts ./scripts
|
|
12
|
+
RUN npm install
|
|
13
|
+
|
|
14
|
+
COPY . .
|
|
15
|
+
RUN npm run build
|
|
16
|
+
RUN npm prune --omit=dev
|
|
17
|
+
|
|
18
|
+
FROM node:24-bookworm-slim AS runtime
|
|
19
|
+
|
|
20
|
+
WORKDIR /app
|
|
21
|
+
ENV NODE_ENV=production
|
|
22
|
+
|
|
23
|
+
# ffmpeg is required for audio conversion/splitting in Protokoll pipelines.
|
|
24
|
+
RUN apt-get update \
|
|
25
|
+
&& apt-get install -y --no-install-recommends ffmpeg \
|
|
26
|
+
&& rm -rf /var/lib/apt/lists/*
|
|
27
|
+
|
|
28
|
+
COPY --from=builder /app/package*.json ./
|
|
29
|
+
COPY --from=builder /app/node_modules ./node_modules
|
|
30
|
+
COPY --from=builder /app/dist ./dist
|
|
31
|
+
|
|
32
|
+
EXPOSE 8080
|
|
33
|
+
|
|
34
|
+
# Cloud Run provides PORT; server-hono also supports MCP_PORT/PROTOKOLL_MCP_PORT.
|
|
35
|
+
CMD ["node", "dist/mcp/server-hono.js", "--host", "0.0.0.0"]
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Runtime environment variables for Cloud Run.
|
|
2
|
+
# Copy this file for each environment and replace example values.
|
|
3
|
+
|
|
4
|
+
# OPENAI_API_KEY is injected from Secret Manager by Cloud Build/Cloud Run.
|
|
5
|
+
# Do not put API keys in this file.
|
|
6
|
+
|
|
7
|
+
# Optional: if using Anthropic models, inject ANTHROPIC_API_KEY from Secret Manager too.
|
|
8
|
+
|
|
9
|
+
# Optional model overrides.
|
|
10
|
+
PROTOKOLL_MODEL: "gpt-5.2"
|
|
11
|
+
PROTOKOLL_CLASSIFY_MODEL: "gpt-5.2"
|
|
12
|
+
PROTOKOLL_COMPOSE_MODEL: "gpt-5.2"
|
|
13
|
+
PROTOKOLL_TRANSCRIPTION_MODEL: "whisper-1"
|
|
14
|
+
|
|
15
|
+
# Keep server logs concise by default.
|
|
16
|
+
PROTOKOLL_DEBUG: "false"
|
|
17
|
+
PROTOKOLL_VERBOSE: "false"
|
|
18
|
+
|
|
19
|
+
# MCP HTTP server port mapping. Cloud Run also sets PORT automatically.
|
|
20
|
+
MCP_PORT: "8080"
|
|
21
|
+
|
|
22
|
+
# Optional Protokoll directories (when omitted, defaults are used).
|
|
23
|
+
# Use absolute paths in Cloud Run if you intentionally want filesystem mode.
|
|
24
|
+
# PROTOKOLL_INPUT_DIRECTORY: "/app/recordings"
|
|
25
|
+
# PROTOKOLL_OUTPUT_DIRECTORY: "/app/notes"
|
|
26
|
+
# PROTOKOLL_PROCESSED_DIRECTORY: "/app/processed"
|
|
27
|
+
# PROTOKOLL_CONTEXT_DIRECTORIES: "/app/context-a,/app/context-b"
|
|
28
|
+
|
|
29
|
+
# Storage backend selection.
|
|
30
|
+
# "filesystem" (default) or "gcs".
|
|
31
|
+
PROTOKOLL_STORAGE_BACKEND: "gcs"
|
|
32
|
+
|
|
33
|
+
# GCS backend settings (supports either URI form or bucket/prefix form).
|
|
34
|
+
PROTOKOLL_STORAGE_GCS_PROJECT_ID: "replace-me-project-id"
|
|
35
|
+
PROTOKOLL_STORAGE_GCS_INPUT_BUCKET: "replace-me-input-bucket"
|
|
36
|
+
PROTOKOLL_STORAGE_GCS_INPUT_PREFIX: "input"
|
|
37
|
+
PROTOKOLL_STORAGE_GCS_OUTPUT_BUCKET: "replace-me-output-bucket"
|
|
38
|
+
PROTOKOLL_STORAGE_GCS_OUTPUT_PREFIX: "output"
|
|
39
|
+
PROTOKOLL_STORAGE_GCS_CONTEXT_BUCKET: "replace-me-context-bucket"
|
|
40
|
+
PROTOKOLL_STORAGE_GCS_CONTEXT_PREFIX: "context"
|
|
41
|
+
# PROTOKOLL_STORAGE_GCS_INPUT_URI: "gs://replace-me-input-bucket/input"
|
|
42
|
+
# PROTOKOLL_STORAGE_GCS_OUTPUT_URI: "gs://replace-me-output-bucket/output"
|
|
43
|
+
# PROTOKOLL_STORAGE_GCS_CONTEXT_URI: "gs://replace-me-context-bucket/context"
|
|
44
|
+
# PROTOKOLL_STORAGE_GCS_CREDENTIALS_FILE: "/var/secrets/gcp/key.json"
|
|
45
|
+
|
|
46
|
+
# Cloud Run/GCP context (recommended with storage.backend: gcs).
|
|
47
|
+
GOOGLE_CLOUD_PROJECT: "replace-me-project-id"
|