@cosmicdrift/kumiko-dev-server 0.363.0 → 0.364.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.
@@ -67,7 +67,13 @@ export async function runDevApp(options) {
67
67
  // die früher nur runProdApp fing und sonst erst den Prod-Pod im
68
68
  // CrashLoopBackOff sterben ließ (#359). Wirft synchron, bevor ein
69
69
  // Socket oder Watcher (codegen-Write) aufgeht.
70
- validateBoot(features, bootOptions);
70
+ // Resolved before validateBoot: an app-supplied masterKey provider must satisfy the
71
+ // encrypted-field gate here exactly as it does in runProdApp.
72
+ const bootCrypto = resolveBootCrypto(envSource, options.masterKey);
73
+ validateBoot(features, {
74
+ ...(bootCrypto.entityFieldCipher && { entityFieldCipher: bootCrypto.entityFieldCipher }),
75
+ ...bootOptions,
76
+ });
71
77
  warnIfNonUtcServerTimeZone();
72
78
  validateAppCustomScreenWriteQns(process.cwd(), collectWriteHandlerQns(features));
73
79
  // Codegen + File-Watcher — schreibt `<appRoot>/.kumiko/types.generated.d.ts`
@@ -122,7 +128,6 @@ export async function runDevApp(options) {
122
128
  // throwaway-Registry hier extrahiert nur die config-Keys, weil der
123
129
  // configResolver vor dem Server-Boot konstruiert wird (stack.registry
124
130
  // gibt's erst onAfterSetup) — createKumikoServer baut intern seine eigene.
125
- const bootCrypto = resolveBootCrypto(envSource, options.masterKey);
126
131
  // App-wide cipher for `encrypted: true` entity fields (symmetrisch zu
127
132
  // runProdApp) — executors resolve it lazily.
128
133
  configureEntityFieldEncryption(bootCrypto.entityFieldCipher);
@@ -0,0 +1,3 @@
1
+ export declare const FRAMEWORK_AGENTS_IMPORT = "@node_modules/@cosmicdrift/kumiko-framework/AGENTS.md";
2
+ export declare function renderAgentsMd(): string;
3
+ export declare function renderClaudeMd(): string;
@@ -0,0 +1,17 @@
1
+ export const FRAMEWORK_AGENTS_IMPORT = "@node_modules/@cosmicdrift/kumiko-framework/AGENTS.md";
2
+ const FRAMEWORK_AGENTS_PATH = "node_modules/@cosmicdrift/kumiko-framework/AGENTS.md";
3
+ const FRAMEWORK_AGENTS_DIR = "node_modules/@cosmicdrift/kumiko-framework/agents/";
4
+ export function renderAgentsMd() {
5
+ return `# Agent instructions
6
+
7
+ This app is built on Kumiko. The framework guide for coding agents ships with the installed package and matches its version:
8
+
9
+ - \`${FRAMEWORK_AGENTS_PATH}\`: start here.
10
+ - \`${FRAMEWORK_AGENTS_DIR}\`: generated indexes of bundled features, widgets and tested examples.
11
+
12
+ Read the framework guide before you add or change a feature. App-specific rules go below.
13
+ `;
14
+ }
15
+ export function renderClaudeMd() {
16
+ return `${FRAMEWORK_AGENTS_IMPORT}\n@AGENTS.md\n`;
17
+ }
@@ -16,6 +16,7 @@ import { collectTableMetas, generateMigration, writeSnapshotJson, } from "@cosmi
16
16
  import { composeFeatures } from "@cosmicdrift/kumiko-server-runtime/compose-features";
17
17
  import { IndentationText, Project, VariableDeclarationKind } from "ts-morph";
18
18
  import { isKebabSegment } from "./kebab.js";
19
+ import { renderAgentsMd, renderClaudeMd } from "./scaffold-agent-docs.js";
19
20
  import { createDemoTasksFeature, renderDemoSeedFile, renderDemoTasksFeatureFile, renderDemoTasksI18n, renderDemoTasksIndex, renderDemoTasksWebIndex, } from "./scaffold-demo-tasks.js";
20
21
  import { scaffoldDeploy } from "./scaffold-deploy.js";
21
22
  export async function scaffoldApp(options) {
@@ -93,6 +94,10 @@ export async function scaffoldApp(options) {
93
94
  }
94
95
  write(join(destination, "README.md"), `${renderReadme(options.name, options.features)}${testSetup === undefined ? "" : `\n${testSetup.rulesMarkdown}`}`);
95
96
  files.push("README.md");
97
+ write(join(destination, "AGENTS.md"), renderAgentsMd());
98
+ files.push("AGENTS.md");
99
+ write(join(destination, "CLAUDE.md"), renderClaudeMd());
100
+ files.push("CLAUDE.md");
96
101
  return { destination, files, appName: options.name };
97
102
  }
98
103
  // @wrapper-known semantic-alias
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cosmicdrift/kumiko-dev-server",
3
- "version": "0.363.0",
3
+ "version": "0.364.0",
4
4
  "description": "Dev-tooling for Kumiko apps: local dev-server bootstrap (runDevApp), scaffolding, codegen. Its compose-stacks/env-schema subpaths are consumed at prod boot too — see @cosmicdrift/kumiko-server-runtime for the prod runner itself.",
5
5
  "license": "BUSL-1.1",
6
6
  "author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
@@ -64,13 +64,13 @@
64
64
  "kumiko-upgrade": "./bin/kumiko-upgrade.ts"
65
65
  },
66
66
  "dependencies": {
67
- "@cosmicdrift/kumiko-bundled-features": "0.363.0",
68
- "@cosmicdrift/kumiko-framework": "0.363.0",
69
- "@cosmicdrift/kumiko-headless": "0.363.0",
70
- "@cosmicdrift/kumiko-renderer-mail-html": "0.363.0",
71
- "@cosmicdrift/kumiko-renderer-web": "0.363.0",
72
- "@cosmicdrift/kumiko-server-runtime": "0.363.0",
73
- "@cosmicdrift/kumiko-types": "0.363.0",
67
+ "@cosmicdrift/kumiko-bundled-features": "0.364.0",
68
+ "@cosmicdrift/kumiko-framework": "0.364.0",
69
+ "@cosmicdrift/kumiko-headless": "0.364.0",
70
+ "@cosmicdrift/kumiko-renderer-mail-html": "0.364.0",
71
+ "@cosmicdrift/kumiko-renderer-web": "0.364.0",
72
+ "@cosmicdrift/kumiko-server-runtime": "0.364.0",
73
+ "@cosmicdrift/kumiko-types": "0.364.0",
74
74
  "bun-types": "^1.3.13",
75
75
  "ts-morph": "^28.0.0",
76
76
  "zod": "^4.4.3"
package/src/changes.json CHANGED
@@ -1,4 +1,10 @@
1
1
  [
2
+ {
3
+ "version": "0.364.0",
4
+ "type": "fix",
5
+ "title": "runDevApp resolves the masterKey provider before boot validation",
6
+ "detail": "runDevApp validated encrypted fields before building the boot cipher, so an app that supplies masterKey and has no KUMIKO_SECRETS_MASTER_KEY_V1 in the environment booted in production but failed locally with no usable master key. The provider now reaches validateBoot like in runProdApp and runWorkerApp."
7
+ },
2
8
  {
3
9
  "version": "0.363.0",
4
10
  "type": "improvement",