@cosmicdrift/kumiko-server-runtime 0.385.0 → 0.387.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/LICENSE CHANGED
@@ -1,57 +1,21 @@
1
- Business Source License 1.1
2
-
3
- Parameters
4
-
5
- Licensor: Marc Frost
6
-
7
- Licensed Work: @cosmicdrift/kumiko-framework
8
- The Licensed Work is © 2026 Marc Frost.
9
-
10
- Additional Use Grant:
11
- You may use the Licensed Work in production for any purpose, including
12
- commercially, EXCEPT for the Restricted Use.
13
-
14
- "Restricted Use" is defined as using the Licensed Work to provide a platform
15
- or service to third parties that allows them to host, deploy, or run their
16
- own applications built with the Licensed Work. This includes, but is not
17
- limited to: managed hosting services, software-as-a-service (SaaS) platforms,
18
- platform-as-a-service (PaaS), developer platforms, or any multi-tenant
19
- managed offering of the Licensed Work.
20
-
21
- This restriction does not apply to the Licensor, any entity controlled by,
22
- controlling, or under common control with the Licensor ("Affiliates"), or
23
- contractors acting on their behalf. The Licensor remains free to use the
24
- Licensed Work for any purpose, including for the operation of kumiko.rocks.
25
-
26
- Change Date: 2030-05-05
27
- Change License: Apache License, Version 2.0
28
-
29
-
30
- Terms
31
-
32
- The Licensor hereby grants you the right to copy, modify, create derivative works,
33
- redistribute, and make non-production use of the Licensed Work. The Licensor may
34
- make an Additional Use Grant, above, permitting limited production use.
35
-
36
- Effective on the Change Date, or the fourth anniversary of the first publicly
37
- available distribution of the Licensed Work under this License, whichever comes
38
- first, this License will convert to the Change License.
39
-
40
- This Business Source License governs use of the Licensed Work in all cases, except
41
- as to any use that is explicitly granted in the Additional Use Grant above or
42
- under the Change License after the Change Date.
43
-
44
- If your use of the Licensed Work does not comply with the requirements of this
45
- License, you must cease use of the Licensed Work immediately.
46
-
47
- All copies of the Licensed Work, and all derivative works thereof, must include
48
- this License.
49
-
50
- This License does not grant you any right, title, or interest in any trademark,
51
- logo, or branding of the Licensor, except as required to comply with this License.
52
-
53
- TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON AN
54
- “AS IS” BASIS. LICENSOR DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
55
- WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
56
- TITLE, AND NON-INFRINGEMENT. IN NO EVENT WILL LICENSOR BE LIABLE FOR ANY DAMAGES
57
- ARISING OUT OF OR RELATED TO THIS LICENSE OR THE USE OF THE LICENSED WORK.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Marc Frost
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -31,8 +31,7 @@ function envMasterKeyProviderIfConfigured(envSource) {
31
31
  if (!envHasMasterKek(envSource))
32
32
  return undefined;
33
33
  const provider = createEnvMasterKeyProvider({
34
- // CURRENT_VERSION default "1" spiegelt secretsEnvSchema — ohne
35
- // ihn wirft der raw-env-Provider, obwohl V1 gesetzt ist.
34
+ // CURRENT_VERSION defaults to "1" in secretsEnvSchema; without it, the raw-env provider throws even when V1 is set.
36
35
  env: {
37
36
  ...envSource,
38
37
  KUMIKO_SECRETS_MASTER_KEY_CURRENT_VERSION: envSource["KUMIKO_SECRETS_MASTER_KEY_CURRENT_VERSION"] ?? "1",
@@ -59,7 +59,7 @@ async function assertWorkerSchemaCurrent(db, migrationsDir, processName) {
59
59
  }
60
60
  export async function bootWorkerProcess(options, envSource, profile) {
61
61
  const { processName } = profile;
62
- // Polyfill before anything else (fw#1725): without it every job fails with
62
+ // Polyfill before anything else: without it every job fails with
63
63
  // "Temporal is not defined" in a retry loop, with no boot-time signal.
64
64
  const { ensureTemporalPolyfill } = await import("@cosmicdrift/kumiko-framework/time");
65
65
  await ensureTemporalPolyfill();
@@ -155,7 +155,7 @@ export async function bootWorkerProcess(options, envSource, profile) {
155
155
  const idempotency = createIdempotencyGuard(redis, { ttlSeconds: 60 });
156
156
  const eventDedup = createEventDedup(redis, { ttlSeconds: 60 });
157
157
  const entityCache = createEntityCache(redis, { ttlSeconds: 60 });
158
- // Same crypto wiring as the API (fw#1725), otherwise this process writes
158
+ // Same crypto wiring as the API, otherwise this process writes
159
159
  // rows the API can no longer read (different cipher, missing blind index).
160
160
  const deps = { db, redis, registry };
161
161
  const resolvedExtraContext = typeof options.extraContext === "function"
@@ -26,28 +26,29 @@ export type ClientEntriesConfig = {
26
26
  export type BuildManifest = Readonly<Record<string, string>>;
27
27
  export type BuildResult = {
28
28
  readonly outDir: string;
29
- /** Logical → hashed-URL mapping. Beispiel:
29
+ /** Logical → hashed-URL mapping. Example:
30
30
  * { "client.js": "/assets/client-a3f2.js",
31
31
  * "styles.css": "/assets/styles-9b4c.css" } */
32
32
  readonly manifest: BuildManifest;
33
- /** Build-Identität (Hash über die Asset-URLs) + lesbarer Zeitstempel.
34
- * undefined bei vanilla public-only-Builds (kein Bundle). */
33
+ /** Build identity (hash of the asset URLs) plus a human-readable timestamp.
34
+ * undefined for vanilla public-only builds (no bundle). */
35
35
  readonly buildInfo?: BuildInfo;
36
36
  };
37
37
  /** Baked into index.html (`<meta name="kumiko-build">`) AND written as
38
38
  * dist/build-info.json. The UpdateChecker polls build-info.json and compares
39
39
  * `id` with the loaded build, showing a reload banner on drift. */
40
40
  export type BuildInfo = {
41
- /** Hash über die sortierten (content-gehashten) Asset-URLs. Ändert sich
42
- * gdw. sich ein Asset ändert — selbsttragend, kein Env-Var/Dockerfile. */
41
+ /** Hash of the sorted, content-hashed asset URLs. Changes exactly when an
42
+ * asset changes — self-contained, with no environment variable or Dockerfile. */
43
43
  readonly id: string;
44
- /** ISO-Zeitstempel des Builds, lesbare Anzeige-Version (ersetzt den rohen sha). */
44
+ /** ISO timestamp of the build, used as the human-readable display version
45
+ * instead of the raw hash. */
45
46
  readonly builtAt: string;
46
47
  };
47
48
  export declare const DEFAULT_HTML = "<!doctype html>\n<html lang=\"en\">\n <head>\n <meta charset=\"utf-8\" />\n <meta name=\"viewport\" content=\"width=device-width,initial-scale=1,interactive-widget=resizes-content\" />\n <title>Kumiko</title>\n </head>\n <body>\n <div id=\"root\"></div>\n </body>\n</html>\n";
48
49
  /** Folder name relative to dist/ for hashed assets (JS, CSS, file-loader
49
- * outputs). Exported damit runProdApp dieselbe Konvention für Cache-
50
- * Header nutzt — Drift verhindern. */
50
+ * outputs). Exported so runProdApp uses the same convention for cache headers
51
+ * and cannot drift. */
51
52
  export declare const ASSETS_DIR = "assets";
52
53
  export declare function buildProdBundle(options?: BuildProdBundleOptions): Promise<BuildResult>;
53
54
  export type ClientEntry = {
@@ -71,7 +72,7 @@ export type ClientEntry = {
71
72
  * `kumiko-build`/`kumiko build` via `@cosmicdrift/kumiko-dev-server/build`,
72
73
  * not just from unit tests.
73
74
  *
74
- * Precedence (fw#2320 — explicit declaration, no filename inference):
75
+ * Precedence (explicit declaration, no filename inference):
75
76
  * 1. `declared.clientEntry` and `declared.clientEntries` both set → throw.
76
77
  * 2. `declared.clientEntries` (non-empty) → one entry per declaration.
77
78
  * 3. `declared.clientEntry` → single entry, name "client".
@@ -87,9 +88,9 @@ export declare function resolveClientEntries(cwd: string, declared: ClientEntrie
87
88
  export declare function readClientEntriesConfig(cwd: string): ClientEntriesConfig;
88
89
  type ResolvedStylesheet = {
89
90
  readonly path: string;
90
- /** True nur wenn wir auf das gepackte renderer-web-styles.css zurückfallen
91
- * (App hat clientEntry + renderer-web-Dep, aber kein eigenes src/styles.css).
92
- * Steuert den Shell-Klassen-Sentinel im Build. */
91
+ /** True only when falling back to the packaged renderer-web-styles.css
92
+ * (the app has clientEntry and a renderer-web dependency, but no
93
+ * src/styles.css). Controls the shell-class sentinel check during the build. */
93
94
  readonly isRendererWebFallback: boolean;
94
95
  };
95
96
  export declare function assertRendererWebShellPresent(css: string, stylesheet: ResolvedStylesheet): void;
@@ -98,9 +99,9 @@ export declare function runTailwindOnce(entry: string, cwd: string): Promise<str
98
99
  export declare function isEntryOutputFor(outName: string, baseName: string): boolean;
99
100
  export declare function injectAssetTags(html: string, manifest: BuildManifest, entry: ClientEntry, buildInfo?: BuildInfo): string;
100
101
  export declare function computeBuildId(manifest: BuildManifest): string;
101
- /** Formatiert ein BuildResult als CLI-freundliche Mehrzeilen-Zusammenfassung
102
- * mit ANSI-Farben. Wird sowohl von `kumiko build` als auch von dem
103
- * hoisted `kumiko-build`-Bin verwendet, damit das Output konsistent ist. */
102
+ /** Formats a BuildResult as a CLI-friendly, multi-line summary with ANSI
103
+ * colors. Used by both `kumiko build` and the hoisted `kumiko-build` binary
104
+ * so their output remains consistent. */
104
105
  export declare function formatBuildResult(result: BuildResult, durationMs: number): string;
105
106
  /** Hashes every inline script in the HTML files of a finished build output, so the
106
107
  * CSP only ever allows code that shipped in the artefact. */